From 13909fad6498c0f628c0cee9f004844d24992744 Mon Sep 17 00:00:00 2001 From: GitHub Date: Mon, 19 Aug 2024 14:51:37 +0000 Subject: [PATCH] Update to comunica/comunica#fbcc3a81f87738633ddf69ede5ca504236f7edd9. --- versions/latest/engines/query-sparql-file/comunica-browser.js | 2 +- .../latest/engines/query-sparql-file/comunica-browser.js.map | 2 +- .../latest/engines/query-sparql-rdfjs-lite/comunica-browser.js | 2 +- .../engines/query-sparql-rdfjs-lite/comunica-browser.js.map | 2 +- versions/latest/engines/query-sparql-rdfjs/comunica-browser.js | 2 +- .../latest/engines/query-sparql-rdfjs/comunica-browser.js.map | 2 +- versions/latest/engines/query-sparql/comunica-browser.js | 2 +- versions/latest/engines/query-sparql/comunica-browser.js.map | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/versions/latest/engines/query-sparql-file/comunica-browser.js b/versions/latest/engines/query-sparql-file/comunica-browser.js index 631e3d8..754ae5a 100644 --- a/versions/latest/engines/query-sparql-file/comunica-browser.js +++ b/versions/latest/engines/query-sparql-file/comunica-browser.js @@ -1,3 +1,3 @@ /*! For license information please see comunica-browser.js.LICENSE.txt */ -var Comunica;(()=>{var e={36885:(e,t,r)=>{var{Buffer:n}=r(1048),a={},o=a.LEFT_BRACE=1,s=a.RIGHT_BRACE=2,c=a.LEFT_BRACKET=3,u=a.RIGHT_BRACKET=4,l=a.COLON=5,d=a.COMMA=6,p=a.TRUE=7,h=a.FALSE=8,f=a.NULL=9,y=a.STRING=10,g=a.NUMBER=11,m=a.START=17,b=a.STOP=18,v=a.TRUE1=33,_=a.TRUE2=34,w=a.TRUE3=35,T=a.FALSE1=49,S=a.FALSE2=50,O=a.FALSE3=51,E=a.FALSE4=52,x=a.NULL1=65,A=a.NULL2=66,R=a.NULL3=67,I=a.NUMBER1=81,P=a.NUMBER3=83,N=a.STRING1=97,D=a.STRING2=98,j=a.STRING3=99,C=a.STRING4=100,M=a.STRING5=101,L=a.STRING6=102,k=a.VALUE=113,F=a.KEY=114,B=a.OBJECT=129,U=a.ARRAY=130,q="\\".charCodeAt(0),V="/".charCodeAt(0),Q="\b".charCodeAt(0),$="\f".charCodeAt(0),H="\n".charCodeAt(0),G="\r".charCodeAt(0),z="\t".charCodeAt(0),K=65536;function X(e){return n.alloc?n.alloc(e):new n(e)}function J(){this.tState=m,this.value=void 0,this.string=void 0,this.stringBuffer=X(K),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=k,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:X(2),3:X(3),4:X(4)},this.offset=-1}J.toknam=function(e){for(var t=Object.keys(a),r=0,n=t.length;r=K&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=e},W.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>K&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),e.copy(this.stringBuffer,this.stringBufferOffset,t,r),this.stringBufferOffset+=n},W.write=function(e){var t;"string"==typeof e&&(e=new n(e));for(var r=0,i=e.length;r=48&&t<64)this.string=String.fromCharCode(t),this.tState=P;else if(32!==t&&9!==t&&10!==t&&13!==t)return this.charError(e,r)}else if(this.tState===N)if(t=e[r],this.bytes_remaining>0){for(var a=0;a=128){if(t<=193||t>244)return this.onError(new Error("Invalid UTF-8 character at position "+r+" in state "+J.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+r>e.length){for(var g=0;g<=e.length-1-r;g++)this.temp_buffs[this.bytes_in_sequence][g]=e[r+g];this.bytes_remaining=r+this.bytes_in_sequence-e.length,r=e.length-1}else this.appendStringBuf(e,r,r+this.bytes_in_sequence),r=r+this.bytes_in_sequence-1}else if(34===t)this.tState=m,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(y,this.string),this.offset+=n.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===t)this.tState=D;else{if(!(t>=32))return this.charError(e,r);this.appendStringChar(t)}else if(this.tState===D)if(34===(t=e[r]))this.appendStringChar(t),this.tState=N;else if(92===t)this.appendStringChar(q),this.tState=N;else if(47===t)this.appendStringChar(V),this.tState=N;else if(98===t)this.appendStringChar(Q),this.tState=N;else if(102===t)this.appendStringChar($),this.tState=N;else if(110===t)this.appendStringChar(H),this.tState=N;else if(114===t)this.appendStringChar(G),this.tState=N;else if(116===t)this.appendStringChar(z),this.tState=N;else{if(117!==t)return this.charError(e,r);this.unicode="",this.tState=j}else if(this.tState===j||this.tState===C||this.tState===M||this.tState===L){if(!((t=e[r])>=48&&t<64||t>64&&t<=70||t>96&&t<=102))return this.charError(e,r);if(this.unicode+=String.fromCharCode(t),this.tState++===L){var b=parseInt(this.unicode,16);this.unicode=void 0,void 0!==this.highSurrogate&&b>=56320&&b<57344?(this.appendStringBuf(new n(String.fromCharCode(this.highSurrogate,b))),this.highSurrogate=void 0):void 0===this.highSurrogate&&b>=55296&&b<56320?this.highSurrogate=b:(void 0!==this.highSurrogate&&(this.appendStringBuf(new n(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new n(String.fromCharCode(b)))),this.tState=N}}else if(this.tState===I||this.tState===P)switch(t=e[r]){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=P;break;default:this.tState=m;var k=this.numberReviver(this.string);if(k)return k;this.offset+=this.string.length-1,this.string=void 0,r--}else if(this.tState===v){if(114!==e[r])return this.charError(e,r);this.tState=_}else if(this.tState===_){if(117!==e[r])return this.charError(e,r);this.tState=w}else if(this.tState===w){if(101!==e[r])return this.charError(e,r);this.tState=m,this.onToken(p,!0),this.offset+=3}else if(this.tState===T){if(97!==e[r])return this.charError(e,r);this.tState=S}else if(this.tState===S){if(108!==e[r])return this.charError(e,r);this.tState=O}else if(this.tState===O){if(115!==e[r])return this.charError(e,r);this.tState=E}else if(this.tState===E){if(101!==e[r])return this.charError(e,r);this.tState=m,this.onToken(h,!1),this.offset+=4}else if(this.tState===x){if(117!==e[r])return this.charError(e,r);this.tState=A}else if(this.tState===A){if(108!==e[r])return this.charError(e,r);this.tState=R}else if(this.tState===R){if(108!==e[r])return this.charError(e,r);this.tState=m,this.onToken(f,null),this.offset+=3}},W.onToken=function(e,t){},W.parseError=function(e,t){this.tState=b,this.onError(new Error("Unexpected "+J.toknam(e)+(t?"("+JSON.stringify(t)+")":"")+" in state "+J.toknam(this.state)))},W.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},W.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=k)},W.emit=function(e){this.mode&&(this.state=d),this.onValue(e)},W.onValue=function(e){},W.onToken=function(e,t){if(this.state===k)if(e===y||e===g||e===p||e===h||e===f)this.value&&(this.value[this.key]=t),this.emit(t);else if(e===o)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=F,this.mode=B;else if(e===c)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=U,this.state=k;else if(e===s){if(this.mode!==B)return this.parseError(e,t);this.pop()}else{if(e!==u)return this.parseError(e,t);if(this.mode!==U)return this.parseError(e,t);this.pop()}else if(this.state===F)if(e===y)this.key=t,this.state=l;else{if(e!==s)return this.parseError(e,t);this.pop()}else if(this.state===l){if(e!==l)return this.parseError(e,t);this.state=k}else{if(this.state!==d)return this.parseError(e,t);if(e===d)this.mode===U?(this.key++,this.state=k):this.mode===B&&(this.state=F);else{if(!(e===u&&this.mode===U||e===s&&this.mode===B))return this.parseError(e,t);this.pop()}}},W.numberReviver=function(e){var t=Number(e);if(isNaN(t))return this.charError(buffer,i);e.match(/[0-9]+/)==e&&t.toString()!=e?this.onToken(y,e):this.onToken(g,t)},J.C=a,e.exports=J},64265:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fragment=void 0,t.fragment=function(e){let t=function(e){let t=e;(t.endsWith("/")||t.endsWith("#"))&&(t=t.slice(0,t.length-1));const r=[];t.lastIndexOf("/")>0&&r.push(t.lastIndexOf("/")),t.lastIndexOf("#")>0&&r.push(t.lastIndexOf("#"));const n=Math.max(...r);return t.slice(n+1)}(e);return t=t?function(e){var t;const r=null===(t=e.split(/[^a-z0-9]+/gi).filter((e=>""!==e)).map((e=>e[0].toUpperCase()+e.slice(1))).join("").match(/[a-z][a-z0-9]+/gi))||void 0===t?void 0:t[0];return void 0===r?void 0:r[0].toLowerCase()+r.slice(1)}(t):void 0,t||"v"}},37669:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupAllPrefixes=t.prefixToUri=t.uriToPrefix=void 0;const i=r(64265),a=r(30376);t.uriToPrefix=function(e,t){return n(this,void 0,void 0,(function*(){let r;try{r=yield(0,a.lookupPrefix)(e,t)}catch(n){(null==t?void 0:t.mintOnUnknown)&&(r=(0,i.fragment)(e).slice(0,4))}if(void 0!==r&&"object"==typeof(null==t?void 0:t.existingPrefixes)&&r in t.existingPrefixes){let e=0;for(;`${r}${e}`in t.existingPrefixes;)e+=1;r=`${r}${e}`}return r}))},t.prefixToUri=function(e,t){return n(this,void 0,void 0,(function*(){try{return yield(0,a.lookupUri)(e,t)}catch(e){return}}))};var o=r(30376);Object.defineProperty(t,"lookupAllPrefixes",{enumerable:!0,get:function(){return o.lookupAllPrefixes}})},87173:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchContext=t.fetchJson=void 0;const i=r(99766);function a(e,t){var r;return n(this,void 0,void 0,(function*(){const n=null!==(r=null==t?void 0:t.fetch)&&void 0!==r?r:i.fetch;return(yield n(e)).json()}))}t.fetchJson=a,t.fetchContext=function(e,t){return n(this,void 0,void 0,(function*(){return(yield a(e,t))["@context"]}))}},30376:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(12257),t),i(r(39268),t),i(r(91661),t)},91661:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupAllPrefixes=void 0;const i=r(87173);t.lookupAllPrefixes=function(e){return n(this,void 0,void 0,(function*(){return(0,i.fetchContext)("https://prefix.cc/context",e)}))}},12257:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupUri=void 0;const i=r(87173);t.lookupUri=function(e,t){return n(this,void 0,void 0,(function*(){const r=(yield(0,i.fetchContext)(`https://prefix.cc/${e}.file.jsonld`,t))[e];if("string"!=typeof r)throw new Error(`Expected uri to be a string, received: ${r} of type ${typeof r}`);return r}))}},39268:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupPrefix=void 0;const i=r(87173);t.lookupPrefix=function(e,t){return n(this,void 0,void 0,(function*(){const r=new URL("https://prefix.cc/reverse");r.searchParams.append("uri",e),r.searchParams.append("format","jsonld");const n=Object.keys(yield(0,i.fetchContext)(r,t));if(0===n.length)throw new Error("No prefixes returned");return n[0]}))}},99766: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}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(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 d(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 p(e){this.map={},e instanceof p?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 h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=f(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 m(){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:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(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=h(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?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,r,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),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-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 _(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 w(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 p(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];w.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new w(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,a){var o=new v(e,r);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new p,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 s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=p,e.Request=v,e.Response=w),t.Headers=p,t.Request=v,t.Response=w,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},31759:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=function(e){return n(this,void 0,void 0,(function*(){let t="";return e.on("data",(e=>{t+=e})),yield(0,i.promisifyEventEmitter)(e),t}))};const i=r(35033)},49126:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SaxesParser=t.EVENTS=void 0;const n=r(94824),i=r(30718),a=r(26457);var o=n.isS,s=n.isChar,c=n.isNameStartChar,u=n.isNameChar,l=n.S_LIST,d=n.NAME_RE,p=i.isChar,h=a.isNCNameStartChar,f=a.isNCNameChar,y=a.NC_NAME_RE;const g="http://www.w3.org/XML/1998/namespace",m="http://www.w3.org/2000/xmlns/",b={__proto__:null,xml:g,xmlns:m},v={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},_=-1,w=-2,T=13,S=33,O=10,E=60,x=61,A=62,R=63,I=93,P=e=>34===e||39===e,N=[34,39],D=[...N,91,A],j=[...N,E,I],C=[x,R,...l],M=[...l,A,38,E];function L(e,t,r){switch(t){case"xml":r!==g&&e.fail(`xml prefix must be bound to ${g}.`);break;case"xmlns":r!==m&&e.fail(`xmlns prefix must be bound to ${m}.`)}switch(r){case m:e.fail(""===t?`the default namespace may not be set to ${r}.`:`may not assign a prefix (even "xmlns") to the URI ${m}.`);break;case g:switch(t){case"xml":break;case"":e.fail(`the default namespace may not be set to ${r}.`);break;default:e.fail("may not assign the xml namespace to another prefix.")}}}const k=e=>y.test(e),F=e=>d.test(e);t.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const B={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};t.SaxesParser=class{get closed(){return this._closed}constructor(e){this.opt=null!=e?e:{},this.fragmentOpt=!!this.opt.fragment;const t=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,t){this.nameStartCheck=h,this.nameCheck=f,this.isName=k,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},b);const e=this.opt.additionalNamespaces;null!=e&&(function(e,t){for(const r of Object.keys(t))L(e,r,t[r])}(this,e),Object.assign(this.ns,e))}else this.nameStartCheck=c,this.nameCheck=u,this.isName=F,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}_init(){var e;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?T:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:r}=this.opt;if(void 0===r){if(!0===this.opt.forceXMLVersion)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");r="1.0"}this.setXMLVersion(r),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(v),null===(e=this.readyHandler)||void 0===e||e.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,t){this[B[e]]=t}off(e){this[B[e]]=void 0}makeError(e){var t;let r=null!==(t=this.fileName)&&void 0!==t?t:"";return this.trackPosition&&(r.length>0&&(r+=":"),r+=`${this.line}:${this.column}`),r.length>0&&(r+=": "),new Error(r+e)}fail(e){const t=this.makeError(e),r=this.errorHandler;if(void 0===r)throw t;return r(t),this}write(e){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let t=!1;null===e?(t=!0,e=""):"object"==typeof e&&(e=e.toString()),void 0!==this.carriedFromPrevious&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let r=e.length;const n=e.charCodeAt(r-1);!t&&(13===n||n>=55296&&n<=56319)&&(this.carriedFromPrevious=e[r-1],r--,e=e.slice(0,r));const{stateTable:i}=this;for(this.chunk=e,this.i=0;this.i=e.length)return _;const r=e.charCodeAt(t);if(this.column++,r<55296){if(r>=32||9===r)return r;switch(r){case O:return this.line++,this.column=0,this.positionAtNewLine=this.position,O;case 13:return e.charCodeAt(t+1)===O&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,w;default:return this.fail("disallowed character."),r}}if(r>56319)return r>=57344&&r<=65533||this.fail("disallowed character."),r;const n=65536+1024*(r-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return _;const r=e.charCodeAt(t);if(this.column++,r<55296){if(r>31&&r<127||r>159&&8232!==r||9===r)return r;switch(r){case O:return this.line++,this.column=0,this.positionAtNewLine=this.position,O;case 13:{const r=e.charCodeAt(t+1);r!==O&&133!==r||(this.i=t+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,w;default:return this.fail("disallowed character."),r}}if(r>56319)return r>=57344&&r<=65533||this.fail("disallowed character."),r;const n=65536+1024*(r-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const e=this.getCode();return e===w?O:e}unget(){this.i=this.prevI,this.column--}captureTo(e){let{i:t}=this;const{chunk:r}=this;for(;;){const n=this.getCode(),i=n===w,a=i?O:n;if(a===_||e.includes(a))return this.text+=r.slice(t,this.prevI),a;i&&(this.text+=`${r.slice(t,this.prevI)}\n`,t=this.i)}}captureToChar(e){let{i:t}=this;const{chunk:r}=this;for(;;){let n=this.getCode();switch(n){case w:this.text+=`${r.slice(t,this.prevI)}\n`,t=this.i,n=O;break;case _:return this.text+=r.slice(t),!1}if(n===e)return this.text+=r.slice(t,this.prevI),!0}}captureNameChars(){const{chunk:e,i:t}=this;for(;;){const r=this.getCode();if(r===_)return this.name+=e.slice(t),_;if(!u(r))return this.name+=e.slice(t,this.prevI),r===w?O:r}}skipSpaces(){for(;;){const e=this.getCodeNorm();if(e===_||!o(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,"1.0"===e?(this.isChar=s,this.getCode=this.getCode10):(this.isChar=p,this.getCode=this.getCode11)}sBegin(){65279===this.chunk.charCodeAt(0)&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case E:if(this.state=15,0!==this.text.length)throw new Error("no-empty text at start");break;case _:break;default:this.unget(),this.state=T,this.xmlDeclPossible=!1}}sDoctype(){var e;const t=this.captureTo(D);switch(t){case A:null===(e=this.doctypeHandler)||void 0===e||e.call(this,this.text),this.text="",this.state=T,this.doctype=!0;break;case _:break;default:this.text+=String.fromCodePoint(t),91===t?this.state=4:P(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=2)}sDTD(){const e=this.captureTo(j);e!==_&&(this.text+=String.fromCodePoint(e),e===I?this.state=2:e===E?this.state=6:P(e)&&(this.state=5,this.q=e))}sDTDQuoted(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=4,this.q=null)}sDTDOpenWaka(){const e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case 33:this.state=7,this.openWakaBang="";break;case R:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,"-"!==t&&(this.state="--"===t?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=45===e?10:8}sDTDCommentEnded(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===A?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(R)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===A&&(this.state=4)}sText(){0!==this.tags.length?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:e}=this;const{chunk:t}=this;e:for(;;)switch(this.getCode()){case w:this.entity+=`${t.slice(e,this.prevI)}\n`,e=this.i;break;case 59:{const{entityReturnState:r}=this,n=this.entity+t.slice(e,this.prevI);let i;this.state=r,""===n?(this.fail("empty entity name."),i="&;"):(i=this.parseEntity(n),this.entity=""),r===T&&void 0===this.textHandler||(this.text+=i);break e}case _:this.entity+=t.slice(e);break e}}sOpenWaka(){const e=this.getCode();if(c(e))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(e){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case R:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=T,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){var e;const t=this.getCodeNorm();45===t?(this.state=19,null===(e=this.commentHandler)||void 0===e||e.call(this,this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const e=this.getCodeNorm();e!==A?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(e)}`,this.state=17):this.state=T}sCData(){this.captureToChar(I)&&(this.state=21)}sCDataEnding(){const e=this.getCodeNorm();e===I?this.state=22:(this.text+=`]${String.fromCodePoint(e)}`,this.state=20)}sCDataEnding2(){var e;const t=this.getCodeNorm();switch(t){case A:null===(e=this.cdataHandler)||void 0===e||e.call(this,this.text),this.text="",this.state=T;break;case I:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=24):e===R||o(e)?(this.fail("processing instruction without a target."),this.state=e===R?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(e),this.state=24)}sPIRest(){const{chunk:e,i:t}=this;for(;;){const r=this.getCodeNorm();if(r===_)return void(this.piTarget+=e.slice(t));if(!this.nameCheck(r)){this.piTarget+=e.slice(t,this.prevI);const n=r===R;n||o(r)?"xml"===this.piTarget?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?S:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(r));break}}}sPIBody(){if(0===this.text.length){const e=this.getCodeNorm();e===R?this.state=26:o(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(R)&&(this.state=26)}sPIEnding(){var e;const t=this.getCodeNorm();if(t===A){const{piTarget:t}=this;"xml"===t.toLowerCase()&&this.fail("the XML declaration must appear at the start of the document."),null===(e=this.piHandler)||void 0===e||e.call(this,{target:t,body:this.text}),this.piTarget=this.text="",this.state=T}else t===R?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const e=this.skipSpaces();e!==R?e!==_&&(this.state=28,this.name=String.fromCodePoint(e)):this.state=S}sXMLDeclName(){const e=this.captureTo(C);if(e===R)return this.state=S,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(o(e)||e===x){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=e===x?30:29}}sXMLDeclEq(){const e=this.getCodeNorm();if(e===R)return this.state=S,void this.fail("XML declaration is incomplete.");o(e)||(e!==x&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const e=this.getCodeNorm();if(e===R)return this.state=S,void this.fail("XML declaration is incomplete.");o(e)||(P(e)?this.q=e:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const e=this.captureTo([this.q,R]);if(e===R)return this.state=S,this.text="",void this.fail("XML declaration is incomplete.");if(e===_)return;const t=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const e=t;this.xmlDecl.version=e,/^1\.[0-9]+$/.test(e)?this.opt.forceXMLVersion||this.setXMLVersion(e):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=t;break;case"standalone":"yes"!==t&&"no"!==t&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name="",this.state=32}sXMLDeclSeparator(){const e=this.getCodeNorm();e!==R?(o(e)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=S}sXMLDeclEnding(){var e;this.getCodeNorm()===A?("xml"!==this.piTarget?this.fail("processing instructions are not allowed before root."):"version"!==this.name&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),null===(e=this.xmldeclHandler)||void 0===e||e.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=T):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){var e;const t=this.captureNameChars();if(t===_)return;const r=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=r.ns=Object.create(null)),null===(e=this.openTagStartHandler)||void 0===e||e.call(this,r),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case A:this.openTag();break;case 47:this.state=35;break;default:o(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===A?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const e=this.skipSpaces();e!==_&&(c(e)?(this.unget(),this.state=37):e===A?this.openTag():47===e?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const e=this.captureNameChars();e===x?this.state=39:o(e)?this.state=38:e===A?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):e!==_&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const e=this.skipSpaces();switch(e){case _:return;case x:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",e===A?this.openTag():c(e)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const e=this.getCodeNorm();P(e)?(this.q=e,this.state=40):o(e)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:e,chunk:t}=this;let{i:r}=this;for(;;)switch(this.getCode()){case e:return this.pushAttrib(this.name,this.text+t.slice(r,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=t.slice(r,this.prevI),this.state=14,void(this.entityReturnState=40);case O:case w:case 9:this.text+=`${t.slice(r,this.prevI)} `,r=this.i;break;case E:return this.text+=t.slice(r,this.prevI),void this.fail("disallowed character.");case _:return void(this.text+=t.slice(r))}}sAttribValueClosed(){const e=this.getCodeNorm();o(e)?this.state=36:e===A?this.openTag():47===e?this.state=35:c(e)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const e=this.captureTo(M);switch(e){case 38:this.state=14,this.entityReturnState=42;break;case E:this.fail("disallowed character.");break;case _:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",e===A?this.openTag():this.state=36}}sCloseTag(){const e=this.captureNameChars();e===A?this.closeTag():o(e)?this.state=44:e!==_&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case A:this.closeTag();break;case _:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:e,forbiddenState:t}=this;const{chunk:r,textHandler:n}=this;e:for(;;)switch(this.getCode()){case E:if(this.state=15,void 0!==n){const{text:t}=this,i=r.slice(e,this.prevI);0!==t.length?(n(t+i),this.text=""):0!==i.length&&n(i)}t=0;break e;case 38:this.state=14,this.entityReturnState=T,void 0!==n&&(this.text+=r.slice(e,this.prevI)),t=0;break e;case I:switch(t){case 0:t=1;break;case 1:t=2;break;case 2:break;default:throw new Error("impossible state")}break;case A:2===t&&this.fail('the string "]]>" is disallowed in char data.'),t=0;break;case w:void 0!==n&&(this.text+=`${r.slice(e,this.prevI)}\n`),e=this.i,t=0;break;case _:void 0!==n&&(this.text+=r.slice(e));break e;default:t=0}this.forbiddenState=t}handleTextOutsideRoot(){let{i:e}=this;const{chunk:t,textHandler:r}=this;let n=!1;e:for(;;){const i=this.getCode();switch(i){case E:if(this.state=15,void 0!==r){const{text:n}=this,i=t.slice(e,this.prevI);0!==n.length?(r(n+i),this.text=""):0!==i.length&&r(i)}break e;case 38:this.state=14,this.entityReturnState=T,void 0!==r&&(this.text+=t.slice(e,this.prevI)),n=!0;break e;case w:void 0!==r&&(this.text+=`${t.slice(e,this.prevI)}\n`),e=this.i;break;case _:void 0!==r&&(this.text+=t.slice(e));break e;default:o(i)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(e,t){var r;const{prefix:n,local:i}=this.qname(e),a={name:e,prefix:n,local:i,value:t};if(this.attribList.push(a),null===(r=this.attributeHandler)||void 0===r||r.call(this,a),"xmlns"===n){const e=t.trim();"1.0"===this.currentXMLVersion&&""===e&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[i]=e,L(this,i,e)}else if("xmlns"===e){const e=t.trim();this.topNS[""]=e,L(this,"",e)}}pushAttribPlain(e,t){var r;const n={name:e,value:t};this.attribList.push(n),null===(r=this.attributeHandler)||void 0===r||r.call(this,n)}end(){var e,t;this.sawRoot||this.fail("document must contain a root element.");const{tags:r}=this;for(;r.length>0;){const e=r.pop();this.fail(`unclosed tag: ${e.name}`)}0!==this.state&&this.state!==T&&this.fail("unexpected end.");const{text:n}=this;return 0!==n.length&&(null===(e=this.textHandler)||void 0===e||e.call(this,n),this.text=""),this._closed=!0,null===(t=this.endHandler)||void 0===t||t.call(this),this._init(),this}resolve(e){var t,r;let n=this.topNS[e];if(void 0!==n)return n;const{tags:i}=this;for(let t=i.length-1;t>=0;t--)if(n=i[t].ns[e],void 0!==n)return n;return n=this.ns[e],void 0!==n?n:null===(r=(t=this.opt).resolvePrefix)||void 0===r?void 0:r.call(t,e)}qname(e){const t=e.indexOf(":");if(-1===t)return{prefix:"",local:e};const r=e.slice(t+1),n=e.slice(0,t);return(""===n||""===r||r.includes(":"))&&this.fail(`malformed name: ${e}.`),{prefix:n,local:r}}processAttribsNS(){var e;const{attribList:t}=this,r=this.tag;{const{prefix:t,local:n}=this.qname(r.name);r.prefix=t,r.local=n;const i=r.uri=null!==(e=this.resolve(t))&&void 0!==e?e:"";""!==t&&("xmlns"===t&&this.fail('tags may not have "xmlns" as prefix.'),""===i&&(this.fail(`unbound namespace prefix: ${JSON.stringify(t)}.`),r.uri=t))}if(0===t.length)return;const{attributes:n}=r,i=new Set;for(const e of t){const{name:t,prefix:r,local:a}=e;let o,s;""===r?(o="xmlns"===t?m:"",s=t):(o=this.resolve(r),void 0===o&&(this.fail(`unbound namespace prefix: ${JSON.stringify(r)}.`),o=r),s=`{${o}}${a}`),i.has(s)&&this.fail(`duplicate attribute: ${s}.`),i.add(s),e.uri=o,n[t]=e}this.attribList=[]}processAttribsPlain(){const{attribList:e}=this,t=this.tag.attributes;for(const{name:r,value:n}of e)void 0!==t[r]&&this.fail(`duplicate attribute: ${r}.`),t[r]=n;this.attribList=[]}openTag(){var e;this.processAttribs();const{tags:t}=this,r=this.tag;r.isSelfClosing=!1,null===(e=this.openTagHandler)||void 0===e||e.call(this,r),t.push(r),this.state=T,this.name=""}openSelfClosingTag(){var e,t,r;this.processAttribs();const{tags:n}=this,i=this.tag;i.isSelfClosing=!0,null===(e=this.openTagHandler)||void 0===e||e.call(this,i),null===(t=this.closeTagHandler)||void 0===t||t.call(this,i),null===(this.tag=null!==(r=n[n.length-1])&&void 0!==r?r:null)&&(this.closedRoot=!0),this.state=T,this.name=""}closeTag(){const{tags:e,name:t}=this;if(this.state=T,this.name="",""===t)return this.fail("weird empty close tag."),void(this.text+="");const r=this.closeTagHandler;let n=e.length;for(;n-- >0;){const n=this.tag=e.pop();if(this.topNS=n.ns,null==r||r(n),n.name===t)break;this.fail("unexpected close tag.")}0===n?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${t}.`),this.text+=``)}parseEntity(e){if("#"!==e[0]){const t=this.ENTITIES[e];return void 0!==t?t:(this.fail(this.isName(e)?"undefined entity.":"disallowed character in entity name."),`&${e};`)}let t=NaN;return"x"===e[1]&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail("malformed character entity."),`&${e};`)}}},52267:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableWebToNodeStream=void 0;const n=r(58521);class i extends n.Readable{constructor(e){super(),this.bytesRead=0,this.released=!1,this.reader=e.getReader()}async _read(){if(this.released)return void this.push(null);this.pendingRead=this.reader.read();const e=await this.pendingRead;delete this.pendingRead,e.done||this.released?this.push(null):(this.bytesRead+=e.value.length,this.push(e.value))}async waitForReadToComplete(){this.pendingRead&&await this.pendingRead}async close(){await this.syncAndRelease()}async syncAndRelease(){this.released=!0,await this.waitForReadToComplete(),await this.reader.releaseLock()}}t.ReadableWebToNodeStream=i},67083:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},37754:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[];return r=e.on("data",(e=>t.push(e))),n=t,new Promise(((e,t)=>{r.on("end",(()=>e(n))),r.on("error",t)}));var r,n}},2922:(e,t,r)=>{const n=r(82815),i=r(30979),a=r(67458),o=r(21156),s=r(37841);e.exports={DynamicNestedLoopJoin:n,HashJoin:i,NestedLoopJoin:a,SymmetricHashJoin:o,MergeStream:s}},82815:(e,t,r)=>{let n=r(76664),i=n.MultiTransformIterator,a=n.SimpleTransformIterator;e.exports=class extends i{constructor(e,t,r,n){super(e,n),this.funRight=t,this.funJoin=r}_createTransformer(e){return new a(this.funRight(e),{transform:(t,r,n)=>{let i=this.funJoin(e,t);null!==i&&n(i),r()}})}}},30979:(e,t,r)=>{let n=r(76664).AsyncIterator;e.exports=class extends n{constructor(e,t,r,n){super(),this.addedDataListener=!1,this.left=e,this.right=t,this.funHash=r,this.funJoin=n,this.leftMap=new Map,this.match=null,this.matches=[],this.matchIdx=0,this.left.on("error",(e=>this.destroy(e))),this.right.on("error",(e=>this.destroy(e))),this.readable=!1,this.left.on("end",function(){this.readable=!0,this.right.on("readable",(()=>this.readable=!0)),this.right.on("end",(()=>{this.hasResults()||this._end()}))}.bind(this)),this.on("newListener",(e=>{"data"===e&&this._addDataListenerIfNeeded()})),this.left.readable&&this._addDataListenerIfNeeded(),this.left.on("readable",(()=>this._addDataListenerIfNeeded()))}hasResults(){return!this.right.ended||this.matchIdx{const{MultiTransformIterator:n,SimpleTransformIterator:i,scheduleTask:a}=r(76664);e.exports=class extends n{constructor(e,t,r,n){super(e,n),this.right=t,this.funJoin=r,this.on("end",(()=>this.right.close()))}_end(){super._end(),a((()=>this.right.destroy()))}_createTransformer(e){return new i(this.right.clone(),{transform:(t,r,n)=>{let i=this.funJoin(e,t);null!==i&&n(i),r()}})}}},21156:(e,t,r)=>{let n=r(76664).AsyncIterator;e.exports=class extends n{constructor(e,t,r,n){super(),this.left=e,this.right=t,this.funHash=r,this.funJoin=n,this.usedLeft=!1,this.leftMap=new Map,this.rightMap=new Map,this.on("end",(()=>this._cleanup())),this.match=null,this.matches=[],this.matchIdx=0,(this.left.readable||this.right.readable)&&(this.readable=!0),this.left.on("error",(e=>this.destroy(e))),this.right.on("error",(e=>this.destroy(e))),this.left.on("readable",(()=>this.readable=!0)),this.right.on("readable",(()=>this.readable=!0)),this.left.on("end",(()=>{this.hasResults()||this._end()})),this.right.on("end",(()=>{this.hasResults()||this._end()}))}hasResults(){return!this.left.ended||!this.right.ended||!!this.matches&&this.matchIdx{let n=r(76664).AsyncIterator;e.exports=class extends n{constructor(e){super(),Array.isArray(e)||(e=Array.prototype.slice.call(arguments)),this.streams=e;for(let t of e)t.on("readable",(()=>this.emit("readable"))),t.on("end",(()=>this._removeStream(t)));0===this.streams.length&&this.close(),this.idx=this.streams.length-1}_removeStream(e){let t=this.streams.indexOf(e);t<0||(this.streams.splice(t,1),this.idx>=this.streams.length&&--this.idx,0===this.streams.length&&this._end())}close(){super.close();for(let e of this.streams)e.close()}read(){for(let e=0;e{e.exports=function(e){const t=new(r(5868).LoggerVoid),n=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-init/^3.0.0/components/ActorInit.jsonld#ActorInit_default_bus"}),i=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-context-preprocess/^3.0.0/components/ActorContextPreprocess.jsonld#ActorContextPreprocess_default_bus"}),a=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-hash-bindings/^3.0.0/components/ActorHashBindings.jsonld#ActorHashBindings_default_bus"}),o=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-hash-quads/^3.0.0/components/ActorHashQuads.jsonld#ActorHashQuads_default_bus"}),s=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-optimize-query-operation/^3.0.0/components/ActorOptimizeQueryOperation.jsonld#ActorOptimizeQueryOperation_default_bus"}),c=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-parse/^3.0.0/components/ActorQueryParse.jsonld#ActorQueryParse_default_bus"}),u=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-result-serialize/^3.0.0/components/ActorQueryResultSerialize.jsonld#ActorQueryResultSerialize_default_bus"}),l=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify-hypermedia/^3.0.0/components/ActorQuerySourceIdentifyHypermedia.jsonld#ActorQuerySourceIdentifyHypermedia_default_bus"}),d=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^3.0.0/components/ActorDereference.jsonld#ActorDereference_default_bus"}),p=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference-rdf/^3.0.0/components/ActorDereferenceRdf.jsonld#ActorDereferenceRdf_default_bus"}),h=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-entries-sort/^3.0.0/components/ActorRdfJoinEntriesSort.jsonld#ActorRdfJoinEntriesSort_default_bus"}),f=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-selectivity/^3.0.0/components/ActorRdfJoinSelectivity.jsonld#ActorRdfJoinSelectivity_default_bus"}),y=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata/^3.0.0/components/ActorRdfMetadata.jsonld#ActorRdfMetadata_default_bus"}),g=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-accumulate/^3.0.0/components/ActorRdfMetadataAccumulate.jsonld#ActorRdfMetadataAccumulate_default_bus"}),m=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-extract/^3.0.0/components/ActorRdfMetadataExtract.jsonld#ActorRdfMetadataExtract_default_bus"}),b=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse/^3.0.0/components/ActorRdfParse.jsonld#ActorRdfParse_default_bus"}),v=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse-html/^3.0.0/components/ActorRdfParseHtml.jsonld#ActorRdfParseHtml_default_bus"}),_=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links/^3.0.0/components/ActorRdfResolveHypermediaLinks.jsonld#ActorRdfResolveHypermediaLinks_default_bus"}),w=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links-queue/^3.0.0/components/ActorRdfResolveHypermediaLinksQueue.jsonld#ActorRdfResolveHypermediaLinksQueue_default_bus"}),T=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-serialize/^3.0.0/components/ActorRdfSerialize.jsonld#ActorRdfSerialize_default_bus"}),S=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-hypermedia/^3.0.0/components/ActorRdfUpdateHypermedia.jsonld#ActorRdfUpdateHypermedia_default_bus"}),O=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-quads/^3.0.0/components/ActorRdfUpdateQuads.jsonld#ActorRdfUpdateQuads_default_bus"}),E=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^3.0.0/components/ActorHttp.jsonld#ActorHttp_default_bus"}),x=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^3.0.0/components/ActorHttp.jsonld#ActorHttp_fallback_bus"}),A=new(r(59510).BusQueryOperation)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^3.0.0/components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus"}),R=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-process/^3.0.0/components/ActorQueryProcess.jsonld#ActorQueryProcess_default_bus"}),I=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify/^3.0.0/components/ActorQuerySourceIdentify.jsonld#ActorQuerySourceIdentify_default_bus"}),P=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^3.0.0/components/ActorRdfJoin.jsonld#ActorRdfJoin_default_bus"}),N=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http-invalidate/^3.0.0/components/ActorHttpInvalidate.jsonld#ActorHttpInvalidate_default_bus"}),D=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-merge-bindings-context/^3.0.0/components/ActorMergeBindingsContext.jsonld#ActorMergeBindingsContext_default_bus"}),j=(new(r(36251).ActorContextPreprocessConvertShortcuts)({contextKeyShortcuts:{baseIRI:"@comunica/actor-init-query:baseIRI",datetime:"@comunica/actor-http-memento:datetime",destination:"@comunica/bus-rdf-update-quads:destination",distinctConstruct:"@comunica/actor-init-query:distinctConstruct",explain:"@comunica/actor-init-query:explain",extensionFunctionCreator:"@comunica/actor-init-query:extensionFunctionCreator",extensionFunctions:"@comunica/actor-init-query:extensionFunctions",fetch:"@comunica/bus-http:fetch",functionArgumentsCache:"@comunica/actor-init-query:functionArgumentsCache",httpAuth:"@comunica/bus-http:auth",httpBodyTimeout:"@comunica/bus-http:http-body-timeout",httpIncludeCredentials:"@comunica/bus-http:include-credentials",httpProxyHandler:"@comunica/actor-http-proxy:httpProxyHandler",httpRetryCount:"@comunica/bus-http:http-retry-count",httpRetryDelay:"@comunica/bus-http:http-retry-delay",httpRetryOnServerError:"@comunica/bus-http:http-retry-on-server-error",httpTimeout:"@comunica/bus-http:http-timeout",initialBindings:"@comunica/actor-init-query:initialBindings",lenient:"@comunica/actor-init-query:lenient",log:"@comunica/core:log",noCache:"@comunica/actor-init-query:noCache",queryFormat:"@comunica/actor-init-query:queryFormat",queryTimestamp:"@comunica/actor-init-query:queryTimestamp",readOnly:"@comunica/bus-query-operation:readOnly",recoverBrokenLinks:"@comunica/bus-http-wayback:recover-broken-links",sources:"@comunica/actor-init-query:querySourcesUnidentified",traverse:"@comunica/bus-query-source-identify:traverse",unionDefaultGraph:"@comunica/bus-query-operation:unionDefaultGraph"},name:"urn:comunica:default:context-preprocess/actors#convert-shortcuts",bus:i}),new(r(35451).ActorContextPreprocessSetDefaults)({logger:t,name:"urn:comunica:default:context-preprocess/actors#set-defaults",bus:i}),new(r(41670).ActorContextPreprocessSourceToDestination)({name:"urn:comunica:default:context-preprocess/actors#source-to-destination",bus:i}),new(r(35106).ActorContextPreprocessQuerySourceSkolemize)({name:"urn:comunica:default:context-preprocess/actors#query-source-skolemize",bus:i})),C=new(r(30827).MediatorCombinePipeline)({name:"urn:comunica:default:context-preprocess/mediators#main",bus:i}),M=(new(r(11150).ActorHashBindingsSha1)({name:"urn:comunica:default:hash-bindings/actors#sha1",bus:a}),new(r(25896).MediatorRace)({name:"urn:comunica:default:hash-bindings/mediators#main",bus:a})),L=(new(r(64188).ActorHashQuadsSha1)({name:"urn:comunica:default:hash-quads/actors#sha1",bus:o}),new(r(25896).MediatorRace)({name:"urn:comunica:default:hash-quads/mediators#main",bus:o})),k=(new(r(15718).ActorOptimizeQueryOperationRewriteCopy)({name:"urn:comunica:default:optimize-query-operation/actors#rewrite-copy",bus:s}),new(r(83910).ActorOptimizeQueryOperationRewriteMove)({name:"urn:comunica:default:optimize-query-operation/actors#rewrite-move",bus:s}),new(r(63514).ActorOptimizeQueryOperationRewriteAdd)({name:"urn:comunica:default:optimize-query-operation/actors#rewrite-add",bus:s}),new(r(78992).ActorOptimizeQueryOperationGroupSources)({name:"urn:comunica:default:optimize-query-operation/actors#group-sources",bus:s})),F=(new(r(78724).ActorOptimizeQueryOperationConstructDistinct)({name:"urn:comunica:default:optimize-query-operation/actors#construct-distinct",bus:s}),new(r(30827).MediatorCombinePipeline)({filterErrors:!0,name:"urn:comunica:default:optimize-query-operation/mediators#main",bus:s})),B=(new(r(4911).ActorQueryParseSparql)({prefixes:{dbpedia:"http://dbpedia.org/resource/","dbpedia-owl":"http://dbpedia.org/ontology/",dbpprop:"http://dbpedia.org/property/",dc:"http://purl.org/dc/terms/",dc11:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",foaf:"http://xmlns.com/foaf/0.1/",geo:"http://www.w3.org/2003/01/geo/wgs84_pos#",owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",schema:"http://schema.org/",skos:"http://www.w3.org/2008/05/skos#",xsd:"http://www.w3.org/2001/XMLSchema#"},name:"urn:comunica:default:query-parse/actors#sparql",bus:c}),new(r(37067).ActorQueryParseGraphql)({name:"urn:comunica:default:query-parse/actors#graphql",bus:c}),new(r(25896).MediatorRace)({name:"urn:comunica:default:query-parse/mediators#main",bus:c})),U=(new(r(91875).ActorQueryResultSerializeJson)({mediaTypePriorities:{"application/json":1},mediaTypeFormats:{"application/json":"https://comunica.linkeddatafragments.org/#results_JSON"},name:"urn:comunica:default:query-result-serialize/actors#json",bus:u}),new(r(96791).ActorQueryResultSerializeSimple)({mediaTypePriorities:{simple:.9},mediaTypeFormats:{simple:"https://comunica.linkeddatafragments.org/#results_simple"},name:"urn:comunica:default:query-result-serialize/actors#simple",bus:u}),new(r(34357).ActorQueryResultSerializeSparqlCsv)({mediaTypePriorities:{"text/csv":.75},mediaTypeFormats:{"text/csv":"http://www.w3.org/ns/formats/SPARQL_Results_CSV"},name:"urn:comunica:default:query-result-serialize/actors#csv",bus:u}),new(r(78432).ActorQueryResultSerializeSparqlTsv)({mediaTypePriorities:{"text/tab-separated-values":.75},mediaTypeFormats:{"text/tab-separated-values":"http://www.w3.org/ns/formats/SPARQL_Results_TSV"},name:"urn:comunica:default:query-result-serialize/actors#sparql-tsv",bus:u}),new(r(68596).ActorQueryResultSerializeSparqlXml)({mediaTypePriorities:{"application/sparql-results+xml":.8},mediaTypeFormats:{"application/sparql-results+xml":"http://www.w3.org/ns/formats/SPARQL_Results_XML"},name:"urn:comunica:default:query-result-serialize/actors#sparql-xml",bus:u}),new(r(59655).ActorQueryResultSerializeTable)({columnWidth:50,mediaTypePriorities:{table:.6},mediaTypeFormats:{table:"https://comunica.linkeddatafragments.org/#results_table"},name:"urn:comunica:default:query-result-serialize/actors#table",bus:u}),new(r(70017).ActorQueryResultSerializeTree)({mediaTypePriorities:{tree:.5},mediaTypeFormats:{tree:"https://comunica.linkeddatafragments.org/#results_tree"},name:"urn:comunica:default:query-result-serialize/actors#tree",bus:u}),new(r(25896).MediatorRace)({name:"urn:comunica:default:query-result-serialize/mediators#serialize",bus:u})),q=new(r(75884).MediatorCombineUnion)({field:"mediaTypes",name:"urn:comunica:default:query-result-serialize/mediators#mediaType",bus:u}),V=new(r(75884).MediatorCombineUnion)({field:"mediaTypeFormats",name:"urn:comunica:default:query-result-serialize/mediators#mediaTypeFormat",bus:u}),Q=new(r(99104).MediatorNumber)({field:"filterFactor",type:"max",ignoreErrors:!0,name:"urn:comunica:default:query-source-identify-hypermedia/mediators#main",bus:l}),$=new(r(35878).ActorDereferenceFallback)({name:"urn:comunica:default:dereference/actors#fallback",bus:d}),H=new(r(25896).MediatorRace)({name:"urn:comunica:default:dereference/mediators#main",bus:d}),G=new(r(25896).MediatorRace)({name:"urn:comunica:default:dereference-rdf/mediators#main",bus:p}),z=(new(r(36545).ActorRdfJoinEntriesSortCardinality)({name:"urn:comunica:default:rdf-join-entries-sort/actors#cardinality",bus:h}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-join-entries-sort/mediators#main",bus:h})),K=(new(r(16703).ActorRdfJoinSelectivityVariableCounting)({name:"urn:comunica:default:rdf-join-selectivity/actors#variable-counting",bus:f}),new(r(99104).MediatorNumber)({field:"accuracy",type:"max",ignoreErrors:!0,name:"urn:comunica:default:rdf-join-selectivity/mediators#main",bus:f})),X=(new(r(80848).ActorRdfMetadataPrimaryTopic)({metadataToData:!1,dataToMetadataOnInvalidMetadataGraph:!0,name:"urn:comunica:default:rdf-metadata/actors#primary-topic",bus:y}),new(r(64443).ActorRdfMetadataAll)({name:"urn:comunica:default:rdf-metadata/actors#all",bus:y}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-metadata/mediators#main",bus:y})),J=(new(r(27988).ActorRdfMetadataAccumulateCanContainUndefs)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#cancontainundefs",bus:g}),new(r(67243).ActorRdfMetadataAccumulateCardinality)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#cardinality",bus:g}),new(r(91475).ActorRdfMetadataAccumulatePageSize)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#pagesize",bus:g}),new(r(26719).ActorRdfMetadataAccumulateRequestTime)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#requesttime",bus:g}),new(r(75884).MediatorCombineUnion)({field:"metadata",name:"urn:comunica:default:rdf-metadata-accumulate/mediators#main",bus:g})),W=(new(r(85405).ActorRdfMetadataExtractHydraControls)({name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-controls",bus:m}),new(r(57586).ActorRdfMetadataExtractHydraCount)({predicates:["http://www.w3.org/ns/hydra/core#totalItems","http://rdfs.org/ns/void#triples"],name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-count",bus:m}),new(r(54777).ActorRdfMetadataExtractHydraPagesize)({predicates:["http://www.w3.org/ns/hydra/core#itemsPerPage"],name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-pagesize",bus:m}),new(r(7445).ActorRdfMetadataExtractRequestTime)({name:"urn:comunica:default:rdf-metadata-extract/actors#request-time",bus:m}),new(r(40751).ActorRdfMetadataExtractAllowHttpMethods)({name:"urn:comunica:default:rdf-metadata-extract/actors#allow-http-methods",bus:m}),new(r(44549).ActorRdfMetadataExtractPutAccepted)({name:"urn:comunica:default:rdf-metadata-extract/actors#put-accepted",bus:m}),new(r(55282).ActorRdfMetadataExtractPatchSparqlUpdate)({name:"urn:comunica:default:rdf-metadata-extract/actors#patch-sparql-update",bus:m}),new(r(3187).ActorRdfMetadataExtractSparqlService)({inferHttpsEndpoint:!0,name:"urn:comunica:default:rdf-metadata-extract/actors#sparql-service",bus:m}),new(r(75884).MediatorCombineUnion)({filterErrors:!0,field:"metadata",name:"urn:comunica:default:rdf-metadata-extract/mediators#main",bus:m})),Y=(new(r(62917).ActorRdfParseN3)({mediaTypePriorities:{"application/n-quads":1,"application/n-triples":.8,"application/trig":.95,"text/n3":.35,"text/turtle":.6},mediaTypeFormats:{"application/n-quads":"http://www.w3.org/ns/formats/N-Quads","application/n-triples":"http://www.w3.org/ns/formats/N-Triples","application/trig":"http://www.w3.org/ns/formats/TriG","text/n3":"http://www.w3.org/ns/formats/N3","text/turtle":"http://www.w3.org/ns/formats/Turtle"},priorityScale:1,name:"urn:comunica:default:rdf-parse/actors#n3",bus:b}),new(r(21487).ActorRdfParseRdfXml)({mediaTypePriorities:{"application/rdf+xml":1},mediaTypeFormats:{"application/rdf+xml":"http://www.w3.org/ns/formats/RDF_XML"},priorityScale:.5,name:"urn:comunica:default:rdf-parse/actors#rdfxml",bus:b}),new(r(8137).ActorRdfParseXmlRdfa)({mediaTypePriorities:{"application/xml":1,"image/svg+xml":1,"text/xml":1},mediaTypeFormats:{"application/xml":"http://www.w3.org/ns/formats/RDFa","image/svg+xml":"http://www.w3.org/ns/formats/RDFa","text/xml":"http://www.w3.org/ns/formats/RDFa"},priorityScale:.3,name:"urn:comunica:default:rdf-parse/actors#xmlrdfa",bus:b}),new(r(43352).ActorRdfParseShaclc)({mediaTypePriorities:{"text/shaclc":1,"text/shaclc-ext":.5},mediaTypeFormats:{"text/shaclc":"http://www.w3.org/ns/formats/Shaclc","text/shaclc-ext":"http://www.w3.org/ns/formats/ShaclcExtended"},priorityScale:.1,name:"urn:comunica:default:rdf-parse/actors#shaclc",bus:b}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-parse/mediators#parse",bus:b})),Z=new(r(75884).MediatorCombineUnion)({field:"mediaTypes",name:"urn:comunica:default:rdf-parse/mediators#mediaType",bus:b}),ee=(new(r(28955).ActorRdfParseHtml)({busRdfParseHtml:v,mediaTypePriorities:{"application/xhtml+xml":.9,"text/html":1},mediaTypeFormats:{"application/xhtml+xml":"http://www.w3.org/ns/formats/HTML","text/html":"http://www.w3.org/ns/formats/HTML"},priorityScale:.2,name:"urn:comunica:default:rdf-parse/actors#html",bus:b}),new(r(42421).ActorRdfParseHtmlMicrodata)({name:"urn:comunica:default:rdf-parse-html/actors#microdata",bus:v}),new(r(26585).ActorRdfParseHtmlRdfa)({name:"urn:comunica:default:rdf-parse-html/actors#rdfa",bus:v}),new(r(34541).ActorRdfResolveHypermediaLinksNext)({name:"urn:comunica:default:rdf-resolve-hypermedia-links/actors#next",bus:_}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-resolve-hypermedia-links/mediators#main",bus:_})),te=(new(r(34120).ActorRdfResolveHypermediaLinksQueueFifo)({name:"urn:comunica:default:rdf-resolve-hypermedia-links-queue/actors#fifo",bus:w}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-resolve-hypermedia-links-queue/mediators#main",bus:w})),re=(new(r(28510).ActorRdfSerializeN3)({mediaTypePriorities:{"application/n-quads":1,"application/n-triples":.8,"application/trig":.95,"text/n3":.35,"text/turtle":.6},mediaTypeFormats:{"application/n-quads":"http://www.w3.org/ns/formats/N-Quads","application/n-triples":"http://www.w3.org/ns/formats/N-Triples","application/trig":"http://www.w3.org/ns/formats/TriG","text/n3":"http://www.w3.org/ns/formats/N3","text/turtle":"http://www.w3.org/ns/formats/Turtle"},name:"urn:comunica:default:rdf-serialize/actors#n3",bus:T}),new(r(21935).ActorRdfSerializeJsonLd)({jsonStringifyIndentSpaces:2,mediaTypePriorities:{"application/ld+json":1},mediaTypeFormats:{"application/ld+json":"http://www.w3.org/ns/formats/JSON-LD"},priorityScale:.9,name:"urn:comunica:default:rdf-serialize/actors#jsonld",bus:T}),new(r(49343).ActorRdfSerializeShaclc)({mediaTypePriorities:{"text/shaclc":1,"text/shaclc-ext":.5},mediaTypeFormats:{"text/shaclc":"http://www.w3.org/ns/formats/Shaclc","text/shaclc-ext":"http://www.w3.org/ns/formats/ShaclcExtended"},priorityScale:.1,name:"urn:comunica:default:rdf-serialize/actors#shaclc",bus:T}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-serialize/mediators#serialize",bus:T})),ne=new(r(75884).MediatorCombineUnion)({field:"mediaTypes",name:"urn:comunica:default:rdf-serialize/mediators#mediaType",bus:T}),ie=new(r(75884).MediatorCombineUnion)({field:"mediaTypeFormats",name:"urn:comunica:default:rdf-serialize/mediators#mediaTypeFormat",bus:T}),ae=new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-update-hypermedia/mediators#main",bus:S}),oe=(new(r(76722).ActorRdfUpdateQuadsRdfJsStore)({name:"urn:comunica:default:rdf-update-quads/actors#rdfjs-store",bus:O}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-update-quads/mediators#main",bus:O})),se=new(r(28590).ActorHttpFetch)({agentOptions:{keepAlive:!0,maxSockets:5},name:"urn:comunica:default:http/actors#fetch",bus:E}),ce=new(r(99104).MediatorNumber)({field:"time",type:"min",ignoreErrors:!0,name:"urn:comunica:default:http/mediators#no-fallback",bus:E}),ue=new(r(99104).MediatorNumber)({field:"time",type:"min",ignoreErrors:!0,name:"urn:comunica:default:http/mediators#main",bus:x}),le=(new(r(26933).ActorQueryOperationSource)({name:"urn:comunica:default:query-operation/actors#source",bus:A}),new(r(99104).MediatorNumber)({field:"httpRequests",type:"min",ignoreErrors:!0,name:"urn:comunica:default:query-operation/mediators#main",bus:A})),de=new(r(25896).MediatorRace)({name:"urn:comunica:default:query-process/mediators#main",bus:R}),pe=new(r(25896).MediatorRace)({name:"urn:comunica:default:query-source-identify/mediators#main",bus:I}),he=new(r(8309).MediatorJoinCoefficientsFixed)({cpuWeight:10,memoryWeight:1,timeWeight:2,ioWeight:10,name:"urn:comunica:default:rdf-join/mediators#main",bus:P}),fe=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-context-preprocess-query-source-identify/^3.0.0/components/ActorContextPreprocessQuerySourceIdentify.jsonld#IActorContextPreprocessQuerySourceIdentifyArgs_default_invalidator",bus:N}),ye=new(r(48284).MediatorAll)({name:"urn:comunica:default:http-invalidate/mediators#main",bus:N}),ge=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-quads-hypermedia/^3.0.0/components/ActorRdfUpdateQuadsHypermedia.jsonld#IActorRdfUpdateQuadsHypermediaArgs_default_invalidator",bus:N}),me=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^3.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator",bus:N}),be=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^3.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator",bus:N}),ve=new(r(75884).MediatorCombineUnion)({field:"mergeHandlers",name:"urn:comunica:default:merge-bindings-context/mediators#main",bus:D}),_e=(new(r(35848).ActorRdfJoinSingle)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-single",bus:P}),new(r(85345).ActorRdfJoinMultiEmpty)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-multi-empty",bus:P}),new(r(6551).ActorRdfJoinMultiBindSource)({selectivityModifier:1e-4,blockSize:16,mediatorJoinEntriesSort:z,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-multi-bind-source",bus:P}),new(r(38868).ActorRdfJoinHash)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-hash",bus:P}),new(r(77375).ActorRdfJoinSymmetricHash)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-symmetric-hash",bus:P}),new(r(37081).ActorRdfJoinNestedLoop)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-nested-loop",bus:P}),new(r(11688).ActorRdfJoinMinusHash)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#minus-hash",bus:P}),new(r(98311).ActorRdfJoinMinusHashUndef)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#minus-hash-undef",bus:P}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!1,blocking:!1,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#optional-hash-def-nonblocking",bus:P}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!1,blocking:!0,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#optional-hash-def-blocking",bus:P}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!0,blocking:!1,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#optional-hash-undef-nonblocking",bus:P}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!0,blocking:!0,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#optional-hash-undef-blocking",bus:P}),new(r(9391).ActorRdfJoinOptionalNestedLoop)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#optional-nested-loop",bus:P}),new(r(54341).ActorDereferenceRdfParse)({mediatorDereference:H,mediatorParse:Y,mediatorParseMediatypes:Z,mediaMappings:{htm:"text/html",html:"text/html",json:"application/json",jsonld:"application/ld+json",n3:"text/n3",nq:"application/n-quads",nquads:"application/n-quads",nt:"application/n-triples",ntriples:"application/n-triples",owl:"application/rdf+xml",rdf:"application/rdf+xml",rdfxml:"application/rdf+xml",shaclc:"text/shaclc",shaclce:"text/shaclc-ext",shc:"text/shaclc",shce:"text/shaclc-ext",svg:"image/svg+xml",svgz:"image/svg+xml",trig:"application/trig",ttl:"text/turtle",turtle:"text/turtle",xht:"application/xhtml+xml",xhtml:"application/xhtml+xml",xml:"application/xml"},name:"urn:comunica:default:dereference-rdf/actors#parse",bus:p}),new(r(3549).ActorRdfParseHtmlScript)({mediatorRdfParseMediatypes:Z,mediatorRdfParseHandle:Y,name:"urn:comunica:default:rdf-parse-html/actors#script",bus:v}),new(r(63543).ActorQueryResultSerializeRdf)({mediatorRdfSerialize:re,mediatorMediaTypeCombiner:ne,mediatorMediaTypeFormatCombiner:ie,name:"urn:comunica:default:query-result-serialize/actors#rdf",bus:u}),new(r(55390).ActorHttpWayback)({mediatorHttp:ce,name:"urn:comunica:default:http/actors#wayback",bus:x}),new(r(54168).ActorRdfParseJsonLd)({mediatorHttp:ue,mediaTypePriorities:{"application/json":.15,"application/ld+json":1},mediaTypeFormats:{"application/json":"http://www.w3.org/ns/formats/JSON-LD","application/ld+json":"http://www.w3.org/ns/formats/JSON-LD"},priorityScale:.9,name:"urn:comunica:default:rdf-parse/actors#jsonld",bus:b}),new(r(87057).ActorRdfUpdateHypermediaPatchSparqlUpdate)({mediatorHttp:ue,name:"urn:comunica:default:rdf-update-hypermedia/actors#patch-sparql-update",bus:S}),new(r(3047).ActorRdfUpdateHypermediaPutLdp)({mediatorHttp:ue,mediatorRdfSerializeMediatypes:ne,mediatorRdfSerialize:re,name:"urn:comunica:default:rdf-update-hypermedia/actors#put-ldp",bus:S}),new(r(58916).ActorRdfUpdateHypermediaSparql)({mediatorHttp:ue,checkUrlSuffixSparql:!0,checkUrlSuffixUpdate:!0,name:"urn:comunica:default:rdf-update-hypermedia/actors#sparql",bus:S}),new(r(57321).ActorQueryOperationAsk)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#ask",bus:A}),new(r(20888).ActorQueryOperationBgpJoin)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#bgp",bus:A}),new(r(88749).ActorQueryOperationConstruct)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#construct",bus:A}),new(r(13867).ActorQueryOperationDistinctHash)({mediatorHashBindings:M,mediatorHashQuads:L,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#distinct",bus:A}),new(r(37572).ActorQueryOperationFromQuad)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#from",bus:A}),new(r(98893).ActorQueryOperationProject)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#project",bus:A}),new(r(16909).ActorQueryOperationReducedHash)({mediatorHashBindings:M,cacheSize:100,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#reduced",bus:A}),new(r(14922).ActorQueryOperationSlice)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#slice",bus:A}),new(r(19779).ActorQueryOperationUnion)({mediatorRdfMetadataAccumulate:J,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#union",bus:A}),new(r(16733).ActorQueryOperationPathAlt)({mediatorRdfMetadataAccumulate:J,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-alt",bus:A}),new(r(88317).ActorQueryOperationPathInv)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-inv",bus:A}),new(r(91430).ActorQueryOperationPathLink)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-link",bus:A}),new(r(56993).ActorQueryOperationPathNps)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-nps",bus:A}),new(r(75233).ActorQueryOperationClear)({mediatorUpdateQuads:oe,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#update-clear",bus:A}),new(r(57886).ActorQueryOperationUpdateCompositeUpdate)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#update-composite",bus:A}),new(r(14876).ActorQueryOperationCreate)({mediatorUpdateQuads:oe,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#update-create",bus:A}),new(r(82465).ActorQueryOperationDrop)({mediatorUpdateQuads:oe,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#update-drop",bus:A}),new(r(29796).ActorQueryOperationLoad)({mediatorUpdateQuads:oe,mediatorQuerySourceIdentify:pe,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#update-load",bus:A}),new(r(40980).ActorQueryOperationJoin)({mediatorJoin:he,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#join",bus:A}),new(r(19948).ActorQueryOperationMinus)({mediatorJoin:he,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#minus",bus:A}),new(r(28261).ActorQueryOperationPathSeq)({mediatorJoin:he,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-seq",bus:A}),new(r(68841).ActorRdfJoinMultiSmallest)({mediatorJoinEntriesSort:z,mediatorJoin:he,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-multi-smallest",bus:P}),new(r(92107).ActorRdfJoinMultiSmallestFilterBindings)({selectivityModifier:1e-4,blockSize:64,mediatorJoinEntriesSort:z,mediatorJoin:he,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-multi-smallest-filter-bindings",bus:P}),new(r(48989).ActorOptimizeQueryOperationFilterPushdown)({aggressivePushdown:!1,maxIterations:10,splitConjunctive:!0,mergeConjunctive:!0,pushIntoLeftJoins:!0,pushEqualityIntoPatterns:!0,name:"urn:comunica:default:optimize-query-operation/actors#filter-pushdown",bus:s,beforeActors:[k]})),we=(new(r(68132).ActorDereferenceHttp)({mediatorHttp:ue,maxAcceptHeaderLength:1024,maxAcceptHeaderLengthBrowser:128,name:"urn:comunica:default:dereference/actors#http",bus:d,beforeActors:[$]}),new(r(48230).ActorHttpProxy)({mediatorHttp:ue,name:"urn:comunica:default:http/actors#proxy",bus:E,beforeActors:[se]}),new(r(90807).ActorContextPreprocessQuerySourceIdentify)({cacheSize:100,httpInvalidator:fe,mediatorQuerySourceIdentify:pe,mediatorContextPreprocess:C,name:"urn:comunica:default:context-preprocess/actors#query-source-identify",bus:i,beforeActors:[j]}),new(r(15729).ActorInitQuery)({mediatorQueryProcess:de,mediatorQueryResultSerialize:U,mediatorQueryResultSerializeMediaTypeCombiner:q,mediatorQueryResultSerializeMediaTypeFormatCombiner:V,mediatorHttpInvalidate:ye,defaultQueryInputFormat:"sparql",allowNoSources:!1,name:"urn:comunica:default:init/actors#query",bus:n})),Te=(new(r(88297).ActorRdfUpdateQuadsHypermedia)({cacheSize:100,httpInvalidator:ge,mediatorDereferenceRdf:G,mediatorMetadata:X,mediatorMetadataExtract:W,mediatorRdfUpdateHypermedia:ae,name:"urn:comunica:default:rdf-update-quads/actors#hypermedia",bus:O}),new(r(34593).ActionObserverHttp)({httpInvalidator:me,name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^3.0.0/components/ActorQueryResultSerializeSparqlJson.jsonld#ActorQueryResultSerializeSparqlJson_default_observer",bus:E})),Se=new(r(13900).ActionObserverHttp)({httpInvalidator:be,name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^3.0.0/components/ActorQueryResultSerializeStats.jsonld#ActorQueryResultSerializeStats_default_observer",bus:E}),Oe=(new(r(52378).ActorQuerySourceIdentifyHypermediaQpf)({mediatorMetadata:X,mediatorMetadataExtract:W,mediatorDereferenceRdf:G,mediatorMergeBindingsContext:ve,subjectUri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#subject",predicateUri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate",objectUri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#object",graphUri:"http://www.w3.org/ns/sparql-service-description#graph",name:"urn:comunica:default:query-source-identify-hypermedia/actors#qpf",bus:l}),new(r(16025).ActorQuerySourceIdentifyHypermediaSparql)({mediatorHttp:ue,mediatorMergeBindingsContext:ve,checkUrlSuffix:!0,forceHttpGet:!1,cacheSize:1024,bindMethod:"values",countTimeout:3e3,name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#sparql",bus:l}),new(r(44538).ActorQuerySourceIdentifyHypermediaNone)({mediatorMergeBindingsContext:ve,name:"urn:comunica:default:query-source-identify-hypermedia/actors#none",bus:l}),new(r(19724).ActorQueryOperationExtend)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#extend",bus:A}),new(r(74578).ActorQueryOperationFilter)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#filter",bus:A}),new(r(47007).ActorQueryOperationGroup)({mediatorHashBindings:M,mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#group",bus:A}),new(r(33149).ActorQueryOperationLeftJoin)({mediatorJoin:he,mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#leftjoin",bus:A}),new(r(80797).ActorQueryOperationOrderBy)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#orderby",bus:A}),new(r(35021).ActorQueryOperationNop)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#nop",bus:A}),new(r(89375).ActorQueryOperationService)({forceSparqlEndpoint:!1,mediatorMergeBindingsContext:ve,mediatorQuerySourceIdentify:pe,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#service",bus:A}),new(r(14702).ActorQueryOperationValues)({mediatorMergeBindingsContext:ve,name:"urn:comunica:default:query-operation/actors#values",bus:A}),new(r(90658).ActorQueryOperationPathOneOrMore)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-one-or-more",bus:A}),new(r(60436).ActorQueryOperationPathZeroOrMore)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-zero-or-more",bus:A}),new(r(32091).ActorQueryOperationPathZeroOrOne)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-zero-or-one",bus:A}),new(r(21638).ActorQueryOperationUpdateDeleteInsert)({mediatorUpdateQuads:oe,mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#update-delete-insert",bus:A}),new(r(94739).ActorQueryProcessSequential)({mediatorContextPreprocess:C,mediatorQueryParse:B,mediatorOptimizeQueryOperation:F,mediatorQueryOperation:le,mediatorMergeBindingsContext:ve,name:"urn:comunica:default:query-process/actors#sequential",bus:R})),Ee=new(r(57789).ActorQuerySourceIdentifyHypermedia)({cacheSize:100,maxIterators:64,aggregateTraversalStore:!0,mediatorDereferenceRdf:G,mediatorMetadata:X,mediatorMetadataExtract:W,mediatorMetadataAccumulate:J,mediatorQuerySourceIdentifyHypermedia:Q,mediatorRdfResolveHypermediaLinks:ee,mediatorRdfResolveHypermediaLinksQueue:te,mediatorMergeBindingsContext:ve,name:"urn:comunica:default:query-source-identify/actors#hypermedia",bus:I}),xe=(new(r(498).ActorRdfJoinNone)({mediatorMergeBindingsContext:ve,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-none",bus:P}),new(r(82331).ActorRdfJoinMultiBind)({bindOrder:"depth-first",selectivityModifier:1e-4,minMaxCardinalityRatio:60,mediatorJoinEntriesSort:z,mediatorQueryOperation:le,mediatorMergeBindingsContext:ve,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-multi-bind",bus:P}),new(r(64305).ActorRdfJoinOptionalBind)({bindOrder:"depth-first",selectivityModifier:1e-6,mediatorQueryOperation:le,mediatorMergeBindingsContext:ve,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#optional-bind",bus:P}),new(r(34593).ActorQueryResultSerializeSparqlJson)({emitMetadata:!0,httpObserver:Te,mediaTypePriorities:{"application/sparql-results+json":.8},mediaTypeFormats:{"application/sparql-results+json":"http://www.w3.org/ns/formats/SPARQL_Results_JSON"},name:"urn:comunica:default:query-result-serialize/actors#sparql-json",bus:u}),new(r(13900).ActorQueryResultSerializeStats)({httpObserver:Se,mediaTypePriorities:{stats:.5},mediaTypeFormats:{stats:"https://comunica.linkeddatafragments.org/#results_stats"},name:"urn:comunica:default:query-result-serialize/actors#stats",bus:u}),new(r(68383).ActorQueryProcessExplainParsed)({queryProcessor:Oe,name:"urn:comunica:default:query-process/actors#explain-parsed",bus:R}),new(r(70605).ActorQueryProcessExplainLogical)({queryProcessor:Oe,name:"urn:comunica:default:query-process/actors#explain-logical",bus:R}),new(r(54395).ActorQueryProcessExplainPhysical)({queryProcessor:Oe,name:"urn:comunica:default:query-process/actors#explain-physical",bus:R}),new(r(94607).ActorOptimizeQueryOperationPruneEmptySourceOperations)({useAskIfSupported:!1,name:"urn:comunica:default:optimize-query-operation/actors#prune-empty-source-operations",bus:s,beforeActors:[_e]})),Ae=(new(r(27474).ActorQuerySourceIdentifyRdfJs)({mediatorMergeBindingsContext:ve,name:"urn:comunica:default:query-source-identify/actors#rdfjs",bus:I,beforeActors:[Ee]}),new(r(84701).ActorQuerySourceIdentifySerialized)({mediatorRdfParse:Y,mediatorQuerySourceIdentify:pe,name:"urn:comunica:default:query-source-identify/actors#serialized",bus:I,beforeActors:[Ee]}),new(r(98498).ActorOptimizeQueryOperationJoinConnected)({name:"urn:comunica:default:optimize-query-operation/actors#join-connected",bus:s,beforeActors:[xe]})),Re=new(r(28084).ActorOptimizeQueryOperationBgpToJoin)({name:"urn:comunica:default:optimize-query-operation/actors#bgp-to-join",bus:s,beforeActors:[Ae]}),Ie=new(r(46980).ActorOptimizeQueryOperationJoinBgp)({name:"urn:comunica:default:optimize-query-operation/actors#join-bgp",bus:s,beforeActors:[Re]}),Pe=new(r(94741).ActorOptimizeQueryOperationAssignSourcesExhaustive)({name:"urn:comunica:default:optimize-query-operation/actors#assign-sources-exhaustive",bus:s,beforeActors:[Ie]});return new(r(78571).ActorOptimizeQueryOperationDescribeToConstructsSubject)({name:"urn:comunica:default:optimize-query-operation/actors#describe-to-constructs-subject",bus:s,beforeActors:[Pe]}),we}},45747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryEngine=void 0;const n=r(15729),i=r(99894);class a extends n.QueryEngineBase{constructor(e=i()){super(e)}}t.QueryEngine=a},90128:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(45747),t)},18423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractMediaTyped=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}async run(e){if("handle"in e){const t=e;return{handle:await this.runHandle(t.handle,t.handleMediaType,e.context)}}if("mediaTypes"in e)return{mediaTypes:await this.getMediaTypes(e.context)};if("mediaTypeFormats"in e)return{mediaTypeFormats:await this.getMediaTypeFormats(e.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}async test(e){if("handle"in e){const t=e;return{handle:await this.testHandle(t.handle,t.handleMediaType,e.context)}}if("mediaTypes"in e)return{mediaTypes:await this.testMediaType(e.context)};if("mediaTypeFormats"in e)return{mediaTypeFormats:await this.testMediaTypeFormats(e.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}}t.ActorAbstractMediaTyped=i},44405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractMediaTypedFixed=void 0;const n=r(18423);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e);const t=this.priorityScale||0===this.priorityScale?this.priorityScale:1;if(this.mediaTypePriorities)for(const[e,[r,n]]of Object.entries(this.mediaTypePriorities).entries())this.mediaTypePriorities[r]=t*n;this.mediaTypePriorities=Object.freeze(this.mediaTypePriorities),this.mediaTypeFormats=Object.freeze(this.mediaTypeFormats)}async testHandle(e,t,r){if(!t||!(t in this.mediaTypePriorities))throw new Error(`Unrecognized media type: ${t}`);return await this.testHandleChecked(e,r)}async testMediaType(e){return!0}async getMediaTypes(e){return this.mediaTypePriorities}async testMediaTypeFormats(e){return!0}async getMediaTypeFormats(e){return this.mediaTypeFormats}}t.ActorAbstractMediaTypedFixed=i},75560:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(18423),t),i(r(44405),t)},96331:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractPath=void 0;const n=r(59510),i=r(32227),a=r(76664),o=r(18050),s=r(22112),c=r(31578),u=r(29345),l=new o.DataFactory;class d extends n.ActorQueryOperationTypedMediated{constructor(e,t){super(e,"path"),this.predicateType=t}async testOperation(e,t){if(e.predicate.type!==this.predicateType)throw new Error(`This Actor only supports ${this.predicateType} Path operations.`);return!0}generateVariable(e,t){return t?!e||e.subject.value!==t&&e.object.value!==t?l.variable(t):this.generateVariable(e,`${t}b`):this.generateVariable(e,"b")}async isPathArbitraryLengthDistinct(e,t){return e.get(i.KeysQueryOperation.isPathArbitraryLengthDistinctKey)?{context:e=e.set(i.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!1),operation:void 0}:{context:e=e.set(i.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!0),operation:n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:d.FACTORY.createDistinct(t),context:e}))}}async predicateStarGraphVariable(e,t,r,i,o,s){const c=this.getPathSources(r),u=this.generateVariable(d.FACTORY.createPath(e,r,t,i)),l=d.FACTORY.createUnion([this.assignPatternSources(d.FACTORY.createPattern(e,u,t,i),c),this.assignPatternSources(d.FACTORY.createPattern(t,u,e,i),c)]),p=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:o,operation:l})),h=new Set;return{bindingsStream:new a.MultiTransformIterator(p.bindingsStream,{multiTransform:n=>{const c=n.get(i);return h.has(c.value)?new a.EmptyIterator:(h.add(c.value),new a.TransformIterator((async()=>{const n=new a.BufferedIterator;return await this.getObjectsPredicateStar(e,r,c,o,{},n,{count:0}),n.transform({transform(e,r,n){n(s.bindings([[t,e],[i,c]])),r()}})}),{maxBufferSize:128}))},autoStart:!1}),metadata:p.metadata}}async getObjectsPredicateStarEval(e,t,r,n,i,a,o){if("Variable"===n.termType)return this.predicateStarGraphVariable(e,r,t,n,i,o);const s=new u.PathVariableObjectIterator(e,t,n,i,this.mediatorQueryOperation,a);return{bindingsStream:s.transform({autoStart:!1,transform(e,t,n){n(o.bindings([[r,e]])),t()}}),async metadata(){const e=await new Promise((e=>{s.getProperty("metadata",(t=>e(t())))}));return e.cardinality.value++,e}}}async getObjectsPredicateStar(e,t,r,i,a,o,c){const u=(0,s.termToString)(e);if(a[u])return;o._push(e),a[u]=e,c.count++;const l=this.generateVariable(),p=d.FACTORY.createPath(e,t,l,r),h=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:p,context:i}));return h.bindingsStream.on("data",(async e=>{const n=e.get(l);await this.getObjectsPredicateStar(n,t,r,i,a,o,c)})),h.bindingsStream.on("end",(()=>{0==--c.count&&o.close()})),h.metadata}async getSubjectAndObjectBindingsPredicateStar(e,t,r,i,a,o,c,u,l,p,h,f){const y=(0,s.termToString)(i)+(0,s.termToString)(o);if(l[y])return;if(h.count++,l[y]=!0,p._push(f.bindings([[e,r],[t,i]])),y in u){const n=await u[y];for(const i of n)await this.getSubjectAndObjectBindingsPredicateStar(e,t,r,i,a,o,c,u,l,p,h,f);return void(0==--h.count&&p.close())}const g=new Promise((async(s,y)=>{const g=[],m=this.generateVariable(),b=d.FACTORY.createPath(i,a,m,o),v=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:b,context:c}));v.bindingsStream.on("data",(async n=>{const i=n.get(m);g.push(i),await this.getSubjectAndObjectBindingsPredicateStar(e,t,r,i,a,o,c,u,l,p,h,f)})),v.bindingsStream.on("error",y),v.bindingsStream.on("end",(()=>{0==--h.count&&p.close(),s(g)}))}));u[y]=g}getPathSources(e){switch(e.type){case c.Algebra.types.ALT:case c.Algebra.types.SEQ:return e.input.flatMap((e=>this.getPathSources(e)));case c.Algebra.types.INV:case c.Algebra.types.ONE_OR_MORE_PATH:case c.Algebra.types.ZERO_OR_MORE_PATH:case c.Algebra.types.ZERO_OR_ONE_PATH:return this.getPathSources(e.path);case c.Algebra.types.LINK:case c.Algebra.types.NPS:{const t=n.ActorQueryOperation.getOperationSource(e);if(!t)throw new Error("Could not find a required source on a link path operation");return[t]}}}assignPatternSources(e,t){if(0===t.length)throw new Error("Attempted to assign zero sources to a pattern during property path handling");return 1===t.length?n.ActorQueryOperation.assignOperationSource(e,t[0]):d.FACTORY.createUnion(t.map((t=>n.ActorQueryOperation.assignOperationSource(e,t))),!0)}}t.ActorAbstractPath=d,d.FACTORY=new c.Factory},29345:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathVariableObjectIterator=void 0;const n=r(59510),i=r(76664),a=r(18050),o=r(22112),s=r(31578),c=new a.DataFactory,u=new s.Factory;class l extends i.BufferedIterator{constructor(e,t,r,n,i,a,o=16){super({autoStart:!0}),this.subject=e,this.predicate=t,this.graph=r,this.context=n,this.mediatorQueryOperation=i,this.maxRunningOperations=o,this.termHashes=new Map,this.runningOperations=[],this.pendingOperations=[],this._push(this.subject,a)}_end(e){for(const e of this.runningOperations)e.destroy();super._end(e)}_push(e,t=!0){let r;if(t&&(r=(0,o.termToString)(e),this.termHashes.has(r)))return;const n=c.variable("b");this.pendingOperations.push({variable:n,operation:u.createPath(e,this.predicate,n,this.graph)}),r&&(this.termHashes.set(r,e),super._push(e))}_read(e,t){const r=this;(async function(){for(;r.runningOperations.lengthr.destroy(e))),i.on("readable",(()=>{r.readable=!0,r._fillBufferAsync()})),i.on("end",(()=>{r.runningOperations.splice(r.runningOperations.indexOf(i),1),r.readable=!0,r._fillBufferAsync()}))),r.setProperty("metadata",t.metadata)}let t,i=0;for(;i!==(i=e);)for(let n=0;n0;n++)null!==(t=r.runningOperations[n].read())&&(e--,r._push(t));0===r.runningOperations.length&&0===r.pendingOperations.length&&r.close()})().then((()=>{t()}),(e=>this.destroy(e)))}}t.PathVariableObjectIterator=l},43543:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(96331),t),i(r(29345),t)},53927:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessConvertShortcuts=void 0;const n=r(32362),i=r(34368);class a extends n.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){return{context:a.expandShortcuts(e.context,this.contextKeyShortcuts)}}static expandShortcuts(e,t){for(const r of e.keys())t[r.name]&&(e=e.set(new i.ActionContextKey(t[r.name]),e.get(r)).delete(r));return e}}t.ActorContextPreprocessConvertShortcuts=a},36251:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(53927),t)},80352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessQuerySourceIdentify=void 0;const n=r(32362),i=r(32227),a=r(34368),o=r(35069);class s extends n.ActorContextPreprocess{constructor(e){super(e),this.cache=this.cacheSize?new o.LRUCache({max:this.cacheSize}):void 0;const t=this.cache;t&&this.httpInvalidator.addInvalidateListener((({url:e})=>e?t.delete(e):t.clear()))}async test(e){return!0}async run(e){let t=e.context;if(t.has(i.KeysInitQuery.querySourcesUnidentified)){const r=e.context.get(i.KeysInitQuery.querySourcesUnidentified),n=await Promise.all(r.map((e=>this.expandSource(e)))),a=await Promise.all(n.map((async t=>this.identifySource(t,e.context))));t=e.context.delete(i.KeysInitQuery.querySourcesUnidentified).set(i.KeysQueryOperation.querySources,a)}return{context:t}}async expandSource(e){return"string"==typeof e||"match"in e?{value:e}:{...e,context:(await this.mediatorContextPreprocess.mediate({context:a.ActionContext.ensureActionContext(e.context??{})})).context}}identifySource(e,t){let r;return"string"==typeof e.value&&this.cache&&(r=this.cache.get(e.value)),r||(r=this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:e,context:t}).then((({querySource:e})=>e)),"string"==typeof e.value&&this.cache&&this.cache.set(e.value,r)),r}}t.ActorContextPreprocessQuerySourceIdentify=s},90807:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(80352),t)},16646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessQuerySourceSkolemize=void 0;const n=r(32362),i=r(32227),a=r(84078),o=r(50339);class s extends n.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){let t=e.context;if(t.has(i.KeysQueryOperation.querySources)){t.has(i.KeysQuerySourceIdentify.sourceIds)||(t=t.set(i.KeysQuerySourceIdentify.sourceIds,new Map));const e=t.getSafe(i.KeysQuerySourceIdentify.sourceIds);let r=t.getSafe(i.KeysQueryOperation.querySources);r=r.map((t=>({source:new a.QuerySourceSkolemized(t.source,(0,o.getSourceId)(e,t.source)),context:t.context}))),t=t.set(i.KeysQueryOperation.querySources,r)}return{context:t}}}t.ActorContextPreprocessQuerySourceSkolemize=s},84078:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceSkolemized=void 0;const n=r(72394),i=r(76664),a=r(50339);t.QuerySourceSkolemized=class{constructor(e,t){this.innerSource=e,this.sourceId=t}async getSelectorShape(e){return this.innerSource.getSelectorShape(e)}queryBindings(e,t,r){const o=(0,a.deskolemizeOperation)(e,this.sourceId);if(!o){const e=new i.ArrayIterator([],{autoStart:!1});return e.setProperty("metadata",{state:new n.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:[]}),e}return(0,a.skolemizeBindingsStream)(this.innerSource.queryBindings(o,t,r),this.sourceId)}queryBoolean(e,t){return this.innerSource.queryBoolean(e,t)}queryQuads(e,t){const r=(0,a.deskolemizeOperation)(e,this.sourceId);if(!r){const e=new i.ArrayIterator([],{autoStart:!1});return e.setProperty("metadata",{state:new n.MetadataValidationState,cardinality:{type:"exact",value:0}}),e}return(0,a.skolemizeQuadStream)(this.innerSource.queryQuads(r,t),this.sourceId)}queryVoid(e,t){return this.innerSource.queryVoid(e,t)}get referenceValue(){return this.innerSource.referenceValue}toString(){return`${this.innerSource.toString()}(SkolemID:${this.sourceId})`}}},35106:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(16646),t),i(r(84078),t),i(r(50339),t)},50339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deskolemizeOperation=t.deskolemizeQuad=t.deskolemizeTermNestedThrowing=t.deskolemizeTerm=t.skolemizeBindingsStream=t.skolemizeQuadStream=t.skolemizeBindings=t.skolemizeQuad=t.skolemizeTerm=t.getSourceId=t.SKOLEM_PREFIX=void 0;const n=r(85156),i=r(18050),a=r(13252),o=r(31578),s=new i.DataFactory;function c(e,r){return"BlankNode"===e.termType?new n.BlankNodeScoped(`bc_${r}_${e.value}`,s.namedNode(`${t.SKOLEM_PREFIX}${r}:${e.value}`)):e}function u(e,t){return(0,a.mapTermsNested)(e,(e=>c(e,t)))}function l(e,t){return e.map((e=>"Quad"===e.termType?u(e,t):c(e,t)))}function d(e,r){if("BlankNode"===e.termType&&"skolemized"in e&&(e=e.skolemized),"NamedNode"===e.termType&&e.value.startsWith(t.SKOLEM_PREFIX)){const n=e.value.indexOf(":",t.SKOLEM_PREFIX.length);if(e.value.slice(t.SKOLEM_PREFIX.length,n)===r){const t=e.value.slice(n+1,e.value.length);return s.blankNode(t)}return null}return e}function p(e,t){if("Quad"===e.termType)return(0,a.mapTermsNested)(e,(e=>{const r=d(e,t);if(!r)throw new Error("Skolemized term is not in scope for this source");return r}));const r=d(e,t);if(null===r)throw new Error("Skolemized term is not in scope for this source");return r}t.SKOLEM_PREFIX="urn:comunica_skolem:source_",t.getSourceId=function(e,t){let r=e.get(t.referenceValue);return void 0===r&&(r=`${e.size}`,e.set(t.referenceValue,r)),r},t.skolemizeTerm=c,t.skolemizeQuad=u,t.skolemizeBindings=l,t.skolemizeQuadStream=function(e,t){const r=e.map((e=>u(e,t)));return function t(){e.getProperty("metadata",(e=>{r.setProperty("metadata",e),e.state.addInvalidateListener(t)}))}(),r},t.skolemizeBindingsStream=function(e,t){const r=e.map((e=>l(e,t)));return function t(){e.getProperty("metadata",(e=>{r.setProperty("metadata",e),e.state.addInvalidateListener(t)}))}(),r},t.deskolemizeTerm=d,t.deskolemizeTermNestedThrowing=p,t.deskolemizeQuad=function(e,t){return(0,a.mapTermsNested)(e,(e=>d(e,t)??e))},t.deskolemizeOperation=function(e,t){try{return o.Util.mapOperation(e,{[o.Algebra.types.PATTERN]:(e,r)=>({result:Object.assign(r.createPattern(p(e.subject,t),p(e.predicate,t),p(e.object,t),p(e.graph,t)),{metadata:e.metadata}),recurse:!1}),[o.Algebra.types.PATH]:(e,r)=>({result:Object.assign(r.createPath(p(e.subject,t),e.predicate,p(e.object,t),p(e.graph,t)),{metadata:e.metadata}),recurse:!1})})}catch{}}},65239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessSetDefaults=void 0;const n=r(32362),i=r(32227);class a extends n.ActorContextPreprocess{constructor(e){super(e),this.defaultFunctionArgumentsCache={}}async test(e){return!0}async run(e){let t=e.context;if(e.initialize){t=t.setDefault(i.KeysInitQuery.queryTimestamp,new Date).setDefault(i.KeysQuerySourceIdentify.sourceIds,new Map).setDefault(i.KeysCore.log,this.logger).setDefault(i.KeysInitQuery.functionArgumentsCache,this.defaultFunctionArgumentsCache).setDefault(i.KeysQuerySourceIdentify.hypermediaSourcesAggregatedStores,new Map);let e={language:"sparql",version:"1.1"};t.has(i.KeysInitQuery.queryFormat)?(e=t.get(i.KeysInitQuery.queryFormat),"graphql"===e.language&&(t=t.setDefault(i.KeysInitQuery.graphqlSingularizeVariables,{}))):t=t.set(i.KeysInitQuery.queryFormat,e)}return{context:t}}}t.ActorContextPreprocessSetDefaults=a},35451:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(65239),t)},58952:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessSourceToDestination=void 0;const n=r(32362),i=r(32227);class a extends n.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){if(e.context.get(i.KeysInitQuery.querySourcesUnidentified)&&!e.context.get(i.KeysRdfUpdateQuads.destination)){const t=e.context.get(i.KeysInitQuery.querySourcesUnidentified);if(1===t.length)return{context:e.context.set(i.KeysRdfUpdateQuads.destination,t[0])}}return e}}t.ActorContextPreprocessSourceToDestination=a},41670:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(58952),t)},1741:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceFallback=void 0;const n=r(47702);class i extends n.ActorDereference{constructor(e){super(e)}async test(e){return!0}async run(e){return this.handleDereferenceErrors(e,new Error(`Could not dereference '${e.url}'`))}}t.ActorDereferenceFallback=i},35878:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(1741),t)},3968:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceHttp=void 0;const n=r(60376);class i extends n.ActorDereferenceHttpBase{getMaxAcceptHeaderLength(){return this.maxAcceptHeaderLengthBrowser}}t.ActorDereferenceHttp=i},60376:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceHttpBase=t.mediaTypesToAcceptString=void 0;const n=r(47702),i=r(74870),a=r(31759),o=r(10288),s=r(9929),c=/^[^ ;]*/u;function u(e,t){const r=[],n=Object.entries(e).map((([e,t])=>({mediaType:e,priority:t}))).sort(((e,t)=>t.priority===e.priority?e.mediaType.localeCompare(t.mediaType):t.priority-e.priority));let i=n.length-1;for(const{mediaType:e,priority:a}of n){const n=e+(1===a?"":`;q=${a.toFixed(3).replace(/0*$/u,"")}`);if(i+n.length>t){for(;i+9>t;)i-=(r.pop()??"").length+1;r.push("*/*;q=0.1");break}r.push(n),i+=n.length}return 0===r.length?"*/*":r.join(",")}t.mediaTypesToAcceptString=u;class l extends n.ActorDereference{constructor(e){super(e)}async test({url:e}){if(!/^https?:/u.test(e))throw new Error(`Cannot retrieve ${e} because it is not an HTTP(S) URL.`);return!0}async run(e){let t=!0;const r=new o.Headers(e.headers);let l;r.append("Accept",u(await(e.mediaTypes?.())??{},this.getMaxAcceptHeaderLength()));const d=Date.now();try{l=await this.mediatorHttp.mediate({context:e.context,init:{headers:r,method:e.method},input:e.url})}catch(t){return this.handleDereferenceErrors(e,t)}const p=(0,s.resolve)(l.url,e.url),h=Date.now()-d;if(200!==l.status){t=!1;const r=l.body?await(0,a.stringify)(i.ActorHttp.toNodeReadable(l.body)):"empty response";if(!e.acceptErrors){const t=new Error(`Could not retrieve ${e.url} (HTTP status ${l.status}):\n${r}`);return this.handleDereferenceErrors(e,t,l.headers,h)}}const f=c.exec(l.headers.get("content-type")??"")?.[0];return{url:p,data:t?i.ActorHttp.toNodeReadable(l.body):(0,n.emptyReadable)(),exists:t,requestTime:h,headers:l.headers,mediaType:"text/plain"===f?void 0:f}}}t.ActorDereferenceHttpBase=l},68132:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(3968),t),i(r(60376),t)},96636:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceRdfParse=void 0;const n=r(53583);class i extends n.ActorDereferenceRdf{constructor(e){super(e)}async getMetadata(e){return{baseIRI:e.url}}}t.ActorDereferenceRdfParse=i},54341:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(96636),t)},48040:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashBindingsSha1=void 0;const n=r(38431),i=r(99499),a=r(22112),o=r(62168);class s extends n.ActorHashBindings{async test(e){if(!e.allowHashCollisions)throw new Error(`Actor ${this.name} can not provide hash functions without hash collisions`);return!0}async run(e){return{hashFunction:e=>(0,i.sha1)().update(o(Object.fromEntries([...e].map((([e,t])=>[(0,a.termToString)(e),(0,a.termToString)(t)]))))).digest("hex"),hashCollisions:!0}}}t.ActorHashBindingsSha1=s},11150:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(48040),t)},66748:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashQuadsSha1=void 0;const n=r(16179),i=r(99499),a=r(22112);class o extends n.ActorHashQuads{async test(e){if(!e.allowHashCollisions)throw new Error(`Actor ${this.name} can not provide hash functions without hash collisions`);return!0}async run(e){return{hashFunction:e=>(0,i.sha1)().update(JSON.stringify((0,a.quadToStringQuad)(e))).digest("hex"),hashCollisions:!0}}}t.ActorHashQuadsSha1=o},64188:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(66748),t)},51803:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpFetch=void 0;const n=r(74870),i=r(32227);r(90482);const a=r(63562);class o extends n.ActorHttp{constructor(e){super(e),this.userAgent=o.createUserAgent(),this.fetchInitPreprocessor=new a.FetchInitPreprocessor(e.agentOptions)}static createUserAgent(){return`Comunica/actor-http-fetch (${void 0===globalThis.navigator?`Node.js ${process.version}; ${process.platform}`:`Browser-${globalThis.navigator.userAgent}`})`}async test(e){return{time:Number.POSITIVE_INFINITY}}static async getResponse(e,t,r,n,i,a){let o,s=n+1;for(;s-- >0;)try{const n=await e(t,r);if(a&&n.status>=500&&n.status<600)throw new Error(`Server replied with response code ${n.status}: ${n.statusText}`);return n}catch(e){if(o=e,r.signal?.aborted)throw e;s>0&&await new Promise(((e,t)=>{setTimeout(e,i),r.signal?.addEventListener("abort",(()=>{t(new Error("Fetch aborted by timeout."))}))}))}throw n>0?new Error(`Number of fetch retries (${n}) exceeded. Last error: ${String(o)}`):o}async run(e){const t=e.init?.headers??{};e.init=e.init??{},e.init.headers=new Headers(t),e.init.headers.has("user-agent")||e.init.headers.append("user-agent",this.userAgent);const r=e.context.get(i.KeysHttp.auth);r&&e.init.headers.append("Authorization",`Basic ${Buffer.from(r).toString("base64")}`),this.logInfo(e.context,`Requesting ${"string"==typeof e.input?e.input:e.input.url}`,(()=>({headers:n.ActorHttp.headersToHash(new Headers(e.init.headers)),method:e.init.method??"GET"}))),e.init?.headers&&"append"in e.init.headers&&e.context.has(i.KeysHttp.fetch)&&(e.init.headers=n.ActorHttp.headersToHash(e.init.headers));let a={...e.init};e.context.get(i.KeysHttp.includeCredentials)&&(a.credentials="include");const s=e.context?.get(i.KeysHttp.httpTimeout);let c,u;if(void 0!==s){const e=await this.fetchInitPreprocessor.createAbortController();a.signal=e.signal,u=()=>e.abort(),c=setTimeout((()=>u()),s)}try{a=await this.fetchInitPreprocessor.handle(a);const t=e.context?.get(i.KeysHttp.httpRetryCount)??0,r=e.context?.get(i.KeysHttp.httpRetryDelay)??0,n=e.context?.get(i.KeysHttp.httpRetryOnServerError)??!1,s=e.context?.get(i.KeysHttp.fetch),l=await o.getResponse(s??fetch,e.input,a,t,r,n);return void 0!==c&&(e.context?.get(i.KeysHttp.httpBodyTimeout)&&l.body?(u=()=>l.body?.cancel(new Error(`HTTP timeout when reading the body of ${l.url}.\nThis error can be disabled by modifying the 'httpBodyTimeout' and/or 'httpTimeout' options.`)),l.body.on("close",(()=>{clearTimeout(c)}))):clearTimeout(c)),l.body&&!l.body.cancel&&(l.body.cancel=async e=>{l.body.destroy(e),void 0!==c&&clearTimeout(c)}),l}catch(e){throw void 0!==c&&clearTimeout(c),e}}}t.ActorHttpFetch=o},63562:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchInitPreprocessor=void 0;const n=r(74870);t.FetchInitPreprocessor=class{async handle(e){if(e.headers){const t=new Headers(e.headers);t.has("user-agent")&&t.delete("user-agent"),e.headers=t}if(e?.headers&&"append"in e.headers&&(e.headers=n.ActorHttp.headersToHash(e.headers)),e.body&&"string"!=typeof e.body&&"getReader"in e.body){const t=e.body.getReader(),r=[];for(;;){const{done:e,value:n}=await t.read();if(e)break;r.push(n)}e.body=r.join("")}return{keepalive:!e.body,...e}}async createAbortController(){return new AbortController}}},28590:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(51803),t)},57643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpProxy=void 0;const n=r(74870),i=r(32227);class a extends n.ActorHttp{constructor(e){super(e)}async test(e){const t=e.context.get(i.KeysHttpProxy.httpProxyHandler);if(!t)throw new Error(`Actor ${this.name} could not find a proxy handler in the context.`);if(!await t.getProxy(e))throw new Error(`Actor ${this.name} could not determine a proxy for the given request.`);return{time:Number.POSITIVE_INFINITY}}async run(e){const t="string"==typeof e.input?e.input:e.input.url,r=e.context.get(i.KeysHttpProxy.httpProxyHandler),n=await this.mediatorHttp.mediate({...await r.getProxy(e),context:e.context.delete(i.KeysHttpProxy.httpProxyHandler)});return Object.defineProperty(n,"url",{configurable:!0,enumerable:!0,get:()=>n.headers.get("x-final-url")??t}),n}}t.ActorHttpProxy=a},76862:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyHandlerStatic=void 0,t.ProxyHandlerStatic=class{constructor(e){this.prefixUrl=e}async getProxy(e){return{init:e.init,input:this.modifyInput(e.input)}}modifyInput(e){return"string"==typeof e?this.prefixUrl+e:new Request(this.prefixUrl+e.url,e)}}},48230:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(57643),t),i(r(76862),t)},363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpWayback=void 0;const n=r(74870),i=r(32227),a=r(31759);r(90482);const o="http://wayback.archive-it.org/";function s(e){const t=new Request(e.input,e.init);return{input:new Request(new URL(`/${t.url}`,o),t)}}function c(e){const t=e.get(i.KeysHttpProxy.httpProxyHandler);return t?e=>t.getProxy(s(e)):e=>Promise.resolve(s(e))}class u extends n.ActorHttp{constructor(e){super(e)}async test(e){return!0}async run(e){let t=await this.mediatorHttp.mediate(e);if(404===t.status&&e.context.get(i.KeysHttpWayback.recoverBrokenLinks)){let r=await this.mediatorHttp.mediate({...e,context:e.context.set(i.KeysHttpWayback.recoverBrokenLinks,!1).set(i.KeysHttpProxy.httpProxyHandler,{getProxy:c(e.context)})});200===r.status&&([t,r]=[r,t]);const{body:o}=r;o&&("cancel"in o&&"function"==typeof o.cancel?await o.cancel():"destroy"in o&&"function"==typeof o.destroy?o.destroy():await(0,a.stringify)(n.ActorHttp.toNodeReadable(o)))}return t}}t.ActorHttpWayback=u},55390:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(363),t)},94394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInitQuery=void 0;const n=r(59266);"undefined"==typeof process&&(globalThis.process=r(39907));class i extends n.ActorInitQueryBase{}t.ActorInitQuery=i},59266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInitQueryBase=void 0;const n=r(99784);class i extends n.ActorInit{async test(e){return!0}async run(e){throw new Error("ActorInitSparql#run is not supported in the browser.")}}t.ActorInitQueryBase=i},52295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryEngineBase=void 0;const n=r(32227),i=r(34368);class a{constructor(e){this.actorInitQuery=e}async queryBindings(e,t){return this.queryOfType(e,t,"bindings")}async queryQuads(e,t){return this.queryOfType(e,t,"quads")}async queryBoolean(e,t){return this.queryOfType(e,t,"boolean")}async queryVoid(e,t){return this.queryOfType(e,t,"void")}async queryOfType(e,t,r){const n=await this.query(e,t);if(n.resultType===r)return await n.execute();throw new Error(`Query result type '${r}' was expected, while '${n.resultType}' was found.`)}async query(e,t){const r=await this.queryOrExplain(e,t);if("explain"in r)throw new Error("Tried to explain a query when in query-only mode");return r}async explain(e,t,r){return t.explain=r,await this.queryOrExplain(e,t)}async queryOrExplain(e,t){const r=i.ActionContext.ensureActionContext(t);r.get(n.KeysInitQuery.noCache)&&await this.invalidateHttpCache();const{result:o}=await this.actorInitQuery.mediatorQueryProcess.mediate({query:e,context:r});return"explain"in o?o:a.internalToFinalResult(o)}async getResultMediaTypes(e){return e=i.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeCombiner.mediate({context:e,mediaTypes:!0})).mediaTypes}async getResultMediaTypeFormats(e){return e=i.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeFormatCombiner.mediate({context:e,mediaTypeFormats:!0})).mediaTypeFormats}async resultToString(e,t,r){if(r=i.ActionContext.ensureActionContext(r),!t)switch(e.resultType){case"bindings":t="application/json";break;case"quads":t="application/trig";break;default:t="simple"}const n={...await a.finalToInternalResult(e),context:r};return(await this.actorInitQuery.mediatorQueryResultSerialize.mediate({context:r,handle:n,handleMediaType:t})).handle}invalidateHttpCache(e,t){return t=i.ActionContext.ensureActionContext(t),this.actorInitQuery.mediatorHttpInvalidate.mediate({url:e,context:t})}static internalToFinalResult(e){switch(e.type){case"bindings":return{resultType:"bindings",execute:async()=>e.bindingsStream,metadata:async()=>await e.metadata(),context:e.context};case"quads":return{resultType:"quads",execute:async()=>e.quadStream,metadata:async()=>await e.metadata(),context:e.context};case"boolean":return{resultType:"boolean",execute:async()=>e.execute(),context:e.context};case"void":return{resultType:"void",execute:async()=>e.execute(),context:e.context}}}static async finalToInternalResult(e){switch(e.resultType){case"bindings":return{type:"bindings",bindingsStream:await e.execute(),metadata:async()=>await e.metadata()};case"quads":return{type:"quads",quadStream:await e.execute(),metadata:async()=>await e.metadata()};case"boolean":return{type:"boolean",execute:()=>e.execute()};case"void":return{type:"void",execute:()=>e.execute()}}}}t.QueryEngineBase=a},15729:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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}),t.QueryEngineBase=void 0,i(r(59266),t),i(r(94394),t);var a=r(52295);Object.defineProperty(t,"QueryEngineBase",{enumerable:!0,get:function(){return a.QueryEngineBase}})},35153:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationAssignSourcesExhaustive=void 0;const n=r(6716),i=r(59510),a=r(86789),o=r(32227),s=r(31578);class c extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.context.get(o.KeysQueryOperation.querySources)??[];if(0===t.length)return{operation:e.operation,context:e.context};if(1===t.length){const r=t[0],n=e.context.get(o.KeysRdfUpdateQuads.destination);if(!n||r.source.referenceValue===(0,a.getDataDestinationValue)(n))try{const t=await r.source.getSelectorShape(e.context);if(i.ActorQueryOperation.doesShapeAcceptOperation(t,e.operation))return{operation:i.ActorQueryOperation.assignOperationSource(e.operation,r),context:e.context}}catch{}}return{operation:this.assignExhaustive(e.operation,t),context:e.context.delete(o.KeysInitQuery.queryString)}}assignExhaustive(e,t){const r=this;return s.Util.mapOperation(e,{[s.Algebra.types.PATTERN]:(e,r)=>1===t.length?{result:i.ActorQueryOperation.assignOperationSource(e,t[0]),recurse:!1}:{result:r.createUnion(t.map((t=>i.ActorQueryOperation.assignOperationSource(e,t)))),recurse:!1},[s.Algebra.types.LINK]:(e,r)=>1===t.length?{result:i.ActorQueryOperation.assignOperationSource(e,t[0]),recurse:!1}:{result:r.createAlt(t.map((t=>i.ActorQueryOperation.assignOperationSource(e,t)))),recurse:!1},[s.Algebra.types.NPS]:(e,r)=>1===t.length?{result:i.ActorQueryOperation.assignOperationSource(e,t[0]),recurse:!1}:{result:r.createAlt(t.map((t=>i.ActorQueryOperation.assignOperationSource(e,t)))),recurse:!1},[s.Algebra.types.SERVICE]:e=>({result:e,recurse:!1}),[s.Algebra.types.CONSTRUCT]:(e,n)=>({result:n.createConstruct(r.assignExhaustive(e.input,t),e.template),recurse:!1}),[s.Algebra.types.DELETE_INSERT]:(e,n)=>({result:n.createDeleteInsert(e.delete,e.insert,e.where?r.assignExhaustive(e.where,t):void 0),recurse:!1})})}}t.ActorOptimizeQueryOperationAssignSourcesExhaustive=c},94741:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(35153),t)},37919:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationBgpToJoin=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{bgp:(e,t)=>({recurse:!1,result:t.createJoin(e.patterns)})}),context:e.context}}}t.ActorOptimizeQueryOperationBgpToJoin=a},28084:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(37919),t)},54166:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationConstructDistinct=void 0;const n=r(6716),i=r(88851),a=r(20512);class o extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(!e.context.has(i.KeysInitQuery.distinctConstruct))throw new Error(`${this.name} was not enabled by the query.`);return!0}async run(e){return{operation:a.Util.mapOperation(e.operation,{construct:(e,t)=>({recurse:!1,result:t.createDistinct(t.createConstruct(e.input,e.template))})}),context:e.context.delete(i.KeysInitQuery.distinctConstruct)}}}t.ActorOptimizeQueryOperationConstructDistinct=o},78724:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(54166),t)},64372:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationDescribeToConstructsSubject=void 0;const n=r(6716),i=r(18050),a=r(31578),o=new i.DataFactory,s=new a.Factory;class c extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(e.operation.type!==a.Algebra.types.DESCRIBE)throw new Error(`Actor ${this.name} only supports describe operations, but got ${e.operation.type}`);return!0}async run(e){const t=e.operation,r=t.terms.filter((e=>"Variable"!==e.termType)).map((e=>{const t=[o.quad(e,o.variable("__predicate"),o.variable("__object"))];return t.forEach((e=>e.type="pattern")),{input:{type:a.Algebra.types.BGP,patterns:t},template:t,type:"construct"}}));if(r.length!==t.terms.length){let e=[];t.terms.filter((e=>"Variable"===e.termType)).forEach(((t,r)=>{const n=[o.quad(t,o.variable(`__predicate${r}`),o.variable(`__object${r}`))];n.forEach((e=>e.type="pattern")),e=[...e,...n]})),r.push({input:{type:a.Algebra.types.JOIN,input:[t.input,{type:a.Algebra.types.BGP,patterns:e}]},template:e,type:a.Algebra.types.CONSTRUCT})}return{operation:s.createUnion(r,!1),context:e.context}}}t.ActorOptimizeQueryOperationDescribeToConstructsSubject=c},78571:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(64372),t)},18348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationFilterPushdown=void 0;const n=r(6716),i=r(59510),a=r(13252),o=r(31578);class s extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){let t=e.operation;const r=this;this.splitConjunctive&&(t=o.Util.mapOperation(t,{filter:(t,n)=>t.expression.expressionType===o.Algebra.expressionTypes.OPERATOR&&"&&"===t.expression.operator?(r.logDebug(e.context,`Split conjunctive filter into ${t.expression.args.length} nested filters`),{recurse:!0,result:t.expression.args.reduce(((e,t)=>n.createFilter(e,t)),t.input)}):{recurse:!0,result:t}}));const n=this.getSources(t),i=new Map(await Promise.all(n.map((async t=>[t,await t.source.getSelectorShape(e.context)]))));let a=!0,s=0;for(;a&&s1&&r.logDebug(e.context,`Pushed down filters in ${s} iterations`),this.mergeConjunctive&&(t=o.Util.mapOperation(t,{filter(t,n){if(t.input.type===o.Algebra.types.FILTER){const{nestedExpressions:i,input:a}=r.getNestedFilterExpressions(t);return r.logDebug(e.context,`Merge ${i.length} nested filters into conjunctive filter`),{recurse:!0,result:n.createFilter(a,i.slice(1).reduce(((e,t)=>n.createOperatorExpression("&&",[e,t])),i[0]))}}return{recurse:!0,result:t}}})),{operation:t,context:e.context}}shouldAttemptPushDown(e,t,r){if(this.aggressivePushdown)return!0;const n=e.expression;return n.expressionType===o.Algebra.expressionTypes.OPERATOR&&"="===n.operator&&("term"===n.args[0].expressionType&&"Variable"!==n.args[0].term.termType&&"term"===n.args[1].expressionType&&"Variable"===n.args[1].term.termType||"term"===n.args[0].expressionType&&"Variable"===n.args[0].term.termType&&"term"===n.args[1].expressionType&&"Variable"!==n.args[1].term.termType)||!!t.some((t=>i.ActorQueryOperation.doesShapeAcceptOperation(r.get(t),e)))}getSources(e){const t=new Set,r=e=>{const r=i.ActorQueryOperation.getOperationSource(e);return r&&t.add(r),!1};return o.Util.recurseOperation(e,{[o.Algebra.types.PATTERN]:r,[o.Algebra.types.LINK]:r,[o.Algebra.types.NPS]:r,[o.Algebra.types.SERVICE]:r}),[...t]}getExpressionVariables(e){switch(e.expressionType){case o.Algebra.expressionTypes.AGGREGATE:case o.Algebra.expressionTypes.WILDCARD:throw new Error(`Getting expression variables is not supported for ${e.expressionType}`);case o.Algebra.expressionTypes.EXISTENCE:return o.Util.inScopeVariables(e.input);case o.Algebra.expressionTypes.NAMED:return[];case o.Algebra.expressionTypes.OPERATOR:return(0,a.uniqTerms)(e.args.flatMap((e=>this.getExpressionVariables(e))));case o.Algebra.expressionTypes.TERM:return"Variable"===e.term.termType?[e.term]:[]}}getOverlappingOperations(e,t){const r=[],n=[],i=[];for(const a of e.input){const e=o.Util.inScopeVariables(a);this.variablesSubSetOf(t,e)?r.push(a):this.variablesIntersect(t,e)?n.push(a):i.push(a)}return{fullyOverlapping:r,partiallyOverlapping:n,notOverlapping:i}}filterPushdown(e,t,r,n,i){if(this.isExpressionFalse(e))return[!0,n.createUnion([])];if(e.type===o.Algebra.types.EXPRESSION&&e.expressionType===o.Algebra.expressionTypes.EXISTENCE)return[!1,n.createFilter(r,e)];switch(r.type){case o.Algebra.types.EXTEND:return this.variablesIntersect([r.variable],t)?[!1,n.createFilter(r,e)]:[!0,n.createExtend(this.filterPushdown(e,t,r.input,n,i)[1],r.variable,r.expression)];case o.Algebra.types.FILTER:{const[a,o]=this.filterPushdown(e,t,r.input,n,i);return[a,n.createFilter(o,r.expression)]}case o.Algebra.types.JOIN:{if(0===r.input.length)return[!1,n.createFilter(r,e)];const{fullyOverlapping:a,partiallyOverlapping:o,notOverlapping:s}=this.getOverlappingOperations(r,t),c=[];let u=!1;return a.length>0&&(u=!0,c.push(n.createJoin(a.map((r=>this.filterPushdown(e,t,r,n,i)[1]))))),o.length>0&&c.push(n.createFilter(n.createJoin(o,!1),e)),s.length>0&&c.push(...s),c.length>1&&(u=!0),u&&this.logDebug(i,`Push down filter across join entries with ${a.length} fully overlapping, ${o.length} partially overlapping, and ${s.length} not overlapping`),[u,1===c.length?c[0]:n.createJoin(c)]}case o.Algebra.types.NOP:return[!0,r];case o.Algebra.types.PROJECT:return this.variablesIntersect(r.variables,t)?[!0,n.createProject(this.filterPushdown(e,t,r.input,n,i)[1],r.variables)]:[!0,r];case o.Algebra.types.UNION:{const{fullyOverlapping:a,partiallyOverlapping:o,notOverlapping:s}=this.getOverlappingOperations(r,t),c=[];let u=!1;return a.length>0&&(u=!0,c.push(n.createUnion(a.map((r=>this.filterPushdown(e,t,r,n,i)[1]))))),o.length>0&&c.push(n.createFilter(n.createUnion(o,!1),e)),s.length>0&&c.push(...s),c.length>1&&(u=!0),u&&this.logDebug(i,`Push down filter across union entries with ${a.length} fully overlapping, ${o.length} partially overlapping, and ${s.length} not overlapping`),[u,1===c.length?c[0]:n.createUnion(c)]}case o.Algebra.types.VALUES:return this.variablesIntersect(r.variables,t)?[!1,n.createFilter(r,e)]:[!0,r];case o.Algebra.types.LEFT_JOIN:if(this.pushIntoLeftJoins){const a=o.Util.inScopeVariables(r.input[1]);if(!this.variablesIntersect(t,a))return this.logDebug(i,"Push down filter into left join"),[!0,n.createLeftJoin(this.filterPushdown(e,t,r.input[0],n,i)[1],r.input[1],r.expression)]}return[!1,n.createFilter(r,e)];case o.Algebra.types.PATTERN:if(this.pushEqualityIntoPatterns){const t=this.getEqualityExpressionPushableIntoPattern(e);if(t){let e=!1;const n=r.metadata;if((r=(0,a.mapTermsNested)(r,(r=>r.equals(t.variable)?(e=!0,t.term):r))).type=o.Algebra.types.PATTERN,r.metadata=n,e)return this.logDebug(i,`Push down filter into pattern for ?${t.variable.value}`),[!0,r]}}return[!1,n.createFilter(r,e)];case o.Algebra.types.PATH:if(this.pushEqualityIntoPatterns){const t=this.getEqualityExpressionPushableIntoPattern(e);if(t&&(r.subject.equals(t.variable)||r.object.equals(t.variable))){this.logDebug(i,`Push down filter into path for ?${t.variable.value}`);const e=r.metadata;return(r=n.createPath(r.subject.equals(t.variable)?t.term:r.subject,r.predicate,r.object.equals(t.variable)?t.term:r.object)).metadata=e,[!0,r]}}return[!1,n.createFilter(r,e)];case o.Algebra.types.MINUS:case o.Algebra.types.ALT:case o.Algebra.types.ASK:case o.Algebra.types.BGP:case o.Algebra.types.CONSTRUCT:case o.Algebra.types.DESCRIBE:case o.Algebra.types.DISTINCT:case o.Algebra.types.EXPRESSION:case o.Algebra.types.FROM:case o.Algebra.types.GRAPH:case o.Algebra.types.GROUP:case o.Algebra.types.INV:case o.Algebra.types.LINK:case o.Algebra.types.NPS:case o.Algebra.types.ONE_OR_MORE_PATH:case o.Algebra.types.ORDER_BY:case o.Algebra.types.REDUCED:case o.Algebra.types.SEQ:case o.Algebra.types.SERVICE:case o.Algebra.types.SLICE:case o.Algebra.types.ZERO_OR_MORE_PATH:case o.Algebra.types.ZERO_OR_ONE_PATH:case o.Algebra.types.COMPOSITE_UPDATE:case o.Algebra.types.DELETE_INSERT:case o.Algebra.types.LOAD:case o.Algebra.types.CLEAR:case o.Algebra.types.CREATE:case o.Algebra.types.DROP:case o.Algebra.types.ADD:case o.Algebra.types.MOVE:case o.Algebra.types.COPY:return[!1,n.createFilter(r,e)]}}getEqualityExpressionPushableIntoPattern(e){if(e.expressionType===o.Algebra.expressionTypes.OPERATOR&&"="===e.operator){if("term"===e.args[0].expressionType&&"Variable"!==e.args[0].term.termType&&("Literal"!==e.args[0].term.termType||this.isLiteralWithCanonicalLexicalForm(e.args[0].term))&&"term"===e.args[1].expressionType&&"Variable"===e.args[1].term.termType)return{variable:e.args[1].term,term:e.args[0].term};if("term"===e.args[0].expressionType&&"Variable"===e.args[0].term.termType&&"term"===e.args[1].expressionType&&"Variable"!==e.args[1].term.termType&&("Literal"!==e.args[1].term.termType||this.isLiteralWithCanonicalLexicalForm(e.args[1].term)))return{variable:e.args[0].term,term:e.args[1].term}}}isLiteralWithCanonicalLexicalForm(e){if("Literal"===e.termType)switch(e.datatype.value){case"http://www.w3.org/2001/XMLSchema#string":case"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":case"http://www.w3.org/2001/XMLSchema#normalizedString":case"http://www.w3.org/2001/XMLSchema#anyURI":case"http://www.w3.org/2001/XMLSchema#base64Binary":case"http://www.w3.org/2001/XMLSchema#language":case"http://www.w3.org/2001/XMLSchema#Name":case"http://www.w3.org/2001/XMLSchema#NCName":case"http://www.w3.org/2001/XMLSchema#NMTOKEN":case"http://www.w3.org/2001/XMLSchema#token":case"http://www.w3.org/2001/XMLSchema#hexBinary":return!0}return!1}variablesIntersect(e,t){return e.some((e=>t.some((t=>e.equals(t)))))}variablesSubSetOf(e,t){return e.length<=t.length&&e.every((e=>t.some((t=>e.equals(t)))))}isExpressionFalse(e){return e.term&&"Literal"===e.term.termType&&"false"===e.term.value}getNestedFilterExpressions(e){if(e.input.type===o.Algebra.types.FILTER){const t=this.getNestedFilterExpressions(e.input);return{nestedExpressions:[e.expression,...t.nestedExpressions],input:t.input}}return{nestedExpressions:[e.expression],input:e.input}}}t.ActorOptimizeQueryOperationFilterPushdown=s},48989:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(18348),t)},14400:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationGroupSources=void 0;const n=r(6716),i=r(59510),a=r(31578),o=new a.Factory;class s extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(i.ActorQueryOperation.getOperationSource(e.operation))throw new Error(`Actor ${this.name} does not work with top-level operation sources.`);return!0}async run(e){return{operation:await this.groupOperation(e.operation,e.context),context:e.context}}async groupOperation(e,t){if(i.ActorQueryOperation.getOperationSource(e)??!("input"in e))return e;if(!Array.isArray(e.input)){const r=await this.groupOperation(e.input,t);if(r.metadata?.scopedSource){const n=i.ActorQueryOperation.getOperationSource(r);i.ActorQueryOperation.doesShapeAcceptOperation(await n.source.getSelectorShape(t),e)&&(this.logDebug(t,`Hoist 1 source-specific operation into a single ${e.type} operation for ${n.source.toString()}`),i.ActorQueryOperation.removeOperationSource(r),e=i.ActorQueryOperation.assignOperationSource(e,n))}return{...e,input:r}}const r=await Promise.all(e.input.map((e=>this.groupOperation(e,t)))),n=this.clusterOperationsWithEqualSources(r);if(1===n.length){const r=n[0],a=i.ActorQueryOperation.getOperationSource(n[0][0]);return{...await this.moveSourceAnnotationUpwardsIfPossible(e,r,a,t),input:r}}if(n.length===r.length)return{...e,input:r};let s;switch(e.type){case a.Algebra.types.JOIN:s=o.createJoin.bind(o);break;case a.Algebra.types.UNION:s=o.createUnion.bind(o);break;case a.Algebra.types.ALT:s=o.createAlt.bind(o);break;case a.Algebra.types.SEQ:s=o.createSeq.bind(o);break;default:throw new Error(`Unsupported operation '${e.type}' detected while grouping sources`)}return await this.groupOperationMulti(n,s,t)}async groupOperationMulti(e,t,r){let n=!0;const a=await Promise.all(e.map((async e=>{const a=i.ActorQueryOperation.getOperationSource(e[0]),o=await this.moveSourceAnnotationUpwardsIfPossible(t(e,!0),e,a,r);return i.ActorQueryOperation.getOperationSource(o)&&(n=!1),o})));return t(a,n)}clusterOperationsWithEqualSources(e){const t=new Map,r=[];for(const n of e){const e=i.ActorQueryOperation.getOperationSource(n);e?(t.has(e)||t.set(e,[]),t.get(e).push(n)):r.push(n)}const n=[];r.length>0&&n.push(r);for(const[e,r]of t.entries())n.push(r.map((t=>i.ActorQueryOperation.assignOperationSource(t,e))));return n}async moveSourceAnnotationUpwardsIfPossible(e,t,r,n){if(r&&i.ActorQueryOperation.doesShapeAcceptOperation(await r.source.getSelectorShape(n),e)){this.logDebug(n,`Hoist ${t.length} source-specific operations into a single ${e.type} operation for ${r.source.toString()}`),e=i.ActorQueryOperation.assignOperationSource(e,r);for(const e of t)i.ActorQueryOperation.removeOperationSource(e)}return e}}t.ActorOptimizeQueryOperationGroupSources=s},78992:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(14400),t)},90042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationJoinBgp=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{join:(e,t)=>e.input.every((e=>"bgp"===e.type))?{recurse:!1,result:t.createBgp(e.input.flatMap((e=>e.patterns)))}:{recurse:!1,result:e}}),context:e.context}}}t.ActorOptimizeQueryOperationJoinBgp=a},46980:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(90042),t)},33186:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationJoinConnected=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{join:(e,t)=>({recurse:!1,result:a.cluster(e,t)})}),context:e.context}}static cluster(e,t){let r,n=e.input.map((e=>({inScopeVariables:Object.fromEntries(i.Util.inScopeVariables(e).map((e=>[e.value,!0]))),entries:[e]})));do{r=n,n=a.clusterIteration(r)}while(r.length!==n.length);const o=n.map((e=>1===e.entries.length?e.entries[0]:t.createJoin(e.entries)));return 1===o.length?o[0]:t.createJoin(o,!1)}static clusterIteration(e){const t=[];for(const r of e){let e=!1;for(const n of t)if(a.haveOverlappingVariables(r.inScopeVariables,n.inScopeVariables)){n.entries=[...n.entries,...r.entries],n.inScopeVariables={...n.inScopeVariables,...r.inScopeVariables},e=!0;break}e||t.push({inScopeVariables:r.inScopeVariables,entries:r.entries})}return t}static haveOverlappingVariables(e,t){for(const r of Object.keys(e))if(t[r])return!0;return!1}}t.ActorOptimizeQueryOperationJoinConnected=a},98498:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(33186),t)},92834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationPruneEmptySourceOperations=void 0;const n=r(6716),i=r(59510),a=r(32227),o=r(18050),s=r(31578),c=new s.Factory,u=new o.DataFactory;class l extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(i.ActorQueryOperation.getOperationSource(e.operation))throw new Error(`Actor ${this.name} does not work with top-level operation sources.`);return!0}async run(e){let t=e.operation;const r=[],n=this;s.Util.recurseOperation(t,{[s.Algebra.types.UNION]:e=>(n.collectMultiOperationInputs(e.input,r,s.Algebra.types.PATTERN),!0),[s.Algebra.types.ALT]:e=>(n.collectMultiOperationInputs(e.input,r,s.Algebra.types.LINK),!1),[s.Algebra.types.SERVICE]:()=>!1});const a=new Set;return await Promise.all(r.map((async t=>{const r="link"===t.type?c.createPattern(u.variable("?s"),t.iri,u.variable("?o")):t;await this.hasSourceResults(i.ActorQueryOperation.getOperationSource(t),r,e.context)||a.add(t)}))),a.size>0&&(this.logDebug(e.context,`Pruning ${a.size} source-specific operations`),t=s.Util.mapOperation(t,{[s.Algebra.types.UNION]:(e,t)=>n.mapMultiOperation(e,a,(e=>t.createUnion(e))),[s.Algebra.types.ALT]:(e,t)=>n.mapMultiOperation(e,a,(e=>t.createAlt(e)))}),t=s.Util.mapOperation(t,{[s.Algebra.types.PROJECT]:(e,t)=>l.hasEmptyOperation(e)?{recurse:!1,result:t.createUnion([])}:{recurse:!0,result:e}})),{operation:t,context:e.context}}static hasEmptyOperation(e){let t=!1;return s.Util.recurseOperation(e,{[s.Algebra.types.UNION]:e=>(e.input.every((e=>l.hasEmptyOperation(e)))&&(t=!0),!1),[s.Algebra.types.ALT]:e=>(0===e.input.length&&(t=!0),!1)}),t}collectMultiOperationInputs(e,t,r){for(const n of e)i.ActorQueryOperation.getOperationSource(n)&&n.type===r&&t.push(n)}mapMultiOperation(e,t,r){const n=e.input.filter((e=>!t.has(e)));return n.length===e.input.length?{result:e,recurse:!0}:0===n.length?{result:r([]),recurse:!1}:1===n.length?{result:n[0],recurse:!0}:{result:r(n),recurse:!0}}async hasSourceResults(e,t,r){if(e.context?.get(a.KeysQuerySourceIdentify.traverse))return!0;if(this.useAskIfSupported){const n=c.createAsk(t);if(i.ActorQueryOperation.doesShapeAcceptOperation(await e.source.getSelectorShape(r),n))return e.source.queryBoolean(n,r)}const n=e.source.queryBindings(t,r);return new Promise(((e,t)=>{n.on("error",t),n.getProperty("metadata",(t=>{n.destroy(),e(t.cardinality.value>0)}))}))}}t.ActorOptimizeQueryOperationPruneEmptySourceOperations=l},94607:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(92834),t)},13614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationRewriteAdd=void 0;const n=r(6716),i=r(18050),a=r(31578),o=new i.DataFactory;class s extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){return{operation:a.Util.mapOperation(e.operation,{[a.Algebra.types.ADD](e,t){const r="DEFAULT"===e.destination?o.defaultGraph():e.destination,n="DEFAULT"===e.source?o.defaultGraph():e.source;return{result:t.createDeleteInsert(void 0,[t.createPattern(o.variable("s"),o.variable("p"),o.variable("o"),r)],t.createPattern(o.variable("s"),o.variable("p"),o.variable("o"),n)),recurse:!1}}}),context:e.context}}}t.ActorOptimizeQueryOperationRewriteAdd=s},63514:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(13614),t)},25812:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationRewriteCopy=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{[i.Algebra.types.COPY](e,t){let r;return r="string"==typeof e.destination&&"string"==typeof e.source&&e.destination===e.source||"string"!=typeof e.destination&&"string"!=typeof e.source&&e.destination.equals(e.source)?t.createCompositeUpdate([]):t.createCompositeUpdate([t.createDrop(e.destination,!0),t.createAdd(e.source,e.destination,e.silent)]),{result:r,recurse:!1}}}),context:e.context}}}t.ActorOptimizeQueryOperationRewriteCopy=a},15718:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(25812),t)},90348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationRewriteMove=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{[i.Algebra.types.MOVE](e,t){let r;if("string"==typeof e.destination&&"string"==typeof e.source&&e.destination===e.source||"string"!=typeof e.destination&&"string"!=typeof e.source&&e.destination.equals(e.source))r=t.createCompositeUpdate([]);else{const n=[t.createDrop(e.destination,!0),t.createAdd(e.source,e.destination,e.silent),t.createDrop(e.source)];r=t.createCompositeUpdate(n)}return{result:r,recurse:!1}}}),context:e.context}}}t.ActorOptimizeQueryOperationRewriteMove=a},83910:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(90348),t)},82476:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationAsk=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"ask")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),{bindingsStream:i}=n.ActorQueryOperation.getSafeBindings(r);return{type:"boolean",execute:async()=>1===(await i.take(1).toArray()).length}}}t.ActorQueryOperationAsk=i},57321:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(82476),t)},9147:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationBgpJoin=void 0;const n=r(59510),i=r(31578);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"bgp")}async testOperation(e,t){return!0}async runOperation(e,t){return this.mediatorQueryOperation.mediate({operation:a.FACTORY.createJoin(e.patterns),context:t})}}t.ActorQueryOperationBgpJoin=a,a.FACTORY=new i.Factory},20888:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(9147),t)},59516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationConstruct=void 0;const n=r(59510),i=r(13252),a=r(31578),o=r(59218);class s extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"construct")}static getVariables(e){return(0,i.uniqTerms)([].concat.apply([],e.map((e=>(0,i.getVariables)((0,i.getTermsNested)(e))))))}async testOperation(e,t){return!0}async runOperation(e,t){const r=s.getVariables(e.template),i={type:a.Algebra.types.PROJECT,input:e.input,variables:r},c=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:i,context:t}));return{metadata:()=>c.metadata().then((t=>({...t,order:void 0,cardinality:{type:t.cardinality.type,value:t.cardinality.value*e.template.length},canContainUndefs:!1,availableOrders:void 0}))),quadStream:new o.BindingsToQuadsIterator(e.template,c.bindingsStream),type:"quads"}}}t.ActorQueryOperationConstruct=s},59218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsToQuadsIterator=void 0;const n=r(76664),i=r(18050),a=r(13252),o=new i.DataFactory;class s extends n.MultiTransformIterator{constructor(e,t){super(t,{autoStart:!1}),this.template=e,this.blankNodeCounter=0}static bindTerm(e,t){return"Variable"===t.termType?e.get(t):t}static bindQuad(e,t){try{return(0,a.mapTermsNested)(t,(t=>{const r=s.bindTerm(e,t);if(!r)throw new Error("Unbound term");return r}))}catch{}}static localizeBlankNode(e,t){return"BlankNode"===t.termType?o.blankNode(`${t.value}${e}`):t}static localizeQuad(e,t){return(0,a.mapTermsNested)(t,(t=>s.localizeBlankNode(e,t)))}bindTemplate(e,t,r){return t.map(s.localizeQuad.bind(null,r)).map((t=>s.bindQuad.bind(null,e)(t))).filter(Boolean)}_createTransformer(e){return new n.ArrayIterator(this.bindTemplate(e,this.template,this.blankNodeCounter++),{autoStart:!1})}}t.BindingsToQuadsIterator=s},88749:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(59516),t),i(r(59218),t)},50403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationDistinctHash=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"distinct")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t});if("quads"===r.type&&void 0!==this.mediatorHashQuads){const e=n.ActorQueryOperation.getSafeQuads(r);return{type:"quads",quadStream:e.quadStream.filter(await this.newHashFilterQuads(t)),metadata:e.metadata}}const i=n.ActorQueryOperation.getSafeBindings(r);return{type:"bindings",bindingsStream:i.bindingsStream.filter(await this.newHashFilter(t)),metadata:i.metadata}}async newHashFilter(e){const{hashFunction:t}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:e}),r={};return e=>{const n=t(e);return!(n in r)&&(r[n]=!0)}}async newHashFilterQuads(e){if(void 0===this.mediatorHashQuads)return e=>!0;const{hashFunction:t}=await this.mediatorHashQuads.mediate({allowHashCollisions:!0,context:e}),r={};return e=>{const n=t(e);return!(n in r)&&(r[n]=!0)}}}t.ActorQueryOperationDistinctHash=i},13867:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(50403),t)},50372:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationExtend=void 0;const n=r(91674),i=r(59510),a=r(61621);class o extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"extend")}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);return Boolean(new a.AsyncEvaluator(e.expression,i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r))),!0}async runOperation(e,t){const{expression:r,input:o,variable:s}=e,c=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:o,context:t}));if((await c.metadata()).variables.some((e=>e.equals(s))))throw new Error(`Illegal binding to variable '${s.value}' that has already been bound`);const u=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),l={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,u)},d=new a.AsyncEvaluator(r,l),p=c.bindingsStream.transform({autoStart:!1,transform:async(e,r,i)=>{try{const t=await d.evaluate(e);i(e.set(s,t))}catch(r){(0,a.isExpressionError)(r)?(i(e),this.logWarn(t,`Expression error for extend operation (${r.message})with bindings '${(0,n.bindingsToString)(e)}'`)):p.emit("error",r)}r()}});return{type:"bindings",bindingsStream:p,async metadata(){const e=await c.metadata();return{...e,variables:[...e.variables,s]}}}}}t.ActorQueryOperationExtend=o},19724:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(50372),t)},64452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationFilter=void 0;const n=r(91674),i=r(59510),a=r(61621);class o extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"filter")}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),o={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r)};return new a.AsyncEvaluator(e.expression,o),!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),o=i.ActorQueryOperation.getSafeBindings(r);i.ActorQueryOperation.validateQueryOutput(o,"bindings");const s=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),c={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,s)},u=new a.AsyncEvaluator(e.expression,c),l=o.bindingsStream.transform({transform:async(e,r,i)=>{try{await u.evaluateAsEBV(e)&&i(e)}catch(r){(0,a.isExpressionError)(r)?this.logWarn(t,"Error occurred while filtering.",(()=>({error:r,bindings:(0,n.bindingsToString)(e)}))):l.emit("error",r)}r()},autoStart:!1});return{type:"bindings",bindingsStream:l,metadata:o.metadata}}}t.ActorQueryOperationFilter=o},74578:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(64452),t)},71819:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationFromQuad=void 0;const n=r(59510),i=r(31578);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"from")}static copyOperation(e,t){const r={};for(const n of Object.keys(e))Array.isArray(e[n])&&"template"!==n?r[n]="variables"===n?e[n]:e[n].map(t):a.ALGEBRA_TYPES.includes(e[n].type)?r[n]=t(e[n]):r[n]=e[n];return r}static applyOperationDefaultGraph(e,t){if("bgp"===e.type&&e.patterns.length>0||"path"===e.type||"pattern"===e.type){if("bgp"===e.type)return a.joinOperations(e.patterns.map((e=>{if("DefaultGraph"!==e.graph.termType)return a.FACTORY.createBgp([e]);const r=t.map((t=>a.FACTORY.createBgp([Object.assign(a.FACTORY.createPattern(e.subject,e.predicate,e.object,t),{metadata:e.metadata})])));return a.unionOperations(r)})));if("DefaultGraph"!==e.graph.termType)return e;const r=t.map((t=>"path"===e.type?a.FACTORY.createPath(e.subject,e.predicate,e.object,t):Object.assign(a.FACTORY.createPattern(e.subject,e.predicate,e.object,t),{metadata:e.metadata})));return a.unionOperations(r)}return a.copyOperation(e,(e=>this.applyOperationDefaultGraph(e,t)))}static applyOperationNamedGraph(e,t,r){if("bgp"===e.type&&e.patterns.length>0||"path"===e.type||"pattern"===e.type){const n="bgp"===e.type?e.patterns[0].graph:e.graph;if("DefaultGraph"===n.termType)return{type:i.Algebra.types.BGP,patterns:[]};if("Variable"===n.termType){if(1===t.length){const r=t[0],i={};i[`?${n.value}`]=r;const o=a.FACTORY.createValues([n],[i]);let s;return s="bgp"===e.type?a.FACTORY.createBgp(e.patterns.map((e=>a.FACTORY.createPattern(e.subject,e.predicate,e.object,r)))):"path"===e.type?a.FACTORY.createPath(e.subject,e.predicate,e.object,r):a.FACTORY.createPattern(e.subject,e.predicate,e.object,r),a.FACTORY.createJoin([o,s])}return a.unionOperations(t.map((t=>a.applyOperationNamedGraph(e,[t],r))))}return[...t,...r].some((e=>e.equals(n)))?e:{type:i.Algebra.types.BGP,patterns:[]}}return a.copyOperation(e,(e=>this.applyOperationNamedGraph(e,t,r)))}static joinOperations(e){if(1===e.length)return e[0];if(e.length>1)return a.FACTORY.createJoin(e);throw new Error("A join can only be applied on at least one operation")}static unionOperations(e){if(1===e.length)return e[0];if(e.length>1)return a.FACTORY.createUnion(e);throw new Error("A union can only be applied on at least one operation")}static createOperation(e){let t=e.input;return e.default.length>0&&(t=a.applyOperationDefaultGraph(t,e.default)),(e.named.length>0||e.default.length>0)&&(t=a.applyOperationNamedGraph(t,e.named,e.default)),t}async testOperation(e,t){return!0}async runOperation(e,t){const r=a.createOperation(e);return this.mediatorQueryOperation.mediate({operation:r,context:t})}}t.ActorQueryOperationFromQuad=a,a.FACTORY=new i.Factory,a.ALGEBRA_TYPES=Object.keys(i.Algebra.types).map((e=>i.Algebra.types[e]))},37572:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(71819),t)},39712:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationGroup=void 0;const n=r(91674),i=r(59510),a=r(61621),o=r(76664),s=r(50626);class c extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"group")}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);for(const n of e.aggregates)new a.AsyncEvaluator(n.expression,i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r));return!0}async runOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),{hashFunction:a}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:t}),{input:c,aggregates:u}=e,l=await this.mediatorQueryOperation.mediate({operation:c,context:t}),d=i.ActorQueryOperation.getSafeBindings(l),p=[...e.variables,...u.map((e=>e.variable))],h=i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r);return{type:"bindings",bindingsStream:new o.TransformIterator((()=>new Promise(((t,n)=>{const i=new s.GroupsState(a,e,h,r);d.bindingsStream.on("end",(async()=>{try{const e=new o.ArrayIterator(await i.collectResults(),{autoStart:!1});t(e)}catch(e){n(e)}})),d.bindingsStream.on("error",n),d.bindingsStream.on("data",(e=>{i.consumeBindings(e).catch(n)}))}))),{autoStart:!1}),metadata:async()=>({...await d.metadata(),variables:p})}}}t.ActorQueryOperationGroup=c},50626:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupsState=void 0;const n=r(61621),i=new(r(18050).DataFactory);t.GroupsState=class{constructor(e,t,r,n){this.hashFunction=e,this.pattern=t,this.sparqleeConfig=r,this.bindingsFactory=n,this.groups=new Map,this.groupsInitializer=new Map,this.groupVariables=new Set(this.pattern.variables.map((e=>e.value))),this.waitCounter=1,this.resultHasBeenCalled=!1}consumeBindings(e){const t=this.resultCheck();if(t)return t;this.waitCounter++;const r=e.filter(((e,t)=>this.groupVariables.has(t.value))),i=this.hashBindings(r);let a,o=this.groupsInitializer.get(i);if(o){const t=o;a=(async()=>{const r=await t;await Promise.all(this.pattern.aggregates.map((async t=>{const n=t.variable.value;await r.aggregators[n].put(e)})))})().then((async()=>{this.subtractWaitCounterAndCollect()}))}else o=(async()=>{const t={};await Promise.all(this.pattern.aggregates.map((async r=>{const i=r.variable.value;t[i]=new n.AsyncAggregateEvaluator(r,this.sparqleeConfig),await t[i].put(e)})));const a={aggregators:t,bindings:r};return this.groups.set(i,a),this.subtractWaitCounterAndCollect(),a})(),this.groupsInitializer.set(i,o),a=o;return a}subtractWaitCounterAndCollect(){0==--this.waitCounter&&this.handleResultCollection()}handleResultCollection(){let e=[...this.groups].map((([e,t])=>{const{bindings:r,aggregators:n}=t;let a=r;for(const e in n){const t=n[e].result();t&&(a=a.set(i.variable(e),t))}return a}));if(0===e.length&&0===this.groupVariables.size){const t=[];for(const e of this.pattern.aggregates){const r=e.variable,i=n.AsyncAggregateEvaluator.emptyValue(e);void 0!==i&&t.push([r,i])}e=[this.bindingsFactory.bindings(t)]}this.waitResolver(e)}resultCheck(){if(this.resultHasBeenCalled)return Promise.reject(new Error("Calling any function after calling collectResult is invalid."))}collectResults(){const e=this.resultCheck();if(e)return e;this.resultHasBeenCalled=!0;const t=new Promise((e=>{this.waitResolver=e}));return this.subtractWaitCounterAndCollect(),t}hashBindings(e){return this.hashFunction(e)}}},47007:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(39712),t)},54052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationJoin=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"join")}async testOperation(e,t){return!0}async runOperation(e,t){const r=(await Promise.all(e.input.map((async e=>({output:await this.mediatorQueryOperation.mediate({operation:e,context:t}),operation:e}))))).map((({output:e,operation:t})=>({output:n.ActorQueryOperation.getSafeBindings(e),operation:t})));return this.mediatorJoin.mediate({type:"inner",entries:r,context:t})}}t.ActorQueryOperationJoin=i},40980:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(54052),t)},18152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationLeftJoin=void 0;const n=r(91674),i=r(59510),a=r(61621);class o extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"leftjoin")}async testOperation(e,t){return!0}async runOperation(e,t){const r=(await Promise.all(e.input.map((async e=>({output:await this.mediatorQueryOperation.mediate({operation:e,context:t}),operation:e}))))).map((({output:e,operation:t})=>({output:i.ActorQueryOperation.getSafeBindings(e),operation:t}))),o=await this.mediatorJoin.mediate({type:"optional",entries:r,context:t});if(e.expression){const s=(await r[1].output.metadata()).variables,c=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),u={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,c)},l=new a.AsyncEvaluator(e.expression,u),d=o.bindingsStream.transform({autoStart:!1,transform:async(e,r,n)=>{if(!s.every((t=>e.has(t.value))))return n(e),r();try{await l.evaluateAsEBV(e)&&n(e)}catch(r){(0,a.isExpressionError)(r)?this.logWarn(t,"Error occurred while filtering.",(()=>({error:r,bindings:e}))):d.emit("error",r)}r()}});o.bindingsStream=d}return o}}t.ActorQueryOperationLeftJoin=o},33149:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(18152),t)},34358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationMinus=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"minus")}async testOperation(e,t){return!0}async runOperation(e,t){const r=(await Promise.all(e.input.map((async e=>({output:await this.mediatorQueryOperation.mediate({operation:e,context:t}),operation:e}))))).map((({output:e,operation:t})=>({output:n.ActorQueryOperation.getSafeBindings(e),operation:t})));return this.mediatorJoin.mediate({type:"minus",entries:r,context:t})}}t.ActorQueryOperationMinus=i},19948:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(34358),t)},92052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationNop=void 0;const n=r(91674),i=r(59510),a=r(72394),o=r(76664);class s extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"nop")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);return{bindingsStream:new o.SingletonIterator(r.bindings()),metadata:()=>Promise.resolve({state:new a.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}t.ActorQueryOperationNop=s},35021:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(92052),t)},97236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationOrderBy=void 0;const n=r(91674),i=r(59510),a=r(61621),o=r(31578),s=r(36211);class c extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"orderby"),this.window=e.window??Number.POSITIVE_INFINITY}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);for(let n of e.expressions)n=this.extractSortExpression(n),new a.AsyncEvaluator(n,i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r));return!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),o=i.ActorQueryOperation.getSafeBindings(r),c={window:this.window},u=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),l={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,u)};let{bindingsStream:d}=o;for(let t=e.expressions.length-1;t>=0;t--){let r=e.expressions[t];const n=this.isAscending(r);r=this.extractSortExpression(r);const i=new a.AsyncEvaluator(r,l),o=async(e,t,r)=>{try{r({bindings:e,result:await i.evaluate(e)})}catch(t){(0,a.isExpressionError)(t)||d.emit("error",t),r({bindings:e,result:void 0})}t()},u=d.transform({transform:o}),p=new s.SortIterator(u,((e,t)=>{let r=(0,a.orderTypes)(e.result,t.result);return n||(r*=-1),r}),c);d=p.map((({bindings:e})=>e))}return{type:"bindings",bindingsStream:d,metadata:o.metadata}}extractSortExpression(e){const{expressionType:t,operator:r}=e;return t!==o.Algebra.expressionTypes.OPERATOR?e:"desc"===r?e.args[0]:e}isAscending(e){const{expressionType:t,operator:r}=e;return t!==o.Algebra.expressionTypes.OPERATOR||"desc"!==r}}t.ActorQueryOperationOrderBy=c},36211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SortIterator=void 0;const n=r(76664);class i extends n.TransformIterator{constructor(e,t,r){super(e,r);const n=r&&r.window;this.windowLength=Number.isFinite(n)&&n>0?n:Number.POSITIVE_INFINITY,this.sort=t,this.sorted=[]}_read(e,t){let r,{length:n}=this.sorted;for(;n!==this.windowLength&&(r=this.source.read(),null!==r);){let e,t,i=0,a=n-1;for(;i<=a;)e=Math.trunc((i+a)/2),t=this.sort(r,this.sorted[e]),t<0?i=e+1:t>0?a=e-1:(i=e,a=-1);this.sorted.splice(i,0,r),n++}n===this.windowLength&&this._push(this.sorted.pop()),t()}_flush(e){let{length:t}=this.sorted;for(;t--;)this._push(this.sorted.pop());e()}}t.SortIterator=i},80797:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(97236),t)},79675:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathAlt=void 0;const n=r(43543),i=r(19779),a=r(59510),o=r(76664),s=r(31578);class c extends n.ActorAbstractPath{constructor(e){super(e,s.Algebra.types.ALT)}async runOperation(e,t){const r=e.predicate,s=(await Promise.all(r.input.map((r=>this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,r,e.object,e.graph)}))))).map(a.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new o.UnionIterator(s.map((e=>e.bindingsStream)),{autoStart:!1}),metadata:()=>Promise.all(s.map((e=>e.metadata()))).then((e=>i.ActorQueryOperationUnion.unionMetadata(e,!0,t,this.mediatorRdfMetadataAccumulate)))}}}t.ActorQueryOperationPathAlt=c},16733:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(79675),t)},21471:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathInv=void 0;const n=r(43543),i=r(31578);class a extends n.ActorAbstractPath{constructor(e){super(e,i.Algebra.types.INV)}async runOperation(e,t){const r=e.predicate,i=n.ActorAbstractPath.FACTORY.createPath(e.object,r.path,e.subject,e.graph);return this.mediatorQueryOperation.mediate({operation:i,context:t})}}t.ActorQueryOperationPathInv=a},88317:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(21471),t)},60333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathLink=void 0;const n=r(43543),i=r(31578);class a extends n.ActorAbstractPath{constructor(e){super(e,i.Algebra.types.LINK)}async runOperation(e,t){const r=e.predicate,i=Object.assign(n.ActorAbstractPath.FACTORY.createPattern(e.subject,r.iri,e.object,e.graph),{metadata:r.metadata});return this.mediatorQueryOperation.mediate({operation:i,context:t})}}t.ActorQueryOperationPathLink=a},91430:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(60333),t)},62203:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathNps=void 0;const n=r(43543),i=r(59510),a=r(31578);class o extends n.ActorAbstractPath{constructor(e){super(e,a.Algebra.types.NPS)}async runOperation(e,t){const r=e.predicate,a=this.generateVariable(e),o=Object.assign(n.ActorAbstractPath.FACTORY.createPattern(e.subject,a,e.object,e.graph),{metadata:r.metadata}),s=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:o,context:t}));return{type:"bindings",bindingsStream:s.bindingsStream.map((e=>r.iris.some((t=>t.equals(e.get(a))))?null:e.delete(a))),metadata:s.metadata}}}t.ActorQueryOperationPathNps=o},56993:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(62203),t)},82265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathOneOrMore=void 0;const n=r(43543),i=r(91674),a=r(59510),o=r(76664),s=r(31578);class c extends n.ActorAbstractPath{constructor(e){super(e,s.Algebra.types.ONE_OR_MORE_PATH)}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),s=await this.isPathArbitraryLengthDistinct(t,e);if(s.operation)return s.operation;t=s.context;const c=e.predicate;if("Variable"!==e.subject.termType&&"Variable"===e.object.termType){const n=e.object,i=await this.getObjectsPredicateStarEval(e.subject,c.path,n,e.graph,t,!1,r),a="Variable"===e.graph.termType?[n,e.graph]:[n];return{type:"bindings",bindingsStream:i.bindingsStream,metadata:async()=>({...await i.metadata(),variables:a})}}if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const i=n.ActorAbstractPath.FACTORY.createDistinct(n.ActorAbstractPath.FACTORY.createPath(e.subject,e.predicate.path,e.object,e.graph)),s=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:i})),u=e.subject,l=e.object,d={},p=new o.MultiTransformIterator(s.bindingsStream,{multiTransform:n=>{const i=n.get(u),a=n.get(l),s="Variable"===e.graph.termType?n.get(e.graph):e.graph;return new o.TransformIterator((async()=>{const n=new o.BufferedIterator;return await this.getSubjectAndObjectBindingsPredicateStar(u,l,i,a,c.path,s,t,d,{},n,{count:0},r),n.transform({transform(t,r,n){"Variable"===e.graph.termType&&(t=t.set(e.graph,s)),n(t),r()}})}),{maxBufferSize:128})},autoStart:!1}),h="Variable"===e.graph.termType?[u,l,e.graph]:[u,l];return{type:"bindings",bindingsStream:p,metadata:async()=>({...await s.metadata(),variables:h})}}if("Variable"===e.subject.termType&&"Variable"!==e.object.termType)return this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.object,n.ActorAbstractPath.FACTORY.createOneOrMorePath(n.ActorAbstractPath.FACTORY.createInv(c.path)),e.subject,e.graph)});const u=this.generateVariable(),l=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,c,u,e.graph)}));return{type:"bindings",bindingsStream:l.bindingsStream.transform({filter:t=>e.object.equals(t.get(u)),transform(t,n,i){i("Variable"===e.graph.termType?r.bindings([[e.graph,t.get(e.graph)]]):r.bindings()),n()}}),metadata:async()=>({...await l.metadata(),variables:"Variable"===e.graph.termType?[e.graph]:[]})}}}t.ActorQueryOperationPathOneOrMore=c},90658:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(82265),t)},64747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathSeq=void 0;const n=r(43543),i=r(59510),a=r(31578);class o extends n.ActorAbstractPath{constructor(e){super(e,a.Algebra.types.SEQ)}async runOperation(e,t){const r=e.predicate;let a=e.subject;const o=[],s=await Promise.all(r.input.map(((i,s)=>{const c=s===r.input.length-1?e.object:this.generateVariable(e,`b${s}`),u=n.ActorAbstractPath.FACTORY.createPath(a,i,c,e.graph),l=this.mediatorQueryOperation.mediate({context:t,operation:u});return a=c,s({output:i.ActorQueryOperation.getSafeBindings(await e),operation:t})))),c=i.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:"inner",entries:s,context:t}));return{type:"bindings",bindingsStream:c.bindingsStream.transform({transform(e,t,r){for(const t of o)e=e.delete(t);r(e),t()}}),async metadata(){const e=await c.metadata(),t=e.variables.filter((e=>!o.some((t=>t.value===e.value))));return{...e,variables:t}}}}}t.ActorQueryOperationPathSeq=o},28261:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(64747),t)},68037:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathZeroOrMore=void 0;const n=r(43543),i=r(91674),a=r(59510),o=r(76664),s=r(22112),c=r(31578);class u extends n.ActorAbstractPath{constructor(e){super(e,c.Algebra.types.ZERO_OR_MORE_PATH)}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),c=await this.isPathArbitraryLengthDistinct(t,e);if(c.operation)return c.operation;t=c.context;const u=e.predicate,l=this.getPathSources(u),d="Variable"===e.subject.termType,p="Variable"===e.object.termType;if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const i=this.generateVariable(e),c=this.assignPatternSources(n.ActorAbstractPath.FACTORY.createPattern(e.subject,i,e.object,e.graph),l),d=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:c})),p=e.subject,h=e.object,f=new Set,y={},g=new o.MultiTransformIterator(d.bindingsStream,{multiTransform:n=>{const i=n.get(p),a=n.get(h),c="Variable"===e.graph.termType?n.get(e.graph):e.graph,l=(0,s.termToString)(i)+(0,s.termToString)(c),d=(0,s.termToString)(a)+(0,s.termToString)(c);return new o.TransformIterator((async()=>{if(f.has(l)&&f.has(d))return new o.EmptyIterator;const n=new o.BufferedIterator,s={count:0};return f.has(l)||(f.add(l),await this.getSubjectAndObjectBindingsPredicateStar(p,h,i,i,u.path,c,t,y,{},n,s,r)),f.has(d)||(f.add(d),await this.getSubjectAndObjectBindingsPredicateStar(p,h,a,a,u.path,c,t,y,{},n,s,r)),n.transform({transform(t,r,n){"Variable"===e.graph.termType&&(t=t.set(e.graph,c)),n(t),r()}})}))}}),m="Variable"===e.graph.termType?[p,e.object,e.graph]:[p,e.object];return{type:"bindings",bindingsStream:g,metadata:async()=>({...await d.metadata(),variables:m})}}if(!d&&!p){const n=this.generateVariable(),i=await this.getObjectsPredicateStarEval(e.subject,u.path,n,e.graph,t,!0,r);return{type:"bindings",bindingsStream:i.bindingsStream.transform({filter:t=>e.object.equals(t.get(n)),transform(t,n,i){i("Variable"===e.graph.termType?r.bindings([[e.graph,t.get(e.graph)]]):r.bindings()),n()}}),metadata:async()=>({...await i.metadata(),variables:"Variable"===e.graph.termType?[e.graph]:[]})}}const h=d?e.object:e.subject,f=d?e.subject:e.object,y=d?n.ActorAbstractPath.FACTORY.createInv(u.path):u.path,g=await this.getObjectsPredicateStarEval(h,y,f,e.graph,t,!0,r),m="Variable"===e.graph.termType?[f,e.graph]:[f];return{type:"bindings",bindingsStream:g.bindingsStream,metadata:async()=>({...await g.metadata(),variables:m})}}}t.ActorQueryOperationPathZeroOrMore=u},60436:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(68037),t)},81231:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathZeroOrOne=void 0;const n=r(43543),i=r(91674),a=r(59510),o=r(72394),s=r(76664),c=r(31578);class u extends n.ActorAbstractPath{constructor(e){super(e,c.Algebra.types.ZERO_OR_ONE_PATH)}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),c=e.predicate,u=this.getPathSources(c),l=[];if("Variable"!==e.subject.termType&&"Variable"!==e.object.termType&&e.subject.equals(e.object))return{type:"bindings",bindingsStream:new s.SingletonIterator(r.bindings()),metadata:()=>Promise.resolve({state:new o.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})};const d=await this.isPathArbitraryLengthDistinct(t,e);if(d.operation)return d.operation;t=d.context;const p=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,c.path,e.object,e.graph)}));let h;if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const r=this.generateVariable(e),i=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createFilter(this.assignPatternSources(n.ActorAbstractPath.FACTORY.createPattern(e.subject,r,e.object,e.graph),u),n.ActorAbstractPath.FACTORY.createOperatorExpression("=",[n.ActorAbstractPath.FACTORY.createTermExpression(e.subject),n.ActorAbstractPath.FACTORY.createTermExpression(e.object)]))})).bindingsStream.map((e=>e.delete(r)));h=new s.UnionIterator([i,p.bindingsStream],{autoStart:!1})}else"Variable"===e.subject.termType&&l.push(r.bindings([[e.subject,e.object]])),"Variable"===e.object.termType&&l.push(r.bindings([[e.object,e.subject]])),h=p.bindingsStream.prepend(l);return{type:"bindings",bindingsStream:h,metadata:p.metadata}}}t.ActorQueryOperationPathZeroOrOne=u},32091:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(81231),t)},1892:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationProject=void 0;const n=r(59510),i=r(85156),a=new(r(18050).DataFactory);class o extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"project")}async testOperation(e,t){return!0}async runOperation(e,t){const r=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:t})),o=await r.metadata(),s=e.variables,c=o.variables.filter((e=>!s.some((t=>e.value===t.value))));s.filter((e=>!o.variables.some((t=>e.value===t.value)))).length>0&&(o.canContainUndefs=!0);let u=0===c.length?r.bindingsStream:r.bindingsStream.map((e=>{for(const t of c)e=e.delete(t);return e})),l=0;return u=u.map((e=>{l++;const t=new Map;return e.map((e=>{if(e instanceof i.BlankNodeBindingsScoped){let r=t.get(e.value);return r||(r=a.blankNode(`${e.value}${l}`),t.set(e.value,r)),r}return e}))})),{type:"bindings",bindingsStream:u,metadata:async()=>({...o,variables:s})}}}t.ActorQueryOperationProject=o},98893:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(1892),t)},17015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationReducedHash=void 0;const n=r(59510),i=r(35069);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"reduced")}async testOperation(e,t){return!0}async runOperation(e,t){const r=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:t}));return{type:"bindings",bindingsStream:r.bindingsStream.filter(await this.newHashFilter(t)),metadata:r.metadata}}async newHashFilter(e){const{hashFunction:t}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:e}),r=new i.LRUCache({max:this.cacheSize});return e=>{const n=t(e);return!r.has(n)&&(r.set(n,!0),!0)}}}t.ActorQueryOperationReducedHash=a},16909:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(17015),t)},45152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationService=void 0;const n=r(91674),i=r(59510),a=r(72394),o=r(76664);class s extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"service")}async testOperation(e,t){if("NamedNode"!==e.name.termType)throw new Error(`${this.name} can only query services by IRI, while a ${e.name.termType} was given.`);return!0}async runOperation(e,t){const{querySource:r}=await this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:{value:e.name.value,type:this.forceSparqlEndpoint?"sparql":void 0},context:t});let s;try{s=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:i.ActorQueryOperation.assignOperationSource(e.input,r),context:t}))}catch(r){if(!e.silent)throw r;{const e=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);s={bindingsStream:new o.SingletonIterator(e.bindings()),type:"bindings",metadata:async()=>({state:new a.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})},this.logWarn(t,`An error occurred when executing a SERVICE clause: ${r.message}`)}}return s}}t.ActorQueryOperationService=s},89375:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(45152),t)},28746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationSlice=void 0;const n=r(59510),i=r(32227);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"slice")}async testOperation(e,t){return!0}async runOperation(e,t){e.length&&(t=t.set(i.KeysQueryOperation.limitIndicator,e.length));const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t});return"bindings"===r.type?{type:"bindings",bindingsStream:this.sliceStream(r.bindingsStream,e),metadata:this.sliceMetadata(r,e)}:"quads"===r.type?{type:"quads",quadStream:this.sliceStream(r.quadStream,e),metadata:this.sliceMetadata(r,e)}:r}sliceStream(e,t){const r=Boolean(t.length)||0===t.length,{start:n}=t,i=r?t.start+t.length-1:Number.POSITIVE_INFINITY;return e.transform({offset:n,limit:Math.max(i-n+1,0),autoStart:!1})}sliceMetadata(e,t){const r=Boolean(t.length)||0===t.length;return()=>e.metadata().then((e=>{const n={...e.cardinality};return Number.isFinite(n.value)&&(n.value=Math.max(0,n.value-t.start),r&&(n.value=Math.min(n.value,t.length))),{...e,cardinality:n}}))}}t.ActorQueryOperationSlice=a},14922:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(28746),t)},23920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationSource=void 0;const n=r(59510),i=r(32227),a=r(72394),o=r(31578);class s extends n.ActorQueryOperation{constructor(e){super(e)}async test(e){if(!n.ActorQueryOperation.getOperationSource(e.operation))throw new Error(`Actor ${this.name} requires an operation with source annotation.`);return{httpRequests:1}}async run(e){const t=e.context.get(i.KeysInitQuery.physicalQueryPlanLogger);t&&(t.logOperation(e.operation.type,void 0,e.operation,e.context.get(i.KeysInitQuery.physicalQueryPlanNode),this.name,{}),e.context=e.context.set(i.KeysInitQuery.physicalQueryPlanNode,e.operation));const r=n.ActorQueryOperation.getOperationSource(e.operation),s=r.context?e.context.merge(r.context):e.context;let c=!1;if(o.Util.recurseOperation(e.operation,{construct:()=>(c=!0,!1)}),c){const t=r.source.queryQuads(e.operation,s);return{type:"quads",quadStream:t,metadata:(0,a.getMetadataQuads)(t)}}switch(e.operation.type){case o.Algebra.types.ASK:return{type:"boolean",execute:()=>r.source.queryBoolean(e.operation,s)};case o.Algebra.types.COMPOSITE_UPDATE:case o.Algebra.types.DELETE_INSERT:case o.Algebra.types.LOAD:case o.Algebra.types.CLEAR:case o.Algebra.types.CREATE:case o.Algebra.types.DROP:case o.Algebra.types.ADD:case o.Algebra.types.MOVE:case o.Algebra.types.COPY:return{type:"void",execute:()=>r.source.queryVoid(e.operation,s)}}const u=r.source.queryBindings(e.operation,s);return{type:"bindings",bindingsStream:u,metadata:(0,a.getMetadataBindings)(u)}}}t.ActorQueryOperationSource=s},26933:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(23920),t)},47312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUnion=void 0;const n=r(59510),i=r(72394),a=r(76664),o=r(13252);class s extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"union")}static unionVariables(e){return(0,o.uniqTerms)(e.flat())}static async unionMetadata(e,t,r,n){let a=(await n.mediate({mode:"initialize",context:r})).metadata;for(const t of e)a={...t,...(await n.mediate({mode:"append",accumulatedMetadata:a,appendingMetadata:t,context:r})).metadata};a.state=new i.MetadataValidationState;const o=()=>a.state.invalidate();for(const t of e)t.state.addInvalidateListener(o);return t&&(a.variables=s.unionVariables(e.map((e=>e.variables)))),a}async testOperation(e,t){return!0}async runOperation(e,t){const r=await Promise.all(e.input.map((e=>this.mediatorQueryOperation.mediate({operation:e,context:t}))));let i;for(const e of r)if(void 0===i)i=e.type;else if(i!==e.type)throw new Error(`Unable to union ${i} and ${e.type}`);if("bindings"===i||0===e.input.length){const e=r.map(n.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new a.UnionIterator(e.map((e=>e.bindingsStream)),{autoStart:!1}),metadata:()=>Promise.all(e.map((e=>e.metadata()))).then((e=>s.unionMetadata(e,!0,t,this.mediatorRdfMetadataAccumulate)))}}if("quads"===i){const e=r.map(n.ActorQueryOperation.getSafeQuads);return{type:"quads",quadStream:new a.UnionIterator(e.map((e=>e.quadStream)),{autoStart:!1}),metadata:()=>Promise.all(e.map((e=>e.metadata()))).then((e=>s.unionMetadata(e,!1,t,this.mediatorRdfMetadataAccumulate)))}}throw new Error(`Unable to union ${i}`)}}t.ActorQueryOperationUnion=s},19779:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(47312),t)},20808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationClear=void 0;const n=r(59510),i=new(r(18050).DataFactory);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"clear")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){let r;r="DEFAULT"===e.source?i.defaultGraph():"string"==typeof e.source?e.source:[e.source];const{execute:n}=await this.mediatorUpdateQuads.mediate({deleteGraphs:{graphs:r,requireExistence:!e.silent,dropGraphs:!1},context:t});return{type:"void",execute:n}}}t.ActorQueryOperationClear=a},75233:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(20808),t)},8317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUpdateCompositeUpdate=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"compositeupdate")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){return{type:"void",execute:()=>(async()=>{for(const r of e.updates){const e=n.ActorQueryOperation.getSafeVoid(await this.mediatorQueryOperation.mediate({operation:r,context:t}));await e.execute()}})()}}}t.ActorQueryOperationUpdateCompositeUpdate=i},57886:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(8317),t)},74700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationCreate=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"create")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){const{execute:r}=await this.mediatorUpdateQuads.mediate({createGraphs:{graphs:[e.source],requireNonExistence:!e.silent},context:t});return{type:"void",execute:r}}}t.ActorQueryOperationCreate=i},14876:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(74700),t)},4853:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUpdateDeleteInsert=void 0;const n=r(88749),i=r(91674),a=r(59510),o=r(76664);class s extends a.ActorQueryOperationTypedMediated{constructor(e){super(e,"deleteinsert"),this.blankNodeCounter=0}async testOperation(e,t){return a.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),s=e.where?a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.where,context:t})).bindingsStream:new o.ArrayIterator([r.bindings()],{autoStart:!1});let c,u;e.insert&&(c=new n.BindingsToQuadsIterator(e.insert.map(n.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),s.clone()),this.blankNodeCounter++),e.delete&&(u=new n.BindingsToQuadsIterator(e.delete.map(n.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),s.clone()),this.blankNodeCounter++);const{execute:l}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:c,quadStreamDelete:u,context:t});return{type:"void",execute:l}}}t.ActorQueryOperationUpdateDeleteInsert=s},21638:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(4853),t)},53460:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationDrop=void 0;const n=r(59510),i=new(r(18050).DataFactory);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"drop")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){let r;r="DEFAULT"===e.source?i.defaultGraph():"string"==typeof e.source?e.source:[e.source];const{execute:n}=await this.mediatorUpdateQuads.mediate({deleteGraphs:{graphs:r,requireExistence:!e.silent,dropGraphs:!0},context:t});return{type:"void",execute:n}}}t.ActorQueryOperationDrop=a},82465:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(53460),t)},86228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationLoad=void 0;const n=r(59510),i=r(32227),a=r(18050),o=r(31578),s=new a.DataFactory;class c extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"load"),this.factory=new o.Factory}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){let r=t;e.silent&&(r=r.set(i.KeysInitQuery.lenient,!0));const{querySource:a}=await this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:{value:e.source.value},context:r});let o=c.getSafeQuads(await this.mediatorQueryOperation.mediate({operation:this.factory.createConstruct(n.ActorQueryOperation.assignOperationSource(this.factory.createPattern(s.variable("s"),s.variable("p"),s.variable("o")),a),[this.factory.createPattern(s.variable("s"),s.variable("p"),s.variable("o"))]),context:r})).quadStream;e.destination&&(o=o.map((t=>s.quad(t.subject,t.predicate,t.object,e.destination))));const{execute:u}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:o,context:t});return{type:"void",execute:u}}}t.ActorQueryOperationLoad=c},29796:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(86228),t)},48236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationValues=void 0;const n=r(91674),i=r(59510),a=r(72394),o=r(76664),s=new(r(18050).DataFactory);class c extends i.ActorQueryOperationTyped{constructor(e){super(e,"values")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),i=new o.ArrayIterator(e.bindings.map((e=>r.bindings(Object.entries(e).map((([e,t])=>[s.variable(e.slice(1)),t])))))),c=e.variables;return{type:"bindings",bindingsStream:i,metadata:()=>Promise.resolve({state:new a.MetadataValidationState,cardinality:{type:"exact",value:e.bindings.length},canContainUndefs:e.bindings.some((e=>c.some((t=>!(`?${t.value}`in e))))),variables:c})}}}t.ActorQueryOperationValues=c},14702:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(48236),t)},1452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParseGraphql=void 0;const n=r(79744),i=r(32227),a=r(1427);class o extends n.ActorQueryParse{constructor(e){super(e),this.graphqlToSparql=new a.Converter({requireContext:!0})}async test(e){if("graphql"!==e.queryFormat?.language)throw new Error("This actor can only parse GraphQL queries");return!0}async run(e){const t=e.context.get(i.KeysInitQuery.jsonLdContext)||{},r={singularizeVariables:e.context.get(i.KeysInitQuery.graphqlSingularizeVariables)};return{operation:await this.graphqlToSparql.graphqlToSparqlAlgebra(e.query,t,r)}}}t.ActorQueryParseGraphql=o},37067:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(1452),t)},6540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParseSparql=void 0;const n=r(79744),i=r(31578),a=r(55403);class o extends n.ActorQueryParse{constructor(e){super(e),this.prefixes=Object.freeze(this.prefixes)}async test(e){if(e.queryFormat&&"sparql"!==e.queryFormat.language)throw new Error("This actor can only parse SPARQL queries");return!0}async run(e){const t=new a.Parser({prefixes:this.prefixes,baseIRI:e.baseIRI,sparqlStar:!0}).parse(e.query);return{baseIRI:"query"===t.type?t.base:void 0,operation:(0,i.translate)(t,{quads:!0,prefixes:this.prefixes,blankToVariable:!0,baseIRI:e.baseIRI})}}}t.ActorQueryParseSparql=o},4911:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(6540),t)},27007:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessExplainLogical=void 0;const n=r(59946),i=r(32227),a=r(34368);class o extends n.ActorQueryProcess{constructor(e){super(e)}async test(e){if("logical"!==(e.context.get(i.KeysInitQuery.explain)||e.context.get(new a.ActionContextKey("explain"))))throw new Error(`${this.name} can only explain in 'logical' mode.`);return!0}async run(e){let{operation:t,context:r}=await this.queryProcessor.parse(e.query,e.context);return({operation:t,context:r}=await this.queryProcessor.optimize(t,r)),{result:{explain:!0,type:"logical",data:t}}}}t.ActorQueryProcessExplainLogical=o},70605:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(27007),t)},94725:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessExplainParsed=void 0;const n=r(59946),i=r(32227),a=r(34368);class o extends n.ActorQueryProcess{constructor(e){super(e)}async test(e){if("parsed"!==(e.context.get(i.KeysInitQuery.explain)||e.context.get(new a.ActionContextKey("explain"))))throw new Error(`${this.name} can only explain in 'parsed' mode.`);return!0}async run(e){const{operation:t}=await this.queryProcessor.parse(e.query,e.context);return{result:{explain:!0,type:"parsed",data:t}}}}t.ActorQueryProcessExplainParsed=o},68383:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(94725),t)},25441:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessExplainPhysical=void 0;const n=r(59946),i=r(32227),a=r(34368),o=r(16402);class s extends n.ActorQueryProcess{constructor(e){super(e)}async test(e){const t=e.context.get(i.KeysInitQuery.explain)||e.context.get(new a.ActionContextKey("explain"));if("physical"!==t&&"physical-json"!==t)throw new Error(`${this.name} can only explain in 'physical' or 'physical-json' mode.`);return!0}async run(e){let{operation:t,context:r}=await this.queryProcessor.parse(e.query,e.context);({operation:t,context:r}=await this.queryProcessor.optimize(t,r));const n=new o.MemoryPhysicalQueryPlanLogger;r=r.set(i.KeysInitQuery.physicalQueryPlanLogger,n);const s=await this.queryProcessor.evaluate(t,r);switch(s.type){case"bindings":await s.bindingsStream.toArray();break;case"quads":await s.quadStream.toArray();break;case"boolean":case"void":await s.execute()}const c=e.context.get(i.KeysInitQuery.explain)??e.context.getSafe(new a.ActionContextKey("explain"));return{result:{explain:!0,type:c,data:"physical"===c?n.toCompactString():n.toJson()}}}}t.ActorQueryProcessExplainPhysical=s},16402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberToString=t.MemoryPhysicalQueryPlanLogger=void 0;const n=r(22112);function i(e){return e.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:3})}t.MemoryPhysicalQueryPlanLogger=class{constructor(){this.planNodes=new Map}logOperation(e,t,r,n,i,a){const o={actor:i,logicalOperator:e,physicalOperator:t,rawNode:r,children:[],metadata:a};if(this.planNodes.set(r,o),this.rootNode){if(!n)throw new Error("Detected more than one parent-less node");const e=this.planNodes.get(n);if(!e)throw new Error("Could not find parent node");e.children.push(o)}else{if(n)throw new Error("No root node has been set yet, while a parent is being referenced");this.rootNode=o}}stashChildren(e,t){const r=this.planNodes.get(e);if(!r)throw new Error("Could not find plan node");r.children=t?r.children.filter(t):[]}unstashChild(e,t){const r=this.planNodes.get(e);if(r){const e=this.planNodes.get(t);if(!e)throw new Error("Could not find plan parent node");e.children.push(r)}}appendMetadata(e,t){const r=this.planNodes.get(e);r&&(r.metadata={...r.metadata,...t})}toJson(){return this.rootNode?this.planNodeToJson(this.rootNode):{}}planNodeToJson(e){const t={logical:e.logicalOperator,physical:e.physicalOperator,...this.getLogicalMetadata(e.rawNode),...this.compactMetadata(e.metadata)};if(e.children.length>0&&(t.children=e.children.map((e=>this.planNodeToJson(e)))),"bind"===t.physical&&t.children){const e={};for(const r of t.children){const t=r.children?.at(-1)??r,n=this.getPlanHash(t).join(",");e[n]||(e[n]=[]),e[n].push(r)}const r=[];for(const t of Object.values(e))r.push({occurrences:t.length,firstOccurrence:t[0]});t.childrenCompact=r,delete t.children}return t}getPlanHash(e){let t=[`${e.logical}-${e.physical}`];return e.children?t=[...t,...e.children.flatMap((e=>this.getPlanHash(e)))]:e.childrenCompact&&(t=[...t,...e.childrenCompact.flatMap((e=>this.getPlanHash(e.firstOccurrence)))]),t}compactMetadata(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,this.compactMetadataValue(t)])))}compactMetadataValue(e){return e&&"object"==typeof e&&"termType"in e?this.getLogicalMetadata(e):e}getLogicalMetadata(e){const t={};if("type"in e){const r=e;switch(r.metadata?.scopedSource&&(t.source=r.metadata.scopedSource.source.toString()),r.type){case"pattern":t.pattern=this.quadToString(r);break;case"project":t.variables=r.variables.map((e=>e.value))}}return t}quadToString(e){return`${(0,n.termToString)(e.subject)} ${(0,n.termToString)(e.predicate)} ${(0,n.termToString)(e.object)}${"DefaultGraph"===e.graph.termType?"":` ${(0,n.termToString)(e.graph)}`}`}toCompactString(){const e=this.toJson(),t=[],r=new Map;if("logical"in e?this.nodeToCompactString(t,r,"",e):t.push("Empty"),r.size>0){t.push(""),t.push("sources:");for(const[e,n]of r.entries())t.push(` ${n}: ${e}`)}return t.join("\n")}nodeToCompactString(e,t,r,n,a){let o;n.source&&(o=t.get(n.source),void 0===o&&(o=t.size,t.set(n.source,o))),e.push(`${r}${n.logical}${n.physical?`(${n.physical})`:""}${n.pattern?` (${n.pattern})`:""}${n.variables?` (${n.variables.join(",")})`:""}${n.bindOperation?` bindOperation:(${n.bindOperation.pattern}) bindCardEst:${"estimate"===n.bindOperationCardinality.type?"~":""}${i(n.bindOperationCardinality.value)}`:""}${n.cardinality?` cardEst:${"estimate"===n.cardinality.type?"~":""}${i(n.cardinality.value)}`:""}${n.source?` src:${o}`:""}${n.cardinalityReal?` cardReal:${n.cardinalityReal}`:""}${n.timeSelf?` timeSelf:${i(n.timeSelf)}ms`:""}${n.timeLife?` timeLife:${i(n.timeLife)}ms`:""}${a?` ${a}`:""}`);for(const i of n.children??[])this.nodeToCompactString(e,t,`${r} `,i);for(const i of n.childrenCompact??[])this.nodeToCompactString(e,t,`${r} `,i.firstOccurrence,`compacted-occurrences:${i.occurrences}`)}},t.numberToString=i},54395:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(25441),t),i(r(16402),t)},47604:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessSequential=void 0;const n=r(91674),i=r(59510),a=r(59946),o=r(32227),s=r(34368);class c extends a.ActorQueryProcess{constructor(e){super(e)}async test(e){if(e.context.get(o.KeysInitQuery.explain)||e.context.get(new s.ActionContextKey("explain")))throw new Error(`${this.name} is not able to explain queries.`);return!0}async run(e){let{operation:t,context:r}=await this.parse(e.query,e.context);return({operation:t,context:r}=await this.optimize(t,r)),{result:await this.evaluate(t,r)}}async parse(e,t){let r;if(t=(await this.mediatorContextPreprocess.mediate({context:t,initialize:!0})).context,"string"==typeof e){const n=(t=t.set(o.KeysInitQuery.queryString,e)).get(o.KeysInitQuery.baseIRI),i=t.get(o.KeysInitQuery.queryFormat),a=await this.mediatorQueryParse.mediate({context:t,query:e,queryFormat:i,baseIRI:n});r=a.operation,a.baseIRI&&(t=t.set(o.KeysInitQuery.baseIRI,a.baseIRI))}else r=e;if(t.has(o.KeysInitQuery.initialBindings)){const e=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);r=(0,i.materializeOperation)(r,t.get(o.KeysInitQuery.initialBindings),e),t=t.delete(o.KeysInitQuery.queryString)}return{operation:r,context:t}}async optimize(e,t){return t=t.set(o.KeysInitQuery.query,e),({operation:e,context:t}=await this.mediatorOptimizeQueryOperation.mediate({context:t,operation:e})),{operation:e,context:t=t.set(o.KeysInitQuery.query,e)}}async evaluate(e,t){const r=await this.mediatorQueryOperation.mediate({context:t,operation:e});return r.context=t,r}}t.ActorQueryProcessSequential=c},94739:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(47604),t)},45369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeJson=void 0;const n=r(22083),i=r(76664),a=r(22112),o=r(58521);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,t){if(!["bindings","quads","boolean"].includes(e.type))throw new Error("This actor can only handle bindings or quad streams.");return!0}async runHandle(e,t,r){const n=new o.Readable;if(n._read=()=>{},"bindings"===e.type||"quads"===e.type){let t="bindings"===e.type?(0,i.wrap)(e.bindingsStream).map((e=>JSON.stringify(Object.fromEntries([...e].map((([e,t])=>[e.value,a.termToString(t)])))))):(0,i.wrap)(e.quadStream).map((e=>JSON.stringify(a.quadToStringQuad(e)))),r=!0;t=t.map((e=>{const t=`${r?"":","}\n${e}`;return r=!1,t})).prepend(["["]).append(["\n]\n"]),n.wrap(t)}else try{n.push(`${JSON.stringify(await e.execute())}\n`),n.push(null)}catch(e){setTimeout((()=>n.emit("error",e)))}return{data:n}}}t.ActorQueryResultSerializeJson=s},91875:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(45369),t)},2703:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeRdf=void 0;const n=r(22083);class i extends n.ActorQueryResultSerialize{constructor(e){super(e)}async testHandle(e,t,r){if("quads"!==e.type)throw new Error(`Actor ${this.name} can only handle quad streams`);const{mediaTypes:n}=await this.mediatorMediaTypeCombiner.mediate({context:r,mediaTypes:!0});if(!(t in n))throw new Error(`Actor ${this.name} can not handle media type ${t}. All available types: ${Object.keys(n)}`);return!0}async runHandle(e,t,r){return(await this.mediatorRdfSerialize.mediate({context:r,handle:{context:r,quadStream:e.quadStream},handleMediaType:t})).handle}async testMediaType(e){return!0}async getMediaTypes(e){return(await this.mediatorMediaTypeCombiner.mediate({context:e,mediaTypes:!0})).mediaTypes}async testMediaTypeFormats(e){return!0}async getMediaTypeFormats(e){return(await this.mediatorMediaTypeFormatCombiner.mediate({context:e,mediaTypeFormats:!0})).mediaTypeFormats}}t.ActorQueryResultSerializeRdf=i},63543:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(2703),t)},6301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSimple=void 0;const n=r(22083),i=r(76664),a=r(22112),o=r(58521);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,t){if(!["bindings","quads","boolean","void"].includes(e.type))throw new Error("This actor can only handle bindings streams, quad streams, booleans, or updates.");return!0}static termToString(e){return"Quad"===e.termType?(0,a.termToString)(e):e.value}async runHandle(e,t,r){const n=new o.Readable;return"bindings"===e.type?n.wrap(e.bindingsStream.map((e=>`${[...e].map((([e,t])=>`?${e.value}: ${s.termToString(t)}`)).join("\n")}\n\n`))):"quads"===e.type?n.wrap(e.quadStream.map((e=>`subject: ${s.termToString(e.subject)}\npredicate: ${s.termToString(e.predicate)}\nobject: ${s.termToString(e.object)}\ngraph: ${s.termToString(e.graph)}\n\n`))):n.wrap((0,i.wrap)("boolean"===e.type?e.execute().then((e=>[`${e}\n`])):e.execute().then((()=>["ok\n"])))),{data:n}}}t.ActorQueryResultSerializeSimple=s},96791:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(6301),t)},54438:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlCsv=void 0;const n=r(22083),i=r(58521);class a extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToCsvBindings(e){if(!e)return"";let t=e.value;if("Literal"===e.termType)t=`${t}`;else if("BlankNode"===e.termType)t=`_:${t}`;else if("Quad"===e.termType){let r=a.bindingToCsvBindings(e.object);"Literal"===e.object.termType&&(r=`"${r.replaceAll('"','""')}"`),t=`<< ${a.bindingToCsvBindings(e.subject)} ${a.bindingToCsvBindings(e.predicate)} ${r} >>`}else t=`<${t}>`;return/[",\n\r]/u.test(t)&&(t=`"${t.replaceAll('"','""')}"`),t}async testHandleChecked(e,t){if("bindings"!==e.type)throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,t,r){const n=e,o=new i.Readable,s=await n.metadata();return o.push(`${s.variables.map((e=>e.value)).join(",")}\r\n`),o.wrap(n.bindingsStream.map((e=>`${s.variables.map((t=>a.bindingToCsvBindings(e.get(t)))).join(",")}\r\n`))),{data:o}}}t.ActorQueryResultSerializeSparqlCsv=a},34357:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(54438),t)},21437:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserverHttp=void 0;const n=r(34368);class i extends n.ActionObserver{constructor(e){super(e),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener((()=>{this.requests=0}))}onRun(e,t,r){this.requests++}}t.ActionObserverHttp=i},47670:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlJson=void 0;const n=r(22083),i=r(76664),a=r(58521);class o extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToJsonBindings(e){if("Literal"===e.termType){const t=e,r={value:t.value,type:"literal"},{language:n,datatype:i}=t;return n?r["xml:lang"]=n:i&&"http://www.w3.org/2001/XMLSchema#string"!==i.value&&(r.datatype=i.value),r}return"BlankNode"===e.termType?{value:e.value,type:"bnode"}:"Quad"===e.termType?{value:{subject:o.bindingToJsonBindings(e.subject),predicate:o.bindingToJsonBindings(e.predicate),object:o.bindingToJsonBindings(e.object)},type:"triple"}:{value:e.value,type:"uri"}}async testHandleChecked(e,t){if(!["bindings","boolean"].includes(e.type))throw new Error("This actor can only handle bindings streams or booleans.");return!0}async runHandle(e,t,r){const n=new a.Readable,s={};if("bindings"===e.type){const c=await e.metadata();c.variables.length>0&&(s.vars=c.variables.map((e=>e.value)))}if(n.push(`{"head": ${JSON.stringify(s)},\n`),"bindings"===e.type){const u=e.bindingsStream;n.push('"results": { "bindings": [\n');let l=!0;function*d(e){yield e()}n.wrap((0,i.wrap)(u).map((e=>{const t=`${l?"":",\n"}${JSON.stringify(Object.fromEntries([...e].map((([e,t])=>[e.value,o.bindingToJsonBindings(t)]))))}`;return l=!1,t})).append((0,i.wrap)(d((()=>`\n]}${this.emitMetadata?`,\n"metadata": { "httpRequests": ${this.httpObserver.requests} }`:""}}\n`)))))}else n.wrap((0,i.wrap)(e.execute().then((e=>[`"boolean":${e}\n}\n`]))));return{data:n}}}t.ActorQueryResultSerializeSparqlJson=o},34593:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(21437),t),i(r(47670),t)},60096:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlTsv=void 0;const n=r(22083),i=r(64817),a=r(58521);class o extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToTsvBindings(e){return e?(0,i.termToString)(e).replaceAll("\t","\\t").replaceAll("\n","\\n").replaceAll("\r","\\r"):""}async testHandleChecked(e,t){if("bindings"!==e.type)throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,t,r){const n=e,i=new a.Readable,s=await n.metadata();return i.push(`${s.variables.map((e=>e.value)).join("\t")}\n`),i.wrap(n.bindingsStream.map((e=>`${s.variables.map((t=>o.bindingToTsvBindings(e.get(t)))).join("\t")}\n`))),{data:i}}}t.ActorQueryResultSerializeSparqlTsv=o},78432:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(60096),t)},83668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlXml=void 0;const n=r(22083),i=r(76664),a=r(58521),o=r(72825);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToXmlBindings(e,t){return{name:"binding",attributes:{name:t.value},children:[this.valueToXmlValue(e)]}}static valueToXmlValue(e){let t;switch(e.termType){case"Literal":return t=e.language?{"xml:lang":e.language}:e.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==e.datatype.value?{datatype:e.datatype.value}:{},{name:"literal",attributes:t,children:e.value};case"BlankNode":return{name:"bnode",children:e.value};case"Quad":return{name:"triple",children:[{name:"subject",children:[this.valueToXmlValue(e.subject)]},{name:"predicate",children:[this.valueToXmlValue(e.predicate)]},{name:"object",children:[this.valueToXmlValue(e.object)]}]};default:return{name:"uri",children:e.value}}}async testHandleChecked(e,t){if(!["bindings","boolean"].includes(e.type))throw new Error("This actor can only handle bindings streams or booleans.");return!0}async runHandle(e,t,r){const n=new a.Readable;n._read=()=>{};const c=new o.XmlSerializer,u=await e.metadata();if(n.push(o.XmlSerializer.header),n.push(c.open("sparql",{xmlns:"http://www.w3.org/2005/sparql-results#"})),n.push(c.serializeNode({name:"head",children:u.variables.map((e=>({name:"variable",attributes:{name:e.value}})))})),"bindings"===e.type){function*l(){yield c.close(),yield c.close()}n.push(c.open("results"));const d=(0,i.wrap)(e.bindingsStream).map((e=>c.serializeNode({name:"result",children:[...e].map((([e,t])=>s.bindingToXmlBindings(t,e)))}))).append((0,i.wrap)(l()));n.wrap(d)}else try{const p=await e.execute();n.push(c.serializeNode({name:"boolean",children:p.toString()})),n.push(c.close()),setTimeout((()=>n.push(null)))}catch(h){setTimeout((()=>n.emit("error",h)))}return{data:n}}}t.ActorQueryResultSerializeSparqlXml=s},72825:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XmlSerializer=void 0;class r{constructor(){this.stack=[]}open(e,t){const r=`${this.identation()+this.formatTag(e,t,"open")}\n`;return this.stack.push(e),r}close(){const e=this.stack.pop();if(void 0===e)throw new Error("There is no tag left to close");return`${this.identation()+this.formatTag(e,{},"close")}\n`}serializeNode(e){if(void 0===e.children)return`${this.identation()+this.formatTag(e.name,e.attributes,"self-closing")}\n`;if("string"==typeof e.children)return`${this.identation()+this.formatTag(e.name,e.attributes,"open")+this.escape(e.children)+this.formatTag(e.name,{},"close")}\n`;const t=[];t.push(`${this.identation()+this.formatTag(e.name,e.attributes,"open")}\n`),this.stack.push(e.name);for(const r of e.children)t.push(this.serializeNode(r));return this.stack.pop(),t.push(`${this.identation()+this.formatTag(e.name,{},"close")}\n`),t.join("")}identation(){return this.stack.map((e=>" ")).join("")}formatTag(e,t,r){return`<${"close"===r?"/":""}${e}${Object.entries(t??{}).map((e=>` ${e[0]}="${this.escape(e[1])}"`))}${"self-closing"===r?"/":""}>`}escape(e){return e.replaceAll(/["&'<>]/gu,(e=>{switch(e){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return"""}}))}}t.XmlSerializer=r,r.header='\n'},68596:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(83668),t)},1990:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserverHttp=void 0;const n=r(34368);class i extends n.ActionObserver{constructor(e){super(e),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener((()=>{this.requests=0}))}onRun(e,t,r){this.requests++}}t.ActionObserverHttp=i},28541:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeStats=void 0;const n=r(22083),i=r(76664),a=r(58521),o=r(39907);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,t){if(!["bindings","quads"].includes(e.type))throw new Error("This actor can only handle bindings streams or quad streams.");return!0}pushHeader(e){const t=["Result","Delay (ms)","HTTP requests"].join(",");e.push(`${t}\n`)}createStat(e,t){return`${[t,this.delay(e),this.httpObserver.requests].join(",")}\n`}createFooter(e){return`${["TOTAL",this.delay(e),this.httpObserver.requests].join(",")}\n`}async runHandle(e,t,r){const n=new a.Readable,o="bindings"===e.type?e.bindingsStream:e.quadStream,s=this.now();let c=1;const u=(0,i.wrap)(o).map((()=>this.createStat(s,c++))).append((0,i.wrap)(function*(e){yield e()}((()=>this.createFooter(s)))));return this.pushHeader(n),n.wrap(u),{data:n}}now(){if("undefined"==typeof performance){const e=o.hrtime();return 1e3*e[0]+e[1]/1e6}return performance.now()}delay(e){return this.now()-e}}t.ActorQueryResultSerializeStats=s},13900:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(1990),t),i(r(28541),t)},42787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeTable=void 0;const n=r(22083),i=r(18050),a=r(22112),o=r(13252),s=r(58521),c=new i.DataFactory,u=o.QUAD_TERM_NAMES.map((e=>c.variable(e)));class l extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e),this.padding=l.repeat(" ",this.columnWidth)}static repeat(e,t){return e.repeat(t)}async testHandleChecked(e,t){if(!["bindings","quads"].includes(e.type))throw new Error("This actor can only handle bindings or quad streams.");return!0}termToString(e){return"Quad"===e.termType?(0,a.termToString)(e):e.value}pad(e){return e.length<=this.columnWidth?e+this.padding.slice(e.length):`${e.slice(0,this.columnWidth-1)}…`}pushHeader(e,t){const r=t.map((e=>this.pad(e.value))).join(" ");e.push(`${r}\n${l.repeat("-",r.length)}\n`)}createRow(e,t){return`${e.map((e=>t.has(e)?this.termToString(t.get(e)):"")).map((e=>this.pad(e))).join(" ")}\n`}async runHandle(e,t,r){const n=new s.Readable;let i;if("bindings"===e.type){i=e.bindingsStream.map((e=>this.createRow(t,e)));const t=(await e.metadata()).variables;this.pushHeader(n,t)}else i=e.quadStream.map((e=>`${(0,o.getTerms)(e).map((e=>this.pad(this.termToString(e)))).join(" ")}\n`)),this.pushHeader(n,u);return n.wrap(i),{data:n}}}t.ActorQueryResultSerializeTable=l},59655:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(42787),t)},71445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeTree=void 0;const n=r(22083),i=r(32227),a=r(34368),o=r(58521),s=r(43004);class c extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static async bindingsStreamToGraphQl(e,t,r){const n=a.ActionContext.ensureActionContext(t),o=new s.Converter(r),c={singularizeVariables:n.get(i.KeysInitQuery.graphqlSingularizeVariables)??{}};return o.bindingsToTree(await e.map((e=>Object.fromEntries([...e].map((([e,t])=>[e.value,t]))))).toArray(),c)}async testHandleChecked(e){if("bindings"!==e.type)throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,t){const r=new o.Readable;return r._read=()=>{r._read=()=>{},c.bindingsStreamToGraphQl(e.bindingsStream,e.context,{materializeRdfJsTerms:!0}).then((e=>{r.push(JSON.stringify(e,null," ")),r.push(null)})).catch((e=>r.emit("error",e)))},{data:r}}}t.ActorQueryResultSerializeTree=c},70017:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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}),t.bindingsStreamToGraphQl=void 0;const a=r(71445),{bindingsStreamToGraphQl:o}=a.ActorQueryResultSerializeTree;t.bindingsStreamToGraphQl=o,i(r(71445),t)},33606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermediaNone=void 0;const n=r(27474),i=r(91674),a=r(89168),o=r(10953);class s extends a.ActorQuerySourceIdentifyHypermedia{constructor(e){super(e,"file")}async testMetadata(e){return{filterFactor:0}}async run(e){this.logInfo(e.context,`Identified as file source: ${e.url}`);const t=new n.QuerySourceRdfJs(await(0,o.storeStream)(e.quads),await i.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context));return t.toString=()=>`QuerySourceRdfJs(${e.url})`,t.referenceValue=e.url,{source:t}}}t.ActorQuerySourceIdentifyHypermediaNone=s},44538:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(33606),t)},88760:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermediaQpf=void 0;const n=r(91674),i=r(89168),a=r(92591);class o extends i.ActorQuerySourceIdentifyHypermedia{constructor(e){super(e,"qpf")}async test(e){if(e.forceSourceType&&"qpf"!==e.forceSourceType&&"brtpf"!==e.forceSourceType)throw new Error(`Actor ${this.name} is not able to handle source type ${e.forceSourceType}.`);return this.testMetadata(e)}async testMetadata(e){const{searchForm:t}=await this.createSource(e.url,e.metadata,e.context,"brtpf"===e.forceSourceType);if(e.handledDatasets&&e.handledDatasets[t.dataset])throw new Error(`Actor ${this.name} can only be applied for the first page of a QPF dataset.`);return{filterFactor:1}}async run(e){this.logInfo(e.context,`Identified as qpf source: ${e.url}`);const t=await this.createSource(e.url,e.metadata,e.context,"brtpf"===e.forceSourceType,e.quads);return{source:t,dataset:t.searchForm.dataset}}async createSource(e,t,r,i,o){return new a.QuerySourceQpf(this.mediatorMetadata,this.mediatorMetadataExtract,this.mediatorDereferenceRdf,await n.BindingsFactory.create(this.mediatorMergeBindingsContext,r),this.subjectUri,this.predicateUri,this.objectUri,this.graphUri,e,t,i,o)}}t.ActorQuerySourceIdentifyHypermediaQpf=o},92591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceQpf=void 0;const n=r(65483),i=r(32227),a=r(76664),o=r(18050),s=r(22112),c=r(64817),u=r(13252),l=new(r(31578).Factory),d=new o.DataFactory;class p{constructor(e,t,r,n,i,o,s,c,u,l,p,h){this.referenceValue=u,this.mediatorMetadata=e,this.mediatorMetadataExtract=t,this.mediatorDereferenceRdf=r,this.bindingsFactory=n,this.subjectUri=i,this.predicateUri=o,this.objectUri=s,this.graphUri=c,this.url=u,this.bindingsRestricted=p,this.cachedQuads={};const f=this.getSearchForm(l);if(!f)throw new Error("Illegal state: found no TPF/QPF search form anymore in metadata.");if(this.searchForm=f,this.defaultGraph=l.defaultGraph?d.namedNode(l.defaultGraph):void 0,h){let e=(0,a.wrap)(h);this.defaultGraph&&(e=this.reverseMapQuadsToDefaultGraph(e)),e.setProperty("metadata",l),this.cacheQuads(e,d.variable(""),d.variable(""),d.variable(""),d.variable(""))}}async getSelectorShape(){return this.bindingsRestricted?p.SELECTOR_SHAPE_BR:p.SELECTOR_SHAPE}queryBindings(e,t,r){if("pattern"!==e.type)throw new Error(`Attempted to pass non-pattern operation '${e.type}' to QuerySourceQpf`);const a=Boolean(t.get(i.KeysQueryOperation.unionDefaultGraph));let o=this.match(e.subject,e.predicate,e.object,e.graph,a,t,r);return o=(0,n.filterMatchingQuotedQuads)(e,o),(0,n.quadsToBindings)(o,e,this.bindingsFactory,a)}getSearchForm(e){if(!e.searchForms||!e.searchForms.values)return;const{searchForms:t}=e;for(const e of t.values){if(this.graphUri&&this.subjectUri in e.mappings&&this.predicateUri in e.mappings&&this.objectUri in e.mappings&&this.graphUri in e.mappings&&4===Object.keys(e.mappings).length)return e;if(this.subjectUri in e.mappings&&this.predicateUri in e.mappings&&this.objectUri in e.mappings&&3===Object.keys(e.mappings).length)return e}}createFragmentUri(e,t,r,n,i){const a={},o=[{uri:this.subjectUri,term:t},{uri:this.predicateUri,term:r},{uri:this.objectUri,term:n},{uri:this.graphUri,term:i}];for(const e of o)e.uri&&(this.bindingsRestricted||"Variable"!==e.term.termType&&("Quad"!==e.term.termType||(0,u.everyTermsNested)(e.term,(e=>"Variable"!==e.termType))))&&(a[e.uri]=(0,s.termToString)(e.term));return e.getUri(a)}match(e,t,r,n,i,o,s){let c=!1;if("DefaultGraph"===n.termType)if(this.defaultGraph)c=!0,n=this.defaultGraph;else if(4!==Object.keys(this.searchForm.mappings).length||this.defaultGraph)3===Object.keys(this.searchForm.mappings).length&&(n=d.variable("g"));else{if(!i){const e=new a.ArrayIterator([],{autoStart:!1});return e.setProperty("metadata",{requestTime:0,cardinality:{type:"exact",value:0},first:null,next:null,last:null,canContainUndefs:!1}),e}n=d.variable("g")}if(!s?.filterBindings){const i=this.getCachedQuads(e,t,r,n);if(i)return i}const l=this;let p;const h=async function(){let i=l.createFragmentUri(l.searchForm,e,t,r,n);s?.filterBindings&&(i=await l.getBindingsRestrictedLink(e,t,r,n,i,s.filterBindings));const a=await l.mediatorDereferenceRdf.mediate({context:o,url:i});i=a.url;const c=await l.mediatorMetadata.mediate({context:o,url:i,quads:a.data,triples:a.metadata?.triples}),{metadata:u}=await l.mediatorMetadataExtract.mediate({context:o,url:i,metadata:c.metadata,requestTime:a.requestTime});return p.setProperty("metadata",{...u,canContainUndefs:!1,subsetOf:l.url}),c.data}();return p=new a.TransformIterator((async()=>{const i=await h,o=d.defaultGraph();let s=(0,a.wrap)(i).transform({filter:i=>!!(0,u.matchPattern)(i,e,t,r,n)||c&&(0,u.matchPattern)(i,e,t,r,o)});return(c||"Variable"===n.termType)&&(s=this.reverseMapQuadsToDefaultGraph(s)),s}),{autoStart:!1}),s?.filterBindings?p:(this.cacheQuads(p,e,t,r,n),this.getCachedQuads(e,t,r,n))}async getBindingsRestrictedLink(e,t,r,n,i,a){const o=[];for(const e of await a.bindings.toArray()){const t=["("];for(const r of a.metadata.variables){const n=e.get(r);t.push(n?(0,c.termToString)(n):"UNDEF"),t.push(" ")}t.push(")"),o.push(t.join(""))}return 0===o.length&&o.push("()"),`${i}&values=${encodeURIComponent(`(${a.metadata.variables.map((e=>`?${e.value}`)).join(" ")}) { ${o.join(" ")} }`)}`}reverseMapQuadsToDefaultGraph(e){const t=d.defaultGraph();return e.map((e=>(0,u.mapTerms)(e,((e,r)=>"graph"===r&&e.equals(this.defaultGraph)?t:e))))}getPatternId(e,t,r,n){return JSON.stringify({s:"Variable"===e.termType?"":h(e),p:"Variable"===t.termType?"":h(t),o:"Variable"===r.termType?"":h(r),g:"Variable"===n.termType?"":h(n)})}cacheQuads(e,t,r,n,i){const a=this.getPatternId(t,r,n,i);this.cachedQuads[a]=e.clone()}getCachedQuads(e,t,r,n){const i=this.getPatternId(e,t,r,n),a=this.cachedQuads[i];if(a)return a.clone()}queryQuads(e,t){throw new Error("queryQuads is not implemented in QuerySourceQpf")}queryBoolean(e,t){throw new Error("queryBoolean is not implemented in QuerySourceQpf")}queryVoid(e,t){throw new Error("queryVoid is not implemented in QuerySourceQpf")}}function h(e){return"DefaultGraph"===e.termType?"|":(0,s.termToString)(e)}t.QuerySourceQpf=p,p.SELECTOR_SHAPE={type:"operation",operation:{operationType:"pattern",pattern:l.createPattern(d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g"))},variablesOptional:[d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g")]},p.SELECTOR_SHAPE_BR={type:"operation",operation:{operationType:"pattern",pattern:l.createPattern(d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g"))},variablesOptional:[d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g")],filterBindings:!0}},52378:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(88760),t),i(r(92591),t)},480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermediaSparql=void 0;const n=r(91674),i=r(89168),a=r(99193);class o extends i.ActorQuerySourceIdentifyHypermedia{constructor(e){super(e,"sparql")}async testMetadata(e){if(!(e.forceSourceType||e.metadata.sparqlService||this.checkUrlSuffix&&e.url.endsWith("/sparql")))throw new Error(`Actor ${this.name} could not detect a SPARQL service description or URL ending on /sparql.`);return{filterFactor:1}}async run(e){return this.logInfo(e.context,`Identified ${e.url} as sparql source with service URL: ${e.metadata.sparqlService||e.url}`),{source:new a.QuerySourceSparql(e.forceSourceType?e.url:e.metadata.sparqlService||e.url,e.context,this.mediatorHttp,this.bindMethod,await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context),this.forceHttpGet,this.cacheSize,this.countTimeout)}}}t.ActorQuerySourceIdentifyHypermediaSparql=o},99193:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceSparql=void 0;const n=r(32227),i=r(34368),a=r(76664),o=r(74190),s=r(35069),c=r(18050),u=r(31578),l=new u.Factory,d=new c.DataFactory,p=d.variable("count"),h={type:"estimate",value:Number.POSITIVE_INFINITY};class f{constructor(e,t,r,n,i,a,c,u){this.referenceValue=e,this.url=e,this.context=t,this.mediatorHttp=r,this.bindMethod=n,this.bindingsFactory=i,this.endpointFetcher=new o.SparqlEndpointFetcher({method:a?"GET":"POST",fetch:(e,t)=>this.mediatorHttp.mediate({input:e,init:t,context:this.lastSourceContext}),prefixVariableQuestionMark:!0}),this.cache=c>0?new s.LRUCache({max:c}):void 0,this.countTimeout=u}async getSelectorShape(){return f.SELECTOR_SHAPE}queryBindings(e,t,r){let i;i=r?.joinBindings?f.addBindingsToOperation(this.bindMethod,e,r.joinBindings):Promise.resolve(e);const o=new a.TransformIterator((async()=>{const e=await i,a=u.Util.inScopeVariables(e),o=t.get(n.KeysInitQuery.queryString),s=!r?.joinBindings&&o?o:f.operationToSelectQuery(e,a),c=f.operationCanContainUndefs(e);return this.queryBindingsRemote(this.url,s,a,t,c)}),{autoStart:!1});return this.attachMetadata(o,t,i),o}queryQuads(e,t){this.lastSourceContext=this.context.merge(t);const r=this.endpointFetcher.fetchTriples(this.url,t.get(n.KeysInitQuery.queryString)??f.operationToQuery(e));this.lastSourceContext=void 0;const i=(0,a.wrap)(r,{autoStart:!1,maxBufferSize:Number.POSITIVE_INFINITY});return this.attachMetadata(i,t,Promise.resolve(e.input)),i}queryBoolean(e,t){this.lastSourceContext=this.context.merge(t);const r=this.endpointFetcher.fetchAsk(this.url,t.get(n.KeysInitQuery.queryString)??f.operationToQuery(e));return this.lastSourceContext=void 0,r}queryVoid(e,t){this.lastSourceContext=this.context.merge(t);const r=this.endpointFetcher.fetchUpdate(this.url,t.get(n.KeysInitQuery.queryString)??f.operationToQuery(e));return this.lastSourceContext=void 0,r}attachMetadata(e,t,r){let n=[],i=!1;new Promise((async(e,a)=>{let o;try{const a=await r;n=u.Util.inScopeVariables(a),o=f.operationToCountQuery(a),i=f.operationCanContainUndefs(a);const s=this.cache?.get(o);if(void 0!==s)return e(s);const c=setTimeout((()=>e(h)),this.countTimeout),l=await this.queryBindingsRemote(this.url,o,[p],t,!1);l.on("data",(t=>{clearTimeout(c);const r=t.get(p),n={type:"estimate",value:Number.POSITIVE_INFINITY};if(r){const e=Number.parseInt(r.value,10);Number.isNaN(e)||(n.type="exact",n.value=e,this.cache?.set(o,n))}return e(n)})),l.on("error",(()=>{clearTimeout(c),e(h)})),l.on("end",(()=>{clearTimeout(c),e(h)}))}catch(e){return a(e)}})).then((t=>e.setProperty("metadata",{cardinality:t,canContainUndefs:i,variables:n}))).catch((()=>e.setProperty("metadata",{cardinality:h,canContainUndefs:i,variables:n})))}static async addBindingsToOperation(e,t,r){const n=await r.bindings.toArray();switch(e){case"values":return l.createJoin([l.createValues(r.metadata.variables,n.map((e=>Object.fromEntries([...e].map((([e,t])=>[`?${e.value}`,t])))))),t],!1);case"union":throw new Error('Not implemented yet: "union" case');case"filter":throw new Error('Not implemented yet: "filter" case')}}static operationToSelectQuery(e,t){return f.operationToQuery(l.createProject(e,t))}static operationToCountQuery(e){return f.operationToQuery(l.createProject(l.createExtend(l.createGroup(e,[],[l.createBoundAggregate(d.variable("var0"),"count",l.createWildcardExpression(),!1)]),d.variable("count"),l.createTermExpression(d.variable("var0"))),[d.variable("count")]))}static operationToQuery(e){return(0,u.toSparql)(e,{sparqlStar:!0})}static operationCanContainUndefs(e){let t=!1;return u.Util.recurseOperation(e,{leftjoin:()=>(t=!0,!1),values:e=>(t=e.bindings.some((t=>e.variables.some((e=>!(`?${e.value}`in t))))),!1),union(e){const r=e.input.map(u.Util.inScopeVariables).map((e=>e.map((e=>e.value)))).map((e=>e.sort(((e,t)=>e.localeCompare(t))))).map((e=>e.join(",")));return!!r.every((e=>e===r[0]))||(t=!0,!1)}}),t}async queryBindingsRemote(e,t,r,n,o){this.lastSourceContext=this.context.merge(n);const s=await this.endpointFetcher.fetchBindings(e,t);return this.lastSourceContext=void 0,(0,a.wrap)(s,{autoStart:!1,maxBufferSize:Number.POSITIVE_INFINITY}).map((t=>this.bindingsFactory.bindings(r.map((r=>{const n=t[`?${r.value}`];return o||n||i.Actor.getContextLogger(this.context)?.warn(`The endpoint ${e} failed to provide a binding for ${r.value}.`),[r,n]})).filter((([e,t])=>Boolean(t))))))}toString(){return`QuerySourceSparql(${this.url})`}}t.QuerySourceSparql=f,f.SELECTOR_SHAPE={type:"disjunction",children:[{type:"operation",operation:{operationType:"type",type:u.Algebra.types.PROJECT},joinBindings:!0},{type:"operation",operation:{operationType:"type",type:u.Algebra.types.CONSTRUCT}},{type:"operation",operation:{operationType:"type",type:u.Algebra.types.DESCRIBE}},{type:"operation",operation:{operationType:"type",type:u.Algebra.types.ASK}},{type:"operation",operation:{operationType:"type",type:u.Algebra.types.COMPOSITE_UPDATE}}]}},16025:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(480),t),i(r(99193),t)},93017:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermedia=void 0;const n=r(91674),i=r(65483),a=r(32227),o=r(34368),s=r(870);class c extends i.ActorQuerySourceIdentify{constructor(e){super(e)}async test(e){if("string"!=typeof e.querySourceUnidentified.value)throw new TypeError(`${this.name} requires a single query source with a URL value to be present in the context.`);return!0}async run(e){return{querySource:{source:new s.QuerySourceHypermedia(this.cacheSize,e.querySourceUnidentified.value,e.querySourceUnidentified.type,this.maxIterators,this.aggregateTraversalStore&&Boolean(e.querySourceUnidentified.context?.get(a.KeysQuerySourceIdentify.traverse)),{mediatorMetadata:this.mediatorMetadata,mediatorMetadataExtract:this.mediatorMetadataExtract,mediatorMetadataAccumulate:this.mediatorMetadataAccumulate,mediatorDereferenceRdf:this.mediatorDereferenceRdf,mediatorQuerySourceIdentifyHypermedia:this.mediatorQuerySourceIdentifyHypermedia,mediatorRdfResolveHypermediaLinks:this.mediatorRdfResolveHypermediaLinks,mediatorRdfResolveHypermediaLinksQueue:this.mediatorRdfResolveHypermediaLinksQueue},(t=>this.logWarn(e.context,t)),await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context)),context:e.querySourceUnidentified.context??new o.ActionContext}}}}t.ActorQuerySourceIdentifyHypermedia=c},87896:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedRdfSourcesAsyncRdfIterator=void 0;const n=r(72394),i=r(76664);class a extends i.BufferedIterator{constructor(e,t,r,n,i,a,o,s){if(super({autoStart:!1,...s}),this.started=!1,this.currentIterators=[],this.iteratorsPendingCreation=0,this.iteratorsPendingTermination=0,this.accumulatedMetadata=Promise.resolve(void 0),this._reading=!1,this.cacheSize=e,this.operation=t,this.queryBindingsOptions=r,this.context=n,this.firstUrl=i,this.maxIterators=a,this.sourceStateGetter=o,this.maxIterators<=0)throw new Error(`LinkedRdfSourcesAsyncRdfIterator.maxIterators must be larger than zero, but got ${this.maxIterators}`)}kickstart(){this.started||this._fillBufferAsync()}getProperty(e,t){return"metadata"!==e||this.started||(this.preflightMetadata||(this.preflightMetadata=new Promise(((e,t)=>{this.sourceStateGetter({url:this.firstUrl},{}).then((t=>{const r=t.source.queryBindings(this.operation,this.context);r.getProperty("metadata",(i=>{i.state=new n.MetadataValidationState,r.destroy(),this.accumulateMetadata(t.metadata,i).then((r=>{const n={...t.metadata,...i,...r};e(n)})).catch((()=>{e({...t.metadata,state:new n.MetadataValidationState})}))}))})).catch(t)}))),this.preflightMetadata.then((e=>this.setProperty("metadata",e))).catch((()=>{}))),super.getProperty(e,t)}_end(e){for(const e of this.currentIterators)e.destroy();super._end(e)}_read(e,t){if(this.started){for(const t of this.currentIterators){for(;e>0;){const r=t.read();if(null===r)break;e--,this._push(r)}if(e<=0)break}e>=0&&this.canStartNewIterator()?this.sourceStateGetter({url:this.firstUrl},{}).then((e=>{this.startIteratorsForNextUrls(e.handledDatasets,!1),t()})):t()}else this.started=!0,this.sourceStateGetter({url:this.firstUrl},{}).then((e=>{this.startIterator(e),t()})).catch((e=>setTimeout((()=>this.destroy(e)))))}canStartNewIterator(){return this.currentIterators.length+this.iteratorsPendingCreation+this.iteratorsPendingTermination0}startIterator(e){try{const t=e.source.queryBindings(this.operation,this.context,this.queryBindingsOptions);this.currentIterators.push(t);let r=!1,i=!1;t._destination=this,t.on("error",(e=>this.destroy(e))),t.on("readable",(()=>this._fillBuffer())),t.on("end",(()=>{this.currentIterators.splice(this.currentIterators.indexOf(t),1),r=!0,i||this.iteratorsPendingTermination++,i&&this.startIteratorsForNextUrls(e.handledDatasets,!0)})),t.getProperty("metadata",(t=>{this.accumulatedMetadata=this.accumulatedMetadata.then((a=>(async()=>(a||(a=e.metadata),this.accumulateMetadata(a,t)))().then((a=>{const o={...e.metadata,...t,...a};return o.state=new n.MetadataValidationState,this.updateMetadata(o),this.preflightMetadata&&this.preflightMetadata.then((e=>e.state.invalidate())).catch((()=>{})),this.getSourceLinks(o).then((e=>Promise.all(e))).then((async t=>{const n=await this.getLinkQueue();for(const r of t)n.push(r,e.link);i=!0,r&&this.iteratorsPendingTermination--,this.startIteratorsForNextUrls(e.handledDatasets,!0)})).catch((e=>this.destroy(e))),o})))).catch((e=>(this.destroy(e),{})))}))}catch(e){this.destroy(e)}}updateMetadata(e){const t=this.getProperty("metadata");this.setProperty("metadata",e),t?.state.invalidate()}isRunning(){return!this.done}startIteratorsForNextUrls(e,t){this.getLinkQueue().then((r=>{for(;this.canStartNewIterator()&&this.isRunning();){const t=r.pop();if(!t)break;this.iteratorsPendingCreation++,this.sourceStateGetter(t,e).then((e=>{this.iteratorsPendingCreation--,this.startIterator(e)})).catch((e=>this.emit("error",e)))}t&&this.isCloseable(r,!0)&&this.close()})).catch((e=>this.destroy(e)))}isCloseable(e,t){return e.isEmpty()&&!this.areIteratorsRunning()}}t.LinkedRdfSourcesAsyncRdfIterator=a},47833:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatedLinkedRdfSourcesAsyncRdfIterator=void 0;const n=r(32227),i=r(18050),a=r(31578),o=r(87896),s=new i.DataFactory,c=new a.Factory;class u extends o.LinkedRdfSourcesAsyncRdfIterator{constructor(e,t,r,n,i,a,o,s,c,u,l,d){super(e,t,r,n,a,o,s,c?{maxBufferSize:Number.POSITIVE_INFINITY}:void 0),this.wasForcefullyClosed=!1,this.forceSourceType=i,this.mediatorMetadataAccumulate=u,this.mediatorRdfResolveHypermediaLinks=l,this.mediatorRdfResolveHypermediaLinksQueue=d,this.handledUrls={[a]:!0},this.aggregatedStore=c}close(){this.aggregatedStore?this.getLinkQueue().then((e=>{this.isCloseable(e,!1)?(this.aggregatedStore&&setTimeout((()=>this.aggregatedStore.end())),super.close()):this.wasForcefullyClosed=!0})).catch((e=>super.destroy(e))):super.close()}destroy(e){this.aggregatedStore?this.getLinkQueue().then((t=>{e??this.isCloseable(t,!1)?(this.aggregatedStore&&setTimeout((()=>this.aggregatedStore.end())),super.destroy(e)):this.wasForcefullyClosed=!0})).catch((e=>super.destroy(e))):super.destroy(e)}isCloseable(e,t){return(t?e.isEmpty():this.wasForcefullyClosed||e.isEmpty())&&!this.areIteratorsRunning()}canStartNewIterator(){return!this.wasForcefullyClosed&&this.aggregatedStore&&this.aggregatedStore.hasRunningIterators()||super.canStartNewIterator()}canStartNewIteratorConsiderReadable(){return!this.aggregatedStore}isRunning(){return this.aggregatedStore&&this.aggregatedStore.hasRunningIterators()||!this.done}getLinkQueue(){return this.linkQueue||(this.linkQueue=this.mediatorRdfResolveHypermediaLinksQueue.mediate({firstUrl:this.firstUrl,context:this.context}).then((e=>e.linkQueue))),this.linkQueue}async getSourceLinks(e){try{const{links:t}=await this.mediatorRdfResolveHypermediaLinks.mediate({context:this.context,metadata:e});return t.filter((e=>!this.handledUrls[e.url]&&(this.handledUrls[e.url]=!0,!0)))}catch{return[]}}startIterator(e){if(this.aggregatedStore&&!this.aggregatedStore.containedSources.has(e.link.url)){this.aggregatedStore?.containedSources.add(e.link.url);const t=e.source.queryBindings(c.createPattern(s.variable("s"),s.variable("p"),s.variable("o"),s.variable("g")),this.context.set(n.KeysQueryOperation.unionDefaultGraph,!0)).map((e=>s.quad(e.get("s"),e.get("p"),e.get("o"),e.get("g"))));this.aggregatedStore.import(t).on("end",(()=>{super.startIterator(e)}))}else super.startIterator(e)}async accumulateMetadata(e,t){return(await this.mediatorMetadataAccumulate.mediate({mode:"append",accumulatedMetadata:e,appendingMetadata:t,context:this.context})).metadata}updateMetadata(e){super.updateMetadata(e),this.aggregatedStore?.setBaseMetadata(e,!0)}}t.MediatedLinkedRdfSourcesAsyncRdfIterator=u},870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceHypermedia=void 0;const n=r(27474),i=r(32227),a=r(76664),o=r(35069),s=r(58521),c=r(47833),u=r(69321);t.QuerySourceHypermedia=class{constructor(e,t,r,n,i,a,s,c){this.referenceValue=t,this.cacheSize=e,this.firstUrl=t,this.forceSourceType=r,this.maxIterators=n,this.mediators=a,this.aggregateStore=i,this.logWarning=s,this.bindingsFactory=c,this.sourcesState=new o.LRUCache({max:this.cacheSize})}async getSelectorShape(e){return(await this.getSourceCached({url:this.firstUrl},{},e,this.getAggregateStore(e))).source.getSelectorShape(e)}queryBindings(e,t,r){const i=this.getAggregateStore(t);if(i&&"pattern"===e.type&&i.started)return new n.QuerySourceRdfJs(i,this.bindingsFactory).queryBindings(e,t);0===this.sourcesState.size&&this.getSourceCached({url:this.firstUrl},{},t,i).catch((e=>a.destroy(e)));const a=new c.MediatedLinkedRdfSourcesAsyncRdfIterator(this.cacheSize,e,r,t,this.forceSourceType,this.firstUrl,this.maxIterators,((e,r)=>this.getSourceCached(e,r,t,i)),i,this.mediators.mediatorMetadataAccumulate,this.mediators.mediatorRdfResolveHypermediaLinks,this.mediators.mediatorRdfResolveHypermediaLinksQueue);if(i){i.started=!0;const e=()=>a.kickstart();i.addIteratorCreatedListener(e),a.on("end",(()=>i.removeIteratorCreatedListener(e)))}return a}queryQuads(e,t){return new a.TransformIterator((async()=>(await this.getSourceCached({url:this.firstUrl},{},t,this.getAggregateStore(t))).source.queryQuads(e,t)))}async queryBoolean(e,t){const r=await this.getSourceCached({url:this.firstUrl},{},t,this.getAggregateStore(t));return await r.source.queryBoolean(e,t)}async queryVoid(e,t){const r=await this.getSourceCached({url:this.firstUrl},{},t,this.getAggregateStore(t));return await r.source.queryVoid(e,t)}async getSource(e,t,r,n){e.context&&(r=r.merge(e.context));let i,a,o=e.url;try{const t=await this.mediators.mediatorDereferenceRdf.mediate({context:r,url:o});o=t.url;const n=await this.mediators.mediatorMetadata.mediate({context:r,url:o,quads:t.data,triples:t.metadata?.triples});n.data.on("error",(()=>{})),a=(await this.mediators.mediatorMetadataExtract.mediate({context:r,url:o,metadata:n.metadata,headers:t.headers,requestTime:t.requestTime})).metadata,i=n.data,e.transform&&(i=await e.transform(i))}catch(e){i=new s.Readable,i.read=()=>(setTimeout((()=>i.emit("error",e))),null),({metadata:a}=await this.mediators.mediatorMetadataAccumulate.mediate({context:r,mode:"initialize"})),this.logWarning(`Metadata extraction for ${o} failed: ${e.message}`)}n?.setBaseMetadata(a,!1),n?.containedSources.add(e.url),n?.import(i);const{source:c,dataset:u}=await this.mediators.mediatorQuerySourceIdentifyHypermedia.mediate({context:r,forceSourceType:e.url===this.firstUrl?this.forceSourceType:void 0,handledDatasets:t,metadata:a,quads:i,url:o});return u&&(t[u]=!0),{link:e,source:c,metadata:a,handledDatasets:t}}getSourceCached(e,t,r,n){let i=this.sourcesState.get(e.url);return i||(i=this.getSource(e,t,r,n),e.url!==this.firstUrl&&void 0!==n||this.sourcesState.set(e.url,i),i)}getAggregateStore(e){let t;if(this.aggregateStore){const r=e.get(i.KeysQuerySourceIdentify.hypermediaSourcesAggregatedStores);if(r)return t=r.get(this.firstUrl),t||(t=new u.StreamingStoreMetadata(void 0,(async(t,r)=>(await this.mediators.mediatorMetadataAccumulate.mediate({mode:"append",accumulatedMetadata:t,appendingMetadata:r,context:e})).metadata)),r.set(this.firstUrl,t)),t}}toString(){return`QuerySourceHypermedia(${this.firstUrl})`}}},69321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingStoreMetadata=void 0;const n=r(59510),i=r(72394),a=r(2887);class o extends a.StreamingStore{constructor(e,t){super(e),this.started=!1,this.containedSources=new Set,this.runningIterators=new Set,this.iteratorCreatedListeners=new Set,this.baseMetadata={state:new i.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:[]},this.metadataAccumulator=t}import(e){return this.ended||super.import(e),e}hasRunningIterators(){return this.runningIterators.size>0}match(e,t,r,a){const o=super.match(e,t,r,a),s=new n.ClosableTransformIterator(o,{autoStart:!1,onClose:()=>{this.runningIterators.delete(s)}});let c=this.getStore().countQuads(e,t,r,a);const u={state:new i.MetadataValidationState,cardinality:{type:"estimate",value:c},canContainUndefs:!1};s.setProperty("metadata",u),s.setProperty("lastCount",c),o.on("quad",(()=>{s.setProperty("lastCount",++c),this.updateMetadataState(s,c)})),this.runningIterators.add(s);for(const e of this.iteratorCreatedListeners)e();return s}setBaseMetadata(e,t){if(this.baseMetadata={...e},this.baseMetadata.cardinality={type:"exact",value:0},t)for(const e of this.runningIterators){const t=e.getProperty("lastCount");this.updateMetadataState(e,t)}}updateMetadataState(e,t){const r={state:new i.MetadataValidationState,cardinality:{type:"estimate",value:t},canContainUndefs:!1,variables:[]};this.metadataAccumulator(this.baseMetadata,r).then((t=>{t.state=new i.MetadataValidationState;const r=e.getProperty("metadata");e.setProperty("metadata",t),r?.state.invalidate()})).catch((()=>{}))}addIteratorCreatedListener(e){this.iteratorCreatedListeners.add(e)}removeIteratorCreatedListener(e){this.iteratorCreatedListeners.delete(e)}}t.StreamingStoreMetadata=o},57789:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(93017),t),i(r(870),t)},34263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyRdfJs=void 0;const n=r(91674),i=r(65483),a=r(34368),o=r(35720);class s extends i.ActorQuerySourceIdentify{constructor(e){super(e)}async test(e){const t=e.querySourceUnidentified;if(void 0!==t.type&&"rdfjs"!==t.type)throw new Error(`${this.name} requires a single query source with rdfjs type to be present in the context.`);if("string"==typeof t.value||!("match"in t.value))throw new Error(`${this.name} received an invalid rdfjs query source.`);return!0}async run(e){return{querySource:{source:new o.QuerySourceRdfJs(e.querySourceUnidentified.value,await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context)),context:e.querySourceUnidentified.context??new a.ActionContext}}}}t.ActorQuerySourceIdentifyRdfJs=s},45958:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35720:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceRdfJs=void 0;const n=r(65483),i=r(32227),a=r(72394),o=r(76664),s=r(18050),c=r(13252),u=new(r(31578).Factory),l=new s.DataFactory;class d{constructor(e,t){this.source=e,this.referenceValue=e,this.bindingsFactory=t}static nullifyVariables(e,t){return!e||"Variable"===e.termType||!t&&"Quad"===e.termType&&(0,c.someTermsNested)(e,(e=>"Variable"===e.termType))?void 0:e}static hasDuplicateVariables(e){const t=(0,c.filterTermsNested)(e,(e=>"Variable"===e.termType));return t.length>1&&(0,c.uniqTerms)(t).lengths.destroy(e))),(0,n.quadsToBindings)(s,e,this.bindingsFactory,Boolean(t.get(i.KeysQueryOperation.unionDefaultGraph)))}async setMetadata(e,t){const r=Boolean(this.source.features?.quotedTripleFiltering);let n;if(this.source.countQuads)n=await this.source.countQuads(d.nullifyVariables(t.subject,r),d.nullifyVariables(t.predicate,r),d.nullifyVariables(t.object,r),d.nullifyVariables(t.graph,r));else{let e=0;n=await new Promise(((n,i)=>{const a=this.source.match(d.nullifyVariables(t.subject,r),d.nullifyVariables(t.predicate,r),d.nullifyVariables(t.object,r),d.nullifyVariables(t.graph,r));a.on("error",i),a.on("end",(()=>n(e))),a.on("data",(()=>e++))}))}const i=!r&&(0,c.someTerms)(t,(e=>"Quad"===e.termType))||d.hasDuplicateVariables(t);e.setProperty("metadata",{state:new a.MetadataValidationState,cardinality:{type:i?"estimate":"exact",value:n},canContainUndefs:!1})}queryQuads(e,t){throw new Error("queryQuads is not implemented in QuerySourceQpf")}queryBoolean(e,t){throw new Error("queryBoolean is not implemented in QuerySourceQpf")}queryVoid(e,t){throw new Error("queryVoid is not implemented in QuerySourceQpf")}toString(){return`QuerySourceRdfJs(${this.source.constructor.name})`}}t.QuerySourceRdfJs=d,d.SELECTOR_SHAPE={type:"operation",operation:{operationType:"pattern",pattern:u.createPattern(l.variable("s"),l.variable("p"),l.variable("o"))},variablesOptional:[l.variable("s"),l.variable("p"),l.variable("o")]}},27474:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(34263),t),i(r(45958),t),i(r(35720),t)},16661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifySerialized=void 0;const n=r(65483),i=r(10953),a=r(58521);class o extends n.ActorQuerySourceIdentify{constructor(e){super(e)}async test(e){if(!this.isStringSource(e.querySourceUnidentified))throw new Error(`${this.name} requires a single query source with serialized type to be present in the context.`);return!0}async run(e){return await this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:{type:"rdfjs",value:await this.getRdfSource(e.context,e.querySourceUnidentified),context:e.querySourceUnidentified.context},context:e.context})}async getRdfSource(e,t){const r=new a.Readable({objectMode:!0});r._read=()=>{},r.push(t.value),r.push(null);const n={context:e,handle:{metadata:{baseIRI:t.baseIRI},data:r,context:e},handleMediaType:t.mediaType},o=await this.mediatorRdfParse.mediate(n);return await(0,i.storeStream)(o.handle.data)}isStringSource(e){return"type"in e?"serialized"===e.type:"string"==typeof e.value&&"mediaType"in e}}t.ActorQuerySourceIdentifySerialized=o},84701:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(16661),t)},13494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinEntriesSortCardinality=void 0;const n=r(84287);class i extends n.ActorRdfJoinEntriesSort{constructor(e){super(e)}async test(e){return!0}async run(e){return{entries:[...e.entries].sort(((e,t)=>e.metadata.cardinality.value-t.metadata.cardinality.value))}}}t.ActorRdfJoinEntriesSortCardinality=i},36545:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(13494),t)},87653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinHash=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"hash",limitEntries:2,requiresVariableOverlap:!0})}async getOutput(e){let t=await n.ActorRdfJoin.getMetadatas(e.entries);t[1].cardinality.valuen.ActorRdfJoin.hash(e,r)),n.ActorRdfJoin.joinBindings),metadata:async()=>await this.constructResultMetadata(e.entries,t,e.context)}}}async getJoinCoefficients(e,t){t[1].cardinality.value{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiBindSource=void 0;const n=r(59510),i=r(32353),a=r(76664),o=new(r(31578).Factory);class s extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"bind-source",canHandleUndefs:!0})}async getOutput(e){const t=await i.ActorRdfJoin.getEntriesWithMetadatas(e.entries),r=await this.sortJoinEntries(t,e.context);this.logDebug(e.context,"First entry for Bind Join Source: ",(()=>({entry:r[0].operation,metadata:r[0].metadata})));for(const[e,t]of r.entries())0!==e&&t.output.bindingsStream.close();const o=r[0].output,s=r[0].metadata,c=[...r];c.splice(0,1);const u=n.ActorQueryOperation.getOperationSource(c[0].operation),l=this.createOperationFromEntries(c),d=new i.ChunkedIterator(o.bindingsStream,this.blockSize,{autoStart:!1});return{result:{type:"bindings",bindingsStream:new a.UnionIterator(d.map((t=>u.source.queryBindings(l,u.context?e.context.merge(u.context):e.context,{joinBindings:{bindings:t,metadata:s}})))),metadata:()=>this.constructResultMetadata(r,r.map((e=>e.metadata)),e.context)},physicalPlanMetadata:{bindIndex:t.indexOf(r[0])}}}async sortJoinEntries(e,t){return(e=await i.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort,e,t)).sort(((e,t)=>e.operationModified&&!t.operationModified?-1:0))}async getJoinCoefficients(e,t){const r=await this.sortJoinEntries(e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context);t=r.map((e=>e.metadata));const a=i.ActorRdfJoin.getRequestInitialTimes(t),o=i.ActorRdfJoin.getRequestItemTimes(t),s=[...r],c=[...a],u=[...o];s.splice(0,1),c.splice(0,1),u.splice(0,1);const l=s.map((e=>n.ActorQueryOperation.getOperationSource(e.operation)));if(l.some((e=>!e)))throw new Error(`Actor ${this.name} can not bind on remaining operations without source annotation`);if(l.some((e=>e!==l[0])))throw new Error(`Actor ${this.name} can not bind on remaining operations with non-equal source annotation`);const d=l[0],p=this.createOperationFromEntries(s),h=await d.source.getSelectorShape(e.context);if(!n.ActorQueryOperation.doesShapeAcceptOperation(h,p,{joinBindings:!0}))throw new Error(`Actor ${this.name} detected a source that can not handle passing down join bindings`);const f=await Promise.all(s.map((async t=>(await this.mediatorJoinSelectivity.mediate({entries:[r[0],t],context:e.context})).selectivity*this.selectivityModifier))),y=s.map(((e,t)=>e.metadata.cardinality.value*f[t])).reduce(((e,t)=>e+t),0);return{iterations:1,persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:a[0]+t[0].cardinality.value*o[0]+a[1]+y*o[1]}}createOperationFromEntries(e){return 1===e.length?e[0].operation:o.createJoin(e.map((e=>e.operation)),!0)}}t.ActorRdfJoinMultiBindSource=s},6551:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(57581),t)},38752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiBind=void 0;const n=r(91674),i=r(59510),a=r(32353),o=r(32227),s=r(76664),c=r(31578);class u extends a.ActorRdfJoin{constructor(e){void 0===e.minMaxCardinalityRatio&&(e.minMaxCardinalityRatio=60),super(e,{logicalType:"inner",physicalName:"bind",canHandleUndefs:!0,isLeaf:!1})}static createBindStream(e,t,r,n,a,o){const c="depth-first"===e,u=e=>{const t=r.map((t=>(0,i.materializeOperation)(t,e,o,{bindFilter:!0}))),a=t=>t.merge(e);return new s.TransformIterator((async()=>(await n(t,e)).transform({map:a})),{maxBufferSize:128,autoStart:c})};switch(e){case"depth-first":return new s.MultiTransformIterator(t,{autoStart:!1,multiTransform:u,optional:a});case"breadth-first":return new s.UnionIterator(t.transform({map:u,optional:a}),{autoStart:!1});default:throw new Error(`Received request for unknown bind order: ${e}`)}}async getOutput(e){const t=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context),r=await a.ActorRdfJoin.getEntriesWithMetadatas(e.entries),s=await a.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort,r,e.context);this.logDebug(e.context,"First entry for Bind Join: ",(()=>({entry:s[0].operation,metadata:s[0].metadata})));for(const[e,t]of s.entries())0!==e&&t.output.bindingsStream.close();const c=s[0].output,l=[...s];l.splice(0,1);const d=e.context.set(o.KeysQueryOperation.joinLeftMetadata,s[0].metadata).set(o.KeysQueryOperation.joinRightMetadatas,l.map((e=>e.metadata)));return{result:{type:"bindings",bindingsStream:u.createBindStream(this.bindOrder,c.bindingsStream,l.map((e=>e.operation)),(async(e,t)=>{const r=1===e.length?e[0]:u.FACTORY.createJoin(e);return i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:r,context:d?.set(o.KeysQueryOperation.joinBindings,t)})).bindingsStream}),!1,t),metadata:()=>this.constructResultMetadata(s,s.map((e=>e.metadata)),e.context)},physicalPlanMetadata:{bindIndex:r.indexOf(s[0]),bindOperation:s[0].operation,bindOperationCardinality:s[0].metadata.cardinality,bindOrder:this.bindOrder}}}canBindWithOperation(e){let t=!0;return c.Util.recurseOperation(e,{[c.Algebra.types.EXTEND]:()=>(t=!1,!1),[c.Algebra.types.GROUP]:()=>(t=!1,!1)}),t}async getJoinCoefficients(e,t){const r=await a.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort,e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context);t=r.map((e=>e.metadata));const n=a.ActorRdfJoin.getRequestInitialTimes(t),i=a.ActorRdfJoin.getRequestItemTimes(t),o=[...r],s=[...n],c=[...i];if(o.splice(0,1),s.splice(0,1),c.splice(0,1),o.some((e=>!this.canBindWithOperation(e.operation))))throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);if(o.some((e=>e.operationModified)))throw new Error(`Actor ${this.name} can not be used over remaining entries with modified operations`);if(t[0].cardinality.value*this.minMaxCardinalityRatio>Math.max(...t.map((e=>e.cardinality.value))))throw new Error(`Actor ${this.name} can only run if the smallest stream is much smaller than largest stream`);const u=await Promise.all(o.map((async t=>(await this.mediatorJoinSelectivity.mediate({entries:[r[0],t],context:e.context})).selectivity*this.selectivityModifier))),l=o.map(((e,t)=>e.metadata.cardinality.value*u[t])).reduce(((e,t)=>e+t),0),d=s.reduce(((e,t)=>e+t),0),p=c.reduce(((e,t)=>e+t),0);return{iterations:t[0].cardinality.value*l,persistedItems:0,blockingItems:0,requestTime:n[0]+t[0].cardinality.value*(i[0]+d+l*p)}}}t.ActorRdfJoinMultiBind=u,u.FACTORY=new c.Factory},82331:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(38752),t)},42548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiEmpty=void 0;const n=r(32353),i=r(72394),a=r(76664);class o extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-empty",canHandleUndefs:!0})}async test(e){if((await n.ActorRdfJoin.getMetadatas(e.entries)).every((e=>n.ActorRdfJoin.getCardinality(e).value>0)))throw new Error(`Actor ${this.name} can only join entries where at least one is empty`);return super.test(e)}async getOutput(e){for(const t of e.entries)t.output.bindingsStream.close();return{result:{bindingsStream:new a.ArrayIterator([],{autoStart:!1}),metadata:async()=>({state:new i.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:n.ActorRdfJoin.joinVariables(await n.ActorRdfJoin.getMetadatas(e.entries))}),type:"bindings"}}}async getJoinCoefficients(e,t){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}t.ActorRdfJoinMultiEmpty=o},85345:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(42548),t)},82314:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiSmallestFilterBindings=void 0;const n=r(91674),i=r(59510),a=r(32353),o=r(32227),s=r(76664),c=r(31578);class u extends a.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-smallest-filter-bindings",limitEntries:2,limitEntriesMin:!0,isLeaf:!1})}async sortJoinEntries(e,t){let{entries:r}=await this.mediatorJoinEntriesSort.mediate({entries:e,context:t});r=r.sort(((e,t)=>e.operationModified&&!t.operationModified?-1:0));const n=r.splice(0,1)[0];let i,a=-1,o=0;for(const[e,t]of r.entries()){const r=n.metadata.variables.filter((e=>t.metadata.variables.some((t=>e.equals(t))))).length;(!i||r>o||r===o&&(t.metadata.variables.lengthc.metadata.variables.some((t=>e.equals(t))))),h={},f=d.clone().map((e=>e.filter(((e,t)=>p.some((e=>e.equals(t))))))).filter((e=>{const t=(0,n.bindingsToString)(e);return!(t in h)&&(h[t]=!0)})),y=new a.ChunkedIterator(f,this.blockSize,{autoStart:!1}),g=i.ActorQueryOperation.getOperationSource(c.operation),m={output:{type:"bindings",bindingsStream:new s.UnionIterator(y.map((t=>g.source.queryBindings(c.operation,g.context?e.context.merge(g.context):e.context,{filterBindings:{bindings:t,metadata:r.metadata}})))),metadata:c.output.metadata},operation:c.operation,operationModified:!0};c.output.bindingsStream.destroy();const b={output:i.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:e.type,entries:[r,m],context:e.context.set(o.KeysRdfJoin.lastPhysicalJoin,this.physicalName)})),operation:u.FACTORY.createJoin([r.operation,m.operation],!1),operationModified:!0},v=l;return v.unshift(b),{result:await this.mediatorJoin.mediate({type:e.type,entries:v,context:e.context}),physicalPlanMetadata:{firstIndex:t.indexOf(r),secondIndex:t.indexOf(c)}}}async getJoinCoefficients(e,t){if(e.context.get(o.KeysRdfJoin.lastPhysicalJoin)===this.physicalName)throw new Error(`Actor ${this.name} can not be called recursively`);t=[...t];const{first:r,second:n,remaining:s}=await this.sortJoinEntries(e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context),c=i.ActorQueryOperation.getOperationSource(n.operation);if(!c)throw new Error(`Actor ${this.name} can only process if entries[1] has a source`);const u=n.operation,l=await c.source.getSelectorShape(e.context);if(!i.ActorQueryOperation.doesShapeAcceptOperation(l,u,{filterBindings:!0}))throw new Error(`Actor ${this.name} can only process if entries[1] accept filterBindings`);t=[r.metadata,n.metadata,...s.map((e=>e.metadata))];const d=a.ActorRdfJoin.getRequestInitialTimes(t),p=a.ActorRdfJoin.getRequestItemTimes(t),{selectivity:h}=await this.mediatorJoinSelectivity.mediate({entries:[r,n],context:e.context}),f=s.reduce(((e,t)=>e*t.metadata.cardinality.value*this.selectivityModifier),1);return{iterations:h*this.selectivityModifier*n.metadata.cardinality.value*f,persistedItems:r.metadata.cardinality.value,blockingItems:r.metadata.cardinality.value,requestTime:d[0]+t[0].cardinality.value*p[0]+d[1]+f*p[1]}}}t.ActorRdfJoinMultiSmallestFilterBindings=u,u.FACTORY=new c.Factory},92107:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(82314),t)},17504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiSmallest=void 0;const n=r(59510),i=r(32353),a=r(31578);class o extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-smallest",limitEntries:3,limitEntriesMin:!0,canHandleUndefs:!0,isLeaf:!1})}async sortJoinEntries(e,t){return(await this.mediatorJoinEntriesSort.mediate({entries:e,context:t})).entries}async getOutput(e){const t=await this.sortJoinEntries(await i.ActorRdfJoin.getEntriesWithMetadatas([...e.entries]),e.context),r=t[0],a=t[1];t.splice(0,2);const s={output:n.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:e.type,entries:[r,a],context:e.context})),operation:o.FACTORY.createJoin([r.operation,a.operation],!1)};return t.push(s),{result:await this.mediatorJoin.mediate({type:e.type,entries:t,context:e.context})}}async getJoinCoefficients(e,t){t=[...t];const r=await this.sortJoinEntries(e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context);t=r.map((e=>e.metadata));const n=i.ActorRdfJoin.getRequestInitialTimes(t),a=i.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value*t[1].cardinality.value*t.slice(2).reduce(((e,t)=>e*t.cardinality.value),1),persistedItems:0,blockingItems:0,requestTime:n[0]+t[0].cardinality.value*a[0]+n[1]+t[1].cardinality.value*a[1]+t.slice(2).reduce(((e,t,r)=>e+n.slice(2)[r]+t.cardinality.value*a.slice(2)[r]),0)}}}t.ActorRdfJoinMultiSmallest=o,o.FACTORY=new a.Factory},68841:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(17504),t)},20743:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinNestedLoop=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"nested-loop",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){return{result:{type:"bindings",bindingsStream:new i.NestedLoopJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,n.ActorRdfJoin.joinBindings,{autoStart:!1}),metadata:async()=>await this.constructResultMetadata(e.entries,await n.ActorRdfJoin.getMetadatas(e.entries),e.context)}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value*t[1].cardinality.value,persistedItems:0,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinNestedLoop=a},37081:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(20743),t)},19421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinNone=void 0;const n=r(91674),i=r(32353),a=r(72394),o=r(76664);class s extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"none",limitEntries:0})}async test(e){if(e.entries.length>0)throw new Error(`Actor ${this.name} can only join zero entries`);return await this.getJoinCoefficients()}async getOutput(e){const t=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context);return{result:{bindingsStream:new o.ArrayIterator([t.bindings()],{autoStart:!1}),metadata:()=>Promise.resolve({state:new a.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}async getJoinCoefficients(){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}t.ActorRdfJoinNone=s},498:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(19421),t)},28178:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSingle=void 0;const n=r(32353);class i extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"single",limitEntries:1}),this.includeInLogs=!1}async test(e){if(1!==e.entries.length)throw new Error(`Actor ${this.name} can only join a single entry`);return await this.getJoinCoefficients()}async getOutput(e){return{result:e.entries[0].output}}async getJoinCoefficients(){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}t.ActorRdfJoinSingle=i},35848:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(28178),t)},19273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSymmetricHash=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"symmetric-hash",limitEntries:2,requiresVariableOverlap:!0})}async getOutput(e){const t=await n.ActorRdfJoin.getMetadatas(e.entries),r=n.ActorRdfJoin.overlappingVariables(t);return{result:{type:"bindings",bindingsStream:new i.SymmetricHashJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,(e=>a.hash(e,r)),n.ActorRdfJoin.joinBindings),metadata:async()=>await this.constructResultMetadata(e.entries,t,e.context)}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value+t[1].cardinality.value,persistedItems:t[0].cardinality.value+t[1].cardinality.value,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinSymmetricHash=a},77375:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(19273),t)},18014:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMinusHashUndef=void 0;const n=r(59510),i=r(32353),a=r(5985);class o extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"minus",physicalName:"hash-undef",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){const t=e.entries[1].output,r=e.entries[0].output,o=await i.ActorRdfJoin.getMetadatas(e.entries),s=i.ActorRdfJoin.overlappingVariables(o);if(s.length>0){const e=new a.BindingsIndex(s),i=new n.ClosableTransformIterator((async()=>(await new Promise((r=>{t.bindingsStream.on("data",(t=>e.add(t))),t.bindingsStream.on("end",r),t.bindingsStream.on("error",(e=>{i.emit("error",e)}))})),r.bindingsStream.filter((t=>!e.contains(t))))),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}});return{result:{type:"bindings",bindingsStream:i,async metadata(){const e=await r.metadata(),t=await r.metadata();return{...t,canContainUndefs:e.canContainUndefs||t.canContainUndefs}}}}}return t.bindingsStream.destroy(),{result:r}}async getJoinCoefficients(e,t){const r=i.ActorRdfJoin.getRequestInitialTimes(t),n=i.ActorRdfJoin.getRequestItemTimes(t);return{iterations:1.01*(t[0].cardinality.value+t[1].cardinality.value),persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:r[0]+t[0].cardinality.value*n[0]+r[1]+t[1].cardinality.value*n[1]}}}t.ActorRdfJoinMinusHashUndef=o},5985:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsIndex=void 0;const n=r(22112);class i{constructor(e){this.data={},this.keys=e}static hashTerm(e){return e&&"Variable"!==e.termType?(0,n.termToString)(e):""}add(e){if(this.isBindingsValid(e)){let t=this.data;for(const r of this.keys){const n=i.hashTerm(e.get(r));let a=t[n];a||(a=t[n]={}),t=a}}}contains(e){return!!this.isBindingsValid(e)&&this.containsRecursive(e,this.keys,[this.data])}isBindingsValid(e){let t=!1;for(const r of this.keys)if(e.get(r)){t=!0;break}return t}containsRecursive(e,t,r){if(0===t.length)return!0;let n;[n,...t]=t;for(const a of r){const r=i.hashTerm(e.get(n));if(r){const n=[a[r],a[""]].filter(Boolean);if(0===n.length)continue;if(this.containsRecursive(e,t,n))return!0}else{let r=Object.keys(a).map((e=>a[e]));if(0===r.length&&(r=[{}]),this.containsRecursive(e,t,r))return!0}}return!1}}t.BindingsIndex=i},98311:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(18014),t)},99917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMinusHash=void 0;const n=r(59510),i=r(32353);class a extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"minus",physicalName:"hash",limitEntries:2})}async getOutput(e){const t=e.entries[1].output,r=e.entries[0].output,a=await i.ActorRdfJoin.getMetadatas(e.entries),o=i.ActorRdfJoin.overlappingVariables(a);if(o.length>0){const e={},a=new n.ClosableTransformIterator((async()=>(await new Promise((r=>{t.bindingsStream.on("data",(t=>{e[i.ActorRdfJoin.hashNonClashing(t,o)]=!0})),t.bindingsStream.on("end",r),t.bindingsStream.on("error",(e=>{a.emit("error",e)}))})),r.bindingsStream.filter((t=>!e[i.ActorRdfJoin.hashNonClashing(t,o)])))),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}});return{result:{type:"bindings",bindingsStream:a,metadata:r.metadata}}}return t.bindingsStream.destroy(),{result:r}}async getJoinCoefficients(e,t){const r=i.ActorRdfJoin.getRequestInitialTimes(t),n=i.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value+t[1].cardinality.value,persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:r[0]+t[0].cardinality.value*n[0]+r[1]+t[1].cardinality.value*n[1]}}}t.ActorRdfJoinMinusHash=a},11688:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(99917),t)},46869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalBind=void 0;const n=r(82331),i=r(91674),a=r(59510),o=r(32353),s=r(32227),c=r(31578);class u extends o.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:"bind",limitEntries:2,canHandleUndefs:!0,isLeaf:!1})}async getOutput(e){const t=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context);e.entries[1].output.bindingsStream.close();const r=e.context.set(s.KeysQueryOperation.joinLeftMetadata,await e.entries[0].output.metadata()).set(s.KeysQueryOperation.joinRightMetadatas,[await e.entries[1].output.metadata()]);return{result:{type:"bindings",bindingsStream:n.ActorRdfJoinMultiBind.createBindStream(this.bindOrder,e.entries[0].output.bindingsStream,[e.entries[1].operation],(async(e,t)=>{const n=e[0];return a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:n,context:r?.set(s.KeysQueryOperation.joinBindings,t)})).bindingsStream}),!0,t),metadata:async()=>await this.constructResultMetadata(e.entries,await o.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0},!0)}}}async getJoinCoefficients(e,t){if(0===o.ActorRdfJoin.overlappingVariables(t).length)throw new Error(`Actor ${this.name} only join entries with at least one common variable`);const r=o.ActorRdfJoin.getRequestInitialTimes(t),n=o.ActorRdfJoin.getRequestItemTimes(t);if(e.entries[1].operation.type===c.Algebra.types.EXTEND||e.entries[1].operation.type===c.Algebra.types.GROUP)throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);const i=(await this.mediatorJoinSelectivity.mediate({entries:e.entries,context:e.context})).selectivity*this.selectivityModifier;return{iterations:t[0].cardinality.value*t[1].cardinality.value*i,persistedItems:0,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*(n[0]+r[1]+i*t[1].cardinality.value*n[1])}}}t.ActorRdfJoinOptionalBind=u},64305:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(46869),t)},75015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalHash=void 0;const n=r(59510),i=r(32353),a=r(76664),o=r(22112),s=r(66561),c=r(27900);class u extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:`hash-${e.canHandleUndefs?"undef":"def"}-${e.blocking?"blocking":"nonblocking"}`,limitEntries:2,canHandleUndefs:e.canHandleUndefs,requiresVariableOverlap:!0})}static constructIndex(e,t){return e?new c.BindingsIndexUndef(t,(e=>e&&"Variable"!==e.termType?(0,o.termToString)(e):"")):new s.BindingsIndexDef(t,i.ActorRdfJoin.hashNonClashing)}async getOutput(e){const t=e.entries[1].output,r=e.entries[0].output,o=await i.ActorRdfJoin.getMetadatas(e.entries),s=i.ActorRdfJoin.overlappingVariables(o);let c;return c=this.blocking?new n.ClosableTransformIterator((async()=>{const e=u.constructIndex(this.canHandleUndefs,s);return await new Promise((r=>{t.bindingsStream.on("data",(t=>{(e.getFirst(t)??e.put(t,[])).push(t)})),t.bindingsStream.on("end",r),t.bindingsStream.on("error",(e=>{c.emit("error",e)}))})),new a.MultiTransformIterator(r.bindingsStream,{multiTransform:t=>new a.ArrayIterator(e.get(t).flat().map((e=>i.ActorRdfJoin.joinBindings(t,e))).filter((e=>null!==e)),{autoStart:!1}),optional:!0,autoStart:!1})}),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}}):new n.ClosableTransformIterator((async()=>{const e=u.constructIndex(this.canHandleUndefs,s);let n=!0;return t.bindingsStream.on("data",(t=>{(e.getFirst(t)??e.put(t,new a.BufferedIterator({autoStart:!1})))._push(t)})),t.bindingsStream.on("end",(()=>{for(const t of e.values())t.close();n=!1})),t.bindingsStream.on("error",(e=>{c.emit("error",e)})),new a.MultiTransformIterator(r.bindingsStream,{multiTransform:t=>{let r=e.get(t);return 0===r.length&&(r=n?[e.put(t,new a.BufferedIterator({autoStart:!1}))]:[]),new a.UnionIterator(r.map((e=>e.clone())),{autoStart:!1}).map((e=>i.ActorRdfJoin.joinBindings(t,e)))},optional:!0,autoStart:!1})}),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}}),{result:{type:"bindings",bindingsStream:c,metadata:async()=>await this.constructResultMetadata(e.entries,await i.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0},!0)}}}async getJoinCoefficients(e,t){const r=i.ActorRdfJoin.getRequestInitialTimes(t),n=i.ActorRdfJoin.getRequestItemTimes(t);let a=t[0].cardinality.value+t[1].cardinality.value;return this.canHandleUndefs||(a*=.8),this.blocking&&(a*=.9),{iterations:a,persistedItems:t[0].cardinality.value,blockingItems:this.blocking?t[0].cardinality.value:0,requestTime:r[0]+t[0].cardinality.value*n[0]+r[1]+t[1].cardinality.value*n[1]}}}t.ActorRdfJoinOptionalHash=u},66561:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsIndexDef=void 0,t.BindingsIndexDef=class{constructor(e,t){this.keys=e,this.hashFn=t,this.index={}}put(e,t){return this.index[this.hashFn(e,this.keys)]=t}get(e){const t=this.getFirst(e);return t?[t]:[]}getFirst(e){return this.index[this.hashFn(e,this.keys)]}values(){return Object.values(this.index)}}},27900:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsIndexUndef=void 0,t.BindingsIndexUndef=class{constructor(e,t){this.data={},this.keys=e,this.hashFn=t}put(e,t){if(this.isBindingsValid(e)){let r=this.data;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalNestedLoop=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:"nested-loop",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){return{result:{type:"bindings",bindingsStream:new i.NestedLoopJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,n.ActorRdfJoin.joinBindings,{optional:!0,autoStart:!1}),metadata:async()=>await this.constructResultMetadata(e.entries,await n.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0},!0)}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value*t[1].cardinality.value,persistedItems:0,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinOptionalNestedLoop=a},9391:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(67757),t)},7218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoinTypes=t.ActorRdfJoinSelectivityVariableCounting=void 0;const n=r(75245),i=r(31578);class a extends n.ActorRdfJoinSelectivity{constructor(e){super(e)}async test(e){return{accuracy:.5}}static getPatternCost(e){let t=1;return"Variable"===e.subject.termType&&(t+=4),"Variable"!==e.predicate.termType&&e.type!==i.Algebra.types.PATH||(t+=1),"Variable"===e.object.termType&&(t+=2),"Variable"===e.graph.termType&&(t+=1),t/9}static getJoinTypes(e,t){const r=[];return"Variable"===e.subject.termType?(e.subject.equals(t.subject)&&r.push(o.unboundSS),"pattern"===t.type&&e.subject.equals(t.predicate)&&r.push(o.unboundSP),e.subject.equals(t.object)&&r.push(o.unboundSO),e.subject.equals(t.graph)&&r.push(o.unboundSG)):(e.subject.equals(t.subject)&&r.push(o.boundSS),"pattern"===t.type&&e.subject.equals(t.predicate)&&r.push(o.boundSP),e.subject.equals(t.object)&&r.push(o.boundSO),e.subject.equals(t.graph)&&r.push(o.boundSG)),"pattern"===e.type&&("Variable"===e.predicate.termType?(e.predicate.equals(t.subject)&&r.push(o.unboundPS),"pattern"===t.type&&e.predicate.equals(t.predicate)&&r.push(o.unboundPP),e.predicate.equals(t.object)&&r.push(o.unboundPO),e.predicate.equals(t.graph)&&r.push(o.unboundPG)):(e.predicate.equals(t.subject)&&r.push(o.boundPS),"pattern"===t.type&&e.predicate.equals(t.predicate)&&r.push(o.boundPP),e.predicate.equals(t.object)&&r.push(o.boundPO),e.predicate.equals(t.graph)&&r.push(o.boundPG))),"Variable"===e.object.termType?(e.object.equals(t.subject)&&r.push(o.unboundOS),"pattern"===t.type&&e.object.equals(t.predicate)&&r.push(o.unboundOP),e.object.equals(t.object)&&r.push(o.unboundOO),e.object.equals(t.graph)&&r.push(o.unboundOG)):(e.object.equals(t.subject)&&r.push(o.boundOS),"pattern"===t.type&&e.object.equals(t.predicate)&&r.push(o.boundOP),e.object.equals(t.object)&&r.push(o.boundOO),e.object.equals(t.graph)&&r.push(o.boundOG)),"Variable"===e.graph.termType?(e.graph.equals(t.subject)&&r.push(o.unboundGS),"pattern"===t.type&&e.graph.equals(t.predicate)&&r.push(o.unboundGP),e.graph.equals(t.object)&&r.push(o.unboundGO),e.graph.equals(t.graph)&&r.push(o.unboundGG)):(e.graph.equals(t.subject)&&r.push(o.boundGS),"pattern"===t.type&&e.graph.equals(t.predicate)&&r.push(o.boundGP),e.graph.equals(t.object)&&r.push(o.boundGO),e.graph.equals(t.graph)&&r.push(o.boundGG)),r}static getOperationsPairwiseJoinCost(e,t){let r=a.MAX_PAIRWISE_COST;for(const n of a.getJoinTypes(e,t))switch(n){case o.boundSS:r-=4;break;case o.boundSP:r-=6;break;case o.boundSO:r-=2;break;case o.boundSG:case o.boundPS:r-=6;break;case o.boundPP:return 1;case o.boundPO:case o.boundPG:r-=6;break;case o.boundOS:r-=2;break;case o.boundOP:r-=6;break;case o.boundOO:r-=2;break;case o.boundOG:case o.boundGS:case o.boundGP:case o.boundGO:case o.boundGG:r-=6;break;case o.unboundSS:r-=2;break;case o.unboundSP:r-=3;break;case o.unboundSO:r-=1;break;case o.unboundSG:case o.unboundPS:case o.unboundPP:case o.unboundPO:case o.unboundPG:r-=3;break;case o.unboundOS:r-=1;break;case o.unboundOP:r-=3;break;case o.unboundOO:r-=1;break;case o.unboundOG:case o.unboundGS:case o.unboundGP:case o.unboundGO:case o.unboundGG:r-=3}return r/a.MAX_PAIRWISE_COST}static getOperationsJoinCost(e){const t=[];for(const r of e)i.Util.recurseOperation(r,{[i.Algebra.types.PATTERN]:e=>(t.push(e),!1),[i.Algebra.types.PATH]:e=>(t.push(e),!1)});let r=0,n=0;for(const e of t)for(const i of t)e!==i&&(r+=a.getOperationsPairwiseJoinCost(e,i),n++);return 0===n?1:r/n*t.reduce(((e,t)=>e*a.getPatternCost(t)),1)}async run(e){return e.entries.length<=1?{selectivity:1}:{selectivity:a.getOperationsJoinCost(e.entries.map((e=>e.operation)))}}}var o;t.ActorRdfJoinSelectivityVariableCounting=a,a.MAX_PAIRWISE_COST=82,function(e){e[e.boundSS=0]="boundSS",e[e.boundSP=1]="boundSP",e[e.boundSO=2]="boundSO",e[e.boundSG=3]="boundSG",e[e.boundPS=4]="boundPS",e[e.boundPP=5]="boundPP",e[e.boundPO=6]="boundPO",e[e.boundPG=7]="boundPG",e[e.boundOS=8]="boundOS",e[e.boundOP=9]="boundOP",e[e.boundOO=10]="boundOO",e[e.boundOG=11]="boundOG",e[e.boundGS=12]="boundGS",e[e.boundGP=13]="boundGP",e[e.boundGO=14]="boundGO",e[e.boundGG=15]="boundGG",e[e.unboundSS=16]="unboundSS",e[e.unboundSP=17]="unboundSP",e[e.unboundSO=18]="unboundSO",e[e.unboundSG=19]="unboundSG",e[e.unboundPS=20]="unboundPS",e[e.unboundPP=21]="unboundPP",e[e.unboundPO=22]="unboundPO",e[e.unboundPG=23]="unboundPG",e[e.unboundOS=24]="unboundOS",e[e.unboundOP=25]="unboundOP",e[e.unboundOO=26]="unboundOO",e[e.unboundOG=27]="unboundOG",e[e.unboundGS=28]="unboundGS",e[e.unboundGP=29]="unboundGP",e[e.unboundGO=30]="unboundGO",e[e.unboundGG=31]="unboundGG"}(o||(t.JoinTypes=o={}))},16703:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(7218),t)},66479:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulateCanContainUndefs=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){if("initialize"===e.mode)return{metadata:{canContainUndefs:!1}};let t=e.accumulatedMetadata.canContainUndefs;return e.appendingMetadata.canContainUndefs&&(t=!0),{metadata:{canContainUndefs:t}}}}t.ActorRdfMetadataAccumulateCanContainUndefs=i},27988:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(66479),t)},80547:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulateCardinality=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){if("initialize"===e.mode)return{metadata:{cardinality:{type:"exact",value:0}}};const t={...e.accumulatedMetadata.cardinality};if(t.dataset){if(!e.appendingMetadata.cardinality.dataset)return{metadata:{cardinality:t}};if(t.dataset!==e.appendingMetadata.cardinality.dataset&&e.appendingMetadata.subsetOf===t.dataset)return{metadata:{cardinality:e.appendingMetadata.cardinality}};if(t.dataset===e.appendingMetadata.cardinality.dataset)return{metadata:{cardinality:t}};delete t.dataset}return e.appendingMetadata.cardinality&&Number.isFinite(e.appendingMetadata.cardinality.value)?("estimate"===e.appendingMetadata.cardinality.type&&(t.type="estimate"),t.value+=e.appendingMetadata.cardinality.value):(t.type="estimate",t.value=Number.POSITIVE_INFINITY),{metadata:{cardinality:t}}}}t.ActorRdfMetadataAccumulateCardinality=i},67243:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(80547),t)},15881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulatePageSize=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){return"initialize"===e.mode?{metadata:{}}:{metadata:{..."pageSize"in e.accumulatedMetadata||"pageSize"in e.appendingMetadata?{pageSize:(e.accumulatedMetadata.pageSize??0)+(e.appendingMetadata.pageSize??0)}:{}}}}}t.ActorRdfMetadataAccumulatePageSize=i},91475:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(15881),t)},68951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulateRequestTime=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){return"initialize"===e.mode?{metadata:{}}:{metadata:{..."requestTime"in e.accumulatedMetadata||"requestTime"in e.appendingMetadata?{requestTime:(e.accumulatedMetadata.requestTime??0)+(e.appendingMetadata.requestTime??0)}:{}}}}}t.ActorRdfMetadataAccumulateRequestTime=i},26719:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(68951),t)},85702:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAll=void 0;const n=r(52628),i=r(58521);class a extends n.ActorRdfMetadata{constructor(e){super(e)}async test(e){return!0}async run(e){const t=new i.Readable({objectMode:!0}),r=new i.Readable({objectMode:!0});e.quads.on("error",(e=>{t.emit("error",e),r.emit("error",e)})),e.quads.on("end",(()=>{t.push(null),r.push(null)}));const n=t._read=r._read=i=>{for(;i>0;){const a=e.quads.read();if(null===a)return e.quads.once("readable",(()=>n(i)));i--,t.push(a),r.push(a)}};return{data:t,metadata:r}}}t.ActorRdfMetadataAll=a},64443:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(85702),t)},94425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractAllowHttpMethods=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){const t={};return e.headers?.get("allow")&&(t.allowHttpMethods=e.headers.get("allow")?.split(/, */u)),{metadata:t}}}t.ActorRdfMetadataExtractAllowHttpMethods=i},40751:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(94425),t)},30066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractHydraControls=void 0;const n=r(10800),i=r(68492);class a extends n.ActorRdfMetadataExtract{constructor(e){super(e),this.parsedUriTemplateCache={}}async test(e){return!0}getLinks(e,t){return Object.fromEntries(a.LINK_TYPES.map((r=>{const n=t[r]||t[`${r}Page`],i=n&&n[e];return[r,i&&i.length>0?[i[0]]:[]]})))}parseUriTemplateCached(e){return this.parsedUriTemplateCache[e]||(this.parsedUriTemplateCache[e]=(0,i.parse)(e))}getSearchForms(e){const t=e.search,r=[];if(t)for(const n in t)for(const i of t[n]){const t=(e.template||{})[i]||[];if(1!==t.length)throw new Error(`Expected 1 hydra:template for ${i}`);const a=t[0],o=this.parseUriTemplateCached(a),s=Object.fromEntries(((e.mapping||{})[i]||[]).map((t=>{const r=((e.variable||{})[t]||[])[0],n=((e.property||{})[t]||[])[0];if(!r)throw new Error(`Expected a hydra:variable for ${t}`);if(!n)throw new Error(`Expected a hydra:property for ${t}`);return[n,r]}))),c=e=>o.expand(Object.fromEntries(Object.keys(e).map((t=>[s[t],e[t]]))));r.push({dataset:n,template:a,mappings:s,getUri:c})}return{values:r}}getHydraProperties(e){return new Promise(((t,r)=>{e.on("error",r);const n={};e.on("data",(e=>{if(e.predicate.value.startsWith(a.HYDRA)){const t=e.predicate.value.slice(a.HYDRA.length),r=n[t]||(n[t]={});(r[e.subject.value]||(r[e.subject.value]=[])).push(e.object.value)}})),e.on("end",(()=>t(n)))}))}async run(e){const t={},r=await this.getHydraProperties(e.metadata);return Object.assign(t,this.getLinks(e.url,r)),t.searchForms=this.getSearchForms(r),{metadata:t}}}t.ActorRdfMetadataExtractHydraControls=a,a.HYDRA="http://www.w3.org/ns/hydra/core#",a.LINK_TYPES=["first","next","previous","last"]},85405:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(30066),t)},68714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractHydraCount=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}run(e){return new Promise(((t,r)=>{e.metadata.on("error",r),e.metadata.on("data",(e=>{this.predicates.includes(e.predicate.value)&&t({metadata:{cardinality:{type:"estimate",value:Number.parseInt(e.object.value,10),dataset:e.subject.value}}})})),e.metadata.on("end",(()=>{t({metadata:{cardinality:{type:"estimate",value:0}}})}))}))}}t.ActorRdfMetadataExtractHydraCount=i},57586:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(68714),t)},77690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractHydraPagesize=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return new Promise(((t,r)=>{e.metadata.on("error",r),e.metadata.on("data",(e=>{this.predicates.includes(e.predicate.value)&&t({metadata:{pageSize:Number.parseInt(e.object.value,10)}})})),e.metadata.on("end",(()=>{t({metadata:{}})}))}))}}t.ActorRdfMetadataExtractHydraPagesize=i},54777:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(77690),t)},43875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractPatchSparqlUpdate=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){const t={};return(e.headers?.get("accept-patch")?.includes("application/sparql-update")??e.headers?.get("ms-author-via")?.includes("SPARQL"))&&(t.patchSparqlUpdate=!0),{metadata:t}}}t.ActorRdfMetadataExtractPatchSparqlUpdate=i},55282:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(43875),t)},86312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractPutAccepted=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){const t={};return e.headers?.get("accept-put")&&(t.putAccepted=e.headers.get("accept-put")?.split(/, */u)),{metadata:t}}}t.ActorRdfMetadataExtractPutAccepted=i},44549:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(86312),t)},66468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractRequestTime=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return{metadata:{requestTime:e.requestTime}}}}t.ActorRdfMetadataExtractRequestTime=i},7445:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(66468),t)},42214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractSparqlService=void 0;const n=r(10800),i=r(9929);class a extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return new Promise(((t,r)=>{e.metadata.on("error",r);const n={};e.metadata.on("data",(t=>{"http://www.w3.org/ns/sparql-service-description#endpoint"!==t.predicate.value||"BlankNode"!==t.subject.termType&&t.subject.value!==e.url?"http://www.w3.org/ns/sparql-service-description#defaultGraph"===t.predicate.value&&(n.defaultGraph=t.object.value):(n.sparqlService="Literal"===t.object.termType?(0,i.resolve)(t.object.value,e.url):t.object.value,this.inferHttpsEndpoint&&e.url.startsWith("https")&&!n.sparqlService.startsWith("https")&&(n.sparqlService=n.sparqlService.replace("http:","https:")))})),e.metadata.on("end",(()=>{t({metadata:n})}))}))}}t.ActorRdfMetadataExtractSparqlService=a},3187:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(42214),t)},82889:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataPrimaryTopic=void 0;const n=r(52628),i=r(58521);class a extends n.ActorRdfMetadata{constructor(e){super(e)}async test(e){if(e.triples)throw new Error("This actor only supports non-triple quad streams.");return!0}async run(e){const t=new i.Readable({objectMode:!0}),r=new i.Readable({objectMode:!0}),n=()=>{t._read=r._read=()=>{},e.quads.on("error",(e=>{t.emit("error",e),r.emit("error",e)}));const n={};let i;const a={};e.quads.on("data",(t=>{"http://rdfs.org/ns/void#subset"===t.predicate.value&&t.object.value===e.url?i=t.subject.value:"http://xmlns.com/foaf/0.1/primaryTopic"===t.predicate.value&&(a[t.object.value]=t.subject.value);let r=n[t.graph.value];r||(r=n[t.graph.value]=[]),r.push(t)})),e.quads.on("end",(()=>{const e=i?a[i]:void 0;for(const i in n)if(i===e){for(const e of n[i])r.push(e);if(this.metadataToData)for(const e of n[i])t.push(e)}else{for(const e of n[i])t.push(e);if(!e&&this.dataToMetadataOnInvalidMetadataGraph)for(const e of n[i])r.push(e)}t.push(null),r.push(null)}))};return t._read=r._read=()=>{n()},{data:t,metadata:r}}}t.ActorRdfMetadataPrimaryTopic=a},80848:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(82889),t)},99209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlMicrodata=void 0;const n=r(65446),i=r(5558);class a extends n.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.headers?e.headers.get("content-type"):null,r=t?.includes("xml"),n=new i.MicrodataRdfParser({baseIRI:e.baseIRI,xmlMode:r});n.on("error",e.error),n.on("data",e.emit);const a=n.onEnd;return n.onEnd=()=>{a.call(n),e.end()},{htmlParseListener:n}}}t.ActorRdfParseHtmlMicrodata=a},42421:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(99209),t)},39149:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlRdfa=void 0;const n=r(65446),i=r(21860);class a extends n.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.headers?e.headers.get("content-type"):null,r=(e.headers&&e.headers.get("content-language"))??void 0,n=t&&t.includes("xml")?"xhtml":"html",a=new i.RdfaParser({baseIRI:e.baseIRI,profile:n,language:r});a.on("error",e.error),a.on("data",e.emit);const o=a.onEnd;return a.onEnd=()=>{o.call(a),e.end()},{htmlParseListener:a}}}t.ActorRdfParseHtmlRdfa=a},26585:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(39149),t)},42601:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlScript=void 0;const n=r(65446),i=r(14107);class a extends n.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=(await this.mediatorRdfParseMediatypes.mediate({context:e.context,mediaTypes:!0})).mediaTypes;return{htmlParseListener:new i.HtmlScriptListener(this.mediatorRdfParseHandle,e.emit,e.error,e.end,t,e.context,e.baseIRI,e.headers)}}}t.ActorRdfParseHtmlScript=a},14107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlScriptListener=void 0;const n=r(32227),i=r(58521),a=r(9929);class o{constructor(e,t,r,i,a,o,s,c){this.textChunksJsonLd=[],this.endBarrier=1,this.passedScripts=0,this.isFinalJsonLdProcessing=!1,this.mediatorRdfParseHandle=e,this.cbQuad=t,this.cbError=r,this.cbEnd=i,this.supportedTypes=a,this.context=o.set(n.KeysRdfParseHtmlScript.processingHtmlScript,!0),this.baseIRI=s,this.headers=c,this.onlyFirstScript=!1===o.get(n.KeysRdfParseHtmlScript.extractAllScripts);const u=this.baseIRI.indexOf("#");this.targetScriptId=u>0?this.baseIRI.slice(u+1,this.baseIRI.length):null}static newErrorCoded(e,t){const r=new Error(e);return r.code=t,r}onEnd(){0==--this.endBarrier&&(this.textChunksJsonLd.length>0?(this.handleMediaType="application/ld+json",this.textChunks=this.textChunksJsonLd,this.textChunks.push("]"),this.textChunksJsonLd=[],this.isFinalJsonLdProcessing=!0,this.endBarrier++,this.onTagClose()):(0===this.passedScripts&&this.targetScriptId&&this.cbError(o.newErrorCoded(`Failed to find targeted script id "${this.targetScriptId}"`,"loading document failed")),this.cbEnd()),this.isFinalJsonLdProcessing=!1)}onTagClose(){if(this.handleMediaType)if(this.requiresCustomJsonLdHandling(this.handleMediaType)&&!this.isFinalJsonLdProcessing)this.handleMediaType=void 0,this.textChunks=void 0,this.onEnd();else{const e=new i.Readable({objectMode:!0});e._read=()=>{};const t=this.textChunks,r={context:this.context,handle:{metadata:{baseIRI:this.baseIRI},data:e,headers:this.headers,context:this.context},handleMediaType:this.handleMediaType};this.mediatorRdfParseHandle.mediate(r).then((({handle:r})=>{r.data.on("error",(e=>this.cbError(o.newErrorCoded(e.message,"invalid script element")))).on("data",this.cbQuad).on("end",(()=>this.onEnd()));for(const r of t)e.push(r);e.push(null)})).catch((e=>{this.targetScriptId?this.cbError(o.newErrorCoded(e.message,"loading document failed")):this.onEnd()})),this.handleMediaType=void 0,this.textChunks=void 0}}onTagOpen(e,t){"base"===e&&t.href&&(this.baseIRI=(0,a.resolve)(t.href,this.baseIRI)),"script"!==e||this.targetScriptId&&t.id!==this.targetScriptId?this.handleMediaType=void 0:this.supportedTypes[t.type]?this.onlyFirstScript&&this.passedScripts>0?this.handleMediaType=void 0:(this.passedScripts++,this.handleMediaType=t.type,this.endBarrier++,this.requiresCustomJsonLdHandling(this.handleMediaType)?(this.textChunks=this.textChunksJsonLd,this.textChunks.push(0===this.textChunks.length?"[":",")):this.textChunks=[]):this.targetScriptId&&this.cbError(o.newErrorCoded(`Targeted script "${this.targetScriptId}" does not have a supported type`,"loading document failed"))}onText(e){this.handleMediaType&&this.textChunks.push(e)}requiresCustomJsonLdHandling(e){return!this.onlyFirstScript&&!this.targetScriptId&&"application/ld+json"===e}}t.HtmlScriptListener=o},3549:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(42601),t)},70256:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtml=void 0;const n=r(54592),i=r(41173),a=r(58521);class o extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=new a.Readable({objectMode:!0});n._read=()=>{};let o=0,s=1;function c(e){n.emit("error",e)}function u(){0==--s&&n.push(null)}const l={baseIRI:e.metadata?.baseIRI??"",context:r,emit:e=>{o--,n.push(e)},end:u,error:c,headers:e.headers};try{const t=await Promise.all(this.busRdfParseHtml.publish(l));s+=t.length;const r=[];for(const e of t){const{htmlParseListener:t}=await e.actor.run(l);r.push(t)}const a=new i.Parser({onclosetag(){try{for(const e of r)e.onTagClose()}catch(e){c(e)}},onend(){try{for(const e of r)e.onEnd()}catch(e){c(e)}u()},onopentag(e,t){try{for(const n of r)n.onTagOpen(e,t)}catch(e){c(e)}},ontext(e){try{for(const t of r)t.onText(e)}catch(e){c(e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:!1}),d=n._read=t=>{for(o=Math.max(t,o);o>0;){const t=e.data.read();if(null===t)return void e.data.once("readable",(()=>d(0)));a.write(t.toString())}};e.data.on("error",c).on("end",(()=>a.end()))}catch(e){setTimeout((()=>{n.emit("error",e)}))}return{data:n}}}t.ActorRdfParseHtml=o},28955:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(70256),t)},61364:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseJsonLd=void 0;const n=r(54592),i=r(32227),a=r(50631),o=r(11817);class s extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async testHandle(e,t,r){if(r.has(i.KeysRdfParseHtmlScript.processingHtmlScript)&&"application/ld+json"!==t)throw new Error("JSON-LD in script tags can only have media type 'application/ld+json'");if(!t||!(t in this.mediaTypePriorities)&&!t.endsWith("+json"))throw new Error(`Unrecognized media type: ${t}`);return await this.testHandleChecked(e)}async runHandle(e,t,r){return{data:a.JsonLdParser.fromHttpResponse(e.metadata?.baseIRI??"",t,e.headers,{documentLoader:r.get(i.KeysRdfParseJsonLd.documentLoader)??new o.DocumentLoaderMediated(this.mediatorHttp,r),strictValues:r.get(i.KeysRdfParseJsonLd.strictValues),...r.get(i.KeysRdfParseJsonLd.parserOptions)}).import(e.data)}}}t.ActorRdfParseJsonLd=s},11817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLoaderMediated=void 0;const n=r(74870),i=r(31759),a=r(27202);class o extends a.FetchDocumentLoader{constructor(e,t){super(o.createFetcher(e,t)),this.mediatorHttp=e,this.context=t}static createFetcher(e,t){return async(r,a)=>{const o=await e.mediate({input:r,init:a,context:t});return o.json=async()=>JSON.parse(await(0,i.stringify)(n.ActorHttp.toNodeReadable(o.body))),o}}}t.DocumentLoaderMediated=o},54168:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(61364),t),i(r(11817),t)},20164:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseN3=void 0;const n=r(54592),i=r(72243);class a extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){e.data.on("error",(e=>n.emit("error",e)));const n=e.data.pipe(new i.StreamParser({baseIRI:e.metadata?.baseIRI,format:t.endsWith("n3")?t:`${t}*`}));return{data:n,metadata:{triples:"text/turtle"===t||"application/n-triples"===t||"text/n3"===t}}}}t.ActorRdfParseN3=a},62917:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(20164),t)},61536:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseRdfXml=void 0;const n=r(54592),i=r(97990);class a extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e){e.data.on("error",(e=>t.emit("error",e)));const t=e.data.pipe(new i.RdfXmlParser({baseIRI:e.metadata?.baseIRI}));return{data:t,metadata:{triples:!0}}}}t.ActorRdfParseRdfXml=a},21487:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(61536),t)},62940:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseShaclc=void 0;const n=r(54592),i=r(31759),a=r(58521),o=r(21762),s=r(76268);class c extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=new s.PrefixWrappingIterator((0,i.stringify)(e.data).then((r=>(0,o.parse)(r,{extendedSyntax:"text/shaclc-ext"===t,baseIRI:e.metadata?.baseIRI})))),c=new a.Readable({objectMode:!0});return n.on("prefix",((...e)=>c.emit("prefix",...e))),{data:c.wrap(n),metadata:{triples:!0}}}}t.ActorRdfParseShaclc=c},76268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrefixWrappingIterator=void 0;const n=r(76664);class i extends n.WrappingIterator{constructor(e){super(e?.then((e=>(this.prefixes=e.prefixes,e))))}read(){if(this.prefixes){for(const e of Object.entries(this.prefixes))this.emit("prefix",...e);delete this.prefixes}return super.read()}}t.PrefixWrappingIterator=i},43352:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(62940),t)},91689:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseXmlRdfa=void 0;const n=r(54592),i=r(21860);class a extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=(e.headers&&e.headers.get("content-language"))??void 0;e.data.on("error",(e=>a.emit("error",e)));const a=e.data.pipe(new i.RdfaParser({baseIRI:e.metadata?.baseIRI,profile:"xml",language:n}));return{data:a,metadata:{triples:!0}}}}t.ActorRdfParseXmlRdfa=a},8137:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(91689),t)},43476:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinksNext=void 0;const n=r(22124);class i extends n.ActorRdfResolveHypermediaLinks{constructor(e){super(e)}async test(e){if(!e.metadata.next||0===e.metadata.next.length)throw new Error(`Actor ${this.name} requires a 'next' metadata entry.`);return!0}async run(e){return{links:e.metadata.next.map((e=>({url:e})))}}}t.ActorRdfResolveHypermediaLinksNext=i},34541:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(43476),t)},18553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinksQueueFifo=void 0;const n=r(56102),i=r(7381);class a extends n.ActorRdfResolveHypermediaLinksQueue{constructor(e){super(e)}async test(e){return!0}async run(e){return{linkQueue:new i.LinkQueueFifo}}}t.ActorRdfResolveHypermediaLinksQueueFifo=a},7381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkQueueFifo=void 0,t.LinkQueueFifo=class{constructor(){this.links=[]}push(e){return this.links.push(e),!0}getSize(){return this.links.length}isEmpty(){return 0===this.links.length}pop(){return this.links.shift()}peek(){return this.links[0]}}},34120:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(18553),t),i(r(7381),t)},63986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeJsonLd=void 0;const n=r(84025),i=r(85832);class a extends n.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=new i.JsonLdSerializer({space:" ".repeat(this.jsonStringifyIndentSpaces)});let a;return"pipe"in e.quadStream?(e.quadStream.on("error",(e=>n.emit("error",e))),a=e.quadStream.pipe(n)):a=n.import(e.quadStream),{data:a}}}t.ActorRdfSerializeJsonLd=a},21935:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(63986),t)},34574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeN3=void 0;const n=r(84025),i=r(72243);class a extends n.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t){const r=new i.StreamWriter({format:t});let n;return"pipe"in e.quadStream?(e.quadStream.on("error",(e=>r.emit("error",e))),n=e.quadStream.pipe(r)):n=r.import(e.quadStream),{data:n,triples:"text/turtle"===t||"application/n-triples"===t||"text/n3"===t}}}t.ActorRdfSerializeN3=a},28510:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(34574),t)},80614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeShaclc=void 0;const n=r(84025),i=r(37754),a=r(58521),o=r(22939);class s extends n.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t){const r=new a.Readable;r._read=()=>{};try{const n={};e.quadStream.on("prefix",((e,t)=>{n[e]=t}));const{text:a}=await(0,o.write)(await(0,i.default)(e.quadStream),{errorOnUnused:!0,extendedSyntax:"text/shaclc-ext"===t,prefixes:n});r.push(a),r.push(null)}catch(e){r._read=()=>{r.emit("error",e)}}return{data:r,triples:!0}}}t.ActorRdfSerializeShaclc=s},49343:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(80614),t)},60927:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermediaPatchSparqlUpdate=void 0;const n=r(25345),i=r(92168);class a extends n.ActorRdfUpdateHypermedia{constructor(e){super(e,"patchSparqlUpdate")}async testMetadata(e){if(!e.forceDestinationType&&!e.metadata.patchSparqlUpdate)throw new Error(`Actor ${this.name} could not detect a destination with 'application/sparql-update' as 'Accept-Patch' header.`);if(!e.forceDestinationType&&!e.exists)throw new Error(`Actor ${this.name} can only patch a destination that already exists.`);return!0}async run(e){return this.logInfo(e.context,`Identified as patchSparqlUpdate destination: ${e.url}`),{destination:new i.QuadDestinationPatchSparqlUpdate(e.url,e.context,this.mediatorHttp)}}}t.ActorRdfUpdateHypermediaPatchSparqlUpdate=a},92168:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuadDestinationPatchSparqlUpdate=void 0;const n=r(74870),i=r(10288),a=r(64817),o=r(58521);t.QuadDestinationPatchSparqlUpdate=class{constructor(e,t,r){this.url=e,this.context=t,this.mediatorHttp=r}insert(e){return this.wrapSparqlUpdateRequest("INSERT",e)}async delete(e){return this.wrapSparqlUpdateRequest("DELETE",e)}async wrapSparqlUpdateRequest(e,t){const r=t.map((e=>{let t=`${(0,a.termToString)(e.subject)} ${(0,a.termToString)(e.predicate)} ${(0,a.termToString)(e.object)} .`;return t="DefaultGraph"===e.graph.termType?` ${t}\n`:` GRAPH ${(0,a.termToString)(e.graph)} { ${t} }\n`,t})).prepend([`${e} DATA {\n`]).append(["}"]),s=new o.Readable;s.wrap(r);const c=new i.Headers({"content-type":"application/sparql-update"}),u=await this.mediatorHttp.mediate({context:this.context,init:{headers:c,method:"PATCH",body:n.ActorHttp.toWebReadableStream(s)},input:this.url});await(0,n.validateAndCloseHttpResponse)(this.url,u)}async deleteGraphs(e,t,r){throw new Error("Patch-based SPARQL Update destinations don't support named graphs")}async createGraphs(e,t){throw new Error("Patch-based SPARQL Update destinations don't support named graphs")}}},87057:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(60927),t),i(r(92168),t)},26348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermediaPutLdp=void 0;const n=r(25345),i=r(99713);class a extends n.ActorRdfUpdateHypermedia{constructor(e){super(e,"putLdp")}async testMetadata(e){if(!e.forceDestinationType){if(!e.metadata.allowHttpMethods||!e.metadata.allowHttpMethods.includes("PUT"))throw new Error(`Actor ${this.name} could not detect a destination with 'Allow: PUT' header.`);if(e.exists)throw new Error(`Actor ${this.name} can only put on a destination that does not already exists.`)}return!0}async run(e){return this.logInfo(e.context,`Identified as putLdp destination: ${e.url}`),{destination:new i.QuadDestinationPutLdp(e.url,e.context,e.metadata.putAccepted||[],this.mediatorHttp,this.mediatorRdfSerializeMediatypes,this.mediatorRdfSerialize)}}}t.ActorRdfUpdateHypermediaPutLdp=a},99713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuadDestinationPutLdp=void 0;const n=r(74870),i=r(10288);t.QuadDestinationPutLdp=class{constructor(e,t,r,n,i,a){this.url=e,this.context=t,this.mediaTypes=r,this.mediatorHttp=n,this.mediatorRdfSerializeMediatypes=i,this.mediatorRdfSerialize=a}insert(e){return this.wrapRdfUpdateRequest("INSERT",e)}async delete(e){throw new Error("Put-based LDP destinations don't support deletions")}async wrapRdfUpdateRequest(e,t){const{mediaTypes:r}=await this.mediatorRdfSerializeMediatypes.mediate({context:this.context,mediaTypes:!0}),a=this.mediaTypes.filter((e=>e in r)),o=a.length>0?a[0]:Object.keys(r).sort(((e,t)=>r[t]-r[e]))[0],{handle:{data:s}}=await this.mediatorRdfSerialize.mediate({context:this.context,handle:{quadStream:t,context:this.context},handleMediaType:o}),c=new i.Headers({"content-type":o}),u=await this.mediatorHttp.mediate({context:this.context,init:{headers:c,method:"PUT",body:n.ActorHttp.toWebReadableStream(s)},input:this.url});await(0,n.validateAndCloseHttpResponse)(this.url,u)}async deleteGraphs(e,t,r){throw new Error("Put-based LDP destinations don't support named graphs")}async createGraphs(e,t){throw new Error("Put-based LDP destinations don't support named graphs")}}},3047:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(26348),t),i(r(99713),t)},33179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermediaSparql=void 0;const n=r(25345),i=r(89084);class a extends n.ActorRdfUpdateHypermedia{constructor(e){super(e,"sparql")}async testMetadata(e){if(!(e.forceDestinationType||e.metadata.sparqlService||this.checkUrlSuffixSparql&&e.url.endsWith("/sparql")||this.checkUrlSuffixUpdate&&e.url.endsWith("/update")))throw new Error(`Actor ${this.name} could not detect a SPARQL service description or URL ending on /sparql or /update.`);return!0}async run(e){return this.logInfo(e.context,`Identified as sparql destination: ${e.url}`),{destination:new i.QuadDestinationSparql(e.metadata.sparqlService||e.url,e.context,this.mediatorHttp)}}}t.ActorRdfUpdateHypermediaSparql=a},89084:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuadDestinationSparql=void 0;const n=r(31759),i=r(74190),a=r(64817);t.QuadDestinationSparql=class{constructor(e,t,r){this.url=e,this.context=t,this.mediatorHttp=r,this.endpointFetcher=new i.SparqlEndpointFetcher({fetch:(e,t)=>this.mediatorHttp.mediate({input:e,init:t,context:this.context}),prefixVariableQuestionMark:!0})}insert(e){return this.wrapSparqlUpdateRequest("INSERT",e)}async delete(e){return this.wrapSparqlUpdateRequest("DELETE",e)}async wrapSparqlUpdateRequest(e,t){const r=t.map((e=>{let t=`${(0,a.termToString)(e.subject)} ${(0,a.termToString)(e.predicate)} ${(0,a.termToString)(e.object)} .`;return t="DefaultGraph"===e.graph.termType?` ${t}\n`:` GRAPH ${(0,a.termToString)(e.graph)} { ${t} }\n`,t})).prepend([`${e} DATA {\n`]).append(["}"]),i=await(0,n.stringify)(r);await this.endpointFetcher.fetchUpdate(this.url,i)}async deleteGraphs(e,t,r){const n=Array.isArray(e)?e:[e],i=[];for(const e of n){let n;n="string"==typeof e?e:"DefaultGraph"===e.termType?"DEFAULT":`GRAPH <${e.value}>`,i.push(`${r?"DROP":"CLEAR"} ${t?"":"SILENT "}${n}`)}await this.endpointFetcher.fetchUpdate(this.url,i.join("; "))}async createGraphs(e,t){const r=[];for(const n of e)r.push(`CREATE${t?"":" SILENT"} GRAPH <${n.value}>`);await this.endpointFetcher.fetchUpdate(this.url,r.join("; "))}}},58916:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(33179),t),i(r(89084),t)},24657:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsHypermedia=void 0;const n=r(86789),i=r(35069);class a extends n.ActorRdfUpdateQuadsDestination{constructor(e){super(e),this.cache=this.cacheSize?new i.LRUCache({max:this.cacheSize}):void 0;const t=this.cache;t&&this.httpInvalidator.addInvalidateListener((({url:e})=>e?t.delete(e):t.clear()))}async test(e){if(!(0,n.getContextDestinationUrl)((0,n.getContextDestination)(e.context)))throw new Error(`Actor ${this.name} can only update quads against a single destination URL.`);return!0}getDestination(e){const t=(0,n.getContextDestination)(e);let r=(0,n.getContextDestinationUrl)(t);if(this.cache&&this.cache.has(r))return this.cache.get(r);const i=(async()=>{let i,a;try{const t=await this.mediatorDereferenceRdf.mediate({context:e,url:r,acceptErrors:!0});a=t.exists,r=t.url;const n=await this.mediatorMetadata.mediate({context:e,url:r,quads:t.data,triples:t.metadata?.triples});i=(await this.mediatorMetadataExtract.mediate({context:e,url:r,metadata:n.metadata,headers:t.headers,requestTime:t.requestTime})).metadata}catch{i={},a=!1}const{destination:o}=await this.mediatorRdfUpdateHypermedia.mediate({context:e,url:r,metadata:i,exists:a,forceDestinationType:(0,n.getDataDestinationType)(t)});return o})();return this.cache&&this.cache.set(r,i),i}}t.ActorRdfUpdateQuadsHypermedia=a},88297:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(24657),t)},88332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsRdfJsStore=void 0;const n=r(86789),i=r(38268);class a extends n.ActorRdfUpdateQuadsDestination{constructor(e){super(e)}async test(e){const t=(0,n.getContextDestination)(e.context);if(!t||"string"==typeof t||!("remove"in t)&&"value"in t&&!t.value.remove)throw new Error(`${this.name} received an invalid rdfjsStore.`);return!0}async getDestination(e){const t=(0,n.getContextDestination)(e);return new i.RdfJsQuadDestination("remove"in t?t:t.value)}}t.ActorRdfUpdateQuadsRdfJsStore=a},38268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfJsQuadDestination=void 0;const n=r(35033),i=r(18050),a=r(22112),o=new i.DataFactory;t.RdfJsQuadDestination=class{constructor(e){this.store=e}delete(e){return(0,n.promisifyEventEmitter)(this.store.remove(e))}insert(e){return(0,n.promisifyEventEmitter)(this.store.import(e))}async deleteGraphs(e,t,r){switch(e){case"ALL":await(0,n.promisifyEventEmitter)(this.store.deleteGraph(o.defaultGraph()));case"NAMED":const t=this.store.match(),r={};t.on("data",(e=>{"DefaultGraph"!==e.graph.termType&&(r[(0,a.termToString)(e.graph)]=!0)})),await(0,n.promisifyEventEmitter)(t),await Promise.all(Object.keys(r).map((e=>(0,n.promisifyEventEmitter)(this.store.deleteGraph((0,a.stringToTerm)(e))))));break;default:for(const t of Array.isArray(e)?e:[e])await(0,n.promisifyEventEmitter)(this.store.deleteGraph(t))}}async createGraphs(e,t){if(t)for(const t of e){const e=this.store.match(void 0,void 0,void 0,t);await new Promise(((r,n)=>{e.once("data",(()=>{n(new Error(`Unable to create graph ${t.value} as it already exists`))})),e.on("end",r),e.on("error",n)}))}}}},76722:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(88332),t)},67526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bindings=void 0;const n=r(34368),i=r(6081),a=r(17070);class o{constructor(e,t,r){this.type="bindings",this.dataFactory=e,this.entries=t,this.contextHolder=r}has(e){return this.entries.has("string"==typeof e?e:e.value)}get(e){return this.entries.get("string"==typeof e?e:e.value)}set(e,t){return new o(this.dataFactory,this.entries.set("string"==typeof e?e:e.value,t),this.contextHolder)}delete(e){return new o(this.dataFactory,this.entries.delete("string"==typeof e?e:e.value),this.contextHolder)}keys(){return this.mapIterable(this.iteratorToIterable(this.entries.keys()),(e=>this.dataFactory.variable(e)))}values(){return this.iteratorToIterable(this.entries.values())}forEach(e){for(const[t,r]of this.entries.entries())e(r,this.dataFactory.variable(t))}get size(){return this.entries.size}[Symbol.iterator](){return this.mapIterable(this.iteratorToIterable(this.entries.entries()),(([e,t])=>[this.dataFactory.variable(e),t]))[Symbol.iterator]()}equals(e){if(!e)return!1;if(this===e)return!0;if(this.size!==e.size)return!1;for(const t of this.keys())if(!this.get(t)?.equals(e.get(t)))return!1;return!0}filter(e){return new o(this.dataFactory,(0,i.Map)(this.entries.filter(((t,r)=>e(t,this.dataFactory.variable(r))))),this.contextHolder)}map(e){return new o(this.dataFactory,(0,i.Map)(this.entries.map(((t,r)=>e(t,this.dataFactory.variable(r))))),this.contextHolder)}merge(e){const t=new Set([...this.iteratorToIterable(this.entries.keys()),...[...e.keys()].map((e=>e.value))]),r=[];for(const n of t){const t=this.entries.get(n),i=e.get(this.dataFactory.variable(n));if(t&&i&&!t.equals(i))return;const a=t||i;r.push([n,a])}return this.createBindingsWithContexts(r,e)}mergeWith(e,t){const r=new Set([...this.iteratorToIterable(this.entries.keys()),...[...t.keys()].map((e=>e.value))]),n=[];for(const i of r){const r=this.dataFactory.variable(i),a=this.entries.get(i),o=t.get(r);let s;s=a&&o&&!a.equals(o)?e(a,o,r):a||o,n.push([i,s])}return this.createBindingsWithContexts(n,t)}createBindingsWithContexts(e,t){if(this.contextHolder&&this.contextHolder.context){let r=this.contextHolder.context;return"contextHolder"in t&&t.contextHolder&&t.contextHolder.context&&(r=o.mergeContext(this.contextHolder.contextMergeHandlers,r,t.contextHolder.context)),new o(this.dataFactory,(0,i.Map)(e),{contextMergeHandlers:this.contextHolder.contextMergeHandlers,context:r})}return new o(this.dataFactory,(0,i.Map)(e),t.contextHolder)}static mergeContext(e,t,r){const i=[...t.keys(),...r.keys()],a={},o={},s=new Set(r.keys().map((e=>e.name))),c=t.keys().filter((e=>s.has(e.name)));for(const n of i){if(1===o[n.name])continue;o[n.name]=1;const i=c.some((e=>e.name===n.name));e[n.name]&&i?a[n.name]=e[n.name].run(t.get(n),r.get(n)):!e[n.name]&&i||(t.get(n)?r.get(n)||(a[n.name]=t.get(n)):a[n.name]=r.get(n))}return new n.ActionContext(a)}setContextEntry(e,t){return this.setContextEntryRaw(e,t)}setContextEntryRaw(e,t){return this.contextHolder&&this.contextHolder.context?new o(this.dataFactory,this.entries,{contextMergeHandlers:this.contextHolder.contextMergeHandlers,context:this.contextHolder.context.set(e,t)}):new o(this.dataFactory,this.entries,{contextMergeHandlers:this.contextHolder?.contextMergeHandlers??{},context:(new n.ActionContext).set(e,t)})}deleteContextEntry(e){return this.deleteContextEntryRaw(e)}deleteContextEntryRaw(e){return this.contextHolder?new o(this.dataFactory,this.entries,{contextMergeHandlers:this.contextHolder.contextMergeHandlers,context:this.contextHolder.context?.delete(e)}):new o(this.dataFactory,this.entries)}getContext(){return this.contextHolder?.context}getContextEntry(e){return this.getContext()?.get(e)}toString(){return(0,a.bindingsToString)(this)}*mapIterable(e,t){for(const r of e)yield t(r)}iteratorToIterable(e){return{[Symbol.iterator]:()=>e}}}t.Bindings=o},38846:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsFactory=void 0;const n=r(6081),i=r(18050),a=r(67526);class o{constructor(e=new i.DataFactory,t){this.dataFactory=e,this.contextMergeHandlers=t}static async create(e,t){return new o(new i.DataFactory,(await e.mediate({context:t})).mergeHandlers)}bindings(e=[]){return new a.Bindings(this.dataFactory,(0,n.Map)(e.map((([e,t])=>[e.value,t]))),this.contextMergeHandlers?{contextMergeHandlers:this.contextMergeHandlers}:void 0)}fromBindings(e){return this.bindings([...e])}fromRecord(e){return this.bindings(Object.entries(e).map((([e,t])=>[this.dataFactory.variable(e),t])))}}t.BindingsFactory=o},17070:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindingsToString=void 0;const n=r(22112);t.bindingsToString=function(e){const t={};for(const r of e.keys())t[r.value]=(0,n.termToString)(e.get(r));return JSON.stringify(t,null," ")}},91674:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(67526),t),i(r(38846),t),i(r(17070),t)},53674:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocess=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorContextPreprocess=i},32362:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(53674),t)},18326:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceRdf=void 0;const n=r(47702);class i extends n.ActorDereferenceParse{constructor(e){super(e)}}t.ActorDereferenceRdf=i},53583:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(18326),t)},96859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereference=void 0;const n=r(5522);class i extends n.ActorDereferenceBase{constructor(e){super(e)}async handleDereferenceErrors(e,t,r,n=0){return this.dereferenceErrorHandler(e,t,{url:e.url,exists:!1,headers:r,requestTime:n})}}t.ActorDereference=i},5522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceBase=t.isHardError=t.emptyReadable=void 0;const n=r(32227),i=r(34368),a=r(58521);function o(){const e=new a.Readable;return e.push(null),e}function s(e){return!e.get(n.KeysInitQuery.lenient)}t.emptyReadable=o,t.isHardError=s;class c extends i.Actor{constructor(e){super(e)}async dereferenceErrorHandler(e,t,r){if(s(e.context))throw t;return this.logWarn(e.context,t.message),{...r,data:o()}}}t.ActorDereferenceBase=c},75416:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceParse=t.getMediaTypeFromExtension=void 0;const n=r(58521),i=r(5522);function a(e,t){const r=e.lastIndexOf(".");return r>=0&&t?.[e.slice(r+1)]||""}t.getMediaTypeFromExtension=a;class o extends i.ActorDereferenceBase{constructor(e){super(e)}async test(e){return!0}handleDereferenceStreamErrors(e,t){return(0,i.isHardError)(e.context)||(t.on("error",(r=>{this.logWarn(e.context,r.message,(()=>({url:e.url}))),t.push(null)})),t=t.pipe(new n.PassThrough({objectMode:!0}))),t}async run(e){const{context:t}=e,r=await this.mediatorDereference.mediate({...e,mediaTypes:async()=>(await(this.mediatorParseMediatypes?.mediate({context:t,mediaTypes:!0})))?.mediaTypes});let n;try{n=(await this.mediatorParse.mediate({context:t,handle:{context:t,...r,metadata:await this.getMetadata(r)},handleMediaType:r.mediaType||a(r.url,this.mediaMappings)||e.mediaType})).handle,n.data=this.handleDereferenceStreamErrors(e,n.data)}catch(t){await(r.data.close?.()),n=await this.dereferenceErrorHandler(e,t,{})}return{...r,...n}}}t.ActorDereferenceParse=o},47702:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(96859),t),i(r(75416),t),i(r(5522),t)},45644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashBindings=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorHashBindings=i},38431:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(45644),t)},88044:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashQuads=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorHashQuads=i},16179:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(88044),t)},24608:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpInvalidate=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorHttpInvalidate=i},1187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpInvalidateListenable=void 0;const n=r(24608);class i extends n.ActorHttpInvalidate{constructor(e){super(e),this.invalidateListeners=[],this.invalidateListeners=[]}addInvalidateListener(e){this.invalidateListeners.push(e)}async test(e){return!0}async run(e){for(const t of this.invalidateListeners)t(e);return{}}}t.ActorHttpInvalidateListenable=i},56320:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(24608),t),i(r(1187),t)},54283:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttp=void 0;const n=r(34368),i=r(33523);globalThis.ReadableStream||(globalThis.ReadableStream=r(55675).ReadableStream);const a=r(76605),o=r(84077);class s extends n.Actor{constructor(e){super(e)}static toNodeReadable(e){return a(e)||null===e?e:(0,i.readableFromWeb)(e)}static toWebReadableStream(e){return o(e)}static headersToHash(e){const t={};return e.forEach(((e,r)=>{t[r]=e})),t}}t.ActorHttp=s},74870:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(54283),t),i(r(92151),t)},92151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAndCloseHttpResponse=void 0;const n=r(31759),i=r(54283);t.validateAndCloseHttpResponse=async function(e,t){if(t.status>=400){let r="empty response";if(t.body){const e=i.ActorHttp.toNodeReadable(t.body);r=await(0,n.stringify)(e)}throw new Error(`Could not update ${e} (HTTP status ${t.status}):\n${r}`)}await(t.body?.cancel())}},37983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInit=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorInit=i},99784:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(37983),t)},70735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperation=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorOptimizeQueryOperation=i},6716:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(70735),t)},76986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperation=void 0;const n=r(32227),i=r(34368),a=r(85156),o=r(75698);let s=0;class c extends i.Actor{constructor(e){super(e)}static getSafeBindings(e){return c.validateQueryOutput(e,"bindings"),e}static getSafeQuads(e){return c.validateQueryOutput(e,"quads"),e}static getSafeBoolean(e){return c.validateQueryOutput(e,"boolean"),e}static getSafeVoid(e){return c.validateQueryOutput(e,"void"),e}static validateQueryOutput(e,t){if(e.type!==t)throw new Error(`Invalid query output type: Expected '${t}' but got '${e.type}'`)}static getBaseExpressionContext(e){const t=e.get(n.KeysInitQuery.queryTimestamp),r=e.get(n.KeysInitQuery.baseIRI),i=e.get(n.KeysInitQuery.functionArgumentsCache)??{};if(e.has(n.KeysInitQuery.extensionFunctionCreator)&&e.has(n.KeysInitQuery.extensionFunctions))throw new Error("Illegal simultaneous usage of extensionFunctionCreator and extensionFunctions in context");let a=e.get(n.KeysInitQuery.extensionFunctionCreator);const o=e.get(n.KeysInitQuery.extensionFunctions);return o&&(a=e=>o[e.value]),{now:t,baseIRI:r,extensionFunctionCreator:a,functionArgumentsCache:i}}static getExpressionContext(e,t){return{...this.getBaseExpressionContext(e),bnode:e=>new a.BlankNodeBindingsScoped(e??"BNODE_"+s++)}}static getAsyncExpressionContext(e,t,r){return{...this.getBaseExpressionContext(e),bnode:e=>Promise.resolve(new a.BlankNodeBindingsScoped(e??"BNODE_"+s++)),exists:c.createExistenceResolver(e,t,r)}}static createExistenceResolver(e,t,r){return async(n,i)=>{const a=(0,o.materializeOperation)(n.input,i,r),s=await t.mediate({operation:a,context:e}),u=c.getSafeBindings(s);return n.not!==(1===(await u.bindingsStream.take(1).toArray()).length)}}static throwOnReadOnly(e){if(e.get(n.KeysQueryOperation.readOnly))throw new Error("Attempted a write operation in read-only mode")}static getOperationSource(e){return e.metadata?.scopedSource}static assignOperationSource(e,t){return(e={...e}).metadata=e.metadata?{...e.metadata}:{},e.metadata.scopedSource=t,e}static removeOperationSource(e){delete e.metadata?.scopedSource,e.metadata&&0===Object.keys(e.metadata).length&&delete e.metadata}static doesShapeAcceptOperation(e,t,r){return"conjunction"===e.type?e.children.every((e=>c.doesShapeAcceptOperation(e,t,r))):"disjunction"===e.type?e.children.some((e=>c.doesShapeAcceptOperation(e,t,r))):"arity"===e.type?c.doesShapeAcceptOperation(e.child,t,r):!((r?.joinBindings&&!e.joinBindings)??(r?.filterBindings&&!e.filterBindings))&&("type"===e.operation.operationType?"project"===e.operation.type||e.operation.type===t.type:e.operation.pattern.type===t.type)}}t.ActorQueryOperation=c},19028:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationTyped=void 0;const n=r(32227),i=r(72394),a=r(76986);class o extends a.ActorQueryOperation{constructor(e,t){if(super({...e,operationName:t}),!this.operationName)throw new Error('A valid "operationName" argument must be provided.')}async test(e){if(!e.operation)throw new Error("Missing field 'operation' in a query operation action.");if(e.operation.type!==this.operationName)throw new Error(`Actor ${this.name} only supports ${this.operationName} operations, but got ${e.operation.type}`);const t=e.operation;return this.testOperation(t,e.context)}async run(e){const t=e.context.get(n.KeysInitQuery.physicalQueryPlanLogger);t&&(t.logOperation(e.operation.type,void 0,e.operation,e.context.get(n.KeysInitQuery.physicalQueryPlanNode),this.name,{}),e.context=e.context.set(n.KeysInitQuery.physicalQueryPlanNode,e.operation));const r=e.operation,a=e.context.set(n.KeysQueryOperation.operation,r),o=await this.runOperation(r,a);return"metadata"in o&&(o.metadata=(0,i.cachifyMetadata)(o.metadata)),o}}t.ActorQueryOperationTyped=o},90897:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationTypedMediated=void 0;const n=r(19028);class i extends n.ActorQueryOperationTyped{constructor(e,t){super(e,t)}}t.ActorQueryOperationTypedMediated=i},75698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materializeOperation=t.materializeTerm=void 0;const n=r(18050),i=r(22112),a=r(13252),o=r(31578),s=new n.DataFactory,c=s.literal("true",s.namedNode("http://www.w3.org/2001/XMLSchema#boolean"));function u(e,t){if("Variable"===e.termType){const r=t.get(e);if(r)return r}return"Quad"===e.termType&&(0,a.someTermsNested)(e,(e=>"Variable"===e.termType))?(0,a.mapTermsNested)(e,(e=>u(e,t))):e}function l(e,t,r){const n=[];for(const[a,o]of t)if(!r||r.some((e=>e.equals(a)))){const t={[(0,i.termToString)(a)]:o};n.push(e.createValues([a],[t]))}return n}t.materializeTerm=u,t.materializeOperation=function e(t,r,n,a={}){return a={strictTargetVariables:"strictTargetVariables"in a&&a.strictTargetVariables,bindFilter:!("bindFilter"in a)||a.bindFilter,originalBindings:"originalBindings"in a?a.originalBindings:r},o.Util.mapOperation(t,{path:(e,t)=>({recurse:!1,result:Object.assign(t.createPath(u(e.subject,r),e.predicate,u(e.object,r),u(e.graph,r)),{metadata:e.metadata})}),pattern:(e,t)=>({recurse:!1,result:Object.assign(t.createPattern(u(e.subject,r),u(e.predicate,r),u(e.object,r),u(e.graph,r)),{metadata:e.metadata})}),extend(t){if(r.has(t.variable)){if(a.strictTargetVariables)throw new Error(`Tried to bind variable ${(0,i.termToString)(t.variable)} in a BIND operator.`);return{recurse:!0,result:e(t.input,r,n,a)}}return{recurse:!0,result:t}},group(e,t){if(a.strictTargetVariables){for(const t of e.variables)if(r.has(t))throw new Error(`Tried to bind variable ${(0,i.termToString)(t)} in a GROUP BY operator.`);return{recurse:!0,result:e}}const n=e.variables.filter((e=>!r.has(e)));return{recurse:!0,result:t.createGroup(e.input,n,e.aggregates)}},project(t,o){if(a.strictTargetVariables){for(const e of t.variables)if(r.has(e))throw new Error(`Tried to bind variable ${(0,i.termToString)(e)} in a SELECT operator.`);return{recurse:!0,result:t}}for(const e of r.keys())for(const n of t.variables)if(n.equals(e)){r=r.delete(e);break}const s=l(o,a.originalBindings,t.variables);let c=e(t.input,r,n,a);return s.length>0&&(c=o.createJoin([...s,c])),{recurse:!1,result:o.createProject(c,t.variables)}},filter(t,i){const o=a.originalBindings;if("operator"!==t.expression.expressionType||0===o.size)return{recurse:!1,result:t};const s=l(i,o),c=e(t.expression,r,n,a);let u=e(t.input,r,n,a);return s.length>0&&(u=i.createJoin([...s,u])),{recurse:!1,result:i.createFilter(u,c)}},values(e,t){if(!a.strictTargetVariables){const n=e.variables.filter((e=>!r.has(e))),a=e.bindings.map((e=>{const t={...e};let n=!0;return r.forEach(((e,r)=>{const a=(0,i.termToString)(r);a in t&&(e.equals(t[a])||(n=!1),delete t[a])})),n?t:void 0})).filter(Boolean);return{recurse:!0,result:t.createValues(n,a)}}for(const t of e.variables)if(r.has(t))throw new Error(`Tried to bind variable ${(0,i.termToString)(t)} in a VALUES operator.`);return{recurse:!1,result:e}},expression(e,t){if(!a.bindFilter)return{recurse:!1,result:e};if("term"===e.expressionType)return{recurse:!1,result:t.createTermExpression(u(e.term,r))};if("operator"===e.expressionType)return"bound"===e.operator&&1===e.args.length&&"term"===e.args[0].expressionType&&[...r.keys()].some((t=>e.args[0].term.equals(t)))?{recurse:!1,result:t.createTermExpression(c)}:{recurse:!0,result:e};if("aggregate"===e.expressionType&&"variable"in e&&r.has(e.variable)){if(a.strictTargetVariables)throw new Error(`Tried to bind ${(0,i.termToString)(e.variable)} in a ${e.aggregator} aggregate.`);return{recurse:!0,result:e}}return{recurse:!0,result:e}}})}},32233:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BusQueryOperation=void 0;const n=r(34368);class i extends n.BusIndexed{constructor(e){super({...e,actorIdentifierFields:["operationName"],actionIdentifierFields:["operation","type"]})}}t.BusQueryOperation=i},57779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClosableIterator=void 0;const n=r(76664);class i extends n.AsyncIterator{constructor(e,t){super(),this.onClose=t.onClose,this._source=e,this._source[n.DESTINATION]=this,this._source.on("end",s),this._source.on("error",o),this._source.on("readable",a),this.readable=this._source.readable}read(){const e=this._source.read();return e||(this.readable=!1,this._source.done&&this.close()),e}_end(e){this.onClose(),this._source.removeListener("end",s),this._source.removeListener("error",o),this._source.removeListener("readable",a),delete this._source[n.DESTINATION],this._source.destroy(),super._end(e)}}function a(){this[n.DESTINATION].readable=!0}function o(e){this[n.DESTINATION].emit("error",e)}function s(){this[n.DESTINATION].close()}t.ClosableIterator=i},45371:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClosableTransformIterator=void 0;const n=r(76664);class i extends n.TransformIterator{constructor(e,t){super(e,t),this.onClose=t.onClose}_end(e){this.onClose(),super._end(e)}}t.ClosableTransformIterator=i},59510:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(76986),t),i(r(19028),t),i(r(90897),t),i(r(75698),t),i(r(32233),t),i(r(57779),t),i(r(45371),t)},88098:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParse=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorQueryParse=i},79744:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(88098),t)},8906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcess=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorQueryProcess=i},59946:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(8906),t)},2659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerialize=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e)}}t.ActorQueryResultSerialize=i},51492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeFixedMediaTypes=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e,t){return!0}}t.ActorQueryResultSerializeFixedMediaTypes=i},22083:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(2659),t),i(r(51492),t)},44218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermedia=void 0;const n=r(34368);class i extends n.Actor{constructor(e,t){super(e),this.sourceType=t}async test(e){if(e.forceSourceType&&this.sourceType!==e.forceSourceType)throw new Error(`Actor ${this.name} is not able to handle source type ${e.forceSourceType}.`);return this.testMetadata(e)}}t.ActorQuerySourceIdentifyHypermedia=i},89168:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(44218),t)},521:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentify=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorQuerySourceIdentify=i},12982:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterMatchingQuotedQuads=t.quadsOrderToBindingsOrder=t.quadsMetadataToBindingsMetadata=t.setMetadata=t.getDuplicateElementLinks=t.getVariables=t.isTermVariable=t.quadsToBindings=void 0;const n=r(59510),i=r(72394),a=r(18050),o=r(22112),s=r(13252),c=r(10175),u=new a.DataFactory;function l(e){return"Variable"===e.termType}function d(e){return(0,s.uniqTerms)((0,s.getTermsNested)(e).filter(l))}function p(e){const t={};let r=!1;if((0,s.forEachTermsNested)(e,((e,n)=>{if("Variable"===e.termType){const i=(0,o.termToString)(e),a=(t[i]||(t[i]=[])).push(n);r=r||a>1}})),!r)return;const n={};for(const e in t){const r=t[e],i=r.slice(1);i.length>0&&(n[r[0].join("_")]=i)}return n}function h(e,t,r,n,a){const o=o=>{"canContainUndefs"in o||(o.canContainUndefs=!1),a&&(o.cardinality.type="estimate"),e.setProperty("metadata",f((0,i.validateMetadataQuads)(o),r,n)),o.state&&o.state.addInvalidateListener((()=>{h(e,t,r,n,a)}))},s=t.getProperty("metadata");s?o(s):t.getProperty("metadata",o)}function f(e,t,r){return{...e,canContainUndefs:!1,order:e.order?y(e.order,t):void 0,availableOrders:e.availableOrders?e.availableOrders.map((e=>({cost:e.cost,terms:y(e.terms,t)}))):void 0,variables:r}}function y(e,t){const r={};return e.map((e=>{const n=t[e.term];if(n&&!r[n])return r[n]=!0,{term:u.variable(n),direction:e.direction}})).filter(Boolean)}t.quadsToBindings=function(e,t,r,i){const a=d(t),o="Variable"===t.graph.termType&&!i,c=p(t),l=(0,s.reduceTermsNested)(t,((e,t,r)=>("Variable"===t.termType&&(e[r.join("_")]=t.value),e)),{});let f=e;o&&(f=f.filter((e=>"DefaultGraph"!==e.graph.termType))),c&&(f=f.filter((e=>{for(const t in c){const r=t.split("_"),n=(0,s.getValueNestedPath)(e,r);for(const r of c[t])if(!n.equals((0,s.getValueNestedPath)(e,r)))return!1}return!0})));const y=new n.ClosableIterator(f.map((e=>r.bindings(Object.keys(l).map((t=>{const r=t.split("_"),n=l[t],i=(0,s.getValueNestedPath)(e,r);return[u.variable(n),i]}))))),{onClose:()=>e.destroy()});return h(y,e,l,a,o||Boolean(c)),y},t.isTermVariable=l,t.getVariables=d,t.getDuplicateElementLinks=p,t.setMetadata=h,t.quadsMetadataToBindingsMetadata=f,t.quadsOrderToBindingsOrder=y,t.filterMatchingQuotedQuads=function(e,t){return(0,s.someTerms)(e,(e=>"Quad"===e.termType))&&(t=t.filter((t=>(0,c.matchPatternMappings)(t,e)))),t}},65483:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(521),t),i(r(12982),t)},36170:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinEntriesSort=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfJoinEntriesSort=i},84287:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(36170),t)},88125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSelectivity=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfJoinSelectivity=i},75245:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(88125),t)},10654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoin=void 0;const n=r(32227),i=r(34368),a=r(72394),o=r(18050),s=r(22112),c=r(57778),u=new o.DataFactory;class l extends i.Actor{constructor(e,t){super(e),this.includeInLogs=!0,this.logicalType=t.logicalType,this.physicalName=t.physicalName,this.limitEntries=t.limitEntries??Number.POSITIVE_INFINITY,this.limitEntriesMin=t.limitEntriesMin??!1,this.canHandleUndefs=t.canHandleUndefs??!1,this.isLeaf=t.isLeaf??!0,this.requiresVariableOverlap=t.requiresVariableOverlap??!1}static hash(e,t){return t.map((t=>{const r=e.get(t);return r?r.value:""})).join("")}static hashNonClashing(e,t){return t.map((t=>{const r=e.get(t);return r?(0,s.termToString)(r):""})).join("")}static overlappingVariables(e){const t=e.map((e=>e.variables));let r=t[0];for(const e of t.slice(1))r=r.filter((t=>e.some((e=>e.value===t.value))));return r}static joinVariables(e){return[...new Set(e.flatMap((e=>e.variables.map((e=>e.value)))))].map((e=>u.variable(e)))}static joinBindings(...e){if(0===e.length)return null;if(1===e.length)return e[0];let t=e[0];for(const r of e.slice(1)){const e=t.merge(r);if(!e)return null;t=e}return t}static getCardinality(e){return e.cardinality}static async getMetadatas(e){return await Promise.all(e.map((e=>e.output.metadata())))}static async getEntriesWithMetadatas(e){const t=await l.getMetadatas(e);return e.map(((e,r)=>({...e,metadata:t[r]})))}static getRequestInitialTimes(e){return e.map((e=>e.pageSize?0:e.requestTime??0))}static getRequestItemTimes(e){return e.map((e=>e.pageSize?(e.requestTime??0)/e.pageSize:0))}constructState(e){const t=new a.MetadataValidationState,r=()=>t.invalidate();for(const t of e)t.state.addInvalidateListener(r);return t}async constructResultMetadata(e,t,r,n={},i=!1){let a;return n.cardinality?a=n.cardinality:(a=t.reduce(((e,t)=>{const r=l.getCardinality(t);return{type:"estimate"===r.type?"estimate":e.type,value:e.value*(i?Math.max(1,r.value):r.value)}}),{type:"exact",value:1}),a.value*=(await this.mediatorJoinSelectivity.mediate({entries:e,context:r})).selectivity),{state:this.constructState(t),...n,cardinality:{type:a.type,value:a.value},canContainUndefs:n.canContainUndefs??t.some((e=>e.canContainUndefs)),variables:l.joinVariables(t)}}static async sortJoinEntries(e,t,r){if(t.some((e=>e.metadata.canContainUndefs)))return t;const n={};for(const e of t)for(const t of e.metadata.variables){let e=n[t.value];e||(e=0),n[t.value]=++e}const i=[];for(const[e,t]of Object.entries(n))t>=2&&i.push(e);if(0===i.length)throw new Error("Bind join can only join entries with at least one common variable");const a=[];for(const e of t){let t=!1;for(const r of e.metadata.variables)if(i.includes(r.value)){t=!0;break}t||a.push(e)}return(await e.mediate({entries:t,context:r})).entries.sort(((e,t)=>{const r=a.includes(e);return r===a.includes(t)?0:r?1:-1}))}async test(e){if(e.type!==this.logicalType)throw new Error(`${this.name} can only handle logical joins of type '${this.logicalType}', while '${e.type}' was given.`);if(e.entries.length<=1)throw new Error(`${this.name} requires at least two join entries.`);if(this.limitEntriesMin?e.entries.lengththis.limitEntries)throw new Error(`${this.name} requires ${this.limitEntries} join entries at ${this.limitEntriesMin?"least":"most"}. The input contained ${e.entries.length}.`);for(const t of e.entries)if("bindings"!==t.output.type)throw new Error(`Invalid type of a join entry: Expected 'bindings' but got '${t.output.type}'`);const t=await l.getMetadatas(e.entries);if(!this.canHandleUndefs)for(const e of t)if(e.canContainUndefs)throw new Error(`Actor ${this.name} can not join streams containing undefs`);if(this.requiresVariableOverlap&&0===l.overlappingVariables(t).length)throw new Error(`Actor ${this.name} can only join entries with at least one common variable`);return await this.getJoinCoefficients(e,t)}async run(e){let t;e.context.has(n.KeysInitQuery.physicalQueryPlanLogger)&&(t=e.context.get(n.KeysInitQuery.physicalQueryPlanNode),e.context=e.context.set(n.KeysInitQuery.physicalQueryPlanNode,e));const r=e.context.get(n.KeysInitQuery.physicalQueryPlanLogger);let i;this.includeInLogs&&r&&(i={},r.stashChildren(t,(e=>e.logicalOperator.startsWith("join"))),r.logOperation(`join-${this.logicalType}`,this.physicalName,e,t,this.name,i));const{result:o,physicalPlanMetadata:s}=await this.getOutput(e),u=await l.getMetadatas(e.entries);if(i){(0,c.instrumentIterator)(o.bindingsStream).then((t=>{r.appendMetadata(e,{cardinalityReal:t.count,timeSelf:t.timeSelf,timeLife:t.timeLife})})),Object.assign(i,s);const t=u.map(l.getCardinality);if(i.cardinalities=t,i.joinCoefficients=await this.getJoinCoefficients(e,u),this.isLeaf)for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkedIterator=void 0;const n=r(76664);class i extends n.TransformIterator{constructor(e,t,r){super(e,r),this.chunk=[],this.blockSize=t}consumeChunkAsIterator(){const e=new n.ArrayIterator(this.chunk,{autoStart:!1});return this.chunk=[],e}_transform(e,t,r){this.chunk.push(e),this.chunk.length>=this.blockSize&&r(this.consumeChunkAsIterator()),t()}_flush(e){this.chunk.length>0&&this._push(this.consumeChunkAsIterator()),super._flush(e)}}t.ChunkedIterator=i},32353:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(10654),t),i(r(34875),t)},57778:(e,t)=>{"use strict";function r(e,t,n){if(!("_profileInstrumented"in e)){if(e._profileInstrumented=!0,"_read"in e){const r=e._read;e._read=(n,i)=>{const a=performance.now();r.call(e,n,(()=>{t.timeSelf+=performance.now()-a,i()}))}}if("read"in e){const r=e.read;e.read=()=>{const i=performance.now(),a=r.call(e);return n&&a&&t.count++,t.timeSelf+=performance.now()-i,a}}if(n){const r=performance.now();e.on("end",(()=>{t.timeLife=performance.now()-r}))}"_source"in e&&r(e._source,t,!1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.instrumentIterator=void 0,t.instrumentIterator=function(e){const t={count:0,timeSelf:0,timeLife:0};return r(e,t,!0),new Promise((r=>{e.on("end",(()=>{r(t)}))}))}},97145:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulate=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfMetadataAccumulate=i},49877:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(97145),t)},77879:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtract=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfMetadataExtract=i},10800:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(77879),t)},32124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadata=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfMetadata=i},52628:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(32124),t)},15569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtml=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfParseHtml=i},65446:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(15569),t)},20434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParse=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e)}}t.ActorRdfParse=i},67719:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseFixedMediaTypes=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e){return!0}}t.ActorRdfParseFixedMediaTypes=i},54592:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(20434),t),i(r(67719),t)},79773:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinksQueue=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfResolveHypermediaLinksQueue=i},25710:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89798:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkQueueWrapper=void 0,t.LinkQueueWrapper=class{constructor(e){this.linkQueue=e}push(e,t){return this.linkQueue.push(e,t)}getSize(){return this.linkQueue.getSize()}isEmpty(){return this.linkQueue.isEmpty()}pop(){return this.linkQueue.pop()}peek(){return this.linkQueue.peek()}}},56102:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(79773),t),i(r(25710),t),i(r(89798),t)},11018:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinks=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfResolveHypermediaLinks=i},22124:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(11018),t)},29342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerialize=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e)}}t.ActorRdfSerialize=i},34923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeFixedMediaTypes=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(){return!0}}t.ActorRdfSerializeFixedMediaTypes=i},84025:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(29342),t),i(r(34923),t)},9917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermedia=void 0;const n=r(34368);class i extends n.Actor{constructor(e,t){super(e),this.destinationType=t}async test(e){if(e.forceDestinationType&&this.destinationType!==e.forceDestinationType)throw new Error(`Actor ${this.name} is not able to handle destination type ${e.forceDestinationType}.`);return this.testMetadata(e)}}t.ActorRdfUpdateHypermedia=i},25345:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(9917),t)},10303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuads=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfUpdateQuads=i},96527:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsDestination=t.deskolemize=t.deskolemizeStream=void 0;const n=r(35106),i=r(32227),a=r(10303);function o(e,t){return e?.map((e=>(0,n.deskolemizeQuad)(e,t)))}function s(e){const t=e.context.get(i.KeysRdfUpdateQuads.destination),r=e.context.get(i.KeysQuerySourceIdentify.sourceIds)?.get(t);return r?{...e,quadStreamInsert:o(e.quadStreamInsert,r),quadStreamDelete:o(e.quadStreamDelete,r)}:e}t.deskolemizeStream=o,t.deskolemize=s;class c extends a.ActorRdfUpdateQuads{async test(e){return!0}async run(e){const t=await this.getDestination(e.context);return await this.getOutput(t,s(e))}async getOutput(e,t){return{execute:async()=>{await(t.quadStreamDelete?e.delete(t.quadStreamDelete):Promise.resolve()),await(t.deleteGraphs?e.deleteGraphs(t.deleteGraphs.graphs,t.deleteGraphs.requireExistence,t.deleteGraphs.dropGraphs):Promise.resolve()),await(t.createGraphs?e.createGraphs(t.createGraphs.graphs,t.createGraphs.requireNonExistence):Promise.resolve()),await(t.quadStreamInsert?e.insert(t.quadStreamInsert):Promise.resolve())}}}}t.ActorRdfUpdateQuadsDestination=c},54877:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86789:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(10303),t),i(r(96527),t),i(r(54877),t),i(r(86368),t)},86368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContextDestinationUrl=t.getContextDestination=t.getDataDestinationContext=t.getDataDestinationValue=t.getDataDestinationType=t.isDataDestinationRawType=void 0;const n=r(32227);function i(e){return"string"==typeof e||"remove"in e}function a(e){return i(e)?e:e.value}t.isDataDestinationRawType=i,t.getDataDestinationType=function(e){return"string"==typeof e?"":"remove"in e?"rdfjsStore":e.type},t.getDataDestinationValue=a,t.getDataDestinationContext=function(e,t){return"string"==typeof e||"remove"in e||!e.context?t:t.merge(e.context)},t.getContextDestination=function(e){return e.get(n.KeysRdfUpdateQuads.destination)},t.getContextDestinationUrl=function(e){if(e){let t=a(e);if("string"==typeof t){const e=t.indexOf("#");return e>=0&&(t=t.slice(0,e)),t}}}},88851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeysRdfJoin=t.KeysMergeBindingsContext=t.KeysRdfUpdateQuads=t.KeysQuerySourceIdentify=t.KeysRdfParseHtmlScript=t.KeysRdfParseJsonLd=t.KeysQueryOperation=t.KeysInitQuery=t.KeysHttpProxy=t.KeysHttpMemento=t.KeysHttpWayback=t.KeysHttp=t.KeysCore=void 0;const n=r(34368);t.KeysCore={log:n.CONTEXT_KEY_LOGGER},t.KeysHttp={includeCredentials:new n.ActionContextKey("@comunica/bus-http:include-credentials"),auth:new n.ActionContextKey("@comunica/bus-http:auth"),fetch:new n.ActionContextKey("@comunica/bus-http:fetch"),httpTimeout:new n.ActionContextKey("@comunica/bus-http:http-timeout"),httpBodyTimeout:new n.ActionContextKey("@comunica/bus-http:http-body-timeout"),httpRetryCount:new n.ActionContextKey("@comunica/bus-http:http-retry-count"),httpRetryDelay:new n.ActionContextKey("@comunica/bus-http:http-retry-delay"),httpRetryOnServerError:new n.ActionContextKey("@comunica/bus-http:http-retry-on-server-error")},t.KeysHttpWayback={recoverBrokenLinks:new n.ActionContextKey("@comunica/bus-http:recover-broken-links")},t.KeysHttpMemento={datetime:new n.ActionContextKey("@comunica/actor-http-memento:datetime")},t.KeysHttpProxy={httpProxyHandler:new n.ActionContextKey("@comunica/actor-http-proxy:httpProxyHandler")},t.KeysInitQuery={querySourcesUnidentified:new n.ActionContextKey("@comunica/actor-init-query:querySourcesUnidentified"),initialBindings:new n.ActionContextKey("@comunica/actor-init-query:initialBindings"),queryFormat:new n.ActionContextKey("@comunica/actor-init-query:queryFormat"),graphqlSingularizeVariables:new n.ActionContextKey("@comunica/actor-init-query:singularizeVariables"),lenient:new n.ActionContextKey("@comunica/actor-init-query:lenient"),queryString:new n.ActionContextKey("@comunica/actor-init-query:queryString"),query:new n.ActionContextKey("@comunica/actor-init-query:query"),baseIRI:new n.ActionContextKey("@comunica/actor-init-query:baseIRI"),functionArgumentsCache:new n.ActionContextKey("@comunica/actor-init-query:functionArgumentsCache"),queryTimestamp:new n.ActionContextKey("@comunica/actor-init-query:queryTimestamp"),extensionFunctionCreator:new n.ActionContextKey("@comunica/actor-init-query:extensionFunctionCreator"),extensionFunctions:new n.ActionContextKey("@comunica/actor-init-query:extensionFunctions"),cliArgsHandlers:new n.ActionContextKey("@comunica/actor-init-query:cliArgsHandlers"),explain:new n.ActionContextKey("@comunica/actor-init-query:explain"),physicalQueryPlanLogger:new n.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanLogger"),physicalQueryPlanNode:new n.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanNode"),jsonLdContext:new n.ActionContextKey("@context"),noCache:new n.ActionContextKey("@comunica/actor-init-query:noCache"),distinctConstruct:new n.ActionContextKey("@comunica/actor-init-query:distinctConstruct")},t.KeysQueryOperation={operation:new n.ActionContextKey("@comunica/bus-query-operation:operation"),joinLeftMetadata:new n.ActionContextKey("@comunica/bus-query-operation:joinLeftMetadata"),joinRightMetadatas:new n.ActionContextKey("@comunica/bus-query-operation:joinRightMetadatas"),joinBindings:new n.ActionContextKey("@comunica/bus-query-operation:joinBindings"),readOnly:new n.ActionContextKey("@comunica/bus-query-operation:readOnly"),isPathArbitraryLengthDistinctKey:new n.ActionContextKey("@comunica/bus-query-operation:isPathArbitraryLengthDistinct"),limitIndicator:new n.ActionContextKey("@comunica/bus-query-operation:limitIndicator"),unionDefaultGraph:new n.ActionContextKey("@comunica/bus-query-operation:unionDefaultGraph"),querySources:new n.ActionContextKey("@comunica/bus-query-operation:querySources")},t.KeysRdfParseJsonLd={documentLoader:new n.ActionContextKey("@comunica/actor-rdf-parse-jsonld:documentLoader"),strictValues:new n.ActionContextKey("@comunica/actor-rdf-parse-jsonld:strictValues"),parserOptions:new n.ActionContextKey("@comunica/actor-rdf-parse-jsonld:parserOptions")},t.KeysRdfParseHtmlScript={processingHtmlScript:new n.ActionContextKey("@comunica/actor-rdf-parse-html-script:processingHtmlScript"),extractAllScripts:new n.ActionContextKey("extractAllScripts")},t.KeysQuerySourceIdentify={sourceIds:new n.ActionContextKey("@comunica/bus-query-source-identify:sourceIds"),hypermediaSourcesAggregatedStores:new n.ActionContextKey("@comunica/bus-query-source-identify:hypermediaSourcesAggregatedStores"),traverse:new n.ActionContextKey("@comunica/bus-query-source-identify:traverse")},t.KeysRdfUpdateQuads={destination:new n.ActionContextKey("@comunica/bus-rdf-update-quads:destination")},t.KeysMergeBindingsContext={sourcesBinding:new n.ActionContextKey("@comunica/bus-merge-bindings-context:sourcesBinding")},t.KeysRdfJoin={lastPhysicalJoin:new n.ActionContextKey("@comunica/bus-rdf-join:lastPhysicalJoin")}},32227:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(88851),t)},85865:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionContextKey=t.ActionContext=void 0;const n=r(6081);class i{constructor(e={}){this.map=(0,n.Map)(e)}setDefault(e,t){return this.has(e)?this:this.set(e,t)}set(e,t){return this.setRaw(e.name,t)}setRaw(e,t){return new i(this.map.set(e,t))}delete(e){return new i(this.map.delete(e.name))}get(e){return this.getRaw(e.name)}getRaw(e){return this.map.get(e)}getSafe(e){if(!this.has(e))throw new Error(`Context entry ${e.name} is required but not available`);return this.get(e)}has(e){return this.hasRaw(e.name)}hasRaw(e){return this.map.has(e)}merge(...e){let t=this;for(const r of e)for(const e of r.keys())t=t.set(e,r.get(e));return t}keys(){return[...this.map.keys()].map((e=>new a(e)))}toJS(){return this.map.toJS()}toString(){return`ActionContext(${JSON.stringify(this.map.toJS())})`}[Symbol.for("nodejs.util.inspect.custom")](){return`ActionContext(${JSON.stringify(this.map.toJS(),null," ")})`}static ensureActionContext(e){return e instanceof i?e:new i((0,n.Map)(e??{}))}}t.ActionContext=i;class a{constructor(e){this.name=e}}t.ActionContextKey=a},71330:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserver=void 0,t.ActionObserver=class{constructor(e){Object.assign(this,e)}}},4165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Actor=void 0;const n=r(17395);class i{constructor(e){this.beforeActors=[],Object.assign(this,e),this.bus.subscribe(this),this.beforeActors.length>0&&this.bus.addDependencies(this,this.beforeActors)}static getContextLogger(e){return e.get(n.CONTEXT_KEY_LOGGER)}runObservable(e){const t=this.run(e);return this.bus.onRun(this,e,t),t}async initialize(){return!0}async deinitialize(){return!0}getDefaultLogData(e,t){const r=t?t():{};return r.actor=this.name,r}logTrace(e,t,r){const n=i.getContextLogger(e);n&&n.trace(t,this.getDefaultLogData(e,r))}logDebug(e,t,r){const n=i.getContextLogger(e);n&&n.debug(t,this.getDefaultLogData(e,r))}logInfo(e,t,r){const n=i.getContextLogger(e);n&&n.info(t,this.getDefaultLogData(e,r))}logWarn(e,t,r){const n=i.getContextLogger(e);n&&n.warn(t,this.getDefaultLogData(e,r))}logError(e,t,r){const n=i.getContextLogger(e);n&&n.error(t,this.getDefaultLogData(e,r))}logFatal(e,t,r){const n=i.getContextLogger(e);n&&n.fatal(t,this.getDefaultLogData(e,r))}}t.Actor=i},64802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bus=void 0,t.Bus=class{constructor(e){this.actors=[],this.observers=[],this.dependencyLinks=new Map,Object.assign(this,e)}subscribe(e){this.actors.push(e),this.reorderForDependencies()}subscribeObserver(e){this.observers.push(e)}unsubscribe(e){const t=this.actors.indexOf(e);return t>=0&&(this.actors.splice(t,1),!0)}unsubscribeObserver(e){const t=this.observers.indexOf(e);return t>=0&&(this.observers.splice(t,1),!0)}publish(e){return this.actors.map((t=>({actor:t,reply:t.test(e)})))}onRun(e,t,r){for(const n of this.observers)n.onRun(e,t,r)}addDependencies(e,t){for(const r of t){let t=this.dependencyLinks.get(r);t||(t=[],this.dependencyLinks.set(r,t)),t.push(e)}this.reorderForDependencies()}reorderForDependencies(){if(this.dependencyLinks.size>0){const e=[];for(const t of this.dependencyLinks.keys()){const r=this.actors.indexOf(t);r>=0&&(this.actors.splice(r,1),e.push(t))}for(;e.length>0;){let t=-1;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BusIndexed=void 0;const n=r(64802);class i extends n.Bus{constructor(e){super(e),this.actorsIndex={}}subscribe(e){const t=this.getActorIdentifier(e)||"_undefined_";let r=this.actorsIndex[t];r||(r=this.actorsIndex[t]=[]),r.push(e),super.subscribe(e)}unsubscribe(e){const t=this.getActorIdentifier(e)||"_undefined_",r=this.actorsIndex[t];if(r){const n=r.indexOf(e);n>=0&&r.splice(n,1),0===r.length&&delete this.actorsIndex[t]}return super.unsubscribe(e)}publish(e){const t=this.getActionIdentifier(e);return t?[...this.actorsIndex[t]||[],...this.actorsIndex._undefined_||[]].map((t=>({actor:t,reply:t.test(e)}))):super.publish(e)}getActorIdentifier(e){return this.actorIdentifierFields.reduce(((e,t)=>e[t]),e)}getActionIdentifier(e){return this.actionIdentifierFields.reduce(((e,t)=>e[t]),e)}}t.BusIndexed=i},17395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_KEY_LOGGER=void 0;const n=r(85865);t.CONTEXT_KEY_LOGGER=new n.ActionContextKey("@comunica/core:log")},81411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mediator=void 0,t.Mediator=class{constructor(e){Object.assign(this,e)}publish(e){const t=this.bus.publish(e);if(0===t.length)throw new Error(`No actors are able to reply to a message in the bus ${this.bus.name}`);return t}async mediateActor(e){return await this.mediateWith(e,this.publish(e))}async mediate(e){return(await this.mediateActor(e)).runObservable(e)}}},34368:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(85865),t),i(r(64802),t),i(r(45609),t),i(r(17395),t),i(r(71330),t),i(r(4165),t),i(r(81411),t)},72204:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNodeBindingsScoped=void 0,t.BlankNodeBindingsScoped=class{constructor(e){this.termType="BlankNode",this.singleBindingsScope=!0,this.value=e}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},99094:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNodeScoped=void 0,t.BlankNodeScoped=class{constructor(e,t){this.termType="BlankNode",this.value=e,this.skolemized=t}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},85156:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(99094),t),i(r(72204),t)},16095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Aggregator=t.AggregatorComponent=void 0;const n=r(22112),i=r(50363),a=r(14624),o=r(46157);t.AggregatorComponent=class{static emptyValue(){}constructor(e,t){this.sharedContext=t,this.separator=e.separator||" ",this.termTransformer=new i.TermTransformer(t.superTypeProvider)}termToNumericOrError(e){if("Literal"!==e.termType)throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a numeric literal`);if(!(0,o.isSubTypeOf)(e.datatype.value,a.TypeAlias.SPARQL_NUMERIC,this.sharedContext.superTypeProvider))throw new Error(`Term datatype ${e.datatype.value} with value ${e.value} has type ${e.termType} and is not a numeric literal`);return this.termTransformer.transformLiteral(e)}},t.Aggregator=class{constructor(e,t){this.aggregatorComponent=t,this.variableValues=new Map,this.distinct=e.distinct}static emptyValue(e){return e.emptyValue()}result(){return this.aggregatorComponent.result()}put(e,t=""){this.canSkip(e,t)||(this.aggregatorComponent.put(e),this.addSeen(e,t))}canSkip(e,t){const r=this.variableValues.get(t);return this.distinct&&void 0!==r&&r.has(n.termToString(e))}addSeen(e,t){this.distinct&&(this.variableValues.has(t)||this.variableValues.set(t,new Set),this.variableValues.get(t).add(n.termToString(e)))}}},37283:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Average=void 0;const n=r(11269),i=r(42711),a=r(63606),o=r(14624),s=r(16095);class c extends s.AggregatorComponent{constructor(){super(...arguments),this.summer=i.regularFunctions[o.RegularOperator.ADDITION],this.divider=i.regularFunctions[o.RegularOperator.DIVISION],this.state=void 0}static emptyValue(){return(0,a.integer)(0).toRDF()}put(e){if(void 0===this.state){const t=this.termToNumericOrError(e);this.state={sum:t,count:1}}else{const t=this.termToNumericOrError(e);this.state.sum=this.summer.apply([this.state.sum,t],this.sharedContext),this.state.count++}}result(){if(void 0===this.state)return c.emptyValue();const e=new n.IntegerLiteral(this.state.count);return this.divider.apply([this.state.sum,e],this.sharedContext).toRDF()}}t.Average=c},47943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Count=void 0;const n=r(63606),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}static emptyValue(){return(0,n.integer)(0).toRDF()}put(){void 0===this.state&&(this.state=0),this.state++}result(){return void 0===this.state?a.emptyValue():(0,n.integer)(this.state).toRDF()}}t.Count=a},81663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupConcat=void 0;const n=r(63606),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0,this.lastLanguageValid=!0,this.lastLanguage=void 0}static emptyValue(){return(0,n.string)("").toRDF()}put(e){void 0===this.state?(this.state=e.value,"Literal"===e.termType&&(this.lastLanguage=e.language)):(this.state+=this.separator+e.value,this.lastLanguageValid&&"Literal"===e.termType&&this.lastLanguage!==e.language&&(this.lastLanguageValid=!1,this.lastLanguage=void 0))}result(){return void 0===this.state?a.emptyValue():this.lastLanguageValid&&this.lastLanguage?(0,n.langString)(this.state,this.lastLanguage).toRDF():(0,n.string)(this.state).toRDF()}}t.GroupConcat=a},73342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Max=void 0;const n=r(20236),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){if("Literal"!==e.termType)throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a literal`);(void 0===this.state||-1===(0,n.orderTypes)(this.state,e))&&(this.state=e)}result(){return void 0===this.state?a.emptyValue():this.state}}t.Max=a},59648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Min=void 0;const n=r(20236),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){if("Literal"!==e.termType)throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a literal`);(void 0===this.state||1===(0,n.orderTypes)(this.state,e))&&(this.state=e)}result(){return void 0===this.state?a.emptyValue():this.state}}t.Min=a},91664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sample=void 0;const n=r(16095);class i extends n.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){void 0===this.state&&(this.state=e)}result(){return void 0===this.state?i.emptyValue():this.state}}t.Sample=i},69091:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sum=void 0;const n=r(42711),i=r(63606),a=r(14624),o=r(16095);class s extends o.AggregatorComponent{constructor(){super(...arguments),this.state=void 0,this.summer=n.regularFunctions[a.RegularOperator.ADDITION]}static emptyValue(){return(0,i.integer)(0).toRDF()}put(e){if(void 0===this.state)this.state=this.termToNumericOrError(e);else{const t=this.termToNumericOrError(e);this.state=this.summer.apply([this.state,t],this.sharedContext)}}result(){return void 0===this.state?s.emptyValue():this.state.toRDF()}}t.Sum=s},59408:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WildcardCountAggregator=void 0;const n=r(22112),i=r(63606);t.WildcardCountAggregator=class{constructor(e){this.bindingValues=new Map,this.counter=0,this.distinct=e.distinct}putBindings(e){this.handleDistinct(e)||(this.counter+=1)}static emptyValue(){return(0,i.integer)(0).toRDF()}result(){return(0,i.integer)(this.counter).toRDF()}handleDistinct(e){if(this.distinct){const t=[...e];t.sort(((e,t)=>e[0].value.localeCompare(t[0].value)));const r=t.map((([e])=>e.value)).join(","),i=t.map((([,e])=>n.termToString(e))).join(","),a=this.bindingValues.get(r),o=void 0!==a&&a.has(i);return a||this.bindingValues.set(r,new Set),this.bindingValues.get(r).add(i),o}return!1}}},96300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregators=void 0;const n=r(37283),i=r(47943),a=r(81663),o=r(73342),s=r(59648),c=r(91664),u=r(69091);t.aggregators={count:i.Count,sum:u.Sum,min:s.Min,max:o.Max,avg:n.Average,group_concat:a.GroupConcat,sample:c.Sample}},19030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AggregateEvaluator=void 0;const n=r(76206),i=r(86588);class a extends n.BaseAggregateEvaluator{constructor(e,t,r){super(e,i.SyncEvaluator.completeContext(t??{}),r),this.evaluator=new i.SyncEvaluator(e.expression,t)}put(e){if(!this.errorOccurred)if(this.isWildcard)this.wildcardAggregator.putBindings(e);else try{const t=this.evaluator.evaluate(e);this.aggregator.put(t)}catch(e){this.safeThrow(e)}}safeThrow(e){if(this.throwError)throw e;this.errorOccurred=!0}}t.AggregateEvaluator=a},74448:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAggregateEvaluator=void 0;const n=r(98375),i=r(76206);class a extends i.BaseAggregateEvaluator{constructor(e,t,r){super(e,n.AsyncEvaluator.completeContext(t??{}),r),this.evaluator=new n.AsyncEvaluator(e.expression,t),this.errorOccurred=!1}async put(e){if(!this.errorOccurred)if(this.isWildcard)this.wildcardAggregator.putBindings(e);else try{const t=await this.evaluator.evaluate(e);if(!t||this.errorOccurred)return;this.aggregator.put(t)}catch(e){this.safeThrow(e)}}safeThrow(e){if(this.throwError)throw e;this.errorOccurred=!0}}t.AsyncAggregateEvaluator=a},98375:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEvaluator=void 0;const n=r(35069),i=r(69119),a=r(76660),o=r(9062);class s{static completeContext(e){const t=e.now??new Date(Date.now());return{now:t,baseIRI:e.baseIRI??void 0,functionArgumentsCache:e.functionArgumentsCache??{},superTypeProvider:{cache:e.typeCache??new n.LRUCache({max:1e3}),discoverer:e.getSuperType??(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,defaultTimeZone:e.defaultTimeZone??(0,a.extractTimeZone)(t)}}constructor(e,t={}){this.algExpr=e;const r=t.extensionFunctionCreator??(()=>{}),n=s.completeContext(t),a=new i.AlgebraTransformer({type:"async",creator:r,...n});this.expr=a.transformAlgebra(e),this.evaluator=new o.AsyncRecursiveEvaluator(n,a)}async evaluate(e){return(await this.evaluator.evaluate(this.expr,e)).toRDF()}async evaluateAsEBV(e){return(await this.evaluator.evaluate(this.expr,e)).coerceEBV()}async evaluateAsInternal(e){return await this.evaluator.evaluate(this.expr,e)}}t.AsyncEvaluator=s},86588:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncEvaluator=void 0;const n=r(35069),i=r(69119),a=r(76660),o=r(42425);class s{static completeContext(e){const t=e.now??new Date(Date.now());return{now:t,baseIRI:e.baseIRI??void 0,functionArgumentsCache:e.functionArgumentsCache??{},superTypeProvider:{cache:e.typeCache??new n.LRUCache({max:1e3}),discoverer:e.getSuperType??(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,defaultTimeZone:e.defaultTimeZone??(0,a.extractTimeZone)(t)}}constructor(e,t={}){this.algExpr=e,this.context=t;const r=t.extensionFunctionCreator??(()=>{}),n=s.completeContext(t),a=new i.AlgebraTransformer({type:"sync",creator:r,...n});this.expr=a.transformAlgebra(e),this.evaluator=new o.SyncRecursiveEvaluator(n,a)}evaluate(e){return this.evaluator.evaluate(this.expr,e).toRDF()}evaluateAsEBV(e){return this.evaluator.evaluate(this.expr,e).coerceEBV()}evaluateAsInternal(e){return this.evaluator.evaluate(this.expr,e)}}t.SyncEvaluator=s},9062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncRecursiveEvaluator=void 0;const n=r(11269),i=r(50363),a=r(82867),o=r(10667);class s extends o.BaseExpressionEvaluator{constructor(e,t){super(t??new i.TermTransformer(e.superTypeProvider)),this.context=e,this.subEvaluators={[n.ExpressionType.Term]:(e,t)=>this.term(e),[n.ExpressionType.Variable]:(e,t)=>this.variable(e,t),[n.ExpressionType.Operator]:(e,t)=>this.evalOperator(e,t),[n.ExpressionType.SpecialOperator]:(e,t)=>this.evalSpecialOperator(e,t),[n.ExpressionType.Named]:(e,t)=>this.evalNamed(e,t),[n.ExpressionType.Existence]:(e,t)=>this.evalExistence(e,t),[n.ExpressionType.Aggregate]:(e,t)=>this.evalAggregate(e),[n.ExpressionType.AsyncExtension]:(e,t)=>this.evalAsyncExtension(e,t)}}async evaluate(e,t){const r=this.subEvaluators[e.expressionType];if(!r)throw new a.InvalidExpressionType(e);return r.bind(this)(e,t)}async evalOperator(e,t){const r=e.args.map((e=>this.evaluate(e,t))),n=await Promise.all(r);return e.apply(n)}async evalSpecialOperator(e,t){const r=this.evaluate.bind(this),n={args:e.args,mapping:t,superTypeProvider:this.context.superTypeProvider,now:this.context.now,baseIRI:this.context.baseIRI,functionArgumentsCache:this.context.functionArgumentsCache,evaluate:r,bnode:this.context.bnode,defaultTimeZone:this.context.defaultTimeZone};return e.applyAsync(n)}async _evalAsyncArgs(e,t){const r=e.map((e=>this.evaluate(e,t)));return await Promise.all(r)}async evalNamed(e,t){return e.apply(await this._evalAsyncArgs(e.args,t))}async evalAsyncExtension(e,t){return await e.apply(await this._evalAsyncArgs(e.args,t))}async evalExistence(e,t){if(!this.context.exists)throw new a.NoExistenceHook;return new n.BooleanLiteral(await this.context.exists(e.expression,t))}async evalAggregate(e){if(!this.context.aggregate)throw new a.NoAggregator;return this.termTransformer.transformRDFTermUnsafe(await this.context.aggregate(e.expression))}}t.AsyncRecursiveEvaluator=s},76206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAggregateEvaluator=void 0;const n=r(31578),i=r(96300),a=r(16095),o=r(59408),s=r(82867);t.BaseAggregateEvaluator=class{constructor(e,t,r){this.throwError=!1,this.isWildcard=!1,this.errorOccurred=!1,this.expression=e,this.aggregator=new a.Aggregator(e,new i.aggregators[e.aggregator](e,t)),this.throwError=r??!1,this.isWildcard=e.expression.expressionType===n.Algebra.expressionTypes.WILDCARD,this.isWildcard&&(this.wildcardAggregator=new o.WildcardCountAggregator(e))}static emptyValue(e,t=!1){let r;if(r=e.expression.expressionType===n.Algebra.expressionTypes.WILDCARD?o.WildcardCountAggregator.emptyValue():a.Aggregator.emptyValue(i.aggregators[e.aggregator]),void 0===r&&t)throw new s.EmptyAggregateError;return r}result(){if(!this.errorOccurred)return this.isWildcard?this.wildcardAggregator.result():this.aggregator.result()}}},10667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseExpressionEvaluator=void 0;const n=r(63606),i=r(82867);t.BaseExpressionEvaluator=class{constructor(e){this.termTransformer=e}term(e){return e}variable(e,t){const r=t.get((0,n.expressionToVar)(e));if(!r)throw new i.UnboundVariableError(e.name,t);return this.termTransformer.transformRDFTermUnsafe(r)}}},42425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRecursiveEvaluator=void 0;const n=r(11269),i=r(50363),a=r(82867),o=r(10667);class s extends o.BaseExpressionEvaluator{constructor(e,t){super(t??new i.TermTransformer(e.superTypeProvider)),this.context=e,this.subEvaluators={[n.ExpressionType.Term]:(e,t)=>this.term(e),[n.ExpressionType.Variable]:(e,t)=>this.variable(e,t),[n.ExpressionType.Operator]:(e,t)=>this.evalOperator(e,t),[n.ExpressionType.SpecialOperator]:(e,t)=>this.evalSpecialOperator(e,t),[n.ExpressionType.Named]:(e,t)=>this.evalNamed(e,t),[n.ExpressionType.Existence]:(e,t)=>this.evalExistence(e,t),[n.ExpressionType.Aggregate]:(e,t)=>this.evalAggregate(e),[n.ExpressionType.SyncExtension]:(e,t)=>this.evalSyncExtension(e,t)}}evaluate(e,t){const r=this.subEvaluators[e.expressionType];if(!r)throw new a.InvalidExpressionType(e);return r.bind(this)(e,t)}evalOperator(e,t){const r=e.args.map((e=>this.evaluate(e,t)));return e.apply(r)}evalSpecialOperator(e,t){const r=this.evaluate.bind(this),n={args:e.args,mapping:t,superTypeProvider:this.context.superTypeProvider,now:this.context.now,baseIRI:this.context.baseIRI,functionArgumentsCache:this.context.functionArgumentsCache,evaluate:r,bnode:this.context.bnode,defaultTimeZone:this.context.defaultTimeZone};return e.applySynchronously(n)}evalNamed(e,t){const r=e.args.map((e=>this.evaluate(e,t)));return e.apply(r)}evalSyncExtension(e,t){const r=e.args.map((e=>this.evaluate(e,t)));return e.apply(r)}evalExistence(e,t){if(!this.context.exists)throw new a.NoExistenceHook;return new n.BooleanLiteral(this.context.exists(e.expression,t))}evalAggregate(e){if(!this.context.aggregate)throw new a.NoAggregator;return this.termTransformer.transformRDFTermUnsafe(this.context.aggregate(e.expression))}}t.SyncRecursiveEvaluator=s},9950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Aggregate=void 0;const n=r(89702);t.Aggregate=class{constructor(e,t){this.name=e,this.expression=t,this.expressionType=n.ExpressionType.Aggregate}}},29360:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncExtension=void 0;const n=r(89702);t.AsyncExtension=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.AsyncExtension}}},75065:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Existence=void 0;const n=r(89702);t.Existence=class{constructor(e){this.expression=e,this.expressionType=n.ExpressionType.Existence}}},89702:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.asTermType=t.ExpressionType=void 0,function(e){e.Aggregate="aggregate",e.Existence="existence",e.Named="named",e.Operator="operator",e.SpecialOperator="specialOperator",e.Term="term",e.Variable="variable",e.AsyncExtension="asyncExtension",e.SyncExtension="syncExtension"}(r||(t.ExpressionType=r={})),t.asTermType=function(e){if("namedNode"===e||"literal"===e||"blankNode"===e||"quad"===e)return e}},67112:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Named=void 0;const n=r(89702);t.Named=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.Named}}},27033:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operator=void 0;const n=r(89702);t.Operator=class{constructor(e,t){this.args=e,this.apply=t,this.expressionType=n.ExpressionType.Operator}}},3358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialOperator=void 0;const n=r(89702);t.SpecialOperator=class{constructor(e,t,r){this.args=e,this.applyAsync=t,this.applySynchronously=r,this.expressionType=n.ExpressionType.SpecialOperator}}},62293:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncExtension=void 0;const n=r(89702);t.SyncExtension=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.SyncExtension}}},79339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNonLexicalLiteral=t.NonLexicalLiteral=t.YearMonthDurationLiteral=t.DayTimeDurationLiteral=t.DurationLiteral=t.DateLiteral=t.TimeLiteral=t.DateTimeLiteral=t.StringLiteral=t.LangStringLiteral=t.BooleanLiteral=t.DoubleLiteral=t.FloatLiteral=t.DecimalLiteral=t.IntegerLiteral=t.NumericLiteral=t.Literal=t.isLiteralTermExpression=t.Quad=t.BlankNode=t.NamedNode=t.Term=void 0;const n=r(18050),i=r(50363),a=r(14624),o=r(14624),s=r(82867),c=r(19002),u=r(46157),l=r(89702),d=new n.DataFactory;class p{constructor(){this.expressionType=l.ExpressionType.Term}str(){throw new s.InvalidArgumentTypes([this],a.RegularOperator.STR)}coerceEBV(){throw new s.EBVCoercionError(this)}}t.Term=p,t.NamedNode=class extends p{constructor(e){super(),this.value=e,this.termType="namedNode"}toRDF(){return d.namedNode(this.value)}str(){return this.value}},t.BlankNode=class extends p{constructor(e){super(),this.termType="blankNode",this.value="string"==typeof e?d.blankNode(e):e}toRDF(){return this.value}},t.Quad=class extends p{constructor(e,t){super(),this.termType="quad",this.transformer=new i.TermTransformer(t),this.valueTerm=e}toRDF(){return this.valueTerm}get subject(){return this.transformer.transformRDFTermUnsafe(this.RDFsubject)}get predicate(){return this.transformer.transformRDFTermUnsafe(this.RDFpredicate)}get object(){return this.transformer.transformRDFTermUnsafe(this.RDFobject)}get RDFsubject(){return this.toRDF().subject}get RDFpredicate(){return this.toRDF().predicate}get RDFobject(){return this.toRDF().object}},t.isLiteralTermExpression=function(e){if("literal"===e.termType)return e};class h extends p{constructor(e,t,r,n){super(),this.typedValue=e,this.dataType=t,this.strValue=r,this.language=n,this.termType="literal"}toRDF(){return d.literal(this.strValue??this.str(),this.language??d.namedNode(this.dataType))}str(){return this.strValue??this.typedValue.toString()}}t.Literal=h;class f extends h{constructor(e,t,r,n){super(e,t,r,n),this.typedValue=e,this.strValue=r,this.language=n}coerceEBV(){return Boolean(this.typedValue)}toRDF(){const e=super.toRDF();return Number.isFinite(this.typedValue)||(e.value=e.value.replace("Infinity","INF")),e}str(){return this.strValue??this.specificFormatter(this.typedValue)}}t.NumericLiteral=f,t.IntegerLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_INTEGER,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toFixed(0)}},t.DecimalLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_DECIMAL,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toString()}},t.FloatLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_FLOAT,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toString()}},t.DoubleLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_DOUBLE,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){if(!Number.isFinite(e))return e>0?"INF":e<0?"-INF":"NaN";const t=e.toExponential(),[r,n]=t.split("e"),i=n.replace(/\+/u,"");return`${r.includes(".")?r:`${r}.0`}E${i}`}},t.BooleanLiteral=class extends h{constructor(e,t,r){super(e,r??o.TypeURL.XSD_BOOLEAN,t),this.typedValue=e,this.strValue=t}coerceEBV(){return this.typedValue}},t.LangStringLiteral=class extends h{constructor(e,t,r){super(e,r??o.TypeURL.RDF_LANG_STRING,e,t),this.typedValue=e,this.language=t}coerceEBV(){return this.str().length>0}},t.StringLiteral=class extends h{constructor(e,t){super(e,t??o.TypeURL.XSD_STRING,e),this.typedValue=e}coerceEBV(){return this.str().length>0}},t.DateTimeLiteral=class extends h{constructor(e,t,r){super(e,r??o.TypeURL.XSD_DATE_TIME,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDateTime)(this.typedValue)}},t.TimeLiteral=class extends h{constructor(e,t,r){super(e,r??o.TypeURL.XSD_TIME,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeTime)(this.typedValue)}},t.DateLiteral=class extends h{constructor(e,t,r){super(e,r??o.TypeURL.XSD_DATE,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDate)(this.typedValue)}};class y extends h{constructor(e,t,r){super(e,r??o.TypeURL.XSD_DURATION,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDuration)(this.typedValue)}}t.DurationLiteral=y,t.DayTimeDurationLiteral=class extends y{constructor(e,t,r){super(e,t,r??o.TypeURL.XSD_DAY_TIME_DURATION),this.typedValue=e,this.strValue=t}},t.YearMonthDurationLiteral=class extends h{constructor(e,t,r){super(e,r??o.TypeURL.XSD_YEAR_MONTH_DURATION,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDuration)(this.typedValue,"P0M")}};class g extends h{constructor(e,t,r,n,i){super({toString:()=>"undefined"},t,n,i),this.openWorldType=r}coerceEBV(){if((0,u.isSubTypeOf)(this.dataType,o.TypeURL.XSD_BOOLEAN,this.openWorldType)||(0,u.isSubTypeOf)(this.dataType,o.TypeAlias.SPARQL_NUMERIC,this.openWorldType))return!1;throw new s.EBVCoercionError(this)}toRDF(){return d.literal(this.str(),this.language??d.namedNode(this.dataType))}str(){return this.strValue??""}}t.NonLexicalLiteral=g,t.isNonLexicalLiteral=function(e){if(e instanceof g)return e}},28757:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0;const n=r(89702);t.Variable=class{constructor(e){this.expressionType=n.ExpressionType.Variable,this.name=e}}},11269:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(89702),t),i(r(28757),t),i(r(79339),t),i(r(27033),t),i(r(3358),t),i(r(67112),t),i(r(9950),t),i(r(75065),t),i(r(29360),t),i(r(62293),t)},57328:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialFunction=t.NamedFunction=t.RegularFunction=t.BaseFunction=void 0;const n=r(82867);class i{constructor(e,t){this.operator=e,this.apply=(e,t)=>(this.monomorph(e,t.superTypeProvider,t.functionArgumentsCache)??this.handleInvalidTypes(e))(t)(e),this.arity=t.arity,this.overloads=t.overloads}monomorph(e,t,r){return this.overloads.search(e,t,r)}}t.BaseFunction=i,t.RegularFunction=class extends i{constructor(e,t){super(e,t),this.functionClass="regular"}handleInvalidTypes(e){throw new n.InvalidArgumentTypes(e,this.operator)}},t.NamedFunction=class extends i{constructor(e,t){super(e,t),this.functionClass="named"}handleInvalidTypes(e){throw new n.InvalidArgumentTypes(e,this.operator)}},t.SpecialFunction=class{constructor(e,t){var r;this.operator=e,this.functionClass="special",this.arity=t.arity,this.applySynchronously=t.applySynchronously,this.applyAsync=t.applyAsync,this.checkArity=t.checkArity??(r=this.arity,e=>r===Number.POSITIVE_INFINITY||e.length===r)}}},63606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expressionToVar=t.dateTime=t.langString=t.string=t.double=t.float=t.decimal=t.integer=t.bool=t.Builder=t.declare=void 0;const n=r(18050),i=r(11269),a=r(11269),o=r(14624),s=r(14624),c=r(82867),u=r(33357),l=new n.DataFactory;t.declare=function(e){return new d(e)};class d{constructor(e){this.overloadTree=new u.OverloadTree(e),this.collected=!1}collect(){if(this.collected)throw new Error("Builders can only be collected once!");return this.collected=!0,this.overloadTree}static wrapInvalidLexicalProtected(e){return t=>r=>{for(const[e,t]of r.entries())if(t instanceof a.NonLexicalLiteral)throw new c.InvalidLexicalForm(r[e].toRDF());return e(t)(r)}}set(e,t,r=!0){return this.overloadTree.addOverload(e,r?d.wrapInvalidLexicalProtected(t):t),this}copy({from:e,to:t}){const r=this.overloadTree.getImplementationExact(e);if(!r)throw new c.UnexpectedError("Tried to copy implementation, but types not found",{from:e,to:t});return this.set(t,r)}onUnary(e,t,r=!0){return this.set([e],(e=>([r])=>t(e)(r)),r)}onUnaryTyped(e,t,r=!0){return this.set([e],(e=>([r])=>t(e)(r.typedValue)),r)}onBinary(e,t,r=!0){return this.set(e,(e=>([r,n])=>t(e)(r,n)),r)}onBinaryTyped(e,t,r=!0){return this.set(e,(e=>([r,n])=>t(e)(r.typedValue,n.typedValue)),r)}onTernaryTyped(e,t,r=!0){return this.set(e,(e=>([r,n,i])=>t(e)(r.typedValue,n.typedValue,i.typedValue)),r)}onTernary(e,t,r=!0){return this.set(e,(e=>([r,n,i])=>t(e)(r,n,i)),r)}onQuaternaryTyped(e,t,r=!0){return this.set(e,(e=>([r,n,i,a])=>t(e)(r.typedValue,n.typedValue,i.typedValue,a.typedValue)),r)}onTerm1(e,t=!1){return this.set(["term"],(t=>([r])=>e(t)(r)),t)}onTerm3(e){return this.set(["term","term","term"],(t=>([r,n,i])=>e(t)(r,n,i)))}onQuad1(e){return this.set(["quad"],(t=>([r])=>e(t)(r)))}onLiteral1(e,t=!0){return this.set(["literal"],(t=>([r])=>e(t)(r)),t)}onBoolean1(e,t=!0){return this.set([o.TypeURL.XSD_BOOLEAN],(t=>([r])=>e(t)(r)),t)}onBoolean1Typed(e,t=!0){return this.set([o.TypeURL.XSD_BOOLEAN],(t=>([r])=>e(t)(r.typedValue)),t)}onString1(e,t=!0){return this.set([o.TypeURL.XSD_STRING],(t=>([r])=>e(t)(r)),t)}onString1Typed(e,t=!0){return this.set([o.TypeURL.XSD_STRING],(t=>([r])=>e(t)(r.typedValue)),t)}onLangString1(e,t=!0){return this.set([o.TypeURL.RDF_LANG_STRING],(t=>([r])=>e(t)(r)),t)}onStringly1(e,t=!0){return this.set([o.TypeAlias.SPARQL_STRINGLY],(t=>([r])=>e(t)(r)),t)}onStringly1Typed(e,t=!0){return this.set([o.TypeAlias.SPARQL_STRINGLY],(t=>([r])=>e(t)(r.typedValue)),t)}onNumeric1(e,t=!0){return this.set([o.TypeAlias.SPARQL_NUMERIC],(t=>([r])=>e(t)(r)),t)}onDateTime1(e,t=!0){return this.set([o.TypeURL.XSD_DATE_TIME],(t=>([r])=>e(t)(r)),t)}numericConverter(e,t=!0){const r=t=>r=>e(t)(r.typedValue);return this.onUnary(s.TypeURL.XSD_INTEGER,(e=>t=>h(r(e)(t))),t).onUnary(s.TypeURL.XSD_DECIMAL,(e=>t=>f(r(e)(t))),t).onUnary(s.TypeURL.XSD_FLOAT,(e=>t=>y(r(e)(t))),t).onUnary(s.TypeURL.XSD_DOUBLE,(e=>t=>g(r(e)(t))),t)}arithmetic(e,t=!0){const r=t=>(r,n)=>e(t)(r.typedValue,n.typedValue);return this.onBinary([s.TypeURL.XSD_INTEGER,s.TypeURL.XSD_INTEGER],(e=>(t,n)=>h(r(e)(t,n))),t).onBinary([s.TypeURL.XSD_DECIMAL,s.TypeURL.XSD_DECIMAL],(e=>(t,n)=>f(r(e)(t,n))),t).onBinary([s.TypeURL.XSD_FLOAT,s.TypeURL.XSD_FLOAT],(e=>(t,n)=>y(r(e)(t,n))),t).onBinary([s.TypeURL.XSD_DOUBLE,s.TypeURL.XSD_DOUBLE],(e=>(t,n)=>g(r(e)(t,n))),t)}numberTest(e){return this.numeric((t=>([r,n])=>p(e(t)(r.typedValue,n.typedValue))))}stringTest(e,t=!0){return this.set([o.TypeURL.XSD_STRING,o.TypeURL.XSD_STRING],(t=>([r,n])=>p(e(t)(r.typedValue,n.typedValue))),t)}booleanTest(e,t=!0){return this.set([o.TypeURL.XSD_BOOLEAN,o.TypeURL.XSD_BOOLEAN],(t=>([r,n])=>p(e(t)(r.typedValue,n.typedValue))),t)}dateTimeTest(e,t=!0){return this.set([o.TypeURL.XSD_DATE_TIME,o.TypeURL.XSD_DATE_TIME],(t=>([r,n])=>p(e(t)(r.typedValue,n.typedValue))),t)}numeric(e){return this.set([o.TypeAlias.SPARQL_NUMERIC,o.TypeAlias.SPARQL_NUMERIC],e)}}function p(e){return new i.BooleanLiteral(e)}function h(e){return new i.IntegerLiteral(e)}function f(e){return new i.DecimalLiteral(e)}function y(e){return new i.FloatLiteral(e)}function g(e){return new i.DoubleLiteral(e)}t.Builder=d,t.bool=p,t.integer=h,t.decimal=f,t.float=y,t.double=g,t.string=function(e){return new i.StringLiteral(e)},t.langString=function(e,t){return new i.LangStringLiteral(e,t)},t.dateTime=function(e,t){return new i.DateTimeLiteral(e,t)},t.expressionToVar=function(e){return l.variable(e.name.slice(1))}},58157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namedDefinitions=void 0;const n=r(11269),i=r(11269),a=r(14624),o=r(76660),s=r(82867),c=r(17590),u=r(63606),l={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_STRING).onNumeric1((()=>e=>(0,u.string)((0,u.float)(e.typedValue).str()))).onBoolean1Typed((()=>e=>(0,u.string)((0,u.bool)(e).str()))).onTerm1((()=>e=>(0,u.string)(e.str()))).collect()},d={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_FLOAT).onNumeric1((()=>e=>(0,u.float)(e.typedValue))).onBoolean1Typed((()=>e=>(0,u.float)(e?1:0))).onUnary(a.TypeURL.XSD_STRING,(()=>e=>{const t=(0,c.parseXSDFloat)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_FLOAT);return(0,u.float)(t)}),!1).collect()},p={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DOUBLE).onNumeric1((()=>e=>(0,u.double)(e.typedValue))).onBoolean1Typed((()=>e=>(0,u.double)(e?1:0))).onUnary(a.TypeURL.XSD_STRING,(()=>e=>{const t=(0,c.parseXSDFloat)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_DOUBLE);return(0,u.double)(t)}),!1).collect()},h={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DECIMAL).onNumeric1((()=>e=>{const t=(0,c.parseXSDDecimal)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_DECIMAL);return(0,u.decimal)(t)})).onString1((()=>e=>{const t=e.str(),r=/^([+-])?(\d+(\.\d+)?)$/u.test(t)?(0,c.parseXSDDecimal)(t):void 0;if(void 0===r)throw new s.CastError(e,a.TypeURL.XSD_DECIMAL);return(0,u.decimal)(r)}),!1).onBoolean1Typed((()=>e=>(0,u.decimal)(e?1:0))).collect()},f={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_INTEGER).onBoolean1Typed((()=>e=>(0,u.integer)(e?1:0))).onNumeric1((()=>e=>{const t=(0,c.parseXSDInteger)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_INTEGER);return(0,u.integer)(t)}),!1).onString1((()=>e=>{const t=e.str(),r=/^\d+$/u.test(t)?(0,c.parseXSDInteger)(t):void 0;if(void 0===r)throw new s.CastError(e,a.TypeURL.XSD_INTEGER);return(0,u.integer)(r)})).collect()},y={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DATE_TIME).onUnary(a.TypeURL.XSD_DATE_TIME,(()=>e=>e)).onUnary(a.TypeURL.XSD_STRING,(()=>e=>(0,u.dateTime)((0,c.parseDateTime)(e.str()),e.str())),!1).onUnary(a.TypeURL.XSD_DATE,(()=>e=>new n.DateTimeLiteral({...e.typedValue,hours:0,minutes:0,seconds:0}))).collect()},g={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_BOOLEAN).onNumeric1((()=>e=>(0,u.bool)(e.coerceEBV())),!0).onUnary(a.TypeURL.XSD_BOOLEAN,(()=>e=>(0,u.bool)(e.coerceEBV())),!0).onUnary(a.TypeURL.XSD_STRING,(()=>e=>{switch(e.str()){case"true":case"1":return(0,u.bool)(!0);case"false":case"0":return(0,u.bool)(!1);default:throw new s.CastError(e,a.TypeURL.XSD_BOOLEAN)}}),!1).collect()},m={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_TIME).onUnary(a.TypeURL.XSD_TIME,(()=>e=>new n.TimeLiteral(e.typedValue,e.strValue))).onUnary(a.TypeURL.XSD_DATE_TIME,(()=>e=>new n.TimeLiteral(e.typedValue))).onStringly1((()=>e=>new n.TimeLiteral((0,c.parseTime)(e.str())))).collect()},b={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DATE).onUnary(a.TypeURL.XSD_DATE,(()=>e=>new n.DateLiteral(e.typedValue,e.strValue))).onUnary(a.TypeURL.XSD_DATE_TIME,(()=>e=>new n.DateLiteral(e.typedValue))).onStringly1((()=>e=>new n.DateLiteral((0,c.parseDate)(e.str())))).collect()},v={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DURATION).onUnary(a.TypeURL.XSD_DURATION,(()=>e=>new n.DurationLiteral(e.typedValue,e.strValue))).onStringly1((()=>e=>new i.DurationLiteral((0,c.parseDuration)(e.str())))).collect()},_={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DAY_TIME_DURATION).onUnary(a.TypeURL.XSD_DURATION,(()=>e=>new n.DayTimeDurationLiteral((0,o.trimToDayTimeDuration)(e.typedValue)))).onStringly1((()=>e=>new n.DayTimeDurationLiteral((0,c.parseDayTimeDuration)(e.str())))).collect()},w={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_YEAR_MONTH_DURATION).onUnary(a.TypeURL.XSD_DURATION,(()=>e=>new n.YearMonthDurationLiteral((0,o.trimToYearMonthDuration)(e.typedValue)))).onStringly1((()=>e=>new n.YearMonthDurationLiteral((0,c.parseYearMonthDuration)(e.str())))).collect()};t.namedDefinitions={[a.TypeURL.XSD_STRING]:l,[a.TypeURL.XSD_FLOAT]:d,[a.TypeURL.XSD_DOUBLE]:p,[a.TypeURL.XSD_DECIMAL]:h,[a.TypeURL.XSD_INTEGER]:f,[a.TypeURL.XSD_DATE_TIME]:y,[a.TypeURL.XSD_DATE]:b,[a.TypeURL.XSD_BOOLEAN]:g,[a.TypeURL.XSD_TIME]:m,[a.TypeURL.XSD_DURATION]:v,[a.TypeURL.XSD_DAY_TIME_DURATION]:_,[a.TypeURL.XSD_YEAR_MONTH_DURATION]:w}},33357:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OverloadTree=void 0;const n=r(11269),i=r(46157);class a{constructor(e,t){this.identifier=e,this.implementation=void 0,this.generalOverloads=Object.create(null),this.literalOverLoads=[],this.depth=t??0,this.promotionCount=void 0}getSubtree(e){const t=(0,i.asGeneralType)(e);if(t)return this.generalOverloads[t];for(const[t,r]of this.literalOverLoads)if(e===t)return r}getImplementationExact(e){let t=this;for(const r of e)if(t=t.getSubtree(r),!t)return;return t.implementation}search(e,t,r){let i=r[this.identifier],a=0;for(;a({node:e,index:1}))));o.length>0;){const{index:n,node:i}=o.pop();if(n===e.length&&i.implementation)return this.addToCache(r,e,i.implementation),i.implementation;o.push(...i.getSubTreeWithArg(e[n],t).map((e=>({node:e,index:n+1}))))}}addToCache(e,t,r){function i(e,t){return t in e||(e[t]={}),e[t]}let a=i(e,this.identifier);for(const e of t){const t=(0,n.isLiteralTermExpression)(e),r=t?t.dataType:e.termType;a.cache=a.cache??{},a=i(a.cache,r)}a.func=r}addOverload(e,t){this._addOverload([...e],t,0)}_addOverload(e,t,r){const[n,...o]=e;if(!n)return void((void 0===this.promotionCount||r<=this.promotionCount)&&(this.promotionCount=r,this.implementation=t));let s=this.getSubtree(n);if(!s){const e=new a(this.identifier,this.depth+1),t=(0,i.asGeneralType)(n);t&&(this.generalOverloads[t]=e);const r=(0,i.asOverrideType)(n);r&&this.literalOverLoads.push([r,e]),s=e}if(s._addOverload(o,t,r),i.typePromotion[n])for(const e of i.typePromotion[n])this.addPromotedOverload(e.typeToPromote,t,e.conversionFunction,o,r)}addPromotedOverload(e,t,r,n,i){let o=this.getSubtree(e);if(!o){const t=new a(this.identifier,this.depth+1);this.literalOverLoads.push([e,t]),o=t}o._addOverload(n,(e=>n=>t(e)([...n.slice(0,this.depth),r(n[this.depth]),...n.slice(this.depth+1,n.length)])),i+1)}getSubTreeWithArg(e,t){const r=[],a=(0,n.isLiteralTermExpression)(e);if(this.generalOverloads.term&&r.push(this.generalOverloads.term),this.generalOverloads[e.termType]&&r.push(this.generalOverloads[e.termType]),a){const e=(0,i.asKnownLiteralType)(a.dataType);let n;n=e?i.superTypeDictTable[e]:(0,i.getSuperTypes)(a.dataType,t);const o=this.literalOverLoads.filter((([e,t])=>e in n)).map((([e,t])=>[n[e],t]));o.sort((([e,t],[r,n])=>e-r)),r.push(...o.map((([e,t])=>t)))}return r}}t.OverloadTree=a},22122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.definitions=void 0;const n=r(55553),i=r(99499),a=r(18050),o=r(9929),s=r(88110),c=r(84596),u=r(11269),l=r(50363),d=r(14624),p=r(14624),h=r(76660),f=r(82867),y=r(20236),g=r(66487),m=r(57328),b=r(63606),v=r(29791),_=r(42711),w=new a.DataFactory,T={arity:1,overloads:(0,b.declare)(d.RegularOperator.NOT).onTerm1((()=>e=>(0,b.bool)(!e.coerceEBV()))).collect()},S={arity:1,overloads:(0,b.declare)(d.RegularOperator.UPLUS).numericConverter((()=>e=>e)).collect()},O={arity:1,overloads:(0,b.declare)(d.RegularOperator.UMINUS).numericConverter((()=>e=>-e)).collect()},E={arity:2,overloads:(0,b.declare)(d.RegularOperator.MULTIPLICATION).arithmetic((()=>(e,t)=>new n.BigNumber(e).times(t).toNumber())).collect()},x={arity:2,overloads:(0,b.declare)(d.RegularOperator.DIVISION).arithmetic((()=>(e,t)=>new n.BigNumber(e).div(t).toNumber())).onBinaryTyped([p.TypeURL.XSD_INTEGER,p.TypeURL.XSD_INTEGER],(()=>(e,t)=>{if(0===t)throw new f.ExpressionError("Integer division by 0");return(0,b.decimal)(new n.BigNumber(e).div(t).toNumber())})).collect()},A={arity:2,overloads:(0,b.declare)(d.RegularOperator.ADDITION).arithmetic((()=>(e,t)=>new n.BigNumber(e).plus(t).toNumber())).set([p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateTimeLiteral((0,g.addDurationToDateTime)(e.typedValue,(0,h.defaultedDurationRepresentation)(t.typedValue))))).copy({from:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],to:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([p.TypeURL.XSD_DATE,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateLiteral((0,g.addDurationToDateTime)((0,h.defaultedDateTimeRepresentation)(e.typedValue),(0,h.defaultedDurationRepresentation)(t.typedValue))))).copy({from:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_DAY_TIME_DURATION],to:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([p.TypeURL.XSD_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.TimeLiteral((0,g.addDurationToDateTime)((0,h.defaultedDateTimeRepresentation)(e.typedValue),(0,h.defaultedDurationRepresentation)(t.typedValue))))).copy({from:[p.TypeURL.XSD_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],to:[p.TypeURL.XSD_TIME,p.TypeURL.XSD_YEAR_MONTH_DURATION]}).collect()},R={arity:2,overloads:(0,b.declare)(d.RegularOperator.SUBTRACTION).arithmetic((()=>(e,t)=>new n.BigNumber(e).minus(t).toNumber())).set([p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DATE_TIME],(({defaultTimeZone:e})=>([t,r])=>new u.DayTimeDurationLiteral((0,g.elapsedDuration)(t.typedValue,r.typedValue,e)))).copy({from:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_DATE]}).copy({from:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_TIME,p.TypeURL.XSD_TIME]}).set([p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateTimeLiteral((0,g.addDurationToDateTime)(e.typedValue,(0,h.defaultedDurationRepresentation)((0,h.negateDuration)(t.typedValue)))))).copy({from:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],to:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([p.TypeURL.XSD_DATE,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateLiteral((0,g.addDurationToDateTime)((0,h.defaultedDateTimeRepresentation)(e.typedValue),(0,h.defaultedDurationRepresentation)((0,h.negateDuration)(t.typedValue)))))).copy({from:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_DAY_TIME_DURATION],to:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([p.TypeURL.XSD_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.TimeLiteral((0,g.addDurationToDateTime)((0,h.defaultedDateTimeRepresentation)(e.typedValue),(0,h.defaultedDurationRepresentation)((0,h.negateDuration)(t.typedValue)))))).collect()},I={arity:2,overloads:(0,b.declare)(d.RegularOperator.EQUAL).numberTest((()=>(e,t)=>e===t)).stringTest((()=>(e,t)=>0===e.localeCompare(t))).set([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>([e,t])=>(0,b.bool)(e.str()===t.str()&&e.language===t.language))).set([p.TypeAlias.SPARQL_STRINGLY,p.TypeAlias.SPARQL_STRINGLY],(()=>()=>(0,b.bool)(!1))).booleanTest((()=>(e,t)=>e===t)).dateTimeTest((({defaultTimeZone:e})=>(t,r)=>(0,h.toUTCDate)(t,e).getTime()===(0,h.toUTCDate)(r,e).getTime())).copy({from:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_DATE]}).set(["quad","quad"],(e=>([t,r])=>{const n=new m.RegularFunction(p.RegularOperator.EQUAL,I);return(0,b.bool)(n.apply([t.subject,r.subject],e).coerceEBV()&&n.apply([t.predicate,r.predicate],e).coerceEBV()&&n.apply([t.object,r.object],e).coerceEBV())}),!1).set(["term","term"],(()=>([e,t])=>(0,b.bool)(function(e,t){const r=e.toRDF(),n=t.toRDF(),i=r.equals(n);if(!i&&"Literal"===r.termType&&"Literal"===n.termType)throw new f.RDFEqualTypeError([e,t]);return i}(e,t))),!1).set([p.TypeURL.XSD_DURATION,p.TypeURL.XSD_DURATION],(()=>([e,t])=>(0,b.bool)((0,h.yearMonthDurationsToMonths)((0,h.defaultedYearMonthDurationRepresentation)(e.typedValue))===(0,h.yearMonthDurationsToMonths)((0,h.defaultedYearMonthDurationRepresentation)(t.typedValue))&&(0,h.dayTimeDurationsToSeconds)((0,h.defaultedDayTimeDurationRepresentation)(e.typedValue))===(0,h.dayTimeDurationsToSeconds)((0,h.defaultedDayTimeDurationRepresentation)(t.typedValue))))).set([p.TypeURL.XSD_TIME,p.TypeURL.XSD_TIME],(({defaultTimeZone:e})=>([t,r])=>(0,b.bool)((0,h.toUTCDate)((0,h.defaultedDateTimeRepresentation)(t.typedValue),e).getTime()===(0,h.toUTCDate)((0,h.defaultedDateTimeRepresentation)(r.typedValue),e).getTime()))).collect()},P={arity:2,overloads:(0,b.declare)(d.RegularOperator.NOT_EQUAL).set(["term","term"],(e=>([t,r])=>(0,b.bool)(!_.regularFunctions[d.RegularOperator.EQUAL].apply([t,r],e).typedValue))).collect()},N={arity:2,overloads:(0,b.declare)(d.RegularOperator.LT).numberTest((()=>(e,t)=>e(e,t)=>-1===e.localeCompare(t))).booleanTest((()=>(e,t)=>e([e,t])=>(0,b.bool)(-1===(0,y.orderTypes)(e.toRDF(),t.toRDF(),!0))),!1).dateTimeTest((({defaultTimeZone:e})=>(t,r)=>(0,h.toUTCDate)(t,e).getTime()<(0,h.toUTCDate)(r,e).getTime())).copy({from:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_DATE]}).set([p.TypeURL.XSD_YEAR_MONTH_DURATION,p.TypeURL.XSD_YEAR_MONTH_DURATION],(()=>([e,t])=>(0,b.bool)((0,h.yearMonthDurationsToMonths)((0,h.defaultedYearMonthDurationRepresentation)(e.typedValue))<(0,h.yearMonthDurationsToMonths)((0,h.defaultedYearMonthDurationRepresentation)(t.typedValue))))).set([p.TypeURL.XSD_DAY_TIME_DURATION,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>(0,b.bool)((0,h.dayTimeDurationsToSeconds)((0,h.defaultedDayTimeDurationRepresentation)(e.typedValue))<(0,h.dayTimeDurationsToSeconds)((0,h.defaultedDayTimeDurationRepresentation)(t.typedValue))))).set([p.TypeURL.XSD_TIME,p.TypeURL.XSD_TIME],(({defaultTimeZone:e})=>([t,r])=>(0,b.bool)((0,h.toUTCDate)((0,h.defaultedDateTimeRepresentation)(t.typedValue),e).getTime()<(0,h.toUTCDate)((0,h.defaultedDateTimeRepresentation)(r.typedValue),e).getTime()))).collect()},D={arity:2,overloads:(0,b.declare)(d.RegularOperator.GT).set(["term","term"],(e=>([t,r])=>_.regularFunctions[d.RegularOperator.LT].apply([r,t],e))).collect()},j={arity:2,overloads:(0,b.declare)(d.RegularOperator.LTE).set(["term","term"],(e=>([t,r])=>(0,b.bool)(_.regularFunctions[d.RegularOperator.LT].apply([t,r],e).typedValue||_.regularFunctions[d.RegularOperator.EQUAL].apply([t,r],e).typedValue))).collect()},C={arity:2,overloads:(0,b.declare)(d.RegularOperator.GTE).set(["term","term"],(e=>([t,r])=>_.regularFunctions[d.RegularOperator.LTE].apply([r,t],e))).collect()},M={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_IRI).onTerm1((()=>e=>(0,b.bool)("namedNode"===e.termType))).collect()},L={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_BLANK).onTerm1((()=>e=>(0,b.bool)("blankNode"===e.termType))).collect()},k={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_LITERAL).onTerm1((()=>e=>(0,b.bool)("literal"===e.termType))).collect()},F={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_NUMERIC).onNumeric1((()=>()=>(0,b.bool)(!0))).onTerm1((()=>()=>(0,b.bool)(!1))).collect()},B={arity:1,overloads:(0,b.declare)(d.RegularOperator.STR).onTerm1((()=>e=>(0,b.string)(e.str()))).collect()},U={arity:1,overloads:(0,b.declare)(d.RegularOperator.LANG).onLiteral1((()=>e=>(0,b.string)(e.language??""))).collect()},q={arity:1,overloads:(0,b.declare)(d.RegularOperator.DATATYPE).onLiteral1((()=>e=>new u.NamedNode(e.dataType))).collect()},V={arity:1,overloads:(0,b.declare)(d.RegularOperator.IRI).set(["namedNode"],(e=>t=>{const r=t[0],n=(0,o.resolve)(r.str(),e.baseIRI??"");return new u.NamedNode(n)})).onString1((e=>t=>{const r=(0,o.resolve)(t.str(),e.baseIRI??"");return new u.NamedNode(r)})).collect()},Q={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRDT).set([p.TypeURL.XSD_STRING,"namedNode"],(({superTypeProvider:e})=>([t,r])=>{const n=w.literal(t.typedValue,w.namedNode(r.value));return new l.TermTransformer(e).transformLiteral(n)})).collect()},$={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRLANG).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>new u.LangStringLiteral(e,t.toLowerCase()))).collect()},H={arity:0,overloads:(0,b.declare)(d.RegularOperator.UUID).set([],(()=>()=>new u.NamedNode(`urn:uuid:${c.v4()}`))).collect()},G={arity:0,overloads:(0,b.declare)(d.RegularOperator.STRUUID).set([],(()=>()=>(0,b.string)(c.v4()))).collect()},z={arity:1,overloads:(0,b.declare)(d.RegularOperator.STRLEN).onStringly1((()=>e=>(0,b.integer)([...e.typedValue].length))).collect()},K={arity:[2,3],overloads:(0,b.declare)(d.RegularOperator.SUBSTR).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_INTEGER],(()=>(e,t)=>(0,b.string)([...e].slice(t-1).join("")))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_INTEGER],(()=>(e,t)=>{const r=[...e.typedValue].slice(t.typedValue-1).join("");return(0,b.langString)(r,e.language)})).onTernaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_INTEGER,p.TypeURL.XSD_INTEGER],(()=>(e,t,r)=>(0,b.string)([...e].slice(t-1,r+t-1).join("")))).onTernary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_INTEGER,p.TypeURL.XSD_INTEGER],(()=>(e,t,r)=>{const n=[...e.typedValue].slice(t.typedValue-1,r.typedValue+t.typedValue-1).join("");return(0,b.langString)(n,e.language)})).collect()},X={arity:1,overloads:(0,b.declare)(d.RegularOperator.UCASE).onString1Typed((()=>e=>(0,b.string)(e.toUpperCase()))).onLangString1((()=>e=>(0,b.langString)(e.typedValue.toUpperCase(),e.language))).collect()},J={arity:1,overloads:(0,b.declare)(d.RegularOperator.LCASE).onString1Typed((()=>e=>(0,b.string)(e.toLowerCase()))).onLangString1((()=>e=>(0,b.langString)(e.typedValue.toLowerCase(),e.language))).collect()},W={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRSTARTS).onBinaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(e.startsWith(t)))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);return(0,b.bool)(e.typedValue.startsWith(t.typedValue))})).collect()},Y={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRENDS).onBinaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(e.endsWith(t)))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);return(0,b.bool)(e.typedValue.endsWith(t.typedValue))})).collect()},Z={arity:2,overloads:(0,b.declare)(d.RegularOperator.CONTAINS).onBinaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(e.includes(t)))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);return(0,b.bool)(e.typedValue.includes(t.typedValue))})).collect()},ee={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRBEFORE).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.string)(e.slice(0,Math.max(0,e.indexOf(t)))))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>{const[r,n]=[e.typedValue,t.typedValue],i=e.typedValue.slice(0,Math.max(0,r.indexOf(n)));return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);const[r,n]=[e.typedValue,t.typedValue],i=e.typedValue.slice(0,Math.max(0,r.indexOf(n)));return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).collect()},te={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRAFTER).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.string)(e.slice(e.indexOf(t)).slice(t.length)))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>{const[r,n]=[e.typedValue,t.typedValue],i=r.slice(r.indexOf(n)).slice(n.length);return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);const[r,n]=[e.typedValue,t.typedValue],i=r.slice(r.indexOf(n)).slice(n.length);return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).collect()},re={arity:1,overloads:(0,b.declare)(d.RegularOperator.ENCODE_FOR_URI).onStringly1Typed((()=>e=>(0,b.string)(encodeURI(e)))).collect()},ne={arity:2,overloads:(0,b.declare)(d.RegularOperator.LANG_MATCHES).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(v.langMatches(e,t)))).collect()},ie={arity:[2,3],overloads:(0,b.declare)(d.RegularOperator.REGEX).onBinaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING],(function(){return(e,t)=>(0,b.bool)(v.matches(e,t))})).onTernaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(function(){return(e,t,r)=>(0,b.bool)(v.matches(e,t,r))})).collect()},ae={arity:[3,4],overloads:(0,b.declare)(d.RegularOperator.REPLACE).onTernaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t,r)=>(0,b.string)(v.replace(e,t,r)))).set([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>([e,t,r])=>{const n=v.replace(e.typedValue,t.typedValue,r.typedValue);return(0,b.langString)(n,e.language)})).onQuaternaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t,r,n)=>(0,b.string)(v.replace(e,t,r,n)))).set([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>([e,t,r,n])=>{const i=v.replace(e.typedValue,t.typedValue,r.typedValue,n.typedValue);return(0,b.langString)(i,e.language)})).collect()},oe={arity:1,overloads:(0,b.declare)(d.RegularOperator.ABS).numericConverter((()=>e=>Math.abs(e))).collect()},se={arity:1,overloads:(0,b.declare)(d.RegularOperator.ROUND).numericConverter((()=>e=>Math.round(e))).collect()},ce={arity:1,overloads:(0,b.declare)(d.RegularOperator.CEIL).numericConverter((()=>e=>Math.ceil(e))).collect()},ue={arity:1,overloads:(0,b.declare)(d.RegularOperator.FLOOR).numericConverter((()=>e=>Math.floor(e))).collect()},le={arity:0,overloads:(0,b.declare)(d.RegularOperator.RAND).set([],(()=>()=>(0,b.double)(Math.random()))).collect()},de={arity:0,overloads:(0,b.declare)(d.RegularOperator.NOW).set([],(e=>()=>new u.DateTimeLiteral((0,h.toDateTimeRepresentation)({date:e.now,timeZone:e.defaultTimeZone})))).collect()},pe={arity:1,overloads:(0,b.declare)(d.RegularOperator.YEAR).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.year))).set([p.TypeURL.XSD_DATE],(()=>([e])=>(0,b.integer)(e.typedValue.year))).collect()},he={arity:1,overloads:(0,b.declare)(d.RegularOperator.MONTH).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.month))).set([p.TypeURL.XSD_DATE],(()=>([e])=>(0,b.integer)(e.typedValue.month))).collect()},fe={arity:1,overloads:(0,b.declare)(d.RegularOperator.DAY).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.day))).set([p.TypeURL.XSD_DATE],(()=>([e])=>(0,b.integer)(e.typedValue.day))).collect()},ye={arity:1,overloads:(0,b.declare)(d.RegularOperator.HOURS).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.hours))).set([p.TypeURL.XSD_TIME],(()=>([e])=>(0,b.integer)(e.typedValue.hours))).collect()},ge={arity:1,overloads:(0,b.declare)(d.RegularOperator.MINUTES).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.minutes))).set([p.TypeURL.XSD_TIME],(()=>([e])=>(0,b.integer)(e.typedValue.minutes))).collect()},me={arity:1,overloads:(0,b.declare)(d.RegularOperator.SECONDS).onDateTime1((()=>e=>(0,b.decimal)(e.typedValue.seconds))).set([p.TypeURL.XSD_TIME],(()=>([e])=>(0,b.integer)(e.typedValue.seconds))).collect()},be={arity:1,overloads:(0,b.declare)(d.RegularOperator.TIMEZONE).onDateTime1((()=>e=>{const t={hours:e.typedValue.zoneHours,minutes:e.typedValue.zoneMinutes};if(void 0===t.hours&&void 0===t.minutes)throw new f.InvalidTimezoneCall(e.str());return new u.DayTimeDurationLiteral(t)})).copy({from:[p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_DATE]}).copy({from:[p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_TIME]}).collect()},ve={arity:1,overloads:(0,b.declare)(d.RegularOperator.TZ).onDateTime1((()=>e=>(0,b.string)((0,h.extractRawTimeZone)(e.str())))).copy({from:[p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_DATE]}).copy({from:[p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_TIME]}).collect()},_e={arity:1,overloads:(0,b.declare)(d.RegularOperator.MD5).onString1Typed((()=>e=>(0,b.string)((0,s.hash)(e)))).collect()},we={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA1).onString1Typed((()=>e=>(0,b.string)((0,i.sha1)().update(e).digest("hex")))).collect()},Te={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA256).onString1Typed((()=>e=>(0,b.string)((0,i.sha256)().update(e).digest("hex")))).collect()},Se={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA384).onString1Typed((()=>e=>(0,b.string)((0,i.sha384)().update(e).digest("hex")))).collect()},Oe={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA512).onString1Typed((()=>e=>(0,b.string)((0,i.sha512)().update(e).digest("hex")))).collect()},Ee={arity:3,overloads:(0,b.declare)(d.RegularOperator.TRIPLE).onTerm3((e=>(...t)=>new u.Quad(w.quad(t[0].toRDF(),t[1].toRDF(),t[2].toRDF()),e.superTypeProvider))).collect()},xe={arity:1,overloads:(0,b.declare)(d.RegularOperator.SUBJECT).onQuad1((()=>e=>e.subject)).collect()},Ae={arity:1,overloads:(0,b.declare)(d.RegularOperator.PREDICATE).onQuad1((()=>e=>e.predicate)).collect()},Re={arity:1,overloads:(0,b.declare)(d.RegularOperator.OBJECT).onQuad1((()=>e=>e.object)).collect()},Ie={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_TRIPLE).onTerm1((()=>e=>(0,b.bool)("quad"===e.termType))).collect()};t.definitions={"!":T,uplus:S,uminus:O,"*":E,"/":x,"+":A,"-":R,"=":I,"!=":P,"<":N,">":D,"<=":j,">=":C,isiri:M,isuri:M,isblank:L,isliteral:k,isnumeric:F,str:B,lang:U,datatype:q,iri:V,uri:V,strdt:Q,strlang:$,uuid:H,struuid:G,strlen:z,substr:K,ucase:X,lcase:J,strstarts:W,strends:Y,contains:Z,strbefore:ee,strafter:te,encode_for_uri:re,langmatches:ne,regex:ie,replace:ae,abs:oe,round:se,ceil:ce,floor:ue,rand:le,now:de,year:pe,month:he,day:fe,hours:ye,minutes:ge,seconds:me,timezone:be,tz:ve,md5:_e,sha1:we,sha256:Te,sha384:Se,sha512:Oe,triple:Ee,subject:xe,predicate:Ae,object:Re,istriple:Ie}},96443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.specialDefinitions=void 0;const n=r(84596),i=r(11269),a=r(14624),o=r(82867),s=r(63606),c=r(42711),u={arity:1,applyAsync:async({args:e,mapping:t})=>l({args:e,mapping:t}),applySynchronously:({args:e,mapping:t})=>l({args:e,mapping:t})};function l({args:e,mapping:t}){const r=e[0];if(r.expressionType!==i.ExpressionType.Variable)throw new o.InvalidArgumentTypes(e,a.SpecialOperator.BOUND);const n=t.has((0,s.expressionToVar)(r));return(0,s.bool)(n)}const d={arity:3,async applyAsync({args:e,mapping:t,evaluate:r}){const n=await r(e[0],t);return r(n.coerceEBV()?e[1]:e[2],t)},applySynchronously({args:e,mapping:t,evaluate:r}){const n=r(e[0],t);return r(n.coerceEBV()?e[1]:e[2],t)}},p={arity:Number.POSITIVE_INFINITY,async applyAsync({args:e,mapping:t,evaluate:r}){const n=[];for(const i of e)try{return await r(i,t)}catch(e){n.push(e)}throw new o.CoalesceError(n)},applySynchronously({args:e,mapping:t,evaluate:r}){const n=[];for(const i of e)try{return r(i,t)}catch(e){n.push(e)}throw new o.CoalesceError(n)}},h={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if((await r(n,t)).coerceEBV())return(0,s.bool)(!0);const e=(await r(i,t)).coerceEBV();return(0,s.bool)(e)}catch(e){if(!(await r(i,t)).coerceEBV())throw e;return(0,s.bool)(!0)}},applySynchronously({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(r(n,t).coerceEBV())return(0,s.bool)(!0);const e=r(i,t).coerceEBV();return(0,s.bool)(e)}catch(e){if(!r(i,t).coerceEBV())throw e;return(0,s.bool)(!0)}}},f={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(!(await r(n,t)).coerceEBV())return(0,s.bool)(!1);const e=(await r(i,t)).coerceEBV();return(0,s.bool)(e)}catch(e){if((await r(i,t)).coerceEBV())throw e;return(0,s.bool)(!1)}},applySynchronously({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(!r(n,t).coerceEBV())return(0,s.bool)(!1);const e=r(i,t).coerceEBV();return(0,s.bool)(e)}catch(e){if(r(i,t).coerceEBV())throw e;return(0,s.bool)(!1)}}},y={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e.map((e=>r(e,t))),[a,o]=await Promise.all([n,i]);return(0,s.bool)(a.toRDF().equals(o.toRDF()))},applySynchronously({args:e,mapping:t,evaluate:r}){const[n,i]=e.map((e=>r(e,t)));return(0,s.bool)(n.toRDF().equals(i.toRDF()))}},g={arity:Number.POSITIVE_INFINITY,checkArity:e=>e.length>0,async applyAsync(e){const{args:t,mapping:r,evaluate:n}=e,[i,...a]=t;return m(await n(i,r),{...e,args:a},[])},applySynchronously(e){const{args:t,mapping:r,evaluate:n}=e,[i,...a]=t;return b(n(i,r),{...e,args:a},[])}};async function m(e,t,r){const{args:n,mapping:i,evaluate:u}=t;if(0===n.length)return r.every((e=>!e))?(0,s.bool)(!1):Promise.reject(new o.InError(r));try{const o=n.shift(),l=await u(o,i);return c.regularFunctions[a.RegularOperator.EQUAL].apply([e,l],t).typedValue?(0,s.bool)(!0):m(e,t,[...r,!1])}catch(n){return m(e,t,[...r,n])}}function b(e,t,r){const{args:n,mapping:i,evaluate:u}=t;if(0===n.length){if(r.every((e=>!e)))return(0,s.bool)(!1);throw new o.InError(r)}try{const o=u(n.shift(),i);return c.regularFunctions[a.RegularOperator.EQUAL].apply([e,o],t).typedValue?(0,s.bool)(!0):b(e,t,[...r,!1])}catch(n){return b(e,t,[...r,n])}}const v={arity:Number.POSITIVE_INFINITY,checkArity:e=>e.length>0,async applyAsync(e){const t=c.specialFunctions[a.SpecialOperator.IN],r=await t.applyAsync(e);return(0,s.bool)(!r.typedValue)},applySynchronously(e){const t=c.specialFunctions[a.SpecialOperator.IN].applySynchronously(e);return(0,s.bool)(!t.typedValue)}},_=(0,s.declare)(a.SpecialOperator.CONCAT).onStringly1((()=>e=>e)).collect(),w={arity:Number.POSITIVE_INFINITY,async applyAsync(e){const{args:t,mapping:r,evaluate:n,functionArgumentsCache:i,superTypeProvider:c}=e,u=t.map((async e=>n(e,r))).map((async r=>{const n=_.search([await r],c,i);if(!n)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.CONCAT);return n(e)([await r])})),l=await Promise.all(u),d=l.map((e=>e.typedValue)).join(""),p=T(l)?l[0].language:void 0;return p?(0,s.langString)(d,p):(0,s.string)(d)},applySynchronously(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:i,functionArgumentsCache:c}=e,u=t.map((e=>n(e,r))).map((r=>{const n=_.search([r],i,c);if(!n)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.CONCAT);return n(e)([r])})),l=u.map((e=>e.typedValue)).join(""),d=T(u)?u[0].language:void 0;return d?(0,s.langString)(l,d):(0,s.string)(l)}};function T(e){return e.length>0&&e.every((t=>t.language===e[0].language))}const S=(0,s.declare)(a.SpecialOperator.BNODE).onString1((()=>e=>e)).collect(),O={arity:Number.POSITIVE_INFINITY,checkArity:e=>0===e.length||1===e.length,async applyAsync(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:s,functionArgumentsCache:c}=e,u=1===t.length?await n(t[0],r):void 0;let l;if(u){const r=S.search([u],s,c);if(!r)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.BNODE);l=r(e)([u]).str()}if(e.bnode){const t=await e.bnode(l);return new i.BlankNode(t)}return E(l)},applySynchronously(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:s,functionArgumentsCache:c}=e,u=1===t.length?n(t[0],r):void 0;let l;if(u){const r=S.search([u],s,c);if(!r)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.BNODE);l=r(e)([u]).str()}if(e.bnode){const t=e.bnode(l);return new i.BlankNode(t)}return E(l)}};function E(e){return new i.BlankNode(e??n.v4())}t.specialDefinitions={bound:u,if:d,coalesce:p,"&&":f,"||":h,sameterm:y,in:g,notin:v,concat:w,bnode:O}},29791:(e,t)=>{"use strict";function r(e){return"*"===e}function n(e,t){return new RegExp(`/${e}/`,"iu").test(`/${t}/`)}Object.defineProperty(t,"__esModule",{value:!0}),t.langMatches=t.replace=t.matches=void 0,t.matches=function(e,t,r){return new RegExp(t,r).test(e)},t.replace=function(e,t,r,n){let i=new RegExp(t,n);return i.global||(i=new RegExp(t,`${n??""}g`)),e.replace(i,r)},t.langMatches=function(e,t){const i=e.split("-"),a=t.split("-");if(!n(a[0],i[0])&&!r(i[0]))return!1;let o=1,s=1;for(;s[e,new a.RegularFunction(e,t)]))),t.specialFunctions=Object.fromEntries(Object.entries(c.specialDefinitions).map((([e,t])=>[e,new a.SpecialFunction(e,t)]))),t.namedFunctions=Object.fromEntries(Object.entries(o.namedDefinitions).map((([e,t])=>[e,new a.NamedFunction(e,t)])));var u=r(33357);Object.defineProperty(t,"OverloadTree",{enumerable:!0,get:function(){return u.OverloadTree}})},61621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAggregateEvaluator=t.orderTypes=t.isExpressionError=t.ExpressionError=t.AggregateEvaluator=t.SyncEvaluator=t.AsyncEvaluator=void 0;var n=r(98375);Object.defineProperty(t,"AsyncEvaluator",{enumerable:!0,get:function(){return n.AsyncEvaluator}});var i=r(86588);Object.defineProperty(t,"SyncEvaluator",{enumerable:!0,get:function(){return i.SyncEvaluator}});var a=r(19030);Object.defineProperty(t,"AggregateEvaluator",{enumerable:!0,get:function(){return a.AggregateEvaluator}});var o=r(82867);Object.defineProperty(t,"ExpressionError",{enumerable:!0,get:function(){return o.ExpressionError}}),Object.defineProperty(t,"isExpressionError",{enumerable:!0,get:function(){return o.isExpressionError}});var s=r(20236);Object.defineProperty(t,"orderTypes",{enumerable:!0,get:function(){return s.orderTypes}});var c=r(74448);Object.defineProperty(t,"AsyncAggregateEvaluator",{enumerable:!0,get:function(){return c.AsyncAggregateEvaluator}})},69119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlgebraTransformer=void 0;const n=r(31578),i=r(11269),a=r(42711),o=r(14624),s=r(82867),c=r(82867),u=r(50363);class l extends u.TermTransformer{constructor(e){super(e.superTypeProvider),this.algebraConfig=e,this.creatorConfig={type:e.type,creator:e.creator}}transformAlgebra(e){const t=n.Algebra.expressionTypes;switch(e.expressionType){case t.TERM:return this.transformTerm(e);case t.OPERATOR:return this.transformOperator(e);case t.NAMED:return this.transformNamed(e);case t.EXISTENCE:return l.transformExistence(e);case t.AGGREGATE:return l.transformAggregate(e);case t.WILDCARD:return l.transformWildcard(e)}}static transformWildcard(e){return new i.NamedNode(e.wildcard.value)}transformOperator(e){const t=e.operator.toLowerCase();if(o.SpecialOperators.has(t)){const r=t,n=e.args.map((e=>this.transformAlgebra(e))),o=a.specialFunctions[r];if(!o.checkArity(n))throw new s.InvalidArity(n,r);return new i.SpecialOperator(n,o.applyAsync,o.applySynchronously)}if(!o.Operators.has(t))throw new s.UnknownOperator(e.operator);const r=t,n=e.args.map((e=>this.transformAlgebra(e))),c=a.regularFunctions[r];if(!l.hasCorrectArity(n,c.arity))throw new s.InvalidArity(n,r);return new i.Operator(n,(e=>c.apply(e,this.algebraConfig)))}wrapSyncFunction(e,t){return r=>{try{const t=e(r.map((e=>e.toRDF())));return this.transformRDFTermUnsafe(t)}catch(e){throw new c.ExtensionFunctionError(t,e)}}}wrapAsyncFunction(e,t){return async r=>{try{const t=await e(r.map((e=>e.toRDF())));return this.transformRDFTermUnsafe(t)}catch(e){throw new c.ExtensionFunctionError(t,e)}}}transformNamed(e){const t=e.name.value,r=e.args.map((e=>this.transformAlgebra(e)));if(o.NamedOperators.has(t)){const t=e.name.value,n=a.namedFunctions[t];return new i.Named(e.name,r,(e=>n.apply(e,this.algebraConfig)))}if("sync"===this.creatorConfig.type){const t=this.creatorConfig.creator(e.name);if(t){const n=this.wrapSyncFunction(t,e.name.value);return new i.SyncExtension(e.name,r,n)}}else{const t=this.creatorConfig.creator(e.name);if(t){const n=this.wrapAsyncFunction(t,e.name.value);return new i.AsyncExtension(e.name,r,n)}}throw new s.UnknownNamedOperator(e.name.value)}static hasCorrectArity(e,t){return Array.isArray(t)?t.includes(e.length):e.length===t}static transformAggregate(e){const t=e.aggregator;return new i.Aggregate(t,e)}static transformExistence(e){return new i.Existence(e)}}t.AlgebraTransformer=l},50363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermTransformer=void 0;const n=r(22112),i=r(31578),a=r(11269),o=r(14624),s=r(82867),c=r(82867),u=r(17590),l=r(17590),d=r(46157);t.TermTransformer=class{constructor(e){this.superTypeProvider=e}transformRDFTermUnsafe(e){return this.transformTerm({term:e,type:i.Algebra.types.EXPRESSION,expressionType:i.Algebra.expressionTypes.TERM})}transformTerm(e){if(!e.term)throw new s.InvalidExpression(e);switch(e.term.termType){case"Variable":return new a.Variable(n.termToString(e.term));case"Literal":return this.transformLiteral(e.term);case"NamedNode":return new a.NamedNode(e.term.value);case"BlankNode":return new a.BlankNode(e.term.value);case"Quad":return new a.Quad(e.term,this.superTypeProvider);default:throw new s.InvalidTermType(e)}}transformLiteral(e){if(!e.datatype||[null,void 0,""].includes(e.datatype.value))return e.language?new a.LangStringLiteral(e.value,e.language):new a.StringLiteral(e.value);const t=e.datatype.value,r=(0,d.getSuperTypeDict)(t,this.superTypeProvider);try{if(o.TypeURL.XSD_STRING in r)return new a.StringLiteral(e.value,t);if(o.TypeURL.RDF_LANG_STRING in r)return new a.LangStringLiteral(e.value,e.language);if(o.TypeURL.XSD_YEAR_MONTH_DURATION in r)return new a.YearMonthDurationLiteral((0,u.parseYearMonthDuration)(e.value),e.value,t);if(o.TypeURL.XSD_DAY_TIME_DURATION in r)return new a.DayTimeDurationLiteral((0,u.parseDayTimeDuration)(e.value),e.value,t);if(o.TypeURL.XSD_DURATION in r)return new a.DurationLiteral((0,u.parseDuration)(e.value),e.value,t);if(o.TypeURL.XSD_DATE_TIME in r){const r=new Date(e.value);return Number.isNaN(r.getTime())?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new a.DateTimeLiteral((0,u.parseDateTime)(e.value),e.value,t)}if(o.TypeURL.XSD_DATE in r)return new a.DateLiteral((0,u.parseDate)(e.value),e.value,t);if(o.TypeURL.XSD_TIME in r)return new a.TimeLiteral((0,u.parseTime)(e.value),e.value,t);if(o.TypeURL.XSD_BOOLEAN in r)return"true"!==e.value&&"false"!==e.value&&"1"!==e.value&&"0"!==e.value?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new a.BooleanLiteral("true"===e.value||"1"===e.value,e.value);if(o.TypeURL.XSD_DECIMAL in r){const n=l.parseXSDDecimal(e.value);return void 0===n?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):o.TypeURL.XSD_INTEGER in r?new a.IntegerLiteral(n,t,e.value):new a.DecimalLiteral(n,t,e.value)}const n=o.TypeURL.XSD_FLOAT in r,i=o.TypeURL.XSD_DOUBLE in r;if(n||i){const r=l.parseXSDFloat(e.value);return void 0===r?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):n?new a.FloatLiteral(r,t,e.value):new a.DoubleLiteral(r,t,e.value)}return new a.Literal(e.value,t,e.value)}catch(r){if(r instanceof Error&&(0,c.isExpressionError)(r))return new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value);throw r}}}},14624:(e,t)=>{"use strict";var r,n,i,a,o;Object.defineProperty(t,"__esModule",{value:!0}),t.NamedOperators=t.SetFunctions=t.SetFunction=t.Operators=t.SpecialOperators=t.RegularOperators=t.SpecialOperator=t.RegularOperator=t.TypeURL=t.TypeAlias=void 0,function(e){e.SPARQL_NUMERIC="SPARQL_NUMERIC",e.SPARQL_STRINGLY="SPARQL_STRINGLY"}(r||(t.TypeAlias=r={})),function(e){e.XSD_ANY_URI="http://www.w3.org/2001/XMLSchema#anyURI",e.XSD_STRING="http://www.w3.org/2001/XMLSchema#string",e.RDF_LANG_STRING="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",e.XSD_BOOLEAN="http://www.w3.org/2001/XMLSchema#boolean",e.XSD_DATE_TIME="http://www.w3.org/2001/XMLSchema#dateTime",e.XSD_DATE_TIME_STAMP="http://www.w3.org/2001/XMLSchema#dateTimeStamp",e.XSD_DATE="http://www.w3.org/2001/XMLSchema#date",e.XSD_G_MONTH="http://www.w3.org/2001/XMLSchema#gMonth",e.XSD_G_MONTHDAY="http://www.w3.org/2001/XMLSchema#gMonthDay",e.XSD_G_YEAR="http://www.w3.org/2001/XMLSchema#gYear",e.XSD_G_YEAR_MONTH="http://www.w3.org/2001/XMLSchema#gYearMonth",e.XSD_TIME="http://www.w3.org/2001/XMLSchema#time",e.XSD_G_DAY="http://www.w3.org/2001/XMLSchema#gDay",e.XSD_DECIMAL="http://www.w3.org/2001/XMLSchema#decimal",e.XSD_FLOAT="http://www.w3.org/2001/XMLSchema#float",e.XSD_DOUBLE="http://www.w3.org/2001/XMLSchema#double",e.XSD_INTEGER="http://www.w3.org/2001/XMLSchema#integer",e.XSD_NON_POSITIVE_INTEGER="http://www.w3.org/2001/XMLSchema#nonPositiveInteger",e.XSD_NEGATIVE_INTEGER="http://www.w3.org/2001/XMLSchema#negativeInteger",e.XSD_LONG="http://www.w3.org/2001/XMLSchema#long",e.XSD_INT="http://www.w3.org/2001/XMLSchema#int",e.XSD_SHORT="http://www.w3.org/2001/XMLSchema#short",e.XSD_BYTE="http://www.w3.org/2001/XMLSchema#byte",e.XSD_NON_NEGATIVE_INTEGER="http://www.w3.org/2001/XMLSchema#nonNegativeInteger",e.XSD_POSITIVE_INTEGER="http://www.w3.org/2001/XMLSchema#positiveInteger",e.XSD_UNSIGNED_LONG="http://www.w3.org/2001/XMLSchema#unsignedLong",e.XSD_UNSIGNED_INT="http://www.w3.org/2001/XMLSchema#unsignedInt",e.XSD_UNSIGNED_SHORT="http://www.w3.org/2001/XMLSchema#unsignedShort",e.XSD_UNSIGNED_BYTE="http://www.w3.org/2001/XMLSchema#unsignedByte",e.XSD_NORMALIZED_STRING="http://www.w3.org/2001/XMLSchema#normalizedString",e.XSD_TOKEN="http://www.w3.org/2001/XMLSchema#token",e.XSD_LANGUAGE="http://www.w3.org/2001/XMLSchema#language",e.XSD_NM_TOKEN="http://www.w3.org/2001/XMLSchema#NMTOKEN",e.XSD_NAME="http://www.w3.org/2001/XMLSchema#name",e.XSD_NC_NAME="http://www.w3.org/2001/XMLSchema#NCName",e.XSD_ENTITY="http://www.w3.org/2001/XMLSchema#ENTITY",e.XSD_ID="http://www.w3.org/2001/XMLSchema#ID",e.XSD_ID_REF="http://www.w3.org/2001/XMLSchema#IDREF",e.XSD_DURATION="http://www.w3.org/2001/XMLSchema#duration",e.XSD_YEAR_MONTH_DURATION="http://www.w3.org/2001/XMLSchema#yearMonthDuration",e.XSD_DAY_TIME_DURATION="http://www.w3.org/2001/XMLSchema#dayTimeDuration"}(n||(t.TypeURL=n={})),function(e){e.NOT="!",e.UMINUS="uminus",e.UPLUS="uplus",e.EQUAL="=",e.NOT_EQUAL="!=",e.LT="<",e.GT=">",e.LTE="<=",e.GTE=">=",e.MULTIPLICATION="*",e.DIVISION="/",e.ADDITION="+",e.SUBTRACTION="-",e.IS_IRI="isiri",e.IS_URI="isuri",e.IS_BLANK="isblank",e.IS_LITERAL="isliteral",e.IS_NUMERIC="isnumeric",e.STR="str",e.LANG="lang",e.DATATYPE="datatype",e.IRI="iri",e.URI="uri",e.STRDT="strdt",e.STRLANG="strlang",e.UUID="uuid",e.STRUUID="struuid",e.STRLEN="strlen",e.SUBSTR="substr",e.UCASE="ucase",e.LCASE="lcase",e.STRSTARTS="strstarts",e.STRENDS="strends",e.CONTAINS="contains",e.STRBEFORE="strbefore",e.STRAFTER="strafter",e.ENCODE_FOR_URI="encode_for_uri",e.LANG_MATCHES="langmatches",e.REGEX="regex",e.REPLACE="replace",e.ABS="abs",e.ROUND="round",e.CEIL="ceil",e.FLOOR="floor",e.RAND="rand",e.NOW="now",e.YEAR="year",e.MONTH="month",e.DAY="day",e.HOURS="hours",e.MINUTES="minutes",e.SECONDS="seconds",e.TIMEZONE="timezone",e.TZ="tz",e.MD5="md5",e.SHA1="sha1",e.SHA256="sha256",e.SHA384="sha384",e.SHA512="sha512",e.TRIPLE="triple",e.SUBJECT="subject",e.PREDICATE="predicate",e.OBJECT="object",e.IS_TRIPLE="istriple"}(i||(t.RegularOperator=i={})),function(e){e.BOUND="bound",e.IF="if",e.COALESCE="coalesce",e.LOGICAL_OR="||",e.LOGICAL_AND="&&",e.SAME_TERM="sameterm",e.IN="in",e.NOT_IN="notin",e.CONCAT="concat",e.BNODE="bnode"}(a||(t.SpecialOperator=a={})),t.RegularOperators=new Set(Object.values(i)),t.SpecialOperators=new Set(Object.values(a)),t.Operators=new Set([...t.RegularOperators,...t.SpecialOperators]),function(e){e.COUNT="count",e.SUM="sum",e.MIN="min",e.MAX="max",e.AVG="avg",e.GROUP_CONCAT="group_concat",e.SAMPLE="sample"}(o||(t.SetFunction=o={})),t.SetFunctions=new Set(Object.values(o)),t.NamedOperators=new Set([n.XSD_STRING,n.XSD_FLOAT,n.XSD_DOUBLE,n.XSD_DECIMAL,n.XSD_INTEGER,n.XSD_DATE_TIME,n.XSD_DATE,n.XSD_BOOLEAN,n.XSD_TIME,n.XSD_DURATION,n.XSD_DAY_TIME_DURATION,n.XSD_YEAR_MONTH_DURATION])},76660:(e,t)=>{"use strict";function r(e){return{day:e.day??0,hours:e.hours??0,minutes:e.minutes??0,seconds:e.seconds??0}}function n(e){return{year:e.year??0,month:e.month??0}}function i(e){return{...r(e),...n(e)}}function a(e){return{...e,day:e.day??1,hours:e.hours??0,month:e.month??1,year:e.year??0,seconds:e.seconds??0,minutes:e.minutes??0}}function o(e){const t=new Date(e.year,e.month-1,e.day,e.hours,e.minutes,Math.trunc(e.seconds),e.seconds%1*1e3);if(e.year>=0&&e.year<100){const e=1900;t.setFullYear(t.getFullYear()-e)}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.extractTimeZone=t.extractRawTimeZone=t.dayTimeDurationsToSeconds=t.yearMonthDurationsToMonths=t.trimToDayTimeDuration=t.trimToYearMonthDuration=t.toUTCDate=t.toJSDate=t.negateDuration=t.toDateTimeRepresentation=t.defaultedDateTimeRepresentation=t.simplifyDurationRepresentation=t.defaultedDurationRepresentation=t.defaultedYearMonthDurationRepresentation=t.defaultedDayTimeDurationRepresentation=void 0,t.defaultedDayTimeDurationRepresentation=r,t.defaultedYearMonthDurationRepresentation=n,t.defaultedDurationRepresentation=i,t.simplifyDurationRepresentation=function(e){const t=i(e),r={},n=t.year+Math.trunc(t.month/12);n&&(r.year=n,t.month%=12),t.month&&(r.month=t.month);const a=t.day+Math.trunc(t.hours/24)+Math.trunc(t.minutes/1440)+Math.trunc(t.seconds/86400);a&&(r.day=a,t.hours%=24,t.minutes%=1440,t.seconds%=86400);const o=t.hours+Math.trunc(t.minutes/60)+Math.trunc(t.seconds/3600);o&&(r.hours=o,t.minutes%=60,t.seconds%=3600);const s=t.minutes+Math.trunc(t.seconds/60);return s&&(r.minutes=s,t.seconds%=60),t.seconds&&(r.seconds=t.seconds),r},t.defaultedDateTimeRepresentation=a,t.toDateTimeRepresentation=function({date:e,timeZone:t}){return{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),zoneHours:t.zoneHours,zoneMinutes:t.zoneMinutes}},t.negateDuration=function(e){return{year:void 0===e.year?void 0:-1*e.year,month:void 0===e.month?void 0:-1*e.month,day:void 0===e.day?void 0:-1*e.day,hours:void 0===e.hours?void 0:-1*e.hours,minutes:void 0===e.minutes?void 0:-1*e.minutes,seconds:void 0===e.seconds?void 0:-1*e.seconds}},t.toJSDate=o,t.toUTCDate=function(e,t){const r=o(a(e)),n=r.getTimezoneOffset(),i=e.zoneHours??t.zoneHours,s=e.zoneMinutes??t.zoneMinutes;return new Date(r.getTime()-60*(n+60*i+s)*1e3)},t.trimToYearMonthDuration=function(e){return{year:e.year,month:e.month}},t.trimToDayTimeDuration=function(e){return{day:e.day,hours:e.hours,minutes:e.minutes,seconds:e.seconds}},t.yearMonthDurationsToMonths=function(e){return 12*e.year+e.month},t.dayTimeDurationsToSeconds=function(e){return 60*(60*(24*e.day+e.hours)+e.minutes)+e.seconds},t.extractRawTimeZone=function(e){return/(Z|([+-]\d\d:\d\d))?$/u.exec(e)[0]},t.extractTimeZone=function(e){return{zoneHours:e.getTimezoneOffset()/60,zoneMinutes:e.getTimezoneOffset()%60}}},82867:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoExistenceHook=t.NoAggregator=t.ExtensionFunctionError=t.UnknownNamedOperator=t.UnknownOperator=t.InvalidTermType=t.InvalidExpressionType=t.InvalidExpression=t.InvalidArity=t.UnexpectedError=t.ParseError=t.EmptyAggregateError=t.IncompatibleLanguageOperation=t.InvalidTimezoneCall=t.CastError=t.InvalidCompareArgumentTypes=t.InvalidArgumentTypes=t.InError=t.CoalesceError=t.RDFEqualTypeError=t.EBVCoercionError=t.UnboundVariableError=t.InvalidLexicalForm=t.isExpressionError=t.ExpressionError=void 0;class r extends Error{}t.ExpressionError=r,t.isExpressionError=function(e){return e instanceof r},t.InvalidLexicalForm=class extends r{constructor(e){super(`Invalid lexical form '${h(e)}'`),this.arg=e}},t.UnboundVariableError=class extends r{constructor(e,t){super(`Unbound variable '${h(e)}'`),this.variable=e,this.bindings=t}},t.EBVCoercionError=class extends r{constructor(e){super(`Cannot coerce term to EBV '${h(e)}'`),this.arg=e}},t.RDFEqualTypeError=class extends r{constructor(e){super("Equality test for literals with unsupported datatypes"),this.args=e}},t.CoalesceError=class extends r{constructor(e){super("All COALESCE arguments threw errors"),this.errors=e}},t.InError=class extends r{constructor(e){super(`Some argument to IN errorred and none where equal. ${e.map((e=>`(${e.toString()}) `)).join("and ")}`),this.errors=e}},t.InvalidArgumentTypes=class extends r{constructor(e,t){super(`Argument types not valid for operator: '${h(t)}' with '${h(e)}`),this.args=e,this.op=t}},t.InvalidCompareArgumentTypes=class extends r{constructor(e,t){super(`Compared argument types are supported: '${e.termType}' and '${t.termType}'`),this.arg0=e,this.arg1=t}},t.CastError=class extends r{constructor(e,t){super(`Invalid cast: '${h(e)}' to '${h(t)}'`),this.arg=e}},t.InvalidTimezoneCall=class extends r{constructor(e){super(`TIMEZONE call on ${e} which has no timezone`),this.dateString=e}},t.IncompatibleLanguageOperation=class extends r{constructor(e,t){super(`Operation on incompatible language literals '${h(e)}' and '${h(t)}'`),this.arg1=e,this.arg2=t}},t.EmptyAggregateError=class extends r{constructor(){super("Empty aggregate expression")}},t.ParseError=class extends r{constructor(e,t){super(`Failed to parse ${e} as ${t}.`)}};class n extends Error{constructor(e,t){super(`Programmer Error '${e}'`),this.payload=t}}t.UnexpectedError=n;class i extends Error{constructor(e,t){super(`The number of args does not match the arity of the operator '${h(t)}'.`),this.args=e,this.op=t}}t.InvalidArity=i;class a extends Error{constructor(e){super(`Invalid SPARQL Expression '${h(e)}'`)}}t.InvalidExpression=a;class o extends Error{constructor(e){super(`Invalid expression type for SPARQL Expression '${h(e)}'`),this.expr=e}}t.InvalidExpressionType=o;class s extends Error{constructor(e){super(`Invalid term type for term '${h(e)}'`),this.term=e}}t.InvalidTermType=s;class c extends Error{constructor(e){super(`Unknown operator: '${h(e)}`)}}t.UnknownOperator=c;class u extends Error{constructor(e){super(`Unknown named operator: '${h(e)}'`)}}t.UnknownNamedOperator=u;class l extends Error{constructor(e,t){t instanceof Error?super(`Error thrown in ${e}: ${t.message}${t.stack?`\n${t.stack}`:""}`):super(`Error thrown in ${e}`)}}t.ExtensionFunctionError=l;class d extends Error{constructor(e){super(`Aggregate expression ${h(e)} found, but no aggregate hook provided.`)}}t.NoAggregator=d;class p extends Error{constructor(){super("EXISTS found, but no existence hook provided.")}}function h(e){return JSON.stringify(e)}t.NoExistenceHook=p},20236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.orderTypes=void 0;const n=r(35069),i=r(42711),a=r(50363),o=r(14624),s=r(82867);function c(e,t){return e===t?0:e"term"),cache:s??new n.LRUCache({max:1e3})},defaultTimeZone:{zoneHours:0,zoneMinutes:0}},p=new a.TermTransformer(d.superTypeProvider),h=p.transformLiteral(e),f=p.transformLiteral(t);try{return l.apply([h,f],d).typedValue?0:u.apply([h,f],d).typedValue?1:-1}catch{const e=c(h.dataType,f.dataType);return 0!==e?e:c(h.str(),f.str())}}(t,r,d,p);if(l)throw new s.InvalidCompareArgumentTypes(t,r);return c(t.value,r.value)};const u={Variable:0,BlankNode:1,NamedNode:2,Literal:3,Quad:4,DefaultGraph:5}},17590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseDayTimeDuration=t.parseYearMonthDuration=t.parseDuration=t.parseTime=t.parseDate=t.parseDateTime=t.parseXSDInteger=t.parseXSDDecimal=t.parseXSDFloat=void 0;const n=r(76660),i=r(82867),a=r(66487);function o(e){if(""===e)return{zoneHours:void 0,zoneMinutes:void 0};if("Z"===e)return{zoneHours:0,zoneMinutes:0};const t=e.replaceAll(/^([+|-])(\d\d):(\d\d)$/gu,"$11!$2!$3").split("!").map(Number);return{zoneHours:t[0]*t[1],zoneMinutes:t[0]*t[2]}}function s(e){const t=e.replaceAll(/^(-)?([123456789]*\d{4})-(\d\d)-(\d\d)(Z|([+-]\d\d:\d\d))?$/gu,"$11!$2!$3!$4!$5");if(t===e)throw new i.ParseError(e,"date");const r=t.split("!"),n=r.slice(0,-1).map(Number),s={year:n[0]*n[1],month:n[2],day:n[3],...o(r[4])};if(!(s.month>=1&&s.month<=12&&s.day>=1&&s.day<=(0,a.maximumDayInMonthFor)(s.year,s.month)))throw new i.ParseError(e,"date");return s}function c(e){const t=e.replaceAll(/^(\d\d):(\d\d):(\d\d(\.\d+)?)(Z|([+-]\d\d:\d\d))?$/gu,"$1!$2!$3!$5");if(t===e)throw new i.ParseError(e,"time");const r=t.split("!"),n=r.slice(0,-1).map(Number),a={hours:n[0],minutes:n[1],seconds:n[2],...o(r[3])};if(a.seconds>=60||a.minutes>=60||a.hours>24||24===a.hours&&(0!==a.minutes||0!==a.seconds))throw new i.ParseError(e,"time");return a}function u(e){const[t,r]=e.split("T"),a=t.replaceAll(/^(-)?P(\d+Y)?(\d+M)?(\d+D)?$/gu,"$11S!$2!$3!$4");if(a===t)throw new i.ParseError(e,"duration");const o=a.split("!");if(void 0!==r){const t=r.replaceAll(/^(\d+H)?(\d+M)?(\d+(\.\d+)?S)?$/gu,"$1!$2!$3");if(""===r||r===t)throw new i.ParseError(e,"duration");o.push(...t.split("!"))}const s=o.map((e=>e.slice(0,-1)));if(!s.slice(1).some(Boolean))throw new i.ParseError(e,"duration");const c=Number(s[0]);return(0,n.simplifyDurationRepresentation)({year:s[1]?c*Number(s[1]):void 0,month:s[2]?c*Number(s[2]):void 0,day:s[3]?c*Number(s[3]):void 0,hours:s[4]?c*Number(s[4]):void 0,minutes:s[5]?c*Number(s[5]):void 0,seconds:s[6]?c*Number(s[6]):void 0})}t.parseXSDFloat=function(e){const t=Number(e);return Number.isNaN(t)?"NaN"===e?Number.NaN:"INF"===e||"+INF"===e?Number.POSITIVE_INFINITY:"-INF"===e?Number.NEGATIVE_INFINITY:void 0:t},t.parseXSDDecimal=function(e){const t=Number(e);return Number.isNaN(t)?void 0:t},t.parseXSDInteger=function(e){const t=Number.parseInt(e,10);return Number.isNaN(t)?void 0:t},t.parseDateTime=function(e){const[t,r]=e.split("T");return{...s(t),...c(r)}},t.parseDate=s,t.parseTime=function(e){const t=c(e);return t.hours%=24,t},t.parseDuration=u,t.parseYearMonthDuration=function(e){const t=u(e);if(["hours","minutes","seconds","day"].some((e=>Boolean(t[e]))))throw new i.ParseError(e,"yearMonthDuration");return t},t.parseDayTimeDuration=function(e){const t=u(e);if(["year","month"].some((e=>Boolean(t[e]))))throw new i.ParseError(e,"dayTimeDuration");return t}},19002:(e,t)=>{"use strict";function r(e,t=2){return e.toLocaleString(void 0,{minimumIntegerDigits:t,useGrouping:!1})}function n(e){return void 0===e.zoneHours||void 0===e.zoneMinutes?"":0===e.zoneHours&&0===e.zoneMinutes?"Z":`${e.zoneHours>=0?`+${r(e.zoneHours)}`:r(e.zoneHours)}:${r(Math.abs(e.zoneMinutes))}`}function i(e){return`${r(e.year,4)}-${r(e.month)}-${r(e.day)}${n(e)}`}function a(e){return`${r(e.hours)}:${r(e.minutes)}:${r(e.seconds)}${n(e)}`}Object.defineProperty(t,"__esModule",{value:!0}),t.serializeDuration=t.serializeTime=t.serializeDate=t.serializeDateTime=void 0,t.serializeDateTime=function(e){return`${i({year:e.year,month:e.month,day:e.day})}T${a(e)}`},t.serializeDate=i,t.serializeTime=a,t.serializeDuration=function(e,t="PT0S"){if(!Object.values(e).some((e=>0!==(e||0))))return t;const r=`${Object.values(e).some((e=>(e||0)<0))?"-":""}P${e.year?`${Math.abs(e.year)}Y`:""}${e.month?`${Math.abs(e.month)}M`:""}${e.day?`${Math.abs(e.day)}D`:""}`;return e.hours||e.minutes||e.seconds?`${r}T${e.hours?`${Math.abs(e.hours)}H`:""}${e.minutes?`${Math.abs(e.minutes)}M`:""}${e.seconds?`${Math.abs(e.seconds)}S`:""}`:r}},66487:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elapsedDuration=t.addDurationToDateTime=t.maximumDayInMonthFor=void 0;const n=r(76660);function i(e,t,r=0){const n=e-r,i=t-r,a=Math.floor(n/i);return{intDiv:a,remainder:e-a*i}}function a(e,t){const{intDiv:r,remainder:n}=i(t,13,1),a=e+r;return[1,3,5,7,8,10,12].includes(n)?31:[4,6,9,11].includes(n)?30:2===n&&(0===i(a,400).remainder||0!==i(a,100).remainder&&0===i(a,4).remainder)?29:28}t.maximumDayInMonthFor=a,t.addDurationToDateTime=function(e,t){const r={...e};let n=i(e.month+t.month,13,1);for(r.month=n.remainder,r.year=e.year+t.year+n.intDiv,n=i(e.seconds+t.seconds,60),r.seconds=n.remainder,n=i(e.minutes+t.minutes+n.intDiv,60),r.minutes=n.remainder,n=i(e.hours+t.hours+n.intDiv,24),r.hours=n.remainder,r.day=e.day+t.day+n.intDiv;;){let e;if(r.day<1)r.day+=a(r.year,r.month-1),e=-1;else{if(!(r.day>a(r.year,r.month)))break;r.day-=a(r.year,r.month),e=1}n=i(r.month+e,13,1),r.month=n.remainder,r.year+=n.intDiv}return r},t.elapsedDuration=function(e,t,r){const i=(0,n.toUTCDate)(e,r),a=(0,n.toUTCDate)(t,r),o=i.getTime()-a.getTime();return{day:Math.floor(o/864e5),hours:Math.floor(o%864e5/36e5),minutes:Math.floor(o%36e5/6e4),seconds:o%6e4}}},46157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.typePromotion=t.isSubTypeOf=t.getSuperTypeDict=t.isInternalSubType=t.asGeneralType=t.asOverrideType=t.asKnownLiteralType=t.asTypeAlias=t.typeAliasCheck=t.extensionTableInit=t.getSuperTypes=t.superTypeDictTable=t.extensionTableInput=void 0;const n=r(11269),i=r(63606),a=r(14624);function o(e,r){const n=r.cache.get(e);if(n)return n;const i=r.discoverer(e);if("term"===i){const t=Object.create(null);return t.__depth=0,t[e]=0,r.cache.set(e,t),t}let a;const s=u(i);return a=s?{...t.superTypeDictTable[s]}:{...o(i,r)},a.__depth++,a[e]=a.__depth,r.cache.set(e,a),a}function s(){for(const[e,r]of Object.entries(t.extensionTableInput)){const n=e;t.superTypeDictTable[n]||c(n,r,t.superTypeDictTable)}}function c(e,r,n){if("term"===r||void 0===r){const t=Object.create(null);return t.__depth=0,t[e]=0,void(n[e]=t)}n[r]||c(r,t.extensionTableInput[r],n),n[e]={...n[r],[e]:n[r].__depth+1,__depth:n[r].__depth+1}}function u(e){if(e in t.superTypeDictTable)return e}function l(e,r){const n=u(e);return n?t.superTypeDictTable[n]:o(e,r)}t.extensionTableInput={[a.TypeURL.XSD_DATE_TIME_STAMP]:a.TypeURL.XSD_DATE_TIME,[a.TypeURL.XSD_DAY_TIME_DURATION]:a.TypeURL.XSD_DURATION,[a.TypeURL.XSD_YEAR_MONTH_DURATION]:a.TypeURL.XSD_DURATION,[a.TypeURL.RDF_LANG_STRING]:a.TypeAlias.SPARQL_STRINGLY,[a.TypeURL.XSD_STRING]:a.TypeAlias.SPARQL_STRINGLY,[a.TypeURL.XSD_NORMALIZED_STRING]:a.TypeURL.XSD_STRING,[a.TypeURL.XSD_TOKEN]:a.TypeURL.XSD_NORMALIZED_STRING,[a.TypeURL.XSD_LANGUAGE]:a.TypeURL.XSD_TOKEN,[a.TypeURL.XSD_NM_TOKEN]:a.TypeURL.XSD_TOKEN,[a.TypeURL.XSD_NAME]:a.TypeURL.XSD_TOKEN,[a.TypeURL.XSD_NC_NAME]:a.TypeURL.XSD_NAME,[a.TypeURL.XSD_ENTITY]:a.TypeURL.XSD_NC_NAME,[a.TypeURL.XSD_ID]:a.TypeURL.XSD_NC_NAME,[a.TypeURL.XSD_ID_REF]:a.TypeURL.XSD_NC_NAME,[a.TypeURL.XSD_DOUBLE]:a.TypeAlias.SPARQL_NUMERIC,[a.TypeURL.XSD_FLOAT]:a.TypeAlias.SPARQL_NUMERIC,[a.TypeURL.XSD_DECIMAL]:a.TypeAlias.SPARQL_NUMERIC,[a.TypeURL.XSD_INTEGER]:a.TypeURL.XSD_DECIMAL,[a.TypeURL.XSD_NON_POSITIVE_INTEGER]:a.TypeURL.XSD_INTEGER,[a.TypeURL.XSD_NEGATIVE_INTEGER]:a.TypeURL.XSD_NON_POSITIVE_INTEGER,[a.TypeURL.XSD_LONG]:a.TypeURL.XSD_INTEGER,[a.TypeURL.XSD_INT]:a.TypeURL.XSD_LONG,[a.TypeURL.XSD_SHORT]:a.TypeURL.XSD_INT,[a.TypeURL.XSD_BYTE]:a.TypeURL.XSD_SHORT,[a.TypeURL.XSD_NON_NEGATIVE_INTEGER]:a.TypeURL.XSD_INTEGER,[a.TypeURL.XSD_POSITIVE_INTEGER]:a.TypeURL.XSD_NON_NEGATIVE_INTEGER,[a.TypeURL.XSD_UNSIGNED_LONG]:a.TypeURL.XSD_NON_NEGATIVE_INTEGER,[a.TypeURL.XSD_UNSIGNED_INT]:a.TypeURL.XSD_UNSIGNED_LONG,[a.TypeURL.XSD_UNSIGNED_SHORT]:a.TypeURL.XSD_UNSIGNED_INT,[a.TypeURL.XSD_UNSIGNED_BYTE]:a.TypeURL.XSD_UNSIGNED_SHORT,[a.TypeURL.XSD_DATE_TIME]:"term",[a.TypeURL.XSD_BOOLEAN]:"term",[a.TypeURL.XSD_DATE]:"term",[a.TypeURL.XSD_G_MONTH]:"term",[a.TypeURL.XSD_G_MONTHDAY]:"term",[a.TypeURL.XSD_G_YEAR]:"term",[a.TypeURL.XSD_G_YEAR_MONTH]:"term",[a.TypeURL.XSD_TIME]:"term",[a.TypeURL.XSD_G_DAY]:"term",[a.TypeURL.XSD_DURATION]:"term",[a.TypeAlias.SPARQL_NUMERIC]:"term",[a.TypeAlias.SPARQL_STRINGLY]:"term",[a.TypeURL.XSD_ANY_URI]:"term"},t.superTypeDictTable=Object.create(null),t.getSuperTypes=o,t.extensionTableInit=s,s(),t.typeAliasCheck=Object.create(null),function(){for(const e of Object.values(a.TypeAlias))t.typeAliasCheck[e]=!0}(),t.asTypeAlias=function(e){if(e in t.typeAliasCheck)return e},t.asKnownLiteralType=u,t.asOverrideType=function(e){if(u(e)??"term"===e)return e},t.asGeneralType=function(e){if("term"===e||(0,n.asTermType)(e))return e},t.isInternalSubType=function(e,r){return"term"!==e&&t.superTypeDictTable[e]&&void 0!==t.superTypeDictTable[e][r]},t.getSuperTypeDict=l,t.isSubTypeOf=function(e,t,r){return"term"!==e&&void 0!==l(e,r)[t]},t.typePromotion={[a.TypeURL.XSD_STRING]:[{typeToPromote:a.TypeURL.XSD_ANY_URI,conversionFunction:e=>(0,i.string)(e.str())}],[a.TypeURL.XSD_DOUBLE]:[{typeToPromote:a.TypeURL.XSD_FLOAT,conversionFunction:e=>(0,i.double)(e.typedValue)},{typeToPromote:a.TypeURL.XSD_DECIMAL,conversionFunction:e=>(0,i.double)(e.typedValue)}],[a.TypeURL.XSD_FLOAT]:[{typeToPromote:a.TypeURL.XSD_DECIMAL,conversionFunction:e=>(0,i.float)(e.typedValue)}]}},71448:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerVoid=void 0;const n=r(52640);class i extends n.Logger{debug(){}error(){}fatal(){}info(){}trace(){}warn(){}}t.LoggerVoid=i},5868:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(71448),t)},8008:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorAll=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e)}async mediate(e){const t=[];let r;try{r=this.publish(e)}catch{r=[]}for(const e of r)try{await e.reply,t.push(e.actor)}catch{}return(await Promise.all(t.map((t=>t.runObservable(e)))))[0]}async mediateWith(){throw new Error("Unsupported operation: MediatorAll#mediateWith")}}t.MediatorAll=i},48284:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(8008),t)},38123:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorCombinePipeline=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e)}async mediate(e){let t;try{t=this.publish(e)}catch{return e}if(this.filterErrors){const e=[];for(const r of t)try{await r.reply,e.push(r)}catch{}t=e}if(t=await Promise.all(t.map((async({actor:e,reply:t})=>({actor:e,reply:await t})))),this.order){const e=e=>{const t=this.field?e[this.field]:e;if("number"!=typeof t)throw new TypeError("Cannot order elements that are not numbers.");return t};t=t.sort(((t,r)=>("increasing"===this.order?1:-1)*(e(t.reply)-e(r.reply))))}let r=e;for(const{actor:e}of t)r={...r,...await e.runObservable(r)};return r}mediateWith(){throw new Error("Method not supported.")}}t.MediatorCombinePipeline=i},30827:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(38123),t)},79559:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorCombineUnion=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e),this.combiner=this.createCombiner()}async mediate(e){let t;try{t=this.publish(e)}catch{t=[]}if(this.filterErrors){const e=[];for(const r of t)try{await r.reply,e.push(r)}catch{}t=e}await Promise.all(t.map((({reply:e})=>e)));const r=await Promise.all(t.map((t=>t.actor.runObservable(e))));return this.combiner(r)}mediateWith(){throw new Error("Method not supported.")}createCombiner(){return e=>{const t={};return t[this.field]={},[{}].concat(e.map((e=>e[this.field]))).forEach((e=>{t[this.field]={...e,...t[this.field]}})),t}}}t.MediatorCombineUnion=i},75884:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(79559),t)},63850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorJoinCoefficientsFixed=void 0;const n=r(32227),i=r(34368);class a extends i.Mediator{constructor(e){super(e)}async mediateWith(e,t){const r=[],a=t.map((({reply:e})=>e)).map((e=>e.catch((e=>{r.push(e)})))),o=await Promise.all(a);let s=o.map((e=>{if(e)return e.iterations*this.cpuWeight+e.persistedItems*this.memoryWeight+e.blockingItems*this.timeWeight+e.requestTime*this.ioWeight}));const c=Math.max(...s.filter((e=>void 0!==e))),u=e.context.get(n.KeysQueryOperation.limitIndicator);u&&(s=s.map(((e,t)=>void 0!==e&&o[t].blockingItems>0&&o[t].iterations>u?e+c:e)));let l=-1,d=Number.POSITIVE_INFINITY;for(const[e,t]of s.entries())void 0!==t&&(-1===l||te.message)).join("\n")}`);const p=t[l].actor;return p.includeInLogs&&i.Actor.getContextLogger(e.context)?.debug(`Determined physical join operator '${p.logicalType}-${p.physicalName}'`,{entries:e.entries.length,variables:await Promise.all(e.entries.map((async e=>(await e.output.metadata()).variables.map((e=>e.value))))),costs:Object.fromEntries(s.map(((e,r)=>[`${t[r].actor.logicalType}-${t[r].actor.physicalName}`,e])).filter((e=>void 0!==e[1]))),coefficients:Object.fromEntries(o.map(((e,r)=>[`${t[r].actor.logicalType}-${t[r].actor.physicalName}`,e])).filter((e=>void 0!==e[1])))}),p}}t.MediatorJoinCoefficientsFixed=a},8309:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(63850),t)},55614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorNumber=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e),this.indexPicker=this.createIndexPicker()}createIndexPicker(){switch(this.type){case"min":return e=>e.reduce(((e,t,r)=>{const n=this.getOrDefault(t[this.field],Number.POSITIVE_INFINITY);return null!==n&&(Number.isNaN(e[0])||e[0]>n)?[n,r]:e}),[Number.NaN,-1])[1];case"max":return e=>e.reduce(((e,t,r)=>{const n=this.getOrDefault(t[this.field],Number.NEGATIVE_INFINITY);return null!==n&&(Number.isNaN(e[0])||e[0]e));const n=[];if(this.ignoreErrors){const e={};e[this.field]=null,r=r.map((t=>t.catch((t=>(n.push(t),e)))))}const i=await Promise.all(r),a=this.indexPicker(i);if(a<0)throw new Error(`All actors rejected their test in ${this.name}\n${n.map((e=>e.message)).join("\n")}`);return t[a].actor}}t.MediatorNumber=i},99104:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(55614),t)},41426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorRace=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e)}mediateWith(e,t){return new Promise(((e,r)=>{const n=[];for(const i of t)i.reply.then((()=>{e(i.actor)})).catch((e=>{n.push(e),n.length===t.length&&r(new Error(`${this.name} mediated over all rejecting actors:\n${n.map((e=>e.message)).join("\n")}`))}))}))}}t.MediatorRace=i},25896:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(41426),t)},85849:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataValidationState=void 0,t.MetadataValidationState=class{constructor(){this.invalidateListeners=[],this.valid=!0}addInvalidateListener(e){this.invalidateListeners.push(e)}invalidate(){if(this.valid){this.valid=!1;for(const e of this.invalidateListeners)e()}}}},48187:(e,t)=>{"use strict";function r(e){for(const t of["cardinality"])if(!(t in e))throw new Error(`Invalid metadata: missing ${t} in ${JSON.stringify(e)}`);return e}function n(e){for(const t of["cardinality","canContainUndefs","variables"])if(!(t in e))throw new Error(`Invalid metadata: missing ${t} in ${JSON.stringify(e)}`);return e}function i(e){let t;return()=>(t||(t=e(),t.then((e=>e.state.addInvalidateListener((()=>{t=void 0})))).catch((()=>{}))),t)}Object.defineProperty(t,"__esModule",{value:!0}),t.cachifyMetadata=t.validateMetadataBindings=t.validateMetadataQuads=t.getMetadataBindings=t.getMetadataQuads=void 0,t.getMetadataQuads=function(e){return i((()=>new Promise(((t,r)=>{e.getProperty("metadata",(e=>t(e))),e.on("error",r)})).then((e=>r(e)))))},t.getMetadataBindings=function(e){return i((()=>new Promise(((t,r)=>{e.getProperty("metadata",(e=>t(e))),e.on("error",r)})).then((e=>("canContainUndefs"in e||(e.canContainUndefs=!1),n(e))))))},t.validateMetadataQuads=r,t.validateMetadataBindings=n,t.cachifyMetadata=i},72394:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(85849),t),i(r(48187),t)},66072:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},90522:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},54973:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},70650:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},92955:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},66143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22170:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6379:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},78615:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},60552:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},34989:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},50199:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},15278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},16382:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;class r{static getLevelOrdinal(e){return r.LEVELS[e]}}t.Logger=r,r.LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5}},52640:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(66072),t),i(r(90522),t),i(r(54973),t),i(r(70650),t),i(r(92955),t),i(r(66143),t),i(r(22170),t),i(r(6379),t),i(r(78615),t),i(r(60552),t),i(r(34989),t),i(r(50199),t),i(r(15278),t),i(r(16382),t)},7991:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,a=s(e),o=a[0],c=a[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,c)),l=0,d=c>0?o-4:o;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;su?u:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function s(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 c(e,t,n){for(var i,a,o=[],s=t;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},55553:function(e,t,r){var n;!function(i){"use strict";var a,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,c=Math.floor,u="[BigNumber Error] ",l=u+"Number primitive has more than 15 significant digits: ",d=1e14,p=14,h=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],y=1e7,g=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,r,n=1,i=e.length,a=e[0]+"";nu^r?1:-1;for(s=(c=i.length)<(u=a.length)?c:u,o=0;oa[o]^r?1:-1;return c==u?0:c>u^r?1:-1}function _(e,t,r,n){if(er||e!==c(e))throw Error(u+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return m(e.e/p)==t&&e.c[t]%2!=0}function T(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else tk?m.c=m.e=null:e.e=10;d/=10,u++);return void(u>k?m.c=m.e=null:(m.e=u,m.c=[e]))}g=String(e)}else{if(!o.test(g=String(e)))return i(m,g,f);m.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(u=g.indexOf("."))>-1&&(g=g.replace(".","")),(d=g.search(/e/i))>0?(u<0&&(u=d),u+=+g.slice(d+1),g=g.substring(0,d)):u<0&&(u=g.length)}else{if(_(t,2,V.length,"Base"),10==t&&Q)return K(m=new $(e),D+m.e+1,j);if(g=String(e),f="number"==typeof e){if(0*e!=0)return i(m,g,f,t);if(m.s=1/e<0?(g=g.slice(1),-1):1,$.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else m.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=V.slice(0,t),u=d=0,y=g.length;du){u=y;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,d=-1,u=0;continue}return i(m,String(e),f,t)}f=!1,(u=(g=n(g,t,10,m.s)).indexOf("."))>-1?g=g.replace(".",""):u=g.length}for(d=0;48===g.charCodeAt(d);d++);for(y=g.length;48===g.charCodeAt(--y););if(g=g.slice(d,++y)){if(y-=d,f&&$.DEBUG&&y>15&&(e>h||e!==c(e)))throw Error(l+m.s*e);if((u=u-d-1)>k)m.c=m.e=null;else if(u=M)?T(c,o):S(c,o,"0");else if(a=(e=K(new $(e),t,r)).e,s=(c=b(e.c)).length,1==n||2==n&&(t<=a||a<=C)){for(;ss){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=a-s)>0)for(a+1==s&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function G(e,t){for(var r,n,i=1,a=new $(e[0]);i=10;i/=10,n++);return(r=n+r*p-1)>k?e.c=e.e=null:r=10;u/=10,i++);if((a=t-i)<0)a+=p,o=t,l=g[h=0],y=c(l/m[i-o-1]%10);else if((h=s((a+1)/p))>=g.length){if(!n)break e;for(;g.length<=h;g.push(0));l=y=0,i=1,o=(a%=p)-p+1}else{for(l=u=g[h],i=1;u>=10;u/=10,i++);y=(o=(a%=p)-p+i)<0?0:c(l/m[i-o-1]%10)}if(n=n||t<0||null!=g[h+1]||(o<0?l:l%m[i-o-1]),n=r<4?(y||n)&&(0==r||r==(e.s<0?3:2)):y>5||5==y&&(4==r||n||6==r&&(a>0?o>0?l/m[i-o]:0:g[h-1])%10&1||r==(e.s<0?8:7)),t<1||!g[0])return g.length=0,n?(t-=e.e+1,g[0]=m[(p-t%p)%p],e.e=-t||0):g[0]=e.e=0,e;if(0==a?(g.length=h,u=1,h--):(g.length=h+1,u=m[p-a],g[h]=o>0?c(l/m[i-o]%m[o])*u:0),n)for(;;){if(0==h){for(a=1,o=g[0];o>=10;o/=10,a++);for(o=g[0]+=u,u=1;o>=10;o/=10,u++);a!=u&&(e.e++,g[0]==d&&(g[0]=1));break}if(g[h]+=u,g[h]!=d)break;g[h--]=0,u=1}for(a=g.length;0===g[--a];g.pop());}e.e>k?e.c=e.e=null:e.e=M?T(t,r):S(t,r,"0"),e.s<0?"-"+t:t)}return $.clone=e,$.ROUND_UP=0,$.ROUND_DOWN=1,$.ROUND_CEIL=2,$.ROUND_FLOOR=3,$.ROUND_HALF_UP=4,$.ROUND_HALF_DOWN=5,$.ROUND_HALF_EVEN=6,$.ROUND_HALF_CEIL=7,$.ROUND_HALF_FLOOR=8,$.EUCLID=9,$.config=$.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(_(r=e[t],0,g,t),D=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(_(r=e[t],0,8,t),j=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(_(r[0],-g,0,t),_(r[1],0,g,t),C=r[0],M=r[1]):(_(r,-g,g,t),C=-(M=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)_(r[0],-g,-1,t),_(r[1],1,g,t),L=r[0],k=r[1];else{if(_(r,-g,g,t),!r)throw Error(u+t+" cannot be zero: "+r);L=-(k=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(u+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!r,Error(u+"crypto unavailable");F=r}else F=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(_(r=e[t],0,9,t),B=r),e.hasOwnProperty(t="POW_PRECISION")&&(_(r=e[t],0,g,t),U=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(u+t+" not an object: "+r);q=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(u+t+" invalid: "+r);Q="0123456789"==r.slice(0,10),V=r}}return{DECIMAL_PLACES:D,ROUNDING_MODE:j,EXPONENTIAL_AT:[C,M],RANGE:[L,k],CRYPTO:F,MODULO_MODE:B,POW_PRECISION:U,FORMAT:q,ALPHABET:V}},$.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!$.DEBUG)return!0;var t,r,n=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===a||-1===a)&&i>=-g&&i<=g&&i===c(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%p)<1&&(t+=p),String(n[0]).length==t){for(t=0;t=d||r!==c(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(u+"Invalid BigNumber: "+e)},$.maximum=$.max=function(){return G(arguments,-1)},$.minimum=$.min=function(){return G(arguments,1)},$.random=(a=9007199254740992,O=Math.random()*a&2097151?function(){return c(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,a,o=0,l=[],d=new $(N);if(null==e?e=D:_(e,0,g),i=s(e/p),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));o>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[o]=r[0],t[o+1]=r[1]):(l.push(a%1e14),o+=2);o=i/2}else{if(!crypto.randomBytes)throw F=!1,Error(u+"crypto unavailable");for(t=crypto.randomBytes(i*=7);o=9e15?crypto.randomBytes(7).copy(t,o):(l.push(a%1e14),o+=7);o=i/7}if(!F)for(;o=10;a/=10,o++);or-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/r|0,o[i]%=r)}return o.reverse()}return function(n,i,a,o,s){var c,u,l,d,p,h,f,y,g=n.indexOf("."),m=D,v=j;for(g>=0&&(d=U,U=0,n=n.replace(".",""),h=(y=new $(i)).pow(n.length-g),U=d,y.c=t(S(b(h.c),h.e,"0"),10,a,e),y.e=y.c.length),l=d=(f=t(n,i,a,s?(c=V,e):(c=e,V))).length;0==f[--d];f.pop());if(!f[0])return c.charAt(0);if(g<0?--l:(h.c=f,h.e=l,h.s=o,f=(h=r(h,y,m,v,a)).c,p=h.r,l=h.e),g=f[u=l+m+1],d=a/2,p=p||u<0||null!=f[u+1],p=v<4?(null!=g||p)&&(0==v||v==(h.s<0?3:2)):g>d||g==d&&(4==v||p||6==v&&1&f[u-1]||v==(h.s<0?8:7)),u<1||!f[0])n=p?S(c.charAt(1),-m,c.charAt(0)):c.charAt(0);else{if(f.length=u,p)for(--a;++f[--u]>a;)f[u]=0,u||(++l,f=[1].concat(f));for(d=f.length;!f[--d];);for(g=0,n="";g<=d;n+=c.charAt(f[g++]));n=S(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,a,o,s=0,c=e.length,u=t%y,l=t/y|0;for(e=e.slice();c--;)s=((i=u*(a=e[c]%y)+(n=l*a+(o=e[c]/y|0)*u)%y*y+s)/r|0)+(n/y|0)+l*o,e[c]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,a,o,s){var u,l,h,f,y,g,b,v,_,w,T,S,O,E,x,A,R,I=n.s==i.s?1:-1,P=n.c,N=i.c;if(!(P&&P[0]&&N&&N[0]))return new $(n.s&&i.s&&(P?!N||P[0]!=N[0]:N)?P&&0==P[0]||!N?0*I:I/0:NaN);for(_=(v=new $(I)).c=[],I=a+(l=n.e-i.e)+1,s||(s=d,l=m(n.e/p)-m(i.e/p),I=I/p|0),h=0;N[h]==(P[h]||0);h++);if(N[h]>(P[h]||0)&&l--,I<0)_.push(1),f=!0;else{for(E=P.length,A=N.length,h=0,I+=2,(y=c(s/(N[0]+1)))>1&&(N=e(N,y,s),P=e(P,y,s),A=N.length,E=P.length),O=A,T=(w=P.slice(0,A)).length;T=s/2&&x++;do{if(y=0,(u=t(N,w,A,T))<0){if(S=w[0],A!=T&&(S=S*s+(w[1]||0)),(y=c(S/x))>1)for(y>=s&&(y=s-1),b=(g=e(N,y,s)).length,T=w.length;1==t(g,w,b,T);)y--,r(g,A=10;I/=10,h++);K(v,a+(v.e=h+l*p-1)+1,o,f)}else v.e=l,v.r=+f;return v}}(),E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,A=/^\.([^.]+)$/,R=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,a=r?t:t.replace(I,"");if(R.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!r&&(a=a.replace(E,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,a=a.replace(x,"$1").replace(A,"0.$1")),t!=a))return new $(a,i);if($.DEBUG)throw Error(u+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},P.absoluteValue=P.abs=function(){var e=new $(this);return e.s<0&&(e.s=1),e},P.comparedTo=function(e,t){return v(this,new $(e,t))},P.decimalPlaces=P.dp=function(e,t){var r,n,i,a=this;if(null!=e)return _(e,0,g),null==t?t=j:_(t,0,8),K(new $(a),e+a.e+1,t);if(!(r=a.c))return null;if(n=((i=r.length-1)-m(this.e/p))*p,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},P.dividedBy=P.div=function(e,t){return r(this,new $(e,t),D,j)},P.dividedToIntegerBy=P.idiv=function(e,t){return r(this,new $(e,t),0,1)},P.exponentiatedBy=P.pow=function(e,t){var r,n,i,a,o,l,d,h,f=this;if((e=new $(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+X(e));if(null!=t&&(t=new $(t)),o=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return h=new $(Math.pow(+X(f),o?e.s*(2-w(e)):+X(e))),t?h.mod(t):h;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new $(NaN);(n=!l&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||o&&f.c[1]>=24e7:f.c[0]<8e13||o&&f.c[0]<=9999975e7)))return a=f.s<0&&w(e)?-0:0,f.e>-1&&(a=1/a),new $(l?1/a:a);U&&(a=s(U/p+2))}for(o?(r=new $(.5),l&&(e.s=1),d=w(e)):d=(i=Math.abs(+X(e)))%2,h=new $(N);;){if(d){if(!(h=h.times(f)).c)break;a?h.c.length>a&&(h.c.length=a):n&&(h=h.mod(t))}if(i){if(0===(i=c(i/2)))break;d=i%2}else if(K(e=e.times(r),e.e+1,1),e.e>14)d=w(e);else{if(0==(i=+X(e)))break;d=i%2}f=f.times(f),a?f.c&&f.c.length>a&&(f.c.length=a):n&&(f=f.mod(t))}return n?h:(l&&(h=N.div(h)),t?h.mod(t):a?K(h,U,j,void 0):h)},P.integerValue=function(e){var t=new $(this);return null==e?e=j:_(e,0,8),K(t,t.e+1,e)},P.isEqualTo=P.eq=function(e,t){return 0===v(this,new $(e,t))},P.isFinite=function(){return!!this.c},P.isGreaterThan=P.gt=function(e,t){return v(this,new $(e,t))>0},P.isGreaterThanOrEqualTo=P.gte=function(e,t){return 1===(t=v(this,new $(e,t)))||0===t},P.isInteger=function(){return!!this.c&&m(this.e/p)>this.c.length-2},P.isLessThan=P.lt=function(e,t){return v(this,new $(e,t))<0},P.isLessThanOrEqualTo=P.lte=function(e,t){return-1===(t=v(this,new $(e,t)))||0===t},P.isNaN=function(){return!this.s},P.isNegative=function(){return this.s<0},P.isPositive=function(){return this.s>0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.minus=function(e,t){var r,n,i,a,o=this,s=o.s;if(t=(e=new $(e,t)).s,!s||!t)return new $(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/p,u=e.e/p,l=o.c,h=e.c;if(!c||!u){if(!l||!h)return l?(e.s=-t,e):new $(h?o:NaN);if(!l[0]||!h[0])return h[0]?(e.s=-t,e):new $(l[0]?o:3==j?-0:0)}if(c=m(c),u=m(u),l=l.slice(),s=c-u){for((a=s<0)?(s=-s,i=l):(u=c,i=h),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(a=(s=l.length)<(t=h.length))?s:t,s=t=0;t0)for(;t--;l[r++]=0);for(t=d-1;n>s;){if(l[--n]=0;){for(r=0,f=S[i]%_,g=S[i]/_|0,a=i+(o=c);a>i;)r=((u=f*(u=T[--o]%_)+(s=g*u+(l=T[o]/_|0)*f)%_*_+b[a]+r)/v|0)+(s/_|0)+g*l,b[a--]=u%v;b[a]=r}return r?++n:b.splice(0,1),z(e,b,n)},P.negated=function(){var e=new $(this);return e.s=-e.s||null,e},P.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new $(e,t)).s,!i||!t)return new $(NaN);if(i!=t)return e.s=-t,n.minus(e);var a=n.e/p,o=e.e/p,s=n.c,c=e.c;if(!a||!o){if(!s||!c)return new $(i/0);if(!s[0]||!c[0])return c[0]?e:new $(s[0]?n:0*i)}if(a=m(a),o=m(o),s=s.slice(),i=a-o){for(i>0?(o=a,r=c):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/d|0,s[t]=d===s[t]?0:s[t]%d;return i&&(s=[i].concat(s),++o),z(e,s,o)},P.precision=P.sd=function(e,t){var r,n,i,a=this;if(null!=e&&e!==!!e)return _(e,1,g),null==t?t=j:_(t,0,8),K(new $(a),e,t);if(!(r=a.c))return null;if(n=(i=r.length-1)*p+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&a.e+1>n&&(n=a.e+1),n},P.shiftedBy=function(e){return _(e,-9007199254740991,h),this.times("1e"+e)},P.squareRoot=P.sqrt=function(){var e,t,n,i,a,o=this,s=o.c,c=o.s,u=o.e,l=D+4,d=new $("0.5");if(1!==c||!s||!s[0])return new $(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(c=Math.sqrt(+X(o)))||c==1/0?(((t=b(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=m((u+1)/2)-(u<0||u%2),n=new $(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new $(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(a=n,n=d.times(a.plus(r(o,a,l,1))),b(a.c).slice(0,c)===(t=b(n.c)).slice(0,c)){if(n.e0&&y>0){for(a=y%s||s,d=f.substr(0,a);a0&&(d+=l+f.slice(a)),h&&(d="-"+d)}n=p?d+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?p.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):p):d}return(r.prefix||"")+n+(r.suffix||"")},P.toFraction=function(e){var t,n,i,a,o,s,c,l,d,h,y,g,m=this,v=m.c;if(null!=e&&(!(c=new $(e)).isInteger()&&(c.c||1!==c.s)||c.lt(N)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+X(c));if(!v)return new $(m);for(t=new $(N),d=n=new $(N),i=l=new $(N),g=b(v),o=t.e=g.length-m.e-1,t.c[0]=f[(s=o%p)<0?p+s:s],e=!e||c.comparedTo(t)>0?o>0?t:d:c,s=k,k=1/0,c=new $(g),l.c[0]=0;h=r(c,t,0,1),1!=(a=n.plus(h.times(i))).comparedTo(e);)n=i,i=a,d=l.plus(h.times(a=d)),l=a,t=c.minus(h.times(a=t)),c=a;return a=r(e.minus(n),i,0,1),l=l.plus(a.times(d)),n=n.plus(a.times(i)),l.s=d.s=m.s,y=r(d,i,o*=2,j).minus(m).abs().comparedTo(r(l,n,o,j).minus(m).abs())<1?[d,i]:[l,n],k=s,y},P.toNumber=function(){return+X(this)},P.toPrecision=function(e,t){return null!=e&&_(e,1,g),H(this,e,t,2)},P.toString=function(e){var t,r=this,i=r.s,a=r.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=C||a>=M?T(b(r.c),a):S(b(r.c),a,"0"):10===e&&Q?t=S(b((r=K(new $(r),D+a+1,j)).c),r.e,"0"):(_(e,2,V.length,"Base"),t=n(S(b(r.c),a,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},P.valueOf=P.toJSON=function(){return X(this)},P._isBigNumber=!0,null!=t&&$.set(t),$}(),a.default=a.BigNumber=a,void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},1048:(e,t,r)=>{"use strict";const n=r(7991),i=r(39318),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(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 d(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(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(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return h(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 c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|f(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?s(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.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 d(e){return l(e),s(e<0?0:0|f(e))}function p(e){const t=e.length<0?0:0|f(e.length),r=s(t);for(let n=0;n=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function y(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(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 G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(i)return n?-1:G(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 P(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(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),J(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=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(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):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let a,o=1,s=e.length,c=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;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(a=r;as&&(r=s-c),a=r;a>=0;a--){let r=!0;for(let n=0;ni&&(n=i):n=i;const a=t.length;let o;for(n>a/2&&(n=a/2),o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(a=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(a=c))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return function(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=y,c.prototype._isBuffer=!0,c.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;tr&&(e+=" ... "),""},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(X(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.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 a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0);const s=Math.min(a,o),u=this.slice(n,i),l=e.slice(t,r);for(let e=0;e>>=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 a=!1;for(;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return T(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function R(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function C(e,t,r,n,i){V(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function M(e,t,r,n,i){V(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function L(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(e,t,r,n,a){return t=+t,r>>>=0,a||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,a){return t=+t,r>>>=0,a||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.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>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],i=1,a=0;for(;++a>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Y((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(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)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(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)<>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],i=1,a=0;for(;++a=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=t,i=1,a=this[e+--n];for(;n>0&&(i*=256);)a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Y((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||D(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(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},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(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},c.prototype.writeBigUInt64LE=Y((function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Y((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}let i=0,a=1,o=0;for(this[t]=255&e;++i>>=0,!n){const n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}let i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(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},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(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},c.prototype.writeBigInt64LE=Y((function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Y((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.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=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>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function V(e,t,r,n,i,a){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(a+1)}${n}`:`>= -(2${n} ** ${8*(a+1)-1}${n}) and < 2 ** ${8*(a+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){Q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||$(t,e.length-(r+1))}(n,i,a)}function Q(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function $(e,t,r){if(Math.floor(e)!==e)throw Q(e,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.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=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let i=null;const a=[];for(let o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.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;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const W=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 Y(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},62168:e=>{"use strict";e.exports=function e(t){if("number"==typeof t&&isNaN(t))throw new Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw new Error("Infinity is not allowed");return null===t||"object"!=typeof t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce(((t,r,n)=>`${t}${0===n?"":","}${e(void 0===r||"symbol"==typeof r?null:r)}`),"")}]`:`{${Object.keys(t).sort().reduce(((r,n)=>void 0===t[n]||"symbol"==typeof t[n]?r:`${r}${0===r.length?"":","}${e(n)}:${e(t[n])}`),"")}}`}},90482:function(){!function(e){!function(t){var r="undefined"!=typeof globalThis&&globalThis||void 0!==e&&e||void 0!==r&&r,n="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,a="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in r,s="ArrayBuffer"in r;if(s)var c=["[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&&c.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?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 f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=y(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=m(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):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=f(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?f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,t,r,n=f(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=y(t=new FileReader),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-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");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}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 T(e,t){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},b.call(_.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];T.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},t.DOMException=r.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 O(e,n){return new Promise((function(i,o){var c=new _(e,n);if(c.signal&&c.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var e,t,r={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).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 u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout((function(){i(new T(n,r))}),0)},u.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){o(new t.DOMException("Aborted","AbortError"))}),0)},u.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?u.withCredentials=!0:"omit"===c.credentials&&(u.withCredentials=!1),"responseType"in u&&(a?u.responseType="blob":s&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof h?c.headers.forEach((function(e,t){u.setRequestHeader(t,e)})):Object.getOwnPropertyNames(n.headers).forEach((function(e){u.setRequestHeader(e,d(n.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&c.signal.removeEventListener("abort",l)}),u.send(void 0===c._bodyInit?null:c._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=h,r.Request=_,r.Response=T),t.Headers=h,t.Request=_,t.Response=T,t.fetch=O}({})}("undefined"!=typeof self?self:this)},10288:(e,t,r)=>{var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,n="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,a="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in r,s="ArrayBuffer"in r;if(s)var c=["[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&&c.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?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 f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=y(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=m(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):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=f(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?f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,t,r,n=f(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=y(t=new FileReader),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-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");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}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 T(e,t){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},b.call(_.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];T.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},t.DOMException=r.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 O(e,n){return new Promise((function(i,o){var c=new _(e,n);if(c.signal&&c.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var e,t,r={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).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 u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout((function(){i(new T(n,r))}),0)},u.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){o(new t.DOMException("Aborted","AbortError"))}),0)},u.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?u.withCredentials=!0:"omit"===c.credentials&&(u.withCredentials=!1),"responseType"in u&&(a?u.responseType="blob":s&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof h?c.headers.forEach((function(e,t){u.setRequestHeader(t,e)})):Object.getOwnPropertyNames(n.headers).forEach((function(e){u.setRequestHeader(e,d(n.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&c.signal.removeEventListener("abort",l)}),u.send(void 0===c._bodyInit?null:c._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=h,r.Request=_,r.Response=T),t.Headers=h,t.Request=_,t.Response=T,t.fetch=O}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var a=n.fetch?n:i;(t=a.fetch).default=a.fetch,t.fetch=a.fetch,t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response,e.exports=t},36593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((function(e){return[e.toLowerCase(),e]}))),t.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((function(e){return[e.toLowerCase(),e]})))},5193:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r");case s.Comment:return"\x3c!--".concat(e.data,"--\x3e");case s.CDATA:return function(e){return"")}(e);case s.Script:case s.Style:case s.Tag:return function(e,t){var r;"foreign"===t.xmlMode&&(e.name=null!==(r=u.elementNames.get(e.name))&&void 0!==r?r:e.name,e.parent&&y.has(e.parent.name)&&(t=n(n({},t),{xmlMode:!1}))),!t.xmlMode&&g.has(e.name)&&(t=n(n({},t),{xmlMode:"foreign"}));var i="<".concat(e.name),a=function(e,t){var r;if(e){var n=!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)?d:t.xmlMode||"utf8"!==t.encodeEntities?c.encodeXML:c.escapeAttribute;return Object.keys(e).map((function(r){var i,a,o=null!==(i=e[r])&&void 0!==i?i:"";return"foreign"===t.xmlMode&&(r=null!==(a=u.attributeNames.get(r))&&void 0!==a?a:r),t.emptyAttrs||t.xmlMode||""!==o?"".concat(r,'="').concat(n(o),'"'):r})).join(" ")}}(e.attribs,t);return a&&(i+=" ".concat(a)),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&p.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=h(e.children,t)),!t.xmlMode&&p.has(e.name)||(i+=""))),i}(e,t);case s.Text:return function(e,t){var r,n=e.data||"";return!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)||!t.xmlMode&&e.parent&&l.has(e.parent.name)||(n=t.xmlMode||"utf8"!==t.encodeEntities?(0,c.encodeXML)(n):(0,c.escapeText)(n)),n}(e,t)}}t.render=h,t.default=h;var y=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),g=new Set(["svg","math"])},93338:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},21138:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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}),t.DomHandler=void 0;var a=r(93338),o=r(62888);i(r(62888),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,r){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(r=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=r?r:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var r=this.options.xmlMode?a.ElementType.Tag:void 0,n=new o.Element(e,t,void 0,r);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var r=new o.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new o.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new o.Text(""),t=new o.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var r=new o.ProcessingInstruction(e,t);this.addNode(r)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],r=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),r&&(e.prev=r,r.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},62888:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=h;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=f;var y=function(e){function t(t,r,n,i){void 0===n&&(n=[]),void 0===i&&(i="script"===t?o.ElementType.Script:"style"===t?o.ElementType.Style:o.ElementType.Tag);var a=e.call(this,n)||this;return a.name=t,a.attribs=r,a.type=i,a}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var r,n;return{name:t,value:e.attribs[t],namespace:null===(r=e["x-attribsNamespace"])||void 0===r?void 0:r[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(p);function g(e){return(0,o.isTag)(e)}function m(e){return e.type===o.ElementType.CDATA}function b(e){return e.type===o.ElementType.Text}function v(e){return e.type===o.ElementType.Comment}function _(e){return e.type===o.ElementType.Directive}function w(e){return e.type===o.ElementType.Root}function T(e,t){var r;if(void 0===t&&(t=!1),b(e))r=new u(e.data);else if(v(e))r=new l(e.data);else if(g(e)){var n=t?S(e.children):[],i=new y(e.name,a({},e.attribs),n);n.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),r=i}else if(m(e)){n=t?S(e.children):[];var o=new h(n);n.forEach((function(e){return e.parent=o})),r=o}else if(w(e)){n=t?S(e.children):[];var s=new f(n);n.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),r=s}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new d(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),r=c}return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function S(e){for(var t=e.map((function(e){return T(e,!0)})),r=1;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=void 0;var n=r(68642),i=r(78052);t.getFeed=function(e){var t=c(d,e);return t?"feed"===t.name?function(e){var t,r=e.children,n={type:"atom",items:(0,i.getElementsByTagName)("entry",r).map((function(e){var t,r=e.children,n={media:s(r)};l(n,"id","id",r),l(n,"title","title",r);var i=null===(t=c("link",r))||void 0===t?void 0:t.attribs.href;i&&(n.link=i);var a=u("summary",r)||u("content",r);a&&(n.description=a);var o=u("updated",r);return o&&(n.pubDate=new Date(o)),n}))};l(n,"id","id",r),l(n,"title","title",r);var a=null===(t=c("link",r))||void 0===t?void 0:t.attribs.href;a&&(n.link=a),l(n,"description","subtitle",r);var o=u("updated",r);return o&&(n.updated=new Date(o)),l(n,"author","email",r,!0),n}(t):function(e){var t,r,n=null!==(r=null===(t=c("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==r?r:[],a={type:e.name.substr(0,3),id:"",items:(0,i.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,r={media:s(t)};l(r,"id","guid",t),l(r,"title","title",t),l(r,"link","link",t),l(r,"description","description",t);var n=u("pubDate",t)||u("dc:date",t);return n&&(r.pubDate=new Date(n)),r}))};l(a,"title","title",n),l(a,"link","link",n),l(a,"description","description",n);var o=u("lastBuildDate",n);return o&&(a.updated=new Date(o)),l(a,"author","managingEditor",n,!0),a}(t):null};var a=["url","type","lang"],o=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function s(e){return(0,i.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,r={medium:t.medium,isDefault:!!t.isDefault},n=0,i=a;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.DocumentPosition=t.removeSubsets=void 0;var n,i=r(21138);function a(e,t){var r=[],a=[];if(e===t)return 0;for(var o=(0,i.hasChildren)(e)?e:e.parent;o;)r.unshift(o),o=o.parent;for(o=(0,i.hasChildren)(t)?t:t.parent;o;)a.unshift(o),o=o.parent;for(var s=Math.min(r.length,a.length),c=0;cl.indexOf(p)?u===t?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:u===e?n.PRECEDING|n.CONTAINS:n.PRECEDING}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0)e.splice(t,1);else for(var n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e},function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(n=t.DocumentPosition||(t.DocumentPosition={})),t.compareDocumentPosition=a,t.uniqueSort=function(e){return(e=e.filter((function(e,t,r){return!r.includes(e,t+1)}))).sort((function(e,t){var r=a(e,t);return r&n.PRECEDING?-1:r&n.FOLLOWING?1:0})),e}},76403:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(r(68642),t),i(r(45517),t),i(r(46178),t),i(r(51467),t),i(r(78052),t),i(r(83698),t),i(r(91206),t);var a=r(21138);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return a.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return a.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return a.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return a.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return a.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return a.hasChildren}})},78052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var n=r(21138),i=r(51467),a={tag_name:function(e){return"function"==typeof e?function(t){return(0,n.isTag)(t)&&e(t.name)}:"*"===e?n.isTag:function(t){return(0,n.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,n.isText)(t)&&e(t.data)}:function(t){return(0,n.isText)(t)&&t.data===e}}};function o(e,t){return"function"==typeof t?function(r){return(0,n.isTag)(r)&&t(r.attribs[e])}:function(r){return(0,n.isTag)(r)&&r.attribs[e]===t}}function s(e,t){return function(r){return e(r)||t(r)}}function c(e){var t=Object.keys(e).map((function(t){var r=e[t];return Object.prototype.hasOwnProperty.call(a,t)?a[t](r):o(t,r)}));return 0===t.length?null:t.reduce(s)}t.testElement=function(e,t){var r=c(e);return!r||r(t)},t.getElements=function(e,t,r,n){void 0===n&&(n=1/0);var a=c(e);return a?(0,i.filter)(a,t,r,n):[]},t.getElementById=function(e,t,r){return void 0===r&&(r=!0),Array.isArray(t)||(t=[t]),(0,i.findOne)(o("id",e),t,r)},t.getElementsByTagName=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(a.tag_name(e),t,r,n)},t.getElementsByTagType=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(a.tag_type(e),t,r,n)}},46178:(e,t)=>{"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=r,t.replaceElement=function(e,t){var r=t.prev=e.prev;r&&(r.next=t);var n=t.next=e.next;n&&(n.prev=t);var i=t.parent=e.parent;if(i){var a=i.children;a[a.lastIndexOf(e)]=t,e.parent=null}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=n,i){if(i.prev=t,n){var a=n.children;a.splice(a.lastIndexOf(i),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var i=n.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},51467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var n=r(21138);function i(e,t,r,i){for(var a=[],o=[t],s=[0];;)if(s[0]>=o[0].length){if(1===s.length)return a;o.shift(),s.shift()}else{var c=o[0][s[0]++];if(e(c)&&(a.push(c),--i<=0))return a;r&&(0,n.hasChildren)(c)&&c.children.length>0&&(s.unshift(0),o.unshift(c.children))}}t.filter=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),i(e,Array.isArray(t)?t:[t],r,n)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,r,i){void 0===i&&(i=!0);for(var a=null,o=0;o0&&(a=e(t,s.children,!0)))}return a},t.existsOne=function e(t,r){return r.some((function(r){return(0,n.isTag)(r)&&(t(r)||e(t,r.children))}))},t.findAll=function(e,t){for(var r=[],i=[t],a=[0];;)if(a[0]>=i[0].length){if(1===i.length)return r;i.shift(),a.shift()}else{var o=i[0][a[0]++];(0,n.isTag)(o)&&(e(o)&&r.push(o),o.children.length>0&&(a.unshift(0),i.unshift(o.children)))}}},68642:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var i=r(21138),a=n(r(5193)),o=r(93338);function s(e,t){return(0,a.default)(e,t)}t.getOuterHTML=s,t.getInnerHTML=function(e,t){return(0,i.hasChildren)(e)?e.children.map((function(e){return s(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,i.isCDATA)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&!(0,i.isComment)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&(t.type===o.ElementType.Tag||(0,i.isCDATA)(t))?e(t.children):(0,i.isText)(t)?t.data:""}},45517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var n=r(21138);function i(e){return(0,n.hasChildren)(e)?e.children:[]}function a(e){return e.parent||null}t.getChildren=i,t.getParent=a,t.getSiblings=function(e){var t=a(e);if(null!=t)return i(t);for(var r=[e],n=e.prev,o=e.next;null!=n;)r.unshift(n),n=n.prev;for(;null!=o;)r.push(o),o=o.next;return r},t.getAttributeValue=function(e,t){var r;return null===(r=e.attribs)||void 0===r?void 0:r[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,n.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,n.isTag)(t);)t=t.prev;return t}},3379:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var s=o(r(57346));t.htmlDecodeTree=s.default;var c=o(r(18622));t.xmlDecodeTree=c.default;var u=a(r(22809));t.decodeCodePoint=u.default;var l,d,p,h,f=r(22809);function y(e){return e>=l.ZERO&&e<=l.NINE}Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return f.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return f.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(l||(l={})),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(d=t.BinTrieFlags||(t.BinTrieFlags={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(p||(p={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(h=t.DecodingMode||(t.DecodingMode={}));var g=function(){function e(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=p.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=h.Strict}return e.prototype.startEntity=function(e){this.decodeMode=e,this.state=p.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},e.prototype.write=function(e,t){switch(this.state){case p.EntityStart:return e.charCodeAt(t)===l.NUM?(this.state=p.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=p.NamedEntity,this.stateNamedEntity(e,t));case p.NumericStart:return this.stateNumericStart(e,t);case p.NumericDecimal:return this.stateNumericDecimal(e,t);case p.NumericHex:return this.stateNumericHex(e,t);case p.NamedEntity:return this.stateNamedEntity(e,t)}},e.prototype.stateNumericStart=function(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===l.LOWER_X?(this.state=p.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=p.NumericDecimal,this.stateNumericDecimal(e,t))},e.prototype.addToNumericResult=function(e,t,r,n){if(t!==r){var i=r-t;this.result=this.result*Math.pow(n,i)+parseInt(e.substr(t,i),n),this.consumed+=i}},e.prototype.stateNumericHex=function(e,t){for(var r,n=t;t=l.UPPER_A&&r<=l.UPPER_F||r>=l.LOWER_A&&r<=l.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}return this.addToNumericResult(e,n,t,16),-1},e.prototype.stateNumericDecimal=function(e,t){for(var r=t;t>14;t=l.UPPER_A&&e<=l.UPPER_Z||e>=l.LOWER_A&&e<=l.LOWER_Z||y(e)}(o)))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((n=r[this.treeIndex])&d.VALUE_LENGTH)>>14)){if(a===l.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==h.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var o;return-1},e.prototype.emitNotTerminatedNamedEntity=function(){var e,t=this.result,r=(this.decodeTree[t]&d.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed},e.prototype.emitNamedEntityData=function(e,t,r){var n=this.decodeTree;return this.emitCodePoint(1===t?n[e]&~d.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r},e.prototype.end=function(){var e;switch(this.state){case p.NamedEntity:return 0===this.result||this.decodeMode===h.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case p.NumericDecimal:return this.emitNumericEntity(0,2);case p.NumericHex:return this.emitNumericEntity(0,3);case p.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case p.EntityStart:return 0}},e}();function m(e){var t="",r=new g(e,(function(e){return t+=(0,u.fromCodePoint)(e)}));return function(e,n){for(var i=0,a=0;(a=e.indexOf("&",a))>=0;){t+=e.slice(i,a),r.startEntity(n);var o=r.write(e,a+1);if(o<0){i=a+r.end();break}i=a+o,a=0===o?i+1:i}var s=t+e.slice(i);return t="",s}}function b(e,t,r,n){var i=(t&d.BRANCH_LENGTH)>>7,a=t&d.JUMP_TABLE;if(0===i)return 0!==a&&n===a?r:-1;if(a){var o=n-a;return o<0||o>=i?-1:e[r+o]-1}for(var s=r,c=s+i-1;s<=c;){var u=s+c>>>1,l=e[u];if(ln))return e[u+i];c=u-1}}return-1}t.EntityDecoder=g,t.determineBranch=b;var v=m(s.default),_=m(c.default);t.decodeHTML=function(e,t){return void 0===t&&(t=h.Legacy),v(e,t)},t.decodeHTMLAttribute=function(e){return v(e,h.Attribute)},t.decodeHTMLStrict=function(e){return v(e,h.Strict)},t.decodeXML=function(e){return _(e,h.Strict)}},22809:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function i(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=n.get(e))&&void 0!==t?t:e}t.fromCodePoint=null!==(r=String.fromCodePoint)&&void 0!==r?r:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+String.fromCharCode(e)},t.replaceCodePoint=i,t.default=function(e){return(0,t.fromCodePoint)(i(e))}},33231:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeNonAsciiHTML=t.encodeHTML=void 0;var i=n(r(58635)),a=r(57078),o=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function s(e,t){for(var r,n="",o=0;null!==(r=e.exec(t));){var s=r.index;n+=t.substring(o,s);var c=t.charCodeAt(s),u=i.default.get(c);if("object"==typeof u){if(s+1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var r=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function n(e){for(var n,i="",a=0;null!==(n=t.xmlReplacer.exec(e));){var o=n.index,s=e.charCodeAt(o),c=r.get(s);void 0!==c?(i+=e.substring(a,o)+c,a=o+1):(i+="".concat(e.substring(a,o),"&#x").concat((0,t.getCodePoint)(e,o).toString(16),";"),a=t.xmlReplacer.lastIndex+=Number(55296==(64512&s)))}return i+e.substr(a)}function i(e,t){return function(r){for(var n,i=0,a="";n=e.exec(r);)i!==n.index&&(a+=r.substring(i,n.index)),a+=t.get(n[0].charCodeAt(0)),i=n.index+1;return a+r.substring(i)}}t.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},t.encodeXML=n,t.escape=n,t.escapeUTF8=i(/[&<>'"]/g,r),t.escapeAttribute=i(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=i(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))},57346:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})))},18622:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})))},58635:(e,t)=>{"use strict";function r(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLAttribute=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.DecodingMode=t.EntityDecoder=t.encodeHTML5=t.encodeHTML4=t.encodeNonAsciiHTML=t.encodeHTML=t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.EntityLevel=void 0;var n,i,a=r(3379),o=r(33231),s=r(57078);function c(e,t){if(void 0===t&&(t=n.XML),("number"==typeof t?t:t.level)===n.HTML){var r="object"==typeof t?t.mode:void 0;return(0,a.decodeHTML)(e,r)}return(0,a.decodeXML)(e)}!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(n=t.EntityLevel||(t.EntityLevel={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(i=t.EncodingMode||(t.EncodingMode={})),t.decode=c,t.decodeStrict=function(e,t){var r;void 0===t&&(t=n.XML);var i="number"==typeof t?{level:t}:t;return null!==(r=i.mode)&&void 0!==r||(i.mode=a.DecodingMode.Strict),c(e,i)},t.encode=function(e,t){void 0===t&&(t=n.XML);var r="number"==typeof t?{level:t}:t;return r.mode===i.UTF8?(0,s.escapeUTF8)(e):r.mode===i.Attribute?(0,s.escapeAttribute)(e):r.mode===i.Text?(0,s.escapeText)(e):r.level===n.HTML?r.mode===i.ASCII?(0,o.encodeNonAsciiHTML)(e):(0,o.encodeHTML)(e):(0,s.encodeXML)(e)};var u=r(57078);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return u.encodeXML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return u.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return u.escapeUTF8}}),Object.defineProperty(t,"escapeAttribute",{enumerable:!0,get:function(){return u.escapeAttribute}}),Object.defineProperty(t,"escapeText",{enumerable:!0,get:function(){return u.escapeText}});var l=r(33231);Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return l.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return l.encodeNonAsciiHTML}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return l.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return l.encodeHTML}});var d=r(3379);Object.defineProperty(t,"EntityDecoder",{enumerable:!0,get:function(){return d.EntityDecoder}}),Object.defineProperty(t,"DecodingMode",{enumerable:!0,get:function(){return d.DecodingMode}}),Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return d.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTMLAttribute",{enumerable:!0,get:function(){return d.decodeHTMLAttribute}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return d.decodeXML}})},35033:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promisifyEventEmitter=void 0,t.promisifyEventEmitter=function(e,t){return new Promise(((r,n)=>{e.on("end",(()=>r(t))),e.on("error",n)}))}},50046: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 a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,a),n(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}y(e,t,a,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,a,o,u;if(s(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,u=l,console&&console.warn&&console.warn(u)}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 d(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 p(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;r0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=f(c,u);for(r=0;r=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},53933:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],r.get(i[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(t[i]!==r[i])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;0!=i--;){var o=a[i];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}},74190:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(92681),t)},92681:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparqlEndpointFetcher=void 0,r(45766);const n=r(55403),i=r(21451),a=r(52666),o=r(76574),s=r(52267),c=r(72243),u=r(76605);class l{constructor(e){e=e||{},this.method=e.method||"POST",this.additionalUrlParams=e.additionalUrlParams||new URLSearchParams,this.defaultHeaders=e.defaultHeaders||new Headers,this.fetchCb=e.fetch,this.sparqlJsonParser=new i.SparqlJsonParser(e),this.sparqlXmlParser=new a.SparqlXmlParser(e),this.sparqlParsers={[l.CONTENTTYPE_SPARQL_JSON]:{parseBooleanStream:e=>this.sparqlJsonParser.parseJsonBooleanStream(e),parseResultsStream:e=>this.sparqlJsonParser.parseJsonResultsStream(e)},[l.CONTENTTYPE_SPARQL_XML]:{parseBooleanStream:e=>this.sparqlXmlParser.parseXmlBooleanStream(e),parseResultsStream:e=>this.sparqlXmlParser.parseXmlResultsStream(e)}},this.timeout=e.timeout}getQueryType(e){const t=new n.Parser({sparqlStar:!0}).parse(e);return"query"===t.type?"DESCRIBE"===t.queryType?"CONSTRUCT":t.queryType:"UNKNOWN"}getUpdateTypes(e){const t=new n.Parser({sparqlStar:!0}).parse(e);if("update"===t.type){const e={};for(const r of t.updates)"type"in r?e[r.type]=!0:e[r.updateType]=!0;return e}return"UNKNOWN"}async fetchBindings(e,t){const[r,n]=await this.fetchRawStream(e,t,l.CONTENTTYPE_SPARQL),i=this.sparqlParsers[r];if(!i)throw new Error("Unknown SPARQL results content type: "+r);return i.parseResultsStream(n)}async fetchAsk(e,t){const[r,n]=await this.fetchRawStream(e,t,l.CONTENTTYPE_SPARQL),i=this.sparqlParsers[r];if(!i)throw new Error("Unknown SPARQL results content type: "+r);return i.parseBooleanStream(n)}async fetchTriples(e,t){return(await this.fetchRawStream(e,t,l.CONTENTTYPE_TURTLE))[1].pipe(new c.StreamParser({format:l.CONTENTTYPE_TURTLE}))}async fetchUpdate(e,t){const n=new(globalThis.AbortController||await Promise.resolve().then((()=>r(67083)))),i={};this.defaultHeaders.forEach(((e,t)=>{i[t]=e}));const a={method:"POST",headers:Object.assign(Object.assign({},i),{"content-type":"application/sparql-update"}),body:t,signal:n.signal};await this.handleFetchCall(e,a,{ignoreBody:!0}),n.abort()}async fetchRawStream(e,t,r){let n="POST"===this.method?e:e+"?query="+encodeURIComponent(t);const i=new Headers(this.defaultHeaders);let a;return i.append("Accept",r),"POST"===this.method?(i.append("Content-Type","application/x-www-form-urlencoded"),a=new URLSearchParams,a.set("query",t),this.additionalUrlParams.forEach(((e,t)=>{a.set(t,e)})),i.append("Content-Length",a.toString().length.toString())):""!==this.additionalUrlParams.toString()&&(n+=`&${this.additionalUrlParams.toString()}`),this.handleFetchCall(n,{headers:i,method:this.method,body:a})}async handleFetchCall(e,t,r={}){let n;if(this.timeout){const e=new AbortController;t.signal=e.signal,n=setTimeout((()=>e.abort()),this.timeout)}const i=await(this.fetchCb||fetch)(e,t);let a;clearTimeout(n),r.ignoreBody||(a=u(i.body)?i.body:new s.ReadableWebToNodeStream(i.body));let c=i.headers.get("Content-Type")||"";if(c.indexOf(";")>0&&(c=c.substr(0,c.indexOf(";"))),!i.ok){const t=/^[^?]*/u.exec(e)[0];let r="empty response";throw a&&(r=await o(a)),new Error(`Invalid SPARQL endpoint response from ${t} (HTTP status ${i.status}):\n${r}`)}return[c,a]}}l.CONTENTTYPE_SPARQL_JSON="application/sparql-results+json",l.CONTENTTYPE_SPARQL_XML="application/sparql-results+xml",l.CONTENTTYPE_SPARQL=`${l.CONTENTTYPE_SPARQL_JSON};q=1.0,${l.CONTENTTYPE_SPARQL_XML};q=0.7`,l.CONTENTTYPE_TURTLE="text/turtle",t.SparqlEndpointFetcher=l},45766:function(){!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}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(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 d(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 p(e){this.map={},e instanceof p?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 h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=f(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 m(){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:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(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=h(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?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,r,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),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-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 _(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 w(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 p(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];w.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new w(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,a){var o=new v(e,r);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new p,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 s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=p,e.Request=v,e.Response=w),t.Headers=p,t.Request=v,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)},1427: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(51812),t),i(r(26339),t),i(r(17762),t),i(r(12856),t),i(r(45147),t)},26339:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;const i=r(44330),a=r(51812),o=r(96414),s=r(17762),c=r(45147);class u{constructor(e){(e=e||{}).variableDelimiter=e.variableDelimiter||"_",e.expressionVariableCounter=e.expressionVariableCounter||0,this.util=new c.Util(e),this.initializeNodeHandlers(e)}static registerNodeHandlers(e,t){e.registerNodeHandler(new a.NodeHandlerDocument(e,t)),e.registerNodeHandler(new a.NodeHandlerDefinitionOperation(e,t)),e.registerNodeHandler(new a.NodeHandlerDefinitionFragment(e,t)),e.registerNodeHandler(new a.NodeHandlerSelectionFragmentSpread(e,t)),e.registerNodeHandler(new a.NodeHandlerSelectionInlineFragment(e,t)),e.registerNodeHandler(new a.NodeHandlerSelectionField(e,t))}static registerNodeValueHandlers(e,t){e.registerNodeValueHandler(new a.NodeValueHandlerVariable(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerInt(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerFloat(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerString(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerBoolean(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerNull(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerEnum(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerList(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerObject(e,t))}static registerDirectiveNodeHandlers(e,t){e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerInclude(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerOptional(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerPlural(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerSingle(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerSkip(e,t))}graphqlToSparqlAlgebra(e,t,r){return n(this,void 0,void 0,(function*(){return this.graphqlToSparqlAlgebraRawContext(e,yield this.util.contextParser.parse(t),r)}))}graphqlToSparqlAlgebraRawContext(e,t,r){r=r||{};const n="string"==typeof e?(0,i.parse)(e):e,a={context:t,fragmentDefinitions:this.indexFragments(n),graph:this.util.dataFactory.defaultGraph(),path:[],singularizeState:s.SingularizeState.PLURAL,singularizeVariables:r.singularizeVariables||{},subject:null,terminalVariables:[],variablesDict:r.variablesDict||{},variablesMetaDict:{}};return this.util.handleNode(n,a)}indexFragments(e){const t={},r=[];for(const n of e.definitions)"FragmentDefinition"===n.kind?t[n.name.value]=n:r.push(n);return e.definitions=r,t}initializeNodeHandlers(e){u.registerNodeHandlers(this.util,e),u.registerNodeValueHandlers(this.util,e),u.registerDirectiveNodeHandlers(this.util,e)}}t.Converter=u},17762:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SingularizeState=void 0,(r=t.SingularizeState||(t.SingularizeState={}))[r.SINGLE=0]="SINGLE",r[r.PLURAL=1]="PLURAL"},12856:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},45147:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(18050),i=r(27202),a=r(91525);t.Util=class{constructor(e){this.nodeHandlers={},this.nodeValueHandlers={},this.directiveNodeHandlers={},this.settings=e,this.dataFactory=e.dataFactory||new n.DataFactory,this.operationFactory=new a.Factory(this.dataFactory),this.contextParser=new i.ContextParser}registerNodeHandler(e){this.nodeHandlers[e.targetKind]=e}registerNodeValueHandler(e){this.nodeValueHandlers[e.targetKind]=e}registerDirectiveNodeHandler(e){this.directiveNodeHandlers[e.targetKind]=e}handleNode(e,t){const r=this.nodeHandlers[e.kind];if(!r)throw new Error(`Unsupported GraphQL node '${e.kind}'`);return r.handle(e,t)}handleNodeValue(e,t,r){const n=this.nodeValueHandlers[e.kind];if(!n)throw new Error(`Unsupported GraphQL value node '${e.kind}'`);return n.handle(e,t,r)}handleDirectiveNode(e,t){const r=this.directiveNodeHandlers[e.directive.name.value];return r?r.handle(e,t):null}joinOperations(e){if(1===e.length)return e[0];const t=[],r=[];for(const n of e)"bgp"===n.type?t.push(n):r.push(n);if(t.length===e.length)return this.joinOperationsAsBgp(t);if(t.length===e.length-1&&"leftjoin"===r[0].type&&"bgp"===r[0].input[0].type){const e=r[0];return t.push(e.input[0]),this.operationFactory.createLeftJoin(this.joinOperationsAsBgp(t),e.input[1])}return r.length===e.length?this.joinOperationsAsNestedJoin(r):this.joinOperationsAsNestedJoin([this.joinOperationsAsBgp(t),this.joinOperationsAsNestedJoin(r)])}joinOperationsAsBgp(e){return this.operationFactory.createBgp([].concat.apply([],e.map((e=>e.patterns))))}joinOperationsAsNestedJoin(e){return this.operationFactory.createJoin(e)}appendFieldToPath(e,t){return e.concat([t])}getFieldLabel(e){return(e.alias?e.alias:e.name).value}nameToVariable(e,t){return this.dataFactory.variable((t.path.length?t.path.join(this.settings.variableDelimiter)+this.settings.variableDelimiter:"")+e)}valueToNamedNode(e,t){const r=t.expandTerm(e,!0);if(this.settings.requireContext&&!r)throw new Error("No context entry was found for "+e);return this.dataFactory.namedNode(r||e)}getArgument(e,t){if(e)for(const r of e)if(r.name.value===t)return r}newTypePattern(e,t,r){return this.operationFactory.createPattern(e,this.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),this.valueToNamedNode(t.name.value,r.context),r.graph)}createQuadPattern(e,t,r,n,i){const a=this.valueToNamedNode(t.value,i);return i&&i.getContextRaw()[t.value]&&i.getContextRaw()[t.value]["@reverse"]?this.operationFactory.createPattern(r,a,e,n):this.operationFactory.createPattern(e,a,r,n)}createQuadPath(e,t,r,n,i,a){const o=this.valueToNamedNode(t.value,a);let s=this.operationFactory.createLink(o);for(const e of r.values){if("EnumValue"!==e.kind)throw new Error("Invalid value type for 'alt' argument, must be EnumValue, but got "+e.kind);s=this.operationFactory.createAlt([s,this.operationFactory.createLink(this.valueToNamedNode(e.value,a))])}return a&&a.getContextRaw()[t.value]&&a.getContextRaw()[t.value]["@reverse"]?this.operationFactory.createPath(n,s,e,i):this.operationFactory.createPath(e,s,n,i)}}},14009:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerAdapter=void 0,t.NodeHandlerAdapter=class{constructor(e,t,r){this.targetKind=e,this.util=t,this.settings=r}getNodeQuadContextSelectionSet(e,t,r){const n={};if(e)for(const t of e.selections)if("Field"===t.kind){const e=t;this.handleNodeQuadContextField(e,r,n,"id","subject"),this.handleNodeQuadContextField(e,r,n,"graph","graph")}return n}handleNodeQuadContextField(e,t,r,n,i){if(!r[i]&&e.name.value===n){if(!r[i]){const a=this.util.getArgument(e.arguments,"_");if(a){const o=this.util.handleNodeValue(a.value,e.name.value,t);if(1!==o.terms.length)throw new Error(`Only single values can be set as ${n}, but got ${o.terms.length} at ${e.name.value}`);r[i]=o.terms[0],o.auxiliaryPatterns&&(r.auxiliaryPatterns||(r.auxiliaryPatterns=[]),r.auxiliaryPatterns.concat(o.auxiliaryPatterns))}}if(!r[i]){const n=this.util.nameToVariable(this.util.getFieldLabel(e),t);t.terminalVariables.push(n),r[i]=n}}}getDirectiveOutputs(e,t,r){const n=[];if(e)for(const i of e){const e=this.util.handleDirectiveNode({directive:i,fieldLabel:t},r);if(e){if(e.ignore)return null;n.push(e)}}return n}handleDirectiveOutputs(e,t){for(const r of e){if(r.ignore)return this.util.operationFactory.createBgp([]);r.operationOverrider&&(t=r.operationOverrider(t))}return t}}},94058:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDefinitionAdapter=void 0;const n=r(14009);class i extends n.NodeHandlerAdapter{constructor(e,t,r){super(e,t,r)}}t.NodeHandlerDefinitionAdapter=i},73045:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDefinitionFragment=void 0;const n=r(94058);class i extends n.NodeHandlerDefinitionAdapter{constructor(e,t){super("FragmentDefinition",e,t)}handle(e,t){throw new Error("Illegal state: fragment definitions must be indexed and removed before processing")}}t.NodeHandlerDefinitionFragment=i},9540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDefinitionOperation=void 0;const n=r(94058);class i extends n.NodeHandlerDefinitionAdapter{constructor(e,t){super("OperationDefinition",e,t)}handle(e,t){if("query"!==e.operation)throw new Error("Unsupported definition operation: "+e.operation);if(e.variableDefinitions)for(const r of e.variableDefinitions){const e=r.variable.name.value;r.defaultValue&&(t.variablesDict[e]||(t.variablesDict[e]=r.defaultValue));let n=r.type;const i="NonNullType"===n.kind;i&&(n=n.type);const a="ListType"===n.kind;a&&(n=n.type);const o=n.name.value;t.variablesMetaDict[e]={mandatory:i,list:a,type:o}}const r=this.getDirectiveOutputs(e.directives,e.name?e.name.value:"",t);if(!r)return this.util.operationFactory.createBgp([]);const n=this.util.joinOperations(e.selectionSet.selections.map((e=>this.util.handleNode(e,t))));return this.handleDirectiveOutputs(r,n)}}t.NodeHandlerDefinitionOperation=i},9373:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDocument=void 0;const n=r(91525),i=r(14009);class a extends i.NodeHandlerAdapter{constructor(e,t){super("Document",e,t)}handle(e,t){const r=e.definitions.map((e=>{const r=this.getNodeQuadContextDefinitionNode(e,Object.assign(Object.assign({},t),{ignoreUnknownVariables:!0})),n=Object.assign(Object.assign({},t),{graph:r.graph||t.graph,subject:r.subject||this.util.dataFactory.blankNode()});let i=this.util.handleNode(e,n);return r&&r.auxiliaryPatterns&&(i=this.util.joinOperations([i,this.util.operationFactory.createBgp(r.auxiliaryPatterns)])),i})),n=this.util.operationFactory.createProject(1===r.length?r[0]:this.util.operationFactory.createUnion(r),t.terminalVariables);return this.translateBlankNodesToVariables(n)}getNodeQuadContextDefinitionNode(e,t){if("OperationDefinition"===e.kind)return this.getNodeQuadContextSelectionSet(e.selectionSet,e.name?e.name.value:"",t);throw new Error(`Unsupported definition: ${e.kind}`)}translateBlankNodesToVariables(e){const t=this,r={},i=Array.from(e.variables).reduce(((e,t)=>(e[t.value]=!0,e)),{});return n.Util.mapOperation(e,{path:(e,t)=>({recurse:!1,result:t.createPath(a(e.subject),e.predicate,a(e.object),a(e.graph))}),pattern:(e,t)=>({recurse:!1,result:t.createPattern(a(e.subject),a(e.predicate),a(e.object),a(e.graph))})});function a(e){if("BlankNode"===e.termType){let a=r[e.value];return a||(a=n.Util.createUniqueVariable(e.value,i,t.util.dataFactory),i[a.value]=!0,r[e.value]=a),a}return e}}}t.NodeHandlerDocument=a},97285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionAdapter=void 0;const n=r(91525),i=r(17762),a=r(14009);class o extends a.NodeHandlerAdapter{constructor(e,t,r){super(e,t,r)}getNodeQuadContextFieldNode(e,t,r){return this.getNodeQuadContextSelectionSet(e.selectionSet,t,Object.assign(Object.assign({},r),{path:this.util.appendFieldToPath(r.path,t)}))}fieldToOperation(e,t,r,a){const o=r;let s,c=0;if(("id"===t.name.value||"graph"===t.name.value)&&(r=!1,t.arguments))for(const r of t.arguments)"_"===r.name.value&&this.util.handleNodeValue(r.value,t.name.value,e);const u=this.util.getFieldLabel(t);if(e.singularizeState===i.SingularizeState.SINGLE&&(e.singularizeVariables[this.util.nameToVariable(u,e).value]=!0),r){const t=this.handleMetaField(e,u,a);if(t)return t}const l=a?[this.util.operationFactory.createBgp(a)]:[],d=this.getNodeQuadContextFieldNode(t,u,e);let p=d.subject||this.util.nameToVariable(u,e),h=d.graph||e.graph;d.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(d.auxiliaryPatterns));let f=!0,y=null;if(r&&t.arguments&&t.arguments.length)for(const n of t.arguments){if("_"===n.name.value){const i=this.util.handleNodeValue(n.value,t.name.value,e);y=i.terms,l.push(this.util.operationFactory.createBgp(i.terms.map((r=>this.util.createQuadPattern(e.subject,t.name,r,e.graph,e.context))))),i.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(i.auxiliaryPatterns)),r=!1;break}if("graph"===n.name.value){const r=this.util.handleNodeValue(n.value,t.name.value,e);if(1!==r.terms.length)throw new Error(`Only single values can be set as graph, but got ${r.terms.length} at ${t.name.value}`);h=r.terms[0],e=Object.assign(Object.assign({},e),{graph:h}),r.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(r.auxiliaryPatterns));break}if("alt"===n.name.value){let r=n.value;"ListValue"!==r.kind&&(r={kind:"ListValue",values:[r]}),l.push(this.util.createQuadPath(e.subject,t.name,r,p,e.graph,e.context)),f=!1;break}}if(r&&f&&l.push(this.util.operationFactory.createBgp([this.util.createQuadPattern(e.subject,t.name,p,e.graph,e.context)])),t.arguments&&t.arguments.length)for(const r of t.arguments)if("_"===r.name.value||"graph"===r.name.value||"alt"===r.name.value);else if("first"===r.name.value){if("IntValue"!==r.value.kind)throw new Error("Invalid value type for 'first' argument: "+r.value.kind);s=parseInt(r.value.value,10)}else if("offset"===r.name.value){if("IntValue"!==r.value.kind)throw new Error("Invalid value type for 'offset' argument: "+r.value.kind);c=parseInt(r.value.value,10)}else{const t=this.util.handleNodeValue(r.value,r.name.value,e);l.push(this.util.operationFactory.createBgp(t.terms.map((t=>this.util.createQuadPattern(p,r.name,t,e.graph,e.context))))),t.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(t.auxiliaryPatterns))}const g=this.getDirectiveOutputs(t.directives,u,e);if(!g)return this.util.operationFactory.createBgp([]);let m=this.util.joinOperations(l);if(t.selectionSet&&t.selectionSet.selections.length){if(y){if(1!==y.length)throw new Error(`Only single values can be set as id, but got ${y.length} at ${t.name.value}`);p=y[0]}const r=Object.assign(Object.assign(Object.assign({},e),o?{path:this.util.appendFieldToPath(e.path,u)}:{}),{graph:h,subject:o?p:e.subject});let n=!1;const i=t.selectionSet.selections.filter((e=>"Field"!==e.kind||"totalCount"!==e.name.value||(n=!0,!1)));let a=this.util.joinOperations(l.concat(i.map((e=>this.util.handleNode(e,r)))));if(n){const t=this.util.dataFactory.variable("var"+this.settings.expressionVariableCounter++),r=this.util.dataFactory.variable(p.value+this.settings.variableDelimiter+"totalCount"),n=this.util.operationFactory.createBoundAggregate(t,"count",this.util.operationFactory.createTermExpression(p),!1),o=this.util.operationFactory.createProject(this.util.operationFactory.createExtend(this.util.operationFactory.createGroup(m,[],[n]),r,this.util.operationFactory.createTermExpression(t)),[r]);e.terminalVariables.push(r),a=i.length?this.util.operationFactory.createJoin([this.util.operationFactory.createProject(a,[]),o]):o}m=a}else r&&"Variable"===p.termType&&e.terminalVariables.push(p);return(c||s)&&(m=this.util.operationFactory.createSlice(this.util.operationFactory.createProject(m,n.Util.inScopeVariables(m)),c,s)),this.handleDirectiveOutputs(g,m)}handleMetaField(e,t,r){if("__typename"===t){const n=this.util.nameToVariable(t,e);return e.terminalVariables.push(n),this.util.operationFactory.createBgp([this.util.operationFactory.createPattern(e.subject,this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),this.util.nameToVariable(t,e),e.graph)].concat(r||[]))}}}t.NodeHandlerSelectionAdapter=o},15790:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionField=void 0;const n=r(97285);class i extends n.NodeHandlerSelectionAdapter{constructor(e,t){super("Field",e,t)}handle(e,t){return this.fieldToOperation(t,e,!0)}}t.NodeHandlerSelectionField=i},39555:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionFragmentSpread=void 0;const n=r(97285);class i extends n.NodeHandlerSelectionAdapter{constructor(e,t){super("FragmentSpread",e,t)}handle(e,t){const r=t.fragmentDefinitions[e.name.value];if(!r)throw new Error("Undefined fragment definition: "+e.name.value);const n={alias:void 0,arguments:void 0,directives:r.directives,kind:"Field",name:e.name,selectionSet:r.selectionSet},i=[this.util.newTypePattern(t.subject,r.typeCondition,t)];return this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),this.fieldToOperation(t,n,!1,i))}}t.NodeHandlerSelectionFragmentSpread=i},89509:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionInlineFragment=void 0;const n=r(97285);class i extends n.NodeHandlerSelectionAdapter{constructor(e,t){super("InlineFragment",e,t)}handle(e,t){const r={alias:void 0,arguments:void 0,directives:e.directives,kind:"Field",name:{kind:"Name",value:t.subject.value},selectionSet:e.selectionSet},n=e.typeCondition?[this.util.newTypePattern(t.subject,e.typeCondition,t)]:[];return this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),this.fieldToOperation(t,r,!1,n))}}t.NodeHandlerSelectionInlineFragment=i},62096:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerAdapter=void 0,t.DirectiveNodeHandlerAdapter=class{constructor(e,t,r){this.targetKind=e,this.util=t,this.settings=r}getDirectiveConditionalValue(e,t){const r=this.util.getArgument(e.arguments,"if");if(!r)throw new Error(`The directive ${e.name.value} is missing an if-argument.`);const n=this.util.handleNodeValue(r.value,r.name.value,t);if(1!==n.terms.length)throw new Error(`Can not apply the directive ${e.name.value} with a list.`);return n.terms[0]}isDirectiveScopeAll(e){const t=this.util.getArgument(e.arguments,"scope");return t&&"EnumValue"===t.value.kind&&"all"===t.value.value}}},5095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerInclude=void 0;const n=r(62096);class i extends n.DirectiveNodeHandlerAdapter{constructor(e,t){super("include",e,t)}handle(e,t){const r=this.getDirectiveConditionalValue(e.directive,t);return"Literal"===r.termType&&"false"===r.value?{ignore:!0}:{}}}t.DirectiveNodeHandlerInclude=i},61151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerOptional=void 0;const n=r(62096);class i extends n.DirectiveNodeHandlerAdapter{constructor(e,t){super("optional",e,t)}handle(e,t){return{operationOverrider:e=>this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),e)}}}t.DirectiveNodeHandlerOptional=i},11013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerPlural=void 0;const n=r(17762),i=r(62096);class a extends i.DirectiveNodeHandlerAdapter{constructor(e,t){super("plural",e,t)}handle(e,t){return this.isDirectiveScopeAll(e.directive)&&(t.singularizeState=n.SingularizeState.PLURAL),delete t.singularizeVariables[this.util.nameToVariable(e.fieldLabel,t).value],{}}}t.DirectiveNodeHandlerPlural=a},60479:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerSingle=void 0;const n=r(17762),i=r(62096);class a extends i.DirectiveNodeHandlerAdapter{constructor(e,t){super("single",e,t)}handle(e,t){return this.isDirectiveScopeAll(e.directive)&&(t.singularizeState=n.SingularizeState.SINGLE),t.singularizeVariables[this.util.nameToVariable(e.fieldLabel,t).value]=!0,{}}}t.DirectiveNodeHandlerSingle=a},88320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerSkip=void 0;const n=r(62096);class i extends n.DirectiveNodeHandlerAdapter{constructor(e,t){super("skip",e,t)}handle(e,t){const r=this.getDirectiveConditionalValue(e.directive,t);return"Literal"===r.termType&&"true"===r.value?{ignore:!0}:{}}}t.DirectiveNodeHandlerSkip=i},96414: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(62096),t),i(r(5095),t),i(r(61151),t),i(r(11013),t),i(r(60479),t),i(r(88320),t)},51812: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(96414),t),i(r(31998),t),i(r(14009),t),i(r(94058),t),i(r(73045),t),i(r(9540),t),i(r(9373),t),i(r(97285),t),i(r(15790),t),i(r(39555),t),i(r(89509),t)},81652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerAdapter=void 0,t.NodeValueHandlerAdapter=class{constructor(e,t,r){this.targetKind=e,this.util=t,this.settings=r}}},95347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerBoolean=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("BooleanValue",e,t),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#boolean")}handle(e,t,r){return{terms:[this.util.dataFactory.literal(e.value?"true":"false",this.datatype)]}}}t.NodeValueHandlerBoolean=i},87822:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerEnum=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("EnumValue",e,t)}handle(e,t,r){return{terms:[this.util.valueToNamedNode(e.value,r.context)]}}}t.NodeValueHandlerEnum=i},5797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerFloat=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("FloatValue",e,t),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#float")}handle(e,t,r){return{terms:[this.util.dataFactory.literal(e.value,this.datatype)]}}}t.NodeValueHandlerFloat=i},18338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerInt=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("IntValue",e,t),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#integer")}handle(e,t,r){return{terms:[this.util.dataFactory.literal(e.value,this.datatype)]}}}t.NodeValueHandlerInt=i},70727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerList=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("ListValue",e,t),this.nodeFirst=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),this.nodeRest=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),this.nodeNil=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")}handle(e,t,r){const n=[];let i=[];for(const a of e.values){const e=this.util.handleNodeValue(a,t,r);for(const t of e.terms)n.push(t);e.auxiliaryPatterns&&(i=i.concat(e.auxiliaryPatterns))}if(this.settings.arraysToRdfLists){const e=this.util.dataFactory.blankNode();let t=e,a=n.length;for(const e of n){i.push(this.util.operationFactory.createPattern(t,this.nodeFirst,e,r.graph));const n=0==--a?this.nodeNil:this.util.dataFactory.blankNode();i.push(this.util.operationFactory.createPattern(t,this.nodeRest,n,r.graph)),t=n}return{terms:[e],auxiliaryPatterns:i}}return{terms:n,auxiliaryPatterns:i}}}t.NodeValueHandlerList=i},13294:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerNull=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("NullValue",e,t),this.nil=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")}handle(e,t,r){return{terms:[this.nil]}}}t.NodeValueHandlerNull=i},41756:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerObject=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("ObjectValue",e,t)}handle(e,t,r){const n=this.util.dataFactory.blankNode();let i=[];for(const a of e.fields){const e=this.util.handleNodeValue(a.value,t,r);for(const t of e.terms)i.push(this.util.createQuadPattern(n,a.name,t,r.graph,r.context));e.auxiliaryPatterns&&(i=i.concat(e.auxiliaryPatterns))}return{terms:[n],auxiliaryPatterns:i}}}t.NodeValueHandlerObject=i},26906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerString=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("StringValue",e,t)}handle(e,t,r){const n=r.context.getContextRaw()[t];let i,a;return n&&"string"!=typeof n&&(n["@language"]?i=n["@language"]:n["@type"]&&(a=this.util.dataFactory.namedNode(n["@type"]))),{terms:[this.util.dataFactory.literal(e.value,i||a)]}}}t.NodeValueHandlerString=i},47959:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerVariable=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("Variable",e,t)}handle(e,t,r){const n=e.name.value,i=r.variablesDict[n],a=r.variablesMetaDict[n];if(!i){if(r.ignoreUnknownVariables||a&&!a.mandatory){const e=this.util.dataFactory.variable(n);return r.terminalVariables.map((e=>e.value)).indexOf(n)<0&&r.terminalVariables.push(e),{terms:[e]}}throw new Error(`Undefined variable: ${n}`)}if("Variable"===i.kind)throw new Error(`Variable refers to another variable: ${n}`);if(a)if(a.list){if("ListValue"!==i.kind)throw new Error(`Expected a list, but got ${i.kind} for ${n}`);if(a.type){const e=i;for(const t of e.values)if(t.kind!==a.type)throw new Error(`Expected ${a.type}, but got ${t.kind} for ${n}`)}}else a.type;return this.util.handleNodeValue(i,t,r)}}t.NodeValueHandlerVariable=i},31998: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(81652),t),i(r(95347),t),i(r(87822),t),i(r(5797),t),i(r(18338),t),i(r(70727),t),i(r(13294),t),i(r(41756),t),i(r(26906),t),i(r(47959),t)},91525:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.toSparqlJs=t.toSparql=t.Factory=t.Algebra=t.translate=void 0;const s=o(r(16026));t.translate=s.default;const c=a(r(38849));t.Algebra=c;const u=o(r(67063));t.Factory=u.default;const l=r(96180);Object.defineProperty(t,"toSparql",{enumerable:!0,get:function(){return l.toSparql}}),Object.defineProperty(t,"toSparqlJs",{enumerable:!0,get:function(){return l.toSparqlJs}});const d=o(r(75885));t.Util=d.default},38849:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.expressionTypes=t.types=void 0,(n=t.types||(t.types={})).ALT="alt",n.ASK="ask",n.BGP="bgp",n.CONSTRUCT="construct",n.DESCRIBE="describe",n.DISTINCT="distinct",n.EXPRESSION="expression",n.EXTEND="extend",n.FILTER="filter",n.FROM="from",n.GRAPH="graph",n.GROUP="group",n.INV="inv",n.JOIN="join",n.LEFT_JOIN="leftjoin",n.LINK="link",n.MINUS="minus",n.NOP="nop",n.NPS="nps",n.ONE_OR_MORE_PATH="OneOrMorePath",n.ORDER_BY="orderby",n.PATH="path",n.PATTERN="pattern",n.PROJECT="project",n.REDUCED="reduced",n.SEQ="seq",n.SERVICE="service",n.SLICE="slice",n.UNION="union",n.VALUES="values",n.ZERO_OR_MORE_PATH="ZeroOrMorePath",n.ZERO_OR_ONE_PATH="ZeroOrOnePath",n.COMPOSITE_UPDATE="compositeupdate",n.DELETE_INSERT="deleteinsert",n.LOAD="load",n.CLEAR="clear",n.CREATE="create",n.DROP="drop",n.ADD="add",n.MOVE="move",n.COPY="copy",(r=t.expressionTypes||(t.expressionTypes={})).AGGREGATE="aggregate",r.EXISTENCE="existence",r.NAMED="named",r.OPERATOR="operator",r.TERM="term",r.WILDCARD="wildcard"},67063:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const o=a(r(38849)),s=r(18050),c=r(22112),u=r(55403);t.default=class{constructor(e){this.dataFactory=e||new s.DataFactory,this.stringType=this.createTerm("http://www.w3.org/2001/XMLSchema#string")}createAlt(e,t=!0){return this.flattenMulti({type:o.types.ALT,input:e},t)}createAsk(e){return{type:o.types.ASK,input:e}}createBoundAggregate(e,t,r,n,i){const a=this.createAggregateExpression(t,r,n,i);return a.variable=e,a}createBgp(e){return{type:o.types.BGP,patterns:e}}createConstruct(e,t){return{type:o.types.CONSTRUCT,input:e,template:t}}createDescribe(e,t){return{type:o.types.DESCRIBE,input:e,terms:t}}createDistinct(e){return{type:o.types.DISTINCT,input:e}}createExtend(e,t,r){return{type:o.types.EXTEND,input:e,variable:t,expression:r}}createFrom(e,t,r){return{type:o.types.FROM,input:e,default:t,named:r}}createFilter(e,t){return{type:o.types.FILTER,input:e,expression:t}}createGraph(e,t){return{type:o.types.GRAPH,input:e,name:t}}createGroup(e,t,r){return{type:o.types.GROUP,input:e,variables:t,aggregates:r}}createInv(e){return{type:o.types.INV,path:e}}createJoin(e,t=!0){return this.flattenMulti({type:o.types.JOIN,input:e},t)}createLeftJoin(e,t,r){return r?{type:o.types.LEFT_JOIN,input:[e,t],expression:r}:{type:o.types.LEFT_JOIN,input:[e,t]}}createLink(e){return{type:o.types.LINK,iri:e}}createMinus(e,t){return{type:o.types.MINUS,input:[e,t]}}createNop(){return{type:o.types.NOP}}createNps(e){return{type:o.types.NPS,iris:e}}createOneOrMorePath(e){return{type:o.types.ONE_OR_MORE_PATH,path:e}}createOrderBy(e,t){return{type:o.types.ORDER_BY,input:e,expressions:t}}createPath(e,t,r,n){return n?{type:o.types.PATH,subject:e,predicate:t,object:r,graph:n}:{type:o.types.PATH,subject:e,predicate:t,object:r,graph:this.dataFactory.defaultGraph()}}createPattern(e,t,r,n){const i=this.dataFactory.quad(e,t,r,n);return i.type=o.types.PATTERN,i}createProject(e,t){return{type:o.types.PROJECT,input:e,variables:t}}createReduced(e){return{type:o.types.REDUCED,input:e}}createSeq(e,t=!0){return this.flattenMulti({type:o.types.SEQ,input:e},t)}createService(e,t,r){return{type:o.types.SERVICE,input:e,name:t,silent:Boolean(r)}}createSlice(e,t,r){return t=t||0,void 0!==r?{type:o.types.SLICE,input:e,start:t,length:r}:{type:o.types.SLICE,input:e,start:t}}createUnion(e,t=!0){return this.flattenMulti({type:o.types.UNION,input:e},t)}createValues(e,t){return{type:o.types.VALUES,variables:e,bindings:t}}createZeroOrMorePath(e){return{type:o.types.ZERO_OR_MORE_PATH,path:e}}createZeroOrOnePath(e){return{type:o.types.ZERO_OR_ONE_PATH,path:e}}createAggregateExpression(e,t,r,n){return n?{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,separator:n,distinct:r}:{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,distinct:r}}createExistenceExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.EXISTENCE,not:e,input:t}}createNamedExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.NAMED,name:e,args:t}}createOperatorExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.OPERATOR,operator:e,args:t}}createTermExpression(e){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.TERM,term:e}}createWildcardExpression(){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.WILDCARD,wildcard:new u.Wildcard}}createTerm(e){return(0,c.stringToTerm)(e,this.dataFactory)}createCompositeUpdate(e){return{type:o.types.COMPOSITE_UPDATE,updates:e}}createDeleteInsert(e,t,r){const n={type:o.types.DELETE_INSERT};return e&&(n.delete=e),t&&(n.insert=t),r&&(n.where=r),n}createLoad(e,t,r){const n={type:o.types.LOAD,source:e};return t&&(n.destination=t),this.addSilent(n,Boolean(r))}createClear(e,t){return this.addSilent({type:o.types.CLEAR,source:e},Boolean(t))}createCreate(e,t){return this.addSilent({type:o.types.CREATE,source:e},Boolean(t))}createDrop(e,t){return this.addSilent({type:o.types.DROP,source:e},Boolean(t))}createAdd(e,t,r){return this.addSilent({type:o.types.ADD,source:e,destination:t},Boolean(r))}createMove(e,t,r){return this.addSilent({type:o.types.MOVE,source:e,destination:t},Boolean(r))}createCopy(e,t,r){return this.addSilent({type:o.types.COPY,source:e,destination:t},Boolean(r))}addSilent(e,t){return t&&(e.silent=t),e}flattenMulti(e,t){if(!t)return e;const r=e.type,n=e.input;let i=[];for(const e of n)e.type===r?i.push(...e.input):i.push(e);return e.input=i,e}}},96180:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.toSparqlJs=t.toSparql=void 0;const s=r(91032),c=r(22112),u=r(55403),l=a(r(38849)),d=o(r(67063)),p=o(r(75885)),h=l.types,f=l.expressionTypes;let y;const g=new d.default;function m(e){b();let t=v(e=function(e){return D(e,[])}(e));return"group"===t.type?t.patterns[0]:t}function b(){y={project:!1,extend:[],group:[],aggregates:[],order:[]}}function v(e){switch(e.type!==h.EXTEND&&e.type!==h.ORDER_BY&&e.type!==h.GRAPH&&(y.project=!1),e.type){case h.EXPRESSION:return _(e);case h.ASK:return A(e,h.ASK);case h.BGP:return function(e){let t=e.patterns.map(E);return 0===t.length?null:{type:"bgp",triples:t}}(e);case h.CONSTRUCT:return function(e){return{type:"query",prefixes:{},queryType:"CONSTRUCT",template:e.template.map(E),where:p.default.flatten([v(e.input)])}}(e);case h.DESCRIBE:return A(e,h.DESCRIBE);case h.DISTINCT:return function(e){let t=v(e.input);return t.patterns[0].distinct=!0,t}(e);case h.EXTEND:return function(e){return y.project?(y.extend.push(e),v(e.input)):p.default.flatten([v(e.input),{type:"bind",variable:e.variable,expression:_(e.expression)}])}(e);case h.FROM:return function(e){const t=v(e.input);let r=t;return"group"===t.type&&(r=t.patterns[0]),r.from={default:e.default,named:e.named},t}(e);case h.FILTER:return function(e){return{type:"group",patterns:p.default.flatten([v(e.input),{type:"filter",expression:_(e.expression)}])}}(e);case h.GRAPH:return function(e){return{type:"graph",patterns:p.default.flatten([v(e.input)]),name:e.name}}(e);case h.GROUP:return function(e){const t=v(e.input),r=e.aggregates.map(O);return y.aggregates.push(...r),y.group.push(...e.variables),t}(e);case h.JOIN:return function(e){return p.default.flatten(e.input.map(v)).reduce(((e,t)=>("bgp"!==t.type||0==e.length||"bgp"!==e[e.length-1].type?e.push(t):e[e.length-1].triples.push(...t.triples),e)),[])}(e);case h.LEFT_JOIN:return function(e){const t={type:"optional",patterns:[v(e.input[1])]};return e.expression&&t.patterns.push({type:"filter",expression:_(e.expression)}),t.patterns=p.default.flatten(t.patterns),p.default.flatten([v(e.input[0]),t])}(e);case h.MINUS:return function(e){let t=v(e.input[1]);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),p.default.flatten([v(e.input[0]),{type:"minus",patterns:t}])}(e);case h.NOP:return{};case h.ORDER_BY:return function(e){return y.order.push(...e.expressions),v(e.input)}(e);case h.PATH:return function(e){return{type:"bgp",triples:[{subject:e.subject,predicate:w(e.predicate),object:e.object}]}}(e);case h.PATTERN:return E(e);case h.PROJECT:return A(e,h.PROJECT);case h.REDUCED:return function(e){let t=v(e.input);return t.patterns[0].reduced=!0,t}(e);case h.SERVICE:return function(e){let t=v(e.input);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),{type:"service",name:e.name,silent:e.silent,patterns:t}}(e);case h.SLICE:return function(e){let t=v(e.input),r=t;return t.type&&"group"===t.type&&(r=t.patterns[0]),0!==e.start&&(r.offset=e.start),void 0!==e.length&&(r.limit=e.length),t}(e);case h.UNION:return function(e){return{type:"union",patterns:e.input.map(v).map(S)}}(e);case h.VALUES:return function(e){return{type:"values",values:e.bindings.map((t=>{let r={};for(let n of e.variables){let e=`?${n.value}`;t[e]?r[e]=t[e]:r[e]=void 0}return r}))}}(e);case h.COMPOSITE_UPDATE:return function(e){return{prefixes:{},type:"update",updates:e.updates.map((e=>v(e).updates[0]))}}(e);case h.DELETE_INSERT:return function(e){var t;let r,n=e.where;if(n&&n.type===h.FROM){let e=n;n=e.input,r={default:e.default,named:e.named}}const i=[{updateType:"insertdelete",delete:N(e.delete||[]),insert:N(e.insert||[])}];if(r&&(i[0].using=r),!n||n.type===h.BGP&&0===n.patterns.length)i[0].where=[];else{const e=[];let r=v(D(n,e));if("group"===r.type?i[0].where=r.patterns:i[0].where=[r],e.length>0){if(1!==e.length)throw new Error("This is unexpected and might indicate an error in graph handling for updates.");""!==(null===(t=e[0])||void 0===t?void 0:t.value)&&(i[0].where=[{type:"graph",patterns:i[0].where,name:e[0]}])}}return e.delete||e.where?e.insert||e.where?!e.insert&&e.where&&"bgp"===e.where.type&&(0,s.isomorphic)(e.delete,e.where.patterns)&&(delete i[0].where,i[0].updateType="deletewhere"):(delete i[0].insert,delete i[0].where,e.delete.some((e=>"Variable"===e.subject.termType||"Variable"===e.predicate.termType||"Variable"===e.object.termType))?i[0].updateType="deletewhere":i[0].updateType="delete"):(i[0].updateType="insert",delete i[0].delete,delete i[0].where),{prefixes:{},type:"update",updates:i}}(e);case h.LOAD:return function(e){const t=[{type:"load",silent:Boolean(e.silent),source:e.source}];return e.destination&&(t[0].destination=e.destination),{prefixes:{},type:"update",updates:t}}(e);case h.CLEAR:return function(e){return I(e,"clear")}(e);case h.CREATE:return function(e){return I(e,"create")}(e);case h.DROP:return function(e){return I(e,"drop")}(e);case h.ADD:return function(e){return P(e,"add")}(e);case h.MOVE:return function(e){return P(e,"move")}(e);case h.COPY:return function(e){return P(e,"copy")}(e)}throw new Error(`Unknown Operation type ${e.type}`)}function _(e){switch(e.expressionType){case f.AGGREGATE:return function(e){const t={expression:_(e.expression),type:"aggregate",aggregation:e.aggregator,distinct:e.distinct};return e.separator&&(t.separator=e.separator),t}(e);case f.EXISTENCE:return function(e){return{type:"operation",operator:e.not?"notexists":"exists",args:p.default.flatten([v(e.input)])}}(e);case f.NAMED:return function(e){return{type:"functionCall",function:e.name,args:e.args.map(_)}}(e);case f.OPERATOR:return function(e){if("desc"===e.operator){return{expression:_(e.args[0]),descending:!0}}const t={type:"operation",operator:e.operator,args:e.args.map(_)};return"in"!==t.operator&&"notin"!==t.operator||(t.args=[t.args[0]].concat([t.args.slice(1)])),t}(e);case f.TERM:return function(e){return e.term}(e);case f.WILDCARD:return function(e){return e.wildcard}(e)}throw new Error(`Unknown Expression Operation type ${e.expressionType}`)}function w(e){switch(e.type){case h.ALT:return function(e){const t=e.input.map(w);return t.every((e=>"pathType"in e&&"!"===e.pathType))?{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:p.default.flatten(t.map((e=>e.items)))}]}:{type:"path",pathType:"|",items:t}}(e);case h.INV:return function(e){if(e.path.type===h.NPS){const t=e.path.iris.map((e=>({type:"path",pathType:"^",items:[e]})));return t.length<=1?{type:"path",pathType:"!",items:t}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:t}]}}return{type:"path",pathType:"^",items:[w(e.path)]}}(e);case h.LINK:return function(e){return e.iri}(e);case h.NPS:return function(e){return e.iris.length<=1?{type:"path",pathType:"!",items:e.iris}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:e.iris}]}}(e);case h.ONE_OR_MORE_PATH:return function(e){return{type:"path",pathType:"+",items:[w(e.path)]}}(e);case h.SEQ:return function(e){return{type:"path",pathType:"/",items:e.input.map(w)}}(e);case h.ZERO_OR_MORE_PATH:return function(e){return{type:"path",pathType:"*",items:[w(e.path)]}}(e);case h.ZERO_OR_ONE_PATH:return function(e){return{type:"path",pathType:"?",items:[w(e.path)]}}(e)}throw new Error(`Unknown Path type ${e.type}`)}function T(e){return(0,c.termToString)(e)}function S(e){return Array.isArray(e)?1===e.length?e[0]:{type:"group",patterns:e}:e}function O(e){return e}function E(e){return{subject:e.subject,predicate:e.predicate,object:e.object}}function x(e,t){let r=p.default.isSimpleTerm(e)?T(e):e;if("string"==typeof r){if(t[r])return t[r]}else if(Array.isArray(e))e=e.map((e=>x(e,t)));else for(let r of Object.keys(e))e[r]=x(e[r],t);return e}function A(e,t){const r={type:"query",prefixes:{}},n=r;let i;t===h.PROJECT?(r.queryType="SELECT",i=e.variables):t===h.ASK?r.queryType="ASK":t===h.DESCRIBE&&(r.queryType="DESCRIBE",i=e.terms);const a=y.extend,o=y.group,s=y.aggregates,c=y.order;b(),y.project=!0;let l=p.default.flatten([v(e.input)]);1===l.length&&"group"===l[0].type&&(l=l[0].patterns),r.where=l;let d={};for(let e of y.aggregates)d[T(e.variable)]=_(e);let f={};for(let e=y.extend.length-1;e>=0;--e){let t=y.extend[e];f[T(t.variable)]=x(_(t.expression),d)}if(y.group.length>0&&(n.group=y.group.map((e=>{let t=T(e);if(f[t]){let r=f[t];return delete f[t],{variable:e,expression:r}}return{expression:e}}))),y.order.length>0&&(n.order=y.order.map(v).map((e=>e.descending?e:{expression:e}))),i&&(n.variables=i.map((e=>{let t=T(e);return f[t]?{variable:e,expression:f[t]}:e})),0===n.variables.length&&(n.variables=[new u.Wildcard])),r.where.length>0&&"filter"===r.where[r.where.length-1].type){const e=r.where[r.where.length-1];R(e,Object.keys(d))&&(n.having=p.default.flatten([x(e.expression,d)]),r.where.splice(-1))}return y.extend=a,y.group=o,y.aggregates=s,y.order=c,{type:"group",patterns:[n]}}function R(e,t){return p.default.isSimpleTerm(e)?t.indexOf(T(e))>=0:Array.isArray(e)?e.some((e=>R(e,t))):e===Object(e)?Object.keys(e).some((r=>R(e[r],t))):t.indexOf(e)>=0}function I(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return"DEFAULT"===e.source?r[0].graph={default:!0}:"NAMED"===e.source?r[0].graph={named:!0}:"ALL"===e.source?r[0].graph={all:!0}:r[0].graph={type:"graph",name:e.source},{prefixes:{},type:"update",updates:r}}function P(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return r[0].source="DEFAULT"===e.source?{type:"graph",default:!0}:{type:"graph",name:e.source},r[0].destination="DEFAULT"===e.destination?{type:"graph",default:!0}:{type:"graph",name:e.destination},{prefixes:{},type:"update",updates:r}}function N(e){if(!e)return[];const t={};return e.forEach((e=>{const r=e.graph.value;t[r]||(t[r]=[]),t[r].push(e)})),Object.keys(t).map((e=>""===e?{type:"bgp",triples:t[e].map(E)}:{type:"graph",triples:t[e].map(E),name:t[e][0].graph}))}function D(e,t){if(Array.isArray(e))return e.map((e=>D(e,t)));if(!e.type)return e;if(e.type===h.DELETE_INSERT)return e;if((e.type===h.PATTERN||e.type===h.PATH)&&e.graph)return t.push(e.graph),""!==e.graph.name?e.type===h.PATTERN?g.createPattern(e.subject,e.predicate,e.object):g.createPath(e.subject,e.predicate,e.object):e;const r={},n={},i={};for(let t of Object.keys(e)){const a=[];if(r[t]=D(e[t],a),a.length>0){n[t]=a;for(const e of a)i[e.value]=e}}const a=Object.keys(i);if(a.length>0)if(1!==a.length||[h.PROJECT,h.SERVICE].includes(e.type)){if(e.type===h.BGP)return function(e,t){var r;const n={};for(let i=0;i""===n[e][0].value?t:g.createGraph(t,n[e][r]))):""!==n[e][0].value&&(r[e]=g.createGraph(t,n[e][0]))}}else t.push(i[a[0]]);return r}t.toSparql=function(e,t={}){return new u.Generator(t).stringify(m(e))},t.toSparqlJs=m},16026:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(53933),c=r(22112),u=a(r(38849)),l=o(r(67063)),d=o(r(75885)),p=r(55403).Parser,h=u.types;let f,y=new Set,g=0,m=!1;function b(e,t,r){if(y=new Set,g=0,m=Boolean(t),!e.type)return f.createNop();if("query"!==e.type&&"update"!==e.type)throw new Error("Translate only works on complete query or update objects.");let n;var i;return w(e),"query"===e.type?(n=S({type:"group",patterns:e.where||[]}),n=function(e,t){const r=e,n=[],i={};if(r.variables=r.variables&&r.variables.map((e=>C(e,i))),r.having=r.having&&r.having.map((e=>C(e,i))),r.order=r.order&&r.order.map((e=>C(e,i))),r.group||Object.keys(i).length>0){const e=Object.keys(i).map((e=>function(e,t){if("aggregate"!==e.type||!e.aggregation)throw new Error(`Unexpected input: ${JSON.stringify(e)}`);const r=O(e);return r.variable=t,r}(i[e],f.createTerm(e)))),n=[];if(r.group)for(const e of r.group)if(d.default.isSimpleTerm(e.expression))n.push(e.expression);else{const r="variable"in e?e.variable:A();t=f.createExtend(t,r,O(e.expression)),n.push(r)}t=f.createGroup(t,n,e)}if(r.having)for(let e of r.having)t=f.createFilter(t,O(e));e.values&&(t=f.createJoin([t,j(e)]));let a=[];if("SELECT"===e.queryType||"DESCRIBE"===e.queryType)if(e.variables.some((e=>e&&d.default.isWildcard(e))))a=Object.values(T(e)).sort(((e,t)=>e.value.localeCompare(t.value)));else for(let t of e.variables)_(t)||!("variable"in t)?a.push(t):t.variable&&(a.push(t.variable),n.push(t));for(let e of n)t=f.createExtend(t,e.variable,O(e.expression));return r.order&&(t=f.createOrderBy(t,r.order.map((e=>{let t=O(e.expression);return e.descending&&(t=f.createOperatorExpression("desc",[t])),t})))),"SELECT"===e.queryType&&(t=f.createProject(t,a)),r.distinct&&(t=f.createDistinct(t)),r.reduced&&(t=f.createReduced(t)),"CONSTRUCT"===e.queryType?t=f.createConstruct(t,(e.template||[]).map(R)):"ASK"===e.queryType?t=f.createAsk(t):"DESCRIBE"===e.queryType&&(t=f.createDescribe(t,a)),(r.offset||r.limit)&&(t=f.createSlice(t,r.offset||0,r.limit)),r.from&&(t=f.createFrom(t,r.from.default,r.from.named)),t}(e,n)):"update"===e.type&&(n=1===(i=e).updates.length?M(i.updates[0]):f.createCompositeUpdate(i.updates.map(M))),r&&(n=k(n)),n}function v(e){return Boolean(null==e?void 0:e.termType)}function _(e){return"Variable"===(null==e?void 0:e.termType)}function w(e){if(v(e))_(e)&&y.add(`?${e.value}`);else if(Array.isArray(e))for(const t of e)w(t);else if(e&&"object"==typeof e)for(let t of Object.keys(e))t.startsWith("?")&&y.add(t),w(e[t])}function T(e){let t={};if((r=e).subject&&r.predicate&&r.object){const r=[T(e.subject),T(e.predicate),T(e.object),e.graph?T(e.graph):{}];Object.assign(t,...r)}else if(v(e))_(e)&&(t[e.value]=e);else if("bgp"===e.type){const r=e.triples;Object.assign(t,...r.map(T))}else if("path"===e.type)Object.assign(t,...e.items.map(T));else if("group"===e.type||"union"===e.type||"optional"===e.type)Object.assign(t,...e.patterns.map(T));else if("service"===e.type||"graph"===e.type)Object.assign(t,T(e.name)),Object.assign(t,...e.patterns.map(T));else if("bind"===e.type)Object.assign(t,T(e.variable));else if("values"===e.type){if(e.values.length>0){const r=Object.keys(e.values[0]).map((e=>f.createTerm(e)));Object.assign(t,...r.map(T))}}else if("query"===e.type&&("SELECT"===e.queryType||"DESCRIBE"===e.queryType)){e.where&&e.variables.some(d.default.isWildcard)&&Object.assign(t,...e.where.map(T));for(const r of e.variables)_(r)?Object.assign(t,T(r)):r.variable&&Object.assign(t,T(r.variable));if("SELECT"===e.queryType){if(e.group)for(const r of e.group)r.variable&&Object.assign(t,T(r.variable));if(e.values){const r={type:"values",values:e.values};Object.assign(t,T(r))}}}var r;return t}function S(e){if("bgp"===e.type)return function(e){let t=[],r=[];for(let i of e.triples)if("pathType"in i.predicate){let e=x((n=i).subject,E(n.predicate),n.object);for(let n of e)n.type===h.PATH?(t.length>0&&r.push(f.createBgp(t)),t=[],r.push(n)):t.push(n)}else t.push(R(i));var n;return t.length>0&&r.push(f.createBgp(t)),1===r.length?r[0]:f.createJoin(r)}(e);if("union"===e.type)return f.createUnion(e.patterns.map((e=>("group"!==e.type&&(e={type:"group",patterns:[e]}),S(e)))));if("graph"===e.type){let t=S({type:"group",patterns:e.patterns});return t=m?P(t,e.name):f.createGraph(t,e.name),t}if("values"===e.type)return j(e);if("query"===e.type)return b(e,m,!1);if("group"===e.type){let t=[],r=[];for(let n of e.patterns)("filter"===n.type?t:r).push(n);let n=r.reduce(N,f.createBgp([])),i=t.map((e=>O(e.expression)));return i.length>0&&(n=f.createFilter(n,i.reduce(((e,t)=>f.createOperatorExpression("&&",[e,t]))))),n}throw new Error(`Unexpected type: ${e.type}`)}function O(e){if(d.default.isSimpleTerm(e))return f.createTermExpression(e);if(d.default.isQuad(e))return d.default.hasQuadVariables(e)?f.createOperatorExpression("triple",[O(e.subject),O(e.predicate),O(e.object)]):f.createTermExpression(e);if(d.default.isWildcard(e))return f.createWildcardExpression();if("aggregation"in e)return f.createAggregateExpression(e.aggregation,O(e.expression),Boolean(e.distinct),e.separator);if("function"in e)return f.createNamedExpression(e.function,e.args.map(O));if("operator"in e)return"exists"===e.operator||"notexists"===e.operator?f.createExistenceExpression("notexists"===e.operator,S(e.args[0])):("in"!==e.operator&&"notin"!==e.operator||(e.args=[e.args[0]].concat(e.args[1])),f.createOperatorExpression(e.operator,e.args.map(O)));throw new Error(`Unknown expression: ${JSON.stringify(e)}`)}function E(e){if(d.default.isSimpleTerm(e)){if("NamedNode"===e.termType)return f.createLink(e);throw new Error(`Path predicate should be a NamedNode, got ${JSON.stringify(e)}`)}if("^"===e.pathType)return f.createInv(E(e.items[0]));if("!"===e.pathType){let t,r=[],n=[];t="pathType"in e.items[0]&&"|"===e.items[0].pathType?e.items[0].items:e.items;for(let e of t)if(d.default.isSimpleTerm(e))r.push(e);else{if("^"!==e.pathType)throw new Error(`Unexpected item: ${JSON.stringify(e)}`);n.push(e.items[0])}let i=f.createNps(r),a=f.createInv(f.createNps(n));return 0===n.length?i:0===r.length?a:f.createAlt([i,a])}if("/"===e.pathType)return f.createSeq(e.items.map(E));if("|"===e.pathType)return f.createAlt(e.items.map(E));if("*"===e.pathType)return f.createZeroOrMorePath(E(e.items[0]));if("+"===e.pathType)return f.createOneOrMorePath(E(e.items[0]));if("?"===e.pathType)return f.createZeroOrOnePath(E(e.items[0]));throw new Error(`Unable to translate path expression ${JSON.stringify(e)}`)}function x(e,t,r){if(t.type===h.LINK)return[f.createPattern(e,t.iri,r)];if(t.type===h.INV)return x(r,t.path,e);if(t.type===h.SEQ){let n=e;return d.default.flatten(t.input.map(((e,i)=>{const a=i===t.input.length-1?r:A(),o=x(n,e,a);return"Variable"===a.termType&&(n=a),o})))}return[f.createPath(e,t,r)]}function A(){let e="?var"+g++;return y.has(e)?A():(y.add(e),f.createTerm(e))}function R(e){if("pathType"in e.predicate)throw new Error("Trying to translate property path to quad.");return f.createPattern(e.subject,e.predicate,e.object,e.graph)}t.default=function(e,t){let r;if(t=t||{},f=new l.default(t.dataFactory),"string"==typeof e){let n=new p(t);n._resetBlanks(),r=n.parse(e)}else r=e;return b(r,t.quads,t.blankToVariable)};let I=Object.values(h);function P(e,t,r){if(e.type===h.GRAPH){if(r)throw new Error("Recursing through nested GRAPH statements with a replacement is impossible.");e=P(e.input,e.name)}else if(e.type===h.SERVICE);else if(e.type===h.BGP)e.patterns=e.patterns.map((e=>(r&&(e.subject.equals(t)&&(e.subject=r),e.predicate.equals(t)&&(e.predicate=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t),e)));else if(e.type===h.PATH)r&&(e.subject.equals(t)&&(e.subject=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t);else if(e.type!==h.PROJECT||r)if(e.type!==h.EXTEND||r)for(let n of Object.keys(e))Array.isArray(e[n])?e[n]=e[n].map((e=>P(e,t,r))):I.indexOf(e[n].type)>=0?e[n]=P(e[n],t,r):r&&_(e[n])&&e[n].equals(t)&&(e[n]=r);else e.variable.equals(t)&&(r=A()),e.input=P(e.input,t,r);else e.variables.some((e=>e.equals(t)))||(r=A()),e.input=P(e.input,t,r);return e}function N(e,t){if("optional"===t.type){const r=S({type:"group",patterns:t.patterns});e=r.type===h.FILTER?f.createLeftJoin(e,r.input,r.expression):f.createLeftJoin(e,r)}else if("minus"===t.type){const r=S({type:"group",patterns:t.patterns});e=f.createMinus(e,r)}else if("bind"===t.type)e=f.createExtend(e,t.variable,O(t.expression));else if("service"===t.type){const r={type:"group",patterns:t.patterns};e=D(e,f.createService(S(r),t.name,t.silent))}else e=D(e,S(t));return e}function D(e,t){return e.type===h.BGP&&t.type===h.BGP?e=f.createBgp([...e.patterns,...t.patterns]):e.type===h.BGP&&0===e.patterns.length?e=t:t.type===h.BGP&&0===t.patterns.length||(e=f.createJoin([e,t])),e}function j(e){let t=(0===e.values.length?[]:Object.keys(e.values[0])).map(f.createTerm.bind(f)),r=e.values.map((e=>{let t=Object.keys(e);t=t.filter((t=>void 0!==e[t]));let r={};for(let n of t)r[n]=e[n];return r}));return f.createValues(t,r)}function C(e,t){if("type"in e&&"aggregate"===e.type){let r,n=!1;for(let i of Object.keys(t))if(s(t[i],e)){r=f.createTerm(i),n=!0;break}return n||(r=A(),t[(0,c.termToString)(r)]=e),r}return"expression"in e&&e.expression?{...e,expression:C(e.expression,t)}:"args"in e&&e.args?{...e,args:e.args.map((e=>C(e,t)))}:e}function M(e){if("type"in e){if("load"===e.type)return function(e){return f.createLoad(e.source,e.destination,e.silent)}(e);if("clear"===e.type||"create"===e.type||"drop"===e.type)return function(e){let t;switch(t=d.default.isSimpleTerm(e.graph)?e.graph:e.graph.all?"ALL":e.graph.default?"DEFAULT":e.graph.named?"NAMED":e.graph.name,e.type){case"clear":return f.createClear(t,e.silent);case"create":return f.createCreate(t,e.silent);case"drop":return f.createDrop(t,e.silent)}}(e);if("add"===e.type||"copy"===e.type||"move"===e.type)return function(e){const t=e.source.default?"DEFAULT":e.source.name,r=e.destination.default?"DEFAULT":e.destination.name;switch(e.type){case"copy":return f.createCopy(t,r,e.silent);case"move":return f.createMove(t,r,e.silent);case"add":return f.createAdd(t,r,e.silent)}}(e)}else if("insertdelete"===e.updateType||"deletewhere"===e.updateType||"delete"===e.updateType||"insert"===e.updateType)return function(e){if(!m)throw new Error("INSERT/DELETE operations are only supported with quads option enabled");let t,r=[],n=[];if(e.delete&&(r=d.default.flatten(e.delete.map((t=>L(t,e.graph))))),e.insert&&(n=d.default.flatten(e.insert.map((t=>L(t,e.graph))))),e.where&&e.where.length>0){t=S({type:"group",patterns:e.where});const r=e.using;r?t=f.createFrom(t,r.default,r.named):e.graph&&(t=P(t,e.graph))}else"deletewhere"===e.updateType&&r.length>0&&(t=f.createBgp(r));return f.createDeleteInsert(r.length>0?r:void 0,n.length>0?n:void 0,t)}(e);throw new Error(`Unknown update type ${JSON.stringify(e)}`)}function L(e,t){let r=t;"graph"===e.type&&(r=e.name);let n=e.triples;return r&&(n=n.map((e=>Object.assign(e,{graph:r})))),n.map(R)}function k(e){const t={},r=Array.from(y).reduce(((e,t)=>(e[t]=!0,e)),{});return d.default.mapOperation(e,{[u.types.DELETE_INSERT]:e=>({result:e,recurse:!1}),[u.types.PATH]:(e,t)=>({result:t.createPath(n(e.subject),e.predicate,n(e.object),n(e.graph)),recurse:!1}),[u.types.PATTERN]:(e,t)=>({result:t.createPattern(n(e.subject),n(e.predicate),n(e.object),n(e.graph)),recurse:!1}),[u.types.CONSTRUCT]:e=>({result:f.createConstruct(k(e.input),e.template),recurse:!1})});function n(e){if("BlankNode"===e.termType){let n=t[e.value];return n||(n=d.default.createUniqueVariable(e.value,r,f.dataFactory),r[n.value]=!0,t[e.value]=n),n}return e}}},75885:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(38849),a=n(r(67063)),o=r(13252);class s{static flatten(e){return Array.prototype.concat(...e).filter((e=>e))}static objectify(e){if(e.termType){if("Quad"===e.termType)return{type:"pattern",termType:"Quad",subject:s.objectify(e.subject),predicate:s.objectify(e.predicate),object:s.objectify(e.object),graph:s.objectify(e.graph)};{let t={termType:e.termType,value:e.value};return e.language&&(t.language=e.language),e.datatype&&(t.datatype=s.objectify(e.datatype)),t}}if(Array.isArray(e))return e.map((e=>s.objectify(e)));if(e===Object(e)){let t={};for(let r of Object.keys(e))t[r]=s.objectify(e[r]);return t}return e}static inScopeVariables(e){const t=[];function r(e){t.find((t=>e.value===t.value))||t.push(e)}function n(e){"Variable"===e.subject.termType&&r(e.subject),"Variable"===e.predicate.termType&&r(e.predicate),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.predicate.termType&&n(e.predicate),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph)}return s.recurseOperation(e,{[i.types.EXPRESSION]:e=>(e.expressionType===i.expressionTypes.AGGREGATE&&e.variable&&r(e.variable),!0),[i.types.EXTEND]:e=>(r(e.variable),!0),[i.types.GRAPH]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.GROUP]:e=>(e.variables.forEach(r),!0),[i.types.PATH]:e=>("Variable"===e.subject.termType&&r(e.subject),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph),!0),[i.types.PATTERN]:e=>(n(e),!0),[i.types.PROJECT]:e=>(e.variables.forEach(r),!1),[i.types.SERVICE]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.VALUES]:e=>(e.variables.forEach(r),!0)}),t}static recurseOperation(e,t){let r=e,n=!0;const a=t[e.type];if(a&&(n=a(e)),!n)return;let o=e=>s.recurseOperation(e,t);switch(r.type){case i.types.ALT:r.input.map(o);break;case i.types.ASK:o(r.input);break;case i.types.BGP:r.patterns.forEach(o);break;case i.types.CONSTRUCT:o(r.input),r.template.map(o);break;case i.types.DESCRIBE:case i.types.DISTINCT:o(r.input);break;case i.types.EXPRESSION:r.expressionType===i.expressionTypes.EXISTENCE&&o(r.input);break;case i.types.EXTEND:case i.types.FILTER:o(r.input),o(r.expression);break;case i.types.FROM:case i.types.GRAPH:o(r.input);break;case i.types.GROUP:o(r.input),r.aggregates.forEach(o);break;case i.types.INV:o(r.path);break;case i.types.JOIN:r.input.map(o);break;case i.types.LEFT_JOIN:r.input.map(o),r.expression&&o(r.expression);break;case i.types.LINK:break;case i.types.MINUS:r.input.map(o);break;case i.types.NOP:case i.types.NPS:break;case i.types.ONE_OR_MORE_PATH:o(r.path);break;case i.types.ORDER_BY:o(r.input),r.expressions.forEach(o);break;case i.types.PATH:o(r.predicate);break;case i.types.PATTERN:break;case i.types.PROJECT:case i.types.REDUCED:o(r.input);break;case i.types.SEQ:r.input.map(o);break;case i.types.SERVICE:case i.types.SLICE:o(r.input);break;case i.types.UNION:r.input.map(o);break;case i.types.VALUES:break;case i.types.ZERO_OR_MORE_PATH:case i.types.ZERO_OR_ONE_PATH:o(r.path);break;case i.types.COMPOSITE_UPDATE:r.updates.forEach((e=>o(e)));break;case i.types.DELETE_INSERT:r.delete&&r.delete.forEach((e=>o(e))),r.insert&&r.insert.forEach((e=>o(e))),r.where&&o(r.where);break;case i.types.LOAD:case i.types.CLEAR:case i.types.CREATE:case i.types.DROP:case i.types.ADD:case i.types.MOVE:case i.types.COPY:break;default:throw new Error(`Unknown Operation type ${r.type}`)}}static mapOperation(e,t,r){let n=e,o=!0,c=!0;r=r||new a.default;const u=t[e.type];if(u){const t=u(e,r);n=t.result,o=t.recurse,c=!1!==t.copyMetadata}let l;if(c&&(n.metadata||e.metadata)&&(l={...n.metadata,...e.metadata}),!o)return l&&(n.metadata=l),n;let d=e=>s.mapOperation(e,t,r);switch(n.type){case i.types.ALT:n=r.createAlt(n.input.map(d));break;case i.types.ASK:n=r.createAsk(d(n.input));break;case i.types.BGP:n=r.createBgp(n.patterns.map(d));break;case i.types.CONSTRUCT:n=r.createConstruct(d(n.input),n.template.map(d));break;case i.types.DESCRIBE:n=r.createDescribe(d(n.input),n.terms);break;case i.types.DISTINCT:n=r.createDistinct(d(n.input));break;case i.types.EXPRESSION:n=s.mapExpression(n,t,r);break;case i.types.EXTEND:n=r.createExtend(d(n.input),n.variable,d(n.expression));break;case i.types.FILTER:n=r.createFilter(d(n.input),d(n.expression));break;case i.types.FROM:n=r.createFrom(d(n.input),[...n.default],[...n.named]);break;case i.types.GRAPH:n=r.createGraph(d(n.input),n.name);break;case i.types.GROUP:n=r.createGroup(d(n.input),[].concat(n.variables),n.aggregates.map(d));break;case i.types.INV:n=r.createInv(d(n.path));break;case i.types.JOIN:n=r.createJoin(n.input.map(d));break;case i.types.LEFT_JOIN:n=r.createLeftJoin(d(n.input[0]),d(n.input[1]),n.expression?d(n.expression):void 0);break;case i.types.LINK:n=r.createLink(n.iri);break;case i.types.MINUS:n=r.createMinus(d(n.input[0]),d(n.input[1]));break;case i.types.NOP:n=r.createNop();break;case i.types.NPS:n=r.createNps([].concat(n.iris));break;case i.types.ONE_OR_MORE_PATH:n=r.createOneOrMorePath(d(n.path));break;case i.types.ORDER_BY:n=r.createOrderBy(d(n.input),n.expressions.map(d));break;case i.types.PATH:n=r.createPath(n.subject,d(n.predicate),n.object,n.graph);break;case i.types.PATTERN:n=r.createPattern(n.subject,n.predicate,n.object,n.graph);break;case i.types.PROJECT:n=r.createProject(d(n.input),[...n.variables]);break;case i.types.REDUCED:n=r.createReduced(d(n.input));break;case i.types.SEQ:n=r.createSeq(n.input.map(d));break;case i.types.SERVICE:n=r.createService(d(n.input),n.name,n.silent);break;case i.types.SLICE:n=r.createSlice(d(n.input),n.start,n.length);break;case i.types.UNION:n=r.createUnion(n.input.map(d));break;case i.types.VALUES:n=r.createValues([].concat(n.variables),n.bindings.map((e=>Object.assign({},e))));break;case i.types.ZERO_OR_MORE_PATH:n=r.createZeroOrMorePath(d(n.path));break;case i.types.ZERO_OR_ONE_PATH:n=r.createZeroOrOnePath(d(n.path));break;case i.types.COMPOSITE_UPDATE:n=r.createCompositeUpdate(n.updates.map(d));break;case i.types.DELETE_INSERT:n=r.createDeleteInsert(n.delete?n.delete.map(d):void 0,n.insert?n.insert.map(d):void 0,n.where?d(n.where):void 0);break;case i.types.LOAD:n=r.createLoad(n.source,n.destination,n.silent);break;case i.types.CLEAR:n=r.createClear(n.source,n.silent);break;case i.types.CREATE:n=r.createCreate(n.source,n.silent);break;case i.types.DROP:n=r.createDrop(n.source,n.silent);break;case i.types.ADD:n=r.createAdd(n.source,n.destination);break;case i.types.MOVE:n=r.createMove(n.source,n.destination);break;case i.types.COPY:n=r.createCopy(n.source,n.destination);break;default:throw new Error(`Unknown Operation type ${n.type}`)}return l&&(n.metadata=l),n}static mapExpression(e,t,r){let n=e,o=!0;r=r||new a.default;const c=t[e.expressionType];if(c&&({result:n,recurse:o}=c(e,r)),!o)return n;let u=e=>s.mapOperation(e,t,r);switch(e.expressionType){case i.expressionTypes.AGGREGATE:return e.variable?r.createBoundAggregate(e.variable,e.aggregator,u(e.expression),e.distinct,e.separator):r.createAggregateExpression(e.aggregator,u(e.expression),e.distinct,e.separator);case i.expressionTypes.EXISTENCE:return r.createExistenceExpression(e.not,u(e.input));case i.expressionTypes.NAMED:return r.createNamedExpression(e.name,e.args.map(u));case i.expressionTypes.OPERATOR:return r.createOperatorExpression(e.operator,e.args.map(u));case i.expressionTypes.TERM:return r.createTermExpression(e.term);case i.expressionTypes.WILDCARD:return r.createWildcardExpression();default:throw new Error(`Unknown Expression type ${e.expressionType}`)}}static cloneOperation(e){return s.mapOperation(e,{})}static cloneExpression(e){return s.mapExpression(e,{})}static createUniqueVariable(e,t,r){let n=0,i=e;for(;t[i];)i=`${e}${n++}`;return r.variable(i)}static isSimpleTerm(e){return void 0!==e.termType&&"Quad"!==e.termType&&"Wildcard"!==e.termType}static isQuad(e){return"Quad"===e.termType}static hasQuadVariables(e){return(0,o.someTermsNested)(e,(e=>"Variable"===e.termType))}static isWildcard(e){return"Wildcard"===e.termType}}t.default=s},44897:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.printError=w,t.GraphQLError=void 0;var i,a=(i=r(78582))&&i.__esModule?i:{default:i},o=r(28189),s=r(4251),c=r(90354);function u(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 l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){for(var r=0;r0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=o&&o.stack?(Object.defineProperty(h(b),"stack",{value:o.stack,writable:!0,configurable:!0}),p(b)):(Error.captureStackTrace?Error.captureStackTrace(h(b),f):Object.defineProperty(h(b),"stack",{value:Error().stack,writable:!0,configurable:!0}),b)}return n=f,(i=[{key:"toString",value:function(){return w(this)}},{key:o.SYMBOL_TO_STRING_TAG,get:function(){return"Object"}}])&&d(n.prototype,i),f}(f(Error));function _(e){return void 0===e||0===e.length?void 0:e}function w(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.syntaxError=function(e,t,r){return new n.GraphQLError("Syntax Error: ".concat(r),void 0,e,[t])};var n=r(44897)},44077:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prototype.toJSON;"function"==typeof t||(0,n.default)(0),e.prototype.inspect=t,i.default&&(e.prototype[i.default]=t)};var n=a(r(81880)),i=a(r(37020));function a(e){return e&&e.__esModule?e:{default:e}}},65269:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(t)}},23216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return c(e,[])};var n,i=(n=r(37020))&&n.__esModule?n:{default:n};function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var o=10,s=2;function c(e,t){switch(a(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(i.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==n){var a=n.call(e);if(a!==e)return"string"==typeof a?a:c(a,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>s)return"[Array]";for(var r=Math.min(o,e.length),n=e.length-r,i=[],a=0;a1&&i.push("... ".concat(n," more items")),"["+i.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);return 0===r.length?"{}":t.length>s?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]":"{ "+r.map((function(r){return r+": "+c(e[r],t)})).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}},83588:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,(n=r(23216))&&n.__esModule;t.default=function(e,t){return e instanceof t}},81880:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}},78582:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"object"==r(e)&&null!==e}},37020:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=r},93378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(e){return null!=e&&"string"==typeof e.kind},t.Token=t.Location=void 0;var n,i=(n=r(44077))&&n.__esModule?n:{default:n},a=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();t.Location=a,(0,i.default)(a);var o=function(){function e(e,t,r,n,i,a,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=a,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();t.Token=o,(0,i.default)(o)},4758:(e,t)=>{"use strict";function r(e){for(var t=0;to&&r(t[s-1]);)--s;return t.slice(o,s).join("\n")},t.getBlockStringIndentation=n,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],a='"'===e[e.length-1],o="\\"===e[e.length-1],s=!n||a||o||r,c="";return!s||n&&i||(c+="\n"+t),c+=t?e.replace(/\n/g,"\n"+t):e,s&&(c+="\n"),'"""'+c.replace(/"""/g,'\\"""')+'"""'}},23684:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveLocation=void 0;var r=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});t.DirectiveLocation=r},44330:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Source",{enumerable:!0,get:function(){return n.Source}}),Object.defineProperty(t,"getLocation",{enumerable:!0,get:function(){return i.getLocation}}),Object.defineProperty(t,"printLocation",{enumerable:!0,get:function(){return a.printLocation}}),Object.defineProperty(t,"printSourceLocation",{enumerable:!0,get:function(){return a.printSourceLocation}}),Object.defineProperty(t,"Kind",{enumerable:!0,get:function(){return o.Kind}}),Object.defineProperty(t,"TokenKind",{enumerable:!0,get:function(){return s.TokenKind}}),Object.defineProperty(t,"Lexer",{enumerable:!0,get:function(){return c.Lexer}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return u.parse}}),Object.defineProperty(t,"parseValue",{enumerable:!0,get:function(){return u.parseValue}}),Object.defineProperty(t,"parseType",{enumerable:!0,get:function(){return u.parseType}}),Object.defineProperty(t,"print",{enumerable:!0,get:function(){return l.print}}),Object.defineProperty(t,"visit",{enumerable:!0,get:function(){return d.visit}}),Object.defineProperty(t,"visitInParallel",{enumerable:!0,get:function(){return d.visitInParallel}}),Object.defineProperty(t,"getVisitFn",{enumerable:!0,get:function(){return d.getVisitFn}}),Object.defineProperty(t,"BREAK",{enumerable:!0,get:function(){return d.BREAK}}),Object.defineProperty(t,"Location",{enumerable:!0,get:function(){return p.Location}}),Object.defineProperty(t,"Token",{enumerable:!0,get:function(){return p.Token}}),Object.defineProperty(t,"isDefinitionNode",{enumerable:!0,get:function(){return h.isDefinitionNode}}),Object.defineProperty(t,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return h.isExecutableDefinitionNode}}),Object.defineProperty(t,"isSelectionNode",{enumerable:!0,get:function(){return h.isSelectionNode}}),Object.defineProperty(t,"isValueNode",{enumerable:!0,get:function(){return h.isValueNode}}),Object.defineProperty(t,"isTypeNode",{enumerable:!0,get:function(){return h.isTypeNode}}),Object.defineProperty(t,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return h.isTypeSystemDefinitionNode}}),Object.defineProperty(t,"isTypeDefinitionNode",{enumerable:!0,get:function(){return h.isTypeDefinitionNode}}),Object.defineProperty(t,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return h.isTypeSystemExtensionNode}}),Object.defineProperty(t,"isTypeExtensionNode",{enumerable:!0,get:function(){return h.isTypeExtensionNode}}),Object.defineProperty(t,"DirectiveLocation",{enumerable:!0,get:function(){return f.DirectiveLocation}});var n=r(76241),i=r(4251),a=r(90354),o=r(12057),s=r(58053),c=r(4524),u=r(42275),l=r(43230),d=r(48048),p=r(93378),h=r(49674),f=r(23684)},12057:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Kind=void 0;var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});t.Kind=r},4524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPunctuatorTokenKind=function(e){return e===a.TokenKind.BANG||e===a.TokenKind.DOLLAR||e===a.TokenKind.AMP||e===a.TokenKind.PAREN_L||e===a.TokenKind.PAREN_R||e===a.TokenKind.SPREAD||e===a.TokenKind.COLON||e===a.TokenKind.EQUALS||e===a.TokenKind.AT||e===a.TokenKind.BRACKET_L||e===a.TokenKind.BRACKET_R||e===a.TokenKind.BRACE_L||e===a.TokenKind.PIPE||e===a.TokenKind.BRACE_R},t.Lexer=void 0;var n=r(40629),i=r(93378),a=r(58053),o=r(4758),s=function(){function e(e){var t=new i.Token(a.TokenKind.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==a.TokenKind.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=u(this,e)}while(e.kind===a.TokenKind.COMMENT);return e},e}();function c(e){return isNaN(e)?a.TokenKind.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function u(e,t){for(var r=e.source,o=r.body,s=o.length,c=t.end;c31||9===s));return new i.Token(a.TokenKind.COMMENT,t,u,r,n,o,c.slice(t+1,u))}function p(e,t,r,o,s,u){var l=e.body,d=r,p=t,f=!1;if(45===d&&(d=l.charCodeAt(++p)),48===d){if((d=l.charCodeAt(++p))>=48&&d<=57)throw(0,n.syntaxError)(e,p,"Invalid number, unexpected digit after 0: ".concat(c(d),"."))}else p=h(e,p,d),d=l.charCodeAt(p);if(46===d&&(f=!0,d=l.charCodeAt(++p),p=h(e,p,d),d=l.charCodeAt(p)),69!==d&&101!==d||(f=!0,43!==(d=l.charCodeAt(++p))&&45!==d||(d=l.charCodeAt(++p)),p=h(e,p,d),d=l.charCodeAt(p)),46===d||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(d))throw(0,n.syntaxError)(e,p,"Invalid number, expected digit but got: ".concat(c(d),"."));return new i.Token(f?a.TokenKind.FLOAT:a.TokenKind.INT,t,p,o,s,u,l.slice(t,p))}function h(e,t,r){var i=e.body,a=t,o=r;if(o>=48&&o<=57){do{o=i.charCodeAt(++a)}while(o>=48&&o<=57);return a}throw(0,n.syntaxError)(e,a,"Invalid number, expected digit but got: ".concat(c(o),"."))}function f(e,t,r,o,s){for(var u,l,d,p,h=e.body,f=t+1,y=f,m=0,b="";f=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function m(e,t,r,n,o){for(var s=e.body,c=s.length,u=t+1,l=0;u!==c&&!isNaN(l=s.charCodeAt(u))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++u;return new i.Token(a.TokenKind.NAME,t,u,r,n,o,s.slice(t,u))}t.Lexer=s},4251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLocation=function(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,a=t+1;(r=n.exec(e.body))&&r.index{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e,t){return new l(e,t).parseDocument()},t.parseValue=function(e,t){var r=new l(e,t);r.expectToken(o.TokenKind.SOF);var n=r.parseValueLiteral(!1);return r.expectToken(o.TokenKind.EOF),n},t.parseType=function(e,t){var r=new l(e,t);r.expectToken(o.TokenKind.SOF);var n=r.parseTypeReference();return r.expectToken(o.TokenKind.EOF),n},t.Parser=void 0;var n=r(40629),i=r(12057),a=r(93378),o=r(58053),s=r(76241),c=r(23684),u=r(4524),l=function(){function e(e,t){var r=(0,s.isSource)(e)?e:new s.Source(e);this._lexer=new u.Lexer(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(o.TokenKind.NAME);return{kind:i.Kind.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:i.Kind.DOCUMENT,definitions:this.many(o.TokenKind.SOF,this.parseDefinition,o.TokenKind.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(o.TokenKind.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(o.TokenKind.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(o.TokenKind.BRACE_L))return{kind:i.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(o.TokenKind.NAME)&&(t=this.parseName()),{kind:i.Kind.OPERATION_DEFINITION,operation:r,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(o.TokenKind.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(o.TokenKind.PAREN_L,this.parseVariableDefinition,o.TokenKind.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:i.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(o.TokenKind.DOLLAR),{kind:i.Kind.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:i.Kind.SELECTION_SET,selections:this.many(o.TokenKind.BRACE_L,this.parseSelection,o.TokenKind.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(o.TokenKind.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(o.TokenKind.COLON)?(e=n,t=this.parseName()):t=n,{kind:i.Kind.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.TokenKind.PAREN_L,t,o.TokenKind.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(o.TokenKind.COLON),{kind:i.Kind.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:i.Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(o.TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(o.TokenKind.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(o.TokenKind.NAME)?{kind:i.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:i.Kind.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:i.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:i.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case o.TokenKind.BRACKET_L:return this.parseList(e);case o.TokenKind.BRACE_L:return this.parseObject(e);case o.TokenKind.INT:return this._lexer.advance(),{kind:i.Kind.INT,value:t.value,loc:this.loc(t)};case o.TokenKind.FLOAT:return this._lexer.advance(),{kind:i.Kind.FLOAT,value:t.value,loc:this.loc(t)};case o.TokenKind.STRING:case o.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case o.TokenKind.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:i.Kind.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:i.Kind.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:i.Kind.NULL,loc:this.loc(t)};default:return{kind:i.Kind.ENUM,value:t.value,loc:this.loc(t)}}case o.TokenKind.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:i.Kind.STRING,value:e.value,block:e.kind===o.TokenKind.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:i.Kind.LIST,values:this.any(o.TokenKind.BRACKET_L,(function(){return t.parseValueLiteral(e)}),o.TokenKind.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:i.Kind.OBJECT,fields:this.any(o.TokenKind.BRACE_L,(function(){return t.parseObjectField(e)}),o.TokenKind.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(o.TokenKind.COLON),{kind:i.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(o.TokenKind.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(o.TokenKind.AT),{kind:i.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(o.TokenKind.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(o.TokenKind.BRACKET_R),e={kind:i.Kind.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(o.TokenKind.BANG)?{kind:i.Kind.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:i.Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===o.TokenKind.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(o.TokenKind.STRING)||this.peek(o.TokenKind.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var r=this.parseDirectives(!0),n=this.many(o.TokenKind.BRACE_L,this.parseOperationTypeDefinition,o.TokenKind.BRACE_R);return{kind:i.Kind.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(o.TokenKind.COLON);var r=this.parseNamedType();return{kind:i.Kind.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var r=this.parseName(),n=this.parseDirectives(!0);return{kind:i.Kind.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),a=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:i.Kind.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:a,fields:o,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(o.TokenKind.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(o.TokenKind.AMP)||this.peek(o.TokenKind.NAME));return t}return this.delimitedMany(o.TokenKind.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(o.TokenKind.BRACE_L)&&this._lexer.lookahead().kind===o.TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(o.TokenKind.BRACE_L,this.parseFieldDefinition,o.TokenKind.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(o.TokenKind.COLON);var a=this.parseTypeReference(),s=this.parseDirectives(!0);return{kind:i.Kind.FIELD_DEFINITION,description:t,name:r,arguments:n,type:a,directives:s,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(o.TokenKind.PAREN_L,this.parseInputValueDef,o.TokenKind.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(o.TokenKind.COLON);var n,a=this.parseTypeReference();this.expectOptionalToken(o.TokenKind.EQUALS)&&(n=this.parseValueLiteral(!0));var s=this.parseDirectives(!0);return{kind:i.Kind.INPUT_VALUE_DEFINITION,description:t,name:r,type:a,defaultValue:n,directives:s,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),a=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:i.Kind.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:a,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),a=this.parseUnionMemberTypes();return{kind:i.Kind.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:a,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(o.TokenKind.EQUALS)?this.delimitedMany(o.TokenKind.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),a=this.parseEnumValuesDefinition();return{kind:i.Kind.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:a,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(o.TokenKind.BRACE_L,this.parseEnumValueDefinition,o.TokenKind.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:i.Kind.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),a=this.parseInputFieldsDefinition();return{kind:i.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:a,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(o.TokenKind.BRACE_L,this.parseInputValueDef,o.TokenKind.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===o.TokenKind.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.optionalMany(o.TokenKind.BRACE_L,this.parseOperationTypeDefinition,o.TokenKind.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:i.Kind.SCHEMA_EXTENSION,directives:t,operationTypes:r,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);if(0===r.length)throw this.unexpected();return{kind:i.Kind.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),a=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===a.length)throw this.unexpected();return{kind:i.Kind.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:a,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),a=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===a.length)throw this.unexpected();return{kind:i.Kind.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:a,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:i.Kind.UNION_TYPE_EXTENSION,name:t,directives:r,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:i.Kind.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:i.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.TokenKind.AT);var r=this.parseName(),n=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var s=this.parseDirectiveLocations();return{kind:i.Kind.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:a,locations:s,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(o.TokenKind.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==c.DirectiveLocation[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new a.Location(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw(0,n.syntaxError)(this._lexer.source,t.start,"Expected ".concat(p(e),", found ").concat(d(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==o.TokenKind.NAME||t.value!==e)throw(0,n.syntaxError)(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(d(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===o.TokenKind.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return(0,n.syntaxError)(this._lexer.source,t.start,"Unexpected ".concat(d(t),"."))},t.any=function(e,t,r){this.expectToken(e);for(var n=[];!this.expectOptionalToken(r);)n.push(t.call(this));return n},t.optionalMany=function(e,t,r){if(this.expectOptionalToken(e)){var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}return[]},t.many=function(e,t,r){this.expectToken(e);var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r},e}();function d(e){var t=e.value;return p(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function p(e){return(0,u.isPunctuatorTokenKind)(e)?'"'.concat(e,'"'):e}t.Parser=l},49674:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDefinitionNode=function(e){return i(e)||a(e)||s(e)},t.isExecutableDefinitionNode=i,t.isSelectionNode=function(e){return e.kind===n.Kind.FIELD||e.kind===n.Kind.FRAGMENT_SPREAD||e.kind===n.Kind.INLINE_FRAGMENT},t.isValueNode=function(e){return e.kind===n.Kind.VARIABLE||e.kind===n.Kind.INT||e.kind===n.Kind.FLOAT||e.kind===n.Kind.STRING||e.kind===n.Kind.BOOLEAN||e.kind===n.Kind.NULL||e.kind===n.Kind.ENUM||e.kind===n.Kind.LIST||e.kind===n.Kind.OBJECT},t.isTypeNode=function(e){return e.kind===n.Kind.NAMED_TYPE||e.kind===n.Kind.LIST_TYPE||e.kind===n.Kind.NON_NULL_TYPE},t.isTypeSystemDefinitionNode=a,t.isTypeDefinitionNode=o,t.isTypeSystemExtensionNode=s,t.isTypeExtensionNode=c;var n=r(12057);function i(e){return e.kind===n.Kind.OPERATION_DEFINITION||e.kind===n.Kind.FRAGMENT_DEFINITION}function a(e){return e.kind===n.Kind.SCHEMA_DEFINITION||o(e)||e.kind===n.Kind.DIRECTIVE_DEFINITION}function o(e){return e.kind===n.Kind.SCALAR_TYPE_DEFINITION||e.kind===n.Kind.OBJECT_TYPE_DEFINITION||e.kind===n.Kind.INTERFACE_TYPE_DEFINITION||e.kind===n.Kind.UNION_TYPE_DEFINITION||e.kind===n.Kind.ENUM_TYPE_DEFINITION||e.kind===n.Kind.INPUT_OBJECT_TYPE_DEFINITION}function s(e){return e.kind===n.Kind.SCHEMA_EXTENSION||c(e)}function c(e){return e.kind===n.Kind.SCALAR_TYPE_EXTENSION||e.kind===n.Kind.OBJECT_TYPE_EXTENSION||e.kind===n.Kind.INTERFACE_TYPE_EXTENSION||e.kind===n.Kind.UNION_TYPE_EXTENSION||e.kind===n.Kind.ENUM_TYPE_EXTENSION||e.kind===n.Kind.INPUT_OBJECT_TYPE_EXTENSION}},90354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printLocation=function(e){return i(e.source,(0,n.getLocation)(e.source,e.start))},t.printSourceLocation=i;var n=r(4251);function i(e,t){var r=e.locationOffset.column-1,n=o(r)+e.body,i=t.line-1,s=e.locationOffset.line-1,c=t.line+s,u=1===t.line?r:0,l=t.column+u,d="".concat(e.name,":").concat(c,":").concat(l,"\n"),p=n.split(/\r\n|[\n\r]/g),h=p[i];if(h.length>120){for(var f=Math.floor(l/80),y=l%80,g=[],m=0;m{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.print=function(e){return(0,n.visit)(e,{leave:a})};var n=r(48048),i=r(4758),a={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return s(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,r=e.name,n=u("(",s(e.variableDefinitions,", "),")"),i=s(e.directives," "),a=e.selectionSet;return r||i||n||"query"!==t?s([t,s([r,n]),i,a]," "):a},VariableDefinition:function(e){var t=e.variable,r=e.type,n=e.defaultValue,i=e.directives;return t+": "+r+u(" = ",n)+u(" ",s(i," "))},SelectionSet:function(e){return c(e.selections)},Field:function(e){var t=e.alias,r=e.name,n=e.arguments,i=e.directives,a=e.selectionSet,o=u("",t,": ")+r,c=o+u("(",s(n,", "),")");return c.length>80&&(c=o+u("(\n",l(s(n,"\n")),"\n)")),s([c,s(i," "),a]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+u(" ",s(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,r=e.directives,n=e.selectionSet;return s(["...",u("on ",t),s(r," "),n]," ")},FragmentDefinition:function(e){var t=e.name,r=e.typeCondition,n=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(u("(",s(n,", "),")")," ")+"on ".concat(r," ").concat(u("",s(i," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var r=e.value;return e.block?(0,i.printBlockString)(r,"description"===t?"":" "):JSON.stringify(r)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+s(e.values,", ")+"]"},ObjectValue:function(e){return"{"+s(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+u("(",s(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:o((function(e){var t=e.directives,r=e.operationTypes;return s(["schema",s(t," "),c(r)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:o((function(e){return s(["scalar",e.name,s(e.directives," ")]," ")})),ObjectTypeDefinition:o((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["type",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")})),FieldDefinition:o((function(e){var t=e.name,r=e.arguments,n=e.type,i=e.directives;return t+(p(r)?u("(\n",l(s(r,"\n")),"\n)"):u("(",s(r,", "),")"))+": "+n+u(" ",s(i," "))})),InputValueDefinition:o((function(e){var t=e.name,r=e.type,n=e.defaultValue,i=e.directives;return s([t+": "+r,u("= ",n),s(i," ")]," ")})),InterfaceTypeDefinition:o((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["interface",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")})),UnionTypeDefinition:o((function(e){var t=e.name,r=e.directives,n=e.types;return s(["union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")})),EnumTypeDefinition:o((function(e){var t=e.name,r=e.directives,n=e.values;return s(["enum",t,s(r," "),c(n)]," ")})),EnumValueDefinition:o((function(e){return s([e.name,s(e.directives," ")]," ")})),InputObjectTypeDefinition:o((function(e){var t=e.name,r=e.directives,n=e.fields;return s(["input",t,s(r," "),c(n)]," ")})),DirectiveDefinition:o((function(e){var t=e.name,r=e.arguments,n=e.repeatable,i=e.locations;return"directive @"+t+(p(r)?u("(\n",l(s(r,"\n")),"\n)"):u("(",s(r,", "),")"))+(n?" repeatable":"")+" on "+s(i," | ")})),SchemaExtension:function(e){var t=e.directives,r=e.operationTypes;return s(["extend schema",s(t," "),c(r)]," ")},ScalarTypeExtension:function(e){return s(["extend scalar",e.name,s(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend type",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend interface",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")},UnionTypeExtension:function(e){var t=e.name,r=e.directives,n=e.types;return s(["extend union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,r=e.directives,n=e.values;return s(["extend enum",t,s(r," "),c(n)]," ")},InputObjectTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return s(["extend input",t,s(r," "),c(n)]," ")}};function o(e){return function(t){return s([t.description,e(t)],"\n")}}function s(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(r))&&void 0!==t?t:""}function c(e){return u("{\n",l(s(e,"\n")),"\n}")}function u(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function l(e){return u(" ",e.replace(/\n/g,"\n "))}function d(e){return-1!==e.indexOf("\n")}function p(e){return null!=e&&e.some(d)}},76241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSource=function(e){return(0,o.default)(e,u)},t.Source=void 0;var n=r(28189),i=s(r(23216)),a=s(r(65269)),o=s(r(83588));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||(0,a.default)(0,"Body must be a string. Received: ".concat((0,i.default)(e),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||(0,a.default)(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,a.default)(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r;return t=e,(r=[{key:n.SYMBOL_TO_STRING_TAG,get:function(){return"Source"}}])&&c(t.prototype,r),e}();t.Source=u},58053:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenKind=void 0;var r=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});t.TokenKind=r},48048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,n=void 0,u=Array.isArray(e),l=[e],d=-1,p=[],h=void 0,f=void 0,y=void 0,g=[],m=[],b=e;do{var v=++d===l.length,_=v&&0!==p.length;if(v){if(f=0===m.length?void 0:g[g.length-1],h=y,y=m.pop(),_){if(u)h=h.slice();else{for(var w={},T=0,S=Object.keys(h);T{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SYMBOL_TO_STRING_TAG=t.SYMBOL_ASYNC_ITERATOR=t.SYMBOL_ITERATOR=void 0;var r="function"==typeof Symbol&&null!=Symbol.iterator?Symbol.iterator:"@@iterator";t.SYMBOL_ITERATOR=r;var n="function"==typeof Symbol&&null!=Symbol.asyncIterator?Symbol.asyncIterator:"@@asyncIterator";t.SYMBOL_ASYNC_ITERATOR=n;var i="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";t.SYMBOL_TO_STRING_TAG=i},99499:(e,t,r)=>{var n=t;n.utils=r(70461),n.common=r(32191),n.sha=r(75746),n.ripemd=r(74169),n.hmac=r(11825),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},32191:(e,t,r)=>{"use strict";var n=r(70461),i=r(7784);function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=a,a.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a{"use strict";var n=r(70461),i=r(7784);function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(70461),i=r(32191),a=n.rotl32,o=n.sum32,s=n.sum32_3,c=n.sum32_4,u=i.BlockHash;function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function p(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,u),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],u=this.h[3],l=this.h[4],b=r,v=n,_=i,w=u,T=l,S=0;S<80;S++){var O=o(a(c(r,d(S,n,i,u),e[f[S]+t],p(S)),g[S]),l);r=l,l=u,u=a(i,10),i=n,n=O,O=o(a(c(b,d(79-S,v,_,w),e[y[S]+t],h(S)),m[S]),T),b=T,T=w,w=a(_,10),_=v,v=O}O=s(this.h[1],i,w),this.h[1]=s(this.h[2],u,T),this.h[2]=s(this.h[3],l,b),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,_),this.h[0]=O},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],y=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},75746:(e,t,r)=>{"use strict";t.sha1=r(12986),t.sha224=r(75393),t.sha256=r(50536),t.sha384=r(52348),t.sha512=r(92157)},12986:(e,t,r)=>{"use strict";var n=r(70461),i=r(32191),a=r(600),o=n.rotl32,s=n.sum32,c=n.sum32_5,u=a.ft_1,l=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function p(){if(!(this instanceof p))return new p;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(p,l),e.exports=p,p.blockSize=512,p.outSize=160,p.hmacStrength=80,p.padLength=64,p.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(70461),i=r(50536);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},50536:(e,t,r)=>{"use strict";var n=r(70461),i=r(32191),a=r(600),o=r(7784),s=n.sum32,c=n.sum32_4,u=n.sum32_5,l=a.ch32,d=a.maj32,p=a.s0_256,h=a.s1_256,f=a.g0_256,y=a.g1_256,g=i.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(b,g),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(70461),i=r(92157);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},92157:(e,t,r)=>{"use strict";var n=r(70461),i=r(32191),a=r(7784),o=n.rotr64_hi,s=n.rotr64_lo,c=n.shr64_hi,u=n.shr64_lo,l=n.sum64,d=n.sum64_hi,p=n.sum64_lo,h=n.sum64_4_hi,f=n.sum64_4_lo,y=n.sum64_5_hi,g=n.sum64_5_lo,m=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function _(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function w(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function T(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function S(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function O(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function E(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function A(e,t){var r=o(e,t,1)^o(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function R(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,m),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(70461).rotr32;function i(e,t,r){return e&t^~e&r}function a(e,t,r){return e&t^e&r^t&r}function o(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?o(t,r,n):2===e?a(t,r,n):void 0},t.ch32=i,t.maj32=a,t.p32=o,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},70461:(e,t,r)=>{"use strict";var n=r(7784),i=r(35615);function a(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&o|128):a(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i>>0}return o},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,a,o,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,a,o,s,c,u){var l=0,d=t;return l+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,a,o,s,c,u){return t+n+a+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},14291:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var o=a(r(36439)),s=r(3379),c=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),l=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),p=new Set(["rt","rp"]),h=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",c],["input",c],["output",c],["button",c],["datalist",c],["textarea",c],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",p],["rp",p],["tbody",l],["tfoot",l]]),f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),y=new Set(["math","svg"]),g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),m=/\s|\//,b=function(){function e(e,t){var r,n,i,a,s;void 0===t&&(t={}),this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:!t.xmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:!t.xmlMode,this.tokenizer=new(null!==(i=t.Tokenizer)&&void 0!==i?i:o.default)(this.options,this),null===(s=(a=this.cbs).onparserinit)||void 0===s||s.call(a,this)}return e.prototype.ontext=function(e,t){var r,n,i=this.getSlice(e,t);this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,i),this.startIndex=t},e.prototype.ontextentity=function(e){var t,r,n=this.tokenizer.getSectionStart();this.endIndex=n-1,null===(r=(t=this.cbs).ontext)||void 0===r||r.call(t,(0,s.fromCodePoint)(e)),this.startIndex=n},e.prototype.isVoidElement=function(e){return!this.options.xmlMode&&f.has(e)},e.prototype.onopentagname=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)},e.prototype.emitOpenTag=function(e){var t,r,n,i;this.openTagStart=this.startIndex,this.tagname=e;var a=!this.options.xmlMode&&h.get(e);if(a)for(;this.stack.length>0&&a.has(this.stack[this.stack.length-1]);){var o=this.stack.pop();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,o,!0)}this.isVoidElement(e)||(this.stack.push(e),y.has(e)?this.foreignContext.push(!0):g.has(e)&&this.foreignContext.push(!1)),null===(i=(n=this.cbs).onopentagname)||void 0===i||i.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var r,n,i,a,o,s;this.endIndex=t;var c=this.getSlice(e,t);if(this.lowerCaseTagNames&&(c=c.toLowerCase()),(y.has(c)||g.has(c))&&this.foreignContext.pop(),this.isVoidElement(c))this.options.xmlMode||"br"!==c||(null===(n=(r=this.cbs).onopentagname)||void 0===n||n.call(r,"br"),null===(a=(i=this.cbs).onopentag)||void 0===a||a.call(i,"br",{},!0),null===(s=(o=this.cbs).onclosetag)||void 0===s||s.call(o,"br",!1));else{var u=this.stack.lastIndexOf(c);if(-1!==u)if(this.cbs.onclosetag)for(var l=this.stack.length-u;l--;)this.cbs.onclosetag(this.stack.pop(),0!==l);else this.stack.length=u;else this.options.xmlMode||"p"!==c||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.pop())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,s.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===o.QuoteType.Double?'"':e===o.QuoteType.Single?"'":e===o.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(m),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,i,a,o;this.endIndex=t,null===(i=(n=this.cbs).oncomment)||void 0===i||i.call(n,this.getSlice(e,t-r)),null===(o=(a=this.cbs).oncommentend)||void 0===o||o.call(a),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){var n,i,a,o,s,c,u,l,d,p;this.endIndex=t;var h=this.getSlice(e,t-r);this.options.xmlMode||this.options.recognizeCDATA?(null===(i=(n=this.cbs).oncdatastart)||void 0===i||i.call(n),null===(o=(a=this.cbs).ontext)||void 0===o||o.call(a,h),null===(c=(s=this.cbs).oncdataend)||void 0===c||c.call(s)):(null===(l=(u=this.cbs).oncomment)||void 0===l||l.call(u,"[CDATA[".concat(h,"]]")),null===(p=(d=this.cbs).oncommentend)||void 0===p||p.call(d)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,r,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(n=(r=this.cbs).onparserinit)||void 0===n||n.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.getSlice=function(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var n,i,a,o=r(3379);function s(e){return e===n.Space||e===n.NewLine||e===n.Tab||e===n.FormFeed||e===n.CarriageReturn}function c(e){return e===n.Slash||e===n.Gt||s(e)}function u(e){return e>=n.Zero&&e<=n.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(n||(n={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(i||(i={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(a=t.QuoteType||(t.QuoteType={}));var l={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},d=function(){function e(e,t){var r=e.xmlMode,n=void 0!==r&&r,a=e.decodeEntities,s=void 0===a||a;this.cbs=t,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=n,this.decodeEntities=s,this.entityTrie=n?o.xmlDecodeTree:o.htmlDecodeTree}return e.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===n.Amp&&(this.state=i.BeforeEntity)},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?c(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===n.Gt||s(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart=n.LowerA&&e<=n.LowerZ||e>=n.UpperA&&e<=n.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=i.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===n.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===n.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode||t!==l.TitleEnd[2]?this.state=this.xmlMode||t!==l.ScriptEnd[2]?i.InTagName:i.BeforeSpecialS:this.startSpecial(l.TitleEnd,3)}else e===n.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){c(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){s(e)||(e===n.Gt?this.state=i.Text:(this.state=this.isTagStartChar(e)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===n.Gt||s(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===n.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===n.Slash?this.state=i.InSelfClosingTag:s(e)||(this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===n.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):s(e)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===n.Eq||c(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===n.Eq?this.state=i.BeforeAttributeValue:e===n.Slash||e===n.Gt?(this.cbs.onattribend(a.NoValue,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):s(e)||(this.cbs.onattribend(a.NoValue,this.index),this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===n.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):e===n.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):s(e)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===n.DoubleQuote?a.Double:a.Single,this.index),this.state=i.BeforeAttributeName):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,n.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,n.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){s(e)||e===n.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateBeforeDeclaration=function(e){e===n.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=e===n.Dash?i.BeforeComment:i.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===n.Dash?(this.state=i.InCommentLike,this.currentSequence=l.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===l.ScriptEnd[3]?this.startSpecial(l.ScriptEnd,4):t===l.StyleEnd[3]?this.startSpecial(l.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeEntity=function(e){this.entityExcess=1,this.entityResult=0,e===n.Number?this.state=i.BeforeNumericEntity:e===n.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=i.InNamedEntity,this.stateInNamedEntity(e))},e.prototype.stateInNamedEntity=function(e){if(this.entityExcess+=1,this.trieIndex=(0,o.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];var t=this.trieCurrent&o.BinTrieFlags.VALUE_LENGTH;if(t){var r=(t>>14)-1;if(this.allowLegacyEntity()||e===n.Semi){var i=this.index-this.entityExcess+1;i>this.sectionStart&&this.emitPartial(this.sectionStart,i),this.entityResult=this.trieIndex,this.trieIndex+=r,this.entityExcess=0,this.sectionStart=this.index+1,0===r&&this.emitNamedEntity()}else this.trieIndex+=r}},e.prototype.emitNamedEntity=function(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&o.BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~o.BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}},e.prototype.stateBeforeNumericEntity=function(e){(32|e)===n.LowerX?(this.entityExcess++,this.state=i.InHexEntity):(this.state=i.InNumericEntity,this.stateInNumericEntity(e))},e.prototype.emitNumericEntity=function(e){var t=this.index-this.entityExcess-1;t+2+Number(this.state===i.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint((0,o.replaceCodePoint)(this.entityResult))),this.state=this.baseState},e.prototype.stateInNumericEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):u(e)?(this.entityResult=10*this.entityResult+(e-n.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.stateInHexEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):u(e)?(this.entityResult=16*this.entityResult+(e-n.Zero),this.entityExcess++):function(e){return e>=n.UpperA&&e<=n.UpperF||e>=n.LowerA&&e<=n.LowerF}(e)?(this.entityResult=16*this.entityResult+((32|e)-n.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===i.Text||this.baseState===i.InSpecialTag)},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==i.InAttributeValueDq&&this.state!==i.InAttributeValueSq&&this.state!==i.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index{"use strict";var t=/^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i,r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,n=/\s|\uFEFF|\xA0/,i=/\r?\n[\x20\x09]+/g,a=/[;,"]/,o=/[;,"]|\s/,s=/^[!#$%&'*+\-\.^_`|~\da-zA-Z]+$/;function c(e){return e.replace(r,"")}function u(e){return n.test(e)}function l(e,t){for(;u(e[t]);)t++;return t}function d(e){return o.test(e)||!s.test(e)}class p{constructor(e){this.refs=[],e&&this.parse(e)}rel(e){for(var t=[],r=e.toLowerCase(),n=0;n{return r=t,n=e,Object.keys(r).length===Object.keys(n).length&&Object.keys(r).every((e=>e in n&&r[e]===n[e]));var r,n}))||this.refs.push(e),this}has(e,t){e=e.toLowerCase(),t=t.toLowerCase();for(var r=0;r",t)))throw new Error("Expected end of URI delimiter at offset "+t);o={uri:e.slice(t+1,h)},t=h,r=2,t++}else if(2===r){if(u(e[t])){t++;continue}if(";"===e[t])r=4,t++;else{if(","!==e[t])throw new Error('Unexpected character "'+e[t]+'" at offset '+t);r=1,t++}}else{if(4!==r)throw new Error('Unknown parser state "'+r+'"');if(";"===e[t]||u(e[t])){t++;continue}-1===(h=e.indexOf("=",t))&&(h=e.indexOf(";",t)),-1===h&&(h=e.length);var s=c(e.slice(t,h)).toLowerCase(),d="";if('"'===e[t=l(e,t=h+1)])for(t++;t"),e.push(t);return e.join(", ")}}p.isCompatibleEncoding=function(e){return t.test(e)},p.parse=function(e,t){return(new p).parse(e,t)},p.isSingleOccurenceAttr=function(e){return"rel"===e||"type"===e||"media"===e||"title"===e||"title*"===e},p.isTokenAttr=function(e){return"rel"===e||"type"===e||"anchor"===e},p.escapeQuotes=function(e){return e.replace(/"/g,'\\"')},p.expandRelations=function(e){return e.rel.split(" ").map((function(t){var r=Object.assign({},e);return r.rel=t,r}))},p.parseExtendedValue=function(e){var t=/([^']+)?(?:'([^']*)')?(.+)/.exec(e);return{language:t[2].toLowerCase(),encoding:p.isCompatibleEncoding(t[1])?null:t[1].toLowerCase(),value:p.isCompatibleEncoding(t[1])?decodeURIComponent(t[3]):t[3]}},p.formatExtendedAttribute=function(e,t){var r=(t.encoding||"utf-8").toUpperCase();return e+"="+r+"'"+(t.language||"en")+"'"+(Buffer.isBuffer(t.value)&&p.isCompatibleEncoding(r)?t.value.toString(r):Buffer.isBuffer(t.value)?t.value.toString("hex").replace(/[0-9a-f]{2}/gi,"%$1"):encodeURIComponent(t.value))},p.formatAttribute=function(e,t){return Array.isArray(t)?t.map((t=>p.formatAttribute(e,t))).join("; "):"*"===e[e.length-1]||"string"!=typeof t?p.formatExtendedAttribute(e,t):(p.isTokenAttr(e)?t=d(t)?'"'+p.escapeQuotes(t)+'"':p.escapeQuotes(t):d(t)&&(t='"'+(t=(t=encodeURIComponent(t)).replace(/%20/g," ").replace(/%2C/g,",").replace(/%3B/g,";"))+'"'),e+"="+t)},e.exports=p},39318:(e,t)=>{t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<>1,l=-7,d=r?i-1:0,p=r?-1:1,h=e[t+d];for(d+=p,a=h&(1<<-l)-1,h>>=-l,l+=s;l>0;a=256*a+e[t+d],d+=p,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+d],d+=p,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),a-=u}return(h?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,l=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,f=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+d>=1?p/c:p*Math.pow(2,1-d))*c>=2&&(o++,c/=2),o+d>=l?(s=0,o=l):o+d>=1?(s=(t*c-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+h]=255&s,h+=f,s/=256,i-=8);for(o=o<0;e[r+h]=255&o,h+=f,o/=256,u-=8);e[r+h-f]|=128*y}},6081:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Collection:()=>E,Iterable:()=>Rn,List:()=>cr,Map:()=>Ft,OrderedMap:()=>Tr,OrderedSet:()=>ln,PairSorting:()=>yn,Range:()=>Gr,Record:()=>gn,Repeat:()=>Sn,Seq:()=>W,Set:()=>Br,Stack:()=>Rr,default:()=>In,fromJS:()=>On,get:()=>ct,getIn:()=>zr,has:()=>st,hasIn:()=>Xr,hash:()=>me,is:()=>he,isAssociative:()=>O,isCollection:()=>v,isImmutable:()=>j,isIndexed:()=>S,isKeyed:()=>w,isList:()=>sr,isMap:()=>le,isOrdered:()=>M,isOrderedMap:()=>de,isOrderedSet:()=>Mr,isPlainObject:()=>it,isRecord:()=>D,isSeq:()=>P,isSet:()=>Cr,isStack:()=>Ar,isValueObject:()=>pe,merge:()=>Ot,mergeDeep:()=>xt,mergeDeepWith:()=>At,mergeWith:()=>Et,remove:()=>lt,removeIn:()=>gt,set:()=>dt,setIn:()=>ft,update:()=>bt,updateIn:()=>pt,version:()=>An});var n="delete",i=5,a=1<>>0;if(""+r!==t||4294967295===r)return NaN;t=r}return t<0?l(e)+t:t}function p(){return!0}function h(e,t,r){return(0===e&&!m(e)||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r)}function f(e,t){return g(e,t,0)}function y(e,t){return g(e,t,t)}function g(e,t,r){return void 0===e?r:m(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function m(e){return e<0||0===e&&1/e==-1/0}var b="@@__IMMUTABLE_ITERABLE__@@";function v(e){return Boolean(e&&e[b])}var _="@@__IMMUTABLE_KEYED__@@";function w(e){return Boolean(e&&e[_])}var T="@@__IMMUTABLE_INDEXED__@@";function S(e){return Boolean(e&&e[T])}function O(e){return w(e)||S(e)}var E=function(e){return v(e)?e:W(e)},x=function(e){function t(e){return w(e)?e:Y(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E),A=function(e){function t(e){return S(e)?e:Z(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E),R=function(e){function t(e){return v(e)&&!O(e)?e:ee(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E);E.Keyed=x,E.Indexed=A,E.Set=R;var I="@@__IMMUTABLE_SEQ__@@";function P(e){return Boolean(e&&e[I])}var N="@@__IMMUTABLE_RECORD__@@";function D(e){return Boolean(e&&e[N])}function j(e){return v(e)||D(e)}var C="@@__IMMUTABLE_ORDERED__@@";function M(e){return Boolean(e&&e[C])}var L=0,k=1,F=2,B="function"==typeof Symbol&&Symbol.iterator,U="@@iterator",q=B||U,V=function(e){this.next=e};function Q(e,t,r,n){var i=0===e?t:1===e?r:[t,r];return n?n.value=i:n={value:i,done:!1},n}function $(){return{value:void 0,done:!0}}function H(e){return!!Array.isArray(e)||!!K(e)}function G(e){return e&&"function"==typeof e.next}function z(e){var t=K(e);return t&&t.call(e)}function K(e){var t=e&&(B&&e[B]||e[U]);if("function"==typeof t)return t}V.prototype.toString=function(){return"[Iterator]"},V.KEYS=L,V.VALUES=k,V.ENTRIES=F,V.prototype.inspect=V.prototype.toSource=function(){return this.toString()},V.prototype[q]=function(){return this};var X=Object.prototype.hasOwnProperty;function J(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var W=function(e){function t(e){return null==e?ae():j(e)?e.toSeq():function(e){var t,r,n=ce(e);if(n)return(r=K(t=e))&&r===t.entries?n.fromEntrySeq():function(e){var t=K(e);return t&&t===e.keys}(e)?n.toSetSeq():n;if("object"==typeof e)return new re(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var a=r[t?n-++i:i++];if(!1===e(a[1],a[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var r=this._cache;if(r){var n=r.length,i=0;return new V((function(){if(i===n)return{value:void 0,done:!0};var a=r[t?n-++i:i++];return Q(e,a[0],a[1])}))}return this.__iteratorUncached(e,t)},t}(E),Y=function(e){function t(e){return null==e?ae().toKeyedSeq():v(e)?w(e)?e.toSeq():e.fromEntrySeq():D(e)?e.toSeq():oe(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(W),Z=function(e){function t(e){return null==e?ae():v(e)?w(e)?e.entrySeq():e.toIndexedSeq():D(e)?e.toSeq().entrySeq():se(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(W),ee=function(e){function t(e){return(v(e)&&!O(e)?e:Z(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(W);W.isSeq=P,W.Keyed=Y,W.Set=ee,W.Indexed=Z,W.prototype[I]=!0;var te=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[d(this,e)]:t},t.prototype.__iterate=function(e,t){for(var r=this._array,n=r.length,i=0;i!==n;){var a=t?n-++i:i++;if(!1===e(r[a],a,this))break}return i},t.prototype.__iterator=function(e,t){var r=this._array,n=r.length,i=0;return new V((function(){if(i===n)return{value:void 0,done:!0};var a=t?n-++i:i++;return Q(e,a,r[a])}))},t}(Z),re=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return X.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,i=n.length,a=0;a!==i;){var o=n[t?i-++a:a++];if(!1===e(r[o],o,this))break}return a},t.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,i=n.length,a=0;return new V((function(){if(a===i)return{value:void 0,done:!0};var o=n[t?i-++a:a++];return Q(e,o,r[o])}))},t}(Y);re.prototype[C]=!0;var ne,ie=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=z(this._collection),n=0;if(G(r))for(var i;!(i=r.next()).done&&!1!==e(i.value,n++,this););return n},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=z(this._collection);if(!G(r))return new V($);var n=0;return new V((function(){var t=r.next();return t.done?t:Q(e,n++,t.value)}))},t}(Z);function ae(){return ne||(ne=new te([]))}function oe(e){var t=ce(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new re(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function se(e){var t=ce(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function ce(e){return J(e)?new te(e):H(e)?new ie(e):void 0}var ue="@@__IMMUTABLE_MAP__@@";function le(e){return Boolean(e&&e[ue])}function de(e){return le(e)&&M(e)}function pe(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function he(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(pe(e)&&pe(t)&&e.equals(t))}var fe="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var r=65535&(e|=0),n=65535&(t|=0);return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0};function ye(e){return e>>>1&1073741824|3221225471&e}var ge=Object.prototype.valueOf;function me(e){if(null==e)return be(e);if("function"==typeof e.hashCode)return ye(e.hashCode(e));var t,r,n,i=(t=e).valueOf!==ge&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==i)return be(i);switch(typeof i){case"boolean":return i?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;for(t!==e&&(t^=4294967295*e);e>4294967295;)t^=e/=4294967295;return ye(t)}(i);case"string":return i.length>Re?(void 0===(n=Ne[r=i])&&(n=ve(r),Pe===Ie&&(Pe=0,Ne={}),Pe++,Ne[r]=n),n):ve(i);case"object":case"function":return function(e){var t;if(Oe&&void 0!==(t=Se.get(e)))return t;if(void 0!==(t=e[Ae]))return t;if(!we){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ae]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=Te(),Oe)Se.set(e,t);else{if(void 0!==_e&&!1===_e(e))throw new Error("Non-extensible objects are not allowed as keys.");if(we)Object.defineProperty(e,Ae,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ae]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ae]=t}}return t}(i);case"symbol":return function(e){var t=Ee[e];return void 0!==t||(t=Te(),Ee[e]=t),t}(i);default:if("function"==typeof i.toString)return ve(i.toString());throw new Error("Value type "+typeof i+" cannot be hashed.")}}function be(e){return null===e?1108378658:1108378659}function ve(e){for(var t=0,r=0;r=0&&(u.get=function(t,r){return(t=d(this,t))>=0&&ts)return{value:void 0,done:!0};var e=i.next();return n||t===k||e.done?e:Q(t,c-1,t===L?void 0:e.value[1],e)}))},u}function qe(e,t,r,n){var i=Je(e);return i.__iterateUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterate(i,a);var s=!0,c=0;return e.__iterate((function(e,a,u){if(!s||!(s=t.call(r,e,a,u)))return c++,i(e,n?a:c-1,o)})),c},i.__iteratorUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterator(i,a);var s=e.__iterator(F,a),c=!0,u=0;return new V((function(){var e,a,l;do{if((e=s.next()).done)return n||i===k?e:Q(i,u++,i===L?void 0:e.value[1],e);var d=e.value;a=d[0],l=d[1],c&&(c=t.call(r,l,a,o))}while(c);return i===F?e:Q(i,a,l,e)}))},i}function Ve(e,t,r){var n=Je(e);return n.__iterateUncached=function(i,a){if(a)return this.cacheResult().__iterate(i,a);var o=0,s=!1;return function e(c,u){c.__iterate((function(a,c){return(!t||u0}function Ge(e,t,r,n){var i=Je(e),a=new te(r).map((function(e){return e.size}));return i.size=n?a.max():a.min(),i.__iterate=function(e,t){for(var r,n=this.__iterator(k,t),i=0;!(r=n.next()).done&&!1!==e(r.value,i++,this););return i},i.__iteratorUncached=function(e,i){var a=r.map((function(e){return e=E(e),z(i?e.reverse():e)})),o=0,s=!1;return new V((function(){var r;return s||(r=a.map((function(e){return e.next()})),s=n?r.every((function(e){return e.done})):r.some((function(e){return e.done}))),s?{value:void 0,done:!0}:Q(e,o++,t.apply(null,r.map((function(e){return e.value}))))}))},i}function ze(e,t){return e===t?e:P(e)?t:e.constructor(t)}function Ke(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Xe(e){return w(e)?x:S(e)?A:R}function Je(e){return Object.create((w(e)?Y:S(e)?Z:ee).prototype)}function We(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):W.prototype.cacheResult.call(this)}function Ye(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e0;)t[r]=arguments[r+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return St(this,t,e)}function St(e,t,r){for(var n=[],i=0;i0;)t[r]=arguments[r+1];return It(e,t)}function Et(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return It(t,r,e)}function xt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Rt(e,t)}function At(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Rt(t,r,e)}function Rt(e,t,r){return It(e,t,function(e){return function t(r,n,i){return at(r)&&at(n)&&(a=n,o=W(r),s=W(a),S(o)===S(s)&&w(o)===w(s))?It(r,[n],t):e?e(r,n,i):n;var a,o,s}}(r))}function It(e,t,r){if(!at(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(j(e))return"function"==typeof r&&e.mergeWith?e.mergeWith.apply(e,[r].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var n=Array.isArray(e),i=e,a=n?A:x,o=n?function(t){i===e&&(i=ut(i)),i.push(t)}:function(t,n){var a=X.call(i,n),o=a&&r?r(i[n],t,n):t;a&&o===i[n]||(i===e&&(i=ut(i)),i[n]=o)},s=0;s0;)t[r]=arguments[r+1];return Rt(this,t,e)}function Dt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return pt(this,e,Jt(),(function(e){return It(e,t)}))}function jt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return pt(this,e,Jt(),(function(e){return Rt(e,t)}))}function Ct(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Mt(){return this.__ownerID?this:this.__ensureOwner(new u)}function Lt(){return this.__ensureOwner()}function kt(){return this.__altered}var Ft=function(e){function t(t){return null==t?Jt():le(t)&&!M(t)?t:Jt().withMutations((function(r){var n=e(t);tt(n.size),n.forEach((function(e,t){return r.set(t,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Jt().withMutations((function(t){for(var r=0;r=e.length)throw new Error("Missing value for key: "+e[r]);t.set(e[r],e[r+1])}}))},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return Wt(this,e,t)},t.prototype.remove=function(e){return Wt(this,e,s)},t.prototype.deleteAll=function(e){var t=E(e);return 0===t.size?this:this.withMutations((function(e){t.forEach((function(t){return e.remove(t)}))}))},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Jt()},t.prototype.sort=function(e){return Tr(Qe(this,e))},t.prototype.sortBy=function(e,t){return Tr(Qe(this,t,e))},t.prototype.map=function(e,t){var r=this;return this.withMutations((function(n){n.forEach((function(i,a){n.set(a,e.call(t,i,a,r))}))}))},t.prototype.__iterator=function(e,t){return new Gt(this,e,t)},t.prototype.__iterate=function(e,t){var r=this,n=0;return this._root&&this._root.iterate((function(t){return n++,e(t[1],t[0],r)}),t),n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Xt(this.size,this._root,e,this.__hash):0===this.size?Jt():(this.__ownerID=e,this.__altered=!1,this)},t}(x);Ft.isMap=le;var Bt=Ft.prototype;Bt[ue]=!0,Bt[n]=Bt.remove,Bt.removeAll=Bt.deleteAll,Bt.setIn=yt,Bt.removeIn=Bt.deleteIn=mt,Bt.update=vt,Bt.updateIn=_t,Bt.merge=Bt.concat=wt,Bt.mergeWith=Tt,Bt.mergeDeep=Pt,Bt.mergeDeepWith=Nt,Bt.mergeIn=Dt,Bt.mergeDeepIn=jt,Bt.withMutations=Ct,Bt.wasAltered=kt,Bt.asImmutable=Lt,Bt["@@transducer/init"]=Bt.asMutable=Mt,Bt["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Bt["@@transducer/result"]=function(e){return e.asImmutable()};var Ut=function(e,t){this.ownerID=e,this.entries=t};Ut.prototype.get=function(e,t,r,n){for(var i=this.entries,a=0,o=i.length;a=nr)return function(e,t,r,n){e||(e=new u);for(var i=new $t(e,me(r),[r,n]),a=0;a>>e)&o),s=this.bitmap;return s&a?this.nodes[tr(s&a-1)].get(e+i,t,r,n):n},qt.prototype.update=function(e,t,r,n,c,u,l){void 0===r&&(r=me(n));var d=(0===t?r:r>>>t)&o,p=1<=ir)return function(e,t,r,n,i){for(var o=0,s=new Array(a),c=0;0!==r;c++,r>>>=1)s[c]=1&r?t[o++]:void 0;return s[n]=i,new Vt(e,o+1,s)}(e,g,h,d,b);if(f&&!b&&2===g.length&&Zt(g[1^y]))return g[1^y];if(f&&b&&1===g.length&&Zt(b))return b;var v=e&&e===this.ownerID,_=f?b?h:h^p:h|p,w=f?b?rr(g,y,b,v):function(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var i=new Array(n),a=0,o=0;o>>e)&o,s=this.nodes[a];return s?s.get(e+i,t,r,n):n},Vt.prototype.update=function(e,t,r,n,a,c,u){void 0===r&&(r=me(n));var l=(0===t?r:r>>>t)&o,d=a===s,p=this.nodes,h=p[l];if(d&&!h)return this;var f=Yt(h,e,t+i,r,n,a,c,u);if(f===h)return this;var y=this.count;if(h){if(!f&&--y>>r)&o,u=(0===r?n:n>>>r)&o,l=c===u?[er(e,t,r+i,n,a)]:(s=new $t(t,n,a),c>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,127&(e+=e>>8)+(e>>16)}function rr(e,t,r,n){var i=n?e:Ze(e);return i[t]=r,i}var nr=a/4,ir=a/2,ar=a/4,or="@@__IMMUTABLE_LIST__@@";function sr(e){return Boolean(e&&e[or])}var cr=function(e){function t(t){var r=yr();if(null==t)return r;if(sr(t))return t;var n=e(t),o=n.size;return 0===o?r:(tt(o),o>0&&o=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?vr(e,t).set(0,r):vr(e,0,t+1).set(t,r)}));t+=e._origin;var n=e._tail,i=e._root,a={value:!1};return t>=_r(e._capacity)?n=gr(n,e.__ownerID,0,t,r,a):i=gr(i,e.__ownerID,e._level,t,r,a),a.value?e.__ownerID?(e._root=i,e._tail=n,e.__hash=void 0,e.__altered=!0,e):fr(e._origin,e._capacity,e._level,i,n):e}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=i,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):yr()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(r){vr(r,0,t+e.length);for(var n=0;n>>t&o;if(n>=this.array.length)return new lr([],e);var a,s=0===n;if(t>0){var c=this.array[n];if((a=c&&c.removeBefore(e,t-i,r))===c&&s)return this}if(s&&!a)return this;var u=mr(this,e);if(!s)for(var l=0;l>>t&o;if(a>=this.array.length)return this;if(t>0){var s=this.array[a];if((n=s&&s.removeAfter(e,t-i,r))===s&&a===this.array.length-1)return this}var c=mr(this,e);return c.array.splice(a+1),n&&(c.array[a]=n),c};var dr,pr={};function hr(e,t){var r=e._origin,n=e._capacity,o=_r(n),s=e._tail;return function e(c,u,l){return 0===u?function(e,i){var c=i===o?s&&s.array:e&&e.array,u=i>r?0:r-i,l=n-i;return l>a&&(l=a),function(){if(u===l)return pr;var e=t?--l:u++;return c&&c[e]}}(c,l):function(o,s,c){var u,l=o&&o.array,d=c>r?0:r-c>>s,p=1+(n-c>>s);return p>a&&(p=a),function(){for(;;){if(u){var r=u();if(r!==pr)return r;u=null}if(d===p)return pr;var n=t?--p:d++;u=e(l&&l[n],s-i,c+(n<>>r&o,d=e&&l0){var p=e&&e.array[l],h=gr(p,t,r-i,n,a,s);return h===p?e:((u=mr(e,t)).array[l]=h,u)}return d&&e.array[l]===a?e:(s&&c(s),u=mr(e,t),void 0===a&&l===u.array.length-1?u.array.pop():u.array[l]=a,u)}function mr(e,t){return t&&e&&t===e.ownerID?e:new lr(e?e.array.slice():[],t)}function br(e,t){if(t>=_r(e._capacity))return e._tail;if(t<1<0;)r=r.array[t>>>n&o],n-=i;return r}}function vr(e,t,r){void 0!==t&&(t|=0),void 0!==r&&(r|=0);var n=e.__ownerID||new u,a=e._origin,s=e._capacity,c=a+t,l=void 0===r?s:r<0?s+r:a+r;if(c===a&&l===s)return e;if(c>=l)return e.clear();for(var d=e._level,p=e._root,h=0;c+h<0;)p=new lr(p&&p.array.length?[void 0,p]:[],n),h+=1<<(d+=i);h&&(c+=h,a+=h,l+=h,s+=h);for(var f=_r(s),y=_r(l);y>=1<f?new lr([],n):g;if(g&&y>f&&ci;v-=i){var _=f>>>v&o;b=b.array[_]=mr(b.array[_],n)}b.array[f>>>i&o]=g}if(l=y)c-=y,l-=y,d=i,p=null,m=m&&m.removeBefore(n,0,c);else if(c>a||y>>d&o;if(w!==y>>>d&o)break;w&&(h+=(1<a&&(p=p.removeBefore(n,d,c-h)),p&&y>>i<=a&&c.size>=2*o.size?(n=(i=c.filter((function(e,t){return void 0!==e&&u!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(n.__ownerID=i.__ownerID=e.__ownerID)):(n=o.remove(t),i=u===c.size-1?c.pop():c.set(u,void 0))}else if(l){if(r===c.get(u)[1])return e;n=o,i=c.set(u,[t,r])}else n=o.set(t,c.size),i=c.set(c.size,[t,r]);return e.__ownerID?(e.size=n.size,e._map=n,e._list=i,e.__hash=void 0,e.__altered=!0,e):Sr(n,i)}Tr.isOrderedMap=de,Tr.prototype[C]=!0,Tr.prototype[n]=Tr.prototype.remove;var xr="@@__IMMUTABLE_STACK__@@";function Ar(e){return Boolean(e&&e[xr])}var Rr=function(e){function t(e){return null==e?Dr():Ar(e)?e:Dr().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var r=this._head;for(e=d(this,e);r&&e--;)r=r.next;return r?r.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:e[n],next:r};return this.__ownerID?(this.size=t,this._head=r,this.__hash=void 0,this.__altered=!0,this):Nr(t,r)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Ar(t))return t;tt(t.size);var r=this.size,n=this._head;return t.__iterate((function(e){r++,n={value:e,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):Nr(r,n)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Dr()},t.prototype.slice=function(t,r){if(h(t,r,this.size))return this;var n=f(t,this.size);if(y(r,this.size)!==this.size)return e.prototype.slice.call(this,t,r);for(var i=this.size-n,a=this._head;n--;)a=a.next;return this.__ownerID?(this.size=i,this._head=a,this.__hash=void 0,this.__altered=!0,this):Nr(i,a)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Nr(this.size,this._head,e,this.__hash):0===this.size?Dr():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var r=this;if(t)return new te(this.toArray()).__iterate((function(t,n){return e(t,n,r)}),t);for(var n=0,i=this._head;i&&!1!==e(i.value,n++,this);)i=i.next;return n},t.prototype.__iterator=function(e,t){if(t)return new te(this.toArray()).__iterator(e,t);var r=0,n=this._head;return new V((function(){if(n){var t=n.value;return n=n.next,Q(e,r++,t)}return{value:void 0,done:!0}}))},t}(A);Rr.isStack=Ar;var Ir,Pr=Rr.prototype;function Nr(e,t,r,n){var i=Object.create(Pr);return i.size=e,i._head=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Dr(){return Ir||(Ir=Nr(0))}Pr[xr]=!0,Pr.shift=Pr.pop,Pr.unshift=Pr.push,Pr.unshiftAll=Pr.pushAll,Pr.withMutations=Ct,Pr.wasAltered=kt,Pr.asImmutable=Lt,Pr["@@transducer/init"]=Pr.asMutable=Mt,Pr["@@transducer/step"]=function(e,t){return e.unshift(t)},Pr["@@transducer/result"]=function(e){return e.asImmutable()};var jr="@@__IMMUTABLE_SET__@@";function Cr(e){return Boolean(e&&e[jr])}function Mr(e){return Cr(e)&&M(e)}function Lr(e,t){if(e===t)return!0;if(!v(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||w(e)!==w(t)||S(e)!==S(t)||M(e)!==M(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!O(e);if(M(e)){var n=e.entries();return t.every((function(e,t){var i=n.next().value;return i&&he(i[1],e)&&(r||he(i[0],t))}))&&n.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var a=e;e=t,t=a}var o=!0,c=t.__iterate((function(t,n){if(r?!e.has(t):i?!he(t,e.get(n,s)):!he(e.get(n,s),t))return o=!1,!1}));return o&&e.size===c}function kr(e,t){var r=function(r){e.prototype[r]=t[r]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}function Fr(e){if(!e||"object"!=typeof e)return e;if(!v(e)){if(!at(e))return e;e=W(e)}if(w(e)){var t={};return e.__iterate((function(e,r){t[r]=Fr(e)})),t}var r=[];return e.__iterate((function(e){r.push(Fr(e))})),r}var Br=function(e){function t(t){return null==t?$r():Cr(t)&&!M(t)?t:$r().withMutations((function(r){var n=e(t);tt(n.size),n.forEach((function(e){return r.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(x(e).keySeq())},t.intersect=function(e){return(e=E(e).toArray()).length?qr.intersect.apply(t(e.pop()),e):$r()},t.union=function(e){return(e=E(e).toArray()).length?qr.union.apply(t(e.pop()),e):$r()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Vr(this,this._map.set(e,e))},t.prototype.remove=function(e){return Vr(this,this._map.remove(e))},t.prototype.clear=function(){return Vr(this,this._map.clear())},t.prototype.map=function(e,t){var r=this,n=!1,i=Vr(this,this._map.mapEntries((function(i){var a=i[1],o=e.call(t,a,a,r);return o!==a&&(n=!0),[o,o]}),t));return n?i:this},t.prototype.union=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(r){for(var n=0;n=0&&t=0&&r>>-15,461845907),t=fe(t<<13|t>>>-13,5),t=fe((t=t+3864292196^e)^t>>>16,2246822507),t=ye((t=fe(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(r?t?function(e,t){n=31*n+un(me(e),me(t))|0}:function(e,t){n=n+un(me(e),me(t))|0}:t?function(e){n=31*n+me(e)|0}:function(e){n=n+me(e)|0}),n)}(this))}});var Wr=E.prototype;Wr[b]=!0,Wr[q]=Wr.values,Wr.toJSON=Wr.toArray,Wr.__toStringMapper=ot,Wr.inspect=Wr.toSource=function(){return this.toString()},Wr.chain=Wr.flatMap,Wr.contains=Wr.includes,kr(x,{flip:function(){return ze(this,Le(this))},mapEntries:function(e,t){var r=this,n=0;return ze(this,this.toSeq().map((function(i,a){return e.call(t,[a,i],n++,r)})).fromEntrySeq())},mapKeys:function(e,t){var r=this;return ze(this,this.toSeq().flip().map((function(n,i){return e.call(t,n,i,r)})).flip())}});var Yr=x.prototype;Yr[_]=!0,Yr[q]=Wr.entries,Yr.toJSON=Jr,Yr.__toStringMapper=function(e,t){return ot(t)+": "+ot(e)},kr(A,{toKeyedSeq:function(){return new De(this,!1)},filter:function(e,t){return ze(this,Be(this,e,t,!1))},findIndex:function(e,t){var r=this.findEntry(e,t);return r?r[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return ze(this,Fe(this,!1))},slice:function(e,t){return ze(this,Ue(this,e,t,!1))},splice:function(e,t){var r=arguments.length;if(t=Math.max(t||0,0),0===r||2===r&&!t)return this;e=f(e,e<0?this.count():this.size);var n=this.slice(0,e);return ze(this,1===r?n:n.concat(Ze(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var r=this.findLastEntry(e,t);return r?r[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return ze(this,Ve(this,e,!1))},get:function(e,t){return(e=d(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,r){return r===e}),void 0,t)},has:function(e){return(e=d(this,e))>=0&&(void 0!==this.size?this.size===1/0||et?-1:0}function un(e,t){return e^t+2654435769+(e<<6)+(e>>2)}en.has=Wr.includes,en.contains=en.includes,en.keys=en.values,kr(Y,Yr),kr(Z,Zr),kr(ee,en);var ln=function(e){function t(e){return null==e?fn():Mr(e)?e:fn().withMutations((function(t){var r=R(e);tt(r.size),r.forEach((function(e){return t.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(x(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Br);ln.isOrderedSet=Mr;var dn,pn=ln.prototype;function hn(e,t){var r=Object.create(pn);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function fn(){return dn||(dn=hn(Or()))}pn[C]=!0,pn.zip=Zr.zip,pn.zipWith=Zr.zipWith,pn.zipAll=Zr.zipAll,pn.__empty=fn,pn.__make=hn;var yn={LeftThenRight:-1,RightThenLeft:1},gn=function(e,t){var r;!function(e){if(D(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(j(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var n=function(a){var o=this;if(a instanceof n)return a;if(!(this instanceof n))return new n(a);if(!r){r=!0;var s=Object.keys(e),c=i._indices={};i._name=t,i._keys=s,i._defaultValues=e;for(var u=0;u2?[]:void 0,{"":e})}function En(e,t,r,n,i,a){if("string"!=typeof r&&!j(r)&&(J(r)||H(r)||it(r))){if(~e.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");e.push(r),i&&""!==n&&i.push(n);var o=t.call(a,n,W(r).map((function(n,a){return En(e,t,n,a,i,r)})),i&&i.slice());return e.pop(),i&&i.pop(),o}return r}function xn(e,t){return S(t)?t.toList():w(t)?t.toMap():t.toSet()}var An="4.3.5",Rn=E;const In={version:An,Collection:E,Iterable:E,Seq:W,Map:Ft,OrderedMap:Tr,List:cr,Stack:Rr,Set:Br,OrderedSet:ln,PairSorting:yn,Record:gn,Range:Gr,Repeat:Sn,is:he,fromJS:On,hash:me,isImmutable:j,isCollection:v,isKeyed:w,isIndexed:S,isAssociative:O,isOrdered:M,isValueObject:pe,isPlainObject:it,isSeq:P,isList:sr,isMap:le,isOrderedMap:de,isStack:Ar,isSet:Cr,isOrderedSet:Mr,isRecord:D,get:ct,getIn:zr,has:st,hasIn:Xr,merge:Ot,mergeDeep:xt,mergeWith:Et,mergeDeepWith:At,remove:lt,removeIn:gt,set:dt,setIn:ft,update:bt,updateIn:pt}},35615: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}}},76605:e=>{"use strict";const t=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform,e.exports=t},27202:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(85346),t),i(r(40905),t),i(r(76920),t),i(r(11971),t),i(r(89715),t),i(r(39426),t),i(r(45512),t)},85346:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextParser=void 0,r(17082);const n=r(9929),i=r(40905),a=r(76920),o=r(39426),s=r(45512);class c{constructor(e){e=e||{},this.documentLoader=e.documentLoader||new a.FetchDocumentLoader,this.documentCache={},this.validateContext=!e.skipValidation,this.expandContentTypeToBase=!!e.expandContentTypeToBase,this.remoteContextsDepthLimit=e.remoteContextsDepthLimit||32,this.redirectSchemaOrgHttps=!("redirectSchemaOrgHttps"in e)||!!e.redirectSchemaOrgHttps}static validateLanguage(e,t,r){if("string"!=typeof e)throw new i.ErrorCoded(`The value of an '@language' must be a string, got '${JSON.stringify(e)}'`,r);if(!s.Util.REGEX_LANGUAGE_TAG.test(e)){if(t)throw new i.ErrorCoded(`The value of an '@language' must be a valid language tag, got '${JSON.stringify(e)}'`,r);return!1}return!0}static validateDirection(e,t){if("string"!=typeof e)throw new i.ErrorCoded(`The value of an '@direction' must be a string, got '${JSON.stringify(e)}'`,i.ERROR_CODES.INVALID_BASE_DIRECTION);if(!s.Util.REGEX_DIRECTION_TAG.test(e)){if(t)throw new i.ErrorCoded(`The value of an '@direction' must be 'ltr' or 'rtl', got '${JSON.stringify(e)}'`,i.ERROR_CODES.INVALID_BASE_DIRECTION);return!1}return!0}idifyReverseTerms(e){for(const t of Object.keys(e)){let r=e[t];if(r&&"object"==typeof r&&r["@reverse"]&&!r["@id"]){if("string"!=typeof r["@reverse"]||s.Util.isValidKeyword(r["@reverse"]))throw new i.ErrorCoded(`Invalid @reverse value, must be absolute IRI or blank node: '${r["@reverse"]}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);r=e[t]=Object.assign(Object.assign({},r),{"@id":r["@reverse"]}),r["@id"]=r["@reverse"],s.Util.isPotentialKeyword(r["@reverse"])?delete r["@reverse"]:r["@reverse"]=!0}}return e}expandPrefixedTerms(e,t,r){const n=e.getContextRaw();for(const a of r||Object.keys(n))if(s.Util.EXPAND_KEYS_BLACKLIST.indexOf(a)<0&&!s.Util.isReservedInternalKeyword(a)){const r=n[a];if(s.Util.isPotentialKeyword(a)&&s.Util.ALIAS_DOMAIN_BLACKLIST.indexOf(a)>=0&&("@type"!==a||"object"==typeof n[a]&&!n[a]["@protected"]&&"@set"!==n[a]["@container"]))throw new i.ErrorCoded(`Keywords can not be aliased to something else.\nTried mapping ${a} to ${JSON.stringify(r)}`,i.ERROR_CODES.KEYWORD_REDEFINITION);if(s.Util.ALIAS_RANGE_BLACKLIST.indexOf(s.Util.getContextValueId(r))>=0)throw new i.ErrorCoded(`Aliasing to certain keywords is not allowed.\nTried mapping ${a} to ${JSON.stringify(r)}`,i.ERROR_CODES.INVALID_KEYWORD_ALIAS);if(r&&s.Util.isPotentialKeyword(s.Util.getContextValueId(r))&&!0===r["@prefix"])throw new i.ErrorCoded(`Tried to use keyword aliases as prefix: '${a}': '${JSON.stringify(r)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);for(;s.Util.isPrefixValue(n[a]);){const r=n[a];let i=!1;if("string"==typeof r)n[a]=e.expandTerm(r,!0),i=i||r!==n[a];else{const o=r["@id"],c=r["@type"],u=!("@prefix"in r)||s.Util.isValidIri(a);if("@id"in r)null!=o&&"string"==typeof o&&(n[a]=Object.assign(Object.assign({},n[a]),{"@id":e.expandTerm(o,!0)}),i=i||o!==n[a]["@id"]);else if(!s.Util.isPotentialKeyword(a)&&u){const t=e.expandTerm(a,!0);t!==a&&(n[a]=Object.assign(Object.assign({},n[a]),{"@id":t}),i=!0)}if(c&&"string"==typeof c&&"@vocab"!==c&&(!r["@container"]||!r["@container"]["@type"])&&u){let r=e.expandTerm(c,!0);t&&c===r&&(r=e.expandTerm(c,!1)),r!==c&&(i=!0,n[a]=Object.assign(Object.assign({},n[a]),{"@type":r}))}}if(!i)break}}}normalize(e,{processingMode:t,normalizeLanguageTags:r}){if(r||1===t)for(const t of Object.keys(e))if("@language"===t&&"string"==typeof e[t])e[t]=e[t].toLowerCase();else{const r=e[t];if(r&&"object"==typeof r&&"string"==typeof r["@language"]){const n=r["@language"].toLowerCase();n!==r["@language"]&&(e[t]=Object.assign(Object.assign({},r),{"@language":n}))}}}containersToHash(e){for(const t of Object.keys(e)){const r=e[t];if(r&&"object"==typeof r)if("string"==typeof r["@container"])e[t]=Object.assign(Object.assign({},r),{"@container":{[r["@container"]]:!0}});else if(Array.isArray(r["@container"])){const n={};for(const e of r["@container"])n[e]=!0;e[t]=Object.assign(Object.assign({},r),{"@container":n})}}}applyScopedProtected(e,{processingMode:t},r){if(t&&t>=1.1&&e["@protected"]){for(const t of Object.keys(e))if(!s.Util.isReservedInternalKeyword(t)&&!s.Util.isPotentialKeyword(t)&&!s.Util.isTermProtected(e,t)){const n=e[t];n&&"object"==typeof n?"@protected"in e[t]||(e[t]=Object.assign(Object.assign({},e[t]),{"@protected":!0})):(e[t]={"@id":n,"@protected":!0},s.Util.isSimpleTermDefinitionPrefix(n,r)&&(e[t]=Object.assign(Object.assign({},e[t]),{"@prefix":!0})))}delete e["@protected"]}}validateKeywordRedefinitions(e,t,r,n){for(const r of null!=n?n:Object.keys(t))if(s.Util.isTermProtected(e,r)&&("string"==typeof t[r]?t[r]={"@id":t[r],"@protected":!0}:t[r]=Object.assign(Object.assign({},t[r]),{"@protected":!0}),!s.Util.deepEqual(e[r],t[r])))throw new i.ErrorCoded(`Attempted to override the protected keyword ${r} from ${JSON.stringify(s.Util.getContextValueId(e[r]))} to ${JSON.stringify(s.Util.getContextValueId(t[r]))}`,i.ERROR_CODES.PROTECTED_TERM_REDEFINITION)}validate(e,{processingMode:t}){for(const r of Object.keys(e)){if(s.Util.isReservedInternalKeyword(r))continue;if(""===r)throw new i.ErrorCoded(`The empty term is not allowed, got: '${r}': '${JSON.stringify(e[r])}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);const n=e[r],a=typeof n;if(s.Util.isPotentialKeyword(r)){switch(r.substr(1)){case"vocab":if(null!==n&&"string"!==a)throw new i.ErrorCoded(`Found an invalid @vocab IRI: ${n}`,i.ERROR_CODES.INVALID_VOCAB_MAPPING);break;case"base":if(null!==n&&"string"!==a)throw new i.ErrorCoded(`Found an invalid @base IRI: ${e[r]}`,i.ERROR_CODES.INVALID_BASE_IRI);break;case"language":null!==n&&c.validateLanguage(n,!0,i.ERROR_CODES.INVALID_DEFAULT_LANGUAGE);break;case"version":if(null!==n&&"number"!==a)throw new i.ErrorCoded(`Found an invalid @version number: ${n}`,i.ERROR_CODES.INVALID_VERSION_VALUE);break;case"direction":null!==n&&c.validateDirection(n,!0);break;case"propagate":if(1===t)throw new i.ErrorCoded(`Found an illegal @propagate keyword: ${n}`,i.ERROR_CODES.INVALID_CONTEXT_ENTRY);if(null!==n&&"boolean"!==a)throw new i.ErrorCoded(`Found an invalid @propagate value: ${n}`,i.ERROR_CODES.INVALID_PROPAGATE_VALUE)}if(s.Util.isValidKeyword(r)&&s.Util.isValidKeyword(s.Util.getContextValueId(n)))throw new i.ErrorCoded(`Illegal keyword alias in term value, found: '${r}': '${s.Util.getContextValueId(n)}'`,i.ERROR_CODES.KEYWORD_REDEFINITION)}else if(null!==n)switch(a){case"string":if(s.Util.getPrefix(n,e)===r)throw new i.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.CYCLIC_IRI_MAPPING);if(s.Util.isValidIriWeak(r)){if("@type"===n)throw new i.ErrorCoded(`IRIs can not be mapped to @type, found: '${r}': '${n}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIri(n)&&n!==new o.JsonLdContextNormalized(e).expandTerm(r))throw new i.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${r}': '${n}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}break;case"object":if(!(s.Util.isCompactIri(r)||"@id"in n||("@id"===n["@type"]?e["@base"]:e["@vocab"])))throw new i.ErrorCoded(`Missing @id in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);for(const u of Object.keys(n)){const l=n[u];if(l)switch(u){case"@id":if(s.Util.isValidKeyword(l)&&"@type"!==l&&"@id"!==l&&"@graph"!==l&&"@nest"!==l)throw new i.ErrorCoded(`Illegal keyword alias in term value, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIriWeak(r)){if("@type"===l)throw new i.ErrorCoded(`IRIs can not be mapped to @type, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIri(l)&&l!==new o.JsonLdContextNormalized(e).expandTerm(r))throw new i.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}if("string"!=typeof l)throw new i.ErrorCoded(`Detected non-string @id in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.getPrefix(l,e)===r)throw new i.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.CYCLIC_IRI_MAPPING);break;case"@type":if("@type"===n["@container"]&&"@id"!==l&&"@vocab"!==l)throw new i.ErrorCoded(`@container: @type only allows @type: @id or @vocab, but got: '${r}': '${l}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);if("string"!=typeof l)throw new i.ErrorCoded(`The value of an '@type' must be a string, got '${JSON.stringify(a)}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);if(!("@id"===l||"@vocab"===l||1!==t&&"@json"===l||1!==t&&"@none"===l||"_"!==l[0]&&s.Util.isValidIri(l)))throw new i.ErrorCoded(`A context @type must be an absolute IRI, found: '${r}': '${l}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);break;case"@reverse":if("string"==typeof l&&n["@id"]&&n["@id"]!==l)throw new i.ErrorCoded(`Found non-matching @id and @reverse term values in '${r}':'${l}' and '${n["@id"]}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);if("@nest"in n)throw new i.ErrorCoded(`@nest is not allowed in the reverse property '${r}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);break;case"@container":if(1===t&&(Object.keys(l).length>1||s.Util.CONTAINERS_1_0.indexOf(Object.keys(l)[0])<0))throw new i.ErrorCoded(`Invalid term @container for '${r}' ('${Object.keys(l)}') in 1.0, must be only one of ${s.Util.CONTAINERS_1_0.join(", ")}`,i.ERROR_CODES.INVALID_CONTAINER_MAPPING);for(const e of Object.keys(l)){if("@list"===e&&n["@reverse"])throw new i.ErrorCoded(`Term value can not be @container: @list and @reverse at the same time on '${r}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);if(s.Util.CONTAINERS.indexOf(e)<0)throw new i.ErrorCoded(`Invalid term @container for '${r}' ('${e}'), must be one of ${s.Util.CONTAINERS.join(", ")}`,i.ERROR_CODES.INVALID_CONTAINER_MAPPING)}break;case"@language":c.validateLanguage(l,!0,i.ERROR_CODES.INVALID_LANGUAGE_MAPPING);break;case"@direction":c.validateDirection(l,!0);break;case"@prefix":if(null!==l&&"boolean"!=typeof l)throw new i.ErrorCoded(`Found an invalid term @prefix boolean in: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_PREFIX_VALUE);if(!("@id"in n)&&!s.Util.isValidIri(r))throw new i.ErrorCoded(`Invalid @prefix definition for '${r}' ('${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@index":if(1===t||!n["@container"]||!n["@container"]["@index"])throw new i.ErrorCoded(`Attempt to add illegal key to value object: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@nest":if(s.Util.isPotentialKeyword(l)&&"@nest"!==l)throw new i.ErrorCoded(`Found an invalid term @nest value in: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_NEST_VALUE)}}break;default:throw new i.ErrorCoded(`Found an invalid term value: '${r}': '${n}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION)}}}applyBaseEntry(e,t,r){return"string"==typeof e||(r&&!("@base"in e)&&t.parentContext&&"object"==typeof t.parentContext&&"@base"in t.parentContext&&(e["@base"]=t.parentContext["@base"],t.parentContext["@__baseDocument"]&&(e["@__baseDocument"]=!0)),t.baseIRI&&!t.external&&("@base"in e?null===e["@base"]||"string"!=typeof e["@base"]||s.Util.isValidIri(e["@base"])||(e["@base"]=(0,n.resolve)(e["@base"],t.parentContext&&t.parentContext["@base"]||t.baseIRI)):(e["@base"]=t.baseIRI,e["@__baseDocument"]=!0))),e}normalizeContextIri(e,t){if(!s.Util.isValidIri(e))try{e=(0,n.resolve)(e,t)}catch(t){throw new Error(`Invalid context IRI: ${e}`)}return this.redirectSchemaOrgHttps&&e.startsWith("http://schema.org")&&(e="https://schema.org/"),e}async parseInnerContexts(e,t,r){for(const n of null!=r?r:Object.keys(e)){const r=e[n];if(r&&"object"==typeof r&&"@context"in r&&null!==r["@context"]&&!t.ignoreScopedContexts){if(this.validateContext)try{const i=Object.assign(Object.assign({},e),{[n]:Object.assign({},e[n])});delete i[n]["@context"],await this.parse(r["@context"],Object.assign(Object.assign({},t),{external:!1,parentContext:i,ignoreProtection:!0,ignoreRemoteScopedContexts:!0,ignoreScopedContexts:!0}))}catch(e){throw new i.ErrorCoded(e.message,i.ERROR_CODES.INVALID_SCOPED_CONTEXT)}e[n]=Object.assign(Object.assign({},r),{"@context":(await this.parse(r["@context"],Object.assign(Object.assign({},t),{external:!1,minimalProcessing:!0,ignoreRemoteScopedContexts:!0,parentContext:e}))).getContextRaw()})}}return e}async parse(e,t={},r={}){const{baseIRI:n,parentContext:a,external:u,processingMode:l=c.DEFAULT_PROCESSING_MODE,normalizeLanguageTags:d,ignoreProtection:p,minimalProcessing:h}=t,f=t.remoteContexts||{};if(Object.keys(f).length>=this.remoteContextsDepthLimit)throw new i.ErrorCoded("Detected an overflow in remote context inclusions: "+Object.keys(f),i.ERROR_CODES.CONTEXT_OVERFLOW);if(null==e){if(!p&&a&&s.Util.hasProtectedTerms(a))throw new i.ErrorCoded("Illegal context nullification when terms are protected",i.ERROR_CODES.INVALID_CONTEXT_NULLIFICATION);return new o.JsonLdContextNormalized(this.applyBaseEntry({},t,!1))}if("string"==typeof e){const r=this.normalizeContextIri(e,n),i=this.getOverriddenLoad(r,t);if(i)return new o.JsonLdContextNormalized(i);const a=await this.parse(await this.load(r),Object.assign(Object.assign({},t),{baseIRI:r,external:!0,remoteContexts:Object.assign(Object.assign({},f),{[r]:!0})}));return this.applyBaseEntry(a.getContextRaw(),t,!0),a}if(Array.isArray(e)){const r=[],i=await Promise.all(e.map(((e,i)=>{if("string"==typeof e){const a=this.normalizeContextIri(e,n);r[i]=a;return this.getOverriddenLoad(a,t)||this.load(a)}return e})));if(h)return new o.JsonLdContextNormalized(i);const s=await i.reduce(((e,n,a)=>e.then((e=>this.parse(n,Object.assign(Object.assign({},t),{baseIRI:r[a]||t.baseIRI,external:!!r[a]||t.external,parentContext:e.getContextRaw(),remoteContexts:r[a]?Object.assign(Object.assign({},f),{[r[a]]:!0}):f}),{skipValidation:a=1.1))throw new i.ErrorCoded("Context importing is not supported in JSON-LD 1.0",i.ERROR_CODES.INVALID_CONTEXT_ENTRY);if("string"!=typeof e["@import"])throw new i.ErrorCoded("An @import value must be a string, but got "+typeof e["@import"],i.ERROR_CODES.INVALID_IMPORT_VALUE);f=await this.loadImportContext(this.normalizeContextIri(e["@import"],n)),delete e["@import"]}this.applyScopedProtected(f,{processingMode:l},o.defaultExpandOptions);const y=Object.assign(f,e);this.idifyReverseTerms(y),this.normalize(y,{processingMode:l,normalizeLanguageTags:d}),this.applyScopedProtected(y,{processingMode:l},o.defaultExpandOptions);const g=Object.keys(y),m=[];if("object"==typeof a)for(const e in a)e in y?m.push(e):y[e]=a[e];await this.parseInnerContexts(y,t,g);const b=new o.JsonLdContextNormalized(y);return(y&&y["@version"]||c.DEFAULT_PROCESSING_MODE)>=1.1&&(e["@vocab"]&&"string"==typeof e["@vocab"]||""===e["@vocab"])&&(a&&"@vocab"in a&&e["@vocab"].indexOf(":")<0?y["@vocab"]=a["@vocab"]+e["@vocab"]:(s.Util.isCompactIri(e["@vocab"])||e["@vocab"]in y)&&(y["@vocab"]=b.expandTerm(e["@vocab"],!0))),this.expandPrefixedTerms(b,this.expandContentTypeToBase,g),!p&&a&&l>=1.1&&this.validateKeywordRedefinitions(a,y,o.defaultExpandOptions,m),this.validateContext&&!r.skipValidation&&this.validate(y,{processingMode:l}),b}throw new i.ErrorCoded(`Tried parsing a context that is not a string, array or object, but got ${e}`,i.ERROR_CODES.INVALID_LOCAL_CONTEXT)}async load(e){const t=this.documentCache[e];if(t)return t;let r;try{r=await this.documentLoader.load(e)}catch(t){throw new i.ErrorCoded(`Failed to load remote context ${e}: ${t.message}`,i.ERROR_CODES.LOADING_REMOTE_CONTEXT_FAILED)}if(!("@context"in r))throw new i.ErrorCoded(`Missing @context in remote context at ${e}`,i.ERROR_CODES.INVALID_REMOTE_CONTEXT);return this.documentCache[e]=r["@context"]}getOverriddenLoad(e,t){if(e in(t.remoteContexts||{})){if(t.ignoreRemoteScopedContexts)return e;throw new i.ErrorCoded("Detected a cyclic context inclusion of "+e,i.ERROR_CODES.RECURSIVE_CONTEXT_INCLUSION)}return null}async loadImportContext(e){let t=await this.load(e);if("object"!=typeof t||Array.isArray(t))throw new i.ErrorCoded("An imported context must be a single object: "+e,i.ERROR_CODES.INVALID_REMOTE_CONTEXT);if("@import"in t)throw new i.ErrorCoded("An imported context can not import another context: "+e,i.ERROR_CODES.INVALID_CONTEXT_ENTRY);return t=Object.assign({},t),this.containersToHash(t),t}}c.DEFAULT_PROCESSING_MODE=1.1,t.ContextParser=c},40905:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR_CODES=t.ErrorCoded=void 0;class r extends Error{constructor(e,t){super(e),this.code=t}}var n;t.ErrorCoded=r,(n=t.ERROR_CODES||(t.ERROR_CODES={})).COLLIDING_KEYWORDS="colliding keywords",n.CONFLICTING_INDEXES="conflicting indexes",n.CYCLIC_IRI_MAPPING="cyclic IRI mapping",n.INVALID_ID_VALUE="invalid @id value",n.INVALID_INDEX_VALUE="invalid @index value",n.INVALID_NEST_VALUE="invalid @nest value",n.INVALID_PREFIX_VALUE="invalid @prefix value",n.INVALID_PROPAGATE_VALUE="invalid @propagate value",n.INVALID_REVERSE_VALUE="invalid @reverse value",n.INVALID_IMPORT_VALUE="invalid @import value",n.INVALID_VERSION_VALUE="invalid @version value",n.INVALID_BASE_IRI="invalid base IRI",n.INVALID_CONTAINER_MAPPING="invalid container mapping",n.INVALID_CONTEXT_ENTRY="invalid context entry",n.INVALID_CONTEXT_NULLIFICATION="invalid context nullification",n.INVALID_DEFAULT_LANGUAGE="invalid default language",n.INVALID_INCLUDED_VALUE="invalid @included value",n.INVALID_IRI_MAPPING="invalid IRI mapping",n.INVALID_JSON_LITERAL="invalid JSON literal",n.INVALID_KEYWORD_ALIAS="invalid keyword alias",n.INVALID_LANGUAGE_MAP_VALUE="invalid language map value",n.INVALID_LANGUAGE_MAPPING="invalid language mapping",n.INVALID_LANGUAGE_TAGGED_STRING="invalid language-tagged string",n.INVALID_LANGUAGE_TAGGED_VALUE="invalid language-tagged value",n.INVALID_LOCAL_CONTEXT="invalid local context",n.INVALID_REMOTE_CONTEXT="invalid remote context",n.INVALID_REVERSE_PROPERTY="invalid reverse property",n.INVALID_REVERSE_PROPERTY_MAP="invalid reverse property map",n.INVALID_REVERSE_PROPERTY_VALUE="invalid reverse property value",n.INVALID_SCOPED_CONTEXT="invalid scoped context",n.INVALID_SCRIPT_ELEMENT="invalid script element",n.INVALID_SET_OR_LIST_OBJECT="invalid set or list object",n.INVALID_TERM_DEFINITION="invalid term definition",n.INVALID_TYPE_MAPPING="invalid type mapping",n.INVALID_TYPE_VALUE="invalid type value",n.INVALID_TYPED_VALUE="invalid typed value",n.INVALID_VALUE_OBJECT="invalid value object",n.INVALID_VALUE_OBJECT_VALUE="invalid value object value",n.INVALID_VOCAB_MAPPING="invalid vocab mapping",n.IRI_CONFUSED_WITH_PREFIX="IRI confused with prefix",n.KEYWORD_REDEFINITION="keyword redefinition",n.LOADING_DOCUMENT_FAILED="loading document failed",n.LOADING_REMOTE_CONTEXT_FAILED="loading remote context failed",n.MULTIPLE_CONTEXT_LINK_HEADERS="multiple context link headers",n.PROCESSING_MODE_CONFLICT="processing mode conflict",n.PROTECTED_TERM_REDEFINITION="protected term redefinition",n.CONTEXT_OVERFLOW="context overflow",n.INVALID_BASE_DIRECTION="invalid base direction",n.RECURSIVE_CONTEXT_INCLUSION="recursive context inclusion",n.INVALID_STREAMING_KEY_ORDER="invalid streaming key order",n.INVALID_EMBEDDED_NODE="invalid embedded node",n.INVALID_ANNOTATION="invalid annotation"},76920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchDocumentLoader=void 0,r(17082);const n=r(40905),i=r(75441),a=r(9929);t.FetchDocumentLoader=class{constructor(e){this.fetcher=e}async load(e){const t=await(this.fetcher||fetch)(e,{headers:new Headers({accept:"application/ld+json"})});if(t.ok&&t.headers){let r=t.headers.get("Content-Type");if(r){const e=r.indexOf(";");e>0&&(r=r.substr(0,e))}if("application/ld+json"===r)return await t.json();if(t.headers.has("Link")){let r;if(t.headers.forEach(((t,n)=>{if("link"===n){const n=(0,i.parse)(t);for(const t of n.get("type","application/ld+json"))if("alternate"===t.rel){if(r)throw new Error("Multiple JSON-LD alternate links were found on "+e);r=(0,a.resolve)(t.uri,e)}}})),r)return this.load(r)}throw new n.ErrorCoded(`Unsupported JSON-LD media type ${r}`,n.ERROR_CODES.LOADING_DOCUMENT_FAILED)}throw new Error(t.statusText||`Status code: ${t.status}`)}}},11971:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89715:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},39426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultExpandOptions=t.JsonLdContextNormalized=void 0;const n=r(9929),i=r(40905),a=r(45512);t.JsonLdContextNormalized=class{constructor(e){this.contextRaw=e}getContextRaw(){return this.contextRaw}expandTerm(e,r,o=t.defaultExpandOptions){const s=this.contextRaw[e];if(null===s||s&&null===s["@id"])return null;let c=!0;if(s&&r){const t=a.Util.getContextValueId(s);if(t&&t!==e){if("string"==typeof t&&(a.Util.isValidIri(t)||a.Util.isValidKeyword(t)))return t;a.Util.isPotentialKeyword(t)||(c=!1)}}const u=a.Util.getPrefix(e,this.contextRaw),l=this.contextRaw["@vocab"],d=(!!l||""===l)&&l.indexOf(":")<0,p=this.contextRaw["@base"],h=a.Util.isPotentialKeyword(e);if(u){const t=this.contextRaw[u],r=a.Util.getContextValueId(t);if(r){if("string"!=typeof t&&o.allowPrefixForcing){if("_"!==r[0]&&!h&&!t["@prefix"]&&!(e in this.contextRaw))return e}else if(!a.Util.isSimpleTermDefinitionPrefix(r,o))return e;return r+e.substr(u.length+1)}}else{if(r&&(l||""===l||o.allowVocabRelativeToBase&&p&&d)&&!h&&!a.Util.isCompactIri(e)){if(d){if(o.allowVocabRelativeToBase)return(l||p?(0,n.resolve)(l,p):"")+e;throw new i.ErrorCoded(`Relative vocab expansion for term '${e}' with vocab '${l}' is not allowed.`,i.ERROR_CODES.INVALID_VOCAB_MAPPING)}return l+e}if(!r&&p&&!h&&!a.Util.isCompactIri(e))return(0,n.resolve)(e,p)}if(c)return e;throw new i.ErrorCoded(`Invalid IRI mapping found for context entry '${e}': '${JSON.stringify(s)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}compactIri(e,t){if(t&&this.contextRaw["@vocab"]&&e.startsWith(this.contextRaw["@vocab"]))return e.substr(this.contextRaw["@vocab"].length);if(!t&&this.contextRaw["@base"]&&e.startsWith(this.contextRaw["@base"]))return e.substr(this.contextRaw["@base"].length);const r={prefix:"",suffix:e};for(const n in this.contextRaw){const i=this.contextRaw[n];if(i&&!a.Util.isPotentialKeyword(n)){const o=a.Util.getContextValueId(i);if(e.startsWith(o)){const i=e.substr(o.length);if(i)i.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;class r{static isCompactIri(e){return e.indexOf(":")>0&&!(e&&"#"===e[0])}static getPrefix(e,t){if(e&&"#"===e[0])return null;const r=e.indexOf(":");if(r>=0){if(e.length>r+1&&"/"===e.charAt(r+1)&&"/"===e.charAt(r+2))return null;const n=e.substr(0,r);if("_"===n)return null;if(t[n])return n}return null}static getContextValueId(e){if(null===e||"string"==typeof e)return e;return e["@id"]||null}static isSimpleTermDefinitionPrefix(e,t){return!r.isPotentialKeyword(e)&&(t.allowPrefixNonGenDelims||"string"==typeof e&&("_"===e[0]||r.isPrefixIriEndingWithGenDelim(e)))}static isPotentialKeyword(e){return"string"==typeof e&&r.KEYWORD_REGEX.test(e)}static isPrefixIriEndingWithGenDelim(e){return r.ENDS_WITH_GEN_DELIM.test(e)}static isPrefixValue(e){return e&&("string"==typeof e||e&&"object"==typeof e)}static isValidIri(e){return Boolean(e&&r.IRI_REGEX.test(e))}static isValidIriWeak(e){return!!e&&":"!==e[0]&&r.IRI_REGEX_WEAK.test(e)}static isValidKeyword(e){return r.VALID_KEYWORDS[e]}static isTermProtected(e,t){const r=e[t];return!("string"==typeof r)&&r&&r["@protected"]}static hasProtectedTerms(e){for(const t of Object.keys(e))if(r.isTermProtected(e,t))return!0;return!1}static isReservedInternalKeyword(e){return e.startsWith("@__")}static deepEqual(e,t){const r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every((r=>{const n=e[r],i=t[r];return n===i||null!==n&&null!==i&&"object"==typeof n&&"object"==typeof i&&this.deepEqual(n,i)}))}}r.IRI_REGEX=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^ "<>{}|\\\[\]`#]*(#[^#]*)?$/,r.IRI_REGEX_WEAK=/(?::[^:])|\//,r.KEYWORD_REGEX=/^@[a-z]+$/i,r.ENDS_WITH_GEN_DELIM=/[:/?#\[\]@]$/,r.REGEX_LANGUAGE_TAG=/^[a-zA-Z]+(-[a-zA-Z0-9]+)*$/,r.REGEX_DIRECTION_TAG=/^(ltr)|(rtl)$/,r.VALID_KEYWORDS={"@annotation":!0,"@base":!0,"@container":!0,"@context":!0,"@direction":!0,"@graph":!0,"@id":!0,"@import":!0,"@included":!0,"@index":!0,"@json":!0,"@language":!0,"@list":!0,"@nest":!0,"@none":!0,"@prefix":!0,"@propagate":!0,"@protected":!0,"@reverse":!0,"@set":!0,"@type":!0,"@value":!0,"@version":!0,"@vocab":!0},r.EXPAND_KEYS_BLACKLIST=["@base","@vocab","@language","@version","@direction"],r.ALIAS_DOMAIN_BLACKLIST=["@container","@graph","@id","@index","@list","@nest","@none","@prefix","@reverse","@set","@type","@value","@version"],r.ALIAS_RANGE_BLACKLIST=["@context","@preserve"],r.CONTAINERS=["@list","@set","@index","@language","@graph","@id","@type"],r.CONTAINERS_1_0=["@list","@set","@index"],t.Util=r},17082:function(){!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}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(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 d(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 p(e){this.map={},e instanceof p?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 h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=f(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 m(){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:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(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=h(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?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,r,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),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-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 _(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 w(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 p(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];w.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new w(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,a){var o=new v(e,r);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new p,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 s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=p,e.Request=v,e.Response=w),t.Headers=p,t.Request=v,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)},50631:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(90114),t)},46240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextTree=void 0;class r{constructor(){this.subTrees={}}getContext(e){if(e.length>0){const[t,...r]=e,n=this.subTrees[t];if(n){const e=n.getContext(r);if(e)return e.then((({context:e,depth:t})=>({context:e,depth:t+1})))}}return this.context?this.context.then((e=>({context:e,depth:0}))):null}setContext(e,t){if(0===e.length)this.context=t;else{const[n,...i]=e;let a=this.subTrees[n];a||(a=this.subTrees[n]=new r),a.setContext(i,t)}}removeContext(e){this.setContext(e,null)}}t.ContextTree=r},90114:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonLdParser=void 0;const n=r(36885),i=r(27202),a=r(58521),o=r(11272),s=r(45947),c=r(62885),u=r(29997),l=r(66700),d=r(37071),p=r(48978),h=r(30643),f=r(58865),y=r(23787),g=r(30635),m=r(94382),b=r(24292),v=r(22135),_=r(75441),w=r(6042);class T extends a.Transform{constructor(e){super({readableObjectMode:!0}),e=e||{},this.options=e,this.parsingContext=new b.ParsingContext(Object.assign({parser:this},e)),this.util=new v.Util({dataFactory:e.dataFactory,parsingContext:this.parsingContext}),this.jsonParser=new n,this.contextJobs=[],this.typeJobs=[],this.contextAwaitingJobs=[],this.lastDepth=0,this.lastKeys=[],this.lastOnValueJob=Promise.resolve(),this.attachJsonParserListeners(),this.on("end",(()=>{void 0!==this.jsonParser.mode&&this.emit("error",new Error("Unclosed document"))}))}static fromHttpResponse(e,t,r,n){let a,o,s=["application/activity+json"];if(n&&n.wellKnownMediaTypes&&(s=n.wellKnownMediaTypes),"application/ld+json"!==t&&!s.includes(t)){if("application/json"!==t&&!t.endsWith("+json"))throw new i.ErrorCoded(`Unsupported JSON-LD media type ${t}`,i.ERROR_CODES.LOADING_DOCUMENT_FAILED);if(r&&r.has("Link")&&r.forEach(((t,r)=>{if("link"===r){const r=(0,_.parse)(t);for(const t of r.get("rel","http://www.w3.org/ns/json-ld#context")){if(a)throw new i.ErrorCoded("Multiple JSON-LD context link headers were found on "+e,i.ERROR_CODES.MULTIPLE_CONTEXT_LINK_HEADERS);a=t.uri}}})),!a&&!(null==n?void 0:n.ignoreMissingContextLinkHeader))throw new i.ErrorCoded(`Missing context link header for media type ${t} on ${e}`,i.ERROR_CODES.LOADING_DOCUMENT_FAILED)}if(r&&r.has("Content-Type")){const e=r.get("Content-Type"),t=/; *profile=([^"]*)/.exec(e);t&&"http://www.w3.org/ns/json-ld#streaming"===t[1]&&(o=!0)}return new T(Object.assign({baseIRI:e,context:a,streamingProfile:o},n||{}))}import(e){if("pipe"in e){e.on("error",(e=>t.emit("error",e)));const t=e.pipe(new T(this.options));return t}{const t=new a.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new T(this.options));return r}}_transform(e,t,r){this.jsonParser.write(e),this.lastOnValueJob.then((()=>r()),(e=>r(e)))}async newOnValueJob(e,t,r,n){let a=!0;if(n&&r1&&(l=this.parsingContext.validationStack[this.parsingContext.validationStack.length-1].property);for(let t=Math.max(1,this.parsingContext.validationStack.length-1);t=0?this.parsingContext.idStack[e-r-1]:[await this.util.getGraphContainerValue(t,e)];if(a)for(const t of a){this.parsingContext.emittedStack[e]=!0;for(const r of n)this.util.emitQuadChecked(e,i,r.predicate,r.object,t,r.reverse,r.isEmbedded)}else{const r=this.parsingContext.getUnidentifiedGraphBufferSafe(e-await this.util.getDepthOffsetGraph(e,t)-1);for(const e of n)e.reverse?r.push({object:i,predicate:e.predicate,subject:e.object,isEmbedded:e.isEmbedded}):r.push({object:e.object,predicate:e.predicate,subject:i,isEmbedded:e.isEmbedded})}}this.parsingContext.unidentifiedValuesBuffer.splice(e,1),this.parsingContext.literalStack.splice(e,1),this.parsingContext.jsonLiteralStack.splice(e,1)}const a=this.parsingContext.unidentifiedGraphsBuffer[e];if(a){for(const t of r){const r=1!==e||"BlankNode"!==t.termType||this.parsingContext.topLevelProperties?t:this.util.getDefaultGraph();this.parsingContext.emittedStack[e]=!0;for(const t of a)this.parsingContext.emitQuad(e,this.util.dataFactory.quad(t.subject,t.predicate,t.object,r))}this.parsingContext.unidentifiedGraphsBuffer.splice(e,1)}const o=this.parsingContext.annotationsBuffer[e];if(o){o.length>0&&1===e&&this.parsingContext.emitError(new i.ErrorCoded("Annotations can not be made on top-level nodes",i.ERROR_CODES.INVALID_ANNOTATION));const t=this.parsingContext.getAnnotationsBufferSafe(e-1);for(const e of o)t.push(e);delete this.parsingContext.annotationsBuffer[e]}}async validateKey(e,t,r){for(const n of T.ENTRY_HANDLERS)if(await n.validate(this.parsingContext,this.util,e,t,r))return{valid:!0,property:r||n.isPropertyHandler()};return{valid:!1,property:!1}}attachJsonParserListeners(){this.jsonParser.onValue=e=>{const t=this.jsonParser.stack.length,r=new Array(t+1).fill(0).map(((e,r)=>r===t?this.jsonParser.key:this.jsonParser.stack[r].key));if(!this.isParsingContextInner(t)){const n=()=>this.newOnValueJob(r,e,t,!0);if(this.parsingContext.streamingProfile||this.parsingContext.contextTree.getContext(r.slice(0,-1)))this.lastOnValueJob=this.lastOnValueJob.then(n);else if("@context"===r[t]){let e=this.contextJobs[t];e||(e=this.contextJobs[t]=[]),e.push(n)}else this.contextAwaitingJobs.push({job:n,keys:r,depth:t});this.parsingContext.streamingProfile||0!==t||(this.lastOnValueJob=this.lastOnValueJob.then((()=>this.executeBufferedJobs())))}},this.jsonParser.onError=e=>{this.emit("error",e)}}isParsingContextInner(e){for(let t=e;t>0;t--)if("@context"===this.jsonParser.stack[t-1].key)return!0;return!1}async executeBufferedJobs(){for(const e of this.contextJobs)if(e)for(const t of e)await t();this.parsingContext.unaliasedKeywordCacheStack.splice(0);const e=[];for(const t of this.contextAwaitingJobs)"@type"===await this.util.unaliasKeyword(t.keys[t.depth],t.keys,t.depth,!0)||"number"==typeof t.keys[t.depth]&&"@type"===await this.util.unaliasKeyword(t.keys[t.depth-1],t.keys,t.depth-1,!0)?this.typeJobs.push({job:t.job,keys:t.keys.slice(0,t.keys.length-1)}):e.push(t);for(const t of e){if(this.typeJobs.length>0){const e=[],r=[];for(let n=0;ne.keys.length-t.keys.length));for(const e of n)await e.job();const i=r.sort().reverse();for(const e of i)this.typeJobs.splice(e,1)}await t.job()}}}T.DEFAULT_PROCESSING_MODE="1.1",T.ENTRY_HANDLERS=[new o.EntryHandlerArrayValue,new l.EntryHandlerKeywordContext,new p.EntryHandlerKeywordId,new h.EntryHandlerKeywordIncluded,new d.EntryHandlerKeywordGraph,new f.EntryHandlerKeywordNest,new y.EntryHandlerKeywordType,new m.EntryHandlerKeywordValue,new w.EntryHandlerKeywordAnnotation,new s.EntryHandlerContainer,new g.EntryHandlerKeywordUnknownFallback,new u.EntryHandlerPredicate,new c.EntryHandlerInvalidFallback],t.JsonLdParser=T},24292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParsingContext=void 0;const n=r(27202),i=r(40905),a=r(46240),o=r(90114);class s{constructor(e){this.contextParser=new n.ContextParser({documentLoader:e.documentLoader,skipValidation:e.skipContextValidation}),this.streamingProfile=!!e.streamingProfile,this.baseIRI=e.baseIRI,this.produceGeneralizedRdf=!!e.produceGeneralizedRdf,this.allowSubjectList=!!e.allowSubjectList,this.processingMode=e.processingMode||o.JsonLdParser.DEFAULT_PROCESSING_MODE,this.strictValues=!!e.strictValues,this.validateValueIndexes=!!e.validateValueIndexes,this.defaultGraph=e.defaultGraph,this.rdfDirection=e.rdfDirection,this.normalizeLanguageTags=e.normalizeLanguageTags,this.streamingProfileAllowOutOfOrderPlainType=e.streamingProfileAllowOutOfOrderPlainType,this.rdfstar=!1!==e.rdfstar,this.rdfstarReverseInEmbedded=e.rdfstarReverseInEmbedded,this.topLevelProperties=!1,this.activeProcessingMode=parseFloat(this.processingMode),this.processingStack=[],this.processingType=[],this.emittedStack=[],this.idStack=[],this.graphStack=[],this.graphContainerTermStack=[],this.listPointerStack=[],this.contextTree=new a.ContextTree,this.literalStack=[],this.validationStack=[],this.unaliasedKeywordCacheStack=[],this.jsonLiteralStack=[],this.unidentifiedValuesBuffer=[],this.unidentifiedGraphsBuffer=[],this.annotationsBuffer=[],this.pendingContainerFlushBuffers=[],this.parser=e.parser,e.context?(this.rootContext=this.parseContext(e.context),this.rootContext.then((e=>this.validateContext(e)))):this.rootContext=Promise.resolve(new n.JsonLdContextNormalized(this.baseIRI?{"@base":this.baseIRI,"@__baseDocument":!0}:{}))}async parseContext(e,t,r){return this.contextParser.parse(e,{baseIRI:this.baseIRI,ignoreProtection:r,normalizeLanguageTags:this.normalizeLanguageTags,parentContext:t,processingMode:this.activeProcessingMode})}validateContext(e){const t=e.getContextRaw()["@version"];if(t){if(this.activeProcessingMode&&t>this.activeProcessingMode)throw new i.ErrorCoded(`Unsupported JSON-LD version '${t}' under active processing mode ${this.activeProcessingMode}.`,i.ERROR_CODES.PROCESSING_MODE_CONFLICT);if(this.activeProcessingMode&&t0&&!1===i.context.getContextRaw()["@propagate"]&&i.depth!==t&&!r);return 0===i.depth&&!1===i.context.getContextRaw()["@propagate"]&&i.depth!==t&&(i.context=new n.JsonLdContextNormalized({})),i}async newOnValueJob(e,t,r,n){await this.parser.newOnValueJob(e,t,r,n)}async handlePendingContainerFlushBuffers(){if(this.pendingContainerFlushBuffers.length>0){for(const e of this.pendingContainerFlushBuffers)await this.parser.flushBuffer(e.depth,e.keys),this.parser.flushStacks(e.depth);return this.pendingContainerFlushBuffers.splice(0,this.pendingContainerFlushBuffers.length),!0}return!1}emitQuad(e,t){1===e&&(this.topLevelProperties=!0),this.parser.push(t)}emitError(e){this.parser.emit("error",e)}emitContext(e){this.parser.emit("context",e)}getUnidentifiedValueBufferSafe(e){let t=this.unidentifiedValuesBuffer[e];return t||(t=[],this.unidentifiedValuesBuffer[e]=t),t}getUnidentifiedGraphBufferSafe(e){let t=this.unidentifiedGraphsBuffer[e];return t||(t=[],this.unidentifiedGraphsBuffer[e]=t),t}getAnnotationsBufferSafe(e){let t=this.annotationsBuffer[e];return t||(t=[],this.annotationsBuffer[e]=t),t}getExpandOptions(){return s.EXPAND_OPTIONS[this.activeProcessingMode]}shiftStack(e,t){const r=this.idStack[e+t];if(r&&(this.idStack[e]=r,this.emittedStack[e]=!0,delete this.idStack[e+t]),this.pendingContainerFlushBuffers.length)for(const r of this.pendingContainerFlushBuffers)r.depth>=e+t&&(r.depth-=t,r.keys.splice(e,t));this.unidentifiedValuesBuffer[e+t]&&(this.unidentifiedValuesBuffer[e]=this.unidentifiedValuesBuffer[e+t],delete this.unidentifiedValuesBuffer[e+t]),this.annotationsBuffer[e+t-1]&&(this.annotationsBuffer[e-1]||(this.annotationsBuffer[e-1]=[]),this.annotationsBuffer[e-1]=[...this.annotationsBuffer[e-1],...this.annotationsBuffer[e+t-1]],delete this.annotationsBuffer[e+t-1])}}s.EXPAND_OPTIONS={1:{allowPrefixForcing:!1,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!1},1.1:{allowPrefixForcing:!0,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!0}},t.ParsingContext=s},22135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(27202),i=r(18050),a=r(45947),o=r(33619);class s{constructor(e){this.parsingContext=e.parsingContext,this.dataFactory=e.dataFactory||new i.DataFactory,this.rdfFirst=this.dataFactory.namedNode(s.RDF+"first"),this.rdfRest=this.dataFactory.namedNode(s.RDF+"rest"),this.rdfNil=this.dataFactory.namedNode(s.RDF+"nil"),this.rdfType=this.dataFactory.namedNode(s.RDF+"type"),this.rdfJson=this.dataFactory.namedNode(s.RDF+"JSON")}static getContextValue(e,t,r,n){const i=e.getContextRaw()[r];if(!i)return n;const a=i[t];return void 0===a?n:a}static getContextValueContainer(e,t){return s.getContextValue(e,"@container",t,{"@set":!0})}static getContextValueType(e,t){const r=s.getContextValue(e,"@type",t,null);return"@none"===r?null:r}static getContextValueLanguage(e,t){return s.getContextValue(e,"@language",t,e.getContextRaw()["@language"]||null)}static getContextValueDirection(e,t){return s.getContextValue(e,"@direction",t,e.getContextRaw()["@direction"]||null)}static isContextValueReverse(e,t){return!!s.getContextValue(e,"@reverse",t,null)}static getContextValueIndex(e,t){return s.getContextValue(e,"@index",t,e.getContextRaw()["@index"]||null)}static isPropertyReverse(e,t,r){return"@reverse"===r!==s.isContextValueReverse(e,t)}static isPropertyInEmbeddedNode(e){return"@id"===e}static isPropertyInAnnotationObject(e){return"@annotation"===e}static isValidIri(e){return null!==e&&n.Util.isValidIri(e)}static isPrefixArray(e,t){if(e.length>t.length)return!1;for(let r=0;r1)throw new n.ErrorCoded(`Found illegal neighbouring entries next to @set for key: '${t}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);return[]}if("@list"in r){if(Object.keys(r).length>1)throw new n.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${t}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);const e=r["@list"];return Array.isArray(e)?0===e.length?[this.rdfNil]:this.parsingContext.idStack[i+1]||[]:await this.valueToTerm(await this.parsingContext.getContext(a),t,e,i-1,a.slice(0,-1))}if("@reverse"in r&&"boolean"==typeof r["@reverse"])return[];if("@graph"in s.getContextValueContainer(await this.parsingContext.getContext(a),t)){const e=this.parsingContext.graphContainerTermStack[i+1];return e?Object.values(e):[this.dataFactory.blankNode()]}if("@id"in r){if(Object.keys(r).length>1&&(e=await this.parsingContext.getContext(a,0)),"@context"in r&&(e=await this.parsingContext.parseContext(r["@context"],e.getContextRaw())),"@vocab"===r["@type"])return this.nullableTermToArray(this.createVocabOrBaseTerm(e,r["@id"]));{const t=r["@id"];let a;if("object"==typeof t){if(!this.parsingContext.rdfstar)throw new n.ErrorCoded(`Found illegal @id '${r}'`,n.ERROR_CODES.INVALID_ID_VALUE);a=this.parsingContext.idStack[i+1][0]}else a=this.resourceToTerm(e,t);return this.nullableTermToArray(a)}}return this.parsingContext.emittedStack[i+1]||r&&"object"==typeof r&&0===Object.keys(r).length?this.parsingContext.idStack[i+1]||(this.parsingContext.idStack[i+1]=[this.dataFactory.blankNode()]):[];case"string":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(e,t),t,r,null));case"boolean":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(e,t),t,Boolean(r).toString(),this.dataFactory.namedNode(s.XSD_BOOLEAN)));case"number":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(e,t),t,r,this.dataFactory.namedNode(r%1==0&&r<1e21?s.XSD_INTEGER:s.XSD_DOUBLE)));default:return this.parsingContext.emitError(new Error(`Could not determine the RDF type of a ${o}`)),[]}}async getContextSelfOrPropertyScoped(e,t){const r=e.getContextRaw()[t];return r&&"object"==typeof r&&"@context"in r&&(e=await this.parsingContext.parseContext(r,e.getContextRaw(),!0)),e}nullableTermToArray(e){return e?[e]:[]}predicateToTerm(e,t){const r=e.expandTerm(t,!0,this.parsingContext.getExpandOptions());return r?"_"===r[0]&&":"===r[1]?this.parsingContext.produceGeneralizedRdf?this.dataFactory.blankNode(r.substr(2)):null:s.isValidIri(r)?this.dataFactory.namedNode(r):r&&this.parsingContext.strictValues?(this.parsingContext.emitError(new n.ErrorCoded(`Invalid predicate IRI: ${r}`,n.ERROR_CODES.INVALID_IRI_MAPPING)),null):null:null}resourceToTerm(e,t){if(t.startsWith("_:"))return this.dataFactory.blankNode(t.substr(2));const r=e.expandTerm(t,!1,this.parsingContext.getExpandOptions());if(!s.isValidIri(r)){if(!r||!this.parsingContext.strictValues)return null;this.parsingContext.emitError(new Error(`Invalid resource IRI: ${r}`))}return this.dataFactory.namedNode(r)}createVocabOrBaseTerm(e,t){if(t.startsWith("_:"))return this.dataFactory.blankNode(t.substr(2));const r=this.parsingContext.getExpandOptions();let n=e.expandTerm(t,!0,r);if(n===t&&(n=e.expandTerm(t,!1,r)),!s.isValidIri(n)){if(!n||!this.parsingContext.strictValues||n.startsWith("@"))return null;this.parsingContext.emitError(new Error(`Invalid term IRI: ${n}`))}return this.dataFactory.namedNode(n)}intToString(e,t){return"number"==typeof e?Number.isFinite(e)?e%1!=0||t&&t.value===s.XSD_DOUBLE?e.toExponential(15).replace(/(\d)0*e\+?/,"$1E"):Number(e).toString():e>0?"INF":"-INF":e}stringValueToTerm(e,t,r,n,i){const a=s.getContextValueType(t,r);if(a)if("@id"===a){if(!i)return this.resourceToTerm(t,this.intToString(n,i))}else if("@vocab"===a){if(!i)return this.createVocabOrBaseTerm(t,this.intToString(n,i))}else i=this.dataFactory.namedNode(a);if(!i){const a=s.getContextValueLanguage(t,r),o=s.getContextValueDirection(t,r);return o&&this.parsingContext.rdfDirection?this.createLanguageDirectionLiteral(e,this.intToString(n,i),a,o):this.dataFactory.literal(this.intToString(n,i),a)}return this.dataFactory.literal(this.intToString(n,i),i)}createLanguageDirectionLiteral(e,t,r,n){if("i18n-datatype"===this.parsingContext.rdfDirection)return r||(r=""),this.dataFactory.literal(t,this.dataFactory.namedNode(`https://www.w3.org/ns/i18n#${r}_${n}`));{const i=this.dataFactory.blankNode(),a=this.getDefaultGraph();return this.parsingContext.emitQuad(e,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"value"),this.dataFactory.literal(t),a)),r&&this.parsingContext.emitQuad(e,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"language"),this.dataFactory.literal(r),a)),this.parsingContext.emitQuad(e,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"direction"),this.dataFactory.literal(n),a)),i}}valueToJsonString(e){return o(e)}async unaliasKeyword(e,t,r,i,a){if(Number.isInteger(e))return e;if(!i){const e=this.parsingContext.unaliasedKeywordCacheStack[r];if(e)return e}if(!n.Util.isPotentialKeyword(e)){let r=(a=a||await this.parsingContext.getContext(t)).getContextRaw()[e];r&&"object"==typeof r&&(r=r["@id"]),n.Util.isValidKeyword(r)&&(e=r)}return i?e:this.parsingContext.unaliasedKeywordCacheStack[r]=e}async unaliasKeywordParent(e,t){return await this.unaliasKeyword(t>0&&e[t-1],e,t-1)}async unaliasKeywords(e,t,r,n){const i={};for(const a in e)i[await this.unaliasKeyword(a,t,r+1,!0,n)]=e[a];return i}async isLiteral(e,t){for(let r=t;r>=0;r--){if("@annotation"===await this.unaliasKeyword(e[r],e,r))return!1;if(this.parsingContext.literalStack[r]||this.parsingContext.jsonLiteralStack[r])return!0}return!1}async getDepthOffsetGraph(e,t){for(let r=e-1;r>0;r--)if("@graph"===await this.unaliasKeyword(t[r],t,r)){const n=(await a.EntryHandlerContainer.getContainerHandler(this.parsingContext,t,r)).containers;return a.EntryHandlerContainer.isComplexGraphContainer(n)?-1:e-r-1}return-1}validateReverseSubject(e){if("Literal"===e.termType)throw new n.ErrorCoded(`Found illegal literal in subject position: ${e.value}`,n.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}getDefaultGraph(){return this.parsingContext.defaultGraph||this.dataFactory.defaultGraph()}async getGraphContainerValue(e,t){let r=this.getDefaultGraph();const{containers:n,depth:i}=await a.EntryHandlerContainer.getContainerHandler(this.parsingContext,e,t);if("@graph"in n){const t=a.EntryHandlerContainer.getContainerGraphIndex(n,i,e),o=this.parsingContext.graphContainerTermStack[i];if(r=o?o[t]:null,!r){let a=null;if("@id"in n){const t=await this.getContainerKey(e[i],e,i);null!==t&&(a=await this.resourceToTerm(await this.parsingContext.getContext(e),t))}a||(a=this.dataFactory.blankNode()),this.parsingContext.graphContainerTermStack[i]||(this.parsingContext.graphContainerTermStack[i]={}),r=this.parsingContext.graphContainerTermStack[i][t]=a}}return r}async getPropertiesDepth(e,t){let r=t;for(let n=t-1;n>0;n--)if("number"!=typeof e[n]){const t=await this.unaliasKeyword(e[n],e,n);if("@reverse"===t)return n;if("@nest"!==t)return r;r=n}return r}async getContainerKey(e,t,r){const n=await this.unaliasKeyword(e,t,r);return"@none"===n?null:n}validateReverseInEmbeddedNode(e,t,r){if(r&&t&&!this.parsingContext.rdfstarReverseInEmbedded)throw new n.ErrorCoded(`Illegal reverse property in embedded node in ${e}`,n.ERROR_CODES.INVALID_EMBEDDED_NODE)}emitQuadChecked(e,t,r,i,a,o,s){let c;if(o?(this.validateReverseSubject(i),c=this.dataFactory.quad(i,r,t,a)):c=this.dataFactory.quad(t,r,i,a),s){if("DefaultGraph"!==c.graph.termType&&(c=this.dataFactory.quad(c.subject,c.predicate,c.object)),this.parsingContext.idStack[e-1])throw new n.ErrorCoded("Illegal multiple properties in an embedded node",n.ERROR_CODES.INVALID_EMBEDDED_NODE);this.parsingContext.idStack[e-1]=[c]}else this.parsingContext.emitQuad(e,c);const u=this.parsingContext.annotationsBuffer[e];if(u){for(const t of u)this.emitAnnotation(e,c,t);delete this.parsingContext.annotationsBuffer[e]}}emitAnnotation(e,t,r){let n;r.reverse?(this.validateReverseSubject(r.object),n=this.dataFactory.quad(r.object,r.predicate,t)):n=this.dataFactory.quad(t,r.predicate,r.object),this.parsingContext.emitQuad(e,n);for(const t of r.nestedAnnotations)this.emitAnnotation(e,n,t)}}s.XSD="http://www.w3.org/2001/XMLSchema#",s.XSD_BOOLEAN=s.XSD+"boolean",s.XSD_INTEGER=s.XSD+"integer",s.XSD_DOUBLE=s.XSD+"double",s.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",t.Util=s},14079:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerIdentifier=void 0,t.ContainerHandlerIdentifier=class{canCombineWithGraph(){return!0}async handle(e,t,r,n,i,a){let o;if(t.emittedStack[a+1]&&t.idStack[a+1])o=t.idStack[a+1][0];else{const e=null!==await r.getContainerKey(n[a],n,a)?await r.resourceToTerm(await t.getContext(n),n[a]):r.dataFactory.blankNode();if(!e)return void(t.emittedStack[a]=!1);o=e,t.idStack[a+1]=[o]}let s=t.idStack[a];s||(s=t.idStack[a]=[]),s.some((e=>e.equals(o)))||s.push(o),await t.handlePendingContainerFlushBuffers()||(t.emittedStack[a]=!1)}}},43354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerIndex=void 0;const n=r(27202),i=r(29997),a=r(22135);t.ContainerHandlerIndex=class{canCombineWithGraph(){return!0}async handle(e,t,r,o,s,c){if(!Array.isArray(s)){const u="@graph"in e,l=await t.getContext(o),d=o[c-1],p=a.Util.getContextValueIndex(l,d);if(p){if(n.Util.isPotentialKeyword(p))throw new n.ErrorCoded(`Keywords can not be used as @index value, got: ${p}`,n.ERROR_CODES.INVALID_TERM_DEFINITION);if("string"!=typeof p)throw new n.ErrorCoded(`@index values must be strings, got: ${p}`,n.ERROR_CODES.INVALID_TERM_DEFINITION);if("object"!=typeof s){if("@id"!==a.Util.getContextValueType(l,d))throw new n.ErrorCoded(`Property-based index containers require nodes as values or strings with @type: @id, but got: ${s}`,n.ERROR_CODES.INVALID_VALUE_OBJECT);const e=r.resourceToTerm(l,s);e&&(t.idStack[c+1]=[e])}const e=r.createVocabOrBaseTerm(l,p);if(e){const n=await r.valueToTerm(l,p,await r.getContainerKey(o[c],o,c),c,o);if(u){const i=await r.getGraphContainerValue(o,c+1);for(const a of n)t.emitQuad(c,r.dataFactory.quad(i,e,a,r.getDefaultGraph()))}else for(const a of n)await i.EntryHandlerPredicate.handlePredicateObject(t,r,o,c+1,e,a,!1,!1,!1)}}const h=u?2:1;await t.newOnValueJob(o.slice(0,o.length-h),s,c-h,!0),await t.handlePendingContainerFlushBuffers()}t.emittedStack[c]=!1}}},68526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerLanguage=void 0;const n=r(27202);t.ContainerHandlerLanguage=class{canCombineWithGraph(){return!1}async handle(e,t,r,i,a,o){const s=await r.getContainerKey(i[o],i,o);if(Array.isArray(a))a=a.map((e=>({"@value":e,"@language":s})));else{if("string"!=typeof a)throw new n.ErrorCoded(`Got invalid language map value, got '${JSON.stringify(a)}', but expected string`,n.ERROR_CODES.INVALID_LANGUAGE_MAP_VALUE);a={"@value":a,"@language":s}}await t.newOnValueJob(i.slice(0,i.length-1),a,o-1,!0),t.emittedStack[o]=!1}}},84936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerType=void 0;const n=r(29997),i=r(22135);t.ContainerHandlerType=class{canCombineWithGraph(){return!1}async handle(e,t,r,a,o,s){if(!Array.isArray(o)){if("string"==typeof o){const e=await t.getContext(a),n="@vocab"===i.Util.getContextValueType(e,a[s-1])?await r.createVocabOrBaseTerm(e,o):await r.resourceToTerm(e,o);if(n){const e={"@id":"NamedNode"===n.termType?n.value:o};await t.newOnValueJob(a.slice(0,a.length-1),e,s-1,!0),t.idStack[s+1]=[n]}}else{const e=!!t.idStack[s+1];e||delete t.idStack[s],await t.newOnValueJob(a.slice(0,a.length-1),o,s-1,!0),e||(t.idStack[s+1]=t.idStack[s])}const e=await r.getContainerKey(a[s],a,s),c=null!==e?r.createVocabOrBaseTerm(await t.getContext(a),e):null;c&&await n.EntryHandlerPredicate.handlePredicateObject(t,r,a,s+1,r.rdfType,c,!1,!1,!1),await t.handlePendingContainerFlushBuffers()}t.emittedStack[s]=!1}}},11272:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerArrayValue=void 0;const n=r(22135),i=r(27202);t.EntryHandlerArrayValue=class{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return this.test(e,t,null,r,n)}async test(e,t,r,n,i){return"number"==typeof n[i]}async handle(e,t,r,i,a,o){let s=await t.unaliasKeywordParent(i,o);if("@list"===s){let r=null,n=0;for(let e=o-2;e>0;e--){const t=i[e];if("string"==typeof t||"number"==typeof t){n=e,r=t;break}}if(null!==r){const s=await t.valueToTerm(await e.getContext(i),r,a,o,i);for(const r of s)await this.handleListElement(e,t,r,a,o,i.slice(0,n),n);0===s.length&&await this.handleListElement(e,t,null,a,o,i.slice(0,n),n)}}else if("@set"===s)await e.newOnValueJob(i.slice(0,-2),a,o-2,!1);else if(void 0!==s&&"@type"!==s){for(let e=o-1;e>0;e--)if("number"!=typeof i[e]){s=await t.unaliasKeyword(i[e],i,e);break}const r=await e.getContext(i.slice(0,-1));if("@list"in n.Util.getContextValueContainer(r,s)){e.emittedStack[o+1]=!0;const r=await t.valueToTerm(await e.getContext(i),s,a,o,i);for(const n of r)await this.handleListElement(e,t,n,a,o,i.slice(0,-1),o-1);0===r.length&&await this.handleListElement(e,t,null,a,o,i.slice(0,-1),o-1)}else e.shiftStack(o,1),await e.newOnValueJob(i.slice(0,-1),a,o-1,!1),e.contextTree.removeContext(i.slice(0,-1))}}async handleListElement(e,t,r,n,a,o,s){let c=e.listPointerStack[a];if(null!==n&&null!==(await t.unaliasKeywords(n,o,a))["@value"]){if(c&&c.value){const r=t.dataFactory.blankNode();e.emitQuad(a,t.dataFactory.quad(c.value,t.rdfRest,r,t.getDefaultGraph())),c.value=r}else{const e=t.dataFactory.blankNode();c={value:e,listRootDepth:s,listId:e}}r&&e.emitQuad(a,t.dataFactory.quad(c.value,t.rdfFirst,r,t.getDefaultGraph()))}else c||(c={listRootDepth:s,listId:t.rdfNil});e.listPointerStack[a]=c,e.rdfstar&&e.annotationsBuffer[a]&&e.emitError(new i.ErrorCoded("Found an illegal annotation inside a list",i.ERROR_CODES.INVALID_ANNOTATION))}}},45947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerContainer=void 0;const n=r(14079),i=r(43354),a=r(68526),o=r(84936),s=r(22135);class c{static isSimpleGraphContainer(e){return"@graph"in e&&("@set"in e&&2===Object.keys(e).length||1===Object.keys(e).length)}static isComplexGraphContainer(e){return"@graph"in e&&("@set"in e&&Object.keys(e).length>2||!("@set"in e)&&Object.keys(e).length>1)}static getContainerGraphIndex(e,t,r){let n=c.isSimpleGraphContainer(e),i="";for(let e=t;e=0;e--)if("number"!=typeof t[e]){const r=s.Util.getContextValue(a,"@container",t[e],!1);if(r&&c.isSimpleGraphContainer(r))return{containers:r,depth:e+1,fallback:!1};const o=s.Util.getContextValue(a,"@container",t[e-1],!1);if(o){const t="@graph"in o;for(const r in c.CONTAINER_HANDLERS)if(o[r])return t?c.CONTAINER_HANDLERS[r].canCombineWithGraph()?{containers:o,depth:e,fallback:!1}:n:i?n:{containers:o,depth:e,fallback:!1};return n}if(i)return n;i=!0}return n}static async isBufferableContainerHandler(e,t,r){const n=await c.getContainerHandler(e,t,r);return!n.fallback&&!("@graph"in n.containers)}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return!!await this.test(e,t,null,r,n)}async test(e,t,r,n,i){const a=s.Util.getContextValueContainer(await e.getContext(n,2),n[i-1]);for(const e in c.CONTAINER_HANDLERS)if(a[e])return{containers:a,handler:c.CONTAINER_HANDLERS[e]};return null}async handle(e,t,r,n,i,a,o){return o.handler.handle(o.containers,e,t,n,i,a)}}c.CONTAINER_HANDLERS={"@id":new n.ContainerHandlerIdentifier,"@index":new i.ContainerHandlerIndex,"@language":new a.ContainerHandlerLanguage,"@type":new o.ContainerHandlerType},t.EntryHandlerContainer=c},62885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerInvalidFallback=void 0,t.EntryHandlerInvalidFallback=class{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return!1}async test(e,t,r,n,i){return!0}async handle(e,t,r,n,i,a){e.emittedStack[a]=!1}}},29997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerPredicate=void 0;const n=r(27202),i=r(22135);class a{static async handlePredicateObject(e,t,r,i,a,o,s,c,u){const l=await t.getPropertiesDepth(r,i),d=await t.getDepthOffsetGraph(i,r),p=i-d,h=e.idStack[l];if(h&&!u)for(const n of h)if(d>=0){const r=e.idStack[p-1];if(r)for(const e of r)t.emitQuadChecked(i,n,a,o,e,s,c);else s?(t.validateReverseSubject(o),e.getUnidentifiedGraphBufferSafe(p-1).push({subject:o,predicate:a,object:n,isEmbedded:c})):e.getUnidentifiedGraphBufferSafe(p-1).push({subject:n,predicate:a,object:o,isEmbedded:c})}else{const e=await t.getGraphContainerValue(r,l);t.emitQuadChecked(i,n,a,o,e,s,c)}else if(s&&t.validateReverseSubject(o),u){if(e.rdfstar){e.idStack[i]&&e.emitError(new n.ErrorCoded(`Found an illegal @id inside an annotation: ${e.idStack[i][0].value}`,n.ERROR_CODES.INVALID_ANNOTATION));for(let a=0;a=0;e--){const t=c[e];t.depth>l&&(u.nestedAnnotations.push(t),c.splice(e,1))}}}else e.getUnidentifiedValueBufferSafe(l).push({predicate:a,object:o,reverse:s,isEmbedded:c})}isPropertyHandler(){return!0}isStackProcessor(){return!0}async validate(e,t,r,n,a){const o=r[n];if(o){const a=await e.getContext(r);if(!e.jsonLiteralStack[n]&&await t.predicateToTerm(a,r[n]))return"@json"===i.Util.getContextValueType(a,o)&&(e.jsonLiteralStack[n+1]=!0),!0}return!1}async test(e,t,r,n,i){return n[i]}async handle(e,t,r,o,s,c,u){const l=o[c],d=await e.getContext(o),p=await t.predicateToTerm(d,r);if(p){const u=await t.valueToTerm(d,r,s,c,o);if(u.length)for(let h of u){let u=await t.unaliasKeywordParent(o,c);const f=i.Util.isPropertyReverse(d,l,u);let y=0;for(;"@reverse"===u||"number"==typeof u;)"number"==typeof u?y++:c--,u=await t.unaliasKeywordParent(o,c-y);const g=i.Util.isPropertyInEmbeddedNode(u);t.validateReverseInEmbeddedNode(r,f,g);const m=i.Util.isPropertyInAnnotationObject(u);if(s){const a="@list"in i.Util.getContextValueContainer(d,r);if(a||s["@list"]){if((a&&!Array.isArray(s)&&!s["@list"]||s["@list"]&&!Array.isArray(s["@list"]))&&h!==t.rdfNil){const r=t.dataFactory.blankNode();e.emitQuad(c,t.dataFactory.quad(r,t.rdfRest,t.rdfNil,t.getDefaultGraph())),e.emitQuad(c,t.dataFactory.quad(r,t.rdfFirst,h,t.getDefaultGraph())),h=r}if(f&&!e.allowSubjectList)throw new n.ErrorCoded(`Found illegal list value in subject position at ${r}`,n.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}}await a.handlePredicateObject(e,t,o,c,p,h,f,g,m)}}}}t.EntryHandlerPredicate=a},49203:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeyword=void 0,t.EntryHandlerKeyword=class{constructor(e){this.keyword=e}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return!1}async test(e,t,r,n,i){return r===this.keyword}}},6042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordAnnotation=void 0;const n=r(49203),i=r(27202);class a extends n.EntryHandlerKeyword{constructor(){super("@annotation")}async handle(e,t,r,n,a,o){("string"==typeof a||"object"==typeof a&&a["@value"])&&e.emitError(new i.ErrorCoded(`Found illegal annotation value: ${JSON.stringify(a)}`,i.ERROR_CODES.INVALID_ANNOTATION))}}t.EntryHandlerKeywordAnnotation=a},66700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordContext=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@context")}isStackProcessor(){return!1}async handle(e,t,r,i,a,o){e.streamingProfile&&(e.processingStack[o]||e.processingType[o]||void 0!==e.idStack[o])&&e.emitError(new n.ErrorCoded("Found an out-of-order context, while streaming is enabled.(disable `streamingProfile`)",n.ERROR_CODES.INVALID_STREAMING_KEY_ORDER));const s=e.getContext(i),c=e.parseContext(a,(await s).getContextRaw());e.contextTree.setContext(i.slice(0,-1),c),e.emitContext(a),await e.validateContext(await c)}}t.EntryHandlerKeywordContext=a},37071:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordGraph=void 0;const n=r(49203);class i extends n.EntryHandlerKeyword{constructor(){super("@graph")}async handle(e,t,r,n,i,a){e.graphStack[a+1]=!0}}t.EntryHandlerKeywordGraph=i},48978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordId=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@id")}isStackProcessor(){return!1}async handle(e,t,r,i,a,o){if("string"!=typeof a){if(e.rdfstar&&"object"==typeof a){const t=Object.keys(a);1===t.length&&"@id"===t[0]&&e.emitError(new n.ErrorCoded(`Invalid embedded node without property with @id ${a["@id"]}`,n.ERROR_CODES.INVALID_EMBEDDED_NODE))}else e.emitError(new n.ErrorCoded(`Found illegal @id '${a}'`,n.ERROR_CODES.INVALID_ID_VALUE));return}const s=await t.getPropertiesDepth(i,o);if(void 0!==e.idStack[s]&&(e.idStack[s][0].listHead?e.emitError(new n.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${i[o-1]}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT)):e.emitError(new n.ErrorCoded(`Found duplicate @ids '${e.idStack[s][0].value}' and '${a}'`,n.ERROR_CODES.COLLIDING_KEYWORDS))),e.rdfstar&&e.annotationsBuffer[o])for(const t of e.annotationsBuffer[o])t.depth===o&&e.emitError(new n.ErrorCoded(`Found an illegal @id inside an annotation: ${a}`,n.ERROR_CODES.INVALID_ANNOTATION));e.idStack[s]=t.nullableTermToArray(await t.resourceToTerm(await e.getContext(i),a))}}t.EntryHandlerKeywordId=a},30643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordIncluded=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@included")}async handle(e,t,r,i,a,o){"object"!=typeof a&&e.emitError(new n.ErrorCoded(`Found illegal @included '${a}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE));const s=await t.unaliasKeywords(a,i,o,await e.getContext(i));"@value"in s&&e.emitError(new n.ErrorCoded(`Found an illegal @included @value node '${JSON.stringify(a)}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE)),"@list"in s&&e.emitError(new n.ErrorCoded(`Found an illegal @included @list node '${JSON.stringify(a)}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE)),e.emittedStack[o]=!1}}t.EntryHandlerKeywordIncluded=a},58865:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordNest=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@nest")}async handle(e,t,r,i,a,o){"object"!=typeof a&&e.emitError(new n.ErrorCoded(`Found invalid @nest entry for '${r}': '${a}'`,n.ERROR_CODES.INVALID_NEST_VALUE)),"@value"in await t.unaliasKeywords(a,i,o,await e.getContext(i))&&e.emitError(new n.ErrorCoded(`Found an invalid @value node for '${r}'`,n.ERROR_CODES.INVALID_NEST_VALUE)),e.emittedStack[o]=!1}}t.EntryHandlerKeywordNest=a},23787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordType=void 0;const n=r(27202),i=r(22135),a=r(29997),o=r(49203);class s extends o.EntryHandlerKeyword{constructor(){super("@type")}isStackProcessor(){return!1}async handle(e,t,r,o,s,c){const u=o[c],l=await e.getContext(o),d=t.rdfType,p=await t.unaliasKeywordParent(o,c),h=i.Util.isPropertyReverse(l,u,p),f=i.Util.isPropertyInEmbeddedNode(p);t.validateReverseInEmbeddedNode(r,h,f);const y=i.Util.isPropertyInAnnotationObject(p),g=Array.isArray(s)?s:[s];for(const r of g){"string"!=typeof r&&e.emitError(new n.ErrorCoded(`Found illegal @type '${r}'`,n.ERROR_CODES.INVALID_TYPE_VALUE));const i=t.createVocabOrBaseTerm(l,r);i&&await a.EntryHandlerPredicate.handlePredicateObject(e,t,o,c,d,i,h,f,y)}let m=Promise.resolve(l),b=!1;for(const t of g.sort()){const r=i.Util.getContextValue(l,"@context",t,null);r&&(b=!0,m=m.then((t=>e.parseContext(r,t.getContextRaw()))))}!e.streamingProfile||!b&&e.streamingProfileAllowOutOfOrderPlainType||!e.processingStack[c]&&!e.idStack[c]||e.emitError(new n.ErrorCoded("Found an out-of-order type-scoped context, while streaming is enabled.(disable `streamingProfile`)",n.ERROR_CODES.INVALID_STREAMING_KEY_ORDER)),b&&(m=m.then((e=>!0!==e.getContextRaw()["@propagate"]?new n.JsonLdContextNormalized(Object.assign(Object.assign({},e.getContextRaw()),{"@propagate":!1,"@__propagateFallback":l.getContextRaw()})):e)),e.contextTree.setContext(o.slice(0,o.length-1),m)),e.processingType[c]=!0}}t.EntryHandlerKeywordType=s},30635:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordUnknownFallback=void 0;const n=r(27202);class i{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,i,a){const o=await t.unaliasKeyword(r[i],r,i);return!(!n.Util.isPotentialKeyword(o)||!a&&"@list"===o)}async test(e,t,r,i,a){return n.Util.isPotentialKeyword(r)}async handle(e,t,r,a,o,s){const c=i.VALID_KEYWORDS_TYPES[r];void 0!==c?c&&typeof o!==c.type&&e.emitError(new n.ErrorCoded(`Invalid value type for '${r}' with value '${o}'`,c.errorCode)):e.strictValues&&e.emitError(new Error(`Unknown keyword '${r}' with value '${o}'`)),e.emittedStack[s]=!1}}i.VALID_KEYWORDS_TYPES={"@index":{type:"string",errorCode:n.ERROR_CODES.INVALID_INDEX_VALUE},"@list":null,"@reverse":{type:"object",errorCode:n.ERROR_CODES.INVALID_REVERSE_VALUE},"@set":null,"@value":null},t.EntryHandlerKeywordUnknownFallback=i},94382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordValue=void 0;const n=r(49203);class i extends n.EntryHandlerKeyword{constructor(){super("@value")}async validate(e,t,r,n,i){const a=r[n];return a&&!e.literalStack[n]&&await this.test(e,t,a,r,n)&&(e.literalStack[n]=!0),super.validate(e,t,r,n,i)}async test(e,t,r,n,i){return"@value"===await t.unaliasKeyword(n[i],n.slice(0,n.length-1),i-1,!0)}async handle(e,t,r,n,i,a){e.literalStack[a]=!0,delete e.unidentifiedValuesBuffer[a],delete e.unidentifiedGraphsBuffer[a],e.emittedStack[a]=!1}}t.EntryHandlerKeywordValue=i},33619:e=>{"use strict";e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce(((t,r,n)=>t+(0===n?"":",")+e(void 0===r||"symbol"==typeof r?null:r)),"")+"]":"{"+Object.keys(t).sort().reduce(((r,n,i)=>void 0===t[n]||"symbol"==typeof t[n]?r:r+(0===r.length?"":",")+e(n)+":"+e(t[n])),"")+"}"}},85832: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(45920),t),i(r(7814),t)},45920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonLdSerializer=void 0;const n=r(27202),i=r(85071),a=r(7814),o=r(58521);class s extends o.Transform{constructor(e={}){super({objectMode:!0}),this.indentation=0,this.options=e,this.options.baseIRI&&!this.options.context&&(this.options.context={"@base":this.options.baseIRI}),this.options.context?(this.originalContext=this.options.context,this.context=(new n.ContextParser).parse(this.options.context,{baseIRI:this.options.baseIRI})):this.context=Promise.resolve(new n.JsonLdContextNormalized({}))}import(e){const t=new o.PassThrough({objectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new s(this.options));return r}_transform(e,t,r){this.context.then((t=>{this.transformQuad(e,t),r()})).catch(r)}async list(e){const t=await this.context;return{"@list":e.map((e=>a.Util.termToValue(e,t,this.options)))}}_flush(e){return this.opened||this.pushDocumentStart(),this.lastPredicate&&this.endPredicate(),this.lastSubject&&this.endSubject(),this.lastGraph&&"DefaultGraph"!==this.lastGraph.termType&&this.endGraph(),this.endDocument(),e(null,null)}transformQuad(e,t){this.opened||this.pushDocumentStart();const r=this.lastGraph&&"DefaultGraph"!==this.lastGraph.termType&&this.lastGraph.equals(e.subject);if(!(r||this.lastGraph&&e.graph.equals(this.lastGraph))){let r="DefaultGraph"!==e.graph.termType&&this.lastSubject&&this.lastSubject.equals(e.graph);this.lastGraph&&("DefaultGraph"!==this.lastGraph.termType?(this.endPredicate(),this.endSubject(),this.endGraph(!0),r=!1):r?(this.endPredicate(!0),this.lastSubject=null):(this.endPredicate(),this.endSubject(!0))),"DefaultGraph"!==e.graph.termType&&(r||this.pushId(e.graph,!0,t),this.pushSeparator(this.options.space?i.SeparatorType.GRAPH_FIELD_NONCOMPACT:i.SeparatorType.GRAPH_FIELD_COMPACT),this.indentation++),this.lastGraph=e.graph}this.lastSubject&&e.subject.equals(this.lastSubject)||(r?(this.endPredicate(),this.endSubject(),this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END_COMMA),this.lastGraph=e.graph):(this.lastSubject&&(this.endPredicate(),this.endSubject(!0)),this.pushId(e.subject,!0,t)),this.lastSubject=e.subject),this.lastPredicate&&e.predicate.equals(this.lastPredicate)||(this.lastPredicate&&this.endPredicate(!0),this.pushPredicate(e.predicate,t)),this.pushObject(e.object,t)}pushDocumentStart(){this.opened=!0,this.originalContext&&!this.options.excludeContext?(this.pushSeparator(i.SeparatorType.OBJECT_START),this.indentation++,this.pushSeparator(i.SeparatorType.CONTEXT_FIELD),this.pushIndented(JSON.stringify(this.originalContext,null,this.options.space)+","),this.pushSeparator(this.options.space?i.SeparatorType.GRAPH_FIELD_NONCOMPACT:i.SeparatorType.GRAPH_FIELD_COMPACT),this.indentation++):(this.pushSeparator(i.SeparatorType.ARRAY_START),this.indentation++)}pushId(e,t,r){if("Quad"===e.termType)this.pushNestedQuad(e,!0,r);else{const n="BlankNode"===e.termType?"_:"+e.value:r.compactIri(e.value,!1);t?this.pushSeparator(i.SeparatorType.OBJECT_START):(this.push(i.SeparatorType.OBJECT_START.label),this.options.space&&this.push("\n")),this.indentation++,this.pushIndented(this.options.space?`"@id": "${n}",`:`"@id":"${n}",`)}}pushPredicate(e,t){let r=e.value;this.options.useRdfType||r!==a.Util.RDF_TYPE||(r="@type",this.objectOptions=Object.assign(Object.assign({},this.options),{compactIds:!0,vocab:!0}));const n=t.compactIri(r,!0);this.pushIndented(this.options.space?`"${n}": [`:`"${n}":[`),this.indentation++,this.lastPredicate=e}pushObject(e,t){if(this.hadObjectForPredicate?this.pushSeparator(i.SeparatorType.COMMA):this.hadObjectForPredicate=!0,"Quad"===e.termType){const r=this.lastSubject,n=this.lastPredicate;return this.hadObjectForPredicate=!1,this.pushNestedQuad(e,!1,t),this.endSubject(!1),this.hadObjectForPredicate=!0,this.lastPredicate=n,void(this.lastSubject=r)}let r;try{r=e["@list"]?e:a.Util.termToValue(e,t,this.objectOptions||this.options)}catch(e){return this.emit("error",e)}this.pushIndented(JSON.stringify(r,null,this.options.space))}pushNestedQuad(e,t,r){this.pushSeparator(i.SeparatorType.OBJECT_START),this.indentation++,this.pushIndented(this.options.space?'"@id": ':'"@id":',!1),"DefaultGraph"!==e.graph.termType&&this.emit("error",new Error(`Found a nested quad with the non-default graph: ${e.graph.value}`)),this.pushId(e.subject,!1,r),this.pushPredicate(e.predicate,r),this.pushObject(e.object,r),this.endPredicate(!1),this.endSubject(t)}endDocument(){this.opened=!1,this.originalContext&&!this.options.excludeContext?(this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END),this.indentation--,this.pushSeparator(i.SeparatorType.OBJECT_END)):(this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END))}endPredicate(e){this.indentation--,this.pushSeparator(e?i.SeparatorType.ARRAY_END_COMMA:i.SeparatorType.ARRAY_END),this.hadObjectForPredicate=!1,this.objectOptions=null,this.lastPredicate=null}endSubject(e){this.indentation--,this.pushSeparator(e?i.SeparatorType.OBJECT_END_COMMA:i.SeparatorType.OBJECT_END),this.lastSubject=null}endGraph(e){this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END),this.indentation--,this.pushSeparator(e?i.SeparatorType.OBJECT_END_COMMA:i.SeparatorType.OBJECT_END),this.lastGraph=null}pushSeparator(e){this.pushIndented(e.label)}pushIndented(e,t=!0){const r=this.getIndentPrefix(),n=e.split("\n").map((e=>r+e)).join("\n");this.push(n),this.options.space&&t&&this.push("\n")}getIndentPrefix(){return this.options.space?this.options.space.repeat(this.indentation):""}}t.JsonLdSerializer=s},85071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeparatorType=void 0;class r{constructor(e){this.label=e}}t.SeparatorType=r,r.COMMA=new r(","),r.OBJECT_START=new r("{"),r.OBJECT_END=new r("}"),r.OBJECT_END_COMMA=new r("},"),r.ARRAY_START=new r("["),r.ARRAY_END=new r("]"),r.ARRAY_END_COMMA=new r("],"),r.GRAPH_FIELD_NONCOMPACT=new r('"@graph": ['),r.GRAPH_FIELD_COMPACT=new r('"@graph":['),r.CONTEXT_FIELD=new r('"@context":')},7814:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(27202);class i{static termToValue(e,t,r={compactIds:!1,useNativeTypes:!1}){switch(e.termType){case"NamedNode":const a=t.compactIri(e.value,r.vocab);return r.compactIds?a:{"@id":a};case"DefaultGraph":return r.compactIds?e.value:{"@id":e.value};case"BlankNode":const o=`_:${e.value}`;return r.compactIds?o:{"@id":o};case"Literal":if(e.datatype.value===i.RDF_JSON){let t;try{t=JSON.parse(e.value)}catch(e){throw new n.ErrorCoded("Invalid JSON literal: "+e.message,n.ERROR_CODES.INVALID_JSON_LITERAL)}return{"@value":t,"@type":"@json"}}if("i18n-datatype"===r.rdfDirection&&e.datatype.value.startsWith(i.I18N)){const[t,r]=e.datatype.value.substr(i.I18N.length,e.datatype.value.length).split("_");return Object.assign(Object.assign({"@value":e.value},t?{"@language":t}:{}),r?{"@direction":r}:{})}const s=e.datatype.value===i.XSD_STRING,c={"@value":!s&&r.useNativeTypes?i.stringToNativeType(e.value,e.datatype.value):e.value};return e.language?Object.assign(Object.assign({},c),{"@language":e.language}):s||"string"!=typeof c["@value"]?c:Object.assign(Object.assign({},c),{"@type":e.datatype.value})}}static stringToNativeType(e,t){if(t.startsWith(i.XSD))switch(t.substr(i.XSD.length)){case"boolean":if("true"===e)return!0;if("false"===e)return!1;throw new Error(`Invalid xsd:boolean value '${e}'`);case"integer":case"number":case"int":case"byte":case"long":const t=parseInt(e,10);if(isNaN(t))throw new Error(`Invalid xsd:integer value '${e}'`);return t;case"float":case"double":const r=parseFloat(e);if(isNaN(r))throw new Error(`Invalid xsd:float value '${e}'`);return r}return e}}t.Util=i,i.XSD="http://www.w3.org/2001/XMLSchema#",i.XSD_STRING=i.XSD+"string",i.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i.RDF_TYPE=i.RDF+"type",i.RDF_JSON=i.RDF+"JSON",i.I18N="https://www.w3.org/ns/i18n#"},5558:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(64295),t),i(r(49999),t),i(r(91094),t),i(r(86625),t),i(r(38303),t),i(r(30573),t),i(r(12104),t),i(r(35573),t),i(r(60179),t),i(r(34260),t)},30573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},12104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},60179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MicrodataRdfParser=void 0;const n=r(15482),i=r(58521),a=r(49999),o=r(91094),s=r(86625),c=r(38303),u=r(34260),l=r(94066);class d extends i.Transform{constructor(e){super({readableObjectMode:!0}),this.itemScopeStack=[],this.textBufferStack=[],this.isEmittingReferences=!1,this.pendingItemRefsDomain={},this.pendingItemRefsRangeFinalized={},this.pendingItemRefsRangeCollecting={},e=e||{},this.options=e,this.util=new u.Util(e.dataFactory,e.baseIRI),this.defaultGraph=e.defaultGraph||this.util.dataFactory.defaultGraph(),this.htmlParseListener=e.htmlParseListener,this.vocabRegistry=e.vocabRegistry||l,this.parser=this.initializeParser(!!e.xmlMode)}import(e){const t=new i.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new d(this.options));return r}_transform(e,t,r){this.parser.write(e.toString()),r()}_flush(e){this.parser.end(),e()}getItemScope(e){let t=this.itemScopeStack.length-(e?2:1);for(;t>0&&!this.itemScopeStack[t];)t--;return this.itemScopeStack[t]}getDepth(){return this.itemScopeStack.length}onTagOpen(e,t){if(!this.isEmittingReferences){if("id"in t){const e=t.id;this.pendingItemRefsRangeCollecting[e]={events:[],counter:0,ids:[]}}for(const r of Object.values(this.pendingItemRefsRangeCollecting))r.counter++,r.events.push({type:"open",name:e,attributes:t})}let r;if(this.textBufferStack.push(void 0),"itemscope"in t){let e;if(this.emittingReferencesItemScopeIdGenerator)e=this.emittingReferencesItemScopeIdGenerator();else{e="itemid"in t&&this.util.createSubject(t.itemid)||this.util.dataFactory.blankNode();for(const t of Object.values(this.pendingItemRefsRangeCollecting))t.ids.push(e)}r={subject:e},this.isEmittingReferences&&(r.blockEmission=!0);const n=this.getItemScope();n&&n.vocab&&(r.vocab=n.vocab),this.itemScopeStack.push(r)}else r=this.getItemScope(),this.itemScopeStack.push(void 0);if(r){if("itemtype"in t)for(const e of this.util.createVocabIris(t.itemtype,r,!1))r.vocab||(r.vocab=this.util.deriveVocab(e.value,this.vocabRegistry)),r.blockEmission||this.emitTriple(r.subject,this.util.dataFactory.namedNode(`${u.Util.RDF}type`),e);if("lang"in t&&(r.language=t.lang),"xml:lang"in t&&(r.language=t["xml:lang"]),"itemscope"in t&&!this.isEmittingReferences&&"itemref"in t)for(const e of t.itemref.split(/\s+/u))e in this.pendingItemRefsDomain||(this.pendingItemRefsDomain[e]=[]),this.pendingItemRefsDomain[e].push(r),this.tryToEmitReferences(e,r)}"itemprop"in t&&this.handleItemProperties(t.itemprop,!1,r,e,t),"itemprop-reverse"in t&&this.handleItemProperties(t["itemprop-reverse"],!0,r,e,t)}onText(e){if(!this.isEmittingReferences)for(const t of Object.values(this.pendingItemRefsRangeCollecting))t.events.push({type:"text",data:e});for(const t of this.textBufferStack)t&&t.push(e)}onTagClose(){if(!this.isEmittingReferences)for(const[e,t]of Object.entries(this.pendingItemRefsRangeCollecting))t.counter--,t.events.push({type:"close"}),0===t.counter&&(this.pendingItemRefsRangeFinalized[e]=t,delete this.pendingItemRefsRangeCollecting[e],this.tryToEmitReferences(e));const e=this.getItemScope(!0);if(e){const t=this.getDepth();if(e.predicates&&t in e.predicates)for(const[r,n]of Object.entries(e.predicates[t])){const i=this.util.createLiteral(this.textBufferStack[t].join(""),e);this.emitPredicateTriples(e,n,i,"reverse"===r),delete e.predicates[t][r]}}this.itemScopeStack.pop(),this.textBufferStack.pop()}onEnd(){}initializeParser(e){return new n.Parser({onclosetag:()=>{try{this.onTagClose(),this.htmlParseListener&&this.htmlParseListener.onTagClose()}catch(e){this.emit("error",e)}},onend:()=>{try{this.onEnd(),this.htmlParseListener&&this.htmlParseListener.onEnd()}catch(e){this.emit("error",e)}},onopentag:(e,t)=>{try{this.onTagOpen(e,t),this.htmlParseListener&&this.htmlParseListener.onTagOpen(e,t)}catch(e){this.emit("error",e)}},ontext:e=>{try{this.onText(e),this.htmlParseListener&&this.htmlParseListener.onText(e)}catch(e){this.emit("error",e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:e})}handleItemProperties(e,t,r,n,i){const a=this.getItemScope(!0);if(a){const o=this.getDepth(),s=this.util.createVocabIris(e,a,!0);a.predicates||(a.predicates={}),a.predicates[o]||(a.predicates[o]={});const c=t?"reverse":"forward";a.predicates[o][c]=s;for(const t of this.util.getVocabularyExpansionType(e,a,this.vocabRegistry))s.push(t);if(r&&"itemscope"in i)this.emitPredicateTriples(a,s,r.subject,t),delete a.predicates[o][c];else for(const e of d.ITEM_PROPERTY_HANDLERS)if(e.canHandle(n,i)){const r=e.getObject(i,this.util,a);this.emitPredicateTriples(a,s,r,t),delete a.predicates[o][c]}a.predicates[o][c]&&(this.textBufferStack[o]=[])}}emitPredicateTriples(e,t,r,n){if(!e.blockEmission)for(const i of t)n?"Literal"!==r.termType&&this.emitTriple(r,i,e.subject):this.emitTriple(e.subject,i,r)}emitTriple(e,t,r){this.push(this.util.dataFactory.quad(e,t,r,this.defaultGraph))}tryToEmitReferences(e,t){const r=this.pendingItemRefsRangeFinalized[e];if(r){let n;if(t){n=[t];const r=this.pendingItemRefsDomain[e].indexOf(t);this.pendingItemRefsDomain[e].splice(r,1)}else n=this.pendingItemRefsDomain[e],delete this.pendingItemRefsDomain[e];if(n){const e=this.itemScopeStack,t=this.textBufferStack;this.isEmittingReferences=!0;for(const e of n){this.itemScopeStack=[e],this.textBufferStack=[void 0];const t=[...r.ids];this.emittingReferencesItemScopeIdGenerator=()=>t.shift();for(const e of r.events)switch(e.type){case"open":this.onTagOpen(e.name,e.attributes);break;case"text":this.onText(e.data);break;case"close":this.onTagClose()}}this.emittingReferencesItemScopeIdGenerator=void 0,this.itemScopeStack=e,this.textBufferStack=t,this.isEmittingReferences=!1}}}}t.MicrodataRdfParser=d,d.ITEM_PROPERTY_HANDLERS=[new a.ItemPropertyHandlerContent,new c.ItemPropertyHandlerUrl("a","href"),new c.ItemPropertyHandlerUrl("area","href"),new c.ItemPropertyHandlerUrl("audio","src"),new c.ItemPropertyHandlerUrl("embed","src"),new c.ItemPropertyHandlerUrl("iframe","src"),new c.ItemPropertyHandlerUrl("img","src"),new c.ItemPropertyHandlerUrl("link","href"),new c.ItemPropertyHandlerUrl("object","data"),new c.ItemPropertyHandlerUrl("source","src"),new c.ItemPropertyHandlerUrl("track","src"),new c.ItemPropertyHandlerUrl("video","src"),new o.ItemPropertyHandlerNumber("data","value"),new o.ItemPropertyHandlerNumber("meter","value"),new s.ItemPropertyHandlerTime]},34260:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(18050),i=r(9929);class a{constructor(e,t){this.dataFactory=e||new n.DataFactory,this.baseIRI=t||""}static isValidIri(e){return a.IRI_REGEX.test(e)}createVocabIris(e,t,r){return e.split(/\s+/u).filter((e=>!!e)).map((e=>{if(!a.isValidIri(e)){if(!r)return;e=`${t.vocab||`${this.baseIRI}#`}${e}`}return this.dataFactory.namedNode(e)})).filter((e=>!!e))}getVocabularyExpansionType(e,t,r){const n=e.split(/\s+/u);if(n.includes("subPropertyOf")||n.includes("equivalentProperty"))return[this.dataFactory.namedNode(`${a.RDF}type`)];if(t.vocab&&t.vocab in r&&r[t.vocab].properties){let e=[];for(const[i,a]of Object.entries(r[t.vocab].properties))n.includes(i)&&(e=[...Object.values(a).map((e=>this.dataFactory.namedNode(e)))]);return e}return[]}createSubject(e){if(!a.isValidIri(e))try{e=(0,i.resolve)(e,this.baseIRI)}catch(e){return}return this.dataFactory.namedNode(e)}createLiteral(e,t){return this.dataFactory.literal(e,t.language)}deriveVocab(e,t){let r;for(const n in t)if(e.startsWith(n)){r=n,r.endsWith("/")||(r+="#");break}if(!r){const t=e.indexOf("#");r=t>0?e.slice(0,t+1):(0,i.resolve)(".",e)}return r}}t.Util=a,a.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",a.XSD="http://www.w3.org/2001/XMLSchema#",a.RDFA="http://www.w3.org/ns/rdfa#",a.IRI_REGEX=/^([A-Za-z][\d+-.A-Za-z]*|_):[^ "<>[\\\]`{|}]*$/u},64295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},49999:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerContent=void 0,t.ItemPropertyHandlerContent=class{canHandle(e,t){return"content"in t}getObject(e,t,r){return t.createLiteral(e.content,r)}}},91094:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerNumber=void 0;const n=r(34260);t.ItemPropertyHandlerNumber=class{constructor(e,t){this.tagName=e,this.attributeName=t}canHandle(e,t){return this.tagName===e&&this.attributeName in t}getObject(e,t,r){const i=e[this.attributeName];let a;return Number.isNaN(Number.parseInt(i,10))||i.includes(".")?Number.isNaN(Number.parseFloat(i))||(a=`${n.Util.XSD}double`):a=`${n.Util.XSD}integer`,t.dataFactory.literal(i,a&&t.dataFactory.namedNode(a))}}},86625:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerTime=void 0;const n=r(34260);class i{canHandle(e,t){return"time"===e&&"datetime"in t}getObject(e,t,r){const a=e.datetime;let o;for(const e of i.TIME_REGEXES)if(e.regex.test(a)){o=t.dataFactory.namedNode(n.Util.XSD+e.type);break}return t.dataFactory.literal(a,o)}}t.ItemPropertyHandlerTime=i,i.TIME_REGEXES=[{regex:/^-?P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d)?S)?)?$/u,type:"duration"},{regex:/^\d+-\d\d-\d\dT\d\d:\d\d:\d\d((Z?)|([+-]\d\d:\d\d))$/u,type:"dateTime"},{regex:/^\d+-\d\d-\d\dZ?$/u,type:"date"},{regex:/^\d\d:\d\d:\d\d((Z?)|([+-]\d\d:\d\d))$/u,type:"time"},{regex:/^\d+-\d\d$/u,type:"gYearMonth"},{regex:/^\d+$/u,type:"gYear"}]},38303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerUrl=void 0;const n=r(9929);t.ItemPropertyHandlerUrl=class{constructor(e,t){this.tagName=e,this.attributeName=t}canHandle(e,t){return this.tagName===e&&this.attributeName in t}getObject(e,t,r){return t.dataFactory.namedNode((0,n.resolve)(e[this.attributeName],t.baseIRI))}}},7784:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},72243:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlankNode:()=>x,DataFactory:()=>T,DefaultGraph:()=>R,Lexer:()=>g,Literal:()=>E,NamedNode:()=>O,Parser:()=>C,Quad:()=>N,Store:()=>re,StreamParser:()=>ie,StreamWriter:()=>ae,Term:()=>S,Triple:()=>N,Util:()=>n,Variable:()=>A,Writer:()=>Y,default:()=>oe,termFromId:()=>I,termToId:()=>P});var n={};r.r(n),r.d(n,{inDefaultGraph:()=>V,isBlankNode:()=>F,isDefaultGraph:()=>q,isLiteral:()=>B,isNamedNode:()=>k,isVariable:()=>U,prefix:()=>Q,prefixes:()=>$});var i=r(59509),a=r.n(i);const o="http://www.w3.org/1999/02/22-rdf-syntax-ns#",s="http://www.w3.org/2001/XMLSchema#",c="http://www.w3.org/2000/10/swap/",u={xsd:{decimal:`${s}decimal`,boolean:`${s}boolean`,double:`${s}double`,integer:`${s}integer`,string:`${s}string`},rdf:{type:`${o}type`,nil:`${o}nil`,first:`${o}first`,rest:`${o}rest`,langString:`${o}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${c}reify#forSome`,forAll:`${c}reify#forAll`},log:{implies:`${c}log#implies`}},{xsd:l}=u,d=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,p={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},h=/[\x00-\x20<>\\"\{\}\|\^\`]/,f={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},y=/$0^/;class g{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 f)&&this[e]instanceof RegExp&&(this[e]=y)}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 s=this._line,c=r[0];let u="",d="",p="",f=null,y=0,g=!1;switch(c){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(y=1,u="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){g=!0;break}case"<":if(f=this._unescapedIri.exec(r))u="IRI",d=f[1];else if(f=this._iri.exec(r)){if(d=this._unescape(f[1]),null===d||h.test(d))return a(this);u="IRI"}else r.length>1&&"<"===r[1]?(u="<<",y=2):this._n3Mode&&r.length>1&&"="===r[1]&&(u="inverse",y=2,d=">");break;case">":r.length>1&&">"===r[1]&&(u=">>",y=2);break;case"_":((f=this._blank.exec(r))||t&&(f=this._blank.exec(`${r} `)))&&(u="blank",p="_",d=f[1]);break;case'"':if(f=this._simpleQuotedString.exec(r))d=f[1];else if(({value:d,matchLength:y}=this._parseLiteral(r)),null===d)return a(this);null===f&&0===y||(u="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(f=this._simpleApostropheString.exec(r))d=f[1];else if(({value:d,matchLength:y}=this._parseLiteral(r)),null===d)return a(this);null===f&&0===y||(u="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(f=this._variable.exec(r))&&(u="var",d=f[0]);break;case"@":"literal"===this._previousMarker&&(f=this._langcode.exec(r))?(u="langcode",d=f[1]):(f=this._keyword.exec(r))&&(u=f[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){u=".",y=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(f=this._number.exec(r)||t&&(f=this._number.exec(`${r} `)))&&(u="literal",d=f[0],p="string"==typeof f[1]?l.double:"string"==typeof f[2]?l.decimal:l.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(f=this._sparqlKeyword.exec(r))?u=f[0].toUpperCase():g=!0;break;case"f":case"t":(f=this._boolean.exec(r))?(u="literal",d=f[0],p=l.boolean):g=!0;break;case"a":(f=this._shortPredicates.exec(r))?(u="abbreviation",d="a"):g=!0;break;case"=":this._n3Mode&&r.length>1&&(u="abbreviation",">"!==r[1]?(y=1,d="="):(y=2,d=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"}":this._lineMode||(y=1,u=c);break;case"{":!this._lineMode&&r.length>=2&&("|"===r[1]?(u="{|",y=2):(u=c,y=1));break;case"|":r.length>=2&&"}"===r[1]&&(u="|}",y=2);break;default:g=!0}if(g&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(f=this._prefix.exec(r))?((f=this._prefixed.exec(r))||t&&(f=this._prefixed.exec(`${r} `)))&&(u="prefixed",p=f[1]||"",d=this._unescape(f[2])):(u="prefix",d=f[1]||"")),"^^"===this._previousMarker)switch(u){case"prefixed":u="type";break;case"IRI":u="typeIRI";break;default:u=""}if(!u)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?a(this):this._input=r;const m=y||f[0].length,b=i(u,d,p,s,m);this.previousToken=b,this._previousMarker=u,r=r.substr(m,r.length)}function i(t,i,a,o,s){const c=r?n-r.length:n,u={type:t,value:i,prefix:a,line:o,start:c,end:c+s};return e(null,u),u}function a(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(e){let t=!1;const r=e.replace(d,((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 p?p[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,a=n+r;if(1===r&&0!==i||3===r&&this._lineMode)break;return this._line+=i,{value:this._unescape(t),matchLength:a}}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}a()((()=>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)}}const{rdf:m,xsd:b}=u;let v,_=0;const w={namedNode:function(e){return new O(e)},blankNode:function(e){return new x(e||"n3-"+_++)},variable:function(e){return new A(e)},literal:function(e,t){if("string"==typeof t)return new E(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";return""===r&&("boolean"==typeof e?r=b.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?b.integer:b.double:(r=b.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),""===r||r===b.string?new E(`"${e}"`):new E(`"${e}"^^${r}`)},defaultGraph:function(){return v},quad:D,triple:D},T=w;class S{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof S?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 O extends S{get termType(){return"NamedNode"}}class E extends S{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 tnull),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new g({lineMode:s,n3:o}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){j=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 a=this._n3Mode;this._contextStack.push({type:e,subject:r,predicate:n,object:i,graph:t,inverse:!!a&&this._inversePredicate,blankPrefix:a?this._prefixes._:"",quantified:a?this._quantified:null}),a&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(e,t){const r=this._contextStack.pop();if(!r||r.type!==e)return this._error(`Unexpected ${t.type}`,t);this._subject=r.subject,this._predicate=r.predicate,this._object=r.object,this._graph=r.graph,this._n3Mode&&(this._inversePredicate=r.inverse,this._prefixes._=r.blankPrefix,this._quantified=r.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("blank",e),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,a=this._contextStack,o=a[a.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("list",e),0!==a.length&&"list"===a[a.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===o.predicate?o.subject=r:o.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("formula",e),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;case"{|":if(!this._supportsRDFStar)return this._error("Unexpected RDF* syntax",e);const a=this._predicate,o=this._object;this._subject=this._quad(n,a,o,this.DEFAULTGRAPH),t=this._readPredicate;break;case"|}":if("Quad"!==this._subject.termType)return this._error("Unexpected asserted triple closing",e);this._subject=null,t=this._readPunctuation;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 t=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,t,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("<<",e),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=M}_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,a=0,o="/";for(;n=i&&(r=r.substr(0,a)),"/"!==o)return`${r}/${e.substr(n+1)}`;a=n+1}}}o=e[++n]}return r+e.substring(a)}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${j++}_`,this._prefixCallback=r||M,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=M):this._readCallback&&(this._readCallback=this._readCallback(t))}))}}function M(){}function L(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(u.rdf.first),e.RDF_REST=r(u.rdf.rest),e.RDF_NIL=r(u.rdf.nil),e.N3_FORALL=r(u.r.forAll),e.N3_FORSOME=r(u.r.forSome),e.ABBREVIATIONS={a:r(u.rdf.type),"=":r(u.owl.sameAs),">":r(u.log.implies)},e.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}function k(e){return!!e&&"NamedNode"===e.termType}function F(e){return!!e&&"BlankNode"===e.termType}function B(e){return!!e&&"Literal"===e.termType}function U(e){return!!e&&"Variable"===e.termType}function q(e){return!!e&&"DefaultGraph"===e.termType}function V(e){return q(e.graph)}function Q(e,t){return $({"":e.value||e},t)("")}function $(e,t){const r=Object.create(null);for(const t in e)n(t,e[t]);function n(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||T,n}L(C.prototype,T);const H=T.defaultGraph(),{rdf:G,xsd:z}=u,K=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,X=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,J={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class W extends S{equals(e){return e===this}}class Y{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=H,this._prefixIRIs=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes),t.baseIRI&&(this._baseMatcher=new RegExp(`^${ee(t.baseIRI)}${t.baseIRI.endsWith("/")?"":"[#?]"}`),this._baseLength=t.baseIRI.length))}get _inDefaultGraph(){return H.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")+(H.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)),K.test(t)&&(t=t.replace(X,Z));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(K.test(t)&&(t=t.replace(X,Z)),e.language)return`"${t}"@${e.language}`;if(this._lineMode){if(e.datatype.value===z.string)return`"${t}"`}else switch(e.datatype.value){case z.string:return`"${t}"`;case z.boolean:if("true"===t||"false"===t)return t;break;case z.integer:if(/^[+-]?\d+$/.test(t))return t;break;case z.decimal:if(/^[+-]?\d*\.\d+$/.test(t))return t;break;case z.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(t))return t}return`"${t}"^^${this._encodeIriOrBlank(e.datatype)}`}_encodePredicate(e){return e.value===G.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)}${q(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,H,n):this._writeQuad(e,t,r,n||H,i)}addQuads(e){for(let t=0;t.\n`)}if(r){let e="",t="";for(const r in this._prefixIRIs)e+=e?`|${r}`:r,t+=(t?"|":"")+this._prefixIRIs[r];e=ee(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 W("[]");case 1:if(r=i[0],!(r.object instanceof W))return new W(`[ ${this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)} ]`);default:let t="[";for(let a=0;a{t=null,e(r,n)});if(this._endStream)try{return this._outputStream.end(t)}catch(e){}t&&t()}}function Z(e){let t=J[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 ee(e){return e.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}var te=r(58521);class re{constructor(e,t){this._size=0,this._graphs=Object.create(null),this._id=0,this._ids=Object.create(null),this._entities=Object.create(null),this._blankNodeIndex=0,t||!e||e[0]||(t=e,e=null),t=t||{},this._factory=t.factory||T,e&&this.addQuads(e)}_termFromId(e,t){if("."===e[0]){const t=this._entities,r=e.split(".");return this._factory.quad(this._termFromId(t[r[1]]),this._termFromId(t[r[2]]),this._termFromId(t[r[3]]),r[4]&&this._termFromId(t[r[4]]))}return I(e,t)}_termToNumericId(e){if("Quad"===e.termType){const t=this._termToNumericId(e.subject),r=this._termToNumericId(e.predicate),n=this._termToNumericId(e.object);let i;return t&&r&&n&&(q(e.graph)||(i=this._termToNumericId(e.graph)))&&this._ids[i?`.${t}.${r}.${n}.${i}`:`.${t}.${r}.${n}`]}return this._ids[P(e)]}_termToNewNumericId(e){const t=e&&"Quad"===e.termType?`.${this._termToNewNumericId(e.subject)}.${this._termToNewNumericId(e.predicate)}.${this._termToNewNumericId(e.object)}${q(e.graph)?"":`.${this._termToNewNumericId(e.graph)}`}`:P(e);return this._ids[t]||(this._ids[this._entities[++this._id]=t]=this._id)}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 a in r=t[i].subjects)for(const t in n=r[a])e+=Object.keys(n[t]).length;return this._size=e}_addToIndex(e,t,r,n){const i=e[t]||(e[t]={}),a=i[r]||(i[r]={}),o=n in a;return o||(a[n]=null),!o}_removeFromIndex(e,t,r,n){const i=e[t],a=i[r];delete a[n];for(const e in a)return;delete i[r];for(const e in i)return;delete e[t]}*_findInIndex(e,t,r,n,i,a,o,s){let c,u,l;const d=this._entities,p=this._termFromId(s,this._factory),h={subject:null,predicate:null,object:null};t&&((c=e,e={})[t]=c[t]);for(const t in e)if(u=e[t]){h[i]=this._termFromId(d[t],this._factory),r&&((c=u,u={})[r]=c[r]);for(const e in u)if(l=u[e]){h[a]=this._termFromId(d[e],this._factory);const t=n?n in l?[n]:[]:Object.keys(l);for(let e=0;e{r in t||(t[r]=!0,e(this._termFromId(this._entities[r],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,t,r,n){t||(n=e.graph,r=e.object,t=e.predicate,e=e.subject),n=P(n);let i=this._graphs[n];i||(i=this._graphs[n]={subjects:{},predicates:{},objects:{}},Object.freeze(i)),e=this._termToNewNumericId(e),t=this._termToNewNumericId(t),r=this._termToNewNumericId(r);const a=this._addToIndex(i.subjects,e,t,r);return this._addToIndex(i.predicates,t,r,e),this._addToIndex(i.objects,r,e,t),this._size=null,a}addQuads(e){for(let t=0;t{this.addQuad(e)})),e}removeQuad(e,t,r,n){t||(n=e.graph,r=e.object,t=e.predicate,e=e.subject),n=P(n);const i=this._graphs;let a,o,s;if(!((e=e&&this._termToNumericId(e))&&(t=t&&this._termToNumericId(t))&&(r=r&&this._termToNumericId(r))&&(a=i[n])&&(o=a.subjects[e])&&(s=o[t])&&r in s))return!1;for(e in this._removeFromIndex(a.subjects,e,t,r),this._removeFromIndex(a.predicates,t,r,e),this._removeFromIndex(a.objects,r,e,t),null!==this._size&&this._size--,a.subjects)return!0;return delete i[n],!0}removeQuads(e){for(let t=0;t{this.removeQuad(e)})),e}removeMatches(e,t,r,n){const i=new te.Readable({objectMode:!0});return i._read=()=>{for(const a of this.readQuads(e,t,r,n))i.push(a);i.push(null)},this.remove(i)}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,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s,c;if(!(e&&!(o=this._termToNumericId(e))||t&&!(s=this._termToNumericId(t))||r&&!(c=this._termToNumericId(r))))for(const e in i)(a=i[e])&&(o?c?yield*this._findInIndex(a.objects,c,o,s,"object","subject","predicate",e):yield*this._findInIndex(a.subjects,o,s,null,"subject","predicate","object",e):s?yield*this._findInIndex(a.predicates,s,c,null,"predicate","object","subject",e):c?yield*this._findInIndex(a.objects,c,null,null,"object","subject","predicate",e):yield*this._findInIndex(a.subjects,null,null,null,"subject","predicate","object",e))}match(e,t,r,n){return new ne(this,e,t,r,n)}countQuads(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s,c,u=0;if(e&&!(o=this._termToNumericId(e))||t&&!(s=this._termToNumericId(t))||r&&!(c=this._termToNumericId(r)))return 0;for(const n in i)(a=i[n])&&(u+=e?r?this._countInIndex(a.objects,c,o,s):this._countInIndex(a.subjects,o,s,c):t?this._countInIndex(a.predicates,s,c,o):this._countInIndex(a.objects,c,o,s));return u}forEach(e,t,r,n,i){this.some((t=>(e(t),!1)),t,r,n,i)}every(e,t,r,n,i){let a=!1;const o=!this.some((t=>(a=!0,!e(t))),t,r,n,i);return a&&o}some(e,t,r,n,i){for(const a of this.readQuads(t,r,n,i))if(e(a))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,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s;if(e=this._uniqueEntities(e),!(t&&!(o=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(a=i[n])&&(o?s?this._loopBy2Keys(a.predicates,o,s,e):this._loopByKey1(a.subjects,o,e):s?this._loopByKey0(a.objects,s,e):this._loop(a.subjects,e))}getPredicates(e,t,r){const n=[];return this.forPredicates((e=>{n.push(e)}),e,t,r),n}forPredicates(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s;if(e=this._uniqueEntities(e),!(t&&!(o=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(a=i[n])&&(o?s?this._loopBy2Keys(a.objects,s,o,e):this._loopByKey0(a.subjects,o,e):s?this._loopByKey1(a.predicates,s,e):this._loop(a.predicates,e))}getObjects(e,t,r){const n=[];return this.forObjects((e=>{n.push(e)}),e,t,r),n}forObjects(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s;if(e=this._uniqueEntities(e),!(t&&!(o=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(a=i[n])&&(o?s?this._loopBy2Keys(a.subjects,o,s,e):this._loopByKey1(a.objects,o,e):s?this._loopByKey0(a.predicates,s,e):this._loop(a.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,u.rdf.rest,u.rdf.nil,null),a=e?[...i]:[];return i.forEach((t=>{const i=[];let o,s,c=!1;const l=t.graph;let d=t.subject;for(;d&&!c;){const e=this.getQuads(null,null,d,null),t=this.getQuads(d,null,null,null);let r,p=null,h=null,f=null;for(let i=0;i{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 ae extends te.Transform{constructor(e){super({encoding:"utf8",writableObjectMode:!0});const t=this._writer=new Y({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}}const oe={Lexer:g,Parser:C,Writer:Y,Store:re,StreamParser:ie,StreamWriter:ae,Util:n,DataFactory:T,Term:S,NamedNode:O,Literal:E,BlankNode:x,Variable:A,DefaultGraph:R,Quad:N,Triple:N,termFromId:I,termToId:P}},39907:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],u=!1,l=-1;function d(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&p())}function p(){if(!u){var e=o(d);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l1)for(var r=1;r{!function(){var t;t="object"==typeof window&&window?window:r.g,e.exports?e.exports=t.Promise?t.Promise:o:t.Promise||(t.Promise=o);var n=t.setImmediate||function(e){setTimeout(e,1)};function i(e,t){return function(){e.apply(t,arguments)}}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],p(e,i(c,this),i(u,this))}function s(e){var t=this;null!==this._state?n((function(){var r=t._state?e.onFulfilled:e.onRejected;if(null!==r){var n;try{n=r(t._value)}catch(t){return void e.reject(t)}e.resolve(n)}else(t._state?e.resolve:e.reject)(t._value)})):this._deferreds.push(e)}function c(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void p(i(t,e),i(c,this),i(u,this))}this._state=!0,this._value=e,l.call(this)}catch(e){u.call(this,e)}}function u(e){this._state=!1,this._value=e,l.call(this)}function l(){for(var e=0,t=this._deferreds.length;e{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)))},18050: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(73968),t),i(r(31352),t),i(r(81947),t),i(r(91417),t),i(r(88963),t),i(r(89135),t),i(r(22e3),t)},73968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNode=void 0,t.BlankNode=class{constructor(e){this.termType="BlankNode",this.value=e}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},31352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataFactory=void 0;const n=r(73968),i=r(81947),a=r(91417),o=r(88963),s=r(89135),c=r(22e3);let u=0;t.DataFactory=class{constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${u++}_`}namedNode(e){return new o.NamedNode(e)}blankNode(e){return new n.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,t){return new a.Literal(e,t)}variable(e){return new c.Variable(e)}defaultGraph(){return i.DefaultGraph.INSTANCE}quad(e,t,r,n){return new s.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(a.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}}},81947:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultGraph=void 0;class r{constructor(){this.termType="DefaultGraph",this.value=""}equals(e){return!!e&&"DefaultGraph"===e.termType}}t.DefaultGraph=r,r.INSTANCE=new r},91417:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literal=void 0;const n=r(88963);class i{constructor(e,t){this.termType="Literal",this.value=e,"string"==typeof t?(this.language=t,this.datatype=i.RDF_LANGUAGE_STRING):t?(this.language="",this.datatype=t):(this.language="",this.datatype=i.XSD_STRING)}equals(e){return!!e&&"Literal"===e.termType&&e.value===this.value&&e.language===this.language&&this.datatype.equals(e.datatype)}}t.Literal=i,i.RDF_LANGUAGE_STRING=new n.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),i.XSD_STRING=new n.NamedNode("http://www.w3.org/2001/XMLSchema#string")},88963:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedNode=void 0,t.NamedNode=class{constructor(e){this.termType="NamedNode",this.value=e}equals(e){return!!e&&"NamedNode"===e.termType&&e.value===this.value}}},89135:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Quad=void 0,t.Quad=class{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)}}},22e3:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0,t.Variable=class{constructor(e){this.termType="Variable",this.value=e}equals(e){return!!e&&"Variable"===e.termType&&e.value===this.value}}},91032: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(9157),t)},9157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTermGrounded=t.termToSignature=t.quadToSignature=t.sha1hex=t.hashTerm=t.hashTerms=t.getGraphBlankNodes=t.uniqGraph=t.deindexGraph=t.indexGraph=t.getQuadsWithoutBlankNodes=t.getQuadsWithBlankNodes=t.hasValue=t.hashValues=t.getBijectionInner=t.getBijection=t.isomorphic=void 0;const n=r(99499),i=r(22112),a=r(13252);function o(e,t){const r=h(p(e)),n=h(p(t));if(Object.keys(r).length!==Object.keys(n).length)return null;for(const e in r)if(r[e]!==n[e])return null;return s(y(d(e)),y(d(t)),g(e),g(t))}function s(e,t,r,n,a,o){a||(a={}),o||(o={});const[d,p]=m(e,r,a),[h,f]=m(t,n,o);if(Object.keys(d).length!==Object.keys(h).length)return null;for(const e in d)if(!l(h,d[e]))return null;let y={};for(const e of r){const t=i.termToString(e),r=p[t];for(const e in f)if(f[e]===r){y[t]=e,delete f[e];break}}if(!c(Object.keys(y).sort(),r.map(i.termToString).sort())||!c(u(y).sort(),n.map(i.termToString).sort())){y=null;for(const a of r){const o=i.termToString(a);if(!d[o])for(const a of n){const c=i.termToString(a);if(!h[c]&&p[o]===f[c]){const i=v(o);y=s(e,t,r,n,Object.assign(Object.assign({},d),{[o]:i}),Object.assign(Object.assign({},h),{[c]:i}))}}}}return y}function c(e,t){if(e.length!==t.length)return!1;for(let r=e.length;r--;)if(e[r]!==t[r])return!1;return!0}function u(e){const t=[];for(const r in e)t.push(e[r]);return t}function l(e,t){for(const r in e)if(e[r]===t)return!0;return!1}function d(e){return e.filter((e=>a.someTerms(e,(e=>"BlankNode"===e.termType||"Quad"===e.termType&&a.getTermsNested(e).some((e=>"BlankNode"===e.termType))))))}function p(e){return e.filter((e=>a.everyTerms(e,(e=>"BlankNode"!==e.termType&&!("Quad"===e.termType&&a.getTermsNested(e).some((e=>"BlankNode"===e.termType)))))))}function h(e){const t={};for(const r of e)t[JSON.stringify(i.quadToStringQuad(r))]=!0;return t}function f(e){return Object.keys(e).map((e=>i.stringQuadToQuad(JSON.parse(e))))}function y(e){return f(h(e))}function g(e){return a.uniqTerms(e.map((e=>a.getBlankNodes(a.getTermsNested(e)))).reduce(((e,t)=>e.concat(t)),[]))}function m(e,t,r){const n=Object.assign({},r),a={};let o=!0;for(;o;){const r=Object.keys(n).length;for(const r of t){const t=i.termToString(r);if(!n[t]){const[i,o]=b(r,e,n);i&&(n[t]=o),a[t]=o}}const s={};for(const e in a){const t=a[e];void 0===s[t]?s[t]=e:s[t]=!1}for(const e in s){const t=s[e];t&&(n[t]=e)}o=r!==Object.keys(n).length}return[n,a]}function b(e,t,r){const n=[];let i=!0;for(const o of t){const t=a.getTermsNested(o);if(t.some((t=>t.equals(e)))){n.push(_(o,r,e));for(const n of t)T(n,r)||n.equals(e)||(i=!1)}}return[i,v(n.sort().join(""))]}function v(e){return n.sha1().update(e).digest("hex")}function _(e,t,r){return a.getTerms(e).map((e=>w(e,t,r))).join("|")}function w(e,t,r){return e.equals(r)?"@self":"BlankNode"===e.termType?t[i.termToString(e)]||"@blank":"Quad"===e.termType?`<${_(e,t,r)}>`:i.termToString(e)}function T(e,t){return"BlankNode"!==e.termType&&!("Quad"===e.termType&&a.getTermsNested(e).some((e=>!T(e,t))))||!!t[i.termToString(e)]}t.isomorphic=function(e,t){return!!o(e,t)},t.getBijection=o,t.getBijectionInner=s,t.hashValues=u,t.hasValue=l,t.getQuadsWithBlankNodes=d,t.getQuadsWithoutBlankNodes=p,t.indexGraph=h,t.deindexGraph=f,t.uniqGraph=y,t.getGraphBlankNodes=g,t.hashTerms=m,t.hashTerm=b,t.sha1hex=v,t.quadToSignature=_,t.termToSignature=w,t.isTermGrounded=T},80740:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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}),t.getSupportedJavaScriptPrimitives=t.getSupportedRdfDatatypes=t.getTermRaw=t.toRdf=t.fromRdf=void 0;const a=r(18050),o=r(23303),s=r(76516);i(r(23303),t),i(r(48959),t),i(r(76516),t);const c=new a.DataFactory,u=new s.Translator;function l(e,t){return u.fromRdf(e,t)}u.registerHandler(new o.TypeHandlerString,o.TypeHandlerString.TYPES.map((e=>c.namedNode(e))),["string"]),u.registerHandler(new o.TypeHandlerBoolean,[o.TypeHandlerBoolean.TYPE].map((e=>c.namedNode(e))),["boolean"]),u.registerHandler(new o.TypeHandlerNumberDouble,o.TypeHandlerNumberDouble.TYPES.map((e=>c.namedNode(e))),["number"]),u.registerHandler(new o.TypeHandlerNumberInteger,o.TypeHandlerNumberInteger.TYPES.map((e=>c.namedNode(e))),["number"]),u.registerHandler(new o.TypeHandlerDate,o.TypeHandlerDate.TYPES.map((e=>c.namedNode(e))),["object"]),t.fromRdf=l,t.toRdf=function(e,t){return t&&"namedNode"in t&&(t={dataFactory:t}),(t=t||{})&&!t.dataFactory&&(t.dataFactory=c),u.toRdf(e,t)},t.getTermRaw=function(e,t){return"Literal"===e.termType?l(e,t):e.value},t.getSupportedRdfDatatypes=function(){return u.getSupportedRdfDatatypes()},t.getSupportedJavaScriptPrimitives=function(){return u.getSupportedJavaScriptPrimitives()}},48959:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},76516:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Translator=void 0,t.Translator=class{constructor(){this.supportedRdfDatatypes=[],this.fromRdfHandlers={},this.toRdfHandlers={}}static incorrectRdfDataType(e){throw new Error(`Invalid RDF ${e.datatype.value} value: '${e.value}'`)}registerHandler(e,t,r){for(const r of t)this.supportedRdfDatatypes.push(r),this.fromRdfHandlers[r.value]=e;for(const t of r){let r=this.toRdfHandlers[t];r||(this.toRdfHandlers[t]=r=[]),r.push(e)}}fromRdf(e,t){const r=this.fromRdfHandlers[e.datatype.value];return r?r.fromRdf(e,t):e.value}toRdf(e,t){const r=this.toRdfHandlers[typeof e];if(r)for(const n of r){const r=n.toRdf(e,t);if(r)return r}throw new Error(`Invalid JavaScript value: '${e}'`)}getSupportedRdfDatatypes(){return this.supportedRdfDatatypes}getSupportedJavaScriptPrimitives(){return Object.keys(this.toRdfHandlers)}}},48403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerBoolean=void 0;const n=r(76516);class i{fromRdf(e,t){switch(e.value){case"true":case"1":return!0;case"false":case"0":return!1}return t&&n.Translator.incorrectRdfDataType(e),!1}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(e?"true":"false",t||r.namedNode(i.TYPE))}}i.TYPE="http://www.w3.org/2001/XMLSchema#boolean",t.TypeHandlerBoolean=i},5603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerDate=void 0;const n=r(76516);class i{fromRdf(e,t){switch(t&&!e.value.match(i.VALIDATORS[e.datatype.value.substr(33,e.datatype.value.length)])&&n.Translator.incorrectRdfDataType(e),e.datatype.value){case"http://www.w3.org/2001/XMLSchema#gDay":return new Date(0,0,parseInt(e.value,10));case"http://www.w3.org/2001/XMLSchema#gMonthDay":const t=e.value.split("-");return new Date(0,parseInt(t[0],10)-1,parseInt(t[1],10));case"http://www.w3.org/2001/XMLSchema#gYear":return new Date(e.value+"-01-01");case"http://www.w3.org/2001/XMLSchema#gYearMonth":return new Date(e.value+"-01");default:return new Date(e.value)}}toRdf(e,{datatype:t,dataFactory:r}){if(t=t||r.namedNode(i.TYPES[0]),!(e instanceof Date))return null;const n=e;let a;switch(t.value){case"http://www.w3.org/2001/XMLSchema#gDay":a=String(n.getUTCDate());break;case"http://www.w3.org/2001/XMLSchema#gMonthDay":a=n.getUTCMonth()+1+"-"+n.getUTCDate();break;case"http://www.w3.org/2001/XMLSchema#gYear":a=String(n.getUTCFullYear());break;case"http://www.w3.org/2001/XMLSchema#gYearMonth":a=n.getUTCFullYear()+"-"+(n.getUTCMonth()+1);break;case"http://www.w3.org/2001/XMLSchema#date":a=n.toISOString().replace(/T.*$/,"");break;default:a=n.toISOString()}return r.literal(a,t)}}i.TYPES=["http://www.w3.org/2001/XMLSchema#dateTime","http://www.w3.org/2001/XMLSchema#date","http://www.w3.org/2001/XMLSchema#gDay","http://www.w3.org/2001/XMLSchema#gMonthDay","http://www.w3.org/2001/XMLSchema#gYear","http://www.w3.org/2001/XMLSchema#gYearMonth"],i.VALIDATORS={date:/^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,dateTime:/^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9](\.[0-9][0-9][0-9])?((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,gDay:/^[0-9]+$/,gMonthDay:/^[0-9]+-[0-9][0-9]$/,gYear:/^[0-9]+$/,gYearMonth:/^[0-9]+-[0-9][0-9]$/},t.TypeHandlerDate=i},25947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerNumberDouble=void 0;const n=r(76516);class i{fromRdf(e,t){const r=parseFloat(e.value);return t&&isNaN(r)&&n.Translator.incorrectRdfDataType(e),r}toRdf(e,{datatype:t,dataFactory:r}){return t=t||r.namedNode(i.TYPES[0]),isNaN(e)?r.literal("NaN",t):isFinite(e)?e%1==0?null:r.literal(e.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),t):r.literal(e>0?"INF":"-INF",t)}}i.TYPES=["http://www.w3.org/2001/XMLSchema#double","http://www.w3.org/2001/XMLSchema#decimal","http://www.w3.org/2001/XMLSchema#float"],t.TypeHandlerNumberDouble=i},83002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerNumberInteger=void 0;const n=r(76516);class i{fromRdf(e,t){const r=parseInt(e.value,10);return t&&(isNaN(r)||e.value.indexOf(".")>=0)&&n.Translator.incorrectRdfDataType(e),r}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(String(e),t||(e<=i.MAX_INT&&e>=i.MIN_INT?r.namedNode(i.TYPES[0]):r.namedNode(i.TYPES[1])))}}i.TYPES=["http://www.w3.org/2001/XMLSchema#integer","http://www.w3.org/2001/XMLSchema#long","http://www.w3.org/2001/XMLSchema#int","http://www.w3.org/2001/XMLSchema#byte","http://www.w3.org/2001/XMLSchema#short","http://www.w3.org/2001/XMLSchema#negativeInteger","http://www.w3.org/2001/XMLSchema#nonNegativeInteger","http://www.w3.org/2001/XMLSchema#nonPositiveInteger","http://www.w3.org/2001/XMLSchema#positiveInteger","http://www.w3.org/2001/XMLSchema#unsignedByte","http://www.w3.org/2001/XMLSchema#unsignedInt","http://www.w3.org/2001/XMLSchema#unsignedLong","http://www.w3.org/2001/XMLSchema#unsignedShort"],i.MAX_INT=2147483647,i.MIN_INT=-2147483648,t.TypeHandlerNumberInteger=i},2074:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerString=void 0;class r{fromRdf(e){return e.value}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(e,t)}}r.TYPES=["http://www.w3.org/2001/XMLSchema#string","http://www.w3.org/2001/XMLSchema#normalizedString","http://www.w3.org/2001/XMLSchema#anyURI","http://www.w3.org/2001/XMLSchema#base64Binary","http://www.w3.org/2001/XMLSchema#language","http://www.w3.org/2001/XMLSchema#Name","http://www.w3.org/2001/XMLSchema#NCName","http://www.w3.org/2001/XMLSchema#NMTOKEN","http://www.w3.org/2001/XMLSchema#token","http://www.w3.org/2001/XMLSchema#hexBinary","http://www.w3.org/1999/02/22-rdf-syntax-ns#langString","http://www.w3.org/2001/XMLSchema#time","http://www.w3.org/2001/XMLSchema#duration"],t.TypeHandlerString=r},23303:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(48403),t),i(r(5603),t),i(r(25947),t),i(r(83002),t),i(r(2074),t)},10953:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storeStream=void 0;const n=r(92427);t.storeStream=function(e){const t=n.RdfStore.createDefault();return new Promise(((r,n)=>t.import(e).on("error",n).once("end",(()=>r(t)))))}},92427:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(51368),t),i(r(2369),t),i(r(62947),t),i(r(12924),t),i(r(76386),t),i(r(94992),t),i(r(26503),t),i(r(86721),t),i(r(93616),t),i(r(55100),t),i(r(95832),t),i(r(68752),t),i(r(38654),t),i(r(15698),t),i(r(53277),t),i(r(86937),t),i(r(15291),t),i(r(29390),t),i(r(25383),t),i(r(39034),t)},15291:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},29390:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arePatternsQuoted=t.quadHasVariables=t.quadToPattern=t.encodeOptionalTerms=t.orderQuadComponents=t.getComponentOrderScore=t.getBestIndex=t.QUAD_TERM_NAMES_INVERSE=void 0;const n=r(13252);function i(e,t){return e.map(((r,n)=>t.includes(r)?e.length-n:0)).reduce(((e,t)=>e+t),0)}function a(e){for(const t of n.QUAD_TERM_NAMES){const r=e[t];if("Variable"===r.termType||"Quad"===r.termType&&a(r))return!0}return!1}t.QUAD_TERM_NAMES_INVERSE=Object.fromEntries(n.QUAD_TERM_NAMES.map(((e,t)=>[e,t]))),t.getBestIndex=function(e,t){if(1===e.length||t.every((e=>void 0!==e)))return 0;const r=[];for(let e=0;e({score:i(e,r),index:t}))).sort(((e,t)=>t.score-e.score))[0].index},t.getComponentOrderScore=i,t.orderQuadComponents=function(e,r){return e.map((e=>{const n=t.QUAD_TERM_NAMES_INVERSE[e];return r[n]}))},t.encodeOptionalTerms=function(e,t){const r=e.map((e=>{if(e){if("Quad"===e.termType&&a(e))return;const r=t.encodeOptional(e);return void 0===r?"none":r}return e}));if(!r.includes("none"))return r},t.quadToPattern=function(e,t,r,n,i){let a=!1;return[[e||void 0,t||void 0,r||void 0,n||void 0].map((e=>{if(e){if("Variable"===e.termType)return;if("Quad"===e.termType)return i?e:void(a=!0)}return e})),a]},t.quadHasVariables=a,t.arePatternsQuoted=function(e){return e.map((e=>"Quad"===(null==e?void 0:e.termType)&&a(e)))}},25383:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},39034:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStore=void 0;const n=r(76664),i=r(18050),a=r(13252),o=r(51368),s=r(76386),c=r(26503),u=r(68752),l=r(29390);class d{constructor(e){this.features={quotedTripleFiltering:!0},this._size=0,this.options=e,this.dataFactory=e.dataFactory,this.dictionary=e.dictionary,this.indexesWrapped=d.constructIndexesWrapped(e),this.indexesWrappedComponentOrders=this.indexesWrapped.map((e=>e.componentOrder))}static createDefault(){return new d({indexCombinations:d.DEFAULT_INDEX_COMBINATIONS,indexConstructor:e=>new u.RdfStoreIndexNestedMapQuoted(e),dictionary:new c.TermDictionaryQuotedIndexed(new s.TermDictionaryNumberRecordFullTerms),dataFactory:new i.DataFactory})}static constructIndexesWrapped(e){const t=[];if(0===e.indexCombinations.length)throw new Error("At least one index combination is required");for(const r of e.indexCombinations){if(!d.isCombinationValid(r))throw new Error(`Invalid index combination: ${r}`);t.push({index:e.indexConstructor(e),componentOrder:r,componentOrderInverse:Object.fromEntries(r.map(((e,t)=>[e,t])))})}return t}static isCombinationValid(e){for(const t of a.QUAD_TERM_NAMES)if(!e.includes(t))return!1;return 4===e.length}get size(){return this._size}addQuad(e){const t=[this.dictionary.encode(e.subject),this.dictionary.encode(e.predicate),this.dictionary.encode(e.object),this.dictionary.encode(e.graph)];let r=!1;for(const e of this.indexesWrapped)r=e.index.set((0,l.orderQuadComponents)(e.componentOrder,t),!0);return!!r&&(this._size++,!0)}removeQuad(e){const t=[this.dictionary.encodeOptional(e.subject),this.dictionary.encodeOptional(e.predicate),this.dictionary.encodeOptional(e.object),this.dictionary.encodeOptional(e.graph)];if(t.includes(void 0))return!1;let r=!1;for(const e of this.indexesWrapped)if(r=e.index.remove((0,l.orderQuadComponents)(e.componentOrder,t)),!r)break;return!!r&&(this._size--,!0)}remove(e){return e.on("data",(e=>this.removeQuad(e))),e}removeMatches(e,t,r,n){return this.remove(this.match(e,t,r,n))}deleteGraph(e){return"string"==typeof e&&(e=this.dataFactory.namedNode(e)),this.removeMatches(void 0,void 0,void 0,e)}import(e){return e.on("data",(e=>this.addQuad(e))),e}*readQuads(e,t,r,n){const i=Boolean(this.dictionary.features.quotedTriples)&&Object.values(this.indexesWrapped).every((e=>e.index.features.quotedTripleFiltering)),[o,s]=(0,l.quadToPattern)(e,t,r,n,i),c=this.indexesWrapped[(0,l.getBestIndex)(this.indexesWrappedComponentOrders,o)],u=(0,l.orderQuadComponents)(c.componentOrder,o);for(const i of c.index.find(u)){const o=this.dataFactory.quad(i[c.componentOrderInverse.subject],i[c.componentOrderInverse.predicate],i[c.componentOrderInverse.object],i[c.componentOrderInverse.graph]);s?(0,a.matchPattern)(o,e,t,r,n)&&(yield o):yield o}}getQuads(e,t,r,n){return[...this.readQuads(e,t,r,n)]}match(e,t,r,i){return(0,n.wrap)(this.readQuads(e,t,r,i))}countQuads(e,t,r,n){const i=Boolean(this.dictionary.features.quotedTriples)&&Object.values(this.indexesWrapped).every((e=>e.index.features.quotedTripleFiltering)),[a]=(0,l.quadToPattern)(e,t,r,n,i);if(a.every((e=>void 0===e)))return this.size;const o=this.indexesWrapped[(0,l.getBestIndex)(this.indexesWrappedComponentOrders,a)],s=(0,l.orderQuadComponents)(o.componentOrder,a);return o.index.count(s)}asDataset(){return new o.DatasetCoreWrapper(this)}}d.DEFAULT_INDEX_COMBINATIONS=[["graph","subject","predicate","object"],["graph","predicate","object","subject"],["graph","object","subject","predicate"]],t.RdfStore=d},51368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DatasetCoreWrapper=void 0;const n=r(39034);class i{constructor(e){this.store=e}get size(){return this.store.size}add(e){return this.store.addQuad(e),this}delete(e){return this.store.removeQuad(e),this}has(e){for(const t of this.store.readQuads(e.subject,e.predicate,e.object,e.graph))return!0;return!1}match(e,t,r,a){const o=new n.RdfStore(this.store.options);for(const n of this.store.readQuads(e,t,r,a))o.addQuad(n);return new i(o)}[Symbol.iterator](){return this.store.readQuads()}}t.DatasetCoreWrapper=i},2369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},62947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryNumberMap=void 0;const n=r(18050),i=r(22112);t.TermDictionaryNumberMap=class{constructor(e=new n.DataFactory){this.lastId=0,this.dictionary=new Map,this.reverseDictionary=new Map,this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const t=(0,i.termToString)(e);let r=this.dictionary.get(t);return void 0===r&&(r=this.lastId++,this.dictionary.set(t,r),this.reverseDictionary.set(r,t)),r}encodeOptional(e){const t=(0,i.termToString)(e);return this.dictionary.get(t)}decode(e){const t=this.reverseDictionary.get(e);if(void 0===t)throw new Error(`The value ${e} is not present in this dictionary`);return(0,i.stringToTerm)(t,this.dataFactory)}encodings(){return this.reverseDictionary.keys()}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},12924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryNumberRecord=void 0;const n=r(18050),i=r(22112);t.TermDictionaryNumberRecord=class{constructor(e=new n.DataFactory){this.lastId=0,this.dictionary={},this.reverseDictionary={},this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const t=(0,i.termToString)(e);let r=this.dictionary[t];return void 0===r&&(r=this.lastId++,this.dictionary[t]=r,this.reverseDictionary[r]=t),r}encodeOptional(e){const t=(0,i.termToString)(e);return this.dictionary[t]}decode(e){const t=this.reverseDictionary[e];if(void 0===t)throw new Error(`The value ${e} is not present in this dictionary`);return(0,i.stringToTerm)(t,this.dataFactory)}*encodings(){for(const e of Object.keys(this.reverseDictionary))yield Number.parseInt(e,10)}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},76386:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryNumberRecordFullTerms=void 0;const n=r(18050),i=r(22112);t.TermDictionaryNumberRecordFullTerms=class{constructor(e=new n.DataFactory){this.lastId=0,this.dictionary={},this.reverseDictionary={},this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const t=(0,i.termToString)(e);let r=this.dictionary[t];return void 0===r&&(r=this.lastId++,this.dictionary[t]=r,this.reverseDictionary[r]=e),r}encodeOptional(e){const t=(0,i.termToString)(e);return this.dictionary[t]}decode(e){const t=this.reverseDictionary[e];if(void 0===t)throw new Error(`The value ${e} is not present in this dictionary`);return t}*encodings(){for(const e of Object.keys(this.reverseDictionary))yield Number.parseInt(e,10)}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},94992:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryQuoted=void 0;const n=r(18050),i=r(13252);class a{constructor(e,t,r=new n.DataFactory){this.features={quotedTriples:!0},this.plainTermDictionary=e,this.quotedTriplesDictionary=t,this.dataFactory=r}encode(e){return"Quad"===e.termType?a.BITMASK|1+this.quotedTriplesDictionary.encode(e):this.plainTermDictionary.encode(e)}encodeOptional(e){if("Quad"===e.termType){const t=this.quotedTriplesDictionary.encodeOptional(e);return void 0===t?t:a.BITMASK|1+t}return this.plainTermDictionary.encodeOptional(e)}decode(e){if(a.BITMASK&e){const t=(~a.BITMASK&e)-1;return this.quotedTriplesDictionary.decode(t)}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.encodings())yield a.BITMASK|1+e}*findQuotedTriples(e){for(const t of this.findQuotedTriplesEncoded(e))yield this.decode(t)}*findQuotedTriplesEncoded(e){for(let t of this.quotedTriplesDictionary.encodings()){t=a.BITMASK|1+t;const r=this.decode(t);(0,i.matchPattern)(r,e.subject,e.predicate,e.object,e.graph)&&(yield t)}}}a.BITMASK=1<<31,t.TermDictionaryQuoted=a},26503:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryQuotedIndexed=void 0;const n=r(18050),i=r(95832),a=r(29390);class o{constructor(e,t=new n.DataFactory){this.quotedTriplesDictionary=[],this.features={quotedTriples:!0},this.plainTermDictionary=e;const r={indexCombinations:[],indexConstructor:void 0,dictionary:this,dataFactory:t};this.quotedTriplesReverseDictionaries=[new i.RdfStoreIndexNestedMap(r),new i.RdfStoreIndexNestedMap(r),new i.RdfStoreIndexNestedMap(r)],this.dataFactory=t}encode(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!1):this.plainTermDictionary.encode(e)}encodeQuotedTriple(e,t){if("DefaultGraph"!==e.graph.termType)throw new Error("Encoding of quoted quads outside of the default graph is not allowed");const r=(0,a.encodeOptionalTerms)([e.subject,e.predicate,e.object,e.graph],this),n=r&&r.every((e=>void 0!==e))?this.quotedTriplesReverseDictionaries[0].getEncoded(r):void 0;if(void 0!==n||t)return void 0===n?void 0:o.BITMASK|n;const i=[this.encode(e.subject),this.encode(e.predicate),this.encode(e.object)],s=this.quotedTriplesDictionary.length+1;this.quotedTriplesDictionary.push(i);const c=this.encode(this.dataFactory.defaultGraph());return this.quotedTriplesReverseDictionaries[0].set([i[0],i[1],i[2],c],s),this.quotedTriplesReverseDictionaries[1].set([i[1],i[2],i[0],c],s),this.quotedTriplesReverseDictionaries[2].set([i[2],i[0],i[1],c],s),o.BITMASK|s}encodeOptional(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!0):this.plainTermDictionary.encodeOptional(e)}decode(e){if(o.BITMASK&e){const t=(~o.BITMASK&e)-1;if(t>=this.quotedTriplesDictionary.length)throw new Error(`The value ${e} is not present in the quoted triples range of the dictionary`);const r=this.quotedTriplesDictionary[t];return this.dataFactory.quad(this.decode(r[0]),this.decode(r[1]),this.decode(r[2]))}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.keys())yield o.BITMASK|1+e}*findQuotedTriples(e){for(const t of this.findQuotedTriplesEncoded(e))yield this.decode(t)}*findQuotedTriplesEncoded(e){const[t,r]=(0,a.quadToPattern)(e.subject,e.predicate,e.object,e.graph,!0);for(const e of this.patternToIterable(t[0]))for(const r of this.patternToIterable(t[1]))for(const n of this.patternToIterable(t[2]))for(const i of this.patternToIterable(t[3]))if(e&&r||!r&&!n){const a=[e,r,n,i];for(const e of this.quotedTriplesReverseDictionaries[0].findEncoded(a,t))yield o.BITMASK|this.quotedTriplesReverseDictionaries[0].getEncoded(e)}else if(!e&&r){const a=[r,n,e,i];for(const e of this.quotedTriplesReverseDictionaries[1].findEncoded(a,t))yield o.BITMASK|this.quotedTriplesReverseDictionaries[1].getEncoded(e)}else{const a=[n,e,r,i];for(const e of this.quotedTriplesReverseDictionaries[2].findEncoded(a,t))yield o.BITMASK|this.quotedTriplesReverseDictionaries[2].getEncoded(e)}}*patternToIterable(e){if("Quad"===(null==e?void 0:e.termType))return void(yield*this.findQuotedTriplesEncoded(e));if(void 0===e)return void(yield);const t=this.encodeOptional(e);void 0!==t&&(yield t)}}o.BITMASK=1<<31,t.TermDictionaryQuotedIndexed=o},86721:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryQuotedReferential=void 0;const n=r(18050),i=r(13252),a=r(29390);class o{constructor(e,t=new n.DataFactory){this.quotedTriplesDictionary=[],this.quotedTriplesReverseDictionary={},this.features={quotedTriples:!0},this.plainTermDictionary=e,this.dataFactory=t}encode(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!1):this.plainTermDictionary.encode(e)}encodeQuotedTriple(e,t){var r;if("DefaultGraph"!==e.graph.termType)throw new Error("Encoding of quoted quads outside of the default graph is not allowed");const n=null===(r=(0,a.encodeOptionalTerms)([e.subject,e.predicate,e.object,void 0],this))||void 0===r?void 0:r.slice(0,3),i=n&&n.every((e=>void 0!==e))?this.quotedTriplesReverseDictionary[n.join(o.SEPARATOR)]:void 0;if(void 0!==i||t)return void 0===i?void 0:o.BITMASK|i;const s=[this.encode(e.subject),this.encode(e.predicate),this.encode(e.object)],c=this.quotedTriplesDictionary.length+1;return this.quotedTriplesDictionary.push(s),this.quotedTriplesReverseDictionary[s.join(o.SEPARATOR)]=c,o.BITMASK|c}encodeOptional(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!0):this.plainTermDictionary.encodeOptional(e)}decode(e){if(o.BITMASK&e){const t=(~o.BITMASK&e)-1;if(t>=this.quotedTriplesDictionary.length)throw new Error(`The value ${e} is not present in the quoted triples range of the dictionary`);const r=this.quotedTriplesDictionary[t];return this.dataFactory.quad(this.decode(r[0]),this.decode(r[1]),this.decode(r[2]))}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.keys())yield o.BITMASK|1+e}*findQuotedTriples(e){for(const t of this.findQuotedTriplesEncoded(e))yield this.decode(t)}*findQuotedTriplesEncoded(e){for(let t of this.quotedTriplesDictionary.keys()){t=o.BITMASK|1+t;const r=this.decode(t);(0,i.matchPattern)(r,e.subject,e.predicate,e.object,e.graph)&&(yield t)}}}o.BITMASK=1<<31,o.SEPARATOR="_",t.TermDictionaryQuotedReferential=o},93616:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionarySymbol=void 0;const n=r(18050),i=r(22112);t.TermDictionarySymbol=class{constructor(e=new n.DataFactory){this.features={quotedTriples:!1},this.dataFactory=e}encode(e){return Symbol.for(`rdf::${(0,i.termToString)(e)}`)}encodeOptional(e){return this.encode(e)}decode(e){const t=Symbol.keyFor(e);if(void 0===t)throw new Error(`The value ${String(e)} is not present in this dictionary`);return(0,i.stringToTerm)(t.slice(5),this.dataFactory)}encodings(){throw new Error("encodings is not supported")}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},55100:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},95832:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMap=void 0;const n=r(29390);t.RdfStoreIndexNestedMap=class{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedMap=new Map}set(e,t){const r=this.nestedMap;let n=r.get(e[0]);n||(n=new Map,r.set(e[0],n));let i=n.get(e[1]);i||(i=new Map,n.set(e[1],i));let a=i.get(e[2]);a||(a=new Map,i.set(e[2],a));const o=a.has(e[3]);return o||a.set(e[3],t),!o}remove(e){const t=this.nestedMap,r=t.get(e[0]);if(!r)return!1;const n=r.get(e[1]);if(!n)return!1;const i=n.get(e[2]);if(!i)return!1;const a=i.delete(e[3]);return a&&0===i.size&&(n.delete(e[2]),0===n.size&&(r.delete(e[1]),0===r.size&&t.delete(e[0]))),a}get(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t&&!t.includes(void 0))return this.getEncoded(t)}getEncoded(e){const t=this.nestedMap.get(e[0]);if(!t)return;const r=t.get(e[1]);if(!r)return;const n=r.get(e[2]);return n?n.get(e[3]):void 0}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e;let d,p,h,f,y,g,m;const b=this.nestedMap,v=void 0!==r?b.has(r)?[r]:[]:b.keys();for(const e of v){y=b.get(e),d=s||this.dictionary.decode(e);const t=void 0!==i?y.has(i)?[i]:[]:y.keys();for(const e of t){g=y.get(e),p=c||this.dictionary.decode(e);const t=void 0!==a?g.has(a)?[a]:[]:g.keys();for(const e of t){m=g.get(e),h=u||this.dictionary.decode(e);const t=void 0!==o?m.has(o)?[o]:[]:m.keys();for(const e of t)f=l||this.dictionary.decode(e),yield[d,p,h,f]}}}}*findEncoded(e,t){const[r,n,i,a]=e;let o,s,c;const u=this.nestedMap,l=void 0!==r?u.has(r)?[r]:[]:u.keys();for(const e of l){o=u.get(e);const t=void 0!==n?o.has(n)?[n]:[]:o.keys();for(const r of t){s=o.get(r);const t=void 0!==i?s.has(i)?[i]:[]:s.keys();for(const n of t){c=s.get(n);const t=void 0!==a?c.has(a)?[a]:[]:c.keys();for(const i of t)yield[e,r,n,i]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const i=r[0],a=r[1],o=r[2],s=r[3];let c,u,l;const d=this.nestedMap,p=void 0!==i?d.has(i)?[i]:[]:d.keys();for(const e of p){c=d.get(e);const r=void 0!==a?c.has(a)?[a]:[]:c.keys();for(const e of r){u=c.get(e);const r=void 0!==o?u.has(o)?[o]:[]:u.keys();for(const e of r)l=u.get(e),void 0!==s?l.has(s)&&t++:t+=l.size}}return t}}},68752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMapQuoted=void 0;const n=r(29390),i=r(95832);class a extends i.RdfStoreIndexNestedMap{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*getQuotedPatternKeys(e,t){for(const r of this.dictionary.findQuotedTriplesEncoded(t))e.has(r)&&(yield r)}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e,[d,p,h,f]=(0,n.arePatternsQuoted)(e);let y,g,m,b,v,_,w;const T=this.nestedMap,S=void 0!==s?d?this.getQuotedPatternKeys(T,s):T.has(r)?[r]:[]:T.keys();for(const e of S){v=T.get(e),y=!d&&s?s:this.dictionary.decode(e);const t=void 0!==c?p?this.getQuotedPatternKeys(v,c):v.has(i)?[i]:[]:v.keys();for(const e of t){_=v.get(e),g=!p&&c?c:this.dictionary.decode(e);const t=void 0!==u?h?this.getQuotedPatternKeys(_,u):_.has(a)?[a]:[]:_.keys();for(const e of t){w=_.get(e),m=!h&&u?u:this.dictionary.decode(e);const t=void 0!==l?f?this.getQuotedPatternKeys(w,l):w.has(o)?[o]:[]:w.keys();for(const e of t)b=!f&&l?l:this.dictionary.decode(e),yield[y,g,m,b]}}}}*findEncoded(e,t){const[r,i,a,o]=e,[s,c,u,l]=t,[d,p,h,f]=(0,n.arePatternsQuoted)(t);let y,g,m;const b=this.nestedMap,v=void 0!==s?d?this.getQuotedPatternKeys(b,s):b.has(r)?[r]:[]:b.keys();for(const e of v){y=b.get(e);const t=void 0!==c?p?this.getQuotedPatternKeys(y,c):y.has(i)?[i]:[]:y.keys();for(const r of t){g=y.get(r);const t=void 0!==u?h?this.getQuotedPatternKeys(g,u):g.has(a)?[a]:[]:g.keys();for(const n of t){m=g.get(n);const t=void 0!==l?f?this.getQuotedPatternKeys(m,l):m.has(o)?[o]:[]:m.keys();for(const i of t)yield[Number.parseInt(e,10),Number.parseInt(r,10),Number.parseInt(n,10),Number.parseInt(i,10)]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const[i,a,o,s]=r,[c,u,l,d]=e,[p,h,f,y]=(0,n.arePatternsQuoted)(e);let g,m,b;const v=this.nestedMap,_=void 0!==c?p?this.getQuotedPatternKeys(v,c):v.has(i)?[i]:[]:v.keys();for(const e of _){g=v.get(e);const r=void 0!==u?h?this.getQuotedPatternKeys(g,u):g.has(a)?[a]:[]:g.keys();for(const e of r){m=g.get(e);const r=void 0!==l?f?this.getQuotedPatternKeys(m,l):m.has(o)?[o]:[]:m.keys();for(const e of r)b=m.get(e),void 0!==d?y?t+=[...this.getQuotedPatternKeys(b,d)].length:b.has(s)&&t++:t+=b.size}}return t}}t.RdfStoreIndexNestedMapQuoted=a},38654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMapRecursive=void 0;const n=r(29390);t.RdfStoreIndexNestedMapRecursive=class{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedMap=new Map}set(e,t){let r=this.nestedMap,n=!1;for(const[i,a]of e.entries()){const o=r;let s=o.get(a);s?i===e.length-1&&(n=!0):(s=i===e.length-1?t:new Map,o.set(a,s)),r=s}return!n}remove(e){const t=this.nestedMap,r=t.get(e[0]);if(!r)return!1;const n=r.get(e[1]);if(!n)return!1;const i=n.get(e[2]);if(!i)return!1;const a=i.delete(e[3]);return a&&0===i.size&&(n.delete(e[2]),0===n.size&&(r.delete(e[1]),0===r.size&&t.delete(e[0]))),a}get(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t&&!t.includes(void 0))return this.getEncoded(t)}getEncoded(e){const t=this.nestedMap.get(e[0]);if(!t)return;const r=t.get(e[1]);if(!r)return;const n=r.get(e[2]);return n?n.get(e[3]):void 0}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t)for(const r of this.findEncoded(t,e))yield[void 0!==t[0]?e[0]:this.dictionary.decode(r[0]),void 0!==t[1]?e[1]:this.dictionary.decode(r[1]),void 0!==t[2]?e[2]:this.dictionary.decode(r[2]),void 0!==t[3]?e[3]:this.dictionary.decode(r[3])]}*findEncoded(e,t){return yield*this.findEncodedInner(0,e,t,this.nestedMap,[])}*findEncodedInner(e,t,r,n,i){if(e===t.length)yield[...i];else{const a=t[e];if(r[e]){const o=a;if(void 0!==o){const s=n.get(o);s&&(i[e]=a,yield*this.findEncodedInner(e+1,t,r,s,i))}}else for(const[a,o]of n.entries())i[e]=a,yield*this.findEncodedInner(e+1,t,r,o,i)}}count(e){return this.countInner(0,e,this.nestedMap)}countInner(e,t,r){const n=t[e];let i=0;if(n){const a=this.dictionary.encodeOptional(n);if(void 0!==a){if(e===t.length-1)return r.has(a)?1:0;const n=r.get(a);n&&(i+=this.countInner(e+1,t,n))}}else{if(e===t.length-1)return r.size;for(const n of r.values())i+=this.countInner(e+1,t,n)}return i}}},15698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMapRecursiveQuoted=void 0;const n=r(29390),i=r(38654);class a extends i.RdfStoreIndexNestedMapRecursive{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*findEncoded(e,t){return yield*this.findEncodedInnerQuoted(0,e,t,(0,n.arePatternsQuoted)(t),this.nestedMap,[])}*findEncodedInnerQuoted(e,t,r,n,i,a){if(e===t.length)yield[...a];else{const o=t[e],s=r[e];if(s)if(n[e]){const o=this.dictionary.findQuotedTriplesEncoded(s);for(const s of o){const o=i.get(s);o&&(a[e]=s,yield*this.findEncodedInnerQuoted(e+1,t,r,n,o,a))}}else{const s=o;if(void 0!==s){const c=i.get(s);c&&(a[e]=o,yield*this.findEncodedInnerQuoted(e+1,t,r,n,c,a))}}else for(const[o,s]of i.entries())a[e]=o,yield*this.findEncodedInnerQuoted(e+1,t,r,n,s,a)}}countInner(e,t,r){const i=t[e];let a=0;if(i)if("Quad"===i.termType&&(0,n.quadHasVariables)(i)){const n=this.dictionary.findQuotedTriplesEncoded(i);for(const i of n)if(e===t.length-1)r.has(i)&&a++;else{const n=r.get(i);n&&(a+=this.countInner(e+1,t,n))}}else{const n=this.dictionary.encodeOptional(i);if(void 0!==n){if(e===t.length-1)return r.has(n)?1:0;const i=r.get(n);i&&(a+=this.countInner(e+1,t,i))}}else{if(e===t.length-1)return r.size;for(const n of r.values())a+=this.countInner(e+1,t,n)}return a}}t.RdfStoreIndexNestedMapRecursiveQuoted=a},53277:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedRecord=void 0;const n=r(29390);t.RdfStoreIndexNestedRecord=class{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedRecords={}}set(e,t){const r=this.nestedRecords,n=r[e[0]]||(r[e[0]]={}),i=n[e[1]]||(n[e[1]]={}),a=i[e[2]]||(i[e[2]]={});return!a[e[3]]&&(a[e[3]]=t,!0)}remove(e){const t=this.nestedRecords,r=t[e[0]];if(!r)return!1;const n=r[e[1]];if(!n)return!1;const i=n[e[2]];return!!i&&!!i[e[3]]&&(delete i[e[3]],0===Object.keys(i).length&&(delete n[e[2]],0===Object.keys(n).length&&(delete r[e[1]],0===Object.keys(r).length&&delete t[e[0]])),!0)}get(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t&&!t.includes(void 0))return this.getEncoded(t)}getEncoded(e){var t,r,n;return null===(n=null===(r=null===(t=this.nestedRecords[e[0]])||void 0===t?void 0:t[e[1]])||void 0===r?void 0:r[e[2]])||void 0===n?void 0:n[e[3]]}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e;let d,p,h,f,y,g,m;const b=this.nestedRecords,v=void 0!==r?r in b?[r]:[]:Object.keys(b);for(const e of v){y=b[e],d=s||this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==i?i in y?[i]:[]:Object.keys(y);for(const e of t){g=y[e],p=c||this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==a?a in g?[a]:[]:Object.keys(g);for(const e of t){m=g[e],h=u||this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==o?o in m?[o]:[]:Object.keys(m);for(const e of t)f=l||this.dictionary.decode(Number.parseInt(e,10)),yield[d,p,h,f]}}}}*findEncoded(e,t){const[r,n,i,a]=e;let o,s,c;const u=this.nestedRecords,l=void 0!==r?r in u?[r]:[]:Object.keys(u);for(const e of l){o=u[e];const t=void 0!==n?n in o?[n]:[]:Object.keys(o);for(const r of t){s=o[r];const t=void 0!==i?i in s?[i]:[]:Object.keys(s);for(const n of t){c=s[n];const t=void 0!==a?a in c?[a]:[]:Object.keys(c);for(const i of t)yield[Number.parseInt(e,10),Number.parseInt(r,10),Number.parseInt(n,10),Number.parseInt(i,10)]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const i=r[0],a=r[1],o=r[2],s=r[3];let c,u,l;const d=this.nestedRecords,p=void 0!==i?i in d?[i]:[]:Object.keys(d);for(const e of p){c=d[e];const r=void 0!==a?a in c?[a]:[]:Object.keys(c);for(const e of r){u=c[e];const r=void 0!==o?o in u?[o]:[]:Object.keys(u);for(const e of r)l=u[e],void 0!==s?s in l&&t++:t+=Object.keys(l).length}}return t}}},86937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedRecordQuoted=void 0;const n=r(29390),i=r(53277);class a extends i.RdfStoreIndexNestedRecord{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*getQuotedPatternKeys(e,t){for(const r of this.dictionary.findQuotedTriplesEncoded(t))r in e&&(yield r)}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e,[d,p,h,f]=(0,n.arePatternsQuoted)(e);let y,g,m,b,v,_,w;const T=this.nestedRecords,S=void 0!==s?d?this.getQuotedPatternKeys(T,s):r in T?[r]:[]:Object.keys(T);for(const e of S){v=T[e],y=!d&&s?s:this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==c?p?this.getQuotedPatternKeys(v,c):i in v?[i]:[]:Object.keys(v);for(const e of t){_=v[e],g=!p&&c?c:this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==u?h?this.getQuotedPatternKeys(_,u):a in _?[a]:[]:Object.keys(_);for(const e of t){w=_[e],m=!h&&u?u:this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==l?f?this.getQuotedPatternKeys(w,l):o in w?[o]:[]:Object.keys(w);for(const e of t)b=!f&&l?l:this.dictionary.decode(Number.parseInt(e,10)),yield[y,g,m,b]}}}}*findEncoded(e,t){const[r,i,a,o]=e,[s,c,u,l]=t,[d,p,h,f]=(0,n.arePatternsQuoted)(t);let y,g,m;const b=this.nestedRecords,v=void 0!==s?d?this.getQuotedPatternKeys(b,s):r in b?[r]:[]:Object.keys(b);for(const e of v){y=b[e];const t=void 0!==c?p?this.getQuotedPatternKeys(y,c):i in y?[i]:[]:Object.keys(y);for(const r of t){g=y[r];const t=void 0!==u?h?this.getQuotedPatternKeys(g,u):a in g?[a]:[]:Object.keys(g);for(const n of t){m=g[n];const t=void 0!==l?f?this.getQuotedPatternKeys(m,l):o in m?[o]:[]:Object.keys(m);for(const i of t)yield[Number.parseInt(e,10),Number.parseInt(r,10),Number.parseInt(n,10),Number.parseInt(i,10)]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const[i,a,o,s]=r,[c,u,l,d]=e,[p,h,f,y]=(0,n.arePatternsQuoted)(e);let g,m,b;const v=this.nestedRecords,_=void 0!==c?p?this.getQuotedPatternKeys(v,c):i in v?[i]:[]:Object.keys(v);for(const e of _){g=v[e];const r=void 0!==u?h?this.getQuotedPatternKeys(g,u):a in g?[a]:[]:Object.keys(g);for(const e of r){m=g[e];const r=void 0!==l?f?this.getQuotedPatternKeys(m,l):o in m?[o]:[]:Object.keys(m);for(const e of r)b=m[e],void 0!==d?y?t+=[...this.getQuotedPatternKeys(b,d)].length:s in b&&t++:t+=Object.keys(b).length}}return t}}t.RdfStoreIndexNestedRecordQuoted=a},2887:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(32935),t),i(r(73974),t)},32935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PendingStreamsIndex=void 0;const n=r(22112),i=r(13252);class a{constructor(){this.indexedStreams=new Map,this.allStreams=[]}termToString(e){return e&&"Variable"!==e.termType?(0,n.termToString)(e):a.ID_VARIABLE}addPatternListener(e,t,r,n,i){this.allStreams.push(e);const o=`${this.termToString(t)}${a.ID_SEPARATOR}${this.termToString(r)}${a.ID_SEPARATOR}${this.termToString(n)}${a.ID_SEPARATOR}${this.termToString(i)}`;let s=this.indexedStreams.get(o);s||(s=[],this.indexedStreams.set(o,s)),s.push(e)}getPendingStreamsForQuad(e){let t=[(0,i.getTerms)(e).map((e=>(0,n.termToString)(e)))];for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingStore=void 0;const n=r(72243),i=r(58521),a=r(32935);t.StreamingStore=class{constructor(e=new n.Store){this.pendingStreams=new a.PendingStreamsIndex,this.ended=!1,this.store=e}end(){this.ended=!0;for(const e of this.pendingStreams.allStreams)e.push(null),e._pipeSource.unpipe()}importToListeners(e){e.on("data",(e=>{if(!this.ended&&!this.store.countQuads(e.subject,e.predicate,e.object,e.graph))for(const t of this.pendingStreams.getPendingStreamsForQuad(e))t.isInitialized&&(t.push(e),t.emit("quad",e))}))}import(e){if(this.ended)throw new Error("Attempted to import into an ended StreamingStore");return this.importToListeners(e),this.store.import(e)}match(e,t,r,n){const a=this.store.match(e,t,r,n);let o=a;if(!this.ended){const s=new i.PassThrough({objectMode:!0});this.pendingStreams.addPatternListener(s,e,t,r,n),o=a.pipe(s,{end:!1}),o._pipeSource=a;const c=a._read;a._read=e=>{s.isInitialized=!0,c.call(a,e)}}return o}getStore(){return this.store}}},64817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.termToString=t.stringToTerm=t.stringQuadToQuad=t.quadToStringQuad=t.getLiteralValue=t.getLiteralType=t.getLiteralLanguage=void 0;const n=r(91379);Object.defineProperty(t,"getLiteralLanguage",{enumerable:!0,get:function(){return n.getLiteralLanguage}}),Object.defineProperty(t,"getLiteralType",{enumerable:!0,get:function(){return n.getLiteralType}}),Object.defineProperty(t,"getLiteralValue",{enumerable:!0,get:function(){return n.getLiteralValue}}),Object.defineProperty(t,"quadToStringQuad",{enumerable:!0,get:function(){return n.quadToStringQuad}}),Object.defineProperty(t,"stringQuadToQuad",{enumerable:!0,get:function(){return n.stringQuadToQuad}}),Object.defineProperty(t,"stringToTerm",{enumerable:!0,get:function(){return n.stringToTerm}}),Object.defineProperty(t,"termToString",{enumerable:!0,get:function(){return n.termToString}})},91379:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringQuadToQuad=t.quadToStringQuad=t.stringToTerm=t.getLiteralLanguage=t.getLiteralType=t.getLiteralValue=t.termToString=void 0;const n=new(r(18050).DataFactory);function i(e){var t,r;if(e)switch(e.termType){case"NamedNode":return`<${t=e.value,t.replace(u,d)}>`;case"BlankNode":return`_:${e.value}`;case"Literal":{const t=e;return`"${r=t.value,u.test(r)&&(r=r.replace(u,d)),r}"${t.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==t.datatype.value&&"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"!==t.datatype.value?`^^<${t.datatype.value}>`:""}${t.language?`@${t.language}`:""}`}case"Quad":return`<<${i(e.subject)} ${i(e.predicate)} ${i(e.object)}${"DefaultGraph"===e.graph.termType?"":` ${i(e.graph)}`}>>`;case"Variable":return`?${e.value}`;case"DefaultGraph":return e.value}}function a(e){const t=/^"([^]*)"((\^\^.*)|(@.*))?$/u.exec(e);if(!t)throw new Error(`${e} is not a literal`);return t[1].replace(/\\"/gu,'"')}function o(e){const t=/^"[^]*"(?:\^\^<([^"]+)>|(@)[^@"]+)?$/u.exec(e);if(!t)throw new Error(`${e} is not a literal`);return t[1]||(t[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")}function s(e){const t=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/u.exec(e);if(!t)throw new Error(`${e} is not a literal`);return t[1]?t[1].toLowerCase():""}function c(e,t){if(t=t||n,!e||0===e.length)return t.defaultGraph();switch(e[0]){case"_":return t.blankNode(e.slice(2));case"?":if(!t.variable)throw new Error("Missing 'variable()' method on the given DataFactory");return t.variable(e.slice(1));case'"':{const r=s(e),n=t.namedNode(o(e));return t.literal(a(e),r||n)}default:if(e.startsWith("<<")&&e.endsWith(">>")){const r=e.slice(2,-2),n=[];let i=0,a=0;for(let t=0;t"===o){if(0===i)throw new Error(`Found closing tag without opening tag in ${e}`);i--}" "===o&&0===i&&(n.push(r.slice(a,t)),a=t+1)}if(0!==i)throw new Error(`Found opening tag without closing tag in ${e}`);if(n.push(r.slice(a,r.length)),3!==n.length&&4!==n.length)throw new Error(`Nested quad syntax error ${e}`);return t.quad(c(n[0]),c(n[1]),c(n[2]),n[3]?c(n[3]):void 0)}if(!e.startsWith("<")||!e.endsWith(">"))throw new Error(`Detected invalid iri for named node (must be wrapped in <>): ${e}`);return t.namedNode(e.slice(1,-1))}}t.termToString=i,t.getLiteralValue=a,t.getLiteralType=o,t.getLiteralLanguage=s,t.stringToTerm=c,t.quadToStringQuad=function(e){return{subject:i(e.subject),predicate:i(e.predicate),object:i(e.object),graph:i(e.graph)}},t.stringQuadToQuad=function(e,t){return(t=t||n).quad(c(e.subject,t),c(e.predicate,t),c(e.object,t),c(e.graph,t))};const u=/["\\\t\n\r\b\f\u0000-\u0019]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=new Map([["\\","\\\\"],['"','\\"'],["\t","\\t"],["\n","\\n"],["\r","\\r"],["\b","\\b"],["\f","\\f"]]);function d(e){const t=l.get(e);if(!t){if(1===e.length){const t=e.charCodeAt(0).toString(16);return`${"\\u0000".slice(0,-t.length)}${t}`}const t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16);return`${"\\U00000000".slice(0,-t.length)}${t}`}return t}},22112:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.termToString=t.stringToTerm=t.stringQuadToQuad=t.quadToStringQuad=t.getLiteralValue=t.getLiteralType=t.getLiteralLanguage=void 0;const n=r(48244);Object.defineProperty(t,"getLiteralLanguage",{enumerable:!0,get:function(){return n.getLiteralLanguage}}),Object.defineProperty(t,"getLiteralType",{enumerable:!0,get:function(){return n.getLiteralType}}),Object.defineProperty(t,"getLiteralValue",{enumerable:!0,get:function(){return n.getLiteralValue}}),Object.defineProperty(t,"quadToStringQuad",{enumerable:!0,get:function(){return n.quadToStringQuad}}),Object.defineProperty(t,"stringQuadToQuad",{enumerable:!0,get:function(){return n.stringQuadToQuad}}),Object.defineProperty(t,"stringToTerm",{enumerable:!0,get:function(){return n.stringToTerm}}),Object.defineProperty(t,"termToString",{enumerable:!0,get:function(){return n.termToString}})},48244:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringQuadToQuad=t.quadToStringQuad=t.stringToTerm=t.getLiteralLanguage=t.getLiteralType=t.getLiteralValue=t.termToString=void 0;const n=new(r(18050).DataFactory);function i(e){if(e)switch(e.termType){case"NamedNode":case"DefaultGraph":return e.value;case"BlankNode":return"_:"+e.value;case"Literal":const t=e;return'"'+t.value+'"'+(t.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==t.datatype.value&&"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"!==t.datatype.value?"^^"+t.datatype.value:"")+(t.language?"@"+t.language:"");case"Quad":return`<<${i(e.subject)} ${i(e.predicate)} ${i(e.object)}${"DefaultGraph"===e.graph.termType?"":" "+i(e.graph)}>>`;case"Variable":return"?"+e.value}}function a(e){const t=/^"([^]*)"/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]}function o(e){const t=/^"[^]*"(?:\^\^([^"]+)|(@)[^@"]+)?$/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]||(t[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")}function s(e){const t=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]?t[1].toLowerCase():""}function c(e,t){if(t=t||n,!e||!e.length)return t.defaultGraph();switch(e[0]){case"_":return t.blankNode(e.substr(2));case"?":if(!t.variable)throw new Error("Missing 'variable()' method on the given DataFactory");return t.variable(e.substr(1));case'"':const r=s(e),n=t.namedNode(o(e));return t.literal(a(e),r||n);default:if("<"===e[0]&&e.length>4&&"<"===e[1]&&">"===e[e.length-1]&&">"===e[e.length-2]){const r=e.slice(2,-2).trim();let n=[],i=0,a=0,o=!1;for(let t=0;t"===s){if(0===i)throw new Error("Found closing tag without opening tag in "+e);i--}if('"'===s){let e=!1,n=t;for(;n-- >0&&"\\"===r[n];)e=!e;e||(o=!o)}if(" "===s&&!o&&0===i){for(n.push(r.slice(a,t));" "===r[t+1];)t+=1;a=t+1}}if(0!==i)throw new Error("Found opening tag without closing tag in "+e);if(n.push(r.slice(a,r.length)),3!==n.length&&4!==n.length)throw new Error("Nested quad syntax error "+e);return n=n.map((e=>e.startsWith("<")&&!e.includes(" ")?e.slice(1,-1):e)),t.quad(c(n[0]),c(n[1]),c(n[2]),n[3]?c(n[3]):void 0)}return t.namedNode(e)}}t.termToString=i,t.getLiteralValue=a,t.getLiteralType=o,t.getLiteralLanguage=s,t.stringToTerm=c,t.quadToStringQuad=function(e){return{subject:i(e.subject),predicate:i(e.predicate),object:i(e.object),graph:i(e.graph)}},t.stringQuadToQuad=function(e,t){return(t=t||n).quad(c(e.subject,t),c(e.predicate,t),c(e.object,t),c(e.graph,t))}},13252:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(10175),t),i(r(86552),t)},10175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchPatternMappings=t.matchPatternComplete=t.matchPattern=t.matchTerm=t.getValueNestedPath=t.someTermsNested=t.someTerms=t.everyTermsNested=t.everyTerms=t.reduceTermsNested=t.reduceTerms=t.mapTermsNested=t.mapTerms=t.filterQuadTermNamesNested=t.filterQuadTermNames=t.filterTermsNested=t.filterTerms=t.forEachTermsNested=t.forEachTerms=t.collectNamedTerms=t.getNamedTerms=t.getTermsNested=t.getTerms=t.TRIPLE_TERM_NAMES=t.QUAD_TERM_NAMES=void 0;const n=new(r(18050).DataFactory);function i(e,t){return t&&"DefaultGraph"===e.graph.termType?[e.subject,e.predicate,e.object]:[e.subject,e.predicate,e.object,e.graph]}function a(e,t){return t(e.subject,"subject")&&t(e.predicate,"predicate")&&t(e.object,"object")&&t(e.graph,"graph")}function o(e,t){return!t||"Variable"===t.termType||"Quad"===t.termType&&"Quad"===e.termType&&c(e,t)||t.equals(e)}function s(e,t,r,n,i){return o(e.subject,t)&&o(e.predicate,r)&&o(e.object,n)&&o(e.graph,i)}function c(e,t){return s(e,t.subject,t.predicate,t.object,t.graph)}t.QUAD_TERM_NAMES=["subject","predicate","object","graph"],t.TRIPLE_TERM_NAMES=["subject","predicate","object"],t.getTerms=i,t.getTermsNested=function e(t,r){const n=[];for(const a of i(t,r))"Quad"===a.termType?e(a,r).forEach((e=>n.push(e))):n.push(a);return n},t.getNamedTerms=function(e){return[{key:"subject",value:e.subject},{key:"predicate",value:e.predicate},{key:"object",value:e.object},{key:"graph",value:e.graph}]},t.collectNamedTerms=function(e,t,r){const i={};return e.forEach((e=>i[e.key]=e.value)),t&&(i.subject=i.subject||t("subject"),i.predicate=i.predicate||t("predicate"),i.object=i.object||t("object"),i.graph=i.graph||t("graph")),(r||n).quad(i.subject,i.predicate,i.object,i.graph)},t.forEachTerms=function(e,t){t(e.subject,"subject"),t(e.predicate,"predicate"),t(e.object,"object"),t(e.graph,"graph")},t.forEachTermsNested=function e(t,r,n=[]){"Quad"===t.subject.termType?e(t.subject,r,[...n,"subject"]):r(t.subject,[...n,"subject"]),"Quad"===t.predicate.termType?e(t.predicate,r,[...n,"predicate"]):r(t.predicate,[...n,"predicate"]),"Quad"===t.object.termType?e(t.object,r,[...n,"object"]):r(t.object,[...n,"object"]),"Quad"===t.graph.termType?e(t.graph,r,[...n,"graph"]):r(t.graph,[...n,"graph"])},t.filterTerms=function(e,t){const r=[];return t(e.subject,"subject")&&r.push(e.subject),t(e.predicate,"predicate")&&r.push(e.predicate),t(e.object,"object")&&r.push(e.object),t(e.graph,"graph")&&r.push(e.graph),r},t.filterTermsNested=function e(t,r,n=[]){let i=[];return"Quad"===t.subject.termType?i=[...i,...e(t.subject,r,[...n,"subject"])]:r(t.subject,[...n,"subject"])&&i.push(t.subject),"Quad"===t.predicate.termType?i=[...i,...e(t.predicate,r,[...n,"predicate"])]:r(t.predicate,[...n,"predicate"])&&i.push(t.predicate),"Quad"===t.object.termType?i=[...i,...e(t.object,r,[...n,"object"])]:r(t.object,[...n,"object"])&&i.push(t.object),"Quad"===t.graph.termType?i=[...i,...e(t.graph,r,[...n,"graph"])]:r(t.graph,[...n,"graph"])&&i.push(t.graph),i},t.filterQuadTermNames=function(e,t){const r=[];return t(e.subject,"subject")&&r.push("subject"),t(e.predicate,"predicate")&&r.push("predicate"),t(e.object,"object")&&r.push("object"),t(e.graph,"graph")&&r.push("graph"),r},t.filterQuadTermNamesNested=function e(t,r,n=[]){let i=[];const a=[...n,"subject"];"Quad"===t.subject.termType?i=[...i,...e(t.subject,r,a)]:r(t.subject,a)&&i.push(a);const o=[...n,"predicate"];"Quad"===t.predicate.termType?i=[...i,...e(t.predicate,r,o)]:r(t.predicate,o)&&i.push(o);const s=[...n,"object"];"Quad"===t.object.termType?i=[...i,...e(t.object,r,s)]:r(t.object,s)&&i.push(s);const c=[...n,"graph"];return"Quad"===t.graph.termType?i=[...i,...e(t.graph,r,c)]:r(t.graph,c)&&i.push(c),i},t.mapTerms=function(e,t,r){return(r||n).quad(t(e.subject,"subject"),t(e.predicate,"predicate"),t(e.object,"object"),t(e.graph,"graph"))},t.mapTermsNested=function e(t,r,i,a=[]){return(i||n).quad("Quad"===t.subject.termType?e(t.subject,r,i,[...a,"subject"]):r(t.subject,[...a,"subject"]),"Quad"===t.predicate.termType?e(t.predicate,r,i,[...a,"predicate"]):r(t.predicate,[...a,"predicate"]),"Quad"===t.object.termType?e(t.object,r,i,[...a,"object"]):r(t.object,[...a,"object"]),"Quad"===t.graph.termType?e(t.graph,r,i,[...a,"graph"]):r(t.graph,[...a,"graph"]))},t.reduceTerms=function(e,t,r){let n=r;return n=t(n,e.subject,"subject"),n=t(n,e.predicate,"predicate"),n=t(n,e.object,"object"),t(n,e.graph,"graph")},t.reduceTermsNested=function e(t,r,n,i=[]){let a=n;return a="Quad"===t.subject.termType?e(t.subject,r,a,[...i,"subject"]):r(a,t.subject,[...i,"subject"]),a="Quad"===t.predicate.termType?e(t.predicate,r,a,[...i,"predicate"]):r(a,t.predicate,[...i,"predicate"]),a="Quad"===t.object.termType?e(t.object,r,a,[...i,"object"]):r(a,t.object,[...i,"object"]),a="Quad"===t.graph.termType?e(t.graph,r,a,[...i,"graph"]):r(a,t.graph,[...i,"graph"]),a},t.everyTerms=a,t.everyTermsNested=function e(t,r,n=[]){return("Quad"===t.subject.termType?e(t.subject,r,[...n,"subject"]):r(t.subject,[...n,"subject"]))&&("Quad"===t.predicate.termType?e(t.predicate,r,[...n,"predicate"]):r(t.predicate,[...n,"predicate"]))&&("Quad"===t.object.termType?e(t.object,r,[...n,"object"]):r(t.object,[...n,"object"]))&&("Quad"===t.graph.termType?e(t.graph,r,[...n,"graph"]):r(t.graph,[...n,"graph"]))},t.someTerms=function(e,t){return t(e.subject,"subject")||t(e.predicate,"predicate")||t(e.object,"object")||t(e.graph,"graph")},t.someTermsNested=function e(t,r,n=[]){return("Quad"===t.subject.termType?e(t.subject,r,[...n,"subject"]):r(t.subject,[...n,"subject"]))||("Quad"===t.predicate.termType?e(t.predicate,r,[...n,"predicate"]):r(t.predicate,[...n,"predicate"]))||("Quad"===t.object.termType?e(t.object,r,[...n,"object"]):r(t.object,[...n,"object"]))||("Quad"===t.graph.termType?e(t.graph,r,[...n,"graph"]):r(t.graph,[...n,"graph"]))},t.getValueNestedPath=function e(t,r){if(0===r.length)return t;if("Quad"===t.termType)return e(t[r[0]],r.slice(1));throw new Error(`Tried to get ${r[0]} from term of type ${t.termType}`)},t.matchTerm=o,t.matchPattern=s,t.matchPatternComplete=c,t.matchPatternMappings=function(e,t,r={}){const n={};return function e(t,i){return a(t,((t,a)=>{var o,s;const c=i[a];switch(t.termType){case"Variable":return r.skipVarMapping&&"Variable"===c.termType||(null!==(s=null===(o=n[t.value])||void 0===o?void 0:o.equals(c))&&void 0!==s?s:(n[t.value]=c,!0));case"Quad":return"Quad"===c.termType&&e(t,c);default:return t.equals(c)}}))}(t,e)&&(!r.returnMappings||n)}},86552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQuads=t.getDefaultGraphs=t.getVariables=t.getLiterals=t.getBlankNodes=t.getNamedNodes=t.getTermsOfType=t.uniqTerms=t.TERM_TYPES=void 0;const n=r(22112);function i(e,t){return e.filter((e=>e.termType===t))}t.TERM_TYPES=["NamedNode","BlankNode","Literal","Variable","DefaultGraph","Quad"],t.uniqTerms=function(e){const t={};return e.filter((e=>{const r=(0,n.termToString)(e);return!(r in t)&&(t[r]=!0)}))},t.getTermsOfType=i,t.getNamedNodes=function(e){return i(e,"NamedNode")},t.getBlankNodes=function(e){return i(e,"BlankNode")},t.getLiterals=function(e){return i(e,"Literal")},t.getVariables=function(e){return i(e,"Variable")},t.getDefaultGraphs=function(e){return i(e,"DefaultGraph")},t.getQuads=function(e){return i(e,"Quad")}},21860:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(29145),t),i(r(55623),t),i(r(98532),t),i(r(59638),t),i(r(24012),t),i(r(69994),t)},29145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},55623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},98532:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},59638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfaParser=void 0;const n=r(15482),i=r(58521),a=r(45497),o=r(68713),s=r(24012),c=r(69994);class u extends i.Transform{constructor(e){super({readableObjectMode:!0}),this.activeTagStack=[],e=e||{},this.options=e,this.util=new c.Util(e.dataFactory,e.baseIRI),this.defaultGraph=e.defaultGraph||this.util.dataFactory.defaultGraph();const t=e.contentType?c.Util.contentTypeToProfile(e.contentType):e.profile||"";this.features=e.features||s.RDFA_FEATURES[t],this.htmlParseListener=e.htmlParseListener,this.rdfaPatterns=this.features.copyRdfaPatterns?{}:null,this.pendingRdfaPatternCopies=this.features.copyRdfaPatterns?{}:null,this.parser=this.initializeParser("xml"===t),this.activeTagStack.push({incompleteTriples:[],inlist:!1,language:e.language,listMapping:{},listMappingLocal:{},name:"",prefixesAll:Object.assign(Object.assign({},o["@context"]),this.features.xhtmlInitialContext?a["@context"]:{}),prefixesCustom:{},skipElement:!1,vocab:e.vocab})}import(e){const t=new i.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new u(this.options));return r}_transform(e,t,r){this.parser.write(e.toString()),r()}_flush(e){this.parser.end(),e()}onTagOpen(e,t){let r=this.activeTagStack.length-1;for(;r>0&&this.activeTagStack[r].skipElement;)r--;let n=this.activeTagStack[r];r!==this.activeTagStack.length-1&&(n=Object.assign(Object.assign({},n),{language:this.activeTagStack[this.activeTagStack.length-1].language,prefixesAll:this.activeTagStack[this.activeTagStack.length-1].prefixesAll,prefixesCustom:this.activeTagStack[this.activeTagStack.length-1].prefixesCustom,vocab:this.activeTagStack[this.activeTagStack.length-1].vocab}));const i={collectChildTags:n.collectChildTags,incompleteTriples:[],inlist:"inlist"in t,listMapping:[],listMappingLocal:n.listMapping,localBaseIRI:n.localBaseIRI,name:e,prefixesAll:null,prefixesCustom:null,skipElement:!1};if(this.activeTagStack.push(i),i.collectChildTags){for(const e of Object.keys(n.prefixesCustom).sort()){const r=n.prefixesCustom[e],i=""===e?"xmlns":"xmlns:"+e;i in t||(t[i]=r)}const r=Object.keys(t).map((e=>`${e}="${t[e]}"`)).join(" ");if(i.text=[`<${e}${r?" "+r:""}>`],this.features.skipHandlingXmlLiteralChildren)return}let a,o,s,u=!0,l=!0;if(this.features.onlyAllowUriRelRevIfProperty&&("property"in t&&"rel"in t&&(u=!1,t.rel.indexOf(":")<0&&delete t.rel),"property"in t&&"rev"in t&&(l=!1,t.rev.indexOf(":")<0&&delete t.rev)),this.features.copyRdfaPatterns){if(n.collectedPatternTag){const r={attributes:t,children:[],name:e,referenced:!1,rootPattern:!1,text:[]};return n.collectedPatternTag.children.push(r),void(i.collectedPatternTag=r)}if("rdfa:Pattern"===t.typeof)return void(i.collectedPatternTag={attributes:t,children:[],name:e,parentTag:n,referenced:!1,rootPattern:!0,text:[]});if("rdfa:copy"===t.property){const e=t.resource||t.href||t.src;return void(this.rdfaPatterns[e]?this.emitPatternCopy(n,this.rdfaPatterns[e],e):(this.pendingRdfaPatternCopies[e]||(this.pendingRdfaPatternCopies[e]=[]),this.pendingRdfaPatternCopies[e].push(n)))}}if(this.features.baseTag&&"base"===e&&t.href&&(this.util.baseIRI=this.util.getBaseIRI(t.href)),this.features.xmlBase&&t["xml:base"]&&(i.localBaseIRI=this.util.getBaseIRI(t["xml:base"])),this.features.timeTag&&"time"===e&&!t.datatype&&(i.interpretObjectAsTime=!0),"vocab"in t?t.vocab?(i.vocab=t.vocab,this.emitTriple(this.util.getBaseIriTerm(i),this.util.dataFactory.namedNode(c.Util.RDFA+"usesVocabulary"),this.util.dataFactory.namedNode(i.vocab))):i.vocab=this.activeTagStack[0].vocab:i.vocab=n.vocab,i.prefixesCustom=c.Util.parsePrefixes(t,n.prefixesCustom,this.features.xmlnsPrefixMappings),i.prefixesAll=Object.keys(i.prefixesCustom).length>0?Object.assign(Object.assign({},n.prefixesAll),i.prefixesCustom):n.prefixesAll,this.features.roleAttribute&&t.role){const e=t.id?this.util.createIri("#"+t.id,i,!1,!1,!1):this.util.createBlankNode(),r=i.vocab;i.vocab="http://www.w3.org/1999/xhtml/vocab#";for(const r of this.util.createVocabIris(t.role,i,!0,!1))this.emitTriple(e,this.util.dataFactory.namedNode("http://www.w3.org/1999/xhtml/vocab#role"),r);i.vocab=r}"xml:lang"in t||this.features.langAttribute&&"lang"in t?i.language=t["xml:lang"]||t.lang:i.language=n.language;const d=2===this.activeTagStack.length;if("rel"in t||"rev"in t?("about"in t?(a=this.util.createIri(t.about,i,!1,!0,!0),i.explicitNewSubject=!!a,"typeof"in t&&(s=a)):d?a=!0:n.object&&(a=n.object),"resource"in t&&(o=this.util.createIri(t.resource,i,!1,!0,!0)),o||("href"in t||"src"in t?o=this.util.createIri(t.href||t.src,i,!1,!1,!0):!("typeof"in t)||"about"in t||this.isInheritSubjectInHeadBody(e)||(o=this.util.createBlankNode())),"typeof"in t&&!("about"in t)&&(s=this.isInheritSubjectInHeadBody(e)?a:o)):!("property"in t)||"content"in t||"datatype"in t?(("about"in t||"resource"in t)&&(a=this.util.createIri(t.about||t.resource,i,!1,!0,!0),i.explicitNewSubject=!!a),a||!("href"in t)&&!("src"in t)||(a=this.util.createIri(t.href||t.src,i,!1,!1,!0),i.explicitNewSubject=!!a),a||(d?a=!0:this.isInheritSubjectInHeadBody(e)?a=n.object:"typeof"in t?(a=this.util.createBlankNode(),i.explicitNewSubject=!0):n.object&&(a=n.object,"property"in t||(i.skipElement=!0))),"typeof"in t&&(s=a)):("about"in t?(a=this.util.createIri(t.about,i,!1,!0,!0),i.explicitNewSubject=!!a):d?a=!0:n.object&&(a=n.object),"typeof"in t&&("about"in t&&(s=this.util.createIri(t.about,i,!1,!0,!0)),!s&&d&&(s=!0),!s&&"resource"in t&&(s=this.util.createIri(t.resource,i,!1,!0,!0)),s||!("href"in t)&&!("src"in t)||(s=this.util.createIri(t.href||t.src,i,!1,!1,!0)),!s&&this.isInheritSubjectInHeadBody(e)&&(s=a),s||(s=this.util.createBlankNode()),o=s)),s)for(const e of this.util.createVocabIris(t.typeof,i,!0,!0))this.emitTriple(this.util.getResourceOrBaseIri(s,i),this.util.dataFactory.namedNode(c.Util.RDF+"type"),e);if(a&&(i.listMapping={}),o){if("rel"in t&&"inlist"in t)for(const e of this.util.createVocabIris(t.rel,i,u,!1))this.addListMapping(i,a,e,o);if(!("rel"in t)||!("inlist"in t)){if("rel"in t)for(const e of this.util.createVocabIris(t.rel,i,u,!1))this.emitTriple(this.util.getResourceOrBaseIri(a,i),e,this.util.getResourceOrBaseIri(o,i));if("rev"in t)for(const e of this.util.createVocabIris(t.rev,i,l,!1))this.emitTriple(this.util.getResourceOrBaseIri(o,i),e,this.util.getResourceOrBaseIri(a,i))}}if(!o){if("rel"in t)if("inlist"in t)for(const e of this.util.createVocabIris(t.rel,i,u,!1))this.addListMapping(i,a,e,null),i.incompleteTriples.push({predicate:e,reverse:!1,list:!0});else for(const e of this.util.createVocabIris(t.rel,i,u,!1))i.incompleteTriples.push({predicate:e,reverse:!1});if("rev"in t)for(const e of this.util.createVocabIris(t.rev,i,l,!1))i.incompleteTriples.push({predicate:e,reverse:!0});i.incompleteTriples.length>0&&(o=this.util.createBlankNode())}if("property"in t){let e;if(i.predicates=this.util.createVocabIris(t.property,i,!0,!1),"datatype"in t?(i.datatype=this.util.createIri(t.datatype,i,!0,!0,!1),i.datatype&&(i.datatype.value===c.Util.RDF+"XMLLiteral"||this.features.htmlDatatype&&i.datatype.value===c.Util.RDF+"HTML")&&(i.collectChildTags=!0)):("rev"in t||"rel"in t||"content"in t||("resource"in t&&(e=this.util.createIri(t.resource,i,!1,!0,!0)),!e&&"href"in t&&(e=this.util.createIri(t.href,i,!1,!1,!0)),!e&&"src"in t&&(e=this.util.createIri(t.src,i,!1,!1,!0))),"typeof"in t&&!("about"in t)&&(e=s)),"content"in t){const e=this.util.createLiteral(t.content,i);if("inlist"in t)for(const t of i.predicates)this.addListMapping(i,a,t,e);else{const t=this.util.getResourceOrBaseIri(a,i);for(const r of i.predicates)this.emitTriple(t,r,e)}i.predicates=null}else if(this.features.datetimeAttribute&&"datetime"in t){i.interpretObjectAsTime=!0;const e=this.util.createLiteral(t.datetime,i);if("inlist"in t)for(const t of i.predicates)this.addListMapping(i,a,t,e);else{const t=this.util.getResourceOrBaseIri(a,i);for(const r of i.predicates)this.emitTriple(t,r,e)}i.predicates=null}else if(e){const r=this.util.getResourceOrBaseIri(e,i);if("inlist"in t)for(const e of i.predicates)this.addListMapping(i,a,e,r);else{const e=this.util.getResourceOrBaseIri(a,i);for(const t of i.predicates)this.emitTriple(e,t,r)}i.predicates=null}}let p=!1;if(!i.skipElement&&a&&n.incompleteTriples.length>0){p=!0;const e=this.util.getResourceOrBaseIri(n.subject,i),t=this.util.getResourceOrBaseIri(a,i);for(const r of n.incompleteTriples)if(r.reverse)this.emitTriple(t,r.predicate,e);else if(r.list){let e=null;for(let t=this.activeTagStack.length-1;t>=0;t--)if(this.activeTagStack[t].inlist){e=this.activeTagStack[t];break}this.addListMapping(e,a,r.predicate,t)}else this.emitTriple(e,r.predicate,t)}!p&&n.incompleteTriples.length>0&&(i.incompleteTriples=i.incompleteTriples.concat(n.incompleteTriples)),i.subject=a||n.subject,i.object=o||a}onText(e){const t=this.activeTagStack[this.activeTagStack.length-1];this.features.copyRdfaPatterns&&t.collectedPatternTag?t.collectedPatternTag.text.push(e):(t.text||(t.text=[]),t.text.push(e))}onTagClose(){const e=this.activeTagStack[this.activeTagStack.length-1],t=this.activeTagStack[this.activeTagStack.length-2];if(!(e.collectChildTags&&t.collectChildTags&&this.features.skipHandlingXmlLiteralChildren)){if(this.features.copyRdfaPatterns&&e.collectedPatternTag&&e.collectedPatternTag.rootPattern){const t=e.collectedPatternTag.attributes.resource;if(delete e.collectedPatternTag.attributes.resource,delete e.collectedPatternTag.attributes.typeof,this.rdfaPatterns[t]=e.collectedPatternTag,this.pendingRdfaPatternCopies[t]){for(const r of this.pendingRdfaPatternCopies[t])this.emitPatternCopy(r,e.collectedPatternTag,t);delete this.pendingRdfaPatternCopies[t]}return void this.activeTagStack.pop()}if(e.predicates){const r=this.util.getResourceOrBaseIri(e.subject,e);let n=e.text||[];e.collectChildTags&&t.collectChildTags&&(n=n.slice(1));const i=this.util.createLiteral(n.join(""),e);if(e.inlist)for(const t of e.predicates)this.addListMapping(e,r,t,i);else for(const t of e.predicates)this.emitTriple(r,t,i);t.predicates||(e.text=null)}if(e.object&&Object.keys(e.listMapping).length>0){const t=this.util.getResourceOrBaseIri(e.object,e);for(const r in e.listMapping){const n=this.util.dataFactory.namedNode(r),i=e.listMapping[r];if(i.length>0){const r=i.map((()=>this.util.createBlankNode()));for(let t=0;t`),e.text&&t&&(t.text?t.text=t.text.concat(e.text):t.text=e.text)}onEnd(){if(this.features.copyRdfaPatterns){this.features.copyRdfaPatterns=!1;for(const e in this.rdfaPatterns){const t=this.rdfaPatterns[e];t.referenced||(t.attributes.typeof="rdfa:Pattern",t.attributes.resource=e,this.emitPatternCopy(t.parentTag,t,e),t.referenced=!1,delete t.attributes.typeof,delete t.attributes.resource)}for(const e in this.pendingRdfaPatternCopies)for(const t of this.pendingRdfaPatternCopies[e])this.activeTagStack.push(t),this.onTagOpen("link",{property:"rdfa:copy",href:e}),this.onTagClose(),this.activeTagStack.pop();this.features.copyRdfaPatterns=!0}}isInheritSubjectInHeadBody(e){return this.features.inheritSubjectInHeadBody&&("head"===e||"body"===e)}addListMapping(e,t,r,n){if(e.explicitNewSubject){const i=this.util.createBlankNode();this.emitTriple(this.util.getResourceOrBaseIri(t,e),r,i),this.emitTriple(i,this.util.dataFactory.namedNode(c.Util.RDF+"first"),this.util.getResourceOrBaseIri(n,e)),this.emitTriple(i,this.util.dataFactory.namedNode(c.Util.RDF+"rest"),this.util.dataFactory.namedNode(c.Util.RDF+"nil"))}else{let t=e.listMappingLocal[r.value];t||(e.listMappingLocal[r.value]=t=[]),n&&t.push(n)}}emitTriple(e,t,r){"NamedNode"===e.termType&&e.value.indexOf(":")<0||"NamedNode"===t.termType&&t.value.indexOf(":")<0||"NamedNode"===r.termType&&r.value.indexOf(":")<0||this.push(this.util.dataFactory.quad(e,t,r,this.defaultGraph))}emitPatternCopy(e,t,r){if(this.activeTagStack.push(e),t.referenced=!0,t.constructedBlankNodes){let e=0;this.util.blankNodeFactory=()=>t.constructedBlankNodes[e++]}else t.constructedBlankNodes=[],this.util.blankNodeFactory=()=>{const e=this.util.dataFactory.blankNode();return t.constructedBlankNodes.push(e),e};this.emitPatternCopyAbsolute(t,!0,r),this.util.blankNodeFactory=null,this.activeTagStack.pop()}emitPatternCopyAbsolute(e,t,r){if(t||"rdfa:copy"!==e.attributes.property||e.attributes.href!==r){this.onTagOpen(e.name,e.attributes);for(const t of e.text)this.onText(t);for(const t of e.children)this.emitPatternCopyAbsolute(t,!1,r);this.onTagClose()}}initializeParser(e){return new n.Parser({onclosetag:()=>{try{this.onTagClose(),this.htmlParseListener&&this.htmlParseListener.onTagClose()}catch(e){this.emit("error",e)}},onend:()=>{try{this.onEnd(),this.htmlParseListener&&this.htmlParseListener.onEnd()}catch(e){this.emit("error",e)}},onopentag:(e,t)=>{try{this.onTagOpen(e,t),this.htmlParseListener&&this.htmlParseListener.onTagOpen(e,t)}catch(e){this.emit("error",e)}},ontext:e=>{try{this.onText(e),this.htmlParseListener&&this.htmlParseListener.onText(e)}catch(e){this.emit("error",e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:e})}}t.RdfaParser=u},24012:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RDFA_CONTENTTYPES=t.RDFA_FEATURES=void 0,t.RDFA_FEATURES={"":{baseTag:!0,xmlBase:!0,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!0,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!0,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!0,roleAttribute:!0},core:{baseTag:!1,xmlBase:!1,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!1,datetimeAttribute:!1,timeTag:!1,htmlDatatype:!1,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!1,roleAttribute:!1},html:{baseTag:!0,xmlBase:!1,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!0,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!0,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!1,roleAttribute:!0},xhtml:{baseTag:!0,xmlBase:!1,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!0,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!0,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!0,roleAttribute:!0},xml:{baseTag:!1,xmlBase:!0,langAttribute:!0,onlyAllowUriRelRevIfProperty:!1,inheritSubjectInHeadBody:!1,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!1,copyRdfaPatterns:!1,xmlnsPrefixMappings:!0,xhtmlInitialContext:!1,roleAttribute:!0}},t.RDFA_CONTENTTYPES={"text/html":"html","application/xhtml+xml":"xhtml","application/xml":"xml","text/xml":"xml","image/svg+xml":"xml"}},69994:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(9929),i=r(24012),a=r(18050);class o{constructor(e,t){this.dataFactory=e||new a.DataFactory,this.baseIRI=this.dataFactory.namedNode(t||""),this.baseIRIDocument=this.baseIRI}static parsePrefixes(e,t,r){const n={};if(r)for(const t in e)t.startsWith("xmlns")&&(n[t.substr(6)]=e[t]);if(e.prefix||Object.keys(n).length>0){const r=Object.assign(Object.assign({},t),n);if(e.prefix){let t;for(;t=o.PREFIX_REGEX.exec(e.prefix);)r[t[1]]=t[2]}return r}return t}static expandPrefixedTerm(e,t){const r=e.indexOf(":");let n,i;if(r>=0&&(n=e.substr(0,r),i=e.substr(r+1)),""===n)return"http://www.w3.org/1999/xhtml/vocab#"+i;if(n){const e=t.prefixesAll[n];if(e)return e+i}if(e){const r=t.prefixesAll[e.toLocaleLowerCase()];if(r)return r}return e}static isValidIri(e){return o.IRI_REGEX.test(e)}static contentTypeToProfile(e){return i.RDFA_CONTENTTYPES[e]||""}getBaseIRI(e){let t=e;const r=t.indexOf("#");return r>=0&&(t=t.substr(0,r)),this.dataFactory.namedNode((0,n.resolve)(t,this.baseIRI.value))}getResourceOrBaseIri(e,t){return!0===e?this.getBaseIriTerm(t):e}getBaseIriTerm(e){return e.localBaseIRI||this.baseIRI}createVocabIris(e,t,r,n){return e.split(/\s+/).filter((e=>e&&(r||e.indexOf(":")>=0))).map((e=>this.createIri(e,t,!0,!0,n))).filter((e=>null!=e))}createLiteral(e,t){if(t.interpretObjectAsTime&&!t.datatype)for(const r of o.TIME_REGEXES)if(e.match(r.regex)){t.datatype=this.dataFactory.namedNode(o.XSD+r.type);break}return this.dataFactory.literal(e,t.datatype||t.language)}createBlankNode(){return this.blankNodeFactory?this.blankNodeFactory():this.dataFactory.blankNode()}createIri(e,t,r,i,a){if(e=e||"",!i)return r||(e=(0,n.resolve)(e,this.getBaseIriTerm(t).value)),o.isValidIri(e)?this.dataFactory.namedNode(e):null;if(e.length>0&&"["===e[0]&&"]"===e[e.length-1]&&(e=e.substr(1,e.length-2)).indexOf(":")<0)return null;if(e.startsWith("_:"))return a?this.dataFactory.blankNode(e.substr(2)||"b_identity"):null;if(r&&t.vocab&&e.indexOf(":")<0)return this.dataFactory.namedNode(t.vocab+e);let s=o.expandPrefixedTerm(e,t);return r?e!==s&&(s=(0,n.resolve)(s,this.baseIRIDocument.value)):s=(0,n.resolve)(s,this.getBaseIriTerm(t).value),o.isValidIri(s)?this.dataFactory.namedNode(s):null}}t.Util=o,o.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",o.XSD="http://www.w3.org/2001/XMLSchema#",o.RDFA="http://www.w3.org/ns/rdfa#",o.PREFIX_REGEX=/\s*([^:\s]*)*:\s*([^\s]*)*\s*/g,o.TIME_REGEXES=[{regex:/^-?P([0-9]+Y)?([0-9]+M)?([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+(\.[0-9])?S)?)?$/,type:"duration"},{regex:/^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,type:"dateTime"},{regex:/^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,type:"date"},{regex:/^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,type:"time"},{regex:/^[0-9]+-[0-9][0-9]$/,type:"gYearMonth"},{regex:/^[0-9]+$/,type:"gYear"}],o.IRI_REGEX=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^ "<>{}|\\\[\]`]*$/},97990:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(70326),t)},35695:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParseError=void 0;class r extends Error{constructor(e,t){const r=e.saxParser;super(e.trackPosition?`Line ${r.line} column ${r.column+1}: ${t}`:t)}}t.ParseError=r},70326:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParseType=t.RdfXmlParser=void 0;const n=r(9929),i=r(49126),a=r(58521),o=r(35695),s=r(18050),c=r(29815);class u extends a.Transform{constructor(e){super({readableObjectMode:!0}),this.activeTagStack=[],this.nodeIds={},e&&(Object.assign(this,e),this.options=e),this.dataFactory||(this.dataFactory=new s.DataFactory),this.baseIRI||(this.baseIRI=""),this.defaultGraph||(this.defaultGraph=this.dataFactory.defaultGraph()),!1!==this.validateUri&&(this.validateUri=!0),this.iriValidationStrategy||(this.iriValidationStrategy=this.validateUri?c.IriValidationStrategy.Pragmatic:c.IriValidationStrategy.None),this.saxParser=new i.SaxesParser({xmlns:!0,position:this.trackPosition}),this.attachSaxListeners()}import(e){const t=new a.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new u(this.options));return r}_transform(e,t,r){try{this.saxParser.write(e)}catch(e){return r(e)}r()}newParseError(e){return new o.ParseError(this,e)}valueToUri(e,t){return this.uriToNamedNode((0,n.resolve)(e,t.baseIRI))}uriToNamedNode(e){const t=(0,c.validateIri)(e,this.iriValidationStrategy);if(t instanceof Error)throw this.newParseError(t.message);return this.dataFactory.namedNode(e)}validateNcname(e){if(!u.NCNAME_MATCHER.test(e))throw this.newParseError(`Not a valid NCName: ${e}`)}attachSaxListeners(){this.saxParser.on("error",(e=>this.emit("error",e))),this.saxParser.on("opentag",this.onTag.bind(this)),this.saxParser.on("text",this.onText.bind(this)),this.saxParser.on("cdata",this.onText.bind(this)),this.saxParser.on("closetag",this.onCloseTag.bind(this)),this.saxParser.on("doctype",this.onDoctype.bind(this))}onTag(e){const t=this.activeTagStack.length?this.activeTagStack[this.activeTagStack.length-1]:null;let r=l.RESOURCE;if(t&&(t.hadChildren=!0,r=t.childrenParseType),t&&t.childrenStringTags){const r=e.name;let n="";for(const t in e.attributes)n+=` ${t}="${e.attributes[t].value}"`;const i=`<${r}${n}>`;t.childrenStringTags.push(i);const a={childrenStringTags:t.childrenStringTags};return a.childrenStringEmitClosingTag=``,void this.activeTagStack.push(a)}const n={};t?(n.language=t.language,n.baseIRI=t.baseIRI):n.baseIRI=this.baseIRI,this.activeTagStack.push(n),r===l.RESOURCE?this.onTagResource(e,n,t,!t):this.onTagProperty(e,n,t)}onTagResource(e,t,r,i){t.childrenParseType=l.PROPERTY;let a=!0;if(e.uri===u.RDF){if(!i&&u.FORBIDDEN_NODE_ELEMENTS.indexOf(e.local)>=0)throw this.newParseError(`Illegal node element name: ${e.local}`);switch(e.local){case"RDF":t.childrenParseType=l.RESOURCE;case"Description":a=!1}}const o=[],s=[];let c=null,d=!1,p=!1,h=null;for(const i in e.attributes){const a=e.attributes[i];if(r&&a.uri===u.RDF)switch(a.local){case"about":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${a.value} and ${c} where found.`);c=a.value;continue;case"ID":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${a.value} and ${c} where found.`);this.validateNcname(a.value),c="#"+a.value,d=!0;continue;case"nodeID":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${a.value} and ${c} where found.`);this.validateNcname(a.value),c=a.value,p=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"type":h=a.value;continue;case"aboutEach":throw this.newParseError("rdf:aboutEach is not supported.");case"aboutEachPrefix":throw this.newParseError("rdf:aboutEachPrefix is not supported.");case"li":throw this.newParseError("rdf:li on node elements are not supported.")}else if(a.uri===u.XML){if("lang"===a.local){t.language=""===a.value?null:a.value.toLowerCase();continue}if("base"===a.local){t.baseIRI=(0,n.resolve)(a.value,t.baseIRI);continue}}"xml"===a.prefix||"xmlns"===a.prefix||""===a.prefix&&"xmlns"===a.local||!a.uri||(o.push(this.uriToNamedNode(a.uri+a.local)),s.push(a.value))}if(null!==c&&(t.subject=p?this.dataFactory.blankNode(c):this.valueToUri(c,t),d&&this.claimNodeId(t.subject)),t.subject||(t.subject=this.dataFactory.blankNode()),a){const n=this.uriToNamedNode(e.uri+e.local);this.emitTriple(t.subject,this.dataFactory.namedNode(u.RDF+"type"),n,r?r.reifiedStatementId:null)}if(r){if(r.predicate)if(r.childrenCollectionSubject){const e=this.dataFactory.blankNode();this.emitTriple(r.childrenCollectionSubject,r.childrenCollectionPredicate,e,r.reifiedStatementId),this.emitTriple(e,this.dataFactory.namedNode(u.RDF+"first"),t.subject,t.reifiedStatementId),r.childrenCollectionSubject=e,r.childrenCollectionPredicate=this.dataFactory.namedNode(u.RDF+"rest")}else{this.emitTriple(r.subject,r.predicate,t.subject,r.reifiedStatementId);for(let e=0;e=0)throw this.newParseError(`Illegal property element name: ${e.local}`);t.predicateSubPredicates=[],t.predicateSubObjects=[];let n=!1,i=!1,a=null,o=!0;const s=[],c=[];for(const r in e.attributes){const d=e.attributes[r];if(d.uri===u.RDF)switch(d.local){case"resource":if(a)throw this.newParseError(`Found both rdf:resource (${d.value}) and rdf:nodeID (${a}).`);if(n)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:resource (${d.value})`);t.hadChildren=!0,a=d.value,o=!1;continue;case"datatype":if(i)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:datatype (${d.value}).`);if(n)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${d.value})`);t.datatype=this.valueToUri(d.value,t);continue;case"nodeID":if(i)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:nodeID (${d.value}).`);if(t.hadChildren)throw this.newParseError(`Found both rdf:resource and rdf:nodeID (${d.value}).`);if(n)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID (${d.value})`);this.validateNcname(d.value),t.hadChildren=!0,a=d.value,o=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"parseType":if(i)throw this.newParseError("rdf:parseType is not allowed when non-rdf:* property attributes are present");if(t.datatype)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${t.datatype.value})`);if(a)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID or rdf:resource (${a})`);if("Resource"===d.value){n=!0,t.childrenParseType=l.PROPERTY;const e=this.dataFactory.blankNode();this.emitTriple(t.subject,t.predicate,e,t.reifiedStatementId),t.subject=e,t.predicate=null}else"Collection"===d.value?(n=!0,t.hadChildren=!0,t.childrenCollectionSubject=t.subject,t.childrenCollectionPredicate=t.predicate,o=!1):"Literal"===d.value&&(n=!0,t.childrenTagsToString=!0,t.childrenStringTags=[]);continue;case"ID":this.validateNcname(d.value),t.reifiedStatementId=this.valueToUri("#"+d.value,t),this.claimNodeId(t.reifiedStatementId);continue}else if(d.uri===u.XML&&"lang"===d.local){t.language=""===d.value?null:d.value.toLowerCase();continue}if("xml"!==d.prefix&&"xmlns"!==d.prefix&&(""!==d.prefix||"xmlns"!==d.local)&&d.uri){if(n||t.datatype)throw this.newParseError(`Found illegal rdf:* properties on property element with attribute: ${d.value}`);t.hadChildren=!0,i=!0,s.push(this.uriToNamedNode(d.uri+d.local)),c.push(this.dataFactory.literal(d.value,t.datatype||t.language))}}if(null!==a){const e=t.subject;t.subject=o?this.dataFactory.blankNode(a):this.valueToUri(a,t),this.emitTriple(e,t.predicate,t.subject,t.reifiedStatementId);for(let e=0;e/g,((e,t,r)=>(this.saxParser.ENTITIES[t]=r,"")))}}var l;t.RdfXmlParser=u,u.MIME_TYPE="application/rdf+xml",u.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",u.XML="http://www.w3.org/XML/1998/namespace",u.FORBIDDEN_NODE_ELEMENTS=["RDF","ID","about","bagID","parseType","resource","nodeID","li","aboutEach","aboutEachPrefix"],u.FORBIDDEN_PROPERTY_ELEMENTS=["Description","RDF","ID","about","bagID","parseType","resource","nodeID","aboutEach","aboutEachPrefix"],u.NCNAME_MATCHER=/^([A-Za-z\xC0-\xD6\xD8-\xF6\u{F8}-\u{2FF}\u{370}-\u{37D}\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}_])([A-Za-z\xC0-\xD6\xD8-\xF6\u{F8}-\u{2FF}\u{370}-\u{37D}\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}_\-.0-9#xB7\u{0300}-\u{036F}\u{203F}-\u{2040}])*$/u,function(e){e[e.RESOURCE=0]="RESOURCE",e[e.PROPERTY=1]="PROPERTY"}(l||(t.ParseType=l={}))},84077:e=>{e.exports=function(t){if(!e.exports.WEBSTREAM_SUPPORT)throw new Error("No web ReadableStream support");var r=!1,n={};return new ReadableStream({start:function(e){for(var i in n.data=a,n.end=a,n.end=o,n.close=o,n.error=o,n)t.on(i,n[i]);function a(n){r||(e.enqueue(n),t.pause())}function o(i){if(!r){for(var a in r=!0,n)t.removeListener(a,n[a]);i?e.error(i):e.close()}}t.pause()},pull:function(){r||t.resume()},cancel:function(){for(var e in r=!0,n)t.removeListener(e,n[e]);t.push(null),t.pause(),t.destroy?t.destroy():t.close&&t.close()}})},e.exports.WEBSTREAM_SUPPORT="undefined"!=typeof ReadableStream},21434:(e,t,r)=>{"use strict";const{SymbolDispose:n}=r(51473),{AbortError:i,codes:a}=r(52590),{isNodeStream:o,isWebStream:s,kControllerErrorFunction:c}=r(92520),u=r(94869),{ERR_INVALID_ARG_TYPE:l}=a;let d;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new l("signal","AbortSignal",e)})(t),!o(r)&&!s(r))throw new l("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const a=o(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[c](new i(void 0,{cause:e.reason}))};if(e.aborted)a();else{d=d||r(46609).addAbortListener;const i=d(e,a);u(t,i[n])}return t}},82:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:a,Uint8Array:o}=r(51473),{Buffer:s}=r(1048),{inspect:c}=r(46609);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);const t=s.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)a(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(ea.length)){e===a.length?(t+=a,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(a,0,e),this.head=r,r.data=n(a,e));break}t+=a,e-=a.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=s.allocUnsafe(e),r=e;let n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(a(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(a(t,new o(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}a(t,s,r-e),e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return c(this,{...t,depth:0,customInspect:!1})}}},67369:(e,t,r)=>{"use strict";const{pipeline:n}=r(16815),i=r(86279),{destroyer:a}=r(16527),{isNodeStream:o,isReadable:s,isWritable:c,isWebStream:u,isTransformStream:l,isWritableStream:d,isReadableStream:p}=r(92520),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:f,ERR_MISSING_ARGS:y}}=r(52590),g=r(94869);e.exports=function(...e){if(0===e.length)throw new y("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r0&&!(c(e[r])||d(e[r])||l(e[r])))throw new f(`streams[${r}]`,t[r],"must be writable")}let r,m,b,v,_;const w=e[0],T=n(e,(function(e){const t=v;v=null,t?t(e):e?_.destroy(e):O||S||_.destroy()})),S=!!(c(w)||d(w)||l(w)),O=!!(s(T)||p(T)||l(T));if(_=new i({writableObjectMode:!(null==w||!w.writableObjectMode),readableObjectMode:!(null==T||!T.readableObjectMode),writable:S,readable:O}),S){if(o(w))_._write=function(e,t,n){w.write(e,t)?n():r=n},_._final=function(e){w.end(),m=e},w.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(u(w)){const e=(l(w)?w.writable:w).getWriter();_._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},_._final=async function(t){try{await e.ready,e.close().catch((()=>{})),m=t}catch(e){t(e)}}}const e=l(T)?T.readable:T;g(e,(()=>{if(m){const e=m;m=null,e()}}))}if(O)if(o(T))T.on("readable",(function(){if(b){const e=b;b=null,e()}})),T.on("end",(function(){_.push(null)})),_._read=function(){for(;;){const e=T.read();if(null===e)return void(b=_._read);if(!_.push(e))return}};else if(u(T)){const e=(l(T)?T.readable:T).getReader();_._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!_.push(t))return;if(r)return void _.push(null)}catch{return}}}return _._destroy=function(e,t){e||null===v||(e=new h),b=null,r=null,m=null,null===v?t(e):(v=t,o(T)&&a(T,e))},_}},16527:(e,t,r)=>{"use strict";const n=r(39907),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:a},AbortError:o}=r(52590),{Symbol:s}=r(51473),{kIsDestroyed:c,isDestroyed:u,isFinished:l,isServerRequest:d}=r(92520),p=s("kDestroy"),h=s("kConstruct");function f(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function y(e,t,r){let i=!1;function a(t){if(i)return;i=!0;const a=e._readableState,o=e._writableState;f(t,o,a),o&&(o.closed=!0),a&&(a.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(g,e,t):n.nextTick(m,e)}try{e._destroy(t||null,a)}catch(t){a(t)}}function g(e,t){b(e,t),m(e)}function m(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function b(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function v(e,t,r){const i=e._readableState,a=e._writableState;if(null!=a&&a.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=a&&a.autoDestroy?e.destroy(t):t&&(t.stack,a&&!a.errored&&(a.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(b,e,t):b(e,t))}function _(e){let t=!1;function r(r){if(t)return void v(e,null!=r?r:new a);t=!0;const i=e._readableState,o=e._writableState,s=o||i;i&&(i.constructed=!0),o&&(o.constructed=!0),s.destroyed?e.emit(p,r):r?v(e,r,!0):n.nextTick(w,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function w(e){e.emit(h)}function T(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function S(e){e.emit("close")}function O(e,t){e.emit("error",t),n.nextTick(S,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(h,t),e.listenerCount(h)>1||n.nextTick(_,e)},destroyer:function(e,t){e&&!u(e)&&(t||l(e)||(t=new o),d(e)?(e.socket=null,e.destroy(t)):T(e)?e.abort():T(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(O,e,t):n.nextTick(S,e),e.destroyed||(e[c]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,a=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(f(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),a.constructed?y(this,e,t):this.once(p,(function(r){y(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:v}},86279:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:a,ObjectSetPrototypeOf:o}=r(51473);e.exports=u;const s=r(11509),c=r(65605);o(u.prototype,s.prototype),o(u,s);{const e=a(c.prototype);for(let t=0;t{const n=r(39907),i=r(1048),{isReadable:a,isWritable:o,isIterable:s,isNodeStream:c,isReadableNodeStream:u,isWritableNodeStream:l,isDuplexNodeStream:d,isReadableStream:p,isWritableStream:h}=r(92520),f=r(94869),{AbortError:y,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:m}}=r(52590),{destroyer:b}=r(16527),v=r(86279),_=r(11509),w=r(65605),{createDeferredPromise:T}=r(46609),S=r(81613),O=globalThis.Blob||i.Blob,E=void 0!==O?function(e){return e instanceof O}:function(e){return!1},x=globalThis.AbortController||r(67083).AbortController,{FunctionPrototypeCall:A}=r(51473);class R extends v{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function I(e){const t=e.readable&&"function"!=typeof e.readable.read?_.wrap(e.readable):e.readable,r=e.writable;let n,i,s,c,u,l=!!a(t),d=!!o(r);function p(e){const t=c;c=null,t?t(e):e&&u.destroy(e)}return u=new R({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:l,writable:d}),d&&(f(r,(e=>{d=!1,e&&b(t,e),p(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),l&&(f(t,(e=>{l=!1,e&&b(t,e),p(e)})),t.on("readable",(function(){if(s){const e=s;s=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(s=u._read);if(!u.push(e))return}}),u._destroy=function(e,a){e||null===c||(e=new y),s=null,n=null,i=null,null===c?a(e):(c=a,b(r,e),b(t,e))},u}e.exports=function e(t,r){if(d(t))return t;if(u(t))return I({readable:t});if(l(t))return I({writable:t});if(c(t))return I({writable:!1,readable:!1});if(p(t))return I({readable:_.fromWeb(t)});if(h(t))return I({writable:w.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:a,destroy:o}=function(e){let{promise:t,resolve:r}=T();const i=new x,a=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:o,cb:s}=await e;if(n.nextTick(s),o)return;if(a.aborted)throw new y(void 0,{cause:a.reason});({promise:t,resolve:r}=T()),yield i}}(),{signal:a}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return S(R,e,{objectMode:!0,write:i,final:a,destroy:o});const c=null==e?void 0:e.then;if("function"==typeof c){let t;const r=A(c,e,(e=>{if(null!=e)throw new m("nully","body",e)}),(e=>{b(t,e)}));return t=new R({objectMode:!0,readable:!1,write:i,final(e){a((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:o})}throw new m("Iterable, AsyncIterable or AsyncFunction",r,e)}if(E(t))return e(t.arrayBuffer());if(s(t))return S(R,t,{objectMode:!0,writable:!1});if(p(null==t?void 0:t.readable)&&h(null==t?void 0:t.writable))return R.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return I({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?l(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return A(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{b(e,t)})),e=new R({objectMode:!0,writable:!1,read(){}})}throw new g(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},94869:(e,t,r)=>{const n=r(39907),{AbortError:i,codes:a}=r(52590),{ERR_INVALID_ARG_TYPE:o,ERR_STREAM_PREMATURE_CLOSE:s}=a,{kEmptyObject:c,once:u}=r(46609),{validateAbortSignal:l,validateFunction:d,validateObject:p,validateBoolean:h}=r(77840),{Promise:f,PromisePrototypeThen:y,SymbolDispose:g}=r(51473),{isClosed:m,isReadable:b,isReadableNodeStream:v,isReadableStream:_,isReadableFinished:w,isReadableErrored:T,isWritable:S,isWritableNodeStream:O,isWritableStream:E,isWritableFinished:x,isWritableErrored:A,isNodeStream:R,willEmitClose:I,kIsClosedPromise:P}=r(92520);let N;const D=()=>{};function j(e,t,a){var h,f;if(2===arguments.length?(a=t,t=c):null==t?t=c:p(t,"options"),d(a,"callback"),l(t.signal,"options.signal"),a=u(a),_(e)||E(e))return function(e,t,a){let o=!1,s=D;if(t.signal)if(s=()=>{o=!0,a.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(s);else{N=N||r(46609).addAbortListener;const n=N(t.signal,s),i=a;a=u(((...t)=>{n[g](),i.apply(e,t)}))}const c=(...t)=>{o||n.nextTick((()=>a.apply(e,t)))};return y(e[P].promise,c,c),D}(e,t,a);if(!R(e))throw new o("stream",["ReadableStream","WritableStream","Stream"],e);const j=null!==(h=t.readable)&&void 0!==h?h:v(e),C=null!==(f=t.writable)&&void 0!==f?f:O(e),M=e._writableState,L=e._readableState,k=()=>{e.writable||U()};let F=I(e)&&v(e)===j&&O(e)===C,B=x(e,!1);const U=()=>{B=!0,e.destroyed&&(F=!1),(!F||e.readable&&!j)&&(j&&!q||a.call(e))};let q=w(e,!1);const V=()=>{q=!0,e.destroyed&&(F=!1),(!F||e.writable&&!C)&&(C&&!B||a.call(e))},Q=t=>{a.call(e,t)};let $=m(e);const H=()=>{$=!0;const t=A(e)||T(e);return t&&"boolean"!=typeof t?a.call(e,t):j&&!q&&v(e,!0)&&!w(e,!1)?a.call(e,new s):!C||B||x(e,!1)?void a.call(e):a.call(e,new s)},G=()=>{$=!0;const t=A(e)||T(e);if(t&&"boolean"!=typeof t)return a.call(e,t);a.call(e)},z=()=>{e.req.on("finish",U)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?C&&!M&&(e.on("end",k),e.on("close",k)):(e.on("complete",U),F||e.on("abort",H),e.req?z():e.on("request",z)),F||"boolean"!=typeof e.aborted||e.on("aborted",H),e.on("end",V),e.on("finish",U),!1!==t.error&&e.on("error",Q),e.on("close",H),$?n.nextTick(H):null!=M&&M.errorEmitted||null!=L&&L.errorEmitted?F||n.nextTick(G):(j||F&&!b(e)||!B&&!1!==S(e))&&(C||F&&!S(e)||!q&&!1!==b(e))?L&&e.req&&e.aborted&&n.nextTick(G):n.nextTick(G);const K=()=>{a=D,e.removeListener("aborted",H),e.removeListener("complete",U),e.removeListener("abort",H),e.removeListener("request",z),e.req&&e.req.removeListener("finish",U),e.removeListener("end",k),e.removeListener("close",k),e.removeListener("finish",U),e.removeListener("end",V),e.removeListener("error",Q),e.removeListener("close",H)};if(t.signal&&!$){const o=()=>{const r=a;K(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(o);else{N=N||r(46609).addAbortListener;const n=N(t.signal,o),i=a;a=u(((...t)=>{n[g](),i.apply(e,t)}))}}return K}e.exports=j,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=c),null!==(r=t)&&void 0!==r&&r.cleanup&&(h(t.cleanup,"cleanup"),n=t.cleanup),new f(((r,i)=>{const a=j(e,t,(e=>{n&&a(),e?i(e):r()}))}))}},81613:(e,t,r)=>{"use strict";const n=r(39907),{PromisePrototypeThen:i,SymbolAsyncIterator:a,SymbolIterator:o}=r(51473),{Buffer:s}=r(1048),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:u}=r(52590).codes;e.exports=function(e,t,r){let l,d;if("string"==typeof t||t instanceof s)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[a])d=!0,l=t[a]();else{if(!t||!t[o])throw new c("iterable",["Iterable"],t);d=!1,l=t[o]()}const p=new e({objectMode:!0,highWaterMark:1,...r});let h=!1;return p._read=function(){h||(h=!0,async function(){for(;;){try{const{value:e,done:t}=d?await l.next():l.next();if(t)p.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw h=!1,new u;if(p.push(t))continue;h=!1}}catch(e){p.destroy(e)}break}}())},p._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof l.throw;if(t&&r){const{value:t,done:r}=await l.throw(e);if(await t,r)return}if("function"==typeof l.return){const{value:e}=await l.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},p}},23054:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(51473),{EventEmitter:a}=r(50046);function o(e){a.call(this,e)}function s(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(o.prototype,a.prototype),i(o,a),o.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",c),r.on("close",u));let o=!1;function c(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){d(),0===a.listenerCount(this,"error")&&this.emit("error",e)}function d(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",c),r.removeListener("close",u),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",d),r.removeListener("close",d),e.removeListener("close",d)}return s(r,"error",l),s(e,"error",l),r.on("end",d),r.on("close",d),e.on("close",d),e.emit("pipe",r),e},e.exports={Stream:o,prependListener:s}},64708:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(67083).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:a,ERR_MISSING_ARGS:o,ERR_OUT_OF_RANGE:s},AbortError:c}=r(52590),{validateAbortSignal:u,validateInteger:l,validateObject:d}=r(77840),p=r(51473).Symbol("kWeak"),h=r(51473).Symbol("kResistStopPropagation"),{finished:f}=r(94869),y=r(67369),{addAbortSignalNoValidate:g}=r(21434),{isWritable:m,isNodeStream:b}=r(92520),{deprecate:v}=r(46609),{ArrayPrototypePush:_,Boolean:w,MathFloor:T,Number:S,NumberIsNaN:O,Promise:E,PromiseReject:x,PromiseResolve:A,PromisePrototypeThen:R,Symbol:I}=r(51473),P=I("kEmpty"),N=I("kEof");function D(e,t){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=T(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=T(t.highWaterMark)),l(n,"options.concurrency",1),l(i,"options.highWaterMark",0),i+=n,async function*(){const a=r(46609).AbortSignalAny([null==t?void 0:t.signal].filter(w)),o=this,s=[],u={signal:a};let l,d,p=!1,h=0;function f(){p=!0,y()}function y(){h-=1,g()}function g(){d&&!p&&h=i||h>=n)&&await new E((e=>{d=e}))}s.push(N)}catch(e){const t=x(e);R(t,y,f),s.push(t)}finally{p=!0,l&&(l(),l=null)}}();try{for(;;){for(;s.length>0;){const e=await s[0];if(e===N)return;if(a.aborted)throw new c;e!==P&&(yield e),s.shift(),g()}await new E((e=>{l=e}))}}finally{p=!0,d&&(d(),d=null)}}.call(this)}async function j(e,t=void 0){for await(const r of C.call(this,e,t))return!0;return!1}function C(e,t){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);return D.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class M extends o{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function L(e){if(e=S(e),O(e))return 0;if(e<0)throw new s("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:v((function(e=void 0){return null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;e--<=0&&(yield r)}}.call(this)},filter:C,flatMap:function(e,t){const r=D.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:D,take:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),b(e)&&!m(e))throw new i("stream",e,"must be writable");const r=y(this,e);return null!=t&&t.signal&&g(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);return!await j.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);for await(const r of D.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new a("reducer",["Function","AsyncFunction"],e);null!=r&&d(r,"options"),null!=(null==r?void 0:r.signal)&&u(r.signal,"options.signal");let o=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new c(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await f(this.destroy(e)),e}const s=new n,l=s.signal;if(null!=r&&r.signal){const e={once:!0,[p]:this,[h]:!0};r.signal.addEventListener("abort",(()=>s.abort()),e)}let y=!1;try{for await(const n of this){var g;if(y=!0,null!=r&&null!==(g=r.signal)&&void 0!==g&&g.aborted)throw new c;o?t=await e(t,n,{signal:l}):(t=n,o=!0)}if(!y&&!o)throw new M}finally{s.abort()}return t},toArray:async function(e){null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c(void 0,{cause:e.signal.reason});_(t,n)}return t},some:j,find:async function(e,t){for await(const r of C.call(this,e,t))return r}}},76587:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(51473);e.exports=a;const i=r(32073);function a(e){if(!(this instanceof a))return new a(e);i.call(this,e)}n(a.prototype,i.prototype),n(a,i),a.prototype._transform=function(e,t,r){r(null,e)}},16815:(e,t,r)=>{const n=r(39907),{ArrayIsArray:i,Promise:a,SymbolAsyncIterator:o,SymbolDispose:s}=r(51473),c=r(94869),{once:u}=r(46609),l=r(16527),d=r(86279),{aggregateTwoErrors:p,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:f,ERR_MISSING_ARGS:y,ERR_STREAM_DESTROYED:g,ERR_STREAM_PREMATURE_CLOSE:m},AbortError:b}=r(52590),{validateFunction:v,validateAbortSignal:_}=r(77840),{isIterable:w,isReadable:T,isReadableNodeStream:S,isNodeStream:O,isTransformStream:E,isWebStream:x,isReadableStream:A,isReadableFinished:R}=r(92520),I=globalThis.AbortController||r(67083).AbortController;let P,N,D;function j(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,l.destroyer(e,t||new g("pipe")))},cleanup:c(e,{readable:t,writable:r},(e=>{n=!e}))}}function C(e){if(w(e))return e;if(S(e))return async function*(e){N||(N=r(11509)),yield*N.prototype[o].call(e)}(e);throw new h("val",["Readable","Iterable","AsyncIterable"],e)}async function M(e,t,r,{end:n}){let i,o=null;const s=e=>{if(e&&(i=e),o){const e=o;o=null,e()}},u=()=>new a(((e,t)=>{i?t(i):o=()=>{i?t(i):e()}}));t.on("drain",s);const l=c(t,{readable:!1},s);try{t.writableNeedDrain&&await u();for await(const r of e)t.write(r)||await u();n&&(t.end(),await u()),r()}catch(e){r(i!==e?p(i,e):e)}finally{l(),t.off("drain",s)}}async function L(e,t,r,{end:n}){E(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function k(e,t,a){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new y("streams");const o=new I,c=o.signal,u=null==a?void 0:a.signal,l=[];function p(){U(new b)}let g,m,v;_(u,"options.signal"),D=D||r(46609).addAbortListener,u&&(g=D(u,p));const R=[];let N,k=0;function B(e){U(e,0==--k)}function U(e,r){var i;if(!e||m&&"ERR_STREAM_PREMATURE_CLOSE"!==m.code||(m=e),m||r){for(;R.length;)R.shift()(m);null===(i=g)||void 0===i||i[s](),o.abort(),r&&(m||l.forEach((e=>e())),n.nextTick(t,m,v))}}for(let $=0;$0,K=G||!1!==(null==a?void 0:a.end),X=$===e.length-1;if(O(H)){if(K){const{destroy:J,cleanup:W}=j(H,G,z);R.push(J),T(H)&&X&&l.push(W)}function q(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&B(e)}H.on("error",q),T(H)&&X&&l.push((()=>{H.removeListener("error",q)}))}if(0===$)if("function"==typeof H){if(N=H({signal:c}),!w(N))throw new f("Iterable, AsyncIterable or Stream","source",N)}else N=w(H)||S(H)||E(H)?H:d.from(H);else if("function"==typeof H){var V;if(N=E(N)?C(null===(V=N)||void 0===V?void 0:V.readable):C(N),N=H(N,{signal:c}),G){if(!w(N,!0))throw new f("AsyncIterable",`transform[${$-1}]`,N)}else{var Q;P||(P=r(76587));const Y=new P({objectMode:!0}),Z=null===(Q=N)||void 0===Q?void 0:Q.then;if("function"==typeof Z)k++,Z.call(N,(e=>{v=e,null!=e&&Y.write(e),K&&Y.end(),n.nextTick(B)}),(e=>{Y.destroy(e),n.nextTick(B,e)}));else if(w(N,!0))k++,M(N,Y,B,{end:K});else{if(!A(N)&&!E(N))throw new f("AsyncIterable or Promise","destination",N);{const re=N.readable||N;k++,M(re,Y,B,{end:K})}}N=Y;const{destroy:ee,cleanup:te}=j(N,!1,!0);R.push(ee),X&&l.push(te)}}else if(O(H)){if(S(N)){k+=2;const ne=F(N,H,B,{end:K});T(H)&&X&&l.push(ne)}else if(E(N)||A(N)){const ie=N.readable||N;k++,M(ie,H,B,{end:K})}else{if(!w(N))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);k++,M(N,H,B,{end:K})}N=H}else if(x(H)){if(S(N))k++,L(C(N),H,B,{end:K});else if(A(N)||w(N))k++,L(N,H,B,{end:K});else{if(!E(N))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);k++,L(N.readable,H,B,{end:K})}N=H}else N=d.from(H)}return(null!=c&&c.aborted||null!=u&&u.aborted)&&n.nextTick(p),N}function F(e,t,r,{end:i}){let a=!1;if(t.on("close",(()=>{a||r(new m)})),e.pipe(t,{end:!1}),i){function o(){a=!0,t.end()}R(e)?n.nextTick(o):e.once("end",o)}else r();return c(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),c(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:k,pipeline:function(...e){return k(e,u(function(e){return v(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},11509:(e,t,r)=>{const n=r(39907),{ArrayPrototypeIndexOf:i,NumberIsInteger:a,NumberIsNaN:o,NumberParseInt:s,ObjectDefineProperties:c,ObjectKeys:u,ObjectSetPrototypeOf:l,Promise:d,SafeSet:p,SymbolAsyncDispose:h,SymbolAsyncIterator:f,Symbol:y}=r(51473);e.exports=X,X.ReadableState=K;const{EventEmitter:g}=r(50046),{Stream:m,prependListener:b}=r(23054),{Buffer:v}=r(1048),{addAbortSignal:_}=r(21434),w=r(94869);let T=r(46609).debuglog("stream",(e=>{T=e}));const S=r(82),O=r(16527),{getHighWaterMark:E,getDefaultHighWaterMark:x}=r(89952),{aggregateTwoErrors:A,codes:{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_OUT_OF_RANGE:P,ERR_STREAM_PUSH_AFTER_EOF:N,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:D},AbortError:j}=r(52590),{validateObject:C}=r(77840),M=y("kPaused"),{StringDecoder:L}=r(18888),k=r(81613);l(X.prototype,m.prototype),l(X,m);const F=()=>{},{errorOrDestroy:B}=O,U=1,q=16,V=32,Q=64,$=2048,H=4096,G=65536;function z(e){return{enumerable:!1,get(){return!!(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function K(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(86279)),this.state=$|H|q|V,e&&e.objectMode&&(this.state|=U),n&&e&&e.readableObjectMode&&(this.state|=U),this.highWaterMark=e?E(this,e,"readableHighWaterMark",n):x(!1),this.buffer=new S,this.length=0,this.pipes=[],this.flowing=null,this[M]=null,e&&!1===e.emitClose&&(this.state&=~$),e&&!1===e.autoDestroy&&(this.state&=~H),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new L(e.encoding),this.encoding=e.encoding)}function X(e){if(!(this instanceof X))return new X(e);const t=this instanceof r(86279);this._readableState=new K(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&_(e.signal,this)),m.call(this,e),O.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function J(e,t,r,n){T("readableAddChunk",t);const i=e._readableState;let a;if(i.state&U||("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=v.from(t,r).toString(i.encoding):(t=v.from(t,r),r=""))):t instanceof v?r="":m._isUint8Array(t)?(t=m._uint8ArrayToBuffer(t),r=""):null!=t&&(a=new R("chunk",["string","Buffer","Uint8Array"],t))),a)B(e,a);else if(null===t)i.state&=-9,function(e,t){if(T("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Z(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}}(e,i);else if(i.state&U||t&&t.length>0)if(n)if(4&i.state)B(e,new D);else{if(i.destroyed||i.errored)return!1;W(e,i,t,!0)}else if(i.ended)B(e,new N);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?W(e,i,t,!1):te(e,i)):W(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length0?(t.state&G?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.state&Q&&Z(e)),te(e,t)}function Y(e,t){return e<=0||0===t.length&&t.ended?0:t.state&U?1:o(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Z(e){const t=e._readableState;T("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(T("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(ee,e))}function ee(e){const t=e._readableState;T("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,oe(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!1===t[M]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){T("readable nexttick read 0"),e.read(0)}function ae(e,t){T("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),oe(e),t.flowing&&!t.reading&&e.read(0)}function oe(e){const t=e._readableState;for(T("flow",t.flowing);t.flowing&&null!==e.read(););}function se(e,t){"function"!=typeof e.read&&(e=X.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=F;function i(t){this===e?(n(),n=F):n=t}e.on("readable",i);const a=w(e,{writable:!1},(e=>{r=e?A(r,e):null,n(),n=F}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new d(i)}}}catch(e){throw r=A(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),a()):O.destroyer(e,null)}}(e,t);return r.stream=e,r}function ce(e,t){if(0===t.length)return null;let r;return 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}function ue(e){const t=e._readableState;T("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(le,t,e))}function le(e,t){if(T("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(de,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function de(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let pe;function he(){return void 0===pe&&(pe={}),pe}c(K.prototype,{objectMode:z(U),ended:z(2),endEmitted:z(4),reading:z(8),constructed:z(q),sync:z(V),needReadable:z(Q),emittedReadable:z(128),readableListening:z(256),resumeScheduled:z(512),errorEmitted:z(1024),emitClose:z($),autoDestroy:z(H),destroyed:z(8192),closed:z(16384),closeEmitted:z(32768),multiAwaitDrain:z(G),readingMore:z(1<<17),dataEmitted:z(1<<18)}),X.prototype.destroy=O.destroy,X.prototype._undestroy=O.undestroy,X.prototype._destroy=function(e,t){t(e)},X.prototype[g.captureRejectionSymbol]=function(e){this.destroy(e)},X.prototype[h]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new j,this.destroy(e)),new d(((t,r)=>w(this,(n=>n&&n!==e?r(n):t(null)))))},X.prototype.push=function(e,t){return J(this,e,t,!1)},X.prototype.unshift=function(e,t){return J(this,e,t,!0)},X.prototype.isPaused=function(){const e=this._readableState;return!0===e[M]||!1===e.flowing},X.prototype.setEncoding=function(e){const t=new L(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},X.prototype.read=function(e){T("read",e),void 0===e?e=NaN:a(e)||(e=s(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new P("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return T("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ue(this):Z(this),null;if(0===(e=Y(e,t))&&t.ended)return 0===t.length&&ue(this),null;let n,i=!!(t.state&Q);if(T("need readable",i),(0===t.length||t.length-e0?ce(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ue(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},X.prototype._read=function(e){throw new I("_read()")},X.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new p(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),T("pipe count=%d opts=%j",i.pipes.length,t);const a=t&&!1===t.end||e===n.stdout||e===n.stderr?y:o;function o(){T("onend"),e.end()}let s;i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",(function t(n,a){T("onunpipe"),n===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,T("cleanup"),e.removeListener("close",h),e.removeListener("finish",f),s&&e.removeListener("drain",s),e.removeListener("error",d),e.removeListener("unpipe",t),r.removeListener("end",o),r.removeListener("end",y),r.removeListener("data",l),c=!0,s&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&s())}));let c=!1;function u(){c||(1===i.pipes.length&&i.pipes[0]===e?(T("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(T("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),s||(s=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(T("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(T("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",s))}function l(t){T("ondata");const r=e.write(t);T("dest.write",r),!1===r&&u()}function d(t){if(T("onerror",t),y(),e.removeListener("error",d),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?B(e,t):e.emit("error",t)}}function h(){e.removeListener("finish",f),y()}function f(){T("onfinish"),e.removeListener("close",h),y()}function y(){T("unpipe"),r.unpipe(e)}return r.on("data",l),b(e,"error",d),e.once("close",h),e.once("finish",f),e.emit("pipe",r),!0===e.writableNeedDrain?u():i.flowing||(T("pipe resume"),r.resume()),e},X.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,T("on readable",i.length,i.reading),i.length?Z(this):i.reading||n.nextTick(ie,this))),r},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(e,t){const r=m.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(ne,this),r},X.prototype.off=X.prototype.removeListener,X.prototype.removeAllListeners=function(e){const t=m.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(ne,this),t},X.prototype.resume=function(){const e=this._readableState;return e.flowing||(T("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(ae,e,t))}(this,e)),e[M]=!1,this},X.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[M]=!0,this},X.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{B(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=u(e);for(let t=1;t{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(51473),{validateInteger:a}=r(77840),{ERR_INVALID_ARG_VALUE:o}=r(52590).codes;let s=16384,c=16;function u(e){return e?c:s}e.exports={getHighWaterMark:function(e,t,r,a){const s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=s){if(!i(s)||s<0)throw new o(a?`options.${r}`:"options.highWaterMark",s);return n(s)}return u(e.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(e,t){a(t,"value",0),e?c=t:s=t}}},32073:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(51473);e.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:a}=r(52590).codes,o=r(86279),{getHighWaterMark:s}=r(89952);n(u.prototype,o.prototype),n(u,o);const c=i("kCallback");function u(e){if(!(this instanceof u))return new u(e);const t=e?s(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),o.call(this,e),this._readableState.sync=!1,this[c]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function l(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function d(){this._final!==l&&l.call(this)}u.prototype._final=l,u.prototype._transform=function(e,t,r){throw new a("_transform()")},u.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,a=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||a===n.length||n.length{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:a}=r(51473),o=a("nodejs.stream.destroyed"),s=a("nodejs.stream.errored"),c=a("nodejs.stream.readable"),u=a("nodejs.stream.writable"),l=a("nodejs.stream.disturbed"),d=a("nodejs.webstream.isClosedPromise"),p=a("nodejs.webstream.controllerErrorFunction");function h(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function f(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function y(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!(!e||y(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function m(e){return!(!e||y(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function b(e){return!(!e||y(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function v(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[o]||null!=n&&n.destroyed)}function _(e){if(!f(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function w(e,t){if(!h(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function T(e){return e&&null!=e[c]?e[c]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!v(e)&&h(e)&&e.readable&&!w(e)}function S(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!v(e)&&f(e)&&e.writable&&!_(e)}function O(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function E(e){return"boolean"==typeof e._sent100&&O(e)}e.exports={isDestroyed:v,kIsDestroyed:o,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[l])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:l,isErrored:function(e){var t,r,n,i,a,o,c,u,l,d;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(a=null!==(o=e[s])&&void 0!==o?o:e.readableErrored)&&void 0!==a?a:e.writableErrored)&&void 0!==i?i:null===(c=e._readableState)||void 0===c?void 0:c.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(l=e._readableState)||void 0===l?void 0:l.errored)&&void 0!==t?t:null===(d=e._writableState)||void 0===d?void 0:d.errored))},kIsErrored:s,isReadable:T,kIsReadable:c,kIsClosedPromise:d,kControllerErrorFunction:p,kIsWritable:u,isClosed:function(e){if(!y(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&O(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return y(e)?!(!v(e)&&(!1!==(null==t?void 0:t.readable)&&T(e)||!1!==(null==t?void 0:t.writable)&&S(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:h,isReadableStream:g,isReadableEnded:function(e){if(!h(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:w,isReadableErrored:function(e){var t,r;return y(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:y,isWebStream:function(e){return g(e)||m(e)||b(e)},isWritable:S,isWritableNodeStream:f,isWritableStream:m,isWritableEnded:_,isWritableFinished:function(e,t){if(!f(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return y(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:E,willEmitClose:function(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&E(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:b}},65605:(e,t,r)=>{const n=r(39907),{ArrayPrototypeSlice:i,Error:a,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:s,ObjectDefineProperties:c,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:l,Symbol:d,SymbolHasInstance:p}=r(51473);e.exports=C,C.WritableState=D;const{EventEmitter:h}=r(50046),f=r(23054).Stream,{Buffer:y}=r(1048),g=r(16527),{addAbortSignal:m}=r(21434),{getHighWaterMark:b,getDefaultHighWaterMark:v}=r(89952),{ERR_INVALID_ARG_TYPE:_,ERR_METHOD_NOT_IMPLEMENTED:w,ERR_MULTIPLE_CALLBACK:T,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:O,ERR_STREAM_ALREADY_FINISHED:E,ERR_STREAM_NULL_VALUES:x,ERR_STREAM_WRITE_AFTER_END:A,ERR_UNKNOWN_ENCODING:R}=r(52590).codes,{errorOrDestroy:I}=g;function P(){}u(C.prototype,f.prototype),u(C,f);const N=d("kOnFinished");function D(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(86279)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?b(this,e,"writableHighWaterMark",n):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=F.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,j(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[N]=[]}function j(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function C(e){const t=this instanceof r(86279);if(!t&&!o(C,this))return new C(e);this._writableState=new D(e,this,t),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),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&m(e.signal,this)),f.call(this,e),g.construct(this,(()=>{const e=this._writableState;e.writing||V(this,e),$(this,e)}))}function M(e,t,r,i){const a=e._writableState;if("function"==typeof r)i=r,r=a.defaultEncoding;else{if(r){if("buffer"!==r&&!y.isEncoding(r))throw new R(r)}else r=a.defaultEncoding;"function"!=typeof i&&(i=P)}if(null===t)throw new x;if(!a.objectMode)if("string"==typeof t)!1!==a.decodeStrings&&(t=y.from(t,r),r="buffer");else if(t instanceof y)r="buffer";else{if(!f._isUint8Array(t))throw new _("chunk",["string","Buffer","Uint8Array"],t);t=f._uint8ArrayToBuffer(t),r="buffer"}let o;return a.ending?o=new A:a.destroyed&&(o=new O("write")),o?(n.nextTick(i,o),I(e,o,!0),o):(a.pendingcb++,function(e,t,r,n,i){const a=t.objectMode?1:r.length;t.length+=a;const o=t.lengthr.bufferedIndex&&V(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===a?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:a,stream:e,state:r},n.nextTick(B,r.afterWriteTickInfo)):U(e,r,1,a))):I(e,new T)}function B({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,U(e,t,r,n)}function U(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&q(t),$(e,t)}function q(e){if(e.writing)return;for(let r=e.bufferedIndex;r1&&e._writev){t.pendingcb-=o-1;const n=t.allNoop?P:e=>{for(let t=s;t256?(r.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}function Q(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function $(e,t,r){Q(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)I(e,null!=i?i:T());else if(r=!0,t.pendingcb--,i){const r=t[N].splice(0);for(let e=0;e{Q(t)?H(e,t):t.pendingcb--}),e,t)):Q(t)&&(t.pendingcb++,H(e,t))))}function H(e,t){t.pendingcb--,t.finished=!0;const r=t[N].splice(0);for(let e=0;e{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:a,ArrayPrototypeMap:o,NumberIsInteger:s,NumberIsNaN:c,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:l,NumberParseInt:d,ObjectPrototypeHasOwnProperty:p,RegExpPrototypeExec:h,String:f,StringPrototypeToUpperCase:y,StringPrototypeTrim:g}=r(51473),{hideStackFrames:m,codes:{ERR_SOCKET_BAD_PORT:b,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:_,ERR_OUT_OF_RANGE:w,ERR_UNKNOWN_SIGNAL:T}}=r(52590),{normalizeEncoding:S}=r(46609),{isAsyncFunction:O,isArrayBufferView:E}=r(46609).types,x={},A=/^[0-7]+$/,R=m(((e,t,r=l,n=u)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!s(e))throw new w(t,"an integer",e);if(en)throw new w(t,`>= ${r} && <= ${n}`,e)})),I=m(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!s(e))throw new w(t,"an integer",e);if(en)throw new w(t,`>= ${r} && <= ${n}`,e)})),P=m(((e,t,r=!1)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!s(e))throw new w(t,"an integer",e);const n=r?1:0,i=4294967295;if(ei)throw new w(t,`>= ${n} && <= ${i}`,e)}));function N(e,t){if("string"!=typeof e)throw new v(t,"string",e)}const D=m(((e,t,r)=>{if(!i(r,e)){const n=a(o(r,(e=>"string"==typeof e?`'${e}'`:f(e))),", ");throw new _(t,e,"must be one of: "+n)}}));function j(e,t){if("boolean"!=typeof e)throw new v(t,"boolean",e)}function C(e,t,r){return null!=e&&p(e,t)?e[t]:r}const M=m(((e,t,r=null)=>{const i=C(r,"allowArray",!1),a=C(r,"allowFunction",!1);if(!C(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!a||"function"!=typeof e))throw new v(t,"Object",e)})),L=m(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new v(t,"a dictionary",e)})),k=m(((e,t,r=0)=>{if(!n(e))throw new v(t,"Array",e);if(e.length{if(!E(e))throw new v(t,["Buffer","TypedArray","DataView"],e)})),B=m(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new v(t,"AbortSignal",e)})),U=m(((e,t)=>{if("function"!=typeof e)throw new v(t,"Function",e)})),q=m(((e,t)=>{if("function"!=typeof e||O(e))throw new v(t,"Function",e)})),V=m(((e,t)=>{if(void 0!==e)throw new v(t,"undefined",e)})),Q=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function $(e,t){if(void 0===e||!h(Q,e))throw new _(t,e,'must be an array or string of format "; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===h(A,e))throw new _(t,e,"must be a 32-bit unsigned integer or an octal string");e=d(e,8)}return P(e,t),e},validateArray:k,validateStringArray:function(e,t){k(e,t);for(let r=0;rn||(null!=r||null!=n)&&c(e))throw new w(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:M,validateOneOf:D,validatePlainFunction:q,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===g(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new b(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(N(e,t),void 0===x[e]){if(void 0!==x[y(e)])throw new T(e+" (signals must use all capital letters)");throw new T(e)}},validateString:N,validateUint32:P,validateUndefined:V,validateUnion:function(e,t,r){if(!i(r,e))throw new v(t,`('${a(r,"|")}')`,e)},validateAbortSignal:B,validateLinkHeaderValue:function(e){if("string"==typeof e)return $(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n; rel=preload; as=style"')}}},58521:(e,t,r)=>{"use strict";const n=r(50601),i=r(2010),a=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=a,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},52590:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:a}=r(46609),o=globalThis.AggregateError||a,s=Symbol("kIsNodeError"),c=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,l={};function d(e,t){if(!e)throw new l.ERR_INTERNAL_ASSERTION(t)}function p(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 h(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return d(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return d(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[s]=!0,l[e]=i}function f(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class y extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new l.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",((e,t,r)=>{d("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const a=[],o=[],s=[];for(const e of t)d("string"==typeof e,"All expected entries have to be of type string"),c.includes(e)?a.push(e.toLowerCase()):u.test(e)?o.push(e):(d("object"!==e,'The value "object" should be written as "Object"'),s.push(e));if(o.length>0){const e=a.indexOf("object");-1!==e&&(a.splice(a,e,1),o.push("Object"))}if(a.length>0){switch(a.length){case 1:n+=`of type ${a[0]}`;break;case 2:n+=`one of type ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of type ${a.join(", ")}, or ${e}`}}(o.length>0||s.length>0)&&(n+=" or ")}if(o.length>0){switch(o.length){case 1:n+=`an instance of ${o[0]}`;break;case 2:n+=`an instance of ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`an instance of ${o.join(", ")}, or ${e}`}}s.length>0&&(n+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(n+="an "),n+=`${s[0]}`;break;case 2:n+=`one of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`one of ${s.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var l;null!==(l=r.constructor)&&void 0!==l&&l.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),h("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),h("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),h("ERR_MISSING_ARGS",((...e)=>{let t;d(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),h("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return d(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=p(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=p(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:y,aggregateTwoErrors:f((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new o([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:f,codes:l}},51473:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean,Uint8Array}},46609:(e,t,r)=>{"use strict";const n=r(1048),{kResistStopPropagation:i,SymbolDispose:a}=r(51473),o=globalThis.AbortSignal||r(67083).AbortSignal,s=globalThis.AbortController||r(67083).AbortController,c=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,l=void 0!==u?function(e){return e instanceof u}:function(e){return!1},d=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class p extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof c,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:l,deprecate:(e,t)=>e,addAbortListener:r(50046).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return d(e,"signal"),((e,t)=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE("listener","Function",e)})(t),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[a](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:o.any||function(e){if(1===e.length)return e[0];const t=new s,r=()=>t.abort();return e.forEach((e=>{d(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",r)))}),{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},50601:(e,t,r)=>{const{Buffer:n}=r(1048),{ObjectDefineProperty:i,ObjectKeys:a,ReflectApply:o}=r(51473),{promisify:{custom:s}}=r(46609),{streamReturningOperators:c,promiseReturningOperators:u}=r(64708),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=r(52590),d=r(67369),{setDefaultHighWaterMark:p,getDefaultHighWaterMark:h}=r(89952),{pipeline:f}=r(16815),{destroyer:y}=r(16527),g=r(94869),m=r(2010),b=r(92520),v=e.exports=r(23054).Stream;v.isDestroyed=b.isDestroyed,v.isDisturbed=b.isDisturbed,v.isErrored=b.isErrored,v.isReadable=b.isReadable,v.isWritable=b.isWritable,v.Readable=r(11509);for(const T of a(c)){const S=c[T];function _(...e){if(new.target)throw l();return v.Readable.from(o(S,this,e))}i(_,"name",{__proto__:null,value:S.name}),i(_,"length",{__proto__:null,value:S.length}),i(v.Readable.prototype,T,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}for(const O of a(u)){const E=u[O];function _(...e){if(new.target)throw l();return o(E,this,e)}i(_,"name",{__proto__:null,value:E.name}),i(_,"length",{__proto__:null,value:E.length}),i(v.Readable.prototype,O,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}v.Writable=r(65605),v.Duplex=r(86279),v.Transform=r(32073),v.PassThrough=r(76587),v.pipeline=f;const{addAbortSignal:w}=r(21434);v.addAbortSignal=w,v.finished=g,v.destroy=y,v.compose=d,v.setDefaultHighWaterMark=p,v.getDefaultHighWaterMark=h,i(v,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>m}),i(f,s,{__proto__:null,enumerable:!0,get:()=>m.pipeline}),i(g,s,{__proto__:null,enumerable:!0,get:()=>m.finished}),v.Stream=v,v._isUint8Array=function(e){return e instanceof Uint8Array},v._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},2010:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(51473),{isIterable:a,isNodeStream:o,isWebStream:s}=r(92520),{pipelineImpl:c}=r(16815),{finished:u}=r(94869);r(50601),e.exports={finished:u,pipeline:function(...e){return new i(((t,r)=>{let i,u;const l=e[e.length-1];if(l&&"object"==typeof l&&!o(l)&&!a(l)&&!s(l)){const t=n(e);i=t.signal,u=t.end}c(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:u})}))}}},9929: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(29365),t)},29365:(e,t)=>{"use strict";function r(e){const t=[];let r=0;for(;re.join(""))).join("/")}function n(e,t){let n=t+1;t>=0?"/"===e[t+1]&&"/"===e[t+2]&&(n=t+3):"/"===e[0]&&"/"===e[1]&&(n=2);const i=e.indexOf("/",n);return i<0?e:e.substr(0,i)+r(e.substr(i))}function i(e){return!e||"#"===e||"?"===e||"/"===e}Object.defineProperty(t,"__esModule",{value:!0}),t.removeDotSegmentsOfPath=t.removeDotSegments=t.resolve=void 0,t.resolve=function(e,t){const i=(t=t||"").indexOf("#");if(i>0&&(t=t.substr(0,i)),!e.length){if(t.indexOf(":")<0)throw new Error(`Found invalid baseIRI '${t}' for value '${e}'`);return t}if(e.startsWith("?")){const r=t.indexOf("?");return r>0&&(t=t.substr(0,r)),t+e}if(e.startsWith("#"))return t+e;if(!t.length){const t=e.indexOf(":");if(t<0)throw new Error(`Found invalid relative IRI '${e}' for a missing baseIRI`);return n(e,t)}const a=e.indexOf(":");if(a>=0)return n(e,a);const o=t.indexOf(":");if(o<0)throw new Error(`Found invalid baseIRI '${t}' for value '${e}'`);const s=t.substr(0,o+1);if(0===e.indexOf("//"))return s+n(e,a);let c;if(t.indexOf("//",o)===o+1){if(c=t.indexOf("/",o+3),c<0)return t.length>o+3?t+"/"+n(e,a):s+n(e,a)}else if(c=t.indexOf("/",o+1),c<0)return s+n(e,a);if(0===e.indexOf("/"))return t.substr(0,c)+r(e);let u=t.substr(c);const l=u.lastIndexOf("/");return l>=0&&l{var n=r(1048),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.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},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},21925:e=>{var t=function(){var e=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},t=[7,12,13,14,15,16,20,25,115,130],r=[7,13,16,20,25,115,130],n=[7,13,16,115,130],i=[1,25],a=[1,29],o=[1,27],s=[1,28],c=[13,16,115,130],u=[13,16,28,38,40,42,44,46,48,53,56,61,67,85,87,92,93,95,96,102,110,111,115,119,120,126,128,129,130,131,132,133,134,135,136],l=[28,56],d=[1,42],p=[46,48,53,56],h=[1,54],f=[1,60],y=[1,56],g=[1,57],m=[1,58],b=[1,63],v=[1,64],_=[1,65],w=[1,66],T=[1,67],S=[1,68],O=[1,75],E=[28,46,48,53,56],x=[28,42,46,48,53,56],A=[13,16,28,38,40,42,44,46,48,53,56,92,115,119,120,130,131,132,133,134,135,136],R=[13,16,28,38,40,42,44,46,48,53,56,67,85,87,92,95,96,115,119,120,126,128,129,130,131,132,133,134,135,136],I=[13,16,38,40,44,92,115,119,120,130,131,132,133,134,135,136],P=[13,16,28,38,40,42,44,46,48,53,56,67,85,87,92,95,96,115,117,118,119,120,126,128,129,130,131,132,133,134,135,136],N=[13,16,28,56,115,130],D=[13,16,38,58,87,96,109,115,126,130],j=[1,116],C=[1,112],M=[1,108],L=[1,114],k=[1,111],F=[7,13,16,20,25,44,48,53,56,67,85,87,95,96,115,128,129,130],B=[48,53],U=[48,53,87,96,126],q=[13,16,44,48,53,56,85,87,95,96,115,128,129,130],V=[1,126],Q=[13,16,40,44,48,53,56,85,87,95,96,115,128,129,130],$=[1,129],H=[48,53,67,87,96,126],G=[13,16,40,44,48,53,56,67,85,87,95,96,115,128,129,130],z=[1,133],K=[13,16,40,44,48,53,56,67,85,87,95,96,102,115,128,129,130],X=[13,16,40,44,48,53,56,67,85,87,93,95,96,102,110,111,115,128,129,130],J=[1,151],W=[1,153],Y=[1,156],Z=[1,157],ee=[1,158],te=[1,167],re=[1,175],ne=[13,16,44,48,53,56,67,85,87,95,96,115,128,129,130],ie=[13,16,44,48,53,56,67,85,87,95,96,115,126,128,129,130],ae=[13,16,46,92,115,119,120,130,131,132,133,134,135,136],oe={trace:function(){},yy:{},symbols_:{error:2,shaclDoc:3,shaclDoc_repetition0:4,shaclDoc_repetition1:5,ttlSection:6,EOF:7,directive:8,baseDecl:9,importsDecl:10,prefixDecl:11,KW_BASE:12,IRIREF:13,KW_IMPORTS:14,KW_PREFIX:15,PNAME_NS:16,nodeShapeIri:17,iri:18,nodeShape:19,KW_SHAPE:20,nodeShape_option0:21,nodeShape_option1:22,nodeShapeBody:23,shapeClass:24,KW_SHAPE_CLASS:25,shapeClass_option0:26,turtleAnnotation:27,";":28,turtleAnnotation2:29,predicate:30,turtleAnnotation2_option0:31,objectList:32,object:33,objectList_repetition0:34,iriOrLiteral:35,blankNodeSection:36,list:37,"(":38,list_repetition0:39,")":40,objectTail:41,",":42,LB:43,"[":44,RB:45,"]":46,LP:47,"%":48,RP:49,pcSection:50,iriHead:51,ttlStatement:52,".":53,ttlSection_repetition0:54,startNodeShape:55,"{":56,endNodeShape:57,"}":58,nodeShapeBody_repetition0:59,targetClass:60,"->":61,targetClass_repetition_plus0:62,constraint:63,constraint_group0:64,constraint_option0:65,orNotComponent:66,"|":67,nodeNot:68,nodeOrEmit:69,nodeOr:70,nodeOr_repetition_plus0:71,nodeValue:72,negation:73,nodeValue_group0:74,"=":75,iriOrLiteralOrArray:76,propertyShape:77,path:78,propertyShape_repetition0:79,propertyOrComponent:80,propertyNot:81,propertyOr:82,propertyOr_repetition_plus0:83,propertyAtom:84,NODEKIND:85,shapeRef:86,PARAM:87,propertyCount:88,propertyMinCount:89,"..":90,propertyMaxCount:91,INTEGER:92,"*":93,shapeRef_group0:94,"@":95,"!":96,pathAlternative:97,additionalAlternative:98,pathSequence:99,pathAlternative_repetition_plus0:100,additionalSequence:101,"/":102,pathEltOrInverse:103,pathSequence_repetition_plus0:104,pathElt:105,pathPrimary:106,pathMod:107,pathInverse:108,"^":109,"?":110,"+":111,iriOrLiteralOrArray_repetition0:112,literal:113,iri_group0:114,a:115,string:116,LANGTAG:117,"^^":118,DECIMAL:119,DOUBLE:120,literal_group0:121,string_group0:122,string_group1:123,shaclDoc_repetition1_group0:124,constraint_group0_repetition_plus0:125,TARGET:126,propertyShape_repetition0_group0:127,ATPNAME_LN:128,ATPNAME_NS:129,PNAME_LN:130,KW_TRUE:131,KW_FALSE:132,STRING_LITERAL1:133,STRING_LITERAL2:134,STRING_LITERAL_LONG1:135,STRING_LITERAL_LONG2:136,$accept:0,$end:1},terminals_:{2:"error",7:"EOF",12:"KW_BASE",13:"IRIREF",14:"KW_IMPORTS",15:"KW_PREFIX",16:"PNAME_NS",20:"KW_SHAPE",25:"KW_SHAPE_CLASS",28:";",38:"(",40:")",42:",",44:"[",46:"]",48:"%",53:".",56:"{",58:"}",61:"->",67:"|",75:"=",85:"NODEKIND",87:"PARAM",90:"..",92:"INTEGER",93:"*",95:"@",96:"!",102:"/",109:"^",110:"?",111:"+",115:"a",117:"LANGTAG",118:"^^",119:"DECIMAL",120:"DOUBLE",126:"TARGET",128:"ATPNAME_LN",129:"ATPNAME_NS",130:"PNAME_LN",131:"KW_TRUE",132:"KW_FALSE",133:"STRING_LITERAL1",134:"STRING_LITERAL2",135:"STRING_LITERAL_LONG1",136:"STRING_LITERAL_LONG2"},productions_:[0,[3,4],[8,1],[8,1],[8,1],[9,2],[10,2],[11,3],[17,1],[19,5],[24,4],[27,2],[29,2],[30,2],[32,2],[33,1],[33,1],[33,1],[37,3],[41,2],[43,1],[45,1],[36,3],[47,1],[49,1],[50,3],[51,1],[52,3],[6,1],[55,1],[57,1],[23,3],[60,2],[63,3],[66,2],[69,1],[70,1],[70,2],[68,1],[68,2],[72,3],[77,2],[80,2],[82,1],[82,2],[81,1],[81,2],[84,1],[84,1],[84,1],[84,3],[84,1],[88,5],[89,1],[91,1],[91,1],[86,1],[86,2],[73,1],[78,1],[98,2],[97,1],[97,2],[101,2],[99,1],[99,2],[105,1],[105,2],[103,1],[103,2],[108,1],[107,1],[107,1],[107,1],[106,1],[106,3],[76,1],[76,3],[35,1],[35,1],[18,1],[18,1],[18,1],[113,1],[113,2],[113,3],[113,1],[113,1],[113,1],[113,1],[116,1],[116,1],[4,0],[4,2],[124,1],[124,1],[5,0],[5,2],[21,0],[21,1],[22,0],[22,1],[26,0],[26,1],[31,0],[31,1],[34,0],[34,2],[39,0],[39,2],[54,0],[54,2],[59,0],[59,2],[62,1],[62,2],[125,1],[125,2],[64,1],[64,1],[65,0],[65,1],[71,1],[71,2],[74,1],[74,1],[127,1],[127,1],[79,0],[79,2],[83,1],[83,2],[94,1],[94,1],[100,1],[100,2],[104,1],[104,2],[112,0],[112,2],[114,1],[114,1],[121,1],[121,1],[122,1],[122,1],[123,1],[123,1]],performAction:function(e,t,r,n,i,a,o){var s,c,u=a.length-1;switch(i){case 1:this.$=Re(De.factory.namedNode(Te("")),De.factory.namedNode(ce),De.factory.namedNode(be+"Ontology"));break;case 5:De.base=De.factory.namedNode(a[u].slice(1,-1)),De.n3Parser._setBase(De.base.value);break;case 6:this.$=Re(De.base,De.factory.namedNode(be+"imports"),De.factory.namedNode(a[u].slice(1,-1)));break;case 7:this.$=De.prefixes[a[u-1].substr(0,a[u-1].length-1)]=Te(a[u]);break;case 8:De.nodeShapeStack=!1,Re(De.currentNodeShape=a[u],De.factory.namedNode(ce),De.factory.namedNode(me+"NodeShape"));break;case 10:this.$=Re(De.currentNodeShape,De.factory.namedNode(ce),De.factory.namedNode(ve+"Class"));break;case 11:this.$=Pe();break;case 13:this.$=a[u].forEach((e=>Re(De.currentNodeShape,a[u-1],e)));break;case 14:this.$=[a[u-1],...a[u]];break;case 18:this.$=we(a[u-1],!0);break;case 19:case 34:case 42:case 60:case 63:this.$=a[u];break;case 20:De.tempCurrentNodeShape=De.currentNodeShape,this.$=De.currentNodeShape=Ee();break;case 21:case 24:De.currentNodeShape=De.tempCurrentNodeShape;break;case 22:case 31:this.$=a[u-2];break;case 23:De.tempCurrentNodeShape=De.currentNodeShape,De.currentNodeShape=De.currentPropertyNode;break;case 26:De.currentNodeShape=a[u];break;case 29:De.nodeShapeStack?(De.nodeShapeStack.push(De.currentNodeShape),Re(De.currentPropertyNode,De.factory.namedNode(me+"node"),De.currentNodeShape=Ee())):De.nodeShapeStack=[],this.$=De.currentNodeShape;break;case 30:De.nodeShapeStack.length>0&&(De.currentNodeShape=De.nodeShapeStack.pop());break;case 32:this.$=a[u].forEach((e=>{Re(De.currentNodeShape,De.factory.namedNode(me+"targetClass"),e)}));break;case 35:this.$=Re(De.currentNodeShape,De.factory.namedNode(me+a[u][0]),a[u][1]);break;case 36:break;case 37:const e=we([a[u-1],...a[u]].map((e=>{const t=Ee();return Re(t,De.factory.namedNode(me+e[0]),e[1]),t})));this.$=["or",e];break;case 39:case 46:this.$=function(e,t,r){const n=Ee();return Re(n,De.factory.namedNode(me+t),r),[e,n]}("not",...a[u]);break;case 40:case 50:this.$=[a[u-2],a[u]];break;case 43:this.$=a[u]&&Ie(...a[u]);break;case 44:this.$=Ie("or",we([a[u-1],...a[u]].map((e=>{const t=Ee();return Re(t,De.factory.namedNode(me+e[0]),e[1]),t}))));break;case 47:this.$=[_e[a[u].value]?"datatype":"class",a[u]];break;case 48:this.$=["nodeKind",De.factory.namedNode(me+a[u])];break;case 49:this.$=["node",De.factory.namedNode(a[u])];break;case 51:this.$=void 0;break;case 53:this.$=a[u]>0&&Ie("minCount",Oe(a[u],he));break;case 54:this.$=Ie("maxCount",Oe(a[u],he));break;case 56:this.$=Se(a[u].slice(1));break;case 57:this.$=Te(a[u]);break;case 59:Re(De.currentNodeShape,De.factory.namedNode(me+"property"),De.currentPropertyNode=Ee()),Ie("path",a[u]);break;case 62:const t=Ee();Re(t,De.factory.namedNode(me+"alternativePath"),we([a[u-1],...a[u]])),this.$=t;break;case 65:this.$=we([a[u-1],...a[u]]);break;case 67:Re(this.$=Ee(),De.factory.namedNode(me+a[u]),a[u-1]);break;case 69:Re(this.$=Ee(),De.factory.namedNode(me+"inversePath"),a[u]);break;case 71:this.$="zeroOrOnePath";break;case 72:this.$="zeroOrMorePath";break;case 73:this.$="oneOrMorePath";break;case 75:this.$=a[u-1];break;case 77:this.$=we(a[u-1]);break;case 80:this.$=De.factory.namedNode(Te(a[u]));break;case 81:this.$=De.factory.namedNode(Se(a[u]));break;case 82:this.$=Pe(De.factory.namedNode(ce));break;case 83:this.$=Oe(a[u]);break;case 84:this.$=(s=a[u-1],c=lowercase(a[u].substr(1)),De.factory.literal(s,c));break;case 85:this.$=Oe(a[u-2],a[u]);break;case 86:this.$=Oe(a[u],he);break;case 87:this.$=Oe(a[u],fe);break;case 88:this.$=Oe(a[u].toLowerCase(),ye);break;case 89:this.$=Oe(a[u].toLowerCase(),ge);break;case 90:this.$=Ae(a[u],1);break;case 91:this.$=Ae(a[u],3);break;case 92:case 96:case 106:case 108:case 110:case 112:case 128:case 138:this.$=[];break;case 93:case 97:case 107:case 109:case 111:case 113:case 115:case 117:case 123:case 129:case 131:case 135:case 137:case 139:a[u-1].push(a[u]);break;case 114:case 116:case 122:case 130:case 134:case 136:this.$=[a[u]]}},table:[e(t,[2,92],{3:1,4:2}),{1:[3]},e(r,[2,96],{5:3,8:4,9:5,10:6,11:7,12:[1,8],14:[1,9],15:[1,10]}),e(n,[2,110],{6:11,124:12,54:13,19:14,24:15,20:[1,16],25:[1,17]}),e(t,[2,93]),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{13:[1,18]},{13:[1,19]},{16:[1,20]},{7:[1,21]},e(r,[2,97]),{7:[2,28],13:i,16:a,18:24,51:23,52:22,114:26,115:o,130:s},e(r,[2,94]),e(r,[2,95]),{13:i,16:a,17:30,18:31,114:26,115:o,130:s},{13:i,16:a,17:32,18:31,114:26,115:o,130:s},e(t,[2,5]),e(t,[2,6]),{13:[1,33]},{1:[2,1]},e(n,[2,111]),{13:i,16:a,18:36,29:34,30:35,114:26,115:o,130:s},e(c,[2,26]),e(u,[2,80]),e(u,[2,81]),e(u,[2,82]),e(u,[2,140]),e(u,[2,141]),e(l,[2,98],{21:37,60:38,61:[1,39]}),e([28,56,61],[2,8]),{26:40,27:41,28:d,56:[2,102]},e(t,[2,7]),{53:[1,43]},e(p,[2,104],{31:44,27:45,28:d}),{13:i,16:a,18:51,32:46,33:47,35:48,36:49,37:50,38:h,43:53,44:f,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},{22:69,27:70,28:d,56:[2,100]},e(l,[2,99]),{13:i,16:a,18:72,62:71,114:26,115:o,130:s},{23:73,55:74,56:O},{56:[2,103]},{13:i,16:a,18:36,29:76,30:35,114:26,115:o,130:s},e(n,[2,27]),e(p,[2,12]),e(p,[2,105]),e(E,[2,13]),e(x,[2,106],{34:77}),e(A,[2,15]),e(A,[2,16]),e(A,[2,17]),e(R,[2,78]),e(R,[2,79]),{13:i,16:a,18:36,29:78,30:35,114:26,115:o,130:s},e(I,[2,108],{39:79}),e(R,[2,83],{117:[1,80],118:[1,81]}),e(R,[2,86]),e(R,[2,87]),e(R,[2,88]),e(R,[2,89]),e(c,[2,20]),e(P,[2,90]),e(P,[2,91]),e(R,[2,142]),e(R,[2,143]),e(P,[2,144]),e(P,[2,145]),e(P,[2,146]),e(P,[2,147]),{23:82,55:74,56:O},{56:[2,101]},e(l,[2,32],{114:26,18:83,13:i,16:a,115:o,130:s}),e(N,[2,114]),e(r,[2,10]),e(D,[2,112],{59:84}),e(D,[2,29]),e(p,[2,11]),e(E,[2,14],{41:85,42:[1,86]}),{45:87,46:[1,88]},{13:i,16:a,18:51,33:90,35:48,36:49,37:50,38:h,40:[1,89],43:53,44:f,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(R,[2,84]),{13:i,16:a,18:91,114:26,115:o,130:s},e(r,[2,9]),e(N,[2,115]),{13:i,16:a,18:115,38:j,57:92,58:[1,94],63:93,64:95,68:102,69:98,70:100,72:104,73:105,74:107,77:97,78:99,87:C,96:M,97:101,99:103,103:106,105:109,106:113,108:110,109:L,114:26,115:o,125:96,126:k,130:s},e(x,[2,107]),{13:i,16:a,18:51,33:117,35:48,36:49,37:50,38:h,43:53,44:f,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(A,[2,22]),e(A,[2,21]),e(A,[2,18]),e(I,[2,109]),e(R,[2,85]),e(F,[2,31]),e(D,[2,113]),e(F,[2,30]),{47:120,48:[1,121],50:119,53:[2,120],65:118},e(B,[2,118],{70:100,68:102,72:104,73:105,74:107,69:122,87:C,96:M,126:k}),e(B,[2,119]),e(U,[2,116]),e(q,[2,128],{79:123}),e(U,[2,35]),e(q,[2,59]),e(U,[2,36],{71:124,66:125,67:V}),e(Q,[2,61],{100:127,98:128,67:$}),e(H,[2,38]),{72:130,74:107,87:C,126:k},e(G,[2,64],{104:131,101:132,102:z}),{75:[1,134]},e([13,16,56,85,87,95,115,126,128,129,130],[2,58]),e(K,[2,68]),{13:i,16:a,18:115,38:j,105:135,106:113,114:26,115:o,130:s},{75:[2,124]},{75:[2,125]},e(K,[2,66],{107:136,93:[1,138],110:[1,137],111:[1,139]}),e([13,16,38,115,130],[2,70]),e(X,[2,74]),{13:i,16:a,18:115,38:j,97:140,99:103,103:106,105:109,106:113,108:110,109:L,114:26,115:o,130:s},e(x,[2,19]),{53:[1,141]},{53:[2,121]},{13:i,16:a,18:36,29:142,30:35,114:26,115:o,130:s},e(c,[2,23]),e(U,[2,117]),e(B,[2,41],{114:26,55:74,127:143,88:144,82:145,81:147,84:148,73:149,18:150,86:152,23:154,94:155,13:i,16:a,44:[1,146],56:O,85:J,87:W,95:Y,96:M,115:o,128:Z,129:ee,130:s}),e(U,[2,37],{66:159,67:V}),e(H,[2,122]),{68:160,72:104,73:105,74:107,87:C,96:M,126:k},e(Q,[2,62],{98:161,67:$}),e(G,[2,134]),{13:i,16:a,18:115,38:j,99:162,103:106,105:109,106:113,108:110,109:L,114:26,115:o,130:s},e(H,[2,39]),e(G,[2,65],{101:163,102:z}),e(K,[2,136]),{13:i,16:a,18:115,38:j,103:164,105:109,106:113,108:110,109:L,114:26,115:o,130:s},{13:i,16:a,18:51,35:166,44:te,76:165,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(K,[2,69]),e(K,[2,67]),e(K,[2,71]),e(K,[2,72]),e(K,[2,73]),{40:[1,168]},e(D,[2,33]),{48:[1,170],49:169},e(q,[2,129]),e(q,[2,126]),e(q,[2,127]),{89:171,92:[1,172]},e(q,[2,43],{83:173,80:174,67:re}),e(ne,[2,45]),{13:i,16:a,18:150,23:154,55:74,56:O,84:176,85:J,86:152,87:W,94:155,95:Y,114:26,115:o,128:Z,129:ee,130:s},e(ne,[2,47]),e(ne,[2,48]),e(ne,[2,49]),{75:[1,177]},e(ne,[2,51]),e(ne,[2,56]),{13:[1,178]},e(ne,[2,132]),e(ne,[2,133]),e(H,[2,123]),e(H,[2,34]),e(G,[2,135]),e(G,[2,60]),e(K,[2,137]),e(K,[2,63]),e(H,[2,40]),e(ie,[2,76]),e(ae,[2,138],{112:179}),e(X,[2,75]),{53:[2,25]},{53:[2,24]},{90:[1,180]},{90:[2,53]},e(q,[2,44],{80:181,67:re}),e(ne,[2,130]),{13:i,16:a,18:150,23:154,55:74,56:O,73:149,81:182,84:148,85:J,86:152,87:W,94:155,95:Y,96:M,114:26,115:o,128:Z,129:ee,130:s},e(ne,[2,46]),{13:i,16:a,18:51,35:166,44:te,76:183,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(ne,[2,57]),{13:i,16:a,18:51,35:185,46:[1,184],92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},{91:186,92:[1,187],93:[1,188]},e(ne,[2,131]),e(ne,[2,42]),e(ne,[2,50]),e(ie,[2,77]),e(ae,[2,139]),{46:[1,189]},{46:[2,54]},{46:[2,55]},e(q,[2,52])],defaultActions:{21:[2,1],41:[2,103],70:[2,101],111:[2,124],112:[2,125],119:[2,121],169:[2,25],170:[2,24],172:[2,53],187:[2,54],188:[2,55]},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=[],a=this.table,o="",s=0,c=0,u=0,l=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(p.yy[h]=this.yy[h]);d.setInput(e,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;i.push(f);var y,g=d.options&&d.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,b,v,_,w,T,S,O,E,x={};;){if(v=r[r.length-1],this.defaultActions[v]?_=this.defaultActions[v]:(null==m&&(y=void 0,"number"!=typeof(y=d.lex()||1)&&(y=t.symbols_[y]||y),m=y),_=a[v]&&a[v][m]),void 0===_||!_.length||!_[0]){var A;for(T in E=[],a[v])this.terminals_[T]&&T>2&&E.push("'"+this.terminals_[T]+"'");A=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:f,expected:E})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+m);switch(_[0]){case 1:r.push(m),n.push(d.yytext),i.push(d.yylloc),r.push(_[1]),m=null,b?(m=b,b=null):(c=d.yyleng,o=d.yytext,s=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[_[1]][1],x.$=n[n.length-S],x._$={first_line:i[i.length-(S||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(S||1)].first_column,last_column:i[i.length-1].last_column},g&&(x._$.range=[i[i.length-(S||1)].range[0],i[i.length-1].range[1]]),void 0!==(w=this.performAction.apply(x,[o,c,s,p.yy,_[1],n,i].concat(l))))return w;S&&(r=r.slice(0,-1*S*2),n=n.slice(0,-1*S),i=i.slice(0,-1*S)),r.push(this.productions_[_[1]][0]),n.push(x.$),i.push(x._$),O=a[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}};const se="http://www.w3.org/1999/02/22-rdf-syntax-ns#",ce=se+"type",ue=se+"first",le=se+"rest",de=se+"nil",pe="http://www.w3.org/2001/XMLSchema#",he=pe+"integer",fe=pe+"decimal",ye=pe+"double",ge=pe+"boolean",me="http://www.w3.org/ns/shacl#",be="http://www.w3.org/2002/07/owl#",ve="http://www.w3.org/2000/01/rdf-schema#",_e={[he]:!0,[fe]:!0,[pe+"float"]:!0,[ye]:!0,[pe+"string"]:!0,[ge]:!0,[pe+"dateTime"]:!0,[pe+"nonPositiveInteger"]:!0,[pe+"negativeInteger"]:!0,[pe+"long"]:!0,[pe+"int"]:!0,[pe+"short"]:!0,[pe+"byte"]:!0,[pe+"nonNegativeInteger"]:!0,[pe+"unsignedLong"]:!0,[pe+"unsignedShort"]:!0,[pe+"unsignedByte"]:!0,[pe+"positiveInteger"]:!0,[se+"langString"]:!0};function we(e,t=!1){let r=0,n=e.length;if(t&&0===n)return De.factory.namedNode(de);const i=head=Ee();return 0===n&&Re(head,De.factory.namedNode(le),De.factory.namedNode(de)),e.forEach((e=>{if(void 0===e)throw new Error("b");Re(head,De.factory.namedNode(ue),e),Re(head,De.factory.namedNode(le),head=++r20?"...":"")+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 a in i)this[a]=i[a];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(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))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(){return this.next()||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 14;case 3:return 15;case 4:return 25;case 5:return 20;case 6:return 131;case 7:return 132;case 8:return 85;case 9:return 126;case 10:return 87;case 11:return"PASS";case 12:return"COMMENT";case 13:return 13;case 14:return 16;case 15:return 130;case 16:return 129;case 17:return 128;case 18:return 117;case 19:return 92;case 20:return 119;case 21:return 120;case 22:return"EXPONENT";case 23:return 133;case 24:return 134;case 25:return 135;case 26:return 136;case 27:return 61;case 28:return 90;case 29:return 58;case 30:return 56;case 31:return 38;case 32:return 40;case 33:return 44;case 34:return 46;case 35:return 110;case 36:return 93;case 37:return 111;case 38:return 67;case 39:return 118;case 40:return 53;case 41:return 96;case 42:return 102;case 43:return 75;case 44:return 95;case 45:return 109;case 46:return 28;case 47:return 42;case 48:return 48;case 49:return 115;case 50:return 7;case 51:console.log(t.yytext)}},rules:[/^(?:\s+|#[^\n\r]*)/i,/^(?:BASE)/i,/^(?:IMPORTS)/i,/^(?:PREFIX)/i,/^(?:shapeClass)/i,/^(?:shape)/i,/^(?:true)/i,/^(?:false)/i,/^(?:(BlankNode|IRI|Literal|BlankNodeOrIRI|BlankNodeOrLiteral|IRIOrLiteral\b))/i,/^(?:(targetNode|targetObjectsOf|targetSubjectsOf\b))/i,/^(?:(deactivated|severity|message|class|datatype|nodeKind|minExclusive|minInclusive|maxExclusive|maxInclusive|minLength|maxLength|pattern|flags|languageIn|uniqueLang|equals|disjoint|lessThan|lessThanOrEquals|qualifiedValueShape|qualifiedMinCount|qualifiedMaxCount|qualifiedValueShapesDisjoint|closed|ignoredProperties|hasValue|in))/i,/^(?:([ \t\r\n]+))/i,/^(?:(#[\r\n]*))/i,/^(?:(<([^=<>\"\{\}\|\^`\\\u0000-\u0020]|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])))*>))/i,/^(?:((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:))/i,/^(?:(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:)(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|:|[0-9]|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/i,/^(?:(@(([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:))/i,/^(?:(@((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:)(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|:|[0-9]|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/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]+))))/i,/^(?:([eE][+-]?[0-9]+))/i,/^(?:('(?:(?:[^\u0027\u005C\u000A\u000D])|(\\[tbnrf\\\"\']))*'))/i,/^(?:("(?:(?:[^\u0022\u005C\u000A\u000D])|(\\[tbnrf\\\"\']))*"))/i,/^(?:('''(?:(?:'|'')?(?:[^'\\]|(\\[tbnrf\\\"\'])))*'''))/i,/^(?:("""(?:(?:"|"")?(?:[^\"\\]|(\\[tbnrf\\\"\'])))*"""))/i,/^(?:->)/i,/^(?:\.\.)/i,/^(?:\})/i,/^(?:\{)/i,/^(?:\()/i,/^(?:\))/i,/^(?:\[)/i,/^(?:\])/i,/^(?:\?)/i,/^(?:\*)/i,/^(?:\+)/i,/^(?:\|)/i,/^(?:\^\^)/i,/^(?:\.)/i,/^(?:!)/i,/^(?:\/)/i,/^(?:=)/i,/^(?:@)/i,/^(?:\^)/i,/^(?:;)/i,/^(?:,)/i,/^(?:%)/i,/^(?:a)/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],inclusive:!0}}};function De(){this.yy={}}return oe.lexer=Ne,De.prototype=oe,oe.Parser=De,new De}();e.exports=t},21762:(e,t,r)=>{const n=r(21925).Parser,i=r(72243);class a{constructor(){}parse(e,{extendedSyntax:t,baseIRI:r}={}){this._parser=new n,this._parser.Parser.factory=i.DataFactory,this._parser.Parser.base=i.DataFactory.namedNode(r||"urn:x-base:default"),this._parser.Parser.extended=!0===t,this._parser.Parser.prefixes={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",sh:"http://www.w3.org/ns/shacl#",xsd:"http://www.w3.org/2001/XMLSchema#"},this._parser.Parser.currentNodeShape=void 0,this._parser.Parser.currentPropertyNode=void 0,this._parser.Parser.nodeShapeStack=[],this._parser.Parser.tempCurrentNodeShape=void 0,this._parser.Parser.n3Parser=new i.Parser({baseIRI:r||"urn:x-base:default"});const a=[];return this._parser.Parser.onQuad=e=>{a.push(e)},this._parser.parse(e),a.prefixes=this._parser.Parser.prefixes,a}}e.exports.Parser=a,e.exports.parse=function(e,t){return(new a).parse(e,t)}},23344:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=r(72243),o=r(37669),s=r(64817),c=r(98118),u=i(r(57756)),l=i(r(14791)),d=i(r(58007));function p(e){var t;return null===(t=/^[^]*[#/]/.exec(e))||void 0===t?void 0:t[0]}const h={"http://www.w3.org/1999/02/22-rdf-syntax-ns#":"rdf","http://www.w3.org/2000/01/rdf-schema#":"rdfs","http://www.w3.org/ns/shacl#":"sh","http://www.w3.org/2001/XMLSchema#":"xsd"},f={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",sh:"http://www.w3.org/ns/shacl#",xsd:"http://www.w3.org/2001/XMLSchema#"};t.default=class{constructor(e,t,r={},n=void 0,i=!0,a=!1,o,s=!1){this.store=e,this.base=n,this.errorOnExtraQuads=i,this.mintUnspecifiedPrefixes=a,this.fetch=o,this.extendedSyntax=s,this.prefixes={},this.prefixRev={};for(const e of Object.keys(r)){const t=r[e],n="string"==typeof t?t:t.value;n in h||e in f||(this.prefixRev[n]=e,this.prefixes[e]=n)}this.writer=t}write(){return n(this,void 0,void 0,(function*(){const e=this.store.getQuads(null,"http://www.w3.org/1999/02/22-rdf-syntax-ns#type","http://www.w3.org/2002/07/owl#Ontology",null);if(1!==e.length||"NamedNode"!==e[0].subject.termType)throw new Error("Base expected");{const t=e[0].subject;this.store.removeQuads(e),t.equals(new a.NamedNode("urn:x-base:default"))||this.writer.add(`BASE ${(0,s.termToString)(t)}`),yield this.writeImports(t)}if(this.mintUnspecifiedPrefixes){const e=new Set;for(const t of[...this.store.getSubjects(null,null,null),...this.store.getPredicates(null,null,null),...this.store.getObjects(null,null,null)])if("NamedNode"===t.termType){const r=p(t.value);!r||r in this.prefixRev||r in h||e.add(r)}const t=Object.assign(Object.assign({},this.prefixes),f);yield Promise.all([...e].map((e=>(0,o.uriToPrefix)(e,{fetch:this.fetch,mintOnUnknown:!0,existingPrefixes:t}).then((r=>{this.prefixes[r]=e,t[r]=e,this.prefixRev[e]=r})))))}const t=new Set([...this.store.getSubjects(null,null,null),...this.store.getPredicates(null,null,null),...this.store.getObjects(null,null,null)].filter((e=>"NamedNode"===e.termType)).map((e=>p(e.value))).filter((e=>"string"==typeof e)));for(const e in this.prefixRev)t.has(e)||(delete this.prefixes[this.prefixRev[e]],delete this.prefixRev[e]);if(yield this.writePrefixes(),this.prefixes=Object.assign(Object.assign({},this.prefixes),f),this.prefixRev=Object.assign(Object.assign({},this.prefixRev),h),this.writer.newLine(),yield this.writeShapes(),this.extendedSyntax){const e=this.store.getSubjects(null,null,null);e.length>0&&this.writer.newLine(1);for(const t of e)this.writer.add(yield this.termToString(t,!0,!0)),this.writer.add(" "),this.writer.indent(),yield this.writeTurtlePredicates(t),this.writer.deindent();e.length>0&&(this.writer.add(" ."),this.writer.newLine())}if(this.errorOnExtraQuads&&this.store.size>0)throw new Error("Dataset contains quads that cannot be written in SHACLC");this.writer.end()}))}writeImports(e){return n(this,void 0,void 0,(function*(){const t=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/2002/07/owl#imports"),null);if(t.length>0)for(const e of t)this.writer.add(`IMPORTS <${e.value}>`,!0)}))}writePrefixes(){return n(this,void 0,void 0,(function*(){const e=Object.keys(this.prefixes).filter((e=>!(e in l.default))).sort();if(e.length>0)for(const t of e)this.writer.add(`PREFIX ${t}: <${this.prefixes[t]}>`,!0)}))}termToString(e,t=!1,r=!1){return n(this,void 0,void 0,(function*(){try{if(t)throw new Error("Shacl name disabled");return(0,c.getShaclName)(e)}catch(e){}if("NamedNode"===e.termType){const t=p(e.value);return t&&t in this.prefixRev&&t in this.prefixRev?`${this.prefixRev[t]}:${e.value.slice(t.length)}`:(0,s.termToString)(e)}if("Literal"===e.termType)return"http://www.w3.org/2001/XMLSchema#integer"===e.datatypeString||"http://www.w3.org/2001/XMLSchema#boolean"===e.datatypeString?e.value:(0,s.termToString)(e);throw"BlankNode"===e.termType&&r&&(0,s.termToString)(e),new Error(`Invalid term type for extra statement ${e.value} (${e.termType})`)}))}writeShapes(){return n(this,void 0,void 0,(function*(){for(const e of this.store.getSubjectsOnce(new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new a.NamedNode("http://www.w3.org/ns/shacl#NodeShape"),null)){this.store.getQuadsOnce(e,new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new a.NamedNode("http://www.w3.org/2000/01/rdf-schema#Class"),null).length>0?this.writer.add("shapeClass "):this.writer.add("shape "),this.writer.add(yield this.termToString(e)),this.writer.add(" ");const t=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#targetClass"),null);if(t.length>0){this.writer.add("-> ");for(const e of t)"NamedNode"===e.termType?this.writer.add(yield this.termToString(e)):(this.writer.add("!"),this.writer.add(yield this.termToString(this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#not"),!0)))),this.writer.add(" ")}const r=this.store.getPredicates(e,null,null).filter((e=>[new a.NamedNode("http://www.w3.org/ns/shacl#targetClass"),new a.NamedNode("http://www.w3.org/ns/shacl#property"),new a.NamedNode("http://www.w3.org/ns/shacl#or"),...Object.keys(d.default).map((e=>new a.NamedNode("http://www.w3.org/ns/shacl#"+e)))].every((t=>!e.equals(t)))));r.length>0&&(this.writer.add(";"),this.writer.indent(),this.writer.newLine(1)),this.extendedSyntax&&(yield this.writeGivenTurtlePredicates(e,r)),r.length>0&&(this.writer.add(" "),this.writer.deindent()),yield this.writeShapeBody(e,!1)}}))}getSingleProperty(e,t){let r=[e];try{let n=(0,c.getShaclName)(e.predicate),i="pred";if("not"===n){const t=this.store.getQuadsOnce(e.object,null,null,null);if(r=r.concat(t),1!==t.length)throw new Error("Can only handle having one predicate of 'not'");[e]=t,n=(0,c.getShaclName)(e.predicate),i="not"}if(!(n in t))throw new Error(`${n} is not allowed`);return{name:n,type:i,object:e.object}}catch(e){this.store.addQuads(r)}}singleLayerPropertiesList(e,t){const r=[];for(const n of this.store.getQuadsOnce(e,null,null,null)){const e=this.getSingleProperty(n,t);e&&r.push(e)}return r}expectOneProperty(e,t){const r=this.store.getQuadsOnce(e,null,null,null);if(1===r.length){const e=this.getSingleProperty(r[0],t);if(e)return e}this.store.addQuads(r)}orProperties(e,t){const r=[];for(const n of this.store.getQuadsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#or"),null,null)){const e=[];for(const r of this.getList(n.object)){const i=this.expectOneProperty(r,t);if(!i)throw this.store.addQuad(n),new Error("Each entry of the 'or' statement must declare exactly one property");e.push(i)}r.push(e)}return r}getList(e){let t=e;const r=[];for(;!t.equals(new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));)r.push(this.singleObject(t,new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),!0)),t=this.singleObject(t,new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),!0);return r}writeIriLiteralOrArray(e){return n(this,void 0,void 0,(function*(){if("BlankNode"===e.termType){this.writer.add("[");let t=!0;for(const r of this.getList(e))t?t=!1:this.writer.add(" "),this.writer.add(yield this.termToString(r));this.writer.add("]")}else this.writer.add(yield this.termToString(e))}))}singleObject(e,t,r){var n;return null===(n=this.singleQuad(e,t,r))||void 0===n?void 0:n.object}singleQuad(e,t,r=!1){const n=this.store.getQuadsOnce(e,t,null,null);if(r&&1!==n.length)throw this.store.addQuads(n),new Error(`The subject and predicate ${null==e?void 0:e.value} ${null==t?void 0:t.value} must have exactly one object. Instead has ${n.length}`);if(n.length>1)throw this.store.addQuads(n),new Error(`The subject and predicate ${null==e?void 0:e.value} ${null==t?void 0:t.value} can have at most one object. Instead has ${n.length}`);return 1===n.length?n[0]:void 0}writeAssigment({name:e,type:t,object:r}){return n(this,void 0,void 0,(function*(){"not"===t&&this.writer.add("!"),this.writer.add(e),this.writer.add("="),yield this.writeIriLiteralOrArray(r)}))}writeAtom({name:e,type:t,object:r}){return n(this,void 0,void 0,(function*(){switch("not"===t&&this.writer.add("!"),e){case"node":if("NamedNode"===r.termType)this.writer.add(`@${yield this.termToString(r)}`);else{if("BlankNode"!==r.termType)throw new Error("Invalid nested shape, must be blank node or IRI");yield this.writeShapeBody(r)}return;case"nodeKind":return void this.writer.add((0,c.getShaclName)(r));case"class":case"datatype":return void this.writer.add(yield this.termToString(r));default:this.writer.add(e),this.writer.add("="),yield this.writeIriLiteralOrArray(r)}}))}writeAssigments(e,t=" ",r=!0,i){return n(this,void 0,void 0,(function*(){for(const n of e)r?r=!1:this.writer.add(t),i?yield this.writeAtom(n):yield this.writeAssigment(n)}))}writeParams(e,t=!0,r,i=!1,a=!1){return n(this,void 0,void 0,(function*(){const n=this.orProperties(e,r),o=this.singleLayerPropertiesList(e,r);a&&(n.length>0||o.length>0)&&this.writer.newLine(1);for(const e of n)t?t=!1:this.writer.add(" "),yield this.writeAssigments(e,"|",!0,i);yield this.writeAssigments(o," ",t,i),a&&(n.length>0||o.length>0)&&this.writer.add(" .")}))}writeShapeBody(e,t=!0){return n(this,void 0,void 0,(function*(){this.writer.add("{").indent();const r=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#property"),null);yield this.writeParams(e,!0,d.default,!1,!0);for(const e of r)this.writer.newLine(1),yield this.writeProperty(e);this.writer.deindent().newLine(1),t?this.writer.add("} ."):this.writer.add("}").newLine(1)}))}writeProperty(e){return n(this,void 0,void 0,(function*(){yield this.writePath(this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#path"),!0));const t=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#minCount")),r=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#maxCount")),n=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#nodeKind")),i=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#class")),o=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#datatype")),s=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#node"),null);if(n&&(this.writer.add(" "),this.writer.add((0,c.getShaclName)(n))),i&&(this.writer.add(" "),this.writer.add(yield this.termToString(i))),o&&(this.writer.add(" "),this.writer.add(yield this.termToString(o))),void 0!==t||void 0!==r){if(this.writer.add(" ["),t){if("Literal"!==t.termType||"http://www.w3.org/2001/XMLSchema#integer"!==t.datatypeString)throw new Error("Invalid min value, must me an integer literal");this.writer.add(t.value)}else this.writer.add("0");if(this.writer.add(".."),r){if("Literal"!==r.termType||"http://www.w3.org/2001/XMLSchema#integer"!==r.datatypeString)throw new Error("Invalid max value, must me an integer literal");this.store.removeMatches(e,new a.NamedNode("http://www.w3.org/ns/shacl#maxCount"),void 0,void 0),this.writer.add(r.value)}else this.writer.add("*");this.writer.add("]")}yield this.writeParams(e,!1,u.default,!0);const l=[];for(const e of s)if("NamedNode"===e.termType)this.writer.add(" "),this.writer.add(`@${yield this.termToString(e)}`);else{if("BlankNode"!==e.termType)throw new Error("Invalid nested shape, must be blank node or IRI");l.push(e)}for(const e of l)this.writer.add(" "),yield this.writeShapeBody(e);this.extendedSyntax&&this.store.getQuads(e,null,null,null).length>0&&(this.writer.add(" %"),this.writer.indent(),this.writer.newLine(1),yield this.writeTurtlePredicates(e),this.writer.deindent(),this.writer.newLine(1),this.writer.add("%")),0===l.length&&this.writer.add(" .")}))}writeTurtlePredicates(e){return n(this,void 0,void 0,(function*(){return this.writeGivenTurtlePredicates(e,this.store.getPredicates(e,null,null))}))}writeGivenTurtlePredicates(e,t){return n(this,void 0,void 0,(function*(){let r=!1;if(t.some((e=>e.equals(a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))))){const t=this.store.getObjectsOnce(e,a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),null);t.length>0&&(r=!0,this.writer.add("a "),yield this.writeTurtleObjects(t))}for(const n of t)n.equals(a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))||(r?(this.writer.add(" ;"),this.writer.newLine(1)):r=!0,this.writer.add(yield this.termToString(n,!0)),this.writer.add(" "),yield this.writeTurtleObjects(this.store.getObjectsOnce(e,n,null)))}))}writeTurtleObjects(e){return n(this,void 0,void 0,(function*(){const t=[],r=[];for(const n of e)"BlankNode"===n.termType&&0===[...this.store.match(null,null,n),...this.store.match(null,n,null)].length?t.push(n):r.push(n);this.writer.add((yield Promise.all(r.map((e=>this.termToString(e,!0,!0))))).join(", "));let n=r.length>0;if(t.length>0)for(const e of t)n?this.writer.add(", "):n=!0,(yield this.writeList(e))||(this.writer.add("["),this.writer.indent(),this.writer.newLine(1),yield this.writeTurtlePredicates(e),this.writer.deindent(),this.writer.newLine(1),this.writer.add("]"))}))}writeList(e){return n(this,void 0,void 0,(function*(){let t=e;const r=[],n=[];for(;!t.equals(a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));){const e=this.store.getQuadsOnce(t,a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),null,null),i=this.store.getQuadsOnce(t,a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),null,null);if(n.push(...e,...i),1!==e.length||1!==i.length||0!==this.store.getQuads(t,null,null,null).length)return this.store.addQuads(n),!1;r.push(e[0].object),t=i[0].object}let i=!1;this.writer.add("(");for(const e of r)i?this.writer.add(" "):i=!0,yield this.writeTurtleObjects([e]);return this.writer.add(")"),!0}))}writePath(e,t=!1){return n(this,void 0,void 0,(function*(){if("NamedNode"===e.termType)this.writer.add(yield this.termToString(e));else{if("BlankNode"!==e.termType)throw new Error("Path should be named node or blank node");{const r=this.store.getQuadsOnce(e,null,null,null);if(1===r.length){const{predicate:n,object:i}=r[0];switch(n.value){case"http://www.w3.org/ns/shacl#inversePath":return this.writer.add("^"),void(yield this.writePath(i,!0));case"http://www.w3.org/ns/shacl#alternativePath":{const e=this.getList(i);if(0===e.length)throw new Error("Invalid Alternative Path - no options");if(1===e.length)yield this.writePath(e[0]);else{t&&this.writer.add("(");let r=!0;for(const t of e)r?r=!1:this.writer.add("|"),yield this.writePath(t,!0);t&&this.writer.add(")")}return}case"http://www.w3.org/ns/shacl#zeroOrMorePath":return yield this.writePath(i,!0),void this.writer.add("*");case"http://www.w3.org/ns/shacl#oneOrMorePath":return yield this.writePath(i,!0),void this.writer.add("+");case"http://www.w3.org/ns/shacl#zeroOrOnePath":return yield this.writePath(i,!0),void this.writer.add("?");default:throw new Error(`Invalid path type ${e.value}`)}}else{this.store.addQuads(r);const n=this.getList(e);if(0===n.length)throw new Error("Invalid Path");{t&&this.writer.add("(");let e=!0;for(const t of n)e?e=!1:this.writer.add("/"),yield this.writePath(t,!0);t&&this.writer.add(")")}}}}}))}}},14791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",sh:"http://www.w3.org/ns/shacl#",xsd:"http://www.w3.org/2001/XMLSchema#"}},22939:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.write=void 0;const a=r(72243),o=i(r(23344)),s=i(r(29908)),c=i(r(23187));t.write=function(e,t){return n(this,void 0,void 0,(function*(){return new Promise(((r,i)=>n(this,void 0,void 0,(function*(){try{let n="";const i=new c.default(e),u=i.getGraphs(null,null,null);if(u.length>1)throw new Error("More than one graph found - can serialize in the default graph");if(1===u.length&&!u[0].equals(a.DataFactory.defaultGraph()))throw new Error(`Expected all triples to be in the default graph, instead triples were in ${u[0].value}`);const l=new s.default({write:e=>{n+=e},end:()=>{let e=i.getQuads(null,null,null,null);0===e.length&&(e=void 0),r({text:n,extraQuads:e})}}),d=new o.default(i,l,null==t?void 0:t.prefixes,void 0,!1!==(null==t?void 0:t.errorOnUnused),null==t?void 0:t.mintPrefixes,null==t?void 0:t.fetch,null==t?void 0:t.extendedSyntax);yield d.write()}catch(e){i(e)}}))))}))}},58007:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={targetNode:!0,targetObjectsOf:!0,targetSubjectsOf:!0,deactivated:!0,severity:!0,message:!0,class:!0,datatype:!0,nodeKind:!0,minExclusive:!0,minInclusive:!0,maxExclusive:!0,maxInclusive:!0,minLength:!0,maxLength:!0,pattern:!0,flags:!0,languageIn:!0,equals:!0,disjoint:!0,closed:!0,ignoredProperties:!0,hasValue:!0,in:!0}},57756:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={deactivated:!0,severity:!0,message:!0,class:!0,datatype:!0,nodeKind:!0,minExclusive:!0,minInclusive:!0,maxExclusive:!0,maxInclusive:!0,minLength:!0,maxLength:!0,pattern:!0,flags:!0,languageIn:!0,uniqueLang:!0,equals:!0,disjoint:!0,lessThan:!0,lessThanOrEquals:!0,qualifiedValueShape:!0,qualifiedMinCount:!0,qualifiedMaxCount:!0,qualifiedValueShapesDisjoint:!0,closed:!0,ignoredProperties:!0,hasValue:!0,in:!0,node:!0}},98118:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShaclName=void 0,t.getShaclName=function(e){if("NamedNode"!==e.termType||!e.value.startsWith("http://www.w3.org/ns/shacl#"))throw new Error(`Term ${e.value} is not part of the SHACL namespace`);return e.value.slice(27)}},23187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(72243);class i extends n.Store{getQuadsOnce(e,t,r,n){const i=this.getQuads(e,t,r,n);return this.removeQuads(i),i}getSubjectsOnce(e,t,r){return this.getQuadsOnce(null,e,t,r).map((e=>e.subject))}getObjectsOnce(e,t,r){return this.getQuadsOnce(e,t,null,r).map((e=>e.object))}}t.default=i},29908:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e){this.indents=0,this.write=e.write,this.end=e.end}indent(){return this.indents+=1,this}deindent(){if(this.indents<1)throw new Error(`Trying to deindent when indent is only ${this.indents}`);return this.indents-=1,this}add(e,t=!1){return this.write(t?`\n${"\t".repeat(this.indents)}${e}`:e,"utf-8"),this}newLine(e=2){return this.write("\n".repeat(e)+"\t".repeat(this.indents),"utf-8"),this}}},88110:e=>{e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(e,t){var r=e[0],n=e[1],i=e[2],a=e[3];n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[0]-680876936|0)<<7|r>>>25)+n|0)&n|~r&i)+t[1]-389564586|0)<<12|a>>>20)+r|0)&r|~a&n)+t[2]+606105819|0)<<17|i>>>15)+a|0)&a|~i&r)+t[3]-1044525330|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[4]-176418897|0)<<7|r>>>25)+n|0)&n|~r&i)+t[5]+1200080426|0)<<12|a>>>20)+r|0)&r|~a&n)+t[6]-1473231341|0)<<17|i>>>15)+a|0)&a|~i&r)+t[7]-45705983|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[8]+1770035416|0)<<7|r>>>25)+n|0)&n|~r&i)+t[9]-1958414417|0)<<12|a>>>20)+r|0)&r|~a&n)+t[10]-42063|0)<<17|i>>>15)+a|0)&a|~i&r)+t[11]-1990404162|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[12]+1804603682|0)<<7|r>>>25)+n|0)&n|~r&i)+t[13]-40341101|0)<<12|a>>>20)+r|0)&r|~a&n)+t[14]-1502002290|0)<<17|i>>>15)+a|0)&a|~i&r)+t[15]+1236535329|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[1]-165796510|0)<<5|r>>>27)+n|0)&i|n&~i)+t[6]-1069501632|0)<<9|a>>>23)+r|0)&n|r&~n)+t[11]+643717713|0)<<14|i>>>18)+a|0)&r|a&~r)+t[0]-373897302|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[5]-701558691|0)<<5|r>>>27)+n|0)&i|n&~i)+t[10]+38016083|0)<<9|a>>>23)+r|0)&n|r&~n)+t[15]-660478335|0)<<14|i>>>18)+a|0)&r|a&~r)+t[4]-405537848|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[9]+568446438|0)<<5|r>>>27)+n|0)&i|n&~i)+t[14]-1019803690|0)<<9|a>>>23)+r|0)&n|r&~n)+t[3]-187363961|0)<<14|i>>>18)+a|0)&r|a&~r)+t[8]+1163531501|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[13]-1444681467|0)<<5|r>>>27)+n|0)&i|n&~i)+t[2]-51403784|0)<<9|a>>>23)+r|0)&n|r&~n)+t[7]+1735328473|0)<<14|i>>>18)+a|0)&r|a&~r)+t[12]-1926607734|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[5]-378558|0)<<4|r>>>28)+n|0)^n^i)+t[8]-2022574463|0)<<11|a>>>21)+r|0)^r^n)+t[11]+1839030562|0)<<16|i>>>16)+a|0)^a^r)+t[14]-35309556|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[1]-1530992060|0)<<4|r>>>28)+n|0)^n^i)+t[4]+1272893353|0)<<11|a>>>21)+r|0)^r^n)+t[7]-155497632|0)<<16|i>>>16)+a|0)^a^r)+t[10]-1094730640|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[13]+681279174|0)<<4|r>>>28)+n|0)^n^i)+t[0]-358537222|0)<<11|a>>>21)+r|0)^r^n)+t[3]-722521979|0)<<16|i>>>16)+a|0)^a^r)+t[6]+76029189|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[9]-640364487|0)<<4|r>>>28)+n|0)^n^i)+t[12]-421815835|0)<<11|a>>>21)+r|0)^r^n)+t[15]+530742520|0)<<16|i>>>16)+a|0)^a^r)+t[2]-995338651|0)<<23|n>>>9)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[0]-198630844|0)<<6|r>>>26)+n|0)|~i))+t[7]+1126891415|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[14]-1416354905|0)<<15|i>>>17)+a|0)|~r))+t[5]-57434055|0)<<21|n>>>11)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[12]+1700485571|0)<<6|r>>>26)+n|0)|~i))+t[3]-1894986606|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[10]-1051523|0)<<15|i>>>17)+a|0)|~r))+t[1]-2054922799|0)<<21|n>>>11)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[8]+1873313359|0)<<6|r>>>26)+n|0)|~i))+t[15]-30611744|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[6]-1560198380|0)<<15|i>>>17)+a|0)|~r))+t[13]+1309151649|0)<<21|n>>>11)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[4]-145523070|0)<<6|r>>>26)+n|0)|~i))+t[11]-1120210379|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[2]+718787259|0)<<15|i>>>17)+a|0)|~r))+t[9]-343485551|0)<<21|n>>>11)+i|0,e[0]=r+e[0]|0,e[1]=n+e[1]|0,e[2]=i+e[2]|0,e[3]=a+e[3]|0}function n(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}function i(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return r}function a(e){var t,i,a,o,s,c,u=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)r(l,n(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(r(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,r(l,a),l}function o(e){var r,n="";for(r=0;r<4;r+=1)n+=t[e>>8*r+4&15]+t[e>>8*r&15];return n}function s(e){var t;for(t=0;tu?new ArrayBuffer(0):(n=u-c,i=new ArrayBuffer(n),a=new Uint8Array(i),o=new Uint8Array(this,c,n),a.set(o),i)}}(),l.prototype.append=function(e){return this.appendBinary(c(e)),this},l.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)r(this._hash,n(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},l.prototype.end=function(e){var t,r,n=this._buff,i=n.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(a,i),r=s(this._hash),e&&(r=u(r)),this.reset(),r},l.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},l.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},l.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},l.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},l.prototype._finish=function(e,t){var n,i,a,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(r(this._hash,e),o=0;o<16;o+=1)e[o]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(n[2],16),a=parseInt(n[1],16)||0,e[14]=i,e[15]=a,r(this._hash,e)},l.hash=function(e,t){return l.hashBinary(c(e),t)},l.hashBinary=function(e,t){var r=s(a(e));return t?u(r):r},l.ArrayBuffer=function(){this.reset()},l.ArrayBuffer.prototype.append=function(e){var t,n,a,o,s,c=(n=this._buff.buffer,a=e,o=!0,(s=new Uint8Array(n.byteLength+a.byteLength)).set(new Uint8Array(n)),s.set(new Uint8Array(a),n.byteLength),o?s:s.buffer),u=c.length;for(this._length+=e.byteLength,t=64;t<=u;t+=64)r(this._hash,i(c.subarray(t-64,t)));return this._buff=t-64>2]|=n[t]<<(t%4<<3);return this._finish(a,i),r=s(this._hash),e&&(r=u(r)),this.reset(),r},l.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},l.ArrayBuffer.prototype.getState=function(){var e,t=l.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},l.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var r,n=e.length,i=new ArrayBuffer(n),a=new Uint8Array(i);for(r=0;r>2]|=e[t]<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(r(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,r(l,a),l}(new Uint8Array(e)));return t?u(n):n},l}()},31578:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.toSparqlJs=t.toSparql=t.Factory=t.Algebra=t.translate=void 0;const s=o(r(71029));t.translate=s.default;const c=a(r(47914));t.Algebra=c;const u=o(r(376));t.Factory=u.default;const l=r(24693);Object.defineProperty(t,"toSparql",{enumerable:!0,get:function(){return l.toSparql}}),Object.defineProperty(t,"toSparqlJs",{enumerable:!0,get:function(){return l.toSparqlJs}});const d=o(r(83152));t.Util=d.default},47914:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.expressionTypes=t.types=void 0,(n=t.types||(t.types={})).ALT="alt",n.ASK="ask",n.BGP="bgp",n.CONSTRUCT="construct",n.DESCRIBE="describe",n.DISTINCT="distinct",n.EXPRESSION="expression",n.EXTEND="extend",n.FILTER="filter",n.FROM="from",n.GRAPH="graph",n.GROUP="group",n.INV="inv",n.JOIN="join",n.LEFT_JOIN="leftjoin",n.LINK="link",n.MINUS="minus",n.NOP="nop",n.NPS="nps",n.ONE_OR_MORE_PATH="OneOrMorePath",n.ORDER_BY="orderby",n.PATH="path",n.PATTERN="pattern",n.PROJECT="project",n.REDUCED="reduced",n.SEQ="seq",n.SERVICE="service",n.SLICE="slice",n.UNION="union",n.VALUES="values",n.ZERO_OR_MORE_PATH="ZeroOrMorePath",n.ZERO_OR_ONE_PATH="ZeroOrOnePath",n.COMPOSITE_UPDATE="compositeupdate",n.DELETE_INSERT="deleteinsert",n.LOAD="load",n.CLEAR="clear",n.CREATE="create",n.DROP="drop",n.ADD="add",n.MOVE="move",n.COPY="copy",(r=t.expressionTypes||(t.expressionTypes={})).AGGREGATE="aggregate",r.EXISTENCE="existence",r.NAMED="named",r.OPERATOR="operator",r.TERM="term",r.WILDCARD="wildcard"},376:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const o=a(r(47914)),s=r(18050),c=r(22112),u=r(55403);t.default=class{constructor(e){this.dataFactory=e||new s.DataFactory,this.stringType=this.createTerm("http://www.w3.org/2001/XMLSchema#string")}createAlt(e,t=!0){return this.flattenMulti({type:o.types.ALT,input:e},t)}createAsk(e){return{type:o.types.ASK,input:e}}createBoundAggregate(e,t,r,n,i){const a=this.createAggregateExpression(t,r,n,i);return a.variable=e,a}createBgp(e){return{type:o.types.BGP,patterns:e}}createConstruct(e,t){return{type:o.types.CONSTRUCT,input:e,template:t}}createDescribe(e,t){return{type:o.types.DESCRIBE,input:e,terms:t}}createDistinct(e){return{type:o.types.DISTINCT,input:e}}createExtend(e,t,r){return{type:o.types.EXTEND,input:e,variable:t,expression:r}}createFrom(e,t,r){return{type:o.types.FROM,input:e,default:t,named:r}}createFilter(e,t){return{type:o.types.FILTER,input:e,expression:t}}createGraph(e,t){return{type:o.types.GRAPH,input:e,name:t}}createGroup(e,t,r){return{type:o.types.GROUP,input:e,variables:t,aggregates:r}}createInv(e){return{type:o.types.INV,path:e}}createJoin(e,t=!0){return this.flattenMulti({type:o.types.JOIN,input:e},t)}createLeftJoin(e,t,r){return r?{type:o.types.LEFT_JOIN,input:[e,t],expression:r}:{type:o.types.LEFT_JOIN,input:[e,t]}}createLink(e){return{type:o.types.LINK,iri:e}}createMinus(e,t){return{type:o.types.MINUS,input:[e,t]}}createNop(){return{type:o.types.NOP}}createNps(e){return{type:o.types.NPS,iris:e}}createOneOrMorePath(e){return{type:o.types.ONE_OR_MORE_PATH,path:e}}createOrderBy(e,t){return{type:o.types.ORDER_BY,input:e,expressions:t}}createPath(e,t,r,n){return n?{type:o.types.PATH,subject:e,predicate:t,object:r,graph:n}:{type:o.types.PATH,subject:e,predicate:t,object:r,graph:this.dataFactory.defaultGraph()}}createPattern(e,t,r,n){const i=this.dataFactory.quad(e,t,r,n);return i.type=o.types.PATTERN,i}createProject(e,t){return{type:o.types.PROJECT,input:e,variables:t}}createReduced(e){return{type:o.types.REDUCED,input:e}}createSeq(e,t=!0){return this.flattenMulti({type:o.types.SEQ,input:e},t)}createService(e,t,r){return{type:o.types.SERVICE,input:e,name:t,silent:Boolean(r)}}createSlice(e,t,r){return t=t||0,void 0!==r?{type:o.types.SLICE,input:e,start:t,length:r}:{type:o.types.SLICE,input:e,start:t}}createUnion(e,t=!0){return this.flattenMulti({type:o.types.UNION,input:e},t)}createValues(e,t){return{type:o.types.VALUES,variables:e,bindings:t}}createZeroOrMorePath(e){return{type:o.types.ZERO_OR_MORE_PATH,path:e}}createZeroOrOnePath(e){return{type:o.types.ZERO_OR_ONE_PATH,path:e}}createAggregateExpression(e,t,r,n){return n?{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,separator:n,distinct:r}:{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,distinct:r}}createExistenceExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.EXISTENCE,not:e,input:t}}createNamedExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.NAMED,name:e,args:t}}createOperatorExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.OPERATOR,operator:e,args:t}}createTermExpression(e){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.TERM,term:e}}createWildcardExpression(){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.WILDCARD,wildcard:new u.Wildcard}}createTerm(e){return"$"===e[0]&&(e=e.replace("$","?")),(0,c.stringToTerm)(e,this.dataFactory)}createCompositeUpdate(e){return{type:o.types.COMPOSITE_UPDATE,updates:e}}createDeleteInsert(e,t,r){const n={type:o.types.DELETE_INSERT};return e&&(n.delete=e),t&&(n.insert=t),r&&(n.where=r),n}createLoad(e,t,r){const n={type:o.types.LOAD,source:e};return t&&(n.destination=t),this.addSilent(n,Boolean(r))}createClear(e,t){return this.addSilent({type:o.types.CLEAR,source:e},Boolean(t))}createCreate(e,t){return this.addSilent({type:o.types.CREATE,source:e},Boolean(t))}createDrop(e,t){return this.addSilent({type:o.types.DROP,source:e},Boolean(t))}createAdd(e,t,r){return this.addSilent({type:o.types.ADD,source:e,destination:t},Boolean(r))}createMove(e,t,r){return this.addSilent({type:o.types.MOVE,source:e,destination:t},Boolean(r))}createCopy(e,t,r){return this.addSilent({type:o.types.COPY,source:e,destination:t},Boolean(r))}addSilent(e,t){return t&&(e.silent=t),e}flattenMulti(e,t){if(!t)return e;const r=e.type,n=e.input;let i=[];for(const e of n)e.type===r?i.push(...e.input):i.push(e);return e.input=i,e}}},24693:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.toSparqlJs=t.toSparql=void 0;const s=r(91032),c=r(22112),u=r(55403),l=a(r(47914)),d=o(r(376)),p=o(r(83152)),h=l.types,f=l.expressionTypes;let y;const g=new d.default;function m(e){b();let t=v(e=function(e){return D(e,[])}(e));return"group"===t.type?t.patterns[0]:t}function b(){y={project:!1,extend:[],group:[],aggregates:[],order:[]}}function v(e){switch(e.type!==h.EXTEND&&e.type!==h.ORDER_BY&&e.type!==h.GRAPH&&(y.project=!1),e.type){case h.EXPRESSION:return _(e);case h.ASK:return A(e,h.ASK);case h.BGP:return function(e){let t=e.patterns.map(E);return 0===t.length?null:{type:"bgp",triples:t}}(e);case h.CONSTRUCT:return function(e){return{type:"query",prefixes:{},queryType:"CONSTRUCT",template:e.template.map(E),where:p.default.flatten([v(e.input)])}}(e);case h.DESCRIBE:return A(e,h.DESCRIBE);case h.DISTINCT:return function(e){let t=v(e.input);return t.patterns[0].distinct=!0,t}(e);case h.EXTEND:return function(e){return y.project?(y.extend.push(e),v(e.input)):p.default.flatten([v(e.input),{type:"bind",variable:e.variable,expression:_(e.expression)}])}(e);case h.FROM:return function(e){const t=v(e.input);let r=t;return"group"===t.type&&(r=t.patterns[0]),r.from={default:e.default,named:e.named},t}(e);case h.FILTER:return function(e){return{type:"group",patterns:p.default.flatten([v(e.input),{type:"filter",expression:_(e.expression)}])}}(e);case h.GRAPH:return function(e){return{type:"graph",patterns:p.default.flatten([v(e.input)]),name:e.name}}(e);case h.GROUP:return function(e){const t=v(e.input),r=e.aggregates.map(O);return y.aggregates.push(...r),y.group.push(...e.variables),t}(e);case h.JOIN:return function(e){return p.default.flatten(e.input.map(v)).reduce(((e,t)=>("bgp"!==t.type||0==e.length||"bgp"!==e[e.length-1].type?e.push(t):e[e.length-1].triples.push(...t.triples),e)),[])}(e);case h.LEFT_JOIN:return function(e){const t={type:"optional",patterns:[v(e.input[1])]};return e.expression&&t.patterns.push({type:"filter",expression:_(e.expression)}),t.patterns=p.default.flatten(t.patterns),p.default.flatten([v(e.input[0]),t])}(e);case h.MINUS:return function(e){let t=v(e.input[1]);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),p.default.flatten([v(e.input[0]),{type:"minus",patterns:t}])}(e);case h.NOP:return{};case h.ORDER_BY:return function(e){return y.order.push(...e.expressions),v(e.input)}(e);case h.PATH:return function(e){return{type:"bgp",triples:[{subject:e.subject,predicate:w(e.predicate),object:e.object}]}}(e);case h.PATTERN:return E(e);case h.PROJECT:return A(e,h.PROJECT);case h.REDUCED:return function(e){let t=v(e.input);return t.patterns[0].reduced=!0,t}(e);case h.SERVICE:return function(e){let t=v(e.input);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),{type:"service",name:e.name,silent:e.silent,patterns:t}}(e);case h.SLICE:return function(e){let t=v(e.input),r=t;return t.type&&"group"===t.type&&(r=t.patterns[0]),0!==e.start&&(r.offset=e.start),void 0!==e.length&&(r.limit=e.length),t}(e);case h.UNION:return function(e){return{type:"union",patterns:e.input.map(v).map(S)}}(e);case h.VALUES:return function(e){return{type:"values",values:e.bindings.map((t=>{let r={};for(let n of e.variables){let e=`?${n.value}`;t[e]?r[e]=t[e]:r[e]=void 0}return r}))}}(e);case h.COMPOSITE_UPDATE:return function(e){return{prefixes:{},type:"update",updates:e.updates.map((e=>v(e).updates[0]))}}(e);case h.DELETE_INSERT:return function(e){var t;let r,n=e.where;if(n&&n.type===h.FROM){let e=n;n=e.input,r={default:e.default,named:e.named}}const i=[{updateType:"insertdelete",delete:N(e.delete||[]),insert:N(e.insert||[])}];if(r&&(i[0].using=r),!n||n.type===h.BGP&&0===n.patterns.length)i[0].where=[];else{const e=[];let r=v(D(n,e));if("group"===r.type?i[0].where=r.patterns:i[0].where=[r],e.length>0){if(1!==e.length)throw new Error("This is unexpected and might indicate an error in graph handling for updates.");""!==(null===(t=e[0])||void 0===t?void 0:t.value)&&(i[0].where=[{type:"graph",patterns:i[0].where,name:e[0]}])}}return e.delete||e.where?e.insert||e.where?!e.insert&&e.where&&"bgp"===e.where.type&&(0,s.isomorphic)(e.delete,e.where.patterns)&&(delete i[0].where,i[0].updateType="deletewhere"):(delete i[0].insert,delete i[0].where,e.delete.some((e=>"Variable"===e.subject.termType||"Variable"===e.predicate.termType||"Variable"===e.object.termType))?i[0].updateType="deletewhere":i[0].updateType="delete"):(i[0].updateType="insert",delete i[0].delete,delete i[0].where),{prefixes:{},type:"update",updates:i}}(e);case h.LOAD:return function(e){const t=[{type:"load",silent:Boolean(e.silent),source:e.source}];return e.destination&&(t[0].destination=e.destination),{prefixes:{},type:"update",updates:t}}(e);case h.CLEAR:return function(e){return I(e,"clear")}(e);case h.CREATE:return function(e){return I(e,"create")}(e);case h.DROP:return function(e){return I(e,"drop")}(e);case h.ADD:return function(e){return P(e,"add")}(e);case h.MOVE:return function(e){return P(e,"move")}(e);case h.COPY:return function(e){return P(e,"copy")}(e)}throw new Error(`Unknown Operation type ${e.type}`)}function _(e){switch(e.expressionType){case f.AGGREGATE:return function(e){const t={expression:_(e.expression),type:"aggregate",aggregation:e.aggregator,distinct:e.distinct};return e.separator&&(t.separator=e.separator),t}(e);case f.EXISTENCE:return function(e){return{type:"operation",operator:e.not?"notexists":"exists",args:[{type:"group",patterns:p.default.flatten([v(e.input)])}]}}(e);case f.NAMED:return function(e){return{type:"functionCall",function:e.name,args:e.args.map(_)}}(e);case f.OPERATOR:return function(e){if("desc"===e.operator){return{expression:_(e.args[0]),descending:!0}}const t={type:"operation",operator:e.operator,args:e.args.map(_)};return"in"!==t.operator&&"notin"!==t.operator||(t.args=[t.args[0]].concat([t.args.slice(1)])),t}(e);case f.TERM:return function(e){return e.term}(e);case f.WILDCARD:return function(e){return e.wildcard}(e)}throw new Error(`Unknown Expression Operation type ${e.expressionType}`)}function w(e){switch(e.type){case h.ALT:return function(e){const t=e.input.map(w);return t.every((e=>"pathType"in e&&"!"===e.pathType))?{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:p.default.flatten(t.map((e=>e.items)))}]}:{type:"path",pathType:"|",items:t}}(e);case h.INV:return function(e){if(e.path.type===h.NPS){const t=e.path.iris.map((e=>({type:"path",pathType:"^",items:[e]})));return t.length<=1?{type:"path",pathType:"!",items:t}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:t}]}}return{type:"path",pathType:"^",items:[w(e.path)]}}(e);case h.LINK:return function(e){return e.iri}(e);case h.NPS:return function(e){return e.iris.length<=1?{type:"path",pathType:"!",items:e.iris}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:e.iris}]}}(e);case h.ONE_OR_MORE_PATH:return function(e){return{type:"path",pathType:"+",items:[w(e.path)]}}(e);case h.SEQ:return function(e){return{type:"path",pathType:"/",items:e.input.map(w)}}(e);case h.ZERO_OR_MORE_PATH:return function(e){return{type:"path",pathType:"*",items:[w(e.path)]}}(e);case h.ZERO_OR_ONE_PATH:return function(e){return{type:"path",pathType:"?",items:[w(e.path)]}}(e)}throw new Error(`Unknown Path type ${e.type}`)}function T(e){return(0,c.termToString)(e)}function S(e){return Array.isArray(e)?1===e.length?e[0]:{type:"group",patterns:e}:e}function O(e){return e}function E(e){return{subject:e.subject,predicate:e.predicate,object:e.object}}function x(e,t){let r=p.default.isSimpleTerm(e)?T(e):e;if("string"==typeof r){if(t[r])return t[r]}else if(Array.isArray(e))e=e.map((e=>x(e,t)));else for(let r of Object.keys(e))e[r]=x(e[r],t);return e}function A(e,t){const r={type:"query",prefixes:{}},n=r;let i;t===h.PROJECT?(r.queryType="SELECT",i=e.variables):t===h.ASK?r.queryType="ASK":t===h.DESCRIBE&&(r.queryType="DESCRIBE",i=e.terms);const a=y.extend,o=y.group,s=y.aggregates,c=y.order;b(),y.project=!0;let l=p.default.flatten([v(e.input)]);1===l.length&&"group"===l[0].type&&(l=l[0].patterns),r.where=l;let d={};for(let e of y.aggregates)d[T(e.variable)]=_(e);let f={};for(let e=y.extend.length-1;e>=0;--e){let t=y.extend[e];f[T(t.variable)]=x(_(t.expression),d)}if(y.group.length>0&&(n.group=y.group.map((e=>{let t=T(e);if(f[t]){let r=f[t];return delete f[t],{variable:e,expression:r}}return{expression:e}}))),y.order.length>0&&(n.order=y.order.map(v).map((e=>e.descending?e:{expression:e}))),i&&(n.variables=i.map((e=>{let t=T(e);return f[t]?{variable:e,expression:f[t]}:e})),0===n.variables.length&&(n.variables=[new u.Wildcard])),r.where.length>0&&"filter"===r.where[r.where.length-1].type){const e=r.where[r.where.length-1];R(e,Object.keys(d))&&(n.having=p.default.flatten([x(e.expression,d)]),r.where.splice(-1))}return y.extend=a,y.group=o,y.aggregates=s,y.order=c,{type:"group",patterns:[n]}}function R(e,t){return p.default.isSimpleTerm(e)?t.indexOf(T(e))>=0:Array.isArray(e)?e.some((e=>R(e,t))):e===Object(e)?Object.keys(e).some((r=>R(e[r],t))):t.indexOf(e)>=0}function I(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return"DEFAULT"===e.source?r[0].graph={default:!0}:"NAMED"===e.source?r[0].graph={named:!0}:"ALL"===e.source?r[0].graph={all:!0}:r[0].graph={type:"graph",name:e.source},{prefixes:{},type:"update",updates:r}}function P(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return r[0].source="DEFAULT"===e.source?{type:"graph",default:!0}:{type:"graph",name:e.source},r[0].destination="DEFAULT"===e.destination?{type:"graph",default:!0}:{type:"graph",name:e.destination},{prefixes:{},type:"update",updates:r}}function N(e){if(!e)return[];const t={};return e.forEach((e=>{const r=e.graph.value;t[r]||(t[r]=[]),t[r].push(e)})),Object.keys(t).map((e=>""===e?{type:"bgp",triples:t[e].map(E)}:{type:"graph",triples:t[e].map(E),name:t[e][0].graph}))}function D(e,t){if(Array.isArray(e))return e.map((e=>D(e,t)));if(!e.type)return e;if(e.type===h.DELETE_INSERT)return e;if((e.type===h.PATTERN||e.type===h.PATH)&&e.graph)return t.push(e.graph),""!==e.graph.name?e.type===h.PATTERN?g.createPattern(e.subject,e.predicate,e.object):g.createPath(e.subject,e.predicate,e.object):e;const r={},n={},i={};for(let t of Object.keys(e)){const a=[];if(r[t]=D(e[t],a),a.length>0){n[t]=a;for(const e of a)i[e.value]=e}}const a=Object.keys(i);if(a.length>0)if(1!==a.length||[h.PROJECT,h.SERVICE].includes(e.type)){if(e.type===h.BGP)return function(e,t){var r;const n={};for(let i=0;i""===n[e][0].value?t:g.createGraph(t,n[e][r]))):""!==n[e][0].value&&(r[e]=g.createGraph(t,n[e][0]))}}else t.push(i[a[0]]);return r}t.toSparql=function(e,t={}){return new u.Generator(t).stringify(m(e))},t.toSparqlJs=m},71029:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(53933),c=r(22112),u=a(r(47914)),l=o(r(376)),d=o(r(83152)),p=r(55403).Parser,h=u.types;let f,y=new Set,g=0,m=!1;function b(e,t,r){if(y=new Set,g=0,m=Boolean(t),!e.type)return f.createNop();if("query"!==e.type&&"update"!==e.type)throw new Error("Translate only works on complete query or update objects.");let n;var i;return w(e),"query"===e.type?(n=S({type:"group",patterns:e.where||[]}),n=function(e,t){const r=e,n=[],i={};if(r.variables=r.variables&&r.variables.map((e=>C(e,i))),r.having=r.having&&r.having.map((e=>C(e,i))),r.order=r.order&&r.order.map((e=>C(e,i))),r.group||Object.keys(i).length>0){const e=Object.keys(i).map((e=>function(e,t){if("aggregate"!==e.type||!e.aggregation)throw new Error(`Unexpected input: ${JSON.stringify(e)}`);const r=O(e);return r.variable=t,r}(i[e],f.createTerm(e)))),n=[];if(r.group)for(const e of r.group)if(d.default.isSimpleTerm(e.expression))n.push(e.expression);else{const r="variable"in e?e.variable:A();t=f.createExtend(t,r,O(e.expression)),n.push(r)}t=f.createGroup(t,n,e)}if(r.having)for(let e of r.having)t=f.createFilter(t,O(e));e.values&&(t=f.createJoin([t,j(e)]));let a=[];if("SELECT"===e.queryType||"DESCRIBE"===e.queryType)if(e.variables.some((e=>e&&d.default.isWildcard(e))))a=Object.values(T(e)).sort(((e,t)=>e.value.localeCompare(t.value)));else for(let t of e.variables)_(t)||!("variable"in t)?a.push(t):t.variable&&(a.push(t.variable),n.push(t));for(let e of n)t=f.createExtend(t,e.variable,O(e.expression));return r.order&&(t=f.createOrderBy(t,r.order.map((e=>{let t=O(e.expression);return e.descending&&(t=f.createOperatorExpression("desc",[t])),t})))),"SELECT"===e.queryType&&(t=f.createProject(t,a)),r.distinct&&(t=f.createDistinct(t)),r.reduced&&(t=f.createReduced(t)),"CONSTRUCT"===e.queryType?t=f.createConstruct(t,(e.template||[]).map(R)):"ASK"===e.queryType?t=f.createAsk(t):"DESCRIBE"===e.queryType&&(t=f.createDescribe(t,a)),(r.offset||r.limit)&&(t=f.createSlice(t,r.offset||0,r.limit)),r.from&&(t=f.createFrom(t,r.from.default,r.from.named)),t}(e,n)):"update"===e.type&&(n=1===(i=e).updates.length?M(i.updates[0]):f.createCompositeUpdate(i.updates.map(M))),r&&(n=k(n)),n}function v(e){return Boolean(null==e?void 0:e.termType)}function _(e){return"Variable"===(null==e?void 0:e.termType)}function w(e){if(v(e))_(e)&&y.add(`?${e.value}`);else if(Array.isArray(e))for(const t of e)w(t);else if(e&&"object"==typeof e)for(let t of Object.keys(e))t.startsWith("?")?y.add(t):t.startsWith("$")&&y.add(`?${t.slice(1)}`),w(e[t])}function T(e){let t={};if((r=e).subject&&r.predicate&&r.object){const r=[T(e.subject),T(e.predicate),T(e.object),e.graph?T(e.graph):{}];Object.assign(t,...r)}else if(v(e))_(e)&&(t[e.value]=e);else if("bgp"===e.type){const r=e.triples;Object.assign(t,...r.map(T))}else if("path"===e.type)Object.assign(t,...e.items.map(T));else if("group"===e.type||"union"===e.type||"optional"===e.type)Object.assign(t,...e.patterns.map(T));else if("service"===e.type||"graph"===e.type)Object.assign(t,T(e.name)),Object.assign(t,...e.patterns.map(T));else if("bind"===e.type)Object.assign(t,T(e.variable));else if("values"===e.type){if(e.values.length>0){const r=Object.keys(e.values[0]).map((e=>f.createTerm(e)));Object.assign(t,...r.map(T))}}else if("query"===e.type&&("SELECT"===e.queryType||"DESCRIBE"===e.queryType)){e.where&&e.variables.some(d.default.isWildcard)&&Object.assign(t,...e.where.map(T));for(const r of e.variables)_(r)?Object.assign(t,T(r)):r.variable&&Object.assign(t,T(r.variable));if("SELECT"===e.queryType){if(e.group)for(const r of e.group)r.variable&&Object.assign(t,T(r.variable));if(e.values){const r={type:"values",values:e.values};Object.assign(t,T(r))}}}var r;return t}function S(e){if("bgp"===e.type)return function(e){let t=[],r=[];for(let i of e.triples)if("pathType"in i.predicate){let e=x((n=i).subject,E(n.predicate),n.object);for(let n of e)n.type===h.PATH?(t.length>0&&r.push(f.createBgp(t)),t=[],r.push(n)):t.push(n)}else t.push(R(i));var n;return t.length>0&&r.push(f.createBgp(t)),1===r.length?r[0]:f.createJoin(r)}(e);if("union"===e.type)return f.createUnion(e.patterns.map((e=>("group"!==e.type&&(e={type:"group",patterns:[e]}),S(e)))));if("graph"===e.type){let t=S({type:"group",patterns:e.patterns});return t=m?P(t,e.name):f.createGraph(t,e.name),t}if("values"===e.type)return j(e);if("query"===e.type)return b(e,m,!1);if("group"===e.type){let t=[],r=[];for(let n of e.patterns)("filter"===n.type?t:r).push(n);let n=r.reduce(N,f.createBgp([])),i=t.map((e=>O(e.expression)));return i.length>0&&(n=f.createFilter(n,i.reduce(((e,t)=>f.createOperatorExpression("&&",[e,t]))))),n}throw new Error(`Unexpected type: ${e.type}`)}function O(e){if(d.default.isSimpleTerm(e))return f.createTermExpression(e);if(d.default.isQuad(e))return d.default.hasQuadVariables(e)?f.createOperatorExpression("triple",[O(e.subject),O(e.predicate),O(e.object)]):f.createTermExpression(e);if(d.default.isWildcard(e))return f.createWildcardExpression();if("aggregation"in e)return f.createAggregateExpression(e.aggregation,O(e.expression),Boolean(e.distinct),e.separator);if("function"in e)return f.createNamedExpression(e.function,e.args.map(O));if("operator"in e)return"exists"===e.operator||"notexists"===e.operator?f.createExistenceExpression("notexists"===e.operator,S(e.args[0])):("in"!==e.operator&&"notin"!==e.operator||(e.args=[e.args[0]].concat(e.args[1])),f.createOperatorExpression(e.operator,e.args.map(O)));throw new Error(`Unknown expression: ${JSON.stringify(e)}`)}function E(e){if(d.default.isSimpleTerm(e)){if("NamedNode"===e.termType)return f.createLink(e);throw new Error(`Path predicate should be a NamedNode, got ${JSON.stringify(e)}`)}if("^"===e.pathType)return f.createInv(E(e.items[0]));if("!"===e.pathType){let t,r=[],n=[];t="pathType"in e.items[0]&&"|"===e.items[0].pathType?e.items[0].items:e.items;for(let e of t)if(d.default.isSimpleTerm(e))r.push(e);else{if("^"!==e.pathType)throw new Error(`Unexpected item: ${JSON.stringify(e)}`);n.push(e.items[0])}let i=f.createNps(r),a=f.createInv(f.createNps(n));return 0===n.length?i:0===r.length?a:f.createAlt([i,a])}if("/"===e.pathType)return f.createSeq(e.items.map(E));if("|"===e.pathType)return f.createAlt(e.items.map(E));if("*"===e.pathType)return f.createZeroOrMorePath(E(e.items[0]));if("+"===e.pathType)return f.createOneOrMorePath(E(e.items[0]));if("?"===e.pathType)return f.createZeroOrOnePath(E(e.items[0]));throw new Error(`Unable to translate path expression ${JSON.stringify(e)}`)}function x(e,t,r){if(t.type===h.LINK)return[f.createPattern(e,t.iri,r)];if(t.type===h.INV)return x(r,t.path,e);if(t.type===h.SEQ){let n=e;return d.default.flatten(t.input.map(((e,i)=>{const a=i===t.input.length-1?r:A(),o=x(n,e,a);return"Variable"===a.termType&&(n=a),o})))}return[f.createPath(e,t,r)]}function A(){let e="?var"+g++;return y.has(e)?A():(y.add(e),f.createTerm(e))}function R(e){if("pathType"in e.predicate)throw new Error("Trying to translate property path to quad.");return f.createPattern(e.subject,e.predicate,e.object,e.graph)}t.default=function(e,t){let r;if(t=t||{},f=new l.default(t.dataFactory),"string"==typeof e){let n=new p(t);n._resetBlanks(),r=n.parse(e)}else r=e;return b(r,t.quads,t.blankToVariable)};let I=Object.values(h);function P(e,t,r){if(e.type===h.GRAPH){if(r)throw new Error("Recursing through nested GRAPH statements with a replacement is impossible.");e=P(e.input,e.name)}else if(e.type===h.SERVICE);else if(e.type===h.BGP)e.patterns=e.patterns.map((e=>(r&&(e.subject.equals(t)&&(e.subject=r),e.predicate.equals(t)&&(e.predicate=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t),e)));else if(e.type===h.PATH)r&&(e.subject.equals(t)&&(e.subject=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t);else if(e.type!==h.PROJECT||r)if(e.type!==h.EXTEND||r)for(let n of Object.keys(e))Array.isArray(e[n])?e[n]=e[n].map((e=>P(e,t,r))):I.indexOf(e[n].type)>=0?e[n]=P(e[n],t,r):r&&_(e[n])&&e[n].equals(t)&&(e[n]=r);else e.variable.equals(t)&&(r=A()),e.input=P(e.input,t,r);else e.variables.some((e=>e.equals(t)))||(r=A()),e.input=P(e.input,t,r);return e}function N(e,t){if("optional"===t.type){const r=S({type:"group",patterns:t.patterns});e=r.type===h.FILTER?f.createLeftJoin(e,r.input,r.expression):f.createLeftJoin(e,r)}else if("minus"===t.type){const r=S({type:"group",patterns:t.patterns});e=f.createMinus(e,r)}else if("bind"===t.type)e=f.createExtend(e,t.variable,O(t.expression));else if("service"===t.type){const r={type:"group",patterns:t.patterns};e=D(e,f.createService(S(r),t.name,t.silent))}else e=D(e,S(t));return e}function D(e,t){return e.type===h.BGP&&t.type===h.BGP?e=f.createBgp([...e.patterns,...t.patterns]):e.type===h.BGP&&0===e.patterns.length?e=t:t.type===h.BGP&&0===t.patterns.length||(e=f.createJoin([e,t])),e}function j(e){let t=(0===e.values.length?[]:Object.keys(e.values[0])).map(f.createTerm.bind(f)),r=e.values.map((e=>{let t=Object.keys(e);t=t.filter((t=>void 0!==e[t]));let r={};for(let n of t)r[n]=e[n];return r}));return f.createValues(t,r)}function C(e,t){if("type"in e&&"aggregate"===e.type){let r,n=!1;for(let i of Object.keys(t))if(s(t[i],e)){r=f.createTerm(i),n=!0;break}return n||(r=A(),t[(0,c.termToString)(r)]=e),r}return"expression"in e&&e.expression?{...e,expression:C(e.expression,t)}:"args"in e&&e.args?{...e,args:e.args.map((e=>C(e,t)))}:e}function M(e){if("type"in e){if("load"===e.type)return function(e){return f.createLoad(e.source,e.destination,e.silent)}(e);if("clear"===e.type||"create"===e.type||"drop"===e.type)return function(e){let t;switch(t=d.default.isSimpleTerm(e.graph)?e.graph:e.graph.all?"ALL":e.graph.default?"DEFAULT":e.graph.named?"NAMED":e.graph.name,e.type){case"clear":return f.createClear(t,e.silent);case"create":return f.createCreate(t,e.silent);case"drop":return f.createDrop(t,e.silent)}}(e);if("add"===e.type||"copy"===e.type||"move"===e.type)return function(e){const t=e.source.default?"DEFAULT":e.source.name,r=e.destination.default?"DEFAULT":e.destination.name;switch(e.type){case"copy":return f.createCopy(t,r,e.silent);case"move":return f.createMove(t,r,e.silent);case"add":return f.createAdd(t,r,e.silent)}}(e)}else if("insertdelete"===e.updateType||"deletewhere"===e.updateType||"delete"===e.updateType||"insert"===e.updateType)return function(e){if(!m)throw new Error("INSERT/DELETE operations are only supported with quads option enabled");let t,r=[],n=[];if(e.delete&&(r=d.default.flatten(e.delete.map((t=>L(t,e.graph))))),e.insert&&(n=d.default.flatten(e.insert.map((t=>L(t,e.graph))))),e.where&&e.where.length>0){t=S({type:"group",patterns:e.where});const r=e.using;r?t=f.createFrom(t,r.default,r.named):e.graph&&(t=P(t,e.graph))}else"deletewhere"===e.updateType&&r.length>0&&(t=f.createBgp(r));return f.createDeleteInsert(r.length>0?r:void 0,n.length>0?n:void 0,t)}(e);throw new Error(`Unknown update type ${JSON.stringify(e)}`)}function L(e,t){let r=t;"graph"===e.type&&(r=e.name);let n=e.triples;return r&&(n=n.map((e=>Object.assign(e,{graph:r})))),n.map(R)}function k(e){const t={},r=Array.from(y).reduce(((e,t)=>(e[t]=!0,e)),{});return d.default.mapOperation(e,{[u.types.DELETE_INSERT]:e=>({result:f.createDeleteInsert(e.delete,e.insert,e.where&&k(e.where)),recurse:!1}),[u.types.PATH]:(e,t)=>({result:t.createPath(n(e.subject),e.predicate,n(e.object),n(e.graph)),recurse:!1}),[u.types.PATTERN]:(e,t)=>({result:t.createPattern(n(e.subject),n(e.predicate),n(e.object),n(e.graph)),recurse:!1}),[u.types.CONSTRUCT]:e=>({result:f.createConstruct(k(e.input),e.template),recurse:!1})});function n(e){if("BlankNode"===e.termType){let n=t[e.value];return n||(n=d.default.createUniqueVariable(e.value,r,f.dataFactory),r[n.value]=!0,t[e.value]=n),n}return e}}},83152:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(47914),a=n(r(376)),o=r(13252);class s{static flatten(e){return Array.prototype.concat(...e).filter((e=>e))}static objectify(e){if(e.termType){if("Quad"===e.termType)return{type:"pattern",termType:"Quad",subject:s.objectify(e.subject),predicate:s.objectify(e.predicate),object:s.objectify(e.object),graph:s.objectify(e.graph)};{let t={termType:e.termType,value:e.value};return e.language&&(t.language=e.language),e.datatype&&(t.datatype=s.objectify(e.datatype)),t}}if(Array.isArray(e))return e.map((e=>s.objectify(e)));if(e===Object(e)){let t={};for(let r of Object.keys(e))t[r]=s.objectify(e[r]);return t}return e}static inScopeVariables(e){const t=[];function r(e){t.find((t=>e.value===t.value))||t.push(e)}function n(e){"Variable"===e.subject.termType&&r(e.subject),"Variable"===e.predicate.termType&&r(e.predicate),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.predicate.termType&&n(e.predicate),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph)}return s.recurseOperation(e,{[i.types.EXPRESSION]:e=>(e.expressionType===i.expressionTypes.AGGREGATE&&e.variable&&r(e.variable),!0),[i.types.EXTEND]:e=>(r(e.variable),!0),[i.types.GRAPH]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.GROUP]:e=>(e.variables.forEach(r),!0),[i.types.PATH]:e=>("Variable"===e.subject.termType&&r(e.subject),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph),!0),[i.types.PATTERN]:e=>(n(e),!0),[i.types.PROJECT]:e=>(e.variables.forEach(r),!1),[i.types.SERVICE]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.VALUES]:e=>(e.variables.forEach(r),!0)}),t}static recurseOperation(e,t){let r=e,n=!0;const a=t[e.type];if(a&&(n=a(e)),!n)return;let o=e=>s.recurseOperation(e,t);switch(r.type){case i.types.ALT:r.input.map(o);break;case i.types.ASK:o(r.input);break;case i.types.BGP:r.patterns.forEach(o);break;case i.types.CONSTRUCT:o(r.input),r.template.map(o);break;case i.types.DESCRIBE:case i.types.DISTINCT:o(r.input);break;case i.types.EXPRESSION:r.expressionType===i.expressionTypes.EXISTENCE&&o(r.input);break;case i.types.EXTEND:case i.types.FILTER:o(r.input),o(r.expression);break;case i.types.FROM:case i.types.GRAPH:o(r.input);break;case i.types.GROUP:o(r.input),r.aggregates.forEach(o);break;case i.types.INV:o(r.path);break;case i.types.JOIN:r.input.map(o);break;case i.types.LEFT_JOIN:r.input.map(o),r.expression&&o(r.expression);break;case i.types.LINK:break;case i.types.MINUS:r.input.map(o);break;case i.types.NOP:case i.types.NPS:break;case i.types.ONE_OR_MORE_PATH:o(r.path);break;case i.types.ORDER_BY:o(r.input),r.expressions.forEach(o);break;case i.types.PATH:o(r.predicate);break;case i.types.PATTERN:break;case i.types.PROJECT:case i.types.REDUCED:o(r.input);break;case i.types.SEQ:r.input.map(o);break;case i.types.SERVICE:case i.types.SLICE:o(r.input);break;case i.types.UNION:r.input.map(o);break;case i.types.VALUES:break;case i.types.ZERO_OR_MORE_PATH:case i.types.ZERO_OR_ONE_PATH:o(r.path);break;case i.types.COMPOSITE_UPDATE:r.updates.forEach((e=>o(e)));break;case i.types.DELETE_INSERT:r.delete&&r.delete.forEach((e=>o(e))),r.insert&&r.insert.forEach((e=>o(e))),r.where&&o(r.where);break;case i.types.LOAD:case i.types.CLEAR:case i.types.CREATE:case i.types.DROP:case i.types.ADD:case i.types.MOVE:case i.types.COPY:break;default:throw new Error(`Unknown Operation type ${r.type}`)}}static mapOperation(e,t,r){let n=e,o=!0,c=!0;r=r||new a.default;const u=t[e.type];if(u){const t=u(e,r);n=t.result,o=t.recurse,c=!1!==t.copyMetadata}let l;if(c&&(n.metadata||e.metadata)&&(l={...n.metadata,...e.metadata}),!o)return l&&(n.metadata=l),n;let d=e=>s.mapOperation(e,t,r);switch(n.type){case i.types.ALT:n=r.createAlt(n.input.map(d));break;case i.types.ASK:n=r.createAsk(d(n.input));break;case i.types.BGP:n=r.createBgp(n.patterns.map(d));break;case i.types.CONSTRUCT:n=r.createConstruct(d(n.input),n.template.map(d));break;case i.types.DESCRIBE:n=r.createDescribe(d(n.input),n.terms);break;case i.types.DISTINCT:n=r.createDistinct(d(n.input));break;case i.types.EXPRESSION:n=s.mapExpression(n,t,r);break;case i.types.EXTEND:n=r.createExtend(d(n.input),n.variable,d(n.expression));break;case i.types.FILTER:n=r.createFilter(d(n.input),d(n.expression));break;case i.types.FROM:n=r.createFrom(d(n.input),[...n.default],[...n.named]);break;case i.types.GRAPH:n=r.createGraph(d(n.input),n.name);break;case i.types.GROUP:n=r.createGroup(d(n.input),[].concat(n.variables),n.aggregates.map(d));break;case i.types.INV:n=r.createInv(d(n.path));break;case i.types.JOIN:n=r.createJoin(n.input.map(d));break;case i.types.LEFT_JOIN:n=r.createLeftJoin(d(n.input[0]),d(n.input[1]),n.expression?d(n.expression):void 0);break;case i.types.LINK:n=r.createLink(n.iri);break;case i.types.MINUS:n=r.createMinus(d(n.input[0]),d(n.input[1]));break;case i.types.NOP:n=r.createNop();break;case i.types.NPS:n=r.createNps([].concat(n.iris));break;case i.types.ONE_OR_MORE_PATH:n=r.createOneOrMorePath(d(n.path));break;case i.types.ORDER_BY:n=r.createOrderBy(d(n.input),n.expressions.map(d));break;case i.types.PATH:n=r.createPath(n.subject,d(n.predicate),n.object,n.graph);break;case i.types.PATTERN:n=r.createPattern(n.subject,n.predicate,n.object,n.graph);break;case i.types.PROJECT:n=r.createProject(d(n.input),[...n.variables]);break;case i.types.REDUCED:n=r.createReduced(d(n.input));break;case i.types.SEQ:n=r.createSeq(n.input.map(d));break;case i.types.SERVICE:n=r.createService(d(n.input),n.name,n.silent);break;case i.types.SLICE:n=r.createSlice(d(n.input),n.start,n.length);break;case i.types.UNION:n=r.createUnion(n.input.map(d));break;case i.types.VALUES:n=r.createValues([].concat(n.variables),n.bindings.map((e=>Object.assign({},e))));break;case i.types.ZERO_OR_MORE_PATH:n=r.createZeroOrMorePath(d(n.path));break;case i.types.ZERO_OR_ONE_PATH:n=r.createZeroOrOnePath(d(n.path));break;case i.types.COMPOSITE_UPDATE:n=r.createCompositeUpdate(n.updates.map(d));break;case i.types.DELETE_INSERT:n=r.createDeleteInsert(n.delete?n.delete.map(d):void 0,n.insert?n.insert.map(d):void 0,n.where?d(n.where):void 0);break;case i.types.LOAD:n=r.createLoad(n.source,n.destination,n.silent);break;case i.types.CLEAR:n=r.createClear(n.source,n.silent);break;case i.types.CREATE:n=r.createCreate(n.source,n.silent);break;case i.types.DROP:n=r.createDrop(n.source,n.silent);break;case i.types.ADD:n=r.createAdd(n.source,n.destination);break;case i.types.MOVE:n=r.createMove(n.source,n.destination);break;case i.types.COPY:n=r.createCopy(n.source,n.destination);break;default:throw new Error(`Unknown Operation type ${n.type}`)}return l&&(n.metadata=l),n}static mapExpression(e,t,r){let n=e,o=!0;r=r||new a.default;const c=t[e.expressionType];if(c&&({result:n,recurse:o}=c(e,r)),!o)return n;let u=e=>s.mapOperation(e,t,r);switch(e.expressionType){case i.expressionTypes.AGGREGATE:return e.variable?r.createBoundAggregate(e.variable,e.aggregator,u(e.expression),e.distinct,e.separator):r.createAggregateExpression(e.aggregator,u(e.expression),e.distinct,e.separator);case i.expressionTypes.EXISTENCE:return r.createExistenceExpression(e.not,u(e.input));case i.expressionTypes.NAMED:return r.createNamedExpression(e.name,e.args.map(u));case i.expressionTypes.OPERATOR:return r.createOperatorExpression(e.operator,e.args.map(u));case i.expressionTypes.TERM:return r.createTermExpression(e.term);case i.expressionTypes.WILDCARD:return r.createWildcardExpression();default:throw new Error(`Unknown Expression type ${e.expressionType}`)}}static cloneOperation(e){return s.mapOperation(e,{})}static cloneExpression(e){return s.mapExpression(e,{})}static createUniqueVariable(e,t,r){let n=0,i=e;for(;t[i];)i=`${e}${n++}`;return r.variable(i)}static isSimpleTerm(e){return void 0!==e.termType&&"Quad"!==e.termType&&"Wildcard"!==e.termType}static isQuad(e){return"Quad"===e.termType}static hasQuadVariables(e){return(0,o.someTermsNested)(e,(e=>"Variable"===e.termType))}static isWildcard(e){return"Wildcard"===e.termType}}t.default=s},33206: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];o(i)&&(this._prefixByIri[i]=n,r.push(i))}var a=r.join("|").replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&");this._prefixRegex=new RegExp("^("+a+")([a-zA-Z][\\-_a-zA-Z0-9]*)$"),this._usedPrefixes={},this._sparqlStar=e.sparqlStar,this._indent=o(e.indent)?e.indent:" ",this._newline=o(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+=u(e.variables,void 0,(function(e){return s(e)?this.toEntity(e):"("+this.toExpression(e.expression)+" AS "+a(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+=u(e.updates,";"+this._newline,this.toUpdate,this)),e.group&&(t+="GROUP BY "+u(e.group,void 0,(function(e){var t=s(e.expression)?this.toEntity(e.expression):"("+this.toExpression(e.expression)+")";return e.variable?"("+t+" AS "+a(e.variable)+")":t}),this)+this._newline),e.having&&(t+="HAVING ("+u(e.having,void 0,this.toExpression,this)+")"+this._newline),e.order&&(t+="ORDER BY "+u(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 u(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":case">=":case"<=":case"&&":case"||":case"=":case"!=":case"+":case"-":case"*":case"/":return(s(i[0])?this.toEntity(i[0]):"("+this.toExpression(i[0])+")")+" "+t+" "+(s(i[1])?this.toEntity(i[1]):"("+this.toExpression(i[1])+")");case"!":return"!("+this.toExpression(i[0])+")";case"uplus":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+"("+(o(i[1])?i[1]:u(i[1],", ",this.toExpression,this))+")";case"notexists":t="NOT EXISTS";case"exists":return t+" "+this.group(i[0],!0);default:return t+"("+u(i,", ",this.toExpression,this)+")"}default:throw new Error("Unknown expression type: "+e.type)}},t.prototype.toEntity=function(e){if(s(e))switch(e.termType){case"Wildcard":return"*";case"Variable":return a(e);case"BlankNode":return"_:"+e.value;case"Literal":var t=e.value||"",i=e.language||"",o=e.datatype;if(e='"'+t.replace(r,n)+'"',i)e+="@"+i;else if(o){if(!this._explicitDatatype)switch(o.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(o.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 c=e.items.map(this.toEntity,this),u=e.pathType;switch(u){case"^":case"!":return u+c[0];case"*":case"+":case"?":return"("+c[0]+u+")";default:return"("+c.join(u)+")"}}};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 a(e){return"?"+e.value}function o(e){return"string"==typeof e}function s(e){return"string"==typeof e.termType}function c(e,t){if(!e||!s(e))return!1;if(!t||!s(t))return!1;if(e.termType!==t.termType)return!1;switch(e.termType){case"Literal":return e.value===t.value&&e.language===t.language&&c(e.datatype,t.datatype);case"Quad":return c(e.subject,t.subject)&&c(e.predicate,t.predicate)&&c(e.object,t.object)&&c(e.graph,t.graph);default:return e.value===t.value}}function u(e,t,r,n){return e.map(r,n).join(o(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.silent?"SILENT ":"")+(e.source.default?"DEFAULT":this.toEntity(e.source.name))+" 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)}}}},17308:(e,t,r)=>{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,13,15,16,24,32,36,41,45,100,110,113,115,116,123,126,131,197,224,229,308,329,330,331,332,333],n=[2,247],i=[100,110,113,115,116,123,126,131,329,330,331,332,333],a=[2,409],o=[1,18],s=[1,27],c=[13,16,45,197,224,229,308],u=[28,29,53],l=[28,53],d=[1,42],p=[1,45],h=[1,41],f=[1,44],y=[123,126],g=[1,67],m=[39,45,87],b=[13,16,45,197,224,308],v=[1,87],_=[2,281],w=[1,86],T=[13,16,45,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],S=[6,28,29,53,63,70,73,81,83,85],O=[6,13,16,28,29,53,63,70,73,81,83,85,87,308],E=[6,13,16,28,29,45,53,63,70,73,81,82,83,85,87,89,197,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314],x=[6,13,16,28,29,31,39,45,47,48,53,63,70,73,81,82,83,85,87,89,109,112,121,123,126,128,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,337,338,340,341,342,343,344,345,346],A=[13,16,308],R=[112,132,327,334],I=[13,16,112,132,308],P=[1,111],N=[1,117],D=[112,132,327,328,334],j=[13,16,112,132,308,328],C=[28,29,45,53,87],M=[1,138],L=[1,151],k=[1,128],F=[1,127],B=[1,129],U=[1,140],q=[1,141],V=[1,142],Q=[1,143],$=[1,144],H=[1,145],G=[1,147],z=[1,148],K=[2,457],X=[1,158],J=[1,159],W=[1,160],Y=[1,152],Z=[1,153],ee=[1,156],te=[1,171],re=[1,172],ne=[1,173],ie=[1,174],ae=[1,175],oe=[1,176],se=[1,167],ce=[1,168],ue=[1,169],le=[1,170],de=[1,157],pe=[1,166],he=[1,161],fe=[1,162],ye=[1,163],ge=[1,164],me=[1,165],be=[6,13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335],ve=[1,195],_e=[6,31,73,81,83,85],we=[2,285],Te=[1,199],Se=[1,201],Oe=[6,31,70,73,81,83,85],Ee=[2,283],xe=[1,207],Ae=[1,218],Re=[1,223],Ie=[1,219],Pe=[1,225],Ne=[1,226],De=[1,224],je=[6,63,70,73,81,83,85],Ce=[1,236],Me=[2,334],Le=[1,243],ke=[1,241],Fe=[6,193],Be=[2,349],Ue=[2,339],qe=[28,128],Ve=[47,48,193,272],Qe=[47,48,193,242,272],$e=[47,48,193,242,246,272],He=[47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,341,342,343,344,345,346],Ge=[39,47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,338,341,342,343,344,345,346],ze=[1,271],Ke=[1,270],Xe=[6,13,16,29,31,39,45,47,48,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,338,341,342,343,344,345,346,347,348,349,350,351],Je=[1,281],We=[1,280],Ye=[13,16,29,31,39,45,47,48,82,85,87,89,112,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346],Ze=[45,89],et=[13,16,29,31,39,45,47,48,82,85,87,89,112,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346],tt=[13,16,31,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],rt=[31,89],nt=[48,87],it=[6,13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337,338],at=[6,13,16,39,45,48,82,87,89,231,263,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337,338,340],ot=[1,313],st=[6,85],ct=[6,31,81,83,85],ut=[2,361],lt=[2,353],dt=[1,343],pt=[31,112,335],ht=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],ft=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335],yt=[6,109,193],gt=[31,112],mt=[13,16,45,82,87,224,263,265,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312,346,347,348,349,350,351],bt=[1,390],vt=[1,391],_t=[13,16,87,197,308,314],wt=[13,16,39,45,82,87,224,263,265,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312,346,347,348,349,350,351],Tt=[1,417],St=[1,418],Ot=[13,16,48,197,229,308],Et=[6,31,85],xt=[6,13,16,31,45,73,81,83,85,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],At=[6,13,16,29,31,45,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,231,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,346,347,348,349,350,351],Rt=[29,31,85,112,159,160,161,163,164],It=[1,443],Pt=[1,444],Nt=[1,449],Dt=[31,112,193,232,318,335],jt=[13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],Ct=[13,16,31,45,48,82,87,89,112,193,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],Mt=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],Lt=[13,16,31,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],kt=[31,45],Ft=[1,507],Bt=[1,508],Ut=[6,13,16,29,31,39,45,47,48,63,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,336,338,341,342,343,344,345,346,347,348,349,350,351],qt=[29,31,85,112,159,160,161,163,164,335],Vt=[6,13,16,31,45,70,73,81,83,85,87,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],Qt=[13,16,31,45,48,82,87,89,112,193,197,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],$t=[2,352],Ht=[13,16,197,308,314],Gt=[1,565],zt=[6,13,16,31,45,76,78,81,83,85,87,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],Kt=[13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],Xt=[13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335],Jt=[13,16,87,308],Wt=[2,364],Yt=[29,31,85,112,159,160,161,163,164,193,232,318,335],Zt=[31,112,193,232,272,318,335],er=[2,359],tr=[13,16,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],rr=[29,31,85,112,159,160,161,163,164,193,232,272,318,335],nr=[13,16,31,45,82,87,89,112,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],ir=[2,347],ar={trace:function(){},yy:{},symbols_:{error:2,QueryOrUpdate:3,Prologue:4,QueryOrUpdate_group0:5,EOF:6,Query:7,Qry:8,Query_option0:9,Prologue_repetition0:10,BaseDecl:11,BASE:12,IRIREF:13,PrefixDecl:14,PREFIX:15,PNAME_NS:16,SelectClauseWildcard:17,Qry_repetition0:18,WhereClause:19,SolutionModifierNoGroup:20,SelectClauseVars:21,Qry_repetition1:22,SolutionModifier:23,CONSTRUCT:24,ConstructTemplate:25,Qry_repetition2:26,Qry_repetition3:27,WHERE:28,"{":29,Qry_option0:30,"}":31,DESCRIBE:32,Qry_group0:33,Qry_repetition4:34,Qry_option1:35,ASK:36,Qry_repetition5:37,SelectClauseBase:38,"*":39,SelectClauseVars_repetition_plus0:40,SELECT:41,SelectClauseBase_option0:42,SelectClauseItem:43,Var:44,"(":45,Expression:46,AS:47,")":48,SubSelect:49,SubSelect_option0:50,SubSelect_option1:51,DatasetClause:52,FROM:53,DatasetClause_option0:54,iri:55,WhereClause_option0:56,GroupGraphPattern:57,SolutionModifier_option0:58,SolutionModifierNoGroup_option0:59,SolutionModifierNoGroup_option1:60,SolutionModifierNoGroup_option2:61,GroupClause:62,GROUP:63,BY:64,GroupClause_repetition_plus0:65,GroupCondition:66,BuiltInCall:67,FunctionCall:68,HavingClause:69,HAVING:70,HavingClause_repetition_plus0:71,OrderClause:72,ORDER:73,OrderClause_repetition_plus0:74,OrderCondition:75,ASC:76,BrackettedExpression:77,DESC:78,Constraint:79,LimitOffsetClauses:80,LIMIT:81,INTEGER:82,OFFSET:83,ValuesClause:84,VALUES:85,InlineData:86,VAR:87,InlineData_repetition0:88,NIL:89,InlineData_repetition1:90,InlineData_repetition_plus2:91,InlineData_repetition3:92,DataBlock:93,DataBlockValueList:94,DataBlockValueList_repetition_plus0:95,Update:96,Update_repetition0:97,Update1:98,Update_option0:99,LOAD:100,Update1_option0:101,Update1_option1:102,Update1_group0:103,Update1_option2:104,GraphRefAll:105,Update1_group1:106,Update1_option3:107,GraphOrDefault:108,TO:109,CREATE:110,Update1_option4:111,GRAPH:112,INSERTDATA:113,QuadPattern:114,DELETEDATA:115,DELETEWHERE:116,Update1_option5:117,InsertDeleteClause:118,Update1_repetition0:119,IntoGraphClause:120,INTO:121,GraphRef:122,DELETE:123,InsertDeleteClause_option0:124,InsertClause:125,INSERT:126,UsingClause:127,USING:128,UsingClause_option0:129,WithClause:130,WITH:131,DEFAULT:132,GraphOrDefault_option0:133,GraphRefAll_group0:134,Quads:135,Quads_option0:136,Quads_repetition0:137,QuadsNotTriples:138,VarOrIri:139,QuadsNotTriples_option0:140,QuadsNotTriples_option1:141,QuadsNotTriples_option2:142,TriplesTemplate:143,TriplesTemplate_repetition0:144,TriplesSameSubject:145,TriplesTemplate_option0:146,GroupGraphPatternSub:147,GroupGraphPatternSub_option0:148,GroupGraphPatternSub_repetition0:149,GroupGraphPatternSubTail:150,GraphPatternNotTriples:151,GroupGraphPatternSubTail_option0:152,GroupGraphPatternSubTail_option1:153,TriplesBlock:154,TriplesBlock_repetition0:155,TriplesSameSubjectPath:156,TriplesBlock_option0:157,GroupOrUnionGraphPattern:158,OPTIONAL:159,MINUS:160,SERVICE:161,GraphPatternNotTriples_option0:162,FILTER:163,BIND:164,InlineDataOneVar:165,InlineDataFull:166,InlineDataOneVar_repetition0:167,InlineDataFull_repetition0:168,InlineDataFull_repetition_plus1:169,InlineDataFull_repetition2:170,DataBlockValue:171,Literal:172,QuotedTriple:173,UNDEF:174,GroupOrUnionGraphPattern_repetition0:175,ArgList:176,ArgList_option0:177,ArgList_repetition0:178,ExpressionList:179,ExpressionList_repetition0:180,ConstructTemplate_option0:181,ConstructTriples:182,ConstructTriples_repetition0:183,ConstructTriples_option0:184,VarOrTermOrQuotedTP:185,PropertyListNotEmpty:186,TriplesNode:187,PropertyList:188,PropertyList_option0:189,VerbObjectList:190,PropertyListNotEmpty_repetition0:191,SemiOptionalVerbObjectList:192,";":193,SemiOptionalVerbObjectList_option0:194,Verb:195,ObjectList:196,a:197,ObjectList_repetition0:198,Object:199,GraphNode:200,Object_option0:201,PropertyListPathNotEmpty:202,TriplesNodePath:203,TriplesSameSubjectPath_option0:204,O:205,PropertyListPathNotEmpty_repetition0:206,PropertyListPathNotEmptyTail:207,O_group0:208,ObjectListPath:209,ObjectListPath_repetition0:210,ObjectPath:211,GraphNodePath:212,ObjectPath_option0:213,Path:214,Path_repetition0:215,PathSequence:216,PathSequence_repetition0:217,PathEltOrInverse:218,PathElt:219,PathPrimary:220,PathElt_option0:221,PathEltOrInverse_option0:222,IriOrA:223,"!":224,PathNegatedPropertySet:225,PathOneInPropertySet:226,PathNegatedPropertySet_repetition0:227,PathNegatedPropertySet_option0:228,"^":229,TriplesNode_repetition_plus0:230,"[":231,"]":232,TriplesNodePath_repetition_plus0:233,VarOrTermOrQuotedTPExpr:234,VarOrTerm:235,GraphTerm:236,BlankNode:237,ConditionalOrExpression:238,ConditionalAndExpression:239,ConditionalOrExpression_repetition0:240,ConditionalOrExpressionTail:241,"||":242,RelationalExpression:243,ConditionalAndExpression_repetition0:244,ConditionalAndExpressionTail:245,"&&":246,NumericExpression:247,RelationalExpression_group0:248,RelationalExpression_option0:249,IN:250,MultiplicativeExpression:251,NumericExpression_repetition0:252,AdditiveExpressionTail:253,AdditiveExpressionTail_group0:254,NumericLiteralPositive:255,AdditiveExpressionTail_repetition0:256,NumericLiteralNegative:257,AdditiveExpressionTail_repetition1:258,UnaryExpression:259,MultiplicativeExpression_repetition0:260,MultiplicativeExpressionTail:261,MultiplicativeExpressionTail_group0:262,"+":263,PrimaryExpression:264,"-":265,ExprQuotedTP:266,Aggregate:267,FUNC_ARITY0:268,FUNC_ARITY1:269,FUNC_ARITY1_SPARQL_STAR:270,FUNC_ARITY2:271,",":272,FUNC_ARITY3:273,FUNC_ARITY3_SPARQL_STAR:274,BuiltInCall_group0:275,BOUND:276,BNODE:277,BuiltInCall_option0:278,EXISTS:279,COUNT:280,Aggregate_option0:281,Aggregate_group0:282,FUNC_AGGREGATE:283,Aggregate_option1:284,GROUP_CONCAT:285,Aggregate_option2:286,Aggregate_option3:287,GroupConcatSeparator:288,SEPARATOR:289,"=":290,String:291,LANGTAG:292,"^^":293,DECIMAL:294,DOUBLE:295,BOOLEAN:296,INTEGER_POSITIVE:297,DECIMAL_POSITIVE:298,DOUBLE_POSITIVE:299,INTEGER_NEGATIVE:300,DECIMAL_NEGATIVE:301,DOUBLE_NEGATIVE:302,STRING_LITERAL1:303,STRING_LITERAL2:304,STRING_LITERAL_LONG1:305,STRING_LITERAL_LONG2:306,PrefixedName:307,PNAME_LN:308,BLANK_NODE_LABEL:309,ANON:310,QuotedTP:311,"<<":312,qtSubjectOrObject:313,">>":314,DataValueTerm:315,AnnotationPattern:316,"{|":317,"|}":318,AnnotationPatternPath:319,ExprVarOrTerm:320,QueryOrUpdate_group0_option0:321,Prologue_repetition0_group0:322,Qry_group0_repetition_plus0:323,SelectClauseBase_option0_group0:324,DISTINCT:325,REDUCED:326,NAMED:327,SILENT:328,CLEAR:329,DROP:330,ADD:331,MOVE:332,COPY:333,ALL:334,".":335,UNION:336,"|":337,"/":338,PathElt_option0_group0:339,"?":340,"!=":341,"<":342,">":343,"<=":344,">=":345,NOT:346,CONCAT:347,COALESCE:348,SUBSTR:349,REGEX:350,REPLACE:351,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",12:"BASE",13:"IRIREF",15:"PREFIX",16:"PNAME_NS",24:"CONSTRUCT",28:"WHERE",29:"{",31:"}",32:"DESCRIBE",36:"ASK",39:"*",41:"SELECT",45:"(",47:"AS",48:")",53:"FROM",63:"GROUP",64:"BY",70:"HAVING",73:"ORDER",76:"ASC",78:"DESC",81:"LIMIT",82:"INTEGER",83:"OFFSET",85:"VALUES",87:"VAR",89:"NIL",100:"LOAD",109:"TO",110:"CREATE",112:"GRAPH",113:"INSERTDATA",115:"DELETEDATA",116:"DELETEWHERE",121:"INTO",123:"DELETE",126:"INSERT",128:"USING",131:"WITH",132:"DEFAULT",159:"OPTIONAL",160:"MINUS",161:"SERVICE",163:"FILTER",164:"BIND",174:"UNDEF",193:";",197:"a",224:"!",229:"^",231:"[",232:"]",242:"||",246:"&&",250:"IN",263:"+",265:"-",268:"FUNC_ARITY0",269:"FUNC_ARITY1",270:"FUNC_ARITY1_SPARQL_STAR",271:"FUNC_ARITY2",272:",",273:"FUNC_ARITY3",274:"FUNC_ARITY3_SPARQL_STAR",276:"BOUND",277:"BNODE",279:"EXISTS",280:"COUNT",283:"FUNC_AGGREGATE",285:"GROUP_CONCAT",289:"SEPARATOR",290:"=",292:"LANGTAG",293:"^^",294:"DECIMAL",295:"DOUBLE",296:"BOOLEAN",297:"INTEGER_POSITIVE",298:"DECIMAL_POSITIVE",299:"DOUBLE_POSITIVE",300:"INTEGER_NEGATIVE",301:"DECIMAL_NEGATIVE",302:"DOUBLE_NEGATIVE",303:"STRING_LITERAL1",304:"STRING_LITERAL2",305:"STRING_LITERAL_LONG1",306:"STRING_LITERAL_LONG2",308:"PNAME_LN",309:"BLANK_NODE_LABEL",310:"ANON",312:"<<",314:">>",317:"{|",318:"|}",325:"DISTINCT",326:"REDUCED",327:"NAMED",328:"SILENT",329:"CLEAR",330:"DROP",331:"ADD",332:"MOVE",333:"COPY",334:"ALL",335:".",336:"UNION",337:"|",338:"/",340:"?",341:"!=",342:"<",343:">",344:"<=",345:">=",346:"NOT",347:"CONCAT",348:"COALESCE",349:"SUBSTR",350:"REGEX",351:"REPLACE"},productions_:[0,[3,3],[7,2],[4,1],[11,2],[14,3],[8,4],[8,4],[8,5],[8,7],[8,5],[8,4],[17,2],[21,2],[38,2],[43,1],[43,5],[49,4],[49,4],[52,3],[19,2],[23,2],[20,3],[62,3],[66,1],[66,1],[66,3],[66,5],[66,1],[69,2],[72,3],[75,2],[75,2],[75,1],[75,1],[80,2],[80,2],[80,4],[80,4],[84,2],[86,4],[86,4],[86,6],[86,2],[94,3],[96,3],[98,4],[98,3],[98,5],[98,4],[98,2],[98,2],[98,2],[98,5],[120,2],[118,3],[118,1],[125,2],[127,3],[130,2],[108,1],[108,2],[122,2],[105,1],[105,1],[114,3],[135,2],[138,7],[143,3],[57,3],[57,3],[147,2],[150,3],[154,3],[151,1],[151,2],[151,2],[151,3],[151,4],[151,2],[151,6],[151,1],[93,1],[93,1],[165,4],[166,4],[166,6],[171,1],[171,1],[171,1],[171,1],[158,2],[79,1],[79,1],[79,1],[68,2],[176,1],[176,5],[179,1],[179,4],[25,3],[182,3],[145,2],[145,2],[188,1],[186,2],[192,2],[190,2],[195,1],[195,1],[196,2],[199,2],[156,2],[156,2],[202,2],[207,1],[207,2],[205,2],[209,2],[211,2],[214,2],[216,2],[219,2],[218,2],[220,1],[220,2],[220,3],[225,1],[225,1],[225,4],[226,1],[226,2],[187,3],[187,3],[203,3],[203,3],[200,1],[200,1],[212,1],[212,1],[234,1],[235,1],[235,1],[139,1],[139,1],[44,1],[236,1],[236,1],[236,1],[236,1],[46,1],[238,2],[241,2],[239,2],[245,2],[243,1],[243,3],[243,4],[247,2],[253,2],[253,2],[253,2],[251,2],[261,2],[259,2],[259,2],[259,2],[259,1],[264,1],[264,1],[264,1],[264,1],[264,1],[264,1],[264,1],[77,3],[67,1],[67,2],[67,4],[67,4],[67,6],[67,8],[67,8],[67,2],[67,4],[67,2],[67,4],[67,3],[267,5],[267,5],[267,6],[288,4],[172,1],[172,2],[172,3],[172,1],[172,1],[172,1],[172,1],[172,1],[172,1],[255,1],[255,1],[255,1],[257,1],[257,1],[257,1],[291,1],[291,1],[291,1],[291,1],[55,1],[55,1],[307,1],[307,1],[237,1],[237,1],[311,5],[173,5],[313,1],[313,1],[313,1],[313,1],[313,1],[315,1],[315,1],[315,1],[185,1],[185,1],[185,1],[316,3],[319,3],[266,5],[320,1],[320,1],[320,1],[223,1],[223,1],[321,0],[321,1],[5,1],[5,1],[5,1],[9,0],[9,1],[322,1],[322,1],[10,0],[10,2],[18,0],[18,2],[22,0],[22,2],[26,0],[26,2],[27,0],[27,2],[30,0],[30,1],[323,1],[323,2],[33,1],[33,1],[34,0],[34,2],[35,0],[35,1],[37,0],[37,2],[40,1],[40,2],[324,1],[324,1],[42,0],[42,1],[50,0],[50,1],[51,0],[51,1],[54,0],[54,1],[56,0],[56,1],[58,0],[58,1],[59,0],[59,1],[60,0],[60,1],[61,0],[61,1],[65,1],[65,2],[71,1],[71,2],[74,1],[74,2],[88,0],[88,2],[90,0],[90,2],[91,1],[91,2],[92,0],[92,2],[95,1],[95,2],[97,0],[97,4],[99,0],[99,2],[101,0],[101,1],[102,0],[102,1],[103,1],[103,1],[104,0],[104,1],[106,1],[106,1],[106,1],[107,0],[107,1],[111,0],[111,1],[117,0],[117,1],[119,0],[119,2],[124,0],[124,1],[129,0],[129,1],[133,0],[133,1],[134,1],[134,1],[134,1],[136,0],[136,1],[137,0],[137,2],[140,0],[140,1],[141,0],[141,1],[142,0],[142,1],[144,0],[144,3],[146,0],[146,1],[148,0],[148,1],[149,0],[149,2],[152,0],[152,1],[153,0],[153,1],[155,0],[155,3],[157,0],[157,1],[162,0],[162,1],[167,0],[167,2],[168,0],[168,2],[169,1],[169,2],[170,0],[170,2],[175,0],[175,3],[177,0],[177,1],[178,0],[178,3],[180,0],[180,3],[181,0],[181,1],[183,0],[183,3],[184,0],[184,1],[189,0],[189,1],[191,0],[191,2],[194,0],[194,1],[198,0],[198,3],[201,0],[201,1],[204,0],[204,1],[206,0],[206,2],[208,1],[208,1],[210,0],[210,3],[213,0],[213,1],[215,0],[215,3],[217,0],[217,3],[339,1],[339,1],[339,1],[221,0],[221,1],[222,0],[222,1],[227,0],[227,3],[228,0],[228,1],[230,1],[230,2],[233,1],[233,2],[240,0],[240,2],[244,0],[244,2],[248,1],[248,1],[248,1],[248,1],[248,1],[248,1],[249,0],[249,1],[252,0],[252,2],[254,1],[254,1],[256,0],[256,2],[258,0],[258,2],[260,0],[260,2],[262,1],[262,1],[275,1],[275,1],[275,1],[275,1],[275,1],[278,0],[278,1],[281,0],[281,1],[282,1],[282,1],[284,0],[284,1],[286,0],[286,1],[287,0],[287,1]],performAction:function(e,t,r,n,i,a,o){var s,c,u,l,d=a.length-1;switch(i){case 1:if(a[d-1]=a[d-1]||{},nn.base&&(a[d-1].base=nn.base),nn.base="",a[d-1].prefixes=nn.prefixes,nn.prefixes=null,nn.pathOnly){if("path"===a[d-1].type||"termType"in a[d-1])return a[d-1];throw new Error("Received full SPARQL query in path only mode")}if("path"===a[d-1].type||"termType"in a[d-1])throw new Error("Received only path in full SPARQL mode");if("update"===a[d-1].type){const e={};for(const t of a[d-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 a[d-1];case 2:this.$={...a[d-1],...a[d],type:"query"};break;case 4:nn.base=Er(a[d]);break;case 5:nn.prefixes||(nn.prefixes={}),a[d-1]=a[d-1].substr(0,a[d-1].length-1),a[d]=Er(a[d]),nn.prefixes[a[d-1]]=a[d];break;case 6:this.$={...a[d-3],...Nr(a[d-2]),...a[d-1],...a[d]};break;case 7:if(!nn.skipValidation&&(Kr(a[d-3].variables.map((e=>Gr(e.expression)))).some((e=>"count"===e.aggregation&&!(e.expression instanceof or)))||a[d].group))for(const e of a[d-3].variables)if("Variable"===e.termType){if(!a[d].group||!a[d].group.map((e=>Hr(e))).includes(Hr(e)))throw Error("Projection of ungrouped variable (?"+Hr(e)+")")}else if(0===Gr(e.expression).length){const t=zr(e.expression);for(const e of t)if(!a[d].group||!a[d].group.map||!a[d].group.map((e=>Hr(e))).includes(Hr(e)))throw Error("Use of ungrouped variable in projection of operation (?"+Hr(e)+")")}const e=a[d-1].where.filter((e=>"query"===e.type));if(e.length>0){const t=a[d-3].variables.filter((e=>e.variable&&e.variable.value)).map((e=>e.variable.value)),r=Kr(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.$=Sr(a[d-3],Nr(a[d-2]),a[d-1],a[d]);break;case 8:this.$=Sr({queryType:"CONSTRUCT",template:a[d-3]},Nr(a[d-2]),a[d-1],a[d]);break;case 9:this.$=Sr({queryType:"CONSTRUCT",template:a[d-2]=a[d-2]?a[d-2].triples:[]},Nr(a[d-5]),{where:[{type:"bgp",triples:Tr([],a[d-2])}]},a[d]);break;case 10:this.$=Sr({queryType:"DESCRIBE",variables:"*"===a[d-3]?[new or]:a[d-3]},Nr(a[d-2]),a[d-1],a[d]);break;case 11:this.$=Sr({queryType:"ASK"},Nr(a[d-2]),a[d-1],a[d]);break;case 12:this.$=Sr(a[d-1],{variables:[new or]});break;case 13:const t=function(e){const t=e.slice().sort(),r=[];for(let e=0;ee.value||e.variable.value)));if(t.length>0)throw Error("Two or more of the resulting columns have the same name (?"+t[0]+")");this.$=Sr(a[d-1],{variables:a[d]});break;case 14:this.$=Sr({queryType:"SELECT"},a[d]&&(a[d-1]=_r(a[d]),a[d]={},a[d][a[d-1]]=!0,a[d]));break;case 16:case 27:this.$=Rr(a[d-3],{variable:a[d-1]});break;case 17:case 18:this.$=Sr(a[d-3],a[d-2],a[d-1],a[d],{type:"query"});break;case 19:case 58:this.$={iri:a[d],named:!!a[d-1]};break;case 20:this.$={where:a[d].patterns};break;case 21:this.$=Sr(a[d-1],a[d]);break;case 22:this.$=Sr(a[d-2],a[d-1],a[d]);break;case 23:this.$={group:a[d]};break;case 24:case 25:case 28:case 31:case 33:case 34:this.$=Rr(a[d]);break;case 26:this.$=Rr(a[d-1]);break;case 29:this.$={having:a[d]};break;case 30:this.$={order:a[d]};break;case 32:this.$=Rr(a[d],{descending:!0});break;case 35:this.$={limit:Dr(a[d])};break;case 36:this.$={offset:Dr(a[d])};break;case 37:this.$={limit:Dr(a[d-2]),offset:Dr(a[d])};break;case 38:this.$={limit:Dr(a[d]),offset:Dr(a[d-2])};break;case 39:case 43:this.$={type:"values",values:a[d]};break;case 40:case 84:this.$=a[d-1].map((e=>({[a[d-3]]:e})));break;case 41:case 85:this.$=a[d-1].map((()=>({})));break;case 42:case 86:var p=a[d-4].length;a[d-4]=a[d-4].map(xr),this.$=a[d-1].map((function(e){if(e.length!==p)throw Error("Inconsistent VALUES length");for(var t={},r=0;r"bind"===e.type))){const t=a[d-1].indexOf(e),r=new Set;for(const e of a[d-1].slice(0,t))"group"!==e.type&&"bgp"!==e.type||Jr(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:a[d-1]};break;case 71:this.$=a[d-1]?Or([a[d-1]],a[d]):Or(a[d]);break;case 72:this.$=a[d]?[a[d-2],a[d]]:a[d-2];break;case 75:this.$=Sr(a[d],{type:"optional"});break;case 76:this.$=Sr(a[d],{type:"minus"});break;case 77:this.$=Sr(a[d],{type:"graph",name:a[d-1]});break;case 78:this.$=Sr(a[d],{type:"service",name:a[d-1],silent:!!a[d-2]});break;case 79:this.$={type:"filter",expression:a[d]};break;case 80:this.$={type:"bind",variable:a[d-1],expression:a[d-3]};break;case 89:this.$=Wr(a[d]);break;case 90:this.$=void 0;break;case 91:this.$=a[d-1].length?{type:"union",patterns:Or(a[d-1].map(jr),[jr(a[d])])}:a[d];break;case 95:this.$={...a[d],function:a[d-1]};break;case 96:this.$={type:"functionCall",args:[]};break;case 97:this.$={type:"functionCall",args:wr(a[d-2],a[d-1]),distinct:!!a[d-3]};break;case 98:case 115:case 128:case 247:case 249:case 251:case 253:case 255:case 263:case 267:case 297:case 299:case 303:case 307:case 328:case 341:case 349:case 355:case 361:case 367:case 369:case 373:case 375:case 379:case 381:case 385:case 391:case 395:case 401:case 405:case 409:case 411:case 420:case 428:case 430:case 440:case 444:case 446:case 448:this.$=[];break;case 99:this.$=wr(a[d-2],a[d-1]);break;case 101:this.$=Or(a[d-2],[a[d-1]]);break;case 102:case 112:this.$=Zr(a[d].map((e=>Sr(Lr(a[d-1]),e))));break;case 103:this.$=Zr(Tr(a[d].map((e=>Sr(Lr(a[d-1].entity),e))),a[d-1].triples));break;case 105:this.$=Or([a[d-1]],a[d]);break;case 106:this.$=Or(a[d]);break;case 107:this.$=$r(a[d-1],a[d]);break;case 109:case 237:this.$=nn.factory.namedNode(cr);break;case 110:case 118:this.$=wr(a[d-1],a[d]);break;case 111:this.$=a[d]?{annotation:a[d],object:a[d-1]}:a[d-1];break;case 113:this.$=a[d]?Zr(Tr(a[d].map((e=>Sr(Lr(a[d-1].entity),e))),a[d-1].triples)):a[d-1].triples;break;case 114:this.$=$r(...a[d-1],a[d]);break;case 116:this.$=$r(...a[d]);break;case 117:case 159:case 163:this.$=[a[d-1],a[d]];break;case 119:this.$=a[d]?{object:a[d-1],annotation:a[d]}:a[d-1];break;case 120:this.$=a[d-1].length?Ir("|",wr(a[d-1],a[d])):a[d];break;case 121:this.$=a[d-1].length?Ir("/",wr(a[d-1],a[d])):a[d];break;case 122:this.$=a[d]?Ir(a[d],[a[d-1]]):a[d-1];break;case 123:this.$=a[d-1]?Ir(a[d-1],[a[d]]):a[d];break;case 125:case 131:this.$=Ir(a[d-1],[a[d]]);break;case 129:this.$=Ir("|",wr(a[d-2],a[d-1]));break;case 132:case 134:this.$=function(e){var t=kr(),r=t,n=[],i=[];e.forEach((function(e){n.push(e.entity),Tr(i,e.triples)}));for(var a=0,o=0,s=n.length,c=Array(2*s);a2&&E.push("'"+this.terminals_[T]+"'");A=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:f,expected:E})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+m);switch(_[0]){case 1:r.push(m),n.push(d.yytext),i.push(d.yylloc),r.push(_[1]),m=null,b?(m=b,b=null):(c=d.yyleng,o=d.yytext,s=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[_[1]][1],x.$=n[n.length-S],x._$={first_line:i[i.length-(S||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(S||1)].first_column,last_column:i[i.length-1].last_column},g&&(x._$.range=[i[i.length-(S||1)].range[0],i[i.length-1].range[1]]),void 0!==(w=this.performAction.apply(x,[o,c,s,p.yy,_[1],n,i].concat(l))))return w;S&&(r=r.slice(0,-1*S*2),n=n.slice(0,-1*S),i=i.slice(0,-1*S)),r.push(this.productions_[_[1]][0]),n.push(x.$),i.push(x._$),O=a[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},or=r(54516).t,sr="http://www.w3.org/1999/02/22-rdf-syntax-ns#",cr=sr+"type",ur=sr+"first",lr=sr+"rest",dr=sr+"nil",pr="http://www.w3.org/2001/XMLSchema#",hr=pr+"integer",fr=pr+"decimal",yr=pr+"double",gr=pr+"boolean",mr="",br="",vr="";function _r(e){return e.toLowerCase()}function wr(e,t){return e.push(t),e}function Tr(e,t){return e.push.apply(e,t),e}function Sr(e){e||(e={});for(var t,r=1,n=arguments.length;r>10),56320+(1023&i))}var a=Ur[n];if(!a)throw new Error;return a}))}catch(e){return""}if(qr.exec(e))throw new Error("Invalid unicode codepoint of surrogate pair without corresponding codepoint in "+e);return e}function $r(e,t,r){var n=[],i=[];return t.forEach((function(t){let r=null;t.annotation&&(r=t.annotation,t=t.object),n.push(Lr(null,e,t.entity,r)),Tr(i,t.triples)})),Or(n,r||[],i)}function Hr(e){return e.variable?e.variable.value:e.value||e.expression.value}function Gr(e){if(!e)return[];if("aggregate"===e.type)return[e];if("operation"===e.type){const t=[];for(const r of e.args)t.push(...Gr(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 Kr(e,t=1,r=[]){for(const n of e)t>0&&n instanceof Array?Kr(n,t-1,r):r.push(n);return r}function Xr(e){return"Variable"===e.termType}function Jr(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(...Jr(r));return t}return[]}function Wr(e){if(!nn.sparqlStar)throw new Error("SPARQL-star support is not enabled");return e}function Yr(e,t,r){for(const n of t){const t=Lr("subject"in n?n.subject:e,n.predicate,n.object);r.push(t),n.annotations&&Yr(Mr(e,n.predicate,n.object),n.annotations,r)}}function Zr(e){if(nn.sparqlStar){const t=[];return e.forEach((e=>{const r=Lr(e.subject,e.predicate,e.object);t.push(r),e.annotations&&Yr(Mr(e.subject,e.predicate,e.object),e.annotations,t)})),t}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 a in i)this[a]=i[a];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(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))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(){return this.next()||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 41;case 4:return 325;case 5:return 326;case 6:return 45;case 7:return 47;case 8:return 48;case 9:return 39;case 10:return 24;case 11:return 28;case 12:return 29;case 13:return 31;case 14:return 32;case 15:return 36;case 16:return 53;case 17:return 327;case 18:return 63;case 19:return 64;case 20:return 70;case 21:return 73;case 22:return 76;case 23:return 78;case 24:return 81;case 25:return 83;case 26:return 85;case 27:return 193;case 28:return 100;case 29:return 328;case 30:return 121;case 31:return 329;case 32:return 330;case 33:return 110;case 34:return 331;case 35:return 109;case 36:return 332;case 37:return 333;case 38:return 113;case 39:return 115;case 40:return 116;case 41:return 131;case 42:return 123;case 43:return 126;case 44:return 128;case 45:return 132;case 46:return 112;case 47:return 334;case 48:return 335;case 49:return 159;case 50:return 161;case 51:return 164;case 52:return 174;case 53:return 160;case 54:return 336;case 55:return 163;case 56:return 312;case 57:return 314;case 58:return 317;case 59:return 318;case 60:return 272;case 61:return 197;case 62:return 337;case 63:return 338;case 64:return 229;case 65:return 340;case 66:return 263;case 67:return 224;case 68:return 231;case 69:return 232;case 70:return 242;case 71:return 246;case 72:return 290;case 73:return 341;case 74:return 342;case 75:return 343;case 76:return 344;case 77:return 345;case 78:return 250;case 79:return 346;case 80:return 265;case 81:return 276;case 82:return 277;case 83:return 268;case 84:return 269;case 85:return 270;case 86:return 271;case 87:return 347;case 88:return 348;case 89:return 273;case 90:return 274;case 91:return 350;case 92:return 349;case 93:return 351;case 94:return 279;case 95:return 280;case 96:return 283;case 97:return 285;case 98:return 289;case 99:return 293;case 100:return 296;case 101:return 13;case 102:return 16;case 103:return 308;case 104:return 309;case 105:return 87;case 106:return 292;case 107:return 82;case 108:return 294;case 109:return 295;case 110:return 297;case 111:return 298;case 112:return 299;case 113:return 300;case 114:return 301;case 115:return 302;case 116:return"EXPONENT";case 117:return 303;case 118:return 304;case 119:return 305;case 120:return 306;case 121:return 89;case 122:return 310;case 123:return 6;case 124:return"INVALID";case 125: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,/^(?:\|\})/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,/^(?:(SUBJECT|PREDICATE|OBJECT|isTRIPLE))/i,/^(?:(LANGMATCHES|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|STRLANG|STRDT|sameTerm))/i,/^(?:CONCAT)/i,/^(?:COALESCE)/i,/^(?:IF)/i,/^(?:TRIPLE)/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,122,123,124,125],inclusive:!0}}};function nn(){this.yy={}}return ar.lexer=rn,nn.prototype=ar,ar.Parser=nn,new nn}();e.exports=n},54516:e=>{class t{constructor(){return r||this}equals(e){return e&&this.termType===e.termType}}Object.defineProperty(t.prototype,"value",{enumerable:!0,value:"*"}),Object.defineProperty(t.prototype,"termType",{enumerable:!0,value:"Wildcard"});var r=new t;e.exports.t=t},55403:(e,t,r)=>{var n=r(17308).Parser,i=r(33206),a=r(54516).t,{DataFactory:o}=r(18050);e.exports={Parser:function({prefixes:e,baseIRI:t,factory:r,sparqlStar:i,skipValidation:a,skipUngroupedVariableCheck:s,pathOnly:c}={}){var u={};for(var l in e||{})u[l]=e[l];var d=new n;return d.parse=function(){return n.base=t||"",n.prefixes=Object.create(u),n.factory=r||new o,n.sparqlStar=Boolean(i),n.pathOnly=Boolean(c),n.skipValidation=Boolean(a)||Boolean(s),n.prototype.parse.apply(d,arguments)},d._resetBlanks=n._resetBlanks,d},Generator:i,Wildcard:a}},21451:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(71839),t)},71839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparqlJsonParser=void 0;const n=r(18050),i=r(58521),a=r(36885);t.SparqlJsonParser=class{constructor(e){var t;e=e||{},this.dataFactory=e.dataFactory||new n.DataFactory,this.prefixVariableQuestionMark=!!e.prefixVariableQuestionMark,this.suppressMissingStreamResultsError=null===(t=e.suppressMissingStreamResultsError)||void 0===t||t}parseJsonResults(e){return e.results.bindings.map((e=>this.parseJsonBindings(e)))}parseJsonResultsStream(e){const t=e=>s.emit("error",e);e.on("error",t);const r=new a;r.onError=t;let n=!1,o=!1;r.onValue=e=>{if("vars"===r.key&&2===r.stack.length&&"head"===r.stack[1].key)s.emit("variables",e.map((e=>this.dataFactory.variable(e)))),n=!0;else if("results"===r.key&&1===r.stack.length)o=!0;else if("number"==typeof r.key&&3===r.stack.length&&"results"===r.stack[1].key&&"bindings"===r.stack[2].key)try{s.push(this.parseJsonBindings(e))}catch(e){s.emit("error",e)}else"metadata"===r.key&&1===r.stack.length&&s.emit("metadata",e)};const s=e.on("end",(e=>{o||this.suppressMissingStreamResultsError?n||s.emit("variables",[]):s.emit("error",new Error("No valid SPARQL query results were found."))})).pipe(new i.Transform({objectMode:!0,transform(e,t,n){r.write(e),n()}}));return s}parseJsonBindings(e){const t={};for(const r in e){const n=e[r];t[this.prefixVariableQuestionMark?"?"+r:r]=this.parseJsonValue(n)}return t}parseJsonValue(e){let t;switch(e.type){case"bnode":t=this.dataFactory.blankNode(e.value);break;case"literal":t=e["xml:lang"]?this.dataFactory.literal(e.value,e["xml:lang"]):e.datatype?this.dataFactory.literal(e.value,this.dataFactory.namedNode(e.datatype)):this.dataFactory.literal(e.value);break;case"typed-literal":t=this.dataFactory.literal(e.value,this.dataFactory.namedNode(e.datatype));break;case"triple":const r=e.value;if(!(r&&r.subject&&r.predicate&&r.object))throw new Error("Invalid quoted triple: "+JSON.stringify(e));t=this.dataFactory.quad(this.parseJsonValue(r.subject),this.parseJsonValue(r.predicate),this.parseJsonValue(r.object));break;default:t=this.dataFactory.namedNode(e.value)}return t}parseJsonBoolean(e){if("boolean"in e)return e.boolean;throw new Error("No valid ASK response was found.")}parseJsonBooleanStream(e){return new Promise(((t,r)=>{const n=new a;n.onError=r,n.onValue=e=>{"boolean"===n.key&&"boolean"==typeof e&&1===n.stack.length&&t(e)},e.on("error",r).on("data",(e=>n.write(e))).on("end",(()=>r(new Error("No valid ASK response was found."))))}))}}},43004:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(78780),t)},78780:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;const n=r(80740),i=r(21451);class a{constructor(e){(e=e||{delimiter:"_"}).prefixVariableQuestionMark=!1,this.delimiter=e.delimiter||"_",this.parser=new i.SparqlJsonParser(e),this.materializeRdfJsTerms=e.materializeRdfJsTerms}static addValueToTree(e,t,r,n,i,o){const s=t[0],c=n?n+o+s:s,u=i.singularizeVariables[c];if(1===t.length)u?e[s]||(e[s]=r):(e[s]||(e[s]=[]),e[s].push(r));else{let n;u?(e[s]||(e[s]={}),n=e[s]):(e[s]||(e[s]=[{}]),n=e[s][0]),a.addValueToTree(n,t.slice(1),r,c,i,o)}}static mergeTrees(e,t){if(typeof e!=typeof t)throw new Error(`Two incompatible tree nodes were found: ${typeof e} and ${typeof t}`);if(Array.isArray(e)!==Array.isArray(t))throw new Error(`Two incompatible tree nodes were found: Array?${Array.isArray(e)} and Array?${Array.isArray(t)}`);if("object"==typeof e&&"object"==typeof t){if(e.termType&&t.termType)return e.equals(t)?{valid:!0,result:e}:{valid:!1,result:e};if(Array.isArray(e)&&Array.isArray(t)){if(e.length>0){const r=[];let n=!1;for(const i of e){const e=a.mergeTrees(i,t[0]);e.valid?(n=!0,r.push(e.result)):r.push(i)}if(n)return{valid:!0,result:r}}return{valid:!0,result:e.concat(t)}}{const r={};for(const e in t)r[e]=t[e];for(const t in e)if(r[t]){const n=a.mergeTrees(e[t],r[t]);if(!n.valid)return{valid:!1,result:e};r[t]=n.result}else r[t]=e[t];return{valid:!0,result:r}}}throw new Error(`Unmergable tree types: ${typeof e} and ${typeof t}`)}static materializeTree(e){if(e.termType)return(0,n.getTermRaw)(e);if(Array.isArray(e))return e.map(a.materializeTree);{const t={};for(const r in e)t[r]=a.materializeTree(e[r]);return t}}sparqlJsonResultsToTree(e,t){return this.bindingsToTree(this.parser.parseJsonResults(e),t||{singularizeVariables:{}})}bindingsToTree(e,t){const r=t&&t.singularizeVariables[""];let n=r?{}:[];for(const i of e){const e=r?{}:[{}];for(const n in i){const o=n.split(this.delimiter),s=i[n];a.addValueToTree(r?e:e[0],o,s,"",t,this.delimiter)}n=a.mergeTrees(n,e).result}return this.materializeRdfJsTerms&&(n=a.materializeTree(n)),n}}t.Converter=a},52666:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(49679),t)},49679:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparqlXmlParser=void 0;const n=r(18050),i=r(49126),a=r(58521);t.SparqlXmlParser=class{constructor(e){e=e||{},this.dataFactory=e.dataFactory||new n.DataFactory,this.prefixVariableQuestionMark=!!e.prefixVariableQuestionMark}parseXmlResultsStream(e){const t=e=>y.emit("error",e);e.on("error",t);const r=new i.SaxesParser,n=[];let o=!1,s=!1;const c=[];let u,l={},d="",p="",h="",f=[];r.on("error",t),r.on("opentag",(e=>{"variable"===e.name&&this.stackEquals(n,["sparql","head"])?c.push(this.dataFactory.variable(e.attributes.name)):"results"===e.name&&this.stackEquals(n,["sparql"])?s=!0:"result"===e.name&&this.stackEquals(n,["sparql","results"])?l={}:"binding"===e.name&&this.stackEquals(n,["sparql","results","result"])?(d=e.attributes.name||"",p="",u="",h="",f=[]):"triple"===e.name&&this.stackBeginsWith(n,["sparql","results","result"])?f.push({components:{}}):"triple"===n[n.length-1]&&this.stackBeginsWith(n,["sparql","results","result","binding"])?(p="",u="",h="",["subject","predicate","object"].includes(e.name)?f[f.length-1].currentComponent=e.name:t(new Error(`Illegal quoted triple component '${e.name}' found on line ${r.line+1}`))):this.stackBeginsWith(n,["sparql","results","result","binding"])&&(p=e.name,u="xml:lang"in e.attributes?e.attributes["xml:lang"]:"datatype"in e.attributes?this.dataFactory.namedNode(e.attributes.datatype):void 0),n.push(e.name)})),r.on("closetag",(e=>{if(this.stackEquals(n,["sparql","head"])&&(y.emit("variables",c),o=!0),this.stackEquals(n,["sparql","results","result"])&&y.push(l),this.stackBeginsWith(n,["sparql","results","result","binding"])){let e;if(!d&&p)t(new Error(`Terms should have a name on line ${r.line+1}`));else if("uri"===p)e=this.dataFactory.namedNode(h);else if("bnode"===p)e=this.dataFactory.blankNode(h);else if("literal"===p)e=this.dataFactory.literal(h,u);else if("triple"===n[n.length-1]){const n=f.pop();n&&n.components.subject&&n.components.predicate&&n.components.object?e=this.dataFactory.quad(n.components.subject,n.components.predicate,n.components.object):t(new Error(`Incomplete quoted triple on line ${r.line+1}`))}else p&&t(new Error(`Invalid term type '${p}' on line ${r.line+1}`));if(e)if(f.length>0){const n=f[f.length-1];n.components[n.currentComponent]&&t(new Error(`The ${n.currentComponent} in a quoted triple on line ${r.line+1} was already defined before`)),n.components[n.currentComponent]=e}else{const t=this.prefixVariableQuestionMark?"?"+d:d;l[t]=e}p=void 0}n.pop()})),r.on("text",(e=>{this.stackBeginsWith(n,["sparql","results","result","binding"])&&n[n.length-1]===p&&(h=e)}));const y=e.on("end",(e=>{s?o||y.emit("variables",[]):y.emit("error",new Error("No valid SPARQL query results were found."))})).pipe(new a.Transform({objectMode:!0,transform(e,t,n){r.write(e),n()}}));return y}parseXmlBooleanStream(e){return new Promise(((t,r)=>{const n=new i.SaxesParser,a=[];n.on("error",r),n.on("opentag",(e=>{a.push(e.name)})),n.on("closetag",(e=>{a.pop()})),n.on("text",(e=>{this.stackEquals(a,["sparql","boolean"])&&t("true"===e)})),e.on("error",r).on("data",(e=>n.write(e))).on("end",(()=>r(new Error("No valid ASK response was found."))))}))}stackEquals(e,t){return e.length===t.length&&e.every(((e,r)=>t[r]===e))}stackBeginsWith(e,t){return e.length>=t.length&&t.every(((t,r)=>e[r]===t))}}},76574:(e,t,r)=>{var n=r(21848);e.exports=function(e,t,r){"function"==typeof t&&(r=t,t=null);var i="",a=new n((function(r,n){e.on("data",(function(e){i+="string"==typeof t?e.toString(t):e.toString()})),e.on("end",(function(){r(i)})),e.on("error",n)}));return r&&a.then((function(e){r(null,e)}),r),a}},18888:(e,t,r)=>{"use strict";var n=r(25636).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 a(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=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(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 c(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 u(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 d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.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=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):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)},a.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}},68492:e=>{!function(t){"use strict";var r=function(){function e(e){this.options=e}return e.prototype.toString=function(){return JSON&&JSON.stringify?JSON.stringify(this.options):this.options},e}(),n={isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},isString:function(e){return"[object String]"===Object.prototype.toString.apply(e)},isNumber:function(e){return"[object Number]"===Object.prototype.toString.apply(e)},isBoolean:function(e){return"[object Boolean]"===Object.prototype.toString.apply(e)},join:function(e,t){var r,n="",i=!0;for(r=0;r="0"&&e<="9"}return{isAlpha:function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"},isDigit:e,isHexDigit:function(t){return e(t)||t>="a"&&t<="f"||t>="A"&&t<="F"}}}(),a=function(){var e=function(e){return e<=127?1:194<=e&&e<=223?2:224<=e&&e<=239?3:240<=e&&e<=244?4:0},t=function(e){return 128<=e&&e<=191};function r(e,t){return"%"===e.charAt(t)&&i.isHexDigit(e.charAt(t+1))&&i.isHexDigit(e.charAt(t+2))}function n(e,t){return parseInt(e.substr(t,2),16)}return{encodeCharacter:function(e){var t,r,n="",i=function(e){return unescape(encodeURIComponent(e))}(e);for(r=0;r1?r+=n:r+=c(n)||s(n)?n:a.encodeCharacter(n);return r},encodeLiteralCharacter:function(e,t){var r=a.pctCharAt(e,t);return r.length>1||c(r)||s(r)?r:a.encodeCharacter(r)}}}(),l=function(){var e={};function t(t){e[t]={symbol:t,separator:"?"===t?"&":""===t||"+"===t||"#"===t?",":t,named:";"===t||"&"===t||"?"===t,ifEmpty:"&"===t||"?"===t?"=":"",first:"+"===t?"":t,encode:"+"===t||"#"===t?u.encodePassReserved:u.encode,toString:function(){return this.symbol}}}return t(""),t("+"),t("#"),t("."),t("/"),t(";"),t("?"),t("&"),{valueOf:function(t){return e[t]?e[t]:"=,!@|".indexOf(t)>=0?null:e[""]}}}();function d(e){var t;if(null==e)return!1;if(n.isArray(e))return e.length>0;if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return!0;for(t in e)if(e.hasOwnProperty(t)&&d(e[t]))return!0;return!1}var p=function(){function e(e){this.literal=u.encodeLiteral(e)}return e.prototype.expand=function(){return this.literal},e.prototype.toString=e.prototype.expand,e}(),h=function(){function e(e){var t,n,s=[],c=null,u=null,d=null,p="";function h(){var t=e.substring(u,n);if(0===t.length)throw new r({expressionText:e,message:"a varname must be specified",position:n});c={varname:t,exploded:!1,maxLength:null},u=null}function y(){if(d===n)throw new r({expressionText:e,message:"after a ':' you have to specify the length",position:n});c.maxLength=parseInt(e.substring(d,n),10),d=null}for(t=function(t){var i=l.valueOf(t);if(null===i)throw new r({expressionText:e,message:"illegal use of reserved operator",position:n,operator:t});return i}(e.charAt(0)),n=t.symbol.length,u=n;n=4)throw new r({expressionText:e,message:"A :prefix must have max 4 digits",position:n});continue}y()}if(":"!==p)if("*"!==p){if(","!==p)throw new r({expressionText:e,message:"illegal character",character:p,position:n});s.push(c),c=null,u=n+1}else{if(null===c)throw new r({expressionText:e,message:"exploded without varspec",position:n});if(c.exploded)throw new r({expressionText:e,message:"exploded twice",position:n});if(c.maxLength)throw new r({expressionText:e,message:"an explode (*) MUST NOT follow to a prefix",position:n});c.exploded=!0}else{if(null!==c.maxLength)throw new r({expressionText:e,message:"only one :maxLength is allowed per varspec",position:n});if(c.exploded)throw new r({expressionText:e,message:"an exploeded varspec MUST NOT be varspeced",position:n});d=n+1}}return null!==u&&h(),null!==d&&y(),s.push(c),new f(e,t,s)}return function(t){var n,i,a=[],o=null,s=0;for(n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return c.default}});var n=p(r(74603)),i=p(r(22298)),a=p(r(42712)),o=p(r(93423)),s=p(r(35911)),c=p(r(24072)),u=p(r(4564)),l=p(r(46585)),d=p(r(29975));function p(e){return e&&e.__esModule?e:{default:e}}},72668:(e,t)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function i(e,t,r,i,a,o){return n((s=n(n(t,e),n(i,o)))<<(c=a)|s>>>32-c,r);var s,c}function a(e,t,r,n,a,o,s){return i(t&r|~t&n,e,t,a,o,s)}function o(e,t,r,n,a,o,s){return i(t&n|r&~n,e,t,a,o,s)}function s(e,t,r,n,a,o,s){return i(t^r^n,e,t,a,o,s)}function c(e,t,r,n,a,o,s){return i(r^(t|~n),e,t,a,o,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r>5]>>>i%32&255,a=parseInt(n.charAt(r>>>4&15)+n.charAt(15&r),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=r},35911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default="00000000-0000-0000-0000-000000000000"},29975:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(4564))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}},16635:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},74089:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};const n=new Uint8Array(16)},34271:(e,t)=>{"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r>>0;d=l,l=u,u=n(c,30)>>>0,c=o,o=s}i[0]=i[0]+o>>>0,i[1]=i[1]+c>>>0,i[2]=i[2]+u>>>0,i[3]=i[3]+l>>>0,i[4]=i[4]+d>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},46585:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=o;var n,i=(n=r(4564))&&n.__esModule?n:{default:n};const a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function o(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}t.default=function(e,t=0){const r=o(e,t);if(!(0,i.default)(r))throw TypeError("Stringified UUID is invalid");return r}},74603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(74089))&&n.__esModule?n:{default:n},a=r(46585);let o,s,c=0,u=0;t.default=function(e,t,r){let n=t&&r||0;const l=t||new Array(16);let d=(e=e||{}).node||o,p=void 0!==e.clockseq?e.clockseq:s;if(null==d||null==p){const t=e.random||(e.rng||i.default)();null==d&&(d=o=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==p&&(p=s=16383&(t[6]<<8|t[7]))}let h=void 0!==e.msecs?e.msecs:Date.now(),f=void 0!==e.nsecs?e.nsecs:u+1;const y=h-c+(f-u)/1e4;if(y<0&&void 0===e.clockseq&&(p=p+1&16383),(y<0||h>c)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=h,u=f,s=p,h+=122192928e5;const g=(1e4*(268435455&h)+f)%4294967296;l[n++]=g>>>24&255,l[n++]=g>>>16&255,l[n++]=g>>>8&255,l[n++]=255&g;const m=h/4294967296*1e4&268435455;l[n++]=m>>>8&255,l[n++]=255&m,l[n++]=m>>>24&15|16,l[n++]=m>>>16&255,l[n++]=p>>>8|128,l[n++]=255&p;for(let e=0;e<6;++e)l[n+e]=d[e];return t||(0,a.unsafeStringify)(l)}},22298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(14782)),i=a(r(72668));function a(e){return e&&e.__esModule?e:{default:e}}var o=(0,n.default)("v3",48,i.default);t.default=o},14782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function n(e,n,o,s){var c;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(40193)),i=o(r(74089)),a=r(46585);function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();const o=(e=e||{}).random||(e.rng||i.default)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=o[e];return t}return(0,a.unsafeStringify)(o)}},93423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(14782)),i=a(r(34271));function a(e){return e&&e.__esModule?e:{default:e}}var o=(0,n.default)("v5",80,i.default);t.default=o},4564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(16635))&&n.__esModule?n:{default:n};t.default=function(e){return"string"==typeof e&&i.default.test(e)}},24072:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(4564))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},29815:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(33285),t)},33285:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateIri=t.IriValidationStrategy=void 0;const r=function(){const e="[!$&'()*+,;=]",t="%[a-fA-F0-9]{2}",r="([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",n=`${r}\\.${r}\\.${r}\\.${r}`,i="[a-fA-F0-9]{1,4}",a=`(${i}:${i}|${n})`,o="[a-zA-Z0-9\\-._~ -퟿豈-﷏ﷰ-￯𐀀-🿽𠀀-𯿽𰀀-𿿽񀀀-񏿽񐀀-񟿽񠀀-񯿽񰀀-񿿽򀀀-򏿽򐀀-򟿽򠀀-򯿽򰀀-򿿽󀀀-󏿽󐀀-󟿽󡀀-󯿽]",s=`(${o}|${t}|${e}|[:@])*`,c=`(${s})+`,u=`(${s})*`;return new RegExp(`^[a-zA-Z][a-zA-Z0-9+\\-.]*:(\\/\\/((${o}|${t}|${e}|:)*@)?(\\[(((${i}:){6}${a}|::(${i}:){5}${a}|(${i})?::(${i}:){4}${a}|((${i}:){0,1}${i})?::(${i}:){3}${a}|((${i}:){0,2}${i})?::(${i}:){2}${a}|((${i}:){0,3}${i})?::${i}:${a}|((${i}:){0,4}${i})?::${a}|((${i}:){0,5}${i})?::${i}|((${i}:){0,6}${i})?::)|v[a-fA-F0-9]+\\.(${e}|${e}|":)+)\\]|${n}|(${o}|${t}|${e})*)(:[0-9]*)?(\\/${u})*|\\/(${c}(\\/${u})*)?|${c}(\\/${u})*|)(\\?(${s}|[-󰀀-󿿽􀀀-􏿽]|[\\/?])*)?(#(${s}|[\\/?])*)?$`,"u")}(),n=/^[A-Za-z][\d+-.A-Za-z]*:[^\u0000-\u0020"<>\\^`{|}]*$/u;var i;!function(e){e.Strict="strict",e.Pragmatic="pragmatic",e.None="none"}(i=t.IriValidationStrategy||(t.IriValidationStrategy={})),t.validateIri=function(e,t=i.Strict){switch(t){case i.Strict:return r.test(e)?void 0:new Error(`Invalid IRI according to RFC 3987: '${e}'`);case i.Pragmatic:return n.test(e)?void 0:new Error(`Invalid IRI according to RDF Turtle: '${e}'`);case i.None:return;default:return new Error(`Not supported validation strategy "${t}"`)}}},55675:(e,t,r)=>{e.exports=function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};t[o][0].call(u.exports,(function(e){return i(t[o][1][e]||e)}),u,u.exports,e,t,r,n)}return r[o].exports}for(var a=void 0,o=0;o=0;s--)if(c[s]!==u[s])return!1;for(s=c.length-1;s>=0;s--)if(!p(e[o=c[s]],t[o],r,n))return!1;return!0}(e,t,r,s))}return r?e===t:e==t}function h(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function f(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function y(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&l(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!e&&i&&!r;if((!e&&g.isError(i)&&a&&f(i,r)||o)&&l(i,r,"Got unwanted exception"+n),e&&i&&r&&!f(i,r)||!e&&i)throw i}var g=e("util/"),m=Object.prototype.hasOwnProperty,b=Array.prototype.slice,v="foo"===function(){}.name,_=t.exports=d,w=/\s*function\s+([^\(\s]*)\s*/;_.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return c(u(e.actual),128)+" "+e.operator+" "+c(u(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||l;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=s(t),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},g.inherits(_.AssertionError,Error),_.fail=l,_.ok=d,_.equal=function(e,t,r){e!=t&&l(e,t,r,"==",_.equal)},_.notEqual=function(e,t,r){e==t&&l(e,t,r,"!=",_.notEqual)},_.deepEqual=function(e,t,r){p(e,t,!1)||l(e,t,r,"deepEqual",_.deepEqual)},_.deepStrictEqual=function(e,t,r){p(e,t,!0)||l(e,t,r,"deepStrictEqual",_.deepStrictEqual)},_.notDeepEqual=function(e,t,r){p(e,t,!1)&&l(e,t,r,"notDeepEqual",_.notDeepEqual)},_.notDeepStrictEqual=function e(t,r,n){p(t,r,!0)&&l(t,r,n,"notDeepStrictEqual",e)},_.strictEqual=function(e,t,r){e!==t&&l(e,t,r,"===",_.strictEqual)},_.notStrictEqual=function(e,t,r){e===t&&l(e,t,r,"!==",_.notStrictEqual)},_.throws=function(e,t,r){y(!0,e,t,r)},_.doesNotThrow=function(e,t,r){y(!1,e,t,r)},_.ifError=function(e){if(e)throw e};var T=Object.keys||function(e){var t=[];for(var r in e)m.call(e,r)&&t.push(r);return t}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":7}],3:[function(e,t,r){},{}],4:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(){y&&h&&(y=!1,h.length?f=h.concat(f):g=-1,f.length&&s())}function s(){if(!y){var e=a(o);y=!0;for(var t=f.length;t;){for(h=f,f=[];++g1)for(var r=1;r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(t)?r.showHidden=t:t&&n._extend(r,t),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a),s(r,e,r.depth)}function a(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function o(e,t){return e}function s(e,t,r){if(e.customInspect&&t&&_(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return f(i)||(i=s(e,i,r)),i}var a=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(f(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return h(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):p(t)?e.stylize("null","null"):void 0}(e,t);if(a)return a;var o=Object.keys(t),m=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),v(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(t);if(0===o.length){if(_(t)){var w=t.name?": "+t.name:"";return e.stylize("[Function"+w+"]","special")}if(g(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(b(t))return e.stylize(Date.prototype.toString.call(t),"date");if(v(t))return c(t)}var T,O="",E=!1,x=["{","}"];return l(t)&&(E=!0,x=["[","]"]),_(t)&&(O=" [Function"+(t.name?": "+t.name:"")+"]"),g(t)&&(O=" "+RegExp.prototype.toString.call(t)),b(t)&&(O=" "+Date.prototype.toUTCString.call(t)),v(t)&&(O=" "+c(t)),0!==o.length||E&&0!=t.length?r<0?g(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),T=E?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(T,O,x)):x[0]+O+x[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,r,n,i,a){var o,c,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?c=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(c=e.stylize("[Setter]","special")),S(n,i)||(o="["+i+"]"),c||(e.seen.indexOf(u.value)<0?(c=p(r)?s(e,u.value,null):s(e,u.value,r-1)).indexOf("\n")>-1&&(c=a?c.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+c.split("\n").map((function(e){return" "+e})).join("\n")):c=e.stylize("[Circular]","special")),y(o)){if(a&&i.match(/^\d+$/))return c;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+c}function l(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function p(e){return null===e}function h(e){return"number"==typeof e}function f(e){return"string"==typeof e}function y(e){return void 0===e}function g(e){return m(e)&&"[object RegExp]"===w(e)}function m(e){return"object"==typeof e&&null!==e}function b(e){return m(e)&&"[object Date]"===w(e)}function v(e){return m(e)&&("[object Error]"===w(e)||e instanceof Error)}function _(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var O=/%[sdj%]/g;n.format=function(e){if(!f(e)){for(var t=[],r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return 1},a=Object.create(Le.prototype);return o(a),M(a,Object.create(Be.prototype),e,t,r,n,i),a}function o(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function s(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function c(e){return void 0!==e._reader}function u(e){return new Promise((function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)}))}function l(e){return new Promise((function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)}))}function d(e,t){return e._disturbed=!0,"closed"===e._state?Promise.resolve(void 0):"errored"===e._state?Promise.reject(e._storedError):(p(e),e._readableStreamController[Ce](t).then((function(){})))}function p(e){e._state="closed";var t=e._reader;if(void 0!==t){if(!0===_(t)){var r=!0,n=!1,i=void 0;try{for(var a,o=t._readRequests[Symbol.iterator]();!(r=(a=o.next()).done);r=!0)(0,a.value._resolve)(de(void 0,!0))}catch(e){n=!0,i=e}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}t._readRequests=[]}!function(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(t)}}function h(e,t){e._state="errored",e._storedError=t;var r=e._reader;if(void 0!==r){if(!0===_(r)){var n=!0,i=!1,a=void 0;try{for(var o,s=r._readRequests[Symbol.iterator]();!(n=(o=s.next()).done);n=!0)o.value._reject(t)}catch(e){i=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}r._readRequests=[]}else{var c=!0,u=!1,l=void 0;try{for(var d,p=r._readIntoRequests[Symbol.iterator]();!(c=(d=p.next()).done);c=!0)d.value._reject(t)}catch(e){u=!0,l=e}finally{try{!c&&p.return&&p.return()}finally{if(u)throw l}}r._readIntoRequests=[]}re(r,t),r._closedPromise.catch((function(){}))}}function f(e,t,r){e._reader._readRequests.shift()._resolve(de(t,r))}function y(e){return e._reader._readIntoRequests.length}function g(e){return e._reader._readRequests.length}function m(e){var t=e._reader;return void 0!==t&&!1!==v(t)}function b(e){var t=e._reader;return void 0!==t&&!1!==_(t)}function v(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function _(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function w(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?function(e){e._closedPromise=new Promise((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}(e):"closed"===t._state?function(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(e):(function(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(e,t._storedError),e._closedPromise.catch((function(){})))}function T(e,t){return d(e._ownerReadableStream,t)}function S(e){"readable"===e._ownerReadableStream._state?re(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){e._closedPromise=Promise.reject(t)}(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._closedPromise.catch((function(){})),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function O(e,t){var r=e._ownerReadableStream;return r._disturbed=!0,"errored"===r._state?Promise.reject(r._storedError):function(e,t){var r=e._controlledReadableByteStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,a={buffer:ye(t.buffer),byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(a),u(r);if("closed"===r._state){var o=new t.constructor(a.buffer,a.byteOffset,0);return Promise.resolve(de(o,!0))}if(e._queueTotalSize>0){if(!0===Q(e,a)){var s=q(a);return H(e),Promise.resolve(de(s,!1))}if(!0===e._closeRequested){var c=new TypeError("Insufficient bytes to fill elements in the given buffer");return J(e,c),Promise.reject(c)}}e._pendingPullIntos.push(a);var l=u(r);return F(e),l}(r._readableStreamController,t)}function E(e){var t=e._ownerReadableStream;return t._disturbed=!0,"closed"===t._state?Promise.resolve(de(void 0,!0)):"errored"===t._state?Promise.reject(t._storedError):t._readableStreamController[Me]()}function x(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function A(e){!1!==R(e)&&(!0!==e._pulling?(e._pulling=!0,e._pullAlgorithm().then((function(){if(e._pulling=!1,!0===e._pullAgain)return e._pullAgain=!1,A(e)}),(function(t){D(e,t)})).catch(_e)):e._pullAgain=!0)}function R(e){var t=e._controlledReadableStream;return!1!==C(e)&&!1!==e._started&&(!0===c(t)&&g(t)>0||j(e)>0)}function I(e){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&p(t)}function P(e,t){var r=e._controlledReadableStream;if(!0===c(r)&&g(r)>0)f(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw D(e,t),t}try{Se(e,t,n)}catch(t){throw D(e,t),t}}A(e)}function N(e,t){var r=e._controlledReadableStream;Oe(e),h(r,t)}function D(e,t){"readable"===e._controlledReadableStream._state&&N(e,t)}function j(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function C(e){var t=e._controlledReadableStream._state;return!1===e._closeRequested&&"readable"===t}function M(e,t,r,n,i,a,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Oe(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t;var s=r();Promise.resolve(s).then((function(){t._started=!0,A(t)}),(function(e){D(t,e)})).catch(_e)}function L(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function k(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function F(e){!1!==function(e){var t=e._controlledReadableByteStream;return"readable"===t._state&&!0!==e._closeRequested&&!1!==e._started&&(!0===b(t)&&g(t)>0||!0===m(t)&&y(t)>0||W(e)>0)}(e)&&(!0!==e._pulling?(e._pulling=!0,e._pullAlgorithm().then((function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,F(e))}),(function(t){"readable"===e._controlledReadableByteStream._state&&J(e,t)})).catch(_e)):e._pullAgain=!0)}function B(e){G(e),e._pendingPullIntos=[]}function U(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=q(t);"default"===t.readerType?f(e,n,r):function(e,t,r){e._reader._readIntoRequests.shift()._resolve(de(t,r))}(e,n,r)}function q(e){var t=e.bytesFilled,r=e.elementSize;return new e.ctor(e.buffer,e.byteOffset,t/r)}function V(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Q(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,o=a-a%r,s=i,c=!1;o>n&&(s=o-t.bytesFilled,c=!0);for(var u=e._queue;s>0;){var l=u[0],d=Math.min(s,l.byteLength),p=t.byteOffset+t.bytesFilled;ue(t.buffer,p,l.buffer,l.byteOffset,d),l.byteLength===d?u.shift():(l.byteOffset+=d,l.byteLength-=d),e._queueTotalSize-=d,$(e,d,t),s-=d}return c}function $(e,t,r){G(e),r.bytesFilled+=t}function H(e){0===e._queueTotalSize&&!0===e._closeRequested?p(e._controlledReadableByteStream):F(e)}function G(e){void 0!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=void 0,e._byobRequest=void 0)}function z(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos[0];!0===Q(e,t)&&(X(e),U(e._controlledReadableByteStream,t))}}function K(e,t){var r=e._pendingPullIntos[0];if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=ye(t.buffer);var r=e._controlledReadableByteStream;if(!0===m(r))for(;y(r)>0;)U(r,X(e))}(e,r)}else!function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if($(e,t,r),!(r.bytesFilled0){var i=r.byteOffset+r.bytesFilled,a=r.buffer.slice(i-n,i);V(e,a,0,a.byteLength)}r.buffer=ye(r.buffer),r.bytesFilled-=n,U(e._controlledReadableByteStream,r),z(e)}}(e,t,r)}function X(e){var t=e._pendingPullIntos.shift();return G(e),t}function J(e,t){var r=e._controlledReadableByteStream;B(e),Oe(e),h(r,t)}function W(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Y(e,t,r,n,i,a,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,B(t),t._queue=t._queueTotalSize=void 0,Oe(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=ge(a),t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=o,t._pendingPullIntos=[],e._readableStreamController=t;var s=r();Promise.resolve(s).then((function(){t._started=!0,F(t)}),(function(r){"readable"===e._state&&J(t,r)})).catch(_e)}function Z(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function ee(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function te(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}function re(e,t){e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function ne(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function ie(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function ae(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function oe(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}var se=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,a=r.highWaterMark;n(this,e),o(this);var s=t.type;if("bytes"===String(s)){if(void 0===a&&(a=0),a=ge(a),void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){var n=Object.create(qe.prototype),i=le(t,"pull",0,[n]),a=le(t,"cancel",1,[]),o=t.autoAllocateChunkSize;if(void 0!==o&&(!1===Number.isInteger(o)||o<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");Y(e,n,(function(){return he(t,"start",[n])}),i,a,r,o)}(this,t,a)}else{if(void 0!==s)throw new RangeError("Invalid type is specified");void 0===a&&(a=1),function(e,t,r,n){var i=Object.create(Be.prototype),a=le(t,"pull",0,[i]),o=le(t,"cancel",1,[]);M(e,i,(function(){return he(t,"start",[i])}),a,o,r,n)}(this,t,a=ge(a),me(i))}}return se(e,[{key:"cancel",value:function(e){return!1===s(this)?Promise.reject(Z("cancel")):!0===c(this)?Promise.reject(new TypeError("Cannot cancel a stream that already has a reader")):d(this,e)}},{key:"getReader",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mode;if(!1===s(this))throw Z("getReader");if(void 0===e)return i(this);if("byob"===(e=String(e)))return function(e){return new Fe(e)}(this);throw new RangeError("Invalid mode is specified")}},{key:"pipeThrough",value:function(e,t){var r=e.writable,n=e.readable;if(void 0===r||void 0===n)throw new TypeError("readable and writable arguments must be defined");return function(e){try{Promise.prototype.then.call(e,void 0,(function(){}))}catch(e){}}(this.pipeTo(r,t)),n}},{key:"pipeTo",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.preventClose,a=r.preventAbort,o=r.preventCancel;if(!1===s(this))return Promise.reject(Z("pipeTo"));if(!1===Ae(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));if(n=Boolean(n),a=Boolean(a),o=Boolean(o),!0===c(this))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(!0===Re(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));var u=i(this),l=xe(e),p=!1,h=Promise.resolve();return new Promise((function(r,i){function s(){var e=h;return h.then((function(){return e!==h?s():void 0}))}function c(e,t,r){"errored"===e._state?r(e._storedError):t.catch(r).catch(_e)}function f(t,r,n){function i(){t().then((function(){return g(r,n)}),(function(e){return g(!0,e)})).catch(_e)}!0!==p&&(p=!0,"writable"===e._state&&!1===je(e)?s().then(i):i())}function y(t,r){!0!==p&&(p=!0,"writable"===e._state&&!1===je(e)?s().then((function(){return g(t,r)})).catch(_e):g(t,r))}function g(e,t){Ne(l),S(u),e?i(t):r(void 0)}if(c(t,u._closedPromise,(function(t){!1===a?f((function(){return Ie(e,t)}),!0,t):y(!0,t)})),c(e,l._closedPromise,(function(e){!1===o?f((function(){return d(t,e)}),!0,e):y(!0,e)})),function(e,t,r){"closed"===e._state?r():t.then(r).catch(_e)}(t,u._closedPromise,(function(){!1===n?f((function(){return Pe(l)})):y()})),!0===je(e)||"closed"===e._state){var m=new TypeError("the destination writable stream closed before all data could be piped to it");!1===o?f((function(){return d(t,m)}),!0,m):y(!0,m)}(function e(){return!0===p?Promise.resolve():l._readyPromise.then((function(){return E(u).then((function(e){var t=e.value;!0!==e.done&&(h=De(l,t).catch((function(){})))}))})).then(e)})().catch((function(e){h=Promise.resolve(),_e(e)}))}))}},{key:"tee",value:function(){if(!1===s(this))throw Z("tee");var e=function(e,t){function r(){return E(o).then((function(e){var t=e.value;if(!0===e.done&&!1===s&&(!1===c&&I(h._readableStreamController),!1===u&&I(f._readableStreamController),s=!0),!0!==s){var r=t,n=t;!1===c&&P(h._readableStreamController,r),!1===u&&P(f._readableStreamController,n)}}))}function n(){}var o=i(e),s=!1,c=!1,u=!1,l=void 0,p=void 0,h=void 0,f=void 0,y=void 0,g=new Promise((function(e){y=e}));return h=a(n,r,(function(t){if(c=!0,l=t,!0===u){var r=be([l,p]),n=d(e,r);y(n)}return g})),f=a(n,r,(function(t){if(u=!0,p=t,!0===c){var r=be([l,p]),n=d(e,r);y(n)}return g})),o._closedPromise.catch((function(e){!0!==s&&(D(h._readableStreamController,e),D(f._readableStreamController,e),s=!0)})),[h,f]}(this);return be(e)}},{key:"locked",get:function(){if(!1===s(this))throw Z("locked");return c(this)}}]),e}();t.exports={CreateReadableByteStream:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,a=Object.create(Le.prototype);return o(a),Y(a,Object.create(qe.prototype),e,t,r,n,i),a},CreateReadableStream:a,ReadableStream:Le,IsReadableStreamDisturbed:function(e){return e._disturbed},ReadableStreamDefaultControllerClose:I,ReadableStreamDefaultControllerEnqueue:P,ReadableStreamDefaultControllerError:N,ReadableStreamDefaultControllerGetDesiredSize:j,ReadableStreamDefaultControllerHasBackpressure:function(e){return!0!==R(e)},ReadableStreamDefaultControllerCanCloseOrEnqueue:C};var ke=function(){function e(t){if(n(this,e),!1===s(t))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===c(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");w(this,t),this._readRequests=[]}return se(e,[{key:"cancel",value:function(e){return!1===_(this)?Promise.reject(te("cancel")):void 0===this._ownerReadableStream?Promise.reject(ee("cancel")):T(this,e)}},{key:"read",value:function(){return!1===_(this)?Promise.reject(te("read")):void 0===this._ownerReadableStream?Promise.reject(ee("read from")):E(this)}},{key:"releaseLock",value:function(){if(!1===_(this))throw te("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");S(this)}}},{key:"closed",get:function(){return!1===_(this)?Promise.reject(te("closed")):this._closedPromise}}]),e}(),Fe=function(){function e(t){if(n(this,e),!s(t))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===L(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(c(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");w(this,t),this._readIntoRequests=[]}return se(e,[{key:"cancel",value:function(e){return v(this)?void 0===this._ownerReadableStream?Promise.reject(ee("cancel")):T(this,e):Promise.reject(ne("cancel"))}},{key:"read",value:function(e){return v(this)?void 0===this._ownerReadableStream?Promise.reject(ee("read from")):ArrayBuffer.isView(e)?!0===fe(e.buffer)?Promise.reject(new TypeError("Cannot read into a view onto a detached ArrayBuffer")):0===e.byteLength?Promise.reject(new TypeError("view must have non-zero byteLength")):O(this,e):Promise.reject(new TypeError("view must be an array buffer view")):Promise.reject(ne("read"))}},{key:"releaseLock",value:function(){if(!v(this))throw ne("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");S(this)}}},{key:"closed",get:function(){return v(this)?this._closedPromise:Promise.reject(ne("closed"))}}]),e}(),Be=function(){function e(){throw n(this,e),new TypeError}return se(e,[{key:"close",value:function(){if(!1===x(this))throw ie("close");if(!1===C(this))throw new TypeError("The stream is not in a state that permits close");I(this)}},{key:"enqueue",value:function(e){if(!1===x(this))throw ie("enqueue");if(!1===C(this))throw new TypeError("The stream is not in a state that permits enqueue");return P(this,e)}},{key:"error",value:function(e){if(!1===x(this))throw ie("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");N(this,e)}},{key:Ce,value:function(e){return Oe(this),this._cancelAlgorithm(e)}},{key:Me,value:function(){var e=this._controlledReadableStream;if(this._queue.length>0){var t=Te(this);return!0===this._closeRequested&&0===this._queue.length?p(e):A(this),Promise.resolve(de(t,!1))}var r=l(e);return A(this),r}},{key:"desiredSize",get:function(){if(!1===x(this))throw ie("desiredSize");return j(this)}}]),e}(),Ue=function(){function e(){throw n(this,e),new TypeError("ReadableStreamBYOBRequest cannot be used directly")}return se(e,[{key:"respond",value:function(e){if(!1===k(this))throw ae("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!0===fe(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");!function(e,t){if(t=Number(t),!1===pe(t))throw new RangeError("bytesWritten must be a finite");K(e,t)}(this._associatedReadableByteStreamController,e)}},{key:"respondWithNewView",value:function(e){if(!1===k(this))throw ae("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(!0===fe(e.buffer))throw new TypeError("The supplied view's buffer has been detached and so cannot be used as a response");!function(e,t){var r=e._pendingPullIntos[0];if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,K(e,t.byteLength)}(this._associatedReadableByteStreamController,e)}},{key:"view",get:function(){if(!1===k(this))throw ae("view");return this._view}}]),e}(),qe=function(){function e(){throw n(this,e),new TypeError("ReadableByteStreamController constructor cannot be used directly")}return se(e,[{key:"close",value:function(){if(!1===L(this))throw oe("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");!function(e){var t=e._controlledReadableByteStream;if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0&&e._pendingPullIntos[0].bytesFilled>0){var r=new TypeError("Insufficient bytes to fill elements in the given buffer");throw J(e,r),r}p(t)}}(this)}},{key:"enqueue",value:function(e){if(!1===L(this))throw oe("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(e))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");if(!0===fe(e.buffer))throw new TypeError("Cannot enqueue a view onto a detached ArrayBuffer");!function(e,t){var r=e._controlledReadableByteStream,n=t.buffer,i=t.byteOffset,a=t.byteLength,o=ye(n);!0===b(r)?0===g(r)?V(e,o,i,a):f(r,new Uint8Array(o,i,a),!1):!0===m(r)?(V(e,o,i,a),z(e)):V(e,o,i,a)}(this,e)}},{key:"error",value:function(e){if(!1===L(this))throw oe("error");var t=this._controlledReadableByteStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");J(this,e)}},{key:Ce,value:function(e){return this._pendingPullIntos.length>0&&(this._pendingPullIntos[0].bytesFilled=0),Oe(this),this._cancelAlgorithm(e)}},{key:Me,value:function(){var e=this._controlledReadableByteStream;if(this._queueTotalSize>0){var t=this._queue.shift();this._queueTotalSize-=t.byteLength,H(this);var r=void 0;try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(e){return Promise.reject(e)}return Promise.resolve(de(r,!1))}var n=this._autoAllocateChunkSize;if(void 0!==n){var i=void 0;try{i=new ArrayBuffer(n)}catch(e){return Promise.reject(e)}var a={buffer:i,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}var o=l(e);return F(this),o}},{key:"byobRequest",get:function(){if(!1===L(this))throw oe("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos[0],t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(Ue.prototype);(function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r})(r,this,t),this._byobRequest=r}return this._byobRequest}},{key:"desiredSize",get:function(){if(!1===L(this))throw oe("desiredSize");return W(this)}}]),e}()},{"./helpers.js":10,"./queue-with-sizes.js":11,"./utils.js":14,"./writable-stream.js":15,"better-assert":16}],13:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,r,n,i,a){function u(){return t}e._writable=D(u,(function(t){return function(e,t){y("TransformStreamDefaultSinkWriteAlgorithm()");var r=e._transformStreamController;return!0===e._backpressure?e._backpressureChangePromise.then((function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return r._transformAlgorithm(t)})):r._transformAlgorithm(t)}(e,t)}),(function(){return function(e){y("TransformStreamDefaultSinkCloseAlgorithm()");var t=e._readable;return e._transformStreamController._flushAlgorithm().then((function(){if("errored"===t._state)throw t._storedError;var e=t._readableStreamController;!0===P(e)&&E(e)})).catch((function(r){throw o(e,r),t._storedError}))}(e)}),(function(){return function(e){return o(e,new TypeError("Writable side aborted")),Promise.resolve()}(e)}),r,n),e._readable=O(u,(function(){return function(e){return y("TransformStreamDefaultSourcePullAlgorithm()"),c(e,!1),e._backpressureChangePromise}(e)}),(function(t){return s(e,t),Promise.resolve()}),i,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,c(e,!0),e._transformStreamController=void 0}function a(e){return!!_(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function o(e,t){y("TransformStreamError()"),"readable"===e._readable._state&&A(e._readable._readableStreamController,t),s(e,t)}function s(e,t){j(e._writable._writableStreamController,t),!0===e._backpressure&&c(e,!1)}function c(e,t){y("TransformStreamSetBackpressure() [backpressure = "+t+"]"),void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=new Promise((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}function u(e){return!!_(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function l(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function d(e,t){y("TransformStreamDefaultControllerEnqueue()");var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!1===P(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{x(n,t)}catch(e){throw s(r,e),r._readable._storedError}I(n)!==r._backpressure&&c(r,!0)}function p(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function h(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}var f=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(n(this,e),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var s=r.size,c=T(s),u=r.highWaterMark;void 0===u&&(u=1),u=w(u);var p=a.size,h=T(p),f=a.highWaterMark;void 0===f&&(f=0),f=w(f);var y=void 0;i(this,new Promise((function(e){y=e})),u,c,f,h),function(e,t){var r=Object.create(M.prototype),n=function(e){try{return d(r,e),Promise.resolve()}catch(e){return Promise.reject(e)}},i=t.transform;if(void 0!==i){if("function"!=typeof i)throw new TypeError("transform is not a method");n=function(n){return v(i,t,[n,r]).catch((function(t){throw o(e,t),t}))}}var a=b(t,"flush",0,[r]);l(e,r,n,a)}(this,t);var g=m(t,"start",[this._transformStreamController]);y(g)}return f(e,[{key:"readable",get:function(){if(!1===a(this))throw h("readable");return this._readable}},{key:"writable",get:function(){if(!1===a(this))throw h("writable");return this._writable}}]),e}(),M=function(){function e(){throw n(this,e),new TypeError("TransformStreamDefaultController instances cannot be created directly")}return f(e,[{key:"enqueue",value:function(e){if(!1===u(this))throw p("enqueue");d(this,e)}},{key:"error",value:function(e){if(!1===u(this))throw p("error");!function(e,t){o(e._controlledTransformStream,t)}(this,e)}},{key:"terminate",value:function(){if(!1===u(this))throw p("terminate");!function(e){y("TransformStreamDefaultControllerTerminate()");var t=e._controlledTransformStream,r=t._readable._readableStreamController;!0===P(r)&&E(r),s(t,new TypeError("TransformStream terminated"))}(this)}},{key:"desiredSize",get:function(){if(!1===u(this))throw p("desiredSize");var e=this._controlledTransformStream._readable._readableStreamController;return R(e)}}]),e}();t.exports={CreateTransformStream:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return 1},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){return 1},c=Object.create(C.prototype),u=void 0;i(c,new Promise((function(e){u=e})),n,a,o,s),l(c,Object.create(M.prototype),t,r);var d=e();return u(d),c},TransformStream:C}},{"./helpers.js":10,"./readable-stream.js":12,"./writable-stream.js":15,"better-assert":16,debug:18}],14:[function(e,t,r){"use strict";var n=e("better-assert");r.rethrowAssertionErrorRejection=function(e){e&&e.constructor===n.AssertionError&&setTimeout((function(){throw e}),0)}},{"better-assert":16}],15:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return new Y(e)}function a(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=[],e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function o(e){return!!V(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function s(e){return void 0!==e._writer}function c(e,t){var r=e._state;if("closed"===r)return Promise.resolve(void 0);if("errored"===r)return Promise.reject(e._storedError);var n=new TypeError("Requested to abort");if(void 0!==e._pendingAbortRequest)return Promise.reject(n);var i=!1;"erroring"===r&&(i=!0,t=void 0);var a=new Promise((function(r,n){e._pendingAbortRequest={_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:i}}));return!1===i&&l(e,n),a}function u(e,t){L("WritableStreamDealWithRejection(stream, %o)",t),"writable"!==e._state?d(e):l(e,t)}function l(e,t){L("WritableStreamStartErroring(stream, %o)",t);var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&b(n,t),!1===function(e){return void 0===e._inFlightWriteRequest&&void 0===e._inFlightCloseRequest?(L("WritableStreamHasOperationMarkedInFlight() is false"),!1):(L("WritableStreamHasOperationMarkedInFlight() is true"),!0)}(e)&&!0===r._started&&d(e)}function d(e){L("WritableStreamFinishErroring()"),e._state="errored",e._writableStreamController[J]();var t=e._storedError,r=!0,n=!1,i=void 0;try{for(var a,o=e._writeRequests[Symbol.iterator]();!(r=(a=o.next()).done);r=!0)a.value._reject(t)}catch(e){n=!0,i=e}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}if(e._writeRequests=[],void 0!==e._pendingAbortRequest){var s=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===s._wasAlreadyErroring)return s._reject(t),void h(e);e._writableStreamController[X](s._reason).then((function(){s._resolve(),h(e)}),(function(t){s._reject(t),h(e)}))}else h(e)}function p(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function h(e){L("WritableStreamRejectCloseAndClosedPromiseIfNeeded()"),void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&(N(t,e._storedError),t._closedPromise.catch((function(){})))}function f(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?function(e){L("defaultWriterReadyPromiseReset()"),e._readyPromise=new Promise((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}(r):C(r)),e._backpressure=t}function y(e){return!!V(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function g(e){var t=e._ownerWritableStream,r=t._state;if("closed"===r||"errored"===r)return Promise.reject(new TypeError("The stream (in "+r+" state) is not in the writable state and cannot be closed"));var n=new Promise((function(e,r){var n={_resolve:e,_reject:r};t._closeRequest=n}));return!0===t._backpressure&&"writable"===r&&C(e),function(e){G(e,"close",0),S(e)}(t._writableStreamController),n}function m(e,t){"pending"===e._closedPromiseState?N(e,t):function(e,t){e._closedPromise=Promise.reject(t),e._closedPromiseState="rejected"}(e,t),e._closedPromise.catch((function(){}))}function b(e,t){L("WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, %o)",t),"pending"===e._readyPromiseState?function(e,t){L("defaultWriterReadyPromiseReject(writer, %o)",t),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}(e,t):function(e,t){L("defaultWriterReadyPromiseResetToRejected(writer, %o)",t),e._readyPromise=Promise.reject(t),e._readyPromiseState="rejected"}(e,t),e._readyPromise.catch((function(){}))}function v(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");b(e,r),m(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function _(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return O(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return Promise.reject(I("write to"));var a=r._state;if("errored"===a)return Promise.reject(r._storedError);if(!0===p(r)||"closed"===a)return Promise.reject(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return Promise.reject(r._storedError);var o=function(e){return new Promise((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){var n={chunk:t};try{G(e,n,r)}catch(t){return void O(e,t)}var i=e._controlledWritableStream;!1===p(i)&&"writable"===i._state&&f(i,E(e)),S(e)}(n,t,i),o}function w(e,t,r,n,i,a,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,K(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=a;var c=E(t);f(e,c);var l=r();Promise.resolve(l).then((function(){t._started=!0,S(t)}),(function(r){t._started=!0,u(e,r)})).catch(Q)}function T(e){return e._strategyHWM-e._queueTotalSize}function S(e){L("WritableStreamDefaultControllerAdvanceQueueIfNeeded()");var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest){var r=t._state;if("closed"!==r&&"errored"!==r)if("erroring"!==r){if(0!==e._queue.length){var n=z(e);"close"===n?function(e){var t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),H(e),e._closeAlgorithm().then((function(){!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&function(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}(t)}(t)}),(function(e){!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),u(e,t)}(t,e)})).catch(Q)}(e):function(e,t){var r=e._controlledWritableStream;(function(e){e._inFlightWriteRequest=e._writeRequests.shift()})(r),e._writeAlgorithm(t).then((function(){!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);var t=r._state;if(H(e),!1===p(r)&&"writable"===t){var n=E(e);f(r,n)}S(e)}),(function(e){!function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,u(e,t)}(r,e)})).catch(Q)}(e,n.chunk)}}else d(t)}}function O(e,t){"writable"===e._controlledWritableStream._state&&x(e,t)}function E(e){return T(e)<=0}function x(e,t){l(e._controlledWritableStream,t)}function A(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function R(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function I(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function P(e){e._closedPromise=new Promise((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function N(e,t){e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function D(e,t){L("defaultWriterReadyPromiseInitializeAsRejected(writer, %o)",t),e._readyPromise=Promise.reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function j(e){L("defaultWriterReadyPromiseInitializeAsResolved()"),e._readyPromise=Promise.resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}function C(e){L("defaultWriterReadyPromiseResolve()"),e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}var M=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=r.highWaterMark,s=void 0===o?1:o;if(n(this,e),a(this),void 0!==t.type)throw new RangeError("Invalid type is specified");var c=q(i);!function(e,t,r,n){var i=Object.create(Z.prototype),a=F(t,"write",1,[i]),o=F(t,"close",0,[]),s=F(t,"abort",1,[]);w(e,i,(function(){return B(t,"start",[i])}),a,o,s,r,n)}(this,t,s=U(s),c)}return M(e,[{key:"abort",value:function(e){return!1===o(this)?Promise.reject(A("abort")):!0===s(this)?Promise.reject(new TypeError("Cannot abort a stream that already has a writer")):c(this,e)}},{key:"getWriter",value:function(){if(!1===o(this))throw A("getWriter");return i(this)}},{key:"locked",get:function(){if(!1===o(this))throw A("locked");return s(this)}}]),e}();t.exports={AcquireWritableStreamDefaultWriter:i,CreateWritableStream:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){return 1},s=Object.create(W.prototype);return a(s),w(s,Object.create(Z.prototype),e,t,r,n,i,o),s},IsWritableStream:o,IsWritableStreamLocked:s,WritableStream:W,WritableStreamAbort:c,WritableStreamDefaultControllerErrorIfNeeded:O,WritableStreamDefaultWriterCloseWithErrorPropagation:function(e){var t=e._ownerWritableStream,r=t._state;return!0===p(t)||"closed"===r?Promise.resolve():"errored"===r?Promise.reject(t._storedError):g(e)},WritableStreamDefaultWriterRelease:v,WritableStreamDefaultWriterWrite:_,WritableStreamCloseQueuedOrInFlight:p};var Y=function(){function e(t){if(n(this,e),!1===o(t))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===s(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;var r=t._state;if("writable"===r)!1===p(t)&&!0===t._backpressure?function(e){L("defaultWriterReadyPromiseInitialize()"),e._readyPromise=new Promise((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}(this):j(this),P(this);else if("erroring"===r)D(this,t._storedError),this._readyPromise.catch((function(){})),P(this);else if("closed"===r)j(this),function(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}(this);else{var i=t._storedError;D(this,i),this._readyPromise.catch((function(){})),function(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}(this,i),this._closedPromise.catch((function(){}))}}return M(e,[{key:"abort",value:function(e){return!1===y(this)?Promise.reject(R("abort")):void 0===this._ownerWritableStream?Promise.reject(I("abort")):function(e,t){return c(e._ownerWritableStream,t)}(this,e)}},{key:"close",value:function(){if(!1===y(this))return Promise.reject(R("close"));var e=this._ownerWritableStream;return void 0===e?Promise.reject(I("close")):!0===p(e)?Promise.reject(new TypeError("cannot close an already-closing stream")):g(this)}},{key:"releaseLock",value:function(){if(!1===y(this))throw R("releaseLock");void 0!==this._ownerWritableStream&&v(this)}},{key:"write",value:function(e){return!1===y(this)?Promise.reject(R("write")):void 0===this._ownerWritableStream?Promise.reject(I("write to")):_(this,e)}},{key:"closed",get:function(){return!1===y(this)?Promise.reject(R("closed")):this._closedPromise}},{key:"desiredSize",get:function(){if(!1===y(this))throw R("desiredSize");if(void 0===this._ownerWritableStream)throw I("desiredSize");return e=this._ownerWritableStream,"errored"===(t=e._state)||"erroring"===t?null:"closed"===t?0:T(e._writableStreamController);var e,t}},{key:"ready",get:function(){return!1===y(this)?Promise.reject(R("ready")):this._readyPromise}}]),e}(),Z=function(){function e(){throw n(this,e),new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}return M(e,[{key:"error",value:function(e){if(!1===function(e){return!!V(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&x(this,e)}},{key:X,value:function(e){return this._abortAlgorithm(e)}},{key:J,value:function(){K(this)}}]),e}()},{"./helpers.js":10,"./queue-with-sizes.js":11,"./utils.js":14,"better-assert":16,debug:18}],16:[function(e,t,r){(function(r){var n=e("assert").AssertionError,i=e("callsite"),a=e("fs");t.exports=r.env.NO_ASSERT?function(){}:function(e){if(!e){var t=i(),r=t[1],o=r.getFileName(),s=r.getLineNumber(),c=(c=a.readFileSync(o,"utf8")).split("\n")[s-1].match(/assert\((.*)\)/)[1];throw new n({message:c,stackStartFunction:t[0].getFunction()})}}}).call(this,e("_process"))},{_process:4,assert:2,callsite:17,fs:3}],17:[function(e,t,r){t.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var t=new Error;Error.captureStackTrace(t,arguments.callee);var r=t.stack;return Error.prepareStackTrace=e,r}},{}],18:[function(e,t,r){(function(n){function i(){var e;try{e=r.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(r=t.exports=e("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,a=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(a=i))})),e.splice(a,0,n)}},r.save=function(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}},r.load=i,r.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(i())}).call(this,e("_process"))},{"./debug":19,_process:4}],19:[function(e,t,r){function n(e){function t(){if(t.enabled){var e=t,i=+new Date,a=i-(n||i);e.diff=a,e.prev=n,e.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*d;case"days":case"day":case"d":return r*l;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*c;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function i(e){return e>=l?Math.round(e/l)+"d":e>=u?Math.round(e/u)+"h":e>=c?Math.round(e/c)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function a(e){return o(e,l,"day")||o(e,u,"hour")||o(e,c,"minute")||o(e,s,"second")||e+" ms"}function o(e,t,r){if(!(e0)return n(e);if("number"===r&&!1===isNaN(e))return t.long?a(e):i(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}]},{},[1])(1)},94824:(e,t)=>{"use strict";function r(e){return e>=65&&e<=90||e>=97&&e<=122||58===e||95===e||8204===e||8205===e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}Object.defineProperty(t,"__esModule",{value:!0}),t.CHAR="\t\n\r -퟿-�𐀀-􏿿",t.S=" \t\r\n",t.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NAME_CHAR="-"+t.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.CHAR_RE=new RegExp("^["+t.CHAR+"]$","u"),t.S_RE=new RegExp("^["+t.S+"]+$","u"),t.NAME_START_CHAR_RE=new RegExp("^["+t.NAME_START_CHAR+"]$","u"),t.NAME_CHAR_RE=new RegExp("^["+t.NAME_CHAR+"]$","u"),t.NAME_RE=new RegExp("^["+t.NAME_START_CHAR+"]["+t.NAME_CHAR+"]*$","u"),t.NMTOKEN_RE=new RegExp("^["+t.NAME_CHAR+"]+$","u"),t.S_LIST=[32,10,13,9],t.isChar=function(e){return e>=32&&e<=55295||10===e||13===e||9===e||e>=57344&&e<=65533||e>=65536&&e<=1114111},t.isS=function(e){return 32===e||10===e||13===e||9===e},t.isNameStartChar=r,t.isNameChar=function(e){return r(e)||e>=48&&e<=57||45===e||46===e||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},30718:(e,t)=>{"use strict";function r(e){return e>=65&&e<=90||e>=97&&e<=122||58===e||95===e||8204===e||8205===e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}Object.defineProperty(t,"__esModule",{value:!0}),t.CHAR="-퟿-�𐀀-􏿿",t.RESTRICTED_CHAR="-\b\v\f--„†-Ÿ",t.S=" \t\r\n",t.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NAME_CHAR="-"+t.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.CHAR_RE=new RegExp("^["+t.CHAR+"]$","u"),t.RESTRICTED_CHAR_RE=new RegExp("^["+t.RESTRICTED_CHAR+"]$","u"),t.S_RE=new RegExp("^["+t.S+"]+$","u"),t.NAME_START_CHAR_RE=new RegExp("^["+t.NAME_START_CHAR+"]$","u"),t.NAME_CHAR_RE=new RegExp("^["+t.NAME_CHAR+"]$","u"),t.NAME_RE=new RegExp("^["+t.NAME_START_CHAR+"]["+t.NAME_CHAR+"]*$","u"),t.NMTOKEN_RE=new RegExp("^["+t.NAME_CHAR+"]+$","u"),t.S_LIST=[32,10,13,9],t.isChar=function(e){return e>=1&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},t.isRestrictedChar=function(e){return e>=1&&e<=8||11===e||12===e||e>=14&&e<=31||e>=127&&e<=132||e>=134&&e<=159},t.isCharAndNotRestricted=function(e){return 9===e||10===e||13===e||e>31&&e<127||133===e||e>159&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},t.isS=function(e){return 32===e||10===e||13===e||9===e},t.isNameStartChar=r,t.isNameChar=function(e){return r(e)||e>=48&&e<=57||45===e||46===e||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},26457:(e,t)=>{"use strict";function r(e){return e>=65&&e<=90||95===e||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}Object.defineProperty(t,"__esModule",{value:!0}),t.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NC_NAME_CHAR="-"+t.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.NC_NAME_START_CHAR_RE=new RegExp("^["+t.NC_NAME_START_CHAR+"]$","u"),t.NC_NAME_CHAR_RE=new RegExp("^["+t.NC_NAME_CHAR+"]$","u"),t.NC_NAME_RE=new RegExp("^["+t.NC_NAME_START_CHAR+"]["+t.NC_NAME_CHAR+"]*$","u"),t.isNCNameStartChar=r,t.isNCNameChar=function(e){return r(e)||45===e||46===e||e>=48&&e<=57||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},20512:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.toSparqlJs=t.toSparql=t.Factory=t.Algebra=t.translate=void 0;const s=o(r(77947));t.translate=s.default;const c=a(r(1616));t.Algebra=c;const u=o(r(95962));t.Factory=u.default;const l=r(80619);Object.defineProperty(t,"toSparql",{enumerable:!0,get:function(){return l.toSparql}}),Object.defineProperty(t,"toSparqlJs",{enumerable:!0,get:function(){return l.toSparqlJs}});const d=o(r(84238));t.Util=d.default},1616:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.expressionTypes=t.types=void 0,(n=t.types||(t.types={})).ALT="alt",n.ASK="ask",n.BGP="bgp",n.CONSTRUCT="construct",n.DESCRIBE="describe",n.DISTINCT="distinct",n.EXPRESSION="expression",n.EXTEND="extend",n.FILTER="filter",n.FROM="from",n.GRAPH="graph",n.GROUP="group",n.INV="inv",n.JOIN="join",n.LEFT_JOIN="leftjoin",n.LINK="link",n.MINUS="minus",n.NOP="nop",n.NPS="nps",n.ONE_OR_MORE_PATH="OneOrMorePath",n.ORDER_BY="orderby",n.PATH="path",n.PATTERN="pattern",n.PROJECT="project",n.REDUCED="reduced",n.SEQ="seq",n.SERVICE="service",n.SLICE="slice",n.UNION="union",n.VALUES="values",n.ZERO_OR_MORE_PATH="ZeroOrMorePath",n.ZERO_OR_ONE_PATH="ZeroOrOnePath",n.COMPOSITE_UPDATE="compositeupdate",n.DELETE_INSERT="deleteinsert",n.LOAD="load",n.CLEAR="clear",n.CREATE="create",n.DROP="drop",n.ADD="add",n.MOVE="move",n.COPY="copy",(r=t.expressionTypes||(t.expressionTypes={})).AGGREGATE="aggregate",r.EXISTENCE="existence",r.NAMED="named",r.OPERATOR="operator",r.TERM="term",r.WILDCARD="wildcard"},95962:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const o=a(r(1616)),s=r(18050),c=r(22112),u=r(55403);t.default=class{constructor(e){this.dataFactory=e||new s.DataFactory,this.stringType=this.createTerm("http://www.w3.org/2001/XMLSchema#string")}createAlt(e,t=!0){return this.flattenMulti({type:o.types.ALT,input:e},t)}createAsk(e){return{type:o.types.ASK,input:e}}createBoundAggregate(e,t,r,n,i){const a=this.createAggregateExpression(t,r,n,i);return a.variable=e,a}createBgp(e){return{type:o.types.BGP,patterns:e}}createConstruct(e,t){return{type:o.types.CONSTRUCT,input:e,template:t}}createDescribe(e,t){return{type:o.types.DESCRIBE,input:e,terms:t}}createDistinct(e){return{type:o.types.DISTINCT,input:e}}createExtend(e,t,r){return{type:o.types.EXTEND,input:e,variable:t,expression:r}}createFrom(e,t,r){return{type:o.types.FROM,input:e,default:t,named:r}}createFilter(e,t){return{type:o.types.FILTER,input:e,expression:t}}createGraph(e,t){return{type:o.types.GRAPH,input:e,name:t}}createGroup(e,t,r){return{type:o.types.GROUP,input:e,variables:t,aggregates:r}}createInv(e){return{type:o.types.INV,path:e}}createJoin(e,t=!0){return this.flattenMulti({type:o.types.JOIN,input:e},t)}createLeftJoin(e,t,r){return r?{type:o.types.LEFT_JOIN,input:[e,t],expression:r}:{type:o.types.LEFT_JOIN,input:[e,t]}}createLink(e){return{type:o.types.LINK,iri:e}}createMinus(e,t){return{type:o.types.MINUS,input:[e,t]}}createNop(){return{type:o.types.NOP}}createNps(e){return{type:o.types.NPS,iris:e}}createOneOrMorePath(e){return{type:o.types.ONE_OR_MORE_PATH,path:e}}createOrderBy(e,t){return{type:o.types.ORDER_BY,input:e,expressions:t}}createPath(e,t,r,n){return n?{type:o.types.PATH,subject:e,predicate:t,object:r,graph:n}:{type:o.types.PATH,subject:e,predicate:t,object:r,graph:this.dataFactory.defaultGraph()}}createPattern(e,t,r,n){const i=this.dataFactory.quad(e,t,r,n);return i.type=o.types.PATTERN,i}createProject(e,t){return{type:o.types.PROJECT,input:e,variables:t}}createReduced(e){return{type:o.types.REDUCED,input:e}}createSeq(e,t=!0){return this.flattenMulti({type:o.types.SEQ,input:e},t)}createService(e,t,r){return{type:o.types.SERVICE,input:e,name:t,silent:Boolean(r)}}createSlice(e,t,r){return t=t||0,void 0!==r?{type:o.types.SLICE,input:e,start:t,length:r}:{type:o.types.SLICE,input:e,start:t}}createUnion(e,t=!0){return this.flattenMulti({type:o.types.UNION,input:e},t)}createValues(e,t){return{type:o.types.VALUES,variables:e,bindings:t}}createZeroOrMorePath(e){return{type:o.types.ZERO_OR_MORE_PATH,path:e}}createZeroOrOnePath(e){return{type:o.types.ZERO_OR_ONE_PATH,path:e}}createAggregateExpression(e,t,r,n){return n?{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,separator:n,distinct:r}:{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,distinct:r}}createExistenceExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.EXISTENCE,not:e,input:t}}createNamedExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.NAMED,name:e,args:t}}createOperatorExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.OPERATOR,operator:e,args:t}}createTermExpression(e){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.TERM,term:e}}createWildcardExpression(){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.WILDCARD,wildcard:new u.Wildcard}}createTerm(e){return"$"===e[0]&&(e=e.replace("$","?")),(0,c.stringToTerm)(e,this.dataFactory)}createCompositeUpdate(e){return{type:o.types.COMPOSITE_UPDATE,updates:e}}createDeleteInsert(e,t,r){const n={type:o.types.DELETE_INSERT};return e&&(n.delete=e),t&&(n.insert=t),r&&(n.where=r),n}createLoad(e,t,r){const n={type:o.types.LOAD,source:e};return t&&(n.destination=t),this.addSilent(n,Boolean(r))}createClear(e,t){return this.addSilent({type:o.types.CLEAR,source:e},Boolean(t))}createCreate(e,t){return this.addSilent({type:o.types.CREATE,source:e},Boolean(t))}createDrop(e,t){return this.addSilent({type:o.types.DROP,source:e},Boolean(t))}createAdd(e,t,r){return this.addSilent({type:o.types.ADD,source:e,destination:t},Boolean(r))}createMove(e,t,r){return this.addSilent({type:o.types.MOVE,source:e,destination:t},Boolean(r))}createCopy(e,t,r){return this.addSilent({type:o.types.COPY,source:e,destination:t},Boolean(r))}addSilent(e,t){return t&&(e.silent=t),e}flattenMulti(e,t){if(!t)return e;const r=e.type,n=e.input;let i=[];for(const e of n)e.type===r?i.push(...e.input):i.push(e);return e.input=i,e}}},80619:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.toSparqlJs=t.toSparql=void 0;const s=r(91032),c=r(22112),u=r(55403),l=a(r(1616)),d=o(r(95962)),p=o(r(84238)),h=l.types,f=l.expressionTypes;let y;const g=new d.default;function m(e){b();let t=v(e=function(e){return D(e,[])}(e));return"group"===t.type?t.patterns[0]:t}function b(){y={project:!1,extend:[],group:[],aggregates:[],order:[]}}function v(e){switch(e.type!==h.EXTEND&&e.type!==h.ORDER_BY&&e.type!==h.GRAPH&&(y.project=!1),e.type){case h.EXPRESSION:return _(e);case h.ASK:return A(e,h.ASK);case h.BGP:return function(e){let t=e.patterns.map(E);return 0===t.length?null:{type:"bgp",triples:t}}(e);case h.CONSTRUCT:return function(e){return{type:"query",prefixes:{},queryType:"CONSTRUCT",template:e.template.map(E),where:p.default.flatten([v(e.input)])}}(e);case h.DESCRIBE:return A(e,h.DESCRIBE);case h.DISTINCT:return function(e){let t=v(e.input);return t.patterns[0].distinct=!0,t}(e);case h.EXTEND:return function(e){return y.project?(y.extend.push(e),v(e.input)):p.default.flatten([v(e.input),{type:"bind",variable:e.variable,expression:_(e.expression)}])}(e);case h.FROM:return function(e){const t=v(e.input);let r=t;return"group"===t.type&&(r=t.patterns[0]),r.from={default:e.default,named:e.named},t}(e);case h.FILTER:return function(e){return{type:"group",patterns:p.default.flatten([v(e.input),{type:"filter",expression:_(e.expression)}])}}(e);case h.GRAPH:return function(e){return{type:"graph",patterns:p.default.flatten([v(e.input)]),name:e.name}}(e);case h.GROUP:return function(e){const t=v(e.input),r=e.aggregates.map(O);return y.aggregates.push(...r),y.group.push(...e.variables),t}(e);case h.JOIN:return function(e){return p.default.flatten(e.input.map(v)).reduce(((e,t)=>("bgp"!==t.type||0==e.length||"bgp"!==e[e.length-1].type?e.push(t):e[e.length-1].triples.push(...t.triples),e)),[])}(e);case h.LEFT_JOIN:return function(e){const t={type:"optional",patterns:[v(e.input[1])]};return e.expression&&t.patterns.push({type:"filter",expression:_(e.expression)}),t.patterns=p.default.flatten(t.patterns),p.default.flatten([v(e.input[0]),t])}(e);case h.MINUS:return function(e){let t=v(e.input[1]);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),p.default.flatten([v(e.input[0]),{type:"minus",patterns:t}])}(e);case h.NOP:return{};case h.ORDER_BY:return function(e){return y.order.push(...e.expressions),v(e.input)}(e);case h.PATH:return function(e){return{type:"bgp",triples:[{subject:e.subject,predicate:w(e.predicate),object:e.object}]}}(e);case h.PATTERN:return E(e);case h.PROJECT:return A(e,h.PROJECT);case h.REDUCED:return function(e){let t=v(e.input);return t.patterns[0].reduced=!0,t}(e);case h.SERVICE:return function(e){let t=v(e.input);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),{type:"service",name:e.name,silent:e.silent,patterns:t}}(e);case h.SLICE:return function(e){let t=v(e.input),r=t;return t.type&&"group"===t.type&&(r=t.patterns[0]),0!==e.start&&(r.offset=e.start),void 0!==e.length&&(r.limit=e.length),t}(e);case h.UNION:return function(e){return{type:"union",patterns:e.input.map(v).map(S)}}(e);case h.VALUES:return function(e){return{type:"values",values:e.bindings.map((t=>{let r={};for(let n of e.variables){let e=`?${n.value}`;t[e]?r[e]=t[e]:r[e]=void 0}return r}))}}(e);case h.COMPOSITE_UPDATE:return function(e){return{prefixes:{},type:"update",updates:e.updates.map((e=>v(e).updates[0]))}}(e);case h.DELETE_INSERT:return function(e){var t;let r,n=e.where;if(n&&n.type===h.FROM){let e=n;n=e.input,r={default:e.default,named:e.named}}const i=[{updateType:"insertdelete",delete:N(e.delete||[]),insert:N(e.insert||[])}];if(r&&(i[0].using=r),!n||n.type===h.BGP&&0===n.patterns.length)i[0].where=[];else{const e=[];let r=v(D(n,e));if("group"===r.type?i[0].where=r.patterns:i[0].where=[r],e.length>0){if(1!==e.length)throw new Error("This is unexpected and might indicate an error in graph handling for updates.");""!==(null===(t=e[0])||void 0===t?void 0:t.value)&&(i[0].where=[{type:"graph",patterns:i[0].where,name:e[0]}])}}return e.delete||e.where?e.insert||e.where?!e.insert&&e.where&&"bgp"===e.where.type&&(0,s.isomorphic)(e.delete,e.where.patterns)&&(delete i[0].where,i[0].updateType="deletewhere"):(delete i[0].insert,delete i[0].where,e.delete.some((e=>"Variable"===e.subject.termType||"Variable"===e.predicate.termType||"Variable"===e.object.termType))?i[0].updateType="deletewhere":i[0].updateType="delete"):(i[0].updateType="insert",delete i[0].delete,delete i[0].where),{prefixes:{},type:"update",updates:i}}(e);case h.LOAD:return function(e){const t=[{type:"load",silent:Boolean(e.silent),source:e.source}];return e.destination&&(t[0].destination=e.destination),{prefixes:{},type:"update",updates:t}}(e);case h.CLEAR:return function(e){return I(e,"clear")}(e);case h.CREATE:return function(e){return I(e,"create")}(e);case h.DROP:return function(e){return I(e,"drop")}(e);case h.ADD:return function(e){return P(e,"add")}(e);case h.MOVE:return function(e){return P(e,"move")}(e);case h.COPY:return function(e){return P(e,"copy")}(e)}throw new Error(`Unknown Operation type ${e.type}`)}function _(e){switch(e.expressionType){case f.AGGREGATE:return function(e){const t={expression:_(e.expression),type:"aggregate",aggregation:e.aggregator,distinct:e.distinct};return e.separator&&(t.separator=e.separator),t}(e);case f.EXISTENCE:return function(e){return{type:"operation",operator:e.not?"notexists":"exists",args:[{type:"group",patterns:p.default.flatten([v(e.input)])}]}}(e);case f.NAMED:return function(e){return{type:"functionCall",function:e.name,args:e.args.map(_)}}(e);case f.OPERATOR:return function(e){if("desc"===e.operator){return{expression:_(e.args[0]),descending:!0}}const t={type:"operation",operator:e.operator,args:e.args.map(_)};return"in"!==t.operator&&"notin"!==t.operator||(t.args=[t.args[0]].concat([t.args.slice(1)])),t}(e);case f.TERM:return function(e){return e.term}(e);case f.WILDCARD:return function(e){return e.wildcard}(e)}throw new Error(`Unknown Expression Operation type ${e.expressionType}`)}function w(e){switch(e.type){case h.ALT:return function(e){const t=e.input.map(w);return t.every((e=>"pathType"in e&&"!"===e.pathType))?{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:p.default.flatten(t.map((e=>e.items)))}]}:{type:"path",pathType:"|",items:t}}(e);case h.INV:return function(e){if(e.path.type===h.NPS){const t=e.path.iris.map((e=>({type:"path",pathType:"^",items:[e]})));return t.length<=1?{type:"path",pathType:"!",items:t}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:t}]}}return{type:"path",pathType:"^",items:[w(e.path)]}}(e);case h.LINK:return function(e){return e.iri}(e);case h.NPS:return function(e){return e.iris.length<=1?{type:"path",pathType:"!",items:e.iris}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:e.iris}]}}(e);case h.ONE_OR_MORE_PATH:return function(e){return{type:"path",pathType:"+",items:[w(e.path)]}}(e);case h.SEQ:return function(e){return{type:"path",pathType:"/",items:e.input.map(w)}}(e);case h.ZERO_OR_MORE_PATH:return function(e){return{type:"path",pathType:"*",items:[w(e.path)]}}(e);case h.ZERO_OR_ONE_PATH:return function(e){return{type:"path",pathType:"?",items:[w(e.path)]}}(e)}throw new Error(`Unknown Path type ${e.type}`)}function T(e){return(0,c.termToString)(e)}function S(e){return Array.isArray(e)?1===e.length?e[0]:{type:"group",patterns:e}:e}function O(e){return e}function E(e){return{subject:e.subject,predicate:e.predicate,object:e.object}}function x(e,t){let r=p.default.isSimpleTerm(e)?T(e):e;if("string"==typeof r){if(t[r])return t[r]}else if(Array.isArray(e))e=e.map((e=>x(e,t)));else for(let r of Object.keys(e))e[r]=x(e[r],t);return e}function A(e,t){const r={type:"query",prefixes:{}},n=r;let i;t===h.PROJECT?(r.queryType="SELECT",i=e.variables):t===h.ASK?r.queryType="ASK":t===h.DESCRIBE&&(r.queryType="DESCRIBE",i=e.terms);const a=y.extend,o=y.group,s=y.aggregates,l=y.order;b(),y.project=!0;let d=p.default.flatten([v(e.input)]);1===d.length&&"group"===d[0].type&&(d=d[0].patterns),r.where=d;let f={};for(let e of y.aggregates)f[T(e.variable)]=_(e);let g={};for(let e=y.extend.length-1;e>=0;--e){let t=y.extend[e];g[T(t.variable)]=x(_(t.expression),f)}y.group.length>0&&(n.group=y.group.map((e=>{let t=T(e);if(g[t]){let r=g[t];return delete g[t],{variable:e,expression:r}}return{expression:e}}))),y.order.length>0&&(n.order=y.order.map(v).map((e=>e.descending?e:{expression:e}))),i&&(n.variables=i.map((e=>{let t=T(e);if(g[t]){let r=g[t];return delete g[t],{variable:e,expression:r}}return e})),0===n.variables.length&&(n.variables=[new u.Wildcard]));const m=Object.entries(g);if(m.length>0){n.where=n.where||[];for(const[e,t]of m)n.where.push({type:"bind",variable:(0,c.stringToTerm)(e),expression:t})}if(r.where.length>0&&"filter"===r.where[r.where.length-1].type){const e=r.where[r.where.length-1];R(e,Object.keys(f))&&(n.having=p.default.flatten([x(e.expression,f)]),r.where.splice(-1))}return y.extend=a,y.group=o,y.aggregates=s,y.order=l,{type:"group",patterns:[n]}}function R(e,t){return p.default.isSimpleTerm(e)?t.indexOf(T(e))>=0:Array.isArray(e)?e.some((e=>R(e,t))):e===Object(e)?Object.keys(e).some((r=>R(e[r],t))):t.indexOf(e)>=0}function I(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return"DEFAULT"===e.source?r[0].graph={default:!0}:"NAMED"===e.source?r[0].graph={named:!0}:"ALL"===e.source?r[0].graph={all:!0}:r[0].graph={type:"graph",name:e.source},{prefixes:{},type:"update",updates:r}}function P(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return r[0].source="DEFAULT"===e.source?{type:"graph",default:!0}:{type:"graph",name:e.source},r[0].destination="DEFAULT"===e.destination?{type:"graph",default:!0}:{type:"graph",name:e.destination},{prefixes:{},type:"update",updates:r}}function N(e){if(!e)return[];const t={};return e.forEach((e=>{const r=e.graph.value;t[r]||(t[r]=[]),t[r].push(e)})),Object.keys(t).map((e=>""===e?{type:"bgp",triples:t[e].map(E)}:{type:"graph",triples:t[e].map(E),name:t[e][0].graph}))}function D(e,t){if(Array.isArray(e))return e.map((e=>D(e,t)));if(!e.type)return e;if(e.type===h.DELETE_INSERT)return e;if((e.type===h.PATTERN||e.type===h.PATH)&&e.graph)return t.push(e.graph),""!==e.graph.name?e.type===h.PATTERN?g.createPattern(e.subject,e.predicate,e.object):g.createPath(e.subject,e.predicate,e.object):e;const r={},n={},i={};for(let t of Object.keys(e)){const a=[];if(r[t]=D(e[t],a),a.length>0){n[t]=a;for(const e of a)i[e.value]=e}}const a=Object.keys(i);if(a.length>0)if(1!==a.length||[h.PROJECT,h.SERVICE].includes(e.type)){if(e.type===h.BGP)return function(e,t){var r;const n={};for(let i=0;i""===n[e][0].value?t:g.createGraph(t,n[e][r]))):""!==n[e][0].value&&(r[e]=g.createGraph(t,n[e][0]))}}else t.push(i[a[0]]);return r}t.toSparql=function(e,t={}){return new u.Generator(t).stringify(m(e))},t.toSparqlJs=m},77947:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(53933),c=r(22112),u=a(r(1616)),l=o(r(95962)),d=o(r(84238)),p=r(55403).Parser,h=u.types;let f,y=new Set,g=0,m=!1;function b(e,t,r){if(y=new Set,g=0,m=Boolean(t),!e.type)return f.createNop();if("query"!==e.type&&"update"!==e.type)throw new Error("Translate only works on complete query or update objects.");let n;var i;return w(e),"query"===e.type?(n=S({type:"group",patterns:e.where||[]}),n=function(e,t){const r=e,n=[],i={};if(r.variables=r.variables&&r.variables.map((e=>C(e,i))),r.having=r.having&&r.having.map((e=>C(e,i))),r.order=r.order&&r.order.map((e=>C(e,i))),r.group||Object.keys(i).length>0){const e=Object.keys(i).map((e=>function(e,t){if("aggregate"!==e.type||!e.aggregation)throw new Error(`Unexpected input: ${JSON.stringify(e)}`);const r=O(e);return r.variable=t,r}(i[e],f.createTerm(e)))),n=[];if(r.group)for(const e of r.group)if(d.default.isSimpleTerm(e.expression))n.push(e.expression);else{const r="variable"in e?e.variable:A();t=f.createExtend(t,r,O(e.expression)),n.push(r)}t=f.createGroup(t,n,e)}if(r.having)for(let e of r.having)t=f.createFilter(t,O(e));e.values&&(t=f.createJoin([t,j(e)]));let a=[];if("SELECT"===e.queryType||"DESCRIBE"===e.queryType)if(e.variables.some((e=>e&&d.default.isWildcard(e))))a=Object.values(T(e)).sort(((e,t)=>e.value.localeCompare(t.value)));else for(let t of e.variables)_(t)||!("variable"in t)?a.push(t):t.variable&&(a.push(t.variable),n.push(t));for(let e of n)t=f.createExtend(t,e.variable,O(e.expression));return r.order&&(t=f.createOrderBy(t,r.order.map((e=>{let t=O(e.expression);return e.descending&&(t=f.createOperatorExpression("desc",[t])),t})))),"SELECT"===e.queryType&&(t=f.createProject(t,a)),r.distinct&&(t=f.createDistinct(t)),r.reduced&&(t=f.createReduced(t)),"CONSTRUCT"===e.queryType?t=f.createConstruct(t,(e.template||[]).map(R)):"ASK"===e.queryType?t=f.createAsk(t):"DESCRIBE"===e.queryType&&(t=f.createDescribe(t,a)),(r.offset||r.limit)&&(t=f.createSlice(t,r.offset||0,r.limit)),r.from&&(t=f.createFrom(t,r.from.default,r.from.named)),t}(e,n)):"update"===e.type&&(n=1===(i=e).updates.length?M(i.updates[0]):f.createCompositeUpdate(i.updates.map(M))),r&&(n=k(n)),n}function v(e){return Boolean(null==e?void 0:e.termType)}function _(e){return"Variable"===(null==e?void 0:e.termType)}function w(e){if(v(e))_(e)&&y.add(`?${e.value}`);else if(Array.isArray(e))for(const t of e)w(t);else if(e&&"object"==typeof e)for(let t of Object.keys(e))t.startsWith("?")?y.add(t):t.startsWith("$")&&y.add(`?${t.slice(1)}`),w(e[t])}function T(e){let t={};if((r=e).subject&&r.predicate&&r.object){const r=[T(e.subject),T(e.predicate),T(e.object),e.graph?T(e.graph):{}];Object.assign(t,...r)}else if(v(e))_(e)&&(t[e.value]=e);else if("bgp"===e.type){const r=e.triples;Object.assign(t,...r.map(T))}else if("path"===e.type)Object.assign(t,...e.items.map(T));else if("group"===e.type||"union"===e.type||"optional"===e.type)Object.assign(t,...e.patterns.map(T));else if("service"===e.type||"graph"===e.type)Object.assign(t,T(e.name)),Object.assign(t,...e.patterns.map(T));else if("bind"===e.type)Object.assign(t,T(e.variable));else if("values"===e.type){if(e.values.length>0){const r=Object.keys(e.values[0]).map((e=>f.createTerm(e)));Object.assign(t,...r.map(T))}}else if("query"===e.type&&("SELECT"===e.queryType||"DESCRIBE"===e.queryType)){e.where&&e.variables.some(d.default.isWildcard)&&Object.assign(t,...e.where.map(T));for(const r of e.variables)_(r)?Object.assign(t,T(r)):r.variable&&Object.assign(t,T(r.variable));if("SELECT"===e.queryType){if(e.group)for(const r of e.group)r.variable&&Object.assign(t,T(r.variable));if(e.values){const r={type:"values",values:e.values};Object.assign(t,T(r))}}}var r;return t}function S(e){if("bgp"===e.type)return function(e){let t=[],r=[];for(let i of e.triples)if("pathType"in i.predicate){let e=x((n=i).subject,E(n.predicate),n.object);for(let n of e)n.type===h.PATH?(t.length>0&&r.push(f.createBgp(t)),t=[],r.push(n)):t.push(n)}else t.push(R(i));var n;return t.length>0&&r.push(f.createBgp(t)),1===r.length?r[0]:f.createJoin(r)}(e);if("union"===e.type)return f.createUnion(e.patterns.map((e=>("group"!==e.type&&(e={type:"group",patterns:[e]}),S(e)))));if("graph"===e.type){let t=S({type:"group",patterns:e.patterns});return t=m?P(t,e.name):f.createGraph(t,e.name),t}if("values"===e.type)return j(e);if("query"===e.type)return b(e,m,!1);if("group"===e.type){let t=[],r=[];for(let n of e.patterns)("filter"===n.type?t:r).push(n);let n=r.reduce(N,f.createBgp([])),i=t.map((e=>O(e.expression)));return i.length>0&&(n=f.createFilter(n,i.reduce(((e,t)=>f.createOperatorExpression("&&",[e,t]))))),n}throw new Error(`Unexpected type: ${e.type}`)}function O(e){if(d.default.isSimpleTerm(e))return f.createTermExpression(e);if(d.default.isQuad(e))return d.default.hasQuadVariables(e)?f.createOperatorExpression("triple",[O(e.subject),O(e.predicate),O(e.object)]):f.createTermExpression(e);if(d.default.isWildcard(e))return f.createWildcardExpression();if("aggregation"in e)return f.createAggregateExpression(e.aggregation,O(e.expression),Boolean(e.distinct),e.separator);if("function"in e)return f.createNamedExpression(e.function,e.args.map(O));if("operator"in e)return"exists"===e.operator||"notexists"===e.operator?f.createExistenceExpression("notexists"===e.operator,S(e.args[0])):("in"!==e.operator&&"notin"!==e.operator||(e.args=[e.args[0]].concat(e.args[1])),f.createOperatorExpression(e.operator,e.args.map(O)));throw new Error(`Unknown expression: ${JSON.stringify(e)}`)}function E(e){if(d.default.isSimpleTerm(e)){if("NamedNode"===e.termType)return f.createLink(e);throw new Error(`Path predicate should be a NamedNode, got ${JSON.stringify(e)}`)}if("^"===e.pathType)return f.createInv(E(e.items[0]));if("!"===e.pathType){let t,r=[],n=[];t="pathType"in e.items[0]&&"|"===e.items[0].pathType?e.items[0].items:e.items;for(let e of t)if(d.default.isSimpleTerm(e))r.push(e);else{if("^"!==e.pathType)throw new Error(`Unexpected item: ${JSON.stringify(e)}`);n.push(e.items[0])}let i=f.createNps(r),a=f.createInv(f.createNps(n));return 0===n.length?i:0===r.length?a:f.createAlt([i,a])}if("/"===e.pathType)return f.createSeq(e.items.map(E));if("|"===e.pathType)return f.createAlt(e.items.map(E));if("*"===e.pathType)return f.createZeroOrMorePath(E(e.items[0]));if("+"===e.pathType)return f.createOneOrMorePath(E(e.items[0]));if("?"===e.pathType)return f.createZeroOrOnePath(E(e.items[0]));throw new Error(`Unable to translate path expression ${JSON.stringify(e)}`)}function x(e,t,r){if(t.type===h.LINK)return[f.createPattern(e,t.iri,r)];if(t.type===h.INV)return x(r,t.path,e);if(t.type===h.SEQ){let n=e;return d.default.flatten(t.input.map(((e,i)=>{const a=i===t.input.length-1?r:A(),o=x(n,e,a);return"Variable"===a.termType&&(n=a),o})))}return[f.createPath(e,t,r)]}function A(){let e="?var"+g++;return y.has(e)?A():(y.add(e),f.createTerm(e))}function R(e){if("pathType"in e.predicate)throw new Error("Trying to translate property path to quad.");return f.createPattern(e.subject,e.predicate,e.object,e.graph)}t.default=function(e,t){let r;if(t=t||{},f=new l.default(t.dataFactory),"string"==typeof e){let n=new p(t);n._resetBlanks(),r=n.parse(e)}else r=e;return b(r,t.quads,t.blankToVariable)};let I=Object.values(h);function P(e,t,r){if(e.type===h.GRAPH){if(r)throw new Error("Recursing through nested GRAPH statements with a replacement is impossible.");e=P(e.input,e.name)}else if(e.type===h.SERVICE);else if(e.type===h.BGP)e.patterns=e.patterns.map((e=>(r&&(e.subject.equals(t)&&(e.subject=r),e.predicate.equals(t)&&(e.predicate=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t),e)));else if(e.type===h.PATH)r&&(e.subject.equals(t)&&(e.subject=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t);else if(e.type!==h.PROJECT||r)if(e.type!==h.EXTEND||r)for(let n of Object.keys(e))Array.isArray(e[n])?e[n]=e[n].map((e=>P(e,t,r))):I.indexOf(e[n].type)>=0?e[n]=P(e[n],t,r):r&&_(e[n])&&e[n].equals(t)&&(e[n]=r);else e.variable.equals(t)&&(r=A()),e.input=P(e.input,t,r);else e.variables.some((e=>e.equals(t)))||(r=A()),e.input=P(e.input,t,r);return e}function N(e,t){if("optional"===t.type){const r=S({type:"group",patterns:t.patterns});e=r.type===h.FILTER?f.createLeftJoin(e,r.input,r.expression):f.createLeftJoin(e,r)}else if("minus"===t.type){const r=S({type:"group",patterns:t.patterns});e=f.createMinus(e,r)}else if("bind"===t.type)e=f.createExtend(e,t.variable,O(t.expression));else if("service"===t.type){const r={type:"group",patterns:t.patterns};e=D(e,f.createService(S(r),t.name,t.silent))}else e=D(e,S(t));return e}function D(e,t){return e.type===h.BGP&&t.type===h.BGP?e=f.createBgp([...e.patterns,...t.patterns]):e.type===h.BGP&&0===e.patterns.length?e=t:t.type===h.BGP&&0===t.patterns.length||(e=f.createJoin([e,t])),e}function j(e){let t=(0===e.values.length?[]:Object.keys(e.values[0])).map(f.createTerm.bind(f)),r=e.values.map((e=>{let t=Object.keys(e);t=t.filter((t=>void 0!==e[t]));let r={};for(let n of t)r[n]=e[n];return r}));return f.createValues(t,r)}function C(e,t){if("type"in e&&"aggregate"===e.type){let r,n=!1;for(let i of Object.keys(t))if(s(t[i],e)){r=f.createTerm(i),n=!0;break}return n||(r=A(),t[(0,c.termToString)(r)]=e),r}return"expression"in e&&e.expression?{...e,expression:C(e.expression,t)}:"args"in e&&e.args?{...e,args:e.args.map((e=>C(e,t)))}:e}function M(e){if("type"in e){if("load"===e.type)return function(e){return f.createLoad(e.source,e.destination,e.silent)}(e);if("clear"===e.type||"create"===e.type||"drop"===e.type)return function(e){let t;switch(t=d.default.isSimpleTerm(e.graph)?e.graph:e.graph.all?"ALL":e.graph.default?"DEFAULT":e.graph.named?"NAMED":e.graph.name,e.type){case"clear":return f.createClear(t,e.silent);case"create":return f.createCreate(t,e.silent);case"drop":return f.createDrop(t,e.silent)}}(e);if("add"===e.type||"copy"===e.type||"move"===e.type)return function(e){const t=e.source.default?"DEFAULT":e.source.name,r=e.destination.default?"DEFAULT":e.destination.name;switch(e.type){case"copy":return f.createCopy(t,r,e.silent);case"move":return f.createMove(t,r,e.silent);case"add":return f.createAdd(t,r,e.silent)}}(e)}else if("insertdelete"===e.updateType||"deletewhere"===e.updateType||"delete"===e.updateType||"insert"===e.updateType)return function(e){if(!m)throw new Error("INSERT/DELETE operations are only supported with quads option enabled");let t,r=[],n=[];if(e.delete&&(r=d.default.flatten(e.delete.map((t=>L(t,e.graph))))),e.insert&&(n=d.default.flatten(e.insert.map((t=>L(t,e.graph))))),e.where&&e.where.length>0){t=S({type:"group",patterns:e.where});const r=e.using;r?t=f.createFrom(t,r.default,r.named):e.graph&&(t=P(t,e.graph))}else"deletewhere"===e.updateType&&r.length>0&&(t=f.createBgp(r));return f.createDeleteInsert(r.length>0?r:void 0,n.length>0?n:void 0,t)}(e);throw new Error(`Unknown update type ${JSON.stringify(e)}`)}function L(e,t){let r=t;"graph"===e.type&&(r=e.name);let n=e.triples;return r&&(n=n.map((e=>Object.assign(e,{graph:r})))),n.map(R)}function k(e){const t={},r=Array.from(y).reduce(((e,t)=>(e[t]=!0,e)),{});return d.default.mapOperation(e,{[u.types.DELETE_INSERT]:e=>({result:f.createDeleteInsert(e.delete,e.insert,e.where&&k(e.where)),recurse:!1}),[u.types.PATH]:(e,t)=>({result:t.createPath(n(e.subject),e.predicate,n(e.object),n(e.graph)),recurse:!1}),[u.types.PATTERN]:(e,t)=>({result:t.createPattern(n(e.subject),n(e.predicate),n(e.object),n(e.graph)),recurse:!1}),[u.types.CONSTRUCT]:e=>({result:f.createConstruct(k(e.input),e.template),recurse:!1})});function n(e){if("BlankNode"===e.termType){let n=t[e.value];return n||(n=d.default.createUniqueVariable(e.value,r,f.dataFactory),r[n.value]=!0,t[e.value]=n),n}return e}}},84238:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(1616),a=n(r(95962)),o=r(13252);class s{static flatten(e){return Array.prototype.concat(...e).filter((e=>e))}static objectify(e){if(e.termType){if("Quad"===e.termType)return{type:"pattern",termType:"Quad",subject:s.objectify(e.subject),predicate:s.objectify(e.predicate),object:s.objectify(e.object),graph:s.objectify(e.graph)};{let t={termType:e.termType,value:e.value};return e.language&&(t.language=e.language),e.datatype&&(t.datatype=s.objectify(e.datatype)),t}}if(Array.isArray(e))return e.map((e=>s.objectify(e)));if(e===Object(e)){let t={};for(let r of Object.keys(e))t[r]=s.objectify(e[r]);return t}return e}static inScopeVariables(e){const t=[];function r(e){t.find((t=>e.value===t.value))||t.push(e)}function n(e){"Variable"===e.subject.termType&&r(e.subject),"Variable"===e.predicate.termType&&r(e.predicate),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.predicate.termType&&n(e.predicate),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph)}return s.recurseOperation(e,{[i.types.EXPRESSION]:e=>(e.expressionType===i.expressionTypes.AGGREGATE&&e.variable&&r(e.variable),!0),[i.types.EXTEND]:e=>(r(e.variable),!0),[i.types.GRAPH]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.GROUP]:e=>(e.variables.forEach(r),!0),[i.types.PATH]:e=>("Variable"===e.subject.termType&&r(e.subject),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph),!0),[i.types.PATTERN]:e=>(n(e),!0),[i.types.PROJECT]:e=>(e.variables.forEach(r),!1),[i.types.SERVICE]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.VALUES]:e=>(e.variables.forEach(r),!0)}),t}static recurseOperation(e,t){let r=e,n=!0;const a=t[e.type];if(a&&(n=a(e)),!n)return;let o=e=>s.recurseOperation(e,t);switch(r.type){case i.types.ALT:r.input.map(o);break;case i.types.ASK:o(r.input);break;case i.types.BGP:r.patterns.forEach(o);break;case i.types.CONSTRUCT:o(r.input),r.template.map(o);break;case i.types.DESCRIBE:case i.types.DISTINCT:o(r.input);break;case i.types.EXPRESSION:r.expressionType===i.expressionTypes.EXISTENCE&&o(r.input);break;case i.types.EXTEND:case i.types.FILTER:o(r.input),o(r.expression);break;case i.types.FROM:case i.types.GRAPH:o(r.input);break;case i.types.GROUP:o(r.input),r.aggregates.forEach(o);break;case i.types.INV:o(r.path);break;case i.types.JOIN:r.input.map(o);break;case i.types.LEFT_JOIN:r.input.map(o),r.expression&&o(r.expression);break;case i.types.LINK:break;case i.types.MINUS:r.input.map(o);break;case i.types.NOP:case i.types.NPS:break;case i.types.ONE_OR_MORE_PATH:o(r.path);break;case i.types.ORDER_BY:o(r.input),r.expressions.forEach(o);break;case i.types.PATH:o(r.predicate);break;case i.types.PATTERN:break;case i.types.PROJECT:case i.types.REDUCED:o(r.input);break;case i.types.SEQ:r.input.map(o);break;case i.types.SERVICE:case i.types.SLICE:o(r.input);break;case i.types.UNION:r.input.map(o);break;case i.types.VALUES:break;case i.types.ZERO_OR_MORE_PATH:case i.types.ZERO_OR_ONE_PATH:o(r.path);break;case i.types.COMPOSITE_UPDATE:r.updates.forEach((e=>o(e)));break;case i.types.DELETE_INSERT:r.delete&&r.delete.forEach((e=>o(e))),r.insert&&r.insert.forEach((e=>o(e))),r.where&&o(r.where);break;case i.types.LOAD:case i.types.CLEAR:case i.types.CREATE:case i.types.DROP:case i.types.ADD:case i.types.MOVE:case i.types.COPY:break;default:throw new Error(`Unknown Operation type ${r.type}`)}}static mapOperation(e,t,r){let n=e,o=!0,c=!0;r=r||new a.default;const u=t[e.type];if(u){const t=u(e,r);n=t.result,o=t.recurse,c=!1!==t.copyMetadata}let l;if(c&&(n.metadata||e.metadata)&&(l={...n.metadata,...e.metadata}),!o)return l&&(n.metadata=l),n;let d=e=>s.mapOperation(e,t,r);switch(n.type){case i.types.ALT:n=r.createAlt(n.input.map(d));break;case i.types.ASK:n=r.createAsk(d(n.input));break;case i.types.BGP:n=r.createBgp(n.patterns.map(d));break;case i.types.CONSTRUCT:n=r.createConstruct(d(n.input),n.template.map(d));break;case i.types.DESCRIBE:n=r.createDescribe(d(n.input),n.terms);break;case i.types.DISTINCT:n=r.createDistinct(d(n.input));break;case i.types.EXPRESSION:n=s.mapExpression(n,t,r);break;case i.types.EXTEND:n=r.createExtend(d(n.input),n.variable,d(n.expression));break;case i.types.FILTER:n=r.createFilter(d(n.input),d(n.expression));break;case i.types.FROM:n=r.createFrom(d(n.input),[...n.default],[...n.named]);break;case i.types.GRAPH:n=r.createGraph(d(n.input),n.name);break;case i.types.GROUP:n=r.createGroup(d(n.input),[].concat(n.variables),n.aggregates.map(d));break;case i.types.INV:n=r.createInv(d(n.path));break;case i.types.JOIN:n=r.createJoin(n.input.map(d));break;case i.types.LEFT_JOIN:n=r.createLeftJoin(d(n.input[0]),d(n.input[1]),n.expression?d(n.expression):void 0);break;case i.types.LINK:n=r.createLink(n.iri);break;case i.types.MINUS:n=r.createMinus(d(n.input[0]),d(n.input[1]));break;case i.types.NOP:n=r.createNop();break;case i.types.NPS:n=r.createNps([].concat(n.iris));break;case i.types.ONE_OR_MORE_PATH:n=r.createOneOrMorePath(d(n.path));break;case i.types.ORDER_BY:n=r.createOrderBy(d(n.input),n.expressions.map(d));break;case i.types.PATH:n=r.createPath(n.subject,d(n.predicate),n.object,n.graph);break;case i.types.PATTERN:n=r.createPattern(n.subject,n.predicate,n.object,n.graph);break;case i.types.PROJECT:n=r.createProject(d(n.input),[...n.variables]);break;case i.types.REDUCED:n=r.createReduced(d(n.input));break;case i.types.SEQ:n=r.createSeq(n.input.map(d));break;case i.types.SERVICE:n=r.createService(d(n.input),n.name,n.silent);break;case i.types.SLICE:n=r.createSlice(d(n.input),n.start,n.length);break;case i.types.UNION:n=r.createUnion(n.input.map(d));break;case i.types.VALUES:n=r.createValues([].concat(n.variables),n.bindings.map((e=>Object.assign({},e))));break;case i.types.ZERO_OR_MORE_PATH:n=r.createZeroOrMorePath(d(n.path));break;case i.types.ZERO_OR_ONE_PATH:n=r.createZeroOrOnePath(d(n.path));break;case i.types.COMPOSITE_UPDATE:n=r.createCompositeUpdate(n.updates.map(d));break;case i.types.DELETE_INSERT:n=r.createDeleteInsert(n.delete?n.delete.map(d):void 0,n.insert?n.insert.map(d):void 0,n.where?d(n.where):void 0);break;case i.types.LOAD:n=r.createLoad(n.source,n.destination,n.silent);break;case i.types.CLEAR:n=r.createClear(n.source,n.silent);break;case i.types.CREATE:n=r.createCreate(n.source,n.silent);break;case i.types.DROP:n=r.createDrop(n.source,n.silent);break;case i.types.ADD:n=r.createAdd(n.source,n.destination);break;case i.types.MOVE:n=r.createMove(n.source,n.destination);break;case i.types.COPY:n=r.createCopy(n.source,n.destination);break;default:throw new Error(`Unknown Operation type ${n.type}`)}return l&&(n.metadata=l),n}static mapExpression(e,t,r){let n=e,o=!0;r=r||new a.default;const c=t[e.expressionType];if(c&&({result:n,recurse:o}=c(e,r)),!o)return n;let u=e=>s.mapOperation(e,t,r);switch(e.expressionType){case i.expressionTypes.AGGREGATE:return e.variable?r.createBoundAggregate(e.variable,e.aggregator,u(e.expression),e.distinct,e.separator):r.createAggregateExpression(e.aggregator,u(e.expression),e.distinct,e.separator);case i.expressionTypes.EXISTENCE:return r.createExistenceExpression(e.not,u(e.input));case i.expressionTypes.NAMED:return r.createNamedExpression(e.name,e.args.map(u));case i.expressionTypes.OPERATOR:return r.createOperatorExpression(e.operator,e.args.map(u));case i.expressionTypes.TERM:return r.createTermExpression(e.term);case i.expressionTypes.WILDCARD:return r.createWildcardExpression();default:throw new Error(`Unknown Expression type ${e.expressionType}`)}}static cloneOperation(e){return s.mapOperation(e,{})}static cloneExpression(e){return s.mapExpression(e,{})}static createUniqueVariable(e,t,r){let n=0,i=e;for(;t[i];)i=`${e}${n++}`;return r.variable(i)}static isSimpleTerm(e){return void 0!==e.termType&&"Quad"!==e.termType&&"Wildcard"!==e.termType}static isQuad(e){return"Quad"===e.termType}static hasQuadVariables(e){return(0,o.someTermsNested)(e,(e=>"Variable"===e.termType))}static isWildcard(e){return"Wildcard"===e.termType}}t.default=s},98634:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var o=a(r(33096)),s=r(3379),c=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),l=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),p=new Set(["rt","rp"]),h=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",c],["input",c],["output",c],["button",c],["datalist",c],["textarea",c],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",p],["rp",p],["tbody",l],["tfoot",l]]),f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),y=new Set(["math","svg"]),g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),m=/\s|\//,b=function(){function e(e,t){var r,n,i,a,s,c;void 0===t&&(t={}),this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:this.htmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:this.htmlMode,this.recognizeSelfClosing=null!==(i=t.recognizeSelfClosing)&&void 0!==i?i:!this.htmlMode,this.tokenizer=new(null!==(a=t.Tokenizer)&&void 0!==a?a:o.default)(this.options,this),this.foreignContext=[!this.htmlMode],null===(c=(s=this.cbs).onparserinit)||void 0===c||c.call(s,this)}return e.prototype.ontext=function(e,t){var r,n,i=this.getSlice(e,t);this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,i),this.startIndex=t},e.prototype.ontextentity=function(e,t){var r,n;this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,(0,s.fromCodePoint)(e)),this.startIndex=t},e.prototype.isVoidElement=function(e){return this.htmlMode&&f.has(e)},e.prototype.onopentagname=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)},e.prototype.emitOpenTag=function(e){var t,r,n,i;this.openTagStart=this.startIndex,this.tagname=e;var a=this.htmlMode&&h.get(e);if(a)for(;this.stack.length>0&&a.has(this.stack[0]);){var o=this.stack.shift();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,o,!0)}this.isVoidElement(e)||(this.stack.unshift(e),this.htmlMode&&(y.has(e)?this.foreignContext.unshift(!0):g.has(e)&&this.foreignContext.unshift(!1))),null===(i=(n=this.cbs).onopentagname)||void 0===i||i.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var r,n,i,a,o,s,c,u;this.endIndex=t;var l=this.getSlice(e,t);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),this.htmlMode&&(y.has(l)||g.has(l))&&this.foreignContext.shift(),this.isVoidElement(l))this.htmlMode&&"br"===l&&(null===(a=(i=this.cbs).onopentagname)||void 0===a||a.call(i,"br"),null===(s=(o=this.cbs).onopentag)||void 0===s||s.call(o,"br",{},!0),null===(u=(c=this.cbs).onclosetag)||void 0===u||u.call(c,"br",!1));else{var d=this.stack.indexOf(l);if(-1!==d)for(var p=0;p<=d;p++){var h=this.stack.shift();null===(n=(r=this.cbs).onclosetag)||void 0===n||n.call(r,h,p!==d)}else this.htmlMode&&"p"===l&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[0]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.shift())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,s.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===o.QuoteType.Double?'"':e===o.QuoteType.Single?"'":e===o.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(m),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,i,a,o;this.endIndex=t,null===(i=(n=this.cbs).oncomment)||void 0===i||i.call(n,this.getSlice(e,t-r)),null===(o=(a=this.cbs).oncommentend)||void 0===o||o.call(a),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){var n,i,a,o,s,c,u,l,d,p;this.endIndex=t;var h=this.getSlice(e,t-r);!this.htmlMode||this.options.recognizeCDATA?(null===(i=(n=this.cbs).oncdatastart)||void 0===i||i.call(n),null===(o=(a=this.cbs).ontext)||void 0===o||o.call(a,h),null===(c=(s=this.cbs).oncdataend)||void 0===c||c.call(s)):(null===(l=(u=this.cbs).oncomment)||void 0===l||l.call(u,"[CDATA[".concat(h,"]]")),null===(p=(d=this.cbs).oncommentend)||void 0===p||p.call(d)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=0;r=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var n,i,a,o=r(3379);function s(e){return e===n.Space||e===n.NewLine||e===n.Tab||e===n.FormFeed||e===n.CarriageReturn}function c(e){return e===n.Slash||e===n.Gt||s(e)}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(n||(n={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"}(i||(i={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(a||(t.QuoteType=a={}));var u={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])},l=function(){function e(e,t){var r=e.xmlMode,n=void 0!==r&&r,a=e.decodeEntities,s=void 0===a||a,c=this;this.cbs=t,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=i.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=n,this.decodeEntities=s,this.entityDecoder=new o.EntityDecoder(n?o.xmlDecodeTree:o.htmlDecodeTree,(function(e,t){return c.emitCodePoint(e,t)}))}return e.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===n.Amp&&this.startEntity()},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?c(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===n.Gt||s(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart=n.LowerA&&e<=n.LowerZ||e>=n.UpperA&&e<=n.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=i.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===n.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===n.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode?this.state=i.InTagName:t===u.ScriptEnd[2]?this.state=i.BeforeSpecialS:t===u.TitleEnd[2]?this.state=i.BeforeSpecialT:this.state=i.InTagName}else e===n.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){c(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){s(e)||(e===n.Gt?this.state=i.Text:(this.state=this.isTagStartChar(e)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===n.Gt||s(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===n.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.sectionStart=this.index+1):e===n.Slash?this.state=i.InSelfClosingTag:s(e)||(this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===n.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):s(e)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===n.Eq||c(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=i.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===n.Eq?this.state=i.BeforeAttributeValue:e===n.Slash||e===n.Gt?(this.cbs.onattribend(a.NoValue,this.sectionStart),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):s(e)||(this.cbs.onattribend(a.NoValue,this.sectionStart),this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===n.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):e===n.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):s(e)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===n.DoubleQuote?a.Double:a.Single,this.index+1),this.state=i.BeforeAttributeName):this.decodeEntities&&e===n.Amp&&this.startEntity()},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,n.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,n.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){s(e)||e===n.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===n.Amp&&this.startEntity()},e.prototype.stateBeforeDeclaration=function(e){e===n.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=e===n.Dash?i.BeforeComment:i.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===n.Dash?(this.state=i.InCommentLike,this.currentSequence=u.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===u.ScriptEnd[3]?this.startSpecial(u.ScriptEnd,4):t===u.StyleEnd[3]?this.startSpecial(u.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeSpecialT=function(e){var t=32|e;t===u.TitleEnd[3]?this.startSpecial(u.TitleEnd,4):t===u.TextareaEnd[3]?this.startSpecial(u.TextareaEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.startEntity=function(){this.baseState=this.state,this.state=i.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?o.DecodingMode.Strict:this.baseState===i.Text||this.baseState===i.InSpecialTag?o.DecodingMode.Legacy:o.DecodingMode.Attribute)},e.prototype.stateInEntity=function(){var e=this.entityDecoder.write(this.buffer,this.index-this.offset);e>=0?(this.state=this.baseState,0===e&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==i.InAttributeValueDq&&this.state!==i.InAttributeValueSq&&this.state!==i.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index=e||(this.state===i.InCommentLike?this.currentSequence===u.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===i.InTagName||this.state===i.BeforeAttributeName||this.state===i.BeforeAttributeValue||this.state===i.AfterAttributeName||this.state===i.InAttributeName||this.state===i.InAttributeValueSq||this.state===i.InAttributeValueDq||this.state===i.InAttributeValueNq||this.state===i.InClosingTagName||this.cbs.ontext(this.sectionStart,e))},e.prototype.emitCodePoint=function(e,t){this.baseState!==i.Text&&this.baseState!==i.InSpecialTag?(this.sectionStart{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterator=t.isIterable=t.isSourceExpression=t.isPromise=t.isEventEmitter=t.isFunction=t.range=t.union=t.fromIterable=t.fromIterator=t.fromArray=t.single=t.empty=t.wrap=t.WrappingIterator=t.ClonedIterator=t.UnionIterator=t.MultiTransformIterator=t.SimpleTransformIterator=t.TransformIterator=t.BufferedIterator=t.MappingIterator=t.DESTINATION=t.identity=t.IntegerIterator=t.ArrayIterator=t.SingletonIterator=t.EmptyIterator=t.AsyncIterator=t.DESTROYED=t.ENDED=t.CLOSED=t.CLOSING=t.OPEN=t.INIT=t.setTaskScheduler=t.getTaskScheduler=t.scheduleTask=t.LinkedList=void 0;const n=r(50046),i=r(14241);Object.defineProperty(t,"LinkedList",{enumerable:!0,get:function(){return i.LinkedList}});let a=r(93240).createTaskScheduler();t.scheduleTask=function(e){a(e)},t.getTaskScheduler=function(){return a},t.setTaskScheduler=function(e){a=e},t.INIT=1,t.OPEN=2,t.CLOSING=4,t.CLOSED=8,t.ENDED=16,t.DESTROYED=32;class o extends n.EventEmitter{constructor(e=t.OPEN){super(),this._readable=!1,this._state=e,this.on("newListener",s)}_changeState(e,r=!1){const n=e>this._state&&this._statethis.emit("end"))):this.emit("end"))),n}read(){return null}forEach(e,t){this.on("data",j(e,t))}close(){this._changeState(t.CLOSED)&&this._endAsync()}destroy(e){this.done||this._destroy(e,(t=>{(e=e||t)&&this.emit("error",e),this._end(!0)}))}_destroy(e,t){t()}_end(e=!1){this._changeState(e?t.DESTROYED:t.ENDED)&&(this._readable=!1,this.removeAllListeners("readable"),this.removeAllListeners("data"),this.removeAllListeners("end"))}_endAsync(){a((()=>this._end()))}get readable(){return this._readable}set readable(e){e=Boolean(e)&&!this.done,this._readable!==e&&(this._readable=e,e&&a((()=>this.emit("readable"))))}get closed(){return this._state>=t.CLOSING}get ended(){return this._state===t.ENDED}get destroyed(){return this._state===t.DESTROYED}get done(){return this._state>=t.ENDED}toString(){const e=this._toStringDetails();return`[${this.constructor.name}${e?` ${e}`:""}]`}_toStringDetails(){return""}toArray(e){const t=[],r="number"==typeof(null==e?void 0:e.limit)?e.limit:1/0;return this.ended||r<=0?Promise.resolve(t):new Promise(((e,n)=>{const i=()=>e(t),a=o=>{t.push(o),t.length>=r&&(this.removeListener("error",n),this.removeListener("data",a),this.removeListener("end",i),e(t))};this.on("error",n),this.on("data",a),this.on("end",i)}))}getProperty(e,t){const r=this._properties;if(!t)return r&&r[e];if(r&&e in r)a((()=>t(r[e])));else{let r;(r=this._propertyCallbacks)||(this._propertyCallbacks=r=Object.create(null)),e in r?r[e].push(t):r[e]=[t]}}setProperty(e,t){(this._properties||(this._properties=Object.create(null)))[e]=t;const r=this._propertyCallbacks||{},n=r[e];if(n){for(e in delete r[e],a((()=>{for(const e of n)e(t)})),r)return;delete this._propertyCallbacks}}getProperties(){const e=this._properties,t={};for(const r in e)t[r]=e[r];return t}setProperties(e){for(const t in e)this.setProperty(t,e[t])}copyProperties(e,t){for(const r of t)e.getProperty(r,(e=>this.setProperty(r,e)))}transform(e){return new O(this,e)}map(e,t){return new y(this,j(e,t))}filter(e,t){return this.map((function(r){return e.call(t||this,r)?r:null}))}uniq(e=f){const t=new Set;return this.filter((function(r){const n=e.call(this,r);return!t.has(n)&&(t.add(n),!0)}))}prepend(e){return this.transform({prepend:e})}append(e){return this.transform({append:e})}surround(e,t){return this.transform({prepend:e,append:t})}skip(e){return this.map((t=>e-- >0?null:t))}take(e){return this.transform({limit:e})}range(e,t){return this.transform({offset:e,limit:Math.max(t-e+1,0)})}clone(){return new A(this)}[Symbol.asyncIterator](){const e=this;let t=null,r=null,n=null;function i(){if(null!==t)if(null!==n)a(n);else if(e.done)t({done:!0,value:void 0}),t=r=null,o();else{const n=e.read();null!==n&&(t({done:!1,value:n}),t=r=null)}}function a(e){null!==r?(r(e),t=r=n=null,o()):null===n&&(n=e)}function o(){e.removeListener("readable",i),e.removeListener("end",i),e.removeListener("error",a)}return e.addListener("readable",i),e.addListener("end",i),e.addListener("error",a),{next:()=>new Promise(((e,n)=>{t=e,r=n,i()}))}}}function s(e){"data"===e&&(this.removeListener("newListener",s),u(this,"readable",c),this.readable&&a((()=>c.call(this))))}function c(){let e;for(;0!==this.listenerCount("data")&&null!==(e=this.read());)this.emit("data",e);0!==this.listenerCount("data")||this.done||(this.removeListener("readable",c),u(this,"newListener",s))}function u(e,t,r){e.listeners(t).includes(r)||e.on(t,r)}t.AsyncIterator=o;class l extends o{constructor(){super(),this._changeState(t.ENDED,!0)}}t.EmptyIterator=l;class d extends o{constructor(e){super(),this._item=e,null===e?this.close():this.readable=!0}read(){const e=this._item;return this._item=null,this.close(),e}_toStringDetails(){return null===this._item?"":`(${this._item})`}}t.SingletonIterator=d;class p extends o{constructor(e=[],{autoStart:t=!0,preserve:r=!0}={}){super();const n=r||!Array.isArray(e)?[...e]:e;this._index=0,this._sourceStarted=!1!==t,this._truncateThreshold=r?-1:64,this._sourceStarted&&0===n.length?this.close():this._buffer=n,this.readable=!0}read(){this._sourceStarted||(this._sourceStarted=!0);let e=null;return this._buffer&&(this._index=t&&this.close(),Promise.resolve(i)}}t.ArrayIterator=p;class h extends o{constructor({start:e=0,step:t=1,end:r}={}){super(),Number.isFinite(e)&&(e=Math.trunc(e)),this._next=e,Number.isFinite(t)&&(t=Math.trunc(t)),this._step=t;const n=t>=0,i=n?1/0:-1/0;Number.isFinite(r)?r=Math.trunc(r):r!==-i&&(r=i),this._last=r,!Number.isFinite(e)||(n?e>r:e=0?n>r:nthis._init(r))),this._sourceStarted=!1!==r}get maxBufferSize(){return this._maxBufferSize}set maxBufferSize(e){e!==1/0&&(e=Number.isFinite(e)?Math.max(Math.trunc(e),1):4),this._maxBufferSize!==e&&(this._maxBufferSize=e,this._state===t.OPEN&&this._fillBuffer())}_init(e){let r=!1;this._reading=!0,this._begin((()=>{if(r)throw new Error("done callback called multiple times");r=!0,this._reading=!1,this._changeState(t.OPEN),e?this._fillBufferAsync():this.readable=!0}))}_begin(e){e()}read(){if(this.done)return null;this._sourceStarted||(this._sourceStarted=!0);const e=this._buffer;let t;return e.empty?(t=null,this.readable=!1):t=e.shift(),!this._reading&&e.length0&&(this._pushedCount=0,this._reading=!0,this._read(e,(()=>{if(!e)throw new Error("done callback called multiple times");e=0,this._reading=!1,this.closed?this._completeClose():this._pushedCount&&(this.readable=!0,this._buffer.length{this._reading=!1,this._fillBuffer()})))}close(){this._reading?this._changeState(t.CLOSING):this._completeClose()}_completeClose(){this._changeState(t.CLOSED)&&(this._reading=!0,this._flush((()=>{if(!this._reading)throw new Error("done callback called multiple times");this._reading=!1,this._buffer.empty&&this._endAsync()})))}_destroy(e,t){this._buffer.clear(),t()}_flush(e){e()}_toStringDetails(){const e=this._buffer;return`{${e.empty?"":`next: ${e.first}, `}buffer: ${e.length}}`}}t.BufferedIterator=m;class b extends m{constructor(e,t=e||{}){super(t),this._boundPush=e=>this._push(e),k(e)||(e=t.source),M(e)?this.source=e:e&&(this._createSource=L(e)?()=>e:e,this._sourceStarted&&this._loadSourceAsync()),this._optional=Boolean(t.optional),this._destroySource=!1!==t.destroySource}get source(){return C(this._createSource)&&this._loadSourceAsync(),this._source}set source(e){const r=this._source=this._validateSource(e);r[t.DESTINATION]=this,this.done?this._destroySource&&r.destroy():r.done?this.close():(r.on("end",T),r.on("readable",S),r.on("error",_))}_loadSourceAsync(){C(this._createSource)&&(Promise.resolve(this._createSource()).then((e=>{delete this._createSource,this.source=e,this._fillBuffer()}),(e=>this.emit("error",e))),this._createSource=null)}_validateSource(e,t=!1){if(this._source||void 0!==this._createSource)throw new Error("The source cannot be changed after it has been set");return g(e,t)}_read(e,t){const r=()=>{this._pushedCountthis._readAndTransform(r,t))):t()};this._readAndTransform(r,t)}_readAndTransform(e,t){let r;const n=this.source;!n||n.done||null===(r=n.read())?t():this._optional?this._optionalTransform(r,e):this._transform(r,e,this._boundPush)}_optionalTransform(e,t){const r=this._pushedCount;this._transform(e,(()=>{r===this._pushedCount&&this._push(e),t()}),this._boundPush)}_transform(e,t,r){r(e),t()}_closeWhenDone(){this.close()}_end(e){const r=this._source;r&&(r.removeListener("end",T),r.removeListener("error",_),r.removeListener("readable",S),delete r[t.DESTINATION],this._destroySource&&r.destroy()),super._end(e)}}function v(){this[t.DESTINATION].readable=!0}function _(e){this[t.DESTINATION].emit("error",e)}function w(){this[t.DESTINATION].close()}function T(){this[t.DESTINATION]._closeWhenDone()}function S(){!1!==this[t.DESTINATION]._sourceStarted&&this[t.DESTINATION]._fillBuffer()}t.TransformIterator=b;class O extends b{constructor(e,t){if(super(e,t),this._offset=0,this._limit=1/0,this._filter=e=>!0,t=t||(k(e)?null:e)){const e=C(t)?t:t.transform,{limit:r,offset:n,filter:i,map:a,prepend:o,append:s}=t;n===1/0||r===-1/0?this._limit=0:(Number.isFinite(n)&&(this._offset=Math.max(Math.trunc(n),0)),Number.isFinite(r)&&(this._limit=Math.max(Math.trunc(r),0)),C(i)&&(this._filter=i),C(a)&&(this._map=a),this._transform=C(e)?e:null),o&&(this._prepender=M(o)?o:D(o)),s&&(this._appender=M(s)?s:D(s))}}_read(e,t){const r=()=>this._readAndTransformSimple(e,n,t);function n(){a(r)}this._readAndTransformSimple(e,n,t)}_readAndTransformSimple(e,t,r){let n;const{source:i}=this;if(i&&!i.done){for(0===this._limit&&this.close();!this.closed&&this._pushedCountthis._push(e);!e||e.done?t():(e.on("data",r),e.on("end",(function n(){e.removeListener("data",r),e.removeListener("end",n),t()})))}}t.SimpleTransformIterator=O,t.MultiTransformIterator=class extends b{constructor(e,t){if(super(e,t),this._transformerQueue=[],t){const e=C(t)?t:t.multiTransform;e&&(this._createTransformer=e)}}_read(e,r){const n=this._transformerQueue,i=this._optional;let a,o;for(;(a=n[0])&&a.transformer.done;){i&&null!==a.item&&(e--,this._push(a.item)),n.shift();const{transformer:t}=a;t.removeListener("end",S),t.removeListener("readable",S),t.removeListener("error",_)}const{source:s}=this;for(;s&&!s.done&&n.length0&&null!==(o=t.read());)this._push(o),i&&(a.item=null)}else s&&s.done&&this.close();r()}_createTransformer(e){return new d(e)}_closeWhenDone(){this._transformerQueue.length||this.close()}_end(e){if(super._end(e),this._destroySource)for(const e of this._transformerQueue)e.transformer.destroy()}};class E extends m{constructor(e,t={}){super(t),this._sources=[],this._currentSource=-1;const r=!1!==t.autoStart;if(M(e))e.on("error",(e=>this.emit("error",e))),this._pending={loading:!1,sources:e},r&&this._loadSources();else if(Array.isArray(e)&&e.length>0)for(const t of e)this._addSource(t);else r&&this.close();this._destroySources=!1!==t.destroySources}_loadSources(){const e=this._pending.sources;this._pending.loading=!0,e.done?(delete this._pending,this.close()):(e.on("data",(e=>{this._addSource(e),this._fillBufferAsync()})),e.on("end",(()=>{delete this._pending,this._fillBuffer()})))}_addSource(e){L(e)&&(e=P(e)),e.done||(this._sources.push(e),e[t.DESTINATION]=this,e.on("error",_),e.on("readable",S),e.on("end",x))}_removeEmptySources(){this._sources=this._sources.filter(((e,t)=>(e.done&&t<=this._currentSource&&this._currentSource--,!e.done))),this._fillBuffer()}_read(e,t){var r;!1===(null===(r=this._pending)||void 0===r?void 0:r.loading)&&this._loadSources();let n,i=0;for(;i!==(i=e);)for(let t=0;t0;t++)this._currentSource=(this._currentSource+1)%this._sources.length,null!==(n=this._sources[this._currentSource].read())&&(e--,this._push(n));this._pending||0!==this._sources.length||this.close(),t()}_end(e=!1){if(super._end(e),this._destroySources){for(const e of this._sources)e.destroy();this._pending&&(this._pending.sources.destroy(),delete this._pending)}}}function x(){this[t.DESTINATION]._removeEmptySources()}t.UnionIterator=E;class A extends b{constructor(e){super(e,{autoStart:!1}),this._readPosition=0,this._reading=!1,e&&(this.readable=!0)}_init(){}close(){o.prototype.close.call(this)}get source(){return super.source}set source(e){const r=this._source=this._validateSource(e),n=r&&r[t.DESTINATION]||(r[t.DESTINATION]=new R(r));this.done?this._destroySource&&r.destroy():n.endsAt(0)?this.close():(n.register(this),!1!==r._sourceStarted&&null===n.readAt(0)||(this.readable=!0));const i=this._propertyCallbacks;for(const e in i){const t=i[e];for(const r of t)this._getSourceProperty(e,r)}}_validateSource(e,r=!1){const n=e&&e[t.DESTINATION];return super._validateSource(e,!n||n instanceof R)}getProperty(e,t){const{source:r}=this,n=this._properties,i=n&&e in n;if(!t)return i?n&&n[e]:r&&r.getProperty(e);super.getProperty(e,t),r&&!i&&this._getSourceProperty(e,t)}_getSourceProperty(e,t){this.source.getProperty(e,(r=>{this._properties&&e in this._properties||t(r)}))}getProperties(){const e=this.source?this.source.getProperties():{},t=this._properties;for(const r in t)e[r]=t[r];return e}_toStringDetails(){return`{source: ${this.source?this.source.toString():"none"}}`}read(){this._sourceStarted||(this._sourceStarted=!0);const e=this.source;let r=null;if(!this.done&&e){const n=e[t.DESTINATION];null!==(r=n.readAt(this._readPosition))?this._readPosition++:this.readable=!1,n.endsAt(this._readPosition)&&this.close()}return r}_end(e){const r=this.source,n=null==r?void 0:r[t.DESTINATION];n&&n.unregister(this),m.prototype._end.call(this,e)}}t.ClonedIterator=A;class R{constructor(e){if(this._history=[],this._trackers=new Set,this._source=e,!e.done){const t=()=>{for(const e of this._trackers)e.readable=!0},r=e=>{for(const t of this._trackers)t.emit("error",e)},n=()=>{for(const e of this._trackers)!1!==e._sourceStarted&&e._readPosition===this._history.length&&e.close();this._trackers.clear(),e.removeListener("end",n),e.removeListener("error",r),e.removeListener("readable",t)};e.on("end",n),e.on("error",r),e.on("readable",t)}}register(e){this._source.done||this._trackers.add(e)}unregister(e){this._trackers.delete(e)}readAt(e){let t=null;return e{this._source=null,this.source=e})).catch((e=>this.emit("error",e)))):e&&(this.source=e)}set source(e){let r=e;if(null!==this._source)throw new Error("The source cannot be changed after it has been set");if(F(r)&&(r=r[Symbol.iterator]()),B(r)){let e=r;r=new n.EventEmitter,r.read=()=>{if(null!==e){let t;for(;!(t=e.next()).done;)if(null!==t.value)return t.value;e=null,this.close()}return null}}else r=g(r);this.done?this._destroySource&&C(r.destroy)&&r.destroy():(r[t.DESTINATION]=this,r.on("end",w),r.on("error",_),r.on("readable",v),this._source=r,this.readable=!1!==r.readable)}read(){if(null!==this._source&&!1!==this._source.readable){const e=this._source.read();if(null!==e)return e;this.readable=!1}return null}_end(e=!1){null!==this._source&&(this._source.removeListener("end",w),this._source.removeListener("error",_),this._source.removeListener("readable",v),delete this._source[t.DESTINATION],this._destroySource&&C(this._source.destroy)&&this._source.destroy(),this._source=null),super._end(e)}}function P(e,t){if(t&&("autoStart"in t||"optional"in t||"source"in t||"maxBufferSize"in t))return e&&!M(e)&&(e=new I(e)),new b(e,t);if(!e)return N();if(L(e))return new I(e,t);if(e instanceof o)return e;if(Array.isArray(e))return D(e);if(F(e)||B(e)||M(e))return new I(e,t);throw new TypeError(`Invalid source: ${e}`)}function N(){return new l}function D(e){return new p(e)}function j(e,t){return t?e.bind(t):e}function C(e){return"function"==typeof e}function M(e){return C(null==e?void 0:e.on)}function L(e){return C(null==e?void 0:e.then)}function k(e){return e&&(M(e)||L(e)||C(e))}function F(e){return e&&Symbol.iterator in e}function B(e){return C(null==e?void 0:e.next)}t.WrappingIterator=I,t.wrap=P,t.empty=N,t.single=function(e){return new d(e)},t.fromArray=D,t.fromIterator=function(e){return new I(e)},t.fromIterable=function(e){return new I(e)},t.union=function(e){return new E(e)},t.range=function(e,t,r){return new h({start:e,end:t,step:r})},t.isFunction=C,t.isEventEmitter=M,t.isPromise=L,t.isSourceExpression=k,t.isIterable=F,t.isIterator=B},14241:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedList=void 0,t.LinkedList=class{constructor(){this._length=0,this._head=null,this._tail=null}get length(){return this._length}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}get empty(){return null===this._head}push(e){const t={value:e,next:null};null===this._tail?this._head=this._tail=t:this._tail.next=this._tail=t,this._length++}shift(){if(null===this._head)return;const{value:e,next:t}=this._head;return this._head=t,null===t&&(this._tail=null),this._length--,e}clear(){this._length=0,this._head=this._tail=null}}},93240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTaskScheduler=void 0;const r=Promise.resolve(void 0);t.createTaskScheduler=function(){const e="function"==typeof queueMicrotask?queueMicrotask:e=>r.then(e),t="function"==typeof setImmediate?setImmediate:e=>setTimeout(e,0);let n=0,i=null;return r=>{null!==i?i.push(r):++n<100?e(r):(i=[r],t((()=>{for(const t of i)e(t);i=null,n=0})))}}},35069:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=void 0;const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,n=new Set,i="object"==typeof process&&process?process:{},a=(e,t,r,n)=>{"function"==typeof i.emitWarning?i.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)};let o=globalThis.AbortController,s=globalThis.AbortSignal;if(void 0===o){s=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},o=class{constructor(){t()}signal=new s;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(const t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==i.env?.LRU_CACHE_IGNORE_AC_WARNING;const t=()=>{e&&(e=!1,a("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}Symbol("type");const c=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),u=e=>c(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?l:null:null;class l extends Array{constructor(e){super(e),this.fill(0)}}class d{heap;length;static#e=!1;static create(e){const t=u(e);if(!t)return[];d.#e=!0;const r=new d(e,t);return d.#e=!1,r}constructor(e,t){if(!d.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class p{#t;#r;#n;#i;#a;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#s;#c;#u;#l;#d;#p;#h;#f;#y;#g;#m;#b;#v;#_;#w;#T;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#v,sizes:e.#m,keyMap:e.#c,keyList:e.#u,valList:e.#l,next:e.#d,prev:e.#p,get head(){return e.#h},get tail(){return e.#f},free:e.#y,isBackgroundFetch:t=>e.#S(t),backgroundFetch:(t,r,n,i)=>e.#O(t,r,n,i),moveToTail:t=>e.#E(t),indexes:t=>e.#x(t),rindexes:t=>e.#A(t),isStale:t=>e.#R(t)}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#s}get size(){return this.#o}get fetchMethod(){return this.#a}get dispose(){return this.#n}get disposeAfter(){return this.#i}constructor(e){const{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:l,allowStale:h,dispose:f,disposeAfter:y,noDisposeOnSet:g,noUpdateTTL:m,maxSize:b=0,maxEntrySize:v=0,sizeCalculation:_,fetchMethod:w,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:O,allowStaleOnFetchAbort:E,ignoreFetchAbort:x}=e;if(0!==t&&!c(t))throw new TypeError("max option must be a nonnegative integer");const A=t?u(t):Array;if(!A)throw new Error("invalid max value: "+t);if(this.#t=t,this.#r=b,this.maxEntrySize=v||this.#r,this.sizeCalculation=_,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==w&&"function"!=typeof w)throw new TypeError("fetchMethod must be a function if specified");if(this.#a=w,this.#w=!!w,this.#c=new Map,this.#u=new Array(t).fill(void 0),this.#l=new Array(t).fill(void 0),this.#d=new A(t),this.#p=new A(t),this.#h=0,this.#f=0,this.#y=d.create(t),this.#o=0,this.#s=0,"function"==typeof f&&(this.#n=f),"function"==typeof y?(this.#i=y,this.#g=[]):(this.#i=void 0,this.#g=void 0),this.#_=!!this.#n,this.#T=!!this.#i,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!O,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!x,0!==this.maxEntrySize){if(0!==this.#r&&!c(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!c(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!l,this.ttlResolution=c(i)||0===i?i:1,this.ttlAutopurge=!!o,this.ttl=r||0,this.ttl){if(!c(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(0===this.#t&&0===this.ttl&&0===this.#r)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){const e="LRU_CACHE_UNBOUNDED";(e=>!n.has(e))(e)&&(n.add(e),a("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,p))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#P(){const e=new l(this.#t),t=new l(this.#t);this.#v=e,this.#b=t,this.#N=(n,i,a=r.now())=>{if(t[n]=0!==i?a:0,e[n]=i,0!==i&&this.ttlAutopurge){const e=setTimeout((()=>{this.#R(n)&&this.delete(this.#u[n])}),i+1);e.unref&&e.unref()}},this.#D=n=>{t[n]=0!==e[n]?r.now():0},this.#j=(r,a)=>{if(e[a]){const o=e[a],s=t[a];if(!o||!s)return;r.ttl=o,r.start=s,r.now=n||i();const c=r.now-s;r.remainingTTL=o-c}};let n=0;const i=()=>{const e=r.now();if(this.ttlResolution>0){n=e;const t=setTimeout((()=>n=0),this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=r=>{const a=this.#c.get(r);if(void 0===a)return 0;const o=e[a],s=t[a];return o&&s?o-((n||i())-s):1/0},this.#R=r=>{const a=t[r],o=e[r];return!!o&&!!a&&(n||i())-a>o}}#D=()=>{};#j=()=>{};#N=()=>{};#R=()=>!1;#I(){const e=new l(this.#t);this.#s=0,this.#m=e,this.#C=t=>{this.#s-=e[t],e[t]=0},this.#M=(e,t,r,n)=>{if(this.#S(t))return 0;if(!c(r)){if(!n)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(r=n(t,e),!c(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.#L=(t,r,n)=>{if(e[t]=r,this.#r){const r=this.#r-e[t];for(;this.#s>r;)this.#k(!0)}this.#s+=e[t],n&&(n.entrySize=r,n.totalCalculatedSize=this.#s)}}#C=e=>{};#L=(e,t,r)=>{};#M=(e,t,r,n)=>{if(r||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#x({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#f;this.#F(t)&&(!e&&this.#R(t)||(yield t),t!==this.#h);)t=this.#p[t]}*#A({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#h;this.#F(t)&&(!e&&this.#R(t)||(yield t),t!==this.#f);)t=this.#d[t]}#F(e){return void 0!==e&&this.#c.get(this.#u[e])===e}*entries(){for(const e of this.#x())void 0===this.#l[e]||void 0===this.#u[e]||this.#S(this.#l[e])||(yield[this.#u[e],this.#l[e]])}*rentries(){for(const e of this.#A())void 0===this.#l[e]||void 0===this.#u[e]||this.#S(this.#l[e])||(yield[this.#u[e],this.#l[e]])}*keys(){for(const e of this.#x()){const t=this.#u[e];void 0===t||this.#S(this.#l[e])||(yield t)}}*rkeys(){for(const e of this.#A()){const t=this.#u[e];void 0===t||this.#S(this.#l[e])||(yield t)}}*values(){for(const e of this.#x())void 0===this.#l[e]||this.#S(this.#l[e])||(yield this.#l[e])}*rvalues(){for(const e of this.#A())void 0===this.#l[e]||this.#S(this.#l[e])||(yield this.#l[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const r of this.#x()){const n=this.#l[r],i=this.#S(n)?n.__staleWhileFetching:n;if(void 0!==i&&e(i,this.#u[r],this))return this.get(this.#u[r],t)}}forEach(e,t=this){for(const r of this.#x()){const n=this.#l[r],i=this.#S(n)?n.__staleWhileFetching:n;void 0!==i&&e.call(t,i,this.#u[r],this)}}rforEach(e,t=this){for(const r of this.#A()){const n=this.#l[r],i=this.#S(n)?n.__staleWhileFetching:n;void 0!==i&&e.call(t,i,this.#u[r],this)}}purgeStale(){let e=!1;for(const t of this.#A({allowStale:!0}))this.#R(t)&&(this.delete(this.#u[t]),e=!0);return e}info(e){const t=this.#c.get(e);if(void 0===t)return;const n=this.#l[t],i=this.#S(n)?n.__staleWhileFetching:n;if(void 0===i)return;const a={value:i};if(this.#v&&this.#b){const e=this.#v[t],n=this.#b[t];if(e&&n){const t=e-(r.now()-n);a.ttl=t,a.start=Date.now()}}return this.#m&&(a.size=this.#m[t]),a}dump(){const e=[];for(const t of this.#x({allowStale:!0})){const n=this.#u[t],i=this.#l[t],a=this.#S(i)?i.__staleWhileFetching:i;if(void 0===a||void 0===n)continue;const o={value:a};if(this.#v&&this.#b){o.ttl=this.#v[t];const e=r.now()-this.#b[t];o.start=Math.floor(Date.now()-e)}this.#m&&(o.size=this.#m[t]),e.unshift([n,o])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}set(e,t,r={}){if(void 0===t)return this.delete(e),this;const{ttl:n=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=r;let{noUpdateTTL:c=this.noUpdateTTL}=r;const u=this.#M(e,t,r.size||0,o);if(this.maxEntrySize&&u>this.maxEntrySize)return s&&(s.set="miss",s.maxEntrySizeExceeded=!0),this.delete(e),this;let l=0===this.#o?void 0:this.#c.get(e);if(void 0===l)l=0===this.#o?this.#f:0!==this.#y.length?this.#y.pop():this.#o===this.#t?this.#k(!1):this.#o,this.#u[l]=e,this.#l[l]=t,this.#c.set(e,l),this.#d[this.#f]=l,this.#p[l]=this.#f,this.#f=l,this.#o++,this.#L(l,u,s),s&&(s.set="add"),c=!1;else{this.#E(l);const r=this.#l[l];if(t!==r){if(this.#w&&this.#S(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=r;void 0===t||a||(this.#_&&this.#n?.(t,e,"set"),this.#T&&this.#g?.push([t,e,"set"]))}else a||(this.#_&&this.#n?.(r,e,"set"),this.#T&&this.#g?.push([r,e,"set"]));if(this.#C(l),this.#L(l,u,s),this.#l[l]=t,s){s.set="replace";const e=r&&this.#S(r)?r.__staleWhileFetching:r;void 0!==e&&(s.oldValue=e)}}else s&&(s.set="update")}if(0===n||this.#v||this.#P(),this.#v&&(c||this.#N(l,n,i),s&&this.#j(s,l)),!a&&this.#T&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}return this}pop(){try{for(;this.#o;){const e=this.#l[this.#h];if(this.#k(!0),this.#S(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#T&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}}}#k(e){const t=this.#h,r=this.#u[t],n=this.#l[t];return this.#w&&this.#S(n)?n.__abortController.abort(new Error("evicted")):(this.#_||this.#T)&&(this.#_&&this.#n?.(n,r,"evict"),this.#T&&this.#g?.push([n,r,"evict"])),this.#C(t),e&&(this.#u[t]=void 0,this.#l[t]=void 0,this.#y.push(t)),1===this.#o?(this.#h=this.#f=0,this.#y.length=0):this.#h=this.#d[t],this.#c.delete(r),this.#o--,t}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:n}=t,i=this.#c.get(e);if(void 0!==i){const e=this.#l[i];if(this.#S(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#R(i))return r&&this.#D(i),n&&(n.has="hit",this.#j(n,i)),!0;n&&(n.has="stale",this.#j(n,i))}else n&&(n.has="miss");return!1}peek(e,t={}){const{allowStale:r=this.allowStale}=t,n=this.#c.get(e);if(void 0===n||!r&&this.#R(n))return;const i=this.#l[n];return this.#S(i)?i.__staleWhileFetching:i}#O(e,t,r,n){const i=void 0===t?void 0:this.#l[t];if(this.#S(i))return i;const a=new o,{signal:s}=r;s?.addEventListener("abort",(()=>a.abort(s.reason)),{signal:a.signal});const c={signal:a.signal,options:r,context:n},u=(n,i=!1)=>{const{aborted:o}=a.signal,s=r.ignoreFetchAbort&&void 0!==n;if(r.status&&(o&&!i?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,s&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),o&&!s&&!i)return l(a.signal.reason);const u=d;return this.#l[t]===d&&(void 0===n?u.__staleWhileFetching?this.#l[t]=u.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,n,c.options))),n},l=n=>{const{aborted:i}=a.signal,o=i&&r.allowStaleOnFetchAbort,s=o||r.allowStaleOnFetchRejection,c=s||r.noDeleteOnFetchRejection,u=d;if(this.#l[t]===d&&(c&&void 0!==u.__staleWhileFetching?o||(this.#l[t]=u.__staleWhileFetching):this.delete(e)),s)return r.status&&void 0!==u.__staleWhileFetching&&(r.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw n};r.status&&(r.status.fetchDispatched=!0);const d=new Promise(((t,n)=>{const o=this.#a?.(e,i,c);o&&o instanceof Promise&&o.then((e=>t(void 0===e?void 0:e)),n),a.signal.addEventListener("abort",(()=>{r.ignoreFetchAbort&&!r.allowStaleOnFetchAbort||(t(void 0),r.allowStaleOnFetchAbort&&(t=e=>u(e,!0)))}))})).then(u,(e=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=e),l(e)))),p=Object.assign(d,{__abortController:a,__staleWhileFetching:i,__returned:void 0});return void 0===t?(this.set(e,p,{...c.options,status:void 0}),t=this.#c.get(e)):this.#l[t]=p,p}#S(e){if(!this.#w)return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof o}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:h=this.allowStaleOnFetchAbort,context:f,forceRefresh:y=!1,status:g,signal:m}=t;if(!this.#w)return g&&(g.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,status:g});const b={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:u,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:h,ignoreFetchAbort:p,status:g,signal:m};let v=this.#c.get(e);if(void 0===v){g&&(g.fetch="miss");const t=this.#O(e,v,b,f);return t.__returned=t}{const t=this.#l[v];if(this.#S(t)){const e=r&&void 0!==t.__staleWhileFetching;return g&&(g.fetch="inflight",e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}const i=this.#R(v);if(!y&&!i)return g&&(g.fetch="hit"),this.#E(v),n&&this.#D(v),g&&this.#j(g,v),t;const a=this.#O(e,v,b,f),o=void 0!==a.__staleWhileFetching&&r;return g&&(g.fetch=i?"stale":"refresh",o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#c.get(e);if(void 0!==o){const t=this.#l[o],s=this.#S(t);return a&&this.#j(a,o),this.#R(o)?(a&&(a.get="stale"),s?(a&&r&&void 0!==t.__staleWhileFetching&&(a.returnedStale=!0),r?t.__staleWhileFetching:void 0):(i||this.delete(e),a&&r&&(a.returnedStale=!0),r?t:void 0)):(a&&(a.get="hit"),s?t.__staleWhileFetching:(this.#E(o),n&&this.#D(o),t))}a&&(a.get="miss")}#B(e,t){this.#p[t]=e,this.#d[e]=t}#E(e){e!==this.#f&&(e===this.#h?this.#h=this.#d[e]:this.#B(this.#p[e],this.#d[e]),this.#B(this.#f,e),this.#f=e)}delete(e){let t=!1;if(0!==this.#o){const r=this.#c.get(e);if(void 0!==r)if(t=!0,1===this.#o)this.clear();else{this.#C(r);const t=this.#l[r];if(this.#S(t)?t.__abortController.abort(new Error("deleted")):(this.#_||this.#T)&&(this.#_&&this.#n?.(t,e,"delete"),this.#T&&this.#g?.push([t,e,"delete"])),this.#c.delete(e),this.#u[r]=void 0,this.#l[r]=void 0,r===this.#f)this.#f=this.#p[r];else if(r===this.#h)this.#h=this.#d[r];else{const e=this.#p[r];this.#d[e]=this.#d[r];const t=this.#d[r];this.#p[t]=this.#p[r]}this.#o--,this.#y.push(r)}}if(this.#T&&this.#g?.length){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}return t}clear(){for(const e of this.#A({allowStale:!0})){const t=this.#l[e];if(this.#S(t))t.__abortController.abort(new Error("deleted"));else{const r=this.#u[e];this.#_&&this.#n?.(t,r,"delete"),this.#T&&this.#g?.push([t,r,"delete"])}}if(this.#c.clear(),this.#l.fill(void 0),this.#u.fill(void 0),this.#v&&this.#b&&(this.#v.fill(0),this.#b.fill(0)),this.#m&&this.#m.fill(0),this.#h=0,this.#f=0,this.#y.length=0,this.#s=0,this.#o=0,this.#T&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}}}t.LRUCache=p},12037:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readableFromWeb=t.ReadableFromWeb=void 0;const n=r(58521);class i extends n.Readable{constructor(e,t){super(t),this.reader=e.getReader(),this.readerClosed=!1,this.reader.closed.then((()=>{this.readerClosed=!0})).catch((e=>{this.readerClosed=!0,this.destroy(e)}))}_read(){this.reader.read().then((e=>this.push(e.done?null:e.value))).catch((e=>this.destroy(e)))}destroy(e){return this.readerClosed||this.reader.cancel(e).then().catch((()=>{})),super.destroy(e)}}t.ReadableFromWeb=i,t.readableFromWeb=function(e,t){return new i(e,t)}},33523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readableFromWeb=void 0;var n=r(12037);Object.defineProperty(t,"readableFromWeb",{enumerable:!0,get:function(){return n.readableFromWeb}})},94066:e=>{"use strict";e.exports=JSON.parse('{"http://schema.org/":{"properties":{"additionalType":{"subPropertyOf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}}},"http://microformats.org/profile/hcard":{}}')},45497:e=>{"use strict";e.exports=JSON.parse('{"@context":{"alternate":"http://www.w3.org/1999/xhtml/vocab#alternate","appendix":"http://www.w3.org/1999/xhtml/vocab#appendix","cite":"http://www.w3.org/1999/xhtml/vocab#cite","bookmark":"http://www.w3.org/1999/xhtml/vocab#bookmark","contents":"http://www.w3.org/1999/xhtml/vocab#contents","chapter":"http://www.w3.org/1999/xhtml/vocab#chapter","copyright":"http://www.w3.org/1999/xhtml/vocab#copyright","first":"http://www.w3.org/1999/xhtml/vocab#first","glossary":"http://www.w3.org/1999/xhtml/vocab#glossary","help":"http://www.w3.org/1999/xhtml/vocab#help","icon":"http://www.w3.org/1999/xhtml/vocab#icon","index":"http://www.w3.org/1999/xhtml/vocab#index","last":"http://www.w3.org/1999/xhtml/vocab#last","license":"http://www.w3.org/1999/xhtml/vocab#license","meta":"http://www.w3.org/1999/xhtml/vocab#meta","next":"http://www.w3.org/1999/xhtml/vocab#next","prev":"http://www.w3.org/1999/xhtml/vocab#prev","previous":"http://www.w3.org/1999/xhtml/vocab#previous","section":"http://www.w3.org/1999/xhtml/vocab#section","start":"http://www.w3.org/1999/xhtml/vocab#start","stylesheet":"http://www.w3.org/1999/xhtml/vocab#stylesheet","subsection":"http://www.w3.org/1999/xhtml/vocab#subsection","top":"http://www.w3.org/1999/xhtml/vocab#top","up":"http://www.w3.org/1999/xhtml/vocab#up","p3pv1":"http://www.w3.org/1999/xhtml/vocab#p3pv1"}}')},68713:e=>{"use strict";e.exports=JSON.parse('{"@context":{"as":"https://www.w3.org/ns/activitystreams#","cat":"http://www.w3.org/ns/dcat#","cc":"http://creativecommons.org/ns#","cnt":"http://www.w3.org/2008/content#","csvw":"http://www.w3.org/ns/csvw#","ctag":"http://commontag.org/ns#","dc":"http://purl.org/dc/terms/","dc11":"http://purl.org/dc/elements/1.1/","dcat":"http://www.w3.org/ns/dcat#","dcterms":"http://purl.org/dc/terms/","dqv":"http://www.w3.org/ns/dqv#","duv":"https://www.w3.org/TR/vocab-duv#","earl":"http://www.w3.org/ns/earl#","foaf":"http://xmlns.com/foaf/0.1/","gldp":"http://www.w3.org/ns/people#","gr":"http://purl.org/goodrelations/v1#","grddl":"http://www.w3.org/2003/g/data-view#","ht":"http://www.w3.org/2006/http#","ical":"http://www.w3.org/2002/12/cal/icaltzd#","ldp":"http://www.w3.org/ns/ldp#","ma":"http://www.w3.org/ns/ma-ont#","oa":"http://www.w3.org/ns/oa#","odrl":"http://www.w3.org/ns/odrl/2/","og":"http://ogp.me/ns#","org":"http://www.w3.org/ns/org#","owl":"http://www.w3.org/2002/07/owl#","prov":"http://www.w3.org/ns/prov#","ptr":"http://www.w3.org/2009/pointers#","qb":"http://purl.org/linked-data/cube#","rev":"http://purl.org/stuff/rev#","rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","rdfa":"http://www.w3.org/ns/rdfa#","rdfs":"http://www.w3.org/2000/01/rdf-schema#","rif":"http://www.w3.org/2007/rif#","rr":"http://www.w3.org/ns/r2rml#","schema":"http://schema.org/","sd":"http://www.w3.org/ns/sparql-service-description#","sioc":"http://rdfs.org/sioc/ns#","skos":"http://www.w3.org/2004/02/skos/core#","skosxl":"http://www.w3.org/2008/05/skos-xl#","ssn":"http://www.w3.org/ns/ssn/","sosa":"http://www.w3.org/ns/sosa/","time":"http://www.w3.org/2006/time#","v":"http://rdf.data-vocabulary.org/#","vcard":"http://www.w3.org/2006/vcard/ns#","void":"http://rdfs.org/ns/void#","wdr":"http://www.w3.org/2007/05/powder#","wdrs":"http://www.w3.org/2007/05/powder-s#","xhv":"http://www.w3.org/1999/xhtml/vocab#","xml":"http://www.w3.org/XML/1998/namespace","xsd":"http://www.w3.org/2001/XMLSchema#","describedby":"http://www.w3.org/2007/05/powder-s#describedby","license":"http://www.w3.org/1999/xhtml/vocab#license","role":"http://www.w3.org/1999/xhtml/vocab#role"}}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(90128);Comunica=n})(); +var Comunica;(()=>{var e={36885:(e,t,r)=>{var{Buffer:n}=r(1048),a={},o=a.LEFT_BRACE=1,s=a.RIGHT_BRACE=2,c=a.LEFT_BRACKET=3,u=a.RIGHT_BRACKET=4,l=a.COLON=5,d=a.COMMA=6,p=a.TRUE=7,h=a.FALSE=8,f=a.NULL=9,y=a.STRING=10,g=a.NUMBER=11,m=a.START=17,b=a.STOP=18,v=a.TRUE1=33,_=a.TRUE2=34,w=a.TRUE3=35,T=a.FALSE1=49,S=a.FALSE2=50,O=a.FALSE3=51,E=a.FALSE4=52,x=a.NULL1=65,A=a.NULL2=66,R=a.NULL3=67,I=a.NUMBER1=81,P=a.NUMBER3=83,N=a.STRING1=97,D=a.STRING2=98,j=a.STRING3=99,C=a.STRING4=100,M=a.STRING5=101,L=a.STRING6=102,k=a.VALUE=113,F=a.KEY=114,B=a.OBJECT=129,U=a.ARRAY=130,q="\\".charCodeAt(0),V="/".charCodeAt(0),Q="\b".charCodeAt(0),$="\f".charCodeAt(0),H="\n".charCodeAt(0),G="\r".charCodeAt(0),z="\t".charCodeAt(0),K=65536;function X(e){return n.alloc?n.alloc(e):new n(e)}function J(){this.tState=m,this.value=void 0,this.string=void 0,this.stringBuffer=X(K),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=k,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:X(2),3:X(3),4:X(4)},this.offset=-1}J.toknam=function(e){for(var t=Object.keys(a),r=0,n=t.length;r=K&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=e},W.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>K&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),e.copy(this.stringBuffer,this.stringBufferOffset,t,r),this.stringBufferOffset+=n},W.write=function(e){var t;"string"==typeof e&&(e=new n(e));for(var r=0,i=e.length;r=48&&t<64)this.string=String.fromCharCode(t),this.tState=P;else if(32!==t&&9!==t&&10!==t&&13!==t)return this.charError(e,r)}else if(this.tState===N)if(t=e[r],this.bytes_remaining>0){for(var a=0;a=128){if(t<=193||t>244)return this.onError(new Error("Invalid UTF-8 character at position "+r+" in state "+J.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+r>e.length){for(var g=0;g<=e.length-1-r;g++)this.temp_buffs[this.bytes_in_sequence][g]=e[r+g];this.bytes_remaining=r+this.bytes_in_sequence-e.length,r=e.length-1}else this.appendStringBuf(e,r,r+this.bytes_in_sequence),r=r+this.bytes_in_sequence-1}else if(34===t)this.tState=m,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(y,this.string),this.offset+=n.byteLength(this.string,"utf8")+1,this.string=void 0;else if(92===t)this.tState=D;else{if(!(t>=32))return this.charError(e,r);this.appendStringChar(t)}else if(this.tState===D)if(34===(t=e[r]))this.appendStringChar(t),this.tState=N;else if(92===t)this.appendStringChar(q),this.tState=N;else if(47===t)this.appendStringChar(V),this.tState=N;else if(98===t)this.appendStringChar(Q),this.tState=N;else if(102===t)this.appendStringChar($),this.tState=N;else if(110===t)this.appendStringChar(H),this.tState=N;else if(114===t)this.appendStringChar(G),this.tState=N;else if(116===t)this.appendStringChar(z),this.tState=N;else{if(117!==t)return this.charError(e,r);this.unicode="",this.tState=j}else if(this.tState===j||this.tState===C||this.tState===M||this.tState===L){if(!((t=e[r])>=48&&t<64||t>64&&t<=70||t>96&&t<=102))return this.charError(e,r);if(this.unicode+=String.fromCharCode(t),this.tState++===L){var b=parseInt(this.unicode,16);this.unicode=void 0,void 0!==this.highSurrogate&&b>=56320&&b<57344?(this.appendStringBuf(new n(String.fromCharCode(this.highSurrogate,b))),this.highSurrogate=void 0):void 0===this.highSurrogate&&b>=55296&&b<56320?this.highSurrogate=b:(void 0!==this.highSurrogate&&(this.appendStringBuf(new n(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new n(String.fromCharCode(b)))),this.tState=N}}else if(this.tState===I||this.tState===P)switch(t=e[r]){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=P;break;default:this.tState=m;var k=this.numberReviver(this.string);if(k)return k;this.offset+=this.string.length-1,this.string=void 0,r--}else if(this.tState===v){if(114!==e[r])return this.charError(e,r);this.tState=_}else if(this.tState===_){if(117!==e[r])return this.charError(e,r);this.tState=w}else if(this.tState===w){if(101!==e[r])return this.charError(e,r);this.tState=m,this.onToken(p,!0),this.offset+=3}else if(this.tState===T){if(97!==e[r])return this.charError(e,r);this.tState=S}else if(this.tState===S){if(108!==e[r])return this.charError(e,r);this.tState=O}else if(this.tState===O){if(115!==e[r])return this.charError(e,r);this.tState=E}else if(this.tState===E){if(101!==e[r])return this.charError(e,r);this.tState=m,this.onToken(h,!1),this.offset+=4}else if(this.tState===x){if(117!==e[r])return this.charError(e,r);this.tState=A}else if(this.tState===A){if(108!==e[r])return this.charError(e,r);this.tState=R}else if(this.tState===R){if(108!==e[r])return this.charError(e,r);this.tState=m,this.onToken(f,null),this.offset+=3}},W.onToken=function(e,t){},W.parseError=function(e,t){this.tState=b,this.onError(new Error("Unexpected "+J.toknam(e)+(t?"("+JSON.stringify(t)+")":"")+" in state "+J.toknam(this.state)))},W.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})},W.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=k)},W.emit=function(e){this.mode&&(this.state=d),this.onValue(e)},W.onValue=function(e){},W.onToken=function(e,t){if(this.state===k)if(e===y||e===g||e===p||e===h||e===f)this.value&&(this.value[this.key]=t),this.emit(t);else if(e===o)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=F,this.mode=B;else if(e===c)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=U,this.state=k;else if(e===s){if(this.mode!==B)return this.parseError(e,t);this.pop()}else{if(e!==u)return this.parseError(e,t);if(this.mode!==U)return this.parseError(e,t);this.pop()}else if(this.state===F)if(e===y)this.key=t,this.state=l;else{if(e!==s)return this.parseError(e,t);this.pop()}else if(this.state===l){if(e!==l)return this.parseError(e,t);this.state=k}else{if(this.state!==d)return this.parseError(e,t);if(e===d)this.mode===U?(this.key++,this.state=k):this.mode===B&&(this.state=F);else{if(!(e===u&&this.mode===U||e===s&&this.mode===B))return this.parseError(e,t);this.pop()}}},W.numberReviver=function(e){var t=Number(e);if(isNaN(t))return this.charError(buffer,i);e.match(/[0-9]+/)==e&&t.toString()!=e?this.onToken(y,e):this.onToken(g,t)},J.C=a,e.exports=J},64265:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fragment=void 0,t.fragment=function(e){let t=function(e){let t=e;(t.endsWith("/")||t.endsWith("#"))&&(t=t.slice(0,t.length-1));const r=[];t.lastIndexOf("/")>0&&r.push(t.lastIndexOf("/")),t.lastIndexOf("#")>0&&r.push(t.lastIndexOf("#"));const n=Math.max(...r);return t.slice(n+1)}(e);return t=t?function(e){var t;const r=null===(t=e.split(/[^a-z0-9]+/gi).filter((e=>""!==e)).map((e=>e[0].toUpperCase()+e.slice(1))).join("").match(/[a-z][a-z0-9]+/gi))||void 0===t?void 0:t[0];return void 0===r?void 0:r[0].toLowerCase()+r.slice(1)}(t):void 0,t||"v"}},37669:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupAllPrefixes=t.prefixToUri=t.uriToPrefix=void 0;const i=r(64265),a=r(30376);t.uriToPrefix=function(e,t){return n(this,void 0,void 0,(function*(){let r;try{r=yield(0,a.lookupPrefix)(e,t)}catch(n){(null==t?void 0:t.mintOnUnknown)&&(r=(0,i.fragment)(e).slice(0,4))}if(void 0!==r&&"object"==typeof(null==t?void 0:t.existingPrefixes)&&r in t.existingPrefixes){let e=0;for(;`${r}${e}`in t.existingPrefixes;)e+=1;r=`${r}${e}`}return r}))},t.prefixToUri=function(e,t){return n(this,void 0,void 0,(function*(){try{return yield(0,a.lookupUri)(e,t)}catch(e){return}}))};var o=r(30376);Object.defineProperty(t,"lookupAllPrefixes",{enumerable:!0,get:function(){return o.lookupAllPrefixes}})},87173:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchContext=t.fetchJson=void 0;const i=r(99766);function a(e,t){var r;return n(this,void 0,void 0,(function*(){const n=null!==(r=null==t?void 0:t.fetch)&&void 0!==r?r:i.fetch;return(yield n(e)).json()}))}t.fetchJson=a,t.fetchContext=function(e,t){return n(this,void 0,void 0,(function*(){return(yield a(e,t))["@context"]}))}},30376:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(12257),t),i(r(39268),t),i(r(91661),t)},91661:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupAllPrefixes=void 0;const i=r(87173);t.lookupAllPrefixes=function(e){return n(this,void 0,void 0,(function*(){return(0,i.fetchContext)("https://prefix.cc/context",e)}))}},12257:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupUri=void 0;const i=r(87173);t.lookupUri=function(e,t){return n(this,void 0,void 0,(function*(){const r=(yield(0,i.fetchContext)(`https://prefix.cc/${e}.file.jsonld`,t))[e];if("string"!=typeof r)throw new Error(`Expected uri to be a string, received: ${r} of type ${typeof r}`);return r}))}},39268:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupPrefix=void 0;const i=r(87173);t.lookupPrefix=function(e,t){return n(this,void 0,void 0,(function*(){const r=new URL("https://prefix.cc/reverse");r.searchParams.append("uri",e),r.searchParams.append("format","jsonld");const n=Object.keys(yield(0,i.fetchContext)(r,t));if(0===n.length)throw new Error("No prefixes returned");return n[0]}))}},99766: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}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(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 d(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 p(e){this.map={},e instanceof p?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 h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=f(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 m(){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:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(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=h(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?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,r,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),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-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 _(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 w(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 p(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];w.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new w(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,a){var o=new v(e,r);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new p,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 s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=p,e.Request=v,e.Response=w),t.Headers=p,t.Request=v,t.Response=w,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},31759:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=function(e){return n(this,void 0,void 0,(function*(){let t="";return e.on("data",(e=>{t+=e})),yield(0,i.promisifyEventEmitter)(e),t}))};const i=r(35033)},49126:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SaxesParser=t.EVENTS=void 0;const n=r(94824),i=r(30718),a=r(26457);var o=n.isS,s=n.isChar,c=n.isNameStartChar,u=n.isNameChar,l=n.S_LIST,d=n.NAME_RE,p=i.isChar,h=a.isNCNameStartChar,f=a.isNCNameChar,y=a.NC_NAME_RE;const g="http://www.w3.org/XML/1998/namespace",m="http://www.w3.org/2000/xmlns/",b={__proto__:null,xml:g,xmlns:m},v={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},_=-1,w=-2,T=13,S=33,O=10,E=60,x=61,A=62,R=63,I=93,P=e=>34===e||39===e,N=[34,39],D=[...N,91,A],j=[...N,E,I],C=[x,R,...l],M=[...l,A,38,E];function L(e,t,r){switch(t){case"xml":r!==g&&e.fail(`xml prefix must be bound to ${g}.`);break;case"xmlns":r!==m&&e.fail(`xmlns prefix must be bound to ${m}.`)}switch(r){case m:e.fail(""===t?`the default namespace may not be set to ${r}.`:`may not assign a prefix (even "xmlns") to the URI ${m}.`);break;case g:switch(t){case"xml":break;case"":e.fail(`the default namespace may not be set to ${r}.`);break;default:e.fail("may not assign the xml namespace to another prefix.")}}}const k=e=>y.test(e),F=e=>d.test(e);t.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const B={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};t.SaxesParser=class{get closed(){return this._closed}constructor(e){this.opt=null!=e?e:{},this.fragmentOpt=!!this.opt.fragment;const t=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,t){this.nameStartCheck=h,this.nameCheck=f,this.isName=k,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},b);const e=this.opt.additionalNamespaces;null!=e&&(function(e,t){for(const r of Object.keys(t))L(e,r,t[r])}(this,e),Object.assign(this.ns,e))}else this.nameStartCheck=c,this.nameCheck=u,this.isName=F,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}_init(){var e;this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];const{fragmentOpt:t}=this;this.state=t?T:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:r}=this.opt;if(void 0===r){if(!0===this.opt.forceXMLVersion)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");r="1.0"}this.setXMLVersion(r),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(v),null===(e=this.readyHandler)||void 0===e||e.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,t){this[B[e]]=t}off(e){this[B[e]]=void 0}makeError(e){var t;let r=null!==(t=this.fileName)&&void 0!==t?t:"";return this.trackPosition&&(r.length>0&&(r+=":"),r+=`${this.line}:${this.column}`),r.length>0&&(r+=": "),new Error(r+e)}fail(e){const t=this.makeError(e),r=this.errorHandler;if(void 0===r)throw t;return r(t),this}write(e){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let t=!1;null===e?(t=!0,e=""):"object"==typeof e&&(e=e.toString()),void 0!==this.carriedFromPrevious&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let r=e.length;const n=e.charCodeAt(r-1);!t&&(13===n||n>=55296&&n<=56319)&&(this.carriedFromPrevious=e[r-1],r--,e=e.slice(0,r));const{stateTable:i}=this;for(this.chunk=e,this.i=0;this.i=e.length)return _;const r=e.charCodeAt(t);if(this.column++,r<55296){if(r>=32||9===r)return r;switch(r){case O:return this.line++,this.column=0,this.positionAtNewLine=this.position,O;case 13:return e.charCodeAt(t+1)===O&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,w;default:return this.fail("disallowed character."),r}}if(r>56319)return r>=57344&&r<=65533||this.fail("disallowed character."),r;const n=65536+1024*(r-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,n>1114111&&this.fail("disallowed character."),n}getCode11(){const{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return _;const r=e.charCodeAt(t);if(this.column++,r<55296){if(r>31&&r<127||r>159&&8232!==r||9===r)return r;switch(r){case O:return this.line++,this.column=0,this.positionAtNewLine=this.position,O;case 13:{const r=e.charCodeAt(t+1);r!==O&&133!==r||(this.i=t+2)}case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,w;default:return this.fail("disallowed character."),r}}if(r>56319)return r>=57344&&r<=65533||this.fail("disallowed character."),r;const n=65536+1024*(r-55296)+(e.charCodeAt(t+1)-56320);return this.i=t+2,n>1114111&&this.fail("disallowed character."),n}getCodeNorm(){const e=this.getCode();return e===w?O:e}unget(){this.i=this.prevI,this.column--}captureTo(e){let{i:t}=this;const{chunk:r}=this;for(;;){const n=this.getCode(),i=n===w,a=i?O:n;if(a===_||e.includes(a))return this.text+=r.slice(t,this.prevI),a;i&&(this.text+=`${r.slice(t,this.prevI)}\n`,t=this.i)}}captureToChar(e){let{i:t}=this;const{chunk:r}=this;for(;;){let n=this.getCode();switch(n){case w:this.text+=`${r.slice(t,this.prevI)}\n`,t=this.i,n=O;break;case _:return this.text+=r.slice(t),!1}if(n===e)return this.text+=r.slice(t,this.prevI),!0}}captureNameChars(){const{chunk:e,i:t}=this;for(;;){const r=this.getCode();if(r===_)return this.name+=e.slice(t),_;if(!u(r))return this.name+=e.slice(t,this.prevI),r===w?O:r}}skipSpaces(){for(;;){const e=this.getCodeNorm();if(e===_||!o(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,"1.0"===e?(this.isChar=s,this.getCode=this.getCode10):(this.isChar=p,this.getCode=this.getCode11)}sBegin(){65279===this.chunk.charCodeAt(0)&&(this.i++,this.column++),this.state=1}sBeginWhitespace(){const e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case E:if(this.state=15,0!==this.text.length)throw new Error("no-empty text at start");break;case _:break;default:this.unget(),this.state=T,this.xmlDeclPossible=!1}}sDoctype(){var e;const t=this.captureTo(D);switch(t){case A:null===(e=this.doctypeHandler)||void 0===e||e.call(this,this.text),this.text="",this.state=T,this.doctype=!0;break;case _:break;default:this.text+=String.fromCodePoint(t),91===t?this.state=4:P(t)&&(this.state=3,this.q=t)}}sDoctypeQuote(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=2)}sDTD(){const e=this.captureTo(j);e!==_&&(this.text+=String.fromCodePoint(e),e===I?this.state=2:e===E?this.state=6:P(e)&&(this.state=5,this.q=e))}sDTDQuoted(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=4,this.q=null)}sDTDOpenWaka(){const e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case 33:this.state=7,this.openWakaBang="";break;case R:this.state=11;break;default:this.state=4}}sDTDOpenWakaBang(){const e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,"-"!==t&&(this.state="--"===t?8:4,this.openWakaBang="")}sDTDComment(){this.captureToChar(45)&&(this.text+="-",this.state=9)}sDTDCommentEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=45===e?10:8}sDTDCommentEnded(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===A?this.state=4:(this.fail("malformed comment."),this.state=8)}sDTDPI(){this.captureToChar(R)&&(this.text+="?",this.state=12)}sDTDPIEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===A&&(this.state=4)}sText(){0!==this.tags.length?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:e}=this;const{chunk:t}=this;e:for(;;)switch(this.getCode()){case w:this.entity+=`${t.slice(e,this.prevI)}\n`,e=this.i;break;case 59:{const{entityReturnState:r}=this,n=this.entity+t.slice(e,this.prevI);let i;this.state=r,""===n?(this.fail("empty entity name."),i="&;"):(i=this.parseEntity(n),this.entity=""),r===T&&void 0===this.textHandler||(this.text+=i);break e}case _:this.entity+=t.slice(e);break e}}sOpenWaka(){const e=this.getCode();if(c(e))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(e){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case R:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=T,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:this.openWakaBang.length>=7&&this.fail("incorrect syntax.")}}sComment(){this.captureToChar(45)&&(this.state=18)}sCommentEnding(){var e;const t=this.getCodeNorm();45===t?(this.state=19,null===(e=this.commentHandler)||void 0===e||e.call(this,this.text),this.text=""):(this.text+=`-${String.fromCodePoint(t)}`,this.state=17)}sCommentEnded(){const e=this.getCodeNorm();e!==A?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(e)}`,this.state=17):this.state=T}sCData(){this.captureToChar(I)&&(this.state=21)}sCDataEnding(){const e=this.getCodeNorm();e===I?this.state=22:(this.text+=`]${String.fromCodePoint(e)}`,this.state=20)}sCDataEnding2(){var e;const t=this.getCodeNorm();switch(t){case A:null===(e=this.cdataHandler)||void 0===e||e.call(this,this.text),this.text="",this.state=T;break;case I:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=20}}sPIFirstChar(){const e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=24):e===R||o(e)?(this.fail("processing instruction without a target."),this.state=e===R?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(e),this.state=24)}sPIRest(){const{chunk:e,i:t}=this;for(;;){const r=this.getCodeNorm();if(r===_)return void(this.piTarget+=e.slice(t));if(!this.nameCheck(r)){this.piTarget+=e.slice(t,this.prevI);const n=r===R;n||o(r)?"xml"===this.piTarget?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=n?S:27):this.state=n?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(r));break}}}sPIBody(){if(0===this.text.length){const e=this.getCodeNorm();e===R?this.state=26:o(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(R)&&(this.state=26)}sPIEnding(){var e;const t=this.getCodeNorm();if(t===A){const{piTarget:t}=this;"xml"===t.toLowerCase()&&this.fail("the XML declaration must appear at the start of the document."),null===(e=this.piHandler)||void 0===e||e.call(this,{target:t,body:this.text}),this.piTarget=this.text="",this.state=T}else t===R?this.text+="?":(this.text+=`?${String.fromCodePoint(t)}`,this.state=25);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const e=this.skipSpaces();e!==R?e!==_&&(this.state=28,this.name=String.fromCodePoint(e)):this.state=S}sXMLDeclName(){const e=this.captureTo(C);if(e===R)return this.state=S,this.name+=this.text,this.text="",void this.fail("XML declaration is incomplete.");if(o(e)||e===x){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(", ")}`)}this.state=e===x?30:29}}sXMLDeclEq(){const e=this.getCodeNorm();if(e===R)return this.state=S,void this.fail("XML declaration is incomplete.");o(e)||(e!==x&&this.fail("value required."),this.state=30)}sXMLDeclValueStart(){const e=this.getCodeNorm();if(e===R)return this.state=S,void this.fail("XML declaration is incomplete.");o(e)||(P(e)?this.q=e:(this.fail("value must be quoted."),this.q=32),this.state=31)}sXMLDeclValue(){const e=this.captureTo([this.q,R]);if(e===R)return this.state=S,this.text="",void this.fail("XML declaration is incomplete.");if(e===_)return;const t=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const e=t;this.xmlDecl.version=e,/^1\.[0-9]+$/.test(e)?this.opt.forceXMLVersion||this.setXMLVersion(e):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=t;break;case"standalone":"yes"!==t&&"no"!==t&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name="",this.state=32}sXMLDeclSeparator(){const e=this.getCodeNorm();e!==R?(o(e)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=S}sXMLDeclEnding(){var e;this.getCodeNorm()===A?("xml"!==this.piTarget?this.fail("processing instructions are not allowed before root."):"version"!==this.name&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),null===(e=this.xmldeclHandler)||void 0===e||e.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=T):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){var e;const t=this.captureNameChars();if(t===_)return;const r=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=r.ns=Object.create(null)),null===(e=this.openTagStartHandler)||void 0===e||e.call(this,r),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case A:this.openTag();break;case 47:this.state=35;break;default:o(t)||this.fail("disallowed character in tag name."),this.state=36}}sOpenTagSlash(){this.getCode()===A?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}sAttrib(){const e=this.skipSpaces();e!==_&&(c(e)?(this.unget(),this.state=37):e===A?this.openTag():47===e?this.state=35:this.fail("disallowed character in attribute name."))}sAttribName(){const e=this.captureNameChars();e===x?this.state=39:o(e)?this.state=38:e===A?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):e!==_&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const e=this.skipSpaces();switch(e){case _:return;case x:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",e===A?this.openTag():c(e)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}sAttribValue(){const e=this.getCodeNorm();P(e)?(this.q=e,this.state=40):o(e)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}sAttribValueQuoted(){const{q:e,chunk:t}=this;let{i:r}=this;for(;;)switch(this.getCode()){case e:return this.pushAttrib(this.name,this.text+t.slice(r,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=t.slice(r,this.prevI),this.state=14,void(this.entityReturnState=40);case O:case w:case 9:this.text+=`${t.slice(r,this.prevI)} `,r=this.i;break;case E:return this.text+=t.slice(r,this.prevI),void this.fail("disallowed character.");case _:return void(this.text+=t.slice(r))}}sAttribValueClosed(){const e=this.getCodeNorm();o(e)?this.state=36:e===A?this.openTag():47===e?this.state=35:c(e)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const e=this.captureTo(M);switch(e){case 38:this.state=14,this.entityReturnState=42;break;case E:this.fail("disallowed character.");break;case _:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",e===A?this.openTag():this.state=36}}sCloseTag(){const e=this.captureNameChars();e===A?this.closeTag():o(e)?this.state=44:e!==_&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case A:this.closeTag();break;case _:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:e,forbiddenState:t}=this;const{chunk:r,textHandler:n}=this;e:for(;;)switch(this.getCode()){case E:if(this.state=15,void 0!==n){const{text:t}=this,i=r.slice(e,this.prevI);0!==t.length?(n(t+i),this.text=""):0!==i.length&&n(i)}t=0;break e;case 38:this.state=14,this.entityReturnState=T,void 0!==n&&(this.text+=r.slice(e,this.prevI)),t=0;break e;case I:switch(t){case 0:t=1;break;case 1:t=2;break;case 2:break;default:throw new Error("impossible state")}break;case A:2===t&&this.fail('the string "]]>" is disallowed in char data.'),t=0;break;case w:void 0!==n&&(this.text+=`${r.slice(e,this.prevI)}\n`),e=this.i,t=0;break;case _:void 0!==n&&(this.text+=r.slice(e));break e;default:t=0}this.forbiddenState=t}handleTextOutsideRoot(){let{i:e}=this;const{chunk:t,textHandler:r}=this;let n=!1;e:for(;;){const i=this.getCode();switch(i){case E:if(this.state=15,void 0!==r){const{text:n}=this,i=t.slice(e,this.prevI);0!==n.length?(r(n+i),this.text=""):0!==i.length&&r(i)}break e;case 38:this.state=14,this.entityReturnState=T,void 0!==r&&(this.text+=t.slice(e,this.prevI)),n=!0;break e;case w:void 0!==r&&(this.text+=`${t.slice(e,this.prevI)}\n`),e=this.i;break;case _:void 0!==r&&(this.text+=t.slice(e));break e;default:o(i)||(n=!0)}}n&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}pushAttribNS(e,t){var r;const{prefix:n,local:i}=this.qname(e),a={name:e,prefix:n,local:i,value:t};if(this.attribList.push(a),null===(r=this.attributeHandler)||void 0===r||r.call(this,a),"xmlns"===n){const e=t.trim();"1.0"===this.currentXMLVersion&&""===e&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[i]=e,L(this,i,e)}else if("xmlns"===e){const e=t.trim();this.topNS[""]=e,L(this,"",e)}}pushAttribPlain(e,t){var r;const n={name:e,value:t};this.attribList.push(n),null===(r=this.attributeHandler)||void 0===r||r.call(this,n)}end(){var e,t;this.sawRoot||this.fail("document must contain a root element.");const{tags:r}=this;for(;r.length>0;){const e=r.pop();this.fail(`unclosed tag: ${e.name}`)}0!==this.state&&this.state!==T&&this.fail("unexpected end.");const{text:n}=this;return 0!==n.length&&(null===(e=this.textHandler)||void 0===e||e.call(this,n),this.text=""),this._closed=!0,null===(t=this.endHandler)||void 0===t||t.call(this),this._init(),this}resolve(e){var t,r;let n=this.topNS[e];if(void 0!==n)return n;const{tags:i}=this;for(let t=i.length-1;t>=0;t--)if(n=i[t].ns[e],void 0!==n)return n;return n=this.ns[e],void 0!==n?n:null===(r=(t=this.opt).resolvePrefix)||void 0===r?void 0:r.call(t,e)}qname(e){const t=e.indexOf(":");if(-1===t)return{prefix:"",local:e};const r=e.slice(t+1),n=e.slice(0,t);return(""===n||""===r||r.includes(":"))&&this.fail(`malformed name: ${e}.`),{prefix:n,local:r}}processAttribsNS(){var e;const{attribList:t}=this,r=this.tag;{const{prefix:t,local:n}=this.qname(r.name);r.prefix=t,r.local=n;const i=r.uri=null!==(e=this.resolve(t))&&void 0!==e?e:"";""!==t&&("xmlns"===t&&this.fail('tags may not have "xmlns" as prefix.'),""===i&&(this.fail(`unbound namespace prefix: ${JSON.stringify(t)}.`),r.uri=t))}if(0===t.length)return;const{attributes:n}=r,i=new Set;for(const e of t){const{name:t,prefix:r,local:a}=e;let o,s;""===r?(o="xmlns"===t?m:"",s=t):(o=this.resolve(r),void 0===o&&(this.fail(`unbound namespace prefix: ${JSON.stringify(r)}.`),o=r),s=`{${o}}${a}`),i.has(s)&&this.fail(`duplicate attribute: ${s}.`),i.add(s),e.uri=o,n[t]=e}this.attribList=[]}processAttribsPlain(){const{attribList:e}=this,t=this.tag.attributes;for(const{name:r,value:n}of e)void 0!==t[r]&&this.fail(`duplicate attribute: ${r}.`),t[r]=n;this.attribList=[]}openTag(){var e;this.processAttribs();const{tags:t}=this,r=this.tag;r.isSelfClosing=!1,null===(e=this.openTagHandler)||void 0===e||e.call(this,r),t.push(r),this.state=T,this.name=""}openSelfClosingTag(){var e,t,r;this.processAttribs();const{tags:n}=this,i=this.tag;i.isSelfClosing=!0,null===(e=this.openTagHandler)||void 0===e||e.call(this,i),null===(t=this.closeTagHandler)||void 0===t||t.call(this,i),null===(this.tag=null!==(r=n[n.length-1])&&void 0!==r?r:null)&&(this.closedRoot=!0),this.state=T,this.name=""}closeTag(){const{tags:e,name:t}=this;if(this.state=T,this.name="",""===t)return this.fail("weird empty close tag."),void(this.text+="");const r=this.closeTagHandler;let n=e.length;for(;n-- >0;){const n=this.tag=e.pop();if(this.topNS=n.ns,null==r||r(n),n.name===t)break;this.fail("unexpected close tag.")}0===n?this.closedRoot=!0:n<0&&(this.fail(`unmatched closing tag: ${t}.`),this.text+=``)}parseEntity(e){if("#"!==e[0]){const t=this.ENTITIES[e];return void 0!==t?t:(this.fail(this.isName(e)?"undefined entity.":"disallowed character in entity name."),`&${e};`)}let t=NaN;return"x"===e[1]&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail("malformed character entity."),`&${e};`)}}},52267:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableWebToNodeStream=void 0;const n=r(58521);class i extends n.Readable{constructor(e){super(),this.bytesRead=0,this.released=!1,this.reader=e.getReader()}async _read(){if(this.released)return void this.push(null);this.pendingRead=this.reader.read();const e=await this.pendingRead;delete this.pendingRead,e.done||this.released?this.push(null):(this.bytesRead+=e.value.length,this.push(e.value))}async waitForReadToComplete(){this.pendingRead&&await this.pendingRead}async close(){await this.syncAndRelease()}async syncAndRelease(){this.released=!0,await this.waitForReadToComplete(),await this.reader.releaseLock()}}t.ReadableWebToNodeStream=i},67083:e=>{"use strict";const{AbortController:t,AbortSignal:r}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;e.exports=t,e.exports.AbortSignal=r,e.exports.default=t},37754:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){const t=[];return r=e.on("data",(e=>t.push(e))),n=t,new Promise(((e,t)=>{r.on("end",(()=>e(n))),r.on("error",t)}));var r,n}},2922:(e,t,r)=>{const n=r(82815),i=r(30979),a=r(67458),o=r(21156),s=r(37841);e.exports={DynamicNestedLoopJoin:n,HashJoin:i,NestedLoopJoin:a,SymmetricHashJoin:o,MergeStream:s}},82815:(e,t,r)=>{let n=r(76664),i=n.MultiTransformIterator,a=n.SimpleTransformIterator;e.exports=class extends i{constructor(e,t,r,n){super(e,n),this.funRight=t,this.funJoin=r}_createTransformer(e){return new a(this.funRight(e),{transform:(t,r,n)=>{let i=this.funJoin(e,t);null!==i&&n(i),r()}})}}},30979:(e,t,r)=>{let n=r(76664).AsyncIterator;e.exports=class extends n{constructor(e,t,r,n){super(),this.addedDataListener=!1,this.left=e,this.right=t,this.funHash=r,this.funJoin=n,this.leftMap=new Map,this.match=null,this.matches=[],this.matchIdx=0,this.left.on("error",(e=>this.destroy(e))),this.right.on("error",(e=>this.destroy(e))),this.readable=!1,this.left.on("end",function(){this.readable=!0,this.right.on("readable",(()=>this.readable=!0)),this.right.on("end",(()=>{this.hasResults()||this._end()}))}.bind(this)),this.on("newListener",(e=>{"data"===e&&this._addDataListenerIfNeeded()})),this.left.readable&&this._addDataListenerIfNeeded(),this.left.on("readable",(()=>this._addDataListenerIfNeeded()))}hasResults(){return!this.right.ended||this.matchIdx{const{MultiTransformIterator:n,SimpleTransformIterator:i,scheduleTask:a}=r(76664);e.exports=class extends n{constructor(e,t,r,n){super(e,n),this.right=t,this.funJoin=r,this.on("end",(()=>this.right.close()))}_end(){super._end(),a((()=>this.right.destroy()))}_createTransformer(e){return new i(this.right.clone(),{transform:(t,r,n)=>{let i=this.funJoin(e,t);null!==i&&n(i),r()}})}}},21156:(e,t,r)=>{let n=r(76664).AsyncIterator;e.exports=class extends n{constructor(e,t,r,n){super(),this.left=e,this.right=t,this.funHash=r,this.funJoin=n,this.usedLeft=!1,this.leftMap=new Map,this.rightMap=new Map,this.on("end",(()=>this._cleanup())),this.match=null,this.matches=[],this.matchIdx=0,(this.left.readable||this.right.readable)&&(this.readable=!0),this.left.on("error",(e=>this.destroy(e))),this.right.on("error",(e=>this.destroy(e))),this.left.on("readable",(()=>this.readable=!0)),this.right.on("readable",(()=>this.readable=!0)),this.left.on("end",(()=>{this.hasResults()||this._end()})),this.right.on("end",(()=>{this.hasResults()||this._end()}))}hasResults(){return!this.left.ended||!this.right.ended||!!this.matches&&this.matchIdx{let n=r(76664).AsyncIterator;e.exports=class extends n{constructor(e){super(),Array.isArray(e)||(e=Array.prototype.slice.call(arguments)),this.streams=e;for(let t of e)t.on("readable",(()=>this.emit("readable"))),t.on("end",(()=>this._removeStream(t)));0===this.streams.length&&this.close(),this.idx=this.streams.length-1}_removeStream(e){let t=this.streams.indexOf(e);t<0||(this.streams.splice(t,1),this.idx>=this.streams.length&&--this.idx,0===this.streams.length&&this._end())}close(){super.close();for(let e of this.streams)e.close()}read(){for(let e=0;e{e.exports=function(e){const t=new(r(5868).LoggerVoid),n=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-init/^3.0.0/components/ActorInit.jsonld#ActorInit_default_bus"}),i=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-context-preprocess/^3.0.0/components/ActorContextPreprocess.jsonld#ActorContextPreprocess_default_bus"}),a=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-hash-bindings/^3.0.0/components/ActorHashBindings.jsonld#ActorHashBindings_default_bus"}),o=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-hash-quads/^3.0.0/components/ActorHashQuads.jsonld#ActorHashQuads_default_bus"}),s=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-optimize-query-operation/^3.0.0/components/ActorOptimizeQueryOperation.jsonld#ActorOptimizeQueryOperation_default_bus"}),c=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-parse/^3.0.0/components/ActorQueryParse.jsonld#ActorQueryParse_default_bus"}),u=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-result-serialize/^3.0.0/components/ActorQueryResultSerialize.jsonld#ActorQueryResultSerialize_default_bus"}),l=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify-hypermedia/^3.0.0/components/ActorQuerySourceIdentifyHypermedia.jsonld#ActorQuerySourceIdentifyHypermedia_default_bus"}),d=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^3.0.0/components/ActorDereference.jsonld#ActorDereference_default_bus"}),p=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference-rdf/^3.0.0/components/ActorDereferenceRdf.jsonld#ActorDereferenceRdf_default_bus"}),h=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-entries-sort/^3.0.0/components/ActorRdfJoinEntriesSort.jsonld#ActorRdfJoinEntriesSort_default_bus"}),f=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-selectivity/^3.0.0/components/ActorRdfJoinSelectivity.jsonld#ActorRdfJoinSelectivity_default_bus"}),y=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata/^3.0.0/components/ActorRdfMetadata.jsonld#ActorRdfMetadata_default_bus"}),g=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-accumulate/^3.0.0/components/ActorRdfMetadataAccumulate.jsonld#ActorRdfMetadataAccumulate_default_bus"}),m=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-extract/^3.0.0/components/ActorRdfMetadataExtract.jsonld#ActorRdfMetadataExtract_default_bus"}),b=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse/^3.0.0/components/ActorRdfParse.jsonld#ActorRdfParse_default_bus"}),v=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse-html/^3.0.0/components/ActorRdfParseHtml.jsonld#ActorRdfParseHtml_default_bus"}),_=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links/^3.0.0/components/ActorRdfResolveHypermediaLinks.jsonld#ActorRdfResolveHypermediaLinks_default_bus"}),w=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links-queue/^3.0.0/components/ActorRdfResolveHypermediaLinksQueue.jsonld#ActorRdfResolveHypermediaLinksQueue_default_bus"}),T=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-serialize/^3.0.0/components/ActorRdfSerialize.jsonld#ActorRdfSerialize_default_bus"}),S=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-hypermedia/^3.0.0/components/ActorRdfUpdateHypermedia.jsonld#ActorRdfUpdateHypermedia_default_bus"}),O=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-quads/^3.0.0/components/ActorRdfUpdateQuads.jsonld#ActorRdfUpdateQuads_default_bus"}),E=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^3.0.0/components/ActorHttp.jsonld#ActorHttp_default_bus"}),x=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^3.0.0/components/ActorHttp.jsonld#ActorHttp_fallback_bus"}),A=new(r(59510).BusQueryOperation)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^3.0.0/components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus"}),R=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-process/^3.0.0/components/ActorQueryProcess.jsonld#ActorQueryProcess_default_bus"}),I=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify/^3.0.0/components/ActorQuerySourceIdentify.jsonld#ActorQuerySourceIdentify_default_bus"}),P=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^3.0.0/components/ActorRdfJoin.jsonld#ActorRdfJoin_default_bus"}),N=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http-invalidate/^3.0.0/components/ActorHttpInvalidate.jsonld#ActorHttpInvalidate_default_bus"}),D=new(r(34368).Bus)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-merge-bindings-context/^3.0.0/components/ActorMergeBindingsContext.jsonld#ActorMergeBindingsContext_default_bus"}),j=(new(r(36251).ActorContextPreprocessConvertShortcuts)({contextKeyShortcuts:{baseIRI:"@comunica/actor-init-query:baseIRI",datetime:"@comunica/actor-http-memento:datetime",destination:"@comunica/bus-rdf-update-quads:destination",distinctConstruct:"@comunica/actor-init-query:distinctConstruct",explain:"@comunica/actor-init-query:explain",extensionFunctionCreator:"@comunica/actor-init-query:extensionFunctionCreator",extensionFunctions:"@comunica/actor-init-query:extensionFunctions",fetch:"@comunica/bus-http:fetch",functionArgumentsCache:"@comunica/actor-init-query:functionArgumentsCache",httpAuth:"@comunica/bus-http:auth",httpBodyTimeout:"@comunica/bus-http:http-body-timeout",httpIncludeCredentials:"@comunica/bus-http:include-credentials",httpProxyHandler:"@comunica/actor-http-proxy:httpProxyHandler",httpRetryCount:"@comunica/bus-http:http-retry-count",httpRetryDelay:"@comunica/bus-http:http-retry-delay",httpRetryOnServerError:"@comunica/bus-http:http-retry-on-server-error",httpTimeout:"@comunica/bus-http:http-timeout",initialBindings:"@comunica/actor-init-query:initialBindings",lenient:"@comunica/actor-init-query:lenient",log:"@comunica/core:log",noCache:"@comunica/actor-init-query:noCache",queryFormat:"@comunica/actor-init-query:queryFormat",queryTimestamp:"@comunica/actor-init-query:queryTimestamp",readOnly:"@comunica/bus-query-operation:readOnly",recoverBrokenLinks:"@comunica/bus-http-wayback:recover-broken-links",sources:"@comunica/actor-init-query:querySourcesUnidentified",traverse:"@comunica/bus-query-source-identify:traverse",unionDefaultGraph:"@comunica/bus-query-operation:unionDefaultGraph"},name:"urn:comunica:default:context-preprocess/actors#convert-shortcuts",bus:i}),new(r(35451).ActorContextPreprocessSetDefaults)({logger:t,name:"urn:comunica:default:context-preprocess/actors#set-defaults",bus:i}),new(r(41670).ActorContextPreprocessSourceToDestination)({name:"urn:comunica:default:context-preprocess/actors#source-to-destination",bus:i}),new(r(35106).ActorContextPreprocessQuerySourceSkolemize)({name:"urn:comunica:default:context-preprocess/actors#query-source-skolemize",bus:i})),C=new(r(30827).MediatorCombinePipeline)({name:"urn:comunica:default:context-preprocess/mediators#main",bus:i}),M=(new(r(11150).ActorHashBindingsSha1)({name:"urn:comunica:default:hash-bindings/actors#sha1",bus:a}),new(r(25896).MediatorRace)({name:"urn:comunica:default:hash-bindings/mediators#main",bus:a})),L=(new(r(64188).ActorHashQuadsSha1)({name:"urn:comunica:default:hash-quads/actors#sha1",bus:o}),new(r(25896).MediatorRace)({name:"urn:comunica:default:hash-quads/mediators#main",bus:o})),k=(new(r(15718).ActorOptimizeQueryOperationRewriteCopy)({name:"urn:comunica:default:optimize-query-operation/actors#rewrite-copy",bus:s}),new(r(83910).ActorOptimizeQueryOperationRewriteMove)({name:"urn:comunica:default:optimize-query-operation/actors#rewrite-move",bus:s}),new(r(63514).ActorOptimizeQueryOperationRewriteAdd)({name:"urn:comunica:default:optimize-query-operation/actors#rewrite-add",bus:s}),new(r(78992).ActorOptimizeQueryOperationGroupSources)({name:"urn:comunica:default:optimize-query-operation/actors#group-sources",bus:s})),F=(new(r(78724).ActorOptimizeQueryOperationConstructDistinct)({name:"urn:comunica:default:optimize-query-operation/actors#construct-distinct",bus:s}),new(r(30827).MediatorCombinePipeline)({filterErrors:!0,name:"urn:comunica:default:optimize-query-operation/mediators#main",bus:s})),B=(new(r(4911).ActorQueryParseSparql)({prefixes:{dbpedia:"http://dbpedia.org/resource/","dbpedia-owl":"http://dbpedia.org/ontology/",dbpprop:"http://dbpedia.org/property/",dc:"http://purl.org/dc/terms/",dc11:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",foaf:"http://xmlns.com/foaf/0.1/",geo:"http://www.w3.org/2003/01/geo/wgs84_pos#",owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",schema:"http://schema.org/",skos:"http://www.w3.org/2008/05/skos#",xsd:"http://www.w3.org/2001/XMLSchema#"},name:"urn:comunica:default:query-parse/actors#sparql",bus:c}),new(r(37067).ActorQueryParseGraphql)({name:"urn:comunica:default:query-parse/actors#graphql",bus:c}),new(r(25896).MediatorRace)({name:"urn:comunica:default:query-parse/mediators#main",bus:c})),U=(new(r(91875).ActorQueryResultSerializeJson)({mediaTypePriorities:{"application/json":1},mediaTypeFormats:{"application/json":"https://comunica.linkeddatafragments.org/#results_JSON"},name:"urn:comunica:default:query-result-serialize/actors#json",bus:u}),new(r(96791).ActorQueryResultSerializeSimple)({mediaTypePriorities:{simple:.9},mediaTypeFormats:{simple:"https://comunica.linkeddatafragments.org/#results_simple"},name:"urn:comunica:default:query-result-serialize/actors#simple",bus:u}),new(r(34357).ActorQueryResultSerializeSparqlCsv)({mediaTypePriorities:{"text/csv":.75},mediaTypeFormats:{"text/csv":"http://www.w3.org/ns/formats/SPARQL_Results_CSV"},name:"urn:comunica:default:query-result-serialize/actors#csv",bus:u}),new(r(78432).ActorQueryResultSerializeSparqlTsv)({mediaTypePriorities:{"text/tab-separated-values":.75},mediaTypeFormats:{"text/tab-separated-values":"http://www.w3.org/ns/formats/SPARQL_Results_TSV"},name:"urn:comunica:default:query-result-serialize/actors#sparql-tsv",bus:u}),new(r(68596).ActorQueryResultSerializeSparqlXml)({mediaTypePriorities:{"application/sparql-results+xml":.8},mediaTypeFormats:{"application/sparql-results+xml":"http://www.w3.org/ns/formats/SPARQL_Results_XML"},name:"urn:comunica:default:query-result-serialize/actors#sparql-xml",bus:u}),new(r(59655).ActorQueryResultSerializeTable)({columnWidth:50,mediaTypePriorities:{table:.6},mediaTypeFormats:{table:"https://comunica.linkeddatafragments.org/#results_table"},name:"urn:comunica:default:query-result-serialize/actors#table",bus:u}),new(r(70017).ActorQueryResultSerializeTree)({mediaTypePriorities:{tree:.5},mediaTypeFormats:{tree:"https://comunica.linkeddatafragments.org/#results_tree"},name:"urn:comunica:default:query-result-serialize/actors#tree",bus:u}),new(r(25896).MediatorRace)({name:"urn:comunica:default:query-result-serialize/mediators#serialize",bus:u})),q=new(r(75884).MediatorCombineUnion)({field:"mediaTypes",name:"urn:comunica:default:query-result-serialize/mediators#mediaType",bus:u}),V=new(r(75884).MediatorCombineUnion)({field:"mediaTypeFormats",name:"urn:comunica:default:query-result-serialize/mediators#mediaTypeFormat",bus:u}),Q=new(r(99104).MediatorNumber)({field:"filterFactor",type:"max",ignoreErrors:!0,name:"urn:comunica:default:query-source-identify-hypermedia/mediators#main",bus:l}),$=new(r(35878).ActorDereferenceFallback)({name:"urn:comunica:default:dereference/actors#fallback",bus:d}),H=new(r(25896).MediatorRace)({name:"urn:comunica:default:dereference/mediators#main",bus:d}),G=new(r(25896).MediatorRace)({name:"urn:comunica:default:dereference-rdf/mediators#main",bus:p}),z=(new(r(36545).ActorRdfJoinEntriesSortCardinality)({name:"urn:comunica:default:rdf-join-entries-sort/actors#cardinality",bus:h}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-join-entries-sort/mediators#main",bus:h})),K=(new(r(16703).ActorRdfJoinSelectivityVariableCounting)({name:"urn:comunica:default:rdf-join-selectivity/actors#variable-counting",bus:f}),new(r(99104).MediatorNumber)({field:"accuracy",type:"max",ignoreErrors:!0,name:"urn:comunica:default:rdf-join-selectivity/mediators#main",bus:f})),X=(new(r(80848).ActorRdfMetadataPrimaryTopic)({metadataToData:!1,dataToMetadataOnInvalidMetadataGraph:!0,name:"urn:comunica:default:rdf-metadata/actors#primary-topic",bus:y}),new(r(64443).ActorRdfMetadataAll)({name:"urn:comunica:default:rdf-metadata/actors#all",bus:y}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-metadata/mediators#main",bus:y})),J=(new(r(27988).ActorRdfMetadataAccumulateCanContainUndefs)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#cancontainundefs",bus:g}),new(r(67243).ActorRdfMetadataAccumulateCardinality)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#cardinality",bus:g}),new(r(91475).ActorRdfMetadataAccumulatePageSize)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#pagesize",bus:g}),new(r(26719).ActorRdfMetadataAccumulateRequestTime)({name:"urn:comunica:default:rdf-metadata-accumulate/actors#requesttime",bus:g}),new(r(75884).MediatorCombineUnion)({field:"metadata",name:"urn:comunica:default:rdf-metadata-accumulate/mediators#main",bus:g})),W=(new(r(85405).ActorRdfMetadataExtractHydraControls)({name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-controls",bus:m}),new(r(57586).ActorRdfMetadataExtractHydraCount)({predicates:["http://www.w3.org/ns/hydra/core#totalItems","http://rdfs.org/ns/void#triples"],name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-count",bus:m}),new(r(54777).ActorRdfMetadataExtractHydraPagesize)({predicates:["http://www.w3.org/ns/hydra/core#itemsPerPage"],name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-pagesize",bus:m}),new(r(7445).ActorRdfMetadataExtractRequestTime)({name:"urn:comunica:default:rdf-metadata-extract/actors#request-time",bus:m}),new(r(40751).ActorRdfMetadataExtractAllowHttpMethods)({name:"urn:comunica:default:rdf-metadata-extract/actors#allow-http-methods",bus:m}),new(r(44549).ActorRdfMetadataExtractPutAccepted)({name:"urn:comunica:default:rdf-metadata-extract/actors#put-accepted",bus:m}),new(r(55282).ActorRdfMetadataExtractPatchSparqlUpdate)({name:"urn:comunica:default:rdf-metadata-extract/actors#patch-sparql-update",bus:m}),new(r(3187).ActorRdfMetadataExtractSparqlService)({inferHttpsEndpoint:!0,name:"urn:comunica:default:rdf-metadata-extract/actors#sparql-service",bus:m}),new(r(75884).MediatorCombineUnion)({filterErrors:!0,field:"metadata",name:"urn:comunica:default:rdf-metadata-extract/mediators#main",bus:m})),Y=(new(r(62917).ActorRdfParseN3)({mediaTypePriorities:{"application/n-quads":1,"application/n-triples":.8,"application/trig":.95,"text/n3":.35,"text/turtle":.6},mediaTypeFormats:{"application/n-quads":"http://www.w3.org/ns/formats/N-Quads","application/n-triples":"http://www.w3.org/ns/formats/N-Triples","application/trig":"http://www.w3.org/ns/formats/TriG","text/n3":"http://www.w3.org/ns/formats/N3","text/turtle":"http://www.w3.org/ns/formats/Turtle"},priorityScale:1,name:"urn:comunica:default:rdf-parse/actors#n3",bus:b}),new(r(21487).ActorRdfParseRdfXml)({mediaTypePriorities:{"application/rdf+xml":1},mediaTypeFormats:{"application/rdf+xml":"http://www.w3.org/ns/formats/RDF_XML"},priorityScale:.5,name:"urn:comunica:default:rdf-parse/actors#rdfxml",bus:b}),new(r(8137).ActorRdfParseXmlRdfa)({mediaTypePriorities:{"application/xml":1,"image/svg+xml":1,"text/xml":1},mediaTypeFormats:{"application/xml":"http://www.w3.org/ns/formats/RDFa","image/svg+xml":"http://www.w3.org/ns/formats/RDFa","text/xml":"http://www.w3.org/ns/formats/RDFa"},priorityScale:.3,name:"urn:comunica:default:rdf-parse/actors#xmlrdfa",bus:b}),new(r(43352).ActorRdfParseShaclc)({mediaTypePriorities:{"text/shaclc":1,"text/shaclc-ext":.5},mediaTypeFormats:{"text/shaclc":"http://www.w3.org/ns/formats/Shaclc","text/shaclc-ext":"http://www.w3.org/ns/formats/ShaclcExtended"},priorityScale:.1,name:"urn:comunica:default:rdf-parse/actors#shaclc",bus:b}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-parse/mediators#parse",bus:b})),Z=new(r(75884).MediatorCombineUnion)({field:"mediaTypes",name:"urn:comunica:default:rdf-parse/mediators#mediaType",bus:b}),ee=(new(r(28955).ActorRdfParseHtml)({busRdfParseHtml:v,mediaTypePriorities:{"application/xhtml+xml":.9,"text/html":1},mediaTypeFormats:{"application/xhtml+xml":"http://www.w3.org/ns/formats/HTML","text/html":"http://www.w3.org/ns/formats/HTML"},priorityScale:.2,name:"urn:comunica:default:rdf-parse/actors#html",bus:b}),new(r(42421).ActorRdfParseHtmlMicrodata)({name:"urn:comunica:default:rdf-parse-html/actors#microdata",bus:v}),new(r(26585).ActorRdfParseHtmlRdfa)({name:"urn:comunica:default:rdf-parse-html/actors#rdfa",bus:v}),new(r(34541).ActorRdfResolveHypermediaLinksNext)({name:"urn:comunica:default:rdf-resolve-hypermedia-links/actors#next",bus:_}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-resolve-hypermedia-links/mediators#main",bus:_})),te=(new(r(34120).ActorRdfResolveHypermediaLinksQueueFifo)({name:"urn:comunica:default:rdf-resolve-hypermedia-links-queue/actors#fifo",bus:w}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-resolve-hypermedia-links-queue/mediators#main",bus:w})),re=(new(r(28510).ActorRdfSerializeN3)({mediaTypePriorities:{"application/n-quads":1,"application/n-triples":.8,"application/trig":.95,"text/n3":.35,"text/turtle":.6},mediaTypeFormats:{"application/n-quads":"http://www.w3.org/ns/formats/N-Quads","application/n-triples":"http://www.w3.org/ns/formats/N-Triples","application/trig":"http://www.w3.org/ns/formats/TriG","text/n3":"http://www.w3.org/ns/formats/N3","text/turtle":"http://www.w3.org/ns/formats/Turtle"},name:"urn:comunica:default:rdf-serialize/actors#n3",bus:T}),new(r(21935).ActorRdfSerializeJsonLd)({jsonStringifyIndentSpaces:2,mediaTypePriorities:{"application/ld+json":1},mediaTypeFormats:{"application/ld+json":"http://www.w3.org/ns/formats/JSON-LD"},priorityScale:.9,name:"urn:comunica:default:rdf-serialize/actors#jsonld",bus:T}),new(r(49343).ActorRdfSerializeShaclc)({mediaTypePriorities:{"text/shaclc":1,"text/shaclc-ext":.5},mediaTypeFormats:{"text/shaclc":"http://www.w3.org/ns/formats/Shaclc","text/shaclc-ext":"http://www.w3.org/ns/formats/ShaclcExtended"},priorityScale:.1,name:"urn:comunica:default:rdf-serialize/actors#shaclc",bus:T}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-serialize/mediators#serialize",bus:T})),ne=new(r(75884).MediatorCombineUnion)({field:"mediaTypes",name:"urn:comunica:default:rdf-serialize/mediators#mediaType",bus:T}),ie=new(r(75884).MediatorCombineUnion)({field:"mediaTypeFormats",name:"urn:comunica:default:rdf-serialize/mediators#mediaTypeFormat",bus:T}),ae=new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-update-hypermedia/mediators#main",bus:S}),oe=(new(r(76722).ActorRdfUpdateQuadsRdfJsStore)({name:"urn:comunica:default:rdf-update-quads/actors#rdfjs-store",bus:O}),new(r(25896).MediatorRace)({name:"urn:comunica:default:rdf-update-quads/mediators#main",bus:O})),se=new(r(28590).ActorHttpFetch)({agentOptions:{keepAlive:!0,maxSockets:5},name:"urn:comunica:default:http/actors#fetch",bus:E}),ce=new(r(99104).MediatorNumber)({field:"time",type:"min",ignoreErrors:!0,name:"urn:comunica:default:http/mediators#no-fallback",bus:E}),ue=new(r(99104).MediatorNumber)({field:"time",type:"min",ignoreErrors:!0,name:"urn:comunica:default:http/mediators#main",bus:x}),le=(new(r(26933).ActorQueryOperationSource)({name:"urn:comunica:default:query-operation/actors#source",bus:A}),new(r(99104).MediatorNumber)({field:"httpRequests",type:"min",ignoreErrors:!0,name:"urn:comunica:default:query-operation/mediators#main",bus:A})),de=new(r(25896).MediatorRace)({name:"urn:comunica:default:query-process/mediators#main",bus:R}),pe=new(r(25896).MediatorRace)({name:"urn:comunica:default:query-source-identify/mediators#main",bus:I}),he=new(r(8309).MediatorJoinCoefficientsFixed)({cpuWeight:10,memoryWeight:1,timeWeight:2,ioWeight:10,name:"urn:comunica:default:rdf-join/mediators#main",bus:P}),fe=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-context-preprocess-query-source-identify/^3.0.0/components/ActorContextPreprocessQuerySourceIdentify.jsonld#IActorContextPreprocessQuerySourceIdentifyArgs_default_invalidator",bus:N}),ye=new(r(48284).MediatorAll)({name:"urn:comunica:default:http-invalidate/mediators#main",bus:N}),ge=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-quads-hypermedia/^3.0.0/components/ActorRdfUpdateQuadsHypermedia.jsonld#IActorRdfUpdateQuadsHypermediaArgs_default_invalidator",bus:N}),me=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^3.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator",bus:N}),be=new(r(56320).ActorHttpInvalidateListenable)({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^3.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator",bus:N}),ve=new(r(75884).MediatorCombineUnion)({field:"mergeHandlers",name:"urn:comunica:default:merge-bindings-context/mediators#main",bus:D}),_e=(new(r(35848).ActorRdfJoinSingle)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-single",bus:P}),new(r(85345).ActorRdfJoinMultiEmpty)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-multi-empty",bus:P}),new(r(6551).ActorRdfJoinMultiBindSource)({selectivityModifier:1e-4,blockSize:16,mediatorJoinEntriesSort:z,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-multi-bind-source",bus:P}),new(r(38868).ActorRdfJoinHash)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-hash",bus:P}),new(r(77375).ActorRdfJoinSymmetricHash)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-symmetric-hash",bus:P}),new(r(37081).ActorRdfJoinNestedLoop)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-nested-loop",bus:P}),new(r(11688).ActorRdfJoinMinusHash)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#minus-hash",bus:P}),new(r(98311).ActorRdfJoinMinusHashUndef)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#minus-hash-undef",bus:P}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!1,blocking:!1,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#optional-hash-def-nonblocking",bus:P}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!1,blocking:!0,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#optional-hash-def-blocking",bus:P}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!0,blocking:!1,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#optional-hash-undef-nonblocking",bus:P}),new(r(19726).ActorRdfJoinOptionalHash)({canHandleUndefs:!0,blocking:!0,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#optional-hash-undef-blocking",bus:P}),new(r(9391).ActorRdfJoinOptionalNestedLoop)({mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#optional-nested-loop",bus:P}),new(r(54341).ActorDereferenceRdfParse)({mediatorDereference:H,mediatorParse:Y,mediatorParseMediatypes:Z,mediaMappings:{htm:"text/html",html:"text/html",json:"application/json",jsonld:"application/ld+json",n3:"text/n3",nq:"application/n-quads",nquads:"application/n-quads",nt:"application/n-triples",ntriples:"application/n-triples",owl:"application/rdf+xml",rdf:"application/rdf+xml",rdfxml:"application/rdf+xml",shaclc:"text/shaclc",shaclce:"text/shaclc-ext",shc:"text/shaclc",shce:"text/shaclc-ext",svg:"image/svg+xml",svgz:"image/svg+xml",trig:"application/trig",ttl:"text/turtle",turtle:"text/turtle",xht:"application/xhtml+xml",xhtml:"application/xhtml+xml",xml:"application/xml"},name:"urn:comunica:default:dereference-rdf/actors#parse",bus:p}),new(r(3549).ActorRdfParseHtmlScript)({mediatorRdfParseMediatypes:Z,mediatorRdfParseHandle:Y,name:"urn:comunica:default:rdf-parse-html/actors#script",bus:v}),new(r(63543).ActorQueryResultSerializeRdf)({mediatorRdfSerialize:re,mediatorMediaTypeCombiner:ne,mediatorMediaTypeFormatCombiner:ie,name:"urn:comunica:default:query-result-serialize/actors#rdf",bus:u}),new(r(55390).ActorHttpWayback)({mediatorHttp:ce,name:"urn:comunica:default:http/actors#wayback",bus:x}),new(r(54168).ActorRdfParseJsonLd)({mediatorHttp:ue,mediaTypePriorities:{"application/json":.15,"application/ld+json":1},mediaTypeFormats:{"application/json":"http://www.w3.org/ns/formats/JSON-LD","application/ld+json":"http://www.w3.org/ns/formats/JSON-LD"},priorityScale:.9,name:"urn:comunica:default:rdf-parse/actors#jsonld",bus:b}),new(r(87057).ActorRdfUpdateHypermediaPatchSparqlUpdate)({mediatorHttp:ue,name:"urn:comunica:default:rdf-update-hypermedia/actors#patch-sparql-update",bus:S}),new(r(3047).ActorRdfUpdateHypermediaPutLdp)({mediatorHttp:ue,mediatorRdfSerializeMediatypes:ne,mediatorRdfSerialize:re,name:"urn:comunica:default:rdf-update-hypermedia/actors#put-ldp",bus:S}),new(r(58916).ActorRdfUpdateHypermediaSparql)({mediatorHttp:ue,checkUrlSuffixSparql:!0,checkUrlSuffixUpdate:!0,name:"urn:comunica:default:rdf-update-hypermedia/actors#sparql",bus:S}),new(r(57321).ActorQueryOperationAsk)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#ask",bus:A}),new(r(20888).ActorQueryOperationBgpJoin)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#bgp",bus:A}),new(r(88749).ActorQueryOperationConstruct)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#construct",bus:A}),new(r(13867).ActorQueryOperationDistinctHash)({mediatorHashBindings:M,mediatorHashQuads:L,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#distinct",bus:A}),new(r(37572).ActorQueryOperationFromQuad)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#from",bus:A}),new(r(98893).ActorQueryOperationProject)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#project",bus:A}),new(r(16909).ActorQueryOperationReducedHash)({mediatorHashBindings:M,cacheSize:100,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#reduced",bus:A}),new(r(14922).ActorQueryOperationSlice)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#slice",bus:A}),new(r(19779).ActorQueryOperationUnion)({mediatorRdfMetadataAccumulate:J,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#union",bus:A}),new(r(16733).ActorQueryOperationPathAlt)({mediatorRdfMetadataAccumulate:J,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-alt",bus:A}),new(r(88317).ActorQueryOperationPathInv)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-inv",bus:A}),new(r(91430).ActorQueryOperationPathLink)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-link",bus:A}),new(r(56993).ActorQueryOperationPathNps)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-nps",bus:A}),new(r(75233).ActorQueryOperationClear)({mediatorUpdateQuads:oe,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#update-clear",bus:A}),new(r(57886).ActorQueryOperationUpdateCompositeUpdate)({mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#update-composite",bus:A}),new(r(14876).ActorQueryOperationCreate)({mediatorUpdateQuads:oe,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#update-create",bus:A}),new(r(82465).ActorQueryOperationDrop)({mediatorUpdateQuads:oe,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#update-drop",bus:A}),new(r(29796).ActorQueryOperationLoad)({mediatorUpdateQuads:oe,mediatorQuerySourceIdentify:pe,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#update-load",bus:A}),new(r(40980).ActorQueryOperationJoin)({mediatorJoin:he,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#join",bus:A}),new(r(19948).ActorQueryOperationMinus)({mediatorJoin:he,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#minus",bus:A}),new(r(28261).ActorQueryOperationPathSeq)({mediatorJoin:he,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-seq",bus:A}),new(r(68841).ActorRdfJoinMultiSmallest)({mediatorJoinEntriesSort:z,mediatorJoin:he,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-multi-smallest",bus:P}),new(r(92107).ActorRdfJoinMultiSmallestFilterBindings)({selectivityModifier:1e-4,blockSize:64,mediatorJoinEntriesSort:z,mediatorJoin:he,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-multi-smallest-filter-bindings",bus:P}),new(r(48989).ActorOptimizeQueryOperationFilterPushdown)({aggressivePushdown:!1,maxIterations:10,splitConjunctive:!0,mergeConjunctive:!0,pushIntoLeftJoins:!0,pushEqualityIntoPatterns:!0,name:"urn:comunica:default:optimize-query-operation/actors#filter-pushdown",bus:s,beforeActors:[k]})),we=(new(r(68132).ActorDereferenceHttp)({mediatorHttp:ue,maxAcceptHeaderLength:1024,maxAcceptHeaderLengthBrowser:128,name:"urn:comunica:default:dereference/actors#http",bus:d,beforeActors:[$]}),new(r(48230).ActorHttpProxy)({mediatorHttp:ue,name:"urn:comunica:default:http/actors#proxy",bus:E,beforeActors:[se]}),new(r(90807).ActorContextPreprocessQuerySourceIdentify)({cacheSize:100,httpInvalidator:fe,mediatorQuerySourceIdentify:pe,mediatorContextPreprocess:C,name:"urn:comunica:default:context-preprocess/actors#query-source-identify",bus:i,beforeActors:[j]}),new(r(15729).ActorInitQuery)({mediatorQueryProcess:de,mediatorQueryResultSerialize:U,mediatorQueryResultSerializeMediaTypeCombiner:q,mediatorQueryResultSerializeMediaTypeFormatCombiner:V,mediatorHttpInvalidate:ye,defaultQueryInputFormat:"sparql",allowNoSources:!1,name:"urn:comunica:default:init/actors#query",bus:n})),Te=(new(r(88297).ActorRdfUpdateQuadsHypermedia)({cacheSize:100,httpInvalidator:ge,mediatorDereferenceRdf:G,mediatorMetadata:X,mediatorMetadataExtract:W,mediatorRdfUpdateHypermedia:ae,name:"urn:comunica:default:rdf-update-quads/actors#hypermedia",bus:O}),new(r(34593).ActionObserverHttp)({httpInvalidator:me,name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^3.0.0/components/ActorQueryResultSerializeSparqlJson.jsonld#ActorQueryResultSerializeSparqlJson_default_observer",bus:E})),Se=new(r(13900).ActionObserverHttp)({httpInvalidator:be,name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^3.0.0/components/ActorQueryResultSerializeStats.jsonld#ActorQueryResultSerializeStats_default_observer",bus:E}),Oe=(new(r(52378).ActorQuerySourceIdentifyHypermediaQpf)({mediatorMetadata:X,mediatorMetadataExtract:W,mediatorDereferenceRdf:G,mediatorMergeBindingsContext:ve,subjectUri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#subject",predicateUri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate",objectUri:"http://www.w3.org/1999/02/22-rdf-syntax-ns#object",graphUri:"http://www.w3.org/ns/sparql-service-description#graph",name:"urn:comunica:default:query-source-identify-hypermedia/actors#qpf",bus:l}),new(r(16025).ActorQuerySourceIdentifyHypermediaSparql)({mediatorHttp:ue,mediatorMergeBindingsContext:ve,checkUrlSuffix:!0,forceHttpGet:!1,cacheSize:1024,bindMethod:"values",countTimeout:3e3,name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#sparql",bus:l}),new(r(44538).ActorQuerySourceIdentifyHypermediaNone)({mediatorMergeBindingsContext:ve,name:"urn:comunica:default:query-source-identify-hypermedia/actors#none",bus:l}),new(r(19724).ActorQueryOperationExtend)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#extend",bus:A}),new(r(74578).ActorQueryOperationFilter)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#filter",bus:A}),new(r(47007).ActorQueryOperationGroup)({mediatorHashBindings:M,mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#group",bus:A}),new(r(33149).ActorQueryOperationLeftJoin)({mediatorJoin:he,mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#leftjoin",bus:A}),new(r(35021).ActorQueryOperationNop)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#nop",bus:A}),new(r(80797).ActorQueryOperationOrderBy)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#orderby",bus:A}),new(r(89375).ActorQueryOperationService)({forceSparqlEndpoint:!1,mediatorMergeBindingsContext:ve,mediatorQuerySourceIdentify:pe,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#service",bus:A}),new(r(14702).ActorQueryOperationValues)({mediatorMergeBindingsContext:ve,name:"urn:comunica:default:query-operation/actors#values",bus:A}),new(r(90658).ActorQueryOperationPathOneOrMore)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-one-or-more",bus:A}),new(r(60436).ActorQueryOperationPathZeroOrMore)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-zero-or-more",bus:A}),new(r(32091).ActorQueryOperationPathZeroOrOne)({mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#path-zero-or-one",bus:A}),new(r(21638).ActorQueryOperationUpdateDeleteInsert)({mediatorUpdateQuads:oe,mediatorMergeBindingsContext:ve,mediatorQueryOperation:le,name:"urn:comunica:default:query-operation/actors#update-delete-insert",bus:A}),new(r(94739).ActorQueryProcessSequential)({mediatorContextPreprocess:C,mediatorQueryParse:B,mediatorOptimizeQueryOperation:F,mediatorQueryOperation:le,mediatorMergeBindingsContext:ve,name:"urn:comunica:default:query-process/actors#sequential",bus:R})),Ee=new(r(57789).ActorQuerySourceIdentifyHypermedia)({cacheSize:100,maxIterators:64,aggregateTraversalStore:!0,mediatorDereferenceRdf:G,mediatorMetadata:X,mediatorMetadataExtract:W,mediatorMetadataAccumulate:J,mediatorQuerySourceIdentifyHypermedia:Q,mediatorRdfResolveHypermediaLinks:ee,mediatorRdfResolveHypermediaLinksQueue:te,mediatorMergeBindingsContext:ve,name:"urn:comunica:default:query-source-identify/actors#hypermedia",bus:I}),xe=(new(r(498).ActorRdfJoinNone)({mediatorMergeBindingsContext:ve,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-none",bus:P}),new(r(82331).ActorRdfJoinMultiBind)({bindOrder:"depth-first",selectivityModifier:1e-4,minMaxCardinalityRatio:60,mediatorJoinEntriesSort:z,mediatorQueryOperation:le,mediatorMergeBindingsContext:ve,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#inner-multi-bind",bus:P}),new(r(64305).ActorRdfJoinOptionalBind)({bindOrder:"depth-first",selectivityModifier:1e-6,mediatorQueryOperation:le,mediatorMergeBindingsContext:ve,mediatorJoinSelectivity:K,name:"urn:comunica:default:rdf-join/actors#optional-bind",bus:P}),new(r(34593).ActorQueryResultSerializeSparqlJson)({emitMetadata:!0,httpObserver:Te,mediaTypePriorities:{"application/sparql-results+json":.8},mediaTypeFormats:{"application/sparql-results+json":"http://www.w3.org/ns/formats/SPARQL_Results_JSON"},name:"urn:comunica:default:query-result-serialize/actors#sparql-json",bus:u}),new(r(13900).ActorQueryResultSerializeStats)({httpObserver:Se,mediaTypePriorities:{stats:.5},mediaTypeFormats:{stats:"https://comunica.linkeddatafragments.org/#results_stats"},name:"urn:comunica:default:query-result-serialize/actors#stats",bus:u}),new(r(68383).ActorQueryProcessExplainParsed)({queryProcessor:Oe,name:"urn:comunica:default:query-process/actors#explain-parsed",bus:R}),new(r(70605).ActorQueryProcessExplainLogical)({queryProcessor:Oe,name:"urn:comunica:default:query-process/actors#explain-logical",bus:R}),new(r(54395).ActorQueryProcessExplainPhysical)({queryProcessor:Oe,name:"urn:comunica:default:query-process/actors#explain-physical",bus:R}),new(r(94607).ActorOptimizeQueryOperationPruneEmptySourceOperations)({useAskIfSupported:!1,name:"urn:comunica:default:optimize-query-operation/actors#prune-empty-source-operations",bus:s,beforeActors:[_e]})),Ae=(new(r(27474).ActorQuerySourceIdentifyRdfJs)({mediatorMergeBindingsContext:ve,name:"urn:comunica:default:query-source-identify/actors#rdfjs",bus:I,beforeActors:[Ee]}),new(r(84701).ActorQuerySourceIdentifySerialized)({mediatorRdfParse:Y,mediatorQuerySourceIdentify:pe,name:"urn:comunica:default:query-source-identify/actors#serialized",bus:I,beforeActors:[Ee]}),new(r(98498).ActorOptimizeQueryOperationJoinConnected)({name:"urn:comunica:default:optimize-query-operation/actors#join-connected",bus:s,beforeActors:[xe]})),Re=new(r(28084).ActorOptimizeQueryOperationBgpToJoin)({name:"urn:comunica:default:optimize-query-operation/actors#bgp-to-join",bus:s,beforeActors:[Ae]}),Ie=new(r(46980).ActorOptimizeQueryOperationJoinBgp)({name:"urn:comunica:default:optimize-query-operation/actors#join-bgp",bus:s,beforeActors:[Re]}),Pe=new(r(94741).ActorOptimizeQueryOperationAssignSourcesExhaustive)({name:"urn:comunica:default:optimize-query-operation/actors#assign-sources-exhaustive",bus:s,beforeActors:[Ie]});return new(r(78571).ActorOptimizeQueryOperationDescribeToConstructsSubject)({name:"urn:comunica:default:optimize-query-operation/actors#describe-to-constructs-subject",bus:s,beforeActors:[Pe]}),we}},45747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryEngine=void 0;const n=r(15729),i=r(99894);class a extends n.QueryEngineBase{constructor(e=i()){super(e)}}t.QueryEngine=a},90128:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(45747),t)},18423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractMediaTyped=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}async run(e){if("handle"in e){const t=e;return{handle:await this.runHandle(t.handle,t.handleMediaType,e.context)}}if("mediaTypes"in e)return{mediaTypes:await this.getMediaTypes(e.context)};if("mediaTypeFormats"in e)return{mediaTypeFormats:await this.getMediaTypeFormats(e.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}async test(e){if("handle"in e){const t=e;return{handle:await this.testHandle(t.handle,t.handleMediaType,e.context)}}if("mediaTypes"in e)return{mediaTypes:await this.testMediaType(e.context)};if("mediaTypeFormats"in e)return{mediaTypeFormats:await this.testMediaTypeFormats(e.context)};throw new Error("Either a handle, mediaTypes or mediaTypeFormats action needs to be provided")}}t.ActorAbstractMediaTyped=i},44405:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractMediaTypedFixed=void 0;const n=r(18423);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e);const t=this.priorityScale||0===this.priorityScale?this.priorityScale:1;if(this.mediaTypePriorities)for(const[e,[r,n]]of Object.entries(this.mediaTypePriorities).entries())this.mediaTypePriorities[r]=t*n;this.mediaTypePriorities=Object.freeze(this.mediaTypePriorities),this.mediaTypeFormats=Object.freeze(this.mediaTypeFormats)}async testHandle(e,t,r){if(!t||!(t in this.mediaTypePriorities))throw new Error(`Unrecognized media type: ${t}`);return await this.testHandleChecked(e,r)}async testMediaType(e){return!0}async getMediaTypes(e){return this.mediaTypePriorities}async testMediaTypeFormats(e){return!0}async getMediaTypeFormats(e){return this.mediaTypeFormats}}t.ActorAbstractMediaTypedFixed=i},75560:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(18423),t),i(r(44405),t)},96331:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorAbstractPath=void 0;const n=r(59510),i=r(32227),a=r(76664),o=r(18050),s=r(22112),c=r(31578),u=r(29345),l=new o.DataFactory;class d extends n.ActorQueryOperationTypedMediated{constructor(e,t){super(e,"path"),this.predicateType=t}async testOperation(e,t){if(e.predicate.type!==this.predicateType)throw new Error(`This Actor only supports ${this.predicateType} Path operations.`);return!0}generateVariable(e,t){return t?!e||e.subject.value!==t&&e.object.value!==t?l.variable(t):this.generateVariable(e,`${t}b`):this.generateVariable(e,"b")}async isPathArbitraryLengthDistinct(e,t){return e.get(i.KeysQueryOperation.isPathArbitraryLengthDistinctKey)?{context:e=e.set(i.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!1),operation:void 0}:{context:e=e.set(i.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!0),operation:n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:d.FACTORY.createDistinct(t),context:e}))}}async predicateStarGraphVariable(e,t,r,i,o,s){const c=this.getPathSources(r),u=this.generateVariable(d.FACTORY.createPath(e,r,t,i)),l=d.FACTORY.createUnion([this.assignPatternSources(d.FACTORY.createPattern(e,u,t,i),c),this.assignPatternSources(d.FACTORY.createPattern(t,u,e,i),c)]),p=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:o,operation:l})),h=new Set;return{bindingsStream:new a.MultiTransformIterator(p.bindingsStream,{multiTransform:n=>{const c=n.get(i);return h.has(c.value)?new a.EmptyIterator:(h.add(c.value),new a.TransformIterator((async()=>{const n=new a.BufferedIterator;return await this.getObjectsPredicateStar(e,r,c,o,{},n,{count:0}),n.transform({transform(e,r,n){n(s.bindings([[t,e],[i,c]])),r()}})}),{maxBufferSize:128}))},autoStart:!1}),metadata:p.metadata}}async getObjectsPredicateStarEval(e,t,r,n,i,a,o){if("Variable"===n.termType)return this.predicateStarGraphVariable(e,r,t,n,i,o);const s=new u.PathVariableObjectIterator(e,t,n,i,this.mediatorQueryOperation,a);return{bindingsStream:s.transform({autoStart:!1,transform(e,t,n){n(o.bindings([[r,e]])),t()}}),async metadata(){const e=await new Promise((e=>{s.getProperty("metadata",(t=>e(t())))}));return e.cardinality.value++,e}}}async getObjectsPredicateStar(e,t,r,i,a,o,c){const u=(0,s.termToString)(e);if(a[u])return;o._push(e),a[u]=e,c.count++;const l=this.generateVariable(),p=d.FACTORY.createPath(e,t,l,r),h=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:p,context:i}));return h.bindingsStream.on("data",(async e=>{const n=e.get(l);await this.getObjectsPredicateStar(n,t,r,i,a,o,c)})),h.bindingsStream.on("end",(()=>{0==--c.count&&o.close()})),h.metadata}async getSubjectAndObjectBindingsPredicateStar(e,t,r,i,a,o,c,u,l,p,h,f){const y=(0,s.termToString)(i)+(0,s.termToString)(o);if(l[y])return;if(h.count++,l[y]=!0,p._push(f.bindings([[e,r],[t,i]])),y in u){const n=await u[y];for(const i of n)await this.getSubjectAndObjectBindingsPredicateStar(e,t,r,i,a,o,c,u,l,p,h,f);return void(0==--h.count&&p.close())}const g=new Promise((async(s,y)=>{const g=[],m=this.generateVariable(),b=d.FACTORY.createPath(i,a,m,o),v=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:b,context:c}));v.bindingsStream.on("data",(async n=>{const i=n.get(m);g.push(i),await this.getSubjectAndObjectBindingsPredicateStar(e,t,r,i,a,o,c,u,l,p,h,f)})),v.bindingsStream.on("error",y),v.bindingsStream.on("end",(()=>{0==--h.count&&p.close(),s(g)}))}));u[y]=g}getPathSources(e){switch(e.type){case c.Algebra.types.ALT:case c.Algebra.types.SEQ:return e.input.flatMap((e=>this.getPathSources(e)));case c.Algebra.types.INV:case c.Algebra.types.ONE_OR_MORE_PATH:case c.Algebra.types.ZERO_OR_MORE_PATH:case c.Algebra.types.ZERO_OR_ONE_PATH:return this.getPathSources(e.path);case c.Algebra.types.LINK:case c.Algebra.types.NPS:{const t=n.ActorQueryOperation.getOperationSource(e);if(!t)throw new Error("Could not find a required source on a link path operation");return[t]}}}assignPatternSources(e,t){if(0===t.length)throw new Error("Attempted to assign zero sources to a pattern during property path handling");return 1===t.length?n.ActorQueryOperation.assignOperationSource(e,t[0]):d.FACTORY.createUnion(t.map((t=>n.ActorQueryOperation.assignOperationSource(e,t))),!0)}}t.ActorAbstractPath=d,d.FACTORY=new c.Factory},29345:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PathVariableObjectIterator=void 0;const n=r(59510),i=r(76664),a=r(18050),o=r(22112),s=r(31578),c=new a.DataFactory,u=new s.Factory;class l extends i.BufferedIterator{constructor(e,t,r,n,i,a,o=16){super({autoStart:!0}),this.subject=e,this.predicate=t,this.graph=r,this.context=n,this.mediatorQueryOperation=i,this.maxRunningOperations=o,this.termHashes=new Map,this.runningOperations=[],this.pendingOperations=[],this._push(this.subject,a)}_end(e){for(const e of this.runningOperations)e.destroy();super._end(e)}_push(e,t=!0){let r;if(t&&(r=(0,o.termToString)(e),this.termHashes.has(r)))return;const n=c.variable("b");this.pendingOperations.push({variable:n,operation:u.createPath(e,this.predicate,n,this.graph)}),r&&(this.termHashes.set(r,e),super._push(e))}_read(e,t){const r=this;(async function(){for(;r.runningOperations.lengthr.destroy(e))),i.on("readable",(()=>{r.readable=!0,r._fillBufferAsync()})),i.on("end",(()=>{r.runningOperations.splice(r.runningOperations.indexOf(i),1),r.readable=!0,r._fillBufferAsync()}))),r.setProperty("metadata",t.metadata)}let t,i=0;for(;i!==(i=e);)for(let n=0;n0;n++)null!==(t=r.runningOperations[n].read())&&(e--,r._push(t));0===r.runningOperations.length&&0===r.pendingOperations.length&&r.close()})().then((()=>{t()}),(e=>this.destroy(e)))}}t.PathVariableObjectIterator=l},43543:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(96331),t),i(r(29345),t)},53927:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessConvertShortcuts=void 0;const n=r(32362),i=r(34368);class a extends n.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){return{context:a.expandShortcuts(e.context,this.contextKeyShortcuts)}}static expandShortcuts(e,t){for(const r of e.keys())t[r.name]&&(e=e.set(new i.ActionContextKey(t[r.name]),e.get(r)).delete(r));return e}}t.ActorContextPreprocessConvertShortcuts=a},36251:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(53927),t)},80352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessQuerySourceIdentify=void 0;const n=r(32362),i=r(32227),a=r(34368),o=r(35069);class s extends n.ActorContextPreprocess{constructor(e){super(e),this.cache=this.cacheSize?new o.LRUCache({max:this.cacheSize}):void 0;const t=this.cache;t&&this.httpInvalidator.addInvalidateListener((({url:e})=>e?t.delete(e):t.clear()))}async test(e){return!0}async run(e){let t=e.context;if(t.has(i.KeysInitQuery.querySourcesUnidentified)){const r=e.context.get(i.KeysInitQuery.querySourcesUnidentified),n=await Promise.all(r.map((e=>this.expandSource(e)))),a=await Promise.all(n.map((async t=>this.identifySource(t,e.context))));t=e.context.delete(i.KeysInitQuery.querySourcesUnidentified).set(i.KeysQueryOperation.querySources,a)}return{context:t}}async expandSource(e){return"string"==typeof e||"match"in e?{value:e}:{...e,context:(await this.mediatorContextPreprocess.mediate({context:a.ActionContext.ensureActionContext(e.context??{})})).context}}identifySource(e,t){let r;return"string"==typeof e.value&&this.cache&&(r=this.cache.get(e.value)),r||(r=this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:e,context:t}).then((({querySource:e})=>e)),"string"==typeof e.value&&this.cache&&this.cache.set(e.value,r)),r}}t.ActorContextPreprocessQuerySourceIdentify=s},90807:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(80352),t)},16646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessQuerySourceSkolemize=void 0;const n=r(32362),i=r(32227),a=r(84078),o=r(50339);class s extends n.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){let t=e.context;if(t.has(i.KeysQueryOperation.querySources)){t.has(i.KeysQuerySourceIdentify.sourceIds)||(t=t.set(i.KeysQuerySourceIdentify.sourceIds,new Map));const e=t.getSafe(i.KeysQuerySourceIdentify.sourceIds);let r=t.getSafe(i.KeysQueryOperation.querySources);r=r.map((t=>({source:new a.QuerySourceSkolemized(t.source,(0,o.getSourceId)(e,t.source)),context:t.context}))),t=t.set(i.KeysQueryOperation.querySources,r)}return{context:t}}}t.ActorContextPreprocessQuerySourceSkolemize=s},84078:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceSkolemized=void 0;const n=r(72394),i=r(76664),a=r(50339);t.QuerySourceSkolemized=class{constructor(e,t){this.innerSource=e,this.sourceId=t}async getSelectorShape(e){return this.innerSource.getSelectorShape(e)}queryBindings(e,t,r){const o=(0,a.deskolemizeOperation)(e,this.sourceId);if(!o){const e=new i.ArrayIterator([],{autoStart:!1});return e.setProperty("metadata",{state:new n.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:[]}),e}return(0,a.skolemizeBindingsStream)(this.innerSource.queryBindings(o,t,r),this.sourceId)}queryBoolean(e,t){return this.innerSource.queryBoolean(e,t)}queryQuads(e,t){const r=(0,a.deskolemizeOperation)(e,this.sourceId);if(!r){const e=new i.ArrayIterator([],{autoStart:!1});return e.setProperty("metadata",{state:new n.MetadataValidationState,cardinality:{type:"exact",value:0}}),e}return(0,a.skolemizeQuadStream)(this.innerSource.queryQuads(r,t),this.sourceId)}queryVoid(e,t){return this.innerSource.queryVoid(e,t)}get referenceValue(){return this.innerSource.referenceValue}toString(){return`${this.innerSource.toString()}(SkolemID:${this.sourceId})`}}},35106:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(16646),t),i(r(84078),t),i(r(50339),t)},50339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deskolemizeOperation=t.deskolemizeQuad=t.deskolemizeTermNestedThrowing=t.deskolemizeTerm=t.skolemizeBindingsStream=t.skolemizeQuadStream=t.skolemizeBindings=t.skolemizeQuad=t.skolemizeTerm=t.getSourceId=t.SKOLEM_PREFIX=void 0;const n=r(85156),i=r(18050),a=r(13252),o=r(31578),s=new i.DataFactory;function c(e,r){return"BlankNode"===e.termType?new n.BlankNodeScoped(`bc_${r}_${e.value}`,s.namedNode(`${t.SKOLEM_PREFIX}${r}:${e.value}`)):e}function u(e,t){return(0,a.mapTermsNested)(e,(e=>c(e,t)))}function l(e,t){return e.map((e=>"Quad"===e.termType?u(e,t):c(e,t)))}function d(e,r){if("BlankNode"===e.termType&&"skolemized"in e&&(e=e.skolemized),"NamedNode"===e.termType&&e.value.startsWith(t.SKOLEM_PREFIX)){const n=e.value.indexOf(":",t.SKOLEM_PREFIX.length);if(e.value.slice(t.SKOLEM_PREFIX.length,n)===r){const t=e.value.slice(n+1,e.value.length);return s.blankNode(t)}return null}return e}function p(e,t){if("Quad"===e.termType)return(0,a.mapTermsNested)(e,(e=>{const r=d(e,t);if(!r)throw new Error("Skolemized term is not in scope for this source");return r}));const r=d(e,t);if(null===r)throw new Error("Skolemized term is not in scope for this source");return r}t.SKOLEM_PREFIX="urn:comunica_skolem:source_",t.getSourceId=function(e,t){let r=e.get(t.referenceValue);return void 0===r&&(r=`${e.size}`,e.set(t.referenceValue,r)),r},t.skolemizeTerm=c,t.skolemizeQuad=u,t.skolemizeBindings=l,t.skolemizeQuadStream=function(e,t){const r=e.map((e=>u(e,t)));return function t(){e.getProperty("metadata",(e=>{r.setProperty("metadata",e),e.state.addInvalidateListener(t)}))}(),r},t.skolemizeBindingsStream=function(e,t){const r=e.map((e=>l(e,t)));return function t(){e.getProperty("metadata",(e=>{r.setProperty("metadata",e),e.state.addInvalidateListener(t)}))}(),r},t.deskolemizeTerm=d,t.deskolemizeTermNestedThrowing=p,t.deskolemizeQuad=function(e,t){return(0,a.mapTermsNested)(e,(e=>d(e,t)??e))},t.deskolemizeOperation=function(e,t){try{return o.Util.mapOperation(e,{[o.Algebra.types.PATTERN]:(e,r)=>({result:Object.assign(r.createPattern(p(e.subject,t),p(e.predicate,t),p(e.object,t),p(e.graph,t)),{metadata:e.metadata}),recurse:!1}),[o.Algebra.types.PATH]:(e,r)=>({result:Object.assign(r.createPath(p(e.subject,t),e.predicate,p(e.object,t),p(e.graph,t)),{metadata:e.metadata}),recurse:!1})})}catch{}}},65239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessSetDefaults=void 0;const n=r(32362),i=r(32227);class a extends n.ActorContextPreprocess{constructor(e){super(e),this.defaultFunctionArgumentsCache={}}async test(e){return!0}async run(e){let t=e.context;if(e.initialize){t=t.setDefault(i.KeysInitQuery.queryTimestamp,new Date).setDefault(i.KeysQuerySourceIdentify.sourceIds,new Map).setDefault(i.KeysCore.log,this.logger).setDefault(i.KeysInitQuery.functionArgumentsCache,this.defaultFunctionArgumentsCache).setDefault(i.KeysQuerySourceIdentify.hypermediaSourcesAggregatedStores,new Map);let e={language:"sparql",version:"1.1"};t.has(i.KeysInitQuery.queryFormat)?(e=t.get(i.KeysInitQuery.queryFormat),"graphql"===e.language&&(t=t.setDefault(i.KeysInitQuery.graphqlSingularizeVariables,{}))):t=t.set(i.KeysInitQuery.queryFormat,e)}return{context:t}}}t.ActorContextPreprocessSetDefaults=a},35451:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(65239),t)},58952:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocessSourceToDestination=void 0;const n=r(32362),i=r(32227);class a extends n.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){if(e.context.get(i.KeysInitQuery.querySourcesUnidentified)&&!e.context.get(i.KeysRdfUpdateQuads.destination)){const t=e.context.get(i.KeysInitQuery.querySourcesUnidentified);if(1===t.length)return{context:e.context.set(i.KeysRdfUpdateQuads.destination,t[0])}}return e}}t.ActorContextPreprocessSourceToDestination=a},41670:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(58952),t)},1741:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceFallback=void 0;const n=r(47702);class i extends n.ActorDereference{constructor(e){super(e)}async test(e){return!0}async run(e){return this.handleDereferenceErrors(e,new Error(`Could not dereference '${e.url}'`))}}t.ActorDereferenceFallback=i},35878:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(1741),t)},3968:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceHttp=void 0;const n=r(60376);class i extends n.ActorDereferenceHttpBase{getMaxAcceptHeaderLength(){return this.maxAcceptHeaderLengthBrowser}}t.ActorDereferenceHttp=i},60376:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceHttpBase=t.mediaTypesToAcceptString=void 0;const n=r(47702),i=r(74870),a=r(31759),o=r(10288),s=r(9929),c=/^[^ ;]*/u;function u(e,t){const r=[],n=Object.entries(e).map((([e,t])=>({mediaType:e,priority:t}))).sort(((e,t)=>t.priority===e.priority?e.mediaType.localeCompare(t.mediaType):t.priority-e.priority));let i=n.length-1;for(const{mediaType:e,priority:a}of n){const n=e+(1===a?"":`;q=${a.toFixed(3).replace(/0*$/u,"")}`);if(i+n.length>t){for(;i+9>t;)i-=(r.pop()??"").length+1;r.push("*/*;q=0.1");break}r.push(n),i+=n.length}return 0===r.length?"*/*":r.join(",")}t.mediaTypesToAcceptString=u;class l extends n.ActorDereference{constructor(e){super(e)}async test({url:e}){if(!/^https?:/u.test(e))throw new Error(`Cannot retrieve ${e} because it is not an HTTP(S) URL.`);return!0}async run(e){let t=!0;const r=new o.Headers(e.headers);let l;r.append("Accept",u(await(e.mediaTypes?.())??{},this.getMaxAcceptHeaderLength()));const d=Date.now();try{l=await this.mediatorHttp.mediate({context:e.context,init:{headers:r,method:e.method},input:e.url})}catch(t){return this.handleDereferenceErrors(e,t)}const p=(0,s.resolve)(l.url,e.url),h=Date.now()-d;if(200!==l.status){t=!1;const r=l.body?await(0,a.stringify)(i.ActorHttp.toNodeReadable(l.body)):"empty response";if(!e.acceptErrors){const t=new Error(`Could not retrieve ${e.url} (HTTP status ${l.status}):\n${r}`);return this.handleDereferenceErrors(e,t,l.headers,h)}}const f=c.exec(l.headers.get("content-type")??"")?.[0];return{url:p,data:t?i.ActorHttp.toNodeReadable(l.body):(0,n.emptyReadable)(),exists:t,requestTime:h,headers:l.headers,mediaType:"text/plain"===f?void 0:f}}}t.ActorDereferenceHttpBase=l},68132:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(3968),t),i(r(60376),t)},96636:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceRdfParse=void 0;const n=r(53583);class i extends n.ActorDereferenceRdf{constructor(e){super(e)}async getMetadata(e){return{baseIRI:e.url}}}t.ActorDereferenceRdfParse=i},54341:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(96636),t)},48040:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashBindingsSha1=void 0;const n=r(38431),i=r(99499),a=r(22112),o=r(62168);class s extends n.ActorHashBindings{async test(e){if(!e.allowHashCollisions)throw new Error(`Actor ${this.name} can not provide hash functions without hash collisions`);return!0}async run(e){return{hashFunction:e=>(0,i.sha1)().update(o(Object.fromEntries([...e].map((([e,t])=>[(0,a.termToString)(e),(0,a.termToString)(t)]))))).digest("hex"),hashCollisions:!0}}}t.ActorHashBindingsSha1=s},11150:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(48040),t)},66748:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashQuadsSha1=void 0;const n=r(16179),i=r(99499),a=r(22112);class o extends n.ActorHashQuads{async test(e){if(!e.allowHashCollisions)throw new Error(`Actor ${this.name} can not provide hash functions without hash collisions`);return!0}async run(e){return{hashFunction:e=>(0,i.sha1)().update(JSON.stringify((0,a.quadToStringQuad)(e))).digest("hex"),hashCollisions:!0}}}t.ActorHashQuadsSha1=o},64188:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(66748),t)},51803:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpFetch=void 0;const n=r(74870),i=r(32227);r(90482);const a=r(63562);class o extends n.ActorHttp{constructor(e){super(e),this.userAgent=o.createUserAgent(),this.fetchInitPreprocessor=new a.FetchInitPreprocessor(e.agentOptions)}static createUserAgent(){return`Comunica/actor-http-fetch (${void 0===globalThis.navigator?`Node.js ${process.version}; ${process.platform}`:`Browser-${globalThis.navigator.userAgent}`})`}async test(e){return{time:Number.POSITIVE_INFINITY}}static async getResponse(e,t,r,n,i,a){let o,s=n+1;for(;s-- >0;)try{const n=await e(t,r);if(a&&n.status>=500&&n.status<600)throw new Error(`Server replied with response code ${n.status}: ${n.statusText}`);return n}catch(e){if(o=e,r.signal?.aborted)throw e;s>0&&await new Promise(((e,t)=>{setTimeout(e,i),r.signal?.addEventListener("abort",(()=>{t(new Error("Fetch aborted by timeout."))}))}))}throw n>0?new Error(`Number of fetch retries (${n}) exceeded. Last error: ${String(o)}`):o}async run(e){const t=e.init?.headers??{};e.init=e.init??{},e.init.headers=new Headers(t),e.init.headers.has("user-agent")||e.init.headers.append("user-agent",this.userAgent);const r=e.context.get(i.KeysHttp.auth);r&&e.init.headers.append("Authorization",`Basic ${Buffer.from(r).toString("base64")}`),this.logInfo(e.context,`Requesting ${"string"==typeof e.input?e.input:e.input.url}`,(()=>({headers:n.ActorHttp.headersToHash(new Headers(e.init.headers)),method:e.init.method??"GET"}))),e.init?.headers&&"append"in e.init.headers&&e.context.has(i.KeysHttp.fetch)&&(e.init.headers=n.ActorHttp.headersToHash(e.init.headers));let a={...e.init};e.context.get(i.KeysHttp.includeCredentials)&&(a.credentials="include");const s=e.context?.get(i.KeysHttp.httpTimeout);let c,u;if(void 0!==s){const e=await this.fetchInitPreprocessor.createAbortController();a.signal=e.signal,u=()=>e.abort(),c=setTimeout((()=>u()),s)}try{a=await this.fetchInitPreprocessor.handle(a);const t=e.context?.get(i.KeysHttp.httpRetryCount)??0,r=e.context?.get(i.KeysHttp.httpRetryDelay)??0,n=e.context?.get(i.KeysHttp.httpRetryOnServerError)??!1,s=e.context?.get(i.KeysHttp.fetch),l=await o.getResponse(s??fetch,e.input,a,t,r,n);return void 0!==c&&(e.context?.get(i.KeysHttp.httpBodyTimeout)&&l.body?(u=()=>l.body?.cancel(new Error(`HTTP timeout when reading the body of ${l.url}.\nThis error can be disabled by modifying the 'httpBodyTimeout' and/or 'httpTimeout' options.`)),l.body.on("close",(()=>{clearTimeout(c)}))):clearTimeout(c)),l.body&&!l.body.cancel&&(l.body.cancel=async e=>{l.body.destroy(e),void 0!==c&&clearTimeout(c)}),l}catch(e){throw void 0!==c&&clearTimeout(c),e}}}t.ActorHttpFetch=o},63562:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchInitPreprocessor=void 0;const n=r(74870);t.FetchInitPreprocessor=class{async handle(e){if(e.headers){const t=new Headers(e.headers);t.has("user-agent")&&t.delete("user-agent"),e.headers=t}if(e?.headers&&"append"in e.headers&&(e.headers=n.ActorHttp.headersToHash(e.headers)),e.body&&"string"!=typeof e.body&&"getReader"in e.body){const t=e.body.getReader(),r=[];for(;;){const{done:e,value:n}=await t.read();if(e)break;r.push(n)}e.body=r.join("")}return{keepalive:!e.body,...e}}async createAbortController(){return new AbortController}}},28590:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(51803),t)},57643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpProxy=void 0;const n=r(74870),i=r(32227);class a extends n.ActorHttp{constructor(e){super(e)}async test(e){const t=e.context.get(i.KeysHttpProxy.httpProxyHandler);if(!t)throw new Error(`Actor ${this.name} could not find a proxy handler in the context.`);if(!await t.getProxy(e))throw new Error(`Actor ${this.name} could not determine a proxy for the given request.`);return{time:Number.POSITIVE_INFINITY}}async run(e){const t="string"==typeof e.input?e.input:e.input.url,r=e.context.get(i.KeysHttpProxy.httpProxyHandler),n=await this.mediatorHttp.mediate({...await r.getProxy(e),context:e.context.delete(i.KeysHttpProxy.httpProxyHandler)});return Object.defineProperty(n,"url",{configurable:!0,enumerable:!0,get:()=>n.headers.get("x-final-url")??t}),n}}t.ActorHttpProxy=a},76862:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyHandlerStatic=void 0,t.ProxyHandlerStatic=class{constructor(e){this.prefixUrl=e}async getProxy(e){return{init:e.init,input:this.modifyInput(e.input)}}modifyInput(e){return"string"==typeof e?this.prefixUrl+e:new Request(this.prefixUrl+e.url,e)}}},48230:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(57643),t),i(r(76862),t)},363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpWayback=void 0;const n=r(74870),i=r(32227),a=r(31759);r(90482);const o="http://wayback.archive-it.org/";function s(e){const t=new Request(e.input,e.init);return{input:new Request(new URL(`/${t.url}`,o),t)}}function c(e){const t=e.get(i.KeysHttpProxy.httpProxyHandler);return t?e=>t.getProxy(s(e)):e=>Promise.resolve(s(e))}class u extends n.ActorHttp{constructor(e){super(e)}async test(e){return!0}async run(e){let t=await this.mediatorHttp.mediate(e);if(404===t.status&&e.context.get(i.KeysHttpWayback.recoverBrokenLinks)){let r=await this.mediatorHttp.mediate({...e,context:e.context.set(i.KeysHttpWayback.recoverBrokenLinks,!1).set(i.KeysHttpProxy.httpProxyHandler,{getProxy:c(e.context)})});200===r.status&&([t,r]=[r,t]);const{body:o}=r;o&&("cancel"in o&&"function"==typeof o.cancel?await o.cancel():"destroy"in o&&"function"==typeof o.destroy?o.destroy():await(0,a.stringify)(n.ActorHttp.toNodeReadable(o)))}return t}}t.ActorHttpWayback=u},55390:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(363),t)},94394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInitQuery=void 0;const n=r(59266);"undefined"==typeof process&&(globalThis.process=r(39907));class i extends n.ActorInitQueryBase{}t.ActorInitQuery=i},59266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInitQueryBase=void 0;const n=r(99784);class i extends n.ActorInit{async test(e){return!0}async run(e){throw new Error("ActorInitSparql#run is not supported in the browser.")}}t.ActorInitQueryBase=i},52295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryEngineBase=void 0;const n=r(32227),i=r(34368);class a{constructor(e){this.actorInitQuery=e}async queryBindings(e,t){return this.queryOfType(e,t,"bindings")}async queryQuads(e,t){return this.queryOfType(e,t,"quads")}async queryBoolean(e,t){return this.queryOfType(e,t,"boolean")}async queryVoid(e,t){return this.queryOfType(e,t,"void")}async queryOfType(e,t,r){const n=await this.query(e,t);if(n.resultType===r)return await n.execute();throw new Error(`Query result type '${r}' was expected, while '${n.resultType}' was found.`)}async query(e,t){const r=await this.queryOrExplain(e,t);if("explain"in r)throw new Error("Tried to explain a query when in query-only mode");return r}async explain(e,t,r){return t.explain=r,await this.queryOrExplain(e,t)}async queryOrExplain(e,t){const r=i.ActionContext.ensureActionContext(t);r.get(n.KeysInitQuery.noCache)&&await this.invalidateHttpCache();const{result:o}=await this.actorInitQuery.mediatorQueryProcess.mediate({query:e,context:r});return"explain"in o?o:a.internalToFinalResult(o)}async getResultMediaTypes(e){return e=i.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeCombiner.mediate({context:e,mediaTypes:!0})).mediaTypes}async getResultMediaTypeFormats(e){return e=i.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeFormatCombiner.mediate({context:e,mediaTypeFormats:!0})).mediaTypeFormats}async resultToString(e,t,r){if(r=i.ActionContext.ensureActionContext(r),!t)switch(e.resultType){case"bindings":t="application/json";break;case"quads":t="application/trig";break;default:t="simple"}const n={...await a.finalToInternalResult(e),context:r};return(await this.actorInitQuery.mediatorQueryResultSerialize.mediate({context:r,handle:n,handleMediaType:t})).handle}invalidateHttpCache(e,t){return t=i.ActionContext.ensureActionContext(t),this.actorInitQuery.mediatorHttpInvalidate.mediate({url:e,context:t})}static internalToFinalResult(e){switch(e.type){case"bindings":return{resultType:"bindings",execute:async()=>e.bindingsStream,metadata:async()=>await e.metadata(),context:e.context};case"quads":return{resultType:"quads",execute:async()=>e.quadStream,metadata:async()=>await e.metadata(),context:e.context};case"boolean":return{resultType:"boolean",execute:async()=>e.execute(),context:e.context};case"void":return{resultType:"void",execute:async()=>e.execute(),context:e.context}}}static async finalToInternalResult(e){switch(e.resultType){case"bindings":return{type:"bindings",bindingsStream:await e.execute(),metadata:async()=>await e.metadata()};case"quads":return{type:"quads",quadStream:await e.execute(),metadata:async()=>await e.metadata()};case"boolean":return{type:"boolean",execute:()=>e.execute()};case"void":return{type:"void",execute:()=>e.execute()}}}}t.QueryEngineBase=a},15729:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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}),t.QueryEngineBase=void 0,i(r(59266),t),i(r(94394),t);var a=r(52295);Object.defineProperty(t,"QueryEngineBase",{enumerable:!0,get:function(){return a.QueryEngineBase}})},35153:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationAssignSourcesExhaustive=void 0;const n=r(6716),i=r(59510),a=r(86789),o=r(32227),s=r(31578);class c extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.context.get(o.KeysQueryOperation.querySources)??[];if(0===t.length)return{operation:e.operation,context:e.context};if(1===t.length){const r=t[0],n=e.context.get(o.KeysRdfUpdateQuads.destination);if(!n||r.source.referenceValue===(0,a.getDataDestinationValue)(n))try{const t=await r.source.getSelectorShape(e.context);if(i.ActorQueryOperation.doesShapeAcceptOperation(t,e.operation))return{operation:i.ActorQueryOperation.assignOperationSource(e.operation,r),context:e.context}}catch{}}return{operation:this.assignExhaustive(e.operation,t),context:e.context.delete(o.KeysInitQuery.queryString)}}assignExhaustive(e,t){const r=this;return s.Util.mapOperation(e,{[s.Algebra.types.PATTERN]:(e,r)=>1===t.length?{result:i.ActorQueryOperation.assignOperationSource(e,t[0]),recurse:!1}:{result:r.createUnion(t.map((t=>i.ActorQueryOperation.assignOperationSource(e,t)))),recurse:!1},[s.Algebra.types.LINK]:(e,r)=>1===t.length?{result:i.ActorQueryOperation.assignOperationSource(e,t[0]),recurse:!1}:{result:r.createAlt(t.map((t=>i.ActorQueryOperation.assignOperationSource(e,t)))),recurse:!1},[s.Algebra.types.NPS]:(e,r)=>1===t.length?{result:i.ActorQueryOperation.assignOperationSource(e,t[0]),recurse:!1}:{result:r.createAlt(t.map((t=>i.ActorQueryOperation.assignOperationSource(e,t)))),recurse:!1},[s.Algebra.types.SERVICE]:e=>({result:e,recurse:!1}),[s.Algebra.types.CONSTRUCT]:(e,n)=>({result:n.createConstruct(r.assignExhaustive(e.input,t),e.template),recurse:!1}),[s.Algebra.types.DELETE_INSERT]:(e,n)=>({result:n.createDeleteInsert(e.delete,e.insert,e.where?r.assignExhaustive(e.where,t):void 0),recurse:!1})})}}t.ActorOptimizeQueryOperationAssignSourcesExhaustive=c},94741:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(35153),t)},37919:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationBgpToJoin=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{bgp:(e,t)=>({recurse:!1,result:t.createJoin(e.patterns)})}),context:e.context}}}t.ActorOptimizeQueryOperationBgpToJoin=a},28084:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(37919),t)},54166:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationConstructDistinct=void 0;const n=r(6716),i=r(88851),a=r(20512);class o extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(!e.context.has(i.KeysInitQuery.distinctConstruct))throw new Error(`${this.name} was not enabled by the query.`);return!0}async run(e){return{operation:a.Util.mapOperation(e.operation,{construct:(e,t)=>({recurse:!1,result:t.createDistinct(t.createConstruct(e.input,e.template))})}),context:e.context.delete(i.KeysInitQuery.distinctConstruct)}}}t.ActorOptimizeQueryOperationConstructDistinct=o},78724:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(54166),t)},64372:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationDescribeToConstructsSubject=void 0;const n=r(6716),i=r(18050),a=r(31578),o=new i.DataFactory,s=new a.Factory;class c extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(e.operation.type!==a.Algebra.types.DESCRIBE)throw new Error(`Actor ${this.name} only supports describe operations, but got ${e.operation.type}`);return!0}async run(e){const t=e.operation,r=t.terms.filter((e=>"Variable"!==e.termType)).map((e=>{const t=[o.quad(e,o.variable("__predicate"),o.variable("__object"))];return t.forEach((e=>e.type="pattern")),{input:{type:a.Algebra.types.BGP,patterns:t},template:t,type:"construct"}}));if(r.length!==t.terms.length){let e=[];t.terms.filter((e=>"Variable"===e.termType)).forEach(((t,r)=>{const n=[o.quad(t,o.variable(`__predicate${r}`),o.variable(`__object${r}`))];n.forEach((e=>e.type="pattern")),e=[...e,...n]})),r.push({input:{type:a.Algebra.types.JOIN,input:[t.input,{type:a.Algebra.types.BGP,patterns:e}]},template:e,type:a.Algebra.types.CONSTRUCT})}return{operation:s.createUnion(r,!1),context:e.context}}}t.ActorOptimizeQueryOperationDescribeToConstructsSubject=c},78571:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(64372),t)},18348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationFilterPushdown=void 0;const n=r(6716),i=r(59510),a=r(13252),o=r(31578);class s extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){let t=e.operation;const r=this;this.splitConjunctive&&(t=o.Util.mapOperation(t,{filter:(t,n)=>t.expression.expressionType===o.Algebra.expressionTypes.OPERATOR&&"&&"===t.expression.operator?(r.logDebug(e.context,`Split conjunctive filter into ${t.expression.args.length} nested filters`),{recurse:!0,result:t.expression.args.reduce(((e,t)=>n.createFilter(e,t)),t.input)}):{recurse:!0,result:t}}));const n=this.getSources(t),i=new Map(await Promise.all(n.map((async t=>[t,await t.source.getSelectorShape(e.context)]))));let a=!0,s=0;for(;a&&s1&&r.logDebug(e.context,`Pushed down filters in ${s} iterations`),this.mergeConjunctive&&(t=o.Util.mapOperation(t,{filter(t,n){if(t.input.type===o.Algebra.types.FILTER){const{nestedExpressions:i,input:a}=r.getNestedFilterExpressions(t);return r.logDebug(e.context,`Merge ${i.length} nested filters into conjunctive filter`),{recurse:!0,result:n.createFilter(a,i.slice(1).reduce(((e,t)=>n.createOperatorExpression("&&",[e,t])),i[0]))}}return{recurse:!0,result:t}}})),{operation:t,context:e.context}}shouldAttemptPushDown(e,t,r){if(this.aggressivePushdown)return!0;const n=e.expression;return n.expressionType===o.Algebra.expressionTypes.OPERATOR&&"="===n.operator&&("term"===n.args[0].expressionType&&"Variable"!==n.args[0].term.termType&&"term"===n.args[1].expressionType&&"Variable"===n.args[1].term.termType||"term"===n.args[0].expressionType&&"Variable"===n.args[0].term.termType&&"term"===n.args[1].expressionType&&"Variable"!==n.args[1].term.termType)||!!t.some((t=>i.ActorQueryOperation.doesShapeAcceptOperation(r.get(t),e)))}getSources(e){const t=new Set,r=e=>{const r=i.ActorQueryOperation.getOperationSource(e);return r&&t.add(r),!1};return o.Util.recurseOperation(e,{[o.Algebra.types.PATTERN]:r,[o.Algebra.types.LINK]:r,[o.Algebra.types.NPS]:r,[o.Algebra.types.SERVICE]:r}),[...t]}getExpressionVariables(e){switch(e.expressionType){case o.Algebra.expressionTypes.AGGREGATE:case o.Algebra.expressionTypes.WILDCARD:throw new Error(`Getting expression variables is not supported for ${e.expressionType}`);case o.Algebra.expressionTypes.EXISTENCE:return o.Util.inScopeVariables(e.input);case o.Algebra.expressionTypes.NAMED:return[];case o.Algebra.expressionTypes.OPERATOR:return(0,a.uniqTerms)(e.args.flatMap((e=>this.getExpressionVariables(e))));case o.Algebra.expressionTypes.TERM:return"Variable"===e.term.termType?[e.term]:[]}}getOverlappingOperations(e,t){const r=[],n=[],i=[];for(const a of e.input){const e=o.Util.inScopeVariables(a);this.variablesSubSetOf(t,e)?r.push(a):this.variablesIntersect(t,e)?n.push(a):i.push(a)}return{fullyOverlapping:r,partiallyOverlapping:n,notOverlapping:i}}filterPushdown(e,t,r,n,i){if(this.isExpressionFalse(e))return[!0,n.createUnion([])];if(e.type===o.Algebra.types.EXPRESSION&&e.expressionType===o.Algebra.expressionTypes.EXISTENCE)return[!1,n.createFilter(r,e)];switch(r.type){case o.Algebra.types.EXTEND:return this.variablesIntersect([r.variable],t)?[!1,n.createFilter(r,e)]:[!0,n.createExtend(this.filterPushdown(e,t,r.input,n,i)[1],r.variable,r.expression)];case o.Algebra.types.FILTER:{const[a,o]=this.filterPushdown(e,t,r.input,n,i);return[a,n.createFilter(o,r.expression)]}case o.Algebra.types.JOIN:{if(0===r.input.length)return[!1,n.createFilter(r,e)];const{fullyOverlapping:a,partiallyOverlapping:o,notOverlapping:s}=this.getOverlappingOperations(r,t),c=[];let u=!1;return a.length>0&&(u=!0,c.push(n.createJoin(a.map((r=>this.filterPushdown(e,t,r,n,i)[1]))))),o.length>0&&c.push(n.createFilter(n.createJoin(o,!1),e)),s.length>0&&c.push(...s),c.length>1&&(u=!0),u&&this.logDebug(i,`Push down filter across join entries with ${a.length} fully overlapping, ${o.length} partially overlapping, and ${s.length} not overlapping`),[u,1===c.length?c[0]:n.createJoin(c)]}case o.Algebra.types.NOP:return[!0,r];case o.Algebra.types.PROJECT:return this.variablesIntersect(r.variables,t)?[!0,n.createProject(this.filterPushdown(e,t,r.input,n,i)[1],r.variables)]:[!0,r];case o.Algebra.types.UNION:{const{fullyOverlapping:a,partiallyOverlapping:o,notOverlapping:s}=this.getOverlappingOperations(r,t),c=[];let u=!1;return a.length>0&&(u=!0,c.push(n.createUnion(a.map((r=>this.filterPushdown(e,t,r,n,i)[1]))))),o.length>0&&c.push(n.createFilter(n.createUnion(o,!1),e)),s.length>0&&c.push(...s),c.length>1&&(u=!0),u&&this.logDebug(i,`Push down filter across union entries with ${a.length} fully overlapping, ${o.length} partially overlapping, and ${s.length} not overlapping`),[u,1===c.length?c[0]:n.createUnion(c)]}case o.Algebra.types.VALUES:return this.variablesIntersect(r.variables,t)?[!1,n.createFilter(r,e)]:[!0,r];case o.Algebra.types.LEFT_JOIN:if(this.pushIntoLeftJoins){const a=o.Util.inScopeVariables(r.input[1]);if(!this.variablesIntersect(t,a))return this.logDebug(i,"Push down filter into left join"),[!0,n.createLeftJoin(this.filterPushdown(e,t,r.input[0],n,i)[1],r.input[1],r.expression)]}return[!1,n.createFilter(r,e)];case o.Algebra.types.PATTERN:if(this.pushEqualityIntoPatterns){const t=this.getEqualityExpressionPushableIntoPattern(e);if(t){let e=!1;const n=r.metadata;if((r=(0,a.mapTermsNested)(r,(r=>r.equals(t.variable)?(e=!0,t.term):r))).type=o.Algebra.types.PATTERN,r.metadata=n,e)return this.logDebug(i,`Push down filter into pattern for ?${t.variable.value}`),[!0,r]}}return[!1,n.createFilter(r,e)];case o.Algebra.types.PATH:if(this.pushEqualityIntoPatterns){const t=this.getEqualityExpressionPushableIntoPattern(e);if(t&&(r.subject.equals(t.variable)||r.object.equals(t.variable))){this.logDebug(i,`Push down filter into path for ?${t.variable.value}`);const e=r.metadata;return(r=n.createPath(r.subject.equals(t.variable)?t.term:r.subject,r.predicate,r.object.equals(t.variable)?t.term:r.object)).metadata=e,[!0,r]}}return[!1,n.createFilter(r,e)];case o.Algebra.types.MINUS:case o.Algebra.types.ALT:case o.Algebra.types.ASK:case o.Algebra.types.BGP:case o.Algebra.types.CONSTRUCT:case o.Algebra.types.DESCRIBE:case o.Algebra.types.DISTINCT:case o.Algebra.types.EXPRESSION:case o.Algebra.types.FROM:case o.Algebra.types.GRAPH:case o.Algebra.types.GROUP:case o.Algebra.types.INV:case o.Algebra.types.LINK:case o.Algebra.types.NPS:case o.Algebra.types.ONE_OR_MORE_PATH:case o.Algebra.types.ORDER_BY:case o.Algebra.types.REDUCED:case o.Algebra.types.SEQ:case o.Algebra.types.SERVICE:case o.Algebra.types.SLICE:case o.Algebra.types.ZERO_OR_MORE_PATH:case o.Algebra.types.ZERO_OR_ONE_PATH:case o.Algebra.types.COMPOSITE_UPDATE:case o.Algebra.types.DELETE_INSERT:case o.Algebra.types.LOAD:case o.Algebra.types.CLEAR:case o.Algebra.types.CREATE:case o.Algebra.types.DROP:case o.Algebra.types.ADD:case o.Algebra.types.MOVE:case o.Algebra.types.COPY:return[!1,n.createFilter(r,e)]}}getEqualityExpressionPushableIntoPattern(e){if(e.expressionType===o.Algebra.expressionTypes.OPERATOR&&"="===e.operator){if("term"===e.args[0].expressionType&&"Variable"!==e.args[0].term.termType&&("Literal"!==e.args[0].term.termType||this.isLiteralWithCanonicalLexicalForm(e.args[0].term))&&"term"===e.args[1].expressionType&&"Variable"===e.args[1].term.termType)return{variable:e.args[1].term,term:e.args[0].term};if("term"===e.args[0].expressionType&&"Variable"===e.args[0].term.termType&&"term"===e.args[1].expressionType&&"Variable"!==e.args[1].term.termType&&("Literal"!==e.args[1].term.termType||this.isLiteralWithCanonicalLexicalForm(e.args[1].term)))return{variable:e.args[0].term,term:e.args[1].term}}}isLiteralWithCanonicalLexicalForm(e){if("Literal"===e.termType)switch(e.datatype.value){case"http://www.w3.org/2001/XMLSchema#string":case"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":case"http://www.w3.org/2001/XMLSchema#normalizedString":case"http://www.w3.org/2001/XMLSchema#anyURI":case"http://www.w3.org/2001/XMLSchema#base64Binary":case"http://www.w3.org/2001/XMLSchema#language":case"http://www.w3.org/2001/XMLSchema#Name":case"http://www.w3.org/2001/XMLSchema#NCName":case"http://www.w3.org/2001/XMLSchema#NMTOKEN":case"http://www.w3.org/2001/XMLSchema#token":case"http://www.w3.org/2001/XMLSchema#hexBinary":return!0}return!1}variablesIntersect(e,t){return e.some((e=>t.some((t=>e.equals(t)))))}variablesSubSetOf(e,t){return e.length<=t.length&&e.every((e=>t.some((t=>e.equals(t)))))}isExpressionFalse(e){return e.term&&"Literal"===e.term.termType&&"false"===e.term.value}getNestedFilterExpressions(e){if(e.input.type===o.Algebra.types.FILTER){const t=this.getNestedFilterExpressions(e.input);return{nestedExpressions:[e.expression,...t.nestedExpressions],input:t.input}}return{nestedExpressions:[e.expression],input:e.input}}}t.ActorOptimizeQueryOperationFilterPushdown=s},48989:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(18348),t)},14400:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationGroupSources=void 0;const n=r(6716),i=r(59510),a=r(31578),o=new a.Factory;class s extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(i.ActorQueryOperation.getOperationSource(e.operation))throw new Error(`Actor ${this.name} does not work with top-level operation sources.`);return!0}async run(e){return{operation:await this.groupOperation(e.operation,e.context),context:e.context}}async groupOperation(e,t){if(i.ActorQueryOperation.getOperationSource(e)??!("input"in e))return e;if(!Array.isArray(e.input)){const r=await this.groupOperation(e.input,t);if(r.metadata?.scopedSource){const n=i.ActorQueryOperation.getOperationSource(r);i.ActorQueryOperation.doesShapeAcceptOperation(await n.source.getSelectorShape(t),e)&&(this.logDebug(t,`Hoist 1 source-specific operation into a single ${e.type} operation for ${n.source.toString()}`),i.ActorQueryOperation.removeOperationSource(r),e=i.ActorQueryOperation.assignOperationSource(e,n))}return{...e,input:r}}const r=await Promise.all(e.input.map((e=>this.groupOperation(e,t)))),n=this.clusterOperationsWithEqualSources(r);if(1===n.length){const r=n[0],a=i.ActorQueryOperation.getOperationSource(n[0][0]);return{...await this.moveSourceAnnotationUpwardsIfPossible(e,r,a,t),input:r}}if(n.length===r.length)return{...e,input:r};let s;switch(e.type){case a.Algebra.types.JOIN:s=o.createJoin.bind(o);break;case a.Algebra.types.UNION:s=o.createUnion.bind(o);break;case a.Algebra.types.ALT:s=o.createAlt.bind(o);break;case a.Algebra.types.SEQ:s=o.createSeq.bind(o);break;default:throw new Error(`Unsupported operation '${e.type}' detected while grouping sources`)}return await this.groupOperationMulti(n,s,t)}async groupOperationMulti(e,t,r){let n=!0;const a=await Promise.all(e.map((async e=>{const a=i.ActorQueryOperation.getOperationSource(e[0]),o=await this.moveSourceAnnotationUpwardsIfPossible(t(e,!0),e,a,r);return i.ActorQueryOperation.getOperationSource(o)&&(n=!1),o})));return t(a,n)}clusterOperationsWithEqualSources(e){const t=new Map,r=[];for(const n of e){const e=i.ActorQueryOperation.getOperationSource(n);e?(t.has(e)||t.set(e,[]),t.get(e).push(n)):r.push(n)}const n=[];r.length>0&&n.push(r);for(const[e,r]of t.entries())n.push(r.map((t=>i.ActorQueryOperation.assignOperationSource(t,e))));return n}async moveSourceAnnotationUpwardsIfPossible(e,t,r,n){if(r&&i.ActorQueryOperation.doesShapeAcceptOperation(await r.source.getSelectorShape(n),e)){this.logDebug(n,`Hoist ${t.length} source-specific operations into a single ${e.type} operation for ${r.source.toString()}`),e=i.ActorQueryOperation.assignOperationSource(e,r);for(const e of t)i.ActorQueryOperation.removeOperationSource(e)}return e}}t.ActorOptimizeQueryOperationGroupSources=s},78992:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(14400),t)},90042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationJoinBgp=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{join:(e,t)=>e.input.every((e=>"bgp"===e.type))?{recurse:!1,result:t.createBgp(e.input.flatMap((e=>e.patterns)))}:{recurse:!1,result:e}}),context:e.context}}}t.ActorOptimizeQueryOperationJoinBgp=a},46980:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(90042),t)},33186:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationJoinConnected=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{join:(e,t)=>({recurse:!1,result:a.cluster(e,t)})}),context:e.context}}static cluster(e,t){let r,n=e.input.map((e=>({inScopeVariables:Object.fromEntries(i.Util.inScopeVariables(e).map((e=>[e.value,!0]))),entries:[e]})));do{r=n,n=a.clusterIteration(r)}while(r.length!==n.length);const o=n.map((e=>1===e.entries.length?e.entries[0]:t.createJoin(e.entries)));return 1===o.length?o[0]:t.createJoin(o,!1)}static clusterIteration(e){const t=[];for(const r of e){let e=!1;for(const n of t)if(a.haveOverlappingVariables(r.inScopeVariables,n.inScopeVariables)){n.entries=[...n.entries,...r.entries],n.inScopeVariables={...n.inScopeVariables,...r.inScopeVariables},e=!0;break}e||t.push({inScopeVariables:r.inScopeVariables,entries:r.entries})}return t}static haveOverlappingVariables(e,t){for(const r of Object.keys(e))if(t[r])return!0;return!1}}t.ActorOptimizeQueryOperationJoinConnected=a},98498:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(33186),t)},92834:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationPruneEmptySourceOperations=void 0;const n=r(6716),i=r(59510),a=r(32227),o=r(18050),s=r(31578),c=new s.Factory,u=new o.DataFactory;class l extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){if(i.ActorQueryOperation.getOperationSource(e.operation))throw new Error(`Actor ${this.name} does not work with top-level operation sources.`);return!0}async run(e){let t=e.operation;const r=[],n=this;s.Util.recurseOperation(t,{[s.Algebra.types.UNION]:e=>(n.collectMultiOperationInputs(e.input,r,s.Algebra.types.PATTERN),!0),[s.Algebra.types.ALT]:e=>(n.collectMultiOperationInputs(e.input,r,s.Algebra.types.LINK),!1),[s.Algebra.types.SERVICE]:()=>!1});const a=new Set;return await Promise.all(r.map((async t=>{const r="link"===t.type?c.createPattern(u.variable("?s"),t.iri,u.variable("?o")):t;await this.hasSourceResults(i.ActorQueryOperation.getOperationSource(t),r,e.context)||a.add(t)}))),a.size>0&&(this.logDebug(e.context,`Pruning ${a.size} source-specific operations`),t=s.Util.mapOperation(t,{[s.Algebra.types.UNION]:(e,t)=>n.mapMultiOperation(e,a,(e=>t.createUnion(e))),[s.Algebra.types.ALT]:(e,t)=>n.mapMultiOperation(e,a,(e=>t.createAlt(e)))}),t=s.Util.mapOperation(t,{[s.Algebra.types.PROJECT]:(e,t)=>l.hasEmptyOperation(e)?{recurse:!1,result:t.createUnion([])}:{recurse:!0,result:e},[s.Algebra.types.LEFT_JOIN]:e=>l.hasEmptyOperation(e.input[1])?{recurse:!0,result:e.input[0]}:{recurse:!0,result:e}})),{operation:t,context:e.context}}static hasEmptyOperation(e){let t=!1;return s.Util.recurseOperation(e,{[s.Algebra.types.UNION]:e=>(e.input.every((e=>l.hasEmptyOperation(e)))&&(t=!0),!1),[s.Algebra.types.ALT]:e=>(0===e.input.length&&(t=!0),!1),[s.Algebra.types.LEFT_JOIN]:e=>(l.hasEmptyOperation(e.input[0])&&(t=!0),!1)}),t}collectMultiOperationInputs(e,t,r){for(const n of e)i.ActorQueryOperation.getOperationSource(n)&&n.type===r&&t.push(n)}mapMultiOperation(e,t,r){const n=e.input.filter((e=>!t.has(e)));return n.length===e.input.length?{result:e,recurse:!0}:0===n.length?{result:r([]),recurse:!1}:1===n.length?{result:n[0],recurse:!0}:{result:r(n),recurse:!0}}async hasSourceResults(e,t,r){if(e.context?.get(a.KeysQuerySourceIdentify.traverse))return!0;if(this.useAskIfSupported){const n=c.createAsk(t);if(i.ActorQueryOperation.doesShapeAcceptOperation(await e.source.getSelectorShape(r),n))return e.source.queryBoolean(n,r)}const n=e.source.queryBindings(t,r);return new Promise(((e,t)=>{n.on("error",t),n.getProperty("metadata",(t=>{n.destroy(),e(t.cardinality.value>0)}))}))}}t.ActorOptimizeQueryOperationPruneEmptySourceOperations=l},94607:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(92834),t)},13614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationRewriteAdd=void 0;const n=r(6716),i=r(18050),a=r(31578),o=new i.DataFactory;class s extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){return{operation:a.Util.mapOperation(e.operation,{[a.Algebra.types.ADD](e,t){const r="DEFAULT"===e.destination?o.defaultGraph():e.destination,n="DEFAULT"===e.source?o.defaultGraph():e.source;return{result:t.createDeleteInsert(void 0,[t.createPattern(o.variable("s"),o.variable("p"),o.variable("o"),r)],t.createPattern(o.variable("s"),o.variable("p"),o.variable("o"),n)),recurse:!1}}}),context:e.context}}}t.ActorOptimizeQueryOperationRewriteAdd=s},63514:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(13614),t)},25812:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationRewriteCopy=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{[i.Algebra.types.COPY](e,t){let r;return r="string"==typeof e.destination&&"string"==typeof e.source&&e.destination===e.source||"string"!=typeof e.destination&&"string"!=typeof e.source&&e.destination.equals(e.source)?t.createCompositeUpdate([]):t.createCompositeUpdate([t.createDrop(e.destination,!0),t.createAdd(e.source,e.destination,e.silent)]),{result:r,recurse:!1}}}),context:e.context}}}t.ActorOptimizeQueryOperationRewriteCopy=a},15718:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(25812),t)},90348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperationRewriteMove=void 0;const n=r(6716),i=r(31578);class a extends n.ActorOptimizeQueryOperation{constructor(e){super(e)}async test(e){return!0}async run(e){return{operation:i.Util.mapOperation(e.operation,{[i.Algebra.types.MOVE](e,t){let r;if("string"==typeof e.destination&&"string"==typeof e.source&&e.destination===e.source||"string"!=typeof e.destination&&"string"!=typeof e.source&&e.destination.equals(e.source))r=t.createCompositeUpdate([]);else{const n=[t.createDrop(e.destination,!0),t.createAdd(e.source,e.destination,e.silent),t.createDrop(e.source)];r=t.createCompositeUpdate(n)}return{result:r,recurse:!1}}}),context:e.context}}}t.ActorOptimizeQueryOperationRewriteMove=a},83910:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(90348),t)},82476:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationAsk=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"ask")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),{bindingsStream:i}=n.ActorQueryOperation.getSafeBindings(r);return{type:"boolean",execute:async()=>1===(await i.take(1).toArray()).length}}}t.ActorQueryOperationAsk=i},57321:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(82476),t)},9147:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationBgpJoin=void 0;const n=r(59510),i=r(31578);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"bgp")}async testOperation(e,t){return!0}async runOperation(e,t){return this.mediatorQueryOperation.mediate({operation:a.FACTORY.createJoin(e.patterns),context:t})}}t.ActorQueryOperationBgpJoin=a,a.FACTORY=new i.Factory},20888:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(9147),t)},59516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationConstruct=void 0;const n=r(59510),i=r(13252),a=r(31578),o=r(59218);class s extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"construct")}static getVariables(e){return(0,i.uniqTerms)([].concat.apply([],e.map((e=>(0,i.getVariables)((0,i.getTermsNested)(e))))))}async testOperation(e,t){return!0}async runOperation(e,t){const r=s.getVariables(e.template),i={type:a.Algebra.types.PROJECT,input:e.input,variables:r},c=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:i,context:t}));return{metadata:()=>c.metadata().then((t=>({...t,order:void 0,cardinality:{type:t.cardinality.type,value:t.cardinality.value*e.template.length},canContainUndefs:!1,availableOrders:void 0}))),quadStream:new o.BindingsToQuadsIterator(e.template,c.bindingsStream),type:"quads"}}}t.ActorQueryOperationConstruct=s},59218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsToQuadsIterator=void 0;const n=r(76664),i=r(18050),a=r(13252),o=new i.DataFactory;class s extends n.MultiTransformIterator{constructor(e,t){super(t,{autoStart:!1}),this.template=e,this.blankNodeCounter=0}static bindTerm(e,t){return"Variable"===t.termType?e.get(t):t}static bindQuad(e,t){try{return(0,a.mapTermsNested)(t,(t=>{const r=s.bindTerm(e,t);if(!r)throw new Error("Unbound term");return r}))}catch{}}static localizeBlankNode(e,t){return"BlankNode"===t.termType?o.blankNode(`${t.value}${e}`):t}static localizeQuad(e,t){return(0,a.mapTermsNested)(t,(t=>s.localizeBlankNode(e,t)))}bindTemplate(e,t,r){return t.map(s.localizeQuad.bind(null,r)).map((t=>s.bindQuad.bind(null,e)(t))).filter(Boolean)}_createTransformer(e){return new n.ArrayIterator(this.bindTemplate(e,this.template,this.blankNodeCounter++),{autoStart:!1})}}t.BindingsToQuadsIterator=s},88749:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(59516),t),i(r(59218),t)},50403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationDistinctHash=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"distinct")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t});if("quads"===r.type&&void 0!==this.mediatorHashQuads){const e=n.ActorQueryOperation.getSafeQuads(r);return{type:"quads",quadStream:e.quadStream.filter(await this.newHashFilterQuads(t)),metadata:e.metadata}}const i=n.ActorQueryOperation.getSafeBindings(r);return{type:"bindings",bindingsStream:i.bindingsStream.filter(await this.newHashFilter(t)),metadata:i.metadata}}async newHashFilter(e){const{hashFunction:t}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:e}),r={};return e=>{const n=t(e);return!(n in r)&&(r[n]=!0)}}async newHashFilterQuads(e){if(void 0===this.mediatorHashQuads)return e=>!0;const{hashFunction:t}=await this.mediatorHashQuads.mediate({allowHashCollisions:!0,context:e}),r={};return e=>{const n=t(e);return!(n in r)&&(r[n]=!0)}}}t.ActorQueryOperationDistinctHash=i},13867:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(50403),t)},50372:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationExtend=void 0;const n=r(91674),i=r(59510),a=r(61621);class o extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"extend")}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);return Boolean(new a.AsyncEvaluator(e.expression,i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r))),!0}async runOperation(e,t){const{expression:r,input:o,variable:s}=e,c=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:o,context:t}));if((await c.metadata()).variables.some((e=>e.equals(s))))throw new Error(`Illegal binding to variable '${s.value}' that has already been bound`);const u=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),l={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,u)},d=new a.AsyncEvaluator(r,l),p=c.bindingsStream.transform({autoStart:!1,transform:async(e,r,i)=>{try{const t=await d.evaluate(e);i(e.set(s,t))}catch(r){(0,a.isExpressionError)(r)?(i(e),this.logWarn(t,`Expression error for extend operation (${r.message})with bindings '${(0,n.bindingsToString)(e)}'`)):p.emit("error",r)}r()}});return{type:"bindings",bindingsStream:p,async metadata(){const e=await c.metadata();return{...e,variables:[...e.variables,s]}}}}}t.ActorQueryOperationExtend=o},19724:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(50372),t)},64452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationFilter=void 0;const n=r(91674),i=r(59510),a=r(61621);class o extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"filter")}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),o={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r)};return new a.AsyncEvaluator(e.expression,o),!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),o=i.ActorQueryOperation.getSafeBindings(r);i.ActorQueryOperation.validateQueryOutput(o,"bindings");const s=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),c={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,s)},u=new a.AsyncEvaluator(e.expression,c),l=o.bindingsStream.transform({transform:async(e,r,i)=>{try{await u.evaluateAsEBV(e)&&i(e)}catch(r){(0,a.isExpressionError)(r)?this.logWarn(t,"Error occurred while filtering.",(()=>({error:r,bindings:(0,n.bindingsToString)(e)}))):l.emit("error",r)}r()},autoStart:!1});return{type:"bindings",bindingsStream:l,metadata:o.metadata}}}t.ActorQueryOperationFilter=o},74578:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(64452),t)},71819:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationFromQuad=void 0;const n=r(59510),i=r(31578);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"from")}static copyOperation(e,t){const r={};for(const n of Object.keys(e))Array.isArray(e[n])&&"template"!==n?r[n]="variables"===n?e[n]:e[n].map(t):a.ALGEBRA_TYPES.includes(e[n].type)?r[n]=t(e[n]):r[n]=e[n];return r}static applyOperationDefaultGraph(e,t){if("bgp"===e.type&&e.patterns.length>0||"path"===e.type||"pattern"===e.type){if("bgp"===e.type)return a.joinOperations(e.patterns.map((e=>{if("DefaultGraph"!==e.graph.termType)return a.FACTORY.createBgp([e]);const r=t.map((t=>a.FACTORY.createBgp([Object.assign(a.FACTORY.createPattern(e.subject,e.predicate,e.object,t),{metadata:e.metadata})])));return a.unionOperations(r)})));if("DefaultGraph"!==e.graph.termType)return e;const r=t.map((t=>"path"===e.type?a.FACTORY.createPath(e.subject,e.predicate,e.object,t):Object.assign(a.FACTORY.createPattern(e.subject,e.predicate,e.object,t),{metadata:e.metadata})));return a.unionOperations(r)}return a.copyOperation(e,(e=>this.applyOperationDefaultGraph(e,t)))}static applyOperationNamedGraph(e,t,r){if("bgp"===e.type&&e.patterns.length>0||"path"===e.type||"pattern"===e.type){const n="bgp"===e.type?e.patterns[0].graph:e.graph;if("DefaultGraph"===n.termType)return{type:i.Algebra.types.BGP,patterns:[]};if("Variable"===n.termType){if(1===t.length){const r=t[0],i={};i[`?${n.value}`]=r;const o=a.FACTORY.createValues([n],[i]);let s;return s="bgp"===e.type?a.FACTORY.createBgp(e.patterns.map((e=>a.FACTORY.createPattern(e.subject,e.predicate,e.object,r)))):"path"===e.type?a.FACTORY.createPath(e.subject,e.predicate,e.object,r):a.FACTORY.createPattern(e.subject,e.predicate,e.object,r),a.FACTORY.createJoin([o,s])}return a.unionOperations(t.map((t=>a.applyOperationNamedGraph(e,[t],r))))}return[...t,...r].some((e=>e.equals(n)))?e:{type:i.Algebra.types.BGP,patterns:[]}}return a.copyOperation(e,(e=>this.applyOperationNamedGraph(e,t,r)))}static joinOperations(e){if(1===e.length)return e[0];if(e.length>1)return a.FACTORY.createJoin(e);throw new Error("A join can only be applied on at least one operation")}static unionOperations(e){if(1===e.length)return e[0];if(e.length>1)return a.FACTORY.createUnion(e);throw new Error("A union can only be applied on at least one operation")}static createOperation(e){let t=e.input;return e.default.length>0&&(t=a.applyOperationDefaultGraph(t,e.default)),(e.named.length>0||e.default.length>0)&&(t=a.applyOperationNamedGraph(t,e.named,e.default)),t}async testOperation(e,t){return!0}async runOperation(e,t){const r=a.createOperation(e);return this.mediatorQueryOperation.mediate({operation:r,context:t})}}t.ActorQueryOperationFromQuad=a,a.FACTORY=new i.Factory,a.ALGEBRA_TYPES=Object.keys(i.Algebra.types).map((e=>i.Algebra.types[e]))},37572:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(71819),t)},39712:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationGroup=void 0;const n=r(91674),i=r(59510),a=r(61621),o=r(76664),s=r(50626);class c extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"group")}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);for(const n of e.aggregates)new a.AsyncEvaluator(n.expression,i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r));return!0}async runOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),{hashFunction:a}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:t}),{input:c,aggregates:u}=e,l=await this.mediatorQueryOperation.mediate({operation:c,context:t}),d=i.ActorQueryOperation.getSafeBindings(l),p=[...e.variables,...u.map((e=>e.variable))],h=i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r);return{type:"bindings",bindingsStream:new o.TransformIterator((()=>new Promise(((t,n)=>{const i=new s.GroupsState(a,e,h,r);d.bindingsStream.on("end",(async()=>{try{const e=new o.ArrayIterator(await i.collectResults(),{autoStart:!1});t(e)}catch(e){n(e)}})),d.bindingsStream.on("error",n),d.bindingsStream.on("data",(e=>{i.consumeBindings(e).catch(n)}))}))),{autoStart:!1}),metadata:async()=>({...await d.metadata(),variables:p})}}}t.ActorQueryOperationGroup=c},50626:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupsState=void 0;const n=r(61621),i=new(r(18050).DataFactory);t.GroupsState=class{constructor(e,t,r,n){this.hashFunction=e,this.pattern=t,this.sparqleeConfig=r,this.bindingsFactory=n,this.groups=new Map,this.groupsInitializer=new Map,this.groupVariables=new Set(this.pattern.variables.map((e=>e.value))),this.waitCounter=1,this.resultHasBeenCalled=!1}consumeBindings(e){const t=this.resultCheck();if(t)return t;this.waitCounter++;const r=e.filter(((e,t)=>this.groupVariables.has(t.value))),i=this.hashBindings(r);let a,o=this.groupsInitializer.get(i);if(o){const t=o;a=(async()=>{const r=await t;await Promise.all(this.pattern.aggregates.map((async t=>{const n=t.variable.value;await r.aggregators[n].put(e)})))})().then((async()=>{this.subtractWaitCounterAndCollect()}))}else o=(async()=>{const t={};await Promise.all(this.pattern.aggregates.map((async r=>{const i=r.variable.value;t[i]=new n.AsyncAggregateEvaluator(r,this.sparqleeConfig),await t[i].put(e)})));const a={aggregators:t,bindings:r};return this.groups.set(i,a),this.subtractWaitCounterAndCollect(),a})(),this.groupsInitializer.set(i,o),a=o;return a}subtractWaitCounterAndCollect(){0==--this.waitCounter&&this.handleResultCollection()}handleResultCollection(){let e=[...this.groups].map((([e,t])=>{const{bindings:r,aggregators:n}=t;let a=r;for(const e in n){const t=n[e].result();t&&(a=a.set(i.variable(e),t))}return a}));if(0===e.length&&0===this.groupVariables.size){const t=[];for(const e of this.pattern.aggregates){const r=e.variable,i=n.AsyncAggregateEvaluator.emptyValue(e);void 0!==i&&t.push([r,i])}e=[this.bindingsFactory.bindings(t)]}this.waitResolver(e)}resultCheck(){if(this.resultHasBeenCalled)return Promise.reject(new Error("Calling any function after calling collectResult is invalid."))}collectResults(){const e=this.resultCheck();if(e)return e;this.resultHasBeenCalled=!0;const t=new Promise((e=>{this.waitResolver=e}));return this.subtractWaitCounterAndCollect(),t}hashBindings(e){return this.hashFunction(e)}}},47007:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(39712),t)},54052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationJoin=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"join")}async testOperation(e,t){return!0}async runOperation(e,t){const r=(await Promise.all(e.input.map((async e=>({output:await this.mediatorQueryOperation.mediate({operation:e,context:t}),operation:e}))))).map((({output:e,operation:t})=>({output:n.ActorQueryOperation.getSafeBindings(e),operation:t})));return this.mediatorJoin.mediate({type:"inner",entries:r,context:t})}}t.ActorQueryOperationJoin=i},40980:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(54052),t)},18152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationLeftJoin=void 0;const n=r(91674),i=r(59510),a=r(61621);class o extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"leftjoin")}async testOperation(e,t){return!0}async runOperation(e,t){const r=(await Promise.all(e.input.map((async e=>({output:await this.mediatorQueryOperation.mediate({operation:e,context:t}),operation:e}))))).map((({output:e,operation:t})=>({output:i.ActorQueryOperation.getSafeBindings(e),operation:t}))),o=await this.mediatorJoin.mediate({type:"optional",entries:r,context:t});if(e.expression){const s=(await r[1].output.metadata()).variables,c=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),u={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,c)},l=new a.AsyncEvaluator(e.expression,u),d=o.bindingsStream.transform({autoStart:!1,transform:async(e,r,n)=>{if(!s.every((t=>e.has(t.value))))return n(e),r();try{await l.evaluateAsEBV(e)&&n(e)}catch(r){(0,a.isExpressionError)(r)?this.logWarn(t,"Error occurred while filtering.",(()=>({error:r,bindings:e}))):d.emit("error",r)}r()}});o.bindingsStream=d}return o}}t.ActorQueryOperationLeftJoin=o},33149:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(18152),t)},34358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationMinus=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"minus")}async testOperation(e,t){return!0}async runOperation(e,t){const r=(await Promise.all(e.input.map((async e=>({output:await this.mediatorQueryOperation.mediate({operation:e,context:t}),operation:e}))))).map((({output:e,operation:t})=>({output:n.ActorQueryOperation.getSafeBindings(e),operation:t})));return this.mediatorJoin.mediate({type:"minus",entries:r,context:t})}}t.ActorQueryOperationMinus=i},19948:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(34358),t)},92052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationNop=void 0;const n=r(91674),i=r(59510),a=r(72394),o=r(76664);class s extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"nop")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);return{bindingsStream:new o.SingletonIterator(r.bindings()),metadata:()=>Promise.resolve({state:new a.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}t.ActorQueryOperationNop=s},35021:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(92052),t)},97236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationOrderBy=void 0;const n=r(91674),i=r(59510),a=r(61621),o=r(31578),s=r(36211);class c extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"orderby"),this.window=e.window??Number.POSITIVE_INFINITY}async testOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);for(let n of e.expressions)n=this.extractSortExpression(n),new a.AsyncEvaluator(n,i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,r));return!0}async runOperation(e,t){const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t}),o=i.ActorQueryOperation.getSafeBindings(r),c={window:this.window},u=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),l={...i.ActorQueryOperation.getAsyncExpressionContext(t,this.mediatorQueryOperation,u)};let{bindingsStream:d}=o;for(let t=e.expressions.length-1;t>=0;t--){let r=e.expressions[t];const n=this.isAscending(r);r=this.extractSortExpression(r);const i=new a.AsyncEvaluator(r,l),o=async(e,t,r)=>{try{r({bindings:e,result:await i.evaluate(e)})}catch(t){(0,a.isExpressionError)(t)||d.emit("error",t),r({bindings:e,result:void 0})}t()},u=d.transform({transform:o}),p=new s.SortIterator(u,((e,t)=>{let r=(0,a.orderTypes)(e.result,t.result);return n||(r*=-1),r}),c);d=p.map((({bindings:e})=>e))}return{type:"bindings",bindingsStream:d,metadata:o.metadata}}extractSortExpression(e){const{expressionType:t,operator:r}=e;return t!==o.Algebra.expressionTypes.OPERATOR?e:"desc"===r?e.args[0]:e}isAscending(e){const{expressionType:t,operator:r}=e;return t!==o.Algebra.expressionTypes.OPERATOR||"desc"!==r}}t.ActorQueryOperationOrderBy=c},36211:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SortIterator=void 0;const n=r(76664);class i extends n.TransformIterator{constructor(e,t,r){super(e,r);const n=r&&r.window;this.windowLength=Number.isFinite(n)&&n>0?n:Number.POSITIVE_INFINITY,this.sort=t,this.sorted=[]}_read(e,t){let r,{length:n}=this.sorted;for(;n!==this.windowLength&&(r=this.source.read(),null!==r);){let e,t,i=0,a=n-1;for(;i<=a;)e=Math.trunc((i+a)/2),t=this.sort(r,this.sorted[e]),t<0?i=e+1:t>0?a=e-1:(i=e,a=-1);this.sorted.splice(i,0,r),n++}n===this.windowLength&&this._push(this.sorted.pop()),t()}_flush(e){let{length:t}=this.sorted;for(;t--;)this._push(this.sorted.pop());e()}}t.SortIterator=i},80797:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(97236),t)},79675:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathAlt=void 0;const n=r(43543),i=r(19779),a=r(59510),o=r(76664),s=r(31578);class c extends n.ActorAbstractPath{constructor(e){super(e,s.Algebra.types.ALT)}async runOperation(e,t){const r=e.predicate,s=(await Promise.all(r.input.map((r=>this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,r,e.object,e.graph)}))))).map(a.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new o.UnionIterator(s.map((e=>e.bindingsStream)),{autoStart:!1}),metadata:()=>Promise.all(s.map((e=>e.metadata()))).then((e=>i.ActorQueryOperationUnion.unionMetadata(e,!0,t,this.mediatorRdfMetadataAccumulate)))}}}t.ActorQueryOperationPathAlt=c},16733:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(79675),t)},21471:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathInv=void 0;const n=r(43543),i=r(31578);class a extends n.ActorAbstractPath{constructor(e){super(e,i.Algebra.types.INV)}async runOperation(e,t){const r=e.predicate,i=n.ActorAbstractPath.FACTORY.createPath(e.object,r.path,e.subject,e.graph);return this.mediatorQueryOperation.mediate({operation:i,context:t})}}t.ActorQueryOperationPathInv=a},88317:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(21471),t)},60333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathLink=void 0;const n=r(43543),i=r(31578);class a extends n.ActorAbstractPath{constructor(e){super(e,i.Algebra.types.LINK)}async runOperation(e,t){const r=e.predicate,i=Object.assign(n.ActorAbstractPath.FACTORY.createPattern(e.subject,r.iri,e.object,e.graph),{metadata:r.metadata});return this.mediatorQueryOperation.mediate({operation:i,context:t})}}t.ActorQueryOperationPathLink=a},91430:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(60333),t)},62203:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathNps=void 0;const n=r(43543),i=r(59510),a=r(31578);class o extends n.ActorAbstractPath{constructor(e){super(e,a.Algebra.types.NPS)}async runOperation(e,t){const r=e.predicate,a=this.generateVariable(e),o=Object.assign(n.ActorAbstractPath.FACTORY.createPattern(e.subject,a,e.object,e.graph),{metadata:r.metadata}),s=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:o,context:t}));return{type:"bindings",bindingsStream:s.bindingsStream.map((e=>r.iris.some((t=>t.equals(e.get(a))))?null:e.delete(a))),metadata:s.metadata}}}t.ActorQueryOperationPathNps=o},56993:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(62203),t)},82265:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathOneOrMore=void 0;const n=r(43543),i=r(91674),a=r(59510),o=r(76664),s=r(31578);class c extends n.ActorAbstractPath{constructor(e){super(e,s.Algebra.types.ONE_OR_MORE_PATH)}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),s=await this.isPathArbitraryLengthDistinct(t,e);if(s.operation)return s.operation;t=s.context;const c=e.predicate;if("Variable"!==e.subject.termType&&"Variable"===e.object.termType){const n=e.object,i=await this.getObjectsPredicateStarEval(e.subject,c.path,n,e.graph,t,!1,r),a="Variable"===e.graph.termType?[n,e.graph]:[n];return{type:"bindings",bindingsStream:i.bindingsStream,metadata:async()=>({...await i.metadata(),variables:a})}}if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const i=n.ActorAbstractPath.FACTORY.createDistinct(n.ActorAbstractPath.FACTORY.createPath(e.subject,e.predicate.path,e.object,e.graph)),s=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:i})),u=e.subject,l=e.object,d={},p=new o.MultiTransformIterator(s.bindingsStream,{multiTransform:n=>{const i=n.get(u),a=n.get(l),s="Variable"===e.graph.termType?n.get(e.graph):e.graph;return new o.TransformIterator((async()=>{const n=new o.BufferedIterator;return await this.getSubjectAndObjectBindingsPredicateStar(u,l,i,a,c.path,s,t,d,{},n,{count:0},r),n.transform({transform(t,r,n){"Variable"===e.graph.termType&&(t=t.set(e.graph,s)),n(t),r()}})}),{maxBufferSize:128})},autoStart:!1}),h="Variable"===e.graph.termType?[u,l,e.graph]:[u,l];return{type:"bindings",bindingsStream:p,metadata:async()=>({...await s.metadata(),variables:h})}}if("Variable"===e.subject.termType&&"Variable"!==e.object.termType)return this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.object,n.ActorAbstractPath.FACTORY.createOneOrMorePath(n.ActorAbstractPath.FACTORY.createInv(c.path)),e.subject,e.graph)});const u=this.generateVariable(),l=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,c,u,e.graph)}));return{type:"bindings",bindingsStream:l.bindingsStream.transform({filter:t=>e.object.equals(t.get(u)),transform(t,n,i){i("Variable"===e.graph.termType?r.bindings([[e.graph,t.get(e.graph)]]):r.bindings()),n()}}),metadata:async()=>({...await l.metadata(),variables:"Variable"===e.graph.termType?[e.graph]:[]})}}}t.ActorQueryOperationPathOneOrMore=c},90658:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(82265),t)},64747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathSeq=void 0;const n=r(43543),i=r(59510),a=r(31578);class o extends n.ActorAbstractPath{constructor(e){super(e,a.Algebra.types.SEQ)}async runOperation(e,t){const r=e.predicate;let a=e.subject;const o=[],s=await Promise.all(r.input.map(((i,s)=>{const c=s===r.input.length-1?e.object:this.generateVariable(e,`b${s}`),u=n.ActorAbstractPath.FACTORY.createPath(a,i,c,e.graph),l=this.mediatorQueryOperation.mediate({context:t,operation:u});return a=c,s({output:i.ActorQueryOperation.getSafeBindings(await e),operation:t})))),c=i.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:"inner",entries:s,context:t}));return{type:"bindings",bindingsStream:c.bindingsStream.transform({transform(e,t,r){for(const t of o)e=e.delete(t);r(e),t()}}),async metadata(){const e=await c.metadata(),t=e.variables.filter((e=>!o.some((t=>t.value===e.value))));return{...e,variables:t}}}}}t.ActorQueryOperationPathSeq=o},28261:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(64747),t)},68037:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathZeroOrMore=void 0;const n=r(43543),i=r(91674),a=r(59510),o=r(76664),s=r(22112),c=r(31578);class u extends n.ActorAbstractPath{constructor(e){super(e,c.Algebra.types.ZERO_OR_MORE_PATH)}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),c=await this.isPathArbitraryLengthDistinct(t,e);if(c.operation)return c.operation;t=c.context;const u=e.predicate,l=this.getPathSources(u),d="Variable"===e.subject.termType,p="Variable"===e.object.termType;if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const i=this.generateVariable(e),c=this.assignPatternSources(n.ActorAbstractPath.FACTORY.createPattern(e.subject,i,e.object,e.graph),l),d=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:c})),p=e.subject,h=e.object,f=new Set,y={},g=new o.MultiTransformIterator(d.bindingsStream,{multiTransform:n=>{const i=n.get(p),a=n.get(h),c="Variable"===e.graph.termType?n.get(e.graph):e.graph,l=(0,s.termToString)(i)+(0,s.termToString)(c),d=(0,s.termToString)(a)+(0,s.termToString)(c);return new o.TransformIterator((async()=>{if(f.has(l)&&f.has(d))return new o.EmptyIterator;const n=new o.BufferedIterator,s={count:0};return f.has(l)||(f.add(l),await this.getSubjectAndObjectBindingsPredicateStar(p,h,i,i,u.path,c,t,y,{},n,s,r)),f.has(d)||(f.add(d),await this.getSubjectAndObjectBindingsPredicateStar(p,h,a,a,u.path,c,t,y,{},n,s,r)),n.transform({transform(t,r,n){"Variable"===e.graph.termType&&(t=t.set(e.graph,c)),n(t),r()}})}))}}),m="Variable"===e.graph.termType?[p,e.object,e.graph]:[p,e.object];return{type:"bindings",bindingsStream:g,metadata:async()=>({...await d.metadata(),variables:m})}}if(!d&&!p){const n=this.generateVariable(),i=await this.getObjectsPredicateStarEval(e.subject,u.path,n,e.graph,t,!0,r);return{type:"bindings",bindingsStream:i.bindingsStream.transform({filter:t=>e.object.equals(t.get(n)),transform(t,n,i){i("Variable"===e.graph.termType?r.bindings([[e.graph,t.get(e.graph)]]):r.bindings()),n()}}),metadata:async()=>({...await i.metadata(),variables:"Variable"===e.graph.termType?[e.graph]:[]})}}const h=d?e.object:e.subject,f=d?e.subject:e.object,y=d?n.ActorAbstractPath.FACTORY.createInv(u.path):u.path,g=await this.getObjectsPredicateStarEval(h,y,f,e.graph,t,!0,r),m="Variable"===e.graph.termType?[f,e.graph]:[f];return{type:"bindings",bindingsStream:g.bindingsStream,metadata:async()=>({...await g.metadata(),variables:m})}}}t.ActorQueryOperationPathZeroOrMore=u},60436:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(68037),t)},81231:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationPathZeroOrOne=void 0;const n=r(43543),i=r(91674),a=r(59510),o=r(72394),s=r(76664),c=r(31578);class u extends n.ActorAbstractPath{constructor(e){super(e,c.Algebra.types.ZERO_OR_ONE_PATH)}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),c=e.predicate,u=this.getPathSources(c),l=[];if("Variable"!==e.subject.termType&&"Variable"!==e.object.termType&&e.subject.equals(e.object))return{type:"bindings",bindingsStream:new s.SingletonIterator(r.bindings()),metadata:()=>Promise.resolve({state:new o.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})};const d=await this.isPathArbitraryLengthDistinct(t,e);if(d.operation)return d.operation;t=d.context;const p=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createPath(e.subject,c.path,e.object,e.graph)}));let h;if("Variable"===e.subject.termType&&"Variable"===e.object.termType){const r=this.generateVariable(e),i=a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:t,operation:n.ActorAbstractPath.FACTORY.createFilter(this.assignPatternSources(n.ActorAbstractPath.FACTORY.createPattern(e.subject,r,e.object,e.graph),u),n.ActorAbstractPath.FACTORY.createOperatorExpression("=",[n.ActorAbstractPath.FACTORY.createTermExpression(e.subject),n.ActorAbstractPath.FACTORY.createTermExpression(e.object)]))})).bindingsStream.map((e=>e.delete(r)));h=new s.UnionIterator([i,p.bindingsStream],{autoStart:!1})}else"Variable"===e.subject.termType&&l.push(r.bindings([[e.subject,e.object]])),"Variable"===e.object.termType&&l.push(r.bindings([[e.object,e.subject]])),h=p.bindingsStream.prepend(l);return{type:"bindings",bindingsStream:h,metadata:p.metadata}}}t.ActorQueryOperationPathZeroOrOne=u},32091:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(81231),t)},1892:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationProject=void 0;const n=r(59510),i=r(85156),a=new(r(18050).DataFactory);class o extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"project")}async testOperation(e,t){return!0}async runOperation(e,t){const r=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:t})),o=await r.metadata(),s=e.variables,c=o.variables.filter((e=>!s.some((t=>e.value===t.value))));s.filter((e=>!o.variables.some((t=>e.value===t.value)))).length>0&&(o.canContainUndefs=!0);let u=0===c.length?r.bindingsStream:r.bindingsStream.map((e=>{for(const t of c)e=e.delete(t);return e})),l=0;return u=u.map((e=>{l++;const t=new Map;return e.map((e=>{if(e instanceof i.BlankNodeBindingsScoped){let r=t.get(e.value);return r||(r=a.blankNode(`${e.value}${l}`),t.set(e.value,r)),r}return e}))})),{type:"bindings",bindingsStream:u,metadata:async()=>({...o,variables:s})}}}t.ActorQueryOperationProject=o},98893:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(1892),t)},17015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationReducedHash=void 0;const n=r(59510),i=r(35069);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"reduced")}async testOperation(e,t){return!0}async runOperation(e,t){const r=n.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:t}));return{type:"bindings",bindingsStream:r.bindingsStream.filter(await this.newHashFilter(t)),metadata:r.metadata}}async newHashFilter(e){const{hashFunction:t}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:e}),r=new i.LRUCache({max:this.cacheSize});return e=>{const n=t(e);return!r.has(n)&&(r.set(n,!0),!0)}}}t.ActorQueryOperationReducedHash=a},16909:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(17015),t)},45152:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationService=void 0;const n=r(91674),i=r(59510),a=r(72394),o=r(76664);class s extends i.ActorQueryOperationTypedMediated{constructor(e){super(e,"service")}async testOperation(e,t){if("NamedNode"!==e.name.termType)throw new Error(`${this.name} can only query services by IRI, while a ${e.name.termType} was given.`);return!0}async runOperation(e,t){const{querySource:r}=await this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:{value:e.name.value,type:this.forceSparqlEndpoint?"sparql":void 0},context:t});let s;try{s=i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:i.ActorQueryOperation.assignOperationSource(e.input,r),context:t}))}catch(r){if(!e.silent)throw r;{const e=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);s={bindingsStream:new o.SingletonIterator(e.bindings()),type:"bindings",metadata:async()=>({state:new a.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})},this.logWarn(t,`An error occurred when executing a SERVICE clause: ${r.message}`)}}return s}}t.ActorQueryOperationService=s},89375:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(45152),t)},28746:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationSlice=void 0;const n=r(59510),i=r(32227);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"slice")}async testOperation(e,t){return!0}async runOperation(e,t){e.length&&(t=t.set(i.KeysQueryOperation.limitIndicator,e.length));const r=await this.mediatorQueryOperation.mediate({operation:e.input,context:t});return"bindings"===r.type?{type:"bindings",bindingsStream:this.sliceStream(r.bindingsStream,e),metadata:this.sliceMetadata(r,e)}:"quads"===r.type?{type:"quads",quadStream:this.sliceStream(r.quadStream,e),metadata:this.sliceMetadata(r,e)}:r}sliceStream(e,t){const r=Boolean(t.length)||0===t.length,{start:n}=t,i=r?t.start+t.length-1:Number.POSITIVE_INFINITY;return e.transform({offset:n,limit:Math.max(i-n+1,0),autoStart:!1})}sliceMetadata(e,t){const r=Boolean(t.length)||0===t.length;return()=>e.metadata().then((e=>{const n={...e.cardinality};return Number.isFinite(n.value)&&(n.value=Math.max(0,n.value-t.start),r&&(n.value=Math.min(n.value,t.length))),{...e,cardinality:n}}))}}t.ActorQueryOperationSlice=a},14922:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(28746),t)},23920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationSource=void 0;const n=r(59510),i=r(32227),a=r(72394),o=r(31578);class s extends n.ActorQueryOperation{constructor(e){super(e)}async test(e){if(!n.ActorQueryOperation.getOperationSource(e.operation))throw new Error(`Actor ${this.name} requires an operation with source annotation.`);return{httpRequests:1}}async run(e){const t=e.context.get(i.KeysInitQuery.physicalQueryPlanLogger);t&&(t.logOperation(e.operation.type,void 0,e.operation,e.context.get(i.KeysInitQuery.physicalQueryPlanNode),this.name,{}),e.context=e.context.set(i.KeysInitQuery.physicalQueryPlanNode,e.operation));const r=n.ActorQueryOperation.getOperationSource(e.operation),s=r.context?e.context.merge(r.context):e.context;let c=!1;if(o.Util.recurseOperation(e.operation,{construct:()=>(c=!0,!1)}),c){const t=r.source.queryQuads(e.operation,s);return{type:"quads",quadStream:t,metadata:(0,a.getMetadataQuads)(t)}}switch(e.operation.type){case o.Algebra.types.ASK:return{type:"boolean",execute:()=>r.source.queryBoolean(e.operation,s)};case o.Algebra.types.COMPOSITE_UPDATE:case o.Algebra.types.DELETE_INSERT:case o.Algebra.types.LOAD:case o.Algebra.types.CLEAR:case o.Algebra.types.CREATE:case o.Algebra.types.DROP:case o.Algebra.types.ADD:case o.Algebra.types.MOVE:case o.Algebra.types.COPY:return{type:"void",execute:()=>r.source.queryVoid(e.operation,s)}}const u=r.source.queryBindings(e.operation,s);return{type:"bindings",bindingsStream:u,metadata:(0,a.getMetadataBindings)(u)}}}t.ActorQueryOperationSource=s},26933:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(23920),t)},47312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUnion=void 0;const n=r(59510),i=r(72394),a=r(76664),o=r(13252);class s extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"union")}static unionVariables(e){return(0,o.uniqTerms)(e.flat())}static async unionMetadata(e,t,r,n){let a=(await n.mediate({mode:"initialize",context:r})).metadata;for(const t of e)a={...t,...(await n.mediate({mode:"append",accumulatedMetadata:a,appendingMetadata:t,context:r})).metadata};a.state=new i.MetadataValidationState;const o=()=>a.state.invalidate();for(const t of e)t.state.addInvalidateListener(o);return t&&(a.variables=s.unionVariables(e.map((e=>e.variables)))),a}async testOperation(e,t){return!0}async runOperation(e,t){const r=await Promise.all(e.input.map((e=>this.mediatorQueryOperation.mediate({operation:e,context:t}))));let i;for(const e of r)if(void 0===i)i=e.type;else if(i!==e.type)throw new Error(`Unable to union ${i} and ${e.type}`);if("bindings"===i||0===e.input.length){const e=r.map(n.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new a.UnionIterator(e.map((e=>e.bindingsStream)),{autoStart:!1}),metadata:()=>Promise.all(e.map((e=>e.metadata()))).then((e=>s.unionMetadata(e,!0,t,this.mediatorRdfMetadataAccumulate)))}}if("quads"===i){const e=r.map(n.ActorQueryOperation.getSafeQuads);return{type:"quads",quadStream:new a.UnionIterator(e.map((e=>e.quadStream)),{autoStart:!1}),metadata:()=>Promise.all(e.map((e=>e.metadata()))).then((e=>s.unionMetadata(e,!1,t,this.mediatorRdfMetadataAccumulate)))}}throw new Error(`Unable to union ${i}`)}}t.ActorQueryOperationUnion=s},19779:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(47312),t)},20808:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationClear=void 0;const n=r(59510),i=new(r(18050).DataFactory);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"clear")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){let r;r="DEFAULT"===e.source?i.defaultGraph():"string"==typeof e.source?e.source:[e.source];const{execute:n}=await this.mediatorUpdateQuads.mediate({deleteGraphs:{graphs:r,requireExistence:!e.silent,dropGraphs:!1},context:t});return{type:"void",execute:n}}}t.ActorQueryOperationClear=a},75233:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(20808),t)},8317:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUpdateCompositeUpdate=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"compositeupdate")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){return{type:"void",execute:()=>(async()=>{for(const r of e.updates){const e=n.ActorQueryOperation.getSafeVoid(await this.mediatorQueryOperation.mediate({operation:r,context:t}));await e.execute()}})()}}}t.ActorQueryOperationUpdateCompositeUpdate=i},57886:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(8317),t)},74700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationCreate=void 0;const n=r(59510);class i extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"create")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){const{execute:r}=await this.mediatorUpdateQuads.mediate({createGraphs:{graphs:[e.source],requireNonExistence:!e.silent},context:t});return{type:"void",execute:r}}}t.ActorQueryOperationCreate=i},14876:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(74700),t)},4853:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationUpdateDeleteInsert=void 0;const n=r(88749),i=r(91674),a=r(59510),o=r(76664);class s extends a.ActorQueryOperationTypedMediated{constructor(e){super(e,"deleteinsert"),this.blankNodeCounter=0}async testOperation(e,t){return a.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){const r=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,t),s=e.where?a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.where,context:t})).bindingsStream:new o.ArrayIterator([r.bindings()],{autoStart:!1});let c,u;e.insert&&(c=new n.BindingsToQuadsIterator(e.insert.map(n.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),s.clone()),this.blankNodeCounter++),e.delete&&(u=new n.BindingsToQuadsIterator(e.delete.map(n.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),s.clone()),this.blankNodeCounter++);const{execute:l}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:c,quadStreamDelete:u,context:t});return{type:"void",execute:l}}}t.ActorQueryOperationUpdateDeleteInsert=s},21638:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(4853),t)},53460:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationDrop=void 0;const n=r(59510),i=new(r(18050).DataFactory);class a extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"drop")}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){let r;r="DEFAULT"===e.source?i.defaultGraph():"string"==typeof e.source?e.source:[e.source];const{execute:n}=await this.mediatorUpdateQuads.mediate({deleteGraphs:{graphs:r,requireExistence:!e.silent,dropGraphs:!0},context:t});return{type:"void",execute:n}}}t.ActorQueryOperationDrop=a},82465:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(53460),t)},86228:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationLoad=void 0;const n=r(59510),i=r(32227),a=r(18050),o=r(31578),s=new a.DataFactory;class c extends n.ActorQueryOperationTypedMediated{constructor(e){super(e,"load"),this.factory=new o.Factory}async testOperation(e,t){return n.ActorQueryOperation.throwOnReadOnly(t),!0}async runOperation(e,t){let r=t;e.silent&&(r=r.set(i.KeysInitQuery.lenient,!0));const{querySource:a}=await this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:{value:e.source.value},context:r});let o=c.getSafeQuads(await this.mediatorQueryOperation.mediate({operation:this.factory.createConstruct(n.ActorQueryOperation.assignOperationSource(this.factory.createPattern(s.variable("s"),s.variable("p"),s.variable("o")),a),[this.factory.createPattern(s.variable("s"),s.variable("p"),s.variable("o"))]),context:r})).quadStream;e.destination&&(o=o.map((t=>s.quad(t.subject,t.predicate,t.object,e.destination))));const{execute:u}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:o,context:t});return{type:"void",execute:u}}}t.ActorQueryOperationLoad=c},29796:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(86228),t)},48236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationValues=void 0;const n=r(91674),i=r(59510),a=r(72394),o=r(76664),s=new(r(18050).DataFactory);class c extends i.ActorQueryOperationTyped{constructor(e){super(e,"values")}async testOperation(e,t){return!0}async runOperation(e,t){const r=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t),i=new o.ArrayIterator(e.bindings.map((e=>r.bindings(Object.entries(e).map((([e,t])=>[s.variable(e.slice(1)),t])))))),c=e.variables;return{type:"bindings",bindingsStream:i,metadata:()=>Promise.resolve({state:new a.MetadataValidationState,cardinality:{type:"exact",value:e.bindings.length},canContainUndefs:e.bindings.some((e=>c.some((t=>!(`?${t.value}`in e))))),variables:c})}}}t.ActorQueryOperationValues=c},14702:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(48236),t)},1452:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParseGraphql=void 0;const n=r(79744),i=r(32227),a=r(1427);class o extends n.ActorQueryParse{constructor(e){super(e),this.graphqlToSparql=new a.Converter({requireContext:!0})}async test(e){if("graphql"!==e.queryFormat?.language)throw new Error("This actor can only parse GraphQL queries");return!0}async run(e){const t=e.context.get(i.KeysInitQuery.jsonLdContext)||{},r={singularizeVariables:e.context.get(i.KeysInitQuery.graphqlSingularizeVariables)};return{operation:await this.graphqlToSparql.graphqlToSparqlAlgebra(e.query,t,r)}}}t.ActorQueryParseGraphql=o},37067:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(1452),t)},6540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParseSparql=void 0;const n=r(79744),i=r(31578),a=r(55403);class o extends n.ActorQueryParse{constructor(e){super(e),this.prefixes=Object.freeze(this.prefixes)}async test(e){if(e.queryFormat&&"sparql"!==e.queryFormat.language)throw new Error("This actor can only parse SPARQL queries");return!0}async run(e){const t=new a.Parser({prefixes:this.prefixes,baseIRI:e.baseIRI,sparqlStar:!0}).parse(e.query);return{baseIRI:"query"===t.type?t.base:void 0,operation:(0,i.translate)(t,{quads:!0,prefixes:this.prefixes,blankToVariable:!0,baseIRI:e.baseIRI})}}}t.ActorQueryParseSparql=o},4911:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(6540),t)},27007:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessExplainLogical=void 0;const n=r(59946),i=r(32227),a=r(34368);class o extends n.ActorQueryProcess{constructor(e){super(e)}async test(e){if("logical"!==(e.context.get(i.KeysInitQuery.explain)||e.context.get(new a.ActionContextKey("explain"))))throw new Error(`${this.name} can only explain in 'logical' mode.`);return!0}async run(e){let{operation:t,context:r}=await this.queryProcessor.parse(e.query,e.context);return({operation:t,context:r}=await this.queryProcessor.optimize(t,r)),{result:{explain:!0,type:"logical",data:t}}}}t.ActorQueryProcessExplainLogical=o},70605:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(27007),t)},94725:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessExplainParsed=void 0;const n=r(59946),i=r(32227),a=r(34368);class o extends n.ActorQueryProcess{constructor(e){super(e)}async test(e){if("parsed"!==(e.context.get(i.KeysInitQuery.explain)||e.context.get(new a.ActionContextKey("explain"))))throw new Error(`${this.name} can only explain in 'parsed' mode.`);return!0}async run(e){const{operation:t}=await this.queryProcessor.parse(e.query,e.context);return{result:{explain:!0,type:"parsed",data:t}}}}t.ActorQueryProcessExplainParsed=o},68383:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(94725),t)},25441:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessExplainPhysical=void 0;const n=r(59946),i=r(32227),a=r(34368),o=r(16402);class s extends n.ActorQueryProcess{constructor(e){super(e)}async test(e){const t=e.context.get(i.KeysInitQuery.explain)||e.context.get(new a.ActionContextKey("explain"));if("physical"!==t&&"physical-json"!==t)throw new Error(`${this.name} can only explain in 'physical' or 'physical-json' mode.`);return!0}async run(e){let{operation:t,context:r}=await this.queryProcessor.parse(e.query,e.context);({operation:t,context:r}=await this.queryProcessor.optimize(t,r));const n=new o.MemoryPhysicalQueryPlanLogger;r=r.set(i.KeysInitQuery.physicalQueryPlanLogger,n);const s=await this.queryProcessor.evaluate(t,r);switch(s.type){case"bindings":await s.bindingsStream.toArray();break;case"quads":await s.quadStream.toArray();break;case"boolean":case"void":await s.execute()}const c=e.context.get(i.KeysInitQuery.explain)??e.context.getSafe(new a.ActionContextKey("explain"));return{result:{explain:!0,type:c,data:"physical"===c?n.toCompactString():n.toJson()}}}}t.ActorQueryProcessExplainPhysical=s},16402:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numberToString=t.MemoryPhysicalQueryPlanLogger=void 0;const n=r(22112);function i(e){return e.toLocaleString("en-US",{minimumFractionDigits:0,maximumFractionDigits:3})}t.MemoryPhysicalQueryPlanLogger=class{constructor(){this.planNodes=new Map}logOperation(e,t,r,n,i,a){const o={actor:i,logicalOperator:e,physicalOperator:t,rawNode:r,children:[],metadata:a};if(this.planNodes.set(r,o),this.rootNode){if(!n)throw new Error("Detected more than one parent-less node");const e=this.planNodes.get(n);if(!e)throw new Error("Could not find parent node");e.children.push(o)}else{if(n)throw new Error("No root node has been set yet, while a parent is being referenced");this.rootNode=o}}stashChildren(e,t){const r=this.planNodes.get(e);if(!r)throw new Error("Could not find plan node");r.children=t?r.children.filter(t):[]}unstashChild(e,t){const r=this.planNodes.get(e);if(r){const e=this.planNodes.get(t);if(!e)throw new Error("Could not find plan parent node");e.children.push(r)}}appendMetadata(e,t){const r=this.planNodes.get(e);r&&(r.metadata={...r.metadata,...t})}toJson(){return this.rootNode?this.planNodeToJson(this.rootNode):{}}planNodeToJson(e){const t={logical:e.logicalOperator,physical:e.physicalOperator,...this.getLogicalMetadata(e.rawNode),...this.compactMetadata(e.metadata)};if(e.children.length>0&&(t.children=e.children.map((e=>this.planNodeToJson(e)))),"bind"===t.physical&&t.children){const e={};for(const r of t.children){const t=r.children?.at(-1)??r,n=this.getPlanHash(t).join(",");e[n]||(e[n]=[]),e[n].push(r)}const r=[];for(const t of Object.values(e))r.push({occurrences:t.length,firstOccurrence:t[0]});t.childrenCompact=r,delete t.children}return t}getPlanHash(e){let t=[`${e.logical}-${e.physical}`];return e.children?t=[...t,...e.children.flatMap((e=>this.getPlanHash(e)))]:e.childrenCompact&&(t=[...t,...e.childrenCompact.flatMap((e=>this.getPlanHash(e.firstOccurrence)))]),t}compactMetadata(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,this.compactMetadataValue(t)])))}compactMetadataValue(e){return e&&"object"==typeof e&&"termType"in e?this.getLogicalMetadata(e):e}getLogicalMetadata(e){const t={};if("type"in e){const r=e;switch(r.metadata?.scopedSource&&(t.source=r.metadata.scopedSource.source.toString()),r.type){case"pattern":t.pattern=this.quadToString(r);break;case"project":t.variables=r.variables.map((e=>e.value))}}return t}quadToString(e){return`${(0,n.termToString)(e.subject)} ${(0,n.termToString)(e.predicate)} ${(0,n.termToString)(e.object)}${"DefaultGraph"===e.graph.termType?"":` ${(0,n.termToString)(e.graph)}`}`}toCompactString(){const e=this.toJson(),t=[],r=new Map;if("logical"in e?this.nodeToCompactString(t,r,"",e):t.push("Empty"),r.size>0){t.push(""),t.push("sources:");for(const[e,n]of r.entries())t.push(` ${n}: ${e}`)}return t.join("\n")}nodeToCompactString(e,t,r,n,a){let o;n.source&&(o=t.get(n.source),void 0===o&&(o=t.size,t.set(n.source,o))),e.push(`${r}${n.logical}${n.physical?`(${n.physical})`:""}${n.pattern?` (${n.pattern})`:""}${n.variables?` (${n.variables.join(",")})`:""}${n.bindOperation?` bindOperation:(${n.bindOperation.pattern}) bindCardEst:${"estimate"===n.bindOperationCardinality.type?"~":""}${i(n.bindOperationCardinality.value)}`:""}${n.cardinality?` cardEst:${"estimate"===n.cardinality.type?"~":""}${i(n.cardinality.value)}`:""}${n.source?` src:${o}`:""}${n.cardinalityReal?` cardReal:${n.cardinalityReal}`:""}${n.timeSelf?` timeSelf:${i(n.timeSelf)}ms`:""}${n.timeLife?` timeLife:${i(n.timeLife)}ms`:""}${a?` ${a}`:""}`);for(const i of n.children??[])this.nodeToCompactString(e,t,`${r} `,i);for(const i of n.childrenCompact??[])this.nodeToCompactString(e,t,`${r} `,i.firstOccurrence,`compacted-occurrences:${i.occurrences}`)}},t.numberToString=i},54395:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(25441),t),i(r(16402),t)},47604:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcessSequential=void 0;const n=r(91674),i=r(59510),a=r(59946),o=r(32227),s=r(34368);class c extends a.ActorQueryProcess{constructor(e){super(e)}async test(e){if(e.context.get(o.KeysInitQuery.explain)||e.context.get(new s.ActionContextKey("explain")))throw new Error(`${this.name} is not able to explain queries.`);return!0}async run(e){let{operation:t,context:r}=await this.parse(e.query,e.context);return({operation:t,context:r}=await this.optimize(t,r)),{result:await this.evaluate(t,r)}}async parse(e,t){let r;if(t=(await this.mediatorContextPreprocess.mediate({context:t,initialize:!0})).context,"string"==typeof e){const n=(t=t.set(o.KeysInitQuery.queryString,e)).get(o.KeysInitQuery.baseIRI),i=t.get(o.KeysInitQuery.queryFormat),a=await this.mediatorQueryParse.mediate({context:t,query:e,queryFormat:i,baseIRI:n});r=a.operation,a.baseIRI&&(t=t.set(o.KeysInitQuery.baseIRI,a.baseIRI))}else r=e;if(t.has(o.KeysInitQuery.initialBindings)){const e=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,t);r=(0,i.materializeOperation)(r,t.get(o.KeysInitQuery.initialBindings),e),t=t.delete(o.KeysInitQuery.queryString)}return{operation:r,context:t}}async optimize(e,t){return t=t.set(o.KeysInitQuery.query,e),({operation:e,context:t}=await this.mediatorOptimizeQueryOperation.mediate({context:t,operation:e})),{operation:e,context:t=t.set(o.KeysInitQuery.query,e)}}async evaluate(e,t){const r=await this.mediatorQueryOperation.mediate({context:t,operation:e});return r.context=t,r}}t.ActorQueryProcessSequential=c},94739:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(47604),t)},45369:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeJson=void 0;const n=r(22083),i=r(76664),a=r(22112),o=r(58521);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,t){if(!["bindings","quads","boolean"].includes(e.type))throw new Error("This actor can only handle bindings or quad streams.");return!0}async runHandle(e,t,r){const n=new o.Readable;if(n._read=()=>{},"bindings"===e.type||"quads"===e.type){let t="bindings"===e.type?(0,i.wrap)(e.bindingsStream).map((e=>JSON.stringify(Object.fromEntries([...e].map((([e,t])=>[e.value,a.termToString(t)])))))):(0,i.wrap)(e.quadStream).map((e=>JSON.stringify(a.quadToStringQuad(e)))),r=!0;t=t.map((e=>{const t=`${r?"":","}\n${e}`;return r=!1,t})).prepend(["["]).append(["\n]\n"]),n.wrap(t)}else try{n.push(`${JSON.stringify(await e.execute())}\n`),n.push(null)}catch(e){setTimeout((()=>n.emit("error",e)))}return{data:n}}}t.ActorQueryResultSerializeJson=s},91875:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(45369),t)},2703:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeRdf=void 0;const n=r(22083);class i extends n.ActorQueryResultSerialize{constructor(e){super(e)}async testHandle(e,t,r){if("quads"!==e.type)throw new Error(`Actor ${this.name} can only handle quad streams`);const{mediaTypes:n}=await this.mediatorMediaTypeCombiner.mediate({context:r,mediaTypes:!0});if(!(t in n))throw new Error(`Actor ${this.name} can not handle media type ${t}. All available types: ${Object.keys(n)}`);return!0}async runHandle(e,t,r){return(await this.mediatorRdfSerialize.mediate({context:r,handle:{context:r,quadStream:e.quadStream},handleMediaType:t})).handle}async testMediaType(e){return!0}async getMediaTypes(e){return(await this.mediatorMediaTypeCombiner.mediate({context:e,mediaTypes:!0})).mediaTypes}async testMediaTypeFormats(e){return!0}async getMediaTypeFormats(e){return(await this.mediatorMediaTypeFormatCombiner.mediate({context:e,mediaTypeFormats:!0})).mediaTypeFormats}}t.ActorQueryResultSerializeRdf=i},63543:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(2703),t)},6301:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSimple=void 0;const n=r(22083),i=r(76664),a=r(22112),o=r(58521);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,t){if(!["bindings","quads","boolean","void"].includes(e.type))throw new Error("This actor can only handle bindings streams, quad streams, booleans, or updates.");return!0}static termToString(e){return"Quad"===e.termType?(0,a.termToString)(e):e.value}async runHandle(e,t,r){const n=new o.Readable;return"bindings"===e.type?n.wrap(e.bindingsStream.map((e=>`${[...e].map((([e,t])=>`?${e.value}: ${s.termToString(t)}`)).join("\n")}\n\n`))):"quads"===e.type?n.wrap(e.quadStream.map((e=>`subject: ${s.termToString(e.subject)}\npredicate: ${s.termToString(e.predicate)}\nobject: ${s.termToString(e.object)}\ngraph: ${s.termToString(e.graph)}\n\n`))):n.wrap((0,i.wrap)("boolean"===e.type?e.execute().then((e=>[`${e}\n`])):e.execute().then((()=>["ok\n"])))),{data:n}}}t.ActorQueryResultSerializeSimple=s},96791:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(6301),t)},54438:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlCsv=void 0;const n=r(22083),i=r(58521);class a extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToCsvBindings(e){if(!e)return"";let t=e.value;if("Literal"===e.termType)t=`${t}`;else if("BlankNode"===e.termType)t=`_:${t}`;else if("Quad"===e.termType){let r=a.bindingToCsvBindings(e.object);"Literal"===e.object.termType&&(r=`"${r.replaceAll('"','""')}"`),t=`<< ${a.bindingToCsvBindings(e.subject)} ${a.bindingToCsvBindings(e.predicate)} ${r} >>`}else t=`<${t}>`;return/[",\n\r]/u.test(t)&&(t=`"${t.replaceAll('"','""')}"`),t}async testHandleChecked(e,t){if("bindings"!==e.type)throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,t,r){const n=e,o=new i.Readable,s=await n.metadata();return o.push(`${s.variables.map((e=>e.value)).join(",")}\r\n`),o.wrap(n.bindingsStream.map((e=>`${s.variables.map((t=>a.bindingToCsvBindings(e.get(t)))).join(",")}\r\n`))),{data:o}}}t.ActorQueryResultSerializeSparqlCsv=a},34357:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(54438),t)},21437:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserverHttp=void 0;const n=r(34368);class i extends n.ActionObserver{constructor(e){super(e),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener((()=>{this.requests=0}))}onRun(e,t,r){this.requests++}}t.ActionObserverHttp=i},47670:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlJson=void 0;const n=r(22083),i=r(76664),a=r(58521);class o extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToJsonBindings(e){if("Literal"===e.termType){const t=e,r={value:t.value,type:"literal"},{language:n,datatype:i}=t;return n?r["xml:lang"]=n:i&&"http://www.w3.org/2001/XMLSchema#string"!==i.value&&(r.datatype=i.value),r}return"BlankNode"===e.termType?{value:e.value,type:"bnode"}:"Quad"===e.termType?{value:{subject:o.bindingToJsonBindings(e.subject),predicate:o.bindingToJsonBindings(e.predicate),object:o.bindingToJsonBindings(e.object)},type:"triple"}:{value:e.value,type:"uri"}}async testHandleChecked(e,t){if(!["bindings","boolean"].includes(e.type))throw new Error("This actor can only handle bindings streams or booleans.");return!0}async runHandle(e,t,r){const n=new a.Readable,s={};if("bindings"===e.type){const c=await e.metadata();c.variables.length>0&&(s.vars=c.variables.map((e=>e.value)))}if(n.push(`{"head": ${JSON.stringify(s)},\n`),"bindings"===e.type){const u=e.bindingsStream;n.push('"results": { "bindings": [\n');let l=!0;function*d(e){yield e()}n.wrap((0,i.wrap)(u).map((e=>{const t=`${l?"":",\n"}${JSON.stringify(Object.fromEntries([...e].map((([e,t])=>[e.value,o.bindingToJsonBindings(t)]))))}`;return l=!1,t})).append((0,i.wrap)(d((()=>`\n]}${this.emitMetadata?`,\n"metadata": { "httpRequests": ${this.httpObserver.requests} }`:""}}\n`)))))}else n.wrap((0,i.wrap)(e.execute().then((e=>[`"boolean":${e}\n}\n`]))));return{data:n}}}t.ActorQueryResultSerializeSparqlJson=o},34593:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(21437),t),i(r(47670),t)},60096:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlTsv=void 0;const n=r(22083),i=r(64817),a=r(58521);class o extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToTsvBindings(e){return e?(0,i.termToString)(e).replaceAll("\t","\\t").replaceAll("\n","\\n").replaceAll("\r","\\r"):""}async testHandleChecked(e,t){if("bindings"!==e.type)throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,t,r){const n=e,i=new a.Readable,s=await n.metadata();return i.push(`${s.variables.map((e=>e.value)).join("\t")}\n`),i.wrap(n.bindingsStream.map((e=>`${s.variables.map((t=>o.bindingToTsvBindings(e.get(t)))).join("\t")}\n`))),{data:i}}}t.ActorQueryResultSerializeSparqlTsv=o},78432:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(60096),t)},83668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeSparqlXml=void 0;const n=r(22083),i=r(76664),a=r(58521),o=r(72825);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToXmlBindings(e,t){return{name:"binding",attributes:{name:t.value},children:[this.valueToXmlValue(e)]}}static valueToXmlValue(e){let t;switch(e.termType){case"Literal":return t=e.language?{"xml:lang":e.language}:e.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==e.datatype.value?{datatype:e.datatype.value}:{},{name:"literal",attributes:t,children:e.value};case"BlankNode":return{name:"bnode",children:e.value};case"Quad":return{name:"triple",children:[{name:"subject",children:[this.valueToXmlValue(e.subject)]},{name:"predicate",children:[this.valueToXmlValue(e.predicate)]},{name:"object",children:[this.valueToXmlValue(e.object)]}]};default:return{name:"uri",children:e.value}}}async testHandleChecked(e,t){if(!["bindings","boolean"].includes(e.type))throw new Error("This actor can only handle bindings streams or booleans.");return!0}async runHandle(e,t,r){const n=new a.Readable;n._read=()=>{};const c=new o.XmlSerializer,u=await e.metadata();if(n.push(o.XmlSerializer.header),n.push(c.open("sparql",{xmlns:"http://www.w3.org/2005/sparql-results#"})),n.push(c.serializeNode({name:"head",children:u.variables.map((e=>({name:"variable",attributes:{name:e.value}})))})),"bindings"===e.type){function*l(){yield c.close(),yield c.close()}n.push(c.open("results"));const d=(0,i.wrap)(e.bindingsStream).map((e=>c.serializeNode({name:"result",children:[...e].map((([e,t])=>s.bindingToXmlBindings(t,e)))}))).append((0,i.wrap)(l()));n.wrap(d)}else try{const p=await e.execute();n.push(c.serializeNode({name:"boolean",children:p.toString()})),n.push(c.close()),setTimeout((()=>n.push(null)))}catch(h){setTimeout((()=>n.emit("error",h)))}return{data:n}}}t.ActorQueryResultSerializeSparqlXml=s},72825:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XmlSerializer=void 0;class r{constructor(){this.stack=[]}open(e,t){const r=`${this.identation()+this.formatTag(e,t,"open")}\n`;return this.stack.push(e),r}close(){const e=this.stack.pop();if(void 0===e)throw new Error("There is no tag left to close");return`${this.identation()+this.formatTag(e,{},"close")}\n`}serializeNode(e){if(void 0===e.children)return`${this.identation()+this.formatTag(e.name,e.attributes,"self-closing")}\n`;if("string"==typeof e.children)return`${this.identation()+this.formatTag(e.name,e.attributes,"open")+this.escape(e.children)+this.formatTag(e.name,{},"close")}\n`;const t=[];t.push(`${this.identation()+this.formatTag(e.name,e.attributes,"open")}\n`),this.stack.push(e.name);for(const r of e.children)t.push(this.serializeNode(r));return this.stack.pop(),t.push(`${this.identation()+this.formatTag(e.name,{},"close")}\n`),t.join("")}identation(){return this.stack.map((e=>" ")).join("")}formatTag(e,t,r){return`<${"close"===r?"/":""}${e}${Object.entries(t??{}).map((e=>` ${e[0]}="${this.escape(e[1])}"`))}${"self-closing"===r?"/":""}>`}escape(e){return e.replaceAll(/["&'<>]/gu,(e=>{switch(e){case"<":return"<";case">":return">";case"&":return"&";case"'":return"'";case'"':return"""}}))}}t.XmlSerializer=r,r.header='\n'},68596:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(83668),t)},1990:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserverHttp=void 0;const n=r(34368);class i extends n.ActionObserver{constructor(e){super(e),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener((()=>{this.requests=0}))}onRun(e,t,r){this.requests++}}t.ActionObserverHttp=i},28541:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeStats=void 0;const n=r(22083),i=r(76664),a=r(58521),o=r(39907);class s extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,t){if(!["bindings","quads"].includes(e.type))throw new Error("This actor can only handle bindings streams or quad streams.");return!0}pushHeader(e){const t=["Result","Delay (ms)","HTTP requests"].join(",");e.push(`${t}\n`)}createStat(e,t){return`${[t,this.delay(e),this.httpObserver.requests].join(",")}\n`}createFooter(e){return`${["TOTAL",this.delay(e),this.httpObserver.requests].join(",")}\n`}async runHandle(e,t,r){const n=new a.Readable,o="bindings"===e.type?e.bindingsStream:e.quadStream,s=this.now();let c=1;const u=(0,i.wrap)(o).map((()=>this.createStat(s,c++))).append((0,i.wrap)(function*(e){yield e()}((()=>this.createFooter(s)))));return this.pushHeader(n),n.wrap(u),{data:n}}now(){if("undefined"==typeof performance){const e=o.hrtime();return 1e3*e[0]+e[1]/1e6}return performance.now()}delay(e){return this.now()-e}}t.ActorQueryResultSerializeStats=s},13900:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(1990),t),i(r(28541),t)},42787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeTable=void 0;const n=r(22083),i=r(18050),a=r(22112),o=r(13252),s=r(58521),c=new i.DataFactory,u=o.QUAD_TERM_NAMES.map((e=>c.variable(e)));class l extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e),this.padding=l.repeat(" ",this.columnWidth)}static repeat(e,t){return e.repeat(t)}async testHandleChecked(e,t){if(!["bindings","quads"].includes(e.type))throw new Error("This actor can only handle bindings or quad streams.");return!0}termToString(e){return"Quad"===e.termType?(0,a.termToString)(e):e.value}pad(e){return e.length<=this.columnWidth?e+this.padding.slice(e.length):`${e.slice(0,this.columnWidth-1)}…`}pushHeader(e,t){const r=t.map((e=>this.pad(e.value))).join(" ");e.push(`${r}\n${l.repeat("-",r.length)}\n`)}createRow(e,t){return`${e.map((e=>t.has(e)?this.termToString(t.get(e)):"")).map((e=>this.pad(e))).join(" ")}\n`}async runHandle(e,t,r){const n=new s.Readable;let i;if("bindings"===e.type){i=e.bindingsStream.map((e=>this.createRow(t,e)));const t=(await e.metadata()).variables;this.pushHeader(n,t)}else i=e.quadStream.map((e=>`${(0,o.getTerms)(e).map((e=>this.pad(this.termToString(e)))).join(" ")}\n`)),this.pushHeader(n,u);return n.wrap(i),{data:n}}}t.ActorQueryResultSerializeTable=l},59655:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(42787),t)},71445:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeTree=void 0;const n=r(22083),i=r(32227),a=r(34368),o=r(58521),s=r(43004);class c extends n.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static async bindingsStreamToGraphQl(e,t,r){const n=a.ActionContext.ensureActionContext(t),o=new s.Converter(r),c={singularizeVariables:n.get(i.KeysInitQuery.graphqlSingularizeVariables)??{}};return o.bindingsToTree(await e.map((e=>Object.fromEntries([...e].map((([e,t])=>[e.value,t]))))).toArray(),c)}async testHandleChecked(e){if("bindings"!==e.type)throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,t){const r=new o.Readable;return r._read=()=>{r._read=()=>{},c.bindingsStreamToGraphQl(e.bindingsStream,e.context,{materializeRdfJsTerms:!0}).then((e=>{r.push(JSON.stringify(e,null," ")),r.push(null)})).catch((e=>r.emit("error",e)))},{data:r}}}t.ActorQueryResultSerializeTree=c},70017:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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}),t.bindingsStreamToGraphQl=void 0;const a=r(71445),{bindingsStreamToGraphQl:o}=a.ActorQueryResultSerializeTree;t.bindingsStreamToGraphQl=o,i(r(71445),t)},33606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermediaNone=void 0;const n=r(27474),i=r(91674),a=r(89168),o=r(10953);class s extends a.ActorQuerySourceIdentifyHypermedia{constructor(e){super(e,"file")}async testMetadata(e){return{filterFactor:0}}async run(e){this.logInfo(e.context,`Identified as file source: ${e.url}`);const t=new n.QuerySourceRdfJs(await(0,o.storeStream)(e.quads),await i.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context));return t.toString=()=>`QuerySourceRdfJs(${e.url})`,t.referenceValue=e.url,{source:t}}}t.ActorQuerySourceIdentifyHypermediaNone=s},44538:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(33606),t)},88760:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermediaQpf=void 0;const n=r(91674),i=r(89168),a=r(92591);class o extends i.ActorQuerySourceIdentifyHypermedia{constructor(e){super(e,"qpf")}async test(e){if(e.forceSourceType&&"qpf"!==e.forceSourceType&&"brtpf"!==e.forceSourceType)throw new Error(`Actor ${this.name} is not able to handle source type ${e.forceSourceType}.`);return this.testMetadata(e)}async testMetadata(e){const{searchForm:t}=await this.createSource(e.url,e.metadata,e.context,"brtpf"===e.forceSourceType);if(e.handledDatasets&&e.handledDatasets[t.dataset])throw new Error(`Actor ${this.name} can only be applied for the first page of a QPF dataset.`);return{filterFactor:1}}async run(e){this.logInfo(e.context,`Identified as qpf source: ${e.url}`);const t=await this.createSource(e.url,e.metadata,e.context,"brtpf"===e.forceSourceType,e.quads);return{source:t,dataset:t.searchForm.dataset}}async createSource(e,t,r,i,o){return new a.QuerySourceQpf(this.mediatorMetadata,this.mediatorMetadataExtract,this.mediatorDereferenceRdf,await n.BindingsFactory.create(this.mediatorMergeBindingsContext,r),this.subjectUri,this.predicateUri,this.objectUri,this.graphUri,e,t,i,o)}}t.ActorQuerySourceIdentifyHypermediaQpf=o},92591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceQpf=void 0;const n=r(65483),i=r(32227),a=r(76664),o=r(18050),s=r(22112),c=r(64817),u=r(13252),l=new(r(31578).Factory),d=new o.DataFactory;class p{constructor(e,t,r,n,i,o,s,c,u,l,p,h){this.referenceValue=u,this.mediatorMetadata=e,this.mediatorMetadataExtract=t,this.mediatorDereferenceRdf=r,this.bindingsFactory=n,this.subjectUri=i,this.predicateUri=o,this.objectUri=s,this.graphUri=c,this.url=u,this.bindingsRestricted=p,this.cachedQuads={};const f=this.getSearchForm(l);if(!f)throw new Error("Illegal state: found no TPF/QPF search form anymore in metadata.");if(this.searchForm=f,this.defaultGraph=l.defaultGraph?d.namedNode(l.defaultGraph):void 0,h){let e=(0,a.wrap)(h);this.defaultGraph&&(e=this.reverseMapQuadsToDefaultGraph(e)),e.setProperty("metadata",l),this.cacheQuads(e,d.variable(""),d.variable(""),d.variable(""),d.variable(""))}}async getSelectorShape(){return this.bindingsRestricted?p.SELECTOR_SHAPE_BR:p.SELECTOR_SHAPE}queryBindings(e,t,r){if("pattern"!==e.type)throw new Error(`Attempted to pass non-pattern operation '${e.type}' to QuerySourceQpf`);const a=Boolean(t.get(i.KeysQueryOperation.unionDefaultGraph));let o=this.match(e.subject,e.predicate,e.object,e.graph,a,t,r);return o=(0,n.filterMatchingQuotedQuads)(e,o),(0,n.quadsToBindings)(o,e,this.bindingsFactory,a)}getSearchForm(e){if(!e.searchForms||!e.searchForms.values)return;const{searchForms:t}=e;for(const e of t.values){if(this.graphUri&&this.subjectUri in e.mappings&&this.predicateUri in e.mappings&&this.objectUri in e.mappings&&this.graphUri in e.mappings&&4===Object.keys(e.mappings).length)return e;if(this.subjectUri in e.mappings&&this.predicateUri in e.mappings&&this.objectUri in e.mappings&&3===Object.keys(e.mappings).length)return e}}createFragmentUri(e,t,r,n,i){const a={},o=[{uri:this.subjectUri,term:t},{uri:this.predicateUri,term:r},{uri:this.objectUri,term:n},{uri:this.graphUri,term:i}];for(const e of o)e.uri&&(this.bindingsRestricted||"Variable"!==e.term.termType&&("Quad"!==e.term.termType||(0,u.everyTermsNested)(e.term,(e=>"Variable"!==e.termType))))&&(a[e.uri]=(0,s.termToString)(e.term));return e.getUri(a)}match(e,t,r,n,i,o,s){let c=!1;if("DefaultGraph"===n.termType)if(this.defaultGraph)c=!0,n=this.defaultGraph;else if(4!==Object.keys(this.searchForm.mappings).length||this.defaultGraph)3===Object.keys(this.searchForm.mappings).length&&(n=d.variable("g"));else{if(!i){const e=new a.ArrayIterator([],{autoStart:!1});return e.setProperty("metadata",{requestTime:0,cardinality:{type:"exact",value:0},first:null,next:null,last:null,canContainUndefs:!1}),e}n=d.variable("g")}if(!s?.filterBindings){const i=this.getCachedQuads(e,t,r,n);if(i)return i}const l=this;let p;const h=async function(){let i=l.createFragmentUri(l.searchForm,e,t,r,n);s?.filterBindings&&(i=await l.getBindingsRestrictedLink(e,t,r,n,i,s.filterBindings));const a=await l.mediatorDereferenceRdf.mediate({context:o,url:i});i=a.url;const c=await l.mediatorMetadata.mediate({context:o,url:i,quads:a.data,triples:a.metadata?.triples}),{metadata:u}=await l.mediatorMetadataExtract.mediate({context:o,url:i,metadata:c.metadata,requestTime:a.requestTime});return p.setProperty("metadata",{...u,canContainUndefs:!1,subsetOf:l.url}),c.data}();return p=new a.TransformIterator((async()=>{const i=await h,o=d.defaultGraph();let s=(0,a.wrap)(i).transform({filter:i=>!!(0,u.matchPattern)(i,e,t,r,n)||c&&(0,u.matchPattern)(i,e,t,r,o)});return(c||"Variable"===n.termType)&&(s=this.reverseMapQuadsToDefaultGraph(s)),s}),{autoStart:!1}),s?.filterBindings?p:(this.cacheQuads(p,e,t,r,n),this.getCachedQuads(e,t,r,n))}async getBindingsRestrictedLink(e,t,r,n,i,a){const o=[];for(const e of await a.bindings.toArray()){const t=["("];for(const r of a.metadata.variables){const n=e.get(r);t.push(n?(0,c.termToString)(n):"UNDEF"),t.push(" ")}t.push(")"),o.push(t.join(""))}return 0===o.length&&o.push("()"),`${i}&values=${encodeURIComponent(`(${a.metadata.variables.map((e=>`?${e.value}`)).join(" ")}) { ${o.join(" ")} }`)}`}reverseMapQuadsToDefaultGraph(e){const t=d.defaultGraph();return e.map((e=>(0,u.mapTerms)(e,((e,r)=>"graph"===r&&e.equals(this.defaultGraph)?t:e))))}getPatternId(e,t,r,n){return JSON.stringify({s:"Variable"===e.termType?"":h(e),p:"Variable"===t.termType?"":h(t),o:"Variable"===r.termType?"":h(r),g:"Variable"===n.termType?"":h(n)})}cacheQuads(e,t,r,n,i){const a=this.getPatternId(t,r,n,i);this.cachedQuads[a]=e.clone()}getCachedQuads(e,t,r,n){const i=this.getPatternId(e,t,r,n),a=this.cachedQuads[i];if(a)return a.clone()}queryQuads(e,t){throw new Error("queryQuads is not implemented in QuerySourceQpf")}queryBoolean(e,t){throw new Error("queryBoolean is not implemented in QuerySourceQpf")}queryVoid(e,t){throw new Error("queryVoid is not implemented in QuerySourceQpf")}}function h(e){return"DefaultGraph"===e.termType?"|":(0,s.termToString)(e)}t.QuerySourceQpf=p,p.SELECTOR_SHAPE={type:"operation",operation:{operationType:"pattern",pattern:l.createPattern(d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g"))},variablesOptional:[d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g")]},p.SELECTOR_SHAPE_BR={type:"operation",operation:{operationType:"pattern",pattern:l.createPattern(d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g"))},variablesOptional:[d.variable("s"),d.variable("p"),d.variable("o"),d.variable("g")],filterBindings:!0}},52378:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(88760),t),i(r(92591),t)},480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermediaSparql=void 0;const n=r(91674),i=r(89168),a=r(99193);class o extends i.ActorQuerySourceIdentifyHypermedia{constructor(e){super(e,"sparql")}async testMetadata(e){if(!(e.forceSourceType||e.metadata.sparqlService||this.checkUrlSuffix&&e.url.endsWith("/sparql")))throw new Error(`Actor ${this.name} could not detect a SPARQL service description or URL ending on /sparql.`);return{filterFactor:1}}async run(e){return this.logInfo(e.context,`Identified ${e.url} as sparql source with service URL: ${e.metadata.sparqlService||e.url}`),{source:new a.QuerySourceSparql(e.forceSourceType?e.url:e.metadata.sparqlService||e.url,e.context,this.mediatorHttp,this.bindMethod,await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context),this.forceHttpGet,this.cacheSize,this.countTimeout)}}}t.ActorQuerySourceIdentifyHypermediaSparql=o},99193:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceSparql=void 0;const n=r(32227),i=r(34368),a=r(76664),o=r(74190),s=r(35069),c=r(18050),u=r(31578),l=new u.Factory,d=new c.DataFactory,p=d.variable("count"),h={type:"estimate",value:Number.POSITIVE_INFINITY};class f{constructor(e,t,r,n,i,a,c,u){this.referenceValue=e,this.url=e,this.context=t,this.mediatorHttp=r,this.bindMethod=n,this.bindingsFactory=i,this.endpointFetcher=new o.SparqlEndpointFetcher({method:a?"GET":"POST",fetch:(e,t)=>this.mediatorHttp.mediate({input:e,init:t,context:this.lastSourceContext}),prefixVariableQuestionMark:!0}),this.cache=c>0?new s.LRUCache({max:c}):void 0,this.countTimeout=u}async getSelectorShape(){return f.SELECTOR_SHAPE}queryBindings(e,t,r){let i;i=r?.joinBindings?f.addBindingsToOperation(this.bindMethod,e,r.joinBindings):Promise.resolve(e);const o=new a.TransformIterator((async()=>{const e=await i,a=u.Util.inScopeVariables(e),o=t.get(n.KeysInitQuery.queryString),s=!r?.joinBindings&&o?o:f.operationToSelectQuery(e,a),c=f.operationCanContainUndefs(e);return this.queryBindingsRemote(this.url,s,a,t,c)}),{autoStart:!1});return this.attachMetadata(o,t,i),o}queryQuads(e,t){this.lastSourceContext=this.context.merge(t);const r=this.endpointFetcher.fetchTriples(this.url,t.get(n.KeysInitQuery.queryString)??f.operationToQuery(e));this.lastSourceContext=void 0;const i=(0,a.wrap)(r,{autoStart:!1,maxBufferSize:Number.POSITIVE_INFINITY});return this.attachMetadata(i,t,Promise.resolve(e.input)),i}queryBoolean(e,t){this.lastSourceContext=this.context.merge(t);const r=this.endpointFetcher.fetchAsk(this.url,t.get(n.KeysInitQuery.queryString)??f.operationToQuery(e));return this.lastSourceContext=void 0,r}queryVoid(e,t){this.lastSourceContext=this.context.merge(t);const r=this.endpointFetcher.fetchUpdate(this.url,t.get(n.KeysInitQuery.queryString)??f.operationToQuery(e));return this.lastSourceContext=void 0,r}attachMetadata(e,t,r){let n=[],i=!1;new Promise((async(e,a)=>{let o;try{const a=await r;n=u.Util.inScopeVariables(a),o=f.operationToCountQuery(a),i=f.operationCanContainUndefs(a);const s=this.cache?.get(o);if(void 0!==s)return e(s);const c=setTimeout((()=>e(h)),this.countTimeout),l=await this.queryBindingsRemote(this.url,o,[p],t,!1);l.on("data",(t=>{clearTimeout(c);const r=t.get(p),n={type:"estimate",value:Number.POSITIVE_INFINITY};if(r){const e=Number.parseInt(r.value,10);Number.isNaN(e)||(n.type="exact",n.value=e,this.cache?.set(o,n))}return e(n)})),l.on("error",(()=>{clearTimeout(c),e(h)})),l.on("end",(()=>{clearTimeout(c),e(h)}))}catch(e){return a(e)}})).then((t=>e.setProperty("metadata",{cardinality:t,canContainUndefs:i,variables:n}))).catch((()=>e.setProperty("metadata",{cardinality:h,canContainUndefs:i,variables:n})))}static async addBindingsToOperation(e,t,r){const n=await r.bindings.toArray();switch(e){case"values":return l.createJoin([l.createValues(r.metadata.variables,n.map((e=>Object.fromEntries([...e].map((([e,t])=>[`?${e.value}`,t])))))),t],!1);case"union":throw new Error('Not implemented yet: "union" case');case"filter":throw new Error('Not implemented yet: "filter" case')}}static operationToSelectQuery(e,t){return f.operationToQuery(l.createProject(e,t))}static operationToCountQuery(e){return f.operationToQuery(l.createProject(l.createExtend(l.createGroup(e,[],[l.createBoundAggregate(d.variable("var0"),"count",l.createWildcardExpression(),!1)]),d.variable("count"),l.createTermExpression(d.variable("var0"))),[d.variable("count")]))}static operationToQuery(e){return(0,u.toSparql)(e,{sparqlStar:!0})}static operationCanContainUndefs(e){let t=!1;return u.Util.recurseOperation(e,{leftjoin:()=>(t=!0,!1),values:e=>(t=e.bindings.some((t=>e.variables.some((e=>!(`?${e.value}`in t))))),!1),union(e){const r=e.input.map(u.Util.inScopeVariables).map((e=>e.map((e=>e.value)))).map((e=>e.sort(((e,t)=>e.localeCompare(t))))).map((e=>e.join(",")));return!!r.every((e=>e===r[0]))||(t=!0,!1)}}),t}async queryBindingsRemote(e,t,r,n,o){this.lastSourceContext=this.context.merge(n);const s=await this.endpointFetcher.fetchBindings(e,t);return this.lastSourceContext=void 0,(0,a.wrap)(s,{autoStart:!1,maxBufferSize:Number.POSITIVE_INFINITY}).map((t=>this.bindingsFactory.bindings(r.map((r=>{const n=t[`?${r.value}`];return o||n||i.Actor.getContextLogger(this.context)?.warn(`The endpoint ${e} failed to provide a binding for ${r.value}.`),[r,n]})).filter((([e,t])=>Boolean(t))))))}toString(){return`QuerySourceSparql(${this.url})`}}t.QuerySourceSparql=f,f.SELECTOR_SHAPE={type:"disjunction",children:[{type:"operation",operation:{operationType:"type",type:u.Algebra.types.PROJECT},joinBindings:!0},{type:"operation",operation:{operationType:"type",type:u.Algebra.types.CONSTRUCT}},{type:"operation",operation:{operationType:"type",type:u.Algebra.types.DESCRIBE}},{type:"operation",operation:{operationType:"type",type:u.Algebra.types.ASK}},{type:"operation",operation:{operationType:"type",type:u.Algebra.types.COMPOSITE_UPDATE}}]}},16025:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(480),t),i(r(99193),t)},93017:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermedia=void 0;const n=r(91674),i=r(65483),a=r(32227),o=r(34368),s=r(870);class c extends i.ActorQuerySourceIdentify{constructor(e){super(e)}async test(e){if("string"!=typeof e.querySourceUnidentified.value)throw new TypeError(`${this.name} requires a single query source with a URL value to be present in the context.`);return!0}async run(e){return{querySource:{source:new s.QuerySourceHypermedia(this.cacheSize,e.querySourceUnidentified.value,e.querySourceUnidentified.type,this.maxIterators,this.aggregateTraversalStore&&Boolean(e.querySourceUnidentified.context?.get(a.KeysQuerySourceIdentify.traverse)),{mediatorMetadata:this.mediatorMetadata,mediatorMetadataExtract:this.mediatorMetadataExtract,mediatorMetadataAccumulate:this.mediatorMetadataAccumulate,mediatorDereferenceRdf:this.mediatorDereferenceRdf,mediatorQuerySourceIdentifyHypermedia:this.mediatorQuerySourceIdentifyHypermedia,mediatorRdfResolveHypermediaLinks:this.mediatorRdfResolveHypermediaLinks,mediatorRdfResolveHypermediaLinksQueue:this.mediatorRdfResolveHypermediaLinksQueue},(t=>this.logWarn(e.context,t)),await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context)),context:e.querySourceUnidentified.context??new o.ActionContext}}}}t.ActorQuerySourceIdentifyHypermedia=c},87896:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedRdfSourcesAsyncRdfIterator=void 0;const n=r(72394),i=r(76664);class a extends i.BufferedIterator{constructor(e,t,r,n,i,a,o,s){if(super({autoStart:!1,...s}),this.started=!1,this.currentIterators=[],this.iteratorsPendingCreation=0,this.iteratorsPendingTermination=0,this.accumulatedMetadata=Promise.resolve(void 0),this._reading=!1,this.cacheSize=e,this.operation=t,this.queryBindingsOptions=r,this.context=n,this.firstUrl=i,this.maxIterators=a,this.sourceStateGetter=o,this.maxIterators<=0)throw new Error(`LinkedRdfSourcesAsyncRdfIterator.maxIterators must be larger than zero, but got ${this.maxIterators}`)}kickstart(){this.started||this._fillBufferAsync()}getProperty(e,t){return"metadata"!==e||this.started||(this.preflightMetadata||(this.preflightMetadata=new Promise(((e,t)=>{this.sourceStateGetter({url:this.firstUrl},{}).then((t=>{const r=t.source.queryBindings(this.operation,this.context);r.getProperty("metadata",(i=>{i.state=new n.MetadataValidationState,r.destroy(),this.accumulateMetadata(t.metadata,i).then((r=>{const n={...t.metadata,...i,...r};e(n)})).catch((()=>{e({...t.metadata,state:new n.MetadataValidationState})}))}))})).catch(t)}))),this.preflightMetadata.then((e=>this.setProperty("metadata",e))).catch((()=>{}))),super.getProperty(e,t)}_end(e){for(const e of this.currentIterators)e.destroy();super._end(e)}_read(e,t){if(this.started){for(const t of this.currentIterators){for(;e>0;){const r=t.read();if(null===r)break;e--,this._push(r)}if(e<=0)break}e>=0&&this.canStartNewIterator()?this.sourceStateGetter({url:this.firstUrl},{}).then((e=>{this.startIteratorsForNextUrls(e.handledDatasets,!1),t()})):t()}else this.started=!0,this.sourceStateGetter({url:this.firstUrl},{}).then((e=>{this.startIterator(e),t()})).catch((e=>setTimeout((()=>this.destroy(e)))))}canStartNewIterator(){return this.currentIterators.length+this.iteratorsPendingCreation+this.iteratorsPendingTermination0}startIterator(e){try{const t=e.source.queryBindings(this.operation,this.context,this.queryBindingsOptions);this.currentIterators.push(t);let r=!1,i=!1;t._destination=this,t.on("error",(e=>this.destroy(e))),t.on("readable",(()=>this._fillBuffer())),t.on("end",(()=>{this.currentIterators.splice(this.currentIterators.indexOf(t),1),r=!0,i||this.iteratorsPendingTermination++,i&&this.startIteratorsForNextUrls(e.handledDatasets,!0)})),t.getProperty("metadata",(t=>{this.accumulatedMetadata=this.accumulatedMetadata.then((a=>(async()=>(a||(a=e.metadata),this.accumulateMetadata(a,t)))().then((a=>{const o={...e.metadata,...t,...a};return o.state=new n.MetadataValidationState,this.updateMetadata(o),this.preflightMetadata&&this.preflightMetadata.then((e=>e.state.invalidate())).catch((()=>{})),this.getSourceLinks(o).then((e=>Promise.all(e))).then((async t=>{const n=await this.getLinkQueue();for(const r of t)n.push(r,e.link);i=!0,r&&this.iteratorsPendingTermination--,this.startIteratorsForNextUrls(e.handledDatasets,!0)})).catch((e=>this.destroy(e))),o})))).catch((e=>(this.destroy(e),{})))}))}catch(e){this.destroy(e)}}updateMetadata(e){const t=this.getProperty("metadata");this.setProperty("metadata",e),t?.state.invalidate()}isRunning(){return!this.done}startIteratorsForNextUrls(e,t){this.getLinkQueue().then((r=>{for(;this.canStartNewIterator()&&this.isRunning();){const t=r.pop();if(!t)break;this.iteratorsPendingCreation++,this.sourceStateGetter(t,e).then((e=>{this.iteratorsPendingCreation--,this.startIterator(e)})).catch((e=>this.emit("error",e)))}t&&this.isCloseable(r,!0)&&this.close()})).catch((e=>this.destroy(e)))}isCloseable(e,t){return e.isEmpty()&&!this.areIteratorsRunning()}}t.LinkedRdfSourcesAsyncRdfIterator=a},47833:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatedLinkedRdfSourcesAsyncRdfIterator=void 0;const n=r(32227),i=r(18050),a=r(31578),o=r(87896),s=new i.DataFactory,c=new a.Factory;class u extends o.LinkedRdfSourcesAsyncRdfIterator{constructor(e,t,r,n,i,a,o,s,c,u,l,d){super(e,t,r,n,a,o,s,c?{maxBufferSize:Number.POSITIVE_INFINITY}:void 0),this.wasForcefullyClosed=!1,this.forceSourceType=i,this.mediatorMetadataAccumulate=u,this.mediatorRdfResolveHypermediaLinks=l,this.mediatorRdfResolveHypermediaLinksQueue=d,this.handledUrls={[a]:!0},this.aggregatedStore=c}close(){this.aggregatedStore?this.getLinkQueue().then((e=>{this.isCloseable(e,!1)?(this.aggregatedStore&&setTimeout((()=>this.aggregatedStore.end())),super.close()):this.wasForcefullyClosed=!0})).catch((e=>super.destroy(e))):super.close()}destroy(e){this.aggregatedStore?this.getLinkQueue().then((t=>{e??this.isCloseable(t,!1)?(this.aggregatedStore&&setTimeout((()=>this.aggregatedStore.end())),super.destroy(e)):this.wasForcefullyClosed=!0})).catch((e=>super.destroy(e))):super.destroy(e)}isCloseable(e,t){return(t?e.isEmpty():this.wasForcefullyClosed||e.isEmpty())&&!this.areIteratorsRunning()}canStartNewIterator(){return!this.wasForcefullyClosed&&this.aggregatedStore&&this.aggregatedStore.hasRunningIterators()||super.canStartNewIterator()}canStartNewIteratorConsiderReadable(){return!this.aggregatedStore}isRunning(){return this.aggregatedStore&&this.aggregatedStore.hasRunningIterators()||!this.done}getLinkQueue(){return this.linkQueue||(this.linkQueue=this.mediatorRdfResolveHypermediaLinksQueue.mediate({firstUrl:this.firstUrl,context:this.context}).then((e=>e.linkQueue))),this.linkQueue}async getSourceLinks(e){try{const{links:t}=await this.mediatorRdfResolveHypermediaLinks.mediate({context:this.context,metadata:e});return t.filter((e=>!this.handledUrls[e.url]&&(this.handledUrls[e.url]=!0,!0)))}catch{return[]}}startIterator(e){if(this.aggregatedStore&&!this.aggregatedStore.containedSources.has(e.link.url)){this.aggregatedStore?.containedSources.add(e.link.url);const t=e.source.queryBindings(c.createPattern(s.variable("s"),s.variable("p"),s.variable("o"),s.variable("g")),this.context.set(n.KeysQueryOperation.unionDefaultGraph,!0)).map((e=>s.quad(e.get("s"),e.get("p"),e.get("o"),e.get("g"))));this.aggregatedStore.import(t).on("end",(()=>{super.startIterator(e)}))}else super.startIterator(e)}async accumulateMetadata(e,t){return(await this.mediatorMetadataAccumulate.mediate({mode:"append",accumulatedMetadata:e,appendingMetadata:t,context:this.context})).metadata}updateMetadata(e){super.updateMetadata(e),this.aggregatedStore?.setBaseMetadata(e,!0)}}t.MediatedLinkedRdfSourcesAsyncRdfIterator=u},870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceHypermedia=void 0;const n=r(27474),i=r(32227),a=r(76664),o=r(35069),s=r(58521),c=r(47833),u=r(69321);t.QuerySourceHypermedia=class{constructor(e,t,r,n,i,a,s,c){this.referenceValue=t,this.cacheSize=e,this.firstUrl=t,this.forceSourceType=r,this.maxIterators=n,this.mediators=a,this.aggregateStore=i,this.logWarning=s,this.bindingsFactory=c,this.sourcesState=new o.LRUCache({max:this.cacheSize})}async getSelectorShape(e){return(await this.getSourceCached({url:this.firstUrl},{},e,this.getAggregateStore(e))).source.getSelectorShape(e)}queryBindings(e,t,r){const i=this.getAggregateStore(t);if(i&&"pattern"===e.type&&i.started)return new n.QuerySourceRdfJs(i,this.bindingsFactory).queryBindings(e,t);0===this.sourcesState.size&&this.getSourceCached({url:this.firstUrl},{},t,i).catch((e=>a.destroy(e)));const a=new c.MediatedLinkedRdfSourcesAsyncRdfIterator(this.cacheSize,e,r,t,this.forceSourceType,this.firstUrl,this.maxIterators,((e,r)=>this.getSourceCached(e,r,t,i)),i,this.mediators.mediatorMetadataAccumulate,this.mediators.mediatorRdfResolveHypermediaLinks,this.mediators.mediatorRdfResolveHypermediaLinksQueue);if(i){i.started=!0;const e=()=>a.kickstart();i.addIteratorCreatedListener(e),a.on("end",(()=>i.removeIteratorCreatedListener(e)))}return a}queryQuads(e,t){return new a.TransformIterator((async()=>(await this.getSourceCached({url:this.firstUrl},{},t,this.getAggregateStore(t))).source.queryQuads(e,t)))}async queryBoolean(e,t){const r=await this.getSourceCached({url:this.firstUrl},{},t,this.getAggregateStore(t));return await r.source.queryBoolean(e,t)}async queryVoid(e,t){const r=await this.getSourceCached({url:this.firstUrl},{},t,this.getAggregateStore(t));return await r.source.queryVoid(e,t)}async getSource(e,t,r,n){e.context&&(r=r.merge(e.context));let i,a,o=e.url;try{const t=await this.mediators.mediatorDereferenceRdf.mediate({context:r,url:o});o=t.url;const n=await this.mediators.mediatorMetadata.mediate({context:r,url:o,quads:t.data,triples:t.metadata?.triples});n.data.on("error",(()=>{})),a=(await this.mediators.mediatorMetadataExtract.mediate({context:r,url:o,metadata:n.metadata,headers:t.headers,requestTime:t.requestTime})).metadata,i=n.data,e.transform&&(i=await e.transform(i))}catch(e){i=new s.Readable,i.read=()=>(setTimeout((()=>i.emit("error",e))),null),({metadata:a}=await this.mediators.mediatorMetadataAccumulate.mediate({context:r,mode:"initialize"})),this.logWarning(`Metadata extraction for ${o} failed: ${e.message}`)}n?.setBaseMetadata(a,!1),n?.containedSources.add(e.url),n?.import(i);const{source:c,dataset:u}=await this.mediators.mediatorQuerySourceIdentifyHypermedia.mediate({context:r,forceSourceType:e.url===this.firstUrl?this.forceSourceType:void 0,handledDatasets:t,metadata:a,quads:i,url:o});return u&&(t[u]=!0),{link:e,source:c,metadata:a,handledDatasets:t}}getSourceCached(e,t,r,n){let i=this.sourcesState.get(e.url);return i||(i=this.getSource(e,t,r,n),e.url!==this.firstUrl&&void 0!==n||this.sourcesState.set(e.url,i),i)}getAggregateStore(e){let t;if(this.aggregateStore){const r=e.get(i.KeysQuerySourceIdentify.hypermediaSourcesAggregatedStores);if(r)return t=r.get(this.firstUrl),t||(t=new u.StreamingStoreMetadata(void 0,(async(t,r)=>(await this.mediators.mediatorMetadataAccumulate.mediate({mode:"append",accumulatedMetadata:t,appendingMetadata:r,context:e})).metadata)),r.set(this.firstUrl,t)),t}}toString(){return`QuerySourceHypermedia(${this.firstUrl})`}}},69321:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingStoreMetadata=void 0;const n=r(59510),i=r(72394),a=r(2887);class o extends a.StreamingStore{constructor(e,t){super(e),this.started=!1,this.containedSources=new Set,this.runningIterators=new Set,this.iteratorCreatedListeners=new Set,this.baseMetadata={state:new i.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:[]},this.metadataAccumulator=t}import(e){return this.ended||super.import(e),e}hasRunningIterators(){return this.runningIterators.size>0}match(e,t,r,a){const o=super.match(e,t,r,a),s=new n.ClosableTransformIterator(o,{autoStart:!1,onClose:()=>{this.runningIterators.delete(s)}});let c=this.getStore().countQuads(e,t,r,a);const u={state:new i.MetadataValidationState,cardinality:{type:"estimate",value:c},canContainUndefs:!1};s.setProperty("metadata",u),s.setProperty("lastCount",c),o.on("quad",(()=>{s.setProperty("lastCount",++c),this.updateMetadataState(s,c)})),this.runningIterators.add(s);for(const e of this.iteratorCreatedListeners)e();return s}setBaseMetadata(e,t){if(this.baseMetadata={...e},this.baseMetadata.cardinality={type:"exact",value:0},t)for(const e of this.runningIterators){const t=e.getProperty("lastCount");this.updateMetadataState(e,t)}}updateMetadataState(e,t){const r={state:new i.MetadataValidationState,cardinality:{type:"estimate",value:t},canContainUndefs:!1,variables:[]};this.metadataAccumulator(this.baseMetadata,r).then((t=>{t.state=new i.MetadataValidationState;const r=e.getProperty("metadata");e.setProperty("metadata",t),r?.state.invalidate()})).catch((()=>{}))}addIteratorCreatedListener(e){this.iteratorCreatedListeners.add(e)}removeIteratorCreatedListener(e){this.iteratorCreatedListeners.delete(e)}}t.StreamingStoreMetadata=o},57789:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(93017),t),i(r(870),t)},34263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyRdfJs=void 0;const n=r(91674),i=r(65483),a=r(34368),o=r(35720);class s extends i.ActorQuerySourceIdentify{constructor(e){super(e)}async test(e){const t=e.querySourceUnidentified;if(void 0!==t.type&&"rdfjs"!==t.type)throw new Error(`${this.name} requires a single query source with rdfjs type to be present in the context.`);if("string"==typeof t.value||!("match"in t.value))throw new Error(`${this.name} received an invalid rdfjs query source.`);return!0}async run(e){return{querySource:{source:new o.QuerySourceRdfJs(e.querySourceUnidentified.value,await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context)),context:e.querySourceUnidentified.context??new a.ActionContext}}}}t.ActorQuerySourceIdentifyRdfJs=s},45958:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35720:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuerySourceRdfJs=void 0;const n=r(65483),i=r(32227),a=r(72394),o=r(76664),s=r(18050),c=r(13252),u=new(r(31578).Factory),l=new s.DataFactory;class d{constructor(e,t){this.source=e,this.referenceValue=e,this.bindingsFactory=t}static nullifyVariables(e,t){return!e||"Variable"===e.termType||!t&&"Quad"===e.termType&&(0,c.someTermsNested)(e,(e=>"Variable"===e.termType))?void 0:e}static hasDuplicateVariables(e){const t=(0,c.filterTermsNested)(e,(e=>"Variable"===e.termType));return t.length>1&&(0,c.uniqTerms)(t).lengths.destroy(e))),(0,n.quadsToBindings)(s,e,this.bindingsFactory,Boolean(t.get(i.KeysQueryOperation.unionDefaultGraph)))}async setMetadata(e,t){const r=Boolean(this.source.features?.quotedTripleFiltering);let n;if(this.source.countQuads)n=await this.source.countQuads(d.nullifyVariables(t.subject,r),d.nullifyVariables(t.predicate,r),d.nullifyVariables(t.object,r),d.nullifyVariables(t.graph,r));else{let e=0;n=await new Promise(((n,i)=>{const a=this.source.match(d.nullifyVariables(t.subject,r),d.nullifyVariables(t.predicate,r),d.nullifyVariables(t.object,r),d.nullifyVariables(t.graph,r));a.on("error",i),a.on("end",(()=>n(e))),a.on("data",(()=>e++))}))}const i=!r&&(0,c.someTerms)(t,(e=>"Quad"===e.termType))||d.hasDuplicateVariables(t);e.setProperty("metadata",{state:new a.MetadataValidationState,cardinality:{type:i?"estimate":"exact",value:n},canContainUndefs:!1})}queryQuads(e,t){throw new Error("queryQuads is not implemented in QuerySourceQpf")}queryBoolean(e,t){throw new Error("queryBoolean is not implemented in QuerySourceQpf")}queryVoid(e,t){throw new Error("queryVoid is not implemented in QuerySourceQpf")}toString(){return`QuerySourceRdfJs(${this.source.constructor.name})`}}t.QuerySourceRdfJs=d,d.SELECTOR_SHAPE={type:"operation",operation:{operationType:"pattern",pattern:u.createPattern(l.variable("s"),l.variable("p"),l.variable("o"))},variablesOptional:[l.variable("s"),l.variable("p"),l.variable("o")]}},27474:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(34263),t),i(r(45958),t),i(r(35720),t)},16661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifySerialized=void 0;const n=r(65483),i=r(10953),a=r(58521);class o extends n.ActorQuerySourceIdentify{constructor(e){super(e)}async test(e){if(!this.isStringSource(e.querySourceUnidentified))throw new Error(`${this.name} requires a single query source with serialized type to be present in the context.`);return!0}async run(e){return await this.mediatorQuerySourceIdentify.mediate({querySourceUnidentified:{type:"rdfjs",value:await this.getRdfSource(e.context,e.querySourceUnidentified),context:e.querySourceUnidentified.context},context:e.context})}async getRdfSource(e,t){const r=new a.Readable({objectMode:!0});r._read=()=>{},r.push(t.value),r.push(null);const n={context:e,handle:{metadata:{baseIRI:t.baseIRI},data:r,context:e},handleMediaType:t.mediaType},o=await this.mediatorRdfParse.mediate(n);return await(0,i.storeStream)(o.handle.data)}isStringSource(e){return"type"in e?"serialized"===e.type:"string"==typeof e.value&&"mediaType"in e}}t.ActorQuerySourceIdentifySerialized=o},84701:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(16661),t)},13494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinEntriesSortCardinality=void 0;const n=r(84287);class i extends n.ActorRdfJoinEntriesSort{constructor(e){super(e)}async test(e){return!0}async run(e){return{entries:[...e.entries].sort(((e,t)=>e.metadata.cardinality.value-t.metadata.cardinality.value))}}}t.ActorRdfJoinEntriesSortCardinality=i},36545:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(13494),t)},87653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinHash=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"hash",limitEntries:2,requiresVariableOverlap:!0})}async getOutput(e){let t=await n.ActorRdfJoin.getMetadatas(e.entries);t[1].cardinality.valuen.ActorRdfJoin.hash(e,r)),n.ActorRdfJoin.joinBindings),metadata:async()=>await this.constructResultMetadata(e.entries,t,e.context)}}}async getJoinCoefficients(e,t){t[1].cardinality.value{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiBindSource=void 0;const n=r(59510),i=r(32353),a=r(76664),o=new(r(31578).Factory);class s extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"bind-source",canHandleUndefs:!0})}async getOutput(e){const t=await i.ActorRdfJoin.getEntriesWithMetadatas(e.entries),r=await this.sortJoinEntries(t,e.context);this.logDebug(e.context,"First entry for Bind Join Source: ",(()=>({entry:r[0].operation,metadata:r[0].metadata})));for(const[e,t]of r.entries())0!==e&&t.output.bindingsStream.close();const o=r[0].output,s=r[0].metadata,c=[...r];c.splice(0,1);const u=n.ActorQueryOperation.getOperationSource(c[0].operation),l=this.createOperationFromEntries(c),d=new i.ChunkedIterator(o.bindingsStream,this.blockSize,{autoStart:!1});return{result:{type:"bindings",bindingsStream:new a.UnionIterator(d.map((t=>u.source.queryBindings(l,u.context?e.context.merge(u.context):e.context,{joinBindings:{bindings:t,metadata:s}})))),metadata:()=>this.constructResultMetadata(r,r.map((e=>e.metadata)),e.context)},physicalPlanMetadata:{bindIndex:t.indexOf(r[0])}}}async sortJoinEntries(e,t){return(e=await i.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort,e,t)).sort(((e,t)=>e.operationModified&&!t.operationModified?-1:0))}async getJoinCoefficients(e,t){const r=await this.sortJoinEntries(e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context);t=r.map((e=>e.metadata));const a=i.ActorRdfJoin.getRequestInitialTimes(t),o=i.ActorRdfJoin.getRequestItemTimes(t),s=[...r],c=[...a],u=[...o];s.splice(0,1),c.splice(0,1),u.splice(0,1);const l=s.map((e=>n.ActorQueryOperation.getOperationSource(e.operation)));if(l.some((e=>!e)))throw new Error(`Actor ${this.name} can not bind on remaining operations without source annotation`);if(l.some((e=>e!==l[0])))throw new Error(`Actor ${this.name} can not bind on remaining operations with non-equal source annotation`);const d=l[0],p=this.createOperationFromEntries(s),h=await d.source.getSelectorShape(e.context);if(!n.ActorQueryOperation.doesShapeAcceptOperation(h,p,{joinBindings:!0}))throw new Error(`Actor ${this.name} detected a source that can not handle passing down join bindings`);const f=await Promise.all(s.map((async t=>(await this.mediatorJoinSelectivity.mediate({entries:[r[0],t],context:e.context})).selectivity*this.selectivityModifier))),y=s.map(((e,t)=>e.metadata.cardinality.value*f[t])).reduce(((e,t)=>e+t),0);return{iterations:1,persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:a[0]+t[0].cardinality.value*o[0]+a[1]+y*o[1]}}createOperationFromEntries(e){return 1===e.length?e[0].operation:o.createJoin(e.map((e=>e.operation)),!0)}}t.ActorRdfJoinMultiBindSource=s},6551:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(57581),t)},38752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiBind=void 0;const n=r(91674),i=r(59510),a=r(32353),o=r(32227),s=r(76664),c=r(31578);class u extends a.ActorRdfJoin{constructor(e){void 0===e.minMaxCardinalityRatio&&(e.minMaxCardinalityRatio=60),super(e,{logicalType:"inner",physicalName:"bind",canHandleUndefs:!0,isLeaf:!1})}static createBindStream(e,t,r,n,a,o){const c="depth-first"===e,u=e=>{const t=r.map((t=>(0,i.materializeOperation)(t,e,o,{bindFilter:!0}))),a=t=>t.merge(e);return new s.TransformIterator((async()=>(await n(t,e)).transform({map:a})),{maxBufferSize:128,autoStart:c})};switch(e){case"depth-first":return new s.MultiTransformIterator(t,{autoStart:!1,multiTransform:u,optional:a});case"breadth-first":return new s.UnionIterator(t.transform({map:u,optional:a}),{autoStart:!1});default:throw new Error(`Received request for unknown bind order: ${e}`)}}async getOutput(e){const t=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context),r=await a.ActorRdfJoin.getEntriesWithMetadatas(e.entries),s=await a.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort,r,e.context);this.logDebug(e.context,"First entry for Bind Join: ",(()=>({entry:s[0].operation,metadata:s[0].metadata})));for(const[e,t]of s.entries())0!==e&&t.output.bindingsStream.close();const c=s[0].output,l=[...s];l.splice(0,1);const d=e.context.set(o.KeysQueryOperation.joinLeftMetadata,s[0].metadata).set(o.KeysQueryOperation.joinRightMetadatas,l.map((e=>e.metadata)));return{result:{type:"bindings",bindingsStream:u.createBindStream(this.bindOrder,c.bindingsStream,l.map((e=>e.operation)),(async(e,t)=>{const r=1===e.length?e[0]:u.FACTORY.createJoin(e);return i.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:r,context:d?.set(o.KeysQueryOperation.joinBindings,t)})).bindingsStream}),!1,t),metadata:()=>this.constructResultMetadata(s,s.map((e=>e.metadata)),e.context)},physicalPlanMetadata:{bindIndex:r.indexOf(s[0]),bindOperation:s[0].operation,bindOperationCardinality:s[0].metadata.cardinality,bindOrder:this.bindOrder}}}canBindWithOperation(e){let t=!0;return c.Util.recurseOperation(e,{[c.Algebra.types.EXTEND]:()=>(t=!1,!1),[c.Algebra.types.GROUP]:()=>(t=!1,!1)}),t}async getJoinCoefficients(e,t){const r=await a.ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort,e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context);t=r.map((e=>e.metadata));const n=a.ActorRdfJoin.getRequestInitialTimes(t),i=a.ActorRdfJoin.getRequestItemTimes(t),o=[...r],s=[...n],c=[...i];if(o.splice(0,1),s.splice(0,1),c.splice(0,1),o.some((e=>!this.canBindWithOperation(e.operation))))throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);if(o.some((e=>e.operationModified)))throw new Error(`Actor ${this.name} can not be used over remaining entries with modified operations`);if(t[0].cardinality.value*this.minMaxCardinalityRatio>Math.max(...t.map((e=>e.cardinality.value))))throw new Error(`Actor ${this.name} can only run if the smallest stream is much smaller than largest stream`);const u=await Promise.all(o.map((async t=>(await this.mediatorJoinSelectivity.mediate({entries:[r[0],t],context:e.context})).selectivity*this.selectivityModifier))),l=o.map(((e,t)=>e.metadata.cardinality.value*u[t])).reduce(((e,t)=>e+t),0),d=s.reduce(((e,t)=>e+t),0),p=c.reduce(((e,t)=>e+t),0);return{iterations:t[0].cardinality.value*l,persistedItems:0,blockingItems:0,requestTime:n[0]+t[0].cardinality.value*(i[0]+d+l*p)}}}t.ActorRdfJoinMultiBind=u,u.FACTORY=new c.Factory},82331:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(38752),t)},42548:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiEmpty=void 0;const n=r(32353),i=r(72394),a=r(76664);class o extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-empty",canHandleUndefs:!0})}async test(e){if((await n.ActorRdfJoin.getMetadatas(e.entries)).every((e=>n.ActorRdfJoin.getCardinality(e).value>0)))throw new Error(`Actor ${this.name} can only join entries where at least one is empty`);return super.test(e)}async getOutput(e){for(const t of e.entries)t.output.bindingsStream.close();return{result:{bindingsStream:new a.ArrayIterator([],{autoStart:!1}),metadata:async()=>({state:new i.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:n.ActorRdfJoin.joinVariables(await n.ActorRdfJoin.getMetadatas(e.entries))}),type:"bindings"}}}async getJoinCoefficients(e,t){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}t.ActorRdfJoinMultiEmpty=o},85345:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(42548),t)},82314:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiSmallestFilterBindings=void 0;const n=r(91674),i=r(59510),a=r(32353),o=r(32227),s=r(76664),c=r(31578);class u extends a.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-smallest-filter-bindings",limitEntries:2,limitEntriesMin:!0,isLeaf:!1})}async sortJoinEntries(e,t){let{entries:r}=await this.mediatorJoinEntriesSort.mediate({entries:e,context:t});r=r.sort(((e,t)=>e.operationModified&&!t.operationModified?-1:0));const n=r.splice(0,1)[0];let i,a=-1,o=0;for(const[e,t]of r.entries()){const r=n.metadata.variables.filter((e=>t.metadata.variables.some((t=>e.equals(t))))).length;(!i||r>o||r===o&&(t.metadata.variables.lengthc.metadata.variables.some((t=>e.equals(t))))),h={},f=d.clone().map((e=>e.filter(((e,t)=>p.some((e=>e.equals(t))))))).filter((e=>{const t=(0,n.bindingsToString)(e);return!(t in h)&&(h[t]=!0)})),y=new a.ChunkedIterator(f,this.blockSize,{autoStart:!1}),g=i.ActorQueryOperation.getOperationSource(c.operation),m={output:{type:"bindings",bindingsStream:new s.UnionIterator(y.map((t=>g.source.queryBindings(c.operation,g.context?e.context.merge(g.context):e.context,{filterBindings:{bindings:t,metadata:r.metadata}})))),metadata:c.output.metadata},operation:c.operation,operationModified:!0};c.output.bindingsStream.destroy();const b={output:i.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:e.type,entries:[r,m],context:e.context.set(o.KeysRdfJoin.lastPhysicalJoin,this.physicalName)})),operation:u.FACTORY.createJoin([r.operation,m.operation],!1),operationModified:!0},v=l;return v.unshift(b),{result:await this.mediatorJoin.mediate({type:e.type,entries:v,context:e.context}),physicalPlanMetadata:{firstIndex:t.indexOf(r),secondIndex:t.indexOf(c)}}}async getJoinCoefficients(e,t){if(e.context.get(o.KeysRdfJoin.lastPhysicalJoin)===this.physicalName)throw new Error(`Actor ${this.name} can not be called recursively`);t=[...t];const{first:r,second:n,remaining:s}=await this.sortJoinEntries(e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context),c=i.ActorQueryOperation.getOperationSource(n.operation);if(!c)throw new Error(`Actor ${this.name} can only process if entries[1] has a source`);const u=n.operation,l=await c.source.getSelectorShape(e.context);if(!i.ActorQueryOperation.doesShapeAcceptOperation(l,u,{filterBindings:!0}))throw new Error(`Actor ${this.name} can only process if entries[1] accept filterBindings`);t=[r.metadata,n.metadata,...s.map((e=>e.metadata))];const d=a.ActorRdfJoin.getRequestInitialTimes(t),p=a.ActorRdfJoin.getRequestItemTimes(t),{selectivity:h}=await this.mediatorJoinSelectivity.mediate({entries:[r,n],context:e.context}),f=s.reduce(((e,t)=>e*t.metadata.cardinality.value*this.selectivityModifier),1);return{iterations:h*this.selectivityModifier*n.metadata.cardinality.value*f,persistedItems:r.metadata.cardinality.value,blockingItems:r.metadata.cardinality.value,requestTime:d[0]+t[0].cardinality.value*p[0]+d[1]+f*p[1]}}}t.ActorRdfJoinMultiSmallestFilterBindings=u,u.FACTORY=new c.Factory},92107:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(82314),t)},17504:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMultiSmallest=void 0;const n=r(59510),i=r(32353),a=r(31578);class o extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-smallest",limitEntries:3,limitEntriesMin:!0,canHandleUndefs:!0,isLeaf:!1})}async sortJoinEntries(e,t){return(await this.mediatorJoinEntriesSort.mediate({entries:e,context:t})).entries}async getOutput(e){const t=await this.sortJoinEntries(await i.ActorRdfJoin.getEntriesWithMetadatas([...e.entries]),e.context),r=t[0],a=t[1];t.splice(0,2);const s={output:n.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:e.type,entries:[r,a],context:e.context})),operation:o.FACTORY.createJoin([r.operation,a.operation],!1)};return t.push(s),{result:await this.mediatorJoin.mediate({type:e.type,entries:t,context:e.context})}}async getJoinCoefficients(e,t){t=[...t];const r=await this.sortJoinEntries(e.entries.map(((e,r)=>({...e,metadata:t[r]}))),e.context);t=r.map((e=>e.metadata));const n=i.ActorRdfJoin.getRequestInitialTimes(t),a=i.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value*t[1].cardinality.value*t.slice(2).reduce(((e,t)=>e*t.cardinality.value),1),persistedItems:0,blockingItems:0,requestTime:n[0]+t[0].cardinality.value*a[0]+n[1]+t[1].cardinality.value*a[1]+t.slice(2).reduce(((e,t,r)=>e+n.slice(2)[r]+t.cardinality.value*a.slice(2)[r]),0)}}}t.ActorRdfJoinMultiSmallest=o,o.FACTORY=new a.Factory},68841:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(17504),t)},20743:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinNestedLoop=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"nested-loop",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){return{result:{type:"bindings",bindingsStream:new i.NestedLoopJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,n.ActorRdfJoin.joinBindings,{autoStart:!1}),metadata:async()=>await this.constructResultMetadata(e.entries,await n.ActorRdfJoin.getMetadatas(e.entries),e.context)}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value*t[1].cardinality.value,persistedItems:0,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinNestedLoop=a},37081:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(20743),t)},19421:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinNone=void 0;const n=r(91674),i=r(32353),a=r(72394),o=r(76664);class s extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"none",limitEntries:0})}async test(e){if(e.entries.length>0)throw new Error(`Actor ${this.name} can only join zero entries`);return await this.getJoinCoefficients()}async getOutput(e){const t=await n.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context);return{result:{bindingsStream:new o.ArrayIterator([t.bindings()],{autoStart:!1}),metadata:()=>Promise.resolve({state:new a.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}async getJoinCoefficients(){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}t.ActorRdfJoinNone=s},498:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(19421),t)},28178:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSingle=void 0;const n=r(32353);class i extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"single",limitEntries:1}),this.includeInLogs=!1}async test(e){if(1!==e.entries.length)throw new Error(`Actor ${this.name} can only join a single entry`);return await this.getJoinCoefficients()}async getOutput(e){return{result:e.entries[0].output}}async getJoinCoefficients(){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}t.ActorRdfJoinSingle=i},35848:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(28178),t)},19273:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSymmetricHash=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"symmetric-hash",limitEntries:2,requiresVariableOverlap:!0})}async getOutput(e){const t=await n.ActorRdfJoin.getMetadatas(e.entries),r=n.ActorRdfJoin.overlappingVariables(t);return{result:{type:"bindings",bindingsStream:new i.SymmetricHashJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,(e=>a.hash(e,r)),n.ActorRdfJoin.joinBindings),metadata:async()=>await this.constructResultMetadata(e.entries,t,e.context)}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value+t[1].cardinality.value,persistedItems:t[0].cardinality.value+t[1].cardinality.value,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinSymmetricHash=a},77375:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(19273),t)},18014:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMinusHashUndef=void 0;const n=r(59510),i=r(32353),a=r(5985);class o extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"minus",physicalName:"hash-undef",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){const t=e.entries[1].output,r=e.entries[0].output,o=await i.ActorRdfJoin.getMetadatas(e.entries),s=i.ActorRdfJoin.overlappingVariables(o);if(s.length>0){const e=new a.BindingsIndex(s),i=new n.ClosableTransformIterator((async()=>(await new Promise((r=>{t.bindingsStream.on("data",(t=>e.add(t))),t.bindingsStream.on("end",r),t.bindingsStream.on("error",(e=>{i.emit("error",e)}))})),r.bindingsStream.filter((t=>!e.contains(t))))),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}});return{result:{type:"bindings",bindingsStream:i,async metadata(){const e=await r.metadata(),t=await r.metadata();return{...t,canContainUndefs:e.canContainUndefs||t.canContainUndefs}}}}}return t.bindingsStream.destroy(),{result:r}}async getJoinCoefficients(e,t){const r=i.ActorRdfJoin.getRequestInitialTimes(t),n=i.ActorRdfJoin.getRequestItemTimes(t);return{iterations:1.01*(t[0].cardinality.value+t[1].cardinality.value),persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:r[0]+t[0].cardinality.value*n[0]+r[1]+t[1].cardinality.value*n[1]}}}t.ActorRdfJoinMinusHashUndef=o},5985:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsIndex=void 0;const n=r(22112);class i{constructor(e){this.data={},this.keys=e}static hashTerm(e){return e&&"Variable"!==e.termType?(0,n.termToString)(e):""}add(e){if(this.isBindingsValid(e)){let t=this.data;for(const r of this.keys){const n=i.hashTerm(e.get(r));let a=t[n];a||(a=t[n]={}),t=a}}}contains(e){return!!this.isBindingsValid(e)&&this.containsRecursive(e,this.keys,[this.data])}isBindingsValid(e){let t=!1;for(const r of this.keys)if(e.get(r)){t=!0;break}return t}containsRecursive(e,t,r){if(0===t.length)return!0;let n;[n,...t]=t;for(const a of r){const r=i.hashTerm(e.get(n));if(r){const n=[a[r],a[""]].filter(Boolean);if(0===n.length)continue;if(this.containsRecursive(e,t,n))return!0}else{let r=Object.keys(a).map((e=>a[e]));if(0===r.length&&(r=[{}]),this.containsRecursive(e,t,r))return!0}}return!1}}t.BindingsIndex=i},98311:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(18014),t)},99917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinMinusHash=void 0;const n=r(59510),i=r(32353);class a extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"minus",physicalName:"hash",limitEntries:2})}async getOutput(e){const t=e.entries[1].output,r=e.entries[0].output,a=await i.ActorRdfJoin.getMetadatas(e.entries),o=i.ActorRdfJoin.overlappingVariables(a);if(o.length>0){const e={},a=new n.ClosableTransformIterator((async()=>(await new Promise((r=>{t.bindingsStream.on("data",(t=>{e[i.ActorRdfJoin.hashNonClashing(t,o)]=!0})),t.bindingsStream.on("end",r),t.bindingsStream.on("error",(e=>{a.emit("error",e)}))})),r.bindingsStream.filter((t=>!e[i.ActorRdfJoin.hashNonClashing(t,o)])))),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}});return{result:{type:"bindings",bindingsStream:a,metadata:r.metadata}}}return t.bindingsStream.destroy(),{result:r}}async getJoinCoefficients(e,t){const r=i.ActorRdfJoin.getRequestInitialTimes(t),n=i.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value+t[1].cardinality.value,persistedItems:t[0].cardinality.value,blockingItems:t[0].cardinality.value,requestTime:r[0]+t[0].cardinality.value*n[0]+r[1]+t[1].cardinality.value*n[1]}}}t.ActorRdfJoinMinusHash=a},11688:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(99917),t)},46869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalBind=void 0;const n=r(82331),i=r(91674),a=r(59510),o=r(32353),s=r(32227),c=r(31578);class u extends o.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:"bind",limitEntries:2,canHandleUndefs:!0,isLeaf:!1})}async getOutput(e){const t=await i.BindingsFactory.create(this.mediatorMergeBindingsContext,e.context);e.entries[1].output.bindingsStream.close();const r=e.context.set(s.KeysQueryOperation.joinLeftMetadata,await e.entries[0].output.metadata()).set(s.KeysQueryOperation.joinRightMetadatas,[await e.entries[1].output.metadata()]);return{result:{type:"bindings",bindingsStream:n.ActorRdfJoinMultiBind.createBindStream(this.bindOrder,e.entries[0].output.bindingsStream,[e.entries[1].operation],(async(e,t)=>{const n=e[0];return a.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:n,context:r?.set(s.KeysQueryOperation.joinBindings,t)})).bindingsStream}),!0,t),metadata:async()=>await this.constructResultMetadata(e.entries,await o.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0},!0)}}}async getJoinCoefficients(e,t){if(0===o.ActorRdfJoin.overlappingVariables(t).length)throw new Error(`Actor ${this.name} only join entries with at least one common variable`);const r=o.ActorRdfJoin.getRequestInitialTimes(t),n=o.ActorRdfJoin.getRequestItemTimes(t);if(e.entries[1].operation.type===c.Algebra.types.EXTEND||e.entries[1].operation.type===c.Algebra.types.GROUP)throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);const i=(await this.mediatorJoinSelectivity.mediate({entries:e.entries,context:e.context})).selectivity*this.selectivityModifier;return{iterations:t[0].cardinality.value*t[1].cardinality.value*i,persistedItems:0,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*(n[0]+r[1]+i*t[1].cardinality.value*n[1])}}}t.ActorRdfJoinOptionalBind=u},64305:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(46869),t)},75015:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalHash=void 0;const n=r(59510),i=r(32353),a=r(76664),o=r(22112),s=r(66561),c=r(27900);class u extends i.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:`hash-${e.canHandleUndefs?"undef":"def"}-${e.blocking?"blocking":"nonblocking"}`,limitEntries:2,canHandleUndefs:e.canHandleUndefs,requiresVariableOverlap:!0})}static constructIndex(e,t){return e?new c.BindingsIndexUndef(t,(e=>e&&"Variable"!==e.termType?(0,o.termToString)(e):"")):new s.BindingsIndexDef(t,i.ActorRdfJoin.hashNonClashing)}async getOutput(e){const t=e.entries[1].output,r=e.entries[0].output,o=await i.ActorRdfJoin.getMetadatas(e.entries),s=i.ActorRdfJoin.overlappingVariables(o);let c;return c=this.blocking?new n.ClosableTransformIterator((async()=>{const e=u.constructIndex(this.canHandleUndefs,s);return await new Promise((r=>{t.bindingsStream.on("data",(t=>{(e.getFirst(t)??e.put(t,[])).push(t)})),t.bindingsStream.on("end",r),t.bindingsStream.on("error",(e=>{c.emit("error",e)}))})),new a.MultiTransformIterator(r.bindingsStream,{multiTransform:t=>new a.ArrayIterator(e.get(t).flat().map((e=>i.ActorRdfJoin.joinBindings(t,e))).filter((e=>null!==e)),{autoStart:!1}),optional:!0,autoStart:!1})}),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}}):new n.ClosableTransformIterator((async()=>{const e=u.constructIndex(this.canHandleUndefs,s);let n=!0;return t.bindingsStream.on("data",(t=>{(e.getFirst(t)??e.put(t,new a.BufferedIterator({autoStart:!1})))._push(t)})),t.bindingsStream.on("end",(()=>{for(const t of e.values())t.close();n=!1})),t.bindingsStream.on("error",(e=>{c.emit("error",e)})),new a.MultiTransformIterator(r.bindingsStream,{multiTransform:t=>{let r=e.get(t);return 0===r.length&&(r=n?[e.put(t,new a.BufferedIterator({autoStart:!1}))]:[]),new a.UnionIterator(r.map((e=>e.clone())),{autoStart:!1}).map((e=>i.ActorRdfJoin.joinBindings(t,e)))},optional:!0,autoStart:!1})}),{autoStart:!1,onClose(){t.bindingsStream.destroy(),r.bindingsStream.destroy()}}),{result:{type:"bindings",bindingsStream:c,metadata:async()=>await this.constructResultMetadata(e.entries,await i.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0},!0)}}}async getJoinCoefficients(e,t){const r=i.ActorRdfJoin.getRequestInitialTimes(t),n=i.ActorRdfJoin.getRequestItemTimes(t);let a=t[0].cardinality.value+t[1].cardinality.value;return this.canHandleUndefs||(a*=.8),this.blocking&&(a*=.9),{iterations:a,persistedItems:t[0].cardinality.value,blockingItems:this.blocking?t[0].cardinality.value:0,requestTime:r[0]+t[0].cardinality.value*n[0]+r[1]+t[1].cardinality.value*n[1]}}}t.ActorRdfJoinOptionalHash=u},66561:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsIndexDef=void 0,t.BindingsIndexDef=class{constructor(e,t){this.keys=e,this.hashFn=t,this.index={}}put(e,t){return this.index[this.hashFn(e,this.keys)]=t}get(e){const t=this.getFirst(e);return t?[t]:[]}getFirst(e){return this.index[this.hashFn(e,this.keys)]}values(){return Object.values(this.index)}}},27900:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsIndexUndef=void 0,t.BindingsIndexUndef=class{constructor(e,t){this.data={},this.keys=e,this.hashFn=t}put(e,t){if(this.isBindingsValid(e)){let r=this.data;for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinOptionalNestedLoop=void 0;const n=r(32353),i=r(2922);class a extends n.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:"nested-loop",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){return{result:{type:"bindings",bindingsStream:new i.NestedLoopJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,n.ActorRdfJoin.joinBindings,{optional:!0,autoStart:!1}),metadata:async()=>await this.constructResultMetadata(e.entries,await n.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0},!0)}}}async getJoinCoefficients(e,t){const r=n.ActorRdfJoin.getRequestInitialTimes(t),i=n.ActorRdfJoin.getRequestItemTimes(t);return{iterations:t[0].cardinality.value*t[1].cardinality.value,persistedItems:0,blockingItems:0,requestTime:r[0]+t[0].cardinality.value*i[0]+r[1]+t[1].cardinality.value*i[1]}}}t.ActorRdfJoinOptionalNestedLoop=a},9391:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(67757),t)},7218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoinTypes=t.ActorRdfJoinSelectivityVariableCounting=void 0;const n=r(75245),i=r(31578);class a extends n.ActorRdfJoinSelectivity{constructor(e){super(e)}async test(e){return{accuracy:.5}}static getPatternCost(e){let t=1;return"Variable"===e.subject.termType&&(t+=4),"Variable"!==e.predicate.termType&&e.type!==i.Algebra.types.PATH||(t+=1),"Variable"===e.object.termType&&(t+=2),"Variable"===e.graph.termType&&(t+=1),t/9}static getJoinTypes(e,t){const r=[];return"Variable"===e.subject.termType?(e.subject.equals(t.subject)&&r.push(o.unboundSS),"pattern"===t.type&&e.subject.equals(t.predicate)&&r.push(o.unboundSP),e.subject.equals(t.object)&&r.push(o.unboundSO),e.subject.equals(t.graph)&&r.push(o.unboundSG)):(e.subject.equals(t.subject)&&r.push(o.boundSS),"pattern"===t.type&&e.subject.equals(t.predicate)&&r.push(o.boundSP),e.subject.equals(t.object)&&r.push(o.boundSO),e.subject.equals(t.graph)&&r.push(o.boundSG)),"pattern"===e.type&&("Variable"===e.predicate.termType?(e.predicate.equals(t.subject)&&r.push(o.unboundPS),"pattern"===t.type&&e.predicate.equals(t.predicate)&&r.push(o.unboundPP),e.predicate.equals(t.object)&&r.push(o.unboundPO),e.predicate.equals(t.graph)&&r.push(o.unboundPG)):(e.predicate.equals(t.subject)&&r.push(o.boundPS),"pattern"===t.type&&e.predicate.equals(t.predicate)&&r.push(o.boundPP),e.predicate.equals(t.object)&&r.push(o.boundPO),e.predicate.equals(t.graph)&&r.push(o.boundPG))),"Variable"===e.object.termType?(e.object.equals(t.subject)&&r.push(o.unboundOS),"pattern"===t.type&&e.object.equals(t.predicate)&&r.push(o.unboundOP),e.object.equals(t.object)&&r.push(o.unboundOO),e.object.equals(t.graph)&&r.push(o.unboundOG)):(e.object.equals(t.subject)&&r.push(o.boundOS),"pattern"===t.type&&e.object.equals(t.predicate)&&r.push(o.boundOP),e.object.equals(t.object)&&r.push(o.boundOO),e.object.equals(t.graph)&&r.push(o.boundOG)),"Variable"===e.graph.termType?(e.graph.equals(t.subject)&&r.push(o.unboundGS),"pattern"===t.type&&e.graph.equals(t.predicate)&&r.push(o.unboundGP),e.graph.equals(t.object)&&r.push(o.unboundGO),e.graph.equals(t.graph)&&r.push(o.unboundGG)):(e.graph.equals(t.subject)&&r.push(o.boundGS),"pattern"===t.type&&e.graph.equals(t.predicate)&&r.push(o.boundGP),e.graph.equals(t.object)&&r.push(o.boundGO),e.graph.equals(t.graph)&&r.push(o.boundGG)),r}static getOperationsPairwiseJoinCost(e,t){let r=a.MAX_PAIRWISE_COST;for(const n of a.getJoinTypes(e,t))switch(n){case o.boundSS:r-=4;break;case o.boundSP:r-=6;break;case o.boundSO:r-=2;break;case o.boundSG:case o.boundPS:r-=6;break;case o.boundPP:return 1;case o.boundPO:case o.boundPG:r-=6;break;case o.boundOS:r-=2;break;case o.boundOP:r-=6;break;case o.boundOO:r-=2;break;case o.boundOG:case o.boundGS:case o.boundGP:case o.boundGO:case o.boundGG:r-=6;break;case o.unboundSS:r-=2;break;case o.unboundSP:r-=3;break;case o.unboundSO:r-=1;break;case o.unboundSG:case o.unboundPS:case o.unboundPP:case o.unboundPO:case o.unboundPG:r-=3;break;case o.unboundOS:r-=1;break;case o.unboundOP:r-=3;break;case o.unboundOO:r-=1;break;case o.unboundOG:case o.unboundGS:case o.unboundGP:case o.unboundGO:case o.unboundGG:r-=3}return r/a.MAX_PAIRWISE_COST}static getOperationsJoinCost(e){const t=[];for(const r of e)i.Util.recurseOperation(r,{[i.Algebra.types.PATTERN]:e=>(t.push(e),!1),[i.Algebra.types.PATH]:e=>(t.push(e),!1)});let r=0,n=0;for(const e of t)for(const i of t)e!==i&&(r+=a.getOperationsPairwiseJoinCost(e,i),n++);return 0===n?1:r/n*t.reduce(((e,t)=>e*a.getPatternCost(t)),1)}async run(e){return e.entries.length<=1?{selectivity:1}:{selectivity:a.getOperationsJoinCost(e.entries.map((e=>e.operation)))}}}var o;t.ActorRdfJoinSelectivityVariableCounting=a,a.MAX_PAIRWISE_COST=82,function(e){e[e.boundSS=0]="boundSS",e[e.boundSP=1]="boundSP",e[e.boundSO=2]="boundSO",e[e.boundSG=3]="boundSG",e[e.boundPS=4]="boundPS",e[e.boundPP=5]="boundPP",e[e.boundPO=6]="boundPO",e[e.boundPG=7]="boundPG",e[e.boundOS=8]="boundOS",e[e.boundOP=9]="boundOP",e[e.boundOO=10]="boundOO",e[e.boundOG=11]="boundOG",e[e.boundGS=12]="boundGS",e[e.boundGP=13]="boundGP",e[e.boundGO=14]="boundGO",e[e.boundGG=15]="boundGG",e[e.unboundSS=16]="unboundSS",e[e.unboundSP=17]="unboundSP",e[e.unboundSO=18]="unboundSO",e[e.unboundSG=19]="unboundSG",e[e.unboundPS=20]="unboundPS",e[e.unboundPP=21]="unboundPP",e[e.unboundPO=22]="unboundPO",e[e.unboundPG=23]="unboundPG",e[e.unboundOS=24]="unboundOS",e[e.unboundOP=25]="unboundOP",e[e.unboundOO=26]="unboundOO",e[e.unboundOG=27]="unboundOG",e[e.unboundGS=28]="unboundGS",e[e.unboundGP=29]="unboundGP",e[e.unboundGO=30]="unboundGO",e[e.unboundGG=31]="unboundGG"}(o||(t.JoinTypes=o={}))},16703:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(7218),t)},66479:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulateCanContainUndefs=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){if("initialize"===e.mode)return{metadata:{canContainUndefs:!1}};let t=e.accumulatedMetadata.canContainUndefs;return e.appendingMetadata.canContainUndefs&&(t=!0),{metadata:{canContainUndefs:t}}}}t.ActorRdfMetadataAccumulateCanContainUndefs=i},27988:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(66479),t)},80547:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulateCardinality=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){if("initialize"===e.mode)return{metadata:{cardinality:{type:"exact",value:0}}};const t={...e.accumulatedMetadata.cardinality};if(t.dataset){if(!e.appendingMetadata.cardinality.dataset)return{metadata:{cardinality:t}};if(t.dataset!==e.appendingMetadata.cardinality.dataset&&e.appendingMetadata.subsetOf===t.dataset)return{metadata:{cardinality:e.appendingMetadata.cardinality}};if(t.dataset===e.appendingMetadata.cardinality.dataset)return{metadata:{cardinality:t}};delete t.dataset}return e.appendingMetadata.cardinality&&Number.isFinite(e.appendingMetadata.cardinality.value)?("estimate"===e.appendingMetadata.cardinality.type&&(t.type="estimate"),t.value+=e.appendingMetadata.cardinality.value):(t.type="estimate",t.value=Number.POSITIVE_INFINITY),{metadata:{cardinality:t}}}}t.ActorRdfMetadataAccumulateCardinality=i},67243:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(80547),t)},15881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulatePageSize=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){return"initialize"===e.mode?{metadata:{}}:{metadata:{..."pageSize"in e.accumulatedMetadata||"pageSize"in e.appendingMetadata?{pageSize:(e.accumulatedMetadata.pageSize??0)+(e.appendingMetadata.pageSize??0)}:{}}}}}t.ActorRdfMetadataAccumulatePageSize=i},91475:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(15881),t)},68951:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulateRequestTime=void 0;const n=r(49877);class i extends n.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){return"initialize"===e.mode?{metadata:{}}:{metadata:{..."requestTime"in e.accumulatedMetadata||"requestTime"in e.appendingMetadata?{requestTime:(e.accumulatedMetadata.requestTime??0)+(e.appendingMetadata.requestTime??0)}:{}}}}}t.ActorRdfMetadataAccumulateRequestTime=i},26719:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(68951),t)},85702:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAll=void 0;const n=r(52628),i=r(58521);class a extends n.ActorRdfMetadata{constructor(e){super(e)}async test(e){return!0}async run(e){const t=new i.Readable({objectMode:!0}),r=new i.Readable({objectMode:!0});e.quads.on("error",(e=>{t.emit("error",e),r.emit("error",e)})),e.quads.on("end",(()=>{t.push(null),r.push(null)}));const n=t._read=r._read=i=>{for(;i>0;){const a=e.quads.read();if(null===a)return e.quads.once("readable",(()=>n(i)));i--,t.push(a),r.push(a)}};return{data:t,metadata:r}}}t.ActorRdfMetadataAll=a},64443:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(85702),t)},94425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractAllowHttpMethods=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){const t={};return e.headers?.get("allow")&&(t.allowHttpMethods=e.headers.get("allow")?.split(/, */u)),{metadata:t}}}t.ActorRdfMetadataExtractAllowHttpMethods=i},40751:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(94425),t)},30066:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractHydraControls=void 0;const n=r(10800),i=r(68492);class a extends n.ActorRdfMetadataExtract{constructor(e){super(e),this.parsedUriTemplateCache={}}async test(e){return!0}getLinks(e,t){return Object.fromEntries(a.LINK_TYPES.map((r=>{const n=t[r]||t[`${r}Page`],i=n&&n[e];return[r,i&&i.length>0?[i[0]]:[]]})))}parseUriTemplateCached(e){return this.parsedUriTemplateCache[e]||(this.parsedUriTemplateCache[e]=(0,i.parse)(e))}getSearchForms(e){const t=e.search,r=[];if(t)for(const n in t)for(const i of t[n]){const t=(e.template||{})[i]||[];if(1!==t.length)throw new Error(`Expected 1 hydra:template for ${i}`);const a=t[0],o=this.parseUriTemplateCached(a),s=Object.fromEntries(((e.mapping||{})[i]||[]).map((t=>{const r=((e.variable||{})[t]||[])[0],n=((e.property||{})[t]||[])[0];if(!r)throw new Error(`Expected a hydra:variable for ${t}`);if(!n)throw new Error(`Expected a hydra:property for ${t}`);return[n,r]}))),c=e=>o.expand(Object.fromEntries(Object.keys(e).map((t=>[s[t],e[t]]))));r.push({dataset:n,template:a,mappings:s,getUri:c})}return{values:r}}getHydraProperties(e){return new Promise(((t,r)=>{e.on("error",r);const n={};e.on("data",(e=>{if(e.predicate.value.startsWith(a.HYDRA)){const t=e.predicate.value.slice(a.HYDRA.length),r=n[t]||(n[t]={});(r[e.subject.value]||(r[e.subject.value]=[])).push(e.object.value)}})),e.on("end",(()=>t(n)))}))}async run(e){const t={},r=await this.getHydraProperties(e.metadata);return Object.assign(t,this.getLinks(e.url,r)),t.searchForms=this.getSearchForms(r),{metadata:t}}}t.ActorRdfMetadataExtractHydraControls=a,a.HYDRA="http://www.w3.org/ns/hydra/core#",a.LINK_TYPES=["first","next","previous","last"]},85405:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(30066),t)},68714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractHydraCount=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}run(e){return new Promise(((t,r)=>{e.metadata.on("error",r),e.metadata.on("data",(e=>{this.predicates.includes(e.predicate.value)&&t({metadata:{cardinality:{type:"estimate",value:Number.parseInt(e.object.value,10),dataset:e.subject.value}}})})),e.metadata.on("end",(()=>{t({metadata:{cardinality:{type:"estimate",value:0}}})}))}))}}t.ActorRdfMetadataExtractHydraCount=i},57586:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(68714),t)},77690:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractHydraPagesize=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return new Promise(((t,r)=>{e.metadata.on("error",r),e.metadata.on("data",(e=>{this.predicates.includes(e.predicate.value)&&t({metadata:{pageSize:Number.parseInt(e.object.value,10)}})})),e.metadata.on("end",(()=>{t({metadata:{}})}))}))}}t.ActorRdfMetadataExtractHydraPagesize=i},54777:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(77690),t)},43875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractPatchSparqlUpdate=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){const t={};return(e.headers?.get("accept-patch")?.includes("application/sparql-update")??e.headers?.get("ms-author-via")?.includes("SPARQL"))&&(t.patchSparqlUpdate=!0),{metadata:t}}}t.ActorRdfMetadataExtractPatchSparqlUpdate=i},55282:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(43875),t)},86312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractPutAccepted=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){const t={};return e.headers?.get("accept-put")&&(t.putAccepted=e.headers.get("accept-put")?.split(/, */u)),{metadata:t}}}t.ActorRdfMetadataExtractPutAccepted=i},44549:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(86312),t)},66468:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractRequestTime=void 0;const n=r(10800);class i extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return{metadata:{requestTime:e.requestTime}}}}t.ActorRdfMetadataExtractRequestTime=i},7445:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(66468),t)},42214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtractSparqlService=void 0;const n=r(10800),i=r(9929);class a extends n.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return new Promise(((t,r)=>{e.metadata.on("error",r);const n={};e.metadata.on("data",(t=>{"http://www.w3.org/ns/sparql-service-description#endpoint"!==t.predicate.value||"BlankNode"!==t.subject.termType&&t.subject.value!==e.url?"http://www.w3.org/ns/sparql-service-description#defaultGraph"===t.predicate.value&&(n.defaultGraph=t.object.value):(n.sparqlService="Literal"===t.object.termType?(0,i.resolve)(t.object.value,e.url):t.object.value,this.inferHttpsEndpoint&&e.url.startsWith("https")&&!n.sparqlService.startsWith("https")&&(n.sparqlService=n.sparqlService.replace("http:","https:")))})),e.metadata.on("end",(()=>{t({metadata:n})}))}))}}t.ActorRdfMetadataExtractSparqlService=a},3187:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(42214),t)},82889:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataPrimaryTopic=void 0;const n=r(52628),i=r(58521);class a extends n.ActorRdfMetadata{constructor(e){super(e)}async test(e){if(e.triples)throw new Error("This actor only supports non-triple quad streams.");return!0}async run(e){const t=new i.Readable({objectMode:!0}),r=new i.Readable({objectMode:!0}),n=()=>{t._read=r._read=()=>{},e.quads.on("error",(e=>{t.emit("error",e),r.emit("error",e)}));const n={};let i;const a={};e.quads.on("data",(t=>{"http://rdfs.org/ns/void#subset"===t.predicate.value&&t.object.value===e.url?i=t.subject.value:"http://xmlns.com/foaf/0.1/primaryTopic"===t.predicate.value&&(a[t.object.value]=t.subject.value);let r=n[t.graph.value];r||(r=n[t.graph.value]=[]),r.push(t)})),e.quads.on("end",(()=>{const e=i?a[i]:void 0;for(const i in n)if(i===e){for(const e of n[i])r.push(e);if(this.metadataToData)for(const e of n[i])t.push(e)}else{for(const e of n[i])t.push(e);if(!e&&this.dataToMetadataOnInvalidMetadataGraph)for(const e of n[i])r.push(e)}t.push(null),r.push(null)}))};return t._read=r._read=()=>{n()},{data:t,metadata:r}}}t.ActorRdfMetadataPrimaryTopic=a},80848:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(82889),t)},99209:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlMicrodata=void 0;const n=r(65446),i=r(5558);class a extends n.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.headers?e.headers.get("content-type"):null,r=t?.includes("xml"),n=new i.MicrodataRdfParser({baseIRI:e.baseIRI,xmlMode:r});n.on("error",e.error),n.on("data",e.emit);const a=n.onEnd;return n.onEnd=()=>{a.call(n),e.end()},{htmlParseListener:n}}}t.ActorRdfParseHtmlMicrodata=a},42421:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(99209),t)},39149:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlRdfa=void 0;const n=r(65446),i=r(21860);class a extends n.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=e.headers?e.headers.get("content-type"):null,r=(e.headers&&e.headers.get("content-language"))??void 0,n=t&&t.includes("xml")?"xhtml":"html",a=new i.RdfaParser({baseIRI:e.baseIRI,profile:n,language:r});a.on("error",e.error),a.on("data",e.emit);const o=a.onEnd;return a.onEnd=()=>{o.call(a),e.end()},{htmlParseListener:a}}}t.ActorRdfParseHtmlRdfa=a},26585:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(39149),t)},42601:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtmlScript=void 0;const n=r(65446),i=r(14107);class a extends n.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const t=(await this.mediatorRdfParseMediatypes.mediate({context:e.context,mediaTypes:!0})).mediaTypes;return{htmlParseListener:new i.HtmlScriptListener(this.mediatorRdfParseHandle,e.emit,e.error,e.end,t,e.context,e.baseIRI,e.headers)}}}t.ActorRdfParseHtmlScript=a},14107:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlScriptListener=void 0;const n=r(32227),i=r(58521),a=r(9929);class o{constructor(e,t,r,i,a,o,s,c){this.textChunksJsonLd=[],this.endBarrier=1,this.passedScripts=0,this.isFinalJsonLdProcessing=!1,this.mediatorRdfParseHandle=e,this.cbQuad=t,this.cbError=r,this.cbEnd=i,this.supportedTypes=a,this.context=o.set(n.KeysRdfParseHtmlScript.processingHtmlScript,!0),this.baseIRI=s,this.headers=c,this.onlyFirstScript=!1===o.get(n.KeysRdfParseHtmlScript.extractAllScripts);const u=this.baseIRI.indexOf("#");this.targetScriptId=u>0?this.baseIRI.slice(u+1,this.baseIRI.length):null}static newErrorCoded(e,t){const r=new Error(e);return r.code=t,r}onEnd(){0==--this.endBarrier&&(this.textChunksJsonLd.length>0?(this.handleMediaType="application/ld+json",this.textChunks=this.textChunksJsonLd,this.textChunks.push("]"),this.textChunksJsonLd=[],this.isFinalJsonLdProcessing=!0,this.endBarrier++,this.onTagClose()):(0===this.passedScripts&&this.targetScriptId&&this.cbError(o.newErrorCoded(`Failed to find targeted script id "${this.targetScriptId}"`,"loading document failed")),this.cbEnd()),this.isFinalJsonLdProcessing=!1)}onTagClose(){if(this.handleMediaType)if(this.requiresCustomJsonLdHandling(this.handleMediaType)&&!this.isFinalJsonLdProcessing)this.handleMediaType=void 0,this.textChunks=void 0,this.onEnd();else{const e=new i.Readable({objectMode:!0});e._read=()=>{};const t=this.textChunks,r={context:this.context,handle:{metadata:{baseIRI:this.baseIRI},data:e,headers:this.headers,context:this.context},handleMediaType:this.handleMediaType};this.mediatorRdfParseHandle.mediate(r).then((({handle:r})=>{r.data.on("error",(e=>this.cbError(o.newErrorCoded(e.message,"invalid script element")))).on("data",this.cbQuad).on("end",(()=>this.onEnd()));for(const r of t)e.push(r);e.push(null)})).catch((e=>{this.targetScriptId?this.cbError(o.newErrorCoded(e.message,"loading document failed")):this.onEnd()})),this.handleMediaType=void 0,this.textChunks=void 0}}onTagOpen(e,t){"base"===e&&t.href&&(this.baseIRI=(0,a.resolve)(t.href,this.baseIRI)),"script"!==e||this.targetScriptId&&t.id!==this.targetScriptId?this.handleMediaType=void 0:this.supportedTypes[t.type]?this.onlyFirstScript&&this.passedScripts>0?this.handleMediaType=void 0:(this.passedScripts++,this.handleMediaType=t.type,this.endBarrier++,this.requiresCustomJsonLdHandling(this.handleMediaType)?(this.textChunks=this.textChunksJsonLd,this.textChunks.push(0===this.textChunks.length?"[":",")):this.textChunks=[]):this.targetScriptId&&this.cbError(o.newErrorCoded(`Targeted script "${this.targetScriptId}" does not have a supported type`,"loading document failed"))}onText(e){this.handleMediaType&&this.textChunks.push(e)}requiresCustomJsonLdHandling(e){return!this.onlyFirstScript&&!this.targetScriptId&&"application/ld+json"===e}}t.HtmlScriptListener=o},3549:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(42601),t)},70256:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtml=void 0;const n=r(54592),i=r(41173),a=r(58521);class o extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=new a.Readable({objectMode:!0});n._read=()=>{};let o=0,s=1;function c(e){n.emit("error",e)}function u(){0==--s&&n.push(null)}const l={baseIRI:e.metadata?.baseIRI??"",context:r,emit:e=>{o--,n.push(e)},end:u,error:c,headers:e.headers};try{const t=await Promise.all(this.busRdfParseHtml.publish(l));s+=t.length;const r=[];for(const e of t){const{htmlParseListener:t}=await e.actor.run(l);r.push(t)}const a=new i.Parser({onclosetag(){try{for(const e of r)e.onTagClose()}catch(e){c(e)}},onend(){try{for(const e of r)e.onEnd()}catch(e){c(e)}u()},onopentag(e,t){try{for(const n of r)n.onTagOpen(e,t)}catch(e){c(e)}},ontext(e){try{for(const t of r)t.onText(e)}catch(e){c(e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:!1}),d=n._read=t=>{for(o=Math.max(t,o);o>0;){const t=e.data.read();if(null===t)return void e.data.once("readable",(()=>d(0)));a.write(t.toString())}};e.data.on("error",c).on("end",(()=>a.end()))}catch(e){setTimeout((()=>{n.emit("error",e)}))}return{data:n}}}t.ActorRdfParseHtml=o},28955:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(70256),t)},61364:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseJsonLd=void 0;const n=r(54592),i=r(32227),a=r(50631),o=r(11817);class s extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async testHandle(e,t,r){if(r.has(i.KeysRdfParseHtmlScript.processingHtmlScript)&&"application/ld+json"!==t)throw new Error("JSON-LD in script tags can only have media type 'application/ld+json'");if(!t||!(t in this.mediaTypePriorities)&&!t.endsWith("+json"))throw new Error(`Unrecognized media type: ${t}`);return await this.testHandleChecked(e)}async runHandle(e,t,r){return{data:a.JsonLdParser.fromHttpResponse(e.metadata?.baseIRI??"",t,e.headers,{documentLoader:r.get(i.KeysRdfParseJsonLd.documentLoader)??new o.DocumentLoaderMediated(this.mediatorHttp,r),strictValues:r.get(i.KeysRdfParseJsonLd.strictValues),...r.get(i.KeysRdfParseJsonLd.parserOptions)}).import(e.data)}}}t.ActorRdfParseJsonLd=s},11817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DocumentLoaderMediated=void 0;const n=r(74870),i=r(31759),a=r(27202);class o extends a.FetchDocumentLoader{constructor(e,t){super(o.createFetcher(e,t)),this.mediatorHttp=e,this.context=t}static createFetcher(e,t){return async(r,a)=>{const o=await e.mediate({input:r,init:a,context:t});return o.json=async()=>JSON.parse(await(0,i.stringify)(n.ActorHttp.toNodeReadable(o.body))),o}}}t.DocumentLoaderMediated=o},54168:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(61364),t),i(r(11817),t)},20164:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseN3=void 0;const n=r(54592),i=r(72243);class a extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){e.data.on("error",(e=>n.emit("error",e)));const n=e.data.pipe(new i.StreamParser({baseIRI:e.metadata?.baseIRI,format:t.endsWith("n3")?t:`${t}*`}));return{data:n,metadata:{triples:"text/turtle"===t||"application/n-triples"===t||"text/n3"===t}}}}t.ActorRdfParseN3=a},62917:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(20164),t)},61536:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseRdfXml=void 0;const n=r(54592),i=r(97990);class a extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e){e.data.on("error",(e=>t.emit("error",e)));const t=e.data.pipe(new i.RdfXmlParser({baseIRI:e.metadata?.baseIRI}));return{data:t,metadata:{triples:!0}}}}t.ActorRdfParseRdfXml=a},21487:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(61536),t)},62940:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseShaclc=void 0;const n=r(54592),i=r(31759),a=r(58521),o=r(21762),s=r(76268);class c extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=new s.PrefixWrappingIterator((0,i.stringify)(e.data).then((r=>(0,o.parse)(r,{extendedSyntax:"text/shaclc-ext"===t,baseIRI:e.metadata?.baseIRI})))),c=new a.Readable({objectMode:!0});return n.on("prefix",((...e)=>c.emit("prefix",...e))),{data:c.wrap(n),metadata:{triples:!0}}}}t.ActorRdfParseShaclc=c},76268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrefixWrappingIterator=void 0;const n=r(76664);class i extends n.WrappingIterator{constructor(e){super(e?.then((e=>(this.prefixes=e.prefixes,e))))}read(){if(this.prefixes){for(const e of Object.entries(this.prefixes))this.emit("prefix",...e);delete this.prefixes}return super.read()}}t.PrefixWrappingIterator=i},43352:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(62940),t)},91689:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseXmlRdfa=void 0;const n=r(54592),i=r(21860);class a extends n.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=(e.headers&&e.headers.get("content-language"))??void 0;e.data.on("error",(e=>a.emit("error",e)));const a=e.data.pipe(new i.RdfaParser({baseIRI:e.metadata?.baseIRI,profile:"xml",language:n}));return{data:a,metadata:{triples:!0}}}}t.ActorRdfParseXmlRdfa=a},8137:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(91689),t)},43476:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinksNext=void 0;const n=r(22124);class i extends n.ActorRdfResolveHypermediaLinks{constructor(e){super(e)}async test(e){if(!e.metadata.next||0===e.metadata.next.length)throw new Error(`Actor ${this.name} requires a 'next' metadata entry.`);return!0}async run(e){return{links:e.metadata.next.map((e=>({url:e})))}}}t.ActorRdfResolveHypermediaLinksNext=i},34541:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(43476),t)},18553:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinksQueueFifo=void 0;const n=r(56102),i=r(7381);class a extends n.ActorRdfResolveHypermediaLinksQueue{constructor(e){super(e)}async test(e){return!0}async run(e){return{linkQueue:new i.LinkQueueFifo}}}t.ActorRdfResolveHypermediaLinksQueueFifo=a},7381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkQueueFifo=void 0,t.LinkQueueFifo=class{constructor(){this.links=[]}push(e){return this.links.push(e),!0}getSize(){return this.links.length}isEmpty(){return 0===this.links.length}pop(){return this.links.shift()}peek(){return this.links[0]}}},34120:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(18553),t),i(r(7381),t)},63986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeJsonLd=void 0;const n=r(84025),i=r(85832);class a extends n.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t,r){const n=new i.JsonLdSerializer({space:" ".repeat(this.jsonStringifyIndentSpaces)});let a;return"pipe"in e.quadStream?(e.quadStream.on("error",(e=>n.emit("error",e))),a=e.quadStream.pipe(n)):a=n.import(e.quadStream),{data:a}}}t.ActorRdfSerializeJsonLd=a},21935:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(63986),t)},34574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeN3=void 0;const n=r(84025),i=r(72243);class a extends n.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t){const r=new i.StreamWriter({format:t});let n;return"pipe"in e.quadStream?(e.quadStream.on("error",(e=>r.emit("error",e))),n=e.quadStream.pipe(r)):n=r.import(e.quadStream),{data:n,triples:"text/turtle"===t||"application/n-triples"===t||"text/n3"===t}}}t.ActorRdfSerializeN3=a},28510:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(34574),t)},80614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeShaclc=void 0;const n=r(84025),i=r(37754),a=r(58521),o=r(22939);class s extends n.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,t){const r=new a.Readable;r._read=()=>{};try{const n={};e.quadStream.on("prefix",((e,t)=>{n[e]=t}));const{text:a}=await(0,o.write)(await(0,i.default)(e.quadStream),{errorOnUnused:!0,extendedSyntax:"text/shaclc-ext"===t,prefixes:n});r.push(a),r.push(null)}catch(e){r._read=()=>{r.emit("error",e)}}return{data:r,triples:!0}}}t.ActorRdfSerializeShaclc=s},49343:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(80614),t)},60927:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermediaPatchSparqlUpdate=void 0;const n=r(25345),i=r(92168);class a extends n.ActorRdfUpdateHypermedia{constructor(e){super(e,"patchSparqlUpdate")}async testMetadata(e){if(!e.forceDestinationType&&!e.metadata.patchSparqlUpdate)throw new Error(`Actor ${this.name} could not detect a destination with 'application/sparql-update' as 'Accept-Patch' header.`);if(!e.forceDestinationType&&!e.exists)throw new Error(`Actor ${this.name} can only patch a destination that already exists.`);return!0}async run(e){return this.logInfo(e.context,`Identified as patchSparqlUpdate destination: ${e.url}`),{destination:new i.QuadDestinationPatchSparqlUpdate(e.url,e.context,this.mediatorHttp)}}}t.ActorRdfUpdateHypermediaPatchSparqlUpdate=a},92168:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuadDestinationPatchSparqlUpdate=void 0;const n=r(74870),i=r(10288),a=r(64817),o=r(58521);t.QuadDestinationPatchSparqlUpdate=class{constructor(e,t,r){this.url=e,this.context=t,this.mediatorHttp=r}insert(e){return this.wrapSparqlUpdateRequest("INSERT",e)}async delete(e){return this.wrapSparqlUpdateRequest("DELETE",e)}async wrapSparqlUpdateRequest(e,t){const r=t.map((e=>{let t=`${(0,a.termToString)(e.subject)} ${(0,a.termToString)(e.predicate)} ${(0,a.termToString)(e.object)} .`;return t="DefaultGraph"===e.graph.termType?` ${t}\n`:` GRAPH ${(0,a.termToString)(e.graph)} { ${t} }\n`,t})).prepend([`${e} DATA {\n`]).append(["}"]),s=new o.Readable;s.wrap(r);const c=new i.Headers({"content-type":"application/sparql-update"}),u=await this.mediatorHttp.mediate({context:this.context,init:{headers:c,method:"PATCH",body:n.ActorHttp.toWebReadableStream(s)},input:this.url});await(0,n.validateAndCloseHttpResponse)(this.url,u)}async deleteGraphs(e,t,r){throw new Error("Patch-based SPARQL Update destinations don't support named graphs")}async createGraphs(e,t){throw new Error("Patch-based SPARQL Update destinations don't support named graphs")}}},87057:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(60927),t),i(r(92168),t)},26348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermediaPutLdp=void 0;const n=r(25345),i=r(99713);class a extends n.ActorRdfUpdateHypermedia{constructor(e){super(e,"putLdp")}async testMetadata(e){if(!e.forceDestinationType){if(!e.metadata.allowHttpMethods||!e.metadata.allowHttpMethods.includes("PUT"))throw new Error(`Actor ${this.name} could not detect a destination with 'Allow: PUT' header.`);if(e.exists)throw new Error(`Actor ${this.name} can only put on a destination that does not already exists.`)}return!0}async run(e){return this.logInfo(e.context,`Identified as putLdp destination: ${e.url}`),{destination:new i.QuadDestinationPutLdp(e.url,e.context,e.metadata.putAccepted||[],this.mediatorHttp,this.mediatorRdfSerializeMediatypes,this.mediatorRdfSerialize)}}}t.ActorRdfUpdateHypermediaPutLdp=a},99713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuadDestinationPutLdp=void 0;const n=r(74870),i=r(10288);t.QuadDestinationPutLdp=class{constructor(e,t,r,n,i,a){this.url=e,this.context=t,this.mediaTypes=r,this.mediatorHttp=n,this.mediatorRdfSerializeMediatypes=i,this.mediatorRdfSerialize=a}insert(e){return this.wrapRdfUpdateRequest("INSERT",e)}async delete(e){throw new Error("Put-based LDP destinations don't support deletions")}async wrapRdfUpdateRequest(e,t){const{mediaTypes:r}=await this.mediatorRdfSerializeMediatypes.mediate({context:this.context,mediaTypes:!0}),a=this.mediaTypes.filter((e=>e in r)),o=a.length>0?a[0]:Object.keys(r).sort(((e,t)=>r[t]-r[e]))[0],{handle:{data:s}}=await this.mediatorRdfSerialize.mediate({context:this.context,handle:{quadStream:t,context:this.context},handleMediaType:o}),c=new i.Headers({"content-type":o}),u=await this.mediatorHttp.mediate({context:this.context,init:{headers:c,method:"PUT",body:n.ActorHttp.toWebReadableStream(s)},input:this.url});await(0,n.validateAndCloseHttpResponse)(this.url,u)}async deleteGraphs(e,t,r){throw new Error("Put-based LDP destinations don't support named graphs")}async createGraphs(e,t){throw new Error("Put-based LDP destinations don't support named graphs")}}},3047:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(26348),t),i(r(99713),t)},33179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermediaSparql=void 0;const n=r(25345),i=r(89084);class a extends n.ActorRdfUpdateHypermedia{constructor(e){super(e,"sparql")}async testMetadata(e){if(!(e.forceDestinationType||e.metadata.sparqlService||this.checkUrlSuffixSparql&&e.url.endsWith("/sparql")||this.checkUrlSuffixUpdate&&e.url.endsWith("/update")))throw new Error(`Actor ${this.name} could not detect a SPARQL service description or URL ending on /sparql or /update.`);return!0}async run(e){return this.logInfo(e.context,`Identified as sparql destination: ${e.url}`),{destination:new i.QuadDestinationSparql(e.metadata.sparqlService||e.url,e.context,this.mediatorHttp)}}}t.ActorRdfUpdateHypermediaSparql=a},89084:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuadDestinationSparql=void 0;const n=r(31759),i=r(74190),a=r(64817);t.QuadDestinationSparql=class{constructor(e,t,r){this.url=e,this.context=t,this.mediatorHttp=r,this.endpointFetcher=new i.SparqlEndpointFetcher({fetch:(e,t)=>this.mediatorHttp.mediate({input:e,init:t,context:this.context}),prefixVariableQuestionMark:!0})}insert(e){return this.wrapSparqlUpdateRequest("INSERT",e)}async delete(e){return this.wrapSparqlUpdateRequest("DELETE",e)}async wrapSparqlUpdateRequest(e,t){const r=t.map((e=>{let t=`${(0,a.termToString)(e.subject)} ${(0,a.termToString)(e.predicate)} ${(0,a.termToString)(e.object)} .`;return t="DefaultGraph"===e.graph.termType?` ${t}\n`:` GRAPH ${(0,a.termToString)(e.graph)} { ${t} }\n`,t})).prepend([`${e} DATA {\n`]).append(["}"]),i=await(0,n.stringify)(r);await this.endpointFetcher.fetchUpdate(this.url,i)}async deleteGraphs(e,t,r){const n=Array.isArray(e)?e:[e],i=[];for(const e of n){let n;n="string"==typeof e?e:"DefaultGraph"===e.termType?"DEFAULT":`GRAPH <${e.value}>`,i.push(`${r?"DROP":"CLEAR"} ${t?"":"SILENT "}${n}`)}await this.endpointFetcher.fetchUpdate(this.url,i.join("; "))}async createGraphs(e,t){const r=[];for(const n of e)r.push(`CREATE${t?"":" SILENT"} GRAPH <${n.value}>`);await this.endpointFetcher.fetchUpdate(this.url,r.join("; "))}}},58916:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(33179),t),i(r(89084),t)},24657:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsHypermedia=void 0;const n=r(86789),i=r(35069);class a extends n.ActorRdfUpdateQuadsDestination{constructor(e){super(e),this.cache=this.cacheSize?new i.LRUCache({max:this.cacheSize}):void 0;const t=this.cache;t&&this.httpInvalidator.addInvalidateListener((({url:e})=>e?t.delete(e):t.clear()))}async test(e){if(!(0,n.getContextDestinationUrl)((0,n.getContextDestination)(e.context)))throw new Error(`Actor ${this.name} can only update quads against a single destination URL.`);return!0}getDestination(e){const t=(0,n.getContextDestination)(e);let r=(0,n.getContextDestinationUrl)(t);if(this.cache&&this.cache.has(r))return this.cache.get(r);const i=(async()=>{let i,a;try{const t=await this.mediatorDereferenceRdf.mediate({context:e,url:r,acceptErrors:!0});a=t.exists,r=t.url;const n=await this.mediatorMetadata.mediate({context:e,url:r,quads:t.data,triples:t.metadata?.triples});i=(await this.mediatorMetadataExtract.mediate({context:e,url:r,metadata:n.metadata,headers:t.headers,requestTime:t.requestTime})).metadata}catch{i={},a=!1}const{destination:o}=await this.mediatorRdfUpdateHypermedia.mediate({context:e,url:r,metadata:i,exists:a,forceDestinationType:(0,n.getDataDestinationType)(t)});return o})();return this.cache&&this.cache.set(r,i),i}}t.ActorRdfUpdateQuadsHypermedia=a},88297:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(24657),t)},88332:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsRdfJsStore=void 0;const n=r(86789),i=r(38268);class a extends n.ActorRdfUpdateQuadsDestination{constructor(e){super(e)}async test(e){const t=(0,n.getContextDestination)(e.context);if(!t||"string"==typeof t||!("remove"in t)&&"value"in t&&!t.value.remove)throw new Error(`${this.name} received an invalid rdfjsStore.`);return!0}async getDestination(e){const t=(0,n.getContextDestination)(e);return new i.RdfJsQuadDestination("remove"in t?t:t.value)}}t.ActorRdfUpdateQuadsRdfJsStore=a},38268:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfJsQuadDestination=void 0;const n=r(35033),i=r(18050),a=r(22112),o=new i.DataFactory;t.RdfJsQuadDestination=class{constructor(e){this.store=e}delete(e){return(0,n.promisifyEventEmitter)(this.store.remove(e))}insert(e){return(0,n.promisifyEventEmitter)(this.store.import(e))}async deleteGraphs(e,t,r){switch(e){case"ALL":await(0,n.promisifyEventEmitter)(this.store.deleteGraph(o.defaultGraph()));case"NAMED":const t=this.store.match(),r={};t.on("data",(e=>{"DefaultGraph"!==e.graph.termType&&(r[(0,a.termToString)(e.graph)]=!0)})),await(0,n.promisifyEventEmitter)(t),await Promise.all(Object.keys(r).map((e=>(0,n.promisifyEventEmitter)(this.store.deleteGraph((0,a.stringToTerm)(e))))));break;default:for(const t of Array.isArray(e)?e:[e])await(0,n.promisifyEventEmitter)(this.store.deleteGraph(t))}}async createGraphs(e,t){if(t)for(const t of e){const e=this.store.match(void 0,void 0,void 0,t);await new Promise(((r,n)=>{e.once("data",(()=>{n(new Error(`Unable to create graph ${t.value} as it already exists`))})),e.on("end",r),e.on("error",n)}))}}}},76722:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(88332),t)},67526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bindings=void 0;const n=r(34368),i=r(6081),a=r(17070);class o{constructor(e,t,r){this.type="bindings",this.dataFactory=e,this.entries=t,this.contextHolder=r}has(e){return this.entries.has("string"==typeof e?e:e.value)}get(e){return this.entries.get("string"==typeof e?e:e.value)}set(e,t){return new o(this.dataFactory,this.entries.set("string"==typeof e?e:e.value,t),this.contextHolder)}delete(e){return new o(this.dataFactory,this.entries.delete("string"==typeof e?e:e.value),this.contextHolder)}keys(){return this.mapIterable(this.iteratorToIterable(this.entries.keys()),(e=>this.dataFactory.variable(e)))}values(){return this.iteratorToIterable(this.entries.values())}forEach(e){for(const[t,r]of this.entries.entries())e(r,this.dataFactory.variable(t))}get size(){return this.entries.size}[Symbol.iterator](){return this.mapIterable(this.iteratorToIterable(this.entries.entries()),(([e,t])=>[this.dataFactory.variable(e),t]))[Symbol.iterator]()}equals(e){if(!e)return!1;if(this===e)return!0;if(this.size!==e.size)return!1;for(const t of this.keys())if(!this.get(t)?.equals(e.get(t)))return!1;return!0}filter(e){return new o(this.dataFactory,(0,i.Map)(this.entries.filter(((t,r)=>e(t,this.dataFactory.variable(r))))),this.contextHolder)}map(e){return new o(this.dataFactory,(0,i.Map)(this.entries.map(((t,r)=>e(t,this.dataFactory.variable(r))))),this.contextHolder)}merge(e){const t=new Set([...this.iteratorToIterable(this.entries.keys()),...[...e.keys()].map((e=>e.value))]),r=[];for(const n of t){const t=this.entries.get(n),i=e.get(this.dataFactory.variable(n));if(t&&i&&!t.equals(i))return;const a=t||i;r.push([n,a])}return this.createBindingsWithContexts(r,e)}mergeWith(e,t){const r=new Set([...this.iteratorToIterable(this.entries.keys()),...[...t.keys()].map((e=>e.value))]),n=[];for(const i of r){const r=this.dataFactory.variable(i),a=this.entries.get(i),o=t.get(r);let s;s=a&&o&&!a.equals(o)?e(a,o,r):a||o,n.push([i,s])}return this.createBindingsWithContexts(n,t)}createBindingsWithContexts(e,t){if(this.contextHolder&&this.contextHolder.context){let r=this.contextHolder.context;return"contextHolder"in t&&t.contextHolder&&t.contextHolder.context&&(r=o.mergeContext(this.contextHolder.contextMergeHandlers,r,t.contextHolder.context)),new o(this.dataFactory,(0,i.Map)(e),{contextMergeHandlers:this.contextHolder.contextMergeHandlers,context:r})}return new o(this.dataFactory,(0,i.Map)(e),t.contextHolder)}static mergeContext(e,t,r){const i=[...t.keys(),...r.keys()],a={},o={},s=new Set(r.keys().map((e=>e.name))),c=t.keys().filter((e=>s.has(e.name)));for(const n of i){if(1===o[n.name])continue;o[n.name]=1;const i=c.some((e=>e.name===n.name));e[n.name]&&i?a[n.name]=e[n.name].run(t.get(n),r.get(n)):!e[n.name]&&i||(t.get(n)?r.get(n)||(a[n.name]=t.get(n)):a[n.name]=r.get(n))}return new n.ActionContext(a)}setContextEntry(e,t){return this.setContextEntryRaw(e,t)}setContextEntryRaw(e,t){return this.contextHolder&&this.contextHolder.context?new o(this.dataFactory,this.entries,{contextMergeHandlers:this.contextHolder.contextMergeHandlers,context:this.contextHolder.context.set(e,t)}):new o(this.dataFactory,this.entries,{contextMergeHandlers:this.contextHolder?.contextMergeHandlers??{},context:(new n.ActionContext).set(e,t)})}deleteContextEntry(e){return this.deleteContextEntryRaw(e)}deleteContextEntryRaw(e){return this.contextHolder?new o(this.dataFactory,this.entries,{contextMergeHandlers:this.contextHolder.contextMergeHandlers,context:this.contextHolder.context?.delete(e)}):new o(this.dataFactory,this.entries)}getContext(){return this.contextHolder?.context}getContextEntry(e){return this.getContext()?.get(e)}toString(){return(0,a.bindingsToString)(this)}*mapIterable(e,t){for(const r of e)yield t(r)}iteratorToIterable(e){return{[Symbol.iterator]:()=>e}}}t.Bindings=o},38846:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BindingsFactory=void 0;const n=r(6081),i=r(18050),a=r(67526);class o{constructor(e=new i.DataFactory,t){this.dataFactory=e,this.contextMergeHandlers=t}static async create(e,t){return new o(new i.DataFactory,(await e.mediate({context:t})).mergeHandlers)}bindings(e=[]){return new a.Bindings(this.dataFactory,(0,n.Map)(e.map((([e,t])=>[e.value,t]))),this.contextMergeHandlers?{contextMergeHandlers:this.contextMergeHandlers}:void 0)}fromBindings(e){return this.bindings([...e])}fromRecord(e){return this.bindings(Object.entries(e).map((([e,t])=>[this.dataFactory.variable(e),t])))}}t.BindingsFactory=o},17070:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindingsToString=void 0;const n=r(22112);t.bindingsToString=function(e){const t={};for(const r of e.keys())t[r.value]=(0,n.termToString)(e.get(r));return JSON.stringify(t,null," ")}},91674:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(67526),t),i(r(38846),t),i(r(17070),t)},53674:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorContextPreprocess=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorContextPreprocess=i},32362:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(53674),t)},18326:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceRdf=void 0;const n=r(47702);class i extends n.ActorDereferenceParse{constructor(e){super(e)}}t.ActorDereferenceRdf=i},53583:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(18326),t)},96859:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereference=void 0;const n=r(5522);class i extends n.ActorDereferenceBase{constructor(e){super(e)}async handleDereferenceErrors(e,t,r,n=0){return this.dereferenceErrorHandler(e,t,{url:e.url,exists:!1,headers:r,requestTime:n})}}t.ActorDereference=i},5522:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceBase=t.isHardError=t.emptyReadable=void 0;const n=r(32227),i=r(34368),a=r(58521);function o(){const e=new a.Readable;return e.push(null),e}function s(e){return!e.get(n.KeysInitQuery.lenient)}t.emptyReadable=o,t.isHardError=s;class c extends i.Actor{constructor(e){super(e)}async dereferenceErrorHandler(e,t,r){if(s(e.context))throw t;return this.logWarn(e.context,t.message),{...r,data:o()}}}t.ActorDereferenceBase=c},75416:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorDereferenceParse=t.getMediaTypeFromExtension=void 0;const n=r(58521),i=r(5522);function a(e,t){const r=e.lastIndexOf(".");return r>=0&&t?.[e.slice(r+1)]||""}t.getMediaTypeFromExtension=a;class o extends i.ActorDereferenceBase{constructor(e){super(e)}async test(e){return!0}handleDereferenceStreamErrors(e,t){return(0,i.isHardError)(e.context)||(t.on("error",(r=>{this.logWarn(e.context,r.message,(()=>({url:e.url}))),t.push(null)})),t=t.pipe(new n.PassThrough({objectMode:!0}))),t}async run(e){const{context:t}=e,r=await this.mediatorDereference.mediate({...e,mediaTypes:async()=>(await(this.mediatorParseMediatypes?.mediate({context:t,mediaTypes:!0})))?.mediaTypes});let n;try{n=(await this.mediatorParse.mediate({context:t,handle:{context:t,...r,metadata:await this.getMetadata(r)},handleMediaType:r.mediaType||a(r.url,this.mediaMappings)||e.mediaType})).handle,n.data=this.handleDereferenceStreamErrors(e,n.data)}catch(t){await(r.data.close?.()),n=await this.dereferenceErrorHandler(e,t,{})}return{...r,...n}}}t.ActorDereferenceParse=o},47702:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(96859),t),i(r(75416),t),i(r(5522),t)},45644:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashBindings=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorHashBindings=i},38431:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(45644),t)},88044:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHashQuads=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorHashQuads=i},16179:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(88044),t)},24608:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpInvalidate=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorHttpInvalidate=i},1187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttpInvalidateListenable=void 0;const n=r(24608);class i extends n.ActorHttpInvalidate{constructor(e){super(e),this.invalidateListeners=[],this.invalidateListeners=[]}addInvalidateListener(e){this.invalidateListeners.push(e)}async test(e){return!0}async run(e){for(const t of this.invalidateListeners)t(e);return{}}}t.ActorHttpInvalidateListenable=i},56320:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(24608),t),i(r(1187),t)},54283:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorHttp=void 0;const n=r(34368),i=r(33523);globalThis.ReadableStream||(globalThis.ReadableStream=r(55675).ReadableStream);const a=r(76605),o=r(84077);class s extends n.Actor{constructor(e){super(e)}static toNodeReadable(e){return a(e)||null===e?e:(0,i.readableFromWeb)(e)}static toWebReadableStream(e){return o(e)}static headersToHash(e){const t={};return e.forEach(((e,r)=>{t[r]=e})),t}}t.ActorHttp=s},74870:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(54283),t),i(r(92151),t)},92151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAndCloseHttpResponse=void 0;const n=r(31759),i=r(54283);t.validateAndCloseHttpResponse=async function(e,t){if(t.status>=400){let r="empty response";if(t.body){const e=i.ActorHttp.toNodeReadable(t.body);r=await(0,n.stringify)(e)}throw new Error(`Could not update ${e} (HTTP status ${t.status}):\n${r}`)}await(t.body?.cancel())}},37983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorInit=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorInit=i},99784:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(37983),t)},70735:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorOptimizeQueryOperation=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorOptimizeQueryOperation=i},6716:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(70735),t)},76986:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperation=void 0;const n=r(32227),i=r(34368),a=r(85156),o=r(75698);let s=0;class c extends i.Actor{constructor(e){super(e)}static getSafeBindings(e){return c.validateQueryOutput(e,"bindings"),e}static getSafeQuads(e){return c.validateQueryOutput(e,"quads"),e}static getSafeBoolean(e){return c.validateQueryOutput(e,"boolean"),e}static getSafeVoid(e){return c.validateQueryOutput(e,"void"),e}static validateQueryOutput(e,t){if(e.type!==t)throw new Error(`Invalid query output type: Expected '${t}' but got '${e.type}'`)}static getBaseExpressionContext(e){const t=e.get(n.KeysInitQuery.queryTimestamp),r=e.get(n.KeysInitQuery.baseIRI),i=e.get(n.KeysInitQuery.functionArgumentsCache)??{};if(e.has(n.KeysInitQuery.extensionFunctionCreator)&&e.has(n.KeysInitQuery.extensionFunctions))throw new Error("Illegal simultaneous usage of extensionFunctionCreator and extensionFunctions in context");let a=e.get(n.KeysInitQuery.extensionFunctionCreator);const o=e.get(n.KeysInitQuery.extensionFunctions);return o&&(a=e=>o[e.value]),{now:t,baseIRI:r,extensionFunctionCreator:a,functionArgumentsCache:i}}static getExpressionContext(e,t){return{...this.getBaseExpressionContext(e),bnode:e=>new a.BlankNodeBindingsScoped(e??"BNODE_"+s++)}}static getAsyncExpressionContext(e,t,r){return{...this.getBaseExpressionContext(e),bnode:e=>Promise.resolve(new a.BlankNodeBindingsScoped(e??"BNODE_"+s++)),exists:c.createExistenceResolver(e,t,r)}}static createExistenceResolver(e,t,r){return async(n,i)=>{const a=(0,o.materializeOperation)(n.input,i,r),s=await t.mediate({operation:a,context:e}),u=c.getSafeBindings(s);return n.not!==(1===(await u.bindingsStream.take(1).toArray()).length)}}static throwOnReadOnly(e){if(e.get(n.KeysQueryOperation.readOnly))throw new Error("Attempted a write operation in read-only mode")}static getOperationSource(e){return e.metadata?.scopedSource}static assignOperationSource(e,t){return(e={...e}).metadata=e.metadata?{...e.metadata}:{},e.metadata.scopedSource=t,e}static removeOperationSource(e){delete e.metadata?.scopedSource,e.metadata&&0===Object.keys(e.metadata).length&&delete e.metadata}static doesShapeAcceptOperation(e,t,r){return"conjunction"===e.type?e.children.every((e=>c.doesShapeAcceptOperation(e,t,r))):"disjunction"===e.type?e.children.some((e=>c.doesShapeAcceptOperation(e,t,r))):"arity"===e.type?c.doesShapeAcceptOperation(e.child,t,r):!((r?.joinBindings&&!e.joinBindings)??(r?.filterBindings&&!e.filterBindings))&&("type"===e.operation.operationType?"project"===e.operation.type||e.operation.type===t.type:e.operation.pattern.type===t.type)}}t.ActorQueryOperation=c},19028:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationTyped=void 0;const n=r(32227),i=r(72394),a=r(76986);class o extends a.ActorQueryOperation{constructor(e,t){if(super({...e,operationName:t}),!this.operationName)throw new Error('A valid "operationName" argument must be provided.')}async test(e){if(!e.operation)throw new Error("Missing field 'operation' in a query operation action.");if(e.operation.type!==this.operationName)throw new Error(`Actor ${this.name} only supports ${this.operationName} operations, but got ${e.operation.type}`);const t=e.operation;return this.testOperation(t,e.context)}async run(e){const t=e.context.get(n.KeysInitQuery.physicalQueryPlanLogger);t&&(t.logOperation(e.operation.type,void 0,e.operation,e.context.get(n.KeysInitQuery.physicalQueryPlanNode),this.name,{}),e.context=e.context.set(n.KeysInitQuery.physicalQueryPlanNode,e.operation));const r=e.operation,a=e.context.set(n.KeysQueryOperation.operation,r),o=await this.runOperation(r,a);return"metadata"in o&&(o.metadata=(0,i.cachifyMetadata)(o.metadata)),o}}t.ActorQueryOperationTyped=o},90897:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryOperationTypedMediated=void 0;const n=r(19028);class i extends n.ActorQueryOperationTyped{constructor(e,t){super(e,t)}}t.ActorQueryOperationTypedMediated=i},75698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materializeOperation=t.materializeTerm=void 0;const n=r(18050),i=r(22112),a=r(13252),o=r(31578),s=new n.DataFactory,c=s.literal("true",s.namedNode("http://www.w3.org/2001/XMLSchema#boolean"));function u(e,t){if("Variable"===e.termType){const r=t.get(e);if(r)return r}return"Quad"===e.termType&&(0,a.someTermsNested)(e,(e=>"Variable"===e.termType))?(0,a.mapTermsNested)(e,(e=>u(e,t))):e}function l(e,t,r){const n=[];for(const[a,o]of t)if(!r||r.some((e=>e.equals(a)))){const t={[(0,i.termToString)(a)]:o};n.push(e.createValues([a],[t]))}return n}t.materializeTerm=u,t.materializeOperation=function e(t,r,n,a={}){return a={strictTargetVariables:"strictTargetVariables"in a&&a.strictTargetVariables,bindFilter:!("bindFilter"in a)||a.bindFilter,originalBindings:"originalBindings"in a?a.originalBindings:r},o.Util.mapOperation(t,{path:(e,t)=>({recurse:!1,result:Object.assign(t.createPath(u(e.subject,r),e.predicate,u(e.object,r),u(e.graph,r)),{metadata:e.metadata})}),pattern:(e,t)=>({recurse:!1,result:Object.assign(t.createPattern(u(e.subject,r),u(e.predicate,r),u(e.object,r),u(e.graph,r)),{metadata:e.metadata})}),extend(t){if(r.has(t.variable)){if(a.strictTargetVariables)throw new Error(`Tried to bind variable ${(0,i.termToString)(t.variable)} in a BIND operator.`);return{recurse:!0,result:e(t.input,r,n,a)}}return{recurse:!0,result:t}},group(e,t){if(a.strictTargetVariables){for(const t of e.variables)if(r.has(t))throw new Error(`Tried to bind variable ${(0,i.termToString)(t)} in a GROUP BY operator.`);return{recurse:!0,result:e}}const n=e.variables.filter((e=>!r.has(e)));return{recurse:!0,result:t.createGroup(e.input,n,e.aggregates)}},project(t,o){if(a.strictTargetVariables){for(const e of t.variables)if(r.has(e))throw new Error(`Tried to bind variable ${(0,i.termToString)(e)} in a SELECT operator.`);return{recurse:!0,result:t}}for(const e of r.keys())for(const n of t.variables)if(n.equals(e)){r=r.delete(e);break}const s=l(o,a.originalBindings,t.variables);let c=e(t.input,r,n,a);return s.length>0&&(c=o.createJoin([...s,c])),{recurse:!1,result:o.createProject(c,t.variables)}},filter(t,i){const o=a.originalBindings;if("operator"!==t.expression.expressionType||0===o.size)return{recurse:!1,result:t};const s=l(i,o),c=e(t.expression,r,n,a);let u=e(t.input,r,n,a);return s.length>0&&(u=i.createJoin([...s,u])),{recurse:!1,result:i.createFilter(u,c)}},values(e,t){if(!a.strictTargetVariables){const n=e.variables.filter((e=>!r.has(e))),a=e.bindings.map((e=>{const t={...e};let n=!0;return r.forEach(((e,r)=>{const a=(0,i.termToString)(r);a in t&&(e.equals(t[a])||(n=!1),delete t[a])})),n?t:void 0})).filter(Boolean);return{recurse:!0,result:t.createValues(n,a)}}for(const t of e.variables)if(r.has(t))throw new Error(`Tried to bind variable ${(0,i.termToString)(t)} in a VALUES operator.`);return{recurse:!1,result:e}},expression(e,t){if(!a.bindFilter)return{recurse:!1,result:e};if("term"===e.expressionType)return{recurse:!1,result:t.createTermExpression(u(e.term,r))};if("operator"===e.expressionType)return"bound"===e.operator&&1===e.args.length&&"term"===e.args[0].expressionType&&[...r.keys()].some((t=>e.args[0].term.equals(t)))?{recurse:!1,result:t.createTermExpression(c)}:{recurse:!0,result:e};if("aggregate"===e.expressionType&&"variable"in e&&r.has(e.variable)){if(a.strictTargetVariables)throw new Error(`Tried to bind ${(0,i.termToString)(e.variable)} in a ${e.aggregator} aggregate.`);return{recurse:!0,result:e}}return{recurse:!0,result:e}}})}},32233:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BusQueryOperation=void 0;const n=r(34368);class i extends n.BusIndexed{constructor(e){super({...e,actorIdentifierFields:["operationName"],actionIdentifierFields:["operation","type"]})}}t.BusQueryOperation=i},57779:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClosableIterator=void 0;const n=r(76664);class i extends n.AsyncIterator{constructor(e,t){super(),this.onClose=t.onClose,this._source=e,this._source[n.DESTINATION]=this,this._source.on("end",s),this._source.on("error",o),this._source.on("readable",a),this.readable=this._source.readable}read(){const e=this._source.read();return e||(this.readable=!1,this._source.done&&this.close()),e}_end(e){this.onClose(),this._source.removeListener("end",s),this._source.removeListener("error",o),this._source.removeListener("readable",a),delete this._source[n.DESTINATION],this._source.destroy(),super._end(e)}}function a(){this[n.DESTINATION].readable=!0}function o(e){this[n.DESTINATION].emit("error",e)}function s(){this[n.DESTINATION].close()}t.ClosableIterator=i},45371:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClosableTransformIterator=void 0;const n=r(76664);class i extends n.TransformIterator{constructor(e,t){super(e,t),this.onClose=t.onClose}_end(e){this.onClose(),super._end(e)}}t.ClosableTransformIterator=i},59510:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(76986),t),i(r(19028),t),i(r(90897),t),i(r(75698),t),i(r(32233),t),i(r(57779),t),i(r(45371),t)},88098:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryParse=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorQueryParse=i},79744:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(88098),t)},8906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryProcess=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorQueryProcess=i},59946:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(8906),t)},2659:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerialize=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e)}}t.ActorQueryResultSerialize=i},51492:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQueryResultSerializeFixedMediaTypes=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e,t){return!0}}t.ActorQueryResultSerializeFixedMediaTypes=i},22083:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(2659),t),i(r(51492),t)},44218:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentifyHypermedia=void 0;const n=r(34368);class i extends n.Actor{constructor(e,t){super(e),this.sourceType=t}async test(e){if(e.forceSourceType&&this.sourceType!==e.forceSourceType)throw new Error(`Actor ${this.name} is not able to handle source type ${e.forceSourceType}.`);return this.testMetadata(e)}}t.ActorQuerySourceIdentifyHypermedia=i},89168:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(44218),t)},521:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorQuerySourceIdentify=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorQuerySourceIdentify=i},12982:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filterMatchingQuotedQuads=t.quadsOrderToBindingsOrder=t.quadsMetadataToBindingsMetadata=t.setMetadata=t.getDuplicateElementLinks=t.getVariables=t.isTermVariable=t.quadsToBindings=void 0;const n=r(59510),i=r(72394),a=r(18050),o=r(22112),s=r(13252),c=r(10175),u=new a.DataFactory;function l(e){return"Variable"===e.termType}function d(e){return(0,s.uniqTerms)((0,s.getTermsNested)(e).filter(l))}function p(e){const t={};let r=!1;if((0,s.forEachTermsNested)(e,((e,n)=>{if("Variable"===e.termType){const i=(0,o.termToString)(e),a=(t[i]||(t[i]=[])).push(n);r=r||a>1}})),!r)return;const n={};for(const e in t){const r=t[e],i=r.slice(1);i.length>0&&(n[r[0].join("_")]=i)}return n}function h(e,t,r,n,a){const o=o=>{"canContainUndefs"in o||(o.canContainUndefs=!1),a&&(o.cardinality.type="estimate"),e.setProperty("metadata",f((0,i.validateMetadataQuads)(o),r,n)),o.state&&o.state.addInvalidateListener((()=>{h(e,t,r,n,a)}))},s=t.getProperty("metadata");s?o(s):t.getProperty("metadata",o)}function f(e,t,r){return{...e,canContainUndefs:!1,order:e.order?y(e.order,t):void 0,availableOrders:e.availableOrders?e.availableOrders.map((e=>({cost:e.cost,terms:y(e.terms,t)}))):void 0,variables:r}}function y(e,t){const r={};return e.map((e=>{const n=t[e.term];if(n&&!r[n])return r[n]=!0,{term:u.variable(n),direction:e.direction}})).filter(Boolean)}t.quadsToBindings=function(e,t,r,i){const a=d(t),o="Variable"===t.graph.termType&&!i,c=p(t),l=(0,s.reduceTermsNested)(t,((e,t,r)=>("Variable"===t.termType&&(e[r.join("_")]=t.value),e)),{});let f=e;o&&(f=f.filter((e=>"DefaultGraph"!==e.graph.termType))),c&&(f=f.filter((e=>{for(const t in c){const r=t.split("_"),n=(0,s.getValueNestedPath)(e,r);for(const r of c[t])if(!n.equals((0,s.getValueNestedPath)(e,r)))return!1}return!0})));const y=new n.ClosableIterator(f.map((e=>r.bindings(Object.keys(l).map((t=>{const r=t.split("_"),n=l[t],i=(0,s.getValueNestedPath)(e,r);return[u.variable(n),i]}))))),{onClose:()=>e.destroy()});return h(y,e,l,a,o||Boolean(c)),y},t.isTermVariable=l,t.getVariables=d,t.getDuplicateElementLinks=p,t.setMetadata=h,t.quadsMetadataToBindingsMetadata=f,t.quadsOrderToBindingsOrder=y,t.filterMatchingQuotedQuads=function(e,t){return(0,s.someTerms)(e,(e=>"Quad"===e.termType))&&(t=t.filter((t=>(0,c.matchPatternMappings)(t,e)))),t}},65483:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(521),t),i(r(12982),t)},36170:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinEntriesSort=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfJoinEntriesSort=i},84287:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(36170),t)},88125:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoinSelectivity=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfJoinSelectivity=i},75245:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(88125),t)},10654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfJoin=void 0;const n=r(32227),i=r(34368),a=r(72394),o=r(18050),s=r(22112),c=r(57778),u=new o.DataFactory;class l extends i.Actor{constructor(e,t){super(e),this.includeInLogs=!0,this.logicalType=t.logicalType,this.physicalName=t.physicalName,this.limitEntries=t.limitEntries??Number.POSITIVE_INFINITY,this.limitEntriesMin=t.limitEntriesMin??!1,this.canHandleUndefs=t.canHandleUndefs??!1,this.isLeaf=t.isLeaf??!0,this.requiresVariableOverlap=t.requiresVariableOverlap??!1}static hash(e,t){return t.map((t=>{const r=e.get(t);return r?r.value:""})).join("")}static hashNonClashing(e,t){return t.map((t=>{const r=e.get(t);return r?(0,s.termToString)(r):""})).join("")}static overlappingVariables(e){const t=e.map((e=>e.variables));let r=t[0];for(const e of t.slice(1))r=r.filter((t=>e.some((e=>e.value===t.value))));return r}static joinVariables(e){return[...new Set(e.flatMap((e=>e.variables.map((e=>e.value)))))].map((e=>u.variable(e)))}static joinBindings(...e){if(0===e.length)return null;if(1===e.length)return e[0];let t=e[0];for(const r of e.slice(1)){const e=t.merge(r);if(!e)return null;t=e}return t}static getCardinality(e){return e.cardinality}static async getMetadatas(e){return await Promise.all(e.map((e=>e.output.metadata())))}static async getEntriesWithMetadatas(e){const t=await l.getMetadatas(e);return e.map(((e,r)=>({...e,metadata:t[r]})))}static getRequestInitialTimes(e){return e.map((e=>e.pageSize?0:e.requestTime??0))}static getRequestItemTimes(e){return e.map((e=>e.pageSize?(e.requestTime??0)/e.pageSize:0))}constructState(e){const t=new a.MetadataValidationState,r=()=>t.invalidate();for(const t of e)t.state.addInvalidateListener(r);return t}async constructResultMetadata(e,t,r,n={},i=!1){let a;return n.cardinality?a=n.cardinality:(a=t.reduce(((e,t)=>{const r=l.getCardinality(t);return{type:"estimate"===r.type?"estimate":e.type,value:e.value*(i?Math.max(1,r.value):r.value)}}),{type:"exact",value:1}),a.value*=(await this.mediatorJoinSelectivity.mediate({entries:e,context:r})).selectivity),{state:this.constructState(t),...n,cardinality:{type:a.type,value:a.value},canContainUndefs:n.canContainUndefs??t.some((e=>e.canContainUndefs)),variables:l.joinVariables(t)}}static async sortJoinEntries(e,t,r){if(t.some((e=>e.metadata.canContainUndefs)))return t;const n={};for(const e of t)for(const t of e.metadata.variables){let e=n[t.value];e||(e=0),n[t.value]=++e}const i=[];for(const[e,t]of Object.entries(n))t>=2&&i.push(e);if(0===i.length)throw new Error("Bind join can only join entries with at least one common variable");const a=[];for(const e of t){let t=!1;for(const r of e.metadata.variables)if(i.includes(r.value)){t=!0;break}t||a.push(e)}return(await e.mediate({entries:t,context:r})).entries.sort(((e,t)=>{const r=a.includes(e);return r===a.includes(t)?0:r?1:-1}))}async test(e){if(e.type!==this.logicalType)throw new Error(`${this.name} can only handle logical joins of type '${this.logicalType}', while '${e.type}' was given.`);if(e.entries.length<=1)throw new Error(`${this.name} requires at least two join entries.`);if(this.limitEntriesMin?e.entries.lengththis.limitEntries)throw new Error(`${this.name} requires ${this.limitEntries} join entries at ${this.limitEntriesMin?"least":"most"}. The input contained ${e.entries.length}.`);for(const t of e.entries)if("bindings"!==t.output.type)throw new Error(`Invalid type of a join entry: Expected 'bindings' but got '${t.output.type}'`);const t=await l.getMetadatas(e.entries);if(!this.canHandleUndefs)for(const e of t)if(e.canContainUndefs)throw new Error(`Actor ${this.name} can not join streams containing undefs`);if(this.requiresVariableOverlap&&0===l.overlappingVariables(t).length)throw new Error(`Actor ${this.name} can only join entries with at least one common variable`);return await this.getJoinCoefficients(e,t)}async run(e){let t;e.context.has(n.KeysInitQuery.physicalQueryPlanLogger)&&(t=e.context.get(n.KeysInitQuery.physicalQueryPlanNode),e.context=e.context.set(n.KeysInitQuery.physicalQueryPlanNode,e));const r=e.context.get(n.KeysInitQuery.physicalQueryPlanLogger);let i;this.includeInLogs&&r&&(i={},r.stashChildren(t,(e=>e.logicalOperator.startsWith("join"))),r.logOperation(`join-${this.logicalType}`,this.physicalName,e,t,this.name,i));const{result:o,physicalPlanMetadata:s}=await this.getOutput(e),u=await l.getMetadatas(e.entries);if(i){(0,c.instrumentIterator)(o.bindingsStream).then((t=>{r.appendMetadata(e,{cardinalityReal:t.count,timeSelf:t.timeSelf,timeLife:t.timeLife})})),Object.assign(i,s);const t=u.map(l.getCardinality);if(i.cardinalities=t,i.joinCoefficients=await this.getJoinCoefficients(e,u),this.isLeaf)for(let n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChunkedIterator=void 0;const n=r(76664);class i extends n.TransformIterator{constructor(e,t,r){super(e,r),this.chunk=[],this.blockSize=t}consumeChunkAsIterator(){const e=new n.ArrayIterator(this.chunk,{autoStart:!1});return this.chunk=[],e}_transform(e,t,r){this.chunk.push(e),this.chunk.length>=this.blockSize&&r(this.consumeChunkAsIterator()),t()}_flush(e){this.chunk.length>0&&this._push(this.consumeChunkAsIterator()),super._flush(e)}}t.ChunkedIterator=i},32353:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(10654),t),i(r(34875),t)},57778:(e,t)=>{"use strict";function r(e,t,n){if(!("_profileInstrumented"in e)){if(e._profileInstrumented=!0,"_read"in e){const r=e._read;e._read=(n,i)=>{const a=performance.now();r.call(e,n,(()=>{t.timeSelf+=performance.now()-a,i()}))}}if("read"in e){const r=e.read;e.read=()=>{const i=performance.now(),a=r.call(e);return n&&a&&t.count++,t.timeSelf+=performance.now()-i,a}}if(n){const r=performance.now();e.on("end",(()=>{t.timeLife=performance.now()-r}))}"_source"in e&&r(e._source,t,!1)}}Object.defineProperty(t,"__esModule",{value:!0}),t.instrumentIterator=void 0,t.instrumentIterator=function(e){const t={count:0,timeSelf:0,timeLife:0};return r(e,t,!0),new Promise((r=>{e.on("end",(()=>{r(t)}))}))}},97145:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataAccumulate=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfMetadataAccumulate=i},49877:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(97145),t)},77879:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadataExtract=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfMetadataExtract=i},10800:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(77879),t)},32124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfMetadata=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfMetadata=i},52628:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(32124),t)},15569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseHtml=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfParseHtml=i},65446:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(15569),t)},20434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParse=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e)}}t.ActorRdfParse=i},67719:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfParseFixedMediaTypes=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e){return!0}}t.ActorRdfParseFixedMediaTypes=i},54592:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(20434),t),i(r(67719),t)},79773:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinksQueue=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfResolveHypermediaLinksQueue=i},25710:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89798:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkQueueWrapper=void 0,t.LinkQueueWrapper=class{constructor(e){this.linkQueue=e}push(e,t){return this.linkQueue.push(e,t)}getSize(){return this.linkQueue.getSize()}isEmpty(){return this.linkQueue.isEmpty()}pop(){return this.linkQueue.pop()}peek(){return this.linkQueue.peek()}}},56102:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(79773),t),i(r(25710),t),i(r(89798),t)},11018:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfResolveHypermediaLinks=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfResolveHypermediaLinks=i},22124:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(11018),t)},29342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerialize=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTyped{constructor(e){super(e)}}t.ActorRdfSerialize=i},34923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfSerializeFixedMediaTypes=void 0;const n=r(75560);class i extends n.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(){return!0}}t.ActorRdfSerializeFixedMediaTypes=i},84025:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(29342),t),i(r(34923),t)},9917:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateHypermedia=void 0;const n=r(34368);class i extends n.Actor{constructor(e,t){super(e),this.destinationType=t}async test(e){if(e.forceDestinationType&&this.destinationType!==e.forceDestinationType)throw new Error(`Actor ${this.name} is not able to handle destination type ${e.forceDestinationType}.`);return this.testMetadata(e)}}t.ActorRdfUpdateHypermedia=i},25345:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(9917),t)},10303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuads=void 0;const n=r(34368);class i extends n.Actor{constructor(e){super(e)}}t.ActorRdfUpdateQuads=i},96527:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActorRdfUpdateQuadsDestination=t.deskolemize=t.deskolemizeStream=void 0;const n=r(35106),i=r(32227),a=r(10303);function o(e,t){return e?.map((e=>(0,n.deskolemizeQuad)(e,t)))}function s(e){const t=e.context.get(i.KeysRdfUpdateQuads.destination),r=e.context.get(i.KeysQuerySourceIdentify.sourceIds)?.get(t);return r?{...e,quadStreamInsert:o(e.quadStreamInsert,r),quadStreamDelete:o(e.quadStreamDelete,r)}:e}t.deskolemizeStream=o,t.deskolemize=s;class c extends a.ActorRdfUpdateQuads{async test(e){return!0}async run(e){const t=await this.getDestination(e.context);return await this.getOutput(t,s(e))}async getOutput(e,t){return{execute:async()=>{await(t.quadStreamDelete?e.delete(t.quadStreamDelete):Promise.resolve()),await(t.deleteGraphs?e.deleteGraphs(t.deleteGraphs.graphs,t.deleteGraphs.requireExistence,t.deleteGraphs.dropGraphs):Promise.resolve()),await(t.createGraphs?e.createGraphs(t.createGraphs.graphs,t.createGraphs.requireNonExistence):Promise.resolve()),await(t.quadStreamInsert?e.insert(t.quadStreamInsert):Promise.resolve())}}}}t.ActorRdfUpdateQuadsDestination=c},54877:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},86789:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(10303),t),i(r(96527),t),i(r(54877),t),i(r(86368),t)},86368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getContextDestinationUrl=t.getContextDestination=t.getDataDestinationContext=t.getDataDestinationValue=t.getDataDestinationType=t.isDataDestinationRawType=void 0;const n=r(32227);function i(e){return"string"==typeof e||"remove"in e}function a(e){return i(e)?e:e.value}t.isDataDestinationRawType=i,t.getDataDestinationType=function(e){return"string"==typeof e?"":"remove"in e?"rdfjsStore":e.type},t.getDataDestinationValue=a,t.getDataDestinationContext=function(e,t){return"string"==typeof e||"remove"in e||!e.context?t:t.merge(e.context)},t.getContextDestination=function(e){return e.get(n.KeysRdfUpdateQuads.destination)},t.getContextDestinationUrl=function(e){if(e){let t=a(e);if("string"==typeof t){const e=t.indexOf("#");return e>=0&&(t=t.slice(0,e)),t}}}},88851:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeysRdfJoin=t.KeysMergeBindingsContext=t.KeysRdfUpdateQuads=t.KeysQuerySourceIdentify=t.KeysRdfParseHtmlScript=t.KeysRdfParseJsonLd=t.KeysQueryOperation=t.KeysInitQuery=t.KeysHttpProxy=t.KeysHttpMemento=t.KeysHttpWayback=t.KeysHttp=t.KeysCore=void 0;const n=r(34368);t.KeysCore={log:n.CONTEXT_KEY_LOGGER},t.KeysHttp={includeCredentials:new n.ActionContextKey("@comunica/bus-http:include-credentials"),auth:new n.ActionContextKey("@comunica/bus-http:auth"),fetch:new n.ActionContextKey("@comunica/bus-http:fetch"),httpTimeout:new n.ActionContextKey("@comunica/bus-http:http-timeout"),httpBodyTimeout:new n.ActionContextKey("@comunica/bus-http:http-body-timeout"),httpRetryCount:new n.ActionContextKey("@comunica/bus-http:http-retry-count"),httpRetryDelay:new n.ActionContextKey("@comunica/bus-http:http-retry-delay"),httpRetryOnServerError:new n.ActionContextKey("@comunica/bus-http:http-retry-on-server-error")},t.KeysHttpWayback={recoverBrokenLinks:new n.ActionContextKey("@comunica/bus-http:recover-broken-links")},t.KeysHttpMemento={datetime:new n.ActionContextKey("@comunica/actor-http-memento:datetime")},t.KeysHttpProxy={httpProxyHandler:new n.ActionContextKey("@comunica/actor-http-proxy:httpProxyHandler")},t.KeysInitQuery={querySourcesUnidentified:new n.ActionContextKey("@comunica/actor-init-query:querySourcesUnidentified"),initialBindings:new n.ActionContextKey("@comunica/actor-init-query:initialBindings"),queryFormat:new n.ActionContextKey("@comunica/actor-init-query:queryFormat"),graphqlSingularizeVariables:new n.ActionContextKey("@comunica/actor-init-query:singularizeVariables"),lenient:new n.ActionContextKey("@comunica/actor-init-query:lenient"),queryString:new n.ActionContextKey("@comunica/actor-init-query:queryString"),query:new n.ActionContextKey("@comunica/actor-init-query:query"),baseIRI:new n.ActionContextKey("@comunica/actor-init-query:baseIRI"),functionArgumentsCache:new n.ActionContextKey("@comunica/actor-init-query:functionArgumentsCache"),queryTimestamp:new n.ActionContextKey("@comunica/actor-init-query:queryTimestamp"),extensionFunctionCreator:new n.ActionContextKey("@comunica/actor-init-query:extensionFunctionCreator"),extensionFunctions:new n.ActionContextKey("@comunica/actor-init-query:extensionFunctions"),cliArgsHandlers:new n.ActionContextKey("@comunica/actor-init-query:cliArgsHandlers"),explain:new n.ActionContextKey("@comunica/actor-init-query:explain"),physicalQueryPlanLogger:new n.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanLogger"),physicalQueryPlanNode:new n.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanNode"),jsonLdContext:new n.ActionContextKey("@context"),noCache:new n.ActionContextKey("@comunica/actor-init-query:noCache"),distinctConstruct:new n.ActionContextKey("@comunica/actor-init-query:distinctConstruct")},t.KeysQueryOperation={operation:new n.ActionContextKey("@comunica/bus-query-operation:operation"),joinLeftMetadata:new n.ActionContextKey("@comunica/bus-query-operation:joinLeftMetadata"),joinRightMetadatas:new n.ActionContextKey("@comunica/bus-query-operation:joinRightMetadatas"),joinBindings:new n.ActionContextKey("@comunica/bus-query-operation:joinBindings"),readOnly:new n.ActionContextKey("@comunica/bus-query-operation:readOnly"),isPathArbitraryLengthDistinctKey:new n.ActionContextKey("@comunica/bus-query-operation:isPathArbitraryLengthDistinct"),limitIndicator:new n.ActionContextKey("@comunica/bus-query-operation:limitIndicator"),unionDefaultGraph:new n.ActionContextKey("@comunica/bus-query-operation:unionDefaultGraph"),querySources:new n.ActionContextKey("@comunica/bus-query-operation:querySources")},t.KeysRdfParseJsonLd={documentLoader:new n.ActionContextKey("@comunica/actor-rdf-parse-jsonld:documentLoader"),strictValues:new n.ActionContextKey("@comunica/actor-rdf-parse-jsonld:strictValues"),parserOptions:new n.ActionContextKey("@comunica/actor-rdf-parse-jsonld:parserOptions")},t.KeysRdfParseHtmlScript={processingHtmlScript:new n.ActionContextKey("@comunica/actor-rdf-parse-html-script:processingHtmlScript"),extractAllScripts:new n.ActionContextKey("extractAllScripts")},t.KeysQuerySourceIdentify={sourceIds:new n.ActionContextKey("@comunica/bus-query-source-identify:sourceIds"),hypermediaSourcesAggregatedStores:new n.ActionContextKey("@comunica/bus-query-source-identify:hypermediaSourcesAggregatedStores"),traverse:new n.ActionContextKey("@comunica/bus-query-source-identify:traverse")},t.KeysRdfUpdateQuads={destination:new n.ActionContextKey("@comunica/bus-rdf-update-quads:destination")},t.KeysMergeBindingsContext={sourcesBinding:new n.ActionContextKey("@comunica/bus-merge-bindings-context:sourcesBinding")},t.KeysRdfJoin={lastPhysicalJoin:new n.ActionContextKey("@comunica/bus-rdf-join:lastPhysicalJoin")}},32227:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(88851),t)},85865:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionContextKey=t.ActionContext=void 0;const n=r(6081);class i{constructor(e={}){this.map=(0,n.Map)(e)}setDefault(e,t){return this.has(e)?this:this.set(e,t)}set(e,t){return this.setRaw(e.name,t)}setRaw(e,t){return new i(this.map.set(e,t))}delete(e){return new i(this.map.delete(e.name))}get(e){return this.getRaw(e.name)}getRaw(e){return this.map.get(e)}getSafe(e){if(!this.has(e))throw new Error(`Context entry ${e.name} is required but not available`);return this.get(e)}has(e){return this.hasRaw(e.name)}hasRaw(e){return this.map.has(e)}merge(...e){let t=this;for(const r of e)for(const e of r.keys())t=t.set(e,r.get(e));return t}keys(){return[...this.map.keys()].map((e=>new a(e)))}toJS(){return this.map.toJS()}toString(){return`ActionContext(${JSON.stringify(this.map.toJS())})`}[Symbol.for("nodejs.util.inspect.custom")](){return`ActionContext(${JSON.stringify(this.map.toJS(),null," ")})`}static ensureActionContext(e){return e instanceof i?e:new i((0,n.Map)(e??{}))}}t.ActionContext=i;class a{constructor(e){this.name=e}}t.ActionContextKey=a},71330:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActionObserver=void 0,t.ActionObserver=class{constructor(e){Object.assign(this,e)}}},4165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Actor=void 0;const n=r(17395);class i{constructor(e){this.beforeActors=[],Object.assign(this,e),this.bus.subscribe(this),this.beforeActors.length>0&&this.bus.addDependencies(this,this.beforeActors)}static getContextLogger(e){return e.get(n.CONTEXT_KEY_LOGGER)}runObservable(e){const t=this.run(e);return this.bus.onRun(this,e,t),t}async initialize(){return!0}async deinitialize(){return!0}getDefaultLogData(e,t){const r=t?t():{};return r.actor=this.name,r}logTrace(e,t,r){const n=i.getContextLogger(e);n&&n.trace(t,this.getDefaultLogData(e,r))}logDebug(e,t,r){const n=i.getContextLogger(e);n&&n.debug(t,this.getDefaultLogData(e,r))}logInfo(e,t,r){const n=i.getContextLogger(e);n&&n.info(t,this.getDefaultLogData(e,r))}logWarn(e,t,r){const n=i.getContextLogger(e);n&&n.warn(t,this.getDefaultLogData(e,r))}logError(e,t,r){const n=i.getContextLogger(e);n&&n.error(t,this.getDefaultLogData(e,r))}logFatal(e,t,r){const n=i.getContextLogger(e);n&&n.fatal(t,this.getDefaultLogData(e,r))}}t.Actor=i},64802:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bus=void 0,t.Bus=class{constructor(e){this.actors=[],this.observers=[],this.dependencyLinks=new Map,Object.assign(this,e)}subscribe(e){this.actors.push(e),this.reorderForDependencies()}subscribeObserver(e){this.observers.push(e)}unsubscribe(e){const t=this.actors.indexOf(e);return t>=0&&(this.actors.splice(t,1),!0)}unsubscribeObserver(e){const t=this.observers.indexOf(e);return t>=0&&(this.observers.splice(t,1),!0)}publish(e){return this.actors.map((t=>({actor:t,reply:t.test(e)})))}onRun(e,t,r){for(const n of this.observers)n.onRun(e,t,r)}addDependencies(e,t){for(const r of t){let t=this.dependencyLinks.get(r);t||(t=[],this.dependencyLinks.set(r,t)),t.push(e)}this.reorderForDependencies()}reorderForDependencies(){if(this.dependencyLinks.size>0){const e=[];for(const t of this.dependencyLinks.keys()){const r=this.actors.indexOf(t);r>=0&&(this.actors.splice(r,1),e.push(t))}for(;e.length>0;){let t=-1;for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BusIndexed=void 0;const n=r(64802);class i extends n.Bus{constructor(e){super(e),this.actorsIndex={}}subscribe(e){const t=this.getActorIdentifier(e)||"_undefined_";let r=this.actorsIndex[t];r||(r=this.actorsIndex[t]=[]),r.push(e),super.subscribe(e)}unsubscribe(e){const t=this.getActorIdentifier(e)||"_undefined_",r=this.actorsIndex[t];if(r){const n=r.indexOf(e);n>=0&&r.splice(n,1),0===r.length&&delete this.actorsIndex[t]}return super.unsubscribe(e)}publish(e){const t=this.getActionIdentifier(e);return t?[...this.actorsIndex[t]||[],...this.actorsIndex._undefined_||[]].map((t=>({actor:t,reply:t.test(e)}))):super.publish(e)}getActorIdentifier(e){return this.actorIdentifierFields.reduce(((e,t)=>e[t]),e)}getActionIdentifier(e){return this.actionIdentifierFields.reduce(((e,t)=>e[t]),e)}}t.BusIndexed=i},17395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONTEXT_KEY_LOGGER=void 0;const n=r(85865);t.CONTEXT_KEY_LOGGER=new n.ActionContextKey("@comunica/core:log")},81411:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mediator=void 0,t.Mediator=class{constructor(e){Object.assign(this,e)}publish(e){const t=this.bus.publish(e);if(0===t.length)throw new Error(`No actors are able to reply to a message in the bus ${this.bus.name}`);return t}async mediateActor(e){return await this.mediateWith(e,this.publish(e))}async mediate(e){return(await this.mediateActor(e)).runObservable(e)}}},34368:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(85865),t),i(r(64802),t),i(r(45609),t),i(r(17395),t),i(r(71330),t),i(r(4165),t),i(r(81411),t)},72204:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNodeBindingsScoped=void 0,t.BlankNodeBindingsScoped=class{constructor(e){this.termType="BlankNode",this.singleBindingsScope=!0,this.value=e}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},99094:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNodeScoped=void 0,t.BlankNodeScoped=class{constructor(e,t){this.termType="BlankNode",this.value=e,this.skolemized=t}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},85156:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(99094),t),i(r(72204),t)},16095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Aggregator=t.AggregatorComponent=void 0;const n=r(22112),i=r(50363),a=r(14624),o=r(46157);t.AggregatorComponent=class{static emptyValue(){}constructor(e,t){this.sharedContext=t,this.separator=e.separator||" ",this.termTransformer=new i.TermTransformer(t.superTypeProvider)}termToNumericOrError(e){if("Literal"!==e.termType)throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a numeric literal`);if(!(0,o.isSubTypeOf)(e.datatype.value,a.TypeAlias.SPARQL_NUMERIC,this.sharedContext.superTypeProvider))throw new Error(`Term datatype ${e.datatype.value} with value ${e.value} has type ${e.termType} and is not a numeric literal`);return this.termTransformer.transformLiteral(e)}},t.Aggregator=class{constructor(e,t){this.aggregatorComponent=t,this.variableValues=new Map,this.distinct=e.distinct}static emptyValue(e){return e.emptyValue()}result(){return this.aggregatorComponent.result()}put(e,t=""){this.canSkip(e,t)||(this.aggregatorComponent.put(e),this.addSeen(e,t))}canSkip(e,t){const r=this.variableValues.get(t);return this.distinct&&void 0!==r&&r.has(n.termToString(e))}addSeen(e,t){this.distinct&&(this.variableValues.has(t)||this.variableValues.set(t,new Set),this.variableValues.get(t).add(n.termToString(e)))}}},37283:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Average=void 0;const n=r(11269),i=r(42711),a=r(63606),o=r(14624),s=r(16095);class c extends s.AggregatorComponent{constructor(){super(...arguments),this.summer=i.regularFunctions[o.RegularOperator.ADDITION],this.divider=i.regularFunctions[o.RegularOperator.DIVISION],this.state=void 0}static emptyValue(){return(0,a.integer)(0).toRDF()}put(e){if(void 0===this.state){const t=this.termToNumericOrError(e);this.state={sum:t,count:1}}else{const t=this.termToNumericOrError(e);this.state.sum=this.summer.apply([this.state.sum,t],this.sharedContext),this.state.count++}}result(){if(void 0===this.state)return c.emptyValue();const e=new n.IntegerLiteral(this.state.count);return this.divider.apply([this.state.sum,e],this.sharedContext).toRDF()}}t.Average=c},47943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Count=void 0;const n=r(63606),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}static emptyValue(){return(0,n.integer)(0).toRDF()}put(){void 0===this.state&&(this.state=0),this.state++}result(){return void 0===this.state?a.emptyValue():(0,n.integer)(this.state).toRDF()}}t.Count=a},81663:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupConcat=void 0;const n=r(63606),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0,this.lastLanguageValid=!0,this.lastLanguage=void 0}static emptyValue(){return(0,n.string)("").toRDF()}put(e){void 0===this.state?(this.state=e.value,"Literal"===e.termType&&(this.lastLanguage=e.language)):(this.state+=this.separator+e.value,this.lastLanguageValid&&"Literal"===e.termType&&this.lastLanguage!==e.language&&(this.lastLanguageValid=!1,this.lastLanguage=void 0))}result(){return void 0===this.state?a.emptyValue():this.lastLanguageValid&&this.lastLanguage?(0,n.langString)(this.state,this.lastLanguage).toRDF():(0,n.string)(this.state).toRDF()}}t.GroupConcat=a},73342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Max=void 0;const n=r(20236),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){if("Literal"!==e.termType)throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a literal`);(void 0===this.state||-1===(0,n.orderTypes)(this.state,e))&&(this.state=e)}result(){return void 0===this.state?a.emptyValue():this.state}}t.Max=a},59648:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Min=void 0;const n=r(20236),i=r(16095);class a extends i.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){if("Literal"!==e.termType)throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a literal`);(void 0===this.state||1===(0,n.orderTypes)(this.state,e))&&(this.state=e)}result(){return void 0===this.state?a.emptyValue():this.state}}t.Min=a},91664:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sample=void 0;const n=r(16095);class i extends n.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){void 0===this.state&&(this.state=e)}result(){return void 0===this.state?i.emptyValue():this.state}}t.Sample=i},69091:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sum=void 0;const n=r(42711),i=r(63606),a=r(14624),o=r(16095);class s extends o.AggregatorComponent{constructor(){super(...arguments),this.state=void 0,this.summer=n.regularFunctions[a.RegularOperator.ADDITION]}static emptyValue(){return(0,i.integer)(0).toRDF()}put(e){if(void 0===this.state)this.state=this.termToNumericOrError(e);else{const t=this.termToNumericOrError(e);this.state=this.summer.apply([this.state,t],this.sharedContext)}}result(){return void 0===this.state?s.emptyValue():this.state.toRDF()}}t.Sum=s},59408:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WildcardCountAggregator=void 0;const n=r(22112),i=r(63606);t.WildcardCountAggregator=class{constructor(e){this.bindingValues=new Map,this.counter=0,this.distinct=e.distinct}putBindings(e){this.handleDistinct(e)||(this.counter+=1)}static emptyValue(){return(0,i.integer)(0).toRDF()}result(){return(0,i.integer)(this.counter).toRDF()}handleDistinct(e){if(this.distinct){const t=[...e];t.sort(((e,t)=>e[0].value.localeCompare(t[0].value)));const r=t.map((([e])=>e.value)).join(","),i=t.map((([,e])=>n.termToString(e))).join(","),a=this.bindingValues.get(r),o=void 0!==a&&a.has(i);return a||this.bindingValues.set(r,new Set),this.bindingValues.get(r).add(i),o}return!1}}},96300:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.aggregators=void 0;const n=r(37283),i=r(47943),a=r(81663),o=r(73342),s=r(59648),c=r(91664),u=r(69091);t.aggregators={count:i.Count,sum:u.Sum,min:s.Min,max:o.Max,avg:n.Average,group_concat:a.GroupConcat,sample:c.Sample}},19030:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AggregateEvaluator=void 0;const n=r(76206),i=r(86588);class a extends n.BaseAggregateEvaluator{constructor(e,t,r){super(e,i.SyncEvaluator.completeContext(t??{}),r),this.evaluator=new i.SyncEvaluator(e.expression,t)}put(e){if(!this.errorOccurred)if(this.isWildcard)this.wildcardAggregator.putBindings(e);else try{const t=this.evaluator.evaluate(e);this.aggregator.put(t)}catch(e){this.safeThrow(e)}}safeThrow(e){if(this.throwError)throw e;this.errorOccurred=!0}}t.AggregateEvaluator=a},74448:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAggregateEvaluator=void 0;const n=r(98375),i=r(76206);class a extends i.BaseAggregateEvaluator{constructor(e,t,r){super(e,n.AsyncEvaluator.completeContext(t??{}),r),this.evaluator=new n.AsyncEvaluator(e.expression,t),this.errorOccurred=!1}async put(e){if(!this.errorOccurred)if(this.isWildcard)this.wildcardAggregator.putBindings(e);else try{const t=await this.evaluator.evaluate(e);if(!t||this.errorOccurred)return;this.aggregator.put(t)}catch(e){this.safeThrow(e)}}safeThrow(e){if(this.throwError)throw e;this.errorOccurred=!0}}t.AsyncAggregateEvaluator=a},98375:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncEvaluator=void 0;const n=r(35069),i=r(69119),a=r(76660),o=r(9062);class s{static completeContext(e){const t=e.now??new Date(Date.now());return{now:t,baseIRI:e.baseIRI??void 0,functionArgumentsCache:e.functionArgumentsCache??{},superTypeProvider:{cache:e.typeCache??new n.LRUCache({max:1e3}),discoverer:e.getSuperType??(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,defaultTimeZone:e.defaultTimeZone??(0,a.extractTimeZone)(t)}}constructor(e,t={}){this.algExpr=e;const r=t.extensionFunctionCreator??(()=>{}),n=s.completeContext(t),a=new i.AlgebraTransformer({type:"async",creator:r,...n});this.expr=a.transformAlgebra(e),this.evaluator=new o.AsyncRecursiveEvaluator(n,a)}async evaluate(e){return(await this.evaluator.evaluate(this.expr,e)).toRDF()}async evaluateAsEBV(e){return(await this.evaluator.evaluate(this.expr,e)).coerceEBV()}async evaluateAsInternal(e){return await this.evaluator.evaluate(this.expr,e)}}t.AsyncEvaluator=s},86588:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncEvaluator=void 0;const n=r(35069),i=r(69119),a=r(76660),o=r(42425);class s{static completeContext(e){const t=e.now??new Date(Date.now());return{now:t,baseIRI:e.baseIRI??void 0,functionArgumentsCache:e.functionArgumentsCache??{},superTypeProvider:{cache:e.typeCache??new n.LRUCache({max:1e3}),discoverer:e.getSuperType??(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,defaultTimeZone:e.defaultTimeZone??(0,a.extractTimeZone)(t)}}constructor(e,t={}){this.algExpr=e,this.context=t;const r=t.extensionFunctionCreator??(()=>{}),n=s.completeContext(t),a=new i.AlgebraTransformer({type:"sync",creator:r,...n});this.expr=a.transformAlgebra(e),this.evaluator=new o.SyncRecursiveEvaluator(n,a)}evaluate(e){return this.evaluator.evaluate(this.expr,e).toRDF()}evaluateAsEBV(e){return this.evaluator.evaluate(this.expr,e).coerceEBV()}evaluateAsInternal(e){return this.evaluator.evaluate(this.expr,e)}}t.SyncEvaluator=s},9062:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncRecursiveEvaluator=void 0;const n=r(11269),i=r(50363),a=r(82867),o=r(10667);class s extends o.BaseExpressionEvaluator{constructor(e,t){super(t??new i.TermTransformer(e.superTypeProvider)),this.context=e,this.subEvaluators={[n.ExpressionType.Term]:(e,t)=>this.term(e),[n.ExpressionType.Variable]:(e,t)=>this.variable(e,t),[n.ExpressionType.Operator]:(e,t)=>this.evalOperator(e,t),[n.ExpressionType.SpecialOperator]:(e,t)=>this.evalSpecialOperator(e,t),[n.ExpressionType.Named]:(e,t)=>this.evalNamed(e,t),[n.ExpressionType.Existence]:(e,t)=>this.evalExistence(e,t),[n.ExpressionType.Aggregate]:(e,t)=>this.evalAggregate(e),[n.ExpressionType.AsyncExtension]:(e,t)=>this.evalAsyncExtension(e,t)}}async evaluate(e,t){const r=this.subEvaluators[e.expressionType];if(!r)throw new a.InvalidExpressionType(e);return r.bind(this)(e,t)}async evalOperator(e,t){const r=e.args.map((e=>this.evaluate(e,t))),n=await Promise.all(r);return e.apply(n)}async evalSpecialOperator(e,t){const r=this.evaluate.bind(this),n={args:e.args,mapping:t,superTypeProvider:this.context.superTypeProvider,now:this.context.now,baseIRI:this.context.baseIRI,functionArgumentsCache:this.context.functionArgumentsCache,evaluate:r,bnode:this.context.bnode,defaultTimeZone:this.context.defaultTimeZone};return e.applyAsync(n)}async _evalAsyncArgs(e,t){const r=e.map((e=>this.evaluate(e,t)));return await Promise.all(r)}async evalNamed(e,t){return e.apply(await this._evalAsyncArgs(e.args,t))}async evalAsyncExtension(e,t){return await e.apply(await this._evalAsyncArgs(e.args,t))}async evalExistence(e,t){if(!this.context.exists)throw new a.NoExistenceHook;return new n.BooleanLiteral(await this.context.exists(e.expression,t))}async evalAggregate(e){if(!this.context.aggregate)throw new a.NoAggregator;return this.termTransformer.transformRDFTermUnsafe(await this.context.aggregate(e.expression))}}t.AsyncRecursiveEvaluator=s},76206:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAggregateEvaluator=void 0;const n=r(31578),i=r(96300),a=r(16095),o=r(59408),s=r(82867);t.BaseAggregateEvaluator=class{constructor(e,t,r){this.throwError=!1,this.isWildcard=!1,this.errorOccurred=!1,this.expression=e,this.aggregator=new a.Aggregator(e,new i.aggregators[e.aggregator](e,t)),this.throwError=r??!1,this.isWildcard=e.expression.expressionType===n.Algebra.expressionTypes.WILDCARD,this.isWildcard&&(this.wildcardAggregator=new o.WildcardCountAggregator(e))}static emptyValue(e,t=!1){let r;if(r=e.expression.expressionType===n.Algebra.expressionTypes.WILDCARD?o.WildcardCountAggregator.emptyValue():a.Aggregator.emptyValue(i.aggregators[e.aggregator]),void 0===r&&t)throw new s.EmptyAggregateError;return r}result(){if(!this.errorOccurred)return this.isWildcard?this.wildcardAggregator.result():this.aggregator.result()}}},10667:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseExpressionEvaluator=void 0;const n=r(63606),i=r(82867);t.BaseExpressionEvaluator=class{constructor(e){this.termTransformer=e}term(e){return e}variable(e,t){const r=t.get((0,n.expressionToVar)(e));if(!r)throw new i.UnboundVariableError(e.name,t);return this.termTransformer.transformRDFTermUnsafe(r)}}},42425:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncRecursiveEvaluator=void 0;const n=r(11269),i=r(50363),a=r(82867),o=r(10667);class s extends o.BaseExpressionEvaluator{constructor(e,t){super(t??new i.TermTransformer(e.superTypeProvider)),this.context=e,this.subEvaluators={[n.ExpressionType.Term]:(e,t)=>this.term(e),[n.ExpressionType.Variable]:(e,t)=>this.variable(e,t),[n.ExpressionType.Operator]:(e,t)=>this.evalOperator(e,t),[n.ExpressionType.SpecialOperator]:(e,t)=>this.evalSpecialOperator(e,t),[n.ExpressionType.Named]:(e,t)=>this.evalNamed(e,t),[n.ExpressionType.Existence]:(e,t)=>this.evalExistence(e,t),[n.ExpressionType.Aggregate]:(e,t)=>this.evalAggregate(e),[n.ExpressionType.SyncExtension]:(e,t)=>this.evalSyncExtension(e,t)}}evaluate(e,t){const r=this.subEvaluators[e.expressionType];if(!r)throw new a.InvalidExpressionType(e);return r.bind(this)(e,t)}evalOperator(e,t){const r=e.args.map((e=>this.evaluate(e,t)));return e.apply(r)}evalSpecialOperator(e,t){const r=this.evaluate.bind(this),n={args:e.args,mapping:t,superTypeProvider:this.context.superTypeProvider,now:this.context.now,baseIRI:this.context.baseIRI,functionArgumentsCache:this.context.functionArgumentsCache,evaluate:r,bnode:this.context.bnode,defaultTimeZone:this.context.defaultTimeZone};return e.applySynchronously(n)}evalNamed(e,t){const r=e.args.map((e=>this.evaluate(e,t)));return e.apply(r)}evalSyncExtension(e,t){const r=e.args.map((e=>this.evaluate(e,t)));return e.apply(r)}evalExistence(e,t){if(!this.context.exists)throw new a.NoExistenceHook;return new n.BooleanLiteral(this.context.exists(e.expression,t))}evalAggregate(e){if(!this.context.aggregate)throw new a.NoAggregator;return this.termTransformer.transformRDFTermUnsafe(this.context.aggregate(e.expression))}}t.SyncRecursiveEvaluator=s},9950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Aggregate=void 0;const n=r(89702);t.Aggregate=class{constructor(e,t){this.name=e,this.expression=t,this.expressionType=n.ExpressionType.Aggregate}}},29360:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncExtension=void 0;const n=r(89702);t.AsyncExtension=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.AsyncExtension}}},75065:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Existence=void 0;const n=r(89702);t.Existence=class{constructor(e){this.expression=e,this.expressionType=n.ExpressionType.Existence}}},89702:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.asTermType=t.ExpressionType=void 0,function(e){e.Aggregate="aggregate",e.Existence="existence",e.Named="named",e.Operator="operator",e.SpecialOperator="specialOperator",e.Term="term",e.Variable="variable",e.AsyncExtension="asyncExtension",e.SyncExtension="syncExtension"}(r||(t.ExpressionType=r={})),t.asTermType=function(e){if("namedNode"===e||"literal"===e||"blankNode"===e||"quad"===e)return e}},67112:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Named=void 0;const n=r(89702);t.Named=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.Named}}},27033:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Operator=void 0;const n=r(89702);t.Operator=class{constructor(e,t){this.args=e,this.apply=t,this.expressionType=n.ExpressionType.Operator}}},3358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialOperator=void 0;const n=r(89702);t.SpecialOperator=class{constructor(e,t,r){this.args=e,this.applyAsync=t,this.applySynchronously=r,this.expressionType=n.ExpressionType.SpecialOperator}}},62293:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncExtension=void 0;const n=r(89702);t.SyncExtension=class{constructor(e,t,r){this.name=e,this.args=t,this.apply=r,this.expressionType=n.ExpressionType.SyncExtension}}},79339:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNonLexicalLiteral=t.NonLexicalLiteral=t.YearMonthDurationLiteral=t.DayTimeDurationLiteral=t.DurationLiteral=t.DateLiteral=t.TimeLiteral=t.DateTimeLiteral=t.StringLiteral=t.LangStringLiteral=t.BooleanLiteral=t.DoubleLiteral=t.FloatLiteral=t.DecimalLiteral=t.IntegerLiteral=t.NumericLiteral=t.Literal=t.isLiteralTermExpression=t.Quad=t.BlankNode=t.NamedNode=t.Term=void 0;const n=r(18050),i=r(50363),a=r(14624),o=r(14624),s=r(82867),c=r(19002),u=r(46157),l=r(89702),d=new n.DataFactory;class p{constructor(){this.expressionType=l.ExpressionType.Term}str(){throw new s.InvalidArgumentTypes([this],a.RegularOperator.STR)}coerceEBV(){throw new s.EBVCoercionError(this)}}t.Term=p,t.NamedNode=class extends p{constructor(e){super(),this.value=e,this.termType="namedNode"}toRDF(){return d.namedNode(this.value)}str(){return this.value}},t.BlankNode=class extends p{constructor(e){super(),this.termType="blankNode",this.value="string"==typeof e?d.blankNode(e):e}toRDF(){return this.value}},t.Quad=class extends p{constructor(e,t){super(),this.termType="quad",this.transformer=new i.TermTransformer(t),this.valueTerm=e}toRDF(){return this.valueTerm}get subject(){return this.transformer.transformRDFTermUnsafe(this.RDFsubject)}get predicate(){return this.transformer.transformRDFTermUnsafe(this.RDFpredicate)}get object(){return this.transformer.transformRDFTermUnsafe(this.RDFobject)}get RDFsubject(){return this.toRDF().subject}get RDFpredicate(){return this.toRDF().predicate}get RDFobject(){return this.toRDF().object}},t.isLiteralTermExpression=function(e){if("literal"===e.termType)return e};class h extends p{constructor(e,t,r,n){super(),this.typedValue=e,this.dataType=t,this.strValue=r,this.language=n,this.termType="literal"}toRDF(){return d.literal(this.strValue??this.str(),this.language??d.namedNode(this.dataType))}str(){return this.strValue??this.typedValue.toString()}}t.Literal=h;class f extends h{constructor(e,t,r,n){super(e,t,r,n),this.typedValue=e,this.strValue=r,this.language=n}coerceEBV(){return Boolean(this.typedValue)}toRDF(){const e=super.toRDF();return Number.isFinite(this.typedValue)||(e.value=e.value.replace("Infinity","INF")),e}str(){return this.strValue??this.specificFormatter(this.typedValue)}}t.NumericLiteral=f,t.IntegerLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_INTEGER,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toFixed(0)}},t.DecimalLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_DECIMAL,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toString()}},t.FloatLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_FLOAT,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){return e.toString()}},t.DoubleLiteral=class extends f{constructor(e,t,r,n){super(e,t??o.TypeURL.XSD_DOUBLE,r,n),this.typedValue=e,this.strValue=r,this.language=n}specificFormatter(e){if(!Number.isFinite(e))return e>0?"INF":e<0?"-INF":"NaN";const t=e.toExponential(),[r,n]=t.split("e"),i=n.replace(/\+/u,"");return`${r.includes(".")?r:`${r}.0`}E${i}`}},t.BooleanLiteral=class extends h{constructor(e,t,r){super(e,r??o.TypeURL.XSD_BOOLEAN,t),this.typedValue=e,this.strValue=t}coerceEBV(){return this.typedValue}},t.LangStringLiteral=class extends h{constructor(e,t,r){super(e,r??o.TypeURL.RDF_LANG_STRING,e,t),this.typedValue=e,this.language=t}coerceEBV(){return this.str().length>0}},t.StringLiteral=class extends h{constructor(e,t){super(e,t??o.TypeURL.XSD_STRING,e),this.typedValue=e}coerceEBV(){return this.str().length>0}},t.DateTimeLiteral=class extends h{constructor(e,t,r){super(e,r??o.TypeURL.XSD_DATE_TIME,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDateTime)(this.typedValue)}},t.TimeLiteral=class extends h{constructor(e,t,r){super(e,r??o.TypeURL.XSD_TIME,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeTime)(this.typedValue)}},t.DateLiteral=class extends h{constructor(e,t,r){super(e,r??o.TypeURL.XSD_DATE,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDate)(this.typedValue)}};class y extends h{constructor(e,t,r){super(e,r??o.TypeURL.XSD_DURATION,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDuration)(this.typedValue)}}t.DurationLiteral=y,t.DayTimeDurationLiteral=class extends y{constructor(e,t,r){super(e,t,r??o.TypeURL.XSD_DAY_TIME_DURATION),this.typedValue=e,this.strValue=t}},t.YearMonthDurationLiteral=class extends h{constructor(e,t,r){super(e,r??o.TypeURL.XSD_YEAR_MONTH_DURATION,t),this.typedValue=e,this.strValue=t}str(){return(0,c.serializeDuration)(this.typedValue,"P0M")}};class g extends h{constructor(e,t,r,n,i){super({toString:()=>"undefined"},t,n,i),this.openWorldType=r}coerceEBV(){if((0,u.isSubTypeOf)(this.dataType,o.TypeURL.XSD_BOOLEAN,this.openWorldType)||(0,u.isSubTypeOf)(this.dataType,o.TypeAlias.SPARQL_NUMERIC,this.openWorldType))return!1;throw new s.EBVCoercionError(this)}toRDF(){return d.literal(this.str(),this.language??d.namedNode(this.dataType))}str(){return this.strValue??""}}t.NonLexicalLiteral=g,t.isNonLexicalLiteral=function(e){if(e instanceof g)return e}},28757:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0;const n=r(89702);t.Variable=class{constructor(e){this.expressionType=n.ExpressionType.Variable,this.name=e}}},11269:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(89702),t),i(r(28757),t),i(r(79339),t),i(r(27033),t),i(r(3358),t),i(r(67112),t),i(r(9950),t),i(r(75065),t),i(r(29360),t),i(r(62293),t)},57328:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SpecialFunction=t.NamedFunction=t.RegularFunction=t.BaseFunction=void 0;const n=r(82867);class i{constructor(e,t){this.operator=e,this.apply=(e,t)=>(this.monomorph(e,t.superTypeProvider,t.functionArgumentsCache)??this.handleInvalidTypes(e))(t)(e),this.arity=t.arity,this.overloads=t.overloads}monomorph(e,t,r){return this.overloads.search(e,t,r)}}t.BaseFunction=i,t.RegularFunction=class extends i{constructor(e,t){super(e,t),this.functionClass="regular"}handleInvalidTypes(e){throw new n.InvalidArgumentTypes(e,this.operator)}},t.NamedFunction=class extends i{constructor(e,t){super(e,t),this.functionClass="named"}handleInvalidTypes(e){throw new n.InvalidArgumentTypes(e,this.operator)}},t.SpecialFunction=class{constructor(e,t){var r;this.operator=e,this.functionClass="special",this.arity=t.arity,this.applySynchronously=t.applySynchronously,this.applyAsync=t.applyAsync,this.checkArity=t.checkArity??(r=this.arity,e=>r===Number.POSITIVE_INFINITY||e.length===r)}}},63606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expressionToVar=t.dateTime=t.langString=t.string=t.double=t.float=t.decimal=t.integer=t.bool=t.Builder=t.declare=void 0;const n=r(18050),i=r(11269),a=r(11269),o=r(14624),s=r(14624),c=r(82867),u=r(33357),l=new n.DataFactory;t.declare=function(e){return new d(e)};class d{constructor(e){this.overloadTree=new u.OverloadTree(e),this.collected=!1}collect(){if(this.collected)throw new Error("Builders can only be collected once!");return this.collected=!0,this.overloadTree}static wrapInvalidLexicalProtected(e){return t=>r=>{for(const[e,t]of r.entries())if(t instanceof a.NonLexicalLiteral)throw new c.InvalidLexicalForm(r[e].toRDF());return e(t)(r)}}set(e,t,r=!0){return this.overloadTree.addOverload(e,r?d.wrapInvalidLexicalProtected(t):t),this}copy({from:e,to:t}){const r=this.overloadTree.getImplementationExact(e);if(!r)throw new c.UnexpectedError("Tried to copy implementation, but types not found",{from:e,to:t});return this.set(t,r)}onUnary(e,t,r=!0){return this.set([e],(e=>([r])=>t(e)(r)),r)}onUnaryTyped(e,t,r=!0){return this.set([e],(e=>([r])=>t(e)(r.typedValue)),r)}onBinary(e,t,r=!0){return this.set(e,(e=>([r,n])=>t(e)(r,n)),r)}onBinaryTyped(e,t,r=!0){return this.set(e,(e=>([r,n])=>t(e)(r.typedValue,n.typedValue)),r)}onTernaryTyped(e,t,r=!0){return this.set(e,(e=>([r,n,i])=>t(e)(r.typedValue,n.typedValue,i.typedValue)),r)}onTernary(e,t,r=!0){return this.set(e,(e=>([r,n,i])=>t(e)(r,n,i)),r)}onQuaternaryTyped(e,t,r=!0){return this.set(e,(e=>([r,n,i,a])=>t(e)(r.typedValue,n.typedValue,i.typedValue,a.typedValue)),r)}onTerm1(e,t=!1){return this.set(["term"],(t=>([r])=>e(t)(r)),t)}onTerm3(e){return this.set(["term","term","term"],(t=>([r,n,i])=>e(t)(r,n,i)))}onQuad1(e){return this.set(["quad"],(t=>([r])=>e(t)(r)))}onLiteral1(e,t=!0){return this.set(["literal"],(t=>([r])=>e(t)(r)),t)}onBoolean1(e,t=!0){return this.set([o.TypeURL.XSD_BOOLEAN],(t=>([r])=>e(t)(r)),t)}onBoolean1Typed(e,t=!0){return this.set([o.TypeURL.XSD_BOOLEAN],(t=>([r])=>e(t)(r.typedValue)),t)}onString1(e,t=!0){return this.set([o.TypeURL.XSD_STRING],(t=>([r])=>e(t)(r)),t)}onString1Typed(e,t=!0){return this.set([o.TypeURL.XSD_STRING],(t=>([r])=>e(t)(r.typedValue)),t)}onLangString1(e,t=!0){return this.set([o.TypeURL.RDF_LANG_STRING],(t=>([r])=>e(t)(r)),t)}onStringly1(e,t=!0){return this.set([o.TypeAlias.SPARQL_STRINGLY],(t=>([r])=>e(t)(r)),t)}onStringly1Typed(e,t=!0){return this.set([o.TypeAlias.SPARQL_STRINGLY],(t=>([r])=>e(t)(r.typedValue)),t)}onNumeric1(e,t=!0){return this.set([o.TypeAlias.SPARQL_NUMERIC],(t=>([r])=>e(t)(r)),t)}onDateTime1(e,t=!0){return this.set([o.TypeURL.XSD_DATE_TIME],(t=>([r])=>e(t)(r)),t)}numericConverter(e,t=!0){const r=t=>r=>e(t)(r.typedValue);return this.onUnary(s.TypeURL.XSD_INTEGER,(e=>t=>h(r(e)(t))),t).onUnary(s.TypeURL.XSD_DECIMAL,(e=>t=>f(r(e)(t))),t).onUnary(s.TypeURL.XSD_FLOAT,(e=>t=>y(r(e)(t))),t).onUnary(s.TypeURL.XSD_DOUBLE,(e=>t=>g(r(e)(t))),t)}arithmetic(e,t=!0){const r=t=>(r,n)=>e(t)(r.typedValue,n.typedValue);return this.onBinary([s.TypeURL.XSD_INTEGER,s.TypeURL.XSD_INTEGER],(e=>(t,n)=>h(r(e)(t,n))),t).onBinary([s.TypeURL.XSD_DECIMAL,s.TypeURL.XSD_DECIMAL],(e=>(t,n)=>f(r(e)(t,n))),t).onBinary([s.TypeURL.XSD_FLOAT,s.TypeURL.XSD_FLOAT],(e=>(t,n)=>y(r(e)(t,n))),t).onBinary([s.TypeURL.XSD_DOUBLE,s.TypeURL.XSD_DOUBLE],(e=>(t,n)=>g(r(e)(t,n))),t)}numberTest(e){return this.numeric((t=>([r,n])=>p(e(t)(r.typedValue,n.typedValue))))}stringTest(e,t=!0){return this.set([o.TypeURL.XSD_STRING,o.TypeURL.XSD_STRING],(t=>([r,n])=>p(e(t)(r.typedValue,n.typedValue))),t)}booleanTest(e,t=!0){return this.set([o.TypeURL.XSD_BOOLEAN,o.TypeURL.XSD_BOOLEAN],(t=>([r,n])=>p(e(t)(r.typedValue,n.typedValue))),t)}dateTimeTest(e,t=!0){return this.set([o.TypeURL.XSD_DATE_TIME,o.TypeURL.XSD_DATE_TIME],(t=>([r,n])=>p(e(t)(r.typedValue,n.typedValue))),t)}numeric(e){return this.set([o.TypeAlias.SPARQL_NUMERIC,o.TypeAlias.SPARQL_NUMERIC],e)}}function p(e){return new i.BooleanLiteral(e)}function h(e){return new i.IntegerLiteral(e)}function f(e){return new i.DecimalLiteral(e)}function y(e){return new i.FloatLiteral(e)}function g(e){return new i.DoubleLiteral(e)}t.Builder=d,t.bool=p,t.integer=h,t.decimal=f,t.float=y,t.double=g,t.string=function(e){return new i.StringLiteral(e)},t.langString=function(e,t){return new i.LangStringLiteral(e,t)},t.dateTime=function(e,t){return new i.DateTimeLiteral(e,t)},t.expressionToVar=function(e){return l.variable(e.name.slice(1))}},58157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namedDefinitions=void 0;const n=r(11269),i=r(11269),a=r(14624),o=r(76660),s=r(82867),c=r(17590),u=r(63606),l={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_STRING).onNumeric1((()=>e=>(0,u.string)((0,u.float)(e.typedValue).str()))).onBoolean1Typed((()=>e=>(0,u.string)((0,u.bool)(e).str()))).onTerm1((()=>e=>(0,u.string)(e.str()))).collect()},d={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_FLOAT).onNumeric1((()=>e=>(0,u.float)(e.typedValue))).onBoolean1Typed((()=>e=>(0,u.float)(e?1:0))).onUnary(a.TypeURL.XSD_STRING,(()=>e=>{const t=(0,c.parseXSDFloat)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_FLOAT);return(0,u.float)(t)}),!1).collect()},p={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DOUBLE).onNumeric1((()=>e=>(0,u.double)(e.typedValue))).onBoolean1Typed((()=>e=>(0,u.double)(e?1:0))).onUnary(a.TypeURL.XSD_STRING,(()=>e=>{const t=(0,c.parseXSDFloat)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_DOUBLE);return(0,u.double)(t)}),!1).collect()},h={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DECIMAL).onNumeric1((()=>e=>{const t=(0,c.parseXSDDecimal)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_DECIMAL);return(0,u.decimal)(t)})).onString1((()=>e=>{const t=e.str(),r=/^([+-])?(\d+(\.\d+)?)$/u.test(t)?(0,c.parseXSDDecimal)(t):void 0;if(void 0===r)throw new s.CastError(e,a.TypeURL.XSD_DECIMAL);return(0,u.decimal)(r)}),!1).onBoolean1Typed((()=>e=>(0,u.decimal)(e?1:0))).collect()},f={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_INTEGER).onBoolean1Typed((()=>e=>(0,u.integer)(e?1:0))).onNumeric1((()=>e=>{const t=(0,c.parseXSDInteger)(e.str());if(void 0===t)throw new s.CastError(e,a.TypeURL.XSD_INTEGER);return(0,u.integer)(t)}),!1).onString1((()=>e=>{const t=e.str(),r=/^\d+$/u.test(t)?(0,c.parseXSDInteger)(t):void 0;if(void 0===r)throw new s.CastError(e,a.TypeURL.XSD_INTEGER);return(0,u.integer)(r)})).collect()},y={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DATE_TIME).onUnary(a.TypeURL.XSD_DATE_TIME,(()=>e=>e)).onUnary(a.TypeURL.XSD_STRING,(()=>e=>(0,u.dateTime)((0,c.parseDateTime)(e.str()),e.str())),!1).onUnary(a.TypeURL.XSD_DATE,(()=>e=>new n.DateTimeLiteral({...e.typedValue,hours:0,minutes:0,seconds:0}))).collect()},g={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_BOOLEAN).onNumeric1((()=>e=>(0,u.bool)(e.coerceEBV())),!0).onUnary(a.TypeURL.XSD_BOOLEAN,(()=>e=>(0,u.bool)(e.coerceEBV())),!0).onUnary(a.TypeURL.XSD_STRING,(()=>e=>{switch(e.str()){case"true":case"1":return(0,u.bool)(!0);case"false":case"0":return(0,u.bool)(!1);default:throw new s.CastError(e,a.TypeURL.XSD_BOOLEAN)}}),!1).collect()},m={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_TIME).onUnary(a.TypeURL.XSD_TIME,(()=>e=>new n.TimeLiteral(e.typedValue,e.strValue))).onUnary(a.TypeURL.XSD_DATE_TIME,(()=>e=>new n.TimeLiteral(e.typedValue))).onStringly1((()=>e=>new n.TimeLiteral((0,c.parseTime)(e.str())))).collect()},b={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DATE).onUnary(a.TypeURL.XSD_DATE,(()=>e=>new n.DateLiteral(e.typedValue,e.strValue))).onUnary(a.TypeURL.XSD_DATE_TIME,(()=>e=>new n.DateLiteral(e.typedValue))).onStringly1((()=>e=>new n.DateLiteral((0,c.parseDate)(e.str())))).collect()},v={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DURATION).onUnary(a.TypeURL.XSD_DURATION,(()=>e=>new n.DurationLiteral(e.typedValue,e.strValue))).onStringly1((()=>e=>new i.DurationLiteral((0,c.parseDuration)(e.str())))).collect()},_={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_DAY_TIME_DURATION).onUnary(a.TypeURL.XSD_DURATION,(()=>e=>new n.DayTimeDurationLiteral((0,o.trimToDayTimeDuration)(e.typedValue)))).onStringly1((()=>e=>new n.DayTimeDurationLiteral((0,c.parseDayTimeDuration)(e.str())))).collect()},w={arity:1,overloads:(0,u.declare)(a.TypeURL.XSD_YEAR_MONTH_DURATION).onUnary(a.TypeURL.XSD_DURATION,(()=>e=>new n.YearMonthDurationLiteral((0,o.trimToYearMonthDuration)(e.typedValue)))).onStringly1((()=>e=>new n.YearMonthDurationLiteral((0,c.parseYearMonthDuration)(e.str())))).collect()};t.namedDefinitions={[a.TypeURL.XSD_STRING]:l,[a.TypeURL.XSD_FLOAT]:d,[a.TypeURL.XSD_DOUBLE]:p,[a.TypeURL.XSD_DECIMAL]:h,[a.TypeURL.XSD_INTEGER]:f,[a.TypeURL.XSD_DATE_TIME]:y,[a.TypeURL.XSD_DATE]:b,[a.TypeURL.XSD_BOOLEAN]:g,[a.TypeURL.XSD_TIME]:m,[a.TypeURL.XSD_DURATION]:v,[a.TypeURL.XSD_DAY_TIME_DURATION]:_,[a.TypeURL.XSD_YEAR_MONTH_DURATION]:w}},33357:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OverloadTree=void 0;const n=r(11269),i=r(46157);class a{constructor(e,t){this.identifier=e,this.implementation=void 0,this.generalOverloads=Object.create(null),this.literalOverLoads=[],this.depth=t??0,this.promotionCount=void 0}getSubtree(e){const t=(0,i.asGeneralType)(e);if(t)return this.generalOverloads[t];for(const[t,r]of this.literalOverLoads)if(e===t)return r}getImplementationExact(e){let t=this;for(const r of e)if(t=t.getSubtree(r),!t)return;return t.implementation}search(e,t,r){let i=r[this.identifier],a=0;for(;a({node:e,index:1}))));o.length>0;){const{index:n,node:i}=o.pop();if(n===e.length&&i.implementation)return this.addToCache(r,e,i.implementation),i.implementation;o.push(...i.getSubTreeWithArg(e[n],t).map((e=>({node:e,index:n+1}))))}}addToCache(e,t,r){function i(e,t){return t in e||(e[t]={}),e[t]}let a=i(e,this.identifier);for(const e of t){const t=(0,n.isLiteralTermExpression)(e),r=t?t.dataType:e.termType;a.cache=a.cache??{},a=i(a.cache,r)}a.func=r}addOverload(e,t){this._addOverload([...e],t,0)}_addOverload(e,t,r){const[n,...o]=e;if(!n)return void((void 0===this.promotionCount||r<=this.promotionCount)&&(this.promotionCount=r,this.implementation=t));let s=this.getSubtree(n);if(!s){const e=new a(this.identifier,this.depth+1),t=(0,i.asGeneralType)(n);t&&(this.generalOverloads[t]=e);const r=(0,i.asOverrideType)(n);r&&this.literalOverLoads.push([r,e]),s=e}if(s._addOverload(o,t,r),i.typePromotion[n])for(const e of i.typePromotion[n])this.addPromotedOverload(e.typeToPromote,t,e.conversionFunction,o,r)}addPromotedOverload(e,t,r,n,i){let o=this.getSubtree(e);if(!o){const t=new a(this.identifier,this.depth+1);this.literalOverLoads.push([e,t]),o=t}o._addOverload(n,(e=>n=>t(e)([...n.slice(0,this.depth),r(n[this.depth]),...n.slice(this.depth+1,n.length)])),i+1)}getSubTreeWithArg(e,t){const r=[],a=(0,n.isLiteralTermExpression)(e);if(this.generalOverloads.term&&r.push(this.generalOverloads.term),this.generalOverloads[e.termType]&&r.push(this.generalOverloads[e.termType]),a){const e=(0,i.asKnownLiteralType)(a.dataType);let n;n=e?i.superTypeDictTable[e]:(0,i.getSuperTypes)(a.dataType,t);const o=this.literalOverLoads.filter((([e,t])=>e in n)).map((([e,t])=>[n[e],t]));o.sort((([e,t],[r,n])=>e-r)),r.push(...o.map((([e,t])=>t)))}return r}}t.OverloadTree=a},22122:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.definitions=void 0;const n=r(55553),i=r(99499),a=r(18050),o=r(9929),s=r(88110),c=r(84596),u=r(11269),l=r(50363),d=r(14624),p=r(14624),h=r(76660),f=r(82867),y=r(20236),g=r(66487),m=r(57328),b=r(63606),v=r(29791),_=r(42711),w=new a.DataFactory,T={arity:1,overloads:(0,b.declare)(d.RegularOperator.NOT).onTerm1((()=>e=>(0,b.bool)(!e.coerceEBV()))).collect()},S={arity:1,overloads:(0,b.declare)(d.RegularOperator.UPLUS).numericConverter((()=>e=>e)).collect()},O={arity:1,overloads:(0,b.declare)(d.RegularOperator.UMINUS).numericConverter((()=>e=>-e)).collect()},E={arity:2,overloads:(0,b.declare)(d.RegularOperator.MULTIPLICATION).arithmetic((()=>(e,t)=>new n.BigNumber(e).times(t).toNumber())).collect()},x={arity:2,overloads:(0,b.declare)(d.RegularOperator.DIVISION).arithmetic((()=>(e,t)=>new n.BigNumber(e).div(t).toNumber())).onBinaryTyped([p.TypeURL.XSD_INTEGER,p.TypeURL.XSD_INTEGER],(()=>(e,t)=>{if(0===t)throw new f.ExpressionError("Integer division by 0");return(0,b.decimal)(new n.BigNumber(e).div(t).toNumber())})).collect()},A={arity:2,overloads:(0,b.declare)(d.RegularOperator.ADDITION).arithmetic((()=>(e,t)=>new n.BigNumber(e).plus(t).toNumber())).set([p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateTimeLiteral((0,g.addDurationToDateTime)(e.typedValue,(0,h.defaultedDurationRepresentation)(t.typedValue))))).copy({from:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],to:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([p.TypeURL.XSD_DATE,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateLiteral((0,g.addDurationToDateTime)((0,h.defaultedDateTimeRepresentation)(e.typedValue),(0,h.defaultedDurationRepresentation)(t.typedValue))))).copy({from:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_DAY_TIME_DURATION],to:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([p.TypeURL.XSD_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.TimeLiteral((0,g.addDurationToDateTime)((0,h.defaultedDateTimeRepresentation)(e.typedValue),(0,h.defaultedDurationRepresentation)(t.typedValue))))).copy({from:[p.TypeURL.XSD_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],to:[p.TypeURL.XSD_TIME,p.TypeURL.XSD_YEAR_MONTH_DURATION]}).collect()},R={arity:2,overloads:(0,b.declare)(d.RegularOperator.SUBTRACTION).arithmetic((()=>(e,t)=>new n.BigNumber(e).minus(t).toNumber())).set([p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DATE_TIME],(({defaultTimeZone:e})=>([t,r])=>new u.DayTimeDurationLiteral((0,g.elapsedDuration)(t.typedValue,r.typedValue,e)))).copy({from:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_DATE]}).copy({from:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_TIME,p.TypeURL.XSD_TIME]}).set([p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateTimeLiteral((0,g.addDurationToDateTime)(e.typedValue,(0,h.defaultedDurationRepresentation)((0,h.negateDuration)(t.typedValue)))))).copy({from:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],to:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([p.TypeURL.XSD_DATE,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.DateLiteral((0,g.addDurationToDateTime)((0,h.defaultedDateTimeRepresentation)(e.typedValue),(0,h.defaultedDurationRepresentation)((0,h.negateDuration)(t.typedValue)))))).copy({from:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_DAY_TIME_DURATION],to:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([p.TypeURL.XSD_TIME,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>new u.TimeLiteral((0,g.addDurationToDateTime)((0,h.defaultedDateTimeRepresentation)(e.typedValue),(0,h.defaultedDurationRepresentation)((0,h.negateDuration)(t.typedValue)))))).collect()},I={arity:2,overloads:(0,b.declare)(d.RegularOperator.EQUAL).numberTest((()=>(e,t)=>e===t)).stringTest((()=>(e,t)=>0===e.localeCompare(t))).set([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>([e,t])=>(0,b.bool)(e.str()===t.str()&&e.language===t.language))).set([p.TypeAlias.SPARQL_STRINGLY,p.TypeAlias.SPARQL_STRINGLY],(()=>()=>(0,b.bool)(!1))).booleanTest((()=>(e,t)=>e===t)).dateTimeTest((({defaultTimeZone:e})=>(t,r)=>(0,h.toUTCDate)(t,e).getTime()===(0,h.toUTCDate)(r,e).getTime())).copy({from:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_DATE]}).set(["quad","quad"],(e=>([t,r])=>{const n=new m.RegularFunction(p.RegularOperator.EQUAL,I);return(0,b.bool)(n.apply([t.subject,r.subject],e).coerceEBV()&&n.apply([t.predicate,r.predicate],e).coerceEBV()&&n.apply([t.object,r.object],e).coerceEBV())}),!1).set(["term","term"],(()=>([e,t])=>(0,b.bool)(function(e,t){const r=e.toRDF(),n=t.toRDF(),i=r.equals(n);if(!i&&"Literal"===r.termType&&"Literal"===n.termType)throw new f.RDFEqualTypeError([e,t]);return i}(e,t))),!1).set([p.TypeURL.XSD_DURATION,p.TypeURL.XSD_DURATION],(()=>([e,t])=>(0,b.bool)((0,h.yearMonthDurationsToMonths)((0,h.defaultedYearMonthDurationRepresentation)(e.typedValue))===(0,h.yearMonthDurationsToMonths)((0,h.defaultedYearMonthDurationRepresentation)(t.typedValue))&&(0,h.dayTimeDurationsToSeconds)((0,h.defaultedDayTimeDurationRepresentation)(e.typedValue))===(0,h.dayTimeDurationsToSeconds)((0,h.defaultedDayTimeDurationRepresentation)(t.typedValue))))).set([p.TypeURL.XSD_TIME,p.TypeURL.XSD_TIME],(({defaultTimeZone:e})=>([t,r])=>(0,b.bool)((0,h.toUTCDate)((0,h.defaultedDateTimeRepresentation)(t.typedValue),e).getTime()===(0,h.toUTCDate)((0,h.defaultedDateTimeRepresentation)(r.typedValue),e).getTime()))).collect()},P={arity:2,overloads:(0,b.declare)(d.RegularOperator.NOT_EQUAL).set(["term","term"],(e=>([t,r])=>(0,b.bool)(!_.regularFunctions[d.RegularOperator.EQUAL].apply([t,r],e).typedValue))).collect()},N={arity:2,overloads:(0,b.declare)(d.RegularOperator.LT).numberTest((()=>(e,t)=>e(e,t)=>-1===e.localeCompare(t))).booleanTest((()=>(e,t)=>e([e,t])=>(0,b.bool)(-1===(0,y.orderTypes)(e.toRDF(),t.toRDF(),!0))),!1).dateTimeTest((({defaultTimeZone:e})=>(t,r)=>(0,h.toUTCDate)(t,e).getTime()<(0,h.toUTCDate)(r,e).getTime())).copy({from:[p.TypeURL.XSD_DATE_TIME,p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_DATE,p.TypeURL.XSD_DATE]}).set([p.TypeURL.XSD_YEAR_MONTH_DURATION,p.TypeURL.XSD_YEAR_MONTH_DURATION],(()=>([e,t])=>(0,b.bool)((0,h.yearMonthDurationsToMonths)((0,h.defaultedYearMonthDurationRepresentation)(e.typedValue))<(0,h.yearMonthDurationsToMonths)((0,h.defaultedYearMonthDurationRepresentation)(t.typedValue))))).set([p.TypeURL.XSD_DAY_TIME_DURATION,p.TypeURL.XSD_DAY_TIME_DURATION],(()=>([e,t])=>(0,b.bool)((0,h.dayTimeDurationsToSeconds)((0,h.defaultedDayTimeDurationRepresentation)(e.typedValue))<(0,h.dayTimeDurationsToSeconds)((0,h.defaultedDayTimeDurationRepresentation)(t.typedValue))))).set([p.TypeURL.XSD_TIME,p.TypeURL.XSD_TIME],(({defaultTimeZone:e})=>([t,r])=>(0,b.bool)((0,h.toUTCDate)((0,h.defaultedDateTimeRepresentation)(t.typedValue),e).getTime()<(0,h.toUTCDate)((0,h.defaultedDateTimeRepresentation)(r.typedValue),e).getTime()))).collect()},D={arity:2,overloads:(0,b.declare)(d.RegularOperator.GT).set(["term","term"],(e=>([t,r])=>_.regularFunctions[d.RegularOperator.LT].apply([r,t],e))).collect()},j={arity:2,overloads:(0,b.declare)(d.RegularOperator.LTE).set(["term","term"],(e=>([t,r])=>(0,b.bool)(_.regularFunctions[d.RegularOperator.LT].apply([t,r],e).typedValue||_.regularFunctions[d.RegularOperator.EQUAL].apply([t,r],e).typedValue))).collect()},C={arity:2,overloads:(0,b.declare)(d.RegularOperator.GTE).set(["term","term"],(e=>([t,r])=>_.regularFunctions[d.RegularOperator.LTE].apply([r,t],e))).collect()},M={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_IRI).onTerm1((()=>e=>(0,b.bool)("namedNode"===e.termType))).collect()},L={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_BLANK).onTerm1((()=>e=>(0,b.bool)("blankNode"===e.termType))).collect()},k={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_LITERAL).onTerm1((()=>e=>(0,b.bool)("literal"===e.termType))).collect()},F={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_NUMERIC).onNumeric1((()=>()=>(0,b.bool)(!0))).onTerm1((()=>()=>(0,b.bool)(!1))).collect()},B={arity:1,overloads:(0,b.declare)(d.RegularOperator.STR).onTerm1((()=>e=>(0,b.string)(e.str()))).collect()},U={arity:1,overloads:(0,b.declare)(d.RegularOperator.LANG).onLiteral1((()=>e=>(0,b.string)(e.language??""))).collect()},q={arity:1,overloads:(0,b.declare)(d.RegularOperator.DATATYPE).onLiteral1((()=>e=>new u.NamedNode(e.dataType))).collect()},V={arity:1,overloads:(0,b.declare)(d.RegularOperator.IRI).set(["namedNode"],(e=>t=>{const r=t[0],n=(0,o.resolve)(r.str(),e.baseIRI??"");return new u.NamedNode(n)})).onString1((e=>t=>{const r=(0,o.resolve)(t.str(),e.baseIRI??"");return new u.NamedNode(r)})).collect()},Q={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRDT).set([p.TypeURL.XSD_STRING,"namedNode"],(({superTypeProvider:e})=>([t,r])=>{const n=w.literal(t.typedValue,w.namedNode(r.value));return new l.TermTransformer(e).transformLiteral(n)})).collect()},$={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRLANG).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>new u.LangStringLiteral(e,t.toLowerCase()))).collect()},H={arity:0,overloads:(0,b.declare)(d.RegularOperator.UUID).set([],(()=>()=>new u.NamedNode(`urn:uuid:${c.v4()}`))).collect()},G={arity:0,overloads:(0,b.declare)(d.RegularOperator.STRUUID).set([],(()=>()=>(0,b.string)(c.v4()))).collect()},z={arity:1,overloads:(0,b.declare)(d.RegularOperator.STRLEN).onStringly1((()=>e=>(0,b.integer)([...e.typedValue].length))).collect()},K={arity:[2,3],overloads:(0,b.declare)(d.RegularOperator.SUBSTR).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_INTEGER],(()=>(e,t)=>(0,b.string)([...e].slice(t-1).join("")))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_INTEGER],(()=>(e,t)=>{const r=[...e.typedValue].slice(t.typedValue-1).join("");return(0,b.langString)(r,e.language)})).onTernaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_INTEGER,p.TypeURL.XSD_INTEGER],(()=>(e,t,r)=>(0,b.string)([...e].slice(t-1,r+t-1).join("")))).onTernary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_INTEGER,p.TypeURL.XSD_INTEGER],(()=>(e,t,r)=>{const n=[...e.typedValue].slice(t.typedValue-1,r.typedValue+t.typedValue-1).join("");return(0,b.langString)(n,e.language)})).collect()},X={arity:1,overloads:(0,b.declare)(d.RegularOperator.UCASE).onString1Typed((()=>e=>(0,b.string)(e.toUpperCase()))).onLangString1((()=>e=>(0,b.langString)(e.typedValue.toUpperCase(),e.language))).collect()},J={arity:1,overloads:(0,b.declare)(d.RegularOperator.LCASE).onString1Typed((()=>e=>(0,b.string)(e.toLowerCase()))).onLangString1((()=>e=>(0,b.langString)(e.typedValue.toLowerCase(),e.language))).collect()},W={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRSTARTS).onBinaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(e.startsWith(t)))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);return(0,b.bool)(e.typedValue.startsWith(t.typedValue))})).collect()},Y={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRENDS).onBinaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(e.endsWith(t)))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);return(0,b.bool)(e.typedValue.endsWith(t.typedValue))})).collect()},Z={arity:2,overloads:(0,b.declare)(d.RegularOperator.CONTAINS).onBinaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(e.includes(t)))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);return(0,b.bool)(e.typedValue.includes(t.typedValue))})).collect()},ee={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRBEFORE).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.string)(e.slice(0,Math.max(0,e.indexOf(t)))))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>{const[r,n]=[e.typedValue,t.typedValue],i=e.typedValue.slice(0,Math.max(0,r.indexOf(n)));return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);const[r,n]=[e.typedValue,t.typedValue],i=e.typedValue.slice(0,Math.max(0,r.indexOf(n)));return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).collect()},te={arity:2,overloads:(0,b.declare)(d.RegularOperator.STRAFTER).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.string)(e.slice(e.indexOf(t)).slice(t.length)))).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>{const[r,n]=[e.typedValue,t.typedValue],i=r.slice(r.indexOf(n)).slice(n.length);return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).onBinary([p.TypeURL.RDF_LANG_STRING,p.TypeURL.RDF_LANG_STRING],(()=>(e,t)=>{if(e.language!==t.language)throw new f.IncompatibleLanguageOperation(e,t);const[r,n]=[e.typedValue,t.typedValue],i=r.slice(r.indexOf(n)).slice(n.length);return i||!n?(0,b.langString)(i,e.language):(0,b.string)(i)})).collect()},re={arity:1,overloads:(0,b.declare)(d.RegularOperator.ENCODE_FOR_URI).onStringly1Typed((()=>e=>(0,b.string)(encodeURI(e)))).collect()},ne={arity:2,overloads:(0,b.declare)(d.RegularOperator.LANG_MATCHES).onBinaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t)=>(0,b.bool)(v.langMatches(e,t)))).collect()},ie={arity:[2,3],overloads:(0,b.declare)(d.RegularOperator.REGEX).onBinaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING],(function(){return(e,t)=>(0,b.bool)(v.matches(e,t))})).onTernaryTyped([p.TypeAlias.SPARQL_STRINGLY,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(function(){return(e,t,r)=>(0,b.bool)(v.matches(e,t,r))})).collect()},ae={arity:[3,4],overloads:(0,b.declare)(d.RegularOperator.REPLACE).onTernaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t,r)=>(0,b.string)(v.replace(e,t,r)))).set([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>([e,t,r])=>{const n=v.replace(e.typedValue,t.typedValue,r.typedValue);return(0,b.langString)(n,e.language)})).onQuaternaryTyped([p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>(e,t,r,n)=>(0,b.string)(v.replace(e,t,r,n)))).set([p.TypeURL.RDF_LANG_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING,p.TypeURL.XSD_STRING],(()=>([e,t,r,n])=>{const i=v.replace(e.typedValue,t.typedValue,r.typedValue,n.typedValue);return(0,b.langString)(i,e.language)})).collect()},oe={arity:1,overloads:(0,b.declare)(d.RegularOperator.ABS).numericConverter((()=>e=>Math.abs(e))).collect()},se={arity:1,overloads:(0,b.declare)(d.RegularOperator.ROUND).numericConverter((()=>e=>Math.round(e))).collect()},ce={arity:1,overloads:(0,b.declare)(d.RegularOperator.CEIL).numericConverter((()=>e=>Math.ceil(e))).collect()},ue={arity:1,overloads:(0,b.declare)(d.RegularOperator.FLOOR).numericConverter((()=>e=>Math.floor(e))).collect()},le={arity:0,overloads:(0,b.declare)(d.RegularOperator.RAND).set([],(()=>()=>(0,b.double)(Math.random()))).collect()},de={arity:0,overloads:(0,b.declare)(d.RegularOperator.NOW).set([],(e=>()=>new u.DateTimeLiteral((0,h.toDateTimeRepresentation)({date:e.now,timeZone:e.defaultTimeZone})))).collect()},pe={arity:1,overloads:(0,b.declare)(d.RegularOperator.YEAR).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.year))).set([p.TypeURL.XSD_DATE],(()=>([e])=>(0,b.integer)(e.typedValue.year))).collect()},he={arity:1,overloads:(0,b.declare)(d.RegularOperator.MONTH).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.month))).set([p.TypeURL.XSD_DATE],(()=>([e])=>(0,b.integer)(e.typedValue.month))).collect()},fe={arity:1,overloads:(0,b.declare)(d.RegularOperator.DAY).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.day))).set([p.TypeURL.XSD_DATE],(()=>([e])=>(0,b.integer)(e.typedValue.day))).collect()},ye={arity:1,overloads:(0,b.declare)(d.RegularOperator.HOURS).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.hours))).set([p.TypeURL.XSD_TIME],(()=>([e])=>(0,b.integer)(e.typedValue.hours))).collect()},ge={arity:1,overloads:(0,b.declare)(d.RegularOperator.MINUTES).onDateTime1((()=>e=>(0,b.integer)(e.typedValue.minutes))).set([p.TypeURL.XSD_TIME],(()=>([e])=>(0,b.integer)(e.typedValue.minutes))).collect()},me={arity:1,overloads:(0,b.declare)(d.RegularOperator.SECONDS).onDateTime1((()=>e=>(0,b.decimal)(e.typedValue.seconds))).set([p.TypeURL.XSD_TIME],(()=>([e])=>(0,b.integer)(e.typedValue.seconds))).collect()},be={arity:1,overloads:(0,b.declare)(d.RegularOperator.TIMEZONE).onDateTime1((()=>e=>{const t={hours:e.typedValue.zoneHours,minutes:e.typedValue.zoneMinutes};if(void 0===t.hours&&void 0===t.minutes)throw new f.InvalidTimezoneCall(e.str());return new u.DayTimeDurationLiteral(t)})).copy({from:[p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_DATE]}).copy({from:[p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_TIME]}).collect()},ve={arity:1,overloads:(0,b.declare)(d.RegularOperator.TZ).onDateTime1((()=>e=>(0,b.string)((0,h.extractRawTimeZone)(e.str())))).copy({from:[p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_DATE]}).copy({from:[p.TypeURL.XSD_DATE_TIME],to:[p.TypeURL.XSD_TIME]}).collect()},_e={arity:1,overloads:(0,b.declare)(d.RegularOperator.MD5).onString1Typed((()=>e=>(0,b.string)((0,s.hash)(e)))).collect()},we={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA1).onString1Typed((()=>e=>(0,b.string)((0,i.sha1)().update(e).digest("hex")))).collect()},Te={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA256).onString1Typed((()=>e=>(0,b.string)((0,i.sha256)().update(e).digest("hex")))).collect()},Se={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA384).onString1Typed((()=>e=>(0,b.string)((0,i.sha384)().update(e).digest("hex")))).collect()},Oe={arity:1,overloads:(0,b.declare)(d.RegularOperator.SHA512).onString1Typed((()=>e=>(0,b.string)((0,i.sha512)().update(e).digest("hex")))).collect()},Ee={arity:3,overloads:(0,b.declare)(d.RegularOperator.TRIPLE).onTerm3((e=>(...t)=>new u.Quad(w.quad(t[0].toRDF(),t[1].toRDF(),t[2].toRDF()),e.superTypeProvider))).collect()},xe={arity:1,overloads:(0,b.declare)(d.RegularOperator.SUBJECT).onQuad1((()=>e=>e.subject)).collect()},Ae={arity:1,overloads:(0,b.declare)(d.RegularOperator.PREDICATE).onQuad1((()=>e=>e.predicate)).collect()},Re={arity:1,overloads:(0,b.declare)(d.RegularOperator.OBJECT).onQuad1((()=>e=>e.object)).collect()},Ie={arity:1,overloads:(0,b.declare)(d.RegularOperator.IS_TRIPLE).onTerm1((()=>e=>(0,b.bool)("quad"===e.termType))).collect()};t.definitions={"!":T,uplus:S,uminus:O,"*":E,"/":x,"+":A,"-":R,"=":I,"!=":P,"<":N,">":D,"<=":j,">=":C,isiri:M,isuri:M,isblank:L,isliteral:k,isnumeric:F,str:B,lang:U,datatype:q,iri:V,uri:V,strdt:Q,strlang:$,uuid:H,struuid:G,strlen:z,substr:K,ucase:X,lcase:J,strstarts:W,strends:Y,contains:Z,strbefore:ee,strafter:te,encode_for_uri:re,langmatches:ne,regex:ie,replace:ae,abs:oe,round:se,ceil:ce,floor:ue,rand:le,now:de,year:pe,month:he,day:fe,hours:ye,minutes:ge,seconds:me,timezone:be,tz:ve,md5:_e,sha1:we,sha256:Te,sha384:Se,sha512:Oe,triple:Ee,subject:xe,predicate:Ae,object:Re,istriple:Ie}},96443:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.specialDefinitions=void 0;const n=r(84596),i=r(11269),a=r(14624),o=r(82867),s=r(63606),c=r(42711),u={arity:1,applyAsync:async({args:e,mapping:t})=>l({args:e,mapping:t}),applySynchronously:({args:e,mapping:t})=>l({args:e,mapping:t})};function l({args:e,mapping:t}){const r=e[0];if(r.expressionType!==i.ExpressionType.Variable)throw new o.InvalidArgumentTypes(e,a.SpecialOperator.BOUND);const n=t.has((0,s.expressionToVar)(r));return(0,s.bool)(n)}const d={arity:3,async applyAsync({args:e,mapping:t,evaluate:r}){const n=await r(e[0],t);return r(n.coerceEBV()?e[1]:e[2],t)},applySynchronously({args:e,mapping:t,evaluate:r}){const n=r(e[0],t);return r(n.coerceEBV()?e[1]:e[2],t)}},p={arity:Number.POSITIVE_INFINITY,async applyAsync({args:e,mapping:t,evaluate:r}){const n=[];for(const i of e)try{return await r(i,t)}catch(e){n.push(e)}throw new o.CoalesceError(n)},applySynchronously({args:e,mapping:t,evaluate:r}){const n=[];for(const i of e)try{return r(i,t)}catch(e){n.push(e)}throw new o.CoalesceError(n)}},h={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if((await r(n,t)).coerceEBV())return(0,s.bool)(!0);const e=(await r(i,t)).coerceEBV();return(0,s.bool)(e)}catch(e){if(!(await r(i,t)).coerceEBV())throw e;return(0,s.bool)(!0)}},applySynchronously({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(r(n,t).coerceEBV())return(0,s.bool)(!0);const e=r(i,t).coerceEBV();return(0,s.bool)(e)}catch(e){if(!r(i,t).coerceEBV())throw e;return(0,s.bool)(!0)}}},f={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(!(await r(n,t)).coerceEBV())return(0,s.bool)(!1);const e=(await r(i,t)).coerceEBV();return(0,s.bool)(e)}catch(e){if((await r(i,t)).coerceEBV())throw e;return(0,s.bool)(!1)}},applySynchronously({args:e,mapping:t,evaluate:r}){const[n,i]=e;try{if(!r(n,t).coerceEBV())return(0,s.bool)(!1);const e=r(i,t).coerceEBV();return(0,s.bool)(e)}catch(e){if(r(i,t).coerceEBV())throw e;return(0,s.bool)(!1)}}},y={arity:2,async applyAsync({args:e,mapping:t,evaluate:r}){const[n,i]=e.map((e=>r(e,t))),[a,o]=await Promise.all([n,i]);return(0,s.bool)(a.toRDF().equals(o.toRDF()))},applySynchronously({args:e,mapping:t,evaluate:r}){const[n,i]=e.map((e=>r(e,t)));return(0,s.bool)(n.toRDF().equals(i.toRDF()))}},g={arity:Number.POSITIVE_INFINITY,checkArity:e=>e.length>0,async applyAsync(e){const{args:t,mapping:r,evaluate:n}=e,[i,...a]=t;return m(await n(i,r),{...e,args:a},[])},applySynchronously(e){const{args:t,mapping:r,evaluate:n}=e,[i,...a]=t;return b(n(i,r),{...e,args:a},[])}};async function m(e,t,r){const{args:n,mapping:i,evaluate:u}=t;if(0===n.length)return r.every((e=>!e))?(0,s.bool)(!1):Promise.reject(new o.InError(r));try{const o=n.shift(),l=await u(o,i);return c.regularFunctions[a.RegularOperator.EQUAL].apply([e,l],t).typedValue?(0,s.bool)(!0):m(e,t,[...r,!1])}catch(n){return m(e,t,[...r,n])}}function b(e,t,r){const{args:n,mapping:i,evaluate:u}=t;if(0===n.length){if(r.every((e=>!e)))return(0,s.bool)(!1);throw new o.InError(r)}try{const o=u(n.shift(),i);return c.regularFunctions[a.RegularOperator.EQUAL].apply([e,o],t).typedValue?(0,s.bool)(!0):b(e,t,[...r,!1])}catch(n){return b(e,t,[...r,n])}}const v={arity:Number.POSITIVE_INFINITY,checkArity:e=>e.length>0,async applyAsync(e){const t=c.specialFunctions[a.SpecialOperator.IN],r=await t.applyAsync(e);return(0,s.bool)(!r.typedValue)},applySynchronously(e){const t=c.specialFunctions[a.SpecialOperator.IN].applySynchronously(e);return(0,s.bool)(!t.typedValue)}},_=(0,s.declare)(a.SpecialOperator.CONCAT).onStringly1((()=>e=>e)).collect(),w={arity:Number.POSITIVE_INFINITY,async applyAsync(e){const{args:t,mapping:r,evaluate:n,functionArgumentsCache:i,superTypeProvider:c}=e,u=t.map((async e=>n(e,r))).map((async r=>{const n=_.search([await r],c,i);if(!n)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.CONCAT);return n(e)([await r])})),l=await Promise.all(u),d=l.map((e=>e.typedValue)).join(""),p=T(l)?l[0].language:void 0;return p?(0,s.langString)(d,p):(0,s.string)(d)},applySynchronously(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:i,functionArgumentsCache:c}=e,u=t.map((e=>n(e,r))).map((r=>{const n=_.search([r],i,c);if(!n)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.CONCAT);return n(e)([r])})),l=u.map((e=>e.typedValue)).join(""),d=T(u)?u[0].language:void 0;return d?(0,s.langString)(l,d):(0,s.string)(l)}};function T(e){return e.length>0&&e.every((t=>t.language===e[0].language))}const S=(0,s.declare)(a.SpecialOperator.BNODE).onString1((()=>e=>e)).collect(),O={arity:Number.POSITIVE_INFINITY,checkArity:e=>0===e.length||1===e.length,async applyAsync(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:s,functionArgumentsCache:c}=e,u=1===t.length?await n(t[0],r):void 0;let l;if(u){const r=S.search([u],s,c);if(!r)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.BNODE);l=r(e)([u]).str()}if(e.bnode){const t=await e.bnode(l);return new i.BlankNode(t)}return E(l)},applySynchronously(e){const{args:t,mapping:r,evaluate:n,superTypeProvider:s,functionArgumentsCache:c}=e,u=1===t.length?n(t[0],r):void 0;let l;if(u){const r=S.search([u],s,c);if(!r)throw new o.InvalidArgumentTypes(t,a.SpecialOperator.BNODE);l=r(e)([u]).str()}if(e.bnode){const t=e.bnode(l);return new i.BlankNode(t)}return E(l)}};function E(e){return new i.BlankNode(e??n.v4())}t.specialDefinitions={bound:u,if:d,coalesce:p,"&&":f,"||":h,sameterm:y,in:g,notin:v,concat:w,bnode:O}},29791:(e,t)=>{"use strict";function r(e){return"*"===e}function n(e,t){return new RegExp(`/${e}/`,"iu").test(`/${t}/`)}Object.defineProperty(t,"__esModule",{value:!0}),t.langMatches=t.replace=t.matches=void 0,t.matches=function(e,t,r){return new RegExp(t,r).test(e)},t.replace=function(e,t,r,n){let i=new RegExp(t,n);return i.global||(i=new RegExp(t,`${n??""}g`)),e.replace(i,r)},t.langMatches=function(e,t){const i=e.split("-"),a=t.split("-");if(!n(a[0],i[0])&&!r(i[0]))return!1;let o=1,s=1;for(;s[e,new a.RegularFunction(e,t)]))),t.specialFunctions=Object.fromEntries(Object.entries(c.specialDefinitions).map((([e,t])=>[e,new a.SpecialFunction(e,t)]))),t.namedFunctions=Object.fromEntries(Object.entries(o.namedDefinitions).map((([e,t])=>[e,new a.NamedFunction(e,t)])));var u=r(33357);Object.defineProperty(t,"OverloadTree",{enumerable:!0,get:function(){return u.OverloadTree}})},61621:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAggregateEvaluator=t.orderTypes=t.isExpressionError=t.ExpressionError=t.AggregateEvaluator=t.SyncEvaluator=t.AsyncEvaluator=void 0;var n=r(98375);Object.defineProperty(t,"AsyncEvaluator",{enumerable:!0,get:function(){return n.AsyncEvaluator}});var i=r(86588);Object.defineProperty(t,"SyncEvaluator",{enumerable:!0,get:function(){return i.SyncEvaluator}});var a=r(19030);Object.defineProperty(t,"AggregateEvaluator",{enumerable:!0,get:function(){return a.AggregateEvaluator}});var o=r(82867);Object.defineProperty(t,"ExpressionError",{enumerable:!0,get:function(){return o.ExpressionError}}),Object.defineProperty(t,"isExpressionError",{enumerable:!0,get:function(){return o.isExpressionError}});var s=r(20236);Object.defineProperty(t,"orderTypes",{enumerable:!0,get:function(){return s.orderTypes}});var c=r(74448);Object.defineProperty(t,"AsyncAggregateEvaluator",{enumerable:!0,get:function(){return c.AsyncAggregateEvaluator}})},69119:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlgebraTransformer=void 0;const n=r(31578),i=r(11269),a=r(42711),o=r(14624),s=r(82867),c=r(82867),u=r(50363);class l extends u.TermTransformer{constructor(e){super(e.superTypeProvider),this.algebraConfig=e,this.creatorConfig={type:e.type,creator:e.creator}}transformAlgebra(e){const t=n.Algebra.expressionTypes;switch(e.expressionType){case t.TERM:return this.transformTerm(e);case t.OPERATOR:return this.transformOperator(e);case t.NAMED:return this.transformNamed(e);case t.EXISTENCE:return l.transformExistence(e);case t.AGGREGATE:return l.transformAggregate(e);case t.WILDCARD:return l.transformWildcard(e)}}static transformWildcard(e){return new i.NamedNode(e.wildcard.value)}transformOperator(e){const t=e.operator.toLowerCase();if(o.SpecialOperators.has(t)){const r=t,n=e.args.map((e=>this.transformAlgebra(e))),o=a.specialFunctions[r];if(!o.checkArity(n))throw new s.InvalidArity(n,r);return new i.SpecialOperator(n,o.applyAsync,o.applySynchronously)}if(!o.Operators.has(t))throw new s.UnknownOperator(e.operator);const r=t,n=e.args.map((e=>this.transformAlgebra(e))),c=a.regularFunctions[r];if(!l.hasCorrectArity(n,c.arity))throw new s.InvalidArity(n,r);return new i.Operator(n,(e=>c.apply(e,this.algebraConfig)))}wrapSyncFunction(e,t){return r=>{try{const t=e(r.map((e=>e.toRDF())));return this.transformRDFTermUnsafe(t)}catch(e){throw new c.ExtensionFunctionError(t,e)}}}wrapAsyncFunction(e,t){return async r=>{try{const t=await e(r.map((e=>e.toRDF())));return this.transformRDFTermUnsafe(t)}catch(e){throw new c.ExtensionFunctionError(t,e)}}}transformNamed(e){const t=e.name.value,r=e.args.map((e=>this.transformAlgebra(e)));if(o.NamedOperators.has(t)){const t=e.name.value,n=a.namedFunctions[t];return new i.Named(e.name,r,(e=>n.apply(e,this.algebraConfig)))}if("sync"===this.creatorConfig.type){const t=this.creatorConfig.creator(e.name);if(t){const n=this.wrapSyncFunction(t,e.name.value);return new i.SyncExtension(e.name,r,n)}}else{const t=this.creatorConfig.creator(e.name);if(t){const n=this.wrapAsyncFunction(t,e.name.value);return new i.AsyncExtension(e.name,r,n)}}throw new s.UnknownNamedOperator(e.name.value)}static hasCorrectArity(e,t){return Array.isArray(t)?t.includes(e.length):e.length===t}static transformAggregate(e){const t=e.aggregator;return new i.Aggregate(t,e)}static transformExistence(e){return new i.Existence(e)}}t.AlgebraTransformer=l},50363:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermTransformer=void 0;const n=r(22112),i=r(31578),a=r(11269),o=r(14624),s=r(82867),c=r(82867),u=r(17590),l=r(17590),d=r(46157);t.TermTransformer=class{constructor(e){this.superTypeProvider=e}transformRDFTermUnsafe(e){return this.transformTerm({term:e,type:i.Algebra.types.EXPRESSION,expressionType:i.Algebra.expressionTypes.TERM})}transformTerm(e){if(!e.term)throw new s.InvalidExpression(e);switch(e.term.termType){case"Variable":return new a.Variable(n.termToString(e.term));case"Literal":return this.transformLiteral(e.term);case"NamedNode":return new a.NamedNode(e.term.value);case"BlankNode":return new a.BlankNode(e.term.value);case"Quad":return new a.Quad(e.term,this.superTypeProvider);default:throw new s.InvalidTermType(e)}}transformLiteral(e){if(!e.datatype||[null,void 0,""].includes(e.datatype.value))return e.language?new a.LangStringLiteral(e.value,e.language):new a.StringLiteral(e.value);const t=e.datatype.value,r=(0,d.getSuperTypeDict)(t,this.superTypeProvider);try{if(o.TypeURL.XSD_STRING in r)return new a.StringLiteral(e.value,t);if(o.TypeURL.RDF_LANG_STRING in r)return new a.LangStringLiteral(e.value,e.language);if(o.TypeURL.XSD_YEAR_MONTH_DURATION in r)return new a.YearMonthDurationLiteral((0,u.parseYearMonthDuration)(e.value),e.value,t);if(o.TypeURL.XSD_DAY_TIME_DURATION in r)return new a.DayTimeDurationLiteral((0,u.parseDayTimeDuration)(e.value),e.value,t);if(o.TypeURL.XSD_DURATION in r)return new a.DurationLiteral((0,u.parseDuration)(e.value),e.value,t);if(o.TypeURL.XSD_DATE_TIME in r){const r=new Date(e.value);return Number.isNaN(r.getTime())?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new a.DateTimeLiteral((0,u.parseDateTime)(e.value),e.value,t)}if(o.TypeURL.XSD_DATE in r)return new a.DateLiteral((0,u.parseDate)(e.value),e.value,t);if(o.TypeURL.XSD_TIME in r)return new a.TimeLiteral((0,u.parseTime)(e.value),e.value,t);if(o.TypeURL.XSD_BOOLEAN in r)return"true"!==e.value&&"false"!==e.value&&"1"!==e.value&&"0"!==e.value?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):new a.BooleanLiteral("true"===e.value||"1"===e.value,e.value);if(o.TypeURL.XSD_DECIMAL in r){const n=l.parseXSDDecimal(e.value);return void 0===n?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):o.TypeURL.XSD_INTEGER in r?new a.IntegerLiteral(n,t,e.value):new a.DecimalLiteral(n,t,e.value)}const n=o.TypeURL.XSD_FLOAT in r,i=o.TypeURL.XSD_DOUBLE in r;if(n||i){const r=l.parseXSDFloat(e.value);return void 0===r?new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value):n?new a.FloatLiteral(r,t,e.value):new a.DoubleLiteral(r,t,e.value)}return new a.Literal(e.value,t,e.value)}catch(r){if(r instanceof Error&&(0,c.isExpressionError)(r))return new a.NonLexicalLiteral(void 0,t,this.superTypeProvider,e.value);throw r}}}},14624:(e,t)=>{"use strict";var r,n,i,a,o;Object.defineProperty(t,"__esModule",{value:!0}),t.NamedOperators=t.SetFunctions=t.SetFunction=t.Operators=t.SpecialOperators=t.RegularOperators=t.SpecialOperator=t.RegularOperator=t.TypeURL=t.TypeAlias=void 0,function(e){e.SPARQL_NUMERIC="SPARQL_NUMERIC",e.SPARQL_STRINGLY="SPARQL_STRINGLY"}(r||(t.TypeAlias=r={})),function(e){e.XSD_ANY_URI="http://www.w3.org/2001/XMLSchema#anyURI",e.XSD_STRING="http://www.w3.org/2001/XMLSchema#string",e.RDF_LANG_STRING="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",e.XSD_BOOLEAN="http://www.w3.org/2001/XMLSchema#boolean",e.XSD_DATE_TIME="http://www.w3.org/2001/XMLSchema#dateTime",e.XSD_DATE_TIME_STAMP="http://www.w3.org/2001/XMLSchema#dateTimeStamp",e.XSD_DATE="http://www.w3.org/2001/XMLSchema#date",e.XSD_G_MONTH="http://www.w3.org/2001/XMLSchema#gMonth",e.XSD_G_MONTHDAY="http://www.w3.org/2001/XMLSchema#gMonthDay",e.XSD_G_YEAR="http://www.w3.org/2001/XMLSchema#gYear",e.XSD_G_YEAR_MONTH="http://www.w3.org/2001/XMLSchema#gYearMonth",e.XSD_TIME="http://www.w3.org/2001/XMLSchema#time",e.XSD_G_DAY="http://www.w3.org/2001/XMLSchema#gDay",e.XSD_DECIMAL="http://www.w3.org/2001/XMLSchema#decimal",e.XSD_FLOAT="http://www.w3.org/2001/XMLSchema#float",e.XSD_DOUBLE="http://www.w3.org/2001/XMLSchema#double",e.XSD_INTEGER="http://www.w3.org/2001/XMLSchema#integer",e.XSD_NON_POSITIVE_INTEGER="http://www.w3.org/2001/XMLSchema#nonPositiveInteger",e.XSD_NEGATIVE_INTEGER="http://www.w3.org/2001/XMLSchema#negativeInteger",e.XSD_LONG="http://www.w3.org/2001/XMLSchema#long",e.XSD_INT="http://www.w3.org/2001/XMLSchema#int",e.XSD_SHORT="http://www.w3.org/2001/XMLSchema#short",e.XSD_BYTE="http://www.w3.org/2001/XMLSchema#byte",e.XSD_NON_NEGATIVE_INTEGER="http://www.w3.org/2001/XMLSchema#nonNegativeInteger",e.XSD_POSITIVE_INTEGER="http://www.w3.org/2001/XMLSchema#positiveInteger",e.XSD_UNSIGNED_LONG="http://www.w3.org/2001/XMLSchema#unsignedLong",e.XSD_UNSIGNED_INT="http://www.w3.org/2001/XMLSchema#unsignedInt",e.XSD_UNSIGNED_SHORT="http://www.w3.org/2001/XMLSchema#unsignedShort",e.XSD_UNSIGNED_BYTE="http://www.w3.org/2001/XMLSchema#unsignedByte",e.XSD_NORMALIZED_STRING="http://www.w3.org/2001/XMLSchema#normalizedString",e.XSD_TOKEN="http://www.w3.org/2001/XMLSchema#token",e.XSD_LANGUAGE="http://www.w3.org/2001/XMLSchema#language",e.XSD_NM_TOKEN="http://www.w3.org/2001/XMLSchema#NMTOKEN",e.XSD_NAME="http://www.w3.org/2001/XMLSchema#name",e.XSD_NC_NAME="http://www.w3.org/2001/XMLSchema#NCName",e.XSD_ENTITY="http://www.w3.org/2001/XMLSchema#ENTITY",e.XSD_ID="http://www.w3.org/2001/XMLSchema#ID",e.XSD_ID_REF="http://www.w3.org/2001/XMLSchema#IDREF",e.XSD_DURATION="http://www.w3.org/2001/XMLSchema#duration",e.XSD_YEAR_MONTH_DURATION="http://www.w3.org/2001/XMLSchema#yearMonthDuration",e.XSD_DAY_TIME_DURATION="http://www.w3.org/2001/XMLSchema#dayTimeDuration"}(n||(t.TypeURL=n={})),function(e){e.NOT="!",e.UMINUS="uminus",e.UPLUS="uplus",e.EQUAL="=",e.NOT_EQUAL="!=",e.LT="<",e.GT=">",e.LTE="<=",e.GTE=">=",e.MULTIPLICATION="*",e.DIVISION="/",e.ADDITION="+",e.SUBTRACTION="-",e.IS_IRI="isiri",e.IS_URI="isuri",e.IS_BLANK="isblank",e.IS_LITERAL="isliteral",e.IS_NUMERIC="isnumeric",e.STR="str",e.LANG="lang",e.DATATYPE="datatype",e.IRI="iri",e.URI="uri",e.STRDT="strdt",e.STRLANG="strlang",e.UUID="uuid",e.STRUUID="struuid",e.STRLEN="strlen",e.SUBSTR="substr",e.UCASE="ucase",e.LCASE="lcase",e.STRSTARTS="strstarts",e.STRENDS="strends",e.CONTAINS="contains",e.STRBEFORE="strbefore",e.STRAFTER="strafter",e.ENCODE_FOR_URI="encode_for_uri",e.LANG_MATCHES="langmatches",e.REGEX="regex",e.REPLACE="replace",e.ABS="abs",e.ROUND="round",e.CEIL="ceil",e.FLOOR="floor",e.RAND="rand",e.NOW="now",e.YEAR="year",e.MONTH="month",e.DAY="day",e.HOURS="hours",e.MINUTES="minutes",e.SECONDS="seconds",e.TIMEZONE="timezone",e.TZ="tz",e.MD5="md5",e.SHA1="sha1",e.SHA256="sha256",e.SHA384="sha384",e.SHA512="sha512",e.TRIPLE="triple",e.SUBJECT="subject",e.PREDICATE="predicate",e.OBJECT="object",e.IS_TRIPLE="istriple"}(i||(t.RegularOperator=i={})),function(e){e.BOUND="bound",e.IF="if",e.COALESCE="coalesce",e.LOGICAL_OR="||",e.LOGICAL_AND="&&",e.SAME_TERM="sameterm",e.IN="in",e.NOT_IN="notin",e.CONCAT="concat",e.BNODE="bnode"}(a||(t.SpecialOperator=a={})),t.RegularOperators=new Set(Object.values(i)),t.SpecialOperators=new Set(Object.values(a)),t.Operators=new Set([...t.RegularOperators,...t.SpecialOperators]),function(e){e.COUNT="count",e.SUM="sum",e.MIN="min",e.MAX="max",e.AVG="avg",e.GROUP_CONCAT="group_concat",e.SAMPLE="sample"}(o||(t.SetFunction=o={})),t.SetFunctions=new Set(Object.values(o)),t.NamedOperators=new Set([n.XSD_STRING,n.XSD_FLOAT,n.XSD_DOUBLE,n.XSD_DECIMAL,n.XSD_INTEGER,n.XSD_DATE_TIME,n.XSD_DATE,n.XSD_BOOLEAN,n.XSD_TIME,n.XSD_DURATION,n.XSD_DAY_TIME_DURATION,n.XSD_YEAR_MONTH_DURATION])},76660:(e,t)=>{"use strict";function r(e){return{day:e.day??0,hours:e.hours??0,minutes:e.minutes??0,seconds:e.seconds??0}}function n(e){return{year:e.year??0,month:e.month??0}}function i(e){return{...r(e),...n(e)}}function a(e){return{...e,day:e.day??1,hours:e.hours??0,month:e.month??1,year:e.year??0,seconds:e.seconds??0,minutes:e.minutes??0}}function o(e){const t=new Date(e.year,e.month-1,e.day,e.hours,e.minutes,Math.trunc(e.seconds),e.seconds%1*1e3);if(e.year>=0&&e.year<100){const e=1900;t.setFullYear(t.getFullYear()-e)}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.extractTimeZone=t.extractRawTimeZone=t.dayTimeDurationsToSeconds=t.yearMonthDurationsToMonths=t.trimToDayTimeDuration=t.trimToYearMonthDuration=t.toUTCDate=t.toJSDate=t.negateDuration=t.toDateTimeRepresentation=t.defaultedDateTimeRepresentation=t.simplifyDurationRepresentation=t.defaultedDurationRepresentation=t.defaultedYearMonthDurationRepresentation=t.defaultedDayTimeDurationRepresentation=void 0,t.defaultedDayTimeDurationRepresentation=r,t.defaultedYearMonthDurationRepresentation=n,t.defaultedDurationRepresentation=i,t.simplifyDurationRepresentation=function(e){const t=i(e),r={},n=t.year+Math.trunc(t.month/12);n&&(r.year=n,t.month%=12),t.month&&(r.month=t.month);const a=t.day+Math.trunc(t.hours/24)+Math.trunc(t.minutes/1440)+Math.trunc(t.seconds/86400);a&&(r.day=a,t.hours%=24,t.minutes%=1440,t.seconds%=86400);const o=t.hours+Math.trunc(t.minutes/60)+Math.trunc(t.seconds/3600);o&&(r.hours=o,t.minutes%=60,t.seconds%=3600);const s=t.minutes+Math.trunc(t.seconds/60);return s&&(r.minutes=s,t.seconds%=60),t.seconds&&(r.seconds=t.seconds),r},t.defaultedDateTimeRepresentation=a,t.toDateTimeRepresentation=function({date:e,timeZone:t}){return{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate(),hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds(),zoneHours:t.zoneHours,zoneMinutes:t.zoneMinutes}},t.negateDuration=function(e){return{year:void 0===e.year?void 0:-1*e.year,month:void 0===e.month?void 0:-1*e.month,day:void 0===e.day?void 0:-1*e.day,hours:void 0===e.hours?void 0:-1*e.hours,minutes:void 0===e.minutes?void 0:-1*e.minutes,seconds:void 0===e.seconds?void 0:-1*e.seconds}},t.toJSDate=o,t.toUTCDate=function(e,t){const r=o(a(e)),n=r.getTimezoneOffset(),i=e.zoneHours??t.zoneHours,s=e.zoneMinutes??t.zoneMinutes;return new Date(r.getTime()-60*(n+60*i+s)*1e3)},t.trimToYearMonthDuration=function(e){return{year:e.year,month:e.month}},t.trimToDayTimeDuration=function(e){return{day:e.day,hours:e.hours,minutes:e.minutes,seconds:e.seconds}},t.yearMonthDurationsToMonths=function(e){return 12*e.year+e.month},t.dayTimeDurationsToSeconds=function(e){return 60*(60*(24*e.day+e.hours)+e.minutes)+e.seconds},t.extractRawTimeZone=function(e){return/(Z|([+-]\d\d:\d\d))?$/u.exec(e)[0]},t.extractTimeZone=function(e){return{zoneHours:e.getTimezoneOffset()/60,zoneMinutes:e.getTimezoneOffset()%60}}},82867:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NoExistenceHook=t.NoAggregator=t.ExtensionFunctionError=t.UnknownNamedOperator=t.UnknownOperator=t.InvalidTermType=t.InvalidExpressionType=t.InvalidExpression=t.InvalidArity=t.UnexpectedError=t.ParseError=t.EmptyAggregateError=t.IncompatibleLanguageOperation=t.InvalidTimezoneCall=t.CastError=t.InvalidCompareArgumentTypes=t.InvalidArgumentTypes=t.InError=t.CoalesceError=t.RDFEqualTypeError=t.EBVCoercionError=t.UnboundVariableError=t.InvalidLexicalForm=t.isExpressionError=t.ExpressionError=void 0;class r extends Error{}t.ExpressionError=r,t.isExpressionError=function(e){return e instanceof r},t.InvalidLexicalForm=class extends r{constructor(e){super(`Invalid lexical form '${h(e)}'`),this.arg=e}},t.UnboundVariableError=class extends r{constructor(e,t){super(`Unbound variable '${h(e)}'`),this.variable=e,this.bindings=t}},t.EBVCoercionError=class extends r{constructor(e){super(`Cannot coerce term to EBV '${h(e)}'`),this.arg=e}},t.RDFEqualTypeError=class extends r{constructor(e){super("Equality test for literals with unsupported datatypes"),this.args=e}},t.CoalesceError=class extends r{constructor(e){super("All COALESCE arguments threw errors"),this.errors=e}},t.InError=class extends r{constructor(e){super(`Some argument to IN errorred and none where equal. ${e.map((e=>`(${e.toString()}) `)).join("and ")}`),this.errors=e}},t.InvalidArgumentTypes=class extends r{constructor(e,t){super(`Argument types not valid for operator: '${h(t)}' with '${h(e)}`),this.args=e,this.op=t}},t.InvalidCompareArgumentTypes=class extends r{constructor(e,t){super(`Compared argument types are supported: '${e.termType}' and '${t.termType}'`),this.arg0=e,this.arg1=t}},t.CastError=class extends r{constructor(e,t){super(`Invalid cast: '${h(e)}' to '${h(t)}'`),this.arg=e}},t.InvalidTimezoneCall=class extends r{constructor(e){super(`TIMEZONE call on ${e} which has no timezone`),this.dateString=e}},t.IncompatibleLanguageOperation=class extends r{constructor(e,t){super(`Operation on incompatible language literals '${h(e)}' and '${h(t)}'`),this.arg1=e,this.arg2=t}},t.EmptyAggregateError=class extends r{constructor(){super("Empty aggregate expression")}},t.ParseError=class extends r{constructor(e,t){super(`Failed to parse ${e} as ${t}.`)}};class n extends Error{constructor(e,t){super(`Programmer Error '${e}'`),this.payload=t}}t.UnexpectedError=n;class i extends Error{constructor(e,t){super(`The number of args does not match the arity of the operator '${h(t)}'.`),this.args=e,this.op=t}}t.InvalidArity=i;class a extends Error{constructor(e){super(`Invalid SPARQL Expression '${h(e)}'`)}}t.InvalidExpression=a;class o extends Error{constructor(e){super(`Invalid expression type for SPARQL Expression '${h(e)}'`),this.expr=e}}t.InvalidExpressionType=o;class s extends Error{constructor(e){super(`Invalid term type for term '${h(e)}'`),this.term=e}}t.InvalidTermType=s;class c extends Error{constructor(e){super(`Unknown operator: '${h(e)}`)}}t.UnknownOperator=c;class u extends Error{constructor(e){super(`Unknown named operator: '${h(e)}'`)}}t.UnknownNamedOperator=u;class l extends Error{constructor(e,t){t instanceof Error?super(`Error thrown in ${e}: ${t.message}${t.stack?`\n${t.stack}`:""}`):super(`Error thrown in ${e}`)}}t.ExtensionFunctionError=l;class d extends Error{constructor(e){super(`Aggregate expression ${h(e)} found, but no aggregate hook provided.`)}}t.NoAggregator=d;class p extends Error{constructor(){super("EXISTS found, but no existence hook provided.")}}function h(e){return JSON.stringify(e)}t.NoExistenceHook=p},20236:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.orderTypes=void 0;const n=r(35069),i=r(42711),a=r(50363),o=r(14624),s=r(82867);function c(e,t){return e===t?0:e"term"),cache:s??new n.LRUCache({max:1e3})},defaultTimeZone:{zoneHours:0,zoneMinutes:0}},p=new a.TermTransformer(d.superTypeProvider),h=p.transformLiteral(e),f=p.transformLiteral(t);try{return l.apply([h,f],d).typedValue?0:u.apply([h,f],d).typedValue?1:-1}catch{const e=c(h.dataType,f.dataType);return 0!==e?e:c(h.str(),f.str())}}(t,r,d,p);if(l)throw new s.InvalidCompareArgumentTypes(t,r);return c(t.value,r.value)};const u={Variable:0,BlankNode:1,NamedNode:2,Literal:3,Quad:4,DefaultGraph:5}},17590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseDayTimeDuration=t.parseYearMonthDuration=t.parseDuration=t.parseTime=t.parseDate=t.parseDateTime=t.parseXSDInteger=t.parseXSDDecimal=t.parseXSDFloat=void 0;const n=r(76660),i=r(82867),a=r(66487);function o(e){if(""===e)return{zoneHours:void 0,zoneMinutes:void 0};if("Z"===e)return{zoneHours:0,zoneMinutes:0};const t=e.replaceAll(/^([+|-])(\d\d):(\d\d)$/gu,"$11!$2!$3").split("!").map(Number);return{zoneHours:t[0]*t[1],zoneMinutes:t[0]*t[2]}}function s(e){const t=e.replaceAll(/^(-)?([123456789]*\d{4})-(\d\d)-(\d\d)(Z|([+-]\d\d:\d\d))?$/gu,"$11!$2!$3!$4!$5");if(t===e)throw new i.ParseError(e,"date");const r=t.split("!"),n=r.slice(0,-1).map(Number),s={year:n[0]*n[1],month:n[2],day:n[3],...o(r[4])};if(!(s.month>=1&&s.month<=12&&s.day>=1&&s.day<=(0,a.maximumDayInMonthFor)(s.year,s.month)))throw new i.ParseError(e,"date");return s}function c(e){const t=e.replaceAll(/^(\d\d):(\d\d):(\d\d(\.\d+)?)(Z|([+-]\d\d:\d\d))?$/gu,"$1!$2!$3!$5");if(t===e)throw new i.ParseError(e,"time");const r=t.split("!"),n=r.slice(0,-1).map(Number),a={hours:n[0],minutes:n[1],seconds:n[2],...o(r[3])};if(a.seconds>=60||a.minutes>=60||a.hours>24||24===a.hours&&(0!==a.minutes||0!==a.seconds))throw new i.ParseError(e,"time");return a}function u(e){const[t,r]=e.split("T"),a=t.replaceAll(/^(-)?P(\d+Y)?(\d+M)?(\d+D)?$/gu,"$11S!$2!$3!$4");if(a===t)throw new i.ParseError(e,"duration");const o=a.split("!");if(void 0!==r){const t=r.replaceAll(/^(\d+H)?(\d+M)?(\d+(\.\d+)?S)?$/gu,"$1!$2!$3");if(""===r||r===t)throw new i.ParseError(e,"duration");o.push(...t.split("!"))}const s=o.map((e=>e.slice(0,-1)));if(!s.slice(1).some(Boolean))throw new i.ParseError(e,"duration");const c=Number(s[0]);return(0,n.simplifyDurationRepresentation)({year:s[1]?c*Number(s[1]):void 0,month:s[2]?c*Number(s[2]):void 0,day:s[3]?c*Number(s[3]):void 0,hours:s[4]?c*Number(s[4]):void 0,minutes:s[5]?c*Number(s[5]):void 0,seconds:s[6]?c*Number(s[6]):void 0})}t.parseXSDFloat=function(e){const t=Number(e);return Number.isNaN(t)?"NaN"===e?Number.NaN:"INF"===e||"+INF"===e?Number.POSITIVE_INFINITY:"-INF"===e?Number.NEGATIVE_INFINITY:void 0:t},t.parseXSDDecimal=function(e){const t=Number(e);return Number.isNaN(t)?void 0:t},t.parseXSDInteger=function(e){const t=Number.parseInt(e,10);return Number.isNaN(t)?void 0:t},t.parseDateTime=function(e){const[t,r]=e.split("T");return{...s(t),...c(r)}},t.parseDate=s,t.parseTime=function(e){const t=c(e);return t.hours%=24,t},t.parseDuration=u,t.parseYearMonthDuration=function(e){const t=u(e);if(["hours","minutes","seconds","day"].some((e=>Boolean(t[e]))))throw new i.ParseError(e,"yearMonthDuration");return t},t.parseDayTimeDuration=function(e){const t=u(e);if(["year","month"].some((e=>Boolean(t[e]))))throw new i.ParseError(e,"dayTimeDuration");return t}},19002:(e,t)=>{"use strict";function r(e,t=2){return e.toLocaleString(void 0,{minimumIntegerDigits:t,useGrouping:!1})}function n(e){return void 0===e.zoneHours||void 0===e.zoneMinutes?"":0===e.zoneHours&&0===e.zoneMinutes?"Z":`${e.zoneHours>=0?`+${r(e.zoneHours)}`:r(e.zoneHours)}:${r(Math.abs(e.zoneMinutes))}`}function i(e){return`${r(e.year,4)}-${r(e.month)}-${r(e.day)}${n(e)}`}function a(e){return`${r(e.hours)}:${r(e.minutes)}:${r(e.seconds)}${n(e)}`}Object.defineProperty(t,"__esModule",{value:!0}),t.serializeDuration=t.serializeTime=t.serializeDate=t.serializeDateTime=void 0,t.serializeDateTime=function(e){return`${i({year:e.year,month:e.month,day:e.day})}T${a(e)}`},t.serializeDate=i,t.serializeTime=a,t.serializeDuration=function(e,t="PT0S"){if(!Object.values(e).some((e=>0!==(e||0))))return t;const r=`${Object.values(e).some((e=>(e||0)<0))?"-":""}P${e.year?`${Math.abs(e.year)}Y`:""}${e.month?`${Math.abs(e.month)}M`:""}${e.day?`${Math.abs(e.day)}D`:""}`;return e.hours||e.minutes||e.seconds?`${r}T${e.hours?`${Math.abs(e.hours)}H`:""}${e.minutes?`${Math.abs(e.minutes)}M`:""}${e.seconds?`${Math.abs(e.seconds)}S`:""}`:r}},66487:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elapsedDuration=t.addDurationToDateTime=t.maximumDayInMonthFor=void 0;const n=r(76660);function i(e,t,r=0){const n=e-r,i=t-r,a=Math.floor(n/i);return{intDiv:a,remainder:e-a*i}}function a(e,t){const{intDiv:r,remainder:n}=i(t,13,1),a=e+r;return[1,3,5,7,8,10,12].includes(n)?31:[4,6,9,11].includes(n)?30:2===n&&(0===i(a,400).remainder||0!==i(a,100).remainder&&0===i(a,4).remainder)?29:28}t.maximumDayInMonthFor=a,t.addDurationToDateTime=function(e,t){const r={...e};let n=i(e.month+t.month,13,1);for(r.month=n.remainder,r.year=e.year+t.year+n.intDiv,n=i(e.seconds+t.seconds,60),r.seconds=n.remainder,n=i(e.minutes+t.minutes+n.intDiv,60),r.minutes=n.remainder,n=i(e.hours+t.hours+n.intDiv,24),r.hours=n.remainder,r.day=e.day+t.day+n.intDiv;;){let e;if(r.day<1)r.day+=a(r.year,r.month-1),e=-1;else{if(!(r.day>a(r.year,r.month)))break;r.day-=a(r.year,r.month),e=1}n=i(r.month+e,13,1),r.month=n.remainder,r.year+=n.intDiv}return r},t.elapsedDuration=function(e,t,r){const i=(0,n.toUTCDate)(e,r),a=(0,n.toUTCDate)(t,r),o=i.getTime()-a.getTime();return{day:Math.floor(o/864e5),hours:Math.floor(o%864e5/36e5),minutes:Math.floor(o%36e5/6e4),seconds:o%6e4}}},46157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.typePromotion=t.isSubTypeOf=t.getSuperTypeDict=t.isInternalSubType=t.asGeneralType=t.asOverrideType=t.asKnownLiteralType=t.asTypeAlias=t.typeAliasCheck=t.extensionTableInit=t.getSuperTypes=t.superTypeDictTable=t.extensionTableInput=void 0;const n=r(11269),i=r(63606),a=r(14624);function o(e,r){const n=r.cache.get(e);if(n)return n;const i=r.discoverer(e);if("term"===i){const t=Object.create(null);return t.__depth=0,t[e]=0,r.cache.set(e,t),t}let a;const s=u(i);return a=s?{...t.superTypeDictTable[s]}:{...o(i,r)},a.__depth++,a[e]=a.__depth,r.cache.set(e,a),a}function s(){for(const[e,r]of Object.entries(t.extensionTableInput)){const n=e;t.superTypeDictTable[n]||c(n,r,t.superTypeDictTable)}}function c(e,r,n){if("term"===r||void 0===r){const t=Object.create(null);return t.__depth=0,t[e]=0,void(n[e]=t)}n[r]||c(r,t.extensionTableInput[r],n),n[e]={...n[r],[e]:n[r].__depth+1,__depth:n[r].__depth+1}}function u(e){if(e in t.superTypeDictTable)return e}function l(e,r){const n=u(e);return n?t.superTypeDictTable[n]:o(e,r)}t.extensionTableInput={[a.TypeURL.XSD_DATE_TIME_STAMP]:a.TypeURL.XSD_DATE_TIME,[a.TypeURL.XSD_DAY_TIME_DURATION]:a.TypeURL.XSD_DURATION,[a.TypeURL.XSD_YEAR_MONTH_DURATION]:a.TypeURL.XSD_DURATION,[a.TypeURL.RDF_LANG_STRING]:a.TypeAlias.SPARQL_STRINGLY,[a.TypeURL.XSD_STRING]:a.TypeAlias.SPARQL_STRINGLY,[a.TypeURL.XSD_NORMALIZED_STRING]:a.TypeURL.XSD_STRING,[a.TypeURL.XSD_TOKEN]:a.TypeURL.XSD_NORMALIZED_STRING,[a.TypeURL.XSD_LANGUAGE]:a.TypeURL.XSD_TOKEN,[a.TypeURL.XSD_NM_TOKEN]:a.TypeURL.XSD_TOKEN,[a.TypeURL.XSD_NAME]:a.TypeURL.XSD_TOKEN,[a.TypeURL.XSD_NC_NAME]:a.TypeURL.XSD_NAME,[a.TypeURL.XSD_ENTITY]:a.TypeURL.XSD_NC_NAME,[a.TypeURL.XSD_ID]:a.TypeURL.XSD_NC_NAME,[a.TypeURL.XSD_ID_REF]:a.TypeURL.XSD_NC_NAME,[a.TypeURL.XSD_DOUBLE]:a.TypeAlias.SPARQL_NUMERIC,[a.TypeURL.XSD_FLOAT]:a.TypeAlias.SPARQL_NUMERIC,[a.TypeURL.XSD_DECIMAL]:a.TypeAlias.SPARQL_NUMERIC,[a.TypeURL.XSD_INTEGER]:a.TypeURL.XSD_DECIMAL,[a.TypeURL.XSD_NON_POSITIVE_INTEGER]:a.TypeURL.XSD_INTEGER,[a.TypeURL.XSD_NEGATIVE_INTEGER]:a.TypeURL.XSD_NON_POSITIVE_INTEGER,[a.TypeURL.XSD_LONG]:a.TypeURL.XSD_INTEGER,[a.TypeURL.XSD_INT]:a.TypeURL.XSD_LONG,[a.TypeURL.XSD_SHORT]:a.TypeURL.XSD_INT,[a.TypeURL.XSD_BYTE]:a.TypeURL.XSD_SHORT,[a.TypeURL.XSD_NON_NEGATIVE_INTEGER]:a.TypeURL.XSD_INTEGER,[a.TypeURL.XSD_POSITIVE_INTEGER]:a.TypeURL.XSD_NON_NEGATIVE_INTEGER,[a.TypeURL.XSD_UNSIGNED_LONG]:a.TypeURL.XSD_NON_NEGATIVE_INTEGER,[a.TypeURL.XSD_UNSIGNED_INT]:a.TypeURL.XSD_UNSIGNED_LONG,[a.TypeURL.XSD_UNSIGNED_SHORT]:a.TypeURL.XSD_UNSIGNED_INT,[a.TypeURL.XSD_UNSIGNED_BYTE]:a.TypeURL.XSD_UNSIGNED_SHORT,[a.TypeURL.XSD_DATE_TIME]:"term",[a.TypeURL.XSD_BOOLEAN]:"term",[a.TypeURL.XSD_DATE]:"term",[a.TypeURL.XSD_G_MONTH]:"term",[a.TypeURL.XSD_G_MONTHDAY]:"term",[a.TypeURL.XSD_G_YEAR]:"term",[a.TypeURL.XSD_G_YEAR_MONTH]:"term",[a.TypeURL.XSD_TIME]:"term",[a.TypeURL.XSD_G_DAY]:"term",[a.TypeURL.XSD_DURATION]:"term",[a.TypeAlias.SPARQL_NUMERIC]:"term",[a.TypeAlias.SPARQL_STRINGLY]:"term",[a.TypeURL.XSD_ANY_URI]:"term"},t.superTypeDictTable=Object.create(null),t.getSuperTypes=o,t.extensionTableInit=s,s(),t.typeAliasCheck=Object.create(null),function(){for(const e of Object.values(a.TypeAlias))t.typeAliasCheck[e]=!0}(),t.asTypeAlias=function(e){if(e in t.typeAliasCheck)return e},t.asKnownLiteralType=u,t.asOverrideType=function(e){if(u(e)??"term"===e)return e},t.asGeneralType=function(e){if("term"===e||(0,n.asTermType)(e))return e},t.isInternalSubType=function(e,r){return"term"!==e&&t.superTypeDictTable[e]&&void 0!==t.superTypeDictTable[e][r]},t.getSuperTypeDict=l,t.isSubTypeOf=function(e,t,r){return"term"!==e&&void 0!==l(e,r)[t]},t.typePromotion={[a.TypeURL.XSD_STRING]:[{typeToPromote:a.TypeURL.XSD_ANY_URI,conversionFunction:e=>(0,i.string)(e.str())}],[a.TypeURL.XSD_DOUBLE]:[{typeToPromote:a.TypeURL.XSD_FLOAT,conversionFunction:e=>(0,i.double)(e.typedValue)},{typeToPromote:a.TypeURL.XSD_DECIMAL,conversionFunction:e=>(0,i.double)(e.typedValue)}],[a.TypeURL.XSD_FLOAT]:[{typeToPromote:a.TypeURL.XSD_DECIMAL,conversionFunction:e=>(0,i.float)(e.typedValue)}]}},71448:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerVoid=void 0;const n=r(52640);class i extends n.Logger{debug(){}error(){}fatal(){}info(){}trace(){}warn(){}}t.LoggerVoid=i},5868:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(71448),t)},8008:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorAll=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e)}async mediate(e){const t=[];let r;try{r=this.publish(e)}catch{r=[]}for(const e of r)try{await e.reply,t.push(e.actor)}catch{}return(await Promise.all(t.map((t=>t.runObservable(e)))))[0]}async mediateWith(){throw new Error("Unsupported operation: MediatorAll#mediateWith")}}t.MediatorAll=i},48284:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(8008),t)},38123:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorCombinePipeline=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e)}async mediate(e){let t;try{t=this.publish(e)}catch{return e}if(this.filterErrors){const e=[];for(const r of t)try{await r.reply,e.push(r)}catch{}t=e}if(t=await Promise.all(t.map((async({actor:e,reply:t})=>({actor:e,reply:await t})))),this.order){const e=e=>{const t=this.field?e[this.field]:e;if("number"!=typeof t)throw new TypeError("Cannot order elements that are not numbers.");return t};t=t.sort(((t,r)=>("increasing"===this.order?1:-1)*(e(t.reply)-e(r.reply))))}let r=e;for(const{actor:e}of t)r={...r,...await e.runObservable(r)};return r}mediateWith(){throw new Error("Method not supported.")}}t.MediatorCombinePipeline=i},30827:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(38123),t)},79559:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorCombineUnion=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e),this.combiner=this.createCombiner()}async mediate(e){let t;try{t=this.publish(e)}catch{t=[]}if(this.filterErrors){const e=[];for(const r of t)try{await r.reply,e.push(r)}catch{}t=e}await Promise.all(t.map((({reply:e})=>e)));const r=await Promise.all(t.map((t=>t.actor.runObservable(e))));return this.combiner(r)}mediateWith(){throw new Error("Method not supported.")}createCombiner(){return e=>{const t={};return t[this.field]={},[{}].concat(e.map((e=>e[this.field]))).forEach((e=>{t[this.field]={...e,...t[this.field]}})),t}}}t.MediatorCombineUnion=i},75884:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(79559),t)},63850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorJoinCoefficientsFixed=void 0;const n=r(32227),i=r(34368);class a extends i.Mediator{constructor(e){super(e)}async mediateWith(e,t){const r=[],a=t.map((({reply:e})=>e)).map((e=>e.catch((e=>{r.push(e)})))),o=await Promise.all(a);let s=o.map((e=>{if(e)return e.iterations*this.cpuWeight+e.persistedItems*this.memoryWeight+e.blockingItems*this.timeWeight+e.requestTime*this.ioWeight}));const c=Math.max(...s.filter((e=>void 0!==e))),u=e.context.get(n.KeysQueryOperation.limitIndicator);u&&(s=s.map(((e,t)=>void 0!==e&&o[t].blockingItems>0&&o[t].iterations>u?e+c:e)));let l=-1,d=Number.POSITIVE_INFINITY;for(const[e,t]of s.entries())void 0!==t&&(-1===l||te.message)).join("\n")}`);const p=t[l].actor;return p.includeInLogs&&i.Actor.getContextLogger(e.context)?.debug(`Determined physical join operator '${p.logicalType}-${p.physicalName}'`,{entries:e.entries.length,variables:await Promise.all(e.entries.map((async e=>(await e.output.metadata()).variables.map((e=>e.value))))),costs:Object.fromEntries(s.map(((e,r)=>[`${t[r].actor.logicalType}-${t[r].actor.physicalName}`,e])).filter((e=>void 0!==e[1]))),coefficients:Object.fromEntries(o.map(((e,r)=>[`${t[r].actor.logicalType}-${t[r].actor.physicalName}`,e])).filter((e=>void 0!==e[1])))}),p}}t.MediatorJoinCoefficientsFixed=a},8309:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(63850),t)},55614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorNumber=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e),this.indexPicker=this.createIndexPicker()}createIndexPicker(){switch(this.type){case"min":return e=>e.reduce(((e,t,r)=>{const n=this.getOrDefault(t[this.field],Number.POSITIVE_INFINITY);return null!==n&&(Number.isNaN(e[0])||e[0]>n)?[n,r]:e}),[Number.NaN,-1])[1];case"max":return e=>e.reduce(((e,t,r)=>{const n=this.getOrDefault(t[this.field],Number.NEGATIVE_INFINITY);return null!==n&&(Number.isNaN(e[0])||e[0]e));const n=[];if(this.ignoreErrors){const e={};e[this.field]=null,r=r.map((t=>t.catch((t=>(n.push(t),e)))))}const i=await Promise.all(r),a=this.indexPicker(i);if(a<0)throw new Error(`All actors rejected their test in ${this.name}\n${n.map((e=>e.message)).join("\n")}`);return t[a].actor}}t.MediatorNumber=i},99104:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(55614),t)},41426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MediatorRace=void 0;const n=r(34368);class i extends n.Mediator{constructor(e){super(e)}mediateWith(e,t){return new Promise(((e,r)=>{const n=[];for(const i of t)i.reply.then((()=>{e(i.actor)})).catch((e=>{n.push(e),n.length===t.length&&r(new Error(`${this.name} mediated over all rejecting actors:\n${n.map((e=>e.message)).join("\n")}`))}))}))}}t.MediatorRace=i},25896:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(41426),t)},85849:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataValidationState=void 0,t.MetadataValidationState=class{constructor(){this.invalidateListeners=[],this.valid=!0}addInvalidateListener(e){this.invalidateListeners.push(e)}invalidate(){if(this.valid){this.valid=!1;for(const e of this.invalidateListeners)e()}}}},48187:(e,t)=>{"use strict";function r(e){for(const t of["cardinality"])if(!(t in e))throw new Error(`Invalid metadata: missing ${t} in ${JSON.stringify(e)}`);return e}function n(e){for(const t of["cardinality","canContainUndefs","variables"])if(!(t in e))throw new Error(`Invalid metadata: missing ${t} in ${JSON.stringify(e)}`);return e}function i(e){let t;return()=>(t||(t=e(),t.then((e=>e.state.addInvalidateListener((()=>{t=void 0})))).catch((()=>{}))),t)}Object.defineProperty(t,"__esModule",{value:!0}),t.cachifyMetadata=t.validateMetadataBindings=t.validateMetadataQuads=t.getMetadataBindings=t.getMetadataQuads=void 0,t.getMetadataQuads=function(e){return i((()=>new Promise(((t,r)=>{e.getProperty("metadata",(e=>t(e))),e.on("error",r)})).then((e=>r(e)))))},t.getMetadataBindings=function(e){return i((()=>new Promise(((t,r)=>{e.getProperty("metadata",(e=>t(e))),e.on("error",r)})).then((e=>("canContainUndefs"in e||(e.canContainUndefs=!1),n(e))))))},t.validateMetadataQuads=r,t.validateMetadataBindings=n,t.cachifyMetadata=i},72394:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(85849),t),i(r(48187),t)},66072:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},90522:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},54973:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},70650:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},92955:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},66143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},22170:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6379:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},78615:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},60552:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},34989:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},50199:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},15278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},16382:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;class r{static getLevelOrdinal(e){return r.LEVELS[e]}}t.Logger=r,r.LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5}},52640:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(66072),t),i(r(90522),t),i(r(54973),t),i(r(70650),t),i(r(92955),t),i(r(66143),t),i(r(22170),t),i(r(6379),t),i(r(78615),t),i(r(60552),t),i(r(34989),t),i(r(50199),t),i(r(15278),t),i(r(16382),t)},7991:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,a=s(e),o=a[0],c=a[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,c)),l=0,d=c>0?o-4:o;for(r=0;r>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[l++]=255&t),1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;su?u:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function s(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 c(e,t,n){for(var i,a,o=[],s=t;s>18&63]+r[a>>12&63]+r[a>>6&63]+r[63&a]);return o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},55553:function(e,t,r){var n;!function(i){"use strict";var a,o=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,c=Math.floor,u="[BigNumber Error] ",l=u+"Number primitive has more than 15 significant digits: ",d=1e14,p=14,h=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],y=1e7,g=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function b(e){for(var t,r,n=1,i=e.length,a=e[0]+"";nu^r?1:-1;for(s=(c=i.length)<(u=a.length)?c:u,o=0;oa[o]^r?1:-1;return c==u?0:c>u^r?1:-1}function _(e,t,r,n){if(er||e!==c(e))throw Error(u+(n||"Argument")+("number"==typeof e?er?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return m(e.e/p)==t&&e.c[t]%2!=0}function T(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function S(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else tk?m.c=m.e=null:e.e=10;d/=10,u++);return void(u>k?m.c=m.e=null:(m.e=u,m.c=[e]))}g=String(e)}else{if(!o.test(g=String(e)))return i(m,g,f);m.s=45==g.charCodeAt(0)?(g=g.slice(1),-1):1}(u=g.indexOf("."))>-1&&(g=g.replace(".","")),(d=g.search(/e/i))>0?(u<0&&(u=d),u+=+g.slice(d+1),g=g.substring(0,d)):u<0&&(u=g.length)}else{if(_(t,2,V.length,"Base"),10==t&&Q)return K(m=new $(e),D+m.e+1,j);if(g=String(e),f="number"==typeof e){if(0*e!=0)return i(m,g,f,t);if(m.s=1/e<0?(g=g.slice(1),-1):1,$.DEBUG&&g.replace(/^0\.0*|\./,"").length>15)throw Error(l+e)}else m.s=45===g.charCodeAt(0)?(g=g.slice(1),-1):1;for(r=V.slice(0,t),u=d=0,y=g.length;du){u=y;continue}}else if(!s&&(g==g.toUpperCase()&&(g=g.toLowerCase())||g==g.toLowerCase()&&(g=g.toUpperCase()))){s=!0,d=-1,u=0;continue}return i(m,String(e),f,t)}f=!1,(u=(g=n(g,t,10,m.s)).indexOf("."))>-1?g=g.replace(".",""):u=g.length}for(d=0;48===g.charCodeAt(d);d++);for(y=g.length;48===g.charCodeAt(--y););if(g=g.slice(d,++y)){if(y-=d,f&&$.DEBUG&&y>15&&(e>h||e!==c(e)))throw Error(l+m.s*e);if((u=u-d-1)>k)m.c=m.e=null;else if(u=M)?T(c,o):S(c,o,"0");else if(a=(e=K(new $(e),t,r)).e,s=(c=b(e.c)).length,1==n||2==n&&(t<=a||a<=C)){for(;ss){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=a-s)>0)for(a+1==s&&(c+=".");t--;c+="0");return e.s<0&&i?"-"+c:c}function G(e,t){for(var r,n,i=1,a=new $(e[0]);i=10;i/=10,n++);return(r=n+r*p-1)>k?e.c=e.e=null:r=10;u/=10,i++);if((a=t-i)<0)a+=p,o=t,l=g[h=0],y=c(l/m[i-o-1]%10);else if((h=s((a+1)/p))>=g.length){if(!n)break e;for(;g.length<=h;g.push(0));l=y=0,i=1,o=(a%=p)-p+1}else{for(l=u=g[h],i=1;u>=10;u/=10,i++);y=(o=(a%=p)-p+i)<0?0:c(l/m[i-o-1]%10)}if(n=n||t<0||null!=g[h+1]||(o<0?l:l%m[i-o-1]),n=r<4?(y||n)&&(0==r||r==(e.s<0?3:2)):y>5||5==y&&(4==r||n||6==r&&(a>0?o>0?l/m[i-o]:0:g[h-1])%10&1||r==(e.s<0?8:7)),t<1||!g[0])return g.length=0,n?(t-=e.e+1,g[0]=m[(p-t%p)%p],e.e=-t||0):g[0]=e.e=0,e;if(0==a?(g.length=h,u=1,h--):(g.length=h+1,u=m[p-a],g[h]=o>0?c(l/m[i-o]%m[o])*u:0),n)for(;;){if(0==h){for(a=1,o=g[0];o>=10;o/=10,a++);for(o=g[0]+=u,u=1;o>=10;o/=10,u++);a!=u&&(e.e++,g[0]==d&&(g[0]=1));break}if(g[h]+=u,g[h]!=d)break;g[h--]=0,u=1}for(a=g.length;0===g[--a];g.pop());}e.e>k?e.c=e.e=null:e.e=M?T(t,r):S(t,r,"0"),e.s<0?"-"+t:t)}return $.clone=e,$.ROUND_UP=0,$.ROUND_DOWN=1,$.ROUND_CEIL=2,$.ROUND_FLOOR=3,$.ROUND_HALF_UP=4,$.ROUND_HALF_DOWN=5,$.ROUND_HALF_EVEN=6,$.ROUND_HALF_CEIL=7,$.ROUND_HALF_FLOOR=8,$.EUCLID=9,$.config=$.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error(u+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(_(r=e[t],0,g,t),D=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(_(r=e[t],0,8,t),j=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(_(r[0],-g,0,t),_(r[1],0,g,t),C=r[0],M=r[1]):(_(r,-g,g,t),C=-(M=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)_(r[0],-g,-1,t),_(r[1],1,g,t),L=r[0],k=r[1];else{if(_(r,-g,g,t),!r)throw Error(u+t+" cannot be zero: "+r);L=-(k=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error(u+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!r,Error(u+"crypto unavailable");F=r}else F=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(_(r=e[t],0,9,t),B=r),e.hasOwnProperty(t="POW_PRECISION")&&(_(r=e[t],0,g,t),U=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error(u+t+" not an object: "+r);q=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(u+t+" invalid: "+r);Q="0123456789"==r.slice(0,10),V=r}}return{DECIMAL_PLACES:D,ROUNDING_MODE:j,EXPONENTIAL_AT:[C,M],RANGE:[L,k],CRYPTO:F,MODULO_MODE:B,POW_PRECISION:U,FORMAT:q,ALPHABET:V}},$.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!$.DEBUG)return!0;var t,r,n=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===a||-1===a)&&i>=-g&&i<=g&&i===c(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%p)<1&&(t+=p),String(n[0]).length==t){for(t=0;t=d||r!==c(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===a||1===a||-1===a))return!0;throw Error(u+"Invalid BigNumber: "+e)},$.maximum=$.max=function(){return G(arguments,-1)},$.minimum=$.min=function(){return G(arguments,1)},$.random=(a=9007199254740992,O=Math.random()*a&2097151?function(){return c(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,a,o=0,l=[],d=new $(N);if(null==e?e=D:_(e,0,g),i=s(e/p),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));o>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[o]=r[0],t[o+1]=r[1]):(l.push(a%1e14),o+=2);o=i/2}else{if(!crypto.randomBytes)throw F=!1,Error(u+"crypto unavailable");for(t=crypto.randomBytes(i*=7);o=9e15?crypto.randomBytes(7).copy(t,o):(l.push(a%1e14),o+=7);o=i/7}if(!F)for(;o=10;a/=10,o++);or-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/r|0,o[i]%=r)}return o.reverse()}return function(n,i,a,o,s){var c,u,l,d,p,h,f,y,g=n.indexOf("."),m=D,v=j;for(g>=0&&(d=U,U=0,n=n.replace(".",""),h=(y=new $(i)).pow(n.length-g),U=d,y.c=t(S(b(h.c),h.e,"0"),10,a,e),y.e=y.c.length),l=d=(f=t(n,i,a,s?(c=V,e):(c=e,V))).length;0==f[--d];f.pop());if(!f[0])return c.charAt(0);if(g<0?--l:(h.c=f,h.e=l,h.s=o,f=(h=r(h,y,m,v,a)).c,p=h.r,l=h.e),g=f[u=l+m+1],d=a/2,p=p||u<0||null!=f[u+1],p=v<4?(null!=g||p)&&(0==v||v==(h.s<0?3:2)):g>d||g==d&&(4==v||p||6==v&&1&f[u-1]||v==(h.s<0?8:7)),u<1||!f[0])n=p?S(c.charAt(1),-m,c.charAt(0)):c.charAt(0);else{if(f.length=u,p)for(--a;++f[--u]>a;)f[u]=0,u||(++l,f=[1].concat(f));for(d=f.length;!f[--d];);for(g=0,n="";g<=d;n+=c.charAt(f[g++]));n=S(n,l,c.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,a,o,s=0,c=e.length,u=t%y,l=t/y|0;for(e=e.slice();c--;)s=((i=u*(a=e[c]%y)+(n=l*a+(o=e[c]/y|0)*u)%y*y+s)/r|0)+(n/y|0)+l*o,e[c]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;e.splice(0,1));}return function(n,i,a,o,s){var u,l,h,f,y,g,b,v,_,w,T,S,O,E,x,A,R,I=n.s==i.s?1:-1,P=n.c,N=i.c;if(!(P&&P[0]&&N&&N[0]))return new $(n.s&&i.s&&(P?!N||P[0]!=N[0]:N)?P&&0==P[0]||!N?0*I:I/0:NaN);for(_=(v=new $(I)).c=[],I=a+(l=n.e-i.e)+1,s||(s=d,l=m(n.e/p)-m(i.e/p),I=I/p|0),h=0;N[h]==(P[h]||0);h++);if(N[h]>(P[h]||0)&&l--,I<0)_.push(1),f=!0;else{for(E=P.length,A=N.length,h=0,I+=2,(y=c(s/(N[0]+1)))>1&&(N=e(N,y,s),P=e(P,y,s),A=N.length,E=P.length),O=A,T=(w=P.slice(0,A)).length;T=s/2&&x++;do{if(y=0,(u=t(N,w,A,T))<0){if(S=w[0],A!=T&&(S=S*s+(w[1]||0)),(y=c(S/x))>1)for(y>=s&&(y=s-1),b=(g=e(N,y,s)).length,T=w.length;1==t(g,w,b,T);)y--,r(g,A=10;I/=10,h++);K(v,a+(v.e=h+l*p-1)+1,o,f)}else v.e=l,v.r=+f;return v}}(),E=/^(-?)0([xbo])(?=\w[\w.]*$)/i,x=/^([^.]+)\.$/,A=/^\.([^.]+)$/,R=/^-?(Infinity|NaN)$/,I=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,a=r?t:t.replace(I,"");if(R.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!r&&(a=a.replace(E,(function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t})),n&&(i=n,a=a.replace(x,"$1").replace(A,"0.$1")),t!=a))return new $(a,i);if($.DEBUG)throw Error(u+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},P.absoluteValue=P.abs=function(){var e=new $(this);return e.s<0&&(e.s=1),e},P.comparedTo=function(e,t){return v(this,new $(e,t))},P.decimalPlaces=P.dp=function(e,t){var r,n,i,a=this;if(null!=e)return _(e,0,g),null==t?t=j:_(t,0,8),K(new $(a),e+a.e+1,t);if(!(r=a.c))return null;if(n=((i=r.length-1)-m(this.e/p))*p,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},P.dividedBy=P.div=function(e,t){return r(this,new $(e,t),D,j)},P.dividedToIntegerBy=P.idiv=function(e,t){return r(this,new $(e,t),0,1)},P.exponentiatedBy=P.pow=function(e,t){var r,n,i,a,o,l,d,h,f=this;if((e=new $(e)).c&&!e.isInteger())throw Error(u+"Exponent not an integer: "+X(e));if(null!=t&&(t=new $(t)),o=e.e>14,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return h=new $(Math.pow(+X(f),o?e.s*(2-w(e)):+X(e))),t?h.mod(t):h;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new $(NaN);(n=!l&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(e.e>9&&(f.e>0||f.e<-1||(0==f.e?f.c[0]>1||o&&f.c[1]>=24e7:f.c[0]<8e13||o&&f.c[0]<=9999975e7)))return a=f.s<0&&w(e)?-0:0,f.e>-1&&(a=1/a),new $(l?1/a:a);U&&(a=s(U/p+2))}for(o?(r=new $(.5),l&&(e.s=1),d=w(e)):d=(i=Math.abs(+X(e)))%2,h=new $(N);;){if(d){if(!(h=h.times(f)).c)break;a?h.c.length>a&&(h.c.length=a):n&&(h=h.mod(t))}if(i){if(0===(i=c(i/2)))break;d=i%2}else if(K(e=e.times(r),e.e+1,1),e.e>14)d=w(e);else{if(0==(i=+X(e)))break;d=i%2}f=f.times(f),a?f.c&&f.c.length>a&&(f.c.length=a):n&&(f=f.mod(t))}return n?h:(l&&(h=N.div(h)),t?h.mod(t):a?K(h,U,j,void 0):h)},P.integerValue=function(e){var t=new $(this);return null==e?e=j:_(e,0,8),K(t,t.e+1,e)},P.isEqualTo=P.eq=function(e,t){return 0===v(this,new $(e,t))},P.isFinite=function(){return!!this.c},P.isGreaterThan=P.gt=function(e,t){return v(this,new $(e,t))>0},P.isGreaterThanOrEqualTo=P.gte=function(e,t){return 1===(t=v(this,new $(e,t)))||0===t},P.isInteger=function(){return!!this.c&&m(this.e/p)>this.c.length-2},P.isLessThan=P.lt=function(e,t){return v(this,new $(e,t))<0},P.isLessThanOrEqualTo=P.lte=function(e,t){return-1===(t=v(this,new $(e,t)))||0===t},P.isNaN=function(){return!this.s},P.isNegative=function(){return this.s<0},P.isPositive=function(){return this.s>0},P.isZero=function(){return!!this.c&&0==this.c[0]},P.minus=function(e,t){var r,n,i,a,o=this,s=o.s;if(t=(e=new $(e,t)).s,!s||!t)return new $(NaN);if(s!=t)return e.s=-t,o.plus(e);var c=o.e/p,u=e.e/p,l=o.c,h=e.c;if(!c||!u){if(!l||!h)return l?(e.s=-t,e):new $(h?o:NaN);if(!l[0]||!h[0])return h[0]?(e.s=-t,e):new $(l[0]?o:3==j?-0:0)}if(c=m(c),u=m(u),l=l.slice(),s=c-u){for((a=s<0)?(s=-s,i=l):(u=c,i=h),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(a=(s=l.length)<(t=h.length))?s:t,s=t=0;t0)for(;t--;l[r++]=0);for(t=d-1;n>s;){if(l[--n]=0;){for(r=0,f=S[i]%_,g=S[i]/_|0,a=i+(o=c);a>i;)r=((u=f*(u=T[--o]%_)+(s=g*u+(l=T[o]/_|0)*f)%_*_+b[a]+r)/v|0)+(s/_|0)+g*l,b[a--]=u%v;b[a]=r}return r?++n:b.splice(0,1),z(e,b,n)},P.negated=function(){var e=new $(this);return e.s=-e.s||null,e},P.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new $(e,t)).s,!i||!t)return new $(NaN);if(i!=t)return e.s=-t,n.minus(e);var a=n.e/p,o=e.e/p,s=n.c,c=e.c;if(!a||!o){if(!s||!c)return new $(i/0);if(!s[0]||!c[0])return c[0]?e:new $(s[0]?n:0*i)}if(a=m(a),o=m(o),s=s.slice(),i=a-o){for(i>0?(o=a,r=c):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=c.length)<0&&(r=c,c=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+c[t]+i)/d|0,s[t]=d===s[t]?0:s[t]%d;return i&&(s=[i].concat(s),++o),z(e,s,o)},P.precision=P.sd=function(e,t){var r,n,i,a=this;if(null!=e&&e!==!!e)return _(e,1,g),null==t?t=j:_(t,0,8),K(new $(a),e,t);if(!(r=a.c))return null;if(n=(i=r.length-1)*p+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&a.e+1>n&&(n=a.e+1),n},P.shiftedBy=function(e){return _(e,-9007199254740991,h),this.times("1e"+e)},P.squareRoot=P.sqrt=function(){var e,t,n,i,a,o=this,s=o.c,c=o.s,u=o.e,l=D+4,d=new $("0.5");if(1!==c||!s||!s[0])return new $(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(c=Math.sqrt(+X(o)))||c==1/0?(((t=b(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=m((u+1)/2)-(u<0||u%2),n=new $(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new $(c+""),n.c[0])for((c=(u=n.e)+l)<3&&(c=0);;)if(a=n,n=d.times(a.plus(r(o,a,l,1))),b(a.c).slice(0,c)===(t=b(n.c)).slice(0,c)){if(n.e0&&y>0){for(a=y%s||s,d=f.substr(0,a);a0&&(d+=l+f.slice(a)),h&&(d="-"+d)}n=p?d+(r.decimalSeparator||"")+((c=+r.fractionGroupSize)?p.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):p):d}return(r.prefix||"")+n+(r.suffix||"")},P.toFraction=function(e){var t,n,i,a,o,s,c,l,d,h,y,g,m=this,v=m.c;if(null!=e&&(!(c=new $(e)).isInteger()&&(c.c||1!==c.s)||c.lt(N)))throw Error(u+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+X(c));if(!v)return new $(m);for(t=new $(N),d=n=new $(N),i=l=new $(N),g=b(v),o=t.e=g.length-m.e-1,t.c[0]=f[(s=o%p)<0?p+s:s],e=!e||c.comparedTo(t)>0?o>0?t:d:c,s=k,k=1/0,c=new $(g),l.c[0]=0;h=r(c,t,0,1),1!=(a=n.plus(h.times(i))).comparedTo(e);)n=i,i=a,d=l.plus(h.times(a=d)),l=a,t=c.minus(h.times(a=t)),c=a;return a=r(e.minus(n),i,0,1),l=l.plus(a.times(d)),n=n.plus(a.times(i)),l.s=d.s=m.s,y=r(d,i,o*=2,j).minus(m).abs().comparedTo(r(l,n,o,j).minus(m).abs())<1?[d,i]:[l,n],k=s,y},P.toNumber=function(){return+X(this)},P.toPrecision=function(e,t){return null!=e&&_(e,1,g),H(this,e,t,2)},P.toString=function(e){var t,r=this,i=r.s,a=r.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=C||a>=M?T(b(r.c),a):S(b(r.c),a,"0"):10===e&&Q?t=S(b((r=K(new $(r),D+a+1,j)).c),r.e,"0"):(_(e,2,V.length,"Base"),t=n(S(b(r.c),a,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},P.valueOf=P.toJSON=function(){return X(this)},P._isBigNumber=!0,null!=t&&$.set(t),$}(),a.default=a.BigNumber=a,void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},1048:(e,t,r)=>{"use strict";const n=r(7991),i=r(39318),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=c,t.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(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 d(e)}return u(e,t,r)}function u(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|y(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return p(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(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return h(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 c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|f(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?s(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.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 d(e){return l(e),s(e<0?0:0|f(e))}function p(e){const t=e.length<0?0:0|f(e.length),r=s(t);for(let n=0;n=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function y(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(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 G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(i)return n?-1:G(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 P(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function m(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function b(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),J(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=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:v(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):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let a,o=1,s=e.length,c=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;o=2,s/=2,c/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(a=r;as&&(r=s-c),a=r;a>=0;a--){let r=!0;for(let n=0;ni&&(n=i):n=i;const a=t.length;let o;for(n>a/2&&(n=a/2),o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:r=e[i+1],128==(192&r)&&(c=(31&t)<<6|63&r,c>127&&(a=c));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(a=c))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return function(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=y,c.prototype._isBuffer=!0,c.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;tr&&(e+=" ... "),""},a&&(c.prototype[a]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(X(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.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 a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0);const s=Math.min(a,o),u=this.slice(n,i),l=e.slice(t,r);for(let e=0;e>>=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 a=!1;for(;;)switch(n){case"hex":return _(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return T(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function R(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;in)&&(r=n);let i="";for(let n=t;nr)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,r,n,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function C(e,t,r,n,i){V(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function M(e,t,r,n,i){V(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function L(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function k(e,t,r,n,a){return t=+t,r>>>=0,a||L(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function F(e,t,r,n,a){return t=+t,r>>>=0,a||L(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.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>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],i=1,a=0;for(;++a>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Y((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(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)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(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)<>>=0,t>>>=0,r||D(e,t,this.length);let n=this[e],i=1,a=0;for(;++a=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||D(e,t,this.length);let n=t,i=1,a=this[e+--n];for(;n>0&&(i*=256);)a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Y((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||$(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<>>=0,t||D(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,n||j(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(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},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(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},c.prototype.writeBigUInt64LE=Y((function(e,t=0){return C(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Y((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}let i=0,a=1,o=0;for(this[t]=255&e;++i>>=0,!n){const n=Math.pow(2,8*r-1);j(this,e,t,r,n-1,-n)}let i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||j(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},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||j(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},c.prototype.writeBigInt64LE=Y((function(e,t=0){return C(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Y((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.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=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>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function V(e,t,r,n,i,a){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(a+1)}${n}`:`>= -(2${n} ** ${8*(a+1)-1}${n}) and < 2 ** ${8*(a+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new B.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){Q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||$(t,e.length-(r+1))}(n,i,a)}function Q(e,t){if("number"!=typeof e)throw new B.ERR_INVALID_ARG_TYPE(t,"number",e)}function $(e,t,r){if(Math.floor(e)!==e)throw Q(e,r),new B.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new B.ERR_BUFFER_OUT_OF_BOUNDS;throw new B.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=q(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=q(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let i=null;const a=[];for(let o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.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;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function K(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const W=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 Y(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},62168:e=>{"use strict";e.exports=function e(t){if("number"==typeof t&&isNaN(t))throw new Error("NaN is not allowed");if("number"==typeof t&&!isFinite(t))throw new Error("Infinity is not allowed");return null===t||"object"!=typeof t?JSON.stringify(t):t.toJSON instanceof Function?e(t.toJSON()):Array.isArray(t)?`[${t.reduce(((t,r,n)=>`${t}${0===n?"":","}${e(void 0===r||"symbol"==typeof r?null:r)}`),"")}]`:`{${Object.keys(t).sort().reduce(((r,n)=>void 0===t[n]||"symbol"==typeof t[n]?r:`${r}${0===r.length?"":","}${e(n)}:${e(t[n])}`),"")}}`}},90482:function(){!function(e){!function(t){var r="undefined"!=typeof globalThis&&globalThis||void 0!==e&&e||void 0!==r&&r,n="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,a="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in r,s="ArrayBuffer"in r;if(s)var c=["[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&&c.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?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 f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=y(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=m(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):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=f(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?f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,t,r,n=f(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=y(t=new FileReader),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-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");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}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 T(e,t){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},b.call(_.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];T.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},t.DOMException=r.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 O(e,n){return new Promise((function(i,o){var c=new _(e,n);if(c.signal&&c.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var e,t,r={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).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 u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout((function(){i(new T(n,r))}),0)},u.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){o(new t.DOMException("Aborted","AbortError"))}),0)},u.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?u.withCredentials=!0:"omit"===c.credentials&&(u.withCredentials=!1),"responseType"in u&&(a?u.responseType="blob":s&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof h?c.headers.forEach((function(e,t){u.setRequestHeader(t,e)})):Object.getOwnPropertyNames(n.headers).forEach((function(e){u.setRequestHeader(e,d(n.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&c.signal.removeEventListener("abort",l)}),u.send(void 0===c._bodyInit?null:c._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=h,r.Request=_,r.Response=T),t.Headers=h,t.Request=_,t.Response=T,t.fetch=O}({})}("undefined"!=typeof self?self:this)},10288:(e,t,r)=>{var n="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==r.g&&r.g,i=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var r=void 0!==e&&e||"undefined"!=typeof self&&self||void 0!==r&&r,n="URLSearchParams"in r,i="Symbol"in r&&"iterator"in Symbol,a="FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch(e){return!1}}(),o="FormData"in r,s="ArrayBuffer"in r;if(s)var c=["[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&&c.indexOf(Object.prototype.toString.call(e))>-1};function l(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function d(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(e){this.map={},e instanceof h?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 f(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function y(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function g(e){var t=new FileReader,r=y(t);return t.readAsArrayBuffer(e),r}function m(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:a&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:o&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&a&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=m(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||u(e))?this._bodyArrayBuffer=m(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):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a&&(this.blob=function(){var e=f(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?f(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(g)}),this.text=function(){var e,t,r,n=f(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=y(t=new FileReader),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-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");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var a=/([?&])_=[^&]*/;a.test(this.url)?this.url=this.url.replace(a,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}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 T(e,t){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new h(t.headers),this.url=t.url||"",this._initBody(e)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},b.call(_.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},T.error=function(){var e=new T(null,{status:0,statusText:""});return e.type="error",e};var S=[301,302,303,307,308];T.redirect=function(e,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new T(null,{status:t,headers:{location:e}})},t.DOMException=r.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 O(e,n){return new Promise((function(i,o){var c=new _(e,n);if(c.signal&&c.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function l(){u.abort()}u.onload=function(){var e,t,r={status:u.status,statusText:u.statusText,headers:(e=u.getAllResponseHeaders()||"",t=new h,e.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e})).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 u?u.responseURL:r.headers.get("X-Request-URL");var n="response"in u?u.response:u.responseText;setTimeout((function(){i(new T(n,r))}),0)},u.onerror=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.ontimeout=function(){setTimeout((function(){o(new TypeError("Network request failed"))}),0)},u.onabort=function(){setTimeout((function(){o(new t.DOMException("Aborted","AbortError"))}),0)},u.open(c.method,function(e){try{return""===e&&r.location.href?r.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?u.withCredentials=!0:"omit"===c.credentials&&(u.withCredentials=!1),"responseType"in u&&(a?u.responseType="blob":s&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(u.responseType="arraybuffer")),!n||"object"!=typeof n.headers||n.headers instanceof h?c.headers.forEach((function(e,t){u.setRequestHeader(t,e)})):Object.getOwnPropertyNames(n.headers).forEach((function(e){u.setRequestHeader(e,d(n.headers[e]))})),c.signal&&(c.signal.addEventListener("abort",l),u.onreadystatechange=function(){4===u.readyState&&c.signal.removeEventListener("abort",l)}),u.send(void 0===c._bodyInit?null:c._bodyInit)}))}O.polyfill=!0,r.fetch||(r.fetch=O,r.Headers=h,r.Request=_,r.Response=T),t.Headers=h,t.Request=_,t.Response=T,t.fetch=O}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var a=n.fetch?n:i;(t=a.fetch).default=a.fetch,t.fetch=a.fetch,t.Headers=a.Headers,t.Request=a.Request,t.Response=a.Response,e.exports=t},36593:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.attributeNames=t.elementNames=void 0,t.elementNames=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((function(e){return[e.toLowerCase(),e]}))),t.attributeNames=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((function(e){return[e.toLowerCase(),e]})))},5193:function(e,t,r){"use strict";var n=this&&this.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r");case s.Comment:return"\x3c!--".concat(e.data,"--\x3e");case s.CDATA:return function(e){return"")}(e);case s.Script:case s.Style:case s.Tag:return function(e,t){var r;"foreign"===t.xmlMode&&(e.name=null!==(r=u.elementNames.get(e.name))&&void 0!==r?r:e.name,e.parent&&y.has(e.parent.name)&&(t=n(n({},t),{xmlMode:!1}))),!t.xmlMode&&g.has(e.name)&&(t=n(n({},t),{xmlMode:"foreign"}));var i="<".concat(e.name),a=function(e,t){var r;if(e){var n=!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)?d:t.xmlMode||"utf8"!==t.encodeEntities?c.encodeXML:c.escapeAttribute;return Object.keys(e).map((function(r){var i,a,o=null!==(i=e[r])&&void 0!==i?i:"";return"foreign"===t.xmlMode&&(r=null!==(a=u.attributeNames.get(r))&&void 0!==a?a:r),t.emptyAttrs||t.xmlMode||""!==o?"".concat(r,'="').concat(n(o),'"'):r})).join(" ")}}(e.attribs,t);return a&&(i+=" ".concat(a)),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&p.has(e.name))?(t.xmlMode||(i+=" "),i+="/>"):(i+=">",e.children.length>0&&(i+=h(e.children,t)),!t.xmlMode&&p.has(e.name)||(i+=""))),i}(e,t);case s.Text:return function(e,t){var r,n=e.data||"";return!1===(null!==(r=t.encodeEntities)&&void 0!==r?r:t.decodeEntities)||!t.xmlMode&&e.parent&&l.has(e.parent.name)||(n=t.xmlMode||"utf8"!==t.encodeEntities?(0,c.encodeXML)(n):(0,c.escapeText)(n)),n}(e,t)}}t.render=h,t.default=h;var y=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),g=new Set(["svg","math"])},93338:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.Doctype=t.CDATA=t.Tag=t.Style=t.Script=t.Comment=t.Directive=t.Text=t.Root=t.isTag=t.ElementType=void 0,function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r=t.ElementType||(t.ElementType={})),t.isTag=function(e){return e.type===r.Tag||e.type===r.Script||e.type===r.Style},t.Root=r.Root,t.Text=r.Text,t.Directive=r.Directive,t.Comment=r.Comment,t.Script=r.Script,t.Style=r.Style,t.Tag=r.Tag,t.CDATA=r.CDATA,t.Doctype=r.Doctype},21138:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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}),t.DomHandler=void 0;var a=r(93338),o=r(62888);i(r(62888),t);var s={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},c=function(){function e(e,t,r){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,"function"==typeof t&&(r=t,t=s),"object"==typeof e&&(t=e,e=void 0),this.callback=null!=e?e:null,this.options=null!=t?t:s,this.elementCB=null!=r?r:null}return e.prototype.onparserinit=function(e){this.parser=e},e.prototype.onreset=function(){this.dom=[],this.root=new o.Document(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null},e.prototype.onend=function(){this.done||(this.done=!0,this.parser=null,this.handleCallback(null))},e.prototype.onerror=function(e){this.handleCallback(e)},e.prototype.onclosetag=function(){this.lastNode=null;var e=this.tagStack.pop();this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(e)},e.prototype.onopentag=function(e,t){var r=this.options.xmlMode?a.ElementType.Tag:void 0,n=new o.Element(e,t,void 0,r);this.addNode(n),this.tagStack.push(n)},e.prototype.ontext=function(e){var t=this.lastNode;if(t&&t.type===a.ElementType.Text)t.data+=e,this.options.withEndIndices&&(t.endIndex=this.parser.endIndex);else{var r=new o.Text(e);this.addNode(r),this.lastNode=r}},e.prototype.oncomment=function(e){if(this.lastNode&&this.lastNode.type===a.ElementType.Comment)this.lastNode.data+=e;else{var t=new o.Comment(e);this.addNode(t),this.lastNode=t}},e.prototype.oncommentend=function(){this.lastNode=null},e.prototype.oncdatastart=function(){var e=new o.Text(""),t=new o.CDATA([e]);this.addNode(t),e.parent=t,this.lastNode=e},e.prototype.oncdataend=function(){this.lastNode=null},e.prototype.onprocessinginstruction=function(e,t){var r=new o.ProcessingInstruction(e,t);this.addNode(r)},e.prototype.handleCallback=function(e){if("function"==typeof this.callback)this.callback(e,this.dom);else if(e)throw e},e.prototype.addNode=function(e){var t=this.tagStack[this.tagStack.length-1],r=t.children[t.children.length-1];this.options.withStartIndices&&(e.startIndex=this.parser.startIndex),this.options.withEndIndices&&(e.endIndex=this.parser.endIndex),t.children.push(e),r&&(e.prev=r,r.next=e),e.parent=t,this.lastNode=null},e}();t.DomHandler=c,t.default=c},62888:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(s);t.NodeWithChildren=p;var h=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.CDATA,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(p);t.CDATA=h;var f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=o.ElementType.Root,t}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(p);t.Document=f;var y=function(e){function t(t,r,n,i){void 0===n&&(n=[]),void 0===i&&(i="script"===t?o.ElementType.Script:"style"===t?o.ElementType.Style:o.ElementType.Tag);var a=e.call(this,n)||this;return a.name=t,a.attribs=r,a.type=i,a}return i(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var r,n;return{name:t,value:e.attribs[t],namespace:null===(r=e["x-attribsNamespace"])||void 0===r?void 0:r[t],prefix:null===(n=e["x-attribsPrefix"])||void 0===n?void 0:n[t]}}))},enumerable:!1,configurable:!0}),t}(p);function g(e){return(0,o.isTag)(e)}function m(e){return e.type===o.ElementType.CDATA}function b(e){return e.type===o.ElementType.Text}function v(e){return e.type===o.ElementType.Comment}function _(e){return e.type===o.ElementType.Directive}function w(e){return e.type===o.ElementType.Root}function T(e,t){var r;if(void 0===t&&(t=!1),b(e))r=new u(e.data);else if(v(e))r=new l(e.data);else if(g(e)){var n=t?S(e.children):[],i=new y(e.name,a({},e.attribs),n);n.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=a({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=a({},e["x-attribsPrefix"])),r=i}else if(m(e)){n=t?S(e.children):[];var o=new h(n);n.forEach((function(e){return e.parent=o})),r=o}else if(w(e)){n=t?S(e.children):[];var s=new f(n);n.forEach((function(e){return e.parent=s})),e["x-mode"]&&(s["x-mode"]=e["x-mode"]),r=s}else{if(!_(e))throw new Error("Not implemented yet: ".concat(e.type));var c=new d(e.name,e.data);null!=e["x-name"]&&(c["x-name"]=e["x-name"],c["x-publicId"]=e["x-publicId"],c["x-systemId"]=e["x-systemId"]),r=c}return r.startIndex=e.startIndex,r.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function S(e){for(var t=e.map((function(e){return T(e,!0)})),r=1;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getFeed=void 0;var n=r(68642),i=r(78052);t.getFeed=function(e){var t=c(d,e);return t?"feed"===t.name?function(e){var t,r=e.children,n={type:"atom",items:(0,i.getElementsByTagName)("entry",r).map((function(e){var t,r=e.children,n={media:s(r)};l(n,"id","id",r),l(n,"title","title",r);var i=null===(t=c("link",r))||void 0===t?void 0:t.attribs.href;i&&(n.link=i);var a=u("summary",r)||u("content",r);a&&(n.description=a);var o=u("updated",r);return o&&(n.pubDate=new Date(o)),n}))};l(n,"id","id",r),l(n,"title","title",r);var a=null===(t=c("link",r))||void 0===t?void 0:t.attribs.href;a&&(n.link=a),l(n,"description","subtitle",r);var o=u("updated",r);return o&&(n.updated=new Date(o)),l(n,"author","email",r,!0),n}(t):function(e){var t,r,n=null!==(r=null===(t=c("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==r?r:[],a={type:e.name.substr(0,3),id:"",items:(0,i.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,r={media:s(t)};l(r,"id","guid",t),l(r,"title","title",t),l(r,"link","link",t),l(r,"description","description",t);var n=u("pubDate",t)||u("dc:date",t);return n&&(r.pubDate=new Date(n)),r}))};l(a,"title","title",n),l(a,"link","link",n),l(a,"description","description",n);var o=u("lastBuildDate",n);return o&&(a.updated=new Date(o)),l(a,"author","managingEditor",n,!0),a}(t):null};var a=["url","type","lang"],o=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function s(e){return(0,i.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,r={medium:t.medium,isDefault:!!t.isDefault},n=0,i=a;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.DocumentPosition=t.removeSubsets=void 0;var n,i=r(21138);function a(e,t){var r=[],a=[];if(e===t)return 0;for(var o=(0,i.hasChildren)(e)?e:e.parent;o;)r.unshift(o),o=o.parent;for(o=(0,i.hasChildren)(t)?t:t.parent;o;)a.unshift(o),o=o.parent;for(var s=Math.min(r.length,a.length),c=0;cl.indexOf(p)?u===t?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:u===e?n.PRECEDING|n.CONTAINS:n.PRECEDING}t.removeSubsets=function(e){for(var t=e.length;--t>=0;){var r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0)e.splice(t,1);else for(var n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e},function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(n=t.DocumentPosition||(t.DocumentPosition={})),t.compareDocumentPosition=a,t.uniqueSort=function(e){return(e=e.filter((function(e,t,r){return!r.includes(e,t+1)}))).sort((function(e,t){var r=a(e,t);return r&n.PRECEDING?-1:r&n.FOLLOWING?1:0})),e}},76403:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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}),t.hasChildren=t.isDocument=t.isComment=t.isText=t.isCDATA=t.isTag=void 0,i(r(68642),t),i(r(45517),t),i(r(46178),t),i(r(51467),t),i(r(78052),t),i(r(83698),t),i(r(91206),t);var a=r(21138);Object.defineProperty(t,"isTag",{enumerable:!0,get:function(){return a.isTag}}),Object.defineProperty(t,"isCDATA",{enumerable:!0,get:function(){return a.isCDATA}}),Object.defineProperty(t,"isText",{enumerable:!0,get:function(){return a.isText}}),Object.defineProperty(t,"isComment",{enumerable:!0,get:function(){return a.isComment}}),Object.defineProperty(t,"isDocument",{enumerable:!0,get:function(){return a.isDocument}}),Object.defineProperty(t,"hasChildren",{enumerable:!0,get:function(){return a.hasChildren}})},78052:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getElementsByTagType=t.getElementsByTagName=t.getElementById=t.getElements=t.testElement=void 0;var n=r(21138),i=r(51467),a={tag_name:function(e){return"function"==typeof e?function(t){return(0,n.isTag)(t)&&e(t.name)}:"*"===e?n.isTag:function(t){return(0,n.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,n.isText)(t)&&e(t.data)}:function(t){return(0,n.isText)(t)&&t.data===e}}};function o(e,t){return"function"==typeof t?function(r){return(0,n.isTag)(r)&&t(r.attribs[e])}:function(r){return(0,n.isTag)(r)&&r.attribs[e]===t}}function s(e,t){return function(r){return e(r)||t(r)}}function c(e){var t=Object.keys(e).map((function(t){var r=e[t];return Object.prototype.hasOwnProperty.call(a,t)?a[t](r):o(t,r)}));return 0===t.length?null:t.reduce(s)}t.testElement=function(e,t){var r=c(e);return!r||r(t)},t.getElements=function(e,t,r,n){void 0===n&&(n=1/0);var a=c(e);return a?(0,i.filter)(a,t,r,n):[]},t.getElementById=function(e,t,r){return void 0===r&&(r=!0),Array.isArray(t)||(t=[t]),(0,i.findOne)(o("id",e),t,r)},t.getElementsByTagName=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(a.tag_name(e),t,r,n)},t.getElementsByTagType=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),(0,i.filter)(a.tag_type(e),t,r,n)}},46178:(e,t)=>{"use strict";function r(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}Object.defineProperty(t,"__esModule",{value:!0}),t.prepend=t.prependChild=t.append=t.appendChild=t.replaceElement=t.removeElement=void 0,t.removeElement=r,t.replaceElement=function(e,t){var r=t.prev=e.prev;r&&(r.next=t);var n=t.next=e.next;n&&(n.prev=t);var i=t.parent=e.parent;if(i){var a=i.children;a[a.lastIndexOf(e)]=t,e.parent=null}},t.appendChild=function(e,t){if(r(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},t.append=function(e,t){r(t);var n=e.parent,i=e.next;if(t.next=i,t.prev=e,e.next=t,t.parent=n,i){if(i.prev=t,n){var a=n.children;a.splice(a.lastIndexOf(i),0,t)}}else n&&n.children.push(t)},t.prependChild=function(e,t){if(r(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},t.prepend=function(e,t){r(t);var n=e.parent;if(n){var i=n.children;i.splice(i.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}},51467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAll=t.existsOne=t.findOne=t.findOneChild=t.find=t.filter=void 0;var n=r(21138);function i(e,t,r,i){for(var a=[],o=[t],s=[0];;)if(s[0]>=o[0].length){if(1===s.length)return a;o.shift(),s.shift()}else{var c=o[0][s[0]++];if(e(c)&&(a.push(c),--i<=0))return a;r&&(0,n.hasChildren)(c)&&c.children.length>0&&(s.unshift(0),o.unshift(c.children))}}t.filter=function(e,t,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),i(e,Array.isArray(t)?t:[t],r,n)},t.find=i,t.findOneChild=function(e,t){return t.find(e)},t.findOne=function e(t,r,i){void 0===i&&(i=!0);for(var a=null,o=0;o0&&(a=e(t,s.children,!0)))}return a},t.existsOne=function e(t,r){return r.some((function(r){return(0,n.isTag)(r)&&(t(r)||e(t,r.children))}))},t.findAll=function(e,t){for(var r=[],i=[t],a=[0];;)if(a[0]>=i[0].length){if(1===i.length)return r;i.shift(),a.shift()}else{var o=i[0][a[0]++];(0,n.isTag)(o)&&(e(o)&&r.push(o),o.children.length>0&&(a.unshift(0),i.unshift(o.children)))}}},68642:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.innerText=t.textContent=t.getText=t.getInnerHTML=t.getOuterHTML=void 0;var i=r(21138),a=n(r(5193)),o=r(93338);function s(e,t){return(0,a.default)(e,t)}t.getOuterHTML=s,t.getInnerHTML=function(e,t){return(0,i.hasChildren)(e)?e.children.map((function(e){return s(e,t)})).join(""):""},t.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,i.isCDATA)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&!(0,i.isComment)(t)?e(t.children):(0,i.isText)(t)?t.data:""},t.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,i.hasChildren)(t)&&(t.type===o.ElementType.Tag||(0,i.isCDATA)(t))?e(t.children):(0,i.isText)(t)?t.data:""}},45517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prevElementSibling=t.nextElementSibling=t.getName=t.hasAttrib=t.getAttributeValue=t.getSiblings=t.getParent=t.getChildren=void 0;var n=r(21138);function i(e){return(0,n.hasChildren)(e)?e.children:[]}function a(e){return e.parent||null}t.getChildren=i,t.getParent=a,t.getSiblings=function(e){var t=a(e);if(null!=t)return i(t);for(var r=[e],n=e.prev,o=e.next;null!=n;)r.unshift(n),n=n.prev;for(;null!=o;)r.push(o),o=o.next;return r},t.getAttributeValue=function(e,t){var r;return null===(r=e.attribs)||void 0===r?void 0:r[t]},t.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},t.getName=function(e){return e.name},t.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,n.isTag)(t);)t=t.next;return t},t.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,n.isTag)(t);)t=t.prev;return t}},3379:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXML=t.decodeHTMLStrict=t.decodeHTMLAttribute=t.decodeHTML=t.determineBranch=t.EntityDecoder=t.DecodingMode=t.BinTrieFlags=t.fromCodePoint=t.replaceCodePoint=t.decodeCodePoint=t.xmlDecodeTree=t.htmlDecodeTree=void 0;var s=o(r(57346));t.htmlDecodeTree=s.default;var c=o(r(18622));t.xmlDecodeTree=c.default;var u=a(r(22809));t.decodeCodePoint=u.default;var l,d,p,h,f=r(22809);function y(e){return e>=l.ZERO&&e<=l.NINE}Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return f.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return f.fromCodePoint}}),function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(l||(l={})),function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(d=t.BinTrieFlags||(t.BinTrieFlags={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(p||(p={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(h=t.DecodingMode||(t.DecodingMode={}));var g=function(){function e(e,t,r){this.decodeTree=e,this.emitCodePoint=t,this.errors=r,this.state=p.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=h.Strict}return e.prototype.startEntity=function(e){this.decodeMode=e,this.state=p.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},e.prototype.write=function(e,t){switch(this.state){case p.EntityStart:return e.charCodeAt(t)===l.NUM?(this.state=p.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=p.NamedEntity,this.stateNamedEntity(e,t));case p.NumericStart:return this.stateNumericStart(e,t);case p.NumericDecimal:return this.stateNumericDecimal(e,t);case p.NumericHex:return this.stateNumericHex(e,t);case p.NamedEntity:return this.stateNamedEntity(e,t)}},e.prototype.stateNumericStart=function(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===l.LOWER_X?(this.state=p.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=p.NumericDecimal,this.stateNumericDecimal(e,t))},e.prototype.addToNumericResult=function(e,t,r,n){if(t!==r){var i=r-t;this.result=this.result*Math.pow(n,i)+parseInt(e.substr(t,i),n),this.consumed+=i}},e.prototype.stateNumericHex=function(e,t){for(var r,n=t;t=l.UPPER_A&&r<=l.UPPER_F||r>=l.LOWER_A&&r<=l.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}return this.addToNumericResult(e,n,t,16),-1},e.prototype.stateNumericDecimal=function(e,t){for(var r=t;t>14;t=l.UPPER_A&&e<=l.UPPER_Z||e>=l.LOWER_A&&e<=l.LOWER_Z||y(e)}(o)))?0:this.emitNotTerminatedNamedEntity();if(0!=(i=((n=r[this.treeIndex])&d.VALUE_LENGTH)>>14)){if(a===l.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==h.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}var o;return-1},e.prototype.emitNotTerminatedNamedEntity=function(){var e,t=this.result,r=(this.decodeTree[t]&d.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed},e.prototype.emitNamedEntityData=function(e,t,r){var n=this.decodeTree;return this.emitCodePoint(1===t?n[e]&~d.VALUE_LENGTH:n[e+1],r),3===t&&this.emitCodePoint(n[e+2],r),r},e.prototype.end=function(){var e;switch(this.state){case p.NamedEntity:return 0===this.result||this.decodeMode===h.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case p.NumericDecimal:return this.emitNumericEntity(0,2);case p.NumericHex:return this.emitNumericEntity(0,3);case p.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case p.EntityStart:return 0}},e}();function m(e){var t="",r=new g(e,(function(e){return t+=(0,u.fromCodePoint)(e)}));return function(e,n){for(var i=0,a=0;(a=e.indexOf("&",a))>=0;){t+=e.slice(i,a),r.startEntity(n);var o=r.write(e,a+1);if(o<0){i=a+r.end();break}i=a+o,a=0===o?i+1:i}var s=t+e.slice(i);return t="",s}}function b(e,t,r,n){var i=(t&d.BRANCH_LENGTH)>>7,a=t&d.JUMP_TABLE;if(0===i)return 0!==a&&n===a?r:-1;if(a){var o=n-a;return o<0||o>=i?-1:e[r+o]-1}for(var s=r,c=s+i-1;s<=c;){var u=s+c>>>1,l=e[u];if(ln))return e[u+i];c=u-1}}return-1}t.EntityDecoder=g,t.determineBranch=b;var v=m(s.default),_=m(c.default);t.decodeHTML=function(e,t){return void 0===t&&(t=h.Legacy),v(e,t)},t.decodeHTMLAttribute=function(e){return v(e,h.Attribute)},t.decodeHTMLStrict=function(e){return v(e,h.Strict)},t.decodeXML=function(e){return _(e,h.Strict)}},22809:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function i(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=n.get(e))&&void 0!==t?t:e}t.fromCodePoint=null!==(r=String.fromCodePoint)&&void 0!==r?r:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+String.fromCharCode(e)},t.replaceCodePoint=i,t.default=function(e){return(0,t.fromCodePoint)(i(e))}},33231:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.encodeNonAsciiHTML=t.encodeHTML=void 0;var i=n(r(58635)),a=r(57078),o=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function s(e,t){for(var r,n="",o=0;null!==(r=e.exec(t));){var s=r.index;n+=t.substring(o,s);var c=t.charCodeAt(s),u=i.default.get(c);if("object"==typeof u){if(s+1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.getCodePoint=t.xmlReplacer=void 0,t.xmlReplacer=/["&'<>$\x80-\uFFFF]/g;var r=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function n(e){for(var n,i="",a=0;null!==(n=t.xmlReplacer.exec(e));){var o=n.index,s=e.charCodeAt(o),c=r.get(s);void 0!==c?(i+=e.substring(a,o)+c,a=o+1):(i+="".concat(e.substring(a,o),"&#x").concat((0,t.getCodePoint)(e,o).toString(16),";"),a=t.xmlReplacer.lastIndex+=Number(55296==(64512&s)))}return i+e.substr(a)}function i(e,t){return function(r){for(var n,i=0,a="";n=e.exec(r);)i!==n.index&&(a+=r.substring(i,n.index)),a+=t.get(n[0].charCodeAt(0)),i=n.index+1;return a+r.substring(i)}}t.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},t.encodeXML=n,t.escape=n,t.escapeUTF8=i(/[&<>'"]/g,r),t.escapeAttribute=i(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=i(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))},57346:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})))},18622:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})))},58635:(e,t)=>{"use strict";function r(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeXMLStrict=t.decodeHTML5Strict=t.decodeHTML4Strict=t.decodeHTML5=t.decodeHTML4=t.decodeHTMLAttribute=t.decodeHTMLStrict=t.decodeHTML=t.decodeXML=t.DecodingMode=t.EntityDecoder=t.encodeHTML5=t.encodeHTML4=t.encodeNonAsciiHTML=t.encodeHTML=t.escapeText=t.escapeAttribute=t.escapeUTF8=t.escape=t.encodeXML=t.encode=t.decodeStrict=t.decode=t.EncodingMode=t.EntityLevel=void 0;var n,i,a=r(3379),o=r(33231),s=r(57078);function c(e,t){if(void 0===t&&(t=n.XML),("number"==typeof t?t:t.level)===n.HTML){var r="object"==typeof t?t.mode:void 0;return(0,a.decodeHTML)(e,r)}return(0,a.decodeXML)(e)}!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(n=t.EntityLevel||(t.EntityLevel={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(i=t.EncodingMode||(t.EncodingMode={})),t.decode=c,t.decodeStrict=function(e,t){var r;void 0===t&&(t=n.XML);var i="number"==typeof t?{level:t}:t;return null!==(r=i.mode)&&void 0!==r||(i.mode=a.DecodingMode.Strict),c(e,i)},t.encode=function(e,t){void 0===t&&(t=n.XML);var r="number"==typeof t?{level:t}:t;return r.mode===i.UTF8?(0,s.escapeUTF8)(e):r.mode===i.Attribute?(0,s.escapeAttribute)(e):r.mode===i.Text?(0,s.escapeText)(e):r.level===n.HTML?r.mode===i.ASCII?(0,o.encodeNonAsciiHTML)(e):(0,o.encodeHTML)(e):(0,s.encodeXML)(e)};var u=r(57078);Object.defineProperty(t,"encodeXML",{enumerable:!0,get:function(){return u.encodeXML}}),Object.defineProperty(t,"escape",{enumerable:!0,get:function(){return u.escape}}),Object.defineProperty(t,"escapeUTF8",{enumerable:!0,get:function(){return u.escapeUTF8}}),Object.defineProperty(t,"escapeAttribute",{enumerable:!0,get:function(){return u.escapeAttribute}}),Object.defineProperty(t,"escapeText",{enumerable:!0,get:function(){return u.escapeText}});var l=r(33231);Object.defineProperty(t,"encodeHTML",{enumerable:!0,get:function(){return l.encodeHTML}}),Object.defineProperty(t,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return l.encodeNonAsciiHTML}}),Object.defineProperty(t,"encodeHTML4",{enumerable:!0,get:function(){return l.encodeHTML}}),Object.defineProperty(t,"encodeHTML5",{enumerable:!0,get:function(){return l.encodeHTML}});var d=r(3379);Object.defineProperty(t,"EntityDecoder",{enumerable:!0,get:function(){return d.EntityDecoder}}),Object.defineProperty(t,"DecodingMode",{enumerable:!0,get:function(){return d.DecodingMode}}),Object.defineProperty(t,"decodeXML",{enumerable:!0,get:function(){return d.decodeXML}}),Object.defineProperty(t,"decodeHTML",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTMLStrict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTMLAttribute",{enumerable:!0,get:function(){return d.decodeHTMLAttribute}}),Object.defineProperty(t,"decodeHTML4",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTML5",{enumerable:!0,get:function(){return d.decodeHTML}}),Object.defineProperty(t,"decodeHTML4Strict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeHTML5Strict",{enumerable:!0,get:function(){return d.decodeHTMLStrict}}),Object.defineProperty(t,"decodeXMLStrict",{enumerable:!0,get:function(){return d.decodeXML}})},35033:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promisifyEventEmitter=void 0,t.promisifyEventEmitter=function(e,t){return new Promise(((r,n)=>{e.on("end",(()=>r(t))),e.on("error",n)}))}},50046: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 a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,a),n(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}y(e,t,a,{once:!0}),"error"!==t&&function(e,t,r){"function"==typeof e.on&&y(e,"error",t,{once:!0})}(e,i)}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,a,o,u;if(s(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,u=l,console&&console.warn&&console.warn(u)}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 d(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 p(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;r0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var c=a[e];if(void 0===c)return!1;if("function"==typeof c)n(c,this,t);else{var u=c.length,l=f(c,u);for(r=0;r=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return p(this,e,!0)},a.prototype.rawListeners=function(e){return p(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):h.call(e,t)},a.prototype.listenerCount=h,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},53933:e=>{"use strict";e.exports=function e(t,r){if(t===r)return!0;if(t&&r&&"object"==typeof t&&"object"==typeof r){if(t.constructor!==r.constructor)return!1;var n,i,a;if(Array.isArray(t)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(!e(t[i],r[i]))return!1;return!0}if(t instanceof Map&&r instanceof Map){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;for(i of t.entries())if(!e(i[1],r.get(i[0])))return!1;return!0}if(t instanceof Set&&r instanceof Set){if(t.size!==r.size)return!1;for(i of t.entries())if(!r.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(t)&&ArrayBuffer.isView(r)){if((n=t.length)!=r.length)return!1;for(i=n;0!=i--;)if(t[i]!==r[i])return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((n=(a=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(i=n;0!=i--;)if(!Object.prototype.hasOwnProperty.call(r,a[i]))return!1;for(i=n;0!=i--;){var o=a[i];if(!e(t[o],r[o]))return!1}return!0}return t!=t&&r!=r}},74190:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(92681),t)},92681:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparqlEndpointFetcher=void 0,r(45766);const n=r(55403),i=r(21451),a=r(52666),o=r(76574),s=r(52267),c=r(72243),u=r(76605);class l{constructor(e){e=e||{},this.method=e.method||"POST",this.additionalUrlParams=e.additionalUrlParams||new URLSearchParams,this.defaultHeaders=e.defaultHeaders||new Headers,this.fetchCb=e.fetch,this.sparqlJsonParser=new i.SparqlJsonParser(e),this.sparqlXmlParser=new a.SparqlXmlParser(e),this.sparqlParsers={[l.CONTENTTYPE_SPARQL_JSON]:{parseBooleanStream:e=>this.sparqlJsonParser.parseJsonBooleanStream(e),parseResultsStream:e=>this.sparqlJsonParser.parseJsonResultsStream(e)},[l.CONTENTTYPE_SPARQL_XML]:{parseBooleanStream:e=>this.sparqlXmlParser.parseXmlBooleanStream(e),parseResultsStream:e=>this.sparqlXmlParser.parseXmlResultsStream(e)}},this.timeout=e.timeout}getQueryType(e){const t=new n.Parser({sparqlStar:!0}).parse(e);return"query"===t.type?"DESCRIBE"===t.queryType?"CONSTRUCT":t.queryType:"UNKNOWN"}getUpdateTypes(e){const t=new n.Parser({sparqlStar:!0}).parse(e);if("update"===t.type){const e={};for(const r of t.updates)"type"in r?e[r.type]=!0:e[r.updateType]=!0;return e}return"UNKNOWN"}async fetchBindings(e,t){const[r,n]=await this.fetchRawStream(e,t,l.CONTENTTYPE_SPARQL),i=this.sparqlParsers[r];if(!i)throw new Error("Unknown SPARQL results content type: "+r);return i.parseResultsStream(n)}async fetchAsk(e,t){const[r,n]=await this.fetchRawStream(e,t,l.CONTENTTYPE_SPARQL),i=this.sparqlParsers[r];if(!i)throw new Error("Unknown SPARQL results content type: "+r);return i.parseBooleanStream(n)}async fetchTriples(e,t){return(await this.fetchRawStream(e,t,l.CONTENTTYPE_TURTLE))[1].pipe(new c.StreamParser({format:l.CONTENTTYPE_TURTLE}))}async fetchUpdate(e,t){const n=new(globalThis.AbortController||await Promise.resolve().then((()=>r(67083)))),i={};this.defaultHeaders.forEach(((e,t)=>{i[t]=e}));const a={method:"POST",headers:Object.assign(Object.assign({},i),{"content-type":"application/sparql-update"}),body:t,signal:n.signal};await this.handleFetchCall(e,a,{ignoreBody:!0}),n.abort()}async fetchRawStream(e,t,r){let n="POST"===this.method?e:e+"?query="+encodeURIComponent(t);const i=new Headers(this.defaultHeaders);let a;return i.append("Accept",r),"POST"===this.method?(i.append("Content-Type","application/x-www-form-urlencoded"),a=new URLSearchParams,a.set("query",t),this.additionalUrlParams.forEach(((e,t)=>{a.set(t,e)})),i.append("Content-Length",a.toString().length.toString())):""!==this.additionalUrlParams.toString()&&(n+=`&${this.additionalUrlParams.toString()}`),this.handleFetchCall(n,{headers:i,method:this.method,body:a})}async handleFetchCall(e,t,r={}){let n;if(this.timeout){const e=new AbortController;t.signal=e.signal,n=setTimeout((()=>e.abort()),this.timeout)}const i=await(this.fetchCb||fetch)(e,t);let a;clearTimeout(n),r.ignoreBody||(a=u(i.body)?i.body:new s.ReadableWebToNodeStream(i.body));let c=i.headers.get("Content-Type")||"";if(c.indexOf(";")>0&&(c=c.substr(0,c.indexOf(";"))),!i.ok){const t=/^[^?]*/u.exec(e)[0];let r="empty response";throw a&&(r=await o(a)),new Error(`Invalid SPARQL endpoint response from ${t} (HTTP status ${i.status}):\n${r}`)}return[c,a]}}l.CONTENTTYPE_SPARQL_JSON="application/sparql-results+json",l.CONTENTTYPE_SPARQL_XML="application/sparql-results+xml",l.CONTENTTYPE_SPARQL=`${l.CONTENTTYPE_SPARQL_JSON};q=1.0,${l.CONTENTTYPE_SPARQL_XML};q=0.7`,l.CONTENTTYPE_TURTLE="text/turtle",t.SparqlEndpointFetcher=l},45766:function(){!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}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(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 d(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 p(e){this.map={},e instanceof p?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 h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=f(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 m(){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:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(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=h(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?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,r,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),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-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 _(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 w(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 p(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];w.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new w(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,a){var o=new v(e,r);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new p,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 s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=p,e.Request=v,e.Response=w),t.Headers=p,t.Request=v,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)},1427: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(51812),t),i(r(26339),t),i(r(17762),t),i(r(12856),t),i(r(45147),t)},26339:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;const i=r(44330),a=r(51812),o=r(96414),s=r(17762),c=r(45147);class u{constructor(e){(e=e||{}).variableDelimiter=e.variableDelimiter||"_",e.expressionVariableCounter=e.expressionVariableCounter||0,this.util=new c.Util(e),this.initializeNodeHandlers(e)}static registerNodeHandlers(e,t){e.registerNodeHandler(new a.NodeHandlerDocument(e,t)),e.registerNodeHandler(new a.NodeHandlerDefinitionOperation(e,t)),e.registerNodeHandler(new a.NodeHandlerDefinitionFragment(e,t)),e.registerNodeHandler(new a.NodeHandlerSelectionFragmentSpread(e,t)),e.registerNodeHandler(new a.NodeHandlerSelectionInlineFragment(e,t)),e.registerNodeHandler(new a.NodeHandlerSelectionField(e,t))}static registerNodeValueHandlers(e,t){e.registerNodeValueHandler(new a.NodeValueHandlerVariable(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerInt(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerFloat(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerString(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerBoolean(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerNull(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerEnum(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerList(e,t)),e.registerNodeValueHandler(new a.NodeValueHandlerObject(e,t))}static registerDirectiveNodeHandlers(e,t){e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerInclude(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerOptional(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerPlural(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerSingle(e,t)),e.registerDirectiveNodeHandler(new o.DirectiveNodeHandlerSkip(e,t))}graphqlToSparqlAlgebra(e,t,r){return n(this,void 0,void 0,(function*(){return this.graphqlToSparqlAlgebraRawContext(e,yield this.util.contextParser.parse(t),r)}))}graphqlToSparqlAlgebraRawContext(e,t,r){r=r||{};const n="string"==typeof e?(0,i.parse)(e):e,a={context:t,fragmentDefinitions:this.indexFragments(n),graph:this.util.dataFactory.defaultGraph(),path:[],singularizeState:s.SingularizeState.PLURAL,singularizeVariables:r.singularizeVariables||{},subject:null,terminalVariables:[],variablesDict:r.variablesDict||{},variablesMetaDict:{}};return this.util.handleNode(n,a)}indexFragments(e){const t={},r=[];for(const n of e.definitions)"FragmentDefinition"===n.kind?t[n.name.value]=n:r.push(n);return e.definitions=r,t}initializeNodeHandlers(e){u.registerNodeHandlers(this.util,e),u.registerNodeValueHandlers(this.util,e),u.registerDirectiveNodeHandlers(this.util,e)}}t.Converter=u},17762:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.SingularizeState=void 0,(r=t.SingularizeState||(t.SingularizeState={}))[r.SINGLE=0]="SINGLE",r[r.PLURAL=1]="PLURAL"},12856:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},45147:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(18050),i=r(27202),a=r(91525);t.Util=class{constructor(e){this.nodeHandlers={},this.nodeValueHandlers={},this.directiveNodeHandlers={},this.settings=e,this.dataFactory=e.dataFactory||new n.DataFactory,this.operationFactory=new a.Factory(this.dataFactory),this.contextParser=new i.ContextParser}registerNodeHandler(e){this.nodeHandlers[e.targetKind]=e}registerNodeValueHandler(e){this.nodeValueHandlers[e.targetKind]=e}registerDirectiveNodeHandler(e){this.directiveNodeHandlers[e.targetKind]=e}handleNode(e,t){const r=this.nodeHandlers[e.kind];if(!r)throw new Error(`Unsupported GraphQL node '${e.kind}'`);return r.handle(e,t)}handleNodeValue(e,t,r){const n=this.nodeValueHandlers[e.kind];if(!n)throw new Error(`Unsupported GraphQL value node '${e.kind}'`);return n.handle(e,t,r)}handleDirectiveNode(e,t){const r=this.directiveNodeHandlers[e.directive.name.value];return r?r.handle(e,t):null}joinOperations(e){if(1===e.length)return e[0];const t=[],r=[];for(const n of e)"bgp"===n.type?t.push(n):r.push(n);if(t.length===e.length)return this.joinOperationsAsBgp(t);if(t.length===e.length-1&&"leftjoin"===r[0].type&&"bgp"===r[0].input[0].type){const e=r[0];return t.push(e.input[0]),this.operationFactory.createLeftJoin(this.joinOperationsAsBgp(t),e.input[1])}return r.length===e.length?this.joinOperationsAsNestedJoin(r):this.joinOperationsAsNestedJoin([this.joinOperationsAsBgp(t),this.joinOperationsAsNestedJoin(r)])}joinOperationsAsBgp(e){return this.operationFactory.createBgp([].concat.apply([],e.map((e=>e.patterns))))}joinOperationsAsNestedJoin(e){return this.operationFactory.createJoin(e)}appendFieldToPath(e,t){return e.concat([t])}getFieldLabel(e){return(e.alias?e.alias:e.name).value}nameToVariable(e,t){return this.dataFactory.variable((t.path.length?t.path.join(this.settings.variableDelimiter)+this.settings.variableDelimiter:"")+e)}valueToNamedNode(e,t){const r=t.expandTerm(e,!0);if(this.settings.requireContext&&!r)throw new Error("No context entry was found for "+e);return this.dataFactory.namedNode(r||e)}getArgument(e,t){if(e)for(const r of e)if(r.name.value===t)return r}newTypePattern(e,t,r){return this.operationFactory.createPattern(e,this.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),this.valueToNamedNode(t.name.value,r.context),r.graph)}createQuadPattern(e,t,r,n,i){const a=this.valueToNamedNode(t.value,i);return i&&i.getContextRaw()[t.value]&&i.getContextRaw()[t.value]["@reverse"]?this.operationFactory.createPattern(r,a,e,n):this.operationFactory.createPattern(e,a,r,n)}createQuadPath(e,t,r,n,i,a){const o=this.valueToNamedNode(t.value,a);let s=this.operationFactory.createLink(o);for(const e of r.values){if("EnumValue"!==e.kind)throw new Error("Invalid value type for 'alt' argument, must be EnumValue, but got "+e.kind);s=this.operationFactory.createAlt([s,this.operationFactory.createLink(this.valueToNamedNode(e.value,a))])}return a&&a.getContextRaw()[t.value]&&a.getContextRaw()[t.value]["@reverse"]?this.operationFactory.createPath(n,s,e,i):this.operationFactory.createPath(e,s,n,i)}}},14009:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerAdapter=void 0,t.NodeHandlerAdapter=class{constructor(e,t,r){this.targetKind=e,this.util=t,this.settings=r}getNodeQuadContextSelectionSet(e,t,r){const n={};if(e)for(const t of e.selections)if("Field"===t.kind){const e=t;this.handleNodeQuadContextField(e,r,n,"id","subject"),this.handleNodeQuadContextField(e,r,n,"graph","graph")}return n}handleNodeQuadContextField(e,t,r,n,i){if(!r[i]&&e.name.value===n){if(!r[i]){const a=this.util.getArgument(e.arguments,"_");if(a){const o=this.util.handleNodeValue(a.value,e.name.value,t);if(1!==o.terms.length)throw new Error(`Only single values can be set as ${n}, but got ${o.terms.length} at ${e.name.value}`);r[i]=o.terms[0],o.auxiliaryPatterns&&(r.auxiliaryPatterns||(r.auxiliaryPatterns=[]),r.auxiliaryPatterns.concat(o.auxiliaryPatterns))}}if(!r[i]){const n=this.util.nameToVariable(this.util.getFieldLabel(e),t);t.terminalVariables.push(n),r[i]=n}}}getDirectiveOutputs(e,t,r){const n=[];if(e)for(const i of e){const e=this.util.handleDirectiveNode({directive:i,fieldLabel:t},r);if(e){if(e.ignore)return null;n.push(e)}}return n}handleDirectiveOutputs(e,t){for(const r of e){if(r.ignore)return this.util.operationFactory.createBgp([]);r.operationOverrider&&(t=r.operationOverrider(t))}return t}}},94058:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDefinitionAdapter=void 0;const n=r(14009);class i extends n.NodeHandlerAdapter{constructor(e,t,r){super(e,t,r)}}t.NodeHandlerDefinitionAdapter=i},73045:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDefinitionFragment=void 0;const n=r(94058);class i extends n.NodeHandlerDefinitionAdapter{constructor(e,t){super("FragmentDefinition",e,t)}handle(e,t){throw new Error("Illegal state: fragment definitions must be indexed and removed before processing")}}t.NodeHandlerDefinitionFragment=i},9540:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDefinitionOperation=void 0;const n=r(94058);class i extends n.NodeHandlerDefinitionAdapter{constructor(e,t){super("OperationDefinition",e,t)}handle(e,t){if("query"!==e.operation)throw new Error("Unsupported definition operation: "+e.operation);if(e.variableDefinitions)for(const r of e.variableDefinitions){const e=r.variable.name.value;r.defaultValue&&(t.variablesDict[e]||(t.variablesDict[e]=r.defaultValue));let n=r.type;const i="NonNullType"===n.kind;i&&(n=n.type);const a="ListType"===n.kind;a&&(n=n.type);const o=n.name.value;t.variablesMetaDict[e]={mandatory:i,list:a,type:o}}const r=this.getDirectiveOutputs(e.directives,e.name?e.name.value:"",t);if(!r)return this.util.operationFactory.createBgp([]);const n=this.util.joinOperations(e.selectionSet.selections.map((e=>this.util.handleNode(e,t))));return this.handleDirectiveOutputs(r,n)}}t.NodeHandlerDefinitionOperation=i},9373:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerDocument=void 0;const n=r(91525),i=r(14009);class a extends i.NodeHandlerAdapter{constructor(e,t){super("Document",e,t)}handle(e,t){const r=e.definitions.map((e=>{const r=this.getNodeQuadContextDefinitionNode(e,Object.assign(Object.assign({},t),{ignoreUnknownVariables:!0})),n=Object.assign(Object.assign({},t),{graph:r.graph||t.graph,subject:r.subject||this.util.dataFactory.blankNode()});let i=this.util.handleNode(e,n);return r&&r.auxiliaryPatterns&&(i=this.util.joinOperations([i,this.util.operationFactory.createBgp(r.auxiliaryPatterns)])),i})),n=this.util.operationFactory.createProject(1===r.length?r[0]:this.util.operationFactory.createUnion(r),t.terminalVariables);return this.translateBlankNodesToVariables(n)}getNodeQuadContextDefinitionNode(e,t){if("OperationDefinition"===e.kind)return this.getNodeQuadContextSelectionSet(e.selectionSet,e.name?e.name.value:"",t);throw new Error(`Unsupported definition: ${e.kind}`)}translateBlankNodesToVariables(e){const t=this,r={},i=Array.from(e.variables).reduce(((e,t)=>(e[t.value]=!0,e)),{});return n.Util.mapOperation(e,{path:(e,t)=>({recurse:!1,result:t.createPath(a(e.subject),e.predicate,a(e.object),a(e.graph))}),pattern:(e,t)=>({recurse:!1,result:t.createPattern(a(e.subject),a(e.predicate),a(e.object),a(e.graph))})});function a(e){if("BlankNode"===e.termType){let a=r[e.value];return a||(a=n.Util.createUniqueVariable(e.value,i,t.util.dataFactory),i[a.value]=!0,r[e.value]=a),a}return e}}}t.NodeHandlerDocument=a},97285:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionAdapter=void 0;const n=r(91525),i=r(17762),a=r(14009);class o extends a.NodeHandlerAdapter{constructor(e,t,r){super(e,t,r)}getNodeQuadContextFieldNode(e,t,r){return this.getNodeQuadContextSelectionSet(e.selectionSet,t,Object.assign(Object.assign({},r),{path:this.util.appendFieldToPath(r.path,t)}))}fieldToOperation(e,t,r,a){const o=r;let s,c=0;if(("id"===t.name.value||"graph"===t.name.value)&&(r=!1,t.arguments))for(const r of t.arguments)"_"===r.name.value&&this.util.handleNodeValue(r.value,t.name.value,e);const u=this.util.getFieldLabel(t);if(e.singularizeState===i.SingularizeState.SINGLE&&(e.singularizeVariables[this.util.nameToVariable(u,e).value]=!0),r){const t=this.handleMetaField(e,u,a);if(t)return t}const l=a?[this.util.operationFactory.createBgp(a)]:[],d=this.getNodeQuadContextFieldNode(t,u,e);let p=d.subject||this.util.nameToVariable(u,e),h=d.graph||e.graph;d.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(d.auxiliaryPatterns));let f=!0,y=null;if(r&&t.arguments&&t.arguments.length)for(const n of t.arguments){if("_"===n.name.value){const i=this.util.handleNodeValue(n.value,t.name.value,e);y=i.terms,l.push(this.util.operationFactory.createBgp(i.terms.map((r=>this.util.createQuadPattern(e.subject,t.name,r,e.graph,e.context))))),i.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(i.auxiliaryPatterns)),r=!1;break}if("graph"===n.name.value){const r=this.util.handleNodeValue(n.value,t.name.value,e);if(1!==r.terms.length)throw new Error(`Only single values can be set as graph, but got ${r.terms.length} at ${t.name.value}`);h=r.terms[0],e=Object.assign(Object.assign({},e),{graph:h}),r.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(r.auxiliaryPatterns));break}if("alt"===n.name.value){let r=n.value;"ListValue"!==r.kind&&(r={kind:"ListValue",values:[r]}),l.push(this.util.createQuadPath(e.subject,t.name,r,p,e.graph,e.context)),f=!1;break}}if(r&&f&&l.push(this.util.operationFactory.createBgp([this.util.createQuadPattern(e.subject,t.name,p,e.graph,e.context)])),t.arguments&&t.arguments.length)for(const r of t.arguments)if("_"===r.name.value||"graph"===r.name.value||"alt"===r.name.value);else if("first"===r.name.value){if("IntValue"!==r.value.kind)throw new Error("Invalid value type for 'first' argument: "+r.value.kind);s=parseInt(r.value.value,10)}else if("offset"===r.name.value){if("IntValue"!==r.value.kind)throw new Error("Invalid value type for 'offset' argument: "+r.value.kind);c=parseInt(r.value.value,10)}else{const t=this.util.handleNodeValue(r.value,r.name.value,e);l.push(this.util.operationFactory.createBgp(t.terms.map((t=>this.util.createQuadPattern(p,r.name,t,e.graph,e.context))))),t.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(t.auxiliaryPatterns))}const g=this.getDirectiveOutputs(t.directives,u,e);if(!g)return this.util.operationFactory.createBgp([]);let m=this.util.joinOperations(l);if(t.selectionSet&&t.selectionSet.selections.length){if(y){if(1!==y.length)throw new Error(`Only single values can be set as id, but got ${y.length} at ${t.name.value}`);p=y[0]}const r=Object.assign(Object.assign(Object.assign({},e),o?{path:this.util.appendFieldToPath(e.path,u)}:{}),{graph:h,subject:o?p:e.subject});let n=!1;const i=t.selectionSet.selections.filter((e=>"Field"!==e.kind||"totalCount"!==e.name.value||(n=!0,!1)));let a=this.util.joinOperations(l.concat(i.map((e=>this.util.handleNode(e,r)))));if(n){const t=this.util.dataFactory.variable("var"+this.settings.expressionVariableCounter++),r=this.util.dataFactory.variable(p.value+this.settings.variableDelimiter+"totalCount"),n=this.util.operationFactory.createBoundAggregate(t,"count",this.util.operationFactory.createTermExpression(p),!1),o=this.util.operationFactory.createProject(this.util.operationFactory.createExtend(this.util.operationFactory.createGroup(m,[],[n]),r,this.util.operationFactory.createTermExpression(t)),[r]);e.terminalVariables.push(r),a=i.length?this.util.operationFactory.createJoin([this.util.operationFactory.createProject(a,[]),o]):o}m=a}else r&&"Variable"===p.termType&&e.terminalVariables.push(p);return(c||s)&&(m=this.util.operationFactory.createSlice(this.util.operationFactory.createProject(m,n.Util.inScopeVariables(m)),c,s)),this.handleDirectiveOutputs(g,m)}handleMetaField(e,t,r){if("__typename"===t){const n=this.util.nameToVariable(t,e);return e.terminalVariables.push(n),this.util.operationFactory.createBgp([this.util.operationFactory.createPattern(e.subject,this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),this.util.nameToVariable(t,e),e.graph)].concat(r||[]))}}}t.NodeHandlerSelectionAdapter=o},15790:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionField=void 0;const n=r(97285);class i extends n.NodeHandlerSelectionAdapter{constructor(e,t){super("Field",e,t)}handle(e,t){return this.fieldToOperation(t,e,!0)}}t.NodeHandlerSelectionField=i},39555:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionFragmentSpread=void 0;const n=r(97285);class i extends n.NodeHandlerSelectionAdapter{constructor(e,t){super("FragmentSpread",e,t)}handle(e,t){const r=t.fragmentDefinitions[e.name.value];if(!r)throw new Error("Undefined fragment definition: "+e.name.value);const n={alias:void 0,arguments:void 0,directives:r.directives,kind:"Field",name:e.name,selectionSet:r.selectionSet},i=[this.util.newTypePattern(t.subject,r.typeCondition,t)];return this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),this.fieldToOperation(t,n,!1,i))}}t.NodeHandlerSelectionFragmentSpread=i},89509:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeHandlerSelectionInlineFragment=void 0;const n=r(97285);class i extends n.NodeHandlerSelectionAdapter{constructor(e,t){super("InlineFragment",e,t)}handle(e,t){const r={alias:void 0,arguments:void 0,directives:e.directives,kind:"Field",name:{kind:"Name",value:t.subject.value},selectionSet:e.selectionSet},n=e.typeCondition?[this.util.newTypePattern(t.subject,e.typeCondition,t)]:[];return this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),this.fieldToOperation(t,r,!1,n))}}t.NodeHandlerSelectionInlineFragment=i},62096:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerAdapter=void 0,t.DirectiveNodeHandlerAdapter=class{constructor(e,t,r){this.targetKind=e,this.util=t,this.settings=r}getDirectiveConditionalValue(e,t){const r=this.util.getArgument(e.arguments,"if");if(!r)throw new Error(`The directive ${e.name.value} is missing an if-argument.`);const n=this.util.handleNodeValue(r.value,r.name.value,t);if(1!==n.terms.length)throw new Error(`Can not apply the directive ${e.name.value} with a list.`);return n.terms[0]}isDirectiveScopeAll(e){const t=this.util.getArgument(e.arguments,"scope");return t&&"EnumValue"===t.value.kind&&"all"===t.value.value}}},5095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerInclude=void 0;const n=r(62096);class i extends n.DirectiveNodeHandlerAdapter{constructor(e,t){super("include",e,t)}handle(e,t){const r=this.getDirectiveConditionalValue(e.directive,t);return"Literal"===r.termType&&"false"===r.value?{ignore:!0}:{}}}t.DirectiveNodeHandlerInclude=i},61151:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerOptional=void 0;const n=r(62096);class i extends n.DirectiveNodeHandlerAdapter{constructor(e,t){super("optional",e,t)}handle(e,t){return{operationOverrider:e=>this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),e)}}}t.DirectiveNodeHandlerOptional=i},11013:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerPlural=void 0;const n=r(17762),i=r(62096);class a extends i.DirectiveNodeHandlerAdapter{constructor(e,t){super("plural",e,t)}handle(e,t){return this.isDirectiveScopeAll(e.directive)&&(t.singularizeState=n.SingularizeState.PLURAL),delete t.singularizeVariables[this.util.nameToVariable(e.fieldLabel,t).value],{}}}t.DirectiveNodeHandlerPlural=a},60479:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerSingle=void 0;const n=r(17762),i=r(62096);class a extends i.DirectiveNodeHandlerAdapter{constructor(e,t){super("single",e,t)}handle(e,t){return this.isDirectiveScopeAll(e.directive)&&(t.singularizeState=n.SingularizeState.SINGLE),t.singularizeVariables[this.util.nameToVariable(e.fieldLabel,t).value]=!0,{}}}t.DirectiveNodeHandlerSingle=a},88320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveNodeHandlerSkip=void 0;const n=r(62096);class i extends n.DirectiveNodeHandlerAdapter{constructor(e,t){super("skip",e,t)}handle(e,t){const r=this.getDirectiveConditionalValue(e.directive,t);return"Literal"===r.termType&&"true"===r.value?{ignore:!0}:{}}}t.DirectiveNodeHandlerSkip=i},96414: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(62096),t),i(r(5095),t),i(r(61151),t),i(r(11013),t),i(r(60479),t),i(r(88320),t)},51812: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(96414),t),i(r(31998),t),i(r(14009),t),i(r(94058),t),i(r(73045),t),i(r(9540),t),i(r(9373),t),i(r(97285),t),i(r(15790),t),i(r(39555),t),i(r(89509),t)},81652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerAdapter=void 0,t.NodeValueHandlerAdapter=class{constructor(e,t,r){this.targetKind=e,this.util=t,this.settings=r}}},95347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerBoolean=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("BooleanValue",e,t),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#boolean")}handle(e,t,r){return{terms:[this.util.dataFactory.literal(e.value?"true":"false",this.datatype)]}}}t.NodeValueHandlerBoolean=i},87822:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerEnum=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("EnumValue",e,t)}handle(e,t,r){return{terms:[this.util.valueToNamedNode(e.value,r.context)]}}}t.NodeValueHandlerEnum=i},5797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerFloat=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("FloatValue",e,t),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#float")}handle(e,t,r){return{terms:[this.util.dataFactory.literal(e.value,this.datatype)]}}}t.NodeValueHandlerFloat=i},18338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerInt=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("IntValue",e,t),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#integer")}handle(e,t,r){return{terms:[this.util.dataFactory.literal(e.value,this.datatype)]}}}t.NodeValueHandlerInt=i},70727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerList=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("ListValue",e,t),this.nodeFirst=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),this.nodeRest=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),this.nodeNil=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")}handle(e,t,r){const n=[];let i=[];for(const a of e.values){const e=this.util.handleNodeValue(a,t,r);for(const t of e.terms)n.push(t);e.auxiliaryPatterns&&(i=i.concat(e.auxiliaryPatterns))}if(this.settings.arraysToRdfLists){const e=this.util.dataFactory.blankNode();let t=e,a=n.length;for(const e of n){i.push(this.util.operationFactory.createPattern(t,this.nodeFirst,e,r.graph));const n=0==--a?this.nodeNil:this.util.dataFactory.blankNode();i.push(this.util.operationFactory.createPattern(t,this.nodeRest,n,r.graph)),t=n}return{terms:[e],auxiliaryPatterns:i}}return{terms:n,auxiliaryPatterns:i}}}t.NodeValueHandlerList=i},13294:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerNull=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("NullValue",e,t),this.nil=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")}handle(e,t,r){return{terms:[this.nil]}}}t.NodeValueHandlerNull=i},41756:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerObject=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("ObjectValue",e,t)}handle(e,t,r){const n=this.util.dataFactory.blankNode();let i=[];for(const a of e.fields){const e=this.util.handleNodeValue(a.value,t,r);for(const t of e.terms)i.push(this.util.createQuadPattern(n,a.name,t,r.graph,r.context));e.auxiliaryPatterns&&(i=i.concat(e.auxiliaryPatterns))}return{terms:[n],auxiliaryPatterns:i}}}t.NodeValueHandlerObject=i},26906:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerString=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("StringValue",e,t)}handle(e,t,r){const n=r.context.getContextRaw()[t];let i,a;return n&&"string"!=typeof n&&(n["@language"]?i=n["@language"]:n["@type"]&&(a=this.util.dataFactory.namedNode(n["@type"]))),{terms:[this.util.dataFactory.literal(e.value,i||a)]}}}t.NodeValueHandlerString=i},47959:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeValueHandlerVariable=void 0;const n=r(81652);class i extends n.NodeValueHandlerAdapter{constructor(e,t){super("Variable",e,t)}handle(e,t,r){const n=e.name.value,i=r.variablesDict[n],a=r.variablesMetaDict[n];if(!i){if(r.ignoreUnknownVariables||a&&!a.mandatory){const e=this.util.dataFactory.variable(n);return r.terminalVariables.map((e=>e.value)).indexOf(n)<0&&r.terminalVariables.push(e),{terms:[e]}}throw new Error(`Undefined variable: ${n}`)}if("Variable"===i.kind)throw new Error(`Variable refers to another variable: ${n}`);if(a)if(a.list){if("ListValue"!==i.kind)throw new Error(`Expected a list, but got ${i.kind} for ${n}`);if(a.type){const e=i;for(const t of e.values)if(t.kind!==a.type)throw new Error(`Expected ${a.type}, but got ${t.kind} for ${n}`)}}else a.type;return this.util.handleNodeValue(i,t,r)}}t.NodeValueHandlerVariable=i},31998: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(81652),t),i(r(95347),t),i(r(87822),t),i(r(5797),t),i(r(18338),t),i(r(70727),t),i(r(13294),t),i(r(41756),t),i(r(26906),t),i(r(47959),t)},91525:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.toSparqlJs=t.toSparql=t.Factory=t.Algebra=t.translate=void 0;const s=o(r(16026));t.translate=s.default;const c=a(r(38849));t.Algebra=c;const u=o(r(67063));t.Factory=u.default;const l=r(96180);Object.defineProperty(t,"toSparql",{enumerable:!0,get:function(){return l.toSparql}}),Object.defineProperty(t,"toSparqlJs",{enumerable:!0,get:function(){return l.toSparqlJs}});const d=o(r(75885));t.Util=d.default},38849:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.expressionTypes=t.types=void 0,(n=t.types||(t.types={})).ALT="alt",n.ASK="ask",n.BGP="bgp",n.CONSTRUCT="construct",n.DESCRIBE="describe",n.DISTINCT="distinct",n.EXPRESSION="expression",n.EXTEND="extend",n.FILTER="filter",n.FROM="from",n.GRAPH="graph",n.GROUP="group",n.INV="inv",n.JOIN="join",n.LEFT_JOIN="leftjoin",n.LINK="link",n.MINUS="minus",n.NOP="nop",n.NPS="nps",n.ONE_OR_MORE_PATH="OneOrMorePath",n.ORDER_BY="orderby",n.PATH="path",n.PATTERN="pattern",n.PROJECT="project",n.REDUCED="reduced",n.SEQ="seq",n.SERVICE="service",n.SLICE="slice",n.UNION="union",n.VALUES="values",n.ZERO_OR_MORE_PATH="ZeroOrMorePath",n.ZERO_OR_ONE_PATH="ZeroOrOnePath",n.COMPOSITE_UPDATE="compositeupdate",n.DELETE_INSERT="deleteinsert",n.LOAD="load",n.CLEAR="clear",n.CREATE="create",n.DROP="drop",n.ADD="add",n.MOVE="move",n.COPY="copy",(r=t.expressionTypes||(t.expressionTypes={})).AGGREGATE="aggregate",r.EXISTENCE="existence",r.NAMED="named",r.OPERATOR="operator",r.TERM="term",r.WILDCARD="wildcard"},67063:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const o=a(r(38849)),s=r(18050),c=r(22112),u=r(55403);t.default=class{constructor(e){this.dataFactory=e||new s.DataFactory,this.stringType=this.createTerm("http://www.w3.org/2001/XMLSchema#string")}createAlt(e,t=!0){return this.flattenMulti({type:o.types.ALT,input:e},t)}createAsk(e){return{type:o.types.ASK,input:e}}createBoundAggregate(e,t,r,n,i){const a=this.createAggregateExpression(t,r,n,i);return a.variable=e,a}createBgp(e){return{type:o.types.BGP,patterns:e}}createConstruct(e,t){return{type:o.types.CONSTRUCT,input:e,template:t}}createDescribe(e,t){return{type:o.types.DESCRIBE,input:e,terms:t}}createDistinct(e){return{type:o.types.DISTINCT,input:e}}createExtend(e,t,r){return{type:o.types.EXTEND,input:e,variable:t,expression:r}}createFrom(e,t,r){return{type:o.types.FROM,input:e,default:t,named:r}}createFilter(e,t){return{type:o.types.FILTER,input:e,expression:t}}createGraph(e,t){return{type:o.types.GRAPH,input:e,name:t}}createGroup(e,t,r){return{type:o.types.GROUP,input:e,variables:t,aggregates:r}}createInv(e){return{type:o.types.INV,path:e}}createJoin(e,t=!0){return this.flattenMulti({type:o.types.JOIN,input:e},t)}createLeftJoin(e,t,r){return r?{type:o.types.LEFT_JOIN,input:[e,t],expression:r}:{type:o.types.LEFT_JOIN,input:[e,t]}}createLink(e){return{type:o.types.LINK,iri:e}}createMinus(e,t){return{type:o.types.MINUS,input:[e,t]}}createNop(){return{type:o.types.NOP}}createNps(e){return{type:o.types.NPS,iris:e}}createOneOrMorePath(e){return{type:o.types.ONE_OR_MORE_PATH,path:e}}createOrderBy(e,t){return{type:o.types.ORDER_BY,input:e,expressions:t}}createPath(e,t,r,n){return n?{type:o.types.PATH,subject:e,predicate:t,object:r,graph:n}:{type:o.types.PATH,subject:e,predicate:t,object:r,graph:this.dataFactory.defaultGraph()}}createPattern(e,t,r,n){const i=this.dataFactory.quad(e,t,r,n);return i.type=o.types.PATTERN,i}createProject(e,t){return{type:o.types.PROJECT,input:e,variables:t}}createReduced(e){return{type:o.types.REDUCED,input:e}}createSeq(e,t=!0){return this.flattenMulti({type:o.types.SEQ,input:e},t)}createService(e,t,r){return{type:o.types.SERVICE,input:e,name:t,silent:Boolean(r)}}createSlice(e,t,r){return t=t||0,void 0!==r?{type:o.types.SLICE,input:e,start:t,length:r}:{type:o.types.SLICE,input:e,start:t}}createUnion(e,t=!0){return this.flattenMulti({type:o.types.UNION,input:e},t)}createValues(e,t){return{type:o.types.VALUES,variables:e,bindings:t}}createZeroOrMorePath(e){return{type:o.types.ZERO_OR_MORE_PATH,path:e}}createZeroOrOnePath(e){return{type:o.types.ZERO_OR_ONE_PATH,path:e}}createAggregateExpression(e,t,r,n){return n?{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,separator:n,distinct:r}:{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,distinct:r}}createExistenceExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.EXISTENCE,not:e,input:t}}createNamedExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.NAMED,name:e,args:t}}createOperatorExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.OPERATOR,operator:e,args:t}}createTermExpression(e){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.TERM,term:e}}createWildcardExpression(){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.WILDCARD,wildcard:new u.Wildcard}}createTerm(e){return(0,c.stringToTerm)(e,this.dataFactory)}createCompositeUpdate(e){return{type:o.types.COMPOSITE_UPDATE,updates:e}}createDeleteInsert(e,t,r){const n={type:o.types.DELETE_INSERT};return e&&(n.delete=e),t&&(n.insert=t),r&&(n.where=r),n}createLoad(e,t,r){const n={type:o.types.LOAD,source:e};return t&&(n.destination=t),this.addSilent(n,Boolean(r))}createClear(e,t){return this.addSilent({type:o.types.CLEAR,source:e},Boolean(t))}createCreate(e,t){return this.addSilent({type:o.types.CREATE,source:e},Boolean(t))}createDrop(e,t){return this.addSilent({type:o.types.DROP,source:e},Boolean(t))}createAdd(e,t,r){return this.addSilent({type:o.types.ADD,source:e,destination:t},Boolean(r))}createMove(e,t,r){return this.addSilent({type:o.types.MOVE,source:e,destination:t},Boolean(r))}createCopy(e,t,r){return this.addSilent({type:o.types.COPY,source:e,destination:t},Boolean(r))}addSilent(e,t){return t&&(e.silent=t),e}flattenMulti(e,t){if(!t)return e;const r=e.type,n=e.input;let i=[];for(const e of n)e.type===r?i.push(...e.input):i.push(e);return e.input=i,e}}},96180:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.toSparqlJs=t.toSparql=void 0;const s=r(91032),c=r(22112),u=r(55403),l=a(r(38849)),d=o(r(67063)),p=o(r(75885)),h=l.types,f=l.expressionTypes;let y;const g=new d.default;function m(e){b();let t=v(e=function(e){return D(e,[])}(e));return"group"===t.type?t.patterns[0]:t}function b(){y={project:!1,extend:[],group:[],aggregates:[],order:[]}}function v(e){switch(e.type!==h.EXTEND&&e.type!==h.ORDER_BY&&e.type!==h.GRAPH&&(y.project=!1),e.type){case h.EXPRESSION:return _(e);case h.ASK:return A(e,h.ASK);case h.BGP:return function(e){let t=e.patterns.map(E);return 0===t.length?null:{type:"bgp",triples:t}}(e);case h.CONSTRUCT:return function(e){return{type:"query",prefixes:{},queryType:"CONSTRUCT",template:e.template.map(E),where:p.default.flatten([v(e.input)])}}(e);case h.DESCRIBE:return A(e,h.DESCRIBE);case h.DISTINCT:return function(e){let t=v(e.input);return t.patterns[0].distinct=!0,t}(e);case h.EXTEND:return function(e){return y.project?(y.extend.push(e),v(e.input)):p.default.flatten([v(e.input),{type:"bind",variable:e.variable,expression:_(e.expression)}])}(e);case h.FROM:return function(e){const t=v(e.input);let r=t;return"group"===t.type&&(r=t.patterns[0]),r.from={default:e.default,named:e.named},t}(e);case h.FILTER:return function(e){return{type:"group",patterns:p.default.flatten([v(e.input),{type:"filter",expression:_(e.expression)}])}}(e);case h.GRAPH:return function(e){return{type:"graph",patterns:p.default.flatten([v(e.input)]),name:e.name}}(e);case h.GROUP:return function(e){const t=v(e.input),r=e.aggregates.map(O);return y.aggregates.push(...r),y.group.push(...e.variables),t}(e);case h.JOIN:return function(e){return p.default.flatten(e.input.map(v)).reduce(((e,t)=>("bgp"!==t.type||0==e.length||"bgp"!==e[e.length-1].type?e.push(t):e[e.length-1].triples.push(...t.triples),e)),[])}(e);case h.LEFT_JOIN:return function(e){const t={type:"optional",patterns:[v(e.input[1])]};return e.expression&&t.patterns.push({type:"filter",expression:_(e.expression)}),t.patterns=p.default.flatten(t.patterns),p.default.flatten([v(e.input[0]),t])}(e);case h.MINUS:return function(e){let t=v(e.input[1]);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),p.default.flatten([v(e.input[0]),{type:"minus",patterns:t}])}(e);case h.NOP:return{};case h.ORDER_BY:return function(e){return y.order.push(...e.expressions),v(e.input)}(e);case h.PATH:return function(e){return{type:"bgp",triples:[{subject:e.subject,predicate:w(e.predicate),object:e.object}]}}(e);case h.PATTERN:return E(e);case h.PROJECT:return A(e,h.PROJECT);case h.REDUCED:return function(e){let t=v(e.input);return t.patterns[0].reduced=!0,t}(e);case h.SERVICE:return function(e){let t=v(e.input);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),{type:"service",name:e.name,silent:e.silent,patterns:t}}(e);case h.SLICE:return function(e){let t=v(e.input),r=t;return t.type&&"group"===t.type&&(r=t.patterns[0]),0!==e.start&&(r.offset=e.start),void 0!==e.length&&(r.limit=e.length),t}(e);case h.UNION:return function(e){return{type:"union",patterns:e.input.map(v).map(S)}}(e);case h.VALUES:return function(e){return{type:"values",values:e.bindings.map((t=>{let r={};for(let n of e.variables){let e=`?${n.value}`;t[e]?r[e]=t[e]:r[e]=void 0}return r}))}}(e);case h.COMPOSITE_UPDATE:return function(e){return{prefixes:{},type:"update",updates:e.updates.map((e=>v(e).updates[0]))}}(e);case h.DELETE_INSERT:return function(e){var t;let r,n=e.where;if(n&&n.type===h.FROM){let e=n;n=e.input,r={default:e.default,named:e.named}}const i=[{updateType:"insertdelete",delete:N(e.delete||[]),insert:N(e.insert||[])}];if(r&&(i[0].using=r),!n||n.type===h.BGP&&0===n.patterns.length)i[0].where=[];else{const e=[];let r=v(D(n,e));if("group"===r.type?i[0].where=r.patterns:i[0].where=[r],e.length>0){if(1!==e.length)throw new Error("This is unexpected and might indicate an error in graph handling for updates.");""!==(null===(t=e[0])||void 0===t?void 0:t.value)&&(i[0].where=[{type:"graph",patterns:i[0].where,name:e[0]}])}}return e.delete||e.where?e.insert||e.where?!e.insert&&e.where&&"bgp"===e.where.type&&(0,s.isomorphic)(e.delete,e.where.patterns)&&(delete i[0].where,i[0].updateType="deletewhere"):(delete i[0].insert,delete i[0].where,e.delete.some((e=>"Variable"===e.subject.termType||"Variable"===e.predicate.termType||"Variable"===e.object.termType))?i[0].updateType="deletewhere":i[0].updateType="delete"):(i[0].updateType="insert",delete i[0].delete,delete i[0].where),{prefixes:{},type:"update",updates:i}}(e);case h.LOAD:return function(e){const t=[{type:"load",silent:Boolean(e.silent),source:e.source}];return e.destination&&(t[0].destination=e.destination),{prefixes:{},type:"update",updates:t}}(e);case h.CLEAR:return function(e){return I(e,"clear")}(e);case h.CREATE:return function(e){return I(e,"create")}(e);case h.DROP:return function(e){return I(e,"drop")}(e);case h.ADD:return function(e){return P(e,"add")}(e);case h.MOVE:return function(e){return P(e,"move")}(e);case h.COPY:return function(e){return P(e,"copy")}(e)}throw new Error(`Unknown Operation type ${e.type}`)}function _(e){switch(e.expressionType){case f.AGGREGATE:return function(e){const t={expression:_(e.expression),type:"aggregate",aggregation:e.aggregator,distinct:e.distinct};return e.separator&&(t.separator=e.separator),t}(e);case f.EXISTENCE:return function(e){return{type:"operation",operator:e.not?"notexists":"exists",args:p.default.flatten([v(e.input)])}}(e);case f.NAMED:return function(e){return{type:"functionCall",function:e.name,args:e.args.map(_)}}(e);case f.OPERATOR:return function(e){if("desc"===e.operator){return{expression:_(e.args[0]),descending:!0}}const t={type:"operation",operator:e.operator,args:e.args.map(_)};return"in"!==t.operator&&"notin"!==t.operator||(t.args=[t.args[0]].concat([t.args.slice(1)])),t}(e);case f.TERM:return function(e){return e.term}(e);case f.WILDCARD:return function(e){return e.wildcard}(e)}throw new Error(`Unknown Expression Operation type ${e.expressionType}`)}function w(e){switch(e.type){case h.ALT:return function(e){const t=e.input.map(w);return t.every((e=>"pathType"in e&&"!"===e.pathType))?{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:p.default.flatten(t.map((e=>e.items)))}]}:{type:"path",pathType:"|",items:t}}(e);case h.INV:return function(e){if(e.path.type===h.NPS){const t=e.path.iris.map((e=>({type:"path",pathType:"^",items:[e]})));return t.length<=1?{type:"path",pathType:"!",items:t}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:t}]}}return{type:"path",pathType:"^",items:[w(e.path)]}}(e);case h.LINK:return function(e){return e.iri}(e);case h.NPS:return function(e){return e.iris.length<=1?{type:"path",pathType:"!",items:e.iris}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:e.iris}]}}(e);case h.ONE_OR_MORE_PATH:return function(e){return{type:"path",pathType:"+",items:[w(e.path)]}}(e);case h.SEQ:return function(e){return{type:"path",pathType:"/",items:e.input.map(w)}}(e);case h.ZERO_OR_MORE_PATH:return function(e){return{type:"path",pathType:"*",items:[w(e.path)]}}(e);case h.ZERO_OR_ONE_PATH:return function(e){return{type:"path",pathType:"?",items:[w(e.path)]}}(e)}throw new Error(`Unknown Path type ${e.type}`)}function T(e){return(0,c.termToString)(e)}function S(e){return Array.isArray(e)?1===e.length?e[0]:{type:"group",patterns:e}:e}function O(e){return e}function E(e){return{subject:e.subject,predicate:e.predicate,object:e.object}}function x(e,t){let r=p.default.isSimpleTerm(e)?T(e):e;if("string"==typeof r){if(t[r])return t[r]}else if(Array.isArray(e))e=e.map((e=>x(e,t)));else for(let r of Object.keys(e))e[r]=x(e[r],t);return e}function A(e,t){const r={type:"query",prefixes:{}},n=r;let i;t===h.PROJECT?(r.queryType="SELECT",i=e.variables):t===h.ASK?r.queryType="ASK":t===h.DESCRIBE&&(r.queryType="DESCRIBE",i=e.terms);const a=y.extend,o=y.group,s=y.aggregates,c=y.order;b(),y.project=!0;let l=p.default.flatten([v(e.input)]);1===l.length&&"group"===l[0].type&&(l=l[0].patterns),r.where=l;let d={};for(let e of y.aggregates)d[T(e.variable)]=_(e);let f={};for(let e=y.extend.length-1;e>=0;--e){let t=y.extend[e];f[T(t.variable)]=x(_(t.expression),d)}if(y.group.length>0&&(n.group=y.group.map((e=>{let t=T(e);if(f[t]){let r=f[t];return delete f[t],{variable:e,expression:r}}return{expression:e}}))),y.order.length>0&&(n.order=y.order.map(v).map((e=>e.descending?e:{expression:e}))),i&&(n.variables=i.map((e=>{let t=T(e);return f[t]?{variable:e,expression:f[t]}:e})),0===n.variables.length&&(n.variables=[new u.Wildcard])),r.where.length>0&&"filter"===r.where[r.where.length-1].type){const e=r.where[r.where.length-1];R(e,Object.keys(d))&&(n.having=p.default.flatten([x(e.expression,d)]),r.where.splice(-1))}return y.extend=a,y.group=o,y.aggregates=s,y.order=c,{type:"group",patterns:[n]}}function R(e,t){return p.default.isSimpleTerm(e)?t.indexOf(T(e))>=0:Array.isArray(e)?e.some((e=>R(e,t))):e===Object(e)?Object.keys(e).some((r=>R(e[r],t))):t.indexOf(e)>=0}function I(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return"DEFAULT"===e.source?r[0].graph={default:!0}:"NAMED"===e.source?r[0].graph={named:!0}:"ALL"===e.source?r[0].graph={all:!0}:r[0].graph={type:"graph",name:e.source},{prefixes:{},type:"update",updates:r}}function P(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return r[0].source="DEFAULT"===e.source?{type:"graph",default:!0}:{type:"graph",name:e.source},r[0].destination="DEFAULT"===e.destination?{type:"graph",default:!0}:{type:"graph",name:e.destination},{prefixes:{},type:"update",updates:r}}function N(e){if(!e)return[];const t={};return e.forEach((e=>{const r=e.graph.value;t[r]||(t[r]=[]),t[r].push(e)})),Object.keys(t).map((e=>""===e?{type:"bgp",triples:t[e].map(E)}:{type:"graph",triples:t[e].map(E),name:t[e][0].graph}))}function D(e,t){if(Array.isArray(e))return e.map((e=>D(e,t)));if(!e.type)return e;if(e.type===h.DELETE_INSERT)return e;if((e.type===h.PATTERN||e.type===h.PATH)&&e.graph)return t.push(e.graph),""!==e.graph.name?e.type===h.PATTERN?g.createPattern(e.subject,e.predicate,e.object):g.createPath(e.subject,e.predicate,e.object):e;const r={},n={},i={};for(let t of Object.keys(e)){const a=[];if(r[t]=D(e[t],a),a.length>0){n[t]=a;for(const e of a)i[e.value]=e}}const a=Object.keys(i);if(a.length>0)if(1!==a.length||[h.PROJECT,h.SERVICE].includes(e.type)){if(e.type===h.BGP)return function(e,t){var r;const n={};for(let i=0;i""===n[e][0].value?t:g.createGraph(t,n[e][r]))):""!==n[e][0].value&&(r[e]=g.createGraph(t,n[e][0]))}}else t.push(i[a[0]]);return r}t.toSparql=function(e,t={}){return new u.Generator(t).stringify(m(e))},t.toSparqlJs=m},16026:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(53933),c=r(22112),u=a(r(38849)),l=o(r(67063)),d=o(r(75885)),p=r(55403).Parser,h=u.types;let f,y=new Set,g=0,m=!1;function b(e,t,r){if(y=new Set,g=0,m=Boolean(t),!e.type)return f.createNop();if("query"!==e.type&&"update"!==e.type)throw new Error("Translate only works on complete query or update objects.");let n;var i;return w(e),"query"===e.type?(n=S({type:"group",patterns:e.where||[]}),n=function(e,t){const r=e,n=[],i={};if(r.variables=r.variables&&r.variables.map((e=>C(e,i))),r.having=r.having&&r.having.map((e=>C(e,i))),r.order=r.order&&r.order.map((e=>C(e,i))),r.group||Object.keys(i).length>0){const e=Object.keys(i).map((e=>function(e,t){if("aggregate"!==e.type||!e.aggregation)throw new Error(`Unexpected input: ${JSON.stringify(e)}`);const r=O(e);return r.variable=t,r}(i[e],f.createTerm(e)))),n=[];if(r.group)for(const e of r.group)if(d.default.isSimpleTerm(e.expression))n.push(e.expression);else{const r="variable"in e?e.variable:A();t=f.createExtend(t,r,O(e.expression)),n.push(r)}t=f.createGroup(t,n,e)}if(r.having)for(let e of r.having)t=f.createFilter(t,O(e));e.values&&(t=f.createJoin([t,j(e)]));let a=[];if("SELECT"===e.queryType||"DESCRIBE"===e.queryType)if(e.variables.some((e=>e&&d.default.isWildcard(e))))a=Object.values(T(e)).sort(((e,t)=>e.value.localeCompare(t.value)));else for(let t of e.variables)_(t)||!("variable"in t)?a.push(t):t.variable&&(a.push(t.variable),n.push(t));for(let e of n)t=f.createExtend(t,e.variable,O(e.expression));return r.order&&(t=f.createOrderBy(t,r.order.map((e=>{let t=O(e.expression);return e.descending&&(t=f.createOperatorExpression("desc",[t])),t})))),"SELECT"===e.queryType&&(t=f.createProject(t,a)),r.distinct&&(t=f.createDistinct(t)),r.reduced&&(t=f.createReduced(t)),"CONSTRUCT"===e.queryType?t=f.createConstruct(t,(e.template||[]).map(R)):"ASK"===e.queryType?t=f.createAsk(t):"DESCRIBE"===e.queryType&&(t=f.createDescribe(t,a)),(r.offset||r.limit)&&(t=f.createSlice(t,r.offset||0,r.limit)),r.from&&(t=f.createFrom(t,r.from.default,r.from.named)),t}(e,n)):"update"===e.type&&(n=1===(i=e).updates.length?M(i.updates[0]):f.createCompositeUpdate(i.updates.map(M))),r&&(n=k(n)),n}function v(e){return Boolean(null==e?void 0:e.termType)}function _(e){return"Variable"===(null==e?void 0:e.termType)}function w(e){if(v(e))_(e)&&y.add(`?${e.value}`);else if(Array.isArray(e))for(const t of e)w(t);else if(e&&"object"==typeof e)for(let t of Object.keys(e))t.startsWith("?")&&y.add(t),w(e[t])}function T(e){let t={};if((r=e).subject&&r.predicate&&r.object){const r=[T(e.subject),T(e.predicate),T(e.object),e.graph?T(e.graph):{}];Object.assign(t,...r)}else if(v(e))_(e)&&(t[e.value]=e);else if("bgp"===e.type){const r=e.triples;Object.assign(t,...r.map(T))}else if("path"===e.type)Object.assign(t,...e.items.map(T));else if("group"===e.type||"union"===e.type||"optional"===e.type)Object.assign(t,...e.patterns.map(T));else if("service"===e.type||"graph"===e.type)Object.assign(t,T(e.name)),Object.assign(t,...e.patterns.map(T));else if("bind"===e.type)Object.assign(t,T(e.variable));else if("values"===e.type){if(e.values.length>0){const r=Object.keys(e.values[0]).map((e=>f.createTerm(e)));Object.assign(t,...r.map(T))}}else if("query"===e.type&&("SELECT"===e.queryType||"DESCRIBE"===e.queryType)){e.where&&e.variables.some(d.default.isWildcard)&&Object.assign(t,...e.where.map(T));for(const r of e.variables)_(r)?Object.assign(t,T(r)):r.variable&&Object.assign(t,T(r.variable));if("SELECT"===e.queryType){if(e.group)for(const r of e.group)r.variable&&Object.assign(t,T(r.variable));if(e.values){const r={type:"values",values:e.values};Object.assign(t,T(r))}}}var r;return t}function S(e){if("bgp"===e.type)return function(e){let t=[],r=[];for(let i of e.triples)if("pathType"in i.predicate){let e=x((n=i).subject,E(n.predicate),n.object);for(let n of e)n.type===h.PATH?(t.length>0&&r.push(f.createBgp(t)),t=[],r.push(n)):t.push(n)}else t.push(R(i));var n;return t.length>0&&r.push(f.createBgp(t)),1===r.length?r[0]:f.createJoin(r)}(e);if("union"===e.type)return f.createUnion(e.patterns.map((e=>("group"!==e.type&&(e={type:"group",patterns:[e]}),S(e)))));if("graph"===e.type){let t=S({type:"group",patterns:e.patterns});return t=m?P(t,e.name):f.createGraph(t,e.name),t}if("values"===e.type)return j(e);if("query"===e.type)return b(e,m,!1);if("group"===e.type){let t=[],r=[];for(let n of e.patterns)("filter"===n.type?t:r).push(n);let n=r.reduce(N,f.createBgp([])),i=t.map((e=>O(e.expression)));return i.length>0&&(n=f.createFilter(n,i.reduce(((e,t)=>f.createOperatorExpression("&&",[e,t]))))),n}throw new Error(`Unexpected type: ${e.type}`)}function O(e){if(d.default.isSimpleTerm(e))return f.createTermExpression(e);if(d.default.isQuad(e))return d.default.hasQuadVariables(e)?f.createOperatorExpression("triple",[O(e.subject),O(e.predicate),O(e.object)]):f.createTermExpression(e);if(d.default.isWildcard(e))return f.createWildcardExpression();if("aggregation"in e)return f.createAggregateExpression(e.aggregation,O(e.expression),Boolean(e.distinct),e.separator);if("function"in e)return f.createNamedExpression(e.function,e.args.map(O));if("operator"in e)return"exists"===e.operator||"notexists"===e.operator?f.createExistenceExpression("notexists"===e.operator,S(e.args[0])):("in"!==e.operator&&"notin"!==e.operator||(e.args=[e.args[0]].concat(e.args[1])),f.createOperatorExpression(e.operator,e.args.map(O)));throw new Error(`Unknown expression: ${JSON.stringify(e)}`)}function E(e){if(d.default.isSimpleTerm(e)){if("NamedNode"===e.termType)return f.createLink(e);throw new Error(`Path predicate should be a NamedNode, got ${JSON.stringify(e)}`)}if("^"===e.pathType)return f.createInv(E(e.items[0]));if("!"===e.pathType){let t,r=[],n=[];t="pathType"in e.items[0]&&"|"===e.items[0].pathType?e.items[0].items:e.items;for(let e of t)if(d.default.isSimpleTerm(e))r.push(e);else{if("^"!==e.pathType)throw new Error(`Unexpected item: ${JSON.stringify(e)}`);n.push(e.items[0])}let i=f.createNps(r),a=f.createInv(f.createNps(n));return 0===n.length?i:0===r.length?a:f.createAlt([i,a])}if("/"===e.pathType)return f.createSeq(e.items.map(E));if("|"===e.pathType)return f.createAlt(e.items.map(E));if("*"===e.pathType)return f.createZeroOrMorePath(E(e.items[0]));if("+"===e.pathType)return f.createOneOrMorePath(E(e.items[0]));if("?"===e.pathType)return f.createZeroOrOnePath(E(e.items[0]));throw new Error(`Unable to translate path expression ${JSON.stringify(e)}`)}function x(e,t,r){if(t.type===h.LINK)return[f.createPattern(e,t.iri,r)];if(t.type===h.INV)return x(r,t.path,e);if(t.type===h.SEQ){let n=e;return d.default.flatten(t.input.map(((e,i)=>{const a=i===t.input.length-1?r:A(),o=x(n,e,a);return"Variable"===a.termType&&(n=a),o})))}return[f.createPath(e,t,r)]}function A(){let e="?var"+g++;return y.has(e)?A():(y.add(e),f.createTerm(e))}function R(e){if("pathType"in e.predicate)throw new Error("Trying to translate property path to quad.");return f.createPattern(e.subject,e.predicate,e.object,e.graph)}t.default=function(e,t){let r;if(t=t||{},f=new l.default(t.dataFactory),"string"==typeof e){let n=new p(t);n._resetBlanks(),r=n.parse(e)}else r=e;return b(r,t.quads,t.blankToVariable)};let I=Object.values(h);function P(e,t,r){if(e.type===h.GRAPH){if(r)throw new Error("Recursing through nested GRAPH statements with a replacement is impossible.");e=P(e.input,e.name)}else if(e.type===h.SERVICE);else if(e.type===h.BGP)e.patterns=e.patterns.map((e=>(r&&(e.subject.equals(t)&&(e.subject=r),e.predicate.equals(t)&&(e.predicate=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t),e)));else if(e.type===h.PATH)r&&(e.subject.equals(t)&&(e.subject=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t);else if(e.type!==h.PROJECT||r)if(e.type!==h.EXTEND||r)for(let n of Object.keys(e))Array.isArray(e[n])?e[n]=e[n].map((e=>P(e,t,r))):I.indexOf(e[n].type)>=0?e[n]=P(e[n],t,r):r&&_(e[n])&&e[n].equals(t)&&(e[n]=r);else e.variable.equals(t)&&(r=A()),e.input=P(e.input,t,r);else e.variables.some((e=>e.equals(t)))||(r=A()),e.input=P(e.input,t,r);return e}function N(e,t){if("optional"===t.type){const r=S({type:"group",patterns:t.patterns});e=r.type===h.FILTER?f.createLeftJoin(e,r.input,r.expression):f.createLeftJoin(e,r)}else if("minus"===t.type){const r=S({type:"group",patterns:t.patterns});e=f.createMinus(e,r)}else if("bind"===t.type)e=f.createExtend(e,t.variable,O(t.expression));else if("service"===t.type){const r={type:"group",patterns:t.patterns};e=D(e,f.createService(S(r),t.name,t.silent))}else e=D(e,S(t));return e}function D(e,t){return e.type===h.BGP&&t.type===h.BGP?e=f.createBgp([...e.patterns,...t.patterns]):e.type===h.BGP&&0===e.patterns.length?e=t:t.type===h.BGP&&0===t.patterns.length||(e=f.createJoin([e,t])),e}function j(e){let t=(0===e.values.length?[]:Object.keys(e.values[0])).map(f.createTerm.bind(f)),r=e.values.map((e=>{let t=Object.keys(e);t=t.filter((t=>void 0!==e[t]));let r={};for(let n of t)r[n]=e[n];return r}));return f.createValues(t,r)}function C(e,t){if("type"in e&&"aggregate"===e.type){let r,n=!1;for(let i of Object.keys(t))if(s(t[i],e)){r=f.createTerm(i),n=!0;break}return n||(r=A(),t[(0,c.termToString)(r)]=e),r}return"expression"in e&&e.expression?{...e,expression:C(e.expression,t)}:"args"in e&&e.args?{...e,args:e.args.map((e=>C(e,t)))}:e}function M(e){if("type"in e){if("load"===e.type)return function(e){return f.createLoad(e.source,e.destination,e.silent)}(e);if("clear"===e.type||"create"===e.type||"drop"===e.type)return function(e){let t;switch(t=d.default.isSimpleTerm(e.graph)?e.graph:e.graph.all?"ALL":e.graph.default?"DEFAULT":e.graph.named?"NAMED":e.graph.name,e.type){case"clear":return f.createClear(t,e.silent);case"create":return f.createCreate(t,e.silent);case"drop":return f.createDrop(t,e.silent)}}(e);if("add"===e.type||"copy"===e.type||"move"===e.type)return function(e){const t=e.source.default?"DEFAULT":e.source.name,r=e.destination.default?"DEFAULT":e.destination.name;switch(e.type){case"copy":return f.createCopy(t,r,e.silent);case"move":return f.createMove(t,r,e.silent);case"add":return f.createAdd(t,r,e.silent)}}(e)}else if("insertdelete"===e.updateType||"deletewhere"===e.updateType||"delete"===e.updateType||"insert"===e.updateType)return function(e){if(!m)throw new Error("INSERT/DELETE operations are only supported with quads option enabled");let t,r=[],n=[];if(e.delete&&(r=d.default.flatten(e.delete.map((t=>L(t,e.graph))))),e.insert&&(n=d.default.flatten(e.insert.map((t=>L(t,e.graph))))),e.where&&e.where.length>0){t=S({type:"group",patterns:e.where});const r=e.using;r?t=f.createFrom(t,r.default,r.named):e.graph&&(t=P(t,e.graph))}else"deletewhere"===e.updateType&&r.length>0&&(t=f.createBgp(r));return f.createDeleteInsert(r.length>0?r:void 0,n.length>0?n:void 0,t)}(e);throw new Error(`Unknown update type ${JSON.stringify(e)}`)}function L(e,t){let r=t;"graph"===e.type&&(r=e.name);let n=e.triples;return r&&(n=n.map((e=>Object.assign(e,{graph:r})))),n.map(R)}function k(e){const t={},r=Array.from(y).reduce(((e,t)=>(e[t]=!0,e)),{});return d.default.mapOperation(e,{[u.types.DELETE_INSERT]:e=>({result:e,recurse:!1}),[u.types.PATH]:(e,t)=>({result:t.createPath(n(e.subject),e.predicate,n(e.object),n(e.graph)),recurse:!1}),[u.types.PATTERN]:(e,t)=>({result:t.createPattern(n(e.subject),n(e.predicate),n(e.object),n(e.graph)),recurse:!1}),[u.types.CONSTRUCT]:e=>({result:f.createConstruct(k(e.input),e.template),recurse:!1})});function n(e){if("BlankNode"===e.termType){let n=t[e.value];return n||(n=d.default.createUniqueVariable(e.value,r,f.dataFactory),r[n.value]=!0,t[e.value]=n),n}return e}}},75885:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(38849),a=n(r(67063)),o=r(13252);class s{static flatten(e){return Array.prototype.concat(...e).filter((e=>e))}static objectify(e){if(e.termType){if("Quad"===e.termType)return{type:"pattern",termType:"Quad",subject:s.objectify(e.subject),predicate:s.objectify(e.predicate),object:s.objectify(e.object),graph:s.objectify(e.graph)};{let t={termType:e.termType,value:e.value};return e.language&&(t.language=e.language),e.datatype&&(t.datatype=s.objectify(e.datatype)),t}}if(Array.isArray(e))return e.map((e=>s.objectify(e)));if(e===Object(e)){let t={};for(let r of Object.keys(e))t[r]=s.objectify(e[r]);return t}return e}static inScopeVariables(e){const t=[];function r(e){t.find((t=>e.value===t.value))||t.push(e)}function n(e){"Variable"===e.subject.termType&&r(e.subject),"Variable"===e.predicate.termType&&r(e.predicate),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.predicate.termType&&n(e.predicate),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph)}return s.recurseOperation(e,{[i.types.EXPRESSION]:e=>(e.expressionType===i.expressionTypes.AGGREGATE&&e.variable&&r(e.variable),!0),[i.types.EXTEND]:e=>(r(e.variable),!0),[i.types.GRAPH]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.GROUP]:e=>(e.variables.forEach(r),!0),[i.types.PATH]:e=>("Variable"===e.subject.termType&&r(e.subject),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph),!0),[i.types.PATTERN]:e=>(n(e),!0),[i.types.PROJECT]:e=>(e.variables.forEach(r),!1),[i.types.SERVICE]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.VALUES]:e=>(e.variables.forEach(r),!0)}),t}static recurseOperation(e,t){let r=e,n=!0;const a=t[e.type];if(a&&(n=a(e)),!n)return;let o=e=>s.recurseOperation(e,t);switch(r.type){case i.types.ALT:r.input.map(o);break;case i.types.ASK:o(r.input);break;case i.types.BGP:r.patterns.forEach(o);break;case i.types.CONSTRUCT:o(r.input),r.template.map(o);break;case i.types.DESCRIBE:case i.types.DISTINCT:o(r.input);break;case i.types.EXPRESSION:r.expressionType===i.expressionTypes.EXISTENCE&&o(r.input);break;case i.types.EXTEND:case i.types.FILTER:o(r.input),o(r.expression);break;case i.types.FROM:case i.types.GRAPH:o(r.input);break;case i.types.GROUP:o(r.input),r.aggregates.forEach(o);break;case i.types.INV:o(r.path);break;case i.types.JOIN:r.input.map(o);break;case i.types.LEFT_JOIN:r.input.map(o),r.expression&&o(r.expression);break;case i.types.LINK:break;case i.types.MINUS:r.input.map(o);break;case i.types.NOP:case i.types.NPS:break;case i.types.ONE_OR_MORE_PATH:o(r.path);break;case i.types.ORDER_BY:o(r.input),r.expressions.forEach(o);break;case i.types.PATH:o(r.predicate);break;case i.types.PATTERN:break;case i.types.PROJECT:case i.types.REDUCED:o(r.input);break;case i.types.SEQ:r.input.map(o);break;case i.types.SERVICE:case i.types.SLICE:o(r.input);break;case i.types.UNION:r.input.map(o);break;case i.types.VALUES:break;case i.types.ZERO_OR_MORE_PATH:case i.types.ZERO_OR_ONE_PATH:o(r.path);break;case i.types.COMPOSITE_UPDATE:r.updates.forEach((e=>o(e)));break;case i.types.DELETE_INSERT:r.delete&&r.delete.forEach((e=>o(e))),r.insert&&r.insert.forEach((e=>o(e))),r.where&&o(r.where);break;case i.types.LOAD:case i.types.CLEAR:case i.types.CREATE:case i.types.DROP:case i.types.ADD:case i.types.MOVE:case i.types.COPY:break;default:throw new Error(`Unknown Operation type ${r.type}`)}}static mapOperation(e,t,r){let n=e,o=!0,c=!0;r=r||new a.default;const u=t[e.type];if(u){const t=u(e,r);n=t.result,o=t.recurse,c=!1!==t.copyMetadata}let l;if(c&&(n.metadata||e.metadata)&&(l={...n.metadata,...e.metadata}),!o)return l&&(n.metadata=l),n;let d=e=>s.mapOperation(e,t,r);switch(n.type){case i.types.ALT:n=r.createAlt(n.input.map(d));break;case i.types.ASK:n=r.createAsk(d(n.input));break;case i.types.BGP:n=r.createBgp(n.patterns.map(d));break;case i.types.CONSTRUCT:n=r.createConstruct(d(n.input),n.template.map(d));break;case i.types.DESCRIBE:n=r.createDescribe(d(n.input),n.terms);break;case i.types.DISTINCT:n=r.createDistinct(d(n.input));break;case i.types.EXPRESSION:n=s.mapExpression(n,t,r);break;case i.types.EXTEND:n=r.createExtend(d(n.input),n.variable,d(n.expression));break;case i.types.FILTER:n=r.createFilter(d(n.input),d(n.expression));break;case i.types.FROM:n=r.createFrom(d(n.input),[...n.default],[...n.named]);break;case i.types.GRAPH:n=r.createGraph(d(n.input),n.name);break;case i.types.GROUP:n=r.createGroup(d(n.input),[].concat(n.variables),n.aggregates.map(d));break;case i.types.INV:n=r.createInv(d(n.path));break;case i.types.JOIN:n=r.createJoin(n.input.map(d));break;case i.types.LEFT_JOIN:n=r.createLeftJoin(d(n.input[0]),d(n.input[1]),n.expression?d(n.expression):void 0);break;case i.types.LINK:n=r.createLink(n.iri);break;case i.types.MINUS:n=r.createMinus(d(n.input[0]),d(n.input[1]));break;case i.types.NOP:n=r.createNop();break;case i.types.NPS:n=r.createNps([].concat(n.iris));break;case i.types.ONE_OR_MORE_PATH:n=r.createOneOrMorePath(d(n.path));break;case i.types.ORDER_BY:n=r.createOrderBy(d(n.input),n.expressions.map(d));break;case i.types.PATH:n=r.createPath(n.subject,d(n.predicate),n.object,n.graph);break;case i.types.PATTERN:n=r.createPattern(n.subject,n.predicate,n.object,n.graph);break;case i.types.PROJECT:n=r.createProject(d(n.input),[...n.variables]);break;case i.types.REDUCED:n=r.createReduced(d(n.input));break;case i.types.SEQ:n=r.createSeq(n.input.map(d));break;case i.types.SERVICE:n=r.createService(d(n.input),n.name,n.silent);break;case i.types.SLICE:n=r.createSlice(d(n.input),n.start,n.length);break;case i.types.UNION:n=r.createUnion(n.input.map(d));break;case i.types.VALUES:n=r.createValues([].concat(n.variables),n.bindings.map((e=>Object.assign({},e))));break;case i.types.ZERO_OR_MORE_PATH:n=r.createZeroOrMorePath(d(n.path));break;case i.types.ZERO_OR_ONE_PATH:n=r.createZeroOrOnePath(d(n.path));break;case i.types.COMPOSITE_UPDATE:n=r.createCompositeUpdate(n.updates.map(d));break;case i.types.DELETE_INSERT:n=r.createDeleteInsert(n.delete?n.delete.map(d):void 0,n.insert?n.insert.map(d):void 0,n.where?d(n.where):void 0);break;case i.types.LOAD:n=r.createLoad(n.source,n.destination,n.silent);break;case i.types.CLEAR:n=r.createClear(n.source,n.silent);break;case i.types.CREATE:n=r.createCreate(n.source,n.silent);break;case i.types.DROP:n=r.createDrop(n.source,n.silent);break;case i.types.ADD:n=r.createAdd(n.source,n.destination);break;case i.types.MOVE:n=r.createMove(n.source,n.destination);break;case i.types.COPY:n=r.createCopy(n.source,n.destination);break;default:throw new Error(`Unknown Operation type ${n.type}`)}return l&&(n.metadata=l),n}static mapExpression(e,t,r){let n=e,o=!0;r=r||new a.default;const c=t[e.expressionType];if(c&&({result:n,recurse:o}=c(e,r)),!o)return n;let u=e=>s.mapOperation(e,t,r);switch(e.expressionType){case i.expressionTypes.AGGREGATE:return e.variable?r.createBoundAggregate(e.variable,e.aggregator,u(e.expression),e.distinct,e.separator):r.createAggregateExpression(e.aggregator,u(e.expression),e.distinct,e.separator);case i.expressionTypes.EXISTENCE:return r.createExistenceExpression(e.not,u(e.input));case i.expressionTypes.NAMED:return r.createNamedExpression(e.name,e.args.map(u));case i.expressionTypes.OPERATOR:return r.createOperatorExpression(e.operator,e.args.map(u));case i.expressionTypes.TERM:return r.createTermExpression(e.term);case i.expressionTypes.WILDCARD:return r.createWildcardExpression();default:throw new Error(`Unknown Expression type ${e.expressionType}`)}}static cloneOperation(e){return s.mapOperation(e,{})}static cloneExpression(e){return s.mapExpression(e,{})}static createUniqueVariable(e,t,r){let n=0,i=e;for(;t[i];)i=`${e}${n++}`;return r.variable(i)}static isSimpleTerm(e){return void 0!==e.termType&&"Quad"!==e.termType&&"Wildcard"!==e.termType}static isQuad(e){return"Quad"===e.termType}static hasQuadVariables(e){return(0,o.someTermsNested)(e,(e=>"Variable"===e.termType))}static isWildcard(e){return"Wildcard"===e.termType}}t.default=s},44897:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.printError=w,t.GraphQLError=void 0;var i,a=(i=r(78582))&&i.__esModule?i:{default:i},o=r(28189),s=r(4251),c=r(90354);function u(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 l(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(e,t){for(var r=0;r0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),null!=o&&o.stack?(Object.defineProperty(h(b),"stack",{value:o.stack,writable:!0,configurable:!0}),p(b)):(Error.captureStackTrace?Error.captureStackTrace(h(b),f):Object.defineProperty(h(b),"stack",{value:Error().stack,writable:!0,configurable:!0}),b)}return n=f,(i=[{key:"toString",value:function(){return w(this)}},{key:o.SYMBOL_TO_STRING_TAG,get:function(){return"Object"}}])&&d(n.prototype,i),f}(f(Error));function _(e){return void 0===e||0===e.length?void 0:e}function w(e){var t=e.message;if(e.nodes)for(var r=0,n=e.nodes;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.syntaxError=function(e,t,r){return new n.GraphQLError("Syntax Error: ".concat(r),void 0,e,[t])};var n=r(44897)},44077:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prototype.toJSON;"function"==typeof t||(0,n.default)(0),e.prototype.inspect=t,i.default&&(e.prototype[i.default]=t)};var n=a(r(81880)),i=a(r(37020));function a(e){return e&&e.__esModule?e:{default:e}}},65269:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(t)}},23216:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return c(e,[])};var n,i=(n=r(37020))&&n.__esModule?n:{default:n};function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var o=10,s=2;function c(e,t){switch(a(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(i.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==n){var a=n.call(e);if(a!==e)return"string"==typeof a?a:c(a,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>s)return"[Array]";for(var r=Math.min(o,e.length),n=e.length-r,i=[],a=0;a1&&i.push("... ".concat(n," more items")),"["+i.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);return 0===r.length?"{}":t.length>s?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]":"{ "+r.map((function(r){return r+": "+c(e[r],t)})).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}},83588:(e,t,r)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,(n=r(23216))&&n.__esModule;t.default=function(e,t){return e instanceof t}},81880:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}},78582:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"object"==r(e)&&null!==e}},37020:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=r},93378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(e){return null!=e&&"string"==typeof e.kind},t.Token=t.Location=void 0;var n,i=(n=r(44077))&&n.__esModule?n:{default:n},a=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();t.Location=a,(0,i.default)(a);var o=function(){function e(e,t,r,n,i,a,o){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=o,this.prev=a,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();t.Token=o,(0,i.default)(o)},4758:(e,t)=>{"use strict";function r(e){for(var t=0;to&&r(t[s-1]);)--s;return t.slice(o,s).join("\n")},t.getBlockStringIndentation=n,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],a='"'===e[e.length-1],o="\\"===e[e.length-1],s=!n||a||o||r,c="";return!s||n&&i||(c+="\n"+t),c+=t?e.replace(/\n/g,"\n"+t):e,s&&(c+="\n"),'"""'+c.replace(/"""/g,'\\"""')+'"""'}},23684:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DirectiveLocation=void 0;var r=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});t.DirectiveLocation=r},44330:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Source",{enumerable:!0,get:function(){return n.Source}}),Object.defineProperty(t,"getLocation",{enumerable:!0,get:function(){return i.getLocation}}),Object.defineProperty(t,"printLocation",{enumerable:!0,get:function(){return a.printLocation}}),Object.defineProperty(t,"printSourceLocation",{enumerable:!0,get:function(){return a.printSourceLocation}}),Object.defineProperty(t,"Kind",{enumerable:!0,get:function(){return o.Kind}}),Object.defineProperty(t,"TokenKind",{enumerable:!0,get:function(){return s.TokenKind}}),Object.defineProperty(t,"Lexer",{enumerable:!0,get:function(){return c.Lexer}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return u.parse}}),Object.defineProperty(t,"parseValue",{enumerable:!0,get:function(){return u.parseValue}}),Object.defineProperty(t,"parseType",{enumerable:!0,get:function(){return u.parseType}}),Object.defineProperty(t,"print",{enumerable:!0,get:function(){return l.print}}),Object.defineProperty(t,"visit",{enumerable:!0,get:function(){return d.visit}}),Object.defineProperty(t,"visitInParallel",{enumerable:!0,get:function(){return d.visitInParallel}}),Object.defineProperty(t,"getVisitFn",{enumerable:!0,get:function(){return d.getVisitFn}}),Object.defineProperty(t,"BREAK",{enumerable:!0,get:function(){return d.BREAK}}),Object.defineProperty(t,"Location",{enumerable:!0,get:function(){return p.Location}}),Object.defineProperty(t,"Token",{enumerable:!0,get:function(){return p.Token}}),Object.defineProperty(t,"isDefinitionNode",{enumerable:!0,get:function(){return h.isDefinitionNode}}),Object.defineProperty(t,"isExecutableDefinitionNode",{enumerable:!0,get:function(){return h.isExecutableDefinitionNode}}),Object.defineProperty(t,"isSelectionNode",{enumerable:!0,get:function(){return h.isSelectionNode}}),Object.defineProperty(t,"isValueNode",{enumerable:!0,get:function(){return h.isValueNode}}),Object.defineProperty(t,"isTypeNode",{enumerable:!0,get:function(){return h.isTypeNode}}),Object.defineProperty(t,"isTypeSystemDefinitionNode",{enumerable:!0,get:function(){return h.isTypeSystemDefinitionNode}}),Object.defineProperty(t,"isTypeDefinitionNode",{enumerable:!0,get:function(){return h.isTypeDefinitionNode}}),Object.defineProperty(t,"isTypeSystemExtensionNode",{enumerable:!0,get:function(){return h.isTypeSystemExtensionNode}}),Object.defineProperty(t,"isTypeExtensionNode",{enumerable:!0,get:function(){return h.isTypeExtensionNode}}),Object.defineProperty(t,"DirectiveLocation",{enumerable:!0,get:function(){return f.DirectiveLocation}});var n=r(76241),i=r(4251),a=r(90354),o=r(12057),s=r(58053),c=r(4524),u=r(42275),l=r(43230),d=r(48048),p=r(93378),h=r(49674),f=r(23684)},12057:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Kind=void 0;var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"});t.Kind=r},4524:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPunctuatorTokenKind=function(e){return e===a.TokenKind.BANG||e===a.TokenKind.DOLLAR||e===a.TokenKind.AMP||e===a.TokenKind.PAREN_L||e===a.TokenKind.PAREN_R||e===a.TokenKind.SPREAD||e===a.TokenKind.COLON||e===a.TokenKind.EQUALS||e===a.TokenKind.AT||e===a.TokenKind.BRACKET_L||e===a.TokenKind.BRACKET_R||e===a.TokenKind.BRACE_L||e===a.TokenKind.PIPE||e===a.TokenKind.BRACE_R},t.Lexer=void 0;var n=r(40629),i=r(93378),a=r(58053),o=r(4758),s=function(){function e(e){var t=new i.Token(a.TokenKind.SOF,0,0,0,0,null);this.source=e,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==a.TokenKind.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=u(this,e)}while(e.kind===a.TokenKind.COMMENT);return e},e}();function c(e){return isNaN(e)?a.TokenKind.EOF:e<127?JSON.stringify(String.fromCharCode(e)):'"\\u'.concat(("00"+e.toString(16).toUpperCase()).slice(-4),'"')}function u(e,t){for(var r=e.source,o=r.body,s=o.length,c=t.end;c31||9===s));return new i.Token(a.TokenKind.COMMENT,t,u,r,n,o,c.slice(t+1,u))}function p(e,t,r,o,s,u){var l=e.body,d=r,p=t,f=!1;if(45===d&&(d=l.charCodeAt(++p)),48===d){if((d=l.charCodeAt(++p))>=48&&d<=57)throw(0,n.syntaxError)(e,p,"Invalid number, unexpected digit after 0: ".concat(c(d),"."))}else p=h(e,p,d),d=l.charCodeAt(p);if(46===d&&(f=!0,d=l.charCodeAt(++p),p=h(e,p,d),d=l.charCodeAt(p)),69!==d&&101!==d||(f=!0,43!==(d=l.charCodeAt(++p))&&45!==d||(d=l.charCodeAt(++p)),p=h(e,p,d),d=l.charCodeAt(p)),46===d||function(e){return 95===e||e>=65&&e<=90||e>=97&&e<=122}(d))throw(0,n.syntaxError)(e,p,"Invalid number, expected digit but got: ".concat(c(d),"."));return new i.Token(f?a.TokenKind.FLOAT:a.TokenKind.INT,t,p,o,s,u,l.slice(t,p))}function h(e,t,r){var i=e.body,a=t,o=r;if(o>=48&&o<=57){do{o=i.charCodeAt(++a)}while(o>=48&&o<=57);return a}throw(0,n.syntaxError)(e,a,"Invalid number, expected digit but got: ".concat(c(o),"."))}function f(e,t,r,o,s){for(var u,l,d,p,h=e.body,f=t+1,y=f,m=0,b="";f=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function m(e,t,r,n,o){for(var s=e.body,c=s.length,u=t+1,l=0;u!==c&&!isNaN(l=s.charCodeAt(u))&&(95===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122);)++u;return new i.Token(a.TokenKind.NAME,t,u,r,n,o,s.slice(t,u))}t.Lexer=s},4251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getLocation=function(e,t){for(var r,n=/\r\n|[\n\r]/g,i=1,a=t+1;(r=n.exec(e.body))&&r.index{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parse=function(e,t){return new l(e,t).parseDocument()},t.parseValue=function(e,t){var r=new l(e,t);r.expectToken(o.TokenKind.SOF);var n=r.parseValueLiteral(!1);return r.expectToken(o.TokenKind.EOF),n},t.parseType=function(e,t){var r=new l(e,t);r.expectToken(o.TokenKind.SOF);var n=r.parseTypeReference();return r.expectToken(o.TokenKind.EOF),n},t.Parser=void 0;var n=r(40629),i=r(12057),a=r(93378),o=r(58053),s=r(76241),c=r(23684),u=r(4524),l=function(){function e(e,t){var r=(0,s.isSource)(e)?e:new s.Source(e);this._lexer=new u.Lexer(r),this._options=t}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(o.TokenKind.NAME);return{kind:i.Kind.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:i.Kind.DOCUMENT,definitions:this.many(o.TokenKind.SOF,this.parseDefinition,o.TokenKind.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(o.TokenKind.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(o.TokenKind.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(o.TokenKind.BRACE_L))return{kind:i.Kind.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,r=this.parseOperationType();return this.peek(o.TokenKind.NAME)&&(t=this.parseName()),{kind:i.Kind.OPERATION_DEFINITION,operation:r,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(o.TokenKind.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(o.TokenKind.PAREN_L,this.parseVariableDefinition,o.TokenKind.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:i.Kind.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(o.TokenKind.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(o.TokenKind.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(o.TokenKind.DOLLAR),{kind:i.Kind.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:i.Kind.SELECTION_SET,selections:this.many(o.TokenKind.BRACE_L,this.parseSelection,o.TokenKind.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(o.TokenKind.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,r=this._lexer.token,n=this.parseName();return this.expectOptionalToken(o.TokenKind.COLON)?(e=n,t=this.parseName()):t=n,{kind:i.Kind.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(o.TokenKind.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(r)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(o.TokenKind.PAREN_L,t,o.TokenKind.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(o.TokenKind.COLON),{kind:i.Kind.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:i.Kind.ARGUMENT,name:this.parseName(),value:(this.expectToken(o.TokenKind.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(o.TokenKind.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(o.TokenKind.NAME)?{kind:i.Kind.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:i.Kind.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:i.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:i.Kind.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case o.TokenKind.BRACKET_L:return this.parseList(e);case o.TokenKind.BRACE_L:return this.parseObject(e);case o.TokenKind.INT:return this._lexer.advance(),{kind:i.Kind.INT,value:t.value,loc:this.loc(t)};case o.TokenKind.FLOAT:return this._lexer.advance(),{kind:i.Kind.FLOAT,value:t.value,loc:this.loc(t)};case o.TokenKind.STRING:case o.TokenKind.BLOCK_STRING:return this.parseStringLiteral();case o.TokenKind.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:i.Kind.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:i.Kind.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:i.Kind.NULL,loc:this.loc(t)};default:return{kind:i.Kind.ENUM,value:t.value,loc:this.loc(t)}}case o.TokenKind.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:i.Kind.STRING,value:e.value,block:e.kind===o.TokenKind.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,r=this._lexer.token;return{kind:i.Kind.LIST,values:this.any(o.TokenKind.BRACKET_L,(function(){return t.parseValueLiteral(e)}),o.TokenKind.BRACKET_R),loc:this.loc(r)}},t.parseObject=function(e){var t=this,r=this._lexer.token;return{kind:i.Kind.OBJECT,fields:this.any(o.TokenKind.BRACE_L,(function(){return t.parseObjectField(e)}),o.TokenKind.BRACE_R),loc:this.loc(r)}},t.parseObjectField=function(e){var t=this._lexer.token,r=this.parseName();return this.expectToken(o.TokenKind.COLON),{kind:i.Kind.OBJECT_FIELD,name:r,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(o.TokenKind.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(o.TokenKind.AT),{kind:i.Kind.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(o.TokenKind.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(o.TokenKind.BRACKET_R),e={kind:i.Kind.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(o.TokenKind.BANG)?{kind:i.Kind.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:i.Kind.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===o.TokenKind.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(o.TokenKind.STRING)||this.peek(o.TokenKind.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var r=this.parseDirectives(!0),n=this.many(o.TokenKind.BRACE_L,this.parseOperationTypeDefinition,o.TokenKind.BRACE_R);return{kind:i.Kind.SCHEMA_DEFINITION,description:t,directives:r,operationTypes:n,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(o.TokenKind.COLON);var r=this.parseNamedType();return{kind:i.Kind.OPERATION_TYPE_DEFINITION,operation:t,type:r,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var r=this.parseName(),n=this.parseDirectives(!0);return{kind:i.Kind.SCALAR_TYPE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var r=this.parseName(),n=this.parseImplementsInterfaces(),a=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:i.Kind.OBJECT_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:a,fields:o,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(o.TokenKind.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(o.TokenKind.AMP)||this.peek(o.TokenKind.NAME));return t}return this.delimitedMany(o.TokenKind.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(o.TokenKind.BRACE_L)&&this._lexer.lookahead().kind===o.TokenKind.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(o.TokenKind.BRACE_L,this.parseFieldDefinition,o.TokenKind.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseArgumentDefs();this.expectToken(o.TokenKind.COLON);var a=this.parseTypeReference(),s=this.parseDirectives(!0);return{kind:i.Kind.FIELD_DEFINITION,description:t,name:r,arguments:n,type:a,directives:s,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(o.TokenKind.PAREN_L,this.parseInputValueDef,o.TokenKind.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName();this.expectToken(o.TokenKind.COLON);var n,a=this.parseTypeReference();this.expectOptionalToken(o.TokenKind.EQUALS)&&(n=this.parseValueLiteral(!0));var s=this.parseDirectives(!0);return{kind:i.Kind.INPUT_VALUE_DEFINITION,description:t,name:r,type:a,defaultValue:n,directives:s,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var r=this.parseName(),n=this.parseImplementsInterfaces(),a=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:i.Kind.INTERFACE_TYPE_DEFINITION,description:t,name:r,interfaces:n,directives:a,fields:o,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var r=this.parseName(),n=this.parseDirectives(!0),a=this.parseUnionMemberTypes();return{kind:i.Kind.UNION_TYPE_DEFINITION,description:t,name:r,directives:n,types:a,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(o.TokenKind.EQUALS)?this.delimitedMany(o.TokenKind.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var r=this.parseName(),n=this.parseDirectives(!0),a=this.parseEnumValuesDefinition();return{kind:i.Kind.ENUM_TYPE_DEFINITION,description:t,name:r,directives:n,values:a,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(o.TokenKind.BRACE_L,this.parseEnumValueDefinition,o.TokenKind.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),r=this.parseName(),n=this.parseDirectives(!0);return{kind:i.Kind.ENUM_VALUE_DEFINITION,description:t,name:r,directives:n,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var r=this.parseName(),n=this.parseDirectives(!0),a=this.parseInputFieldsDefinition();return{kind:i.Kind.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:r,directives:n,fields:a,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(o.TokenKind.BRACE_L,this.parseInputValueDef,o.TokenKind.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===o.TokenKind.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),r=this.optionalMany(o.TokenKind.BRACE_L,this.parseOperationTypeDefinition,o.TokenKind.BRACE_R);if(0===t.length&&0===r.length)throw this.unexpected();return{kind:i.Kind.SCHEMA_EXTENSION,directives:t,operationTypes:r,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),r=this.parseDirectives(!0);if(0===r.length)throw this.unexpected();return{kind:i.Kind.SCALAR_TYPE_EXTENSION,name:t,directives:r,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),a=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===a.length)throw this.unexpected();return{kind:i.Kind.OBJECT_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:a,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),r=this.parseImplementsInterfaces(),n=this.parseDirectives(!0),a=this.parseFieldsDefinition();if(0===r.length&&0===n.length&&0===a.length)throw this.unexpected();return{kind:i.Kind.INTERFACE_TYPE_EXTENSION,name:t,interfaces:r,directives:n,fields:a,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseUnionMemberTypes();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:i.Kind.UNION_TYPE_EXTENSION,name:t,directives:r,types:n,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseEnumValuesDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:i.Kind.ENUM_TYPE_EXTENSION,name:t,directives:r,values:n,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),r=this.parseDirectives(!0),n=this.parseInputFieldsDefinition();if(0===r.length&&0===n.length)throw this.unexpected();return{kind:i.Kind.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:r,fields:n,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(o.TokenKind.AT);var r=this.parseName(),n=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var s=this.parseDirectiveLocations();return{kind:i.Kind.DIRECTIVE_DEFINITION,description:t,name:r,arguments:n,repeatable:a,locations:s,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(o.TokenKind.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==c.DirectiveLocation[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new a.Location(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw(0,n.syntaxError)(this._lexer.source,t.start,"Expected ".concat(p(e),", found ").concat(d(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==o.TokenKind.NAME||t.value!==e)throw(0,n.syntaxError)(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(d(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===o.TokenKind.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return(0,n.syntaxError)(this._lexer.source,t.start,"Unexpected ".concat(d(t),"."))},t.any=function(e,t,r){this.expectToken(e);for(var n=[];!this.expectOptionalToken(r);)n.push(t.call(this));return n},t.optionalMany=function(e,t,r){if(this.expectOptionalToken(e)){var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n}return[]},t.many=function(e,t,r){this.expectToken(e);var n=[];do{n.push(t.call(this))}while(!this.expectOptionalToken(r));return n},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var r=[];do{r.push(t.call(this))}while(this.expectOptionalToken(e));return r},e}();function d(e){var t=e.value;return p(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function p(e){return(0,u.isPunctuatorTokenKind)(e)?'"'.concat(e,'"'):e}t.Parser=l},49674:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isDefinitionNode=function(e){return i(e)||a(e)||s(e)},t.isExecutableDefinitionNode=i,t.isSelectionNode=function(e){return e.kind===n.Kind.FIELD||e.kind===n.Kind.FRAGMENT_SPREAD||e.kind===n.Kind.INLINE_FRAGMENT},t.isValueNode=function(e){return e.kind===n.Kind.VARIABLE||e.kind===n.Kind.INT||e.kind===n.Kind.FLOAT||e.kind===n.Kind.STRING||e.kind===n.Kind.BOOLEAN||e.kind===n.Kind.NULL||e.kind===n.Kind.ENUM||e.kind===n.Kind.LIST||e.kind===n.Kind.OBJECT},t.isTypeNode=function(e){return e.kind===n.Kind.NAMED_TYPE||e.kind===n.Kind.LIST_TYPE||e.kind===n.Kind.NON_NULL_TYPE},t.isTypeSystemDefinitionNode=a,t.isTypeDefinitionNode=o,t.isTypeSystemExtensionNode=s,t.isTypeExtensionNode=c;var n=r(12057);function i(e){return e.kind===n.Kind.OPERATION_DEFINITION||e.kind===n.Kind.FRAGMENT_DEFINITION}function a(e){return e.kind===n.Kind.SCHEMA_DEFINITION||o(e)||e.kind===n.Kind.DIRECTIVE_DEFINITION}function o(e){return e.kind===n.Kind.SCALAR_TYPE_DEFINITION||e.kind===n.Kind.OBJECT_TYPE_DEFINITION||e.kind===n.Kind.INTERFACE_TYPE_DEFINITION||e.kind===n.Kind.UNION_TYPE_DEFINITION||e.kind===n.Kind.ENUM_TYPE_DEFINITION||e.kind===n.Kind.INPUT_OBJECT_TYPE_DEFINITION}function s(e){return e.kind===n.Kind.SCHEMA_EXTENSION||c(e)}function c(e){return e.kind===n.Kind.SCALAR_TYPE_EXTENSION||e.kind===n.Kind.OBJECT_TYPE_EXTENSION||e.kind===n.Kind.INTERFACE_TYPE_EXTENSION||e.kind===n.Kind.UNION_TYPE_EXTENSION||e.kind===n.Kind.ENUM_TYPE_EXTENSION||e.kind===n.Kind.INPUT_OBJECT_TYPE_EXTENSION}},90354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.printLocation=function(e){return i(e.source,(0,n.getLocation)(e.source,e.start))},t.printSourceLocation=i;var n=r(4251);function i(e,t){var r=e.locationOffset.column-1,n=o(r)+e.body,i=t.line-1,s=e.locationOffset.line-1,c=t.line+s,u=1===t.line?r:0,l=t.column+u,d="".concat(e.name,":").concat(c,":").concat(l,"\n"),p=n.split(/\r\n|[\n\r]/g),h=p[i];if(h.length>120){for(var f=Math.floor(l/80),y=l%80,g=[],m=0;m{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.print=function(e){return(0,n.visit)(e,{leave:a})};var n=r(48048),i=r(4758),a={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return s(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,r=e.name,n=u("(",s(e.variableDefinitions,", "),")"),i=s(e.directives," "),a=e.selectionSet;return r||i||n||"query"!==t?s([t,s([r,n]),i,a]," "):a},VariableDefinition:function(e){var t=e.variable,r=e.type,n=e.defaultValue,i=e.directives;return t+": "+r+u(" = ",n)+u(" ",s(i," "))},SelectionSet:function(e){return c(e.selections)},Field:function(e){var t=e.alias,r=e.name,n=e.arguments,i=e.directives,a=e.selectionSet,o=u("",t,": ")+r,c=o+u("(",s(n,", "),")");return c.length>80&&(c=o+u("(\n",l(s(n,"\n")),"\n)")),s([c,s(i," "),a]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+u(" ",s(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,r=e.directives,n=e.selectionSet;return s(["...",u("on ",t),s(r," "),n]," ")},FragmentDefinition:function(e){var t=e.name,r=e.typeCondition,n=e.variableDefinitions,i=e.directives,a=e.selectionSet;return"fragment ".concat(t).concat(u("(",s(n,", "),")")," ")+"on ".concat(r," ").concat(u("",s(i," ")," "))+a},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var r=e.value;return e.block?(0,i.printBlockString)(r,"description"===t?"":" "):JSON.stringify(r)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+s(e.values,", ")+"]"},ObjectValue:function(e){return"{"+s(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+u("(",s(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:o((function(e){var t=e.directives,r=e.operationTypes;return s(["schema",s(t," "),c(r)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:o((function(e){return s(["scalar",e.name,s(e.directives," ")]," ")})),ObjectTypeDefinition:o((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["type",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")})),FieldDefinition:o((function(e){var t=e.name,r=e.arguments,n=e.type,i=e.directives;return t+(p(r)?u("(\n",l(s(r,"\n")),"\n)"):u("(",s(r,", "),")"))+": "+n+u(" ",s(i," "))})),InputValueDefinition:o((function(e){var t=e.name,r=e.type,n=e.defaultValue,i=e.directives;return s([t+": "+r,u("= ",n),s(i," ")]," ")})),InterfaceTypeDefinition:o((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["interface",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")})),UnionTypeDefinition:o((function(e){var t=e.name,r=e.directives,n=e.types;return s(["union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")})),EnumTypeDefinition:o((function(e){var t=e.name,r=e.directives,n=e.values;return s(["enum",t,s(r," "),c(n)]," ")})),EnumValueDefinition:o((function(e){return s([e.name,s(e.directives," ")]," ")})),InputObjectTypeDefinition:o((function(e){var t=e.name,r=e.directives,n=e.fields;return s(["input",t,s(r," "),c(n)]," ")})),DirectiveDefinition:o((function(e){var t=e.name,r=e.arguments,n=e.repeatable,i=e.locations;return"directive @"+t+(p(r)?u("(\n",l(s(r,"\n")),"\n)"):u("(",s(r,", "),")"))+(n?" repeatable":"")+" on "+s(i," | ")})),SchemaExtension:function(e){var t=e.directives,r=e.operationTypes;return s(["extend schema",s(t," "),c(r)]," ")},ScalarTypeExtension:function(e){return s(["extend scalar",e.name,s(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend type",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend interface",t,u("implements ",s(r," & ")),s(n," "),c(i)]," ")},UnionTypeExtension:function(e){var t=e.name,r=e.directives,n=e.types;return s(["extend union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,r=e.directives,n=e.values;return s(["extend enum",t,s(r," "),c(n)]," ")},InputObjectTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return s(["extend input",t,s(r," "),c(n)]," ")}};function o(e){return function(t){return s([t.description,e(t)],"\n")}}function s(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(r))&&void 0!==t?t:""}function c(e){return u("{\n",l(s(e,"\n")),"\n}")}function u(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function l(e){return u(" ",e.replace(/\n/g,"\n "))}function d(e){return-1!==e.indexOf("\n")}function p(e){return null!=e&&e.some(d)}},76241:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isSource=function(e){return(0,o.default)(e,u)},t.Source=void 0;var n=r(28189),i=s(r(23216)),a=s(r(65269)),o=s(r(83588));function s(e){return e&&e.__esModule?e:{default:e}}function c(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof e||(0,a.default)(0,"Body must be a string. Received: ".concat((0,i.default)(e),".")),this.body=e,this.name=t,this.locationOffset=r,this.locationOffset.line>0||(0,a.default)(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||(0,a.default)(0,"column in locationOffset is 1-indexed and must be positive.")}var t,r;return t=e,(r=[{key:n.SYMBOL_TO_STRING_TAG,get:function(){return"Source"}}])&&c(t.prototype,r),e}();t.Source=u},58053:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenKind=void 0;var r=Object.freeze({SOF:"",EOF:"",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});t.TokenKind=r},48048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o,n=void 0,u=Array.isArray(e),l=[e],d=-1,p=[],h=void 0,f=void 0,y=void 0,g=[],m=[],b=e;do{var v=++d===l.length,_=v&&0!==p.length;if(v){if(f=0===m.length?void 0:g[g.length-1],h=y,y=m.pop(),_){if(u)h=h.slice();else{for(var w={},T=0,S=Object.keys(h);T{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SYMBOL_TO_STRING_TAG=t.SYMBOL_ASYNC_ITERATOR=t.SYMBOL_ITERATOR=void 0;var r="function"==typeof Symbol&&null!=Symbol.iterator?Symbol.iterator:"@@iterator";t.SYMBOL_ITERATOR=r;var n="function"==typeof Symbol&&null!=Symbol.asyncIterator?Symbol.asyncIterator:"@@asyncIterator";t.SYMBOL_ASYNC_ITERATOR=n;var i="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";t.SYMBOL_TO_STRING_TAG=i},99499:(e,t,r)=>{var n=t;n.utils=r(70461),n.common=r(32191),n.sha=r(75746),n.ripemd=r(74169),n.hmac=r(11825),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},32191:(e,t,r)=>{"use strict";var n=r(70461),i=r(7784);function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=a,a.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a{"use strict";var n=r(70461),i=r(7784);function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t{"use strict";var n=r(70461),i=r(32191),a=n.rotl32,o=n.sum32,s=n.sum32_3,c=n.sum32_4,u=i.BlockHash;function l(){if(!(this instanceof l))return new l;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function d(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function p(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function h(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,u),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],u=this.h[3],l=this.h[4],b=r,v=n,_=i,w=u,T=l,S=0;S<80;S++){var O=o(a(c(r,d(S,n,i,u),e[f[S]+t],p(S)),g[S]),l);r=l,l=u,u=a(i,10),i=n,n=O,O=o(a(c(b,d(79-S,v,_,w),e[y[S]+t],h(S)),m[S]),T),b=T,T=w,w=a(_,10),_=v,v=O}O=s(this.h[1],i,w),this.h[1]=s(this.h[2],u,T),this.h[2]=s(this.h[3],l,b),this.h[3]=s(this.h[4],r,v),this.h[4]=s(this.h[0],n,_),this.h[0]=O},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],y=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},75746:(e,t,r)=>{"use strict";t.sha1=r(12986),t.sha224=r(75393),t.sha256=r(50536),t.sha384=r(52348),t.sha512=r(92157)},12986:(e,t,r)=>{"use strict";var n=r(70461),i=r(32191),a=r(600),o=n.rotl32,s=n.sum32,c=n.sum32_5,u=a.ft_1,l=i.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function p(){if(!(this instanceof p))return new p;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(p,l),e.exports=p,p.blockSize=512,p.outSize=160,p.hmacStrength=80,p.padLength=64,p.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(70461),i=r(50536);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},50536:(e,t,r)=>{"use strict";var n=r(70461),i=r(32191),a=r(600),o=r(7784),s=n.sum32,c=n.sum32_4,u=n.sum32_5,l=a.ch32,d=a.maj32,p=a.s0_256,h=a.s1_256,f=a.g0_256,y=a.g1_256,g=i.BlockHash,m=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=m,this.W=new Array(64)}n.inherits(b,g),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(70461),i=r(92157);function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},92157:(e,t,r)=>{"use strict";var n=r(70461),i=r(32191),a=r(7784),o=n.rotr64_hi,s=n.rotr64_lo,c=n.shr64_hi,u=n.shr64_lo,l=n.sum64,d=n.sum64_hi,p=n.sum64_lo,h=n.sum64_4_hi,f=n.sum64_4_lo,y=n.sum64_5_hi,g=n.sum64_5_lo,m=i.BlockHash,b=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;m.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function _(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function w(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function T(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function S(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function O(e,t){var r=o(e,t,28)^o(t,e,2)^o(t,e,7);return r<0&&(r+=4294967296),r}function E(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=s(e,t,14)^s(e,t,18)^s(t,e,9);return r<0&&(r+=4294967296),r}function A(e,t){var r=o(e,t,1)^o(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function R(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function I(e,t){var r=s(e,t,19)^s(t,e,29)^u(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,m),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n{"use strict";var n=r(70461).rotr32;function i(e,t,r){return e&t^~e&r}function a(e,t,r){return e&t^e&r^t&r}function o(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?o(t,r,n):2===e?a(t,r,n):void 0},t.ch32=i,t.maj32=a,t.p32=o,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},70461:(e,t,r)=>{"use strict";var n=r(7784),i=r(35615);function a(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i>6|192,r[n++]=63&o|128):a(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i>>0}return o},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],a=n+e[t+1]>>>0,o=(a>>0,e[t+1]=a},t.sum64_hi=function(e,t,r,n){return(t+n>>>0>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,a,o,s){var c=0,u=t;return c+=(u=u+n>>>0)>>0)>>0)>>0},t.sum64_4_lo=function(e,t,r,n,i,a,o,s){return t+n+a+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,a,o,s,c,u){var l=0,d=t;return l+=(d=d+n>>>0)>>0)>>0)>>0)>>0},t.sum64_5_lo=function(e,t,r,n,i,a,o,s,c,u){return t+n+a+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},14291:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var o=a(r(36439)),s=r(3379),c=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),l=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),p=new Set(["rt","rp"]),h=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",c],["input",c],["output",c],["button",c],["datalist",c],["textarea",c],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",p],["rp",p],["tbody",l],["tfoot",l]]),f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),y=new Set(["math","svg"]),g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),m=/\s|\//,b=function(){function e(e,t){var r,n,i,a,s;void 0===t&&(t={}),this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.foreignContext=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:!t.xmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:!t.xmlMode,this.tokenizer=new(null!==(i=t.Tokenizer)&&void 0!==i?i:o.default)(this.options,this),null===(s=(a=this.cbs).onparserinit)||void 0===s||s.call(a,this)}return e.prototype.ontext=function(e,t){var r,n,i=this.getSlice(e,t);this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,i),this.startIndex=t},e.prototype.ontextentity=function(e){var t,r,n=this.tokenizer.getSectionStart();this.endIndex=n-1,null===(r=(t=this.cbs).ontext)||void 0===r||r.call(t,(0,s.fromCodePoint)(e)),this.startIndex=n},e.prototype.isVoidElement=function(e){return!this.options.xmlMode&&f.has(e)},e.prototype.onopentagname=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)},e.prototype.emitOpenTag=function(e){var t,r,n,i;this.openTagStart=this.startIndex,this.tagname=e;var a=!this.options.xmlMode&&h.get(e);if(a)for(;this.stack.length>0&&a.has(this.stack[this.stack.length-1]);){var o=this.stack.pop();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,o,!0)}this.isVoidElement(e)||(this.stack.push(e),y.has(e)?this.foreignContext.push(!0):g.has(e)&&this.foreignContext.push(!1)),null===(i=(n=this.cbs).onopentagname)||void 0===i||i.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var r,n,i,a,o,s;this.endIndex=t;var c=this.getSlice(e,t);if(this.lowerCaseTagNames&&(c=c.toLowerCase()),(y.has(c)||g.has(c))&&this.foreignContext.pop(),this.isVoidElement(c))this.options.xmlMode||"br"!==c||(null===(n=(r=this.cbs).onopentagname)||void 0===n||n.call(r,"br"),null===(a=(i=this.cbs).onopentag)||void 0===a||a.call(i,"br",{},!0),null===(s=(o=this.cbs).onclosetag)||void 0===s||s.call(o,"br",!1));else{var u=this.stack.lastIndexOf(c);if(-1!==u)if(this.cbs.onclosetag)for(var l=this.stack.length-u;l--;)this.cbs.onclosetag(this.stack.pop(),0!==l);else this.stack.length=u;else this.options.xmlMode||"p"!==c||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.pop())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,s.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===o.QuoteType.Double?'"':e===o.QuoteType.Single?"'":e===o.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(m),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,i,a,o;this.endIndex=t,null===(i=(n=this.cbs).oncomment)||void 0===i||i.call(n,this.getSlice(e,t-r)),null===(o=(a=this.cbs).oncommentend)||void 0===o||o.call(a),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){var n,i,a,o,s,c,u,l,d,p;this.endIndex=t;var h=this.getSlice(e,t-r);this.options.xmlMode||this.options.recognizeCDATA?(null===(i=(n=this.cbs).oncdatastart)||void 0===i||i.call(n),null===(o=(a=this.cbs).ontext)||void 0===o||o.call(a,h),null===(c=(s=this.cbs).oncdataend)||void 0===c||c.call(s)):(null===(l=(u=this.cbs).oncomment)||void 0===l||l.call(u,"[CDATA[".concat(h,"]]")),null===(p=(d=this.cbs).oncommentend)||void 0===p||p.call(d)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=this.stack.length;r>0;this.cbs.onclosetag(this.stack[--r],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,r,n;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(n=(r=this.cbs).onparserinit)||void 0===n||n.call(r,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.getSlice=function(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var n,i,a,o=r(3379);function s(e){return e===n.Space||e===n.NewLine||e===n.Tab||e===n.FormFeed||e===n.CarriageReturn}function c(e){return e===n.Slash||e===n.Gt||s(e)}function u(e){return e>=n.Zero&&e<=n.Nine}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(n||(n={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.SpecialStartSequence=23]="SpecialStartSequence",e[e.InSpecialTag=24]="InSpecialTag",e[e.BeforeEntity=25]="BeforeEntity",e[e.BeforeNumericEntity=26]="BeforeNumericEntity",e[e.InNamedEntity=27]="InNamedEntity",e[e.InNumericEntity=28]="InNumericEntity",e[e.InHexEntity=29]="InHexEntity"}(i||(i={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(a=t.QuoteType||(t.QuoteType={}));var l={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},d=function(){function e(e,t){var r=e.xmlMode,n=void 0!==r&&r,a=e.decodeEntities,s=void 0===a||a;this.cbs=t,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=n,this.decodeEntities=s,this.entityTrie=n?o.xmlDecodeTree:o.htmlDecodeTree}return e.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===n.Amp&&(this.state=i.BeforeEntity)},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?c(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===n.Gt||s(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart=n.LowerA&&e<=n.LowerZ||e>=n.UpperA&&e<=n.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=i.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===n.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===n.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode||t!==l.TitleEnd[2]?this.state=this.xmlMode||t!==l.ScriptEnd[2]?i.InTagName:i.BeforeSpecialS:this.startSpecial(l.TitleEnd,3)}else e===n.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){c(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){s(e)||(e===n.Gt?this.state=i.Text:(this.state=this.isTagStartChar(e)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===n.Gt||s(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===n.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===n.Slash?this.state=i.InSelfClosingTag:s(e)||(this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===n.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.baseState=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):s(e)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===n.Eq||c(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===n.Eq?this.state=i.BeforeAttributeValue:e===n.Slash||e===n.Gt?(this.cbs.onattribend(a.NoValue,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):s(e)||(this.cbs.onattribend(a.NoValue,this.index),this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===n.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):e===n.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):s(e)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===n.DoubleQuote?a.Double:a.Single,this.index),this.state=i.BeforeAttributeName):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,n.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,n.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){s(e)||e===n.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===n.Amp&&(this.baseState=this.state,this.state=i.BeforeEntity)},e.prototype.stateBeforeDeclaration=function(e){e===n.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=e===n.Dash?i.BeforeComment:i.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===n.Dash?(this.state=i.InCommentLike,this.currentSequence=l.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===l.ScriptEnd[3]?this.startSpecial(l.ScriptEnd,4):t===l.StyleEnd[3]?this.startSpecial(l.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeEntity=function(e){this.entityExcess=1,this.entityResult=0,e===n.Number?this.state=i.BeforeNumericEntity:e===n.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=i.InNamedEntity,this.stateInNamedEntity(e))},e.prototype.stateInNamedEntity=function(e){if(this.entityExcess+=1,this.trieIndex=(0,o.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];var t=this.trieCurrent&o.BinTrieFlags.VALUE_LENGTH;if(t){var r=(t>>14)-1;if(this.allowLegacyEntity()||e===n.Semi){var i=this.index-this.entityExcess+1;i>this.sectionStart&&this.emitPartial(this.sectionStart,i),this.entityResult=this.trieIndex,this.trieIndex+=r,this.entityExcess=0,this.sectionStart=this.index+1,0===r&&this.emitNamedEntity()}else this.trieIndex+=r}},e.prototype.emitNamedEntity=function(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&o.BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~o.BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}},e.prototype.stateBeforeNumericEntity=function(e){(32|e)===n.LowerX?(this.entityExcess++,this.state=i.InHexEntity):(this.state=i.InNumericEntity,this.stateInNumericEntity(e))},e.prototype.emitNumericEntity=function(e){var t=this.index-this.entityExcess-1;t+2+Number(this.state===i.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint((0,o.replaceCodePoint)(this.entityResult))),this.state=this.baseState},e.prototype.stateInNumericEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):u(e)?(this.entityResult=10*this.entityResult+(e-n.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.stateInHexEntity=function(e){e===n.Semi?this.emitNumericEntity(!0):u(e)?(this.entityResult=16*this.entityResult+(e-n.Zero),this.entityExcess++):function(e){return e>=n.UpperA&&e<=n.UpperF||e>=n.LowerA&&e<=n.LowerF}(e)?(this.entityResult=16*this.entityResult+((32|e)-n.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===i.Text||this.baseState===i.InSpecialTag)},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==i.InAttributeValueDq&&this.state!==i.InAttributeValueSq&&this.state!==i.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index{"use strict";var t=/^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i,r=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,n=/\s|\uFEFF|\xA0/,i=/\r?\n[\x20\x09]+/g,a=/[;,"]/,o=/[;,"]|\s/,s=/^[!#$%&'*+\-\.^_`|~\da-zA-Z]+$/;function c(e){return e.replace(r,"")}function u(e){return n.test(e)}function l(e,t){for(;u(e[t]);)t++;return t}function d(e){return o.test(e)||!s.test(e)}class p{constructor(e){this.refs=[],e&&this.parse(e)}rel(e){for(var t=[],r=e.toLowerCase(),n=0;n{return r=t,n=e,Object.keys(r).length===Object.keys(n).length&&Object.keys(r).every((e=>e in n&&r[e]===n[e]));var r,n}))||this.refs.push(e),this}has(e,t){e=e.toLowerCase(),t=t.toLowerCase();for(var r=0;r",t)))throw new Error("Expected end of URI delimiter at offset "+t);o={uri:e.slice(t+1,h)},t=h,r=2,t++}else if(2===r){if(u(e[t])){t++;continue}if(";"===e[t])r=4,t++;else{if(","!==e[t])throw new Error('Unexpected character "'+e[t]+'" at offset '+t);r=1,t++}}else{if(4!==r)throw new Error('Unknown parser state "'+r+'"');if(";"===e[t]||u(e[t])){t++;continue}-1===(h=e.indexOf("=",t))&&(h=e.indexOf(";",t)),-1===h&&(h=e.length);var s=c(e.slice(t,h)).toLowerCase(),d="";if('"'===e[t=l(e,t=h+1)])for(t++;t"),e.push(t);return e.join(", ")}}p.isCompatibleEncoding=function(e){return t.test(e)},p.parse=function(e,t){return(new p).parse(e,t)},p.isSingleOccurenceAttr=function(e){return"rel"===e||"type"===e||"media"===e||"title"===e||"title*"===e},p.isTokenAttr=function(e){return"rel"===e||"type"===e||"anchor"===e},p.escapeQuotes=function(e){return e.replace(/"/g,'\\"')},p.expandRelations=function(e){return e.rel.split(" ").map((function(t){var r=Object.assign({},e);return r.rel=t,r}))},p.parseExtendedValue=function(e){var t=/([^']+)?(?:'([^']*)')?(.+)/.exec(e);return{language:t[2].toLowerCase(),encoding:p.isCompatibleEncoding(t[1])?null:t[1].toLowerCase(),value:p.isCompatibleEncoding(t[1])?decodeURIComponent(t[3]):t[3]}},p.formatExtendedAttribute=function(e,t){var r=(t.encoding||"utf-8").toUpperCase();return e+"="+r+"'"+(t.language||"en")+"'"+(Buffer.isBuffer(t.value)&&p.isCompatibleEncoding(r)?t.value.toString(r):Buffer.isBuffer(t.value)?t.value.toString("hex").replace(/[0-9a-f]{2}/gi,"%$1"):encodeURIComponent(t.value))},p.formatAttribute=function(e,t){return Array.isArray(t)?t.map((t=>p.formatAttribute(e,t))).join("; "):"*"===e[e.length-1]||"string"!=typeof t?p.formatExtendedAttribute(e,t):(p.isTokenAttr(e)?t=d(t)?'"'+p.escapeQuotes(t)+'"':p.escapeQuotes(t):d(t)&&(t='"'+(t=(t=encodeURIComponent(t)).replace(/%20/g," ").replace(/%2C/g,",").replace(/%3B/g,";"))+'"'),e+"="+t)},e.exports=p},39318:(e,t)=>{t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,c=(1<>1,l=-7,d=r?i-1:0,p=r?-1:1,h=e[t+d];for(d+=p,a=h&(1<<-l)-1,h>>=-l,l+=s;l>0;a=256*a+e[t+d],d+=p,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+d],d+=p,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:1/0*(h?-1:1);o+=Math.pow(2,n),a-=u}return(h?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,l=(1<>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,f=n?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+d>=1?p/c:p*Math.pow(2,1-d))*c>=2&&(o++,c/=2),o+d>=l?(s=0,o=l):o+d>=1?(s=(t*c-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+h]=255&s,h+=f,s/=256,i-=8);for(o=o<0;e[r+h]=255&o,h+=f,o/=256,u-=8);e[r+h-f]|=128*y}},6081:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Collection:()=>E,Iterable:()=>Rn,List:()=>cr,Map:()=>Ft,OrderedMap:()=>Tr,OrderedSet:()=>ln,PairSorting:()=>yn,Range:()=>Gr,Record:()=>gn,Repeat:()=>Sn,Seq:()=>W,Set:()=>Br,Stack:()=>Rr,default:()=>In,fromJS:()=>On,get:()=>ct,getIn:()=>zr,has:()=>st,hasIn:()=>Xr,hash:()=>me,is:()=>he,isAssociative:()=>O,isCollection:()=>v,isImmutable:()=>j,isIndexed:()=>S,isKeyed:()=>w,isList:()=>sr,isMap:()=>le,isOrdered:()=>M,isOrderedMap:()=>de,isOrderedSet:()=>Mr,isPlainObject:()=>it,isRecord:()=>D,isSeq:()=>P,isSet:()=>Cr,isStack:()=>Ar,isValueObject:()=>pe,merge:()=>Ot,mergeDeep:()=>xt,mergeDeepWith:()=>At,mergeWith:()=>Et,remove:()=>lt,removeIn:()=>gt,set:()=>dt,setIn:()=>ft,update:()=>bt,updateIn:()=>pt,version:()=>An});var n="delete",i=5,a=1<>>0;if(""+r!==t||4294967295===r)return NaN;t=r}return t<0?l(e)+t:t}function p(){return!0}function h(e,t,r){return(0===e&&!m(e)||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r)}function f(e,t){return g(e,t,0)}function y(e,t){return g(e,t,t)}function g(e,t,r){return void 0===e?r:m(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function m(e){return e<0||0===e&&1/e==-1/0}var b="@@__IMMUTABLE_ITERABLE__@@";function v(e){return Boolean(e&&e[b])}var _="@@__IMMUTABLE_KEYED__@@";function w(e){return Boolean(e&&e[_])}var T="@@__IMMUTABLE_INDEXED__@@";function S(e){return Boolean(e&&e[T])}function O(e){return w(e)||S(e)}var E=function(e){return v(e)?e:W(e)},x=function(e){function t(e){return w(e)?e:Y(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E),A=function(e){function t(e){return S(e)?e:Z(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E),R=function(e){function t(e){return v(e)&&!O(e)?e:ee(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(E);E.Keyed=x,E.Indexed=A,E.Set=R;var I="@@__IMMUTABLE_SEQ__@@";function P(e){return Boolean(e&&e[I])}var N="@@__IMMUTABLE_RECORD__@@";function D(e){return Boolean(e&&e[N])}function j(e){return v(e)||D(e)}var C="@@__IMMUTABLE_ORDERED__@@";function M(e){return Boolean(e&&e[C])}var L=0,k=1,F=2,B="function"==typeof Symbol&&Symbol.iterator,U="@@iterator",q=B||U,V=function(e){this.next=e};function Q(e,t,r,n){var i=0===e?t:1===e?r:[t,r];return n?n.value=i:n={value:i,done:!1},n}function $(){return{value:void 0,done:!0}}function H(e){return!!Array.isArray(e)||!!K(e)}function G(e){return e&&"function"==typeof e.next}function z(e){var t=K(e);return t&&t.call(e)}function K(e){var t=e&&(B&&e[B]||e[U]);if("function"==typeof t)return t}V.prototype.toString=function(){return"[Iterator]"},V.KEYS=L,V.VALUES=k,V.ENTRIES=F,V.prototype.inspect=V.prototype.toSource=function(){return this.toString()},V.prototype[q]=function(){return this};var X=Object.prototype.hasOwnProperty;function J(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var W=function(e){function t(e){return null==e?ae():j(e)?e.toSeq():function(e){var t,r,n=ce(e);if(n)return(r=K(t=e))&&r===t.entries?n.fromEntrySeq():function(e){var t=K(e);return t&&t===e.keys}(e)?n.toSetSeq():n;if("object"==typeof e)return new re(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var r=this._cache;if(r){for(var n=r.length,i=0;i!==n;){var a=r[t?n-++i:i++];if(!1===e(a[1],a[0],this))break}return i}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var r=this._cache;if(r){var n=r.length,i=0;return new V((function(){if(i===n)return{value:void 0,done:!0};var a=r[t?n-++i:i++];return Q(e,a[0],a[1])}))}return this.__iteratorUncached(e,t)},t}(E),Y=function(e){function t(e){return null==e?ae().toKeyedSeq():v(e)?w(e)?e.toSeq():e.fromEntrySeq():D(e)?e.toSeq():oe(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(W),Z=function(e){function t(e){return null==e?ae():v(e)?w(e)?e.entrySeq():e.toIndexedSeq():D(e)?e.toSeq().entrySeq():se(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(W),ee=function(e){function t(e){return(v(e)&&!O(e)?e:Z(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(W);W.isSeq=P,W.Keyed=Y,W.Set=ee,W.Indexed=Z,W.prototype[I]=!0;var te=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[d(this,e)]:t},t.prototype.__iterate=function(e,t){for(var r=this._array,n=r.length,i=0;i!==n;){var a=t?n-++i:i++;if(!1===e(r[a],a,this))break}return i},t.prototype.__iterator=function(e,t){var r=this._array,n=r.length,i=0;return new V((function(){if(i===n)return{value:void 0,done:!0};var a=t?n-++i:i++;return Q(e,a,r[a])}))},t}(Z),re=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return X.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,i=n.length,a=0;a!==i;){var o=n[t?i-++a:a++];if(!1===e(r[o],o,this))break}return a},t.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,i=n.length,a=0;return new V((function(){if(a===i)return{value:void 0,done:!0};var o=n[t?i-++a:a++];return Q(e,o,r[o])}))},t}(Y);re.prototype[C]=!0;var ne,ie=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=z(this._collection),n=0;if(G(r))for(var i;!(i=r.next()).done&&!1!==e(i.value,n++,this););return n},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=z(this._collection);if(!G(r))return new V($);var n=0;return new V((function(){var t=r.next();return t.done?t:Q(e,n++,t.value)}))},t}(Z);function ae(){return ne||(ne=new te([]))}function oe(e){var t=ce(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new re(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function se(e){var t=ce(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function ce(e){return J(e)?new te(e):H(e)?new ie(e):void 0}var ue="@@__IMMUTABLE_MAP__@@";function le(e){return Boolean(e&&e[ue])}function de(e){return le(e)&&M(e)}function pe(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function he(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(pe(e)&&pe(t)&&e.equals(t))}var fe="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var r=65535&(e|=0),n=65535&(t|=0);return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0};function ye(e){return e>>>1&1073741824|3221225471&e}var ge=Object.prototype.valueOf;function me(e){if(null==e)return be(e);if("function"==typeof e.hashCode)return ye(e.hashCode(e));var t,r,n,i=(t=e).valueOf!==ge&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==i)return be(i);switch(typeof i){case"boolean":return i?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;for(t!==e&&(t^=4294967295*e);e>4294967295;)t^=e/=4294967295;return ye(t)}(i);case"string":return i.length>Re?(void 0===(n=Ne[r=i])&&(n=ve(r),Pe===Ie&&(Pe=0,Ne={}),Pe++,Ne[r]=n),n):ve(i);case"object":case"function":return function(e){var t;if(Oe&&void 0!==(t=Se.get(e)))return t;if(void 0!==(t=e[Ae]))return t;if(!we){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[Ae]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=Te(),Oe)Se.set(e,t);else{if(void 0!==_e&&!1===_e(e))throw new Error("Non-extensible objects are not allowed as keys.");if(we)Object.defineProperty(e,Ae,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[Ae]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[Ae]=t}}return t}(i);case"symbol":return function(e){var t=Ee[e];return void 0!==t||(t=Te(),Ee[e]=t),t}(i);default:if("function"==typeof i.toString)return ve(i.toString());throw new Error("Value type "+typeof i+" cannot be hashed.")}}function be(e){return null===e?1108378658:1108378659}function ve(e){for(var t=0,r=0;r=0&&(u.get=function(t,r){return(t=d(this,t))>=0&&ts)return{value:void 0,done:!0};var e=i.next();return n||t===k||e.done?e:Q(t,c-1,t===L?void 0:e.value[1],e)}))},u}function qe(e,t,r,n){var i=Je(e);return i.__iterateUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterate(i,a);var s=!0,c=0;return e.__iterate((function(e,a,u){if(!s||!(s=t.call(r,e,a,u)))return c++,i(e,n?a:c-1,o)})),c},i.__iteratorUncached=function(i,a){var o=this;if(a)return this.cacheResult().__iterator(i,a);var s=e.__iterator(F,a),c=!0,u=0;return new V((function(){var e,a,l;do{if((e=s.next()).done)return n||i===k?e:Q(i,u++,i===L?void 0:e.value[1],e);var d=e.value;a=d[0],l=d[1],c&&(c=t.call(r,l,a,o))}while(c);return i===F?e:Q(i,a,l,e)}))},i}function Ve(e,t,r){var n=Je(e);return n.__iterateUncached=function(i,a){if(a)return this.cacheResult().__iterate(i,a);var o=0,s=!1;return function e(c,u){c.__iterate((function(a,c){return(!t||u0}function Ge(e,t,r,n){var i=Je(e),a=new te(r).map((function(e){return e.size}));return i.size=n?a.max():a.min(),i.__iterate=function(e,t){for(var r,n=this.__iterator(k,t),i=0;!(r=n.next()).done&&!1!==e(r.value,i++,this););return i},i.__iteratorUncached=function(e,i){var a=r.map((function(e){return e=E(e),z(i?e.reverse():e)})),o=0,s=!1;return new V((function(){var r;return s||(r=a.map((function(e){return e.next()})),s=n?r.every((function(e){return e.done})):r.some((function(e){return e.done}))),s?{value:void 0,done:!0}:Q(e,o++,t.apply(null,r.map((function(e){return e.value}))))}))},i}function ze(e,t){return e===t?e:P(e)?t:e.constructor(t)}function Ke(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Xe(e){return w(e)?x:S(e)?A:R}function Je(e){return Object.create((w(e)?Y:S(e)?Z:ee).prototype)}function We(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):W.prototype.cacheResult.call(this)}function Ye(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e0;)t[r]=arguments[r+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return St(this,t,e)}function St(e,t,r){for(var n=[],i=0;i0;)t[r]=arguments[r+1];return It(e,t)}function Et(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return It(t,r,e)}function xt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Rt(e,t)}function At(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Rt(t,r,e)}function Rt(e,t,r){return It(e,t,function(e){return function t(r,n,i){return at(r)&&at(n)&&(a=n,o=W(r),s=W(a),S(o)===S(s)&&w(o)===w(s))?It(r,[n],t):e?e(r,n,i):n;var a,o,s}}(r))}function It(e,t,r){if(!at(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(j(e))return"function"==typeof r&&e.mergeWith?e.mergeWith.apply(e,[r].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var n=Array.isArray(e),i=e,a=n?A:x,o=n?function(t){i===e&&(i=ut(i)),i.push(t)}:function(t,n){var a=X.call(i,n),o=a&&r?r(i[n],t,n):t;a&&o===i[n]||(i===e&&(i=ut(i)),i[n]=o)},s=0;s0;)t[r]=arguments[r+1];return Rt(this,t,e)}function Dt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return pt(this,e,Jt(),(function(e){return It(e,t)}))}function jt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return pt(this,e,Jt(),(function(e){return Rt(e,t)}))}function Ct(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Mt(){return this.__ownerID?this:this.__ensureOwner(new u)}function Lt(){return this.__ensureOwner()}function kt(){return this.__altered}var Ft=function(e){function t(t){return null==t?Jt():le(t)&&!M(t)?t:Jt().withMutations((function(r){var n=e(t);tt(n.size),n.forEach((function(e,t){return r.set(t,e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Jt().withMutations((function(t){for(var r=0;r=e.length)throw new Error("Missing value for key: "+e[r]);t.set(e[r],e[r+1])}}))},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return Wt(this,e,t)},t.prototype.remove=function(e){return Wt(this,e,s)},t.prototype.deleteAll=function(e){var t=E(e);return 0===t.size?this:this.withMutations((function(e){t.forEach((function(t){return e.remove(t)}))}))},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Jt()},t.prototype.sort=function(e){return Tr(Qe(this,e))},t.prototype.sortBy=function(e,t){return Tr(Qe(this,t,e))},t.prototype.map=function(e,t){var r=this;return this.withMutations((function(n){n.forEach((function(i,a){n.set(a,e.call(t,i,a,r))}))}))},t.prototype.__iterator=function(e,t){return new Gt(this,e,t)},t.prototype.__iterate=function(e,t){var r=this,n=0;return this._root&&this._root.iterate((function(t){return n++,e(t[1],t[0],r)}),t),n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Xt(this.size,this._root,e,this.__hash):0===this.size?Jt():(this.__ownerID=e,this.__altered=!1,this)},t}(x);Ft.isMap=le;var Bt=Ft.prototype;Bt[ue]=!0,Bt[n]=Bt.remove,Bt.removeAll=Bt.deleteAll,Bt.setIn=yt,Bt.removeIn=Bt.deleteIn=mt,Bt.update=vt,Bt.updateIn=_t,Bt.merge=Bt.concat=wt,Bt.mergeWith=Tt,Bt.mergeDeep=Pt,Bt.mergeDeepWith=Nt,Bt.mergeIn=Dt,Bt.mergeDeepIn=jt,Bt.withMutations=Ct,Bt.wasAltered=kt,Bt.asImmutable=Lt,Bt["@@transducer/init"]=Bt.asMutable=Mt,Bt["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Bt["@@transducer/result"]=function(e){return e.asImmutable()};var Ut=function(e,t){this.ownerID=e,this.entries=t};Ut.prototype.get=function(e,t,r,n){for(var i=this.entries,a=0,o=i.length;a=nr)return function(e,t,r,n){e||(e=new u);for(var i=new $t(e,me(r),[r,n]),a=0;a>>e)&o),s=this.bitmap;return s&a?this.nodes[tr(s&a-1)].get(e+i,t,r,n):n},qt.prototype.update=function(e,t,r,n,c,u,l){void 0===r&&(r=me(n));var d=(0===t?r:r>>>t)&o,p=1<=ir)return function(e,t,r,n,i){for(var o=0,s=new Array(a),c=0;0!==r;c++,r>>>=1)s[c]=1&r?t[o++]:void 0;return s[n]=i,new Vt(e,o+1,s)}(e,g,h,d,b);if(f&&!b&&2===g.length&&Zt(g[1^y]))return g[1^y];if(f&&b&&1===g.length&&Zt(b))return b;var v=e&&e===this.ownerID,_=f?b?h:h^p:h|p,w=f?b?rr(g,y,b,v):function(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var i=new Array(n),a=0,o=0;o>>e)&o,s=this.nodes[a];return s?s.get(e+i,t,r,n):n},Vt.prototype.update=function(e,t,r,n,a,c,u){void 0===r&&(r=me(n));var l=(0===t?r:r>>>t)&o,d=a===s,p=this.nodes,h=p[l];if(d&&!h)return this;var f=Yt(h,e,t+i,r,n,a,c,u);if(f===h)return this;var y=this.count;if(h){if(!f&&--y>>r)&o,u=(0===r?n:n>>>r)&o,l=c===u?[er(e,t,r+i,n,a)]:(s=new $t(t,n,a),c>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,127&(e+=e>>8)+(e>>16)}function rr(e,t,r,n){var i=n?e:Ze(e);return i[t]=r,i}var nr=a/4,ir=a/2,ar=a/4,or="@@__IMMUTABLE_LIST__@@";function sr(e){return Boolean(e&&e[or])}var cr=function(e){function t(t){var r=yr();if(null==t)return r;if(sr(t))return t;var n=e(t),o=n.size;return 0===o?r:(tt(o),o>0&&o=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?vr(e,t).set(0,r):vr(e,0,t+1).set(t,r)}));t+=e._origin;var n=e._tail,i=e._root,a={value:!1};return t>=_r(e._capacity)?n=gr(n,e.__ownerID,0,t,r,a):i=gr(i,e.__ownerID,e._level,t,r,a),a.value?e.__ownerID?(e._root=i,e._tail=n,e.__hash=void 0,e.__altered=!0,e):fr(e._origin,e._capacity,e._level,i,n):e}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=i,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):yr()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(r){vr(r,0,t+e.length);for(var n=0;n>>t&o;if(n>=this.array.length)return new lr([],e);var a,s=0===n;if(t>0){var c=this.array[n];if((a=c&&c.removeBefore(e,t-i,r))===c&&s)return this}if(s&&!a)return this;var u=mr(this,e);if(!s)for(var l=0;l>>t&o;if(a>=this.array.length)return this;if(t>0){var s=this.array[a];if((n=s&&s.removeAfter(e,t-i,r))===s&&a===this.array.length-1)return this}var c=mr(this,e);return c.array.splice(a+1),n&&(c.array[a]=n),c};var dr,pr={};function hr(e,t){var r=e._origin,n=e._capacity,o=_r(n),s=e._tail;return function e(c,u,l){return 0===u?function(e,i){var c=i===o?s&&s.array:e&&e.array,u=i>r?0:r-i,l=n-i;return l>a&&(l=a),function(){if(u===l)return pr;var e=t?--l:u++;return c&&c[e]}}(c,l):function(o,s,c){var u,l=o&&o.array,d=c>r?0:r-c>>s,p=1+(n-c>>s);return p>a&&(p=a),function(){for(;;){if(u){var r=u();if(r!==pr)return r;u=null}if(d===p)return pr;var n=t?--p:d++;u=e(l&&l[n],s-i,c+(n<>>r&o,d=e&&l0){var p=e&&e.array[l],h=gr(p,t,r-i,n,a,s);return h===p?e:((u=mr(e,t)).array[l]=h,u)}return d&&e.array[l]===a?e:(s&&c(s),u=mr(e,t),void 0===a&&l===u.array.length-1?u.array.pop():u.array[l]=a,u)}function mr(e,t){return t&&e&&t===e.ownerID?e:new lr(e?e.array.slice():[],t)}function br(e,t){if(t>=_r(e._capacity))return e._tail;if(t<1<0;)r=r.array[t>>>n&o],n-=i;return r}}function vr(e,t,r){void 0!==t&&(t|=0),void 0!==r&&(r|=0);var n=e.__ownerID||new u,a=e._origin,s=e._capacity,c=a+t,l=void 0===r?s:r<0?s+r:a+r;if(c===a&&l===s)return e;if(c>=l)return e.clear();for(var d=e._level,p=e._root,h=0;c+h<0;)p=new lr(p&&p.array.length?[void 0,p]:[],n),h+=1<<(d+=i);h&&(c+=h,a+=h,l+=h,s+=h);for(var f=_r(s),y=_r(l);y>=1<f?new lr([],n):g;if(g&&y>f&&ci;v-=i){var _=f>>>v&o;b=b.array[_]=mr(b.array[_],n)}b.array[f>>>i&o]=g}if(l=y)c-=y,l-=y,d=i,p=null,m=m&&m.removeBefore(n,0,c);else if(c>a||y>>d&o;if(w!==y>>>d&o)break;w&&(h+=(1<a&&(p=p.removeBefore(n,d,c-h)),p&&y>>i<=a&&c.size>=2*o.size?(n=(i=c.filter((function(e,t){return void 0!==e&&u!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(n.__ownerID=i.__ownerID=e.__ownerID)):(n=o.remove(t),i=u===c.size-1?c.pop():c.set(u,void 0))}else if(l){if(r===c.get(u)[1])return e;n=o,i=c.set(u,[t,r])}else n=o.set(t,c.size),i=c.set(c.size,[t,r]);return e.__ownerID?(e.size=n.size,e._map=n,e._list=i,e.__hash=void 0,e.__altered=!0,e):Sr(n,i)}Tr.isOrderedMap=de,Tr.prototype[C]=!0,Tr.prototype[n]=Tr.prototype.remove;var xr="@@__IMMUTABLE_STACK__@@";function Ar(e){return Boolean(e&&e[xr])}var Rr=function(e){function t(e){return null==e?Dr():Ar(e)?e:Dr().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var r=this._head;for(e=d(this,e);r&&e--;)r=r.next;return r?r.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:e[n],next:r};return this.__ownerID?(this.size=t,this._head=r,this.__hash=void 0,this.__altered=!0,this):Nr(t,r)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Ar(t))return t;tt(t.size);var r=this.size,n=this._head;return t.__iterate((function(e){r++,n={value:e,next:n}}),!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):Nr(r,n)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Dr()},t.prototype.slice=function(t,r){if(h(t,r,this.size))return this;var n=f(t,this.size);if(y(r,this.size)!==this.size)return e.prototype.slice.call(this,t,r);for(var i=this.size-n,a=this._head;n--;)a=a.next;return this.__ownerID?(this.size=i,this._head=a,this.__hash=void 0,this.__altered=!0,this):Nr(i,a)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Nr(this.size,this._head,e,this.__hash):0===this.size?Dr():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var r=this;if(t)return new te(this.toArray()).__iterate((function(t,n){return e(t,n,r)}),t);for(var n=0,i=this._head;i&&!1!==e(i.value,n++,this);)i=i.next;return n},t.prototype.__iterator=function(e,t){if(t)return new te(this.toArray()).__iterator(e,t);var r=0,n=this._head;return new V((function(){if(n){var t=n.value;return n=n.next,Q(e,r++,t)}return{value:void 0,done:!0}}))},t}(A);Rr.isStack=Ar;var Ir,Pr=Rr.prototype;function Nr(e,t,r,n){var i=Object.create(Pr);return i.size=e,i._head=t,i.__ownerID=r,i.__hash=n,i.__altered=!1,i}function Dr(){return Ir||(Ir=Nr(0))}Pr[xr]=!0,Pr.shift=Pr.pop,Pr.unshift=Pr.push,Pr.unshiftAll=Pr.pushAll,Pr.withMutations=Ct,Pr.wasAltered=kt,Pr.asImmutable=Lt,Pr["@@transducer/init"]=Pr.asMutable=Mt,Pr["@@transducer/step"]=function(e,t){return e.unshift(t)},Pr["@@transducer/result"]=function(e){return e.asImmutable()};var jr="@@__IMMUTABLE_SET__@@";function Cr(e){return Boolean(e&&e[jr])}function Mr(e){return Cr(e)&&M(e)}function Lr(e,t){if(e===t)return!0;if(!v(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||w(e)!==w(t)||S(e)!==S(t)||M(e)!==M(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!O(e);if(M(e)){var n=e.entries();return t.every((function(e,t){var i=n.next().value;return i&&he(i[1],e)&&(r||he(i[0],t))}))&&n.next().done}var i=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{i=!0;var a=e;e=t,t=a}var o=!0,c=t.__iterate((function(t,n){if(r?!e.has(t):i?!he(t,e.get(n,s)):!he(e.get(n,s),t))return o=!1,!1}));return o&&e.size===c}function kr(e,t){var r=function(r){e.prototype[r]=t[r]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}function Fr(e){if(!e||"object"!=typeof e)return e;if(!v(e)){if(!at(e))return e;e=W(e)}if(w(e)){var t={};return e.__iterate((function(e,r){t[r]=Fr(e)})),t}var r=[];return e.__iterate((function(e){r.push(Fr(e))})),r}var Br=function(e){function t(t){return null==t?$r():Cr(t)&&!M(t)?t:$r().withMutations((function(r){var n=e(t);tt(n.size),n.forEach((function(e){return r.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(x(e).keySeq())},t.intersect=function(e){return(e=E(e).toArray()).length?qr.intersect.apply(t(e.pop()),e):$r()},t.union=function(e){return(e=E(e).toArray()).length?qr.union.apply(t(e.pop()),e):$r()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Vr(this,this._map.set(e,e))},t.prototype.remove=function(e){return Vr(this,this._map.remove(e))},t.prototype.clear=function(){return Vr(this,this._map.clear())},t.prototype.map=function(e,t){var r=this,n=!1,i=Vr(this,this._map.mapEntries((function(i){var a=i[1],o=e.call(t,a,a,r);return o!==a&&(n=!0),[o,o]}),t));return n?i:this},t.prototype.union=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return 0===(t=t.filter((function(e){return 0!==e.size}))).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations((function(r){for(var n=0;n=0&&t=0&&r>>-15,461845907),t=fe(t<<13|t>>>-13,5),t=fe((t=t+3864292196^e)^t>>>16,2246822507),t=ye((t=fe(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(r?t?function(e,t){n=31*n+un(me(e),me(t))|0}:function(e,t){n=n+un(me(e),me(t))|0}:t?function(e){n=31*n+me(e)|0}:function(e){n=n+me(e)|0}),n)}(this))}});var Wr=E.prototype;Wr[b]=!0,Wr[q]=Wr.values,Wr.toJSON=Wr.toArray,Wr.__toStringMapper=ot,Wr.inspect=Wr.toSource=function(){return this.toString()},Wr.chain=Wr.flatMap,Wr.contains=Wr.includes,kr(x,{flip:function(){return ze(this,Le(this))},mapEntries:function(e,t){var r=this,n=0;return ze(this,this.toSeq().map((function(i,a){return e.call(t,[a,i],n++,r)})).fromEntrySeq())},mapKeys:function(e,t){var r=this;return ze(this,this.toSeq().flip().map((function(n,i){return e.call(t,n,i,r)})).flip())}});var Yr=x.prototype;Yr[_]=!0,Yr[q]=Wr.entries,Yr.toJSON=Jr,Yr.__toStringMapper=function(e,t){return ot(t)+": "+ot(e)},kr(A,{toKeyedSeq:function(){return new De(this,!1)},filter:function(e,t){return ze(this,Be(this,e,t,!1))},findIndex:function(e,t){var r=this.findEntry(e,t);return r?r[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return ze(this,Fe(this,!1))},slice:function(e,t){return ze(this,Ue(this,e,t,!1))},splice:function(e,t){var r=arguments.length;if(t=Math.max(t||0,0),0===r||2===r&&!t)return this;e=f(e,e<0?this.count():this.size);var n=this.slice(0,e);return ze(this,1===r?n:n.concat(Ze(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var r=this.findLastEntry(e,t);return r?r[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return ze(this,Ve(this,e,!1))},get:function(e,t){return(e=d(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,r){return r===e}),void 0,t)},has:function(e){return(e=d(this,e))>=0&&(void 0!==this.size?this.size===1/0||et?-1:0}function un(e,t){return e^t+2654435769+(e<<6)+(e>>2)}en.has=Wr.includes,en.contains=en.includes,en.keys=en.values,kr(Y,Yr),kr(Z,Zr),kr(ee,en);var ln=function(e){function t(e){return null==e?fn():Mr(e)?e:fn().withMutations((function(t){var r=R(e);tt(r.size),r.forEach((function(e){return t.add(e)}))}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(x(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Br);ln.isOrderedSet=Mr;var dn,pn=ln.prototype;function hn(e,t){var r=Object.create(pn);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function fn(){return dn||(dn=hn(Or()))}pn[C]=!0,pn.zip=Zr.zip,pn.zipWith=Zr.zipWith,pn.zipAll=Zr.zipAll,pn.__empty=fn,pn.__make=hn;var yn={LeftThenRight:-1,RightThenLeft:1},gn=function(e,t){var r;!function(e){if(D(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(j(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var n=function(a){var o=this;if(a instanceof n)return a;if(!(this instanceof n))return new n(a);if(!r){r=!0;var s=Object.keys(e),c=i._indices={};i._name=t,i._keys=s,i._defaultValues=e;for(var u=0;u2?[]:void 0,{"":e})}function En(e,t,r,n,i,a){if("string"!=typeof r&&!j(r)&&(J(r)||H(r)||it(r))){if(~e.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");e.push(r),i&&""!==n&&i.push(n);var o=t.call(a,n,W(r).map((function(n,a){return En(e,t,n,a,i,r)})),i&&i.slice());return e.pop(),i&&i.pop(),o}return r}function xn(e,t){return S(t)?t.toList():w(t)?t.toMap():t.toSet()}var An="4.3.5",Rn=E;const In={version:An,Collection:E,Iterable:E,Seq:W,Map:Ft,OrderedMap:Tr,List:cr,Stack:Rr,Set:Br,OrderedSet:ln,PairSorting:yn,Record:gn,Range:Gr,Repeat:Sn,is:he,fromJS:On,hash:me,isImmutable:j,isCollection:v,isKeyed:w,isIndexed:S,isAssociative:O,isOrdered:M,isValueObject:pe,isPlainObject:it,isSeq:P,isList:sr,isMap:le,isOrderedMap:de,isStack:Ar,isSet:Cr,isOrderedSet:Mr,isRecord:D,get:ct,getIn:zr,has:st,hasIn:Xr,merge:Ot,mergeDeep:xt,mergeWith:Et,mergeDeepWith:At,remove:lt,removeIn:gt,set:dt,setIn:ft,update:bt,updateIn:pt}},35615: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}}},76605:e=>{"use strict";const t=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform,e.exports=t},27202:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(85346),t),i(r(40905),t),i(r(76920),t),i(r(11971),t),i(r(89715),t),i(r(39426),t),i(r(45512),t)},85346:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextParser=void 0,r(17082);const n=r(9929),i=r(40905),a=r(76920),o=r(39426),s=r(45512);class c{constructor(e){e=e||{},this.documentLoader=e.documentLoader||new a.FetchDocumentLoader,this.documentCache={},this.validateContext=!e.skipValidation,this.expandContentTypeToBase=!!e.expandContentTypeToBase,this.remoteContextsDepthLimit=e.remoteContextsDepthLimit||32,this.redirectSchemaOrgHttps=!("redirectSchemaOrgHttps"in e)||!!e.redirectSchemaOrgHttps}static validateLanguage(e,t,r){if("string"!=typeof e)throw new i.ErrorCoded(`The value of an '@language' must be a string, got '${JSON.stringify(e)}'`,r);if(!s.Util.REGEX_LANGUAGE_TAG.test(e)){if(t)throw new i.ErrorCoded(`The value of an '@language' must be a valid language tag, got '${JSON.stringify(e)}'`,r);return!1}return!0}static validateDirection(e,t){if("string"!=typeof e)throw new i.ErrorCoded(`The value of an '@direction' must be a string, got '${JSON.stringify(e)}'`,i.ERROR_CODES.INVALID_BASE_DIRECTION);if(!s.Util.REGEX_DIRECTION_TAG.test(e)){if(t)throw new i.ErrorCoded(`The value of an '@direction' must be 'ltr' or 'rtl', got '${JSON.stringify(e)}'`,i.ERROR_CODES.INVALID_BASE_DIRECTION);return!1}return!0}idifyReverseTerms(e){for(const t of Object.keys(e)){let r=e[t];if(r&&"object"==typeof r&&r["@reverse"]&&!r["@id"]){if("string"!=typeof r["@reverse"]||s.Util.isValidKeyword(r["@reverse"]))throw new i.ErrorCoded(`Invalid @reverse value, must be absolute IRI or blank node: '${r["@reverse"]}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);r=e[t]=Object.assign(Object.assign({},r),{"@id":r["@reverse"]}),r["@id"]=r["@reverse"],s.Util.isPotentialKeyword(r["@reverse"])?delete r["@reverse"]:r["@reverse"]=!0}}return e}expandPrefixedTerms(e,t,r){const n=e.getContextRaw();for(const a of r||Object.keys(n))if(s.Util.EXPAND_KEYS_BLACKLIST.indexOf(a)<0&&!s.Util.isReservedInternalKeyword(a)){const r=n[a];if(s.Util.isPotentialKeyword(a)&&s.Util.ALIAS_DOMAIN_BLACKLIST.indexOf(a)>=0&&("@type"!==a||"object"==typeof n[a]&&!n[a]["@protected"]&&"@set"!==n[a]["@container"]))throw new i.ErrorCoded(`Keywords can not be aliased to something else.\nTried mapping ${a} to ${JSON.stringify(r)}`,i.ERROR_CODES.KEYWORD_REDEFINITION);if(s.Util.ALIAS_RANGE_BLACKLIST.indexOf(s.Util.getContextValueId(r))>=0)throw new i.ErrorCoded(`Aliasing to certain keywords is not allowed.\nTried mapping ${a} to ${JSON.stringify(r)}`,i.ERROR_CODES.INVALID_KEYWORD_ALIAS);if(r&&s.Util.isPotentialKeyword(s.Util.getContextValueId(r))&&!0===r["@prefix"])throw new i.ErrorCoded(`Tried to use keyword aliases as prefix: '${a}': '${JSON.stringify(r)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);for(;s.Util.isPrefixValue(n[a]);){const r=n[a];let i=!1;if("string"==typeof r)n[a]=e.expandTerm(r,!0),i=i||r!==n[a];else{const o=r["@id"],c=r["@type"],u=!("@prefix"in r)||s.Util.isValidIri(a);if("@id"in r)null!=o&&"string"==typeof o&&(n[a]=Object.assign(Object.assign({},n[a]),{"@id":e.expandTerm(o,!0)}),i=i||o!==n[a]["@id"]);else if(!s.Util.isPotentialKeyword(a)&&u){const t=e.expandTerm(a,!0);t!==a&&(n[a]=Object.assign(Object.assign({},n[a]),{"@id":t}),i=!0)}if(c&&"string"==typeof c&&"@vocab"!==c&&(!r["@container"]||!r["@container"]["@type"])&&u){let r=e.expandTerm(c,!0);t&&c===r&&(r=e.expandTerm(c,!1)),r!==c&&(i=!0,n[a]=Object.assign(Object.assign({},n[a]),{"@type":r}))}}if(!i)break}}}normalize(e,{processingMode:t,normalizeLanguageTags:r}){if(r||1===t)for(const t of Object.keys(e))if("@language"===t&&"string"==typeof e[t])e[t]=e[t].toLowerCase();else{const r=e[t];if(r&&"object"==typeof r&&"string"==typeof r["@language"]){const n=r["@language"].toLowerCase();n!==r["@language"]&&(e[t]=Object.assign(Object.assign({},r),{"@language":n}))}}}containersToHash(e){for(const t of Object.keys(e)){const r=e[t];if(r&&"object"==typeof r)if("string"==typeof r["@container"])e[t]=Object.assign(Object.assign({},r),{"@container":{[r["@container"]]:!0}});else if(Array.isArray(r["@container"])){const n={};for(const e of r["@container"])n[e]=!0;e[t]=Object.assign(Object.assign({},r),{"@container":n})}}}applyScopedProtected(e,{processingMode:t},r){if(t&&t>=1.1&&e["@protected"]){for(const t of Object.keys(e))if(!s.Util.isReservedInternalKeyword(t)&&!s.Util.isPotentialKeyword(t)&&!s.Util.isTermProtected(e,t)){const n=e[t];n&&"object"==typeof n?"@protected"in e[t]||(e[t]=Object.assign(Object.assign({},e[t]),{"@protected":!0})):(e[t]={"@id":n,"@protected":!0},s.Util.isSimpleTermDefinitionPrefix(n,r)&&(e[t]=Object.assign(Object.assign({},e[t]),{"@prefix":!0})))}delete e["@protected"]}}validateKeywordRedefinitions(e,t,r,n){for(const r of null!=n?n:Object.keys(t))if(s.Util.isTermProtected(e,r)&&("string"==typeof t[r]?t[r]={"@id":t[r],"@protected":!0}:t[r]=Object.assign(Object.assign({},t[r]),{"@protected":!0}),!s.Util.deepEqual(e[r],t[r])))throw new i.ErrorCoded(`Attempted to override the protected keyword ${r} from ${JSON.stringify(s.Util.getContextValueId(e[r]))} to ${JSON.stringify(s.Util.getContextValueId(t[r]))}`,i.ERROR_CODES.PROTECTED_TERM_REDEFINITION)}validate(e,{processingMode:t}){for(const r of Object.keys(e)){if(s.Util.isReservedInternalKeyword(r))continue;if(""===r)throw new i.ErrorCoded(`The empty term is not allowed, got: '${r}': '${JSON.stringify(e[r])}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);const n=e[r],a=typeof n;if(s.Util.isPotentialKeyword(r)){switch(r.substr(1)){case"vocab":if(null!==n&&"string"!==a)throw new i.ErrorCoded(`Found an invalid @vocab IRI: ${n}`,i.ERROR_CODES.INVALID_VOCAB_MAPPING);break;case"base":if(null!==n&&"string"!==a)throw new i.ErrorCoded(`Found an invalid @base IRI: ${e[r]}`,i.ERROR_CODES.INVALID_BASE_IRI);break;case"language":null!==n&&c.validateLanguage(n,!0,i.ERROR_CODES.INVALID_DEFAULT_LANGUAGE);break;case"version":if(null!==n&&"number"!==a)throw new i.ErrorCoded(`Found an invalid @version number: ${n}`,i.ERROR_CODES.INVALID_VERSION_VALUE);break;case"direction":null!==n&&c.validateDirection(n,!0);break;case"propagate":if(1===t)throw new i.ErrorCoded(`Found an illegal @propagate keyword: ${n}`,i.ERROR_CODES.INVALID_CONTEXT_ENTRY);if(null!==n&&"boolean"!==a)throw new i.ErrorCoded(`Found an invalid @propagate value: ${n}`,i.ERROR_CODES.INVALID_PROPAGATE_VALUE)}if(s.Util.isValidKeyword(r)&&s.Util.isValidKeyword(s.Util.getContextValueId(n)))throw new i.ErrorCoded(`Illegal keyword alias in term value, found: '${r}': '${s.Util.getContextValueId(n)}'`,i.ERROR_CODES.KEYWORD_REDEFINITION)}else if(null!==n)switch(a){case"string":if(s.Util.getPrefix(n,e)===r)throw new i.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.CYCLIC_IRI_MAPPING);if(s.Util.isValidIriWeak(r)){if("@type"===n)throw new i.ErrorCoded(`IRIs can not be mapped to @type, found: '${r}': '${n}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIri(n)&&n!==new o.JsonLdContextNormalized(e).expandTerm(r))throw new i.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${r}': '${n}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}break;case"object":if(!(s.Util.isCompactIri(r)||"@id"in n||("@id"===n["@type"]?e["@base"]:e["@vocab"])))throw new i.ErrorCoded(`Missing @id in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);for(const u of Object.keys(n)){const l=n[u];if(l)switch(u){case"@id":if(s.Util.isValidKeyword(l)&&"@type"!==l&&"@id"!==l&&"@graph"!==l&&"@nest"!==l)throw new i.ErrorCoded(`Illegal keyword alias in term value, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIriWeak(r)){if("@type"===l)throw new i.ErrorCoded(`IRIs can not be mapped to @type, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.isValidIri(l)&&l!==new o.JsonLdContextNormalized(e).expandTerm(r))throw new i.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}if("string"!=typeof l)throw new i.ErrorCoded(`Detected non-string @id in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING);if(s.Util.getPrefix(l,e)===r)throw new i.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.CYCLIC_IRI_MAPPING);break;case"@type":if("@type"===n["@container"]&&"@id"!==l&&"@vocab"!==l)throw new i.ErrorCoded(`@container: @type only allows @type: @id or @vocab, but got: '${r}': '${l}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);if("string"!=typeof l)throw new i.ErrorCoded(`The value of an '@type' must be a string, got '${JSON.stringify(a)}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);if(!("@id"===l||"@vocab"===l||1!==t&&"@json"===l||1!==t&&"@none"===l||"_"!==l[0]&&s.Util.isValidIri(l)))throw new i.ErrorCoded(`A context @type must be an absolute IRI, found: '${r}': '${l}'`,i.ERROR_CODES.INVALID_TYPE_MAPPING);break;case"@reverse":if("string"==typeof l&&n["@id"]&&n["@id"]!==l)throw new i.ErrorCoded(`Found non-matching @id and @reverse term values in '${r}':'${l}' and '${n["@id"]}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);if("@nest"in n)throw new i.ErrorCoded(`@nest is not allowed in the reverse property '${r}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);break;case"@container":if(1===t&&(Object.keys(l).length>1||s.Util.CONTAINERS_1_0.indexOf(Object.keys(l)[0])<0))throw new i.ErrorCoded(`Invalid term @container for '${r}' ('${Object.keys(l)}') in 1.0, must be only one of ${s.Util.CONTAINERS_1_0.join(", ")}`,i.ERROR_CODES.INVALID_CONTAINER_MAPPING);for(const e of Object.keys(l)){if("@list"===e&&n["@reverse"])throw new i.ErrorCoded(`Term value can not be @container: @list and @reverse at the same time on '${r}'`,i.ERROR_CODES.INVALID_REVERSE_PROPERTY);if(s.Util.CONTAINERS.indexOf(e)<0)throw new i.ErrorCoded(`Invalid term @container for '${r}' ('${e}'), must be one of ${s.Util.CONTAINERS.join(", ")}`,i.ERROR_CODES.INVALID_CONTAINER_MAPPING)}break;case"@language":c.validateLanguage(l,!0,i.ERROR_CODES.INVALID_LANGUAGE_MAPPING);break;case"@direction":c.validateDirection(l,!0);break;case"@prefix":if(null!==l&&"boolean"!=typeof l)throw new i.ErrorCoded(`Found an invalid term @prefix boolean in: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_PREFIX_VALUE);if(!("@id"in n)&&!s.Util.isValidIri(r))throw new i.ErrorCoded(`Invalid @prefix definition for '${r}' ('${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@index":if(1===t||!n["@container"]||!n["@container"]["@index"])throw new i.ErrorCoded(`Attempt to add illegal key to value object: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@nest":if(s.Util.isPotentialKeyword(l)&&"@nest"!==l)throw new i.ErrorCoded(`Found an invalid term @nest value in: '${r}': '${JSON.stringify(n)}'`,i.ERROR_CODES.INVALID_NEST_VALUE)}}break;default:throw new i.ErrorCoded(`Found an invalid term value: '${r}': '${n}'`,i.ERROR_CODES.INVALID_TERM_DEFINITION)}}}applyBaseEntry(e,t,r){return"string"==typeof e||(r&&!("@base"in e)&&t.parentContext&&"object"==typeof t.parentContext&&"@base"in t.parentContext&&(e["@base"]=t.parentContext["@base"],t.parentContext["@__baseDocument"]&&(e["@__baseDocument"]=!0)),t.baseIRI&&!t.external&&("@base"in e?null===e["@base"]||"string"!=typeof e["@base"]||s.Util.isValidIri(e["@base"])||(e["@base"]=(0,n.resolve)(e["@base"],t.parentContext&&t.parentContext["@base"]||t.baseIRI)):(e["@base"]=t.baseIRI,e["@__baseDocument"]=!0))),e}normalizeContextIri(e,t){if(!s.Util.isValidIri(e))try{e=(0,n.resolve)(e,t)}catch(t){throw new Error(`Invalid context IRI: ${e}`)}return this.redirectSchemaOrgHttps&&e.startsWith("http://schema.org")&&(e="https://schema.org/"),e}async parseInnerContexts(e,t,r){for(const n of null!=r?r:Object.keys(e)){const r=e[n];if(r&&"object"==typeof r&&"@context"in r&&null!==r["@context"]&&!t.ignoreScopedContexts){if(this.validateContext)try{const i=Object.assign(Object.assign({},e),{[n]:Object.assign({},e[n])});delete i[n]["@context"],await this.parse(r["@context"],Object.assign(Object.assign({},t),{external:!1,parentContext:i,ignoreProtection:!0,ignoreRemoteScopedContexts:!0,ignoreScopedContexts:!0}))}catch(e){throw new i.ErrorCoded(e.message,i.ERROR_CODES.INVALID_SCOPED_CONTEXT)}e[n]=Object.assign(Object.assign({},r),{"@context":(await this.parse(r["@context"],Object.assign(Object.assign({},t),{external:!1,minimalProcessing:!0,ignoreRemoteScopedContexts:!0,parentContext:e}))).getContextRaw()})}}return e}async parse(e,t={},r={}){const{baseIRI:n,parentContext:a,external:u,processingMode:l=c.DEFAULT_PROCESSING_MODE,normalizeLanguageTags:d,ignoreProtection:p,minimalProcessing:h}=t,f=t.remoteContexts||{};if(Object.keys(f).length>=this.remoteContextsDepthLimit)throw new i.ErrorCoded("Detected an overflow in remote context inclusions: "+Object.keys(f),i.ERROR_CODES.CONTEXT_OVERFLOW);if(null==e){if(!p&&a&&s.Util.hasProtectedTerms(a))throw new i.ErrorCoded("Illegal context nullification when terms are protected",i.ERROR_CODES.INVALID_CONTEXT_NULLIFICATION);return new o.JsonLdContextNormalized(this.applyBaseEntry({},t,!1))}if("string"==typeof e){const r=this.normalizeContextIri(e,n),i=this.getOverriddenLoad(r,t);if(i)return new o.JsonLdContextNormalized(i);const a=await this.parse(await this.load(r),Object.assign(Object.assign({},t),{baseIRI:r,external:!0,remoteContexts:Object.assign(Object.assign({},f),{[r]:!0})}));return this.applyBaseEntry(a.getContextRaw(),t,!0),a}if(Array.isArray(e)){const r=[],i=await Promise.all(e.map(((e,i)=>{if("string"==typeof e){const a=this.normalizeContextIri(e,n);r[i]=a;return this.getOverriddenLoad(a,t)||this.load(a)}return e})));if(h)return new o.JsonLdContextNormalized(i);const s=await i.reduce(((e,n,a)=>e.then((e=>this.parse(n,Object.assign(Object.assign({},t),{baseIRI:r[a]||t.baseIRI,external:!!r[a]||t.external,parentContext:e.getContextRaw(),remoteContexts:r[a]?Object.assign(Object.assign({},f),{[r[a]]:!0}):f}),{skipValidation:a=1.1))throw new i.ErrorCoded("Context importing is not supported in JSON-LD 1.0",i.ERROR_CODES.INVALID_CONTEXT_ENTRY);if("string"!=typeof e["@import"])throw new i.ErrorCoded("An @import value must be a string, but got "+typeof e["@import"],i.ERROR_CODES.INVALID_IMPORT_VALUE);f=await this.loadImportContext(this.normalizeContextIri(e["@import"],n)),delete e["@import"]}this.applyScopedProtected(f,{processingMode:l},o.defaultExpandOptions);const y=Object.assign(f,e);this.idifyReverseTerms(y),this.normalize(y,{processingMode:l,normalizeLanguageTags:d}),this.applyScopedProtected(y,{processingMode:l},o.defaultExpandOptions);const g=Object.keys(y),m=[];if("object"==typeof a)for(const e in a)e in y?m.push(e):y[e]=a[e];await this.parseInnerContexts(y,t,g);const b=new o.JsonLdContextNormalized(y);return(y&&y["@version"]||c.DEFAULT_PROCESSING_MODE)>=1.1&&(e["@vocab"]&&"string"==typeof e["@vocab"]||""===e["@vocab"])&&(a&&"@vocab"in a&&e["@vocab"].indexOf(":")<0?y["@vocab"]=a["@vocab"]+e["@vocab"]:(s.Util.isCompactIri(e["@vocab"])||e["@vocab"]in y)&&(y["@vocab"]=b.expandTerm(e["@vocab"],!0))),this.expandPrefixedTerms(b,this.expandContentTypeToBase,g),!p&&a&&l>=1.1&&this.validateKeywordRedefinitions(a,y,o.defaultExpandOptions,m),this.validateContext&&!r.skipValidation&&this.validate(y,{processingMode:l}),b}throw new i.ErrorCoded(`Tried parsing a context that is not a string, array or object, but got ${e}`,i.ERROR_CODES.INVALID_LOCAL_CONTEXT)}async load(e){const t=this.documentCache[e];if(t)return t;let r;try{r=await this.documentLoader.load(e)}catch(t){throw new i.ErrorCoded(`Failed to load remote context ${e}: ${t.message}`,i.ERROR_CODES.LOADING_REMOTE_CONTEXT_FAILED)}if(!("@context"in r))throw new i.ErrorCoded(`Missing @context in remote context at ${e}`,i.ERROR_CODES.INVALID_REMOTE_CONTEXT);return this.documentCache[e]=r["@context"]}getOverriddenLoad(e,t){if(e in(t.remoteContexts||{})){if(t.ignoreRemoteScopedContexts)return e;throw new i.ErrorCoded("Detected a cyclic context inclusion of "+e,i.ERROR_CODES.RECURSIVE_CONTEXT_INCLUSION)}return null}async loadImportContext(e){let t=await this.load(e);if("object"!=typeof t||Array.isArray(t))throw new i.ErrorCoded("An imported context must be a single object: "+e,i.ERROR_CODES.INVALID_REMOTE_CONTEXT);if("@import"in t)throw new i.ErrorCoded("An imported context can not import another context: "+e,i.ERROR_CODES.INVALID_CONTEXT_ENTRY);return t=Object.assign({},t),this.containersToHash(t),t}}c.DEFAULT_PROCESSING_MODE=1.1,t.ContextParser=c},40905:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR_CODES=t.ErrorCoded=void 0;class r extends Error{constructor(e,t){super(e),this.code=t}}var n;t.ErrorCoded=r,(n=t.ERROR_CODES||(t.ERROR_CODES={})).COLLIDING_KEYWORDS="colliding keywords",n.CONFLICTING_INDEXES="conflicting indexes",n.CYCLIC_IRI_MAPPING="cyclic IRI mapping",n.INVALID_ID_VALUE="invalid @id value",n.INVALID_INDEX_VALUE="invalid @index value",n.INVALID_NEST_VALUE="invalid @nest value",n.INVALID_PREFIX_VALUE="invalid @prefix value",n.INVALID_PROPAGATE_VALUE="invalid @propagate value",n.INVALID_REVERSE_VALUE="invalid @reverse value",n.INVALID_IMPORT_VALUE="invalid @import value",n.INVALID_VERSION_VALUE="invalid @version value",n.INVALID_BASE_IRI="invalid base IRI",n.INVALID_CONTAINER_MAPPING="invalid container mapping",n.INVALID_CONTEXT_ENTRY="invalid context entry",n.INVALID_CONTEXT_NULLIFICATION="invalid context nullification",n.INVALID_DEFAULT_LANGUAGE="invalid default language",n.INVALID_INCLUDED_VALUE="invalid @included value",n.INVALID_IRI_MAPPING="invalid IRI mapping",n.INVALID_JSON_LITERAL="invalid JSON literal",n.INVALID_KEYWORD_ALIAS="invalid keyword alias",n.INVALID_LANGUAGE_MAP_VALUE="invalid language map value",n.INVALID_LANGUAGE_MAPPING="invalid language mapping",n.INVALID_LANGUAGE_TAGGED_STRING="invalid language-tagged string",n.INVALID_LANGUAGE_TAGGED_VALUE="invalid language-tagged value",n.INVALID_LOCAL_CONTEXT="invalid local context",n.INVALID_REMOTE_CONTEXT="invalid remote context",n.INVALID_REVERSE_PROPERTY="invalid reverse property",n.INVALID_REVERSE_PROPERTY_MAP="invalid reverse property map",n.INVALID_REVERSE_PROPERTY_VALUE="invalid reverse property value",n.INVALID_SCOPED_CONTEXT="invalid scoped context",n.INVALID_SCRIPT_ELEMENT="invalid script element",n.INVALID_SET_OR_LIST_OBJECT="invalid set or list object",n.INVALID_TERM_DEFINITION="invalid term definition",n.INVALID_TYPE_MAPPING="invalid type mapping",n.INVALID_TYPE_VALUE="invalid type value",n.INVALID_TYPED_VALUE="invalid typed value",n.INVALID_VALUE_OBJECT="invalid value object",n.INVALID_VALUE_OBJECT_VALUE="invalid value object value",n.INVALID_VOCAB_MAPPING="invalid vocab mapping",n.IRI_CONFUSED_WITH_PREFIX="IRI confused with prefix",n.KEYWORD_REDEFINITION="keyword redefinition",n.LOADING_DOCUMENT_FAILED="loading document failed",n.LOADING_REMOTE_CONTEXT_FAILED="loading remote context failed",n.MULTIPLE_CONTEXT_LINK_HEADERS="multiple context link headers",n.PROCESSING_MODE_CONFLICT="processing mode conflict",n.PROTECTED_TERM_REDEFINITION="protected term redefinition",n.CONTEXT_OVERFLOW="context overflow",n.INVALID_BASE_DIRECTION="invalid base direction",n.RECURSIVE_CONTEXT_INCLUSION="recursive context inclusion",n.INVALID_STREAMING_KEY_ORDER="invalid streaming key order",n.INVALID_EMBEDDED_NODE="invalid embedded node",n.INVALID_ANNOTATION="invalid annotation"},76920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchDocumentLoader=void 0,r(17082);const n=r(40905),i=r(75441),a=r(9929);t.FetchDocumentLoader=class{constructor(e){this.fetcher=e}async load(e){const t=await(this.fetcher||fetch)(e,{headers:new Headers({accept:"application/ld+json"})});if(t.ok&&t.headers){let r=t.headers.get("Content-Type");if(r){const e=r.indexOf(";");e>0&&(r=r.substr(0,e))}if("application/ld+json"===r)return await t.json();if(t.headers.has("Link")){let r;if(t.headers.forEach(((t,n)=>{if("link"===n){const n=(0,i.parse)(t);for(const t of n.get("type","application/ld+json"))if("alternate"===t.rel){if(r)throw new Error("Multiple JSON-LD alternate links were found on "+e);r=(0,a.resolve)(t.uri,e)}}})),r)return this.load(r)}throw new n.ErrorCoded(`Unsupported JSON-LD media type ${r}`,n.ERROR_CODES.LOADING_DOCUMENT_FAILED)}throw new Error(t.statusText||`Status code: ${t.status}`)}}},11971:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},89715:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},39426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultExpandOptions=t.JsonLdContextNormalized=void 0;const n=r(9929),i=r(40905),a=r(45512);t.JsonLdContextNormalized=class{constructor(e){this.contextRaw=e}getContextRaw(){return this.contextRaw}expandTerm(e,r,o=t.defaultExpandOptions){const s=this.contextRaw[e];if(null===s||s&&null===s["@id"])return null;let c=!0;if(s&&r){const t=a.Util.getContextValueId(s);if(t&&t!==e){if("string"==typeof t&&(a.Util.isValidIri(t)||a.Util.isValidKeyword(t)))return t;a.Util.isPotentialKeyword(t)||(c=!1)}}const u=a.Util.getPrefix(e,this.contextRaw),l=this.contextRaw["@vocab"],d=(!!l||""===l)&&l.indexOf(":")<0,p=this.contextRaw["@base"],h=a.Util.isPotentialKeyword(e);if(u){const t=this.contextRaw[u],r=a.Util.getContextValueId(t);if(r){if("string"!=typeof t&&o.allowPrefixForcing){if("_"!==r[0]&&!h&&!t["@prefix"]&&!(e in this.contextRaw))return e}else if(!a.Util.isSimpleTermDefinitionPrefix(r,o))return e;return r+e.substr(u.length+1)}}else{if(r&&(l||""===l||o.allowVocabRelativeToBase&&p&&d)&&!h&&!a.Util.isCompactIri(e)){if(d){if(o.allowVocabRelativeToBase)return(l||p?(0,n.resolve)(l,p):"")+e;throw new i.ErrorCoded(`Relative vocab expansion for term '${e}' with vocab '${l}' is not allowed.`,i.ERROR_CODES.INVALID_VOCAB_MAPPING)}return l+e}if(!r&&p&&!h&&!a.Util.isCompactIri(e))return(0,n.resolve)(e,p)}if(c)return e;throw new i.ErrorCoded(`Invalid IRI mapping found for context entry '${e}': '${JSON.stringify(s)}'`,i.ERROR_CODES.INVALID_IRI_MAPPING)}compactIri(e,t){if(t&&this.contextRaw["@vocab"]&&e.startsWith(this.contextRaw["@vocab"]))return e.substr(this.contextRaw["@vocab"].length);if(!t&&this.contextRaw["@base"]&&e.startsWith(this.contextRaw["@base"]))return e.substr(this.contextRaw["@base"].length);const r={prefix:"",suffix:e};for(const n in this.contextRaw){const i=this.contextRaw[n];if(i&&!a.Util.isPotentialKeyword(n)){const o=a.Util.getContextValueId(i);if(e.startsWith(o)){const i=e.substr(o.length);if(i)i.length{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;class r{static isCompactIri(e){return e.indexOf(":")>0&&!(e&&"#"===e[0])}static getPrefix(e,t){if(e&&"#"===e[0])return null;const r=e.indexOf(":");if(r>=0){if(e.length>r+1&&"/"===e.charAt(r+1)&&"/"===e.charAt(r+2))return null;const n=e.substr(0,r);if("_"===n)return null;if(t[n])return n}return null}static getContextValueId(e){if(null===e||"string"==typeof e)return e;return e["@id"]||null}static isSimpleTermDefinitionPrefix(e,t){return!r.isPotentialKeyword(e)&&(t.allowPrefixNonGenDelims||"string"==typeof e&&("_"===e[0]||r.isPrefixIriEndingWithGenDelim(e)))}static isPotentialKeyword(e){return"string"==typeof e&&r.KEYWORD_REGEX.test(e)}static isPrefixIriEndingWithGenDelim(e){return r.ENDS_WITH_GEN_DELIM.test(e)}static isPrefixValue(e){return e&&("string"==typeof e||e&&"object"==typeof e)}static isValidIri(e){return Boolean(e&&r.IRI_REGEX.test(e))}static isValidIriWeak(e){return!!e&&":"!==e[0]&&r.IRI_REGEX_WEAK.test(e)}static isValidKeyword(e){return r.VALID_KEYWORDS[e]}static isTermProtected(e,t){const r=e[t];return!("string"==typeof r)&&r&&r["@protected"]}static hasProtectedTerms(e){for(const t of Object.keys(e))if(r.isTermProtected(e,t))return!0;return!1}static isReservedInternalKeyword(e){return e.startsWith("@__")}static deepEqual(e,t){const r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every((r=>{const n=e[r],i=t[r];return n===i||null!==n&&null!==i&&"object"==typeof n&&"object"==typeof i&&this.deepEqual(n,i)}))}}r.IRI_REGEX=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^ "<>{}|\\\[\]`#]*(#[^#]*)?$/,r.IRI_REGEX_WEAK=/(?::[^:])|\//,r.KEYWORD_REGEX=/^@[a-z]+$/i,r.ENDS_WITH_GEN_DELIM=/[:/?#\[\]@]$/,r.REGEX_LANGUAGE_TAG=/^[a-zA-Z]+(-[a-zA-Z0-9]+)*$/,r.REGEX_DIRECTION_TAG=/^(ltr)|(rtl)$/,r.VALID_KEYWORDS={"@annotation":!0,"@base":!0,"@container":!0,"@context":!0,"@direction":!0,"@graph":!0,"@id":!0,"@import":!0,"@included":!0,"@index":!0,"@json":!0,"@language":!0,"@list":!0,"@nest":!0,"@none":!0,"@prefix":!0,"@propagate":!0,"@protected":!0,"@reverse":!0,"@set":!0,"@type":!0,"@value":!0,"@version":!0,"@vocab":!0},r.EXPAND_KEYS_BLACKLIST=["@base","@vocab","@language","@version","@direction"],r.ALIAS_DOMAIN_BLACKLIST=["@container","@graph","@id","@index","@list","@nest","@none","@prefix","@reverse","@set","@type","@value","@version"],r.ALIAS_RANGE_BLACKLIST=["@context","@preserve"],r.CONTAINERS=["@list","@set","@index","@language","@graph","@id","@type"],r.CONTAINERS_1_0=["@list","@set","@index"],t.Util=r},17082:function(){!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}}(),a="FormData"in e,o="ArrayBuffer"in e;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function u(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 d(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 p(e){this.map={},e instanceof p?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 h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,r){e.onload=function(){t(e.result)},e.onerror=function(){r(e.error)}}))}function y(e){var t=new FileReader,r=f(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 m(){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:a&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:r&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(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=h(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?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(y)}),this.text=function(){var e,t,r,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,r=f(t=new FileReader),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-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 _(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 w(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 p(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},m.call(v.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var T=[301,302,303,307,308];w.redirect=function(e,t){if(-1===T.indexOf(t))throw new RangeError("Invalid status code");return new w(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,a){var o=new v(e,r);if(o.signal&&o.signal.aborted)return a(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function c(){s.abort()}s.onload=function(){var e,t,r={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new p,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 s?s.responseURL:r.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;n(new w(i,r))},s.onerror=function(){a(new TypeError("Network request failed"))},s.ontimeout=function(){a(new TypeError("Network request failed"))},s.onabort=function(){a(new t.DOMException("Aborted","AbortError"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&i&&(s.responseType="blob"),o.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),o.signal&&(o.signal.addEventListener("abort",c),s.onreadystatechange=function(){4===s.readyState&&o.signal.removeEventListener("abort",c)}),s.send(void 0===o._bodyInit?null:o._bodyInit)}))}S.polyfill=!0,e.fetch||(e.fetch=S,e.Headers=p,e.Request=v,e.Response=w),t.Headers=p,t.Request=v,t.Response=w,t.fetch=S,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)},50631:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(90114),t)},46240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContextTree=void 0;class r{constructor(){this.subTrees={}}getContext(e){if(e.length>0){const[t,...r]=e,n=this.subTrees[t];if(n){const e=n.getContext(r);if(e)return e.then((({context:e,depth:t})=>({context:e,depth:t+1})))}}return this.context?this.context.then((e=>({context:e,depth:0}))):null}setContext(e,t){if(0===e.length)this.context=t;else{const[n,...i]=e;let a=this.subTrees[n];a||(a=this.subTrees[n]=new r),a.setContext(i,t)}}removeContext(e){this.setContext(e,null)}}t.ContextTree=r},90114:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonLdParser=void 0;const n=r(36885),i=r(27202),a=r(58521),o=r(11272),s=r(45947),c=r(62885),u=r(29997),l=r(66700),d=r(37071),p=r(48978),h=r(30643),f=r(58865),y=r(23787),g=r(30635),m=r(94382),b=r(24292),v=r(22135),_=r(75441),w=r(6042);class T extends a.Transform{constructor(e){super({readableObjectMode:!0}),e=e||{},this.options=e,this.parsingContext=new b.ParsingContext(Object.assign({parser:this},e)),this.util=new v.Util({dataFactory:e.dataFactory,parsingContext:this.parsingContext}),this.jsonParser=new n,this.contextJobs=[],this.typeJobs=[],this.contextAwaitingJobs=[],this.lastDepth=0,this.lastKeys=[],this.lastOnValueJob=Promise.resolve(),this.attachJsonParserListeners(),this.on("end",(()=>{void 0!==this.jsonParser.mode&&this.emit("error",new Error("Unclosed document"))}))}static fromHttpResponse(e,t,r,n){let a,o,s=["application/activity+json"];if(n&&n.wellKnownMediaTypes&&(s=n.wellKnownMediaTypes),"application/ld+json"!==t&&!s.includes(t)){if("application/json"!==t&&!t.endsWith("+json"))throw new i.ErrorCoded(`Unsupported JSON-LD media type ${t}`,i.ERROR_CODES.LOADING_DOCUMENT_FAILED);if(r&&r.has("Link")&&r.forEach(((t,r)=>{if("link"===r){const r=(0,_.parse)(t);for(const t of r.get("rel","http://www.w3.org/ns/json-ld#context")){if(a)throw new i.ErrorCoded("Multiple JSON-LD context link headers were found on "+e,i.ERROR_CODES.MULTIPLE_CONTEXT_LINK_HEADERS);a=t.uri}}})),!a&&!(null==n?void 0:n.ignoreMissingContextLinkHeader))throw new i.ErrorCoded(`Missing context link header for media type ${t} on ${e}`,i.ERROR_CODES.LOADING_DOCUMENT_FAILED)}if(r&&r.has("Content-Type")){const e=r.get("Content-Type"),t=/; *profile=([^"]*)/.exec(e);t&&"http://www.w3.org/ns/json-ld#streaming"===t[1]&&(o=!0)}return new T(Object.assign({baseIRI:e,context:a,streamingProfile:o},n||{}))}import(e){if("pipe"in e){e.on("error",(e=>t.emit("error",e)));const t=e.pipe(new T(this.options));return t}{const t=new a.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new T(this.options));return r}}_transform(e,t,r){this.jsonParser.write(e),this.lastOnValueJob.then((()=>r()),(e=>r(e)))}async newOnValueJob(e,t,r,n){let a=!0;if(n&&r1&&(l=this.parsingContext.validationStack[this.parsingContext.validationStack.length-1].property);for(let t=Math.max(1,this.parsingContext.validationStack.length-1);t=0?this.parsingContext.idStack[e-r-1]:[await this.util.getGraphContainerValue(t,e)];if(a)for(const t of a){this.parsingContext.emittedStack[e]=!0;for(const r of n)this.util.emitQuadChecked(e,i,r.predicate,r.object,t,r.reverse,r.isEmbedded)}else{const r=this.parsingContext.getUnidentifiedGraphBufferSafe(e-await this.util.getDepthOffsetGraph(e,t)-1);for(const e of n)e.reverse?r.push({object:i,predicate:e.predicate,subject:e.object,isEmbedded:e.isEmbedded}):r.push({object:e.object,predicate:e.predicate,subject:i,isEmbedded:e.isEmbedded})}}this.parsingContext.unidentifiedValuesBuffer.splice(e,1),this.parsingContext.literalStack.splice(e,1),this.parsingContext.jsonLiteralStack.splice(e,1)}const a=this.parsingContext.unidentifiedGraphsBuffer[e];if(a){for(const t of r){const r=1!==e||"BlankNode"!==t.termType||this.parsingContext.topLevelProperties?t:this.util.getDefaultGraph();this.parsingContext.emittedStack[e]=!0;for(const t of a)this.parsingContext.emitQuad(e,this.util.dataFactory.quad(t.subject,t.predicate,t.object,r))}this.parsingContext.unidentifiedGraphsBuffer.splice(e,1)}const o=this.parsingContext.annotationsBuffer[e];if(o){o.length>0&&1===e&&this.parsingContext.emitError(new i.ErrorCoded("Annotations can not be made on top-level nodes",i.ERROR_CODES.INVALID_ANNOTATION));const t=this.parsingContext.getAnnotationsBufferSafe(e-1);for(const e of o)t.push(e);delete this.parsingContext.annotationsBuffer[e]}}async validateKey(e,t,r){for(const n of T.ENTRY_HANDLERS)if(await n.validate(this.parsingContext,this.util,e,t,r))return{valid:!0,property:r||n.isPropertyHandler()};return{valid:!1,property:!1}}attachJsonParserListeners(){this.jsonParser.onValue=e=>{const t=this.jsonParser.stack.length,r=new Array(t+1).fill(0).map(((e,r)=>r===t?this.jsonParser.key:this.jsonParser.stack[r].key));if(!this.isParsingContextInner(t)){const n=()=>this.newOnValueJob(r,e,t,!0);if(this.parsingContext.streamingProfile||this.parsingContext.contextTree.getContext(r.slice(0,-1)))this.lastOnValueJob=this.lastOnValueJob.then(n);else if("@context"===r[t]){let e=this.contextJobs[t];e||(e=this.contextJobs[t]=[]),e.push(n)}else this.contextAwaitingJobs.push({job:n,keys:r,depth:t});this.parsingContext.streamingProfile||0!==t||(this.lastOnValueJob=this.lastOnValueJob.then((()=>this.executeBufferedJobs())))}},this.jsonParser.onError=e=>{this.emit("error",e)}}isParsingContextInner(e){for(let t=e;t>0;t--)if("@context"===this.jsonParser.stack[t-1].key)return!0;return!1}async executeBufferedJobs(){for(const e of this.contextJobs)if(e)for(const t of e)await t();this.parsingContext.unaliasedKeywordCacheStack.splice(0);const e=[];for(const t of this.contextAwaitingJobs)"@type"===await this.util.unaliasKeyword(t.keys[t.depth],t.keys,t.depth,!0)||"number"==typeof t.keys[t.depth]&&"@type"===await this.util.unaliasKeyword(t.keys[t.depth-1],t.keys,t.depth-1,!0)?this.typeJobs.push({job:t.job,keys:t.keys.slice(0,t.keys.length-1)}):e.push(t);for(const t of e){if(this.typeJobs.length>0){const e=[],r=[];for(let n=0;ne.keys.length-t.keys.length));for(const e of n)await e.job();const i=r.sort().reverse();for(const e of i)this.typeJobs.splice(e,1)}await t.job()}}}T.DEFAULT_PROCESSING_MODE="1.1",T.ENTRY_HANDLERS=[new o.EntryHandlerArrayValue,new l.EntryHandlerKeywordContext,new p.EntryHandlerKeywordId,new h.EntryHandlerKeywordIncluded,new d.EntryHandlerKeywordGraph,new f.EntryHandlerKeywordNest,new y.EntryHandlerKeywordType,new m.EntryHandlerKeywordValue,new w.EntryHandlerKeywordAnnotation,new s.EntryHandlerContainer,new g.EntryHandlerKeywordUnknownFallback,new u.EntryHandlerPredicate,new c.EntryHandlerInvalidFallback],t.JsonLdParser=T},24292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParsingContext=void 0;const n=r(27202),i=r(40905),a=r(46240),o=r(90114);class s{constructor(e){this.contextParser=new n.ContextParser({documentLoader:e.documentLoader,skipValidation:e.skipContextValidation}),this.streamingProfile=!!e.streamingProfile,this.baseIRI=e.baseIRI,this.produceGeneralizedRdf=!!e.produceGeneralizedRdf,this.allowSubjectList=!!e.allowSubjectList,this.processingMode=e.processingMode||o.JsonLdParser.DEFAULT_PROCESSING_MODE,this.strictValues=!!e.strictValues,this.validateValueIndexes=!!e.validateValueIndexes,this.defaultGraph=e.defaultGraph,this.rdfDirection=e.rdfDirection,this.normalizeLanguageTags=e.normalizeLanguageTags,this.streamingProfileAllowOutOfOrderPlainType=e.streamingProfileAllowOutOfOrderPlainType,this.rdfstar=!1!==e.rdfstar,this.rdfstarReverseInEmbedded=e.rdfstarReverseInEmbedded,this.topLevelProperties=!1,this.activeProcessingMode=parseFloat(this.processingMode),this.processingStack=[],this.processingType=[],this.emittedStack=[],this.idStack=[],this.graphStack=[],this.graphContainerTermStack=[],this.listPointerStack=[],this.contextTree=new a.ContextTree,this.literalStack=[],this.validationStack=[],this.unaliasedKeywordCacheStack=[],this.jsonLiteralStack=[],this.unidentifiedValuesBuffer=[],this.unidentifiedGraphsBuffer=[],this.annotationsBuffer=[],this.pendingContainerFlushBuffers=[],this.parser=e.parser,e.context?(this.rootContext=this.parseContext(e.context),this.rootContext.then((e=>this.validateContext(e)))):this.rootContext=Promise.resolve(new n.JsonLdContextNormalized(this.baseIRI?{"@base":this.baseIRI,"@__baseDocument":!0}:{}))}async parseContext(e,t,r){return this.contextParser.parse(e,{baseIRI:this.baseIRI,ignoreProtection:r,normalizeLanguageTags:this.normalizeLanguageTags,parentContext:t,processingMode:this.activeProcessingMode})}validateContext(e){const t=e.getContextRaw()["@version"];if(t){if(this.activeProcessingMode&&t>this.activeProcessingMode)throw new i.ErrorCoded(`Unsupported JSON-LD version '${t}' under active processing mode ${this.activeProcessingMode}.`,i.ERROR_CODES.PROCESSING_MODE_CONFLICT);if(this.activeProcessingMode&&t0&&!1===i.context.getContextRaw()["@propagate"]&&i.depth!==t&&!r);return 0===i.depth&&!1===i.context.getContextRaw()["@propagate"]&&i.depth!==t&&(i.context=new n.JsonLdContextNormalized({})),i}async newOnValueJob(e,t,r,n){await this.parser.newOnValueJob(e,t,r,n)}async handlePendingContainerFlushBuffers(){if(this.pendingContainerFlushBuffers.length>0){for(const e of this.pendingContainerFlushBuffers)await this.parser.flushBuffer(e.depth,e.keys),this.parser.flushStacks(e.depth);return this.pendingContainerFlushBuffers.splice(0,this.pendingContainerFlushBuffers.length),!0}return!1}emitQuad(e,t){1===e&&(this.topLevelProperties=!0),this.parser.push(t)}emitError(e){this.parser.emit("error",e)}emitContext(e){this.parser.emit("context",e)}getUnidentifiedValueBufferSafe(e){let t=this.unidentifiedValuesBuffer[e];return t||(t=[],this.unidentifiedValuesBuffer[e]=t),t}getUnidentifiedGraphBufferSafe(e){let t=this.unidentifiedGraphsBuffer[e];return t||(t=[],this.unidentifiedGraphsBuffer[e]=t),t}getAnnotationsBufferSafe(e){let t=this.annotationsBuffer[e];return t||(t=[],this.annotationsBuffer[e]=t),t}getExpandOptions(){return s.EXPAND_OPTIONS[this.activeProcessingMode]}shiftStack(e,t){const r=this.idStack[e+t];if(r&&(this.idStack[e]=r,this.emittedStack[e]=!0,delete this.idStack[e+t]),this.pendingContainerFlushBuffers.length)for(const r of this.pendingContainerFlushBuffers)r.depth>=e+t&&(r.depth-=t,r.keys.splice(e,t));this.unidentifiedValuesBuffer[e+t]&&(this.unidentifiedValuesBuffer[e]=this.unidentifiedValuesBuffer[e+t],delete this.unidentifiedValuesBuffer[e+t]),this.annotationsBuffer[e+t-1]&&(this.annotationsBuffer[e-1]||(this.annotationsBuffer[e-1]=[]),this.annotationsBuffer[e-1]=[...this.annotationsBuffer[e-1],...this.annotationsBuffer[e+t-1]],delete this.annotationsBuffer[e+t-1])}}s.EXPAND_OPTIONS={1:{allowPrefixForcing:!1,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!1},1.1:{allowPrefixForcing:!0,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!0}},t.ParsingContext=s},22135:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(27202),i=r(18050),a=r(45947),o=r(33619);class s{constructor(e){this.parsingContext=e.parsingContext,this.dataFactory=e.dataFactory||new i.DataFactory,this.rdfFirst=this.dataFactory.namedNode(s.RDF+"first"),this.rdfRest=this.dataFactory.namedNode(s.RDF+"rest"),this.rdfNil=this.dataFactory.namedNode(s.RDF+"nil"),this.rdfType=this.dataFactory.namedNode(s.RDF+"type"),this.rdfJson=this.dataFactory.namedNode(s.RDF+"JSON")}static getContextValue(e,t,r,n){const i=e.getContextRaw()[r];if(!i)return n;const a=i[t];return void 0===a?n:a}static getContextValueContainer(e,t){return s.getContextValue(e,"@container",t,{"@set":!0})}static getContextValueType(e,t){const r=s.getContextValue(e,"@type",t,null);return"@none"===r?null:r}static getContextValueLanguage(e,t){return s.getContextValue(e,"@language",t,e.getContextRaw()["@language"]||null)}static getContextValueDirection(e,t){return s.getContextValue(e,"@direction",t,e.getContextRaw()["@direction"]||null)}static isContextValueReverse(e,t){return!!s.getContextValue(e,"@reverse",t,null)}static getContextValueIndex(e,t){return s.getContextValue(e,"@index",t,e.getContextRaw()["@index"]||null)}static isPropertyReverse(e,t,r){return"@reverse"===r!==s.isContextValueReverse(e,t)}static isPropertyInEmbeddedNode(e){return"@id"===e}static isPropertyInAnnotationObject(e){return"@annotation"===e}static isValidIri(e){return null!==e&&n.Util.isValidIri(e)}static isPrefixArray(e,t){if(e.length>t.length)return!1;for(let r=0;r1)throw new n.ErrorCoded(`Found illegal neighbouring entries next to @set for key: '${t}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);return[]}if("@list"in r){if(Object.keys(r).length>1)throw new n.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${t}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);const e=r["@list"];return Array.isArray(e)?0===e.length?[this.rdfNil]:this.parsingContext.idStack[i+1]||[]:await this.valueToTerm(await this.parsingContext.getContext(a),t,e,i-1,a.slice(0,-1))}if("@reverse"in r&&"boolean"==typeof r["@reverse"])return[];if("@graph"in s.getContextValueContainer(await this.parsingContext.getContext(a),t)){const e=this.parsingContext.graphContainerTermStack[i+1];return e?Object.values(e):[this.dataFactory.blankNode()]}if("@id"in r){if(Object.keys(r).length>1&&(e=await this.parsingContext.getContext(a,0)),"@context"in r&&(e=await this.parsingContext.parseContext(r["@context"],e.getContextRaw())),"@vocab"===r["@type"])return this.nullableTermToArray(this.createVocabOrBaseTerm(e,r["@id"]));{const t=r["@id"];let a;if("object"==typeof t){if(!this.parsingContext.rdfstar)throw new n.ErrorCoded(`Found illegal @id '${r}'`,n.ERROR_CODES.INVALID_ID_VALUE);a=this.parsingContext.idStack[i+1][0]}else a=this.resourceToTerm(e,t);return this.nullableTermToArray(a)}}return this.parsingContext.emittedStack[i+1]||r&&"object"==typeof r&&0===Object.keys(r).length?this.parsingContext.idStack[i+1]||(this.parsingContext.idStack[i+1]=[this.dataFactory.blankNode()]):[];case"string":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(e,t),t,r,null));case"boolean":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(e,t),t,Boolean(r).toString(),this.dataFactory.namedNode(s.XSD_BOOLEAN)));case"number":return this.nullableTermToArray(this.stringValueToTerm(i,await this.getContextSelfOrPropertyScoped(e,t),t,r,this.dataFactory.namedNode(r%1==0&&r<1e21?s.XSD_INTEGER:s.XSD_DOUBLE)));default:return this.parsingContext.emitError(new Error(`Could not determine the RDF type of a ${o}`)),[]}}async getContextSelfOrPropertyScoped(e,t){const r=e.getContextRaw()[t];return r&&"object"==typeof r&&"@context"in r&&(e=await this.parsingContext.parseContext(r,e.getContextRaw(),!0)),e}nullableTermToArray(e){return e?[e]:[]}predicateToTerm(e,t){const r=e.expandTerm(t,!0,this.parsingContext.getExpandOptions());return r?"_"===r[0]&&":"===r[1]?this.parsingContext.produceGeneralizedRdf?this.dataFactory.blankNode(r.substr(2)):null:s.isValidIri(r)?this.dataFactory.namedNode(r):r&&this.parsingContext.strictValues?(this.parsingContext.emitError(new n.ErrorCoded(`Invalid predicate IRI: ${r}`,n.ERROR_CODES.INVALID_IRI_MAPPING)),null):null:null}resourceToTerm(e,t){if(t.startsWith("_:"))return this.dataFactory.blankNode(t.substr(2));const r=e.expandTerm(t,!1,this.parsingContext.getExpandOptions());if(!s.isValidIri(r)){if(!r||!this.parsingContext.strictValues)return null;this.parsingContext.emitError(new Error(`Invalid resource IRI: ${r}`))}return this.dataFactory.namedNode(r)}createVocabOrBaseTerm(e,t){if(t.startsWith("_:"))return this.dataFactory.blankNode(t.substr(2));const r=this.parsingContext.getExpandOptions();let n=e.expandTerm(t,!0,r);if(n===t&&(n=e.expandTerm(t,!1,r)),!s.isValidIri(n)){if(!n||!this.parsingContext.strictValues||n.startsWith("@"))return null;this.parsingContext.emitError(new Error(`Invalid term IRI: ${n}`))}return this.dataFactory.namedNode(n)}intToString(e,t){return"number"==typeof e?Number.isFinite(e)?e%1!=0||t&&t.value===s.XSD_DOUBLE?e.toExponential(15).replace(/(\d)0*e\+?/,"$1E"):Number(e).toString():e>0?"INF":"-INF":e}stringValueToTerm(e,t,r,n,i){const a=s.getContextValueType(t,r);if(a)if("@id"===a){if(!i)return this.resourceToTerm(t,this.intToString(n,i))}else if("@vocab"===a){if(!i)return this.createVocabOrBaseTerm(t,this.intToString(n,i))}else i=this.dataFactory.namedNode(a);if(!i){const a=s.getContextValueLanguage(t,r),o=s.getContextValueDirection(t,r);return o&&this.parsingContext.rdfDirection?this.createLanguageDirectionLiteral(e,this.intToString(n,i),a,o):this.dataFactory.literal(this.intToString(n,i),a)}return this.dataFactory.literal(this.intToString(n,i),i)}createLanguageDirectionLiteral(e,t,r,n){if("i18n-datatype"===this.parsingContext.rdfDirection)return r||(r=""),this.dataFactory.literal(t,this.dataFactory.namedNode(`https://www.w3.org/ns/i18n#${r}_${n}`));{const i=this.dataFactory.blankNode(),a=this.getDefaultGraph();return this.parsingContext.emitQuad(e,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"value"),this.dataFactory.literal(t),a)),r&&this.parsingContext.emitQuad(e,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"language"),this.dataFactory.literal(r),a)),this.parsingContext.emitQuad(e,this.dataFactory.quad(i,this.dataFactory.namedNode(s.RDF+"direction"),this.dataFactory.literal(n),a)),i}}valueToJsonString(e){return o(e)}async unaliasKeyword(e,t,r,i,a){if(Number.isInteger(e))return e;if(!i){const e=this.parsingContext.unaliasedKeywordCacheStack[r];if(e)return e}if(!n.Util.isPotentialKeyword(e)){let r=(a=a||await this.parsingContext.getContext(t)).getContextRaw()[e];r&&"object"==typeof r&&(r=r["@id"]),n.Util.isValidKeyword(r)&&(e=r)}return i?e:this.parsingContext.unaliasedKeywordCacheStack[r]=e}async unaliasKeywordParent(e,t){return await this.unaliasKeyword(t>0&&e[t-1],e,t-1)}async unaliasKeywords(e,t,r,n){const i={};for(const a in e)i[await this.unaliasKeyword(a,t,r+1,!0,n)]=e[a];return i}async isLiteral(e,t){for(let r=t;r>=0;r--){if("@annotation"===await this.unaliasKeyword(e[r],e,r))return!1;if(this.parsingContext.literalStack[r]||this.parsingContext.jsonLiteralStack[r])return!0}return!1}async getDepthOffsetGraph(e,t){for(let r=e-1;r>0;r--)if("@graph"===await this.unaliasKeyword(t[r],t,r)){const n=(await a.EntryHandlerContainer.getContainerHandler(this.parsingContext,t,r)).containers;return a.EntryHandlerContainer.isComplexGraphContainer(n)?-1:e-r-1}return-1}validateReverseSubject(e){if("Literal"===e.termType)throw new n.ErrorCoded(`Found illegal literal in subject position: ${e.value}`,n.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}getDefaultGraph(){return this.parsingContext.defaultGraph||this.dataFactory.defaultGraph()}async getGraphContainerValue(e,t){let r=this.getDefaultGraph();const{containers:n,depth:i}=await a.EntryHandlerContainer.getContainerHandler(this.parsingContext,e,t);if("@graph"in n){const t=a.EntryHandlerContainer.getContainerGraphIndex(n,i,e),o=this.parsingContext.graphContainerTermStack[i];if(r=o?o[t]:null,!r){let a=null;if("@id"in n){const t=await this.getContainerKey(e[i],e,i);null!==t&&(a=await this.resourceToTerm(await this.parsingContext.getContext(e),t))}a||(a=this.dataFactory.blankNode()),this.parsingContext.graphContainerTermStack[i]||(this.parsingContext.graphContainerTermStack[i]={}),r=this.parsingContext.graphContainerTermStack[i][t]=a}}return r}async getPropertiesDepth(e,t){let r=t;for(let n=t-1;n>0;n--)if("number"!=typeof e[n]){const t=await this.unaliasKeyword(e[n],e,n);if("@reverse"===t)return n;if("@nest"!==t)return r;r=n}return r}async getContainerKey(e,t,r){const n=await this.unaliasKeyword(e,t,r);return"@none"===n?null:n}validateReverseInEmbeddedNode(e,t,r){if(r&&t&&!this.parsingContext.rdfstarReverseInEmbedded)throw new n.ErrorCoded(`Illegal reverse property in embedded node in ${e}`,n.ERROR_CODES.INVALID_EMBEDDED_NODE)}emitQuadChecked(e,t,r,i,a,o,s){let c;if(o?(this.validateReverseSubject(i),c=this.dataFactory.quad(i,r,t,a)):c=this.dataFactory.quad(t,r,i,a),s){if("DefaultGraph"!==c.graph.termType&&(c=this.dataFactory.quad(c.subject,c.predicate,c.object)),this.parsingContext.idStack[e-1])throw new n.ErrorCoded("Illegal multiple properties in an embedded node",n.ERROR_CODES.INVALID_EMBEDDED_NODE);this.parsingContext.idStack[e-1]=[c]}else this.parsingContext.emitQuad(e,c);const u=this.parsingContext.annotationsBuffer[e];if(u){for(const t of u)this.emitAnnotation(e,c,t);delete this.parsingContext.annotationsBuffer[e]}}emitAnnotation(e,t,r){let n;r.reverse?(this.validateReverseSubject(r.object),n=this.dataFactory.quad(r.object,r.predicate,t)):n=this.dataFactory.quad(t,r.predicate,r.object),this.parsingContext.emitQuad(e,n);for(const t of r.nestedAnnotations)this.emitAnnotation(e,n,t)}}s.XSD="http://www.w3.org/2001/XMLSchema#",s.XSD_BOOLEAN=s.XSD+"boolean",s.XSD_INTEGER=s.XSD+"integer",s.XSD_DOUBLE=s.XSD+"double",s.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",t.Util=s},14079:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerIdentifier=void 0,t.ContainerHandlerIdentifier=class{canCombineWithGraph(){return!0}async handle(e,t,r,n,i,a){let o;if(t.emittedStack[a+1]&&t.idStack[a+1])o=t.idStack[a+1][0];else{const e=null!==await r.getContainerKey(n[a],n,a)?await r.resourceToTerm(await t.getContext(n),n[a]):r.dataFactory.blankNode();if(!e)return void(t.emittedStack[a]=!1);o=e,t.idStack[a+1]=[o]}let s=t.idStack[a];s||(s=t.idStack[a]=[]),s.some((e=>e.equals(o)))||s.push(o),await t.handlePendingContainerFlushBuffers()||(t.emittedStack[a]=!1)}}},43354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerIndex=void 0;const n=r(27202),i=r(29997),a=r(22135);t.ContainerHandlerIndex=class{canCombineWithGraph(){return!0}async handle(e,t,r,o,s,c){if(!Array.isArray(s)){const u="@graph"in e,l=await t.getContext(o),d=o[c-1],p=a.Util.getContextValueIndex(l,d);if(p){if(n.Util.isPotentialKeyword(p))throw new n.ErrorCoded(`Keywords can not be used as @index value, got: ${p}`,n.ERROR_CODES.INVALID_TERM_DEFINITION);if("string"!=typeof p)throw new n.ErrorCoded(`@index values must be strings, got: ${p}`,n.ERROR_CODES.INVALID_TERM_DEFINITION);if("object"!=typeof s){if("@id"!==a.Util.getContextValueType(l,d))throw new n.ErrorCoded(`Property-based index containers require nodes as values or strings with @type: @id, but got: ${s}`,n.ERROR_CODES.INVALID_VALUE_OBJECT);const e=r.resourceToTerm(l,s);e&&(t.idStack[c+1]=[e])}const e=r.createVocabOrBaseTerm(l,p);if(e){const n=await r.valueToTerm(l,p,await r.getContainerKey(o[c],o,c),c,o);if(u){const i=await r.getGraphContainerValue(o,c+1);for(const a of n)t.emitQuad(c,r.dataFactory.quad(i,e,a,r.getDefaultGraph()))}else for(const a of n)await i.EntryHandlerPredicate.handlePredicateObject(t,r,o,c+1,e,a,!1,!1,!1)}}const h=u?2:1;await t.newOnValueJob(o.slice(0,o.length-h),s,c-h,!0),await t.handlePendingContainerFlushBuffers()}t.emittedStack[c]=!1}}},68526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerLanguage=void 0;const n=r(27202);t.ContainerHandlerLanguage=class{canCombineWithGraph(){return!1}async handle(e,t,r,i,a,o){const s=await r.getContainerKey(i[o],i,o);if(Array.isArray(a))a=a.map((e=>({"@value":e,"@language":s})));else{if("string"!=typeof a)throw new n.ErrorCoded(`Got invalid language map value, got '${JSON.stringify(a)}', but expected string`,n.ERROR_CODES.INVALID_LANGUAGE_MAP_VALUE);a={"@value":a,"@language":s}}await t.newOnValueJob(i.slice(0,i.length-1),a,o-1,!0),t.emittedStack[o]=!1}}},84936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerHandlerType=void 0;const n=r(29997),i=r(22135);t.ContainerHandlerType=class{canCombineWithGraph(){return!1}async handle(e,t,r,a,o,s){if(!Array.isArray(o)){if("string"==typeof o){const e=await t.getContext(a),n="@vocab"===i.Util.getContextValueType(e,a[s-1])?await r.createVocabOrBaseTerm(e,o):await r.resourceToTerm(e,o);if(n){const e={"@id":"NamedNode"===n.termType?n.value:o};await t.newOnValueJob(a.slice(0,a.length-1),e,s-1,!0),t.idStack[s+1]=[n]}}else{const e=!!t.idStack[s+1];e||delete t.idStack[s],await t.newOnValueJob(a.slice(0,a.length-1),o,s-1,!0),e||(t.idStack[s+1]=t.idStack[s])}const e=await r.getContainerKey(a[s],a,s),c=null!==e?r.createVocabOrBaseTerm(await t.getContext(a),e):null;c&&await n.EntryHandlerPredicate.handlePredicateObject(t,r,a,s+1,r.rdfType,c,!1,!1,!1),await t.handlePendingContainerFlushBuffers()}t.emittedStack[s]=!1}}},11272:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerArrayValue=void 0;const n=r(22135),i=r(27202);t.EntryHandlerArrayValue=class{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return this.test(e,t,null,r,n)}async test(e,t,r,n,i){return"number"==typeof n[i]}async handle(e,t,r,i,a,o){let s=await t.unaliasKeywordParent(i,o);if("@list"===s){let r=null,n=0;for(let e=o-2;e>0;e--){const t=i[e];if("string"==typeof t||"number"==typeof t){n=e,r=t;break}}if(null!==r){const s=await t.valueToTerm(await e.getContext(i),r,a,o,i);for(const r of s)await this.handleListElement(e,t,r,a,o,i.slice(0,n),n);0===s.length&&await this.handleListElement(e,t,null,a,o,i.slice(0,n),n)}}else if("@set"===s)await e.newOnValueJob(i.slice(0,-2),a,o-2,!1);else if(void 0!==s&&"@type"!==s){for(let e=o-1;e>0;e--)if("number"!=typeof i[e]){s=await t.unaliasKeyword(i[e],i,e);break}const r=await e.getContext(i.slice(0,-1));if("@list"in n.Util.getContextValueContainer(r,s)){e.emittedStack[o+1]=!0;const r=await t.valueToTerm(await e.getContext(i),s,a,o,i);for(const n of r)await this.handleListElement(e,t,n,a,o,i.slice(0,-1),o-1);0===r.length&&await this.handleListElement(e,t,null,a,o,i.slice(0,-1),o-1)}else e.shiftStack(o,1),await e.newOnValueJob(i.slice(0,-1),a,o-1,!1),e.contextTree.removeContext(i.slice(0,-1))}}async handleListElement(e,t,r,n,a,o,s){let c=e.listPointerStack[a];if(null!==n&&null!==(await t.unaliasKeywords(n,o,a))["@value"]){if(c&&c.value){const r=t.dataFactory.blankNode();e.emitQuad(a,t.dataFactory.quad(c.value,t.rdfRest,r,t.getDefaultGraph())),c.value=r}else{const e=t.dataFactory.blankNode();c={value:e,listRootDepth:s,listId:e}}r&&e.emitQuad(a,t.dataFactory.quad(c.value,t.rdfFirst,r,t.getDefaultGraph()))}else c||(c={listRootDepth:s,listId:t.rdfNil});e.listPointerStack[a]=c,e.rdfstar&&e.annotationsBuffer[a]&&e.emitError(new i.ErrorCoded("Found an illegal annotation inside a list",i.ERROR_CODES.INVALID_ANNOTATION))}}},45947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerContainer=void 0;const n=r(14079),i=r(43354),a=r(68526),o=r(84936),s=r(22135);class c{static isSimpleGraphContainer(e){return"@graph"in e&&("@set"in e&&2===Object.keys(e).length||1===Object.keys(e).length)}static isComplexGraphContainer(e){return"@graph"in e&&("@set"in e&&Object.keys(e).length>2||!("@set"in e)&&Object.keys(e).length>1)}static getContainerGraphIndex(e,t,r){let n=c.isSimpleGraphContainer(e),i="";for(let e=t;e=0;e--)if("number"!=typeof t[e]){const r=s.Util.getContextValue(a,"@container",t[e],!1);if(r&&c.isSimpleGraphContainer(r))return{containers:r,depth:e+1,fallback:!1};const o=s.Util.getContextValue(a,"@container",t[e-1],!1);if(o){const t="@graph"in o;for(const r in c.CONTAINER_HANDLERS)if(o[r])return t?c.CONTAINER_HANDLERS[r].canCombineWithGraph()?{containers:o,depth:e,fallback:!1}:n:i?n:{containers:o,depth:e,fallback:!1};return n}if(i)return n;i=!0}return n}static async isBufferableContainerHandler(e,t,r){const n=await c.getContainerHandler(e,t,r);return!n.fallback&&!("@graph"in n.containers)}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return!!await this.test(e,t,null,r,n)}async test(e,t,r,n,i){const a=s.Util.getContextValueContainer(await e.getContext(n,2),n[i-1]);for(const e in c.CONTAINER_HANDLERS)if(a[e])return{containers:a,handler:c.CONTAINER_HANDLERS[e]};return null}async handle(e,t,r,n,i,a,o){return o.handler.handle(o.containers,e,t,n,i,a)}}c.CONTAINER_HANDLERS={"@id":new n.ContainerHandlerIdentifier,"@index":new i.ContainerHandlerIndex,"@language":new a.ContainerHandlerLanguage,"@type":new o.ContainerHandlerType},t.EntryHandlerContainer=c},62885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerInvalidFallback=void 0,t.EntryHandlerInvalidFallback=class{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return!1}async test(e,t,r,n,i){return!0}async handle(e,t,r,n,i,a){e.emittedStack[a]=!1}}},29997:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerPredicate=void 0;const n=r(27202),i=r(22135);class a{static async handlePredicateObject(e,t,r,i,a,o,s,c,u){const l=await t.getPropertiesDepth(r,i),d=await t.getDepthOffsetGraph(i,r),p=i-d,h=e.idStack[l];if(h&&!u)for(const n of h)if(d>=0){const r=e.idStack[p-1];if(r)for(const e of r)t.emitQuadChecked(i,n,a,o,e,s,c);else s?(t.validateReverseSubject(o),e.getUnidentifiedGraphBufferSafe(p-1).push({subject:o,predicate:a,object:n,isEmbedded:c})):e.getUnidentifiedGraphBufferSafe(p-1).push({subject:n,predicate:a,object:o,isEmbedded:c})}else{const e=await t.getGraphContainerValue(r,l);t.emitQuadChecked(i,n,a,o,e,s,c)}else if(s&&t.validateReverseSubject(o),u){if(e.rdfstar){e.idStack[i]&&e.emitError(new n.ErrorCoded(`Found an illegal @id inside an annotation: ${e.idStack[i][0].value}`,n.ERROR_CODES.INVALID_ANNOTATION));for(let a=0;a=0;e--){const t=c[e];t.depth>l&&(u.nestedAnnotations.push(t),c.splice(e,1))}}}else e.getUnidentifiedValueBufferSafe(l).push({predicate:a,object:o,reverse:s,isEmbedded:c})}isPropertyHandler(){return!0}isStackProcessor(){return!0}async validate(e,t,r,n,a){const o=r[n];if(o){const a=await e.getContext(r);if(!e.jsonLiteralStack[n]&&await t.predicateToTerm(a,r[n]))return"@json"===i.Util.getContextValueType(a,o)&&(e.jsonLiteralStack[n+1]=!0),!0}return!1}async test(e,t,r,n,i){return n[i]}async handle(e,t,r,o,s,c,u){const l=o[c],d=await e.getContext(o),p=await t.predicateToTerm(d,r);if(p){const u=await t.valueToTerm(d,r,s,c,o);if(u.length)for(let h of u){let u=await t.unaliasKeywordParent(o,c);const f=i.Util.isPropertyReverse(d,l,u);let y=0;for(;"@reverse"===u||"number"==typeof u;)"number"==typeof u?y++:c--,u=await t.unaliasKeywordParent(o,c-y);const g=i.Util.isPropertyInEmbeddedNode(u);t.validateReverseInEmbeddedNode(r,f,g);const m=i.Util.isPropertyInAnnotationObject(u);if(s){const a="@list"in i.Util.getContextValueContainer(d,r);if(a||s["@list"]){if((a&&!Array.isArray(s)&&!s["@list"]||s["@list"]&&!Array.isArray(s["@list"]))&&h!==t.rdfNil){const r=t.dataFactory.blankNode();e.emitQuad(c,t.dataFactory.quad(r,t.rdfRest,t.rdfNil,t.getDefaultGraph())),e.emitQuad(c,t.dataFactory.quad(r,t.rdfFirst,h,t.getDefaultGraph())),h=r}if(f&&!e.allowSubjectList)throw new n.ErrorCoded(`Found illegal list value in subject position at ${r}`,n.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}}await a.handlePredicateObject(e,t,o,c,p,h,f,g,m)}}}}t.EntryHandlerPredicate=a},49203:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeyword=void 0,t.EntryHandlerKeyword=class{constructor(e){this.keyword=e}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,n,i){return!1}async test(e,t,r,n,i){return r===this.keyword}}},6042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordAnnotation=void 0;const n=r(49203),i=r(27202);class a extends n.EntryHandlerKeyword{constructor(){super("@annotation")}async handle(e,t,r,n,a,o){("string"==typeof a||"object"==typeof a&&a["@value"])&&e.emitError(new i.ErrorCoded(`Found illegal annotation value: ${JSON.stringify(a)}`,i.ERROR_CODES.INVALID_ANNOTATION))}}t.EntryHandlerKeywordAnnotation=a},66700:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordContext=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@context")}isStackProcessor(){return!1}async handle(e,t,r,i,a,o){e.streamingProfile&&(e.processingStack[o]||e.processingType[o]||void 0!==e.idStack[o])&&e.emitError(new n.ErrorCoded("Found an out-of-order context, while streaming is enabled.(disable `streamingProfile`)",n.ERROR_CODES.INVALID_STREAMING_KEY_ORDER));const s=e.getContext(i),c=e.parseContext(a,(await s).getContextRaw());e.contextTree.setContext(i.slice(0,-1),c),e.emitContext(a),await e.validateContext(await c)}}t.EntryHandlerKeywordContext=a},37071:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordGraph=void 0;const n=r(49203);class i extends n.EntryHandlerKeyword{constructor(){super("@graph")}async handle(e,t,r,n,i,a){e.graphStack[a+1]=!0}}t.EntryHandlerKeywordGraph=i},48978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordId=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@id")}isStackProcessor(){return!1}async handle(e,t,r,i,a,o){if("string"!=typeof a){if(e.rdfstar&&"object"==typeof a){const t=Object.keys(a);1===t.length&&"@id"===t[0]&&e.emitError(new n.ErrorCoded(`Invalid embedded node without property with @id ${a["@id"]}`,n.ERROR_CODES.INVALID_EMBEDDED_NODE))}else e.emitError(new n.ErrorCoded(`Found illegal @id '${a}'`,n.ERROR_CODES.INVALID_ID_VALUE));return}const s=await t.getPropertiesDepth(i,o);if(void 0!==e.idStack[s]&&(e.idStack[s][0].listHead?e.emitError(new n.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${i[o-1]}'`,n.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT)):e.emitError(new n.ErrorCoded(`Found duplicate @ids '${e.idStack[s][0].value}' and '${a}'`,n.ERROR_CODES.COLLIDING_KEYWORDS))),e.rdfstar&&e.annotationsBuffer[o])for(const t of e.annotationsBuffer[o])t.depth===o&&e.emitError(new n.ErrorCoded(`Found an illegal @id inside an annotation: ${a}`,n.ERROR_CODES.INVALID_ANNOTATION));e.idStack[s]=t.nullableTermToArray(await t.resourceToTerm(await e.getContext(i),a))}}t.EntryHandlerKeywordId=a},30643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordIncluded=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@included")}async handle(e,t,r,i,a,o){"object"!=typeof a&&e.emitError(new n.ErrorCoded(`Found illegal @included '${a}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE));const s=await t.unaliasKeywords(a,i,o,await e.getContext(i));"@value"in s&&e.emitError(new n.ErrorCoded(`Found an illegal @included @value node '${JSON.stringify(a)}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE)),"@list"in s&&e.emitError(new n.ErrorCoded(`Found an illegal @included @list node '${JSON.stringify(a)}'`,n.ERROR_CODES.INVALID_INCLUDED_VALUE)),e.emittedStack[o]=!1}}t.EntryHandlerKeywordIncluded=a},58865:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordNest=void 0;const n=r(27202),i=r(49203);class a extends i.EntryHandlerKeyword{constructor(){super("@nest")}async handle(e,t,r,i,a,o){"object"!=typeof a&&e.emitError(new n.ErrorCoded(`Found invalid @nest entry for '${r}': '${a}'`,n.ERROR_CODES.INVALID_NEST_VALUE)),"@value"in await t.unaliasKeywords(a,i,o,await e.getContext(i))&&e.emitError(new n.ErrorCoded(`Found an invalid @value node for '${r}'`,n.ERROR_CODES.INVALID_NEST_VALUE)),e.emittedStack[o]=!1}}t.EntryHandlerKeywordNest=a},23787:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordType=void 0;const n=r(27202),i=r(22135),a=r(29997),o=r(49203);class s extends o.EntryHandlerKeyword{constructor(){super("@type")}isStackProcessor(){return!1}async handle(e,t,r,o,s,c){const u=o[c],l=await e.getContext(o),d=t.rdfType,p=await t.unaliasKeywordParent(o,c),h=i.Util.isPropertyReverse(l,u,p),f=i.Util.isPropertyInEmbeddedNode(p);t.validateReverseInEmbeddedNode(r,h,f);const y=i.Util.isPropertyInAnnotationObject(p),g=Array.isArray(s)?s:[s];for(const r of g){"string"!=typeof r&&e.emitError(new n.ErrorCoded(`Found illegal @type '${r}'`,n.ERROR_CODES.INVALID_TYPE_VALUE));const i=t.createVocabOrBaseTerm(l,r);i&&await a.EntryHandlerPredicate.handlePredicateObject(e,t,o,c,d,i,h,f,y)}let m=Promise.resolve(l),b=!1;for(const t of g.sort()){const r=i.Util.getContextValue(l,"@context",t,null);r&&(b=!0,m=m.then((t=>e.parseContext(r,t.getContextRaw()))))}!e.streamingProfile||!b&&e.streamingProfileAllowOutOfOrderPlainType||!e.processingStack[c]&&!e.idStack[c]||e.emitError(new n.ErrorCoded("Found an out-of-order type-scoped context, while streaming is enabled.(disable `streamingProfile`)",n.ERROR_CODES.INVALID_STREAMING_KEY_ORDER)),b&&(m=m.then((e=>!0!==e.getContextRaw()["@propagate"]?new n.JsonLdContextNormalized(Object.assign(Object.assign({},e.getContextRaw()),{"@propagate":!1,"@__propagateFallback":l.getContextRaw()})):e)),e.contextTree.setContext(o.slice(0,o.length-1),m)),e.processingType[c]=!0}}t.EntryHandlerKeywordType=s},30635:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordUnknownFallback=void 0;const n=r(27202);class i{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,t,r,i,a){const o=await t.unaliasKeyword(r[i],r,i);return!(!n.Util.isPotentialKeyword(o)||!a&&"@list"===o)}async test(e,t,r,i,a){return n.Util.isPotentialKeyword(r)}async handle(e,t,r,a,o,s){const c=i.VALID_KEYWORDS_TYPES[r];void 0!==c?c&&typeof o!==c.type&&e.emitError(new n.ErrorCoded(`Invalid value type for '${r}' with value '${o}'`,c.errorCode)):e.strictValues&&e.emitError(new Error(`Unknown keyword '${r}' with value '${o}'`)),e.emittedStack[s]=!1}}i.VALID_KEYWORDS_TYPES={"@index":{type:"string",errorCode:n.ERROR_CODES.INVALID_INDEX_VALUE},"@list":null,"@reverse":{type:"object",errorCode:n.ERROR_CODES.INVALID_REVERSE_VALUE},"@set":null,"@value":null},t.EntryHandlerKeywordUnknownFallback=i},94382:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntryHandlerKeywordValue=void 0;const n=r(49203);class i extends n.EntryHandlerKeyword{constructor(){super("@value")}async validate(e,t,r,n,i){const a=r[n];return a&&!e.literalStack[n]&&await this.test(e,t,a,r,n)&&(e.literalStack[n]=!0),super.validate(e,t,r,n,i)}async test(e,t,r,n,i){return"@value"===await t.unaliasKeyword(n[i],n.slice(0,n.length-1),i-1,!0)}async handle(e,t,r,n,i,a){e.literalStack[a]=!0,delete e.unidentifiedValuesBuffer[a],delete e.unidentifiedGraphsBuffer[a],e.emittedStack[a]=!1}}t.EntryHandlerKeywordValue=i},33619:e=>{"use strict";e.exports=function e(t){return null===t||"object"!=typeof t||null!=t.toJSON?JSON.stringify(t):Array.isArray(t)?"["+t.reduce(((t,r,n)=>t+(0===n?"":",")+e(void 0===r||"symbol"==typeof r?null:r)),"")+"]":"{"+Object.keys(t).sort().reduce(((r,n,i)=>void 0===t[n]||"symbol"==typeof t[n]?r:r+(0===r.length?"":",")+e(n)+":"+e(t[n])),"")+"}"}},85832: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(45920),t),i(r(7814),t)},45920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonLdSerializer=void 0;const n=r(27202),i=r(85071),a=r(7814),o=r(58521);class s extends o.Transform{constructor(e={}){super({objectMode:!0}),this.indentation=0,this.options=e,this.options.baseIRI&&!this.options.context&&(this.options.context={"@base":this.options.baseIRI}),this.options.context?(this.originalContext=this.options.context,this.context=(new n.ContextParser).parse(this.options.context,{baseIRI:this.options.baseIRI})):this.context=Promise.resolve(new n.JsonLdContextNormalized({}))}import(e){const t=new o.PassThrough({objectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new s(this.options));return r}_transform(e,t,r){this.context.then((t=>{this.transformQuad(e,t),r()})).catch(r)}async list(e){const t=await this.context;return{"@list":e.map((e=>a.Util.termToValue(e,t,this.options)))}}_flush(e){return this.opened||this.pushDocumentStart(),this.lastPredicate&&this.endPredicate(),this.lastSubject&&this.endSubject(),this.lastGraph&&"DefaultGraph"!==this.lastGraph.termType&&this.endGraph(),this.endDocument(),e(null,null)}transformQuad(e,t){this.opened||this.pushDocumentStart();const r=this.lastGraph&&"DefaultGraph"!==this.lastGraph.termType&&this.lastGraph.equals(e.subject);if(!(r||this.lastGraph&&e.graph.equals(this.lastGraph))){let r="DefaultGraph"!==e.graph.termType&&this.lastSubject&&this.lastSubject.equals(e.graph);this.lastGraph&&("DefaultGraph"!==this.lastGraph.termType?(this.endPredicate(),this.endSubject(),this.endGraph(!0),r=!1):r?(this.endPredicate(!0),this.lastSubject=null):(this.endPredicate(),this.endSubject(!0))),"DefaultGraph"!==e.graph.termType&&(r||this.pushId(e.graph,!0,t),this.pushSeparator(this.options.space?i.SeparatorType.GRAPH_FIELD_NONCOMPACT:i.SeparatorType.GRAPH_FIELD_COMPACT),this.indentation++),this.lastGraph=e.graph}this.lastSubject&&e.subject.equals(this.lastSubject)||(r?(this.endPredicate(),this.endSubject(),this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END_COMMA),this.lastGraph=e.graph):(this.lastSubject&&(this.endPredicate(),this.endSubject(!0)),this.pushId(e.subject,!0,t)),this.lastSubject=e.subject),this.lastPredicate&&e.predicate.equals(this.lastPredicate)||(this.lastPredicate&&this.endPredicate(!0),this.pushPredicate(e.predicate,t)),this.pushObject(e.object,t)}pushDocumentStart(){this.opened=!0,this.originalContext&&!this.options.excludeContext?(this.pushSeparator(i.SeparatorType.OBJECT_START),this.indentation++,this.pushSeparator(i.SeparatorType.CONTEXT_FIELD),this.pushIndented(JSON.stringify(this.originalContext,null,this.options.space)+","),this.pushSeparator(this.options.space?i.SeparatorType.GRAPH_FIELD_NONCOMPACT:i.SeparatorType.GRAPH_FIELD_COMPACT),this.indentation++):(this.pushSeparator(i.SeparatorType.ARRAY_START),this.indentation++)}pushId(e,t,r){if("Quad"===e.termType)this.pushNestedQuad(e,!0,r);else{const n="BlankNode"===e.termType?"_:"+e.value:r.compactIri(e.value,!1);t?this.pushSeparator(i.SeparatorType.OBJECT_START):(this.push(i.SeparatorType.OBJECT_START.label),this.options.space&&this.push("\n")),this.indentation++,this.pushIndented(this.options.space?`"@id": "${n}",`:`"@id":"${n}",`)}}pushPredicate(e,t){let r=e.value;this.options.useRdfType||r!==a.Util.RDF_TYPE||(r="@type",this.objectOptions=Object.assign(Object.assign({},this.options),{compactIds:!0,vocab:!0}));const n=t.compactIri(r,!0);this.pushIndented(this.options.space?`"${n}": [`:`"${n}":[`),this.indentation++,this.lastPredicate=e}pushObject(e,t){if(this.hadObjectForPredicate?this.pushSeparator(i.SeparatorType.COMMA):this.hadObjectForPredicate=!0,"Quad"===e.termType){const r=this.lastSubject,n=this.lastPredicate;return this.hadObjectForPredicate=!1,this.pushNestedQuad(e,!1,t),this.endSubject(!1),this.hadObjectForPredicate=!0,this.lastPredicate=n,void(this.lastSubject=r)}let r;try{r=e["@list"]?e:a.Util.termToValue(e,t,this.objectOptions||this.options)}catch(e){return this.emit("error",e)}this.pushIndented(JSON.stringify(r,null,this.options.space))}pushNestedQuad(e,t,r){this.pushSeparator(i.SeparatorType.OBJECT_START),this.indentation++,this.pushIndented(this.options.space?'"@id": ':'"@id":',!1),"DefaultGraph"!==e.graph.termType&&this.emit("error",new Error(`Found a nested quad with the non-default graph: ${e.graph.value}`)),this.pushId(e.subject,!1,r),this.pushPredicate(e.predicate,r),this.pushObject(e.object,r),this.endPredicate(!1),this.endSubject(t)}endDocument(){this.opened=!1,this.originalContext&&!this.options.excludeContext?(this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END),this.indentation--,this.pushSeparator(i.SeparatorType.OBJECT_END)):(this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END))}endPredicate(e){this.indentation--,this.pushSeparator(e?i.SeparatorType.ARRAY_END_COMMA:i.SeparatorType.ARRAY_END),this.hadObjectForPredicate=!1,this.objectOptions=null,this.lastPredicate=null}endSubject(e){this.indentation--,this.pushSeparator(e?i.SeparatorType.OBJECT_END_COMMA:i.SeparatorType.OBJECT_END),this.lastSubject=null}endGraph(e){this.indentation--,this.pushSeparator(i.SeparatorType.ARRAY_END),this.indentation--,this.pushSeparator(e?i.SeparatorType.OBJECT_END_COMMA:i.SeparatorType.OBJECT_END),this.lastGraph=null}pushSeparator(e){this.pushIndented(e.label)}pushIndented(e,t=!0){const r=this.getIndentPrefix(),n=e.split("\n").map((e=>r+e)).join("\n");this.push(n),this.options.space&&t&&this.push("\n")}getIndentPrefix(){return this.options.space?this.options.space.repeat(this.indentation):""}}t.JsonLdSerializer=s},85071:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SeparatorType=void 0;class r{constructor(e){this.label=e}}t.SeparatorType=r,r.COMMA=new r(","),r.OBJECT_START=new r("{"),r.OBJECT_END=new r("}"),r.OBJECT_END_COMMA=new r("},"),r.ARRAY_START=new r("["),r.ARRAY_END=new r("]"),r.ARRAY_END_COMMA=new r("],"),r.GRAPH_FIELD_NONCOMPACT=new r('"@graph": ['),r.GRAPH_FIELD_COMPACT=new r('"@graph":['),r.CONTEXT_FIELD=new r('"@context":')},7814:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(27202);class i{static termToValue(e,t,r={compactIds:!1,useNativeTypes:!1}){switch(e.termType){case"NamedNode":const a=t.compactIri(e.value,r.vocab);return r.compactIds?a:{"@id":a};case"DefaultGraph":return r.compactIds?e.value:{"@id":e.value};case"BlankNode":const o=`_:${e.value}`;return r.compactIds?o:{"@id":o};case"Literal":if(e.datatype.value===i.RDF_JSON){let t;try{t=JSON.parse(e.value)}catch(e){throw new n.ErrorCoded("Invalid JSON literal: "+e.message,n.ERROR_CODES.INVALID_JSON_LITERAL)}return{"@value":t,"@type":"@json"}}if("i18n-datatype"===r.rdfDirection&&e.datatype.value.startsWith(i.I18N)){const[t,r]=e.datatype.value.substr(i.I18N.length,e.datatype.value.length).split("_");return Object.assign(Object.assign({"@value":e.value},t?{"@language":t}:{}),r?{"@direction":r}:{})}const s=e.datatype.value===i.XSD_STRING,c={"@value":!s&&r.useNativeTypes?i.stringToNativeType(e.value,e.datatype.value):e.value};return e.language?Object.assign(Object.assign({},c),{"@language":e.language}):s||"string"!=typeof c["@value"]?c:Object.assign(Object.assign({},c),{"@type":e.datatype.value})}}static stringToNativeType(e,t){if(t.startsWith(i.XSD))switch(t.substr(i.XSD.length)){case"boolean":if("true"===e)return!0;if("false"===e)return!1;throw new Error(`Invalid xsd:boolean value '${e}'`);case"integer":case"number":case"int":case"byte":case"long":const t=parseInt(e,10);if(isNaN(t))throw new Error(`Invalid xsd:integer value '${e}'`);return t;case"float":case"double":const r=parseFloat(e);if(isNaN(r))throw new Error(`Invalid xsd:float value '${e}'`);return r}return e}}t.Util=i,i.XSD="http://www.w3.org/2001/XMLSchema#",i.XSD_STRING=i.XSD+"string",i.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i.RDF_TYPE=i.RDF+"type",i.RDF_JSON=i.RDF+"JSON",i.I18N="https://www.w3.org/ns/i18n#"},5558:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(64295),t),i(r(49999),t),i(r(91094),t),i(r(86625),t),i(r(38303),t),i(r(30573),t),i(r(12104),t),i(r(35573),t),i(r(60179),t),i(r(34260),t)},30573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},12104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},35573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},60179:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MicrodataRdfParser=void 0;const n=r(15482),i=r(58521),a=r(49999),o=r(91094),s=r(86625),c=r(38303),u=r(34260),l=r(94066);class d extends i.Transform{constructor(e){super({readableObjectMode:!0}),this.itemScopeStack=[],this.textBufferStack=[],this.isEmittingReferences=!1,this.pendingItemRefsDomain={},this.pendingItemRefsRangeFinalized={},this.pendingItemRefsRangeCollecting={},e=e||{},this.options=e,this.util=new u.Util(e.dataFactory,e.baseIRI),this.defaultGraph=e.defaultGraph||this.util.dataFactory.defaultGraph(),this.htmlParseListener=e.htmlParseListener,this.vocabRegistry=e.vocabRegistry||l,this.parser=this.initializeParser(!!e.xmlMode)}import(e){const t=new i.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new d(this.options));return r}_transform(e,t,r){this.parser.write(e.toString()),r()}_flush(e){this.parser.end(),e()}getItemScope(e){let t=this.itemScopeStack.length-(e?2:1);for(;t>0&&!this.itemScopeStack[t];)t--;return this.itemScopeStack[t]}getDepth(){return this.itemScopeStack.length}onTagOpen(e,t){if(!this.isEmittingReferences){if("id"in t){const e=t.id;this.pendingItemRefsRangeCollecting[e]={events:[],counter:0,ids:[]}}for(const r of Object.values(this.pendingItemRefsRangeCollecting))r.counter++,r.events.push({type:"open",name:e,attributes:t})}let r;if(this.textBufferStack.push(void 0),"itemscope"in t){let e;if(this.emittingReferencesItemScopeIdGenerator)e=this.emittingReferencesItemScopeIdGenerator();else{e="itemid"in t&&this.util.createSubject(t.itemid)||this.util.dataFactory.blankNode();for(const t of Object.values(this.pendingItemRefsRangeCollecting))t.ids.push(e)}r={subject:e},this.isEmittingReferences&&(r.blockEmission=!0);const n=this.getItemScope();n&&n.vocab&&(r.vocab=n.vocab),this.itemScopeStack.push(r)}else r=this.getItemScope(),this.itemScopeStack.push(void 0);if(r){if("itemtype"in t)for(const e of this.util.createVocabIris(t.itemtype,r,!1))r.vocab||(r.vocab=this.util.deriveVocab(e.value,this.vocabRegistry)),r.blockEmission||this.emitTriple(r.subject,this.util.dataFactory.namedNode(`${u.Util.RDF}type`),e);if("lang"in t&&(r.language=t.lang),"xml:lang"in t&&(r.language=t["xml:lang"]),"itemscope"in t&&!this.isEmittingReferences&&"itemref"in t)for(const e of t.itemref.split(/\s+/u))e in this.pendingItemRefsDomain||(this.pendingItemRefsDomain[e]=[]),this.pendingItemRefsDomain[e].push(r),this.tryToEmitReferences(e,r)}"itemprop"in t&&this.handleItemProperties(t.itemprop,!1,r,e,t),"itemprop-reverse"in t&&this.handleItemProperties(t["itemprop-reverse"],!0,r,e,t)}onText(e){if(!this.isEmittingReferences)for(const t of Object.values(this.pendingItemRefsRangeCollecting))t.events.push({type:"text",data:e});for(const t of this.textBufferStack)t&&t.push(e)}onTagClose(){if(!this.isEmittingReferences)for(const[e,t]of Object.entries(this.pendingItemRefsRangeCollecting))t.counter--,t.events.push({type:"close"}),0===t.counter&&(this.pendingItemRefsRangeFinalized[e]=t,delete this.pendingItemRefsRangeCollecting[e],this.tryToEmitReferences(e));const e=this.getItemScope(!0);if(e){const t=this.getDepth();if(e.predicates&&t in e.predicates)for(const[r,n]of Object.entries(e.predicates[t])){const i=this.util.createLiteral(this.textBufferStack[t].join(""),e);this.emitPredicateTriples(e,n,i,"reverse"===r),delete e.predicates[t][r]}}this.itemScopeStack.pop(),this.textBufferStack.pop()}onEnd(){}initializeParser(e){return new n.Parser({onclosetag:()=>{try{this.onTagClose(),this.htmlParseListener&&this.htmlParseListener.onTagClose()}catch(e){this.emit("error",e)}},onend:()=>{try{this.onEnd(),this.htmlParseListener&&this.htmlParseListener.onEnd()}catch(e){this.emit("error",e)}},onopentag:(e,t)=>{try{this.onTagOpen(e,t),this.htmlParseListener&&this.htmlParseListener.onTagOpen(e,t)}catch(e){this.emit("error",e)}},ontext:e=>{try{this.onText(e),this.htmlParseListener&&this.htmlParseListener.onText(e)}catch(e){this.emit("error",e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:e})}handleItemProperties(e,t,r,n,i){const a=this.getItemScope(!0);if(a){const o=this.getDepth(),s=this.util.createVocabIris(e,a,!0);a.predicates||(a.predicates={}),a.predicates[o]||(a.predicates[o]={});const c=t?"reverse":"forward";a.predicates[o][c]=s;for(const t of this.util.getVocabularyExpansionType(e,a,this.vocabRegistry))s.push(t);if(r&&"itemscope"in i)this.emitPredicateTriples(a,s,r.subject,t),delete a.predicates[o][c];else for(const e of d.ITEM_PROPERTY_HANDLERS)if(e.canHandle(n,i)){const r=e.getObject(i,this.util,a);this.emitPredicateTriples(a,s,r,t),delete a.predicates[o][c]}a.predicates[o][c]&&(this.textBufferStack[o]=[])}}emitPredicateTriples(e,t,r,n){if(!e.blockEmission)for(const i of t)n?"Literal"!==r.termType&&this.emitTriple(r,i,e.subject):this.emitTriple(e.subject,i,r)}emitTriple(e,t,r){this.push(this.util.dataFactory.quad(e,t,r,this.defaultGraph))}tryToEmitReferences(e,t){const r=this.pendingItemRefsRangeFinalized[e];if(r){let n;if(t){n=[t];const r=this.pendingItemRefsDomain[e].indexOf(t);this.pendingItemRefsDomain[e].splice(r,1)}else n=this.pendingItemRefsDomain[e],delete this.pendingItemRefsDomain[e];if(n){const e=this.itemScopeStack,t=this.textBufferStack;this.isEmittingReferences=!0;for(const e of n){this.itemScopeStack=[e],this.textBufferStack=[void 0];const t=[...r.ids];this.emittingReferencesItemScopeIdGenerator=()=>t.shift();for(const e of r.events)switch(e.type){case"open":this.onTagOpen(e.name,e.attributes);break;case"text":this.onText(e.data);break;case"close":this.onTagClose()}}this.emittingReferencesItemScopeIdGenerator=void 0,this.itemScopeStack=e,this.textBufferStack=t,this.isEmittingReferences=!1}}}}t.MicrodataRdfParser=d,d.ITEM_PROPERTY_HANDLERS=[new a.ItemPropertyHandlerContent,new c.ItemPropertyHandlerUrl("a","href"),new c.ItemPropertyHandlerUrl("area","href"),new c.ItemPropertyHandlerUrl("audio","src"),new c.ItemPropertyHandlerUrl("embed","src"),new c.ItemPropertyHandlerUrl("iframe","src"),new c.ItemPropertyHandlerUrl("img","src"),new c.ItemPropertyHandlerUrl("link","href"),new c.ItemPropertyHandlerUrl("object","data"),new c.ItemPropertyHandlerUrl("source","src"),new c.ItemPropertyHandlerUrl("track","src"),new c.ItemPropertyHandlerUrl("video","src"),new o.ItemPropertyHandlerNumber("data","value"),new o.ItemPropertyHandlerNumber("meter","value"),new s.ItemPropertyHandlerTime]},34260:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(18050),i=r(9929);class a{constructor(e,t){this.dataFactory=e||new n.DataFactory,this.baseIRI=t||""}static isValidIri(e){return a.IRI_REGEX.test(e)}createVocabIris(e,t,r){return e.split(/\s+/u).filter((e=>!!e)).map((e=>{if(!a.isValidIri(e)){if(!r)return;e=`${t.vocab||`${this.baseIRI}#`}${e}`}return this.dataFactory.namedNode(e)})).filter((e=>!!e))}getVocabularyExpansionType(e,t,r){const n=e.split(/\s+/u);if(n.includes("subPropertyOf")||n.includes("equivalentProperty"))return[this.dataFactory.namedNode(`${a.RDF}type`)];if(t.vocab&&t.vocab in r&&r[t.vocab].properties){let e=[];for(const[i,a]of Object.entries(r[t.vocab].properties))n.includes(i)&&(e=[...Object.values(a).map((e=>this.dataFactory.namedNode(e)))]);return e}return[]}createSubject(e){if(!a.isValidIri(e))try{e=(0,i.resolve)(e,this.baseIRI)}catch(e){return}return this.dataFactory.namedNode(e)}createLiteral(e,t){return this.dataFactory.literal(e,t.language)}deriveVocab(e,t){let r;for(const n in t)if(e.startsWith(n)){r=n,r.endsWith("/")||(r+="#");break}if(!r){const t=e.indexOf("#");r=t>0?e.slice(0,t+1):(0,i.resolve)(".",e)}return r}}t.Util=a,a.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",a.XSD="http://www.w3.org/2001/XMLSchema#",a.RDFA="http://www.w3.org/ns/rdfa#",a.IRI_REGEX=/^([A-Za-z][\d+-.A-Za-z]*|_):[^ "<>[\\\]`{|}]*$/u},64295:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},49999:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerContent=void 0,t.ItemPropertyHandlerContent=class{canHandle(e,t){return"content"in t}getObject(e,t,r){return t.createLiteral(e.content,r)}}},91094:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerNumber=void 0;const n=r(34260);t.ItemPropertyHandlerNumber=class{constructor(e,t){this.tagName=e,this.attributeName=t}canHandle(e,t){return this.tagName===e&&this.attributeName in t}getObject(e,t,r){const i=e[this.attributeName];let a;return Number.isNaN(Number.parseInt(i,10))||i.includes(".")?Number.isNaN(Number.parseFloat(i))||(a=`${n.Util.XSD}double`):a=`${n.Util.XSD}integer`,t.dataFactory.literal(i,a&&t.dataFactory.namedNode(a))}}},86625:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerTime=void 0;const n=r(34260);class i{canHandle(e,t){return"time"===e&&"datetime"in t}getObject(e,t,r){const a=e.datetime;let o;for(const e of i.TIME_REGEXES)if(e.regex.test(a)){o=t.dataFactory.namedNode(n.Util.XSD+e.type);break}return t.dataFactory.literal(a,o)}}t.ItemPropertyHandlerTime=i,i.TIME_REGEXES=[{regex:/^-?P(\d+Y)?(\d+M)?(\d+D)?(T(\d+H)?(\d+M)?(\d+(\.\d)?S)?)?$/u,type:"duration"},{regex:/^\d+-\d\d-\d\dT\d\d:\d\d:\d\d((Z?)|([+-]\d\d:\d\d))$/u,type:"dateTime"},{regex:/^\d+-\d\d-\d\dZ?$/u,type:"date"},{regex:/^\d\d:\d\d:\d\d((Z?)|([+-]\d\d:\d\d))$/u,type:"time"},{regex:/^\d+-\d\d$/u,type:"gYearMonth"},{regex:/^\d+$/u,type:"gYear"}]},38303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPropertyHandlerUrl=void 0;const n=r(9929);t.ItemPropertyHandlerUrl=class{constructor(e,t){this.tagName=e,this.attributeName=t}canHandle(e,t){return this.tagName===e&&this.attributeName in t}getObject(e,t,r){return t.dataFactory.namedNode((0,n.resolve)(e[this.attributeName],t.baseIRI))}}},7784:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},72243:(e,t,r)=>{"use strict";r.r(t),r.d(t,{BlankNode:()=>x,DataFactory:()=>T,DefaultGraph:()=>R,Lexer:()=>g,Literal:()=>E,NamedNode:()=>O,Parser:()=>C,Quad:()=>N,Store:()=>re,StreamParser:()=>ie,StreamWriter:()=>ae,Term:()=>S,Triple:()=>N,Util:()=>n,Variable:()=>A,Writer:()=>Y,default:()=>oe,termFromId:()=>I,termToId:()=>P});var n={};r.r(n),r.d(n,{inDefaultGraph:()=>V,isBlankNode:()=>F,isDefaultGraph:()=>q,isLiteral:()=>B,isNamedNode:()=>k,isVariable:()=>U,prefix:()=>Q,prefixes:()=>$});var i=r(59509),a=r.n(i);const o="http://www.w3.org/1999/02/22-rdf-syntax-ns#",s="http://www.w3.org/2001/XMLSchema#",c="http://www.w3.org/2000/10/swap/",u={xsd:{decimal:`${s}decimal`,boolean:`${s}boolean`,double:`${s}double`,integer:`${s}integer`,string:`${s}string`},rdf:{type:`${o}type`,nil:`${o}nil`,first:`${o}first`,rest:`${o}rest`,langString:`${o}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${c}reify#forSome`,forAll:`${c}reify#forAll`},log:{implies:`${c}log#implies`}},{xsd:l}=u,d=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,p={"\\":"\\","'":"'",'"':'"',n:"\n",r:"\r",t:"\t",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},h=/[\x00-\x20<>\\"\{\}\|\^\`]/,f={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},y=/$0^/;class g{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 f)&&this[e]instanceof RegExp&&(this[e]=y)}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 s=this._line,c=r[0];let u="",d="",p="",f=null,y=0,g=!1;switch(c){case"^":if(r.length<3)break;if("^"!==r[1]){this._n3Mode&&(y=1,u="^");break}if(this._previousMarker="^^",r=r.substr(2),"<"!==r[0]){g=!0;break}case"<":if(f=this._unescapedIri.exec(r))u="IRI",d=f[1];else if(f=this._iri.exec(r)){if(d=this._unescape(f[1]),null===d||h.test(d))return a(this);u="IRI"}else r.length>1&&"<"===r[1]?(u="<<",y=2):this._n3Mode&&r.length>1&&"="===r[1]&&(u="inverse",y=2,d=">");break;case">":r.length>1&&">"===r[1]&&(u=">>",y=2);break;case"_":((f=this._blank.exec(r))||t&&(f=this._blank.exec(`${r} `)))&&(u="blank",p="_",d=f[1]);break;case'"':if(f=this._simpleQuotedString.exec(r))d=f[1];else if(({value:d,matchLength:y}=this._parseLiteral(r)),null===d)return a(this);null===f&&0===y||(u="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(f=this._simpleApostropheString.exec(r))d=f[1];else if(({value:d,matchLength:y}=this._parseLiteral(r)),null===d)return a(this);null===f&&0===y||(u="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(f=this._variable.exec(r))&&(u="var",d=f[0]);break;case"@":"literal"===this._previousMarker&&(f=this._langcode.exec(r))?(u="langcode",d=f[1]):(f=this._keyword.exec(r))&&(u=f[0]);break;case".":if(1===r.length?t:r[1]<"0"||r[1]>"9"){u=".",y=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(f=this._number.exec(r)||t&&(f=this._number.exec(`${r} `)))&&(u="literal",d=f[0],p="string"==typeof f[1]?l.double:"string"==typeof f[2]?l.decimal:l.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(f=this._sparqlKeyword.exec(r))?u=f[0].toUpperCase():g=!0;break;case"f":case"t":(f=this._boolean.exec(r))?(u="literal",d=f[0],p=l.boolean):g=!0;break;case"a":(f=this._shortPredicates.exec(r))?(u="abbreviation",d="a"):g=!0;break;case"=":this._n3Mode&&r.length>1&&(u="abbreviation",">"!==r[1]?(y=1,d="="):(y=2,d=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"}":this._lineMode||(y=1,u=c);break;case"{":!this._lineMode&&r.length>=2&&("|"===r[1]?(u="{|",y=2):(u=c,y=1));break;case"|":r.length>=2&&"}"===r[1]&&(u="|}",y=2);break;default:g=!0}if(g&&("@prefix"!==this._previousMarker&&"PREFIX"!==this._previousMarker||!(f=this._prefix.exec(r))?((f=this._prefixed.exec(r))||t&&(f=this._prefixed.exec(`${r} `)))&&(u="prefixed",p=f[1]||"",d=this._unescape(f[2])):(u="prefix",d=f[1]||"")),"^^"===this._previousMarker)switch(u){case"prefixed":u="type";break;case"IRI":u="typeIRI";break;default:u=""}if(!u)return t||!/^'''|^"""/.test(r)&&/\n|\r/.test(r)?a(this):this._input=r;const m=y||f[0].length,b=i(u,d,p,s,m);this.previousToken=b,this._previousMarker=u,r=r.substr(m,r.length)}function i(t,i,a,o,s){const c=r?n-r.length:n,u={type:t,value:i,prefix:a,line:o,start:c,end:c+s};return e(null,u),u}function a(t){e(t._syntaxError(/^\S*/.exec(r)[0]))}}_unescape(e){let t=!1;const r=e.replace(d,((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 p?p[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,a=n+r;if(1===r&&0!==i||3===r&&this._lineMode)break;return this._line+=i,{value:this._unescape(t),matchLength:a}}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}a()((()=>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)}}const{rdf:m,xsd:b}=u;let v,_=0;const w={namedNode:function(e){return new O(e)},blankNode:function(e){return new x(e||"n3-"+_++)},variable:function(e){return new A(e)},literal:function(e,t){if("string"==typeof t)return new E(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";return""===r&&("boolean"==typeof e?r=b.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?b.integer:b.double:(r=b.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),""===r||r===b.string?new E(`"${e}"`):new E(`"${e}"^^${r}`)},defaultGraph:function(){return v},quad:D,triple:D},T=w;class S{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof S?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 O extends S{get termType(){return"NamedNode"}}class E extends S{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 tnull),this._blankNodePrefix="string"!=typeof e.blankNodePrefix?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new g({lineMode:s,n3:o}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){j=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 a=this._n3Mode;this._contextStack.push({type:e,subject:r,predicate:n,object:i,graph:t,inverse:!!a&&this._inversePredicate,blankPrefix:a?this._prefixes._:"",quantified:a?this._quantified:null}),a&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(e,t){const r=this._contextStack.pop();if(!r||r.type!==e)return this._error(`Unexpected ${t.type}`,t);this._subject=r.subject,this._predicate=r.predicate,this._object=r.object,this._graph=r.graph,this._n3Mode&&(this._inversePredicate=r.inverse,this._prefixes._=r.blankPrefix,this._quantified=r.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("blank",e),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,a=this._contextStack,o=a[a.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("list",e),0!==a.length&&"list"===a[a.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===o.predicate?o.subject=r:o.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("formula",e),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;case"{|":if(!this._supportsRDFStar)return this._error("Unexpected RDF* syntax",e);const a=this._predicate,o=this._object;this._subject=this._quad(n,a,o,this.DEFAULTGRAPH),t=this._readPredicate;break;case"|}":if("Quad"!==this._subject.termType)return this._error("Unexpected asserted triple closing",e);this._subject=null,t=this._readPunctuation;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 t=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,t,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("<<",e),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=M}_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,a=0,o="/";for(;n=i&&(r=r.substr(0,a)),"/"!==o)return`${r}/${e.substr(n+1)}`;a=n+1}}}o=e[++n]}return r+e.substring(a)}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${j++}_`,this._prefixCallback=r||M,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=M):this._readCallback&&(this._readCallback=this._readCallback(t))}))}}function M(){}function L(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(u.rdf.first),e.RDF_REST=r(u.rdf.rest),e.RDF_NIL=r(u.rdf.nil),e.N3_FORALL=r(u.r.forAll),e.N3_FORSOME=r(u.r.forSome),e.ABBREVIATIONS={a:r(u.rdf.type),"=":r(u.owl.sameAs),">":r(u.log.implies)},e.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}function k(e){return!!e&&"NamedNode"===e.termType}function F(e){return!!e&&"BlankNode"===e.termType}function B(e){return!!e&&"Literal"===e.termType}function U(e){return!!e&&"Variable"===e.termType}function q(e){return!!e&&"DefaultGraph"===e.termType}function V(e){return q(e.graph)}function Q(e,t){return $({"":e.value||e},t)("")}function $(e,t){const r=Object.create(null);for(const t in e)n(t,e[t]);function n(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||T,n}L(C.prototype,T);const H=T.defaultGraph(),{rdf:G,xsd:z}=u,K=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,X=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,J={"\\":"\\\\",'"':'\\"',"\t":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class W extends S{equals(e){return e===this}}class Y{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=H,this._prefixIRIs=Object.create(null),t.prefixes&&this.addPrefixes(t.prefixes),t.baseIRI&&(this._baseMatcher=new RegExp(`^${ee(t.baseIRI)}${t.baseIRI.endsWith("/")?"":"[#?]"}`),this._baseLength=t.baseIRI.length))}get _inDefaultGraph(){return H.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")+(H.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)),K.test(t)&&(t=t.replace(X,Z));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(K.test(t)&&(t=t.replace(X,Z)),e.language)return`"${t}"@${e.language}`;if(this._lineMode){if(e.datatype.value===z.string)return`"${t}"`}else switch(e.datatype.value){case z.string:return`"${t}"`;case z.boolean:if("true"===t||"false"===t)return t;break;case z.integer:if(/^[+-]?\d+$/.test(t))return t;break;case z.decimal:if(/^[+-]?\d*\.\d+$/.test(t))return t;break;case z.double:if(/^[+-]?(?:\d+\.\d*|\.?\d+)[eE][+-]?\d+$/.test(t))return t}return`"${t}"^^${this._encodeIriOrBlank(e.datatype)}`}_encodePredicate(e){return e.value===G.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)}${q(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,H,n):this._writeQuad(e,t,r,n||H,i)}addQuads(e){for(let t=0;t.\n`)}if(r){let e="",t="";for(const r in this._prefixIRIs)e+=e?`|${r}`:r,t+=(t?"|":"")+this._prefixIRIs[r];e=ee(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 W("[]");case 1:if(r=i[0],!(r.object instanceof W))return new W(`[ ${this._encodePredicate(r.predicate)} ${this._encodeObject(r.object)} ]`);default:let t="[";for(let a=0;a{t=null,e(r,n)});if(this._endStream)try{return this._outputStream.end(t)}catch(e){}t&&t()}}function Z(e){let t=J[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 ee(e){return e.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}var te=r(58521);class re{constructor(e,t){this._size=0,this._graphs=Object.create(null),this._id=0,this._ids=Object.create(null),this._entities=Object.create(null),this._blankNodeIndex=0,t||!e||e[0]||(t=e,e=null),t=t||{},this._factory=t.factory||T,e&&this.addQuads(e)}_termFromId(e,t){if("."===e[0]){const t=this._entities,r=e.split(".");return this._factory.quad(this._termFromId(t[r[1]]),this._termFromId(t[r[2]]),this._termFromId(t[r[3]]),r[4]&&this._termFromId(t[r[4]]))}return I(e,t)}_termToNumericId(e){if("Quad"===e.termType){const t=this._termToNumericId(e.subject),r=this._termToNumericId(e.predicate),n=this._termToNumericId(e.object);let i;return t&&r&&n&&(q(e.graph)||(i=this._termToNumericId(e.graph)))&&this._ids[i?`.${t}.${r}.${n}.${i}`:`.${t}.${r}.${n}`]}return this._ids[P(e)]}_termToNewNumericId(e){const t=e&&"Quad"===e.termType?`.${this._termToNewNumericId(e.subject)}.${this._termToNewNumericId(e.predicate)}.${this._termToNewNumericId(e.object)}${q(e.graph)?"":`.${this._termToNewNumericId(e.graph)}`}`:P(e);return this._ids[t]||(this._ids[this._entities[++this._id]=t]=this._id)}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 a in r=t[i].subjects)for(const t in n=r[a])e+=Object.keys(n[t]).length;return this._size=e}_addToIndex(e,t,r,n){const i=e[t]||(e[t]={}),a=i[r]||(i[r]={}),o=n in a;return o||(a[n]=null),!o}_removeFromIndex(e,t,r,n){const i=e[t],a=i[r];delete a[n];for(const e in a)return;delete i[r];for(const e in i)return;delete e[t]}*_findInIndex(e,t,r,n,i,a,o,s){let c,u,l;const d=this._entities,p=this._termFromId(s,this._factory),h={subject:null,predicate:null,object:null};t&&((c=e,e={})[t]=c[t]);for(const t in e)if(u=e[t]){h[i]=this._termFromId(d[t],this._factory),r&&((c=u,u={})[r]=c[r]);for(const e in u)if(l=u[e]){h[a]=this._termFromId(d[e],this._factory);const t=n?n in l?[n]:[]:Object.keys(l);for(let e=0;e{r in t||(t[r]=!0,e(this._termFromId(this._entities[r],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,t,r,n){t||(n=e.graph,r=e.object,t=e.predicate,e=e.subject),n=P(n);let i=this._graphs[n];i||(i=this._graphs[n]={subjects:{},predicates:{},objects:{}},Object.freeze(i)),e=this._termToNewNumericId(e),t=this._termToNewNumericId(t),r=this._termToNewNumericId(r);const a=this._addToIndex(i.subjects,e,t,r);return this._addToIndex(i.predicates,t,r,e),this._addToIndex(i.objects,r,e,t),this._size=null,a}addQuads(e){for(let t=0;t{this.addQuad(e)})),e}removeQuad(e,t,r,n){t||(n=e.graph,r=e.object,t=e.predicate,e=e.subject),n=P(n);const i=this._graphs;let a,o,s;if(!((e=e&&this._termToNumericId(e))&&(t=t&&this._termToNumericId(t))&&(r=r&&this._termToNumericId(r))&&(a=i[n])&&(o=a.subjects[e])&&(s=o[t])&&r in s))return!1;for(e in this._removeFromIndex(a.subjects,e,t,r),this._removeFromIndex(a.predicates,t,r,e),this._removeFromIndex(a.objects,r,e,t),null!==this._size&&this._size--,a.subjects)return!0;return delete i[n],!0}removeQuads(e){for(let t=0;t{this.removeQuad(e)})),e}removeMatches(e,t,r,n){const i=new te.Readable({objectMode:!0});return i._read=()=>{for(const a of this.readQuads(e,t,r,n))i.push(a);i.push(null)},this.remove(i)}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,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s,c;if(!(e&&!(o=this._termToNumericId(e))||t&&!(s=this._termToNumericId(t))||r&&!(c=this._termToNumericId(r))))for(const e in i)(a=i[e])&&(o?c?yield*this._findInIndex(a.objects,c,o,s,"object","subject","predicate",e):yield*this._findInIndex(a.subjects,o,s,null,"subject","predicate","object",e):s?yield*this._findInIndex(a.predicates,s,c,null,"predicate","object","subject",e):c?yield*this._findInIndex(a.objects,c,null,null,"object","subject","predicate",e):yield*this._findInIndex(a.subjects,null,null,null,"subject","predicate","object",e))}match(e,t,r,n){return new ne(this,e,t,r,n)}countQuads(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s,c,u=0;if(e&&!(o=this._termToNumericId(e))||t&&!(s=this._termToNumericId(t))||r&&!(c=this._termToNumericId(r)))return 0;for(const n in i)(a=i[n])&&(u+=e?r?this._countInIndex(a.objects,c,o,s):this._countInIndex(a.subjects,o,s,c):t?this._countInIndex(a.predicates,s,c,o):this._countInIndex(a.objects,c,o,s));return u}forEach(e,t,r,n,i){this.some((t=>(e(t),!1)),t,r,n,i)}every(e,t,r,n,i){let a=!1;const o=!this.some((t=>(a=!0,!e(t))),t,r,n,i);return a&&o}some(e,t,r,n,i){for(const a of this.readQuads(t,r,n,i))if(e(a))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,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s;if(e=this._uniqueEntities(e),!(t&&!(o=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(a=i[n])&&(o?s?this._loopBy2Keys(a.predicates,o,s,e):this._loopByKey1(a.subjects,o,e):s?this._loopByKey0(a.objects,s,e):this._loop(a.subjects,e))}getPredicates(e,t,r){const n=[];return this.forPredicates((e=>{n.push(e)}),e,t,r),n}forPredicates(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s;if(e=this._uniqueEntities(e),!(t&&!(o=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(a=i[n])&&(o?s?this._loopBy2Keys(a.objects,s,o,e):this._loopByKey0(a.subjects,o,e):s?this._loopByKey1(a.predicates,s,e):this._loop(a.predicates,e))}getObjects(e,t,r){const n=[];return this.forObjects((e=>{n.push(e)}),e,t,r),n}forObjects(e,t,r,n){n=n&&P(n);const i=this._getGraphs(n);let a,o,s;if(e=this._uniqueEntities(e),!(t&&!(o=this._termToNumericId(t))||r&&!(s=this._termToNumericId(r))))for(n in i)(a=i[n])&&(o?s?this._loopBy2Keys(a.subjects,o,s,e):this._loopByKey1(a.objects,o,e):s?this._loopByKey0(a.predicates,s,e):this._loop(a.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,u.rdf.rest,u.rdf.nil,null),a=e?[...i]:[];return i.forEach((t=>{const i=[];let o,s,c=!1;const l=t.graph;let d=t.subject;for(;d&&!c;){const e=this.getQuads(null,null,d,null),t=this.getQuads(d,null,null,null);let r,p=null,h=null,f=null;for(let i=0;i{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 ae extends te.Transform{constructor(e){super({encoding:"utf8",writableObjectMode:!0});const t=this._writer=new Y({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}}const oe={Lexer:g,Parser:C,Writer:Y,Store:re,StreamParser:ie,StreamWriter:ae,Util:n,DataFactory:T,Term:S,NamedNode:O,Literal:E,BlankNode:x,Variable:A,DefaultGraph:R,Quad:N,Triple:N,termFromId:I,termToId:P}},39907:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],u=!1,l=-1;function d(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&p())}function p(){if(!u){var e=o(d);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l1)for(var r=1;r{!function(){var t;t="object"==typeof window&&window?window:r.g,e.exports?e.exports=t.Promise?t.Promise:o:t.Promise||(t.Promise=o);var n=t.setImmediate||function(e){setTimeout(e,1)};function i(e,t){return function(){e.apply(t,arguments)}}var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],p(e,i(c,this),i(u,this))}function s(e){var t=this;null!==this._state?n((function(){var r=t._state?e.onFulfilled:e.onRejected;if(null!==r){var n;try{n=r(t._value)}catch(t){return void e.reject(t)}e.resolve(n)}else(t._state?e.resolve:e.reject)(t._value)})):this._deferreds.push(e)}function c(e){try{if(e===this)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var t=e.then;if("function"==typeof t)return void p(i(t,e),i(c,this),i(u,this))}this._state=!0,this._value=e,l.call(this)}catch(e){u.call(this,e)}}function u(e){this._state=!1,this._value=e,l.call(this)}function l(){for(var e=0,t=this._deferreds.length;e{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)))},18050: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(73968),t),i(r(31352),t),i(r(81947),t),i(r(91417),t),i(r(88963),t),i(r(89135),t),i(r(22e3),t)},73968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlankNode=void 0,t.BlankNode=class{constructor(e){this.termType="BlankNode",this.value=e}equals(e){return!!e&&"BlankNode"===e.termType&&e.value===this.value}}},31352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataFactory=void 0;const n=r(73968),i=r(81947),a=r(91417),o=r(88963),s=r(89135),c=r(22e3);let u=0;t.DataFactory=class{constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${u++}_`}namedNode(e){return new o.NamedNode(e)}blankNode(e){return new n.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,t){return new a.Literal(e,t)}variable(e){return new c.Variable(e)}defaultGraph(){return i.DefaultGraph.INSTANCE}quad(e,t,r,n){return new s.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(a.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}}},81947:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultGraph=void 0;class r{constructor(){this.termType="DefaultGraph",this.value=""}equals(e){return!!e&&"DefaultGraph"===e.termType}}t.DefaultGraph=r,r.INSTANCE=new r},91417:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Literal=void 0;const n=r(88963);class i{constructor(e,t){this.termType="Literal",this.value=e,"string"==typeof t?(this.language=t,this.datatype=i.RDF_LANGUAGE_STRING):t?(this.language="",this.datatype=t):(this.language="",this.datatype=i.XSD_STRING)}equals(e){return!!e&&"Literal"===e.termType&&e.value===this.value&&e.language===this.language&&this.datatype.equals(e.datatype)}}t.Literal=i,i.RDF_LANGUAGE_STRING=new n.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"),i.XSD_STRING=new n.NamedNode("http://www.w3.org/2001/XMLSchema#string")},88963:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NamedNode=void 0,t.NamedNode=class{constructor(e){this.termType="NamedNode",this.value=e}equals(e){return!!e&&"NamedNode"===e.termType&&e.value===this.value}}},89135:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Quad=void 0,t.Quad=class{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)}}},22e3:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Variable=void 0,t.Variable=class{constructor(e){this.termType="Variable",this.value=e}equals(e){return!!e&&"Variable"===e.termType&&e.value===this.value}}},91032: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(9157),t)},9157:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTermGrounded=t.termToSignature=t.quadToSignature=t.sha1hex=t.hashTerm=t.hashTerms=t.getGraphBlankNodes=t.uniqGraph=t.deindexGraph=t.indexGraph=t.getQuadsWithoutBlankNodes=t.getQuadsWithBlankNodes=t.hasValue=t.hashValues=t.getBijectionInner=t.getBijection=t.isomorphic=void 0;const n=r(99499),i=r(22112),a=r(13252);function o(e,t){const r=h(p(e)),n=h(p(t));if(Object.keys(r).length!==Object.keys(n).length)return null;for(const e in r)if(r[e]!==n[e])return null;return s(y(d(e)),y(d(t)),g(e),g(t))}function s(e,t,r,n,a,o){a||(a={}),o||(o={});const[d,p]=m(e,r,a),[h,f]=m(t,n,o);if(Object.keys(d).length!==Object.keys(h).length)return null;for(const e in d)if(!l(h,d[e]))return null;let y={};for(const e of r){const t=i.termToString(e),r=p[t];for(const e in f)if(f[e]===r){y[t]=e,delete f[e];break}}if(!c(Object.keys(y).sort(),r.map(i.termToString).sort())||!c(u(y).sort(),n.map(i.termToString).sort())){y=null;for(const a of r){const o=i.termToString(a);if(!d[o])for(const a of n){const c=i.termToString(a);if(!h[c]&&p[o]===f[c]){const i=v(o);y=s(e,t,r,n,Object.assign(Object.assign({},d),{[o]:i}),Object.assign(Object.assign({},h),{[c]:i}))}}}}return y}function c(e,t){if(e.length!==t.length)return!1;for(let r=e.length;r--;)if(e[r]!==t[r])return!1;return!0}function u(e){const t=[];for(const r in e)t.push(e[r]);return t}function l(e,t){for(const r in e)if(e[r]===t)return!0;return!1}function d(e){return e.filter((e=>a.someTerms(e,(e=>"BlankNode"===e.termType||"Quad"===e.termType&&a.getTermsNested(e).some((e=>"BlankNode"===e.termType))))))}function p(e){return e.filter((e=>a.everyTerms(e,(e=>"BlankNode"!==e.termType&&!("Quad"===e.termType&&a.getTermsNested(e).some((e=>"BlankNode"===e.termType)))))))}function h(e){const t={};for(const r of e)t[JSON.stringify(i.quadToStringQuad(r))]=!0;return t}function f(e){return Object.keys(e).map((e=>i.stringQuadToQuad(JSON.parse(e))))}function y(e){return f(h(e))}function g(e){return a.uniqTerms(e.map((e=>a.getBlankNodes(a.getTermsNested(e)))).reduce(((e,t)=>e.concat(t)),[]))}function m(e,t,r){const n=Object.assign({},r),a={};let o=!0;for(;o;){const r=Object.keys(n).length;for(const r of t){const t=i.termToString(r);if(!n[t]){const[i,o]=b(r,e,n);i&&(n[t]=o),a[t]=o}}const s={};for(const e in a){const t=a[e];void 0===s[t]?s[t]=e:s[t]=!1}for(const e in s){const t=s[e];t&&(n[t]=e)}o=r!==Object.keys(n).length}return[n,a]}function b(e,t,r){const n=[];let i=!0;for(const o of t){const t=a.getTermsNested(o);if(t.some((t=>t.equals(e)))){n.push(_(o,r,e));for(const n of t)T(n,r)||n.equals(e)||(i=!1)}}return[i,v(n.sort().join(""))]}function v(e){return n.sha1().update(e).digest("hex")}function _(e,t,r){return a.getTerms(e).map((e=>w(e,t,r))).join("|")}function w(e,t,r){return e.equals(r)?"@self":"BlankNode"===e.termType?t[i.termToString(e)]||"@blank":"Quad"===e.termType?`<${_(e,t,r)}>`:i.termToString(e)}function T(e,t){return"BlankNode"!==e.termType&&!("Quad"===e.termType&&a.getTermsNested(e).some((e=>!T(e,t))))||!!t[i.termToString(e)]}t.isomorphic=function(e,t){return!!o(e,t)},t.getBijection=o,t.getBijectionInner=s,t.hashValues=u,t.hasValue=l,t.getQuadsWithBlankNodes=d,t.getQuadsWithoutBlankNodes=p,t.indexGraph=h,t.deindexGraph=f,t.uniqGraph=y,t.getGraphBlankNodes=g,t.hashTerms=m,t.hashTerm=b,t.sha1hex=v,t.quadToSignature=_,t.termToSignature=w,t.isTermGrounded=T},80740:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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}),t.getSupportedJavaScriptPrimitives=t.getSupportedRdfDatatypes=t.getTermRaw=t.toRdf=t.fromRdf=void 0;const a=r(18050),o=r(23303),s=r(76516);i(r(23303),t),i(r(48959),t),i(r(76516),t);const c=new a.DataFactory,u=new s.Translator;function l(e,t){return u.fromRdf(e,t)}u.registerHandler(new o.TypeHandlerString,o.TypeHandlerString.TYPES.map((e=>c.namedNode(e))),["string"]),u.registerHandler(new o.TypeHandlerBoolean,[o.TypeHandlerBoolean.TYPE].map((e=>c.namedNode(e))),["boolean"]),u.registerHandler(new o.TypeHandlerNumberDouble,o.TypeHandlerNumberDouble.TYPES.map((e=>c.namedNode(e))),["number"]),u.registerHandler(new o.TypeHandlerNumberInteger,o.TypeHandlerNumberInteger.TYPES.map((e=>c.namedNode(e))),["number"]),u.registerHandler(new o.TypeHandlerDate,o.TypeHandlerDate.TYPES.map((e=>c.namedNode(e))),["object"]),t.fromRdf=l,t.toRdf=function(e,t){return t&&"namedNode"in t&&(t={dataFactory:t}),(t=t||{})&&!t.dataFactory&&(t.dataFactory=c),u.toRdf(e,t)},t.getTermRaw=function(e,t){return"Literal"===e.termType?l(e,t):e.value},t.getSupportedRdfDatatypes=function(){return u.getSupportedRdfDatatypes()},t.getSupportedJavaScriptPrimitives=function(){return u.getSupportedJavaScriptPrimitives()}},48959:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},76516:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Translator=void 0,t.Translator=class{constructor(){this.supportedRdfDatatypes=[],this.fromRdfHandlers={},this.toRdfHandlers={}}static incorrectRdfDataType(e){throw new Error(`Invalid RDF ${e.datatype.value} value: '${e.value}'`)}registerHandler(e,t,r){for(const r of t)this.supportedRdfDatatypes.push(r),this.fromRdfHandlers[r.value]=e;for(const t of r){let r=this.toRdfHandlers[t];r||(this.toRdfHandlers[t]=r=[]),r.push(e)}}fromRdf(e,t){const r=this.fromRdfHandlers[e.datatype.value];return r?r.fromRdf(e,t):e.value}toRdf(e,t){const r=this.toRdfHandlers[typeof e];if(r)for(const n of r){const r=n.toRdf(e,t);if(r)return r}throw new Error(`Invalid JavaScript value: '${e}'`)}getSupportedRdfDatatypes(){return this.supportedRdfDatatypes}getSupportedJavaScriptPrimitives(){return Object.keys(this.toRdfHandlers)}}},48403:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerBoolean=void 0;const n=r(76516);class i{fromRdf(e,t){switch(e.value){case"true":case"1":return!0;case"false":case"0":return!1}return t&&n.Translator.incorrectRdfDataType(e),!1}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(e?"true":"false",t||r.namedNode(i.TYPE))}}i.TYPE="http://www.w3.org/2001/XMLSchema#boolean",t.TypeHandlerBoolean=i},5603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerDate=void 0;const n=r(76516);class i{fromRdf(e,t){switch(t&&!e.value.match(i.VALIDATORS[e.datatype.value.substr(33,e.datatype.value.length)])&&n.Translator.incorrectRdfDataType(e),e.datatype.value){case"http://www.w3.org/2001/XMLSchema#gDay":return new Date(0,0,parseInt(e.value,10));case"http://www.w3.org/2001/XMLSchema#gMonthDay":const t=e.value.split("-");return new Date(0,parseInt(t[0],10)-1,parseInt(t[1],10));case"http://www.w3.org/2001/XMLSchema#gYear":return new Date(e.value+"-01-01");case"http://www.w3.org/2001/XMLSchema#gYearMonth":return new Date(e.value+"-01");default:return new Date(e.value)}}toRdf(e,{datatype:t,dataFactory:r}){if(t=t||r.namedNode(i.TYPES[0]),!(e instanceof Date))return null;const n=e;let a;switch(t.value){case"http://www.w3.org/2001/XMLSchema#gDay":a=String(n.getUTCDate());break;case"http://www.w3.org/2001/XMLSchema#gMonthDay":a=n.getUTCMonth()+1+"-"+n.getUTCDate();break;case"http://www.w3.org/2001/XMLSchema#gYear":a=String(n.getUTCFullYear());break;case"http://www.w3.org/2001/XMLSchema#gYearMonth":a=n.getUTCFullYear()+"-"+(n.getUTCMonth()+1);break;case"http://www.w3.org/2001/XMLSchema#date":a=n.toISOString().replace(/T.*$/,"");break;default:a=n.toISOString()}return r.literal(a,t)}}i.TYPES=["http://www.w3.org/2001/XMLSchema#dateTime","http://www.w3.org/2001/XMLSchema#date","http://www.w3.org/2001/XMLSchema#gDay","http://www.w3.org/2001/XMLSchema#gMonthDay","http://www.w3.org/2001/XMLSchema#gYear","http://www.w3.org/2001/XMLSchema#gYearMonth"],i.VALIDATORS={date:/^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,dateTime:/^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9](\.[0-9][0-9][0-9])?((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,gDay:/^[0-9]+$/,gMonthDay:/^[0-9]+-[0-9][0-9]$/,gYear:/^[0-9]+$/,gYearMonth:/^[0-9]+-[0-9][0-9]$/},t.TypeHandlerDate=i},25947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerNumberDouble=void 0;const n=r(76516);class i{fromRdf(e,t){const r=parseFloat(e.value);return t&&isNaN(r)&&n.Translator.incorrectRdfDataType(e),r}toRdf(e,{datatype:t,dataFactory:r}){return t=t||r.namedNode(i.TYPES[0]),isNaN(e)?r.literal("NaN",t):isFinite(e)?e%1==0?null:r.literal(e.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),t):r.literal(e>0?"INF":"-INF",t)}}i.TYPES=["http://www.w3.org/2001/XMLSchema#double","http://www.w3.org/2001/XMLSchema#decimal","http://www.w3.org/2001/XMLSchema#float"],t.TypeHandlerNumberDouble=i},83002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerNumberInteger=void 0;const n=r(76516);class i{fromRdf(e,t){const r=parseInt(e.value,10);return t&&(isNaN(r)||e.value.indexOf(".")>=0)&&n.Translator.incorrectRdfDataType(e),r}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(String(e),t||(e<=i.MAX_INT&&e>=i.MIN_INT?r.namedNode(i.TYPES[0]):r.namedNode(i.TYPES[1])))}}i.TYPES=["http://www.w3.org/2001/XMLSchema#integer","http://www.w3.org/2001/XMLSchema#long","http://www.w3.org/2001/XMLSchema#int","http://www.w3.org/2001/XMLSchema#byte","http://www.w3.org/2001/XMLSchema#short","http://www.w3.org/2001/XMLSchema#negativeInteger","http://www.w3.org/2001/XMLSchema#nonNegativeInteger","http://www.w3.org/2001/XMLSchema#nonPositiveInteger","http://www.w3.org/2001/XMLSchema#positiveInteger","http://www.w3.org/2001/XMLSchema#unsignedByte","http://www.w3.org/2001/XMLSchema#unsignedInt","http://www.w3.org/2001/XMLSchema#unsignedLong","http://www.w3.org/2001/XMLSchema#unsignedShort"],i.MAX_INT=2147483647,i.MIN_INT=-2147483648,t.TypeHandlerNumberInteger=i},2074:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TypeHandlerString=void 0;class r{fromRdf(e){return e.value}toRdf(e,{datatype:t,dataFactory:r}){return r.literal(e,t)}}r.TYPES=["http://www.w3.org/2001/XMLSchema#string","http://www.w3.org/2001/XMLSchema#normalizedString","http://www.w3.org/2001/XMLSchema#anyURI","http://www.w3.org/2001/XMLSchema#base64Binary","http://www.w3.org/2001/XMLSchema#language","http://www.w3.org/2001/XMLSchema#Name","http://www.w3.org/2001/XMLSchema#NCName","http://www.w3.org/2001/XMLSchema#NMTOKEN","http://www.w3.org/2001/XMLSchema#token","http://www.w3.org/2001/XMLSchema#hexBinary","http://www.w3.org/1999/02/22-rdf-syntax-ns#langString","http://www.w3.org/2001/XMLSchema#time","http://www.w3.org/2001/XMLSchema#duration"],t.TypeHandlerString=r},23303:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(48403),t),i(r(5603),t),i(r(25947),t),i(r(83002),t),i(r(2074),t)},10953:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.storeStream=void 0;const n=r(92427);t.storeStream=function(e){const t=n.RdfStore.createDefault();return new Promise(((r,n)=>t.import(e).on("error",n).once("end",(()=>r(t)))))}},92427:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(51368),t),i(r(2369),t),i(r(62947),t),i(r(12924),t),i(r(76386),t),i(r(94992),t),i(r(26503),t),i(r(86721),t),i(r(93616),t),i(r(55100),t),i(r(95832),t),i(r(68752),t),i(r(38654),t),i(r(15698),t),i(r(53277),t),i(r(86937),t),i(r(15291),t),i(r(29390),t),i(r(25383),t),i(r(39034),t)},15291:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},29390:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arePatternsQuoted=t.quadHasVariables=t.quadToPattern=t.encodeOptionalTerms=t.orderQuadComponents=t.getComponentOrderScore=t.getBestIndex=t.QUAD_TERM_NAMES_INVERSE=void 0;const n=r(13252);function i(e,t){return e.map(((r,n)=>t.includes(r)?e.length-n:0)).reduce(((e,t)=>e+t),0)}function a(e){for(const t of n.QUAD_TERM_NAMES){const r=e[t];if("Variable"===r.termType||"Quad"===r.termType&&a(r))return!0}return!1}t.QUAD_TERM_NAMES_INVERSE=Object.fromEntries(n.QUAD_TERM_NAMES.map(((e,t)=>[e,t]))),t.getBestIndex=function(e,t){if(1===e.length||t.every((e=>void 0!==e)))return 0;const r=[];for(let e=0;e({score:i(e,r),index:t}))).sort(((e,t)=>t.score-e.score))[0].index},t.getComponentOrderScore=i,t.orderQuadComponents=function(e,r){return e.map((e=>{const n=t.QUAD_TERM_NAMES_INVERSE[e];return r[n]}))},t.encodeOptionalTerms=function(e,t){const r=e.map((e=>{if(e){if("Quad"===e.termType&&a(e))return;const r=t.encodeOptional(e);return void 0===r?"none":r}return e}));if(!r.includes("none"))return r},t.quadToPattern=function(e,t,r,n,i){let a=!1;return[[e||void 0,t||void 0,r||void 0,n||void 0].map((e=>{if(e){if("Variable"===e.termType)return;if("Quad"===e.termType)return i?e:void(a=!0)}return e})),a]},t.quadHasVariables=a,t.arePatternsQuoted=function(e){return e.map((e=>"Quad"===(null==e?void 0:e.termType)&&a(e)))}},25383:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},39034:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStore=void 0;const n=r(76664),i=r(18050),a=r(13252),o=r(51368),s=r(76386),c=r(26503),u=r(68752),l=r(29390);class d{constructor(e){this.features={quotedTripleFiltering:!0},this._size=0,this.options=e,this.dataFactory=e.dataFactory,this.dictionary=e.dictionary,this.indexesWrapped=d.constructIndexesWrapped(e),this.indexesWrappedComponentOrders=this.indexesWrapped.map((e=>e.componentOrder))}static createDefault(){return new d({indexCombinations:d.DEFAULT_INDEX_COMBINATIONS,indexConstructor:e=>new u.RdfStoreIndexNestedMapQuoted(e),dictionary:new c.TermDictionaryQuotedIndexed(new s.TermDictionaryNumberRecordFullTerms),dataFactory:new i.DataFactory})}static constructIndexesWrapped(e){const t=[];if(0===e.indexCombinations.length)throw new Error("At least one index combination is required");for(const r of e.indexCombinations){if(!d.isCombinationValid(r))throw new Error(`Invalid index combination: ${r}`);t.push({index:e.indexConstructor(e),componentOrder:r,componentOrderInverse:Object.fromEntries(r.map(((e,t)=>[e,t])))})}return t}static isCombinationValid(e){for(const t of a.QUAD_TERM_NAMES)if(!e.includes(t))return!1;return 4===e.length}get size(){return this._size}addQuad(e){const t=[this.dictionary.encode(e.subject),this.dictionary.encode(e.predicate),this.dictionary.encode(e.object),this.dictionary.encode(e.graph)];let r=!1;for(const e of this.indexesWrapped)r=e.index.set((0,l.orderQuadComponents)(e.componentOrder,t),!0);return!!r&&(this._size++,!0)}removeQuad(e){const t=[this.dictionary.encodeOptional(e.subject),this.dictionary.encodeOptional(e.predicate),this.dictionary.encodeOptional(e.object),this.dictionary.encodeOptional(e.graph)];if(t.includes(void 0))return!1;let r=!1;for(const e of this.indexesWrapped)if(r=e.index.remove((0,l.orderQuadComponents)(e.componentOrder,t)),!r)break;return!!r&&(this._size--,!0)}remove(e){return e.on("data",(e=>this.removeQuad(e))),e}removeMatches(e,t,r,n){return this.remove(this.match(e,t,r,n))}deleteGraph(e){return"string"==typeof e&&(e=this.dataFactory.namedNode(e)),this.removeMatches(void 0,void 0,void 0,e)}import(e){return e.on("data",(e=>this.addQuad(e))),e}*readQuads(e,t,r,n){const i=Boolean(this.dictionary.features.quotedTriples)&&Object.values(this.indexesWrapped).every((e=>e.index.features.quotedTripleFiltering)),[o,s]=(0,l.quadToPattern)(e,t,r,n,i),c=this.indexesWrapped[(0,l.getBestIndex)(this.indexesWrappedComponentOrders,o)],u=(0,l.orderQuadComponents)(c.componentOrder,o);for(const i of c.index.find(u)){const o=this.dataFactory.quad(i[c.componentOrderInverse.subject],i[c.componentOrderInverse.predicate],i[c.componentOrderInverse.object],i[c.componentOrderInverse.graph]);s?(0,a.matchPattern)(o,e,t,r,n)&&(yield o):yield o}}getQuads(e,t,r,n){return[...this.readQuads(e,t,r,n)]}match(e,t,r,i){return(0,n.wrap)(this.readQuads(e,t,r,i))}countQuads(e,t,r,n){const i=Boolean(this.dictionary.features.quotedTriples)&&Object.values(this.indexesWrapped).every((e=>e.index.features.quotedTripleFiltering)),[a]=(0,l.quadToPattern)(e,t,r,n,i);if(a.every((e=>void 0===e)))return this.size;const o=this.indexesWrapped[(0,l.getBestIndex)(this.indexesWrappedComponentOrders,a)],s=(0,l.orderQuadComponents)(o.componentOrder,a);return o.index.count(s)}asDataset(){return new o.DatasetCoreWrapper(this)}}d.DEFAULT_INDEX_COMBINATIONS=[["graph","subject","predicate","object"],["graph","predicate","object","subject"],["graph","object","subject","predicate"]],t.RdfStore=d},51368:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DatasetCoreWrapper=void 0;const n=r(39034);class i{constructor(e){this.store=e}get size(){return this.store.size}add(e){return this.store.addQuad(e),this}delete(e){return this.store.removeQuad(e),this}has(e){for(const t of this.store.readQuads(e.subject,e.predicate,e.object,e.graph))return!0;return!1}match(e,t,r,a){const o=new n.RdfStore(this.store.options);for(const n of this.store.readQuads(e,t,r,a))o.addQuad(n);return new i(o)}[Symbol.iterator](){return this.store.readQuads()}}t.DatasetCoreWrapper=i},2369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},62947:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryNumberMap=void 0;const n=r(18050),i=r(22112);t.TermDictionaryNumberMap=class{constructor(e=new n.DataFactory){this.lastId=0,this.dictionary=new Map,this.reverseDictionary=new Map,this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const t=(0,i.termToString)(e);let r=this.dictionary.get(t);return void 0===r&&(r=this.lastId++,this.dictionary.set(t,r),this.reverseDictionary.set(r,t)),r}encodeOptional(e){const t=(0,i.termToString)(e);return this.dictionary.get(t)}decode(e){const t=this.reverseDictionary.get(e);if(void 0===t)throw new Error(`The value ${e} is not present in this dictionary`);return(0,i.stringToTerm)(t,this.dataFactory)}encodings(){return this.reverseDictionary.keys()}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},12924:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryNumberRecord=void 0;const n=r(18050),i=r(22112);t.TermDictionaryNumberRecord=class{constructor(e=new n.DataFactory){this.lastId=0,this.dictionary={},this.reverseDictionary={},this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const t=(0,i.termToString)(e);let r=this.dictionary[t];return void 0===r&&(r=this.lastId++,this.dictionary[t]=r,this.reverseDictionary[r]=t),r}encodeOptional(e){const t=(0,i.termToString)(e);return this.dictionary[t]}decode(e){const t=this.reverseDictionary[e];if(void 0===t)throw new Error(`The value ${e} is not present in this dictionary`);return(0,i.stringToTerm)(t,this.dataFactory)}*encodings(){for(const e of Object.keys(this.reverseDictionary))yield Number.parseInt(e,10)}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},76386:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryNumberRecordFullTerms=void 0;const n=r(18050),i=r(22112);t.TermDictionaryNumberRecordFullTerms=class{constructor(e=new n.DataFactory){this.lastId=0,this.dictionary={},this.reverseDictionary={},this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const t=(0,i.termToString)(e);let r=this.dictionary[t];return void 0===r&&(r=this.lastId++,this.dictionary[t]=r,this.reverseDictionary[r]=e),r}encodeOptional(e){const t=(0,i.termToString)(e);return this.dictionary[t]}decode(e){const t=this.reverseDictionary[e];if(void 0===t)throw new Error(`The value ${e} is not present in this dictionary`);return t}*encodings(){for(const e of Object.keys(this.reverseDictionary))yield Number.parseInt(e,10)}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},94992:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryQuoted=void 0;const n=r(18050),i=r(13252);class a{constructor(e,t,r=new n.DataFactory){this.features={quotedTriples:!0},this.plainTermDictionary=e,this.quotedTriplesDictionary=t,this.dataFactory=r}encode(e){return"Quad"===e.termType?a.BITMASK|1+this.quotedTriplesDictionary.encode(e):this.plainTermDictionary.encode(e)}encodeOptional(e){if("Quad"===e.termType){const t=this.quotedTriplesDictionary.encodeOptional(e);return void 0===t?t:a.BITMASK|1+t}return this.plainTermDictionary.encodeOptional(e)}decode(e){if(a.BITMASK&e){const t=(~a.BITMASK&e)-1;return this.quotedTriplesDictionary.decode(t)}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.encodings())yield a.BITMASK|1+e}*findQuotedTriples(e){for(const t of this.findQuotedTriplesEncoded(e))yield this.decode(t)}*findQuotedTriplesEncoded(e){for(let t of this.quotedTriplesDictionary.encodings()){t=a.BITMASK|1+t;const r=this.decode(t);(0,i.matchPattern)(r,e.subject,e.predicate,e.object,e.graph)&&(yield t)}}}a.BITMASK=1<<31,t.TermDictionaryQuoted=a},26503:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryQuotedIndexed=void 0;const n=r(18050),i=r(95832),a=r(29390);class o{constructor(e,t=new n.DataFactory){this.quotedTriplesDictionary=[],this.features={quotedTriples:!0},this.plainTermDictionary=e;const r={indexCombinations:[],indexConstructor:void 0,dictionary:this,dataFactory:t};this.quotedTriplesReverseDictionaries=[new i.RdfStoreIndexNestedMap(r),new i.RdfStoreIndexNestedMap(r),new i.RdfStoreIndexNestedMap(r)],this.dataFactory=t}encode(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!1):this.plainTermDictionary.encode(e)}encodeQuotedTriple(e,t){if("DefaultGraph"!==e.graph.termType)throw new Error("Encoding of quoted quads outside of the default graph is not allowed");const r=(0,a.encodeOptionalTerms)([e.subject,e.predicate,e.object,e.graph],this),n=r&&r.every((e=>void 0!==e))?this.quotedTriplesReverseDictionaries[0].getEncoded(r):void 0;if(void 0!==n||t)return void 0===n?void 0:o.BITMASK|n;const i=[this.encode(e.subject),this.encode(e.predicate),this.encode(e.object)],s=this.quotedTriplesDictionary.length+1;this.quotedTriplesDictionary.push(i);const c=this.encode(this.dataFactory.defaultGraph());return this.quotedTriplesReverseDictionaries[0].set([i[0],i[1],i[2],c],s),this.quotedTriplesReverseDictionaries[1].set([i[1],i[2],i[0],c],s),this.quotedTriplesReverseDictionaries[2].set([i[2],i[0],i[1],c],s),o.BITMASK|s}encodeOptional(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!0):this.plainTermDictionary.encodeOptional(e)}decode(e){if(o.BITMASK&e){const t=(~o.BITMASK&e)-1;if(t>=this.quotedTriplesDictionary.length)throw new Error(`The value ${e} is not present in the quoted triples range of the dictionary`);const r=this.quotedTriplesDictionary[t];return this.dataFactory.quad(this.decode(r[0]),this.decode(r[1]),this.decode(r[2]))}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.keys())yield o.BITMASK|1+e}*findQuotedTriples(e){for(const t of this.findQuotedTriplesEncoded(e))yield this.decode(t)}*findQuotedTriplesEncoded(e){const[t,r]=(0,a.quadToPattern)(e.subject,e.predicate,e.object,e.graph,!0);for(const e of this.patternToIterable(t[0]))for(const r of this.patternToIterable(t[1]))for(const n of this.patternToIterable(t[2]))for(const i of this.patternToIterable(t[3]))if(e&&r||!r&&!n){const a=[e,r,n,i];for(const e of this.quotedTriplesReverseDictionaries[0].findEncoded(a,t))yield o.BITMASK|this.quotedTriplesReverseDictionaries[0].getEncoded(e)}else if(!e&&r){const a=[r,n,e,i];for(const e of this.quotedTriplesReverseDictionaries[1].findEncoded(a,t))yield o.BITMASK|this.quotedTriplesReverseDictionaries[1].getEncoded(e)}else{const a=[n,e,r,i];for(const e of this.quotedTriplesReverseDictionaries[2].findEncoded(a,t))yield o.BITMASK|this.quotedTriplesReverseDictionaries[2].getEncoded(e)}}*patternToIterable(e){if("Quad"===(null==e?void 0:e.termType))return void(yield*this.findQuotedTriplesEncoded(e));if(void 0===e)return void(yield);const t=this.encodeOptional(e);void 0!==t&&(yield t)}}o.BITMASK=1<<31,t.TermDictionaryQuotedIndexed=o},86721:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionaryQuotedReferential=void 0;const n=r(18050),i=r(13252),a=r(29390);class o{constructor(e,t=new n.DataFactory){this.quotedTriplesDictionary=[],this.quotedTriplesReverseDictionary={},this.features={quotedTriples:!0},this.plainTermDictionary=e,this.dataFactory=t}encode(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!1):this.plainTermDictionary.encode(e)}encodeQuotedTriple(e,t){var r;if("DefaultGraph"!==e.graph.termType)throw new Error("Encoding of quoted quads outside of the default graph is not allowed");const n=null===(r=(0,a.encodeOptionalTerms)([e.subject,e.predicate,e.object,void 0],this))||void 0===r?void 0:r.slice(0,3),i=n&&n.every((e=>void 0!==e))?this.quotedTriplesReverseDictionary[n.join(o.SEPARATOR)]:void 0;if(void 0!==i||t)return void 0===i?void 0:o.BITMASK|i;const s=[this.encode(e.subject),this.encode(e.predicate),this.encode(e.object)],c=this.quotedTriplesDictionary.length+1;return this.quotedTriplesDictionary.push(s),this.quotedTriplesReverseDictionary[s.join(o.SEPARATOR)]=c,o.BITMASK|c}encodeOptional(e){return"Quad"===e.termType?this.encodeQuotedTriple(e,!0):this.plainTermDictionary.encodeOptional(e)}decode(e){if(o.BITMASK&e){const t=(~o.BITMASK&e)-1;if(t>=this.quotedTriplesDictionary.length)throw new Error(`The value ${e} is not present in the quoted triples range of the dictionary`);const r=this.quotedTriplesDictionary[t];return this.dataFactory.quad(this.decode(r[0]),this.decode(r[1]),this.decode(r[2]))}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.keys())yield o.BITMASK|1+e}*findQuotedTriples(e){for(const t of this.findQuotedTriplesEncoded(e))yield this.decode(t)}*findQuotedTriplesEncoded(e){for(let t of this.quotedTriplesDictionary.keys()){t=o.BITMASK|1+t;const r=this.decode(t);(0,i.matchPattern)(r,e.subject,e.predicate,e.object,e.graph)&&(yield t)}}}o.BITMASK=1<<31,o.SEPARATOR="_",t.TermDictionaryQuotedReferential=o},93616:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TermDictionarySymbol=void 0;const n=r(18050),i=r(22112);t.TermDictionarySymbol=class{constructor(e=new n.DataFactory){this.features={quotedTriples:!1},this.dataFactory=e}encode(e){return Symbol.for(`rdf::${(0,i.termToString)(e)}`)}encodeOptional(e){return this.encode(e)}decode(e){const t=Symbol.keyFor(e);if(void 0===t)throw new Error(`The value ${String(e)} is not present in this dictionary`);return(0,i.stringToTerm)(t.slice(5),this.dataFactory)}encodings(){throw new Error("encodings is not supported")}findQuotedTriples(e){throw new Error("findQuotedTriples is not supported")}findQuotedTriplesEncoded(e){throw new Error("findQuotedTriplesEncoded is not supported")}}},55100:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},95832:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMap=void 0;const n=r(29390);t.RdfStoreIndexNestedMap=class{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedMap=new Map}set(e,t){const r=this.nestedMap;let n=r.get(e[0]);n||(n=new Map,r.set(e[0],n));let i=n.get(e[1]);i||(i=new Map,n.set(e[1],i));let a=i.get(e[2]);a||(a=new Map,i.set(e[2],a));const o=a.has(e[3]);return o||a.set(e[3],t),!o}remove(e){const t=this.nestedMap,r=t.get(e[0]);if(!r)return!1;const n=r.get(e[1]);if(!n)return!1;const i=n.get(e[2]);if(!i)return!1;const a=i.delete(e[3]);return a&&0===i.size&&(n.delete(e[2]),0===n.size&&(r.delete(e[1]),0===r.size&&t.delete(e[0]))),a}get(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t&&!t.includes(void 0))return this.getEncoded(t)}getEncoded(e){const t=this.nestedMap.get(e[0]);if(!t)return;const r=t.get(e[1]);if(!r)return;const n=r.get(e[2]);return n?n.get(e[3]):void 0}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e;let d,p,h,f,y,g,m;const b=this.nestedMap,v=void 0!==r?b.has(r)?[r]:[]:b.keys();for(const e of v){y=b.get(e),d=s||this.dictionary.decode(e);const t=void 0!==i?y.has(i)?[i]:[]:y.keys();for(const e of t){g=y.get(e),p=c||this.dictionary.decode(e);const t=void 0!==a?g.has(a)?[a]:[]:g.keys();for(const e of t){m=g.get(e),h=u||this.dictionary.decode(e);const t=void 0!==o?m.has(o)?[o]:[]:m.keys();for(const e of t)f=l||this.dictionary.decode(e),yield[d,p,h,f]}}}}*findEncoded(e,t){const[r,n,i,a]=e;let o,s,c;const u=this.nestedMap,l=void 0!==r?u.has(r)?[r]:[]:u.keys();for(const e of l){o=u.get(e);const t=void 0!==n?o.has(n)?[n]:[]:o.keys();for(const r of t){s=o.get(r);const t=void 0!==i?s.has(i)?[i]:[]:s.keys();for(const n of t){c=s.get(n);const t=void 0!==a?c.has(a)?[a]:[]:c.keys();for(const i of t)yield[e,r,n,i]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const i=r[0],a=r[1],o=r[2],s=r[3];let c,u,l;const d=this.nestedMap,p=void 0!==i?d.has(i)?[i]:[]:d.keys();for(const e of p){c=d.get(e);const r=void 0!==a?c.has(a)?[a]:[]:c.keys();for(const e of r){u=c.get(e);const r=void 0!==o?u.has(o)?[o]:[]:u.keys();for(const e of r)l=u.get(e),void 0!==s?l.has(s)&&t++:t+=l.size}}return t}}},68752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMapQuoted=void 0;const n=r(29390),i=r(95832);class a extends i.RdfStoreIndexNestedMap{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*getQuotedPatternKeys(e,t){for(const r of this.dictionary.findQuotedTriplesEncoded(t))e.has(r)&&(yield r)}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e,[d,p,h,f]=(0,n.arePatternsQuoted)(e);let y,g,m,b,v,_,w;const T=this.nestedMap,S=void 0!==s?d?this.getQuotedPatternKeys(T,s):T.has(r)?[r]:[]:T.keys();for(const e of S){v=T.get(e),y=!d&&s?s:this.dictionary.decode(e);const t=void 0!==c?p?this.getQuotedPatternKeys(v,c):v.has(i)?[i]:[]:v.keys();for(const e of t){_=v.get(e),g=!p&&c?c:this.dictionary.decode(e);const t=void 0!==u?h?this.getQuotedPatternKeys(_,u):_.has(a)?[a]:[]:_.keys();for(const e of t){w=_.get(e),m=!h&&u?u:this.dictionary.decode(e);const t=void 0!==l?f?this.getQuotedPatternKeys(w,l):w.has(o)?[o]:[]:w.keys();for(const e of t)b=!f&&l?l:this.dictionary.decode(e),yield[y,g,m,b]}}}}*findEncoded(e,t){const[r,i,a,o]=e,[s,c,u,l]=t,[d,p,h,f]=(0,n.arePatternsQuoted)(t);let y,g,m;const b=this.nestedMap,v=void 0!==s?d?this.getQuotedPatternKeys(b,s):b.has(r)?[r]:[]:b.keys();for(const e of v){y=b.get(e);const t=void 0!==c?p?this.getQuotedPatternKeys(y,c):y.has(i)?[i]:[]:y.keys();for(const r of t){g=y.get(r);const t=void 0!==u?h?this.getQuotedPatternKeys(g,u):g.has(a)?[a]:[]:g.keys();for(const n of t){m=g.get(n);const t=void 0!==l?f?this.getQuotedPatternKeys(m,l):m.has(o)?[o]:[]:m.keys();for(const i of t)yield[Number.parseInt(e,10),Number.parseInt(r,10),Number.parseInt(n,10),Number.parseInt(i,10)]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const[i,a,o,s]=r,[c,u,l,d]=e,[p,h,f,y]=(0,n.arePatternsQuoted)(e);let g,m,b;const v=this.nestedMap,_=void 0!==c?p?this.getQuotedPatternKeys(v,c):v.has(i)?[i]:[]:v.keys();for(const e of _){g=v.get(e);const r=void 0!==u?h?this.getQuotedPatternKeys(g,u):g.has(a)?[a]:[]:g.keys();for(const e of r){m=g.get(e);const r=void 0!==l?f?this.getQuotedPatternKeys(m,l):m.has(o)?[o]:[]:m.keys();for(const e of r)b=m.get(e),void 0!==d?y?t+=[...this.getQuotedPatternKeys(b,d)].length:b.has(s)&&t++:t+=b.size}}return t}}t.RdfStoreIndexNestedMapQuoted=a},38654:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMapRecursive=void 0;const n=r(29390);t.RdfStoreIndexNestedMapRecursive=class{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedMap=new Map}set(e,t){let r=this.nestedMap,n=!1;for(const[i,a]of e.entries()){const o=r;let s=o.get(a);s?i===e.length-1&&(n=!0):(s=i===e.length-1?t:new Map,o.set(a,s)),r=s}return!n}remove(e){const t=this.nestedMap,r=t.get(e[0]);if(!r)return!1;const n=r.get(e[1]);if(!n)return!1;const i=n.get(e[2]);if(!i)return!1;const a=i.delete(e[3]);return a&&0===i.size&&(n.delete(e[2]),0===n.size&&(r.delete(e[1]),0===r.size&&t.delete(e[0]))),a}get(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t&&!t.includes(void 0))return this.getEncoded(t)}getEncoded(e){const t=this.nestedMap.get(e[0]);if(!t)return;const r=t.get(e[1]);if(!r)return;const n=r.get(e[2]);return n?n.get(e[3]):void 0}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t)for(const r of this.findEncoded(t,e))yield[void 0!==t[0]?e[0]:this.dictionary.decode(r[0]),void 0!==t[1]?e[1]:this.dictionary.decode(r[1]),void 0!==t[2]?e[2]:this.dictionary.decode(r[2]),void 0!==t[3]?e[3]:this.dictionary.decode(r[3])]}*findEncoded(e,t){return yield*this.findEncodedInner(0,e,t,this.nestedMap,[])}*findEncodedInner(e,t,r,n,i){if(e===t.length)yield[...i];else{const a=t[e];if(r[e]){const o=a;if(void 0!==o){const s=n.get(o);s&&(i[e]=a,yield*this.findEncodedInner(e+1,t,r,s,i))}}else for(const[a,o]of n.entries())i[e]=a,yield*this.findEncodedInner(e+1,t,r,o,i)}}count(e){return this.countInner(0,e,this.nestedMap)}countInner(e,t,r){const n=t[e];let i=0;if(n){const a=this.dictionary.encodeOptional(n);if(void 0!==a){if(e===t.length-1)return r.has(a)?1:0;const n=r.get(a);n&&(i+=this.countInner(e+1,t,n))}}else{if(e===t.length-1)return r.size;for(const n of r.values())i+=this.countInner(e+1,t,n)}return i}}},15698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedMapRecursiveQuoted=void 0;const n=r(29390),i=r(38654);class a extends i.RdfStoreIndexNestedMapRecursive{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*findEncoded(e,t){return yield*this.findEncodedInnerQuoted(0,e,t,(0,n.arePatternsQuoted)(t),this.nestedMap,[])}*findEncodedInnerQuoted(e,t,r,n,i,a){if(e===t.length)yield[...a];else{const o=t[e],s=r[e];if(s)if(n[e]){const o=this.dictionary.findQuotedTriplesEncoded(s);for(const s of o){const o=i.get(s);o&&(a[e]=s,yield*this.findEncodedInnerQuoted(e+1,t,r,n,o,a))}}else{const s=o;if(void 0!==s){const c=i.get(s);c&&(a[e]=o,yield*this.findEncodedInnerQuoted(e+1,t,r,n,c,a))}}else for(const[o,s]of i.entries())a[e]=o,yield*this.findEncodedInnerQuoted(e+1,t,r,n,s,a)}}countInner(e,t,r){const i=t[e];let a=0;if(i)if("Quad"===i.termType&&(0,n.quadHasVariables)(i)){const n=this.dictionary.findQuotedTriplesEncoded(i);for(const i of n)if(e===t.length-1)r.has(i)&&a++;else{const n=r.get(i);n&&(a+=this.countInner(e+1,t,n))}}else{const n=this.dictionary.encodeOptional(i);if(void 0!==n){if(e===t.length-1)return r.has(n)?1:0;const i=r.get(n);i&&(a+=this.countInner(e+1,t,i))}}else{if(e===t.length-1)return r.size;for(const n of r.values())a+=this.countInner(e+1,t,n)}return a}}t.RdfStoreIndexNestedMapRecursiveQuoted=a},53277:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedRecord=void 0;const n=r(29390);t.RdfStoreIndexNestedRecord=class{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedRecords={}}set(e,t){const r=this.nestedRecords,n=r[e[0]]||(r[e[0]]={}),i=n[e[1]]||(n[e[1]]={}),a=i[e[2]]||(i[e[2]]={});return!a[e[3]]&&(a[e[3]]=t,!0)}remove(e){const t=this.nestedRecords,r=t[e[0]];if(!r)return!1;const n=r[e[1]];if(!n)return!1;const i=n[e[2]];return!!i&&!!i[e[3]]&&(delete i[e[3]],0===Object.keys(i).length&&(delete n[e[2]],0===Object.keys(n).length&&(delete r[e[1]],0===Object.keys(r).length&&delete t[e[0]])),!0)}get(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(t&&!t.includes(void 0))return this.getEncoded(t)}getEncoded(e){var t,r,n;return null===(n=null===(r=null===(t=this.nestedRecords[e[0]])||void 0===t?void 0:t[e[1]])||void 0===r?void 0:r[e[2]])||void 0===n?void 0:n[e[3]]}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e;let d,p,h,f,y,g,m;const b=this.nestedRecords,v=void 0!==r?r in b?[r]:[]:Object.keys(b);for(const e of v){y=b[e],d=s||this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==i?i in y?[i]:[]:Object.keys(y);for(const e of t){g=y[e],p=c||this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==a?a in g?[a]:[]:Object.keys(g);for(const e of t){m=g[e],h=u||this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==o?o in m?[o]:[]:Object.keys(m);for(const e of t)f=l||this.dictionary.decode(Number.parseInt(e,10)),yield[d,p,h,f]}}}}*findEncoded(e,t){const[r,n,i,a]=e;let o,s,c;const u=this.nestedRecords,l=void 0!==r?r in u?[r]:[]:Object.keys(u);for(const e of l){o=u[e];const t=void 0!==n?n in o?[n]:[]:Object.keys(o);for(const r of t){s=o[r];const t=void 0!==i?i in s?[i]:[]:Object.keys(s);for(const n of t){c=s[n];const t=void 0!==a?a in c?[a]:[]:Object.keys(c);for(const i of t)yield[Number.parseInt(e,10),Number.parseInt(r,10),Number.parseInt(n,10),Number.parseInt(i,10)]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const i=r[0],a=r[1],o=r[2],s=r[3];let c,u,l;const d=this.nestedRecords,p=void 0!==i?i in d?[i]:[]:Object.keys(d);for(const e of p){c=d[e];const r=void 0!==a?a in c?[a]:[]:Object.keys(c);for(const e of r){u=c[e];const r=void 0!==o?o in u?[o]:[]:Object.keys(u);for(const e of r)l=u[e],void 0!==s?s in l&&t++:t+=Object.keys(l).length}}return t}}},86937:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfStoreIndexNestedRecordQuoted=void 0;const n=r(29390),i=r(53277);class a extends i.RdfStoreIndexNestedRecord{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*getQuotedPatternKeys(e,t){for(const r of this.dictionary.findQuotedTriplesEncoded(t))r in e&&(yield r)}*find(e){const t=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!t)return;const[r,i,a,o]=t,[s,c,u,l]=e,[d,p,h,f]=(0,n.arePatternsQuoted)(e);let y,g,m,b,v,_,w;const T=this.nestedRecords,S=void 0!==s?d?this.getQuotedPatternKeys(T,s):r in T?[r]:[]:Object.keys(T);for(const e of S){v=T[e],y=!d&&s?s:this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==c?p?this.getQuotedPatternKeys(v,c):i in v?[i]:[]:Object.keys(v);for(const e of t){_=v[e],g=!p&&c?c:this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==u?h?this.getQuotedPatternKeys(_,u):a in _?[a]:[]:Object.keys(_);for(const e of t){w=_[e],m=!h&&u?u:this.dictionary.decode(Number.parseInt(e,10));const t=void 0!==l?f?this.getQuotedPatternKeys(w,l):o in w?[o]:[]:Object.keys(w);for(const e of t)b=!f&&l?l:this.dictionary.decode(Number.parseInt(e,10)),yield[y,g,m,b]}}}}*findEncoded(e,t){const[r,i,a,o]=e,[s,c,u,l]=t,[d,p,h,f]=(0,n.arePatternsQuoted)(t);let y,g,m;const b=this.nestedRecords,v=void 0!==s?d?this.getQuotedPatternKeys(b,s):r in b?[r]:[]:Object.keys(b);for(const e of v){y=b[e];const t=void 0!==c?p?this.getQuotedPatternKeys(y,c):i in y?[i]:[]:Object.keys(y);for(const r of t){g=y[r];const t=void 0!==u?h?this.getQuotedPatternKeys(g,u):a in g?[a]:[]:Object.keys(g);for(const n of t){m=g[n];const t=void 0!==l?f?this.getQuotedPatternKeys(m,l):o in m?[o]:[]:Object.keys(m);for(const i of t)yield[Number.parseInt(e,10),Number.parseInt(r,10),Number.parseInt(n,10),Number.parseInt(i,10)]}}}}count(e){let t=0;const r=(0,n.encodeOptionalTerms)(e,this.dictionary);if(!r)return 0;const[i,a,o,s]=r,[c,u,l,d]=e,[p,h,f,y]=(0,n.arePatternsQuoted)(e);let g,m,b;const v=this.nestedRecords,_=void 0!==c?p?this.getQuotedPatternKeys(v,c):i in v?[i]:[]:Object.keys(v);for(const e of _){g=v[e];const r=void 0!==u?h?this.getQuotedPatternKeys(g,u):a in g?[a]:[]:Object.keys(g);for(const e of r){m=g[e];const r=void 0!==l?f?this.getQuotedPatternKeys(m,l):o in m?[o]:[]:Object.keys(m);for(const e of r)b=m[e],void 0!==d?y?t+=[...this.getQuotedPatternKeys(b,d)].length:s in b&&t++:t+=Object.keys(b).length}}return t}}t.RdfStoreIndexNestedRecordQuoted=a},2887:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(32935),t),i(r(73974),t)},32935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PendingStreamsIndex=void 0;const n=r(22112),i=r(13252);class a{constructor(){this.indexedStreams=new Map,this.allStreams=[]}termToString(e){return e&&"Variable"!==e.termType?(0,n.termToString)(e):a.ID_VARIABLE}addPatternListener(e,t,r,n,i){this.allStreams.push(e);const o=`${this.termToString(t)}${a.ID_SEPARATOR}${this.termToString(r)}${a.ID_SEPARATOR}${this.termToString(n)}${a.ID_SEPARATOR}${this.termToString(i)}`;let s=this.indexedStreams.get(o);s||(s=[],this.indexedStreams.set(o,s)),s.push(e)}getPendingStreamsForQuad(e){let t=[(0,i.getTerms)(e).map((e=>(0,n.termToString)(e)))];for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StreamingStore=void 0;const n=r(72243),i=r(58521),a=r(32935);t.StreamingStore=class{constructor(e=new n.Store){this.pendingStreams=new a.PendingStreamsIndex,this.ended=!1,this.store=e}end(){this.ended=!0;for(const e of this.pendingStreams.allStreams)e.push(null),e._pipeSource.unpipe()}importToListeners(e){e.on("data",(e=>{if(!this.ended&&!this.store.countQuads(e.subject,e.predicate,e.object,e.graph))for(const t of this.pendingStreams.getPendingStreamsForQuad(e))t.isInitialized&&(t.push(e),t.emit("quad",e))}))}import(e){if(this.ended)throw new Error("Attempted to import into an ended StreamingStore");return this.importToListeners(e),this.store.import(e)}match(e,t,r,n){const a=this.store.match(e,t,r,n);let o=a;if(!this.ended){const s=new i.PassThrough({objectMode:!0});this.pendingStreams.addPatternListener(s,e,t,r,n),o=a.pipe(s,{end:!1}),o._pipeSource=a;const c=a._read;a._read=e=>{s.isInitialized=!0,c.call(a,e)}}return o}getStore(){return this.store}}},64817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.termToString=t.stringToTerm=t.stringQuadToQuad=t.quadToStringQuad=t.getLiteralValue=t.getLiteralType=t.getLiteralLanguage=void 0;const n=r(91379);Object.defineProperty(t,"getLiteralLanguage",{enumerable:!0,get:function(){return n.getLiteralLanguage}}),Object.defineProperty(t,"getLiteralType",{enumerable:!0,get:function(){return n.getLiteralType}}),Object.defineProperty(t,"getLiteralValue",{enumerable:!0,get:function(){return n.getLiteralValue}}),Object.defineProperty(t,"quadToStringQuad",{enumerable:!0,get:function(){return n.quadToStringQuad}}),Object.defineProperty(t,"stringQuadToQuad",{enumerable:!0,get:function(){return n.stringQuadToQuad}}),Object.defineProperty(t,"stringToTerm",{enumerable:!0,get:function(){return n.stringToTerm}}),Object.defineProperty(t,"termToString",{enumerable:!0,get:function(){return n.termToString}})},91379:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringQuadToQuad=t.quadToStringQuad=t.stringToTerm=t.getLiteralLanguage=t.getLiteralType=t.getLiteralValue=t.termToString=void 0;const n=new(r(18050).DataFactory);function i(e){var t,r;if(e)switch(e.termType){case"NamedNode":return`<${t=e.value,t.replace(u,d)}>`;case"BlankNode":return`_:${e.value}`;case"Literal":{const t=e;return`"${r=t.value,u.test(r)&&(r=r.replace(u,d)),r}"${t.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==t.datatype.value&&"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"!==t.datatype.value?`^^<${t.datatype.value}>`:""}${t.language?`@${t.language}`:""}`}case"Quad":return`<<${i(e.subject)} ${i(e.predicate)} ${i(e.object)}${"DefaultGraph"===e.graph.termType?"":` ${i(e.graph)}`}>>`;case"Variable":return`?${e.value}`;case"DefaultGraph":return e.value}}function a(e){const t=/^"([^]*)"((\^\^.*)|(@.*))?$/u.exec(e);if(!t)throw new Error(`${e} is not a literal`);return t[1].replace(/\\"/gu,'"')}function o(e){const t=/^"[^]*"(?:\^\^<([^"]+)>|(@)[^@"]+)?$/u.exec(e);if(!t)throw new Error(`${e} is not a literal`);return t[1]||(t[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")}function s(e){const t=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/u.exec(e);if(!t)throw new Error(`${e} is not a literal`);return t[1]?t[1].toLowerCase():""}function c(e,t){if(t=t||n,!e||0===e.length)return t.defaultGraph();switch(e[0]){case"_":return t.blankNode(e.slice(2));case"?":if(!t.variable)throw new Error("Missing 'variable()' method on the given DataFactory");return t.variable(e.slice(1));case'"':{const r=s(e),n=t.namedNode(o(e));return t.literal(a(e),r||n)}default:if(e.startsWith("<<")&&e.endsWith(">>")){const r=e.slice(2,-2),n=[];let i=0,a=0;for(let t=0;t"===o){if(0===i)throw new Error(`Found closing tag without opening tag in ${e}`);i--}" "===o&&0===i&&(n.push(r.slice(a,t)),a=t+1)}if(0!==i)throw new Error(`Found opening tag without closing tag in ${e}`);if(n.push(r.slice(a,r.length)),3!==n.length&&4!==n.length)throw new Error(`Nested quad syntax error ${e}`);return t.quad(c(n[0]),c(n[1]),c(n[2]),n[3]?c(n[3]):void 0)}if(!e.startsWith("<")||!e.endsWith(">"))throw new Error(`Detected invalid iri for named node (must be wrapped in <>): ${e}`);return t.namedNode(e.slice(1,-1))}}t.termToString=i,t.getLiteralValue=a,t.getLiteralType=o,t.getLiteralLanguage=s,t.stringToTerm=c,t.quadToStringQuad=function(e){return{subject:i(e.subject),predicate:i(e.predicate),object:i(e.object),graph:i(e.graph)}},t.stringQuadToQuad=function(e,t){return(t=t||n).quad(c(e.subject,t),c(e.predicate,t),c(e.object,t),c(e.graph,t))};const u=/["\\\t\n\r\b\f\u0000-\u0019]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=new Map([["\\","\\\\"],['"','\\"'],["\t","\\t"],["\n","\\n"],["\r","\\r"],["\b","\\b"],["\f","\\f"]]);function d(e){const t=l.get(e);if(!t){if(1===e.length){const t=e.charCodeAt(0).toString(16);return`${"\\u0000".slice(0,-t.length)}${t}`}const t=(1024*(e.charCodeAt(0)-55296)+e.charCodeAt(1)+9216).toString(16);return`${"\\U00000000".slice(0,-t.length)}${t}`}return t}},22112:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.termToString=t.stringToTerm=t.stringQuadToQuad=t.quadToStringQuad=t.getLiteralValue=t.getLiteralType=t.getLiteralLanguage=void 0;const n=r(48244);Object.defineProperty(t,"getLiteralLanguage",{enumerable:!0,get:function(){return n.getLiteralLanguage}}),Object.defineProperty(t,"getLiteralType",{enumerable:!0,get:function(){return n.getLiteralType}}),Object.defineProperty(t,"getLiteralValue",{enumerable:!0,get:function(){return n.getLiteralValue}}),Object.defineProperty(t,"quadToStringQuad",{enumerable:!0,get:function(){return n.quadToStringQuad}}),Object.defineProperty(t,"stringQuadToQuad",{enumerable:!0,get:function(){return n.stringQuadToQuad}}),Object.defineProperty(t,"stringToTerm",{enumerable:!0,get:function(){return n.stringToTerm}}),Object.defineProperty(t,"termToString",{enumerable:!0,get:function(){return n.termToString}})},48244:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringQuadToQuad=t.quadToStringQuad=t.stringToTerm=t.getLiteralLanguage=t.getLiteralType=t.getLiteralValue=t.termToString=void 0;const n=new(r(18050).DataFactory);function i(e){if(e)switch(e.termType){case"NamedNode":case"DefaultGraph":return e.value;case"BlankNode":return"_:"+e.value;case"Literal":const t=e;return'"'+t.value+'"'+(t.datatype&&"http://www.w3.org/2001/XMLSchema#string"!==t.datatype.value&&"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"!==t.datatype.value?"^^"+t.datatype.value:"")+(t.language?"@"+t.language:"");case"Quad":return`<<${i(e.subject)} ${i(e.predicate)} ${i(e.object)}${"DefaultGraph"===e.graph.termType?"":" "+i(e.graph)}>>`;case"Variable":return"?"+e.value}}function a(e){const t=/^"([^]*)"/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]}function o(e){const t=/^"[^]*"(?:\^\^([^"]+)|(@)[^@"]+)?$/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]||(t[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")}function s(e){const t=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/.exec(e);if(!t)throw new Error(e+" is not a literal");return t[1]?t[1].toLowerCase():""}function c(e,t){if(t=t||n,!e||!e.length)return t.defaultGraph();switch(e[0]){case"_":return t.blankNode(e.substr(2));case"?":if(!t.variable)throw new Error("Missing 'variable()' method on the given DataFactory");return t.variable(e.substr(1));case'"':const r=s(e),n=t.namedNode(o(e));return t.literal(a(e),r||n);default:if("<"===e[0]&&e.length>4&&"<"===e[1]&&">"===e[e.length-1]&&">"===e[e.length-2]){const r=e.slice(2,-2).trim();let n=[],i=0,a=0,o=!1;for(let t=0;t"===s){if(0===i)throw new Error("Found closing tag without opening tag in "+e);i--}if('"'===s){let e=!1,n=t;for(;n-- >0&&"\\"===r[n];)e=!e;e||(o=!o)}if(" "===s&&!o&&0===i){for(n.push(r.slice(a,t));" "===r[t+1];)t+=1;a=t+1}}if(0!==i)throw new Error("Found opening tag without closing tag in "+e);if(n.push(r.slice(a,r.length)),3!==n.length&&4!==n.length)throw new Error("Nested quad syntax error "+e);return n=n.map((e=>e.startsWith("<")&&!e.includes(" ")?e.slice(1,-1):e)),t.quad(c(n[0]),c(n[1]),c(n[2]),n[3]?c(n[3]):void 0)}return t.namedNode(e)}}t.termToString=i,t.getLiteralValue=a,t.getLiteralType=o,t.getLiteralLanguage=s,t.stringToTerm=c,t.quadToStringQuad=function(e){return{subject:i(e.subject),predicate:i(e.predicate),object:i(e.object),graph:i(e.graph)}},t.stringQuadToQuad=function(e,t){return(t=t||n).quad(c(e.subject,t),c(e.predicate,t),c(e.object,t),c(e.graph,t))}},13252:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(10175),t),i(r(86552),t)},10175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.matchPatternMappings=t.matchPatternComplete=t.matchPattern=t.matchTerm=t.getValueNestedPath=t.someTermsNested=t.someTerms=t.everyTermsNested=t.everyTerms=t.reduceTermsNested=t.reduceTerms=t.mapTermsNested=t.mapTerms=t.filterQuadTermNamesNested=t.filterQuadTermNames=t.filterTermsNested=t.filterTerms=t.forEachTermsNested=t.forEachTerms=t.collectNamedTerms=t.getNamedTerms=t.getTermsNested=t.getTerms=t.TRIPLE_TERM_NAMES=t.QUAD_TERM_NAMES=void 0;const n=new(r(18050).DataFactory);function i(e,t){return t&&"DefaultGraph"===e.graph.termType?[e.subject,e.predicate,e.object]:[e.subject,e.predicate,e.object,e.graph]}function a(e,t){return t(e.subject,"subject")&&t(e.predicate,"predicate")&&t(e.object,"object")&&t(e.graph,"graph")}function o(e,t){return!t||"Variable"===t.termType||"Quad"===t.termType&&"Quad"===e.termType&&c(e,t)||t.equals(e)}function s(e,t,r,n,i){return o(e.subject,t)&&o(e.predicate,r)&&o(e.object,n)&&o(e.graph,i)}function c(e,t){return s(e,t.subject,t.predicate,t.object,t.graph)}t.QUAD_TERM_NAMES=["subject","predicate","object","graph"],t.TRIPLE_TERM_NAMES=["subject","predicate","object"],t.getTerms=i,t.getTermsNested=function e(t,r){const n=[];for(const a of i(t,r))"Quad"===a.termType?e(a,r).forEach((e=>n.push(e))):n.push(a);return n},t.getNamedTerms=function(e){return[{key:"subject",value:e.subject},{key:"predicate",value:e.predicate},{key:"object",value:e.object},{key:"graph",value:e.graph}]},t.collectNamedTerms=function(e,t,r){const i={};return e.forEach((e=>i[e.key]=e.value)),t&&(i.subject=i.subject||t("subject"),i.predicate=i.predicate||t("predicate"),i.object=i.object||t("object"),i.graph=i.graph||t("graph")),(r||n).quad(i.subject,i.predicate,i.object,i.graph)},t.forEachTerms=function(e,t){t(e.subject,"subject"),t(e.predicate,"predicate"),t(e.object,"object"),t(e.graph,"graph")},t.forEachTermsNested=function e(t,r,n=[]){"Quad"===t.subject.termType?e(t.subject,r,[...n,"subject"]):r(t.subject,[...n,"subject"]),"Quad"===t.predicate.termType?e(t.predicate,r,[...n,"predicate"]):r(t.predicate,[...n,"predicate"]),"Quad"===t.object.termType?e(t.object,r,[...n,"object"]):r(t.object,[...n,"object"]),"Quad"===t.graph.termType?e(t.graph,r,[...n,"graph"]):r(t.graph,[...n,"graph"])},t.filterTerms=function(e,t){const r=[];return t(e.subject,"subject")&&r.push(e.subject),t(e.predicate,"predicate")&&r.push(e.predicate),t(e.object,"object")&&r.push(e.object),t(e.graph,"graph")&&r.push(e.graph),r},t.filterTermsNested=function e(t,r,n=[]){let i=[];return"Quad"===t.subject.termType?i=[...i,...e(t.subject,r,[...n,"subject"])]:r(t.subject,[...n,"subject"])&&i.push(t.subject),"Quad"===t.predicate.termType?i=[...i,...e(t.predicate,r,[...n,"predicate"])]:r(t.predicate,[...n,"predicate"])&&i.push(t.predicate),"Quad"===t.object.termType?i=[...i,...e(t.object,r,[...n,"object"])]:r(t.object,[...n,"object"])&&i.push(t.object),"Quad"===t.graph.termType?i=[...i,...e(t.graph,r,[...n,"graph"])]:r(t.graph,[...n,"graph"])&&i.push(t.graph),i},t.filterQuadTermNames=function(e,t){const r=[];return t(e.subject,"subject")&&r.push("subject"),t(e.predicate,"predicate")&&r.push("predicate"),t(e.object,"object")&&r.push("object"),t(e.graph,"graph")&&r.push("graph"),r},t.filterQuadTermNamesNested=function e(t,r,n=[]){let i=[];const a=[...n,"subject"];"Quad"===t.subject.termType?i=[...i,...e(t.subject,r,a)]:r(t.subject,a)&&i.push(a);const o=[...n,"predicate"];"Quad"===t.predicate.termType?i=[...i,...e(t.predicate,r,o)]:r(t.predicate,o)&&i.push(o);const s=[...n,"object"];"Quad"===t.object.termType?i=[...i,...e(t.object,r,s)]:r(t.object,s)&&i.push(s);const c=[...n,"graph"];return"Quad"===t.graph.termType?i=[...i,...e(t.graph,r,c)]:r(t.graph,c)&&i.push(c),i},t.mapTerms=function(e,t,r){return(r||n).quad(t(e.subject,"subject"),t(e.predicate,"predicate"),t(e.object,"object"),t(e.graph,"graph"))},t.mapTermsNested=function e(t,r,i,a=[]){return(i||n).quad("Quad"===t.subject.termType?e(t.subject,r,i,[...a,"subject"]):r(t.subject,[...a,"subject"]),"Quad"===t.predicate.termType?e(t.predicate,r,i,[...a,"predicate"]):r(t.predicate,[...a,"predicate"]),"Quad"===t.object.termType?e(t.object,r,i,[...a,"object"]):r(t.object,[...a,"object"]),"Quad"===t.graph.termType?e(t.graph,r,i,[...a,"graph"]):r(t.graph,[...a,"graph"]))},t.reduceTerms=function(e,t,r){let n=r;return n=t(n,e.subject,"subject"),n=t(n,e.predicate,"predicate"),n=t(n,e.object,"object"),t(n,e.graph,"graph")},t.reduceTermsNested=function e(t,r,n,i=[]){let a=n;return a="Quad"===t.subject.termType?e(t.subject,r,a,[...i,"subject"]):r(a,t.subject,[...i,"subject"]),a="Quad"===t.predicate.termType?e(t.predicate,r,a,[...i,"predicate"]):r(a,t.predicate,[...i,"predicate"]),a="Quad"===t.object.termType?e(t.object,r,a,[...i,"object"]):r(a,t.object,[...i,"object"]),a="Quad"===t.graph.termType?e(t.graph,r,a,[...i,"graph"]):r(a,t.graph,[...i,"graph"]),a},t.everyTerms=a,t.everyTermsNested=function e(t,r,n=[]){return("Quad"===t.subject.termType?e(t.subject,r,[...n,"subject"]):r(t.subject,[...n,"subject"]))&&("Quad"===t.predicate.termType?e(t.predicate,r,[...n,"predicate"]):r(t.predicate,[...n,"predicate"]))&&("Quad"===t.object.termType?e(t.object,r,[...n,"object"]):r(t.object,[...n,"object"]))&&("Quad"===t.graph.termType?e(t.graph,r,[...n,"graph"]):r(t.graph,[...n,"graph"]))},t.someTerms=function(e,t){return t(e.subject,"subject")||t(e.predicate,"predicate")||t(e.object,"object")||t(e.graph,"graph")},t.someTermsNested=function e(t,r,n=[]){return("Quad"===t.subject.termType?e(t.subject,r,[...n,"subject"]):r(t.subject,[...n,"subject"]))||("Quad"===t.predicate.termType?e(t.predicate,r,[...n,"predicate"]):r(t.predicate,[...n,"predicate"]))||("Quad"===t.object.termType?e(t.object,r,[...n,"object"]):r(t.object,[...n,"object"]))||("Quad"===t.graph.termType?e(t.graph,r,[...n,"graph"]):r(t.graph,[...n,"graph"]))},t.getValueNestedPath=function e(t,r){if(0===r.length)return t;if("Quad"===t.termType)return e(t[r[0]],r.slice(1));throw new Error(`Tried to get ${r[0]} from term of type ${t.termType}`)},t.matchTerm=o,t.matchPattern=s,t.matchPatternComplete=c,t.matchPatternMappings=function(e,t,r={}){const n={};return function e(t,i){return a(t,((t,a)=>{var o,s;const c=i[a];switch(t.termType){case"Variable":return r.skipVarMapping&&"Variable"===c.termType||(null!==(s=null===(o=n[t.value])||void 0===o?void 0:o.equals(c))&&void 0!==s?s:(n[t.value]=c,!0));case"Quad":return"Quad"===c.termType&&e(t,c);default:return t.equals(c)}}))}(t,e)&&(!r.returnMappings||n)}},86552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getQuads=t.getDefaultGraphs=t.getVariables=t.getLiterals=t.getBlankNodes=t.getNamedNodes=t.getTermsOfType=t.uniqTerms=t.TERM_TYPES=void 0;const n=r(22112);function i(e,t){return e.filter((e=>e.termType===t))}t.TERM_TYPES=["NamedNode","BlankNode","Literal","Variable","DefaultGraph","Quad"],t.uniqTerms=function(e){const t={};return e.filter((e=>{const r=(0,n.termToString)(e);return!(r in t)&&(t[r]=!0)}))},t.getTermsOfType=i,t.getNamedNodes=function(e){return i(e,"NamedNode")},t.getBlankNodes=function(e){return i(e,"BlankNode")},t.getLiterals=function(e){return i(e,"Literal")},t.getVariables=function(e){return i(e,"Variable")},t.getDefaultGraphs=function(e){return i(e,"DefaultGraph")},t.getQuads=function(e){return i(e,"Quad")}},21860:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(29145),t),i(r(55623),t),i(r(98532),t),i(r(59638),t),i(r(24012),t),i(r(69994),t)},29145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},55623:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},98532:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},59638:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RdfaParser=void 0;const n=r(15482),i=r(58521),a=r(45497),o=r(68713),s=r(24012),c=r(69994);class u extends i.Transform{constructor(e){super({readableObjectMode:!0}),this.activeTagStack=[],e=e||{},this.options=e,this.util=new c.Util(e.dataFactory,e.baseIRI),this.defaultGraph=e.defaultGraph||this.util.dataFactory.defaultGraph();const t=e.contentType?c.Util.contentTypeToProfile(e.contentType):e.profile||"";this.features=e.features||s.RDFA_FEATURES[t],this.htmlParseListener=e.htmlParseListener,this.rdfaPatterns=this.features.copyRdfaPatterns?{}:null,this.pendingRdfaPatternCopies=this.features.copyRdfaPatterns?{}:null,this.parser=this.initializeParser("xml"===t),this.activeTagStack.push({incompleteTriples:[],inlist:!1,language:e.language,listMapping:{},listMappingLocal:{},name:"",prefixesAll:Object.assign(Object.assign({},o["@context"]),this.features.xhtmlInitialContext?a["@context"]:{}),prefixesCustom:{},skipElement:!1,vocab:e.vocab})}import(e){const t=new i.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new u(this.options));return r}_transform(e,t,r){this.parser.write(e.toString()),r()}_flush(e){this.parser.end(),e()}onTagOpen(e,t){let r=this.activeTagStack.length-1;for(;r>0&&this.activeTagStack[r].skipElement;)r--;let n=this.activeTagStack[r];r!==this.activeTagStack.length-1&&(n=Object.assign(Object.assign({},n),{language:this.activeTagStack[this.activeTagStack.length-1].language,prefixesAll:this.activeTagStack[this.activeTagStack.length-1].prefixesAll,prefixesCustom:this.activeTagStack[this.activeTagStack.length-1].prefixesCustom,vocab:this.activeTagStack[this.activeTagStack.length-1].vocab}));const i={collectChildTags:n.collectChildTags,incompleteTriples:[],inlist:"inlist"in t,listMapping:[],listMappingLocal:n.listMapping,localBaseIRI:n.localBaseIRI,name:e,prefixesAll:null,prefixesCustom:null,skipElement:!1};if(this.activeTagStack.push(i),i.collectChildTags){for(const e of Object.keys(n.prefixesCustom).sort()){const r=n.prefixesCustom[e],i=""===e?"xmlns":"xmlns:"+e;i in t||(t[i]=r)}const r=Object.keys(t).map((e=>`${e}="${t[e]}"`)).join(" ");if(i.text=[`<${e}${r?" "+r:""}>`],this.features.skipHandlingXmlLiteralChildren)return}let a,o,s,u=!0,l=!0;if(this.features.onlyAllowUriRelRevIfProperty&&("property"in t&&"rel"in t&&(u=!1,t.rel.indexOf(":")<0&&delete t.rel),"property"in t&&"rev"in t&&(l=!1,t.rev.indexOf(":")<0&&delete t.rev)),this.features.copyRdfaPatterns){if(n.collectedPatternTag){const r={attributes:t,children:[],name:e,referenced:!1,rootPattern:!1,text:[]};return n.collectedPatternTag.children.push(r),void(i.collectedPatternTag=r)}if("rdfa:Pattern"===t.typeof)return void(i.collectedPatternTag={attributes:t,children:[],name:e,parentTag:n,referenced:!1,rootPattern:!0,text:[]});if("rdfa:copy"===t.property){const e=t.resource||t.href||t.src;return void(this.rdfaPatterns[e]?this.emitPatternCopy(n,this.rdfaPatterns[e],e):(this.pendingRdfaPatternCopies[e]||(this.pendingRdfaPatternCopies[e]=[]),this.pendingRdfaPatternCopies[e].push(n)))}}if(this.features.baseTag&&"base"===e&&t.href&&(this.util.baseIRI=this.util.getBaseIRI(t.href)),this.features.xmlBase&&t["xml:base"]&&(i.localBaseIRI=this.util.getBaseIRI(t["xml:base"])),this.features.timeTag&&"time"===e&&!t.datatype&&(i.interpretObjectAsTime=!0),"vocab"in t?t.vocab?(i.vocab=t.vocab,this.emitTriple(this.util.getBaseIriTerm(i),this.util.dataFactory.namedNode(c.Util.RDFA+"usesVocabulary"),this.util.dataFactory.namedNode(i.vocab))):i.vocab=this.activeTagStack[0].vocab:i.vocab=n.vocab,i.prefixesCustom=c.Util.parsePrefixes(t,n.prefixesCustom,this.features.xmlnsPrefixMappings),i.prefixesAll=Object.keys(i.prefixesCustom).length>0?Object.assign(Object.assign({},n.prefixesAll),i.prefixesCustom):n.prefixesAll,this.features.roleAttribute&&t.role){const e=t.id?this.util.createIri("#"+t.id,i,!1,!1,!1):this.util.createBlankNode(),r=i.vocab;i.vocab="http://www.w3.org/1999/xhtml/vocab#";for(const r of this.util.createVocabIris(t.role,i,!0,!1))this.emitTriple(e,this.util.dataFactory.namedNode("http://www.w3.org/1999/xhtml/vocab#role"),r);i.vocab=r}"xml:lang"in t||this.features.langAttribute&&"lang"in t?i.language=t["xml:lang"]||t.lang:i.language=n.language;const d=2===this.activeTagStack.length;if("rel"in t||"rev"in t?("about"in t?(a=this.util.createIri(t.about,i,!1,!0,!0),i.explicitNewSubject=!!a,"typeof"in t&&(s=a)):d?a=!0:n.object&&(a=n.object),"resource"in t&&(o=this.util.createIri(t.resource,i,!1,!0,!0)),o||("href"in t||"src"in t?o=this.util.createIri(t.href||t.src,i,!1,!1,!0):!("typeof"in t)||"about"in t||this.isInheritSubjectInHeadBody(e)||(o=this.util.createBlankNode())),"typeof"in t&&!("about"in t)&&(s=this.isInheritSubjectInHeadBody(e)?a:o)):!("property"in t)||"content"in t||"datatype"in t?(("about"in t||"resource"in t)&&(a=this.util.createIri(t.about||t.resource,i,!1,!0,!0),i.explicitNewSubject=!!a),a||!("href"in t)&&!("src"in t)||(a=this.util.createIri(t.href||t.src,i,!1,!1,!0),i.explicitNewSubject=!!a),a||(d?a=!0:this.isInheritSubjectInHeadBody(e)?a=n.object:"typeof"in t?(a=this.util.createBlankNode(),i.explicitNewSubject=!0):n.object&&(a=n.object,"property"in t||(i.skipElement=!0))),"typeof"in t&&(s=a)):("about"in t?(a=this.util.createIri(t.about,i,!1,!0,!0),i.explicitNewSubject=!!a):d?a=!0:n.object&&(a=n.object),"typeof"in t&&("about"in t&&(s=this.util.createIri(t.about,i,!1,!0,!0)),!s&&d&&(s=!0),!s&&"resource"in t&&(s=this.util.createIri(t.resource,i,!1,!0,!0)),s||!("href"in t)&&!("src"in t)||(s=this.util.createIri(t.href||t.src,i,!1,!1,!0)),!s&&this.isInheritSubjectInHeadBody(e)&&(s=a),s||(s=this.util.createBlankNode()),o=s)),s)for(const e of this.util.createVocabIris(t.typeof,i,!0,!0))this.emitTriple(this.util.getResourceOrBaseIri(s,i),this.util.dataFactory.namedNode(c.Util.RDF+"type"),e);if(a&&(i.listMapping={}),o){if("rel"in t&&"inlist"in t)for(const e of this.util.createVocabIris(t.rel,i,u,!1))this.addListMapping(i,a,e,o);if(!("rel"in t)||!("inlist"in t)){if("rel"in t)for(const e of this.util.createVocabIris(t.rel,i,u,!1))this.emitTriple(this.util.getResourceOrBaseIri(a,i),e,this.util.getResourceOrBaseIri(o,i));if("rev"in t)for(const e of this.util.createVocabIris(t.rev,i,l,!1))this.emitTriple(this.util.getResourceOrBaseIri(o,i),e,this.util.getResourceOrBaseIri(a,i))}}if(!o){if("rel"in t)if("inlist"in t)for(const e of this.util.createVocabIris(t.rel,i,u,!1))this.addListMapping(i,a,e,null),i.incompleteTriples.push({predicate:e,reverse:!1,list:!0});else for(const e of this.util.createVocabIris(t.rel,i,u,!1))i.incompleteTriples.push({predicate:e,reverse:!1});if("rev"in t)for(const e of this.util.createVocabIris(t.rev,i,l,!1))i.incompleteTriples.push({predicate:e,reverse:!0});i.incompleteTriples.length>0&&(o=this.util.createBlankNode())}if("property"in t){let e;if(i.predicates=this.util.createVocabIris(t.property,i,!0,!1),"datatype"in t?(i.datatype=this.util.createIri(t.datatype,i,!0,!0,!1),i.datatype&&(i.datatype.value===c.Util.RDF+"XMLLiteral"||this.features.htmlDatatype&&i.datatype.value===c.Util.RDF+"HTML")&&(i.collectChildTags=!0)):("rev"in t||"rel"in t||"content"in t||("resource"in t&&(e=this.util.createIri(t.resource,i,!1,!0,!0)),!e&&"href"in t&&(e=this.util.createIri(t.href,i,!1,!1,!0)),!e&&"src"in t&&(e=this.util.createIri(t.src,i,!1,!1,!0))),"typeof"in t&&!("about"in t)&&(e=s)),"content"in t){const e=this.util.createLiteral(t.content,i);if("inlist"in t)for(const t of i.predicates)this.addListMapping(i,a,t,e);else{const t=this.util.getResourceOrBaseIri(a,i);for(const r of i.predicates)this.emitTriple(t,r,e)}i.predicates=null}else if(this.features.datetimeAttribute&&"datetime"in t){i.interpretObjectAsTime=!0;const e=this.util.createLiteral(t.datetime,i);if("inlist"in t)for(const t of i.predicates)this.addListMapping(i,a,t,e);else{const t=this.util.getResourceOrBaseIri(a,i);for(const r of i.predicates)this.emitTriple(t,r,e)}i.predicates=null}else if(e){const r=this.util.getResourceOrBaseIri(e,i);if("inlist"in t)for(const e of i.predicates)this.addListMapping(i,a,e,r);else{const e=this.util.getResourceOrBaseIri(a,i);for(const t of i.predicates)this.emitTriple(e,t,r)}i.predicates=null}}let p=!1;if(!i.skipElement&&a&&n.incompleteTriples.length>0){p=!0;const e=this.util.getResourceOrBaseIri(n.subject,i),t=this.util.getResourceOrBaseIri(a,i);for(const r of n.incompleteTriples)if(r.reverse)this.emitTriple(t,r.predicate,e);else if(r.list){let e=null;for(let t=this.activeTagStack.length-1;t>=0;t--)if(this.activeTagStack[t].inlist){e=this.activeTagStack[t];break}this.addListMapping(e,a,r.predicate,t)}else this.emitTriple(e,r.predicate,t)}!p&&n.incompleteTriples.length>0&&(i.incompleteTriples=i.incompleteTriples.concat(n.incompleteTriples)),i.subject=a||n.subject,i.object=o||a}onText(e){const t=this.activeTagStack[this.activeTagStack.length-1];this.features.copyRdfaPatterns&&t.collectedPatternTag?t.collectedPatternTag.text.push(e):(t.text||(t.text=[]),t.text.push(e))}onTagClose(){const e=this.activeTagStack[this.activeTagStack.length-1],t=this.activeTagStack[this.activeTagStack.length-2];if(!(e.collectChildTags&&t.collectChildTags&&this.features.skipHandlingXmlLiteralChildren)){if(this.features.copyRdfaPatterns&&e.collectedPatternTag&&e.collectedPatternTag.rootPattern){const t=e.collectedPatternTag.attributes.resource;if(delete e.collectedPatternTag.attributes.resource,delete e.collectedPatternTag.attributes.typeof,this.rdfaPatterns[t]=e.collectedPatternTag,this.pendingRdfaPatternCopies[t]){for(const r of this.pendingRdfaPatternCopies[t])this.emitPatternCopy(r,e.collectedPatternTag,t);delete this.pendingRdfaPatternCopies[t]}return void this.activeTagStack.pop()}if(e.predicates){const r=this.util.getResourceOrBaseIri(e.subject,e);let n=e.text||[];e.collectChildTags&&t.collectChildTags&&(n=n.slice(1));const i=this.util.createLiteral(n.join(""),e);if(e.inlist)for(const t of e.predicates)this.addListMapping(e,r,t,i);else for(const t of e.predicates)this.emitTriple(r,t,i);t.predicates||(e.text=null)}if(e.object&&Object.keys(e.listMapping).length>0){const t=this.util.getResourceOrBaseIri(e.object,e);for(const r in e.listMapping){const n=this.util.dataFactory.namedNode(r),i=e.listMapping[r];if(i.length>0){const r=i.map((()=>this.util.createBlankNode()));for(let t=0;t`),e.text&&t&&(t.text?t.text=t.text.concat(e.text):t.text=e.text)}onEnd(){if(this.features.copyRdfaPatterns){this.features.copyRdfaPatterns=!1;for(const e in this.rdfaPatterns){const t=this.rdfaPatterns[e];t.referenced||(t.attributes.typeof="rdfa:Pattern",t.attributes.resource=e,this.emitPatternCopy(t.parentTag,t,e),t.referenced=!1,delete t.attributes.typeof,delete t.attributes.resource)}for(const e in this.pendingRdfaPatternCopies)for(const t of this.pendingRdfaPatternCopies[e])this.activeTagStack.push(t),this.onTagOpen("link",{property:"rdfa:copy",href:e}),this.onTagClose(),this.activeTagStack.pop();this.features.copyRdfaPatterns=!0}}isInheritSubjectInHeadBody(e){return this.features.inheritSubjectInHeadBody&&("head"===e||"body"===e)}addListMapping(e,t,r,n){if(e.explicitNewSubject){const i=this.util.createBlankNode();this.emitTriple(this.util.getResourceOrBaseIri(t,e),r,i),this.emitTriple(i,this.util.dataFactory.namedNode(c.Util.RDF+"first"),this.util.getResourceOrBaseIri(n,e)),this.emitTriple(i,this.util.dataFactory.namedNode(c.Util.RDF+"rest"),this.util.dataFactory.namedNode(c.Util.RDF+"nil"))}else{let t=e.listMappingLocal[r.value];t||(e.listMappingLocal[r.value]=t=[]),n&&t.push(n)}}emitTriple(e,t,r){"NamedNode"===e.termType&&e.value.indexOf(":")<0||"NamedNode"===t.termType&&t.value.indexOf(":")<0||"NamedNode"===r.termType&&r.value.indexOf(":")<0||this.push(this.util.dataFactory.quad(e,t,r,this.defaultGraph))}emitPatternCopy(e,t,r){if(this.activeTagStack.push(e),t.referenced=!0,t.constructedBlankNodes){let e=0;this.util.blankNodeFactory=()=>t.constructedBlankNodes[e++]}else t.constructedBlankNodes=[],this.util.blankNodeFactory=()=>{const e=this.util.dataFactory.blankNode();return t.constructedBlankNodes.push(e),e};this.emitPatternCopyAbsolute(t,!0,r),this.util.blankNodeFactory=null,this.activeTagStack.pop()}emitPatternCopyAbsolute(e,t,r){if(t||"rdfa:copy"!==e.attributes.property||e.attributes.href!==r){this.onTagOpen(e.name,e.attributes);for(const t of e.text)this.onText(t);for(const t of e.children)this.emitPatternCopyAbsolute(t,!1,r);this.onTagClose()}}initializeParser(e){return new n.Parser({onclosetag:()=>{try{this.onTagClose(),this.htmlParseListener&&this.htmlParseListener.onTagClose()}catch(e){this.emit("error",e)}},onend:()=>{try{this.onEnd(),this.htmlParseListener&&this.htmlParseListener.onEnd()}catch(e){this.emit("error",e)}},onopentag:(e,t)=>{try{this.onTagOpen(e,t),this.htmlParseListener&&this.htmlParseListener.onTagOpen(e,t)}catch(e){this.emit("error",e)}},ontext:e=>{try{this.onText(e),this.htmlParseListener&&this.htmlParseListener.onText(e)}catch(e){this.emit("error",e)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:e})}}t.RdfaParser=u},24012:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RDFA_CONTENTTYPES=t.RDFA_FEATURES=void 0,t.RDFA_FEATURES={"":{baseTag:!0,xmlBase:!0,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!0,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!0,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!0,roleAttribute:!0},core:{baseTag:!1,xmlBase:!1,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!1,datetimeAttribute:!1,timeTag:!1,htmlDatatype:!1,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!1,roleAttribute:!1},html:{baseTag:!0,xmlBase:!1,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!0,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!0,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!1,roleAttribute:!0},xhtml:{baseTag:!0,xmlBase:!1,langAttribute:!0,onlyAllowUriRelRevIfProperty:!0,inheritSubjectInHeadBody:!0,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!0,copyRdfaPatterns:!0,xmlnsPrefixMappings:!0,xhtmlInitialContext:!0,roleAttribute:!0},xml:{baseTag:!1,xmlBase:!0,langAttribute:!0,onlyAllowUriRelRevIfProperty:!1,inheritSubjectInHeadBody:!1,datetimeAttribute:!0,timeTag:!0,htmlDatatype:!1,copyRdfaPatterns:!1,xmlnsPrefixMappings:!0,xhtmlInitialContext:!1,roleAttribute:!0}},t.RDFA_CONTENTTYPES={"text/html":"html","application/xhtml+xml":"xhtml","application/xml":"xml","text/xml":"xml","image/svg+xml":"xml"}},69994:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Util=void 0;const n=r(9929),i=r(24012),a=r(18050);class o{constructor(e,t){this.dataFactory=e||new a.DataFactory,this.baseIRI=this.dataFactory.namedNode(t||""),this.baseIRIDocument=this.baseIRI}static parsePrefixes(e,t,r){const n={};if(r)for(const t in e)t.startsWith("xmlns")&&(n[t.substr(6)]=e[t]);if(e.prefix||Object.keys(n).length>0){const r=Object.assign(Object.assign({},t),n);if(e.prefix){let t;for(;t=o.PREFIX_REGEX.exec(e.prefix);)r[t[1]]=t[2]}return r}return t}static expandPrefixedTerm(e,t){const r=e.indexOf(":");let n,i;if(r>=0&&(n=e.substr(0,r),i=e.substr(r+1)),""===n)return"http://www.w3.org/1999/xhtml/vocab#"+i;if(n){const e=t.prefixesAll[n];if(e)return e+i}if(e){const r=t.prefixesAll[e.toLocaleLowerCase()];if(r)return r}return e}static isValidIri(e){return o.IRI_REGEX.test(e)}static contentTypeToProfile(e){return i.RDFA_CONTENTTYPES[e]||""}getBaseIRI(e){let t=e;const r=t.indexOf("#");return r>=0&&(t=t.substr(0,r)),this.dataFactory.namedNode((0,n.resolve)(t,this.baseIRI.value))}getResourceOrBaseIri(e,t){return!0===e?this.getBaseIriTerm(t):e}getBaseIriTerm(e){return e.localBaseIRI||this.baseIRI}createVocabIris(e,t,r,n){return e.split(/\s+/).filter((e=>e&&(r||e.indexOf(":")>=0))).map((e=>this.createIri(e,t,!0,!0,n))).filter((e=>null!=e))}createLiteral(e,t){if(t.interpretObjectAsTime&&!t.datatype)for(const r of o.TIME_REGEXES)if(e.match(r.regex)){t.datatype=this.dataFactory.namedNode(o.XSD+r.type);break}return this.dataFactory.literal(e,t.datatype||t.language)}createBlankNode(){return this.blankNodeFactory?this.blankNodeFactory():this.dataFactory.blankNode()}createIri(e,t,r,i,a){if(e=e||"",!i)return r||(e=(0,n.resolve)(e,this.getBaseIriTerm(t).value)),o.isValidIri(e)?this.dataFactory.namedNode(e):null;if(e.length>0&&"["===e[0]&&"]"===e[e.length-1]&&(e=e.substr(1,e.length-2)).indexOf(":")<0)return null;if(e.startsWith("_:"))return a?this.dataFactory.blankNode(e.substr(2)||"b_identity"):null;if(r&&t.vocab&&e.indexOf(":")<0)return this.dataFactory.namedNode(t.vocab+e);let s=o.expandPrefixedTerm(e,t);return r?e!==s&&(s=(0,n.resolve)(s,this.baseIRIDocument.value)):s=(0,n.resolve)(s,this.getBaseIriTerm(t).value),o.isValidIri(s)?this.dataFactory.namedNode(s):null}}t.Util=o,o.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",o.XSD="http://www.w3.org/2001/XMLSchema#",o.RDFA="http://www.w3.org/ns/rdfa#",o.PREFIX_REGEX=/\s*([^:\s]*)*:\s*([^\s]*)*\s*/g,o.TIME_REGEXES=[{regex:/^-?P([0-9]+Y)?([0-9]+M)?([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+(\.[0-9])?S)?)?$/,type:"duration"},{regex:/^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9]((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,type:"dateTime"},{regex:/^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,type:"date"},{regex:/^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]((Z?)|([\+-][0-9][0-9]:[0-9][0-9]))$/,type:"time"},{regex:/^[0-9]+-[0-9][0-9]$/,type:"gYearMonth"},{regex:/^[0-9]+$/,type:"gYear"}],o.IRI_REGEX=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^ "<>{}|\\\[\]`]*$/},97990:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(70326),t)},35695:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParseError=void 0;class r extends Error{constructor(e,t){const r=e.saxParser;super(e.trackPosition?`Line ${r.line} column ${r.column+1}: ${t}`:t)}}t.ParseError=r},70326:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ParseType=t.RdfXmlParser=void 0;const n=r(9929),i=r(49126),a=r(58521),o=r(35695),s=r(18050),c=r(29815);class u extends a.Transform{constructor(e){super({readableObjectMode:!0}),this.activeTagStack=[],this.nodeIds={},e&&(Object.assign(this,e),this.options=e),this.dataFactory||(this.dataFactory=new s.DataFactory),this.baseIRI||(this.baseIRI=""),this.defaultGraph||(this.defaultGraph=this.dataFactory.defaultGraph()),!1!==this.validateUri&&(this.validateUri=!0),this.iriValidationStrategy||(this.iriValidationStrategy=this.validateUri?c.IriValidationStrategy.Pragmatic:c.IriValidationStrategy.None),this.saxParser=new i.SaxesParser({xmlns:!0,position:this.trackPosition}),this.attachSaxListeners()}import(e){const t=new a.PassThrough({readableObjectMode:!0});e.on("error",(e=>r.emit("error",e))),e.on("data",(e=>t.push(e))),e.on("end",(()=>t.push(null)));const r=t.pipe(new u(this.options));return r}_transform(e,t,r){try{this.saxParser.write(e)}catch(e){return r(e)}r()}newParseError(e){return new o.ParseError(this,e)}valueToUri(e,t){return this.uriToNamedNode((0,n.resolve)(e,t.baseIRI))}uriToNamedNode(e){const t=(0,c.validateIri)(e,this.iriValidationStrategy);if(t instanceof Error)throw this.newParseError(t.message);return this.dataFactory.namedNode(e)}validateNcname(e){if(!u.NCNAME_MATCHER.test(e))throw this.newParseError(`Not a valid NCName: ${e}`)}attachSaxListeners(){this.saxParser.on("error",(e=>this.emit("error",e))),this.saxParser.on("opentag",this.onTag.bind(this)),this.saxParser.on("text",this.onText.bind(this)),this.saxParser.on("cdata",this.onText.bind(this)),this.saxParser.on("closetag",this.onCloseTag.bind(this)),this.saxParser.on("doctype",this.onDoctype.bind(this))}onTag(e){const t=this.activeTagStack.length?this.activeTagStack[this.activeTagStack.length-1]:null;let r=l.RESOURCE;if(t&&(t.hadChildren=!0,r=t.childrenParseType),t&&t.childrenStringTags){const r=e.name;let n="";for(const t in e.attributes)n+=` ${t}="${e.attributes[t].value}"`;const i=`<${r}${n}>`;t.childrenStringTags.push(i);const a={childrenStringTags:t.childrenStringTags};return a.childrenStringEmitClosingTag=``,void this.activeTagStack.push(a)}const n={};t?(n.language=t.language,n.baseIRI=t.baseIRI):n.baseIRI=this.baseIRI,this.activeTagStack.push(n),r===l.RESOURCE?this.onTagResource(e,n,t,!t):this.onTagProperty(e,n,t)}onTagResource(e,t,r,i){t.childrenParseType=l.PROPERTY;let a=!0;if(e.uri===u.RDF){if(!i&&u.FORBIDDEN_NODE_ELEMENTS.indexOf(e.local)>=0)throw this.newParseError(`Illegal node element name: ${e.local}`);switch(e.local){case"RDF":t.childrenParseType=l.RESOURCE;case"Description":a=!1}}const o=[],s=[];let c=null,d=!1,p=!1,h=null;for(const i in e.attributes){const a=e.attributes[i];if(r&&a.uri===u.RDF)switch(a.local){case"about":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${a.value} and ${c} where found.`);c=a.value;continue;case"ID":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${a.value} and ${c} where found.`);this.validateNcname(a.value),c="#"+a.value,d=!0;continue;case"nodeID":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${a.value} and ${c} where found.`);this.validateNcname(a.value),c=a.value,p=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"type":h=a.value;continue;case"aboutEach":throw this.newParseError("rdf:aboutEach is not supported.");case"aboutEachPrefix":throw this.newParseError("rdf:aboutEachPrefix is not supported.");case"li":throw this.newParseError("rdf:li on node elements are not supported.")}else if(a.uri===u.XML){if("lang"===a.local){t.language=""===a.value?null:a.value.toLowerCase();continue}if("base"===a.local){t.baseIRI=(0,n.resolve)(a.value,t.baseIRI);continue}}"xml"===a.prefix||"xmlns"===a.prefix||""===a.prefix&&"xmlns"===a.local||!a.uri||(o.push(this.uriToNamedNode(a.uri+a.local)),s.push(a.value))}if(null!==c&&(t.subject=p?this.dataFactory.blankNode(c):this.valueToUri(c,t),d&&this.claimNodeId(t.subject)),t.subject||(t.subject=this.dataFactory.blankNode()),a){const n=this.uriToNamedNode(e.uri+e.local);this.emitTriple(t.subject,this.dataFactory.namedNode(u.RDF+"type"),n,r?r.reifiedStatementId:null)}if(r){if(r.predicate)if(r.childrenCollectionSubject){const e=this.dataFactory.blankNode();this.emitTriple(r.childrenCollectionSubject,r.childrenCollectionPredicate,e,r.reifiedStatementId),this.emitTriple(e,this.dataFactory.namedNode(u.RDF+"first"),t.subject,t.reifiedStatementId),r.childrenCollectionSubject=e,r.childrenCollectionPredicate=this.dataFactory.namedNode(u.RDF+"rest")}else{this.emitTriple(r.subject,r.predicate,t.subject,r.reifiedStatementId);for(let e=0;e=0)throw this.newParseError(`Illegal property element name: ${e.local}`);t.predicateSubPredicates=[],t.predicateSubObjects=[];let n=!1,i=!1,a=null,o=!0;const s=[],c=[];for(const r in e.attributes){const d=e.attributes[r];if(d.uri===u.RDF)switch(d.local){case"resource":if(a)throw this.newParseError(`Found both rdf:resource (${d.value}) and rdf:nodeID (${a}).`);if(n)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:resource (${d.value})`);t.hadChildren=!0,a=d.value,o=!1;continue;case"datatype":if(i)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:datatype (${d.value}).`);if(n)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${d.value})`);t.datatype=this.valueToUri(d.value,t);continue;case"nodeID":if(i)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:nodeID (${d.value}).`);if(t.hadChildren)throw this.newParseError(`Found both rdf:resource and rdf:nodeID (${d.value}).`);if(n)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID (${d.value})`);this.validateNcname(d.value),t.hadChildren=!0,a=d.value,o=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"parseType":if(i)throw this.newParseError("rdf:parseType is not allowed when non-rdf:* property attributes are present");if(t.datatype)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${t.datatype.value})`);if(a)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID or rdf:resource (${a})`);if("Resource"===d.value){n=!0,t.childrenParseType=l.PROPERTY;const e=this.dataFactory.blankNode();this.emitTriple(t.subject,t.predicate,e,t.reifiedStatementId),t.subject=e,t.predicate=null}else"Collection"===d.value?(n=!0,t.hadChildren=!0,t.childrenCollectionSubject=t.subject,t.childrenCollectionPredicate=t.predicate,o=!1):"Literal"===d.value&&(n=!0,t.childrenTagsToString=!0,t.childrenStringTags=[]);continue;case"ID":this.validateNcname(d.value),t.reifiedStatementId=this.valueToUri("#"+d.value,t),this.claimNodeId(t.reifiedStatementId);continue}else if(d.uri===u.XML&&"lang"===d.local){t.language=""===d.value?null:d.value.toLowerCase();continue}if("xml"!==d.prefix&&"xmlns"!==d.prefix&&(""!==d.prefix||"xmlns"!==d.local)&&d.uri){if(n||t.datatype)throw this.newParseError(`Found illegal rdf:* properties on property element with attribute: ${d.value}`);t.hadChildren=!0,i=!0,s.push(this.uriToNamedNode(d.uri+d.local)),c.push(this.dataFactory.literal(d.value,t.datatype||t.language))}}if(null!==a){const e=t.subject;t.subject=o?this.dataFactory.blankNode(a):this.valueToUri(a,t),this.emitTriple(e,t.predicate,t.subject,t.reifiedStatementId);for(let e=0;e/g,((e,t,r)=>(this.saxParser.ENTITIES[t]=r,"")))}}var l;t.RdfXmlParser=u,u.MIME_TYPE="application/rdf+xml",u.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",u.XML="http://www.w3.org/XML/1998/namespace",u.FORBIDDEN_NODE_ELEMENTS=["RDF","ID","about","bagID","parseType","resource","nodeID","li","aboutEach","aboutEachPrefix"],u.FORBIDDEN_PROPERTY_ELEMENTS=["Description","RDF","ID","about","bagID","parseType","resource","nodeID","aboutEach","aboutEachPrefix"],u.NCNAME_MATCHER=/^([A-Za-z\xC0-\xD6\xD8-\xF6\u{F8}-\u{2FF}\u{370}-\u{37D}\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}_])([A-Za-z\xC0-\xD6\xD8-\xF6\u{F8}-\u{2FF}\u{370}-\u{37D}\u{37F}-\u{1FFF}\u{200C}-\u{200D}\u{2070}-\u{218F}\u{2C00}-\u{2FEF}\u{3001}-\u{D7FF}\u{F900}-\u{FDCF}\u{FDF0}-\u{FFFD}\u{10000}-\u{EFFFF}_\-.0-9#xB7\u{0300}-\u{036F}\u{203F}-\u{2040}])*$/u,function(e){e[e.RESOURCE=0]="RESOURCE",e[e.PROPERTY=1]="PROPERTY"}(l||(t.ParseType=l={}))},84077:e=>{e.exports=function(t){if(!e.exports.WEBSTREAM_SUPPORT)throw new Error("No web ReadableStream support");var r=!1,n={};return new ReadableStream({start:function(e){for(var i in n.data=a,n.end=a,n.end=o,n.close=o,n.error=o,n)t.on(i,n[i]);function a(n){r||(e.enqueue(n),t.pause())}function o(i){if(!r){for(var a in r=!0,n)t.removeListener(a,n[a]);i?e.error(i):e.close()}}t.pause()},pull:function(){r||t.resume()},cancel:function(){for(var e in r=!0,n)t.removeListener(e,n[e]);t.push(null),t.pause(),t.destroy?t.destroy():t.close&&t.close()}})},e.exports.WEBSTREAM_SUPPORT="undefined"!=typeof ReadableStream},21434:(e,t,r)=>{"use strict";const{SymbolDispose:n}=r(51473),{AbortError:i,codes:a}=r(52590),{isNodeStream:o,isWebStream:s,kControllerErrorFunction:c}=r(92520),u=r(94869),{ERR_INVALID_ARG_TYPE:l}=a;let d;e.exports.addAbortSignal=function(t,r){if(((e,t)=>{if("object"!=typeof e||!("aborted"in e))throw new l("signal","AbortSignal",e)})(t),!o(r)&&!s(r))throw new l("stream",["ReadableStream","WritableStream","Stream"],r);return e.exports.addAbortSignalNoValidate(t,r)},e.exports.addAbortSignalNoValidate=function(e,t){if("object"!=typeof e||!("aborted"in e))return t;const a=o(t)?()=>{t.destroy(new i(void 0,{cause:e.reason}))}:()=>{t[c](new i(void 0,{cause:e.reason}))};if(e.aborted)a();else{d=d||r(46609).addAbortListener;const i=d(e,a);u(t,i[n])}return t}},82:(e,t,r)=>{"use strict";const{StringPrototypeSlice:n,SymbolIterator:i,TypedArrayPrototypeSet:a,Uint8Array:o}=r(51473),{Buffer:s}=r(1048),{inspect:c}=r(46609);e.exports=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}unshift(e){const t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}shift(){if(0===this.length)return;const e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}clear(){this.head=this.tail=null,this.length=0}join(e){if(0===this.length)return"";let t=this.head,r=""+t.data;for(;null!==(t=t.next);)r+=e+t.data;return r}concat(e){if(0===this.length)return s.alloc(0);const t=s.allocUnsafe(e>>>0);let r=this.head,n=0;for(;r;)a(t,r.data,n),n+=r.data.length,r=r.next;return t}consume(e,t){const r=this.head.data;if(ea.length)){e===a.length?(t+=a,++i,r.next?this.head=r.next:this.head=this.tail=null):(t+=n(a,0,e),this.head=r,r.data=n(a,e));break}t+=a,e-=a.length,++i}while(null!==(r=r.next));return this.length-=i,t}_getBuffer(e){const t=s.allocUnsafe(e),r=e;let n=this.head,i=0;do{const s=n.data;if(!(e>s.length)){e===s.length?(a(t,s,r-e),++i,n.next?this.head=n.next:this.head=this.tail=null):(a(t,new o(s.buffer,s.byteOffset,e),r-e),this.head=n,n.data=s.slice(e));break}a(t,s,r-e),e-=s.length,++i}while(null!==(n=n.next));return this.length-=i,t}[Symbol.for("nodejs.util.inspect.custom")](e,t){return c(this,{...t,depth:0,customInspect:!1})}}},67369:(e,t,r)=>{"use strict";const{pipeline:n}=r(16815),i=r(86279),{destroyer:a}=r(16527),{isNodeStream:o,isReadable:s,isWritable:c,isWebStream:u,isTransformStream:l,isWritableStream:d,isReadableStream:p}=r(92520),{AbortError:h,codes:{ERR_INVALID_ARG_VALUE:f,ERR_MISSING_ARGS:y}}=r(52590),g=r(94869);e.exports=function(...e){if(0===e.length)throw new y("streams");if(1===e.length)return i.from(e[0]);const t=[...e];if("function"==typeof e[0]&&(e[0]=i.from(e[0])),"function"==typeof e[e.length-1]){const t=e.length-1;e[t]=i.from(e[t])}for(let r=0;r0&&!(c(e[r])||d(e[r])||l(e[r])))throw new f(`streams[${r}]`,t[r],"must be writable")}let r,m,b,v,_;const w=e[0],T=n(e,(function(e){const t=v;v=null,t?t(e):e?_.destroy(e):O||S||_.destroy()})),S=!!(c(w)||d(w)||l(w)),O=!!(s(T)||p(T)||l(T));if(_=new i({writableObjectMode:!(null==w||!w.writableObjectMode),readableObjectMode:!(null==T||!T.readableObjectMode),writable:S,readable:O}),S){if(o(w))_._write=function(e,t,n){w.write(e,t)?n():r=n},_._final=function(e){w.end(),m=e},w.on("drain",(function(){if(r){const e=r;r=null,e()}}));else if(u(w)){const e=(l(w)?w.writable:w).getWriter();_._write=async function(t,r,n){try{await e.ready,e.write(t).catch((()=>{})),n()}catch(e){n(e)}},_._final=async function(t){try{await e.ready,e.close().catch((()=>{})),m=t}catch(e){t(e)}}}const e=l(T)?T.readable:T;g(e,(()=>{if(m){const e=m;m=null,e()}}))}if(O)if(o(T))T.on("readable",(function(){if(b){const e=b;b=null,e()}})),T.on("end",(function(){_.push(null)})),_._read=function(){for(;;){const e=T.read();if(null===e)return void(b=_._read);if(!_.push(e))return}};else if(u(T)){const e=(l(T)?T.readable:T).getReader();_._read=async function(){for(;;)try{const{value:t,done:r}=await e.read();if(!_.push(t))return;if(r)return void _.push(null)}catch{return}}}return _._destroy=function(e,t){e||null===v||(e=new h),b=null,r=null,m=null,null===v?t(e):(v=t,o(T)&&a(T,e))},_}},16527:(e,t,r)=>{"use strict";const n=r(39907),{aggregateTwoErrors:i,codes:{ERR_MULTIPLE_CALLBACK:a},AbortError:o}=r(52590),{Symbol:s}=r(51473),{kIsDestroyed:c,isDestroyed:u,isFinished:l,isServerRequest:d}=r(92520),p=s("kDestroy"),h=s("kConstruct");function f(e,t,r){e&&(e.stack,t&&!t.errored&&(t.errored=e),r&&!r.errored&&(r.errored=e))}function y(e,t,r){let i=!1;function a(t){if(i)return;i=!0;const a=e._readableState,o=e._writableState;f(t,o,a),o&&(o.closed=!0),a&&(a.closed=!0),"function"==typeof r&&r(t),t?n.nextTick(g,e,t):n.nextTick(m,e)}try{e._destroy(t||null,a)}catch(t){a(t)}}function g(e,t){b(e,t),m(e)}function m(e){const t=e._readableState,r=e._writableState;r&&(r.closeEmitted=!0),t&&(t.closeEmitted=!0),(null!=r&&r.emitClose||null!=t&&t.emitClose)&&e.emit("close")}function b(e,t){const r=e._readableState,n=e._writableState;null!=n&&n.errorEmitted||null!=r&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),e.emit("error",t))}function v(e,t,r){const i=e._readableState,a=e._writableState;if(null!=a&&a.destroyed||null!=i&&i.destroyed)return this;null!=i&&i.autoDestroy||null!=a&&a.autoDestroy?e.destroy(t):t&&(t.stack,a&&!a.errored&&(a.errored=t),i&&!i.errored&&(i.errored=t),r?n.nextTick(b,e,t):b(e,t))}function _(e){let t=!1;function r(r){if(t)return void v(e,null!=r?r:new a);t=!0;const i=e._readableState,o=e._writableState,s=o||i;i&&(i.constructed=!0),o&&(o.constructed=!0),s.destroyed?e.emit(p,r):r?v(e,r,!0):n.nextTick(w,e)}try{e._construct((e=>{n.nextTick(r,e)}))}catch(e){n.nextTick(r,e)}}function w(e){e.emit(h)}function T(e){return(null==e?void 0:e.setHeader)&&"function"==typeof e.abort}function S(e){e.emit("close")}function O(e,t){e.emit("error",t),n.nextTick(S,e)}e.exports={construct:function(e,t){if("function"!=typeof e._construct)return;const r=e._readableState,i=e._writableState;r&&(r.constructed=!1),i&&(i.constructed=!1),e.once(h,t),e.listenerCount(h)>1||n.nextTick(_,e)},destroyer:function(e,t){e&&!u(e)&&(t||l(e)||(t=new o),d(e)?(e.socket=null,e.destroy(t)):T(e)?e.abort():T(e.req)?e.req.abort():"function"==typeof e.destroy?e.destroy(t):"function"==typeof e.close?e.close():t?n.nextTick(O,e,t):n.nextTick(S,e),e.destroyed||(e[c]=!0))},destroy:function(e,t){const r=this._readableState,n=this._writableState,a=n||r;return null!=n&&n.destroyed||null!=r&&r.destroyed?("function"==typeof t&&t(),this):(f(e,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),a.constructed?y(this,e,t):this.once(p,(function(r){y(this,i(r,e),t)})),this)},undestroy:function(){const e=this._readableState,t=this._writableState;e&&(e.constructed=!0,e.closed=!1,e.closeEmitted=!1,e.destroyed=!1,e.errored=null,e.errorEmitted=!1,e.reading=!1,e.ended=!1===e.readable,e.endEmitted=!1===e.readable),t&&(t.constructed=!0,t.destroyed=!1,t.closed=!1,t.closeEmitted=!1,t.errored=null,t.errorEmitted=!1,t.finalCalled=!1,t.prefinished=!1,t.ended=!1===t.writable,t.ending=!1===t.writable,t.finished=!1===t.writable)},errorOrDestroy:v}},86279:(e,t,r)=>{"use strict";const{ObjectDefineProperties:n,ObjectGetOwnPropertyDescriptor:i,ObjectKeys:a,ObjectSetPrototypeOf:o}=r(51473);e.exports=u;const s=r(11509),c=r(65605);o(u.prototype,s.prototype),o(u,s);{const e=a(c.prototype);for(let t=0;t{const n=r(39907),i=r(1048),{isReadable:a,isWritable:o,isIterable:s,isNodeStream:c,isReadableNodeStream:u,isWritableNodeStream:l,isDuplexNodeStream:d,isReadableStream:p,isWritableStream:h}=r(92520),f=r(94869),{AbortError:y,codes:{ERR_INVALID_ARG_TYPE:g,ERR_INVALID_RETURN_VALUE:m}}=r(52590),{destroyer:b}=r(16527),v=r(86279),_=r(11509),w=r(65605),{createDeferredPromise:T}=r(46609),S=r(81613),O=globalThis.Blob||i.Blob,E=void 0!==O?function(e){return e instanceof O}:function(e){return!1},x=globalThis.AbortController||r(67083).AbortController,{FunctionPrototypeCall:A}=r(51473);class R extends v{constructor(e){super(e),!1===(null==e?void 0:e.readable)&&(this._readableState.readable=!1,this._readableState.ended=!0,this._readableState.endEmitted=!0),!1===(null==e?void 0:e.writable)&&(this._writableState.writable=!1,this._writableState.ending=!0,this._writableState.ended=!0,this._writableState.finished=!0)}}function I(e){const t=e.readable&&"function"!=typeof e.readable.read?_.wrap(e.readable):e.readable,r=e.writable;let n,i,s,c,u,l=!!a(t),d=!!o(r);function p(e){const t=c;c=null,t?t(e):e&&u.destroy(e)}return u=new R({readableObjectMode:!(null==t||!t.readableObjectMode),writableObjectMode:!(null==r||!r.writableObjectMode),readable:l,writable:d}),d&&(f(r,(e=>{d=!1,e&&b(t,e),p(e)})),u._write=function(e,t,i){r.write(e,t)?i():n=i},u._final=function(e){r.end(),i=e},r.on("drain",(function(){if(n){const e=n;n=null,e()}})),r.on("finish",(function(){if(i){const e=i;i=null,e()}}))),l&&(f(t,(e=>{l=!1,e&&b(t,e),p(e)})),t.on("readable",(function(){if(s){const e=s;s=null,e()}})),t.on("end",(function(){u.push(null)})),u._read=function(){for(;;){const e=t.read();if(null===e)return void(s=u._read);if(!u.push(e))return}}),u._destroy=function(e,a){e||null===c||(e=new y),s=null,n=null,i=null,null===c?a(e):(c=a,b(r,e),b(t,e))},u}e.exports=function e(t,r){if(d(t))return t;if(u(t))return I({readable:t});if(l(t))return I({writable:t});if(c(t))return I({writable:!1,readable:!1});if(p(t))return I({readable:_.fromWeb(t)});if(h(t))return I({writable:w.fromWeb(t)});if("function"==typeof t){const{value:e,write:i,final:a,destroy:o}=function(e){let{promise:t,resolve:r}=T();const i=new x,a=i.signal;return{value:e(async function*(){for(;;){const e=t;t=null;const{chunk:i,done:o,cb:s}=await e;if(n.nextTick(s),o)return;if(a.aborted)throw new y(void 0,{cause:a.reason});({promise:t,resolve:r}=T()),yield i}}(),{signal:a}),write(e,t,n){const i=r;r=null,i({chunk:e,done:!1,cb:n})},final(e){const t=r;r=null,t({done:!0,cb:e})},destroy(e,t){i.abort(),t(e)}}}(t);if(s(e))return S(R,e,{objectMode:!0,write:i,final:a,destroy:o});const c=null==e?void 0:e.then;if("function"==typeof c){let t;const r=A(c,e,(e=>{if(null!=e)throw new m("nully","body",e)}),(e=>{b(t,e)}));return t=new R({objectMode:!0,readable:!1,write:i,final(e){a((async()=>{try{await r,n.nextTick(e,null)}catch(t){n.nextTick(e,t)}}))},destroy:o})}throw new m("Iterable, AsyncIterable or AsyncFunction",r,e)}if(E(t))return e(t.arrayBuffer());if(s(t))return S(R,t,{objectMode:!0,writable:!1});if(p(null==t?void 0:t.readable)&&h(null==t?void 0:t.writable))return R.fromWeb(t);if("object"==typeof(null==t?void 0:t.writable)||"object"==typeof(null==t?void 0:t.readable))return I({readable:null!=t&&t.readable?u(null==t?void 0:t.readable)?null==t?void 0:t.readable:e(t.readable):void 0,writable:null!=t&&t.writable?l(null==t?void 0:t.writable)?null==t?void 0:t.writable:e(t.writable):void 0});const i=null==t?void 0:t.then;if("function"==typeof i){let e;return A(i,t,(t=>{null!=t&&e.push(t),e.push(null)}),(t=>{b(e,t)})),e=new R({objectMode:!0,writable:!1,read(){}})}throw new g(r,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],t)}},94869:(e,t,r)=>{const n=r(39907),{AbortError:i,codes:a}=r(52590),{ERR_INVALID_ARG_TYPE:o,ERR_STREAM_PREMATURE_CLOSE:s}=a,{kEmptyObject:c,once:u}=r(46609),{validateAbortSignal:l,validateFunction:d,validateObject:p,validateBoolean:h}=r(77840),{Promise:f,PromisePrototypeThen:y,SymbolDispose:g}=r(51473),{isClosed:m,isReadable:b,isReadableNodeStream:v,isReadableStream:_,isReadableFinished:w,isReadableErrored:T,isWritable:S,isWritableNodeStream:O,isWritableStream:E,isWritableFinished:x,isWritableErrored:A,isNodeStream:R,willEmitClose:I,kIsClosedPromise:P}=r(92520);let N;const D=()=>{};function j(e,t,a){var h,f;if(2===arguments.length?(a=t,t=c):null==t?t=c:p(t,"options"),d(a,"callback"),l(t.signal,"options.signal"),a=u(a),_(e)||E(e))return function(e,t,a){let o=!1,s=D;if(t.signal)if(s=()=>{o=!0,a.call(e,new i(void 0,{cause:t.signal.reason}))},t.signal.aborted)n.nextTick(s);else{N=N||r(46609).addAbortListener;const n=N(t.signal,s),i=a;a=u(((...t)=>{n[g](),i.apply(e,t)}))}const c=(...t)=>{o||n.nextTick((()=>a.apply(e,t)))};return y(e[P].promise,c,c),D}(e,t,a);if(!R(e))throw new o("stream",["ReadableStream","WritableStream","Stream"],e);const j=null!==(h=t.readable)&&void 0!==h?h:v(e),C=null!==(f=t.writable)&&void 0!==f?f:O(e),M=e._writableState,L=e._readableState,k=()=>{e.writable||U()};let F=I(e)&&v(e)===j&&O(e)===C,B=x(e,!1);const U=()=>{B=!0,e.destroyed&&(F=!1),(!F||e.readable&&!j)&&(j&&!q||a.call(e))};let q=w(e,!1);const V=()=>{q=!0,e.destroyed&&(F=!1),(!F||e.writable&&!C)&&(C&&!B||a.call(e))},Q=t=>{a.call(e,t)};let $=m(e);const H=()=>{$=!0;const t=A(e)||T(e);return t&&"boolean"!=typeof t?a.call(e,t):j&&!q&&v(e,!0)&&!w(e,!1)?a.call(e,new s):!C||B||x(e,!1)?void a.call(e):a.call(e,new s)},G=()=>{$=!0;const t=A(e)||T(e);if(t&&"boolean"!=typeof t)return a.call(e,t);a.call(e)},z=()=>{e.req.on("finish",U)};!function(e){return e.setHeader&&"function"==typeof e.abort}(e)?C&&!M&&(e.on("end",k),e.on("close",k)):(e.on("complete",U),F||e.on("abort",H),e.req?z():e.on("request",z)),F||"boolean"!=typeof e.aborted||e.on("aborted",H),e.on("end",V),e.on("finish",U),!1!==t.error&&e.on("error",Q),e.on("close",H),$?n.nextTick(H):null!=M&&M.errorEmitted||null!=L&&L.errorEmitted?F||n.nextTick(G):(j||F&&!b(e)||!B&&!1!==S(e))&&(C||F&&!S(e)||!q&&!1!==b(e))?L&&e.req&&e.aborted&&n.nextTick(G):n.nextTick(G);const K=()=>{a=D,e.removeListener("aborted",H),e.removeListener("complete",U),e.removeListener("abort",H),e.removeListener("request",z),e.req&&e.req.removeListener("finish",U),e.removeListener("end",k),e.removeListener("close",k),e.removeListener("finish",U),e.removeListener("end",V),e.removeListener("error",Q),e.removeListener("close",H)};if(t.signal&&!$){const o=()=>{const r=a;K(),r.call(e,new i(void 0,{cause:t.signal.reason}))};if(t.signal.aborted)n.nextTick(o);else{N=N||r(46609).addAbortListener;const n=N(t.signal,o),i=a;a=u(((...t)=>{n[g](),i.apply(e,t)}))}}return K}e.exports=j,e.exports.finished=function(e,t){var r;let n=!1;return null===t&&(t=c),null!==(r=t)&&void 0!==r&&r.cleanup&&(h(t.cleanup,"cleanup"),n=t.cleanup),new f(((r,i)=>{const a=j(e,t,(e=>{n&&a(),e?i(e):r()}))}))}},81613:(e,t,r)=>{"use strict";const n=r(39907),{PromisePrototypeThen:i,SymbolAsyncIterator:a,SymbolIterator:o}=r(51473),{Buffer:s}=r(1048),{ERR_INVALID_ARG_TYPE:c,ERR_STREAM_NULL_VALUES:u}=r(52590).codes;e.exports=function(e,t,r){let l,d;if("string"==typeof t||t instanceof s)return new e({objectMode:!0,...r,read(){this.push(t),this.push(null)}});if(t&&t[a])d=!0,l=t[a]();else{if(!t||!t[o])throw new c("iterable",["Iterable"],t);d=!1,l=t[o]()}const p=new e({objectMode:!0,highWaterMark:1,...r});let h=!1;return p._read=function(){h||(h=!0,async function(){for(;;){try{const{value:e,done:t}=d?await l.next():l.next();if(t)p.push(null);else{const t=e&&"function"==typeof e.then?await e:e;if(null===t)throw h=!1,new u;if(p.push(t))continue;h=!1}}catch(e){p.destroy(e)}break}}())},p._destroy=function(e,t){i(async function(e){const t=null!=e,r="function"==typeof l.throw;if(t&&r){const{value:t,done:r}=await l.throw(e);if(await t,r)return}if("function"==typeof l.return){const{value:e}=await l.return();await e}}(e),(()=>n.nextTick(t,e)),(r=>n.nextTick(t,r||e)))},p}},23054:(e,t,r)=>{"use strict";const{ArrayIsArray:n,ObjectSetPrototypeOf:i}=r(51473),{EventEmitter:a}=r(50046);function o(e){a.call(this,e)}function s(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?n(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}i(o.prototype,a.prototype),i(o,a),o.prototype.pipe=function(e,t){const r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",c),r.on("close",u));let o=!1;function c(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){d(),0===a.listenerCount(this,"error")&&this.emit("error",e)}function d(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",c),r.removeListener("close",u),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",d),r.removeListener("close",d),e.removeListener("close",d)}return s(r,"error",l),s(e,"error",l),r.on("end",d),r.on("close",d),e.on("close",d),e.emit("pipe",r),e},e.exports={Stream:o,prependListener:s}},64708:(e,t,r)=>{"use strict";const n=globalThis.AbortController||r(67083).AbortController,{codes:{ERR_INVALID_ARG_VALUE:i,ERR_INVALID_ARG_TYPE:a,ERR_MISSING_ARGS:o,ERR_OUT_OF_RANGE:s},AbortError:c}=r(52590),{validateAbortSignal:u,validateInteger:l,validateObject:d}=r(77840),p=r(51473).Symbol("kWeak"),h=r(51473).Symbol("kResistStopPropagation"),{finished:f}=r(94869),y=r(67369),{addAbortSignalNoValidate:g}=r(21434),{isWritable:m,isNodeStream:b}=r(92520),{deprecate:v}=r(46609),{ArrayPrototypePush:_,Boolean:w,MathFloor:T,Number:S,NumberIsNaN:O,Promise:E,PromiseReject:x,PromiseResolve:A,PromisePrototypeThen:R,Symbol:I}=r(51473),P=I("kEmpty"),N=I("kEof");function D(e,t){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal");let n=1;null!=(null==t?void 0:t.concurrency)&&(n=T(t.concurrency));let i=n-1;return null!=(null==t?void 0:t.highWaterMark)&&(i=T(t.highWaterMark)),l(n,"options.concurrency",1),l(i,"options.highWaterMark",0),i+=n,async function*(){const a=r(46609).AbortSignalAny([null==t?void 0:t.signal].filter(w)),o=this,s=[],u={signal:a};let l,d,p=!1,h=0;function f(){p=!0,y()}function y(){h-=1,g()}function g(){d&&!p&&h=i||h>=n)&&await new E((e=>{d=e}))}s.push(N)}catch(e){const t=x(e);R(t,y,f),s.push(t)}finally{p=!0,l&&(l(),l=null)}}();try{for(;;){for(;s.length>0;){const e=await s[0];if(e===N)return;if(a.aborted)throw new c;e!==P&&(yield e),s.shift(),g()}await new E((e=>{l=e}))}}finally{p=!0,d&&(d(),d=null)}}.call(this)}async function j(e,t=void 0){for await(const r of C.call(this,e,t))return!0;return!1}function C(e,t){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);return D.call(this,(async function(t,r){return await e(t,r)?t:P}),t)}class M extends o{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}function L(e){if(e=S(e),O(e))return 0;if(e<0)throw new s("number",">= 0",e);return e}e.exports.streamReturningOperators={asIndexedPairs:v((function(e=void 0){return null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal"),async function*(){let t=0;for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c({cause:e.signal.reason});yield[t++,n]}}.call(this)}),"readable.asIndexedPairs will be removed in a future version."),drop:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;e--<=0&&(yield r)}}.call(this)},filter:C,flatMap:function(e,t){const r=D.call(this,e,t);return async function*(){for await(const e of r)yield*e}.call(this)},map:D,take:function(e,t=void 0){return null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),e=L(e),async function*(){var r;if(null!=t&&null!==(r=t.signal)&&void 0!==r&&r.aborted)throw new c;for await(const r of this){var n;if(null!=t&&null!==(n=t.signal)&&void 0!==n&&n.aborted)throw new c;if(e-- >0&&(yield r),e<=0)return}}.call(this)},compose:function(e,t){if(null!=t&&d(t,"options"),null!=(null==t?void 0:t.signal)&&u(t.signal,"options.signal"),b(e)&&!m(e))throw new i("stream",e,"must be writable");const r=y(this,e);return null!=t&&t.signal&&g(t.signal,r),r}},e.exports.promiseReturningOperators={every:async function(e,t=void 0){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);return!await j.call(this,(async(...t)=>!await e(...t)),t)},forEach:async function(e,t){if("function"!=typeof e)throw new a("fn",["Function","AsyncFunction"],e);for await(const r of D.call(this,(async function(t,r){return await e(t,r),P}),t));},reduce:async function(e,t,r){var i;if("function"!=typeof e)throw new a("reducer",["Function","AsyncFunction"],e);null!=r&&d(r,"options"),null!=(null==r?void 0:r.signal)&&u(r.signal,"options.signal");let o=arguments.length>1;if(null!=r&&null!==(i=r.signal)&&void 0!==i&&i.aborted){const e=new c(void 0,{cause:r.signal.reason});throw this.once("error",(()=>{})),await f(this.destroy(e)),e}const s=new n,l=s.signal;if(null!=r&&r.signal){const e={once:!0,[p]:this,[h]:!0};r.signal.addEventListener("abort",(()=>s.abort()),e)}let y=!1;try{for await(const n of this){var g;if(y=!0,null!=r&&null!==(g=r.signal)&&void 0!==g&&g.aborted)throw new c;o?t=await e(t,n,{signal:l}):(t=n,o=!0)}if(!y&&!o)throw new M}finally{s.abort()}return t},toArray:async function(e){null!=e&&d(e,"options"),null!=(null==e?void 0:e.signal)&&u(e.signal,"options.signal");const t=[];for await(const n of this){var r;if(null!=e&&null!==(r=e.signal)&&void 0!==r&&r.aborted)throw new c(void 0,{cause:e.signal.reason});_(t,n)}return t},some:j,find:async function(e,t){for await(const r of C.call(this,e,t))return r}}},76587:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n}=r(51473);e.exports=a;const i=r(32073);function a(e){if(!(this instanceof a))return new a(e);i.call(this,e)}n(a.prototype,i.prototype),n(a,i),a.prototype._transform=function(e,t,r){r(null,e)}},16815:(e,t,r)=>{const n=r(39907),{ArrayIsArray:i,Promise:a,SymbolAsyncIterator:o,SymbolDispose:s}=r(51473),c=r(94869),{once:u}=r(46609),l=r(16527),d=r(86279),{aggregateTwoErrors:p,codes:{ERR_INVALID_ARG_TYPE:h,ERR_INVALID_RETURN_VALUE:f,ERR_MISSING_ARGS:y,ERR_STREAM_DESTROYED:g,ERR_STREAM_PREMATURE_CLOSE:m},AbortError:b}=r(52590),{validateFunction:v,validateAbortSignal:_}=r(77840),{isIterable:w,isReadable:T,isReadableNodeStream:S,isNodeStream:O,isTransformStream:E,isWebStream:x,isReadableStream:A,isReadableFinished:R}=r(92520),I=globalThis.AbortController||r(67083).AbortController;let P,N,D;function j(e,t,r){let n=!1;return e.on("close",(()=>{n=!0})),{destroy:t=>{n||(n=!0,l.destroyer(e,t||new g("pipe")))},cleanup:c(e,{readable:t,writable:r},(e=>{n=!e}))}}function C(e){if(w(e))return e;if(S(e))return async function*(e){N||(N=r(11509)),yield*N.prototype[o].call(e)}(e);throw new h("val",["Readable","Iterable","AsyncIterable"],e)}async function M(e,t,r,{end:n}){let i,o=null;const s=e=>{if(e&&(i=e),o){const e=o;o=null,e()}},u=()=>new a(((e,t)=>{i?t(i):o=()=>{i?t(i):e()}}));t.on("drain",s);const l=c(t,{readable:!1},s);try{t.writableNeedDrain&&await u();for await(const r of e)t.write(r)||await u();n&&(t.end(),await u()),r()}catch(e){r(i!==e?p(i,e):e)}finally{l(),t.off("drain",s)}}async function L(e,t,r,{end:n}){E(t)&&(t=t.writable);const i=t.getWriter();try{for await(const t of e)await i.ready,i.write(t).catch((()=>{}));await i.ready,n&&await i.close(),r()}catch(e){try{await i.abort(e),r(e)}catch(e){r(e)}}}function k(e,t,a){if(1===e.length&&i(e[0])&&(e=e[0]),e.length<2)throw new y("streams");const o=new I,c=o.signal,u=null==a?void 0:a.signal,l=[];function p(){U(new b)}let g,m,v;_(u,"options.signal"),D=D||r(46609).addAbortListener,u&&(g=D(u,p));const R=[];let N,k=0;function B(e){U(e,0==--k)}function U(e,r){var i;if(!e||m&&"ERR_STREAM_PREMATURE_CLOSE"!==m.code||(m=e),m||r){for(;R.length;)R.shift()(m);null===(i=g)||void 0===i||i[s](),o.abort(),r&&(m||l.forEach((e=>e())),n.nextTick(t,m,v))}}for(let $=0;$0,K=G||!1!==(null==a?void 0:a.end),X=$===e.length-1;if(O(H)){if(K){const{destroy:J,cleanup:W}=j(H,G,z);R.push(J),T(H)&&X&&l.push(W)}function q(e){e&&"AbortError"!==e.name&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code&&B(e)}H.on("error",q),T(H)&&X&&l.push((()=>{H.removeListener("error",q)}))}if(0===$)if("function"==typeof H){if(N=H({signal:c}),!w(N))throw new f("Iterable, AsyncIterable or Stream","source",N)}else N=w(H)||S(H)||E(H)?H:d.from(H);else if("function"==typeof H){var V;if(N=E(N)?C(null===(V=N)||void 0===V?void 0:V.readable):C(N),N=H(N,{signal:c}),G){if(!w(N,!0))throw new f("AsyncIterable",`transform[${$-1}]`,N)}else{var Q;P||(P=r(76587));const Y=new P({objectMode:!0}),Z=null===(Q=N)||void 0===Q?void 0:Q.then;if("function"==typeof Z)k++,Z.call(N,(e=>{v=e,null!=e&&Y.write(e),K&&Y.end(),n.nextTick(B)}),(e=>{Y.destroy(e),n.nextTick(B,e)}));else if(w(N,!0))k++,M(N,Y,B,{end:K});else{if(!A(N)&&!E(N))throw new f("AsyncIterable or Promise","destination",N);{const re=N.readable||N;k++,M(re,Y,B,{end:K})}}N=Y;const{destroy:ee,cleanup:te}=j(N,!1,!0);R.push(ee),X&&l.push(te)}}else if(O(H)){if(S(N)){k+=2;const ne=F(N,H,B,{end:K});T(H)&&X&&l.push(ne)}else if(E(N)||A(N)){const ie=N.readable||N;k++,M(ie,H,B,{end:K})}else{if(!w(N))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);k++,M(N,H,B,{end:K})}N=H}else if(x(H)){if(S(N))k++,L(C(N),H,B,{end:K});else if(A(N)||w(N))k++,L(N,H,B,{end:K});else{if(!E(N))throw new h("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],N);k++,L(N.readable,H,B,{end:K})}N=H}else N=d.from(H)}return(null!=c&&c.aborted||null!=u&&u.aborted)&&n.nextTick(p),N}function F(e,t,r,{end:i}){let a=!1;if(t.on("close",(()=>{a||r(new m)})),e.pipe(t,{end:!1}),i){function o(){a=!0,t.end()}R(e)?n.nextTick(o):e.once("end",o)}else r();return c(e,{readable:!0,writable:!1},(t=>{const n=e._readableState;t&&"ERR_STREAM_PREMATURE_CLOSE"===t.code&&n&&n.ended&&!n.errored&&!n.errorEmitted?e.once("end",r).once("error",r):r(t)})),c(t,{readable:!1,writable:!0},r)}e.exports={pipelineImpl:k,pipeline:function(...e){return k(e,u(function(e){return v(e[e.length-1],"streams[stream.length - 1]"),e.pop()}(e)))}}},11509:(e,t,r)=>{const n=r(39907),{ArrayPrototypeIndexOf:i,NumberIsInteger:a,NumberIsNaN:o,NumberParseInt:s,ObjectDefineProperties:c,ObjectKeys:u,ObjectSetPrototypeOf:l,Promise:d,SafeSet:p,SymbolAsyncDispose:h,SymbolAsyncIterator:f,Symbol:y}=r(51473);e.exports=X,X.ReadableState=K;const{EventEmitter:g}=r(50046),{Stream:m,prependListener:b}=r(23054),{Buffer:v}=r(1048),{addAbortSignal:_}=r(21434),w=r(94869);let T=r(46609).debuglog("stream",(e=>{T=e}));const S=r(82),O=r(16527),{getHighWaterMark:E,getDefaultHighWaterMark:x}=r(89952),{aggregateTwoErrors:A,codes:{ERR_INVALID_ARG_TYPE:R,ERR_METHOD_NOT_IMPLEMENTED:I,ERR_OUT_OF_RANGE:P,ERR_STREAM_PUSH_AFTER_EOF:N,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:D},AbortError:j}=r(52590),{validateObject:C}=r(77840),M=y("kPaused"),{StringDecoder:L}=r(18888),k=r(81613);l(X.prototype,m.prototype),l(X,m);const F=()=>{},{errorOrDestroy:B}=O,U=1,q=16,V=32,Q=64,$=2048,H=4096,G=65536;function z(e){return{enumerable:!1,get(){return!!(this.state&e)},set(t){t?this.state|=e:this.state&=~e}}}function K(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(86279)),this.state=$|H|q|V,e&&e.objectMode&&(this.state|=U),n&&e&&e.readableObjectMode&&(this.state|=U),this.highWaterMark=e?E(this,e,"readableHighWaterMark",n):x(!1),this.buffer=new S,this.length=0,this.pipes=[],this.flowing=null,this[M]=null,e&&!1===e.emitClose&&(this.state&=~$),e&&!1===e.autoDestroy&&(this.state&=~H),this.errored=null,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.decoder=null,this.encoding=null,e&&e.encoding&&(this.decoder=new L(e.encoding),this.encoding=e.encoding)}function X(e){if(!(this instanceof X))return new X(e);const t=this instanceof r(86279);this._readableState=new K(e,this,t),e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&!t&&_(e.signal,this)),m.call(this,e),O.construct(this,(()=>{this._readableState.needReadable&&te(this,this._readableState)}))}function J(e,t,r,n){T("readableAddChunk",t);const i=e._readableState;let a;if(i.state&U||("string"==typeof t?(r=r||i.defaultEncoding,i.encoding!==r&&(n&&i.encoding?t=v.from(t,r).toString(i.encoding):(t=v.from(t,r),r=""))):t instanceof v?r="":m._isUint8Array(t)?(t=m._uint8ArrayToBuffer(t),r=""):null!=t&&(a=new R("chunk",["string","Buffer","Uint8Array"],t))),a)B(e,a);else if(null===t)i.state&=-9,function(e,t){if(T("onEofChunk"),!t.ended){if(t.decoder){const e=t.decoder.end();e&&e.length&&(t.buffer.push(e),t.length+=t.objectMode?1:e.length)}t.ended=!0,t.sync?Z(e):(t.needReadable=!1,t.emittedReadable=!0,ee(e))}}(e,i);else if(i.state&U||t&&t.length>0)if(n)if(4&i.state)B(e,new D);else{if(i.destroyed||i.errored)return!1;W(e,i,t,!0)}else if(i.ended)B(e,new N);else{if(i.destroyed||i.errored)return!1;i.state&=-9,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||0!==t.length?W(e,i,t,!1):te(e,i)):W(e,i,t,!1)}else n||(i.state&=-9,te(e,i));return!i.ended&&(i.length0?(t.state&G?t.awaitDrainWriters.clear():t.awaitDrainWriters=null,t.dataEmitted=!0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.state&Q&&Z(e)),te(e,t)}function Y(e,t){return e<=0||0===t.length&&t.ended?0:t.state&U?1:o(e)?t.flowing&&t.length?t.buffer.first().length:t.length:e<=t.length?e:t.ended?t.length:0}function Z(e){const t=e._readableState;T("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(T("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(ee,e))}function ee(e){const t=e._readableState;T("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||t.errored||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,oe(e)}function te(e,t){!t.readingMore&&t.constructed&&(t.readingMore=!0,n.nextTick(re,e,t))}function re(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!1===t[M]?t.flowing=!0:e.listenerCount("data")>0?e.resume():t.readableListening||(t.flowing=null)}function ie(e){T("readable nexttick read 0"),e.read(0)}function ae(e,t){T("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),oe(e),t.flowing&&!t.reading&&e.read(0)}function oe(e){const t=e._readableState;for(T("flow",t.flowing);t.flowing&&null!==e.read(););}function se(e,t){"function"!=typeof e.read&&(e=X.wrap(e,{objectMode:!0}));const r=async function*(e,t){let r,n=F;function i(t){this===e?(n(),n=F):n=t}e.on("readable",i);const a=w(e,{writable:!1},(e=>{r=e?A(r,e):null,n(),n=F}));try{for(;;){const t=e.destroyed?null:e.read();if(null!==t)yield t;else{if(r)throw r;if(null===r)return;await new d(i)}}}catch(e){throw r=A(r,e),r}finally{!r&&!1===(null==t?void 0:t.destroyOnReturn)||void 0!==r&&!e._readableState.autoDestroy?(e.off("readable",i),a()):O.destroyer(e,null)}}(e,t);return r.stream=e,r}function ce(e,t){if(0===t.length)return null;let r;return 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}function ue(e){const t=e._readableState;T("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(le,t,e))}function le(e,t){if(T("endReadableNT",e.endEmitted,e.length),!e.errored&&!e.closeEmitted&&!e.endEmitted&&0===e.length)if(e.endEmitted=!0,t.emit("end"),t.writable&&!1===t.allowHalfOpen)n.nextTick(de,t);else if(e.autoDestroy){const e=t._writableState;(!e||e.autoDestroy&&(e.finished||!1===e.writable))&&t.destroy()}}function de(e){e.writable&&!e.writableEnded&&!e.destroyed&&e.end()}let pe;function he(){return void 0===pe&&(pe={}),pe}c(K.prototype,{objectMode:z(U),ended:z(2),endEmitted:z(4),reading:z(8),constructed:z(q),sync:z(V),needReadable:z(Q),emittedReadable:z(128),readableListening:z(256),resumeScheduled:z(512),errorEmitted:z(1024),emitClose:z($),autoDestroy:z(H),destroyed:z(8192),closed:z(16384),closeEmitted:z(32768),multiAwaitDrain:z(G),readingMore:z(1<<17),dataEmitted:z(1<<18)}),X.prototype.destroy=O.destroy,X.prototype._undestroy=O.undestroy,X.prototype._destroy=function(e,t){t(e)},X.prototype[g.captureRejectionSymbol]=function(e){this.destroy(e)},X.prototype[h]=function(){let e;return this.destroyed||(e=this.readableEnded?null:new j,this.destroy(e)),new d(((t,r)=>w(this,(n=>n&&n!==e?r(n):t(null)))))},X.prototype.push=function(e,t){return J(this,e,t,!1)},X.prototype.unshift=function(e,t){return J(this,e,t,!0)},X.prototype.isPaused=function(){const e=this._readableState;return!0===e[M]||!1===e.flowing},X.prototype.setEncoding=function(e){const t=new L(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;const r=this._readableState.buffer;let n="";for(const e of r)n+=t.write(e);return r.clear(),""!==n&&r.push(n),this._readableState.length=n.length,this},X.prototype.read=function(e){T("read",e),void 0===e?e=NaN:a(e)||(e=s(e,10));const t=this._readableState,r=e;if(e>t.highWaterMark&&(t.highWaterMark=function(e){if(e>1073741824)throw new P("size","<= 1GiB",e);return e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,++e}(e)),0!==e&&(t.state&=-129),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return T("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?ue(this):Z(this),null;if(0===(e=Y(e,t))&&t.ended)return 0===t.length&&ue(this),null;let n,i=!!(t.state&Q);if(T("need readable",i),(0===t.length||t.length-e0?ce(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.multiAwaitDrain?t.awaitDrainWriters.clear():t.awaitDrainWriters=null),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&ue(this)),null===n||t.errorEmitted||t.closeEmitted||(t.dataEmitted=!0,this.emit("data",n)),n},X.prototype._read=function(e){throw new I("_read()")},X.prototype.pipe=function(e,t){const r=this,i=this._readableState;1===i.pipes.length&&(i.multiAwaitDrain||(i.multiAwaitDrain=!0,i.awaitDrainWriters=new p(i.awaitDrainWriters?[i.awaitDrainWriters]:[]))),i.pipes.push(e),T("pipe count=%d opts=%j",i.pipes.length,t);const a=t&&!1===t.end||e===n.stdout||e===n.stderr?y:o;function o(){T("onend"),e.end()}let s;i.endEmitted?n.nextTick(a):r.once("end",a),e.on("unpipe",(function t(n,a){T("onunpipe"),n===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,T("cleanup"),e.removeListener("close",h),e.removeListener("finish",f),s&&e.removeListener("drain",s),e.removeListener("error",d),e.removeListener("unpipe",t),r.removeListener("end",o),r.removeListener("end",y),r.removeListener("data",l),c=!0,s&&i.awaitDrainWriters&&(!e._writableState||e._writableState.needDrain)&&s())}));let c=!1;function u(){c||(1===i.pipes.length&&i.pipes[0]===e?(T("false write response, pause",0),i.awaitDrainWriters=e,i.multiAwaitDrain=!1):i.pipes.length>1&&i.pipes.includes(e)&&(T("false write response, pause",i.awaitDrainWriters.size),i.awaitDrainWriters.add(e)),r.pause()),s||(s=function(e,t){return function(){const r=e._readableState;r.awaitDrainWriters===t?(T("pipeOnDrain",1),r.awaitDrainWriters=null):r.multiAwaitDrain&&(T("pipeOnDrain",r.awaitDrainWriters.size),r.awaitDrainWriters.delete(t)),r.awaitDrainWriters&&0!==r.awaitDrainWriters.size||!e.listenerCount("data")||e.resume()}}(r,e),e.on("drain",s))}function l(t){T("ondata");const r=e.write(t);T("dest.write",r),!1===r&&u()}function d(t){if(T("onerror",t),y(),e.removeListener("error",d),0===e.listenerCount("error")){const r=e._writableState||e._readableState;r&&!r.errorEmitted?B(e,t):e.emit("error",t)}}function h(){e.removeListener("finish",f),y()}function f(){T("onfinish"),e.removeListener("close",h),y()}function y(){T("unpipe"),r.unpipe(e)}return r.on("data",l),b(e,"error",d),e.once("close",h),e.once("finish",f),e.emit("pipe",r),!0===e.writableNeedDrain?u():i.flowing||(T("pipe resume"),r.resume()),e},X.prototype.unpipe=function(e){const t=this._readableState;if(0===t.pipes.length)return this;if(!e){const e=t.pipes;t.pipes=[],this.pause();for(let t=0;t0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,T("on readable",i.length,i.reading),i.length?Z(this):i.reading||n.nextTick(ie,this))),r},X.prototype.addListener=X.prototype.on,X.prototype.removeListener=function(e,t){const r=m.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(ne,this),r},X.prototype.off=X.prototype.removeListener,X.prototype.removeAllListeners=function(e){const t=m.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(ne,this),t},X.prototype.resume=function(){const e=this._readableState;return e.flowing||(T("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(ae,e,t))}(this,e)),e[M]=!1,this},X.prototype.pause=function(){return T("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(T("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[M]=!0,this},X.prototype.wrap=function(e){let t=!1;e.on("data",(r=>{!this.push(r)&&e.pause&&(t=!0,e.pause())})),e.on("end",(()=>{this.push(null)})),e.on("error",(e=>{B(this,e)})),e.on("close",(()=>{this.destroy()})),e.on("destroy",(()=>{this.destroy()})),this._read=()=>{t&&e.resume&&(t=!1,e.resume())};const r=u(e);for(let t=1;t{"use strict";const{MathFloor:n,NumberIsInteger:i}=r(51473),{validateInteger:a}=r(77840),{ERR_INVALID_ARG_VALUE:o}=r(52590).codes;let s=16384,c=16;function u(e){return e?c:s}e.exports={getHighWaterMark:function(e,t,r,a){const s=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,a,r);if(null!=s){if(!i(s)||s<0)throw new o(a?`options.${r}`:"options.highWaterMark",s);return n(s)}return u(e.objectMode)},getDefaultHighWaterMark:u,setDefaultHighWaterMark:function(e,t){a(t,"value",0),e?c=t:s=t}}},32073:(e,t,r)=>{"use strict";const{ObjectSetPrototypeOf:n,Symbol:i}=r(51473);e.exports=u;const{ERR_METHOD_NOT_IMPLEMENTED:a}=r(52590).codes,o=r(86279),{getHighWaterMark:s}=r(89952);n(u.prototype,o.prototype),n(u,o);const c=i("kCallback");function u(e){if(!(this instanceof u))return new u(e);const t=e?s(this,e,"readableHighWaterMark",!0):null;0===t&&(e={...e,highWaterMark:null,readableHighWaterMark:t,writableHighWaterMark:e.writableHighWaterMark||0}),o.call(this,e),this._readableState.sync=!1,this[c]=null,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function l(e){"function"!=typeof this._flush||this.destroyed?(this.push(null),e&&e()):this._flush(((t,r)=>{t?e?e(t):this.destroy(t):(null!=r&&this.push(r),this.push(null),e&&e())}))}function d(){this._final!==l&&l.call(this)}u.prototype._final=l,u.prototype._transform=function(e,t,r){throw new a("_transform()")},u.prototype._write=function(e,t,r){const n=this._readableState,i=this._writableState,a=n.length;this._transform(e,t,((e,t)=>{e?r(e):(null!=t&&this.push(t),i.ended||a===n.length||n.length{"use strict";const{SymbolAsyncIterator:n,SymbolIterator:i,SymbolFor:a}=r(51473),o=a("nodejs.stream.destroyed"),s=a("nodejs.stream.errored"),c=a("nodejs.stream.readable"),u=a("nodejs.stream.writable"),l=a("nodejs.stream.disturbed"),d=a("nodejs.webstream.isClosedPromise"),p=a("nodejs.webstream.controllerErrorFunction");function h(e,t=!1){var r;return!(!e||"function"!=typeof e.pipe||"function"!=typeof e.on||t&&("function"!=typeof e.pause||"function"!=typeof e.resume)||e._writableState&&!1===(null===(r=e._readableState)||void 0===r?void 0:r.readable)||e._writableState&&!e._readableState)}function f(e){var t;return!(!e||"function"!=typeof e.write||"function"!=typeof e.on||e._readableState&&!1===(null===(t=e._writableState)||void 0===t?void 0:t.writable))}function y(e){return e&&(e._readableState||e._writableState||"function"==typeof e.write&&"function"==typeof e.on||"function"==typeof e.pipe&&"function"==typeof e.on)}function g(e){return!(!e||y(e)||"function"!=typeof e.pipeThrough||"function"!=typeof e.getReader||"function"!=typeof e.cancel)}function m(e){return!(!e||y(e)||"function"!=typeof e.getWriter||"function"!=typeof e.abort)}function b(e){return!(!e||y(e)||"object"!=typeof e.readable||"object"!=typeof e.writable)}function v(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!!(e.destroyed||e[o]||null!=n&&n.destroyed)}function _(e){if(!f(e))return null;if(!0===e.writableEnded)return!0;const t=e._writableState;return(null==t||!t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)}function w(e,t){if(!h(e))return null;const r=e._readableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.endEmitted)?null:!!(r.endEmitted||!1===t&&!0===r.ended&&0===r.length))}function T(e){return e&&null!=e[c]?e[c]:"boolean"!=typeof(null==e?void 0:e.readable)?null:!v(e)&&h(e)&&e.readable&&!w(e)}function S(e){return e&&null!=e[u]?e[u]:"boolean"!=typeof(null==e?void 0:e.writable)?null:!v(e)&&f(e)&&e.writable&&!_(e)}function O(e){return"boolean"==typeof e._closed&&"boolean"==typeof e._defaultKeepAlive&&"boolean"==typeof e._removedConnection&&"boolean"==typeof e._removedContLen}function E(e){return"boolean"==typeof e._sent100&&O(e)}e.exports={isDestroyed:v,kIsDestroyed:o,isDisturbed:function(e){var t;return!(!e||!(null!==(t=e[l])&&void 0!==t?t:e.readableDidRead||e.readableAborted))},kIsDisturbed:l,isErrored:function(e){var t,r,n,i,a,o,c,u,l,d;return!(!e||!(null!==(t=null!==(r=null!==(n=null!==(i=null!==(a=null!==(o=e[s])&&void 0!==o?o:e.readableErrored)&&void 0!==a?a:e.writableErrored)&&void 0!==i?i:null===(c=e._readableState)||void 0===c?void 0:c.errorEmitted)&&void 0!==n?n:null===(u=e._writableState)||void 0===u?void 0:u.errorEmitted)&&void 0!==r?r:null===(l=e._readableState)||void 0===l?void 0:l.errored)&&void 0!==t?t:null===(d=e._writableState)||void 0===d?void 0:d.errored))},kIsErrored:s,isReadable:T,kIsReadable:c,kIsClosedPromise:d,kControllerErrorFunction:p,kIsWritable:u,isClosed:function(e){if(!y(e))return null;if("boolean"==typeof e.closed)return e.closed;const t=e._writableState,r=e._readableState;return"boolean"==typeof(null==t?void 0:t.closed)||"boolean"==typeof(null==r?void 0:r.closed)?(null==t?void 0:t.closed)||(null==r?void 0:r.closed):"boolean"==typeof e._closed&&O(e)?e._closed:null},isDuplexNodeStream:function(e){return!(!e||"function"!=typeof e.pipe||!e._readableState||"function"!=typeof e.on||"function"!=typeof e.write)},isFinished:function(e,t){return y(e)?!(!v(e)&&(!1!==(null==t?void 0:t.readable)&&T(e)||!1!==(null==t?void 0:t.writable)&&S(e))):null},isIterable:function(e,t){return null!=e&&(!0===t?"function"==typeof e[n]:!1===t?"function"==typeof e[i]:"function"==typeof e[n]||"function"==typeof e[i])},isReadableNodeStream:h,isReadableStream:g,isReadableEnded:function(e){if(!h(e))return null;if(!0===e.readableEnded)return!0;const t=e._readableState;return!(!t||t.errored)&&("boolean"!=typeof(null==t?void 0:t.ended)?null:t.ended)},isReadableFinished:w,isReadableErrored:function(e){var t,r;return y(e)?e.readableErrored?e.readableErrored:null!==(t=null===(r=e._readableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isNodeStream:y,isWebStream:function(e){return g(e)||m(e)||b(e)},isWritable:S,isWritableNodeStream:f,isWritableStream:m,isWritableEnded:_,isWritableFinished:function(e,t){if(!f(e))return null;if(!0===e.writableFinished)return!0;const r=e._writableState;return(null==r||!r.errored)&&("boolean"!=typeof(null==r?void 0:r.finished)?null:!!(r.finished||!1===t&&!0===r.ended&&0===r.length))},isWritableErrored:function(e){var t,r;return y(e)?e.writableErrored?e.writableErrored:null!==(t=null===(r=e._writableState)||void 0===r?void 0:r.errored)&&void 0!==t?t:null:null},isServerRequest:function(e){var t;return"boolean"==typeof e._consuming&&"boolean"==typeof e._dumped&&void 0===(null===(t=e.req)||void 0===t?void 0:t.upgradeOrConnect)},isServerResponse:E,willEmitClose:function(e){if(!y(e))return null;const t=e._writableState,r=e._readableState,n=t||r;return!n&&E(e)||!!(n&&n.autoDestroy&&n.emitClose&&!1===n.closed)},isTransformStream:b}},65605:(e,t,r)=>{const n=r(39907),{ArrayPrototypeSlice:i,Error:a,FunctionPrototypeSymbolHasInstance:o,ObjectDefineProperty:s,ObjectDefineProperties:c,ObjectSetPrototypeOf:u,StringPrototypeToLowerCase:l,Symbol:d,SymbolHasInstance:p}=r(51473);e.exports=C,C.WritableState=D;const{EventEmitter:h}=r(50046),f=r(23054).Stream,{Buffer:y}=r(1048),g=r(16527),{addAbortSignal:m}=r(21434),{getHighWaterMark:b,getDefaultHighWaterMark:v}=r(89952),{ERR_INVALID_ARG_TYPE:_,ERR_METHOD_NOT_IMPLEMENTED:w,ERR_MULTIPLE_CALLBACK:T,ERR_STREAM_CANNOT_PIPE:S,ERR_STREAM_DESTROYED:O,ERR_STREAM_ALREADY_FINISHED:E,ERR_STREAM_NULL_VALUES:x,ERR_STREAM_WRITE_AFTER_END:A,ERR_UNKNOWN_ENCODING:R}=r(52590).codes,{errorOrDestroy:I}=g;function P(){}u(C.prototype,f.prototype),u(C,f);const N=d("kOnFinished");function D(e,t,n){"boolean"!=typeof n&&(n=t instanceof r(86279)),this.objectMode=!(!e||!e.objectMode),n&&(this.objectMode=this.objectMode||!(!e||!e.writableObjectMode)),this.highWaterMark=e?b(this,e,"writableHighWaterMark",n):v(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const i=!(!e||!1!==e.decodeStrings);this.decodeStrings=!i,this.defaultEncoding=e&&e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=F.bind(void 0,t),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,j(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!e||!1!==e.emitClose,this.autoDestroy=!e||!1!==e.autoDestroy,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[N]=[]}function j(e){e.buffered=[],e.bufferedIndex=0,e.allBuffers=!0,e.allNoop=!0}function C(e){const t=this instanceof r(86279);if(!t&&!o(C,this))return new C(e);this._writableState=new D(e,this,t),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),"function"==typeof e.construct&&(this._construct=e.construct),e.signal&&m(e.signal,this)),f.call(this,e),g.construct(this,(()=>{const e=this._writableState;e.writing||V(this,e),$(this,e)}))}function M(e,t,r,i){const a=e._writableState;if("function"==typeof r)i=r,r=a.defaultEncoding;else{if(r){if("buffer"!==r&&!y.isEncoding(r))throw new R(r)}else r=a.defaultEncoding;"function"!=typeof i&&(i=P)}if(null===t)throw new x;if(!a.objectMode)if("string"==typeof t)!1!==a.decodeStrings&&(t=y.from(t,r),r="buffer");else if(t instanceof y)r="buffer";else{if(!f._isUint8Array(t))throw new _("chunk",["string","Buffer","Uint8Array"],t);t=f._uint8ArrayToBuffer(t),r="buffer"}let o;return a.ending?o=new A:a.destroyed&&(o=new O("write")),o?(n.nextTick(i,o),I(e,o,!0),o):(a.pendingcb++,function(e,t,r,n,i){const a=t.objectMode?1:r.length;t.length+=a;const o=t.lengthr.bufferedIndex&&V(e,r),i?null!==r.afterWriteTickInfo&&r.afterWriteTickInfo.cb===a?r.afterWriteTickInfo.count++:(r.afterWriteTickInfo={count:1,cb:a,stream:e,state:r},n.nextTick(B,r.afterWriteTickInfo)):U(e,r,1,a))):I(e,new T)}function B({stream:e,state:t,count:r,cb:n}){return t.afterWriteTickInfo=null,U(e,t,r,n)}function U(e,t,r,n){for(!t.ending&&!e.destroyed&&0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"));r-- >0;)t.pendingcb--,n();t.destroyed&&q(t),$(e,t)}function q(e){if(e.writing)return;for(let r=e.bufferedIndex;r1&&e._writev){t.pendingcb-=o-1;const n=t.allNoop?P:e=>{for(let t=s;t256?(r.splice(0,s),t.bufferedIndex=0):t.bufferedIndex=s}t.bufferProcessing=!1}function Q(e){return e.ending&&!e.destroyed&&e.constructed&&0===e.length&&!e.errored&&0===e.buffered.length&&!e.finished&&!e.writing&&!e.errorEmitted&&!e.closeEmitted}function $(e,t,r){Q(t)&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.finalCalled=!0,function(e,t){let r=!1;function i(i){if(r)I(e,null!=i?i:T());else if(r=!0,t.pendingcb--,i){const r=t[N].splice(0);for(let e=0;e{Q(t)?H(e,t):t.pendingcb--}),e,t)):Q(t)&&(t.pendingcb++,H(e,t))))}function H(e,t){t.pendingcb--,t.finished=!0;const r=t[N].splice(0);for(let e=0;e{"use strict";const{ArrayIsArray:n,ArrayPrototypeIncludes:i,ArrayPrototypeJoin:a,ArrayPrototypeMap:o,NumberIsInteger:s,NumberIsNaN:c,NumberMAX_SAFE_INTEGER:u,NumberMIN_SAFE_INTEGER:l,NumberParseInt:d,ObjectPrototypeHasOwnProperty:p,RegExpPrototypeExec:h,String:f,StringPrototypeToUpperCase:y,StringPrototypeTrim:g}=r(51473),{hideStackFrames:m,codes:{ERR_SOCKET_BAD_PORT:b,ERR_INVALID_ARG_TYPE:v,ERR_INVALID_ARG_VALUE:_,ERR_OUT_OF_RANGE:w,ERR_UNKNOWN_SIGNAL:T}}=r(52590),{normalizeEncoding:S}=r(46609),{isAsyncFunction:O,isArrayBufferView:E}=r(46609).types,x={},A=/^[0-7]+$/,R=m(((e,t,r=l,n=u)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!s(e))throw new w(t,"an integer",e);if(en)throw new w(t,`>= ${r} && <= ${n}`,e)})),I=m(((e,t,r=-2147483648,n=2147483647)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!s(e))throw new w(t,"an integer",e);if(en)throw new w(t,`>= ${r} && <= ${n}`,e)})),P=m(((e,t,r=!1)=>{if("number"!=typeof e)throw new v(t,"number",e);if(!s(e))throw new w(t,"an integer",e);const n=r?1:0,i=4294967295;if(ei)throw new w(t,`>= ${n} && <= ${i}`,e)}));function N(e,t){if("string"!=typeof e)throw new v(t,"string",e)}const D=m(((e,t,r)=>{if(!i(r,e)){const n=a(o(r,(e=>"string"==typeof e?`'${e}'`:f(e))),", ");throw new _(t,e,"must be one of: "+n)}}));function j(e,t){if("boolean"!=typeof e)throw new v(t,"boolean",e)}function C(e,t,r){return null!=e&&p(e,t)?e[t]:r}const M=m(((e,t,r=null)=>{const i=C(r,"allowArray",!1),a=C(r,"allowFunction",!1);if(!C(r,"nullable",!1)&&null===e||!i&&n(e)||"object"!=typeof e&&(!a||"function"!=typeof e))throw new v(t,"Object",e)})),L=m(((e,t)=>{if(null!=e&&"object"!=typeof e&&"function"!=typeof e)throw new v(t,"a dictionary",e)})),k=m(((e,t,r=0)=>{if(!n(e))throw new v(t,"Array",e);if(e.length{if(!E(e))throw new v(t,["Buffer","TypedArray","DataView"],e)})),B=m(((e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new v(t,"AbortSignal",e)})),U=m(((e,t)=>{if("function"!=typeof e)throw new v(t,"Function",e)})),q=m(((e,t)=>{if("function"!=typeof e||O(e))throw new v(t,"Function",e)})),V=m(((e,t)=>{if(void 0!==e)throw new v(t,"undefined",e)})),Q=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function $(e,t){if(void 0===e||!h(Q,e))throw new _(t,e,'must be an array or string of format "; rel=preload; as=style"')}e.exports={isInt32:function(e){return e===(0|e)},isUint32:function(e){return e===e>>>0},parseFileMode:function(e,t,r){if(void 0===e&&(e=r),"string"==typeof e){if(null===h(A,e))throw new _(t,e,"must be a 32-bit unsigned integer or an octal string");e=d(e,8)}return P(e,t),e},validateArray:k,validateStringArray:function(e,t){k(e,t);for(let r=0;rn||(null!=r||null!=n)&&c(e))throw new w(t,`${null!=r?`>= ${r}`:""}${null!=r&&null!=n?" && ":""}${null!=n?`<= ${n}`:""}`,e)},validateObject:M,validateOneOf:D,validatePlainFunction:q,validatePort:function(e,t="Port",r=!0){if("number"!=typeof e&&"string"!=typeof e||"string"==typeof e&&0===g(e).length||+e!=+e>>>0||e>65535||0===e&&!r)throw new b(t,e,r);return 0|e},validateSignalName:function(e,t="signal"){if(N(e,t),void 0===x[e]){if(void 0!==x[y(e)])throw new T(e+" (signals must use all capital letters)");throw new T(e)}},validateString:N,validateUint32:P,validateUndefined:V,validateUnion:function(e,t,r){if(!i(r,e))throw new v(t,`('${a(r,"|")}')`,e)},validateAbortSignal:B,validateLinkHeaderValue:function(e){if("string"==typeof e)return $(e,"hints"),e;if(n(e)){const t=e.length;let r="";if(0===t)return r;for(let n=0;n; rel=preload; as=style"')}}},58521:(e,t,r)=>{"use strict";const n=r(50601),i=r(2010),a=n.Readable.destroy;e.exports=n.Readable,e.exports._uint8ArrayToBuffer=n._uint8ArrayToBuffer,e.exports._isUint8Array=n._isUint8Array,e.exports.isDisturbed=n.isDisturbed,e.exports.isErrored=n.isErrored,e.exports.isReadable=n.isReadable,e.exports.Readable=n.Readable,e.exports.Writable=n.Writable,e.exports.Duplex=n.Duplex,e.exports.Transform=n.Transform,e.exports.PassThrough=n.PassThrough,e.exports.addAbortSignal=n.addAbortSignal,e.exports.finished=n.finished,e.exports.destroy=n.destroy,e.exports.destroy=a,e.exports.pipeline=n.pipeline,e.exports.compose=n.compose,Object.defineProperty(n,"promises",{configurable:!0,enumerable:!0,get:()=>i}),e.exports.Stream=n.Stream,e.exports.default=e.exports},52590:(e,t,r)=>{"use strict";const{format:n,inspect:i,AggregateError:a}=r(46609),o=globalThis.AggregateError||a,s=Symbol("kIsNodeError"),c=["string","function","number","object","Function","Object","boolean","bigint","symbol"],u=/^([A-Z][a-z0-9]*)+$/,l={};function d(e,t){if(!e)throw new l.ERR_INTERNAL_ASSERTION(t)}function p(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 h(e,t,r){r||(r=Error);class i extends r{constructor(...r){super(function(e,t,r){if("function"==typeof t)return d(t.length<=r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${t.length}).`),t(...r);const i=(t.match(/%[dfijoOs]/g)||[]).length;return d(i===r.length,`Code: ${e}; The provided arguments length (${r.length}) does not match the required ones (${i}).`),0===r.length?t:n(t,...r)}(e,t,r))}toString(){return`${this.name} [${e}]: ${this.message}`}}Object.defineProperties(i.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${e}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),i.prototype.code=e,i.prototype[s]=!0,l[e]=i}function f(e){const t="__node_internal_"+e.name;return Object.defineProperty(e,"name",{value:t}),e}class y extends Error{constructor(e="The operation was aborted",t=void 0){if(void 0!==t&&"object"!=typeof t)throw new l.ERR_INVALID_ARG_TYPE("options","Object",t);super(e,t),this.code="ABORT_ERR",this.name="AbortError"}}h("ERR_ASSERTION","%s",Error),h("ERR_INVALID_ARG_TYPE",((e,t,r)=>{d("string"==typeof e,"'name' must be a string"),Array.isArray(t)||(t=[t]);let n="The ";e.endsWith(" argument")?n+=`${e} `:n+=`"${e}" ${e.includes(".")?"property":"argument"} `,n+="must be ";const a=[],o=[],s=[];for(const e of t)d("string"==typeof e,"All expected entries have to be of type string"),c.includes(e)?a.push(e.toLowerCase()):u.test(e)?o.push(e):(d("object"!==e,'The value "object" should be written as "Object"'),s.push(e));if(o.length>0){const e=a.indexOf("object");-1!==e&&(a.splice(a,e,1),o.push("Object"))}if(a.length>0){switch(a.length){case 1:n+=`of type ${a[0]}`;break;case 2:n+=`one of type ${a[0]} or ${a[1]}`;break;default:{const e=a.pop();n+=`one of type ${a.join(", ")}, or ${e}`}}(o.length>0||s.length>0)&&(n+=" or ")}if(o.length>0){switch(o.length){case 1:n+=`an instance of ${o[0]}`;break;case 2:n+=`an instance of ${o[0]} or ${o[1]}`;break;default:{const e=o.pop();n+=`an instance of ${o.join(", ")}, or ${e}`}}s.length>0&&(n+=" or ")}switch(s.length){case 0:break;case 1:s[0].toLowerCase()!==s[0]&&(n+="an "),n+=`${s[0]}`;break;case 2:n+=`one of ${s[0]} or ${s[1]}`;break;default:{const e=s.pop();n+=`one of ${s.join(", ")}, or ${e}`}}if(null==r)n+=`. Received ${r}`;else if("function"==typeof r&&r.name)n+=`. Received function ${r.name}`;else if("object"==typeof r){var l;null!==(l=r.constructor)&&void 0!==l&&l.name?n+=`. Received an instance of ${r.constructor.name}`:n+=`. Received ${i(r,{depth:-1})}`}else{let e=i(r,{colors:!1});e.length>25&&(e=`${e.slice(0,25)}...`),n+=`. Received type ${typeof r} (${e})`}return n}),TypeError),h("ERR_INVALID_ARG_VALUE",((e,t,r="is invalid")=>{let n=i(t);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${e.includes(".")?"property":"argument"} '${e}' ${r}. Received ${n}`}),TypeError),h("ERR_INVALID_RETURN_VALUE",((e,t,r)=>{var n;return`Expected ${e} to be returned from the "${t}" function but got ${null!=r&&null!==(n=r.constructor)&&void 0!==n&&n.name?`instance of ${r.constructor.name}`:"type "+typeof r}.`}),TypeError),h("ERR_MISSING_ARGS",((...e)=>{let t;d(e.length>0,"At least one arg needs to be specified");const r=e.length;switch(e=(Array.isArray(e)?e:[e]).map((e=>`"${e}"`)).join(" or "),r){case 1:t+=`The ${e[0]} argument`;break;case 2:t+=`The ${e[0]} and ${e[1]} arguments`;break;default:{const r=e.pop();t+=`The ${e.join(", ")}, and ${r} arguments`}}return`${t} must be specified`}),TypeError),h("ERR_OUT_OF_RANGE",((e,t,r)=>{let n;return d(t,'Missing "range" argument'),Number.isInteger(r)&&Math.abs(r)>2**32?n=p(String(r)):"bigint"==typeof r?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=p(n)),n+="n"):n=i(r),`The value of "${e}" is out of range. It must be ${t}. Received ${n}`}),RangeError),h("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error),h("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error),h("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error),h("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error),h("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error),h("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),h("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error),h("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error),h("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error),h("ERR_STREAM_WRITE_AFTER_END","write after end",Error),h("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError),e.exports={AbortError:y,aggregateTwoErrors:f((function(e,t){if(e&&t&&e!==t){if(Array.isArray(t.errors))return t.errors.push(e),t;const r=new o([t,e],t.message);return r.code=t.code,r}return e||t})),hideStackFrames:f,codes:l}},51473:e=>{"use strict";e.exports={ArrayIsArray:e=>Array.isArray(e),ArrayPrototypeIncludes:(e,t)=>e.includes(t),ArrayPrototypeIndexOf:(e,t)=>e.indexOf(t),ArrayPrototypeJoin:(e,t)=>e.join(t),ArrayPrototypeMap:(e,t)=>e.map(t),ArrayPrototypePop:(e,t)=>e.pop(t),ArrayPrototypePush:(e,t)=>e.push(t),ArrayPrototypeSlice:(e,t,r)=>e.slice(t,r),Error,FunctionPrototypeCall:(e,t,...r)=>e.call(t,...r),FunctionPrototypeSymbolHasInstance:(e,t)=>Function.prototype[Symbol.hasInstance].call(e,t),MathFloor:Math.floor,Number,NumberIsInteger:Number.isInteger,NumberIsNaN:Number.isNaN,NumberMAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER,NumberMIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER,NumberParseInt:Number.parseInt,ObjectDefineProperties:(e,t)=>Object.defineProperties(e,t),ObjectDefineProperty:(e,t,r)=>Object.defineProperty(e,t,r),ObjectGetOwnPropertyDescriptor:(e,t)=>Object.getOwnPropertyDescriptor(e,t),ObjectKeys:e=>Object.keys(e),ObjectSetPrototypeOf:(e,t)=>Object.setPrototypeOf(e,t),Promise,PromisePrototypeCatch:(e,t)=>e.catch(t),PromisePrototypeThen:(e,t,r)=>e.then(t,r),PromiseReject:e=>Promise.reject(e),PromiseResolve:e=>Promise.resolve(e),ReflectApply:Reflect.apply,RegExpPrototypeTest:(e,t)=>e.test(t),SafeSet:Set,String,StringPrototypeSlice:(e,t,r)=>e.slice(t,r),StringPrototypeToLowerCase:e=>e.toLowerCase(),StringPrototypeToUpperCase:e=>e.toUpperCase(),StringPrototypeTrim:e=>e.trim(),Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,SymbolDispose:Symbol.dispose||Symbol("Symbol.dispose"),SymbolAsyncDispose:Symbol.asyncDispose||Symbol("Symbol.asyncDispose"),TypedArrayPrototypeSet:(e,t,r)=>e.set(t,r),Boolean,Uint8Array}},46609:(e,t,r)=>{"use strict";const n=r(1048),{kResistStopPropagation:i,SymbolDispose:a}=r(51473),o=globalThis.AbortSignal||r(67083).AbortSignal,s=globalThis.AbortController||r(67083).AbortController,c=Object.getPrototypeOf((async function(){})).constructor,u=globalThis.Blob||n.Blob,l=void 0!==u?function(e){return e instanceof u}:function(e){return!1},d=(e,t)=>{if(void 0!==e&&(null===e||"object"!=typeof e||!("aborted"in e)))throw new ERR_INVALID_ARG_TYPE(t,"AbortSignal",e)};class p extends Error{constructor(e){if(!Array.isArray(e))throw new TypeError("Expected input to be an Array, got "+typeof e);let t="";for(let r=0;r{e=r,t=n})),resolve:e,reject:t}},promisify:e=>new Promise(((t,r)=>{e(((e,...n)=>e?r(e):t(...n)))})),debuglog:()=>function(){},format:(e,...t)=>e.replace(/%([sdifj])/g,(function(...[e,r]){const n=t.shift();return"f"===r?n.toFixed(6):"j"===r?JSON.stringify(n):"s"===r&&"object"==typeof n?`${n.constructor!==Object?n.constructor.name:""} {}`.trim():n.toString()})),inspect(e){switch(typeof e){case"string":if(e.includes("'")){if(!e.includes('"'))return`"${e}"`;if(!e.includes("`")&&!e.includes("${"))return`\`${e}\``}return`'${e}'`;case"number":return isNaN(e)?"NaN":Object.is(e,-0)?String(e):e;case"bigint":return`${String(e)}n`;case"boolean":case"undefined":return String(e);case"object":return"{}"}},types:{isAsyncFunction:e=>e instanceof c,isArrayBufferView:e=>ArrayBuffer.isView(e)},isBlob:l,deprecate:(e,t)=>e,addAbortListener:r(50046).addAbortListener||function(e,t){if(void 0===e)throw new ERR_INVALID_ARG_TYPE("signal","AbortSignal",e);let r;return d(e,"signal"),((e,t)=>{if("function"!=typeof e)throw new ERR_INVALID_ARG_TYPE("listener","Function",e)})(t),e.aborted?queueMicrotask((()=>t())):(e.addEventListener("abort",t,{__proto__:null,once:!0,[i]:!0}),r=()=>{e.removeEventListener("abort",t)}),{__proto__:null,[a](){var e;null===(e=r)||void 0===e||e()}}},AbortSignalAny:o.any||function(e){if(1===e.length)return e[0];const t=new s,r=()=>t.abort();return e.forEach((e=>{d(e,"signals"),e.addEventListener("abort",r,{once:!0})})),t.signal.addEventListener("abort",(()=>{e.forEach((e=>e.removeEventListener("abort",r)))}),{once:!0}),t.signal}},e.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")},50601:(e,t,r)=>{const{Buffer:n}=r(1048),{ObjectDefineProperty:i,ObjectKeys:a,ReflectApply:o}=r(51473),{promisify:{custom:s}}=r(46609),{streamReturningOperators:c,promiseReturningOperators:u}=r(64708),{codes:{ERR_ILLEGAL_CONSTRUCTOR:l}}=r(52590),d=r(67369),{setDefaultHighWaterMark:p,getDefaultHighWaterMark:h}=r(89952),{pipeline:f}=r(16815),{destroyer:y}=r(16527),g=r(94869),m=r(2010),b=r(92520),v=e.exports=r(23054).Stream;v.isDestroyed=b.isDestroyed,v.isDisturbed=b.isDisturbed,v.isErrored=b.isErrored,v.isReadable=b.isReadable,v.isWritable=b.isWritable,v.Readable=r(11509);for(const T of a(c)){const S=c[T];function _(...e){if(new.target)throw l();return v.Readable.from(o(S,this,e))}i(_,"name",{__proto__:null,value:S.name}),i(_,"length",{__proto__:null,value:S.length}),i(v.Readable.prototype,T,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}for(const O of a(u)){const E=u[O];function _(...e){if(new.target)throw l();return o(E,this,e)}i(_,"name",{__proto__:null,value:E.name}),i(_,"length",{__proto__:null,value:E.length}),i(v.Readable.prototype,O,{__proto__:null,value:_,enumerable:!1,configurable:!0,writable:!0})}v.Writable=r(65605),v.Duplex=r(86279),v.Transform=r(32073),v.PassThrough=r(76587),v.pipeline=f;const{addAbortSignal:w}=r(21434);v.addAbortSignal=w,v.finished=g,v.destroy=y,v.compose=d,v.setDefaultHighWaterMark=p,v.getDefaultHighWaterMark=h,i(v,"promises",{__proto__:null,configurable:!0,enumerable:!0,get:()=>m}),i(f,s,{__proto__:null,enumerable:!0,get:()=>m.pipeline}),i(g,s,{__proto__:null,enumerable:!0,get:()=>m.finished}),v.Stream=v,v._isUint8Array=function(e){return e instanceof Uint8Array},v._uint8ArrayToBuffer=function(e){return n.from(e.buffer,e.byteOffset,e.byteLength)}},2010:(e,t,r)=>{"use strict";const{ArrayPrototypePop:n,Promise:i}=r(51473),{isIterable:a,isNodeStream:o,isWebStream:s}=r(92520),{pipelineImpl:c}=r(16815),{finished:u}=r(94869);r(50601),e.exports={finished:u,pipeline:function(...e){return new i(((t,r)=>{let i,u;const l=e[e.length-1];if(l&&"object"==typeof l&&!o(l)&&!a(l)&&!s(l)){const t=n(e);i=t.signal,u=t.end}c(e,((e,n)=>{e?r(e):t(n)}),{signal:i,end:u})}))}}},9929: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(29365),t)},29365:(e,t)=>{"use strict";function r(e){const t=[];let r=0;for(;re.join(""))).join("/")}function n(e,t){let n=t+1;t>=0?"/"===e[t+1]&&"/"===e[t+2]&&(n=t+3):"/"===e[0]&&"/"===e[1]&&(n=2);const i=e.indexOf("/",n);return i<0?e:e.substr(0,i)+r(e.substr(i))}function i(e){return!e||"#"===e||"?"===e||"/"===e}Object.defineProperty(t,"__esModule",{value:!0}),t.removeDotSegmentsOfPath=t.removeDotSegments=t.resolve=void 0,t.resolve=function(e,t){const i=(t=t||"").indexOf("#");if(i>0&&(t=t.substr(0,i)),!e.length){if(t.indexOf(":")<0)throw new Error(`Found invalid baseIRI '${t}' for value '${e}'`);return t}if(e.startsWith("?")){const r=t.indexOf("?");return r>0&&(t=t.substr(0,r)),t+e}if(e.startsWith("#"))return t+e;if(!t.length){const t=e.indexOf(":");if(t<0)throw new Error(`Found invalid relative IRI '${e}' for a missing baseIRI`);return n(e,t)}const a=e.indexOf(":");if(a>=0)return n(e,a);const o=t.indexOf(":");if(o<0)throw new Error(`Found invalid baseIRI '${t}' for value '${e}'`);const s=t.substr(0,o+1);if(0===e.indexOf("//"))return s+n(e,a);let c;if(t.indexOf("//",o)===o+1){if(c=t.indexOf("/",o+3),c<0)return t.length>o+3?t+"/"+n(e,a):s+n(e,a)}else if(c=t.indexOf("/",o+1),c<0)return s+n(e,a);if(0===e.indexOf("/"))return t.substr(0,c)+r(e);let u=t.substr(c);const l=u.lastIndexOf("/");return l>=0&&l{var n=r(1048),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.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},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},21925:e=>{var t=function(){var e=function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},t=[7,12,13,14,15,16,20,25,115,130],r=[7,13,16,20,25,115,130],n=[7,13,16,115,130],i=[1,25],a=[1,29],o=[1,27],s=[1,28],c=[13,16,115,130],u=[13,16,28,38,40,42,44,46,48,53,56,61,67,85,87,92,93,95,96,102,110,111,115,119,120,126,128,129,130,131,132,133,134,135,136],l=[28,56],d=[1,42],p=[46,48,53,56],h=[1,54],f=[1,60],y=[1,56],g=[1,57],m=[1,58],b=[1,63],v=[1,64],_=[1,65],w=[1,66],T=[1,67],S=[1,68],O=[1,75],E=[28,46,48,53,56],x=[28,42,46,48,53,56],A=[13,16,28,38,40,42,44,46,48,53,56,92,115,119,120,130,131,132,133,134,135,136],R=[13,16,28,38,40,42,44,46,48,53,56,67,85,87,92,95,96,115,119,120,126,128,129,130,131,132,133,134,135,136],I=[13,16,38,40,44,92,115,119,120,130,131,132,133,134,135,136],P=[13,16,28,38,40,42,44,46,48,53,56,67,85,87,92,95,96,115,117,118,119,120,126,128,129,130,131,132,133,134,135,136],N=[13,16,28,56,115,130],D=[13,16,38,58,87,96,109,115,126,130],j=[1,116],C=[1,112],M=[1,108],L=[1,114],k=[1,111],F=[7,13,16,20,25,44,48,53,56,67,85,87,95,96,115,128,129,130],B=[48,53],U=[48,53,87,96,126],q=[13,16,44,48,53,56,85,87,95,96,115,128,129,130],V=[1,126],Q=[13,16,40,44,48,53,56,85,87,95,96,115,128,129,130],$=[1,129],H=[48,53,67,87,96,126],G=[13,16,40,44,48,53,56,67,85,87,95,96,115,128,129,130],z=[1,133],K=[13,16,40,44,48,53,56,67,85,87,95,96,102,115,128,129,130],X=[13,16,40,44,48,53,56,67,85,87,93,95,96,102,110,111,115,128,129,130],J=[1,151],W=[1,153],Y=[1,156],Z=[1,157],ee=[1,158],te=[1,167],re=[1,175],ne=[13,16,44,48,53,56,67,85,87,95,96,115,128,129,130],ie=[13,16,44,48,53,56,67,85,87,95,96,115,126,128,129,130],ae=[13,16,46,92,115,119,120,130,131,132,133,134,135,136],oe={trace:function(){},yy:{},symbols_:{error:2,shaclDoc:3,shaclDoc_repetition0:4,shaclDoc_repetition1:5,ttlSection:6,EOF:7,directive:8,baseDecl:9,importsDecl:10,prefixDecl:11,KW_BASE:12,IRIREF:13,KW_IMPORTS:14,KW_PREFIX:15,PNAME_NS:16,nodeShapeIri:17,iri:18,nodeShape:19,KW_SHAPE:20,nodeShape_option0:21,nodeShape_option1:22,nodeShapeBody:23,shapeClass:24,KW_SHAPE_CLASS:25,shapeClass_option0:26,turtleAnnotation:27,";":28,turtleAnnotation2:29,predicate:30,turtleAnnotation2_option0:31,objectList:32,object:33,objectList_repetition0:34,iriOrLiteral:35,blankNodeSection:36,list:37,"(":38,list_repetition0:39,")":40,objectTail:41,",":42,LB:43,"[":44,RB:45,"]":46,LP:47,"%":48,RP:49,pcSection:50,iriHead:51,ttlStatement:52,".":53,ttlSection_repetition0:54,startNodeShape:55,"{":56,endNodeShape:57,"}":58,nodeShapeBody_repetition0:59,targetClass:60,"->":61,targetClass_repetition_plus0:62,constraint:63,constraint_group0:64,constraint_option0:65,orNotComponent:66,"|":67,nodeNot:68,nodeOrEmit:69,nodeOr:70,nodeOr_repetition_plus0:71,nodeValue:72,negation:73,nodeValue_group0:74,"=":75,iriOrLiteralOrArray:76,propertyShape:77,path:78,propertyShape_repetition0:79,propertyOrComponent:80,propertyNot:81,propertyOr:82,propertyOr_repetition_plus0:83,propertyAtom:84,NODEKIND:85,shapeRef:86,PARAM:87,propertyCount:88,propertyMinCount:89,"..":90,propertyMaxCount:91,INTEGER:92,"*":93,shapeRef_group0:94,"@":95,"!":96,pathAlternative:97,additionalAlternative:98,pathSequence:99,pathAlternative_repetition_plus0:100,additionalSequence:101,"/":102,pathEltOrInverse:103,pathSequence_repetition_plus0:104,pathElt:105,pathPrimary:106,pathMod:107,pathInverse:108,"^":109,"?":110,"+":111,iriOrLiteralOrArray_repetition0:112,literal:113,iri_group0:114,a:115,string:116,LANGTAG:117,"^^":118,DECIMAL:119,DOUBLE:120,literal_group0:121,string_group0:122,string_group1:123,shaclDoc_repetition1_group0:124,constraint_group0_repetition_plus0:125,TARGET:126,propertyShape_repetition0_group0:127,ATPNAME_LN:128,ATPNAME_NS:129,PNAME_LN:130,KW_TRUE:131,KW_FALSE:132,STRING_LITERAL1:133,STRING_LITERAL2:134,STRING_LITERAL_LONG1:135,STRING_LITERAL_LONG2:136,$accept:0,$end:1},terminals_:{2:"error",7:"EOF",12:"KW_BASE",13:"IRIREF",14:"KW_IMPORTS",15:"KW_PREFIX",16:"PNAME_NS",20:"KW_SHAPE",25:"KW_SHAPE_CLASS",28:";",38:"(",40:")",42:",",44:"[",46:"]",48:"%",53:".",56:"{",58:"}",61:"->",67:"|",75:"=",85:"NODEKIND",87:"PARAM",90:"..",92:"INTEGER",93:"*",95:"@",96:"!",102:"/",109:"^",110:"?",111:"+",115:"a",117:"LANGTAG",118:"^^",119:"DECIMAL",120:"DOUBLE",126:"TARGET",128:"ATPNAME_LN",129:"ATPNAME_NS",130:"PNAME_LN",131:"KW_TRUE",132:"KW_FALSE",133:"STRING_LITERAL1",134:"STRING_LITERAL2",135:"STRING_LITERAL_LONG1",136:"STRING_LITERAL_LONG2"},productions_:[0,[3,4],[8,1],[8,1],[8,1],[9,2],[10,2],[11,3],[17,1],[19,5],[24,4],[27,2],[29,2],[30,2],[32,2],[33,1],[33,1],[33,1],[37,3],[41,2],[43,1],[45,1],[36,3],[47,1],[49,1],[50,3],[51,1],[52,3],[6,1],[55,1],[57,1],[23,3],[60,2],[63,3],[66,2],[69,1],[70,1],[70,2],[68,1],[68,2],[72,3],[77,2],[80,2],[82,1],[82,2],[81,1],[81,2],[84,1],[84,1],[84,1],[84,3],[84,1],[88,5],[89,1],[91,1],[91,1],[86,1],[86,2],[73,1],[78,1],[98,2],[97,1],[97,2],[101,2],[99,1],[99,2],[105,1],[105,2],[103,1],[103,2],[108,1],[107,1],[107,1],[107,1],[106,1],[106,3],[76,1],[76,3],[35,1],[35,1],[18,1],[18,1],[18,1],[113,1],[113,2],[113,3],[113,1],[113,1],[113,1],[113,1],[116,1],[116,1],[4,0],[4,2],[124,1],[124,1],[5,0],[5,2],[21,0],[21,1],[22,0],[22,1],[26,0],[26,1],[31,0],[31,1],[34,0],[34,2],[39,0],[39,2],[54,0],[54,2],[59,0],[59,2],[62,1],[62,2],[125,1],[125,2],[64,1],[64,1],[65,0],[65,1],[71,1],[71,2],[74,1],[74,1],[127,1],[127,1],[79,0],[79,2],[83,1],[83,2],[94,1],[94,1],[100,1],[100,2],[104,1],[104,2],[112,0],[112,2],[114,1],[114,1],[121,1],[121,1],[122,1],[122,1],[123,1],[123,1]],performAction:function(e,t,r,n,i,a,o){var s,c,u=a.length-1;switch(i){case 1:this.$=Re(De.factory.namedNode(Te("")),De.factory.namedNode(ce),De.factory.namedNode(be+"Ontology"));break;case 5:De.base=De.factory.namedNode(a[u].slice(1,-1)),De.n3Parser._setBase(De.base.value);break;case 6:this.$=Re(De.base,De.factory.namedNode(be+"imports"),De.factory.namedNode(a[u].slice(1,-1)));break;case 7:this.$=De.prefixes[a[u-1].substr(0,a[u-1].length-1)]=Te(a[u]);break;case 8:De.nodeShapeStack=!1,Re(De.currentNodeShape=a[u],De.factory.namedNode(ce),De.factory.namedNode(me+"NodeShape"));break;case 10:this.$=Re(De.currentNodeShape,De.factory.namedNode(ce),De.factory.namedNode(ve+"Class"));break;case 11:this.$=Pe();break;case 13:this.$=a[u].forEach((e=>Re(De.currentNodeShape,a[u-1],e)));break;case 14:this.$=[a[u-1],...a[u]];break;case 18:this.$=we(a[u-1],!0);break;case 19:case 34:case 42:case 60:case 63:this.$=a[u];break;case 20:De.tempCurrentNodeShape=De.currentNodeShape,this.$=De.currentNodeShape=Ee();break;case 21:case 24:De.currentNodeShape=De.tempCurrentNodeShape;break;case 22:case 31:this.$=a[u-2];break;case 23:De.tempCurrentNodeShape=De.currentNodeShape,De.currentNodeShape=De.currentPropertyNode;break;case 26:De.currentNodeShape=a[u];break;case 29:De.nodeShapeStack?(De.nodeShapeStack.push(De.currentNodeShape),Re(De.currentPropertyNode,De.factory.namedNode(me+"node"),De.currentNodeShape=Ee())):De.nodeShapeStack=[],this.$=De.currentNodeShape;break;case 30:De.nodeShapeStack.length>0&&(De.currentNodeShape=De.nodeShapeStack.pop());break;case 32:this.$=a[u].forEach((e=>{Re(De.currentNodeShape,De.factory.namedNode(me+"targetClass"),e)}));break;case 35:this.$=Re(De.currentNodeShape,De.factory.namedNode(me+a[u][0]),a[u][1]);break;case 36:break;case 37:const e=we([a[u-1],...a[u]].map((e=>{const t=Ee();return Re(t,De.factory.namedNode(me+e[0]),e[1]),t})));this.$=["or",e];break;case 39:case 46:this.$=function(e,t,r){const n=Ee();return Re(n,De.factory.namedNode(me+t),r),[e,n]}("not",...a[u]);break;case 40:case 50:this.$=[a[u-2],a[u]];break;case 43:this.$=a[u]&&Ie(...a[u]);break;case 44:this.$=Ie("or",we([a[u-1],...a[u]].map((e=>{const t=Ee();return Re(t,De.factory.namedNode(me+e[0]),e[1]),t}))));break;case 47:this.$=[_e[a[u].value]?"datatype":"class",a[u]];break;case 48:this.$=["nodeKind",De.factory.namedNode(me+a[u])];break;case 49:this.$=["node",De.factory.namedNode(a[u])];break;case 51:this.$=void 0;break;case 53:this.$=a[u]>0&&Ie("minCount",Oe(a[u],he));break;case 54:this.$=Ie("maxCount",Oe(a[u],he));break;case 56:this.$=Se(a[u].slice(1));break;case 57:this.$=Te(a[u]);break;case 59:Re(De.currentNodeShape,De.factory.namedNode(me+"property"),De.currentPropertyNode=Ee()),Ie("path",a[u]);break;case 62:const t=Ee();Re(t,De.factory.namedNode(me+"alternativePath"),we([a[u-1],...a[u]])),this.$=t;break;case 65:this.$=we([a[u-1],...a[u]]);break;case 67:Re(this.$=Ee(),De.factory.namedNode(me+a[u]),a[u-1]);break;case 69:Re(this.$=Ee(),De.factory.namedNode(me+"inversePath"),a[u]);break;case 71:this.$="zeroOrOnePath";break;case 72:this.$="zeroOrMorePath";break;case 73:this.$="oneOrMorePath";break;case 75:this.$=a[u-1];break;case 77:this.$=we(a[u-1]);break;case 80:this.$=De.factory.namedNode(Te(a[u]));break;case 81:this.$=De.factory.namedNode(Se(a[u]));break;case 82:this.$=Pe(De.factory.namedNode(ce));break;case 83:this.$=Oe(a[u]);break;case 84:this.$=(s=a[u-1],c=lowercase(a[u].substr(1)),De.factory.literal(s,c));break;case 85:this.$=Oe(a[u-2],a[u]);break;case 86:this.$=Oe(a[u],he);break;case 87:this.$=Oe(a[u],fe);break;case 88:this.$=Oe(a[u].toLowerCase(),ye);break;case 89:this.$=Oe(a[u].toLowerCase(),ge);break;case 90:this.$=Ae(a[u],1);break;case 91:this.$=Ae(a[u],3);break;case 92:case 96:case 106:case 108:case 110:case 112:case 128:case 138:this.$=[];break;case 93:case 97:case 107:case 109:case 111:case 113:case 115:case 117:case 123:case 129:case 131:case 135:case 137:case 139:a[u-1].push(a[u]);break;case 114:case 116:case 122:case 130:case 134:case 136:this.$=[a[u]]}},table:[e(t,[2,92],{3:1,4:2}),{1:[3]},e(r,[2,96],{5:3,8:4,9:5,10:6,11:7,12:[1,8],14:[1,9],15:[1,10]}),e(n,[2,110],{6:11,124:12,54:13,19:14,24:15,20:[1,16],25:[1,17]}),e(t,[2,93]),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{13:[1,18]},{13:[1,19]},{16:[1,20]},{7:[1,21]},e(r,[2,97]),{7:[2,28],13:i,16:a,18:24,51:23,52:22,114:26,115:o,130:s},e(r,[2,94]),e(r,[2,95]),{13:i,16:a,17:30,18:31,114:26,115:o,130:s},{13:i,16:a,17:32,18:31,114:26,115:o,130:s},e(t,[2,5]),e(t,[2,6]),{13:[1,33]},{1:[2,1]},e(n,[2,111]),{13:i,16:a,18:36,29:34,30:35,114:26,115:o,130:s},e(c,[2,26]),e(u,[2,80]),e(u,[2,81]),e(u,[2,82]),e(u,[2,140]),e(u,[2,141]),e(l,[2,98],{21:37,60:38,61:[1,39]}),e([28,56,61],[2,8]),{26:40,27:41,28:d,56:[2,102]},e(t,[2,7]),{53:[1,43]},e(p,[2,104],{31:44,27:45,28:d}),{13:i,16:a,18:51,32:46,33:47,35:48,36:49,37:50,38:h,43:53,44:f,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},{22:69,27:70,28:d,56:[2,100]},e(l,[2,99]),{13:i,16:a,18:72,62:71,114:26,115:o,130:s},{23:73,55:74,56:O},{56:[2,103]},{13:i,16:a,18:36,29:76,30:35,114:26,115:o,130:s},e(n,[2,27]),e(p,[2,12]),e(p,[2,105]),e(E,[2,13]),e(x,[2,106],{34:77}),e(A,[2,15]),e(A,[2,16]),e(A,[2,17]),e(R,[2,78]),e(R,[2,79]),{13:i,16:a,18:36,29:78,30:35,114:26,115:o,130:s},e(I,[2,108],{39:79}),e(R,[2,83],{117:[1,80],118:[1,81]}),e(R,[2,86]),e(R,[2,87]),e(R,[2,88]),e(R,[2,89]),e(c,[2,20]),e(P,[2,90]),e(P,[2,91]),e(R,[2,142]),e(R,[2,143]),e(P,[2,144]),e(P,[2,145]),e(P,[2,146]),e(P,[2,147]),{23:82,55:74,56:O},{56:[2,101]},e(l,[2,32],{114:26,18:83,13:i,16:a,115:o,130:s}),e(N,[2,114]),e(r,[2,10]),e(D,[2,112],{59:84}),e(D,[2,29]),e(p,[2,11]),e(E,[2,14],{41:85,42:[1,86]}),{45:87,46:[1,88]},{13:i,16:a,18:51,33:90,35:48,36:49,37:50,38:h,40:[1,89],43:53,44:f,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(R,[2,84]),{13:i,16:a,18:91,114:26,115:o,130:s},e(r,[2,9]),e(N,[2,115]),{13:i,16:a,18:115,38:j,57:92,58:[1,94],63:93,64:95,68:102,69:98,70:100,72:104,73:105,74:107,77:97,78:99,87:C,96:M,97:101,99:103,103:106,105:109,106:113,108:110,109:L,114:26,115:o,125:96,126:k,130:s},e(x,[2,107]),{13:i,16:a,18:51,33:117,35:48,36:49,37:50,38:h,43:53,44:f,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(A,[2,22]),e(A,[2,21]),e(A,[2,18]),e(I,[2,109]),e(R,[2,85]),e(F,[2,31]),e(D,[2,113]),e(F,[2,30]),{47:120,48:[1,121],50:119,53:[2,120],65:118},e(B,[2,118],{70:100,68:102,72:104,73:105,74:107,69:122,87:C,96:M,126:k}),e(B,[2,119]),e(U,[2,116]),e(q,[2,128],{79:123}),e(U,[2,35]),e(q,[2,59]),e(U,[2,36],{71:124,66:125,67:V}),e(Q,[2,61],{100:127,98:128,67:$}),e(H,[2,38]),{72:130,74:107,87:C,126:k},e(G,[2,64],{104:131,101:132,102:z}),{75:[1,134]},e([13,16,56,85,87,95,115,126,128,129,130],[2,58]),e(K,[2,68]),{13:i,16:a,18:115,38:j,105:135,106:113,114:26,115:o,130:s},{75:[2,124]},{75:[2,125]},e(K,[2,66],{107:136,93:[1,138],110:[1,137],111:[1,139]}),e([13,16,38,115,130],[2,70]),e(X,[2,74]),{13:i,16:a,18:115,38:j,97:140,99:103,103:106,105:109,106:113,108:110,109:L,114:26,115:o,130:s},e(x,[2,19]),{53:[1,141]},{53:[2,121]},{13:i,16:a,18:36,29:142,30:35,114:26,115:o,130:s},e(c,[2,23]),e(U,[2,117]),e(B,[2,41],{114:26,55:74,127:143,88:144,82:145,81:147,84:148,73:149,18:150,86:152,23:154,94:155,13:i,16:a,44:[1,146],56:O,85:J,87:W,95:Y,96:M,115:o,128:Z,129:ee,130:s}),e(U,[2,37],{66:159,67:V}),e(H,[2,122]),{68:160,72:104,73:105,74:107,87:C,96:M,126:k},e(Q,[2,62],{98:161,67:$}),e(G,[2,134]),{13:i,16:a,18:115,38:j,99:162,103:106,105:109,106:113,108:110,109:L,114:26,115:o,130:s},e(H,[2,39]),e(G,[2,65],{101:163,102:z}),e(K,[2,136]),{13:i,16:a,18:115,38:j,103:164,105:109,106:113,108:110,109:L,114:26,115:o,130:s},{13:i,16:a,18:51,35:166,44:te,76:165,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(K,[2,69]),e(K,[2,67]),e(K,[2,71]),e(K,[2,72]),e(K,[2,73]),{40:[1,168]},e(D,[2,33]),{48:[1,170],49:169},e(q,[2,129]),e(q,[2,126]),e(q,[2,127]),{89:171,92:[1,172]},e(q,[2,43],{83:173,80:174,67:re}),e(ne,[2,45]),{13:i,16:a,18:150,23:154,55:74,56:O,84:176,85:J,86:152,87:W,94:155,95:Y,114:26,115:o,128:Z,129:ee,130:s},e(ne,[2,47]),e(ne,[2,48]),e(ne,[2,49]),{75:[1,177]},e(ne,[2,51]),e(ne,[2,56]),{13:[1,178]},e(ne,[2,132]),e(ne,[2,133]),e(H,[2,123]),e(H,[2,34]),e(G,[2,135]),e(G,[2,60]),e(K,[2,137]),e(K,[2,63]),e(H,[2,40]),e(ie,[2,76]),e(ae,[2,138],{112:179}),e(X,[2,75]),{53:[2,25]},{53:[2,24]},{90:[1,180]},{90:[2,53]},e(q,[2,44],{80:181,67:re}),e(ne,[2,130]),{13:i,16:a,18:150,23:154,55:74,56:O,73:149,81:182,84:148,85:J,86:152,87:W,94:155,95:Y,96:M,114:26,115:o,128:Z,129:ee,130:s},e(ne,[2,46]),{13:i,16:a,18:51,35:166,44:te,76:183,92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},e(ne,[2,57]),{13:i,16:a,18:51,35:185,46:[1,184],92:y,113:52,114:26,115:o,116:55,119:g,120:m,121:59,122:61,123:62,130:s,131:b,132:v,133:_,134:w,135:T,136:S},{91:186,92:[1,187],93:[1,188]},e(ne,[2,131]),e(ne,[2,42]),e(ne,[2,50]),e(ie,[2,77]),e(ae,[2,139]),{46:[1,189]},{46:[2,54]},{46:[2,55]},e(q,[2,52])],defaultActions:{21:[2,1],41:[2,103],70:[2,101],111:[2,124],112:[2,125],119:[2,121],169:[2,25],170:[2,24],172:[2,53],187:[2,54],188:[2,55]},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=[],a=this.table,o="",s=0,c=0,u=0,l=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(p.yy[h]=this.yy[h]);d.setInput(e,p.yy),p.yy.lexer=d,p.yy.parser=this,void 0===d.yylloc&&(d.yylloc={});var f=d.yylloc;i.push(f);var y,g=d.options&&d.options.ranges;"function"==typeof p.yy.parseError?this.parseError=p.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var m,b,v,_,w,T,S,O,E,x={};;){if(v=r[r.length-1],this.defaultActions[v]?_=this.defaultActions[v]:(null==m&&(y=void 0,"number"!=typeof(y=d.lex()||1)&&(y=t.symbols_[y]||y),m=y),_=a[v]&&a[v][m]),void 0===_||!_.length||!_[0]){var A;for(T in E=[],a[v])this.terminals_[T]&&T>2&&E.push("'"+this.terminals_[T]+"'");A=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:f,expected:E})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+m);switch(_[0]){case 1:r.push(m),n.push(d.yytext),i.push(d.yylloc),r.push(_[1]),m=null,b?(m=b,b=null):(c=d.yyleng,o=d.yytext,s=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[_[1]][1],x.$=n[n.length-S],x._$={first_line:i[i.length-(S||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(S||1)].first_column,last_column:i[i.length-1].last_column},g&&(x._$.range=[i[i.length-(S||1)].range[0],i[i.length-1].range[1]]),void 0!==(w=this.performAction.apply(x,[o,c,s,p.yy,_[1],n,i].concat(l))))return w;S&&(r=r.slice(0,-1*S*2),n=n.slice(0,-1*S),i=i.slice(0,-1*S)),r.push(this.productions_[_[1]][0]),n.push(x.$),i.push(x._$),O=a[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}};const se="http://www.w3.org/1999/02/22-rdf-syntax-ns#",ce=se+"type",ue=se+"first",le=se+"rest",de=se+"nil",pe="http://www.w3.org/2001/XMLSchema#",he=pe+"integer",fe=pe+"decimal",ye=pe+"double",ge=pe+"boolean",me="http://www.w3.org/ns/shacl#",be="http://www.w3.org/2002/07/owl#",ve="http://www.w3.org/2000/01/rdf-schema#",_e={[he]:!0,[fe]:!0,[pe+"float"]:!0,[ye]:!0,[pe+"string"]:!0,[ge]:!0,[pe+"dateTime"]:!0,[pe+"nonPositiveInteger"]:!0,[pe+"negativeInteger"]:!0,[pe+"long"]:!0,[pe+"int"]:!0,[pe+"short"]:!0,[pe+"byte"]:!0,[pe+"nonNegativeInteger"]:!0,[pe+"unsignedLong"]:!0,[pe+"unsignedShort"]:!0,[pe+"unsignedByte"]:!0,[pe+"positiveInteger"]:!0,[se+"langString"]:!0};function we(e,t=!1){let r=0,n=e.length;if(t&&0===n)return De.factory.namedNode(de);const i=head=Ee();return 0===n&&Re(head,De.factory.namedNode(le),De.factory.namedNode(de)),e.forEach((e=>{if(void 0===e)throw new Error("b");Re(head,De.factory.namedNode(ue),e),Re(head,De.factory.namedNode(le),head=++r20?"...":"")+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 a in i)this[a]=i[a];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(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))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(){return this.next()||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 14;case 3:return 15;case 4:return 25;case 5:return 20;case 6:return 131;case 7:return 132;case 8:return 85;case 9:return 126;case 10:return 87;case 11:return"PASS";case 12:return"COMMENT";case 13:return 13;case 14:return 16;case 15:return 130;case 16:return 129;case 17:return 128;case 18:return 117;case 19:return 92;case 20:return 119;case 21:return 120;case 22:return"EXPONENT";case 23:return 133;case 24:return 134;case 25:return 135;case 26:return 136;case 27:return 61;case 28:return 90;case 29:return 58;case 30:return 56;case 31:return 38;case 32:return 40;case 33:return 44;case 34:return 46;case 35:return 110;case 36:return 93;case 37:return 111;case 38:return 67;case 39:return 118;case 40:return 53;case 41:return 96;case 42:return 102;case 43:return 75;case 44:return 95;case 45:return 109;case 46:return 28;case 47:return 42;case 48:return 48;case 49:return 115;case 50:return 7;case 51:console.log(t.yytext)}},rules:[/^(?:\s+|#[^\n\r]*)/i,/^(?:BASE)/i,/^(?:IMPORTS)/i,/^(?:PREFIX)/i,/^(?:shapeClass)/i,/^(?:shape)/i,/^(?:true)/i,/^(?:false)/i,/^(?:(BlankNode|IRI|Literal|BlankNodeOrIRI|BlankNodeOrLiteral|IRIOrLiteral\b))/i,/^(?:(targetNode|targetObjectsOf|targetSubjectsOf\b))/i,/^(?:(deactivated|severity|message|class|datatype|nodeKind|minExclusive|minInclusive|maxExclusive|maxInclusive|minLength|maxLength|pattern|flags|languageIn|uniqueLang|equals|disjoint|lessThan|lessThanOrEquals|qualifiedValueShape|qualifiedMinCount|qualifiedMaxCount|qualifiedValueShapesDisjoint|closed|ignoredProperties|hasValue|in))/i,/^(?:([ \t\r\n]+))/i,/^(?:(#[\r\n]*))/i,/^(?:(<([^=<>\"\{\}\|\^`\\\u0000-\u0020]|(\\u([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])|\\U([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f])))*>))/i,/^(?:((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:))/i,/^(?:(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:)(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|:|[0-9]|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/i,/^(?:(@(([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:))/i,/^(?:(@((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.)*((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040]))?)?:)(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|:|[0-9]|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))((((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|\.|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%))))*(((([A-Z]|[a-z]|[\u00C0-\u00D6]|[\u00D8-\u00F6]|[\u00F8-\u02FF]|[\u0370-\u037D]|[\u037F-\u1FFF]|[\u200C-\u200D]|[\u2070-\u218F]|[\u2C00-\u2FEF]|[\u3001-\uD7FF]|[\uF900-\uFDCF]|[\uFDF0-\uFFFD])|_\b)|-|[0-9]|[\u00B7]|[\u0300-\u036F]|[\u203F-\u2040])|:|((%([0-9]|[A-F]|[a-f])([0-9]|[A-F]|[a-f]))|(\\(_|~|\.|-|!|\$|&|'|\(|\)|\*|\+|,|;|=|\/|\?|#|@|%)))))?)))/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]+))))/i,/^(?:([eE][+-]?[0-9]+))/i,/^(?:('(?:(?:[^\u0027\u005C\u000A\u000D])|(\\[tbnrf\\\"\']))*'))/i,/^(?:("(?:(?:[^\u0022\u005C\u000A\u000D])|(\\[tbnrf\\\"\']))*"))/i,/^(?:('''(?:(?:'|'')?(?:[^'\\]|(\\[tbnrf\\\"\'])))*'''))/i,/^(?:("""(?:(?:"|"")?(?:[^\"\\]|(\\[tbnrf\\\"\'])))*"""))/i,/^(?:->)/i,/^(?:\.\.)/i,/^(?:\})/i,/^(?:\{)/i,/^(?:\()/i,/^(?:\))/i,/^(?:\[)/i,/^(?:\])/i,/^(?:\?)/i,/^(?:\*)/i,/^(?:\+)/i,/^(?:\|)/i,/^(?:\^\^)/i,/^(?:\.)/i,/^(?:!)/i,/^(?:\/)/i,/^(?:=)/i,/^(?:@)/i,/^(?:\^)/i,/^(?:;)/i,/^(?:,)/i,/^(?:%)/i,/^(?:a)/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],inclusive:!0}}};function De(){this.yy={}}return oe.lexer=Ne,De.prototype=oe,oe.Parser=De,new De}();e.exports=t},21762:(e,t,r)=>{const n=r(21925).Parser,i=r(72243);class a{constructor(){}parse(e,{extendedSyntax:t,baseIRI:r}={}){this._parser=new n,this._parser.Parser.factory=i.DataFactory,this._parser.Parser.base=i.DataFactory.namedNode(r||"urn:x-base:default"),this._parser.Parser.extended=!0===t,this._parser.Parser.prefixes={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",sh:"http://www.w3.org/ns/shacl#",xsd:"http://www.w3.org/2001/XMLSchema#"},this._parser.Parser.currentNodeShape=void 0,this._parser.Parser.currentPropertyNode=void 0,this._parser.Parser.nodeShapeStack=[],this._parser.Parser.tempCurrentNodeShape=void 0,this._parser.Parser.n3Parser=new i.Parser({baseIRI:r||"urn:x-base:default"});const a=[];return this._parser.Parser.onQuad=e=>{a.push(e)},this._parser.parse(e),a.prefixes=this._parser.Parser.prefixes,a}}e.exports.Parser=a,e.exports.parse=function(e,t){return(new a).parse(e,t)}},23344:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const a=r(72243),o=r(37669),s=r(64817),c=r(98118),u=i(r(57756)),l=i(r(14791)),d=i(r(58007));function p(e){var t;return null===(t=/^[^]*[#/]/.exec(e))||void 0===t?void 0:t[0]}const h={"http://www.w3.org/1999/02/22-rdf-syntax-ns#":"rdf","http://www.w3.org/2000/01/rdf-schema#":"rdfs","http://www.w3.org/ns/shacl#":"sh","http://www.w3.org/2001/XMLSchema#":"xsd"},f={rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",sh:"http://www.w3.org/ns/shacl#",xsd:"http://www.w3.org/2001/XMLSchema#"};t.default=class{constructor(e,t,r={},n=void 0,i=!0,a=!1,o,s=!1){this.store=e,this.base=n,this.errorOnExtraQuads=i,this.mintUnspecifiedPrefixes=a,this.fetch=o,this.extendedSyntax=s,this.prefixes={},this.prefixRev={};for(const e of Object.keys(r)){const t=r[e],n="string"==typeof t?t:t.value;n in h||e in f||(this.prefixRev[n]=e,this.prefixes[e]=n)}this.writer=t}write(){return n(this,void 0,void 0,(function*(){const e=this.store.getQuads(null,"http://www.w3.org/1999/02/22-rdf-syntax-ns#type","http://www.w3.org/2002/07/owl#Ontology",null);if(1!==e.length||"NamedNode"!==e[0].subject.termType)throw new Error("Base expected");{const t=e[0].subject;this.store.removeQuads(e),t.equals(new a.NamedNode("urn:x-base:default"))||this.writer.add(`BASE ${(0,s.termToString)(t)}`),yield this.writeImports(t)}if(this.mintUnspecifiedPrefixes){const e=new Set;for(const t of[...this.store.getSubjects(null,null,null),...this.store.getPredicates(null,null,null),...this.store.getObjects(null,null,null)])if("NamedNode"===t.termType){const r=p(t.value);!r||r in this.prefixRev||r in h||e.add(r)}const t=Object.assign(Object.assign({},this.prefixes),f);yield Promise.all([...e].map((e=>(0,o.uriToPrefix)(e,{fetch:this.fetch,mintOnUnknown:!0,existingPrefixes:t}).then((r=>{this.prefixes[r]=e,t[r]=e,this.prefixRev[e]=r})))))}const t=new Set([...this.store.getSubjects(null,null,null),...this.store.getPredicates(null,null,null),...this.store.getObjects(null,null,null)].filter((e=>"NamedNode"===e.termType)).map((e=>p(e.value))).filter((e=>"string"==typeof e)));for(const e in this.prefixRev)t.has(e)||(delete this.prefixes[this.prefixRev[e]],delete this.prefixRev[e]);if(yield this.writePrefixes(),this.prefixes=Object.assign(Object.assign({},this.prefixes),f),this.prefixRev=Object.assign(Object.assign({},this.prefixRev),h),this.writer.newLine(),yield this.writeShapes(),this.extendedSyntax){const e=this.store.getSubjects(null,null,null);e.length>0&&this.writer.newLine(1);for(const t of e)this.writer.add(yield this.termToString(t,!0,!0)),this.writer.add(" "),this.writer.indent(),yield this.writeTurtlePredicates(t),this.writer.deindent();e.length>0&&(this.writer.add(" ."),this.writer.newLine())}if(this.errorOnExtraQuads&&this.store.size>0)throw new Error("Dataset contains quads that cannot be written in SHACLC");this.writer.end()}))}writeImports(e){return n(this,void 0,void 0,(function*(){const t=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/2002/07/owl#imports"),null);if(t.length>0)for(const e of t)this.writer.add(`IMPORTS <${e.value}>`,!0)}))}writePrefixes(){return n(this,void 0,void 0,(function*(){const e=Object.keys(this.prefixes).filter((e=>!(e in l.default))).sort();if(e.length>0)for(const t of e)this.writer.add(`PREFIX ${t}: <${this.prefixes[t]}>`,!0)}))}termToString(e,t=!1,r=!1){return n(this,void 0,void 0,(function*(){try{if(t)throw new Error("Shacl name disabled");return(0,c.getShaclName)(e)}catch(e){}if("NamedNode"===e.termType){const t=p(e.value);return t&&t in this.prefixRev&&t in this.prefixRev?`${this.prefixRev[t]}:${e.value.slice(t.length)}`:(0,s.termToString)(e)}if("Literal"===e.termType)return"http://www.w3.org/2001/XMLSchema#integer"===e.datatypeString||"http://www.w3.org/2001/XMLSchema#boolean"===e.datatypeString?e.value:(0,s.termToString)(e);throw"BlankNode"===e.termType&&r&&(0,s.termToString)(e),new Error(`Invalid term type for extra statement ${e.value} (${e.termType})`)}))}writeShapes(){return n(this,void 0,void 0,(function*(){for(const e of this.store.getSubjectsOnce(new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new a.NamedNode("http://www.w3.org/ns/shacl#NodeShape"),null)){this.store.getQuadsOnce(e,new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new a.NamedNode("http://www.w3.org/2000/01/rdf-schema#Class"),null).length>0?this.writer.add("shapeClass "):this.writer.add("shape "),this.writer.add(yield this.termToString(e)),this.writer.add(" ");const t=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#targetClass"),null);if(t.length>0){this.writer.add("-> ");for(const e of t)"NamedNode"===e.termType?this.writer.add(yield this.termToString(e)):(this.writer.add("!"),this.writer.add(yield this.termToString(this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#not"),!0)))),this.writer.add(" ")}const r=this.store.getPredicates(e,null,null).filter((e=>[new a.NamedNode("http://www.w3.org/ns/shacl#targetClass"),new a.NamedNode("http://www.w3.org/ns/shacl#property"),new a.NamedNode("http://www.w3.org/ns/shacl#or"),...Object.keys(d.default).map((e=>new a.NamedNode("http://www.w3.org/ns/shacl#"+e)))].every((t=>!e.equals(t)))));r.length>0&&(this.writer.add(";"),this.writer.indent(),this.writer.newLine(1)),this.extendedSyntax&&(yield this.writeGivenTurtlePredicates(e,r)),r.length>0&&(this.writer.add(" "),this.writer.deindent()),yield this.writeShapeBody(e,!1)}}))}getSingleProperty(e,t){let r=[e];try{let n=(0,c.getShaclName)(e.predicate),i="pred";if("not"===n){const t=this.store.getQuadsOnce(e.object,null,null,null);if(r=r.concat(t),1!==t.length)throw new Error("Can only handle having one predicate of 'not'");[e]=t,n=(0,c.getShaclName)(e.predicate),i="not"}if(!(n in t))throw new Error(`${n} is not allowed`);return{name:n,type:i,object:e.object}}catch(e){this.store.addQuads(r)}}singleLayerPropertiesList(e,t){const r=[];for(const n of this.store.getQuadsOnce(e,null,null,null)){const e=this.getSingleProperty(n,t);e&&r.push(e)}return r}expectOneProperty(e,t){const r=this.store.getQuadsOnce(e,null,null,null);if(1===r.length){const e=this.getSingleProperty(r[0],t);if(e)return e}this.store.addQuads(r)}orProperties(e,t){const r=[];for(const n of this.store.getQuadsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#or"),null,null)){const e=[];for(const r of this.getList(n.object)){const i=this.expectOneProperty(r,t);if(!i)throw this.store.addQuad(n),new Error("Each entry of the 'or' statement must declare exactly one property");e.push(i)}r.push(e)}return r}getList(e){let t=e;const r=[];for(;!t.equals(new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));)r.push(this.singleObject(t,new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),!0)),t=this.singleObject(t,new a.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),!0);return r}writeIriLiteralOrArray(e){return n(this,void 0,void 0,(function*(){if("BlankNode"===e.termType){this.writer.add("[");let t=!0;for(const r of this.getList(e))t?t=!1:this.writer.add(" "),this.writer.add(yield this.termToString(r));this.writer.add("]")}else this.writer.add(yield this.termToString(e))}))}singleObject(e,t,r){var n;return null===(n=this.singleQuad(e,t,r))||void 0===n?void 0:n.object}singleQuad(e,t,r=!1){const n=this.store.getQuadsOnce(e,t,null,null);if(r&&1!==n.length)throw this.store.addQuads(n),new Error(`The subject and predicate ${null==e?void 0:e.value} ${null==t?void 0:t.value} must have exactly one object. Instead has ${n.length}`);if(n.length>1)throw this.store.addQuads(n),new Error(`The subject and predicate ${null==e?void 0:e.value} ${null==t?void 0:t.value} can have at most one object. Instead has ${n.length}`);return 1===n.length?n[0]:void 0}writeAssigment({name:e,type:t,object:r}){return n(this,void 0,void 0,(function*(){"not"===t&&this.writer.add("!"),this.writer.add(e),this.writer.add("="),yield this.writeIriLiteralOrArray(r)}))}writeAtom({name:e,type:t,object:r}){return n(this,void 0,void 0,(function*(){switch("not"===t&&this.writer.add("!"),e){case"node":if("NamedNode"===r.termType)this.writer.add(`@${yield this.termToString(r)}`);else{if("BlankNode"!==r.termType)throw new Error("Invalid nested shape, must be blank node or IRI");yield this.writeShapeBody(r)}return;case"nodeKind":return void this.writer.add((0,c.getShaclName)(r));case"class":case"datatype":return void this.writer.add(yield this.termToString(r));default:this.writer.add(e),this.writer.add("="),yield this.writeIriLiteralOrArray(r)}}))}writeAssigments(e,t=" ",r=!0,i){return n(this,void 0,void 0,(function*(){for(const n of e)r?r=!1:this.writer.add(t),i?yield this.writeAtom(n):yield this.writeAssigment(n)}))}writeParams(e,t=!0,r,i=!1,a=!1){return n(this,void 0,void 0,(function*(){const n=this.orProperties(e,r),o=this.singleLayerPropertiesList(e,r);a&&(n.length>0||o.length>0)&&this.writer.newLine(1);for(const e of n)t?t=!1:this.writer.add(" "),yield this.writeAssigments(e,"|",!0,i);yield this.writeAssigments(o," ",t,i),a&&(n.length>0||o.length>0)&&this.writer.add(" .")}))}writeShapeBody(e,t=!0){return n(this,void 0,void 0,(function*(){this.writer.add("{").indent();const r=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#property"),null);yield this.writeParams(e,!0,d.default,!1,!0);for(const e of r)this.writer.newLine(1),yield this.writeProperty(e);this.writer.deindent().newLine(1),t?this.writer.add("} ."):this.writer.add("}").newLine(1)}))}writeProperty(e){return n(this,void 0,void 0,(function*(){yield this.writePath(this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#path"),!0));const t=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#minCount")),r=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#maxCount")),n=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#nodeKind")),i=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#class")),o=this.singleObject(e,new a.NamedNode("http://www.w3.org/ns/shacl#datatype")),s=this.store.getObjectsOnce(e,new a.NamedNode("http://www.w3.org/ns/shacl#node"),null);if(n&&(this.writer.add(" "),this.writer.add((0,c.getShaclName)(n))),i&&(this.writer.add(" "),this.writer.add(yield this.termToString(i))),o&&(this.writer.add(" "),this.writer.add(yield this.termToString(o))),void 0!==t||void 0!==r){if(this.writer.add(" ["),t){if("Literal"!==t.termType||"http://www.w3.org/2001/XMLSchema#integer"!==t.datatypeString)throw new Error("Invalid min value, must me an integer literal");this.writer.add(t.value)}else this.writer.add("0");if(this.writer.add(".."),r){if("Literal"!==r.termType||"http://www.w3.org/2001/XMLSchema#integer"!==r.datatypeString)throw new Error("Invalid max value, must me an integer literal");this.store.removeMatches(e,new a.NamedNode("http://www.w3.org/ns/shacl#maxCount"),void 0,void 0),this.writer.add(r.value)}else this.writer.add("*");this.writer.add("]")}yield this.writeParams(e,!1,u.default,!0);const l=[];for(const e of s)if("NamedNode"===e.termType)this.writer.add(" "),this.writer.add(`@${yield this.termToString(e)}`);else{if("BlankNode"!==e.termType)throw new Error("Invalid nested shape, must be blank node or IRI");l.push(e)}for(const e of l)this.writer.add(" "),yield this.writeShapeBody(e);this.extendedSyntax&&this.store.getQuads(e,null,null,null).length>0&&(this.writer.add(" %"),this.writer.indent(),this.writer.newLine(1),yield this.writeTurtlePredicates(e),this.writer.deindent(),this.writer.newLine(1),this.writer.add("%")),0===l.length&&this.writer.add(" .")}))}writeTurtlePredicates(e){return n(this,void 0,void 0,(function*(){return this.writeGivenTurtlePredicates(e,this.store.getPredicates(e,null,null))}))}writeGivenTurtlePredicates(e,t){return n(this,void 0,void 0,(function*(){let r=!1;if(t.some((e=>e.equals(a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))))){const t=this.store.getObjectsOnce(e,a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),null);t.length>0&&(r=!0,this.writer.add("a "),yield this.writeTurtleObjects(t))}for(const n of t)n.equals(a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))||(r?(this.writer.add(" ;"),this.writer.newLine(1)):r=!0,this.writer.add(yield this.termToString(n,!0)),this.writer.add(" "),yield this.writeTurtleObjects(this.store.getObjectsOnce(e,n,null)))}))}writeTurtleObjects(e){return n(this,void 0,void 0,(function*(){const t=[],r=[];for(const n of e)"BlankNode"===n.termType&&0===[...this.store.match(null,null,n),...this.store.match(null,n,null)].length?t.push(n):r.push(n);this.writer.add((yield Promise.all(r.map((e=>this.termToString(e,!0,!0))))).join(", "));let n=r.length>0;if(t.length>0)for(const e of t)n?this.writer.add(", "):n=!0,(yield this.writeList(e))||(this.writer.add("["),this.writer.indent(),this.writer.newLine(1),yield this.writeTurtlePredicates(e),this.writer.deindent(),this.writer.newLine(1),this.writer.add("]"))}))}writeList(e){return n(this,void 0,void 0,(function*(){let t=e;const r=[],n=[];for(;!t.equals(a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));){const e=this.store.getQuadsOnce(t,a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),null,null),i=this.store.getQuadsOnce(t,a.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),null,null);if(n.push(...e,...i),1!==e.length||1!==i.length||0!==this.store.getQuads(t,null,null,null).length)return this.store.addQuads(n),!1;r.push(e[0].object),t=i[0].object}let i=!1;this.writer.add("(");for(const e of r)i?this.writer.add(" "):i=!0,yield this.writeTurtleObjects([e]);return this.writer.add(")"),!0}))}writePath(e,t=!1){return n(this,void 0,void 0,(function*(){if("NamedNode"===e.termType)this.writer.add(yield this.termToString(e));else{if("BlankNode"!==e.termType)throw new Error("Path should be named node or blank node");{const r=this.store.getQuadsOnce(e,null,null,null);if(1===r.length){const{predicate:n,object:i}=r[0];switch(n.value){case"http://www.w3.org/ns/shacl#inversePath":return this.writer.add("^"),void(yield this.writePath(i,!0));case"http://www.w3.org/ns/shacl#alternativePath":{const e=this.getList(i);if(0===e.length)throw new Error("Invalid Alternative Path - no options");if(1===e.length)yield this.writePath(e[0]);else{t&&this.writer.add("(");let r=!0;for(const t of e)r?r=!1:this.writer.add("|"),yield this.writePath(t,!0);t&&this.writer.add(")")}return}case"http://www.w3.org/ns/shacl#zeroOrMorePath":return yield this.writePath(i,!0),void this.writer.add("*");case"http://www.w3.org/ns/shacl#oneOrMorePath":return yield this.writePath(i,!0),void this.writer.add("+");case"http://www.w3.org/ns/shacl#zeroOrOnePath":return yield this.writePath(i,!0),void this.writer.add("?");default:throw new Error(`Invalid path type ${e.value}`)}}else{this.store.addQuads(r);const n=this.getList(e);if(0===n.length)throw new Error("Invalid Path");{t&&this.writer.add("(");let e=!0;for(const t of n)e?e=!1:this.writer.add("/"),yield this.writePath(t,!0);t&&this.writer.add(")")}}}}}))}}},14791:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={owl:"http://www.w3.org/2002/07/owl#",rdf:"http://www.w3.org/1999/02/22-rdf-syntax-ns#",rdfs:"http://www.w3.org/2000/01/rdf-schema#",sh:"http://www.w3.org/ns/shacl#",xsd:"http://www.w3.org/2001/XMLSchema#"}},22939:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,a){function o(e){try{c(n.next(e))}catch(e){a(e)}}function s(e){try{c(n.throw(e))}catch(e){a(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(o,s)}c((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.write=void 0;const a=r(72243),o=i(r(23344)),s=i(r(29908)),c=i(r(23187));t.write=function(e,t){return n(this,void 0,void 0,(function*(){return new Promise(((r,i)=>n(this,void 0,void 0,(function*(){try{let n="";const i=new c.default(e),u=i.getGraphs(null,null,null);if(u.length>1)throw new Error("More than one graph found - can serialize in the default graph");if(1===u.length&&!u[0].equals(a.DataFactory.defaultGraph()))throw new Error(`Expected all triples to be in the default graph, instead triples were in ${u[0].value}`);const l=new s.default({write:e=>{n+=e},end:()=>{let e=i.getQuads(null,null,null,null);0===e.length&&(e=void 0),r({text:n,extraQuads:e})}}),d=new o.default(i,l,null==t?void 0:t.prefixes,void 0,!1!==(null==t?void 0:t.errorOnUnused),null==t?void 0:t.mintPrefixes,null==t?void 0:t.fetch,null==t?void 0:t.extendedSyntax);yield d.write()}catch(e){i(e)}}))))}))}},58007:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={targetNode:!0,targetObjectsOf:!0,targetSubjectsOf:!0,deactivated:!0,severity:!0,message:!0,class:!0,datatype:!0,nodeKind:!0,minExclusive:!0,minInclusive:!0,maxExclusive:!0,maxInclusive:!0,minLength:!0,maxLength:!0,pattern:!0,flags:!0,languageIn:!0,equals:!0,disjoint:!0,closed:!0,ignoredProperties:!0,hasValue:!0,in:!0}},57756:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={deactivated:!0,severity:!0,message:!0,class:!0,datatype:!0,nodeKind:!0,minExclusive:!0,minInclusive:!0,maxExclusive:!0,maxInclusive:!0,minLength:!0,maxLength:!0,pattern:!0,flags:!0,languageIn:!0,uniqueLang:!0,equals:!0,disjoint:!0,lessThan:!0,lessThanOrEquals:!0,qualifiedValueShape:!0,qualifiedMinCount:!0,qualifiedMaxCount:!0,qualifiedValueShapesDisjoint:!0,closed:!0,ignoredProperties:!0,hasValue:!0,in:!0,node:!0}},98118:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getShaclName=void 0,t.getShaclName=function(e){if("NamedNode"!==e.termType||!e.value.startsWith("http://www.w3.org/ns/shacl#"))throw new Error(`Term ${e.value} is not part of the SHACL namespace`);return e.value.slice(27)}},23187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(72243);class i extends n.Store{getQuadsOnce(e,t,r,n){const i=this.getQuads(e,t,r,n);return this.removeQuads(i),i}getSubjectsOnce(e,t,r){return this.getQuadsOnce(null,e,t,r).map((e=>e.subject))}getObjectsOnce(e,t,r){return this.getQuadsOnce(e,t,null,r).map((e=>e.object))}}t.default=i},29908:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(e){this.indents=0,this.write=e.write,this.end=e.end}indent(){return this.indents+=1,this}deindent(){if(this.indents<1)throw new Error(`Trying to deindent when indent is only ${this.indents}`);return this.indents-=1,this}add(e,t=!1){return this.write(t?`\n${"\t".repeat(this.indents)}${e}`:e,"utf-8"),this}newLine(e=2){return this.write("\n".repeat(e)+"\t".repeat(this.indents),"utf-8"),this}}},88110:e=>{e.exports=function(e){"use strict";var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];function r(e,t){var r=e[0],n=e[1],i=e[2],a=e[3];n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[0]-680876936|0)<<7|r>>>25)+n|0)&n|~r&i)+t[1]-389564586|0)<<12|a>>>20)+r|0)&r|~a&n)+t[2]+606105819|0)<<17|i>>>15)+a|0)&a|~i&r)+t[3]-1044525330|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[4]-176418897|0)<<7|r>>>25)+n|0)&n|~r&i)+t[5]+1200080426|0)<<12|a>>>20)+r|0)&r|~a&n)+t[6]-1473231341|0)<<17|i>>>15)+a|0)&a|~i&r)+t[7]-45705983|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[8]+1770035416|0)<<7|r>>>25)+n|0)&n|~r&i)+t[9]-1958414417|0)<<12|a>>>20)+r|0)&r|~a&n)+t[10]-42063|0)<<17|i>>>15)+a|0)&a|~i&r)+t[11]-1990404162|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&i|~n&a)+t[12]+1804603682|0)<<7|r>>>25)+n|0)&n|~r&i)+t[13]-40341101|0)<<12|a>>>20)+r|0)&r|~a&n)+t[14]-1502002290|0)<<17|i>>>15)+a|0)&a|~i&r)+t[15]+1236535329|0)<<22|n>>>10)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[1]-165796510|0)<<5|r>>>27)+n|0)&i|n&~i)+t[6]-1069501632|0)<<9|a>>>23)+r|0)&n|r&~n)+t[11]+643717713|0)<<14|i>>>18)+a|0)&r|a&~r)+t[0]-373897302|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[5]-701558691|0)<<5|r>>>27)+n|0)&i|n&~i)+t[10]+38016083|0)<<9|a>>>23)+r|0)&n|r&~n)+t[15]-660478335|0)<<14|i>>>18)+a|0)&r|a&~r)+t[4]-405537848|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[9]+568446438|0)<<5|r>>>27)+n|0)&i|n&~i)+t[14]-1019803690|0)<<9|a>>>23)+r|0)&n|r&~n)+t[3]-187363961|0)<<14|i>>>18)+a|0)&r|a&~r)+t[8]+1163531501|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n&a|i&~a)+t[13]-1444681467|0)<<5|r>>>27)+n|0)&i|n&~i)+t[2]-51403784|0)<<9|a>>>23)+r|0)&n|r&~n)+t[7]+1735328473|0)<<14|i>>>18)+a|0)&r|a&~r)+t[12]-1926607734|0)<<20|n>>>12)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[5]-378558|0)<<4|r>>>28)+n|0)^n^i)+t[8]-2022574463|0)<<11|a>>>21)+r|0)^r^n)+t[11]+1839030562|0)<<16|i>>>16)+a|0)^a^r)+t[14]-35309556|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[1]-1530992060|0)<<4|r>>>28)+n|0)^n^i)+t[4]+1272893353|0)<<11|a>>>21)+r|0)^r^n)+t[7]-155497632|0)<<16|i>>>16)+a|0)^a^r)+t[10]-1094730640|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[13]+681279174|0)<<4|r>>>28)+n|0)^n^i)+t[0]-358537222|0)<<11|a>>>21)+r|0)^r^n)+t[3]-722521979|0)<<16|i>>>16)+a|0)^a^r)+t[6]+76029189|0)<<23|n>>>9)+i|0,n=((n+=((i=((i+=((a=((a+=((r=((r+=(n^i^a)+t[9]-640364487|0)<<4|r>>>28)+n|0)^n^i)+t[12]-421815835|0)<<11|a>>>21)+r|0)^r^n)+t[15]+530742520|0)<<16|i>>>16)+a|0)^a^r)+t[2]-995338651|0)<<23|n>>>9)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[0]-198630844|0)<<6|r>>>26)+n|0)|~i))+t[7]+1126891415|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[14]-1416354905|0)<<15|i>>>17)+a|0)|~r))+t[5]-57434055|0)<<21|n>>>11)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[12]+1700485571|0)<<6|r>>>26)+n|0)|~i))+t[3]-1894986606|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[10]-1051523|0)<<15|i>>>17)+a|0)|~r))+t[1]-2054922799|0)<<21|n>>>11)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[8]+1873313359|0)<<6|r>>>26)+n|0)|~i))+t[15]-30611744|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[6]-1560198380|0)<<15|i>>>17)+a|0)|~r))+t[13]+1309151649|0)<<21|n>>>11)+i|0,n=((n+=((a=((a+=(n^((r=((r+=(i^(n|~a))+t[4]-145523070|0)<<6|r>>>26)+n|0)|~i))+t[11]-1120210379|0)<<10|a>>>22)+r|0)^((i=((i+=(r^(a|~n))+t[2]+718787259|0)<<15|i>>>17)+a|0)|~r))+t[9]-343485551|0)<<21|n>>>11)+i|0,e[0]=r+e[0]|0,e[1]=n+e[1]|0,e[2]=i+e[2]|0,e[3]=a+e[3]|0}function n(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return r}function i(e){var t,r=[];for(t=0;t<64;t+=4)r[t>>2]=e[t]+(e[t+1]<<8)+(e[t+2]<<16)+(e[t+3]<<24);return r}function a(e){var t,i,a,o,s,c,u=e.length,l=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=u;t+=64)r(l,n(e.substring(t-64,t)));for(i=(e=e.substring(t-64)).length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(r(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,r(l,a),l}function o(e){var r,n="";for(r=0;r<4;r+=1)n+=t[e>>8*r+4&15]+t[e>>8*r&15];return n}function s(e){var t;for(t=0;tu?new ArrayBuffer(0):(n=u-c,i=new ArrayBuffer(n),a=new Uint8Array(i),o=new Uint8Array(this,c,n),a.set(o),i)}}(),l.prototype.append=function(e){return this.appendBinary(c(e)),this},l.prototype.appendBinary=function(e){this._buff+=e,this._length+=e.length;var t,i=this._buff.length;for(t=64;t<=i;t+=64)r(this._hash,n(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},l.prototype.end=function(e){var t,r,n=this._buff,i=n.length,a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=n.charCodeAt(t)<<(t%4<<3);return this._finish(a,i),r=s(this._hash),e&&(r=u(r)),this.reset(),r},l.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},l.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},l.prototype.setState=function(e){return this._buff=e.buff,this._length=e.length,this._hash=e.hash,this},l.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},l.prototype._finish=function(e,t){var n,i,a,o=t;if(e[o>>2]|=128<<(o%4<<3),o>55)for(r(this._hash,e),o=0;o<16;o+=1)e[o]=0;n=(n=8*this._length).toString(16).match(/(.*?)(.{0,8})$/),i=parseInt(n[2],16),a=parseInt(n[1],16)||0,e[14]=i,e[15]=a,r(this._hash,e)},l.hash=function(e,t){return l.hashBinary(c(e),t)},l.hashBinary=function(e,t){var r=s(a(e));return t?u(r):r},l.ArrayBuffer=function(){this.reset()},l.ArrayBuffer.prototype.append=function(e){var t,n,a,o,s,c=(n=this._buff.buffer,a=e,o=!0,(s=new Uint8Array(n.byteLength+a.byteLength)).set(new Uint8Array(n)),s.set(new Uint8Array(a),n.byteLength),o?s:s.buffer),u=c.length;for(this._length+=e.byteLength,t=64;t<=u;t+=64)r(this._hash,i(c.subarray(t-64,t)));return this._buff=t-64>2]|=n[t]<<(t%4<<3);return this._finish(a,i),r=s(this._hash),e&&(r=u(r)),this.reset(),r},l.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},l.ArrayBuffer.prototype.getState=function(){var e,t=l.prototype.getState.call(this);return t.buff=(e=t.buff,String.fromCharCode.apply(null,new Uint8Array(e))),t},l.ArrayBuffer.prototype.setState=function(e){return e.buff=function(e,t){var r,n=e.length,i=new ArrayBuffer(n),a=new Uint8Array(i);for(r=0;r>2]|=e[t]<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(r(l,a),t=0;t<16;t+=1)a[t]=0;return o=(o=8*u).toString(16).match(/(.*?)(.{0,8})$/),s=parseInt(o[2],16),c=parseInt(o[1],16)||0,a[14]=s,a[15]=c,r(l,a),l}(new Uint8Array(e)));return t?u(n):n},l}()},31578:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.toSparqlJs=t.toSparql=t.Factory=t.Algebra=t.translate=void 0;const s=o(r(71029));t.translate=s.default;const c=a(r(47914));t.Algebra=c;const u=o(r(376));t.Factory=u.default;const l=r(24693);Object.defineProperty(t,"toSparql",{enumerable:!0,get:function(){return l.toSparql}}),Object.defineProperty(t,"toSparqlJs",{enumerable:!0,get:function(){return l.toSparqlJs}});const d=o(r(83152));t.Util=d.default},47914:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.expressionTypes=t.types=void 0,(n=t.types||(t.types={})).ALT="alt",n.ASK="ask",n.BGP="bgp",n.CONSTRUCT="construct",n.DESCRIBE="describe",n.DISTINCT="distinct",n.EXPRESSION="expression",n.EXTEND="extend",n.FILTER="filter",n.FROM="from",n.GRAPH="graph",n.GROUP="group",n.INV="inv",n.JOIN="join",n.LEFT_JOIN="leftjoin",n.LINK="link",n.MINUS="minus",n.NOP="nop",n.NPS="nps",n.ONE_OR_MORE_PATH="OneOrMorePath",n.ORDER_BY="orderby",n.PATH="path",n.PATTERN="pattern",n.PROJECT="project",n.REDUCED="reduced",n.SEQ="seq",n.SERVICE="service",n.SLICE="slice",n.UNION="union",n.VALUES="values",n.ZERO_OR_MORE_PATH="ZeroOrMorePath",n.ZERO_OR_ONE_PATH="ZeroOrOnePath",n.COMPOSITE_UPDATE="compositeupdate",n.DELETE_INSERT="deleteinsert",n.LOAD="load",n.CLEAR="clear",n.CREATE="create",n.DROP="drop",n.ADD="add",n.MOVE="move",n.COPY="copy",(r=t.expressionTypes||(t.expressionTypes={})).AGGREGATE="aggregate",r.EXISTENCE="existence",r.NAMED="named",r.OPERATOR="operator",r.TERM="term",r.WILDCARD="wildcard"},376:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const o=a(r(47914)),s=r(18050),c=r(22112),u=r(55403);t.default=class{constructor(e){this.dataFactory=e||new s.DataFactory,this.stringType=this.createTerm("http://www.w3.org/2001/XMLSchema#string")}createAlt(e,t=!0){return this.flattenMulti({type:o.types.ALT,input:e},t)}createAsk(e){return{type:o.types.ASK,input:e}}createBoundAggregate(e,t,r,n,i){const a=this.createAggregateExpression(t,r,n,i);return a.variable=e,a}createBgp(e){return{type:o.types.BGP,patterns:e}}createConstruct(e,t){return{type:o.types.CONSTRUCT,input:e,template:t}}createDescribe(e,t){return{type:o.types.DESCRIBE,input:e,terms:t}}createDistinct(e){return{type:o.types.DISTINCT,input:e}}createExtend(e,t,r){return{type:o.types.EXTEND,input:e,variable:t,expression:r}}createFrom(e,t,r){return{type:o.types.FROM,input:e,default:t,named:r}}createFilter(e,t){return{type:o.types.FILTER,input:e,expression:t}}createGraph(e,t){return{type:o.types.GRAPH,input:e,name:t}}createGroup(e,t,r){return{type:o.types.GROUP,input:e,variables:t,aggregates:r}}createInv(e){return{type:o.types.INV,path:e}}createJoin(e,t=!0){return this.flattenMulti({type:o.types.JOIN,input:e},t)}createLeftJoin(e,t,r){return r?{type:o.types.LEFT_JOIN,input:[e,t],expression:r}:{type:o.types.LEFT_JOIN,input:[e,t]}}createLink(e){return{type:o.types.LINK,iri:e}}createMinus(e,t){return{type:o.types.MINUS,input:[e,t]}}createNop(){return{type:o.types.NOP}}createNps(e){return{type:o.types.NPS,iris:e}}createOneOrMorePath(e){return{type:o.types.ONE_OR_MORE_PATH,path:e}}createOrderBy(e,t){return{type:o.types.ORDER_BY,input:e,expressions:t}}createPath(e,t,r,n){return n?{type:o.types.PATH,subject:e,predicate:t,object:r,graph:n}:{type:o.types.PATH,subject:e,predicate:t,object:r,graph:this.dataFactory.defaultGraph()}}createPattern(e,t,r,n){const i=this.dataFactory.quad(e,t,r,n);return i.type=o.types.PATTERN,i}createProject(e,t){return{type:o.types.PROJECT,input:e,variables:t}}createReduced(e){return{type:o.types.REDUCED,input:e}}createSeq(e,t=!0){return this.flattenMulti({type:o.types.SEQ,input:e},t)}createService(e,t,r){return{type:o.types.SERVICE,input:e,name:t,silent:Boolean(r)}}createSlice(e,t,r){return t=t||0,void 0!==r?{type:o.types.SLICE,input:e,start:t,length:r}:{type:o.types.SLICE,input:e,start:t}}createUnion(e,t=!0){return this.flattenMulti({type:o.types.UNION,input:e},t)}createValues(e,t){return{type:o.types.VALUES,variables:e,bindings:t}}createZeroOrMorePath(e){return{type:o.types.ZERO_OR_MORE_PATH,path:e}}createZeroOrOnePath(e){return{type:o.types.ZERO_OR_ONE_PATH,path:e}}createAggregateExpression(e,t,r,n){return n?{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,separator:n,distinct:r}:{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,distinct:r}}createExistenceExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.EXISTENCE,not:e,input:t}}createNamedExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.NAMED,name:e,args:t}}createOperatorExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.OPERATOR,operator:e,args:t}}createTermExpression(e){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.TERM,term:e}}createWildcardExpression(){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.WILDCARD,wildcard:new u.Wildcard}}createTerm(e){return"$"===e[0]&&(e=e.replace("$","?")),(0,c.stringToTerm)(e,this.dataFactory)}createCompositeUpdate(e){return{type:o.types.COMPOSITE_UPDATE,updates:e}}createDeleteInsert(e,t,r){const n={type:o.types.DELETE_INSERT};return e&&(n.delete=e),t&&(n.insert=t),r&&(n.where=r),n}createLoad(e,t,r){const n={type:o.types.LOAD,source:e};return t&&(n.destination=t),this.addSilent(n,Boolean(r))}createClear(e,t){return this.addSilent({type:o.types.CLEAR,source:e},Boolean(t))}createCreate(e,t){return this.addSilent({type:o.types.CREATE,source:e},Boolean(t))}createDrop(e,t){return this.addSilent({type:o.types.DROP,source:e},Boolean(t))}createAdd(e,t,r){return this.addSilent({type:o.types.ADD,source:e,destination:t},Boolean(r))}createMove(e,t,r){return this.addSilent({type:o.types.MOVE,source:e,destination:t},Boolean(r))}createCopy(e,t,r){return this.addSilent({type:o.types.COPY,source:e,destination:t},Boolean(r))}addSilent(e,t){return t&&(e.silent=t),e}flattenMulti(e,t){if(!t)return e;const r=e.type,n=e.input;let i=[];for(const e of n)e.type===r?i.push(...e.input):i.push(e);return e.input=i,e}}},24693:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.toSparqlJs=t.toSparql=void 0;const s=r(91032),c=r(22112),u=r(55403),l=a(r(47914)),d=o(r(376)),p=o(r(83152)),h=l.types,f=l.expressionTypes;let y;const g=new d.default;function m(e){b();let t=v(e=function(e){return D(e,[])}(e));return"group"===t.type?t.patterns[0]:t}function b(){y={project:!1,extend:[],group:[],aggregates:[],order:[]}}function v(e){switch(e.type!==h.EXTEND&&e.type!==h.ORDER_BY&&e.type!==h.GRAPH&&(y.project=!1),e.type){case h.EXPRESSION:return _(e);case h.ASK:return A(e,h.ASK);case h.BGP:return function(e){let t=e.patterns.map(E);return 0===t.length?null:{type:"bgp",triples:t}}(e);case h.CONSTRUCT:return function(e){return{type:"query",prefixes:{},queryType:"CONSTRUCT",template:e.template.map(E),where:p.default.flatten([v(e.input)])}}(e);case h.DESCRIBE:return A(e,h.DESCRIBE);case h.DISTINCT:return function(e){let t=v(e.input);return t.patterns[0].distinct=!0,t}(e);case h.EXTEND:return function(e){return y.project?(y.extend.push(e),v(e.input)):p.default.flatten([v(e.input),{type:"bind",variable:e.variable,expression:_(e.expression)}])}(e);case h.FROM:return function(e){const t=v(e.input);let r=t;return"group"===t.type&&(r=t.patterns[0]),r.from={default:e.default,named:e.named},t}(e);case h.FILTER:return function(e){return{type:"group",patterns:p.default.flatten([v(e.input),{type:"filter",expression:_(e.expression)}])}}(e);case h.GRAPH:return function(e){return{type:"graph",patterns:p.default.flatten([v(e.input)]),name:e.name}}(e);case h.GROUP:return function(e){const t=v(e.input),r=e.aggregates.map(O);return y.aggregates.push(...r),y.group.push(...e.variables),t}(e);case h.JOIN:return function(e){return p.default.flatten(e.input.map(v)).reduce(((e,t)=>("bgp"!==t.type||0==e.length||"bgp"!==e[e.length-1].type?e.push(t):e[e.length-1].triples.push(...t.triples),e)),[])}(e);case h.LEFT_JOIN:return function(e){const t={type:"optional",patterns:[v(e.input[1])]};return e.expression&&t.patterns.push({type:"filter",expression:_(e.expression)}),t.patterns=p.default.flatten(t.patterns),p.default.flatten([v(e.input[0]),t])}(e);case h.MINUS:return function(e){let t=v(e.input[1]);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),p.default.flatten([v(e.input[0]),{type:"minus",patterns:t}])}(e);case h.NOP:return{};case h.ORDER_BY:return function(e){return y.order.push(...e.expressions),v(e.input)}(e);case h.PATH:return function(e){return{type:"bgp",triples:[{subject:e.subject,predicate:w(e.predicate),object:e.object}]}}(e);case h.PATTERN:return E(e);case h.PROJECT:return A(e,h.PROJECT);case h.REDUCED:return function(e){let t=v(e.input);return t.patterns[0].reduced=!0,t}(e);case h.SERVICE:return function(e){let t=v(e.input);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),{type:"service",name:e.name,silent:e.silent,patterns:t}}(e);case h.SLICE:return function(e){let t=v(e.input),r=t;return t.type&&"group"===t.type&&(r=t.patterns[0]),0!==e.start&&(r.offset=e.start),void 0!==e.length&&(r.limit=e.length),t}(e);case h.UNION:return function(e){return{type:"union",patterns:e.input.map(v).map(S)}}(e);case h.VALUES:return function(e){return{type:"values",values:e.bindings.map((t=>{let r={};for(let n of e.variables){let e=`?${n.value}`;t[e]?r[e]=t[e]:r[e]=void 0}return r}))}}(e);case h.COMPOSITE_UPDATE:return function(e){return{prefixes:{},type:"update",updates:e.updates.map((e=>v(e).updates[0]))}}(e);case h.DELETE_INSERT:return function(e){var t;let r,n=e.where;if(n&&n.type===h.FROM){let e=n;n=e.input,r={default:e.default,named:e.named}}const i=[{updateType:"insertdelete",delete:N(e.delete||[]),insert:N(e.insert||[])}];if(r&&(i[0].using=r),!n||n.type===h.BGP&&0===n.patterns.length)i[0].where=[];else{const e=[];let r=v(D(n,e));if("group"===r.type?i[0].where=r.patterns:i[0].where=[r],e.length>0){if(1!==e.length)throw new Error("This is unexpected and might indicate an error in graph handling for updates.");""!==(null===(t=e[0])||void 0===t?void 0:t.value)&&(i[0].where=[{type:"graph",patterns:i[0].where,name:e[0]}])}}return e.delete||e.where?e.insert||e.where?!e.insert&&e.where&&"bgp"===e.where.type&&(0,s.isomorphic)(e.delete,e.where.patterns)&&(delete i[0].where,i[0].updateType="deletewhere"):(delete i[0].insert,delete i[0].where,e.delete.some((e=>"Variable"===e.subject.termType||"Variable"===e.predicate.termType||"Variable"===e.object.termType))?i[0].updateType="deletewhere":i[0].updateType="delete"):(i[0].updateType="insert",delete i[0].delete,delete i[0].where),{prefixes:{},type:"update",updates:i}}(e);case h.LOAD:return function(e){const t=[{type:"load",silent:Boolean(e.silent),source:e.source}];return e.destination&&(t[0].destination=e.destination),{prefixes:{},type:"update",updates:t}}(e);case h.CLEAR:return function(e){return I(e,"clear")}(e);case h.CREATE:return function(e){return I(e,"create")}(e);case h.DROP:return function(e){return I(e,"drop")}(e);case h.ADD:return function(e){return P(e,"add")}(e);case h.MOVE:return function(e){return P(e,"move")}(e);case h.COPY:return function(e){return P(e,"copy")}(e)}throw new Error(`Unknown Operation type ${e.type}`)}function _(e){switch(e.expressionType){case f.AGGREGATE:return function(e){const t={expression:_(e.expression),type:"aggregate",aggregation:e.aggregator,distinct:e.distinct};return e.separator&&(t.separator=e.separator),t}(e);case f.EXISTENCE:return function(e){return{type:"operation",operator:e.not?"notexists":"exists",args:[{type:"group",patterns:p.default.flatten([v(e.input)])}]}}(e);case f.NAMED:return function(e){return{type:"functionCall",function:e.name,args:e.args.map(_)}}(e);case f.OPERATOR:return function(e){if("desc"===e.operator){return{expression:_(e.args[0]),descending:!0}}const t={type:"operation",operator:e.operator,args:e.args.map(_)};return"in"!==t.operator&&"notin"!==t.operator||(t.args=[t.args[0]].concat([t.args.slice(1)])),t}(e);case f.TERM:return function(e){return e.term}(e);case f.WILDCARD:return function(e){return e.wildcard}(e)}throw new Error(`Unknown Expression Operation type ${e.expressionType}`)}function w(e){switch(e.type){case h.ALT:return function(e){const t=e.input.map(w);return t.every((e=>"pathType"in e&&"!"===e.pathType))?{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:p.default.flatten(t.map((e=>e.items)))}]}:{type:"path",pathType:"|",items:t}}(e);case h.INV:return function(e){if(e.path.type===h.NPS){const t=e.path.iris.map((e=>({type:"path",pathType:"^",items:[e]})));return t.length<=1?{type:"path",pathType:"!",items:t}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:t}]}}return{type:"path",pathType:"^",items:[w(e.path)]}}(e);case h.LINK:return function(e){return e.iri}(e);case h.NPS:return function(e){return e.iris.length<=1?{type:"path",pathType:"!",items:e.iris}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:e.iris}]}}(e);case h.ONE_OR_MORE_PATH:return function(e){return{type:"path",pathType:"+",items:[w(e.path)]}}(e);case h.SEQ:return function(e){return{type:"path",pathType:"/",items:e.input.map(w)}}(e);case h.ZERO_OR_MORE_PATH:return function(e){return{type:"path",pathType:"*",items:[w(e.path)]}}(e);case h.ZERO_OR_ONE_PATH:return function(e){return{type:"path",pathType:"?",items:[w(e.path)]}}(e)}throw new Error(`Unknown Path type ${e.type}`)}function T(e){return(0,c.termToString)(e)}function S(e){return Array.isArray(e)?1===e.length?e[0]:{type:"group",patterns:e}:e}function O(e){return e}function E(e){return{subject:e.subject,predicate:e.predicate,object:e.object}}function x(e,t){let r=p.default.isSimpleTerm(e)?T(e):e;if("string"==typeof r){if(t[r])return t[r]}else if(Array.isArray(e))e=e.map((e=>x(e,t)));else for(let r of Object.keys(e))e[r]=x(e[r],t);return e}function A(e,t){const r={type:"query",prefixes:{}},n=r;let i;t===h.PROJECT?(r.queryType="SELECT",i=e.variables):t===h.ASK?r.queryType="ASK":t===h.DESCRIBE&&(r.queryType="DESCRIBE",i=e.terms);const a=y.extend,o=y.group,s=y.aggregates,c=y.order;b(),y.project=!0;let l=p.default.flatten([v(e.input)]);1===l.length&&"group"===l[0].type&&(l=l[0].patterns),r.where=l;let d={};for(let e of y.aggregates)d[T(e.variable)]=_(e);let f={};for(let e=y.extend.length-1;e>=0;--e){let t=y.extend[e];f[T(t.variable)]=x(_(t.expression),d)}if(y.group.length>0&&(n.group=y.group.map((e=>{let t=T(e);if(f[t]){let r=f[t];return delete f[t],{variable:e,expression:r}}return{expression:e}}))),y.order.length>0&&(n.order=y.order.map(v).map((e=>e.descending?e:{expression:e}))),i&&(n.variables=i.map((e=>{let t=T(e);return f[t]?{variable:e,expression:f[t]}:e})),0===n.variables.length&&(n.variables=[new u.Wildcard])),r.where.length>0&&"filter"===r.where[r.where.length-1].type){const e=r.where[r.where.length-1];R(e,Object.keys(d))&&(n.having=p.default.flatten([x(e.expression,d)]),r.where.splice(-1))}return y.extend=a,y.group=o,y.aggregates=s,y.order=c,{type:"group",patterns:[n]}}function R(e,t){return p.default.isSimpleTerm(e)?t.indexOf(T(e))>=0:Array.isArray(e)?e.some((e=>R(e,t))):e===Object(e)?Object.keys(e).some((r=>R(e[r],t))):t.indexOf(e)>=0}function I(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return"DEFAULT"===e.source?r[0].graph={default:!0}:"NAMED"===e.source?r[0].graph={named:!0}:"ALL"===e.source?r[0].graph={all:!0}:r[0].graph={type:"graph",name:e.source},{prefixes:{},type:"update",updates:r}}function P(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return r[0].source="DEFAULT"===e.source?{type:"graph",default:!0}:{type:"graph",name:e.source},r[0].destination="DEFAULT"===e.destination?{type:"graph",default:!0}:{type:"graph",name:e.destination},{prefixes:{},type:"update",updates:r}}function N(e){if(!e)return[];const t={};return e.forEach((e=>{const r=e.graph.value;t[r]||(t[r]=[]),t[r].push(e)})),Object.keys(t).map((e=>""===e?{type:"bgp",triples:t[e].map(E)}:{type:"graph",triples:t[e].map(E),name:t[e][0].graph}))}function D(e,t){if(Array.isArray(e))return e.map((e=>D(e,t)));if(!e.type)return e;if(e.type===h.DELETE_INSERT)return e;if((e.type===h.PATTERN||e.type===h.PATH)&&e.graph)return t.push(e.graph),""!==e.graph.name?e.type===h.PATTERN?g.createPattern(e.subject,e.predicate,e.object):g.createPath(e.subject,e.predicate,e.object):e;const r={},n={},i={};for(let t of Object.keys(e)){const a=[];if(r[t]=D(e[t],a),a.length>0){n[t]=a;for(const e of a)i[e.value]=e}}const a=Object.keys(i);if(a.length>0)if(1!==a.length||[h.PROJECT,h.SERVICE].includes(e.type)){if(e.type===h.BGP)return function(e,t){var r;const n={};for(let i=0;i""===n[e][0].value?t:g.createGraph(t,n[e][r]))):""!==n[e][0].value&&(r[e]=g.createGraph(t,n[e][0]))}}else t.push(i[a[0]]);return r}t.toSparql=function(e,t={}){return new u.Generator(t).stringify(m(e))},t.toSparqlJs=m},71029:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(53933),c=r(22112),u=a(r(47914)),l=o(r(376)),d=o(r(83152)),p=r(55403).Parser,h=u.types;let f,y=new Set,g=0,m=!1;function b(e,t,r){if(y=new Set,g=0,m=Boolean(t),!e.type)return f.createNop();if("query"!==e.type&&"update"!==e.type)throw new Error("Translate only works on complete query or update objects.");let n;var i;return w(e),"query"===e.type?(n=S({type:"group",patterns:e.where||[]}),n=function(e,t){const r=e,n=[],i={};if(r.variables=r.variables&&r.variables.map((e=>C(e,i))),r.having=r.having&&r.having.map((e=>C(e,i))),r.order=r.order&&r.order.map((e=>C(e,i))),r.group||Object.keys(i).length>0){const e=Object.keys(i).map((e=>function(e,t){if("aggregate"!==e.type||!e.aggregation)throw new Error(`Unexpected input: ${JSON.stringify(e)}`);const r=O(e);return r.variable=t,r}(i[e],f.createTerm(e)))),n=[];if(r.group)for(const e of r.group)if(d.default.isSimpleTerm(e.expression))n.push(e.expression);else{const r="variable"in e?e.variable:A();t=f.createExtend(t,r,O(e.expression)),n.push(r)}t=f.createGroup(t,n,e)}if(r.having)for(let e of r.having)t=f.createFilter(t,O(e));e.values&&(t=f.createJoin([t,j(e)]));let a=[];if("SELECT"===e.queryType||"DESCRIBE"===e.queryType)if(e.variables.some((e=>e&&d.default.isWildcard(e))))a=Object.values(T(e)).sort(((e,t)=>e.value.localeCompare(t.value)));else for(let t of e.variables)_(t)||!("variable"in t)?a.push(t):t.variable&&(a.push(t.variable),n.push(t));for(let e of n)t=f.createExtend(t,e.variable,O(e.expression));return r.order&&(t=f.createOrderBy(t,r.order.map((e=>{let t=O(e.expression);return e.descending&&(t=f.createOperatorExpression("desc",[t])),t})))),"SELECT"===e.queryType&&(t=f.createProject(t,a)),r.distinct&&(t=f.createDistinct(t)),r.reduced&&(t=f.createReduced(t)),"CONSTRUCT"===e.queryType?t=f.createConstruct(t,(e.template||[]).map(R)):"ASK"===e.queryType?t=f.createAsk(t):"DESCRIBE"===e.queryType&&(t=f.createDescribe(t,a)),(r.offset||r.limit)&&(t=f.createSlice(t,r.offset||0,r.limit)),r.from&&(t=f.createFrom(t,r.from.default,r.from.named)),t}(e,n)):"update"===e.type&&(n=1===(i=e).updates.length?M(i.updates[0]):f.createCompositeUpdate(i.updates.map(M))),r&&(n=k(n)),n}function v(e){return Boolean(null==e?void 0:e.termType)}function _(e){return"Variable"===(null==e?void 0:e.termType)}function w(e){if(v(e))_(e)&&y.add(`?${e.value}`);else if(Array.isArray(e))for(const t of e)w(t);else if(e&&"object"==typeof e)for(let t of Object.keys(e))t.startsWith("?")?y.add(t):t.startsWith("$")&&y.add(`?${t.slice(1)}`),w(e[t])}function T(e){let t={};if((r=e).subject&&r.predicate&&r.object){const r=[T(e.subject),T(e.predicate),T(e.object),e.graph?T(e.graph):{}];Object.assign(t,...r)}else if(v(e))_(e)&&(t[e.value]=e);else if("bgp"===e.type){const r=e.triples;Object.assign(t,...r.map(T))}else if("path"===e.type)Object.assign(t,...e.items.map(T));else if("group"===e.type||"union"===e.type||"optional"===e.type)Object.assign(t,...e.patterns.map(T));else if("service"===e.type||"graph"===e.type)Object.assign(t,T(e.name)),Object.assign(t,...e.patterns.map(T));else if("bind"===e.type)Object.assign(t,T(e.variable));else if("values"===e.type){if(e.values.length>0){const r=Object.keys(e.values[0]).map((e=>f.createTerm(e)));Object.assign(t,...r.map(T))}}else if("query"===e.type&&("SELECT"===e.queryType||"DESCRIBE"===e.queryType)){e.where&&e.variables.some(d.default.isWildcard)&&Object.assign(t,...e.where.map(T));for(const r of e.variables)_(r)?Object.assign(t,T(r)):r.variable&&Object.assign(t,T(r.variable));if("SELECT"===e.queryType){if(e.group)for(const r of e.group)r.variable&&Object.assign(t,T(r.variable));if(e.values){const r={type:"values",values:e.values};Object.assign(t,T(r))}}}var r;return t}function S(e){if("bgp"===e.type)return function(e){let t=[],r=[];for(let i of e.triples)if("pathType"in i.predicate){let e=x((n=i).subject,E(n.predicate),n.object);for(let n of e)n.type===h.PATH?(t.length>0&&r.push(f.createBgp(t)),t=[],r.push(n)):t.push(n)}else t.push(R(i));var n;return t.length>0&&r.push(f.createBgp(t)),1===r.length?r[0]:f.createJoin(r)}(e);if("union"===e.type)return f.createUnion(e.patterns.map((e=>("group"!==e.type&&(e={type:"group",patterns:[e]}),S(e)))));if("graph"===e.type){let t=S({type:"group",patterns:e.patterns});return t=m?P(t,e.name):f.createGraph(t,e.name),t}if("values"===e.type)return j(e);if("query"===e.type)return b(e,m,!1);if("group"===e.type){let t=[],r=[];for(let n of e.patterns)("filter"===n.type?t:r).push(n);let n=r.reduce(N,f.createBgp([])),i=t.map((e=>O(e.expression)));return i.length>0&&(n=f.createFilter(n,i.reduce(((e,t)=>f.createOperatorExpression("&&",[e,t]))))),n}throw new Error(`Unexpected type: ${e.type}`)}function O(e){if(d.default.isSimpleTerm(e))return f.createTermExpression(e);if(d.default.isQuad(e))return d.default.hasQuadVariables(e)?f.createOperatorExpression("triple",[O(e.subject),O(e.predicate),O(e.object)]):f.createTermExpression(e);if(d.default.isWildcard(e))return f.createWildcardExpression();if("aggregation"in e)return f.createAggregateExpression(e.aggregation,O(e.expression),Boolean(e.distinct),e.separator);if("function"in e)return f.createNamedExpression(e.function,e.args.map(O));if("operator"in e)return"exists"===e.operator||"notexists"===e.operator?f.createExistenceExpression("notexists"===e.operator,S(e.args[0])):("in"!==e.operator&&"notin"!==e.operator||(e.args=[e.args[0]].concat(e.args[1])),f.createOperatorExpression(e.operator,e.args.map(O)));throw new Error(`Unknown expression: ${JSON.stringify(e)}`)}function E(e){if(d.default.isSimpleTerm(e)){if("NamedNode"===e.termType)return f.createLink(e);throw new Error(`Path predicate should be a NamedNode, got ${JSON.stringify(e)}`)}if("^"===e.pathType)return f.createInv(E(e.items[0]));if("!"===e.pathType){let t,r=[],n=[];t="pathType"in e.items[0]&&"|"===e.items[0].pathType?e.items[0].items:e.items;for(let e of t)if(d.default.isSimpleTerm(e))r.push(e);else{if("^"!==e.pathType)throw new Error(`Unexpected item: ${JSON.stringify(e)}`);n.push(e.items[0])}let i=f.createNps(r),a=f.createInv(f.createNps(n));return 0===n.length?i:0===r.length?a:f.createAlt([i,a])}if("/"===e.pathType)return f.createSeq(e.items.map(E));if("|"===e.pathType)return f.createAlt(e.items.map(E));if("*"===e.pathType)return f.createZeroOrMorePath(E(e.items[0]));if("+"===e.pathType)return f.createOneOrMorePath(E(e.items[0]));if("?"===e.pathType)return f.createZeroOrOnePath(E(e.items[0]));throw new Error(`Unable to translate path expression ${JSON.stringify(e)}`)}function x(e,t,r){if(t.type===h.LINK)return[f.createPattern(e,t.iri,r)];if(t.type===h.INV)return x(r,t.path,e);if(t.type===h.SEQ){let n=e;return d.default.flatten(t.input.map(((e,i)=>{const a=i===t.input.length-1?r:A(),o=x(n,e,a);return"Variable"===a.termType&&(n=a),o})))}return[f.createPath(e,t,r)]}function A(){let e="?var"+g++;return y.has(e)?A():(y.add(e),f.createTerm(e))}function R(e){if("pathType"in e.predicate)throw new Error("Trying to translate property path to quad.");return f.createPattern(e.subject,e.predicate,e.object,e.graph)}t.default=function(e,t){let r;if(t=t||{},f=new l.default(t.dataFactory),"string"==typeof e){let n=new p(t);n._resetBlanks(),r=n.parse(e)}else r=e;return b(r,t.quads,t.blankToVariable)};let I=Object.values(h);function P(e,t,r){if(e.type===h.GRAPH){if(r)throw new Error("Recursing through nested GRAPH statements with a replacement is impossible.");e=P(e.input,e.name)}else if(e.type===h.SERVICE);else if(e.type===h.BGP)e.patterns=e.patterns.map((e=>(r&&(e.subject.equals(t)&&(e.subject=r),e.predicate.equals(t)&&(e.predicate=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t),e)));else if(e.type===h.PATH)r&&(e.subject.equals(t)&&(e.subject=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t);else if(e.type!==h.PROJECT||r)if(e.type!==h.EXTEND||r)for(let n of Object.keys(e))Array.isArray(e[n])?e[n]=e[n].map((e=>P(e,t,r))):I.indexOf(e[n].type)>=0?e[n]=P(e[n],t,r):r&&_(e[n])&&e[n].equals(t)&&(e[n]=r);else e.variable.equals(t)&&(r=A()),e.input=P(e.input,t,r);else e.variables.some((e=>e.equals(t)))||(r=A()),e.input=P(e.input,t,r);return e}function N(e,t){if("optional"===t.type){const r=S({type:"group",patterns:t.patterns});e=r.type===h.FILTER?f.createLeftJoin(e,r.input,r.expression):f.createLeftJoin(e,r)}else if("minus"===t.type){const r=S({type:"group",patterns:t.patterns});e=f.createMinus(e,r)}else if("bind"===t.type)e=f.createExtend(e,t.variable,O(t.expression));else if("service"===t.type){const r={type:"group",patterns:t.patterns};e=D(e,f.createService(S(r),t.name,t.silent))}else e=D(e,S(t));return e}function D(e,t){return e.type===h.BGP&&t.type===h.BGP?e=f.createBgp([...e.patterns,...t.patterns]):e.type===h.BGP&&0===e.patterns.length?e=t:t.type===h.BGP&&0===t.patterns.length||(e=f.createJoin([e,t])),e}function j(e){let t=(0===e.values.length?[]:Object.keys(e.values[0])).map(f.createTerm.bind(f)),r=e.values.map((e=>{let t=Object.keys(e);t=t.filter((t=>void 0!==e[t]));let r={};for(let n of t)r[n]=e[n];return r}));return f.createValues(t,r)}function C(e,t){if("type"in e&&"aggregate"===e.type){let r,n=!1;for(let i of Object.keys(t))if(s(t[i],e)){r=f.createTerm(i),n=!0;break}return n||(r=A(),t[(0,c.termToString)(r)]=e),r}return"expression"in e&&e.expression?{...e,expression:C(e.expression,t)}:"args"in e&&e.args?{...e,args:e.args.map((e=>C(e,t)))}:e}function M(e){if("type"in e){if("load"===e.type)return function(e){return f.createLoad(e.source,e.destination,e.silent)}(e);if("clear"===e.type||"create"===e.type||"drop"===e.type)return function(e){let t;switch(t=d.default.isSimpleTerm(e.graph)?e.graph:e.graph.all?"ALL":e.graph.default?"DEFAULT":e.graph.named?"NAMED":e.graph.name,e.type){case"clear":return f.createClear(t,e.silent);case"create":return f.createCreate(t,e.silent);case"drop":return f.createDrop(t,e.silent)}}(e);if("add"===e.type||"copy"===e.type||"move"===e.type)return function(e){const t=e.source.default?"DEFAULT":e.source.name,r=e.destination.default?"DEFAULT":e.destination.name;switch(e.type){case"copy":return f.createCopy(t,r,e.silent);case"move":return f.createMove(t,r,e.silent);case"add":return f.createAdd(t,r,e.silent)}}(e)}else if("insertdelete"===e.updateType||"deletewhere"===e.updateType||"delete"===e.updateType||"insert"===e.updateType)return function(e){if(!m)throw new Error("INSERT/DELETE operations are only supported with quads option enabled");let t,r=[],n=[];if(e.delete&&(r=d.default.flatten(e.delete.map((t=>L(t,e.graph))))),e.insert&&(n=d.default.flatten(e.insert.map((t=>L(t,e.graph))))),e.where&&e.where.length>0){t=S({type:"group",patterns:e.where});const r=e.using;r?t=f.createFrom(t,r.default,r.named):e.graph&&(t=P(t,e.graph))}else"deletewhere"===e.updateType&&r.length>0&&(t=f.createBgp(r));return f.createDeleteInsert(r.length>0?r:void 0,n.length>0?n:void 0,t)}(e);throw new Error(`Unknown update type ${JSON.stringify(e)}`)}function L(e,t){let r=t;"graph"===e.type&&(r=e.name);let n=e.triples;return r&&(n=n.map((e=>Object.assign(e,{graph:r})))),n.map(R)}function k(e){const t={},r=Array.from(y).reduce(((e,t)=>(e[t]=!0,e)),{});return d.default.mapOperation(e,{[u.types.DELETE_INSERT]:e=>({result:f.createDeleteInsert(e.delete,e.insert,e.where&&k(e.where)),recurse:!1}),[u.types.PATH]:(e,t)=>({result:t.createPath(n(e.subject),e.predicate,n(e.object),n(e.graph)),recurse:!1}),[u.types.PATTERN]:(e,t)=>({result:t.createPattern(n(e.subject),n(e.predicate),n(e.object),n(e.graph)),recurse:!1}),[u.types.CONSTRUCT]:e=>({result:f.createConstruct(k(e.input),e.template),recurse:!1})});function n(e){if("BlankNode"===e.termType){let n=t[e.value];return n||(n=d.default.createUniqueVariable(e.value,r,f.dataFactory),r[n.value]=!0,t[e.value]=n),n}return e}}},83152:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(47914),a=n(r(376)),o=r(13252);class s{static flatten(e){return Array.prototype.concat(...e).filter((e=>e))}static objectify(e){if(e.termType){if("Quad"===e.termType)return{type:"pattern",termType:"Quad",subject:s.objectify(e.subject),predicate:s.objectify(e.predicate),object:s.objectify(e.object),graph:s.objectify(e.graph)};{let t={termType:e.termType,value:e.value};return e.language&&(t.language=e.language),e.datatype&&(t.datatype=s.objectify(e.datatype)),t}}if(Array.isArray(e))return e.map((e=>s.objectify(e)));if(e===Object(e)){let t={};for(let r of Object.keys(e))t[r]=s.objectify(e[r]);return t}return e}static inScopeVariables(e){const t=[];function r(e){t.find((t=>e.value===t.value))||t.push(e)}function n(e){"Variable"===e.subject.termType&&r(e.subject),"Variable"===e.predicate.termType&&r(e.predicate),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.predicate.termType&&n(e.predicate),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph)}return s.recurseOperation(e,{[i.types.EXPRESSION]:e=>(e.expressionType===i.expressionTypes.AGGREGATE&&e.variable&&r(e.variable),!0),[i.types.EXTEND]:e=>(r(e.variable),!0),[i.types.GRAPH]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.GROUP]:e=>(e.variables.forEach(r),!0),[i.types.PATH]:e=>("Variable"===e.subject.termType&&r(e.subject),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph),!0),[i.types.PATTERN]:e=>(n(e),!0),[i.types.PROJECT]:e=>(e.variables.forEach(r),!1),[i.types.SERVICE]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.VALUES]:e=>(e.variables.forEach(r),!0)}),t}static recurseOperation(e,t){let r=e,n=!0;const a=t[e.type];if(a&&(n=a(e)),!n)return;let o=e=>s.recurseOperation(e,t);switch(r.type){case i.types.ALT:r.input.map(o);break;case i.types.ASK:o(r.input);break;case i.types.BGP:r.patterns.forEach(o);break;case i.types.CONSTRUCT:o(r.input),r.template.map(o);break;case i.types.DESCRIBE:case i.types.DISTINCT:o(r.input);break;case i.types.EXPRESSION:r.expressionType===i.expressionTypes.EXISTENCE&&o(r.input);break;case i.types.EXTEND:case i.types.FILTER:o(r.input),o(r.expression);break;case i.types.FROM:case i.types.GRAPH:o(r.input);break;case i.types.GROUP:o(r.input),r.aggregates.forEach(o);break;case i.types.INV:o(r.path);break;case i.types.JOIN:r.input.map(o);break;case i.types.LEFT_JOIN:r.input.map(o),r.expression&&o(r.expression);break;case i.types.LINK:break;case i.types.MINUS:r.input.map(o);break;case i.types.NOP:case i.types.NPS:break;case i.types.ONE_OR_MORE_PATH:o(r.path);break;case i.types.ORDER_BY:o(r.input),r.expressions.forEach(o);break;case i.types.PATH:o(r.predicate);break;case i.types.PATTERN:break;case i.types.PROJECT:case i.types.REDUCED:o(r.input);break;case i.types.SEQ:r.input.map(o);break;case i.types.SERVICE:case i.types.SLICE:o(r.input);break;case i.types.UNION:r.input.map(o);break;case i.types.VALUES:break;case i.types.ZERO_OR_MORE_PATH:case i.types.ZERO_OR_ONE_PATH:o(r.path);break;case i.types.COMPOSITE_UPDATE:r.updates.forEach((e=>o(e)));break;case i.types.DELETE_INSERT:r.delete&&r.delete.forEach((e=>o(e))),r.insert&&r.insert.forEach((e=>o(e))),r.where&&o(r.where);break;case i.types.LOAD:case i.types.CLEAR:case i.types.CREATE:case i.types.DROP:case i.types.ADD:case i.types.MOVE:case i.types.COPY:break;default:throw new Error(`Unknown Operation type ${r.type}`)}}static mapOperation(e,t,r){let n=e,o=!0,c=!0;r=r||new a.default;const u=t[e.type];if(u){const t=u(e,r);n=t.result,o=t.recurse,c=!1!==t.copyMetadata}let l;if(c&&(n.metadata||e.metadata)&&(l={...n.metadata,...e.metadata}),!o)return l&&(n.metadata=l),n;let d=e=>s.mapOperation(e,t,r);switch(n.type){case i.types.ALT:n=r.createAlt(n.input.map(d));break;case i.types.ASK:n=r.createAsk(d(n.input));break;case i.types.BGP:n=r.createBgp(n.patterns.map(d));break;case i.types.CONSTRUCT:n=r.createConstruct(d(n.input),n.template.map(d));break;case i.types.DESCRIBE:n=r.createDescribe(d(n.input),n.terms);break;case i.types.DISTINCT:n=r.createDistinct(d(n.input));break;case i.types.EXPRESSION:n=s.mapExpression(n,t,r);break;case i.types.EXTEND:n=r.createExtend(d(n.input),n.variable,d(n.expression));break;case i.types.FILTER:n=r.createFilter(d(n.input),d(n.expression));break;case i.types.FROM:n=r.createFrom(d(n.input),[...n.default],[...n.named]);break;case i.types.GRAPH:n=r.createGraph(d(n.input),n.name);break;case i.types.GROUP:n=r.createGroup(d(n.input),[].concat(n.variables),n.aggregates.map(d));break;case i.types.INV:n=r.createInv(d(n.path));break;case i.types.JOIN:n=r.createJoin(n.input.map(d));break;case i.types.LEFT_JOIN:n=r.createLeftJoin(d(n.input[0]),d(n.input[1]),n.expression?d(n.expression):void 0);break;case i.types.LINK:n=r.createLink(n.iri);break;case i.types.MINUS:n=r.createMinus(d(n.input[0]),d(n.input[1]));break;case i.types.NOP:n=r.createNop();break;case i.types.NPS:n=r.createNps([].concat(n.iris));break;case i.types.ONE_OR_MORE_PATH:n=r.createOneOrMorePath(d(n.path));break;case i.types.ORDER_BY:n=r.createOrderBy(d(n.input),n.expressions.map(d));break;case i.types.PATH:n=r.createPath(n.subject,d(n.predicate),n.object,n.graph);break;case i.types.PATTERN:n=r.createPattern(n.subject,n.predicate,n.object,n.graph);break;case i.types.PROJECT:n=r.createProject(d(n.input),[...n.variables]);break;case i.types.REDUCED:n=r.createReduced(d(n.input));break;case i.types.SEQ:n=r.createSeq(n.input.map(d));break;case i.types.SERVICE:n=r.createService(d(n.input),n.name,n.silent);break;case i.types.SLICE:n=r.createSlice(d(n.input),n.start,n.length);break;case i.types.UNION:n=r.createUnion(n.input.map(d));break;case i.types.VALUES:n=r.createValues([].concat(n.variables),n.bindings.map((e=>Object.assign({},e))));break;case i.types.ZERO_OR_MORE_PATH:n=r.createZeroOrMorePath(d(n.path));break;case i.types.ZERO_OR_ONE_PATH:n=r.createZeroOrOnePath(d(n.path));break;case i.types.COMPOSITE_UPDATE:n=r.createCompositeUpdate(n.updates.map(d));break;case i.types.DELETE_INSERT:n=r.createDeleteInsert(n.delete?n.delete.map(d):void 0,n.insert?n.insert.map(d):void 0,n.where?d(n.where):void 0);break;case i.types.LOAD:n=r.createLoad(n.source,n.destination,n.silent);break;case i.types.CLEAR:n=r.createClear(n.source,n.silent);break;case i.types.CREATE:n=r.createCreate(n.source,n.silent);break;case i.types.DROP:n=r.createDrop(n.source,n.silent);break;case i.types.ADD:n=r.createAdd(n.source,n.destination);break;case i.types.MOVE:n=r.createMove(n.source,n.destination);break;case i.types.COPY:n=r.createCopy(n.source,n.destination);break;default:throw new Error(`Unknown Operation type ${n.type}`)}return l&&(n.metadata=l),n}static mapExpression(e,t,r){let n=e,o=!0;r=r||new a.default;const c=t[e.expressionType];if(c&&({result:n,recurse:o}=c(e,r)),!o)return n;let u=e=>s.mapOperation(e,t,r);switch(e.expressionType){case i.expressionTypes.AGGREGATE:return e.variable?r.createBoundAggregate(e.variable,e.aggregator,u(e.expression),e.distinct,e.separator):r.createAggregateExpression(e.aggregator,u(e.expression),e.distinct,e.separator);case i.expressionTypes.EXISTENCE:return r.createExistenceExpression(e.not,u(e.input));case i.expressionTypes.NAMED:return r.createNamedExpression(e.name,e.args.map(u));case i.expressionTypes.OPERATOR:return r.createOperatorExpression(e.operator,e.args.map(u));case i.expressionTypes.TERM:return r.createTermExpression(e.term);case i.expressionTypes.WILDCARD:return r.createWildcardExpression();default:throw new Error(`Unknown Expression type ${e.expressionType}`)}}static cloneOperation(e){return s.mapOperation(e,{})}static cloneExpression(e){return s.mapExpression(e,{})}static createUniqueVariable(e,t,r){let n=0,i=e;for(;t[i];)i=`${e}${n++}`;return r.variable(i)}static isSimpleTerm(e){return void 0!==e.termType&&"Quad"!==e.termType&&"Wildcard"!==e.termType}static isQuad(e){return"Quad"===e.termType}static hasQuadVariables(e){return(0,o.someTermsNested)(e,(e=>"Variable"===e.termType))}static isWildcard(e){return"Wildcard"===e.termType}}t.default=s},33206: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];o(i)&&(this._prefixByIri[i]=n,r.push(i))}var a=r.join("|").replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&");this._prefixRegex=new RegExp("^("+a+")([a-zA-Z][\\-_a-zA-Z0-9]*)$"),this._usedPrefixes={},this._sparqlStar=e.sparqlStar,this._indent=o(e.indent)?e.indent:" ",this._newline=o(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+=u(e.variables,void 0,(function(e){return s(e)?this.toEntity(e):"("+this.toExpression(e.expression)+" AS "+a(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+=u(e.updates,";"+this._newline,this.toUpdate,this)),e.group&&(t+="GROUP BY "+u(e.group,void 0,(function(e){var t=s(e.expression)?this.toEntity(e.expression):"("+this.toExpression(e.expression)+")";return e.variable?"("+t+" AS "+a(e.variable)+")":t}),this)+this._newline),e.having&&(t+="HAVING ("+u(e.having,void 0,this.toExpression,this)+")"+this._newline),e.order&&(t+="ORDER BY "+u(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 u(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":case">=":case"<=":case"&&":case"||":case"=":case"!=":case"+":case"-":case"*":case"/":return(s(i[0])?this.toEntity(i[0]):"("+this.toExpression(i[0])+")")+" "+t+" "+(s(i[1])?this.toEntity(i[1]):"("+this.toExpression(i[1])+")");case"!":return"!("+this.toExpression(i[0])+")";case"uplus":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+"("+(o(i[1])?i[1]:u(i[1],", ",this.toExpression,this))+")";case"notexists":t="NOT EXISTS";case"exists":return t+" "+this.group(i[0],!0);default:return t+"("+u(i,", ",this.toExpression,this)+")"}default:throw new Error("Unknown expression type: "+e.type)}},t.prototype.toEntity=function(e){if(s(e))switch(e.termType){case"Wildcard":return"*";case"Variable":return a(e);case"BlankNode":return"_:"+e.value;case"Literal":var t=e.value||"",i=e.language||"",o=e.datatype;if(e='"'+t.replace(r,n)+'"',i)e+="@"+i;else if(o){if(!this._explicitDatatype)switch(o.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(o.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 c=e.items.map(this.toEntity,this),u=e.pathType;switch(u){case"^":case"!":return u+c[0];case"*":case"+":case"?":return"("+c[0]+u+")";default:return"("+c.join(u)+")"}}};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 a(e){return"?"+e.value}function o(e){return"string"==typeof e}function s(e){return"string"==typeof e.termType}function c(e,t){if(!e||!s(e))return!1;if(!t||!s(t))return!1;if(e.termType!==t.termType)return!1;switch(e.termType){case"Literal":return e.value===t.value&&e.language===t.language&&c(e.datatype,t.datatype);case"Quad":return c(e.subject,t.subject)&&c(e.predicate,t.predicate)&&c(e.object,t.object)&&c(e.graph,t.graph);default:return e.value===t.value}}function u(e,t,r,n){return e.map(r,n).join(o(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.silent?"SILENT ":"")+(e.source.default?"DEFAULT":this.toEntity(e.source.name))+" 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)}}}},17308:(e,t,r)=>{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,13,15,16,24,32,36,41,45,100,110,113,115,116,123,126,131,197,224,229,308,329,330,331,332,333],n=[2,247],i=[100,110,113,115,116,123,126,131,329,330,331,332,333],a=[2,409],o=[1,18],s=[1,27],c=[13,16,45,197,224,229,308],u=[28,29,53],l=[28,53],d=[1,42],p=[1,45],h=[1,41],f=[1,44],y=[123,126],g=[1,67],m=[39,45,87],b=[13,16,45,197,224,308],v=[1,87],_=[2,281],w=[1,86],T=[13,16,45,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],S=[6,28,29,53,63,70,73,81,83,85],O=[6,13,16,28,29,53,63,70,73,81,83,85,87,308],E=[6,13,16,28,29,45,53,63,70,73,81,82,83,85,87,89,197,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314],x=[6,13,16,28,29,31,39,45,47,48,53,63,70,73,81,82,83,85,87,89,109,112,121,123,126,128,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,337,338,340,341,342,343,344,345,346],A=[13,16,308],R=[112,132,327,334],I=[13,16,112,132,308],P=[1,111],N=[1,117],D=[112,132,327,328,334],j=[13,16,112,132,308,328],C=[28,29,45,53,87],M=[1,138],L=[1,151],k=[1,128],F=[1,127],B=[1,129],U=[1,140],q=[1,141],V=[1,142],Q=[1,143],$=[1,144],H=[1,145],G=[1,147],z=[1,148],K=[2,457],X=[1,158],J=[1,159],W=[1,160],Y=[1,152],Z=[1,153],ee=[1,156],te=[1,171],re=[1,172],ne=[1,173],ie=[1,174],ae=[1,175],oe=[1,176],se=[1,167],ce=[1,168],ue=[1,169],le=[1,170],de=[1,157],pe=[1,166],he=[1,161],fe=[1,162],ye=[1,163],ge=[1,164],me=[1,165],be=[6,13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335],ve=[1,195],_e=[6,31,73,81,83,85],we=[2,285],Te=[1,199],Se=[1,201],Oe=[6,31,70,73,81,83,85],Ee=[2,283],xe=[1,207],Ae=[1,218],Re=[1,223],Ie=[1,219],Pe=[1,225],Ne=[1,226],De=[1,224],je=[6,63,70,73,81,83,85],Ce=[1,236],Me=[2,334],Le=[1,243],ke=[1,241],Fe=[6,193],Be=[2,349],Ue=[2,339],qe=[28,128],Ve=[47,48,193,272],Qe=[47,48,193,242,272],$e=[47,48,193,242,246,272],He=[47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,341,342,343,344,345,346],Ge=[39,47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,338,341,342,343,344,345,346],ze=[1,271],Ke=[1,270],Xe=[6,13,16,29,31,39,45,47,48,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,338,341,342,343,344,345,346,347,348,349,350,351],Je=[1,281],We=[1,280],Ye=[13,16,29,31,39,45,47,48,82,85,87,89,112,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346],Ze=[45,89],et=[13,16,29,31,39,45,47,48,82,85,87,89,112,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,338,341,342,343,344,345,346],tt=[13,16,31,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],rt=[31,89],nt=[48,87],it=[6,13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337,338],at=[6,13,16,39,45,48,82,87,89,231,263,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,337,338,340],ot=[1,313],st=[6,85],ct=[6,31,81,83,85],ut=[2,361],lt=[2,353],dt=[1,343],pt=[31,112,335],ht=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],ft=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335],yt=[6,109,193],gt=[31,112],mt=[13,16,45,82,87,224,263,265,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312,346,347,348,349,350,351],bt=[1,390],vt=[1,391],_t=[13,16,87,197,308,314],wt=[13,16,39,45,82,87,224,263,265,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312,346,347,348,349,350,351],Tt=[1,417],St=[1,418],Ot=[13,16,48,197,229,308],Et=[6,31,85],xt=[6,13,16,31,45,73,81,83,85,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],At=[6,13,16,29,31,45,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,231,268,269,270,271,273,274,276,277,279,280,283,285,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,346,347,348,349,350,351],Rt=[29,31,85,112,159,160,161,163,164],It=[1,443],Pt=[1,444],Nt=[1,449],Dt=[31,112,193,232,318,335],jt=[13,16,45,48,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],Ct=[13,16,31,45,48,82,87,89,112,193,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],Mt=[13,16,29,31,45,48,82,85,87,89,112,159,160,161,163,164,193,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],Lt=[13,16,31,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],kt=[31,45],Ft=[1,507],Bt=[1,508],Ut=[6,13,16,29,31,39,45,47,48,63,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,231,242,246,250,263,265,268,269,270,271,272,273,274,276,277,279,280,283,285,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335,336,338,341,342,343,344,345,346,347,348,349,350,351],qt=[29,31,85,112,159,160,161,163,164,335],Vt=[6,13,16,31,45,70,73,81,83,85,87,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],Qt=[13,16,31,45,48,82,87,89,112,193,197,231,232,272,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,317,318,335],$t=[2,352],Ht=[13,16,197,308,314],Gt=[1,565],zt=[6,13,16,31,45,76,78,81,83,85,87,268,269,270,271,273,274,276,277,279,280,283,285,308,346,347,348,349,350,351],Kt=[13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],Xt=[13,16,29,31,45,82,85,87,89,112,159,160,161,163,164,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,335],Jt=[13,16,87,308],Wt=[2,364],Yt=[29,31,85,112,159,160,161,163,164,193,232,318,335],Zt=[31,112,193,232,272,318,335],er=[2,359],tr=[13,16,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],rr=[29,31,85,112,159,160,161,163,164,193,232,272,318,335],nr=[13,16,31,45,82,87,89,112,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],ir=[2,347],ar={trace:function(){},yy:{},symbols_:{error:2,QueryOrUpdate:3,Prologue:4,QueryOrUpdate_group0:5,EOF:6,Query:7,Qry:8,Query_option0:9,Prologue_repetition0:10,BaseDecl:11,BASE:12,IRIREF:13,PrefixDecl:14,PREFIX:15,PNAME_NS:16,SelectClauseWildcard:17,Qry_repetition0:18,WhereClause:19,SolutionModifierNoGroup:20,SelectClauseVars:21,Qry_repetition1:22,SolutionModifier:23,CONSTRUCT:24,ConstructTemplate:25,Qry_repetition2:26,Qry_repetition3:27,WHERE:28,"{":29,Qry_option0:30,"}":31,DESCRIBE:32,Qry_group0:33,Qry_repetition4:34,Qry_option1:35,ASK:36,Qry_repetition5:37,SelectClauseBase:38,"*":39,SelectClauseVars_repetition_plus0:40,SELECT:41,SelectClauseBase_option0:42,SelectClauseItem:43,Var:44,"(":45,Expression:46,AS:47,")":48,SubSelect:49,SubSelect_option0:50,SubSelect_option1:51,DatasetClause:52,FROM:53,DatasetClause_option0:54,iri:55,WhereClause_option0:56,GroupGraphPattern:57,SolutionModifier_option0:58,SolutionModifierNoGroup_option0:59,SolutionModifierNoGroup_option1:60,SolutionModifierNoGroup_option2:61,GroupClause:62,GROUP:63,BY:64,GroupClause_repetition_plus0:65,GroupCondition:66,BuiltInCall:67,FunctionCall:68,HavingClause:69,HAVING:70,HavingClause_repetition_plus0:71,OrderClause:72,ORDER:73,OrderClause_repetition_plus0:74,OrderCondition:75,ASC:76,BrackettedExpression:77,DESC:78,Constraint:79,LimitOffsetClauses:80,LIMIT:81,INTEGER:82,OFFSET:83,ValuesClause:84,VALUES:85,InlineData:86,VAR:87,InlineData_repetition0:88,NIL:89,InlineData_repetition1:90,InlineData_repetition_plus2:91,InlineData_repetition3:92,DataBlock:93,DataBlockValueList:94,DataBlockValueList_repetition_plus0:95,Update:96,Update_repetition0:97,Update1:98,Update_option0:99,LOAD:100,Update1_option0:101,Update1_option1:102,Update1_group0:103,Update1_option2:104,GraphRefAll:105,Update1_group1:106,Update1_option3:107,GraphOrDefault:108,TO:109,CREATE:110,Update1_option4:111,GRAPH:112,INSERTDATA:113,QuadPattern:114,DELETEDATA:115,DELETEWHERE:116,Update1_option5:117,InsertDeleteClause:118,Update1_repetition0:119,IntoGraphClause:120,INTO:121,GraphRef:122,DELETE:123,InsertDeleteClause_option0:124,InsertClause:125,INSERT:126,UsingClause:127,USING:128,UsingClause_option0:129,WithClause:130,WITH:131,DEFAULT:132,GraphOrDefault_option0:133,GraphRefAll_group0:134,Quads:135,Quads_option0:136,Quads_repetition0:137,QuadsNotTriples:138,VarOrIri:139,QuadsNotTriples_option0:140,QuadsNotTriples_option1:141,QuadsNotTriples_option2:142,TriplesTemplate:143,TriplesTemplate_repetition0:144,TriplesSameSubject:145,TriplesTemplate_option0:146,GroupGraphPatternSub:147,GroupGraphPatternSub_option0:148,GroupGraphPatternSub_repetition0:149,GroupGraphPatternSubTail:150,GraphPatternNotTriples:151,GroupGraphPatternSubTail_option0:152,GroupGraphPatternSubTail_option1:153,TriplesBlock:154,TriplesBlock_repetition0:155,TriplesSameSubjectPath:156,TriplesBlock_option0:157,GroupOrUnionGraphPattern:158,OPTIONAL:159,MINUS:160,SERVICE:161,GraphPatternNotTriples_option0:162,FILTER:163,BIND:164,InlineDataOneVar:165,InlineDataFull:166,InlineDataOneVar_repetition0:167,InlineDataFull_repetition0:168,InlineDataFull_repetition_plus1:169,InlineDataFull_repetition2:170,DataBlockValue:171,Literal:172,QuotedTriple:173,UNDEF:174,GroupOrUnionGraphPattern_repetition0:175,ArgList:176,ArgList_option0:177,ArgList_repetition0:178,ExpressionList:179,ExpressionList_repetition0:180,ConstructTemplate_option0:181,ConstructTriples:182,ConstructTriples_repetition0:183,ConstructTriples_option0:184,VarOrTermOrQuotedTP:185,PropertyListNotEmpty:186,TriplesNode:187,PropertyList:188,PropertyList_option0:189,VerbObjectList:190,PropertyListNotEmpty_repetition0:191,SemiOptionalVerbObjectList:192,";":193,SemiOptionalVerbObjectList_option0:194,Verb:195,ObjectList:196,a:197,ObjectList_repetition0:198,Object:199,GraphNode:200,Object_option0:201,PropertyListPathNotEmpty:202,TriplesNodePath:203,TriplesSameSubjectPath_option0:204,O:205,PropertyListPathNotEmpty_repetition0:206,PropertyListPathNotEmptyTail:207,O_group0:208,ObjectListPath:209,ObjectListPath_repetition0:210,ObjectPath:211,GraphNodePath:212,ObjectPath_option0:213,Path:214,Path_repetition0:215,PathSequence:216,PathSequence_repetition0:217,PathEltOrInverse:218,PathElt:219,PathPrimary:220,PathElt_option0:221,PathEltOrInverse_option0:222,IriOrA:223,"!":224,PathNegatedPropertySet:225,PathOneInPropertySet:226,PathNegatedPropertySet_repetition0:227,PathNegatedPropertySet_option0:228,"^":229,TriplesNode_repetition_plus0:230,"[":231,"]":232,TriplesNodePath_repetition_plus0:233,VarOrTermOrQuotedTPExpr:234,VarOrTerm:235,GraphTerm:236,BlankNode:237,ConditionalOrExpression:238,ConditionalAndExpression:239,ConditionalOrExpression_repetition0:240,ConditionalOrExpressionTail:241,"||":242,RelationalExpression:243,ConditionalAndExpression_repetition0:244,ConditionalAndExpressionTail:245,"&&":246,NumericExpression:247,RelationalExpression_group0:248,RelationalExpression_option0:249,IN:250,MultiplicativeExpression:251,NumericExpression_repetition0:252,AdditiveExpressionTail:253,AdditiveExpressionTail_group0:254,NumericLiteralPositive:255,AdditiveExpressionTail_repetition0:256,NumericLiteralNegative:257,AdditiveExpressionTail_repetition1:258,UnaryExpression:259,MultiplicativeExpression_repetition0:260,MultiplicativeExpressionTail:261,MultiplicativeExpressionTail_group0:262,"+":263,PrimaryExpression:264,"-":265,ExprQuotedTP:266,Aggregate:267,FUNC_ARITY0:268,FUNC_ARITY1:269,FUNC_ARITY1_SPARQL_STAR:270,FUNC_ARITY2:271,",":272,FUNC_ARITY3:273,FUNC_ARITY3_SPARQL_STAR:274,BuiltInCall_group0:275,BOUND:276,BNODE:277,BuiltInCall_option0:278,EXISTS:279,COUNT:280,Aggregate_option0:281,Aggregate_group0:282,FUNC_AGGREGATE:283,Aggregate_option1:284,GROUP_CONCAT:285,Aggregate_option2:286,Aggregate_option3:287,GroupConcatSeparator:288,SEPARATOR:289,"=":290,String:291,LANGTAG:292,"^^":293,DECIMAL:294,DOUBLE:295,BOOLEAN:296,INTEGER_POSITIVE:297,DECIMAL_POSITIVE:298,DOUBLE_POSITIVE:299,INTEGER_NEGATIVE:300,DECIMAL_NEGATIVE:301,DOUBLE_NEGATIVE:302,STRING_LITERAL1:303,STRING_LITERAL2:304,STRING_LITERAL_LONG1:305,STRING_LITERAL_LONG2:306,PrefixedName:307,PNAME_LN:308,BLANK_NODE_LABEL:309,ANON:310,QuotedTP:311,"<<":312,qtSubjectOrObject:313,">>":314,DataValueTerm:315,AnnotationPattern:316,"{|":317,"|}":318,AnnotationPatternPath:319,ExprVarOrTerm:320,QueryOrUpdate_group0_option0:321,Prologue_repetition0_group0:322,Qry_group0_repetition_plus0:323,SelectClauseBase_option0_group0:324,DISTINCT:325,REDUCED:326,NAMED:327,SILENT:328,CLEAR:329,DROP:330,ADD:331,MOVE:332,COPY:333,ALL:334,".":335,UNION:336,"|":337,"/":338,PathElt_option0_group0:339,"?":340,"!=":341,"<":342,">":343,"<=":344,">=":345,NOT:346,CONCAT:347,COALESCE:348,SUBSTR:349,REGEX:350,REPLACE:351,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",12:"BASE",13:"IRIREF",15:"PREFIX",16:"PNAME_NS",24:"CONSTRUCT",28:"WHERE",29:"{",31:"}",32:"DESCRIBE",36:"ASK",39:"*",41:"SELECT",45:"(",47:"AS",48:")",53:"FROM",63:"GROUP",64:"BY",70:"HAVING",73:"ORDER",76:"ASC",78:"DESC",81:"LIMIT",82:"INTEGER",83:"OFFSET",85:"VALUES",87:"VAR",89:"NIL",100:"LOAD",109:"TO",110:"CREATE",112:"GRAPH",113:"INSERTDATA",115:"DELETEDATA",116:"DELETEWHERE",121:"INTO",123:"DELETE",126:"INSERT",128:"USING",131:"WITH",132:"DEFAULT",159:"OPTIONAL",160:"MINUS",161:"SERVICE",163:"FILTER",164:"BIND",174:"UNDEF",193:";",197:"a",224:"!",229:"^",231:"[",232:"]",242:"||",246:"&&",250:"IN",263:"+",265:"-",268:"FUNC_ARITY0",269:"FUNC_ARITY1",270:"FUNC_ARITY1_SPARQL_STAR",271:"FUNC_ARITY2",272:",",273:"FUNC_ARITY3",274:"FUNC_ARITY3_SPARQL_STAR",276:"BOUND",277:"BNODE",279:"EXISTS",280:"COUNT",283:"FUNC_AGGREGATE",285:"GROUP_CONCAT",289:"SEPARATOR",290:"=",292:"LANGTAG",293:"^^",294:"DECIMAL",295:"DOUBLE",296:"BOOLEAN",297:"INTEGER_POSITIVE",298:"DECIMAL_POSITIVE",299:"DOUBLE_POSITIVE",300:"INTEGER_NEGATIVE",301:"DECIMAL_NEGATIVE",302:"DOUBLE_NEGATIVE",303:"STRING_LITERAL1",304:"STRING_LITERAL2",305:"STRING_LITERAL_LONG1",306:"STRING_LITERAL_LONG2",308:"PNAME_LN",309:"BLANK_NODE_LABEL",310:"ANON",312:"<<",314:">>",317:"{|",318:"|}",325:"DISTINCT",326:"REDUCED",327:"NAMED",328:"SILENT",329:"CLEAR",330:"DROP",331:"ADD",332:"MOVE",333:"COPY",334:"ALL",335:".",336:"UNION",337:"|",338:"/",340:"?",341:"!=",342:"<",343:">",344:"<=",345:">=",346:"NOT",347:"CONCAT",348:"COALESCE",349:"SUBSTR",350:"REGEX",351:"REPLACE"},productions_:[0,[3,3],[7,2],[4,1],[11,2],[14,3],[8,4],[8,4],[8,5],[8,7],[8,5],[8,4],[17,2],[21,2],[38,2],[43,1],[43,5],[49,4],[49,4],[52,3],[19,2],[23,2],[20,3],[62,3],[66,1],[66,1],[66,3],[66,5],[66,1],[69,2],[72,3],[75,2],[75,2],[75,1],[75,1],[80,2],[80,2],[80,4],[80,4],[84,2],[86,4],[86,4],[86,6],[86,2],[94,3],[96,3],[98,4],[98,3],[98,5],[98,4],[98,2],[98,2],[98,2],[98,5],[120,2],[118,3],[118,1],[125,2],[127,3],[130,2],[108,1],[108,2],[122,2],[105,1],[105,1],[114,3],[135,2],[138,7],[143,3],[57,3],[57,3],[147,2],[150,3],[154,3],[151,1],[151,2],[151,2],[151,3],[151,4],[151,2],[151,6],[151,1],[93,1],[93,1],[165,4],[166,4],[166,6],[171,1],[171,1],[171,1],[171,1],[158,2],[79,1],[79,1],[79,1],[68,2],[176,1],[176,5],[179,1],[179,4],[25,3],[182,3],[145,2],[145,2],[188,1],[186,2],[192,2],[190,2],[195,1],[195,1],[196,2],[199,2],[156,2],[156,2],[202,2],[207,1],[207,2],[205,2],[209,2],[211,2],[214,2],[216,2],[219,2],[218,2],[220,1],[220,2],[220,3],[225,1],[225,1],[225,4],[226,1],[226,2],[187,3],[187,3],[203,3],[203,3],[200,1],[200,1],[212,1],[212,1],[234,1],[235,1],[235,1],[139,1],[139,1],[44,1],[236,1],[236,1],[236,1],[236,1],[46,1],[238,2],[241,2],[239,2],[245,2],[243,1],[243,3],[243,4],[247,2],[253,2],[253,2],[253,2],[251,2],[261,2],[259,2],[259,2],[259,2],[259,1],[264,1],[264,1],[264,1],[264,1],[264,1],[264,1],[264,1],[77,3],[67,1],[67,2],[67,4],[67,4],[67,6],[67,8],[67,8],[67,2],[67,4],[67,2],[67,4],[67,3],[267,5],[267,5],[267,6],[288,4],[172,1],[172,2],[172,3],[172,1],[172,1],[172,1],[172,1],[172,1],[172,1],[255,1],[255,1],[255,1],[257,1],[257,1],[257,1],[291,1],[291,1],[291,1],[291,1],[55,1],[55,1],[307,1],[307,1],[237,1],[237,1],[311,5],[173,5],[313,1],[313,1],[313,1],[313,1],[313,1],[315,1],[315,1],[315,1],[185,1],[185,1],[185,1],[316,3],[319,3],[266,5],[320,1],[320,1],[320,1],[223,1],[223,1],[321,0],[321,1],[5,1],[5,1],[5,1],[9,0],[9,1],[322,1],[322,1],[10,0],[10,2],[18,0],[18,2],[22,0],[22,2],[26,0],[26,2],[27,0],[27,2],[30,0],[30,1],[323,1],[323,2],[33,1],[33,1],[34,0],[34,2],[35,0],[35,1],[37,0],[37,2],[40,1],[40,2],[324,1],[324,1],[42,0],[42,1],[50,0],[50,1],[51,0],[51,1],[54,0],[54,1],[56,0],[56,1],[58,0],[58,1],[59,0],[59,1],[60,0],[60,1],[61,0],[61,1],[65,1],[65,2],[71,1],[71,2],[74,1],[74,2],[88,0],[88,2],[90,0],[90,2],[91,1],[91,2],[92,0],[92,2],[95,1],[95,2],[97,0],[97,4],[99,0],[99,2],[101,0],[101,1],[102,0],[102,1],[103,1],[103,1],[104,0],[104,1],[106,1],[106,1],[106,1],[107,0],[107,1],[111,0],[111,1],[117,0],[117,1],[119,0],[119,2],[124,0],[124,1],[129,0],[129,1],[133,0],[133,1],[134,1],[134,1],[134,1],[136,0],[136,1],[137,0],[137,2],[140,0],[140,1],[141,0],[141,1],[142,0],[142,1],[144,0],[144,3],[146,0],[146,1],[148,0],[148,1],[149,0],[149,2],[152,0],[152,1],[153,0],[153,1],[155,0],[155,3],[157,0],[157,1],[162,0],[162,1],[167,0],[167,2],[168,0],[168,2],[169,1],[169,2],[170,0],[170,2],[175,0],[175,3],[177,0],[177,1],[178,0],[178,3],[180,0],[180,3],[181,0],[181,1],[183,0],[183,3],[184,0],[184,1],[189,0],[189,1],[191,0],[191,2],[194,0],[194,1],[198,0],[198,3],[201,0],[201,1],[204,0],[204,1],[206,0],[206,2],[208,1],[208,1],[210,0],[210,3],[213,0],[213,1],[215,0],[215,3],[217,0],[217,3],[339,1],[339,1],[339,1],[221,0],[221,1],[222,0],[222,1],[227,0],[227,3],[228,0],[228,1],[230,1],[230,2],[233,1],[233,2],[240,0],[240,2],[244,0],[244,2],[248,1],[248,1],[248,1],[248,1],[248,1],[248,1],[249,0],[249,1],[252,0],[252,2],[254,1],[254,1],[256,0],[256,2],[258,0],[258,2],[260,0],[260,2],[262,1],[262,1],[275,1],[275,1],[275,1],[275,1],[275,1],[278,0],[278,1],[281,0],[281,1],[282,1],[282,1],[284,0],[284,1],[286,0],[286,1],[287,0],[287,1]],performAction:function(e,t,r,n,i,a,o){var s,c,u,l,d=a.length-1;switch(i){case 1:if(a[d-1]=a[d-1]||{},nn.base&&(a[d-1].base=nn.base),nn.base="",a[d-1].prefixes=nn.prefixes,nn.prefixes=null,nn.pathOnly){if("path"===a[d-1].type||"termType"in a[d-1])return a[d-1];throw new Error("Received full SPARQL query in path only mode")}if("path"===a[d-1].type||"termType"in a[d-1])throw new Error("Received only path in full SPARQL mode");if("update"===a[d-1].type){const e={};for(const t of a[d-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 a[d-1];case 2:this.$={...a[d-1],...a[d],type:"query"};break;case 4:nn.base=Er(a[d]);break;case 5:nn.prefixes||(nn.prefixes={}),a[d-1]=a[d-1].substr(0,a[d-1].length-1),a[d]=Er(a[d]),nn.prefixes[a[d-1]]=a[d];break;case 6:this.$={...a[d-3],...Nr(a[d-2]),...a[d-1],...a[d]};break;case 7:if(!nn.skipValidation&&(Kr(a[d-3].variables.map((e=>Gr(e.expression)))).some((e=>"count"===e.aggregation&&!(e.expression instanceof or)))||a[d].group))for(const e of a[d-3].variables)if("Variable"===e.termType){if(!a[d].group||!a[d].group.map((e=>Hr(e))).includes(Hr(e)))throw Error("Projection of ungrouped variable (?"+Hr(e)+")")}else if(0===Gr(e.expression).length){const t=zr(e.expression);for(const e of t)if(!a[d].group||!a[d].group.map||!a[d].group.map((e=>Hr(e))).includes(Hr(e)))throw Error("Use of ungrouped variable in projection of operation (?"+Hr(e)+")")}const e=a[d-1].where.filter((e=>"query"===e.type));if(e.length>0){const t=a[d-3].variables.filter((e=>e.variable&&e.variable.value)).map((e=>e.variable.value)),r=Kr(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.$=Sr(a[d-3],Nr(a[d-2]),a[d-1],a[d]);break;case 8:this.$=Sr({queryType:"CONSTRUCT",template:a[d-3]},Nr(a[d-2]),a[d-1],a[d]);break;case 9:this.$=Sr({queryType:"CONSTRUCT",template:a[d-2]=a[d-2]?a[d-2].triples:[]},Nr(a[d-5]),{where:[{type:"bgp",triples:Tr([],a[d-2])}]},a[d]);break;case 10:this.$=Sr({queryType:"DESCRIBE",variables:"*"===a[d-3]?[new or]:a[d-3]},Nr(a[d-2]),a[d-1],a[d]);break;case 11:this.$=Sr({queryType:"ASK"},Nr(a[d-2]),a[d-1],a[d]);break;case 12:this.$=Sr(a[d-1],{variables:[new or]});break;case 13:const t=function(e){const t=e.slice().sort(),r=[];for(let e=0;ee.value||e.variable.value)));if(t.length>0)throw Error("Two or more of the resulting columns have the same name (?"+t[0]+")");this.$=Sr(a[d-1],{variables:a[d]});break;case 14:this.$=Sr({queryType:"SELECT"},a[d]&&(a[d-1]=_r(a[d]),a[d]={},a[d][a[d-1]]=!0,a[d]));break;case 16:case 27:this.$=Rr(a[d-3],{variable:a[d-1]});break;case 17:case 18:this.$=Sr(a[d-3],a[d-2],a[d-1],a[d],{type:"query"});break;case 19:case 58:this.$={iri:a[d],named:!!a[d-1]};break;case 20:this.$={where:a[d].patterns};break;case 21:this.$=Sr(a[d-1],a[d]);break;case 22:this.$=Sr(a[d-2],a[d-1],a[d]);break;case 23:this.$={group:a[d]};break;case 24:case 25:case 28:case 31:case 33:case 34:this.$=Rr(a[d]);break;case 26:this.$=Rr(a[d-1]);break;case 29:this.$={having:a[d]};break;case 30:this.$={order:a[d]};break;case 32:this.$=Rr(a[d],{descending:!0});break;case 35:this.$={limit:Dr(a[d])};break;case 36:this.$={offset:Dr(a[d])};break;case 37:this.$={limit:Dr(a[d-2]),offset:Dr(a[d])};break;case 38:this.$={limit:Dr(a[d]),offset:Dr(a[d-2])};break;case 39:case 43:this.$={type:"values",values:a[d]};break;case 40:case 84:this.$=a[d-1].map((e=>({[a[d-3]]:e})));break;case 41:case 85:this.$=a[d-1].map((()=>({})));break;case 42:case 86:var p=a[d-4].length;a[d-4]=a[d-4].map(xr),this.$=a[d-1].map((function(e){if(e.length!==p)throw Error("Inconsistent VALUES length");for(var t={},r=0;r"bind"===e.type))){const t=a[d-1].indexOf(e),r=new Set;for(const e of a[d-1].slice(0,t))"group"!==e.type&&"bgp"!==e.type||Jr(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:a[d-1]};break;case 71:this.$=a[d-1]?Or([a[d-1]],a[d]):Or(a[d]);break;case 72:this.$=a[d]?[a[d-2],a[d]]:a[d-2];break;case 75:this.$=Sr(a[d],{type:"optional"});break;case 76:this.$=Sr(a[d],{type:"minus"});break;case 77:this.$=Sr(a[d],{type:"graph",name:a[d-1]});break;case 78:this.$=Sr(a[d],{type:"service",name:a[d-1],silent:!!a[d-2]});break;case 79:this.$={type:"filter",expression:a[d]};break;case 80:this.$={type:"bind",variable:a[d-1],expression:a[d-3]};break;case 89:this.$=Wr(a[d]);break;case 90:this.$=void 0;break;case 91:this.$=a[d-1].length?{type:"union",patterns:Or(a[d-1].map(jr),[jr(a[d])])}:a[d];break;case 95:this.$={...a[d],function:a[d-1]};break;case 96:this.$={type:"functionCall",args:[]};break;case 97:this.$={type:"functionCall",args:wr(a[d-2],a[d-1]),distinct:!!a[d-3]};break;case 98:case 115:case 128:case 247:case 249:case 251:case 253:case 255:case 263:case 267:case 297:case 299:case 303:case 307:case 328:case 341:case 349:case 355:case 361:case 367:case 369:case 373:case 375:case 379:case 381:case 385:case 391:case 395:case 401:case 405:case 409:case 411:case 420:case 428:case 430:case 440:case 444:case 446:case 448:this.$=[];break;case 99:this.$=wr(a[d-2],a[d-1]);break;case 101:this.$=Or(a[d-2],[a[d-1]]);break;case 102:case 112:this.$=Zr(a[d].map((e=>Sr(Lr(a[d-1]),e))));break;case 103:this.$=Zr(Tr(a[d].map((e=>Sr(Lr(a[d-1].entity),e))),a[d-1].triples));break;case 105:this.$=Or([a[d-1]],a[d]);break;case 106:this.$=Or(a[d]);break;case 107:this.$=$r(a[d-1],a[d]);break;case 109:case 237:this.$=nn.factory.namedNode(cr);break;case 110:case 118:this.$=wr(a[d-1],a[d]);break;case 111:this.$=a[d]?{annotation:a[d],object:a[d-1]}:a[d-1];break;case 113:this.$=a[d]?Zr(Tr(a[d].map((e=>Sr(Lr(a[d-1].entity),e))),a[d-1].triples)):a[d-1].triples;break;case 114:this.$=$r(...a[d-1],a[d]);break;case 116:this.$=$r(...a[d]);break;case 117:case 159:case 163:this.$=[a[d-1],a[d]];break;case 119:this.$=a[d]?{object:a[d-1],annotation:a[d]}:a[d-1];break;case 120:this.$=a[d-1].length?Ir("|",wr(a[d-1],a[d])):a[d];break;case 121:this.$=a[d-1].length?Ir("/",wr(a[d-1],a[d])):a[d];break;case 122:this.$=a[d]?Ir(a[d],[a[d-1]]):a[d-1];break;case 123:this.$=a[d-1]?Ir(a[d-1],[a[d]]):a[d];break;case 125:case 131:this.$=Ir(a[d-1],[a[d]]);break;case 129:this.$=Ir("|",wr(a[d-2],a[d-1]));break;case 132:case 134:this.$=function(e){var t=kr(),r=t,n=[],i=[];e.forEach((function(e){n.push(e.entity),Tr(i,e.triples)}));for(var a=0,o=0,s=n.length,c=Array(2*s);a2&&E.push("'"+this.terminals_[T]+"'");A=d.showPosition?"Parse error on line "+(s+1)+":\n"+d.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==m?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(A,{text:d.match,token:this.terminals_[m]||m,line:d.yylineno,loc:f,expected:E})}if(_[0]instanceof Array&&_.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+m);switch(_[0]){case 1:r.push(m),n.push(d.yytext),i.push(d.yylloc),r.push(_[1]),m=null,b?(m=b,b=null):(c=d.yyleng,o=d.yytext,s=d.yylineno,f=d.yylloc,u>0&&u--);break;case 2:if(S=this.productions_[_[1]][1],x.$=n[n.length-S],x._$={first_line:i[i.length-(S||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(S||1)].first_column,last_column:i[i.length-1].last_column},g&&(x._$.range=[i[i.length-(S||1)].range[0],i[i.length-1].range[1]]),void 0!==(w=this.performAction.apply(x,[o,c,s,p.yy,_[1],n,i].concat(l))))return w;S&&(r=r.slice(0,-1*S*2),n=n.slice(0,-1*S),i=i.slice(0,-1*S)),r.push(this.productions_[_[1]][0]),n.push(x.$),i.push(x._$),O=a[r[r.length-2]][r[r.length-1]],r.push(O);break;case 3:return!0}}return!0}},or=r(54516).t,sr="http://www.w3.org/1999/02/22-rdf-syntax-ns#",cr=sr+"type",ur=sr+"first",lr=sr+"rest",dr=sr+"nil",pr="http://www.w3.org/2001/XMLSchema#",hr=pr+"integer",fr=pr+"decimal",yr=pr+"double",gr=pr+"boolean",mr="",br="",vr="";function _r(e){return e.toLowerCase()}function wr(e,t){return e.push(t),e}function Tr(e,t){return e.push.apply(e,t),e}function Sr(e){e||(e={});for(var t,r=1,n=arguments.length;r>10),56320+(1023&i))}var a=Ur[n];if(!a)throw new Error;return a}))}catch(e){return""}if(qr.exec(e))throw new Error("Invalid unicode codepoint of surrogate pair without corresponding codepoint in "+e);return e}function $r(e,t,r){var n=[],i=[];return t.forEach((function(t){let r=null;t.annotation&&(r=t.annotation,t=t.object),n.push(Lr(null,e,t.entity,r)),Tr(i,t.triples)})),Or(n,r||[],i)}function Hr(e){return e.variable?e.variable.value:e.value||e.expression.value}function Gr(e){if(!e)return[];if("aggregate"===e.type)return[e];if("operation"===e.type){const t=[];for(const r of e.args)t.push(...Gr(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 Kr(e,t=1,r=[]){for(const n of e)t>0&&n instanceof Array?Kr(n,t-1,r):r.push(n);return r}function Xr(e){return"Variable"===e.termType}function Jr(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(...Jr(r));return t}return[]}function Wr(e){if(!nn.sparqlStar)throw new Error("SPARQL-star support is not enabled");return e}function Yr(e,t,r){for(const n of t){const t=Lr("subject"in n?n.subject:e,n.predicate,n.object);r.push(t),n.annotations&&Yr(Mr(e,n.predicate,n.object),n.annotations,r)}}function Zr(e){if(nn.sparqlStar){const t=[];return e.forEach((e=>{const r=Lr(e.subject,e.predicate,e.object);t.push(r),e.annotations&&Yr(Mr(e.subject,e.predicate,e.object),e.annotations,t)})),t}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 a in i)this[a]=i[a];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(),a=0;at[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))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(){return this.next()||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 41;case 4:return 325;case 5:return 326;case 6:return 45;case 7:return 47;case 8:return 48;case 9:return 39;case 10:return 24;case 11:return 28;case 12:return 29;case 13:return 31;case 14:return 32;case 15:return 36;case 16:return 53;case 17:return 327;case 18:return 63;case 19:return 64;case 20:return 70;case 21:return 73;case 22:return 76;case 23:return 78;case 24:return 81;case 25:return 83;case 26:return 85;case 27:return 193;case 28:return 100;case 29:return 328;case 30:return 121;case 31:return 329;case 32:return 330;case 33:return 110;case 34:return 331;case 35:return 109;case 36:return 332;case 37:return 333;case 38:return 113;case 39:return 115;case 40:return 116;case 41:return 131;case 42:return 123;case 43:return 126;case 44:return 128;case 45:return 132;case 46:return 112;case 47:return 334;case 48:return 335;case 49:return 159;case 50:return 161;case 51:return 164;case 52:return 174;case 53:return 160;case 54:return 336;case 55:return 163;case 56:return 312;case 57:return 314;case 58:return 317;case 59:return 318;case 60:return 272;case 61:return 197;case 62:return 337;case 63:return 338;case 64:return 229;case 65:return 340;case 66:return 263;case 67:return 224;case 68:return 231;case 69:return 232;case 70:return 242;case 71:return 246;case 72:return 290;case 73:return 341;case 74:return 342;case 75:return 343;case 76:return 344;case 77:return 345;case 78:return 250;case 79:return 346;case 80:return 265;case 81:return 276;case 82:return 277;case 83:return 268;case 84:return 269;case 85:return 270;case 86:return 271;case 87:return 347;case 88:return 348;case 89:return 273;case 90:return 274;case 91:return 350;case 92:return 349;case 93:return 351;case 94:return 279;case 95:return 280;case 96:return 283;case 97:return 285;case 98:return 289;case 99:return 293;case 100:return 296;case 101:return 13;case 102:return 16;case 103:return 308;case 104:return 309;case 105:return 87;case 106:return 292;case 107:return 82;case 108:return 294;case 109:return 295;case 110:return 297;case 111:return 298;case 112:return 299;case 113:return 300;case 114:return 301;case 115:return 302;case 116:return"EXPONENT";case 117:return 303;case 118:return 304;case 119:return 305;case 120:return 306;case 121:return 89;case 122:return 310;case 123:return 6;case 124:return"INVALID";case 125: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,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MINUTES|SECONDS|TIMEZONE|TZ|MD5|SHA1|SHA256|SHA384|SHA512|isIRI|isURI|isBLANK|isLITERAL|isNUMERIC))/i,/^(?:(SUBJECT|PREDICATE|OBJECT|isTRIPLE))/i,/^(?:(LANGMATCHES|CONTAINS|STRSTARTS|STRENDS|STRBEFORE|STRAFTER|STRLANG|STRDT|sameTerm))/i,/^(?:CONCAT)/i,/^(?:COALESCE)/i,/^(?:IF)/i,/^(?:TRIPLE)/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,122,123,124,125],inclusive:!0}}};function nn(){this.yy={}}return ar.lexer=rn,nn.prototype=ar,ar.Parser=nn,new nn}();e.exports=n},54516:e=>{class t{constructor(){return r||this}equals(e){return e&&this.termType===e.termType}}Object.defineProperty(t.prototype,"value",{enumerable:!0,value:"*"}),Object.defineProperty(t.prototype,"termType",{enumerable:!0,value:"Wildcard"});var r=new t;e.exports.t=t},55403:(e,t,r)=>{var n=r(17308).Parser,i=r(33206),a=r(54516).t,{DataFactory:o}=r(18050);e.exports={Parser:function({prefixes:e,baseIRI:t,factory:r,sparqlStar:i,skipValidation:a,skipUngroupedVariableCheck:s,pathOnly:c}={}){var u={};for(var l in e||{})u[l]=e[l];var d=new n;return d.parse=function(){return n.base=t||"",n.prefixes=Object.create(u),n.factory=r||new o,n.sparqlStar=Boolean(i),n.pathOnly=Boolean(c),n.skipValidation=Boolean(a)||Boolean(s),n.prototype.parse.apply(d,arguments)},d._resetBlanks=n._resetBlanks,d},Generator:i,Wildcard:a}},21451:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(71839),t)},71839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparqlJsonParser=void 0;const n=r(18050),i=r(58521),a=r(36885);t.SparqlJsonParser=class{constructor(e){var t;e=e||{},this.dataFactory=e.dataFactory||new n.DataFactory,this.prefixVariableQuestionMark=!!e.prefixVariableQuestionMark,this.suppressMissingStreamResultsError=null===(t=e.suppressMissingStreamResultsError)||void 0===t||t}parseJsonResults(e){return e.results.bindings.map((e=>this.parseJsonBindings(e)))}parseJsonResultsStream(e){const t=e=>s.emit("error",e);e.on("error",t);const r=new a;r.onError=t;let n=!1,o=!1;r.onValue=e=>{if("vars"===r.key&&2===r.stack.length&&"head"===r.stack[1].key)s.emit("variables",e.map((e=>this.dataFactory.variable(e)))),n=!0;else if("results"===r.key&&1===r.stack.length)o=!0;else if("number"==typeof r.key&&3===r.stack.length&&"results"===r.stack[1].key&&"bindings"===r.stack[2].key)try{s.push(this.parseJsonBindings(e))}catch(e){s.emit("error",e)}else"metadata"===r.key&&1===r.stack.length&&s.emit("metadata",e)};const s=e.on("end",(e=>{o||this.suppressMissingStreamResultsError?n||s.emit("variables",[]):s.emit("error",new Error("No valid SPARQL query results were found."))})).pipe(new i.Transform({objectMode:!0,transform(e,t,n){r.write(e),n()}}));return s}parseJsonBindings(e){const t={};for(const r in e){const n=e[r];t[this.prefixVariableQuestionMark?"?"+r:r]=this.parseJsonValue(n)}return t}parseJsonValue(e){let t;switch(e.type){case"bnode":t=this.dataFactory.blankNode(e.value);break;case"literal":t=e["xml:lang"]?this.dataFactory.literal(e.value,e["xml:lang"]):e.datatype?this.dataFactory.literal(e.value,this.dataFactory.namedNode(e.datatype)):this.dataFactory.literal(e.value);break;case"typed-literal":t=this.dataFactory.literal(e.value,this.dataFactory.namedNode(e.datatype));break;case"triple":const r=e.value;if(!(r&&r.subject&&r.predicate&&r.object))throw new Error("Invalid quoted triple: "+JSON.stringify(e));t=this.dataFactory.quad(this.parseJsonValue(r.subject),this.parseJsonValue(r.predicate),this.parseJsonValue(r.object));break;default:t=this.dataFactory.namedNode(e.value)}return t}parseJsonBoolean(e){if("boolean"in e)return e.boolean;throw new Error("No valid ASK response was found.")}parseJsonBooleanStream(e){return new Promise(((t,r)=>{const n=new a;n.onError=r,n.onValue=e=>{"boolean"===n.key&&"boolean"==typeof e&&1===n.stack.length&&t(e)},e.on("error",r).on("data",(e=>n.write(e))).on("end",(()=>r(new Error("No valid ASK response was found."))))}))}}},43004:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(78780),t)},78780:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Converter=void 0;const n=r(80740),i=r(21451);class a{constructor(e){(e=e||{delimiter:"_"}).prefixVariableQuestionMark=!1,this.delimiter=e.delimiter||"_",this.parser=new i.SparqlJsonParser(e),this.materializeRdfJsTerms=e.materializeRdfJsTerms}static addValueToTree(e,t,r,n,i,o){const s=t[0],c=n?n+o+s:s,u=i.singularizeVariables[c];if(1===t.length)u?e[s]||(e[s]=r):(e[s]||(e[s]=[]),e[s].push(r));else{let n;u?(e[s]||(e[s]={}),n=e[s]):(e[s]||(e[s]=[{}]),n=e[s][0]),a.addValueToTree(n,t.slice(1),r,c,i,o)}}static mergeTrees(e,t){if(typeof e!=typeof t)throw new Error(`Two incompatible tree nodes were found: ${typeof e} and ${typeof t}`);if(Array.isArray(e)!==Array.isArray(t))throw new Error(`Two incompatible tree nodes were found: Array?${Array.isArray(e)} and Array?${Array.isArray(t)}`);if("object"==typeof e&&"object"==typeof t){if(e.termType&&t.termType)return e.equals(t)?{valid:!0,result:e}:{valid:!1,result:e};if(Array.isArray(e)&&Array.isArray(t)){if(e.length>0){const r=[];let n=!1;for(const i of e){const e=a.mergeTrees(i,t[0]);e.valid?(n=!0,r.push(e.result)):r.push(i)}if(n)return{valid:!0,result:r}}return{valid:!0,result:e.concat(t)}}{const r={};for(const e in t)r[e]=t[e];for(const t in e)if(r[t]){const n=a.mergeTrees(e[t],r[t]);if(!n.valid)return{valid:!1,result:e};r[t]=n.result}else r[t]=e[t];return{valid:!0,result:r}}}throw new Error(`Unmergable tree types: ${typeof e} and ${typeof t}`)}static materializeTree(e){if(e.termType)return(0,n.getTermRaw)(e);if(Array.isArray(e))return e.map(a.materializeTree);{const t={};for(const r in e)t[r]=a.materializeTree(e[r]);return t}}sparqlJsonResultsToTree(e,t){return this.bindingsToTree(this.parser.parseJsonResults(e),t||{singularizeVariables:{}})}bindingsToTree(e,t){const r=t&&t.singularizeVariables[""];let n=r?{}:[];for(const i of e){const e=r?{}:[{}];for(const n in i){const o=n.split(this.delimiter),s=i[n];a.addValueToTree(r?e:e[0],o,s,"",t,this.delimiter)}n=a.mergeTrees(n,e).result}return this.materializeRdfJsTerms&&(n=a.materializeTree(n)),n}}t.Converter=a},52666:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(49679),t)},49679:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SparqlXmlParser=void 0;const n=r(18050),i=r(49126),a=r(58521);t.SparqlXmlParser=class{constructor(e){e=e||{},this.dataFactory=e.dataFactory||new n.DataFactory,this.prefixVariableQuestionMark=!!e.prefixVariableQuestionMark}parseXmlResultsStream(e){const t=e=>y.emit("error",e);e.on("error",t);const r=new i.SaxesParser,n=[];let o=!1,s=!1;const c=[];let u,l={},d="",p="",h="",f=[];r.on("error",t),r.on("opentag",(e=>{"variable"===e.name&&this.stackEquals(n,["sparql","head"])?c.push(this.dataFactory.variable(e.attributes.name)):"results"===e.name&&this.stackEquals(n,["sparql"])?s=!0:"result"===e.name&&this.stackEquals(n,["sparql","results"])?l={}:"binding"===e.name&&this.stackEquals(n,["sparql","results","result"])?(d=e.attributes.name||"",p="",u="",h="",f=[]):"triple"===e.name&&this.stackBeginsWith(n,["sparql","results","result"])?f.push({components:{}}):"triple"===n[n.length-1]&&this.stackBeginsWith(n,["sparql","results","result","binding"])?(p="",u="",h="",["subject","predicate","object"].includes(e.name)?f[f.length-1].currentComponent=e.name:t(new Error(`Illegal quoted triple component '${e.name}' found on line ${r.line+1}`))):this.stackBeginsWith(n,["sparql","results","result","binding"])&&(p=e.name,u="xml:lang"in e.attributes?e.attributes["xml:lang"]:"datatype"in e.attributes?this.dataFactory.namedNode(e.attributes.datatype):void 0),n.push(e.name)})),r.on("closetag",(e=>{if(this.stackEquals(n,["sparql","head"])&&(y.emit("variables",c),o=!0),this.stackEquals(n,["sparql","results","result"])&&y.push(l),this.stackBeginsWith(n,["sparql","results","result","binding"])){let e;if(!d&&p)t(new Error(`Terms should have a name on line ${r.line+1}`));else if("uri"===p)e=this.dataFactory.namedNode(h);else if("bnode"===p)e=this.dataFactory.blankNode(h);else if("literal"===p)e=this.dataFactory.literal(h,u);else if("triple"===n[n.length-1]){const n=f.pop();n&&n.components.subject&&n.components.predicate&&n.components.object?e=this.dataFactory.quad(n.components.subject,n.components.predicate,n.components.object):t(new Error(`Incomplete quoted triple on line ${r.line+1}`))}else p&&t(new Error(`Invalid term type '${p}' on line ${r.line+1}`));if(e)if(f.length>0){const n=f[f.length-1];n.components[n.currentComponent]&&t(new Error(`The ${n.currentComponent} in a quoted triple on line ${r.line+1} was already defined before`)),n.components[n.currentComponent]=e}else{const t=this.prefixVariableQuestionMark?"?"+d:d;l[t]=e}p=void 0}n.pop()})),r.on("text",(e=>{this.stackBeginsWith(n,["sparql","results","result","binding"])&&n[n.length-1]===p&&(h=e)}));const y=e.on("end",(e=>{s?o||y.emit("variables",[]):y.emit("error",new Error("No valid SPARQL query results were found."))})).pipe(new a.Transform({objectMode:!0,transform(e,t,n){r.write(e),n()}}));return y}parseXmlBooleanStream(e){return new Promise(((t,r)=>{const n=new i.SaxesParser,a=[];n.on("error",r),n.on("opentag",(e=>{a.push(e.name)})),n.on("closetag",(e=>{a.pop()})),n.on("text",(e=>{this.stackEquals(a,["sparql","boolean"])&&t("true"===e)})),e.on("error",r).on("data",(e=>n.write(e))).on("end",(()=>r(new Error("No valid ASK response was found."))))}))}stackEquals(e,t){return e.length===t.length&&e.every(((e,r)=>t[r]===e))}stackBeginsWith(e,t){return e.length>=t.length&&t.every(((t,r)=>e[r]===t))}}},76574:(e,t,r)=>{var n=r(21848);e.exports=function(e,t,r){"function"==typeof t&&(r=t,t=null);var i="",a=new n((function(r,n){e.on("data",(function(e){i+="string"==typeof t?e.toString(t):e.toString()})),e.on("end",(function(){r(i)})),e.on("error",n)}));return r&&a.then((function(e){r(null,e)}),r),a}},18888:(e,t,r)=>{"use strict";var n=r(25636).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 a(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=c,this.end=u,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=d,t=3;break;default:return this.write=p,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(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 c(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 u(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 d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}t.StringDecoder=a,a.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=0?(i>0&&(e.lastNeed=i-1),i):--n=0?(i>0&&(e.lastNeed=i-2),i):--n=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):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)},a.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}},68492:e=>{!function(t){"use strict";var r=function(){function e(e){this.options=e}return e.prototype.toString=function(){return JSON&&JSON.stringify?JSON.stringify(this.options):this.options},e}(),n={isArray:function(e){return"[object Array]"===Object.prototype.toString.apply(e)},isString:function(e){return"[object String]"===Object.prototype.toString.apply(e)},isNumber:function(e){return"[object Number]"===Object.prototype.toString.apply(e)},isBoolean:function(e){return"[object Boolean]"===Object.prototype.toString.apply(e)},join:function(e,t){var r,n="",i=!0;for(r=0;r="0"&&e<="9"}return{isAlpha:function(e){return e>="a"&&e<="z"||e>="A"&&e<="Z"},isDigit:e,isHexDigit:function(t){return e(t)||t>="a"&&t<="f"||t>="A"&&t<="F"}}}(),a=function(){var e=function(e){return e<=127?1:194<=e&&e<=223?2:224<=e&&e<=239?3:240<=e&&e<=244?4:0},t=function(e){return 128<=e&&e<=191};function r(e,t){return"%"===e.charAt(t)&&i.isHexDigit(e.charAt(t+1))&&i.isHexDigit(e.charAt(t+2))}function n(e,t){return parseInt(e.substr(t,2),16)}return{encodeCharacter:function(e){var t,r,n="",i=function(e){return unescape(encodeURIComponent(e))}(e);for(r=0;r1?r+=n:r+=c(n)||s(n)?n:a.encodeCharacter(n);return r},encodeLiteralCharacter:function(e,t){var r=a.pctCharAt(e,t);return r.length>1||c(r)||s(r)?r:a.encodeCharacter(r)}}}(),l=function(){var e={};function t(t){e[t]={symbol:t,separator:"?"===t?"&":""===t||"+"===t||"#"===t?",":t,named:";"===t||"&"===t||"?"===t,ifEmpty:"&"===t||"?"===t?"=":"",first:"+"===t?"":t,encode:"+"===t||"#"===t?u.encodePassReserved:u.encode,toString:function(){return this.symbol}}}return t(""),t("+"),t("#"),t("."),t("/"),t(";"),t("?"),t("&"),{valueOf:function(t){return e[t]?e[t]:"=,!@|".indexOf(t)>=0?null:e[""]}}}();function d(e){var t;if(null==e)return!1;if(n.isArray(e))return e.length>0;if("string"==typeof e||"number"==typeof e||"boolean"==typeof e)return!0;for(t in e)if(e.hasOwnProperty(t)&&d(e[t]))return!0;return!1}var p=function(){function e(e){this.literal=u.encodeLiteral(e)}return e.prototype.expand=function(){return this.literal},e.prototype.toString=e.prototype.expand,e}(),h=function(){function e(e){var t,n,s=[],c=null,u=null,d=null,p="";function h(){var t=e.substring(u,n);if(0===t.length)throw new r({expressionText:e,message:"a varname must be specified",position:n});c={varname:t,exploded:!1,maxLength:null},u=null}function y(){if(d===n)throw new r({expressionText:e,message:"after a ':' you have to specify the length",position:n});c.maxLength=parseInt(e.substring(d,n),10),d=null}for(t=function(t){var i=l.valueOf(t);if(null===i)throw new r({expressionText:e,message:"illegal use of reserved operator",position:n,operator:t});return i}(e.charAt(0)),n=t.symbol.length,u=n;n=4)throw new r({expressionText:e,message:"A :prefix must have max 4 digits",position:n});continue}y()}if(":"!==p)if("*"!==p){if(","!==p)throw new r({expressionText:e,message:"illegal character",character:p,position:n});s.push(c),c=null,u=n+1}else{if(null===c)throw new r({expressionText:e,message:"exploded without varspec",position:n});if(c.exploded)throw new r({expressionText:e,message:"exploded twice",position:n});if(c.maxLength)throw new r({expressionText:e,message:"an explode (*) MUST NOT follow to a prefix",position:n});c.exploded=!0}else{if(null!==c.maxLength)throw new r({expressionText:e,message:"only one :maxLength is allowed per varspec",position:n});if(c.exploded)throw new r({expressionText:e,message:"an exploeded varspec MUST NOT be varspeced",position:n});d=n+1}}return null!==u&&h(),null!==d&&y(),s.push(c),new f(e,t,s)}return function(t){var n,i,a=[],o=null,s=0;for(n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(t,"parse",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return c.default}});var n=p(r(74603)),i=p(r(22298)),a=p(r(42712)),o=p(r(93423)),s=p(r(35911)),c=p(r(24072)),u=p(r(4564)),l=p(r(46585)),d=p(r(29975));function p(e){return e&&e.__esModule?e:{default:e}}},72668:(e,t)=>{"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function n(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function i(e,t,r,i,a,o){return n((s=n(n(t,e),n(i,o)))<<(c=a)|s>>>32-c,r);var s,c}function a(e,t,r,n,a,o,s){return i(t&r|~t&n,e,t,a,o,s)}function o(e,t,r,n,a,o,s){return i(t&n|r&~n,e,t,a,o,s)}function s(e,t,r,n,a,o,s){return i(t^r^n,e,t,a,o,s)}function c(e,t,r,n,a,o,s){return i(r^(t|~n),e,t,a,o,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(let r=0;r>5]>>>i%32&255,a=parseInt(n.charAt(r>>>4&15)+n.charAt(15&r),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};t.default=r},35911:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default="00000000-0000-0000-0000-000000000000"},29975:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(4564))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}},16635:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i},74089:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(n)};const n=new Uint8Array(16)},34271:(e,t)=>{"use strict";function r(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function n(e,t){return e<>>32-t}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){const t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=[];for(let r=0;r>>0;d=l,l=u,u=n(c,30)>>>0,c=o,o=s}i[0]=i[0]+o>>>0,i[1]=i[1]+c>>>0,i[2]=i[2]+u>>>0,i[3]=i[3]+l>>>0,i[4]=i[4]+d>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}},46585:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.unsafeStringify=o;var n,i=(n=r(4564))&&n.__esModule?n:{default:n};const a=[];for(let e=0;e<256;++e)a.push((e+256).toString(16).slice(1));function o(e,t=0){return a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]}t.default=function(e,t=0){const r=o(e,t);if(!(0,i.default)(r))throw TypeError("Stringified UUID is invalid");return r}},74603:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(74089))&&n.__esModule?n:{default:n},a=r(46585);let o,s,c=0,u=0;t.default=function(e,t,r){let n=t&&r||0;const l=t||new Array(16);let d=(e=e||{}).node||o,p=void 0!==e.clockseq?e.clockseq:s;if(null==d||null==p){const t=e.random||(e.rng||i.default)();null==d&&(d=o=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==p&&(p=s=16383&(t[6]<<8|t[7]))}let h=void 0!==e.msecs?e.msecs:Date.now(),f=void 0!==e.nsecs?e.nsecs:u+1;const y=h-c+(f-u)/1e4;if(y<0&&void 0===e.clockseq&&(p=p+1&16383),(y<0||h>c)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");c=h,u=f,s=p,h+=122192928e5;const g=(1e4*(268435455&h)+f)%4294967296;l[n++]=g>>>24&255,l[n++]=g>>>16&255,l[n++]=g>>>8&255,l[n++]=255&g;const m=h/4294967296*1e4&268435455;l[n++]=m>>>8&255,l[n++]=255&m,l[n++]=m>>>24&15|16,l[n++]=m>>>16&255,l[n++]=p>>>8|128,l[n++]=255&p;for(let e=0;e<6;++e)l[n+e]=d[e];return t||(0,a.unsafeStringify)(l)}},22298:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(14782)),i=a(r(72668));function a(e){return e&&e.__esModule?e:{default:e}}var o=(0,n.default)("v3",48,i.default);t.default=o},14782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.URL=t.DNS=void 0,t.default=function(e,t,r){function n(e,n,o,s){var c;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o(r(40193)),i=o(r(74089)),a=r(46585);function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e,t,r){if(n.default.randomUUID&&!t&&!e)return n.default.randomUUID();const o=(e=e||{}).random||(e.rng||i.default)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=o[e];return t}return(0,a.unsafeStringify)(o)}},93423:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(r(14782)),i=a(r(34271));function a(e){return e&&e.__esModule?e:{default:e}}var o=(0,n.default)("v5",80,i.default);t.default=o},4564:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(16635))&&n.__esModule?n:{default:n};t.default=function(e){return"string"==typeof e&&i.default.test(e)}},24072:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,i=(n=r(4564))&&n.__esModule?n:{default:n};t.default=function(e){if(!(0,i.default)(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},29815:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}: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(33285),t)},33285:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateIri=t.IriValidationStrategy=void 0;const r=function(){const e="[!$&'()*+,;=]",t="%[a-fA-F0-9]{2}",r="([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",n=`${r}\\.${r}\\.${r}\\.${r}`,i="[a-fA-F0-9]{1,4}",a=`(${i}:${i}|${n})`,o="[a-zA-Z0-9\\-._~ -퟿豈-﷏ﷰ-￯𐀀-🿽𠀀-𯿽𰀀-𿿽񀀀-񏿽񐀀-񟿽񠀀-񯿽񰀀-񿿽򀀀-򏿽򐀀-򟿽򠀀-򯿽򰀀-򿿽󀀀-󏿽󐀀-󟿽󡀀-󯿽]",s=`(${o}|${t}|${e}|[:@])*`,c=`(${s})+`,u=`(${s})*`;return new RegExp(`^[a-zA-Z][a-zA-Z0-9+\\-.]*:(\\/\\/((${o}|${t}|${e}|:)*@)?(\\[(((${i}:){6}${a}|::(${i}:){5}${a}|(${i})?::(${i}:){4}${a}|((${i}:){0,1}${i})?::(${i}:){3}${a}|((${i}:){0,2}${i})?::(${i}:){2}${a}|((${i}:){0,3}${i})?::${i}:${a}|((${i}:){0,4}${i})?::${a}|((${i}:){0,5}${i})?::${i}|((${i}:){0,6}${i})?::)|v[a-fA-F0-9]+\\.(${e}|${e}|":)+)\\]|${n}|(${o}|${t}|${e})*)(:[0-9]*)?(\\/${u})*|\\/(${c}(\\/${u})*)?|${c}(\\/${u})*|)(\\?(${s}|[-󰀀-󿿽􀀀-􏿽]|[\\/?])*)?(#(${s}|[\\/?])*)?$`,"u")}(),n=/^[A-Za-z][\d+-.A-Za-z]*:[^\u0000-\u0020"<>\\^`{|}]*$/u;var i;!function(e){e.Strict="strict",e.Pragmatic="pragmatic",e.None="none"}(i=t.IriValidationStrategy||(t.IriValidationStrategy={})),t.validateIri=function(e,t=i.Strict){switch(t){case i.Strict:return r.test(e)?void 0:new Error(`Invalid IRI according to RFC 3987: '${e}'`);case i.Pragmatic:return n.test(e)?void 0:new Error(`Invalid IRI according to RDF Turtle: '${e}'`);case i.None:return;default:return new Error(`Not supported validation strategy "${t}"`)}}},55675:(e,t,r)=>{e.exports=function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=r[o]={exports:{}};t[o][0].call(u.exports,(function(e){return i(t[o][1][e]||e)}),u,u.exports,e,t,r,n)}return r[o].exports}for(var a=void 0,o=0;o=0;s--)if(c[s]!==u[s])return!1;for(s=c.length-1;s>=0;s--)if(!p(e[o=c[s]],t[o],r,n))return!1;return!0}(e,t,r,s))}return r?e===t:e==t}function h(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function f(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function y(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&l(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!e&&i&&!r;if((!e&&g.isError(i)&&a&&f(i,r)||o)&&l(i,r,"Got unwanted exception"+n),e&&i&&r&&!f(i,r)||!e&&i)throw i}var g=e("util/"),m=Object.prototype.hasOwnProperty,b=Array.prototype.slice,v="foo"===function(){}.name,_=t.exports=d,w=/\s*function\s+([^\(\s]*)\s*/;_.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return c(u(e.actual),128)+" "+e.operator+" "+c(u(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||l;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=s(t),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},g.inherits(_.AssertionError,Error),_.fail=l,_.ok=d,_.equal=function(e,t,r){e!=t&&l(e,t,r,"==",_.equal)},_.notEqual=function(e,t,r){e==t&&l(e,t,r,"!=",_.notEqual)},_.deepEqual=function(e,t,r){p(e,t,!1)||l(e,t,r,"deepEqual",_.deepEqual)},_.deepStrictEqual=function(e,t,r){p(e,t,!0)||l(e,t,r,"deepStrictEqual",_.deepStrictEqual)},_.notDeepEqual=function(e,t,r){p(e,t,!1)&&l(e,t,r,"notDeepEqual",_.notDeepEqual)},_.notDeepStrictEqual=function e(t,r,n){p(t,r,!0)&&l(t,r,n,"notDeepStrictEqual",e)},_.strictEqual=function(e,t,r){e!==t&&l(e,t,r,"===",_.strictEqual)},_.notStrictEqual=function(e,t,r){e===t&&l(e,t,r,"!==",_.notStrictEqual)},_.throws=function(e,t,r){y(!0,e,t,r)},_.doesNotThrow=function(e,t,r){y(!1,e,t,r)},_.ifError=function(e){if(e)throw e};var T=Object.keys||function(e){var t=[];for(var r in e)m.call(e,r)&&t.push(r);return t}}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":7}],3:[function(e,t,r){},{}],4:[function(e,t,r){function n(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function o(){y&&h&&(y=!1,h.length?f=h.concat(f):g=-1,f.length&&s())}function s(){if(!y){var e=a(o);y=!0;for(var t=f.length;t;){for(h=f,f=[];++g1)for(var r=1;r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(t)?r.showHidden=t:t&&n._extend(r,t),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a),s(r,e,r.depth)}function a(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function o(e,t){return e}function s(e,t,r){if(e.customInspect&&t&&_(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(r,e);return f(i)||(i=s(e,i,r)),i}var a=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(f(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return h(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):p(t)?e.stylize("null","null"):void 0}(e,t);if(a)return a;var o=Object.keys(t),m=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),v(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return c(t);if(0===o.length){if(_(t)){var w=t.name?": "+t.name:"";return e.stylize("[Function"+w+"]","special")}if(g(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(b(t))return e.stylize(Date.prototype.toString.call(t),"date");if(v(t))return c(t)}var T,O="",E=!1,x=["{","}"];return l(t)&&(E=!0,x=["[","]"]),_(t)&&(O=" [Function"+(t.name?": "+t.name:"")+"]"),g(t)&&(O=" "+RegExp.prototype.toString.call(t)),b(t)&&(O=" "+Date.prototype.toUTCString.call(t)),v(t)&&(O=" "+c(t)),0!==o.length||E&&0!=t.length?r<0?g(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),T=E?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(T,O,x)):x[0]+O+x[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,r,n,i,a){var o,c,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?c=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(c=e.stylize("[Setter]","special")),S(n,i)||(o="["+i+"]"),c||(e.seen.indexOf(u.value)<0?(c=p(r)?s(e,u.value,null):s(e,u.value,r-1)).indexOf("\n")>-1&&(c=a?c.split("\n").map((function(e){return" "+e})).join("\n").substr(2):"\n"+c.split("\n").map((function(e){return" "+e})).join("\n")):c=e.stylize("[Circular]","special")),y(o)){if(a&&i.match(/^\d+$/))return c;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+c}function l(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function p(e){return null===e}function h(e){return"number"==typeof e}function f(e){return"string"==typeof e}function y(e){return void 0===e}function g(e){return m(e)&&"[object RegExp]"===w(e)}function m(e){return"object"==typeof e&&null!==e}function b(e){return m(e)&&"[object Date]"===w(e)}function v(e){return m(e)&&("[object Error]"===w(e)||e instanceof Error)}function _(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var O=/%[sdj%]/g;n.format=function(e){if(!f(e)){for(var t=[],r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),s=n[r];r3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return 1},a=Object.create(Le.prototype);return o(a),M(a,Object.create(Be.prototype),e,t,r,n,i),a}function o(e){e._state="readable",e._reader=void 0,e._storedError=void 0,e._disturbed=!1}function s(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function c(e){return void 0!==e._reader}function u(e){return new Promise((function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)}))}function l(e){return new Promise((function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)}))}function d(e,t){return e._disturbed=!0,"closed"===e._state?Promise.resolve(void 0):"errored"===e._state?Promise.reject(e._storedError):(p(e),e._readableStreamController[Ce](t).then((function(){})))}function p(e){e._state="closed";var t=e._reader;if(void 0!==t){if(!0===_(t)){var r=!0,n=!1,i=void 0;try{for(var a,o=t._readRequests[Symbol.iterator]();!(r=(a=o.next()).done);r=!0)(0,a.value._resolve)(de(void 0,!0))}catch(e){n=!0,i=e}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}t._readRequests=[]}!function(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(t)}}function h(e,t){e._state="errored",e._storedError=t;var r=e._reader;if(void 0!==r){if(!0===_(r)){var n=!0,i=!1,a=void 0;try{for(var o,s=r._readRequests[Symbol.iterator]();!(n=(o=s.next()).done);n=!0)o.value._reject(t)}catch(e){i=!0,a=e}finally{try{!n&&s.return&&s.return()}finally{if(i)throw a}}r._readRequests=[]}else{var c=!0,u=!1,l=void 0;try{for(var d,p=r._readIntoRequests[Symbol.iterator]();!(c=(d=p.next()).done);c=!0)d.value._reject(t)}catch(e){u=!0,l=e}finally{try{!c&&p.return&&p.return()}finally{if(u)throw l}}r._readIntoRequests=[]}re(r,t),r._closedPromise.catch((function(){}))}}function f(e,t,r){e._reader._readRequests.shift()._resolve(de(t,r))}function y(e){return e._reader._readIntoRequests.length}function g(e){return e._reader._readRequests.length}function m(e){var t=e._reader;return void 0!==t&&!1!==v(t)}function b(e){var t=e._reader;return void 0!==t&&!1!==_(t)}function v(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function _(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function w(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?function(e){e._closedPromise=new Promise((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r}))}(e):"closed"===t._state?function(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(e):(function(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}(e,t._storedError),e._closedPromise.catch((function(){})))}function T(e,t){return d(e._ownerReadableStream,t)}function S(e){"readable"===e._ownerReadableStream._state?re(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):function(e,t){e._closedPromise=Promise.reject(t)}(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._closedPromise.catch((function(){})),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function O(e,t){var r=e._ownerReadableStream;return r._disturbed=!0,"errored"===r._state?Promise.reject(r._storedError):function(e,t){var r=e._controlledReadableByteStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,a={buffer:ye(t.buffer),byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return e._pendingPullIntos.push(a),u(r);if("closed"===r._state){var o=new t.constructor(a.buffer,a.byteOffset,0);return Promise.resolve(de(o,!0))}if(e._queueTotalSize>0){if(!0===Q(e,a)){var s=q(a);return H(e),Promise.resolve(de(s,!1))}if(!0===e._closeRequested){var c=new TypeError("Insufficient bytes to fill elements in the given buffer");return J(e,c),Promise.reject(c)}}e._pendingPullIntos.push(a);var l=u(r);return F(e),l}(r._readableStreamController,t)}function E(e){var t=e._ownerReadableStream;return t._disturbed=!0,"closed"===t._state?Promise.resolve(de(void 0,!0)):"errored"===t._state?Promise.reject(t._storedError):t._readableStreamController[Me]()}function x(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableStream")}function A(e){!1!==R(e)&&(!0!==e._pulling?(e._pulling=!0,e._pullAlgorithm().then((function(){if(e._pulling=!1,!0===e._pullAgain)return e._pullAgain=!1,A(e)}),(function(t){D(e,t)})).catch(_e)):e._pullAgain=!0)}function R(e){var t=e._controlledReadableStream;return!1!==C(e)&&!1!==e._started&&(!0===c(t)&&g(t)>0||j(e)>0)}function I(e){var t=e._controlledReadableStream;e._closeRequested=!0,0===e._queue.length&&p(t)}function P(e,t){var r=e._controlledReadableStream;if(!0===c(r)&&g(r)>0)f(r,t,!1);else{var n=void 0;try{n=e._strategySizeAlgorithm(t)}catch(t){throw D(e,t),t}try{Se(e,t,n)}catch(t){throw D(e,t),t}}A(e)}function N(e,t){var r=e._controlledReadableStream;Oe(e),h(r,t)}function D(e,t){"readable"===e._controlledReadableStream._state&&N(e,t)}function j(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function C(e){var t=e._controlledReadableStream._state;return!1===e._closeRequested&&"readable"===t}function M(e,t,r,n,i,a,o){t._controlledReadableStream=e,t._queue=void 0,t._queueTotalSize=void 0,Oe(t),t._started=!1,t._closeRequested=!1,t._pullAgain=!1,t._pulling=!1,t._strategySizeAlgorithm=o,t._strategyHWM=a,t._pullAlgorithm=n,t._cancelAlgorithm=i,e._readableStreamController=t;var s=r();Promise.resolve(s).then((function(){t._started=!0,A(t)}),(function(e){D(t,e)})).catch(_e)}function L(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledReadableByteStream")}function k(e){return!!ve(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function F(e){!1!==function(e){var t=e._controlledReadableByteStream;return"readable"===t._state&&!0!==e._closeRequested&&!1!==e._started&&(!0===b(t)&&g(t)>0||!0===m(t)&&y(t)>0||W(e)>0)}(e)&&(!0!==e._pulling?(e._pulling=!0,e._pullAlgorithm().then((function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,F(e))}),(function(t){"readable"===e._controlledReadableByteStream._state&&J(e,t)})).catch(_e)):e._pullAgain=!0)}function B(e){G(e),e._pendingPullIntos=[]}function U(e,t){var r=!1;"closed"===e._state&&(r=!0);var n=q(t);"default"===t.readerType?f(e,n,r):function(e,t,r){e._reader._readIntoRequests.shift()._resolve(de(t,r))}(e,n,r)}function q(e){var t=e.bytesFilled,r=e.elementSize;return new e.ctor(e.buffer,e.byteOffset,t/r)}function V(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function Q(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,o=a-a%r,s=i,c=!1;o>n&&(s=o-t.bytesFilled,c=!0);for(var u=e._queue;s>0;){var l=u[0],d=Math.min(s,l.byteLength),p=t.byteOffset+t.bytesFilled;ue(t.buffer,p,l.buffer,l.byteOffset,d),l.byteLength===d?u.shift():(l.byteOffset+=d,l.byteLength-=d),e._queueTotalSize-=d,$(e,d,t),s-=d}return c}function $(e,t,r){G(e),r.bytesFilled+=t}function H(e){0===e._queueTotalSize&&!0===e._closeRequested?p(e._controlledReadableByteStream):F(e)}function G(e){void 0!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=void 0,e._byobRequest=void 0)}function z(e){for(;e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos[0];!0===Q(e,t)&&(X(e),U(e._controlledReadableByteStream,t))}}function K(e,t){var r=e._pendingPullIntos[0];if("closed"===e._controlledReadableByteStream._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");!function(e,t){t.buffer=ye(t.buffer);var r=e._controlledReadableByteStream;if(!0===m(r))for(;y(r)>0;)U(r,X(e))}(e,r)}else!function(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if($(e,t,r),!(r.bytesFilled0){var i=r.byteOffset+r.bytesFilled,a=r.buffer.slice(i-n,i);V(e,a,0,a.byteLength)}r.buffer=ye(r.buffer),r.bytesFilled-=n,U(e._controlledReadableByteStream,r),z(e)}}(e,t,r)}function X(e){var t=e._pendingPullIntos.shift();return G(e),t}function J(e,t){var r=e._controlledReadableByteStream;B(e),Oe(e),h(r,t)}function W(e){var t=e._controlledReadableByteStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function Y(e,t,r,n,i,a,o){t._controlledReadableByteStream=e,t._pullAgain=!1,t._pulling=!1,B(t),t._queue=t._queueTotalSize=void 0,Oe(t),t._closeRequested=!1,t._started=!1,t._strategyHWM=ge(a),t._pullAlgorithm=n,t._cancelAlgorithm=i,t._autoAllocateChunkSize=o,t._pendingPullIntos=[],e._readableStreamController=t;var s=r();Promise.resolve(s).then((function(){t._started=!0,F(t)}),(function(r){"readable"===e._state&&J(t,r)})).catch(_e)}function Z(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function ee(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function te(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}function re(e,t){e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function ne(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function ie(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function ae(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function oe(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}var se=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,a=r.highWaterMark;n(this,e),o(this);var s=t.type;if("bytes"===String(s)){if(void 0===a&&(a=0),a=ge(a),void 0!==i)throw new RangeError("The strategy for a byte stream cannot have a size function");!function(e,t,r){var n=Object.create(qe.prototype),i=le(t,"pull",0,[n]),a=le(t,"cancel",1,[]),o=t.autoAllocateChunkSize;if(void 0!==o&&(!1===Number.isInteger(o)||o<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");Y(e,n,(function(){return he(t,"start",[n])}),i,a,r,o)}(this,t,a)}else{if(void 0!==s)throw new RangeError("Invalid type is specified");void 0===a&&(a=1),function(e,t,r,n){var i=Object.create(Be.prototype),a=le(t,"pull",0,[i]),o=le(t,"cancel",1,[]);M(e,i,(function(){return he(t,"start",[i])}),a,o,r,n)}(this,t,a=ge(a),me(i))}}return se(e,[{key:"cancel",value:function(e){return!1===s(this)?Promise.reject(Z("cancel")):!0===c(this)?Promise.reject(new TypeError("Cannot cancel a stream that already has a reader")):d(this,e)}},{key:"getReader",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mode;if(!1===s(this))throw Z("getReader");if(void 0===e)return i(this);if("byob"===(e=String(e)))return function(e){return new Fe(e)}(this);throw new RangeError("Invalid mode is specified")}},{key:"pipeThrough",value:function(e,t){var r=e.writable,n=e.readable;if(void 0===r||void 0===n)throw new TypeError("readable and writable arguments must be defined");return function(e){try{Promise.prototype.then.call(e,void 0,(function(){}))}catch(e){}}(this.pipeTo(r,t)),n}},{key:"pipeTo",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.preventClose,a=r.preventAbort,o=r.preventCancel;if(!1===s(this))return Promise.reject(Z("pipeTo"));if(!1===Ae(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));if(n=Boolean(n),a=Boolean(a),o=Boolean(o),!0===c(this))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(!0===Re(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));var u=i(this),l=xe(e),p=!1,h=Promise.resolve();return new Promise((function(r,i){function s(){var e=h;return h.then((function(){return e!==h?s():void 0}))}function c(e,t,r){"errored"===e._state?r(e._storedError):t.catch(r).catch(_e)}function f(t,r,n){function i(){t().then((function(){return g(r,n)}),(function(e){return g(!0,e)})).catch(_e)}!0!==p&&(p=!0,"writable"===e._state&&!1===je(e)?s().then(i):i())}function y(t,r){!0!==p&&(p=!0,"writable"===e._state&&!1===je(e)?s().then((function(){return g(t,r)})).catch(_e):g(t,r))}function g(e,t){Ne(l),S(u),e?i(t):r(void 0)}if(c(t,u._closedPromise,(function(t){!1===a?f((function(){return Ie(e,t)}),!0,t):y(!0,t)})),c(e,l._closedPromise,(function(e){!1===o?f((function(){return d(t,e)}),!0,e):y(!0,e)})),function(e,t,r){"closed"===e._state?r():t.then(r).catch(_e)}(t,u._closedPromise,(function(){!1===n?f((function(){return Pe(l)})):y()})),!0===je(e)||"closed"===e._state){var m=new TypeError("the destination writable stream closed before all data could be piped to it");!1===o?f((function(){return d(t,m)}),!0,m):y(!0,m)}(function e(){return!0===p?Promise.resolve():l._readyPromise.then((function(){return E(u).then((function(e){var t=e.value;!0!==e.done&&(h=De(l,t).catch((function(){})))}))})).then(e)})().catch((function(e){h=Promise.resolve(),_e(e)}))}))}},{key:"tee",value:function(){if(!1===s(this))throw Z("tee");var e=function(e,t){function r(){return E(o).then((function(e){var t=e.value;if(!0===e.done&&!1===s&&(!1===c&&I(h._readableStreamController),!1===u&&I(f._readableStreamController),s=!0),!0!==s){var r=t,n=t;!1===c&&P(h._readableStreamController,r),!1===u&&P(f._readableStreamController,n)}}))}function n(){}var o=i(e),s=!1,c=!1,u=!1,l=void 0,p=void 0,h=void 0,f=void 0,y=void 0,g=new Promise((function(e){y=e}));return h=a(n,r,(function(t){if(c=!0,l=t,!0===u){var r=be([l,p]),n=d(e,r);y(n)}return g})),f=a(n,r,(function(t){if(u=!0,p=t,!0===c){var r=be([l,p]),n=d(e,r);y(n)}return g})),o._closedPromise.catch((function(e){!0!==s&&(D(h._readableStreamController,e),D(f._readableStreamController,e),s=!0)})),[h,f]}(this);return be(e)}},{key:"locked",get:function(){if(!1===s(this))throw Z("locked");return c(this)}}]),e}();t.exports={CreateReadableByteStream:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,a=Object.create(Le.prototype);return o(a),Y(a,Object.create(qe.prototype),e,t,r,n,i),a},CreateReadableStream:a,ReadableStream:Le,IsReadableStreamDisturbed:function(e){return e._disturbed},ReadableStreamDefaultControllerClose:I,ReadableStreamDefaultControllerEnqueue:P,ReadableStreamDefaultControllerError:N,ReadableStreamDefaultControllerGetDesiredSize:j,ReadableStreamDefaultControllerHasBackpressure:function(e){return!0!==R(e)},ReadableStreamDefaultControllerCanCloseOrEnqueue:C};var ke=function(){function e(t){if(n(this,e),!1===s(t))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===c(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");w(this,t),this._readRequests=[]}return se(e,[{key:"cancel",value:function(e){return!1===_(this)?Promise.reject(te("cancel")):void 0===this._ownerReadableStream?Promise.reject(ee("cancel")):T(this,e)}},{key:"read",value:function(){return!1===_(this)?Promise.reject(te("read")):void 0===this._ownerReadableStream?Promise.reject(ee("read from")):E(this)}},{key:"releaseLock",value:function(){if(!1===_(this))throw te("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");S(this)}}},{key:"closed",get:function(){return!1===_(this)?Promise.reject(te("closed")):this._closedPromise}}]),e}(),Fe=function(){function e(t){if(n(this,e),!s(t))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===L(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(c(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");w(this,t),this._readIntoRequests=[]}return se(e,[{key:"cancel",value:function(e){return v(this)?void 0===this._ownerReadableStream?Promise.reject(ee("cancel")):T(this,e):Promise.reject(ne("cancel"))}},{key:"read",value:function(e){return v(this)?void 0===this._ownerReadableStream?Promise.reject(ee("read from")):ArrayBuffer.isView(e)?!0===fe(e.buffer)?Promise.reject(new TypeError("Cannot read into a view onto a detached ArrayBuffer")):0===e.byteLength?Promise.reject(new TypeError("view must have non-zero byteLength")):O(this,e):Promise.reject(new TypeError("view must be an array buffer view")):Promise.reject(ne("read"))}},{key:"releaseLock",value:function(){if(!v(this))throw ne("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");S(this)}}},{key:"closed",get:function(){return v(this)?this._closedPromise:Promise.reject(ne("closed"))}}]),e}(),Be=function(){function e(){throw n(this,e),new TypeError}return se(e,[{key:"close",value:function(){if(!1===x(this))throw ie("close");if(!1===C(this))throw new TypeError("The stream is not in a state that permits close");I(this)}},{key:"enqueue",value:function(e){if(!1===x(this))throw ie("enqueue");if(!1===C(this))throw new TypeError("The stream is not in a state that permits enqueue");return P(this,e)}},{key:"error",value:function(e){if(!1===x(this))throw ie("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");N(this,e)}},{key:Ce,value:function(e){return Oe(this),this._cancelAlgorithm(e)}},{key:Me,value:function(){var e=this._controlledReadableStream;if(this._queue.length>0){var t=Te(this);return!0===this._closeRequested&&0===this._queue.length?p(e):A(this),Promise.resolve(de(t,!1))}var r=l(e);return A(this),r}},{key:"desiredSize",get:function(){if(!1===x(this))throw ie("desiredSize");return j(this)}}]),e}(),Ue=function(){function e(){throw n(this,e),new TypeError("ReadableStreamBYOBRequest cannot be used directly")}return se(e,[{key:"respond",value:function(e){if(!1===k(this))throw ae("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!0===fe(this._view.buffer))throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");!function(e,t){if(t=Number(t),!1===pe(t))throw new RangeError("bytesWritten must be a finite");K(e,t)}(this._associatedReadableByteStreamController,e)}},{key:"respondWithNewView",value:function(e){if(!1===k(this))throw ae("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");if(!0===fe(e.buffer))throw new TypeError("The supplied view's buffer has been detached and so cannot be used as a response");!function(e,t){var r=e._pendingPullIntos[0];if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,K(e,t.byteLength)}(this._associatedReadableByteStreamController,e)}},{key:"view",get:function(){if(!1===k(this))throw ae("view");return this._view}}]),e}(),qe=function(){function e(){throw n(this,e),new TypeError("ReadableByteStreamController constructor cannot be used directly")}return se(e,[{key:"close",value:function(){if(!1===L(this))throw oe("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableByteStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");!function(e){var t=e._controlledReadableByteStream;if(e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0&&e._pendingPullIntos[0].bytesFilled>0){var r=new TypeError("Insufficient bytes to fill elements in the given buffer");throw J(e,r),r}p(t)}}(this)}},{key:"enqueue",value:function(e){if(!1===L(this))throw oe("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableByteStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(e))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");if(!0===fe(e.buffer))throw new TypeError("Cannot enqueue a view onto a detached ArrayBuffer");!function(e,t){var r=e._controlledReadableByteStream,n=t.buffer,i=t.byteOffset,a=t.byteLength,o=ye(n);!0===b(r)?0===g(r)?V(e,o,i,a):f(r,new Uint8Array(o,i,a),!1):!0===m(r)?(V(e,o,i,a),z(e)):V(e,o,i,a)}(this,e)}},{key:"error",value:function(e){if(!1===L(this))throw oe("error");var t=this._controlledReadableByteStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");J(this,e)}},{key:Ce,value:function(e){return this._pendingPullIntos.length>0&&(this._pendingPullIntos[0].bytesFilled=0),Oe(this),this._cancelAlgorithm(e)}},{key:Me,value:function(){var e=this._controlledReadableByteStream;if(this._queueTotalSize>0){var t=this._queue.shift();this._queueTotalSize-=t.byteLength,H(this);var r=void 0;try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(e){return Promise.reject(e)}return Promise.resolve(de(r,!1))}var n=this._autoAllocateChunkSize;if(void 0!==n){var i=void 0;try{i=new ArrayBuffer(n)}catch(e){return Promise.reject(e)}var a={buffer:i,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}var o=l(e);return F(this),o}},{key:"byobRequest",get:function(){if(!1===L(this))throw oe("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos[0],t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled),r=Object.create(Ue.prototype);(function(e,t,r){e._associatedReadableByteStreamController=t,e._view=r})(r,this,t),this._byobRequest=r}return this._byobRequest}},{key:"desiredSize",get:function(){if(!1===L(this))throw oe("desiredSize");return W(this)}}]),e}()},{"./helpers.js":10,"./queue-with-sizes.js":11,"./utils.js":14,"./writable-stream.js":15,"better-assert":16}],13:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,r,n,i,a){function u(){return t}e._writable=D(u,(function(t){return function(e,t){y("TransformStreamDefaultSinkWriteAlgorithm()");var r=e._transformStreamController;return!0===e._backpressure?e._backpressureChangePromise.then((function(){var n=e._writable;if("erroring"===n._state)throw n._storedError;return r._transformAlgorithm(t)})):r._transformAlgorithm(t)}(e,t)}),(function(){return function(e){y("TransformStreamDefaultSinkCloseAlgorithm()");var t=e._readable;return e._transformStreamController._flushAlgorithm().then((function(){if("errored"===t._state)throw t._storedError;var e=t._readableStreamController;!0===P(e)&&E(e)})).catch((function(r){throw o(e,r),t._storedError}))}(e)}),(function(){return function(e){return o(e,new TypeError("Writable side aborted")),Promise.resolve()}(e)}),r,n),e._readable=O(u,(function(){return function(e){return y("TransformStreamDefaultSourcePullAlgorithm()"),c(e,!1),e._backpressureChangePromise}(e)}),(function(t){return s(e,t),Promise.resolve()}),i,a),e._backpressure=void 0,e._backpressureChangePromise=void 0,e._backpressureChangePromise_resolve=void 0,c(e,!0),e._transformStreamController=void 0}function a(e){return!!_(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function o(e,t){y("TransformStreamError()"),"readable"===e._readable._state&&A(e._readable._readableStreamController,t),s(e,t)}function s(e,t){j(e._writable._writableStreamController,t),!0===e._backpressure&&c(e,!1)}function c(e,t){y("TransformStreamSetBackpressure() [backpressure = "+t+"]"),void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(),e._backpressureChangePromise=new Promise((function(t){e._backpressureChangePromise_resolve=t})),e._backpressure=t}function u(e){return!!_(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function l(e,t,r,n){t._controlledTransformStream=e,e._transformStreamController=t,t._transformAlgorithm=r,t._flushAlgorithm=n}function d(e,t){y("TransformStreamDefaultControllerEnqueue()");var r=e._controlledTransformStream,n=r._readable._readableStreamController;if(!1===P(n))throw new TypeError("Readable side is not in a state that permits enqueue");try{x(n,t)}catch(e){throw s(r,e),r._readable._storedError}I(n)!==r._backpressure&&c(r,!0)}function p(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function h(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}var f=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(n(this,e),void 0!==t.readableType)throw new RangeError("Invalid readable type specified");if(void 0!==t.writableType)throw new RangeError("Invalid writable type specified");var s=r.size,c=T(s),u=r.highWaterMark;void 0===u&&(u=1),u=w(u);var p=a.size,h=T(p),f=a.highWaterMark;void 0===f&&(f=0),f=w(f);var y=void 0;i(this,new Promise((function(e){y=e})),u,c,f,h),function(e,t){var r=Object.create(M.prototype),n=function(e){try{return d(r,e),Promise.resolve()}catch(e){return Promise.reject(e)}},i=t.transform;if(void 0!==i){if("function"!=typeof i)throw new TypeError("transform is not a method");n=function(n){return v(i,t,[n,r]).catch((function(t){throw o(e,t),t}))}}var a=b(t,"flush",0,[r]);l(e,r,n,a)}(this,t);var g=m(t,"start",[this._transformStreamController]);y(g)}return f(e,[{key:"readable",get:function(){if(!1===a(this))throw h("readable");return this._readable}},{key:"writable",get:function(){if(!1===a(this))throw h("writable");return this._writable}}]),e}(),M=function(){function e(){throw n(this,e),new TypeError("TransformStreamDefaultController instances cannot be created directly")}return f(e,[{key:"enqueue",value:function(e){if(!1===u(this))throw p("enqueue");d(this,e)}},{key:"error",value:function(e){if(!1===u(this))throw p("error");!function(e,t){o(e._controlledTransformStream,t)}(this,e)}},{key:"terminate",value:function(){if(!1===u(this))throw p("terminate");!function(e){y("TransformStreamDefaultControllerTerminate()");var t=e._controlledTransformStream,r=t._readable._readableStreamController;!0===P(r)&&E(r),s(t,new TypeError("TransformStream terminated"))}(this)}},{key:"desiredSize",get:function(){if(!1===u(this))throw p("desiredSize");var e=this._controlledTransformStream._readable._readableStreamController;return R(e)}}]),e}();t.exports={CreateTransformStream:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){return 1},o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){return 1},c=Object.create(C.prototype),u=void 0;i(c,new Promise((function(e){u=e})),n,a,o,s),l(c,Object.create(M.prototype),t,r);var d=e();return u(d),c},TransformStream:C}},{"./helpers.js":10,"./readable-stream.js":12,"./writable-stream.js":15,"better-assert":16,debug:18}],14:[function(e,t,r){"use strict";var n=e("better-assert");r.rethrowAssertionErrorRejection=function(e){e&&e.constructor===n.AssertionError&&setTimeout((function(){throw e}),0)}},{"better-assert":16}],15:[function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return new Y(e)}function a(e){e._state="writable",e._storedError=void 0,e._writer=void 0,e._writableStreamController=void 0,e._writeRequests=[],e._inFlightWriteRequest=void 0,e._closeRequest=void 0,e._inFlightCloseRequest=void 0,e._pendingAbortRequest=void 0,e._backpressure=!1}function o(e){return!!V(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function s(e){return void 0!==e._writer}function c(e,t){var r=e._state;if("closed"===r)return Promise.resolve(void 0);if("errored"===r)return Promise.reject(e._storedError);var n=new TypeError("Requested to abort");if(void 0!==e._pendingAbortRequest)return Promise.reject(n);var i=!1;"erroring"===r&&(i=!0,t=void 0);var a=new Promise((function(r,n){e._pendingAbortRequest={_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:i}}));return!1===i&&l(e,n),a}function u(e,t){L("WritableStreamDealWithRejection(stream, %o)",t),"writable"!==e._state?d(e):l(e,t)}function l(e,t){L("WritableStreamStartErroring(stream, %o)",t);var r=e._writableStreamController;e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&b(n,t),!1===function(e){return void 0===e._inFlightWriteRequest&&void 0===e._inFlightCloseRequest?(L("WritableStreamHasOperationMarkedInFlight() is false"),!1):(L("WritableStreamHasOperationMarkedInFlight() is true"),!0)}(e)&&!0===r._started&&d(e)}function d(e){L("WritableStreamFinishErroring()"),e._state="errored",e._writableStreamController[J]();var t=e._storedError,r=!0,n=!1,i=void 0;try{for(var a,o=e._writeRequests[Symbol.iterator]();!(r=(a=o.next()).done);r=!0)a.value._reject(t)}catch(e){n=!0,i=e}finally{try{!r&&o.return&&o.return()}finally{if(n)throw i}}if(e._writeRequests=[],void 0!==e._pendingAbortRequest){var s=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===s._wasAlreadyErroring)return s._reject(t),void h(e);e._writableStreamController[X](s._reason).then((function(){s._resolve(),h(e)}),(function(t){s._reject(t),h(e)}))}else h(e)}function p(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function h(e){L("WritableStreamRejectCloseAndClosedPromiseIfNeeded()"),void 0!==e._closeRequest&&(e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&(N(t,e._storedError),t._closedPromise.catch((function(){})))}function f(e,t){var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?function(e){L("defaultWriterReadyPromiseReset()"),e._readyPromise=new Promise((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}(r):C(r)),e._backpressure=t}function y(e){return!!V(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function g(e){var t=e._ownerWritableStream,r=t._state;if("closed"===r||"errored"===r)return Promise.reject(new TypeError("The stream (in "+r+" state) is not in the writable state and cannot be closed"));var n=new Promise((function(e,r){var n={_resolve:e,_reject:r};t._closeRequest=n}));return!0===t._backpressure&&"writable"===r&&C(e),function(e){G(e,"close",0),S(e)}(t._writableStreamController),n}function m(e,t){"pending"===e._closedPromiseState?N(e,t):function(e,t){e._closedPromise=Promise.reject(t),e._closedPromiseState="rejected"}(e,t),e._closedPromise.catch((function(){}))}function b(e,t){L("WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, %o)",t),"pending"===e._readyPromiseState?function(e,t){L("defaultWriterReadyPromiseReject(writer, %o)",t),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}(e,t):function(e,t){L("defaultWriterReadyPromiseResetToRejected(writer, %o)",t),e._readyPromise=Promise.reject(t),e._readyPromiseState="rejected"}(e,t),e._readyPromise.catch((function(){}))}function v(e){var t=e._ownerWritableStream,r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");b(e,r),m(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function _(e,t){var r=e._ownerWritableStream,n=r._writableStreamController,i=function(e,t){try{return e._strategySizeAlgorithm(t)}catch(t){return O(e,t),1}}(n,t);if(r!==e._ownerWritableStream)return Promise.reject(I("write to"));var a=r._state;if("errored"===a)return Promise.reject(r._storedError);if(!0===p(r)||"closed"===a)return Promise.reject(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return Promise.reject(r._storedError);var o=function(e){return new Promise((function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)}))}(r);return function(e,t,r){var n={chunk:t};try{G(e,n,r)}catch(t){return void O(e,t)}var i=e._controlledWritableStream;!1===p(i)&&"writable"===i._state&&f(i,E(e)),S(e)}(n,t,i),o}function w(e,t,r,n,i,a,o,s){t._controlledWritableStream=e,e._writableStreamController=t,t._queue=void 0,t._queueTotalSize=void 0,K(t),t._started=!1,t._strategySizeAlgorithm=s,t._strategyHWM=o,t._writeAlgorithm=n,t._closeAlgorithm=i,t._abortAlgorithm=a;var c=E(t);f(e,c);var l=r();Promise.resolve(l).then((function(){t._started=!0,S(t)}),(function(r){t._started=!0,u(e,r)})).catch(Q)}function T(e){return e._strategyHWM-e._queueTotalSize}function S(e){L("WritableStreamDefaultControllerAdvanceQueueIfNeeded()");var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest){var r=t._state;if("closed"!==r&&"errored"!==r)if("erroring"!==r){if(0!==e._queue.length){var n=z(e);"close"===n?function(e){var t=e._controlledWritableStream;(function(e){e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0})(t),H(e),e._closeAlgorithm().then((function(){!function(e){e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0,"erroring"===e._state&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var t=e._writer;void 0!==t&&function(e){e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}(t)}(t)}),(function(e){!function(e,t){e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),u(e,t)}(t,e)})).catch(Q)}(e):function(e,t){var r=e._controlledWritableStream;(function(e){e._inFlightWriteRequest=e._writeRequests.shift()})(r),e._writeAlgorithm(t).then((function(){!function(e){e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}(r);var t=r._state;if(H(e),!1===p(r)&&"writable"===t){var n=E(e);f(r,n)}S(e)}),(function(e){!function(e,t){e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,u(e,t)}(r,e)})).catch(Q)}(e,n.chunk)}}else d(t)}}function O(e,t){"writable"===e._controlledWritableStream._state&&x(e,t)}function E(e){return T(e)<=0}function x(e,t){l(e._controlledWritableStream,t)}function A(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function R(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function I(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function P(e){e._closedPromise=new Promise((function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"}))}function N(e,t){e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function D(e,t){L("defaultWriterReadyPromiseInitializeAsRejected(writer, %o)",t),e._readyPromise=Promise.reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function j(e){L("defaultWriterReadyPromiseInitializeAsResolved()"),e._readyPromise=Promise.resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}function C(e){L("defaultWriterReadyPromiseResolve()"),e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}var M=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,o=r.highWaterMark,s=void 0===o?1:o;if(n(this,e),a(this),void 0!==t.type)throw new RangeError("Invalid type is specified");var c=q(i);!function(e,t,r,n){var i=Object.create(Z.prototype),a=F(t,"write",1,[i]),o=F(t,"close",0,[]),s=F(t,"abort",1,[]);w(e,i,(function(){return B(t,"start",[i])}),a,o,s,r,n)}(this,t,s=U(s),c)}return M(e,[{key:"abort",value:function(e){return!1===o(this)?Promise.reject(A("abort")):!0===s(this)?Promise.reject(new TypeError("Cannot abort a stream that already has a writer")):c(this,e)}},{key:"getWriter",value:function(){if(!1===o(this))throw A("getWriter");return i(this)}},{key:"locked",get:function(){if(!1===o(this))throw A("locked");return s(this)}}]),e}();t.exports={AcquireWritableStreamDefaultWriter:i,CreateWritableStream:function(e,t,r,n){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){return 1},s=Object.create(W.prototype);return a(s),w(s,Object.create(Z.prototype),e,t,r,n,i,o),s},IsWritableStream:o,IsWritableStreamLocked:s,WritableStream:W,WritableStreamAbort:c,WritableStreamDefaultControllerErrorIfNeeded:O,WritableStreamDefaultWriterCloseWithErrorPropagation:function(e){var t=e._ownerWritableStream,r=t._state;return!0===p(t)||"closed"===r?Promise.resolve():"errored"===r?Promise.reject(t._storedError):g(e)},WritableStreamDefaultWriterRelease:v,WritableStreamDefaultWriterWrite:_,WritableStreamCloseQueuedOrInFlight:p};var Y=function(){function e(t){if(n(this,e),!1===o(t))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===s(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;var r=t._state;if("writable"===r)!1===p(t)&&!0===t._backpressure?function(e){L("defaultWriterReadyPromiseInitialize()"),e._readyPromise=new Promise((function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r})),e._readyPromiseState="pending"}(this):j(this),P(this);else if("erroring"===r)D(this,t._storedError),this._readyPromise.catch((function(){})),P(this);else if("closed"===r)j(this),function(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}(this);else{var i=t._storedError;D(this,i),this._readyPromise.catch((function(){})),function(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}(this,i),this._closedPromise.catch((function(){}))}}return M(e,[{key:"abort",value:function(e){return!1===y(this)?Promise.reject(R("abort")):void 0===this._ownerWritableStream?Promise.reject(I("abort")):function(e,t){return c(e._ownerWritableStream,t)}(this,e)}},{key:"close",value:function(){if(!1===y(this))return Promise.reject(R("close"));var e=this._ownerWritableStream;return void 0===e?Promise.reject(I("close")):!0===p(e)?Promise.reject(new TypeError("cannot close an already-closing stream")):g(this)}},{key:"releaseLock",value:function(){if(!1===y(this))throw R("releaseLock");void 0!==this._ownerWritableStream&&v(this)}},{key:"write",value:function(e){return!1===y(this)?Promise.reject(R("write")):void 0===this._ownerWritableStream?Promise.reject(I("write to")):_(this,e)}},{key:"closed",get:function(){return!1===y(this)?Promise.reject(R("closed")):this._closedPromise}},{key:"desiredSize",get:function(){if(!1===y(this))throw R("desiredSize");if(void 0===this._ownerWritableStream)throw I("desiredSize");return e=this._ownerWritableStream,"errored"===(t=e._state)||"erroring"===t?null:"closed"===t?0:T(e._writableStreamController);var e,t}},{key:"ready",get:function(){return!1===y(this)?Promise.reject(R("ready")):this._readyPromise}}]),e}(),Z=function(){function e(){throw n(this,e),new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}return M(e,[{key:"error",value:function(e){if(!1===function(e){return!!V(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledWritableStream")}(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&x(this,e)}},{key:X,value:function(e){return this._abortAlgorithm(e)}},{key:J,value:function(){K(this)}}]),e}()},{"./helpers.js":10,"./queue-with-sizes.js":11,"./utils.js":14,"better-assert":16,debug:18}],16:[function(e,t,r){(function(r){var n=e("assert").AssertionError,i=e("callsite"),a=e("fs");t.exports=r.env.NO_ASSERT?function(){}:function(e){if(!e){var t=i(),r=t[1],o=r.getFileName(),s=r.getLineNumber(),c=(c=a.readFileSync(o,"utf8")).split("\n")[s-1].match(/assert\((.*)\)/)[1];throw new n({message:c,stackStartFunction:t[0].getFunction()})}}}).call(this,e("_process"))},{_process:4,assert:2,callsite:17,fs:3}],17:[function(e,t,r){t.exports=function(){var e=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t};var t=new Error;Error.captureStackTrace(t,arguments.callee);var r=t.stack;return Error.prepareStackTrace=e,r}},{}],18:[function(e,t,r){(function(n){function i(){var e;try{e=r.storage.debug}catch(e){}return!e&&void 0!==n&&"env"in n&&(e=n.env.DEBUG),e}(r=t.exports=e("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},r.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,a=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(i++,"%c"===e&&(a=i))})),e.splice(a,0,n)}},r.save=function(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}},r.load=i,r.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},r.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(i())}).call(this,e("_process"))},{"./debug":19,_process:4}],19:[function(e,t,r){function n(e){function t(){if(t.enabled){var e=t,i=+new Date,a=i-(n||i);e.diff=a,e.prev=n,e.curr=i,n=i;for(var o=new Array(arguments.length),s=0;s100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*d;case"days":case"day":case"d":return r*l;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*c;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function i(e){return e>=l?Math.round(e/l)+"d":e>=u?Math.round(e/u)+"h":e>=c?Math.round(e/c)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function a(e){return o(e,l,"day")||o(e,u,"hour")||o(e,c,"minute")||o(e,s,"second")||e+" ms"}function o(e,t,r){if(!(e0)return n(e);if("number"===r&&!1===isNaN(e))return t.long?a(e):i(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}]},{},[1])(1)},94824:(e,t)=>{"use strict";function r(e){return e>=65&&e<=90||e>=97&&e<=122||58===e||95===e||8204===e||8205===e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}Object.defineProperty(t,"__esModule",{value:!0}),t.CHAR="\t\n\r -퟿-�𐀀-􏿿",t.S=" \t\r\n",t.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NAME_CHAR="-"+t.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.CHAR_RE=new RegExp("^["+t.CHAR+"]$","u"),t.S_RE=new RegExp("^["+t.S+"]+$","u"),t.NAME_START_CHAR_RE=new RegExp("^["+t.NAME_START_CHAR+"]$","u"),t.NAME_CHAR_RE=new RegExp("^["+t.NAME_CHAR+"]$","u"),t.NAME_RE=new RegExp("^["+t.NAME_START_CHAR+"]["+t.NAME_CHAR+"]*$","u"),t.NMTOKEN_RE=new RegExp("^["+t.NAME_CHAR+"]+$","u"),t.S_LIST=[32,10,13,9],t.isChar=function(e){return e>=32&&e<=55295||10===e||13===e||9===e||e>=57344&&e<=65533||e>=65536&&e<=1114111},t.isS=function(e){return 32===e||10===e||13===e||9===e},t.isNameStartChar=r,t.isNameChar=function(e){return r(e)||e>=48&&e<=57||45===e||46===e||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},30718:(e,t)=>{"use strict";function r(e){return e>=65&&e<=90||e>=97&&e<=122||58===e||95===e||8204===e||8205===e||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}Object.defineProperty(t,"__esModule",{value:!0}),t.CHAR="-퟿-�𐀀-􏿿",t.RESTRICTED_CHAR="-\b\v\f--„†-Ÿ",t.S=" \t\r\n",t.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NAME_CHAR="-"+t.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.CHAR_RE=new RegExp("^["+t.CHAR+"]$","u"),t.RESTRICTED_CHAR_RE=new RegExp("^["+t.RESTRICTED_CHAR+"]$","u"),t.S_RE=new RegExp("^["+t.S+"]+$","u"),t.NAME_START_CHAR_RE=new RegExp("^["+t.NAME_START_CHAR+"]$","u"),t.NAME_CHAR_RE=new RegExp("^["+t.NAME_CHAR+"]$","u"),t.NAME_RE=new RegExp("^["+t.NAME_START_CHAR+"]["+t.NAME_CHAR+"]*$","u"),t.NMTOKEN_RE=new RegExp("^["+t.NAME_CHAR+"]+$","u"),t.S_LIST=[32,10,13,9],t.isChar=function(e){return e>=1&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},t.isRestrictedChar=function(e){return e>=1&&e<=8||11===e||12===e||e>=14&&e<=31||e>=127&&e<=132||e>=134&&e<=159},t.isCharAndNotRestricted=function(e){return 9===e||10===e||13===e||e>31&&e<127||133===e||e>159&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111},t.isS=function(e){return 32===e||10===e||13===e||9===e},t.isNameStartChar=r,t.isNameChar=function(e){return r(e)||e>=48&&e<=57||45===e||46===e||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},26457:(e,t)=>{"use strict";function r(e){return e>=65&&e<=90||95===e||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}Object.defineProperty(t,"__esModule",{value:!0}),t.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",t.NC_NAME_CHAR="-"+t.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",t.NC_NAME_START_CHAR_RE=new RegExp("^["+t.NC_NAME_START_CHAR+"]$","u"),t.NC_NAME_CHAR_RE=new RegExp("^["+t.NC_NAME_CHAR+"]$","u"),t.NC_NAME_RE=new RegExp("^["+t.NC_NAME_START_CHAR+"]["+t.NC_NAME_CHAR+"]*$","u"),t.isNCNameStartChar=r,t.isNCNameChar=function(e){return r(e)||45===e||46===e||e>=48&&e<=57||183===e||e>=768&&e<=879||e>=8255&&e<=8256}},20512:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.toSparqlJs=t.toSparql=t.Factory=t.Algebra=t.translate=void 0;const s=o(r(77947));t.translate=s.default;const c=a(r(1616));t.Algebra=c;const u=o(r(95962));t.Factory=u.default;const l=r(80619);Object.defineProperty(t,"toSparql",{enumerable:!0,get:function(){return l.toSparql}}),Object.defineProperty(t,"toSparqlJs",{enumerable:!0,get:function(){return l.toSparqlJs}});const d=o(r(84238));t.Util=d.default},1616:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.expressionTypes=t.types=void 0,(n=t.types||(t.types={})).ALT="alt",n.ASK="ask",n.BGP="bgp",n.CONSTRUCT="construct",n.DESCRIBE="describe",n.DISTINCT="distinct",n.EXPRESSION="expression",n.EXTEND="extend",n.FILTER="filter",n.FROM="from",n.GRAPH="graph",n.GROUP="group",n.INV="inv",n.JOIN="join",n.LEFT_JOIN="leftjoin",n.LINK="link",n.MINUS="minus",n.NOP="nop",n.NPS="nps",n.ONE_OR_MORE_PATH="OneOrMorePath",n.ORDER_BY="orderby",n.PATH="path",n.PATTERN="pattern",n.PROJECT="project",n.REDUCED="reduced",n.SEQ="seq",n.SERVICE="service",n.SLICE="slice",n.UNION="union",n.VALUES="values",n.ZERO_OR_MORE_PATH="ZeroOrMorePath",n.ZERO_OR_ONE_PATH="ZeroOrOnePath",n.COMPOSITE_UPDATE="compositeupdate",n.DELETE_INSERT="deleteinsert",n.LOAD="load",n.CLEAR="clear",n.CREATE="create",n.DROP="drop",n.ADD="add",n.MOVE="move",n.COPY="copy",(r=t.expressionTypes||(t.expressionTypes={})).AGGREGATE="aggregate",r.EXISTENCE="existence",r.NAMED="named",r.OPERATOR="operator",r.TERM="term",r.WILDCARD="wildcard"},95962:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const o=a(r(1616)),s=r(18050),c=r(22112),u=r(55403);t.default=class{constructor(e){this.dataFactory=e||new s.DataFactory,this.stringType=this.createTerm("http://www.w3.org/2001/XMLSchema#string")}createAlt(e,t=!0){return this.flattenMulti({type:o.types.ALT,input:e},t)}createAsk(e){return{type:o.types.ASK,input:e}}createBoundAggregate(e,t,r,n,i){const a=this.createAggregateExpression(t,r,n,i);return a.variable=e,a}createBgp(e){return{type:o.types.BGP,patterns:e}}createConstruct(e,t){return{type:o.types.CONSTRUCT,input:e,template:t}}createDescribe(e,t){return{type:o.types.DESCRIBE,input:e,terms:t}}createDistinct(e){return{type:o.types.DISTINCT,input:e}}createExtend(e,t,r){return{type:o.types.EXTEND,input:e,variable:t,expression:r}}createFrom(e,t,r){return{type:o.types.FROM,input:e,default:t,named:r}}createFilter(e,t){return{type:o.types.FILTER,input:e,expression:t}}createGraph(e,t){return{type:o.types.GRAPH,input:e,name:t}}createGroup(e,t,r){return{type:o.types.GROUP,input:e,variables:t,aggregates:r}}createInv(e){return{type:o.types.INV,path:e}}createJoin(e,t=!0){return this.flattenMulti({type:o.types.JOIN,input:e},t)}createLeftJoin(e,t,r){return r?{type:o.types.LEFT_JOIN,input:[e,t],expression:r}:{type:o.types.LEFT_JOIN,input:[e,t]}}createLink(e){return{type:o.types.LINK,iri:e}}createMinus(e,t){return{type:o.types.MINUS,input:[e,t]}}createNop(){return{type:o.types.NOP}}createNps(e){return{type:o.types.NPS,iris:e}}createOneOrMorePath(e){return{type:o.types.ONE_OR_MORE_PATH,path:e}}createOrderBy(e,t){return{type:o.types.ORDER_BY,input:e,expressions:t}}createPath(e,t,r,n){return n?{type:o.types.PATH,subject:e,predicate:t,object:r,graph:n}:{type:o.types.PATH,subject:e,predicate:t,object:r,graph:this.dataFactory.defaultGraph()}}createPattern(e,t,r,n){const i=this.dataFactory.quad(e,t,r,n);return i.type=o.types.PATTERN,i}createProject(e,t){return{type:o.types.PROJECT,input:e,variables:t}}createReduced(e){return{type:o.types.REDUCED,input:e}}createSeq(e,t=!0){return this.flattenMulti({type:o.types.SEQ,input:e},t)}createService(e,t,r){return{type:o.types.SERVICE,input:e,name:t,silent:Boolean(r)}}createSlice(e,t,r){return t=t||0,void 0!==r?{type:o.types.SLICE,input:e,start:t,length:r}:{type:o.types.SLICE,input:e,start:t}}createUnion(e,t=!0){return this.flattenMulti({type:o.types.UNION,input:e},t)}createValues(e,t){return{type:o.types.VALUES,variables:e,bindings:t}}createZeroOrMorePath(e){return{type:o.types.ZERO_OR_MORE_PATH,path:e}}createZeroOrOnePath(e){return{type:o.types.ZERO_OR_ONE_PATH,path:e}}createAggregateExpression(e,t,r,n){return n?{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,separator:n,distinct:r}:{type:o.types.EXPRESSION,expressionType:o.expressionTypes.AGGREGATE,aggregator:e,expression:t,distinct:r}}createExistenceExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.EXISTENCE,not:e,input:t}}createNamedExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.NAMED,name:e,args:t}}createOperatorExpression(e,t){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.OPERATOR,operator:e,args:t}}createTermExpression(e){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.TERM,term:e}}createWildcardExpression(){return{type:o.types.EXPRESSION,expressionType:o.expressionTypes.WILDCARD,wildcard:new u.Wildcard}}createTerm(e){return"$"===e[0]&&(e=e.replace("$","?")),(0,c.stringToTerm)(e,this.dataFactory)}createCompositeUpdate(e){return{type:o.types.COMPOSITE_UPDATE,updates:e}}createDeleteInsert(e,t,r){const n={type:o.types.DELETE_INSERT};return e&&(n.delete=e),t&&(n.insert=t),r&&(n.where=r),n}createLoad(e,t,r){const n={type:o.types.LOAD,source:e};return t&&(n.destination=t),this.addSilent(n,Boolean(r))}createClear(e,t){return this.addSilent({type:o.types.CLEAR,source:e},Boolean(t))}createCreate(e,t){return this.addSilent({type:o.types.CREATE,source:e},Boolean(t))}createDrop(e,t){return this.addSilent({type:o.types.DROP,source:e},Boolean(t))}createAdd(e,t,r){return this.addSilent({type:o.types.ADD,source:e,destination:t},Boolean(r))}createMove(e,t,r){return this.addSilent({type:o.types.MOVE,source:e,destination:t},Boolean(r))}createCopy(e,t,r){return this.addSilent({type:o.types.COPY,source:e,destination:t},Boolean(r))}addSilent(e,t){return t&&(e.silent=t),e}flattenMulti(e,t){if(!t)return e;const r=e.type,n=e.input;let i=[];for(const e of n)e.type===r?i.push(...e.input):i.push(e);return e.input=i,e}}},80619:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.toSparqlJs=t.toSparql=void 0;const s=r(91032),c=r(22112),u=r(55403),l=a(r(1616)),d=o(r(95962)),p=o(r(84238)),h=l.types,f=l.expressionTypes;let y;const g=new d.default;function m(e){b();let t=v(e=function(e){return D(e,[])}(e));return"group"===t.type?t.patterns[0]:t}function b(){y={project:!1,extend:[],group:[],aggregates:[],order:[]}}function v(e){switch(e.type!==h.EXTEND&&e.type!==h.ORDER_BY&&e.type!==h.GRAPH&&(y.project=!1),e.type){case h.EXPRESSION:return _(e);case h.ASK:return A(e,h.ASK);case h.BGP:return function(e){let t=e.patterns.map(E);return 0===t.length?null:{type:"bgp",triples:t}}(e);case h.CONSTRUCT:return function(e){return{type:"query",prefixes:{},queryType:"CONSTRUCT",template:e.template.map(E),where:p.default.flatten([v(e.input)])}}(e);case h.DESCRIBE:return A(e,h.DESCRIBE);case h.DISTINCT:return function(e){let t=v(e.input);return t.patterns[0].distinct=!0,t}(e);case h.EXTEND:return function(e){return y.project?(y.extend.push(e),v(e.input)):p.default.flatten([v(e.input),{type:"bind",variable:e.variable,expression:_(e.expression)}])}(e);case h.FROM:return function(e){const t=v(e.input);let r=t;return"group"===t.type&&(r=t.patterns[0]),r.from={default:e.default,named:e.named},t}(e);case h.FILTER:return function(e){return{type:"group",patterns:p.default.flatten([v(e.input),{type:"filter",expression:_(e.expression)}])}}(e);case h.GRAPH:return function(e){return{type:"graph",patterns:p.default.flatten([v(e.input)]),name:e.name}}(e);case h.GROUP:return function(e){const t=v(e.input),r=e.aggregates.map(O);return y.aggregates.push(...r),y.group.push(...e.variables),t}(e);case h.JOIN:return function(e){return p.default.flatten(e.input.map(v)).reduce(((e,t)=>("bgp"!==t.type||0==e.length||"bgp"!==e[e.length-1].type?e.push(t):e[e.length-1].triples.push(...t.triples),e)),[])}(e);case h.LEFT_JOIN:return function(e){const t={type:"optional",patterns:[v(e.input[1])]};return e.expression&&t.patterns.push({type:"filter",expression:_(e.expression)}),t.patterns=p.default.flatten(t.patterns),p.default.flatten([v(e.input[0]),t])}(e);case h.MINUS:return function(e){let t=v(e.input[1]);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),p.default.flatten([v(e.input[0]),{type:"minus",patterns:t}])}(e);case h.NOP:return{};case h.ORDER_BY:return function(e){return y.order.push(...e.expressions),v(e.input)}(e);case h.PATH:return function(e){return{type:"bgp",triples:[{subject:e.subject,predicate:w(e.predicate),object:e.object}]}}(e);case h.PATTERN:return E(e);case h.PROJECT:return A(e,h.PROJECT);case h.REDUCED:return function(e){let t=v(e.input);return t.patterns[0].reduced=!0,t}(e);case h.SERVICE:return function(e){let t=v(e.input);return"group"===t.type&&(t=t.patterns),Array.isArray(t)||(t=[t]),{type:"service",name:e.name,silent:e.silent,patterns:t}}(e);case h.SLICE:return function(e){let t=v(e.input),r=t;return t.type&&"group"===t.type&&(r=t.patterns[0]),0!==e.start&&(r.offset=e.start),void 0!==e.length&&(r.limit=e.length),t}(e);case h.UNION:return function(e){return{type:"union",patterns:e.input.map(v).map(S)}}(e);case h.VALUES:return function(e){return{type:"values",values:e.bindings.map((t=>{let r={};for(let n of e.variables){let e=`?${n.value}`;t[e]?r[e]=t[e]:r[e]=void 0}return r}))}}(e);case h.COMPOSITE_UPDATE:return function(e){return{prefixes:{},type:"update",updates:e.updates.map((e=>v(e).updates[0]))}}(e);case h.DELETE_INSERT:return function(e){var t;let r,n=e.where;if(n&&n.type===h.FROM){let e=n;n=e.input,r={default:e.default,named:e.named}}const i=[{updateType:"insertdelete",delete:N(e.delete||[]),insert:N(e.insert||[])}];if(r&&(i[0].using=r),!n||n.type===h.BGP&&0===n.patterns.length)i[0].where=[];else{const e=[];let r=v(D(n,e));if("group"===r.type?i[0].where=r.patterns:i[0].where=[r],e.length>0){if(1!==e.length)throw new Error("This is unexpected and might indicate an error in graph handling for updates.");""!==(null===(t=e[0])||void 0===t?void 0:t.value)&&(i[0].where=[{type:"graph",patterns:i[0].where,name:e[0]}])}}return e.delete||e.where?e.insert||e.where?!e.insert&&e.where&&"bgp"===e.where.type&&(0,s.isomorphic)(e.delete,e.where.patterns)&&(delete i[0].where,i[0].updateType="deletewhere"):(delete i[0].insert,delete i[0].where,e.delete.some((e=>"Variable"===e.subject.termType||"Variable"===e.predicate.termType||"Variable"===e.object.termType))?i[0].updateType="deletewhere":i[0].updateType="delete"):(i[0].updateType="insert",delete i[0].delete,delete i[0].where),{prefixes:{},type:"update",updates:i}}(e);case h.LOAD:return function(e){const t=[{type:"load",silent:Boolean(e.silent),source:e.source}];return e.destination&&(t[0].destination=e.destination),{prefixes:{},type:"update",updates:t}}(e);case h.CLEAR:return function(e){return I(e,"clear")}(e);case h.CREATE:return function(e){return I(e,"create")}(e);case h.DROP:return function(e){return I(e,"drop")}(e);case h.ADD:return function(e){return P(e,"add")}(e);case h.MOVE:return function(e){return P(e,"move")}(e);case h.COPY:return function(e){return P(e,"copy")}(e)}throw new Error(`Unknown Operation type ${e.type}`)}function _(e){switch(e.expressionType){case f.AGGREGATE:return function(e){const t={expression:_(e.expression),type:"aggregate",aggregation:e.aggregator,distinct:e.distinct};return e.separator&&(t.separator=e.separator),t}(e);case f.EXISTENCE:return function(e){return{type:"operation",operator:e.not?"notexists":"exists",args:[{type:"group",patterns:p.default.flatten([v(e.input)])}]}}(e);case f.NAMED:return function(e){return{type:"functionCall",function:e.name,args:e.args.map(_)}}(e);case f.OPERATOR:return function(e){if("desc"===e.operator){return{expression:_(e.args[0]),descending:!0}}const t={type:"operation",operator:e.operator,args:e.args.map(_)};return"in"!==t.operator&&"notin"!==t.operator||(t.args=[t.args[0]].concat([t.args.slice(1)])),t}(e);case f.TERM:return function(e){return e.term}(e);case f.WILDCARD:return function(e){return e.wildcard}(e)}throw new Error(`Unknown Expression Operation type ${e.expressionType}`)}function w(e){switch(e.type){case h.ALT:return function(e){const t=e.input.map(w);return t.every((e=>"pathType"in e&&"!"===e.pathType))?{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:p.default.flatten(t.map((e=>e.items)))}]}:{type:"path",pathType:"|",items:t}}(e);case h.INV:return function(e){if(e.path.type===h.NPS){const t=e.path.iris.map((e=>({type:"path",pathType:"^",items:[e]})));return t.length<=1?{type:"path",pathType:"!",items:t}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:t}]}}return{type:"path",pathType:"^",items:[w(e.path)]}}(e);case h.LINK:return function(e){return e.iri}(e);case h.NPS:return function(e){return e.iris.length<=1?{type:"path",pathType:"!",items:e.iris}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:e.iris}]}}(e);case h.ONE_OR_MORE_PATH:return function(e){return{type:"path",pathType:"+",items:[w(e.path)]}}(e);case h.SEQ:return function(e){return{type:"path",pathType:"/",items:e.input.map(w)}}(e);case h.ZERO_OR_MORE_PATH:return function(e){return{type:"path",pathType:"*",items:[w(e.path)]}}(e);case h.ZERO_OR_ONE_PATH:return function(e){return{type:"path",pathType:"?",items:[w(e.path)]}}(e)}throw new Error(`Unknown Path type ${e.type}`)}function T(e){return(0,c.termToString)(e)}function S(e){return Array.isArray(e)?1===e.length?e[0]:{type:"group",patterns:e}:e}function O(e){return e}function E(e){return{subject:e.subject,predicate:e.predicate,object:e.object}}function x(e,t){let r=p.default.isSimpleTerm(e)?T(e):e;if("string"==typeof r){if(t[r])return t[r]}else if(Array.isArray(e))e=e.map((e=>x(e,t)));else for(let r of Object.keys(e))e[r]=x(e[r],t);return e}function A(e,t){const r={type:"query",prefixes:{}},n=r;let i;t===h.PROJECT?(r.queryType="SELECT",i=e.variables):t===h.ASK?r.queryType="ASK":t===h.DESCRIBE&&(r.queryType="DESCRIBE",i=e.terms);const a=y.extend,o=y.group,s=y.aggregates,l=y.order;b(),y.project=!0;let d=p.default.flatten([v(e.input)]);1===d.length&&"group"===d[0].type&&(d=d[0].patterns),r.where=d;let f={};for(let e of y.aggregates)f[T(e.variable)]=_(e);let g={};for(let e=y.extend.length-1;e>=0;--e){let t=y.extend[e];g[T(t.variable)]=x(_(t.expression),f)}y.group.length>0&&(n.group=y.group.map((e=>{let t=T(e);if(g[t]){let r=g[t];return delete g[t],{variable:e,expression:r}}return{expression:e}}))),y.order.length>0&&(n.order=y.order.map(v).map((e=>e.descending?e:{expression:e}))),i&&(n.variables=i.map((e=>{let t=T(e);if(g[t]){let r=g[t];return delete g[t],{variable:e,expression:r}}return e})),0===n.variables.length&&(n.variables=[new u.Wildcard]));const m=Object.entries(g);if(m.length>0){n.where=n.where||[];for(const[e,t]of m)n.where.push({type:"bind",variable:(0,c.stringToTerm)(e),expression:t})}if(r.where.length>0&&"filter"===r.where[r.where.length-1].type){const e=r.where[r.where.length-1];R(e,Object.keys(f))&&(n.having=p.default.flatten([x(e.expression,f)]),r.where.splice(-1))}return y.extend=a,y.group=o,y.aggregates=s,y.order=l,{type:"group",patterns:[n]}}function R(e,t){return p.default.isSimpleTerm(e)?t.indexOf(T(e))>=0:Array.isArray(e)?e.some((e=>R(e,t))):e===Object(e)?Object.keys(e).some((r=>R(e[r],t))):t.indexOf(e)>=0}function I(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return"DEFAULT"===e.source?r[0].graph={default:!0}:"NAMED"===e.source?r[0].graph={named:!0}:"ALL"===e.source?r[0].graph={all:!0}:r[0].graph={type:"graph",name:e.source},{prefixes:{},type:"update",updates:r}}function P(e,t){const r=[{type:t,silent:Boolean(e.silent)}];return r[0].source="DEFAULT"===e.source?{type:"graph",default:!0}:{type:"graph",name:e.source},r[0].destination="DEFAULT"===e.destination?{type:"graph",default:!0}:{type:"graph",name:e.destination},{prefixes:{},type:"update",updates:r}}function N(e){if(!e)return[];const t={};return e.forEach((e=>{const r=e.graph.value;t[r]||(t[r]=[]),t[r].push(e)})),Object.keys(t).map((e=>""===e?{type:"bgp",triples:t[e].map(E)}:{type:"graph",triples:t[e].map(E),name:t[e][0].graph}))}function D(e,t){if(Array.isArray(e))return e.map((e=>D(e,t)));if(!e.type)return e;if(e.type===h.DELETE_INSERT)return e;if((e.type===h.PATTERN||e.type===h.PATH)&&e.graph)return t.push(e.graph),""!==e.graph.name?e.type===h.PATTERN?g.createPattern(e.subject,e.predicate,e.object):g.createPath(e.subject,e.predicate,e.object):e;const r={},n={},i={};for(let t of Object.keys(e)){const a=[];if(r[t]=D(e[t],a),a.length>0){n[t]=a;for(const e of a)i[e.value]=e}}const a=Object.keys(i);if(a.length>0)if(1!==a.length||[h.PROJECT,h.SERVICE].includes(e.type)){if(e.type===h.BGP)return function(e,t){var r;const n={};for(let i=0;i""===n[e][0].value?t:g.createGraph(t,n[e][r]))):""!==n[e][0].value&&(r[e]=g.createGraph(t,n[e][0]))}}else t.push(i[a[0]]);return r}t.toSparql=function(e,t={}){return new u.Generator(t).stringify(m(e))},t.toSparqlJs=m},77947:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const s=r(53933),c=r(22112),u=a(r(1616)),l=o(r(95962)),d=o(r(84238)),p=r(55403).Parser,h=u.types;let f,y=new Set,g=0,m=!1;function b(e,t,r){if(y=new Set,g=0,m=Boolean(t),!e.type)return f.createNop();if("query"!==e.type&&"update"!==e.type)throw new Error("Translate only works on complete query or update objects.");let n;var i;return w(e),"query"===e.type?(n=S({type:"group",patterns:e.where||[]}),n=function(e,t){const r=e,n=[],i={};if(r.variables=r.variables&&r.variables.map((e=>C(e,i))),r.having=r.having&&r.having.map((e=>C(e,i))),r.order=r.order&&r.order.map((e=>C(e,i))),r.group||Object.keys(i).length>0){const e=Object.keys(i).map((e=>function(e,t){if("aggregate"!==e.type||!e.aggregation)throw new Error(`Unexpected input: ${JSON.stringify(e)}`);const r=O(e);return r.variable=t,r}(i[e],f.createTerm(e)))),n=[];if(r.group)for(const e of r.group)if(d.default.isSimpleTerm(e.expression))n.push(e.expression);else{const r="variable"in e?e.variable:A();t=f.createExtend(t,r,O(e.expression)),n.push(r)}t=f.createGroup(t,n,e)}if(r.having)for(let e of r.having)t=f.createFilter(t,O(e));e.values&&(t=f.createJoin([t,j(e)]));let a=[];if("SELECT"===e.queryType||"DESCRIBE"===e.queryType)if(e.variables.some((e=>e&&d.default.isWildcard(e))))a=Object.values(T(e)).sort(((e,t)=>e.value.localeCompare(t.value)));else for(let t of e.variables)_(t)||!("variable"in t)?a.push(t):t.variable&&(a.push(t.variable),n.push(t));for(let e of n)t=f.createExtend(t,e.variable,O(e.expression));return r.order&&(t=f.createOrderBy(t,r.order.map((e=>{let t=O(e.expression);return e.descending&&(t=f.createOperatorExpression("desc",[t])),t})))),"SELECT"===e.queryType&&(t=f.createProject(t,a)),r.distinct&&(t=f.createDistinct(t)),r.reduced&&(t=f.createReduced(t)),"CONSTRUCT"===e.queryType?t=f.createConstruct(t,(e.template||[]).map(R)):"ASK"===e.queryType?t=f.createAsk(t):"DESCRIBE"===e.queryType&&(t=f.createDescribe(t,a)),(r.offset||r.limit)&&(t=f.createSlice(t,r.offset||0,r.limit)),r.from&&(t=f.createFrom(t,r.from.default,r.from.named)),t}(e,n)):"update"===e.type&&(n=1===(i=e).updates.length?M(i.updates[0]):f.createCompositeUpdate(i.updates.map(M))),r&&(n=k(n)),n}function v(e){return Boolean(null==e?void 0:e.termType)}function _(e){return"Variable"===(null==e?void 0:e.termType)}function w(e){if(v(e))_(e)&&y.add(`?${e.value}`);else if(Array.isArray(e))for(const t of e)w(t);else if(e&&"object"==typeof e)for(let t of Object.keys(e))t.startsWith("?")?y.add(t):t.startsWith("$")&&y.add(`?${t.slice(1)}`),w(e[t])}function T(e){let t={};if((r=e).subject&&r.predicate&&r.object){const r=[T(e.subject),T(e.predicate),T(e.object),e.graph?T(e.graph):{}];Object.assign(t,...r)}else if(v(e))_(e)&&(t[e.value]=e);else if("bgp"===e.type){const r=e.triples;Object.assign(t,...r.map(T))}else if("path"===e.type)Object.assign(t,...e.items.map(T));else if("group"===e.type||"union"===e.type||"optional"===e.type)Object.assign(t,...e.patterns.map(T));else if("service"===e.type||"graph"===e.type)Object.assign(t,T(e.name)),Object.assign(t,...e.patterns.map(T));else if("bind"===e.type)Object.assign(t,T(e.variable));else if("values"===e.type){if(e.values.length>0){const r=Object.keys(e.values[0]).map((e=>f.createTerm(e)));Object.assign(t,...r.map(T))}}else if("query"===e.type&&("SELECT"===e.queryType||"DESCRIBE"===e.queryType)){e.where&&e.variables.some(d.default.isWildcard)&&Object.assign(t,...e.where.map(T));for(const r of e.variables)_(r)?Object.assign(t,T(r)):r.variable&&Object.assign(t,T(r.variable));if("SELECT"===e.queryType){if(e.group)for(const r of e.group)r.variable&&Object.assign(t,T(r.variable));if(e.values){const r={type:"values",values:e.values};Object.assign(t,T(r))}}}var r;return t}function S(e){if("bgp"===e.type)return function(e){let t=[],r=[];for(let i of e.triples)if("pathType"in i.predicate){let e=x((n=i).subject,E(n.predicate),n.object);for(let n of e)n.type===h.PATH?(t.length>0&&r.push(f.createBgp(t)),t=[],r.push(n)):t.push(n)}else t.push(R(i));var n;return t.length>0&&r.push(f.createBgp(t)),1===r.length?r[0]:f.createJoin(r)}(e);if("union"===e.type)return f.createUnion(e.patterns.map((e=>("group"!==e.type&&(e={type:"group",patterns:[e]}),S(e)))));if("graph"===e.type){let t=S({type:"group",patterns:e.patterns});return t=m?P(t,e.name):f.createGraph(t,e.name),t}if("values"===e.type)return j(e);if("query"===e.type)return b(e,m,!1);if("group"===e.type){let t=[],r=[];for(let n of e.patterns)("filter"===n.type?t:r).push(n);let n=r.reduce(N,f.createBgp([])),i=t.map((e=>O(e.expression)));return i.length>0&&(n=f.createFilter(n,i.reduce(((e,t)=>f.createOperatorExpression("&&",[e,t]))))),n}throw new Error(`Unexpected type: ${e.type}`)}function O(e){if(d.default.isSimpleTerm(e))return f.createTermExpression(e);if(d.default.isQuad(e))return d.default.hasQuadVariables(e)?f.createOperatorExpression("triple",[O(e.subject),O(e.predicate),O(e.object)]):f.createTermExpression(e);if(d.default.isWildcard(e))return f.createWildcardExpression();if("aggregation"in e)return f.createAggregateExpression(e.aggregation,O(e.expression),Boolean(e.distinct),e.separator);if("function"in e)return f.createNamedExpression(e.function,e.args.map(O));if("operator"in e)return"exists"===e.operator||"notexists"===e.operator?f.createExistenceExpression("notexists"===e.operator,S(e.args[0])):("in"!==e.operator&&"notin"!==e.operator||(e.args=[e.args[0]].concat(e.args[1])),f.createOperatorExpression(e.operator,e.args.map(O)));throw new Error(`Unknown expression: ${JSON.stringify(e)}`)}function E(e){if(d.default.isSimpleTerm(e)){if("NamedNode"===e.termType)return f.createLink(e);throw new Error(`Path predicate should be a NamedNode, got ${JSON.stringify(e)}`)}if("^"===e.pathType)return f.createInv(E(e.items[0]));if("!"===e.pathType){let t,r=[],n=[];t="pathType"in e.items[0]&&"|"===e.items[0].pathType?e.items[0].items:e.items;for(let e of t)if(d.default.isSimpleTerm(e))r.push(e);else{if("^"!==e.pathType)throw new Error(`Unexpected item: ${JSON.stringify(e)}`);n.push(e.items[0])}let i=f.createNps(r),a=f.createInv(f.createNps(n));return 0===n.length?i:0===r.length?a:f.createAlt([i,a])}if("/"===e.pathType)return f.createSeq(e.items.map(E));if("|"===e.pathType)return f.createAlt(e.items.map(E));if("*"===e.pathType)return f.createZeroOrMorePath(E(e.items[0]));if("+"===e.pathType)return f.createOneOrMorePath(E(e.items[0]));if("?"===e.pathType)return f.createZeroOrOnePath(E(e.items[0]));throw new Error(`Unable to translate path expression ${JSON.stringify(e)}`)}function x(e,t,r){if(t.type===h.LINK)return[f.createPattern(e,t.iri,r)];if(t.type===h.INV)return x(r,t.path,e);if(t.type===h.SEQ){let n=e;return d.default.flatten(t.input.map(((e,i)=>{const a=i===t.input.length-1?r:A(),o=x(n,e,a);return"Variable"===a.termType&&(n=a),o})))}return[f.createPath(e,t,r)]}function A(){let e="?var"+g++;return y.has(e)?A():(y.add(e),f.createTerm(e))}function R(e){if("pathType"in e.predicate)throw new Error("Trying to translate property path to quad.");return f.createPattern(e.subject,e.predicate,e.object,e.graph)}t.default=function(e,t){let r;if(t=t||{},f=new l.default(t.dataFactory),"string"==typeof e){let n=new p(t);n._resetBlanks(),r=n.parse(e)}else r=e;return b(r,t.quads,t.blankToVariable)};let I=Object.values(h);function P(e,t,r){if(e.type===h.GRAPH){if(r)throw new Error("Recursing through nested GRAPH statements with a replacement is impossible.");e=P(e.input,e.name)}else if(e.type===h.SERVICE);else if(e.type===h.BGP)e.patterns=e.patterns.map((e=>(r&&(e.subject.equals(t)&&(e.subject=r),e.predicate.equals(t)&&(e.predicate=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t),e)));else if(e.type===h.PATH)r&&(e.subject.equals(t)&&(e.subject=r),e.object.equals(t)&&(e.object=r)),"DefaultGraph"===e.graph.termType&&(e.graph=t);else if(e.type!==h.PROJECT||r)if(e.type!==h.EXTEND||r)for(let n of Object.keys(e))Array.isArray(e[n])?e[n]=e[n].map((e=>P(e,t,r))):I.indexOf(e[n].type)>=0?e[n]=P(e[n],t,r):r&&_(e[n])&&e[n].equals(t)&&(e[n]=r);else e.variable.equals(t)&&(r=A()),e.input=P(e.input,t,r);else e.variables.some((e=>e.equals(t)))||(r=A()),e.input=P(e.input,t,r);return e}function N(e,t){if("optional"===t.type){const r=S({type:"group",patterns:t.patterns});e=r.type===h.FILTER?f.createLeftJoin(e,r.input,r.expression):f.createLeftJoin(e,r)}else if("minus"===t.type){const r=S({type:"group",patterns:t.patterns});e=f.createMinus(e,r)}else if("bind"===t.type)e=f.createExtend(e,t.variable,O(t.expression));else if("service"===t.type){const r={type:"group",patterns:t.patterns};e=D(e,f.createService(S(r),t.name,t.silent))}else e=D(e,S(t));return e}function D(e,t){return e.type===h.BGP&&t.type===h.BGP?e=f.createBgp([...e.patterns,...t.patterns]):e.type===h.BGP&&0===e.patterns.length?e=t:t.type===h.BGP&&0===t.patterns.length||(e=f.createJoin([e,t])),e}function j(e){let t=(0===e.values.length?[]:Object.keys(e.values[0])).map(f.createTerm.bind(f)),r=e.values.map((e=>{let t=Object.keys(e);t=t.filter((t=>void 0!==e[t]));let r={};for(let n of t)r[n]=e[n];return r}));return f.createValues(t,r)}function C(e,t){if("type"in e&&"aggregate"===e.type){let r,n=!1;for(let i of Object.keys(t))if(s(t[i],e)){r=f.createTerm(i),n=!0;break}return n||(r=A(),t[(0,c.termToString)(r)]=e),r}return"expression"in e&&e.expression?{...e,expression:C(e.expression,t)}:"args"in e&&e.args?{...e,args:e.args.map((e=>C(e,t)))}:e}function M(e){if("type"in e){if("load"===e.type)return function(e){return f.createLoad(e.source,e.destination,e.silent)}(e);if("clear"===e.type||"create"===e.type||"drop"===e.type)return function(e){let t;switch(t=d.default.isSimpleTerm(e.graph)?e.graph:e.graph.all?"ALL":e.graph.default?"DEFAULT":e.graph.named?"NAMED":e.graph.name,e.type){case"clear":return f.createClear(t,e.silent);case"create":return f.createCreate(t,e.silent);case"drop":return f.createDrop(t,e.silent)}}(e);if("add"===e.type||"copy"===e.type||"move"===e.type)return function(e){const t=e.source.default?"DEFAULT":e.source.name,r=e.destination.default?"DEFAULT":e.destination.name;switch(e.type){case"copy":return f.createCopy(t,r,e.silent);case"move":return f.createMove(t,r,e.silent);case"add":return f.createAdd(t,r,e.silent)}}(e)}else if("insertdelete"===e.updateType||"deletewhere"===e.updateType||"delete"===e.updateType||"insert"===e.updateType)return function(e){if(!m)throw new Error("INSERT/DELETE operations are only supported with quads option enabled");let t,r=[],n=[];if(e.delete&&(r=d.default.flatten(e.delete.map((t=>L(t,e.graph))))),e.insert&&(n=d.default.flatten(e.insert.map((t=>L(t,e.graph))))),e.where&&e.where.length>0){t=S({type:"group",patterns:e.where});const r=e.using;r?t=f.createFrom(t,r.default,r.named):e.graph&&(t=P(t,e.graph))}else"deletewhere"===e.updateType&&r.length>0&&(t=f.createBgp(r));return f.createDeleteInsert(r.length>0?r:void 0,n.length>0?n:void 0,t)}(e);throw new Error(`Unknown update type ${JSON.stringify(e)}`)}function L(e,t){let r=t;"graph"===e.type&&(r=e.name);let n=e.triples;return r&&(n=n.map((e=>Object.assign(e,{graph:r})))),n.map(R)}function k(e){const t={},r=Array.from(y).reduce(((e,t)=>(e[t]=!0,e)),{});return d.default.mapOperation(e,{[u.types.DELETE_INSERT]:e=>({result:f.createDeleteInsert(e.delete,e.insert,e.where&&k(e.where)),recurse:!1}),[u.types.PATH]:(e,t)=>({result:t.createPath(n(e.subject),e.predicate,n(e.object),n(e.graph)),recurse:!1}),[u.types.PATTERN]:(e,t)=>({result:t.createPattern(n(e.subject),n(e.predicate),n(e.object),n(e.graph)),recurse:!1}),[u.types.CONSTRUCT]:e=>({result:f.createConstruct(k(e.input),e.template),recurse:!1})});function n(e){if("BlankNode"===e.termType){let n=t[e.value];return n||(n=d.default.createUniqueVariable(e.value,r,f.dataFactory),r[n.value]=!0,t[e.value]=n),n}return e}}},84238:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(1616),a=n(r(95962)),o=r(13252);class s{static flatten(e){return Array.prototype.concat(...e).filter((e=>e))}static objectify(e){if(e.termType){if("Quad"===e.termType)return{type:"pattern",termType:"Quad",subject:s.objectify(e.subject),predicate:s.objectify(e.predicate),object:s.objectify(e.object),graph:s.objectify(e.graph)};{let t={termType:e.termType,value:e.value};return e.language&&(t.language=e.language),e.datatype&&(t.datatype=s.objectify(e.datatype)),t}}if(Array.isArray(e))return e.map((e=>s.objectify(e)));if(e===Object(e)){let t={};for(let r of Object.keys(e))t[r]=s.objectify(e[r]);return t}return e}static inScopeVariables(e){const t=[];function r(e){t.find((t=>e.value===t.value))||t.push(e)}function n(e){"Variable"===e.subject.termType&&r(e.subject),"Variable"===e.predicate.termType&&r(e.predicate),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.predicate.termType&&n(e.predicate),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph)}return s.recurseOperation(e,{[i.types.EXPRESSION]:e=>(e.expressionType===i.expressionTypes.AGGREGATE&&e.variable&&r(e.variable),!0),[i.types.EXTEND]:e=>(r(e.variable),!0),[i.types.GRAPH]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.GROUP]:e=>(e.variables.forEach(r),!0),[i.types.PATH]:e=>("Variable"===e.subject.termType&&r(e.subject),"Variable"===e.object.termType&&r(e.object),"Variable"===e.graph.termType&&r(e.graph),"Quad"===e.subject.termType&&n(e.subject),"Quad"===e.object.termType&&n(e.object),"Quad"===e.graph.termType&&n(e.graph),!0),[i.types.PATTERN]:e=>(n(e),!0),[i.types.PROJECT]:e=>(e.variables.forEach(r),!1),[i.types.SERVICE]:e=>("Variable"===e.name.termType&&r(e.name),!0),[i.types.VALUES]:e=>(e.variables.forEach(r),!0)}),t}static recurseOperation(e,t){let r=e,n=!0;const a=t[e.type];if(a&&(n=a(e)),!n)return;let o=e=>s.recurseOperation(e,t);switch(r.type){case i.types.ALT:r.input.map(o);break;case i.types.ASK:o(r.input);break;case i.types.BGP:r.patterns.forEach(o);break;case i.types.CONSTRUCT:o(r.input),r.template.map(o);break;case i.types.DESCRIBE:case i.types.DISTINCT:o(r.input);break;case i.types.EXPRESSION:r.expressionType===i.expressionTypes.EXISTENCE&&o(r.input);break;case i.types.EXTEND:case i.types.FILTER:o(r.input),o(r.expression);break;case i.types.FROM:case i.types.GRAPH:o(r.input);break;case i.types.GROUP:o(r.input),r.aggregates.forEach(o);break;case i.types.INV:o(r.path);break;case i.types.JOIN:r.input.map(o);break;case i.types.LEFT_JOIN:r.input.map(o),r.expression&&o(r.expression);break;case i.types.LINK:break;case i.types.MINUS:r.input.map(o);break;case i.types.NOP:case i.types.NPS:break;case i.types.ONE_OR_MORE_PATH:o(r.path);break;case i.types.ORDER_BY:o(r.input),r.expressions.forEach(o);break;case i.types.PATH:o(r.predicate);break;case i.types.PATTERN:break;case i.types.PROJECT:case i.types.REDUCED:o(r.input);break;case i.types.SEQ:r.input.map(o);break;case i.types.SERVICE:case i.types.SLICE:o(r.input);break;case i.types.UNION:r.input.map(o);break;case i.types.VALUES:break;case i.types.ZERO_OR_MORE_PATH:case i.types.ZERO_OR_ONE_PATH:o(r.path);break;case i.types.COMPOSITE_UPDATE:r.updates.forEach((e=>o(e)));break;case i.types.DELETE_INSERT:r.delete&&r.delete.forEach((e=>o(e))),r.insert&&r.insert.forEach((e=>o(e))),r.where&&o(r.where);break;case i.types.LOAD:case i.types.CLEAR:case i.types.CREATE:case i.types.DROP:case i.types.ADD:case i.types.MOVE:case i.types.COPY:break;default:throw new Error(`Unknown Operation type ${r.type}`)}}static mapOperation(e,t,r){let n=e,o=!0,c=!0;r=r||new a.default;const u=t[e.type];if(u){const t=u(e,r);n=t.result,o=t.recurse,c=!1!==t.copyMetadata}let l;if(c&&(n.metadata||e.metadata)&&(l={...n.metadata,...e.metadata}),!o)return l&&(n.metadata=l),n;let d=e=>s.mapOperation(e,t,r);switch(n.type){case i.types.ALT:n=r.createAlt(n.input.map(d));break;case i.types.ASK:n=r.createAsk(d(n.input));break;case i.types.BGP:n=r.createBgp(n.patterns.map(d));break;case i.types.CONSTRUCT:n=r.createConstruct(d(n.input),n.template.map(d));break;case i.types.DESCRIBE:n=r.createDescribe(d(n.input),n.terms);break;case i.types.DISTINCT:n=r.createDistinct(d(n.input));break;case i.types.EXPRESSION:n=s.mapExpression(n,t,r);break;case i.types.EXTEND:n=r.createExtend(d(n.input),n.variable,d(n.expression));break;case i.types.FILTER:n=r.createFilter(d(n.input),d(n.expression));break;case i.types.FROM:n=r.createFrom(d(n.input),[...n.default],[...n.named]);break;case i.types.GRAPH:n=r.createGraph(d(n.input),n.name);break;case i.types.GROUP:n=r.createGroup(d(n.input),[].concat(n.variables),n.aggregates.map(d));break;case i.types.INV:n=r.createInv(d(n.path));break;case i.types.JOIN:n=r.createJoin(n.input.map(d));break;case i.types.LEFT_JOIN:n=r.createLeftJoin(d(n.input[0]),d(n.input[1]),n.expression?d(n.expression):void 0);break;case i.types.LINK:n=r.createLink(n.iri);break;case i.types.MINUS:n=r.createMinus(d(n.input[0]),d(n.input[1]));break;case i.types.NOP:n=r.createNop();break;case i.types.NPS:n=r.createNps([].concat(n.iris));break;case i.types.ONE_OR_MORE_PATH:n=r.createOneOrMorePath(d(n.path));break;case i.types.ORDER_BY:n=r.createOrderBy(d(n.input),n.expressions.map(d));break;case i.types.PATH:n=r.createPath(n.subject,d(n.predicate),n.object,n.graph);break;case i.types.PATTERN:n=r.createPattern(n.subject,n.predicate,n.object,n.graph);break;case i.types.PROJECT:n=r.createProject(d(n.input),[...n.variables]);break;case i.types.REDUCED:n=r.createReduced(d(n.input));break;case i.types.SEQ:n=r.createSeq(n.input.map(d));break;case i.types.SERVICE:n=r.createService(d(n.input),n.name,n.silent);break;case i.types.SLICE:n=r.createSlice(d(n.input),n.start,n.length);break;case i.types.UNION:n=r.createUnion(n.input.map(d));break;case i.types.VALUES:n=r.createValues([].concat(n.variables),n.bindings.map((e=>Object.assign({},e))));break;case i.types.ZERO_OR_MORE_PATH:n=r.createZeroOrMorePath(d(n.path));break;case i.types.ZERO_OR_ONE_PATH:n=r.createZeroOrOnePath(d(n.path));break;case i.types.COMPOSITE_UPDATE:n=r.createCompositeUpdate(n.updates.map(d));break;case i.types.DELETE_INSERT:n=r.createDeleteInsert(n.delete?n.delete.map(d):void 0,n.insert?n.insert.map(d):void 0,n.where?d(n.where):void 0);break;case i.types.LOAD:n=r.createLoad(n.source,n.destination,n.silent);break;case i.types.CLEAR:n=r.createClear(n.source,n.silent);break;case i.types.CREATE:n=r.createCreate(n.source,n.silent);break;case i.types.DROP:n=r.createDrop(n.source,n.silent);break;case i.types.ADD:n=r.createAdd(n.source,n.destination);break;case i.types.MOVE:n=r.createMove(n.source,n.destination);break;case i.types.COPY:n=r.createCopy(n.source,n.destination);break;default:throw new Error(`Unknown Operation type ${n.type}`)}return l&&(n.metadata=l),n}static mapExpression(e,t,r){let n=e,o=!0;r=r||new a.default;const c=t[e.expressionType];if(c&&({result:n,recurse:o}=c(e,r)),!o)return n;let u=e=>s.mapOperation(e,t,r);switch(e.expressionType){case i.expressionTypes.AGGREGATE:return e.variable?r.createBoundAggregate(e.variable,e.aggregator,u(e.expression),e.distinct,e.separator):r.createAggregateExpression(e.aggregator,u(e.expression),e.distinct,e.separator);case i.expressionTypes.EXISTENCE:return r.createExistenceExpression(e.not,u(e.input));case i.expressionTypes.NAMED:return r.createNamedExpression(e.name,e.args.map(u));case i.expressionTypes.OPERATOR:return r.createOperatorExpression(e.operator,e.args.map(u));case i.expressionTypes.TERM:return r.createTermExpression(e.term);case i.expressionTypes.WILDCARD:return r.createWildcardExpression();default:throw new Error(`Unknown Expression type ${e.expressionType}`)}}static cloneOperation(e){return s.mapOperation(e,{})}static cloneExpression(e){return s.mapExpression(e,{})}static createUniqueVariable(e,t,r){let n=0,i=e;for(;t[i];)i=`${e}${n++}`;return r.variable(i)}static isSimpleTerm(e){return void 0!==e.termType&&"Quad"!==e.termType&&"Wildcard"!==e.termType}static isQuad(e){return"Quad"===e.termType}static hasQuadVariables(e){return(0,o.someTermsNested)(e,(e=>"Variable"===e.termType))}static isWildcard(e){return"Wildcard"===e.termType}}t.default=s},98634:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var o=a(r(33096)),s=r(3379),c=new Set(["input","option","optgroup","select","button","datalist","textarea"]),u=new Set(["p"]),l=new Set(["thead","tbody"]),d=new Set(["dd","dt"]),p=new Set(["rt","rp"]),h=new Map([["tr",new Set(["tr","th","td"])],["th",new Set(["th"])],["td",new Set(["thead","th","td"])],["body",new Set(["head","link","script"])],["li",new Set(["li"])],["p",u],["h1",u],["h2",u],["h3",u],["h4",u],["h5",u],["h6",u],["select",c],["input",c],["output",c],["button",c],["datalist",c],["textarea",c],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",d],["dt",d],["address",u],["article",u],["aside",u],["blockquote",u],["details",u],["div",u],["dl",u],["fieldset",u],["figcaption",u],["figure",u],["footer",u],["form",u],["header",u],["hr",u],["main",u],["nav",u],["ol",u],["pre",u],["section",u],["table",u],["ul",u],["rt",p],["rp",p],["tbody",l],["tfoot",l]]),f=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),y=new Set(["math","svg"]),g=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),m=/\s|\//,b=function(){function e(e,t){var r,n,i,a,s,c;void 0===t&&(t={}),this.options=t,this.startIndex=0,this.endIndex=0,this.openTagStart=0,this.tagname="",this.attribname="",this.attribvalue="",this.attribs=null,this.stack=[],this.buffers=[],this.bufferOffset=0,this.writeIndex=0,this.ended=!1,this.cbs=null!=e?e:{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=null!==(r=t.lowerCaseTags)&&void 0!==r?r:this.htmlMode,this.lowerCaseAttributeNames=null!==(n=t.lowerCaseAttributeNames)&&void 0!==n?n:this.htmlMode,this.recognizeSelfClosing=null!==(i=t.recognizeSelfClosing)&&void 0!==i?i:!this.htmlMode,this.tokenizer=new(null!==(a=t.Tokenizer)&&void 0!==a?a:o.default)(this.options,this),this.foreignContext=[!this.htmlMode],null===(c=(s=this.cbs).onparserinit)||void 0===c||c.call(s,this)}return e.prototype.ontext=function(e,t){var r,n,i=this.getSlice(e,t);this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,i),this.startIndex=t},e.prototype.ontextentity=function(e,t){var r,n;this.endIndex=t-1,null===(n=(r=this.cbs).ontext)||void 0===n||n.call(r,(0,s.fromCodePoint)(e)),this.startIndex=t},e.prototype.isVoidElement=function(e){return this.htmlMode&&f.has(e)},e.prototype.onopentagname=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);this.lowerCaseTagNames&&(r=r.toLowerCase()),this.emitOpenTag(r)},e.prototype.emitOpenTag=function(e){var t,r,n,i;this.openTagStart=this.startIndex,this.tagname=e;var a=this.htmlMode&&h.get(e);if(a)for(;this.stack.length>0&&a.has(this.stack[0]);){var o=this.stack.shift();null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,o,!0)}this.isVoidElement(e)||(this.stack.unshift(e),this.htmlMode&&(y.has(e)?this.foreignContext.unshift(!0):g.has(e)&&this.foreignContext.unshift(!1))),null===(i=(n=this.cbs).onopentagname)||void 0===i||i.call(n,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,r;this.startIndex=this.openTagStart,this.attribs&&(null===(r=(t=this.cbs).onopentag)||void 0===r||r.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var r,n,i,a,o,s,c,u;this.endIndex=t;var l=this.getSlice(e,t);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),this.htmlMode&&(y.has(l)||g.has(l))&&this.foreignContext.shift(),this.isVoidElement(l))this.htmlMode&&"br"===l&&(null===(a=(i=this.cbs).onopentagname)||void 0===a||a.call(i,"br"),null===(s=(o=this.cbs).onopentag)||void 0===s||s.call(o,"br",{},!0),null===(u=(c=this.cbs).onclosetag)||void 0===u||u.call(c,"br",!1));else{var d=this.stack.indexOf(l);if(-1!==d)for(var p=0;p<=d;p++){var h=this.stack.shift();null===(n=(r=this.cbs).onclosetag)||void 0===n||n.call(r,h,p!==d)}else this.htmlMode&&"p"===l&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,r,n=this.tagname;this.endOpenTag(e),this.stack[0]===n&&(null===(r=(t=this.cbs).onclosetag)||void 0===r||r.call(t,n,!e),this.stack.shift())},e.prototype.onattribname=function(e,t){this.startIndex=e;var r=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?r.toLowerCase():r},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,s.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var r,n;this.endIndex=t,null===(n=(r=this.cbs).onattribute)||void 0===n||n.call(r,this.attribname,this.attribvalue,e===o.QuoteType.Double?'"':e===o.QuoteType.Single?"'":e===o.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(m),r=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("!".concat(n),"!".concat(r))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var r=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var n=this.getInstructionName(r);this.cbs.onprocessinginstruction("?".concat(n),"?".concat(r))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,r){var n,i,a,o;this.endIndex=t,null===(i=(n=this.cbs).oncomment)||void 0===i||i.call(n,this.getSlice(e,t-r)),null===(o=(a=this.cbs).oncommentend)||void 0===o||o.call(a),this.startIndex=t+1},e.prototype.oncdata=function(e,t,r){var n,i,a,o,s,c,u,l,d,p;this.endIndex=t;var h=this.getSlice(e,t-r);!this.htmlMode||this.options.recognizeCDATA?(null===(i=(n=this.cbs).oncdatastart)||void 0===i||i.call(n),null===(o=(a=this.cbs).ontext)||void 0===o||o.call(a,h),null===(c=(s=this.cbs).oncdataend)||void 0===c||c.call(s)):(null===(l=(u=this.cbs).oncomment)||void 0===l||l.call(u,"[CDATA[".concat(h,"]]")),null===(p=(d=this.cbs).oncommentend)||void 0===p||p.call(d)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var r=0;r=this.buffers[0].length;)this.shiftBuffer();for(var r=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),r+=this.buffers[0].slice(0,t-this.bufferOffset);return r},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,r;this.ended?null===(r=(t=this.cbs).onerror)||void 0===r||r.call(t,new Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var n,i,a,o=r(3379);function s(e){return e===n.Space||e===n.NewLine||e===n.Tab||e===n.FormFeed||e===n.CarriageReturn}function c(e){return e===n.Slash||e===n.Gt||s(e)}!function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"}(n||(n={})),function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"}(i||(i={})),function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"}(a||(t.QuoteType=a={}));var u={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])},l=function(){function e(e,t){var r=e.xmlMode,n=void 0!==r&&r,a=e.decodeEntities,s=void 0===a||a,c=this;this.cbs=t,this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=i.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=n,this.decodeEntities=s,this.entityDecoder=new o.EntityDecoder(n?o.xmlDecodeTree:o.htmlDecodeTree,(function(e,t){return c.emitCodePoint(e,t)}))}return e.prototype.reset=function(){this.state=i.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=i.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=i.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===n.Amp&&this.startEntity()},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?c(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=i.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===n.Gt||s(e)){var t=this.index-this.currentSequence.length;if(this.sectionStart=n.LowerA&&e<=n.LowerZ||e>=n.UpperA&&e<=n.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=i.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===n.ExclamationMark)this.state=i.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===n.Questionmark)this.state=i.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var t=32|e;this.sectionStart=this.index,this.xmlMode?this.state=i.InTagName:t===u.ScriptEnd[2]?this.state=i.BeforeSpecialS:t===u.TitleEnd[2]?this.state=i.BeforeSpecialT:this.state=i.InTagName}else e===n.Slash?this.state=i.BeforeClosingTagName:(this.state=i.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){c(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){s(e)||(e===n.Gt?this.state=i.Text:(this.state=this.isTagStartChar(e)?i.InClosingTagName:i.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===n.Gt||s(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=i.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===n.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=i.InSpecialTag,this.sequenceIndex=0):this.state=i.Text,this.sectionStart=this.index+1):e===n.Slash?this.state=i.InSelfClosingTag:s(e)||(this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===n.Gt?(this.cbs.onselfclosingtag(this.index),this.state=i.Text,this.sectionStart=this.index+1,this.isSpecial=!1):s(e)||(this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===n.Eq||c(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=this.index,this.state=i.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===n.Eq?this.state=i.BeforeAttributeValue:e===n.Slash||e===n.Gt?(this.cbs.onattribend(a.NoValue,this.sectionStart),this.sectionStart=-1,this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):s(e)||(this.cbs.onattribend(a.NoValue,this.sectionStart),this.state=i.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===n.DoubleQuote?(this.state=i.InAttributeValueDq,this.sectionStart=this.index+1):e===n.SingleQuote?(this.state=i.InAttributeValueSq,this.sectionStart=this.index+1):s(e)||(this.sectionStart=this.index,this.state=i.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,t){e===t||!this.decodeEntities&&this.fastForwardTo(t)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(t===n.DoubleQuote?a.Double:a.Single,this.index+1),this.state=i.BeforeAttributeName):this.decodeEntities&&e===n.Amp&&this.startEntity()},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,n.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,n.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){s(e)||e===n.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(a.Unquoted,this.index),this.state=i.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===n.Amp&&this.startEntity()},e.prototype.stateBeforeDeclaration=function(e){e===n.OpeningSquareBracket?(this.state=i.CDATASequence,this.sequenceIndex=0):this.state=e===n.Dash?i.BeforeComment:i.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===n.Dash?(this.state=i.InCommentLike,this.currentSequence=u.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=i.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===n.Gt||this.fastForwardTo(n.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=i.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===u.ScriptEnd[3]?this.startSpecial(u.ScriptEnd,4):t===u.StyleEnd[3]?this.startSpecial(u.StyleEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeSpecialT=function(e){var t=32|e;t===u.TitleEnd[3]?this.startSpecial(u.TitleEnd,4):t===u.TextareaEnd[3]?this.startSpecial(u.TextareaEnd,4):(this.state=i.InTagName,this.stateInTagName(e))},e.prototype.startEntity=function(){this.baseState=this.state,this.state=i.InEntity,this.entityStart=this.index,this.entityDecoder.startEntity(this.xmlMode?o.DecodingMode.Strict:this.baseState===i.Text||this.baseState===i.InSpecialTag?o.DecodingMode.Legacy:o.DecodingMode.Attribute)},e.prototype.stateInEntity=function(){var e=this.entityDecoder.write(this.buffer,this.index-this.offset);e>=0?(this.state=this.baseState,0===e&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===i.Text||this.state===i.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==i.InAttributeValueDq&&this.state!==i.InAttributeValueSq&&this.state!==i.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index=e||(this.state===i.InCommentLike?this.currentSequence===u.CdataEnd?this.cbs.oncdata(this.sectionStart,e,0):this.cbs.oncomment(this.sectionStart,e,0):this.state===i.InTagName||this.state===i.BeforeAttributeName||this.state===i.BeforeAttributeValue||this.state===i.AfterAttributeName||this.state===i.InAttributeName||this.state===i.InAttributeValueSq||this.state===i.InAttributeValueDq||this.state===i.InAttributeValueNq||this.state===i.InClosingTagName||this.cbs.ontext(this.sectionStart,e))},e.prototype.emitCodePoint=function(e,t){this.baseState!==i.Text&&this.baseState!==i.InSpecialTag?(this.sectionStart{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterator=t.isIterable=t.isSourceExpression=t.isPromise=t.isEventEmitter=t.isFunction=t.range=t.union=t.fromIterable=t.fromIterator=t.fromArray=t.single=t.empty=t.wrap=t.WrappingIterator=t.ClonedIterator=t.UnionIterator=t.MultiTransformIterator=t.SimpleTransformIterator=t.TransformIterator=t.BufferedIterator=t.MappingIterator=t.DESTINATION=t.identity=t.IntegerIterator=t.ArrayIterator=t.SingletonIterator=t.EmptyIterator=t.AsyncIterator=t.DESTROYED=t.ENDED=t.CLOSED=t.CLOSING=t.OPEN=t.INIT=t.setTaskScheduler=t.getTaskScheduler=t.scheduleTask=t.LinkedList=void 0;const n=r(50046),i=r(14241);Object.defineProperty(t,"LinkedList",{enumerable:!0,get:function(){return i.LinkedList}});let a=r(93240).createTaskScheduler();t.scheduleTask=function(e){a(e)},t.getTaskScheduler=function(){return a},t.setTaskScheduler=function(e){a=e},t.INIT=1,t.OPEN=2,t.CLOSING=4,t.CLOSED=8,t.ENDED=16,t.DESTROYED=32;class o extends n.EventEmitter{constructor(e=t.OPEN){super(),this._readable=!1,this._state=e,this.on("newListener",s)}_changeState(e,r=!1){const n=e>this._state&&this._statethis.emit("end"))):this.emit("end"))),n}read(){return null}forEach(e,t){this.on("data",j(e,t))}close(){this._changeState(t.CLOSED)&&this._endAsync()}destroy(e){this.done||this._destroy(e,(t=>{(e=e||t)&&this.emit("error",e),this._end(!0)}))}_destroy(e,t){t()}_end(e=!1){this._changeState(e?t.DESTROYED:t.ENDED)&&(this._readable=!1,this.removeAllListeners("readable"),this.removeAllListeners("data"),this.removeAllListeners("end"))}_endAsync(){a((()=>this._end()))}get readable(){return this._readable}set readable(e){e=Boolean(e)&&!this.done,this._readable!==e&&(this._readable=e,e&&a((()=>this.emit("readable"))))}get closed(){return this._state>=t.CLOSING}get ended(){return this._state===t.ENDED}get destroyed(){return this._state===t.DESTROYED}get done(){return this._state>=t.ENDED}toString(){const e=this._toStringDetails();return`[${this.constructor.name}${e?` ${e}`:""}]`}_toStringDetails(){return""}toArray(e){const t=[],r="number"==typeof(null==e?void 0:e.limit)?e.limit:1/0;return this.ended||r<=0?Promise.resolve(t):new Promise(((e,n)=>{const i=()=>e(t),a=o=>{t.push(o),t.length>=r&&(this.removeListener("error",n),this.removeListener("data",a),this.removeListener("end",i),e(t))};this.on("error",n),this.on("data",a),this.on("end",i)}))}getProperty(e,t){const r=this._properties;if(!t)return r&&r[e];if(r&&e in r)a((()=>t(r[e])));else{let r;(r=this._propertyCallbacks)||(this._propertyCallbacks=r=Object.create(null)),e in r?r[e].push(t):r[e]=[t]}}setProperty(e,t){(this._properties||(this._properties=Object.create(null)))[e]=t;const r=this._propertyCallbacks||{},n=r[e];if(n){for(e in delete r[e],a((()=>{for(const e of n)e(t)})),r)return;delete this._propertyCallbacks}}getProperties(){const e=this._properties,t={};for(const r in e)t[r]=e[r];return t}setProperties(e){for(const t in e)this.setProperty(t,e[t])}copyProperties(e,t){for(const r of t)e.getProperty(r,(e=>this.setProperty(r,e)))}transform(e){return new O(this,e)}map(e,t){return new y(this,j(e,t))}filter(e,t){return this.map((function(r){return e.call(t||this,r)?r:null}))}uniq(e=f){const t=new Set;return this.filter((function(r){const n=e.call(this,r);return!t.has(n)&&(t.add(n),!0)}))}prepend(e){return this.transform({prepend:e})}append(e){return this.transform({append:e})}surround(e,t){return this.transform({prepend:e,append:t})}skip(e){return this.map((t=>e-- >0?null:t))}take(e){return this.transform({limit:e})}range(e,t){return this.transform({offset:e,limit:Math.max(t-e+1,0)})}clone(){return new A(this)}[Symbol.asyncIterator](){const e=this;let t=null,r=null,n=null;function i(){if(null!==t)if(null!==n)a(n);else if(e.done)t({done:!0,value:void 0}),t=r=null,o();else{const n=e.read();null!==n&&(t({done:!1,value:n}),t=r=null)}}function a(e){null!==r?(r(e),t=r=n=null,o()):null===n&&(n=e)}function o(){e.removeListener("readable",i),e.removeListener("end",i),e.removeListener("error",a)}return e.addListener("readable",i),e.addListener("end",i),e.addListener("error",a),{next:()=>new Promise(((e,n)=>{t=e,r=n,i()}))}}}function s(e){"data"===e&&(this.removeListener("newListener",s),u(this,"readable",c),this.readable&&a((()=>c.call(this))))}function c(){let e;for(;0!==this.listenerCount("data")&&null!==(e=this.read());)this.emit("data",e);0!==this.listenerCount("data")||this.done||(this.removeListener("readable",c),u(this,"newListener",s))}function u(e,t,r){e.listeners(t).includes(r)||e.on(t,r)}t.AsyncIterator=o;class l extends o{constructor(){super(),this._changeState(t.ENDED,!0)}}t.EmptyIterator=l;class d extends o{constructor(e){super(),this._item=e,null===e?this.close():this.readable=!0}read(){const e=this._item;return this._item=null,this.close(),e}_toStringDetails(){return null===this._item?"":`(${this._item})`}}t.SingletonIterator=d;class p extends o{constructor(e=[],{autoStart:t=!0,preserve:r=!0}={}){super();const n=r||!Array.isArray(e)?[...e]:e;this._index=0,this._sourceStarted=!1!==t,this._truncateThreshold=r?-1:64,this._sourceStarted&&0===n.length?this.close():this._buffer=n,this.readable=!0}read(){this._sourceStarted||(this._sourceStarted=!0);let e=null;return this._buffer&&(this._index=t&&this.close(),Promise.resolve(i)}}t.ArrayIterator=p;class h extends o{constructor({start:e=0,step:t=1,end:r}={}){super(),Number.isFinite(e)&&(e=Math.trunc(e)),this._next=e,Number.isFinite(t)&&(t=Math.trunc(t)),this._step=t;const n=t>=0,i=n?1/0:-1/0;Number.isFinite(r)?r=Math.trunc(r):r!==-i&&(r=i),this._last=r,!Number.isFinite(e)||(n?e>r:e=0?n>r:nthis._init(r))),this._sourceStarted=!1!==r}get maxBufferSize(){return this._maxBufferSize}set maxBufferSize(e){e!==1/0&&(e=Number.isFinite(e)?Math.max(Math.trunc(e),1):4),this._maxBufferSize!==e&&(this._maxBufferSize=e,this._state===t.OPEN&&this._fillBuffer())}_init(e){let r=!1;this._reading=!0,this._begin((()=>{if(r)throw new Error("done callback called multiple times");r=!0,this._reading=!1,this._changeState(t.OPEN),e?this._fillBufferAsync():this.readable=!0}))}_begin(e){e()}read(){if(this.done)return null;this._sourceStarted||(this._sourceStarted=!0);const e=this._buffer;let t;return e.empty?(t=null,this.readable=!1):t=e.shift(),!this._reading&&e.length0&&(this._pushedCount=0,this._reading=!0,this._read(e,(()=>{if(!e)throw new Error("done callback called multiple times");e=0,this._reading=!1,this.closed?this._completeClose():this._pushedCount&&(this.readable=!0,this._buffer.length{this._reading=!1,this._fillBuffer()})))}close(){this._reading?this._changeState(t.CLOSING):this._completeClose()}_completeClose(){this._changeState(t.CLOSED)&&(this._reading=!0,this._flush((()=>{if(!this._reading)throw new Error("done callback called multiple times");this._reading=!1,this._buffer.empty&&this._endAsync()})))}_destroy(e,t){this._buffer.clear(),t()}_flush(e){e()}_toStringDetails(){const e=this._buffer;return`{${e.empty?"":`next: ${e.first}, `}buffer: ${e.length}}`}}t.BufferedIterator=m;class b extends m{constructor(e,t=e||{}){super(t),this._boundPush=e=>this._push(e),k(e)||(e=t.source),M(e)?this.source=e:e&&(this._createSource=L(e)?()=>e:e,this._sourceStarted&&this._loadSourceAsync()),this._optional=Boolean(t.optional),this._destroySource=!1!==t.destroySource}get source(){return C(this._createSource)&&this._loadSourceAsync(),this._source}set source(e){const r=this._source=this._validateSource(e);r[t.DESTINATION]=this,this.done?this._destroySource&&r.destroy():r.done?this.close():(r.on("end",T),r.on("readable",S),r.on("error",_))}_loadSourceAsync(){C(this._createSource)&&(Promise.resolve(this._createSource()).then((e=>{delete this._createSource,this.source=e,this._fillBuffer()}),(e=>this.emit("error",e))),this._createSource=null)}_validateSource(e,t=!1){if(this._source||void 0!==this._createSource)throw new Error("The source cannot be changed after it has been set");return g(e,t)}_read(e,t){const r=()=>{this._pushedCountthis._readAndTransform(r,t))):t()};this._readAndTransform(r,t)}_readAndTransform(e,t){let r;const n=this.source;!n||n.done||null===(r=n.read())?t():this._optional?this._optionalTransform(r,e):this._transform(r,e,this._boundPush)}_optionalTransform(e,t){const r=this._pushedCount;this._transform(e,(()=>{r===this._pushedCount&&this._push(e),t()}),this._boundPush)}_transform(e,t,r){r(e),t()}_closeWhenDone(){this.close()}_end(e){const r=this._source;r&&(r.removeListener("end",T),r.removeListener("error",_),r.removeListener("readable",S),delete r[t.DESTINATION],this._destroySource&&r.destroy()),super._end(e)}}function v(){this[t.DESTINATION].readable=!0}function _(e){this[t.DESTINATION].emit("error",e)}function w(){this[t.DESTINATION].close()}function T(){this[t.DESTINATION]._closeWhenDone()}function S(){!1!==this[t.DESTINATION]._sourceStarted&&this[t.DESTINATION]._fillBuffer()}t.TransformIterator=b;class O extends b{constructor(e,t){if(super(e,t),this._offset=0,this._limit=1/0,this._filter=e=>!0,t=t||(k(e)?null:e)){const e=C(t)?t:t.transform,{limit:r,offset:n,filter:i,map:a,prepend:o,append:s}=t;n===1/0||r===-1/0?this._limit=0:(Number.isFinite(n)&&(this._offset=Math.max(Math.trunc(n),0)),Number.isFinite(r)&&(this._limit=Math.max(Math.trunc(r),0)),C(i)&&(this._filter=i),C(a)&&(this._map=a),this._transform=C(e)?e:null),o&&(this._prepender=M(o)?o:D(o)),s&&(this._appender=M(s)?s:D(s))}}_read(e,t){const r=()=>this._readAndTransformSimple(e,n,t);function n(){a(r)}this._readAndTransformSimple(e,n,t)}_readAndTransformSimple(e,t,r){let n;const{source:i}=this;if(i&&!i.done){for(0===this._limit&&this.close();!this.closed&&this._pushedCountthis._push(e);!e||e.done?t():(e.on("data",r),e.on("end",(function n(){e.removeListener("data",r),e.removeListener("end",n),t()})))}}t.SimpleTransformIterator=O,t.MultiTransformIterator=class extends b{constructor(e,t){if(super(e,t),this._transformerQueue=[],t){const e=C(t)?t:t.multiTransform;e&&(this._createTransformer=e)}}_read(e,r){const n=this._transformerQueue,i=this._optional;let a,o;for(;(a=n[0])&&a.transformer.done;){i&&null!==a.item&&(e--,this._push(a.item)),n.shift();const{transformer:t}=a;t.removeListener("end",S),t.removeListener("readable",S),t.removeListener("error",_)}const{source:s}=this;for(;s&&!s.done&&n.length0&&null!==(o=t.read());)this._push(o),i&&(a.item=null)}else s&&s.done&&this.close();r()}_createTransformer(e){return new d(e)}_closeWhenDone(){this._transformerQueue.length||this.close()}_end(e){if(super._end(e),this._destroySource)for(const e of this._transformerQueue)e.transformer.destroy()}};class E extends m{constructor(e,t={}){super(t),this._sources=[],this._currentSource=-1;const r=!1!==t.autoStart;if(M(e))e.on("error",(e=>this.emit("error",e))),this._pending={loading:!1,sources:e},r&&this._loadSources();else if(Array.isArray(e)&&e.length>0)for(const t of e)this._addSource(t);else r&&this.close();this._destroySources=!1!==t.destroySources}_loadSources(){const e=this._pending.sources;this._pending.loading=!0,e.done?(delete this._pending,this.close()):(e.on("data",(e=>{this._addSource(e),this._fillBufferAsync()})),e.on("end",(()=>{delete this._pending,this._fillBuffer()})))}_addSource(e){L(e)&&(e=P(e)),e.done||(this._sources.push(e),e[t.DESTINATION]=this,e.on("error",_),e.on("readable",S),e.on("end",x))}_removeEmptySources(){this._sources=this._sources.filter(((e,t)=>(e.done&&t<=this._currentSource&&this._currentSource--,!e.done))),this._fillBuffer()}_read(e,t){var r;!1===(null===(r=this._pending)||void 0===r?void 0:r.loading)&&this._loadSources();let n,i=0;for(;i!==(i=e);)for(let t=0;t0;t++)this._currentSource=(this._currentSource+1)%this._sources.length,null!==(n=this._sources[this._currentSource].read())&&(e--,this._push(n));this._pending||0!==this._sources.length||this.close(),t()}_end(e=!1){if(super._end(e),this._destroySources){for(const e of this._sources)e.destroy();this._pending&&(this._pending.sources.destroy(),delete this._pending)}}}function x(){this[t.DESTINATION]._removeEmptySources()}t.UnionIterator=E;class A extends b{constructor(e){super(e,{autoStart:!1}),this._readPosition=0,this._reading=!1,e&&(this.readable=!0)}_init(){}close(){o.prototype.close.call(this)}get source(){return super.source}set source(e){const r=this._source=this._validateSource(e),n=r&&r[t.DESTINATION]||(r[t.DESTINATION]=new R(r));this.done?this._destroySource&&r.destroy():n.endsAt(0)?this.close():(n.register(this),!1!==r._sourceStarted&&null===n.readAt(0)||(this.readable=!0));const i=this._propertyCallbacks;for(const e in i){const t=i[e];for(const r of t)this._getSourceProperty(e,r)}}_validateSource(e,r=!1){const n=e&&e[t.DESTINATION];return super._validateSource(e,!n||n instanceof R)}getProperty(e,t){const{source:r}=this,n=this._properties,i=n&&e in n;if(!t)return i?n&&n[e]:r&&r.getProperty(e);super.getProperty(e,t),r&&!i&&this._getSourceProperty(e,t)}_getSourceProperty(e,t){this.source.getProperty(e,(r=>{this._properties&&e in this._properties||t(r)}))}getProperties(){const e=this.source?this.source.getProperties():{},t=this._properties;for(const r in t)e[r]=t[r];return e}_toStringDetails(){return`{source: ${this.source?this.source.toString():"none"}}`}read(){this._sourceStarted||(this._sourceStarted=!0);const e=this.source;let r=null;if(!this.done&&e){const n=e[t.DESTINATION];null!==(r=n.readAt(this._readPosition))?this._readPosition++:this.readable=!1,n.endsAt(this._readPosition)&&this.close()}return r}_end(e){const r=this.source,n=null==r?void 0:r[t.DESTINATION];n&&n.unregister(this),m.prototype._end.call(this,e)}}t.ClonedIterator=A;class R{constructor(e){if(this._history=[],this._trackers=new Set,this._source=e,!e.done){const t=()=>{for(const e of this._trackers)e.readable=!0},r=e=>{for(const t of this._trackers)t.emit("error",e)},n=()=>{for(const e of this._trackers)!1!==e._sourceStarted&&e._readPosition===this._history.length&&e.close();this._trackers.clear(),e.removeListener("end",n),e.removeListener("error",r),e.removeListener("readable",t)};e.on("end",n),e.on("error",r),e.on("readable",t)}}register(e){this._source.done||this._trackers.add(e)}unregister(e){this._trackers.delete(e)}readAt(e){let t=null;return e{this._source=null,this.source=e})).catch((e=>this.emit("error",e)))):e&&(this.source=e)}set source(e){let r=e;if(null!==this._source)throw new Error("The source cannot be changed after it has been set");if(F(r)&&(r=r[Symbol.iterator]()),B(r)){let e=r;r=new n.EventEmitter,r.read=()=>{if(null!==e){let t;for(;!(t=e.next()).done;)if(null!==t.value)return t.value;e=null,this.close()}return null}}else r=g(r);this.done?this._destroySource&&C(r.destroy)&&r.destroy():(r[t.DESTINATION]=this,r.on("end",w),r.on("error",_),r.on("readable",v),this._source=r,this.readable=!1!==r.readable)}read(){if(null!==this._source&&!1!==this._source.readable){const e=this._source.read();if(null!==e)return e;this.readable=!1}return null}_end(e=!1){null!==this._source&&(this._source.removeListener("end",w),this._source.removeListener("error",_),this._source.removeListener("readable",v),delete this._source[t.DESTINATION],this._destroySource&&C(this._source.destroy)&&this._source.destroy(),this._source=null),super._end(e)}}function P(e,t){if(t&&("autoStart"in t||"optional"in t||"source"in t||"maxBufferSize"in t))return e&&!M(e)&&(e=new I(e)),new b(e,t);if(!e)return N();if(L(e))return new I(e,t);if(e instanceof o)return e;if(Array.isArray(e))return D(e);if(F(e)||B(e)||M(e))return new I(e,t);throw new TypeError(`Invalid source: ${e}`)}function N(){return new l}function D(e){return new p(e)}function j(e,t){return t?e.bind(t):e}function C(e){return"function"==typeof e}function M(e){return C(null==e?void 0:e.on)}function L(e){return C(null==e?void 0:e.then)}function k(e){return e&&(M(e)||L(e)||C(e))}function F(e){return e&&Symbol.iterator in e}function B(e){return C(null==e?void 0:e.next)}t.WrappingIterator=I,t.wrap=P,t.empty=N,t.single=function(e){return new d(e)},t.fromArray=D,t.fromIterator=function(e){return new I(e)},t.fromIterable=function(e){return new I(e)},t.union=function(e){return new E(e)},t.range=function(e,t,r){return new h({start:e,end:t,step:r})},t.isFunction=C,t.isEventEmitter=M,t.isPromise=L,t.isSourceExpression=k,t.isIterable=F,t.isIterator=B},14241:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LinkedList=void 0,t.LinkedList=class{constructor(){this._length=0,this._head=null,this._tail=null}get length(){return this._length}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}get empty(){return null===this._head}push(e){const t={value:e,next:null};null===this._tail?this._head=this._tail=t:this._tail.next=this._tail=t,this._length++}shift(){if(null===this._head)return;const{value:e,next:t}=this._head;return this._head=t,null===t&&(this._tail=null),this._length--,e}clear(){this._length=0,this._head=this._tail=null}}},93240:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTaskScheduler=void 0;const r=Promise.resolve(void 0);t.createTaskScheduler=function(){const e="function"==typeof queueMicrotask?queueMicrotask:e=>r.then(e),t="function"==typeof setImmediate?setImmediate:e=>setTimeout(e,0);let n=0,i=null;return r=>{null!==i?i.push(r):++n<100?e(r):(i=[r],t((()=>{for(const t of i)e(t);i=null,n=0})))}}},35069:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=void 0;const r="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,n=new Set,i="object"==typeof process&&process?process:{},a=(e,t,r,n)=>{"function"==typeof i.emitWarning?i.emitWarning(e,t,r,n):console.error(`[${r}] ${t}: ${e}`)};let o=globalThis.AbortController,s=globalThis.AbortSignal;if(void 0===o){s=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(e,t){this._onabort.push(t)}},o=class{constructor(){t()}signal=new s;abort(e){if(!this.signal.aborted){this.signal.reason=e,this.signal.aborted=!0;for(const t of this.signal._onabort)t(e);this.signal.onabort?.(e)}}};let e="1"!==i.env?.LRU_CACHE_IGNORE_AC_WARNING;const t=()=>{e&&(e=!1,a("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}Symbol("type");const c=e=>e&&e===Math.floor(e)&&e>0&&isFinite(e),u=e=>c(e)?e<=Math.pow(2,8)?Uint8Array:e<=Math.pow(2,16)?Uint16Array:e<=Math.pow(2,32)?Uint32Array:e<=Number.MAX_SAFE_INTEGER?l:null:null;class l extends Array{constructor(e){super(e),this.fill(0)}}class d{heap;length;static#e=!1;static create(e){const t=u(e);if(!t)return[];d.#e=!0;const r=new d(e,t);return d.#e=!1,r}constructor(e,t){if(!d.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}}class p{#t;#r;#n;#i;#a;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#o;#s;#c;#u;#l;#d;#p;#h;#f;#y;#g;#m;#b;#v;#_;#w;#T;static unsafeExposeInternals(e){return{starts:e.#b,ttls:e.#v,sizes:e.#m,keyMap:e.#c,keyList:e.#u,valList:e.#l,next:e.#d,prev:e.#p,get head(){return e.#h},get tail(){return e.#f},free:e.#y,isBackgroundFetch:t=>e.#S(t),backgroundFetch:(t,r,n,i)=>e.#O(t,r,n,i),moveToTail:t=>e.#E(t),indexes:t=>e.#x(t),rindexes:t=>e.#A(t),isStale:t=>e.#R(t)}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#s}get size(){return this.#o}get fetchMethod(){return this.#a}get dispose(){return this.#n}get disposeAfter(){return this.#i}constructor(e){const{max:t=0,ttl:r,ttlResolution:i=1,ttlAutopurge:o,updateAgeOnGet:s,updateAgeOnHas:l,allowStale:h,dispose:f,disposeAfter:y,noDisposeOnSet:g,noUpdateTTL:m,maxSize:b=0,maxEntrySize:v=0,sizeCalculation:_,fetchMethod:w,noDeleteOnFetchRejection:T,noDeleteOnStaleGet:S,allowStaleOnFetchRejection:O,allowStaleOnFetchAbort:E,ignoreFetchAbort:x}=e;if(0!==t&&!c(t))throw new TypeError("max option must be a nonnegative integer");const A=t?u(t):Array;if(!A)throw new Error("invalid max value: "+t);if(this.#t=t,this.#r=b,this.maxEntrySize=v||this.#r,this.sizeCalculation=_,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw new TypeError("sizeCalculation set to non-function")}if(void 0!==w&&"function"!=typeof w)throw new TypeError("fetchMethod must be a function if specified");if(this.#a=w,this.#w=!!w,this.#c=new Map,this.#u=new Array(t).fill(void 0),this.#l=new Array(t).fill(void 0),this.#d=new A(t),this.#p=new A(t),this.#h=0,this.#f=0,this.#y=d.create(t),this.#o=0,this.#s=0,"function"==typeof f&&(this.#n=f),"function"==typeof y?(this.#i=y,this.#g=[]):(this.#i=void 0,this.#g=void 0),this.#_=!!this.#n,this.#T=!!this.#i,this.noDisposeOnSet=!!g,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!T,this.allowStaleOnFetchRejection=!!O,this.allowStaleOnFetchAbort=!!E,this.ignoreFetchAbort=!!x,0!==this.maxEntrySize){if(0!==this.#r&&!c(this.#r))throw new TypeError("maxSize must be a positive integer if specified");if(!c(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!h,this.noDeleteOnStaleGet=!!S,this.updateAgeOnGet=!!s,this.updateAgeOnHas=!!l,this.ttlResolution=c(i)||0===i?i:1,this.ttlAutopurge=!!o,this.ttl=r||0,this.ttl){if(!c(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(0===this.#t&&0===this.ttl&&0===this.#r)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){const e="LRU_CACHE_UNBOUNDED";(e=>!n.has(e))(e)&&(n.add(e),a("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",e,p))}}getRemainingTTL(e){return this.#c.has(e)?1/0:0}#P(){const e=new l(this.#t),t=new l(this.#t);this.#v=e,this.#b=t,this.#N=(n,i,a=r.now())=>{if(t[n]=0!==i?a:0,e[n]=i,0!==i&&this.ttlAutopurge){const e=setTimeout((()=>{this.#R(n)&&this.delete(this.#u[n])}),i+1);e.unref&&e.unref()}},this.#D=n=>{t[n]=0!==e[n]?r.now():0},this.#j=(r,a)=>{if(e[a]){const o=e[a],s=t[a];if(!o||!s)return;r.ttl=o,r.start=s,r.now=n||i();const c=r.now-s;r.remainingTTL=o-c}};let n=0;const i=()=>{const e=r.now();if(this.ttlResolution>0){n=e;const t=setTimeout((()=>n=0),this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=r=>{const a=this.#c.get(r);if(void 0===a)return 0;const o=e[a],s=t[a];return o&&s?o-((n||i())-s):1/0},this.#R=r=>{const a=t[r],o=e[r];return!!o&&!!a&&(n||i())-a>o}}#D=()=>{};#j=()=>{};#N=()=>{};#R=()=>!1;#I(){const e=new l(this.#t);this.#s=0,this.#m=e,this.#C=t=>{this.#s-=e[t],e[t]=0},this.#M=(e,t,r,n)=>{if(this.#S(t))return 0;if(!c(r)){if(!n)throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");if("function"!=typeof n)throw new TypeError("sizeCalculation must be a function");if(r=n(t,e),!c(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}return r},this.#L=(t,r,n)=>{if(e[t]=r,this.#r){const r=this.#r-e[t];for(;this.#s>r;)this.#k(!0)}this.#s+=e[t],n&&(n.entrySize=r,n.totalCalculatedSize=this.#s)}}#C=e=>{};#L=(e,t,r)=>{};#M=(e,t,r,n)=>{if(r||n)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#x({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#f;this.#F(t)&&(!e&&this.#R(t)||(yield t),t!==this.#h);)t=this.#p[t]}*#A({allowStale:e=this.allowStale}={}){if(this.#o)for(let t=this.#h;this.#F(t)&&(!e&&this.#R(t)||(yield t),t!==this.#f);)t=this.#d[t]}#F(e){return void 0!==e&&this.#c.get(this.#u[e])===e}*entries(){for(const e of this.#x())void 0===this.#l[e]||void 0===this.#u[e]||this.#S(this.#l[e])||(yield[this.#u[e],this.#l[e]])}*rentries(){for(const e of this.#A())void 0===this.#l[e]||void 0===this.#u[e]||this.#S(this.#l[e])||(yield[this.#u[e],this.#l[e]])}*keys(){for(const e of this.#x()){const t=this.#u[e];void 0===t||this.#S(this.#l[e])||(yield t)}}*rkeys(){for(const e of this.#A()){const t=this.#u[e];void 0===t||this.#S(this.#l[e])||(yield t)}}*values(){for(const e of this.#x())void 0===this.#l[e]||this.#S(this.#l[e])||(yield this.#l[e])}*rvalues(){for(const e of this.#A())void 0===this.#l[e]||this.#S(this.#l[e])||(yield this.#l[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(const r of this.#x()){const n=this.#l[r],i=this.#S(n)?n.__staleWhileFetching:n;if(void 0!==i&&e(i,this.#u[r],this))return this.get(this.#u[r],t)}}forEach(e,t=this){for(const r of this.#x()){const n=this.#l[r],i=this.#S(n)?n.__staleWhileFetching:n;void 0!==i&&e.call(t,i,this.#u[r],this)}}rforEach(e,t=this){for(const r of this.#A()){const n=this.#l[r],i=this.#S(n)?n.__staleWhileFetching:n;void 0!==i&&e.call(t,i,this.#u[r],this)}}purgeStale(){let e=!1;for(const t of this.#A({allowStale:!0}))this.#R(t)&&(this.delete(this.#u[t]),e=!0);return e}info(e){const t=this.#c.get(e);if(void 0===t)return;const n=this.#l[t],i=this.#S(n)?n.__staleWhileFetching:n;if(void 0===i)return;const a={value:i};if(this.#v&&this.#b){const e=this.#v[t],n=this.#b[t];if(e&&n){const t=e-(r.now()-n);a.ttl=t,a.start=Date.now()}}return this.#m&&(a.size=this.#m[t]),a}dump(){const e=[];for(const t of this.#x({allowStale:!0})){const n=this.#u[t],i=this.#l[t],a=this.#S(i)?i.__staleWhileFetching:i;if(void 0===a||void 0===n)continue;const o={value:a};if(this.#v&&this.#b){o.ttl=this.#v[t];const e=r.now()-this.#b[t];o.start=Math.floor(Date.now()-e)}this.#m&&(o.size=this.#m[t]),e.unshift([n,o])}return e}load(e){this.clear();for(const[t,n]of e){if(n.start){const e=Date.now()-n.start;n.start=r.now()-e}this.set(t,n.value,n)}}set(e,t,r={}){if(void 0===t)return this.delete(e),this;const{ttl:n=this.ttl,start:i,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:o=this.sizeCalculation,status:s}=r;let{noUpdateTTL:c=this.noUpdateTTL}=r;const u=this.#M(e,t,r.size||0,o);if(this.maxEntrySize&&u>this.maxEntrySize)return s&&(s.set="miss",s.maxEntrySizeExceeded=!0),this.delete(e),this;let l=0===this.#o?void 0:this.#c.get(e);if(void 0===l)l=0===this.#o?this.#f:0!==this.#y.length?this.#y.pop():this.#o===this.#t?this.#k(!1):this.#o,this.#u[l]=e,this.#l[l]=t,this.#c.set(e,l),this.#d[this.#f]=l,this.#p[l]=this.#f,this.#f=l,this.#o++,this.#L(l,u,s),s&&(s.set="add"),c=!1;else{this.#E(l);const r=this.#l[l];if(t!==r){if(this.#w&&this.#S(r)){r.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:t}=r;void 0===t||a||(this.#_&&this.#n?.(t,e,"set"),this.#T&&this.#g?.push([t,e,"set"]))}else a||(this.#_&&this.#n?.(r,e,"set"),this.#T&&this.#g?.push([r,e,"set"]));if(this.#C(l),this.#L(l,u,s),this.#l[l]=t,s){s.set="replace";const e=r&&this.#S(r)?r.__staleWhileFetching:r;void 0!==e&&(s.oldValue=e)}}else s&&(s.set="update")}if(0===n||this.#v||this.#P(),this.#v&&(c||this.#N(l,n,i),s&&this.#j(s,l)),!a&&this.#T&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}return this}pop(){try{for(;this.#o;){const e=this.#l[this.#h];if(this.#k(!0),this.#S(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#T&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}}}#k(e){const t=this.#h,r=this.#u[t],n=this.#l[t];return this.#w&&this.#S(n)?n.__abortController.abort(new Error("evicted")):(this.#_||this.#T)&&(this.#_&&this.#n?.(n,r,"evict"),this.#T&&this.#g?.push([n,r,"evict"])),this.#C(t),e&&(this.#u[t]=void 0,this.#l[t]=void 0,this.#y.push(t)),1===this.#o?(this.#h=this.#f=0,this.#y.length=0):this.#h=this.#d[t],this.#c.delete(r),this.#o--,t}has(e,t={}){const{updateAgeOnHas:r=this.updateAgeOnHas,status:n}=t,i=this.#c.get(e);if(void 0!==i){const e=this.#l[i];if(this.#S(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#R(i))return r&&this.#D(i),n&&(n.has="hit",this.#j(n,i)),!0;n&&(n.has="stale",this.#j(n,i))}else n&&(n.has="miss");return!1}peek(e,t={}){const{allowStale:r=this.allowStale}=t,n=this.#c.get(e);if(void 0===n||!r&&this.#R(n))return;const i=this.#l[n];return this.#S(i)?i.__staleWhileFetching:i}#O(e,t,r,n){const i=void 0===t?void 0:this.#l[t];if(this.#S(i))return i;const a=new o,{signal:s}=r;s?.addEventListener("abort",(()=>a.abort(s.reason)),{signal:a.signal});const c={signal:a.signal,options:r,context:n},u=(n,i=!1)=>{const{aborted:o}=a.signal,s=r.ignoreFetchAbort&&void 0!==n;if(r.status&&(o&&!i?(r.status.fetchAborted=!0,r.status.fetchError=a.signal.reason,s&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),o&&!s&&!i)return l(a.signal.reason);const u=d;return this.#l[t]===d&&(void 0===n?u.__staleWhileFetching?this.#l[t]=u.__staleWhileFetching:this.delete(e):(r.status&&(r.status.fetchUpdated=!0),this.set(e,n,c.options))),n},l=n=>{const{aborted:i}=a.signal,o=i&&r.allowStaleOnFetchAbort,s=o||r.allowStaleOnFetchRejection,c=s||r.noDeleteOnFetchRejection,u=d;if(this.#l[t]===d&&(c&&void 0!==u.__staleWhileFetching?o||(this.#l[t]=u.__staleWhileFetching):this.delete(e)),s)return r.status&&void 0!==u.__staleWhileFetching&&(r.status.returnedStale=!0),u.__staleWhileFetching;if(u.__returned===u)throw n};r.status&&(r.status.fetchDispatched=!0);const d=new Promise(((t,n)=>{const o=this.#a?.(e,i,c);o&&o instanceof Promise&&o.then((e=>t(void 0===e?void 0:e)),n),a.signal.addEventListener("abort",(()=>{r.ignoreFetchAbort&&!r.allowStaleOnFetchAbort||(t(void 0),r.allowStaleOnFetchAbort&&(t=e=>u(e,!0)))}))})).then(u,(e=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=e),l(e)))),p=Object.assign(d,{__abortController:a,__staleWhileFetching:i,__returned:void 0});return void 0===t?(this.set(e,p,{...c.options,status:void 0}),t=this.#c.get(e)):this.#l[t]=p,p}#S(e){if(!this.#w)return!1;const t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof o}async fetch(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,ttl:a=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:s=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:l=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:d=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:h=this.allowStaleOnFetchAbort,context:f,forceRefresh:y=!1,status:g,signal:m}=t;if(!this.#w)return g&&(g.fetch="get"),this.get(e,{allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,status:g});const b={allowStale:r,updateAgeOnGet:n,noDeleteOnStaleGet:i,ttl:a,noDisposeOnSet:o,size:s,sizeCalculation:c,noUpdateTTL:u,noDeleteOnFetchRejection:l,allowStaleOnFetchRejection:d,allowStaleOnFetchAbort:h,ignoreFetchAbort:p,status:g,signal:m};let v=this.#c.get(e);if(void 0===v){g&&(g.fetch="miss");const t=this.#O(e,v,b,f);return t.__returned=t}{const t=this.#l[v];if(this.#S(t)){const e=r&&void 0!==t.__staleWhileFetching;return g&&(g.fetch="inflight",e&&(g.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}const i=this.#R(v);if(!y&&!i)return g&&(g.fetch="hit"),this.#E(v),n&&this.#D(v),g&&this.#j(g,v),t;const a=this.#O(e,v,b,f),o=void 0!==a.__staleWhileFetching&&r;return g&&(g.fetch=i?"stale":"refresh",o&&i&&(g.returnedStale=!0)),o?a.__staleWhileFetching:a.__returned=a}}get(e,t={}){const{allowStale:r=this.allowStale,updateAgeOnGet:n=this.updateAgeOnGet,noDeleteOnStaleGet:i=this.noDeleteOnStaleGet,status:a}=t,o=this.#c.get(e);if(void 0!==o){const t=this.#l[o],s=this.#S(t);return a&&this.#j(a,o),this.#R(o)?(a&&(a.get="stale"),s?(a&&r&&void 0!==t.__staleWhileFetching&&(a.returnedStale=!0),r?t.__staleWhileFetching:void 0):(i||this.delete(e),a&&r&&(a.returnedStale=!0),r?t:void 0)):(a&&(a.get="hit"),s?t.__staleWhileFetching:(this.#E(o),n&&this.#D(o),t))}a&&(a.get="miss")}#B(e,t){this.#p[t]=e,this.#d[e]=t}#E(e){e!==this.#f&&(e===this.#h?this.#h=this.#d[e]:this.#B(this.#p[e],this.#d[e]),this.#B(this.#f,e),this.#f=e)}delete(e){let t=!1;if(0!==this.#o){const r=this.#c.get(e);if(void 0!==r)if(t=!0,1===this.#o)this.clear();else{this.#C(r);const t=this.#l[r];if(this.#S(t)?t.__abortController.abort(new Error("deleted")):(this.#_||this.#T)&&(this.#_&&this.#n?.(t,e,"delete"),this.#T&&this.#g?.push([t,e,"delete"])),this.#c.delete(e),this.#u[r]=void 0,this.#l[r]=void 0,r===this.#f)this.#f=this.#p[r];else if(r===this.#h)this.#h=this.#d[r];else{const e=this.#p[r];this.#d[e]=this.#d[r];const t=this.#d[r];this.#p[t]=this.#p[r]}this.#o--,this.#y.push(r)}}if(this.#T&&this.#g?.length){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}return t}clear(){for(const e of this.#A({allowStale:!0})){const t=this.#l[e];if(this.#S(t))t.__abortController.abort(new Error("deleted"));else{const r=this.#u[e];this.#_&&this.#n?.(t,r,"delete"),this.#T&&this.#g?.push([t,r,"delete"])}}if(this.#c.clear(),this.#l.fill(void 0),this.#u.fill(void 0),this.#v&&this.#b&&(this.#v.fill(0),this.#b.fill(0)),this.#m&&this.#m.fill(0),this.#h=0,this.#f=0,this.#y.length=0,this.#s=0,this.#o=0,this.#T&&this.#g){const e=this.#g;let t;for(;t=e?.shift();)this.#i?.(...t)}}}t.LRUCache=p},12037:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readableFromWeb=t.ReadableFromWeb=void 0;const n=r(58521);class i extends n.Readable{constructor(e,t){super(t),this.reader=e.getReader(),this.readerClosed=!1,this.reader.closed.then((()=>{this.readerClosed=!0})).catch((e=>{this.readerClosed=!0,this.destroy(e)}))}_read(){this.reader.read().then((e=>this.push(e.done?null:e.value))).catch((e=>this.destroy(e)))}destroy(e){return this.readerClosed||this.reader.cancel(e).then().catch((()=>{})),super.destroy(e)}}t.ReadableFromWeb=i,t.readableFromWeb=function(e,t){return new i(e,t)}},33523:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.readableFromWeb=void 0;var n=r(12037);Object.defineProperty(t,"readableFromWeb",{enumerable:!0,get:function(){return n.readableFromWeb}})},94066:e=>{"use strict";e.exports=JSON.parse('{"http://schema.org/":{"properties":{"additionalType":{"subPropertyOf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#type"}}},"http://microformats.org/profile/hcard":{}}')},45497:e=>{"use strict";e.exports=JSON.parse('{"@context":{"alternate":"http://www.w3.org/1999/xhtml/vocab#alternate","appendix":"http://www.w3.org/1999/xhtml/vocab#appendix","cite":"http://www.w3.org/1999/xhtml/vocab#cite","bookmark":"http://www.w3.org/1999/xhtml/vocab#bookmark","contents":"http://www.w3.org/1999/xhtml/vocab#contents","chapter":"http://www.w3.org/1999/xhtml/vocab#chapter","copyright":"http://www.w3.org/1999/xhtml/vocab#copyright","first":"http://www.w3.org/1999/xhtml/vocab#first","glossary":"http://www.w3.org/1999/xhtml/vocab#glossary","help":"http://www.w3.org/1999/xhtml/vocab#help","icon":"http://www.w3.org/1999/xhtml/vocab#icon","index":"http://www.w3.org/1999/xhtml/vocab#index","last":"http://www.w3.org/1999/xhtml/vocab#last","license":"http://www.w3.org/1999/xhtml/vocab#license","meta":"http://www.w3.org/1999/xhtml/vocab#meta","next":"http://www.w3.org/1999/xhtml/vocab#next","prev":"http://www.w3.org/1999/xhtml/vocab#prev","previous":"http://www.w3.org/1999/xhtml/vocab#previous","section":"http://www.w3.org/1999/xhtml/vocab#section","start":"http://www.w3.org/1999/xhtml/vocab#start","stylesheet":"http://www.w3.org/1999/xhtml/vocab#stylesheet","subsection":"http://www.w3.org/1999/xhtml/vocab#subsection","top":"http://www.w3.org/1999/xhtml/vocab#top","up":"http://www.w3.org/1999/xhtml/vocab#up","p3pv1":"http://www.w3.org/1999/xhtml/vocab#p3pv1"}}')},68713:e=>{"use strict";e.exports=JSON.parse('{"@context":{"as":"https://www.w3.org/ns/activitystreams#","cat":"http://www.w3.org/ns/dcat#","cc":"http://creativecommons.org/ns#","cnt":"http://www.w3.org/2008/content#","csvw":"http://www.w3.org/ns/csvw#","ctag":"http://commontag.org/ns#","dc":"http://purl.org/dc/terms/","dc11":"http://purl.org/dc/elements/1.1/","dcat":"http://www.w3.org/ns/dcat#","dcterms":"http://purl.org/dc/terms/","dqv":"http://www.w3.org/ns/dqv#","duv":"https://www.w3.org/TR/vocab-duv#","earl":"http://www.w3.org/ns/earl#","foaf":"http://xmlns.com/foaf/0.1/","gldp":"http://www.w3.org/ns/people#","gr":"http://purl.org/goodrelations/v1#","grddl":"http://www.w3.org/2003/g/data-view#","ht":"http://www.w3.org/2006/http#","ical":"http://www.w3.org/2002/12/cal/icaltzd#","ldp":"http://www.w3.org/ns/ldp#","ma":"http://www.w3.org/ns/ma-ont#","oa":"http://www.w3.org/ns/oa#","odrl":"http://www.w3.org/ns/odrl/2/","og":"http://ogp.me/ns#","org":"http://www.w3.org/ns/org#","owl":"http://www.w3.org/2002/07/owl#","prov":"http://www.w3.org/ns/prov#","ptr":"http://www.w3.org/2009/pointers#","qb":"http://purl.org/linked-data/cube#","rev":"http://purl.org/stuff/rev#","rdf":"http://www.w3.org/1999/02/22-rdf-syntax-ns#","rdfa":"http://www.w3.org/ns/rdfa#","rdfs":"http://www.w3.org/2000/01/rdf-schema#","rif":"http://www.w3.org/2007/rif#","rr":"http://www.w3.org/ns/r2rml#","schema":"http://schema.org/","sd":"http://www.w3.org/ns/sparql-service-description#","sioc":"http://rdfs.org/sioc/ns#","skos":"http://www.w3.org/2004/02/skos/core#","skosxl":"http://www.w3.org/2008/05/skos-xl#","ssn":"http://www.w3.org/ns/ssn/","sosa":"http://www.w3.org/ns/sosa/","time":"http://www.w3.org/2006/time#","v":"http://rdf.data-vocabulary.org/#","vcard":"http://www.w3.org/2006/vcard/ns#","void":"http://rdfs.org/ns/void#","wdr":"http://www.w3.org/2007/05/powder#","wdrs":"http://www.w3.org/2007/05/powder-s#","xhv":"http://www.w3.org/1999/xhtml/vocab#","xml":"http://www.w3.org/XML/1998/namespace","xsd":"http://www.w3.org/2001/XMLSchema#","describedby":"http://www.w3.org/2007/05/powder-s#describedby","license":"http://www.w3.org/1999/xhtml/vocab#license","role":"http://www.w3.org/1999/xhtml/vocab#role"}}')}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n].call(a.exports,a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n=r(90128);Comunica=n})(); //# sourceMappingURL=comunica-browser.js.map \ No newline at end of file diff --git a/versions/latest/engines/query-sparql-file/comunica-browser.js.map b/versions/latest/engines/query-sparql-file/comunica-browser.js.map index 73b687f..82c2cab 100644 --- a/versions/latest/engines/query-sparql-file/comunica-browser.js.map +++ b/versions/latest/engines/query-sparql-file/comunica-browser.js.map @@ -1 +1 @@ -{"version":3,"file":"comunica-browser.js","mappings":";0CAAA,IAAI,OAAEA,GAAW,EAAQ,MAErBC,EAAI,CAAC,EAELC,EAAgBD,EAAEC,WAAgB,EAClCC,EAAgBF,EAAEE,YAAgB,EAClCC,EAAgBH,EAAEG,aAAgB,EAClCC,EAAgBJ,EAAEI,cAAgB,EAClCC,EAAgBL,EAAEK,MAAgB,EAClCC,EAAgBN,EAAEM,MAAgB,EAClCC,EAAgBP,EAAEO,KAAgB,EAClCC,EAAgBR,EAAEQ,MAAgB,EAClCC,EAAgBT,EAAES,KAAgB,EAClCC,EAAgBV,EAAEU,OAAgB,GAClCC,EAA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QsJ,QAAUmD,EAAInD,QACtBtJ,EAAQkK,SAAWuC,EAAIvC,SACvBnK,EAAOC,QAAUA,8BCroBjB9C,OAAO+C,eAAeD,EAAS,aAAc,CAAEhE,OAAO,IACtDgE,EAAQy/G,eAAiBz/G,EAAQ0/G,kBAAe,EAChD1/G,EAAQ0/G,aAAe,IAAIjiG,IAAI,CAC3B,WACA,cACA,eACA,eACA,gBACA,mBACA,WACA,UACA,gBACA,sBACA,cACA,mBACA,oBACA,oBACA,iBACA,eACA,UACA,UACA,UACA,UACA,UACA,iBACA,UACA,UACA,cACA,eACA,WACA,eACA,qBACA,cACA,SACA,eACA,gBACA,WACA,iBACA,iBACA,YACFxc,KAAI,SAAUgnD,GAAO,MAAO,CAACA,EAAI7mD,cAAe6mD,EAAM,KACxDjoD,EAAQy/G,eAAiB,IAAIhiG,IAAI,CAC7B,gBACA,gBACA,gBACA,gBACA,cACA,WACA,gBACA,kBACA,WACA,cACA,WACA,oBACA,gBACA,eACA,mBACA,YACA,aACA,WACA,eACA,oBACA,eACA,cACA,cACA,mBACA,YACA,aACA,aACA,sBACA,mBACA,eACA,YACA,YACA,YACA,gBACA,sBACA,iBACA,OACA,OACA,cACA,YACA,qBACA,mBACA,mBACA,mBACA,eACA,cACA,eACA,cACA,eACA,iBACA,cACA,UACA,UACA,aACA,UACA,aACA,mBACA,mBACA,cACFxc,KAAI,SAAUgnD,GAAO,MAAO,CAACA,EAAI7mD,cAAe6mD,EAAM,wCCrGxD,IAAI03D,EAAY7jH,MAAQA,KAAK6jH,UAAa,WAStC,OARAA,EAAWziH,OAAOyU,QAAU,SAAS8/F,GACjC,IAAK,IAAIzwG,EAAG7D,EAAI,EAAGuB,EAAIkgB,UAAUvhB,OAAQF,EAAIuB,EAAGvB,IAE5C,IAAK,IAAIoH,KADTvD,EAAI4d,UAAUzhB,GACOD,OAAOM,UAAUgH,eAAeC,KAAKzD,EAAGuD,KACzDktG,EAAEltG,GAAKvD,EAAEuD,IAEjB,OAAOktG,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CAAC6B,EAAKihH,IAAU1pH,OAAOM,UAAUgH,eAAeC,KAAKkB,EAAKihH,GCClFqkK,EAAoB7hL,EAAKppG,IACH,oBAAXqF,QAA0BA,OAAOglJ,aAC1CntJ,OAAO+C,eAAeD,EAASqF,OAAOglJ,YAAa,CAAEruJ,MAAO,WAE7DkB,OAAO+C,eAAeD,EAAS,aAAc,CAAEhE,OAAO,GAAO,ECF9D,IAAIsvR,EAAsBL,EAAoB","sources":["webpack://Comunica/../../node_modules/@bergos/jsonparse/jsonparse.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/fragment.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/index.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/lookup/fetchContext.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/lookup/index.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/lookup/lookupAllPrefixes.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/lookup/lookupNamespace.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/dist/lookup/lookupPrefix.js","webpack://Comunica/../../node_modules/@jeswr/prefixcc/node_modules/cross-fetch/dist/browser-ponyfill.js","webpack://Comunica/../../node_modules/@jeswr/stream-to-string/dist/index.js","webpack://Comunica/../../node_modules/@rubensworks/saxes/saxes.js","webpack://Comunica/../../node_modules/@smessie/readable-web-to-node-stream/lib/index.js","webpack://Comunica/../../node_modules/abort-controller/browser.js","webpack://Comunica/../../node_modules/arrayify-stream/index.js","webpack://Comunica/../../node_modules/asyncjoin/index.js","webpack://Comunica/../../node_modules/asyncjoin/join/DynamicNestedLoopJoin.js","webpack://Comunica/../../node_modules/asyncjoin/join/HashJoin.js","webpack://Comunica/../../node_modules/asyncjoin/join/NestedLoopJoin.js","webpack://Comunica/../../node_modules/asyncjoin/join/SymmetricHashJoin.js","webpack://Comunica/../../node_modules/asyncjoin/util/MergeIterator.js","webpack://Comunica/./engine-browser.js","webpack://Comunica/QueryEngine.ts","webpack://Comunica/index-browser.ts","webpack://Comunica/ActorAbstractMediaTyped.ts","webpack://Comunica/ActorAbstractMediaTypedFixed.ts","webpack://Comunica/index.ts","webpack://Comunica/ActorAbstractPath.ts","webpack://Comunica/PathVariableObjectIterator.ts","webpack://Comunica/ActorContextPreprocessConvertShortcuts.ts","webpack://Comunica/ActorContextPreprocessQuerySourceIdentify.ts","webpack://Comunica/ActorContextPreprocessQuerySourceSkolemize.ts","webpack://Comunica/QuerySourceSkolemized.ts","webpack://Comunica/utils.ts","webpack://Comunica/ActorContextPreprocessSetDefaults.ts","webpack://Comunica/ActorContextPreprocessSourceToDestination.ts","webpack://Comunica/ActorDereferenceFallback.ts","webpack://Comunica/ActorDereferenceHttp-browser.ts","webpack://Comunica/ActorDereferenceHttpBase.ts","webpack://Comunica/ActorDereferenceRdfParse.ts","webpack://Comunica/ActorHashBindingsSha1.ts","webpack://Comunica/ActorHashQuadsSha1.ts","webpack://Comunica/ActorHttpFetch.ts","webpack://Comunica/FetchInitPreprocessor-browser.ts","webpack://Comunica/ActorHttpProxy.ts","webpack://Comunica/ProxyHandlerStatic.ts","webpack://Comunica/ActorHttpWayback.ts","webpack://Comunica/ActorInitQuery-browser.ts","webpack://Comunica/ActorInitQueryBase.ts","webpack://Comunica/QueryEngineBase.ts","webpack://Comunica/ActorOptimizeQueryOperationAssignSourcesExhaustive.ts","webpack://Comunica/ActorOptimizeQueryOperationBgpToJoin.ts","webpack://Comunica/ActorOptimizeQueryOperationConstructDistinct.ts","webpack://Comunica/ActorOptimizeQueryOperationDescribeToConstructsSubject.ts","webpack://Comunica/ActorOptimizeQueryOperationFilterPushdown.ts","webpack://Comunica/ActorOptimizeQueryOperationGroupSources.ts","webpack://Comunica/ActorOptimizeQueryOperationJoinBgp.ts","webpack://Comunica/ActorOptimizeQueryOperationJoinConnected.ts","webpack://Comunica/ActorOptimizeQueryOperationPruneEmptySourceOperations.ts","webpack://Comunica/ActorOptimizeQueryOperationRewriteAdd.ts","webpack://Comunica/ActorOptimizeQueryOperationRewriteCopy.ts","webpack://Comunica/ActorOptimizeQueryOperationRewriteMove.ts","webpack://Comunica/ActorQueryOperationAsk.ts","webpack://Comunica/ActorQueryOperationBgpJoin.ts","webpack://Comunica/ActorQueryOperationConstruct.ts","webpack://Comunica/BindingsToQuadsIterator.ts","webpack://Comunica/ActorQueryOperationDistinctHash.ts","webpack://Comunica/ActorQueryOperationExtend.ts","webpack://Comunica/ActorQueryOperationFilter.ts","webpack://Comunica/ActorQueryOperationFromQuad.ts","webpack://Comunica/ActorQueryOperationGroup.ts","webpack://Comunica/GroupsState.ts","webpack://Comunica/ActorQueryOperationJoin.ts","webpack://Comunica/ActorQueryOperationLeftJoin.ts","webpack://Comunica/ActorQueryOperationMinus.ts","webpack://Comunica/ActorQueryOperationNop.ts","webpack://Comunica/ActorQueryOperationOrderBy.ts","webpack://Comunica/SortIterator.ts","webpack://Comunica/ActorQueryOperationPathAlt.ts","webpack://Comunica/ActorQueryOperationPathInv.ts","webpack://Comunica/ActorQueryOperationPathLink.ts","webpack://Comunica/ActorQueryOperationPathNps.ts","webpack://Comunica/ActorQueryOperationPathOneOrMore.ts","webpack://Comunica/ActorQueryOperationPathSeq.ts","webpack://Comunica/ActorQueryOperationPathZeroOrMore.ts","webpack://Comunica/ActorQueryOperationPathZeroOrOne.ts","webpack://Comunica/ActorQueryOperationProject.ts","webpack://Comunica/ActorQueryOperationReducedHash.ts","webpack://Comunica/ActorQueryOperationService.ts","webpack://Comunica/ActorQueryOperationSlice.ts","webpack://Comunica/ActorQueryOperationSource.ts","webpack://Comunica/ActorQueryOperationUnion.ts","webpack://Comunica/ActorQueryOperationClear.ts","webpack://Comunica/ActorQueryOperationUpdateCompositeUpdate.ts","webpack://Comunica/ActorQueryOperationCreate.ts","webpack://Comunica/ActorQueryOperationUpdateDeleteInsert.ts","webpack://Comunica/ActorQueryOperationDrop.ts","webpack://Comunica/ActorQueryOperationLoad.ts","webpack://Comunica/ActorQueryOperationValues.ts","webpack://Comunica/ActorQueryParseGraphql.ts","webpack://Comunica/ActorQueryParseSparql.ts","webpack://Comunica/ActorQueryProcessExplainLogical.ts","webpack://Comunica/ActorQueryProcessExplainParsed.ts","webpack://Comunica/ActorQueryProcessExplainPhysical.ts","webpack://Comunica/MemoryPhysicalQueryPlanLogger.ts","webpack://Comunica/ActorQueryProcessSequential.ts","webpack://Comunica/ActorQueryResultSerializeJson.ts","webpack://Comunica/ActorQueryResultSerializeRdf.ts","webpack://Comunica/ActorQueryResultSerializeSimple.ts","webpack://Comunica/ActorQueryResultSerializeSparqlCsv.ts","webpack://Comunica/ActionObserverHttp.ts","webpack://Comunica/ActorQueryResultSerializeSparqlJson.ts","webpack://Comunica/ActorQueryResultSerializeSparqlTsv.ts","webpack://Comunica/ActorQueryResultSerializeSparqlXml.ts","webpack://Comunica/XmlSerializer.ts","webpack://Comunica/ActorQueryResultSerializeStats.ts","webpack://Comunica/ActorQueryResultSerializeTable.ts","webpack://Comunica/ActorQueryResultSerializeTree.ts","webpack://Comunica/ActorQuerySourceIdentifyHypermediaNone.ts","webpack://Comunica/ActorQuerySourceIdentifyHypermediaQpf.ts","webpack://Comunica/QuerySourceQpf.ts","webpack://Comunica/ActorQuerySourceIdentifyHypermediaSparql.ts","webpack://Comunica/QuerySourceSparql.ts","webpack://Comunica/ActorQuerySourceIdentifyHypermedia.ts","webpack://Comunica/LinkedRdfSourcesAsyncRdfIterator.ts","webpack://Comunica/MediatedLinkedRdfSourcesAsyncRdfIterator.ts","webpack://Comunica/QuerySourceHypermedia.ts","webpack://Comunica/StreamingStoreMetadata.ts","webpack://Comunica/ActorQuerySourceIdentifyRdfJs.ts","webpack://Comunica/QuerySourceRdfJs.ts","webpack://Comunica/ActorQuerySourceIdentifySerialized.ts","webpack://Comunica/ActorRdfJoinEntriesSortCardinality.ts","webpack://Comunica/ActorRdfJoinHash.ts","webpack://Comunica/ActorRdfJoinMultiBindSource.ts","webpack://Comunica/ActorRdfJoinMultiBind.ts","webpack://Comunica/ActorRdfJoinMultiEmpty.ts","webpack://Comunica/ActorRdfJoinMultiSmallestFilterBindings.ts","webpack://Comunica/ActorRdfJoinMultiSmallest.ts","webpack://Comunica/ActorRdfJoinNestedLoop.ts","webpack://Comunica/ActorRdfJoinNone.ts","webpack://Comunica/ActorRdfJoinSingle.ts","webpack://Comunica/ActorRdfJoinSymmetricHash.ts","webpack://Comunica/ActorRdfJoinMinusHashUndef.ts","webpack://Comunica/BindingsIndex.ts","webpack://Comunica/ActorRdfJoinMinusHash.ts","webpack://Comunica/ActorRdfJoinOptionalBind.ts","webpack://Comunica/ActorRdfJoinOptionalHash.ts","webpack://Comunica/BindingsIndexDef.ts","webpack://Comunica/BindingsIndexUndef.ts","webpack://Comunica/ActorRdfJoinOptionalNestedLoop.ts","webpack://Comunica/ActorRdfJoinSelectivityVariableCounting.ts","webpack://Comunica/ActorRdfMetadataAccumulateCanContainUndefs.ts","webpack://Comunica/ActorRdfMetadataAccumulateCardinality.ts","webpack://Comunica/ActorRdfMetadataAccumulatePageSize.ts","webpack://Comunica/ActorRdfMetadataAccumulateRequestTime.ts","webpack://Comunica/ActorRdfMetadataAll.ts","webpack://Comunica/ActorRdfMetadataExtractAllowHttpMethods.ts","webpack://Comunica/ActorRdfMetadataExtractHydraControls.ts","webpack://Comunica/ActorRdfMetadataExtractHydraCount.ts","webpack://Comunica/ActorRdfMetadataExtractHydraPagesize.ts","webpack://Comunica/ActorRdfMetadataExtractPatchSparqlUpdate.ts","webpack://Comunica/ActorRdfMetadataExtractPutAccepted.ts","webpack://Comunica/ActorRdfMetadataExtractRequestTime.ts","webpack://Comunica/ActorRdfMetadataExtractSparqlService.ts","webpack://Comunica/ActorRdfMetadataPrimaryTopic.ts","webpack://Comunica/ActorRdfParseHtmlMicrodata.ts","webpack://Comunica/ActorRdfParseHtmlRdfa.ts","webpack://Comunica/ActorRdfParseHtmlScript.ts","webpack://Comunica/HtmlScriptListener.ts","webpack://Comunica/ActorRdfParseHtml.ts","webpack://Comunica/ActorRdfParseJsonLd.ts","webpack://Comunica/DocumentLoaderMediated.ts","webpack://Comunica/ActorRdfParseN3.ts","webpack://Comunica/ActorRdfParseRdfXml.ts","webpack://Comunica/ActorRdfParseShaclc.ts","webpack://Comunica/PrefixWrappingIterator.ts","webpack://Comunica/ActorRdfParseXmlRdfa.ts","webpack://Comunica/ActorRdfResolveHypermediaLinksNext.ts","webpack://Comunica/ActorRdfResolveHypermediaLinksQueueFifo.ts","webpack://Comunica/LinkQueueFifo.ts","webpack://Comunica/ActorRdfSerializeJsonLd.ts","webpack://Comunica/ActorRdfSerializeN3.ts","webpack://Comunica/ActorRdfSerializeShaclc.ts","webpack://Comunica/ActorRdfUpdateHypermediaPatchSparqlUpdate.ts","webpack://Comunica/QuadDestinationPatchSparqlUpdate.ts","webpack://Comunica/ActorRdfUpdateHypermediaPutLdp.ts","webpack://Comunica/QuadDestinationPutLdp.ts","webpack://Comunica/ActorRdfUpdateHypermediaSparql.ts","webpack://Comunica/QuadDestinationSparql.ts","webpack://Comunica/ActorRdfUpdateQuadsHypermedia.ts","webpack://Comunica/ActorRdfUpdateQuadsRdfJsStore.ts","webpack://Comunica/RdfJsQuadDestination.ts","webpack://Comunica/Bindings.ts","webpack://Comunica/BindingsFactory.ts","webpack://Comunica/bindingsToString.ts","webpack://Comunica/ActorContextPreprocess.ts","webpack://Comunica/ActorDereferenceRdf.ts","webpack://Comunica/ActorDereference.ts","webpack://Comunica/ActorDereferenceBase.ts","webpack://Comunica/ActorDereferenceParse.ts","webpack://Comunica/ActorHashBindings.ts","webpack://Comunica/ActorHashQuads.ts","webpack://Comunica/ActorHttpInvalidate.ts","webpack://Comunica/ActorHttpInvalidateListenable.ts","webpack://Comunica/ActorHttp.ts","webpack://Comunica/ActorInit.ts","webpack://Comunica/ActorOptimizeQueryOperation.ts","webpack://Comunica/ActorQueryOperation.ts","webpack://Comunica/ActorQueryOperationTyped.ts","webpack://Comunica/ActorQueryOperationTypedMediated.ts","webpack://Comunica/BusQueryOperation.ts","webpack://Comunica/ClosableIterator.ts","webpack://Comunica/ClosableTransformIterator.ts","webpack://Comunica/ActorQueryParse.ts","webpack://Comunica/ActorQueryProcess.ts","webpack://Comunica/ActorQueryResultSerialize.ts","webpack://Comunica/ActorQueryResultSerializeFixedMediaTypes.ts","webpack://Comunica/ActorQuerySourceIdentify.ts","webpack://Comunica/Utils.ts","webpack://Comunica/ActorRdfJoinEntriesSort.ts","webpack://Comunica/ActorRdfJoinSelectivity.ts","webpack://Comunica/ActorRdfJoin.ts","webpack://Comunica/ChunkedIterator.ts","webpack://Comunica/instrumentIterator.ts","webpack://Comunica/ActorRdfMetadataAccumulate.ts","webpack://Comunica/ActorRdfMetadataExtract.ts","webpack://Comunica/ActorRdfMetadata.ts","webpack://Comunica/ActorRdfParse.ts","webpack://Comunica/ActorRdfParseFixedMediaTypes.ts","webpack://Comunica/ActorRdfResolveHypermediaLinksQueue.ts","webpack://Comunica/LinkQueueWrapper.ts","webpack://Comunica/ActorRdfResolveHypermediaLinks.ts","webpack://Comunica/ActorRdfSerialize.ts","webpack://Comunica/ActorRdfSerializeFixedMediaTypes.ts","webpack://Comunica/ActorRdfUpdateHypermedia.ts","webpack://Comunica/ActorRdfUpdateQuads.ts","webpack://Comunica/ActorRdfUpdateQuadsDestination.ts","webpack://Comunica/Keys.ts","webpack://Comunica/ActionContext.ts","webpack://Comunica/ActionObserver.ts","webpack://Comunica/Actor.ts","webpack://Comunica/Bus.ts","webpack://Comunica/BusIndexed.ts","webpack://Comunica/ContextEntries.ts","webpack://Comunica/Mediator.ts","webpack://Comunica/BlankNodeBindingsScoped.ts","webpack://Comunica/BlankNodeScoped.ts","webpack://Comunica/Aggregator.ts","webpack://Comunica/Average.ts","webpack://Comunica/Count.ts","webpack://Comunica/GroupConcat.ts","webpack://Comunica/Max.ts","webpack://Comunica/Min.ts","webpack://Comunica/Sample.ts","webpack://Comunica/Sum.ts","webpack://Comunica/WildcardCountAggregator.ts","webpack://Comunica/AggregateEvaluator.ts","webpack://Comunica/AsyncAggregateEvaluator.ts","webpack://Comunica/AsyncEvaluator.ts","webpack://Comunica/SyncEvaluator.ts","webpack://Comunica/AsyncRecursiveEvaluator.ts","webpack://Comunica/BaseAggregateEvaluator.ts","webpack://Comunica/BaseExpressionEvaluator.ts","webpack://Comunica/SyncRecursiveEvaluator.ts","webpack://Comunica/Aggregate.ts","webpack://Comunica/AsyncExtension.ts","webpack://Comunica/Existence.ts","webpack://Comunica/Expressions.ts","webpack://Comunica/Named.ts","webpack://Comunica/Operator.ts","webpack://Comunica/SpecialOperator.ts","webpack://Comunica/SyncExtension.ts","webpack://Comunica/Term.ts","webpack://Comunica/Variable.ts","webpack://Comunica/Core.ts","webpack://Comunica/Helpers.ts","webpack://Comunica/NamedFunctions.ts","webpack://Comunica/OverloadTree.ts","webpack://Comunica/RegularFunctions.ts","webpack://Comunica/SpecialFunctions.ts","webpack://Comunica/XPathFunctions.ts","webpack://Comunica/AlgebraTransformer.ts","webpack://Comunica/TermTransformer.ts","webpack://Comunica/Consts.ts","webpack://Comunica/DateTimeHelpers.ts","webpack://Comunica/Errors.ts","webpack://Comunica/Ordering.ts","webpack://Comunica/Parsing.ts","webpack://Comunica/Serialization.ts","webpack://Comunica/SpecAlgos.ts","webpack://Comunica/TypeHandling.ts","webpack://Comunica/LoggerVoid.ts","webpack://Comunica/MediatorAll.ts","webpack://Comunica/MediatorCombinePipeline.ts","webpack://Comunica/MediatorCombineUnion.ts","webpack://Comunica/MediatorJoinCoefficientsFixed.ts","webpack://Comunica/MediatorNumber.ts","webpack://Comunica/MediatorRace.ts","webpack://Comunica/MetadataValidationState.ts","webpack://Comunica/Logger.ts","webpack://Comunica/../../node_modules/base64-js/index.js","webpack://Comunica/../../node_modules/bignumber.js/bignumber.js","webpack://Comunica/../../node_modules/buffer/index.js","webpack://Comunica/../../node_modules/canonicalize/lib/canonicalize.js","webpack://Comunica/../../node_modules/cross-fetch/dist/browser-polyfill.js","webpack://Comunica/../../node_modules/cross-fetch/dist/browser-ponyfill.js","webpack://Comunica/../../node_modules/dom-serializer/lib/foreignNames.js","webpack://Comunica/../../node_modules/dom-serializer/lib/index.js","webpack://Comunica/../../node_modules/domelementtype/lib/index.js","webpack://Comunica/../../node_modules/domhandler/lib/index.js","webpack://Comunica/../../node_modules/domhandler/lib/node.js","webpack://Comunica/../../node_modules/domutils/lib/feeds.js","webpack://Comunica/../../node_modules/domutils/lib/helpers.js","webpack://Comunica/../../node_modules/domutils/lib/index.js","webpack://Comunica/../../node_modules/domutils/lib/legacy.js","webpack://Comunica/../../node_modules/domutils/lib/manipulation.js","webpack://Comunica/../../node_modules/domutils/lib/querying.js","webpack://Comunica/../../node_modules/domutils/lib/stringify.js","webpack://Comunica/../../node_modules/domutils/lib/traversal.js","webpack://Comunica/../../node_modules/entities/lib/decode.js","webpack://Comunica/../../node_modules/entities/lib/decode_codepoint.js","webpack://Comunica/../../node_modules/entities/lib/encode.js","webpack://Comunica/../../node_modules/entities/lib/escape.js","webpack://Comunica/../../node_modules/entities/lib/generated/decode-data-html.js","webpack://Comunica/../../node_modules/entities/lib/generated/decode-data-xml.js","webpack://Comunica/../../node_modules/entities/lib/generated/encode-html.js","webpack://Comunica/../../node_modules/entities/lib/index.js","webpack://Comunica/../../node_modules/event-emitter-promisify/dist/index.js","webpack://Comunica/../../node_modules/events/events.js","webpack://Comunica/../../node_modules/fast-deep-equal/es6/index.js","webpack://Comunica/../../node_modules/fetch-sparql-endpoint/index.js","webpack://Comunica/../../node_modules/fetch-sparql-endpoint/lib/SparqlEndpointFetcher.js","webpack://Comunica/../../node_modules/fetch-sparql-endpoint/node_modules/cross-fetch/dist/browser-polyfill.js","webpack://Comunica/../../node_modules/graphql-to-sparql/index.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/Converter.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/IConvertContext.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/IConvertSettings.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/Util.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerAdapter.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerDefinitionAdapter.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerDefinitionFragment.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerDefinitionOperation.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerDocument.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerSelectionAdapter.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerSelectionField.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerSelectionFragmentSpread.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/NodeHandlerSelectionInlineFragment.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/DirectiveNodeHandlerAdapter.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/DirectiveNodeHandlerInclude.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/DirectiveNodeHandlerOptional.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/DirectiveNodeHandlerPlural.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/DirectiveNodeHandlerSingle.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/DirectiveNodeHandlerSkip.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/directivenode/index.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/index.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerAdapter.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerBoolean.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerEnum.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerFloat.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerInt.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerList.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerNull.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerObject.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerString.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/NodeValueHandlerVariable.js","webpack://Comunica/../../node_modules/graphql-to-sparql/lib/handler/valuenode/index.js","webpack://Comunica/../../node_modules/graphql-to-sparql/node_modules/sparqlalgebrajs/index.js","webpack://Comunica/../../node_modules/graphql-to-sparql/node_modules/sparqlalgebrajs/lib/algebra.js","webpack://Comunica/../../node_modules/graphql-to-sparql/node_modules/sparqlalgebrajs/lib/factory.js","webpack://Comunica/../../node_modules/graphql-to-sparql/node_modules/sparqlalgebrajs/lib/sparql.js","webpack://Comunica/../../node_modules/graphql-to-sparql/node_modules/sparqlalgebrajs/lib/sparqlAlgebra.js","webpack://Comunica/../../node_modules/graphql-to-sparql/node_modules/sparqlalgebrajs/lib/util.js","webpack://Comunica/../../node_modules/graphql/error/GraphQLError.js","webpack://Comunica/../../node_modules/graphql/error/syntaxError.js","webpack://Comunica/../../node_modules/graphql/jsutils/defineInspect.js","webpack://Comunica/../../node_modules/graphql/jsutils/devAssert.js","webpack://Comunica/../../node_modules/graphql/jsutils/inspect.js","webpack://Comunica/../../node_modules/graphql/jsutils/instanceOf.js","webpack://Comunica/../../node_modules/graphql/jsutils/invariant.js","webpack://Comunica/../../node_modules/graphql/jsutils/isObjectLike.js","webpack://Comunica/../../node_modules/graphql/jsutils/nodejsCustomInspectSymbol.js","webpack://Comunica/../../node_modules/graphql/language/ast.js","webpack://Comunica/../../node_modules/graphql/language/blockString.js","webpack://Comunica/../../node_modules/graphql/language/directiveLocation.js","webpack://Comunica/../../node_modules/graphql/language/index.js","webpack://Comunica/../../node_modules/graphql/language/kinds.js","webpack://Comunica/../../node_modules/graphql/language/lexer.js","webpack://Comunica/../../node_modules/graphql/language/location.js","webpack://Comunica/../../node_modules/graphql/language/parser.js","webpack://Comunica/../../node_modules/graphql/language/predicates.js","webpack://Comunica/../../node_modules/graphql/language/printLocation.js","webpack://Comunica/../../node_modules/graphql/language/printer.js","webpack://Comunica/../../node_modules/graphql/language/source.js","webpack://Comunica/../../node_modules/graphql/language/tokenKind.js","webpack://Comunica/../../node_modules/graphql/language/visitor.js","webpack://Comunica/../../node_modules/graphql/polyfills/symbols.js","webpack://Comunica/../../node_modules/hash.js/lib/hash.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/common.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/hmac.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/ripemd.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha/1.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha/224.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha/256.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha/384.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha/512.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/sha/common.js","webpack://Comunica/../../node_modules/hash.js/lib/hash/utils.js","webpack://Comunica/../../node_modules/htmlparser2/lib/Parser.js","webpack://Comunica/../../node_modules/htmlparser2/lib/Tokenizer.js","webpack://Comunica/../../node_modules/htmlparser2/lib/index.js","webpack://Comunica/../../node_modules/http-link-header/lib/link.js","webpack://Comunica/../../node_modules/ieee754/index.js","webpack://Comunica/../../node_modules/immutable/dist/immutable.es.js","webpack://Comunica/../../node_modules/inherits/inherits_browser.js","webpack://Comunica/../../node_modules/is-stream/index.js","webpack://Comunica/../../node_modules/jsonld-context-parser/index.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/ContextParser.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/ErrorCoded.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/FetchDocumentLoader.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/IDocumentLoader.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/JsonLdContext.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/JsonLdContextNormalized.js","webpack://Comunica/../../node_modules/jsonld-context-parser/lib/Util.js","webpack://Comunica/../../node_modules/jsonld-context-parser/node_modules/cross-fetch/dist/browser-polyfill.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/index.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/ContextTree.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/JsonLdParser.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/ParsingContext.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/Util.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/containerhandler/ContainerHandlerIdentifier.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/containerhandler/ContainerHandlerIndex.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/containerhandler/ContainerHandlerLanguage.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/containerhandler/ContainerHandlerType.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/EntryHandlerArrayValue.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/EntryHandlerContainer.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/EntryHandlerInvalidFallback.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/EntryHandlerPredicate.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeyword.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordAnnotation.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordContext.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordGraph.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordId.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordIncluded.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordNest.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordType.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordUnknownFallback.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/lib/entryhandler/keyword/EntryHandlerKeywordValue.js","webpack://Comunica/../../node_modules/jsonld-streaming-parser/node_modules/canonicalize/lib/canonicalize.js","webpack://Comunica/../../node_modules/jsonld-streaming-serializer/index.js","webpack://Comunica/../../node_modules/jsonld-streaming-serializer/lib/JsonLdSerializer.js","webpack://Comunica/../../node_modules/jsonld-streaming-serializer/lib/SeparatorType.js","webpack://Comunica/../../node_modules/jsonld-streaming-serializer/lib/Util.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/index.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/IHtmlParseListener.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/IItemScope.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/IVocabRegistry.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/MicrodataRdfParser.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/Util.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/propertyhandler/IItemPropertyHandler.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/propertyhandler/ItemPropertyHandlerContent.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/propertyhandler/ItemPropertyHandlerNumber.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/propertyhandler/ItemPropertyHandlerTime.js","webpack://Comunica/../../node_modules/microdata-rdf-streaming-parser/lib/propertyhandler/ItemPropertyHandlerUrl.js","webpack://Comunica/../../node_modules/minimalistic-assert/index.js","webpack://Comunica/../../node_modules/n3/src/IRIs.js","webpack://Comunica/../../node_modules/n3/src/N3Lexer.js","webpack://Comunica/../../node_modules/n3/src/N3DataFactory.js","webpack://Comunica/../../node_modules/n3/src/N3Parser.js","webpack://Comunica/../../node_modules/n3/src/N3Util.js","webpack://Comunica/../../node_modules/n3/src/N3Writer.js","webpack://Comunica/../../node_modules/n3/src/N3Store.js","webpack://Comunica/../../node_modules/n3/src/N3StreamParser.js","webpack://Comunica/../../node_modules/n3/src/N3StreamWriter.js","webpack://Comunica/../../node_modules/n3/src/index.js","webpack://Comunica/../../node_modules/process/browser.js","webpack://Comunica/../../node_modules/promise-polyfill/Promise.js","webpack://Comunica/../../node_modules/queue-microtask/index.js","webpack://Comunica/../../node_modules/rdf-data-factory/index.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/BlankNode.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/DataFactory.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/DefaultGraph.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/Literal.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/NamedNode.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/Quad.js","webpack://Comunica/../../node_modules/rdf-data-factory/lib/Variable.js","webpack://Comunica/../../node_modules/rdf-isomorphic/index.js","webpack://Comunica/../../node_modules/rdf-isomorphic/lib/RdfIsomorphic.js","webpack://Comunica/../../node_modules/rdf-literal/index.js","webpack://Comunica/../../node_modules/rdf-literal/lib/ITypeHandler.js","webpack://Comunica/../../node_modules/rdf-literal/lib/Translator.js","webpack://Comunica/../../node_modules/rdf-literal/lib/handler/TypeHandlerBoolean.js","webpack://Comunica/../../node_modules/rdf-literal/lib/handler/TypeHandlerDate.js","webpack://Comunica/../../node_modules/rdf-literal/lib/handler/TypeHandlerNumberDouble.js","webpack://Comunica/../../node_modules/rdf-literal/lib/handler/TypeHandlerNumberInteger.js","webpack://Comunica/../../node_modules/rdf-literal/lib/handler/TypeHandlerString.js","webpack://Comunica/../../node_modules/rdf-literal/lib/handler/index.js","webpack://Comunica/../../node_modules/rdf-store-stream/index.js","webpack://Comunica/../../node_modules/rdf-stores/index.js","webpack://Comunica/../../node_modules/rdf-stores/lib/IRdfStoreOptions.js","webpack://Comunica/../../node_modules/rdf-stores/lib/OrderUtils.js","webpack://Comunica/../../node_modules/rdf-stores/lib/PatternTerm.js","webpack://Comunica/../../node_modules/rdf-stores/lib/RdfStore.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dataset/DatasetCoreWrapper.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/ITermDictionary.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionaryNumberMap.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionaryNumberRecord.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionaryNumberRecordFullTerms.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionaryQuoted.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionaryQuotedIndexed.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionaryQuotedReferential.js","webpack://Comunica/../../node_modules/rdf-stores/lib/dictionary/TermDictionarySymbol.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/IRdfStoreIndex.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/RdfStoreIndexNestedMap.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/RdfStoreIndexNestedMapQuoted.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/RdfStoreIndexNestedMapRecursive.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/RdfStoreIndexNestedMapRecursiveQuoted.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/RdfStoreIndexNestedRecord.js","webpack://Comunica/../../node_modules/rdf-stores/lib/index/RdfStoreIndexNestedRecordQuoted.js","webpack://Comunica/../../node_modules/rdf-streaming-store/index.js","webpack://Comunica/../../node_modules/rdf-streaming-store/lib/PendingStreamsIndex.js","webpack://Comunica/../../node_modules/rdf-streaming-store/lib/StreamingStore.js","webpack://Comunica/../../node_modules/rdf-string-ttl/index.js","webpack://Comunica/../../node_modules/rdf-string-ttl/lib/TermUtil.js","webpack://Comunica/../../node_modules/rdf-string/index.js","webpack://Comunica/../../node_modules/rdf-string/lib/TermUtil.js","webpack://Comunica/../../node_modules/rdf-terms/index.js","webpack://Comunica/../../node_modules/rdf-terms/lib/QuadTermUtil.js","webpack://Comunica/../../node_modules/rdf-terms/lib/TermUtil.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/index.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/lib/IActiveTag.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/lib/IHtmlParseListener.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/lib/IRdfaPattern.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/lib/RdfaParser.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/lib/RdfaProfile.js","webpack://Comunica/../../node_modules/rdfa-streaming-parser/lib/Util.js","webpack://Comunica/../../node_modules/rdfxml-streaming-parser/index.js","webpack://Comunica/../../node_modules/rdfxml-streaming-parser/lib/ParseError.js","webpack://Comunica/../../node_modules/rdfxml-streaming-parser/lib/RdfXmlParser.js","webpack://Comunica/../../node_modules/readable-stream-node-to-web/index.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/add-abort-signal.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/buffer_list.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/compose.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/destroy.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/duplex.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/duplexify.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/end-of-stream.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/from.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/legacy.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/operators.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/passthrough.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/pipeline.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/readable.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/state.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/transform.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/utils.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/streams/writable.js","webpack://Comunica/../../node_modules/readable-stream/lib/internal/validators.js","webpack://Comunica/../../node_modules/readable-stream/lib/ours/browser.js","webpack://Comunica/../../node_modules/readable-stream/lib/ours/errors.js","webpack://Comunica/../../node_modules/readable-stream/lib/ours/primordials.js","webpack://Comunica/../../node_modules/readable-stream/lib/ours/util.js","webpack://Comunica/../../node_modules/readable-stream/lib/stream.js","webpack://Comunica/../../node_modules/readable-stream/lib/stream/promises.js","webpack://Comunica/../../node_modules/relative-to-absolute-iri/index.js","webpack://Comunica/../../node_modules/relative-to-absolute-iri/lib/Resolve.js","webpack://Comunica/../../node_modules/safe-buffer/index.js","webpack://Comunica/../../node_modules/shaclc-parse/lib/ShaclcParser.js","webpack://Comunica/../../node_modules/shaclc-parse/lib/index.js","webpack://Comunica/../../node_modules/shaclc-write/dist/ShaclcGenerator.js","webpack://Comunica/../../node_modules/shaclc-write/dist/base-prefixes.js","webpack://Comunica/../../node_modules/shaclc-write/dist/index.js","webpack://Comunica/../../node_modules/shaclc-write/dist/node-param.js","webpack://Comunica/../../node_modules/shaclc-write/dist/property-param .js","webpack://Comunica/../../node_modules/shaclc-write/dist/utils.js","webpack://Comunica/../../node_modules/shaclc-write/dist/volatile-store.js","webpack://Comunica/../../node_modules/shaclc-write/dist/writer.js","webpack://Comunica/../../node_modules/spark-md5/spark-md5.js","webpack://Comunica/../../node_modules/sparqlalgebrajs/index.js","webpack://Comunica/../../node_modules/sparqlalgebrajs/lib/algebra.js","webpack://Comunica/../../node_modules/sparqlalgebrajs/lib/factory.js","webpack://Comunica/../../node_modules/sparqlalgebrajs/lib/sparql.js","webpack://Comunica/../../node_modules/sparqlalgebrajs/lib/sparqlAlgebra.js","webpack://Comunica/../../node_modules/sparqlalgebrajs/lib/util.js","webpack://Comunica/../../node_modules/sparqljs/lib/SparqlGenerator.js","webpack://Comunica/../../node_modules/sparqljs/lib/SparqlParser.js","webpack://Comunica/../../node_modules/sparqljs/lib/Wildcard.js","webpack://Comunica/../../node_modules/sparqljs/sparql.js","webpack://Comunica/../../node_modules/sparqljson-parse/index.js","webpack://Comunica/../../node_modules/sparqljson-parse/lib/SparqlJsonParser.js","webpack://Comunica/../../node_modules/sparqljson-to-tree/index.js","webpack://Comunica/../../node_modules/sparqljson-to-tree/lib/Converter.js","webpack://Comunica/../../node_modules/sparqlxml-parse/index.js","webpack://Comunica/../../node_modules/sparqlxml-parse/lib/SparqlXmlParser.js","webpack://Comunica/../../node_modules/stream-to-string/index.js","webpack://Comunica/../../node_modules/string_decoder/lib/string_decoder.js","webpack://Comunica/../../node_modules/uritemplate/bin/uritemplate.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/index.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/md5.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/native.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/nil.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/parse.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/regex.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/rng.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/sha1.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/stringify.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/v1.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/v3.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/v35.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/v4.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/v5.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/validate.js","webpack://Comunica/../../node_modules/uuid/dist/commonjs-browser/version.js","webpack://Comunica/../../node_modules/validate-iri/index.js","webpack://Comunica/../../node_modules/validate-iri/lib/Validate.js","webpack://Comunica/../../node_modules/web-streams-ponyfill/dist/polyfill-ie11.min.js","webpack://Comunica/../../node_modules/xmlchars/xml/1.0/ed5.js","webpack://Comunica/../../node_modules/xmlchars/xml/1.1/ed2.js","webpack://Comunica/../../node_modules/xmlchars/xmlns/1.0/ed3.js","webpack://Comunica/../../packages/actor-optimize-query-operation-construct-distinct/node_modules/sparqlalgebrajs/index.js","webpack://Comunica/../../packages/actor-optimize-query-operation-construct-distinct/node_modules/sparqlalgebrajs/lib/algebra.js","webpack://Comunica/../../packages/actor-optimize-query-operation-construct-distinct/node_modules/sparqlalgebrajs/lib/factory.js","webpack://Comunica/../../packages/actor-optimize-query-operation-construct-distinct/node_modules/sparqlalgebrajs/lib/sparql.js","webpack://Comunica/../../packages/actor-optimize-query-operation-construct-distinct/node_modules/sparqlalgebrajs/lib/sparqlAlgebra.js","webpack://Comunica/../../packages/actor-optimize-query-operation-construct-distinct/node_modules/sparqlalgebrajs/lib/util.js","webpack://Comunica/../../packages/actor-rdf-parse-html/node_modules/htmlparser2/lib/Parser.js","webpack://Comunica/../../packages/actor-rdf-parse-html/node_modules/htmlparser2/lib/Tokenizer.js","webpack://Comunica/../../packages/actor-rdf-parse-html/node_modules/htmlparser2/lib/index.js","webpack://Comunica/../../node_modules/asynciterator/dist/asynciterator.js","webpack://Comunica/../../node_modules/asynciterator/dist/linkedlist.js","webpack://Comunica/../../node_modules/asynciterator/dist/taskscheduler.js","webpack://Comunica/../../node_modules/lru-cache/dist/commonjs/index.js","webpack://Comunica/../../node_modules/readable-from-web/lib/ReadableFromWeb.js","webpack://Comunica/../../node_modules/readable-from-web/lib/index.js","webpack://Comunica/webpack/bootstrap","webpack://Comunica/webpack/runtime/compat get default export","webpack://Comunica/webpack/runtime/define property getters","webpack://Comunica/webpack/runtime/global","webpack://Comunica/webpack/runtime/hasOwnProperty shorthand","webpack://Comunica/webpack/runtime/make namespace object","webpack://Comunica/webpack/startup"],"sourcesContent":["var { Buffer } = require('buffer')\n// Named constants with unique integer values\nvar C = {};\n// Tokens\nvar LEFT_BRACE = C.LEFT_BRACE = 0x1;\nvar RIGHT_BRACE = C.RIGHT_BRACE = 0x2;\nvar LEFT_BRACKET = C.LEFT_BRACKET = 0x3;\nvar RIGHT_BRACKET = C.RIGHT_BRACKET = 0x4;\nvar COLON = C.COLON = 0x5;\nvar COMMA = C.COMMA = 0x6;\nvar TRUE = C.TRUE = 0x7;\nvar FALSE = C.FALSE = 0x8;\nvar NULL = C.NULL = 0x9;\nvar STRING = C.STRING = 0xa;\nvar NUMBER = C.NUMBER = 0xb;\n// Tokenizer States\nvar START = C.START = 0x11;\nvar STOP = C.STOP = 0x12;\nvar TRUE1 = C.TRUE1 = 0x21;\nvar TRUE2 = C.TRUE2 = 0x22;\nvar TRUE3 = C.TRUE3 = 0x23;\nvar FALSE1 = C.FALSE1 = 0x31;\nvar FALSE2 = C.FALSE2 = 0x32;\nvar FALSE3 = C.FALSE3 = 0x33;\nvar FALSE4 = C.FALSE4 = 0x34;\nvar NULL1 = C.NULL1 = 0x41;\nvar NULL2 = C.NULL2 = 0x42;\nvar NULL3 = C.NULL3 = 0x43;\nvar NUMBER1 = C.NUMBER1 = 0x51;\nvar NUMBER3 = C.NUMBER3 = 0x53;\nvar STRING1 = C.STRING1 = 0x61;\nvar STRING2 = C.STRING2 = 0x62;\nvar STRING3 = C.STRING3 = 0x63;\nvar STRING4 = C.STRING4 = 0x64;\nvar STRING5 = C.STRING5 = 0x65;\nvar STRING6 = C.STRING6 = 0x66;\n// Parser States\nvar VALUE = C.VALUE = 0x71;\nvar KEY = C.KEY = 0x72;\n// Parser Modes\nvar OBJECT = C.OBJECT = 0x81;\nvar ARRAY = C.ARRAY = 0x82;\n// Character constants\nvar BACK_SLASH = \"\\\\\".charCodeAt(0);\nvar FORWARD_SLASH = \"\\/\".charCodeAt(0);\nvar BACKSPACE = \"\\b\".charCodeAt(0);\nvar FORM_FEED = \"\\f\".charCodeAt(0);\nvar NEWLINE = \"\\n\".charCodeAt(0);\nvar CARRIAGE_RETURN = \"\\r\".charCodeAt(0);\nvar TAB = \"\\t\".charCodeAt(0);\n\nvar STRING_BUFFER_SIZE = 64 * 1024;\n\nfunction alloc(size) {\n return Buffer.alloc ? Buffer.alloc(size) : new Buffer(size);\n}\n\nfunction Parser() {\n this.tState = START;\n this.value = undefined;\n\n this.string = undefined; // string data\n this.stringBuffer = alloc(STRING_BUFFER_SIZE);\n this.stringBufferOffset = 0;\n this.unicode = undefined; // unicode escapes\n this.highSurrogate = undefined;\n\n this.key = undefined;\n this.mode = undefined;\n this.stack = [];\n this.state = VALUE;\n this.bytes_remaining = 0; // number of bytes remaining in multi byte utf8 char to read after split boundary\n this.bytes_in_sequence = 0; // bytes in multi byte utf8 char to read\n this.temp_buffs = { \"2\": alloc(2), \"3\": alloc(3), \"4\": alloc(4) }; // for rebuilding chars split before boundary is reached\n\n // Stream offset\n this.offset = -1;\n}\n\n// Slow code to string converter (only used when throwing syntax errors)\nParser.toknam = function (code) {\n var keys = Object.keys(C);\n for (var i = 0, l = keys.length; i < l; i++) {\n var key = keys[i];\n if (C[key] === code) { return key; }\n }\n return code && (\"0x\" + code.toString(16));\n};\n\nvar proto = Parser.prototype;\nproto.onError = function (err) { throw err; };\nproto.charError = function (buffer, i) {\n this.tState = STOP;\n this.onError(new Error(\"Unexpected \" + JSON.stringify(String.fromCharCode(buffer[i])) + \" at position \" + i + \" in state \" + Parser.toknam(this.tState)));\n};\nproto.appendStringChar = function (char) {\n if (this.stringBufferOffset >= STRING_BUFFER_SIZE) {\n this.string += this.stringBuffer.toString('utf8');\n this.stringBufferOffset = 0;\n }\n\n this.stringBuffer[this.stringBufferOffset++] = char;\n};\nproto.appendStringBuf = function (buf, start, end) {\n var size = buf.length;\n if (typeof start === 'number') {\n if (typeof end === 'number') {\n if (end < 0) {\n // adding a negative end decreeses the size\n size = buf.length - start + end;\n } else {\n size = end - start;\n }\n } else {\n size = buf.length - start;\n }\n }\n\n if (size < 0) {\n size = 0;\n }\n\n if (this.stringBufferOffset + size > STRING_BUFFER_SIZE) {\n this.string += this.stringBuffer.toString('utf8', 0, this.stringBufferOffset);\n this.stringBufferOffset = 0;\n }\n\n buf.copy(this.stringBuffer, this.stringBufferOffset, start, end);\n this.stringBufferOffset += size;\n};\nproto.write = function (buffer) {\n if (typeof buffer === \"string\") buffer = new Buffer(buffer);\n var n;\n for (var i = 0, l = buffer.length; i < l; i++) {\n if (this.tState === START){\n n = buffer[i];\n this.offset++;\n if(n === 0x7b){ this.onToken(LEFT_BRACE, \"{\"); // {\n }else if(n === 0x7d){ this.onToken(RIGHT_BRACE, \"}\"); // }\n }else if(n === 0x5b){ this.onToken(LEFT_BRACKET, \"[\"); // [\n }else if(n === 0x5d){ this.onToken(RIGHT_BRACKET, \"]\"); // ]\n }else if(n === 0x3a){ this.onToken(COLON, \":\"); // :\n }else if(n === 0x2c){ this.onToken(COMMA, \",\"); // ,\n }else if(n === 0x74){ this.tState = TRUE1; // t\n }else if(n === 0x66){ this.tState = FALSE1; // f\n }else if(n === 0x6e){ this.tState = NULL1; // n\n }else if(n === 0x22){ // \"\n this.string = \"\";\n this.stringBufferOffset = 0;\n this.tState = STRING1;\n }else if(n === 0x2d){ this.string = \"-\"; this.tState = NUMBER1; // -\n }else{\n if (n >= 0x30 && n < 0x40) { // 1-9\n this.string = String.fromCharCode(n); this.tState = NUMBER3;\n } else if (n === 0x20 || n === 0x09 || n === 0x0a || n === 0x0d) {\n // whitespace\n } else {\n return this.charError(buffer, i);\n }\n }\n }else if (this.tState === STRING1){ // After open quote\n n = buffer[i]; // get current byte from buffer\n // check for carry over of a multi byte char split between data chunks\n // & fill temp buffer it with start of this data chunk up to the boundary limit set in the last iteration\n if (this.bytes_remaining > 0) {\n for (var j = 0; j < this.bytes_remaining; j++) {\n this.temp_buffs[this.bytes_in_sequence][this.bytes_in_sequence - this.bytes_remaining + j] = buffer[j];\n }\n\n this.appendStringBuf(this.temp_buffs[this.bytes_in_sequence]);\n this.bytes_in_sequence = this.bytes_remaining = 0;\n i = i + j - 1;\n } else if (this.bytes_remaining === 0 && n >= 128) { // else if no remainder bytes carried over, parse multi byte (>=128) chars one at a time\n if (n <= 193 || n > 244) {\n return this.onError(new Error(\"Invalid UTF-8 character at position \" + i + \" in state \" + Parser.toknam(this.tState)));\n }\n if ((n >= 194) && (n <= 223)) this.bytes_in_sequence = 2;\n if ((n >= 224) && (n <= 239)) this.bytes_in_sequence = 3;\n if ((n >= 240) && (n <= 244)) this.bytes_in_sequence = 4;\n if ((this.bytes_in_sequence + i) > buffer.length) { // if bytes needed to complete char fall outside buffer length, we have a boundary split\n for (var k = 0; k <= (buffer.length - 1 - i); k++) {\n this.temp_buffs[this.bytes_in_sequence][k] = buffer[i + k]; // fill temp buffer of correct size with bytes available in this chunk\n }\n this.bytes_remaining = (i + this.bytes_in_sequence) - buffer.length;\n i = buffer.length - 1;\n } else {\n this.appendStringBuf(buffer, i, i + this.bytes_in_sequence);\n i = i + this.bytes_in_sequence - 1;\n }\n } else if (n === 0x22) {\n this.tState = START;\n this.string += this.stringBuffer.toString('utf8', 0, this.stringBufferOffset);\n this.stringBufferOffset = 0;\n this.onToken(STRING, this.string);\n this.offset += Buffer.byteLength(this.string, 'utf8') + 1;\n this.string = undefined;\n }\n else if (n === 0x5c) {\n this.tState = STRING2;\n }\n else if (n >= 0x20) { this.appendStringChar(n); }\n else {\n return this.charError(buffer, i);\n }\n }else if (this.tState === STRING2){ // After backslash\n n = buffer[i];\n if(n === 0x22){ this.appendStringChar(n); this.tState = STRING1;\n }else if(n === 0x5c){ this.appendStringChar(BACK_SLASH); this.tState = STRING1;\n }else if(n === 0x2f){ this.appendStringChar(FORWARD_SLASH); this.tState = STRING1;\n }else if(n === 0x62){ this.appendStringChar(BACKSPACE); this.tState = STRING1;\n }else if(n === 0x66){ this.appendStringChar(FORM_FEED); this.tState = STRING1;\n }else if(n === 0x6e){ this.appendStringChar(NEWLINE); this.tState = STRING1;\n }else if(n === 0x72){ this.appendStringChar(CARRIAGE_RETURN); this.tState = STRING1;\n }else if(n === 0x74){ this.appendStringChar(TAB); this.tState = STRING1;\n }else if(n === 0x75){ this.unicode = \"\"; this.tState = STRING3;\n }else{\n return this.charError(buffer, i);\n }\n }else if (this.tState === STRING3 || this.tState === STRING4 || this.tState === STRING5 || this.tState === STRING6){ // unicode hex codes\n n = buffer[i];\n // 0-9 A-F a-f\n if ((n >= 0x30 && n < 0x40) || (n > 0x40 && n <= 0x46) || (n > 0x60 && n <= 0x66)) {\n this.unicode += String.fromCharCode(n);\n if (this.tState++ === STRING6) {\n var intVal = parseInt(this.unicode, 16);\n this.unicode = undefined;\n if (this.highSurrogate !== undefined && intVal >= 0xDC00 && intVal < (0xDFFF + 1)) { //<56320,57343> - lowSurrogate\n this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate, intVal)));\n this.highSurrogate = undefined;\n } else if (this.highSurrogate === undefined && intVal >= 0xD800 && intVal < (0xDBFF + 1)) { //<55296,56319> - highSurrogate\n this.highSurrogate = intVal;\n } else {\n if (this.highSurrogate !== undefined) {\n this.appendStringBuf(new Buffer(String.fromCharCode(this.highSurrogate)));\n this.highSurrogate = undefined;\n }\n this.appendStringBuf(new Buffer(String.fromCharCode(intVal)));\n }\n this.tState = STRING1;\n }\n } else {\n return this.charError(buffer, i);\n }\n } else if (this.tState === NUMBER1 || this.tState === NUMBER3) {\n n = buffer[i];\n\n switch (n) {\n case 0x30: // 0\n case 0x31: // 1\n case 0x32: // 2\n case 0x33: // 3\n case 0x34: // 4\n case 0x35: // 5\n case 0x36: // 6\n case 0x37: // 7\n case 0x38: // 8\n case 0x39: // 9\n case 0x2e: // .\n case 0x65: // e\n case 0x45: // E\n case 0x2b: // +\n case 0x2d: // -\n this.string += String.fromCharCode(n);\n this.tState = NUMBER3;\n break;\n default:\n this.tState = START;\n var error = this.numberReviver(this.string);\n if (error){\n return error;\n }\n\n this.offset += this.string.length - 1;\n this.string = undefined;\n i--;\n break;\n }\n }else if (this.tState === TRUE1){ // r\n if (buffer[i] === 0x72) { this.tState = TRUE2; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === TRUE2){ // u\n if (buffer[i] === 0x75) { this.tState = TRUE3; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === TRUE3){ // e\n if (buffer[i] === 0x65) { this.tState = START; this.onToken(TRUE, true); this.offset+= 3; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === FALSE1){ // a\n if (buffer[i] === 0x61) { this.tState = FALSE2; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === FALSE2){ // l\n if (buffer[i] === 0x6c) { this.tState = FALSE3; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === FALSE3){ // s\n if (buffer[i] === 0x73) { this.tState = FALSE4; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === FALSE4){ // e\n if (buffer[i] === 0x65) { this.tState = START; this.onToken(FALSE, false); this.offset+= 4; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === NULL1){ // u\n if (buffer[i] === 0x75) { this.tState = NULL2; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === NULL2){ // l\n if (buffer[i] === 0x6c) { this.tState = NULL3; }\n else { return this.charError(buffer, i); }\n }else if (this.tState === NULL3){ // l\n if (buffer[i] === 0x6c) { this.tState = START; this.onToken(NULL, null); this.offset += 3; }\n else { return this.charError(buffer, i); }\n }\n }\n};\nproto.onToken = function (token, value) {\n // Override this to get events\n};\n\nproto.parseError = function (token, value) {\n this.tState = STOP;\n this.onError(new Error(\"Unexpected \" + Parser.toknam(token) + (value ? (\"(\" + JSON.stringify(value) + \")\") : \"\") + \" in state \" + Parser.toknam(this.state)));\n};\nproto.push = function () {\n this.stack.push({value: this.value, key: this.key, mode: this.mode});\n};\nproto.pop = function () {\n var value = this.value;\n var parent = this.stack.pop();\n this.value = parent.value;\n this.key = parent.key;\n this.mode = parent.mode;\n this.emit(value);\n if (!this.mode) { this.state = VALUE; }\n};\nproto.emit = function (value) {\n if (this.mode) { this.state = COMMA; }\n this.onValue(value);\n};\nproto.onValue = function (value) {\n // Override me\n};\nproto.onToken = function (token, value) {\n if(this.state === VALUE){\n if(token === STRING || token === NUMBER || token === TRUE || token === FALSE || token === NULL){\n if (this.value) {\n this.value[this.key] = value;\n }\n this.emit(value);\n }else if(token === LEFT_BRACE){\n this.push();\n if (this.value) {\n this.value = this.value[this.key] = {};\n } else {\n this.value = {};\n }\n this.key = undefined;\n this.state = KEY;\n this.mode = OBJECT;\n }else if(token === LEFT_BRACKET){\n this.push();\n if (this.value) {\n this.value = this.value[this.key] = [];\n } else {\n this.value = [];\n }\n this.key = 0;\n this.mode = ARRAY;\n this.state = VALUE;\n }else if(token === RIGHT_BRACE){\n if (this.mode === OBJECT) {\n this.pop();\n } else {\n return this.parseError(token, value);\n }\n }else if(token === RIGHT_BRACKET){\n if (this.mode === ARRAY) {\n this.pop();\n } else {\n return this.parseError(token, value);\n }\n }else{\n return this.parseError(token, value);\n }\n }else if(this.state === KEY){\n if (token === STRING) {\n this.key = value;\n this.state = COLON;\n } else if (token === RIGHT_BRACE) {\n this.pop();\n } else {\n return this.parseError(token, value);\n }\n }else if(this.state === COLON){\n if (token === COLON) { this.state = VALUE; }\n else { return this.parseError(token, value); }\n }else if(this.state === COMMA){\n if (token === COMMA) {\n if (this.mode === ARRAY) { this.key++; this.state = VALUE; }\n else if (this.mode === OBJECT) { this.state = KEY; }\n\n } else if (token === RIGHT_BRACKET && this.mode === ARRAY || token === RIGHT_BRACE && this.mode === OBJECT) {\n this.pop();\n } else {\n return this.parseError(token, value);\n }\n }else{\n return this.parseError(token, value);\n }\n};\n\n// Override to implement your own number reviver.\n// Any value returned is treated as error and will interrupt parsing.\nproto.numberReviver = function (text) {\n var result = Number(text);\n\n if (isNaN(result)) {\n return this.charError(buffer, i);\n }\n\n if ((text.match(/[0-9]+/) == text) && (result.toString() != text)) {\n // Long string of digits which is an ID string and not valid and/or safe JavaScript integer Number\n this.onToken(STRING, text);\n } else {\n this.onToken(NUMBER, result);\n }\n}\n\nParser.C = C;\n\nmodule.exports = Parser;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fragment = void 0;\nfunction getFragment(inputStr) {\n let str = inputStr;\n if (str.endsWith('/') || str.endsWith('#')) {\n str = str.slice(0, str.length - 1);\n }\n const args = [];\n if (str.lastIndexOf('/') > 0) {\n args.push(str.lastIndexOf('/'));\n }\n if (str.lastIndexOf('#') > 0) {\n args.push(str.lastIndexOf('#'));\n }\n const i = Math.max(...args);\n return str.slice(i + 1);\n}\nfunction camelize(str) {\n var _a;\n const res = (_a = str\n .split(/[^a-z0-9]+/ig)\n .filter((s) => s !== '')\n .map((s) => s[0].toUpperCase() + s.slice(1))\n .join('')\n // Make sure the prefix does not start with a number\n .match(/[a-z][a-z0-9]+/ig)) === null || _a === void 0 ? void 0 : _a[0];\n // Include 'v' so we always return something matching the pattern\n // [a-z][a-z0-9]+\n return typeof res === 'undefined' ? undefined : res[0].toLowerCase() + res.slice(1);\n}\nfunction fragment(str) {\n let value = getFragment(str);\n value = value ? camelize(value) : undefined;\n return value || 'v';\n}\nexports.fragment = fragment;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lookupAllPrefixes = exports.prefixToUri = exports.uriToPrefix = void 0;\nconst fragment_1 = require(\"./fragment\");\nconst lookup_1 = require(\"./lookup\");\nfunction uriToPrefix(uri, options) {\n return __awaiter(this, void 0, void 0, function* () {\n let result;\n // Collect the prefix\n try {\n result = yield (0, lookup_1.lookupPrefix)(uri, options);\n }\n catch (_a) {\n if (options === null || options === void 0 ? void 0 : options.mintOnUnknown) {\n // Keep prefixes at most 4 characters long when minting a new one\n result = (0, fragment_1.fragment)(uri).slice(0, 4);\n }\n }\n // If there is a bank of existing prefixes make sure to make a unique one\n // by postfixing a number\n if (typeof result !== 'undefined'\n && typeof (options === null || options === void 0 ? void 0 : options.existingPrefixes) === 'object'\n && result in options.existingPrefixes) {\n let i = 0;\n while (`${result}${i}` in options.existingPrefixes) {\n i += 1;\n }\n result = `${result}${i}`;\n }\n return result;\n });\n}\nexports.uriToPrefix = uriToPrefix;\n/**\n * Lookup the namespace commonly associated with a given prefix\n * @param prefix The prefix to lookup the namespace for\n * @param options You can optionally pass a custom fetch function\n */\nfunction prefixToUri(prefix, options) {\n return __awaiter(this, void 0, void 0, function* () {\n try {\n // The await needs to be here so that we can return undefined on rejection\n return yield (0, lookup_1.lookupUri)(prefix, options);\n }\n catch (_a) {\n return undefined;\n }\n });\n}\nexports.prefixToUri = prefixToUri;\nvar lookup_2 = require(\"./lookup\");\nObject.defineProperty(exports, \"lookupAllPrefixes\", { enumerable: true, get: function () { return lookup_2.lookupAllPrefixes; } });\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fetchContext = exports.fetchJson = void 0;\n// TODO: Use universal fetch here\nconst cross_fetch_1 = require(\"cross-fetch\");\nfunction fetchJson(url, options) {\n var _a;\n return __awaiter(this, void 0, void 0, function* () {\n // Select the correct fetch function\n const fetchFn = (_a = options === null || options === void 0 ? void 0 : options.fetch) !== null && _a !== void 0 ? _a : cross_fetch_1.fetch;\n return (yield fetchFn(url)).json();\n });\n}\nexports.fetchJson = fetchJson;\nfunction fetchContext(url, options) {\n return __awaiter(this, void 0, void 0, function* () {\n return (yield fetchJson(url, options))['@context'];\n });\n}\nexports.fetchContext = fetchContext;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lookupNamespace\"), exports);\n__exportStar(require(\"./lookupPrefix\"), exports);\n__exportStar(require(\"./lookupAllPrefixes\"), exports);\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lookupAllPrefixes = void 0;\nconst fetchContext_1 = require(\"./fetchContext\");\n/**\n * Use prefix.cc to look up all recorded prefixes\n */\nfunction lookupAllPrefixes(options) {\n return __awaiter(this, void 0, void 0, function* () {\n return (0, fetchContext_1.fetchContext)('https://prefix.cc/context', options);\n });\n}\nexports.lookupAllPrefixes = lookupAllPrefixes;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lookupUri = void 0;\nconst fetchContext_1 = require(\"./fetchContext\");\n/**\n * Use prefix.cc to look up the namespace associated with a given prefix.\n * Errors if one cannot be found.\n *\n * @param prefix The prefix of which to obtain the namespace\n * @param options Optional fetch function to use\n */\nfunction lookupUri(prefix, options) {\n return __awaiter(this, void 0, void 0, function* () {\n const uri = (yield (0, fetchContext_1.fetchContext)(`https://prefix.cc/${prefix}.file.jsonld`, options))[prefix];\n if (typeof uri !== 'string') {\n throw new Error(`Expected uri to be a string, received: ${uri} of type ${typeof uri}`);\n }\n return uri;\n });\n}\nexports.lookupUri = lookupUri;\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.lookupPrefix = void 0;\nconst fetchContext_1 = require(\"./fetchContext\");\n/**\n * Use prefix.cc to look up the prefix for a URI namespace, rejects if there is an error in\n * looking up the prefix, or if no prefixes are returned\n *\n * @param uri The URI to obtain a prefix for\n * @param options Optional fetch function to use\n */\nfunction lookupPrefix(uri, options) {\n return __awaiter(this, void 0, void 0, function* () {\n // Create the correct url to lookup including search parameters\n const url = new URL('https://prefix.cc/reverse');\n url.searchParams.append('uri', uri);\n url.searchParams.append('format', 'jsonld');\n const prefixes = Object.keys(yield (0, fetchContext_1.fetchContext)(url, options));\n if (prefixes.length === 0) {\n throw new Error('No prefixes returned');\n }\n return prefixes[0];\n });\n}\nexports.lookupPrefix = lookupPrefix;\n","var global = typeof self !== 'undefined' ? self : this;\nvar __self__ = (function () {\nfunction F() {\nthis.fetch = false;\nthis.DOMException = global.DOMException\n}\nF.prototype = global;\nreturn new F();\n})();\n(function(self) {\n\nvar irrelevant = (function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n})({});\n})(__self__);\n__self__.fetch.ponyfill = true;\n// Remove \"polyfill\" property added by whatwg-fetch\ndelete __self__.fetch.polyfill;\n// Choose between native implementation (global) or custom implementation (__self__)\n// var ctx = global.fetch ? global : __self__;\nvar ctx = __self__; // this line disable service worker support temporarily\nexports = ctx.fetch // To enable: import fetch from 'cross-fetch'\nexports.default = ctx.fetch // For TypeScript consumers without esModuleInterop.\nexports.fetch = ctx.fetch // To enable: import {fetch} from 'cross-fetch'\nexports.Headers = ctx.Headers\nexports.Request = ctx.Request\nexports.Response = ctx.Response\nmodule.exports = exports\n","\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stringify = stringify;\nconst event_emitter_promisify_1 = require(\"event-emitter-promisify\");\nfunction stringify(ee) {\n return __awaiter(this, void 0, void 0, function* () {\n let str = '';\n ee.on('data', (chunk) => {\n str += chunk;\n });\n yield (0, event_emitter_promisify_1.promisifyEventEmitter)(ee);\n return str;\n });\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SaxesParser = exports.EVENTS = void 0;\nconst ed5 = require(\"xmlchars/xml/1.0/ed5\");\nconst ed2 = require(\"xmlchars/xml/1.1/ed2\");\nconst NSed3 = require(\"xmlchars/xmlns/1.0/ed3\");\nvar isS = ed5.isS;\nvar isChar10 = ed5.isChar;\nvar isNameStartChar = ed5.isNameStartChar;\nvar isNameChar = ed5.isNameChar;\nvar S_LIST = ed5.S_LIST;\nvar NAME_RE = ed5.NAME_RE;\nvar isChar11 = ed2.isChar;\nvar isNCNameStartChar = NSed3.isNCNameStartChar;\nvar isNCNameChar = NSed3.isNCNameChar;\nvar NC_NAME_RE = NSed3.NC_NAME_RE;\nconst XML_NAMESPACE = \"http://www.w3.org/XML/1998/namespace\";\nconst XMLNS_NAMESPACE = \"http://www.w3.org/2000/xmlns/\";\nconst rootNS = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment\n __proto__: null,\n xml: XML_NAMESPACE,\n xmlns: XMLNS_NAMESPACE,\n};\nconst XML_ENTITIES = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment\n __proto__: null,\n amp: \"&\",\n gt: \">\",\n lt: \"<\",\n quot: \"\\\"\",\n apos: \"'\",\n};\n// EOC: end-of-chunk\nconst EOC = -1;\nconst NL_LIKE = -2;\nconst S_BEGIN = 0; // Initial state.\nconst S_BEGIN_WHITESPACE = 1; // leading whitespace\nconst S_DOCTYPE = 2; // \nconst TAB = 9;\nconst NL = 0xA;\nconst CR = 0xD;\nconst SPACE = 0x20;\nconst BANG = 0x21;\nconst DQUOTE = 0x22;\nconst AMP = 0x26;\nconst SQUOTE = 0x27;\nconst MINUS = 0x2D;\nconst FORWARD_SLASH = 0x2F;\nconst SEMICOLON = 0x3B;\nconst LESS = 0x3C;\nconst EQUAL = 0x3D;\nconst GREATER = 0x3E;\nconst QUESTION = 0x3F;\nconst OPEN_BRACKET = 0x5B;\nconst CLOSE_BRACKET = 0x5D;\nconst NEL = 0x85;\nconst LS = 0x2028; // Line Separator\nconst isQuote = (c) => c === DQUOTE || c === SQUOTE;\nconst QUOTES = [DQUOTE, SQUOTE];\nconst DOCTYPE_TERMINATOR = [...QUOTES, OPEN_BRACKET, GREATER];\nconst DTD_TERMINATOR = [...QUOTES, LESS, CLOSE_BRACKET];\nconst XML_DECL_NAME_TERMINATOR = [EQUAL, QUESTION, ...S_LIST];\nconst ATTRIB_VALUE_UNQUOTED_TERMINATOR = [...S_LIST, GREATER, AMP, LESS];\nfunction nsPairCheck(parser, prefix, uri) {\n switch (prefix) {\n case \"xml\":\n if (uri !== XML_NAMESPACE) {\n parser.fail(`xml prefix must be bound to ${XML_NAMESPACE}.`);\n }\n break;\n case \"xmlns\":\n if (uri !== XMLNS_NAMESPACE) {\n parser.fail(`xmlns prefix must be bound to ${XMLNS_NAMESPACE}.`);\n }\n break;\n default:\n }\n switch (uri) {\n case XMLNS_NAMESPACE:\n parser.fail(prefix === \"\" ?\n `the default namespace may not be set to ${uri}.` :\n `may not assign a prefix (even \"xmlns\") to the URI \\\n${XMLNS_NAMESPACE}.`);\n break;\n case XML_NAMESPACE:\n switch (prefix) {\n case \"xml\":\n // Assinging the XML namespace to \"xml\" is fine.\n break;\n case \"\":\n parser.fail(`the default namespace may not be set to ${uri}.`);\n break;\n default:\n parser.fail(\"may not assign the xml namespace to another prefix.\");\n }\n break;\n default:\n }\n}\nfunction nsMappingCheck(parser, mapping) {\n for (const local of Object.keys(mapping)) {\n nsPairCheck(parser, local, mapping[local]);\n }\n}\nconst isNCName = (name) => NC_NAME_RE.test(name);\nconst isName = (name) => NAME_RE.test(name);\nconst FORBIDDEN_START = 0;\nconst FORBIDDEN_BRACKET = 1;\nconst FORBIDDEN_BRACKET_BRACKET = 2;\n/**\n * The list of supported events.\n */\nexports.EVENTS = [\n \"xmldecl\",\n \"text\",\n \"processinginstruction\",\n \"doctype\",\n \"comment\",\n \"opentagstart\",\n \"attribute\",\n \"opentag\",\n \"closetag\",\n \"cdata\",\n \"error\",\n \"end\",\n \"ready\",\n];\nconst EVENT_NAME_TO_HANDLER_NAME = {\n xmldecl: \"xmldeclHandler\",\n text: \"textHandler\",\n processinginstruction: \"piHandler\",\n doctype: \"doctypeHandler\",\n comment: \"commentHandler\",\n opentagstart: \"openTagStartHandler\",\n attribute: \"attributeHandler\",\n opentag: \"openTagHandler\",\n closetag: \"closeTagHandler\",\n cdata: \"cdataHandler\",\n error: \"errorHandler\",\n end: \"endHandler\",\n ready: \"readyHandler\",\n};\n// eslint-disable-next-line @typescript-eslint/ban-types\nclass SaxesParser {\n /**\n * Indicates whether or not the parser is closed. If ``true``, wait for\n * the ``ready`` event to write again.\n */\n get closed() {\n return this._closed;\n }\n /**\n * @param opt The parser options.\n */\n constructor(opt) {\n this.opt = opt !== null && opt !== void 0 ? opt : {};\n this.fragmentOpt = !!this.opt.fragment;\n const xmlnsOpt = this.xmlnsOpt = !!this.opt.xmlns;\n this.trackPosition = this.opt.position !== false;\n this.fileName = this.opt.fileName;\n if (xmlnsOpt) {\n // This is the function we use to perform name checks on PIs and entities.\n // When namespaces are used, colons are not allowed in PI target names or\n // entity names. So the check depends on whether namespaces are used. See:\n //\n // https://www.w3.org/XML/xml-names-19990114-errata.html\n // NE08\n //\n this.nameStartCheck = isNCNameStartChar;\n this.nameCheck = isNCNameChar;\n this.isName = isNCName;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.processAttribs = this.processAttribsNS;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.pushAttrib = this.pushAttribNS;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment\n this.ns = Object.assign({ __proto__: null }, rootNS);\n const additional = this.opt.additionalNamespaces;\n if (additional != null) {\n nsMappingCheck(this, additional);\n Object.assign(this.ns, additional);\n }\n }\n else {\n this.nameStartCheck = isNameStartChar;\n this.nameCheck = isNameChar;\n this.isName = isName;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.processAttribs = this.processAttribsPlain;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n this.pushAttrib = this.pushAttribPlain;\n }\n //\n // The order of the members in this table needs to correspond to the state\n // numbers given to the states that correspond to the methods being recorded\n // here.\n //\n this.stateTable = [\n /* eslint-disable @typescript-eslint/unbound-method */\n this.sBegin,\n this.sBeginWhitespace,\n this.sDoctype,\n this.sDoctypeQuote,\n this.sDTD,\n this.sDTDQuoted,\n this.sDTDOpenWaka,\n this.sDTDOpenWakaBang,\n this.sDTDComment,\n this.sDTDCommentEnding,\n this.sDTDCommentEnded,\n this.sDTDPI,\n this.sDTDPIEnding,\n this.sText,\n this.sEntity,\n this.sOpenWaka,\n this.sOpenWakaBang,\n this.sComment,\n this.sCommentEnding,\n this.sCommentEnded,\n this.sCData,\n this.sCDataEnding,\n this.sCDataEnding2,\n this.sPIFirstChar,\n this.sPIRest,\n this.sPIBody,\n this.sPIEnding,\n this.sXMLDeclNameStart,\n this.sXMLDeclName,\n this.sXMLDeclEq,\n this.sXMLDeclValueStart,\n this.sXMLDeclValue,\n this.sXMLDeclSeparator,\n this.sXMLDeclEnding,\n this.sOpenTag,\n this.sOpenTagSlash,\n this.sAttrib,\n this.sAttribName,\n this.sAttribNameSawWhite,\n this.sAttribValue,\n this.sAttribValueQuoted,\n this.sAttribValueClosed,\n this.sAttribValueUnquoted,\n this.sCloseTag,\n this.sCloseTagSawWhite,\n /* eslint-enable @typescript-eslint/unbound-method */\n ];\n this._init();\n }\n _init() {\n var _a;\n this.openWakaBang = \"\";\n this.text = \"\";\n this.name = \"\";\n this.piTarget = \"\";\n this.entity = \"\";\n this.q = null;\n this.tags = [];\n this.tag = null;\n this.topNS = null;\n this.chunk = \"\";\n this.chunkPosition = 0;\n this.i = 0;\n this.prevI = 0;\n this.carriedFromPrevious = undefined;\n this.forbiddenState = FORBIDDEN_START;\n this.attribList = [];\n // The logic is organized so as to minimize the need to check\n // this.opt.fragment while parsing.\n const { fragmentOpt } = this;\n this.state = fragmentOpt ? S_TEXT : S_BEGIN;\n // We want these to be all true if we are dealing with a fragment.\n this.reportedTextBeforeRoot = this.reportedTextAfterRoot = this.closedRoot =\n this.sawRoot = fragmentOpt;\n // An XML declaration is intially possible only when parsing whole\n // documents.\n this.xmlDeclPossible = !fragmentOpt;\n this.xmlDeclExpects = [\"version\"];\n this.entityReturnState = undefined;\n let { defaultXMLVersion } = this.opt;\n if (defaultXMLVersion === undefined) {\n if (this.opt.forceXMLVersion === true) {\n throw new Error(\"forceXMLVersion set but defaultXMLVersion is not set\");\n }\n defaultXMLVersion = \"1.0\";\n }\n this.setXMLVersion(defaultXMLVersion);\n this.positionAtNewLine = 0;\n this.doctype = false;\n this._closed = false;\n this.xmlDecl = {\n version: undefined,\n encoding: undefined,\n standalone: undefined,\n };\n this.line = 1;\n this.column = 0;\n this.ENTITIES = Object.create(XML_ENTITIES);\n (_a = this.readyHandler) === null || _a === void 0 ? void 0 : _a.call(this);\n }\n /**\n * The stream position the parser is currently looking at. This field is\n * zero-based.\n *\n * This field is not based on counting Unicode characters but is to be\n * interpreted as a plain index into a JavaScript string.\n */\n get position() {\n return this.chunkPosition + this.i;\n }\n /**\n * The column number of the next character to be read by the parser. *\n * This field is zero-based. (The first column in a line is 0.)\n *\n * This field reports the index at which the next character would be in the\n * line if the line were represented as a JavaScript string. Note that this\n * *can* be different to a count based on the number of *Unicode characters*\n * due to how JavaScript handles astral plane characters.\n *\n * See [[column]] for a number that corresponds to a count of Unicode\n * characters.\n */\n get columnIndex() {\n return this.position - this.positionAtNewLine;\n }\n /**\n * Set an event listener on an event. The parser supports one handler per\n * event type. If you try to set an event handler over an existing handler,\n * the old handler is silently overwritten.\n *\n * @param name The event to listen to.\n *\n * @param handler The handler to set.\n */\n on(name, handler) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n this[EVENT_NAME_TO_HANDLER_NAME[name]] = handler;\n }\n /**\n * Unset an event handler.\n *\n * @parma name The event to stop listening to.\n */\n off(name) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n this[EVENT_NAME_TO_HANDLER_NAME[name]] = undefined;\n }\n /**\n * Make an error object. The error object will have a message that contains\n * the ``fileName`` option passed at the creation of the parser. If position\n * tracking was turned on, it will also have line and column number\n * information.\n *\n * @param message The message describing the error to report.\n *\n * @returns An error object with a properly formatted message.\n */\n makeError(message) {\n var _a;\n let msg = (_a = this.fileName) !== null && _a !== void 0 ? _a : \"\";\n if (this.trackPosition) {\n if (msg.length > 0) {\n msg += \":\";\n }\n msg += `${this.line}:${this.column}`;\n }\n if (msg.length > 0) {\n msg += \": \";\n }\n return new Error(msg + message);\n }\n /**\n * Report a parsing error. This method is made public so that client code may\n * check for issues that are outside the scope of this project and can report\n * errors.\n *\n * @param message The error to report.\n *\n * @returns this\n */\n fail(message) {\n const err = this.makeError(message);\n const handler = this.errorHandler;\n if (handler === undefined) {\n throw err;\n }\n else {\n handler(err);\n }\n return this;\n }\n /**\n * Write a XML data to the parser.\n *\n * @param chunk The XML data to write.\n *\n * @returns this\n */\n // We do need object for the type here. Yes, it often causes problems\n // but not in this case.\n write(chunk) {\n if (this.closed) {\n return this.fail(\"cannot write after close; assign an onready handler.\");\n }\n let end = false;\n if (chunk === null) {\n // We cannot return immediately because carriedFromPrevious may need\n // processing.\n end = true;\n chunk = \"\";\n }\n else if (typeof chunk === \"object\") {\n chunk = chunk.toString();\n }\n // We checked if performing a pre-decomposition of the string into an array\n // of single complete characters (``Array.from(chunk)``) would be faster\n // than the current repeated calls to ``charCodeAt``. As of August 2018, it\n // isn't. (There may be Node-specific code that would perform faster than\n // ``Array.from`` but don't want to be dependent on Node.)\n if (this.carriedFromPrevious !== undefined) {\n // The previous chunk had char we must carry over.\n chunk = `${this.carriedFromPrevious}${chunk}`;\n this.carriedFromPrevious = undefined;\n }\n let limit = chunk.length;\n const lastCode = chunk.charCodeAt(limit - 1);\n if (!end &&\n // A trailing CR or surrogate must be carried over to the next\n // chunk.\n (lastCode === CR || (lastCode >= 0xD800 && lastCode <= 0xDBFF))) {\n // The chunk ends with a character that must be carried over. We cannot\n // know how to handle it until we get the next chunk or the end of the\n // stream. So save it for later.\n this.carriedFromPrevious = chunk[limit - 1];\n limit--;\n chunk = chunk.slice(0, limit);\n }\n const { stateTable } = this;\n this.chunk = chunk;\n this.i = 0;\n while (this.i < limit) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument\n stateTable[this.state].call(this);\n }\n this.chunkPosition += limit;\n return end ? this.end() : this;\n }\n /**\n * Close the current stream. Perform final well-formedness checks and reset\n * the parser tstate.\n *\n * @returns this\n */\n close() {\n return this.write(null);\n }\n /**\n * Get a single code point out of the current chunk. This updates the current\n * position if we do position tracking.\n *\n * This is the algorithm to use for XML 1.0.\n *\n * @returns The character read.\n */\n getCode10() {\n const { chunk, i } = this;\n this.prevI = i;\n // Yes, we do this instead of doing this.i++. Doing it this way, we do not\n // read this.i again, which is a bit faster.\n this.i = i + 1;\n if (i >= chunk.length) {\n return EOC;\n }\n // Using charCodeAt and handling the surrogates ourselves is faster\n // than using codePointAt.\n const code = chunk.charCodeAt(i);\n this.column++;\n if (code < 0xD800) {\n if (code >= SPACE || code === TAB) {\n return code;\n }\n switch (code) {\n case NL:\n this.line++;\n this.column = 0;\n this.positionAtNewLine = this.position;\n return NL;\n case CR:\n // We may get NaN if we read past the end of the chunk, which is fine.\n if (chunk.charCodeAt(i + 1) === NL) {\n // A \\r\\n sequence is converted to \\n so we have to skip over the\n // next character. We already know it has a size of 1 so ++ is fine\n // here.\n this.i = i + 2;\n }\n // Otherwise, a \\r is just converted to \\n, so we don't have to skip\n // ahead.\n // In either case, \\r becomes \\n.\n this.line++;\n this.column = 0;\n this.positionAtNewLine = this.position;\n return NL_LIKE;\n default:\n // If we get here, then code < SPACE and it is not NL CR or TAB.\n this.fail(\"disallowed character.\");\n return code;\n }\n }\n if (code > 0xDBFF) {\n // This is a specialized version of isChar10 that takes into account\n // that in this context code > 0xDBFF and code <= 0xFFFF. So it does not\n // test cases that don't need testing.\n if (!(code >= 0xE000 && code <= 0xFFFD)) {\n this.fail(\"disallowed character.\");\n }\n return code;\n }\n const final = 0x10000 + ((code - 0xD800) * 0x400) +\n (chunk.charCodeAt(i + 1) - 0xDC00);\n this.i = i + 2;\n // This is a specialized version of isChar10 that takes into account that in\n // this context necessarily final >= 0x10000.\n if (final > 0x10FFFF) {\n this.fail(\"disallowed character.\");\n }\n return final;\n }\n /**\n * Get a single code point out of the current chunk. This updates the current\n * position if we do position tracking.\n *\n * This is the algorithm to use for XML 1.1.\n *\n * @returns {number} The character read.\n */\n getCode11() {\n const { chunk, i } = this;\n this.prevI = i;\n // Yes, we do this instead of doing this.i++. Doing it this way, we do not\n // read this.i again, which is a bit faster.\n this.i = i + 1;\n if (i >= chunk.length) {\n return EOC;\n }\n // Using charCodeAt and handling the surrogates ourselves is faster\n // than using codePointAt.\n const code = chunk.charCodeAt(i);\n this.column++;\n if (code < 0xD800) {\n if ((code > 0x1F && code < 0x7F) || (code > 0x9F && code !== LS) ||\n code === TAB) {\n return code;\n }\n switch (code) {\n case NL: // 0xA\n this.line++;\n this.column = 0;\n this.positionAtNewLine = this.position;\n return NL;\n case CR: { // 0xD\n // We may get NaN if we read past the end of the chunk, which is\n // fine.\n const next = chunk.charCodeAt(i + 1);\n if (next === NL || next === NEL) {\n // A CR NL or CR NEL sequence is converted to NL so we have to skip\n // over the next character. We already know it has a size of 1.\n this.i = i + 2;\n }\n // Otherwise, a CR is just converted to NL, no skip.\n }\n /* yes, fall through */\n case NEL: // 0x85\n case LS: // Ox2028\n this.line++;\n this.column = 0;\n this.positionAtNewLine = this.position;\n return NL_LIKE;\n default:\n this.fail(\"disallowed character.\");\n return code;\n }\n }\n if (code > 0xDBFF) {\n // This is a specialized version of isCharAndNotRestricted that takes into\n // account that in this context code > 0xDBFF and code <= 0xFFFF. So it\n // does not test cases that don't need testing.\n if (!(code >= 0xE000 && code <= 0xFFFD)) {\n this.fail(\"disallowed character.\");\n }\n return code;\n }\n const final = 0x10000 + ((code - 0xD800) * 0x400) +\n (chunk.charCodeAt(i + 1) - 0xDC00);\n this.i = i + 2;\n // This is a specialized version of isCharAndNotRestricted that takes into\n // account that in this context necessarily final >= 0x10000.\n if (final > 0x10FFFF) {\n this.fail(\"disallowed character.\");\n }\n return final;\n }\n /**\n * Like ``getCode`` but with the return value normalized so that ``NL`` is\n * returned for ``NL_LIKE``.\n */\n getCodeNorm() {\n const c = this.getCode();\n return c === NL_LIKE ? NL : c;\n }\n unget() {\n this.i = this.prevI;\n this.column--;\n }\n /**\n * Capture characters into a buffer until encountering one of a set of\n * characters.\n *\n * @param chars An array of codepoints. Encountering a character in the array\n * ends the capture. (``chars`` may safely contain ``NL``.)\n *\n * @return The character code that made the capture end, or ``EOC`` if we hit\n * the end of the chunk. The return value cannot be NL_LIKE: NL is returned\n * instead.\n */\n captureTo(chars) {\n let { i: start } = this;\n const { chunk } = this;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const c = this.getCode();\n const isNLLike = c === NL_LIKE;\n const final = isNLLike ? NL : c;\n if (final === EOC || chars.includes(final)) {\n this.text += chunk.slice(start, this.prevI);\n return final;\n }\n if (isNLLike) {\n this.text += `${chunk.slice(start, this.prevI)}\\n`;\n start = this.i;\n }\n }\n }\n /**\n * Capture characters into a buffer until encountering a character.\n *\n * @param char The codepoint that ends the capture. **NOTE ``char`` MAY NOT\n * CONTAIN ``NL``.** Passing ``NL`` will result in buggy behavior.\n *\n * @return ``true`` if we ran into the character. Otherwise, we ran into the\n * end of the current chunk.\n */\n captureToChar(char) {\n let { i: start } = this;\n const { chunk } = this;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n let c = this.getCode();\n switch (c) {\n case NL_LIKE:\n this.text += `${chunk.slice(start, this.prevI)}\\n`;\n start = this.i;\n c = NL;\n break;\n case EOC:\n this.text += chunk.slice(start);\n return false;\n default:\n }\n if (c === char) {\n this.text += chunk.slice(start, this.prevI);\n return true;\n }\n }\n }\n /**\n * Capture characters that satisfy ``isNameChar`` into the ``name`` field of\n * this parser.\n *\n * @return The character code that made the test fail, or ``EOC`` if we hit\n * the end of the chunk. The return value cannot be NL_LIKE: NL is returned\n * instead.\n */\n captureNameChars() {\n const { chunk, i: start } = this;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const c = this.getCode();\n if (c === EOC) {\n this.name += chunk.slice(start);\n return EOC;\n }\n // NL is not a name char so we don't have to test specifically for it.\n if (!isNameChar(c)) {\n this.name += chunk.slice(start, this.prevI);\n return c === NL_LIKE ? NL : c;\n }\n }\n }\n /**\n * Skip white spaces.\n *\n * @return The character that ended the skip, or ``EOC`` if we hit\n * the end of the chunk. The return value cannot be NL_LIKE: NL is returned\n * instead.\n */\n skipSpaces() {\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const c = this.getCodeNorm();\n if (c === EOC || !isS(c)) {\n return c;\n }\n }\n }\n setXMLVersion(version) {\n this.currentXMLVersion = version;\n /* eslint-disable @typescript-eslint/unbound-method */\n if (version === \"1.0\") {\n this.isChar = isChar10;\n this.getCode = this.getCode10;\n }\n else {\n this.isChar = isChar11;\n this.getCode = this.getCode11;\n }\n /* eslint-enable @typescript-eslint/unbound-method */\n }\n // STATE ENGINE METHODS\n // This needs to be a state separate from S_BEGIN_WHITESPACE because we want\n // to be sure never to come back to this state later.\n sBegin() {\n // We are essentially peeking at the first character of the chunk. Since\n // S_BEGIN can be in effect only when we start working on the first chunk,\n // the index at which we must look is necessarily 0. Note also that the\n // following test does not depend on decoding surrogates.\n // If the initial character is 0xFEFF, ignore it.\n if (this.chunk.charCodeAt(0) === 0xFEFF) {\n this.i++;\n this.column++;\n }\n this.state = S_BEGIN_WHITESPACE;\n }\n sBeginWhitespace() {\n // We need to know whether we've encountered spaces or not because as soon\n // as we run into a space, an XML declaration is no longer possible. Rather\n // than slow down skipSpaces even in places where we don't care whether it\n // skipped anything or not, we check whether prevI is equal to the value of\n // i from before we skip spaces.\n const iBefore = this.i;\n const c = this.skipSpaces();\n if (this.prevI !== iBefore) {\n this.xmlDeclPossible = false;\n }\n switch (c) {\n case LESS:\n this.state = S_OPEN_WAKA;\n // We could naively call closeText but in this state, it is not normal\n // to have text be filled with any data.\n if (this.text.length !== 0) {\n throw new Error(\"no-empty text at start\");\n }\n break;\n case EOC:\n break;\n default:\n this.unget();\n this.state = S_TEXT;\n this.xmlDeclPossible = false;\n }\n }\n sDoctype() {\n var _a;\n const c = this.captureTo(DOCTYPE_TERMINATOR);\n switch (c) {\n case GREATER: {\n (_a = this.doctypeHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.text);\n this.text = \"\";\n this.state = S_TEXT;\n this.doctype = true; // just remember that we saw it.\n break;\n }\n case EOC:\n break;\n default:\n this.text += String.fromCodePoint(c);\n if (c === OPEN_BRACKET) {\n this.state = S_DTD;\n }\n else if (isQuote(c)) {\n this.state = S_DOCTYPE_QUOTE;\n this.q = c;\n }\n }\n }\n sDoctypeQuote() {\n const q = this.q;\n if (this.captureToChar(q)) {\n this.text += String.fromCodePoint(q);\n this.q = null;\n this.state = S_DOCTYPE;\n }\n }\n sDTD() {\n const c = this.captureTo(DTD_TERMINATOR);\n if (c === EOC) {\n return;\n }\n this.text += String.fromCodePoint(c);\n if (c === CLOSE_BRACKET) {\n this.state = S_DOCTYPE;\n }\n else if (c === LESS) {\n this.state = S_DTD_OPEN_WAKA;\n }\n else if (isQuote(c)) {\n this.state = S_DTD_QUOTED;\n this.q = c;\n }\n }\n sDTDQuoted() {\n const q = this.q;\n if (this.captureToChar(q)) {\n this.text += String.fromCodePoint(q);\n this.state = S_DTD;\n this.q = null;\n }\n }\n sDTDOpenWaka() {\n const c = this.getCodeNorm();\n this.text += String.fromCodePoint(c);\n switch (c) {\n case BANG:\n this.state = S_DTD_OPEN_WAKA_BANG;\n this.openWakaBang = \"\";\n break;\n case QUESTION:\n this.state = S_DTD_PI;\n break;\n default:\n this.state = S_DTD;\n }\n }\n sDTDOpenWakaBang() {\n const char = String.fromCodePoint(this.getCodeNorm());\n const owb = this.openWakaBang += char;\n this.text += char;\n if (owb !== \"-\") {\n this.state = owb === \"--\" ? S_DTD_COMMENT : S_DTD;\n this.openWakaBang = \"\";\n }\n }\n sDTDComment() {\n if (this.captureToChar(MINUS)) {\n this.text += \"-\";\n this.state = S_DTD_COMMENT_ENDING;\n }\n }\n sDTDCommentEnding() {\n const c = this.getCodeNorm();\n this.text += String.fromCodePoint(c);\n this.state = c === MINUS ? S_DTD_COMMENT_ENDED : S_DTD_COMMENT;\n }\n sDTDCommentEnded() {\n const c = this.getCodeNorm();\n this.text += String.fromCodePoint(c);\n if (c === GREATER) {\n this.state = S_DTD;\n }\n else {\n this.fail(\"malformed comment.\");\n // will be recorded as\n // a comment of \" blah -- bloo \"\n this.state = S_DTD_COMMENT;\n }\n }\n sDTDPI() {\n if (this.captureToChar(QUESTION)) {\n this.text += \"?\";\n this.state = S_DTD_PI_ENDING;\n }\n }\n sDTDPIEnding() {\n const c = this.getCodeNorm();\n this.text += String.fromCodePoint(c);\n if (c === GREATER) {\n this.state = S_DTD;\n }\n }\n sText() {\n //\n // We did try a version of saxes where the S_TEXT state was split in two\n // states: one for text inside the root element, and one for text\n // outside. This was avoiding having to test this.tags.length to decide\n // what implementation to actually use.\n //\n // Peformance testing on gigabyte-size files did not show any advantage to\n // using the two states solution instead of the current one. Conversely, it\n // made the code a bit more complicated elsewhere. For instance, a comment\n // can appear before the root element so when a comment ended it was\n // necessary to determine whether to return to the S_TEXT state or to the\n // new text-outside-root state.\n //\n if (this.tags.length !== 0) {\n this.handleTextInRoot();\n }\n else {\n this.handleTextOutsideRoot();\n }\n }\n sEntity() {\n // This is essentially a specialized version of captureToChar(SEMICOLON...)\n let { i: start } = this;\n const { chunk } = this;\n // eslint-disable-next-line no-labels, no-restricted-syntax\n loop: \n // eslint-disable-next-line no-constant-condition\n while (true) {\n switch (this.getCode()) {\n case NL_LIKE:\n this.entity += `${chunk.slice(start, this.prevI)}\\n`;\n start = this.i;\n break;\n case SEMICOLON: {\n const { entityReturnState } = this;\n const entity = this.entity + chunk.slice(start, this.prevI);\n this.state = entityReturnState;\n let parsed;\n if (entity === \"\") {\n this.fail(\"empty entity name.\");\n parsed = \"&;\";\n }\n else {\n parsed = this.parseEntity(entity);\n this.entity = \"\";\n }\n if (entityReturnState !== S_TEXT || this.textHandler !== undefined) {\n this.text += parsed;\n }\n // eslint-disable-next-line no-labels\n break loop;\n }\n case EOC:\n this.entity += chunk.slice(start);\n // eslint-disable-next-line no-labels\n break loop;\n default:\n }\n }\n }\n sOpenWaka() {\n // Reminder: a state handler is called with at least one character\n // available in the current chunk. So the first call to get code inside of\n // a state handler cannot return ``EOC``. That's why we don't test\n // for it.\n const c = this.getCode();\n // either a /, ?, !, or text is coming next.\n if (isNameStartChar(c)) {\n this.state = S_OPEN_TAG;\n this.unget();\n this.xmlDeclPossible = false;\n }\n else {\n switch (c) {\n case FORWARD_SLASH:\n this.state = S_CLOSE_TAG;\n this.xmlDeclPossible = false;\n break;\n case BANG:\n this.state = S_OPEN_WAKA_BANG;\n this.openWakaBang = \"\";\n this.xmlDeclPossible = false;\n break;\n case QUESTION:\n this.state = S_PI_FIRST_CHAR;\n break;\n default:\n this.fail(\"disallowed character in tag name\");\n this.state = S_TEXT;\n this.xmlDeclPossible = false;\n }\n }\n }\n sOpenWakaBang() {\n this.openWakaBang += String.fromCodePoint(this.getCodeNorm());\n switch (this.openWakaBang) {\n case \"[CDATA[\":\n if (!this.sawRoot && !this.reportedTextBeforeRoot) {\n this.fail(\"text data outside of root node.\");\n this.reportedTextBeforeRoot = true;\n }\n if (this.closedRoot && !this.reportedTextAfterRoot) {\n this.fail(\"text data outside of root node.\");\n this.reportedTextAfterRoot = true;\n }\n this.state = S_CDATA;\n this.openWakaBang = \"\";\n break;\n case \"--\":\n this.state = S_COMMENT;\n this.openWakaBang = \"\";\n break;\n case \"DOCTYPE\":\n this.state = S_DOCTYPE;\n if (this.doctype || this.sawRoot) {\n this.fail(\"inappropriately located doctype declaration.\");\n }\n this.openWakaBang = \"\";\n break;\n default:\n // 7 happens to be the maximum length of the string that can possibly\n // match one of the cases above.\n if (this.openWakaBang.length >= 7) {\n this.fail(\"incorrect syntax.\");\n }\n }\n }\n sComment() {\n if (this.captureToChar(MINUS)) {\n this.state = S_COMMENT_ENDING;\n }\n }\n sCommentEnding() {\n var _a;\n const c = this.getCodeNorm();\n if (c === MINUS) {\n this.state = S_COMMENT_ENDED;\n (_a = this.commentHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.text);\n this.text = \"\";\n }\n else {\n this.text += `-${String.fromCodePoint(c)}`;\n this.state = S_COMMENT;\n }\n }\n sCommentEnded() {\n const c = this.getCodeNorm();\n if (c !== GREATER) {\n this.fail(\"malformed comment.\");\n // will be recorded as\n // a comment of \" blah -- bloo \"\n this.text += `--${String.fromCodePoint(c)}`;\n this.state = S_COMMENT;\n }\n else {\n this.state = S_TEXT;\n }\n }\n sCData() {\n if (this.captureToChar(CLOSE_BRACKET)) {\n this.state = S_CDATA_ENDING;\n }\n }\n sCDataEnding() {\n const c = this.getCodeNorm();\n if (c === CLOSE_BRACKET) {\n this.state = S_CDATA_ENDING_2;\n }\n else {\n this.text += `]${String.fromCodePoint(c)}`;\n this.state = S_CDATA;\n }\n }\n sCDataEnding2() {\n var _a;\n const c = this.getCodeNorm();\n switch (c) {\n case GREATER: {\n (_a = this.cdataHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.text);\n this.text = \"\";\n this.state = S_TEXT;\n break;\n }\n case CLOSE_BRACKET:\n this.text += \"]\";\n break;\n default:\n this.text += `]]${String.fromCodePoint(c)}`;\n this.state = S_CDATA;\n }\n }\n // We need this separate state to check the first character fo the pi target\n // with this.nameStartCheck which allows less characters than this.nameCheck.\n sPIFirstChar() {\n const c = this.getCodeNorm();\n // This is first because in the case where the file is well-formed this is\n // the branch taken. We optimize for well-formedness.\n if (this.nameStartCheck(c)) {\n this.piTarget += String.fromCodePoint(c);\n this.state = S_PI_REST;\n }\n else if (c === QUESTION || isS(c)) {\n this.fail(\"processing instruction without a target.\");\n this.state = c === QUESTION ? S_PI_ENDING : S_PI_BODY;\n }\n else {\n this.fail(\"disallowed character in processing instruction name.\");\n this.piTarget += String.fromCodePoint(c);\n this.state = S_PI_REST;\n }\n }\n sPIRest() {\n // Capture characters into a piTarget while ``this.nameCheck`` run on the\n // character read returns true.\n const { chunk, i: start } = this;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const c = this.getCodeNorm();\n if (c === EOC) {\n this.piTarget += chunk.slice(start);\n return;\n }\n // NL cannot satisfy this.nameCheck so we don't have to test specifically\n // for it.\n if (!this.nameCheck(c)) {\n this.piTarget += chunk.slice(start, this.prevI);\n const isQuestion = c === QUESTION;\n if (isQuestion || isS(c)) {\n if (this.piTarget === \"xml\") {\n if (!this.xmlDeclPossible) {\n this.fail(\"an XML declaration must be at the start of the document.\");\n }\n this.state = isQuestion ? S_XML_DECL_ENDING : S_XML_DECL_NAME_START;\n }\n else {\n this.state = isQuestion ? S_PI_ENDING : S_PI_BODY;\n }\n }\n else {\n this.fail(\"disallowed character in processing instruction name.\");\n this.piTarget += String.fromCodePoint(c);\n }\n break;\n }\n }\n }\n sPIBody() {\n if (this.text.length === 0) {\n const c = this.getCodeNorm();\n if (c === QUESTION) {\n this.state = S_PI_ENDING;\n }\n else if (!isS(c)) {\n this.text = String.fromCodePoint(c);\n }\n }\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n else if (this.captureToChar(QUESTION)) {\n this.state = S_PI_ENDING;\n }\n }\n sPIEnding() {\n var _a;\n const c = this.getCodeNorm();\n if (c === GREATER) {\n const { piTarget } = this;\n if (piTarget.toLowerCase() === \"xml\") {\n this.fail(\"the XML declaration must appear at the start of the document.\");\n }\n (_a = this.piHandler) === null || _a === void 0 ? void 0 : _a.call(this, {\n target: piTarget,\n body: this.text,\n });\n this.piTarget = this.text = \"\";\n this.state = S_TEXT;\n }\n else if (c === QUESTION) {\n // We ran into ?? as part of a processing instruction. We initially took\n // the first ? as a sign that the PI was ending, but it is not. So we have\n // to add it to the body but we take the new ? as a sign that the PI is\n // ending.\n this.text += \"?\";\n }\n else {\n this.text += `?${String.fromCodePoint(c)}`;\n this.state = S_PI_BODY;\n }\n this.xmlDeclPossible = false;\n }\n sXMLDeclNameStart() {\n const c = this.skipSpaces();\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n if (c === QUESTION) {\n // It is valid to go to S_XML_DECL_ENDING from this state.\n this.state = S_XML_DECL_ENDING;\n return;\n }\n if (c !== EOC) {\n this.state = S_XML_DECL_NAME;\n this.name = String.fromCodePoint(c);\n }\n }\n sXMLDeclName() {\n const c = this.captureTo(XML_DECL_NAME_TERMINATOR);\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n if (c === QUESTION) {\n this.state = S_XML_DECL_ENDING;\n this.name += this.text;\n this.text = \"\";\n this.fail(\"XML declaration is incomplete.\");\n return;\n }\n if (!(isS(c) || c === EQUAL)) {\n return;\n }\n this.name += this.text;\n this.text = \"\";\n if (!this.xmlDeclExpects.includes(this.name)) {\n switch (this.name.length) {\n case 0:\n this.fail(\"did not expect any more name/value pairs.\");\n break;\n case 1:\n this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);\n break;\n default:\n this.fail(`expected one of ${this.xmlDeclExpects.join(\", \")}`);\n }\n }\n this.state = c === EQUAL ? S_XML_DECL_VALUE_START : S_XML_DECL_EQ;\n }\n sXMLDeclEq() {\n const c = this.getCodeNorm();\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n if (c === QUESTION) {\n this.state = S_XML_DECL_ENDING;\n this.fail(\"XML declaration is incomplete.\");\n return;\n }\n if (isS(c)) {\n return;\n }\n if (c !== EQUAL) {\n this.fail(\"value required.\");\n }\n this.state = S_XML_DECL_VALUE_START;\n }\n sXMLDeclValueStart() {\n const c = this.getCodeNorm();\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n if (c === QUESTION) {\n this.state = S_XML_DECL_ENDING;\n this.fail(\"XML declaration is incomplete.\");\n return;\n }\n if (isS(c)) {\n return;\n }\n if (!isQuote(c)) {\n this.fail(\"value must be quoted.\");\n this.q = SPACE;\n }\n else {\n this.q = c;\n }\n this.state = S_XML_DECL_VALUE;\n }\n sXMLDeclValue() {\n const c = this.captureTo([this.q, QUESTION]);\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n if (c === QUESTION) {\n this.state = S_XML_DECL_ENDING;\n this.text = \"\";\n this.fail(\"XML declaration is incomplete.\");\n return;\n }\n if (c === EOC) {\n return;\n }\n const value = this.text;\n this.text = \"\";\n switch (this.name) {\n case \"version\": {\n this.xmlDeclExpects = [\"encoding\", \"standalone\"];\n const version = value;\n this.xmlDecl.version = version;\n // This is the test specified by XML 1.0 but it is fine for XML 1.1.\n if (!/^1\\.[0-9]+$/.test(version)) {\n this.fail(\"version number must match /^1\\\\.[0-9]+$/.\");\n }\n // When forceXMLVersion is set, the XML declaration is ignored.\n else if (!this.opt.forceXMLVersion) {\n this.setXMLVersion(version);\n }\n break;\n }\n case \"encoding\":\n if (!/^[A-Za-z][A-Za-z0-9._-]*$/.test(value)) {\n this.fail(\"encoding value must match \\\n/^[A-Za-z0-9][A-Za-z0-9._-]*$/.\");\n }\n this.xmlDeclExpects = [\"standalone\"];\n this.xmlDecl.encoding = value;\n break;\n case \"standalone\":\n if (value !== \"yes\" && value !== \"no\") {\n this.fail(\"standalone value must match \\\"yes\\\" or \\\"no\\\".\");\n }\n this.xmlDeclExpects = [];\n this.xmlDecl.standalone = value;\n break;\n default:\n // We don't need to raise an error here since we've already raised one\n // when checking what name was expected.\n }\n this.name = \"\";\n this.state = S_XML_DECL_SEPARATOR;\n }\n sXMLDeclSeparator() {\n const c = this.getCodeNorm();\n // The question mark character is not valid inside any of the XML\n // declaration name/value pairs.\n if (c === QUESTION) {\n // It is valid to go to S_XML_DECL_ENDING from this state.\n this.state = S_XML_DECL_ENDING;\n return;\n }\n if (!isS(c)) {\n this.fail(\"whitespace required.\");\n this.unget();\n }\n this.state = S_XML_DECL_NAME_START;\n }\n sXMLDeclEnding() {\n var _a;\n const c = this.getCodeNorm();\n if (c === GREATER) {\n if (this.piTarget !== \"xml\") {\n this.fail(\"processing instructions are not allowed before root.\");\n }\n else if (this.name !== \"version\" &&\n this.xmlDeclExpects.includes(\"version\")) {\n this.fail(\"XML declaration must contain a version.\");\n }\n (_a = this.xmldeclHandler) === null || _a === void 0 ? void 0 : _a.call(this, this.xmlDecl);\n this.name = \"\";\n this.piTarget = this.text = \"\";\n this.state = S_TEXT;\n }\n else {\n // We got here because the previous character was a ?, but the question\n // mark character is not valid inside any of the XML declaration\n // name/value pairs.\n this.fail(\"The character ? is disallowed anywhere in XML declarations.\");\n }\n this.xmlDeclPossible = false;\n }\n sOpenTag() {\n var _a;\n const c = this.captureNameChars();\n if (c === EOC) {\n return;\n }\n const tag = this.tag = {\n name: this.name,\n attributes: Object.create(null),\n };\n this.name = \"\";\n if (this.xmlnsOpt) {\n this.topNS = tag.ns = Object.create(null);\n }\n (_a = this.openTagStartHandler) === null || _a === void 0 ? void 0 : _a.call(this, tag);\n this.sawRoot = true;\n if (!this.fragmentOpt && this.closedRoot) {\n this.fail(\"documents may contain only one root.\");\n }\n switch (c) {\n case GREATER:\n this.openTag();\n break;\n case FORWARD_SLASH:\n this.state = S_OPEN_TAG_SLASH;\n break;\n default:\n if (!isS(c)) {\n this.fail(\"disallowed character in tag name.\");\n }\n this.state = S_ATTRIB;\n }\n }\n sOpenTagSlash() {\n if (this.getCode() === GREATER) {\n this.openSelfClosingTag();\n }\n else {\n this.fail(\"forward-slash in opening tag not followed by >.\");\n this.state = S_ATTRIB;\n }\n }\n sAttrib() {\n const c = this.skipSpaces();\n if (c === EOC) {\n return;\n }\n if (isNameStartChar(c)) {\n this.unget();\n this.state = S_ATTRIB_NAME;\n }\n else if (c === GREATER) {\n this.openTag();\n }\n else if (c === FORWARD_SLASH) {\n this.state = S_OPEN_TAG_SLASH;\n }\n else {\n this.fail(\"disallowed character in attribute name.\");\n }\n }\n sAttribName() {\n const c = this.captureNameChars();\n if (c === EQUAL) {\n this.state = S_ATTRIB_VALUE;\n }\n else if (isS(c)) {\n this.state = S_ATTRIB_NAME_SAW_WHITE;\n }\n else if (c === GREATER) {\n this.fail(\"attribute without value.\");\n this.pushAttrib(this.name, this.name);\n this.name = this.text = \"\";\n this.openTag();\n }\n else if (c !== EOC) {\n this.fail(\"disallowed character in attribute name.\");\n }\n }\n sAttribNameSawWhite() {\n const c = this.skipSpaces();\n switch (c) {\n case EOC:\n return;\n case EQUAL:\n this.state = S_ATTRIB_VALUE;\n break;\n default:\n this.fail(\"attribute without value.\");\n // Should we do this???\n // this.tag.attributes[this.name] = \"\";\n this.text = \"\";\n this.name = \"\";\n if (c === GREATER) {\n this.openTag();\n }\n else if (isNameStartChar(c)) {\n this.unget();\n this.state = S_ATTRIB_NAME;\n }\n else {\n this.fail(\"disallowed character in attribute name.\");\n this.state = S_ATTRIB;\n }\n }\n }\n sAttribValue() {\n const c = this.getCodeNorm();\n if (isQuote(c)) {\n this.q = c;\n this.state = S_ATTRIB_VALUE_QUOTED;\n }\n else if (!isS(c)) {\n this.fail(\"unquoted attribute value.\");\n this.state = S_ATTRIB_VALUE_UNQUOTED;\n this.unget();\n }\n }\n sAttribValueQuoted() {\n // We deliberately do not use captureTo here. The specialized code we use\n // here is faster than using captureTo.\n const { q, chunk } = this;\n let { i: start } = this;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n switch (this.getCode()) {\n case q:\n this.pushAttrib(this.name, this.text + chunk.slice(start, this.prevI));\n this.name = this.text = \"\";\n this.q = null;\n this.state = S_ATTRIB_VALUE_CLOSED;\n return;\n case AMP:\n this.text += chunk.slice(start, this.prevI);\n this.state = S_ENTITY;\n this.entityReturnState = S_ATTRIB_VALUE_QUOTED;\n return;\n case NL:\n case NL_LIKE:\n case TAB:\n this.text += `${chunk.slice(start, this.prevI)} `;\n start = this.i;\n break;\n case LESS:\n this.text += chunk.slice(start, this.prevI);\n this.fail(\"disallowed character.\");\n return;\n case EOC:\n this.text += chunk.slice(start);\n return;\n default:\n }\n }\n }\n sAttribValueClosed() {\n const c = this.getCodeNorm();\n if (isS(c)) {\n this.state = S_ATTRIB;\n }\n else if (c === GREATER) {\n this.openTag();\n }\n else if (c === FORWARD_SLASH) {\n this.state = S_OPEN_TAG_SLASH;\n }\n else if (isNameStartChar(c)) {\n this.fail(\"no whitespace between attributes.\");\n this.unget();\n this.state = S_ATTRIB_NAME;\n }\n else {\n this.fail(\"disallowed character in attribute name.\");\n }\n }\n sAttribValueUnquoted() {\n // We don't do anything regarding EOL or space handling for unquoted\n // attributes. We already have failed by the time we get here, and the\n // contract that saxes upholds states that upon failure, it is not safe to\n // rely on the data passed to event handlers (other than\n // ``onerror``). Passing \"bad\" data is not a problem.\n const c = this.captureTo(ATTRIB_VALUE_UNQUOTED_TERMINATOR);\n switch (c) {\n case AMP:\n this.state = S_ENTITY;\n this.entityReturnState = S_ATTRIB_VALUE_UNQUOTED;\n break;\n case LESS:\n this.fail(\"disallowed character.\");\n break;\n case EOC:\n break;\n default:\n if (this.text.includes(\"]]>\")) {\n this.fail(\"the string \\\"]]>\\\" is disallowed in char data.\");\n }\n this.pushAttrib(this.name, this.text);\n this.name = this.text = \"\";\n if (c === GREATER) {\n this.openTag();\n }\n else {\n this.state = S_ATTRIB;\n }\n }\n }\n sCloseTag() {\n const c = this.captureNameChars();\n if (c === GREATER) {\n this.closeTag();\n }\n else if (isS(c)) {\n this.state = S_CLOSE_TAG_SAW_WHITE;\n }\n else if (c !== EOC) {\n this.fail(\"disallowed character in closing tag.\");\n }\n }\n sCloseTagSawWhite() {\n switch (this.skipSpaces()) {\n case GREATER:\n this.closeTag();\n break;\n case EOC:\n break;\n default:\n this.fail(\"disallowed character in closing tag.\");\n }\n }\n // END OF STATE ENGINE METHODS\n handleTextInRoot() {\n // This is essentially a specialized version of captureTo which is optimized\n // for performing the ]]> check. A previous version of this code, checked\n // ``this.text`` for the presence of ]]>. It simplified the code but was\n // very costly when character data contained a lot of entities to be parsed.\n //\n // Since we are using a specialized loop, we also keep track of the presence\n // of ]]> in text data. The sequence ]]> is forbidden to appear as-is.\n //\n let { i: start, forbiddenState } = this;\n const { chunk, textHandler: handler } = this;\n // eslint-disable-next-line no-labels, no-restricted-syntax\n scanLoop: \n // eslint-disable-next-line no-constant-condition\n while (true) {\n switch (this.getCode()) {\n case LESS: {\n this.state = S_OPEN_WAKA;\n if (handler !== undefined) {\n const { text } = this;\n const slice = chunk.slice(start, this.prevI);\n if (text.length !== 0) {\n handler(text + slice);\n this.text = \"\";\n }\n else if (slice.length !== 0) {\n handler(slice);\n }\n }\n forbiddenState = FORBIDDEN_START;\n // eslint-disable-next-line no-labels\n break scanLoop;\n }\n case AMP:\n this.state = S_ENTITY;\n this.entityReturnState = S_TEXT;\n if (handler !== undefined) {\n this.text += chunk.slice(start, this.prevI);\n }\n forbiddenState = FORBIDDEN_START;\n // eslint-disable-next-line no-labels\n break scanLoop;\n case CLOSE_BRACKET:\n switch (forbiddenState) {\n case FORBIDDEN_START:\n forbiddenState = FORBIDDEN_BRACKET;\n break;\n case FORBIDDEN_BRACKET:\n forbiddenState = FORBIDDEN_BRACKET_BRACKET;\n break;\n case FORBIDDEN_BRACKET_BRACKET:\n break;\n default:\n throw new Error(\"impossible state\");\n }\n break;\n case GREATER:\n if (forbiddenState === FORBIDDEN_BRACKET_BRACKET) {\n this.fail(\"the string \\\"]]>\\\" is disallowed in char data.\");\n }\n forbiddenState = FORBIDDEN_START;\n break;\n case NL_LIKE:\n if (handler !== undefined) {\n this.text += `${chunk.slice(start, this.prevI)}\\n`;\n }\n start = this.i;\n forbiddenState = FORBIDDEN_START;\n break;\n case EOC:\n if (handler !== undefined) {\n this.text += chunk.slice(start);\n }\n // eslint-disable-next-line no-labels\n break scanLoop;\n default:\n forbiddenState = FORBIDDEN_START;\n }\n }\n this.forbiddenState = forbiddenState;\n }\n handleTextOutsideRoot() {\n // This is essentially a specialized version of captureTo which is optimized\n // for a specialized task. We keep track of the presence of non-space\n // characters in the text since these are errors when appearing outside the\n // document root element.\n let { i: start } = this;\n const { chunk, textHandler: handler } = this;\n let nonSpace = false;\n // eslint-disable-next-line no-labels, no-restricted-syntax\n outRootLoop: \n // eslint-disable-next-line no-constant-condition\n while (true) {\n const code = this.getCode();\n switch (code) {\n case LESS: {\n this.state = S_OPEN_WAKA;\n if (handler !== undefined) {\n const { text } = this;\n const slice = chunk.slice(start, this.prevI);\n if (text.length !== 0) {\n handler(text + slice);\n this.text = \"\";\n }\n else if (slice.length !== 0) {\n handler(slice);\n }\n }\n // eslint-disable-next-line no-labels\n break outRootLoop;\n }\n case AMP:\n this.state = S_ENTITY;\n this.entityReturnState = S_TEXT;\n if (handler !== undefined) {\n this.text += chunk.slice(start, this.prevI);\n }\n nonSpace = true;\n // eslint-disable-next-line no-labels\n break outRootLoop;\n case NL_LIKE:\n if (handler !== undefined) {\n this.text += `${chunk.slice(start, this.prevI)}\\n`;\n }\n start = this.i;\n break;\n case EOC:\n if (handler !== undefined) {\n this.text += chunk.slice(start);\n }\n // eslint-disable-next-line no-labels\n break outRootLoop;\n default:\n if (!isS(code)) {\n nonSpace = true;\n }\n }\n }\n if (!nonSpace) {\n return;\n }\n // We use the reportedTextBeforeRoot and reportedTextAfterRoot flags\n // to avoid reporting errors for every single character that is out of\n // place.\n if (!this.sawRoot && !this.reportedTextBeforeRoot) {\n this.fail(\"text data outside of root node.\");\n this.reportedTextBeforeRoot = true;\n }\n if (this.closedRoot && !this.reportedTextAfterRoot) {\n this.fail(\"text data outside of root node.\");\n this.reportedTextAfterRoot = true;\n }\n }\n pushAttribNS(name, value) {\n var _a;\n const { prefix, local } = this.qname(name);\n const attr = { name, prefix, local, value };\n this.attribList.push(attr);\n (_a = this.attributeHandler) === null || _a === void 0 ? void 0 : _a.call(this, attr);\n if (prefix === \"xmlns\") {\n const trimmed = value.trim();\n if (this.currentXMLVersion === \"1.0\" && trimmed === \"\") {\n this.fail(\"invalid attempt to undefine prefix in XML 1.0\");\n }\n this.topNS[local] = trimmed;\n nsPairCheck(this, local, trimmed);\n }\n else if (name === \"xmlns\") {\n const trimmed = value.trim();\n this.topNS[\"\"] = trimmed;\n nsPairCheck(this, \"\", trimmed);\n }\n }\n pushAttribPlain(name, value) {\n var _a;\n const attr = { name, value };\n this.attribList.push(attr);\n (_a = this.attributeHandler) === null || _a === void 0 ? void 0 : _a.call(this, attr);\n }\n /**\n * End parsing. This performs final well-formedness checks and resets the\n * parser to a clean state.\n *\n * @returns this\n */\n end() {\n var _a, _b;\n if (!this.sawRoot) {\n this.fail(\"document must contain a root element.\");\n }\n const { tags } = this;\n while (tags.length > 0) {\n const tag = tags.pop();\n this.fail(`unclosed tag: ${tag.name}`);\n }\n if ((this.state !== S_BEGIN) && (this.state !== S_TEXT)) {\n this.fail(\"unexpected end.\");\n }\n const { text } = this;\n if (text.length !== 0) {\n (_a = this.textHandler) === null || _a === void 0 ? void 0 : _a.call(this, text);\n this.text = \"\";\n }\n this._closed = true;\n (_b = this.endHandler) === null || _b === void 0 ? void 0 : _b.call(this);\n this._init();\n return this;\n }\n /**\n * Resolve a namespace prefix.\n *\n * @param prefix The prefix to resolve.\n *\n * @returns The namespace URI or ``undefined`` if the prefix is not defined.\n */\n resolve(prefix) {\n var _a, _b;\n let uri = this.topNS[prefix];\n if (uri !== undefined) {\n return uri;\n }\n const { tags } = this;\n for (let index = tags.length - 1; index >= 0; index--) {\n uri = tags[index].ns[prefix];\n if (uri !== undefined) {\n return uri;\n }\n }\n uri = this.ns[prefix];\n if (uri !== undefined) {\n return uri;\n }\n return (_b = (_a = this.opt).resolvePrefix) === null || _b === void 0 ? void 0 : _b.call(_a, prefix);\n }\n /**\n * Parse a qname into its prefix and local name parts.\n *\n * @param name The name to parse\n *\n * @returns\n */\n qname(name) {\n // This is faster than using name.split(\":\").\n const colon = name.indexOf(\":\");\n if (colon === -1) {\n return { prefix: \"\", local: name };\n }\n const local = name.slice(colon + 1);\n const prefix = name.slice(0, colon);\n if (prefix === \"\" || local === \"\" || local.includes(\":\")) {\n this.fail(`malformed name: ${name}.`);\n }\n return { prefix, local };\n }\n processAttribsNS() {\n var _a;\n const { attribList } = this;\n const tag = this.tag;\n {\n // add namespace info to tag\n const { prefix, local } = this.qname(tag.name);\n tag.prefix = prefix;\n tag.local = local;\n const uri = tag.uri = (_a = this.resolve(prefix)) !== null && _a !== void 0 ? _a : \"\";\n if (prefix !== \"\") {\n if (prefix === \"xmlns\") {\n this.fail(\"tags may not have \\\"xmlns\\\" as prefix.\");\n }\n if (uri === \"\") {\n this.fail(`unbound namespace prefix: ${JSON.stringify(prefix)}.`);\n tag.uri = prefix;\n }\n }\n }\n if (attribList.length === 0) {\n return;\n }\n const { attributes } = tag;\n const seen = new Set();\n // Note: do not apply default ns to attributes:\n // http://www.w3.org/TR/REC-xml-names/#defaulting\n for (const attr of attribList) {\n const { name, prefix, local } = attr;\n let uri;\n let eqname;\n if (prefix === \"\") {\n uri = name === \"xmlns\" ? XMLNS_NAMESPACE : \"\";\n eqname = name;\n }\n else {\n uri = this.resolve(prefix);\n // if there's any attributes with an undefined namespace,\n // then fail on them now.\n if (uri === undefined) {\n this.fail(`unbound namespace prefix: ${JSON.stringify(prefix)}.`);\n uri = prefix;\n }\n eqname = `{${uri}}${local}`;\n }\n if (seen.has(eqname)) {\n this.fail(`duplicate attribute: ${eqname}.`);\n }\n seen.add(eqname);\n attr.uri = uri;\n attributes[name] = attr;\n }\n this.attribList = [];\n }\n processAttribsPlain() {\n const { attribList } = this;\n // eslint-disable-next-line prefer-destructuring\n const attributes = this.tag.attributes;\n for (const { name, value } of attribList) {\n if (attributes[name] !== undefined) {\n this.fail(`duplicate attribute: ${name}.`);\n }\n attributes[name] = value;\n }\n this.attribList = [];\n }\n /**\n * Handle a complete open tag. This parser code calls this once it has seen\n * the whole tag. This method checks for well-formeness and then emits\n * ``onopentag``.\n */\n openTag() {\n var _a;\n this.processAttribs();\n const { tags } = this;\n const tag = this.tag;\n tag.isSelfClosing = false;\n // There cannot be any pending text here due to the onopentagstart that was\n // necessarily emitted before we get here. So we do not check text.\n (_a = this.openTagHandler) === null || _a === void 0 ? void 0 : _a.call(this, tag);\n tags.push(tag);\n this.state = S_TEXT;\n this.name = \"\";\n }\n /**\n * Handle a complete self-closing tag. This parser code calls this once it has\n * seen the whole tag. This method checks for well-formeness and then emits\n * ``onopentag`` and ``onclosetag``.\n */\n openSelfClosingTag() {\n var _a, _b, _c;\n this.processAttribs();\n const { tags } = this;\n const tag = this.tag;\n tag.isSelfClosing = true;\n // There cannot be any pending text here due to the onopentagstart that was\n // necessarily emitted before we get here. So we do not check text.\n (_a = this.openTagHandler) === null || _a === void 0 ? void 0 : _a.call(this, tag);\n (_b = this.closeTagHandler) === null || _b === void 0 ? void 0 : _b.call(this, tag);\n const top = this.tag = (_c = tags[tags.length - 1]) !== null && _c !== void 0 ? _c : null;\n if (top === null) {\n this.closedRoot = true;\n }\n this.state = S_TEXT;\n this.name = \"\";\n }\n /**\n * Handle a complete close tag. This parser code calls this once it has seen\n * the whole tag. This method checks for well-formeness and then emits\n * ``onclosetag``.\n */\n closeTag() {\n const { tags, name } = this;\n // Our state after this will be S_TEXT, no matter what, and we can clear\n // tagName now.\n this.state = S_TEXT;\n this.name = \"\";\n if (name === \"\") {\n this.fail(\"weird empty close tag.\");\n this.text += \"\";\n return;\n }\n const handler = this.closeTagHandler;\n let l = tags.length;\n while (l-- > 0) {\n const tag = this.tag = tags.pop();\n this.topNS = tag.ns;\n handler === null || handler === void 0 ? void 0 : handler(tag);\n if (tag.name === name) {\n break;\n }\n this.fail(\"unexpected close tag.\");\n }\n if (l === 0) {\n this.closedRoot = true;\n }\n else if (l < 0) {\n this.fail(`unmatched closing tag: ${name}.`);\n this.text += ``;\n }\n }\n /**\n * Resolves an entity. Makes any necessary well-formedness checks.\n *\n * @param entity The entity to resolve.\n *\n * @returns The parsed entity.\n */\n parseEntity(entity) {\n // startsWith would be significantly slower for this test.\n if (entity[0] !== \"#\") {\n const defined = this.ENTITIES[entity];\n if (defined !== undefined) {\n return defined;\n }\n this.fail(this.isName(entity) ? \"undefined entity.\" :\n \"disallowed character in entity name.\");\n return `&${entity};`;\n }\n let num = NaN;\n if (entity[1] === \"x\" && /^#x[0-9a-f]+$/i.test(entity)) {\n num = parseInt(entity.slice(2), 16);\n }\n else if (/^#[0-9]+$/.test(entity)) {\n num = parseInt(entity.slice(1), 10);\n }\n // The character reference is required to match the CHAR production.\n if (!this.isChar(num)) {\n this.fail(\"malformed character entity.\");\n return `&${entity};`;\n }\n return String.fromCodePoint(num);\n }\n}\nexports.SaxesParser = SaxesParser;\n//# sourceMappingURL=saxes.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReadableWebToNodeStream = void 0;\nconst readable_stream_1 = require(\"readable-stream\");\n/**\n * Converts a Web-API stream into Node stream.Readable class\n * Node stream readable: https://nodejs.org/api/stream.html#stream_readable_streams\n * Web API readable-stream: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream\n * Node readable stream: https://nodejs.org/api/stream.html#stream_readable_streams\n */\nclass ReadableWebToNodeStream extends readable_stream_1.Readable {\n /**\n *\n * @param stream ReadableStream: https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream\n */\n constructor(stream) {\n super();\n this.bytesRead = 0;\n this.released = false;\n this.reader = stream.getReader();\n }\n /**\n * Implementation of readable._read(size).\n * When readable._read() is called, if data is available from the resource,\n * the implementation should begin pushing that data into the read queue\n * https://nodejs.org/api/stream.html#stream_readable_read_size_1\n */\n async _read() {\n // Should start pushing data into the queue\n // Read data from the underlying Web-API-readable-stream\n if (this.released) {\n this.push(null); // Signal EOF\n return;\n }\n this.pendingRead = this.reader.read();\n const data = await this.pendingRead;\n // clear the promise before pushing pushing new data to the queue and allow sequential calls to _read()\n delete this.pendingRead;\n if (data.done || this.released) {\n this.push(null); // Signal EOF\n }\n else {\n this.bytesRead += data.value.length;\n this.push(data.value); // Push new data to the queue\n }\n }\n /**\n * If there is no unresolved read call to Web-API Readable​Stream immediately returns;\n * otherwise will wait until the read is resolved.\n */\n async waitForReadToComplete() {\n if (this.pendingRead) {\n await this.pendingRead;\n }\n }\n /**\n * Close wrapper\n */\n async close() {\n await this.syncAndRelease();\n }\n async syncAndRelease() {\n this.released = true;\n await this.waitForReadToComplete();\n await this.reader.releaseLock();\n }\n}\nexports.ReadableWebToNodeStream = ReadableWebToNodeStream;\n//# sourceMappingURL=index.js.map","/*globals self, window */\n\"use strict\"\n\n/*eslint-disable @mysticatea/prettier */\nconst { AbortController, AbortSignal } =\n typeof self !== \"undefined\" ? self :\n typeof window !== \"undefined\" ? window :\n /* otherwise */ undefined\n/*eslint-enable @mysticatea/prettier */\n\nmodule.exports = AbortController\nmodule.exports.AbortSignal = AbortSignal\nmodule.exports.default = AbortController\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nfunction promisifyEventEmitter(event, result) {\n return new Promise((resolve, reject) => {\n event.on('end', () => resolve(result));\n event.on('error', reject);\n });\n}\nfunction arrayifyStream(stream) {\n const array = [];\n return promisifyEventEmitter(stream.on('data', data => array.push(data)), array);\n}\nexports.default = arrayifyStream;\n//# sourceMappingURL=index.js.map","\nconst DynamicNestedLoopJoin = require('./join/DynamicNestedLoopJoin');\nconst HashJoin = require('./join/HashJoin');\nconst NestedLoopJoin = require('./join/NestedLoopJoin');\nconst SymmetricHashJoin = require('./join/SymmetricHashJoin');\n\nconst MergeStream = require('./util/MergeIterator');\n\nmodule.exports = {\n DynamicNestedLoopJoin,\n HashJoin,\n NestedLoopJoin,\n SymmetricHashJoin,\n\n MergeStream\n};","\nlet AsyncIterator = require('asynciterator');\nlet MultiTransformIterator = AsyncIterator.MultiTransformIterator;\nlet SimpleTransformIterator = AsyncIterator.SimpleTransformIterator;\n\n// Nested Loop Join, but the values of the inner loop are determined by each value of the outer loop, possibly reducing the number of necessary checks\nclass DynamicNestedLoopJoin extends MultiTransformIterator\n{\n constructor (left, funRight, funJoin, options)\n {\n super(left, options);\n\n this.funRight = funRight;\n this.funJoin = funJoin;\n }\n\n _createTransformer (leftItem)\n {\n return new SimpleTransformIterator(this.funRight(leftItem), { transform: (rightItem, done, push) =>\n {\n let result = this.funJoin(leftItem, rightItem);\n if (result !== null)\n push(result);\n done();\n }});\n }\n}\n\nmodule.exports = DynamicNestedLoopJoin;\n","\nlet AsyncIterator = require('asynciterator').AsyncIterator;\n\n// https://en.wikipedia.org/wiki/Hash_join\nclass HashJoin extends AsyncIterator\n{\n constructor (left, right, funHash, funJoin)\n {\n super();\n\n this.addedDataListener = false;\n this.left = left;\n this.right = right;\n this.funHash = funHash;\n this.funJoin = funJoin;\n\n this.leftMap = new Map();\n\n this.match = null;\n this.matches = [];\n this.matchIdx = 0;\n\n this.left.on('error', (error) => this.destroy(error));\n this.right.on('error', (error) => this.destroy(error));\n\n this.readable = false;\n\n this.left.on('end', allowJoining.bind(this));\n\n function allowJoining ()\n {\n this.readable = true;\n this.right.on('readable', () => this.readable = true);\n this.right.on('end', () => { if (!this.hasResults()) this._end(); });\n }\n\n this.on('newListener', (eventName) =>\n {\n if (eventName === 'data')\n {\n this._addDataListenerIfNeeded();\n }\n });\n if (this.left.readable)\n this._addDataListenerIfNeeded();\n this.left.on('readable', () => this._addDataListenerIfNeeded());\n }\n\n hasResults ()\n {\n return !this.right.ended || this.matchIdx < this.matches.length;\n }\n\n _end ()\n {\n super._end();\n this.left.destroy();\n this.right.destroy();\n }\n\n read ()\n {\n this._addDataListenerIfNeeded();\n\n while(true) {\n if (this.ended || !this.readable)\n return null;\n\n while (this.matchIdx < this.matches.length)\n {\n let item = this.matches[this.matchIdx++];\n let result = this.funJoin(item, this.match);\n if (result !== null)\n return result;\n }\n\n if (!this.hasResults())\n this._end();\n\n this.match = this.right.read();\n\n if (this.match === null)\n {\n this.readable = false;\n return null;\n }\n\n let hash = this.funHash(this.match);\n this.matches = this.leftMap.get(hash) || [];\n this.matchIdx = 0;\n }\n }\n\n _addDataListenerIfNeeded() {\n if (!this.addedDataListener)\n {\n this.addedDataListener = true;\n this._addDataListener();\n }\n }\n\n _addDataListener()\n {\n this.left.on('data', addItem.bind(this));\n\n function addItem(item)\n {\n let hash = this.funHash(item);\n if (!this.leftMap.has(hash))\n this.leftMap.set(hash, []);\n let arr = this.leftMap.get(hash);\n arr.push(item);\n }\n }\n}\n\nmodule.exports = HashJoin;\n","\nconst { MultiTransformIterator, SimpleTransformIterator, scheduleTask } = require('asynciterator');\n\n// https://en.wikipedia.org/wiki/Nested_loop_join\nclass NestedLoopJoin extends MultiTransformIterator\n{\n constructor (left, right, funJoin, options)\n {\n super(left, options);\n\n this.right = right;\n this.funJoin = funJoin; // function that joins 2 elements or returns null if join is not possible\n this.on('end', () => this.right.close());\n }\n\n _end ()\n {\n super._end();\n scheduleTask(() => this.right.destroy());\n }\n\n _createTransformer (leftItem)\n {\n return new SimpleTransformIterator(this.right.clone(), { transform: (rightItem, done, push) =>\n {\n let result = this.funJoin(leftItem, rightItem);\n if (result !== null)\n push(result);\n done();\n }});\n }\n}\n\nmodule.exports = NestedLoopJoin;\n","\nlet AsyncIterator = require('asynciterator').AsyncIterator;\n\n// https://en.wikipedia.org/wiki/Symmetric_Hash_Join\nclass SymmetricHashJoin extends AsyncIterator\n{\n constructor (left, right, funHash, funJoin)\n {\n super();\n\n this.left = left;\n this.right = right;\n\n this.funHash = funHash;\n this.funJoin = funJoin;\n\n this.usedLeft = false;\n this.leftMap = new Map();\n this.rightMap = new Map();\n\n this.on('end', () => this._cleanup() );\n\n this.match = null;\n this.matches = [];\n this.matchIdx = 0;\n\n if (this.left.readable || this.right.readable)\n {\n this.readable = true;\n }\n\n this.left.on('error', (error) => this.destroy(error));\n this.right.on('error', (error) => this.destroy(error));\n\n this.left.on('readable', () => this.readable = true);\n this.right.on('readable', () => this.readable = true);\n\n // this needs to be here since it's possible the left/right streams only get ended after there are no more results left\n this.left.on ('end', () => { if (!this.hasResults()) this._end(); });\n this.right.on('end', () => { if (!this.hasResults()) this._end(); });\n }\n\n hasResults()\n {\n // The \"!!this.match\" condition was added as a workaround to race\n // conditions and/or duplicate \"end\" events that may lead to premature\n // cleanups of the \"this.matches\" array.\n // See https://github.com/joachimvh/asyncjoin/issues/7\n return !this.left.ended || !this.right.ended || (!!this.matches && this.matchIdx < this.matches.length);\n }\n\n _cleanup ()\n {\n // motivate garbage collector to remove these\n this.leftMap = null;\n this.rightMap = null;\n this.matches = null;\n }\n\n _end ()\n {\n super._end();\n this.left.destroy();\n this.right.destroy();\n }\n\n read ()\n {\n while(true){\n if (this.ended)\n return null;\n\n while (this.matchIdx < this.matches.length)\n {\n let item = this.matches[this.matchIdx++];\n let result = this.usedLeft ? this.funJoin(this.match, item) : this.funJoin(item, this.match);\n if (result !== null)\n return result;\n }\n\n if (!this.hasResults())\n this._end();\n\n let item = null;\n // try both streams if the first one has no value\n for (let i = 0; i < 2; ++i)\n {\n item = this.usedLeft ? this.right.read() : this.left.read();\n this.usedLeft = !this.usedLeft; // try other stream next time\n\n // found a result, no need to check the other stream this run\n if (item !== null)\n break;\n }\n\n if (this.done || item === null)\n {\n this.readable = false;\n return null;\n }\n\n let hash = this.funHash(item);\n\n if (this.usedLeft && this.right.done) {\n this.leftMap = null;\n } else if (this.left.done) {\n this.rightMap = null;\n } else {\n let map = this.usedLeft ? this.leftMap : this.rightMap;\n if (!map.has(hash))\n map.set(hash, []);\n let arr = map.get(hash);\n arr.push(item);\n }\n\n this.match = item;\n this.matches = (this.usedLeft ? this.rightMap : this.leftMap).get(hash) || [];\n this.matchIdx = 0;\n }\n }\n}\n\nmodule.exports = SymmetricHashJoin;\n","\nlet AsyncIterator = require('asynciterator').AsyncIterator;\n\n// merges the contents of multiple streams\nclass MergeIterator extends AsyncIterator\n{\n constructor (streams)\n {\n super();\n \n if (!Array.isArray(streams))\n streams = Array.prototype.slice.call(arguments);\n \n this.streams = streams;\n \n for (let stream of streams)\n {\n stream.on('readable', () => this.emit('readable'));\n stream.on('end', () => this._removeStream(stream));\n }\n \n if (this.streams.length === 0)\n this.close();\n \n this.idx = this.streams.length-1;\n }\n \n _removeStream (stream)\n {\n let idx = this.streams.indexOf(stream);\n if (idx < 0)\n return;\n \n this.streams.splice(idx, 1);\n if (this.idx >= this.streams.length)\n --this.idx;\n \n if (this.streams.length === 0)\n this._end();\n }\n \n close ()\n {\n super.close();\n for (let stream of this.streams)\n stream.close();\n }\n \n read ()\n {\n for (let attempts = 0; attempts < this.streams.length; ++attempts)\n {\n this.idx = (this.idx + 1) % this.streams.length;\n let item = this.streams[this.idx].read();\n if (item !== null)\n return item;\n }\n \n return null;\n }\n}\n\nmodule.exports = MergeIterator;","module.exports = function(variables) {\nfunction getVariableValue(name) {\n if (!variables || !(name in variables)) {\n throw new Error('Undefined variable: ' + name);\n }\n return variables[name];\n}\nconst df_469_1 = new (require('@comunica/logger-void').LoggerVoid)();\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_init__3_0_0_components_ActorInit_jsonld_ActorInit_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-init/^3.0.0/components/ActorInit.jsonld#ActorInit_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-context-preprocess/^3.0.0/components/ActorContextPreprocess.jsonld#ActorContextPreprocess_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_hash_bindings__3_0_0_components_ActorHashBindings_jsonld_ActorHashBindings_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-hash-bindings/^3.0.0/components/ActorHashBindings.jsonld#ActorHashBindings_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_hash_quads__3_0_0_components_ActorHashQuads_jsonld_ActorHashQuads_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-hash-quads/^3.0.0/components/ActorHashQuads.jsonld#ActorHashQuads_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-optimize-query-operation/^3.0.0/components/ActorOptimizeQueryOperation.jsonld#ActorOptimizeQueryOperation_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_parse__3_0_0_components_ActorQueryParse_jsonld_ActorQueryParse_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-parse/^3.0.0/components/ActorQueryParse.jsonld#ActorQueryParse_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-result-serialize/^3.0.0/components/ActorQueryResultSerialize.jsonld#ActorQueryResultSerialize_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify_hypermedia__3_0_0_components_ActorQuerySourceIdentifyHypermedia_jsonld_ActorQuerySourceIdentifyHypermedia_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify-hypermedia/^3.0.0/components/ActorQuerySourceIdentifyHypermedia.jsonld#ActorQuerySourceIdentifyHypermedia_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference__3_0_0_components_ActorDereference_jsonld_ActorDereference_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^3.0.0/components/ActorDereference.jsonld#ActorDereference_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference_rdf__3_0_0_components_ActorDereferenceRdf_jsonld_ActorDereferenceRdf_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference-rdf/^3.0.0/components/ActorDereferenceRdf.jsonld#ActorDereferenceRdf_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join_entries_sort__3_0_0_components_ActorRdfJoinEntriesSort_jsonld_ActorRdfJoinEntriesSort_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-entries-sort/^3.0.0/components/ActorRdfJoinEntriesSort.jsonld#ActorRdfJoinEntriesSort_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join_selectivity__3_0_0_components_ActorRdfJoinSelectivity_jsonld_ActorRdfJoinSelectivity_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-selectivity/^3.0.0/components/ActorRdfJoinSelectivity.jsonld#ActorRdfJoinSelectivity_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata__3_0_0_components_ActorRdfMetadata_jsonld_ActorRdfMetadata_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata/^3.0.0/components/ActorRdfMetadata.jsonld#ActorRdfMetadata_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_accumulate__3_0_0_components_ActorRdfMetadataAccumulate_jsonld_ActorRdfMetadataAccumulate_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-accumulate/^3.0.0/components/ActorRdfMetadataAccumulate.jsonld#ActorRdfMetadataAccumulate_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-extract/^3.0.0/components/ActorRdfMetadataExtract.jsonld#ActorRdfMetadataExtract_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse/^3.0.0/components/ActorRdfParse.jsonld#ActorRdfParse_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse_html__3_0_0_components_ActorRdfParseHtml_jsonld_ActorRdfParseHtml_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse-html/^3.0.0/components/ActorRdfParseHtml.jsonld#ActorRdfParseHtml_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_resolve_hypermedia_links__3_0_0_components_ActorRdfResolveHypermediaLinks_jsonld_ActorRdfResolveHypermediaLinks_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links/^3.0.0/components/ActorRdfResolveHypermediaLinks.jsonld#ActorRdfResolveHypermediaLinks_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_resolve_hypermedia_links_queue__3_0_0_components_ActorRdfResolveHypermediaLinksQueue_jsonld_ActorRdfResolveHypermediaLinksQueue_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links-queue/^3.0.0/components/ActorRdfResolveHypermediaLinksQueue.jsonld#ActorRdfResolveHypermediaLinksQueue_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-serialize/^3.0.0/components/ActorRdfSerialize.jsonld#ActorRdfSerialize_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_hypermedia__3_0_0_components_ActorRdfUpdateHypermedia_jsonld_ActorRdfUpdateHypermedia_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-hypermedia/^3.0.0/components/ActorRdfUpdateHypermedia.jsonld#ActorRdfUpdateHypermedia_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_quads__3_0_0_components_ActorRdfUpdateQuads_jsonld_ActorRdfUpdateQuads_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-quads/^3.0.0/components/ActorRdfUpdateQuads.jsonld#ActorRdfUpdateQuads_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^3.0.0/components/ActorHttp.jsonld#ActorHttp_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_fallback_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^3.0.0/components/ActorHttp.jsonld#ActorHttp_fallback_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus = new (require('@comunica/bus-query-operation').BusQueryOperation)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^3.0.0/components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_process__3_0_0_components_ActorQueryProcess_jsonld_ActorQueryProcess_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-process/^3.0.0/components/ActorQueryProcess.jsonld#ActorQueryProcess_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify__3_0_0_components_ActorQuerySourceIdentify_jsonld_ActorQuerySourceIdentify_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-source-identify/^3.0.0/components/ActorQuerySourceIdentify.jsonld#ActorQuerySourceIdentify_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^3.0.0/components/ActorRdfJoin.jsonld#ActorRdfJoin_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http_invalidate__3_0_0_components_ActorHttpInvalidate_jsonld_ActorHttpInvalidate_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http-invalidate/^3.0.0/components/ActorHttpInvalidate.jsonld#ActorHttpInvalidate_default_bus'\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_merge_bindings_context__3_0_0_components_ActorMergeBindingsContext_jsonld_ActorMergeBindingsContext_default_bus = new (require('@comunica/core').Bus)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-merge-bindings-context/^3.0.0/components/ActorMergeBindingsContext.jsonld#ActorMergeBindingsContext_default_bus'\n});\nconst urn_comunica_default_context_preprocess_actors_convert_shortcuts = new (require('@comunica/actor-context-preprocess-convert-shortcuts').ActorContextPreprocessConvertShortcuts)({\n 'contextKeyShortcuts': {\"baseIRI\":\"@comunica/actor-init-query:baseIRI\",\"datetime\":\"@comunica/actor-http-memento:datetime\",\"destination\":\"@comunica/bus-rdf-update-quads:destination\",\"distinctConstruct\":\"@comunica/actor-init-query:distinctConstruct\",\"explain\":\"@comunica/actor-init-query:explain\",\"extensionFunctionCreator\":\"@comunica/actor-init-query:extensionFunctionCreator\",\"extensionFunctions\":\"@comunica/actor-init-query:extensionFunctions\",\"fetch\":\"@comunica/bus-http:fetch\",\"functionArgumentsCache\":\"@comunica/actor-init-query:functionArgumentsCache\",\"httpAuth\":\"@comunica/bus-http:auth\",\"httpBodyTimeout\":\"@comunica/bus-http:http-body-timeout\",\"httpIncludeCredentials\":\"@comunica/bus-http:include-credentials\",\"httpProxyHandler\":\"@comunica/actor-http-proxy:httpProxyHandler\",\"httpRetryCount\":\"@comunica/bus-http:http-retry-count\",\"httpRetryDelay\":\"@comunica/bus-http:http-retry-delay\",\"httpRetryOnServerError\":\"@comunica/bus-http:http-retry-on-server-error\",\"httpTimeout\":\"@comunica/bus-http:http-timeout\",\"initialBindings\":\"@comunica/actor-init-query:initialBindings\",\"lenient\":\"@comunica/actor-init-query:lenient\",\"log\":\"@comunica/core:log\",\"noCache\":\"@comunica/actor-init-query:noCache\",\"queryFormat\":\"@comunica/actor-init-query:queryFormat\",\"queryTimestamp\":\"@comunica/actor-init-query:queryTimestamp\",\"readOnly\":\"@comunica/bus-query-operation:readOnly\",\"recoverBrokenLinks\":\"@comunica/bus-http-wayback:recover-broken-links\",\"sources\":\"@comunica/actor-init-query:querySourcesUnidentified\",\"traverse\":\"@comunica/bus-query-source-identify:traverse\",\"unionDefaultGraph\":\"@comunica/bus-query-operation:unionDefaultGraph\"},\n 'name': 'urn:comunica:default:context-preprocess/actors#convert-shortcuts',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus\n});\nconst urn_comunica_default_context_preprocess_actors_set_defaults = new (require('@comunica/actor-context-preprocess-set-defaults').ActorContextPreprocessSetDefaults)({\n 'logger': df_469_1,\n 'name': 'urn:comunica:default:context-preprocess/actors#set-defaults',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus\n});\nconst urn_comunica_default_context_preprocess_actors_source_to_destination = new (require('@comunica/actor-context-preprocess-source-to-destination').ActorContextPreprocessSourceToDestination)({\n 'name': 'urn:comunica:default:context-preprocess/actors#source-to-destination',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus\n});\nconst urn_comunica_default_context_preprocess_actors_query_source_skolemize = new (require('@comunica/actor-context-preprocess-query-source-skolemize').ActorContextPreprocessQuerySourceSkolemize)({\n 'name': 'urn:comunica:default:context-preprocess/actors#query-source-skolemize',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus\n});\nconst urn_comunica_default_context_preprocess_mediators_main = new (require('@comunica/mediator-combine-pipeline').MediatorCombinePipeline)({\n 'name': 'urn:comunica:default:context-preprocess/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus\n});\nconst urn_comunica_default_hash_bindings_actors_sha1 = new (require('@comunica/actor-hash-bindings-sha1').ActorHashBindingsSha1)({\n 'name': 'urn:comunica:default:hash-bindings/actors#sha1',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_hash_bindings__3_0_0_components_ActorHashBindings_jsonld_ActorHashBindings_default_bus\n});\nconst urn_comunica_default_hash_bindings_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:hash-bindings/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_hash_bindings__3_0_0_components_ActorHashBindings_jsonld_ActorHashBindings_default_bus\n});\nconst urn_comunica_default_hash_quads_actors_sha1 = new (require('@comunica/actor-hash-quads-sha1').ActorHashQuadsSha1)({\n 'name': 'urn:comunica:default:hash-quads/actors#sha1',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_hash_quads__3_0_0_components_ActorHashQuads_jsonld_ActorHashQuads_default_bus\n});\nconst urn_comunica_default_hash_quads_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:hash-quads/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_hash_quads__3_0_0_components_ActorHashQuads_jsonld_ActorHashQuads_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_actors_rewrite_copy = new (require('@comunica/actor-optimize-query-operation-rewrite-copy').ActorOptimizeQueryOperationRewriteCopy)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#rewrite-copy',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_actors_rewrite_move = new (require('@comunica/actor-optimize-query-operation-rewrite-move').ActorOptimizeQueryOperationRewriteMove)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#rewrite-move',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_actors_rewrite_add = new (require('@comunica/actor-optimize-query-operation-rewrite-add').ActorOptimizeQueryOperationRewriteAdd)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#rewrite-add',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_actors_group_sources = new (require('@comunica/actor-optimize-query-operation-group-sources').ActorOptimizeQueryOperationGroupSources)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#group-sources',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_actors_construct_distinct = new (require('@comunica/actor-optimize-query-operation-construct-distinct').ActorOptimizeQueryOperationConstructDistinct)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#construct-distinct',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_mediators_main = new (require('@comunica/mediator-combine-pipeline').MediatorCombinePipeline)({\n 'filterErrors': true,\n 'name': 'urn:comunica:default:optimize-query-operation/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus\n});\nconst urn_comunica_default_query_parse_actors_sparql = new (require('@comunica/actor-query-parse-sparql').ActorQueryParseSparql)({\n 'prefixes': {\"dbpedia\":\"http://dbpedia.org/resource/\",\"dbpedia-owl\":\"http://dbpedia.org/ontology/\",\"dbpprop\":\"http://dbpedia.org/property/\",\"dc\":\"http://purl.org/dc/terms/\",\"dc11\":\"http://purl.org/dc/elements/1.1/\",\"dcterms\":\"http://purl.org/dc/terms/\",\"foaf\":\"http://xmlns.com/foaf/0.1/\",\"geo\":\"http://www.w3.org/2003/01/geo/wgs84_pos#\",\"owl\":\"http://www.w3.org/2002/07/owl#\",\"rdf\":\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\",\"rdfs\":\"http://www.w3.org/2000/01/rdf-schema#\",\"schema\":\"http://schema.org/\",\"skos\":\"http://www.w3.org/2008/05/skos#\",\"xsd\":\"http://www.w3.org/2001/XMLSchema#\"},\n 'name': 'urn:comunica:default:query-parse/actors#sparql',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_parse__3_0_0_components_ActorQueryParse_jsonld_ActorQueryParse_default_bus\n});\nconst urn_comunica_default_query_parse_actors_graphql = new (require('@comunica/actor-query-parse-graphql').ActorQueryParseGraphql)({\n 'name': 'urn:comunica:default:query-parse/actors#graphql',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_parse__3_0_0_components_ActorQueryParse_jsonld_ActorQueryParse_default_bus\n});\nconst urn_comunica_default_query_parse_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:query-parse/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_parse__3_0_0_components_ActorQueryParse_jsonld_ActorQueryParse_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_json = new (require('@comunica/actor-query-result-serialize-json').ActorQueryResultSerializeJson)({\n 'mediaTypePriorities': {\"application/json\":1},\n 'mediaTypeFormats': {\"application/json\":\"https://comunica.linkeddatafragments.org/#results_JSON\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#json',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_simple = new (require('@comunica/actor-query-result-serialize-simple').ActorQueryResultSerializeSimple)({\n 'mediaTypePriorities': {\"simple\":0.9},\n 'mediaTypeFormats': {\"simple\":\"https://comunica.linkeddatafragments.org/#results_simple\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#simple',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_csv = new (require('@comunica/actor-query-result-serialize-sparql-csv').ActorQueryResultSerializeSparqlCsv)({\n 'mediaTypePriorities': {\"text/csv\":0.75},\n 'mediaTypeFormats': {\"text/csv\":\"http://www.w3.org/ns/formats/SPARQL_Results_CSV\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#csv',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_sparql_tsv = new (require('@comunica/actor-query-result-serialize-sparql-tsv').ActorQueryResultSerializeSparqlTsv)({\n 'mediaTypePriorities': {\"text/tab-separated-values\":0.75},\n 'mediaTypeFormats': {\"text/tab-separated-values\":\"http://www.w3.org/ns/formats/SPARQL_Results_TSV\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#sparql-tsv',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_sparql_xml = new (require('@comunica/actor-query-result-serialize-sparql-xml').ActorQueryResultSerializeSparqlXml)({\n 'mediaTypePriorities': {\"application/sparql-results+xml\":0.8},\n 'mediaTypeFormats': {\"application/sparql-results+xml\":\"http://www.w3.org/ns/formats/SPARQL_Results_XML\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#sparql-xml',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_table = new (require('@comunica/actor-query-result-serialize-table').ActorQueryResultSerializeTable)({\n 'columnWidth': 50,\n 'mediaTypePriorities': {\"table\":0.6},\n 'mediaTypeFormats': {\"table\":\"https://comunica.linkeddatafragments.org/#results_table\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#table',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_tree = new (require('@comunica/actor-query-result-serialize-tree').ActorQueryResultSerializeTree)({\n 'mediaTypePriorities': {\"tree\":0.5},\n 'mediaTypeFormats': {\"tree\":\"https://comunica.linkeddatafragments.org/#results_tree\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#tree',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_mediators_serialize = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:query-result-serialize/mediators#serialize',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_mediators_mediaType = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'mediaTypes',\n 'name': 'urn:comunica:default:query-result-serialize/mediators#mediaType',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_mediators_mediaTypeFormat = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'mediaTypeFormats',\n 'name': 'urn:comunica:default:query-result-serialize/mediators#mediaTypeFormat',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_source_identify_hypermedia_mediators_main = new (require('@comunica/mediator-number').MediatorNumber)({\n 'field': 'filterFactor',\n 'type': 'max',\n 'ignoreErrors': true,\n 'name': 'urn:comunica:default:query-source-identify-hypermedia/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify_hypermedia__3_0_0_components_ActorQuerySourceIdentifyHypermedia_jsonld_ActorQuerySourceIdentifyHypermedia_default_bus\n});\nconst urn_comunica_default_dereference_actors_fallback = new (require('@comunica/actor-dereference-fallback').ActorDereferenceFallback)({\n 'name': 'urn:comunica:default:dereference/actors#fallback',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference__3_0_0_components_ActorDereference_jsonld_ActorDereference_default_bus\n});\nconst urn_comunica_default_dereference_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:dereference/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference__3_0_0_components_ActorDereference_jsonld_ActorDereference_default_bus\n});\nconst urn_comunica_default_dereference_rdf_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:dereference-rdf/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference_rdf__3_0_0_components_ActorDereferenceRdf_jsonld_ActorDereferenceRdf_default_bus\n});\nconst urn_comunica_default_rdf_join_entries_sort_actors_cardinality = new (require('@comunica/actor-rdf-join-entries-sort-cardinality').ActorRdfJoinEntriesSortCardinality)({\n 'name': 'urn:comunica:default:rdf-join-entries-sort/actors#cardinality',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join_entries_sort__3_0_0_components_ActorRdfJoinEntriesSort_jsonld_ActorRdfJoinEntriesSort_default_bus\n});\nconst urn_comunica_default_rdf_join_entries_sort_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-join-entries-sort/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join_entries_sort__3_0_0_components_ActorRdfJoinEntriesSort_jsonld_ActorRdfJoinEntriesSort_default_bus\n});\nconst urn_comunica_default_rdf_join_selectivity_actors_variable_counting = new (require('@comunica/actor-rdf-join-selectivity-variable-counting').ActorRdfJoinSelectivityVariableCounting)({\n 'name': 'urn:comunica:default:rdf-join-selectivity/actors#variable-counting',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join_selectivity__3_0_0_components_ActorRdfJoinSelectivity_jsonld_ActorRdfJoinSelectivity_default_bus\n});\nconst urn_comunica_default_rdf_join_selectivity_mediators_main = new (require('@comunica/mediator-number').MediatorNumber)({\n 'field': 'accuracy',\n 'type': 'max',\n 'ignoreErrors': true,\n 'name': 'urn:comunica:default:rdf-join-selectivity/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join_selectivity__3_0_0_components_ActorRdfJoinSelectivity_jsonld_ActorRdfJoinSelectivity_default_bus\n});\nconst urn_comunica_default_rdf_metadata_actors_primary_topic = new (require('@comunica/actor-rdf-metadata-primary-topic').ActorRdfMetadataPrimaryTopic)({\n 'metadataToData': false,\n 'dataToMetadataOnInvalidMetadataGraph': true,\n 'name': 'urn:comunica:default:rdf-metadata/actors#primary-topic',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata__3_0_0_components_ActorRdfMetadata_jsonld_ActorRdfMetadata_default_bus\n});\nconst urn_comunica_default_rdf_metadata_actors_all = new (require('@comunica/actor-rdf-metadata-all').ActorRdfMetadataAll)({\n 'name': 'urn:comunica:default:rdf-metadata/actors#all',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata__3_0_0_components_ActorRdfMetadata_jsonld_ActorRdfMetadata_default_bus\n});\nconst urn_comunica_default_rdf_metadata_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-metadata/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata__3_0_0_components_ActorRdfMetadata_jsonld_ActorRdfMetadata_default_bus\n});\nconst urn_comunica_default_rdf_metadata_accumulate_actors_cancontainundefs = new (require('@comunica/actor-rdf-metadata-accumulate-cancontainundefs').ActorRdfMetadataAccumulateCanContainUndefs)({\n 'name': 'urn:comunica:default:rdf-metadata-accumulate/actors#cancontainundefs',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_accumulate__3_0_0_components_ActorRdfMetadataAccumulate_jsonld_ActorRdfMetadataAccumulate_default_bus\n});\nconst urn_comunica_default_rdf_metadata_accumulate_actors_cardinality = new (require('@comunica/actor-rdf-metadata-accumulate-cardinality').ActorRdfMetadataAccumulateCardinality)({\n 'name': 'urn:comunica:default:rdf-metadata-accumulate/actors#cardinality',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_accumulate__3_0_0_components_ActorRdfMetadataAccumulate_jsonld_ActorRdfMetadataAccumulate_default_bus\n});\nconst urn_comunica_default_rdf_metadata_accumulate_actors_pagesize = new (require('@comunica/actor-rdf-metadata-accumulate-pagesize').ActorRdfMetadataAccumulatePageSize)({\n 'name': 'urn:comunica:default:rdf-metadata-accumulate/actors#pagesize',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_accumulate__3_0_0_components_ActorRdfMetadataAccumulate_jsonld_ActorRdfMetadataAccumulate_default_bus\n});\nconst urn_comunica_default_rdf_metadata_accumulate_actors_requesttime = new (require('@comunica/actor-rdf-metadata-accumulate-requesttime').ActorRdfMetadataAccumulateRequestTime)({\n 'name': 'urn:comunica:default:rdf-metadata-accumulate/actors#requesttime',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_accumulate__3_0_0_components_ActorRdfMetadataAccumulate_jsonld_ActorRdfMetadataAccumulate_default_bus\n});\nconst urn_comunica_default_rdf_metadata_accumulate_mediators_main = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'metadata',\n 'name': 'urn:comunica:default:rdf-metadata-accumulate/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_accumulate__3_0_0_components_ActorRdfMetadataAccumulate_jsonld_ActorRdfMetadataAccumulate_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_hydra_controls = new (require('@comunica/actor-rdf-metadata-extract-hydra-controls').ActorRdfMetadataExtractHydraControls)({\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#hydra-controls',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_hydra_count = new (require('@comunica/actor-rdf-metadata-extract-hydra-count').ActorRdfMetadataExtractHydraCount)({\n 'predicates': [\n 'http://www.w3.org/ns/hydra/core#totalItems',\n 'http://rdfs.org/ns/void#triples'\n],\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#hydra-count',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_hydra_pagesize = new (require('@comunica/actor-rdf-metadata-extract-hydra-pagesize').ActorRdfMetadataExtractHydraPagesize)({\n 'predicates': [\n 'http://www.w3.org/ns/hydra/core#itemsPerPage'\n],\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#hydra-pagesize',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_request_time = new (require('@comunica/actor-rdf-metadata-extract-request-time').ActorRdfMetadataExtractRequestTime)({\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#request-time',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_allow_http_methods = new (require('@comunica/actor-rdf-metadata-extract-allow-http-methods').ActorRdfMetadataExtractAllowHttpMethods)({\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#allow-http-methods',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_put_accepted = new (require('@comunica/actor-rdf-metadata-extract-put-accepted').ActorRdfMetadataExtractPutAccepted)({\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#put-accepted',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_patch_sparql_update = new (require('@comunica/actor-rdf-metadata-extract-patch-sparql-update').ActorRdfMetadataExtractPatchSparqlUpdate)({\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#patch-sparql-update',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_actors_sparql_service = new (require('@comunica/actor-rdf-metadata-extract-sparql-service').ActorRdfMetadataExtractSparqlService)({\n 'inferHttpsEndpoint': true,\n 'name': 'urn:comunica:default:rdf-metadata-extract/actors#sparql-service',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_metadata_extract_mediators_main = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'filterErrors': true,\n 'field': 'metadata',\n 'name': 'urn:comunica:default:rdf-metadata-extract/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_metadata_extract__3_0_0_components_ActorRdfMetadataExtract_jsonld_ActorRdfMetadataExtract_default_bus\n});\nconst urn_comunica_default_rdf_parse_actors_n3 = new (require('@comunica/actor-rdf-parse-n3').ActorRdfParseN3)({\n 'mediaTypePriorities': {\"application/n-quads\":1,\"application/n-triples\":0.8,\"application/trig\":0.95,\"text/n3\":0.35,\"text/turtle\":0.6},\n 'mediaTypeFormats': {\"application/n-quads\":\"http://www.w3.org/ns/formats/N-Quads\",\"application/n-triples\":\"http://www.w3.org/ns/formats/N-Triples\",\"application/trig\":\"http://www.w3.org/ns/formats/TriG\",\"text/n3\":\"http://www.w3.org/ns/formats/N3\",\"text/turtle\":\"http://www.w3.org/ns/formats/Turtle\"},\n 'priorityScale': 1,\n 'name': 'urn:comunica:default:rdf-parse/actors#n3',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_actors_rdfxml = new (require('@comunica/actor-rdf-parse-rdfxml').ActorRdfParseRdfXml)({\n 'mediaTypePriorities': {\"application/rdf+xml\":1},\n 'mediaTypeFormats': {\"application/rdf+xml\":\"http://www.w3.org/ns/formats/RDF_XML\"},\n 'priorityScale': 0.5,\n 'name': 'urn:comunica:default:rdf-parse/actors#rdfxml',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_actors_xmlrdfa = new (require('@comunica/actor-rdf-parse-xml-rdfa').ActorRdfParseXmlRdfa)({\n 'mediaTypePriorities': {\"application/xml\":1,\"image/svg+xml\":1,\"text/xml\":1},\n 'mediaTypeFormats': {\"application/xml\":\"http://www.w3.org/ns/formats/RDFa\",\"image/svg+xml\":\"http://www.w3.org/ns/formats/RDFa\",\"text/xml\":\"http://www.w3.org/ns/formats/RDFa\"},\n 'priorityScale': 0.3,\n 'name': 'urn:comunica:default:rdf-parse/actors#xmlrdfa',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_actors_shaclc = new (require('@comunica/actor-rdf-parse-shaclc').ActorRdfParseShaclc)({\n 'mediaTypePriorities': {\"text/shaclc\":1,\"text/shaclc-ext\":0.5},\n 'mediaTypeFormats': {\"text/shaclc\":\"http://www.w3.org/ns/formats/Shaclc\",\"text/shaclc-ext\":\"http://www.w3.org/ns/formats/ShaclcExtended\"},\n 'priorityScale': 0.1,\n 'name': 'urn:comunica:default:rdf-parse/actors#shaclc',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_mediators_parse = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-parse/mediators#parse',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_mediators_mediaType = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'mediaTypes',\n 'name': 'urn:comunica:default:rdf-parse/mediators#mediaType',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_actors_html = new (require('@comunica/actor-rdf-parse-html').ActorRdfParseHtml)({\n 'busRdfParseHtml': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse_html__3_0_0_components_ActorRdfParseHtml_jsonld_ActorRdfParseHtml_default_bus,\n 'mediaTypePriorities': {\"application/xhtml+xml\":0.9,\"text/html\":1},\n 'mediaTypeFormats': {\"application/xhtml+xml\":\"http://www.w3.org/ns/formats/HTML\",\"text/html\":\"http://www.w3.org/ns/formats/HTML\"},\n 'priorityScale': 0.2,\n 'name': 'urn:comunica:default:rdf-parse/actors#html',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_parse_html_actors_microdata = new (require('@comunica/actor-rdf-parse-html-microdata').ActorRdfParseHtmlMicrodata)({\n 'name': 'urn:comunica:default:rdf-parse-html/actors#microdata',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse_html__3_0_0_components_ActorRdfParseHtml_jsonld_ActorRdfParseHtml_default_bus\n});\nconst urn_comunica_default_rdf_parse_html_actors_rdfa = new (require('@comunica/actor-rdf-parse-html-rdfa').ActorRdfParseHtmlRdfa)({\n 'name': 'urn:comunica:default:rdf-parse-html/actors#rdfa',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse_html__3_0_0_components_ActorRdfParseHtml_jsonld_ActorRdfParseHtml_default_bus\n});\nconst urn_comunica_default_rdf_resolve_hypermedia_links_actors_next = new (require('@comunica/actor-rdf-resolve-hypermedia-links-next').ActorRdfResolveHypermediaLinksNext)({\n 'name': 'urn:comunica:default:rdf-resolve-hypermedia-links/actors#next',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_resolve_hypermedia_links__3_0_0_components_ActorRdfResolveHypermediaLinks_jsonld_ActorRdfResolveHypermediaLinks_default_bus\n});\nconst urn_comunica_default_rdf_resolve_hypermedia_links_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-resolve-hypermedia-links/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_resolve_hypermedia_links__3_0_0_components_ActorRdfResolveHypermediaLinks_jsonld_ActorRdfResolveHypermediaLinks_default_bus\n});\nconst urn_comunica_default_rdf_resolve_hypermedia_links_queue_actors_fifo = new (require('@comunica/actor-rdf-resolve-hypermedia-links-queue-fifo').ActorRdfResolveHypermediaLinksQueueFifo)({\n 'name': 'urn:comunica:default:rdf-resolve-hypermedia-links-queue/actors#fifo',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_resolve_hypermedia_links_queue__3_0_0_components_ActorRdfResolveHypermediaLinksQueue_jsonld_ActorRdfResolveHypermediaLinksQueue_default_bus\n});\nconst urn_comunica_default_rdf_resolve_hypermedia_links_queue_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-resolve-hypermedia-links-queue/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_resolve_hypermedia_links_queue__3_0_0_components_ActorRdfResolveHypermediaLinksQueue_jsonld_ActorRdfResolveHypermediaLinksQueue_default_bus\n});\nconst urn_comunica_default_rdf_serialize_actors_n3 = new (require('@comunica/actor-rdf-serialize-n3').ActorRdfSerializeN3)({\n 'mediaTypePriorities': {\"application/n-quads\":1,\"application/n-triples\":0.8,\"application/trig\":0.95,\"text/n3\":0.35,\"text/turtle\":0.6},\n 'mediaTypeFormats': {\"application/n-quads\":\"http://www.w3.org/ns/formats/N-Quads\",\"application/n-triples\":\"http://www.w3.org/ns/formats/N-Triples\",\"application/trig\":\"http://www.w3.org/ns/formats/TriG\",\"text/n3\":\"http://www.w3.org/ns/formats/N3\",\"text/turtle\":\"http://www.w3.org/ns/formats/Turtle\"},\n 'name': 'urn:comunica:default:rdf-serialize/actors#n3',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus\n});\nconst urn_comunica_default_rdf_serialize_actors_jsonld = new (require('@comunica/actor-rdf-serialize-jsonld').ActorRdfSerializeJsonLd)({\n 'jsonStringifyIndentSpaces': 2,\n 'mediaTypePriorities': {\"application/ld+json\":1},\n 'mediaTypeFormats': {\"application/ld+json\":\"http://www.w3.org/ns/formats/JSON-LD\"},\n 'priorityScale': 0.9,\n 'name': 'urn:comunica:default:rdf-serialize/actors#jsonld',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus\n});\nconst urn_comunica_default_rdf_serialize_actors_shaclc = new (require('@comunica/actor-rdf-serialize-shaclc').ActorRdfSerializeShaclc)({\n 'mediaTypePriorities': {\"text/shaclc\":1,\"text/shaclc-ext\":0.5},\n 'mediaTypeFormats': {\"text/shaclc\":\"http://www.w3.org/ns/formats/Shaclc\",\"text/shaclc-ext\":\"http://www.w3.org/ns/formats/ShaclcExtended\"},\n 'priorityScale': 0.1,\n 'name': 'urn:comunica:default:rdf-serialize/actors#shaclc',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus\n});\nconst urn_comunica_default_rdf_serialize_mediators_serialize = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-serialize/mediators#serialize',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus\n});\nconst urn_comunica_default_rdf_serialize_mediators_mediaType = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'mediaTypes',\n 'name': 'urn:comunica:default:rdf-serialize/mediators#mediaType',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus\n});\nconst urn_comunica_default_rdf_serialize_mediators_mediaTypeFormat = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'mediaTypeFormats',\n 'name': 'urn:comunica:default:rdf-serialize/mediators#mediaTypeFormat',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_serialize__3_0_0_components_ActorRdfSerialize_jsonld_ActorRdfSerialize_default_bus\n});\nconst urn_comunica_default_rdf_update_hypermedia_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-update-hypermedia/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_hypermedia__3_0_0_components_ActorRdfUpdateHypermedia_jsonld_ActorRdfUpdateHypermedia_default_bus\n});\nconst urn_comunica_default_rdf_update_quads_actors_rdfjs_store = new (require('@comunica/actor-rdf-update-quads-rdfjs-store').ActorRdfUpdateQuadsRdfJsStore)({\n 'name': 'urn:comunica:default:rdf-update-quads/actors#rdfjs-store',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_quads__3_0_0_components_ActorRdfUpdateQuads_jsonld_ActorRdfUpdateQuads_default_bus\n});\nconst urn_comunica_default_rdf_update_quads_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:rdf-update-quads/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_quads__3_0_0_components_ActorRdfUpdateQuads_jsonld_ActorRdfUpdateQuads_default_bus\n});\nconst urn_comunica_default_http_actors_fetch = new (require('@comunica/actor-http-fetch').ActorHttpFetch)({\n 'agentOptions': {\"keepAlive\":true,\"maxSockets\":5},\n 'name': 'urn:comunica:default:http/actors#fetch',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_default_bus\n});\nconst urn_comunica_default_http_mediators_no_fallback = new (require('@comunica/mediator-number').MediatorNumber)({\n 'field': 'time',\n 'type': 'min',\n 'ignoreErrors': true,\n 'name': 'urn:comunica:default:http/mediators#no-fallback',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_default_bus\n});\nconst urn_comunica_default_http_mediators_main = new (require('@comunica/mediator-number').MediatorNumber)({\n 'field': 'time',\n 'type': 'min',\n 'ignoreErrors': true,\n 'name': 'urn:comunica:default:http/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_fallback_bus\n});\nconst urn_comunica_default_query_operation_actors_source = new (require('@comunica/actor-query-operation-source').ActorQueryOperationSource)({\n 'name': 'urn:comunica:default:query-operation/actors#source',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_mediators_main = new (require('@comunica/mediator-number').MediatorNumber)({\n 'field': 'httpRequests',\n 'type': 'min',\n 'ignoreErrors': true,\n 'name': 'urn:comunica:default:query-operation/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_process_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:query-process/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_process__3_0_0_components_ActorQueryProcess_jsonld_ActorQueryProcess_default_bus\n});\nconst urn_comunica_default_query_source_identify_mediators_main = new (require('@comunica/mediator-race').MediatorRace)({\n 'name': 'urn:comunica:default:query-source-identify/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify__3_0_0_components_ActorQuerySourceIdentify_jsonld_ActorQuerySourceIdentify_default_bus\n});\nconst urn_comunica_default_rdf_join_mediators_main = new (require('@comunica/mediator-join-coefficients-fixed').MediatorJoinCoefficientsFixed)({\n 'cpuWeight': 10,\n 'memoryWeight': 1,\n 'timeWeight': 2,\n 'ioWeight': 10,\n 'name': 'urn:comunica:default:rdf-join/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_context_preprocess_query_source_identify__3_0_0_components_ActorContextPreprocessQuerySourceIdentify_jsonld_IActorContextPreprocessQuerySourceIdentifyArgs_default_invalidator = new (require('@comunica/bus-http-invalidate').ActorHttpInvalidateListenable)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-context-preprocess-query-source-identify/^3.0.0/components/ActorContextPreprocessQuerySourceIdentify.jsonld#IActorContextPreprocessQuerySourceIdentifyArgs_default_invalidator',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http_invalidate__3_0_0_components_ActorHttpInvalidate_jsonld_ActorHttpInvalidate_default_bus\n});\nconst urn_comunica_default_http_invalidate_mediators_main = new (require('@comunica/mediator-all').MediatorAll)({\n 'name': 'urn:comunica:default:http-invalidate/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http_invalidate__3_0_0_components_ActorHttpInvalidate_jsonld_ActorHttpInvalidate_default_bus\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_rdf_update_quads_hypermedia__3_0_0_components_ActorRdfUpdateQuadsHypermedia_jsonld_IActorRdfUpdateQuadsHypermediaArgs_default_invalidator = new (require('@comunica/bus-http-invalidate').ActorHttpInvalidateListenable)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-quads-hypermedia/^3.0.0/components/ActorRdfUpdateQuadsHypermedia.jsonld#IActorRdfUpdateQuadsHypermediaArgs_default_invalidator',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http_invalidate__3_0_0_components_ActorHttpInvalidate_jsonld_ActorHttpInvalidate_default_bus\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_sparql_json__3_0_0_components_ActionObserverHttp_jsonld_IActionObserverHttpArgs_default_invalidator = new (require('@comunica/bus-http-invalidate').ActorHttpInvalidateListenable)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^3.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http_invalidate__3_0_0_components_ActorHttpInvalidate_jsonld_ActorHttpInvalidate_default_bus\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_stats__3_0_0_components_ActionObserverHttp_jsonld_IActionObserverHttpArgs_default_invalidator = new (require('@comunica/bus-http-invalidate').ActorHttpInvalidateListenable)({\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^3.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http_invalidate__3_0_0_components_ActorHttpInvalidate_jsonld_ActorHttpInvalidate_default_bus\n});\nconst urn_comunica_default_merge_bindings_context_mediators_main = new (require('@comunica/mediator-combine-union').MediatorCombineUnion)({\n 'field': 'mergeHandlers',\n 'name': 'urn:comunica:default:merge-bindings-context/mediators#main',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_merge_bindings_context__3_0_0_components_ActorMergeBindingsContext_jsonld_ActorMergeBindingsContext_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_single = new (require('@comunica/actor-rdf-join-inner-single').ActorRdfJoinSingle)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-single',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_multi_empty = new (require('@comunica/actor-rdf-join-inner-multi-empty').ActorRdfJoinMultiEmpty)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-multi-empty',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_multi_bind_source = new (require('@comunica/actor-rdf-join-inner-multi-bind-source').ActorRdfJoinMultiBindSource)({\n 'selectivityModifier': 0.0001,\n 'blockSize': 16,\n 'mediatorJoinEntriesSort': urn_comunica_default_rdf_join_entries_sort_mediators_main,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-multi-bind-source',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_hash = new (require('@comunica/actor-rdf-join-inner-hash').ActorRdfJoinHash)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-hash',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_symmetric_hash = new (require('@comunica/actor-rdf-join-inner-symmetrichash').ActorRdfJoinSymmetricHash)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-symmetric-hash',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_nested_loop = new (require('@comunica/actor-rdf-join-inner-nestedloop').ActorRdfJoinNestedLoop)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-nested-loop',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_minus_hash = new (require('@comunica/actor-rdf-join-minus-hash').ActorRdfJoinMinusHash)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#minus-hash',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_minus_hash_undef = new (require('@comunica/actor-rdf-join-minus-hash-undef').ActorRdfJoinMinusHashUndef)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#minus-hash-undef',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_optional_hash_def_nonblocking = new (require('@comunica/actor-rdf-join-optional-hash').ActorRdfJoinOptionalHash)({\n 'canHandleUndefs': false,\n 'blocking': false,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#optional-hash-def-nonblocking',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_optional_hash_def_blocking = new (require('@comunica/actor-rdf-join-optional-hash').ActorRdfJoinOptionalHash)({\n 'canHandleUndefs': false,\n 'blocking': true,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#optional-hash-def-blocking',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_optional_hash_undef_nonblocking = new (require('@comunica/actor-rdf-join-optional-hash').ActorRdfJoinOptionalHash)({\n 'canHandleUndefs': true,\n 'blocking': false,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#optional-hash-undef-nonblocking',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_optional_hash_undef_blocking = new (require('@comunica/actor-rdf-join-optional-hash').ActorRdfJoinOptionalHash)({\n 'canHandleUndefs': true,\n 'blocking': true,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#optional-hash-undef-blocking',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_optional_nested_loop = new (require('@comunica/actor-rdf-join-optional-nestedloop').ActorRdfJoinOptionalNestedLoop)({\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#optional-nested-loop',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_dereference_rdf_actors_parse = new (require('@comunica/actor-dereference-rdf-parse').ActorDereferenceRdfParse)({\n 'mediatorDereference': urn_comunica_default_dereference_mediators_main,\n 'mediatorParse': urn_comunica_default_rdf_parse_mediators_parse,\n 'mediatorParseMediatypes': urn_comunica_default_rdf_parse_mediators_mediaType,\n 'mediaMappings': {\"htm\":\"text/html\",\"html\":\"text/html\",\"json\":\"application/json\",\"jsonld\":\"application/ld+json\",\"n3\":\"text/n3\",\"nq\":\"application/n-quads\",\"nquads\":\"application/n-quads\",\"nt\":\"application/n-triples\",\"ntriples\":\"application/n-triples\",\"owl\":\"application/rdf+xml\",\"rdf\":\"application/rdf+xml\",\"rdfxml\":\"application/rdf+xml\",\"shaclc\":\"text/shaclc\",\"shaclce\":\"text/shaclc-ext\",\"shc\":\"text/shaclc\",\"shce\":\"text/shaclc-ext\",\"svg\":\"image/svg+xml\",\"svgz\":\"image/svg+xml\",\"trig\":\"application/trig\",\"ttl\":\"text/turtle\",\"turtle\":\"text/turtle\",\"xht\":\"application/xhtml+xml\",\"xhtml\":\"application/xhtml+xml\",\"xml\":\"application/xml\"},\n 'name': 'urn:comunica:default:dereference-rdf/actors#parse',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference_rdf__3_0_0_components_ActorDereferenceRdf_jsonld_ActorDereferenceRdf_default_bus\n});\nconst urn_comunica_default_rdf_parse_html_actors_script = new (require('@comunica/actor-rdf-parse-html-script').ActorRdfParseHtmlScript)({\n 'mediatorRdfParseMediatypes': urn_comunica_default_rdf_parse_mediators_mediaType,\n 'mediatorRdfParseHandle': urn_comunica_default_rdf_parse_mediators_parse,\n 'name': 'urn:comunica:default:rdf-parse-html/actors#script',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse_html__3_0_0_components_ActorRdfParseHtml_jsonld_ActorRdfParseHtml_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_rdf = new (require('@comunica/actor-query-result-serialize-rdf').ActorQueryResultSerializeRdf)({\n 'mediatorRdfSerialize': urn_comunica_default_rdf_serialize_mediators_serialize,\n 'mediatorMediaTypeCombiner': urn_comunica_default_rdf_serialize_mediators_mediaType,\n 'mediatorMediaTypeFormatCombiner': urn_comunica_default_rdf_serialize_mediators_mediaTypeFormat,\n 'name': 'urn:comunica:default:query-result-serialize/actors#rdf',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_http_actors_wayback = new (require('@comunica/actor-http-wayback').ActorHttpWayback)({\n 'mediatorHttp': urn_comunica_default_http_mediators_no_fallback,\n 'name': 'urn:comunica:default:http/actors#wayback',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_fallback_bus\n});\nconst urn_comunica_default_rdf_parse_actors_jsonld = new (require('@comunica/actor-rdf-parse-jsonld').ActorRdfParseJsonLd)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'mediaTypePriorities': {\"application/json\":0.15,\"application/ld+json\":1},\n 'mediaTypeFormats': {\"application/json\":\"http://www.w3.org/ns/formats/JSON-LD\",\"application/ld+json\":\"http://www.w3.org/ns/formats/JSON-LD\"},\n 'priorityScale': 0.9,\n 'name': 'urn:comunica:default:rdf-parse/actors#jsonld',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_parse__3_0_0_components_ActorRdfParse_jsonld_ActorRdfParse_default_bus\n});\nconst urn_comunica_default_rdf_update_hypermedia_actors_patch_sparql_update = new (require('@comunica/actor-rdf-update-hypermedia-patch-sparql-update').ActorRdfUpdateHypermediaPatchSparqlUpdate)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'name': 'urn:comunica:default:rdf-update-hypermedia/actors#patch-sparql-update',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_hypermedia__3_0_0_components_ActorRdfUpdateHypermedia_jsonld_ActorRdfUpdateHypermedia_default_bus\n});\nconst urn_comunica_default_rdf_update_hypermedia_actors_put_ldp = new (require('@comunica/actor-rdf-update-hypermedia-put-ldp').ActorRdfUpdateHypermediaPutLdp)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'mediatorRdfSerializeMediatypes': urn_comunica_default_rdf_serialize_mediators_mediaType,\n 'mediatorRdfSerialize': urn_comunica_default_rdf_serialize_mediators_serialize,\n 'name': 'urn:comunica:default:rdf-update-hypermedia/actors#put-ldp',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_hypermedia__3_0_0_components_ActorRdfUpdateHypermedia_jsonld_ActorRdfUpdateHypermedia_default_bus\n});\nconst urn_comunica_default_rdf_update_hypermedia_actors_sparql = new (require('@comunica/actor-rdf-update-hypermedia-sparql').ActorRdfUpdateHypermediaSparql)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'checkUrlSuffixSparql': true,\n 'checkUrlSuffixUpdate': true,\n 'name': 'urn:comunica:default:rdf-update-hypermedia/actors#sparql',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_hypermedia__3_0_0_components_ActorRdfUpdateHypermedia_jsonld_ActorRdfUpdateHypermedia_default_bus\n});\nconst urn_comunica_default_query_operation_actors_ask = new (require('@comunica/actor-query-operation-ask').ActorQueryOperationAsk)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#ask',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_bgp = new (require('@comunica/actor-query-operation-bgp-join').ActorQueryOperationBgpJoin)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#bgp',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_construct = new (require('@comunica/actor-query-operation-construct').ActorQueryOperationConstruct)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#construct',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_distinct = new (require('@comunica/actor-query-operation-distinct-hash').ActorQueryOperationDistinctHash)({\n 'mediatorHashBindings': urn_comunica_default_hash_bindings_mediators_main,\n 'mediatorHashQuads': urn_comunica_default_hash_quads_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#distinct',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_from = new (require('@comunica/actor-query-operation-from-quad').ActorQueryOperationFromQuad)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#from',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_project = new (require('@comunica/actor-query-operation-project').ActorQueryOperationProject)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#project',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_reduced = new (require('@comunica/actor-query-operation-reduced-hash').ActorQueryOperationReducedHash)({\n 'mediatorHashBindings': urn_comunica_default_hash_bindings_mediators_main,\n 'cacheSize': 100,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#reduced',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_slice = new (require('@comunica/actor-query-operation-slice').ActorQueryOperationSlice)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#slice',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_union = new (require('@comunica/actor-query-operation-union').ActorQueryOperationUnion)({\n 'mediatorRdfMetadataAccumulate': urn_comunica_default_rdf_metadata_accumulate_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#union',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_alt = new (require('@comunica/actor-query-operation-path-alt').ActorQueryOperationPathAlt)({\n 'mediatorRdfMetadataAccumulate': urn_comunica_default_rdf_metadata_accumulate_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-alt',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_inv = new (require('@comunica/actor-query-operation-path-inv').ActorQueryOperationPathInv)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-inv',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_link = new (require('@comunica/actor-query-operation-path-link').ActorQueryOperationPathLink)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-link',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_nps = new (require('@comunica/actor-query-operation-path-nps').ActorQueryOperationPathNps)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-nps',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_update_clear = new (require('@comunica/actor-query-operation-update-clear').ActorQueryOperationClear)({\n 'mediatorUpdateQuads': urn_comunica_default_rdf_update_quads_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#update-clear',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_update_composite = new (require('@comunica/actor-query-operation-update-compositeupdate').ActorQueryOperationUpdateCompositeUpdate)({\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#update-composite',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_update_create = new (require('@comunica/actor-query-operation-update-create').ActorQueryOperationCreate)({\n 'mediatorUpdateQuads': urn_comunica_default_rdf_update_quads_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#update-create',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_update_drop = new (require('@comunica/actor-query-operation-update-drop').ActorQueryOperationDrop)({\n 'mediatorUpdateQuads': urn_comunica_default_rdf_update_quads_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#update-drop',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_update_load = new (require('@comunica/actor-query-operation-update-load').ActorQueryOperationLoad)({\n 'mediatorUpdateQuads': urn_comunica_default_rdf_update_quads_mediators_main,\n 'mediatorQuerySourceIdentify': urn_comunica_default_query_source_identify_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#update-load',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_join = new (require('@comunica/actor-query-operation-join').ActorQueryOperationJoin)({\n 'mediatorJoin': urn_comunica_default_rdf_join_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#join',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_minus = new (require('@comunica/actor-query-operation-minus').ActorQueryOperationMinus)({\n 'mediatorJoin': urn_comunica_default_rdf_join_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#minus',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_seq = new (require('@comunica/actor-query-operation-path-seq').ActorQueryOperationPathSeq)({\n 'mediatorJoin': urn_comunica_default_rdf_join_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-seq',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_multi_smallest = new (require('@comunica/actor-rdf-join-inner-multi-smallest').ActorRdfJoinMultiSmallest)({\n 'mediatorJoinEntriesSort': urn_comunica_default_rdf_join_entries_sort_mediators_main,\n 'mediatorJoin': urn_comunica_default_rdf_join_mediators_main,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-multi-smallest',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_multi_smallest_filter_bindings = new (require('@comunica/actor-rdf-join-inner-multi-smallest-filter-bindings').ActorRdfJoinMultiSmallestFilterBindings)({\n 'selectivityModifier': 0.0001,\n 'blockSize': 64,\n 'mediatorJoinEntriesSort': urn_comunica_default_rdf_join_entries_sort_mediators_main,\n 'mediatorJoin': urn_comunica_default_rdf_join_mediators_main,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-multi-smallest-filter-bindings',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_actors_filter_pushdown = new (require('@comunica/actor-optimize-query-operation-filter-pushdown').ActorOptimizeQueryOperationFilterPushdown)({\n 'aggressivePushdown': false,\n 'maxIterations': 10,\n 'splitConjunctive': true,\n 'mergeConjunctive': true,\n 'pushIntoLeftJoins': true,\n 'pushEqualityIntoPatterns': true,\n 'name': 'urn:comunica:default:optimize-query-operation/actors#filter-pushdown',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_group_sources\n]\n});\nconst urn_comunica_default_dereference_actors_http = new (require('@comunica/actor-dereference-http').ActorDereferenceHttp)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'maxAcceptHeaderLength': 1024,\n 'maxAcceptHeaderLengthBrowser': 128,\n 'name': 'urn:comunica:default:dereference/actors#http',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_dereference__3_0_0_components_ActorDereference_jsonld_ActorDereference_default_bus,\n 'beforeActors': [\n urn_comunica_default_dereference_actors_fallback\n]\n});\nconst urn_comunica_default_http_actors_proxy = new (require('@comunica/actor-http-proxy').ActorHttpProxy)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'name': 'urn:comunica:default:http/actors#proxy',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_default_bus,\n 'beforeActors': [\n urn_comunica_default_http_actors_fetch\n]\n});\nconst urn_comunica_default_context_preprocess_actors_query_source_identify = new (require('@comunica/actor-context-preprocess-query-source-identify').ActorContextPreprocessQuerySourceIdentify)({\n 'cacheSize': 100,\n 'httpInvalidator': https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_context_preprocess_query_source_identify__3_0_0_components_ActorContextPreprocessQuerySourceIdentify_jsonld_IActorContextPreprocessQuerySourceIdentifyArgs_default_invalidator,\n 'mediatorQuerySourceIdentify': urn_comunica_default_query_source_identify_mediators_main,\n 'mediatorContextPreprocess': urn_comunica_default_context_preprocess_mediators_main,\n 'name': 'urn:comunica:default:context-preprocess/actors#query-source-identify',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_context_preprocess__3_0_0_components_ActorContextPreprocess_jsonld_ActorContextPreprocess_default_bus,\n 'beforeActors': [\n urn_comunica_default_context_preprocess_actors_query_source_skolemize\n]\n});\nconst urn_comunica_default_init_actors_query = new (require('@comunica/actor-init-query').ActorInitQuery)({\n 'mediatorQueryProcess': urn_comunica_default_query_process_mediators_main,\n 'mediatorQueryResultSerialize': urn_comunica_default_query_result_serialize_mediators_serialize,\n 'mediatorQueryResultSerializeMediaTypeCombiner': urn_comunica_default_query_result_serialize_mediators_mediaType,\n 'mediatorQueryResultSerializeMediaTypeFormatCombiner': urn_comunica_default_query_result_serialize_mediators_mediaTypeFormat,\n 'mediatorHttpInvalidate': urn_comunica_default_http_invalidate_mediators_main,\n 'defaultQueryInputFormat': 'sparql',\n 'allowNoSources': false,\n 'name': 'urn:comunica:default:init/actors#query',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_init__3_0_0_components_ActorInit_jsonld_ActorInit_default_bus\n});\nconst urn_comunica_default_rdf_update_quads_actors_hypermedia = new (require('@comunica/actor-rdf-update-quads-hypermedia').ActorRdfUpdateQuadsHypermedia)({\n 'cacheSize': 100,\n 'httpInvalidator': https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_rdf_update_quads_hypermedia__3_0_0_components_ActorRdfUpdateQuadsHypermedia_jsonld_IActorRdfUpdateQuadsHypermediaArgs_default_invalidator,\n 'mediatorDereferenceRdf': urn_comunica_default_dereference_rdf_mediators_main,\n 'mediatorMetadata': urn_comunica_default_rdf_metadata_mediators_main,\n 'mediatorMetadataExtract': urn_comunica_default_rdf_metadata_extract_mediators_main,\n 'mediatorRdfUpdateHypermedia': urn_comunica_default_rdf_update_hypermedia_mediators_main,\n 'name': 'urn:comunica:default:rdf-update-quads/actors#hypermedia',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_update_quads__3_0_0_components_ActorRdfUpdateQuads_jsonld_ActorRdfUpdateQuads_default_bus\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_sparql_json__3_0_0_components_ActorQueryResultSerializeSparqlJson_jsonld_ActorQueryResultSerializeSparqlJson_default_observer = new (require('@comunica/actor-query-result-serialize-sparql-json').ActionObserverHttp)({\n 'httpInvalidator': https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_sparql_json__3_0_0_components_ActionObserverHttp_jsonld_IActionObserverHttpArgs_default_invalidator,\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^3.0.0/components/ActorQueryResultSerializeSparqlJson.jsonld#ActorQueryResultSerializeSparqlJson_default_observer',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_default_bus\n});\nconst https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_stats__3_0_0_components_ActorQueryResultSerializeStats_jsonld_ActorQueryResultSerializeStats_default_observer = new (require('@comunica/actor-query-result-serialize-stats').ActionObserverHttp)({\n 'httpInvalidator': https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_stats__3_0_0_components_ActionObserverHttp_jsonld_IActionObserverHttpArgs_default_invalidator,\n 'name': 'https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^3.0.0/components/ActorQueryResultSerializeStats.jsonld#ActorQueryResultSerializeStats_default_observer',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_http__3_0_0_components_ActorHttp_jsonld_ActorHttp_default_bus\n});\nconst urn_comunica_default_query_source_identify_hypermedia_actors_qpf = new (require('@comunica/actor-query-source-identify-hypermedia-qpf').ActorQuerySourceIdentifyHypermediaQpf)({\n 'mediatorMetadata': urn_comunica_default_rdf_metadata_mediators_main,\n 'mediatorMetadataExtract': urn_comunica_default_rdf_metadata_extract_mediators_main,\n 'mediatorDereferenceRdf': urn_comunica_default_dereference_rdf_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'subjectUri': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#subject',\n 'predicateUri': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate',\n 'objectUri': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#object',\n 'graphUri': 'http://www.w3.org/ns/sparql-service-description#graph',\n 'name': 'urn:comunica:default:query-source-identify-hypermedia/actors#qpf',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify_hypermedia__3_0_0_components_ActorQuerySourceIdentifyHypermedia_jsonld_ActorQuerySourceIdentifyHypermedia_default_bus\n});\nconst urn_comunica_default_rdf_resolve_quad_pattern_actors_sparql = new (require('@comunica/actor-query-source-identify-hypermedia-sparql').ActorQuerySourceIdentifyHypermediaSparql)({\n 'mediatorHttp': urn_comunica_default_http_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'checkUrlSuffix': true,\n 'forceHttpGet': false,\n 'cacheSize': 1024,\n 'bindMethod': 'values',\n 'countTimeout': 3000,\n 'name': 'urn:comunica:default:rdf-resolve-quad-pattern/actors#sparql',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify_hypermedia__3_0_0_components_ActorQuerySourceIdentifyHypermedia_jsonld_ActorQuerySourceIdentifyHypermedia_default_bus\n});\nconst urn_comunica_default_query_source_identify_hypermedia_actors_none = new (require('@comunica/actor-query-source-identify-hypermedia-none').ActorQuerySourceIdentifyHypermediaNone)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'name': 'urn:comunica:default:query-source-identify-hypermedia/actors#none',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify_hypermedia__3_0_0_components_ActorQuerySourceIdentifyHypermedia_jsonld_ActorQuerySourceIdentifyHypermedia_default_bus\n});\nconst urn_comunica_default_query_operation_actors_extend = new (require('@comunica/actor-query-operation-extend').ActorQueryOperationExtend)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#extend',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_filter = new (require('@comunica/actor-query-operation-filter').ActorQueryOperationFilter)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#filter',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_group = new (require('@comunica/actor-query-operation-group').ActorQueryOperationGroup)({\n 'mediatorHashBindings': urn_comunica_default_hash_bindings_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#group',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_leftjoin = new (require('@comunica/actor-query-operation-leftjoin').ActorQueryOperationLeftJoin)({\n 'mediatorJoin': urn_comunica_default_rdf_join_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#leftjoin',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_orderby = new (require('@comunica/actor-query-operation-orderby').ActorQueryOperationOrderBy)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#orderby',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_nop = new (require('@comunica/actor-query-operation-nop').ActorQueryOperationNop)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#nop',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_service = new (require('@comunica/actor-query-operation-service').ActorQueryOperationService)({\n 'forceSparqlEndpoint': false,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQuerySourceIdentify': urn_comunica_default_query_source_identify_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#service',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_values = new (require('@comunica/actor-query-operation-values').ActorQueryOperationValues)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#values',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_one_or_more = new (require('@comunica/actor-query-operation-path-one-or-more').ActorQueryOperationPathOneOrMore)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-one-or-more',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_zero_or_more = new (require('@comunica/actor-query-operation-path-zero-or-more').ActorQueryOperationPathZeroOrMore)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-zero-or-more',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_path_zero_or_one = new (require('@comunica/actor-query-operation-path-zero-or-one').ActorQueryOperationPathZeroOrOne)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#path-zero-or-one',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_operation_actors_update_delete_insert = new (require('@comunica/actor-query-operation-update-deleteinsert').ActorQueryOperationUpdateDeleteInsert)({\n 'mediatorUpdateQuads': urn_comunica_default_rdf_update_quads_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'name': 'urn:comunica:default:query-operation/actors#update-delete-insert',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_operation__3_0_0_components_ActorQueryOperation_jsonld_ActorQueryOperation_default_bus\n});\nconst urn_comunica_default_query_process_actors_sequential = new (require('@comunica/actor-query-process-sequential').ActorQueryProcessSequential)({\n 'mediatorContextPreprocess': urn_comunica_default_context_preprocess_mediators_main,\n 'mediatorQueryParse': urn_comunica_default_query_parse_mediators_main,\n 'mediatorOptimizeQueryOperation': urn_comunica_default_optimize_query_operation_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'name': 'urn:comunica:default:query-process/actors#sequential',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_process__3_0_0_components_ActorQueryProcess_jsonld_ActorQueryProcess_default_bus\n});\nconst urn_comunica_default_query_source_identify_actors_hypermedia = new (require('@comunica/actor-query-source-identify-hypermedia').ActorQuerySourceIdentifyHypermedia)({\n 'cacheSize': 100,\n 'maxIterators': 64,\n 'aggregateTraversalStore': true,\n 'mediatorDereferenceRdf': urn_comunica_default_dereference_rdf_mediators_main,\n 'mediatorMetadata': urn_comunica_default_rdf_metadata_mediators_main,\n 'mediatorMetadataExtract': urn_comunica_default_rdf_metadata_extract_mediators_main,\n 'mediatorMetadataAccumulate': urn_comunica_default_rdf_metadata_accumulate_mediators_main,\n 'mediatorQuerySourceIdentifyHypermedia': urn_comunica_default_query_source_identify_hypermedia_mediators_main,\n 'mediatorRdfResolveHypermediaLinks': urn_comunica_default_rdf_resolve_hypermedia_links_mediators_main,\n 'mediatorRdfResolveHypermediaLinksQueue': urn_comunica_default_rdf_resolve_hypermedia_links_queue_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'name': 'urn:comunica:default:query-source-identify/actors#hypermedia',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify__3_0_0_components_ActorQuerySourceIdentify_jsonld_ActorQuerySourceIdentify_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_none = new (require('@comunica/actor-rdf-join-inner-none').ActorRdfJoinNone)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-none',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_inner_multi_bind = new (require('@comunica/actor-rdf-join-inner-multi-bind').ActorRdfJoinMultiBind)({\n 'bindOrder': 'depth-first',\n 'selectivityModifier': 0.0001,\n 'minMaxCardinalityRatio': 60,\n 'mediatorJoinEntriesSort': urn_comunica_default_rdf_join_entries_sort_mediators_main,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#inner-multi-bind',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_rdf_join_actors_optional_bind = new (require('@comunica/actor-rdf-join-optional-bind').ActorRdfJoinOptionalBind)({\n 'bindOrder': 'depth-first',\n 'selectivityModifier': 0.000001,\n 'mediatorQueryOperation': urn_comunica_default_query_operation_mediators_main,\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'mediatorJoinSelectivity': urn_comunica_default_rdf_join_selectivity_mediators_main,\n 'name': 'urn:comunica:default:rdf-join/actors#optional-bind',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_rdf_join__3_0_0_components_ActorRdfJoin_jsonld_ActorRdfJoin_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_sparql_json = new (require('@comunica/actor-query-result-serialize-sparql-json').ActorQueryResultSerializeSparqlJson)({\n 'emitMetadata': true,\n 'httpObserver': https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_sparql_json__3_0_0_components_ActorQueryResultSerializeSparqlJson_jsonld_ActorQueryResultSerializeSparqlJson_default_observer,\n 'mediaTypePriorities': {\"application/sparql-results+json\":0.8},\n 'mediaTypeFormats': {\"application/sparql-results+json\":\"http://www.w3.org/ns/formats/SPARQL_Results_JSON\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#sparql-json',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_result_serialize_actors_stats = new (require('@comunica/actor-query-result-serialize-stats').ActorQueryResultSerializeStats)({\n 'httpObserver': https___linkedsoftwaredependencies_org_bundles_npm__comunica_actor_query_result_serialize_stats__3_0_0_components_ActorQueryResultSerializeStats_jsonld_ActorQueryResultSerializeStats_default_observer,\n 'mediaTypePriorities': {\"stats\":0.5},\n 'mediaTypeFormats': {\"stats\":\"https://comunica.linkeddatafragments.org/#results_stats\"},\n 'name': 'urn:comunica:default:query-result-serialize/actors#stats',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_result_serialize__3_0_0_components_ActorQueryResultSerialize_jsonld_ActorQueryResultSerialize_default_bus\n});\nconst urn_comunica_default_query_process_actors_explain_parsed = new (require('@comunica/actor-query-process-explain-parsed').ActorQueryProcessExplainParsed)({\n 'queryProcessor': urn_comunica_default_query_process_actors_sequential,\n 'name': 'urn:comunica:default:query-process/actors#explain-parsed',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_process__3_0_0_components_ActorQueryProcess_jsonld_ActorQueryProcess_default_bus\n});\nconst urn_comunica_default_query_process_actors_explain_logical = new (require('@comunica/actor-query-process-explain-logical').ActorQueryProcessExplainLogical)({\n 'queryProcessor': urn_comunica_default_query_process_actors_sequential,\n 'name': 'urn:comunica:default:query-process/actors#explain-logical',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_process__3_0_0_components_ActorQueryProcess_jsonld_ActorQueryProcess_default_bus\n});\nconst urn_comunica_default_query_process_actors_explain_physical = new (require('@comunica/actor-query-process-explain-physical').ActorQueryProcessExplainPhysical)({\n 'queryProcessor': urn_comunica_default_query_process_actors_sequential,\n 'name': 'urn:comunica:default:query-process/actors#explain-physical',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_process__3_0_0_components_ActorQueryProcess_jsonld_ActorQueryProcess_default_bus\n});\nconst urn_comunica_default_optimize_query_operation_actors_prune_empty_source_operations = new (require('@comunica/actor-optimize-query-operation-prune-empty-source-operations').ActorOptimizeQueryOperationPruneEmptySourceOperations)({\n 'useAskIfSupported': false,\n 'name': 'urn:comunica:default:optimize-query-operation/actors#prune-empty-source-operations',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_filter_pushdown\n]\n});\nconst urn_comunica_default_query_source_identify_actors_rdfjs = new (require('@comunica/actor-query-source-identify-rdfjs').ActorQuerySourceIdentifyRdfJs)({\n 'mediatorMergeBindingsContext': urn_comunica_default_merge_bindings_context_mediators_main,\n 'name': 'urn:comunica:default:query-source-identify/actors#rdfjs',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify__3_0_0_components_ActorQuerySourceIdentify_jsonld_ActorQuerySourceIdentify_default_bus,\n 'beforeActors': [\n urn_comunica_default_query_source_identify_actors_hypermedia\n]\n});\nconst urn_comunica_default_query_source_identify_actors_serialized = new (require('@comunica/actor-query-source-identify-serialized').ActorQuerySourceIdentifySerialized)({\n 'mediatorRdfParse': urn_comunica_default_rdf_parse_mediators_parse,\n 'mediatorQuerySourceIdentify': urn_comunica_default_query_source_identify_mediators_main,\n 'name': 'urn:comunica:default:query-source-identify/actors#serialized',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_query_source_identify__3_0_0_components_ActorQuerySourceIdentify_jsonld_ActorQuerySourceIdentify_default_bus,\n 'beforeActors': [\n urn_comunica_default_query_source_identify_actors_hypermedia\n]\n});\nconst urn_comunica_default_optimize_query_operation_actors_join_connected = new (require('@comunica/actor-optimize-query-operation-join-connected').ActorOptimizeQueryOperationJoinConnected)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#join-connected',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_prune_empty_source_operations\n]\n});\nconst urn_comunica_default_optimize_query_operation_actors_bgp_to_join = new (require('@comunica/actor-optimize-query-operation-bgp-to-join').ActorOptimizeQueryOperationBgpToJoin)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#bgp-to-join',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_join_connected\n]\n});\nconst urn_comunica_default_optimize_query_operation_actors_join_bgp = new (require('@comunica/actor-optimize-query-operation-join-bgp').ActorOptimizeQueryOperationJoinBgp)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#join-bgp',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_bgp_to_join\n]\n});\nconst urn_comunica_default_optimize_query_operation_actors_assign_sources_exhaustive = new (require('@comunica/actor-optimize-query-operation-assign-sources-exhaustive').ActorOptimizeQueryOperationAssignSourcesExhaustive)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#assign-sources-exhaustive',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_join_bgp\n]\n});\nconst urn_comunica_default_optimize_query_operation_actors_describe_to_constructs_subject = new (require('@comunica/actor-optimize-query-operation-describe-to-constructs-subject').ActorOptimizeQueryOperationDescribeToConstructsSubject)({\n 'name': 'urn:comunica:default:optimize-query-operation/actors#describe-to-constructs-subject',\n 'bus': https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_optimize_query_operation__3_0_0_components_ActorOptimizeQueryOperation_jsonld_ActorOptimizeQueryOperation_default_bus,\n 'beforeActors': [\n urn_comunica_default_optimize_query_operation_actors_assign_sources_exhaustive\n]\n});\nconst urn_comunica_default_Runner = (https___linkedsoftwaredependencies_org_bundles_npm__comunica_bus_init__3_0_0_components_ActorInit_jsonld_ActorInit_default_bus, [\n urn_comunica_default_context_preprocess_actors_convert_shortcuts,\n urn_comunica_default_context_preprocess_actors_set_defaults,\n urn_comunica_default_context_preprocess_actors_source_to_destination,\n urn_comunica_default_context_preprocess_actors_query_source_identify,\n urn_comunica_default_context_preprocess_actors_query_source_skolemize,\n urn_comunica_default_hash_bindings_actors_sha1,\n urn_comunica_default_hash_quads_actors_sha1,\n urn_comunica_default_init_actors_query,\n urn_comunica_default_optimize_query_operation_actors_rewrite_copy,\n urn_comunica_default_optimize_query_operation_actors_rewrite_move,\n urn_comunica_default_optimize_query_operation_actors_rewrite_add,\n urn_comunica_default_optimize_query_operation_actors_describe_to_constructs_subject,\n urn_comunica_default_optimize_query_operation_actors_assign_sources_exhaustive,\n urn_comunica_default_optimize_query_operation_actors_join_bgp,\n urn_comunica_default_optimize_query_operation_actors_bgp_to_join,\n urn_comunica_default_optimize_query_operation_actors_join_connected,\n urn_comunica_default_optimize_query_operation_actors_prune_empty_source_operations,\n urn_comunica_default_optimize_query_operation_actors_filter_pushdown,\n urn_comunica_default_optimize_query_operation_actors_group_sources,\n urn_comunica_default_optimize_query_operation_actors_construct_distinct,\n urn_comunica_default_query_parse_actors_sparql,\n urn_comunica_default_query_parse_actors_graphql,\n urn_comunica_default_query_result_serialize_actors_json,\n urn_comunica_default_query_result_serialize_actors_rdf,\n urn_comunica_default_query_result_serialize_actors_simple,\n urn_comunica_default_query_result_serialize_actors_csv,\n urn_comunica_default_query_result_serialize_actors_sparql_json,\n urn_comunica_default_query_result_serialize_actors_sparql_tsv,\n urn_comunica_default_query_result_serialize_actors_sparql_xml,\n urn_comunica_default_query_result_serialize_actors_stats,\n urn_comunica_default_query_result_serialize_actors_table,\n urn_comunica_default_query_result_serialize_actors_tree,\n urn_comunica_default_query_source_identify_hypermedia_actors_qpf,\n urn_comunica_default_rdf_resolve_quad_pattern_actors_sparql,\n urn_comunica_default_query_source_identify_hypermedia_actors_none,\n urn_comunica_default_dereference_actors_http,\n urn_comunica_default_dereference_actors_fallback,\n urn_comunica_default_dereference_rdf_actors_parse,\n urn_comunica_default_rdf_join_entries_sort_actors_cardinality,\n urn_comunica_default_rdf_join_selectivity_actors_variable_counting,\n urn_comunica_default_rdf_metadata_actors_primary_topic,\n urn_comunica_default_rdf_metadata_actors_all,\n urn_comunica_default_rdf_metadata_accumulate_actors_cancontainundefs,\n urn_comunica_default_rdf_metadata_accumulate_actors_cardinality,\n urn_comunica_default_rdf_metadata_accumulate_actors_pagesize,\n urn_comunica_default_rdf_metadata_accumulate_actors_requesttime,\n urn_comunica_default_rdf_metadata_extract_actors_hydra_controls,\n urn_comunica_default_rdf_metadata_extract_actors_hydra_count,\n urn_comunica_default_rdf_metadata_extract_actors_hydra_pagesize,\n urn_comunica_default_rdf_metadata_extract_actors_request_time,\n urn_comunica_default_rdf_metadata_extract_actors_allow_http_methods,\n urn_comunica_default_rdf_metadata_extract_actors_put_accepted,\n urn_comunica_default_rdf_metadata_extract_actors_patch_sparql_update,\n urn_comunica_default_rdf_metadata_extract_actors_sparql_service,\n urn_comunica_default_rdf_parse_actors_n3,\n urn_comunica_default_rdf_parse_actors_jsonld,\n urn_comunica_default_rdf_parse_actors_rdfxml,\n urn_comunica_default_rdf_parse_actors_xmlrdfa,\n urn_comunica_default_rdf_parse_actors_html,\n urn_comunica_default_rdf_parse_actors_shaclc,\n urn_comunica_default_rdf_parse_html_actors_microdata,\n urn_comunica_default_rdf_parse_html_actors_rdfa,\n urn_comunica_default_rdf_parse_html_actors_script,\n urn_comunica_default_rdf_resolve_hypermedia_links_actors_next,\n urn_comunica_default_rdf_resolve_hypermedia_links_queue_actors_fifo,\n urn_comunica_default_rdf_serialize_actors_n3,\n urn_comunica_default_rdf_serialize_actors_jsonld,\n urn_comunica_default_rdf_serialize_actors_shaclc,\n urn_comunica_default_rdf_update_hypermedia_actors_patch_sparql_update,\n urn_comunica_default_rdf_update_hypermedia_actors_put_ldp,\n urn_comunica_default_rdf_update_hypermedia_actors_sparql,\n urn_comunica_default_rdf_update_quads_actors_hypermedia,\n urn_comunica_default_rdf_update_quads_actors_rdfjs_store,\n urn_comunica_default_http_actors_proxy,\n urn_comunica_default_http_actors_fetch,\n urn_comunica_default_http_actors_wayback,\n urn_comunica_default_query_operation_actors_ask,\n urn_comunica_default_query_operation_actors_bgp,\n urn_comunica_default_query_operation_actors_construct,\n urn_comunica_default_query_operation_actors_distinct,\n urn_comunica_default_query_operation_actors_extend,\n urn_comunica_default_query_operation_actors_filter,\n urn_comunica_default_query_operation_actors_from,\n urn_comunica_default_query_operation_actors_group,\n urn_comunica_default_query_operation_actors_leftjoin,\n urn_comunica_default_query_operation_actors_join,\n urn_comunica_default_query_operation_actors_minus,\n urn_comunica_default_query_operation_actors_orderby,\n urn_comunica_default_query_operation_actors_nop,\n urn_comunica_default_query_operation_actors_project,\n urn_comunica_default_query_operation_actors_reduced,\n urn_comunica_default_query_operation_actors_service,\n urn_comunica_default_query_operation_actors_slice,\n urn_comunica_default_query_operation_actors_source,\n urn_comunica_default_query_operation_actors_union,\n urn_comunica_default_query_operation_actors_values,\n urn_comunica_default_query_operation_actors_path_alt,\n urn_comunica_default_query_operation_actors_path_inv,\n urn_comunica_default_query_operation_actors_path_link,\n urn_comunica_default_query_operation_actors_path_nps,\n urn_comunica_default_query_operation_actors_path_one_or_more,\n urn_comunica_default_query_operation_actors_path_seq,\n urn_comunica_default_query_operation_actors_path_zero_or_more,\n urn_comunica_default_query_operation_actors_path_zero_or_one,\n urn_comunica_default_query_operation_actors_update_clear,\n urn_comunica_default_query_operation_actors_update_composite,\n urn_comunica_default_query_operation_actors_update_create,\n urn_comunica_default_query_operation_actors_update_delete_insert,\n urn_comunica_default_query_operation_actors_update_drop,\n urn_comunica_default_query_operation_actors_update_load,\n urn_comunica_default_query_process_actors_sequential,\n urn_comunica_default_query_process_actors_explain_parsed,\n urn_comunica_default_query_process_actors_explain_logical,\n urn_comunica_default_query_process_actors_explain_physical,\n urn_comunica_default_query_source_identify_actors_hypermedia,\n urn_comunica_default_query_source_identify_actors_rdfjs,\n urn_comunica_default_query_source_identify_actors_serialized,\n urn_comunica_default_rdf_join_actors_inner_none,\n urn_comunica_default_rdf_join_actors_inner_single,\n urn_comunica_default_rdf_join_actors_inner_multi_empty,\n urn_comunica_default_rdf_join_actors_inner_multi_bind_source,\n urn_comunica_default_rdf_join_actors_inner_multi_bind,\n urn_comunica_default_rdf_join_actors_inner_hash,\n urn_comunica_default_rdf_join_actors_inner_symmetric_hash,\n urn_comunica_default_rdf_join_actors_inner_nested_loop,\n urn_comunica_default_rdf_join_actors_inner_multi_smallest,\n urn_comunica_default_rdf_join_actors_inner_multi_smallest_filter_bindings,\n urn_comunica_default_rdf_join_actors_minus_hash,\n urn_comunica_default_rdf_join_actors_minus_hash_undef,\n urn_comunica_default_rdf_join_actors_optional_bind,\n urn_comunica_default_rdf_join_actors_optional_hash_def_nonblocking,\n urn_comunica_default_rdf_join_actors_optional_hash_def_blocking,\n urn_comunica_default_rdf_join_actors_optional_hash_undef_nonblocking,\n urn_comunica_default_rdf_join_actors_optional_hash_undef_blocking,\n urn_comunica_default_rdf_join_actors_optional_nested_loop\n]);\nreturn urn_comunica_default_init_actors_query;\n}\n\n","import { QueryEngineBase } from '@comunica/actor-init-query';\nimport type { ActorInitQueryBase } from '@comunica/actor-init-query';\nimport type { IQueryContextCommon } from '@comunica/types';\n\n// eslint-disable-next-line ts/no-require-imports,ts/no-var-requires,import/extensions\nconst engineDefault = require('../engine-default.js');\n\n/**\n * A Comunica SPARQL query engine.\n */\nexport class QueryEngine\n extends QueryEngineBase {\n public constructor(engine: ActorInitQueryBase = engineDefault()) {\n super(engine);\n }\n}\n","/* eslint-disable unicorn/filename-case */\n/* eslint-enable unicorn/filename-case */\nexport * from './QueryEngine';\n","import type { IAction, IActorArgs, IActorOutput, IActorTest, Mediate } from '@comunica/core';\nimport { Actor } from '@comunica/core';\nimport type { IActionContext } from '@comunica/types';\n\n/**\n * An abstract actor that handles media-typed actions.\n *\n * It splits up a action between a 'handle' and a 'mediaTypes' action.\n * A 'mediaTypes' action is used to retrieve the available media types from this actor.\n * A 'handle' action is abstract, and can be implemented to do anything,\n * such as parsing, serializing, etc.\n * @see IActionAbstractMediaTyped\n *\n * @see ActorAbstractMediaTypedFixed\n */\nexport abstract class ActorAbstractMediaTyped\n extends Actor, IActorTestAbstractMediaTyped, IActorOutputAbstractMediaTyped> {\n public constructor(args: IActorArgsMediaTyped) {\n super(args);\n }\n\n public async run(action: IActionAbstractMediaTyped): Promise> {\n if ('handle' in action) {\n const typedAction: IActionAbstractMediaTypedHandle = action;\n return { handle: await this.runHandle(typedAction.handle, typedAction.handleMediaType, action.context) };\n }\n if ('mediaTypes' in action) {\n return { mediaTypes: await this.getMediaTypes(action.context) };\n }\n if ('mediaTypeFormats' in action) {\n return { mediaTypeFormats: await this.getMediaTypeFormats(action.context) };\n }\n throw new Error('Either a handle, mediaTypes or mediaTypeFormats action needs to be provided');\n }\n\n public async test(action: IActionAbstractMediaTyped): Promise> {\n if ('handle' in action) {\n const typedAction: IActionAbstractMediaTypedHandle = action;\n return { handle: await this.testHandle(typedAction.handle, typedAction.handleMediaType, action.context) };\n }\n if ('mediaTypes' in action) {\n return { mediaTypes: await this.testMediaType(action.context) };\n }\n if ('mediaTypeFormats' in action) {\n return { mediaTypeFormats: await this.testMediaTypeFormats(action.context) };\n }\n throw new Error('Either a handle, mediaTypes or mediaTypeFormats action needs to be provided');\n }\n\n /**\n * Check if this actor can run the given handle action,\n * without actually running it.\n *\n * @param {HI} action The handle action to test.\n * @param {string} mediaType The media type to test.\n * @param {ActionContext} context An optional context.\n * @return {Promise} A promise that resolves to the handle test result.\n */\n public abstract testHandle(action: HI, mediaType: string | undefined, context: IActionContext): Promise;\n\n /**\n * Run the given handle action on this actor.\n *\n * @param {HI} action The handle action to run.\n * @param {string} mediaType The media type to run with.\n * @param {ActionContext} context An optional context.\n * @return {Promise} A promise that resolves to the handle run result.\n */\n public abstract runHandle(action: HI, mediaType: string | undefined, context: IActionContext): Promise;\n\n /**\n * Check if this actor can emit its media types.\n *\n * @param {ActionContext} context An optional context.\n * @return {Promise} A promise that resolves to the media type run result.\n */\n public abstract testMediaType(context: IActionContext): Promise;\n\n /**\n * Get the media type of this given actor.\n *\n * @param {ActionContext} context An optional context.\n * @return {Promise<{[id: string]: number}>} A promise that resolves to the media types.\n */\n public abstract getMediaTypes(context: IActionContext): Promise>;\n\n /**\n * Check if this actor can emit its media type formats.\n *\n * @param {ActionContext} context An optional context.\n * @return {Promise} A promise that resolves to the media type run result.\n */\n public abstract testMediaTypeFormats(context: IActionContext): Promise;\n\n /**\n * Get the media type formats of this given actor.\n *\n * @param {ActionContext} context An optional context.\n * @return {Promise<{[id: string]: string}>} A promise that resolves to the media types.\n */\n public abstract getMediaTypeFormats(context: IActionContext): Promise>;\n}\n\nexport interface IActorArgsMediaTyped extends IActorArgs<\n IActionAbstractMediaTyped,\nIActorTestAbstractMediaTyped,\nIActorOutputAbstractMediaTyped\n> {}\n\nexport type IActionAbstractMediaTyped = IActionAbstractMediaTypedHandle | IActionAbstractMediaTypedMediaTypes\n| IActionAbstractMediaTypedMediaTypeFormats;\nexport interface IActionAbstractMediaTypedHandle extends IAction {\n /**\n * The handle action input.\n */\n handle: HI;\n /**\n * The handle media type that should be used when 'handle' is truthy.\n */\n handleMediaType?: string;\n}\n\nexport interface IActionAbstractMediaTypedMediaTypes extends IAction {\n /**\n * True if media types should be retrieved.\n */\n mediaTypes: boolean;\n}\n\nexport interface IActionAbstractMediaTypedMediaTypeFormats extends IAction {\n /**\n * True if media type formats should be retrieved.\n */\n mediaTypeFormats: boolean;\n}\n\n/**\n * Either 'handle', or 'mediaTypes' or 'mediaTypeFormats' must be truthy.\n * Groups may not be truthy at the same time.\n */\nexport type IActorTestAbstractMediaTyped = IActorTestAbstractMediaTypedHandle\n| IActorTestAbstractMediaTypedMediaTypes | IActorTestAbstractMediaTypedMediaTypeFormats;\nexport interface IActorTestAbstractMediaTypedHandle extends IActorTest {\n /**\n * The handle test output.\n */\n handle: HT;\n}\nexport interface IActorTestAbstractMediaTypedMediaTypes extends IActorTest {\n /**\n * True if media types can be retrieved.\n */\n mediaTypes: boolean;\n}\nexport interface IActorTestAbstractMediaTypedMediaTypeFormats extends IActorTest {\n /**\n * True if media type formats can be retrieved.\n */\n mediaTypeFormats?: boolean;\n}\n\n/**\n * Either 'handle', or 'mediaTypes' or 'mediaTypeFormats' must be truthy.\n * Groups may not be truthy at the same time.\n */\nexport type IActorOutputAbstractMediaTyped = IActorOutputAbstractMediaTypedHandle\n| IActorOutputAbstractMediaTypedMediaTypes | IActorOutputAbstractMediaTypedMediaTypeFormats;\nexport interface IActorOutputAbstractMediaTypedHandle extends IActorOutput {\n /**\n * The handle action output.\n */\n handle: HO;\n}\nexport interface IActorOutputAbstractMediaTypedMediaTypes extends IActorOutput {\n /**\n * An object containing media types as keys,\n * and preferences as values, with values ranging from 0 to 1.\n */\n mediaTypes: Record;\n}\nexport interface IActorOutputAbstractMediaTypedMediaTypeFormats extends IActorOutput {\n /**\n * An object containing media types as keys,\n * and format IRIs as values.\n */\n mediaTypeFormats: Record;\n}\n\nexport type MediateMediaTypes = Mediate<\nIActionAbstractMediaTypedMediaTypes,\nIActorOutputAbstractMediaTypedMediaTypes,\nIActorTestAbstractMediaTypedMediaTypes\n>;\n\nexport type MediateMediaTyped = Mediate<\nIActionAbstractMediaTypedHandle,\nIActorOutputAbstractMediaTypedHandle,\nIActorTestAbstractMediaTypedHandle\n>;\n","import type { IActionContext } from '@comunica/types';\nimport type { IActorArgsMediaTyped } from './ActorAbstractMediaTyped';\nimport { ActorAbstractMediaTyped } from './ActorAbstractMediaTyped';\n\nexport abstract class ActorAbstractMediaTypedFixed extends ActorAbstractMediaTyped {\n public readonly mediaTypePriorities: Record;\n public readonly mediaTypeFormats: Record;\n public readonly priorityScale: number;\n\n public constructor(args: IActorArgsMediaTypedFixed) {\n super(args);\n const scale: number = this.priorityScale || this.priorityScale === 0 ? this.priorityScale : 1;\n if (this.mediaTypePriorities) {\n for (const [ _index, [ key, value ]] of Object.entries(this.mediaTypePriorities).entries()) {\n this.mediaTypePriorities[key] = scale * value;\n }\n }\n this.mediaTypePriorities = Object.freeze(this.mediaTypePriorities);\n this.mediaTypeFormats = Object.freeze(this.mediaTypeFormats);\n }\n\n public async testHandle(action: HI, mediaType: string | undefined, context: IActionContext): Promise {\n if (!mediaType || !(mediaType in this.mediaTypePriorities)) {\n throw new Error(`Unrecognized media type: ${mediaType}`);\n }\n return await this.testHandleChecked(action, context);\n }\n\n /**\n * Check to see if this actor can handle the given action.\n * The media type has already been checked before this is called.\n *\n * @param {ActionContext} context An optional context.\n * @param {HI} action The action to test.\n */\n public abstract testHandleChecked(action: HI, context: IActionContext): Promise;\n\n public async testMediaType(_context: IActionContext): Promise {\n return true;\n }\n\n public async getMediaTypes(_context: IActionContext): Promise> {\n return this.mediaTypePriorities;\n }\n\n public async testMediaTypeFormats(_context: IActionContext): Promise {\n return true;\n }\n\n public async getMediaTypeFormats(_context: IActionContext): Promise> {\n return this.mediaTypeFormats;\n }\n}\n\nexport interface IActorArgsMediaTypedFixed extends IActorArgsMediaTyped {\n /**\n * A record of media types, with media type name as key, and its priority as value.\n * Priorities are numbers between [0, 1].\n * @range {json}\n */\n mediaTypePriorities: Record;\n /**\n * A record of media types, with media type name as key, and its format IRI as value.\n * @range {json}\n */\n mediaTypeFormats: Record;\n /**\n * A multiplier for media type priorities.\n * This can be used for keeping the original media types in place,\n * but scaling all of their scores with a certain value.\n * @range {double}\n */\n priorityScale?: number;\n}\n","export * from './ActorAbstractMediaTyped';\nexport * from './ActorAbstractMediaTypedFixed';\n","import type { BindingsFactory } from '@comunica/bindings-factory';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n IQueryOperationResultBindings,\n Bindings,\n IActionContext,\n MetadataBindings,\n IQuerySourceWrapper,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport {\n BufferedIterator,\n MultiTransformIterator,\n TransformIterator,\n EmptyIterator,\n} from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport { termToString } from 'rdf-string';\nimport { Algebra, Factory } from 'sparqlalgebrajs';\nimport { PathVariableObjectIterator } from './PathVariableObjectIterator';\n\nconst DF = new DataFactory();\n\n/**\n * An abstract actor that handles Path operations.\n *\n * Provides multiple helper functions used by the Path operation actors.\n */\nexport abstract class ActorAbstractPath extends ActorQueryOperationTypedMediated {\n protected static readonly FACTORY: Factory = new Factory();\n\n protected readonly predicateType: string;\n\n protected constructor(args: IActorQueryOperationTypedMediatedArgs, predicateType: string) {\n super(args, 'path');\n this.predicateType = predicateType;\n }\n\n public async testOperation(operation: Algebra.Path, _context: IActionContext): Promise {\n if (operation.predicate.type !== this.predicateType) {\n throw new Error(`This Actor only supports ${this.predicateType} Path operations.`);\n }\n\n return true;\n }\n\n // Generates a variable that does not yet occur in the path\n public generateVariable(path?: Algebra.Path, name?: string): RDF.Variable {\n if (!name) {\n return this.generateVariable(path, 'b');\n }\n\n // Path predicates can't contain variables\n if (path && (path.subject.value === name || path.object.value === name)) {\n return this.generateVariable(path, `${name}b`);\n }\n\n return DF.variable(name);\n }\n\n // Such connectivity matching does not introduce duplicates (it does not incorporate any count of the number\n // of ways the connection can be made) even if the repeated path itself would otherwise result in duplicates.\n // https://www.w3.org/TR/sparql11-query/#propertypaths\n public async isPathArbitraryLengthDistinct(context: IActionContext, path: Algebra.Path):\n Promise<{ context: IActionContext; operation: IQueryOperationResultBindings | undefined }> {\n if (!context.get(KeysQueryOperation.isPathArbitraryLengthDistinctKey)) {\n context = context.set(KeysQueryOperation.isPathArbitraryLengthDistinctKey, true);\n return { context, operation: ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({\n operation: ActorAbstractPath.FACTORY.createDistinct(path),\n context,\n })) };\n }\n\n context = context.set(KeysQueryOperation.isPathArbitraryLengthDistinctKey, false);\n return { context, operation: undefined };\n }\n\n private async predicateStarGraphVariable(\n subject: RDF.Term,\n object: RDF.Variable,\n predicate: Algebra.PropertyPathSymbol,\n graph: RDF.Variable,\n context: IActionContext,\n bindingsFactory: BindingsFactory,\n ): Promise {\n const sources = this.getPathSources(predicate);\n // TODO: refactor this with an iterator just like PathVariableObjectIterator so we handle backpressure correctly\n // Construct path to obtain all graphs where subject exists\n const predVar = this.generateVariable(ActorAbstractPath.FACTORY\n .createPath(subject, predicate, object, graph));\n const findGraphs = ActorAbstractPath.FACTORY.createUnion([\n this.assignPatternSources(ActorAbstractPath.FACTORY.createPattern(subject, predVar, object, graph), sources),\n this.assignPatternSources(ActorAbstractPath.FACTORY.createPattern(object, predVar, subject, graph), sources),\n ]);\n const results = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ context, operation: findGraphs }),\n );\n\n const passedGraphs: Set = new Set();\n\n const bindingsStream = new MultiTransformIterator(\n results.bindingsStream,\n {\n multiTransform: (bindings: Bindings) => {\n // Extract the graph and start a predicate* search starting from subject in each graph\n const graphValue: RDF.Term = bindings.get(graph)!;\n if (passedGraphs.has(graphValue.value)) {\n return new EmptyIterator();\n }\n passedGraphs.add(graphValue.value);\n return new TransformIterator(\n async() => {\n const it = new BufferedIterator();\n await this.getObjectsPredicateStar(subject, predicate, graphValue, context, {}, it, { count: 0 });\n return it.transform({\n transform(item, next, push) {\n push(bindingsFactory.bindings([\n [ object, item ],\n [ graph, graphValue ],\n ]));\n next();\n },\n });\n },\n { maxBufferSize: 128 },\n );\n },\n autoStart: false,\n },\n );\n\n return {\n bindingsStream,\n metadata: results.metadata,\n };\n }\n\n /**\n * Returns an iterator with Bindings of the query subject predicate* ?o or subject predicate+ ?o\n * If graph is a variable, it will also be in those bindings\n * @param {Term} subject Term of where we start the predicate* search.\n * @param {Algebra.PropertyPathSymbol} predicate Predicate of the *-path.\n * @param {Variable} object Variable of the zeroOrMore-query.\n * @param {Term} graph The graph in which we search for the pattern. (Possibly a variable)\n * @param {ActionContext} context The context to pass to sub-opertations\n * @param emitFirstSubject If the path operation is predicate*, otherwise it is predicate+.\n * @return {Promise} Iterator to where all bindings of query should have been pushed.\n */\n public async getObjectsPredicateStarEval(\n subject: RDF.Term,\n predicate: Algebra.PropertyPathSymbol,\n object: RDF.Variable,\n graph: RDF.Term,\n context: IActionContext,\n emitFirstSubject: boolean,\n bindingsFactory: BindingsFactory,\n ): Promise {\n if (graph.termType === 'Variable') {\n return this.predicateStarGraphVariable(subject, object, predicate, graph, context, bindingsFactory);\n }\n\n const it = new PathVariableObjectIterator(\n subject,\n predicate,\n graph,\n context,\n this.mediatorQueryOperation,\n emitFirstSubject,\n );\n\n const bindingsStream = it.transform({\n autoStart: false,\n transform(item, next, push) {\n push(bindingsFactory.bindings([[ object, item ]]));\n next();\n },\n });\n\n return {\n bindingsStream,\n async metadata() {\n const metadata: MetadataBindings = await new Promise((resolve) => {\n it.getProperty('metadata', (metadataInner: any) => resolve(metadataInner()));\n });\n // Increment cardinality by one, because we always have at least one result once we reach this stage.\n // See the transformation above where we push a single binding.\n metadata.cardinality.value++;\n return metadata;\n },\n };\n }\n\n /**\n * Pushes all terms to iterator `it` that are a solution of object predicate* ?o.\n * @param {Term} object Term of where we start the predicate* search.\n * @param {Algebra.PropertyPathSymbol} predicate Predicate of the *-path.\n * @param {Term} graph The graph in which we search for the pattern.\n * @param {ActionContext} context\n * @param {Record} termHashes Remembers the objects we've already searched for.\n * @param {BufferedIterator} it Iterator to push terms to.\n * @param {any} counter Counts how many searches are in progress to close it when needed (when counter == 0).\n * @return {Promise} The results metadata.\n */\n public async getObjectsPredicateStar(\n object: RDF.Term,\n predicate: Algebra.PropertyPathSymbol,\n graph: RDF.Term,\n context: IActionContext,\n termHashes: Record,\n it: BufferedIterator,\n counter: any,\n ): Promise {\n const termString = termToString(object);\n if (termHashes[termString]) {\n return;\n }\n\n ( it)._push(object);\n termHashes[termString] = object;\n counter.count++;\n\n const thisVariable = this.generateVariable();\n const path = ActorAbstractPath.FACTORY.createPath(object, predicate, thisVariable, graph);\n const results = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation: path, context }),\n );\n // TODO: fixme\n // eslint-disable-next-line ts/no-misused-promises\n results.bindingsStream.on('data', async(bindings: Bindings) => {\n const result = bindings.get(thisVariable);\n await this.getObjectsPredicateStar(result!, predicate, graph, context, termHashes, it, counter);\n });\n results.bindingsStream.on('end', () => {\n if (--counter.count === 0) {\n it.close();\n }\n });\n\n return results.metadata;\n }\n\n /**\n * Pushes all terms to iterator `it` that are a solution of ?s predicate* ?o.\n * @param {string} subjectVar String representation of subjectVariable\n * @param {string} objectVar String representation of objectVariable\n * @param {Term} subjectVal Term of where we start the predicate* search.\n * @param {Term} objectVal Found solution for an object, start for the new step.\n * @param {Algebra.PropertyPathSymbol} predicate Predicate of the *-path.\n * @param {Term} graph The graph in which we search for the pattern.\n * @param {ActionContext} context\n * @param {{[id: string]: Promise}} termHashesGlobal\n * Remembers solutions for when objectVal is already been calculated, can be reused when same objectVal occurs\n * @param {{[id: string]: Term}} termHashesCurrentSubject\n * Remembers the pairs we've already searched for, can stop searching if so.\n * @param {BufferedIterator} it Iterator to push terms to.\n * @param {any} counter Counts how many searches are in progress to close it when needed (when counter == 0).\n * @return {Promise} All solutions of query should have been pushed to it by then.\n */\n // Let the iterator `it` emit all bindings of size 2, with subjectStringVariable as value subjectVal\n // and objectStringVariable as value all nodes reachable through predicate* beginning at objectVal\n public async getSubjectAndObjectBindingsPredicateStar(\n subjectVar: RDF.Variable,\n objectVar: RDF.Variable,\n subjectVal: RDF.Term,\n objectVal: RDF.Term,\n predicate: Algebra.PropertyPathSymbol,\n graph: RDF.Term,\n context: IActionContext,\n termHashesGlobal: Record>,\n termHashesCurrentSubject: Record,\n it: BufferedIterator,\n counter: any,\n bindingsFactory: BindingsFactory,\n ): Promise {\n const termString = termToString(objectVal) + termToString(graph);\n\n // If this combination of subject and object already done, return nothing\n if (termHashesCurrentSubject[termString]) {\n return;\n }\n\n counter.count++;\n termHashesCurrentSubject[termString] = true;\n ( it)._push(bindingsFactory.bindings([\n [ subjectVar, subjectVal ],\n [ objectVar, objectVal ],\n ]));\n\n // If every reachable node from object has already been calculated, use these for current subject too\n if (termString in termHashesGlobal) {\n const objects = await termHashesGlobal[termString];\n for (const object of objects) {\n await this.getSubjectAndObjectBindingsPredicateStar(\n subjectVar,\n objectVar,\n subjectVal,\n object,\n predicate,\n graph,\n context,\n termHashesGlobal,\n termHashesCurrentSubject,\n it,\n counter,\n bindingsFactory,\n );\n }\n if (--counter.count === 0) {\n it.close();\n }\n\n return;\n }\n\n // Construct promise to calculate all reachable nodes from this object\n // TODO: fixme\n // eslint-disable-next-line no-async-promise-executor,ts/no-misused-promises\n const promise = new Promise(async(resolve, reject) => {\n const objectsArray: RDF.Term[] = [];\n\n // Construct path that leads us one step through predicate\n const thisVariable = this.generateVariable();\n const path = ActorAbstractPath.FACTORY.createPath(objectVal, predicate, thisVariable, graph);\n const results = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation: path, context }),\n );\n\n // Recursive call on all neighbours\n // TODO: fixme\n // eslint-disable-next-line ts/no-misused-promises\n results.bindingsStream.on('data', async(bindings: RDF.Bindings) => {\n const result: RDF.Term = bindings.get(thisVariable)!;\n objectsArray.push(result);\n await this.getSubjectAndObjectBindingsPredicateStar(\n subjectVar,\n objectVar,\n subjectVal,\n result,\n predicate,\n graph,\n context,\n termHashesGlobal,\n termHashesCurrentSubject,\n it,\n counter,\n bindingsFactory,\n );\n });\n results.bindingsStream.on('error', reject);\n results.bindingsStream.on('end', () => {\n if (--counter.count === 0) {\n it.close();\n }\n resolve(objectsArray);\n });\n });\n\n // Set it in the termHashesGlobal when this object occurs again they can wait for this promise\n termHashesGlobal[termString] = promise;\n }\n\n /**\n * Find all sources recursively contained in the given path operation.\n * @param operation\n */\n public getPathSources(operation: Algebra.PropertyPathSymbol): IQuerySourceWrapper[] {\n switch (operation.type) {\n case Algebra.types.ALT:\n case Algebra.types.SEQ:\n return operation.input\n .flatMap((subOp: Algebra.PropertyPathSymbol) => this.getPathSources(subOp));\n case Algebra.types.INV:\n case Algebra.types.ONE_OR_MORE_PATH:\n case Algebra.types.ZERO_OR_MORE_PATH:\n case Algebra.types.ZERO_OR_ONE_PATH:\n return this.getPathSources(operation.path);\n case Algebra.types.LINK:\n case Algebra.types.NPS: {\n const source = ActorQueryOperation.getOperationSource(operation);\n if (!source) {\n throw new Error(`Could not find a required source on a link path operation`);\n }\n return [ source ];\n }\n }\n }\n\n public assignPatternSources(pattern: Algebra.Pattern, sources: IQuerySourceWrapper[]): Algebra.Operation {\n if (sources.length === 0) {\n throw new Error(`Attempted to assign zero sources to a pattern during property path handling`);\n }\n if (sources.length === 1) {\n return ActorQueryOperation.assignOperationSource(pattern, sources[0]);\n }\n return ActorAbstractPath.FACTORY.createUnion(sources\n .map(source => ActorQueryOperation.assignOperationSource(pattern, source)), true);\n }\n}\n\nexport interface IPathResultStream {\n bindingsStream: AsyncIterator;\n metadata: () => Promise;\n}\n","import type { MediatorQueryOperation } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { IActionContext } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { BufferedIterator } from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport { termToString } from 'rdf-string';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\nconst FACTORY = new Factory();\n\n/**\n * An iterator that implements the multi-length property path operation (* and +)\n * for a fixed subject and predicate, and a variable object.\n */\nexport class PathVariableObjectIterator extends BufferedIterator {\n private readonly termHashes: Map = new Map();\n private readonly runningOperations: AsyncIterator[] = [];\n private readonly pendingOperations: { variable: RDF.Variable; operation: Algebra.Path }[] = [];\n\n public constructor(\n private readonly subject: RDF.Term,\n private readonly predicate: Algebra.PropertyPathSymbol,\n private readonly graph: RDF.Term,\n private readonly context: IActionContext,\n private readonly mediatorQueryOperation: MediatorQueryOperation,\n emitFirstSubject: boolean,\n private readonly maxRunningOperations = 16,\n ) {\n // The autoStart flag must be true to kickstart metadata collection\n super({ autoStart: true });\n\n // Push the subject as starting point\n this._push(this.subject, emitFirstSubject);\n }\n\n protected override _end(destroy?: boolean): void {\n // Close all running iterators\n for (const it of this.runningOperations) {\n it.destroy();\n }\n\n super._end(destroy);\n }\n\n protected override _push(item: RDF.Term, pushAsResult = true): void {\n let termString;\n if (pushAsResult) {\n // Don't push if this subject was already found\n termString = termToString(item);\n if (this.termHashes.has(termString)) {\n return;\n }\n }\n\n // Add a pending path operation for this item\n const variable = DF.variable('b');\n this.pendingOperations.push({\n variable,\n operation: FACTORY.createPath(item, this.predicate, variable, this.graph),\n });\n\n // Otherwise, push the subject\n if (termString) {\n this.termHashes.set(termString, item);\n super._push(item);\n }\n }\n\n protected override _read(count: number, done: () => void): void {\n // eslint-disable-next-line ts/no-this-alias\n const self = this;\n (async function() {\n // Open as many operations as possible\n while (self.runningOperations.length < self.maxRunningOperations) {\n if (self.pendingOperations.length === 0) {\n break;\n }\n\n const pendingOperation = self.pendingOperations.pop()!;\n const results = ActorQueryOperation.getSafeBindings(\n await self.mediatorQueryOperation.mediate({ operation: pendingOperation.operation, context: self.context }),\n );\n const runningOperation = results.bindingsStream.transform({\n autoStart: false,\n transform(bindings, next, push) {\n const newTerm: RDF.Term = bindings.get(pendingOperation.variable)!;\n push(newTerm);\n next();\n },\n });\n if (!runningOperation.done) {\n self.runningOperations.push(runningOperation);\n runningOperation.on('error', error => self.destroy(error));\n runningOperation.on('readable', () => {\n self.readable = true;\n self._fillBufferAsync();\n });\n runningOperation.on('end', () => {\n self.runningOperations.splice(self.runningOperations.indexOf(runningOperation), 1);\n self.readable = true;\n self._fillBufferAsync();\n });\n }\n\n self.setProperty('metadata', results.metadata);\n }\n\n // Try to read `count` items (based on UnionIterator)\n let lastCount = 0;\n let item: RDF.Term | null;\n // eslint-disable-next-line no-cond-assign\n while (lastCount !== (lastCount = count)) {\n // Prioritize the operations that have been added first\n for (let i = 0; i < self.runningOperations.length && count > 0; i++) {\n // eslint-disable-next-line no-cond-assign\n if ((item = self.runningOperations[i].read()) !== null) {\n count--;\n self._push(item);\n }\n }\n }\n\n // Close if everything has been read\n if (self.runningOperations.length === 0 && self.pendingOperations.length === 0) {\n self.close();\n }\n })().then(() => {\n done();\n }, error => this.destroy(error));\n }\n}\n","import type { IActorContextPreprocessOutput, IActorContextPreprocessArgs } from '@comunica/bus-context-preprocess';\nimport { ActorContextPreprocess } from '@comunica/bus-context-preprocess';\nimport type { IAction, IActorTest } from '@comunica/core';\nimport { ActionContextKey } from '@comunica/core';\nimport type { IActionContext } from '@comunica/types';\n\n/**\n * A comunica Convert Shortcuts Context Preprocess Actor.\n */\nexport class ActorContextPreprocessConvertShortcuts extends ActorContextPreprocess {\n public readonly contextKeyShortcuts: Record;\n\n public constructor(args: IActorContextPreprocessConvertShortcutsArgs) {\n super(args);\n }\n\n public async test(_action: IAction): Promise {\n return true;\n }\n\n public async run(action: IAction): Promise {\n return {\n context: ActorContextPreprocessConvertShortcuts.expandShortcuts(action.context, this.contextKeyShortcuts),\n };\n }\n\n public static expandShortcuts(context: IActionContext, contextKeyShortcuts: Record): IActionContext {\n for (const key of context.keys()) {\n if (contextKeyShortcuts[key.name]) {\n context = context\n .set(new ActionContextKey(contextKeyShortcuts[key.name]), context.get(key))\n .delete(key);\n }\n }\n return context;\n }\n}\n\nexport interface IActorContextPreprocessConvertShortcutsArgs extends IActorContextPreprocessArgs {\n /**\n * A record of context shortcuts to full context keys (as defined in @comunica/context-entries).\n * @range {json}\n * @default {{\n * \"sources\": \"@comunica/actor-init-query:querySourcesUnidentified\",\n * \"destination\": \"@comunica/bus-rdf-update-quads:destination\",\n * \"initialBindings\": \"@comunica/actor-init-query:initialBindings\",\n * \"queryFormat\": \"@comunica/actor-init-query:queryFormat\",\n * \"baseIRI\": \"@comunica/actor-init-query:baseIRI\",\n * \"log\": \"@comunica/core:log\",\n * \"datetime\": \"@comunica/actor-http-memento:datetime\",\n * \"queryTimestamp\": \"@comunica/actor-init-query:queryTimestamp\",\n * \"httpProxyHandler\": \"@comunica/actor-http-proxy:httpProxyHandler\",\n * \"lenient\": \"@comunica/actor-init-query:lenient\",\n * \"httpIncludeCredentials\": \"@comunica/bus-http:include-credentials\",\n * \"httpAuth\": \"@comunica/bus-http:auth\",\n * \"httpTimeout\": \"@comunica/bus-http:http-timeout\",\n * \"httpBodyTimeout\": \"@comunica/bus-http:http-body-timeout\",\n * \"httpRetryCount\": \"@comunica/bus-http:http-retry-count\",\n * \"httpRetryDelay\": \"@comunica/bus-http:http-retry-delay\",\n * \"httpRetryOnServerError\": \"@comunica/bus-http:http-retry-on-server-error\",\n * \"fetch\": \"@comunica/bus-http:fetch\",\n * \"recoverBrokenLinks\": \"@comunica/bus-http-wayback:recover-broken-links\",\n * \"readOnly\": \"@comunica/bus-query-operation:readOnly\",\n * \"extensionFunctions\": \"@comunica/actor-init-query:extensionFunctions\",\n * \"extensionFunctionCreator\": \"@comunica/actor-init-query:extensionFunctionCreator\",\n * \"functionArgumentsCache\": \"@comunica/actor-init-query:functionArgumentsCache\",\n * \"explain\": \"@comunica/actor-init-query:explain\",\n * \"unionDefaultGraph\": \"@comunica/bus-query-operation:unionDefaultGraph\",\n * \"traverse\": \"@comunica/bus-query-source-identify:traverse\",\n * \"noCache\": \"@comunica/actor-init-query:noCache\",\n * \"distinctConstruct\": \"@comunica/actor-init-query:distinctConstruct\"\n * }}\n */\n contextKeyShortcuts: Record;\n}\n","import type {\n IActorContextPreprocessOutput,\n IActorContextPreprocessArgs,\n MediatorContextPreprocess,\n} from '@comunica/bus-context-preprocess';\nimport { ActorContextPreprocess } from '@comunica/bus-context-preprocess';\nimport type { ActorHttpInvalidateListenable, IActionHttpInvalidate } from '@comunica/bus-http-invalidate';\nimport type { MediatorQuerySourceIdentify } from '@comunica/bus-query-source-identify';\nimport { KeysInitQuery, KeysQueryOperation } from '@comunica/context-entries';\nimport type { IAction, IActorTest } from '@comunica/core';\nimport { ActionContext } from '@comunica/core';\nimport type {\n IQuerySourceWrapper,\n QuerySourceUnidentified,\n QuerySourceUnidentifiedExpanded,\n IActionContext,\n IQuerySourceUnidentifiedExpanded,\n} from '@comunica/types';\nimport { LRUCache } from 'lru-cache';\n\n/**\n * A comunica Query Source Identify Context Preprocess Actor.\n */\nexport class ActorContextPreprocessQuerySourceIdentify extends ActorContextPreprocess {\n public readonly cacheSize: number;\n public readonly httpInvalidator: ActorHttpInvalidateListenable;\n public readonly mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n public readonly mediatorContextPreprocess: MediatorContextPreprocess;\n public readonly cache?: LRUCache>;\n\n public constructor(args: IActorContextPreprocessQuerySourceIdentifyArgs) {\n super(args);\n this.cache = this.cacheSize ? new LRUCache({ max: this.cacheSize }) : undefined;\n const cache = this.cache;\n if (cache) {\n this.httpInvalidator.addInvalidateListener(\n ({ url }: IActionHttpInvalidate) => url ? cache.delete(url) : cache.clear(),\n );\n }\n }\n\n public async test(_action: IAction): Promise {\n return true;\n }\n\n public async run(action: IAction): Promise {\n let context = action.context;\n\n // Rewrite sources\n if (context.has(KeysInitQuery.querySourcesUnidentified)) {\n const querySourcesUnidentified: QuerySourceUnidentified[] = action.context\n .get(KeysInitQuery.querySourcesUnidentified)!;\n const querySourcesUnidentifiedExpanded = await Promise.all(querySourcesUnidentified\n .map(querySource => this.expandSource(querySource)));\n const querySources: IQuerySourceWrapper[] = await Promise.all(querySourcesUnidentifiedExpanded\n .map(async querySourceUnidentified => this.identifySource(querySourceUnidentified, action.context)));\n context = action.context\n .delete(KeysInitQuery.querySourcesUnidentified)\n .set(KeysQueryOperation.querySources, querySources);\n }\n\n return { context };\n }\n\n public async expandSource(querySource: QuerySourceUnidentified): Promise {\n if (typeof querySource === 'string' || 'match' in querySource) {\n return { value: querySource };\n }\n return {\n ...>querySource,\n context: (await this.mediatorContextPreprocess.mediate({\n context: ActionContext.ensureActionContext(querySource.context ?? {}),\n })).context,\n };\n }\n\n public identifySource(\n querySourceUnidentified: QuerySourceUnidentifiedExpanded,\n context: IActionContext,\n ): Promise {\n let sourcePromise: Promise | undefined;\n\n // Try to read from cache\n // Only sources based on string values (e.g. URLs) are supported!\n if (typeof querySourceUnidentified.value === 'string' && this.cache) {\n sourcePromise = this.cache.get(querySourceUnidentified.value)!;\n }\n\n // If not in cache, identify the source\n if (!sourcePromise) {\n sourcePromise = this.mediatorQuerySourceIdentify.mediate({ querySourceUnidentified, context })\n .then(({ querySource }) => querySource);\n\n // Set in cache\n if (typeof querySourceUnidentified.value === 'string' && this.cache) {\n this.cache.set(querySourceUnidentified.value, sourcePromise);\n }\n }\n\n return sourcePromise;\n }\n}\n\nexport interface IActorContextPreprocessQuerySourceIdentifyArgs extends IActorContextPreprocessArgs {\n /**\n * The maximum number of entries in the LRU cache, set to 0 to disable.\n * @range {integer}\n * @default {100}\n */\n cacheSize: number;\n /* eslint-disable max-len */\n /**\n * An actor that listens to HTTP invalidation events\n * @default { a }\n */\n httpInvalidator: ActorHttpInvalidateListenable;\n /* eslint-enable max-len */\n /**\n * Mediator for identifying query sources.\n */\n mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n /**\n * The context processing combinator\n */\n mediatorContextPreprocess: MediatorContextPreprocess;\n}\n","import type { IActorContextPreprocessOutput, IActorContextPreprocessArgs } from '@comunica/bus-context-preprocess';\nimport { ActorContextPreprocess } from '@comunica/bus-context-preprocess';\nimport { KeysQueryOperation, KeysQuerySourceIdentify } from '@comunica/context-entries';\nimport type { IActorTest, IAction } from '@comunica/core';\nimport type { IQuerySourceWrapper, QuerySourceReference } from '@comunica/types';\nimport { QuerySourceSkolemized } from './QuerySourceSkolemized';\nimport { getSourceId } from './utils';\n\n/**\n * A comunica Query Source Skolemize Context Preprocess Actor.\n */\nexport class ActorContextPreprocessQuerySourceSkolemize extends ActorContextPreprocess {\n public constructor(args: IActorContextPreprocessArgs) {\n super(args);\n }\n\n public async test(_action: IAction): Promise {\n return true;\n }\n\n public async run(action: IAction): Promise {\n let context = action.context;\n\n // Wrap sources in skolemized sources\n if (context.has(KeysQueryOperation.querySources)) {\n // Determine map of source id's\n if (!context.has(KeysQuerySourceIdentify.sourceIds)) {\n context = context.set(KeysQuerySourceIdentify.sourceIds, new Map());\n }\n const sourceIds: Map = context.getSafe(KeysQuerySourceIdentify.sourceIds);\n\n let sources: IQuerySourceWrapper[] = context.getSafe(KeysQueryOperation.querySources);\n sources = sources.map(sourceWrapper => ({\n source: new QuerySourceSkolemized(sourceWrapper.source, getSourceId(sourceIds, sourceWrapper.source)),\n context: sourceWrapper.context,\n }));\n context = context.set(KeysQueryOperation.querySources, sources);\n }\n\n return { context };\n }\n}\n","import { MetadataValidationState } from '@comunica/metadata';\nimport type {\n BindingsStream,\n FragmentSelectorShape,\n IActionContext,\n IQueryBindingsOptions,\n IQuerySource,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { ArrayIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { deskolemizeOperation, skolemizeBindingsStream, skolemizeQuadStream } from './utils';\n\n/**\n * A IQuerySource wrapper that skolemizes outgoing quads and bindings.\n */\nexport class QuerySourceSkolemized implements IQuerySource {\n /**\n * The query source to wrap over.\n */\n public readonly innerSource: IQuerySource;\n /**\n * ID of the inner source, see KeysRdfResolveQuadPattern.sourceIds.\n */\n public readonly sourceId: string;\n\n public constructor(innerSource: IQuerySource, sourceId: string) {\n this.innerSource = innerSource;\n this.sourceId = sourceId;\n }\n\n public async getSelectorShape(context: IActionContext): Promise {\n return this.innerSource.getSelectorShape(context);\n }\n\n public queryBindings(\n operation: Algebra.Operation,\n context: IActionContext,\n options: IQueryBindingsOptions | undefined,\n ): BindingsStream {\n const operationMapped = deskolemizeOperation(operation, this.sourceId);\n if (!operationMapped) {\n const it: BindingsStream = new ArrayIterator([], { autoStart: false });\n it.setProperty('metadata', {\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 0 },\n canContainUndefs: false,\n variables: [],\n });\n return it;\n }\n return skolemizeBindingsStream(this.innerSource.queryBindings(operationMapped, context, options), this.sourceId);\n }\n\n public queryBoolean(operation: Algebra.Ask, context: IActionContext): Promise {\n return this.innerSource.queryBoolean(operation, context);\n }\n\n public queryQuads(operation: Algebra.Operation, context: IActionContext): AsyncIterator {\n const operationMapped = deskolemizeOperation(operation, this.sourceId);\n if (!operationMapped) {\n const it: AsyncIterator = new ArrayIterator([], { autoStart: false });\n it.setProperty('metadata', {\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 0 },\n });\n return it;\n }\n return skolemizeQuadStream(this.innerSource.queryQuads(operationMapped, context), this.sourceId);\n }\n\n public queryVoid(operation: Algebra.Update, context: IActionContext): Promise {\n return this.innerSource.queryVoid(operation, context);\n }\n\n public get referenceValue(): string | RDF.Source {\n return this.innerSource.referenceValue;\n }\n\n public toString(): string {\n return `${this.innerSource.toString()}(SkolemID:${this.sourceId})`;\n }\n}\n","import { BlankNodeScoped } from '@comunica/data-factory';\nimport type {\n BindingsStream,\n IQuerySource,\n MetadataBindings,\n MetadataQuads,\n QuerySourceReference,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport { mapTermsNested } from 'rdf-terms';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\nexport const SKOLEM_PREFIX = 'urn:comunica_skolem:source_';\n\n/**\n * Get the unique, deterministic id for the given source.\n * @param sourceIds ID's of datasources, see KeysRdfResolveQuadPattern.sourceIds.\n * @param source A data source.\n * @return The id of the given source.\n */\nexport function getSourceId(sourceIds: Map, source: IQuerySource): string {\n let sourceId = sourceIds.get(source.referenceValue);\n if (sourceId === undefined) {\n sourceId = `${sourceIds.size}`;\n sourceIds.set(source.referenceValue, sourceId);\n }\n return sourceId;\n}\n\n/**\n * If the given term is a blank node, return a deterministic named node for it\n * based on the source id and the blank node value.\n * @param term Any RDF term.\n * @param sourceId A source identifier.\n * @return If the given term was a blank node, this will return a skolemized named node, otherwise the original term.\n */\nexport function skolemizeTerm(term: RDF.Term, sourceId: string): RDF.Term | BlankNodeScoped {\n if (term.termType === 'BlankNode') {\n return new BlankNodeScoped(`bc_${sourceId}_${term.value}`, DF.namedNode(`${SKOLEM_PREFIX}${sourceId}:${term.value}`));\n }\n return term;\n}\n\n/**\n * Skolemize all terms in the given quad.\n * @param quad An RDF quad.\n * @param sourceId A source identifier.\n * @return The skolemized quad.\n */\nexport function skolemizeQuad(quad: Q, sourceId: string): Q {\n return mapTermsNested(quad, term => skolemizeTerm(term, sourceId));\n}\n\n/**\n * Skolemize all terms in the given bindings.\n * @param bindings An RDF bindings object.\n * @param sourceId A source identifier.\n * @return The skolemized bindings.\n */\nexport function skolemizeBindings(bindings: RDF.Bindings, sourceId: string): RDF.Bindings {\n return bindings.map((term) => {\n if (term.termType === 'Quad') {\n return skolemizeQuad(term, sourceId);\n }\n return skolemizeTerm(term, sourceId);\n });\n}\n\n/**\n * Skolemize all terms in the given quad stream.\n * @param iterator An RDF quad stream.\n * @param sourceId A source identifier.\n * @return The skolemized quad stream.\n */\nexport function skolemizeQuadStream(iterator: AsyncIterator, sourceId: string): AsyncIterator {\n const ret = iterator.map(quad => skolemizeQuad(quad, sourceId));\n function inheritMetadata(): void {\n iterator.getProperty('metadata', (metadata: MetadataQuads) => {\n ret.setProperty('metadata', metadata);\n metadata.state.addInvalidateListener(inheritMetadata);\n });\n }\n inheritMetadata();\n return ret;\n}\n\n/**\n * Skolemize all terms in the given bindings stream.\n * @param iterator An RDF bindings stream.\n * @param sourceId A source identifier.\n * @return The skolemized bindings stream.\n */\nexport function skolemizeBindingsStream(iterator: BindingsStream, sourceId: string): BindingsStream {\n const ret = iterator.map(bindings => skolemizeBindings(bindings, sourceId));\n function inheritMetadata(): void {\n iterator.getProperty('metadata', (metadata: MetadataBindings) => {\n ret.setProperty('metadata', metadata);\n metadata.state.addInvalidateListener(inheritMetadata);\n });\n }\n inheritMetadata();\n return ret;\n}\n\n/**\n * If a given term was a skolemized named node for the given source id,\n * deskolemize it again to a blank node.\n * If the given term was a skolemized named node for another source, return false.\n * If the given term was not a skolemized named node, return the original term.\n * @param term Any RDF term.\n * @param sourceId A source identifier.\n */\nexport function deskolemizeTerm(term: RDF.Term, sourceId: string): RDF.Term | null {\n if (term.termType === 'BlankNode' && 'skolemized' in term) {\n term = ( term).skolemized;\n }\n if (term.termType === 'NamedNode' && term.value.startsWith(SKOLEM_PREFIX)) {\n const colonSeparator = term.value.indexOf(':', SKOLEM_PREFIX.length);\n const termSourceId = term.value.slice(SKOLEM_PREFIX.length, colonSeparator);\n // We had a skolemized term\n if (termSourceId === sourceId) {\n // It came from the correct source\n const termLabel = term.value.slice(colonSeparator + 1, term.value.length);\n return DF.blankNode(termLabel);\n }\n // It came from a different source\n return null;\n }\n return term;\n}\n\nexport function deskolemizeTermNestedThrowing(term: RDF.Term, sourceId: string): RDF.Term {\n if (term.termType === 'Quad') {\n return mapTermsNested(term, (subTerm) => {\n const deskolemized = deskolemizeTerm(subTerm, sourceId);\n if (!deskolemized) {\n throw new Error(`Skolemized term is not in scope for this source`);\n }\n return deskolemized;\n });\n }\n const ret = deskolemizeTerm(term, sourceId);\n if (ret === null) {\n throw new Error(`Skolemized term is not in scope for this source`);\n }\n return ret;\n}\n\n/**\n * Deskolemize all terms in the given quad.\n * @param quad An RDF quad.\n * @param sourceId A source identifier.\n * @return The deskolemized quad.\n */\nexport function deskolemizeQuad(quad: Q, sourceId: string): Q {\n return mapTermsNested(quad, (term: RDF.Term): RDF.Term => {\n const newTerm = deskolemizeTerm(term, sourceId);\n // If the term was skolemized in a different source then don't deskolemize it\n return newTerm ?? term;\n });\n}\n\n/**\n * Deskolemize all terms in the given quad.\n * Will return undefined if there is at least one blank node not in scope for this sourceId.\n * @param operation An algebra operation.\n * @param sourceId A source identifier.\n */\nexport function deskolemizeOperation(operation: O, sourceId: string): O | undefined {\n try {\n return Util.mapOperation(operation, {\n [Algebra.types.PATTERN](op, factory) {\n return {\n result: Object.assign(factory.createPattern(\n deskolemizeTermNestedThrowing(op.subject, sourceId),\n deskolemizeTermNestedThrowing(op.predicate, sourceId),\n deskolemizeTermNestedThrowing(op.object, sourceId),\n deskolemizeTermNestedThrowing(op.graph, sourceId),\n ), { metadata: op.metadata }),\n recurse: false,\n };\n },\n [Algebra.types.PATH](op, factory) {\n return {\n result: Object.assign(factory.createPath(\n deskolemizeTermNestedThrowing(op.subject, sourceId),\n op.predicate,\n deskolemizeTermNestedThrowing(op.object, sourceId),\n deskolemizeTermNestedThrowing(op.graph, sourceId),\n ), { metadata: op.metadata }),\n recurse: false,\n };\n },\n });\n } catch {\n // Return undefined for skolemized terms not in scope for this source\n }\n}\n","import type {\n IActorContextPreprocessOutput,\n IActorContextPreprocessArgs,\n IActionContextPreprocess,\n} from '@comunica/bus-context-preprocess';\nimport { ActorContextPreprocess } from '@comunica/bus-context-preprocess';\nimport { KeysCore, KeysInitQuery, KeysQuerySourceIdentify } from '@comunica/context-entries';\nimport type { IAction, IActorTest } from '@comunica/core';\nimport type { FunctionArgumentsCache, Logger } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\n\n/**\n * A comunica Set Defaults Context Preprocess Actor.\n */\nexport class ActorContextPreprocessSetDefaults extends ActorContextPreprocess {\n private readonly defaultFunctionArgumentsCache: FunctionArgumentsCache;\n public readonly logger: Logger;\n\n public constructor(args: IActorContextPreprocessSetDefaultsArgs) {\n super(args);\n this.defaultFunctionArgumentsCache = {};\n }\n\n public async test(_action: IAction): Promise {\n return true;\n }\n\n public async run(action: IActionContextPreprocess): Promise {\n let context = action.context;\n\n if (action.initialize) {\n // Set default values\n context = context\n .setDefault(KeysInitQuery.queryTimestamp, new Date())\n .setDefault(KeysQuerySourceIdentify.sourceIds, new Map())\n .setDefault(KeysCore.log, this.logger)\n .setDefault(KeysInitQuery.functionArgumentsCache, this.defaultFunctionArgumentsCache)\n .setDefault(KeysQuerySourceIdentify.hypermediaSourcesAggregatedStores, new Map());\n\n // Handle default query format\n let queryFormat: RDF.QueryFormat = { language: 'sparql', version: '1.1' };\n if (context.has(KeysInitQuery.queryFormat)) {\n queryFormat = context.get(KeysInitQuery.queryFormat)!;\n if (queryFormat.language === 'graphql') {\n context = context.setDefault(KeysInitQuery.graphqlSingularizeVariables, {});\n }\n } else {\n context = context.set(KeysInitQuery.queryFormat, queryFormat);\n }\n }\n\n return { context };\n }\n}\n\nexport interface IActorContextPreprocessSetDefaultsArgs extends IActorContextPreprocessArgs {\n /**\n * The logger of this actor\n * @default {a }\n */\n logger: Logger;\n}\n","import type { IActorContextPreprocessOutput, IActorContextPreprocessArgs } from '@comunica/bus-context-preprocess';\nimport { ActorContextPreprocess } from '@comunica/bus-context-preprocess';\nimport { KeysInitQuery, KeysRdfUpdateQuads } from '@comunica/context-entries';\nimport type { IActorTest, IAction } from '@comunica/core';\nimport type { QuerySourceUnidentified } from '@comunica/types';\n\n/**\n * A comunica Source To Destination Context Preprocess Actor.\n */\nexport class ActorContextPreprocessSourceToDestination extends ActorContextPreprocess {\n public constructor(args: IActorContextPreprocessArgs) {\n super(args);\n }\n\n public async test(_action: IAction): Promise {\n return true;\n }\n\n public async run(action: IAction): Promise {\n if (action.context.get(KeysInitQuery.querySourcesUnidentified) &&\n !action.context.get(KeysRdfUpdateQuads.destination)) {\n const sources: QuerySourceUnidentified[] = action.context.get(KeysInitQuery.querySourcesUnidentified)!;\n if (sources.length === 1) {\n return { context: action.context.set(KeysRdfUpdateQuads.destination, sources[0]) };\n }\n }\n return action;\n }\n}\n","import type { IActionDereference, IActorDereferenceOutput, IActorDereferenceArgs } from '@comunica/bus-dereference';\nimport { ActorDereference } from '@comunica/bus-dereference';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica Fallback Dereference Actor.\n */\nexport class ActorDereferenceFallback extends ActorDereference {\n public constructor(args: IActorDereferenceArgs) {\n super(args);\n }\n\n public async test(_action: IActionDereference): Promise {\n return true;\n }\n\n public async run(action: IActionDereference): Promise {\n return this.handleDereferenceErrors(action, new Error(`Could not dereference '${action.url}'`));\n }\n}\n","/* eslint-disable unicorn/filename-case */\n/* eslint-enable unicorn/filename-case */\nimport {\n ActorDereferenceHttpBase,\n} from './ActorDereferenceHttpBase';\n\n/**\n * The browser variant of {@link ActorDereferenceHttp}.\n */\nexport class ActorDereferenceHttp extends ActorDereferenceHttpBase {\n protected getMaxAcceptHeaderLength(): number {\n return this.maxAcceptHeaderLengthBrowser;\n }\n}\n","import type { IActionDereference, IActorDereferenceArgs, IActorDereferenceOutput } from '@comunica/bus-dereference';\nimport { ActorDereference, emptyReadable } from '@comunica/bus-dereference';\nimport type { IActorHttpOutput, MediatorHttp } from '@comunica/bus-http';\nimport { ActorHttp } from '@comunica/bus-http';\nimport type { IActorTest } from '@comunica/core';\nimport { stringify as stringifyStream } from '@jeswr/stream-to-string';\nimport { Headers } from 'cross-fetch';\nimport { resolve as resolveRelative } from 'relative-to-absolute-iri';\n\nconst REGEX_MEDIATYPE = /^[^ ;]*/u;\n\nexport function mediaTypesToAcceptString(mediaTypes: Record, maxLength: number): string {\n const wildcard = '*/*;q=0.1';\n const parts: string[] = [];\n const sortedMediaTypes = Object.entries(mediaTypes)\n .map(([ mediaType, priority ]) => ({ mediaType, priority }))\n .sort((left, right) => right.priority === left.priority ?\n left.mediaType.localeCompare(right.mediaType) :\n right.priority - left.priority);\n // Take into account the ',' characters joining each type\n let partsLength = sortedMediaTypes.length - 1;\n for (const { mediaType, priority } of sortedMediaTypes) {\n const part = mediaType + (priority === 1 ? '' : `;q=${priority.toFixed(3).replace(/0*$/u, '')}`);\n if (partsLength + part.length > maxLength) {\n while (partsLength + wildcard.length > maxLength) {\n const last = parts.pop() ?? '';\n // Don't forget the ','\n partsLength -= last.length + 1;\n }\n parts.push(wildcard);\n break;\n }\n parts.push(part);\n partsLength += part.length;\n }\n return parts.length === 0 ? '*/*' : parts.join(',');\n}\n\n/**\n * An actor that listens on the 'dereference' bus.\n *\n * It resolves the URL using the HTTP bus using an accept header compiled from the available media types.\n */\nexport abstract class ActorDereferenceHttpBase extends ActorDereference implements IActorDereferenceHttpArgs {\n public readonly mediatorHttp: MediatorHttp;\n public readonly maxAcceptHeaderLength: number;\n public readonly maxAcceptHeaderLengthBrowser: number;\n\n public constructor(args: IActorDereferenceHttpArgs) {\n super(args);\n }\n\n public async test({ url }: IActionDereference): Promise {\n if (!/^https?:/u.test(url)) {\n throw new Error(`Cannot retrieve ${url} because it is not an HTTP(S) URL.`);\n }\n return true;\n }\n\n public async run(action: IActionDereference): Promise {\n let exists = true;\n\n // Append any custom passed headers\n const headers = new Headers(action.headers);\n\n // Resolve HTTP URL using appropriate accept header\n headers.append(\n 'Accept',\n mediaTypesToAcceptString(await action.mediaTypes?.() ?? {}, this.getMaxAcceptHeaderLength()),\n );\n\n let httpResponse: IActorHttpOutput;\n const requestTimeStart = Date.now();\n try {\n httpResponse = await this.mediatorHttp.mediate({\n context: action.context,\n init: { headers, method: action.method },\n input: action.url,\n });\n } catch (error: unknown) {\n return this.handleDereferenceErrors(action, error);\n }\n // The response URL can be relative to the given URL\n const url = resolveRelative(httpResponse.url, action.url);\n const requestTime = Date.now() - requestTimeStart;\n\n // Only parse if retrieval was successful\n if (httpResponse.status !== 200) {\n exists = false;\n // Consume the body, to avoid process to hang\n const bodyString = httpResponse.body ?\n await stringifyStream(ActorHttp.toNodeReadable(httpResponse.body)) :\n 'empty response';\n\n if (!action.acceptErrors) {\n const error = new Error(`Could not retrieve ${action.url} (HTTP status ${httpResponse.status}):\\n${bodyString}`);\n return this.handleDereferenceErrors(action, error, httpResponse.headers, requestTime);\n }\n }\n\n const mediaType = REGEX_MEDIATYPE.exec(httpResponse.headers.get('content-type') ?? '')?.[0];\n\n // Return the parsed quad stream and whether or not only triples are supported\n return {\n url,\n data: exists ? ActorHttp.toNodeReadable(httpResponse.body) : emptyReadable(),\n exists,\n requestTime,\n headers: httpResponse.headers,\n mediaType: mediaType === 'text/plain' ? undefined : mediaType,\n };\n }\n\n protected abstract getMaxAcceptHeaderLength(): number;\n}\n\nexport interface IActorDereferenceHttpArgs extends IActorDereferenceArgs {\n /**\n * The HTTP mediator.\n */\n mediatorHttp: MediatorHttp;\n /**\n * The maximum allowed accept header value length for non-browser environments.\n * @range {integer}\n * @default {1024}\n */\n maxAcceptHeaderLength: number;\n /**\n * The maximum allowed accept header value length for browser environments.\n * @range {integer}\n * @default {128}\n */\n maxAcceptHeaderLengthBrowser: number;\n}\n","import type { IActorDereferenceOutput } from '@comunica/bus-dereference';\nimport type { IActorDereferenceRdfArgs } from '@comunica/bus-dereference-rdf';\nimport { ActorDereferenceRdf } from '@comunica/bus-dereference-rdf';\nimport type { IActionRdfParseMetadata } from '@comunica/bus-rdf-parse';\n\n/**\n * A comunica Parse Dereference RDF Actor.\n */\nexport class ActorDereferenceRdfParse extends ActorDereferenceRdf {\n /**\n * @param args - @defaultNested {{\n * \"ttl\": \"text/turtle\",\n * \"turtle\": \"text/turtle\",\n * \"shaclc\": \"text/shaclc\",\n * \"shc\": \"text/shaclc\",\n * \"shaclce\": \"text/shaclc-ext\",\n * \"shce\": \"text/shaclc-ext\",\n * \"nt\": \"application/n-triples\",\n * \"ntriples\": \"application/n-triples\",\n * \"nq\": \"application/n-quads\",\n * \"nquads\": \"application/n-quads\",\n * \"rdf\": \"application/rdf+xml\",\n * \"rdfxml\": \"application/rdf+xml\",\n * \"owl\": \"application/rdf+xml\",\n * \"n3\": \"text/n3\",\n * \"trig\": \"application/trig\",\n * \"jsonld\": \"application/ld+json\",\n * \"json\": \"application/json\",\n * \"html\": \"text/html\",\n * \"htm\": \"text/html\",\n * \"xhtml\": \"application/xhtml+xml\",\n * \"xht\": \"application/xhtml+xml\",\n * \"xml\": \"application/xml\",\n * \"svg\": \"image/svg+xml\",\n * \"svgz\": \"image/svg+xml\"\n * }} mediaMappings\n */\n public constructor(args: IActorDereferenceRdfArgs) {\n super(args);\n }\n\n public async getMetadata(dereference: IActorDereferenceOutput): Promise {\n return { baseIRI: dereference.url };\n }\n}\n\nexport interface IActorDereferenceRdfParseArgs extends IActorDereferenceRdfArgs {\n\n}\n","import type { IActionHashBindings, IActorHashBindingsOutput } from '@comunica/bus-hash-bindings';\nimport { ActorHashBindings } from '@comunica/bus-hash-bindings';\nimport type { IActorTest } from '@comunica/core';\nimport { sha1 } from 'hash.js';\nimport { termToString } from 'rdf-string';\n\n// eslint-disable-next-line ts/no-require-imports,ts/no-var-requires\nconst canonicalize = require('canonicalize');\n\n/**\n * A comunica Memento Http Actor.\n */\nexport class ActorHashBindingsSha1 extends ActorHashBindings {\n public async test(action: IActionHashBindings): Promise {\n if (!action.allowHashCollisions) {\n throw new Error(`Actor ${this.name} can not provide hash functions without hash collisions`);\n }\n return true;\n }\n\n public async run(_action: IActionHashBindings): Promise {\n return {\n hashFunction: bindings => sha1()\n .update(canonicalize(Object.fromEntries([ ...bindings ]\n .map(([ key, value ]) => [ termToString(key), termToString(value) ]))))\n .digest('hex'),\n hashCollisions: true,\n };\n }\n}\n","import type { IActionHashQuads, IActorHashQuadsOutput } from '@comunica/bus-hash-quads';\nimport { ActorHashQuads } from '@comunica/bus-hash-quads';\nimport type { IActorTest } from '@comunica/core';\nimport { sha1 } from 'hash.js';\nimport { quadToStringQuad } from 'rdf-string';\n\n/**\n * A comunica Memento Http Actor.\n */\nexport class ActorHashQuadsSha1 extends ActorHashQuads {\n public async test(action: IActionHashQuads): Promise {\n if (!action.allowHashCollisions) {\n throw new Error(`Actor ${this.name} can not provide hash functions without hash collisions`);\n }\n return true;\n }\n\n public async run(_action: IActionHashQuads): Promise {\n return {\n hashFunction: quad => sha1()\n .update(JSON.stringify(quadToStringQuad(quad)))\n .digest('hex'),\n hashCollisions: true,\n };\n }\n}\n","import type { IActionHttp, IActorHttpOutput, IActorHttpArgs } from '@comunica/bus-http';\nimport { ActorHttp } from '@comunica/bus-http';\nimport { KeysHttp } from '@comunica/context-entries';\nimport type { IMediatorTypeTime } from '@comunica/mediatortype-time';\nimport type { Readable } from 'readable-stream';\nimport 'cross-fetch/polyfill';\nimport { FetchInitPreprocessor } from './FetchInitPreprocessor';\nimport type { IFetchInitPreprocessor } from './IFetchInitPreprocessor';\n\n/**\n * A node-fetch actor that listens on the 'init' bus.\n *\n * It will call `fetch` with either action.input or action.url.\n */\nexport class ActorHttpFetch extends ActorHttp {\n private readonly userAgent: string;\n private readonly fetchInitPreprocessor: IFetchInitPreprocessor;\n\n public constructor(args: IActorHttpFetchArgs) {\n super(args);\n this.userAgent = ActorHttpFetch.createUserAgent();\n this.fetchInitPreprocessor = new FetchInitPreprocessor(args.agentOptions);\n }\n\n public static createUserAgent(): string {\n return `Comunica/actor-http-fetch (${typeof globalThis.navigator === 'undefined' ?\n `Node.js ${process.version}; ${process.platform}` :\n `Browser-${globalThis.navigator.userAgent}`})`;\n }\n\n public async test(_action: IActionHttp): Promise {\n return { time: Number.POSITIVE_INFINITY };\n }\n\n /**\n * Perform a fetch request, taking care of retries\n * @param fetchFn\n * @param requestInput Url or RequestInfo to pass to fetchFn\n * @param requestInit RequestInit to pass to fetch function\n * @param retryCount Maximum retries after which to abort\n * @param retryDelay Time in milliseconds to wait between retries\n * @returns a fetch `Response` object\n */\n private static async getResponse(\n fetchFn: (input: RequestInfo | URL, init?: RequestInit | undefined) => Promise,\n requestInput: RequestInfo | URL,\n requestInit: RequestInit,\n retryCount: number,\n retryDelay: number,\n throwOnServerError: boolean,\n ): Promise {\n let lastError: unknown;\n // The retryCount is 0-based. Therefore, add 1 to triesLeft.\n let triesLeft = retryCount + 1;\n\n // When retry count is greater than 0, repeat fetch.\n while (triesLeft-- > 0) {\n try {\n const response = await fetchFn(requestInput, requestInit);\n // Check, if server sent a 5xx error response.\n if (throwOnServerError && response.status >= 500 && response.status < 600) {\n throw new Error(`Server replied with response code ${response.status}: ${response.statusText}`);\n }\n return response;\n } catch (error: unknown) {\n lastError = error;\n // If the fetch was aborted by timeout, we won't retry.\n if (requestInit.signal?.aborted) {\n throw error;\n }\n\n if (triesLeft > 0) {\n // Wait for specified delay, before retrying.\n await new Promise((resolve, reject) => {\n setTimeout(resolve, retryDelay);\n // Cancel waiting, if timeout is reached.\n requestInit.signal?.addEventListener('abort', () => {\n reject(new Error('Fetch aborted by timeout.'));\n });\n });\n }\n }\n }\n // The fetch was not successful. We throw.\n if (retryCount > 0) {\n // Feedback the last error, if there were retry attempts.\n throw new Error(`Number of fetch retries (${retryCount}) exceeded. Last error: ${String(lastError)}`);\n } else {\n throw lastError;\n }\n }\n\n public async run(action: IActionHttp): Promise {\n // Prepare headers\n const initHeaders = action.init?.headers ?? {};\n action.init = action.init ?? {};\n action.init.headers = new Headers(initHeaders);\n if (!action.init.headers.has('user-agent')) {\n action.init.headers.append('user-agent', this.userAgent);\n }\n const authString: string | undefined = action.context.get(KeysHttp.auth);\n if (authString) {\n action.init.headers.append('Authorization', `Basic ${Buffer.from(authString).toString('base64')}`);\n }\n\n // Log request\n this.logInfo(action.context, `Requesting ${typeof action.input === 'string' ?\n action.input :\n action.input.url}`, () => ({\n headers: ActorHttp.headersToHash(new Headers(action.init!.headers)),\n method: action.init!.method ?? 'GET',\n }));\n\n // TODO: remove this workaround once this has a fix: https://github.com/inrupt/solid-client-authn-js/issues/1708\n if (action.init?.headers && 'append' in action.init.headers && action.context.has(KeysHttp.fetch)) {\n action.init.headers = ActorHttp.headersToHash(action.init.headers);\n }\n\n let requestInit = { ...action.init };\n\n if (action.context.get(KeysHttp.includeCredentials)) {\n requestInit.credentials = 'include';\n }\n\n const httpTimeout: number | undefined = action.context?.get(KeysHttp.httpTimeout);\n let requestTimeout: NodeJS.Timeout | undefined;\n let onTimeout: (() => void) | undefined;\n if (httpTimeout !== undefined) {\n const controller = await this.fetchInitPreprocessor.createAbortController();\n requestInit.signal = controller.signal;\n onTimeout = () => controller.abort();\n requestTimeout = setTimeout(() => onTimeout!(), httpTimeout);\n }\n\n try {\n requestInit = await this.fetchInitPreprocessor.handle(requestInit);\n // Number of retries to perform after a failed fetch.\n const retryCount: number = action.context?.get(KeysHttp.httpRetryCount) ?? 0;\n const retryDelay: number = action.context?.get(KeysHttp.httpRetryDelay) ?? 0;\n const retryOnSeverError: boolean = action.context?.get(KeysHttp.httpRetryOnServerError) ?? false;\n const customFetch: ((input: RequestInfo | URL, init?: RequestInit) => Promise) | undefined = action\n .context?.get(KeysHttp.fetch);\n\n // Execute the fetch (with retries and timeouts, if applicable).\n const response = await ActorHttpFetch.getResponse(\n customFetch ?? fetch,\n action.input,\n requestInit,\n retryCount,\n retryDelay,\n retryOnSeverError,\n );\n\n // We remove or update the timeout\n if (requestTimeout !== undefined) {\n const httpBodyTimeout = action.context?.get(KeysHttp.httpBodyTimeout) || false;\n if (httpBodyTimeout && response.body) {\n // eslint-disable-next-line ts/no-misused-promises\n onTimeout = () => response.body?.cancel(new Error(`HTTP timeout when reading the body of ${response.url}.\nThis error can be disabled by modifying the 'httpBodyTimeout' and/or 'httpTimeout' options.`));\n (response.body).on('close', () => {\n clearTimeout(requestTimeout);\n });\n } else {\n clearTimeout(requestTimeout);\n }\n }\n\n // Node-fetch does not support body.cancel, while it is mandatory according to the fetch and readablestream api.\n // If it doesn't exist, we monkey-patch it.\n if (response.body && !response.body.cancel) {\n response.body.cancel = async(error?: Error) => {\n (response.body).destroy(error);\n if (requestTimeout !== undefined) {\n // We make sure to remove the timeout if it is still enabled\n clearTimeout(requestTimeout);\n }\n };\n }\n\n return response;\n } catch (error: unknown) {\n if (requestTimeout !== undefined) {\n clearTimeout(requestTimeout);\n }\n throw error;\n }\n }\n}\n\nexport interface IActorHttpFetchArgs extends IActorHttpArgs {\n /**\n * The agent options for the HTTP agent\n * @range {json}\n * @default {{ \"keepAlive\": true, \"maxSockets\": 5 }}\n */\n agentOptions?: Record;\n}\n","/* eslint-disable unicorn/filename-case */\n/* eslint-enable unicorn/filename-case */\n\nimport { ActorHttp } from '@comunica/bus-http';\nimport type { IFetchInitPreprocessor } from './IFetchInitPreprocessor';\n\n/**\n * Overrides things for fetch requests in browsers\n */\nexport class FetchInitPreprocessor implements IFetchInitPreprocessor {\n public async handle(init: RequestInit): Promise {\n // Remove overridden user-agent header within browsers to avoid CORS issues\n if (init.headers) {\n const headers = new Headers(init.headers);\n if (headers.has('user-agent')) {\n headers.delete('user-agent');\n }\n init.headers = headers;\n }\n\n // TODO: remove this workaround once this has a fix: https://github.com/inrupt/solid-client-authn-js/issues/1708\n if (init?.headers && 'append' in init.headers) {\n init.headers = ActorHttp.headersToHash(init.headers);\n }\n\n // Browsers don't yet support passing ReadableStream as body to requests, see\n // https://bugs.chromium.org/p/chromium/issues/detail?id=688906\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1387483\n // As such, we convert those bodies to a plain string\n // TODO: remove this once browser support ReadableStream in requests\n if (init.body && typeof init.body !== 'string' && 'getReader' in init.body) {\n const reader = init.body.getReader();\n const chunks = [];\n\n while (true) {\n const { done, value } = await reader.read();\n if (done) {\n break;\n }\n chunks.push(value);\n }\n init.body = chunks.join('');\n }\n\n // Only enable keepalive functionality if we are not sending a body (some browsers seem to trip over this)\n return { keepalive: !init.body, ...init };\n }\n\n public async createAbortController(): Promise {\n return new AbortController();\n }\n}\n","import type { IActionHttp, IActorHttpOutput, MediatorHttp, IActorHttpArgs } from '@comunica/bus-http';\nimport { ActorHttp } from '@comunica/bus-http';\nimport { KeysHttpProxy } from '@comunica/context-entries';\nimport type { IMediatorTypeTime } from '@comunica/mediatortype-time';\nimport type { IProxyHandler } from '@comunica/types';\n\n/**\n * A comunica Proxy Http Actor.\n */\nexport class ActorHttpProxy extends ActorHttp {\n public readonly mediatorHttp: MediatorHttp;\n\n public constructor(args: IActorHttpProxyArgs) {\n super(args);\n }\n\n public async test(action: IActionHttp): Promise {\n const proxyHandler: IProxyHandler | undefined = action.context.get(KeysHttpProxy.httpProxyHandler);\n if (!proxyHandler) {\n throw new Error(`Actor ${this.name} could not find a proxy handler in the context.`);\n }\n if (!await proxyHandler.getProxy(action)) {\n throw new Error(`Actor ${this.name} could not determine a proxy for the given request.`);\n }\n return { time: Number.POSITIVE_INFINITY };\n }\n\n public async run(action: IActionHttp): Promise {\n const requestedUrl = typeof action.input === 'string' ? action.input : action.input.url;\n const proxyHandler: IProxyHandler = action.context.get(KeysHttpProxy.httpProxyHandler)!;\n\n // Send a request for the modified request\n const output = await this.mediatorHttp.mediate({\n ...await proxyHandler.getProxy(action),\n context: action.context.delete(KeysHttpProxy.httpProxyHandler),\n });\n\n // Modify the response URL\n // use defineProperty to allow modification of unmodifiable objects\n Object.defineProperty(output, 'url', {\n configurable: true,\n enumerable: true,\n get: () => output.headers.get('x-final-url') ?? requestedUrl,\n });\n return output;\n }\n}\n\nexport interface IActorHttpProxyArgs extends IActorHttpArgs {\n /**\n * The HTTP mediator\n */\n mediatorHttp: MediatorHttp;\n}\n","import type { IProxyHandler, IRequest } from '@comunica/types';\n\n/**\n * A proxy handler that prefixes all URLs with a given string.\n */\nexport class ProxyHandlerStatic implements IProxyHandler {\n private readonly prefixUrl: string;\n\n public constructor(prefixUrl: string) {\n this.prefixUrl = prefixUrl;\n }\n\n public async getProxy(request: IRequest): Promise {\n return {\n init: request.init,\n input: this.modifyInput(request.input),\n };\n }\n\n public modifyInput(input: RequestInfo): RequestInfo {\n if (typeof input === 'string') {\n return this.prefixUrl + input;\n }\n return new Request(this.prefixUrl + input.url, input);\n }\n}\n","import type { IActionHttp, IActorHttpArgs, IActorHttpOutput, MediatorHttp } from '@comunica/bus-http';\nimport { ActorHttp } from '@comunica/bus-http';\nimport { KeysHttpWayback, KeysHttpProxy } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IProxyHandler, IRequest } from '@comunica/types';\nimport { stringify as stringifyStream } from '@jeswr/stream-to-string';\nimport 'cross-fetch/polyfill';\n\nconst WAYBACK_URL = 'http://wayback.archive-it.org/';\n\nfunction addWayback(action: IRequest): IRequest {\n const request = new Request(action.input, action.init);\n return {\n input: new Request(new URL(`/${request.url}`, WAYBACK_URL), request),\n };\n}\n\nfunction getProxyHandler(context: IActionContext): (action: IRequest) => Promise {\n const handler = context.get(KeysHttpProxy.httpProxyHandler);\n if (handler) {\n return (action: IRequest) => handler.getProxy(addWayback(action));\n }\n return (action: IRequest) => Promise.resolve(addWayback(action));\n}\n\n/**\n * A Comunica actor to intercept HTTP requests to recover broken links using the WayBack Machine\n */\nexport class ActorHttpWayback extends ActorHttp {\n public readonly mediatorHttp: MediatorHttp;\n\n public constructor(args: IActorHttpWaybackArgs) {\n super(args);\n }\n\n public async test(_action: IActionHttp): Promise {\n return true;\n }\n\n public async run(action: IActionHttp): Promise {\n let result = await this.mediatorHttp.mediate(action);\n\n if (result.status === 404 && action.context.get(KeysHttpWayback.recoverBrokenLinks)) {\n let fallbackResult = await this.mediatorHttp.mediate({\n ...action,\n context: action.context\n .set(KeysHttpWayback.recoverBrokenLinks, false)\n .set(KeysHttpProxy.httpProxyHandler, { getProxy: getProxyHandler(action.context) }),\n });\n\n // If the wayback machine returns a 200 status then use that result\n if (fallbackResult.status === 200) {\n [ result, fallbackResult ] = [ fallbackResult, result ];\n }\n\n // Consume stream to avoid process\n const { body } = fallbackResult;\n if (body) {\n if ('cancel' in body && typeof body.cancel === 'function') {\n await body.cancel();\n } else if ('destroy' in body && typeof (body).destroy === 'function') {\n (body).destroy();\n } else {\n await stringifyStream(ActorHttp.toNodeReadable(body));\n }\n }\n }\n\n return result;\n }\n}\n\nexport interface IActorHttpWaybackArgs extends IActorHttpArgs {\n mediatorHttp: MediatorHttp;\n}\n","/* eslint-disable unicorn/filename-case */\n/* eslint-enable unicorn/filename-case */\nimport { ActorInitQueryBase } from './ActorInitQueryBase';\n\n/* istanbul ignore next */\nif (typeof process === 'undefined') {\n // Polyfills process.nextTick for readable-stream\n globalThis.process = require('process/');\n}\n\nexport class ActorInitQuery extends ActorInitQueryBase {}\n","import type { MediatorHttpInvalidate } from '@comunica/bus-http-invalidate';\nimport type { IActionInit, IActorInitArgs, IActorOutputInit } from '@comunica/bus-init';\nimport { ActorInit } from '@comunica/bus-init';\nimport type { MediatorQueryProcess } from '@comunica/bus-query-process';\nimport type {\n MediatorQueryResultSerializeHandle,\n MediatorQueryResultSerializeMediaTypes,\n MediatorQueryResultSerializeMediaTypeFormats,\n} from '@comunica/bus-query-result-serialize';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A browser-safe comunica Query Init Actor.\n */\nexport class ActorInitQueryBase extends ActorInit implements IActorInitQueryBaseArgs {\n public readonly mediatorQueryResultSerialize: MediatorQueryResultSerializeHandle;\n public readonly mediatorQueryResultSerializeMediaTypeCombiner: MediatorQueryResultSerializeMediaTypes;\n public readonly mediatorQueryResultSerializeMediaTypeFormatCombiner: MediatorQueryResultSerializeMediaTypeFormats;\n public readonly mediatorHttpInvalidate: MediatorHttpInvalidate;\n public readonly mediatorQueryProcess: MediatorQueryProcess;\n\n public readonly queryString?: string;\n public readonly defaultQueryInputFormat?: string;\n public readonly allowNoSources?: boolean;\n public readonly context?: string;\n\n public async test(_action: IActionInit): Promise {\n return true;\n }\n\n public async run(_action: IActionInit): Promise {\n throw new Error('ActorInitSparql#run is not supported in the browser.');\n }\n}\n\nexport interface IActorInitQueryBaseArgs extends IActorInitArgs {\n /**\n * The query process mediator\n */\n mediatorQueryProcess: MediatorQueryProcess;\n /**\n * The query serialize mediator\n */\n mediatorQueryResultSerialize: MediatorQueryResultSerializeHandle;\n /**\n * The query serialize media type combinator\n */\n mediatorQueryResultSerializeMediaTypeCombiner: MediatorQueryResultSerializeMediaTypes;\n /**\n * The query serialize media type format combinator\n */\n mediatorQueryResultSerializeMediaTypeFormatCombiner: MediatorQueryResultSerializeMediaTypeFormats;\n /**\n * The HTTP cache invalidation mediator\n */\n mediatorHttpInvalidate: MediatorHttpInvalidate;\n\n /**\n * A SPARQL query string\n */\n queryString?: string;\n /**\n * The default query input format\n * @default {sparql}\n */\n defaultQueryInputFormat?: string;\n /**\n * If it should be allowed that the user passes no sources.\n * @default {false}\n */\n allowNoSources?: boolean;\n /**\n * A JSON string of a query operation context\n */\n context?: string;\n}\n","import type { IActionSparqlSerialize, IActorQueryResultSerializeOutput } from '@comunica/bus-query-result-serialize';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport { ActionContext } from '@comunica/core';\nimport type {\n IActionContext,\n IQueryOperationResult,\n IQueryEngine,\n IQueryExplained,\n QueryFormatType,\n QueryType,\n QueryExplainMode,\n BindingsStream,\n QueryAlgebraContext,\n QueryStringContext,\n IQueryBindingsEnhanced,\n IQueryQuadsEnhanced,\n QueryEnhanced,\n IQueryContextCommon,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport type { ActorInitQueryBase } from './ActorInitQueryBase';\n\n/**\n * Base implementation of a Comunica query engine.\n */\nexport class QueryEngineBase<\n // eslint-disable-next-line unused-imports/no-unused-vars\n QueryContext extends IQueryContextCommon = IQueryContextCommon,\n QueryStringContextInner extends RDF.QueryStringContext = QueryStringContext,\n QueryAlgebraContextInner extends RDF.QueryAlgebraContext = QueryAlgebraContext,\n>\nimplements IQueryEngine {\n private readonly actorInitQuery: ActorInitQueryBase;\n\n public constructor(actorInitQuery: ActorInitQueryBase) {\n this.actorInitQuery = actorInitQuery;\n }\n\n public async queryBindings(\n query: QueryFormatTypeInner,\n context?: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n ): Promise {\n return this.queryOfType(query, context, 'bindings');\n }\n\n public async queryQuads(\n query: QueryFormatTypeInner,\n context?: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n ): Promise & RDF.ResultStream> {\n return this.queryOfType(query, context, 'quads');\n }\n\n public async queryBoolean(\n query: QueryFormatTypeInner,\n context?: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n ): Promise {\n return this.queryOfType(query, context, 'boolean');\n }\n\n public async queryVoid(\n query: QueryFormatTypeInner,\n context?: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n ): Promise {\n return this.queryOfType(query, context, 'void');\n }\n\n protected async queryOfType(\n query: QueryFormatTypeInner,\n context: undefined | (QueryFormatTypeInner extends string ?\n QueryStringContextInner : QueryAlgebraContextInner),\n expectedType: QueryTypeOut['resultType'],\n ): Promise> {\n const result = await this.query(query, context);\n if (result.resultType === expectedType) {\n return > await result.execute();\n }\n throw new Error(`Query result type '${expectedType}' was expected, while '${result.resultType}' was found.`);\n }\n\n /**\n * Evaluate the given query\n * @param query A query string or algebra.\n * @param context An optional query context.\n * @return {Promise} A promise that resolves to the query output.\n */\n public async query(\n query: QueryFormatTypeInner,\n context?: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n ): Promise {\n const output = await this.queryOrExplain(query, context);\n if ('explain' in output) {\n throw new Error(`Tried to explain a query when in query-only mode`);\n }\n return output;\n }\n\n /**\n * Explain the given query\n * @param query A query string or algebra.\n * @param context An optional query context.\n * @param explainMode The explain mode.\n * @return {Promise} A promise that resolves to\n * the query output or explanation.\n */\n public async explain(\n query: QueryFormatTypeInner,\n context: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n explainMode: QueryExplainMode,\n ): Promise {\n context.explain = explainMode;\n const output = await this.queryOrExplain(query, context);\n return output;\n }\n\n /**\n * Evaluate or explain the given query\n * @param query A query string or algebra.\n * @param context An optional query context.\n * @return {Promise} A promise that resolves to\n * the query output or explanation.\n */\n public async queryOrExplain(\n query: QueryFormatTypeInner,\n context?: QueryFormatTypeInner extends string ? QueryStringContextInner : QueryAlgebraContextInner,\n ): Promise {\n const actionContext: IActionContext = ActionContext.ensureActionContext(context);\n\n // Invalidate caches if cache argument is set to false\n if (actionContext.get(KeysInitQuery.noCache)) {\n await this.invalidateHttpCache();\n }\n\n // Invoke query process\n const { result } = await this.actorInitQuery.mediatorQueryProcess.mediate({ query, context: actionContext });\n if ('explain' in result) {\n return result;\n }\n return QueryEngineBase.internalToFinalResult(result);\n }\n\n /**\n * @param context An optional context.\n * @return {Promise<{[p: string]: number}>} All available SPARQL (weighted) result media types.\n */\n public async getResultMediaTypes(context?: any): Promise> {\n context = ActionContext.ensureActionContext(context);\n return (await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeCombiner\n .mediate({ context, mediaTypes: true })).mediaTypes;\n }\n\n /**\n * @param context An optional context.\n * @return {Promise<{[p: string]: number}>} All available SPARQL result media type formats.\n */\n public async getResultMediaTypeFormats(context?: any): Promise> {\n context = ActionContext.ensureActionContext(context);\n return (await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeFormatCombiner\n .mediate({ context, mediaTypeFormats: true })).mediaTypeFormats;\n }\n\n /**\n * Convert a query result to a string stream based on a certain media type.\n * @param {IQueryOperationResult} queryResult A query result.\n * @param {string} mediaType A media type.\n * @param {ActionContext} context An optional context.\n * @return {Promise} A text stream.\n */\n public async resultToString(queryResult: RDF.Query, mediaType?: string, context?: any):\n Promise {\n context = ActionContext.ensureActionContext(context);\n if (!mediaType) {\n switch (queryResult.resultType) {\n case 'bindings':\n mediaType = 'application/json';\n break;\n case 'quads':\n mediaType = 'application/trig';\n break;\n default:\n mediaType = 'simple';\n break;\n }\n }\n const handle: IActionSparqlSerialize = { ...await QueryEngineBase.finalToInternalResult(queryResult), context };\n return (await this.actorInitQuery.mediatorQueryResultSerialize\n .mediate({ context, handle, handleMediaType: mediaType })).handle;\n }\n\n /**\n * Invalidate all internal caches related to the given page URL.\n * If no page URL is given, then all pages will be invalidated.\n * @param {string} url The page URL to invalidate.\n * @param context An optional ActionContext to pass to the actors.\n * @return {Promise} A promise resolving when the caches have been invalidated.\n */\n public invalidateHttpCache(url?: string, context?: any): Promise {\n context = ActionContext.ensureActionContext(context);\n return this.actorInitQuery.mediatorHttpInvalidate.mediate({ url, context });\n }\n\n /**\n * Convert an internal query result to a final one.\n * @param internalResult An intermediary query result.\n */\n public static internalToFinalResult(internalResult: IQueryOperationResult): QueryType {\n switch (internalResult.type) {\n case 'bindings':\n return {\n resultType: 'bindings',\n execute: async() => internalResult.bindingsStream,\n metadata: async() => await internalResult.metadata(),\n context: internalResult.context,\n };\n case 'quads':\n return {\n resultType: 'quads',\n execute: async() => internalResult.quadStream,\n metadata: async() => await internalResult.metadata(),\n context: internalResult.context,\n };\n case 'boolean':\n return {\n resultType: 'boolean',\n execute: async() => internalResult.execute(),\n context: internalResult.context,\n };\n case 'void':\n return {\n resultType: 'void',\n execute: async() => internalResult.execute(),\n context: internalResult.context,\n };\n }\n }\n\n /**\n * Convert a final query result to an internal one.\n * @param finalResult A final query result.\n */\n public static async finalToInternalResult(finalResult: RDF.Query): Promise {\n switch (finalResult.resultType) {\n case 'bindings':\n return {\n type: 'bindings',\n bindingsStream: await finalResult.execute(),\n metadata: async() => await finalResult.metadata(),\n };\n case 'quads':\n return {\n type: 'quads',\n quadStream: > await finalResult.execute(),\n metadata: async() => await finalResult.metadata(),\n };\n case 'boolean':\n return {\n type: 'boolean',\n execute: () => finalResult.execute(),\n };\n case 'void':\n return {\n type: 'void',\n execute: () => finalResult.execute(),\n };\n }\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport { getDataDestinationValue } from '@comunica/bus-rdf-update-quads';\nimport { KeysInitQuery, KeysQueryOperation, KeysRdfUpdateQuads } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport type { IDataDestination, IQuerySourceWrapper } from '@comunica/types';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Assign Sources Exhaustive Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationAssignSourcesExhaustive extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const sources: IQuerySourceWrapper[] = action.context.get(KeysQueryOperation.querySources) ?? [];\n if (sources.length === 0) {\n return { operation: action.operation, context: action.context };\n }\n if (sources.length === 1) {\n const sourceWrapper = sources[0];\n const destination: IDataDestination | undefined = action.context.get(KeysRdfUpdateQuads.destination);\n if (!destination || sourceWrapper.source.referenceValue === getDataDestinationValue(destination)) {\n try {\n const shape = await sourceWrapper.source.getSelectorShape(action.context);\n if (ActorQueryOperation.doesShapeAcceptOperation(shape, action.operation)) {\n return {\n operation: ActorQueryOperation.assignOperationSource(action.operation, sourceWrapper),\n context: action.context,\n };\n }\n } catch {\n // Fallback to the default case when the selector shape does not exist,\n // which can occur for a non-existent destination.\n }\n }\n }\n return {\n operation: this.assignExhaustive(action.operation, sources),\n // We only keep queryString in the context if we only have a single source that accepts the full operation.\n // In that case, the queryString can be sent to the source as-is.\n context: action.context\n .delete(KeysInitQuery.queryString),\n };\n }\n\n /**\n * Assign the given sources to the leaves in the given query operation.\n * Leaves will be wrapped in a union operation and duplicated for every source.\n * The input operation will not be modified.\n * @param operation The input operation.\n * @param sources The sources to assign.\n */\n public assignExhaustive(operation: Algebra.Operation, sources: IQuerySourceWrapper[]): Algebra.Operation {\n // eslint-disable-next-line ts/no-this-alias\n const self = this;\n return Util.mapOperation(operation, {\n [Algebra.types.PATTERN](subOperation, factory) {\n if (sources.length === 1) {\n return {\n result: ActorQueryOperation.assignOperationSource(subOperation, sources[0]),\n recurse: false,\n };\n }\n return {\n result: factory.createUnion(sources\n .map(source => ActorQueryOperation.assignOperationSource(subOperation, source))),\n recurse: false,\n };\n },\n [Algebra.types.LINK](subOperation, factory) {\n if (sources.length === 1) {\n return {\n result: ActorQueryOperation.assignOperationSource(subOperation, sources[0]),\n recurse: false,\n };\n }\n return {\n result: factory.createAlt(sources\n .map(source => ActorQueryOperation.assignOperationSource(subOperation, source))),\n recurse: false,\n };\n },\n [Algebra.types.NPS](subOperation, factory) {\n if (sources.length === 1) {\n return {\n result: ActorQueryOperation.assignOperationSource(subOperation, sources[0]),\n recurse: false,\n };\n }\n return {\n result: factory.createAlt(sources\n .map(source => ActorQueryOperation.assignOperationSource(subOperation, source))),\n recurse: false,\n };\n },\n [Algebra.types.SERVICE](subOperation) {\n return {\n result: subOperation,\n recurse: false,\n };\n },\n [Algebra.types.CONSTRUCT](subOperation, factory) {\n return {\n result: factory.createConstruct(\n self.assignExhaustive(subOperation.input, sources),\n subOperation.template,\n ),\n recurse: false,\n };\n },\n [Algebra.types.DELETE_INSERT](subOperation, factory) {\n return {\n result: factory.createDeleteInsert(\n subOperation.delete,\n subOperation.insert,\n subOperation.where ? self.assignExhaustive(subOperation.where, sources) : undefined,\n ),\n recurse: false,\n };\n },\n });\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { Algebra, Factory } from 'sparqlalgebrajs';\nimport { Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica BGP to Join Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationBgpToJoin extends ActorOptimizeQueryOperation {\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operation = Util.mapOperation(action.operation, {\n bgp(op: Algebra.Bgp, factory: Factory) {\n return {\n recurse: false,\n result: factory.createJoin(op.patterns),\n };\n },\n });\n return { operation, context: action.context };\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport { KeysInitQuery } from '@comunica/context-entries/lib/Keys';\nimport type { IActorTest } from '@comunica/core';\nimport type { Algebra, Factory } from 'sparqlalgebrajs';\nimport { Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Construct Distinct Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationConstructDistinct extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(action: IActionOptimizeQueryOperation): Promise {\n if (!action.context.has(KeysInitQuery.distinctConstruct)) {\n throw new Error(`${this.name} was not enabled by the query.`);\n }\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operation = Util.mapOperation(action.operation, {\n construct(op: Algebra.Construct, factory: Factory) {\n return {\n recurse: false,\n result: factory.createDistinct(factory.createConstruct(op.input, op.template)),\n };\n },\n });\n return { operation, context: action.context.delete(KeysInitQuery.distinctConstruct) };\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport { Algebra, Factory } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\nconst AF = new Factory();\n\n/**\n * A comunica Describe To Constructs Subject Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationDescribeToConstructsSubject extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(action: IActionOptimizeQueryOperation): Promise {\n if (action.operation.type !== Algebra.types.DESCRIBE) {\n throw new Error(`Actor ${this.name} only supports describe operations, but got ${action.operation.type}`);\n }\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operationOriginal: Algebra.Describe = action.operation;\n\n // Create separate construct queries for all non-variable terms\n const operations: Algebra.Construct[] = operationOriginal.terms\n .filter(term => term.termType !== 'Variable')\n .map((term: RDF.Term) => {\n // Transform each term to a separate construct operation with S ?p ?o patterns (BGP) for all terms\n const patterns: RDF.BaseQuad[] = [\n DF.quad(term, DF.variable('__predicate'), DF.variable('__object')),\n ];\n\n // eslint-disable-next-line unicorn/no-array-for-each\n patterns.forEach((templatePattern: any) => templatePattern.type = 'pattern');\n const templateOperation: Algebra.Operation = {\n type: Algebra.types.BGP,\n patterns: patterns,\n };\n\n // Create a construct query\n return {\n input: templateOperation,\n template: patterns,\n type: 'construct',\n };\n });\n\n // If we have variables in the term list,\n // create one separate construct operation to determine these variables using the input pattern.\n if (operations.length !== operationOriginal.terms.length) {\n let variablePatterns: Algebra.Pattern[] = [];\n operationOriginal.terms\n .filter(term => term.termType === 'Variable')\n // eslint-disable-next-line unicorn/no-array-for-each\n .forEach((term: RDF.Term, i: number) => {\n // Transform each term to an S ?p ?o pattern in a non-conflicting way\n const patterns: RDF.BaseQuad[] = [\n DF.quad(term, DF.variable(`__predicate${i}`), DF.variable(`__object${i}`)),\n ];\n\n // eslint-disable-next-line unicorn/no-array-for-each\n patterns.forEach((templatePattern: any) => templatePattern.type = 'pattern');\n variablePatterns = [ ...variablePatterns, ... patterns ];\n });\n\n // Add a single construct for the variables\n // This requires a join between the input pattern and our variable patterns that form a simple BGP\n operations.push({\n input: {\n type: Algebra.types.JOIN,\n input: [\n operationOriginal.input,\n { type: Algebra.types.BGP, patterns: variablePatterns },\n ],\n },\n template: variablePatterns,\n type: Algebra.types.CONSTRUCT,\n });\n }\n\n // Union the construct operations\n const operation = AF.createUnion(operations, false);\n\n return { operation, context: action.context };\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationArgs,\n IActorOptimizeQueryOperationOutput,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { FragmentSelectorShape, IActionContext, IQuerySourceWrapper } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { mapTermsNested, uniqTerms } from 'rdf-terms';\nimport type { Factory } from 'sparqlalgebrajs';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Filter Pushdown Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationFilterPushdown extends ActorOptimizeQueryOperation {\n private readonly aggressivePushdown: boolean;\n private readonly maxIterations: number;\n private readonly splitConjunctive: boolean;\n private readonly mergeConjunctive: boolean;\n private readonly pushIntoLeftJoins: boolean;\n private readonly pushEqualityIntoPatterns: boolean;\n\n public constructor(args: IActorOptimizeQueryOperationFilterPushdownArgs) {\n super(args);\n }\n\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n let operation: Algebra.Operation = action.operation;\n // eslint-disable-next-line ts/no-this-alias\n const self = this;\n\n // Split conjunctive filters into nested filters\n if (this.splitConjunctive) {\n operation = Util.mapOperation(operation, {\n filter(op: Algebra.Filter, factory: Factory) {\n // Split conjunctive filters into separate filters\n if (op.expression.expressionType === Algebra.expressionTypes.OPERATOR && op.expression.operator === '&&') {\n self.logDebug(action.context, `Split conjunctive filter into ${op.expression.args.length} nested filters`);\n return {\n recurse: true,\n result: op.expression.args\n .reduce((operation, expression) => factory.createFilter(operation, expression), op.input),\n };\n }\n return {\n recurse: true,\n result: op,\n };\n },\n });\n }\n\n // Collect selector shapes of all operations\n const sources = this.getSources(operation);\n // eslint-disable-next-line ts/no-unnecessary-type-assertion\n const sourceShapes = new Map(<[IQuerySourceWrapper, FragmentSelectorShape][]> await Promise.all(sources\n .map(async source => [ source, await source.source.getSelectorShape(action.context) ])));\n\n // Push down all filters\n // We loop until no more filters can be pushed down.\n let repeat = true;\n let iterations = 0;\n while (repeat && iterations < this.maxIterations) {\n repeat = false;\n operation = Util.mapOperation(operation, {\n filter(op: Algebra.Filter, factory: Factory) {\n // Check if the filter must be pushed down\n if (!self.shouldAttemptPushDown(op, sources, sourceShapes)) {\n return {\n recurse: true,\n result: op,\n };\n }\n\n // For all filter expressions in the operation,\n // we attempt to push them down as deep as possible into the algebra.\n const variables = self.getExpressionVariables(op.expression);\n const [ isModified, result ] = self\n .filterPushdown(op.expression, variables, op.input, factory, action.context);\n if (isModified) {\n repeat = true;\n }\n return {\n recurse: true,\n result,\n };\n },\n });\n iterations++;\n }\n\n if (iterations > 1) {\n self.logDebug(action.context, `Pushed down filters in ${iterations} iterations`);\n }\n\n // Merge nested filters into conjunctive filters\n if (this.mergeConjunctive) {\n operation = Util.mapOperation(operation, {\n filter(op: Algebra.Filter, factory: Factory) {\n if (op.input.type === Algebra.types.FILTER) {\n const { nestedExpressions, input } = self.getNestedFilterExpressions(op);\n self.logDebug(action.context, `Merge ${nestedExpressions.length} nested filters into conjunctive filter`);\n return {\n recurse: true,\n result: factory.createFilter(\n input,\n nestedExpressions.slice(1).reduce((previous, current) =>\n factory.createOperatorExpression('&&', [ previous, current ]), nestedExpressions[0]),\n ),\n };\n }\n return {\n recurse: true,\n result: op,\n };\n },\n });\n }\n\n return { operation, context: action.context };\n }\n\n /**\n * Check if the given filter operation must be attempted to push down, based on the following criteria:\n * - Always push down if aggressive mode is enabled\n * - Push down if the filter is extremely selective\n * - Push down if federated and at least one accepts the filter\n * @param operation The filter operation\n * @param sources The query sources in the operation\n * @param sourceShapes A mapping of sources to selector shapes.\n */\n public shouldAttemptPushDown(\n operation: Algebra.Filter,\n sources: IQuerySourceWrapper[],\n sourceShapes: Map,\n ): boolean {\n // Always push down if aggressive mode is enabled\n if (this.aggressivePushdown) {\n return true;\n }\n\n // Push down if the filter is extremely selective\n const expression = operation.expression;\n if (expression.expressionType === Algebra.expressionTypes.OPERATOR &&\n expression.operator === '=' &&\n ((expression.args[0].expressionType === 'term' && expression.args[0].term.termType !== 'Variable' &&\n expression.args[1].expressionType === 'term' && expression.args[1].term.termType === 'Variable') ||\n (expression.args[0].expressionType === 'term' && expression.args[0].term.termType === 'Variable' &&\n expression.args[1].expressionType === 'term' && expression.args[1].term.termType !== 'Variable'))) {\n return true;\n }\n\n // Push down if federated and at least one accepts the filter\n if (sources.some(source => ActorQueryOperation.doesShapeAcceptOperation(sourceShapes.get(source)!, operation))) {\n return true;\n }\n\n // Don't push down in all other cases\n return false;\n }\n\n /**\n * Collected all sources that are defined within the given operation of children recursively.\n * @param operation An operation.\n */\n public getSources(operation: Algebra.Operation): IQuerySourceWrapper[] {\n const sources = new Set();\n const sourceAdder = (subOperation: Algebra.Operation): boolean => {\n const src = ActorQueryOperation.getOperationSource(subOperation);\n if (src) {\n sources.add(src);\n }\n return false;\n };\n Util.recurseOperation(operation, {\n [Algebra.types.PATTERN]: sourceAdder,\n [Algebra.types.LINK]: sourceAdder,\n [Algebra.types.NPS]: sourceAdder,\n [Algebra.types.SERVICE]: sourceAdder,\n });\n return [ ...sources ];\n }\n\n /**\n * Get all variables inside the given expression.\n * @param expression An expression.\n * @return An array of variables, or undefined if the expression is unsupported for pushdown.\n */\n public getExpressionVariables(expression: Algebra.Expression): RDF.Variable[] {\n switch (expression.expressionType) {\n case Algebra.expressionTypes.AGGREGATE:\n case Algebra.expressionTypes.WILDCARD:\n throw new Error(`Getting expression variables is not supported for ${expression.expressionType}`);\n case Algebra.expressionTypes.EXISTENCE:\n return Util.inScopeVariables(expression.input);\n case Algebra.expressionTypes.NAMED:\n return [];\n case Algebra.expressionTypes.OPERATOR:\n return uniqTerms(expression.args.flatMap(arg => this.getExpressionVariables(arg)));\n case Algebra.expressionTypes.TERM:\n if (expression.term.termType === 'Variable') {\n return [ expression.term ];\n }\n return [];\n }\n }\n\n protected getOverlappingOperations(\n operation: Algebra.Operation,\n expressionVariables: RDF.Variable[],\n ): {\n fullyOverlapping: Algebra.Operation[];\n partiallyOverlapping: Algebra.Operation[];\n notOverlapping: Algebra.Operation[];\n } {\n const fullyOverlapping: Algebra.Operation[] = [];\n const partiallyOverlapping: Algebra.Operation[] = [];\n const notOverlapping: Algebra.Operation[] = [];\n for (const input of operation.input) {\n const inputVariables = Util.inScopeVariables(input);\n if (this.variablesSubSetOf(expressionVariables, inputVariables)) {\n fullyOverlapping.push(input);\n } else if (this.variablesIntersect(expressionVariables, inputVariables)) {\n partiallyOverlapping.push(input);\n } else {\n notOverlapping.push(input);\n }\n }\n\n return {\n fullyOverlapping,\n partiallyOverlapping,\n notOverlapping,\n };\n }\n\n /**\n * Recursively push down the given expression into the given operation if possible.\n * Different operators have different semantics for choosing whether or not to push down,\n * and how this pushdown is done.\n * For every passed operator, it is checked whether or not the filter will have any effect on the operation.\n * If not, the filter is voided.\n * @param expression An expression to push down.\n * @param expressionVariables The variables inside the given expression.\n * @param operation The operation to push down into.\n * @param factory An algebra factory.\n * @param context The action context.\n * @return A tuple indicating if the operation was modified and the modified operation.\n */\n public filterPushdown(\n expression: Algebra.Expression,\n expressionVariables: RDF.Variable[],\n operation: Algebra.Operation,\n factory: Factory,\n context: IActionContext,\n ): [ boolean, Algebra.Operation ] {\n // Void false expressions\n if (this.isExpressionFalse(expression)) {\n return [ true, factory.createUnion([]) ];\n }\n\n // Don't push down (NOT) EXISTS\n if (expression.type === Algebra.types.EXPRESSION &&\n expression.expressionType === Algebra.expressionTypes.EXISTENCE) {\n return [ false, factory.createFilter(operation, expression) ];\n }\n\n switch (operation.type) {\n case Algebra.types.EXTEND:\n // Pass if the variable is not part of the expression\n if (!this.variablesIntersect([ operation.variable ], expressionVariables)) {\n return [ true, factory.createExtend(\n this.filterPushdown(expression, expressionVariables, operation.input, factory, context)[1],\n operation.variable,\n operation.expression,\n ) ];\n }\n return [ false, factory.createFilter(operation, expression) ];\n case Algebra.types.FILTER: {\n // Always pass\n const [ isModified, result ] = this\n .filterPushdown(expression, expressionVariables, operation.input, factory, context);\n return [ isModified, factory.createFilter(result, operation.expression) ];\n }\n case Algebra.types.JOIN: {\n // Don't push down for empty join\n if (operation.input.length === 0) {\n return [ false, factory.createFilter(operation, expression) ];\n }\n\n // Determine overlapping operations\n const {\n fullyOverlapping,\n partiallyOverlapping,\n notOverlapping,\n } = this.getOverlappingOperations(operation, expressionVariables);\n\n const joins: Algebra.Operation[] = [];\n let isModified = false;\n if (fullyOverlapping.length > 0) {\n isModified = true;\n joins.push(factory.createJoin(fullyOverlapping\n .map(input => this.filterPushdown(expression, expressionVariables, input, factory, context)[1])));\n }\n if (partiallyOverlapping.length > 0) {\n joins.push(factory.createFilter(factory.createJoin(partiallyOverlapping, false), expression));\n }\n if (notOverlapping.length > 0) {\n joins.push(...notOverlapping);\n }\n\n if (joins.length > 1) {\n isModified = true;\n }\n\n if (isModified) {\n this.logDebug(context, `Push down filter across join entries with ${fullyOverlapping.length} fully overlapping, ${partiallyOverlapping.length} partially overlapping, and ${notOverlapping.length} not overlapping`);\n }\n\n return [ isModified, joins.length === 1 ? joins[0] : factory.createJoin(joins) ];\n }\n case Algebra.types.NOP:\n return [ true, operation ];\n case Algebra.types.PROJECT:\n // Push down if variables overlap\n if (this.variablesIntersect(operation.variables, expressionVariables)) {\n return [ true, factory.createProject(\n this.filterPushdown(expression, expressionVariables, operation.input, factory, context)[1],\n operation.variables,\n ) ];\n }\n // Void expression otherwise\n return [ true, operation ];\n case Algebra.types.UNION: {\n // Determine overlapping operations\n const {\n fullyOverlapping,\n partiallyOverlapping,\n notOverlapping,\n } = this.getOverlappingOperations(operation, expressionVariables);\n\n const unions: Algebra.Operation[] = [];\n let isModified = false;\n if (fullyOverlapping.length > 0) {\n isModified = true;\n unions.push(factory.createUnion(fullyOverlapping\n .map(input => this.filterPushdown(expression, expressionVariables, input, factory, context)[1])));\n }\n if (partiallyOverlapping.length > 0) {\n unions.push(factory.createFilter(factory.createUnion(partiallyOverlapping, false), expression));\n }\n if (notOverlapping.length > 0) {\n unions.push(...notOverlapping);\n }\n\n if (unions.length > 1) {\n isModified = true;\n }\n\n if (isModified) {\n this.logDebug(context, `Push down filter across union entries with ${fullyOverlapping.length} fully overlapping, ${partiallyOverlapping.length} partially overlapping, and ${notOverlapping.length} not overlapping`);\n }\n\n return [ isModified, unions.length === 1 ? unions[0] : factory.createUnion(unions) ];\n }\n case Algebra.types.VALUES:\n // Only keep filter if it overlaps with the variables\n if (this.variablesIntersect(operation.variables, expressionVariables)) {\n return [ false, factory.createFilter(operation, expression) ];\n }\n return [ true, operation ];\n case Algebra.types.LEFT_JOIN: {\n if (this.pushIntoLeftJoins) {\n const rightVariables = Util.inScopeVariables(operation.input[1]);\n if (!this.variablesIntersect(expressionVariables, rightVariables)) {\n // If filter *only* applies to left entry of optional, push it down into that.\n this.logDebug(context, `Push down filter into left join`);\n return [ true, factory.createLeftJoin(\n this.filterPushdown(expression, expressionVariables, operation.input[0], factory, context)[1],\n operation.input[1],\n operation.expression,\n ) ];\n }\n }\n\n // Don't push down in all other cases\n return [ false, factory.createFilter(operation, expression) ];\n }\n case Algebra.types.PATTERN: {\n if (this.pushEqualityIntoPatterns) {\n // Try to push simple FILTER(?s = ) expressions into the pattern\n const pushableResult = this.getEqualityExpressionPushableIntoPattern(expression);\n if (pushableResult) {\n let isModified = false;\n const originalMetadata = operation.metadata;\n operation = mapTermsNested(operation, (value) => {\n if (value.equals(pushableResult.variable)) {\n isModified = true;\n return pushableResult.term;\n }\n return value;\n });\n operation.type = Algebra.types.PATTERN;\n operation.metadata = originalMetadata;\n if (isModified) {\n this.logDebug(context, `Push down filter into pattern for ?${pushableResult.variable.value}`);\n return [ true, operation ];\n }\n }\n }\n\n // Don't push down in all other cases\n return [ false, factory.createFilter(operation, expression) ];\n }\n case Algebra.types.PATH: {\n if (this.pushEqualityIntoPatterns) {\n // Try to push simple FILTER(?s = ) expressions into the path\n const pushableResult = this.getEqualityExpressionPushableIntoPattern(expression);\n if (pushableResult &&\n (operation.subject.equals(pushableResult.variable) || operation.object.equals(pushableResult.variable))) {\n this.logDebug(context, `Push down filter into path for ?${pushableResult.variable.value}`);\n const originalMetadata = operation.metadata;\n operation = factory.createPath(\n operation.subject.equals(pushableResult.variable) ? pushableResult.term : operation.subject,\n operation.predicate,\n operation.object.equals(pushableResult.variable) ? pushableResult.term : operation.object,\n );\n operation.metadata = originalMetadata;\n return [ true, operation ];\n }\n }\n\n // Don't push down in all other cases\n return [ false, factory.createFilter(operation, expression) ];\n }\n case Algebra.types.MINUS:\n case Algebra.types.ALT:\n case Algebra.types.ASK:\n case Algebra.types.BGP:\n case Algebra.types.CONSTRUCT:\n case Algebra.types.DESCRIBE:\n case Algebra.types.DISTINCT:\n case Algebra.types.EXPRESSION:\n case Algebra.types.FROM:\n case Algebra.types.GRAPH:\n case Algebra.types.GROUP:\n case Algebra.types.INV:\n case Algebra.types.LINK:\n case Algebra.types.NPS:\n case Algebra.types.ONE_OR_MORE_PATH:\n case Algebra.types.ORDER_BY:\n case Algebra.types.REDUCED:\n case Algebra.types.SEQ:\n case Algebra.types.SERVICE:\n case Algebra.types.SLICE:\n case Algebra.types.ZERO_OR_MORE_PATH:\n case Algebra.types.ZERO_OR_ONE_PATH:\n case Algebra.types.COMPOSITE_UPDATE:\n case Algebra.types.DELETE_INSERT:\n case Algebra.types.LOAD:\n case Algebra.types.CLEAR:\n case Algebra.types.CREATE:\n case Algebra.types.DROP:\n case Algebra.types.ADD:\n case Algebra.types.MOVE:\n case Algebra.types.COPY:\n // Operations that do not support pushing down\n // Left-join and minus might be possible to support in the future.\n return [ false, factory.createFilter(operation, expression) ];\n }\n }\n\n /**\n * Check if the given expression is a simple equals operation with one variable and one non-literal\n * (or literal with canonical lexical form) term that can be pushed into a pattern.\n * @param expression The current expression.\n * @return The variable and term to fill into the pattern, or undefined.\n */\n public getEqualityExpressionPushableIntoPattern(\n expression: Algebra.Expression,\n ): { variable: RDF.Variable; term: RDF.Term } | undefined {\n if (expression.expressionType === Algebra.expressionTypes.OPERATOR && expression.operator === '=') {\n if (expression.args[0].expressionType === 'term' && expression.args[0].term.termType !== 'Variable' &&\n (expression.args[0].term.termType !== 'Literal' ||\n this.isLiteralWithCanonicalLexicalForm(expression.args[0].term)) &&\n expression.args[1].expressionType === 'term' && expression.args[1].term.termType === 'Variable') {\n return {\n variable: expression.args[1].term,\n term: expression.args[0].term,\n };\n }\n if (expression.args[0].expressionType === 'term' && expression.args[0].term.termType === 'Variable' &&\n expression.args[1].expressionType === 'term' && expression.args[1].term.termType !== 'Variable' &&\n (expression.args[1].term.termType !== 'Literal' ||\n this.isLiteralWithCanonicalLexicalForm(expression.args[1].term))) {\n return {\n variable: expression.args[0].term,\n term: expression.args[1].term,\n };\n }\n }\n }\n\n /**\n * Check if the given term is a literal with datatype that where all values\n * can only have one possible lexical representation.\n * In other words, no variants of values exist that should be considered equal.\n * For example: \"01\"^xsd:number and \"1\"^xsd:number will return false.\n * @param term An RDF term.\n * @protected\n */\n protected isLiteralWithCanonicalLexicalForm(term: RDF.Term): boolean {\n if (term.termType === 'Literal') {\n switch (term.datatype.value) {\n case 'http://www.w3.org/2001/XMLSchema#string':\n case 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString':\n case 'http://www.w3.org/2001/XMLSchema#normalizedString':\n case 'http://www.w3.org/2001/XMLSchema#anyURI':\n case 'http://www.w3.org/2001/XMLSchema#base64Binary':\n case 'http://www.w3.org/2001/XMLSchema#language':\n case 'http://www.w3.org/2001/XMLSchema#Name':\n case 'http://www.w3.org/2001/XMLSchema#NCName':\n case 'http://www.w3.org/2001/XMLSchema#NMTOKEN':\n case 'http://www.w3.org/2001/XMLSchema#token':\n case 'http://www.w3.org/2001/XMLSchema#hexBinary':\n return true;\n }\n }\n return false;\n }\n\n /**\n * Check if there is an overlap between the two given lists of variables.\n * @param varsA A list of variables.\n * @param varsB A list of variables.\n */\n public variablesIntersect(varsA: RDF.Variable[], varsB: RDF.Variable[]): boolean {\n return varsA.some(varA => varsB.some(varB => varA.equals(varB)));\n }\n\n /**\n * Check if all variables from the first list are included in the second list.\n * The second list may contain other variables as well.\n * @param varsNeedles A list of variables to search for.\n * @param varsHaystack A list of variables to search in.\n */\n public variablesSubSetOf(varsNeedles: RDF.Variable[], varsHaystack: RDF.Variable[]): boolean {\n return varsNeedles.length <= varsHaystack.length &&\n varsNeedles.every(varA => varsHaystack.some(varB => varA.equals(varB)));\n }\n\n /**\n * Check if an expression is simply 'false'.\n * @param expression An expression.\n */\n public isExpressionFalse(expression: Algebra.Expression): boolean {\n return (expression.term && expression.term.termType === 'Literal' && expression.term.value === 'false');\n }\n\n /**\n * Get all directly nested filter expressions.\n * As soon as a non-filter is found, it is returned as the input field.\n * @param op A filter expression.\n */\n public getNestedFilterExpressions(\n op: Algebra.Filter,\n ): { nestedExpressions: Algebra.Expression[]; input: Algebra.Operation } {\n if (op.input.type === Algebra.types.FILTER) {\n const childData = this.getNestedFilterExpressions(op.input);\n return { nestedExpressions: [ op.expression, ...childData.nestedExpressions ], input: childData.input };\n }\n return { nestedExpressions: [ op.expression ], input: op.input };\n }\n}\n\nexport interface IActorOptimizeQueryOperationFilterPushdownArgs extends IActorOptimizeQueryOperationArgs {\n /**\n * If filters should be pushed down as deep as possible.\n * If false, filters will only be pushed down if the source(s) accept them,\n * or if the filter is very selective.\n * @range {boolean}\n * @default {false}\n */\n aggressivePushdown: boolean;\n /**\n * The maximum number of full iterations across the query can be done for attempting to push down filters.\n * @default {10}\n */\n maxIterations: number;\n /**\n * If conjunctive filters should be split into nested filters before applying filter pushdown.\n * This can enable pushing down deeper.\n * @range {boolean}\n * @default {true}\n */\n splitConjunctive: boolean;\n /**\n * If nested filters should be merged into conjunctive filters after applying filter pushdown.\n * @range {boolean}\n * @default {true}\n */\n mergeConjunctive: boolean;\n /**\n * If filters should be pushed into left-joins.\n * @range {boolean}\n * @default {true}\n */\n pushIntoLeftJoins: boolean;\n /**\n * If simple equality filters should be pushed into patterns and paths.\n * This only applies to equality filters with terms that are not literals that have no canonical lexical form.\n * @range {boolean}\n * @default {true}\n */\n pushEqualityIntoPatterns: boolean;\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQuerySourceWrapper } from '@comunica/types';\nimport { Algebra, Factory } from 'sparqlalgebrajs';\n\nconst AF = new Factory();\n\n/**\n * A comunica Group Sources Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationGroupSources extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(action: IActionOptimizeQueryOperation): Promise {\n if (ActorQueryOperation.getOperationSource(action.operation)) {\n throw new Error(`Actor ${this.name} does not work with top-level operation sources.`);\n }\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n return { operation: await this.groupOperation(action.operation, action.context), context: action.context };\n }\n\n /**\n * Group operations belonging to the same source together, only if that source accepts the grouped operations.\n * This grouping will be done recursively for the whole operation tree.\n * Operations annotated with sources are considered leaves in the tree.\n * @param operation An operation to group.\n * @param context The action context.\n */\n public async groupOperation(operation: Algebra.Operation, context: IActionContext): Promise {\n // Return operation as-is if the operation already has a single source, or if the operation has no children.\n if (ActorQueryOperation.getOperationSource(operation) ?? !('input' in operation)) {\n return operation;\n }\n\n // If operation has a single input, move source annotation upwards if the source can handle it.\n if (!Array.isArray(operation.input)) {\n const groupedInput = await this.groupOperation(operation.input, context);\n if (groupedInput.metadata?.scopedSource) {\n const source: IQuerySourceWrapper = ActorQueryOperation.getOperationSource(groupedInput)!;\n if (ActorQueryOperation\n .doesShapeAcceptOperation(await source.source.getSelectorShape(context), operation)) {\n this.logDebug(context, `Hoist 1 source-specific operation into a single ${operation.type} operation for ${source.source.toString()}`);\n ActorQueryOperation.removeOperationSource(groupedInput);\n operation = ActorQueryOperation.assignOperationSource(operation, source);\n }\n }\n return { ...operation, input: groupedInput };\n }\n\n // If operation has multiple inputs, cluster source annotations.\n const inputs: Algebra.Operation[] = await Promise.all(operation.input\n .map(subInput => this.groupOperation(subInput, context)));\n const clusters = this.clusterOperationsWithEqualSources(inputs);\n\n // If we just have a single cluster, move the source annotation upwards\n if (clusters.length === 1) {\n const newInputs = clusters[0];\n const source = ActorQueryOperation.getOperationSource(clusters[0][0])!;\n return {\n ...await this.moveSourceAnnotationUpwardsIfPossible(operation, newInputs, source, context),\n input: newInputs,\n };\n }\n\n // If the number of clusters is equal to the number of original inputs, do nothing.\n if (clusters.length === inputs.length) {\n return { ...operation, input: inputs };\n }\n\n // If we have multiple clusters, created nested multi-operations\n let multiFactoryMethod: (children: Algebra.Operation[], flatten: boolean) => Algebra.Operation;\n switch (operation.type) {\n case Algebra.types.JOIN:\n multiFactoryMethod = AF.createJoin.bind(AF);\n break;\n case Algebra.types.UNION:\n multiFactoryMethod = AF.createUnion.bind(AF);\n break;\n case Algebra.types.ALT:\n multiFactoryMethod = AF.createAlt.bind(AF);\n break;\n case Algebra.types.SEQ:\n multiFactoryMethod = AF.createSeq.bind(AF);\n break;\n default:\n // While LeftJoin and Minus are also multi-operations,\n // these can never occur because they only have 2 inputs,\n // so these cases will always be captured by one of the 2 if-cases above\n // (clusters.length === 1 or clusters.length === input.length)\n\n // In all other cases, error\n throw new Error(`Unsupported operation '${operation.type}' detected while grouping sources`);\n }\n return await this.groupOperationMulti(clusters, multiFactoryMethod, context);\n }\n\n protected async groupOperationMulti(\n clusters: Algebra.Operation[][],\n factoryMethod: (children: Algebra.Operation[], flatten: boolean) => Algebra.Operation,\n context: IActionContext,\n ): Promise {\n let flatten = true;\n const nestedMerges = await Promise.all(clusters.map(async(cluster) => {\n const source = ActorQueryOperation.getOperationSource(cluster[0])!;\n const merged = await this\n .moveSourceAnnotationUpwardsIfPossible(factoryMethod(cluster, true), cluster, source, context);\n if (ActorQueryOperation.getOperationSource(merged)) {\n flatten = false;\n }\n return merged;\n }));\n return factoryMethod(nestedMerges, flatten);\n }\n\n /**\n * Cluster the given operations by equal source annotations.\n * @param operationsIn An array of operations to cluster.\n */\n public clusterOperationsWithEqualSources(operationsIn: Algebra.Operation[]): Algebra.Operation[][] {\n // Operations can have a source, or no source at all\n const sourceOperations: Map = new Map();\n const sourcelessOperations: Algebra.Operation[] = [];\n\n // Cluster by source\n for (const operation of operationsIn) {\n const source: IQuerySourceWrapper = ActorQueryOperation.getOperationSource(operation)!;\n if (source) {\n if (!sourceOperations.has(source)) {\n sourceOperations.set(source, []);\n }\n sourceOperations.get(source)!.push(operation);\n } else {\n sourcelessOperations.push(operation);\n }\n }\n\n // Return clusters\n const clusters: Algebra.Operation[][] = [];\n if (sourcelessOperations.length > 0) {\n clusters.push(sourcelessOperations);\n }\n for (const [ source, operations ] of sourceOperations.entries()) {\n clusters.push(operations\n .map(operation => ActorQueryOperation.assignOperationSource(operation, source)));\n }\n return clusters;\n }\n\n /**\n * If the given source accepts the grouped operation, annotate the grouped operation with the source,\n * and remove the source annotation from the seperate input operations.\n * Otherwise, return the grouped operation unchanged.\n * @param operation A grouped operation consisting of all given input operations.\n * @param inputs An array of operations that share the same source annotation.\n * @param source The common source.\n * @param context The action context.\n */\n public async moveSourceAnnotationUpwardsIfPossible(\n operation: O,\n inputs: Algebra.Operation[],\n source: IQuerySourceWrapper | undefined,\n context: IActionContext,\n ): Promise {\n if (source && ActorQueryOperation\n .doesShapeAcceptOperation(await source.source.getSelectorShape(context), operation)) {\n this.logDebug(context, `Hoist ${inputs.length} source-specific operations into a single ${operation.type} operation for ${source.source.toString()}`);\n operation = ActorQueryOperation.assignOperationSource(operation, source);\n for (const input of inputs) {\n ActorQueryOperation.removeOperationSource(input);\n }\n }\n return operation;\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { Algebra, Factory } from 'sparqlalgebrajs';\nimport { Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Join BGP Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationJoinBgp extends ActorOptimizeQueryOperation {\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operation = Util.mapOperation(action.operation, {\n join(op: Algebra.Join, factory: Factory) {\n if (op.input.every(subInput => subInput.type === 'bgp')) {\n return {\n recurse: false,\n result: factory.createBgp(op.input.flatMap(subInput => subInput.patterns)),\n };\n }\n return {\n recurse: false,\n result: op,\n };\n },\n });\n return { operation, context: action.context };\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { Algebra, Factory } from 'sparqlalgebrajs';\nimport { Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Join Connected Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationJoinConnected extends ActorOptimizeQueryOperation {\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operation = Util.mapOperation(action.operation, {\n join(op: Algebra.Join, factory: Factory) {\n return {\n recurse: false,\n result: ActorOptimizeQueryOperationJoinConnected.cluster(op, factory),\n };\n },\n });\n return { operation, context: action.context };\n }\n\n /**\n * Iteratively cluster join entries based on their overlapping variables.\n * @param op A join operation.\n * @param factory An algebra factory.\n */\n public static cluster(op: Algebra.Join, factory: Factory): Algebra.Operation {\n // Initialize each entry to be in a separate cluster\n const initialClusters: IJoinCluster[] = op.input.map(subOp => ({\n inScopeVariables: Object.fromEntries(Util.inScopeVariables(subOp).map(variable => [ variable.value, true ])),\n entries: [ subOp ],\n }));\n\n // Iteratively merge clusters until they don't change anymore\n let oldClusters: IJoinCluster[];\n let newClusters: IJoinCluster[] = initialClusters;\n do {\n oldClusters = newClusters;\n newClusters = ActorOptimizeQueryOperationJoinConnected.clusterIteration(oldClusters);\n } while (oldClusters.length !== newClusters.length);\n\n // Create new join operation of latest clusters\n const subJoins = newClusters\n .map(cluster => cluster.entries.length === 1 ? cluster.entries[0] : factory.createJoin(cluster.entries));\n return subJoins.length === 1 ? subJoins[0] : factory.createJoin(subJoins, false);\n }\n\n /**\n * Perform a single clustering iteration.\n * Clusters will be joined if they have overlapping variables.\n * @param oldCluster\n */\n public static clusterIteration(oldCluster: IJoinCluster[]): IJoinCluster[] {\n const newClusters: IJoinCluster[] = [];\n\n for (const entry of oldCluster) {\n // Try to add entry to a join cluster\n let joined = false;\n for (const newEntry of newClusters) {\n if (ActorOptimizeQueryOperationJoinConnected\n .haveOverlappingVariables(entry.inScopeVariables, newEntry.inScopeVariables)) {\n newEntry.entries = [ ...newEntry.entries, ...entry.entries ];\n newEntry.inScopeVariables = { ...newEntry.inScopeVariables, ...entry.inScopeVariables };\n joined = true;\n break;\n }\n }\n\n // If none was found, create new cluster\n if (!joined) {\n newClusters.push({\n inScopeVariables: entry.inScopeVariables,\n entries: entry.entries,\n });\n }\n }\n\n return newClusters;\n }\n\n /**\n * Check if the two given variable objects are overlapping.\n * @param variablesA A variables objects.\n * @param variablesB A variables objects.\n */\n public static haveOverlappingVariables(\n variablesA: Record,\n variablesB: Record,\n ): boolean {\n for (const variableA of Object.keys(variablesA)) {\n if (variablesB[variableA]) {\n return true;\n }\n }\n return false;\n }\n}\n\n/**\n * A cluster of join entries.\n */\nexport interface IJoinCluster {\n /**\n * Union of all variables in scope within the join entries.\n */\n inScopeVariables: Record;\n /**\n * Join entries\n */\n entries: Algebra.Operation[];\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport { KeysQuerySourceIdentify } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQuerySourceWrapper, MetadataBindings } from '@comunica/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport { Algebra, Factory, Util } from 'sparqlalgebrajs';\n\nconst AF = new Factory();\nconst DF = new DataFactory();\n\n/**\n * A comunica Prune Empty Source Operations Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationPruneEmptySourceOperations extends ActorOptimizeQueryOperation {\n private readonly useAskIfSupported: boolean;\n\n public constructor(args: IActorOptimizeQueryOperationPruneEmptySourceOperationsArgs) {\n super(args);\n }\n\n public async test(action: IActionOptimizeQueryOperation): Promise {\n if (ActorQueryOperation.getOperationSource(action.operation)) {\n throw new Error(`Actor ${this.name} does not work with top-level operation sources.`);\n }\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n let operation = action.operation;\n\n // Collect all operations with source types\n // Only consider unions of patterns or alts of links, since these are created during exhaustive source assignment.\n const collectedOperations: (Algebra.Pattern | Algebra.Link)[] = [];\n // eslint-disable-next-line ts/no-this-alias\n const self = this;\n Util.recurseOperation(operation, {\n [Algebra.types.UNION](subOperation) {\n self.collectMultiOperationInputs(subOperation.input, collectedOperations, Algebra.types.PATTERN);\n return true;\n },\n [Algebra.types.ALT](subOperation) {\n self.collectMultiOperationInputs(subOperation.input, collectedOperations, Algebra.types.LINK);\n return false;\n },\n [Algebra.types.SERVICE]() {\n return false;\n },\n });\n\n // Determine in an async manner whether or not these sources return non-empty results\n const emptyOperations: Set = new Set();\n await Promise.all(collectedOperations.map(async(collectedOperation) => {\n const checkOperation = collectedOperation.type === 'link' ?\n AF.createPattern(DF.variable('?s'), collectedOperation.iri, DF.variable('?o')) :\n collectedOperation;\n if (!await this.hasSourceResults(\n ActorQueryOperation.getOperationSource(collectedOperation)!,\n checkOperation,\n action.context,\n )) {\n emptyOperations.add(collectedOperation);\n }\n }));\n\n // Only perform next mapping if we have at least one empty operation\n if (emptyOperations.size > 0) {\n this.logDebug(action.context, `Pruning ${emptyOperations.size} source-specific operations`);\n // Rewrite operations by removing the empty children\n operation = Util.mapOperation(operation, {\n [Algebra.types.UNION](subOperation, factory) {\n return self.mapMultiOperation(subOperation, emptyOperations, children => factory.createUnion(children));\n },\n [Algebra.types.ALT](subOperation, factory) {\n return self.mapMultiOperation(subOperation, emptyOperations, children => factory.createAlt(children));\n },\n });\n\n // Identify and remove projections that have become empty now due to missing variables\n operation = Util.mapOperation(operation, {\n [Algebra.types.PROJECT](subOperation, factory) {\n if (ActorOptimizeQueryOperationPruneEmptySourceOperations.hasEmptyOperation(subOperation)) {\n return {\n recurse: false,\n result: factory.createUnion([]),\n };\n }\n return {\n recurse: true,\n result: subOperation,\n };\n },\n });\n }\n\n return { operation, context: action.context };\n }\n\n protected static hasEmptyOperation(operation: Algebra.Operation): boolean {\n // If union (or alt) is empty, consider it empty (`Array.every` on an empty array always returns true)\n // But if we find a union with multiple children,\n // *all* of the children must be empty before the full operation is considered empty.\n let emptyOperation = false;\n Util.recurseOperation(operation, {\n [Algebra.types.UNION](subOperation) {\n if (subOperation.input.every(subSubOperation => ActorOptimizeQueryOperationPruneEmptySourceOperations\n .hasEmptyOperation(subSubOperation))) {\n emptyOperation = true;\n }\n return false;\n },\n [Algebra.types.ALT](subOperation) {\n if (subOperation.input.length === 0) {\n emptyOperation = true;\n }\n return false;\n },\n });\n return emptyOperation;\n }\n\n protected collectMultiOperationInputs(\n inputs: Algebra.Operation[],\n collectedOperations: (Algebra.Pattern | Algebra.Link)[],\n inputType: (Algebra.Pattern | Algebra.Link)['type'],\n ): void {\n for (const input of inputs) {\n if (ActorQueryOperation.getOperationSource(input) && input.type === inputType) {\n collectedOperations.push(input);\n }\n }\n }\n\n protected mapMultiOperation(\n operation: O,\n emptyOperations: Set,\n multiOperationFactory: (input: O['input']) => Algebra.Operation,\n ): {\n result: Algebra.Operation;\n recurse: boolean;\n } {\n // Determine which operations return non-empty results\n const nonEmptyInputs = operation.input.filter(input => !emptyOperations.has(input));\n\n // Remove empty operations\n if (nonEmptyInputs.length === operation.input.length) {\n return { result: operation, recurse: true };\n }\n if (nonEmptyInputs.length === 0) {\n return { result: multiOperationFactory([]), recurse: false };\n }\n if (nonEmptyInputs.length === 1) {\n return { result: nonEmptyInputs[0], recurse: true };\n }\n return { result: multiOperationFactory(nonEmptyInputs), recurse: true };\n }\n\n /**\n * Check if the given query operation will produce at least one result in the given source.\n * @param source A query source.\n * @param input A query operation.\n * @param context The query context.\n */\n public async hasSourceResults(\n source: IQuerySourceWrapper,\n input: Algebra.Operation,\n context: IActionContext,\n ): Promise {\n // Traversal sources should never be considered empty at optimization time.\n if (source.context?.get(KeysQuerySourceIdentify.traverse)) {\n return true;\n }\n\n // Send an ASK query\n if (this.useAskIfSupported) {\n const askOperation = AF.createAsk(input);\n if (ActorQueryOperation\n .doesShapeAcceptOperation(await source.source.getSelectorShape(context), askOperation)) {\n return source.source.queryBoolean(askOperation, context);\n }\n }\n\n // Send the operation as-is and check the response cardinality\n const bindingsStream = source.source.queryBindings(input, context);\n return new Promise((resolve, reject) => {\n bindingsStream.on('error', reject);\n bindingsStream.getProperty('metadata', (metadata: MetadataBindings) => {\n bindingsStream.destroy();\n resolve(metadata.cardinality.value > 0);\n });\n });\n }\n}\n\nexport interface IActorOptimizeQueryOperationPruneEmptySourceOperationsArgs extends IActorOptimizeQueryOperationArgs {\n /**\n * If true, ASK queries will be sent to the source instead of COUNT queries to check emptiness for patterns.\n * This will only be done for sources that accept ASK queries.\n * @default {false}\n */\n useAskIfSupported: boolean;\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A comunica Rewrite Add Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationRewriteAdd extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operation = Util.mapOperation(action.operation, {\n [Algebra.types.ADD](operationOriginal, factory) {\n // CONSTRUCT all quads from the source, and INSERT them into the destination\n const destination = operationOriginal.destination === 'DEFAULT' ?\n DF.defaultGraph() :\n operationOriginal.destination;\n const source = operationOriginal.source === 'DEFAULT' ? DF.defaultGraph() : operationOriginal.source;\n\n const result = factory.createDeleteInsert(undefined, [\n factory.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o'), destination),\n ], factory.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o'), source));\n\n return {\n result,\n recurse: false,\n };\n },\n });\n\n return { operation, context: action.context };\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Rewrite Copy Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationRewriteCopy extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operation = Util.mapOperation(action.operation, {\n [Algebra.types.COPY](operationOriginal, factory) {\n // No-op if source === destination\n let result: Algebra.CompositeUpdate;\n if ((typeof operationOriginal.destination === 'string' && typeof operationOriginal.source === 'string' &&\n operationOriginal.destination === operationOriginal.source) ||\n (typeof operationOriginal.destination !== 'string' && typeof operationOriginal.source !== 'string' &&\n operationOriginal.destination.equals(operationOriginal.source))) {\n result = factory.createCompositeUpdate([]);\n } else {\n // COPY is equivalent to drop destination, and add\n result = factory.createCompositeUpdate([\n factory.createDrop(operationOriginal.destination, true),\n factory.createAdd(operationOriginal.source, operationOriginal.destination, operationOriginal.silent),\n ]);\n }\n\n return {\n result,\n recurse: false,\n };\n },\n });\n\n return { operation, context: action.context };\n }\n}\n","import type {\n IActionOptimizeQueryOperation,\n IActorOptimizeQueryOperationOutput,\n IActorOptimizeQueryOperationArgs,\n} from '@comunica/bus-optimize-query-operation';\nimport { ActorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Rewrite Move Optimize Query Operation Actor.\n */\nexport class ActorOptimizeQueryOperationRewriteMove extends ActorOptimizeQueryOperation {\n public constructor(args: IActorOptimizeQueryOperationArgs) {\n super(args);\n }\n\n public async test(_action: IActionOptimizeQueryOperation): Promise {\n return true;\n }\n\n public async run(action: IActionOptimizeQueryOperation): Promise {\n const operation = Util.mapOperation(action.operation, {\n [Algebra.types.MOVE](operationOriginal, factory) {\n // No-op if source === destination\n let result: Algebra.CompositeUpdate;\n if ((typeof operationOriginal.destination === 'string' && typeof operationOriginal.source === 'string' &&\n operationOriginal.destination === operationOriginal.source) ||\n (typeof operationOriginal.destination !== 'string' && typeof operationOriginal.source !== 'string' &&\n operationOriginal.destination.equals(operationOriginal.source))) {\n result = factory.createCompositeUpdate([]);\n } else {\n // MOVE is equivalent to drop destination, add, and drop source\n const updates = [\n factory.createDrop(operationOriginal.destination, true),\n factory.createAdd(operationOriginal.source, operationOriginal.destination, operationOriginal.silent),\n factory.createDrop(operationOriginal.source),\n ];\n result = factory.createCompositeUpdate(updates);\n }\n\n return {\n result,\n recurse: false,\n };\n },\n });\n\n return { operation, context: action.context };\n }\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n IActionContext,\n IQueryOperationResult,\n IQueryOperationResultBindings,\n} from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Ask Query Operation Actor.\n */\nexport class ActorQueryOperationAsk extends ActorQueryOperationTypedMediated {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'ask');\n }\n\n public async testOperation(_operation: Algebra.Ask, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Ask, context: IActionContext): Promise {\n // Call other query operations like this:\n const output: IQueryOperationResult = await this.mediatorQueryOperation.mediate(\n { operation: operation.input, context },\n );\n const { bindingsStream }: IQueryOperationResultBindings = ActorQueryOperation.getSafeBindings(output);\n return { type: 'boolean', execute: async() => (await bindingsStream.take(1).toArray()).length === 1 };\n }\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { Factory } from 'sparqlalgebrajs';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor\n * that handles SPARQL BGP operations by rewriting it as a join operator.\n */\nexport class ActorQueryOperationBgpJoin extends ActorQueryOperationTypedMediated {\n public static readonly FACTORY = new Factory();\n\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'bgp');\n }\n\n public async testOperation(_operation: Algebra.Bgp, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Bgp, context: IActionContext):\n Promise {\n return this.mediatorQueryOperation.mediate({\n operation: ActorQueryOperationBgpJoin.FACTORY.createJoin(operation.patterns),\n context,\n });\n }\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n IQueryOperationResultBindings,\n IActionContext,\n IQueryOperationResult,\n MetadataQuads,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { getTermsNested, getVariables, uniqTerms } from 'rdf-terms';\nimport { Algebra } from 'sparqlalgebrajs';\nimport { BindingsToQuadsIterator } from './BindingsToQuadsIterator';\n\n/**\n * A comunica Construct Query Operation Actor.\n */\nexport class ActorQueryOperationConstruct extends ActorQueryOperationTypedMediated {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'construct');\n }\n\n /**\n * Find all variables in a list of triple patterns.\n * @param {Algebra.Pattern[]} patterns An array of triple patterns.\n * @return {RDF.Variable[]} The variables in the triple patterns.\n */\n public static getVariables(patterns: RDF.BaseQuad[]): RDF.Variable[] {\n return uniqTerms(( []).concat\n .apply([], patterns.map(pattern => getVariables(getTermsNested(pattern)))));\n }\n\n public async testOperation(_operation: Algebra.Construct, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operationOriginal: Algebra.Construct, context: IActionContext):\n Promise {\n // Apply a projection on our CONSTRUCT variables first, as the query may contain other variables as well.\n const variables: RDF.Variable[] = ActorQueryOperationConstruct.getVariables(operationOriginal.template);\n const operation: Algebra.Operation = { type: Algebra.types.PROJECT, input: operationOriginal.input, variables };\n\n // Evaluate the input query\n const output: IQueryOperationResultBindings = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation, context }),\n );\n\n // Construct triples using the result based on the pattern.\n // If it's a DESCRIBE query don't apply the blank node localisation.\n const quadStream: AsyncIterator = new BindingsToQuadsIterator(\n operationOriginal.template,\n output.bindingsStream,\n );\n\n // Let the final metadata contain the estimated number of triples\n const metadata: (() => Promise) = () => output.metadata().then(meta => ({\n ...meta,\n order: undefined,\n cardinality: {\n type: meta.cardinality.type,\n value: meta.cardinality.value * operationOriginal.template.length,\n },\n canContainUndefs: false,\n availableOrders: undefined,\n }));\n\n return {\n metadata,\n quadStream,\n type: 'quads',\n };\n }\n}\n","import type { Bindings, BindingsStream } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { ArrayIterator, MultiTransformIterator } from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport { mapTermsNested } from 'rdf-terms';\n\nconst DF = new DataFactory();\n\n/**\n * Transforms a bindings stream into a quad stream given a quad template.\n *\n * This conforms to the SPARQL 1.1 spec on constructing triples:\n * https://www.w3.org/TR/sparql11-query/#rConstructTriples\n */\nexport class BindingsToQuadsIterator extends MultiTransformIterator {\n protected readonly template: RDF.BaseQuad[];\n protected blankNodeCounter: number;\n\n public constructor(template: RDF.BaseQuad[], bindingsStream: BindingsStream) {\n super(bindingsStream, { autoStart: false });\n this.template = template;\n this.blankNodeCounter = 0;\n }\n\n /**\n * Bind the given term.\n * If the term is a variable and the variable is bound in the bindings object,\n * return the bindings value.\n * If the term is a variable and the variable is not bound in the bindings object,\n * a falsy value is returned..\n * Otherwise, the term itself is returned.\n * @param {Bindings} bindings A bindings object.\n * @param {RDF.Term} term An RDF term.\n * @return {RDF.Term} If the given term is not a variable, the term itself is returned.\n * If the given term is a variable, then the bound term is returned,\n * or a falsy value if it did not exist in the bindings.\n */\n public static bindTerm(bindings: Bindings, term: RDF.Term): RDF.Term | undefined {\n if (term.termType === 'Variable') {\n return bindings.get(term);\n }\n return term;\n }\n\n /**\n * Bind the given quad pattern.\n * If one of the terms was a variable AND is not bound in the bindings,\n * a falsy value will be returned.\n * @param {Bindings} bindings A bindings object.\n * @param {RDF.Quad} pattern An RDF quad.\n * @return {RDF.Quad} A bound RDF quad or undefined.\n */\n public static bindQuad(bindings: Bindings, pattern: RDF.BaseQuad): RDF.Quad | undefined {\n try {\n return mapTermsNested( pattern, (term) => {\n const boundTerm = BindingsToQuadsIterator.bindTerm(bindings, term);\n if (!boundTerm) {\n throw new Error('Unbound term');\n }\n return boundTerm;\n });\n } catch {\n // Do nothing\n }\n }\n\n /**\n * Convert a blank node to a unique blank node in the given context.\n * If the given term is not a blank node, the term itself will be returned.\n * @param blankNodeCounter A counter value for the blank node.\n * @param {RDF.Term} term The term that should be localized.\n * @return {RDF.Term} A term.\n */\n public static localizeBlankNode(blankNodeCounter: number, term: RDF.Term): RDF.Term {\n if (term.termType === 'BlankNode') {\n return DF.blankNode(`${term.value}${blankNodeCounter}`);\n }\n return term;\n }\n\n /**\n * Convert the given quad to a quad that only contains unique blank nodes.\n * @param blankNodeCounter A counter value for the blank node.\n * @param {RDF.BaseQuad} pattern The pattern that should be localized.\n * @return {RDF.BaseQuad} A quad.\n */\n public static localizeQuad(blankNodeCounter: number, pattern: RDF.BaseQuad): RDF.BaseQuad {\n return mapTermsNested(pattern, term => BindingsToQuadsIterator.localizeBlankNode(blankNodeCounter, term));\n }\n\n /**\n * Convert the given template to a list of quads based on the given bindings.\n * @param {Bindings} bindings A bindings object.\n * @param {RDF.Quad[]} template A list of quad patterns.\n * @param blankNodeCounter A counter value for the blank node.\n * @return {RDF.Quad[]} A list of quads.\n */\n public bindTemplate(bindings: Bindings, template: RDF.BaseQuad[], blankNodeCounter: number): RDF.Quad[] {\n const quads: RDF.BaseQuad[] = template\n // Make sure the multiple instantiations of the template contain different blank nodes, as required by SPARQL 1.1.\n .map(BindingsToQuadsIterator.localizeQuad.bind(null, blankNodeCounter))\n // Bind variables to bound terms\n .map(x => BindingsToQuadsIterator.bindQuad.bind(null, bindings)(x))\n // Remove quads that contained unbound terms, i.e., variables.\n .filter(Boolean);\n return quads;\n }\n\n public override _createTransformer(bindings: Bindings): AsyncIterator {\n return new ArrayIterator(this.bindTemplate(\n bindings,\n this.template,\n this.blankNodeCounter++,\n ), { autoStart: false });\n }\n}\n","import type { MediatorHashBindings } from '@comunica/bus-hash-bindings';\nimport type { MediatorHashQuads } from '@comunica/bus-hash-quads';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n Bindings,\n BindingsStream,\n IActionContext,\n IQueryOperationResult,\n IQueryOperationResultBindings,\n IQueryOperationResultQuads,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Distinct Hash Query Operation Actor.\n */\nexport class ActorQueryOperationDistinctHash extends ActorQueryOperationTypedMediated {\n public readonly mediatorHashBindings: MediatorHashBindings;\n public readonly mediatorHashQuads: MediatorHashQuads;\n\n public constructor(args: IActorQueryOperationDistinctHashArgs) {\n super(args, 'distinct');\n }\n\n public async testOperation(_operation: Algebra.Distinct, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Distinct, context: IActionContext): Promise {\n const output = await this.mediatorQueryOperation.mediate({ operation: operation.input, context });\n\n // TODO: In next/major, remove undefined check when mediatorHashQuads is made required\n if (output.type === 'quads' && this.mediatorHashQuads !== undefined) {\n const outputQuads: IQueryOperationResultQuads = ActorQueryOperation.getSafeQuads(\n output,\n );\n\n const quadStream: AsyncIterator = outputQuads.quadStream.filter(await this.newHashFilterQuads(context));\n return {\n type: 'quads',\n quadStream,\n metadata: outputQuads.metadata,\n };\n }\n\n const outputBindings: IQueryOperationResultBindings = ActorQueryOperation.getSafeBindings(\n output,\n );\n\n const bindingsStream: BindingsStream = outputBindings.bindingsStream.filter(await this.newHashFilter(context));\n return {\n type: 'bindings',\n bindingsStream,\n metadata: outputBindings.metadata,\n };\n }\n\n /**\n * Create a new distinct filter function.\n * This will maintain an internal hash datastructure so that every bindings object only returns true once.\n * @param context The action context.\n * @return {(bindings: Bindings) => boolean} A distinct filter for bindings.\n */\n public async newHashFilter(context: IActionContext): Promise<(bindings: Bindings) => boolean> {\n const { hashFunction } = await this.mediatorHashBindings.mediate({ allowHashCollisions: true, context });\n const hashes: Record = {};\n return (bindings: Bindings) => {\n const hash: string = hashFunction(bindings);\n\n return !(hash in hashes) && (hashes[hash] = true);\n };\n }\n\n /**\n * Create a new distinct filter function to hash quads.\n * This will maintain an internal hash datastructure so that every quad object only returns true once.\n * @param context The action context.\n * @return {(quad: RDF.Quad) => boolean} A distinct filter for quads.\n */\n public async newHashFilterQuads(context: IActionContext): Promise<(quad: RDF.Quad) => boolean> {\n // TODO: In next/major, this check can be removed when mediatorHashQuads is made required\n if (this.mediatorHashQuads === undefined) {\n return _quad => true;\n }\n const { hashFunction } = await this.mediatorHashQuads.mediate({ allowHashCollisions: true, context });\n const hashes: Record = {};\n return (quad: RDF.Quad) => {\n const hash: string = hashFunction(quad);\n\n return !(hash in hashes) && (hashes[hash] = true);\n };\n }\n}\n\nexport interface IActorQueryOperationDistinctHashArgs extends IActorQueryOperationTypedMediatedArgs {\n mediatorHashBindings: MediatorHashBindings;\n // TODO: In next/major, this field should be made required in the next major update\n mediatorHashQuads?: MediatorHashQuads;\n}\n","import { BindingsFactory, bindingsToString } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { ExpressionError } from '@comunica/expression-evaluator';\nimport { AsyncEvaluator, isExpressionError } from '@comunica/expression-evaluator';\nimport type { Bindings, IActionContext, IQueryOperationResult, IQueryOperationResultBindings } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Extend Query Operation Actor.\n *\n * See https://www.w3.org/TR/sparql11-query/#sparqlAlgebra;\n */\nexport class ActorQueryOperationExtend extends ActorQueryOperationTypedMediated {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationExtendArgs) {\n super(args, 'extend');\n }\n\n public async testOperation(operation: Algebra.Extend, context: IActionContext): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n // Will throw error for unsupported opperations\n const _ = Boolean(new AsyncEvaluator(\n operation.expression,\n ActorQueryOperation.getAsyncExpressionContext(context, this.mediatorQueryOperation, bindingsFactory),\n ));\n return true;\n }\n\n public async runOperation(operation: Algebra.Extend, context: IActionContext):\n Promise {\n const { expression, input, variable } = operation;\n\n const output: IQueryOperationResultBindings = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation: input, context }),\n );\n\n // Throw if the variable has already been bound\n if ((await output.metadata()).variables.some(innerVariable => innerVariable.equals(variable))) {\n throw new Error(`Illegal binding to variable '${variable.value}' that has already been bound`);\n }\n\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const config = { ...ActorQueryOperation.getAsyncExpressionContext(\n context,\n this.mediatorQueryOperation,\n bindingsFactory,\n ) };\n const evaluator = new AsyncEvaluator(expression, config);\n\n // Transform the stream by extending each Bindings with the expression result\n const transform = async(bindings: Bindings, next: any, push: (pusbBindings: Bindings) => void): Promise => {\n try {\n const result = await evaluator.evaluate(bindings);\n // Extend operation is undefined when the key already exists\n // We just override it here.\n const extended = bindings.set(variable, result);\n push(extended);\n } catch (error: unknown) {\n if (isExpressionError( error)) {\n // Errors silently don't actually extend according to the spec\n push(bindings);\n // But let's warn anyway\n this.logWarn(context, `Expression error for extend operation (${( error).message})` +\n `with bindings '${bindingsToString(bindings)}'`);\n } else {\n bindingsStream.emit('error', error);\n }\n }\n next();\n };\n\n // eslint-disable-next-line ts/no-misused-promises\n const bindingsStream = output.bindingsStream.transform({ autoStart: false, transform });\n return {\n type: 'bindings',\n bindingsStream,\n async metadata() {\n const outputMetadata = await output.metadata();\n return { ...outputMetadata, variables: [ ...outputMetadata.variables, variable ]};\n },\n };\n }\n}\n\nexport interface IActorQueryOperationExtendArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import { BindingsFactory, bindingsToString } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { AsyncEvaluator, isExpressionError } from '@comunica/expression-evaluator';\nimport type { Bindings, IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Filter Sparqlee Query Operation Actor.\n */\nexport class ActorQueryOperationFilter extends ActorQueryOperationTypedMediated {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationFilterSparqleeArgs) {\n super(args, 'filter');\n }\n\n public async testOperation(operation: Algebra.Filter, context: IActionContext): Promise {\n // Will throw error for unsupported operators\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const config = { ...ActorQueryOperation.getAsyncExpressionContext(\n context,\n this.mediatorQueryOperation,\n bindingsFactory,\n ) };\n const _ = new AsyncEvaluator(operation.expression, config);\n return true;\n }\n\n public async runOperation(operation: Algebra.Filter, context: IActionContext):\n Promise {\n const outputRaw = await this.mediatorQueryOperation.mediate({ operation: operation.input, context });\n const output = ActorQueryOperation.getSafeBindings(outputRaw);\n ActorQueryOperation.validateQueryOutput(output, 'bindings');\n\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const config = { ...ActorQueryOperation.getAsyncExpressionContext(\n context,\n this.mediatorQueryOperation,\n bindingsFactory,\n ) };\n const evaluator = new AsyncEvaluator(operation.expression, config);\n\n const transform = async(item: Bindings, next: any, push: (bindings: Bindings) => void): Promise => {\n try {\n const result = await evaluator.evaluateAsEBV(item);\n if (result) {\n push(item);\n }\n } catch (error: unknown) {\n // We ignore all Expression errors.\n // Other errors (likely programming mistakes) are still propagated.\n //\n // > Specifically, FILTERs eliminate any solutions that,\n // > when substituted into the expression, either result in\n // > an effective boolean value of false or produce an error.\n // > ...\n // > These errors have no effect outside of FILTER evaluation.\n // https://www.w3.org/TR/sparql11-query/#expressions\n if (isExpressionError( error)) {\n // In many cases, this is a user error, where the user should manually cast the variable to a string.\n // In order to help users debug this, we should report these errors via the logger as warnings.\n this.logWarn(context, 'Error occurred while filtering.', () => ({ error, bindings: bindingsToString(item) }));\n } else {\n bindingsStream.emit('error', error);\n }\n }\n next();\n };\n\n // eslint-disable-next-line ts/no-misused-promises\n const bindingsStream = output.bindingsStream.transform({ transform, autoStart: false });\n return { type: 'bindings', bindingsStream, metadata: output.metadata };\n }\n}\n\nexport interface IActorQueryOperationFilterSparqleeArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { Algebra, Factory } from 'sparqlalgebrajs';\n\n/**\n * A comunica From Query Operation Actor.\n */\nexport class ActorQueryOperationFromQuad extends ActorQueryOperationTypedMediated {\n private static readonly FACTORY: Factory = new Factory();\n private static readonly ALGEBRA_TYPES: string[] = Object.keys(Algebra.types).map(key => ( Algebra.types)[key]);\n\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'from');\n }\n\n /**\n * Create a deep copy of the given operation.\n * @param {Operation} operation An operation.\n * @param {(subOperation: Operation) => Operation} recursiveCb A callback for recursive operation calls.\n * @return {Operation} The copied operation.\n */\n public static copyOperation(\n operation: Algebra.Operation,\n recursiveCb: (subOperation: Algebra.Operation) => Algebra.Operation,\n ): Algebra.Operation {\n const copiedOperation: Algebra.Operation = {};\n for (const key of Object.keys(operation)) {\n if (Array.isArray(operation[key]) && key !== 'template') {\n // We exclude the 'template' entry, as we don't want to modify the template value of construct operations\n if (key === 'variables') {\n copiedOperation[key] = operation[key];\n } else {\n copiedOperation[key] = operation[key].map(recursiveCb);\n }\n } else if (ActorQueryOperationFromQuad.ALGEBRA_TYPES.includes(operation[key].type)) {\n copiedOperation[key] = recursiveCb(operation[key]);\n } else {\n copiedOperation[key] = operation[key];\n }\n }\n return copiedOperation;\n }\n\n /**\n * Recursively transform the given operation to use the given graphs as default graph\n * This will (possibly) create a new operation and not modify the given operation.\n * @param {Operation} operation An operation.\n * @param {RDF.Term[]} defaultGraphs Graph terms.\n * @return {Operation} A new operation.\n */\n public static applyOperationDefaultGraph(operation: Algebra.Operation, defaultGraphs: RDF.Term[]): Algebra.Operation {\n // If the operation is a BGP or Path, change the graph.\n if ((operation.type === 'bgp' && operation.patterns.length > 0) ||\n operation.type === 'path' ||\n operation.type === 'pattern') {\n if (operation.type === 'bgp') {\n return ActorQueryOperationFromQuad.joinOperations(operation.patterns.map((pattern: Algebra.Pattern) => {\n if (pattern.graph.termType !== 'DefaultGraph') {\n return ActorQueryOperationFromQuad.FACTORY.createBgp([ pattern ]);\n }\n const bgps = defaultGraphs.map((graph: RDF.Term) =>\n ActorQueryOperationFromQuad.FACTORY.createBgp([ Object.assign(\n ActorQueryOperationFromQuad.FACTORY\n .createPattern(pattern.subject, pattern.predicate, pattern.object, graph),\n { metadata: pattern.metadata },\n ) ]));\n return ActorQueryOperationFromQuad.unionOperations(bgps);\n }));\n }\n if (operation.graph.termType !== 'DefaultGraph') {\n return operation;\n }\n const paths = defaultGraphs.map(\n (graph: RDF.Term) => {\n if (operation.type === 'path') {\n return ActorQueryOperationFromQuad.FACTORY\n .createPath(operation.subject, operation.predicate, operation.object, graph);\n }\n return Object.assign(ActorQueryOperationFromQuad.FACTORY\n .createPattern(\n operation.subject,\n operation.predicate,\n operation.object,\n graph,\n ), { metadata: operation.metadata });\n },\n );\n return ActorQueryOperationFromQuad.unionOperations(paths);\n }\n\n return ActorQueryOperationFromQuad.copyOperation(\n operation,\n (subOperation: Algebra.Operation) => this.applyOperationDefaultGraph(subOperation, defaultGraphs),\n );\n }\n\n /**\n * Recursively transform the given operation to use the given graphs as named graph\n * This will (possibly) create a new operation and not modify the given operation.\n * @param {Operation} operation An operation.\n * @param {RDF.Term[]} namedGraphs Graph terms.\n * @param {RDF.Term[]} defaultGraphs Default graph terms.\n * @return {Operation} A new operation.\n */\n public static applyOperationNamedGraph(\n operation: Algebra.Operation,\n namedGraphs: RDF.NamedNode[],\n defaultGraphs: RDF.Term[],\n ): Algebra.Operation {\n // If the operation is a BGP or Path, change the graph.\n if ((operation.type === 'bgp' && operation.patterns.length > 0) ||\n operation.type === 'path' ||\n operation.type === 'pattern') {\n const patternGraph: RDF.Term = operation.type === 'bgp' ? operation.patterns[0].graph : operation.graph;\n if (patternGraph.termType === 'DefaultGraph') {\n // SPARQL spec (8.2) describes that when FROM NAMED's are used without a FROM, the default graph must be empty.\n // The FROMs are transformed before this step to a named node, so this will not apply to this case anymore.\n return { type: Algebra.types.BGP, patterns: []};\n }\n if (patternGraph.termType === 'Variable') {\n if (namedGraphs.length === 1) {\n const graph: RDF.NamedNode = namedGraphs[0];\n // If the pattern graph is a variable, replace the graph and bind the variable using VALUES\n const bindings: Record = {};\n bindings[`?${patternGraph.value}`] = graph;\n const values: Algebra.Values = ActorQueryOperationFromQuad.FACTORY\n .createValues([ patternGraph ], [ bindings ]);\n\n let pattern: Algebra.Operation;\n if (operation.type === 'bgp') {\n pattern = ActorQueryOperationFromQuad.FACTORY\n .createBgp(operation.patterns.map((pat: Algebra.Pattern) => ActorQueryOperationFromQuad.FACTORY\n .createPattern(pat.subject, pat.predicate, pat.object, graph)));\n } else if (operation.type === 'path') {\n pattern = ActorQueryOperationFromQuad.FACTORY\n .createPath(operation.subject, operation.predicate, operation.object, graph);\n } else {\n pattern = ActorQueryOperationFromQuad.FACTORY\n .createPattern(operation.subject, operation.predicate, operation.object, graph);\n }\n\n return ActorQueryOperationFromQuad.FACTORY.createJoin([ values, pattern ]);\n }\n // If the pattern graph is a variable, take the union of the pattern applied to each available named graph\n return ActorQueryOperationFromQuad.unionOperations(namedGraphs.map(\n (graph: RDF.NamedNode) => ActorQueryOperationFromQuad.applyOperationNamedGraph(\n operation,\n [ graph ],\n defaultGraphs,\n ),\n ));\n }\n // The pattern's graph is defined (including the default graphs)\n const isNamedGraphAvailable: boolean = [ ...namedGraphs, ...defaultGraphs ].some(\n (namedGraph: RDF.Term) => namedGraph.equals(patternGraph),\n );\n if (isNamedGraphAvailable) {\n // Return the pattern as-is if the pattern's graph was selected in a FROM NAMED\n return operation;\n }\n // No-op if the pattern's graph was not selected in a FROM NAMED.\n return { type: Algebra.types.BGP, patterns: []};\n }\n\n return ActorQueryOperationFromQuad.copyOperation(\n operation,\n (subOperation: Algebra.Operation) => this.applyOperationNamedGraph(subOperation, namedGraphs, defaultGraphs),\n );\n }\n\n /**\n * Transform the given array of operations into a join operation.\n * @param {Operation[]} operations An array of operations, must contain at least one operation.\n * @return {Join} A join operation.\n */\n public static joinOperations(operations: Algebra.Operation[]): Algebra.Operation {\n if (operations.length === 1) {\n return operations[0];\n }\n if (operations.length > 1) {\n return ActorQueryOperationFromQuad.FACTORY.createJoin(operations);\n }\n throw new Error('A join can only be applied on at least one operation');\n }\n\n /**\n * Transform the given array of operations into a union operation.\n * @param {Operation[]} operations An array of operations, must contain at least one operation.\n * @return {Union} A union operation.\n */\n public static unionOperations(operations: Algebra.Operation[]): Algebra.Operation {\n if (operations.length === 1) {\n return operations[0];\n }\n if (operations.length > 1) {\n return ActorQueryOperationFromQuad.FACTORY.createUnion(operations);\n }\n throw new Error('A union can only be applied on at least one operation');\n }\n\n /**\n * Transform an operation based on the default and named graphs in the pattern.\n *\n * FROM sets the default graph.\n * If multiple are available, take the union of the operation for all of them at quad-pattern level.\n *\n * FROM NAMED indicates which named graphs are available.\n * This will rewrite the query so that only triples from the given named graphs can be selected.\n *\n * @param {From} pattern A from operation.\n * @return {Operation} The transformed operation.\n */\n public static createOperation(pattern: Algebra.From): Algebra.Operation {\n let operation: Algebra.Operation = pattern.input;\n if (pattern.default.length > 0) {\n operation = ActorQueryOperationFromQuad.applyOperationDefaultGraph(operation, pattern.default);\n }\n if (pattern.named.length > 0 || pattern.default.length > 0) {\n operation = ActorQueryOperationFromQuad.applyOperationNamedGraph(operation, pattern.named, pattern.default);\n }\n return operation;\n }\n\n public async testOperation(_operation: Algebra.From, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(\n operationOriginal: Algebra.From,\n context: IActionContext,\n ): Promise {\n const operation: Algebra.Operation = ActorQueryOperationFromQuad.createOperation(operationOriginal);\n return this.mediatorQueryOperation.mediate({ operation, context });\n }\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorHashBindings } from '@comunica/bus-hash-bindings';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { AsyncEvaluator } from '@comunica/expression-evaluator';\nimport type { BindingsStream, IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { ArrayIterator, TransformIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { GroupsState } from './GroupsState';\n\n/**\n * A comunica Group Query Operation Actor.\n */\nexport class ActorQueryOperationGroup extends ActorQueryOperationTypedMediated {\n public readonly mediatorHashBindings: MediatorHashBindings;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationGroupArgs) {\n super(args, 'group');\n }\n\n public async testOperation(operation: Algebra.Group, context: IActionContext): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n for (const aggregate of operation.aggregates) {\n // Will throw for unsupported expressions\n const _ = new AsyncEvaluator(\n aggregate.expression,\n ActorQueryOperation.getAsyncExpressionContext(context, this.mediatorQueryOperation, bindingsFactory),\n );\n }\n return true;\n }\n\n public async runOperation(operation: Algebra.Group, context: IActionContext):\n Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n // Create a hash function\n const { hashFunction } = await this.mediatorHashBindings.mediate({ allowHashCollisions: true, context });\n\n // Get result stream for the input query\n const { input, aggregates } = operation;\n const outputRaw = await this.mediatorQueryOperation.mediate({ operation: input, context });\n const output = ActorQueryOperation.getSafeBindings(outputRaw);\n\n // The variables in scope are the variables on which we group, i.e. pattern.variables.\n // For 'GROUP BY ?x, ?z', this is [?x, ?z], for 'GROUP by expr(?x) as ?e' this is [?e].\n // But also in scope are the variables defined by the aggregations, since GROUP has to handle this.\n const variables = [\n ...operation.variables,\n ...aggregates.map(agg => agg.variable),\n ];\n\n const sparqleeConfig = ActorQueryOperation.getAsyncExpressionContext(\n context,\n this.mediatorQueryOperation,\n bindingsFactory,\n );\n\n // Wrap a new promise inside an iterator that completes when the stream has ended or when an error occurs\n const bindingsStream = new TransformIterator(() => new Promise((resolve, reject) => {\n const groups = new GroupsState(hashFunction, operation, sparqleeConfig, bindingsFactory);\n\n // Phase 2: Collect aggregator results\n // We can only return when the binding stream ends, when that happens\n // we return the identified groups. Which are nothing more than Bindings\n // of the grouping variables merged with the aggregate variables\n // eslint-disable-next-line ts/no-misused-promises\n output.bindingsStream.on('end', async() => {\n try {\n const bindingsStreamInner = new ArrayIterator(await groups.collectResults(), { autoStart: false });\n resolve(bindingsStreamInner);\n } catch (error: unknown) {\n reject(error);\n }\n });\n\n // Make sure to propagate any errors in the binding stream\n output.bindingsStream.on('error', reject);\n\n // Phase 1: Consume the stream, identify the groups and populate the aggregators.\n // We need to bind this after the 'error' and 'end' listeners to avoid the\n // stream having ended before those listeners are bound.\n output.bindingsStream.on('data', (bindings) => {\n groups.consumeBindings(bindings).catch(reject);\n });\n }), { autoStart: false });\n\n return {\n type: 'bindings',\n bindingsStream,\n metadata: async() => ({ ...await output.metadata(), variables }),\n };\n }\n}\n\nexport interface IActorQueryOperationGroupArgs extends IActorQueryOperationTypedMediatedArgs {\n mediatorHashBindings: MediatorHashBindings;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { BindingsFactory } from '@comunica/bindings-factory';\nimport type { HashFunction } from '@comunica/bus-hash-bindings';\nimport type { IAsyncEvaluatorContext } from '@comunica/expression-evaluator';\nimport { AsyncAggregateEvaluator } from '@comunica/expression-evaluator';\nimport type { Bindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A simple type alias for strings that should be hashes of Bindings\n */\nexport type BindingsHash = string;\n\n/**\n * A state container for a single group\n *\n * @property {Bindings} bindings - The binding entries on which we group\n */\nexport interface IGroup {\n bindings: Bindings;\n aggregators: Record;\n}\n\n/**\n * A state manager for the groups constructed by consuming the bindings-stream.\n */\nexport class GroupsState {\n private readonly groups: Map;\n // We need to the promises of a group so we can await the initialisation/ creation of them.\n // Without this we could have duplicate work/ override precious work.\n private readonly groupsInitializer: Map>;\n private readonly groupVariables: Set;\n private readonly distinctHashes: null | Map>;\n private waitCounter: number;\n // Function that resolves the promise given by collectResults\n private waitResolver: (bindings: Bindings[]) => void;\n private resultHasBeenCalled: boolean;\n\n public constructor(\n private readonly hashFunction: HashFunction,\n private readonly pattern: Algebra.Group,\n private readonly sparqleeConfig: IAsyncEvaluatorContext,\n private readonly bindingsFactory: BindingsFactory,\n ) {\n this.groups = new Map();\n this.groupsInitializer = new Map();\n this.groupVariables = new Set(this.pattern.variables.map(x => x.value));\n this.waitCounter = 1;\n this.resultHasBeenCalled = false;\n }\n\n /**\n * - Consumes a stream binding\n * - Find the corresponding group and create one if need be\n * - Feeds the binding to the group's aggregators\n *\n * @param {Bindings} bindings - The Bindings to consume\n */\n public consumeBindings(bindings: Bindings): Promise {\n const check = this.resultCheck();\n if (check) {\n return check;\n }\n // We increment the counter and decrement him when put action is performed.\n this.waitCounter++;\n\n // Select the bindings on which we group\n const grouper = bindings\n .filter((_, variable) => this.groupVariables.has(variable.value));\n const groupHash = this.hashBindings(grouper);\n\n // First member of group -> create new group\n let groupInitializer: Promise | undefined = this.groupsInitializer.get(groupHash);\n\n let res: Promise;\n if (groupInitializer) {\n const groupInitializerDefined = groupInitializer;\n res = (async() => {\n const group = await groupInitializerDefined;\n await Promise.all(this.pattern.aggregates.map(async(aggregate) => {\n // Distinct handling is done in the aggregator.\n const variable = aggregate.variable.value;\n await group.aggregators[variable].put(bindings);\n }));\n })().then(async() => {\n this.subtractWaitCounterAndCollect();\n });\n } else {\n // Initialize state for all aggregators for new group\n groupInitializer = (async() => {\n const aggregators: Record = {};\n await Promise.all(this.pattern.aggregates.map(async(aggregate) => {\n const key = aggregate.variable.value;\n aggregators[key] = new AsyncAggregateEvaluator(aggregate, this.sparqleeConfig);\n await aggregators[key].put(bindings);\n }));\n\n const group = { aggregators, bindings: grouper };\n this.groups.set(groupHash, group);\n this.subtractWaitCounterAndCollect();\n return group;\n })();\n this.groupsInitializer.set(groupHash, groupInitializer);\n res = groupInitializer;\n }\n return res;\n }\n\n private subtractWaitCounterAndCollect(): void {\n if (--this.waitCounter === 0) {\n this.handleResultCollection();\n }\n }\n\n private handleResultCollection(): void {\n // Collect groups\n let rows: Bindings[] = [ ...this.groups ].map(([ _, group ]) => {\n const { bindings: groupBindings, aggregators } = group;\n\n // Collect aggregator bindings\n // If the aggregate errorred, the result will be undefined\n let returnBindings = groupBindings;\n for (const variable in aggregators) {\n const value = aggregators[variable].result();\n if (value) {\n // Filter undefined\n returnBindings = returnBindings.set(DF.variable(variable), value);\n }\n }\n\n // Merge grouping bindings and aggregator bindings\n return returnBindings;\n });\n\n // Case: No Input\n // Some aggregators still define an output on the empty input\n // Result is a single Bindings\n if (rows.length === 0 && this.groupVariables.size === 0) {\n const single: [RDF.Variable, RDF.Term][] = [];\n for (const aggregate of this.pattern.aggregates) {\n const key = aggregate.variable;\n const value = AsyncAggregateEvaluator.emptyValue(aggregate);\n if (value !== undefined) {\n single.push([ key, value ]);\n }\n }\n rows = [ this.bindingsFactory.bindings(single) ];\n }\n this.waitResolver(rows);\n }\n\n private resultCheck(): Promise | undefined {\n if (this.resultHasBeenCalled) {\n return Promise.reject(new Error('Calling any function after calling collectResult is invalid.'));\n }\n }\n\n /**\n * Collect the result of the final state. This returns a Bindings per group,\n * and a (possibly empty) Bindings in case no Bindings have been consumed yet.\n * You can only call this method once, after calling this method,\n * calling any function on this will result in an error being thrown.\n */\n public collectResults(): Promise {\n const check = this.resultCheck();\n if (check) {\n return check;\n }\n this.resultHasBeenCalled = true;\n const res = new Promise((resolve) => {\n this.waitResolver = resolve;\n });\n this.subtractWaitCounterAndCollect();\n return res;\n }\n\n /**\n * @param {Bindings} bindings - Bindings to hash\n */\n private hashBindings(bindings: Bindings): BindingsHash {\n return this.hashFunction(bindings);\n }\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { MediatorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IActorTest } from '@comunica/core';\nimport type { IQueryOperationResult, IActionContext, IJoinEntry } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Join Query Operation Actor.\n */\nexport class ActorQueryOperationJoin extends ActorQueryOperationTypedMediated {\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public constructor(args: IActorQueryOperationJoinArgs) {\n super(args, 'join');\n }\n\n public async testOperation(_operation: Algebra.Join, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(\n operationOriginal: Algebra.Join,\n context: IActionContext,\n ): Promise {\n const entries: IJoinEntry[] = (await Promise.all(operationOriginal.input\n .map(async subOperation => ({\n output: await this.mediatorQueryOperation.mediate({ operation: subOperation, context }),\n operation: subOperation,\n }))))\n .map(({ output, operation }) => ({\n output: ActorQueryOperation.getSafeBindings(output),\n operation,\n }));\n\n return this.mediatorJoin.mediate({ type: 'inner', entries, context });\n }\n}\n\nexport interface IActorQueryOperationJoinArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { MediatorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IActorTest } from '@comunica/core';\nimport { AsyncEvaluator, isExpressionError } from '@comunica/expression-evaluator';\nimport type { IQueryOperationResult, Bindings, IActionContext, IJoinEntry } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica LeftJoin Query Operation Actor.\n */\nexport class ActorQueryOperationLeftJoin extends ActorQueryOperationTypedMediated {\n public readonly mediatorJoin: MediatorRdfJoin;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationLeftJoinArgs) {\n super(args, 'leftjoin');\n }\n\n public async testOperation(_operation: Algebra.LeftJoin, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operationOriginal: Algebra.LeftJoin, context: IActionContext):\n Promise {\n // Delegate to join bus\n const entries: IJoinEntry[] = (await Promise.all(operationOriginal.input\n .map(async subOperation => ({\n output: await this.mediatorQueryOperation.mediate({ operation: subOperation, context }),\n operation: subOperation,\n }))))\n .map(({ output, operation }) => ({\n output: ActorQueryOperation.getSafeBindings(output),\n operation,\n }));\n const joined = await this.mediatorJoin.mediate({ type: 'optional', entries, context });\n\n // If the pattern contains an expression, filter the resulting stream\n if (operationOriginal.expression) {\n const rightMetadata = await entries[1].output.metadata();\n const expressionVariables = rightMetadata.variables;\n\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const config = { ...ActorQueryOperation.getAsyncExpressionContext(\n context,\n this.mediatorQueryOperation,\n bindingsFactory,\n ) };\n const evaluator = new AsyncEvaluator(operationOriginal.expression, config);\n const bindingsStream = joined.bindingsStream\n .transform({\n autoStart: false,\n // eslint-disable-next-line ts/no-misused-promises\n transform: async(bindings: Bindings, done: () => void, push: (item: Bindings) => void) => {\n // If variables of the right-hand entry are missing, we skip expression evaluation\n if (!expressionVariables.every(variable => bindings.has(variable.value))) {\n push(bindings);\n return done();\n }\n\n try {\n const result = await evaluator.evaluateAsEBV(bindings);\n if (result) {\n push(bindings);\n }\n } catch (error: unknown) {\n // We ignore all Expression errors.\n // Other errors (likely programming mistakes) are still propagated.\n // Left Join is defined in terms of Filter (https://www.w3.org/TR/sparql11-query/#defn_algJoin),\n // and Filter requires this (https://www.w3.org/TR/sparql11-query/#expressions).\n if (isExpressionError(error)) {\n // In many cases, this is a user error, where the user should manually cast the variable to a string.\n // In order to help users debug this, we should report these errors via the logger as warnings.\n this.logWarn(context, 'Error occurred while filtering.', () => ({ error, bindings }));\n } else {\n bindingsStream.emit('error', error);\n }\n }\n done();\n },\n });\n joined.bindingsStream = bindingsStream;\n }\n\n return joined;\n }\n}\n\nexport interface IActorQueryOperationLeftJoinArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { MediatorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult, IJoinEntry } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Minus Query Operation Actor.\n */\nexport class ActorQueryOperationMinus extends ActorQueryOperationTypedMediated {\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public constructor(args: IActorQueryOperationMinusArgs) {\n super(args, 'minus');\n }\n\n public async testOperation(_operation: Algebra.Minus, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(\n operationOriginal: Algebra.Minus,\n context: IActionContext,\n ): Promise {\n const entries: IJoinEntry[] = (await Promise.all(operationOriginal.input\n .map(async subOperation => ({\n output: await this.mediatorQueryOperation.mediate({ operation: subOperation, context }),\n operation: subOperation,\n }))))\n .map(({ output, operation }) => ({\n output: ActorQueryOperation.getSafeBindings(output),\n operation,\n }));\n\n return this.mediatorJoin.mediate({ type: 'minus', entries, context });\n }\n}\n\nexport interface IActorQueryOperationMinusArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { SingletonIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation)\n * actor that handles SPARQL nop operations.\n */\nexport class ActorQueryOperationNop extends ActorQueryOperationTypedMediated {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationNopArgs) {\n super(args, 'nop');\n }\n\n public async testOperation(_operation: Algebra.Nop, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Nop, context: IActionContext): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n\n return {\n bindingsStream: new SingletonIterator(bindingsFactory.bindings()),\n metadata: () => Promise.resolve({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 1 },\n canContainUndefs: false,\n variables: [],\n }),\n type: 'bindings',\n };\n }\n}\n\nexport interface IActorQueryOperationNopArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { AsyncEvaluator, isExpressionError, orderTypes } from '@comunica/expression-evaluator';\nimport type { Bindings, IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type { Term } from '@rdfjs/types';\nimport { Algebra } from 'sparqlalgebrajs';\nimport { SortIterator } from './SortIterator';\n\n/**\n * A comunica OrderBy Sparqlee Query Operation Actor.\n */\nexport class ActorQueryOperationOrderBy extends ActorQueryOperationTypedMediated {\n private readonly window: number;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationOrderBySparqleeArgs) {\n super(args, 'orderby');\n this.window = args.window ?? Number.POSITIVE_INFINITY;\n }\n\n public async testOperation(operation: Algebra.OrderBy, context: IActionContext): Promise {\n // Will throw error for unsupported operators\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n\n for (let expr of operation.expressions) {\n expr = this.extractSortExpression(expr);\n const _ = new AsyncEvaluator(\n expr,\n ActorQueryOperation.getAsyncExpressionContext(context, this.mediatorQueryOperation, bindingsFactory),\n );\n }\n return true;\n }\n\n public async runOperation(operation: Algebra.OrderBy, context: IActionContext):\n Promise {\n const outputRaw = await this.mediatorQueryOperation.mediate({ operation: operation.input, context });\n const output = ActorQueryOperation.getSafeBindings(outputRaw);\n\n const options = { window: this.window };\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const sparqleeConfig = {\n ...ActorQueryOperation.getAsyncExpressionContext(context, this.mediatorQueryOperation, bindingsFactory),\n };\n let { bindingsStream } = output;\n\n // Sorting backwards since the first one is the most important therefore should be ordered last.\n for (let i = operation.expressions.length - 1; i >= 0; i--) {\n let expr = operation.expressions[i];\n const isAscending = this.isAscending(expr);\n expr = this.extractSortExpression(expr);\n // Transform the stream by annotating it with the expr result\n const evaluator = new AsyncEvaluator(expr, sparqleeConfig);\n interface IAnnotatedBinding {\n bindings: Bindings;\n result: Term | undefined;\n }\n\n const transform = async(bindings: Bindings, next: any, push: (result: IAnnotatedBinding) => void):\n Promise => {\n try {\n const result = await evaluator.evaluate(bindings);\n push({ bindings, result });\n } catch (error: unknown) {\n // We ignore all Expression errors.\n // Other errors (likely programming mistakes) are still propagated.\n // I can't recall where this is defined in the spec.\n if (!isExpressionError( error)) {\n bindingsStream.emit('error', error);\n }\n push({ bindings, result: undefined });\n }\n next();\n };\n // eslint-disable-next-line ts/no-misused-promises\n const transformedStream = bindingsStream.transform({ transform });\n\n // Sort the annoted stream\n const sortedStream = new SortIterator(transformedStream, (left, right) => {\n let compare = orderTypes(left.result, right.result);\n if (!isAscending) {\n compare *= -1;\n }\n return compare;\n }, options);\n\n // Remove the annotation\n bindingsStream = sortedStream.map(({ bindings }) => bindings);\n }\n\n return {\n type: 'bindings',\n bindingsStream,\n metadata: output.metadata,\n };\n }\n\n // Remove descending operator if necessary\n private extractSortExpression(expr: Algebra.Expression): Algebra.Expression {\n const { expressionType, operator } = expr;\n if (expressionType !== Algebra.expressionTypes.OPERATOR) {\n return expr;\n }\n return operator === 'desc' ?\n expr.args[0] :\n expr;\n }\n\n private isAscending(expr: Algebra.Expression): boolean {\n const { expressionType, operator } = expr;\n if (expressionType !== Algebra.expressionTypes.OPERATOR) {\n return true;\n }\n return operator !== 'desc';\n }\n}\n\n/**\n * The window parameter determines how many of the elements to consider when sorting.\n */\nexport interface IActorQueryOperationOrderBySparqleeArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n /**\n * The size of the window for the sort iterator.\n * @range {integer}\n */\n window?: number;\n}\n","import type { AsyncIterator } from 'asynciterator';\nimport { TransformIterator } from 'asynciterator';\n\n// Based on https://github.com/LinkedDataFragments/Client.js/blob/master/lib/sparql/SortIterator.js\nexport class SortIterator extends TransformIterator {\n private readonly windowLength: number;\n private readonly sort: (left: T, right: T) => number;\n private readonly sorted: T[];\n\n public constructor(source: AsyncIterator, sort: (left: T, right: T) => number, options?: any) {\n super(source, options);\n\n // The `window` parameter indicates the length of the sliding window to apply sorting\n const window: number = options && options.window;\n this.windowLength = Number.isFinite(window) && window > 0 ? window : Number.POSITIVE_INFINITY;\n this.sort = sort;\n this.sorted = [];\n }\n\n // Reads the smallest item in the current sorting window\n public override _read(count: number, done: () => void): void {\n let item;\n let { length } = this.sorted;\n // Try to read items until we reach the desired window length\n while (length !== this.windowLength) {\n item = this.source!.read();\n if (item === null) {\n break;\n }\n // Insert the item in the sorted window (smallest last)\n let left = 0;\n let right = length - 1;\n let mid;\n let order;\n while (left <= right) {\n mid = Math.trunc((left + right) / 2);\n order = this.sort(item, this.sorted[mid]);\n if (order < 0) {\n left = mid + 1;\n } else if (order > 0) {\n right = mid - 1;\n } else {\n left = mid;\n right = -1;\n }\n }\n this.sorted.splice(left, 0, item);\n length++;\n }\n // Push the smallest item in the window\n if (length === this.windowLength) {\n this._push(this.sorted.pop()!);\n }\n done();\n }\n\n // Flushes remaining data after the source has ended\n public override _flush(done: () => void): void {\n let { length } = this.sorted;\n while (length--) {\n this._push(this.sorted.pop()!);\n }\n done();\n }\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport { ActorQueryOperationUnion } from '@comunica/actor-query-operation-union';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { MediatorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type {\n IQueryOperationResultBindings,\n IQueryOperationResult,\n IActionContext,\n MetadataBindings,\n} from '@comunica/types';\nimport { UnionIterator } from 'asynciterator';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path Alt Query Operation Actor.\n */\nexport class ActorQueryOperationPathAlt extends ActorAbstractPath {\n public readonly mediatorRdfMetadataAccumulate: MediatorRdfMetadataAccumulate;\n\n public constructor(args: IActorQueryOperationPathAltArgs) {\n super(args, Algebra.types.ALT);\n }\n\n public async runOperation(operation: Algebra.Path, context: IActionContext): Promise {\n const predicate = operation.predicate;\n\n const subOperations: IQueryOperationResultBindings[] = (await Promise.all(predicate.input\n .map(subPredicate => this.mediatorQueryOperation.mediate({\n context,\n operation: ActorAbstractPath.FACTORY\n .createPath(operation.subject, subPredicate, operation.object, operation.graph),\n }))))\n .map(ActorQueryOperation.getSafeBindings);\n\n const bindingsStream = new UnionIterator(subOperations.map(op => op.bindingsStream), { autoStart: false });\n const metadata: (() => Promise) = () =>\n Promise.all(subOperations.map(output => output.metadata()))\n .then(subMeta => ActorQueryOperationUnion\n .unionMetadata(subMeta, true, context, this.mediatorRdfMetadataAccumulate));\n\n return {\n type: 'bindings',\n bindingsStream,\n metadata,\n };\n }\n}\n\nexport interface IActorQueryOperationPathAltArgs extends IActorQueryOperationTypedMediatedArgs {\n mediatorRdfMetadataAccumulate: MediatorRdfMetadataAccumulate;\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path Inv Query Operation Actor.\n */\nexport class ActorQueryOperationPathInv extends ActorAbstractPath {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, Algebra.types.INV);\n }\n\n public async runOperation(operation: Algebra.Path, context: IActionContext): Promise {\n const predicate = operation.predicate;\n const invPath = ActorAbstractPath.FACTORY\n .createPath(operation.object, predicate.path, operation.subject, operation.graph);\n return this.mediatorQueryOperation.mediate({ operation: invPath, context });\n }\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path Link Query Operation Actor.\n */\nexport class ActorQueryOperationPathLink extends ActorAbstractPath {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, Algebra.types.LINK);\n }\n\n public async runOperation(\n operationOriginal: Algebra.Path,\n context: IActionContext,\n ): Promise {\n const predicate = operationOriginal.predicate;\n const operation = Object.assign(ActorAbstractPath.FACTORY.createPattern(\n operationOriginal.subject,\n predicate.iri,\n operationOriginal.object,\n operationOriginal.graph,\n ), { metadata: predicate.metadata });\n return this.mediatorQueryOperation.mediate({ operation, context });\n }\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n} from '@comunica/bus-query-operation';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path Nps Query Operation Actor.\n */\nexport class ActorQueryOperationPathNps extends ActorAbstractPath {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, Algebra.types.NPS);\n }\n\n public async runOperation(operation: Algebra.Path, context: IActionContext): Promise {\n const predicate = operation.predicate;\n const blank = this.generateVariable(operation);\n\n const pattern = Object.assign(ActorAbstractPath.FACTORY\n .createPattern(operation.subject, blank, operation.object, operation.graph), { metadata: predicate.metadata });\n const output = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation: pattern, context }),\n );\n\n // Remove the generated blank nodes from the bindings\n const bindingsStream = output.bindingsStream\n .map(bindings => predicate.iris.some(iri => iri.equals(bindings.get(blank))) ? null : bindings.delete(blank));\n\n return {\n type: 'bindings',\n bindingsStream,\n metadata: output.metadata,\n };\n }\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { IQueryOperationResultBindings, Bindings, IQueryOperationResult, IActionContext } from '@comunica/types';\nimport { BufferedIterator, MultiTransformIterator, TransformIterator } from 'asynciterator';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path OneOrMore Query Operation Actor.\n */\nexport class ActorQueryOperationPathOneOrMore extends ActorAbstractPath {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationPathOneOrMoreArgs) {\n super(args, Algebra.types.ONE_OR_MORE_PATH);\n }\n\n public async runOperation(operation: Algebra.Path, context: IActionContext): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const distinct = await this.isPathArbitraryLengthDistinct(context, operation);\n if (distinct.operation) {\n return distinct.operation;\n }\n\n context = distinct.context;\n\n const predicate = operation.predicate;\n\n if (operation.subject.termType !== 'Variable' && operation.object.termType === 'Variable') {\n const objectVar = operation.object;\n const starEval = await this.getObjectsPredicateStarEval(\n operation.subject,\n predicate.path,\n objectVar,\n operation.graph,\n context,\n false,\n bindingsFactory,\n );\n const variables = operation.graph.termType === 'Variable' ? [ objectVar, operation.graph ] : [ objectVar ];\n return {\n type: 'bindings',\n bindingsStream: starEval.bindingsStream,\n metadata: async() => ({ ...await starEval.metadata(), variables }),\n };\n }\n if (operation.subject.termType === 'Variable' && operation.object.termType === 'Variable') {\n // Get all the results of subjects with same predicate, but once, then fill in first variable for those\n const single = ActorAbstractPath.FACTORY.createDistinct(\n ActorAbstractPath.FACTORY\n .createPath(operation.subject, operation.predicate.path, operation.object, operation.graph),\n );\n const results = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ context, operation: single }),\n );\n const subjectVar = operation.subject;\n const objectVar = operation.object;\n\n const termHashes = {};\n\n const bindingsStream: MultiTransformIterator = new MultiTransformIterator(\n results.bindingsStream,\n {\n multiTransform: (bindings: Bindings) => {\n const subject = bindings.get(subjectVar);\n const object = bindings.get(objectVar);\n const graph = operation.graph.termType === 'Variable' ? bindings.get(operation.graph) : operation.graph;\n return new TransformIterator(\n async() => {\n const it = new BufferedIterator();\n await this.getSubjectAndObjectBindingsPredicateStar(\n subjectVar,\n objectVar,\n subject!,\n object!,\n predicate.path,\n graph!,\n context,\n termHashes,\n {},\n it,\n { count: 0 },\n bindingsFactory,\n );\n return it.transform({\n transform(item, next, push) {\n if (operation.graph.termType === 'Variable') {\n item = item.set(operation.graph, graph!);\n }\n push(item);\n next();\n },\n });\n },\n { maxBufferSize: 128 },\n );\n },\n autoStart: false,\n },\n );\n const variables = operation.graph.termType === 'Variable' ?\n [ subjectVar, objectVar, operation.graph ] :\n [ subjectVar, objectVar ];\n return {\n type: 'bindings',\n bindingsStream,\n metadata: async() => ({ ...await results.metadata(), variables }),\n };\n }\n if (operation.subject.termType === 'Variable' && operation.object.termType !== 'Variable') {\n return > this.mediatorQueryOperation.mediate({\n context,\n operation: ActorAbstractPath.FACTORY.createPath(\n operation.object,\n ActorAbstractPath.FACTORY.createOneOrMorePath(\n ActorAbstractPath.FACTORY.createInv(predicate.path),\n ),\n operation.subject,\n operation.graph,\n ),\n });\n }\n // If (!sVar && !oVar)\n const variable = this.generateVariable();\n const results = ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({\n context,\n operation: ActorAbstractPath.FACTORY.createPath(operation.subject, predicate, variable, operation.graph),\n }));\n const bindingsStream = results.bindingsStream.transform({\n filter: item => operation.object.equals(item.get(variable)),\n transform(item, next, push) {\n const binding = operation.graph.termType === 'Variable' ?\n bindingsFactory.bindings([[ operation.graph, item.get(operation.graph)! ]]) :\n bindingsFactory.bindings();\n push(binding);\n next();\n },\n });\n return {\n type: 'bindings',\n bindingsStream,\n metadata: async() => ({\n ...await results.metadata(),\n variables: operation.graph.termType === 'Variable' ? [ operation.graph ] : [],\n }),\n };\n }\n}\n\nexport interface IActorQueryOperationPathOneOrMoreArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n} from '@comunica/bus-query-operation';\nimport type { MediatorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { Bindings, IActionContext, IQueryOperationResult, IJoinEntry } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path Seq Query Operation Actor.\n */\nexport class ActorQueryOperationPathSeq extends ActorAbstractPath {\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public constructor(args: IActorQueryOperationPathSeq) {\n super(args, Algebra.types.SEQ);\n }\n\n public async runOperation(\n operationOriginal: Algebra.Path,\n context: IActionContext,\n ): Promise {\n const predicate = operationOriginal.predicate;\n\n let joiner: RDF.Term = operationOriginal.subject;\n const generatedVariableNames: RDF.Variable[] = [];\n const entries: IJoinEntry[] = await Promise.all(predicate.input\n .map((subPredicate, i) => {\n const nextJoiner = i === predicate.input.length - 1 ? operationOriginal.object : this.generateVariable(operationOriginal, `b${i}`);\n const operation = ActorAbstractPath.FACTORY\n .createPath(joiner, subPredicate, nextJoiner, operationOriginal.graph);\n const output = this.mediatorQueryOperation.mediate({\n context,\n operation,\n });\n\n joiner = nextJoiner;\n if (i < predicate.input.length - 1) {\n generatedVariableNames.push(nextJoiner);\n }\n\n return { output, operation };\n })\n .map(async({ output, operation }) => ({\n output: ActorQueryOperation.getSafeBindings(await output),\n operation,\n })));\n\n const join = ActorQueryOperation.getSafeBindings(await this.mediatorJoin\n .mediate({ type: 'inner', entries, context }));\n // Remove the generated variable from the bindings\n const bindingsStream = join.bindingsStream.transform({\n transform(item, next, push) {\n for (const generatedVariableName of generatedVariableNames) {\n item = item.delete(generatedVariableName);\n }\n push(item);\n next();\n },\n });\n\n // Remove the generated variable from the list of variables\n return {\n type: 'bindings',\n bindingsStream,\n async metadata() {\n const joinMetadata = await join.metadata();\n const variables = joinMetadata.variables.filter(variable => !generatedVariableNames\n .some(generatedVariableName => generatedVariableName.value === variable.value));\n return { ...joinMetadata, variables };\n },\n };\n }\n}\n\nexport interface IActorQueryOperationPathSeq extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { Bindings, IQueryOperationResult, IActionContext } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { MultiTransformIterator, TransformIterator, EmptyIterator, BufferedIterator } from 'asynciterator';\nimport { termToString } from 'rdf-string';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path ZeroOrMore Query Operation Actor.\n */\nexport class ActorQueryOperationPathZeroOrMore extends ActorAbstractPath {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationPathZeroOrMoreArgs) {\n super(args, Algebra.types.ZERO_OR_MORE_PATH);\n }\n\n public async runOperation(operation: Algebra.Path, context: IActionContext): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n\n const distinct = await this.isPathArbitraryLengthDistinct(context, operation);\n if (distinct.operation) {\n return distinct.operation;\n }\n\n context = distinct.context;\n\n const predicate = operation.predicate;\n const sources = this.getPathSources(predicate);\n\n const sVar = operation.subject.termType === 'Variable';\n const oVar = operation.object.termType === 'Variable';\n\n if (operation.subject.termType === 'Variable' && operation.object.termType === 'Variable') {\n // Query ?s ?p ?o, to get all possible namedNodes in de the db\n const predVar = this.generateVariable(operation);\n const single = this.assignPatternSources(ActorAbstractPath.FACTORY\n .createPattern(operation.subject, predVar, operation.object, operation.graph), sources);\n const results = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ context, operation: single }),\n );\n const subjectVar = operation.subject;\n const objectVar = operation.object;\n\n // Set with all namedNodes we have already started a predicate* search from\n const entities: Set = new Set();\n\n const termHashes = {};\n\n const bindingsStream: MultiTransformIterator = new MultiTransformIterator(\n results.bindingsStream,\n {\n multiTransform: (bindings: Bindings) => {\n // Get the subject and object of the triples (?s ?p ?o) and extract graph if it was a variable\n const subject: RDF.Term = bindings.get(subjectVar)!;\n const object: RDF.Term = bindings.get(objectVar)!;\n const graph: RDF.Term = operation.graph.termType === 'Variable' ?\n bindings.get(operation.graph)! :\n operation.graph;\n // Make a hash of namedNode + graph to remember from where we already started a search\n const subjectGraphHash = termToString(subject) + termToString(graph);\n const objectGraphHash = termToString(object) + termToString(graph);\n return new TransformIterator(\n async() => {\n // If no new namedNodes in this triple, return nothing\n if (entities.has(subjectGraphHash) && entities.has(objectGraphHash)) {\n return new EmptyIterator();\n }\n // Set up an iterator to which getSubjectAndObjectBindingsPredicateStar will push solutions\n const it = new BufferedIterator();\n const counter = { count: 0 };\n // If not started from this namedNode (subject in triple) in this graph, start a search\n if (!entities.has(subjectGraphHash)) {\n entities.add(subjectGraphHash);\n await this.getSubjectAndObjectBindingsPredicateStar(\n subjectVar,\n objectVar,\n subject,\n subject,\n predicate.path,\n graph,\n context,\n termHashes,\n {},\n it,\n counter,\n bindingsFactory,\n );\n }\n // If not started from this namedNode (object in triple) in this graph, start a search\n if (!entities.has(objectGraphHash)) {\n entities.add(objectGraphHash);\n await this.getSubjectAndObjectBindingsPredicateStar(\n subjectVar,\n objectVar,\n object,\n object,\n predicate.path,\n graph,\n context,\n termHashes,\n {},\n it,\n counter,\n bindingsFactory,\n );\n }\n return it.transform({\n transform(item, next, push) {\n // If the graph was a variable, fill in it's binding (we got it from the ?s ?p ?o binding)\n if (operation.graph.termType === 'Variable') {\n item = item.set(operation.graph, graph);\n }\n push(item);\n next();\n },\n });\n },\n );\n },\n },\n );\n const variables: RDF.Variable[] = operation.graph.termType === 'Variable' ?\n [ subjectVar, operation.object, operation.graph ] :\n [ subjectVar, operation.object ];\n return {\n type: 'bindings',\n bindingsStream,\n metadata: async() => ({ ...await results.metadata(), variables }),\n };\n }\n if (!sVar && !oVar) {\n const variable = this.generateVariable();\n const starEval = await this.getObjectsPredicateStarEval(\n operation.subject,\n predicate.path,\n variable,\n operation.graph,\n context,\n true,\n bindingsFactory,\n );\n // Check this\n const bindingsStream = starEval.bindingsStream.transform({\n filter: item => operation.object.equals(item.get(variable)),\n transform(item, next, push) {\n // Return graph binding if graph was a variable, otherwise empty binding\n const binding = operation.graph.termType === 'Variable' ?\n bindingsFactory.bindings([[ operation.graph, item.get(operation.graph)! ]]) :\n bindingsFactory.bindings();\n push(binding);\n next();\n },\n });\n return {\n type: 'bindings',\n bindingsStream,\n metadata: async() => ({\n ...await starEval.metadata(),\n variables: operation.graph.termType === 'Variable' ? [ operation.graph ] : [],\n }),\n };\n }\n // If (sVar || oVar)\n const subject = sVar ? operation.object : operation.subject;\n const value: RDF.Variable = (sVar ? operation.subject : operation.object);\n const pred = sVar ? ActorAbstractPath.FACTORY.createInv(predicate.path) : predicate.path;\n const starEval = await this.getObjectsPredicateStarEval(\n subject,\n pred,\n value,\n operation.graph,\n context,\n true,\n bindingsFactory,\n );\n const variables: RDF.Variable[] = operation.graph.termType === 'Variable' ? [ value, operation.graph ] : [ value ];\n return {\n type: 'bindings',\n bindingsStream: starEval.bindingsStream,\n metadata: async() => ({ ...await starEval.metadata(), variables }),\n };\n }\n}\n\nexport interface IActorQueryOperationPathZeroOrMoreArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import { ActorAbstractPath } from '@comunica/actor-abstract-path';\nimport { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { Bindings, IQueryOperationResult, IActionContext, BindingsStream } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport {\n SingletonIterator,\n UnionIterator,\n} from 'asynciterator';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Path ZeroOrOne Query Operation Actor.\n */\nexport class ActorQueryOperationPathZeroOrOne extends ActorAbstractPath {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationPathZeroOrOneArgs) {\n super(args, Algebra.types.ZERO_OR_ONE_PATH);\n }\n\n public async runOperation(\n operation: Algebra.Path,\n context: IActionContext,\n ): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const predicate = operation.predicate;\n const sources = this.getPathSources(predicate);\n\n const extra: Bindings[] = [];\n\n // Both subject and object non-variables\n if (operation.subject.termType !== 'Variable' &&\n operation.object.termType !== 'Variable' &&\n operation.subject.equals(operation.object)) {\n return {\n type: 'bindings',\n bindingsStream: new SingletonIterator(bindingsFactory.bindings()),\n metadata: () => Promise.resolve({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 1 },\n canContainUndefs: false,\n variables: [],\n }),\n };\n }\n\n // Check if we require a distinct path operation\n const distinct = await this.isPathArbitraryLengthDistinct(context, operation);\n if (distinct.operation) {\n return distinct.operation;\n }\n context = distinct.context;\n\n // Create an operator that resolve to the \"One\" part\n const bindingsOne = ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({\n context,\n operation: ActorAbstractPath.FACTORY\n .createPath(operation.subject, predicate.path, operation.object, operation.graph),\n }));\n\n // Determine the bindings stream based on the variable-ness of subject and object\n let bindingsStream: BindingsStream;\n if (operation.subject.termType === 'Variable' && operation.object.termType === 'Variable') {\n // Both subject and object are variables\n // To determine the \"Zero\" part, we\n // query ?s ?p ?o. FILTER ?s = ?0, to get all possible namedNodes in de the db\n const varP = this.generateVariable(operation);\n const bindingsZero = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({\n context,\n operation: ActorAbstractPath.FACTORY.createFilter(\n this.assignPatternSources(ActorAbstractPath.FACTORY\n .createPattern(operation.subject, varP, operation.object, operation.graph), sources),\n ActorAbstractPath.FACTORY.createOperatorExpression('=', [\n ActorAbstractPath.FACTORY.createTermExpression(operation.subject),\n ActorAbstractPath.FACTORY.createTermExpression(operation.object),\n ]),\n ),\n }),\n ).bindingsStream.map(bindings => bindings.delete(varP));\n bindingsStream = new UnionIterator([\n bindingsZero,\n bindingsOne.bindingsStream,\n ], { autoStart: false });\n } else {\n // If subject or object is not a variable, then determining the \"Zero\" part is simple.\n if (operation.subject.termType === 'Variable') {\n extra.push(bindingsFactory.bindings([[ operation.subject, operation.object ]]));\n }\n if (operation.object.termType === 'Variable') {\n extra.push(bindingsFactory.bindings([[ operation.object, operation.subject ]]));\n }\n\n bindingsStream = bindingsOne.bindingsStream.prepend(extra);\n }\n\n return {\n type: 'bindings',\n bindingsStream,\n metadata: bindingsOne.metadata,\n };\n }\n}\nexport interface IActorQueryOperationPathZeroOrOneArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport { BlankNodeBindingsScoped } from '@comunica/data-factory';\nimport type {\n Bindings,\n BindingsStream,\n IActionContext,\n IQueryOperationResult,\n IQueryOperationResultBindings,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A comunica Project Query Operation Actor.\n */\nexport class ActorQueryOperationProject extends ActorQueryOperationTypedMediated {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'project');\n }\n\n public async testOperation(_operation: Algebra.Project, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Project, context: IActionContext):\n Promise {\n // Resolve the input\n const output: IQueryOperationResultBindings = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation: operation.input, context }),\n );\n\n // Find all variables that should be deleted from the input stream.\n const outputMetadata = await output.metadata();\n const variables = operation.variables;\n const deleteVariables = outputMetadata.variables\n .filter(variable => !variables.some(subVariable => variable.value === subVariable.value));\n\n // Error if there are variables that are not bound in the input stream.\n const missingVariables = variables\n .filter(variable => !outputMetadata.variables.some(subVariable => variable.value === subVariable.value));\n if (missingVariables.length > 0) {\n outputMetadata.canContainUndefs = true;\n }\n\n // Make sure the project variables are the only variables that are present in the bindings.\n let bindingsStream: BindingsStream = deleteVariables.length === 0 ?\n output.bindingsStream :\n output.bindingsStream.map((bindings: Bindings) => {\n for (const deleteVariable of deleteVariables) {\n bindings = bindings.delete(deleteVariable);\n }\n return bindings;\n });\n\n // Make sure that blank nodes with same labels are not reused over different bindings, as required by SPARQL 1.1.\n // Required for the BNODE() function: https://www.w3.org/TR/sparql11-query/#func-bnode\n // When we have a scoped blank node, make sure the skolemized value is maintained.\n let blankNodeCounter = 0;\n bindingsStream = bindingsStream.map((bindings: Bindings) => {\n blankNodeCounter++;\n const scopedBlankNodesCache = new Map();\n return bindings.map((term) => {\n if (term instanceof BlankNodeBindingsScoped) {\n let scopedBlankNode = scopedBlankNodesCache.get(term.value);\n if (!scopedBlankNode) {\n scopedBlankNode = DF.blankNode(`${term.value}${blankNodeCounter}`);\n scopedBlankNodesCache.set(term.value, scopedBlankNode);\n }\n return scopedBlankNode;\n }\n return term;\n });\n });\n\n return {\n type: 'bindings',\n bindingsStream,\n metadata: async() => ({ ...outputMetadata, variables }),\n };\n }\n}\n","import type { MediatorHashBindings } from '@comunica/bus-hash-bindings';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n Bindings,\n BindingsStream,\n IActionContext,\n IQueryOperationResult,\n IQueryOperationResultBindings,\n} from '@comunica/types';\nimport { LRUCache } from 'lru-cache';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Reduced Hash Query Operation Actor.\n */\nexport class ActorQueryOperationReducedHash extends ActorQueryOperationTypedMediated {\n public readonly mediatorHashBindings: MediatorHashBindings;\n public readonly cacheSize: number;\n\n public constructor(args: IActorQueryOperationReducedHashArgs) {\n super(args, 'reduced');\n }\n\n public async testOperation(_operation: Algebra.Reduced, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Reduced, context: IActionContext): Promise {\n const output: IQueryOperationResultBindings = ActorQueryOperation.getSafeBindings(\n await this.mediatorQueryOperation.mediate({ operation: operation.input, context }),\n );\n const bindingsStream: BindingsStream = output.bindingsStream.filter(await this.newHashFilter(context));\n return {\n type: 'bindings',\n bindingsStream,\n metadata: output.metadata,\n };\n }\n\n /**\n * Create a new distinct filter function.\n * This will maintain an internal hash datastructure so that every bindings object only returns true once.\n * @param context The action context.\n * @return {(bindings: Bindings) => boolean} A distinct filter for bindings.\n */\n public async newHashFilter(context: IActionContext): Promise<(bindings: Bindings) => boolean> {\n const { hashFunction } = await this.mediatorHashBindings.mediate({ allowHashCollisions: true, context });\n const hashes = new LRUCache({ max: this.cacheSize });\n return (bindings: Bindings) => {\n const hash: string = hashFunction(bindings);\n if (hashes.has(hash)) {\n return false;\n }\n hashes.set(hash, true);\n return true;\n };\n }\n}\n\nexport interface IActorQueryOperationReducedHashArgs extends IActorQueryOperationTypedMediatedArgs {\n mediatorHashBindings: MediatorHashBindings;\n /**\n * @range {integer}\n * @default {100}\n */\n cacheSize: number;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { MediatorQuerySourceIdentify } from '@comunica/bus-query-source-identify';\nimport type { IActorTest } from '@comunica/core';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { IActionContext, IQueryOperationResult, IQueryOperationResultBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { SingletonIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Service Query Operation Actor.\n * It unwraps the SERVICE operation and executes it on the given source.\n */\nexport class ActorQueryOperationService extends ActorQueryOperationTypedMediated {\n public readonly forceSparqlEndpoint: boolean;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n public readonly mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n\n public constructor(args: IActorQueryOperationServiceArgs) {\n super(args, 'service');\n }\n\n public async testOperation(operation: Algebra.Service, _context: IActionContext): Promise {\n if (operation.name.termType !== 'NamedNode') {\n throw new Error(`${this.name} can only query services by IRI, while a ${operation.name.termType} was given.`);\n }\n return true;\n }\n\n public async runOperation(operation: Algebra.Service, context: IActionContext):\n Promise {\n // Identify the SERVICE target as query source\n const { querySource } = await this.mediatorQuerySourceIdentify.mediate({\n querySourceUnidentified: {\n value: operation.name.value,\n type: this.forceSparqlEndpoint ? 'sparql' : undefined,\n },\n context,\n });\n\n // Attach the source to the operation, and execute\n let output: IQueryOperationResultBindings;\n try {\n output = ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({\n operation: ActorQueryOperation.assignOperationSource(operation.input, querySource),\n context,\n }));\n } catch (error: unknown) {\n if (operation.silent) {\n // Emit a single empty binding\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n output = {\n bindingsStream: new SingletonIterator(bindingsFactory.bindings()),\n type: 'bindings',\n metadata: async() => ({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 1 },\n canContainUndefs: false,\n variables: [],\n }),\n };\n this.logWarn(context, `An error occurred when executing a SERVICE clause: ${( error).message}`);\n } else {\n throw error;\n }\n }\n\n return output;\n }\n}\n\nexport interface IActorQueryOperationServiceArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * If the SERVICE target should be assumed to be a SPARQL endpoint.\n * @default {false}\n */\n forceSparqlEndpoint: boolean;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n /**\n * The mediator for identifying query sources.\n */\n mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n IQueryOperationResult,\n IQueryOperationResultBindings,\n IQueryOperationResultQuads,\n IQueryOperationResultStream,\n IMetadata,\n IActionContext,\n} from '@comunica/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Slice Query Operation Actor.\n */\nexport class ActorQueryOperationSlice extends ActorQueryOperationTypedMediated {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'slice');\n }\n\n public async testOperation(_operation: Algebra.Slice, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Slice, context: IActionContext):\n Promise {\n // Add limit indicator to the context, which can be used for query planning\n // eslint-disable-next-line unicorn/explicit-length-check\n if (operation.length) {\n context = context.set(KeysQueryOperation.limitIndicator, operation.length);\n }\n\n // Resolve the input\n const output: IQueryOperationResult = await this.mediatorQueryOperation\n .mediate({ operation: operation.input, context });\n\n if (output.type === 'bindings') {\n const bindingsStream = this.sliceStream(output.bindingsStream, operation);\n return {\n type: 'bindings',\n bindingsStream,\n metadata: this.sliceMetadata(output, operation),\n };\n }\n\n if (output.type === 'quads') {\n const quadStream = this.sliceStream(output.quadStream, operation);\n return {\n type: 'quads',\n quadStream,\n metadata: this.sliceMetadata(output, operation),\n };\n }\n\n // In all other cases, return the result as-is.\n return output;\n }\n\n // Slice the stream based on the pattern values\n private sliceStream(stream: AsyncIterator, pattern: Algebra.Slice): AsyncIterator {\n // eslint-disable-next-line unicorn/explicit-length-check\n const hasLength: boolean = Boolean(pattern.length) || pattern.length === 0;\n const { start } = pattern;\n const end = hasLength ? pattern.start + pattern.length! - 1 : Number.POSITIVE_INFINITY;\n return stream.transform({ offset: start, limit: Math.max(end - start + 1, 0), autoStart: false });\n }\n\n // If we find metadata, apply slicing on the total number of items\n private sliceMetadata(\n output: IQueryOperationResultStream,\n pattern: Algebra.Slice,\n ): () => Promise> {\n // eslint-disable-next-line unicorn/explicit-length-check\n const hasLength: boolean = Boolean(pattern.length) || pattern.length === 0;\n return () => (<() => Promise>>output.metadata)()\n .then((subMetadata) => {\n const cardinality = { ...subMetadata.cardinality };\n if (Number.isFinite(cardinality.value)) {\n cardinality.value = Math.max(0, cardinality.value - pattern.start);\n if (hasLength) {\n cardinality.value = Math.min(cardinality.value, pattern.length!);\n }\n }\n return { ...subMetadata, cardinality };\n });\n }\n}\n","import type { IActionQueryOperation, IActorQueryOperationArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport { getMetadataBindings, getMetadataQuads } from '@comunica/metadata';\nimport type {\n IPhysicalQueryPlanLogger,\n IQueryOperationResult,\n IQuerySourceWrapper,\n} from '@comunica/types';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Source Query Operation Actor.\n */\nexport class ActorQueryOperationSource extends ActorQueryOperation {\n public constructor(args: IActorQueryOperationArgs) {\n super(args);\n }\n\n public async test(action: IActionQueryOperation): Promise {\n if (!ActorQueryOperation.getOperationSource(action.operation)) {\n throw new Error(`Actor ${this.name} requires an operation with source annotation.`);\n }\n return { httpRequests: 1 };\n }\n\n public async run(action: IActionQueryOperation): Promise {\n // Log to physical plan\n const physicalQueryPlanLogger: IPhysicalQueryPlanLogger | undefined = action.context\n .get(KeysInitQuery.physicalQueryPlanLogger);\n if (physicalQueryPlanLogger) {\n physicalQueryPlanLogger.logOperation(\n action.operation.type,\n undefined,\n action.operation,\n action.context.get(KeysInitQuery.physicalQueryPlanNode),\n this.name,\n {},\n );\n action.context = action.context.set(KeysInitQuery.physicalQueryPlanNode, action.operation);\n }\n\n const sourceWrapper: IQuerySourceWrapper = ActorQueryOperation.getOperationSource(action.operation)!;\n const mergedContext = sourceWrapper.context ? action.context.merge(sourceWrapper.context) : action.context;\n\n // Check if the operation is a CONSTRUCT query\n // We recurse because it may be wrapped in other operations such as SLICE and FROM\n let construct = false;\n Util.recurseOperation(action.operation, {\n construct(): boolean {\n construct = true;\n return false;\n },\n });\n // If so, delegate to queryQuads\n if (construct) {\n const quadStream = sourceWrapper.source.queryQuads(action.operation, mergedContext);\n const metadata = getMetadataQuads(quadStream);\n return {\n type: 'quads',\n quadStream,\n metadata,\n };\n }\n\n // eslint-disable-next-line ts/switch-exhaustiveness-check\n switch (action.operation.type) {\n case Algebra.types.ASK:\n return {\n type: 'boolean',\n execute: () => sourceWrapper.source.queryBoolean(action.operation, mergedContext),\n };\n case Algebra.types.COMPOSITE_UPDATE:\n case Algebra.types.DELETE_INSERT:\n case Algebra.types.LOAD:\n case Algebra.types.CLEAR:\n case Algebra.types.CREATE:\n case Algebra.types.DROP:\n case Algebra.types.ADD:\n case Algebra.types.MOVE:\n case Algebra.types.COPY:\n return {\n type: 'void',\n execute: () => sourceWrapper.source.queryVoid(action.operation, mergedContext),\n };\n }\n\n const bindingsStream = sourceWrapper.source.queryBindings(action.operation, mergedContext);\n const metadata = getMetadataBindings(bindingsStream);\n return {\n type: 'bindings',\n bindingsStream,\n metadata,\n };\n }\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { MediatorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { IActorTest } from '@comunica/core';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type {\n BindingsStream,\n IQueryOperationResultBindings,\n IActionContext,\n IQueryOperationResult,\n MetadataBindings,\n MetadataQuads,\n IQueryOperationResultQuads,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { UnionIterator } from 'asynciterator';\nimport { uniqTerms } from 'rdf-terms';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Union Query Operation Actor.\n */\nexport class ActorQueryOperationUnion extends ActorQueryOperationTypedMediated {\n public readonly mediatorRdfMetadataAccumulate: MediatorRdfMetadataAccumulate;\n\n public constructor(args: IActorQueryOperationUnionArgs) {\n super(args, 'union');\n }\n\n /**\n * Takes the union of the given double array variables.\n * Uniqueness is guaranteed.\n * @param {string[][]} variables Double array of variables to take the union of.\n * @return {string[]} The union of the given variables.\n */\n public static unionVariables(variables: RDF.Variable[][]): RDF.Variable[] {\n return uniqTerms(variables.flat());\n }\n\n /**\n * Takes the union of the given metadata array.\n * It will ensure that the cardinality metadata value is properly calculated.\n * @param {{[p: string]: any}[]} metadatas Array of metadata.\n * @param bindings If the union of the variables field should also be taken.\n * @param context The action context\n * @param mediatorRdfMetadataAccumulate Mediator for metadata accumulation\n * @return {{[p: string]: any}} Union of the metadata.\n */\n public static async unionMetadata<\n Bindings extends boolean,\n M extends (Bindings extends true ? MetadataBindings : MetadataQuads),\n >(\n metadatas: M[],\n bindings: Bindings,\n context: IActionContext,\n mediatorRdfMetadataAccumulate: MediatorRdfMetadataAccumulate,\n // eslint-disable-next-line function-paren-newline\n ): Promise {\n let accumulatedMetadata: M = (await mediatorRdfMetadataAccumulate\n .mediate({ mode: 'initialize', context })).metadata;\n\n // Accumulate cardinality\n for (const appendingMetadata of metadatas) {\n accumulatedMetadata = {\n ...appendingMetadata,\n ...(await mediatorRdfMetadataAccumulate\n .mediate({\n mode: 'append',\n accumulatedMetadata: accumulatedMetadata,\n appendingMetadata: appendingMetadata,\n context,\n })).metadata,\n };\n }\n\n // Create new metadata state\n accumulatedMetadata.state = new MetadataValidationState();\n\n // Propagate metadata invalidations\n const invalidateListener = (): void => accumulatedMetadata.state.invalidate();\n for (const metadata of metadatas) {\n metadata.state.addInvalidateListener(invalidateListener);\n }\n\n // Union variables\n if (bindings) {\n accumulatedMetadata.variables = ActorQueryOperationUnion\n .unionVariables(metadatas.map(metadata => metadata.variables));\n }\n\n return accumulatedMetadata;\n }\n\n public async testOperation(_operation: Algebra.Union, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Union, context: IActionContext):\n Promise {\n // Determine the type over which we are taking a union\n const outputsRaw = await Promise.all(operation.input\n .map(subOperation => this.mediatorQueryOperation.mediate({ operation: subOperation, context })));\n let outputType: string | undefined;\n for (const output of outputsRaw) {\n if (outputType === undefined) {\n outputType = output.type;\n } else if (outputType !== output.type) {\n throw new Error(`Unable to union ${outputType} and ${output.type}`);\n }\n }\n\n // Handle bindings\n if (outputType === 'bindings' || operation.input.length === 0) {\n const outputs: IQueryOperationResultBindings[] = outputsRaw.map(ActorQueryOperation.getSafeBindings);\n\n const bindingsStream: BindingsStream = new UnionIterator(outputs.map(\n (output: IQueryOperationResultBindings) => output.bindingsStream,\n ), { autoStart: false });\n\n const metadata: () => Promise = () => Promise.all(outputs.map(output => output.metadata()))\n .then(subMeta => ActorQueryOperationUnion\n .unionMetadata(subMeta, true, context, this.mediatorRdfMetadataAccumulate));\n return { type: 'bindings', bindingsStream, metadata };\n }\n\n // Handle quads\n if (outputType === 'quads') {\n const outputs: IQueryOperationResultQuads[] = outputsRaw.map(ActorQueryOperation.getSafeQuads);\n\n const quadStream = new UnionIterator(outputs.map(\n (output: IQueryOperationResultQuads) => output.quadStream,\n ), { autoStart: false });\n\n const metadata: () => Promise = () => Promise.all(outputs.map(output => output.metadata()))\n .then(subMeta => ActorQueryOperationUnion\n .unionMetadata(subMeta, false, context, this.mediatorRdfMetadataAccumulate));\n return { type: 'quads', quadStream, metadata };\n }\n\n // Throw otherwise\n throw new Error(`Unable to union ${outputType}`);\n }\n}\n\nexport interface IActorQueryOperationUnionArgs extends IActorQueryOperationTypedMediatedArgs {\n mediatorRdfMetadataAccumulate: MediatorRdfMetadataAccumulate;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type {\n MediatorRdfUpdateQuads,\n} from '@comunica/bus-rdf-update-quads';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor\n * that handles SPARQL clear operations.\n */\nexport class ActorQueryOperationClear extends ActorQueryOperationTypedMediated {\n public readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;\n\n public constructor(args: IActorQueryOperationClearArgs) {\n super(args, 'clear');\n }\n\n public async testOperation(operation: Algebra.Clear, context: IActionContext): Promise {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operation: Algebra.Clear, context: IActionContext):\n Promise {\n // Delegate to update-quads bus\n let graphs: RDF.DefaultGraph | 'NAMED' | 'ALL' | RDF.NamedNode[];\n if (operation.source === 'DEFAULT') {\n graphs = DF.defaultGraph();\n } else if (typeof operation.source === 'string') {\n graphs = operation.source;\n } else {\n graphs = [ operation.source ];\n }\n const { execute } = await this.mediatorUpdateQuads.mediate({\n deleteGraphs: {\n graphs,\n requireExistence: !operation.silent,\n dropGraphs: false,\n },\n context,\n });\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n\nexport interface IActorQueryOperationClearArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * The RDF Update Quads mediator\n */\n mediatorUpdateQuads: MediatorRdfUpdateQuads;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Update CompositeUpdate Query Operation Actor.\n */\nexport class ActorQueryOperationUpdateCompositeUpdate\n extends ActorQueryOperationTypedMediated {\n public constructor(args: IActorQueryOperationTypedMediatedArgs) {\n super(args, 'compositeupdate');\n }\n\n public async testOperation(\n operation: Algebra.CompositeUpdate,\n context: IActionContext,\n ): Promise {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operationOriginal: Algebra.CompositeUpdate, context: IActionContext):\n Promise {\n const execute = (): Promise => (async(): Promise => {\n // Execute update operations in sequence\n for (const operation of operationOriginal.updates) {\n const subResult = ActorQueryOperation\n .getSafeVoid(await this.mediatorQueryOperation.mediate({ operation, context }));\n await subResult.execute();\n }\n })();\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor that\n * handles SPARQL create operations.\n */\nexport class ActorQueryOperationCreate extends ActorQueryOperationTypedMediated {\n public readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;\n\n public constructor(args: IActorQueryOperationCreateArgs) {\n super(args, 'create');\n }\n\n public async testOperation(operation: Algebra.Create, context: IActionContext): Promise {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operation: Algebra.Create, context: IActionContext):\n Promise {\n // Delegate to update-quads bus\n const { execute } = await this.mediatorUpdateQuads.mediate({\n createGraphs: {\n graphs: [ operation.source ],\n requireNonExistence: !operation.silent,\n },\n context,\n });\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n\nexport interface IActorQueryOperationCreateArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * The RDF Update Quads mediator\n */\n mediatorUpdateQuads: MediatorRdfUpdateQuads;\n}\n","import { BindingsToQuadsIterator } from '@comunica/actor-query-operation-construct';\nimport { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport {\n ActorQueryOperation,\n ActorQueryOperationTypedMediated,\n} from '@comunica/bus-query-operation';\nimport type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';\nimport type { IActorTest } from '@comunica/core';\nimport type { IQueryOperationResult, BindingsStream, IActionContext } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { ArrayIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Update DeleteInsert Query Operation Actor.\n */\nexport class ActorQueryOperationUpdateDeleteInsert extends ActorQueryOperationTypedMediated {\n public readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n protected blankNodeCounter = 0;\n\n public constructor(args: IActorQueryOperationUpdateDeleteInsertArgs) {\n super(args, 'deleteinsert');\n }\n\n public async testOperation(\n operation: Algebra.DeleteInsert,\n context: IActionContext,\n ): Promise {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operation: Algebra.DeleteInsert, context: IActionContext):\n Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n // Evaluate the where clause\n const whereBindings: BindingsStream = operation.where ?\n ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation\n .mediate({ operation: operation.where, context })).bindingsStream :\n new ArrayIterator([ bindingsFactory.bindings() ], { autoStart: false });\n\n // Construct triples using the result based on the pattern.\n let quadStreamInsert: AsyncIterator | undefined;\n let quadStreamDelete: AsyncIterator | undefined;\n if (operation.insert) {\n // Localize blank nodes in pattern, to avoid clashes across different INSERT/DELETE calls\n quadStreamInsert = new BindingsToQuadsIterator(\n operation.insert.map(BindingsToQuadsIterator.localizeQuad.bind(null, this.blankNodeCounter)),\n whereBindings.clone(),\n );\n this.blankNodeCounter++;\n }\n if (operation.delete) {\n // Localize blank nodes in pattern, to avoid clashes across different INSERT/DELETE calls\n quadStreamDelete = new BindingsToQuadsIterator(\n operation.delete.map(BindingsToQuadsIterator.localizeQuad.bind(null, this.blankNodeCounter)),\n whereBindings.clone(),\n );\n this.blankNodeCounter++;\n }\n\n // Evaluate the required modifications\n const { execute } = await this.mediatorUpdateQuads.mediate({\n quadStreamInsert,\n quadStreamDelete,\n context,\n });\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n\nexport interface IActorQueryOperationUpdateDeleteInsertArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * The RDF Update Quads mediator\n */\n mediatorUpdateQuads: MediatorRdfUpdateQuads;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor\n * that handles SPARQL drop operations.\n */\nexport class ActorQueryOperationDrop extends ActorQueryOperationTypedMediated {\n public readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;\n\n public constructor(args: IActorQueryOperationDropArgs) {\n super(args, 'drop');\n }\n\n public async testOperation(operation: Algebra.Drop, context: IActionContext): Promise {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operation: Algebra.Drop, context: IActionContext):\n Promise {\n // Delegate to update-quads bus\n let graphs: RDF.DefaultGraph | 'NAMED' | 'ALL' | RDF.NamedNode[];\n if (operation.source === 'DEFAULT') {\n graphs = DF.defaultGraph();\n } else if (typeof operation.source === 'string') {\n graphs = operation.source;\n } else {\n graphs = [ operation.source ];\n }\n const { execute } = await this.mediatorUpdateQuads.mediate({\n deleteGraphs: {\n graphs,\n requireExistence: !operation.silent,\n dropGraphs: true,\n },\n context,\n });\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n\nexport interface IActorQueryOperationDropArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * The RDF Update Quads mediator\n */\n mediatorUpdateQuads: MediatorRdfUpdateQuads;\n}\n","import type { IActorQueryOperationTypedMediatedArgs } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, ActorQueryOperationTypedMediated } from '@comunica/bus-query-operation';\nimport type { MediatorQuerySourceIdentify } from '@comunica/bus-query-source-identify';\nimport type { MediatorRdfUpdateQuads } from '@comunica/bus-rdf-update-quads';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResult } from '@comunica/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A [Query Operation](https://github.com/comunica/comunica/tree/master/packages/bus-query-operation) actor\n * that handles SPARQL load operations.\n */\nexport class ActorQueryOperationLoad extends ActorQueryOperationTypedMediated {\n public readonly mediatorUpdateQuads: MediatorRdfUpdateQuads;\n public readonly mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n\n private readonly factory: Factory;\n private readonly constructOperation: Algebra.Construct;\n\n public constructor(args: IActorQueryOperationLoadArgs) {\n super(args, 'load');\n this.factory = new Factory();\n }\n\n public async testOperation(operation: Algebra.Load, context: IActionContext): Promise {\n ActorQueryOperation.throwOnReadOnly(context);\n return true;\n }\n\n public async runOperation(operation: Algebra.Load, context: IActionContext):\n Promise {\n // Determine query source\n let subContext = context;\n if (operation.silent) {\n subContext = subContext.set(KeysInitQuery.lenient, true);\n }\n const { querySource } = await this.mediatorQuerySourceIdentify.mediate({\n querySourceUnidentified: { value: operation.source.value },\n context: subContext,\n });\n\n // Create CONSTRUCT query on the given source\n const output = ActorQueryOperationLoad.getSafeQuads(await this.mediatorQueryOperation.mediate({\n operation: this.factory.createConstruct(\n ActorQueryOperation.assignOperationSource(\n this.factory.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o')),\n querySource,\n ),\n [ this.factory.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o')) ],\n ),\n context: subContext,\n }));\n\n // Determine quad stream to insert\n let quadStream = output.quadStream;\n if (operation.destination) {\n quadStream = quadStream.map(quad => DF.quad(quad.subject, quad.predicate, quad.object, operation.destination));\n }\n\n // Insert quad stream\n const { execute } = await this.mediatorUpdateQuads.mediate({\n quadStreamInsert: quadStream,\n context,\n });\n\n return {\n type: 'void',\n execute,\n };\n }\n}\n\nexport interface IActorQueryOperationLoadArgs extends IActorQueryOperationTypedMediatedArgs {\n /**\n * The RDF Update Quads mediator\n */\n mediatorUpdateQuads: MediatorRdfUpdateQuads;\n /**\n * Mediator for identifying load sources.\n */\n mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActionQueryOperation } from '@comunica/bus-query-operation';\nimport { ActorQueryOperationTyped } from '@comunica/bus-query-operation';\nimport type { IActorArgs, IActorTest } from '@comunica/core';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type {\n IQueryOperationResult,\n BindingsStream,\n Bindings,\n IActionContext,\n MetadataBindings,\n} from '@comunica/types';\nimport { ArrayIterator } from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\n\nconst DF = new DataFactory();\n\n/**\n * A comunica Values Query Operation Actor.\n */\nexport class ActorQueryOperationValues extends ActorQueryOperationTyped {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryOperationUpdateDeleteInsertArgs) {\n super(args, 'values');\n }\n\n public async testOperation(_operation: Algebra.Values, _context: IActionContext): Promise {\n return true;\n }\n\n public async runOperation(operation: Algebra.Values, context: IActionContext):\n Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, context);\n const bindingsStream: BindingsStream = new ArrayIterator(operation.bindings\n .map(x => bindingsFactory.bindings(Object.entries(x)\n .map(([ key, value ]) => [ DF.variable(key.slice(1)), value ]))));\n const variables = operation.variables;\n const metadata = (): Promise => Promise.resolve({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: operation.bindings.length },\n canContainUndefs: operation.bindings.some(bindings => variables.some(variable => !(`?${variable.value}` in bindings))),\n variables,\n });\n return { type: 'bindings', bindingsStream, metadata };\n }\n}\n\nexport interface IActorQueryOperationUpdateDeleteInsertArgs extends\n IActorArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { IActionQueryParse, IActorQueryParseArgs, IActorQueryParseOutput } from '@comunica/bus-query-parse';\nimport { ActorQueryParse } from '@comunica/bus-query-parse';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport { Converter } from 'graphql-to-sparql';\n\n/**\n * A comunica GraphQL SPARQL Parse Actor.\n */\nexport class ActorQueryParseGraphql extends ActorQueryParse {\n private readonly graphqlToSparql: Converter;\n\n public constructor(args: IActorQueryParseArgs) {\n super(args);\n this.graphqlToSparql = new Converter({ requireContext: true });\n }\n\n public async test(action: IActionQueryParse): Promise {\n if (action.queryFormat?.language !== 'graphql') {\n throw new Error('This actor can only parse GraphQL queries');\n }\n return true;\n }\n\n public async run(action: IActionQueryParse): Promise {\n const context: any = action.context.get(KeysInitQuery.jsonLdContext) || {};\n const options = {\n // eslint-disable-next-line ts/no-unnecessary-type-assertion\n singularizeVariables: action.context.get(KeysInitQuery.graphqlSingularizeVariables),\n };\n return { operation: await this.graphqlToSparql.graphqlToSparqlAlgebra(action.query, context, options) };\n }\n}\n","import type { IActionQueryParse, IActorQueryParseArgs, IActorQueryParseOutput } from '@comunica/bus-query-parse';\nimport { ActorQueryParse } from '@comunica/bus-query-parse';\nimport type { IActorTest } from '@comunica/core';\nimport { translate } from 'sparqlalgebrajs';\nimport { Parser as SparqlParser } from 'sparqljs';\n\n/**\n * A comunica Algebra SPARQL Parse Actor.\n */\nexport class ActorQueryParseSparql extends ActorQueryParse {\n public readonly prefixes: Record;\n\n public constructor(args: IActorQueryParseSparqlArgs) {\n super(args);\n this.prefixes = Object.freeze(this.prefixes);\n }\n\n public async test(action: IActionQueryParse): Promise {\n if (action.queryFormat && action.queryFormat.language !== 'sparql') {\n throw new Error('This actor can only parse SPARQL queries');\n }\n return true;\n }\n\n public async run(action: IActionQueryParse): Promise {\n const parser = new SparqlParser({ prefixes: this.prefixes, baseIRI: action.baseIRI, sparqlStar: true });\n const parsedSyntax = parser.parse(action.query);\n const baseIRI = parsedSyntax.type === 'query' ? parsedSyntax.base : undefined;\n return {\n baseIRI,\n operation: translate(parsedSyntax, {\n quads: true,\n prefixes: this.prefixes,\n blankToVariable: true,\n baseIRI: action.baseIRI,\n }),\n };\n }\n}\n\nexport interface IActorQueryParseSparqlArgs extends IActorQueryParseArgs {\n /**\n * Default prefixes to use\n * @range {json}\n * @default {{\n * \"rdf\": \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\",\n * \"rdfs\": \"http://www.w3.org/2000/01/rdf-schema#\",\n * \"owl\": \"http://www.w3.org/2002/07/owl#\",\n * \"xsd\": \"http://www.w3.org/2001/XMLSchema#\",\n * \"dc\": \"http://purl.org/dc/terms/\",\n * \"dcterms\": \"http://purl.org/dc/terms/\",\n * \"dc11\": \"http://purl.org/dc/elements/1.1/\",\n * \"foaf\": \"http://xmlns.com/foaf/0.1/\",\n * \"geo\": \"http://www.w3.org/2003/01/geo/wgs84_pos#\",\n * \"dbpedia\": \"http://dbpedia.org/resource/\",\n * \"dbpedia-owl\": \"http://dbpedia.org/ontology/\",\n * \"dbpprop\": \"http://dbpedia.org/property/\",\n * \"schema\": \"http://schema.org/\",\n * \"skos\": \"http://www.w3.org/2008/05/skos#\"\n * }}\n */\n prefixes?: Record;\n}\n","import type {\n IActionQueryProcess,\n IActorQueryProcessOutput,\n IActorQueryProcessArgs,\n IQueryProcessSequential,\n} from '@comunica/bus-query-process';\nimport {\n ActorQueryProcess,\n} from '@comunica/bus-query-process';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport { ActionContextKey } from '@comunica/core';\n\n/**\n * A comunica Explain Logical Query Process Actor.\n */\nexport class ActorQueryProcessExplainLogical extends ActorQueryProcess {\n public readonly queryProcessor: IQueryProcessSequential;\n\n public constructor(args: IActorQueryProcessExplainLogicalArgs) {\n super(args);\n }\n\n public async test(action: IActionQueryProcess): Promise {\n if ((action.context.get(KeysInitQuery.explain) ||\n action.context.get(new ActionContextKey('explain'))) !== 'logical') {\n throw new Error(`${this.name} can only explain in 'logical' mode.`);\n }\n return true;\n }\n\n public async run(action: IActionQueryProcess): Promise {\n // Parse and optimize the query\n let { operation, context } = await this.queryProcessor.parse(action.query, action.context);\n ({ operation, context } = await this.queryProcessor.optimize(operation, context));\n\n return {\n result: {\n explain: true,\n type: 'logical',\n data: operation,\n },\n };\n }\n}\n\nexport interface IActorQueryProcessExplainLogicalArgs extends IActorQueryProcessArgs {\n queryProcessor: IQueryProcessSequential;\n}\n","import type {\n IActionQueryProcess,\n IActorQueryProcessOutput,\n IActorQueryProcessArgs,\n IQueryProcessSequential,\n} from '@comunica/bus-query-process';\nimport {\n ActorQueryProcess,\n} from '@comunica/bus-query-process';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport { ActionContextKey } from '@comunica/core';\n\n/**\n * A comunica Explain Parsed Query Process Actor.\n */\nexport class ActorQueryProcessExplainParsed extends ActorQueryProcess {\n public readonly queryProcessor: IQueryProcessSequential;\n\n public constructor(args: IActorQueryProcessExplainParsedArgs) {\n super(args);\n }\n\n public async test(action: IActionQueryProcess): Promise {\n if ((action.context.get(KeysInitQuery.explain) ||\n action.context.get(new ActionContextKey('explain'))) !== 'parsed') {\n throw new Error(`${this.name} can only explain in 'parsed' mode.`);\n }\n return true;\n }\n\n public async run(action: IActionQueryProcess): Promise {\n // Parse the query\n const { operation } = await this.queryProcessor.parse(action.query, action.context);\n\n return {\n result: {\n explain: true,\n type: 'parsed',\n data: operation,\n },\n };\n }\n}\n\nexport interface IActorQueryProcessExplainParsedArgs extends IActorQueryProcessArgs {\n queryProcessor: IQueryProcessSequential;\n}\n","import type {\n IActionQueryProcess,\n IActorQueryProcessOutput,\n IActorQueryProcessArgs,\n IQueryProcessSequential,\n} from '@comunica/bus-query-process';\nimport {\n ActorQueryProcess,\n} from '@comunica/bus-query-process';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport { ActionContextKey } from '@comunica/core';\nimport { MemoryPhysicalQueryPlanLogger } from './MemoryPhysicalQueryPlanLogger';\n\n/**\n * A comunica Explain Physical Query Process Actor.\n */\nexport class ActorQueryProcessExplainPhysical extends ActorQueryProcess {\n public readonly queryProcessor: IQueryProcessSequential;\n\n public constructor(args: IActorQueryProcessExplainPhysicalArgs) {\n super(args);\n }\n\n public async test(action: IActionQueryProcess): Promise {\n const mode = (action.context.get(KeysInitQuery.explain) || action.context.get(new ActionContextKey('explain')));\n if (mode !== 'physical' && mode !== 'physical-json') {\n throw new Error(`${this.name} can only explain in 'physical' or 'physical-json' mode.`);\n }\n return true;\n }\n\n public async run(action: IActionQueryProcess): Promise {\n // Run all query processing steps in sequence\n\n let { operation, context } = await this.queryProcessor.parse(action.query, action.context);\n ({ operation, context } = await this.queryProcessor.optimize(operation, context));\n\n // If we need a physical query plan, store a physical query plan logger in the context, and collect it after exec\n const physicalQueryPlanLogger = new MemoryPhysicalQueryPlanLogger();\n context = context.set(KeysInitQuery.physicalQueryPlanLogger, physicalQueryPlanLogger);\n\n const output = await this.queryProcessor.evaluate(operation, context);\n\n // Make sure the whole result is produced\n switch (output.type) {\n case 'bindings':\n await output.bindingsStream.toArray();\n break;\n case 'quads':\n await output.quadStream.toArray();\n break;\n case 'boolean':\n await output.execute();\n break;\n case 'void':\n await output.execute();\n break;\n }\n\n const mode: 'physical' | 'physical-json' = (action.context.get(KeysInitQuery.explain) ??\n action.context.getSafe(new ActionContextKey('explain')));\n return {\n result: {\n explain: true,\n type: mode,\n data: mode === 'physical' ? physicalQueryPlanLogger.toCompactString() : physicalQueryPlanLogger.toJson(),\n },\n };\n }\n}\n\nexport interface IActorQueryProcessExplainPhysicalArgs extends IActorQueryProcessArgs {\n queryProcessor: IQueryProcessSequential;\n}\n","import type { IPhysicalQueryPlanLogger, IPlanNode } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { termToString } from 'rdf-string';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A physical query plan logger that stores everything in memory.\n */\nexport class MemoryPhysicalQueryPlanLogger implements IPhysicalQueryPlanLogger {\n private readonly planNodes: Map;\n private rootNode: IPlanNode | undefined;\n\n public constructor() {\n this.planNodes = new Map();\n }\n\n public logOperation(\n logicalOperator: string,\n physicalOperator: string | undefined,\n node: any,\n parentNode: any,\n actor: string,\n metadata: any,\n ): void {\n const planNode: IPlanNode = {\n actor,\n logicalOperator,\n physicalOperator,\n rawNode: node,\n children: [],\n metadata,\n };\n this.planNodes.set(node, planNode);\n\n if (this.rootNode) {\n if (!parentNode) {\n throw new Error(`Detected more than one parent-less node`);\n }\n const planParentNode = this.planNodes.get(parentNode);\n if (!planParentNode) {\n throw new Error(`Could not find parent node`);\n }\n planParentNode.children.push(planNode);\n } else {\n if (parentNode) {\n throw new Error(`No root node has been set yet, while a parent is being referenced`);\n }\n this.rootNode = planNode;\n }\n }\n\n public stashChildren(node: any, filter?: (planNodeFilter: IPlanNode) => boolean): void {\n const planNode = this.planNodes.get(node);\n if (!planNode) {\n throw new Error(`Could not find plan node`);\n }\n planNode.children = filter ? planNode.children.filter(filter) : [];\n }\n\n public unstashChild(\n node: any,\n parentNode: any,\n ): void {\n const planNode = this.planNodes.get(node);\n if (planNode) {\n const planParentNode = this.planNodes.get(parentNode);\n if (!planParentNode) {\n throw new Error(`Could not find plan parent node`);\n }\n planParentNode.children.push(planNode);\n }\n }\n\n public appendMetadata(\n node: any,\n metadata: any,\n ): void {\n const planNode = this.planNodes.get(node);\n if (planNode) {\n planNode.metadata = {\n ...planNode.metadata,\n ...metadata,\n };\n }\n }\n\n public toJson(): IPlanNodeJson | Record {\n return this.rootNode ? this.planNodeToJson(this.rootNode) : {};\n }\n\n private planNodeToJson(node: IPlanNode): IPlanNodeJson {\n const data: IPlanNodeJson = {\n logical: node.logicalOperator,\n physical: node.physicalOperator,\n ...this.getLogicalMetadata(node.rawNode),\n ...this.compactMetadata(node.metadata),\n };\n\n if (node.children.length > 0) {\n data.children = node.children.map(child => this.planNodeToJson(child));\n }\n\n // Special case: compact children for bind joins.\n if (data.physical === 'bind' && data.children) {\n // Group children by query plan format\n const childrenGrouped: Record = {};\n for (const child of data.children) {\n const lastSubChild = child.children?.at(-1) ?? child;\n const key = this.getPlanHash(lastSubChild).join(',');\n if (!childrenGrouped[key]) {\n childrenGrouped[key] = [];\n }\n childrenGrouped[key].push(child);\n }\n\n // Compact query plan occurrences\n const childrenCompact: IPlanNodeJsonChildCompact[] = [];\n for (const children of Object.values(childrenGrouped)) {\n childrenCompact.push({\n occurrences: children.length,\n firstOccurrence: children[0],\n });\n }\n\n // Replace children with compacted representation\n data.childrenCompact = childrenCompact;\n delete data.children;\n }\n\n return data;\n }\n\n private getPlanHash(node: IPlanNodeJson): string[] {\n let entries = [ `${node.logical}-${node.physical}` ];\n if (node.children) {\n entries = [\n ...entries,\n ...node.children.flatMap(child => this.getPlanHash(child)),\n ];\n } else if (node.childrenCompact) {\n entries = [\n ...entries,\n ...node.childrenCompact.flatMap(child => this.getPlanHash(child.firstOccurrence)),\n ];\n }\n return entries;\n }\n\n private compactMetadata(metadata: any): any {\n return Object.fromEntries(Object.entries(metadata)\n .map(([ key, value ]) => [ key, this.compactMetadataValue(value) ]));\n }\n\n private compactMetadataValue(value: any): any {\n return value && typeof value === 'object' && 'termType' in value ? this.getLogicalMetadata(value) : value;\n }\n\n private getLogicalMetadata(rawNode: any): IPlanNodeJsonLogicalMetadata {\n const data: IPlanNodeJsonLogicalMetadata = {};\n\n if ('type' in rawNode) {\n const operation: Algebra.Operation = rawNode;\n\n if (operation.metadata?.scopedSource) {\n data.source = ( operation.metadata.scopedSource).source.toString();\n }\n\n // eslint-disable-next-line ts/switch-exhaustiveness-check\n switch (operation.type) {\n case 'pattern':\n data.pattern = this.quadToString(operation);\n break;\n case 'project':\n data.variables = operation.variables.map(variable => variable.value);\n break;\n }\n }\n\n return data;\n }\n\n private quadToString(quad: RDF.BaseQuad): string {\n return `${termToString(quad.subject)} ${termToString(quad.predicate)} ${termToString(quad.object)}${quad.graph.termType === 'DefaultGraph' ? '' : ` ${termToString(quad.graph)}`}`;\n }\n\n public toCompactString(): string {\n const node = this.toJson();\n const lines: string[] = [];\n const sources: Map = new Map();\n\n if ('logical' in node) {\n this.nodeToCompactString(lines, sources, '', node);\n } else {\n lines.push('Empty');\n }\n\n if (sources.size > 0) {\n lines.push('');\n lines.push('sources:');\n for (const [ key, id ] of sources.entries()) {\n lines.push(` ${id}: ${key}`);\n }\n }\n\n return lines.join('\\n');\n }\n\n public nodeToCompactString(\n lines: string[],\n sources: Map,\n indent: string,\n node: IPlanNodeJson,\n metadata?: string,\n ): void {\n let sourceId: number | undefined;\n if (node.source) {\n sourceId = sources.get(node.source);\n if (sourceId === undefined) {\n sourceId = sources.size;\n sources.set(node.source, sourceId);\n }\n }\n\n lines.push(`${\n indent}${\n node.logical}${\n node.physical ? `(${node.physical})` : ''}${\n node.pattern ? ` (${node.pattern})` : ''}${\n node.variables ? ` (${node.variables.join(',')})` : ''}${\n node.bindOperation ? ` bindOperation:(${node.bindOperation.pattern}) bindCardEst:${node.bindOperationCardinality.type === 'estimate' ? '~' : ''}${numberToString(node.bindOperationCardinality.value)}` : ''}${\n node.cardinality ? ` cardEst:${node.cardinality.type === 'estimate' ? '~' : ''}${numberToString(node.cardinality.value)}` : ''}${\n node.source ? ` src:${sourceId}` : ''}${\n node.cardinalityReal ? ` cardReal:${node.cardinalityReal}` : ''}${\n node.timeSelf ? ` timeSelf:${numberToString(node.timeSelf)}ms` : ''}${\n node.timeLife ? ` timeLife:${numberToString(node.timeLife)}ms` : ''}${\n metadata ? ` ${metadata}` : ''}`);\n for (const child of node.children ?? []) {\n this.nodeToCompactString(lines, sources, `${indent} `, child);\n }\n for (const child of node.childrenCompact ?? []) {\n this.nodeToCompactString(lines, sources, `${indent} `, child.firstOccurrence, `compacted-occurrences:${child.occurrences}`);\n }\n }\n}\n\nexport function numberToString(value: number): string {\n return value.toLocaleString('en-US', { minimumFractionDigits: 0, maximumFractionDigits: 3 });\n}\n\ninterface IPlanNodeJson extends IPlanNodeJsonLogicalMetadata {\n logical: string;\n physical?: string;\n [metadataKey: string]: any;\n children?: IPlanNodeJson[];\n childrenCompact?: IPlanNodeJsonChildCompact[];\n}\n\ninterface IPlanNodeJsonChildCompact {\n occurrences: number;\n firstOccurrence: IPlanNodeJson;\n}\n\ninterface IPlanNodeJsonLogicalMetadata {\n pattern?: string;\n source?: string;\n variables?: string[];\n cardinality?: RDF.QueryResultCardinality;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorContextPreprocess } from '@comunica/bus-context-preprocess';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { MediatorOptimizeQueryOperation } from '@comunica/bus-optimize-query-operation';\nimport type { MediatorQueryOperation } from '@comunica/bus-query-operation';\nimport { materializeOperation } from '@comunica/bus-query-operation';\nimport type { MediatorQueryParse } from '@comunica/bus-query-parse';\nimport type {\n IActionQueryProcess,\n IActorQueryProcessOutput,\n IActorQueryProcessArgs,\n IQueryProcessSequential,\n IQueryProcessSequentialOutput,\n} from '@comunica/bus-query-process';\nimport {\n ActorQueryProcess,\n} from '@comunica/bus-query-process';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport type { IActorTest } from '@comunica/core';\nimport { ActionContextKey } from '@comunica/core';\nimport type {\n IActionContext,\n IQueryOperationResult,\n QueryFormatType,\n} from '@comunica/types';\n\nimport type * as RDF from '@rdfjs/types';\nimport type { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Sequential Query Process Actor.\n */\nexport class ActorQueryProcessSequential extends ActorQueryProcess implements IQueryProcessSequential {\n public readonly mediatorContextPreprocess: MediatorContextPreprocess;\n public readonly mediatorQueryParse: MediatorQueryParse;\n public readonly mediatorOptimizeQueryOperation: MediatorOptimizeQueryOperation;\n public readonly mediatorQueryOperation: MediatorQueryOperation;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQueryProcessSequentialArgs) {\n super(args);\n }\n\n public async test(action: IActionQueryProcess): Promise {\n if (action.context.get(KeysInitQuery.explain) || action.context.get(new ActionContextKey('explain'))) {\n throw new Error(`${this.name} is not able to explain queries.`);\n }\n return true;\n }\n\n public async run(action: IActionQueryProcess): Promise {\n // Run all query processing steps in sequence\n let { operation, context } = await this.parse(action.query, action.context);\n ({ operation, context } = await this.optimize(operation, context));\n const output = await this.evaluate(operation, context);\n\n return { result: output };\n }\n\n public async parse(query: QueryFormatType, context: IActionContext): Promise {\n // Pre-processing the context\n context = (await this.mediatorContextPreprocess.mediate({ context, initialize: true })).context;\n\n // Parse query\n let operation: Algebra.Operation;\n if (typeof query === 'string') {\n // Save the original query string in the context\n context = context.set(KeysInitQuery.queryString, query);\n\n const baseIRI: string | undefined = context.get(KeysInitQuery.baseIRI);\n const queryFormat: RDF.QueryFormat = context.get(KeysInitQuery.queryFormat)!;\n const queryParseOutput = await this.mediatorQueryParse.mediate({ context, query, queryFormat, baseIRI });\n operation = queryParseOutput.operation;\n // Update the baseIRI in the context if the query modified it.\n if (queryParseOutput.baseIRI) {\n context = context.set(KeysInitQuery.baseIRI, queryParseOutput.baseIRI);\n }\n } else {\n operation = query;\n }\n\n // Apply initial bindings in context\n if (context.has(KeysInitQuery.initialBindings)) {\n const bindingsFactory = await BindingsFactory\n .create(this.mediatorMergeBindingsContext, context);\n operation = materializeOperation(operation, context.get(KeysInitQuery.initialBindings)!, bindingsFactory);\n\n // Delete the query string from the context, since our initial query might have changed\n context = context.delete(KeysInitQuery.queryString);\n }\n\n return { operation, context };\n }\n\n public async optimize(operation: Algebra.Operation, context: IActionContext): Promise {\n // Save initial query in context\n context = context.set(KeysInitQuery.query, operation);\n\n ({ operation, context } = await this.mediatorOptimizeQueryOperation.mediate({ context, operation }));\n\n // Save original query in context\n context = context.set(KeysInitQuery.query, operation);\n\n return { operation, context };\n }\n\n public async evaluate(operation: Algebra.Operation, context: IActionContext): Promise {\n const output = await this.mediatorQueryOperation.mediate({ context, operation });\n output.context = context;\n return output;\n }\n}\n\nexport interface IActorQueryProcessSequentialArgs extends IActorQueryProcessArgs {\n /**\n * The context processing combinator\n */\n mediatorContextPreprocess: MediatorContextPreprocess;\n /**\n * The query parse mediator\n */\n mediatorQueryParse: MediatorQueryParse;\n /**\n * The query operation optimize mediator\n */\n mediatorOptimizeQueryOperation: MediatorOptimizeQueryOperation;\n /**\n * The query operation mediator\n */\n mediatorQueryOperation: MediatorQueryOperation;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport type {\n IActionContext,\n IQueryOperationResultBindings,\n IQueryOperationResultBoolean,\n IQueryOperationResultQuads,\n} from '@comunica/types';\nimport { wrap } from 'asynciterator';\nimport * as RdfString from 'rdf-string';\nimport { Readable } from 'readable-stream';\n\n/**\n * A comunica JSON Query Result Serialize Actor.\n */\nexport class ActorQueryResultSerializeJson extends ActorQueryResultSerializeFixedMediaTypes {\n /**\n * @param args -\n * \\ @defaultNested {{\n * \"application/json\": 1.0\n * }} mediaTypePriorities\n * \\ @defaultNested {{\n * \"application/json\": \"https://comunica.linkeddatafragments.org/#results_JSON\"\n * }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeFixedMediaTypesArgs) {\n super(args);\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (![ 'bindings', 'quads', 'boolean' ].includes(action.type)) {\n throw new Error('This actor can only handle bindings or quad streams.');\n }\n return true;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string, _context: IActionContext):\n Promise {\n const data = new Readable();\n data._read = () => {\n // Do nothing\n };\n\n if (action.type === 'bindings' || action.type === 'quads') {\n let stream = action.type === 'bindings' ?\n wrap(( action).bindingsStream)\n .map(element => JSON.stringify(Object.fromEntries([ ...element ]\n .map(([ key, value ]) => [ key.value, RdfString.termToString(value) ])))) :\n wrap(( action).quadStream)\n .map(element => JSON.stringify(RdfString.quadToStringQuad(element)));\n\n let empty = true;\n stream = stream.map((element) => {\n const ret = `${empty ? '' : ','}\\n${element}`;\n empty = false;\n return ret;\n }).prepend([ '[' ]).append([ '\\n]\\n' ]);\n\n data.wrap( stream);\n } else {\n try {\n data.push(`${JSON.stringify(await ( action).execute())}\\n`);\n data.push(null);\n } catch (error: unknown) {\n setTimeout(() => data.emit('error', error));\n }\n }\n\n return { data };\n }\n}\n","import type {\n IActorQueryResultSerializeArgs,\n IActorQueryResultSerializeOutput,\n IActionSparqlSerialize,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerialize } from '@comunica/bus-query-result-serialize';\nimport type {\n MediatorRdfSerializeHandle,\n MediatorRdfSerializeMediaTypeFormats,\n MediatorRdfSerializeMediaTypes,\n} from '@comunica/bus-rdf-serialize';\nimport type { IActorTest } from '@comunica/core';\nimport type { IActionContext, IQueryOperationResultQuads } from '@comunica/types';\n\n/**\n * A comunica RDF Query Result Serialize Actor.\n *\n * It serializes quad streams (for example resulting from a CONSTRUCT query)\n * to an RDF syntax.\n */\nexport class ActorQueryResultSerializeRdf extends ActorQueryResultSerialize\n implements IActorQueryResultSerializeRdfArgs {\n public readonly mediatorRdfSerialize: MediatorRdfSerializeHandle;\n public readonly mediatorMediaTypeCombiner: MediatorRdfSerializeMediaTypes;\n public readonly mediatorMediaTypeFormatCombiner: MediatorRdfSerializeMediaTypeFormats;\n\n public constructor(args: IActorQueryResultSerializeRdfArgs) {\n super(args);\n }\n\n public async testHandle(action: IActionSparqlSerialize, mediaType: string, context: IActionContext):\n Promise {\n // Check if we are provided with a quad stream\n if (action.type !== 'quads') {\n throw new Error(`Actor ${this.name} can only handle quad streams`);\n }\n\n // Check if the given media type can be handled\n const { mediaTypes } = await this.mediatorMediaTypeCombiner.mediate(\n { context, mediaTypes: true },\n );\n if (!(mediaType in mediaTypes)) {\n throw new Error(`Actor ${this.name} can not handle media type ${mediaType}. All available types: ${\n // eslint-disable-next-line ts/restrict-template-expressions\n Object.keys(mediaTypes)}`);\n }\n return true;\n }\n\n public async runHandle(action: IActionSparqlSerialize, mediaType: string, context: IActionContext):\n Promise {\n // Delegate handling to the mediator\n return (await this.mediatorRdfSerialize.mediate({\n context,\n handle: {\n context,\n quadStream: ( action).quadStream,\n },\n handleMediaType: mediaType,\n })).handle;\n }\n\n public async testMediaType(_context: IActionContext): Promise {\n return true;\n }\n\n public async getMediaTypes(context: IActionContext): Promise> {\n return (await this.mediatorMediaTypeCombiner.mediate({ context, mediaTypes: true })).mediaTypes;\n }\n\n public async testMediaTypeFormats(_context: IActionContext): Promise {\n return true;\n }\n\n public async getMediaTypeFormats(context: IActionContext): Promise> {\n return (await this.mediatorMediaTypeFormatCombiner.mediate({ context, mediaTypeFormats: true })).mediaTypeFormats;\n }\n}\n\nexport interface IActorQueryResultSerializeRdfArgs extends IActorQueryResultSerializeArgs {\n mediatorRdfSerialize: MediatorRdfSerializeHandle;\n mediatorMediaTypeCombiner: MediatorRdfSerializeMediaTypes;\n mediatorMediaTypeFormatCombiner: MediatorRdfSerializeMediaTypeFormats;\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport type {\n IActionContext,\n IQueryOperationResultBindings,\n IQueryOperationResultBoolean,\n IQueryOperationResultQuads,\n IQueryOperationResultVoid,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { wrap } from 'asynciterator';\nimport { termToString } from 'rdf-string';\nimport { Readable } from 'readable-stream';\n\n/**\n * A comunica Simple Sparql Serialize Actor.\n */\nexport class ActorQueryResultSerializeSimple extends ActorQueryResultSerializeFixedMediaTypes {\n /**\n * @param args -\n * \\ @defaultNested {{ \"simple\": 0.9 }} mediaTypePriorities\n * \\ @defaultNested {{ \"simple\": \"https://comunica.linkeddatafragments.org/#results_simple\" }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeFixedMediaTypesArgs) {\n super(args);\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (![ 'bindings', 'quads', 'boolean', 'void' ].includes(action.type)) {\n throw new Error('This actor can only handle bindings streams, quad streams, booleans, or updates.');\n }\n return true;\n }\n\n protected static termToString(term: RDF.Term): string {\n return term.termType === 'Quad' ? termToString(term) : term.value;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string, _context: IActionContext):\n Promise {\n const data = new Readable();\n if (action.type === 'bindings') {\n data.wrap( (action).bindingsStream.map((bindings: RDF.Bindings) => `${[ ...bindings ].map(\n ([ key, value ]) => `?${key.value}: ${ActorQueryResultSerializeSimple.termToString(value)}`,\n ).join('\\n')}\\n\\n`));\n } else if (action.type === 'quads') {\n data.wrap( (action).quadStream.map(quad =>\n `subject: ${ActorQueryResultSerializeSimple.termToString(quad.subject)}\\n` +\n `predicate: ${ActorQueryResultSerializeSimple.termToString(quad.predicate)}\\n` +\n `object: ${ActorQueryResultSerializeSimple.termToString(quad.object)}\\n` +\n `graph: ${ActorQueryResultSerializeSimple.termToString(quad.graph)}\\n\\n`));\n } else {\n data.wrap( wrap(\n action.type === 'boolean' ?\n ( action).execute().then(value => [ `${value}\\n` ]) :\n (action).execute().then(() => [ 'ok\\n' ]),\n ));\n }\n\n return { data };\n }\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport {\n ActorQueryResultSerializeFixedMediaTypes,\n} from '@comunica/bus-query-result-serialize';\nimport type { Bindings, IActionContext, IQueryOperationResultBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { Readable } from 'readable-stream';\n\n/**\n * A comunica SPARQL CSV Query Result Serialize Actor.\n */\nexport class ActorQueryResultSerializeSparqlCsv extends ActorQueryResultSerializeFixedMediaTypes {\n /**\n * @param args -\n * \\ @defaultNested {{\n * \"text/csv\": 0.75\n * }} mediaTypePriorities\n * \\ @defaultNested {{\n * \"text/csv\": \"http://www.w3.org/ns/formats/SPARQL_Results_CSV\"\n * }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeFixedMediaTypesArgs) {\n super(args);\n }\n\n /**\n * Converts an RDF term to its CSV representation.\n * @param {RDF.Term} value An RDF term.\n * @return {string} A string representation of the given value.\n */\n public static bindingToCsvBindings(value?: RDF.Term): string {\n if (!value) {\n return '';\n }\n\n let stringValue = value.value;\n\n if (value.termType === 'Literal') {\n // This is a lossy representation, since language and datatype are not encoded in here.\n stringValue = `${stringValue}`;\n } else if (value.termType === 'BlankNode') {\n stringValue = `_:${stringValue}`;\n } else if (value.termType === 'Quad') {\n let object = ActorQueryResultSerializeSparqlCsv.bindingToCsvBindings(value.object);\n if (value.object.termType === 'Literal') {\n // If object is a literal, it must be put in quotes, and internal quotes must be escaped\n object = `\"${object.replaceAll('\"', '\"\"')}\"`;\n }\n stringValue = `<< ${ActorQueryResultSerializeSparqlCsv.bindingToCsvBindings(value.subject)} ${ActorQueryResultSerializeSparqlCsv.bindingToCsvBindings(value.predicate)} ${object} >>`;\n } else {\n stringValue = `<${stringValue}>`;\n }\n\n // If a value contains certain characters, put it between double quotes\n if (/[\",\\n\\r]/u.test(stringValue)) {\n // Within quote strings, \" is written using a pair of quotation marks \"\".\n stringValue = `\"${stringValue.replaceAll('\"', '\"\"')}\"`;\n }\n\n return stringValue;\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (action.type !== 'bindings') {\n throw new Error('This actor can only handle bindings streams.');\n }\n return true;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string | undefined, _context: IActionContext):\n Promise {\n const bindingsAction = action;\n\n const data = new Readable();\n\n const metadata = await bindingsAction.metadata();\n\n // Write head\n data.push(`${metadata.variables.map(variable => variable.value).join(',')}\\r\\n`);\n\n // Write body\n data.wrap( bindingsAction.bindingsStream.map((bindings: Bindings) => `${metadata.variables\n .map(key => ActorQueryResultSerializeSparqlCsv.bindingToCsvBindings(bindings.get(key)))\n .join(',')}\\r\\n`));\n\n return { data };\n }\n}\n","import type { IActionHttp, IActorHttpOutput } from '@comunica/bus-http';\nimport type { ActorHttpInvalidateListenable } from '@comunica/bus-http-invalidate';\nimport type { Actor, IActionObserverArgs, IActorTest } from '@comunica/core';\nimport { ActionObserver } from '@comunica/core';\n\n/**\n * Observes HTTP actions, and maintains a counter of the number of requests.\n */\nexport class ActionObserverHttp extends ActionObserver {\n public readonly httpInvalidator: ActorHttpInvalidateListenable;\n public requests = 0;\n\n /* eslint-disable max-len */\n /**\n * @param args - @defaultNested {} bus\n */\n public constructor(args: IActionObserverHttpArgs) {\n super(args);\n this.bus.subscribeObserver(this);\n this.httpInvalidator.addInvalidateListener(() => {\n this.requests = 0;\n });\n }\n /* eslint-enable max-len */\n\n public onRun(\n _actor: Actor,\n _action: IActionHttp,\n _output: Promise,\n ): void {\n this.requests++;\n }\n}\n\nexport interface IActionObserverHttpArgs extends IActionObserverArgs {\n /* eslint-disable max-len */\n /**\n * An actor that listens to HTTP invalidation events\n * @default { a }\n */\n httpInvalidator: ActorHttpInvalidateListenable;\n /* eslint-enable max-len */\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport type {\n IActionContext,\n IQueryOperationResultBindings,\n IQueryOperationResultBoolean,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { wrap } from 'asynciterator';\nimport { Readable } from 'readable-stream';\nimport type { ActionObserverHttp } from './ActionObserverHttp';\n\n/**\n * A comunica sparql-results+xml Serialize Actor.\n */\nexport class ActorQueryResultSerializeSparqlJson extends ActorQueryResultSerializeFixedMediaTypes {\n private readonly emitMetadata: boolean;\n public readonly httpObserver: ActionObserverHttp;\n\n /* eslint-disable max-len */\n /**\n * @param args -\n * \\ @defaultNested {{\n * \"application/sparql-results+json\": 0.8\n * }} mediaTypePriorities\n * \\ @defaultNested {{\n * \"application/sparql-results+json\": \"http://www.w3.org/ns/formats/SPARQL_Results_JSON\"\n * }} mediaTypeFormats\n * \\ @defaultNested {true} emitMetadata\n * \\ @defaultNested { a } httpObserver\n */\n public constructor(args: IActorQueryResultSerializeSparqlJsonArgs) {\n super(args);\n }\n /* eslint-enable max-len */\n\n /**\n * Converts an RDF term to its JSON representation.\n * @param {RDF.Term} value An RDF term.\n * @return {any} A JSON object.\n */\n public static bindingToJsonBindings(value: RDF.Term): any {\n if (value.termType === 'Literal') {\n const literal: RDF.Literal = value;\n const jsonValue: any = { value: literal.value, type: 'literal' };\n const { language, datatype } = literal;\n if (language) {\n jsonValue['xml:lang'] = language;\n } else if (datatype && datatype.value !== 'http://www.w3.org/2001/XMLSchema#string') {\n jsonValue.datatype = datatype.value;\n }\n return jsonValue;\n }\n if (value.termType === 'BlankNode') {\n return { value: value.value, type: 'bnode' };\n }\n if (value.termType === 'Quad') {\n return {\n value: {\n subject: ActorQueryResultSerializeSparqlJson.bindingToJsonBindings(value.subject),\n predicate: ActorQueryResultSerializeSparqlJson.bindingToJsonBindings(value.predicate),\n object: ActorQueryResultSerializeSparqlJson.bindingToJsonBindings(value.object),\n },\n type: 'triple',\n };\n }\n return { value: value.value, type: 'uri' };\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (![ 'bindings', 'boolean' ].includes(action.type)) {\n throw new Error('This actor can only handle bindings streams or booleans.');\n }\n return true;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string | undefined, _context: IActionContext):\n Promise {\n const data = new Readable();\n // Write head\n const head: any = {};\n if (action.type === 'bindings') {\n const metadata = await ( action).metadata();\n if (metadata.variables.length > 0) {\n head.vars = metadata.variables.map(variable => variable.value);\n }\n }\n data.push(`{\"head\": ${JSON.stringify(head)},\\n`);\n\n if (action.type === 'bindings') {\n const resultStream = ( action).bindingsStream;\n data.push('\"results\": { \"bindings\": [\\n');\n\n let first = true;\n\n function* end(cb: () => string): Generator {\n yield cb();\n }\n\n // Write bindings\n data.wrap(\n // JSON SPARQL results spec does not allow unbound variables and blank node bindings\n wrap(resultStream).map((bindings) => {\n const res = `${first ? '' : ',\\n'}${JSON.stringify(Object.fromEntries([ ...bindings ]\n .map(([ key, value ]) => [ key.value, ActorQueryResultSerializeSparqlJson.bindingToJsonBindings(value) ])))}`;\n first = false;\n return res;\n }).append(wrap(end(() => `\\n]}${this.emitMetadata ? `,\\n\"metadata\": { \"httpRequests\": ${this.httpObserver.requests} }` : ''}}\\n`))),\n );\n } else {\n data.wrap( wrap(( action).execute().then(value => [ `\"boolean\":${value}\\n}\\n` ])));\n }\n\n return { data };\n }\n}\n\nexport interface IActorQueryResultSerializeSparqlJsonArgs extends IActorQueryResultSerializeFixedMediaTypesArgs {\n emitMetadata: boolean;\n httpObserver: ActionObserverHttp;\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport {\n ActorQueryResultSerializeFixedMediaTypes,\n} from '@comunica/bus-query-result-serialize';\nimport type { IActionContext, IQueryOperationResultBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { termToString } from 'rdf-string-ttl';\nimport { Readable } from 'readable-stream';\n\n/**\n * A comunica SPARQL TSV Query Result Serialize Actor.\n */\nexport class ActorQueryResultSerializeSparqlTsv extends ActorQueryResultSerializeFixedMediaTypes {\n /**\n * @param args -\n * \\ @defaultNested {{\n * \"text/tab-separated-values\": 0.75\n * }} mediaTypePriorities\n * \\ @defaultNested {{\n * \"text/tab-separated-values\": \"http://www.w3.org/ns/formats/SPARQL_Results_TSV\"\n * }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeFixedMediaTypesArgs) {\n super(args);\n }\n\n /**\n * Converts an RDF term to its TSV representation.\n * @param {RDF.Term} value An RDF term.\n * @return {string} A string representation of the given value.\n */\n public static bindingToTsvBindings(value?: RDF.Term): string {\n if (!value) {\n return '';\n }\n\n // Escape tab, newline and carriage return characters\n return termToString(value)\n .replaceAll('\\t', '\\\\t')\n .replaceAll('\\n', '\\\\n')\n .replaceAll('\\r', '\\\\r');\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (action.type !== 'bindings') {\n throw new Error('This actor can only handle bindings streams.');\n }\n return true;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string | undefined, _context: IActionContext):\n Promise {\n const bindingsAction = action;\n\n const data = new Readable();\n // Write head\n const metadata = await bindingsAction.metadata();\n data.push(`${metadata.variables.map((variable: RDF.Variable) => variable.value).join('\\t')}\\n`);\n\n // Write Bindings\n data.wrap( bindingsAction.bindingsStream.map((bindings: RDF.Bindings) => `${metadata.variables\n .map((key: RDF.Variable) => ActorQueryResultSerializeSparqlTsv\n .bindingToTsvBindings(bindings.get(key)))\n .join('\\t')}\\n`));\n\n return { data };\n }\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport type {\n IActionContext,\n IQueryOperationResultBindings,\n IQueryOperationResultBoolean,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { wrap } from 'asynciterator';\nimport { Readable } from 'readable-stream';\nimport { XmlSerializer, type IXmlNode } from './XmlSerializer';\n\n/**\n * A comunica sparql-results+xml Serialize Actor.\n */\nexport class ActorQueryResultSerializeSparqlXml extends ActorQueryResultSerializeFixedMediaTypes {\n /**\n * @param args -\n * \\ @defaultNested {{\n * \"application/sparql-results+xml\": 0.8\n * }} mediaTypePriorities\n * \\ @defaultNested {{\n * \"application/sparql-results+xml\": \"http://www.w3.org/ns/formats/SPARQL_Results_XML\"\n * }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeFixedMediaTypesArgs) {\n super(args);\n }\n\n /**\n * Converts an RDF term to its object-based XML representation.\n * @param {RDF.Term} value An RDF term.\n * @param {string} key A variable name, '?' must be included as a prefix.\n * @return {IXmlNode} An object-based XML tag.\n */\n public static bindingToXmlBindings(value: RDF.Term, key: RDF.Variable): IXmlNode {\n return { name: 'binding', attributes: { name: key.value }, children: [ this.valueToXmlValue(value) ]};\n }\n\n public static valueToXmlValue(value: RDF.Term): IXmlNode {\n let attributes;\n switch (value.termType) {\n case 'Literal':\n if (value.language) {\n attributes = { 'xml:lang': value.language };\n } else if (value.datatype && value.datatype.value !== 'http://www.w3.org/2001/XMLSchema#string') {\n attributes = { datatype: value.datatype.value };\n } else {\n attributes = {};\n }\n return { name: 'literal', attributes, children: value.value };\n case 'BlankNode':\n return { name: 'bnode', children: value.value };\n case 'Quad':\n return {\n name: 'triple',\n children: [\n { name: 'subject', children: [ this.valueToXmlValue(value.subject) ]},\n { name: 'predicate', children: [ this.valueToXmlValue(value.predicate) ]},\n { name: 'object', children: [ this.valueToXmlValue(value.object) ]},\n ],\n };\n default:\n return { name: 'uri', children: value.value };\n }\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (![ 'bindings', 'boolean' ].includes(action.type)) {\n throw new Error('This actor can only handle bindings streams or booleans.');\n }\n return true;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string, _context: IActionContext):\n Promise {\n const data = new Readable();\n data._read = () => {\n // Do nothing\n };\n\n const serializer = new XmlSerializer();\n const metadata = await ( action).metadata();\n\n data.push(XmlSerializer.header);\n data.push(serializer.open('sparql', { xmlns: 'http://www.w3.org/2005/sparql-results#' }));\n data.push(\n serializer.serializeNode({\n name: 'head',\n children: metadata.variables.map(variable => ({ name: 'variable', attributes: { name: variable.value }})),\n }),\n );\n\n if (action.type === 'bindings') {\n function* end(): Generator {\n yield serializer.close();\n yield serializer.close();\n }\n data.push(serializer.open('results'));\n const stream = wrap(( action).bindingsStream).map(\n (bindings: RDF.Bindings) => serializer.serializeNode({\n name: 'result',\n children: [ ...bindings ].map(\n ([ key, value ]) => ActorQueryResultSerializeSparqlXml.bindingToXmlBindings(value, key),\n ),\n }),\n ).append(wrap(end()));\n data.wrap( stream);\n } else {\n try {\n const result = await ( action).execute();\n data.push(serializer.serializeNode({ name: 'boolean', children: result.toString() }));\n data.push(serializer.close());\n setTimeout(() => data.push(null));\n } catch (error: unknown) {\n setTimeout(() => data.emit('error', error));\n }\n }\n\n return { data };\n }\n}\n","/**\n * A very simple XML serializer\n */\nexport class XmlSerializer {\n private readonly stack: string[] = [];\n\n public static header = `\\n`;\n\n public constructor() {}\n\n /**\n *\n * @param name should be a valid XML tag name\n * @param attributes keys should be valid attribute names\n */\n public open(name: string, attributes?: Record): string {\n const res = `${this.identation() + this.formatTag(name, attributes, 'open')}\\n`;\n this.stack.push(name);\n return res;\n }\n\n public close(): string {\n const name = this.stack.pop();\n if (name === undefined) {\n throw new Error('There is no tag left to close');\n }\n return `${this.identation() + this.formatTag(name, {}, 'close')}\\n`;\n }\n\n public serializeNode(node: IXmlNode): string {\n if (node.children === undefined) {\n return `${this.identation() + this.formatTag(node.name, node.attributes, 'self-closing')}\\n`;\n }\n if (typeof node.children === 'string') {\n return `${this.identation() + this.formatTag(node.name, node.attributes, 'open') + this.escape(node.children) + this.formatTag(node.name, {}, 'close')}\\n`;\n }\n const parts = [];\n parts.push(`${this.identation() + this.formatTag(node.name, node.attributes, 'open')}\\n`);\n this.stack.push(node.name);\n for (const child of node.children) {\n parts.push(this.serializeNode(child));\n }\n this.stack.pop();\n parts.push(`${this.identation() + this.formatTag(node.name, {}, 'close')}\\n`);\n return parts.join('');\n }\n\n private identation(): string {\n return this.stack.map(_ => ' ').join('');\n }\n\n private formatTag(\n name: string,\n attributes: Record | undefined,\n state: 'open' | 'close' | 'self-closing',\n ): string {\n // eslint-disable-next-line ts/restrict-template-expressions\n return `<${state === 'close' ? '/' : ''}${name}${Object.entries(attributes ?? {}).map(attr => ` ${attr[0]}=\"${this.escape(attr[1])}\"`)}${state === 'self-closing' ? '/' : ''}>`;\n }\n\n private escape(text: string): string {\n return text.replaceAll(/[\"&'<>]/gu, <(substring: string) => string> ((char: '\"' | '&' | '\\'' | '<' | '>') => {\n switch (char) {\n case '<': return '<';\n case '>': return '>';\n case '&': return '&';\n case '\\'': return ''';\n case '\"': return '"';\n }\n }));\n }\n}\n\nexport interface IXmlNode {\n name: string;\n attributes?: Record;\n children?: (IXmlNode[]) | string;\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport type {\n IActionContext,\n IQueryOperationResultBindings,\n IQueryOperationResultQuads,\n} from '@comunica/types';\nimport { wrap } from 'asynciterator';\nimport { Readable } from 'readable-stream';\nimport type { ActionObserverHttp } from './ActionObserverHttp';\n\nconst process: NodeJS.Process = require('process/');\n\n/**\n * Serializes SPARQL results for testing and debugging.\n */\nexport class ActorQueryResultSerializeStats extends ActorQueryResultSerializeFixedMediaTypes {\n public readonly httpObserver: ActionObserverHttp;\n\n /* eslint-disable max-len */\n /**\n * @param args -\n * \\ @defaultNested {{ \"stats\": 0.5 }} mediaTypePriorities\n * \\ @defaultNested {{ \"stats\": \"https://comunica.linkeddatafragments.org/#results_stats\" }} mediaTypeFormats\n * \\ @defaultNested { a } httpObserver\n */\n public constructor(args: IActorQueryResultSerializeStatsArgs) {\n super(args);\n }\n /* eslint-enable max-len */\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (![ 'bindings', 'quads' ].includes(action.type)) {\n throw new Error('This actor can only handle bindings streams or quad streams.');\n }\n return true;\n }\n\n public pushHeader(data: Readable): void {\n const header: string = [ 'Result', 'Delay (ms)', 'HTTP requests',\n ].join(',');\n data.push(`${header}\\n`);\n }\n\n public createStat(startTime: number, result: number): string {\n const row: string = [ result, this.delay(startTime), this.httpObserver.requests,\n ].join(',');\n return `${row}\\n`;\n }\n\n public createFooter(startTime: number): string {\n const footer: string = [ 'TOTAL', this.delay(startTime), this.httpObserver.requests,\n ].join(',');\n return `${footer}\\n`;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string, _context: IActionContext):\n Promise {\n const data = new Readable();\n\n const resultStream = action.type === 'bindings' ?\n ( action).bindingsStream :\n ( action).quadStream;\n\n const startTime = this.now();\n let result = 1;\n\n function* end(cb: () => string): Generator {\n yield cb();\n }\n const stream = wrap(resultStream)\n .map(() => this.createStat(startTime, result++))\n .append(wrap(end(() => this.createFooter(startTime))));\n\n this.pushHeader(data);\n data.wrap( stream);\n\n return { data };\n }\n\n /* istanbul ignore next */\n public now(): number {\n // TODO: remove when we will drop support of Node 14\n if (typeof performance === 'undefined') {\n const time: [number, number] = process.hrtime();\n return time[0] * 1_000 + (time[1] / 1_000_000);\n }\n return performance.now();\n }\n\n public delay(startTime: number): number {\n return this.now() - startTime;\n }\n}\n\nexport interface IActorQueryResultSerializeStatsArgs extends IActorQueryResultSerializeFixedMediaTypesArgs {\n httpObserver: ActionObserverHttp;\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport type {\n Bindings,\n IActionContext,\n IQueryOperationResultBindings,\n IQueryOperationResultQuads,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport { termToString } from 'rdf-string';\nimport { getTerms, QUAD_TERM_NAMES } from 'rdf-terms';\nimport { Readable } from 'readable-stream';\n\nconst DF = new DataFactory();\nconst QUAD_TERM_NAMES_VARS = QUAD_TERM_NAMES.map(name => DF.variable(name));\n\n/**\n * A comunica Table Sparql Serialize Actor.\n */\nexport class ActorQueryResultSerializeTable extends ActorQueryResultSerializeFixedMediaTypes\n implements IActorQueryResultSerializeTableArgs {\n public readonly columnWidth: number;\n public readonly padding: string;\n\n /**\n * @param args -\n * \\ @defaultNested {{ \"table\": 0.6 }} mediaTypePriorities\n * \\ @defaultNested {{ \"table\": \"https://comunica.linkeddatafragments.org/#results_table\" }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeTableArgs) {\n super(args);\n this.padding = ActorQueryResultSerializeTable.repeat(' ', this.columnWidth);\n }\n\n public static repeat(str: string, count: number): string {\n return str.repeat(count);\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize, _context: IActionContext): Promise {\n if (![ 'bindings', 'quads' ].includes(action.type)) {\n throw new Error('This actor can only handle bindings or quad streams.');\n }\n return true;\n }\n\n public termToString(term: RDF.Term): string {\n return term.termType === 'Quad' ? termToString(term) : term.value;\n }\n\n public pad(str: string): string {\n if (str.length <= this.columnWidth) {\n return str + this.padding.slice(str.length);\n }\n return `${str.slice(0, this.columnWidth - 1)}…`;\n }\n\n public pushHeader(data: Readable, labels: RDF.Variable[]): void {\n const header: string = labels.map(label => this.pad(label.value)).join(' ');\n data.push(`${header}\\n${ActorQueryResultSerializeTable.repeat('-', header.length)}\\n`);\n }\n\n public createRow(labels: RDF.Variable[], bindings: Bindings): string {\n return `${labels\n .map(label => bindings.has(label) ? this.termToString(bindings.get(label)!) : '')\n .map(label => this.pad(label))\n .join(' ')}\\n`;\n }\n\n public async runHandle(action: IActionSparqlSerialize, _mediaType: string, _context: IActionContext):\n Promise {\n const data = new Readable();\n\n let resultStream: NodeJS.EventEmitter;\n if (action.type === 'bindings') {\n resultStream = (action).bindingsStream.map(\n bindings => this.createRow(labels, bindings),\n );\n const labels = (await (action).metadata()).variables;\n this.pushHeader(data, labels);\n } else {\n resultStream = (action).quadStream.map(quad => `${getTerms(quad).map(term => this.pad(this.termToString(term))).join(' ')}\\n`);\n this.pushHeader(data, QUAD_TERM_NAMES_VARS);\n }\n data.wrap( resultStream);\n\n return { data };\n }\n}\n\nexport interface IActorQueryResultSerializeTableArgs extends IActorQueryResultSerializeFixedMediaTypesArgs {\n /**\n * The table column width in number of characters\n * @range {integer}\n * @default {50}\n */\n columnWidth: number;\n}\n","import type {\n IActionSparqlSerialize,\n IActorQueryResultSerializeFixedMediaTypesArgs,\n IActorQueryResultSerializeOutput,\n} from '@comunica/bus-query-result-serialize';\nimport { ActorQueryResultSerializeFixedMediaTypes } from '@comunica/bus-query-result-serialize';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport { ActionContext } from '@comunica/core';\nimport type { IQueryOperationResultBindings, BindingsStream, IActionContext } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { Readable } from 'readable-stream';\nimport type { IConverterSettings, ISchema } from 'sparqljson-to-tree';\nimport { Converter } from 'sparqljson-to-tree';\n\n/**\n * A comunica Tree Query Result Serialize Actor.\n */\nexport class ActorQueryResultSerializeTree extends ActorQueryResultSerializeFixedMediaTypes\n implements IActorQueryResultSerializeFixedMediaTypesArgs {\n /**\n * @param args -\n * \\ @defaultNested {{ \"tree\": 0.5 }} mediaTypePriorities\n * \\ @defaultNested {{ \"tree\": \"https://comunica.linkeddatafragments.org/#results_tree\" }} mediaTypeFormats\n */\n public constructor(args: IActorQueryResultSerializeFixedMediaTypesArgs) {\n super(args);\n }\n\n /**\n *\n * @param {BindingsStream} bindingsStream\n * @param context\n * @param {IConverterSettings} converterSettings\n * @return {Promise}\n */\n public static async bindingsStreamToGraphQl(\n bindingsStream: BindingsStream,\n context: IActionContext | Record | undefined,\n converterSettings?: IConverterSettings,\n ): Promise {\n const actionContext: IActionContext = ActionContext.ensureActionContext(context);\n const converter: Converter = new Converter(converterSettings);\n const schema: ISchema = {\n singularizeVariables: actionContext.get(KeysInitQuery.graphqlSingularizeVariables) ?? {},\n };\n\n return converter.bindingsToTree(await bindingsStream.map((bindings: RDF.Bindings) =>\n Object.fromEntries([ ...bindings ]\n .map(([ key, value ]) => [ key.value, value ]))).toArray(), schema);\n }\n\n public override async testHandleChecked(action: IActionSparqlSerialize): Promise {\n if (action.type !== 'bindings') {\n throw new Error('This actor can only handle bindings streams.');\n }\n return true;\n }\n\n public async runHandle(\n action: IActionSparqlSerialize,\n _mediaType: string,\n ): Promise {\n const data = new Readable();\n data._read = () => {\n data._read = () => { /* Do nothing */ };\n ActorQueryResultSerializeTree.bindingsStreamToGraphQl(\n ( action).bindingsStream,\n action.context,\n { materializeRdfJsTerms: true },\n )\n .then((result: any) => {\n data.push(JSON.stringify(result, null, ' '));\n data.push(null);\n })\n .catch(error => data.emit('error', error));\n };\n\n return { data };\n }\n}\n","import { QuerySourceRdfJs } from '@comunica/actor-query-source-identify-rdfjs';\nimport { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type {\n IActionQuerySourceIdentifyHypermedia,\n IActorQuerySourceIdentifyHypermediaOutput,\n IActorQuerySourceIdentifyHypermediaArgs,\n IActorQuerySourceIdentifyHypermediaTest,\n} from '@comunica/bus-query-source-identify-hypermedia';\nimport { ActorQuerySourceIdentifyHypermedia } from '@comunica/bus-query-source-identify-hypermedia';\nimport { storeStream } from 'rdf-store-stream';\n\n/**\n * A comunica None Query Source Identify Hypermedia Actor.\n */\nexport class ActorQuerySourceIdentifyHypermediaNone extends ActorQuerySourceIdentifyHypermedia {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQuerySourceIdentifyHypermediaNoneArgs) {\n super(args, 'file');\n }\n\n public async testMetadata(\n _action: IActionQuerySourceIdentifyHypermedia,\n ): Promise {\n return { filterFactor: 0 };\n }\n\n public async run(action: IActionQuerySourceIdentifyHypermedia): Promise {\n this.logInfo(action.context, `Identified as file source: ${action.url}`);\n const source = new QuerySourceRdfJs(\n await storeStream(action.quads),\n await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context),\n );\n source.toString = () => `QuerySourceRdfJs(${action.url})`;\n source.referenceValue = action.url;\n return { source };\n }\n}\n\nexport interface IActorQuerySourceIdentifyHypermediaNoneArgs extends IActorQuerySourceIdentifyHypermediaArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorDereferenceRdf } from '@comunica/bus-dereference-rdf';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type {\n IActionQuerySourceIdentifyHypermedia,\n IActorQuerySourceIdentifyHypermediaOutput,\n IActorQuerySourceIdentifyHypermediaArgs,\n IActorQuerySourceIdentifyHypermediaTest,\n} from '@comunica/bus-query-source-identify-hypermedia';\nimport {\n ActorQuerySourceIdentifyHypermedia,\n} from '@comunica/bus-query-source-identify-hypermedia';\nimport type { MediatorRdfMetadata } from '@comunica/bus-rdf-metadata';\nimport type { MediatorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActionContext } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { QuerySourceQpf } from './QuerySourceQpf';\n\n/**\n * A comunica QPF Query Source Identify Hypermedia Actor.\n */\nexport class ActorQuerySourceIdentifyHypermediaQpf extends ActorQuerySourceIdentifyHypermedia\n implements IActorQuerySourceIdentifyHypermediaQpfArgs {\n public readonly mediatorMetadata: MediatorRdfMetadata;\n public readonly mediatorMetadataExtract: MediatorRdfMetadataExtract;\n public readonly mediatorDereferenceRdf: MediatorDereferenceRdf;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n public readonly subjectUri: string;\n public readonly predicateUri: string;\n public readonly objectUri: string;\n public readonly graphUri?: string;\n public constructor(args: IActorQuerySourceIdentifyHypermediaQpfArgs) {\n super(args, 'qpf');\n }\n\n public override async test(\n action: IActionQuerySourceIdentifyHypermedia,\n ): Promise {\n if (action.forceSourceType && (action.forceSourceType !== 'qpf' && action.forceSourceType !== 'brtpf')) {\n throw new Error(`Actor ${this.name} is not able to handle source type ${action.forceSourceType}.`);\n }\n return this.testMetadata(action);\n }\n\n public async testMetadata(\n action: IActionQuerySourceIdentifyHypermedia,\n ): Promise {\n const { searchForm } = await this.createSource(\n action.url,\n action.metadata,\n action.context,\n action.forceSourceType === 'brtpf',\n );\n if (action.handledDatasets && action.handledDatasets[searchForm.dataset]) {\n throw new Error(`Actor ${this.name} can only be applied for the first page of a QPF dataset.`);\n }\n return { filterFactor: 1 };\n }\n\n /**\n * Look for the search form\n * @param {IActionRdfResolveHypermedia} action the metadata to look for the form.\n * @return {Promise} A promise resolving to a hypermedia form.\n */\n public async run(action: IActionQuerySourceIdentifyHypermedia): Promise {\n this.logInfo(action.context, `Identified as qpf source: ${action.url}`);\n const source = await this.createSource(\n action.url,\n action.metadata,\n action.context,\n action.forceSourceType === 'brtpf',\n action.quads,\n );\n return { source, dataset: source.searchForm.dataset };\n }\n\n protected async createSource(\n url: string,\n metadata: Record,\n context: IActionContext,\n bindingsRestricted: boolean,\n quads?: RDF.Stream,\n ): Promise {\n return new QuerySourceQpf(\n this.mediatorMetadata,\n this.mediatorMetadataExtract,\n this.mediatorDereferenceRdf,\n await BindingsFactory.create(this.mediatorMergeBindingsContext, context),\n this.subjectUri,\n this.predicateUri,\n this.objectUri,\n this.graphUri,\n url,\n metadata,\n bindingsRestricted,\n quads,\n );\n }\n}\n\nexport interface IActorQuerySourceIdentifyHypermediaQpfArgs extends IActorQuerySourceIdentifyHypermediaArgs {\n /**\n * The metadata mediator\n */\n mediatorMetadata: MediatorRdfMetadata;\n /**\n * The metadata extract mediator\n */\n mediatorMetadataExtract: MediatorRdfMetadataExtract;\n /**\n * The RDF dereference mediator\n */\n mediatorDereferenceRdf: MediatorDereferenceRdf;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n /**\n * The URI that should be interpreted as subject URI\n * @default {http://www.w3.org/1999/02/22-rdf-syntax-ns#subject}\n */\n subjectUri: string;\n /**\n * The URI that should be interpreted as predicate URI\n * @default {http://www.w3.org/1999/02/22-rdf-syntax-ns#predicate}\n */\n predicateUri: string;\n /**\n * The URI that should be interpreted as object URI\n * @default {http://www.w3.org/1999/02/22-rdf-syntax-ns#object}\n */\n objectUri: string;\n /**\n * The URI that should be interpreted as graph URI\n * @default {http://www.w3.org/ns/sparql-service-description#graph}\n */\n graphUri?: string;\n}\n","import type { ISearchForm } from '@comunica/actor-rdf-metadata-extract-hydra-controls';\nimport type { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorDereferenceRdf } from '@comunica/bus-dereference-rdf';\nimport { filterMatchingQuotedQuads, quadsToBindings } from '@comunica/bus-query-source-identify';\nimport type { MediatorRdfMetadata, IActorRdfMetadataOutput } from '@comunica/bus-rdf-metadata';\nimport type { MediatorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type {\n IQuerySource,\n BindingsStream,\n IActionContext,\n FragmentSelectorShape,\n IQueryBindingsOptions,\n MetadataBindings,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { ArrayIterator, TransformIterator, wrap } from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport { termToString } from 'rdf-string';\nimport { termToString as termToStringTtl } from 'rdf-string-ttl';\nimport {\n everyTermsNested,\n mapTerms,\n matchPattern,\n} from 'rdf-terms';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\n\nconst AF = new Factory();\nconst DF = new DataFactory();\n\nexport class QuerySourceQpf implements IQuerySource {\n protected static readonly SELECTOR_SHAPE: FragmentSelectorShape = {\n type: 'operation',\n operation: {\n operationType: 'pattern',\n pattern: AF.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o'), DF.variable('g')),\n },\n variablesOptional: [\n DF.variable('s'),\n DF.variable('p'),\n DF.variable('o'),\n DF.variable('g'),\n ],\n };\n\n protected static readonly SELECTOR_SHAPE_BR: FragmentSelectorShape = {\n type: 'operation',\n operation: {\n operationType: 'pattern',\n pattern: AF.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o'), DF.variable('g')),\n },\n variablesOptional: [\n DF.variable('s'),\n DF.variable('p'),\n DF.variable('o'),\n DF.variable('g'),\n ],\n filterBindings: true,\n };\n\n public readonly searchForm: ISearchForm;\n\n private readonly mediatorMetadata: MediatorRdfMetadata;\n private readonly mediatorMetadataExtract: MediatorRdfMetadataExtract;\n private readonly mediatorDereferenceRdf: MediatorDereferenceRdf;\n private readonly bindingsFactory: BindingsFactory;\n\n public readonly referenceValue: string;\n private readonly subjectUri: string;\n private readonly predicateUri: string;\n private readonly objectUri: string;\n private readonly graphUri?: string;\n private readonly url: string;\n private readonly defaultGraph?: RDF.NamedNode;\n private readonly bindingsRestricted: boolean;\n private readonly cachedQuads: Record>;\n\n public constructor(\n mediatorMetadata: MediatorRdfMetadata,\n mediatorMetadataExtract: MediatorRdfMetadataExtract,\n mediatorDereferenceRdf: MediatorDereferenceRdf,\n bindingsFactory: BindingsFactory,\n subjectUri: string,\n predicateUri: string,\n objectUri: string,\n graphUri: string | undefined,\n url: string,\n metadata: Record,\n bindingsRestricted: boolean,\n initialQuads?: RDF.Stream,\n ) {\n this.referenceValue = url;\n this.mediatorMetadata = mediatorMetadata;\n this.mediatorMetadataExtract = mediatorMetadataExtract;\n this.mediatorDereferenceRdf = mediatorDereferenceRdf;\n this.bindingsFactory = bindingsFactory;\n this.subjectUri = subjectUri;\n this.predicateUri = predicateUri;\n this.objectUri = objectUri;\n this.graphUri = graphUri;\n this.url = url;\n this.bindingsRestricted = bindingsRestricted;\n this.cachedQuads = {};\n const searchForm = this.getSearchForm(metadata);\n if (!searchForm) {\n throw new Error('Illegal state: found no TPF/QPF search form anymore in metadata.');\n }\n this.searchForm = searchForm;\n this.defaultGraph = metadata.defaultGraph ? DF.namedNode(metadata.defaultGraph) : undefined;\n if (initialQuads) {\n let wrappedQuads: AsyncIterator = wrap(initialQuads);\n if (this.defaultGraph) {\n wrappedQuads = this.reverseMapQuadsToDefaultGraph(wrappedQuads);\n }\n wrappedQuads.setProperty('metadata', metadata);\n this.cacheQuads(wrappedQuads, DF.variable(''), DF.variable(''), DF.variable(''), DF.variable(''));\n }\n }\n\n public async getSelectorShape(): Promise {\n return this.bindingsRestricted ? QuerySourceQpf.SELECTOR_SHAPE_BR : QuerySourceQpf.SELECTOR_SHAPE;\n }\n\n public queryBindings(\n operation: Algebra.Operation,\n context: IActionContext,\n options?: IQueryBindingsOptions,\n ): BindingsStream {\n if (operation.type !== 'pattern') {\n throw new Error(`Attempted to pass non-pattern operation '${operation.type}' to QuerySourceQpf`);\n }\n\n const unionDefaultGraph = Boolean(context.get(KeysQueryOperation.unionDefaultGraph));\n\n // Create an async iterator from the matched quad stream\n let it = this.match(\n operation.subject,\n operation.predicate,\n operation.object,\n operation.graph,\n unionDefaultGraph,\n context,\n options,\n );\n\n it = filterMatchingQuotedQuads(operation, it);\n return quadsToBindings(it, operation, this.bindingsFactory, unionDefaultGraph);\n }\n\n /**\n * Get a first QPF search form.\n * @param {{[p: string]: any}} metadata A metadata object.\n * @return {ISearchForm} A search form, or null if none could be found.\n */\n public getSearchForm(metadata: Record): ISearchForm | undefined {\n if (!metadata.searchForms || !metadata.searchForms.values) {\n return;\n }\n\n // Find a quad pattern or triple pattern search form\n const { searchForms } = metadata;\n for (const searchForm of searchForms.values) {\n if (this.graphUri &&\n this.subjectUri in searchForm.mappings &&\n this.predicateUri in searchForm.mappings &&\n this.objectUri in searchForm.mappings &&\n this.graphUri in searchForm.mappings &&\n Object.keys(searchForm.mappings).length === 4) {\n return searchForm;\n }\n if (this.subjectUri in searchForm.mappings &&\n this.predicateUri in searchForm.mappings &&\n this.objectUri in searchForm.mappings &&\n Object.keys(searchForm.mappings).length === 3) {\n return searchForm;\n }\n }\n }\n\n /**\n * Create a QPF fragment IRI for the given quad pattern.\n * @param {ISearchForm} searchForm A search form.\n * @param {Term} subject A term.\n * @param {Term} predicate A term.\n * @param {Term} object A term.\n * @param {Term} graph A term.\n * @return {string} A URI.\n */\n public createFragmentUri(\n searchForm: ISearchForm,\n subject: RDF.Term,\n predicate: RDF.Term,\n object: RDF.Term,\n graph: RDF.Term,\n ): string {\n const entries: Record = {};\n const input = [\n { uri: this.subjectUri, term: subject },\n { uri: this.predicateUri, term: predicate },\n { uri: this.objectUri, term: object },\n { uri: this.graphUri, term: graph },\n ];\n for (const entry of input) {\n // If bindingsRestricted, also pass variables, so the server knows how to bind values.\n if (entry.uri && (this.bindingsRestricted || (entry.term.termType !== 'Variable' &&\n (entry.term.termType !== 'Quad' || everyTermsNested(entry.term, value => value.termType !== 'Variable'))))) {\n entries[entry.uri] = termToString(entry.term);\n }\n }\n return searchForm.getUri(entries);\n }\n\n protected match(\n subject: RDF.Term,\n predicate: RDF.Term,\n object: RDF.Term,\n graph: RDF.Term,\n unionDefaultGraph: boolean,\n context: IActionContext,\n options?: IQueryBindingsOptions,\n ): AsyncIterator {\n // If we are querying the default graph,\n // and the source has an overridden value for the default graph (such as QPF can provide),\n // we override the graph parameter with that value.\n let modifiedGraph = false;\n if (graph.termType === 'DefaultGraph') {\n if (this.defaultGraph) {\n modifiedGraph = true;\n graph = this.defaultGraph;\n } else if (Object.keys(this.searchForm.mappings).length === 4 && !this.defaultGraph) {\n // If the sd:defaultGraph is not declared on a QPF endpoint\n if (unionDefaultGraph) {\n // With union-default-graph, take union of graphs.\n graph = DF.variable('g');\n } else {\n // Without union-default-graph, the default graph must be empty.\n const quads = new ArrayIterator([], { autoStart: false });\n quads.setProperty('metadata', {\n requestTime: 0,\n cardinality: { type: 'exact', value: 0 },\n first: null,\n next: null,\n last: null,\n canContainUndefs: false,\n });\n return quads;\n }\n } else if (Object.keys(this.searchForm.mappings).length === 3) {\n // If have a TPF endpoint, set graph to variable so we could get the cached triples\n graph = DF.variable('g');\n }\n }\n\n // Try to emit from cache (skip if filtering bindings)\n if (!options?.filterBindings) {\n const cached = this.getCachedQuads(subject, predicate, object, graph);\n if (cached) {\n return cached;\n }\n }\n\n // Kickstart metadata collection, because the quads iterator is lazy\n // eslint-disable-next-line ts/no-this-alias\n const self = this;\n let quads: AsyncIterator;\n const dataStreamPromise = (async function() {\n let url: string = self.createFragmentUri(self.searchForm, subject, predicate, object, graph);\n\n // Handle bindings-restricted interfaces\n if (options?.filterBindings) {\n url = await self.getBindingsRestrictedLink(\n subject,\n predicate,\n object,\n graph,\n url,\n options.filterBindings,\n );\n }\n\n const dereferenceRdfOutput = await self.mediatorDereferenceRdf.mediate({ context, url });\n url = dereferenceRdfOutput.url;\n\n // Determine the metadata\n const rdfMetadataOuput: IActorRdfMetadataOutput = await self.mediatorMetadata.mediate(\n { context, url, quads: dereferenceRdfOutput.data, triples: dereferenceRdfOutput.metadata?.triples },\n );\n\n // Extract the metadata\n const { metadata } = await self.mediatorMetadataExtract\n .mediate({\n context,\n url,\n metadata: rdfMetadataOuput.metadata,\n requestTime: dereferenceRdfOutput.requestTime,\n });\n quads!.setProperty('metadata', { ...metadata, canContainUndefs: false, subsetOf: self.url });\n\n // While we could resolve this before metadata extraction, we do it afterwards to ensure metadata emission\n // before the end event is emitted.\n return rdfMetadataOuput.data;\n })();\n\n quads = new TransformIterator(async() => {\n const dataStream = await dataStreamPromise;\n\n // The server is free to send any data in its response (such as metadata),\n // including quads that do not match the given matter.\n // Therefore, we have to filter away all non-matching quads here.\n const actualDefaultGraph = DF.defaultGraph();\n let filteredOutput: AsyncIterator = wrap(dataStream)\n .transform({\n filter(quad: RDF.Quad) {\n if (matchPattern(quad, subject, predicate, object, graph)) {\n return true;\n }\n // Special case: if we are querying in the default graph, and we had an overridden default graph,\n // also accept that incoming triples may be defined in the actual default graph\n return modifiedGraph && matchPattern(quad, subject, predicate, object, actualDefaultGraph);\n },\n });\n if (modifiedGraph || graph.termType === 'Variable') {\n // Reverse-map the overridden default graph back to the actual default graph\n filteredOutput = this.reverseMapQuadsToDefaultGraph(filteredOutput);\n }\n\n return filteredOutput;\n }, { autoStart: false });\n\n // Skip cache if filtering bindings\n if (options?.filterBindings) {\n return quads;\n }\n\n this.cacheQuads(quads, subject, predicate, object, graph);\n return this.getCachedQuads(subject, predicate, object, graph)!;\n }\n\n /**\n * If we add bindings for brTPF, append it to the URL.\n * We have to hardcode this because brTPF doesn't expose a URL template for passing bindings.\n * @param subject The subject.\n * @param predicate The predicate.\n * @param object The object.\n * @param graph The graph.\n * @param url The original QPF URL.\n * @param filterBindings The bindings to restrict with.\n * @param filterBindings.bindings The bindings stream.\n * @param filterBindings.metadata The bindings metadata.\n * @protected\n */\n public async getBindingsRestrictedLink(\n subject: RDF.Term,\n predicate: RDF.Term,\n object: RDF.Term,\n graph: RDF.Term,\n url: string,\n filterBindings: { bindings: BindingsStream; metadata: MetadataBindings },\n ): Promise {\n // Determine values\n const values: string[] = [];\n for (const binding of await filterBindings.bindings.toArray()) {\n const value: string[] = [ '(' ];\n for (const variable of filterBindings.metadata.variables) {\n const term = binding.get(variable);\n value.push(term ? termToStringTtl(term) : 'UNDEF');\n value.push(' ');\n }\n value.push(')');\n values.push(value.join(''));\n }\n\n if (values.length === 0) {\n // This is a hack to force an empty result page,\n // because the brTPF server returns a server error when passing 0 bindings.\n values.push('()');\n }\n\n // Append to URL (brTPF uses the SPARQL VALUES syntax, without the VALUES prefix)\n const valuesUrl = encodeURIComponent(`(${filterBindings.metadata.variables.map(variable => `?${variable.value}`).join(' ')}) { ${values.join(' ')} }`);\n return `${url}&values=${valuesUrl}`;\n }\n\n protected reverseMapQuadsToDefaultGraph(quads: AsyncIterator): AsyncIterator {\n const actualDefaultGraph = DF.defaultGraph();\n return quads.map(\n quad => mapTerms(\n quad,\n (term, key) => key === 'graph' && term.equals(this.defaultGraph) ? actualDefaultGraph : term,\n ),\n );\n }\n\n public getPatternId(subject: RDF.Term, predicate: RDF.Term, object: RDF.Term, graph: RDF.Term): string {\n return JSON.stringify({\n s: subject.termType === 'Variable' ? '' : _termToString(subject),\n p: predicate.termType === 'Variable' ? '' : _termToString(predicate),\n o: object.termType === 'Variable' ? '' : _termToString(object),\n g: graph.termType === 'Variable' ? '' : _termToString(graph),\n });\n }\n\n protected cacheQuads(\n quads: AsyncIterator,\n subject: RDF.Term,\n predicate: RDF.Term,\n object: RDF.Term,\n graph: RDF.Term,\n ): void {\n const patternId = this.getPatternId(subject, predicate, object, graph);\n this.cachedQuads[patternId] = quads.clone();\n }\n\n protected getCachedQuads(subject: RDF.Term, predicate: RDF.Term, object: RDF.Term, graph: RDF.Term):\n AsyncIterator | undefined {\n const patternId = this.getPatternId(subject, predicate, object, graph);\n const quads = this.cachedQuads[patternId];\n if (quads) {\n return quads.clone();\n }\n }\n\n public queryQuads(\n _operation: Algebra.Operation,\n _context: IActionContext,\n ): AsyncIterator {\n throw new Error('queryQuads is not implemented in QuerySourceQpf');\n }\n\n public queryBoolean(\n _operation: Algebra.Ask,\n _context: IActionContext,\n ): Promise {\n throw new Error('queryBoolean is not implemented in QuerySourceQpf');\n }\n\n public queryVoid(\n _operation: Algebra.Update,\n _context: IActionContext,\n ): Promise {\n throw new Error('queryVoid is not implemented in QuerySourceQpf');\n }\n}\n\nfunction _termToString(term: RDF.Term): string {\n return term.termType === 'DefaultGraph' ?\n // Any character that cannot be present in a URL will do\n '|' :\n termToString(term);\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorHttp } from '@comunica/bus-http';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type {\n IActionQuerySourceIdentifyHypermedia,\n IActorQuerySourceIdentifyHypermediaOutput,\n IActorQuerySourceIdentifyHypermediaArgs,\n IActorQuerySourceIdentifyHypermediaTest,\n} from '@comunica/bus-query-source-identify-hypermedia';\nimport {\n ActorQuerySourceIdentifyHypermedia,\n} from '@comunica/bus-query-source-identify-hypermedia';\nimport { QuerySourceSparql } from './QuerySourceSparql';\n\n/**\n * A comunica SPARQL Query Source Identify Hypermedia Actor.\n */\nexport class ActorQuerySourceIdentifyHypermediaSparql extends ActorQuerySourceIdentifyHypermedia {\n public readonly mediatorHttp: MediatorHttp;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n public readonly checkUrlSuffix: boolean;\n public readonly forceHttpGet: boolean;\n public readonly cacheSize: number;\n public readonly bindMethod: BindMethod;\n public readonly countTimeout: number;\n\n public constructor(args: IActorQuerySourceIdentifyHypermediaSparqlArgs) {\n super(args, 'sparql');\n }\n\n public async testMetadata(\n action: IActionQuerySourceIdentifyHypermedia,\n ): Promise {\n if (!action.forceSourceType && !action.metadata.sparqlService &&\n !(this.checkUrlSuffix && action.url.endsWith('/sparql'))) {\n throw new Error(`Actor ${this.name} could not detect a SPARQL service description or URL ending on /sparql.`);\n }\n return { filterFactor: 1 };\n }\n\n public async run(action: IActionQuerySourceIdentifyHypermedia): Promise {\n this.logInfo(action.context, `Identified ${action.url} as sparql source with service URL: ${action.metadata.sparqlService || action.url}`);\n const source = new QuerySourceSparql(\n action.forceSourceType ? action.url : action.metadata.sparqlService || action.url,\n action.context,\n this.mediatorHttp,\n this.bindMethod,\n await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context),\n this.forceHttpGet,\n this.cacheSize,\n this.countTimeout,\n );\n return { source };\n }\n}\n\nexport interface IActorQuerySourceIdentifyHypermediaSparqlArgs extends IActorQuerySourceIdentifyHypermediaArgs {\n /**\n * The HTTP mediator\n */\n mediatorHttp: MediatorHttp;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n /**\n * If URLs ending with '/sparql' should also be considered SPARQL endpoints.\n * @default {true}\n */\n checkUrlSuffix: boolean;\n /**\n * If non-update queries should be sent via HTTP GET instead of POST\n * @default {false}\n */\n forceHttpGet: boolean;\n /**\n * The cache size for COUNT queries.\n * @range {integer}\n * @default {1024}\n */\n cacheSize?: number;\n /**\n * The query operation for communicating bindings.\n * @default {values}\n */\n bindMethod: BindMethod;\n /**\n * Timeout in ms of how long count queries are allowed to take.\n * If the timeout is reached, an infinity cardinality is returned.\n * @default {3000}\n */\n countTimeout: number;\n}\n\nexport type BindMethod = 'values' | 'union' | 'filter';\n","import type { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorHttp } from '@comunica/bus-http';\nimport { KeysInitQuery } from '@comunica/context-entries';\nimport { Actor } from '@comunica/core';\nimport type {\n IQuerySource,\n BindingsStream,\n IActionContext,\n FragmentSelectorShape,\n Bindings,\n MetadataBindings,\n IQueryBindingsOptions,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { wrap, TransformIterator } from 'asynciterator';\nimport { SparqlEndpointFetcher } from 'fetch-sparql-endpoint';\nimport { LRUCache } from 'lru-cache';\nimport { DataFactory } from 'rdf-data-factory';\nimport { Algebra, Factory, toSparql, Util } from 'sparqlalgebrajs';\nimport type { BindMethod } from './ActorQuerySourceIdentifyHypermediaSparql';\n\nconst AF = new Factory();\nconst DF = new DataFactory();\nconst VAR_COUNT = DF.variable('count');\nconst COUNT_INFINITY: RDF.QueryResultCardinality = { type: 'estimate', value: Number.POSITIVE_INFINITY };\n\nexport class QuerySourceSparql implements IQuerySource {\n protected static readonly SELECTOR_SHAPE: FragmentSelectorShape = {\n type: 'disjunction',\n children: [\n {\n type: 'operation',\n operation: { operationType: 'type', type: Algebra.types.PROJECT },\n joinBindings: true,\n },\n {\n type: 'operation',\n operation: { operationType: 'type', type: Algebra.types.CONSTRUCT },\n },\n {\n type: 'operation',\n operation: { operationType: 'type', type: Algebra.types.DESCRIBE },\n },\n {\n type: 'operation',\n operation: { operationType: 'type', type: Algebra.types.ASK },\n },\n {\n type: 'operation',\n operation: { operationType: 'type', type: Algebra.types.COMPOSITE_UPDATE },\n },\n ],\n };\n\n public readonly referenceValue: string;\n private readonly url: string;\n private readonly context: IActionContext;\n private readonly mediatorHttp: MediatorHttp;\n private readonly bindMethod: BindMethod;\n private readonly countTimeout: number;\n private readonly bindingsFactory: BindingsFactory;\n\n private readonly endpointFetcher: SparqlEndpointFetcher;\n private readonly cache: LRUCache | undefined;\n\n private lastSourceContext: IActionContext | undefined;\n\n public constructor(\n url: string,\n context: IActionContext,\n mediatorHttp: MediatorHttp,\n bindMethod: BindMethod,\n bindingsFactory: BindingsFactory,\n forceHttpGet: boolean,\n cacheSize: number,\n countTimeout: number,\n ) {\n this.referenceValue = url;\n this.url = url;\n this.context = context;\n this.mediatorHttp = mediatorHttp;\n this.bindMethod = bindMethod;\n this.bindingsFactory = bindingsFactory;\n this.endpointFetcher = new SparqlEndpointFetcher({\n method: forceHttpGet ? 'GET' : 'POST',\n fetch: (input: Request | string, init?: RequestInit) => this.mediatorHttp.mediate(\n { input, init, context: this.lastSourceContext! },\n ),\n prefixVariableQuestionMark: true,\n });\n this.cache = cacheSize > 0 ?\n new LRUCache({ max: cacheSize }) :\n undefined;\n this.countTimeout = countTimeout;\n }\n\n public async getSelectorShape(): Promise {\n return QuerySourceSparql.SELECTOR_SHAPE;\n }\n\n public queryBindings(\n operationIn: Algebra.Operation,\n context: IActionContext,\n options?: IQueryBindingsOptions,\n ): BindingsStream {\n // If bindings are passed, modify the operations\n let operationPromise: Promise;\n if (options?.joinBindings) {\n operationPromise = QuerySourceSparql.addBindingsToOperation(this.bindMethod, operationIn, options.joinBindings);\n } else {\n operationPromise = Promise.resolve(operationIn);\n }\n\n const bindings: BindingsStream = new TransformIterator(async() => {\n // Prepare queries\n const operation = await operationPromise;\n const variables: RDF.Variable[] = Util.inScopeVariables(operation);\n const queryString = context.get(KeysInitQuery.queryString);\n const selectQuery: string = !options?.joinBindings && queryString ?\n queryString :\n QuerySourceSparql.operationToSelectQuery(operation, variables);\n const canContainUndefs = QuerySourceSparql.operationCanContainUndefs(operation);\n\n return this.queryBindingsRemote(this.url, selectQuery, variables, context, canContainUndefs);\n }, { autoStart: false });\n this.attachMetadata(bindings, context, operationPromise);\n\n return bindings;\n }\n\n public queryQuads(operation: Algebra.Operation, context: IActionContext): AsyncIterator {\n this.lastSourceContext = this.context.merge(context);\n const rawStream = this.endpointFetcher.fetchTriples(\n this.url,\n context.get(KeysInitQuery.queryString) ?? QuerySourceSparql.operationToQuery(operation),\n );\n this.lastSourceContext = undefined;\n const quads = wrap(rawStream, { autoStart: false, maxBufferSize: Number.POSITIVE_INFINITY });\n this.attachMetadata(quads, context, Promise.resolve(operation.input));\n return quads;\n }\n\n public queryBoolean(operation: Algebra.Ask, context: IActionContext): Promise {\n this.lastSourceContext = this.context.merge(context);\n const promise = this.endpointFetcher.fetchAsk(\n this.url,\n context.get(KeysInitQuery.queryString) ?? QuerySourceSparql.operationToQuery(operation),\n );\n this.lastSourceContext = undefined;\n return promise;\n }\n\n public queryVoid(operation: Algebra.Update, context: IActionContext): Promise {\n this.lastSourceContext = this.context.merge(context);\n const promise = this.endpointFetcher.fetchUpdate(\n this.url,\n context.get(KeysInitQuery.queryString) ?? QuerySourceSparql.operationToQuery(operation),\n );\n this.lastSourceContext = undefined;\n return promise;\n }\n\n protected attachMetadata(\n target: AsyncIterator,\n context: IActionContext,\n operationPromise: Promise,\n ): void {\n // Emit metadata containing the estimated count\n let variablesCount: RDF.Variable[] = [];\n let canContainUndefs = false;\n // eslint-disable-next-line no-async-promise-executor,ts/no-misused-promises\n new Promise(async(resolve, reject) => {\n // Prepare queries\n let countQuery: string;\n try {\n const operation = await operationPromise;\n variablesCount = Util.inScopeVariables(operation);\n countQuery = QuerySourceSparql.operationToCountQuery(operation);\n canContainUndefs = QuerySourceSparql.operationCanContainUndefs(operation);\n\n const cachedCardinality = this.cache?.get(countQuery);\n if (cachedCardinality !== undefined) {\n return resolve(cachedCardinality);\n }\n\n const timeoutHandler = setTimeout(() => resolve(COUNT_INFINITY), this.countTimeout);\n const bindingsStream: BindingsStream = await this\n .queryBindingsRemote(this.url, countQuery, [ VAR_COUNT ], context, false);\n bindingsStream.on('data', (bindings: Bindings) => {\n clearTimeout(timeoutHandler);\n const count = bindings.get(VAR_COUNT);\n const cardinality: RDF.QueryResultCardinality = { type: 'estimate', value: Number.POSITIVE_INFINITY };\n if (count) {\n const cardinalityValue: number = Number.parseInt(count.value, 10);\n if (!Number.isNaN(cardinalityValue)) {\n cardinality.type = 'exact';\n cardinality.value = cardinalityValue;\n this.cache?.set(countQuery, cardinality);\n }\n }\n return resolve(cardinality);\n });\n bindingsStream.on('error', () => {\n clearTimeout(timeoutHandler);\n resolve(COUNT_INFINITY);\n });\n bindingsStream.on('end', () => {\n clearTimeout(timeoutHandler);\n resolve(COUNT_INFINITY);\n });\n } catch (error: unknown) {\n return reject(error);\n }\n })\n .then(cardinality => target.setProperty('metadata', {\n cardinality,\n canContainUndefs,\n variables: variablesCount,\n }))\n .catch(() => target.setProperty('metadata', {\n cardinality: COUNT_INFINITY,\n canContainUndefs,\n variables: variablesCount,\n }));\n }\n\n /**\n * Create an operation that includes the bindings from the given bindings stream.\n * @param bindMethod A method for adding bindings to an operation.\n * @param operation The operation to bind to.\n * @param addBindings The bindings to add.\n * @param addBindings.bindings The bindings stream.\n * @param addBindings.metadata The bindings metadata.\n */\n public static async addBindingsToOperation(\n bindMethod: BindMethod,\n operation: Algebra.Operation,\n addBindings: { bindings: BindingsStream; metadata: MetadataBindings },\n ): Promise {\n const bindings = await addBindings.bindings.toArray();\n\n switch (bindMethod) {\n case 'values':\n return AF.createJoin([\n AF.createValues(\n addBindings.metadata.variables,\n bindings.map(binding => Object.fromEntries([ ...binding ]\n .map(([ key, value ]) => [ `?${key.value}`, value ]))),\n ),\n operation,\n ], false);\n case 'union': { throw new Error('Not implemented yet: \"union\" case'); }\n case 'filter': { throw new Error('Not implemented yet: \"filter\" case'); }\n }\n }\n\n /**\n * Convert an operation to a select query for this pattern.\n * @param {Algebra.Operation} operation A query operation.\n * @param {RDF.Variable[]} variables The variables in scope for the operation.\n * @return {string} A select query string.\n */\n public static operationToSelectQuery(operation: Algebra.Operation, variables: RDF.Variable[]): string {\n return QuerySourceSparql.operationToQuery(AF.createProject(operation, variables));\n }\n\n /**\n * Convert an operation to a count query for the number of matching triples for this pattern.\n * @param {Algebra.Operation} operation A query operation.\n * @return {string} A count query string.\n */\n public static operationToCountQuery(operation: Algebra.Operation): string {\n return QuerySourceSparql.operationToQuery(AF.createProject(\n AF.createExtend(\n AF.createGroup(\n operation,\n [],\n [ AF.createBoundAggregate(\n DF.variable('var0'),\n 'count',\n AF.createWildcardExpression(),\n false,\n ) ],\n ),\n DF.variable('count'),\n AF.createTermExpression(DF.variable('var0')),\n ),\n [ DF.variable('count') ],\n ));\n }\n\n /**\n * Convert an operation to a query for this pattern.\n * @param {Algebra.Operation} operation A query operation.\n * @return {string} A query string.\n */\n public static operationToQuery(operation: Algebra.Operation): string {\n return toSparql(operation, { sparqlStar: true });\n }\n\n /**\n * Check if the given operation may produce undefined values.\n * @param operation\n */\n public static operationCanContainUndefs(operation: Algebra.Operation): boolean {\n let canContainUndefs = false;\n Util.recurseOperation(operation, {\n leftjoin(): boolean {\n canContainUndefs = true;\n return false;\n },\n values(values: Algebra.Values): boolean {\n canContainUndefs = values.bindings.some(bindings => values.variables.some(variable => !(`?${variable.value}` in bindings)));\n return false;\n },\n union(union: Algebra.Union): boolean {\n // Determine variables in scope of the union branches\n const scopedVariables = union.input\n .map(Util.inScopeVariables)\n .map(variables => variables.map(v => v.value))\n .map(variables => variables.sort((a, b) => a.localeCompare(b)))\n .map(variables => variables.join(','));\n\n // If not all scoped variables in union branches are equal, then we definitely can have undefs\n if (!scopedVariables.every(val => val === scopedVariables[0])) {\n canContainUndefs = true;\n return false;\n }\n\n return true;\n },\n });\n return canContainUndefs;\n }\n\n /**\n * Send a SPARQL query to a SPARQL endpoint and retrieve its bindings as a stream.\n * @param {string} endpoint A SPARQL endpoint URL.\n * @param {string} query A SPARQL query string.\n * @param {RDF.Variable[]} variables The expected variables.\n * @param {IActionContext} context The source context.\n * @param canContainUndefs If the operation may contain undefined variables.\n * @return {BindingsStream} A stream of bindings.\n */\n public async queryBindingsRemote(\n endpoint: string,\n query: string,\n variables: RDF.Variable[],\n context: IActionContext,\n canContainUndefs: boolean,\n ): Promise {\n this.lastSourceContext = this.context.merge(context);\n const rawStream = await this.endpointFetcher.fetchBindings(endpoint, query);\n this.lastSourceContext = undefined;\n\n const it = wrap(rawStream, { autoStart: false, maxBufferSize: Number.POSITIVE_INFINITY })\n .map((rawData: Record) => this.bindingsFactory.bindings(variables\n .map((variable) => {\n const value = rawData[`?${variable.value}`];\n if (!canContainUndefs && !value) {\n Actor.getContextLogger(this.context)?.warn(`The endpoint ${endpoint} failed to provide a binding for ${variable.value}.`);\n }\n return <[RDF.Variable, RDF.Term]> [ variable, value ];\n })\n .filter(([ _, v ]) => Boolean(v))));\n return it;\n }\n\n public toString(): string {\n return `QuerySourceSparql(${this.url})`;\n }\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorDereferenceRdf } from '@comunica/bus-dereference-rdf';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport { ActorQuerySourceIdentify } from '@comunica/bus-query-source-identify';\nimport type {\n IActionQuerySourceIdentify,\n IActorQuerySourceIdentifyOutput,\n IActorQuerySourceIdentifyArgs,\n} from '@comunica/bus-query-source-identify';\nimport type { MediatorQuerySourceIdentifyHypermedia } from '@comunica/bus-query-source-identify-hypermedia';\nimport type { MediatorRdfMetadata } from '@comunica/bus-rdf-metadata';\nimport type { MediatorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { MediatorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { MediatorRdfResolveHypermediaLinks } from '@comunica/bus-rdf-resolve-hypermedia-links';\nimport type { MediatorRdfResolveHypermediaLinksQueue } from '@comunica/bus-rdf-resolve-hypermedia-links-queue';\nimport { KeysQuerySourceIdentify } from '@comunica/context-entries';\nimport { ActionContext } from '@comunica/core';\nimport type { IActorTest } from '@comunica/core';\nimport { QuerySourceHypermedia } from './QuerySourceHypermedia';\n\n/**\n * A comunica Hypermedia Query Source Identify Actor.\n */\nexport class ActorQuerySourceIdentifyHypermedia extends ActorQuerySourceIdentify {\n public readonly mediatorDereferenceRdf: MediatorDereferenceRdf;\n public readonly mediatorMetadata: MediatorRdfMetadata;\n public readonly mediatorMetadataExtract: MediatorRdfMetadataExtract;\n public readonly mediatorMetadataAccumulate: MediatorRdfMetadataAccumulate;\n public readonly mediatorQuerySourceIdentifyHypermedia: MediatorQuerySourceIdentifyHypermedia;\n public readonly mediatorRdfResolveHypermediaLinks: MediatorRdfResolveHypermediaLinks;\n public readonly mediatorRdfResolveHypermediaLinksQueue: MediatorRdfResolveHypermediaLinksQueue;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n public readonly cacheSize: number;\n public readonly maxIterators: number;\n public readonly aggregateTraversalStore: boolean;\n\n public constructor(args: IActorQuerySourceIdentifyHypermediaArgs) {\n super(args);\n }\n\n public async test(action: IActionQuerySourceIdentify): Promise {\n if (typeof action.querySourceUnidentified.value !== 'string') {\n throw new TypeError(`${this.name} requires a single query source with a URL value to be present in the context.`);\n }\n return true;\n }\n\n public async run(action: IActionQuerySourceIdentify): Promise {\n return {\n querySource: {\n source: new QuerySourceHypermedia(\n this.cacheSize,\n action.querySourceUnidentified.value,\n action.querySourceUnidentified.type,\n this.maxIterators,\n this.aggregateTraversalStore &&\n Boolean(action.querySourceUnidentified.context?.get(KeysQuerySourceIdentify.traverse)),\n {\n mediatorMetadata: this.mediatorMetadata,\n mediatorMetadataExtract: this.mediatorMetadataExtract,\n mediatorMetadataAccumulate: this.mediatorMetadataAccumulate,\n mediatorDereferenceRdf: this.mediatorDereferenceRdf,\n mediatorQuerySourceIdentifyHypermedia: this.mediatorQuerySourceIdentifyHypermedia,\n mediatorRdfResolveHypermediaLinks: this.mediatorRdfResolveHypermediaLinks,\n mediatorRdfResolveHypermediaLinksQueue: this.mediatorRdfResolveHypermediaLinksQueue,\n },\n warningMessage => this.logWarn(action.context, warningMessage),\n await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context),\n ),\n context: action.querySourceUnidentified.context ?? new ActionContext(),\n },\n };\n }\n}\n\nexport interface IActorQuerySourceIdentifyHypermediaArgs extends IActorQuerySourceIdentifyArgs {\n /**\n * The maximum number of entries in the LRU cache, set to 0 to disable.\n * @range {integer}\n * @default {100}\n */\n cacheSize: number;\n /**\n * The maximum number of links that can be followed in parallel.\n * @default {64}\n */\n maxIterators: number;\n /**\n * If all discovered quads across all links from a traversal source should be indexed in an aggregated store,\n * to speed up later calls.\n * This only applies to sources annotated with KeysQuerySourceIdentify.traverse.\n * @default {true}\n */\n aggregateTraversalStore: boolean;\n /**\n * The RDF dereference mediator\n */\n mediatorDereferenceRdf: MediatorDereferenceRdf;\n /**\n * The metadata mediator\n */\n mediatorMetadata: MediatorRdfMetadata;\n /**\n * The metadata extract mediator\n */\n mediatorMetadataExtract: MediatorRdfMetadataExtract;\n /**\n * The metadata accumulate mediator\n */\n mediatorMetadataAccumulate?: MediatorRdfMetadataAccumulate;\n /**\n * The hypermedia resolve mediator\n */\n mediatorQuerySourceIdentifyHypermedia: MediatorQuerySourceIdentifyHypermedia;\n /**\n * The hypermedia links resolve mediator\n */\n mediatorRdfResolveHypermediaLinks: MediatorRdfResolveHypermediaLinks;\n /**\n * The hypermedia links queue resolve mediator\n */\n mediatorRdfResolveHypermediaLinksQueue: MediatorRdfResolveHypermediaLinksQueue;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { ILink } from '@comunica/bus-rdf-resolve-hypermedia-links';\nimport type { ILinkQueue } from '@comunica/bus-rdf-resolve-hypermedia-links-queue';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { IQuerySource, IActionContext, MetadataBindings, IQueryBindingsOptions } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator, BufferedIteratorOptions } from 'asynciterator';\nimport { BufferedIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\n\nexport abstract class LinkedRdfSourcesAsyncRdfIterator extends BufferedIterator {\n protected readonly operation: Algebra.Operation;\n protected readonly queryBindingsOptions: IQueryBindingsOptions | undefined;\n protected readonly context: IActionContext;\n\n private readonly cacheSize: number;\n protected readonly firstUrl: string;\n private readonly maxIterators: number;\n private readonly sourceStateGetter: SourceStateGetter;\n\n protected started = false;\n private readonly currentIterators: AsyncIterator[] = [];\n private iteratorsPendingCreation = 0;\n private iteratorsPendingTermination = 0;\n // eslint-disable-next-line unicorn/no-useless-undefined\n private accumulatedMetadata: Promise = Promise.resolve(undefined);\n private preflightMetadata: Promise | undefined;\n\n public constructor(\n cacheSize: number,\n operation: Algebra.Operation,\n queryBindingsOptions: IQueryBindingsOptions | undefined,\n context: IActionContext,\n firstUrl: string,\n maxIterators: number,\n sourceStateGetter: SourceStateGetter,\n options?: BufferedIteratorOptions,\n ) {\n super({ autoStart: false, ...options });\n this._reading = false;\n this.cacheSize = cacheSize;\n this.operation = operation;\n this.queryBindingsOptions = queryBindingsOptions;\n this.context = context;\n this.firstUrl = firstUrl;\n this.maxIterators = maxIterators;\n this.sourceStateGetter = sourceStateGetter;\n\n if (this.maxIterators <= 0) {\n throw new Error(`LinkedRdfSourcesAsyncRdfIterator.maxIterators must be larger than zero, but got ${this.maxIterators}`);\n }\n }\n\n /**\n * Start filling the buffer of this iterator.\n */\n public kickstart(): void {\n if (!this.started) {\n this._fillBufferAsync();\n }\n }\n\n public override getProperty

(propertyName: string, callback?: (value: P) => void): P | undefined {\n if (propertyName === 'metadata' && !this.started) {\n // If the iterator has not started yet, forcefully fetch the metadata from the source without starting the\n // iterator. This way, we keep the iterator lazy.\n if (!this.preflightMetadata) {\n this.preflightMetadata = new Promise((resolve, reject) => {\n this.sourceStateGetter({ url: this.firstUrl }, {})\n .then((sourceState) => {\n // Don't pass query options, as we don't want to consume any passed iterators\n const bindingsStream = sourceState.source.queryBindings(this.operation, this.context);\n bindingsStream.getProperty('metadata', (metadata: MetadataBindings) => {\n metadata.state = new MetadataValidationState();\n bindingsStream.destroy();\n this.accumulateMetadata(sourceState.metadata, metadata)\n .then((accumulatedMetadata) => {\n // Also merge fields that were not explicitly accumulated\n const returnMetadata = { ...sourceState.metadata, ...metadata, ...accumulatedMetadata };\n resolve(returnMetadata);\n })\n .catch(() => {\n resolve({\n ...sourceState.metadata,\n state: new MetadataValidationState(),\n });\n });\n });\n })\n .catch(reject);\n });\n }\n this.preflightMetadata\n .then(metadata => this.setProperty('metadata', metadata))\n .catch(() => {\n // Ignore errors\n });\n }\n return super.getProperty(propertyName, callback);\n }\n\n protected override _end(destroy?: boolean): void {\n // Close all running iterators\n for (const it of this.currentIterators) {\n it.destroy();\n }\n\n super._end(destroy);\n }\n\n /**\n * Get the internal link queue.\n * The returned instance must always be the same.\n */\n public abstract getLinkQueue(): Promise;\n\n /**\n * Determine the links to be followed from the current source given its metadata.\n * @param metadata The metadata of a source.\n */\n protected abstract getSourceLinks(metadata: Record): Promise;\n\n public override _read(count: number, done: () => void): void {\n if (this.started) {\n // Read from all current iterators\n for (const iterator of this.currentIterators) {\n while (count > 0) {\n const read = iterator.read();\n if (read === null) {\n break;\n } else {\n count--;\n this._push(read);\n }\n }\n if (count <= 0) {\n break;\n }\n }\n\n // Schedule new iterators if needed\n if (count >= 0 && this.canStartNewIterator()) {\n // We can safely ignore skip catching the error, since we are guaranteed to have\n // successfully got the source for this.firstUrl before.\n // eslint-disable-next-line ts/no-floating-promises\n this.sourceStateGetter({ url: this.firstUrl }, {})\n .then((sourceState) => {\n this.startIteratorsForNextUrls(sourceState.handledDatasets, false);\n done();\n });\n } else {\n done();\n }\n } else {\n // The first time this is called, prepare the first source\n this.started = true;\n\n // Await the source to be set, and start the source iterator\n this.sourceStateGetter({ url: this.firstUrl }, {})\n .then((sourceState) => {\n this.startIterator(sourceState);\n done();\n })\n // Destroy should be async because it can be called before it is listened to\n .catch(error => setTimeout(() => this.destroy(error)));\n }\n }\n\n protected canStartNewIterator(): boolean {\n return (this.currentIterators.length + this.iteratorsPendingCreation + this.iteratorsPendingTermination) <\n this.maxIterators && (!this.canStartNewIteratorConsiderReadable() || !this.readable);\n }\n\n protected canStartNewIteratorConsiderReadable(): boolean {\n return true;\n }\n\n protected areIteratorsRunning(): boolean {\n return (this.currentIterators.length + this.iteratorsPendingCreation + this.iteratorsPendingTermination) > 0;\n }\n\n /**\n * Append the fields from appendingMetadata into accumulatedMetadata.\n * @param accumulatedMetadata The fields to append to.\n * @param appendingMetadata The fields to append.\n * @protected\n */\n protected abstract accumulateMetadata(\n accumulatedMetadata: MetadataBindings,\n appendingMetadata: MetadataBindings,\n ): Promise;\n\n /**\n * Start a new iterator for the given source.\n * Once the iterator is done, it will either determine a new source, or it will close the linked iterator.\n * @param {ISourceState} startSource The start source state.\n */\n protected startIterator(startSource: ISourceState): void {\n // Delegate the quad pattern query to the given source\n try {\n const iterator = startSource.source.queryBindings(this.operation, this.context, this.queryBindingsOptions);\n this.currentIterators.push(iterator);\n let receivedEndEvent = false;\n let receivedMetadata = false;\n\n // Attach readers to the newly created iterator\n (iterator)._destination = this;\n iterator.on('error', (error: Error) => this.destroy(error));\n iterator.on('readable', () => this._fillBuffer());\n iterator.on('end', () => {\n this.currentIterators.splice(this.currentIterators.indexOf(iterator), 1);\n\n // Indicate that this iterator still needs to flush its next-links.\n // Without this, the linked iterator could sometimes be closed before next-links are obtained.\n receivedEndEvent = true;\n if (!receivedMetadata) {\n this.iteratorsPendingTermination++;\n }\n\n // If the metadata was already received, handle the next URL in the queue\n if (receivedMetadata) {\n this.startIteratorsForNextUrls(startSource.handledDatasets, true);\n }\n });\n\n // Listen for the metadata of the source\n // The metadata property is guaranteed to be set\n iterator.getProperty('metadata', (metadata: MetadataBindings) => {\n // Accumulate the metadata object\n this.accumulatedMetadata = this.accumulatedMetadata\n .then(previousMetadata => (async() => {\n if (!previousMetadata) {\n previousMetadata = startSource.metadata;\n }\n return this.accumulateMetadata(previousMetadata, metadata);\n })()\n .then((accumulatedMetadata) => {\n // Also merge fields that were not explicitly accumulated\n const returnMetadata = { ...startSource.metadata, ...metadata, ...accumulatedMetadata };\n\n // Create new metadata state\n returnMetadata.state = new MetadataValidationState();\n\n // Emit metadata, and invalidate any metadata that was set before\n this.updateMetadata(returnMetadata);\n\n // Invalidate any preflight metadata\n if (this.preflightMetadata) {\n this.preflightMetadata\n .then(metadataIn => metadataIn.state.invalidate())\n .catch(() => {\n // Ignore errors\n });\n }\n\n // Determine next urls, which will eventually become a next-next source.\n this.getSourceLinks(returnMetadata)\n .then((nextUrls: ILink[]) => Promise.all(nextUrls))\n .then(async(nextUrls: ILink[]) => {\n // Append all next URLs to our queue\n const linkQueue = await this.getLinkQueue();\n for (const nextUrl of nextUrls) {\n linkQueue.push(nextUrl, startSource.link);\n }\n\n receivedMetadata = true;\n if (receivedEndEvent) {\n this.iteratorsPendingTermination--;\n }\n\n this.startIteratorsForNextUrls(startSource.handledDatasets, true);\n }).catch(error => this.destroy(error));\n\n return returnMetadata;\n })).catch((error) => {\n this.destroy(error);\n return {};\n });\n });\n } catch (syncError: unknown) {\n this.destroy( syncError);\n }\n }\n\n protected updateMetadata(metadataNew: MetadataBindings): void {\n const metadataToInvalidate = this.getProperty('metadata');\n this.setProperty('metadata', metadataNew);\n metadataToInvalidate?.state.invalidate();\n }\n\n protected isRunning(): boolean {\n return !this.done;\n }\n\n /**\n * Check if a next URL is in the queue.\n * If yes, start a new iterator.\n * If no, close this iterator.\n * @param handledDatasets\n * @param canClose\n */\n protected startIteratorsForNextUrls(handledDatasets: Record, canClose: boolean): void {\n this.getLinkQueue()\n .then((linkQueue) => {\n // Create as many new iterators as possible\n while (this.canStartNewIterator() && this.isRunning()) {\n const nextLink = linkQueue.pop();\n if (nextLink) {\n this.iteratorsPendingCreation++;\n this.sourceStateGetter(nextLink, handledDatasets)\n .then((nextSourceState) => {\n this.iteratorsPendingCreation--;\n this.startIterator(nextSourceState);\n })\n .catch(error => this.emit('error', error));\n } else {\n break;\n }\n }\n\n // Close, only if no other iterators are still running\n if (canClose && this.isCloseable(linkQueue, true)) {\n this.close();\n }\n })\n .catch(error => this.destroy(error));\n }\n\n protected isCloseable(linkQueue: ILinkQueue, _requireQueueEmpty: boolean): boolean {\n return linkQueue.isEmpty() && !this.areIteratorsRunning();\n }\n}\n\n/**\n * The current state of a source.\n * This is needed for following links within a source.\n */\nexport interface ISourceState {\n /**\n * The link to this source.\n */\n link: ILink;\n /**\n * A source.\n */\n source: IQuerySource;\n /**\n * The source's initial metadata.\n */\n metadata: MetadataBindings;\n /**\n * All dataset identifiers that have been passed for this source.\n */\n handledDatasets: Record;\n}\n\nexport type SourceStateGetter = (link: ILink, handledDatasets: Record) => Promise;\n","import type { MediatorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { ILink, MediatorRdfResolveHypermediaLinks } from '@comunica/bus-rdf-resolve-hypermedia-links';\nimport type {\n ILinkQueue,\n MediatorRdfResolveHypermediaLinksQueue,\n} from '@comunica/bus-rdf-resolve-hypermedia-links-queue';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type { IActionContext, IAggregatedStore, IQueryBindingsOptions, MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { DataFactory } from 'rdf-data-factory';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\nimport type { SourceStateGetter, ISourceState } from './LinkedRdfSourcesAsyncRdfIterator';\nimport { LinkedRdfSourcesAsyncRdfIterator } from './LinkedRdfSourcesAsyncRdfIterator';\n\nconst DF = new DataFactory();\nconst AF = new Factory();\n\n/**\n * An quad iterator that can iterate over consecutive RDF sources\n * that are determined using the rdf-resolve-hypermedia-links bus.\n *\n * @see LinkedRdfSourcesAsyncRdfIterator\n */\nexport class MediatedLinkedRdfSourcesAsyncRdfIterator extends LinkedRdfSourcesAsyncRdfIterator {\n private readonly mediatorMetadataAccumulate: MediatorRdfMetadataAccumulate;\n private readonly mediatorRdfResolveHypermediaLinks: MediatorRdfResolveHypermediaLinks;\n private readonly mediatorRdfResolveHypermediaLinksQueue: MediatorRdfResolveHypermediaLinksQueue;\n private readonly forceSourceType?: string;\n private readonly handledUrls: Record;\n private readonly aggregatedStore: IAggregatedStore | undefined;\n private linkQueue: Promise | undefined;\n private wasForcefullyClosed = false;\n\n public constructor(\n cacheSize: number,\n operation: Algebra.Operation,\n queryBindingsOptions: IQueryBindingsOptions | undefined,\n context: IActionContext,\n forceSourceType: string | undefined,\n firstUrl: string,\n maxIterators: number,\n sourceStateGetter: SourceStateGetter,\n aggregatedStore: IAggregatedStore | undefined,\n mediatorMetadataAccumulate: MediatorRdfMetadataAccumulate,\n mediatorRdfResolveHypermediaLinks: MediatorRdfResolveHypermediaLinks,\n mediatorRdfResolveHypermediaLinksQueue: MediatorRdfResolveHypermediaLinksQueue,\n ) {\n super(\n cacheSize,\n operation,\n queryBindingsOptions,\n context,\n firstUrl,\n maxIterators,\n sourceStateGetter,\n // Buffersize must be infinite for an aggregated store because it must keep filling until there are no more\n // derived iterators in the aggregated store.\n aggregatedStore ? { maxBufferSize: Number.POSITIVE_INFINITY } : undefined,\n );\n this.forceSourceType = forceSourceType;\n this.mediatorMetadataAccumulate = mediatorMetadataAccumulate;\n this.mediatorRdfResolveHypermediaLinks = mediatorRdfResolveHypermediaLinks;\n this.mediatorRdfResolveHypermediaLinksQueue = mediatorRdfResolveHypermediaLinksQueue;\n this.handledUrls = { [firstUrl]: true };\n this.aggregatedStore = aggregatedStore;\n }\n\n // Mark the aggregated store as ended once we trigger the closing or destroying of this iterator.\n // We don't override _end, because that would mean that we have to wait\n // until the buffer of this iterator must be fully consumed, which will not always be the case.\n\n public override close(): void {\n if (!this.aggregatedStore) {\n super.close();\n return;\n }\n\n this.getLinkQueue()\n .then((linkQueue) => {\n if (this.isCloseable(linkQueue, false)) {\n // Wait a tick before ending the aggregatedStore, to ensure that pending match() calls to it have started.\n if (this.aggregatedStore) {\n setTimeout(() => this.aggregatedStore!.end());\n }\n super.close();\n } else {\n this.wasForcefullyClosed = true;\n }\n })\n .catch(error => super.destroy(error));\n }\n\n public override destroy(cause?: Error): void {\n if (!this.aggregatedStore) {\n super.destroy(cause);\n return;\n }\n\n this.getLinkQueue()\n .then((linkQueue) => {\n if (cause ?? this.isCloseable(linkQueue, false)) {\n // Wait a tick before ending the aggregatedStore, to ensure that pending match() calls to it have started.\n if (this.aggregatedStore) {\n setTimeout(() => this.aggregatedStore!.end());\n }\n super.destroy(cause);\n } else {\n this.wasForcefullyClosed = true;\n }\n })\n .catch(error => super.destroy(error));\n }\n\n protected override isCloseable(linkQueue: ILinkQueue, requireQueueEmpty: boolean): boolean {\n return (requireQueueEmpty ? linkQueue.isEmpty() : this.wasForcefullyClosed || linkQueue.isEmpty()) &&\n !this.areIteratorsRunning();\n }\n\n protected override canStartNewIterator(): boolean {\n // Also allow sub-iterators to be started if the aggregated store has at least one running iterator.\n // We need this because there are cases where these running iterators will be consumed before this linked iterator.\n return (!this.wasForcefullyClosed &&\n // eslint-disable-next-line ts/prefer-nullish-coalescing\n (this.aggregatedStore && this.aggregatedStore.hasRunningIterators())) || super.canStartNewIterator();\n }\n\n protected override canStartNewIteratorConsiderReadable(): boolean {\n return !this.aggregatedStore;\n }\n\n protected override isRunning(): boolean {\n // Same as above\n // eslint-disable-next-line ts/prefer-nullish-coalescing\n return (this.aggregatedStore && this.aggregatedStore.hasRunningIterators()) || !this.done;\n }\n\n public getLinkQueue(): Promise {\n if (!this.linkQueue) {\n this.linkQueue = this.mediatorRdfResolveHypermediaLinksQueue\n .mediate({ firstUrl: this.firstUrl, context: this.context })\n .then(result => result.linkQueue);\n }\n return this.linkQueue;\n }\n\n protected async getSourceLinks(metadata: Record): Promise {\n try {\n const { links } = await this.mediatorRdfResolveHypermediaLinks.mediate({ context: this.context, metadata });\n\n // Filter URLs to avoid cyclic next-page loops\n return links.filter((link) => {\n if (this.handledUrls[link.url]) {\n return false;\n }\n this.handledUrls[link.url] = true;\n return true;\n });\n } catch {\n // No next URLs may be available, for example when we've reached the end of a Hydra next-page sequence.\n return [];\n }\n }\n\n protected override startIterator(startSource: ISourceState): void {\n if (this.aggregatedStore && !this.aggregatedStore.containedSources.has(startSource.link.url)) {\n // A source that has been cached due to earlier query executions may not be part of the aggregated store yet.\n // In that case, we add all quads from that source to the aggregated store.\n this.aggregatedStore?.containedSources.add(startSource.link.url);\n const stream = startSource.source.queryBindings(\n AF.createPattern(\n DF.variable('s'),\n DF.variable('p'),\n DF.variable('o'),\n DF.variable('g'),\n ),\n this.context.set(KeysQueryOperation.unionDefaultGraph, true),\n ).map(bindings => DF.quad(\n bindings.get('s')!,\n bindings.get('p')!,\n bindings.get('o')!,\n bindings.get('g'),\n ));\n this.aggregatedStore.import( stream)\n .on('end', () => {\n super.startIterator(startSource);\n });\n } else {\n super.startIterator(startSource);\n }\n }\n\n public async accumulateMetadata(\n accumulatedMetadata: MetadataBindings,\n appendingMetadata: MetadataBindings,\n ): Promise {\n return (await this.mediatorMetadataAccumulate.mediate({\n mode: 'append',\n accumulatedMetadata,\n appendingMetadata,\n context: this.context,\n })).metadata;\n }\n\n protected override updateMetadata(metadataNew: MetadataBindings): void {\n super.updateMetadata(metadataNew);\n this.aggregatedStore?.setBaseMetadata(metadataNew, true);\n }\n}\n","import { QuerySourceRdfJs } from '@comunica/actor-query-source-identify-rdfjs';\nimport type { BindingsFactory } from '@comunica/bindings-factory';\nimport type { IActorDereferenceRdfOutput, MediatorDereferenceRdf } from '@comunica/bus-dereference-rdf';\nimport type { MediatorQuerySourceIdentifyHypermedia } from '@comunica/bus-query-source-identify-hypermedia';\nimport type { IActorRdfMetadataOutput, MediatorRdfMetadata } from '@comunica/bus-rdf-metadata';\nimport type { MediatorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { MediatorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { ILink, MediatorRdfResolveHypermediaLinks } from '@comunica/bus-rdf-resolve-hypermedia-links';\nimport type { MediatorRdfResolveHypermediaLinksQueue } from '@comunica/bus-rdf-resolve-hypermedia-links-queue';\nimport { KeysQuerySourceIdentify } from '@comunica/context-entries';\nimport type {\n BindingsStream,\n FragmentSelectorShape,\n IActionContext,\n IAggregatedStore,\n IQueryBindingsOptions,\n IQuerySource,\n MetadataBindings,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { TransformIterator } from 'asynciterator';\nimport { LRUCache } from 'lru-cache';\nimport { Readable } from 'readable-stream';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport type { ISourceState } from './LinkedRdfSourcesAsyncRdfIterator';\nimport { MediatedLinkedRdfSourcesAsyncRdfIterator } from './MediatedLinkedRdfSourcesAsyncRdfIterator';\nimport { StreamingStoreMetadata } from './StreamingStoreMetadata';\n\nexport class QuerySourceHypermedia implements IQuerySource {\n public readonly referenceValue: string;\n public readonly firstUrl: string;\n public readonly forceSourceType?: string;\n public readonly aggregateStore: boolean;\n public readonly mediators: IMediatorArgs;\n public readonly logWarning: (warningMessage: string) => void;\n public readonly bindingsFactory: BindingsFactory;\n\n /**\n * A cache for source URLs to source states.\n */\n public sourcesState: LRUCache>;\n\n private readonly cacheSize: number;\n private readonly maxIterators: number;\n\n public constructor(\n cacheSize: number,\n firstUrl: string,\n forceSourceType: string | undefined,\n maxIterators: number,\n aggregateStore: boolean,\n mediators: IMediatorArgs,\n logWarning: (warningMessage: string) => void,\n bindingsFactory: BindingsFactory,\n ) {\n this.referenceValue = firstUrl;\n this.cacheSize = cacheSize;\n this.firstUrl = firstUrl;\n this.forceSourceType = forceSourceType;\n this.maxIterators = maxIterators;\n this.mediators = mediators;\n this.aggregateStore = aggregateStore;\n this.logWarning = logWarning;\n this.bindingsFactory = bindingsFactory;\n this.sourcesState = new LRUCache>({ max: this.cacheSize });\n }\n\n public async getSelectorShape(context: IActionContext): Promise {\n const source = await this.getSourceCached({ url: this.firstUrl }, {}, context, this.getAggregateStore(context));\n return source.source.getSelectorShape(context);\n }\n\n public queryBindings(\n operation: Algebra.Operation,\n context: IActionContext,\n options?: IQueryBindingsOptions,\n ): BindingsStream {\n // Optimized match with aggregated store if enabled and started.\n const aggregatedStore: IAggregatedStore | undefined = this.getAggregateStore(context);\n if (aggregatedStore && operation.type === 'pattern' && aggregatedStore.started) {\n return new QuerySourceRdfJs(aggregatedStore, this.bindingsFactory).queryBindings(operation, context);\n }\n\n // Initialize the sources state on first call\n if (this.sourcesState.size === 0) {\n this.getSourceCached({ url: this.firstUrl }, {}, context, aggregatedStore)\n .catch(error => it.destroy(error));\n }\n\n const it: MediatedLinkedRdfSourcesAsyncRdfIterator = new MediatedLinkedRdfSourcesAsyncRdfIterator(\n this.cacheSize,\n operation,\n options,\n context,\n this.forceSourceType,\n this.firstUrl,\n this.maxIterators,\n (link, handledDatasets) => this.getSourceCached(link, handledDatasets, context, aggregatedStore),\n aggregatedStore,\n this.mediators.mediatorMetadataAccumulate,\n this.mediators.mediatorRdfResolveHypermediaLinks,\n this.mediators.mediatorRdfResolveHypermediaLinksQueue,\n );\n if (aggregatedStore) {\n aggregatedStore.started = true;\n\n // Kickstart this iterator when derived iterators are created from the aggregatedStore,\n // otherwise the traversal process will not start if this iterator is not the first one to be consumed.\n const listener = (): void => it.kickstart();\n aggregatedStore.addIteratorCreatedListener(listener);\n it.on('end', () => aggregatedStore.removeIteratorCreatedListener(listener));\n }\n\n return it;\n }\n\n public queryQuads(operation: Algebra.Operation, context: IActionContext): AsyncIterator {\n return new TransformIterator(async() => {\n const source = await this.getSourceCached({ url: this.firstUrl }, {}, context, this.getAggregateStore(context));\n return source.source.queryQuads(operation, context);\n });\n }\n\n public async queryBoolean(operation: Algebra.Ask, context: IActionContext): Promise {\n const source = await this.getSourceCached({ url: this.firstUrl }, {}, context, this.getAggregateStore(context));\n return await source.source.queryBoolean(operation, context);\n }\n\n public async queryVoid(operation: Algebra.Update, context: IActionContext): Promise {\n const source = await this.getSourceCached({ url: this.firstUrl }, {}, context, this.getAggregateStore(context));\n return await source.source.queryVoid(operation, context);\n }\n\n /**\n * Resolve a source for the given URL.\n * @param link A source link.\n * @param handledDatasets A hash of dataset identifiers that have already been handled.\n * @param context The action context.\n * @param aggregatedStore An optional aggregated store.\n */\n public async getSource(\n link: ILink,\n handledDatasets: Record,\n context: IActionContext,\n aggregatedStore: IAggregatedStore | undefined,\n ): Promise {\n // Include context entries from link\n if (link.context) {\n context = context.merge(link.context);\n }\n\n // Get the RDF representation of the given document\n let url = link.url;\n let quads: RDF.Stream;\n let metadata: Record;\n try {\n const dereferenceRdfOutput: IActorDereferenceRdfOutput = await this.mediators.mediatorDereferenceRdf\n .mediate({ context, url });\n url = dereferenceRdfOutput.url;\n\n // Determine the metadata\n const rdfMetadataOutput: IActorRdfMetadataOutput = await this.mediators.mediatorMetadata.mediate(\n { context, url, quads: dereferenceRdfOutput.data, triples: dereferenceRdfOutput.metadata?.triples },\n );\n\n rdfMetadataOutput.data.on('error', () => {\n // Silence errors in the data stream,\n // as they will be emitted again in the metadata stream,\n // and will result in a promise rejection anyways.\n // If we don't do this, we end up with an unhandled error message\n });\n\n metadata = (await this.mediators.mediatorMetadataExtract.mediate({\n context,\n url,\n // The problem appears to be conflicting metadata keys here\n metadata: rdfMetadataOutput.metadata,\n headers: dereferenceRdfOutput.headers,\n requestTime: dereferenceRdfOutput.requestTime,\n })).metadata;\n quads = rdfMetadataOutput.data;\n\n // Optionally filter the resulting data\n if (link.transform) {\n quads = await link.transform(quads);\n }\n } catch (error: unknown) {\n // Make sure that dereference errors are only emitted once an actor really needs the read quads\n // This for example allows SPARQL endpoints that error on service description fetching to still be source-forcible\n quads = new Readable();\n quads.read = () => {\n setTimeout(() => quads.emit('error', error));\n return null;\n };\n ({ metadata } = await this.mediators.mediatorMetadataAccumulate.mediate({ context, mode: 'initialize' }));\n\n // Log as warning, because the quads above may not always be consumed (e.g. for SPARQL endpoints),\n // so the user would not be notified of something going wrong otherwise.\n this.logWarning(`Metadata extraction for ${url} failed: ${( error).message}`);\n }\n\n // Aggregate all discovered quads into a store.\n aggregatedStore?.setBaseMetadata( metadata, false);\n aggregatedStore?.containedSources.add(link.url);\n aggregatedStore?.import(quads);\n\n // Determine the source\n const { source, dataset } = await this.mediators.mediatorQuerySourceIdentifyHypermedia.mediate({\n context,\n forceSourceType: link.url === this.firstUrl ? this.forceSourceType : undefined,\n handledDatasets,\n metadata,\n quads,\n url,\n });\n\n if (dataset) {\n // Mark the dataset as applied\n // This is needed to make sure that things like QPF search forms are only applied once,\n // and next page links are followed after that.\n handledDatasets[dataset] = true;\n }\n\n return { link, source, metadata: metadata, handledDatasets };\n }\n\n /**\n * Resolve a source for the given URL.\n * This will first try to retrieve the source from cache.\n * @param link A source ILink.\n * @param handledDatasets A hash of dataset identifiers that have already been handled.\n * @param context The action context.\n * @param aggregatedStore An optional aggregated store.\n */\n protected getSourceCached(\n link: ILink,\n handledDatasets: Record,\n context: IActionContext,\n aggregatedStore: IAggregatedStore | undefined,\n ): Promise {\n let source = this.sourcesState.get(link.url);\n if (source) {\n return source;\n }\n source = this.getSource(link, handledDatasets, context, aggregatedStore);\n if (link.url === this.firstUrl || aggregatedStore === undefined) {\n this.sourcesState.set(link.url, source);\n }\n return source;\n }\n\n public getAggregateStore(context: IActionContext): IAggregatedStore | undefined {\n let aggregatedStore: IAggregatedStore | undefined;\n if (this.aggregateStore) {\n const aggregatedStores: Map | undefined = context\n .get(KeysQuerySourceIdentify.hypermediaSourcesAggregatedStores);\n if (aggregatedStores) {\n aggregatedStore = aggregatedStores.get(this.firstUrl);\n if (!aggregatedStore) {\n aggregatedStore = new StreamingStoreMetadata(\n undefined,\n async(accumulatedMetadata, appendingMetadata) => \n (await this.mediators.mediatorMetadataAccumulate.mediate({\n mode: 'append',\n accumulatedMetadata,\n appendingMetadata,\n context,\n })).metadata,\n );\n aggregatedStores.set(this.firstUrl, aggregatedStore);\n }\n return aggregatedStore;\n }\n }\n }\n\n public toString(): string {\n return `QuerySourceHypermedia(${this.firstUrl})`;\n }\n}\n\nexport interface IMediatorArgs {\n mediatorDereferenceRdf: MediatorDereferenceRdf;\n mediatorMetadata: MediatorRdfMetadata;\n mediatorMetadataExtract: MediatorRdfMetadataExtract;\n mediatorMetadataAccumulate: MediatorRdfMetadataAccumulate;\n mediatorQuerySourceIdentifyHypermedia: MediatorQuerySourceIdentifyHypermedia;\n mediatorRdfResolveHypermediaLinks: MediatorRdfResolveHypermediaLinks;\n mediatorRdfResolveHypermediaLinksQueue: MediatorRdfResolveHypermediaLinksQueue;\n}\n","// eslint-disable-next-line import/no-nodejs-modules\nimport type { EventEmitter } from 'node:events';\nimport { ClosableTransformIterator } from '@comunica/bus-query-operation';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { MetadataQuads, IAggregatedStore, MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { StreamingStore } from 'rdf-streaming-store';\n\n/**\n * A StreamingStore that returns an AsyncIterator with a valid MetadataQuads property.\n */\nexport class StreamingStoreMetadata extends StreamingStore implements IAggregatedStore {\n public started = false;\n public containedSources = new Set();\n public readonly runningIterators: Set> = new Set>();\n protected readonly iteratorCreatedListeners: Set<() => void> = new Set();\n protected readonly metadataAccumulator:\n (accumulatedMetadata: MetadataBindings, appendingMetadata: MetadataBindings) => Promise;\n\n protected baseMetadata: MetadataBindings = {\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 0 },\n canContainUndefs: false,\n variables: [],\n };\n\n public constructor(\n store: RDF.Store | undefined,\n metadataAccumulator:\n (accumulatedMetadata: MetadataBindings, appendingMetadata: MetadataBindings) => Promise,\n ) {\n super(store);\n this.metadataAccumulator = metadataAccumulator;\n }\n\n public override import(stream: RDF.Stream): EventEmitter {\n if (!this.ended) {\n super.import(stream);\n }\n return stream;\n }\n\n public hasRunningIterators(): boolean {\n return this.runningIterators.size > 0;\n }\n\n public override match(\n subject?: RDF.Term | null,\n predicate?: RDF.Term | null,\n object?: RDF.Term | null,\n graph?: RDF.Term | null,\n ): AsyncIterator {\n // Wrap the raw stream in an AsyncIterator\n const rawStream = super.match(subject, predicate, object, graph);\n const iterator = new ClosableTransformIterator(\n rawStream,\n {\n autoStart: false,\n onClose: () => {\n // Running iterators are deleted once closed or destroyed\n this.runningIterators.delete(iterator);\n },\n },\n );\n\n // Expose the metadata property containing the cardinality\n let count = this.getStore().countQuads(subject!, predicate!, object!, graph!);\n const metadata: MetadataQuads = {\n state: new MetadataValidationState(),\n cardinality: {\n type: 'estimate',\n value: count,\n },\n canContainUndefs: false,\n };\n iterator.setProperty('metadata', metadata);\n iterator.setProperty('lastCount', count);\n\n // Every time a new quad is pushed into the iterator, update the metadata\n rawStream.on('quad', () => {\n iterator.setProperty('lastCount', ++count);\n this.updateMetadataState(iterator, count);\n });\n\n // Store all running iterators until they close or are destroyed\n this.runningIterators.add(iterator);\n\n // Invoke creation listeners\n for (const listener of this.iteratorCreatedListeners) {\n listener();\n }\n\n return iterator;\n }\n\n public setBaseMetadata(metadata: MetadataBindings, updateStates: boolean): void {\n this.baseMetadata = { ...metadata };\n this.baseMetadata.cardinality = { type: 'exact', value: 0 };\n\n if (updateStates) {\n for (const iterator of this.runningIterators) {\n const count: number = iterator.getProperty('lastCount')!;\n this.updateMetadataState(iterator, count);\n }\n }\n }\n\n protected updateMetadataState(iterator: AsyncIterator, count: number): void {\n // Append the given cardinality to the base metadata\n const metadataNew: MetadataBindings = {\n state: new MetadataValidationState(),\n cardinality: {\n type: 'estimate',\n value: count,\n },\n canContainUndefs: false,\n variables: [],\n };\n\n this.metadataAccumulator(this.baseMetadata, metadataNew)\n .then((accumulatedMetadata) => {\n accumulatedMetadata.state = new MetadataValidationState();\n\n // Set the new metadata, and invalidate the previous state\n const metadataToInvalidate = iterator.getProperty('metadata');\n iterator.setProperty('metadata', accumulatedMetadata);\n metadataToInvalidate?.state.invalidate();\n })\n .catch(() => {\n // Void errors\n });\n }\n\n public addIteratorCreatedListener(listener: () => void): void {\n this.iteratorCreatedListeners.add(listener);\n }\n\n public removeIteratorCreatedListener(listener: () => void): void {\n this.iteratorCreatedListeners.delete(listener);\n }\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type {\n IActionQuerySourceIdentify,\n IActorQuerySourceIdentifyOutput,\n IActorQuerySourceIdentifyArgs,\n} from '@comunica/bus-query-source-identify';\nimport { ActorQuerySourceIdentify } from '@comunica/bus-query-source-identify';\nimport type { IActorTest } from '@comunica/core';\nimport { ActionContext } from '@comunica/core';\nimport type * as RDF from '@rdfjs/types';\nimport { QuerySourceRdfJs } from './QuerySourceRdfJs';\n\n/**\n * A comunica RDFJS Query Source Identify Actor.\n */\nexport class ActorQuerySourceIdentifyRdfJs extends ActorQuerySourceIdentify {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorQuerySourceIdentifyRdfJsArgs) {\n super(args);\n }\n\n public async test(action: IActionQuerySourceIdentify): Promise {\n const source = action.querySourceUnidentified;\n if (source.type !== undefined && source.type !== 'rdfjs') {\n throw new Error(`${this.name} requires a single query source with rdfjs type to be present in the context.`);\n }\n if (typeof source.value === 'string' || !('match' in source.value)) {\n throw new Error(`${this.name} received an invalid rdfjs query source.`);\n }\n return true;\n }\n\n public async run(action: IActionQuerySourceIdentify): Promise {\n return {\n querySource: {\n source: new QuerySourceRdfJs(\n action.querySourceUnidentified.value,\n await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context),\n ),\n context: action.querySourceUnidentified.context ?? new ActionContext(),\n },\n };\n }\n}\n\nexport interface IActorQuerySourceIdentifyRdfJsArgs extends IActorQuerySourceIdentifyArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { BindingsFactory } from '@comunica/bindings-factory';\nimport { filterMatchingQuotedQuads, quadsToBindings } from '@comunica/bus-query-source-identify';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { IQuerySource, BindingsStream, IActionContext, FragmentSelectorShape } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { AsyncIterator, wrap as wrapAsyncIterator } from 'asynciterator';\nimport { DataFactory } from 'rdf-data-factory';\nimport { someTermsNested, filterTermsNested, someTerms, uniqTerms } from 'rdf-terms';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\nimport type { IRdfJsSourceExtended } from './IRdfJsSourceExtended';\n\nconst AF = new Factory();\nconst DF = new DataFactory();\n\nexport class QuerySourceRdfJs implements IQuerySource {\n protected static readonly SELECTOR_SHAPE: FragmentSelectorShape = {\n type: 'operation',\n operation: {\n operationType: 'pattern',\n pattern: AF.createPattern(DF.variable('s'), DF.variable('p'), DF.variable('o')),\n },\n variablesOptional: [\n DF.variable('s'),\n DF.variable('p'),\n DF.variable('o'),\n ],\n };\n\n public referenceValue: string | RDF.Source;\n protected readonly source: IRdfJsSourceExtended;\n private readonly bindingsFactory: BindingsFactory;\n\n public constructor(source: RDF.Source, bindingsFactory: BindingsFactory) {\n this.source = source;\n this.referenceValue = source;\n this.bindingsFactory = bindingsFactory;\n }\n\n public static nullifyVariables(term: RDF.Term | undefined, quotedTripleFiltering: boolean): RDF.Term | undefined {\n return !term || term.termType === 'Variable' || (!quotedTripleFiltering &&\n term.termType === 'Quad' && someTermsNested(term, value => value.termType === 'Variable')) ?\n undefined :\n term;\n }\n\n public static hasDuplicateVariables(pattern: RDF.BaseQuad): boolean {\n const variables = filterTermsNested(pattern, term => term.termType === 'Variable');\n return variables.length > 1 && uniqTerms(variables).length < variables.length;\n }\n\n public async getSelectorShape(): Promise {\n return QuerySourceRdfJs.SELECTOR_SHAPE;\n }\n\n public queryBindings(operation: Algebra.Operation, context: IActionContext): BindingsStream {\n if (operation.type !== 'pattern') {\n throw new Error(`Attempted to pass non-pattern operation '${operation.type}' to QuerySourceRdfJs`);\n }\n\n // Check if the source supports quoted triple filtering\n const quotedTripleFiltering = Boolean(this.source.features?.quotedTripleFiltering);\n\n // Create an async iterator from the matched quad stream\n const rawStream = this.source.match(\n QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering),\n );\n let it: AsyncIterator = rawStream instanceof AsyncIterator ?\n rawStream :\n wrapAsyncIterator(rawStream, { autoStart: false });\n\n // Perform post-match-filtering if the source does not support quoted triple filtering.\n if (!quotedTripleFiltering) {\n it = filterMatchingQuotedQuads(operation, it);\n }\n\n // Determine metadata\n if (!it.getProperty('metadata')) {\n this.setMetadata(it, operation)\n .catch(error => it.destroy(error));\n }\n\n return quadsToBindings(\n it,\n operation,\n this.bindingsFactory,\n Boolean(context.get(KeysQueryOperation.unionDefaultGraph)),\n );\n }\n\n protected async setMetadata(\n it: AsyncIterator,\n operation: Algebra.Pattern,\n ): Promise {\n // Check if the source supports quoted triple filtering\n const quotedTripleFiltering = Boolean(this.source.features?.quotedTripleFiltering);\n\n let cardinality: number;\n if (this.source.countQuads) {\n // If the source provides a dedicated method for determining cardinality, use that.\n cardinality = await this.source.countQuads(\n QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering),\n );\n } else {\n // Otherwise, fallback to a sub-optimal alternative where we just call match again to count the quads.\n // WARNING: we can NOT reuse the original data stream here,\n // because we may lose data elements due to things happening async.\n let i = 0;\n cardinality = await new Promise((resolve, reject) => {\n const matches = this.source.match(\n QuerySourceRdfJs.nullifyVariables(operation.subject, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.predicate, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.object, quotedTripleFiltering),\n QuerySourceRdfJs.nullifyVariables(operation.graph, quotedTripleFiltering),\n );\n matches.on('error', reject);\n matches.on('end', () => resolve(i));\n matches.on('data', () => i++);\n });\n }\n\n // If `match` would require filtering afterwards, our count will be an over-estimate.\n const wouldRequirePostFiltering = (!quotedTripleFiltering &&\n someTerms(operation, term => term.termType === 'Quad')) ||\n QuerySourceRdfJs.hasDuplicateVariables(operation);\n\n it.setProperty('metadata', {\n state: new MetadataValidationState(),\n cardinality: { type: wouldRequirePostFiltering ? 'estimate' : 'exact', value: cardinality },\n canContainUndefs: false,\n });\n }\n\n public queryQuads(\n _operation: Algebra.Operation,\n _context: IActionContext,\n ): AsyncIterator {\n throw new Error('queryQuads is not implemented in QuerySourceQpf');\n }\n\n public queryBoolean(\n _operation: Algebra.Ask,\n _context: IActionContext,\n ): Promise {\n throw new Error('queryBoolean is not implemented in QuerySourceQpf');\n }\n\n public queryVoid(\n _operation: Algebra.Update,\n _context: IActionContext,\n ): Promise {\n throw new Error('queryVoid is not implemented in QuerySourceQpf');\n }\n\n public toString(): string {\n return `QuerySourceRdfJs(${this.source.constructor.name})`;\n }\n}\n","import type {\n IActionQuerySourceIdentify,\n IActorQuerySourceIdentifyOutput,\n IActorQuerySourceIdentifyArgs,\n MediatorQuerySourceIdentify,\n} from '@comunica/bus-query-source-identify';\nimport { ActorQuerySourceIdentify } from '@comunica/bus-query-source-identify';\nimport type { IActionRdfParseHandle, MediatorRdfParseHandle } from '@comunica/bus-rdf-parse';\nimport type { IActorTest } from '@comunica/core';\nimport type {\n IQuerySourceSerialized,\n QuerySourceUnidentifiedExpanded,\n IActionContext,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { storeStream } from 'rdf-store-stream';\nimport { Readable } from 'readable-stream';\n\n/**\n * A comunica Serialized Query Source Identify Actor.\n */\nexport class ActorQuerySourceIdentifySerialized extends ActorQuerySourceIdentify {\n public readonly cacheSize: number;\n public readonly mediatorRdfParse: MediatorRdfParseHandle;\n public readonly mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n public constructor(args: IActorQuerySourceIdentifySerializedArgs) {\n super(args);\n }\n\n public async test(action: IActionQuerySourceIdentify): Promise {\n if (!this.isStringSource(action.querySourceUnidentified)) {\n throw new Error(`${this.name} requires a single query source with serialized type to be present in the context.`);\n }\n return true;\n }\n\n public async run(action: IActionQuerySourceIdentify): Promise {\n // Delegate source identification to the same bus again, by converting the string into an RDF/JS source\n return await this.mediatorQuerySourceIdentify.mediate({\n querySourceUnidentified: {\n type: 'rdfjs',\n value: await this.getRdfSource(action.context, action.querySourceUnidentified),\n context: action.querySourceUnidentified.context,\n },\n context: action.context,\n });\n }\n\n /**\n * Parses the string data source through the RDF parse bus, returning the RDF source.\n * @param context The run action context\n * @param source The source from the run action context\n * @returns Parsed RDF source that can be passed to quad pattern resolve mediator as an RDF/JS source\n */\n protected async getRdfSource(context: IActionContext, source: IQuerySourceSerialized): Promise {\n const textStream = new Readable({ objectMode: true });\n /* istanbul ignore next */\n textStream._read = () => {\n // Do nothing\n };\n textStream.push(source.value);\n textStream.push(null);\n\n const parseAction: IActionRdfParseHandle = {\n context,\n handle: {\n metadata: { baseIRI: source.baseIRI },\n data: textStream,\n context,\n },\n handleMediaType: source.mediaType,\n };\n\n const parseResult = await this.mediatorRdfParse.mediate(parseAction);\n return await storeStream(parseResult.handle.data);\n }\n\n private isStringSource(source: QuerySourceUnidentifiedExpanded): source is IQuerySourceSerialized {\n if (!('type' in source)) {\n if (!(typeof source.value === 'string')) {\n return false;\n }\n return 'mediaType' in source;\n }\n return source.type === 'serialized';\n }\n}\n\nexport interface IActorQuerySourceIdentifySerializedArgs extends IActorQuerySourceIdentifyArgs {\n /**\n * The quad pattern parser mediator.\n */\n mediatorRdfParse: MediatorRdfParseHandle;\n /**\n * The query source identify mediator.\n */\n mediatorQuerySourceIdentify: MediatorQuerySourceIdentify;\n}\n","import type { IActionRdfJoinEntriesSort, IActorRdfJoinEntriesSortOutput } from '@comunica/bus-rdf-join-entries-sort';\nimport { ActorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';\nimport type { IActorArgs, IActorTest } from '@comunica/core';\n\n/**\n * An actor that sorts join entries by increasing cardinality.\n */\nexport class ActorRdfJoinEntriesSortCardinality extends ActorRdfJoinEntriesSort {\n public constructor(\n args: IActorArgs,\n ) {\n super(args);\n }\n\n public async test(_action: IActionRdfJoinEntriesSort): Promise {\n return true;\n }\n\n public async run(action: IActionRdfJoinEntriesSort): Promise {\n const entries = [ ...action.entries ]\n .sort((entryLeft, entryRight) => entryLeft.metadata.cardinality.value - entryRight.metadata.cardinality.value);\n return { entries };\n }\n}\n","import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings, MetadataBindings } from '@comunica/types';\nimport { HashJoin } from 'asyncjoin';\n\n/**\n * A comunica Hash RDF Join Actor.\n */\nexport class ActorRdfJoinHash extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'hash',\n limitEntries: 2,\n requiresVariableOverlap: true,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n let metadatas = await ActorRdfJoin.getMetadatas(action.entries);\n\n // Ensure the left build stream is the smallest\n // TODO: in the next major version, use ActorRdfJoin.sortJoinEntries, which requires mediatorJoinEntriesSort\n if (metadatas[1].cardinality.value < metadatas[0].cardinality.value) {\n metadatas = [ metadatas[1], metadatas[0] ];\n action = { ...action, entries: [ action.entries[1], action.entries[0] ]};\n }\n\n const variables = ActorRdfJoin.overlappingVariables(metadatas);\n const join = new HashJoin(\n action.entries[0].output.bindingsStream,\n action.entries[1].output.bindingsStream,\n entry => ActorRdfJoin.hash(entry, variables),\n ActorRdfJoin.joinBindings,\n );\n return {\n result: {\n type: 'bindings',\n bindingsStream: join,\n metadata: async() => await this.constructResultMetadata(action.entries, metadatas, action.context),\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n // Ensure the left build stream is the smallest\n if (metadatas[1].cardinality.value < metadatas[0].cardinality.value) {\n metadatas = [ metadatas[1], metadatas[0] ];\n }\n\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return {\n iterations: metadatas[0].cardinality.value + metadatas[1].cardinality.value,\n persistedItems: metadatas[0].cardinality.value,\n blockingItems: metadatas[0].cardinality.value,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n","import { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { IActionRdfJoin, IActorRdfJoinArgs, IActorRdfJoinOutputInner } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin, ChunkedIterator } from '@comunica/bus-rdf-join';\nimport type { MediatorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type {\n IJoinEntryWithMetadata,\n IQueryOperationResultBindings,\n IQuerySourceWrapper,\n MetadataBindings,\n IActionContext,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { UnionIterator } from 'asynciterator';\nimport type { Algebra } from 'sparqlalgebrajs';\nimport { Factory } from 'sparqlalgebrajs';\n\nconst AF = new Factory();\n\n/**\n * A comunica Inner Multi Bind Source RDF Join Actor.\n */\nexport class ActorRdfJoinMultiBindSource extends ActorRdfJoin {\n public readonly selectivityModifier: number;\n public readonly blockSize: number;\n public readonly mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n\n public constructor(args: IActorRdfJoinInnerMultiBindSourceArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'bind-source',\n canHandleUndefs: true,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n // Order the entries so we can pick the first one (usually the one with the lowest cardinality)\n const entriesUnsorted = await ActorRdfJoin.getEntriesWithMetadatas(action.entries);\n const entries = await this.sortJoinEntries(entriesUnsorted, action.context);\n\n this.logDebug(\n action.context,\n 'First entry for Bind Join Source: ',\n () => ({ entry: entries[0].operation, metadata: entries[0].metadata }),\n );\n\n // Close the non-smallest streams\n for (const [ i, element ] of entries.entries()) {\n if (i !== 0) {\n element.output.bindingsStream.close();\n }\n }\n\n // Take the stream with the lowest cardinality\n const smallestStream: IQueryOperationResultBindings = entries[0].output;\n const smallestMetadata = entries[0].metadata;\n const remainingEntries = [ ...entries ];\n remainingEntries.splice(0, 1);\n\n // Get source for remaining entries (guaranteed thanks to prior check in getJoinCoefficients())\n const sourceWrapper: IQuerySourceWrapper = ActorQueryOperation.getOperationSource(remainingEntries[0].operation)!;\n\n // Determine the operation to pass\n const operation = this.createOperationFromEntries(remainingEntries);\n\n // Slice the smallest stream into chunks according to the block size, so we avoid blocking too long.\n const chunkedStreams: AsyncIterator> = new ChunkedIterator(\n smallestStream.bindingsStream,\n this.blockSize,\n { autoStart: false },\n );\n\n // For each chunk, pass the query and the bindings to the source for execution\n const bindingsStream = new UnionIterator(chunkedStreams.map(chunk => sourceWrapper.source.queryBindings(\n operation,\n sourceWrapper.context ? action.context.merge(sourceWrapper.context) : action.context,\n { joinBindings: { bindings: chunk, metadata: smallestMetadata }},\n )));\n\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n metadata: () => this.constructResultMetadata(entries, entries.map(entry => entry.metadata), action.context),\n },\n physicalPlanMetadata: {\n bindIndex: entriesUnsorted.indexOf(entries[0]),\n },\n };\n }\n\n protected async sortJoinEntries(\n entries: IJoinEntryWithMetadata[],\n context: IActionContext,\n ): Promise {\n entries = await ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort, entries, context);\n\n // Prioritize entries with modified operations, so these are not re-executed\n entries = entries.sort((entryLeft, entryRight) => {\n if (entryLeft.operationModified && !entryRight.operationModified) {\n return -1;\n }\n return 0;\n });\n\n return entries;\n }\n\n public async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n // Order the entries so we can pick the first one (usually the one with the lowest cardinality)\n const entries = await this.sortJoinEntries(action.entries\n .map((entry, i) => ({ ...entry, metadata: metadatas[i] })), action.context);\n metadatas = entries.map(entry => entry.metadata);\n\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n\n // Determine first stream and remaining ones\n const remainingEntries = [ ...entries ];\n const remainingRequestInitialTimes = [ ...requestInitialTimes ];\n const remainingRequestItemTimes = [ ...requestItemTimes ];\n remainingEntries.splice(0, 1);\n remainingRequestInitialTimes.splice(0, 1);\n remainingRequestItemTimes.splice(0, 1);\n\n // Reject binding on operations without sources\n const sources = remainingEntries.map(entry => ActorQueryOperation.getOperationSource(entry.operation));\n if (sources.some(source => !source)) {\n throw new Error(`Actor ${this.name} can not bind on remaining operations without source annotation`);\n }\n\n // Reject binding on operations with un-equal sources\n if (sources.some(source => source !== sources[0])) {\n throw new Error(`Actor ${this.name} can not bind on remaining operations with non-equal source annotation`);\n }\n\n // Reject if the source can not handle bindings\n const sourceWrapper: IQuerySourceWrapper = sources[0]!;\n const testingOperation = this.createOperationFromEntries(remainingEntries);\n const selectorShape = await sourceWrapper.source.getSelectorShape(action.context);\n if (!ActorQueryOperation\n .doesShapeAcceptOperation(selectorShape, testingOperation, { joinBindings: true })) {\n throw new Error(`Actor ${this.name} detected a source that can not handle passing down join bindings`);\n }\n\n // Determine selectivities of smallest entry with all other entries\n const selectivities = await Promise.all(remainingEntries\n .map(async entry => (await this.mediatorJoinSelectivity.mediate({\n entries: [ entries[0], entry ],\n context: action.context,\n })).selectivity * this.selectivityModifier));\n\n // Determine coefficients for remaining entries\n const cardinalityRemaining = remainingEntries\n .map((entry, i) => entry.metadata.cardinality.value * selectivities[i])\n .reduce((sum, element) => sum + element, 0);\n\n return {\n iterations: 1,\n persistedItems: metadatas[0].cardinality.value,\n blockingItems: metadatas[0].cardinality.value,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + cardinalityRemaining * requestItemTimes[1],\n };\n }\n\n public createOperationFromEntries(remainingEntries: IJoinEntryWithMetadata[]): Algebra.Operation {\n if (remainingEntries.length === 1) {\n return remainingEntries[0].operation;\n }\n return AF.createJoin(remainingEntries.map(entry => entry.operation), true);\n }\n}\n\nexport interface IActorRdfJoinInnerMultiBindSourceArgs extends IActorRdfJoinArgs {\n /**\n * Multiplier for selectivity values\n * @range {double}\n * @default {0.0001}\n */\n selectivityModifier: number;\n /**\n * The maximum amount of bindings to send to the source per block.\n * @default {16}\n */\n blockSize: number;\n /**\n * The join entries sort mediator\n */\n mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { MediatorQueryOperation } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation, materializeOperation } from '@comunica/bus-query-operation';\nimport type {\n IActionRdfJoin,\n IActorRdfJoinOutputInner,\n IActorRdfJoinArgs,\n} from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { MediatorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings, BindingsStream, IQueryOperationResultBindings, MetadataBindings } from '@comunica/types';\nimport { MultiTransformIterator, TransformIterator, UnionIterator } from 'asynciterator';\nimport { Factory, Algebra, Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Multi-way Bind RDF Join Actor.\n */\nexport class ActorRdfJoinMultiBind extends ActorRdfJoin {\n public readonly bindOrder: BindOrder;\n public readonly selectivityModifier: number;\n public readonly minMaxCardinalityRatio: number;\n public readonly mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n public readonly mediatorQueryOperation: MediatorQueryOperation;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public static readonly FACTORY = new Factory();\n\n public constructor(args: IActorRdfJoinMultiBindArgs) {\n // TODO: remove this fallback in the next major update\n if (args.minMaxCardinalityRatio === undefined) {\n args.minMaxCardinalityRatio = 60;\n }\n super(args, {\n logicalType: 'inner',\n physicalName: 'bind',\n canHandleUndefs: true,\n isLeaf: false,\n });\n }\n\n /**\n * Create a new bindings stream that takes every binding of the base stream\n * and binds it to the remaining patterns, evaluates those patterns, and emits all their bindings.\n *\n * @param bindOrder The order in which elements should be bound.\n * @param baseStream The base stream.\n * @param operations The operations to bind with each binding of the base stream.\n * @param operationBinder A callback to retrieve the bindings stream of bound operations.\n * @param optional If the original bindings should be emitted when the resulting bindings stream is empty.\n * @return {BindingsStream}\n */\n public static createBindStream(\n bindOrder: BindOrder,\n baseStream: BindingsStream,\n operations: Algebra.Operation[],\n operationBinder: (boundOperations: Algebra.Operation[], operationBindings: Bindings)\n => Promise,\n optional: boolean,\n bindingsFactory: BindingsFactory,\n ): BindingsStream {\n // Enable auto-start on sub-bindings during depth-first binding for best performance.\n const autoStartSubBindings = bindOrder === 'depth-first';\n\n // Create bindings function\n const binder = (bindings: Bindings): BindingsStream => {\n // We don't bind the filter because filters are always handled last,\n // and we need to avoid binding filters of sub-queries, which are to be handled first. (see spec test bind10)\n const subOperations = operations\n .map(operation => materializeOperation(operation, bindings, bindingsFactory, { bindFilter: true }));\n const bindingsMerger = (subBindings: Bindings): Bindings | undefined => subBindings.merge(bindings);\n return new TransformIterator(async() => (await operationBinder(subOperations, bindings))\n .transform({ map: bindingsMerger }), { maxBufferSize: 128, autoStart: autoStartSubBindings });\n };\n\n // Create an iterator that binds elements from the base stream in different orders\n switch (bindOrder) {\n case 'depth-first':\n return new MultiTransformIterator(baseStream, { autoStart: false, multiTransform: binder, optional });\n case 'breadth-first':\n return new UnionIterator(baseStream.transform({\n map: binder,\n optional,\n }), { autoStart: false });\n default:\n // eslint-disable-next-line ts/restrict-template-expressions\n throw new Error(`Received request for unknown bind order: ${bindOrder}`);\n }\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context);\n\n // Order the entries so we can pick the first one (usually the one with the lowest cardinality)\n const entriesUnsorted = await ActorRdfJoin.getEntriesWithMetadatas(action.entries);\n const entries = await ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort, entriesUnsorted, action.context);\n\n this.logDebug(\n action.context,\n 'First entry for Bind Join: ',\n () => ({ entry: entries[0].operation, metadata: entries[0].metadata }),\n );\n\n // Close the non-smallest streams\n for (const [ i, element ] of entries.entries()) {\n if (i !== 0) {\n element.output.bindingsStream.close();\n }\n }\n\n // Take the stream with the lowest cardinality\n const smallestStream: IQueryOperationResultBindings = entries[0].output;\n const remainingEntries = [ ...entries ];\n remainingEntries.splice(0, 1);\n\n // Bind the remaining patterns for each binding in the stream\n const subContext = action.context\n .set(KeysQueryOperation.joinLeftMetadata, entries[0].metadata)\n .set(KeysQueryOperation.joinRightMetadatas, remainingEntries.map(entry => entry.metadata));\n const bindingsStream: BindingsStream = ActorRdfJoinMultiBind.createBindStream(\n this.bindOrder,\n smallestStream.bindingsStream,\n remainingEntries.map(entry => entry.operation),\n async(operations: Algebra.Operation[], operationBindings: Bindings) => {\n // Send the materialized patterns to the mediator for recursive join evaluation.\n const operation = operations.length === 1 ?\n operations[0] :\n ActorRdfJoinMultiBind.FACTORY.createJoin(operations);\n const output = ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate(\n { operation, context: subContext?.set(KeysQueryOperation.joinBindings, operationBindings) },\n ));\n return output.bindingsStream;\n },\n false,\n bindingsFactory,\n );\n\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n metadata: () => this.constructResultMetadata(entries, entries.map(entry => entry.metadata), action.context),\n },\n physicalPlanMetadata: {\n bindIndex: entriesUnsorted.indexOf(entries[0]),\n bindOperation: entries[0].operation,\n bindOperationCardinality: entries[0].metadata.cardinality,\n bindOrder: this.bindOrder,\n },\n };\n }\n\n public canBindWithOperation(operation: Algebra.Operation): boolean {\n let valid = true;\n Util.recurseOperation(operation, {\n [Algebra.types.EXTEND](): boolean {\n valid = false;\n return false;\n },\n [Algebra.types.GROUP](): boolean {\n valid = false;\n return false;\n },\n });\n\n return valid;\n }\n\n public async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n // Order the entries so we can pick the first one (usually the one with the lowest cardinality)\n const entries = await ActorRdfJoin.sortJoinEntries(this.mediatorJoinEntriesSort, action.entries\n .map((entry, i) => ({ ...entry, metadata: metadatas[i] })), action.context);\n metadatas = entries.map(entry => entry.metadata);\n\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n\n // Determine first stream and remaining ones\n const remainingEntries = [ ...entries ];\n const remainingRequestInitialTimes = [ ...requestInitialTimes ];\n const remainingRequestItemTimes = [ ...requestItemTimes ];\n remainingEntries.splice(0, 1);\n remainingRequestInitialTimes.splice(0, 1);\n remainingRequestItemTimes.splice(0, 1);\n\n // Reject binding on some operation types\n if (remainingEntries\n .some(entry => !this.canBindWithOperation(entry.operation))) {\n throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);\n }\n\n // Reject binding on modified operations, since using the output directly would be significantly more efficient.\n if (remainingEntries.some(entry => entry.operationModified)) {\n throw new Error(`Actor ${this.name} can not be used over remaining entries with modified operations`);\n }\n\n // Only run this actor if the smallest stream is significantly smaller than the largest stream.\n // We must use Math.max, because the last metadata is not necessarily the biggest, but it's the least preferred.\n if (metadatas[0].cardinality.value * this.minMaxCardinalityRatio >\n Math.max(...metadatas.map(metadata => metadata.cardinality.value))) {\n throw new Error(`Actor ${this.name} can only run if the smallest stream is much smaller than largest stream`);\n }\n\n // Determine selectivities of smallest entry with all other entries\n const selectivities = await Promise.all(remainingEntries\n .map(async entry => (await this.mediatorJoinSelectivity.mediate({\n entries: [ entries[0], entry ],\n context: action.context,\n })).selectivity * this.selectivityModifier));\n\n // Determine coefficients for remaining entries\n const cardinalityRemaining = remainingEntries\n .map((entry, i) => entry.metadata.cardinality.value * selectivities[i])\n .reduce((sum, element) => sum + element, 0);\n const receiveInitialCostRemaining = remainingRequestInitialTimes\n .reduce((sum, element) => sum + element, 0);\n const receiveItemCostRemaining = remainingRequestItemTimes\n .reduce((sum, element) => sum + element, 0);\n\n return {\n iterations: metadatas[0].cardinality.value * cardinalityRemaining,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] +\n metadatas[0].cardinality.value * (\n requestItemTimes[0] +\n receiveInitialCostRemaining +\n cardinalityRemaining * receiveItemCostRemaining\n ),\n };\n }\n}\n\nexport interface IActorRdfJoinMultiBindArgs extends IActorRdfJoinArgs {\n /**\n * The order in which elements should be bound\n * @default {depth-first}\n */\n bindOrder: BindOrder;\n /**\n * Multiplier for selectivity values\n * @range {double}\n * @default {0.0001}\n */\n selectivityModifier: number;\n /**\n * The number of times the smallest cardinality should fit in the maximum cardinality.\n * @range {double}\n * @default {60}\n */\n minMaxCardinalityRatio?: number;\n /**\n * The join entries sort mediator\n */\n mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n /**\n * The query operation mediator\n */\n mediatorQueryOperation: MediatorQueryOperation;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n\nexport type BindOrder = 'depth-first' | 'breadth-first';\n","import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type { MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { ArrayIterator } from 'asynciterator';\n\n/**\n * A comunica Multi Empty RDF Join Actor.\n */\nexport class ActorRdfJoinMultiEmpty extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'multi-empty',\n canHandleUndefs: true,\n });\n }\n\n public override async test(action: IActionRdfJoin): Promise {\n if ((await ActorRdfJoin.getMetadatas(action.entries))\n .every(metadata => ActorRdfJoin.getCardinality(metadata).value > 0)) {\n throw new Error(`Actor ${this.name} can only join entries where at least one is empty`);\n }\n return super.test(action);\n }\n\n protected override async getOutput(action: IActionRdfJoin): Promise {\n // Close all entries\n for (const entry of action.entries) {\n entry.output.bindingsStream.close();\n }\n\n return {\n result: {\n bindingsStream: new ArrayIterator([], { autoStart: false }),\n metadata: async() => ({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 0 },\n canContainUndefs: false,\n variables: ActorRdfJoin.joinVariables(await ActorRdfJoin.getMetadatas(action.entries)),\n }),\n type: 'bindings',\n },\n };\n }\n\n protected async getJoinCoefficients(\n _action: IActionRdfJoin,\n _metadatas: MetadataBindings[],\n ): Promise {\n return {\n iterations: 0,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: 0,\n };\n }\n}\n","import { bindingsToString } from '@comunica/bindings-factory';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type {\n IActionRdfJoin,\n IActorRdfJoinArgs,\n MediatorRdfJoin,\n IActorRdfJoinOutputInner,\n} from '@comunica/bus-rdf-join';\nimport { ChunkedIterator, ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { MediatorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';\nimport { KeysRdfJoin } from '@comunica/context-entries';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type {\n BindingsStream,\n IActionContext,\n IJoinEntry,\n IJoinEntryWithMetadata,\n IQuerySourceWrapper,\n MetadataBindings,\n} from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { UnionIterator } from 'asynciterator';\nimport { Factory } from 'sparqlalgebrajs';\n\n/**\n * A comunica Inner Multi Smallest Filter Bindings RDF Join Actor.\n */\nexport class ActorRdfJoinMultiSmallestFilterBindings extends ActorRdfJoin {\n public readonly selectivityModifier: number;\n public readonly blockSize: number;\n public readonly mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public static readonly FACTORY = new Factory();\n public constructor(args: IActorRdfJoinMultiSmallestFilterBindingsArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'multi-smallest-filter-bindings',\n limitEntries: 2,\n limitEntriesMin: true,\n isLeaf: false,\n });\n }\n\n /**\n * Order the given join entries using the join-entries-sort bus.\n * @param {IJoinEntryWithMetadata[]} entries An array of join entries.\n * @param context The action context.\n * @return {IJoinEntryWithMetadata[]} The sorted join entries.\n */\n public async sortJoinEntries(\n entries: IJoinEntryWithMetadata[],\n context: IActionContext,\n ): Promise<{ first: IJoinEntryWithMetadata; second: IJoinEntryWithMetadata; remaining: IJoinEntryWithMetadata[] }> {\n let { entries: entriesSorted } = await this.mediatorJoinEntriesSort.mediate({ entries, context });\n\n // Prioritize entries with modified operations, so these are not re-executed\n entriesSorted = entriesSorted.sort((entryLeft, entryRight) => {\n if (entryLeft.operationModified && !entryRight.operationModified) {\n return -1;\n }\n return 0;\n });\n\n const first = entriesSorted.splice(0, 1)[0];\n\n // Let second entry first be prioritized for sharing as many variables with first as possible,\n // then having the fewest variables,\n // and then having the lowest cardinality.\n let second: IJoinEntryWithMetadata | undefined;\n let secondIndex = -1;\n let secondSharedVariables = 0;\n for (const [ i, entry ] of entriesSorted.entries()) {\n const sharedVariables = first.metadata.variables\n .filter(variableFirst => entry.metadata.variables\n .some(variableSecond => variableFirst.equals(variableSecond))).length;\n if (!second || (sharedVariables > secondSharedVariables ||\n (sharedVariables === secondSharedVariables &&\n (entry.metadata.variables.length < second.metadata.variables.length ||\n (entry.metadata.variables.length === second.metadata.variables.length &&\n entry.metadata.cardinality.value < second.metadata.cardinality.value))))) {\n second = entry;\n secondIndex = i;\n secondSharedVariables = sharedVariables;\n }\n }\n\n if (secondSharedVariables === 0) {\n throw new Error(`Actor ${this.name} can only join with common variables`);\n }\n\n const remaining = entriesSorted;\n remaining.splice(secondIndex, 1);\n return { first, second: second!, remaining };\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n // Determine the two smallest streams by sorting (e.g. via cardinality)\n const entriesUnsorted = await ActorRdfJoin.getEntriesWithMetadatas([ ...action.entries ]);\n const { first, second: secondIn, remaining: remainingIn } = await this.sortJoinEntries(\n entriesUnsorted,\n action.context,\n );\n\n // Clone first stream, because we will use it twice\n const smallestStream1 = first.output.bindingsStream;\n first.output.bindingsStream = smallestStream1.clone();\n\n // Project the first stream on common variables, and filter out duplicates\n // The common variables array is guaranteed to be non-empty, due to the way the test of this actor is implemented.\n const commonVariables = first.metadata.variables\n .filter(variableFirst => secondIn.metadata.variables\n .some(variableSecond => variableFirst.equals(variableSecond)));\n const hashes: Record = {};\n const smallestStream1Projected: BindingsStream = smallestStream1.clone()\n .map(binding => binding.filter((value, key) =>\n commonVariables.some(commonVariable => commonVariable.equals(key))))\n .filter((binding) => {\n const hash: string = bindingsToString(binding);\n return !(hash in hashes) && (hashes[hash] = true);\n });\n\n // Slice the first stream into chunks according to the block size, so we avoid blocking too long.\n const chunkedStreams: AsyncIterator> = new ChunkedIterator(\n smallestStream1Projected,\n this.blockSize,\n { autoStart: false },\n );\n\n // Push down bindings of first stream when querying for second stream\n const sourceWrapper: IQuerySourceWrapper = ActorQueryOperation.getOperationSource(secondIn.operation)!;\n const secondStream = new UnionIterator(chunkedStreams.map(chunk => sourceWrapper.source.queryBindings(\n secondIn.operation,\n sourceWrapper.context ? action.context.merge(sourceWrapper.context) : action.context,\n { filterBindings: { bindings: chunk, metadata: first.metadata }},\n )));\n const second: IJoinEntry = {\n output: {\n type: 'bindings',\n bindingsStream: secondStream,\n metadata: secondIn.output.metadata,\n },\n operation: secondIn.operation,\n operationModified: true,\n };\n\n // Destroy the unused original second stream\n secondIn.output.bindingsStream.destroy();\n\n // Join the two selected streams\n const joinedEntry: IJoinEntry = {\n output: ActorQueryOperation.getSafeBindings(await this.mediatorJoin\n .mediate({\n type: action.type,\n entries: [ first, second ],\n context: action.context.set(KeysRdfJoin.lastPhysicalJoin, this.physicalName),\n })),\n operation: ActorRdfJoinMultiSmallestFilterBindings.FACTORY\n .createJoin([ first.operation, second.operation ], false),\n operationModified: true,\n };\n\n // And then join the result with the remaining streams\n const remaining: IJoinEntry[] = remainingIn;\n remaining.unshift(joinedEntry);\n\n return {\n result: await this.mediatorJoin.mediate({\n type: action.type,\n entries: remaining,\n context: action.context,\n }),\n physicalPlanMetadata: {\n firstIndex: entriesUnsorted.indexOf(first),\n secondIndex: entriesUnsorted.indexOf(secondIn),\n },\n };\n }\n\n public async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n // Avoid infinite recursion\n if (action.context.get(KeysRdfJoin.lastPhysicalJoin) === this.physicalName) {\n throw new Error(`Actor ${this.name} can not be called recursively`);\n }\n\n metadatas = [ ...metadatas ];\n // Determine the two smallest streams by sorting (e.g. via cardinality)\n const { first, second, remaining } = await this.sortJoinEntries(action.entries\n .map((entry, i) => ({ ...entry, metadata: metadatas[i] })), action.context);\n\n // Only pass if the second entry accepts filterBindings\n const sourceWrapper: IQuerySourceWrapper | undefined = ActorQueryOperation.getOperationSource(second.operation);\n if (!sourceWrapper) {\n throw new Error(`Actor ${this.name} can only process if entries[1] has a source`);\n }\n const testingOperation = second.operation;\n const selectorShape = await sourceWrapper.source.getSelectorShape(action.context);\n if (!ActorQueryOperation\n .doesShapeAcceptOperation(selectorShape, testingOperation, { filterBindings: true })) {\n throw new Error(`Actor ${this.name} can only process if entries[1] accept filterBindings`);\n }\n\n // Determine cost coefficients\n metadatas = [ first.metadata, second.metadata, ...remaining.map(remain => remain.metadata) ];\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n const { selectivity } = await this.mediatorJoinSelectivity.mediate({\n entries: [ first, second ],\n context: action.context,\n });\n const cardinalityRemaining = remaining\n .reduce((mul, remain) => mul * remain.metadata.cardinality.value * this.selectivityModifier, 1);\n\n return {\n iterations: selectivity * this.selectivityModifier *\n second.metadata.cardinality.value * cardinalityRemaining,\n persistedItems: first.metadata.cardinality.value,\n blockingItems: first.metadata.cardinality.value,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + cardinalityRemaining * requestItemTimes[1],\n };\n }\n}\n\nexport interface IActorRdfJoinMultiSmallestFilterBindingsArgs extends IActorRdfJoinArgs {\n /**\n * Multiplier for selectivity values\n * @range {double}\n * @default {0.0001}\n */\n selectivityModifier: number;\n /**\n * The maximum amount of bindings to send to the source per block.\n * @default {64}\n */\n blockSize: number;\n /**\n * The join entries sort mediator\n */\n mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n}\n","import {\n ActorQueryOperation,\n} from '@comunica/bus-query-operation';\nimport type {\n IActionRdfJoin,\n IActorRdfJoinOutputInner,\n IActorRdfJoinArgs,\n MediatorRdfJoin,\n} from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { MediatorRdfJoinEntriesSort } from '@comunica/bus-rdf-join-entries-sort';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { MetadataBindings, IJoinEntry, IActionContext, IJoinEntryWithMetadata } from '@comunica/types';\nimport { Factory } from 'sparqlalgebrajs';\n\n/**\n * A Multi Smallest RDF Join Actor.\n * It accepts 3 or more streams, joins the smallest two, and joins the result with the remaining streams.\n */\nexport class ActorRdfJoinMultiSmallest extends ActorRdfJoin {\n public readonly mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n public readonly mediatorJoin: MediatorRdfJoin;\n\n public static readonly FACTORY = new Factory();\n\n public constructor(args: IActorRdfJoinMultiSmallestArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'multi-smallest',\n limitEntries: 3,\n limitEntriesMin: true,\n canHandleUndefs: true,\n isLeaf: false,\n });\n }\n\n /**\n * Order the given join entries using the join-entries-sort bus.\n * @param {IJoinEntryWithMetadata[]} entries An array of join entries.\n * @param context The action context.\n * @return {IJoinEntryWithMetadata[]} The sorted join entries.\n */\n public async sortJoinEntries(\n entries: IJoinEntryWithMetadata[],\n context: IActionContext,\n ): Promise {\n return (await this.mediatorJoinEntriesSort.mediate({ entries, context })).entries;\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise {\n // Determine the two smallest streams by sorting (e.g. via cardinality)\n const entries: IJoinEntry[] = await this.sortJoinEntries(\n await ActorRdfJoin.getEntriesWithMetadatas([ ...action.entries ]),\n action.context,\n );\n const smallestEntry1 = entries[0];\n const smallestEntry2 = entries[1];\n entries.splice(0, 2);\n\n // Join the two selected streams, and then join the result with the remaining streams\n const firstEntry: IJoinEntry = {\n output: ActorQueryOperation.getSafeBindings(await this.mediatorJoin\n .mediate({ type: action.type, entries: [ smallestEntry1, smallestEntry2 ], context: action.context })),\n operation: ActorRdfJoinMultiSmallest.FACTORY\n .createJoin([ smallestEntry1.operation, smallestEntry2.operation ], false),\n };\n entries.push(firstEntry);\n return {\n result: await this.mediatorJoin.mediate({\n type: action.type,\n entries,\n context: action.context,\n }),\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n metadatas = [ ...metadatas ];\n // Determine the two smallest streams by sorting (e.g. via cardinality)\n const entriesWithMetadata = await this.sortJoinEntries(action.entries\n .map((entry, i) => ({ ...entry, metadata: metadatas[i] })), action.context);\n metadatas = entriesWithMetadata.map(entry => entry.metadata);\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n\n return {\n iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value *\n metadatas.slice(2).reduce((acc, metadata) => acc * metadata.cardinality.value, 1),\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1] +\n metadatas.slice(2).reduce((sum, metadata, i) => sum + requestInitialTimes.slice(2)[i] +\n metadata.cardinality.value * requestItemTimes.slice(2)[i], 0),\n };\n }\n}\n\nexport interface IActorRdfJoinMultiSmallestArgs extends IActorRdfJoinArgs {\n /**\n * The join entries sort mediator\n */\n mediatorJoinEntriesSort: MediatorRdfJoinEntriesSort;\n /**\n * A mediator for joining Bindings streams\n */\n mediatorJoin: MediatorRdfJoin;\n}\n","import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings, MetadataBindings } from '@comunica/types';\nimport { NestedLoopJoin } from 'asyncjoin';\n\n/**\n * A comunica NestedLoop RDF Join Actor.\n */\nexport class ActorRdfJoinNestedLoop extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'nested-loop',\n limitEntries: 2,\n canHandleUndefs: true,\n });\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise {\n const join = new NestedLoopJoin(\n action.entries[0].output.bindingsStream,\n action.entries[1].output.bindingsStream,\n ActorRdfJoin.joinBindings,\n { autoStart: false },\n );\n return {\n result: {\n type: 'bindings',\n bindingsStream: join,\n metadata: async() => await this.constructResultMetadata(\n action.entries,\n await ActorRdfJoin.getMetadatas(action.entries),\n action.context,\n ),\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return {\n iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n","import { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport { MetadataValidationState } from '@comunica/metadata';\nimport type * as RDF from '@rdfjs/types';\nimport { ArrayIterator } from 'asynciterator';\n\n/**\n * A comunica None RDF Join Actor.\n */\nexport class ActorRdfJoinNone extends ActorRdfJoin {\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorRdfJoinNoneArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'none',\n limitEntries: 0,\n });\n }\n\n public override async test(action: IActionRdfJoin): Promise {\n // Allow joining of one or zero streams\n if (action.entries.length > 0) {\n throw new Error(`Actor ${this.name} can only join zero entries`);\n }\n return await this.getJoinCoefficients();\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context);\n return {\n result: {\n bindingsStream: new ArrayIterator([ bindingsFactory.bindings() ], { autoStart: false }),\n metadata: () => Promise.resolve({\n state: new MetadataValidationState(),\n cardinality: { type: 'exact', value: 1 },\n canContainUndefs: false,\n variables: [],\n }),\n type: 'bindings',\n },\n };\n }\n\n protected async getJoinCoefficients(): Promise {\n return {\n iterations: 0,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: 0,\n };\n }\n}\n\nexport interface IActorRdfJoinNoneArgs extends IActorRdfJoinArgs {\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n}\n","import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\n\n/**\n * A comunica Single RDF Join Actor.\n */\nexport class ActorRdfJoinSingle extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'single',\n limitEntries: 1,\n });\n this.includeInLogs = false;\n }\n\n public override async test(action: IActionRdfJoin): Promise {\n // Allow joining of one or zero streams\n if (action.entries.length !== 1) {\n throw new Error(`Actor ${this.name} can only join a single entry`);\n }\n return await this.getJoinCoefficients();\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise {\n return {\n result: action.entries[0].output,\n };\n }\n\n protected async getJoinCoefficients(): Promise {\n return {\n iterations: 0,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: 0,\n };\n }\n}\n","import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings, MetadataBindings } from '@comunica/types';\nimport { SymmetricHashJoin } from 'asyncjoin';\n\n/**\n * A comunica Hash RDF Join Actor.\n */\nexport class ActorRdfJoinSymmetricHash extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinSymmetricHashArgs) {\n super(args, {\n logicalType: 'inner',\n physicalName: 'symmetric-hash',\n limitEntries: 2,\n requiresVariableOverlap: true,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n const metadatas = await ActorRdfJoin.getMetadatas(action.entries);\n const variables = ActorRdfJoin.overlappingVariables(metadatas);\n const join = new SymmetricHashJoin(\n action.entries[0].output.bindingsStream,\n action.entries[1].output.bindingsStream,\n entry => ActorRdfJoinSymmetricHash.hash(entry, variables),\n ActorRdfJoin.joinBindings,\n );\n return {\n result: {\n type: 'bindings',\n bindingsStream: join,\n metadata: async() => await this.constructResultMetadata(action.entries, metadatas, action.context),\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return {\n iterations: metadatas[0].cardinality.value + metadatas[1].cardinality.value,\n persistedItems: metadatas[0].cardinality.value + metadatas[1].cardinality.value,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n\nexport interface IActorRdfJoinSymmetricHashArgs extends IActorRdfJoinArgs {\n}\n","import { ClosableTransformIterator } from '@comunica/bus-query-operation';\nimport type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport {\n ActorRdfJoin,\n} from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { BindingsIndex } from './BindingsIndex';\n\n/**\n * A comunica Minus Hash RDF Join Actor.\n */\nexport class ActorRdfJoinMinusHashUndef extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'minus',\n physicalName: 'hash-undef',\n limitEntries: 2,\n canHandleUndefs: true,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n const buffer = action.entries[1].output;\n const output = action.entries[0].output;\n\n const metadatas = await ActorRdfJoin.getMetadatas(action.entries);\n const commonVariables: RDF.Variable[] = ActorRdfJoin.overlappingVariables(metadatas);\n if (commonVariables.length > 0) {\n /**\n * To assure we've filtered all B (`buffer`) values from A (`output`) we wait until we've fetched all values of B.\n * Then we save these triples in `index` and use it to filter our A-stream.\n */\n const index: BindingsIndex = new BindingsIndex(commonVariables);\n const bindingsStream = new ClosableTransformIterator(async() => {\n await new Promise((resolve) => {\n buffer.bindingsStream.on('data', data => index.add(data));\n buffer.bindingsStream.on('end', resolve);\n buffer.bindingsStream.on('error', (error) => {\n bindingsStream.emit('error', error);\n });\n });\n return output.bindingsStream.filter(data => !index.contains(data));\n }, {\n autoStart: false,\n onClose() {\n buffer.bindingsStream.destroy();\n output.bindingsStream.destroy();\n },\n });\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n async metadata() {\n const bufferMetadata = await output.metadata();\n const outputMetadata = await output.metadata();\n return {\n ...outputMetadata,\n canContainUndefs: bufferMetadata.canContainUndefs || outputMetadata.canContainUndefs,\n };\n },\n },\n };\n }\n // Destroy the buffer stream since it is not needed when\n // there are no common variables.\n buffer.bindingsStream.destroy();\n return {\n result: output,\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return {\n // Slightly increase iteration cost, as operations in our BindingsIndex do not happen in constant time\n // This enables the mediator to favor other minus actors,\n // while this one will only be selected when streams contain undefs.\n iterations: (metadatas[0].cardinality.value + metadatas[1].cardinality.value) * 1.01,\n persistedItems: metadatas[0].cardinality.value,\n blockingItems: metadatas[0].cardinality.value,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n","import type { Bindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { termToString } from 'rdf-string';\n\n/**\n * A simple efficient tree-based index for maintaining bindings,\n * and checking whether or not a bindings is contained in this index.\n *\n * This will consider bindings with a variable term or a missing term\n * as a 'match-all' with other terms.\n */\nexport class BindingsIndex {\n private readonly keys: RDF.Variable[];\n private readonly data: IDataIndex = {};\n\n public constructor(keys: RDF.Variable[]) {\n this.keys = keys;\n }\n\n protected static hashTerm(term: RDF.Term | undefined): string {\n return term && term.termType !== 'Variable' ? termToString(term) : '';\n }\n\n /**\n * Add the given bindings to the index.\n * @param {Bindings} bindings A bindings.\n */\n public add(bindings: Bindings): void {\n if (this.isBindingsValid(bindings)) {\n let dataIt = this.data;\n for (const key of this.keys) {\n const dataKey = BindingsIndex.hashTerm(bindings.get(key));\n let subDataIt = dataIt[dataKey];\n if (!subDataIt) {\n subDataIt = dataIt[dataKey] = {};\n }\n dataIt = subDataIt;\n }\n }\n }\n\n /**\n * Check if the given bindings is contained in this index.\n * @param {Bindings} bindings A bindings.\n * @return {boolean} If it exists in the index.\n */\n public contains(bindings: Bindings): boolean {\n // Always return false if the bindings contain none of the expected keys\n if (!this.isBindingsValid(bindings)) {\n return false;\n }\n\n return this.containsRecursive(bindings, this.keys, [ this.data ]);\n }\n\n protected isBindingsValid(bindings: Bindings): boolean {\n let validKeys = false;\n for (const key of this.keys) {\n if (bindings.get(key)) {\n validKeys = true;\n break;\n }\n }\n return validKeys;\n }\n\n protected containsRecursive(bindings: Bindings, keys: RDF.Variable[], dataIndexes: IDataIndex[]): boolean {\n if (keys.length === 0) {\n return true;\n }\n\n let key: RDF.Variable;\n // eslint-disable-next-line prefer-const\n [ key, ...keys ] = keys;\n for (const data of dataIndexes) {\n // If the index contained a variable, all terms will match.\n const dataKey = BindingsIndex.hashTerm(bindings.get(key));\n if (dataKey) {\n // Check the entry for the term, and the variable term.\n const subDatas = [ data[dataKey], data[''] ].filter(Boolean);\n if (subDatas.length === 0) {\n continue;\n }\n if (this.containsRecursive(bindings, keys, subDatas)) {\n return true;\n }\n } else {\n // Iterate over all entries\n let subDatas = Object.keys(data).map(subKey => data[subKey]);\n if (subDatas.length === 0) {\n subDatas = [{}];\n }\n if (this.containsRecursive(bindings, keys, subDatas)) {\n return true;\n }\n }\n }\n return false;\n }\n}\n\nexport interface IDataIndex {\n [key: string]: IDataIndex;\n}\n","import { ClosableTransformIterator } from '@comunica/bus-query-operation';\nimport type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport {\n ActorRdfJoin,\n} from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\n\n/**\n * A comunica Minus Hash RDF Join Actor.\n */\nexport class ActorRdfJoinMinusHash extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'minus',\n physicalName: 'hash',\n limitEntries: 2,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n const buffer = action.entries[1].output;\n const output = action.entries[0].output;\n\n const metadatas = await ActorRdfJoin.getMetadatas(action.entries);\n const commonVariables: RDF.Variable[] = ActorRdfJoin.overlappingVariables(metadatas);\n if (commonVariables.length > 0) {\n /**\n * To assure we've filtered all B (`buffer`) values from A (`output`) we wait until we've fetched all values of B.\n * Then we save these triples in `index` and use it to filter our A-stream.\n */\n const index: Record = {};\n const bindingsStream = new ClosableTransformIterator(async() => {\n await new Promise((resolve) => {\n buffer.bindingsStream.on('data', (data) => {\n index[ActorRdfJoin.hashNonClashing(data, commonVariables)] = true;\n });\n buffer.bindingsStream.on('end', resolve);\n buffer.bindingsStream.on('error', (error) => {\n bindingsStream.emit('error', error);\n });\n });\n return output.bindingsStream.filter(data => !index[ActorRdfJoin.hashNonClashing(data, commonVariables)]);\n }, {\n autoStart: false,\n onClose() {\n buffer.bindingsStream.destroy();\n output.bindingsStream.destroy();\n },\n });\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n metadata: output.metadata,\n },\n };\n }\n // Destroy the buffer stream since it is not needed when\n // there are no common variables.\n buffer.bindingsStream.destroy();\n return {\n result: output,\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return {\n iterations: metadatas[0].cardinality.value + metadatas[1].cardinality.value,\n persistedItems: metadatas[0].cardinality.value,\n blockingItems: metadatas[0].cardinality.value,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n","import type { BindOrder } from '@comunica/actor-rdf-join-inner-multi-bind';\nimport { ActorRdfJoinMultiBind } from '@comunica/actor-rdf-join-inner-multi-bind';\nimport { BindingsFactory } from '@comunica/bindings-factory';\nimport type { MediatorMergeBindingsContext } from '@comunica/bus-merge-bindings-context';\nimport type { MediatorQueryOperation } from '@comunica/bus-query-operation';\nimport { ActorQueryOperation } from '@comunica/bus-query-operation';\nimport type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport { KeysQueryOperation } from '@comunica/context-entries';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings, BindingsStream, MetadataBindings } from '@comunica/types';\nimport { Algebra } from 'sparqlalgebrajs';\n\n/**\n * A comunica Optional Bind RDF Join Actor.\n */\nexport class ActorRdfJoinOptionalBind extends ActorRdfJoin {\n public readonly bindOrder: BindOrder;\n public readonly selectivityModifier: number;\n public readonly mediatorQueryOperation: MediatorQueryOperation;\n public readonly mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n public constructor(args: IActorRdfJoinOptionalBindArgs) {\n super(args, {\n logicalType: 'optional',\n physicalName: 'bind',\n limitEntries: 2,\n canHandleUndefs: true,\n isLeaf: false,\n });\n }\n\n protected async getOutput(action: IActionRdfJoin): Promise {\n const bindingsFactory = await BindingsFactory.create(this.mediatorMergeBindingsContext, action.context);\n // Close the right stream, since we don't need that one\n action.entries[1].output.bindingsStream.close();\n\n // Bind the right pattern for each binding in the stream\n const subContext = action.context\n .set(KeysQueryOperation.joinLeftMetadata, await action.entries[0].output.metadata())\n .set(KeysQueryOperation.joinRightMetadatas, [ await action.entries[1].output.metadata() ]);\n const bindingsStream: BindingsStream = ActorRdfJoinMultiBind.createBindStream(\n this.bindOrder,\n action.entries[0].output.bindingsStream,\n [ action.entries[1].operation ],\n async(operations: Algebra.Operation[], operationBindings: Bindings) => {\n // Send the materialized patterns to the mediator for recursive join evaluation.\n // Length of operations will always be 1\n const operation = operations[0];\n const output = ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate(\n { operation, context: subContext?.set(KeysQueryOperation.joinBindings, operationBindings) },\n ));\n return output.bindingsStream;\n },\n true,\n bindingsFactory,\n );\n\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n metadata: async() => await this.constructResultMetadata(\n action.entries,\n await ActorRdfJoin.getMetadatas(action.entries),\n action.context,\n { canContainUndefs: true },\n true,\n ),\n },\n };\n }\n\n public async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n // This actor only works well with common variables\n if (ActorRdfJoin.overlappingVariables(metadatas).length === 0) {\n throw new Error(`Actor ${this.name} only join entries with at least one common variable`);\n }\n\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n\n // Reject binding on some operation types\n if (action.entries[1].operation.type === Algebra.types.EXTEND ||\n action.entries[1].operation.type === Algebra.types.GROUP) {\n throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);\n }\n\n // Determine selectivity of join\n const selectivity = (await this.mediatorJoinSelectivity.mediate({\n entries: action.entries,\n context: action.context,\n })).selectivity * this.selectivityModifier;\n\n return {\n iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value * selectivity,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] +\n metadatas[0].cardinality.value * (\n requestItemTimes[0] +\n requestInitialTimes[1] +\n selectivity * metadatas[1].cardinality.value * requestItemTimes[1]\n ),\n };\n }\n}\n\nexport interface IActorRdfJoinOptionalBindArgs extends IActorRdfJoinArgs {\n /**\n * The order in which elements should be bound\n * @default {depth-first}\n */\n bindOrder: BindOrder;\n /**\n * Multiplier for selectivity values\n * @range {double}\n * @default {0.000001}\n */\n selectivityModifier: number;\n /**\n * The query operation mediator\n */\n mediatorQueryOperation: MediatorQueryOperation;\n /**\n * A mediator for creating binding context merge handlers\n */\n mediatorMergeBindingsContext: MediatorMergeBindingsContext;\n\n}\n","import { ClosableTransformIterator } from '@comunica/bus-query-operation';\nimport { ActorRdfJoin } from '@comunica/bus-rdf-join';\nimport type {\n IActionRdfJoin,\n IActorRdfJoinArgs,\n IActorRdfJoinOutputInner,\n} from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { BindingsStream, MetadataBindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { AsyncIterator } from 'asynciterator';\nimport { UnionIterator, ArrayIterator, MultiTransformIterator, BufferedIterator } from 'asynciterator';\nimport { termToString } from 'rdf-string';\nimport { BindingsIndexDef } from './BindingsIndexDef';\nimport { BindingsIndexUndef } from './BindingsIndexUndef';\nimport type { IBindingsIndex } from './IBindingsIndex';\n\n/**\n * A comunica Optional Hash RDF Join Actor.\n */\nexport class ActorRdfJoinOptionalHash extends ActorRdfJoin {\n private readonly blocking: boolean;\n\n public constructor(args: IActorRdfJoinOptionalHashArgs) {\n super(args, {\n logicalType: 'optional',\n physicalName: `hash-${args.canHandleUndefs ? 'undef' : 'def'}-${args.blocking ? 'blocking' : 'nonblocking'}`,\n limitEntries: 2,\n canHandleUndefs: args.canHandleUndefs,\n requiresVariableOverlap: true,\n });\n }\n\n public static constructIndex(undef: boolean, commonVariables: RDF.Variable[]): IBindingsIndex {\n return undef ?\n new BindingsIndexUndef(\n commonVariables,\n (term: RDF.Term | undefined) => term && term.termType !== 'Variable' ? termToString(term) : '',\n ) :\n new BindingsIndexDef(commonVariables, ActorRdfJoin.hashNonClashing);\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n const buffer = action.entries[1].output;\n const output = action.entries[0].output;\n\n const metadatas = await ActorRdfJoin.getMetadatas(action.entries);\n const commonVariables: RDF.Variable[] = ActorRdfJoin.overlappingVariables(metadatas);\n\n let bindingsStream: BindingsStream;\n if (this.blocking) {\n // -- Blocking optional ---\n\n bindingsStream = new ClosableTransformIterator(async() => {\n // We index all bindings from the right-hand OPTIONAL iterator first in a blocking manner.\n const index: IBindingsIndex = ActorRdfJoinOptionalHash\n .constructIndex(this.canHandleUndefs, commonVariables);\n await new Promise((resolve) => {\n buffer.bindingsStream.on('data', (bindings) => {\n const iterator = index.getFirst(bindings) ?? index.put(bindings, []);\n iterator.push(bindings);\n });\n buffer.bindingsStream.on('end', resolve);\n buffer.bindingsStream.on('error', (error) => {\n bindingsStream.emit('error', error);\n });\n });\n\n // Start our left-hand iterator and try to join with the index\n return new MultiTransformIterator(\n output.bindingsStream,\n {\n multiTransform: (bindings: RDF.Bindings): AsyncIterator => new ArrayIterator(\n (index.get(bindings).flat())\n .map(indexBindings => ActorRdfJoin.joinBindings(bindings, indexBindings))\n .filter(b => b !== null),\n { autoStart: false },\n ),\n optional: true,\n autoStart: false,\n },\n );\n }, {\n autoStart: false,\n onClose() {\n buffer.bindingsStream.destroy();\n output.bindingsStream.destroy();\n },\n });\n } else {\n // -- Non-blocking optional ---\n // This can be slightly slower than the blocking one above, due to the streaming overhead.\n\n bindingsStream = new ClosableTransformIterator(async() => {\n // We index all bindings from the right-hand OPTIONAL iterator.\n // They are indexed with iterator values, so our main stream can already get started.\n const index: IBindingsIndex> = ActorRdfJoinOptionalHash\n .constructIndex(this.canHandleUndefs, commonVariables);\n let indexActive = true;\n buffer.bindingsStream.on('data', (bindings) => {\n const iterator = index.getFirst(bindings) ??\n index.put(bindings, new BufferedIterator({ autoStart: false }));\n ( iterator)._push(bindings);\n });\n buffer.bindingsStream.on('end', () => {\n for (const iterator of index.values()) {\n iterator.close();\n }\n indexActive = false;\n });\n buffer.bindingsStream.on('error', (error) => {\n bindingsStream.emit('error', error);\n });\n\n // Start our left-hand iterator and try to join with the index\n return new MultiTransformIterator(\n output.bindingsStream,\n {\n multiTransform: (bindings: RDF.Bindings): AsyncIterator => {\n // Find iterators from the index\n let iterators: AsyncIterator[] = index.get(bindings);\n\n // If no index entry was found, set an empty iterator.\n // If we index has been closed already, don't modify the index, but just use an empty dummy iterator.\n if (iterators.length === 0) {\n if (indexActive) {\n iterators = [ index.put(bindings, new BufferedIterator({ autoStart: false })) ];\n } else {\n iterators = [];\n }\n }\n\n // Merge all iterators in a single one,\n // and clone each one to make sure we can still use them in the future.\n const iterator = new UnionIterator(iterators.map(it => it.clone()), { autoStart: false });\n return iterator.map(indexBindings => ActorRdfJoin.joinBindings(bindings, indexBindings));\n },\n optional: true,\n autoStart: false,\n },\n );\n }, {\n autoStart: false,\n onClose() {\n buffer.bindingsStream.destroy();\n output.bindingsStream.destroy();\n },\n });\n }\n\n return {\n result: {\n type: 'bindings',\n bindingsStream,\n metadata: async() => await this.constructResultMetadata(\n action.entries,\n await ActorRdfJoin.getMetadatas(action.entries),\n action.context,\n { canContainUndefs: true },\n true,\n ),\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n let iterations = metadatas[0].cardinality.value + metadatas[1].cardinality.value;\n if (!this.canHandleUndefs) {\n // Our non-undef implementation is slightly more performant.\n iterations *= 0.8;\n }\n if (this.blocking) {\n // Our blocking implementation is slightly more performant.\n iterations *= 0.9;\n }\n return {\n iterations,\n persistedItems: metadatas[0].cardinality.value,\n blockingItems: this.blocking ? metadatas[0].cardinality.value : 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n\nexport interface IActorRdfJoinOptionalHashArgs extends IActorRdfJoinArgs {\n /**\n * If this actor can handle undefined values.\n * If false, performance will be slightly better.\n */\n canHandleUndefs: boolean;\n /**\n * If the join will block when collecting the optional stream.\n * If true, performance will be better.\n */\n blocking: boolean;\n}\n","import type * as RDF from '@rdfjs/types';\nimport type { IBindingsIndex } from './IBindingsIndex';\n\n/**\n * A simple efficient hash-based index for maintaining bindings,\n * and checking whether or not a bindings is contained in this index.\n *\n * This can not handle bindings with undefined values.\n */\nexport class BindingsIndexDef implements IBindingsIndex {\n private readonly keys: RDF.Variable[];\n private readonly hashFn: (term: RDF.Bindings, keys: RDF.Variable[]) => string;\n private readonly index: Record;\n\n public constructor(keys: RDF.Variable[], hashFn: (term: RDF.Bindings, keys: RDF.Variable[]) => string) {\n this.keys = keys;\n this.hashFn = hashFn;\n this.index = {};\n }\n\n public put(bindings: RDF.Bindings, value: V): V {\n return this.index[this.hashFn(bindings, this.keys)] = value;\n }\n\n public get(bindings: RDF.Bindings): V[] {\n const v = this.getFirst(bindings);\n return v ? [ v ] : [];\n }\n\n public getFirst(bindings: RDF.Bindings): V | undefined {\n return this.index[this.hashFn(bindings, this.keys)];\n }\n\n public values(): V[] {\n return Object.values(this.index);\n }\n}\n","import type { Bindings } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport type { IBindingsIndex } from './IBindingsIndex';\n\n/**\n * A simple efficient tree-based index for maintaining bindings,\n * and checking whether or not a bindings is contained in this index.\n *\n * This will consider bindings with a variable term or an undefined term\n * as a 'match-all' with other terms.\n */\nexport class BindingsIndexUndef implements IBindingsIndex {\n private readonly keys: RDF.Variable[];\n private readonly data: IDataIndex = {};\n private readonly hashFn: (term: RDF.Term | undefined) => string;\n\n public constructor(keys: RDF.Variable[], hashFn: (term: RDF.Term | undefined) => string) {\n this.keys = keys;\n this.hashFn = hashFn;\n }\n\n /**\n * Add the given bindings to the index.\n * @param {Bindings} bindings A bindings.\n * @param {V} value The value to put.\n */\n public put(bindings: Bindings, value: V): V {\n if (this.isBindingsValid(bindings)) {\n let dataIt: IDataIndex | V = this.data;\n for (let i = 0; i < this.keys.length; i++) {\n const key = this.keys[i];\n const dataKey = this.hashFn(bindings.get(key));\n let subDataIt: IDataIndex | V | undefined = (> dataIt)[dataKey];\n if (!subDataIt) {\n subDataIt = ((> dataIt))[dataKey] = i === this.keys.length - 1 ? value : {};\n }\n dataIt = subDataIt;\n }\n }\n return value;\n }\n\n protected isBindingsValid(bindings: Bindings): boolean {\n let validKeys = false;\n for (const key of this.keys) {\n if (bindings.has(key)) {\n validKeys = true;\n break;\n }\n }\n return validKeys;\n }\n\n /**\n * Get the value of the given bindings is contained in this index.\n * @param {Bindings} bindings A bindings.\n * @return {V[]} The values.\n */\n public get(bindings: Bindings): V[] {\n // Always return undefined if the bindings contain none of the expected keys\n if (!this.isBindingsValid(bindings)) {\n return [];\n }\n\n return this.getRecursive(bindings, this.keys, [ this.data ]);\n }\n\n protected getRecursive(bindings: Bindings | undefined, keys: RDF.Variable[], dataIndexes: IDataIndex[]): V[] {\n if (keys.length === 0) {\n return dataIndexes;\n }\n\n let key: RDF.Variable;\n // eslint-disable-next-line prefer-const\n [ key, ...keys ] = keys;\n const matchingRecursive: V[][] = [];\n for (const data of dataIndexes) {\n // If the index contained a variable, all terms will match.\n const dataKey = this.hashFn(bindings?.get(key));\n if (dataKey) {\n // Check the entry for the term, and the variable term.\n const subDatas = []> [ data[dataKey], data[''] ].filter(Boolean);\n if (subDatas.length === 0) {\n continue;\n }\n matchingRecursive.push(this.getRecursive(bindings, keys, subDatas));\n } else {\n // Iterate over all entries\n const subDatas = []> Object.values(data);\n if (subDatas.length === 0) {\n continue;\n }\n matchingRecursive.push(this.getRecursive(bindings, keys, subDatas));\n }\n }\n return matchingRecursive.flat();\n }\n\n /**\n * Get the first value of the given bindings is contained in this index.\n * @param {Bindings} bindings A bindings.\n * @return {V | undefined} The value.\n */\n public getFirst(bindings: Bindings): V | undefined {\n // Always return undefined if the bindings contain none of the expected keys\n if (!this.isBindingsValid(bindings)) {\n return undefined;\n }\n\n return this.getRecursiveFirst(bindings, this.keys, [ this.data ]);\n }\n\n protected getRecursiveFirst(bindings: Bindings, keys: RDF.Variable[], dataIndexes: IDataIndex[]): V | undefined {\n if (keys.length === 0) {\n return dataIndexes[0];\n }\n\n let key: RDF.Variable;\n // eslint-disable-next-line prefer-const\n [ key, ...keys ] = keys;\n for (const data of dataIndexes) {\n // If the index contained a variable, all terms will match.\n const dataKey = this.hashFn(bindings.get(key));\n if (dataKey) {\n // Check the entry for the term, and the variable term.\n const subDatas = []> [ data[dataKey], data[''] ].filter(Boolean);\n if (subDatas.length === 0) {\n continue;\n }\n const ret = this.getRecursiveFirst(bindings, keys, subDatas);\n if (ret) {\n return ret;\n }\n } else {\n // Iterate over all entries\n const subDatas = []> Object.values(data);\n if (subDatas.length === 0) {\n continue;\n }\n const ret = this.getRecursiveFirst(bindings, keys, subDatas);\n if (ret) {\n return ret;\n }\n }\n }\n return undefined;\n }\n\n public values(): V[] {\n return this.keys.length === 0 ? [] : this.getRecursive(undefined, this.keys, [ this.data ]);\n }\n}\n\nexport interface IDataIndex {\n [key: string]: IDataIndex | V;\n}\n","import type { IActionRdfJoin, IActorRdfJoinOutputInner, IActorRdfJoinArgs } from '@comunica/bus-rdf-join';\nimport {\n ActorRdfJoin,\n} from '@comunica/bus-rdf-join';\nimport type { IMediatorTypeJoinCoefficients } from '@comunica/mediatortype-join-coefficients';\nimport type { Bindings, MetadataBindings } from '@comunica/types';\nimport { NestedLoopJoin } from 'asyncjoin';\n\n/**\n * A comunica Optional Nested Loop RDF Join Actor.\n */\nexport class ActorRdfJoinOptionalNestedLoop extends ActorRdfJoin {\n public constructor(args: IActorRdfJoinArgs) {\n super(args, {\n logicalType: 'optional',\n physicalName: 'nested-loop',\n limitEntries: 2,\n canHandleUndefs: true,\n });\n }\n\n public async getOutput(action: IActionRdfJoin): Promise {\n const join = new NestedLoopJoin(\n action.entries[0].output.bindingsStream,\n action.entries[1].output.bindingsStream,\n ActorRdfJoin.joinBindings,\n { optional: true, autoStart: false },\n );\n return {\n result: {\n type: 'bindings',\n bindingsStream: join,\n metadata: async() => await this.constructResultMetadata(\n action.entries,\n await ActorRdfJoin.getMetadatas(action.entries),\n action.context,\n { canContainUndefs: true },\n true,\n ),\n },\n };\n }\n\n protected async getJoinCoefficients(\n action: IActionRdfJoin,\n metadatas: MetadataBindings[],\n ): Promise {\n const requestInitialTimes = ActorRdfJoin.getRequestInitialTimes(metadatas);\n const requestItemTimes = ActorRdfJoin.getRequestItemTimes(metadatas);\n return {\n iterations: metadatas[0].cardinality.value * metadatas[1].cardinality.value,\n persistedItems: 0,\n blockingItems: 0,\n requestTime: requestInitialTimes[0] + metadatas[0].cardinality.value * requestItemTimes[0] +\n requestInitialTimes[1] + metadatas[1].cardinality.value * requestItemTimes[1],\n };\n }\n}\n","import type { IActionRdfJoinSelectivity, IActorRdfJoinSelectivityOutput } from '@comunica/bus-rdf-join-selectivity';\nimport { ActorRdfJoinSelectivity } from '@comunica/bus-rdf-join-selectivity';\nimport type { IActorArgs } from '@comunica/core';\nimport type { IMediatorTypeAccuracy } from '@comunica/mediatortype-accuracy';\nimport { Algebra, Util } from 'sparqlalgebrajs';\n\n/**\n * A comunica Variable Counting RDF Join Selectivity Actor.\n * Based on the \"variable counting predicates\" heuristic from\n * \"SPARQL basic graph pattern optimization using selectivity estimation.\"\n */\nexport class ActorRdfJoinSelectivityVariableCounting extends ActorRdfJoinSelectivity {\n // Calculated as sum of unbound join type costs times 2 (best-case)\n public static MAX_PAIRWISE_COST = 41 * 2;\n\n public constructor(\n args: IActorArgs,\n ) {\n super(args);\n }\n\n public async test(_action: IActionRdfJoinSelectivity): Promise {\n return { accuracy: 0.5 };\n }\n\n public static getPatternCost(pattern: Algebra.Pattern | Algebra.Path): number {\n let cost = 1;\n if (pattern.subject.termType === 'Variable') {\n cost += 4;\n }\n if (pattern.predicate.termType === 'Variable' || pattern.type === Algebra.types.PATH) {\n cost += 1;\n }\n if (pattern.object.termType === 'Variable') {\n cost += 2;\n }\n if (pattern.graph.termType === 'Variable') {\n cost += 1;\n }\n return cost / 9;\n }\n\n public static getJoinTypes(\n operation1: Algebra.Pattern | Algebra.Path,\n operation2: Algebra.Pattern | Algebra.Path,\n ): JoinTypes[] {\n const joinTypes: JoinTypes[] = [];\n\n // Check operation1.subject\n if (operation1.subject.termType === 'Variable') {\n if (operation1.subject.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.unboundSS);\n }\n if (operation2.type === 'pattern' && operation1.subject.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.unboundSP);\n }\n if (operation1.subject.equals(operation2.object)) {\n joinTypes.push(JoinTypes.unboundSO);\n }\n if (operation1.subject.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.unboundSG);\n }\n } else {\n if (operation1.subject.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.boundSS);\n }\n if (operation2.type === 'pattern' && operation1.subject.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.boundSP);\n }\n if (operation1.subject.equals(operation2.object)) {\n joinTypes.push(JoinTypes.boundSO);\n }\n if (operation1.subject.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.boundSG);\n }\n }\n\n // Check operation1.predicate\n if (operation1.type === 'pattern') {\n if (operation1.predicate.termType === 'Variable') {\n if (operation1.predicate.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.unboundPS);\n }\n if (operation2.type === 'pattern' && operation1.predicate.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.unboundPP);\n }\n if (operation1.predicate.equals(operation2.object)) {\n joinTypes.push(JoinTypes.unboundPO);\n }\n if (operation1.predicate.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.unboundPG);\n }\n } else {\n if (operation1.predicate.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.boundPS);\n }\n if (operation2.type === 'pattern' && operation1.predicate.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.boundPP);\n }\n if (operation1.predicate.equals(operation2.object)) {\n joinTypes.push(JoinTypes.boundPO);\n }\n if (operation1.predicate.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.boundPG);\n }\n }\n }\n\n // Check operation1.object\n if (operation1.object.termType === 'Variable') {\n if (operation1.object.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.unboundOS);\n }\n if (operation2.type === 'pattern' && operation1.object.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.unboundOP);\n }\n if (operation1.object.equals(operation2.object)) {\n joinTypes.push(JoinTypes.unboundOO);\n }\n if (operation1.object.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.unboundOG);\n }\n } else {\n if (operation1.object.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.boundOS);\n }\n if (operation2.type === 'pattern' && operation1.object.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.boundOP);\n }\n if (operation1.object.equals(operation2.object)) {\n joinTypes.push(JoinTypes.boundOO);\n }\n if (operation1.object.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.boundOG);\n }\n }\n\n // Check operation1.graph\n if (operation1.graph.termType === 'Variable') {\n if (operation1.graph.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.unboundGS);\n }\n if (operation2.type === 'pattern' && operation1.graph.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.unboundGP);\n }\n if (operation1.graph.equals(operation2.object)) {\n joinTypes.push(JoinTypes.unboundGO);\n }\n if (operation1.graph.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.unboundGG);\n }\n } else {\n if (operation1.graph.equals(operation2.subject)) {\n joinTypes.push(JoinTypes.boundGS);\n }\n if (operation2.type === 'pattern' && operation1.graph.equals(operation2.predicate)) {\n joinTypes.push(JoinTypes.boundGP);\n }\n if (operation1.graph.equals(operation2.object)) {\n joinTypes.push(JoinTypes.boundGO);\n }\n if (operation1.graph.equals(operation2.graph)) {\n joinTypes.push(JoinTypes.boundGG);\n }\n }\n\n return joinTypes;\n }\n\n public static getOperationsPairwiseJoinCost(\n operation1: Algebra.Pattern | Algebra.Path,\n operation2: Algebra.Pattern | Algebra.Path,\n ): number {\n let cost = ActorRdfJoinSelectivityVariableCounting.MAX_PAIRWISE_COST;\n\n for (const joinType of ActorRdfJoinSelectivityVariableCounting.getJoinTypes(operation1, operation2)) {\n switch (joinType) {\n case JoinTypes.boundSS:\n cost -= 2 * 2;\n break;\n case JoinTypes.boundSP:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundSO:\n cost -= 1 * 2;\n break;\n case JoinTypes.boundSG:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundPS:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundPP:\n // Special case: patterns with equal (bound) predicates have the highest cost\n return 1;\n case JoinTypes.boundPO:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundPG:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundOS:\n cost -= 1 * 2;\n break;\n case JoinTypes.boundOP:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundOO:\n cost -= 1 * 2;\n break;\n case JoinTypes.boundOG:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundGS:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundGP:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundGO:\n cost -= 3 * 2;\n break;\n case JoinTypes.boundGG:\n cost -= 3 * 2;\n break;\n case JoinTypes.unboundSS:\n cost -= 2;\n break;\n case JoinTypes.unboundSP:\n cost -= 3;\n break;\n case JoinTypes.unboundSO:\n cost -= 1;\n break;\n case JoinTypes.unboundSG:\n cost -= 3;\n break;\n case JoinTypes.unboundPS:\n cost -= 3;\n break;\n case JoinTypes.unboundPP:\n cost -= 3;\n break;\n case JoinTypes.unboundPO:\n cost -= 3;\n break;\n case JoinTypes.unboundPG:\n cost -= 3;\n break;\n case JoinTypes.unboundOS:\n cost -= 1;\n break;\n case JoinTypes.unboundOP:\n cost -= 3;\n break;\n case JoinTypes.unboundOO:\n cost -= 1;\n break;\n case JoinTypes.unboundOG:\n cost -= 3;\n break;\n case JoinTypes.unboundGS:\n cost -= 3;\n break;\n case JoinTypes.unboundGP:\n cost -= 3;\n break;\n case JoinTypes.unboundGO:\n cost -= 3;\n break;\n case JoinTypes.unboundGG:\n cost -= 3;\n break;\n }\n }\n\n return cost / ActorRdfJoinSelectivityVariableCounting.MAX_PAIRWISE_COST;\n }\n\n public static getOperationsJoinCost(operations: Algebra.Operation[]): number {\n // Determine all operations that select values (patterns and paths)\n const patterns: (Algebra.Pattern | Algebra.Path)[] = [];\n for (const operation of operations) {\n Util.recurseOperation(operation, {\n [Algebra.types.PATTERN](pattern: Algebra.Pattern): boolean {\n patterns.push(pattern);\n return false;\n },\n [Algebra.types.PATH](path: Algebra.Path): boolean {\n patterns.push(path);\n return false;\n },\n });\n }\n\n // Determine pairwise costs\n let totalCost = 0;\n let costEntries = 0;\n for (const pattern1 of patterns) {\n for (const pattern2 of patterns) {\n if (pattern1 !== pattern2) {\n totalCost += ActorRdfJoinSelectivityVariableCounting.getOperationsPairwiseJoinCost(pattern1, pattern2);\n costEntries++;\n }\n }\n }\n\n // If there are no overlapping patterns, the cost is 1\n if (costEntries === 0) {\n return 1;\n }\n\n // Combine all pairwise costs, and multiply with costs of each pattern separately\n return totalCost / costEntries * patterns\n .reduce((factor, pattern) => factor * ActorRdfJoinSelectivityVariableCounting.getPatternCost(pattern), 1);\n }\n\n public async run(action: IActionRdfJoinSelectivity): Promise {\n if (action.entries.length <= 1) {\n return { selectivity: 1 };\n }\n return {\n selectivity: ActorRdfJoinSelectivityVariableCounting\n .getOperationsJoinCost(action.entries.map(entry => entry.operation)),\n };\n }\n}\n\nexport enum JoinTypes {\n boundSS,\n boundSP,\n boundSO,\n boundSG,\n boundPS,\n boundPP,\n boundPO,\n boundPG,\n boundOS,\n boundOP,\n boundOO,\n boundOG,\n boundGS,\n boundGP,\n boundGO,\n boundGG,\n\n unboundSS,\n unboundSP,\n unboundSO,\n unboundSG,\n unboundPS,\n unboundPP,\n unboundPO,\n unboundPG,\n unboundOS,\n unboundOP,\n unboundOO,\n unboundOG,\n unboundGS,\n unboundGP,\n unboundGO,\n unboundGG,\n}\n","import type {\n IActionRdfMetadataAccumulate,\n IActorRdfMetadataAccumulateOutput,\n IActorRdfMetadataAccumulateArgs,\n} from '@comunica/bus-rdf-metadata-accumulate';\nimport { ActorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica CanContainUndefs RDF Metadata Accumulate Actor.\n */\nexport class ActorRdfMetadataAccumulateCanContainUndefs extends ActorRdfMetadataAccumulate {\n public constructor(args: IActorRdfMetadataAccumulateArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataAccumulate): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataAccumulate): Promise {\n // Return default value on initialize\n if (action.mode === 'initialize') {\n return { metadata: { canContainUndefs: false }};\n }\n\n // Otherwise, attempt to increment existing value\n let canContainUndefs = action.accumulatedMetadata.canContainUndefs;\n if (action.appendingMetadata.canContainUndefs) {\n canContainUndefs = true;\n }\n return { metadata: { canContainUndefs }};\n }\n}\n","import type {\n IActionRdfMetadataAccumulate,\n IActorRdfMetadataAccumulateOutput,\n IActorRdfMetadataAccumulateArgs,\n} from '@comunica/bus-rdf-metadata-accumulate';\nimport { ActorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { IActorTest } from '@comunica/core';\nimport type { QueryResultCardinality } from '@comunica/types';\n\n/**\n * A comunica Cardinality RDF Metadata Accumulate Actor.\n */\nexport class ActorRdfMetadataAccumulateCardinality extends ActorRdfMetadataAccumulate {\n public constructor(args: IActorRdfMetadataAccumulateArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataAccumulate): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataAccumulate): Promise {\n // Return default value on initialize\n if (action.mode === 'initialize') {\n return { metadata: { cardinality: { type: 'exact', value: 0 }}};\n }\n\n // Otherwise, attempt to update existing value\n const cardinality: QueryResultCardinality = { ...action.accumulatedMetadata.cardinality };\n\n if (cardinality.dataset) {\n if (action.appendingMetadata.cardinality.dataset) {\n // If the accumulated cardinality is dataset-wide\n if (cardinality.dataset !== action.appendingMetadata.cardinality.dataset &&\n action.appendingMetadata.subsetOf === cardinality.dataset) {\n // If the appending cardinality refers to the subset of a dataset,\n // use the cardinality of the subset.\n return { metadata: { cardinality: action.appendingMetadata.cardinality }};\n }\n if (cardinality.dataset === action.appendingMetadata.cardinality.dataset) {\n // If the appending cardinality is for the same dataset,\n // keep the accumulated cardinality unchanged.\n return { metadata: { cardinality }};\n }\n // If the appending cardinality refers to another dataset,\n // remove the dataset scopes.\n delete cardinality.dataset;\n } else {\n // If the appending cardinality refers to a dataset subset,\n // keep the accumulated cardinality unchanged.\n return { metadata: { cardinality }};\n }\n }\n\n if (!action.appendingMetadata.cardinality || !Number.isFinite(action.appendingMetadata.cardinality.value)) {\n // We're already at infinite, so ignore any later metadata\n cardinality.type = 'estimate';\n cardinality.value = Number.POSITIVE_INFINITY;\n } else {\n if (action.appendingMetadata.cardinality.type === 'estimate') {\n cardinality.type = 'estimate';\n }\n cardinality.value += action.appendingMetadata.cardinality.value;\n }\n\n return { metadata: { cardinality }};\n }\n}\n","import type {\n IActionRdfMetadataAccumulate,\n IActorRdfMetadataAccumulateOutput,\n IActorRdfMetadataAccumulateArgs,\n} from '@comunica/bus-rdf-metadata-accumulate';\nimport { ActorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica PageSize RDF Metadata Accumulate Actor.\n */\nexport class ActorRdfMetadataAccumulatePageSize extends ActorRdfMetadataAccumulate {\n public constructor(args: IActorRdfMetadataAccumulateArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataAccumulate): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataAccumulate): Promise {\n // Return nothing on initialize\n if (action.mode === 'initialize') {\n return { metadata: {}};\n }\n\n // Otherwise, attempt to increment existing value\n return {\n metadata: {\n ...('pageSize' in action.accumulatedMetadata) || ('pageSize' in action.appendingMetadata) ?\n {\n pageSize: (action.accumulatedMetadata.pageSize ?? 0) + (action.appendingMetadata.pageSize ?? 0),\n } :\n {},\n },\n };\n }\n}\n","import type {\n IActionRdfMetadataAccumulate,\n IActorRdfMetadataAccumulateOutput,\n IActorRdfMetadataAccumulateArgs,\n} from '@comunica/bus-rdf-metadata-accumulate';\nimport { ActorRdfMetadataAccumulate } from '@comunica/bus-rdf-metadata-accumulate';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica RequestTime RDF Metadata Accumulate Actor.\n */\nexport class ActorRdfMetadataAccumulateRequestTime extends ActorRdfMetadataAccumulate {\n public constructor(args: IActorRdfMetadataAccumulateArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataAccumulate): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataAccumulate): Promise {\n // Return nothing on initialize\n if (action.mode === 'initialize') {\n return { metadata: {}};\n }\n\n // Otherwise, attempt to increment existing value\n return {\n metadata: {\n ...('requestTime' in action.accumulatedMetadata) || ('requestTime' in action.appendingMetadata) ?\n {\n requestTime: (action.accumulatedMetadata.requestTime ?? 0) + (action.appendingMetadata.requestTime ?? 0),\n } :\n {},\n },\n };\n }\n}\n","import type { IActionRdfMetadata, IActorRdfMetadataArgs, IActorRdfMetadataOutput } from '@comunica/bus-rdf-metadata';\nimport { ActorRdfMetadata } from '@comunica/bus-rdf-metadata';\nimport type { IActorTest } from '@comunica/core';\nimport { Readable } from 'readable-stream';\n\n/**\n * A comunica All RDF Metadata Actor.\n */\nexport class ActorRdfMetadataAll extends ActorRdfMetadata {\n public constructor(args: IActorRdfMetadataArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadata): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadata): Promise {\n const data: Readable = new Readable({ objectMode: true });\n const metadata: Readable = new Readable({ objectMode: true });\n\n // Forward errors (attach them immediately as they could arrive earlier)\n action.quads.on('error', (error) => {\n data.emit('error', error);\n metadata.emit('error', error);\n });\n\n // Terminate both streams on-end\n action.quads.on('end', () => {\n data.push(null);\n metadata.push(null);\n });\n\n const read: (size: number) => void = data._read = metadata._read = (size) => {\n while (size > 0) {\n const item = action.quads.read();\n if (item === null) {\n return action.quads.once('readable', () => read(size));\n }\n size--;\n data.push(item);\n metadata.push(item);\n }\n };\n\n return { data, metadata };\n }\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractArgs,\n IActorRdfMetadataExtractOutput,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica Allow HTTP Methods RDF Metadata Extract Actor.\n */\nexport class ActorRdfMetadataExtractAllowHttpMethods extends ActorRdfMetadataExtract {\n public constructor(args: IActorRdfMetadataExtractArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n const metadata: Record = {};\n if (action.headers?.get('allow')) {\n metadata.allowHttpMethods = action.headers.get('allow')?.split(/, */u);\n }\n return { metadata };\n }\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\nimport type * as RDF from '@rdfjs/types';\nimport type { UriTemplate } from 'uritemplate';\nimport { parse as parseUriTemplate } from 'uritemplate';\n\n/**\n * An RDF Metadata Extract Actor that extracts all Hydra controls from the metadata stream.\n */\nexport class ActorRdfMetadataExtractHydraControls extends ActorRdfMetadataExtract {\n public static readonly HYDRA: string = 'http://www.w3.org/ns/hydra/core#';\n public static readonly LINK_TYPES: string[] = [ 'first', 'next', 'previous', 'last' ];\n protected readonly parsedUriTemplateCache: Record = {};\n\n public constructor(args: IActorRdfMetadataExtractArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n /**\n * Collect all Hydra page links from the given Hydra properties object.\n * @param pageUrl The page URL in which the Hydra properties are defined.\n * @param hydraProperties The collected Hydra properties.\n * @return The Hydra links\n */\n public getLinks(pageUrl: string, hydraProperties: Record>):\n Record {\n return Object.fromEntries(ActorRdfMetadataExtractHydraControls.LINK_TYPES.map((link) => {\n // First check the correct hydra:next, then the deprecated hydra:nextPage\n const links = hydraProperties[link] || hydraProperties[`${link}Page`];\n const linkTargets = links && links[pageUrl];\n return [ link, linkTargets && linkTargets.length > 0 ? [ linkTargets[0] ] : [] ];\n }));\n }\n\n /**\n * Parse a URI template, or retrieve it from a cache.\n * @param {string} template A URI template string.\n * @return {} A parsed URI template object.\n */\n public parseUriTemplateCached(template: string): UriTemplate {\n const cachedUriTemplate: UriTemplate = this.parsedUriTemplateCache[template];\n if (cachedUriTemplate) {\n return cachedUriTemplate;\n }\n\n return this.parsedUriTemplateCache[template] = parseUriTemplate(template);\n }\n\n /**\n * Collect all search forms from the given Hydra properties object.\n * @param hydraProperties The collected Hydra properties.\n * @return The search forms.\n */\n public getSearchForms(hydraProperties: Record>): ISearchForms {\n const searchFormData: Record = hydraProperties.search;\n const searchForms: ISearchForm[] = [];\n if (searchFormData) {\n for (const dataset in searchFormData) {\n for (const searchFormId of searchFormData[dataset]) {\n const searchTemplates = (hydraProperties.template || {})[searchFormId] || [];\n\n // Parse the template\n if (searchTemplates.length !== 1) {\n throw new Error(`Expected 1 hydra:template for ${searchFormId}`);\n }\n const template: string = searchTemplates[0];\n const searchTemplate: UriTemplate = this.parseUriTemplateCached(template);\n\n // Parse the template mappings\n const mappings: Record = Object\n .fromEntries(((hydraProperties.mapping || {})[searchFormId] || [])\n .map((mapping) => {\n const variable = ((hydraProperties.variable || {})[mapping] || [])[0];\n const property = ((hydraProperties.property || {})[mapping] || [])[0];\n if (!variable) {\n throw new Error(`Expected a hydra:variable for ${mapping}`);\n }\n if (!property) {\n throw new Error(`Expected a hydra:property for ${mapping}`);\n }\n return [ property, variable ];\n }));\n\n // Gets the URL of the Triple Pattern Fragment with the given triple pattern\n const getUri = (entries: Record): string => searchTemplate\n .expand(Object.fromEntries(Object.keys(entries).map(key => [ mappings[key], entries[key] ])));\n\n searchForms.push({ dataset, template, mappings, getUri });\n }\n }\n }\n return { values: searchForms };\n }\n\n /**\n * Collect all hydra properties from a given metadata stream\n * in a nice convenient nested hash (property / subject / objects).\n * @param {RDF.Stream} metadata\n * @return The collected Hydra properties.\n */\n public getHydraProperties(metadata: RDF.Stream): Promise>> {\n return new Promise((resolve, reject) => {\n metadata.on('error', reject);\n\n // Collect all hydra properties in a nice convenient nested hash (property / subject / objects).\n const hydraProperties: Record> = {};\n metadata.on('data', (quad) => {\n if (quad.predicate.value.startsWith(ActorRdfMetadataExtractHydraControls.HYDRA)) {\n const property = quad.predicate.value.slice(ActorRdfMetadataExtractHydraControls.HYDRA.length);\n const subjectProperties = hydraProperties[property] || (hydraProperties[property] = {});\n const objects = subjectProperties[quad.subject.value] || (subjectProperties[quad.subject.value] = []);\n objects.push(quad.object.value);\n }\n });\n\n metadata.on('end', () => resolve(hydraProperties));\n });\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n const metadata: IActorRdfMetadataExtractOutput['metadata'] = {};\n const hydraProperties = await this.getHydraProperties(action.metadata);\n Object.assign(metadata, this.getLinks(action.url, hydraProperties));\n metadata.searchForms = this.getSearchForms(hydraProperties);\n return { metadata };\n }\n}\n\nexport interface ISearchForm {\n /**\n * The dataset in which the search form is defined.\n */\n dataset: string;\n /**\n * The URI template containing Hydra variables.\n */\n template: string;\n /**\n * The mappings.\n * With as keys the Hydra properties,\n * and as values the Hydra variables\n */\n mappings: Record;\n\n /**\n * Instantiate a uri based on the given Hydra variable values.\n * @param entries Entries with as keys Hydra properties,\n * and as values Hydra variable values.\n * @return {string} The instantiated URI\n */\n getUri: (entries: Record) => string;\n}\n\nexport interface ISearchForms {\n /**\n * All available search forms.\n */\n values: ISearchForm[];\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * An RDF Metadata Extract Actor that extracts total items counts from a metadata stream based on the given predicates.\n */\nexport class ActorRdfMetadataExtractHydraCount extends ActorRdfMetadataExtract\n implements IActorRdfParseFixedMediaTypesArgs {\n public readonly predicates: string[];\n\n public constructor(args: IActorRdfParseFixedMediaTypesArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public run(action: IActionRdfMetadataExtract): Promise {\n return new Promise((resolve, reject) => {\n // Forward errors\n action.metadata.on('error', reject);\n\n // Immediately resolve when a value has been found.\n action.metadata.on('data', (quad) => {\n if (this.predicates.includes(quad.predicate.value)) {\n resolve({\n metadata: {\n cardinality: {\n type: 'estimate',\n value: Number.parseInt(quad.object.value, 10),\n dataset: quad.subject.value,\n },\n },\n });\n }\n });\n\n // If no value has been found, assume infinity.\n action.metadata.on('end', () => {\n resolve({ metadata: { cardinality: { type: 'estimate', value: 0 }}});\n });\n });\n }\n}\n\nexport interface IActorRdfParseFixedMediaTypesArgs extends IActorRdfMetadataExtractArgs {\n /**\n * A predicate that provides a count estimate\n * @default {http://www.w3.org/ns/hydra/core#totalItems}\n * @default {http://rdfs.org/ns/void#triples}\n */\n predicates: string[];\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica Hydra Pagesize RDF Metadata Extract Actor.\n */\nexport class ActorRdfMetadataExtractHydraPagesize extends ActorRdfMetadataExtract {\n public readonly predicates: string[];\n\n public constructor(args: IActorRdfMetadataExtractHydraPagesizeArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n return new Promise((resolve, reject) => {\n // Forward errors\n action.metadata.on('error', reject);\n\n // Immediately resolve when a value has been found.\n action.metadata.on('data', (quad) => {\n if (this.predicates.includes(quad.predicate.value)) {\n resolve({ metadata: { pageSize: Number.parseInt(quad.object.value, 10) }});\n }\n });\n\n // If no value has been found, don't define the pageSize value.\n action.metadata.on('end', () => {\n resolve({ metadata: {}});\n });\n });\n }\n}\n\nexport interface IActorRdfMetadataExtractHydraPagesizeArgs extends IActorRdfMetadataExtractArgs {\n /**\n * A predicate that provides the page size\n * @default {http://www.w3.org/ns/hydra/core#itemsPerPage}\n */\n predicates: string[];\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica Patch SPARQL Update RDF Metadata Extract Actor.\n */\nexport class ActorRdfMetadataExtractPatchSparqlUpdate extends ActorRdfMetadataExtract {\n public constructor(args: IActorRdfMetadataExtractArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n const metadata: IActorRdfMetadataExtractOutput['metadata'] = {};\n // The ms-author-via header is added for backwards-compatibility with old Solid servers\n if (\n action.headers?.get('accept-patch')?.includes('application/sparql-update') ??\n action.headers?.get('ms-author-via')?.includes('SPARQL')\n ) {\n metadata.patchSparqlUpdate = true;\n }\n return { metadata };\n }\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica PUT Accepted RDF Metadata Extract Actor.\n */\nexport class ActorRdfMetadataExtractPutAccepted extends ActorRdfMetadataExtract {\n public constructor(args: IActorRdfMetadataExtractArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n const metadata: IActorRdfMetadataExtractOutput['metadata'] = {};\n if (action.headers?.get('accept-put')) {\n metadata.putAccepted = action.headers.get('accept-put')?.split(/, */u);\n }\n return { metadata };\n }\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\n\n/**\n * A comunica Request Time RDF Metadata Extract Actor.\n */\nexport class ActorRdfMetadataExtractRequestTime extends ActorRdfMetadataExtract {\n public constructor(args: IActorRdfMetadataExtractArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n return { metadata: { requestTime: action.requestTime }};\n }\n}\n","import type {\n IActionRdfMetadataExtract,\n IActorRdfMetadataExtractOutput,\n IActorRdfMetadataExtractArgs,\n} from '@comunica/bus-rdf-metadata-extract';\nimport { ActorRdfMetadataExtract } from '@comunica/bus-rdf-metadata-extract';\nimport type { IActorTest } from '@comunica/core';\nimport { resolve as resolveIri } from 'relative-to-absolute-iri';\n\n/**\n * A comunica RDF Metadata Extract Actor for SPARQL service descriptions.\n */\nexport class ActorRdfMetadataExtractSparqlService extends ActorRdfMetadataExtract {\n private readonly inferHttpsEndpoint: boolean;\n\n public constructor(args: IActorRdfMetadataExtractSparqlServiceArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfMetadataExtract): Promise {\n return true;\n }\n\n public async run(action: IActionRdfMetadataExtract): Promise {\n return new Promise((resolve, reject) => {\n // Forward errors\n action.metadata.on('error', reject);\n\n // Immediately resolve when a SPARQL service endpoint URL has been found\n const metadata: any = {};\n action.metadata.on('data', (quad) => {\n if (quad.predicate.value === 'http://www.w3.org/ns/sparql-service-description#endpoint' &&\n (quad.subject.termType === 'BlankNode' || quad.subject.value === action.url)) {\n metadata.sparqlService = quad.object.termType === 'Literal' ?\n resolveIri(quad.object.value, action.url) :\n quad.object.value;\n\n // Fix a common mistake in SPARQL endpoint setups where HTTPS SD's refer to a non-existing HTTP API\n if (this.inferHttpsEndpoint &&\n action.url.startsWith('https') && !metadata.sparqlService.startsWith('https')) {\n metadata.sparqlService = metadata.sparqlService.replace('http:', 'https:');\n }\n } else if (quad.predicate.value === 'http://www.w3.org/ns/sparql-service-description#defaultGraph') {\n metadata.defaultGraph = quad.object.value;\n }\n });\n\n // If no value has been found, emit nothing.\n action.metadata.on('end', () => {\n resolve({ metadata });\n });\n });\n }\n}\n\nexport interface IActorRdfMetadataExtractSparqlServiceArgs extends IActorRdfMetadataExtractArgs {\n /**\n * If HTTPS endpoints should be forcefully used if the original URL was HTTPS-based\n * @default {true}\n */\n inferHttpsEndpoint: boolean;\n}\n","import type { IActionRdfMetadata, IActorRdfMetadataArgs, IActorRdfMetadataOutput } from '@comunica/bus-rdf-metadata';\nimport { ActorRdfMetadata } from '@comunica/bus-rdf-metadata';\nimport type { IActorTest } from '@comunica/core';\nimport type * as RDF from '@rdfjs/types';\nimport { Readable } from 'readable-stream';\n\n/**\n * An RDF Metadata Actor that splits off the metadata based on the existence of a 'foaf:primaryTopic' link.\n * Only non-triple quad streams are supported.\n */\nexport class ActorRdfMetadataPrimaryTopic extends ActorRdfMetadata {\n private readonly metadataToData: boolean;\n private readonly dataToMetadataOnInvalidMetadataGraph: boolean;\n\n public constructor(args: IActorRdfMetadataPrimaryTopicArgs) {\n super(args);\n }\n\n public async test(action: IActionRdfMetadata): Promise {\n if (action.triples) {\n throw new Error('This actor only supports non-triple quad streams.');\n }\n return true;\n }\n\n public async run(action: IActionRdfMetadata): Promise {\n const data: Readable = new Readable({ objectMode: true });\n const metadata: Readable = new Readable({ objectMode: true });\n\n // Delay attachment of listeners until the data or metadata stream is being read.\n const attachListeners = (): void => {\n // Attach listeners only once\n data._read = metadata._read = () => {\n // Do nothing\n };\n\n // Forward errors\n action.quads.on('error', (error) => {\n data.emit('error', error);\n metadata.emit('error', error);\n });\n\n // First pass over data to categorize in graphs,\n // and to detect the primaryTopic triple.\n const graphs: Record = {};\n let endpointIdentifier: string | undefined;\n const primaryTopics: Record = {};\n action.quads.on('data', (quad) => {\n if (quad.predicate.value === 'http://rdfs.org/ns/void#subset' &&\n quad.object.value === action.url) {\n endpointIdentifier = quad.subject.value;\n } else if (quad.predicate.value === 'http://xmlns.com/foaf/0.1/primaryTopic') {\n primaryTopics[quad.object.value] = quad.subject.value;\n }\n let quads: RDF.Quad[] = graphs[quad.graph.value];\n if (!quads) {\n quads = graphs[quad.graph.value] = [];\n }\n quads.push(quad);\n });\n\n // When the stream has finished,\n // determine the appropriate metadata graph,\n // and emit all quads to the appropriate streams.\n action.quads.on('end', () => {\n const metadataGraph: string | undefined = endpointIdentifier ? primaryTopics[endpointIdentifier] : undefined;\n for (const graphName in graphs) {\n if (graphName === metadataGraph) {\n for (const quad of graphs[graphName]) {\n metadata.push(quad);\n }\n // Also emit metadata to data if requested\n if (this.metadataToData) {\n for (const quad of graphs[graphName]) {\n data.push(quad);\n }\n }\n } else {\n for (const quad of graphs[graphName]) {\n data.push(quad);\n }\n if (!metadataGraph && this.dataToMetadataOnInvalidMetadataGraph) {\n for (const quad of graphs[graphName]) {\n metadata.push(quad);\n }\n }\n }\n }\n data.push(null);\n metadata.push(null);\n });\n };\n data._read = metadata._read = () => {\n attachListeners();\n };\n\n return { data, metadata };\n }\n}\n\nexport interface IActorRdfMetadataPrimaryTopicArgs extends IActorRdfMetadataArgs {\n /**\n * If detected metadata triples should also be emitted as data triples\n * @default {false}\n */\n metadataToData: boolean;\n /**\n * If all data should also be seen as metadata when no metadata graph was detected\n * @default {true}\n */\n dataToMetadataOnInvalidMetadataGraph: boolean;\n}\n","import type {\n IActionRdfParseHtml,\n IActorRdfParseHtmlArgs,\n IActorRdfParseHtmlOutput,\n} from '@comunica/bus-rdf-parse-html';\nimport { ActorRdfParseHtml } from '@comunica/bus-rdf-parse-html';\nimport type { IActorTest } from '@comunica/core';\nimport { MicrodataRdfParser } from 'microdata-rdf-streaming-parser';\n\n/**\n * A comunica Microdata RDF Parse Html Actor.\n */\nexport class ActorRdfParseHtmlMicrodata extends ActorRdfParseHtml {\n public constructor(args: IActorRdfParseHtmlArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfParseHtml): Promise {\n return true;\n }\n\n public async run(action: IActionRdfParseHtml): Promise {\n const mediaType = action.headers ? action.headers.get('content-type') : null;\n const xmlMode = mediaType?.includes('xml');\n\n const htmlParseListener = new MicrodataRdfParser({ baseIRI: action.baseIRI, xmlMode });\n htmlParseListener.on('error', action.error);\n htmlParseListener.on('data', action.emit);\n // eslint-disable-next-line ts/unbound-method\n const onTagEndOld = htmlParseListener.onEnd;\n htmlParseListener.onEnd = () => {\n onTagEndOld.call(htmlParseListener);\n action.end();\n };\n return { htmlParseListener };\n }\n}\n","import type {\n IActionRdfParseHtml,\n IActorRdfParseHtmlOutput,\n IActorRdfParseHtmlArgs,\n} from '@comunica/bus-rdf-parse-html';\nimport { ActorRdfParseHtml } from '@comunica/bus-rdf-parse-html';\nimport type { IActorTest } from '@comunica/core';\nimport { RdfaParser } from 'rdfa-streaming-parser';\n\n/**\n * A comunica RDFa RDF Parse Html Actor.\n */\nexport class ActorRdfParseHtmlRdfa extends ActorRdfParseHtml {\n public constructor(args: IActorRdfParseHtmlArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfParseHtml): Promise {\n return true;\n }\n\n public async run(action: IActionRdfParseHtml): Promise {\n const mediaType = action.headers ? action.headers.get('content-type') : null;\n const language = (action.headers && action.headers.get('content-language')) ?? undefined;\n const profile = mediaType && mediaType.includes('xml') ? 'xhtml' : 'html';\n\n const htmlParseListener = new RdfaParser({ baseIRI: action.baseIRI, profile, language });\n htmlParseListener.on('error', action.error);\n htmlParseListener.on('data', action.emit);\n // eslint-disable-next-line ts/unbound-method\n const onTagEndOld = htmlParseListener.onEnd;\n htmlParseListener.onEnd = () => {\n onTagEndOld.call(htmlParseListener);\n action.end();\n };\n return { htmlParseListener };\n }\n}\n","import type { MediatorRdfParseHandle, MediatorRdfParseMediaTypes } from '@comunica/bus-rdf-parse';\nimport type {\n IActionRdfParseHtml,\n IActorRdfParseHtmlOutput,\n IActorRdfParseHtmlArgs,\n} from '@comunica/bus-rdf-parse-html';\nimport { ActorRdfParseHtml } from '@comunica/bus-rdf-parse-html';\nimport type { IActorTest } from '@comunica/core';\nimport { HtmlScriptListener } from './HtmlScriptListener';\n\n/**\n * A HTML script RDF Parse actor that listens on the 'rdf-parse' bus.\n *\n * It is able to extract and parse any RDF serialization from script tags in HTML files\n * and announce the presence of them by media type.\n */\nexport class ActorRdfParseHtmlScript extends ActorRdfParseHtml {\n private readonly mediatorRdfParseMediatypes: MediatorRdfParseMediaTypes;\n private readonly mediatorRdfParseHandle: MediatorRdfParseHandle;\n\n public constructor(args: IActorRdfParseHtmlScriptArgs) {\n super(args);\n }\n\n public async test(_action: IActionRdfParseHtml): Promise {\n return true;\n }\n\n public async run(action: IActionRdfParseHtml): Promise {\n const supportedTypes: Record = (await this.mediatorRdfParseMediatypes\n .mediate({ context: action.context, mediaTypes: true })).mediaTypes;\n const htmlParseListener = new HtmlScriptListener(\n this.mediatorRdfParseHandle,\n action.emit,\n action.error,\n action.end,\n supportedTypes,\n action.context,\n action.baseIRI,\n action.headers,\n );\n return { htmlParseListener };\n }\n}\n\nexport interface IActorRdfParseHtmlScriptArgs extends IActorRdfParseHtmlArgs {\n /**\n * The RDF Parse mediator for collecting media types\n */\n mediatorRdfParseMediatypes: MediatorRdfParseMediaTypes;\n /**\n * The RDF Parse mediator for handling parsing\n */\n mediatorRdfParseHandle: MediatorRdfParseHandle;\n}\n","import type { MediatorRdfParseHandle } from '@comunica/bus-rdf-parse';\nimport type { IHtmlParseListener } from '@comunica/bus-rdf-parse-html';\nimport { KeysRdfParseHtmlScript } from '@comunica/context-entries';\nimport type { IActionContext } from '@comunica/types';\nimport type * as RDF from '@rdfjs/types';\nimport { Readable } from 'readable-stream';\nimport { resolve as resolveIri } from 'relative-to-absolute-iri';\n\n/**\n * An HTML parse listeners that detects `.\n this.sequenceIndex = Number(c === CharCodes.Lt);\n }\n };\n Tokenizer.prototype.stateCDATASequence = function (c) {\n if (c === Sequences.Cdata[this.sequenceIndex]) {\n if (++this.sequenceIndex === Sequences.Cdata.length) {\n this.state = State.InCommentLike;\n this.currentSequence = Sequences.CdataEnd;\n this.sequenceIndex = 0;\n this.sectionStart = this.index + 1;\n }\n }\n else {\n this.sequenceIndex = 0;\n this.state = State.InDeclaration;\n this.stateInDeclaration(c); // Reconsume the character\n }\n };\n /**\n * When we wait for one specific character, we can speed things up\n * by skipping through the buffer until we find it.\n *\n * @returns Whether the character was found.\n */\n Tokenizer.prototype.fastForwardTo = function (c) {\n while (++this.index < this.buffer.length + this.offset) {\n if (this.buffer.charCodeAt(this.index - this.offset) === c) {\n return true;\n }\n }\n /*\n * We increment the index at the end of the `parse` loop,\n * so set it to `buffer.length - 1` here.\n *\n * TODO: Refactor `parse` to increment index before calling states.\n */\n this.index = this.buffer.length + this.offset - 1;\n return false;\n };\n /**\n * Comments and CDATA end with `-->` and `]]>`.\n *\n * Their common qualities are:\n * - Their end sequences have a distinct character they start with.\n * - That character is then repeated, so we have to check multiple repeats.\n * - All characters but the start character of the sequence can be skipped.\n */\n Tokenizer.prototype.stateInCommentLike = function (c) {\n if (c === this.currentSequence[this.sequenceIndex]) {\n if (++this.sequenceIndex === this.currentSequence.length) {\n if (this.currentSequence === Sequences.CdataEnd) {\n this.cbs.oncdata(this.sectionStart, this.index, 2);\n }\n else {\n this.cbs.oncomment(this.sectionStart, this.index, 2);\n }\n this.sequenceIndex = 0;\n this.sectionStart = this.index + 1;\n this.state = State.Text;\n }\n }\n else if (this.sequenceIndex === 0) {\n // Fast-forward to the first character of the sequence\n if (this.fastForwardTo(this.currentSequence[0])) {\n this.sequenceIndex = 1;\n }\n }\n else if (c !== this.currentSequence[this.sequenceIndex - 1]) {\n // Allow long sequences, eg. --->, ]]]>\n this.sequenceIndex = 0;\n }\n };\n /**\n * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name.\n *\n * XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).\n * We allow anything that wouldn't end the tag.\n */\n Tokenizer.prototype.isTagStartChar = function (c) {\n return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);\n };\n Tokenizer.prototype.startSpecial = function (sequence, offset) {\n this.isSpecial = true;\n this.currentSequence = sequence;\n this.sequenceIndex = offset;\n this.state = State.SpecialStartSequence;\n };\n Tokenizer.prototype.stateBeforeTagName = function (c) {\n if (c === CharCodes.ExclamationMark) {\n this.state = State.BeforeDeclaration;\n this.sectionStart = this.index + 1;\n }\n else if (c === CharCodes.Questionmark) {\n this.state = State.InProcessingInstruction;\n this.sectionStart = this.index + 1;\n }\n else if (this.isTagStartChar(c)) {\n var lower = c | 0x20;\n this.sectionStart = this.index;\n if (!this.xmlMode && lower === Sequences.TitleEnd[2]) {\n this.startSpecial(Sequences.TitleEnd, 3);\n }\n else {\n this.state =\n !this.xmlMode && lower === Sequences.ScriptEnd[2]\n ? State.BeforeSpecialS\n : State.InTagName;\n }\n }\n else if (c === CharCodes.Slash) {\n this.state = State.BeforeClosingTagName;\n }\n else {\n this.state = State.Text;\n this.stateText(c);\n }\n };\n Tokenizer.prototype.stateInTagName = function (c) {\n if (isEndOfTagSection(c)) {\n this.cbs.onopentagname(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.state = State.BeforeAttributeName;\n this.stateBeforeAttributeName(c);\n }\n };\n Tokenizer.prototype.stateBeforeClosingTagName = function (c) {\n if (isWhitespace(c)) {\n // Ignore\n }\n else if (c === CharCodes.Gt) {\n this.state = State.Text;\n }\n else {\n this.state = this.isTagStartChar(c)\n ? State.InClosingTagName\n : State.InSpecialComment;\n this.sectionStart = this.index;\n }\n };\n Tokenizer.prototype.stateInClosingTagName = function (c) {\n if (c === CharCodes.Gt || isWhitespace(c)) {\n this.cbs.onclosetag(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.state = State.AfterClosingTagName;\n this.stateAfterClosingTagName(c);\n }\n };\n Tokenizer.prototype.stateAfterClosingTagName = function (c) {\n // Skip everything until \">\"\n if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n this.state = State.Text;\n this.baseState = State.Text;\n this.sectionStart = this.index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeName = function (c) {\n if (c === CharCodes.Gt) {\n this.cbs.onopentagend(this.index);\n if (this.isSpecial) {\n this.state = State.InSpecialTag;\n this.sequenceIndex = 0;\n }\n else {\n this.state = State.Text;\n }\n this.baseState = this.state;\n this.sectionStart = this.index + 1;\n }\n else if (c === CharCodes.Slash) {\n this.state = State.InSelfClosingTag;\n }\n else if (!isWhitespace(c)) {\n this.state = State.InAttributeName;\n this.sectionStart = this.index;\n }\n };\n Tokenizer.prototype.stateInSelfClosingTag = function (c) {\n if (c === CharCodes.Gt) {\n this.cbs.onselfclosingtag(this.index);\n this.state = State.Text;\n this.baseState = State.Text;\n this.sectionStart = this.index + 1;\n this.isSpecial = false; // Reset special state, in case of self-closing special tags\n }\n else if (!isWhitespace(c)) {\n this.state = State.BeforeAttributeName;\n this.stateBeforeAttributeName(c);\n }\n };\n Tokenizer.prototype.stateInAttributeName = function (c) {\n if (c === CharCodes.Eq || isEndOfTagSection(c)) {\n this.cbs.onattribname(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.state = State.AfterAttributeName;\n this.stateAfterAttributeName(c);\n }\n };\n Tokenizer.prototype.stateAfterAttributeName = function (c) {\n if (c === CharCodes.Eq) {\n this.state = State.BeforeAttributeValue;\n }\n else if (c === CharCodes.Slash || c === CharCodes.Gt) {\n this.cbs.onattribend(QuoteType.NoValue, this.index);\n this.state = State.BeforeAttributeName;\n this.stateBeforeAttributeName(c);\n }\n else if (!isWhitespace(c)) {\n this.cbs.onattribend(QuoteType.NoValue, this.index);\n this.state = State.InAttributeName;\n this.sectionStart = this.index;\n }\n };\n Tokenizer.prototype.stateBeforeAttributeValue = function (c) {\n if (c === CharCodes.DoubleQuote) {\n this.state = State.InAttributeValueDq;\n this.sectionStart = this.index + 1;\n }\n else if (c === CharCodes.SingleQuote) {\n this.state = State.InAttributeValueSq;\n this.sectionStart = this.index + 1;\n }\n else if (!isWhitespace(c)) {\n this.sectionStart = this.index;\n this.state = State.InAttributeValueNq;\n this.stateInAttributeValueNoQuotes(c); // Reconsume token\n }\n };\n Tokenizer.prototype.handleInAttributeValue = function (c, quote) {\n if (c === quote ||\n (!this.decodeEntities && this.fastForwardTo(quote))) {\n this.cbs.onattribdata(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.cbs.onattribend(quote === CharCodes.DoubleQuote\n ? QuoteType.Double\n : QuoteType.Single, this.index);\n this.state = State.BeforeAttributeName;\n }\n else if (this.decodeEntities && c === CharCodes.Amp) {\n this.baseState = this.state;\n this.state = State.BeforeEntity;\n }\n };\n Tokenizer.prototype.stateInAttributeValueDoubleQuotes = function (c) {\n this.handleInAttributeValue(c, CharCodes.DoubleQuote);\n };\n Tokenizer.prototype.stateInAttributeValueSingleQuotes = function (c) {\n this.handleInAttributeValue(c, CharCodes.SingleQuote);\n };\n Tokenizer.prototype.stateInAttributeValueNoQuotes = function (c) {\n if (isWhitespace(c) || c === CharCodes.Gt) {\n this.cbs.onattribdata(this.sectionStart, this.index);\n this.sectionStart = -1;\n this.cbs.onattribend(QuoteType.Unquoted, this.index);\n this.state = State.BeforeAttributeName;\n this.stateBeforeAttributeName(c);\n }\n else if (this.decodeEntities && c === CharCodes.Amp) {\n this.baseState = this.state;\n this.state = State.BeforeEntity;\n }\n };\n Tokenizer.prototype.stateBeforeDeclaration = function (c) {\n if (c === CharCodes.OpeningSquareBracket) {\n this.state = State.CDATASequence;\n this.sequenceIndex = 0;\n }\n else {\n this.state =\n c === CharCodes.Dash\n ? State.BeforeComment\n : State.InDeclaration;\n }\n };\n Tokenizer.prototype.stateInDeclaration = function (c) {\n if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n this.cbs.ondeclaration(this.sectionStart, this.index);\n this.state = State.Text;\n this.sectionStart = this.index + 1;\n }\n };\n Tokenizer.prototype.stateInProcessingInstruction = function (c) {\n if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n this.cbs.onprocessinginstruction(this.sectionStart, this.index);\n this.state = State.Text;\n this.sectionStart = this.index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeComment = function (c) {\n if (c === CharCodes.Dash) {\n this.state = State.InCommentLike;\n this.currentSequence = Sequences.CommentEnd;\n // Allow short comments (eg. )\n this.sequenceIndex = 2;\n this.sectionStart = this.index + 1;\n }\n else {\n this.state = State.InDeclaration;\n }\n };\n Tokenizer.prototype.stateInSpecialComment = function (c) {\n if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {\n this.cbs.oncomment(this.sectionStart, this.index, 0);\n this.state = State.Text;\n this.sectionStart = this.index + 1;\n }\n };\n Tokenizer.prototype.stateBeforeSpecialS = function (c) {\n var lower = c | 0x20;\n if (lower === Sequences.ScriptEnd[3]) {\n this.startSpecial(Sequences.ScriptEnd, 4);\n }\n else if (lower === Sequences.StyleEnd[3]) {\n this.startSpecial(Sequences.StyleEnd, 4);\n }\n else {\n this.state = State.InTagName;\n this.stateInTagName(c); // Consume the token again\n }\n };\n Tokenizer.prototype.stateBeforeEntity = function (c) {\n // Start excess with 1 to include the '&'\n this.entityExcess = 1;\n this.entityResult = 0;\n if (c === CharCodes.Number) {\n this.state = State.BeforeNumericEntity;\n }\n else if (c === CharCodes.Amp) {\n // We have two `&` characters in a row. Stay in the current state.\n }\n else {\n this.trieIndex = 0;\n this.trieCurrent = this.entityTrie[0];\n this.state = State.InNamedEntity;\n this.stateInNamedEntity(c);\n }\n };\n Tokenizer.prototype.stateInNamedEntity = function (c) {\n this.entityExcess += 1;\n this.trieIndex = (0, decode_js_1.determineBranch)(this.entityTrie, this.trieCurrent, this.trieIndex + 1, c);\n if (this.trieIndex < 0) {\n this.emitNamedEntity();\n this.index--;\n return;\n }\n this.trieCurrent = this.entityTrie[this.trieIndex];\n var masked = this.trieCurrent & decode_js_1.BinTrieFlags.VALUE_LENGTH;\n // If the branch is a value, store it and continue\n if (masked) {\n // The mask is the number of bytes of the value, including the current byte.\n var valueLength = (masked >> 14) - 1;\n // If we have a legacy entity while parsing strictly, just skip the number of bytes\n if (!this.allowLegacyEntity() && c !== CharCodes.Semi) {\n this.trieIndex += valueLength;\n }\n else {\n // Add 1 as we have already incremented the excess\n var entityStart = this.index - this.entityExcess + 1;\n if (entityStart > this.sectionStart) {\n this.emitPartial(this.sectionStart, entityStart);\n }\n // If this is a surrogate pair, consume the next two bytes\n this.entityResult = this.trieIndex;\n this.trieIndex += valueLength;\n this.entityExcess = 0;\n this.sectionStart = this.index + 1;\n if (valueLength === 0) {\n this.emitNamedEntity();\n }\n }\n }\n };\n Tokenizer.prototype.emitNamedEntity = function () {\n this.state = this.baseState;\n if (this.entityResult === 0) {\n return;\n }\n var valueLength = (this.entityTrie[this.entityResult] & decode_js_1.BinTrieFlags.VALUE_LENGTH) >>\n 14;\n switch (valueLength) {\n case 1: {\n this.emitCodePoint(this.entityTrie[this.entityResult] &\n ~decode_js_1.BinTrieFlags.VALUE_LENGTH);\n break;\n }\n case 2: {\n this.emitCodePoint(this.entityTrie[this.entityResult + 1]);\n break;\n }\n case 3: {\n this.emitCodePoint(this.entityTrie[this.entityResult + 1]);\n this.emitCodePoint(this.entityTrie[this.entityResult + 2]);\n }\n }\n };\n Tokenizer.prototype.stateBeforeNumericEntity = function (c) {\n if ((c | 0x20) === CharCodes.LowerX) {\n this.entityExcess++;\n this.state = State.InHexEntity;\n }\n else {\n this.state = State.InNumericEntity;\n this.stateInNumericEntity(c);\n }\n };\n Tokenizer.prototype.emitNumericEntity = function (strict) {\n var entityStart = this.index - this.entityExcess - 1;\n var numberStart = entityStart + 2 + Number(this.state === State.InHexEntity);\n if (numberStart !== this.index) {\n // Emit leading data if any\n if (entityStart > this.sectionStart) {\n this.emitPartial(this.sectionStart, entityStart);\n }\n this.sectionStart = this.index + Number(strict);\n this.emitCodePoint((0, decode_js_1.replaceCodePoint)(this.entityResult));\n }\n this.state = this.baseState;\n };\n Tokenizer.prototype.stateInNumericEntity = function (c) {\n if (c === CharCodes.Semi) {\n this.emitNumericEntity(true);\n }\n else if (isNumber(c)) {\n this.entityResult = this.entityResult * 10 + (c - CharCodes.Zero);\n this.entityExcess++;\n }\n else {\n if (this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n }\n else {\n this.state = this.baseState;\n }\n this.index--;\n }\n };\n Tokenizer.prototype.stateInHexEntity = function (c) {\n if (c === CharCodes.Semi) {\n this.emitNumericEntity(true);\n }\n else if (isNumber(c)) {\n this.entityResult = this.entityResult * 16 + (c - CharCodes.Zero);\n this.entityExcess++;\n }\n else if (isHexDigit(c)) {\n this.entityResult =\n this.entityResult * 16 + ((c | 0x20) - CharCodes.LowerA + 10);\n this.entityExcess++;\n }\n else {\n if (this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n }\n else {\n this.state = this.baseState;\n }\n this.index--;\n }\n };\n Tokenizer.prototype.allowLegacyEntity = function () {\n return (!this.xmlMode &&\n (this.baseState === State.Text ||\n this.baseState === State.InSpecialTag));\n };\n /**\n * Remove data that has already been consumed from the buffer.\n */\n Tokenizer.prototype.cleanup = function () {\n // If we are inside of text or attributes, emit what we already have.\n if (this.running && this.sectionStart !== this.index) {\n if (this.state === State.Text ||\n (this.state === State.InSpecialTag && this.sequenceIndex === 0)) {\n this.cbs.ontext(this.sectionStart, this.index);\n this.sectionStart = this.index;\n }\n else if (this.state === State.InAttributeValueDq ||\n this.state === State.InAttributeValueSq ||\n this.state === State.InAttributeValueNq) {\n this.cbs.onattribdata(this.sectionStart, this.index);\n this.sectionStart = this.index;\n }\n }\n };\n Tokenizer.prototype.shouldContinue = function () {\n return this.index < this.buffer.length + this.offset && this.running;\n };\n /**\n * Iterates through the buffer, calling the function corresponding to the current state.\n *\n * States that are more likely to be hit are higher up, as a performance improvement.\n */\n Tokenizer.prototype.parse = function () {\n while (this.shouldContinue()) {\n var c = this.buffer.charCodeAt(this.index - this.offset);\n switch (this.state) {\n case State.Text: {\n this.stateText(c);\n break;\n }\n case State.SpecialStartSequence: {\n this.stateSpecialStartSequence(c);\n break;\n }\n case State.InSpecialTag: {\n this.stateInSpecialTag(c);\n break;\n }\n case State.CDATASequence: {\n this.stateCDATASequence(c);\n break;\n }\n case State.InAttributeValueDq: {\n this.stateInAttributeValueDoubleQuotes(c);\n break;\n }\n case State.InAttributeName: {\n this.stateInAttributeName(c);\n break;\n }\n case State.InCommentLike: {\n this.stateInCommentLike(c);\n break;\n }\n case State.InSpecialComment: {\n this.stateInSpecialComment(c);\n break;\n }\n case State.BeforeAttributeName: {\n this.stateBeforeAttributeName(c);\n break;\n }\n case State.InTagName: {\n this.stateInTagName(c);\n break;\n }\n case State.InClosingTagName: {\n this.stateInClosingTagName(c);\n break;\n }\n case State.BeforeTagName: {\n this.stateBeforeTagName(c);\n break;\n }\n case State.AfterAttributeName: {\n this.stateAfterAttributeName(c);\n break;\n }\n case State.InAttributeValueSq: {\n this.stateInAttributeValueSingleQuotes(c);\n break;\n }\n case State.BeforeAttributeValue: {\n this.stateBeforeAttributeValue(c);\n break;\n }\n case State.BeforeClosingTagName: {\n this.stateBeforeClosingTagName(c);\n break;\n }\n case State.AfterClosingTagName: {\n this.stateAfterClosingTagName(c);\n break;\n }\n case State.BeforeSpecialS: {\n this.stateBeforeSpecialS(c);\n break;\n }\n case State.InAttributeValueNq: {\n this.stateInAttributeValueNoQuotes(c);\n break;\n }\n case State.InSelfClosingTag: {\n this.stateInSelfClosingTag(c);\n break;\n }\n case State.InDeclaration: {\n this.stateInDeclaration(c);\n break;\n }\n case State.BeforeDeclaration: {\n this.stateBeforeDeclaration(c);\n break;\n }\n case State.BeforeComment: {\n this.stateBeforeComment(c);\n break;\n }\n case State.InProcessingInstruction: {\n this.stateInProcessingInstruction(c);\n break;\n }\n case State.InNamedEntity: {\n this.stateInNamedEntity(c);\n break;\n }\n case State.BeforeEntity: {\n this.stateBeforeEntity(c);\n break;\n }\n case State.InHexEntity: {\n this.stateInHexEntity(c);\n break;\n }\n case State.InNumericEntity: {\n this.stateInNumericEntity(c);\n break;\n }\n default: {\n // `this._state === State.BeforeNumericEntity`\n this.stateBeforeNumericEntity(c);\n }\n }\n this.index++;\n }\n this.cleanup();\n };\n Tokenizer.prototype.finish = function () {\n if (this.state === State.InNamedEntity) {\n this.emitNamedEntity();\n }\n // If there is remaining data, emit it in a reasonable way\n if (this.sectionStart < this.index) {\n this.handleTrailingData();\n }\n this.cbs.onend();\n };\n /** Handle any trailing data. */\n Tokenizer.prototype.handleTrailingData = function () {\n var endIndex = this.buffer.length + this.offset;\n if (this.state === State.InCommentLike) {\n if (this.currentSequence === Sequences.CdataEnd) {\n this.cbs.oncdata(this.sectionStart, endIndex, 0);\n }\n else {\n this.cbs.oncomment(this.sectionStart, endIndex, 0);\n }\n }\n else if (this.state === State.InNumericEntity &&\n this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n // All trailing data will have been consumed\n }\n else if (this.state === State.InHexEntity &&\n this.allowLegacyEntity()) {\n this.emitNumericEntity(false);\n // All trailing data will have been consumed\n }\n else if (this.state === State.InTagName ||\n this.state === State.BeforeAttributeName ||\n this.state === State.BeforeAttributeValue ||\n this.state === State.AfterAttributeName ||\n this.state === State.InAttributeName ||\n this.state === State.InAttributeValueSq ||\n this.state === State.InAttributeValueDq ||\n this.state === State.InAttributeValueNq ||\n this.state === State.InClosingTagName) {\n /*\n * If we are currently in an opening or closing tag, us not calling the\n * respective callback signals that the tag should be ignored.\n */\n }\n else {\n this.cbs.ontext(this.sectionStart, endIndex);\n }\n };\n Tokenizer.prototype.emitPartial = function (start, endIndex) {\n if (this.baseState !== State.Text &&\n this.baseState !== State.InSpecialTag) {\n this.cbs.onattribdata(start, endIndex);\n }\n else {\n this.cbs.ontext(start, endIndex);\n }\n };\n Tokenizer.prototype.emitCodePoint = function (cp) {\n if (this.baseState !== State.Text &&\n this.baseState !== State.InSpecialTag) {\n this.cbs.onattribentity(cp);\n }\n else {\n this.cbs.ontextentity(cp);\n }\n };\n return Tokenizer;\n}());\nexports.default = Tokenizer;\n//# sourceMappingURL=Tokenizer.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DomUtils = exports.parseFeed = exports.getFeed = exports.ElementType = exports.Tokenizer = exports.createDomStream = exports.parseDOM = exports.parseDocument = exports.DefaultHandler = exports.DomHandler = exports.Parser = void 0;\nvar Parser_js_1 = require(\"./Parser.js\");\nvar Parser_js_2 = require(\"./Parser.js\");\nObject.defineProperty(exports, \"Parser\", { enumerable: true, get: function () { return Parser_js_2.Parser; } });\nvar domhandler_1 = require(\"domhandler\");\nvar domhandler_2 = require(\"domhandler\");\nObject.defineProperty(exports, \"DomHandler\", { enumerable: true, get: function () { return domhandler_2.DomHandler; } });\n// Old name for DomHandler\nObject.defineProperty(exports, \"DefaultHandler\", { enumerable: true, get: function () { return domhandler_2.DomHandler; } });\n// Helper methods\n/**\n * Parses the data, returns the resulting document.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n */\nfunction parseDocument(data, options) {\n var handler = new domhandler_1.DomHandler(undefined, options);\n new Parser_js_1.Parser(handler, options).end(data);\n return handler.root;\n}\nexports.parseDocument = parseDocument;\n/**\n * Parses data, returns an array of the root nodes.\n *\n * Note that the root nodes still have a `Document` node as their parent.\n * Use `parseDocument` to get the `Document` node instead.\n *\n * @param data The data that should be parsed.\n * @param options Optional options for the parser and DOM builder.\n * @deprecated Use `parseDocument` instead.\n */\nfunction parseDOM(data, options) {\n return parseDocument(data, options).children;\n}\nexports.parseDOM = parseDOM;\n/**\n * Creates a parser instance, with an attached DOM handler.\n *\n * @param callback A callback that will be called once parsing has been completed.\n * @param options Optional options for the parser and DOM builder.\n * @param elementCallback An optional callback that will be called every time a tag has been completed inside of the DOM.\n */\nfunction createDomStream(callback, options, elementCallback) {\n var handler = new domhandler_1.DomHandler(callback, options, elementCallback);\n return new Parser_js_1.Parser(handler, options);\n}\nexports.createDomStream = createDomStream;\nvar Tokenizer_js_1 = require(\"./Tokenizer.js\");\nObject.defineProperty(exports, \"Tokenizer\", { enumerable: true, get: function () { return __importDefault(Tokenizer_js_1).default; } });\n/*\n * All of the following exports exist for backwards-compatibility.\n * They should probably be removed eventually.\n */\nexports.ElementType = __importStar(require(\"domelementtype\"));\nvar domutils_1 = require(\"domutils\");\nvar domutils_2 = require(\"domutils\");\nObject.defineProperty(exports, \"getFeed\", { enumerable: true, get: function () { return domutils_2.getFeed; } });\nvar parseFeedDefaultOptions = { xmlMode: true };\n/**\n * Parse a feed.\n *\n * @param feed The feed that should be parsed, as a string.\n * @param options Optionally, options for parsing. When using this, you should set `xmlMode` to `true`.\n */\nfunction parseFeed(feed, options) {\n if (options === void 0) { options = parseFeedDefaultOptions; }\n return (0, domutils_1.getFeed)(parseDOM(feed, options));\n}\nexports.parseFeed = parseFeed;\nexports.DomUtils = __importStar(require(\"domutils\"));\n//# sourceMappingURL=index.js.map","'use strict'\n\nvar COMPATIBLE_ENCODING_PATTERN = /^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i\nvar WS_TRIM_PATTERN = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g\nvar WS_CHAR_PATTERN = /\\s|\\uFEFF|\\xA0/\nvar WS_FOLD_PATTERN = /\\r?\\n[\\x20\\x09]+/g\nvar DELIMITER_PATTERN = /[;,\"]/\nvar WS_DELIMITER_PATTERN = /[;,\"]|\\s/\n\n/**\n * Token character pattern\n * @type {RegExp}\n * @see https://tools.ietf.org/html/rfc7230#section-3.2.6\n */\nvar TOKEN_PATTERN = /^[!#$%&'*+\\-\\.^_`|~\\da-zA-Z]+$/\n\nvar STATE = {\n IDLE: 1 << 0,\n URI: 1 << 1,\n ATTR: 1 << 2,\n}\n\nfunction trim( value ) {\n return value.replace( WS_TRIM_PATTERN, '' )\n}\n\nfunction hasWhitespace( value ) {\n return WS_CHAR_PATTERN.test( value )\n}\n\nfunction skipWhitespace( value, offset ) {\n while( hasWhitespace( value[offset] ) ) {\n offset++\n }\n return offset\n}\n\nfunction needsQuotes( value ) {\n return WS_DELIMITER_PATTERN.test( value ) ||\n !TOKEN_PATTERN.test( value )\n}\n\n/**\n * Shallow compares two objects to check if their properties match.\n * @param {object} object1 First object to compare.\n * @param {object} object2 Second object to compare.\n * @returns {boolean} Do the objects have matching properties.\n */\nfunction shallowCompareObjects( object1, object2 ) {\n return (\n Object.keys( object1 ).length === Object.keys( object2 ).length &&\n Object.keys( object1 ).every(\n ( key ) => key in object2 && object1[ key ] === object2[ key ]\n )\n );\n}\n\nclass Link {\n\n /**\n * Link\n * @constructor\n * @param {String} [value]\n * @returns {Link}\n */\n constructor( value ) {\n\n /** @type {Array} URI references */\n this.refs = []\n\n if( value ) {\n this.parse( value )\n }\n\n }\n\n /**\n * Get refs with given relation type\n * @param {String} value\n * @returns {Array}\n */\n rel( value ) {\n\n var links = []\n var type = value.toLowerCase()\n\n for( var i = 0; i < this.refs.length; i++ ) {\n if( typeof this.refs[ i ].rel === 'string' && this.refs[ i ].rel.toLowerCase() === type ) {\n links.push( this.refs[ i ] )\n }\n }\n\n return links\n\n }\n\n /**\n * Get refs where given attribute has a given value\n * @param {String} attr\n * @param {String} value\n * @returns {Array}\n */\n get( attr, value ) {\n\n attr = attr.toLowerCase()\n value = value.toLowerCase()\n\n var links = []\n\n for( var i = 0; i < this.refs.length; i++ ) {\n if( typeof this.refs[ i ][ attr ] === 'string' && this.refs[ i ][ attr ].toLowerCase() === value ) {\n links.push( this.refs[ i ] )\n }\n }\n\n return links\n\n }\n\n /** Sets a reference. */\n set( link ) {\n this.refs.push( link )\n return this\n }\n\n /**\n * Sets a reference if a reference with similar properties isn’t already set.\n */\n setUnique( link ) {\n\n if( !this.refs.some(( ref ) => shallowCompareObjects( ref, link )) ) {\n this.refs.push( link )\n }\n\n return this\n\n }\n\n has( attr, value ) {\n\n attr = attr.toLowerCase()\n value = value.toLowerCase()\n\n for( var i = 0; i < this.refs.length; i++ ) {\n if( typeof this.refs[ i ][ attr ] === 'string' && this.refs[ i ][ attr ].toLowerCase() === value ) {\n return true\n }\n }\n\n return false\n\n }\n\n parse( value, offset ) {\n\n offset = offset || 0\n value = offset ? value.slice( offset ) : value\n\n // Trim & unfold folded lines\n value = trim( value ).replace( WS_FOLD_PATTERN, '' )\n\n var state = STATE.IDLE\n var length = value.length\n var offset = 0\n var ref = null\n\n while( offset < length ) {\n if( state === STATE.IDLE ) {\n if( hasWhitespace( value[offset] ) ) {\n offset++\n continue\n } else if( value[offset] === '<' ) {\n if( ref != null ) {\n ref.rel != null ?\n this.refs.push( ...Link.expandRelations( ref ) ) :\n this.refs.push( ref )\n }\n var end = value.indexOf( '>', offset )\n if( end === -1 ) throw new Error( 'Expected end of URI delimiter at offset ' + offset )\n ref = { uri: value.slice( offset + 1, end ) }\n // this.refs.push( ref )\n offset = end\n state = STATE.URI\n } else {\n throw new Error( 'Unexpected character \"' + value[offset] + '\" at offset ' + offset )\n }\n offset++\n } else if( state === STATE.URI ) {\n if( hasWhitespace( value[offset] ) ) {\n offset++\n continue\n } else if( value[offset] === ';' ) {\n state = STATE.ATTR\n offset++\n } else if( value[offset] === ',' ) {\n state = STATE.IDLE\n offset++\n } else {\n throw new Error( 'Unexpected character \"' + value[offset] + '\" at offset ' + offset )\n }\n } else if( state === STATE.ATTR ) {\n if( value[offset] ===';' || hasWhitespace( value[offset] ) ) {\n offset++\n continue\n }\n var end = value.indexOf( '=', offset )\n if( end === -1 ) end = value.indexOf( ';', offset )\n if( end === -1 ) end = value.length\n var attr = trim( value.slice( offset, end ) ).toLowerCase()\n var attrValue = ''\n offset = end + 1\n offset = skipWhitespace( value, offset )\n if( value[offset] === '\"' ) {\n offset++\n while( offset < length ) {\n if( value[offset] === '\"' ) {\n offset++; break\n }\n if( value[offset] === '\\\\' ) {\n offset++\n }\n attrValue += value[offset]\n offset++\n }\n } else {\n var end = offset + 1\n while( !DELIMITER_PATTERN.test( value[end] ) && end < length ) {\n end++\n }\n attrValue = value.slice( offset, end )\n offset = end\n }\n if( ref[ attr ] && Link.isSingleOccurenceAttr( attr ) ) {\n // Ignore multiples of attributes which may only appear once\n } else if( attr[ attr.length - 1 ] === '*' ) {\n ref[ attr ] = Link.parseExtendedValue( attrValue )\n } else {\n attrValue = attr === 'type' ?\n attrValue.toLowerCase() : attrValue\n if( ref[ attr ] != null ) {\n if( Array.isArray( ref[ attr ] ) ) {\n ref[ attr ].push( attrValue )\n } else {\n ref[ attr ] = [ ref[ attr ], attrValue ]\n }\n } else {\n ref[ attr ] = attrValue\n }\n }\n switch( value[offset] ) {\n case ',': state = STATE.IDLE; break\n case ';': state = STATE.ATTR; break\n }\n offset++\n } else {\n throw new Error( 'Unknown parser state \"' + state + '\"' )\n }\n }\n\n if( ref != null ) {\n ref.rel != null ?\n this.refs.push( ...Link.expandRelations( ref ) ) :\n this.refs.push( ref )\n }\n\n ref = null\n\n return this\n\n }\n\n toString() {\n\n var refs = []\n var link = ''\n var ref = null\n\n for( var i = 0; i < this.refs.length; i++ ) {\n ref = this.refs[i]\n link = Object.keys( this.refs[i] ).reduce( function( link, attr ) {\n if( attr === 'uri' ) return link\n return link + '; ' + Link.formatAttribute( attr, ref[ attr ] )\n }, '<' + ref.uri + '>' )\n refs.push( link )\n }\n\n return refs.join( ', ' )\n\n }\n\n}\n\n/**\n * Determines whether an encoding can be\n * natively handled with a `Buffer`\n * @param {String} value\n * @returns {Boolean}\n */\nLink.isCompatibleEncoding = function( value ) {\n return COMPATIBLE_ENCODING_PATTERN.test( value )\n}\n\nLink.parse = function( value, offset ) {\n return new Link().parse( value, offset )\n}\n\nLink.isSingleOccurenceAttr = function( attr ) {\n return attr === 'rel' || attr === 'type' || attr === 'media' ||\n attr === 'title' || attr === 'title*'\n}\n\nLink.isTokenAttr = function( attr ) {\n return attr === 'rel' || attr === 'type' || attr === 'anchor'\n}\n\nLink.escapeQuotes = function( value ) {\n return value.replace( /\"/g, '\\\\\"' )\n}\n\nLink.expandRelations = function( ref ) {\n var rels = ref.rel.split( ' ' )\n return rels.map( function( rel ) {\n var value = Object.assign( {}, ref )\n value.rel = rel\n return value\n })\n}\n\n/**\n * Parses an extended value and attempts to decode it\n * @internal\n * @param {String} value\n * @return {Object}\n */\nLink.parseExtendedValue = function( value ) {\n var parts = /([^']+)?(?:'([^']*)')?(.+)/.exec( value )\n return {\n language: parts[2].toLowerCase(),\n encoding: Link.isCompatibleEncoding( parts[1] ) ?\n null : parts[1].toLowerCase(),\n value: Link.isCompatibleEncoding( parts[1] ) ?\n decodeURIComponent( parts[3] ) : parts[3]\n }\n}\n\n/**\n * Format a given extended attribute and it's value\n * @param {String} attr\n * @param {Object} data\n * @return {String}\n */\nLink.formatExtendedAttribute = function( attr, data ) {\n\n var encoding = ( data.encoding || 'utf-8' ).toUpperCase()\n var language = data.language || 'en'\n\n var encodedValue = ''\n\n if( Buffer.isBuffer( data.value ) && Link.isCompatibleEncoding( encoding ) ) {\n encodedValue = data.value.toString( encoding )\n } else if( Buffer.isBuffer( data.value ) ) {\n encodedValue = data.value.toString( 'hex' )\n .replace( /[0-9a-f]{2}/gi, '%$1' )\n } else {\n encodedValue = encodeURIComponent( data.value )\n }\n\n return attr + '=' + encoding + '\\'' +\n language + '\\'' + encodedValue\n\n}\n\n/**\n * Format a given attribute and it's value\n * @param {String} attr\n * @param {String|Object} value\n * @return {String}\n */\nLink.formatAttribute = function( attr, value ) {\n\n if( Array.isArray( value ) ) {\n return value.map(( item ) => {\n return Link.formatAttribute( attr, item )\n }).join( '; ' )\n }\n\n if( attr[ attr.length - 1 ] === '*' || typeof value !== 'string' ) {\n return Link.formatExtendedAttribute( attr, value )\n }\n\n if( Link.isTokenAttr( attr ) ) {\n value = needsQuotes( value ) ?\n '\"' + Link.escapeQuotes( value ) + '\"' :\n Link.escapeQuotes( value )\n } else if( needsQuotes( value ) ) {\n value = encodeURIComponent( value )\n // We don't need to escape <,> <;> within quotes\n value = value\n .replace( /%20/g, ' ' )\n .replace( /%2C/g, ',' )\n .replace( /%3B/g, ';' )\n\n value = '\"' + value + '\"'\n }\n\n return attr + '=' + value\n\n}\n\nmodule.exports = Link\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","/**\n * MIT License\n * \n * Copyright (c) 2014-present, Lee Byron and other contributors.\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nvar DELETE = 'delete';\n\n// Constants describing the size of trie nodes.\nvar SHIFT = 5; // Resulted in best performance after ______?\nvar SIZE = 1 << SHIFT;\nvar MASK = SIZE - 1;\n\n// A consistent shared value representing \"not set\" which equals nothing other\n// than itself, and nothing that could be provided externally.\nvar NOT_SET = {};\n\n// Boolean references, Rough equivalent of `bool &`.\nfunction MakeRef() {\n return { value: false };\n}\n\nfunction SetRef(ref) {\n if (ref) {\n ref.value = true;\n }\n}\n\n// A function which returns a value representing an \"owner\" for transient writes\n// to tries. The return value will only ever equal itself, and will not equal\n// the return of any subsequent call of this function.\nfunction OwnerID() {}\n\nfunction ensureSize(iter) {\n if (iter.size === undefined) {\n iter.size = iter.__iterate(returnTrue);\n }\n return iter.size;\n}\n\nfunction wrapIndex(iter, index) {\n // This implements \"is array index\" which the ECMAString spec defines as:\n //\n // A String property name P is an array index if and only if\n // ToString(ToUint32(P)) is equal to P and ToUint32(P) is not equal\n // to 2^32−1.\n //\n // http://www.ecma-international.org/ecma-262/6.0/#sec-array-exotic-objects\n if (typeof index !== 'number') {\n var uint32Index = index >>> 0; // N >>> 0 is shorthand for ToUint32\n if ('' + uint32Index !== index || uint32Index === 4294967295) {\n return NaN;\n }\n index = uint32Index;\n }\n return index < 0 ? ensureSize(iter) + index : index;\n}\n\nfunction returnTrue() {\n return true;\n}\n\nfunction wholeSlice(begin, end, size) {\n return (\n ((begin === 0 && !isNeg(begin)) ||\n (size !== undefined && begin <= -size)) &&\n (end === undefined || (size !== undefined && end >= size))\n );\n}\n\nfunction resolveBegin(begin, size) {\n return resolveIndex(begin, size, 0);\n}\n\nfunction resolveEnd(end, size) {\n return resolveIndex(end, size, size);\n}\n\nfunction resolveIndex(index, size, defaultIndex) {\n // Sanitize indices using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n return index === undefined\n ? defaultIndex\n : isNeg(index)\n ? size === Infinity\n ? size\n : Math.max(0, size + index) | 0\n : size === undefined || size === index\n ? index\n : Math.min(size, index) | 0;\n}\n\nfunction isNeg(value) {\n // Account for -0 which is negative, but not less than 0.\n return value < 0 || (value === 0 && 1 / value === -Infinity);\n}\n\nvar IS_COLLECTION_SYMBOL = '@@__IMMUTABLE_ITERABLE__@@';\n\nfunction isCollection(maybeCollection) {\n return Boolean(maybeCollection && maybeCollection[IS_COLLECTION_SYMBOL]);\n}\n\nvar IS_KEYED_SYMBOL = '@@__IMMUTABLE_KEYED__@@';\n\nfunction isKeyed(maybeKeyed) {\n return Boolean(maybeKeyed && maybeKeyed[IS_KEYED_SYMBOL]);\n}\n\nvar IS_INDEXED_SYMBOL = '@@__IMMUTABLE_INDEXED__@@';\n\nfunction isIndexed(maybeIndexed) {\n return Boolean(maybeIndexed && maybeIndexed[IS_INDEXED_SYMBOL]);\n}\n\nfunction isAssociative(maybeAssociative) {\n return isKeyed(maybeAssociative) || isIndexed(maybeAssociative);\n}\n\nvar Collection = function Collection(value) {\n return isCollection(value) ? value : Seq(value);\n};\n\nvar KeyedCollection = /*@__PURE__*/(function (Collection) {\n function KeyedCollection(value) {\n return isKeyed(value) ? value : KeyedSeq(value);\n }\n\n if ( Collection ) KeyedCollection.__proto__ = Collection;\n KeyedCollection.prototype = Object.create( Collection && Collection.prototype );\n KeyedCollection.prototype.constructor = KeyedCollection;\n\n return KeyedCollection;\n}(Collection));\n\nvar IndexedCollection = /*@__PURE__*/(function (Collection) {\n function IndexedCollection(value) {\n return isIndexed(value) ? value : IndexedSeq(value);\n }\n\n if ( Collection ) IndexedCollection.__proto__ = Collection;\n IndexedCollection.prototype = Object.create( Collection && Collection.prototype );\n IndexedCollection.prototype.constructor = IndexedCollection;\n\n return IndexedCollection;\n}(Collection));\n\nvar SetCollection = /*@__PURE__*/(function (Collection) {\n function SetCollection(value) {\n return isCollection(value) && !isAssociative(value) ? value : SetSeq(value);\n }\n\n if ( Collection ) SetCollection.__proto__ = Collection;\n SetCollection.prototype = Object.create( Collection && Collection.prototype );\n SetCollection.prototype.constructor = SetCollection;\n\n return SetCollection;\n}(Collection));\n\nCollection.Keyed = KeyedCollection;\nCollection.Indexed = IndexedCollection;\nCollection.Set = SetCollection;\n\nvar IS_SEQ_SYMBOL = '@@__IMMUTABLE_SEQ__@@';\n\nfunction isSeq(maybeSeq) {\n return Boolean(maybeSeq && maybeSeq[IS_SEQ_SYMBOL]);\n}\n\nvar IS_RECORD_SYMBOL = '@@__IMMUTABLE_RECORD__@@';\n\nfunction isRecord(maybeRecord) {\n return Boolean(maybeRecord && maybeRecord[IS_RECORD_SYMBOL]);\n}\n\nfunction isImmutable(maybeImmutable) {\n return isCollection(maybeImmutable) || isRecord(maybeImmutable);\n}\n\nvar IS_ORDERED_SYMBOL = '@@__IMMUTABLE_ORDERED__@@';\n\nfunction isOrdered(maybeOrdered) {\n return Boolean(maybeOrdered && maybeOrdered[IS_ORDERED_SYMBOL]);\n}\n\nvar ITERATE_KEYS = 0;\nvar ITERATE_VALUES = 1;\nvar ITERATE_ENTRIES = 2;\n\nvar REAL_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\nvar FAUX_ITERATOR_SYMBOL = '@@iterator';\n\nvar ITERATOR_SYMBOL = REAL_ITERATOR_SYMBOL || FAUX_ITERATOR_SYMBOL;\n\nvar Iterator = function Iterator(next) {\n this.next = next;\n};\n\nIterator.prototype.toString = function toString () {\n return '[Iterator]';\n};\n\nIterator.KEYS = ITERATE_KEYS;\nIterator.VALUES = ITERATE_VALUES;\nIterator.ENTRIES = ITERATE_ENTRIES;\n\nIterator.prototype.inspect = Iterator.prototype.toSource = function () {\n return this.toString();\n};\nIterator.prototype[ITERATOR_SYMBOL] = function () {\n return this;\n};\n\nfunction iteratorValue(type, k, v, iteratorResult) {\n var value = type === 0 ? k : type === 1 ? v : [k, v];\n iteratorResult\n ? (iteratorResult.value = value)\n : (iteratorResult = {\n value: value,\n done: false,\n });\n return iteratorResult;\n}\n\nfunction iteratorDone() {\n return { value: undefined, done: true };\n}\n\nfunction hasIterator(maybeIterable) {\n if (Array.isArray(maybeIterable)) {\n // IE11 trick as it does not support `Symbol.iterator`\n return true;\n }\n\n return !!getIteratorFn(maybeIterable);\n}\n\nfunction isIterator(maybeIterator) {\n return maybeIterator && typeof maybeIterator.next === 'function';\n}\n\nfunction getIterator(iterable) {\n var iteratorFn = getIteratorFn(iterable);\n return iteratorFn && iteratorFn.call(iterable);\n}\n\nfunction getIteratorFn(iterable) {\n var iteratorFn =\n iterable &&\n ((REAL_ITERATOR_SYMBOL && iterable[REAL_ITERATOR_SYMBOL]) ||\n iterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n}\n\nfunction isEntriesIterable(maybeIterable) {\n var iteratorFn = getIteratorFn(maybeIterable);\n return iteratorFn && iteratorFn === maybeIterable.entries;\n}\n\nfunction isKeysIterable(maybeIterable) {\n var iteratorFn = getIteratorFn(maybeIterable);\n return iteratorFn && iteratorFn === maybeIterable.keys;\n}\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nfunction isArrayLike(value) {\n if (Array.isArray(value) || typeof value === 'string') {\n return true;\n }\n\n return (\n value &&\n typeof value === 'object' &&\n Number.isInteger(value.length) &&\n value.length >= 0 &&\n (value.length === 0\n ? // Only {length: 0} is considered Array-like.\n Object.keys(value).length === 1\n : // An object is only Array-like if it has a property where the last value\n // in the array-like may be found (which could be undefined).\n value.hasOwnProperty(value.length - 1))\n );\n}\n\nvar Seq = /*@__PURE__*/(function (Collection) {\n function Seq(value) {\n return value === undefined || value === null\n ? emptySequence()\n : isImmutable(value)\n ? value.toSeq()\n : seqFromValue(value);\n }\n\n if ( Collection ) Seq.__proto__ = Collection;\n Seq.prototype = Object.create( Collection && Collection.prototype );\n Seq.prototype.constructor = Seq;\n\n Seq.prototype.toSeq = function toSeq () {\n return this;\n };\n\n Seq.prototype.toString = function toString () {\n return this.__toString('Seq {', '}');\n };\n\n Seq.prototype.cacheResult = function cacheResult () {\n if (!this._cache && this.__iterateUncached) {\n this._cache = this.entrySeq().toArray();\n this.size = this._cache.length;\n }\n return this;\n };\n\n // abstract __iterateUncached(fn, reverse)\n\n Seq.prototype.__iterate = function __iterate (fn, reverse) {\n var cache = this._cache;\n if (cache) {\n var size = cache.length;\n var i = 0;\n while (i !== size) {\n var entry = cache[reverse ? size - ++i : i++];\n if (fn(entry[1], entry[0], this) === false) {\n break;\n }\n }\n return i;\n }\n return this.__iterateUncached(fn, reverse);\n };\n\n // abstract __iteratorUncached(type, reverse)\n\n Seq.prototype.__iterator = function __iterator (type, reverse) {\n var cache = this._cache;\n if (cache) {\n var size = cache.length;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var entry = cache[reverse ? size - ++i : i++];\n return iteratorValue(type, entry[0], entry[1]);\n });\n }\n return this.__iteratorUncached(type, reverse);\n };\n\n return Seq;\n}(Collection));\n\nvar KeyedSeq = /*@__PURE__*/(function (Seq) {\n function KeyedSeq(value) {\n return value === undefined || value === null\n ? emptySequence().toKeyedSeq()\n : isCollection(value)\n ? isKeyed(value)\n ? value.toSeq()\n : value.fromEntrySeq()\n : isRecord(value)\n ? value.toSeq()\n : keyedSeqFromValue(value);\n }\n\n if ( Seq ) KeyedSeq.__proto__ = Seq;\n KeyedSeq.prototype = Object.create( Seq && Seq.prototype );\n KeyedSeq.prototype.constructor = KeyedSeq;\n\n KeyedSeq.prototype.toKeyedSeq = function toKeyedSeq () {\n return this;\n };\n\n return KeyedSeq;\n}(Seq));\n\nvar IndexedSeq = /*@__PURE__*/(function (Seq) {\n function IndexedSeq(value) {\n return value === undefined || value === null\n ? emptySequence()\n : isCollection(value)\n ? isKeyed(value)\n ? value.entrySeq()\n : value.toIndexedSeq()\n : isRecord(value)\n ? value.toSeq().entrySeq()\n : indexedSeqFromValue(value);\n }\n\n if ( Seq ) IndexedSeq.__proto__ = Seq;\n IndexedSeq.prototype = Object.create( Seq && Seq.prototype );\n IndexedSeq.prototype.constructor = IndexedSeq;\n\n IndexedSeq.of = function of (/*...values*/) {\n return IndexedSeq(arguments);\n };\n\n IndexedSeq.prototype.toIndexedSeq = function toIndexedSeq () {\n return this;\n };\n\n IndexedSeq.prototype.toString = function toString () {\n return this.__toString('Seq [', ']');\n };\n\n return IndexedSeq;\n}(Seq));\n\nvar SetSeq = /*@__PURE__*/(function (Seq) {\n function SetSeq(value) {\n return (\n isCollection(value) && !isAssociative(value) ? value : IndexedSeq(value)\n ).toSetSeq();\n }\n\n if ( Seq ) SetSeq.__proto__ = Seq;\n SetSeq.prototype = Object.create( Seq && Seq.prototype );\n SetSeq.prototype.constructor = SetSeq;\n\n SetSeq.of = function of (/*...values*/) {\n return SetSeq(arguments);\n };\n\n SetSeq.prototype.toSetSeq = function toSetSeq () {\n return this;\n };\n\n return SetSeq;\n}(Seq));\n\nSeq.isSeq = isSeq;\nSeq.Keyed = KeyedSeq;\nSeq.Set = SetSeq;\nSeq.Indexed = IndexedSeq;\n\nSeq.prototype[IS_SEQ_SYMBOL] = true;\n\n// #pragma Root Sequences\n\nvar ArraySeq = /*@__PURE__*/(function (IndexedSeq) {\n function ArraySeq(array) {\n this._array = array;\n this.size = array.length;\n }\n\n if ( IndexedSeq ) ArraySeq.__proto__ = IndexedSeq;\n ArraySeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );\n ArraySeq.prototype.constructor = ArraySeq;\n\n ArraySeq.prototype.get = function get (index, notSetValue) {\n return this.has(index) ? this._array[wrapIndex(this, index)] : notSetValue;\n };\n\n ArraySeq.prototype.__iterate = function __iterate (fn, reverse) {\n var array = this._array;\n var size = array.length;\n var i = 0;\n while (i !== size) {\n var ii = reverse ? size - ++i : i++;\n if (fn(array[ii], ii, this) === false) {\n break;\n }\n }\n return i;\n };\n\n ArraySeq.prototype.__iterator = function __iterator (type, reverse) {\n var array = this._array;\n var size = array.length;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var ii = reverse ? size - ++i : i++;\n return iteratorValue(type, ii, array[ii]);\n });\n };\n\n return ArraySeq;\n}(IndexedSeq));\n\nvar ObjectSeq = /*@__PURE__*/(function (KeyedSeq) {\n function ObjectSeq(object) {\n var keys = Object.keys(object).concat(\n Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : []\n );\n this._object = object;\n this._keys = keys;\n this.size = keys.length;\n }\n\n if ( KeyedSeq ) ObjectSeq.__proto__ = KeyedSeq;\n ObjectSeq.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );\n ObjectSeq.prototype.constructor = ObjectSeq;\n\n ObjectSeq.prototype.get = function get (key, notSetValue) {\n if (notSetValue !== undefined && !this.has(key)) {\n return notSetValue;\n }\n return this._object[key];\n };\n\n ObjectSeq.prototype.has = function has (key) {\n return hasOwnProperty.call(this._object, key);\n };\n\n ObjectSeq.prototype.__iterate = function __iterate (fn, reverse) {\n var object = this._object;\n var keys = this._keys;\n var size = keys.length;\n var i = 0;\n while (i !== size) {\n var key = keys[reverse ? size - ++i : i++];\n if (fn(object[key], key, this) === false) {\n break;\n }\n }\n return i;\n };\n\n ObjectSeq.prototype.__iterator = function __iterator (type, reverse) {\n var object = this._object;\n var keys = this._keys;\n var size = keys.length;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var key = keys[reverse ? size - ++i : i++];\n return iteratorValue(type, key, object[key]);\n });\n };\n\n return ObjectSeq;\n}(KeyedSeq));\nObjectSeq.prototype[IS_ORDERED_SYMBOL] = true;\n\nvar CollectionSeq = /*@__PURE__*/(function (IndexedSeq) {\n function CollectionSeq(collection) {\n this._collection = collection;\n this.size = collection.length || collection.size;\n }\n\n if ( IndexedSeq ) CollectionSeq.__proto__ = IndexedSeq;\n CollectionSeq.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );\n CollectionSeq.prototype.constructor = CollectionSeq;\n\n CollectionSeq.prototype.__iterateUncached = function __iterateUncached (fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var collection = this._collection;\n var iterator = getIterator(collection);\n var iterations = 0;\n if (isIterator(iterator)) {\n var step;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n }\n return iterations;\n };\n\n CollectionSeq.prototype.__iteratorUncached = function __iteratorUncached (type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var collection = this._collection;\n var iterator = getIterator(collection);\n if (!isIterator(iterator)) {\n return new Iterator(iteratorDone);\n }\n var iterations = 0;\n return new Iterator(function () {\n var step = iterator.next();\n return step.done ? step : iteratorValue(type, iterations++, step.value);\n });\n };\n\n return CollectionSeq;\n}(IndexedSeq));\n\n// # pragma Helper functions\n\nvar EMPTY_SEQ;\n\nfunction emptySequence() {\n return EMPTY_SEQ || (EMPTY_SEQ = new ArraySeq([]));\n}\n\nfunction keyedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (seq) {\n return seq.fromEntrySeq();\n }\n if (typeof value === 'object') {\n return new ObjectSeq(value);\n }\n throw new TypeError(\n 'Expected Array or collection object of [k, v] entries, or keyed object: ' +\n value\n );\n}\n\nfunction indexedSeqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (seq) {\n return seq;\n }\n throw new TypeError(\n 'Expected Array or collection object of values: ' + value\n );\n}\n\nfunction seqFromValue(value) {\n var seq = maybeIndexedSeqFromValue(value);\n if (seq) {\n return isEntriesIterable(value)\n ? seq.fromEntrySeq()\n : isKeysIterable(value)\n ? seq.toSetSeq()\n : seq;\n }\n if (typeof value === 'object') {\n return new ObjectSeq(value);\n }\n throw new TypeError(\n 'Expected Array or collection object of values, or keyed object: ' + value\n );\n}\n\nfunction maybeIndexedSeqFromValue(value) {\n return isArrayLike(value)\n ? new ArraySeq(value)\n : hasIterator(value)\n ? new CollectionSeq(value)\n : undefined;\n}\n\nvar IS_MAP_SYMBOL = '@@__IMMUTABLE_MAP__@@';\n\nfunction isMap(maybeMap) {\n return Boolean(maybeMap && maybeMap[IS_MAP_SYMBOL]);\n}\n\nfunction isOrderedMap(maybeOrderedMap) {\n return isMap(maybeOrderedMap) && isOrdered(maybeOrderedMap);\n}\n\nfunction isValueObject(maybeValue) {\n return Boolean(\n maybeValue &&\n typeof maybeValue.equals === 'function' &&\n typeof maybeValue.hashCode === 'function'\n );\n}\n\n/**\n * An extension of the \"same-value\" algorithm as [described for use by ES6 Map\n * and Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map#Key_equality)\n *\n * NaN is considered the same as NaN, however -0 and 0 are considered the same\n * value, which is different from the algorithm described by\n * [`Object.is`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is).\n *\n * This is extended further to allow Objects to describe the values they\n * represent, by way of `valueOf` or `equals` (and `hashCode`).\n *\n * Note: because of this extension, the key equality of Immutable.Map and the\n * value equality of Immutable.Set will differ from ES6 Map and Set.\n *\n * ### Defining custom values\n *\n * The easiest way to describe the value an object represents is by implementing\n * `valueOf`. For example, `Date` represents a value by returning a unix\n * timestamp for `valueOf`:\n *\n * var date1 = new Date(1234567890000); // Fri Feb 13 2009 ...\n * var date2 = new Date(1234567890000);\n * date1.valueOf(); // 1234567890000\n * assert( date1 !== date2 );\n * assert( Immutable.is( date1, date2 ) );\n *\n * Note: overriding `valueOf` may have other implications if you use this object\n * where JavaScript expects a primitive, such as implicit string coercion.\n *\n * For more complex types, especially collections, implementing `valueOf` may\n * not be performant. An alternative is to implement `equals` and `hashCode`.\n *\n * `equals` takes another object, presumably of similar type, and returns true\n * if it is equal. Equality is symmetrical, so the same result should be\n * returned if this and the argument are flipped.\n *\n * assert( a.equals(b) === b.equals(a) );\n *\n * `hashCode` returns a 32bit integer number representing the object which will\n * be used to determine how to store the value object in a Map or Set. You must\n * provide both or neither methods, one must not exist without the other.\n *\n * Also, an important relationship between these methods must be upheld: if two\n * values are equal, they *must* return the same hashCode. If the values are not\n * equal, they might have the same hashCode; this is called a hash collision,\n * and while undesirable for performance reasons, it is acceptable.\n *\n * if (a.equals(b)) {\n * assert( a.hashCode() === b.hashCode() );\n * }\n *\n * All Immutable collections are Value Objects: they implement `equals()`\n * and `hashCode()`.\n */\nfunction is(valueA, valueB) {\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n if (\n typeof valueA.valueOf === 'function' &&\n typeof valueB.valueOf === 'function'\n ) {\n valueA = valueA.valueOf();\n valueB = valueB.valueOf();\n if (valueA === valueB || (valueA !== valueA && valueB !== valueB)) {\n return true;\n }\n if (!valueA || !valueB) {\n return false;\n }\n }\n return !!(\n isValueObject(valueA) &&\n isValueObject(valueB) &&\n valueA.equals(valueB)\n );\n}\n\nvar imul =\n typeof Math.imul === 'function' && Math.imul(0xffffffff, 2) === -2\n ? Math.imul\n : function imul(a, b) {\n a |= 0; // int\n b |= 0; // int\n var c = a & 0xffff;\n var d = b & 0xffff;\n // Shift by 0 fixes the sign on the high part.\n return (c * d + ((((a >>> 16) * d + c * (b >>> 16)) << 16) >>> 0)) | 0; // int\n };\n\n// v8 has an optimization for storing 31-bit signed numbers.\n// Values which have either 00 or 11 as the high order bits qualify.\n// This function drops the highest order bit in a signed number, maintaining\n// the sign bit.\nfunction smi(i32) {\n return ((i32 >>> 1) & 0x40000000) | (i32 & 0xbfffffff);\n}\n\nvar defaultValueOf = Object.prototype.valueOf;\n\nfunction hash(o) {\n if (o == null) {\n return hashNullish(o);\n }\n\n if (typeof o.hashCode === 'function') {\n // Drop any high bits from accidentally long hash codes.\n return smi(o.hashCode(o));\n }\n\n var v = valueOf(o);\n\n if (v == null) {\n return hashNullish(v);\n }\n\n switch (typeof v) {\n case 'boolean':\n // The hash values for built-in constants are a 1 value for each 5-byte\n // shift region expect for the first, which encodes the value. This\n // reduces the odds of a hash collision for these common values.\n return v ? 0x42108421 : 0x42108420;\n case 'number':\n return hashNumber(v);\n case 'string':\n return v.length > STRING_HASH_CACHE_MIN_STRLEN\n ? cachedHashString(v)\n : hashString(v);\n case 'object':\n case 'function':\n return hashJSObj(v);\n case 'symbol':\n return hashSymbol(v);\n default:\n if (typeof v.toString === 'function') {\n return hashString(v.toString());\n }\n throw new Error('Value type ' + typeof v + ' cannot be hashed.');\n }\n}\n\nfunction hashNullish(nullish) {\n return nullish === null ? 0x42108422 : /* undefined */ 0x42108423;\n}\n\n// Compress arbitrarily large numbers into smi hashes.\nfunction hashNumber(n) {\n if (n !== n || n === Infinity) {\n return 0;\n }\n var hash = n | 0;\n if (hash !== n) {\n hash ^= n * 0xffffffff;\n }\n while (n > 0xffffffff) {\n n /= 0xffffffff;\n hash ^= n;\n }\n return smi(hash);\n}\n\nfunction cachedHashString(string) {\n var hashed = stringHashCache[string];\n if (hashed === undefined) {\n hashed = hashString(string);\n if (STRING_HASH_CACHE_SIZE === STRING_HASH_CACHE_MAX_SIZE) {\n STRING_HASH_CACHE_SIZE = 0;\n stringHashCache = {};\n }\n STRING_HASH_CACHE_SIZE++;\n stringHashCache[string] = hashed;\n }\n return hashed;\n}\n\n// http://jsperf.com/hashing-strings\nfunction hashString(string) {\n // This is the hash from JVM\n // The hash code for a string is computed as\n // s[0] * 31 ^ (n - 1) + s[1] * 31 ^ (n - 2) + ... + s[n - 1],\n // where s[i] is the ith character of the string and n is the length of\n // the string. We \"mod\" the result to make it between 0 (inclusive) and 2^31\n // (exclusive) by dropping high bits.\n var hashed = 0;\n for (var ii = 0; ii < string.length; ii++) {\n hashed = (31 * hashed + string.charCodeAt(ii)) | 0;\n }\n return smi(hashed);\n}\n\nfunction hashSymbol(sym) {\n var hashed = symbolMap[sym];\n if (hashed !== undefined) {\n return hashed;\n }\n\n hashed = nextHash();\n\n symbolMap[sym] = hashed;\n\n return hashed;\n}\n\nfunction hashJSObj(obj) {\n var hashed;\n if (usingWeakMap) {\n hashed = weakMap.get(obj);\n if (hashed !== undefined) {\n return hashed;\n }\n }\n\n hashed = obj[UID_HASH_KEY];\n if (hashed !== undefined) {\n return hashed;\n }\n\n if (!canDefineProperty) {\n hashed = obj.propertyIsEnumerable && obj.propertyIsEnumerable[UID_HASH_KEY];\n if (hashed !== undefined) {\n return hashed;\n }\n\n hashed = getIENodeHash(obj);\n if (hashed !== undefined) {\n return hashed;\n }\n }\n\n hashed = nextHash();\n\n if (usingWeakMap) {\n weakMap.set(obj, hashed);\n } else if (isExtensible !== undefined && isExtensible(obj) === false) {\n throw new Error('Non-extensible objects are not allowed as keys.');\n } else if (canDefineProperty) {\n Object.defineProperty(obj, UID_HASH_KEY, {\n enumerable: false,\n configurable: false,\n writable: false,\n value: hashed,\n });\n } else if (\n obj.propertyIsEnumerable !== undefined &&\n obj.propertyIsEnumerable === obj.constructor.prototype.propertyIsEnumerable\n ) {\n // Since we can't define a non-enumerable property on the object\n // we'll hijack one of the less-used non-enumerable properties to\n // save our hash on it. Since this is a function it will not show up in\n // `JSON.stringify` which is what we want.\n obj.propertyIsEnumerable = function () {\n return this.constructor.prototype.propertyIsEnumerable.apply(\n this,\n arguments\n );\n };\n obj.propertyIsEnumerable[UID_HASH_KEY] = hashed;\n } else if (obj.nodeType !== undefined) {\n // At this point we couldn't get the IE `uniqueID` to use as a hash\n // and we couldn't use a non-enumerable property to exploit the\n // dontEnum bug so we simply add the `UID_HASH_KEY` on the node\n // itself.\n obj[UID_HASH_KEY] = hashed;\n } else {\n throw new Error('Unable to set a non-enumerable property on object.');\n }\n\n return hashed;\n}\n\n// Get references to ES5 object methods.\nvar isExtensible = Object.isExtensible;\n\n// True if Object.defineProperty works as expected. IE8 fails this test.\nvar canDefineProperty = (function () {\n try {\n Object.defineProperty({}, '@', {});\n return true;\n } catch (e) {\n return false;\n }\n})();\n\n// IE has a `uniqueID` property on DOM nodes. We can construct the hash from it\n// and avoid memory leaks from the IE cloneNode bug.\nfunction getIENodeHash(node) {\n if (node && node.nodeType > 0) {\n switch (node.nodeType) {\n case 1: // Element\n return node.uniqueID;\n case 9: // Document\n return node.documentElement && node.documentElement.uniqueID;\n }\n }\n}\n\nfunction valueOf(obj) {\n return obj.valueOf !== defaultValueOf && typeof obj.valueOf === 'function'\n ? obj.valueOf(obj)\n : obj;\n}\n\nfunction nextHash() {\n var nextHash = ++_objHashUID;\n if (_objHashUID & 0x40000000) {\n _objHashUID = 0;\n }\n return nextHash;\n}\n\n// If possible, use a WeakMap.\nvar usingWeakMap = typeof WeakMap === 'function';\nvar weakMap;\nif (usingWeakMap) {\n weakMap = new WeakMap();\n}\n\nvar symbolMap = Object.create(null);\n\nvar _objHashUID = 0;\n\nvar UID_HASH_KEY = '__immutablehash__';\nif (typeof Symbol === 'function') {\n UID_HASH_KEY = Symbol(UID_HASH_KEY);\n}\n\nvar STRING_HASH_CACHE_MIN_STRLEN = 16;\nvar STRING_HASH_CACHE_MAX_SIZE = 255;\nvar STRING_HASH_CACHE_SIZE = 0;\nvar stringHashCache = {};\n\nvar ToKeyedSequence = /*@__PURE__*/(function (KeyedSeq) {\n function ToKeyedSequence(indexed, useKeys) {\n this._iter = indexed;\n this._useKeys = useKeys;\n this.size = indexed.size;\n }\n\n if ( KeyedSeq ) ToKeyedSequence.__proto__ = KeyedSeq;\n ToKeyedSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );\n ToKeyedSequence.prototype.constructor = ToKeyedSequence;\n\n ToKeyedSequence.prototype.get = function get (key, notSetValue) {\n return this._iter.get(key, notSetValue);\n };\n\n ToKeyedSequence.prototype.has = function has (key) {\n return this._iter.has(key);\n };\n\n ToKeyedSequence.prototype.valueSeq = function valueSeq () {\n return this._iter.valueSeq();\n };\n\n ToKeyedSequence.prototype.reverse = function reverse () {\n var this$1$1 = this;\n\n var reversedSequence = reverseFactory(this, true);\n if (!this._useKeys) {\n reversedSequence.valueSeq = function () { return this$1$1._iter.toSeq().reverse(); };\n }\n return reversedSequence;\n };\n\n ToKeyedSequence.prototype.map = function map (mapper, context) {\n var this$1$1 = this;\n\n var mappedSequence = mapFactory(this, mapper, context);\n if (!this._useKeys) {\n mappedSequence.valueSeq = function () { return this$1$1._iter.toSeq().map(mapper, context); };\n }\n return mappedSequence;\n };\n\n ToKeyedSequence.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n return this._iter.__iterate(function (v, k) { return fn(v, k, this$1$1); }, reverse);\n };\n\n ToKeyedSequence.prototype.__iterator = function __iterator (type, reverse) {\n return this._iter.__iterator(type, reverse);\n };\n\n return ToKeyedSequence;\n}(KeyedSeq));\nToKeyedSequence.prototype[IS_ORDERED_SYMBOL] = true;\n\nvar ToIndexedSequence = /*@__PURE__*/(function (IndexedSeq) {\n function ToIndexedSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n if ( IndexedSeq ) ToIndexedSequence.__proto__ = IndexedSeq;\n ToIndexedSequence.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );\n ToIndexedSequence.prototype.constructor = ToIndexedSequence;\n\n ToIndexedSequence.prototype.includes = function includes (value) {\n return this._iter.includes(value);\n };\n\n ToIndexedSequence.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n var i = 0;\n reverse && ensureSize(this);\n return this._iter.__iterate(\n function (v) { return fn(v, reverse ? this$1$1.size - ++i : i++, this$1$1); },\n reverse\n );\n };\n\n ToIndexedSequence.prototype.__iterator = function __iterator (type, reverse) {\n var this$1$1 = this;\n\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n var i = 0;\n reverse && ensureSize(this);\n return new Iterator(function () {\n var step = iterator.next();\n return step.done\n ? step\n : iteratorValue(\n type,\n reverse ? this$1$1.size - ++i : i++,\n step.value,\n step\n );\n });\n };\n\n return ToIndexedSequence;\n}(IndexedSeq));\n\nvar ToSetSequence = /*@__PURE__*/(function (SetSeq) {\n function ToSetSequence(iter) {\n this._iter = iter;\n this.size = iter.size;\n }\n\n if ( SetSeq ) ToSetSequence.__proto__ = SetSeq;\n ToSetSequence.prototype = Object.create( SetSeq && SetSeq.prototype );\n ToSetSequence.prototype.constructor = ToSetSequence;\n\n ToSetSequence.prototype.has = function has (key) {\n return this._iter.includes(key);\n };\n\n ToSetSequence.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n return this._iter.__iterate(function (v) { return fn(v, v, this$1$1); }, reverse);\n };\n\n ToSetSequence.prototype.__iterator = function __iterator (type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n return step.done\n ? step\n : iteratorValue(type, step.value, step.value, step);\n });\n };\n\n return ToSetSequence;\n}(SetSeq));\n\nvar FromEntriesSequence = /*@__PURE__*/(function (KeyedSeq) {\n function FromEntriesSequence(entries) {\n this._iter = entries;\n this.size = entries.size;\n }\n\n if ( KeyedSeq ) FromEntriesSequence.__proto__ = KeyedSeq;\n FromEntriesSequence.prototype = Object.create( KeyedSeq && KeyedSeq.prototype );\n FromEntriesSequence.prototype.constructor = FromEntriesSequence;\n\n FromEntriesSequence.prototype.entrySeq = function entrySeq () {\n return this._iter.toSeq();\n };\n\n FromEntriesSequence.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n return this._iter.__iterate(function (entry) {\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedCollection = isCollection(entry);\n return fn(\n indexedCollection ? entry.get(1) : entry[1],\n indexedCollection ? entry.get(0) : entry[0],\n this$1$1\n );\n }\n }, reverse);\n };\n\n FromEntriesSequence.prototype.__iterator = function __iterator (type, reverse) {\n var iterator = this._iter.__iterator(ITERATE_VALUES, reverse);\n return new Iterator(function () {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n // Check if entry exists first so array access doesn't throw for holes\n // in the parent iteration.\n if (entry) {\n validateEntry(entry);\n var indexedCollection = isCollection(entry);\n return iteratorValue(\n type,\n indexedCollection ? entry.get(0) : entry[0],\n indexedCollection ? entry.get(1) : entry[1],\n step\n );\n }\n }\n });\n };\n\n return FromEntriesSequence;\n}(KeyedSeq));\n\nToIndexedSequence.prototype.cacheResult =\n ToKeyedSequence.prototype.cacheResult =\n ToSetSequence.prototype.cacheResult =\n FromEntriesSequence.prototype.cacheResult =\n cacheResultThrough;\n\nfunction flipFactory(collection) {\n var flipSequence = makeSequence(collection);\n flipSequence._iter = collection;\n flipSequence.size = collection.size;\n flipSequence.flip = function () { return collection; };\n flipSequence.reverse = function () {\n var reversedSequence = collection.reverse.apply(this); // super.reverse()\n reversedSequence.flip = function () { return collection.reverse(); };\n return reversedSequence;\n };\n flipSequence.has = function (key) { return collection.includes(key); };\n flipSequence.includes = function (key) { return collection.has(key); };\n flipSequence.cacheResult = cacheResultThrough;\n flipSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n return collection.__iterate(function (v, k) { return fn(k, v, this$1$1) !== false; }, reverse);\n };\n flipSequence.__iteratorUncached = function (type, reverse) {\n if (type === ITERATE_ENTRIES) {\n var iterator = collection.__iterator(type, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (!step.done) {\n var k = step.value[0];\n step.value[0] = step.value[1];\n step.value[1] = k;\n }\n return step;\n });\n }\n return collection.__iterator(\n type === ITERATE_VALUES ? ITERATE_KEYS : ITERATE_VALUES,\n reverse\n );\n };\n return flipSequence;\n}\n\nfunction mapFactory(collection, mapper, context) {\n var mappedSequence = makeSequence(collection);\n mappedSequence.size = collection.size;\n mappedSequence.has = function (key) { return collection.has(key); };\n mappedSequence.get = function (key, notSetValue) {\n var v = collection.get(key, NOT_SET);\n return v === NOT_SET\n ? notSetValue\n : mapper.call(context, v, key, collection);\n };\n mappedSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n return collection.__iterate(\n function (v, k, c) { return fn(mapper.call(context, v, k, c), k, this$1$1) !== false; },\n reverse\n );\n };\n mappedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n return iteratorValue(\n type,\n key,\n mapper.call(context, entry[1], key, collection),\n step\n );\n });\n };\n return mappedSequence;\n}\n\nfunction reverseFactory(collection, useKeys) {\n var this$1$1 = this;\n\n var reversedSequence = makeSequence(collection);\n reversedSequence._iter = collection;\n reversedSequence.size = collection.size;\n reversedSequence.reverse = function () { return collection; };\n if (collection.flip) {\n reversedSequence.flip = function () {\n var flipSequence = flipFactory(collection);\n flipSequence.reverse = function () { return collection.flip(); };\n return flipSequence;\n };\n }\n reversedSequence.get = function (key, notSetValue) { return collection.get(useKeys ? key : -1 - key, notSetValue); };\n reversedSequence.has = function (key) { return collection.has(useKeys ? key : -1 - key); };\n reversedSequence.includes = function (value) { return collection.includes(value); };\n reversedSequence.cacheResult = cacheResultThrough;\n reversedSequence.__iterate = function (fn, reverse) {\n var this$1$1 = this;\n\n var i = 0;\n reverse && ensureSize(collection);\n return collection.__iterate(\n function (v, k) { return fn(v, useKeys ? k : reverse ? this$1$1.size - ++i : i++, this$1$1); },\n !reverse\n );\n };\n reversedSequence.__iterator = function (type, reverse) {\n var i = 0;\n reverse && ensureSize(collection);\n var iterator = collection.__iterator(ITERATE_ENTRIES, !reverse);\n return new Iterator(function () {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n return iteratorValue(\n type,\n useKeys ? entry[0] : reverse ? this$1$1.size - ++i : i++,\n entry[1],\n step\n );\n });\n };\n return reversedSequence;\n}\n\nfunction filterFactory(collection, predicate, context, useKeys) {\n var filterSequence = makeSequence(collection);\n if (useKeys) {\n filterSequence.has = function (key) {\n var v = collection.get(key, NOT_SET);\n return v !== NOT_SET && !!predicate.call(context, v, key, collection);\n };\n filterSequence.get = function (key, notSetValue) {\n var v = collection.get(key, NOT_SET);\n return v !== NOT_SET && predicate.call(context, v, key, collection)\n ? v\n : notSetValue;\n };\n }\n filterSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n var iterations = 0;\n collection.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$1$1);\n }\n }, reverse);\n return iterations;\n };\n filterSequence.__iteratorUncached = function (type, reverse) {\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n var iterations = 0;\n return new Iterator(function () {\n while (true) {\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var key = entry[0];\n var value = entry[1];\n if (predicate.call(context, value, key, collection)) {\n return iteratorValue(type, useKeys ? key : iterations++, value, step);\n }\n }\n });\n };\n return filterSequence;\n}\n\nfunction countByFactory(collection, grouper, context) {\n var groups = Map().asMutable();\n collection.__iterate(function (v, k) {\n groups.update(grouper.call(context, v, k, collection), 0, function (a) { return a + 1; });\n });\n return groups.asImmutable();\n}\n\nfunction groupByFactory(collection, grouper, context) {\n var isKeyedIter = isKeyed(collection);\n var groups = (isOrdered(collection) ? OrderedMap() : Map()).asMutable();\n collection.__iterate(function (v, k) {\n groups.update(\n grouper.call(context, v, k, collection),\n function (a) { return ((a = a || []), a.push(isKeyedIter ? [k, v] : v), a); }\n );\n });\n var coerce = collectionClass(collection);\n return groups.map(function (arr) { return reify(collection, coerce(arr)); }).asImmutable();\n}\n\nfunction partitionFactory(collection, predicate, context) {\n var isKeyedIter = isKeyed(collection);\n var groups = [[], []];\n collection.__iterate(function (v, k) {\n groups[predicate.call(context, v, k, collection) ? 1 : 0].push(\n isKeyedIter ? [k, v] : v\n );\n });\n var coerce = collectionClass(collection);\n return groups.map(function (arr) { return reify(collection, coerce(arr)); });\n}\n\nfunction sliceFactory(collection, begin, end, useKeys) {\n var originalSize = collection.size;\n\n if (wholeSlice(begin, end, originalSize)) {\n return collection;\n }\n\n var resolvedBegin = resolveBegin(begin, originalSize);\n var resolvedEnd = resolveEnd(end, originalSize);\n\n // begin or end will be NaN if they were provided as negative numbers and\n // this collection's size is unknown. In that case, cache first so there is\n // a known size and these do not resolve to NaN.\n if (resolvedBegin !== resolvedBegin || resolvedEnd !== resolvedEnd) {\n return sliceFactory(collection.toSeq().cacheResult(), begin, end, useKeys);\n }\n\n // Note: resolvedEnd is undefined when the original sequence's length is\n // unknown and this slice did not supply an end and should contain all\n // elements after resolvedBegin.\n // In that case, resolvedSize will be NaN and sliceSize will remain undefined.\n var resolvedSize = resolvedEnd - resolvedBegin;\n var sliceSize;\n if (resolvedSize === resolvedSize) {\n sliceSize = resolvedSize < 0 ? 0 : resolvedSize;\n }\n\n var sliceSeq = makeSequence(collection);\n\n // If collection.size is undefined, the size of the realized sliceSeq is\n // unknown at this point unless the number of items to slice is 0\n sliceSeq.size =\n sliceSize === 0 ? sliceSize : (collection.size && sliceSize) || undefined;\n\n if (!useKeys && isSeq(collection) && sliceSize >= 0) {\n sliceSeq.get = function (index, notSetValue) {\n index = wrapIndex(this, index);\n return index >= 0 && index < sliceSize\n ? collection.get(index + resolvedBegin, notSetValue)\n : notSetValue;\n };\n }\n\n sliceSeq.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n if (sliceSize === 0) {\n return 0;\n }\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var skipped = 0;\n var isSkipping = true;\n var iterations = 0;\n collection.__iterate(function (v, k) {\n if (!(isSkipping && (isSkipping = skipped++ < resolvedBegin))) {\n iterations++;\n return (\n fn(v, useKeys ? k : iterations - 1, this$1$1) !== false &&\n iterations !== sliceSize\n );\n }\n });\n return iterations;\n };\n\n sliceSeq.__iteratorUncached = function (type, reverse) {\n if (sliceSize !== 0 && reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n // Don't bother instantiating parent iterator if taking 0.\n if (sliceSize === 0) {\n return new Iterator(iteratorDone);\n }\n var iterator = collection.__iterator(type, reverse);\n var skipped = 0;\n var iterations = 0;\n return new Iterator(function () {\n while (skipped++ < resolvedBegin) {\n iterator.next();\n }\n if (++iterations > sliceSize) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (useKeys || type === ITERATE_VALUES || step.done) {\n return step;\n }\n if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations - 1, undefined, step);\n }\n return iteratorValue(type, iterations - 1, step.value[1], step);\n });\n };\n\n return sliceSeq;\n}\n\nfunction takeWhileFactory(collection, predicate, context) {\n var takeSequence = makeSequence(collection);\n takeSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n collection.__iterate(\n function (v, k, c) { return predicate.call(context, v, k, c) && ++iterations && fn(v, k, this$1$1); }\n );\n return iterations;\n };\n takeSequence.__iteratorUncached = function (type, reverse) {\n var this$1$1 = this;\n\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n var iterating = true;\n return new Iterator(function () {\n if (!iterating) {\n return iteratorDone();\n }\n var step = iterator.next();\n if (step.done) {\n return step;\n }\n var entry = step.value;\n var k = entry[0];\n var v = entry[1];\n if (!predicate.call(context, v, k, this$1$1)) {\n iterating = false;\n return iteratorDone();\n }\n return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n });\n };\n return takeSequence;\n}\n\nfunction skipWhileFactory(collection, predicate, context, useKeys) {\n var skipSequence = makeSequence(collection);\n skipSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var isSkipping = true;\n var iterations = 0;\n collection.__iterate(function (v, k, c) {\n if (!(isSkipping && (isSkipping = predicate.call(context, v, k, c)))) {\n iterations++;\n return fn(v, useKeys ? k : iterations - 1, this$1$1);\n }\n });\n return iterations;\n };\n skipSequence.__iteratorUncached = function (type, reverse) {\n var this$1$1 = this;\n\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = collection.__iterator(ITERATE_ENTRIES, reverse);\n var skipping = true;\n var iterations = 0;\n return new Iterator(function () {\n var step;\n var k;\n var v;\n do {\n step = iterator.next();\n if (step.done) {\n if (useKeys || type === ITERATE_VALUES) {\n return step;\n }\n if (type === ITERATE_KEYS) {\n return iteratorValue(type, iterations++, undefined, step);\n }\n return iteratorValue(type, iterations++, step.value[1], step);\n }\n var entry = step.value;\n k = entry[0];\n v = entry[1];\n skipping && (skipping = predicate.call(context, v, k, this$1$1));\n } while (skipping);\n return type === ITERATE_ENTRIES ? step : iteratorValue(type, k, v, step);\n });\n };\n return skipSequence;\n}\n\nfunction concatFactory(collection, values) {\n var isKeyedCollection = isKeyed(collection);\n var iters = [collection]\n .concat(values)\n .map(function (v) {\n if (!isCollection(v)) {\n v = isKeyedCollection\n ? keyedSeqFromValue(v)\n : indexedSeqFromValue(Array.isArray(v) ? v : [v]);\n } else if (isKeyedCollection) {\n v = KeyedCollection(v);\n }\n return v;\n })\n .filter(function (v) { return v.size !== 0; });\n\n if (iters.length === 0) {\n return collection;\n }\n\n if (iters.length === 1) {\n var singleton = iters[0];\n if (\n singleton === collection ||\n (isKeyedCollection && isKeyed(singleton)) ||\n (isIndexed(collection) && isIndexed(singleton))\n ) {\n return singleton;\n }\n }\n\n var concatSeq = new ArraySeq(iters);\n if (isKeyedCollection) {\n concatSeq = concatSeq.toKeyedSeq();\n } else if (!isIndexed(collection)) {\n concatSeq = concatSeq.toSetSeq();\n }\n concatSeq = concatSeq.flatten(true);\n concatSeq.size = iters.reduce(function (sum, seq) {\n if (sum !== undefined) {\n var size = seq.size;\n if (size !== undefined) {\n return sum + size;\n }\n }\n }, 0);\n return concatSeq;\n}\n\nfunction flattenFactory(collection, depth, useKeys) {\n var flatSequence = makeSequence(collection);\n flatSequence.__iterateUncached = function (fn, reverse) {\n if (reverse) {\n return this.cacheResult().__iterate(fn, reverse);\n }\n var iterations = 0;\n var stopped = false;\n function flatDeep(iter, currentDepth) {\n iter.__iterate(function (v, k) {\n if ((!depth || currentDepth < depth) && isCollection(v)) {\n flatDeep(v, currentDepth + 1);\n } else {\n iterations++;\n if (fn(v, useKeys ? k : iterations - 1, flatSequence) === false) {\n stopped = true;\n }\n }\n return !stopped;\n }, reverse);\n }\n flatDeep(collection, 0);\n return iterations;\n };\n flatSequence.__iteratorUncached = function (type, reverse) {\n if (reverse) {\n return this.cacheResult().__iterator(type, reverse);\n }\n var iterator = collection.__iterator(type, reverse);\n var stack = [];\n var iterations = 0;\n return new Iterator(function () {\n while (iterator) {\n var step = iterator.next();\n if (step.done !== false) {\n iterator = stack.pop();\n continue;\n }\n var v = step.value;\n if (type === ITERATE_ENTRIES) {\n v = v[1];\n }\n if ((!depth || stack.length < depth) && isCollection(v)) {\n stack.push(iterator);\n iterator = v.__iterator(type, reverse);\n } else {\n return useKeys ? step : iteratorValue(type, iterations++, v, step);\n }\n }\n return iteratorDone();\n });\n };\n return flatSequence;\n}\n\nfunction flatMapFactory(collection, mapper, context) {\n var coerce = collectionClass(collection);\n return collection\n .toSeq()\n .map(function (v, k) { return coerce(mapper.call(context, v, k, collection)); })\n .flatten(true);\n}\n\nfunction interposeFactory(collection, separator) {\n var interposedSequence = makeSequence(collection);\n interposedSequence.size = collection.size && collection.size * 2 - 1;\n interposedSequence.__iterateUncached = function (fn, reverse) {\n var this$1$1 = this;\n\n var iterations = 0;\n collection.__iterate(\n function (v) { return (!iterations || fn(separator, iterations++, this$1$1) !== false) &&\n fn(v, iterations++, this$1$1) !== false; },\n reverse\n );\n return iterations;\n };\n interposedSequence.__iteratorUncached = function (type, reverse) {\n var iterator = collection.__iterator(ITERATE_VALUES, reverse);\n var iterations = 0;\n var step;\n return new Iterator(function () {\n if (!step || iterations % 2) {\n step = iterator.next();\n if (step.done) {\n return step;\n }\n }\n return iterations % 2\n ? iteratorValue(type, iterations++, separator)\n : iteratorValue(type, iterations++, step.value, step);\n });\n };\n return interposedSequence;\n}\n\nfunction sortFactory(collection, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n var isKeyedCollection = isKeyed(collection);\n var index = 0;\n var entries = collection\n .toSeq()\n .map(function (v, k) { return [k, v, index++, mapper ? mapper(v, k, collection) : v]; })\n .valueSeq()\n .toArray();\n entries\n .sort(function (a, b) { return comparator(a[3], b[3]) || a[2] - b[2]; })\n .forEach(\n isKeyedCollection\n ? function (v, i) {\n entries[i].length = 2;\n }\n : function (v, i) {\n entries[i] = v[1];\n }\n );\n return isKeyedCollection\n ? KeyedSeq(entries)\n : isIndexed(collection)\n ? IndexedSeq(entries)\n : SetSeq(entries);\n}\n\nfunction maxFactory(collection, comparator, mapper) {\n if (!comparator) {\n comparator = defaultComparator;\n }\n if (mapper) {\n var entry = collection\n .toSeq()\n .map(function (v, k) { return [v, mapper(v, k, collection)]; })\n .reduce(function (a, b) { return (maxCompare(comparator, a[1], b[1]) ? b : a); });\n return entry && entry[0];\n }\n return collection.reduce(function (a, b) { return (maxCompare(comparator, a, b) ? b : a); });\n}\n\nfunction maxCompare(comparator, a, b) {\n var comp = comparator(b, a);\n // b is considered the new max if the comparator declares them equal, but\n // they are not equal and b is in fact a nullish value.\n return (\n (comp === 0 && b !== a && (b === undefined || b === null || b !== b)) ||\n comp > 0\n );\n}\n\nfunction zipWithFactory(keyIter, zipper, iters, zipAll) {\n var zipSequence = makeSequence(keyIter);\n var sizes = new ArraySeq(iters).map(function (i) { return i.size; });\n zipSequence.size = zipAll ? sizes.max() : sizes.min();\n // Note: this a generic base implementation of __iterate in terms of\n // __iterator which may be more generically useful in the future.\n zipSequence.__iterate = function (fn, reverse) {\n /* generic:\n var iterator = this.__iterator(ITERATE_ENTRIES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n iterations++;\n if (fn(step.value[1], step.value[0], this) === false) {\n break;\n }\n }\n return iterations;\n */\n // indexed:\n var iterator = this.__iterator(ITERATE_VALUES, reverse);\n var step;\n var iterations = 0;\n while (!(step = iterator.next()).done) {\n if (fn(step.value, iterations++, this) === false) {\n break;\n }\n }\n return iterations;\n };\n zipSequence.__iteratorUncached = function (type, reverse) {\n var iterators = iters.map(\n function (i) { return ((i = Collection(i)), getIterator(reverse ? i.reverse() : i)); }\n );\n var iterations = 0;\n var isDone = false;\n return new Iterator(function () {\n var steps;\n if (!isDone) {\n steps = iterators.map(function (i) { return i.next(); });\n isDone = zipAll ? steps.every(function (s) { return s.done; }) : steps.some(function (s) { return s.done; });\n }\n if (isDone) {\n return iteratorDone();\n }\n return iteratorValue(\n type,\n iterations++,\n zipper.apply(\n null,\n steps.map(function (s) { return s.value; })\n )\n );\n });\n };\n return zipSequence;\n}\n\n// #pragma Helper Functions\n\nfunction reify(iter, seq) {\n return iter === seq ? iter : isSeq(iter) ? seq : iter.constructor(seq);\n}\n\nfunction validateEntry(entry) {\n if (entry !== Object(entry)) {\n throw new TypeError('Expected [K, V] tuple: ' + entry);\n }\n}\n\nfunction collectionClass(collection) {\n return isKeyed(collection)\n ? KeyedCollection\n : isIndexed(collection)\n ? IndexedCollection\n : SetCollection;\n}\n\nfunction makeSequence(collection) {\n return Object.create(\n (isKeyed(collection)\n ? KeyedSeq\n : isIndexed(collection)\n ? IndexedSeq\n : SetSeq\n ).prototype\n );\n}\n\nfunction cacheResultThrough() {\n if (this._iter.cacheResult) {\n this._iter.cacheResult();\n this.size = this._iter.size;\n return this;\n }\n return Seq.prototype.cacheResult.call(this);\n}\n\nfunction defaultComparator(a, b) {\n if (a === undefined && b === undefined) {\n return 0;\n }\n\n if (a === undefined) {\n return 1;\n }\n\n if (b === undefined) {\n return -1;\n }\n\n return a > b ? 1 : a < b ? -1 : 0;\n}\n\nfunction arrCopy(arr, offset) {\n offset = offset || 0;\n var len = Math.max(0, arr.length - offset);\n var newArr = new Array(len);\n for (var ii = 0; ii < len; ii++) {\n newArr[ii] = arr[ii + offset];\n }\n return newArr;\n}\n\nfunction invariant(condition, error) {\n if (!condition) { throw new Error(error); }\n}\n\nfunction assertNotInfinite(size) {\n invariant(\n size !== Infinity,\n 'Cannot perform this action with an infinite size.'\n );\n}\n\nfunction coerceKeyPath(keyPath) {\n if (isArrayLike(keyPath) && typeof keyPath !== 'string') {\n return keyPath;\n }\n if (isOrdered(keyPath)) {\n return keyPath.toArray();\n }\n throw new TypeError(\n 'Invalid keyPath: expected Ordered Collection or Array: ' + keyPath\n );\n}\n\nvar toString = Object.prototype.toString;\n\nfunction isPlainObject(value) {\n // The base prototype's toString deals with Argument objects and native namespaces like Math\n if (\n !value ||\n typeof value !== 'object' ||\n toString.call(value) !== '[object Object]'\n ) {\n return false;\n }\n\n var proto = Object.getPrototypeOf(value);\n if (proto === null) {\n return true;\n }\n\n // Iteratively going up the prototype chain is needed for cross-realm environments (differing contexts, iframes, etc)\n var parentProto = proto;\n var nextProto = Object.getPrototypeOf(proto);\n while (nextProto !== null) {\n parentProto = nextProto;\n nextProto = Object.getPrototypeOf(parentProto);\n }\n return parentProto === proto;\n}\n\n/**\n * Returns true if the value is a potentially-persistent data structure, either\n * provided by Immutable.js or a plain Array or Object.\n */\nfunction isDataStructure(value) {\n return (\n typeof value === 'object' &&\n (isImmutable(value) || Array.isArray(value) || isPlainObject(value))\n );\n}\n\nfunction quoteString(value) {\n try {\n return typeof value === 'string' ? JSON.stringify(value) : String(value);\n } catch (_ignoreError) {\n return JSON.stringify(value);\n }\n}\n\nfunction has(collection, key) {\n return isImmutable(collection)\n ? collection.has(key)\n : isDataStructure(collection) && hasOwnProperty.call(collection, key);\n}\n\nfunction get(collection, key, notSetValue) {\n return isImmutable(collection)\n ? collection.get(key, notSetValue)\n : !has(collection, key)\n ? notSetValue\n : typeof collection.get === 'function'\n ? collection.get(key)\n : collection[key];\n}\n\nfunction shallowCopy(from) {\n if (Array.isArray(from)) {\n return arrCopy(from);\n }\n var to = {};\n for (var key in from) {\n if (hasOwnProperty.call(from, key)) {\n to[key] = from[key];\n }\n }\n return to;\n}\n\nfunction remove(collection, key) {\n if (!isDataStructure(collection)) {\n throw new TypeError(\n 'Cannot update non-data-structure value: ' + collection\n );\n }\n if (isImmutable(collection)) {\n if (!collection.remove) {\n throw new TypeError(\n 'Cannot update immutable value without .remove() method: ' + collection\n );\n }\n return collection.remove(key);\n }\n if (!hasOwnProperty.call(collection, key)) {\n return collection;\n }\n var collectionCopy = shallowCopy(collection);\n if (Array.isArray(collectionCopy)) {\n collectionCopy.splice(key, 1);\n } else {\n delete collectionCopy[key];\n }\n return collectionCopy;\n}\n\nfunction set(collection, key, value) {\n if (!isDataStructure(collection)) {\n throw new TypeError(\n 'Cannot update non-data-structure value: ' + collection\n );\n }\n if (isImmutable(collection)) {\n if (!collection.set) {\n throw new TypeError(\n 'Cannot update immutable value without .set() method: ' + collection\n );\n }\n return collection.set(key, value);\n }\n if (hasOwnProperty.call(collection, key) && value === collection[key]) {\n return collection;\n }\n var collectionCopy = shallowCopy(collection);\n collectionCopy[key] = value;\n return collectionCopy;\n}\n\nfunction updateIn$1(collection, keyPath, notSetValue, updater) {\n if (!updater) {\n updater = notSetValue;\n notSetValue = undefined;\n }\n var updatedValue = updateInDeeply(\n isImmutable(collection),\n collection,\n coerceKeyPath(keyPath),\n 0,\n notSetValue,\n updater\n );\n return updatedValue === NOT_SET ? notSetValue : updatedValue;\n}\n\nfunction updateInDeeply(\n inImmutable,\n existing,\n keyPath,\n i,\n notSetValue,\n updater\n) {\n var wasNotSet = existing === NOT_SET;\n if (i === keyPath.length) {\n var existingValue = wasNotSet ? notSetValue : existing;\n var newValue = updater(existingValue);\n return newValue === existingValue ? existing : newValue;\n }\n if (!wasNotSet && !isDataStructure(existing)) {\n throw new TypeError(\n 'Cannot update within non-data-structure value in path [' +\n keyPath.slice(0, i).map(quoteString) +\n ']: ' +\n existing\n );\n }\n var key = keyPath[i];\n var nextExisting = wasNotSet ? NOT_SET : get(existing, key, NOT_SET);\n var nextUpdated = updateInDeeply(\n nextExisting === NOT_SET ? inImmutable : isImmutable(nextExisting),\n nextExisting,\n keyPath,\n i + 1,\n notSetValue,\n updater\n );\n return nextUpdated === nextExisting\n ? existing\n : nextUpdated === NOT_SET\n ? remove(existing, key)\n : set(\n wasNotSet ? (inImmutable ? emptyMap() : {}) : existing,\n key,\n nextUpdated\n );\n}\n\nfunction setIn$1(collection, keyPath, value) {\n return updateIn$1(collection, keyPath, NOT_SET, function () { return value; });\n}\n\nfunction setIn(keyPath, v) {\n return setIn$1(this, keyPath, v);\n}\n\nfunction removeIn(collection, keyPath) {\n return updateIn$1(collection, keyPath, function () { return NOT_SET; });\n}\n\nfunction deleteIn(keyPath) {\n return removeIn(this, keyPath);\n}\n\nfunction update$1(collection, key, notSetValue, updater) {\n return updateIn$1(collection, [key], notSetValue, updater);\n}\n\nfunction update(key, notSetValue, updater) {\n return arguments.length === 1\n ? key(this)\n : update$1(this, key, notSetValue, updater);\n}\n\nfunction updateIn(keyPath, notSetValue, updater) {\n return updateIn$1(this, keyPath, notSetValue, updater);\n}\n\nfunction merge$1() {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n return mergeIntoKeyedWith(this, iters);\n}\n\nfunction mergeWith$1(merger) {\n var iters = [], len = arguments.length - 1;\n while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];\n\n if (typeof merger !== 'function') {\n throw new TypeError('Invalid merger function: ' + merger);\n }\n return mergeIntoKeyedWith(this, iters, merger);\n}\n\nfunction mergeIntoKeyedWith(collection, collections, merger) {\n var iters = [];\n for (var ii = 0; ii < collections.length; ii++) {\n var collection$1 = KeyedCollection(collections[ii]);\n if (collection$1.size !== 0) {\n iters.push(collection$1);\n }\n }\n if (iters.length === 0) {\n return collection;\n }\n if (\n collection.toSeq().size === 0 &&\n !collection.__ownerID &&\n iters.length === 1\n ) {\n return collection.constructor(iters[0]);\n }\n return collection.withMutations(function (collection) {\n var mergeIntoCollection = merger\n ? function (value, key) {\n update$1(collection, key, NOT_SET, function (oldVal) { return oldVal === NOT_SET ? value : merger(oldVal, value, key); }\n );\n }\n : function (value, key) {\n collection.set(key, value);\n };\n for (var ii = 0; ii < iters.length; ii++) {\n iters[ii].forEach(mergeIntoCollection);\n }\n });\n}\n\nfunction merge(collection) {\n var sources = [], len = arguments.length - 1;\n while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];\n\n return mergeWithSources(collection, sources);\n}\n\nfunction mergeWith(merger, collection) {\n var sources = [], len = arguments.length - 2;\n while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ];\n\n return mergeWithSources(collection, sources, merger);\n}\n\nfunction mergeDeep$1(collection) {\n var sources = [], len = arguments.length - 1;\n while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ];\n\n return mergeDeepWithSources(collection, sources);\n}\n\nfunction mergeDeepWith$1(merger, collection) {\n var sources = [], len = arguments.length - 2;\n while ( len-- > 0 ) sources[ len ] = arguments[ len + 2 ];\n\n return mergeDeepWithSources(collection, sources, merger);\n}\n\nfunction mergeDeepWithSources(collection, sources, merger) {\n return mergeWithSources(collection, sources, deepMergerWith(merger));\n}\n\nfunction mergeWithSources(collection, sources, merger) {\n if (!isDataStructure(collection)) {\n throw new TypeError(\n 'Cannot merge into non-data-structure value: ' + collection\n );\n }\n if (isImmutable(collection)) {\n return typeof merger === 'function' && collection.mergeWith\n ? collection.mergeWith.apply(collection, [ merger ].concat( sources ))\n : collection.merge\n ? collection.merge.apply(collection, sources)\n : collection.concat.apply(collection, sources);\n }\n var isArray = Array.isArray(collection);\n var merged = collection;\n var Collection = isArray ? IndexedCollection : KeyedCollection;\n var mergeItem = isArray\n ? function (value) {\n // Copy on write\n if (merged === collection) {\n merged = shallowCopy(merged);\n }\n merged.push(value);\n }\n : function (value, key) {\n var hasVal = hasOwnProperty.call(merged, key);\n var nextVal =\n hasVal && merger ? merger(merged[key], value, key) : value;\n if (!hasVal || nextVal !== merged[key]) {\n // Copy on write\n if (merged === collection) {\n merged = shallowCopy(merged);\n }\n merged[key] = nextVal;\n }\n };\n for (var i = 0; i < sources.length; i++) {\n Collection(sources[i]).forEach(mergeItem);\n }\n return merged;\n}\n\nfunction deepMergerWith(merger) {\n function deepMerger(oldValue, newValue, key) {\n return isDataStructure(oldValue) &&\n isDataStructure(newValue) &&\n areMergeable(oldValue, newValue)\n ? mergeWithSources(oldValue, [newValue], deepMerger)\n : merger\n ? merger(oldValue, newValue, key)\n : newValue;\n }\n return deepMerger;\n}\n\n/**\n * It's unclear what the desired behavior is for merging two collections that\n * fall into separate categories between keyed, indexed, or set-like, so we only\n * consider them mergeable if they fall into the same category.\n */\nfunction areMergeable(oldDataStructure, newDataStructure) {\n var oldSeq = Seq(oldDataStructure);\n var newSeq = Seq(newDataStructure);\n // This logic assumes that a sequence can only fall into one of the three\n // categories mentioned above (since there's no `isSetLike()` method).\n return (\n isIndexed(oldSeq) === isIndexed(newSeq) &&\n isKeyed(oldSeq) === isKeyed(newSeq)\n );\n}\n\nfunction mergeDeep() {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n return mergeDeepWithSources(this, iters);\n}\n\nfunction mergeDeepWith(merger) {\n var iters = [], len = arguments.length - 1;\n while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];\n\n return mergeDeepWithSources(this, iters, merger);\n}\n\nfunction mergeIn(keyPath) {\n var iters = [], len = arguments.length - 1;\n while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];\n\n return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeWithSources(m, iters); });\n}\n\nfunction mergeDeepIn(keyPath) {\n var iters = [], len = arguments.length - 1;\n while ( len-- > 0 ) iters[ len ] = arguments[ len + 1 ];\n\n return updateIn$1(this, keyPath, emptyMap(), function (m) { return mergeDeepWithSources(m, iters); }\n );\n}\n\nfunction withMutations(fn) {\n var mutable = this.asMutable();\n fn(mutable);\n return mutable.wasAltered() ? mutable.__ensureOwner(this.__ownerID) : this;\n}\n\nfunction asMutable() {\n return this.__ownerID ? this : this.__ensureOwner(new OwnerID());\n}\n\nfunction asImmutable() {\n return this.__ensureOwner();\n}\n\nfunction wasAltered() {\n return this.__altered;\n}\n\nvar Map = /*@__PURE__*/(function (KeyedCollection) {\n function Map(value) {\n return value === undefined || value === null\n ? emptyMap()\n : isMap(value) && !isOrdered(value)\n ? value\n : emptyMap().withMutations(function (map) {\n var iter = KeyedCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v, k) { return map.set(k, v); });\n });\n }\n\n if ( KeyedCollection ) Map.__proto__ = KeyedCollection;\n Map.prototype = Object.create( KeyedCollection && KeyedCollection.prototype );\n Map.prototype.constructor = Map;\n\n Map.of = function of () {\n var keyValues = [], len = arguments.length;\n while ( len-- ) keyValues[ len ] = arguments[ len ];\n\n return emptyMap().withMutations(function (map) {\n for (var i = 0; i < keyValues.length; i += 2) {\n if (i + 1 >= keyValues.length) {\n throw new Error('Missing value for key: ' + keyValues[i]);\n }\n map.set(keyValues[i], keyValues[i + 1]);\n }\n });\n };\n\n Map.prototype.toString = function toString () {\n return this.__toString('Map {', '}');\n };\n\n // @pragma Access\n\n Map.prototype.get = function get (k, notSetValue) {\n return this._root\n ? this._root.get(0, undefined, k, notSetValue)\n : notSetValue;\n };\n\n // @pragma Modification\n\n Map.prototype.set = function set (k, v) {\n return updateMap(this, k, v);\n };\n\n Map.prototype.remove = function remove (k) {\n return updateMap(this, k, NOT_SET);\n };\n\n Map.prototype.deleteAll = function deleteAll (keys) {\n var collection = Collection(keys);\n\n if (collection.size === 0) {\n return this;\n }\n\n return this.withMutations(function (map) {\n collection.forEach(function (key) { return map.remove(key); });\n });\n };\n\n Map.prototype.clear = function clear () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._root = null;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyMap();\n };\n\n // @pragma Composition\n\n Map.prototype.sort = function sort (comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator));\n };\n\n Map.prototype.sortBy = function sortBy (mapper, comparator) {\n // Late binding\n return OrderedMap(sortFactory(this, comparator, mapper));\n };\n\n Map.prototype.map = function map (mapper, context) {\n var this$1$1 = this;\n\n return this.withMutations(function (map) {\n map.forEach(function (value, key) {\n map.set(key, mapper.call(context, value, key, this$1$1));\n });\n });\n };\n\n // @pragma Mutability\n\n Map.prototype.__iterator = function __iterator (type, reverse) {\n return new MapIterator(this, type, reverse);\n };\n\n Map.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n var iterations = 0;\n this._root &&\n this._root.iterate(function (entry) {\n iterations++;\n return fn(entry[1], entry[0], this$1$1);\n }, reverse);\n return iterations;\n };\n\n Map.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n if (this.size === 0) {\n return emptyMap();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeMap(this.size, this._root, ownerID, this.__hash);\n };\n\n return Map;\n}(KeyedCollection));\n\nMap.isMap = isMap;\n\nvar MapPrototype = Map.prototype;\nMapPrototype[IS_MAP_SYMBOL] = true;\nMapPrototype[DELETE] = MapPrototype.remove;\nMapPrototype.removeAll = MapPrototype.deleteAll;\nMapPrototype.setIn = setIn;\nMapPrototype.removeIn = MapPrototype.deleteIn = deleteIn;\nMapPrototype.update = update;\nMapPrototype.updateIn = updateIn;\nMapPrototype.merge = MapPrototype.concat = merge$1;\nMapPrototype.mergeWith = mergeWith$1;\nMapPrototype.mergeDeep = mergeDeep;\nMapPrototype.mergeDeepWith = mergeDeepWith;\nMapPrototype.mergeIn = mergeIn;\nMapPrototype.mergeDeepIn = mergeDeepIn;\nMapPrototype.withMutations = withMutations;\nMapPrototype.wasAltered = wasAltered;\nMapPrototype.asImmutable = asImmutable;\nMapPrototype['@@transducer/init'] = MapPrototype.asMutable = asMutable;\nMapPrototype['@@transducer/step'] = function (result, arr) {\n return result.set(arr[0], arr[1]);\n};\nMapPrototype['@@transducer/result'] = function (obj) {\n return obj.asImmutable();\n};\n\n// #pragma Trie Nodes\n\nvar ArrayMapNode = function ArrayMapNode(ownerID, entries) {\n this.ownerID = ownerID;\n this.entries = entries;\n};\n\nArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n};\n\nArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n\n var entries = this.entries;\n var idx = 0;\n var len = entries.length;\n for (; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && entries.length === 1) {\n return; // undefined\n }\n\n if (!exists && !removed && entries.length >= MAX_ARRAY_MAP_SIZE) {\n return createNodes(ownerID, entries, key, value);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1\n ? newEntries.pop()\n : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new ArrayMapNode(ownerID, newEntries);\n};\n\nvar BitmapIndexedNode = function BitmapIndexedNode(ownerID, bitmap, nodes) {\n this.ownerID = ownerID;\n this.bitmap = bitmap;\n this.nodes = nodes;\n};\n\nBitmapIndexedNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var bit = 1 << ((shift === 0 ? keyHash : keyHash >>> shift) & MASK);\n var bitmap = this.bitmap;\n return (bitmap & bit) === 0\n ? notSetValue\n : this.nodes[popCount(bitmap & (bit - 1))].get(\n shift + SHIFT,\n keyHash,\n key,\n notSetValue\n );\n};\n\nBitmapIndexedNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var keyHashFrag = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var bit = 1 << keyHashFrag;\n var bitmap = this.bitmap;\n var exists = (bitmap & bit) !== 0;\n\n if (!exists && value === NOT_SET) {\n return this;\n }\n\n var idx = popCount(bitmap & (bit - 1));\n var nodes = this.nodes;\n var node = exists ? nodes[idx] : undefined;\n var newNode = updateNode(\n node,\n ownerID,\n shift + SHIFT,\n keyHash,\n key,\n value,\n didChangeSize,\n didAlter\n );\n\n if (newNode === node) {\n return this;\n }\n\n if (!exists && newNode && nodes.length >= MAX_BITMAP_INDEXED_SIZE) {\n return expandNodes(ownerID, nodes, bitmap, keyHashFrag, newNode);\n }\n\n if (\n exists &&\n !newNode &&\n nodes.length === 2 &&\n isLeafNode(nodes[idx ^ 1])\n ) {\n return nodes[idx ^ 1];\n }\n\n if (exists && newNode && nodes.length === 1 && isLeafNode(newNode)) {\n return newNode;\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newBitmap = exists ? (newNode ? bitmap : bitmap ^ bit) : bitmap | bit;\n var newNodes = exists\n ? newNode\n ? setAt(nodes, idx, newNode, isEditable)\n : spliceOut(nodes, idx, isEditable)\n : spliceIn(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.bitmap = newBitmap;\n this.nodes = newNodes;\n return this;\n }\n\n return new BitmapIndexedNode(ownerID, newBitmap, newNodes);\n};\n\nvar HashArrayMapNode = function HashArrayMapNode(ownerID, count, nodes) {\n this.ownerID = ownerID;\n this.count = count;\n this.nodes = nodes;\n};\n\nHashArrayMapNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var node = this.nodes[idx];\n return node\n ? node.get(shift + SHIFT, keyHash, key, notSetValue)\n : notSetValue;\n};\n\nHashArrayMapNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n var idx = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n var removed = value === NOT_SET;\n var nodes = this.nodes;\n var node = nodes[idx];\n\n if (removed && !node) {\n return this;\n }\n\n var newNode = updateNode(\n node,\n ownerID,\n shift + SHIFT,\n keyHash,\n key,\n value,\n didChangeSize,\n didAlter\n );\n if (newNode === node) {\n return this;\n }\n\n var newCount = this.count;\n if (!node) {\n newCount++;\n } else if (!newNode) {\n newCount--;\n if (newCount < MIN_HASH_ARRAY_MAP_SIZE) {\n return packNodes(ownerID, nodes, newCount, idx);\n }\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newNodes = setAt(nodes, idx, newNode, isEditable);\n\n if (isEditable) {\n this.count = newCount;\n this.nodes = newNodes;\n return this;\n }\n\n return new HashArrayMapNode(ownerID, newCount, newNodes);\n};\n\nvar HashCollisionNode = function HashCollisionNode(ownerID, keyHash, entries) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entries = entries;\n};\n\nHashCollisionNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n var entries = this.entries;\n for (var ii = 0, len = entries.length; ii < len; ii++) {\n if (is(key, entries[ii][0])) {\n return entries[ii][1];\n }\n }\n return notSetValue;\n};\n\nHashCollisionNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n if (keyHash === undefined) {\n keyHash = hash(key);\n }\n\n var removed = value === NOT_SET;\n\n if (keyHash !== this.keyHash) {\n if (removed) {\n return this;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, keyHash, [key, value]);\n }\n\n var entries = this.entries;\n var idx = 0;\n var len = entries.length;\n for (; idx < len; idx++) {\n if (is(key, entries[idx][0])) {\n break;\n }\n }\n var exists = idx < len;\n\n if (exists ? entries[idx][1] === value : removed) {\n return this;\n }\n\n SetRef(didAlter);\n (removed || !exists) && SetRef(didChangeSize);\n\n if (removed && len === 2) {\n return new ValueNode(ownerID, this.keyHash, entries[idx ^ 1]);\n }\n\n var isEditable = ownerID && ownerID === this.ownerID;\n var newEntries = isEditable ? entries : arrCopy(entries);\n\n if (exists) {\n if (removed) {\n idx === len - 1\n ? newEntries.pop()\n : (newEntries[idx] = newEntries.pop());\n } else {\n newEntries[idx] = [key, value];\n }\n } else {\n newEntries.push([key, value]);\n }\n\n if (isEditable) {\n this.entries = newEntries;\n return this;\n }\n\n return new HashCollisionNode(ownerID, this.keyHash, newEntries);\n};\n\nvar ValueNode = function ValueNode(ownerID, keyHash, entry) {\n this.ownerID = ownerID;\n this.keyHash = keyHash;\n this.entry = entry;\n};\n\nValueNode.prototype.get = function get (shift, keyHash, key, notSetValue) {\n return is(key, this.entry[0]) ? this.entry[1] : notSetValue;\n};\n\nValueNode.prototype.update = function update (ownerID, shift, keyHash, key, value, didChangeSize, didAlter) {\n var removed = value === NOT_SET;\n var keyMatch = is(key, this.entry[0]);\n if (keyMatch ? value === this.entry[1] : removed) {\n return this;\n }\n\n SetRef(didAlter);\n\n if (removed) {\n SetRef(didChangeSize);\n return; // undefined\n }\n\n if (keyMatch) {\n if (ownerID && ownerID === this.ownerID) {\n this.entry[1] = value;\n return this;\n }\n return new ValueNode(ownerID, this.keyHash, [key, value]);\n }\n\n SetRef(didChangeSize);\n return mergeIntoNode(this, ownerID, shift, hash(key), [key, value]);\n};\n\n// #pragma Iterators\n\nArrayMapNode.prototype.iterate = HashCollisionNode.prototype.iterate =\n function (fn, reverse) {\n var entries = this.entries;\n for (var ii = 0, maxIndex = entries.length - 1; ii <= maxIndex; ii++) {\n if (fn(entries[reverse ? maxIndex - ii : ii]) === false) {\n return false;\n }\n }\n };\n\nBitmapIndexedNode.prototype.iterate = HashArrayMapNode.prototype.iterate =\n function (fn, reverse) {\n var nodes = this.nodes;\n for (var ii = 0, maxIndex = nodes.length - 1; ii <= maxIndex; ii++) {\n var node = nodes[reverse ? maxIndex - ii : ii];\n if (node && node.iterate(fn, reverse) === false) {\n return false;\n }\n }\n };\n\n// eslint-disable-next-line no-unused-vars\nValueNode.prototype.iterate = function (fn, reverse) {\n return fn(this.entry);\n};\n\nvar MapIterator = /*@__PURE__*/(function (Iterator) {\n function MapIterator(map, type, reverse) {\n this._type = type;\n this._reverse = reverse;\n this._stack = map._root && mapIteratorFrame(map._root);\n }\n\n if ( Iterator ) MapIterator.__proto__ = Iterator;\n MapIterator.prototype = Object.create( Iterator && Iterator.prototype );\n MapIterator.prototype.constructor = MapIterator;\n\n MapIterator.prototype.next = function next () {\n var type = this._type;\n var stack = this._stack;\n while (stack) {\n var node = stack.node;\n var index = stack.index++;\n var maxIndex = (void 0);\n if (node.entry) {\n if (index === 0) {\n return mapIteratorValue(type, node.entry);\n }\n } else if (node.entries) {\n maxIndex = node.entries.length - 1;\n if (index <= maxIndex) {\n return mapIteratorValue(\n type,\n node.entries[this._reverse ? maxIndex - index : index]\n );\n }\n } else {\n maxIndex = node.nodes.length - 1;\n if (index <= maxIndex) {\n var subNode = node.nodes[this._reverse ? maxIndex - index : index];\n if (subNode) {\n if (subNode.entry) {\n return mapIteratorValue(type, subNode.entry);\n }\n stack = this._stack = mapIteratorFrame(subNode, stack);\n }\n continue;\n }\n }\n stack = this._stack = this._stack.__prev;\n }\n return iteratorDone();\n };\n\n return MapIterator;\n}(Iterator));\n\nfunction mapIteratorValue(type, entry) {\n return iteratorValue(type, entry[0], entry[1]);\n}\n\nfunction mapIteratorFrame(node, prev) {\n return {\n node: node,\n index: 0,\n __prev: prev,\n };\n}\n\nfunction makeMap(size, root, ownerID, hash) {\n var map = Object.create(MapPrototype);\n map.size = size;\n map._root = root;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n}\n\nvar EMPTY_MAP;\nfunction emptyMap() {\n return EMPTY_MAP || (EMPTY_MAP = makeMap(0));\n}\n\nfunction updateMap(map, k, v) {\n var newRoot;\n var newSize;\n if (!map._root) {\n if (v === NOT_SET) {\n return map;\n }\n newSize = 1;\n newRoot = new ArrayMapNode(map.__ownerID, [[k, v]]);\n } else {\n var didChangeSize = MakeRef();\n var didAlter = MakeRef();\n newRoot = updateNode(\n map._root,\n map.__ownerID,\n 0,\n undefined,\n k,\n v,\n didChangeSize,\n didAlter\n );\n if (!didAlter.value) {\n return map;\n }\n newSize = map.size + (didChangeSize.value ? (v === NOT_SET ? -1 : 1) : 0);\n }\n if (map.__ownerID) {\n map.size = newSize;\n map._root = newRoot;\n map.__hash = undefined;\n map.__altered = true;\n return map;\n }\n return newRoot ? makeMap(newSize, newRoot) : emptyMap();\n}\n\nfunction updateNode(\n node,\n ownerID,\n shift,\n keyHash,\n key,\n value,\n didChangeSize,\n didAlter\n) {\n if (!node) {\n if (value === NOT_SET) {\n return node;\n }\n SetRef(didAlter);\n SetRef(didChangeSize);\n return new ValueNode(ownerID, keyHash, [key, value]);\n }\n return node.update(\n ownerID,\n shift,\n keyHash,\n key,\n value,\n didChangeSize,\n didAlter\n );\n}\n\nfunction isLeafNode(node) {\n return (\n node.constructor === ValueNode || node.constructor === HashCollisionNode\n );\n}\n\nfunction mergeIntoNode(node, ownerID, shift, keyHash, entry) {\n if (node.keyHash === keyHash) {\n return new HashCollisionNode(ownerID, keyHash, [node.entry, entry]);\n }\n\n var idx1 = (shift === 0 ? node.keyHash : node.keyHash >>> shift) & MASK;\n var idx2 = (shift === 0 ? keyHash : keyHash >>> shift) & MASK;\n\n var newNode;\n var nodes =\n idx1 === idx2\n ? [mergeIntoNode(node, ownerID, shift + SHIFT, keyHash, entry)]\n : ((newNode = new ValueNode(ownerID, keyHash, entry)),\n idx1 < idx2 ? [node, newNode] : [newNode, node]);\n\n return new BitmapIndexedNode(ownerID, (1 << idx1) | (1 << idx2), nodes);\n}\n\nfunction createNodes(ownerID, entries, key, value) {\n if (!ownerID) {\n ownerID = new OwnerID();\n }\n var node = new ValueNode(ownerID, hash(key), [key, value]);\n for (var ii = 0; ii < entries.length; ii++) {\n var entry = entries[ii];\n node = node.update(ownerID, 0, undefined, entry[0], entry[1]);\n }\n return node;\n}\n\nfunction packNodes(ownerID, nodes, count, excluding) {\n var bitmap = 0;\n var packedII = 0;\n var packedNodes = new Array(count);\n for (var ii = 0, bit = 1, len = nodes.length; ii < len; ii++, bit <<= 1) {\n var node = nodes[ii];\n if (node !== undefined && ii !== excluding) {\n bitmap |= bit;\n packedNodes[packedII++] = node;\n }\n }\n return new BitmapIndexedNode(ownerID, bitmap, packedNodes);\n}\n\nfunction expandNodes(ownerID, nodes, bitmap, including, node) {\n var count = 0;\n var expandedNodes = new Array(SIZE);\n for (var ii = 0; bitmap !== 0; ii++, bitmap >>>= 1) {\n expandedNodes[ii] = bitmap & 1 ? nodes[count++] : undefined;\n }\n expandedNodes[including] = node;\n return new HashArrayMapNode(ownerID, count + 1, expandedNodes);\n}\n\nfunction popCount(x) {\n x -= (x >> 1) & 0x55555555;\n x = (x & 0x33333333) + ((x >> 2) & 0x33333333);\n x = (x + (x >> 4)) & 0x0f0f0f0f;\n x += x >> 8;\n x += x >> 16;\n return x & 0x7f;\n}\n\nfunction setAt(array, idx, val, canEdit) {\n var newArray = canEdit ? array : arrCopy(array);\n newArray[idx] = val;\n return newArray;\n}\n\nfunction spliceIn(array, idx, val, canEdit) {\n var newLen = array.length + 1;\n if (canEdit && idx + 1 === newLen) {\n array[idx] = val;\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n newArray[ii] = val;\n after = -1;\n } else {\n newArray[ii] = array[ii + after];\n }\n }\n return newArray;\n}\n\nfunction spliceOut(array, idx, canEdit) {\n var newLen = array.length - 1;\n if (canEdit && idx === newLen) {\n array.pop();\n return array;\n }\n var newArray = new Array(newLen);\n var after = 0;\n for (var ii = 0; ii < newLen; ii++) {\n if (ii === idx) {\n after = 1;\n }\n newArray[ii] = array[ii + after];\n }\n return newArray;\n}\n\nvar MAX_ARRAY_MAP_SIZE = SIZE / 4;\nvar MAX_BITMAP_INDEXED_SIZE = SIZE / 2;\nvar MIN_HASH_ARRAY_MAP_SIZE = SIZE / 4;\n\nvar IS_LIST_SYMBOL = '@@__IMMUTABLE_LIST__@@';\n\nfunction isList(maybeList) {\n return Boolean(maybeList && maybeList[IS_LIST_SYMBOL]);\n}\n\nvar List = /*@__PURE__*/(function (IndexedCollection) {\n function List(value) {\n var empty = emptyList();\n if (value === undefined || value === null) {\n return empty;\n }\n if (isList(value)) {\n return value;\n }\n var iter = IndexedCollection(value);\n var size = iter.size;\n if (size === 0) {\n return empty;\n }\n assertNotInfinite(size);\n if (size > 0 && size < SIZE) {\n return makeList(0, size, SHIFT, null, new VNode(iter.toArray()));\n }\n return empty.withMutations(function (list) {\n list.setSize(size);\n iter.forEach(function (v, i) { return list.set(i, v); });\n });\n }\n\n if ( IndexedCollection ) List.__proto__ = IndexedCollection;\n List.prototype = Object.create( IndexedCollection && IndexedCollection.prototype );\n List.prototype.constructor = List;\n\n List.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n List.prototype.toString = function toString () {\n return this.__toString('List [', ']');\n };\n\n // @pragma Access\n\n List.prototype.get = function get (index, notSetValue) {\n index = wrapIndex(this, index);\n if (index >= 0 && index < this.size) {\n index += this._origin;\n var node = listNodeFor(this, index);\n return node && node.array[index & MASK];\n }\n return notSetValue;\n };\n\n // @pragma Modification\n\n List.prototype.set = function set (index, value) {\n return updateList(this, index, value);\n };\n\n List.prototype.remove = function remove (index) {\n return !this.has(index)\n ? this\n : index === 0\n ? this.shift()\n : index === this.size - 1\n ? this.pop()\n : this.splice(index, 1);\n };\n\n List.prototype.insert = function insert (index, value) {\n return this.splice(index, 0, value);\n };\n\n List.prototype.clear = function clear () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = this._origin = this._capacity = 0;\n this._level = SHIFT;\n this._root = this._tail = this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyList();\n };\n\n List.prototype.push = function push (/*...values*/) {\n var values = arguments;\n var oldSize = this.size;\n return this.withMutations(function (list) {\n setListBounds(list, 0, oldSize + values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(oldSize + ii, values[ii]);\n }\n });\n };\n\n List.prototype.pop = function pop () {\n return setListBounds(this, 0, -1);\n };\n\n List.prototype.unshift = function unshift (/*...values*/) {\n var values = arguments;\n return this.withMutations(function (list) {\n setListBounds(list, -values.length);\n for (var ii = 0; ii < values.length; ii++) {\n list.set(ii, values[ii]);\n }\n });\n };\n\n List.prototype.shift = function shift () {\n return setListBounds(this, 1);\n };\n\n // @pragma Composition\n\n List.prototype.concat = function concat (/*...collections*/) {\n var arguments$1 = arguments;\n\n var seqs = [];\n for (var i = 0; i < arguments.length; i++) {\n var argument = arguments$1[i];\n var seq = IndexedCollection(\n typeof argument !== 'string' && hasIterator(argument)\n ? argument\n : [argument]\n );\n if (seq.size !== 0) {\n seqs.push(seq);\n }\n }\n if (seqs.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && seqs.length === 1) {\n return this.constructor(seqs[0]);\n }\n return this.withMutations(function (list) {\n seqs.forEach(function (seq) { return seq.forEach(function (value) { return list.push(value); }); });\n });\n };\n\n List.prototype.setSize = function setSize (size) {\n return setListBounds(this, 0, size);\n };\n\n List.prototype.map = function map (mapper, context) {\n var this$1$1 = this;\n\n return this.withMutations(function (list) {\n for (var i = 0; i < this$1$1.size; i++) {\n list.set(i, mapper.call(context, list.get(i), i, this$1$1));\n }\n });\n };\n\n // @pragma Iteration\n\n List.prototype.slice = function slice (begin, end) {\n var size = this.size;\n if (wholeSlice(begin, end, size)) {\n return this;\n }\n return setListBounds(\n this,\n resolveBegin(begin, size),\n resolveEnd(end, size)\n );\n };\n\n List.prototype.__iterator = function __iterator (type, reverse) {\n var index = reverse ? this.size : 0;\n var values = iterateList(this, reverse);\n return new Iterator(function () {\n var value = values();\n return value === DONE\n ? iteratorDone()\n : iteratorValue(type, reverse ? --index : index++, value);\n });\n };\n\n List.prototype.__iterate = function __iterate (fn, reverse) {\n var index = reverse ? this.size : 0;\n var values = iterateList(this, reverse);\n var value;\n while ((value = values()) !== DONE) {\n if (fn(value, reverse ? --index : index++, this) === false) {\n break;\n }\n }\n return index;\n };\n\n List.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n if (this.size === 0) {\n return emptyList();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeList(\n this._origin,\n this._capacity,\n this._level,\n this._root,\n this._tail,\n ownerID,\n this.__hash\n );\n };\n\n return List;\n}(IndexedCollection));\n\nList.isList = isList;\n\nvar ListPrototype = List.prototype;\nListPrototype[IS_LIST_SYMBOL] = true;\nListPrototype[DELETE] = ListPrototype.remove;\nListPrototype.merge = ListPrototype.concat;\nListPrototype.setIn = setIn;\nListPrototype.deleteIn = ListPrototype.removeIn = deleteIn;\nListPrototype.update = update;\nListPrototype.updateIn = updateIn;\nListPrototype.mergeIn = mergeIn;\nListPrototype.mergeDeepIn = mergeDeepIn;\nListPrototype.withMutations = withMutations;\nListPrototype.wasAltered = wasAltered;\nListPrototype.asImmutable = asImmutable;\nListPrototype['@@transducer/init'] = ListPrototype.asMutable = asMutable;\nListPrototype['@@transducer/step'] = function (result, arr) {\n return result.push(arr);\n};\nListPrototype['@@transducer/result'] = function (obj) {\n return obj.asImmutable();\n};\n\nvar VNode = function VNode(array, ownerID) {\n this.array = array;\n this.ownerID = ownerID;\n};\n\n// TODO: seems like these methods are very similar\n\nVNode.prototype.removeBefore = function removeBefore (ownerID, level, index) {\n if (index === level ? 1 << level : this.array.length === 0) {\n return this;\n }\n var originIndex = (index >>> level) & MASK;\n if (originIndex >= this.array.length) {\n return new VNode([], ownerID);\n }\n var removingFirst = originIndex === 0;\n var newChild;\n if (level > 0) {\n var oldChild = this.array[originIndex];\n newChild =\n oldChild && oldChild.removeBefore(ownerID, level - SHIFT, index);\n if (newChild === oldChild && removingFirst) {\n return this;\n }\n }\n if (removingFirst && !newChild) {\n return this;\n }\n var editable = editableVNode(this, ownerID);\n if (!removingFirst) {\n for (var ii = 0; ii < originIndex; ii++) {\n editable.array[ii] = undefined;\n }\n }\n if (newChild) {\n editable.array[originIndex] = newChild;\n }\n return editable;\n};\n\nVNode.prototype.removeAfter = function removeAfter (ownerID, level, index) {\n if (index === (level ? 1 << level : 0) || this.array.length === 0) {\n return this;\n }\n var sizeIndex = ((index - 1) >>> level) & MASK;\n if (sizeIndex >= this.array.length) {\n return this;\n }\n\n var newChild;\n if (level > 0) {\n var oldChild = this.array[sizeIndex];\n newChild =\n oldChild && oldChild.removeAfter(ownerID, level - SHIFT, index);\n if (newChild === oldChild && sizeIndex === this.array.length - 1) {\n return this;\n }\n }\n\n var editable = editableVNode(this, ownerID);\n editable.array.splice(sizeIndex + 1);\n if (newChild) {\n editable.array[sizeIndex] = newChild;\n }\n return editable;\n};\n\nvar DONE = {};\n\nfunction iterateList(list, reverse) {\n var left = list._origin;\n var right = list._capacity;\n var tailPos = getTailOffset(right);\n var tail = list._tail;\n\n return iterateNodeOrLeaf(list._root, list._level, 0);\n\n function iterateNodeOrLeaf(node, level, offset) {\n return level === 0\n ? iterateLeaf(node, offset)\n : iterateNode(node, level, offset);\n }\n\n function iterateLeaf(node, offset) {\n var array = offset === tailPos ? tail && tail.array : node && node.array;\n var from = offset > left ? 0 : left - offset;\n var to = right - offset;\n if (to > SIZE) {\n to = SIZE;\n }\n return function () {\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n return array && array[idx];\n };\n }\n\n function iterateNode(node, level, offset) {\n var values;\n var array = node && node.array;\n var from = offset > left ? 0 : (left - offset) >> level;\n var to = ((right - offset) >> level) + 1;\n if (to > SIZE) {\n to = SIZE;\n }\n return function () {\n while (true) {\n if (values) {\n var value = values();\n if (value !== DONE) {\n return value;\n }\n values = null;\n }\n if (from === to) {\n return DONE;\n }\n var idx = reverse ? --to : from++;\n values = iterateNodeOrLeaf(\n array && array[idx],\n level - SHIFT,\n offset + (idx << level)\n );\n }\n };\n }\n}\n\nfunction makeList(origin, capacity, level, root, tail, ownerID, hash) {\n var list = Object.create(ListPrototype);\n list.size = capacity - origin;\n list._origin = origin;\n list._capacity = capacity;\n list._level = level;\n list._root = root;\n list._tail = tail;\n list.__ownerID = ownerID;\n list.__hash = hash;\n list.__altered = false;\n return list;\n}\n\nvar EMPTY_LIST;\nfunction emptyList() {\n return EMPTY_LIST || (EMPTY_LIST = makeList(0, 0, SHIFT));\n}\n\nfunction updateList(list, index, value) {\n index = wrapIndex(list, index);\n\n if (index !== index) {\n return list;\n }\n\n if (index >= list.size || index < 0) {\n return list.withMutations(function (list) {\n index < 0\n ? setListBounds(list, index).set(0, value)\n : setListBounds(list, 0, index + 1).set(index, value);\n });\n }\n\n index += list._origin;\n\n var newTail = list._tail;\n var newRoot = list._root;\n var didAlter = MakeRef();\n if (index >= getTailOffset(list._capacity)) {\n newTail = updateVNode(newTail, list.__ownerID, 0, index, value, didAlter);\n } else {\n newRoot = updateVNode(\n newRoot,\n list.__ownerID,\n list._level,\n index,\n value,\n didAlter\n );\n }\n\n if (!didAlter.value) {\n return list;\n }\n\n if (list.__ownerID) {\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(list._origin, list._capacity, list._level, newRoot, newTail);\n}\n\nfunction updateVNode(node, ownerID, level, index, value, didAlter) {\n var idx = (index >>> level) & MASK;\n var nodeHas = node && idx < node.array.length;\n if (!nodeHas && value === undefined) {\n return node;\n }\n\n var newNode;\n\n if (level > 0) {\n var lowerNode = node && node.array[idx];\n var newLowerNode = updateVNode(\n lowerNode,\n ownerID,\n level - SHIFT,\n index,\n value,\n didAlter\n );\n if (newLowerNode === lowerNode) {\n return node;\n }\n newNode = editableVNode(node, ownerID);\n newNode.array[idx] = newLowerNode;\n return newNode;\n }\n\n if (nodeHas && node.array[idx] === value) {\n return node;\n }\n\n if (didAlter) {\n SetRef(didAlter);\n }\n\n newNode = editableVNode(node, ownerID);\n if (value === undefined && idx === newNode.array.length - 1) {\n newNode.array.pop();\n } else {\n newNode.array[idx] = value;\n }\n return newNode;\n}\n\nfunction editableVNode(node, ownerID) {\n if (ownerID && node && ownerID === node.ownerID) {\n return node;\n }\n return new VNode(node ? node.array.slice() : [], ownerID);\n}\n\nfunction listNodeFor(list, rawIndex) {\n if (rawIndex >= getTailOffset(list._capacity)) {\n return list._tail;\n }\n if (rawIndex < 1 << (list._level + SHIFT)) {\n var node = list._root;\n var level = list._level;\n while (node && level > 0) {\n node = node.array[(rawIndex >>> level) & MASK];\n level -= SHIFT;\n }\n return node;\n }\n}\n\nfunction setListBounds(list, begin, end) {\n // Sanitize begin & end using this shorthand for ToInt32(argument)\n // http://www.ecma-international.org/ecma-262/6.0/#sec-toint32\n if (begin !== undefined) {\n begin |= 0;\n }\n if (end !== undefined) {\n end |= 0;\n }\n var owner = list.__ownerID || new OwnerID();\n var oldOrigin = list._origin;\n var oldCapacity = list._capacity;\n var newOrigin = oldOrigin + begin;\n var newCapacity =\n end === undefined\n ? oldCapacity\n : end < 0\n ? oldCapacity + end\n : oldOrigin + end;\n if (newOrigin === oldOrigin && newCapacity === oldCapacity) {\n return list;\n }\n\n // If it's going to end after it starts, it's empty.\n if (newOrigin >= newCapacity) {\n return list.clear();\n }\n\n var newLevel = list._level;\n var newRoot = list._root;\n\n // New origin might need creating a higher root.\n var offsetShift = 0;\n while (newOrigin + offsetShift < 0) {\n newRoot = new VNode(\n newRoot && newRoot.array.length ? [undefined, newRoot] : [],\n owner\n );\n newLevel += SHIFT;\n offsetShift += 1 << newLevel;\n }\n if (offsetShift) {\n newOrigin += offsetShift;\n oldOrigin += offsetShift;\n newCapacity += offsetShift;\n oldCapacity += offsetShift;\n }\n\n var oldTailOffset = getTailOffset(oldCapacity);\n var newTailOffset = getTailOffset(newCapacity);\n\n // New size might need creating a higher root.\n while (newTailOffset >= 1 << (newLevel + SHIFT)) {\n newRoot = new VNode(\n newRoot && newRoot.array.length ? [newRoot] : [],\n owner\n );\n newLevel += SHIFT;\n }\n\n // Locate or create the new tail.\n var oldTail = list._tail;\n var newTail =\n newTailOffset < oldTailOffset\n ? listNodeFor(list, newCapacity - 1)\n : newTailOffset > oldTailOffset\n ? new VNode([], owner)\n : oldTail;\n\n // Merge Tail into tree.\n if (\n oldTail &&\n newTailOffset > oldTailOffset &&\n newOrigin < oldCapacity &&\n oldTail.array.length\n ) {\n newRoot = editableVNode(newRoot, owner);\n var node = newRoot;\n for (var level = newLevel; level > SHIFT; level -= SHIFT) {\n var idx = (oldTailOffset >>> level) & MASK;\n node = node.array[idx] = editableVNode(node.array[idx], owner);\n }\n node.array[(oldTailOffset >>> SHIFT) & MASK] = oldTail;\n }\n\n // If the size has been reduced, there's a chance the tail needs to be trimmed.\n if (newCapacity < oldCapacity) {\n newTail = newTail && newTail.removeAfter(owner, 0, newCapacity);\n }\n\n // If the new origin is within the tail, then we do not need a root.\n if (newOrigin >= newTailOffset) {\n newOrigin -= newTailOffset;\n newCapacity -= newTailOffset;\n newLevel = SHIFT;\n newRoot = null;\n newTail = newTail && newTail.removeBefore(owner, 0, newOrigin);\n\n // Otherwise, if the root has been trimmed, garbage collect.\n } else if (newOrigin > oldOrigin || newTailOffset < oldTailOffset) {\n offsetShift = 0;\n\n // Identify the new top root node of the subtree of the old root.\n while (newRoot) {\n var beginIndex = (newOrigin >>> newLevel) & MASK;\n if ((beginIndex !== newTailOffset >>> newLevel) & MASK) {\n break;\n }\n if (beginIndex) {\n offsetShift += (1 << newLevel) * beginIndex;\n }\n newLevel -= SHIFT;\n newRoot = newRoot.array[beginIndex];\n }\n\n // Trim the new sides of the new root.\n if (newRoot && newOrigin > oldOrigin) {\n newRoot = newRoot.removeBefore(owner, newLevel, newOrigin - offsetShift);\n }\n if (newRoot && newTailOffset < oldTailOffset) {\n newRoot = newRoot.removeAfter(\n owner,\n newLevel,\n newTailOffset - offsetShift\n );\n }\n if (offsetShift) {\n newOrigin -= offsetShift;\n newCapacity -= offsetShift;\n }\n }\n\n if (list.__ownerID) {\n list.size = newCapacity - newOrigin;\n list._origin = newOrigin;\n list._capacity = newCapacity;\n list._level = newLevel;\n list._root = newRoot;\n list._tail = newTail;\n list.__hash = undefined;\n list.__altered = true;\n return list;\n }\n return makeList(newOrigin, newCapacity, newLevel, newRoot, newTail);\n}\n\nfunction getTailOffset(size) {\n return size < SIZE ? 0 : ((size - 1) >>> SHIFT) << SHIFT;\n}\n\nvar OrderedMap = /*@__PURE__*/(function (Map) {\n function OrderedMap(value) {\n return value === undefined || value === null\n ? emptyOrderedMap()\n : isOrderedMap(value)\n ? value\n : emptyOrderedMap().withMutations(function (map) {\n var iter = KeyedCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v, k) { return map.set(k, v); });\n });\n }\n\n if ( Map ) OrderedMap.__proto__ = Map;\n OrderedMap.prototype = Object.create( Map && Map.prototype );\n OrderedMap.prototype.constructor = OrderedMap;\n\n OrderedMap.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n OrderedMap.prototype.toString = function toString () {\n return this.__toString('OrderedMap {', '}');\n };\n\n // @pragma Access\n\n OrderedMap.prototype.get = function get (k, notSetValue) {\n var index = this._map.get(k);\n return index !== undefined ? this._list.get(index)[1] : notSetValue;\n };\n\n // @pragma Modification\n\n OrderedMap.prototype.clear = function clear () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._map.clear();\n this._list.clear();\n this.__altered = true;\n return this;\n }\n return emptyOrderedMap();\n };\n\n OrderedMap.prototype.set = function set (k, v) {\n return updateOrderedMap(this, k, v);\n };\n\n OrderedMap.prototype.remove = function remove (k) {\n return updateOrderedMap(this, k, NOT_SET);\n };\n\n OrderedMap.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n return this._list.__iterate(\n function (entry) { return entry && fn(entry[1], entry[0], this$1$1); },\n reverse\n );\n };\n\n OrderedMap.prototype.__iterator = function __iterator (type, reverse) {\n return this._list.fromEntrySeq().__iterator(type, reverse);\n };\n\n OrderedMap.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n var newList = this._list.__ensureOwner(ownerID);\n if (!ownerID) {\n if (this.size === 0) {\n return emptyOrderedMap();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n this._map = newMap;\n this._list = newList;\n return this;\n }\n return makeOrderedMap(newMap, newList, ownerID, this.__hash);\n };\n\n return OrderedMap;\n}(Map));\n\nOrderedMap.isOrderedMap = isOrderedMap;\n\nOrderedMap.prototype[IS_ORDERED_SYMBOL] = true;\nOrderedMap.prototype[DELETE] = OrderedMap.prototype.remove;\n\nfunction makeOrderedMap(map, list, ownerID, hash) {\n var omap = Object.create(OrderedMap.prototype);\n omap.size = map ? map.size : 0;\n omap._map = map;\n omap._list = list;\n omap.__ownerID = ownerID;\n omap.__hash = hash;\n omap.__altered = false;\n return omap;\n}\n\nvar EMPTY_ORDERED_MAP;\nfunction emptyOrderedMap() {\n return (\n EMPTY_ORDERED_MAP ||\n (EMPTY_ORDERED_MAP = makeOrderedMap(emptyMap(), emptyList()))\n );\n}\n\nfunction updateOrderedMap(omap, k, v) {\n var map = omap._map;\n var list = omap._list;\n var i = map.get(k);\n var has = i !== undefined;\n var newMap;\n var newList;\n if (v === NOT_SET) {\n // removed\n if (!has) {\n return omap;\n }\n if (list.size >= SIZE && list.size >= map.size * 2) {\n newList = list.filter(function (entry, idx) { return entry !== undefined && i !== idx; });\n newMap = newList\n .toKeyedSeq()\n .map(function (entry) { return entry[0]; })\n .flip()\n .toMap();\n if (omap.__ownerID) {\n newMap.__ownerID = newList.__ownerID = omap.__ownerID;\n }\n } else {\n newMap = map.remove(k);\n newList = i === list.size - 1 ? list.pop() : list.set(i, undefined);\n }\n } else if (has) {\n if (v === list.get(i)[1]) {\n return omap;\n }\n newMap = map;\n newList = list.set(i, [k, v]);\n } else {\n newMap = map.set(k, list.size);\n newList = list.set(list.size, [k, v]);\n }\n if (omap.__ownerID) {\n omap.size = newMap.size;\n omap._map = newMap;\n omap._list = newList;\n omap.__hash = undefined;\n omap.__altered = true;\n return omap;\n }\n return makeOrderedMap(newMap, newList);\n}\n\nvar IS_STACK_SYMBOL = '@@__IMMUTABLE_STACK__@@';\n\nfunction isStack(maybeStack) {\n return Boolean(maybeStack && maybeStack[IS_STACK_SYMBOL]);\n}\n\nvar Stack = /*@__PURE__*/(function (IndexedCollection) {\n function Stack(value) {\n return value === undefined || value === null\n ? emptyStack()\n : isStack(value)\n ? value\n : emptyStack().pushAll(value);\n }\n\n if ( IndexedCollection ) Stack.__proto__ = IndexedCollection;\n Stack.prototype = Object.create( IndexedCollection && IndexedCollection.prototype );\n Stack.prototype.constructor = Stack;\n\n Stack.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n Stack.prototype.toString = function toString () {\n return this.__toString('Stack [', ']');\n };\n\n // @pragma Access\n\n Stack.prototype.get = function get (index, notSetValue) {\n var head = this._head;\n index = wrapIndex(this, index);\n while (head && index--) {\n head = head.next;\n }\n return head ? head.value : notSetValue;\n };\n\n Stack.prototype.peek = function peek () {\n return this._head && this._head.value;\n };\n\n // @pragma Modification\n\n Stack.prototype.push = function push (/*...values*/) {\n var arguments$1 = arguments;\n\n if (arguments.length === 0) {\n return this;\n }\n var newSize = this.size + arguments.length;\n var head = this._head;\n for (var ii = arguments.length - 1; ii >= 0; ii--) {\n head = {\n value: arguments$1[ii],\n next: head,\n };\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pushAll = function pushAll (iter) {\n iter = IndexedCollection(iter);\n if (iter.size === 0) {\n return this;\n }\n if (this.size === 0 && isStack(iter)) {\n return iter;\n }\n assertNotInfinite(iter.size);\n var newSize = this.size;\n var head = this._head;\n iter.__iterate(function (value) {\n newSize++;\n head = {\n value: value,\n next: head,\n };\n }, /* reverse */ true);\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n Stack.prototype.pop = function pop () {\n return this.slice(1);\n };\n\n Stack.prototype.clear = function clear () {\n if (this.size === 0) {\n return this;\n }\n if (this.__ownerID) {\n this.size = 0;\n this._head = undefined;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return emptyStack();\n };\n\n Stack.prototype.slice = function slice (begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n var resolvedBegin = resolveBegin(begin, this.size);\n var resolvedEnd = resolveEnd(end, this.size);\n if (resolvedEnd !== this.size) {\n // super.slice(begin, end);\n return IndexedCollection.prototype.slice.call(this, begin, end);\n }\n var newSize = this.size - resolvedBegin;\n var head = this._head;\n while (resolvedBegin--) {\n head = head.next;\n }\n if (this.__ownerID) {\n this.size = newSize;\n this._head = head;\n this.__hash = undefined;\n this.__altered = true;\n return this;\n }\n return makeStack(newSize, head);\n };\n\n // @pragma Mutability\n\n Stack.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n if (!ownerID) {\n if (this.size === 0) {\n return emptyStack();\n }\n this.__ownerID = ownerID;\n this.__altered = false;\n return this;\n }\n return makeStack(this.size, this._head, ownerID, this.__hash);\n };\n\n // @pragma Iteration\n\n Stack.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n if (reverse) {\n return new ArraySeq(this.toArray()).__iterate(\n function (v, k) { return fn(v, k, this$1$1); },\n reverse\n );\n }\n var iterations = 0;\n var node = this._head;\n while (node) {\n if (fn(node.value, iterations++, this) === false) {\n break;\n }\n node = node.next;\n }\n return iterations;\n };\n\n Stack.prototype.__iterator = function __iterator (type, reverse) {\n if (reverse) {\n return new ArraySeq(this.toArray()).__iterator(type, reverse);\n }\n var iterations = 0;\n var node = this._head;\n return new Iterator(function () {\n if (node) {\n var value = node.value;\n node = node.next;\n return iteratorValue(type, iterations++, value);\n }\n return iteratorDone();\n });\n };\n\n return Stack;\n}(IndexedCollection));\n\nStack.isStack = isStack;\n\nvar StackPrototype = Stack.prototype;\nStackPrototype[IS_STACK_SYMBOL] = true;\nStackPrototype.shift = StackPrototype.pop;\nStackPrototype.unshift = StackPrototype.push;\nStackPrototype.unshiftAll = StackPrototype.pushAll;\nStackPrototype.withMutations = withMutations;\nStackPrototype.wasAltered = wasAltered;\nStackPrototype.asImmutable = asImmutable;\nStackPrototype['@@transducer/init'] = StackPrototype.asMutable = asMutable;\nStackPrototype['@@transducer/step'] = function (result, arr) {\n return result.unshift(arr);\n};\nStackPrototype['@@transducer/result'] = function (obj) {\n return obj.asImmutable();\n};\n\nfunction makeStack(size, head, ownerID, hash) {\n var map = Object.create(StackPrototype);\n map.size = size;\n map._head = head;\n map.__ownerID = ownerID;\n map.__hash = hash;\n map.__altered = false;\n return map;\n}\n\nvar EMPTY_STACK;\nfunction emptyStack() {\n return EMPTY_STACK || (EMPTY_STACK = makeStack(0));\n}\n\nvar IS_SET_SYMBOL = '@@__IMMUTABLE_SET__@@';\n\nfunction isSet(maybeSet) {\n return Boolean(maybeSet && maybeSet[IS_SET_SYMBOL]);\n}\n\nfunction isOrderedSet(maybeOrderedSet) {\n return isSet(maybeOrderedSet) && isOrdered(maybeOrderedSet);\n}\n\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (\n !isCollection(b) ||\n (a.size !== undefined && b.size !== undefined && a.size !== b.size) ||\n (a.__hash !== undefined &&\n b.__hash !== undefined &&\n a.__hash !== b.__hash) ||\n isKeyed(a) !== isKeyed(b) ||\n isIndexed(a) !== isIndexed(b) ||\n isOrdered(a) !== isOrdered(b)\n ) {\n return false;\n }\n\n if (a.size === 0 && b.size === 0) {\n return true;\n }\n\n var notAssociative = !isAssociative(a);\n\n if (isOrdered(a)) {\n var entries = a.entries();\n return (\n b.every(function (v, k) {\n var entry = entries.next().value;\n return entry && is(entry[1], v) && (notAssociative || is(entry[0], k));\n }) && entries.next().done\n );\n }\n\n var flipped = false;\n\n if (a.size === undefined) {\n if (b.size === undefined) {\n if (typeof a.cacheResult === 'function') {\n a.cacheResult();\n }\n } else {\n flipped = true;\n var _ = a;\n a = b;\n b = _;\n }\n }\n\n var allEqual = true;\n var bSize = b.__iterate(function (v, k) {\n if (\n notAssociative\n ? !a.has(v)\n : flipped\n ? !is(v, a.get(k, NOT_SET))\n : !is(a.get(k, NOT_SET), v)\n ) {\n allEqual = false;\n return false;\n }\n });\n\n return allEqual && a.size === bSize;\n}\n\nfunction mixin(ctor, methods) {\n var keyCopier = function (key) {\n ctor.prototype[key] = methods[key];\n };\n Object.keys(methods).forEach(keyCopier);\n Object.getOwnPropertySymbols &&\n Object.getOwnPropertySymbols(methods).forEach(keyCopier);\n return ctor;\n}\n\nfunction toJS(value) {\n if (!value || typeof value !== 'object') {\n return value;\n }\n if (!isCollection(value)) {\n if (!isDataStructure(value)) {\n return value;\n }\n value = Seq(value);\n }\n if (isKeyed(value)) {\n var result$1 = {};\n value.__iterate(function (v, k) {\n result$1[k] = toJS(v);\n });\n return result$1;\n }\n var result = [];\n value.__iterate(function (v) {\n result.push(toJS(v));\n });\n return result;\n}\n\nvar Set = /*@__PURE__*/(function (SetCollection) {\n function Set(value) {\n return value === undefined || value === null\n ? emptySet()\n : isSet(value) && !isOrdered(value)\n ? value\n : emptySet().withMutations(function (set) {\n var iter = SetCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v) { return set.add(v); });\n });\n }\n\n if ( SetCollection ) Set.__proto__ = SetCollection;\n Set.prototype = Object.create( SetCollection && SetCollection.prototype );\n Set.prototype.constructor = Set;\n\n Set.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n Set.fromKeys = function fromKeys (value) {\n return this(KeyedCollection(value).keySeq());\n };\n\n Set.intersect = function intersect (sets) {\n sets = Collection(sets).toArray();\n return sets.length\n ? SetPrototype.intersect.apply(Set(sets.pop()), sets)\n : emptySet();\n };\n\n Set.union = function union (sets) {\n sets = Collection(sets).toArray();\n return sets.length\n ? SetPrototype.union.apply(Set(sets.pop()), sets)\n : emptySet();\n };\n\n Set.prototype.toString = function toString () {\n return this.__toString('Set {', '}');\n };\n\n // @pragma Access\n\n Set.prototype.has = function has (value) {\n return this._map.has(value);\n };\n\n // @pragma Modification\n\n Set.prototype.add = function add (value) {\n return updateSet(this, this._map.set(value, value));\n };\n\n Set.prototype.remove = function remove (value) {\n return updateSet(this, this._map.remove(value));\n };\n\n Set.prototype.clear = function clear () {\n return updateSet(this, this._map.clear());\n };\n\n // @pragma Composition\n\n Set.prototype.map = function map (mapper, context) {\n var this$1$1 = this;\n\n // keep track if the set is altered by the map function\n var didChanges = false;\n\n var newMap = updateSet(\n this,\n this._map.mapEntries(function (ref) {\n var v = ref[1];\n\n var mapped = mapper.call(context, v, v, this$1$1);\n\n if (mapped !== v) {\n didChanges = true;\n }\n\n return [mapped, mapped];\n }, context)\n );\n\n return didChanges ? newMap : this;\n };\n\n Set.prototype.union = function union () {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n iters = iters.filter(function (x) { return x.size !== 0; });\n if (iters.length === 0) {\n return this;\n }\n if (this.size === 0 && !this.__ownerID && iters.length === 1) {\n return this.constructor(iters[0]);\n }\n return this.withMutations(function (set) {\n for (var ii = 0; ii < iters.length; ii++) {\n if (typeof iters[ii] === 'string') {\n set.add(iters[ii]);\n } else {\n SetCollection(iters[ii]).forEach(function (value) { return set.add(value); });\n }\n }\n });\n };\n\n Set.prototype.intersect = function intersect () {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function (iter) { return SetCollection(iter); });\n var toRemove = [];\n this.forEach(function (value) {\n if (!iters.every(function (iter) { return iter.includes(value); })) {\n toRemove.push(value);\n }\n });\n return this.withMutations(function (set) {\n toRemove.forEach(function (value) {\n set.remove(value);\n });\n });\n };\n\n Set.prototype.subtract = function subtract () {\n var iters = [], len = arguments.length;\n while ( len-- ) iters[ len ] = arguments[ len ];\n\n if (iters.length === 0) {\n return this;\n }\n iters = iters.map(function (iter) { return SetCollection(iter); });\n var toRemove = [];\n this.forEach(function (value) {\n if (iters.some(function (iter) { return iter.includes(value); })) {\n toRemove.push(value);\n }\n });\n return this.withMutations(function (set) {\n toRemove.forEach(function (value) {\n set.remove(value);\n });\n });\n };\n\n Set.prototype.sort = function sort (comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator));\n };\n\n Set.prototype.sortBy = function sortBy (mapper, comparator) {\n // Late binding\n return OrderedSet(sortFactory(this, comparator, mapper));\n };\n\n Set.prototype.wasAltered = function wasAltered () {\n return this._map.wasAltered();\n };\n\n Set.prototype.__iterate = function __iterate (fn, reverse) {\n var this$1$1 = this;\n\n return this._map.__iterate(function (k) { return fn(k, k, this$1$1); }, reverse);\n };\n\n Set.prototype.__iterator = function __iterator (type, reverse) {\n return this._map.__iterator(type, reverse);\n };\n\n Set.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newMap = this._map.__ensureOwner(ownerID);\n if (!ownerID) {\n if (this.size === 0) {\n return this.__empty();\n }\n this.__ownerID = ownerID;\n this._map = newMap;\n return this;\n }\n return this.__make(newMap, ownerID);\n };\n\n return Set;\n}(SetCollection));\n\nSet.isSet = isSet;\n\nvar SetPrototype = Set.prototype;\nSetPrototype[IS_SET_SYMBOL] = true;\nSetPrototype[DELETE] = SetPrototype.remove;\nSetPrototype.merge = SetPrototype.concat = SetPrototype.union;\nSetPrototype.withMutations = withMutations;\nSetPrototype.asImmutable = asImmutable;\nSetPrototype['@@transducer/init'] = SetPrototype.asMutable = asMutable;\nSetPrototype['@@transducer/step'] = function (result, arr) {\n return result.add(arr);\n};\nSetPrototype['@@transducer/result'] = function (obj) {\n return obj.asImmutable();\n};\n\nSetPrototype.__empty = emptySet;\nSetPrototype.__make = makeSet;\n\nfunction updateSet(set, newMap) {\n if (set.__ownerID) {\n set.size = newMap.size;\n set._map = newMap;\n return set;\n }\n return newMap === set._map\n ? set\n : newMap.size === 0\n ? set.__empty()\n : set.__make(newMap);\n}\n\nfunction makeSet(map, ownerID) {\n var set = Object.create(SetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n}\n\nvar EMPTY_SET;\nfunction emptySet() {\n return EMPTY_SET || (EMPTY_SET = makeSet(emptyMap()));\n}\n\n/**\n * Returns a lazy seq of nums from start (inclusive) to end\n * (exclusive), by step, where start defaults to 0, step to 1, and end to\n * infinity. When start is equal to end, returns empty list.\n */\nvar Range = /*@__PURE__*/(function (IndexedSeq) {\n function Range(start, end, step) {\n if (!(this instanceof Range)) {\n return new Range(start, end, step);\n }\n invariant(step !== 0, 'Cannot step a Range by 0');\n start = start || 0;\n if (end === undefined) {\n end = Infinity;\n }\n step = step === undefined ? 1 : Math.abs(step);\n if (end < start) {\n step = -step;\n }\n this._start = start;\n this._end = end;\n this._step = step;\n this.size = Math.max(0, Math.ceil((end - start) / step - 1) + 1);\n if (this.size === 0) {\n if (EMPTY_RANGE) {\n return EMPTY_RANGE;\n }\n EMPTY_RANGE = this;\n }\n }\n\n if ( IndexedSeq ) Range.__proto__ = IndexedSeq;\n Range.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );\n Range.prototype.constructor = Range;\n\n Range.prototype.toString = function toString () {\n if (this.size === 0) {\n return 'Range []';\n }\n return (\n 'Range [ ' +\n this._start +\n '...' +\n this._end +\n (this._step !== 1 ? ' by ' + this._step : '') +\n ' ]'\n );\n };\n\n Range.prototype.get = function get (index, notSetValue) {\n return this.has(index)\n ? this._start + wrapIndex(this, index) * this._step\n : notSetValue;\n };\n\n Range.prototype.includes = function includes (searchValue) {\n var possibleIndex = (searchValue - this._start) / this._step;\n return (\n possibleIndex >= 0 &&\n possibleIndex < this.size &&\n possibleIndex === Math.floor(possibleIndex)\n );\n };\n\n Range.prototype.slice = function slice (begin, end) {\n if (wholeSlice(begin, end, this.size)) {\n return this;\n }\n begin = resolveBegin(begin, this.size);\n end = resolveEnd(end, this.size);\n if (end <= begin) {\n return new Range(0, 0);\n }\n return new Range(\n this.get(begin, this._end),\n this.get(end, this._end),\n this._step\n );\n };\n\n Range.prototype.indexOf = function indexOf (searchValue) {\n var offsetValue = searchValue - this._start;\n if (offsetValue % this._step === 0) {\n var index = offsetValue / this._step;\n if (index >= 0 && index < this.size) {\n return index;\n }\n }\n return -1;\n };\n\n Range.prototype.lastIndexOf = function lastIndexOf (searchValue) {\n return this.indexOf(searchValue);\n };\n\n Range.prototype.__iterate = function __iterate (fn, reverse) {\n var size = this.size;\n var step = this._step;\n var value = reverse ? this._start + (size - 1) * step : this._start;\n var i = 0;\n while (i !== size) {\n if (fn(value, reverse ? size - ++i : i++, this) === false) {\n break;\n }\n value += reverse ? -step : step;\n }\n return i;\n };\n\n Range.prototype.__iterator = function __iterator (type, reverse) {\n var size = this.size;\n var step = this._step;\n var value = reverse ? this._start + (size - 1) * step : this._start;\n var i = 0;\n return new Iterator(function () {\n if (i === size) {\n return iteratorDone();\n }\n var v = value;\n value += reverse ? -step : step;\n return iteratorValue(type, reverse ? size - ++i : i++, v);\n });\n };\n\n Range.prototype.equals = function equals (other) {\n return other instanceof Range\n ? this._start === other._start &&\n this._end === other._end &&\n this._step === other._step\n : deepEqual(this, other);\n };\n\n return Range;\n}(IndexedSeq));\n\nvar EMPTY_RANGE;\n\nfunction getIn$1(collection, searchKeyPath, notSetValue) {\n var keyPath = coerceKeyPath(searchKeyPath);\n var i = 0;\n while (i !== keyPath.length) {\n collection = get(collection, keyPath[i++], NOT_SET);\n if (collection === NOT_SET) {\n return notSetValue;\n }\n }\n return collection;\n}\n\nfunction getIn(searchKeyPath, notSetValue) {\n return getIn$1(this, searchKeyPath, notSetValue);\n}\n\nfunction hasIn$1(collection, keyPath) {\n return getIn$1(collection, keyPath, NOT_SET) !== NOT_SET;\n}\n\nfunction hasIn(searchKeyPath) {\n return hasIn$1(this, searchKeyPath);\n}\n\nfunction toObject() {\n assertNotInfinite(this.size);\n var object = {};\n this.__iterate(function (v, k) {\n object[k] = v;\n });\n return object;\n}\n\n// Note: all of these methods are deprecated.\nCollection.isIterable = isCollection;\nCollection.isKeyed = isKeyed;\nCollection.isIndexed = isIndexed;\nCollection.isAssociative = isAssociative;\nCollection.isOrdered = isOrdered;\n\nCollection.Iterator = Iterator;\n\nmixin(Collection, {\n // ### Conversion to other types\n\n toArray: function toArray() {\n assertNotInfinite(this.size);\n var array = new Array(this.size || 0);\n var useTuples = isKeyed(this);\n var i = 0;\n this.__iterate(function (v, k) {\n // Keyed collections produce an array of tuples.\n array[i++] = useTuples ? [k, v] : v;\n });\n return array;\n },\n\n toIndexedSeq: function toIndexedSeq() {\n return new ToIndexedSequence(this);\n },\n\n toJS: function toJS$1() {\n return toJS(this);\n },\n\n toKeyedSeq: function toKeyedSeq() {\n return new ToKeyedSequence(this, true);\n },\n\n toMap: function toMap() {\n // Use Late Binding here to solve the circular dependency.\n return Map(this.toKeyedSeq());\n },\n\n toObject: toObject,\n\n toOrderedMap: function toOrderedMap() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedMap(this.toKeyedSeq());\n },\n\n toOrderedSet: function toOrderedSet() {\n // Use Late Binding here to solve the circular dependency.\n return OrderedSet(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSet: function toSet() {\n // Use Late Binding here to solve the circular dependency.\n return Set(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toSetSeq: function toSetSeq() {\n return new ToSetSequence(this);\n },\n\n toSeq: function toSeq() {\n return isIndexed(this)\n ? this.toIndexedSeq()\n : isKeyed(this)\n ? this.toKeyedSeq()\n : this.toSetSeq();\n },\n\n toStack: function toStack() {\n // Use Late Binding here to solve the circular dependency.\n return Stack(isKeyed(this) ? this.valueSeq() : this);\n },\n\n toList: function toList() {\n // Use Late Binding here to solve the circular dependency.\n return List(isKeyed(this) ? this.valueSeq() : this);\n },\n\n // ### Common JavaScript methods and properties\n\n toString: function toString() {\n return '[Collection]';\n },\n\n __toString: function __toString(head, tail) {\n if (this.size === 0) {\n return head + tail;\n }\n return (\n head +\n ' ' +\n this.toSeq().map(this.__toStringMapper).join(', ') +\n ' ' +\n tail\n );\n },\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n concat: function concat() {\n var values = [], len = arguments.length;\n while ( len-- ) values[ len ] = arguments[ len ];\n\n return reify(this, concatFactory(this, values));\n },\n\n includes: function includes(searchValue) {\n return this.some(function (value) { return is(value, searchValue); });\n },\n\n entries: function entries() {\n return this.__iterator(ITERATE_ENTRIES);\n },\n\n every: function every(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = true;\n this.__iterate(function (v, k, c) {\n if (!predicate.call(context, v, k, c)) {\n returnValue = false;\n return false;\n }\n });\n return returnValue;\n },\n\n filter: function filter(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, true));\n },\n\n partition: function partition(predicate, context) {\n return partitionFactory(this, predicate, context);\n },\n\n find: function find(predicate, context, notSetValue) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[1] : notSetValue;\n },\n\n forEach: function forEach(sideEffect, context) {\n assertNotInfinite(this.size);\n return this.__iterate(context ? sideEffect.bind(context) : sideEffect);\n },\n\n join: function join(separator) {\n assertNotInfinite(this.size);\n separator = separator !== undefined ? '' + separator : ',';\n var joined = '';\n var isFirst = true;\n this.__iterate(function (v) {\n isFirst ? (isFirst = false) : (joined += separator);\n joined += v !== null && v !== undefined ? v.toString() : '';\n });\n return joined;\n },\n\n keys: function keys() {\n return this.__iterator(ITERATE_KEYS);\n },\n\n map: function map(mapper, context) {\n return reify(this, mapFactory(this, mapper, context));\n },\n\n reduce: function reduce$1(reducer, initialReduction, context) {\n return reduce(\n this,\n reducer,\n initialReduction,\n context,\n arguments.length < 2,\n false\n );\n },\n\n reduceRight: function reduceRight(reducer, initialReduction, context) {\n return reduce(\n this,\n reducer,\n initialReduction,\n context,\n arguments.length < 2,\n true\n );\n },\n\n reverse: function reverse() {\n return reify(this, reverseFactory(this, true));\n },\n\n slice: function slice(begin, end) {\n return reify(this, sliceFactory(this, begin, end, true));\n },\n\n some: function some(predicate, context) {\n assertNotInfinite(this.size);\n var returnValue = false;\n this.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n returnValue = true;\n return false;\n }\n });\n return returnValue;\n },\n\n sort: function sort(comparator) {\n return reify(this, sortFactory(this, comparator));\n },\n\n values: function values() {\n return this.__iterator(ITERATE_VALUES);\n },\n\n // ### More sequential methods\n\n butLast: function butLast() {\n return this.slice(0, -1);\n },\n\n isEmpty: function isEmpty() {\n return this.size !== undefined ? this.size === 0 : !this.some(function () { return true; });\n },\n\n count: function count(predicate, context) {\n return ensureSize(\n predicate ? this.toSeq().filter(predicate, context) : this\n );\n },\n\n countBy: function countBy(grouper, context) {\n return countByFactory(this, grouper, context);\n },\n\n equals: function equals(other) {\n return deepEqual(this, other);\n },\n\n entrySeq: function entrySeq() {\n var collection = this;\n if (collection._cache) {\n // We cache as an entries array, so we can just return the cache!\n return new ArraySeq(collection._cache);\n }\n var entriesSequence = collection.toSeq().map(entryMapper).toIndexedSeq();\n entriesSequence.fromEntrySeq = function () { return collection.toSeq(); };\n return entriesSequence;\n },\n\n filterNot: function filterNot(predicate, context) {\n return this.filter(not(predicate), context);\n },\n\n findEntry: function findEntry(predicate, context, notSetValue) {\n var found = notSetValue;\n this.__iterate(function (v, k, c) {\n if (predicate.call(context, v, k, c)) {\n found = [k, v];\n return false;\n }\n });\n return found;\n },\n\n findKey: function findKey(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry && entry[0];\n },\n\n findLast: function findLast(predicate, context, notSetValue) {\n return this.toKeyedSeq().reverse().find(predicate, context, notSetValue);\n },\n\n findLastEntry: function findLastEntry(predicate, context, notSetValue) {\n return this.toKeyedSeq()\n .reverse()\n .findEntry(predicate, context, notSetValue);\n },\n\n findLastKey: function findLastKey(predicate, context) {\n return this.toKeyedSeq().reverse().findKey(predicate, context);\n },\n\n first: function first(notSetValue) {\n return this.find(returnTrue, null, notSetValue);\n },\n\n flatMap: function flatMap(mapper, context) {\n return reify(this, flatMapFactory(this, mapper, context));\n },\n\n flatten: function flatten(depth) {\n return reify(this, flattenFactory(this, depth, true));\n },\n\n fromEntrySeq: function fromEntrySeq() {\n return new FromEntriesSequence(this);\n },\n\n get: function get(searchKey, notSetValue) {\n return this.find(function (_, key) { return is(key, searchKey); }, undefined, notSetValue);\n },\n\n getIn: getIn,\n\n groupBy: function groupBy(grouper, context) {\n return groupByFactory(this, grouper, context);\n },\n\n has: function has(searchKey) {\n return this.get(searchKey, NOT_SET) !== NOT_SET;\n },\n\n hasIn: hasIn,\n\n isSubset: function isSubset(iter) {\n iter = typeof iter.includes === 'function' ? iter : Collection(iter);\n return this.every(function (value) { return iter.includes(value); });\n },\n\n isSuperset: function isSuperset(iter) {\n iter = typeof iter.isSubset === 'function' ? iter : Collection(iter);\n return iter.isSubset(this);\n },\n\n keyOf: function keyOf(searchValue) {\n return this.findKey(function (value) { return is(value, searchValue); });\n },\n\n keySeq: function keySeq() {\n return this.toSeq().map(keyMapper).toIndexedSeq();\n },\n\n last: function last(notSetValue) {\n return this.toSeq().reverse().first(notSetValue);\n },\n\n lastKeyOf: function lastKeyOf(searchValue) {\n return this.toKeyedSeq().reverse().keyOf(searchValue);\n },\n\n max: function max(comparator) {\n return maxFactory(this, comparator);\n },\n\n maxBy: function maxBy(mapper, comparator) {\n return maxFactory(this, comparator, mapper);\n },\n\n min: function min(comparator) {\n return maxFactory(\n this,\n comparator ? neg(comparator) : defaultNegComparator\n );\n },\n\n minBy: function minBy(mapper, comparator) {\n return maxFactory(\n this,\n comparator ? neg(comparator) : defaultNegComparator,\n mapper\n );\n },\n\n rest: function rest() {\n return this.slice(1);\n },\n\n skip: function skip(amount) {\n return amount === 0 ? this : this.slice(Math.max(0, amount));\n },\n\n skipLast: function skipLast(amount) {\n return amount === 0 ? this : this.slice(0, -Math.max(0, amount));\n },\n\n skipWhile: function skipWhile(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, true));\n },\n\n skipUntil: function skipUntil(predicate, context) {\n return this.skipWhile(not(predicate), context);\n },\n\n sortBy: function sortBy(mapper, comparator) {\n return reify(this, sortFactory(this, comparator, mapper));\n },\n\n take: function take(amount) {\n return this.slice(0, Math.max(0, amount));\n },\n\n takeLast: function takeLast(amount) {\n return this.slice(-Math.max(0, amount));\n },\n\n takeWhile: function takeWhile(predicate, context) {\n return reify(this, takeWhileFactory(this, predicate, context));\n },\n\n takeUntil: function takeUntil(predicate, context) {\n return this.takeWhile(not(predicate), context);\n },\n\n update: function update(fn) {\n return fn(this);\n },\n\n valueSeq: function valueSeq() {\n return this.toIndexedSeq();\n },\n\n // ### Hashable Object\n\n hashCode: function hashCode() {\n return this.__hash || (this.__hash = hashCollection(this));\n },\n\n // ### Internal\n\n // abstract __iterate(fn, reverse)\n\n // abstract __iterator(type, reverse)\n});\n\nvar CollectionPrototype = Collection.prototype;\nCollectionPrototype[IS_COLLECTION_SYMBOL] = true;\nCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.values;\nCollectionPrototype.toJSON = CollectionPrototype.toArray;\nCollectionPrototype.__toStringMapper = quoteString;\nCollectionPrototype.inspect = CollectionPrototype.toSource = function () {\n return this.toString();\n};\nCollectionPrototype.chain = CollectionPrototype.flatMap;\nCollectionPrototype.contains = CollectionPrototype.includes;\n\nmixin(KeyedCollection, {\n // ### More sequential methods\n\n flip: function flip() {\n return reify(this, flipFactory(this));\n },\n\n mapEntries: function mapEntries(mapper, context) {\n var this$1$1 = this;\n\n var iterations = 0;\n return reify(\n this,\n this.toSeq()\n .map(function (v, k) { return mapper.call(context, [k, v], iterations++, this$1$1); })\n .fromEntrySeq()\n );\n },\n\n mapKeys: function mapKeys(mapper, context) {\n var this$1$1 = this;\n\n return reify(\n this,\n this.toSeq()\n .flip()\n .map(function (k, v) { return mapper.call(context, k, v, this$1$1); })\n .flip()\n );\n },\n});\n\nvar KeyedCollectionPrototype = KeyedCollection.prototype;\nKeyedCollectionPrototype[IS_KEYED_SYMBOL] = true;\nKeyedCollectionPrototype[ITERATOR_SYMBOL] = CollectionPrototype.entries;\nKeyedCollectionPrototype.toJSON = toObject;\nKeyedCollectionPrototype.__toStringMapper = function (v, k) { return quoteString(k) + ': ' + quoteString(v); };\n\nmixin(IndexedCollection, {\n // ### Conversion to other types\n\n toKeyedSeq: function toKeyedSeq() {\n return new ToKeyedSequence(this, false);\n },\n\n // ### ES6 Collection methods (ES6 Array and Map)\n\n filter: function filter(predicate, context) {\n return reify(this, filterFactory(this, predicate, context, false));\n },\n\n findIndex: function findIndex(predicate, context) {\n var entry = this.findEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n indexOf: function indexOf(searchValue) {\n var key = this.keyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n lastIndexOf: function lastIndexOf(searchValue) {\n var key = this.lastKeyOf(searchValue);\n return key === undefined ? -1 : key;\n },\n\n reverse: function reverse() {\n return reify(this, reverseFactory(this, false));\n },\n\n slice: function slice(begin, end) {\n return reify(this, sliceFactory(this, begin, end, false));\n },\n\n splice: function splice(index, removeNum /*, ...values*/) {\n var numArgs = arguments.length;\n removeNum = Math.max(removeNum || 0, 0);\n if (numArgs === 0 || (numArgs === 2 && !removeNum)) {\n return this;\n }\n // If index is negative, it should resolve relative to the size of the\n // collection. However size may be expensive to compute if not cached, so\n // only call count() if the number is in fact negative.\n index = resolveBegin(index, index < 0 ? this.count() : this.size);\n var spliced = this.slice(0, index);\n return reify(\n this,\n numArgs === 1\n ? spliced\n : spliced.concat(arrCopy(arguments, 2), this.slice(index + removeNum))\n );\n },\n\n // ### More collection methods\n\n findLastIndex: function findLastIndex(predicate, context) {\n var entry = this.findLastEntry(predicate, context);\n return entry ? entry[0] : -1;\n },\n\n first: function first(notSetValue) {\n return this.get(0, notSetValue);\n },\n\n flatten: function flatten(depth) {\n return reify(this, flattenFactory(this, depth, false));\n },\n\n get: function get(index, notSetValue) {\n index = wrapIndex(this, index);\n return index < 0 ||\n this.size === Infinity ||\n (this.size !== undefined && index > this.size)\n ? notSetValue\n : this.find(function (_, key) { return key === index; }, undefined, notSetValue);\n },\n\n has: function has(index) {\n index = wrapIndex(this, index);\n return (\n index >= 0 &&\n (this.size !== undefined\n ? this.size === Infinity || index < this.size\n : this.indexOf(index) !== -1)\n );\n },\n\n interpose: function interpose(separator) {\n return reify(this, interposeFactory(this, separator));\n },\n\n interleave: function interleave(/*...collections*/) {\n var collections = [this].concat(arrCopy(arguments));\n var zipped = zipWithFactory(this.toSeq(), IndexedSeq.of, collections);\n var interleaved = zipped.flatten(true);\n if (zipped.size) {\n interleaved.size = zipped.size * collections.length;\n }\n return reify(this, interleaved);\n },\n\n keySeq: function keySeq() {\n return Range(0, this.size);\n },\n\n last: function last(notSetValue) {\n return this.get(-1, notSetValue);\n },\n\n skipWhile: function skipWhile(predicate, context) {\n return reify(this, skipWhileFactory(this, predicate, context, false));\n },\n\n zip: function zip(/*, ...collections */) {\n var collections = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, collections));\n },\n\n zipAll: function zipAll(/*, ...collections */) {\n var collections = [this].concat(arrCopy(arguments));\n return reify(this, zipWithFactory(this, defaultZipper, collections, true));\n },\n\n zipWith: function zipWith(zipper /*, ...collections */) {\n var collections = arrCopy(arguments);\n collections[0] = this;\n return reify(this, zipWithFactory(this, zipper, collections));\n },\n});\n\nvar IndexedCollectionPrototype = IndexedCollection.prototype;\nIndexedCollectionPrototype[IS_INDEXED_SYMBOL] = true;\nIndexedCollectionPrototype[IS_ORDERED_SYMBOL] = true;\n\nmixin(SetCollection, {\n // ### ES6 Collection methods (ES6 Array and Map)\n\n get: function get(value, notSetValue) {\n return this.has(value) ? value : notSetValue;\n },\n\n includes: function includes(value) {\n return this.has(value);\n },\n\n // ### More sequential methods\n\n keySeq: function keySeq() {\n return this.valueSeq();\n },\n});\n\nvar SetCollectionPrototype = SetCollection.prototype;\nSetCollectionPrototype.has = CollectionPrototype.includes;\nSetCollectionPrototype.contains = SetCollectionPrototype.includes;\nSetCollectionPrototype.keys = SetCollectionPrototype.values;\n\n// Mixin subclasses\n\nmixin(KeyedSeq, KeyedCollectionPrototype);\nmixin(IndexedSeq, IndexedCollectionPrototype);\nmixin(SetSeq, SetCollectionPrototype);\n\n// #pragma Helper functions\n\nfunction reduce(collection, reducer, reduction, context, useFirst, reverse) {\n assertNotInfinite(collection.size);\n collection.__iterate(function (v, k, c) {\n if (useFirst) {\n useFirst = false;\n reduction = v;\n } else {\n reduction = reducer.call(context, reduction, v, k, c);\n }\n }, reverse);\n return reduction;\n}\n\nfunction keyMapper(v, k) {\n return k;\n}\n\nfunction entryMapper(v, k) {\n return [k, v];\n}\n\nfunction not(predicate) {\n return function () {\n return !predicate.apply(this, arguments);\n };\n}\n\nfunction neg(predicate) {\n return function () {\n return -predicate.apply(this, arguments);\n };\n}\n\nfunction defaultZipper() {\n return arrCopy(arguments);\n}\n\nfunction defaultNegComparator(a, b) {\n return a < b ? 1 : a > b ? -1 : 0;\n}\n\nfunction hashCollection(collection) {\n if (collection.size === Infinity) {\n return 0;\n }\n var ordered = isOrdered(collection);\n var keyed = isKeyed(collection);\n var h = ordered ? 1 : 0;\n var size = collection.__iterate(\n keyed\n ? ordered\n ? function (v, k) {\n h = (31 * h + hashMerge(hash(v), hash(k))) | 0;\n }\n : function (v, k) {\n h = (h + hashMerge(hash(v), hash(k))) | 0;\n }\n : ordered\n ? function (v) {\n h = (31 * h + hash(v)) | 0;\n }\n : function (v) {\n h = (h + hash(v)) | 0;\n }\n );\n return murmurHashOfSize(size, h);\n}\n\nfunction murmurHashOfSize(size, h) {\n h = imul(h, 0xcc9e2d51);\n h = imul((h << 15) | (h >>> -15), 0x1b873593);\n h = imul((h << 13) | (h >>> -13), 5);\n h = ((h + 0xe6546b64) | 0) ^ size;\n h = imul(h ^ (h >>> 16), 0x85ebca6b);\n h = imul(h ^ (h >>> 13), 0xc2b2ae35);\n h = smi(h ^ (h >>> 16));\n return h;\n}\n\nfunction hashMerge(a, b) {\n return (a ^ (b + 0x9e3779b9 + (a << 6) + (a >> 2))) | 0; // int\n}\n\nvar OrderedSet = /*@__PURE__*/(function (Set) {\n function OrderedSet(value) {\n return value === undefined || value === null\n ? emptyOrderedSet()\n : isOrderedSet(value)\n ? value\n : emptyOrderedSet().withMutations(function (set) {\n var iter = SetCollection(value);\n assertNotInfinite(iter.size);\n iter.forEach(function (v) { return set.add(v); });\n });\n }\n\n if ( Set ) OrderedSet.__proto__ = Set;\n OrderedSet.prototype = Object.create( Set && Set.prototype );\n OrderedSet.prototype.constructor = OrderedSet;\n\n OrderedSet.of = function of (/*...values*/) {\n return this(arguments);\n };\n\n OrderedSet.fromKeys = function fromKeys (value) {\n return this(KeyedCollection(value).keySeq());\n };\n\n OrderedSet.prototype.toString = function toString () {\n return this.__toString('OrderedSet {', '}');\n };\n\n return OrderedSet;\n}(Set));\n\nOrderedSet.isOrderedSet = isOrderedSet;\n\nvar OrderedSetPrototype = OrderedSet.prototype;\nOrderedSetPrototype[IS_ORDERED_SYMBOL] = true;\nOrderedSetPrototype.zip = IndexedCollectionPrototype.zip;\nOrderedSetPrototype.zipWith = IndexedCollectionPrototype.zipWith;\nOrderedSetPrototype.zipAll = IndexedCollectionPrototype.zipAll;\n\nOrderedSetPrototype.__empty = emptyOrderedSet;\nOrderedSetPrototype.__make = makeOrderedSet;\n\nfunction makeOrderedSet(map, ownerID) {\n var set = Object.create(OrderedSetPrototype);\n set.size = map ? map.size : 0;\n set._map = map;\n set.__ownerID = ownerID;\n return set;\n}\n\nvar EMPTY_ORDERED_SET;\nfunction emptyOrderedSet() {\n return (\n EMPTY_ORDERED_SET || (EMPTY_ORDERED_SET = makeOrderedSet(emptyOrderedMap()))\n );\n}\n\nvar PairSorting = {\n LeftThenRight: -1,\n RightThenLeft: +1,\n};\n\nfunction throwOnInvalidDefaultValues(defaultValues) {\n if (isRecord(defaultValues)) {\n throw new Error(\n 'Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.'\n );\n }\n\n if (isImmutable(defaultValues)) {\n throw new Error(\n 'Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.'\n );\n }\n\n if (defaultValues === null || typeof defaultValues !== 'object') {\n throw new Error(\n 'Can not call `Record` with a non-object as default values. Use a plain javascript object instead.'\n );\n }\n}\n\nvar Record = function Record(defaultValues, name) {\n var hasInitialized;\n\n throwOnInvalidDefaultValues(defaultValues);\n\n var RecordType = function Record(values) {\n var this$1$1 = this;\n\n if (values instanceof RecordType) {\n return values;\n }\n if (!(this instanceof RecordType)) {\n return new RecordType(values);\n }\n if (!hasInitialized) {\n hasInitialized = true;\n var keys = Object.keys(defaultValues);\n var indices = (RecordTypePrototype._indices = {});\n // Deprecated: left to attempt not to break any external code which\n // relies on a ._name property existing on record instances.\n // Use Record.getDescriptiveName() instead\n RecordTypePrototype._name = name;\n RecordTypePrototype._keys = keys;\n RecordTypePrototype._defaultValues = defaultValues;\n for (var i = 0; i < keys.length; i++) {\n var propName = keys[i];\n indices[propName] = i;\n if (RecordTypePrototype[propName]) {\n /* eslint-disable no-console */\n typeof console === 'object' &&\n console.warn &&\n console.warn(\n 'Cannot define ' +\n recordName(this) +\n ' with property \"' +\n propName +\n '\" since that property name is part of the Record API.'\n );\n /* eslint-enable no-console */\n } else {\n setProp(RecordTypePrototype, propName);\n }\n }\n }\n this.__ownerID = undefined;\n this._values = List().withMutations(function (l) {\n l.setSize(this$1$1._keys.length);\n KeyedCollection(values).forEach(function (v, k) {\n l.set(this$1$1._indices[k], v === this$1$1._defaultValues[k] ? undefined : v);\n });\n });\n return this;\n };\n\n var RecordTypePrototype = (RecordType.prototype =\n Object.create(RecordPrototype));\n RecordTypePrototype.constructor = RecordType;\n\n if (name) {\n RecordType.displayName = name;\n }\n\n return RecordType;\n};\n\nRecord.prototype.toString = function toString () {\n var str = recordName(this) + ' { ';\n var keys = this._keys;\n var k;\n for (var i = 0, l = keys.length; i !== l; i++) {\n k = keys[i];\n str += (i ? ', ' : '') + k + ': ' + quoteString(this.get(k));\n }\n return str + ' }';\n};\n\nRecord.prototype.equals = function equals (other) {\n return (\n this === other ||\n (isRecord(other) && recordSeq(this).equals(recordSeq(other)))\n );\n};\n\nRecord.prototype.hashCode = function hashCode () {\n return recordSeq(this).hashCode();\n};\n\n// @pragma Access\n\nRecord.prototype.has = function has (k) {\n return this._indices.hasOwnProperty(k);\n};\n\nRecord.prototype.get = function get (k, notSetValue) {\n if (!this.has(k)) {\n return notSetValue;\n }\n var index = this._indices[k];\n var value = this._values.get(index);\n return value === undefined ? this._defaultValues[k] : value;\n};\n\n// @pragma Modification\n\nRecord.prototype.set = function set (k, v) {\n if (this.has(k)) {\n var newValues = this._values.set(\n this._indices[k],\n v === this._defaultValues[k] ? undefined : v\n );\n if (newValues !== this._values && !this.__ownerID) {\n return makeRecord(this, newValues);\n }\n }\n return this;\n};\n\nRecord.prototype.remove = function remove (k) {\n return this.set(k);\n};\n\nRecord.prototype.clear = function clear () {\n var newValues = this._values.clear().setSize(this._keys.length);\n\n return this.__ownerID ? this : makeRecord(this, newValues);\n};\n\nRecord.prototype.wasAltered = function wasAltered () {\n return this._values.wasAltered();\n};\n\nRecord.prototype.toSeq = function toSeq () {\n return recordSeq(this);\n};\n\nRecord.prototype.toJS = function toJS$1 () {\n return toJS(this);\n};\n\nRecord.prototype.entries = function entries () {\n return this.__iterator(ITERATE_ENTRIES);\n};\n\nRecord.prototype.__iterator = function __iterator (type, reverse) {\n return recordSeq(this).__iterator(type, reverse);\n};\n\nRecord.prototype.__iterate = function __iterate (fn, reverse) {\n return recordSeq(this).__iterate(fn, reverse);\n};\n\nRecord.prototype.__ensureOwner = function __ensureOwner (ownerID) {\n if (ownerID === this.__ownerID) {\n return this;\n }\n var newValues = this._values.__ensureOwner(ownerID);\n if (!ownerID) {\n this.__ownerID = ownerID;\n this._values = newValues;\n return this;\n }\n return makeRecord(this, newValues, ownerID);\n};\n\nRecord.isRecord = isRecord;\nRecord.getDescriptiveName = recordName;\nvar RecordPrototype = Record.prototype;\nRecordPrototype[IS_RECORD_SYMBOL] = true;\nRecordPrototype[DELETE] = RecordPrototype.remove;\nRecordPrototype.deleteIn = RecordPrototype.removeIn = deleteIn;\nRecordPrototype.getIn = getIn;\nRecordPrototype.hasIn = CollectionPrototype.hasIn;\nRecordPrototype.merge = merge$1;\nRecordPrototype.mergeWith = mergeWith$1;\nRecordPrototype.mergeIn = mergeIn;\nRecordPrototype.mergeDeep = mergeDeep;\nRecordPrototype.mergeDeepWith = mergeDeepWith;\nRecordPrototype.mergeDeepIn = mergeDeepIn;\nRecordPrototype.setIn = setIn;\nRecordPrototype.update = update;\nRecordPrototype.updateIn = updateIn;\nRecordPrototype.withMutations = withMutations;\nRecordPrototype.asMutable = asMutable;\nRecordPrototype.asImmutable = asImmutable;\nRecordPrototype[ITERATOR_SYMBOL] = RecordPrototype.entries;\nRecordPrototype.toJSON = RecordPrototype.toObject =\n CollectionPrototype.toObject;\nRecordPrototype.inspect = RecordPrototype.toSource = function () {\n return this.toString();\n};\n\nfunction makeRecord(likeRecord, values, ownerID) {\n var record = Object.create(Object.getPrototypeOf(likeRecord));\n record._values = values;\n record.__ownerID = ownerID;\n return record;\n}\n\nfunction recordName(record) {\n return record.constructor.displayName || record.constructor.name || 'Record';\n}\n\nfunction recordSeq(record) {\n return keyedSeqFromValue(record._keys.map(function (k) { return [k, record.get(k)]; }));\n}\n\nfunction setProp(prototype, name) {\n try {\n Object.defineProperty(prototype, name, {\n get: function () {\n return this.get(name);\n },\n set: function (value) {\n invariant(this.__ownerID, 'Cannot set on an immutable record.');\n this.set(name, value);\n },\n });\n } catch (error) {\n // Object.defineProperty failed. Probably IE8.\n }\n}\n\n/**\n * Returns a lazy Seq of `value` repeated `times` times. When `times` is\n * undefined, returns an infinite sequence of `value`.\n */\nvar Repeat = /*@__PURE__*/(function (IndexedSeq) {\n function Repeat(value, times) {\n if (!(this instanceof Repeat)) {\n return new Repeat(value, times);\n }\n this._value = value;\n this.size = times === undefined ? Infinity : Math.max(0, times);\n if (this.size === 0) {\n if (EMPTY_REPEAT) {\n return EMPTY_REPEAT;\n }\n EMPTY_REPEAT = this;\n }\n }\n\n if ( IndexedSeq ) Repeat.__proto__ = IndexedSeq;\n Repeat.prototype = Object.create( IndexedSeq && IndexedSeq.prototype );\n Repeat.prototype.constructor = Repeat;\n\n Repeat.prototype.toString = function toString () {\n if (this.size === 0) {\n return 'Repeat []';\n }\n return 'Repeat [ ' + this._value + ' ' + this.size + ' times ]';\n };\n\n Repeat.prototype.get = function get (index, notSetValue) {\n return this.has(index) ? this._value : notSetValue;\n };\n\n Repeat.prototype.includes = function includes (searchValue) {\n return is(this._value, searchValue);\n };\n\n Repeat.prototype.slice = function slice (begin, end) {\n var size = this.size;\n return wholeSlice(begin, end, size)\n ? this\n : new Repeat(\n this._value,\n resolveEnd(end, size) - resolveBegin(begin, size)\n );\n };\n\n Repeat.prototype.reverse = function reverse () {\n return this;\n };\n\n Repeat.prototype.indexOf = function indexOf (searchValue) {\n if (is(this._value, searchValue)) {\n return 0;\n }\n return -1;\n };\n\n Repeat.prototype.lastIndexOf = function lastIndexOf (searchValue) {\n if (is(this._value, searchValue)) {\n return this.size;\n }\n return -1;\n };\n\n Repeat.prototype.__iterate = function __iterate (fn, reverse) {\n var size = this.size;\n var i = 0;\n while (i !== size) {\n if (fn(this._value, reverse ? size - ++i : i++, this) === false) {\n break;\n }\n }\n return i;\n };\n\n Repeat.prototype.__iterator = function __iterator (type, reverse) {\n var this$1$1 = this;\n\n var size = this.size;\n var i = 0;\n return new Iterator(function () { return i === size\n ? iteratorDone()\n : iteratorValue(type, reverse ? size - ++i : i++, this$1$1._value); }\n );\n };\n\n Repeat.prototype.equals = function equals (other) {\n return other instanceof Repeat\n ? is(this._value, other._value)\n : deepEqual(other);\n };\n\n return Repeat;\n}(IndexedSeq));\n\nvar EMPTY_REPEAT;\n\nfunction fromJS(value, converter) {\n return fromJSWith(\n [],\n converter || defaultConverter,\n value,\n '',\n converter && converter.length > 2 ? [] : undefined,\n { '': value }\n );\n}\n\nfunction fromJSWith(stack, converter, value, key, keyPath, parentValue) {\n if (\n typeof value !== 'string' &&\n !isImmutable(value) &&\n (isArrayLike(value) || hasIterator(value) || isPlainObject(value))\n ) {\n if (~stack.indexOf(value)) {\n throw new TypeError('Cannot convert circular structure to Immutable');\n }\n stack.push(value);\n keyPath && key !== '' && keyPath.push(key);\n var converted = converter.call(\n parentValue,\n key,\n Seq(value).map(function (v, k) { return fromJSWith(stack, converter, v, k, keyPath, value); }\n ),\n keyPath && keyPath.slice()\n );\n stack.pop();\n keyPath && keyPath.pop();\n return converted;\n }\n return value;\n}\n\nfunction defaultConverter(k, v) {\n // Effectively the opposite of \"Collection.toSeq()\"\n return isIndexed(v) ? v.toList() : isKeyed(v) ? v.toMap() : v.toSet();\n}\n\nvar version = \"4.3.5\";\n\nvar Immutable = {\n version: version,\n\n Collection: Collection,\n // Note: Iterable is deprecated\n Iterable: Collection,\n\n Seq: Seq,\n Map: Map,\n OrderedMap: OrderedMap,\n List: List,\n Stack: Stack,\n Set: Set,\n OrderedSet: OrderedSet,\n PairSorting: PairSorting,\n\n Record: Record,\n Range: Range,\n Repeat: Repeat,\n\n is: is,\n fromJS: fromJS,\n hash: hash,\n\n isImmutable: isImmutable,\n isCollection: isCollection,\n isKeyed: isKeyed,\n isIndexed: isIndexed,\n isAssociative: isAssociative,\n isOrdered: isOrdered,\n isValueObject: isValueObject,\n isPlainObject: isPlainObject,\n isSeq: isSeq,\n isList: isList,\n isMap: isMap,\n isOrderedMap: isOrderedMap,\n isStack: isStack,\n isSet: isSet,\n isOrderedSet: isOrderedSet,\n isRecord: isRecord,\n\n get: get,\n getIn: getIn$1,\n has: has,\n hasIn: hasIn$1,\n merge: merge,\n mergeDeep: mergeDeep$1,\n mergeWith: mergeWith,\n mergeDeepWith: mergeDeepWith$1,\n remove: remove,\n removeIn: removeIn,\n set: set,\n setIn: setIn$1,\n update: update$1,\n updateIn: updateIn$1,\n};\n\n// Note: Iterable is deprecated\nvar Iterable = Collection;\n\nexport default Immutable;\nexport { Collection, Iterable, List, Map, OrderedMap, OrderedSet, PairSorting, Range, Record, Repeat, Seq, Set, Stack, fromJS, get, getIn$1 as getIn, has, hasIn$1 as hasIn, hash, is, isAssociative, isCollection, isImmutable, isIndexed, isKeyed, isList, isMap, isOrdered, isOrderedMap, isOrderedSet, isPlainObject, isRecord, isSeq, isSet, isStack, isValueObject, merge, mergeDeep$1 as mergeDeep, mergeDeepWith$1 as mergeDeepWith, mergeWith, remove, removeIn, set, setIn$1 as setIn, update$1 as update, updateIn$1 as updateIn, version };\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\n\nconst isStream = stream =>\n\tstream !== null &&\n\ttypeof stream === 'object' &&\n\ttypeof stream.pipe === 'function';\n\nisStream.writable = stream =>\n\tisStream(stream) &&\n\tstream.writable !== false &&\n\ttypeof stream._write === 'function' &&\n\ttypeof stream._writableState === 'object';\n\nisStream.readable = stream =>\n\tisStream(stream) &&\n\tstream.readable !== false &&\n\ttypeof stream._read === 'function' &&\n\ttypeof stream._readableState === 'object';\n\nisStream.duplex = stream =>\n\tisStream.writable(stream) &&\n\tisStream.readable(stream);\n\nisStream.transform = stream =>\n\tisStream.duplex(stream) &&\n\ttypeof stream._transform === 'function';\n\nmodule.exports = isStream;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/ContextParser\"), exports);\n__exportStar(require(\"./lib/ErrorCoded\"), exports);\n__exportStar(require(\"./lib/FetchDocumentLoader\"), exports);\n__exportStar(require(\"./lib/IDocumentLoader\"), exports);\n__exportStar(require(\"./lib/JsonLdContext\"), exports);\n__exportStar(require(\"./lib/JsonLdContextNormalized\"), exports);\n__exportStar(require(\"./lib/Util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContextParser = void 0;\nrequire(\"cross-fetch/polyfill\");\nconst relative_to_absolute_iri_1 = require(\"relative-to-absolute-iri\");\nconst ErrorCoded_1 = require(\"./ErrorCoded\");\nconst FetchDocumentLoader_1 = require(\"./FetchDocumentLoader\");\nconst JsonLdContextNormalized_1 = require(\"./JsonLdContextNormalized\");\nconst Util_1 = require(\"./Util\");\n/**\n * Parses JSON-LD contexts.\n */\nclass ContextParser {\n constructor(options) {\n options = options || {};\n this.documentLoader = options.documentLoader || new FetchDocumentLoader_1.FetchDocumentLoader();\n this.documentCache = {};\n this.validateContext = !options.skipValidation;\n this.expandContentTypeToBase = !!options.expandContentTypeToBase;\n this.remoteContextsDepthLimit = options.remoteContextsDepthLimit || 32;\n this.redirectSchemaOrgHttps = 'redirectSchemaOrgHttps' in options ? !!options.redirectSchemaOrgHttps : true;\n }\n /**\n * Validate the given @language value.\n * An error will be thrown if it is invalid.\n * @param value An @language value.\n * @param {boolean} strictRange If the string value should be strictly checked against a regex.\n * @param {string} errorCode The error code to emit on errors.\n * @return {boolean} If validation passed.\n * Can only be false if strictRange is false and the string value did not pass the regex.\n */\n static validateLanguage(value, strictRange, errorCode) {\n if (typeof value !== 'string') {\n throw new ErrorCoded_1.ErrorCoded(`The value of an '@language' must be a string, got '${JSON.stringify(value)}'`, errorCode);\n }\n if (!Util_1.Util.REGEX_LANGUAGE_TAG.test(value)) {\n if (strictRange) {\n throw new ErrorCoded_1.ErrorCoded(`The value of an '@language' must be a valid language tag, got '${JSON.stringify(value)}'`, errorCode);\n }\n else {\n return false;\n }\n }\n return true;\n }\n /**\n * Validate the given @direction value.\n * An error will be thrown if it is invalid.\n * @param value An @direction value.\n * @param {boolean} strictValues If the string value should be strictly checked against a regex.\n * @return {boolean} If validation passed.\n * Can only be false if strictRange is false and the string value did not pass the regex.\n */\n static validateDirection(value, strictValues) {\n if (typeof value !== 'string') {\n throw new ErrorCoded_1.ErrorCoded(`The value of an '@direction' must be a string, got '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_BASE_DIRECTION);\n }\n if (!Util_1.Util.REGEX_DIRECTION_TAG.test(value)) {\n if (strictValues) {\n throw new ErrorCoded_1.ErrorCoded(`The value of an '@direction' must be 'ltr' or 'rtl', got '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_BASE_DIRECTION);\n }\n else {\n return false;\n }\n }\n return true;\n }\n /**\n * Add an @id term for all @reverse terms.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @return {IJsonLdContextNormalizedRaw} The mutated input context.\n */\n idifyReverseTerms(context) {\n for (const key of Object.keys(context)) {\n let value = context[key];\n if (value && typeof value === 'object') {\n if (value['@reverse'] && !value['@id']) {\n if (typeof value['@reverse'] !== 'string' || Util_1.Util.isValidKeyword(value['@reverse'])) {\n throw new ErrorCoded_1.ErrorCoded(`Invalid @reverse value, must be absolute IRI or blank node: '${value['@reverse']}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n value = context[key] = Object.assign(Object.assign({}, value), { '@id': value['@reverse'] });\n value['@id'] = value['@reverse'];\n if (Util_1.Util.isPotentialKeyword(value['@reverse'])) {\n delete value['@reverse'];\n }\n else {\n value['@reverse'] = true;\n }\n }\n }\n }\n return context;\n }\n /**\n * Expand all prefixed terms in the given context.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @param {boolean} expandContentTypeToBase If @type inside the context may be expanded\n * via @base if @vocab is set to null.\n * @param {string[]} keys Optional set of keys from the context to expand. If left undefined, all\n * keys in the context will be expanded.\n */\n expandPrefixedTerms(context, expandContentTypeToBase, keys) {\n const contextRaw = context.getContextRaw();\n for (const key of (keys || Object.keys(contextRaw))) {\n // Only expand allowed keys\n if (Util_1.Util.EXPAND_KEYS_BLACKLIST.indexOf(key) < 0 && !Util_1.Util.isReservedInternalKeyword(key)) {\n // Error if we try to alias a keyword to something else.\n const keyValue = contextRaw[key];\n if (Util_1.Util.isPotentialKeyword(key) && Util_1.Util.ALIAS_DOMAIN_BLACKLIST.indexOf(key) >= 0) {\n if (key !== '@type' || typeof contextRaw[key] === 'object'\n && !(contextRaw[key]['@protected'] || contextRaw[key]['@container'] === '@set')) {\n throw new ErrorCoded_1.ErrorCoded(`Keywords can not be aliased to something else.\nTried mapping ${key} to ${JSON.stringify(keyValue)}`, ErrorCoded_1.ERROR_CODES.KEYWORD_REDEFINITION);\n }\n }\n // Error if we try to alias to an illegal keyword\n if (Util_1.Util.ALIAS_RANGE_BLACKLIST.indexOf(Util_1.Util.getContextValueId(keyValue)) >= 0) {\n throw new ErrorCoded_1.ErrorCoded(`Aliasing to certain keywords is not allowed.\nTried mapping ${key} to ${JSON.stringify(keyValue)}`, ErrorCoded_1.ERROR_CODES.INVALID_KEYWORD_ALIAS);\n }\n // Error if this term was marked as prefix as well\n if (keyValue && Util_1.Util.isPotentialKeyword(Util_1.Util.getContextValueId(keyValue))\n && keyValue['@prefix'] === true) {\n throw new ErrorCoded_1.ErrorCoded(`Tried to use keyword aliases as prefix: '${key}': '${JSON.stringify(keyValue)}'`, ErrorCoded_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n // Loop because prefixes might be nested\n while (Util_1.Util.isPrefixValue(contextRaw[key])) {\n const value = contextRaw[key];\n let changed = false;\n if (typeof value === 'string') {\n contextRaw[key] = context.expandTerm(value, true);\n changed = changed || value !== contextRaw[key];\n }\n else {\n const id = value['@id'];\n const type = value['@type'];\n // If @id is missing, don't allow @id to be added if @prefix: true and key not being a valid IRI.\n const canAddIdEntry = !('@prefix' in value) || Util_1.Util.isValidIri(key);\n if ('@id' in value) {\n // Use @id value for expansion\n if (id !== undefined && id !== null && typeof id === 'string') {\n contextRaw[key] = Object.assign(Object.assign({}, contextRaw[key]), { '@id': context.expandTerm(id, true) });\n changed = changed || id !== contextRaw[key]['@id'];\n }\n }\n else if (!Util_1.Util.isPotentialKeyword(key) && canAddIdEntry) {\n // Add an explicit @id value based on the expanded key value\n const newId = context.expandTerm(key, true);\n if (newId !== key) {\n // Don't set @id if expansion failed\n contextRaw[key] = Object.assign(Object.assign({}, contextRaw[key]), { '@id': newId });\n changed = true;\n }\n }\n if (type && typeof type === 'string' && type !== '@vocab'\n && (!value['@container'] || !value['@container']['@type'])\n && canAddIdEntry) {\n // First check @vocab, then fallback to @base\n let expandedType = context.expandTerm(type, true);\n if (expandContentTypeToBase && type === expandedType) {\n expandedType = context.expandTerm(type, false);\n }\n if (expandedType !== type) {\n changed = true;\n contextRaw[key] = Object.assign(Object.assign({}, contextRaw[key]), { '@type': expandedType });\n }\n }\n }\n if (!changed) {\n break;\n }\n }\n }\n }\n }\n /**\n * Normalize the @language entries in the given context to lowercase.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @param {IParseOptions} parseOptions The parsing options.\n */\n normalize(context, { processingMode, normalizeLanguageTags }) {\n // Lowercase language keys in 1.0\n if (normalizeLanguageTags || processingMode === 1.0) {\n for (const key of Object.keys(context)) {\n if (key === '@language' && typeof context[key] === 'string') {\n context[key] = context[key].toLowerCase();\n }\n else {\n const value = context[key];\n if (value && typeof value === 'object') {\n if (typeof value['@language'] === 'string') {\n const lowercase = value['@language'].toLowerCase();\n if (lowercase !== value['@language']) {\n context[key] = Object.assign(Object.assign({}, value), { '@language': lowercase });\n }\n }\n }\n }\n }\n }\n }\n /**\n * Convert all @container strings and array values to hash-based values.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n */\n containersToHash(context) {\n for (const key of Object.keys(context)) {\n const value = context[key];\n if (value && typeof value === 'object') {\n if (typeof value['@container'] === 'string') {\n context[key] = Object.assign(Object.assign({}, value), { '@container': { [value['@container']]: true } });\n }\n else if (Array.isArray(value['@container'])) {\n const newValue = {};\n for (const containerValue of value['@container']) {\n newValue[containerValue] = true;\n }\n context[key] = Object.assign(Object.assign({}, value), { '@container': newValue });\n }\n }\n }\n }\n /**\n * Normalize and apply context-level @protected terms onto each term separately.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @param {number} processingMode The processing mode.\n */\n applyScopedProtected(context, { processingMode }, expandOptions) {\n if (processingMode && processingMode >= 1.1) {\n if (context['@protected']) {\n for (const key of Object.keys(context)) {\n if (Util_1.Util.isReservedInternalKeyword(key)) {\n continue;\n }\n if (!Util_1.Util.isPotentialKeyword(key) && !Util_1.Util.isTermProtected(context, key)) {\n const value = context[key];\n if (value && typeof value === 'object') {\n if (!('@protected' in context[key])) {\n // Mark terms with object values as protected if they don't have an @protected: false annotation\n context[key] = Object.assign(Object.assign({}, context[key]), { '@protected': true });\n }\n }\n else {\n // Convert string-based term values to object-based values with @protected: true\n context[key] = {\n '@id': value,\n '@protected': true,\n };\n if (Util_1.Util.isSimpleTermDefinitionPrefix(value, expandOptions)) {\n context[key] = Object.assign(Object.assign({}, context[key]), { '@prefix': true });\n }\n }\n }\n }\n delete context['@protected'];\n }\n }\n }\n /**\n * Check if the given context inheritance does not contain any overrides of protected terms.\n * @param {IJsonLdContextNormalizedRaw} contextBefore The context that may contain some protected terms.\n * @param {IJsonLdContextNormalizedRaw} contextAfter A new context that is being applied on the first one.\n * @param {IExpandOptions} expandOptions Options that are needed for any expansions during this validation.\n * @param {string[]} keys Optional set of keys from the context to validate. If left undefined, all\n * keys defined in contextAfter will be checked.\n */\n validateKeywordRedefinitions(contextBefore, contextAfter, expandOptions, keys) {\n for (const key of (keys !== null && keys !== void 0 ? keys : Object.keys(contextAfter))) {\n if (Util_1.Util.isTermProtected(contextBefore, key)) {\n // The entry in the context before will always be in object-mode\n // If the new entry is in string-mode, convert it to object-mode\n // before checking if it is identical.\n if (typeof contextAfter[key] === 'string') {\n contextAfter[key] = { '@id': contextAfter[key], '@protected': true };\n }\n else {\n // We modify this deliberately,\n // as we need it for the value comparison (they must be identical modulo '@protected')),\n // and for the fact that this new value will override the first one.\n contextAfter[key] = Object.assign(Object.assign({}, contextAfter[key]), { '@protected': true });\n }\n // Error if they are not identical\n if (!Util_1.Util.deepEqual(contextBefore[key], contextAfter[key])) {\n throw new ErrorCoded_1.ErrorCoded(`Attempted to override the protected keyword ${key} from ${JSON.stringify(Util_1.Util.getContextValueId(contextBefore[key]))} to ${JSON.stringify(Util_1.Util.getContextValueId(contextAfter[key]))}`, ErrorCoded_1.ERROR_CODES.PROTECTED_TERM_REDEFINITION);\n }\n }\n }\n }\n /**\n * Validate the entries of the given context.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @param {IParseOptions} options The parse options.\n */\n validate(context, { processingMode }) {\n for (const key of Object.keys(context)) {\n // Ignore reserved internal keywords.\n if (Util_1.Util.isReservedInternalKeyword(key)) {\n continue;\n }\n // Do not allow empty term\n if (key === '') {\n throw new ErrorCoded_1.ErrorCoded(`The empty term is not allowed, got: '${key}': '${JSON.stringify(context[key])}'`, ErrorCoded_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n const value = context[key];\n const valueType = typeof value;\n // First check if the key is a keyword\n if (Util_1.Util.isPotentialKeyword(key)) {\n switch (key.substr(1)) {\n case 'vocab':\n if (value !== null && valueType !== 'string') {\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid @vocab IRI: ${value}`, ErrorCoded_1.ERROR_CODES.INVALID_VOCAB_MAPPING);\n }\n break;\n case 'base':\n if (value !== null && valueType !== 'string') {\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid @base IRI: ${context[key]}`, ErrorCoded_1.ERROR_CODES.INVALID_BASE_IRI);\n }\n break;\n case 'language':\n if (value !== null) {\n ContextParser.validateLanguage(value, true, ErrorCoded_1.ERROR_CODES.INVALID_DEFAULT_LANGUAGE);\n }\n break;\n case 'version':\n if (value !== null && valueType !== 'number') {\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid @version number: ${value}`, ErrorCoded_1.ERROR_CODES.INVALID_VERSION_VALUE);\n }\n break;\n case 'direction':\n if (value !== null) {\n ContextParser.validateDirection(value, true);\n }\n break;\n case 'propagate':\n if (processingMode === 1.0) {\n throw new ErrorCoded_1.ErrorCoded(`Found an illegal @propagate keyword: ${value}`, ErrorCoded_1.ERROR_CODES.INVALID_CONTEXT_ENTRY);\n }\n if (value !== null && valueType !== 'boolean') {\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid @propagate value: ${value}`, ErrorCoded_1.ERROR_CODES.INVALID_PROPAGATE_VALUE);\n }\n break;\n }\n // Don't allow keywords to be overridden\n if (Util_1.Util.isValidKeyword(key) && Util_1.Util.isValidKeyword(Util_1.Util.getContextValueId(value))) {\n throw new ErrorCoded_1.ErrorCoded(`Illegal keyword alias in term value, found: '${key}': '${Util_1.Util\n .getContextValueId(value)}'`, ErrorCoded_1.ERROR_CODES.KEYWORD_REDEFINITION);\n }\n continue;\n }\n // Otherwise, consider the key a term\n if (value !== null) {\n switch (valueType) {\n case 'string':\n if (Util_1.Util.getPrefix(value, context) === key) {\n throw new ErrorCoded_1.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${key}': '${JSON\n .stringify(value)}'`, ErrorCoded_1.ERROR_CODES.CYCLIC_IRI_MAPPING);\n }\n if (Util_1.Util.isValidIriWeak(key)) {\n if (value === '@type') {\n throw new ErrorCoded_1.ErrorCoded(`IRIs can not be mapped to @type, found: '${key}': '${value}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n else if (Util_1.Util.isValidIri(value) && value !== new JsonLdContextNormalized_1.JsonLdContextNormalized(context).expandTerm(key)) {\n throw new ErrorCoded_1.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${key}': '${value}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n }\n break;\n case 'object':\n if (!Util_1.Util.isCompactIri(key) && !('@id' in value)\n && (value['@type'] === '@id' ? !context['@base'] : !context['@vocab'])) {\n throw new ErrorCoded_1.ErrorCoded(`Missing @id in context entry: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n for (const objectKey of Object.keys(value)) {\n const objectValue = value[objectKey];\n if (!objectValue) {\n continue;\n }\n switch (objectKey) {\n case '@id':\n if (Util_1.Util.isValidKeyword(objectValue)\n && objectValue !== '@type' && objectValue !== '@id' && objectValue !== '@graph' && objectValue !== '@nest') {\n throw new ErrorCoded_1.ErrorCoded(`Illegal keyword alias in term value, found: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n if (Util_1.Util.isValidIriWeak(key)) {\n if (objectValue === '@type') {\n throw new ErrorCoded_1.ErrorCoded(`IRIs can not be mapped to @type, found: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n else if (Util_1.Util.isValidIri(objectValue)\n && objectValue !== new JsonLdContextNormalized_1.JsonLdContextNormalized(context).expandTerm(key)) {\n throw new ErrorCoded_1.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n }\n if (typeof objectValue !== 'string') {\n throw new ErrorCoded_1.ErrorCoded(`Detected non-string @id in context entry: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n if (Util_1.Util.getPrefix(objectValue, context) === key) {\n throw new ErrorCoded_1.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${key}': '${JSON\n .stringify(value)}'`, ErrorCoded_1.ERROR_CODES.CYCLIC_IRI_MAPPING);\n }\n break;\n case '@type':\n if (value['@container'] === '@type' && objectValue !== '@id' && objectValue !== '@vocab') {\n throw new ErrorCoded_1.ErrorCoded(`@container: @type only allows @type: @id or @vocab, but got: '${key}': '${objectValue}'`, ErrorCoded_1.ERROR_CODES.INVALID_TYPE_MAPPING);\n }\n if (typeof objectValue !== 'string') {\n throw new ErrorCoded_1.ErrorCoded(`The value of an '@type' must be a string, got '${JSON.stringify(valueType)}'`, ErrorCoded_1.ERROR_CODES.INVALID_TYPE_MAPPING);\n }\n if (objectValue !== '@id' && objectValue !== '@vocab'\n && (processingMode === 1.0 || objectValue !== '@json')\n && (processingMode === 1.0 || objectValue !== '@none')\n && (objectValue[0] === '_' || !Util_1.Util.isValidIri(objectValue))) {\n throw new ErrorCoded_1.ErrorCoded(`A context @type must be an absolute IRI, found: '${key}': '${objectValue}'`, ErrorCoded_1.ERROR_CODES.INVALID_TYPE_MAPPING);\n }\n break;\n case '@reverse':\n if (typeof objectValue === 'string' && value['@id'] && value['@id'] !== objectValue) {\n throw new ErrorCoded_1.ErrorCoded(`Found non-matching @id and @reverse term values in '${key}':\\\n'${objectValue}' and '${value['@id']}'`, ErrorCoded_1.ERROR_CODES.INVALID_REVERSE_PROPERTY);\n }\n if ('@nest' in value) {\n throw new ErrorCoded_1.ErrorCoded(`@nest is not allowed in the reverse property '${key}'`, ErrorCoded_1.ERROR_CODES.INVALID_REVERSE_PROPERTY);\n }\n break;\n case '@container':\n if (processingMode === 1.0) {\n if (Object.keys(objectValue).length > 1\n || Util_1.Util.CONTAINERS_1_0.indexOf(Object.keys(objectValue)[0]) < 0) {\n throw new ErrorCoded_1.ErrorCoded(`Invalid term @container for '${key}' ('${Object.keys(objectValue)}') in 1.0, \\\nmust be only one of ${Util_1.Util.CONTAINERS_1_0.join(', ')}`, ErrorCoded_1.ERROR_CODES.INVALID_CONTAINER_MAPPING);\n }\n }\n for (const containerValue of Object.keys(objectValue)) {\n if (containerValue === '@list' && value['@reverse']) {\n throw new ErrorCoded_1.ErrorCoded(`Term value can not be @container: @list and @reverse at the same time on '${key}'`, ErrorCoded_1.ERROR_CODES.INVALID_REVERSE_PROPERTY);\n }\n if (Util_1.Util.CONTAINERS.indexOf(containerValue) < 0) {\n throw new ErrorCoded_1.ErrorCoded(`Invalid term @container for '${key}' ('${containerValue}'), \\\nmust be one of ${Util_1.Util.CONTAINERS.join(', ')}`, ErrorCoded_1.ERROR_CODES.INVALID_CONTAINER_MAPPING);\n }\n }\n break;\n case '@language':\n ContextParser.validateLanguage(objectValue, true, ErrorCoded_1.ERROR_CODES.INVALID_LANGUAGE_MAPPING);\n break;\n case '@direction':\n ContextParser.validateDirection(objectValue, true);\n break;\n case '@prefix':\n if (objectValue !== null && typeof objectValue !== 'boolean') {\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid term @prefix boolean in: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_PREFIX_VALUE);\n }\n if (!('@id' in value) && !Util_1.Util.isValidIri(key)) {\n throw new ErrorCoded_1.ErrorCoded(`Invalid @prefix definition for '${key}' ('${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n break;\n case '@index':\n if (processingMode === 1.0 || !value['@container'] || !value['@container']['@index']) {\n throw new ErrorCoded_1.ErrorCoded(`Attempt to add illegal key to value object: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n break;\n case '@nest':\n if (Util_1.Util.isPotentialKeyword(objectValue) && objectValue !== '@nest') {\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid term @nest value in: '${key}': '${JSON.stringify(value)}'`, ErrorCoded_1.ERROR_CODES.INVALID_NEST_VALUE);\n }\n }\n }\n break;\n default:\n throw new ErrorCoded_1.ErrorCoded(`Found an invalid term value: '${key}': '${value}'`, ErrorCoded_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n }\n }\n }\n /**\n * Apply the @base context entry to the given context under certain circumstances.\n * @param context A context.\n * @param options Parsing options.\n * @param inheritFromParent If the @base value from the parent context can be inherited.\n * @return The given context.\n */\n applyBaseEntry(context, options, inheritFromParent) {\n // In some special cases, this can be a string, so ignore those.\n if (typeof context === 'string') {\n return context;\n }\n // Give priority to @base in the parent context\n if (inheritFromParent && !('@base' in context) && options.parentContext\n && typeof options.parentContext === 'object' && '@base' in options.parentContext) {\n context['@base'] = options.parentContext['@base'];\n if (options.parentContext['@__baseDocument']) {\n context['@__baseDocument'] = true;\n }\n }\n // Override the base IRI if provided.\n if (options.baseIRI && !options.external) {\n if (!('@base' in context)) {\n // The context base is the document base\n context['@base'] = options.baseIRI;\n context['@__baseDocument'] = true;\n }\n else if (context['@base'] !== null && typeof context['@base'] === 'string'\n && !Util_1.Util.isValidIri(context['@base'])) {\n // The context base is relative to the document base\n context['@base'] = (0, relative_to_absolute_iri_1.resolve)(context['@base'], options.parentContext && options.parentContext['@base'] || options.baseIRI);\n }\n }\n return context;\n }\n /**\n * Resolve relative context IRIs, or return full IRIs as-is.\n * @param {string} contextIri A context IRI.\n * @param {string} baseIRI A base IRI.\n * @return {string} The normalized context IRI.\n */\n normalizeContextIri(contextIri, baseIRI) {\n if (!Util_1.Util.isValidIri(contextIri)) {\n try {\n contextIri = (0, relative_to_absolute_iri_1.resolve)(contextIri, baseIRI);\n }\n catch (_a) {\n throw new Error(`Invalid context IRI: ${contextIri}`);\n }\n }\n // TODO: Temporary workaround for fixing schema.org CORS issues (https://github.com/schemaorg/schemaorg/issues/2578#issuecomment-652324465)\n if (this.redirectSchemaOrgHttps && contextIri.startsWith('http://schema.org')) {\n contextIri = 'https://schema.org/';\n }\n return contextIri;\n }\n /**\n * Parse scoped contexts in the given context.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @param {IParseOptions} options Parsing options.\n * @return {IJsonLdContextNormalizedRaw} The mutated input context.\n * @param {string[]} keys Optional set of keys from the context to parseInnerContexts of. If left undefined, all\n * keys in the context will be iterated over.\n */\n async parseInnerContexts(context, options, keys) {\n for (const key of (keys !== null && keys !== void 0 ? keys : Object.keys(context))) {\n const value = context[key];\n if (value && typeof value === 'object') {\n if ('@context' in value && value['@context'] !== null && !options.ignoreScopedContexts) {\n // Simulate a processing based on the parent context to check if there are any (potential errors).\n // Honestly, I find it a bit weird to do this here, as the context may be unused,\n // and the final effective context may differ based on any other embedded/scoped contexts.\n // But hey, it's part of the spec, so we have no choice...\n // https://w3c.github.io/json-ld-api/#h-note-10\n if (this.validateContext) {\n try {\n const parentContext = Object.assign(Object.assign({}, context), { [key]: Object.assign({}, context[key]) });\n delete parentContext[key]['@context'];\n await this.parse(value['@context'], Object.assign(Object.assign({}, options), { external: false, parentContext, ignoreProtection: true, ignoreRemoteScopedContexts: true, ignoreScopedContexts: true }));\n }\n catch (e) {\n throw new ErrorCoded_1.ErrorCoded(e.message, ErrorCoded_1.ERROR_CODES.INVALID_SCOPED_CONTEXT);\n }\n }\n context[key] = Object.assign(Object.assign({}, value), { '@context': (await this.parse(value['@context'], Object.assign(Object.assign({}, options), { external: false, minimalProcessing: true, ignoreRemoteScopedContexts: true, parentContext: context })))\n .getContextRaw() });\n }\n }\n }\n return context;\n }\n async parse(context, options = {}, \n // These options are only for internal use on recursive calls and should not be used by\n // libraries consuming this function\n internalOptions = {}) {\n const { baseIRI, parentContext, external, processingMode = ContextParser.DEFAULT_PROCESSING_MODE, normalizeLanguageTags, ignoreProtection, minimalProcessing, } = options;\n const remoteContexts = options.remoteContexts || {};\n // Avoid remote context overflows\n if (Object.keys(remoteContexts).length >= this.remoteContextsDepthLimit) {\n throw new ErrorCoded_1.ErrorCoded('Detected an overflow in remote context inclusions: ' + Object.keys(remoteContexts), ErrorCoded_1.ERROR_CODES.CONTEXT_OVERFLOW);\n }\n if (context === null || context === undefined) {\n // Don't allow context nullification and there are protected terms\n if (!ignoreProtection && parentContext && Util_1.Util.hasProtectedTerms(parentContext)) {\n throw new ErrorCoded_1.ErrorCoded('Illegal context nullification when terms are protected', ErrorCoded_1.ERROR_CODES.INVALID_CONTEXT_NULLIFICATION);\n }\n // Context that are explicitly set to null are empty.\n return new JsonLdContextNormalized_1.JsonLdContextNormalized(this.applyBaseEntry({}, options, false));\n }\n else if (typeof context === 'string') {\n const contextIri = this.normalizeContextIri(context, baseIRI);\n const overriddenLoad = this.getOverriddenLoad(contextIri, options);\n if (overriddenLoad) {\n return new JsonLdContextNormalized_1.JsonLdContextNormalized(overriddenLoad);\n }\n const parsedStringContext = await this.parse(await this.load(contextIri), Object.assign(Object.assign({}, options), { baseIRI: contextIri, external: true, remoteContexts: Object.assign(Object.assign({}, remoteContexts), { [contextIri]: true }) }));\n this.applyBaseEntry(parsedStringContext.getContextRaw(), options, true);\n return parsedStringContext;\n }\n else if (Array.isArray(context)) {\n // As a performance consideration, first load all external contexts in parallel.\n const contextIris = [];\n const contexts = await Promise.all(context.map((subContext, i) => {\n if (typeof subContext === 'string') {\n const contextIri = this.normalizeContextIri(subContext, baseIRI);\n contextIris[i] = contextIri;\n const overriddenLoad = this.getOverriddenLoad(contextIri, options);\n if (overriddenLoad) {\n return overriddenLoad;\n }\n return this.load(contextIri);\n }\n else {\n return subContext;\n }\n }));\n // Don't apply inheritance logic on minimal processing\n if (minimalProcessing) {\n return new JsonLdContextNormalized_1.JsonLdContextNormalized(contexts);\n }\n const reducedContexts = await contexts.reduce((accContextPromise, contextEntry, i) => accContextPromise\n .then((accContext) => this.parse(contextEntry, Object.assign(Object.assign({}, options), { baseIRI: contextIris[i] || options.baseIRI, external: !!contextIris[i] || options.external, parentContext: accContext.getContextRaw(), remoteContexts: contextIris[i] ? Object.assign(Object.assign({}, remoteContexts), { [contextIris[i]]: true }) : remoteContexts }), \n // @ts-expect-error: This third argument causes a type error because we have hidden it from consumers\n {\n skipValidation: i < contexts.length - 1,\n })), Promise.resolve(new JsonLdContextNormalized_1.JsonLdContextNormalized(parentContext || {})));\n // Override the base IRI if provided.\n this.applyBaseEntry(reducedContexts.getContextRaw(), options, true);\n return reducedContexts;\n }\n else if (typeof context === 'object') {\n if ('@context' in context) {\n return await this.parse(context['@context'], options);\n }\n // Make a deep clone of the given context, to avoid modifying it.\n context = Object.assign({}, context);\n // According to the JSON-LD spec, @base must be ignored from external contexts.\n if (external) {\n delete context['@base'];\n }\n // Override the base IRI if provided.\n this.applyBaseEntry(context, options, true);\n // Hashify container entries\n // Do this before protected term validation as that influences term format\n this.containersToHash(context);\n // Don't perform any other modifications if only minimal processing is needed.\n if (minimalProcessing) {\n return new JsonLdContextNormalized_1.JsonLdContextNormalized(context);\n }\n // In JSON-LD 1.1, load @import'ed context prior to processing.\n let importContext = {};\n if ('@import' in context) {\n if (processingMode >= 1.1) {\n // Only accept string values\n if (typeof context['@import'] !== 'string') {\n throw new ErrorCoded_1.ErrorCoded('An @import value must be a string, but got ' + typeof context['@import'], ErrorCoded_1.ERROR_CODES.INVALID_IMPORT_VALUE);\n }\n // Load context\n importContext = await this.loadImportContext(this.normalizeContextIri(context['@import'], baseIRI));\n delete context['@import'];\n }\n else {\n throw new ErrorCoded_1.ErrorCoded('Context importing is not supported in JSON-LD 1.0', ErrorCoded_1.ERROR_CODES.INVALID_CONTEXT_ENTRY);\n }\n }\n this.applyScopedProtected(importContext, { processingMode }, JsonLdContextNormalized_1.defaultExpandOptions);\n const newContext = Object.assign(importContext, context);\n // Handle terms (before protection checks)\n this.idifyReverseTerms(newContext);\n this.normalize(newContext, { processingMode, normalizeLanguageTags });\n this.applyScopedProtected(newContext, { processingMode }, JsonLdContextNormalized_1.defaultExpandOptions);\n const keys = Object.keys(newContext);\n const overlappingKeys = [];\n if (typeof parentContext === 'object') {\n // Merge different parts of the final context in order\n for (const key in parentContext) {\n if (key in newContext) {\n overlappingKeys.push(key);\n }\n else {\n newContext[key] = parentContext[key];\n }\n }\n }\n // Parse inner contexts with minimal processing\n await this.parseInnerContexts(newContext, options, keys);\n const newContextWrapped = new JsonLdContextNormalized_1.JsonLdContextNormalized(newContext);\n // In JSON-LD 1.1, @vocab can be relative to @vocab in the parent context, or a compact IRI.\n if ((newContext && newContext['@version'] || ContextParser.DEFAULT_PROCESSING_MODE) >= 1.1\n && ((context['@vocab'] && typeof context['@vocab'] === 'string') || context['@vocab'] === '')) {\n if (parentContext && '@vocab' in parentContext && context['@vocab'].indexOf(':') < 0) {\n newContext['@vocab'] = parentContext['@vocab'] + context['@vocab'];\n }\n else if (Util_1.Util.isCompactIri(context['@vocab']) || context['@vocab'] in newContext) {\n // @vocab is a compact IRI or refers exactly to a prefix\n newContext['@vocab'] = newContextWrapped.expandTerm(context['@vocab'], true);\n }\n }\n this.expandPrefixedTerms(newContextWrapped, this.expandContentTypeToBase, keys);\n // In JSON-LD 1.1, check if we are not redefining any protected keywords\n if (!ignoreProtection && parentContext && processingMode >= 1.1) {\n this.validateKeywordRedefinitions(parentContext, newContext, JsonLdContextNormalized_1.defaultExpandOptions, overlappingKeys);\n }\n if (this.validateContext && !internalOptions.skipValidation) {\n this.validate(newContext, { processingMode });\n }\n return newContextWrapped;\n }\n else {\n throw new ErrorCoded_1.ErrorCoded(`Tried parsing a context that is not a string, array or object, but got ${context}`, ErrorCoded_1.ERROR_CODES.INVALID_LOCAL_CONTEXT);\n }\n }\n /**\n * Fetch the given URL as a raw JSON-LD context.\n * @param url An URL.\n * @return A promise resolving to a raw JSON-LD context.\n */\n async load(url) {\n // First try to retrieve the context from cache\n const cached = this.documentCache[url];\n if (cached) {\n return cached;\n }\n // If not in cache, load it\n let document;\n try {\n document = await this.documentLoader.load(url);\n }\n catch (e) {\n throw new ErrorCoded_1.ErrorCoded(`Failed to load remote context ${url}: ${e.message}`, ErrorCoded_1.ERROR_CODES.LOADING_REMOTE_CONTEXT_FAILED);\n }\n // Validate the context\n if (!('@context' in document)) {\n throw new ErrorCoded_1.ErrorCoded(`Missing @context in remote context at ${url}`, ErrorCoded_1.ERROR_CODES.INVALID_REMOTE_CONTEXT);\n }\n return this.documentCache[url] = document['@context'];\n }\n /**\n * Override the given context that may be loaded.\n *\n * This will check whether or not the url is recursively being loaded.\n * @param url An URL.\n * @param options Parsing options.\n * @return An overridden context, or null.\n * Optionally an error can be thrown if a cyclic context is detected.\n */\n getOverriddenLoad(url, options) {\n if (url in (options.remoteContexts || {})) {\n if (options.ignoreRemoteScopedContexts) {\n return url;\n }\n else {\n throw new ErrorCoded_1.ErrorCoded('Detected a cyclic context inclusion of ' + url, ErrorCoded_1.ERROR_CODES.RECURSIVE_CONTEXT_INCLUSION);\n }\n }\n return null;\n }\n /**\n * Load an @import'ed context.\n * @param importContextIri The full URI of an @import value.\n */\n async loadImportContext(importContextIri) {\n // Load the context - and do a deep clone since we are about to mutate it\n let importContext = await this.load(importContextIri);\n // Require the context to be a non-array object\n if (typeof importContext !== 'object' || Array.isArray(importContext)) {\n throw new ErrorCoded_1.ErrorCoded('An imported context must be a single object: ' + importContextIri, ErrorCoded_1.ERROR_CODES.INVALID_REMOTE_CONTEXT);\n }\n // Error if the context contains another @import\n if ('@import' in importContext) {\n throw new ErrorCoded_1.ErrorCoded('An imported context can not import another context: ' + importContextIri, ErrorCoded_1.ERROR_CODES.INVALID_CONTEXT_ENTRY);\n }\n importContext = Object.assign({}, importContext);\n // Containers have to be converted into hash values the same way as for the importing context\n // Otherwise context validation will fail for container values\n this.containersToHash(importContext);\n return importContext;\n }\n}\nContextParser.DEFAULT_PROCESSING_MODE = 1.1;\nexports.ContextParser = ContextParser;\n//# sourceMappingURL=ContextParser.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ERROR_CODES = exports.ErrorCoded = void 0;\n/**\n * An error that has a certain error code.\n *\n * The error code can be any string.\n * All standardized error codes are listed in {@link ERROR_CODES}.\n */\nclass ErrorCoded extends Error {\n /* istanbul ignore next */\n constructor(message, code) {\n super(message);\n this.code = code;\n }\n}\nexports.ErrorCoded = ErrorCoded;\n/**\n * All standardized JSON-LD error codes.\n * @see https://w3c.github.io/json-ld-api/#dom-jsonlderrorcode\n */\n// tslint:disable:object-literal-sort-keys\nvar ERROR_CODES;\n(function (ERROR_CODES) {\n ERROR_CODES[\"COLLIDING_KEYWORDS\"] = \"colliding keywords\";\n ERROR_CODES[\"CONFLICTING_INDEXES\"] = \"conflicting indexes\";\n ERROR_CODES[\"CYCLIC_IRI_MAPPING\"] = \"cyclic IRI mapping\";\n ERROR_CODES[\"INVALID_ID_VALUE\"] = \"invalid @id value\";\n ERROR_CODES[\"INVALID_INDEX_VALUE\"] = \"invalid @index value\";\n ERROR_CODES[\"INVALID_NEST_VALUE\"] = \"invalid @nest value\";\n ERROR_CODES[\"INVALID_PREFIX_VALUE\"] = \"invalid @prefix value\";\n ERROR_CODES[\"INVALID_PROPAGATE_VALUE\"] = \"invalid @propagate value\";\n ERROR_CODES[\"INVALID_REVERSE_VALUE\"] = \"invalid @reverse value\";\n ERROR_CODES[\"INVALID_IMPORT_VALUE\"] = \"invalid @import value\";\n ERROR_CODES[\"INVALID_VERSION_VALUE\"] = \"invalid @version value\";\n ERROR_CODES[\"INVALID_BASE_IRI\"] = \"invalid base IRI\";\n ERROR_CODES[\"INVALID_CONTAINER_MAPPING\"] = \"invalid container mapping\";\n ERROR_CODES[\"INVALID_CONTEXT_ENTRY\"] = \"invalid context entry\";\n ERROR_CODES[\"INVALID_CONTEXT_NULLIFICATION\"] = \"invalid context nullification\";\n ERROR_CODES[\"INVALID_DEFAULT_LANGUAGE\"] = \"invalid default language\";\n ERROR_CODES[\"INVALID_INCLUDED_VALUE\"] = \"invalid @included value\";\n ERROR_CODES[\"INVALID_IRI_MAPPING\"] = \"invalid IRI mapping\";\n ERROR_CODES[\"INVALID_JSON_LITERAL\"] = \"invalid JSON literal\";\n ERROR_CODES[\"INVALID_KEYWORD_ALIAS\"] = \"invalid keyword alias\";\n ERROR_CODES[\"INVALID_LANGUAGE_MAP_VALUE\"] = \"invalid language map value\";\n ERROR_CODES[\"INVALID_LANGUAGE_MAPPING\"] = \"invalid language mapping\";\n ERROR_CODES[\"INVALID_LANGUAGE_TAGGED_STRING\"] = \"invalid language-tagged string\";\n ERROR_CODES[\"INVALID_LANGUAGE_TAGGED_VALUE\"] = \"invalid language-tagged value\";\n ERROR_CODES[\"INVALID_LOCAL_CONTEXT\"] = \"invalid local context\";\n ERROR_CODES[\"INVALID_REMOTE_CONTEXT\"] = \"invalid remote context\";\n ERROR_CODES[\"INVALID_REVERSE_PROPERTY\"] = \"invalid reverse property\";\n ERROR_CODES[\"INVALID_REVERSE_PROPERTY_MAP\"] = \"invalid reverse property map\";\n ERROR_CODES[\"INVALID_REVERSE_PROPERTY_VALUE\"] = \"invalid reverse property value\";\n ERROR_CODES[\"INVALID_SCOPED_CONTEXT\"] = \"invalid scoped context\";\n ERROR_CODES[\"INVALID_SCRIPT_ELEMENT\"] = \"invalid script element\";\n ERROR_CODES[\"INVALID_SET_OR_LIST_OBJECT\"] = \"invalid set or list object\";\n ERROR_CODES[\"INVALID_TERM_DEFINITION\"] = \"invalid term definition\";\n ERROR_CODES[\"INVALID_TYPE_MAPPING\"] = \"invalid type mapping\";\n ERROR_CODES[\"INVALID_TYPE_VALUE\"] = \"invalid type value\";\n ERROR_CODES[\"INVALID_TYPED_VALUE\"] = \"invalid typed value\";\n ERROR_CODES[\"INVALID_VALUE_OBJECT\"] = \"invalid value object\";\n ERROR_CODES[\"INVALID_VALUE_OBJECT_VALUE\"] = \"invalid value object value\";\n ERROR_CODES[\"INVALID_VOCAB_MAPPING\"] = \"invalid vocab mapping\";\n ERROR_CODES[\"IRI_CONFUSED_WITH_PREFIX\"] = \"IRI confused with prefix\";\n ERROR_CODES[\"KEYWORD_REDEFINITION\"] = \"keyword redefinition\";\n ERROR_CODES[\"LOADING_DOCUMENT_FAILED\"] = \"loading document failed\";\n ERROR_CODES[\"LOADING_REMOTE_CONTEXT_FAILED\"] = \"loading remote context failed\";\n ERROR_CODES[\"MULTIPLE_CONTEXT_LINK_HEADERS\"] = \"multiple context link headers\";\n ERROR_CODES[\"PROCESSING_MODE_CONFLICT\"] = \"processing mode conflict\";\n ERROR_CODES[\"PROTECTED_TERM_REDEFINITION\"] = \"protected term redefinition\";\n ERROR_CODES[\"CONTEXT_OVERFLOW\"] = \"context overflow\";\n ERROR_CODES[\"INVALID_BASE_DIRECTION\"] = \"invalid base direction\";\n ERROR_CODES[\"RECURSIVE_CONTEXT_INCLUSION\"] = \"recursive context inclusion\";\n ERROR_CODES[\"INVALID_STREAMING_KEY_ORDER\"] = \"invalid streaming key order\";\n /**\n * JSON-LD-star\n */\n ERROR_CODES[\"INVALID_EMBEDDED_NODE\"] = \"invalid embedded node\";\n ERROR_CODES[\"INVALID_ANNOTATION\"] = \"invalid annotation\";\n})(ERROR_CODES = exports.ERROR_CODES || (exports.ERROR_CODES = {}));\n//# sourceMappingURL=ErrorCoded.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.FetchDocumentLoader = void 0;\nrequire(\"cross-fetch/polyfill\");\nconst ErrorCoded_1 = require(\"./ErrorCoded\");\nconst http_link_header_1 = require(\"http-link-header\");\nconst relative_to_absolute_iri_1 = require(\"relative-to-absolute-iri\");\n/**\n * Loads documents via the fetch API.\n */\nclass FetchDocumentLoader {\n constructor(fetcher) {\n this.fetcher = fetcher;\n }\n async load(url) {\n const response = await (this.fetcher || fetch)(url, { headers: new Headers({ accept: 'application/ld+json' }) });\n if (response.ok && response.headers) {\n let mediaType = response.headers.get('Content-Type');\n if (mediaType) {\n const colonPos = mediaType.indexOf(';');\n if (colonPos > 0) {\n mediaType = mediaType.substr(0, colonPos);\n }\n }\n if (mediaType === 'application/ld+json') {\n // Return JSON-LD if proper content type was returned\n return (await response.json());\n }\n else {\n // Check for alternate link for a non-JSON-LD response\n if (response.headers.has('Link')) {\n let alternateUrl;\n response.headers.forEach((value, key) => {\n if (key === 'link') {\n const linkHeader = (0, http_link_header_1.parse)(value);\n for (const link of linkHeader.get('type', 'application/ld+json')) {\n if (link.rel === 'alternate') {\n if (alternateUrl) {\n throw new Error('Multiple JSON-LD alternate links were found on ' + url);\n }\n alternateUrl = (0, relative_to_absolute_iri_1.resolve)(link.uri, url);\n }\n }\n }\n });\n if (alternateUrl) {\n return this.load(alternateUrl);\n }\n }\n throw new ErrorCoded_1.ErrorCoded(`Unsupported JSON-LD media type ${mediaType}`, ErrorCoded_1.ERROR_CODES.LOADING_DOCUMENT_FAILED);\n }\n }\n else {\n throw new Error(response.statusText || `Status code: ${response.status}`);\n }\n }\n}\nexports.FetchDocumentLoader = FetchDocumentLoader;\n//# sourceMappingURL=FetchDocumentLoader.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IDocumentLoader.js.map","\"use strict\";\n// tslint:disable:max-line-length\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=JsonLdContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultExpandOptions = exports.JsonLdContextNormalized = void 0;\nconst relative_to_absolute_iri_1 = require(\"relative-to-absolute-iri\");\nconst ErrorCoded_1 = require(\"./ErrorCoded\");\nconst Util_1 = require(\"./Util\");\n/**\n * A class exposing operations over a normalized JSON-LD context.\n */\nclass JsonLdContextNormalized {\n constructor(contextRaw) {\n this.contextRaw = contextRaw;\n }\n /**\n * @return The raw inner context.\n */\n getContextRaw() {\n return this.contextRaw;\n }\n /**\n * Expand the term or prefix of the given term if it has one,\n * otherwise return the term as-is.\n *\n * This will try to expand the IRI as much as possible.\n *\n * Iff in vocab-mode, then other references to other terms in the context can be used,\n * such as to `myTerm`:\n * ```\n * {\n * \"myTerm\": \"http://example.org/myLongTerm\"\n * }\n * ```\n *\n * @param {string} term A term that is an URL or a prefixed URL.\n * @param {boolean} expandVocab If the term is a predicate or type and should be expanded based on @vocab,\n * otherwise it is considered a regular term that is expanded based on @base.\n * @param {IExpandOptions} options Options that define the way how expansion must be done.\n * @return {string} The expanded term, the term as-is, or null if it was explicitly disabled in the context.\n * @throws If the term is aliased to an invalid value (not a string, IRI or keyword).\n */\n expandTerm(term, expandVocab, options = exports.defaultExpandOptions) {\n const contextValue = this.contextRaw[term];\n // Immediately return if the term was disabled in the context\n if (contextValue === null || (contextValue && contextValue['@id'] === null)) {\n return null;\n }\n // Check the @id\n let validIriMapping = true;\n if (contextValue && expandVocab) {\n const value = Util_1.Util.getContextValueId(contextValue);\n if (value && value !== term) {\n if (typeof value !== 'string' || (!Util_1.Util.isValidIri(value) && !Util_1.Util.isValidKeyword(value))) {\n // Don't mark this mapping as invalid if we have an unknown keyword, but of the correct form.\n if (!Util_1.Util.isPotentialKeyword(value)) {\n validIriMapping = false;\n }\n }\n else {\n return value;\n }\n }\n }\n // Check if the term is prefixed\n const prefix = Util_1.Util.getPrefix(term, this.contextRaw);\n const vocab = this.contextRaw['@vocab'];\n const vocabRelative = (!!vocab || vocab === '') && vocab.indexOf(':') < 0;\n const base = this.contextRaw['@base'];\n const potentialKeyword = Util_1.Util.isPotentialKeyword(term);\n if (prefix) {\n const contextPrefixValue = this.contextRaw[prefix];\n const value = Util_1.Util.getContextValueId(contextPrefixValue);\n if (value) {\n if (typeof contextPrefixValue === 'string' || !options.allowPrefixForcing) {\n // If we have a simple term definition,\n // check the last character of the prefix to determine whether or not it is a prefix.\n // Validate that prefix ends with gen-delim character, unless @prefix is true\n if (!Util_1.Util.isSimpleTermDefinitionPrefix(value, options)) {\n // Treat the term as an absolute IRI\n return term;\n }\n }\n else {\n // If we have an expanded term definition, default to @prefix: false\n if (value[0] !== '_' && !potentialKeyword && !contextPrefixValue['@prefix'] && !(term in this.contextRaw)) {\n // Treat the term as an absolute IRI\n return term;\n }\n }\n return value + term.substr(prefix.length + 1);\n }\n }\n else if (expandVocab && ((vocab || vocab === '') || (options.allowVocabRelativeToBase && (base && vocabRelative)))\n && !potentialKeyword && !Util_1.Util.isCompactIri(term)) {\n if (vocabRelative) {\n if (options.allowVocabRelativeToBase) {\n return ((vocab || base) ? (0, relative_to_absolute_iri_1.resolve)(vocab, base) : '') + term;\n }\n else {\n throw new ErrorCoded_1.ErrorCoded(`Relative vocab expansion for term '${term}' with vocab '${vocab}' is not allowed.`, ErrorCoded_1.ERROR_CODES.INVALID_VOCAB_MAPPING);\n }\n }\n else {\n return vocab + term;\n }\n }\n else if (!expandVocab && base && !potentialKeyword && !Util_1.Util.isCompactIri(term)) {\n return (0, relative_to_absolute_iri_1.resolve)(term, base);\n }\n // Return the term as-is, unless we discovered an invalid IRI mapping for this term in the context earlier.\n if (validIriMapping) {\n return term;\n }\n else {\n throw new ErrorCoded_1.ErrorCoded(`Invalid IRI mapping found for context entry '${term}': '${JSON.stringify(contextValue)}'`, ErrorCoded_1.ERROR_CODES.INVALID_IRI_MAPPING);\n }\n }\n /**\n * Compact the given term using @base, @vocab, an aliased term, or a prefixed term.\n *\n * This will try to compact the IRI as much as possible.\n *\n * @param {string} iri An IRI to compact.\n * @param {boolean} vocab If the term is a predicate or type and should be compacted based on @vocab,\n * otherwise it is considered a regular term that is compacted based on @base.\n * @return {string} The compacted term or the IRI as-is.\n */\n compactIri(iri, vocab) {\n // Try @vocab compacting\n if (vocab && this.contextRaw['@vocab'] && iri.startsWith(this.contextRaw['@vocab'])) {\n return iri.substr(this.contextRaw['@vocab'].length);\n }\n // Try @base compacting\n if (!vocab && this.contextRaw['@base'] && iri.startsWith(this.contextRaw['@base'])) {\n return iri.substr(this.contextRaw['@base'].length);\n }\n // Loop over all terms in the context\n // This will try to prefix as short as possible.\n // Once a fully compacted alias is found, return immediately, as we can not go any shorter.\n const shortestPrefixing = { prefix: '', suffix: iri };\n for (const key in this.contextRaw) {\n const value = this.contextRaw[key];\n if (value && !Util_1.Util.isPotentialKeyword(key)) {\n const contextIri = Util_1.Util.getContextValueId(value);\n if (iri.startsWith(contextIri)) {\n const suffix = iri.substr(contextIri.length);\n if (!suffix) {\n if (vocab) {\n // Immediately return on compacted alias\n return key;\n }\n }\n else if (suffix.length < shortestPrefixing.suffix.length) {\n // Overwrite the shortest prefix\n shortestPrefixing.prefix = key;\n shortestPrefixing.suffix = suffix;\n }\n }\n }\n }\n // Return the shortest prefix\n if (shortestPrefixing.prefix) {\n return shortestPrefixing.prefix + ':' + shortestPrefixing.suffix;\n }\n return iri;\n }\n}\nexports.JsonLdContextNormalized = JsonLdContextNormalized;\nexports.defaultExpandOptions = {\n allowPrefixForcing: true,\n allowPrefixNonGenDelims: false,\n allowVocabRelativeToBase: true,\n};\n//# sourceMappingURL=JsonLdContextNormalized.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Util = void 0;\nclass Util {\n /**\n * Check if the given term is a valid compact IRI.\n * Otherwise, it may be an IRI.\n * @param {string} term A term.\n * @return {boolean} If it is a compact IRI.\n */\n static isCompactIri(term) {\n return term.indexOf(':') > 0 && !(term && term[0] === '#');\n }\n /**\n * Get the prefix from the given term.\n * @see https://json-ld.org/spec/latest/json-ld/#compact-iris\n * @param {string} term A term that is an URL or a prefixed URL.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @return {string} The prefix or null.\n */\n static getPrefix(term, context) {\n // Do not consider relative IRIs starting with a hash as compact IRIs\n if (term && term[0] === '#') {\n return null;\n }\n const separatorPos = term.indexOf(':');\n if (separatorPos >= 0) {\n // Suffix can not begin with two slashes\n if (term.length > separatorPos + 1\n && term.charAt(separatorPos + 1) === '/'\n && term.charAt(separatorPos + 2) === '/') {\n return null;\n }\n const prefix = term.substr(0, separatorPos);\n // Prefix can not be an underscore (this is a blank node)\n if (prefix === '_') {\n return null;\n }\n // Prefix must match a term in the active context\n if (context[prefix]) {\n return prefix;\n }\n }\n return null;\n }\n /**\n * From a given context entry value, get the string value, or the @id field.\n * @param contextValue A value for a term in a context.\n * @return {string} The id value, or null.\n */\n static getContextValueId(contextValue) {\n if (contextValue === null || typeof contextValue === 'string') {\n return contextValue;\n }\n const id = contextValue['@id'];\n return id ? id : null;\n }\n /**\n * Check if the given simple term definition (string-based value of a context term)\n * should be considered a prefix.\n * @param value A simple term definition value.\n * @param options Options that define the way how expansion must be done.\n */\n static isSimpleTermDefinitionPrefix(value, options) {\n return !Util.isPotentialKeyword(value)\n && (options.allowPrefixNonGenDelims || (typeof value === 'string' && (value[0] === '_' || Util.isPrefixIriEndingWithGenDelim(value))));\n }\n /**\n * Check if the given keyword is of the keyword format \"@\"1*ALPHA.\n * @param {string} keyword A potential keyword.\n * @return {boolean} If the given keyword is of the keyword format.\n */\n static isPotentialKeyword(keyword) {\n return typeof keyword === 'string' && Util.KEYWORD_REGEX.test(keyword);\n }\n /**\n * Check if the given prefix ends with a gen-delim character.\n * @param {string} prefixIri A prefix IRI.\n * @return {boolean} If the given prefix IRI is valid.\n */\n static isPrefixIriEndingWithGenDelim(prefixIri) {\n return Util.ENDS_WITH_GEN_DELIM.test(prefixIri);\n }\n /**\n * Check if the given context value can be a prefix value.\n * @param value A context value.\n * @return {boolean} If it can be a prefix value.\n */\n static isPrefixValue(value) {\n return value && (typeof value === 'string' || (value && typeof value === 'object'));\n }\n /**\n * Check if the given IRI is valid.\n * @param {string} iri A potential IRI.\n * @return {boolean} If the given IRI is valid.\n */\n static isValidIri(iri) {\n return Boolean(iri && Util.IRI_REGEX.test(iri));\n }\n /**\n * Check if the given IRI is valid, this includes the possibility of being a relative IRI.\n * @param {string} iri A potential IRI.\n * @return {boolean} If the given IRI is valid.\n */\n static isValidIriWeak(iri) {\n return !!iri && iri[0] !== ':' && Util.IRI_REGEX_WEAK.test(iri);\n }\n /**\n * Check if the given keyword is a defined according to the JSON-LD specification.\n * @param {string} keyword A potential keyword.\n * @return {boolean} If the given keyword is valid.\n */\n static isValidKeyword(keyword) {\n return Util.VALID_KEYWORDS[keyword];\n }\n /**\n * Check if the given term is protected in the context.\n * @param {IJsonLdContextNormalizedRaw} context A context.\n * @param {string} key A context term.\n * @return {boolean} If the given term has an @protected flag.\n */\n static isTermProtected(context, key) {\n const value = context[key];\n return !(typeof value === 'string') && value && value['@protected'];\n }\n /**\n * Check if the given context has at least one protected term.\n * @param context A context.\n * @return If the context has a protected term.\n */\n static hasProtectedTerms(context) {\n for (const key of Object.keys(context)) {\n if (Util.isTermProtected(context, key)) {\n return true;\n }\n }\n return false;\n }\n /**\n * Check if the given key is an internal reserved keyword.\n * @param key A context key.\n */\n static isReservedInternalKeyword(key) {\n return key.startsWith('@__');\n }\n /**\n * Check if two objects are deepEqual to on another.\n * @param object1 The first object to test.\n * @param object2 The second object to test.\n */\n static deepEqual(object1, object2) {\n const objKeys1 = Object.keys(object1);\n const objKeys2 = Object.keys(object2);\n if (objKeys1.length !== objKeys2.length)\n return false;\n return objKeys1.every((key) => {\n const value1 = object1[key];\n const value2 = object2[key];\n return (value1 === value2) || (value1 !== null &&\n value2 !== null &&\n typeof value1 === \"object\" &&\n typeof value2 === \"object\" &&\n this.deepEqual(value1, value2));\n });\n }\n ;\n}\n// Regex for valid IRIs\nUtil.IRI_REGEX = /^([A-Za-z][A-Za-z0-9+-.]*|_):[^ \"<>{}|\\\\\\[\\]`#]*(#[^#]*)?$/;\n// Weaker regex for valid IRIs, this includes relative IRIs\nUtil.IRI_REGEX_WEAK = /(?::[^:])|\\//;\n// Regex for keyword form\nUtil.KEYWORD_REGEX = /^@[a-z]+$/i;\n// Regex to see if an IRI ends with a gen-delim character (see RFC 3986)\nUtil.ENDS_WITH_GEN_DELIM = /[:/?#\\[\\]@]$/;\n// Regex for language tags\nUtil.REGEX_LANGUAGE_TAG = /^[a-zA-Z]+(-[a-zA-Z0-9]+)*$/;\n// Regex for base directions\nUtil.REGEX_DIRECTION_TAG = /^(ltr)|(rtl)$/;\n// All known valid JSON-LD keywords\n// @see https://www.w3.org/TR/json-ld11/#keywords\nUtil.VALID_KEYWORDS = {\n '@annotation': true,\n '@base': true,\n '@container': true,\n '@context': true,\n '@direction': true,\n '@graph': true,\n '@id': true,\n '@import': true,\n '@included': true,\n '@index': true,\n '@json': true,\n '@language': true,\n '@list': true,\n '@nest': true,\n '@none': true,\n '@prefix': true,\n '@propagate': true,\n '@protected': true,\n '@reverse': true,\n '@set': true,\n '@type': true,\n '@value': true,\n '@version': true,\n '@vocab': true,\n};\n// Keys in the contexts that will not be expanded based on the base IRI\nUtil.EXPAND_KEYS_BLACKLIST = [\n '@base',\n '@vocab',\n '@language',\n '@version',\n '@direction',\n];\n// Keys in the contexts that may not be aliased from\nUtil.ALIAS_DOMAIN_BLACKLIST = [\n '@container',\n '@graph',\n '@id',\n '@index',\n '@list',\n '@nest',\n '@none',\n '@prefix',\n '@reverse',\n '@set',\n '@type',\n '@value',\n '@version',\n];\n// Keys in the contexts that may not be aliased to\nUtil.ALIAS_RANGE_BLACKLIST = [\n '@context',\n '@preserve',\n];\n// All valid @container values\nUtil.CONTAINERS = [\n '@list',\n '@set',\n '@index',\n '@language',\n '@graph',\n '@id',\n '@type',\n];\n// All valid @container values under processing mode 1.0\nUtil.CONTAINERS_1_0 = [\n '@list',\n '@set',\n '@index',\n];\nexports.Util = Util;\n//# sourceMappingURL=Util.js.map","(function(self) {\n\nvar irrelevant = (function (exports) {\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob:\n 'FileReader' in self &&\n 'Blob' in self &&\n (function() {\n try {\n new Blob();\n return true\n } catch (e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n };\n\n function isDataView(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ];\n\n var isArrayBufferView =\n ArrayBuffer.isView ||\n function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n };\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name);\n }\n if (/[^a-z0-9\\-#$%&'*+.^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value);\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift();\n return {done: value === undefined, value: value}\n }\n };\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n };\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {};\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value);\n }, this);\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1]);\n }, this);\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name]);\n }, this);\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name);\n value = normalizeValue(value);\n var oldValue = this.map[name];\n this.map[name] = oldValue ? oldValue + ', ' + value : value;\n };\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)];\n };\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name);\n return this.has(name) ? this.map[name] : null\n };\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n };\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value);\n };\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this);\n }\n }\n };\n\n Headers.prototype.keys = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push(name);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.values = function() {\n var items = [];\n this.forEach(function(value) {\n items.push(value);\n });\n return iteratorFor(items)\n };\n\n Headers.prototype.entries = function() {\n var items = [];\n this.forEach(function(value, name) {\n items.push([name, value]);\n });\n return iteratorFor(items)\n };\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries;\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true;\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result);\n };\n reader.onerror = function() {\n reject(reader.error);\n };\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsArrayBuffer(blob);\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader();\n var promise = fileReaderReady(reader);\n reader.readAsText(blob);\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf);\n var chars = new Array(view.length);\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i]);\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength);\n view.set(new Uint8Array(buf));\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false;\n\n this._initBody = function(body) {\n this._bodyInit = body;\n if (!body) {\n this._bodyText = '';\n } else if (typeof body === 'string') {\n this._bodyText = body;\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body;\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body;\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString();\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer);\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer]);\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body);\n } else {\n this._bodyText = body = Object.prototype.toString.call(body);\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8');\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type);\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');\n }\n }\n };\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n };\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n };\n }\n\n this.text = function() {\n var rejected = consumed(this);\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n };\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n };\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n };\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase();\n return methods.indexOf(upcased) > -1 ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {};\n var body = options.body;\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url;\n this.credentials = input.credentials;\n if (!options.headers) {\n this.headers = new Headers(input.headers);\n }\n this.method = input.method;\n this.mode = input.mode;\n this.signal = input.signal;\n if (!body && input._bodyInit != null) {\n body = input._bodyInit;\n input.bodyUsed = true;\n }\n } else {\n this.url = String(input);\n }\n\n this.credentials = options.credentials || this.credentials || 'same-origin';\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers);\n }\n this.method = normalizeMethod(options.method || this.method || 'GET');\n this.mode = options.mode || this.mode || null;\n this.signal = options.signal || this.signal;\n this.referrer = null;\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body);\n }\n\n Request.prototype.clone = function() {\n return new Request(this, {body: this._bodyInit})\n };\n\n function decode(body) {\n var form = new FormData();\n body\n .trim()\n .split('&')\n .forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=');\n var name = split.shift().replace(/\\+/g, ' ');\n var value = split.join('=').replace(/\\+/g, ' ');\n form.append(decodeURIComponent(name), decodeURIComponent(value));\n }\n });\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers();\n // Replace instances of \\r\\n and \\n followed by at least one space or horizontal tab with a space\n // https://tools.ietf.org/html/rfc7230#section-3.2\n var preProcessedHeaders = rawHeaders.replace(/\\r?\\n[\\t ]+/g, ' ');\n preProcessedHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':');\n var key = parts.shift().trim();\n if (key) {\n var value = parts.join(':').trim();\n headers.append(key, value);\n }\n });\n return headers\n }\n\n Body.call(Request.prototype);\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {};\n }\n\n this.type = 'default';\n this.status = options.status === undefined ? 200 : options.status;\n this.ok = this.status >= 200 && this.status < 300;\n this.statusText = 'statusText' in options ? options.statusText : 'OK';\n this.headers = new Headers(options.headers);\n this.url = options.url || '';\n this._initBody(bodyInit);\n }\n\n Body.call(Response.prototype);\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n };\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''});\n response.type = 'error';\n return response\n };\n\n var redirectStatuses = [301, 302, 303, 307, 308];\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n };\n\n exports.DOMException = self.DOMException;\n try {\n new exports.DOMException();\n } catch (err) {\n exports.DOMException = function(message, name) {\n this.message = message;\n this.name = name;\n var error = Error(message);\n this.stack = error.stack;\n };\n exports.DOMException.prototype = Object.create(Error.prototype);\n exports.DOMException.prototype.constructor = exports.DOMException;\n }\n\n function fetch(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init);\n\n if (request.signal && request.signal.aborted) {\n return reject(new exports.DOMException('Aborted', 'AbortError'))\n }\n\n var xhr = new XMLHttpRequest();\n\n function abortXhr() {\n xhr.abort();\n }\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n };\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL');\n var body = 'response' in xhr ? xhr.response : xhr.responseText;\n resolve(new Response(body, options));\n };\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'));\n };\n\n xhr.onabort = function() {\n reject(new exports.DOMException('Aborted', 'AbortError'));\n };\n\n xhr.open(request.method, request.url, true);\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true;\n } else if (request.credentials === 'omit') {\n xhr.withCredentials = false;\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob';\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value);\n });\n\n if (request.signal) {\n request.signal.addEventListener('abort', abortXhr);\n\n xhr.onreadystatechange = function() {\n // DONE (success or failure)\n if (xhr.readyState === 4) {\n request.signal.removeEventListener('abort', abortXhr);\n }\n };\n }\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);\n })\n }\n\n fetch.polyfill = true;\n\n if (!self.fetch) {\n self.fetch = fetch;\n self.Headers = Headers;\n self.Request = Request;\n self.Response = Response;\n }\n\n exports.Headers = Headers;\n exports.Request = Request;\n exports.Response = Response;\n exports.fetch = fetch;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n})({});\n})(typeof self !== 'undefined' ? self : this);\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/JsonLdParser\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContextTree = void 0;\n/**\n * A tree structure that holds all contexts,\n * based on their position in the JSON object.\n *\n * Positions are identified by a path of keys.\n */\nclass ContextTree {\n constructor() {\n this.subTrees = {};\n }\n getContext(keys) {\n if (keys.length > 0) {\n const [head, ...tail] = keys;\n const subTree = this.subTrees[head];\n if (subTree) {\n const subContext = subTree.getContext(tail);\n if (subContext) {\n return subContext.then(({ context, depth }) => ({ context, depth: depth + 1 }));\n }\n }\n }\n return this.context ? this.context.then((context) => ({ context, depth: 0 })) : null;\n }\n setContext(keys, context) {\n if (keys.length === 0) {\n this.context = context;\n }\n else {\n const [head, ...tail] = keys;\n let subTree = this.subTrees[head];\n if (!subTree) {\n subTree = this.subTrees[head] = new ContextTree();\n }\n subTree.setContext(tail, context);\n }\n }\n removeContext(path) {\n this.setContext(path, null);\n }\n}\nexports.ContextTree = ContextTree;\n//# sourceMappingURL=ContextTree.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JsonLdParser = void 0;\n// tslint:disable-next-line:no-var-requires\nconst Parser = require('@bergos/jsonparse');\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst EntryHandlerArrayValue_1 = require(\"./entryhandler/EntryHandlerArrayValue\");\nconst EntryHandlerContainer_1 = require(\"./entryhandler/EntryHandlerContainer\");\nconst EntryHandlerInvalidFallback_1 = require(\"./entryhandler/EntryHandlerInvalidFallback\");\nconst EntryHandlerPredicate_1 = require(\"./entryhandler/EntryHandlerPredicate\");\nconst EntryHandlerKeywordContext_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordContext\");\nconst EntryHandlerKeywordGraph_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordGraph\");\nconst EntryHandlerKeywordId_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordId\");\nconst EntryHandlerKeywordIncluded_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordIncluded\");\nconst EntryHandlerKeywordNest_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordNest\");\nconst EntryHandlerKeywordType_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordType\");\nconst EntryHandlerKeywordUnknownFallback_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordUnknownFallback\");\nconst EntryHandlerKeywordValue_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordValue\");\nconst ParsingContext_1 = require(\"./ParsingContext\");\nconst Util_1 = require(\"./Util\");\nconst http_link_header_1 = require(\"http-link-header\");\nconst EntryHandlerKeywordAnnotation_1 = require(\"./entryhandler/keyword/EntryHandlerKeywordAnnotation\");\n/**\n * A stream transformer that parses JSON-LD (text) streams to an {@link RDF.Stream}.\n */\nclass JsonLdParser extends readable_stream_1.Transform {\n constructor(options) {\n super({ readableObjectMode: true });\n options = options || {};\n this.options = options;\n this.parsingContext = new ParsingContext_1.ParsingContext(Object.assign({ parser: this }, options));\n this.util = new Util_1.Util({ dataFactory: options.dataFactory, parsingContext: this.parsingContext });\n this.jsonParser = new Parser();\n this.contextJobs = [];\n this.typeJobs = [];\n this.contextAwaitingJobs = [];\n this.lastDepth = 0;\n this.lastKeys = [];\n this.lastOnValueJob = Promise.resolve();\n this.attachJsonParserListeners();\n this.on('end', () => {\n if (typeof this.jsonParser.mode !== 'undefined') {\n this.emit('error', new Error('Unclosed document'));\n }\n });\n }\n /**\n * Construct a JsonLdParser from the given HTTP response.\n *\n * This will throw an error if no valid JSON response is received\n * (application/ld+json, application/json, or something+json).\n *\n * For raw JSON responses, exactly one link header pointing to a JSON-LD context is required.\n *\n * This method is not responsible for handling redirects.\n *\n * @param baseIRI The URI of the received response.\n * @param mediaType The received content type.\n * @param headers Optional HTTP headers.\n * @param options Optional parser options.\n */\n static fromHttpResponse(baseIRI, mediaType, headers, options) {\n let context;\n let wellKnownMediaTypes = ['application/activity+json'];\n if (options && options.wellKnownMediaTypes) {\n wellKnownMediaTypes = options.wellKnownMediaTypes;\n }\n // Special cases when receiving something else than the JSON-LD media type or the wellKnownMediaTypes\n if (mediaType !== 'application/ld+json' && !wellKnownMediaTypes.includes(mediaType)) {\n // Only accept JSON or JSON extension types\n if (mediaType !== 'application/json' && !mediaType.endsWith('+json')) {\n throw new jsonld_context_parser_1.ErrorCoded(`Unsupported JSON-LD media type ${mediaType}`, jsonld_context_parser_1.ERROR_CODES.LOADING_DOCUMENT_FAILED);\n }\n // We need exactly one JSON-LD context in the link header\n if (headers && headers.has('Link')) {\n headers.forEach((value, key) => {\n if (key === 'link') {\n const linkHeader = (0, http_link_header_1.parse)(value);\n for (const link of linkHeader.get('rel', 'http://www.w3.org/ns/json-ld#context')) {\n if (context) {\n throw new jsonld_context_parser_1.ErrorCoded('Multiple JSON-LD context link headers were found on ' + baseIRI, jsonld_context_parser_1.ERROR_CODES.MULTIPLE_CONTEXT_LINK_HEADERS);\n }\n context = link.uri;\n }\n }\n });\n }\n if (!context && !(options === null || options === void 0 ? void 0 : options.ignoreMissingContextLinkHeader)) {\n throw new jsonld_context_parser_1.ErrorCoded(`Missing context link header for media type ${mediaType} on ${baseIRI}`, jsonld_context_parser_1.ERROR_CODES.LOADING_DOCUMENT_FAILED);\n }\n }\n // Check if the streaming profile is present\n let streamingProfile;\n if (headers && headers.has('Content-Type')) {\n const contentType = headers.get('Content-Type');\n const match = /; *profile=([^\"]*)/.exec(contentType);\n if (match && match[1] === 'http://www.w3.org/ns/json-ld#streaming') {\n streamingProfile = true;\n }\n }\n return new JsonLdParser(Object.assign({ baseIRI,\n context,\n streamingProfile }, options ? options : {}));\n }\n /**\n * Parses the given text stream into a quad stream.\n * @param {NodeJS.EventEmitter} stream A text stream.\n * @return {RDF.Stream} A quad stream.\n */\n import(stream) {\n if ('pipe' in stream) {\n stream.on('error', (error) => parsed.emit('error', error));\n const parsed = stream.pipe(new JsonLdParser(this.options));\n return parsed;\n }\n else {\n const output = new readable_stream_1.PassThrough({ readableObjectMode: true });\n stream.on('error', (error) => parsed.emit('error', error));\n stream.on('data', (data) => output.push(data));\n stream.on('end', () => output.push(null));\n const parsed = output.pipe(new JsonLdParser(this.options));\n return parsed;\n }\n }\n _transform(chunk, encoding, callback) {\n this.jsonParser.write(chunk);\n this.lastOnValueJob\n .then(() => callback(), (error) => callback(error));\n }\n /**\n * Start a new job for parsing the given value.\n *\n * This will let the first valid {@link IEntryHandler} handle the entry.\n *\n * @param {any[]} keys The stack of keys.\n * @param value The value to parse.\n * @param {number} depth The depth to parse at.\n * @param {boolean} lastDepthCheck If the lastDepth check should be done for buffer draining.\n * @return {Promise} A promise resolving when the job is done.\n */\n async newOnValueJob(keys, value, depth, lastDepthCheck) {\n let flushStacks = true;\n // When we go up the stack, emit all unidentified values\n // We need to do this before the new job, because the new job may require determined values from the flushed jobs.\n if (lastDepthCheck && depth < this.lastDepth) {\n // Check if we had any RDF lists that need to be terminated with an rdf:nil\n const listPointer = this.parsingContext.listPointerStack[this.lastDepth];\n if (listPointer) {\n // Terminate the list if the had at least one value\n if (listPointer.value) {\n this.push(this.util.dataFactory.quad(listPointer.value, this.util.rdfRest, this.util.rdfNil, this.util.getDefaultGraph()));\n }\n // Add the list id to the id stack, so it can be used higher up in the stack\n listPointer.listId.listHead = true;\n this.parsingContext.idStack[listPointer.listRootDepth + 1] = [listPointer.listId];\n this.parsingContext.listPointerStack.splice(this.lastDepth, 1);\n }\n // Flush the buffer for lastDepth\n // If the parent key is a special type of container, postpone flushing until that parent is handled.\n if (await EntryHandlerContainer_1.EntryHandlerContainer.isBufferableContainerHandler(this.parsingContext, this.lastKeys, this.lastDepth)) {\n this.parsingContext.pendingContainerFlushBuffers\n .push({ depth: this.lastDepth, keys: this.lastKeys.slice(0, this.lastKeys.length) });\n flushStacks = false;\n }\n else {\n await this.flushBuffer(this.lastDepth, this.lastKeys);\n }\n }\n const key = await this.util.unaliasKeyword(keys[depth], keys, depth);\n const parentKey = await this.util.unaliasKeywordParent(keys, depth);\n this.parsingContext.emittedStack[depth] = true;\n let handleKey = true;\n // Keywords inside @reverse is not allowed apart from @context\n if (jsonld_context_parser_1.Util.isValidKeyword(key) && parentKey === '@reverse' && key !== '@context') {\n this.emit('error', new jsonld_context_parser_1.ErrorCoded(`Found the @id '${value}' inside an @reverse property`, jsonld_context_parser_1.ERROR_CODES.INVALID_REVERSE_PROPERTY_MAP));\n }\n // Skip further processing if one of the parent nodes are invalid.\n // We use the validationStack to reuse validation results that were produced before with common key stacks.\n let inProperty = false;\n if (this.parsingContext.validationStack.length > 1) {\n inProperty = this.parsingContext.validationStack[this.parsingContext.validationStack.length - 1].property;\n }\n for (let i = Math.max(1, this.parsingContext.validationStack.length - 1); i < keys.length - 1; i++) {\n const validationResult = this.parsingContext.validationStack[i]\n || (this.parsingContext.validationStack[i] = await this.validateKey(keys.slice(0, i + 1), i, inProperty));\n if (!validationResult.valid) {\n this.parsingContext.emittedStack[depth] = false;\n handleKey = false;\n break;\n }\n else if (!inProperty && validationResult.property) {\n inProperty = true;\n }\n }\n // Skip further processing if this node is part of a literal\n if (await this.util.isLiteral(keys, depth)) {\n handleKey = false;\n }\n // Get handler\n if (handleKey) {\n for (const entryHandler of JsonLdParser.ENTRY_HANDLERS) {\n const testResult = await entryHandler.test(this.parsingContext, this.util, key, keys, depth);\n if (testResult) {\n // Pass processing over to the handler\n await entryHandler.handle(this.parsingContext, this.util, key, keys, value, depth, testResult);\n // Flag that this depth is processed\n if (entryHandler.isStackProcessor()) {\n this.parsingContext.processingStack[depth] = true;\n }\n break;\n }\n }\n }\n // Validate value indexes on the root.\n if (depth === 0 && Array.isArray(value)) {\n await this.util.validateValueIndexes(value);\n }\n // When we go up the stack, flush the old stack\n if (flushStacks && depth < this.lastDepth) {\n // Reset our stacks\n this.flushStacks(this.lastDepth);\n }\n this.lastDepth = depth;\n this.lastKeys = keys;\n // Clear the keyword cache at this depth, and everything underneath.\n this.parsingContext.unaliasedKeywordCacheStack.splice(depth - 1);\n }\n /**\n * Flush the processing stacks at the given depth.\n * @param {number} depth A depth.\n */\n flushStacks(depth) {\n this.parsingContext.processingStack.splice(depth, 1);\n this.parsingContext.processingType.splice(depth, 1);\n this.parsingContext.emittedStack.splice(depth, 1);\n this.parsingContext.idStack.splice(depth, 1);\n this.parsingContext.graphStack.splice(depth + 1, 1);\n this.parsingContext.graphContainerTermStack.splice(depth, 1);\n this.parsingContext.jsonLiteralStack.splice(depth, 1);\n this.parsingContext.validationStack.splice(depth - 1, 2);\n this.parsingContext.literalStack.splice(depth, this.parsingContext.literalStack.length - depth);\n this.parsingContext.annotationsBuffer.splice(depth, 1);\n // TODO: just like the literal stack, splice all other stack until the end as well?\n }\n /**\n * Flush buffers for the given depth.\n *\n * This should be called after the last entry at a given depth was processed.\n *\n * @param {number} depth A depth.\n * @param {any[]} keys A stack of keys.\n * @return {Promise} A promise resolving if flushing is done.\n */\n async flushBuffer(depth, keys) {\n let subjects = this.parsingContext.idStack[depth];\n const subjectsWasDefined = !!subjects;\n if (!subjectsWasDefined) {\n subjects = this.parsingContext.idStack[depth] = [this.util.dataFactory.blankNode()];\n }\n // Flush values at this level\n const valueBuffer = this.parsingContext.unidentifiedValuesBuffer[depth];\n if (valueBuffer) {\n for (const subject of subjects) {\n const depthOffsetGraph = await this.util.getDepthOffsetGraph(depth, keys);\n const graphs = (this.parsingContext.graphStack[depth] || depthOffsetGraph >= 0)\n ? this.parsingContext.idStack[depth - depthOffsetGraph - 1]\n : [await this.util.getGraphContainerValue(keys, depth)];\n if (graphs) {\n for (const graph of graphs) {\n // Flush values to stream if the graph @id is known\n this.parsingContext.emittedStack[depth] = true;\n for (const bufferedValue of valueBuffer) {\n this.util.emitQuadChecked(depth, subject, bufferedValue.predicate, bufferedValue.object, graph, bufferedValue.reverse, bufferedValue.isEmbedded);\n }\n }\n }\n else {\n // Place the values in the graphs buffer if the graph @id is not yet known\n const subGraphBuffer = this.parsingContext.getUnidentifiedGraphBufferSafe(depth - await this.util.getDepthOffsetGraph(depth, keys) - 1);\n for (const bufferedValue of valueBuffer) {\n if (bufferedValue.reverse) {\n subGraphBuffer.push({\n object: subject,\n predicate: bufferedValue.predicate,\n subject: bufferedValue.object,\n isEmbedded: bufferedValue.isEmbedded,\n });\n }\n else {\n subGraphBuffer.push({\n object: bufferedValue.object,\n predicate: bufferedValue.predicate,\n subject,\n isEmbedded: bufferedValue.isEmbedded,\n });\n }\n }\n }\n }\n this.parsingContext.unidentifiedValuesBuffer.splice(depth, 1);\n this.parsingContext.literalStack.splice(depth, 1);\n this.parsingContext.jsonLiteralStack.splice(depth, 1);\n }\n // Flush graphs at this level\n const graphBuffer = this.parsingContext.unidentifiedGraphsBuffer[depth];\n if (graphBuffer) {\n for (const subject of subjects) {\n // A @graph statement at the root without @id relates to the default graph,\n // unless there are top-level properties,\n // others relate to blank nodes.\n const graph = depth === 1 && subject.termType === 'BlankNode'\n && !this.parsingContext.topLevelProperties ? this.util.getDefaultGraph() : subject;\n this.parsingContext.emittedStack[depth] = true;\n for (const bufferedValue of graphBuffer) {\n this.parsingContext.emitQuad(depth, this.util.dataFactory.quad(bufferedValue.subject, bufferedValue.predicate, bufferedValue.object, graph));\n }\n }\n this.parsingContext.unidentifiedGraphsBuffer.splice(depth, 1);\n }\n // Push unhandled annotations up the stack as nested annotations\n const annotationsBuffer = this.parsingContext.annotationsBuffer[depth];\n if (annotationsBuffer) {\n // Throw an error if we reach the top, and still have annotations\n if (annotationsBuffer.length > 0 && depth === 1) {\n this.parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Annotations can not be made on top-level nodes`, jsonld_context_parser_1.ERROR_CODES.INVALID_ANNOTATION));\n }\n // Pass the annotations buffer up one level in the stack\n const annotationsBufferParent = this.parsingContext.getAnnotationsBufferSafe(depth - 1);\n for (const annotation of annotationsBuffer) {\n annotationsBufferParent.push(annotation);\n }\n delete this.parsingContext.annotationsBuffer[depth];\n }\n }\n /**\n * Check if at least one {@link IEntryHandler} validates the entry to true.\n * @param {any[]} keys A stack of keys.\n * @param {number} depth A depth.\n * @param {boolean} inProperty If the current depth is part of a valid property node.\n * @return {Promise<{ valid: boolean, property: boolean }>} A promise resolving to true or false.\n */\n async validateKey(keys, depth, inProperty) {\n for (const entryHandler of JsonLdParser.ENTRY_HANDLERS) {\n if (await entryHandler.validate(this.parsingContext, this.util, keys, depth, inProperty)) {\n return { valid: true, property: inProperty || entryHandler.isPropertyHandler() };\n }\n }\n return { valid: false, property: false };\n }\n /**\n * Attach all required listeners to the JSON parser.\n *\n * This should only be called once.\n */\n attachJsonParserListeners() {\n // Listen to json parser events\n this.jsonParser.onValue = (value) => {\n const depth = this.jsonParser.stack.length;\n const keys = (new Array(depth + 1).fill(0)).map((v, i) => {\n return i === depth ? this.jsonParser.key : this.jsonParser.stack[i].key;\n });\n if (!this.isParsingContextInner(depth)) { // Don't parse inner nodes inside @context\n const valueJobCb = () => this.newOnValueJob(keys, value, depth, true);\n if (!this.parsingContext.streamingProfile\n && !this.parsingContext.contextTree.getContext(keys.slice(0, -1))) {\n // If an out-of-order context is allowed,\n // we have to buffer everything.\n // We store jobs for @context's and @type's separately,\n // because at the end, we have to process them first.\n // We also handle @type because these *could* introduce a type-scoped context.\n if (keys[depth] === '@context') {\n let jobs = this.contextJobs[depth];\n if (!jobs) {\n jobs = this.contextJobs[depth] = [];\n }\n jobs.push(valueJobCb);\n }\n else {\n this.contextAwaitingJobs.push({ job: valueJobCb, keys, depth });\n }\n }\n else {\n // Make sure that our value jobs are chained synchronously\n this.lastOnValueJob = this.lastOnValueJob.then(valueJobCb);\n }\n // Execute all buffered jobs on deeper levels\n if (!this.parsingContext.streamingProfile && depth === 0) {\n this.lastOnValueJob = this.lastOnValueJob\n .then(() => this.executeBufferedJobs());\n }\n }\n };\n this.jsonParser.onError = (error) => {\n this.emit('error', error);\n };\n }\n /**\n * Check if the parser is currently parsing an element that is part of an @context entry.\n * @param {number} depth A depth.\n * @return {boolean} A boolean.\n */\n isParsingContextInner(depth) {\n for (let i = depth; i > 0; i--) {\n if (this.jsonParser.stack[i - 1].key === '@context') {\n return true;\n }\n }\n return false;\n }\n /**\n * Execute all buffered jobs.\n * @return {Promise} A promise resolving if all jobs are finished.\n */\n async executeBufferedJobs() {\n // Handle context jobs\n for (const jobs of this.contextJobs) {\n if (jobs) {\n for (const job of jobs) {\n await job();\n }\n }\n }\n // Clear the keyword cache.\n this.parsingContext.unaliasedKeywordCacheStack.splice(0);\n const contextAwaitingJobs = [];\n for (const job of this.contextAwaitingJobs) {\n if ((await this.util.unaliasKeyword(job.keys[job.depth], job.keys, job.depth, true)) === '@type'\n || typeof job.keys[job.depth] === 'number' && (await this.util.unaliasKeyword(job.keys[job.depth - 1], job.keys, job.depth - 1, true)) === '@type') { // Also capture @type with array values\n // Remove @type from keys, because we want it to apply to parent later on\n this.typeJobs.push({ job: job.job, keys: job.keys.slice(0, job.keys.length - 1) });\n }\n else {\n contextAwaitingJobs.push(job);\n }\n }\n // Handle non-context jobs\n for (const job of contextAwaitingJobs) {\n // Check if we have a type (with possible type-scoped context) that should be handled before.\n // We check all possible parent nodes for the current job, from root to leaves.\n if (this.typeJobs.length > 0) {\n // First collect all applicable type jobs\n const applicableTypeJobs = [];\n const applicableTypeJobIds = [];\n for (let i = 0; i < this.typeJobs.length; i++) {\n const typeJob = this.typeJobs[i];\n if (Util_1.Util.isPrefixArray(typeJob.keys, job.keys)) {\n applicableTypeJobs.push(typeJob);\n applicableTypeJobIds.push(i);\n }\n }\n // Next, sort the jobs from short to long key length (to ensure types higher up in the tree to be handled first)\n const sortedTypeJobs = applicableTypeJobs.sort((job1, job2) => job1.keys.length - job2.keys.length);\n // Finally, execute the jobs in order\n for (const typeJob of sortedTypeJobs) {\n await typeJob.job();\n }\n // Remove the executed type jobs\n // Sort first, so we can efficiently splice\n const sortedApplicableTypeJobIds = applicableTypeJobIds.sort().reverse();\n for (const jobId of sortedApplicableTypeJobIds) {\n this.typeJobs.splice(jobId, 1);\n }\n }\n await job.job();\n }\n }\n}\nJsonLdParser.DEFAULT_PROCESSING_MODE = '1.1';\nJsonLdParser.ENTRY_HANDLERS = [\n new EntryHandlerArrayValue_1.EntryHandlerArrayValue(),\n new EntryHandlerKeywordContext_1.EntryHandlerKeywordContext(),\n new EntryHandlerKeywordId_1.EntryHandlerKeywordId(),\n new EntryHandlerKeywordIncluded_1.EntryHandlerKeywordIncluded(),\n new EntryHandlerKeywordGraph_1.EntryHandlerKeywordGraph(),\n new EntryHandlerKeywordNest_1.EntryHandlerKeywordNest(),\n new EntryHandlerKeywordType_1.EntryHandlerKeywordType(),\n new EntryHandlerKeywordValue_1.EntryHandlerKeywordValue(),\n new EntryHandlerKeywordAnnotation_1.EntryHandlerKeywordAnnotation(),\n new EntryHandlerContainer_1.EntryHandlerContainer(),\n new EntryHandlerKeywordUnknownFallback_1.EntryHandlerKeywordUnknownFallback(),\n new EntryHandlerPredicate_1.EntryHandlerPredicate(),\n new EntryHandlerInvalidFallback_1.EntryHandlerInvalidFallback(),\n];\nexports.JsonLdParser = JsonLdParser;\n//# sourceMappingURL=JsonLdParser.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ParsingContext = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst ErrorCoded_1 = require(\"jsonld-context-parser/lib/ErrorCoded\");\nconst ContextTree_1 = require(\"./ContextTree\");\nconst JsonLdParser_1 = require(\"./JsonLdParser\");\n/**\n * Data holder for parsing information.\n */\nclass ParsingContext {\n constructor(options) {\n // Initialize settings\n this.contextParser = new jsonld_context_parser_1.ContextParser({ documentLoader: options.documentLoader, skipValidation: options.skipContextValidation });\n this.streamingProfile = !!options.streamingProfile;\n this.baseIRI = options.baseIRI;\n this.produceGeneralizedRdf = !!options.produceGeneralizedRdf;\n this.allowSubjectList = !!options.allowSubjectList;\n this.processingMode = options.processingMode || JsonLdParser_1.JsonLdParser.DEFAULT_PROCESSING_MODE;\n this.strictValues = !!options.strictValues;\n this.validateValueIndexes = !!options.validateValueIndexes;\n this.defaultGraph = options.defaultGraph;\n this.rdfDirection = options.rdfDirection;\n this.normalizeLanguageTags = options.normalizeLanguageTags;\n this.streamingProfileAllowOutOfOrderPlainType = options.streamingProfileAllowOutOfOrderPlainType;\n this.rdfstar = options.rdfstar !== false;\n this.rdfstarReverseInEmbedded = options.rdfstarReverseInEmbedded;\n this.topLevelProperties = false;\n this.activeProcessingMode = parseFloat(this.processingMode);\n // Initialize stacks\n this.processingStack = [];\n this.processingType = [];\n this.emittedStack = [];\n this.idStack = [];\n this.graphStack = [];\n this.graphContainerTermStack = [];\n this.listPointerStack = [];\n this.contextTree = new ContextTree_1.ContextTree();\n this.literalStack = [];\n this.validationStack = [];\n this.unaliasedKeywordCacheStack = [];\n this.jsonLiteralStack = [];\n this.unidentifiedValuesBuffer = [];\n this.unidentifiedGraphsBuffer = [];\n this.annotationsBuffer = [];\n this.pendingContainerFlushBuffers = [];\n this.parser = options.parser;\n if (options.context) {\n this.rootContext = this.parseContext(options.context);\n this.rootContext.then((context) => this.validateContext(context));\n }\n else {\n this.rootContext = Promise.resolve(new jsonld_context_parser_1.JsonLdContextNormalized(this.baseIRI ? { '@base': this.baseIRI, '@__baseDocument': true } : {}));\n }\n }\n /**\n * Parse the given context with the configured options.\n * @param {JsonLdContext} context A context to parse.\n * @param {JsonLdContextNormalized} parentContext An optional parent context.\n * @param {boolean} ignoreProtection If @protected term checks should be ignored.\n * @return {Promise} A promise resolving to the parsed context.\n */\n async parseContext(context, parentContext, ignoreProtection) {\n return this.contextParser.parse(context, {\n baseIRI: this.baseIRI,\n ignoreProtection,\n normalizeLanguageTags: this.normalizeLanguageTags,\n parentContext,\n processingMode: this.activeProcessingMode,\n });\n }\n /**\n * Check if the given context is valid.\n * If not, an error will be thrown.\n * @param {JsonLdContextNormalized} context A context.\n */\n validateContext(context) {\n const activeVersion = context.getContextRaw()['@version'];\n if (activeVersion) {\n if (this.activeProcessingMode && activeVersion > this.activeProcessingMode) {\n throw new ErrorCoded_1.ErrorCoded(`Unsupported JSON-LD version '${activeVersion}' under active processing mode ${this.activeProcessingMode}.`, ErrorCoded_1.ERROR_CODES.PROCESSING_MODE_CONFLICT);\n }\n else {\n if (this.activeProcessingMode && activeVersion < this.activeProcessingMode) {\n throw new ErrorCoded_1.ErrorCoded(`Invalid JSON-LD version ${activeVersion} under active processing mode ${this.activeProcessingMode}.`, ErrorCoded_1.ERROR_CODES.INVALID_VERSION_VALUE);\n }\n this.activeProcessingMode = activeVersion;\n }\n }\n }\n /**\n * Get the context at the given path.\n * @param {keys} keys The path of keys to get the context at.\n * @param {number} offset The path offset, defaults to 1.\n * @return {Promise} A promise resolving to a context.\n */\n async getContext(keys, offset = 1) {\n const keysOriginal = keys;\n // Ignore array keys at the end\n while (typeof keys[keys.length - 1] === 'number') {\n keys = keys.slice(0, keys.length - 1);\n }\n // Handle offset on keys\n if (offset) {\n keys = keys.slice(0, -offset);\n }\n // Determine the closest context\n const contextData = await this.getContextPropagationAware(keys);\n const context = contextData.context;\n // Process property-scoped contexts (high-to-low)\n let contextRaw = context.getContextRaw();\n for (let i = contextData.depth; i < keysOriginal.length - offset; i++) {\n const key = keysOriginal[i];\n const contextKeyEntry = contextRaw[key];\n if (contextKeyEntry && typeof contextKeyEntry === 'object' && '@context' in contextKeyEntry) {\n const scopedContext = (await this.parseContext(contextKeyEntry, contextRaw, true)).getContextRaw();\n const propagate = !(key in scopedContext)\n || scopedContext[key]['@context']['@propagate']; // Propagation is true by default\n if (propagate !== false || i === keysOriginal.length - 1 - offset) {\n contextRaw = Object.assign({}, scopedContext);\n // Clean up final context\n delete contextRaw['@propagate'];\n contextRaw[key] = Object.assign({}, contextRaw[key]);\n if ('@id' in contextKeyEntry) {\n contextRaw[key]['@id'] = contextKeyEntry['@id'];\n }\n delete contextRaw[key]['@context'];\n if (propagate !== false) {\n this.contextTree.setContext(keysOriginal.slice(0, i + offset), Promise.resolve(new jsonld_context_parser_1.JsonLdContextNormalized(contextRaw)));\n }\n }\n }\n }\n return new jsonld_context_parser_1.JsonLdContextNormalized(contextRaw);\n }\n /**\n * Get the context at the given path.\n * Non-propagating contexts will be skipped,\n * unless the context at that exact depth is retrieved.\n *\n * This ONLY takes into account context propagation logic,\n * so this should usually not be called directly,\n * call {@link #getContext} instead.\n *\n * @param keys The path of keys to get the context at.\n * @return {Promise<{ context: JsonLdContextNormalized, depth: number }>} A context and its depth.\n */\n async getContextPropagationAware(keys) {\n const originalDepth = keys.length;\n let contextData = null;\n let hasApplicablePropertyScopedContext;\n do {\n hasApplicablePropertyScopedContext = false;\n if (contextData && '@__propagateFallback' in contextData.context.getContextRaw()) {\n // If a propagation fallback context has been set,\n // fallback to that context and retry for the same depth.\n contextData.context = new jsonld_context_parser_1.JsonLdContextNormalized(contextData.context.getContextRaw()['@__propagateFallback']);\n }\n else {\n if (contextData) {\n // If we had a previous iteration, jump to the parent of context depth.\n // We must do this because once we get here, last context had propagation disabled,\n // so we check its first parent instead.\n keys = keys.slice(0, contextData.depth - 1);\n }\n contextData = await this.contextTree.getContext(keys) || { context: await this.rootContext, depth: 0 };\n }\n // Allow non-propagating contexts to propagate one level deeper\n // if it defines a property-scoped context that is applicable for the current key.\n // @see https://w3c.github.io/json-ld-api/tests/toRdf-manifest#tc012\n const lastKey = keys[keys.length - 1];\n if (lastKey in contextData.context.getContextRaw()) {\n const lastKeyValue = contextData.context.getContextRaw()[lastKey];\n if (lastKeyValue && typeof lastKeyValue === 'object' && '@context' in lastKeyValue) {\n hasApplicablePropertyScopedContext = true;\n }\n }\n } while (contextData.depth > 0 // Root context has a special case\n && contextData.context.getContextRaw()['@propagate'] === false // Stop loop if propagation is true\n && contextData.depth !== originalDepth // Stop loop if requesting exact depth of non-propagating\n && !hasApplicablePropertyScopedContext);\n // Special case for root context that does not allow propagation.\n // Fallback to empty context in that case.\n if (contextData.depth === 0\n && contextData.context.getContextRaw()['@propagate'] === false\n && contextData.depth !== originalDepth) {\n contextData.context = new jsonld_context_parser_1.JsonLdContextNormalized({});\n }\n return contextData;\n }\n /**\n * Start a new job for parsing the given value.\n * @param {any[]} keys The stack of keys.\n * @param value The value to parse.\n * @param {number} depth The depth to parse at.\n * @param {boolean} lastDepthCheck If the lastDepth check should be done for buffer draining.\n * @return {Promise} A promise resolving when the job is done.\n */\n async newOnValueJob(keys, value, depth, lastDepthCheck) {\n await this.parser.newOnValueJob(keys, value, depth, lastDepthCheck);\n }\n /**\n * Flush the pending container flush buffers\n * @return {boolean} If any pending buffers were flushed.\n */\n async handlePendingContainerFlushBuffers() {\n if (this.pendingContainerFlushBuffers.length > 0) {\n for (const pendingFlushBuffer of this.pendingContainerFlushBuffers) {\n await this.parser.flushBuffer(pendingFlushBuffer.depth, pendingFlushBuffer.keys);\n this.parser.flushStacks(pendingFlushBuffer.depth);\n }\n this.pendingContainerFlushBuffers.splice(0, this.pendingContainerFlushBuffers.length);\n return true;\n }\n else {\n return false;\n }\n }\n /**\n * Emit the given quad into the output stream.\n * @param {number} depth The depth the quad was generated at.\n * @param {Quad} quad A quad to emit.\n */\n emitQuad(depth, quad) {\n if (depth === 1) {\n this.topLevelProperties = true;\n }\n this.parser.push(quad);\n }\n /**\n * Emit the given error into the output stream.\n * @param {Error} error An error to emit.\n */\n emitError(error) {\n this.parser.emit('error', error);\n }\n /**\n * Emit the given context into the output stream under the 'context' event.\n * @param {JsonLdContext} context A context to emit.\n */\n emitContext(context) {\n this.parser.emit('context', context);\n }\n /**\n * Safely get or create the depth value of {@link ParsingContext.unidentifiedValuesBuffer}.\n * @param {number} depth A depth.\n * @return {{predicate: Term; object: Term; reverse: boolean}[]} An element of\n * {@link ParsingContext.unidentifiedValuesBuffer}.\n */\n getUnidentifiedValueBufferSafe(depth) {\n let buffer = this.unidentifiedValuesBuffer[depth];\n if (!buffer) {\n buffer = [];\n this.unidentifiedValuesBuffer[depth] = buffer;\n }\n return buffer;\n }\n /**\n * Safely get or create the depth value of {@link ParsingContext.unidentifiedGraphsBuffer}.\n * @param {number} depth A depth.\n * @return {{predicate: Term; object: Term; reverse: boolean}[]} An element of\n * {@link ParsingContext.unidentifiedGraphsBuffer}.\n */\n getUnidentifiedGraphBufferSafe(depth) {\n let buffer = this.unidentifiedGraphsBuffer[depth];\n if (!buffer) {\n buffer = [];\n this.unidentifiedGraphsBuffer[depth] = buffer;\n }\n return buffer;\n }\n /**\n * Safely get or create the depth value of {@link ParsingContext.annotationsBuffer}.\n * @param {number} depth A depth.\n * @return {} An element of {@link ParsingContext.annotationsBuffer}.\n */\n getAnnotationsBufferSafe(depth) {\n let buffer = this.annotationsBuffer[depth];\n if (!buffer) {\n buffer = [];\n this.annotationsBuffer[depth] = buffer;\n }\n return buffer;\n }\n /**\n * @return IExpandOptions The expand options for the active processing mode.\n */\n getExpandOptions() {\n return ParsingContext.EXPAND_OPTIONS[this.activeProcessingMode];\n }\n /**\n * Shift the stack at the given offset to the given depth.\n *\n * This will override anything in the stack at `depth`,\n * and this will remove anything at `depth + depthOffset`\n *\n * @param depth The target depth.\n * @param depthOffset The origin depth, relative to `depth`.\n */\n shiftStack(depth, depthOffset) {\n // Copy the id stack value up one level so that the next job can access the id.\n const deeperIdStack = this.idStack[depth + depthOffset];\n if (deeperIdStack) {\n this.idStack[depth] = deeperIdStack;\n this.emittedStack[depth] = true;\n delete this.idStack[depth + depthOffset];\n }\n // Shorten key stack\n if (this.pendingContainerFlushBuffers.length) {\n for (const buffer of this.pendingContainerFlushBuffers) {\n if (buffer.depth >= depth + depthOffset) {\n buffer.depth -= depthOffset;\n buffer.keys.splice(depth, depthOffset);\n }\n }\n }\n // Splice stacks\n if (this.unidentifiedValuesBuffer[depth + depthOffset]) {\n this.unidentifiedValuesBuffer[depth] = this.unidentifiedValuesBuffer[depth + depthOffset];\n delete this.unidentifiedValuesBuffer[depth + depthOffset];\n }\n if (this.annotationsBuffer[depth + depthOffset - 1]) {\n if (!this.annotationsBuffer[depth - 1]) {\n this.annotationsBuffer[depth - 1] = [];\n }\n this.annotationsBuffer[depth - 1] = [\n ...this.annotationsBuffer[depth - 1],\n ...this.annotationsBuffer[depth + depthOffset - 1],\n ];\n delete this.annotationsBuffer[depth + depthOffset - 1];\n }\n // TODO: also do the same for other stacks\n }\n}\nParsingContext.EXPAND_OPTIONS = {\n 1.0: {\n allowPrefixForcing: false,\n allowPrefixNonGenDelims: false,\n allowVocabRelativeToBase: false,\n },\n 1.1: {\n allowPrefixForcing: true,\n allowPrefixNonGenDelims: false,\n allowVocabRelativeToBase: true,\n },\n};\nexports.ParsingContext = ParsingContext;\n//# sourceMappingURL=ParsingContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Util = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst EntryHandlerContainer_1 = require(\"./entryhandler/EntryHandlerContainer\");\n// tslint:disable-next-line:no-var-requires\nconst canonicalizeJson = require('canonicalize');\n/**\n * Utility functions and methods.\n */\nclass Util {\n constructor(options) {\n this.parsingContext = options.parsingContext;\n this.dataFactory = options.dataFactory || new rdf_data_factory_1.DataFactory();\n this.rdfFirst = this.dataFactory.namedNode(Util.RDF + 'first');\n this.rdfRest = this.dataFactory.namedNode(Util.RDF + 'rest');\n this.rdfNil = this.dataFactory.namedNode(Util.RDF + 'nil');\n this.rdfType = this.dataFactory.namedNode(Util.RDF + 'type');\n this.rdfJson = this.dataFactory.namedNode(Util.RDF + 'JSON');\n }\n /**\n * Helper function to get the value of a context entry,\n * or fallback to a certain value.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} contextKey A pre-defined JSON-LD key in context entries.\n * @param {string} key A context entry key.\n * @param {string} fallback A fallback value for when the given contextKey\n * could not be found in the value with the given key.\n * @return {string} The value of the given contextKey in the entry behind key in the given context,\n * or the given fallback value.\n */\n static getContextValue(context, contextKey, key, fallback) {\n const entry = context.getContextRaw()[key];\n if (!entry) {\n return fallback;\n }\n const type = entry[contextKey];\n return type === undefined ? fallback : type;\n }\n /**\n * Get the container type of the given key in the context.\n *\n * Should any context-scoping bugs should occur related to this in the future,\n * it may be required to increase the offset from the depth at which the context is retrieved by one (to 2).\n * This is because containers act 2 levels deep.\n *\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key A context entry key.\n * @return {string} The container type.\n */\n static getContextValueContainer(context, key) {\n return Util.getContextValue(context, '@container', key, { '@set': true });\n }\n /**\n * Get the value type of the given key in the context.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key A context entry key.\n * @return {string} The node type.\n */\n static getContextValueType(context, key) {\n const valueType = Util.getContextValue(context, '@type', key, null);\n if (valueType === '@none') {\n return null;\n }\n return valueType;\n }\n /**\n * Get the language of the given key in the context.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key A context entry key.\n * @return {string} The node type.\n */\n static getContextValueLanguage(context, key) {\n return Util.getContextValue(context, '@language', key, context.getContextRaw()['@language'] || null);\n }\n /**\n * Get the direction of the given key in the context.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key A context entry key.\n * @return {string} The node type.\n */\n static getContextValueDirection(context, key) {\n return Util.getContextValue(context, '@direction', key, context.getContextRaw()['@direction'] || null);\n }\n /**\n * Check if the given key in the context is a reversed property.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key A context entry key.\n * @return {boolean} If the context value has a @reverse key.\n */\n static isContextValueReverse(context, key) {\n return !!Util.getContextValue(context, '@reverse', key, null);\n }\n /**\n * Get the @index of the given key in the context.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key A context entry key.\n * @return {string} The index.\n */\n static getContextValueIndex(context, key) {\n return Util.getContextValue(context, '@index', key, context.getContextRaw()['@index'] || null);\n }\n /**\n * Check if the given key refers to a reversed property.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key The property key.\n * @param {string} parentKey The parent key.\n * @return {boolean} If the property must be reversed.\n */\n static isPropertyReverse(context, key, parentKey) {\n // '!==' is needed because reversed properties in a @reverse container should cancel each other out.\n return parentKey === '@reverse' !== Util.isContextValueReverse(context, key);\n }\n /**\n * Check if the given key exists inside an embedded node as direct child.\n * @param {string} parentKey The parent key.\n * @return {boolean} If the property is embedded.\n */\n static isPropertyInEmbeddedNode(parentKey) {\n return parentKey === '@id';\n }\n /**\n * Check if the given key exists inside an annotation object as direct child.\n * @param {string} parentKey The parent key.\n * @return {boolean} If the property is an annotation.\n */\n static isPropertyInAnnotationObject(parentKey) {\n return parentKey === '@annotation';\n }\n /**\n * Check if the given IRI is valid.\n * @param {string} iri A potential IRI.\n * @return {boolean} If the given IRI is valid.\n */\n static isValidIri(iri) {\n return iri !== null && jsonld_context_parser_1.Util.isValidIri(iri);\n }\n /**\n * Check if the given first array (needle) is a prefix of the given second array (haystack).\n * @param needle An array to check if it is a prefix.\n * @param haystack An array to look in.\n */\n static isPrefixArray(needle, haystack) {\n if (needle.length > haystack.length) {\n return false;\n }\n for (let i = 0; i < needle.length; i++) {\n if (needle[i] !== haystack[i]) {\n return false;\n }\n }\n return true;\n }\n /**\n * Make sure that @id-@index pairs are equal over all array values.\n * Reject otherwise.\n * @param {any[]} value An array value.\n * @return {Promise} A promise rejecting if conflicts are present.\n */\n async validateValueIndexes(value) {\n if (this.parsingContext.validateValueIndexes) {\n const indexHashes = {};\n for (const entry of value) {\n if (entry && typeof entry === 'object') {\n const id = entry['@id'];\n const index = entry['@index'];\n if (id && index) {\n const existingIndexValue = indexHashes[id];\n if (existingIndexValue && existingIndexValue !== index) {\n throw new jsonld_context_parser_1.ErrorCoded(`Conflicting @index value for ${id}`, jsonld_context_parser_1.ERROR_CODES.CONFLICTING_INDEXES);\n }\n indexHashes[id] = index;\n }\n }\n }\n }\n }\n /**\n * Convert a given JSON value to an RDF term.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key The current JSON key.\n * @param value A JSON value.\n * @param {number} depth The depth the value is at.\n * @param {string[]} keys The path of keys.\n * @return {Promise} An RDF term array.\n */\n async valueToTerm(context, key, value, depth, keys) {\n // Skip further processing if we have an @type: @json\n if (Util.getContextValueType(context, key) === '@json') {\n return [this.dataFactory.literal(this.valueToJsonString(value), this.rdfJson)];\n }\n const type = typeof value;\n switch (type) {\n case 'object':\n // Skip if we have a null or undefined object\n if (value === null || value === undefined) {\n return [];\n }\n // Special case for arrays\n if (Array.isArray(value)) {\n // We handle arrays at value level so we can emit earlier, so this is handled already when we get here.\n // Empty context-based lists are emitted at this place, because our streaming algorithm doesn't detect those.\n if ('@list' in Util.getContextValueContainer(context, key)) {\n if (value.length === 0) {\n return [this.rdfNil];\n }\n else {\n return this.parsingContext.idStack[depth + 1] || [];\n }\n }\n await this.validateValueIndexes(value);\n return [];\n }\n // Handle property-scoped contexts\n context = await this.getContextSelfOrPropertyScoped(context, key);\n // Handle local context in the value\n if ('@context' in value) {\n context = await this.parsingContext.parseContext(value['@context'], (await this.parsingContext.getContext(keys, 0)).getContextRaw());\n }\n // In all other cases, we have a hash\n value = await this.unaliasKeywords(value, keys, depth, context); // Un-alias potential keywords in this hash\n if ('@value' in value) {\n let val;\n let valueLanguage;\n let valueDirection;\n let valueType;\n let valueIndex; // We don't use the index, but we need to check its type for spec-compliance\n for (key in value) {\n const subValue = value[key];\n switch (key) {\n case '@value':\n val = subValue;\n break;\n case '@language':\n valueLanguage = subValue;\n break;\n case '@direction':\n valueDirection = subValue;\n break;\n case '@type':\n valueType = subValue;\n break;\n case '@index':\n valueIndex = subValue;\n break;\n case '@annotation':\n // This keyword is allowed, but is processed like normal nodes\n break;\n default:\n throw new jsonld_context_parser_1.ErrorCoded(`Unknown value entry '${key}' in @value: ${JSON.stringify(value)}`, jsonld_context_parser_1.ERROR_CODES.INVALID_VALUE_OBJECT);\n }\n }\n // Skip further processing if we have an @type: @json\n if (await this.unaliasKeyword(valueType, keys, depth, true, context) === '@json') {\n return [this.dataFactory.literal(this.valueToJsonString(val), this.rdfJson)];\n }\n // Validate @value\n if (val === null) {\n return [];\n }\n if (typeof val === 'object') {\n throw new jsonld_context_parser_1.ErrorCoded(`The value of an '@value' can not be an object, got '${JSON.stringify(val)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_VALUE_OBJECT_VALUE);\n }\n // Validate @index\n if (this.parsingContext.validateValueIndexes && valueIndex && typeof valueIndex !== 'string') {\n throw new jsonld_context_parser_1.ErrorCoded(`The value of an '@index' must be a string, got '${JSON.stringify(valueIndex)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_INDEX_VALUE);\n }\n // Validate @language and @direction\n if (valueLanguage) {\n if (typeof val !== 'string') {\n throw new jsonld_context_parser_1.ErrorCoded(`When an '@language' is set, the value of '@value' must be a string, got '${JSON.stringify(val)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_LANGUAGE_TAGGED_VALUE);\n }\n if (!jsonld_context_parser_1.ContextParser.validateLanguage(valueLanguage, this.parsingContext.strictValues, jsonld_context_parser_1.ERROR_CODES.INVALID_LANGUAGE_TAGGED_STRING)) {\n return [];\n }\n // Language tags are always normalized to lowercase in 1.0.\n if (this.parsingContext.normalizeLanguageTags || this.parsingContext.activeProcessingMode === 1.0) {\n valueLanguage = valueLanguage.toLowerCase();\n }\n }\n if (valueDirection) {\n if (typeof val !== 'string') {\n throw new Error(`When an '@direction' is set, the value of '@value' must be a string, got '${JSON.stringify(val)}'`);\n }\n if (!jsonld_context_parser_1.ContextParser.validateDirection(valueDirection, this.parsingContext.strictValues)) {\n return [];\n }\n }\n // Check @language and @direction\n if (valueLanguage && valueDirection && this.parsingContext.rdfDirection) {\n if (valueType) {\n throw new jsonld_context_parser_1.ErrorCoded(`Can not have '@language', '@direction' and '@type' in a value: '${JSON\n .stringify(value)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_VALUE_OBJECT);\n }\n return this.nullableTermToArray(this\n .createLanguageDirectionLiteral(depth, val, valueLanguage, valueDirection));\n }\n else if (valueLanguage) { // Check @language\n if (valueType) {\n throw new jsonld_context_parser_1.ErrorCoded(`Can not have both '@language' and '@type' in a value: '${JSON.stringify(value)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_VALUE_OBJECT);\n }\n return [this.dataFactory.literal(val, valueLanguage)];\n }\n else if (valueDirection && this.parsingContext.rdfDirection) { // Check @direction\n if (valueType) {\n throw new jsonld_context_parser_1.ErrorCoded(`Can not have both '@direction' and '@type' in a value: '${JSON.stringify(value)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_VALUE_OBJECT);\n }\n return this.nullableTermToArray(this\n .createLanguageDirectionLiteral(depth, val, valueLanguage, valueDirection));\n }\n else if (valueType) { // Validate @type\n if (typeof valueType !== 'string') {\n throw new jsonld_context_parser_1.ErrorCoded(`The value of an '@type' must be a string, got '${JSON.stringify(valueType)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_TYPED_VALUE);\n }\n const typeTerm = this.createVocabOrBaseTerm(context, valueType);\n if (!typeTerm) {\n throw new jsonld_context_parser_1.ErrorCoded(`Invalid '@type' value, got '${JSON.stringify(valueType)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_TYPED_VALUE);\n }\n if (typeTerm.termType !== 'NamedNode') {\n throw new jsonld_context_parser_1.ErrorCoded(`Illegal value type (${typeTerm.termType}): ${valueType}`, jsonld_context_parser_1.ERROR_CODES.INVALID_TYPED_VALUE);\n }\n return [this.dataFactory.literal(val, typeTerm)];\n }\n // We don't pass the context, because context-based things like @language should be ignored\n return await this.valueToTerm(new jsonld_context_parser_1.JsonLdContextNormalized({}), key, val, depth, keys);\n }\n else if ('@set' in value) {\n // No other entries are allow in this value\n if (Object.keys(value).length > 1) {\n throw new jsonld_context_parser_1.ErrorCoded(`Found illegal neighbouring entries next to @set for key: '${key}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);\n }\n // No need to do anything here, this is handled at the deeper level.\n return [];\n }\n else if ('@list' in value) {\n // No other entries are allowed in this value\n if (Object.keys(value).length > 1) {\n throw new jsonld_context_parser_1.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${key}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);\n }\n const listValue = value[\"@list\"];\n // We handle lists at value level so we can emit earlier, so this is handled already when we get here.\n // Empty anonymous lists are emitted at this place, because our streaming algorithm doesn't detect those.\n if (Array.isArray(listValue)) {\n if (listValue.length === 0) {\n return [this.rdfNil];\n }\n else {\n return this.parsingContext.idStack[depth + 1] || [];\n }\n }\n else {\n // We only have a single list element here, so emit this directly as single element\n return await this.valueToTerm(await this.parsingContext.getContext(keys), key, listValue, depth - 1, keys.slice(0, -1));\n }\n }\n else if ('@reverse' in value && typeof value['@reverse'] === 'boolean') {\n // We handle reverse properties at value level so we can emit earlier,\n // so this is handled already when we get here.\n return [];\n }\n else if ('@graph' in Util.getContextValueContainer(await this.parsingContext.getContext(keys), key)) {\n // We are processing a graph container\n const graphContainerEntries = this.parsingContext.graphContainerTermStack[depth + 1];\n return graphContainerEntries ? Object.values(graphContainerEntries) : [this.dataFactory.blankNode()];\n }\n else if (\"@id\" in value) {\n // Use deeper context if the value node contains other properties next to @id.\n if (Object.keys(value).length > 1) {\n context = await this.parsingContext.getContext(keys, 0);\n }\n // Handle local context in the value\n if ('@context' in value) {\n context = await this.parsingContext.parseContext(value['@context'], context.getContextRaw());\n }\n if (value[\"@type\"] === '@vocab') {\n return this.nullableTermToArray(this.createVocabOrBaseTerm(context, value[\"@id\"]));\n }\n else {\n const valueId = value[\"@id\"];\n let valueTerm;\n if (typeof valueId === 'object') {\n if (this.parsingContext.rdfstar) {\n valueTerm = this.parsingContext.idStack[depth + 1][0];\n }\n else {\n throw new jsonld_context_parser_1.ErrorCoded(`Found illegal @id '${value}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_ID_VALUE);\n }\n }\n else {\n valueTerm = this.resourceToTerm(context, valueId);\n }\n return this.nullableTermToArray(valueTerm);\n }\n }\n else {\n // Only make a blank node if at least one triple was emitted at the value's level.\n if (this.parsingContext.emittedStack[depth + 1]\n || (value && typeof value === 'object' && Object.keys(value).length === 0)) {\n return (this.parsingContext.idStack[depth + 1]\n || (this.parsingContext.idStack[depth + 1] = [this.dataFactory.blankNode()]));\n }\n else {\n return [];\n }\n }\n case 'string':\n return this.nullableTermToArray(this.stringValueToTerm(depth, await this.getContextSelfOrPropertyScoped(context, key), key, value, null));\n case 'boolean':\n return this.nullableTermToArray(this.stringValueToTerm(depth, await this.getContextSelfOrPropertyScoped(context, key), key, Boolean(value).toString(), this.dataFactory.namedNode(Util.XSD_BOOLEAN)));\n case 'number':\n return this.nullableTermToArray(this.stringValueToTerm(depth, await this.getContextSelfOrPropertyScoped(context, key), key, value, this.dataFactory.namedNode(value % 1 === 0 && value < 1e21 ? Util.XSD_INTEGER : Util.XSD_DOUBLE)));\n default:\n this.parsingContext.emitError(new Error(`Could not determine the RDF type of a ${type}`));\n return [];\n }\n }\n /**\n * If the context defines a property-scoped context for the given key,\n * that context will be returned.\n * Otherwise, the given context will be returned as-is.\n *\n * This should be used for valueToTerm cases that are not objects.\n * @param context A context.\n * @param key A JSON key.\n */\n async getContextSelfOrPropertyScoped(context, key) {\n const contextKeyEntry = context.getContextRaw()[key];\n if (contextKeyEntry && typeof contextKeyEntry === 'object' && '@context' in contextKeyEntry) {\n context = await this.parsingContext.parseContext(contextKeyEntry, context.getContextRaw(), true);\n }\n return context;\n }\n /**\n * If the given term is null, return an empty array, otherwise return an array with the single given term.\n * @param term A term.\n */\n nullableTermToArray(term) {\n return term ? [term] : [];\n }\n /**\n * Convert a given JSON key to an RDF predicate term,\n * based on @vocab.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param key A JSON key.\n * @return {RDF.NamedNode} An RDF named node.\n */\n predicateToTerm(context, key) {\n const expanded = context.expandTerm(key, true, this.parsingContext.getExpandOptions());\n // Immediately return if the predicate was disabled in the context\n if (!expanded) {\n return null;\n }\n // Check if the predicate is a blank node\n if (expanded[0] === '_' && expanded[1] === ':') {\n if (this.parsingContext.produceGeneralizedRdf) {\n return this.dataFactory.blankNode(expanded.substr(2));\n }\n else {\n return null;\n }\n }\n // Check if the predicate is a valid IRI\n if (Util.isValidIri(expanded)) {\n return this.dataFactory.namedNode(expanded);\n }\n else {\n if (expanded && this.parsingContext.strictValues) {\n this.parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Invalid predicate IRI: ${expanded}`, jsonld_context_parser_1.ERROR_CODES.INVALID_IRI_MAPPING));\n }\n else {\n return null;\n }\n }\n return null;\n }\n /**\n * Convert a given JSON key to an RDF resource term or blank node,\n * based on @base.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param key A JSON key.\n * @return {RDF.NamedNode} An RDF named node or null.\n */\n resourceToTerm(context, key) {\n if (key.startsWith('_:')) {\n return this.dataFactory.blankNode(key.substr(2));\n }\n const iri = context.expandTerm(key, false, this.parsingContext.getExpandOptions());\n if (!Util.isValidIri(iri)) {\n if (iri && this.parsingContext.strictValues) {\n this.parsingContext.emitError(new Error(`Invalid resource IRI: ${iri}`));\n }\n else {\n return null;\n }\n }\n return this.dataFactory.namedNode(iri);\n }\n /**\n * Convert a given JSON key to an RDF resource term.\n * It will do this based on the @vocab,\n * and fallback to @base.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param key A JSON key.\n * @return {RDF.NamedNode} An RDF named node or null.\n */\n createVocabOrBaseTerm(context, key) {\n if (key.startsWith('_:')) {\n return this.dataFactory.blankNode(key.substr(2));\n }\n const expandOptions = this.parsingContext.getExpandOptions();\n let expanded = context.expandTerm(key, true, expandOptions);\n if (expanded === key) {\n expanded = context.expandTerm(key, false, expandOptions);\n }\n if (!Util.isValidIri(expanded)) {\n if (expanded && this.parsingContext.strictValues && !expanded.startsWith('@')) {\n this.parsingContext.emitError(new Error(`Invalid term IRI: ${expanded}`));\n }\n else {\n return null;\n }\n }\n return this.dataFactory.namedNode(expanded);\n }\n /**\n * Ensure that the given value becomes a string.\n * @param {string | number} value A string or number.\n * @param {NamedNode} datatype The intended datatype.\n * @return {string} The returned string.\n */\n intToString(value, datatype) {\n if (typeof value === 'number') {\n if (Number.isFinite(value)) {\n const isInteger = value % 1 === 0;\n if (isInteger && (!datatype || datatype.value !== Util.XSD_DOUBLE)) {\n return Number(value).toString();\n }\n else {\n return value.toExponential(15).replace(/(\\d)0*e\\+?/, '$1E');\n }\n }\n else {\n return value > 0 ? 'INF' : '-INF';\n }\n }\n else {\n return value;\n }\n }\n /**\n * Convert a given JSON string value to an RDF term.\n * @param {number} depth The current stack depth.\n * @param {JsonLdContextNormalized} context A JSON-LD context.\n * @param {string} key The current JSON key.\n * @param {string} value A JSON value.\n * @param {NamedNode} defaultDatatype The default datatype for the given value.\n * @return {RDF.Term} An RDF term or null.\n */\n stringValueToTerm(depth, context, key, value, defaultDatatype) {\n // Check the datatype from the context\n const contextType = Util.getContextValueType(context, key);\n if (contextType) {\n if (contextType === '@id') {\n if (!defaultDatatype) {\n return this.resourceToTerm(context, this.intToString(value, defaultDatatype));\n }\n }\n else if (contextType === '@vocab') {\n if (!defaultDatatype) {\n return this.createVocabOrBaseTerm(context, this.intToString(value, defaultDatatype));\n }\n }\n else {\n defaultDatatype = this.dataFactory.namedNode(contextType);\n }\n }\n // If we don't find such a datatype, check the language from the context\n if (!defaultDatatype) {\n const contextLanguage = Util.getContextValueLanguage(context, key);\n const contextDirection = Util.getContextValueDirection(context, key);\n if (contextDirection && this.parsingContext.rdfDirection) {\n return this.createLanguageDirectionLiteral(depth, this.intToString(value, defaultDatatype), contextLanguage, contextDirection);\n }\n else {\n return this.dataFactory.literal(this.intToString(value, defaultDatatype), contextLanguage);\n }\n }\n // If all else fails, make a literal based on the default content type\n return this.dataFactory.literal(this.intToString(value, defaultDatatype), defaultDatatype);\n }\n /**\n * Create a literal for the given value with the given language and direction.\n * Auxiliary quads may be emitted.\n * @param {number} depth The current stack depth.\n * @param {string} value A string value.\n * @param {string} language A language tag.\n * @param {string} direction A direction.\n * @return {Term} An RDF term.\n */\n createLanguageDirectionLiteral(depth, value, language, direction) {\n if (this.parsingContext.rdfDirection === 'i18n-datatype') {\n // Create a datatyped literal, by encoding the language and direction into https://www.w3.org/ns/i18n#.\n if (!language) {\n language = '';\n }\n return this.dataFactory.literal(value, this.dataFactory.namedNode(`https://www.w3.org/ns/i18n#${language}_${direction}`));\n }\n else {\n // Reify the literal.\n const valueNode = this.dataFactory.blankNode();\n const graph = this.getDefaultGraph();\n this.parsingContext.emitQuad(depth, this.dataFactory.quad(valueNode, this.dataFactory.namedNode(Util.RDF + 'value'), this.dataFactory.literal(value), graph));\n if (language) {\n this.parsingContext.emitQuad(depth, this.dataFactory.quad(valueNode, this.dataFactory.namedNode(Util.RDF + 'language'), this.dataFactory.literal(language), graph));\n }\n this.parsingContext.emitQuad(depth, this.dataFactory.quad(valueNode, this.dataFactory.namedNode(Util.RDF + 'direction'), this.dataFactory.literal(direction), graph));\n return valueNode;\n }\n }\n /**\n * Stringify the given JSON object to a canonical JSON string.\n * @param value Any valid JSON value.\n * @return {string} A canonical JSON string.\n */\n valueToJsonString(value) {\n return canonicalizeJson(value);\n }\n /**\n * If the key is not a keyword, try to check if it is an alias for a keyword,\n * and if so, un-alias it.\n * @param {string} key A key, can be falsy.\n * @param {string[]} keys The path of keys.\n * @param {number} depth The depth to\n * @param {boolean} disableCache If the cache should be disabled\n * @param {JsonLdContextNormalized} context A context to unalias with,\n * will fallback to retrieving the context for the given keys.\n * @return {Promise} A promise resolving to the key itself, or another key.\n */\n async unaliasKeyword(key, keys, depth, disableCache, context) {\n // Numbers can not be an alias\n if (Number.isInteger(key)) {\n return key;\n }\n // Try to grab from cache if it was already un-aliased before.\n if (!disableCache) {\n const cachedUnaliasedKeyword = this.parsingContext.unaliasedKeywordCacheStack[depth];\n if (cachedUnaliasedKeyword) {\n return cachedUnaliasedKeyword;\n }\n }\n if (!jsonld_context_parser_1.Util.isPotentialKeyword(key)) {\n context = context || await this.parsingContext.getContext(keys);\n let unliased = context.getContextRaw()[key];\n if (unliased && typeof unliased === 'object') {\n unliased = unliased['@id'];\n }\n if (jsonld_context_parser_1.Util.isValidKeyword(unliased)) {\n key = unliased;\n }\n }\n return disableCache ? key : (this.parsingContext.unaliasedKeywordCacheStack[depth] = key);\n }\n /**\n * Unalias the keyword of the parent.\n * This adds a safety check if no parent exist.\n * @param {any[]} keys A stack of keys.\n * @param {number} depth The current depth.\n * @return {Promise} A promise resolving to the parent key, or another key.\n */\n async unaliasKeywordParent(keys, depth) {\n return await this.unaliasKeyword(depth > 0 && keys[depth - 1], keys, depth - 1);\n }\n /**\n * Un-alias all keywords in the given hash.\n * @param {{[p: string]: any}} hash A hash object.\n * @param {string[]} keys The path of keys.\n * @param {number} depth The depth.\n * @param {JsonLdContextNormalized} context A context to unalias with,\n * will fallback to retrieving the context for the given keys.\n * @return {Promise<{[p: string]: any}>} A promise resolving to the new hash.\n */\n async unaliasKeywords(hash, keys, depth, context) {\n const newHash = {};\n for (const key in hash) {\n newHash[await this.unaliasKeyword(key, keys, depth + 1, true, context)] = hash[key];\n }\n return newHash;\n }\n /**\n * Check if we are processing a literal (including JSON literals) at the given depth.\n * This will also check higher levels,\n * because if a parent is a literal,\n * then the deeper levels are definitely a literal as well.\n * @param {any[]} keys The keys.\n * @param {number} depth The depth.\n * @return {boolean} If we are processing a literal.\n */\n async isLiteral(keys, depth) {\n for (let i = depth; i >= 0; i--) {\n if (await this.unaliasKeyword(keys[i], keys, i) === '@annotation') {\n // Literals may have annotations, which require processing of inner nodes.\n return false;\n }\n if (this.parsingContext.literalStack[i] || this.parsingContext.jsonLiteralStack[i]) {\n return true;\n }\n }\n return false;\n }\n /**\n * Check how many parents should be skipped for checking the @graph for the given node.\n *\n * @param {number} depth The depth of the node.\n * @param {any[]} keys An array of keys.\n * @return {number} The graph depth offset.\n */\n async getDepthOffsetGraph(depth, keys) {\n for (let i = depth - 1; i > 0; i--) {\n if (await this.unaliasKeyword(keys[i], keys, i) === '@graph') {\n // Skip further processing if we are already in an @graph-@id or @graph-@index container\n const containers = (await EntryHandlerContainer_1.EntryHandlerContainer.getContainerHandler(this.parsingContext, keys, i)).containers;\n if (EntryHandlerContainer_1.EntryHandlerContainer.isComplexGraphContainer(containers)) {\n return -1;\n }\n return depth - i - 1;\n }\n }\n return -1;\n }\n /**\n * Check if the given subject is of a valid type.\n * This should be called when applying @reverse'd properties.\n * @param {Term} subject A subject.\n */\n validateReverseSubject(subject) {\n if (subject.termType === 'Literal') {\n throw new jsonld_context_parser_1.ErrorCoded(`Found illegal literal in subject position: ${subject.value}`, jsonld_context_parser_1.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE);\n }\n }\n /**\n * Get the default graph.\n * @return {Term} An RDF term.\n */\n getDefaultGraph() {\n return this.parsingContext.defaultGraph || this.dataFactory.defaultGraph();\n }\n /**\n * Get the current graph, while taking into account a graph that can be defined via @container: @graph.\n * If not within a graph container, the default graph will be returned.\n * @param keys The current keys.\n * @param depth The current depth.\n */\n async getGraphContainerValue(keys, depth) {\n // Default to default graph\n let graph = this.getDefaultGraph();\n // Check if we are in an @container: @graph.\n const { containers, depth: depthContainer } = await EntryHandlerContainer_1.EntryHandlerContainer\n .getContainerHandler(this.parsingContext, keys, depth);\n if ('@graph' in containers) {\n // Get the graph from the stack.\n const graphContainerIndex = EntryHandlerContainer_1.EntryHandlerContainer.getContainerGraphIndex(containers, depthContainer, keys);\n const entry = this.parsingContext.graphContainerTermStack[depthContainer];\n graph = entry ? entry[graphContainerIndex] : null;\n // Set the graph in the stack if none has been set yet.\n if (!graph) {\n let graphId = null;\n if ('@id' in containers) {\n const keyUnaliased = await this.getContainerKey(keys[depthContainer], keys, depthContainer);\n if (keyUnaliased !== null) {\n graphId = await this.resourceToTerm(await this.parsingContext.getContext(keys), keyUnaliased);\n }\n }\n if (!graphId) {\n graphId = this.dataFactory.blankNode();\n }\n if (!this.parsingContext.graphContainerTermStack[depthContainer]) {\n this.parsingContext.graphContainerTermStack[depthContainer] = {};\n }\n graph = this.parsingContext.graphContainerTermStack[depthContainer][graphContainerIndex] = graphId;\n }\n }\n return graph;\n }\n /**\n * Get the properties depth for retrieving properties.\n *\n * Typically, the properties depth will be identical to the given depth.\n *\n * The following exceptions apply:\n * * When the parent is @reverse, the depth is decremented by one.\n * * When @nest parents are found, the depth is decremented by the number of @nest parents.\n * If in combination with the exceptions above an intermediary array is discovered,\n * the depth is also decremented by this number of arrays.\n *\n * @param keys The current key chain.\n * @param depth The current depth.\n */\n async getPropertiesDepth(keys, depth) {\n let lastValidDepth = depth;\n for (let i = depth - 1; i > 0; i--) {\n if (typeof keys[i] !== 'number') { // Skip array keys\n const parentKey = await this.unaliasKeyword(keys[i], keys, i);\n if (parentKey === '@reverse') {\n return i;\n }\n else if (parentKey === '@nest') {\n lastValidDepth = i;\n }\n else {\n return lastValidDepth;\n }\n }\n }\n return lastValidDepth;\n }\n /**\n * Get the key for the current container entry.\n * @param key A key, can be falsy.\n * @param keys The key chain.\n * @param depth The current depth to get the key from.\n * @return Promise resolving to the key.\n * Null will be returned for @none entries, with aliasing taken into account.\n */\n async getContainerKey(key, keys, depth) {\n const keyUnaliased = await this.unaliasKeyword(key, keys, depth);\n return keyUnaliased === '@none' ? null : keyUnaliased;\n }\n /**\n * Check if no reverse properties are present in embedded nodes.\n * @param key The current key.\n * @param reverse If a reverse property is active.\n * @param isEmbedded If we're in an embedded node.\n */\n validateReverseInEmbeddedNode(key, reverse, isEmbedded) {\n if (isEmbedded && reverse && !this.parsingContext.rdfstarReverseInEmbedded) {\n throw new jsonld_context_parser_1.ErrorCoded(`Illegal reverse property in embedded node in ${key}`, jsonld_context_parser_1.ERROR_CODES.INVALID_EMBEDDED_NODE);\n }\n }\n /**\n * Emit a quad, with checks.\n * @param depth The current depth.\n * @param subject S\n * @param predicate P\n * @param object O\n * @param graph G\n * @param reverse If a reverse property is active.\n * @param isEmbedded If we're in an embedded node.\n */\n emitQuadChecked(depth, subject, predicate, object, graph, reverse, isEmbedded) {\n // Create a quad\n let quad;\n if (reverse) {\n this.validateReverseSubject(object);\n quad = this.dataFactory.quad(object, predicate, subject, graph);\n }\n else {\n quad = this.dataFactory.quad(subject, predicate, object, graph);\n }\n // Emit the quad, unless it was created in an embedded node\n if (isEmbedded) {\n // Embedded nodes don't inherit the active graph\n if (quad.graph.termType !== 'DefaultGraph') {\n quad = this.dataFactory.quad(quad.subject, quad.predicate, quad.object);\n }\n // Multiple embedded nodes are not allowed\n if (this.parsingContext.idStack[depth - 1]) {\n throw new jsonld_context_parser_1.ErrorCoded(`Illegal multiple properties in an embedded node`, jsonld_context_parser_1.ERROR_CODES.INVALID_EMBEDDED_NODE);\n }\n this.parsingContext.idStack[depth - 1] = [quad];\n }\n else {\n this.parsingContext.emitQuad(depth, quad);\n }\n // Flush annotations\n const annotationsBuffer = this.parsingContext.annotationsBuffer[depth];\n if (annotationsBuffer) {\n for (const annotation of annotationsBuffer) {\n this.emitAnnotation(depth, quad, annotation);\n }\n delete this.parsingContext.annotationsBuffer[depth];\n }\n }\n // This is a separate function to enable recursion\n emitAnnotation(depth, quad, annotation) {\n // Construct annotation quad\n let annotationQuad;\n if (annotation.reverse) {\n this.validateReverseSubject(annotation.object);\n annotationQuad = this.dataFactory.quad(annotation.object, annotation.predicate, quad);\n }\n else {\n annotationQuad = this.dataFactory.quad(quad, annotation.predicate, annotation.object);\n }\n // Emit annotated quad\n this.parsingContext.emitQuad(depth, annotationQuad);\n // Also emit nested annotations\n for (const nestedAnnotation of annotation.nestedAnnotations) {\n this.emitAnnotation(depth, annotationQuad, nestedAnnotation);\n }\n }\n}\nUtil.XSD = 'http://www.w3.org/2001/XMLSchema#';\nUtil.XSD_BOOLEAN = Util.XSD + 'boolean';\nUtil.XSD_INTEGER = Util.XSD + 'integer';\nUtil.XSD_DOUBLE = Util.XSD + 'double';\nUtil.RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';\nexports.Util = Util;\n//# sourceMappingURL=Util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContainerHandlerIdentifier = void 0;\n/**\n * Container handler for @id.\n *\n * It assumes that the current key is the identifier of the current value.\n * This will add this value to the parent node.\n */\nclass ContainerHandlerIdentifier {\n canCombineWithGraph() {\n return true;\n }\n async handle(containers, parsingContext, util, keys, value, depth) {\n let id;\n // First check if the child node already has a defined id.\n if (parsingContext.emittedStack[depth + 1] && parsingContext.idStack[depth + 1]) {\n // Use the existing identifier\n id = parsingContext.idStack[depth + 1][0];\n }\n else {\n // Create the identifier\n const keyUnaliased = await util.getContainerKey(keys[depth], keys, depth);\n const maybeId = keyUnaliased !== null\n ? await util.resourceToTerm(await parsingContext.getContext(keys), keys[depth])\n : util.dataFactory.blankNode();\n // Do nothing if the id is invalid\n if (!maybeId) {\n parsingContext.emittedStack[depth] = false; // Don't emit the predicate owning this container.\n return;\n }\n id = maybeId;\n // Insert the id into the stack so that buffered children can make us of it.\n parsingContext.idStack[depth + 1] = [id];\n }\n // Insert the id into the stack so that parents can make use of it.\n // Insert it as an array because multiple id container entries may exist\n let ids = parsingContext.idStack[depth];\n if (!ids) {\n ids = parsingContext.idStack[depth] = [];\n }\n // Only insert the term if it does not exist yet in the array.\n if (!ids.some((term) => term.equals(id))) {\n ids.push(id);\n }\n // Flush any pending flush buffers\n if (!await parsingContext.handlePendingContainerFlushBuffers()) {\n parsingContext.emittedStack[depth] = false; // Don't emit the predicate owning this container.\n }\n }\n}\nexports.ContainerHandlerIdentifier = ContainerHandlerIdentifier;\n//# sourceMappingURL=ContainerHandlerIdentifier.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContainerHandlerIndex = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst EntryHandlerPredicate_1 = require(\"../entryhandler/EntryHandlerPredicate\");\nconst Util_1 = require(\"../Util\");\n/**\n * Container handler for @index.\n *\n * This will ignore the current key and add this entry to the parent node.\n */\nclass ContainerHandlerIndex {\n canCombineWithGraph() {\n return true;\n }\n async handle(containers, parsingContext, util, keys, value, depth) {\n if (!Array.isArray(value)) {\n const graphContainer = '@graph' in containers;\n // Check if the container is a property-based container by checking if there is a valid @index.\n const context = await parsingContext.getContext(keys);\n const indexKey = keys[depth - 1];\n const indexPropertyRaw = Util_1.Util.getContextValueIndex(context, indexKey);\n if (indexPropertyRaw) {\n // Validate the @index value\n if (jsonld_context_parser_1.Util.isPotentialKeyword(indexPropertyRaw)) {\n throw new jsonld_context_parser_1.ErrorCoded(`Keywords can not be used as @index value, got: ${indexPropertyRaw}`, jsonld_context_parser_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n if (typeof indexPropertyRaw !== 'string') {\n throw new jsonld_context_parser_1.ErrorCoded(`@index values must be strings, got: ${indexPropertyRaw}`, jsonld_context_parser_1.ERROR_CODES.INVALID_TERM_DEFINITION);\n }\n // When @index is used, values must be node values, unless @type: @id is defined in the context\n if (typeof value !== 'object') {\n // Error if we don't have @type: @id\n if (Util_1.Util.getContextValueType(context, indexKey) !== '@id') {\n throw new jsonld_context_parser_1.ErrorCoded(`Property-based index containers require nodes as values or strings with @type: @id, but got: ${value}`, jsonld_context_parser_1.ERROR_CODES.INVALID_VALUE_OBJECT);\n }\n // Add an @id to the stack, so our expanded @index value can make use of it\n const id = util.resourceToTerm(context, value);\n if (id) {\n parsingContext.idStack[depth + 1] = [id];\n }\n }\n // Expand the @index value\n const indexProperty = util.createVocabOrBaseTerm(context, indexPropertyRaw);\n if (indexProperty) {\n const indexValues = await util.valueToTerm(context, indexPropertyRaw, await util.getContainerKey(keys[depth], keys, depth), depth, keys);\n if (graphContainer) {\n // When we're in a graph container, attach the index to the graph identifier\n const graphId = await util.getGraphContainerValue(keys, depth + 1);\n for (const indexValue of indexValues) {\n parsingContext.emitQuad(depth, util.dataFactory.quad(graphId, indexProperty, indexValue, util.getDefaultGraph()));\n }\n }\n else {\n // Otherwise, attach the index to the node identifier\n for (const indexValue of indexValues) {\n await EntryHandlerPredicate_1.EntryHandlerPredicate.handlePredicateObject(parsingContext, util, keys, depth + 1, indexProperty, indexValue, false, false, false);\n }\n }\n }\n }\n const depthOffset = graphContainer ? 2 : 1;\n await parsingContext.newOnValueJob(keys.slice(0, keys.length - depthOffset), value, depth - depthOffset, true);\n // Flush any pending flush buffers\n await parsingContext.handlePendingContainerFlushBuffers();\n }\n parsingContext.emittedStack[depth] = false; // We have emitted a level higher\n }\n}\nexports.ContainerHandlerIndex = ContainerHandlerIndex;\n//# sourceMappingURL=ContainerHandlerIndex.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContainerHandlerLanguage = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\n/**\n * Container handler for @language.\n *\n * It assumes that the current key is the language of the current value.\n * This will add this value to the parent node.\n */\nclass ContainerHandlerLanguage {\n canCombineWithGraph() {\n return false;\n }\n async handle(containers, parsingContext, util, keys, value, depth) {\n const language = await util.getContainerKey(keys[depth], keys, depth);\n if (Array.isArray(value)) {\n // No type-checking needed, will be handled on each value when this handler is called recursively.\n value = value.map((subValue) => ({ '@value': subValue, '@language': language }));\n }\n else {\n if (typeof value !== 'string') {\n throw new jsonld_context_parser_1.ErrorCoded(`Got invalid language map value, got '${JSON.stringify(value)}', but expected string`, jsonld_context_parser_1.ERROR_CODES.INVALID_LANGUAGE_MAP_VALUE);\n }\n value = { '@value': value, '@language': language };\n }\n await parsingContext.newOnValueJob(keys.slice(0, keys.length - 1), value, depth - 1, true);\n parsingContext.emittedStack[depth] = false; // We have emitted a level higher\n }\n}\nexports.ContainerHandlerLanguage = ContainerHandlerLanguage;\n//# sourceMappingURL=ContainerHandlerLanguage.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ContainerHandlerType = void 0;\nconst EntryHandlerPredicate_1 = require(\"../entryhandler/EntryHandlerPredicate\");\nconst Util_1 = require(\"../Util\");\n/**\n * Container handler for @type.\n *\n * This will add this entry to the parent node, and use the current key as an rdf:type value.\n */\nclass ContainerHandlerType {\n canCombineWithGraph() {\n return false;\n }\n async handle(containers, parsingContext, util, keys, value, depth) {\n if (!Array.isArray(value)) {\n if (typeof value === 'string') {\n // Determine the @type of the container\n const context = await parsingContext.getContext(keys);\n const containerTypeType = Util_1.Util.getContextValueType(context, keys[depth - 1]);\n // String values refer to node references\n const id = containerTypeType === '@vocab'\n ? await util.createVocabOrBaseTerm(context, value)\n : await util.resourceToTerm(context, value);\n if (id) {\n // Handle the value of this node as @id, which will also cause the predicate from above to be emitted.\n const subValue = { '@id': id.termType === 'NamedNode' ? id.value : value };\n await parsingContext.newOnValueJob(keys.slice(0, keys.length - 1), subValue, depth - 1, true);\n // Set the id in the stack so it can be used for the rdf:type handling later on\n parsingContext.idStack[depth + 1] = [id];\n }\n }\n else {\n // Other values are handled by handling them as a proper job\n // Check needed for cases where entries don't have an explicit @id\n const entryHasIdentifier = !!parsingContext.idStack[depth + 1];\n // Handle the value of this node, which will also cause the predicate from above to be emitted.\n if (!entryHasIdentifier) {\n delete parsingContext.idStack[depth]; // Force new (blank node) identifier\n }\n await parsingContext.newOnValueJob(keys.slice(0, keys.length - 1), value, depth - 1, true);\n if (!entryHasIdentifier) {\n parsingContext.idStack[depth + 1] = parsingContext.idStack[depth]; // Copy the id to the child node, for @type\n }\n }\n // Identify the type to emit.\n const keyOriginal = await util.getContainerKey(keys[depth], keys, depth);\n const type = keyOriginal !== null\n ? util.createVocabOrBaseTerm(await parsingContext.getContext(keys), keyOriginal)\n : null;\n if (type) {\n // Push the type to the stack using the rdf:type predicate\n await EntryHandlerPredicate_1.EntryHandlerPredicate.handlePredicateObject(parsingContext, util, keys, depth + 1, util.rdfType, type, false, false, false);\n }\n // Flush any pending flush buffers\n await parsingContext.handlePendingContainerFlushBuffers();\n }\n parsingContext.emittedStack[depth] = false; // Don't emit the predicate owning this container.\n }\n}\nexports.ContainerHandlerType = ContainerHandlerType;\n//# sourceMappingURL=ContainerHandlerType.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerArrayValue = void 0;\nconst Util_1 = require(\"../Util\");\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\n/**\n * Handles values that are part of an array.\n */\nclass EntryHandlerArrayValue {\n isPropertyHandler() {\n return false;\n }\n isStackProcessor() {\n return true;\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n return this.test(parsingContext, util, null, keys, depth);\n }\n async test(parsingContext, util, key, keys, depth) {\n return typeof keys[depth] === 'number';\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n let parentKey = await util.unaliasKeywordParent(keys, depth);\n // Check if we have an anonymous list\n if (parentKey === '@list') {\n // Our value is part of an array\n // Determine the list root key\n let listRootKey = null;\n let listRootDepth = 0;\n for (let i = depth - 2; i > 0; i--) {\n const keyOption = keys[i];\n if (typeof keyOption === 'string' || typeof keyOption === 'number') {\n listRootDepth = i;\n listRootKey = keyOption;\n break;\n }\n }\n if (listRootKey !== null) {\n // Emit the given objects as list elements\n const values = await util.valueToTerm(await parsingContext.getContext(keys), listRootKey, value, depth, keys);\n for (const object of values) {\n await this.handleListElement(parsingContext, util, object, value, depth, keys.slice(0, listRootDepth), listRootDepth);\n }\n // If no values were found, emit a falsy list element to force an empty RDF list to be emitted.\n if (values.length === 0) {\n await this.handleListElement(parsingContext, util, null, value, depth, keys.slice(0, listRootDepth), listRootDepth);\n }\n }\n }\n else if (parentKey === '@set') {\n // Our value is part of a set, so we just add it to the parent-parent\n await parsingContext.newOnValueJob(keys.slice(0, -2), value, depth - 2, false);\n }\n else if (parentKey !== undefined && parentKey !== '@type') {\n // Buffer our value using the parent key as predicate\n // Determine the first parent key that is *not* an array key\n // This is needed in case we have an @list container with nested arrays,\n // where each of them should produce nested RDF lists.\n for (let i = depth - 1; i > 0; i--) {\n if (typeof keys[i] !== 'number') {\n parentKey = await util.unaliasKeyword(keys[i], keys, i);\n break;\n }\n }\n // Check if the predicate is marked as an @list in the context\n const parentContext = await parsingContext.getContext(keys.slice(0, -1));\n if ('@list' in Util_1.Util.getContextValueContainer(parentContext, parentKey)) {\n // Our value is part of an array\n // Emit the given objects as list elements\n parsingContext.emittedStack[depth + 1] = true; // Ensure the creation of bnodes for empty nodes\n const values = await util.valueToTerm(await parsingContext.getContext(keys), parentKey, value, depth, keys);\n for (const object of values) {\n await this.handleListElement(parsingContext, util, object, value, depth, keys.slice(0, -1), depth - 1);\n }\n // If no values were found, emit a falsy list element to force an empty RDF list to be emitted.\n if (values.length === 0) {\n await this.handleListElement(parsingContext, util, null, value, depth, keys.slice(0, -1), depth - 1);\n }\n }\n else {\n // Copy the stack values up one level so that the next job can access them.\n parsingContext.shiftStack(depth, 1);\n // Execute the job one level higher\n await parsingContext.newOnValueJob(keys.slice(0, -1), value, depth - 1, false);\n // Remove any defined contexts at this level to avoid it to propagate to the next array element.\n parsingContext.contextTree.removeContext(keys.slice(0, -1));\n }\n }\n }\n async handleListElement(parsingContext, util, value, valueOriginal, depth, listRootKeys, listRootDepth) {\n // Buffer our value as an RDF list using the listRootKey as predicate\n let listPointer = parsingContext.listPointerStack[depth];\n if (valueOriginal !== null && (await util.unaliasKeywords(valueOriginal, listRootKeys, depth))['@value'] !== null) {\n if (!listPointer || !listPointer.value) {\n const linkTerm = util.dataFactory.blankNode();\n listPointer = { value: linkTerm, listRootDepth, listId: linkTerm };\n }\n else {\n // rdf:rest links are always emitted before the next element,\n // as the blank node identifier is only created at that point.\n // Because of this reason, the final rdf:nil is emitted when the stack depth is decreased.\n const newLinkTerm = util.dataFactory.blankNode();\n parsingContext.emitQuad(depth, util.dataFactory.quad(listPointer.value, util.rdfRest, newLinkTerm, util.getDefaultGraph()));\n // Update the list pointer for the next element\n listPointer.value = newLinkTerm;\n }\n // Emit a list element for the current value\n // Omit rdf:first if the value is invalid\n if (value) {\n parsingContext.emitQuad(depth, util.dataFactory.quad(listPointer.value, util.rdfFirst, value, util.getDefaultGraph()));\n }\n }\n else {\n // A falsy list element if found.\n // Mark it as an rdf:nil list until another valid list element comes in\n if (!listPointer) {\n listPointer = { listRootDepth, listId: util.rdfNil };\n }\n }\n parsingContext.listPointerStack[depth] = listPointer;\n // Error if an annotation was defined\n if (parsingContext.rdfstar && parsingContext.annotationsBuffer[depth]) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an illegal annotation inside a list`, jsonld_context_parser_1.ERROR_CODES.INVALID_ANNOTATION));\n }\n }\n}\nexports.EntryHandlerArrayValue = EntryHandlerArrayValue;\n//# sourceMappingURL=EntryHandlerArrayValue.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerContainer = void 0;\nconst ContainerHandlerIdentifier_1 = require(\"../containerhandler/ContainerHandlerIdentifier\");\nconst ContainerHandlerIndex_1 = require(\"../containerhandler/ContainerHandlerIndex\");\nconst ContainerHandlerLanguage_1 = require(\"../containerhandler/ContainerHandlerLanguage\");\nconst ContainerHandlerType_1 = require(\"../containerhandler/ContainerHandlerType\");\nconst Util_1 = require(\"../Util\");\n/**\n * Handles values that are part of a container type (like @index),\n * as specified by {@link IContainerHandler}.\n */\nclass EntryHandlerContainer {\n /**\n * Check fit the given container is a simple @graph container.\n * Concretely, it will check if no @index or @id is active as well.\n * @param containers A container hash.\n */\n static isSimpleGraphContainer(containers) {\n return '@graph' in containers\n && (('@set' in containers && Object.keys(containers).length === 2) || Object.keys(containers).length === 1);\n }\n /**\n * Check fit the given container is a complex @graph container.\n * Concretely, it will check if @index or @id is active as well next to @graph.\n * @param containers A container hash.\n */\n static isComplexGraphContainer(containers) {\n return '@graph' in containers\n && (('@set' in containers && Object.keys(containers).length > 2)\n || (!('@set' in containers) && Object.keys(containers).length > 1));\n }\n /**\n * Create an graph container index that can be used for identifying a graph term inside the graphContainerTermStack.\n * @param containers The applicable containers.\n * @param depth The container depth.\n * @param keys The array of keys.\n * @return The graph index.\n */\n static getContainerGraphIndex(containers, depth, keys) {\n let isSimpleGraphContainer = EntryHandlerContainer.isSimpleGraphContainer(containers);\n let index = '';\n for (let i = depth; i < keys.length; i++) {\n if (!isSimpleGraphContainer || typeof keys[i] === 'number') {\n index += ':' + keys[i];\n }\n // Only allow a second 'real' key if in a non-simple graph container.\n if (!isSimpleGraphContainer && typeof keys[i] !== 'number') {\n isSimpleGraphContainer = true;\n }\n }\n return index;\n }\n /**\n * Return the applicable container type at the given depth.\n *\n * This will ignore any arrays in the key chain.\n *\n * @param {ParsingContext} parsingContext A parsing context.\n * @param {any[]} keys The array of keys.\n * @param {number} depth The current depth.\n * @return {Promise<{ containers: {[typeName: string]: boolean}, depth: number, fallback: boolean }>}\n * All applicable containers for the given depth,\n * the `depth` of the container root (can change when arrays are in the key chain),\n * and the `fallback` flag that indicates if the default container type was returned\n * (i.e., no dedicated container type is defined).\n */\n static async getContainerHandler(parsingContext, keys, depth) {\n const fallback = {\n containers: { '@set': true },\n depth,\n fallback: true,\n };\n // A flag that is enabled when @graph container should be tested in next iteration\n let checkGraphContainer = false;\n // Iterate from deeper to higher\n const context = await parsingContext.getContext(keys, 2);\n for (let i = depth - 1; i >= 0; i--) {\n if (typeof keys[i] !== 'number') { // Skip array keys\n // @graph containers without any other types are one level less deep, and require special handling\n const containersSelf = Util_1.Util.getContextValue(context, '@container', keys[i], false);\n if (containersSelf && EntryHandlerContainer.isSimpleGraphContainer(containersSelf)) {\n return {\n containers: containersSelf,\n depth: i + 1,\n fallback: false,\n };\n }\n const containersParent = Util_1.Util.getContextValue(context, '@container', keys[i - 1], false);\n if (!containersParent) { // If we have the fallback container value\n if (checkGraphContainer) {\n // Return false if we were already expecting a @graph-@id of @graph-@index container\n return fallback;\n }\n // Check parent-parent, we may be in a @graph-@id of @graph-@index container, which have two levels\n checkGraphContainer = true;\n }\n else {\n // We had an invalid container next iteration, so we now have to check if we were in an @graph container\n const graphContainer = '@graph' in containersParent;\n // We're in a regular container\n for (const containerHandleName in EntryHandlerContainer.CONTAINER_HANDLERS) {\n if (containersParent[containerHandleName]) {\n if (graphContainer) {\n // Only accept graph containers if their combined handlers can handle them.\n if (EntryHandlerContainer.CONTAINER_HANDLERS[containerHandleName].canCombineWithGraph()) {\n return {\n containers: containersParent,\n depth: i,\n fallback: false,\n };\n }\n else {\n return fallback;\n }\n }\n else {\n // Only accept if we were not expecting a @graph-@id of @graph-@index container\n if (checkGraphContainer) {\n return fallback;\n }\n else {\n return {\n containers: containersParent,\n depth: i,\n fallback: false,\n };\n }\n }\n }\n }\n // Fail if no valid container handlers were found\n return fallback;\n }\n }\n }\n return fallback;\n }\n /**\n * Check if we are handling a value at the given depth\n * that is part of something that should be handled as a container,\n * AND if this container should be buffered, so that it can be handled by a dedicated container handler.\n *\n * For instance, any container with @graph will NOT be buffered.\n *\n * This will ignore any arrays in the key chain.\n *\n * @param {ParsingContext} parsingContext A parsing context.\n * @param {any[]} keys The array of keys.\n * @param {number} depth The current depth.\n * @return {Promise} If we are in the scope of a container handler.\n */\n static async isBufferableContainerHandler(parsingContext, keys, depth) {\n const handler = await EntryHandlerContainer.getContainerHandler(parsingContext, keys, depth);\n return !handler.fallback && !('@graph' in handler.containers);\n }\n isPropertyHandler() {\n return false;\n }\n isStackProcessor() {\n return true;\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n return !!await this.test(parsingContext, util, null, keys, depth);\n }\n async test(parsingContext, util, key, keys, depth) {\n const containers = Util_1.Util.getContextValueContainer(await parsingContext.getContext(keys, 2), keys[depth - 1]);\n for (const containerName in EntryHandlerContainer.CONTAINER_HANDLERS) {\n if (containers[containerName]) {\n return {\n containers,\n handler: EntryHandlerContainer.CONTAINER_HANDLERS[containerName],\n };\n }\n }\n return null;\n }\n async handle(parsingContext, util, key, keys, value, depth, testResult) {\n return testResult.handler.handle(testResult.containers, parsingContext, util, keys, value, depth);\n }\n}\nEntryHandlerContainer.CONTAINER_HANDLERS = {\n '@id': new ContainerHandlerIdentifier_1.ContainerHandlerIdentifier(),\n '@index': new ContainerHandlerIndex_1.ContainerHandlerIndex(),\n '@language': new ContainerHandlerLanguage_1.ContainerHandlerLanguage(),\n '@type': new ContainerHandlerType_1.ContainerHandlerType(),\n};\nexports.EntryHandlerContainer = EntryHandlerContainer;\n//# sourceMappingURL=EntryHandlerContainer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerInvalidFallback = void 0;\n/**\n * A catch-all for properties, that will either emit an error or ignore,\n * depending on whether or not the `strictValues` property is set.\n */\nclass EntryHandlerInvalidFallback {\n isPropertyHandler() {\n return false;\n }\n isStackProcessor() {\n return true;\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n return false;\n }\n async test(parsingContext, util, key, keys, depth) {\n return true;\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n parsingContext.emittedStack[depth] = false;\n }\n}\nexports.EntryHandlerInvalidFallback = EntryHandlerInvalidFallback;\n//# sourceMappingURL=EntryHandlerInvalidFallback.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerPredicate = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst Util_1 = require(\"../Util\");\n/**\n * Interprets keys as predicates.\n * The most common case in JSON-LD processing.\n */\nclass EntryHandlerPredicate {\n /**\n * Handle the given predicate-object by either emitting it,\n * or by placing it in the appropriate stack for later emission when no @graph and/or @id has been defined.\n * @param {ParsingContext} parsingContext A parsing context.\n * @param {Util} util A utility instance.\n * @param {any[]} keys A stack of keys.\n * @param {number} depth The current depth.\n * @param {Term} predicate The predicate.\n * @param {Term} object The object.\n * @param {boolean} reverse If the property is reversed.\n * @param {boolean} isEmbedded If the property exists in an embedded node as direct child.\n * @param {boolean} isAnnotation If the property exists in an annotation object.\n * @return {Promise} A promise resolving when handling is done.\n */\n static async handlePredicateObject(parsingContext, util, keys, depth, predicate, object, reverse, isEmbedded, isAnnotation) {\n const depthProperties = await util.getPropertiesDepth(keys, depth);\n const depthOffsetGraph = await util.getDepthOffsetGraph(depth, keys);\n const depthPropertiesGraph = depth - depthOffsetGraph;\n const subjects = parsingContext.idStack[depthProperties];\n if (subjects && !isAnnotation) {\n // Emit directly if the @id was already defined\n for (const subject of subjects) {\n // Check if we're in a @graph context\n const atGraph = depthOffsetGraph >= 0;\n if (atGraph) {\n const graphs = parsingContext.idStack[depthPropertiesGraph - 1];\n if (graphs) {\n for (const graph of graphs) {\n // Emit our quad if graph @id is known\n util.emitQuadChecked(depth, subject, predicate, object, graph, reverse, isEmbedded);\n }\n }\n else {\n // Buffer our triple if graph @id is not known yet.\n if (reverse) {\n util.validateReverseSubject(object);\n parsingContext.getUnidentifiedGraphBufferSafe(depthPropertiesGraph - 1).push({ subject: object, predicate, object: subject, isEmbedded });\n }\n else {\n parsingContext.getUnidentifiedGraphBufferSafe(depthPropertiesGraph - 1)\n .push({ subject, predicate, object, isEmbedded });\n }\n }\n }\n else {\n // Emit if no @graph was applicable\n const graph = await util.getGraphContainerValue(keys, depthProperties);\n util.emitQuadChecked(depth, subject, predicate, object, graph, reverse, isEmbedded);\n }\n }\n }\n else {\n // Buffer until our @id becomes known, or we go up the stack\n if (reverse) {\n util.validateReverseSubject(object);\n }\n // Either push to the annotations or the actual value buffer\n if (isAnnotation) {\n // Only add to buffer if rdfstar is enabled\n if (parsingContext.rdfstar) {\n // Error if an @id was defined\n if (parsingContext.idStack[depth]) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an illegal @id inside an annotation: ${parsingContext.idStack[depth][0].value}`, jsonld_context_parser_1.ERROR_CODES.INVALID_ANNOTATION));\n }\n // Error if we're in an embedded node\n for (let i = 0; i < depth; i++) {\n if (await util.unaliasKeyword(keys[i], keys, i) === '@id') {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an illegal annotation inside an embedded node`, jsonld_context_parser_1.ERROR_CODES.INVALID_ANNOTATION));\n }\n }\n // Store new annotation in the buffer\n const annotationsBuffer = parsingContext.getAnnotationsBufferSafe(depthProperties);\n const newAnnotation = { predicate, object, reverse, nestedAnnotations: [], depth: depthProperties };\n annotationsBuffer.push(newAnnotation);\n // Check in the buffer if any annotations were defined at a deeper depth,\n // if so, they are considered nested annotations.\n for (let i = annotationsBuffer.length - 2; i >= 0; i--) {\n // We iterate in reverse order, to enable easy item removal from the back.\n const existingAnnotation = annotationsBuffer[i];\n if (existingAnnotation.depth > depthProperties) {\n newAnnotation.nestedAnnotations.push(existingAnnotation);\n annotationsBuffer.splice(i, 1);\n }\n }\n }\n }\n else {\n parsingContext.getUnidentifiedValueBufferSafe(depthProperties).push({ predicate, object, reverse, isEmbedded });\n }\n }\n }\n isPropertyHandler() {\n return true;\n }\n isStackProcessor() {\n return true;\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n const key = keys[depth];\n if (key) {\n const context = await parsingContext.getContext(keys);\n if (!parsingContext.jsonLiteralStack[depth] && await util.predicateToTerm(context, keys[depth])) {\n // If this valid predicate is of type @json, mark it so in the stack so that no deeper handling of nodes occurs.\n if (Util_1.Util.getContextValueType(context, key) === '@json') {\n parsingContext.jsonLiteralStack[depth + 1] = true;\n }\n return true;\n }\n }\n return false;\n }\n async test(parsingContext, util, key, keys, depth) {\n return keys[depth];\n }\n async handle(parsingContext, util, key, keys, value, depth, testResult) {\n const keyOriginal = keys[depth];\n const context = await parsingContext.getContext(keys);\n const predicate = await util.predicateToTerm(context, key);\n if (predicate) {\n const objects = await util.valueToTerm(context, key, value, depth, keys);\n if (objects.length) {\n for (let object of objects) {\n // Based on parent key, check if reverse, embedded, and annotation.\n let parentKey = await util.unaliasKeywordParent(keys, depth);\n const reverse = Util_1.Util.isPropertyReverse(context, keyOriginal, parentKey);\n let parentDepthOffset = 0;\n while (parentKey === '@reverse' || typeof parentKey === 'number') {\n // Check parent of parent when checking while we're in an array or in @reverse\n if (typeof parentKey === 'number') {\n parentDepthOffset++;\n }\n else {\n depth--;\n }\n parentKey = await util.unaliasKeywordParent(keys, depth - parentDepthOffset);\n }\n const isEmbedded = Util_1.Util.isPropertyInEmbeddedNode(parentKey);\n util.validateReverseInEmbeddedNode(key, reverse, isEmbedded);\n const isAnnotation = Util_1.Util.isPropertyInAnnotationObject(parentKey);\n if (value) {\n // Special case if our term was defined as an @list, but does not occur in an array,\n // In that case we just emit it as an RDF list with a single element.\n const listValueContainer = '@list' in Util_1.Util.getContextValueContainer(context, key);\n if (listValueContainer || value['@list']) {\n if (((listValueContainer && !Array.isArray(value) && !value['@list'])\n || (value['@list'] && !Array.isArray(value['@list'])))\n && object !== util.rdfNil) {\n const listPointer = util.dataFactory.blankNode();\n parsingContext.emitQuad(depth, util.dataFactory.quad(listPointer, util.rdfRest, util.rdfNil, util.getDefaultGraph()));\n parsingContext.emitQuad(depth, util.dataFactory.quad(listPointer, util.rdfFirst, object, util.getDefaultGraph()));\n object = listPointer;\n }\n // Lists are not allowed in @reverse'd properties\n if (reverse && !parsingContext.allowSubjectList) {\n throw new jsonld_context_parser_1.ErrorCoded(`Found illegal list value in subject position at ${key}`, jsonld_context_parser_1.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE);\n }\n }\n }\n await EntryHandlerPredicate.handlePredicateObject(parsingContext, util, keys, depth, predicate, object, reverse, isEmbedded, isAnnotation);\n }\n }\n }\n }\n}\nexports.EntryHandlerPredicate = EntryHandlerPredicate;\n//# sourceMappingURL=EntryHandlerPredicate.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeyword = void 0;\n/**\n * An abstract keyword entry handler.\n */\nclass EntryHandlerKeyword {\n constructor(keyword) {\n this.keyword = keyword;\n }\n isPropertyHandler() {\n return false;\n }\n isStackProcessor() {\n return true;\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n return false;\n }\n async test(parsingContext, util, key, keys, depth) {\n return key === this.keyword;\n }\n}\nexports.EntryHandlerKeyword = EntryHandlerKeyword;\n//# sourceMappingURL=EntryHandlerKeyword.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordAnnotation = void 0;\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\n/**\n * Handles @annotation entries.\n */\nclass EntryHandlerKeywordAnnotation extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@annotation');\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n // Validate value\n if (typeof value === 'string' || (typeof value === 'object' && value['@value'])) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found illegal annotation value: ${JSON.stringify(value)}`, jsonld_context_parser_1.ERROR_CODES.INVALID_ANNOTATION));\n }\n // Rest of the processing is done as regular nodes\n }\n}\nexports.EntryHandlerKeywordAnnotation = EntryHandlerKeywordAnnotation;\n//# sourceMappingURL=EntryHandlerKeywordAnnotation.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordContext = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @context entries.\n */\nclass EntryHandlerKeywordContext extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@context');\n }\n isStackProcessor() {\n return false;\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n // Error if an out-of-order context was found when support is not enabled.\n if (parsingContext.streamingProfile\n && (parsingContext.processingStack[depth]\n || parsingContext.processingType[depth]\n || parsingContext.idStack[depth] !== undefined)) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded('Found an out-of-order context, while streaming is enabled.' +\n '(disable `streamingProfile`)', jsonld_context_parser_1.ERROR_CODES.INVALID_STREAMING_KEY_ORDER));\n }\n // Find the parent context to inherit from.\n // We actually request a context for the current depth (with fallback to parent)\n // because we want to take into account any property-scoped contexts that are defined for this depth.\n const parentContext = parsingContext.getContext(keys);\n // Set the context for this scope\n const context = parsingContext.parseContext(value, (await parentContext).getContextRaw());\n parsingContext.contextTree.setContext(keys.slice(0, -1), context);\n parsingContext.emitContext(value);\n await parsingContext.validateContext(await context);\n }\n}\nexports.EntryHandlerKeywordContext = EntryHandlerKeywordContext;\n//# sourceMappingURL=EntryHandlerKeywordContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordGraph = void 0;\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @graph entries.\n */\nclass EntryHandlerKeywordGraph extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@graph');\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n // The current identifier identifies a graph for the deeper level.\n parsingContext.graphStack[depth + 1] = true;\n }\n}\nexports.EntryHandlerKeywordGraph = EntryHandlerKeywordGraph;\n//# sourceMappingURL=EntryHandlerKeywordGraph.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordId = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @id entries.\n */\nclass EntryHandlerKeywordId extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@id');\n }\n isStackProcessor() {\n return false;\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n if (typeof value !== 'string') {\n // JSON-LD-star allows @id object values\n if (parsingContext.rdfstar && typeof value === 'object') {\n const valueKeys = Object.keys(value);\n if (valueKeys.length === 1 && valueKeys[0] === '@id') {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Invalid embedded node without property with @id ${value['@id']}`, jsonld_context_parser_1.ERROR_CODES.INVALID_EMBEDDED_NODE));\n }\n }\n else {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found illegal @id '${value}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_ID_VALUE));\n }\n return;\n }\n // Determine the canonical place for this id.\n // For example, @nest parents should be ignored.\n const depthProperties = await util.getPropertiesDepth(keys, depth);\n // Error if an @id for this node already existed.\n if (parsingContext.idStack[depthProperties] !== undefined) {\n if (parsingContext.idStack[depthProperties][0].listHead) {\n // Error if an @list was already defined for this node\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${keys[depth - 1]}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT));\n }\n else {\n // Otherwise, the previous id was just because of an @id entry.\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found duplicate @ids '${parsingContext\n .idStack[depthProperties][0].value}' and '${value}'`, jsonld_context_parser_1.ERROR_CODES.COLLIDING_KEYWORDS));\n }\n }\n // Error if an annotation was defined\n if (parsingContext.rdfstar && parsingContext.annotationsBuffer[depth]) {\n for (const annotation of parsingContext.annotationsBuffer[depth]) {\n if (annotation.depth === depth) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an illegal @id inside an annotation: ${value}`, jsonld_context_parser_1.ERROR_CODES.INVALID_ANNOTATION));\n }\n }\n }\n // Save our @id on the stack\n parsingContext.idStack[depthProperties] = util.nullableTermToArray(await util.resourceToTerm(await parsingContext.getContext(keys), value));\n }\n}\nexports.EntryHandlerKeywordId = EntryHandlerKeywordId;\n//# sourceMappingURL=EntryHandlerKeywordId.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordIncluded = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @included entries.\n */\nclass EntryHandlerKeywordIncluded extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@included');\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n if (typeof value !== 'object') {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found illegal @included '${value}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_INCLUDED_VALUE));\n }\n const valueUnliased = await util.unaliasKeywords(value, keys, depth, await parsingContext.getContext(keys));\n if ('@value' in valueUnliased) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an illegal @included @value node '${JSON.stringify(value)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_INCLUDED_VALUE));\n }\n if ('@list' in valueUnliased) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an illegal @included @list node '${JSON.stringify(value)}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_INCLUDED_VALUE));\n }\n parsingContext.emittedStack[depth] = false;\n }\n}\nexports.EntryHandlerKeywordIncluded = EntryHandlerKeywordIncluded;\n//# sourceMappingURL=EntryHandlerKeywordIncluded.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordNest = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @nest entries.\n */\nclass EntryHandlerKeywordNest extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@nest');\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n if (typeof value !== 'object') {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found invalid @nest entry for '${key}': '${value}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_NEST_VALUE));\n }\n if ('@value' in await util.unaliasKeywords(value, keys, depth, await parsingContext.getContext(keys))) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found an invalid @value node for '${key}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_NEST_VALUE));\n }\n parsingContext.emittedStack[depth] = false;\n }\n}\nexports.EntryHandlerKeywordNest = EntryHandlerKeywordNest;\n//# sourceMappingURL=EntryHandlerKeywordNest.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordType = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst Util_1 = require(\"../../Util\");\nconst EntryHandlerPredicate_1 = require(\"../EntryHandlerPredicate\");\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @graph entries.\n */\nclass EntryHandlerKeywordType extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@type');\n }\n isStackProcessor() {\n return false;\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n const keyOriginal = keys[depth];\n // The current identifier identifies an rdf:type predicate.\n // But we only emit it once the node closes,\n // as it's possible that the @type is used to identify the datatype of a literal, which we ignore here.\n const context = await parsingContext.getContext(keys);\n const predicate = util.rdfType;\n const parentKey = await util.unaliasKeywordParent(keys, depth);\n const reverse = Util_1.Util.isPropertyReverse(context, keyOriginal, parentKey);\n const isEmbedded = Util_1.Util.isPropertyInEmbeddedNode(parentKey);\n util.validateReverseInEmbeddedNode(key, reverse, isEmbedded);\n const isAnnotation = Util_1.Util.isPropertyInAnnotationObject(parentKey);\n // Handle multiple values if the value is an array\n const elements = Array.isArray(value) ? value : [value];\n for (const element of elements) {\n if (typeof element !== 'string') {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Found illegal @type '${element}'`, jsonld_context_parser_1.ERROR_CODES.INVALID_TYPE_VALUE));\n }\n const type = util.createVocabOrBaseTerm(context, element);\n if (type) {\n await EntryHandlerPredicate_1.EntryHandlerPredicate.handlePredicateObject(parsingContext, util, keys, depth, predicate, type, reverse, isEmbedded, isAnnotation);\n }\n }\n // Collect type-scoped contexts if they exist\n let scopedContext = Promise.resolve(context);\n let hasTypedScopedContext = false;\n for (const element of elements.sort()) { // Spec requires lexicographical ordering\n const typeContext = Util_1.Util.getContextValue(context, '@context', element, null);\n if (typeContext) {\n hasTypedScopedContext = true;\n scopedContext = scopedContext.then((c) => parsingContext.parseContext(typeContext, c.getContextRaw()));\n }\n }\n // Error if an out-of-order type-scoped context was found when support is not enabled.\n if (parsingContext.streamingProfile\n && (hasTypedScopedContext || !parsingContext.streamingProfileAllowOutOfOrderPlainType)\n && (parsingContext.processingStack[depth] || parsingContext.idStack[depth])) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded('Found an out-of-order type-scoped context, while streaming is enabled.' +\n '(disable `streamingProfile`)', jsonld_context_parser_1.ERROR_CODES.INVALID_STREAMING_KEY_ORDER));\n }\n // If at least least one type-scoped context applies, set them in the tree.\n if (hasTypedScopedContext) {\n // Do not propagate by default\n scopedContext = scopedContext.then((c) => {\n // Set the original context at this depth as a fallback\n // This is needed when a context was already defined at the given depth,\n // and this context needs to remain accessible from child nodes when propagation is disabled.\n if (c.getContextRaw()['@propagate'] !== true) {\n return new jsonld_context_parser_1.JsonLdContextNormalized(Object.assign(Object.assign({}, c.getContextRaw()), { '@propagate': false, '@__propagateFallback': context.getContextRaw() }));\n }\n return c;\n });\n // Set the new context in the context tree\n parsingContext.contextTree.setContext(keys.slice(0, keys.length - 1), scopedContext);\n }\n // Flag that type has been processed at this depth\n parsingContext.processingType[depth] = true;\n }\n}\nexports.EntryHandlerKeywordType = EntryHandlerKeywordType;\n//# sourceMappingURL=EntryHandlerKeywordType.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordUnknownFallback = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\n/**\n * A catch-all for keywords, that will either emit an error or ignore,\n * depending on whether or not the `strictValues` property is set.\n */\nclass EntryHandlerKeywordUnknownFallback {\n isPropertyHandler() {\n return false;\n }\n isStackProcessor() {\n return true;\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n const key = await util.unaliasKeyword(keys[depth], keys, depth);\n if (jsonld_context_parser_1.Util.isPotentialKeyword(key)) {\n // Don't emit anything inside free-floating lists\n if (!inProperty) {\n if (key === '@list') {\n return false;\n }\n }\n return true;\n }\n return false;\n }\n async test(parsingContext, util, key, keys, depth) {\n return jsonld_context_parser_1.Util.isPotentialKeyword(key);\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n const keywordType = EntryHandlerKeywordUnknownFallback.VALID_KEYWORDS_TYPES[key];\n if (keywordType !== undefined) {\n if (keywordType && typeof value !== keywordType.type) {\n parsingContext.emitError(new jsonld_context_parser_1.ErrorCoded(`Invalid value type for '${key}' with value '${value}'`, keywordType.errorCode));\n }\n }\n else if (parsingContext.strictValues) {\n parsingContext.emitError(new Error(`Unknown keyword '${key}' with value '${value}'`));\n }\n parsingContext.emittedStack[depth] = false;\n }\n}\nEntryHandlerKeywordUnknownFallback.VALID_KEYWORDS_TYPES = {\n '@index': { type: 'string', errorCode: jsonld_context_parser_1.ERROR_CODES.INVALID_INDEX_VALUE },\n '@list': null,\n '@reverse': { type: 'object', errorCode: jsonld_context_parser_1.ERROR_CODES.INVALID_REVERSE_VALUE },\n '@set': null,\n '@value': null,\n};\nexports.EntryHandlerKeywordUnknownFallback = EntryHandlerKeywordUnknownFallback;\n//# sourceMappingURL=EntryHandlerKeywordUnknownFallback.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EntryHandlerKeywordValue = void 0;\nconst EntryHandlerKeyword_1 = require(\"./EntryHandlerKeyword\");\n/**\n * Handles @value entries.\n */\nclass EntryHandlerKeywordValue extends EntryHandlerKeyword_1.EntryHandlerKeyword {\n constructor() {\n super('@value');\n }\n async validate(parsingContext, util, keys, depth, inProperty) {\n // If this is @value, mark it so in the stack so that no deeper handling of nodes occurs.\n const key = keys[depth];\n if (key && !parsingContext.literalStack[depth] && await this.test(parsingContext, util, key, keys, depth)) {\n parsingContext.literalStack[depth] = true;\n }\n return super.validate(parsingContext, util, keys, depth, inProperty);\n }\n async test(parsingContext, util, key, keys, depth) {\n return await util.unaliasKeyword(keys[depth], keys.slice(0, keys.length - 1), depth - 1, true) === '@value';\n }\n async handle(parsingContext, util, key, keys, value, depth) {\n // If the value is valid, indicate that we are processing a literal.\n // The actual value will be determined at the parent level when the @value is part of an object,\n // because we may want to take into account additional entries such as @language.\n // See {@link Util.valueToTerm}\n // Indicate that we are processing a literal, and that no later predicates should be parsed at this depth.\n parsingContext.literalStack[depth] = true;\n // Void any buffers that we may have accumulated up until now\n delete parsingContext.unidentifiedValuesBuffer[depth];\n delete parsingContext.unidentifiedGraphsBuffer[depth];\n // Indicate that we have not emitted at this depth\n parsingContext.emittedStack[depth] = false;\n }\n}\nexports.EntryHandlerKeywordValue = EntryHandlerKeywordValue;\n//# sourceMappingURL=EntryHandlerKeywordValue.js.map","/* jshint esversion: 6 */\n/* jslint node: true */\n'use strict';\n\nmodule.exports = function serialize (object) {\n if (object === null || typeof object !== 'object' || object.toJSON != null) {\n return JSON.stringify(object);\n }\n\n if (Array.isArray(object)) {\n return '[' + object.reduce((t, cv, ci) => {\n const comma = ci === 0 ? '' : ',';\n const value = cv === undefined || typeof cv === 'symbol' ? null : cv;\n return t + comma + serialize(value);\n }, '') + ']';\n }\n\n return '{' + Object.keys(object).sort().reduce((t, cv, ci) => {\n if (object[cv] === undefined ||\n typeof object[cv] === 'symbol') {\n return t;\n }\n const comma = t.length === 0 ? '' : ',';\n return t + comma + serialize(cv) + ':' + serialize(object[cv]);\n }, '') + '}';\n};\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/JsonLdSerializer\"), exports);\n__exportStar(require(\"./lib/Util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.JsonLdSerializer = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\nconst SeparatorType_1 = require(\"./SeparatorType\");\nconst Util_1 = require(\"./Util\");\nconst readable_stream_1 = require(\"readable-stream\");\n/**\n * A stream transformer that transforms an {@link RDF.Stream} into a JSON-LD (text) stream.\n */\nclass JsonLdSerializer extends readable_stream_1.Transform {\n constructor(options = {}) {\n super({ objectMode: true });\n this.indentation = 0;\n this.options = options;\n // Parse the context\n if (this.options.baseIRI && !this.options.context) {\n this.options.context = { '@base': this.options.baseIRI };\n }\n if (this.options.context) {\n this.originalContext = this.options.context;\n this.context = new jsonld_context_parser_1.ContextParser().parse(this.options.context, { baseIRI: this.options.baseIRI });\n }\n else {\n this.context = Promise.resolve(new jsonld_context_parser_1.JsonLdContextNormalized({}));\n }\n }\n /**\n * Parses the given text stream into a quad stream.\n * @param {NodeJS.EventEmitter} stream A text stream.\n * @return {NodeJS.EventEmitter} A quad stream.\n */\n import(stream) {\n const output = new readable_stream_1.PassThrough({ objectMode: true });\n stream.on('error', (error) => parsed.emit('error', error));\n stream.on('data', (data) => output.push(data));\n stream.on('end', () => output.push(null));\n const parsed = output.pipe(new JsonLdSerializer(this.options));\n return parsed;\n }\n /**\n * Transforms a quad into the text stream.\n * @param {Quad} quad An RDF quad.\n * @param {string} encoding An (ignored) encoding.\n * @param {module:stream.internal.TransformCallback} callback Callback that is invoked when the transformation is done\n * @private\n */\n _transform(quad, encoding, callback) {\n this.context.then((context) => {\n this.transformQuad(quad, context);\n callback();\n }).catch(callback);\n }\n /**\n * Construct a list in an RDF.Term object that can be used\n * inside a quad's object to write into the serializer\n * as a list using the @list keyword.\n * @param {RDF.Quad_Object[]} values A list of values, can be empty.\n * @return {RDF.Quad_Object} A term that should be used in the object position of the quad that is written to the serializer.\n */\n async list(values) {\n const context = await this.context;\n return {\n '@list': values.map((value) => Util_1.Util.termToValue(value, context, this.options)),\n };\n }\n /**\n * Called when the incoming stream is closed.\n * @param {module:stream.internal.TransformCallback} callback Callback that is invoked when the flushing is done.\n * @private\n */\n _flush(callback) {\n // If the stream was empty, ensure that we push the opening array\n if (!this.opened) {\n this.pushDocumentStart();\n }\n if (this.lastPredicate) {\n this.endPredicate();\n }\n if (this.lastSubject) {\n this.endSubject();\n }\n if (this.lastGraph && this.lastGraph.termType !== 'DefaultGraph') {\n this.endGraph();\n }\n this.endDocument();\n return callback(null, null);\n }\n /**\n * Transforms a quad into the text stream.\n * @param {Quad} quad An RDF quad.\n * @param {JsonLdContextNormalized} context A context for compacting.\n */\n transformQuad(quad, context) {\n // Open the array before the first quad\n if (!this.opened) {\n this.pushDocumentStart();\n }\n // Check if the subject equals the last named graph\n // In that case, we can reuse the already-existing @id node\n const lastGraphMatchesSubject = this.lastGraph && this.lastGraph.termType !== 'DefaultGraph'\n && this.lastGraph.equals(quad.subject);\n // Write graph\n if (!lastGraphMatchesSubject && (!this.lastGraph || !quad.graph.equals(this.lastGraph))) {\n // Check if the named graph equals the last subject\n // In that case, we can reuse the already-existing @id node\n let lastSubjectMatchesGraph = quad.graph.termType !== 'DefaultGraph'\n && this.lastSubject && this.lastSubject.equals(quad.graph);\n if (this.lastGraph) {\n if (this.lastGraph.termType !== 'DefaultGraph') {\n // The last graph was named\n this.endPredicate();\n this.endSubject();\n this.endGraph(true);\n lastSubjectMatchesGraph = false; // Special-case to avoid deeper nesting\n }\n else {\n // The last graph was default\n if (!lastSubjectMatchesGraph) {\n this.endPredicate();\n this.endSubject(true);\n }\n else {\n this.endPredicate(true);\n this.lastSubject = null;\n }\n }\n }\n // Push the graph\n if (quad.graph.termType !== 'DefaultGraph') {\n if (!lastSubjectMatchesGraph) {\n this.pushId(quad.graph, true, context);\n }\n this.pushSeparator(this.options.space\n ? SeparatorType_1.SeparatorType.GRAPH_FIELD_NONCOMPACT : SeparatorType_1.SeparatorType.GRAPH_FIELD_COMPACT);\n this.indentation++;\n }\n this.lastGraph = quad.graph;\n }\n // Write subject\n if (!this.lastSubject || !quad.subject.equals(this.lastSubject)) {\n if (lastGraphMatchesSubject) {\n this.endPredicate();\n this.endSubject();\n this.indentation--;\n this.pushSeparator(SeparatorType_1.SeparatorType.ARRAY_END_COMMA);\n this.lastGraph = quad.graph;\n }\n else {\n if (this.lastSubject) {\n this.endPredicate();\n this.endSubject(true);\n }\n // Open a new node for the new subject\n this.pushId(quad.subject, true, context);\n }\n this.lastSubject = quad.subject;\n }\n // Write predicate\n if (!this.lastPredicate || !quad.predicate.equals(this.lastPredicate)) {\n if (this.lastPredicate) {\n this.endPredicate(true);\n }\n // Open a new array for the new predicate\n this.pushPredicate(quad.predicate, context);\n }\n // Write the object value\n this.pushObject(quad.object, context);\n }\n pushDocumentStart() {\n this.opened = true;\n if (this.originalContext && !this.options.excludeContext) {\n this.pushSeparator(SeparatorType_1.SeparatorType.OBJECT_START);\n this.indentation++;\n this.pushSeparator(SeparatorType_1.SeparatorType.CONTEXT_FIELD);\n this.pushIndented(JSON.stringify(this.originalContext, null, this.options.space) + ',');\n this.pushSeparator(this.options.space\n ? SeparatorType_1.SeparatorType.GRAPH_FIELD_NONCOMPACT : SeparatorType_1.SeparatorType.GRAPH_FIELD_COMPACT);\n this.indentation++;\n }\n else {\n this.pushSeparator(SeparatorType_1.SeparatorType.ARRAY_START);\n this.indentation++;\n }\n }\n /**\n * Push the given term as an @id field.\n * @param {Term} term An RDF term.\n * @param startOnNewLine If `{` should start on a new line\n * @param {JsonLdContextNormalized} context The context.\n */\n pushId(term, startOnNewLine, context) {\n if (term.termType === 'Quad') {\n this.pushNestedQuad(term, true, context);\n }\n else {\n const subjectValue = term.termType === 'BlankNode'\n ? '_:' + term.value : context.compactIri(term.value, false);\n if (startOnNewLine) {\n this.pushSeparator(SeparatorType_1.SeparatorType.OBJECT_START);\n }\n else {\n this.push(SeparatorType_1.SeparatorType.OBJECT_START.label);\n if (this.options.space) {\n this.push('\\n');\n }\n }\n this.indentation++;\n this.pushIndented(this.options.space ? `\"@id\": \"${subjectValue}\",` : `\"@id\":\"${subjectValue}\",`);\n }\n }\n /**\n * Push the given predicate field.\n * @param {Term} predicate An RDF term.\n * @param {JsonLdContextNormalized} context The context.\n */\n pushPredicate(predicate, context) {\n let property = predicate.value;\n // Convert rdf:type into @type if not disabled.\n if (!this.options.useRdfType && property === Util_1.Util.RDF_TYPE) {\n property = '@type';\n this.objectOptions = Object.assign(Object.assign({}, this.options), { compactIds: true, vocab: true });\n }\n // Open array for following objects\n const compactedProperty = context.compactIri(property, true);\n this.pushIndented(this.options.space ? `\"${compactedProperty}\": [` : `\"${compactedProperty}\":[`);\n this.indentation++;\n this.lastPredicate = predicate;\n }\n /**\n * Push the given object value.\n * @param {Term} object An RDF term.\n * @param {JsonLdContextNormalized} context The context.\n */\n pushObject(object, context) {\n // Add a comma if we already had an object for this predicate\n if (!this.hadObjectForPredicate) {\n this.hadObjectForPredicate = true;\n }\n else {\n this.pushSeparator(SeparatorType_1.SeparatorType.COMMA);\n }\n // Handle nested quad\n if (object.termType === 'Quad') {\n const lastLastSubject = this.lastSubject;\n const lastLastPredicate = this.lastPredicate;\n this.hadObjectForPredicate = false;\n this.pushNestedQuad(object, false, context);\n this.endSubject(false); // Terminate identifier node of nested quad again, since we won't attach additional information to it.\n this.hadObjectForPredicate = true;\n this.lastPredicate = lastLastPredicate;\n this.lastSubject = lastLastSubject;\n return;\n }\n // Convert the object into a value and push it\n let value;\n try {\n if (object['@list']) {\n value = object;\n }\n else {\n value = Util_1.Util.termToValue(object, context, this.objectOptions || this.options);\n }\n }\n catch (e) {\n return this.emit('error', e);\n }\n this.pushIndented(JSON.stringify(value, null, this.options.space));\n }\n pushNestedQuad(nestedQuad, commaAfterSubject, context) {\n // Start a nested quad\n this.pushSeparator(SeparatorType_1.SeparatorType.OBJECT_START);\n this.indentation++;\n this.pushIndented(this.options.space ? `\"@id\": ` : `\"@id\":`, false);\n // Print the nested quad\n if (nestedQuad.graph.termType !== 'DefaultGraph') {\n this.emit('error', new Error(`Found a nested quad with the non-default graph: ${nestedQuad.graph.value}`));\n }\n this.pushId(nestedQuad.subject, false, context);\n this.pushPredicate(nestedQuad.predicate, context);\n this.pushObject(nestedQuad.object, context);\n this.endPredicate(false);\n this.endSubject(commaAfterSubject);\n }\n endDocument() {\n this.opened = false;\n if (this.originalContext && !this.options.excludeContext) {\n this.indentation--;\n this.pushSeparator(SeparatorType_1.SeparatorType.ARRAY_END);\n this.indentation--;\n this.pushSeparator(SeparatorType_1.SeparatorType.OBJECT_END);\n }\n else {\n this.indentation--;\n this.pushSeparator(SeparatorType_1.SeparatorType.ARRAY_END);\n }\n }\n /**\n * Push the end of a predicate and reset the buffers.\n * @param {boolean} comma If a comma should be appended.\n */\n endPredicate(comma) {\n // Close the predicate array\n this.indentation--;\n this.pushSeparator(comma ? SeparatorType_1.SeparatorType.ARRAY_END_COMMA : SeparatorType_1.SeparatorType.ARRAY_END);\n // Reset object buffer\n this.hadObjectForPredicate = false;\n this.objectOptions = null;\n // Reset predicate buffer\n this.lastPredicate = null;\n }\n /**\n * Push the end of a subject and reset the buffers.\n * @param {boolean} comma If a comma should be appended.\n */\n endSubject(comma) {\n // Close the last subject's node;\n this.indentation--;\n this.pushSeparator(comma ? SeparatorType_1.SeparatorType.OBJECT_END_COMMA : SeparatorType_1.SeparatorType.OBJECT_END);\n // Reset subject buffer\n this.lastSubject = null;\n }\n /**\n * Push the end of a graph and reset the buffers.\n * @param {boolean} comma If a comma should be appended.\n */\n endGraph(comma) {\n // Close the graph array\n this.indentation--;\n this.pushSeparator(SeparatorType_1.SeparatorType.ARRAY_END);\n // Close the graph id node\n this.indentation--;\n this.pushSeparator(comma ? SeparatorType_1.SeparatorType.OBJECT_END_COMMA : SeparatorType_1.SeparatorType.OBJECT_END);\n // Reset graph buffer\n this.lastGraph = null;\n }\n /**\n * Puh the given separator.\n * @param {SeparatorType} type A type of separator.\n */\n pushSeparator(type) {\n this.pushIndented(type.label);\n }\n /**\n * An indentation-aware variant of {@link #push}.\n * All strings that are pushed here will be prefixed by {@link #indentation} amount of spaces.\n * @param {string} data A string.\n * @param pushNewLine If a newline should be pushed afterwards.\n */\n pushIndented(data, pushNewLine = true) {\n const prefix = this.getIndentPrefix();\n const lines = data.split('\\n').map((line) => prefix + line).join('\\n');\n this.push(lines);\n if (this.options.space && pushNewLine) {\n this.push('\\n');\n }\n }\n /**\n * @return {string} Get the current indentation prefix based on {@link #indentation}.\n */\n getIndentPrefix() {\n return this.options.space ? this.options.space.repeat(this.indentation) : '';\n }\n}\nexports.JsonLdSerializer = JsonLdSerializer;\n//# sourceMappingURL=JsonLdSerializer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SeparatorType = void 0;\n/**\n * A type of JSON separator.\n */\nclass SeparatorType {\n constructor(label) {\n this.label = label;\n }\n}\nexports.SeparatorType = SeparatorType;\nSeparatorType.COMMA = new SeparatorType(',');\nSeparatorType.OBJECT_START = new SeparatorType('{');\nSeparatorType.OBJECT_END = new SeparatorType('}');\nSeparatorType.OBJECT_END_COMMA = new SeparatorType('},');\nSeparatorType.ARRAY_START = new SeparatorType('[');\nSeparatorType.ARRAY_END = new SeparatorType(']');\nSeparatorType.ARRAY_END_COMMA = new SeparatorType('],');\nSeparatorType.GRAPH_FIELD_NONCOMPACT = new SeparatorType('\"@graph\": [');\nSeparatorType.GRAPH_FIELD_COMPACT = new SeparatorType('\"@graph\":[');\nSeparatorType.CONTEXT_FIELD = new SeparatorType('\"@context\":');\n//# sourceMappingURL=SeparatorType.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Util = void 0;\nconst jsonld_context_parser_1 = require(\"jsonld-context-parser\");\n/**\n * Utility functions and methods.\n */\nclass Util {\n /**\n * Convert an RDF term to a JSON value.\n * @param {Term} term An RDF term.\n * @param {JsonLdContextNormalized} context The context.\n * @param {ITermToValueOptions} options Conversion options.\n * @return {any} A JSON value.\n */\n static termToValue(term, context, options = {\n compactIds: false,\n useNativeTypes: false,\n }) {\n switch (term.termType) {\n case 'NamedNode':\n const compacted = context.compactIri(term.value, options.vocab);\n return options.compactIds ? compacted : { '@id': compacted };\n case 'DefaultGraph':\n return options.compactIds ? term.value : { '@id': term.value };\n case 'BlankNode':\n const id = `_:${term.value}`;\n return options.compactIds ? id : { '@id': id };\n case 'Literal':\n // Handle JSON datatype\n if (term.datatype.value === Util.RDF_JSON) {\n let parsedJson;\n try {\n parsedJson = JSON.parse(term.value);\n }\n catch (e) {\n throw new jsonld_context_parser_1.ErrorCoded('Invalid JSON literal: ' + e.message, jsonld_context_parser_1.ERROR_CODES.INVALID_JSON_LITERAL);\n }\n return {\n '@value': parsedJson,\n '@type': '@json',\n };\n }\n // Handle rdfDirection: i18n-datatype\n if (options.rdfDirection === 'i18n-datatype' && term.datatype.value.startsWith(Util.I18N)) {\n const [language, direction] = term.datatype.value\n .substr(Util.I18N.length, term.datatype.value.length)\n .split('_');\n return Object.assign(Object.assign({ '@value': term.value }, language ? { '@language': language } : {}), direction ? { '@direction': direction } : {});\n }\n const stringType = term.datatype.value === Util.XSD_STRING;\n const rawValue = {\n '@value': !stringType && options.useNativeTypes\n ? Util.stringToNativeType(term.value, term.datatype.value) : term.value,\n };\n if (term.language) {\n return Object.assign(Object.assign({}, rawValue), { '@language': term.language });\n }\n else if (!stringType && typeof rawValue['@value'] === 'string') {\n return Object.assign(Object.assign({}, rawValue), { '@type': term.datatype.value });\n }\n else {\n return rawValue;\n }\n }\n }\n /**\n * Convert a string term to a native type.\n * If no conversion is possible, the original string will be returned.\n * @param {string} value An RDF term's string value.\n * @param {string} type\n * @return {any}\n */\n static stringToNativeType(value, type) {\n if (type.startsWith(Util.XSD)) {\n const xsdType = type.substr(Util.XSD.length);\n switch (xsdType) {\n case 'boolean':\n if (value === 'true') {\n return true;\n }\n else if (value === 'false') {\n return false;\n }\n throw new Error(`Invalid xsd:boolean value '${value}'`);\n case 'integer':\n case 'number':\n case 'int':\n case 'byte':\n case 'long':\n const parsedInt = parseInt(value, 10);\n if (isNaN(parsedInt)) {\n throw new Error(`Invalid xsd:integer value '${value}'`);\n }\n return parsedInt;\n case 'float':\n case 'double':\n const parsedFloat = parseFloat(value);\n if (isNaN(parsedFloat)) {\n throw new Error(`Invalid xsd:float value '${value}'`);\n }\n return parsedFloat;\n }\n }\n return value;\n }\n}\nexports.Util = Util;\nUtil.XSD = 'http://www.w3.org/2001/XMLSchema#';\nUtil.XSD_STRING = Util.XSD + 'string';\nUtil.RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';\nUtil.RDF_TYPE = Util.RDF + 'type';\nUtil.RDF_JSON = Util.RDF + 'JSON';\nUtil.I18N = 'https://www.w3.org/ns/i18n#';\n//# sourceMappingURL=Util.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/propertyhandler/IItemPropertyHandler\"), exports);\n__exportStar(require(\"./lib/propertyhandler/ItemPropertyHandlerContent\"), exports);\n__exportStar(require(\"./lib/propertyhandler/ItemPropertyHandlerNumber\"), exports);\n__exportStar(require(\"./lib/propertyhandler/ItemPropertyHandlerTime\"), exports);\n__exportStar(require(\"./lib/propertyhandler/ItemPropertyHandlerUrl\"), exports);\n__exportStar(require(\"./lib/IHtmlParseListener\"), exports);\n__exportStar(require(\"./lib/IItemScope\"), exports);\n__exportStar(require(\"./lib/IVocabRegistry\"), exports);\n__exportStar(require(\"./lib/MicrodataRdfParser\"), exports);\n__exportStar(require(\"./lib/Util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IHtmlParseListener.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IItemScope.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IVocabRegistry.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MicrodataRdfParser = void 0;\nconst htmlparser2_1 = require(\"htmlparser2\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst ItemPropertyHandlerContent_1 = require(\"./propertyhandler/ItemPropertyHandlerContent\");\nconst ItemPropertyHandlerNumber_1 = require(\"./propertyhandler/ItemPropertyHandlerNumber\");\nconst ItemPropertyHandlerTime_1 = require(\"./propertyhandler/ItemPropertyHandlerTime\");\nconst ItemPropertyHandlerUrl_1 = require(\"./propertyhandler/ItemPropertyHandlerUrl\");\nconst Util_1 = require(\"./Util\");\nconst VOCAB_REGISTRY_DEFAULT = require(\"./vocab-registry-default.json\");\n/**\n * A stream transformer that parses Microdata (text) streams to an {@link RDF.Stream}.\n */\nclass MicrodataRdfParser extends readable_stream_1.Transform {\n constructor(options) {\n super({ readableObjectMode: true });\n // Stacks, where the key is the current depth.\n this.itemScopeStack = [];\n this.textBufferStack = [];\n // Variables for managing itemrefs.\n this.isEmittingReferences = false;\n this.pendingItemRefsDomain = {};\n this.pendingItemRefsRangeFinalized = {};\n // eslint-disable-next-line lines-between-class-members\n this.pendingItemRefsRangeCollecting = {};\n options = options || {};\n this.options = options;\n this.util = new Util_1.Util(options.dataFactory, options.baseIRI);\n this.defaultGraph = options.defaultGraph || this.util.dataFactory.defaultGraph();\n this.htmlParseListener = options.htmlParseListener;\n this.vocabRegistry = options.vocabRegistry || VOCAB_REGISTRY_DEFAULT;\n this.parser = this.initializeParser(!!options.xmlMode);\n }\n /**\n * Parses the given text stream into a quad stream.\n * @param {NodeJS.EventEmitter} stream A text stream.\n * @return {RDF.Stream} A quad stream.\n */\n import(stream) {\n const output = new readable_stream_1.PassThrough({ readableObjectMode: true });\n stream.on('error', (error) => parsed.emit('error', error));\n stream.on('data', (data) => output.push(data));\n stream.on('end', () => output.push(null));\n const parsed = output.pipe(new MicrodataRdfParser(this.options));\n return parsed;\n }\n _transform(chunk, encoding, callback) {\n this.parser.write(chunk.toString());\n callback();\n }\n _flush(callback) {\n this.parser.end();\n callback();\n }\n /**\n * Get the current item scope for the current depth.\n * This will skip all undefined item scopes.\n * @param parent If we should start looking one level higher in the stack.\n */\n getItemScope(parent) {\n let parentTagI = this.itemScopeStack.length - (parent ? 2 : 1);\n while (parentTagI > 0 && !this.itemScopeStack[parentTagI]) {\n parentTagI--;\n }\n return this.itemScopeStack[parentTagI];\n }\n /**\n * Get the current stack depth.\n */\n getDepth() {\n return this.itemScopeStack.length;\n }\n onTagOpen(name, attributes) {\n if (!this.isEmittingReferences) {\n // If the tag has an 'id', start collecting the whole stack in the item reference buffer\n if ('id' in attributes) {\n const id = attributes.id;\n this.pendingItemRefsRangeCollecting[id] = {\n events: [],\n counter: 0,\n ids: [],\n };\n }\n // Store this event in all collecting item reference buffers\n for (const buffer of Object.values(this.pendingItemRefsRangeCollecting)) {\n buffer.counter++;\n buffer.events.push({ type: 'open', name, attributes });\n }\n }\n // Ensure the text buffer stack is in line with the stack depth\n this.textBufferStack.push(undefined);\n // Processing steps based on https://w3c.github.io/microdata-rdf/#rdf-conversion-algorithm\n // 1. Determine the current item scope\n let itemScope;\n if ('itemscope' in attributes) {\n // Create a new item scope\n let subject;\n if (this.emittingReferencesItemScopeIdGenerator) {\n subject = this.emittingReferencesItemScopeIdGenerator();\n }\n else {\n subject = 'itemid' in attributes && this.util.createSubject(attributes.itemid) ||\n this.util.dataFactory.blankNode();\n // Store the genererated id in all collecting item reference buffers\n for (const buffer of Object.values(this.pendingItemRefsRangeCollecting)) {\n buffer.ids.push(subject);\n }\n }\n itemScope = { subject };\n // If the id was reused from a reference, block any new triples to be generated from it\n if (this.isEmittingReferences) {\n itemScope.blockEmission = true;\n }\n // Inherit vocab from parent item scope\n const parentItemScope = this.getItemScope();\n if (parentItemScope && parentItemScope.vocab) {\n itemScope.vocab = parentItemScope.vocab;\n }\n // 2. Push any changes to the item scope to the stack\n this.itemScopeStack.push(itemScope);\n }\n else {\n // Determine the parent item scope\n itemScope = this.getItemScope();\n // 2. Push any changes to the item scope to the stack\n this.itemScopeStack.push(undefined);\n }\n // If we have a valid item scope, process the current node\n if (itemScope) {\n // 3. Handle item types\n if ('itemtype' in attributes) {\n for (const type of this.util.createVocabIris(attributes.itemtype, itemScope, false)) {\n // 4. Vocab identifier is the first valid item\n if (!itemScope.vocab) {\n // 5. Modify vocab based on registry\n itemScope.vocab = this.util.deriveVocab(type.value, this.vocabRegistry);\n }\n // Emit item type\n if (!itemScope.blockEmission) {\n this.emitTriple(itemScope.subject, this.util.dataFactory.namedNode(`${Util_1.Util.RDF}type`), type);\n }\n }\n }\n // Save language in item scope\n if ('lang' in attributes) {\n itemScope.language = attributes.lang;\n }\n if ('xml:lang' in attributes) {\n itemScope.language = attributes['xml:lang'];\n }\n // Handle itemrefs (only if we also had an itemscope)\n // If we have an itemref, store it in our domain buffer.\n if ('itemscope' in attributes &&\n !this.isEmittingReferences && 'itemref' in attributes) {\n for (const reference of attributes.itemref.split(/\\s+/u)) {\n if (!(reference in this.pendingItemRefsDomain)) {\n this.pendingItemRefsDomain[reference] = [];\n }\n this.pendingItemRefsDomain[reference].push(itemScope);\n this.tryToEmitReferences(reference, itemScope);\n }\n }\n }\n // 6. Handle item properties\n if ('itemprop' in attributes) {\n this.handleItemProperties(attributes.itemprop, false, itemScope, name, attributes);\n }\n // Handle reverse item properties\n // https://w3c.github.io/microdata-rdf/#reverse-itemprop\n if ('itemprop-reverse' in attributes) {\n this.handleItemProperties(attributes['itemprop-reverse'], true, itemScope, name, attributes);\n }\n }\n onText(data) {\n // Store this event in all collecting item reference buffers\n if (!this.isEmittingReferences) {\n for (const buffer of Object.values(this.pendingItemRefsRangeCollecting)) {\n buffer.events.push({ type: 'text', data });\n }\n }\n // Save the text inside all item scopes that need to collect text\n for (const textBuffer of this.textBufferStack) {\n if (textBuffer) {\n textBuffer.push(data);\n }\n }\n }\n onTagClose() {\n // Store this event in all collecting item reference buffers\n if (!this.isEmittingReferences) {\n for (const [reference, buffer] of Object.entries(this.pendingItemRefsRangeCollecting)) {\n buffer.counter--;\n buffer.events.push({ type: 'close' });\n // Once the counter becomes zero, the tag is fully buffered, so we finalize it.\n if (buffer.counter === 0) {\n this.pendingItemRefsRangeFinalized[reference] = buffer;\n delete this.pendingItemRefsRangeCollecting[reference];\n // Try to emit this reference with buffered domain items\n this.tryToEmitReferences(reference);\n }\n }\n }\n // Emit all triples that were determined in the active tag\n const itemScope = this.getItemScope(true);\n if (itemScope) {\n const depth = this.getDepth();\n if (itemScope.predicates && depth in itemScope.predicates) {\n for (const [predicateKey, predicates] of Object.entries(itemScope.predicates[depth])) {\n // First check if we have a child item scope, otherwise get the text content\n // Safely cast textBufferStack, as it is always defined when itemScope.predicates is defined.\n const object = this.util.createLiteral(this.textBufferStack[depth].join(''), itemScope);\n this.emitPredicateTriples(itemScope, predicates, object, predicateKey === 'reverse');\n delete itemScope.predicates[depth][predicateKey];\n }\n }\n }\n // Remove the active tag from the stack\n this.itemScopeStack.pop();\n this.textBufferStack.pop();\n }\n onEnd() {\n // Nothing important should happen here.\n }\n /**\n * Initialize a new HtmlParser.\n * @param xmlMode If the parser should be setup in strict mode.\n */\n initializeParser(xmlMode) {\n return new htmlparser2_1.Parser({\n onclosetag: () => {\n try {\n this.onTagClose();\n if (this.htmlParseListener) {\n this.htmlParseListener.onTagClose();\n }\n }\n catch (error) {\n this.emit('error', error);\n }\n },\n onend: () => {\n try {\n this.onEnd();\n if (this.htmlParseListener) {\n this.htmlParseListener.onEnd();\n }\n }\n catch (error) {\n this.emit('error', error);\n }\n },\n onopentag: (name, attributes) => {\n try {\n this.onTagOpen(name, attributes);\n if (this.htmlParseListener) {\n this.htmlParseListener.onTagOpen(name, attributes);\n }\n }\n catch (error) {\n this.emit('error', error);\n }\n },\n ontext: (data) => {\n try {\n this.onText(data);\n if (this.htmlParseListener) {\n this.htmlParseListener.onText(data);\n }\n }\n catch (error) {\n this.emit('error', error);\n }\n },\n }, {\n decodeEntities: true,\n recognizeSelfClosing: true,\n xmlMode,\n });\n }\n /**\n * Handle the given item properties.\n * @param itempropValue The value of itemprop or itemprop-reverse.\n * @param reverse If the item properties are reversed (itemprop-reverse).\n * @param itemScope The current item scope.\n * @param tagName The current tag name.\n * @param tagAttributes The current tag attributes.\n */\n handleItemProperties(itempropValue, reverse, itemScope, tagName, tagAttributes) {\n const parentItemScope = this.getItemScope(true);\n if (parentItemScope) {\n // Set predicates in the scope, and handle them on tag close.\n const depth = this.getDepth();\n const predicates = this.util.createVocabIris(itempropValue, parentItemScope, true);\n if (!parentItemScope.predicates) {\n parentItemScope.predicates = {};\n }\n if (!parentItemScope.predicates[depth]) {\n parentItemScope.predicates[depth] = {};\n }\n const predicatesKey = reverse ? 'reverse' : 'forward';\n parentItemScope.predicates[depth][predicatesKey] = predicates;\n // Append rdf:type predicate if vocabulary expansion applies\n for (const vocabularyExpansionType of this.util.getVocabularyExpansionType(itempropValue, parentItemScope, this.vocabRegistry)) {\n predicates.push(vocabularyExpansionType);\n }\n // Check if a property handler that applies, forcefully use that as predicate value.\n // But DON'T call handlers in this prop is a direct (nested) itemscope.\n if (itemScope && 'itemscope' in tagAttributes) {\n this.emitPredicateTriples(parentItemScope, predicates, itemScope.subject, reverse);\n // Finalize the predicates, so text values do not apply to them.\n delete parentItemScope.predicates[depth][predicatesKey];\n }\n else {\n for (const handler of MicrodataRdfParser.ITEM_PROPERTY_HANDLERS) {\n if (handler.canHandle(tagName, tagAttributes)) {\n const object = handler.getObject(tagAttributes, this.util, parentItemScope);\n this.emitPredicateTriples(parentItemScope, predicates, object, reverse);\n // Finalize the predicates, so text values do not apply to them.\n delete parentItemScope.predicates[depth][predicatesKey];\n }\n }\n }\n // If no valid handler was found, indicate that we should collect text at this depth.\n if (parentItemScope.predicates[depth][predicatesKey]) {\n this.textBufferStack[depth] = [];\n }\n }\n }\n /**\n * Emit the given object for the given predicates.\n * @param itemScope The current item scope.\n * @param predicates An array of predicates.\n * @param object An object.\n * @param reverse If the triples should be reversed.\n */\n emitPredicateTriples(itemScope, predicates, object, reverse) {\n if (!itemScope.blockEmission) {\n for (const predicate of predicates) {\n if (reverse) {\n // Literals can not exist in subject position, so they must be ignored.\n if (object.termType !== 'Literal') {\n this.emitTriple(object, predicate, itemScope.subject);\n }\n }\n else {\n this.emitTriple(itemScope.subject, predicate, object);\n }\n }\n }\n }\n /**\n * Emit the given triple to the stream.\n * @param {Quad_Subject} subject A subject term.\n * @param {Quad_Predicate} predicate A predicate term.\n * @param {Quad_Object} object An object term.\n */\n emitTriple(subject, predicate, object) {\n this.push(this.util.dataFactory.quad(subject, predicate, object, this.defaultGraph));\n }\n /**\n * Attempt to emit all pending itemrefs for the given reference.\n * @param reference An item reference id.\n * @param itemScopeDomain An optional item scope. If defined, only refs from this scope will be emitted.\n */\n tryToEmitReferences(reference, itemScopeDomain) {\n const range = this.pendingItemRefsRangeFinalized[reference];\n if (range) {\n // Determine the item scope domains to emit\n let applicableItemScopes;\n if (itemScopeDomain) {\n applicableItemScopes = [itemScopeDomain];\n // Remove the item from the pending array\n // Element is guaranteed to exist in buffer\n const itemScopeDomainIndex = this.pendingItemRefsDomain[reference].indexOf(itemScopeDomain);\n this.pendingItemRefsDomain[reference].splice(itemScopeDomainIndex, 1);\n }\n else {\n applicableItemScopes = this.pendingItemRefsDomain[reference];\n // Remove all items from the pending array\n delete this.pendingItemRefsDomain[reference];\n }\n if (applicableItemScopes) {\n // Save the stack state\n const itemScopeStackOld = this.itemScopeStack;\n const textBufferStackOld = this.textBufferStack;\n this.isEmittingReferences = true;\n // For all applicable item scopes, emit the buffered events.\n for (const itemScope of applicableItemScopes) {\n this.itemScopeStack = [itemScope];\n this.textBufferStack = [undefined];\n const pendingIds = [...range.ids];\n this.emittingReferencesItemScopeIdGenerator = () => pendingIds.shift();\n for (const event of range.events) {\n switch (event.type) {\n case 'open':\n this.onTagOpen(event.name, event.attributes);\n break;\n case 'text':\n this.onText(event.data);\n break;\n case 'close':\n this.onTagClose();\n break;\n }\n }\n }\n // Restore the stack state\n this.emittingReferencesItemScopeIdGenerator = undefined;\n this.itemScopeStack = itemScopeStackOld;\n this.textBufferStack = textBufferStackOld;\n this.isEmittingReferences = false;\n }\n }\n }\n}\nexports.MicrodataRdfParser = MicrodataRdfParser;\nMicrodataRdfParser.ITEM_PROPERTY_HANDLERS = [\n new ItemPropertyHandlerContent_1.ItemPropertyHandlerContent(),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('a', 'href'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('area', 'href'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('audio', 'src'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('embed', 'src'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('iframe', 'src'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('img', 'src'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('link', 'href'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('object', 'data'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('source', 'src'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('track', 'src'),\n new ItemPropertyHandlerUrl_1.ItemPropertyHandlerUrl('video', 'src'),\n new ItemPropertyHandlerNumber_1.ItemPropertyHandlerNumber('data', 'value'),\n new ItemPropertyHandlerNumber_1.ItemPropertyHandlerNumber('meter', 'value'),\n new ItemPropertyHandlerTime_1.ItemPropertyHandlerTime(),\n];\n//# sourceMappingURL=MicrodataRdfParser.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Util = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst relative_to_absolute_iri_1 = require(\"relative-to-absolute-iri\");\n/**\n * A collection of utility functions.\n */\nclass Util {\n constructor(dataFactory, baseIRI) {\n this.dataFactory = dataFactory || new rdf_data_factory_1.DataFactory();\n this.baseIRI = baseIRI || '';\n }\n /**\n * Check if the given IRI is valid.\n * @param {string} iri A potential IRI.\n * @return {boolean} If the given IRI is valid.\n */\n static isValidIri(iri) {\n return Util.IRI_REGEX.test(iri);\n }\n /**\n * Create vocab terms for the given terms attribute.\n *\n * Relative IRIs will be based on the active vocab or baseIRI if `allowRelativeIris` is true.\n *\n * @param {string} terms An attribute value.\n * @param {IItemScope} itemScope The active item scope.\n * @param {boolean} allowRelativeIris If relative IRIs are allowed.\n * @return {Term[]} The IRI terms.\n */\n createVocabIris(terms, itemScope, allowRelativeIris) {\n return terms.split(/\\s+/u)\n .filter(term => !!term)\n .map(property => {\n if (!Util.isValidIri(property)) {\n if (!allowRelativeIris) {\n return;\n }\n property = `${itemScope.vocab || `${this.baseIRI}#`}${property}`;\n }\n return this.dataFactory.namedNode(property);\n })\n .filter(term => !!term);\n }\n /**\n * Get the predicates for which the given itemprop value should cause vocabulary expansion.\n * @param terms An attribute value.\n * @param itemScope The active item scope.\n * @param vocabRegistry The active vocabulary registry.\n */\n getVocabularyExpansionType(terms, itemScope, vocabRegistry) {\n // Check the presence of subPropertyOf or equivalentProperty\n const parts = terms.split(/\\s+/u);\n if (parts.includes('subPropertyOf') || parts.includes('equivalentProperty')) {\n return [this.dataFactory.namedNode(`${Util.RDF}type`)];\n }\n // Check in the item scope's vocab\n if (itemScope.vocab && itemScope.vocab in vocabRegistry && vocabRegistry[itemScope.vocab].properties) {\n let predicates = [];\n for (const [property, expansions] of Object\n .entries(vocabRegistry[itemScope.vocab].properties)) {\n if (parts.includes(property)) {\n predicates = [...Object.values(expansions).map(iri => this.dataFactory.namedNode(iri))];\n }\n }\n return predicates;\n }\n return [];\n }\n /**\n * Create a named node for the given term, which can be relative to the document base.\n * @param {string} iri A term string.\n * @return {Term} An RDF term, or undefined if invalid.\n */\n createSubject(iri) {\n if (!Util.isValidIri(iri)) {\n try {\n iri = (0, relative_to_absolute_iri_1.resolve)(iri, this.baseIRI);\n }\n catch (_a) {\n return;\n }\n }\n return this.dataFactory.namedNode(iri);\n }\n /**\n * Create a new literal node.\n * @param {string} literal The literal value.\n * @param {IActiveTag} activeTag The current active tag.\n * @return {Literal} A new literal node.\n */\n createLiteral(literal, activeTag) {\n return this.dataFactory.literal(literal, activeTag.language);\n }\n /**\n * Determine the vocab IRI from a given type IRI.\n * @link https://w3c.github.io/microdata-rdf/#property-uri-generation\n * @param typeIri A type IRI.\n * @param vocabRegistry The active vocabulary registry.\n */\n deriveVocab(typeIri, vocabRegistry) {\n let vocab;\n // First check if we find a prefix in the vocab registry\n for (const uriPrefix in vocabRegistry) {\n if (typeIri.startsWith(uriPrefix)) {\n vocab = uriPrefix;\n // Append fragment if prefix does not end with a slash\n if (!vocab.endsWith('/')) {\n vocab += '#';\n }\n break;\n }\n }\n // If no match was found, remove the last path segment from the URI\n if (!vocab) {\n const hashPos = typeIri.indexOf('#');\n if (hashPos > 0) {\n vocab = typeIri.slice(0, hashPos + 1);\n }\n else {\n vocab = (0, relative_to_absolute_iri_1.resolve)('.', typeIri);\n }\n }\n return vocab;\n }\n}\nexports.Util = Util;\nUtil.RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';\nUtil.XSD = 'http://www.w3.org/2001/XMLSchema#';\nUtil.RDFA = 'http://www.w3.org/ns/rdfa#';\nUtil.IRI_REGEX = /^([A-Za-z][\\d+-.A-Za-z]*|_):[^ \"<>[\\\\\\]`{|}]*$/u;\n//# sourceMappingURL=Util.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IItemPropertyHandler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ItemPropertyHandlerContent = void 0;\n/**\n * Handler for an item property with the 'content' attribute.\n */\nclass ItemPropertyHandlerContent {\n canHandle(tagName, attributes) {\n return 'content' in attributes;\n }\n getObject(attributes, util, itemScope) {\n return util.createLiteral(attributes.content, itemScope);\n }\n}\nexports.ItemPropertyHandlerContent = ItemPropertyHandlerContent;\n//# sourceMappingURL=ItemPropertyHandlerContent.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ItemPropertyHandlerNumber = void 0;\nconst Util_1 = require(\"../Util\");\n/**\n * Handler for an item property with a number attribute.\n */\nclass ItemPropertyHandlerNumber {\n constructor(tagName, attributeName) {\n this.tagName = tagName;\n this.attributeName = attributeName;\n }\n canHandle(tagName, attributes) {\n return this.tagName === tagName && this.attributeName in attributes;\n }\n getObject(attributes, util, itemScope) {\n const value = attributes[this.attributeName];\n let datatype;\n if (!Number.isNaN(Number.parseInt(value, 10)) && !value.includes('.')) {\n datatype = `${Util_1.Util.XSD}integer`;\n }\n else if (!Number.isNaN(Number.parseFloat(value))) {\n datatype = `${Util_1.Util.XSD}double`;\n }\n return util.dataFactory.literal(value, datatype && util.dataFactory.namedNode(datatype));\n }\n}\nexports.ItemPropertyHandlerNumber = ItemPropertyHandlerNumber;\n//# sourceMappingURL=ItemPropertyHandlerNumber.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ItemPropertyHandlerTime = void 0;\nconst Util_1 = require(\"../Util\");\n/**\n * Handler for an item property for time tags.\n */\nclass ItemPropertyHandlerTime {\n canHandle(tagName, attributes) {\n return tagName === 'time' && 'datetime' in attributes;\n }\n getObject(attributes, util, itemScope) {\n const value = attributes.datetime;\n let datatype;\n for (const entry of ItemPropertyHandlerTime.TIME_REGEXES) {\n if (entry.regex.test(value)) {\n datatype = util.dataFactory.namedNode(Util_1.Util.XSD + entry.type);\n break;\n }\n }\n return util.dataFactory.literal(value, datatype);\n }\n}\nexports.ItemPropertyHandlerTime = ItemPropertyHandlerTime;\nItemPropertyHandlerTime.TIME_REGEXES = [\n {\n regex: /^-?P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+(\\.\\d)?S)?)?$/u,\n type: 'duration',\n },\n {\n regex: /^\\d+-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d((Z?)|([+-]\\d\\d:\\d\\d))$/u,\n type: 'dateTime',\n },\n { regex: /^\\d+-\\d\\d-\\d\\dZ?$/u, type: 'date' },\n { regex: /^\\d\\d:\\d\\d:\\d\\d((Z?)|([+-]\\d\\d:\\d\\d))$/u, type: 'time' },\n { regex: /^\\d+-\\d\\d$/u, type: 'gYearMonth' },\n { regex: /^\\d+$/u, type: 'gYear' },\n];\n//# sourceMappingURL=ItemPropertyHandlerTime.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ItemPropertyHandlerUrl = void 0;\nconst relative_to_absolute_iri_1 = require(\"relative-to-absolute-iri\");\n/**\n * Handler for an item property with a URL attribute.\n */\nclass ItemPropertyHandlerUrl {\n constructor(tagName, attributeName) {\n this.tagName = tagName;\n this.attributeName = attributeName;\n }\n canHandle(tagName, attributes) {\n return this.tagName === tagName && this.attributeName in attributes;\n }\n getObject(attributes, util, itemScope) {\n return util.dataFactory.namedNode((0, relative_to_absolute_iri_1.resolve)(attributes[this.attributeName], util.baseIRI));\n }\n}\nexports.ItemPropertyHandlerUrl = ItemPropertyHandlerUrl;\n//# sourceMappingURL=ItemPropertyHandlerUrl.js.map","module.exports = assert;\n\nfunction assert(val, msg) {\n if (!val)\n throw new Error(msg || 'Assertion failed');\n}\n\nassert.equal = function assertEqual(l, r, msg) {\n if (l != r)\n throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));\n};\n","const RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#',\n XSD = 'http://www.w3.org/2001/XMLSchema#',\n SWAP = 'http://www.w3.org/2000/10/swap/';\n\nexport default {\n xsd: {\n decimal: `${XSD}decimal`,\n boolean: `${XSD}boolean`,\n double: `${XSD}double`,\n integer: `${XSD}integer`,\n string: `${XSD}string`,\n },\n rdf: {\n type: `${RDF}type`,\n nil: `${RDF}nil`,\n first: `${RDF}first`,\n rest: `${RDF}rest`,\n langString: `${RDF}langString`,\n },\n owl: {\n sameAs: 'http://www.w3.org/2002/07/owl#sameAs',\n },\n r: {\n forSome: `${SWAP}reify#forSome`,\n forAll: `${SWAP}reify#forAll`,\n },\n log: {\n implies: `${SWAP}log#implies`,\n },\n};\n","// **N3Lexer** tokenizes N3 documents.\nimport queueMicrotask from 'queue-microtask';\nimport namespaces from './IRIs';\n\nconst { xsd } = namespaces;\n\n// Regular expression and replacement string to escape N3 strings\nconst escapeSequence = /\\\\u([a-fA-F0-9]{4})|\\\\U([a-fA-F0-9]{8})|\\\\([^])/g;\nconst escapeReplacements = {\n '\\\\': '\\\\', \"'\": \"'\", '\"': '\"',\n 'n': '\\n', 'r': '\\r', 't': '\\t', 'f': '\\f', 'b': '\\b',\n '_': '_', '~': '~', '.': '.', '-': '-', '!': '!', '$': '$', '&': '&',\n '(': '(', ')': ')', '*': '*', '+': '+', ',': ',', ';': ';', '=': '=',\n '/': '/', '?': '?', '#': '#', '@': '@', '%': '%',\n};\nconst illegalIriChars = /[\\x00-\\x20<>\\\\\"\\{\\}\\|\\^\\`]/;\n\nconst lineModeRegExps = {\n _iri: true,\n _unescapedIri: true,\n _simpleQuotedString: true,\n _langcode: true,\n _blank: true,\n _newline: true,\n _comment: true,\n _whitespace: true,\n _endOfFile: true,\n};\nconst invalidRegExp = /$0^/;\n\n// ## Constructor\nexport default class N3Lexer {\n constructor(options) {\n // ## Regular expressions\n // It's slightly faster to have these as properties than as in-scope variables\n this._iri = /^<((?:[^ <>{}\\\\]|\\\\[uU])+)>[ \\t]*/; // IRI with escape sequences; needs sanity check after unescaping\n this._unescapedIri = /^<([^\\x00-\\x20<>\\\\\"\\{\\}\\|\\^\\`]*)>[ \\t]*/; // IRI without escape sequences; no unescaping\n this._simpleQuotedString = /^\"([^\"\\\\\\r\\n]*)\"(?=[^\"])/; // string without escape sequences\n this._simpleApostropheString = /^'([^'\\\\\\r\\n]*)'(?=[^'])/;\n this._langcode = /^@([a-z]+(?:-[a-z0-9]+)*)(?=[^a-z0-9\\-])/i;\n 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<])/;\n 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#()\\[\\]\\{\\}\"'<>]))/;\n 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#()\\[\\]\\{\\}\"'<>])/;\n 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#()\\[\\]\\{\\}\"'<>]))/;\n this._number = /^[\\-+]?(?:(\\d+\\.\\d*|\\.?\\d+)[eE][\\-+]?|\\d*(\\.)?)\\d+(?=\\.?[,;:\\s#()\\[\\]\\{\\}\"'<>])/;\n this._boolean = /^(?:true|false)(?=[.,;\\s#()\\[\\]\\{\\}\"'<>])/;\n this._keyword = /^@[a-z]+(?=[\\s#<:])/i;\n this._sparqlKeyword = /^(?:PREFIX|BASE|GRAPH)(?=[\\s#<])/i;\n this._shortPredicates = /^a(?=[\\s#()\\[\\]\\{\\}\"'<>])/;\n this._newline = /^[ \\t]*(?:#[^\\n\\r]*)?(?:\\r\\n|\\n|\\r)[ \\t]*/;\n this._comment = /#([^\\n\\r]*)/;\n this._whitespace = /^[ \\t]+/;\n this._endOfFile = /^(?:#[^\\n\\r]*)?$/;\n options = options || {};\n\n // In line mode (N-Triples or N-Quads), only simple features may be parsed\n if (this._lineMode = !!options.lineMode) {\n this._n3Mode = false;\n // Don't tokenize special literals\n for (const key in this) {\n if (!(key in lineModeRegExps) && this[key] instanceof RegExp)\n this[key] = invalidRegExp;\n }\n }\n // When not in line mode, enable N3 functionality by default\n else {\n this._n3Mode = options.n3 !== false;\n }\n // Don't output comment tokens by default\n this._comments = !!options.comments;\n // Cache the last tested closing position of long literals\n this._literalClosingPos = 0;\n }\n\n // ## Private methods\n\n // ### `_tokenizeToEnd` tokenizes as for as possible, emitting tokens through the callback\n _tokenizeToEnd(callback, inputFinished) {\n // Continue parsing as far as possible; the loop will return eventually\n let input = this._input;\n let currentLineLength = input.length;\n while (true) {\n // Count and skip whitespace lines\n let whiteSpaceMatch, comment;\n while (whiteSpaceMatch = this._newline.exec(input)) {\n // Try to find a comment\n if (this._comments && (comment = this._comment.exec(whiteSpaceMatch[0])))\n emitToken('comment', comment[1], '', this._line, whiteSpaceMatch[0].length);\n // Advance the input\n input = input.substr(whiteSpaceMatch[0].length, input.length);\n currentLineLength = input.length;\n this._line++;\n }\n // Skip whitespace on current line\n if (!whiteSpaceMatch && (whiteSpaceMatch = this._whitespace.exec(input)))\n input = input.substr(whiteSpaceMatch[0].length, input.length);\n\n // Stop for now if we're at the end\n if (this._endOfFile.test(input)) {\n // If the input is finished, emit EOF\n if (inputFinished) {\n // Try to find a final comment\n if (this._comments && (comment = this._comment.exec(input)))\n emitToken('comment', comment[1], '', this._line, input.length);\n input = null;\n emitToken('eof', '', '', this._line, 0);\n }\n return this._input = input;\n }\n\n // Look for specific token types based on the first character\n const line = this._line, firstChar = input[0];\n let type = '', value = '', prefix = '',\n match = null, matchLength = 0, inconclusive = false;\n switch (firstChar) {\n case '^':\n // We need at least 3 tokens lookahead to distinguish ^^ and ^^pre:fixed\n if (input.length < 3)\n break;\n // Try to match a type\n else if (input[1] === '^') {\n this._previousMarker = '^^';\n // Move to type IRI or prefixed name\n input = input.substr(2);\n if (input[0] !== '<') {\n inconclusive = true;\n break;\n }\n }\n // If no type, it must be a path expression\n else {\n if (this._n3Mode) {\n matchLength = 1;\n type = '^';\n }\n break;\n }\n // Fall through in case the type is an IRI\n case '<':\n // Try to find a full IRI without escape sequences\n if (match = this._unescapedIri.exec(input))\n type = 'IRI', value = match[1];\n // Try to find a full IRI with escape sequences\n else if (match = this._iri.exec(input)) {\n value = this._unescape(match[1]);\n if (value === null || illegalIriChars.test(value))\n return reportSyntaxError(this);\n type = 'IRI';\n }\n // Try to find a nested triple\n else if (input.length > 1 && input[1] === '<')\n type = '<<', matchLength = 2;\n // Try to find a backwards implication arrow\n else if (this._n3Mode && input.length > 1 && input[1] === '=')\n type = 'inverse', matchLength = 2, value = '>';\n break;\n\n case '>':\n if (input.length > 1 && input[1] === '>')\n type = '>>', matchLength = 2;\n break;\n\n case '_':\n // Try to find a blank node. Since it can contain (but not end with) a dot,\n // we always need a non-dot character before deciding it is a blank node.\n // Therefore, try inserting a space if we're at the end of the input.\n if ((match = this._blank.exec(input)) ||\n inputFinished && (match = this._blank.exec(`${input} `)))\n type = 'blank', prefix = '_', value = match[1];\n break;\n\n case '\"':\n // Try to find a literal without escape sequences\n if (match = this._simpleQuotedString.exec(input))\n value = match[1];\n // Try to find a literal wrapped in three pairs of quotes\n else {\n ({ value, matchLength } = this._parseLiteral(input));\n if (value === null)\n return reportSyntaxError(this);\n }\n if (match !== null || matchLength !== 0) {\n type = 'literal';\n this._literalClosingPos = 0;\n }\n break;\n\n case \"'\":\n if (!this._lineMode) {\n // Try to find a literal without escape sequences\n if (match = this._simpleApostropheString.exec(input))\n value = match[1];\n // Try to find a literal wrapped in three pairs of quotes\n else {\n ({ value, matchLength } = this._parseLiteral(input));\n if (value === null)\n return reportSyntaxError(this);\n }\n if (match !== null || matchLength !== 0) {\n type = 'literal';\n this._literalClosingPos = 0;\n }\n }\n break;\n\n case '?':\n // Try to find a variable\n if (this._n3Mode && (match = this._variable.exec(input)))\n type = 'var', value = match[0];\n break;\n\n case '@':\n // Try to find a language code\n if (this._previousMarker === 'literal' && (match = this._langcode.exec(input)))\n type = 'langcode', value = match[1];\n // Try to find a keyword\n else if (match = this._keyword.exec(input))\n type = match[0];\n break;\n\n case '.':\n // Try to find a dot as punctuation\n if (input.length === 1 ? inputFinished : (input[1] < '0' || input[1] > '9')) {\n type = '.';\n matchLength = 1;\n break;\n }\n // Fall through to numerical case (could be a decimal dot)\n\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n case '8':\n case '9':\n case '+':\n case '-':\n // Try to find a number. Since it can contain (but not end with) a dot,\n // we always need a non-dot character before deciding it is a number.\n // Therefore, try inserting a space if we're at the end of the input.\n if (match = this._number.exec(input) ||\n inputFinished && (match = this._number.exec(`${input} `))) {\n type = 'literal', value = match[0];\n prefix = (typeof match[1] === 'string' ? xsd.double :\n (typeof match[2] === 'string' ? xsd.decimal : xsd.integer));\n }\n break;\n\n case 'B':\n case 'b':\n case 'p':\n case 'P':\n case 'G':\n case 'g':\n // Try to find a SPARQL-style keyword\n if (match = this._sparqlKeyword.exec(input))\n type = match[0].toUpperCase();\n else\n inconclusive = true;\n break;\n\n case 'f':\n case 't':\n // Try to match a boolean\n if (match = this._boolean.exec(input))\n type = 'literal', value = match[0], prefix = xsd.boolean;\n else\n inconclusive = true;\n break;\n\n case 'a':\n // Try to find an abbreviated predicate\n if (match = this._shortPredicates.exec(input))\n type = 'abbreviation', value = 'a';\n else\n inconclusive = true;\n break;\n\n case '=':\n // Try to find an implication arrow or equals sign\n if (this._n3Mode && input.length > 1) {\n type = 'abbreviation';\n if (input[1] !== '>')\n matchLength = 1, value = '=';\n else\n matchLength = 2, value = '>';\n }\n break;\n\n case '!':\n if (!this._n3Mode)\n break;\n case ',':\n case ';':\n case '[':\n case ']':\n case '(':\n case ')':\n case '}':\n if (!this._lineMode) {\n matchLength = 1;\n type = firstChar;\n }\n break;\n case '{':\n // We need at least 2 tokens lookahead to distinguish \"{|\" and \"{ \"\n if (!this._lineMode && input.length >= 2) {\n // Try to find a quoted triple annotation start\n if (input[1] === '|')\n type = '{|', matchLength = 2;\n else\n type = firstChar, matchLength = 1;\n }\n break;\n case '|':\n // We need 2 tokens lookahead to parse \"|}\"\n // Try to find a quoted triple annotation end\n if (input.length >= 2 && input[1] === '}')\n type = '|}', matchLength = 2;\n break;\n\n default:\n inconclusive = true;\n }\n\n // Some first characters do not allow an immediate decision, so inspect more\n if (inconclusive) {\n // Try to find a prefix\n if ((this._previousMarker === '@prefix' || this._previousMarker === 'PREFIX') &&\n (match = this._prefix.exec(input)))\n type = 'prefix', value = match[1] || '';\n // Try to find a prefixed name. Since it can contain (but not end with) a dot,\n // we always need a non-dot character before deciding it is a prefixed name.\n // Therefore, try inserting a space if we're at the end of the input.\n else if ((match = this._prefixed.exec(input)) ||\n inputFinished && (match = this._prefixed.exec(`${input} `)))\n type = 'prefixed', prefix = match[1] || '', value = this._unescape(match[2]);\n }\n\n // A type token is special: it can only be emitted after an IRI or prefixed name is read\n if (this._previousMarker === '^^') {\n switch (type) {\n case 'prefixed': type = 'type'; break;\n case 'IRI': type = 'typeIRI'; break;\n default: type = '';\n }\n }\n\n // What if nothing of the above was found?\n if (!type) {\n // We could be in streaming mode, and then we just wait for more input to arrive.\n // Otherwise, a syntax error has occurred in the input.\n // One exception: error on an unaccounted linebreak (= not inside a triple-quoted literal).\n if (inputFinished || (!/^'''|^\"\"\"/.test(input) && /\\n|\\r/.test(input)))\n return reportSyntaxError(this);\n else\n return this._input = input;\n }\n\n // Emit the parsed token\n const length = matchLength || match[0].length;\n const token = emitToken(type, value, prefix, line, length);\n this.previousToken = token;\n this._previousMarker = type;\n\n // Advance to next part to tokenize\n input = input.substr(length, input.length);\n }\n\n // Emits the token through the callback\n function emitToken(type, value, prefix, line, length) {\n const start = input ? currentLineLength - input.length : currentLineLength;\n const end = start + length;\n const token = { type, value, prefix, line, start, end };\n callback(null, token);\n return token;\n }\n // Signals the syntax error through the callback\n function reportSyntaxError(self) { callback(self._syntaxError(/^\\S*/.exec(input)[0])); }\n }\n\n // ### `_unescape` replaces N3 escape codes by their corresponding characters\n _unescape(item) {\n let invalid = false;\n const replaced = item.replace(escapeSequence, (sequence, unicode4, unicode8, escapedChar) => {\n // 4-digit unicode character\n if (typeof unicode4 === 'string')\n return String.fromCharCode(Number.parseInt(unicode4, 16));\n // 8-digit unicode character\n if (typeof unicode8 === 'string') {\n let charCode = Number.parseInt(unicode8, 16);\n return charCode <= 0xFFFF ? String.fromCharCode(Number.parseInt(unicode8, 16)) :\n String.fromCharCode(0xD800 + ((charCode -= 0x10000) >> 10), 0xDC00 + (charCode & 0x3FF));\n }\n // fixed escape sequence\n if (escapedChar in escapeReplacements)\n return escapeReplacements[escapedChar];\n // invalid escape sequence\n invalid = true;\n return '';\n });\n return invalid ? null : replaced;\n }\n\n // ### `_parseLiteral` parses a literal into an unescaped value\n _parseLiteral(input) {\n // Ensure we have enough lookahead to identify triple-quoted strings\n if (input.length >= 3) {\n // Identify the opening quote(s)\n const opening = input.match(/^(?:\"\"\"|\"|'''|'|)/)[0];\n const openingLength = opening.length;\n\n // Find the next candidate closing quotes\n let closingPos = Math.max(this._literalClosingPos, openingLength);\n while ((closingPos = input.indexOf(opening, closingPos)) > 0) {\n // Count backslashes right before the closing quotes\n let backslashCount = 0;\n while (input[closingPos - backslashCount - 1] === '\\\\')\n backslashCount++;\n\n // An even number of backslashes (in particular 0)\n // means these are actual, non-escaped closing quotes\n if (backslashCount % 2 === 0) {\n // Extract and unescape the value\n const raw = input.substring(openingLength, closingPos);\n const lines = raw.split(/\\r\\n|\\r|\\n/).length - 1;\n const matchLength = closingPos + openingLength;\n // Only triple-quoted strings can be multi-line\n if (openingLength === 1 && lines !== 0 ||\n openingLength === 3 && this._lineMode)\n break;\n this._line += lines;\n return { value: this._unescape(raw), matchLength };\n }\n closingPos++;\n }\n this._literalClosingPos = input.length - openingLength + 1;\n }\n return { value: '', matchLength: 0 };\n }\n\n // ### `_syntaxError` creates a syntax error for the given issue\n _syntaxError(issue) {\n this._input = null;\n const err = new Error(`Unexpected \"${issue}\" on line ${this._line}.`);\n err.context = {\n token: undefined,\n line: this._line,\n previousToken: this.previousToken,\n };\n return err;\n }\n\n // ### Strips off any starting UTF BOM mark.\n _readStartingBom(input) {\n return input.startsWith('\\ufeff') ? input.substr(1) : input;\n }\n\n // ## Public methods\n\n // ### `tokenize` starts the transformation of an N3 document into an array of tokens.\n // The input can be a string or a stream.\n tokenize(input, callback) {\n this._line = 1;\n\n // If the input is a string, continuously emit tokens through the callback until the end\n if (typeof input === 'string') {\n this._input = this._readStartingBom(input);\n // If a callback was passed, asynchronously call it\n if (typeof callback === 'function')\n queueMicrotask(() => this._tokenizeToEnd(callback, true));\n // If no callback was passed, tokenize synchronously and return\n else {\n const tokens = [];\n let error;\n this._tokenizeToEnd((e, t) => e ? (error = e) : tokens.push(t), true);\n if (error) throw error;\n return tokens;\n }\n }\n // Otherwise, the input must be a stream\n else {\n this._pendingBuffer = null;\n if (typeof input.setEncoding === 'function')\n input.setEncoding('utf8');\n // Adds the data chunk to the buffer and parses as far as possible\n input.on('data', data => {\n if (this._input !== null && data.length !== 0) {\n // Prepend any previous pending writes\n if (this._pendingBuffer) {\n data = Buffer.concat([this._pendingBuffer, data]);\n this._pendingBuffer = null;\n }\n // Hold if the buffer ends in an incomplete unicode sequence\n if (data[data.length - 1] & 0x80) {\n this._pendingBuffer = data;\n }\n // Otherwise, tokenize as far as possible\n else {\n // Only read a BOM at the start\n if (typeof this._input === 'undefined')\n this._input = this._readStartingBom(typeof data === 'string' ? data : data.toString());\n else\n this._input += data;\n this._tokenizeToEnd(callback, false);\n }\n }\n });\n // Parses until the end\n input.on('end', () => {\n if (typeof this._input === 'string')\n this._tokenizeToEnd(callback, true);\n });\n input.on('error', callback);\n }\n }\n}\n","// N3.js implementations of the RDF/JS core data types\n// See https://github.com/rdfjs/representation-task-force/blob/master/interface-spec.md\n\nimport namespaces from './IRIs';\n\nconst { rdf, xsd } = namespaces;\n\n// eslint-disable-next-line prefer-const\nlet DEFAULTGRAPH;\nlet _blankNodeCounter = 0;\n\nconst escapedLiteral = /^\"(.*\".*)(?=\"[^\"]*$)/;\n\n// ## DataFactory singleton\nconst DataFactory = {\n namedNode,\n blankNode,\n variable,\n literal,\n defaultGraph,\n quad,\n triple: quad,\n};\nexport default DataFactory;\n\n// ## Term constructor\nexport class Term {\n constructor(id) {\n this.id = id;\n }\n\n // ### The value of this term\n get value() {\n return this.id;\n }\n\n // ### Returns whether this object represents the same term as the other\n equals(other) {\n // If both terms were created by this library,\n // equality can be computed through ids\n if (other instanceof Term)\n return this.id === other.id;\n // Otherwise, compare term type and value\n return !!other && this.termType === other.termType &&\n this.value === other.value;\n }\n\n // ### Implement hashCode for Immutable.js, since we implement `equals`\n // https://immutable-js.com/docs/v4.0.0/ValueObject/#hashCode()\n hashCode() {\n return 0;\n }\n\n // ### Returns a plain object representation of this term\n toJSON() {\n return {\n termType: this.termType,\n value: this.value,\n };\n }\n}\n\n\n// ## NamedNode constructor\nexport class NamedNode extends Term {\n // ### The term type of this term\n get termType() {\n return 'NamedNode';\n }\n}\n\n// ## Literal constructor\nexport class Literal extends Term {\n // ### The term type of this term\n get termType() {\n return 'Literal';\n }\n\n // ### The text value of this literal\n get value() {\n return this.id.substring(1, this.id.lastIndexOf('\"'));\n }\n\n // ### The language of this literal\n get language() {\n // Find the last quotation mark (e.g., '\"abc\"@en-us')\n const id = this.id;\n let atPos = id.lastIndexOf('\"') + 1;\n // If \"@\" it follows, return the remaining substring; empty otherwise\n return atPos < id.length && id[atPos++] === '@' ? id.substr(atPos).toLowerCase() : '';\n }\n\n // ### The datatype IRI of this literal\n get datatype() {\n return new NamedNode(this.datatypeString);\n }\n\n // ### The datatype string of this literal\n get datatypeString() {\n // Find the last quotation mark (e.g., '\"abc\"^^http://ex.org/types#t')\n const id = this.id, dtPos = id.lastIndexOf('\"') + 1;\n const char = dtPos < id.length ? id[dtPos] : '';\n // If \"^\" it follows, return the remaining substring\n return char === '^' ? id.substr(dtPos + 2) :\n // If \"@\" follows, return rdf:langString; xsd:string otherwise\n (char !== '@' ? xsd.string : rdf.langString);\n }\n\n // ### Returns whether this object represents the same term as the other\n equals(other) {\n // If both literals were created by this library,\n // equality can be computed through ids\n if (other instanceof Literal)\n return this.id === other.id;\n // Otherwise, compare term type, value, language, and datatype\n return !!other && !!other.datatype &&\n this.termType === other.termType &&\n this.value === other.value &&\n this.language === other.language &&\n this.datatype.value === other.datatype.value;\n }\n\n toJSON() {\n return {\n termType: this.termType,\n value: this.value,\n language: this.language,\n datatype: { termType: 'NamedNode', value: this.datatypeString },\n };\n }\n}\n\n// ## BlankNode constructor\nexport class BlankNode extends Term {\n constructor(name) {\n super(`_:${name}`);\n }\n\n // ### The term type of this term\n get termType() {\n return 'BlankNode';\n }\n\n // ### The name of this blank node\n get value() {\n return this.id.substr(2);\n }\n}\n\nexport class Variable extends Term {\n constructor(name) {\n super(`?${name}`);\n }\n\n // ### The term type of this term\n get termType() {\n return 'Variable';\n }\n\n // ### The name of this variable\n get value() {\n return this.id.substr(1);\n }\n}\n\n// ## DefaultGraph constructor\nexport class DefaultGraph extends Term {\n constructor() {\n super('');\n return DEFAULTGRAPH || this;\n }\n\n // ### The term type of this term\n get termType() {\n return 'DefaultGraph';\n }\n\n // ### Returns whether this object represents the same term as the other\n equals(other) {\n // If both terms were created by this library,\n // equality can be computed through strict equality;\n // otherwise, compare term types.\n return (this === other) || (!!other && (this.termType === other.termType));\n }\n}\n\n// ## DefaultGraph singleton\nDEFAULTGRAPH = new DefaultGraph();\n\n// ### Constructs a term from the given internal string ID\n// The third 'nested' parameter of this function is to aid\n// with recursion over nested terms. It should not be used\n// by consumers of this library.\n// See https://github.com/rdfjs/N3.js/pull/311#discussion_r1061042725\nexport function termFromId(id, factory, nested) {\n factory = factory || DataFactory;\n\n // Falsy value or empty string indicate the default graph\n if (!id)\n return factory.defaultGraph();\n\n // Identify the term type based on the first character\n switch (id[0]) {\n case '?':\n return factory.variable(id.substr(1));\n case '_':\n return factory.blankNode(id.substr(2));\n case '\"':\n // Shortcut for internal literals\n if (factory === DataFactory)\n return new Literal(id);\n // Literal without datatype or language\n if (id[id.length - 1] === '\"')\n return factory.literal(id.substr(1, id.length - 2));\n // Literal with datatype or language\n const endPos = id.lastIndexOf('\"', id.length - 1);\n return factory.literal(id.substr(1, endPos - 1),\n id[endPos + 1] === '@' ? id.substr(endPos + 2)\n : factory.namedNode(id.substr(endPos + 3)));\n case '[':\n id = JSON.parse(id);\n break;\n default:\n if (!nested || !Array.isArray(id)) {\n return factory.namedNode(id);\n }\n }\n return factory.quad(\n termFromId(id[0], factory, true),\n termFromId(id[1], factory, true),\n termFromId(id[2], factory, true),\n id[3] && termFromId(id[3], factory, true)\n );\n}\n\n// ### Constructs an internal string ID from the given term or ID string\n// The third 'nested' parameter of this function is to aid\n// with recursion over nested terms. It should not be used\n// by consumers of this library.\n// See https://github.com/rdfjs/N3.js/pull/311#discussion_r1061042725\nexport function termToId(term, nested) {\n if (typeof term === 'string')\n return term;\n if (term instanceof Term && term.termType !== 'Quad')\n return term.id;\n if (!term)\n return DEFAULTGRAPH.id;\n\n // Term instantiated with another library\n switch (term.termType) {\n case 'NamedNode': return term.value;\n case 'BlankNode': return `_:${term.value}`;\n case 'Variable': return `?${term.value}`;\n case 'DefaultGraph': return '';\n case 'Literal': return `\"${term.value}\"${\n term.language ? `@${term.language}` :\n (term.datatype && term.datatype.value !== xsd.string ? `^^${term.datatype.value}` : '')}`;\n case 'Quad':\n const res = [\n termToId(term.subject, true),\n termToId(term.predicate, true),\n termToId(term.object, true),\n ];\n if (term.graph && term.graph.termType !== 'DefaultGraph') {\n res.push(termToId(term.graph, true));\n }\n return nested ? res : JSON.stringify(res);\n default: throw new Error(`Unexpected termType: ${term.termType}`);\n }\n}\n\n\n// ## Quad constructor\nexport class Quad extends Term {\n constructor(subject, predicate, object, graph) {\n super('');\n this._subject = subject;\n this._predicate = predicate;\n this._object = object;\n this._graph = graph || DEFAULTGRAPH;\n }\n\n // ### The term type of this term\n get termType() {\n return 'Quad';\n }\n\n get subject() {\n return this._subject;\n }\n\n get predicate() {\n return this._predicate;\n }\n\n get object() {\n return this._object;\n }\n\n get graph() {\n return this._graph;\n }\n\n // ### Returns a plain object representation of this quad\n toJSON() {\n return {\n termType: this.termType,\n subject: this._subject.toJSON(),\n predicate: this._predicate.toJSON(),\n object: this._object.toJSON(),\n graph: this._graph.toJSON(),\n };\n }\n\n // ### Returns whether this object represents the same quad as the other\n equals(other) {\n return !!other && this._subject.equals(other.subject) &&\n this._predicate.equals(other.predicate) &&\n this._object.equals(other.object) &&\n this._graph.equals(other.graph);\n }\n}\nexport { Quad as Triple };\n\n// ### Escapes the quotes within the given literal\nexport function escapeQuotes(id) {\n return id.replace(escapedLiteral, (_, quoted) => `\"${quoted.replace(/\"/g, '\"\"')}`);\n}\n\n// ### Unescapes the quotes within the given literal\nexport function unescapeQuotes(id) {\n return id.replace(escapedLiteral, (_, quoted) => `\"${quoted.replace(/\"\"/g, '\"')}`);\n}\n\n// ### Creates an IRI\nfunction namedNode(iri) {\n return new NamedNode(iri);\n}\n\n// ### Creates a blank node\nfunction blankNode(name) {\n return new BlankNode(name || `n3-${_blankNodeCounter++}`);\n}\n\n// ### Creates a literal\nfunction literal(value, languageOrDataType) {\n // Create a language-tagged string\n if (typeof languageOrDataType === 'string')\n return new Literal(`\"${value}\"@${languageOrDataType.toLowerCase()}`);\n\n // Automatically determine datatype for booleans and numbers\n let datatype = languageOrDataType ? languageOrDataType.value : '';\n if (datatype === '') {\n // Convert a boolean\n if (typeof value === 'boolean')\n datatype = xsd.boolean;\n // Convert an integer or double\n else if (typeof value === 'number') {\n if (Number.isFinite(value))\n datatype = Number.isInteger(value) ? xsd.integer : xsd.double;\n else {\n datatype = xsd.double;\n if (!Number.isNaN(value))\n value = value > 0 ? 'INF' : '-INF';\n }\n }\n }\n\n // Create a datatyped literal\n return (datatype === '' || datatype === xsd.string) ?\n new Literal(`\"${value}\"`) :\n new Literal(`\"${value}\"^^${datatype}`);\n}\n\n// ### Creates a variable\nfunction variable(name) {\n return new Variable(name);\n}\n\n// ### Returns the default graph\nfunction defaultGraph() {\n return DEFAULTGRAPH;\n}\n\n// ### Creates a quad\nfunction quad(subject, predicate, object, graph) {\n return new Quad(subject, predicate, object, graph);\n}\n","// **N3Parser** parses N3 documents.\nimport N3Lexer from './N3Lexer';\nimport N3DataFactory from './N3DataFactory';\nimport namespaces from './IRIs';\n\nlet blankNodePrefix = 0;\n\n// ## Constructor\nexport default class N3Parser {\n constructor(options) {\n this._contextStack = [];\n this._graph = null;\n\n // Set the document IRI\n options = options || {};\n this._setBase(options.baseIRI);\n options.factory && initDataFactory(this, options.factory);\n\n // Set supported features depending on the format\n const format = (typeof options.format === 'string') ?\n options.format.match(/\\w*$/)[0].toLowerCase() : '',\n isTurtle = /turtle/.test(format), isTriG = /trig/.test(format),\n isNTriples = /triple/.test(format), isNQuads = /quad/.test(format),\n isN3 = this._n3Mode = /n3/.test(format),\n isLineMode = isNTriples || isNQuads;\n if (!(this._supportsNamedGraphs = !(isTurtle || isN3)))\n this._readPredicateOrNamedGraph = this._readPredicate;\n // Support triples in other graphs\n this._supportsQuads = !(isTurtle || isTriG || isNTriples || isN3);\n // Support nesting of triples\n this._supportsRDFStar = format === '' || /star|\\*$/.test(format);\n // Disable relative IRIs in N-Triples or N-Quads mode\n if (isLineMode)\n this._resolveRelativeIRI = iri => { return null; };\n this._blankNodePrefix = typeof options.blankNodePrefix !== 'string' ? '' :\n options.blankNodePrefix.replace(/^(?!_:)/, '_:');\n this._lexer = options.lexer || new N3Lexer({ lineMode: isLineMode, n3: isN3 });\n // Disable explicit quantifiers by default\n this._explicitQuantifiers = !!options.explicitQuantifiers;\n }\n\n // ## Static class methods\n\n // ### `_resetBlankNodePrefix` restarts blank node prefix identification\n static _resetBlankNodePrefix() {\n blankNodePrefix = 0;\n }\n\n // ## Private methods\n\n // ### `_setBase` sets the base IRI to resolve relative IRIs\n _setBase(baseIRI) {\n if (!baseIRI) {\n this._base = '';\n this._basePath = '';\n }\n else {\n // Remove fragment if present\n const fragmentPos = baseIRI.indexOf('#');\n if (fragmentPos >= 0)\n baseIRI = baseIRI.substr(0, fragmentPos);\n // Set base IRI and its components\n this._base = baseIRI;\n this._basePath = baseIRI.indexOf('/') < 0 ? baseIRI :\n baseIRI.replace(/[^\\/?]*(?:\\?.*)?$/, '');\n baseIRI = baseIRI.match(/^(?:([a-z][a-z0-9+.-]*:))?(?:\\/\\/[^\\/]*)?/i);\n this._baseRoot = baseIRI[0];\n this._baseScheme = baseIRI[1];\n }\n }\n\n // ### `_saveContext` stores the current parsing context\n // when entering a new scope (list, blank node, formula)\n _saveContext(type, graph, subject, predicate, object) {\n const n3Mode = this._n3Mode;\n this._contextStack.push({\n type,\n subject, predicate, object, graph,\n inverse: n3Mode ? this._inversePredicate : false,\n blankPrefix: n3Mode ? this._prefixes._ : '',\n quantified: n3Mode ? this._quantified : null,\n });\n // The settings below only apply to N3 streams\n if (n3Mode) {\n // Every new scope resets the predicate direction\n this._inversePredicate = false;\n // In N3, blank nodes are scoped to a formula\n // (using a dot as separator, as a blank node label cannot start with it)\n this._prefixes._ = (this._graph ? `${this._graph.value}.` : '.');\n // Quantifiers are scoped to a formula\n this._quantified = Object.create(this._quantified);\n }\n }\n\n // ### `_restoreContext` restores the parent context\n // when leaving a scope (list, blank node, formula)\n _restoreContext(type, token) {\n // Obtain the previous context\n const context = this._contextStack.pop();\n if (!context || context.type !== type)\n return this._error(`Unexpected ${token.type}`, token);\n\n // Restore the quad of the previous context\n this._subject = context.subject;\n this._predicate = context.predicate;\n this._object = context.object;\n this._graph = context.graph;\n\n // Restore N3 context settings\n if (this._n3Mode) {\n this._inversePredicate = context.inverse;\n this._prefixes._ = context.blankPrefix;\n this._quantified = context.quantified;\n }\n }\n\n // ### `_readInTopContext` reads a token when in the top context\n _readInTopContext(token) {\n switch (token.type) {\n // If an EOF token arrives in the top context, signal that we're done\n case 'eof':\n if (this._graph !== null)\n return this._error('Unclosed graph', token);\n delete this._prefixes._;\n return this._callback(null, null, this._prefixes);\n // It could be a prefix declaration\n case 'PREFIX':\n this._sparqlStyle = true;\n case '@prefix':\n return this._readPrefix;\n // It could be a base declaration\n case 'BASE':\n this._sparqlStyle = true;\n case '@base':\n return this._readBaseIRI;\n // It could be a graph\n case '{':\n if (this._supportsNamedGraphs) {\n this._graph = '';\n this._subject = null;\n return this._readSubject;\n }\n case 'GRAPH':\n if (this._supportsNamedGraphs)\n return this._readNamedGraphLabel;\n // Otherwise, the next token must be a subject\n default:\n return this._readSubject(token);\n }\n }\n\n // ### `_readEntity` reads an IRI, prefixed name, blank node, or variable\n _readEntity(token, quantifier) {\n let value;\n switch (token.type) {\n // Read a relative or absolute IRI\n case 'IRI':\n case 'typeIRI':\n const iri = this._resolveIRI(token.value);\n if (iri === null)\n return this._error('Invalid IRI', token);\n value = this._namedNode(iri);\n break;\n // Read a prefixed name\n case 'type':\n case 'prefixed':\n const prefix = this._prefixes[token.prefix];\n if (prefix === undefined)\n return this._error(`Undefined prefix \"${token.prefix}:\"`, token);\n value = this._namedNode(prefix + token.value);\n break;\n // Read a blank node\n case 'blank':\n value = this._blankNode(this._prefixes[token.prefix] + token.value);\n break;\n // Read a variable\n case 'var':\n value = this._variable(token.value.substr(1));\n break;\n // Everything else is not an entity\n default:\n return this._error(`Expected entity but got ${token.type}`, token);\n }\n // In N3 mode, replace the entity if it is quantified\n if (!quantifier && this._n3Mode && (value.id in this._quantified))\n value = this._quantified[value.id];\n return value;\n }\n\n // ### `_readSubject` reads a quad's subject\n _readSubject(token) {\n this._predicate = null;\n switch (token.type) {\n case '[':\n // Start a new quad with a new blank node as subject\n this._saveContext('blank', this._graph,\n this._subject = this._blankNode(), null, null);\n return this._readBlankNodeHead;\n case '(':\n // Start a new list\n this._saveContext('list', this._graph, this.RDF_NIL, null, null);\n this._subject = null;\n return this._readListItem;\n case '{':\n // Start a new formula\n if (!this._n3Mode)\n return this._error('Unexpected graph', token);\n this._saveContext('formula', this._graph,\n this._graph = this._blankNode(), null, null);\n return this._readSubject;\n case '}':\n // No subject; the graph in which we are reading is closed instead\n return this._readPunctuation(token);\n case '@forSome':\n if (!this._n3Mode)\n return this._error('Unexpected \"@forSome\"', token);\n this._subject = null;\n this._predicate = this.N3_FORSOME;\n this._quantifier = this._blankNode;\n return this._readQuantifierList;\n case '@forAll':\n if (!this._n3Mode)\n return this._error('Unexpected \"@forAll\"', token);\n this._subject = null;\n this._predicate = this.N3_FORALL;\n this._quantifier = this._variable;\n return this._readQuantifierList;\n case 'literal':\n if (!this._n3Mode)\n return this._error('Unexpected literal', token);\n\n if (token.prefix.length === 0) {\n this._literalValue = token.value;\n return this._completeSubjectLiteral;\n }\n else\n this._subject = this._literal(token.value, this._namedNode(token.prefix));\n\n break;\n case '<<':\n if (!this._supportsRDFStar)\n return this._error('Unexpected RDF* syntax', token);\n this._saveContext('<<', this._graph, null, null, null);\n this._graph = null;\n return this._readSubject;\n default:\n // Read the subject entity\n if ((this._subject = this._readEntity(token)) === undefined)\n return;\n // In N3 mode, the subject might be a path\n if (this._n3Mode)\n return this._getPathReader(this._readPredicateOrNamedGraph);\n }\n\n // The next token must be a predicate,\n // or, if the subject was actually a graph IRI, a named graph\n return this._readPredicateOrNamedGraph;\n }\n\n // ### `_readPredicate` reads a quad's predicate\n _readPredicate(token) {\n const type = token.type;\n switch (type) {\n case 'inverse':\n this._inversePredicate = true;\n case 'abbreviation':\n this._predicate = this.ABBREVIATIONS[token.value];\n break;\n case '.':\n case ']':\n case '}':\n // Expected predicate didn't come, must have been trailing semicolon\n if (this._predicate === null)\n return this._error(`Unexpected ${type}`, token);\n this._subject = null;\n return type === ']' ? this._readBlankNodeTail(token) : this._readPunctuation(token);\n case ';':\n // Additional semicolons can be safely ignored\n return this._predicate !== null ? this._readPredicate :\n this._error('Expected predicate but got ;', token);\n case '[':\n if (this._n3Mode) {\n // Start a new quad with a new blank node as subject\n this._saveContext('blank', this._graph, this._subject,\n this._subject = this._blankNode(), null);\n return this._readBlankNodeHead;\n }\n case 'blank':\n if (!this._n3Mode)\n return this._error('Disallowed blank node as predicate', token);\n default:\n if ((this._predicate = this._readEntity(token)) === undefined)\n return;\n }\n // The next token must be an object\n return this._readObject;\n }\n\n // ### `_readObject` reads a quad's object\n _readObject(token) {\n switch (token.type) {\n case 'literal':\n // Regular literal, can still get a datatype or language\n if (token.prefix.length === 0) {\n this._literalValue = token.value;\n return this._readDataTypeOrLang;\n }\n // Pre-datatyped string literal (prefix stores the datatype)\n else\n this._object = this._literal(token.value, this._namedNode(token.prefix));\n break;\n case '[':\n // Start a new quad with a new blank node as subject\n this._saveContext('blank', this._graph, this._subject, this._predicate,\n this._subject = this._blankNode());\n return this._readBlankNodeHead;\n case '(':\n // Start a new list\n this._saveContext('list', this._graph, this._subject, this._predicate, this.RDF_NIL);\n this._subject = null;\n return this._readListItem;\n case '{':\n // Start a new formula\n if (!this._n3Mode)\n return this._error('Unexpected graph', token);\n this._saveContext('formula', this._graph, this._subject, this._predicate,\n this._graph = this._blankNode());\n return this._readSubject;\n case '<<':\n if (!this._supportsRDFStar)\n return this._error('Unexpected RDF* syntax', token);\n this._saveContext('<<', this._graph, this._subject, this._predicate, null);\n this._graph = null;\n return this._readSubject;\n default:\n // Read the object entity\n if ((this._object = this._readEntity(token)) === undefined)\n return;\n // In N3 mode, the object might be a path\n if (this._n3Mode)\n return this._getPathReader(this._getContextEndReader());\n }\n return this._getContextEndReader();\n }\n\n // ### `_readPredicateOrNamedGraph` reads a quad's predicate, or a named graph\n _readPredicateOrNamedGraph(token) {\n return token.type === '{' ? this._readGraph(token) : this._readPredicate(token);\n }\n\n // ### `_readGraph` reads a graph\n _readGraph(token) {\n if (token.type !== '{')\n return this._error(`Expected graph but got ${token.type}`, token);\n // The \"subject\" we read is actually the GRAPH's label\n this._graph = this._subject, this._subject = null;\n return this._readSubject;\n }\n\n // ### `_readBlankNodeHead` reads the head of a blank node\n _readBlankNodeHead(token) {\n if (token.type === ']') {\n this._subject = null;\n return this._readBlankNodeTail(token);\n }\n else {\n this._predicate = null;\n return this._readPredicate(token);\n }\n }\n\n // ### `_readBlankNodeTail` reads the end of a blank node\n _readBlankNodeTail(token) {\n if (token.type !== ']')\n return this._readBlankNodePunctuation(token);\n\n // Store blank node quad\n if (this._subject !== null)\n this._emit(this._subject, this._predicate, this._object, this._graph);\n\n // Restore the parent context containing this blank node\n const empty = this._predicate === null;\n this._restoreContext('blank', token);\n // If the blank node was the object, restore previous context and read punctuation\n if (this._object !== null)\n return this._getContextEndReader();\n // If the blank node was the predicate, continue reading the object\n else if (this._predicate !== null)\n return this._readObject;\n // If the blank node was the subject, continue reading the predicate\n else\n // If the blank node was empty, it could be a named graph label\n return empty ? this._readPredicateOrNamedGraph : this._readPredicateAfterBlank;\n }\n\n // ### `_readPredicateAfterBlank` reads a predicate after an anonymous blank node\n _readPredicateAfterBlank(token) {\n switch (token.type) {\n case '.':\n case '}':\n // No predicate is coming if the triple is terminated here\n this._subject = null;\n return this._readPunctuation(token);\n default:\n return this._readPredicate(token);\n }\n }\n\n // ### `_readListItem` reads items from a list\n _readListItem(token) {\n let item = null, // The item of the list\n list = null, // The list itself\n next = this._readListItem; // The next function to execute\n const previousList = this._subject, // The previous list that contains this list\n stack = this._contextStack, // The stack of parent contexts\n parent = stack[stack.length - 1]; // The parent containing the current list\n\n switch (token.type) {\n case '[':\n // Stack the current list quad and start a new quad with a blank node as subject\n this._saveContext('blank', this._graph,\n list = this._blankNode(), this.RDF_FIRST,\n this._subject = item = this._blankNode());\n next = this._readBlankNodeHead;\n break;\n case '(':\n // Stack the current list quad and start a new list\n this._saveContext('list', this._graph,\n list = this._blankNode(), this.RDF_FIRST, this.RDF_NIL);\n this._subject = null;\n break;\n case ')':\n // Closing the list; restore the parent context\n this._restoreContext('list', token);\n // If this list is contained within a parent list, return the membership quad here.\n // This will be ` rdf:first .`.\n if (stack.length !== 0 && stack[stack.length - 1].type === 'list')\n this._emit(this._subject, this._predicate, this._object, this._graph);\n // Was this list the parent's subject?\n if (this._predicate === null) {\n // The next token is the predicate\n next = this._readPredicate;\n // No list tail if this was an empty list\n if (this._subject === this.RDF_NIL)\n return next;\n }\n // The list was in the parent context's object\n else {\n next = this._getContextEndReader();\n // No list tail if this was an empty list\n if (this._object === this.RDF_NIL)\n return next;\n }\n // Close the list by making the head nil\n list = this.RDF_NIL;\n break;\n case 'literal':\n // Regular literal, can still get a datatype or language\n if (token.prefix.length === 0) {\n this._literalValue = token.value;\n next = this._readListItemDataTypeOrLang;\n }\n // Pre-datatyped string literal (prefix stores the datatype)\n else {\n item = this._literal(token.value, this._namedNode(token.prefix));\n next = this._getContextEndReader();\n }\n break;\n case '{':\n // Start a new formula\n if (!this._n3Mode)\n return this._error('Unexpected graph', token);\n this._saveContext('formula', this._graph, this._subject, this._predicate,\n this._graph = this._blankNode());\n return this._readSubject;\n default:\n if ((item = this._readEntity(token)) === undefined)\n return;\n }\n\n // Create a new blank node if no item head was assigned yet\n if (list === null)\n this._subject = list = this._blankNode();\n\n // Is this the first element of the list?\n if (previousList === null) {\n // This list is either the subject or the object of its parent\n if (parent.predicate === null)\n parent.subject = list;\n else\n parent.object = list;\n }\n else {\n // Continue the previous list with the current list\n this._emit(previousList, this.RDF_REST, list, this._graph);\n }\n // If an item was read, add it to the list\n if (item !== null) {\n // In N3 mode, the item might be a path\n if (this._n3Mode && (token.type === 'IRI' || token.type === 'prefixed')) {\n // Create a new context to add the item's path\n this._saveContext('item', this._graph, list, this.RDF_FIRST, item);\n this._subject = item, this._predicate = null;\n // _readPath will restore the context and output the item\n return this._getPathReader(this._readListItem);\n }\n // Output the item\n this._emit(list, this.RDF_FIRST, item, this._graph);\n }\n return next;\n }\n\n // ### `_readDataTypeOrLang` reads an _optional_ datatype or language\n _readDataTypeOrLang(token) {\n return this._completeObjectLiteral(token, false);\n }\n\n\n // ### `_readListItemDataTypeOrLang` reads an _optional_ datatype or language in a list\n _readListItemDataTypeOrLang(token) {\n return this._completeObjectLiteral(token, true);\n }\n\n // ### `_completeLiteral` completes a literal with an optional datatype or language\n _completeLiteral(token) {\n // Create a simple string literal by default\n let literal = this._literal(this._literalValue);\n\n switch (token.type) {\n // Create a datatyped literal\n case 'type':\n case 'typeIRI':\n const datatype = this._readEntity(token);\n if (datatype === undefined) return; // No datatype means an error occurred\n literal = this._literal(this._literalValue, datatype);\n token = null;\n break;\n // Create a language-tagged string\n case 'langcode':\n literal = this._literal(this._literalValue, token.value);\n token = null;\n break;\n }\n\n return { token, literal };\n }\n\n // Completes a literal in subject position\n _completeSubjectLiteral(token) {\n this._subject = this._completeLiteral(token).literal;\n return this._readPredicateOrNamedGraph;\n }\n\n // Completes a literal in object position\n _completeObjectLiteral(token, listItem) {\n const completed = this._completeLiteral(token);\n if (!completed)\n return;\n this._object = completed.literal;\n\n // If this literal was part of a list, write the item\n // (we could also check the context stack, but passing in a flag is faster)\n if (listItem)\n this._emit(this._subject, this.RDF_FIRST, this._object, this._graph);\n // If the token was consumed, continue with the rest of the input\n if (completed.token === null)\n return this._getContextEndReader();\n // Otherwise, consume the token now\n else {\n this._readCallback = this._getContextEndReader();\n return this._readCallback(completed.token);\n }\n }\n\n // ### `_readFormulaTail` reads the end of a formula\n _readFormulaTail(token) {\n if (token.type !== '}')\n return this._readPunctuation(token);\n\n // Store the last quad of the formula\n if (this._subject !== null)\n this._emit(this._subject, this._predicate, this._object, this._graph);\n\n // Restore the parent context containing this formula\n this._restoreContext('formula', token);\n // If the formula was the subject, continue reading the predicate.\n // If the formula was the object, read punctuation.\n return this._object === null ? this._readPredicate : this._getContextEndReader();\n }\n\n // ### `_readPunctuation` reads punctuation between quads or quad parts\n _readPunctuation(token) {\n let next, graph = this._graph;\n const subject = this._subject, inversePredicate = this._inversePredicate;\n switch (token.type) {\n // A closing brace ends a graph\n case '}':\n if (this._graph === null)\n return this._error('Unexpected graph closing', token);\n if (this._n3Mode)\n return this._readFormulaTail(token);\n this._graph = null;\n // A dot just ends the statement, without sharing anything with the next\n case '.':\n this._subject = null;\n next = this._contextStack.length ? this._readSubject : this._readInTopContext;\n if (inversePredicate) this._inversePredicate = false;\n break;\n // Semicolon means the subject is shared; predicate and object are different\n case ';':\n next = this._readPredicate;\n break;\n // Comma means both the subject and predicate are shared; the object is different\n case ',':\n next = this._readObject;\n break;\n // {| means that the current triple is annotated with predicate-object pairs.\n case '{|':\n if (!this._supportsRDFStar)\n return this._error('Unexpected RDF* syntax', token);\n // Continue using the last triple as quoted triple subject for the predicate-object pairs.\n const predicate = this._predicate, object = this._object;\n this._subject = this._quad(subject, predicate, object, this.DEFAULTGRAPH);\n next = this._readPredicate;\n break;\n // |} means that the current quoted triple in annotation syntax is finalized.\n case '|}':\n if (this._subject.termType !== 'Quad')\n return this._error('Unexpected asserted triple closing', token);\n this._subject = null;\n next = this._readPunctuation;\n break;\n default:\n // An entity means this is a quad (only allowed if not already inside a graph)\n if (this._supportsQuads && this._graph === null && (graph = this._readEntity(token)) !== undefined) {\n next = this._readQuadPunctuation;\n break;\n }\n return this._error(`Expected punctuation to follow \"${this._object.id}\"`, token);\n }\n // A quad has been completed now, so return it\n if (subject !== null) {\n const predicate = this._predicate, object = this._object;\n if (!inversePredicate)\n this._emit(subject, predicate, object, graph);\n else\n this._emit(object, predicate, subject, graph);\n }\n return next;\n }\n\n // ### `_readBlankNodePunctuation` reads punctuation in a blank node\n _readBlankNodePunctuation(token) {\n let next;\n switch (token.type) {\n // Semicolon means the subject is shared; predicate and object are different\n case ';':\n next = this._readPredicate;\n break;\n // Comma means both the subject and predicate are shared; the object is different\n case ',':\n next = this._readObject;\n break;\n default:\n return this._error(`Expected punctuation to follow \"${this._object.id}\"`, token);\n }\n // A quad has been completed now, so return it\n this._emit(this._subject, this._predicate, this._object, this._graph);\n return next;\n }\n\n // ### `_readQuadPunctuation` reads punctuation after a quad\n _readQuadPunctuation(token) {\n if (token.type !== '.')\n return this._error('Expected dot to follow quad', token);\n return this._readInTopContext;\n }\n\n // ### `_readPrefix` reads the prefix of a prefix declaration\n _readPrefix(token) {\n if (token.type !== 'prefix')\n return this._error('Expected prefix to follow @prefix', token);\n this._prefix = token.value;\n return this._readPrefixIRI;\n }\n\n // ### `_readPrefixIRI` reads the IRI of a prefix declaration\n _readPrefixIRI(token) {\n if (token.type !== 'IRI')\n return this._error(`Expected IRI to follow prefix \"${this._prefix}:\"`, token);\n const prefixNode = this._readEntity(token);\n this._prefixes[this._prefix] = prefixNode.value;\n this._prefixCallback(this._prefix, prefixNode);\n return this._readDeclarationPunctuation;\n }\n\n // ### `_readBaseIRI` reads the IRI of a base declaration\n _readBaseIRI(token) {\n const iri = token.type === 'IRI' && this._resolveIRI(token.value);\n if (!iri)\n return this._error('Expected valid IRI to follow base declaration', token);\n this._setBase(iri);\n return this._readDeclarationPunctuation;\n }\n\n // ### `_readNamedGraphLabel` reads the label of a named graph\n _readNamedGraphLabel(token) {\n switch (token.type) {\n case 'IRI':\n case 'blank':\n case 'prefixed':\n return this._readSubject(token), this._readGraph;\n case '[':\n return this._readNamedGraphBlankLabel;\n default:\n return this._error('Invalid graph label', token);\n }\n }\n\n // ### `_readNamedGraphLabel` reads a blank node label of a named graph\n _readNamedGraphBlankLabel(token) {\n if (token.type !== ']')\n return this._error('Invalid graph label', token);\n this._subject = this._blankNode();\n return this._readGraph;\n }\n\n // ### `_readDeclarationPunctuation` reads the punctuation of a declaration\n _readDeclarationPunctuation(token) {\n // SPARQL-style declarations don't have punctuation\n if (this._sparqlStyle) {\n this._sparqlStyle = false;\n return this._readInTopContext(token);\n }\n\n if (token.type !== '.')\n return this._error('Expected declaration to end with a dot', token);\n return this._readInTopContext;\n }\n\n // Reads a list of quantified symbols from a @forSome or @forAll statement\n _readQuantifierList(token) {\n let entity;\n switch (token.type) {\n case 'IRI':\n case 'prefixed':\n if ((entity = this._readEntity(token, true)) !== undefined)\n break;\n default:\n return this._error(`Unexpected ${token.type}`, token);\n }\n // Without explicit quantifiers, map entities to a quantified entity\n if (!this._explicitQuantifiers)\n this._quantified[entity.id] = this._quantifier(this._blankNode().value);\n // With explicit quantifiers, output the reified quantifier\n else {\n // If this is the first item, start a new quantifier list\n if (this._subject === null)\n this._emit(this._graph || this.DEFAULTGRAPH, this._predicate,\n this._subject = this._blankNode(), this.QUANTIFIERS_GRAPH);\n // Otherwise, continue the previous list\n else\n this._emit(this._subject, this.RDF_REST,\n this._subject = this._blankNode(), this.QUANTIFIERS_GRAPH);\n // Output the list item\n this._emit(this._subject, this.RDF_FIRST, entity, this.QUANTIFIERS_GRAPH);\n }\n return this._readQuantifierPunctuation;\n }\n\n // Reads punctuation from a @forSome or @forAll statement\n _readQuantifierPunctuation(token) {\n // Read more quantifiers\n if (token.type === ',')\n return this._readQuantifierList;\n // End of the quantifier list\n else {\n // With explicit quantifiers, close the quantifier list\n if (this._explicitQuantifiers) {\n this._emit(this._subject, this.RDF_REST, this.RDF_NIL, this.QUANTIFIERS_GRAPH);\n this._subject = null;\n }\n // Read a dot\n this._readCallback = this._getContextEndReader();\n return this._readCallback(token);\n }\n }\n\n // ### `_getPathReader` reads a potential path and then resumes with the given function\n _getPathReader(afterPath) {\n this._afterPath = afterPath;\n return this._readPath;\n }\n\n // ### `_readPath` reads a potential path\n _readPath(token) {\n switch (token.type) {\n // Forward path\n case '!': return this._readForwardPath;\n // Backward path\n case '^': return this._readBackwardPath;\n // Not a path; resume reading where we left off\n default:\n const stack = this._contextStack, parent = stack.length && stack[stack.length - 1];\n // If we were reading a list item, we still need to output it\n if (parent && parent.type === 'item') {\n // The list item is the remaining subejct after reading the path\n const item = this._subject;\n // Switch back to the context of the list\n this._restoreContext('item', token);\n // Output the list item\n this._emit(this._subject, this.RDF_FIRST, item, this._graph);\n }\n return this._afterPath(token);\n }\n }\n\n // ### `_readForwardPath` reads a '!' path\n _readForwardPath(token) {\n let subject, predicate;\n const object = this._blankNode();\n // The next token is the predicate\n if ((predicate = this._readEntity(token)) === undefined)\n return;\n // If we were reading a subject, replace the subject by the path's object\n if (this._predicate === null)\n subject = this._subject, this._subject = object;\n // If we were reading an object, replace the subject by the path's object\n else\n subject = this._object, this._object = object;\n // Emit the path's current quad and read its next section\n this._emit(subject, predicate, object, this._graph);\n return this._readPath;\n }\n\n // ### `_readBackwardPath` reads a '^' path\n _readBackwardPath(token) {\n const subject = this._blankNode();\n let predicate, object;\n // The next token is the predicate\n if ((predicate = this._readEntity(token)) === undefined)\n return;\n // If we were reading a subject, replace the subject by the path's subject\n if (this._predicate === null)\n object = this._subject, this._subject = subject;\n // If we were reading an object, replace the subject by the path's subject\n else\n object = this._object, this._object = subject;\n // Emit the path's current quad and read its next section\n this._emit(subject, predicate, object, this._graph);\n return this._readPath;\n }\n\n // ### `_readRDFStarTailOrGraph` reads the graph of a nested RDF* quad or the end of a nested RDF* triple\n _readRDFStarTailOrGraph(token) {\n if (token.type !== '>>') {\n // An entity means this is a quad (only allowed if not already inside a graph)\n if (this._supportsQuads && this._graph === null && (this._graph = this._readEntity(token)) !== undefined)\n return this._readRDFStarTail;\n return this._error(`Expected >> to follow \"${this._object.id}\"`, token);\n }\n return this._readRDFStarTail(token);\n }\n\n // ### `_readRDFStarTail` reads the end of a nested RDF* triple\n _readRDFStarTail(token) {\n if (token.type !== '>>')\n return this._error(`Expected >> but got ${token.type}`, token);\n // Read the quad and restore the previous context\n const quad = this._quad(this._subject, this._predicate, this._object,\n this._graph || this.DEFAULTGRAPH);\n this._restoreContext('<<', token);\n // If the triple was the subject, continue by reading the predicate.\n if (this._subject === null) {\n this._subject = quad;\n return this._readPredicate;\n }\n // If the triple was the object, read context end.\n else {\n this._object = quad;\n return this._getContextEndReader();\n }\n }\n\n // ### `_getContextEndReader` gets the next reader function at the end of a context\n _getContextEndReader() {\n const contextStack = this._contextStack;\n if (!contextStack.length)\n return this._readPunctuation;\n\n switch (contextStack[contextStack.length - 1].type) {\n case 'blank':\n return this._readBlankNodeTail;\n case 'list':\n return this._readListItem;\n case 'formula':\n return this._readFormulaTail;\n case '<<':\n return this._readRDFStarTailOrGraph;\n }\n }\n\n // ### `_emit` sends a quad through the callback\n _emit(subject, predicate, object, graph) {\n this._callback(null, this._quad(subject, predicate, object, graph || this.DEFAULTGRAPH));\n }\n\n // ### `_error` emits an error message through the callback\n _error(message, token) {\n const err = new Error(`${message} on line ${token.line}.`);\n err.context = {\n token: token,\n line: token.line,\n previousToken: this._lexer.previousToken,\n };\n this._callback(err);\n this._callback = noop;\n }\n\n // ### `_resolveIRI` resolves an IRI against the base path\n _resolveIRI(iri) {\n return /^[a-z][a-z0-9+.-]*:/i.test(iri) ? iri : this._resolveRelativeIRI(iri);\n }\n\n // ### `_resolveRelativeIRI` resolves an IRI against the base path,\n // assuming that a base path has been set and that the IRI is indeed relative\n _resolveRelativeIRI(iri) {\n // An empty relative IRI indicates the base IRI\n if (!iri.length)\n return this._base;\n // Decide resolving strategy based in the first character\n switch (iri[0]) {\n // Resolve relative fragment IRIs against the base IRI\n case '#': return this._base + iri;\n // Resolve relative query string IRIs by replacing the query string\n case '?': return this._base.replace(/(?:\\?.*)?$/, iri);\n // Resolve root-relative IRIs at the root of the base IRI\n case '/':\n // Resolve scheme-relative IRIs to the scheme\n return (iri[1] === '/' ? this._baseScheme : this._baseRoot) + this._removeDotSegments(iri);\n // Resolve all other IRIs at the base IRI's path\n default:\n // Relative IRIs cannot contain a colon in the first path segment\n return (/^[^/:]*:/.test(iri)) ? null : this._removeDotSegments(this._basePath + iri);\n }\n }\n\n // ### `_removeDotSegments` resolves './' and '../' path segments in an IRI as per RFC3986\n _removeDotSegments(iri) {\n // Don't modify the IRI if it does not contain any dot segments\n if (!/(^|\\/)\\.\\.?($|[/#?])/.test(iri))\n return iri;\n\n // Start with an imaginary slash before the IRI in order to resolve trailing './' and '../'\n const length = iri.length;\n let result = '', i = -1, pathStart = -1, segmentStart = 0, next = '/';\n\n while (i < length) {\n switch (next) {\n // The path starts with the first slash after the authority\n case ':':\n if (pathStart < 0) {\n // Skip two slashes before the authority\n if (iri[++i] === '/' && iri[++i] === '/')\n // Skip to slash after the authority\n while ((pathStart = i + 1) < length && iri[pathStart] !== '/')\n i = pathStart;\n }\n break;\n // Don't modify a query string or fragment\n case '?':\n case '#':\n i = length;\n break;\n // Handle '/.' or '/..' path segments\n case '/':\n if (iri[i + 1] === '.') {\n next = iri[++i + 1];\n switch (next) {\n // Remove a '/.' segment\n case '/':\n result += iri.substring(segmentStart, i - 1);\n segmentStart = i + 1;\n break;\n // Remove a trailing '/.' segment\n case undefined:\n case '?':\n case '#':\n return result + iri.substring(segmentStart, i) + iri.substr(i + 1);\n // Remove a '/..' segment\n case '.':\n next = iri[++i + 1];\n if (next === undefined || next === '/' || next === '?' || next === '#') {\n result += iri.substring(segmentStart, i - 2);\n // Try to remove the parent path from result\n if ((segmentStart = result.lastIndexOf('/')) >= pathStart)\n result = result.substr(0, segmentStart);\n // Remove a trailing '/..' segment\n if (next !== '/')\n return `${result}/${iri.substr(i + 1)}`;\n segmentStart = i + 1;\n }\n }\n }\n }\n next = iri[++i];\n }\n return result + iri.substring(segmentStart);\n }\n\n // ## Public methods\n\n // ### `parse` parses the N3 input and emits each parsed quad through the callback\n parse(input, quadCallback, prefixCallback) {\n // The read callback is the next function to be executed when a token arrives.\n // We start reading in the top context.\n this._readCallback = this._readInTopContext;\n this._sparqlStyle = false;\n this._prefixes = Object.create(null);\n this._prefixes._ = this._blankNodePrefix ? this._blankNodePrefix.substr(2)\n : `b${blankNodePrefix++}_`;\n this._prefixCallback = prefixCallback || noop;\n this._inversePredicate = false;\n this._quantified = Object.create(null);\n\n // Parse synchronously if no quad callback is given\n if (!quadCallback) {\n const quads = [];\n let error;\n this._callback = (e, t) => { e ? (error = e) : t && quads.push(t); };\n this._lexer.tokenize(input).every(token => {\n return this._readCallback = this._readCallback(token);\n });\n if (error) throw error;\n return quads;\n }\n\n // Parse asynchronously otherwise, executing the read callback when a token arrives\n this._callback = quadCallback;\n this._lexer.tokenize(input, (error, token) => {\n if (error !== null)\n this._callback(error), this._callback = noop;\n else if (this._readCallback)\n this._readCallback = this._readCallback(token);\n });\n }\n}\n\n// The empty function\nfunction noop() {}\n\n// Initializes the parser with the given data factory\nfunction initDataFactory(parser, factory) {\n // Set factory methods\n const namedNode = factory.namedNode;\n parser._namedNode = namedNode;\n parser._blankNode = factory.blankNode;\n parser._literal = factory.literal;\n parser._variable = factory.variable;\n parser._quad = factory.quad;\n parser.DEFAULTGRAPH = factory.defaultGraph();\n\n // Set common named nodes\n parser.RDF_FIRST = namedNode(namespaces.rdf.first);\n parser.RDF_REST = namedNode(namespaces.rdf.rest);\n parser.RDF_NIL = namedNode(namespaces.rdf.nil);\n parser.N3_FORALL = namedNode(namespaces.r.forAll);\n parser.N3_FORSOME = namedNode(namespaces.r.forSome);\n parser.ABBREVIATIONS = {\n 'a': namedNode(namespaces.rdf.type),\n '=': namedNode(namespaces.owl.sameAs),\n '>': namedNode(namespaces.log.implies),\n };\n parser.QUANTIFIERS_GRAPH = namedNode('urn:n3:quantifiers');\n}\ninitDataFactory(N3Parser.prototype, N3DataFactory);\n","// **N3Util** provides N3 utility functions.\n\nimport N3DataFactory from './N3DataFactory';\n\n// Tests whether the given term represents an IRI\nexport function isNamedNode(term) {\n return !!term && term.termType === 'NamedNode';\n}\n\n// Tests whether the given term represents a blank node\nexport function isBlankNode(term) {\n return !!term && term.termType === 'BlankNode';\n}\n\n// Tests whether the given term represents a literal\nexport function isLiteral(term) {\n return !!term && term.termType === 'Literal';\n}\n\n// Tests whether the given term represents a variable\nexport function isVariable(term) {\n return !!term && term.termType === 'Variable';\n}\n\n// Tests whether the given term represents the default graph\nexport function isDefaultGraph(term) {\n return !!term && term.termType === 'DefaultGraph';\n}\n\n// Tests whether the given quad is in the default graph\nexport function inDefaultGraph(quad) {\n return isDefaultGraph(quad.graph);\n}\n\n// Creates a function that prepends the given IRI to a local name\nexport function prefix(iri, factory) {\n return prefixes({ '': iri.value || iri }, factory)('');\n}\n\n// Creates a function that allows registering and expanding prefixes\nexport function prefixes(defaultPrefixes, factory) {\n // Add all of the default prefixes\n const prefixes = Object.create(null);\n for (const prefix in defaultPrefixes)\n processPrefix(prefix, defaultPrefixes[prefix]);\n // Set the default factory if none was specified\n factory = factory || N3DataFactory;\n\n // Registers a new prefix (if an IRI was specified)\n // or retrieves a function that expands an existing prefix (if no IRI was specified)\n function processPrefix(prefix, iri) {\n // Create a new prefix if an IRI is specified or the prefix doesn't exist\n if (typeof iri === 'string') {\n // Create a function that expands the prefix\n const cache = Object.create(null);\n prefixes[prefix] = local => {\n return cache[local] || (cache[local] = factory.namedNode(iri + local));\n };\n }\n else if (!(prefix in prefixes)) {\n throw new Error(`Unknown prefix: ${prefix}`);\n }\n return prefixes[prefix];\n }\n return processPrefix;\n}\n","// **N3Writer** writes N3 documents.\nimport namespaces from './IRIs';\nimport { default as N3DataFactory, Term } from './N3DataFactory';\nimport { isDefaultGraph } from './N3Util';\n\nconst DEFAULTGRAPH = N3DataFactory.defaultGraph();\n\nconst { rdf, xsd } = namespaces;\n\n// Characters in literals that require escaping\nconst escape = /[\"\\\\\\t\\n\\r\\b\\f\\u0000-\\u0019\\ud800-\\udbff]/,\n escapeAll = /[\"\\\\\\t\\n\\r\\b\\f\\u0000-\\u0019]|[\\ud800-\\udbff][\\udc00-\\udfff]/g,\n escapedCharacters = {\n '\\\\': '\\\\\\\\', '\"': '\\\\\"', '\\t': '\\\\t',\n '\\n': '\\\\n', '\\r': '\\\\r', '\\b': '\\\\b', '\\f': '\\\\f',\n };\n\n// ## Placeholder class to represent already pretty-printed terms\nclass SerializedTerm extends Term {\n // Pretty-printed nodes are not equal to any other node\n // (e.g., [] does not equal [])\n equals(other) {\n return other === this;\n }\n}\n\n// ## Constructor\nexport default class N3Writer {\n constructor(outputStream, options) {\n // ### `_prefixRegex` matches a prefixed name or IRI that begins with one of the added prefixes\n this._prefixRegex = /$0^/;\n\n // Shift arguments if the first argument is not a stream\n if (outputStream && typeof outputStream.write !== 'function')\n options = outputStream, outputStream = null;\n options = options || {};\n this._lists = options.lists;\n\n // If no output stream given, send the output as string through the end callback\n if (!outputStream) {\n let output = '';\n this._outputStream = {\n write(chunk, encoding, done) { output += chunk; done && done(); },\n end: done => { done && done(null, output); },\n };\n this._endStream = true;\n }\n else {\n this._outputStream = outputStream;\n this._endStream = options.end === undefined ? true : !!options.end;\n }\n\n // Initialize writer, depending on the format\n this._subject = null;\n if (!(/triple|quad/i).test(options.format)) {\n this._lineMode = false;\n this._graph = DEFAULTGRAPH;\n this._prefixIRIs = Object.create(null);\n options.prefixes && this.addPrefixes(options.prefixes);\n if (options.baseIRI) {\n this._baseMatcher = new RegExp(`^${escapeRegex(options.baseIRI)\n }${options.baseIRI.endsWith('/') ? '' : '[#?]'}`);\n this._baseLength = options.baseIRI.length;\n }\n }\n else {\n this._lineMode = true;\n this._writeQuad = this._writeQuadLine;\n }\n }\n\n // ## Private methods\n\n // ### Whether the current graph is the default graph\n get _inDefaultGraph() {\n return DEFAULTGRAPH.equals(this._graph);\n }\n\n // ### `_write` writes the argument to the output stream\n _write(string, callback) {\n this._outputStream.write(string, 'utf8', callback);\n }\n\n // ### `_writeQuad` writes the quad to the output stream\n _writeQuad(subject, predicate, object, graph, done) {\n try {\n // Write the graph's label if it has changed\n if (!graph.equals(this._graph)) {\n // Close the previous graph and start the new one\n this._write((this._subject === null ? '' : (this._inDefaultGraph ? '.\\n' : '\\n}\\n')) +\n (DEFAULTGRAPH.equals(graph) ? '' : `${this._encodeIriOrBlank(graph)} {\\n`));\n this._graph = graph;\n this._subject = null;\n }\n // Don't repeat the subject if it's the same\n if (subject.equals(this._subject)) {\n // Don't repeat the predicate if it's the same\n if (predicate.equals(this._predicate))\n this._write(`, ${this._encodeObject(object)}`, done);\n // Same subject, different predicate\n else\n this._write(`;\\n ${\n this._encodePredicate(this._predicate = predicate)} ${\n this._encodeObject(object)}`, done);\n }\n // Different subject; write the whole quad\n else\n this._write(`${(this._subject === null ? '' : '.\\n') +\n this._encodeSubject(this._subject = subject)} ${\n this._encodePredicate(this._predicate = predicate)} ${\n this._encodeObject(object)}`, done);\n }\n catch (error) { done && done(error); }\n }\n\n // ### `_writeQuadLine` writes the quad to the output stream as a single line\n _writeQuadLine(subject, predicate, object, graph, done) {\n // Write the quad without prefixes\n delete this._prefixMatch;\n this._write(this.quadToString(subject, predicate, object, graph), done);\n }\n\n // ### `quadToString` serializes a quad as a string\n quadToString(subject, predicate, object, graph) {\n return `${this._encodeSubject(subject)} ${\n this._encodeIriOrBlank(predicate)} ${\n this._encodeObject(object)\n }${graph && graph.value ? ` ${this._encodeIriOrBlank(graph)} .\\n` : ' .\\n'}`;\n }\n\n // ### `quadsToString` serializes an array of quads as a string\n quadsToString(quads) {\n return quads.map(t => {\n return this.quadToString(t.subject, t.predicate, t.object, t.graph);\n }).join('');\n }\n\n // ### `_encodeSubject` represents a subject\n _encodeSubject(entity) {\n return entity.termType === 'Quad' ?\n this._encodeQuad(entity) : this._encodeIriOrBlank(entity);\n }\n\n // ### `_encodeIriOrBlank` represents an IRI or blank node\n _encodeIriOrBlank(entity) {\n // A blank node or list is represented as-is\n if (entity.termType !== 'NamedNode') {\n // If it is a list head, pretty-print it\n if (this._lists && (entity.value in this._lists))\n entity = this.list(this._lists[entity.value]);\n return 'id' in entity ? entity.id : `_:${entity.value}`;\n }\n let iri = entity.value;\n // Use relative IRIs if requested and possible\n if (this._baseMatcher && this._baseMatcher.test(iri))\n iri = iri.substr(this._baseLength);\n // Escape special characters\n if (escape.test(iri))\n iri = iri.replace(escapeAll, characterReplacer);\n // Try to represent the IRI as prefixed name\n const prefixMatch = this._prefixRegex.exec(iri);\n return !prefixMatch ? `<${iri}>` :\n (!prefixMatch[1] ? iri : this._prefixIRIs[prefixMatch[1]] + prefixMatch[2]);\n }\n\n // ### `_encodeLiteral` represents a literal\n _encodeLiteral(literal) {\n // Escape special characters\n let value = literal.value;\n if (escape.test(value))\n value = value.replace(escapeAll, characterReplacer);\n\n // Write a language-tagged literal\n if (literal.language)\n return `\"${value}\"@${literal.language}`;\n\n // Write dedicated literals per data type\n if (this._lineMode) {\n // Only abbreviate strings in N-Triples or N-Quads\n if (literal.datatype.value === xsd.string)\n return `\"${value}\"`;\n }\n else {\n // Use common datatype abbreviations in Turtle or TriG\n switch (literal.datatype.value) {\n case xsd.string:\n return `\"${value}\"`;\n case xsd.boolean:\n if (value === 'true' || value === 'false')\n return value;\n break;\n case xsd.integer:\n if (/^[+-]?\\d+$/.test(value))\n return value;\n break;\n case xsd.decimal:\n if (/^[+-]?\\d*\\.\\d+$/.test(value))\n return value;\n break;\n case xsd.double:\n if (/^[+-]?(?:\\d+\\.\\d*|\\.?\\d+)[eE][+-]?\\d+$/.test(value))\n return value;\n break;\n }\n }\n\n // Write a regular datatyped literal\n return `\"${value}\"^^${this._encodeIriOrBlank(literal.datatype)}`;\n }\n\n // ### `_encodePredicate` represents a predicate\n _encodePredicate(predicate) {\n return predicate.value === rdf.type ? 'a' : this._encodeIriOrBlank(predicate);\n }\n\n // ### `_encodeObject` represents an object\n _encodeObject(object) {\n switch (object.termType) {\n case 'Quad':\n return this._encodeQuad(object);\n case 'Literal':\n return this._encodeLiteral(object);\n default:\n return this._encodeIriOrBlank(object);\n }\n }\n\n // ### `_encodeQuad` encodes an RDF* quad\n _encodeQuad({ subject, predicate, object, graph }) {\n return `<<${\n this._encodeSubject(subject)} ${\n this._encodePredicate(predicate)} ${\n this._encodeObject(object)}${\n isDefaultGraph(graph) ? '' : ` ${this._encodeIriOrBlank(graph)}`}>>`;\n }\n\n // ### `_blockedWrite` replaces `_write` after the writer has been closed\n _blockedWrite() {\n throw new Error('Cannot write because the writer has been closed.');\n }\n\n // ### `addQuad` adds the quad to the output stream\n addQuad(subject, predicate, object, graph, done) {\n // The quad was given as an object, so shift parameters\n if (object === undefined)\n this._writeQuad(subject.subject, subject.predicate, subject.object, subject.graph, predicate);\n // The optional `graph` parameter was not provided\n else if (typeof graph === 'function')\n this._writeQuad(subject, predicate, object, DEFAULTGRAPH, graph);\n // The `graph` parameter was provided\n else\n this._writeQuad(subject, predicate, object, graph || DEFAULTGRAPH, done);\n }\n\n // ### `addQuads` adds the quads to the output stream\n addQuads(quads) {\n for (let i = 0; i < quads.length; i++)\n this.addQuad(quads[i]);\n }\n\n // ### `addPrefix` adds the prefix to the output stream\n addPrefix(prefix, iri, done) {\n const prefixes = {};\n prefixes[prefix] = iri;\n this.addPrefixes(prefixes, done);\n }\n\n // ### `addPrefixes` adds the prefixes to the output stream\n addPrefixes(prefixes, done) {\n // Ignore prefixes if not supported by the serialization\n if (!this._prefixIRIs)\n return done && done();\n\n // Write all new prefixes\n let hasPrefixes = false;\n for (let prefix in prefixes) {\n let iri = prefixes[prefix];\n if (typeof iri !== 'string')\n iri = iri.value;\n hasPrefixes = true;\n // Finish a possible pending quad\n if (this._subject !== null) {\n this._write(this._inDefaultGraph ? '.\\n' : '\\n}\\n');\n this._subject = null, this._graph = '';\n }\n // Store and write the prefix\n this._prefixIRIs[iri] = (prefix += ':');\n this._write(`@prefix ${prefix} <${iri}>.\\n`);\n }\n // Recreate the prefix matcher\n if (hasPrefixes) {\n let IRIlist = '', prefixList = '';\n for (const prefixIRI in this._prefixIRIs) {\n IRIlist += IRIlist ? `|${prefixIRI}` : prefixIRI;\n prefixList += (prefixList ? '|' : '') + this._prefixIRIs[prefixIRI];\n }\n IRIlist = escapeRegex(IRIlist, /[\\]\\/\\(\\)\\*\\+\\?\\.\\\\\\$]/g, '\\\\$&');\n this._prefixRegex = new RegExp(`^(?:${prefixList})[^\\/]*$|` +\n `^(${IRIlist})([_a-zA-Z][\\\\-_a-zA-Z0-9]*)$`);\n }\n // End a prefix block with a newline\n this._write(hasPrefixes ? '\\n' : '', done);\n }\n\n // ### `blank` creates a blank node with the given content\n blank(predicate, object) {\n let children = predicate, child, length;\n // Empty blank node\n if (predicate === undefined)\n children = [];\n // Blank node passed as blank(Term(\"predicate\"), Term(\"object\"))\n else if (predicate.termType)\n children = [{ predicate: predicate, object: object }];\n // Blank node passed as blank({ predicate: predicate, object: object })\n else if (!('length' in predicate))\n children = [predicate];\n\n switch (length = children.length) {\n // Generate an empty blank node\n case 0:\n return new SerializedTerm('[]');\n // Generate a non-nested one-triple blank node\n case 1:\n child = children[0];\n if (!(child.object instanceof SerializedTerm))\n return new SerializedTerm(`[ ${this._encodePredicate(child.predicate)} ${\n this._encodeObject(child.object)} ]`);\n // Generate a multi-triple or nested blank node\n default:\n let contents = '[';\n // Write all triples in order\n for (let i = 0; i < length; i++) {\n child = children[i];\n // Write only the object is the predicate is the same as the previous\n if (child.predicate.equals(predicate))\n contents += `, ${this._encodeObject(child.object)}`;\n // Otherwise, write the predicate and the object\n else {\n contents += `${(i ? ';\\n ' : '\\n ') +\n this._encodePredicate(child.predicate)} ${\n this._encodeObject(child.object)}`;\n predicate = child.predicate;\n }\n }\n return new SerializedTerm(`${contents}\\n]`);\n }\n }\n\n // ### `list` creates a list node with the given content\n list(elements) {\n const length = elements && elements.length || 0, contents = new Array(length);\n for (let i = 0; i < length; i++)\n contents[i] = this._encodeObject(elements[i]);\n return new SerializedTerm(`(${contents.join(' ')})`);\n }\n\n // ### `end` signals the end of the output stream\n end(done) {\n // Finish a possible pending quad\n if (this._subject !== null) {\n this._write(this._inDefaultGraph ? '.\\n' : '\\n}\\n');\n this._subject = null;\n }\n // Disallow further writing\n this._write = this._blockedWrite;\n\n // Try to end the underlying stream, ensuring done is called exactly one time\n let singleDone = done && ((error, result) => { singleDone = null, done(error, result); });\n if (this._endStream) {\n try { return this._outputStream.end(singleDone); }\n catch (error) { /* error closing stream */ }\n }\n singleDone && singleDone();\n }\n}\n\n// Replaces a character by its escaped version\nfunction characterReplacer(character) {\n // Replace a single character by its escaped version\n let result = escapedCharacters[character];\n if (result === undefined) {\n // Replace a single character with its 4-bit unicode escape sequence\n if (character.length === 1) {\n result = character.charCodeAt(0).toString(16);\n result = '\\\\u0000'.substr(0, 6 - result.length) + result;\n }\n // Replace a surrogate pair with its 8-bit unicode escape sequence\n else {\n result = ((character.charCodeAt(0) - 0xD800) * 0x400 +\n character.charCodeAt(1) + 0x2400).toString(16);\n result = '\\\\U00000000'.substr(0, 10 - result.length) + result;\n }\n }\n return result;\n}\n\nfunction escapeRegex(regex) {\n return regex.replace(/[\\]\\/\\(\\)\\*\\+\\?\\.\\\\\\$]/g, '\\\\$&');\n}\n","// **N3Store** objects store N3 quads by graph in memory.\nimport { Readable } from 'readable-stream';\nimport { default as N3DataFactory, termToId, termFromId } from './N3DataFactory';\nimport namespaces from './IRIs';\nimport { isDefaultGraph } from './N3Util';\n\n// ## Constructor\nexport default class N3Store {\n constructor(quads, options) {\n // The number of quads is initially zero\n this._size = 0;\n // `_graphs` contains subject, predicate, and object indexes per graph\n this._graphs = Object.create(null);\n // `_ids` maps entities such as `http://xmlns.com/foaf/0.1/name` to numbers,\n // saving memory by using only numbers as keys in `_graphs`\n this._id = 0;\n this._ids = Object.create(null);\n this._entities = Object.create(null); // inverse of `_ids`\n // `_blankNodeIndex` is the index of the last automatically named blank node\n this._blankNodeIndex = 0;\n\n // Shift parameters if `quads` is not given\n if (!options && quads && !quads[0])\n options = quads, quads = null;\n options = options || {};\n this._factory = options.factory || N3DataFactory;\n\n // Add quads if passed\n if (quads)\n this.addQuads(quads);\n }\n\n _termFromId(id, factory) {\n if (id[0] === '.') {\n const entities = this._entities;\n const terms = id.split('.');\n const q = this._factory.quad(\n this._termFromId(entities[terms[1]]),\n this._termFromId(entities[terms[2]]),\n this._termFromId(entities[terms[3]]),\n terms[4] && this._termFromId(entities[terms[4]])\n );\n return q;\n }\n return termFromId(id, factory);\n }\n\n _termToNumericId(term) {\n if (term.termType === 'Quad') {\n const s = this._termToNumericId(term.subject),\n p = this._termToNumericId(term.predicate),\n o = this._termToNumericId(term.object);\n let g;\n\n return s && p && o && (isDefaultGraph(term.graph) || (g = this._termToNumericId(term.graph))) &&\n this._ids[g ? `.${s}.${p}.${o}.${g}` : `.${s}.${p}.${o}`];\n }\n return this._ids[termToId(term)];\n }\n\n _termToNewNumericId(term) {\n // This assumes that no graph term is present - we may wish to error if there is one\n const str = term && term.termType === 'Quad' ?\n `.${this._termToNewNumericId(term.subject)}.${this._termToNewNumericId(term.predicate)}.${this._termToNewNumericId(term.object)}${\n isDefaultGraph(term.graph) ? '' : `.${this._termToNewNumericId(term.graph)}`\n }`\n : termToId(term);\n\n return this._ids[str] || (this._ids[this._entities[++this._id] = str] = this._id);\n }\n\n // ## Public properties\n\n // ### `size` returns the number of quads in the store\n get size() {\n // Return the quad count if if was cached\n let size = this._size;\n if (size !== null)\n return size;\n\n // Calculate the number of quads by counting to the deepest level\n size = 0;\n const graphs = this._graphs;\n let subjects, subject;\n for (const graphKey in graphs)\n for (const subjectKey in (subjects = graphs[graphKey].subjects))\n for (const predicateKey in (subject = subjects[subjectKey]))\n size += Object.keys(subject[predicateKey]).length;\n return this._size = size;\n }\n\n // ## Private methods\n\n // ### `_addToIndex` adds a quad to a three-layered index.\n // Returns if the index has changed, if the entry did not already exist.\n _addToIndex(index0, key0, key1, key2) {\n // Create layers as necessary\n const index1 = index0[key0] || (index0[key0] = {});\n const index2 = index1[key1] || (index1[key1] = {});\n // Setting the key to _any_ value signals the presence of the quad\n const existed = key2 in index2;\n if (!existed)\n index2[key2] = null;\n return !existed;\n }\n\n // ### `_removeFromIndex` removes a quad from a three-layered index\n _removeFromIndex(index0, key0, key1, key2) {\n // Remove the quad from the index\n const index1 = index0[key0], index2 = index1[key1];\n delete index2[key2];\n\n // Remove intermediary index layers if they are empty\n for (const key in index2) return;\n delete index1[key1];\n for (const key in index1) return;\n delete index0[key0];\n }\n\n // ### `_findInIndex` finds a set of quads in a three-layered index.\n // The index base is `index0` and the keys at each level are `key0`, `key1`, and `key2`.\n // Any of these keys can be undefined, which is interpreted as a wildcard.\n // `name0`, `name1`, and `name2` are the names of the keys at each level,\n // used when reconstructing the resulting quad\n // (for instance: _subject_, _predicate_, and _object_).\n // Finally, `graphId` will be the graph of the created quads.\n *_findInIndex(index0, key0, key1, key2, name0, name1, name2, graphId) {\n let tmp, index1, index2;\n const entityKeys = this._entities;\n const graph = this._termFromId(graphId, this._factory);\n const parts = { subject: null, predicate: null, object: null };\n\n // If a key is specified, use only that part of index 0.\n if (key0) (tmp = index0, index0 = {})[key0] = tmp[key0];\n for (const value0 in index0) {\n if (index1 = index0[value0]) {\n parts[name0] = this._termFromId(entityKeys[value0], this._factory);\n // If a key is specified, use only that part of index 1.\n if (key1) (tmp = index1, index1 = {})[key1] = tmp[key1];\n for (const value1 in index1) {\n if (index2 = index1[value1]) {\n parts[name1] = this._termFromId(entityKeys[value1], this._factory);\n // If a key is specified, use only that part of index 2, if it exists.\n const values = key2 ? (key2 in index2 ? [key2] : []) : Object.keys(index2);\n // Create quads for all items found in index 2.\n for (let l = 0; l < values.length; l++) {\n parts[name2] = this._termFromId(entityKeys[values[l]], this._factory);\n yield this._factory.quad(parts.subject, parts.predicate, parts.object, graph);\n }\n }\n }\n }\n }\n }\n\n // ### `_loop` executes the callback on all keys of index 0\n _loop(index0, callback) {\n for (const key0 in index0)\n callback(key0);\n }\n\n // ### `_loopByKey0` executes the callback on all keys of a certain entry in index 0\n _loopByKey0(index0, key0, callback) {\n let index1, key1;\n if (index1 = index0[key0]) {\n for (key1 in index1)\n callback(key1);\n }\n }\n\n // ### `_loopByKey1` executes the callback on given keys of all entries in index 0\n _loopByKey1(index0, key1, callback) {\n let key0, index1;\n for (key0 in index0) {\n index1 = index0[key0];\n if (index1[key1])\n callback(key0);\n }\n }\n\n // ### `_loopBy2Keys` executes the callback on given keys of certain entries in index 2\n _loopBy2Keys(index0, key0, key1, callback) {\n let index1, index2, key2;\n if ((index1 = index0[key0]) && (index2 = index1[key1])) {\n for (key2 in index2)\n callback(key2);\n }\n }\n\n // ### `_countInIndex` counts matching quads in a three-layered index.\n // The index base is `index0` and the keys at each level are `key0`, `key1`, and `key2`.\n // Any of these keys can be undefined, which is interpreted as a wildcard.\n _countInIndex(index0, key0, key1, key2) {\n let count = 0, tmp, index1, index2;\n\n // If a key is specified, count only that part of index 0\n if (key0) (tmp = index0, index0 = {})[key0] = tmp[key0];\n for (const value0 in index0) {\n if (index1 = index0[value0]) {\n // If a key is specified, count only that part of index 1\n if (key1) (tmp = index1, index1 = {})[key1] = tmp[key1];\n for (const value1 in index1) {\n if (index2 = index1[value1]) {\n // If a key is specified, count the quad if it exists\n if (key2) (key2 in index2) && count++;\n // Otherwise, count all quads\n else count += Object.keys(index2).length;\n }\n }\n }\n }\n return count;\n }\n\n // ### `_getGraphs` returns an array with the given graph,\n // or all graphs if the argument is null or undefined.\n _getGraphs(graph) {\n if (!isString(graph))\n return this._graphs;\n const graphs = {};\n graphs[graph] = this._graphs[graph];\n return graphs;\n }\n\n // ### `_uniqueEntities` returns a function that accepts an entity ID\n // and passes the corresponding entity to callback if it hasn't occurred before.\n _uniqueEntities(callback) {\n const uniqueIds = Object.create(null);\n return id => {\n if (!(id in uniqueIds)) {\n uniqueIds[id] = true;\n callback(this._termFromId(this._entities[id], this._factory));\n }\n };\n }\n\n // ## Public methods\n\n // ### `add` adds the specified quad to the dataset.\n // Returns the dataset instance it was called on.\n // Existing quads, as defined in Quad.equals, will be ignored.\n add(quad) {\n this.addQuad(quad);\n return this;\n }\n\n // ### `addQuad` adds a new quad to the store.\n // Returns if the quad index has changed, if the quad did not already exist.\n addQuad(subject, predicate, object, graph) {\n // Shift arguments if a quad object is given instead of components\n if (!predicate)\n graph = subject.graph, object = subject.object,\n predicate = subject.predicate, subject = subject.subject;\n\n // Convert terms to internal string representation\n graph = termToId(graph);\n\n // Find the graph that will contain the triple\n let graphItem = this._graphs[graph];\n // Create the graph if it doesn't exist yet\n if (!graphItem) {\n graphItem = this._graphs[graph] = { subjects: {}, predicates: {}, objects: {} };\n // Freezing a graph helps subsequent `add` performance,\n // and properties will never be modified anyway\n Object.freeze(graphItem);\n }\n\n // Since entities can often be long IRIs, we avoid storing them in every index.\n // Instead, we have a separate index that maps entities to numbers,\n // which are then used as keys in the other indexes.\n subject = this._termToNewNumericId(subject);\n predicate = this._termToNewNumericId(predicate);\n object = this._termToNewNumericId(object);\n\n const changed = this._addToIndex(graphItem.subjects, subject, predicate, object);\n this._addToIndex(graphItem.predicates, predicate, object, subject);\n this._addToIndex(graphItem.objects, object, subject, predicate);\n\n // The cached quad count is now invalid\n this._size = null;\n return changed;\n }\n\n // ### `addQuads` adds multiple quads to the store\n addQuads(quads) {\n for (let i = 0; i < quads.length; i++)\n this.addQuad(quads[i]);\n }\n\n // ### `delete` removes the specified quad from the dataset.\n // Returns the dataset instance it was called on.\n delete(quad) {\n this.removeQuad(quad);\n return this;\n }\n\n // ### `has` determines whether a dataset includes a certain quad or quad pattern.\n has(subjectOrQuad, predicate, object, graph) {\n if (subjectOrQuad && subjectOrQuad.subject)\n ({ subject: subjectOrQuad, predicate, object, graph } = subjectOrQuad);\n return !this.readQuads(subjectOrQuad, predicate, object, graph).next().done;\n }\n\n // ### `import` adds a stream of quads to the store\n import(stream) {\n stream.on('data', quad => { this.addQuad(quad); });\n return stream;\n }\n\n // ### `removeQuad` removes a quad from the store if it exists\n removeQuad(subject, predicate, object, graph) {\n // Shift arguments if a quad object is given instead of components\n if (!predicate)\n graph = subject.graph, object = subject.object,\n predicate = subject.predicate, subject = subject.subject;\n\n // Convert terms to internal string representation\n graph = termToId(graph);\n\n // Find internal identifiers for all components\n // and verify the quad exists.\n const graphs = this._graphs;\n let graphItem, subjects, predicates;\n if (!(subject = subject && this._termToNumericId(subject)) || !(predicate = predicate && this._termToNumericId(predicate)) ||\n !(object = object && this._termToNumericId(object)) || !(graphItem = graphs[graph]) ||\n !(subjects = graphItem.subjects[subject]) ||\n !(predicates = subjects[predicate]) ||\n !(object in predicates))\n return false;\n\n // Remove it from all indexes\n this._removeFromIndex(graphItem.subjects, subject, predicate, object);\n this._removeFromIndex(graphItem.predicates, predicate, object, subject);\n this._removeFromIndex(graphItem.objects, object, subject, predicate);\n if (this._size !== null) this._size--;\n\n // Remove the graph if it is empty\n for (subject in graphItem.subjects) return true;\n delete graphs[graph];\n return true;\n }\n\n // ### `removeQuads` removes multiple quads from the store\n removeQuads(quads) {\n for (let i = 0; i < quads.length; i++)\n this.removeQuad(quads[i]);\n }\n\n // ### `remove` removes a stream of quads from the store\n remove(stream) {\n stream.on('data', quad => { this.removeQuad(quad); });\n return stream;\n }\n\n // ### `removeMatches` removes all matching quads from the store\n // Setting any field to `undefined` or `null` indicates a wildcard.\n removeMatches(subject, predicate, object, graph) {\n const stream = new Readable({ objectMode: true });\n\n stream._read = () => {\n for (const quad of this.readQuads(subject, predicate, object, graph))\n stream.push(quad);\n stream.push(null);\n };\n\n return this.remove(stream);\n }\n\n // ### `deleteGraph` removes all triples with the given graph from the store\n deleteGraph(graph) {\n return this.removeMatches(null, null, null, graph);\n }\n\n // ### `getQuads` returns an array of quads matching a pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n getQuads(subject, predicate, object, graph) {\n return [...this.readQuads(subject, predicate, object, graph)];\n }\n\n // ### `readQuads` returns an generator of quads matching a pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n *readQuads(subject, predicate, object, graph) {\n // Convert terms to internal string representation\n graph = graph && termToId(graph);\n\n const graphs = this._getGraphs(graph);\n let content, subjectId, predicateId, objectId;\n\n // Translate IRIs to internal index keys.\n if (subject && !(subjectId = this._termToNumericId(subject)) ||\n predicate && !(predicateId = this._termToNumericId(predicate)) ||\n object && !(objectId = this._termToNumericId(object)))\n return;\n\n for (const graphId in graphs) {\n // Only if the specified graph contains triples, there can be results\n if (content = graphs[graphId]) {\n // Choose the optimal index, based on what fields are present\n if (subjectId) {\n if (objectId)\n // If subject and object are given, the object index will be the fastest\n yield* this._findInIndex(content.objects, objectId, subjectId, predicateId,\n 'object', 'subject', 'predicate', graphId);\n else\n // If only subject and possibly predicate are given, the subject index will be the fastest\n yield* this._findInIndex(content.subjects, subjectId, predicateId, null,\n 'subject', 'predicate', 'object', graphId);\n }\n else if (predicateId)\n // If only predicate and possibly object are given, the predicate index will be the fastest\n yield* this._findInIndex(content.predicates, predicateId, objectId, null,\n 'predicate', 'object', 'subject', graphId);\n else if (objectId)\n // If only object is given, the object index will be the fastest\n yield* this._findInIndex(content.objects, objectId, null, null,\n 'object', 'subject', 'predicate', graphId);\n else\n // If nothing is given, iterate subjects and predicates first\n yield* this._findInIndex(content.subjects, null, null, null,\n 'subject', 'predicate', 'object', graphId);\n }\n }\n }\n\n // ### `match` returns a new dataset that is comprised of all quads in the current instance matching the given arguments.\n // The logic described in Quad Matching is applied for each quad in this dataset to check if it should be included in the output dataset.\n // Note: This method always returns a new DatasetCore, even if that dataset contains no quads.\n // Note: Since a DatasetCore is an unordered set, the order of the quads within the returned sequence is arbitrary.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n // For backwards compatibility, the object return also implements the Readable stream interface.\n match(subject, predicate, object, graph) {\n return new DatasetCoreAndReadableStream(this, subject, predicate, object, graph);\n }\n\n // ### `countQuads` returns the number of quads matching a pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n countQuads(subject, predicate, object, graph) {\n // Convert terms to internal string representation\n graph = graph && termToId(graph);\n\n const graphs = this._getGraphs(graph);\n let count = 0, content, subjectId, predicateId, objectId;\n\n // Translate IRIs to internal index keys.\n if (subject && !(subjectId = this._termToNumericId(subject)) ||\n predicate && !(predicateId = this._termToNumericId(predicate)) ||\n object && !(objectId = this._termToNumericId(object)))\n return 0;\n\n for (const graphId in graphs) {\n // Only if the specified graph contains triples, there can be results\n if (content = graphs[graphId]) {\n // Choose the optimal index, based on what fields are present\n if (subject) {\n if (object)\n // If subject and object are given, the object index will be the fastest\n count += this._countInIndex(content.objects, objectId, subjectId, predicateId);\n else\n // If only subject and possibly predicate are given, the subject index will be the fastest\n count += this._countInIndex(content.subjects, subjectId, predicateId, objectId);\n }\n else if (predicate) {\n // If only predicate and possibly object are given, the predicate index will be the fastest\n count += this._countInIndex(content.predicates, predicateId, objectId, subjectId);\n }\n else {\n // If only object is possibly given, the object index will be the fastest\n count += this._countInIndex(content.objects, objectId, subjectId, predicateId);\n }\n }\n }\n return count;\n }\n\n // ### `forEach` executes the callback on all quads.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n forEach(callback, subject, predicate, object, graph) {\n this.some(quad => {\n callback(quad);\n return false;\n }, subject, predicate, object, graph);\n }\n\n // ### `every` executes the callback on all quads,\n // and returns `true` if it returns truthy for all them.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n every(callback, subject, predicate, object, graph) {\n let some = false;\n const every = !this.some(quad => {\n some = true;\n return !callback(quad);\n }, subject, predicate, object, graph);\n return some && every;\n }\n\n // ### `some` executes the callback on all quads,\n // and returns `true` if it returns truthy for any of them.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n some(callback, subject, predicate, object, graph) {\n for (const quad of this.readQuads(subject, predicate, object, graph))\n if (callback(quad))\n return true;\n return false;\n }\n\n // ### `getSubjects` returns all subjects that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n getSubjects(predicate, object, graph) {\n const results = [];\n this.forSubjects(s => { results.push(s); }, predicate, object, graph);\n return results;\n }\n\n // ### `forSubjects` executes the callback on all subjects that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n forSubjects(callback, predicate, object, graph) {\n // Convert terms to internal string representation\n graph = graph && termToId(graph);\n\n const graphs = this._getGraphs(graph);\n let content, predicateId, objectId;\n callback = this._uniqueEntities(callback);\n\n // Translate IRIs to internal index keys.\n if (predicate && !(predicateId = this._termToNumericId(predicate)) ||\n object && !(objectId = this._termToNumericId(object)))\n return;\n\n for (graph in graphs) {\n // Only if the specified graph contains triples, there can be results\n if (content = graphs[graph]) {\n // Choose optimal index based on which fields are wildcards\n if (predicateId) {\n if (objectId)\n // If predicate and object are given, the POS index is best.\n this._loopBy2Keys(content.predicates, predicateId, objectId, callback);\n else\n // If only predicate is given, the SPO index is best.\n this._loopByKey1(content.subjects, predicateId, callback);\n }\n else if (objectId)\n // If only object is given, the OSP index is best.\n this._loopByKey0(content.objects, objectId, callback);\n else\n // If no params given, iterate all the subjects\n this._loop(content.subjects, callback);\n }\n }\n }\n\n // ### `getPredicates` returns all predicates that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n getPredicates(subject, object, graph) {\n const results = [];\n this.forPredicates(p => { results.push(p); }, subject, object, graph);\n return results;\n }\n\n // ### `forPredicates` executes the callback on all predicates that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n forPredicates(callback, subject, object, graph) {\n // Convert terms to internal string representation\n graph = graph && termToId(graph);\n\n const graphs = this._getGraphs(graph);\n let content, subjectId, objectId;\n callback = this._uniqueEntities(callback);\n\n // Translate IRIs to internal index keys.\n if (subject && !(subjectId = this._termToNumericId(subject)) ||\n object && !(objectId = this._termToNumericId(object)))\n return;\n\n for (graph in graphs) {\n // Only if the specified graph contains triples, there can be results\n if (content = graphs[graph]) {\n // Choose optimal index based on which fields are wildcards\n if (subjectId) {\n if (objectId)\n // If subject and object are given, the OSP index is best.\n this._loopBy2Keys(content.objects, objectId, subjectId, callback);\n else\n // If only subject is given, the SPO index is best.\n this._loopByKey0(content.subjects, subjectId, callback);\n }\n else if (objectId)\n // If only object is given, the POS index is best.\n this._loopByKey1(content.predicates, objectId, callback);\n else\n // If no params given, iterate all the predicates.\n this._loop(content.predicates, callback);\n }\n }\n }\n\n // ### `getObjects` returns all objects that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n getObjects(subject, predicate, graph) {\n const results = [];\n this.forObjects(o => { results.push(o); }, subject, predicate, graph);\n return results;\n }\n\n // ### `forObjects` executes the callback on all objects that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n forObjects(callback, subject, predicate, graph) {\n // Convert terms to internal string representation\n graph = graph && termToId(graph);\n\n const graphs = this._getGraphs(graph);\n let content, subjectId, predicateId;\n callback = this._uniqueEntities(callback);\n\n // Translate IRIs to internal index keys.\n if (subject && !(subjectId = this._termToNumericId(subject)) ||\n predicate && !(predicateId = this._termToNumericId(predicate)))\n return;\n\n for (graph in graphs) {\n // Only if the specified graph contains triples, there can be results\n if (content = graphs[graph]) {\n // Choose optimal index based on which fields are wildcards\n if (subjectId) {\n if (predicateId)\n // If subject and predicate are given, the SPO index is best.\n this._loopBy2Keys(content.subjects, subjectId, predicateId, callback);\n else\n // If only subject is given, the OSP index is best.\n this._loopByKey1(content.objects, subjectId, callback);\n }\n else if (predicateId)\n // If only predicate is given, the POS index is best.\n this._loopByKey0(content.predicates, predicateId, callback);\n else\n // If no params given, iterate all the objects.\n this._loop(content.objects, callback);\n }\n }\n }\n\n // ### `getGraphs` returns all graphs that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n getGraphs(subject, predicate, object) {\n const results = [];\n this.forGraphs(g => { results.push(g); }, subject, predicate, object);\n return results;\n }\n\n // ### `forGraphs` executes the callback on all graphs that match the pattern.\n // Setting any field to `undefined` or `null` indicates a wildcard.\n forGraphs(callback, subject, predicate, object) {\n for (const graph in this._graphs) {\n this.some(quad => {\n callback(quad.graph);\n return true; // Halt iteration of some()\n }, subject, predicate, object, graph);\n }\n }\n\n // ### `createBlankNode` creates a new blank node, returning its name\n createBlankNode(suggestedName) {\n let name, index;\n // Generate a name based on the suggested name\n if (suggestedName) {\n name = suggestedName = `_:${suggestedName}`, index = 1;\n while (this._ids[name])\n name = suggestedName + index++;\n }\n // Generate a generic blank node name\n else {\n do { name = `_:b${this._blankNodeIndex++}`; }\n while (this._ids[name]);\n }\n // Add the blank node to the entities, avoiding the generation of duplicates\n this._ids[name] = ++this._id;\n this._entities[this._id] = name;\n return this._factory.blankNode(name.substr(2));\n }\n\n // ### `extractLists` finds and removes all list triples\n // and returns the items per list.\n extractLists({ remove = false, ignoreErrors = false } = {}) {\n const lists = {}; // has scalar keys so could be a simple Object\n const onError = ignoreErrors ? (() => true) :\n ((node, message) => { throw new Error(`${node.value} ${message}`); });\n\n // Traverse each list from its tail\n const tails = this.getQuads(null, namespaces.rdf.rest, namespaces.rdf.nil, null);\n const toRemove = remove ? [...tails] : [];\n tails.forEach(tailQuad => {\n const items = []; // the members found as objects of rdf:first quads\n let malformed = false; // signals whether the current list is malformed\n let head; // the head of the list (_:b1 in above example)\n let headPos; // set to subject or object when head is set\n const graph = tailQuad.graph; // make sure list is in exactly one graph\n\n // Traverse the list from tail to end\n let current = tailQuad.subject;\n while (current && !malformed) {\n const objectQuads = this.getQuads(null, null, current, null);\n const subjectQuads = this.getQuads(current, null, null, null);\n let quad, first = null, rest = null, parent = null;\n\n // Find the first and rest of this list node\n for (let i = 0; i < subjectQuads.length && !malformed; i++) {\n quad = subjectQuads[i];\n if (!quad.graph.equals(graph))\n malformed = onError(current, 'not confined to single graph');\n else if (head)\n malformed = onError(current, 'has non-list arcs out');\n\n // one rdf:first\n else if (quad.predicate.value === namespaces.rdf.first) {\n if (first)\n malformed = onError(current, 'has multiple rdf:first arcs');\n else\n toRemove.push(first = quad);\n }\n\n // one rdf:rest\n else if (quad.predicate.value === namespaces.rdf.rest) {\n if (rest)\n malformed = onError(current, 'has multiple rdf:rest arcs');\n else\n toRemove.push(rest = quad);\n }\n\n // alien triple\n else if (objectQuads.length)\n malformed = onError(current, 'can\\'t be subject and object');\n else {\n head = quad; // e.g. { (1 2 3) :p :o }\n headPos = 'subject';\n }\n }\n\n // { :s :p (1 2) } arrives here with no head\n // { (1 2) :p :o } arrives here with head set to the list.\n for (let i = 0; i < objectQuads.length && !malformed; ++i) {\n quad = objectQuads[i];\n if (head)\n malformed = onError(current, 'can\\'t have coreferences');\n // one rdf:rest\n else if (quad.predicate.value === namespaces.rdf.rest) {\n if (parent)\n malformed = onError(current, 'has incoming rdf:rest arcs');\n else\n parent = quad;\n }\n else {\n head = quad; // e.g. { :s :p (1 2) }\n headPos = 'object';\n }\n }\n\n // Store the list item and continue with parent\n if (!first)\n malformed = onError(current, 'has no list head');\n else\n items.unshift(first.object);\n current = parent && parent.subject;\n }\n\n // Don't remove any quads if the list is malformed\n if (malformed)\n remove = false;\n // Store the list under the value of its head\n else if (head)\n lists[head[headPos].value] = items;\n });\n\n // Remove list quads if requested\n if (remove)\n this.removeQuads(toRemove);\n return lists;\n }\n\n // ### Store is an iterable.\n // Can be used where iterables are expected: for...of loops, array spread operator,\n // `yield*`, and destructuring assignment (order is not guaranteed).\n *[Symbol.iterator]() {\n yield* this.readQuads();\n }\n}\n\n// Determines whether the argument is a string\nfunction isString(s) {\n return typeof s === 'string' || s instanceof String;\n}\n\n/**\n * A class that implements both DatasetCore and Readable.\n */\nclass DatasetCoreAndReadableStream extends Readable {\n constructor(n3Store, subject, predicate, object, graph) {\n super({ objectMode: true });\n Object.assign(this, { n3Store, subject, predicate, object, graph });\n }\n\n get filtered() {\n if (!this._filtered) {\n const { n3Store, graph, object, predicate, subject } = this;\n const newStore = this._filtered = new N3Store({ factory: n3Store._factory });\n for (const quad of n3Store.readQuads(subject, predicate, object, graph))\n newStore.addQuad(quad);\n }\n return this._filtered;\n }\n\n get size() {\n return this.filtered.size;\n }\n\n _read() {\n for (const quad of this)\n this.push(quad);\n this.push(null);\n }\n\n add(quad) {\n return this.filtered.add(quad);\n }\n\n delete(quad) {\n return this.filtered.delete(quad);\n }\n\n has(quad) {\n return this.filtered.has(quad);\n }\n\n match(subject, predicate, object, graph) {\n return new DatasetCoreAndReadableStream(this.filtered, subject, predicate, object, graph);\n }\n\n *[Symbol.iterator]() {\n yield* this._filtered || this.n3Store.readQuads(this.subject, this.predicate, this.object, this.graph);\n }\n}\n","// **N3StreamParser** parses a text stream into a quad stream.\nimport { Transform } from 'readable-stream';\nimport N3Parser from './N3Parser';\n\n// ## Constructor\nexport default class N3StreamParser extends Transform {\n constructor(options) {\n super({ decodeStrings: true });\n this._readableState.objectMode = true;\n\n // Set up parser with dummy stream to obtain `data` and `end` callbacks\n const parser = new N3Parser(options);\n let onData, onEnd;\n parser.parse({\n on: (event, callback) => {\n switch (event) {\n case 'data': onData = callback; break;\n case 'end': onEnd = callback; break;\n }\n },\n },\n // Handle quads by pushing them down the pipeline\n (error, quad) => { error && this.emit('error', error) || quad && this.push(quad); },\n // Emit prefixes through the `prefix` event\n (prefix, uri) => { this.emit('prefix', prefix, uri); }\n );\n\n // Implement Transform methods through parser callbacks\n this._transform = (chunk, encoding, done) => { onData(chunk); done(); };\n this._flush = done => { onEnd(); done(); };\n }\n\n // ### Parses a stream of strings\n import(stream) {\n stream.on('data', chunk => { this.write(chunk); });\n stream.on('end', () => { this.end(); });\n stream.on('error', error => { this.emit('error', error); });\n return this;\n }\n}\n","// **N3StreamWriter** serializes a quad stream into a text stream.\nimport { Transform } from 'readable-stream';\nimport N3Writer from './N3Writer';\n\n// ## Constructor\nexport default class N3StreamWriter extends Transform {\n constructor(options) {\n super({ encoding: 'utf8', writableObjectMode: true });\n\n // Set up writer with a dummy stream object\n const writer = this._writer = new N3Writer({\n write: (quad, encoding, callback) => { this.push(quad); callback && callback(); },\n end: callback => { this.push(null); callback && callback(); },\n }, options);\n\n // Implement Transform methods on top of writer\n this._transform = (quad, encoding, done) => { writer.addQuad(quad, done); };\n this._flush = done => { writer.end(done); };\n }\n\n// ### Serializes a stream of quads\n import(stream) {\n stream.on('data', quad => { this.write(quad); });\n stream.on('end', () => { this.end(); });\n stream.on('error', error => { this.emit('error', error); });\n stream.on('prefix', (prefix, iri) => { this._writer.addPrefix(prefix, iri); });\n return this;\n }\n}\n","import Lexer from './N3Lexer';\nimport Parser from './N3Parser';\nimport Writer from './N3Writer';\nimport Store from './N3Store';\nimport StreamParser from './N3StreamParser';\nimport StreamWriter from './N3StreamWriter';\nimport * as Util from './N3Util';\n\nimport {\n default as DataFactory,\n\n Term,\n NamedNode,\n Literal,\n BlankNode,\n Variable,\n DefaultGraph,\n Quad,\n Triple,\n\n termFromId,\n termToId,\n} from './N3DataFactory';\n\n// Named exports\nexport {\n Lexer,\n Parser,\n Writer,\n Store,\n StreamParser,\n StreamWriter,\n Util,\n\n DataFactory,\n\n Term,\n NamedNode,\n Literal,\n BlankNode,\n Variable,\n DefaultGraph,\n Quad,\n Triple,\n\n termFromId,\n termToId,\n};\n\n// Export all named exports as a default object for backward compatibility\nexport default {\n Lexer,\n Parser,\n Writer,\n Store,\n StreamParser,\n StreamWriter,\n Util,\n\n DataFactory,\n\n Term,\n NamedNode,\n Literal,\n BlankNode,\n Variable,\n DefaultGraph,\n Quad,\n Triple,\n\n termFromId,\n termToId,\n};\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","(function() {\n var root;\n\n\tif (typeof window === 'object' && window) {\n\t\troot = window;\n\t} else {\n\t\troot = global;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tmodule.exports = root.Promise ? root.Promise : Promise;\n\t} else if (!root.Promise) {\n\t\troot.Promise = Promise;\n\t}\n\n\t// Use polyfill for setImmediate for performance gains\n\tvar asap = root.setImmediate || function(fn) { setTimeout(fn, 1); };\n\n\t// Polyfill for Function.prototype.bind\n\tfunction bind(fn, thisArg) {\n\t\treturn function() {\n\t\t\tfn.apply(thisArg, arguments);\n\t\t}\n\t}\n\n\tvar isArray = Array.isArray || function(value) { return Object.prototype.toString.call(value) === \"[object Array]\" };\n\n\tfunction Promise(fn) {\n\t\tif (typeof this !== 'object') throw new TypeError('Promises must be constructed via new');\n\t\tif (typeof fn !== 'function') throw new TypeError('not a function');\n\t\tthis._state = null;\n\t\tthis._value = null;\n\t\tthis._deferreds = []\n\n\t\tdoResolve(fn, bind(resolve, this), bind(reject, this))\n\t}\n\n\tfunction handle(deferred) {\n\t\tvar me = this;\n\t\tif (this._state === null) {\n\t\t\tthis._deferreds.push(deferred);\n\t\t\treturn\n\t\t}\n\t\tasap(function() {\n\t\t\tvar cb = me._state ? deferred.onFulfilled : deferred.onRejected\n\t\t\tif (cb === null) {\n\t\t\t\t(me._state ? deferred.resolve : deferred.reject)(me._value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvar ret;\n\t\t\ttry {\n\t\t\t\tret = cb(me._value);\n\t\t\t}\n\t\t\tcatch (e) {\n\t\t\t\tdeferred.reject(e);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tdeferred.resolve(ret);\n\t\t})\n\t}\n\n\tfunction resolve(newValue) {\n\t\ttry { //Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure\n\t\t\tif (newValue === this) throw new TypeError('A promise cannot be resolved with itself.');\n\t\t\tif (newValue && (typeof newValue === 'object' || typeof newValue === 'function')) {\n\t\t\t\tvar then = newValue.then;\n\t\t\t\tif (typeof then === 'function') {\n\t\t\t\t\tdoResolve(bind(then, newValue), bind(resolve, this), bind(reject, this));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._state = true;\n\t\t\tthis._value = newValue;\n\t\t\tfinale.call(this);\n\t\t} catch (e) { reject.call(this, e); }\n\t}\n\n\tfunction reject(newValue) {\n\t\tthis._state = false;\n\t\tthis._value = newValue;\n\t\tfinale.call(this);\n\t}\n\n\tfunction finale() {\n\t\tfor (var i = 0, len = this._deferreds.length; i < len; i++) {\n\t\t\thandle.call(this, this._deferreds[i]);\n\t\t}\n\t\tthis._deferreds = null;\n\t}\n\n\tfunction Handler(onFulfilled, onRejected, resolve, reject){\n\t\tthis.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;\n\t\tthis.onRejected = typeof onRejected === 'function' ? onRejected : null;\n\t\tthis.resolve = resolve;\n\t\tthis.reject = reject;\n\t}\n\n\t/**\n\t * Take a potentially misbehaving resolver function and make sure\n\t * onFulfilled and onRejected are only called once.\n\t *\n\t * Makes no guarantees about asynchrony.\n\t */\n\tfunction doResolve(fn, onFulfilled, onRejected) {\n\t\tvar done = false;\n\t\ttry {\n\t\t\tfn(function (value) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonFulfilled(value);\n\t\t\t}, function (reason) {\n\t\t\t\tif (done) return;\n\t\t\t\tdone = true;\n\t\t\t\tonRejected(reason);\n\t\t\t})\n\t\t} catch (ex) {\n\t\t\tif (done) return;\n\t\t\tdone = true;\n\t\t\tonRejected(ex);\n\t\t}\n\t}\n\n\tPromise.prototype['catch'] = function (onRejected) {\n\t\treturn this.then(null, onRejected);\n\t};\n\n\tPromise.prototype.then = function(onFulfilled, onRejected) {\n\t\tvar me = this;\n\t\treturn new Promise(function(resolve, reject) {\n\t\t\thandle.call(me, new Handler(onFulfilled, onRejected, resolve, reject));\n\t\t})\n\t};\n\n\tPromise.all = function () {\n\t\tvar args = Array.prototype.slice.call(arguments.length === 1 && isArray(arguments[0]) ? arguments[0] : arguments);\n\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\tif (args.length === 0) return resolve([]);\n\t\t\tvar remaining = args.length;\n\t\t\tfunction res(i, val) {\n\t\t\t\ttry {\n\t\t\t\t\tif (val && (typeof val === 'object' || typeof val === 'function')) {\n\t\t\t\t\t\tvar then = val.then;\n\t\t\t\t\t\tif (typeof then === 'function') {\n\t\t\t\t\t\t\tthen.call(val, function (val) { res(i, val) }, reject);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\targs[i] = val;\n\t\t\t\t\tif (--remaining === 0) {\n\t\t\t\t\t\tresolve(args);\n\t\t\t\t\t}\n\t\t\t\t} catch (ex) {\n\t\t\t\t\treject(ex);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (var i = 0; i < args.length; i++) {\n\t\t\t\tres(i, args[i]);\n\t\t\t}\n\t\t});\n\t};\n\n\tPromise.resolve = function (value) {\n\t\tif (value && typeof value === 'object' && value.constructor === Promise) {\n\t\t\treturn value;\n\t\t}\n\n\t\treturn new Promise(function (resolve) {\n\t\t\tresolve(value);\n\t\t});\n\t};\n\n\tPromise.reject = function (value) {\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\treject(value);\n\t\t});\n\t};\n\n\tPromise.race = function (values) {\n\t\treturn new Promise(function (resolve, reject) {\n\t\t\tfor(var i = 0, len = values.length; i < len; i++) {\n\t\t\t\tvalues[i].then(resolve, reject);\n\t\t\t}\n\t\t});\n\t};\n})();","/*! queue-microtask. MIT License. Feross Aboukhadijeh */\nlet promise\n\nmodule.exports = typeof queueMicrotask === 'function'\n ? queueMicrotask.bind(typeof window !== 'undefined' ? window : global)\n // reuse resolved promise, and allocate it lazily\n : cb => (promise || (promise = Promise.resolve()))\n .then(cb)\n .catch(err => setTimeout(() => { throw err }, 0))\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/BlankNode\"), exports);\n__exportStar(require(\"./lib/DataFactory\"), exports);\n__exportStar(require(\"./lib/DefaultGraph\"), exports);\n__exportStar(require(\"./lib/Literal\"), exports);\n__exportStar(require(\"./lib/NamedNode\"), exports);\n__exportStar(require(\"./lib/Quad\"), exports);\n__exportStar(require(\"./lib/Variable\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BlankNode = void 0;\n/**\n * A term that represents an RDF blank node with a label.\n */\nclass BlankNode {\n constructor(value) {\n this.termType = 'BlankNode';\n this.value = value;\n }\n equals(other) {\n return !!other && other.termType === 'BlankNode' && other.value === this.value;\n }\n}\nexports.BlankNode = BlankNode;\n//# sourceMappingURL=BlankNode.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DataFactory = void 0;\nconst BlankNode_1 = require(\"./BlankNode\");\nconst DefaultGraph_1 = require(\"./DefaultGraph\");\nconst Literal_1 = require(\"./Literal\");\nconst NamedNode_1 = require(\"./NamedNode\");\nconst Quad_1 = require(\"./Quad\");\nconst Variable_1 = require(\"./Variable\");\nlet dataFactoryCounter = 0;\n/**\n * A factory for instantiating RDF terms and quads.\n */\nclass DataFactory {\n constructor(options) {\n this.blankNodeCounter = 0;\n options = options || {};\n this.blankNodePrefix = options.blankNodePrefix || `df_${dataFactoryCounter++}_`;\n }\n /**\n * @param value The IRI for the named node.\n * @return A new instance of NamedNode.\n * @see NamedNode\n */\n namedNode(value) {\n return new NamedNode_1.NamedNode(value);\n }\n /**\n * @param value The optional blank node identifier.\n * @return A new instance of BlankNode.\n * If the `value` parameter is undefined a new identifier\n * for the blank node is generated for each call.\n * @see BlankNode\n */\n blankNode(value) {\n return new BlankNode_1.BlankNode(value || `${this.blankNodePrefix}${this.blankNodeCounter++}`);\n }\n /**\n * @param value The literal value.\n * @param languageOrDatatype The optional language or datatype.\n * If `languageOrDatatype` is a NamedNode,\n * then it is used for the value of `NamedNode.datatype`.\n * Otherwise `languageOrDatatype` is used for the value\n * of `NamedNode.language`.\n * @return A new instance of Literal.\n * @see Literal\n */\n literal(value, languageOrDatatype) {\n return new Literal_1.Literal(value, languageOrDatatype);\n }\n /**\n * This method is optional.\n * @param value The variable name\n * @return A new instance of Variable.\n * @see Variable\n */\n variable(value) {\n return new Variable_1.Variable(value);\n }\n /**\n * @return An instance of DefaultGraph.\n */\n defaultGraph() {\n return DefaultGraph_1.DefaultGraph.INSTANCE;\n }\n /**\n * @param subject The quad subject term.\n * @param predicate The quad predicate term.\n * @param object The quad object term.\n * @param graph The quad graph term.\n * @return A new instance of Quad.\n * @see Quad\n */\n quad(subject, predicate, object, graph) {\n return new Quad_1.Quad(subject, predicate, object, graph || this.defaultGraph());\n }\n /**\n * Create a deep copy of the given term using this data factory.\n * @param original An RDF term.\n * @return A deep copy of the given term.\n */\n fromTerm(original) {\n // TODO: remove nasty any casts when this TS bug has been fixed:\n // https://github.com/microsoft/TypeScript/issues/26933\n switch (original.termType) {\n case 'NamedNode':\n return this.namedNode(original.value);\n case 'BlankNode':\n return this.blankNode(original.value);\n case 'Literal':\n if (original.language) {\n return this.literal(original.value, original.language);\n }\n if (!original.datatype.equals(Literal_1.Literal.XSD_STRING)) {\n return this.literal(original.value, this.fromTerm(original.datatype));\n }\n return this.literal(original.value);\n case 'Variable':\n return this.variable(original.value);\n case 'DefaultGraph':\n return this.defaultGraph();\n case 'Quad':\n return this.quad(this.fromTerm(original.subject), this.fromTerm(original.predicate), this.fromTerm(original.object), this.fromTerm(original.graph));\n }\n }\n /**\n * Create a deep copy of the given quad using this data factory.\n * @param original An RDF quad.\n * @return A deep copy of the given quad.\n */\n fromQuad(original) {\n return this.fromTerm(original);\n }\n /**\n * Reset the internal blank node counter.\n */\n resetBlankNodeCounter() {\n this.blankNodeCounter = 0;\n }\n}\nexports.DataFactory = DataFactory;\n//# sourceMappingURL=DataFactory.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DefaultGraph = void 0;\n/**\n * A singleton term instance that represents the default graph.\n * It's only allowed to assign a DefaultGraph to the .graph property of a Quad.\n */\nclass DefaultGraph {\n constructor() {\n this.termType = 'DefaultGraph';\n this.value = '';\n // Private constructor\n }\n equals(other) {\n return !!other && other.termType === 'DefaultGraph';\n }\n}\nexports.DefaultGraph = DefaultGraph;\nDefaultGraph.INSTANCE = new DefaultGraph();\n//# sourceMappingURL=DefaultGraph.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Literal = void 0;\nconst NamedNode_1 = require(\"./NamedNode\");\n/**\n * A term that represents an RDF literal, containing a string with an optional language tag or datatype.\n */\nclass Literal {\n constructor(value, languageOrDatatype) {\n this.termType = 'Literal';\n this.value = value;\n if (typeof languageOrDatatype === 'string') {\n this.language = languageOrDatatype;\n this.datatype = Literal.RDF_LANGUAGE_STRING;\n }\n else if (languageOrDatatype) {\n this.language = '';\n this.datatype = languageOrDatatype;\n }\n else {\n this.language = '';\n this.datatype = Literal.XSD_STRING;\n }\n }\n equals(other) {\n return !!other && other.termType === 'Literal' && other.value === this.value &&\n other.language === this.language && this.datatype.equals(other.datatype);\n }\n}\nexports.Literal = Literal;\nLiteral.RDF_LANGUAGE_STRING = new NamedNode_1.NamedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#langString');\nLiteral.XSD_STRING = new NamedNode_1.NamedNode('http://www.w3.org/2001/XMLSchema#string');\n//# sourceMappingURL=Literal.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NamedNode = void 0;\n/**\n * A term that contains an IRI.\n */\nclass NamedNode {\n constructor(value) {\n this.termType = 'NamedNode';\n this.value = value;\n }\n equals(other) {\n return !!other && other.termType === 'NamedNode' && other.value === this.value;\n }\n}\nexports.NamedNode = NamedNode;\n//# sourceMappingURL=NamedNode.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Quad = void 0;\n/**\n * An instance of DefaultGraph represents the default graph.\n * It's only allowed to assign a DefaultGraph to the .graph property of a Quad.\n */\nclass Quad {\n constructor(subject, predicate, object, graph) {\n this.termType = 'Quad';\n this.value = '';\n this.subject = subject;\n this.predicate = predicate;\n this.object = object;\n this.graph = graph;\n }\n equals(other) {\n // `|| !other.termType` is for backwards-compatibility with old factories without RDF* support.\n return !!other && (other.termType === 'Quad' || !other.termType) &&\n this.subject.equals(other.subject) &&\n this.predicate.equals(other.predicate) &&\n this.object.equals(other.object) &&\n this.graph.equals(other.graph);\n }\n}\nexports.Quad = Quad;\n//# sourceMappingURL=Quad.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Variable = void 0;\n/**\n * A term that represents a variable.\n */\nclass Variable {\n constructor(value) {\n this.termType = 'Variable';\n this.value = value;\n }\n equals(other) {\n return !!other && other.termType === 'Variable' && other.value === this.value;\n }\n}\nexports.Variable = Variable;\n//# sourceMappingURL=Variable.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/RdfIsomorphic\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTermGrounded = exports.termToSignature = exports.quadToSignature = exports.sha1hex = exports.hashTerm = exports.hashTerms = exports.getGraphBlankNodes = exports.uniqGraph = exports.deindexGraph = exports.indexGraph = exports.getQuadsWithoutBlankNodes = exports.getQuadsWithBlankNodes = exports.hasValue = exports.hashValues = exports.getBijectionInner = exports.getBijection = exports.isomorphic = void 0;\nconst hash_js_1 = require(\"hash.js\");\nconst rdf_string_1 = require(\"rdf-string\");\nconst rdf_terms_1 = require(\"rdf-terms\");\n/**\n * Determines if the two given graphs are isomorphic.\n *\n * @param {Quad[]} graphA An array of quads, order is not important.\n * @param {Quad[]} graphB An array of quads, order is not important.\n * @return {boolean} If the two given graphs are isomorphic.\n */\nfunction isomorphic(graphA, graphB) {\n return !!getBijection(graphA, graphB);\n}\nexports.isomorphic = isomorphic;\n/**\n * Calculate a hash of graphA blank nodes to graphB blank nodes.\n * This represents a bijection from graphA's blank nodes to graphB's blank nodes.\n *\n * @param {Quad[]} graphA An array of quads, order is not important.\n * @param {Quad[]} graphB An array of quads, order is not important.\n * @return {IBijection} A hash representing a bijection, or null if none could be found.\n */\nfunction getBijection(graphA, graphB) {\n // Check if all (non-blanknode-containing) quads in the two graphs are equal.\n // We do this by creating a hash-based index for both graphs.\n const nonBlankIndexA = indexGraph(getQuadsWithoutBlankNodes(graphA));\n const nonBlankIndexB = indexGraph(getQuadsWithoutBlankNodes(graphB));\n if (Object.keys(nonBlankIndexA).length !== Object.keys(nonBlankIndexB).length) {\n return null;\n }\n for (const key in nonBlankIndexA) {\n if (nonBlankIndexA[key] !== nonBlankIndexB[key]) {\n return null;\n }\n }\n // Pre-process data that needs to be present in each iteration of getBijectionInner.\n const blankQuadsA = uniqGraph(getQuadsWithBlankNodes(graphA));\n const blankQuadsB = uniqGraph(getQuadsWithBlankNodes(graphB));\n const blankNodesA = getGraphBlankNodes(graphA);\n const blankNodesB = getGraphBlankNodes(graphB);\n return getBijectionInner(blankQuadsA, blankQuadsB, blankNodesA, blankNodesB);\n}\nexports.getBijection = getBijection;\nfunction getBijectionInner(blankQuadsA, blankQuadsB, blankNodesA, blankNodesB, groundedHashesA, groundedHashesB) {\n if (!groundedHashesA) {\n groundedHashesA = {};\n }\n if (!groundedHashesB) {\n groundedHashesB = {};\n }\n // Hash every term based on the signature of the quads if appears in.\n const [hashesA, ungroundedHashesA] = hashTerms(blankQuadsA, blankNodesA, groundedHashesA);\n const [hashesB, ungroundedHashesB] = hashTerms(blankQuadsB, blankNodesB, groundedHashesB);\n // Break quickly if a graph contains a grounded node that is not contained in the other graph.\n if (Object.keys(hashesA).length !== Object.keys(hashesB).length) {\n return null;\n }\n for (const hashKeyA in hashesA) {\n if (!hasValue(hashesB, hashesA[hashKeyA])) {\n return null;\n }\n }\n // Map the blank nodes from graph A to the blank nodes of graph B using the created hashes.\n // Grounded hashes will also be equal, but not needed here, we will need them in the next recursion\n // (as we only recurse on grounded nodes).\n let bijection = {};\n for (const blankNodeA of blankNodesA) {\n const blankNodeAString = rdf_string_1.termToString(blankNodeA);\n const blankNodeAHash = ungroundedHashesA[blankNodeAString];\n for (const blankNodeBString in ungroundedHashesB) {\n if (ungroundedHashesB[blankNodeBString] === blankNodeAHash) {\n bijection[blankNodeAString] = blankNodeBString;\n delete ungroundedHashesB[blankNodeBString];\n break;\n }\n }\n }\n // Check if all nodes from graph A and B are present in the bijection,\n // if not, speculatively mark pairs with matching ungrounded hashes as bijected, and recurse.\n if (!arraysEqual(Object.keys(bijection).sort(), blankNodesA.map(rdf_string_1.termToString).sort())\n || !arraysEqual(hashValues(bijection).sort(), blankNodesB.map(rdf_string_1.termToString).sort())) {\n // I have not yet been able to find any pathological cases where this code is reached.\n // This may be removable, but let's wait until someone proves that.\n bijection = null;\n for (const blankNodeA of blankNodesA) {\n // Only replace ungrounded node hashes\n const blankNodeAString = rdf_string_1.termToString(blankNodeA);\n if (!hashesA[blankNodeAString]) {\n for (const blankNodeB of blankNodesB) {\n // Only replace ungrounded node hashes\n const blankNodeBString = rdf_string_1.termToString(blankNodeB);\n if (!hashesB[blankNodeBString]) {\n if (ungroundedHashesA[blankNodeAString] === ungroundedHashesB[blankNodeBString]) {\n const hash = sha1hex(blankNodeAString);\n bijection = getBijectionInner(blankQuadsA, blankQuadsB, blankNodesA, blankNodesB, Object.assign(Object.assign({}, hashesA), { [blankNodeAString]: hash }), Object.assign(Object.assign({}, hashesB), { [blankNodeBString]: hash }));\n }\n }\n }\n }\n }\n }\n return bijection;\n}\nexports.getBijectionInner = getBijectionInner;\nfunction arraysEqual(array1, array2) {\n if (array1.length !== array2.length) {\n return false;\n }\n for (let i = array1.length; i--;) {\n if (array1[i] !== array2[i]) {\n return false;\n }\n }\n return true;\n}\n/**\n * Get all values from the given hash\n * @param hash A hash.\n * @return {any[]} The array of values.\n */\nfunction hashValues(hash) {\n const arr = [];\n for (const e in hash) {\n arr.push(hash[e]);\n }\n return arr;\n}\nexports.hashValues = hashValues;\n/**\n * Check if the given hash contains the given value.\n * @param hash A hash.\n * @param {string} value A value.\n * @return {boolean} If it contains the value.\n */\nfunction hasValue(hash, value) {\n for (const hashValue in hash) {\n if (hash[hashValue] === value) {\n return true;\n }\n }\n return false;\n}\nexports.hasValue = hasValue;\n/**\n * Get all quads with blank nodes.\n * @param {Quad[]} graph An array of quads.\n * @return {Quad[]} An array of quads with blank nodes\n */\nfunction getQuadsWithBlankNodes(graph) {\n return graph.filter((quad) => rdf_terms_1.someTerms(quad, (value) => {\n return value.termType === 'BlankNode'\n || (value.termType === 'Quad' && rdf_terms_1.getTermsNested(value).some(term => term.termType === 'BlankNode'));\n }));\n}\nexports.getQuadsWithBlankNodes = getQuadsWithBlankNodes;\n/**\n * Get all quads without blank nodes.\n * @param {Quad[]} graph An array of quads.\n * @return {Quad[]} An array of quads without blank nodes\n */\nfunction getQuadsWithoutBlankNodes(graph) {\n return graph.filter((quad) => rdf_terms_1.everyTerms(quad, (value) => {\n return value.termType !== 'BlankNode'\n && !(value.termType === 'Quad' && rdf_terms_1.getTermsNested(value).some(term => term.termType === 'BlankNode'));\n }));\n}\nexports.getQuadsWithoutBlankNodes = getQuadsWithoutBlankNodes;\n/**\n * Create a hash-based index of the given graph.\n * @param {Quad[]} graph An array of quads, the order does not matter.\n * @return {{[p: string]: boolean}} A hash-based datastructure representing the graph.\n */\nfunction indexGraph(graph) {\n const index = {};\n for (const quad of graph) {\n index[JSON.stringify(rdf_string_1.quadToStringQuad(quad))] = true;\n }\n return index;\n}\nexports.indexGraph = indexGraph;\n/**\n * Create a graph from the given hash-based index.\n * @param {{[p: string]: boolean}} indexedGraph A hash-based datastructure representing the graph.\n * @return {Quad[]} An array of quads, the order does not matter.\n */\nfunction deindexGraph(indexedGraph) {\n return Object.keys(indexedGraph).map((str) => rdf_string_1.stringQuadToQuad(JSON.parse(str)));\n}\nexports.deindexGraph = deindexGraph;\n/**\n * Unique-ify the given RDF graph based on strict equality.\n * The output graph will consist of new quad and term instances.\n * @param {Quad[]} graph An input graph.\n * @return {Quad[]} The input graph without duplicates.\n */\nfunction uniqGraph(graph) {\n return deindexGraph(indexGraph(graph));\n}\nexports.uniqGraph = uniqGraph;\n/**\n * Find all blank nodes in the given graph.\n * @param {Quad[]} graph An array of quads.\n * @return {BlankNode[]} A list of (unique) blank nodes.\n */\nfunction getGraphBlankNodes(graph) {\n return rdf_terms_1.uniqTerms(graph.map((quad) => rdf_terms_1.getBlankNodes(rdf_terms_1.getTermsNested(quad)))\n .reduce((acc, val) => acc.concat(val), []));\n}\nexports.getGraphBlankNodes = getGraphBlankNodes;\n/**\n * Create term hashes for the given set of quads and blank node terms.\n *\n * @param {Quad[]} quads A set of quads.\n * @param {Term[]} terms Blank node terms.\n * @param {ITermHash} groundedHashes Grounded term hashes that are used to create more specific signatures\n * of other terms, because they are based on non-blank nodes and grounded blank nodes.\n * @return {[ITermHash]} A tuple of grounded and ungrounded hashes.\n */\nfunction hashTerms(quads, terms, groundedHashes) {\n const hashes = Object.assign({}, groundedHashes);\n const ungroundedHashes = {};\n let hashNeeded = true;\n // Iteratively mark nodes as grounded.\n // If a node is marked as grounded, then the next iteration can lead to new grounded states\n while (hashNeeded) {\n const initialGroundedNodesCount = Object.keys(hashes).length;\n for (const term of terms) {\n const termString = rdf_string_1.termToString(term);\n if (!hashes[termString]) {\n const [grounded, hash] = hashTerm(term, quads, hashes);\n if (grounded) {\n hashes[termString] = hash;\n }\n ungroundedHashes[termString] = hash;\n }\n }\n // All terms that have a unique hash at this point can be marked as grounded\n const uniques = {};\n for (const termKey in ungroundedHashes) {\n const hash = ungroundedHashes[termKey];\n if (uniques[hash] === undefined) {\n uniques[hash] = termKey;\n }\n else {\n uniques[hash] = false;\n }\n }\n for (const hash in uniques) {\n const value = uniques[hash];\n if (value) {\n hashes[value] = hash;\n }\n }\n // Check if the loop needs to terminate\n hashNeeded = initialGroundedNodesCount !== Object.keys(hashes).length;\n }\n return [hashes, ungroundedHashes];\n}\nexports.hashTerms = hashTerms;\n/**\n * Generate a hash for the given term based on the signature of the quads it appears in.\n *\n * Signatures are made up of grounded terms in quads that are associated with a term,\n * i.e., everything except for ungrounded blank nodes.\n * The hash is created by hashing a sorted list of each quad's signature,\n * where each quad signature is a concatenation of the signature of all grounded terms.\n *\n * Terms are considered grounded if they are a member in the given hash AND if they are not the given term.\n *\n * @param {Term} term The term to get the hash around.\n * @param {Quad[]} quads The quads to include in the hashing.\n * @param {ITermHash} hashes A grounded term hash object.\n * @return {[boolean , string]} A tuple indicating if the given term is grounded in all the given quads, and the hash.\n */\nfunction hashTerm(term, quads, hashes) {\n const quadSignatures = [];\n let grounded = true;\n for (const quad of quads) {\n const terms = rdf_terms_1.getTermsNested(quad);\n if (terms.some((quadTerm) => quadTerm.equals(term))) {\n quadSignatures.push(quadToSignature(quad, hashes, term));\n for (const quadTerm of terms) {\n if (!isTermGrounded(quadTerm, hashes) && !quadTerm.equals(term)) {\n grounded = false;\n }\n }\n }\n }\n const hash = sha1hex(quadSignatures.sort().join(''));\n return [grounded, hash];\n}\nexports.hashTerm = hashTerm;\n/**\n * Create a hash using sha1 as a hex digest.\n * @param {string | Buffer | NodeJS.TypedArray | DataView} data Something to hash.\n * @return {string} A hash string.\n */\nfunction sha1hex(data) {\n return hash_js_1.sha1().update(data).digest('hex');\n}\nexports.sha1hex = sha1hex;\n/**\n * Convert the given quad to a string signature so that it can be used in the hash structure.\n * @param {Quad} quad A quad.\n * @param {ITermHash} hashes A grounded term hash object.\n * @param {Term} term A target term to compare with.\n * @return {string} A string signature.\n */\nfunction quadToSignature(quad, hashes, term) {\n return rdf_terms_1.getTerms(quad).map((quadTerm) => termToSignature(quadTerm, hashes, term)).join('|');\n}\nexports.quadToSignature = quadToSignature;\n/**\n * Convert the given term to a string signature so that it can be used in the hash structure.\n * @param {Term} term A term.\n * @param {ITermHash} hashes A grounded term hash object.\n * @param {Term} target A target term to compare with.\n * @return {string} A string signature.\n */\nfunction termToSignature(term, hashes, target) {\n if (term.equals(target)) {\n return '@self';\n }\n else if (term.termType === 'BlankNode') {\n return hashes[rdf_string_1.termToString(term)] || '@blank';\n }\n else if (term.termType === 'Quad') {\n return `<${quadToSignature(term, hashes, target)}>`;\n }\n else {\n return rdf_string_1.termToString(term);\n }\n}\nexports.termToSignature = termToSignature;\n/**\n * Check if a term is grounded.\n *\n * A term is grounded if it is not a blank node\n * or if it included in the given hash of grounded nodes.\n *\n * @param {Term} term A term.\n * @param {ITermHash} hashes A grounded term hash object.\n * @return {boolean} If the given term is grounded.\n */\nfunction isTermGrounded(term, hashes) {\n return (term.termType !== 'BlankNode'\n && !(term.termType === 'Quad' && rdf_terms_1.getTermsNested(term).some(subTerm => !isTermGrounded(subTerm, hashes)))) || !!hashes[rdf_string_1.termToString(term)];\n}\nexports.isTermGrounded = isTermGrounded;\n//# sourceMappingURL=RdfIsomorphic.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSupportedJavaScriptPrimitives = exports.getSupportedRdfDatatypes = exports.getTermRaw = exports.toRdf = exports.fromRdf = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst handler_1 = require(\"./lib/handler\");\nconst Translator_1 = require(\"./lib/Translator\");\n__exportStar(require(\"./lib/handler\"), exports);\n__exportStar(require(\"./lib/ITypeHandler\"), exports);\n__exportStar(require(\"./lib/Translator\"), exports);\nconst DF = new rdf_data_factory_1.DataFactory();\n// Construct translator with built-in handlers\nconst translator = new Translator_1.Translator();\ntranslator.registerHandler(new handler_1.TypeHandlerString(), handler_1.TypeHandlerString.TYPES.map(t => DF.namedNode(t)), ['string']);\ntranslator.registerHandler(new handler_1.TypeHandlerBoolean(), [handler_1.TypeHandlerBoolean.TYPE].map(t => DF.namedNode(t)), ['boolean']);\ntranslator.registerHandler(new handler_1.TypeHandlerNumberDouble(), handler_1.TypeHandlerNumberDouble.TYPES.map(t => DF.namedNode(t)), ['number']);\ntranslator.registerHandler(new handler_1.TypeHandlerNumberInteger(), handler_1.TypeHandlerNumberInteger.TYPES.map(t => DF.namedNode(t)), ['number']);\ntranslator.registerHandler(new handler_1.TypeHandlerDate(), handler_1.TypeHandlerDate.TYPES.map(t => DF.namedNode(t)), ['object']);\n/**\n * Convert the given RDF literal to an JavaScript primitive.\n * @param {Literal} literal An RDF literal value.\n * @param {boolean} validate If the literal value should be validated against the datatype.\n * @return {any} A JavaScript primitive value.\n */\nfunction fromRdf(literal, validate) {\n return translator.fromRdf(literal, validate);\n}\nexports.fromRdf = fromRdf;\n/**\n * Convert the given JavaScript primitive to an RDF literal.\n * @param value A JavaScript primitive value.\n * @param options Options for RDF conversion. May also be a data factory.\n * @return {Literal} An RDF literal value.\n */\nfunction toRdf(value, options) {\n // Backwards-compatibility to accept data factory as option arg.\n if (options && 'namedNode' in options) {\n options = { dataFactory: options };\n }\n // Set default data factory\n options = options || {};\n if (options && !options.dataFactory) {\n options.dataFactory = DF;\n }\n return translator.toRdf(value, options);\n}\nexports.toRdf = toRdf;\n/**\n * Get the raw value of the given term.\n * If it is a literal, {@link fromRdf} will be called.\n * Otherwise {@link .value} will be returned.\n * @param {Term} term Any RDF term.\n * @param {boolean} validate If the literal value should be validated against the datatype.\n * @return {any} A JavaScript primitive value.\n */\nfunction getTermRaw(term, validate) {\n if (term.termType === 'Literal') {\n return fromRdf(term, validate);\n }\n return term.value;\n}\nexports.getTermRaw = getTermRaw;\n/**\n * @return {NamedNode[]} An array of all supported RDF datatypes.\n */\nfunction getSupportedRdfDatatypes() {\n return translator.getSupportedRdfDatatypes();\n}\nexports.getSupportedRdfDatatypes = getSupportedRdfDatatypes;\n/**\n * @return {string[]} An array of all supported JavaScript types.\n */\nfunction getSupportedJavaScriptPrimitives() {\n return translator.getSupportedJavaScriptPrimitives();\n}\nexports.getSupportedJavaScriptPrimitives = getSupportedJavaScriptPrimitives;\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=ITypeHandler.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Translator = void 0;\n/**\n * Translates between an RDF literal and a JavaScript primitive.\n */\nclass Translator {\n constructor() {\n this.supportedRdfDatatypes = [];\n this.fromRdfHandlers = {};\n this.toRdfHandlers = {};\n }\n static incorrectRdfDataType(literal) {\n throw new Error(`Invalid RDF ${literal.datatype.value} value: '${literal.value}'`);\n }\n registerHandler(handler, rdfDatatypes, javaScriptDataTypes) {\n for (const rdfDatatype of rdfDatatypes) {\n this.supportedRdfDatatypes.push(rdfDatatype);\n this.fromRdfHandlers[rdfDatatype.value] = handler;\n }\n for (const javaScriptDataType of javaScriptDataTypes) {\n let existingToRdfHandlers = this.toRdfHandlers[javaScriptDataType];\n if (!existingToRdfHandlers) {\n this.toRdfHandlers[javaScriptDataType] = existingToRdfHandlers = [];\n }\n existingToRdfHandlers.push(handler);\n }\n }\n fromRdf(literal, validate) {\n const handler = this.fromRdfHandlers[literal.datatype.value];\n if (handler) {\n return handler.fromRdf(literal, validate);\n }\n else {\n return literal.value;\n }\n }\n toRdf(value, options) {\n const handlers = this.toRdfHandlers[typeof value];\n if (handlers) {\n for (const handler of handlers) {\n const ret = handler.toRdf(value, options);\n if (ret) {\n return ret;\n }\n }\n }\n throw new Error(`Invalid JavaScript value: '${value}'`);\n }\n /**\n * @return {NamedNode[]} An array of all supported RDF datatypes.\n */\n getSupportedRdfDatatypes() {\n return this.supportedRdfDatatypes;\n }\n /**\n * @return {string[]} An array of all supported JavaScript types.\n */\n getSupportedJavaScriptPrimitives() {\n return Object.keys(this.toRdfHandlers);\n }\n}\nexports.Translator = Translator;\n//# sourceMappingURL=Translator.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeHandlerBoolean = void 0;\nconst Translator_1 = require(\"../Translator\");\n/**\n * Translates booleans.\n */\nclass TypeHandlerBoolean {\n fromRdf(literal, validate) {\n switch (literal.value) {\n case 'true':\n return true;\n case 'false':\n return false;\n case '1':\n return true;\n case '0':\n return false;\n }\n if (validate) {\n Translator_1.Translator.incorrectRdfDataType(literal);\n }\n return false;\n }\n toRdf(value, { datatype, dataFactory }) {\n return dataFactory.literal(value ? 'true' : 'false', datatype || dataFactory.namedNode(TypeHandlerBoolean.TYPE));\n }\n}\nTypeHandlerBoolean.TYPE = 'http://www.w3.org/2001/XMLSchema#boolean';\nexports.TypeHandlerBoolean = TypeHandlerBoolean;\n//# sourceMappingURL=TypeHandlerBoolean.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeHandlerDate = void 0;\nconst Translator_1 = require(\"../Translator\");\n/**\n * Translates dates.\n */\nclass TypeHandlerDate {\n fromRdf(literal, validate) {\n if (validate && !literal.value.match(TypeHandlerDate\n .VALIDATORS[literal.datatype.value.substr(33, literal.datatype.value.length)])) {\n Translator_1.Translator.incorrectRdfDataType(literal);\n }\n switch (literal.datatype.value) {\n case 'http://www.w3.org/2001/XMLSchema#gDay':\n return new Date(0, 0, parseInt(literal.value, 10));\n case 'http://www.w3.org/2001/XMLSchema#gMonthDay':\n const partsMonthDay = literal.value.split('-');\n return new Date(0, parseInt(partsMonthDay[0], 10) - 1, parseInt(partsMonthDay[1], 10));\n case 'http://www.w3.org/2001/XMLSchema#gYear':\n return new Date(literal.value + '-01-01');\n case 'http://www.w3.org/2001/XMLSchema#gYearMonth':\n return new Date(literal.value + '-01');\n default:\n return new Date(literal.value);\n }\n }\n toRdf(value, { datatype, dataFactory }) {\n datatype = datatype || dataFactory.namedNode(TypeHandlerDate.TYPES[0]);\n // Assume date values\n if (!(value instanceof Date)) {\n return null;\n }\n const date = value;\n let valueString;\n switch (datatype.value) {\n case 'http://www.w3.org/2001/XMLSchema#gDay':\n valueString = String(date.getUTCDate());\n break;\n case 'http://www.w3.org/2001/XMLSchema#gMonthDay':\n valueString = (date.getUTCMonth() + 1) + '-' + date.getUTCDate();\n break;\n case 'http://www.w3.org/2001/XMLSchema#gYear':\n valueString = String(date.getUTCFullYear());\n break;\n case 'http://www.w3.org/2001/XMLSchema#gYearMonth':\n valueString = date.getUTCFullYear() + '-' + (date.getUTCMonth() + 1);\n break;\n case 'http://www.w3.org/2001/XMLSchema#date':\n valueString = date.toISOString().replace(/T.*$/, '');\n break;\n default:\n valueString = date.toISOString();\n }\n return dataFactory.literal(valueString, datatype);\n }\n}\nTypeHandlerDate.TYPES = [\n 'http://www.w3.org/2001/XMLSchema#dateTime',\n 'http://www.w3.org/2001/XMLSchema#date',\n 'http://www.w3.org/2001/XMLSchema#gDay',\n 'http://www.w3.org/2001/XMLSchema#gMonthDay',\n 'http://www.w3.org/2001/XMLSchema#gYear',\n 'http://www.w3.org/2001/XMLSchema#gYearMonth',\n];\nTypeHandlerDate.VALIDATORS = {\n date: /^[0-9]+-[0-9][0-9]-[0-9][0-9]Z?$/,\n dateTime: /^[0-9]+-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9](\\.[0-9][0-9][0-9])?((Z?)|([\\+-][0-9][0-9]:[0-9][0-9]))$/,\n gDay: /^[0-9]+$/,\n gMonthDay: /^[0-9]+-[0-9][0-9]$/,\n gYear: /^[0-9]+$/,\n gYearMonth: /^[0-9]+-[0-9][0-9]$/,\n};\nexports.TypeHandlerDate = TypeHandlerDate;\n//# sourceMappingURL=TypeHandlerDate.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeHandlerNumberDouble = void 0;\nconst Translator_1 = require(\"../Translator\");\n/**\n * Translates double numbers.\n */\nclass TypeHandlerNumberDouble {\n fromRdf(literal, validate) {\n const parsed = parseFloat(literal.value);\n if (validate) {\n if (isNaN(parsed)) {\n Translator_1.Translator.incorrectRdfDataType(literal);\n }\n // TODO: validate more\n }\n return parsed;\n }\n toRdf(value, { datatype, dataFactory }) {\n datatype = datatype || dataFactory.namedNode(TypeHandlerNumberDouble.TYPES[0]);\n if (isNaN(value)) {\n return dataFactory.literal('NaN', datatype);\n }\n if (!isFinite(value)) {\n return dataFactory.literal(value > 0 ? 'INF' : '-INF', datatype);\n }\n if (value % 1 === 0) {\n return null;\n }\n return dataFactory.literal(value.toExponential(15).replace(/(\\d)0*e\\+?/, '$1E'), datatype);\n }\n}\nTypeHandlerNumberDouble.TYPES = [\n 'http://www.w3.org/2001/XMLSchema#double',\n 'http://www.w3.org/2001/XMLSchema#decimal',\n 'http://www.w3.org/2001/XMLSchema#float',\n];\nexports.TypeHandlerNumberDouble = TypeHandlerNumberDouble;\n//# sourceMappingURL=TypeHandlerNumberDouble.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeHandlerNumberInteger = void 0;\nconst Translator_1 = require(\"../Translator\");\n/**\n * Translates integer numbers.\n */\nclass TypeHandlerNumberInteger {\n fromRdf(literal, validate) {\n const parsed = parseInt(literal.value, 10);\n if (validate) {\n if (isNaN(parsed) || literal.value.indexOf('.') >= 0) {\n Translator_1.Translator.incorrectRdfDataType(literal);\n }\n // TODO: validate more\n }\n return parsed;\n }\n toRdf(value, { datatype, dataFactory }) {\n return dataFactory.literal(String(value), datatype\n || (value <= TypeHandlerNumberInteger.MAX_INT && value >= TypeHandlerNumberInteger.MIN_INT\n ? dataFactory.namedNode(TypeHandlerNumberInteger.TYPES[0])\n : dataFactory.namedNode(TypeHandlerNumberInteger.TYPES[1])));\n }\n}\nTypeHandlerNumberInteger.TYPES = [\n 'http://www.w3.org/2001/XMLSchema#integer',\n 'http://www.w3.org/2001/XMLSchema#long',\n 'http://www.w3.org/2001/XMLSchema#int',\n 'http://www.w3.org/2001/XMLSchema#byte',\n 'http://www.w3.org/2001/XMLSchema#short',\n 'http://www.w3.org/2001/XMLSchema#negativeInteger',\n 'http://www.w3.org/2001/XMLSchema#nonNegativeInteger',\n 'http://www.w3.org/2001/XMLSchema#nonPositiveInteger',\n 'http://www.w3.org/2001/XMLSchema#positiveInteger',\n 'http://www.w3.org/2001/XMLSchema#unsignedByte',\n 'http://www.w3.org/2001/XMLSchema#unsignedInt',\n 'http://www.w3.org/2001/XMLSchema#unsignedLong',\n 'http://www.w3.org/2001/XMLSchema#unsignedShort',\n];\nTypeHandlerNumberInteger.MAX_INT = 2147483647;\nTypeHandlerNumberInteger.MIN_INT = -2147483648;\nexports.TypeHandlerNumberInteger = TypeHandlerNumberInteger;\n//# sourceMappingURL=TypeHandlerNumberInteger.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TypeHandlerString = void 0;\n/**\n * Translates strings.\n */\nclass TypeHandlerString {\n fromRdf(literal) {\n return literal.value;\n }\n toRdf(value, { datatype, dataFactory }) {\n return dataFactory.literal(value, datatype);\n }\n}\nTypeHandlerString.TYPES = [\n 'http://www.w3.org/2001/XMLSchema#string',\n 'http://www.w3.org/2001/XMLSchema#normalizedString',\n 'http://www.w3.org/2001/XMLSchema#anyURI',\n 'http://www.w3.org/2001/XMLSchema#base64Binary',\n 'http://www.w3.org/2001/XMLSchema#language',\n 'http://www.w3.org/2001/XMLSchema#Name',\n 'http://www.w3.org/2001/XMLSchema#NCName',\n 'http://www.w3.org/2001/XMLSchema#NMTOKEN',\n 'http://www.w3.org/2001/XMLSchema#token',\n 'http://www.w3.org/2001/XMLSchema#hexBinary',\n 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString',\n 'http://www.w3.org/2001/XMLSchema#time',\n 'http://www.w3.org/2001/XMLSchema#duration',\n];\nexports.TypeHandlerString = TypeHandlerString;\n//# sourceMappingURL=TypeHandlerString.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./TypeHandlerBoolean\"), exports);\n__exportStar(require(\"./TypeHandlerDate\"), exports);\n__exportStar(require(\"./TypeHandlerNumberDouble\"), exports);\n__exportStar(require(\"./TypeHandlerNumberInteger\"), exports);\n__exportStar(require(\"./TypeHandlerString\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.storeStream = void 0;\nconst rdf_stores_1 = require(\"rdf-stores\");\n/**\n * Import all quads in the given stream into a new RDF store.\n *\n * The whole stream will be consumed for this,\n * and the promise will resolve once the stream's end event is emitted.\n *\n * @param {Stream} stream An RDF stream containing the quads to import into the store.\n * @return {Promise>} A promise resolving to an RDF store.\n */\nfunction storeStream(stream) {\n const store = rdf_stores_1.RdfStore.createDefault();\n return new Promise((resolve, reject) => store.import(stream)\n .on('error', reject)\n .once('end', () => resolve(store)));\n}\nexports.storeStream = storeStream;\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/dataset/DatasetCoreWrapper\"), exports);\n__exportStar(require(\"./lib/dictionary/ITermDictionary\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionaryNumberMap\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionaryNumberRecord\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionaryNumberRecordFullTerms\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionaryQuoted\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionaryQuotedIndexed\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionaryQuotedReferential\"), exports);\n__exportStar(require(\"./lib/dictionary/TermDictionarySymbol\"), exports);\n__exportStar(require(\"./lib/index/IRdfStoreIndex\"), exports);\n__exportStar(require(\"./lib/index/RdfStoreIndexNestedMap\"), exports);\n__exportStar(require(\"./lib/index/RdfStoreIndexNestedMapQuoted\"), exports);\n__exportStar(require(\"./lib/index/RdfStoreIndexNestedMapRecursive\"), exports);\n__exportStar(require(\"./lib/index/RdfStoreIndexNestedMapRecursiveQuoted\"), exports);\n__exportStar(require(\"./lib/index/RdfStoreIndexNestedRecord\"), exports);\n__exportStar(require(\"./lib/index/RdfStoreIndexNestedRecordQuoted\"), exports);\n__exportStar(require(\"./lib/IRdfStoreOptions\"), exports);\n__exportStar(require(\"./lib/OrderUtils\"), exports);\n__exportStar(require(\"./lib/PatternTerm\"), exports);\n__exportStar(require(\"./lib/RdfStore\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IRdfStoreOptions.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.arePatternsQuoted = exports.quadHasVariables = exports.quadToPattern = exports.encodeOptionalTerms = exports.orderQuadComponents = exports.getComponentOrderScore = exports.getBestIndex = exports.QUAD_TERM_NAMES_INVERSE = void 0;\nconst rdf_terms_1 = require(\"rdf-terms\");\nexports.QUAD_TERM_NAMES_INVERSE = Object.fromEntries(rdf_terms_1.QUAD_TERM_NAMES.map((value, key) => [value, key]));\n/**\n * Determine the best suitable order's index among the given orders for the given quad pattern.\n * @param componentOrders Possible orders of quad components.\n * @param quadPattern A quad pattern.\n */\nfunction getBestIndex(componentOrders, quadPattern) {\n if (componentOrders.length === 1 || quadPattern.every(term => term !== undefined)) {\n return 0;\n }\n // Determine the quad component names for which we require a defined lookup\n const definedQuadComponentNames = [];\n for (let quadComponentId = 0; quadComponentId < rdf_terms_1.QUAD_TERM_NAMES.length; quadComponentId++) {\n if (quadPattern[quadComponentId]) {\n definedQuadComponentNames.push(rdf_terms_1.QUAD_TERM_NAMES[quadComponentId]);\n }\n }\n // Score indexes by how well they match to the index\n const scoredIndexes = componentOrders.map((componentOrder, index) => {\n const score = getComponentOrderScore(componentOrder, definedQuadComponentNames);\n return { score, index };\n });\n // Sort the indexes, and pick the first one\n return scoredIndexes.sort((scoredLeft, scoredRight) => scoredRight.score - scoredLeft.score)[0].index;\n}\nexports.getBestIndex = getBestIndex;\n/**\n * Determine the score of the given partial component order in the given component order.\n * @param componentOrder A quad component order.\n * @param partialComponentOrder A partial quad component order that originates from a quad pattern.\n */\nfunction getComponentOrderScore(componentOrder, partialComponentOrder) {\n return componentOrder\n .map((order, i) => partialComponentOrder.includes(order) ? componentOrder.length - i : 0)\n .reduce((acc, add) => acc + add, 0);\n}\nexports.getComponentOrderScore = getComponentOrderScore;\n/**\n * Order a quad pattern's terms based on the given component order.\n * @param desiredComponentOrder The desired order of components.\n * @param quadPattern A quad pattern.\n */\nfunction orderQuadComponents(desiredComponentOrder, quadPattern) {\n return desiredComponentOrder.map(desiredComponent => {\n const desiredComponentIndex = exports.QUAD_TERM_NAMES_INVERSE[desiredComponent];\n return quadPattern[desiredComponentIndex];\n });\n}\nexports.orderQuadComponents = orderQuadComponents;\n/**\n * Encode the given array of quad terms.\n * @param terms Non-encoded quad terms.\n * @param dictionary A dictionary\n * @return array An array of encoded terms.\n * The array will be undefined if at least one of the patterns does not occur within the dictionary.\n */\nfunction encodeOptionalTerms(terms, dictionary) {\n const encodedTerms = terms.map(term => {\n if (term) {\n if (term.termType === 'Quad' && quadHasVariables(term)) {\n return;\n }\n const encodedTerm = dictionary.encodeOptional(term);\n if (encodedTerm === undefined) {\n return 'none';\n }\n return encodedTerm;\n }\n return term;\n });\n if (encodedTerms.includes('none')) {\n return undefined;\n }\n return encodedTerms;\n}\nexports.encodeOptionalTerms = encodeOptionalTerms;\n/**\n * Convert a quad patter to a `QuadPatternTerms` type.\n * @param subject The subject.\n * @param predicate The predicate.\n * @param object The object.\n * @param graph The graph.\n * @param quotedPatterns If the index supports quoted triple filtering.\n * @return Tuple A tuple of QuadPatternTerms\n * and a boolean indicating if post-filtering will be needed on quoted triples.\n * This boolean can only be true if `quotedPatterns` is false, and a quoted triple pattern was present.\n */\nfunction quadToPattern(subject, predicate, object, graph, quotedPatterns) {\n let requireQuotedTripleFiltering = false;\n const quadPatternTerms = [subject || undefined, predicate || undefined, object || undefined, graph || undefined]\n .map(term => {\n if (term) {\n if (term.termType === 'Variable') {\n return;\n }\n if (term.termType === 'Quad') {\n if (quotedPatterns) {\n return term;\n }\n requireQuotedTripleFiltering = true;\n return;\n }\n }\n return term;\n });\n return [quadPatternTerms, requireQuotedTripleFiltering];\n}\nexports.quadToPattern = quadToPattern;\n/**\n * Check if the given quad contains variables, even in deeply nested quoted triples.\n * @param currentTerm The quad pattern term.\n */\nfunction quadHasVariables(currentTerm) {\n for (const component of rdf_terms_1.QUAD_TERM_NAMES) {\n const subTerm = currentTerm[component];\n if (subTerm.termType === 'Variable' || (subTerm.termType === 'Quad' && quadHasVariables(subTerm))) {\n return true;\n }\n }\n return false;\n}\nexports.quadHasVariables = quadHasVariables;\n/**\n * Create a boolean array indicating which terms are quoted triple patterns.\n * @param terms An array of terms.\n */\nfunction arePatternsQuoted(terms) {\n return terms.map(term => (term === null || term === void 0 ? void 0 : term.termType) === 'Quad' && quadHasVariables(term));\n}\nexports.arePatternsQuoted = arePatternsQuoted;\n//# sourceMappingURL=OrderUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=PatternTerm.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStore = void 0;\nconst asynciterator_1 = require(\"asynciterator\");\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_terms_1 = require(\"rdf-terms\");\nconst DatasetCoreWrapper_1 = require(\"./dataset/DatasetCoreWrapper\");\nconst TermDictionaryNumberRecordFullTerms_1 = require(\"./dictionary/TermDictionaryNumberRecordFullTerms\");\nconst TermDictionaryQuotedIndexed_1 = require(\"./dictionary/TermDictionaryQuotedIndexed\");\nconst RdfStoreIndexNestedMapQuoted_1 = require(\"./index/RdfStoreIndexNestedMapQuoted\");\nconst OrderUtils_1 = require(\"./OrderUtils\");\n/**\n * An RDF store allows quads to be stored and fetched, based on one or more customizable indexes.\n */\nclass RdfStore {\n constructor(options) {\n this.features = { quotedTripleFiltering: true };\n this._size = 0;\n this.options = options;\n this.dataFactory = options.dataFactory;\n this.dictionary = options.dictionary;\n this.indexesWrapped = RdfStore.constructIndexesWrapped(options);\n this.indexesWrappedComponentOrders = this.indexesWrapped.map(indexThis => indexThis.componentOrder);\n }\n /**\n * Create an RDF store with default settings.\n * Concretely, this store stores triples in GSPO, GPOS, and GOSP order,\n * and makes use of in-memory number dictionary encoding.\n */\n static createDefault() {\n return new RdfStore({\n indexCombinations: RdfStore.DEFAULT_INDEX_COMBINATIONS,\n indexConstructor: subOptions => new RdfStoreIndexNestedMapQuoted_1.RdfStoreIndexNestedMapQuoted(subOptions),\n dictionary: new TermDictionaryQuotedIndexed_1.TermDictionaryQuotedIndexed(new TermDictionaryNumberRecordFullTerms_1.TermDictionaryNumberRecordFullTerms()),\n dataFactory: new rdf_data_factory_1.DataFactory(),\n });\n }\n /**\n * Internal helper to create index objects.\n * @param options The RDF store options object.\n */\n static constructIndexesWrapped(options) {\n const indexes = [];\n if (options.indexCombinations.length === 0) {\n throw new Error('At least one index combination is required');\n }\n for (const componentOrder of options.indexCombinations) {\n if (!RdfStore.isCombinationValid(componentOrder)) {\n throw new Error(`Invalid index combination: ${componentOrder}`);\n }\n indexes.push({\n index: options.indexConstructor(options),\n componentOrder,\n componentOrderInverse: Object.fromEntries(componentOrder.map((value, key) => [value, key])),\n });\n }\n return indexes;\n }\n /**\n * Check if a given quad term order is valid.\n * @param combination A quad term order.\n */\n static isCombinationValid(combination) {\n for (const quadTermName of rdf_terms_1.QUAD_TERM_NAMES) {\n if (!combination.includes(quadTermName)) {\n return false;\n }\n }\n return combination.length === 4;\n }\n /**\n * The number of quads in this store.\n */\n get size() {\n return this._size;\n }\n /**\n * Add a quad to the store.\n * @param quad An RDF quad.\n * @return boolean If the quad was not yet present in the index.\n */\n addQuad(quad) {\n const quadEncoded = [\n this.dictionary.encode(quad.subject),\n this.dictionary.encode(quad.predicate),\n this.dictionary.encode(quad.object),\n this.dictionary.encode(quad.graph),\n ];\n let newQuad = false;\n for (const indexWrapped of this.indexesWrapped) {\n // Before sending the quad to the index, make sure its components are ordered corresponding to the index's order.\n newQuad = indexWrapped.index\n .set((0, OrderUtils_1.orderQuadComponents)(indexWrapped.componentOrder, quadEncoded), true);\n }\n if (newQuad) {\n this._size++;\n return true;\n }\n return false;\n }\n /**\n * Remove a quad from the store.\n * @param quad An RDF quad.\n * @return boolean If the quad was present in the index.\n */\n removeQuad(quad) {\n const quadEncoded = [\n this.dictionary.encodeOptional(quad.subject),\n this.dictionary.encodeOptional(quad.predicate),\n this.dictionary.encodeOptional(quad.object),\n this.dictionary.encodeOptional(quad.graph),\n ];\n // We can quickly return false if the quad is not present in the dictionary\n // eslint-disable-next-line unicorn/no-useless-undefined\n if (quadEncoded.includes(undefined)) {\n return false;\n }\n let wasPresent = false;\n for (const indexWrapped of this.indexesWrapped) {\n // Before sending the quad to the index, make sure its components are ordered corresponding to the index's order.\n wasPresent = indexWrapped.index\n .remove((0, OrderUtils_1.orderQuadComponents)(indexWrapped.componentOrder, quadEncoded));\n if (!wasPresent) {\n break;\n }\n }\n if (wasPresent) {\n this._size--;\n return true;\n }\n return false;\n }\n /**\n * Removes all streamed quads.\n * @param stream A stream of quads\n */\n remove(stream) {\n stream.on('data', quad => this.removeQuad(quad));\n return stream;\n }\n /**\n * All quads matching the pattern will be removed.\n * @param subject The optional subject.\n * @param predicate The optional predicate.\n * @param object The optional object.\n * @param graph The optional graph.\n */\n removeMatches(subject, predicate, object, graph) {\n return this.remove(this.match(subject, predicate, object, graph));\n }\n /**\n * Deletes the given named graph.\n * @param graph The graph term or string to match.\n */\n deleteGraph(graph) {\n if (typeof graph === 'string') {\n graph = this.dataFactory.namedNode(graph);\n }\n return this.removeMatches(undefined, undefined, undefined, graph);\n }\n /**\n * Import the given stream of quads into the store.\n * @param stream A stream of RDF quads.\n */\n import(stream) {\n stream.on('data', (quad) => this.addQuad(quad));\n return stream;\n }\n /**\n * Returns a generator producing all quads matching the pattern.\n * @param subject The optional subject.\n * @param predicate The optional predicate.\n * @param object The optional object.\n * @param graph The optional graph.\n */\n *readQuads(subject, predicate, object, graph) {\n // Check if our dictionary and our indexes have quoted pattern support\n const indexesSupportQuotedPatterns = Boolean(this.dictionary.features.quotedTriples) &&\n Object.values(this.indexesWrapped).every(wrapped => wrapped.index.features.quotedTripleFiltering);\n // Construct a quad pattern array\n const [quadComponents, requireQuotedTripleFiltering] = (0, OrderUtils_1.quadToPattern)(subject, predicate, object, graph, indexesSupportQuotedPatterns);\n // Determine the best index for this pattern\n const indexWrapped = this.indexesWrapped[(0, OrderUtils_1.getBestIndex)(this.indexesWrappedComponentOrders, quadComponents)];\n // Re-order the quad pattern based on this best index's component order\n const quadComponentsOrdered = (0, OrderUtils_1.orderQuadComponents)(indexWrapped.componentOrder, quadComponents);\n // Call the best index's find method.\n // eslint-disable-next-line unicorn/no-array-callback-reference\n for (const decomposedQuad of indexWrapped.index.find(quadComponentsOrdered)) {\n // De-order the resulting quad components into the normal SPOG order for quad creation.\n const quad = this.dataFactory.quad(decomposedQuad[indexWrapped.componentOrderInverse.subject], decomposedQuad[indexWrapped.componentOrderInverse.predicate], decomposedQuad[indexWrapped.componentOrderInverse.object], decomposedQuad[indexWrapped.componentOrderInverse.graph]);\n if (requireQuotedTripleFiltering) {\n if ((0, rdf_terms_1.matchPattern)(quad, subject, predicate, object, graph)) {\n yield quad;\n }\n }\n else {\n yield quad;\n }\n }\n }\n /**\n * Returns an array containing all quads matching the pattern.\n * @param subject The optional subject.\n * @param predicate The optional predicate.\n * @param object The optional object.\n * @param graph The optional graph.\n */\n getQuads(subject, predicate, object, graph) {\n return [...this.readQuads(subject, predicate, object, graph)];\n }\n /**\n * Returns a stream that produces all quads matching the pattern.\n * @param subject The optional subject.\n * @param predicate The optional predicate.\n * @param object The optional object.\n * @param graph The optional graph.\n */\n match(subject, predicate, object, graph) {\n return (0, asynciterator_1.wrap)(this.readQuads(subject, predicate, object, graph));\n }\n /**\n * Returns the exact cardinality of the quads matching the pattern.\n * @param subject The optional subject.\n * @param predicate The optional predicate.\n * @param object The optional object.\n * @param graph The optional graph.\n */\n countQuads(subject, predicate, object, graph) {\n // Check if our dictionary and our indexes have quoted pattern support\n const indexesSupportQuotedPatterns = Boolean(this.dictionary.features.quotedTriples) &&\n Object.values(this.indexesWrapped).every(wrapped => wrapped.index.features.quotedTripleFiltering);\n // Construct a quad pattern array\n const [quadComponents] = (0, OrderUtils_1.quadToPattern)(subject, predicate, object, graph, indexesSupportQuotedPatterns);\n // Optimize all-variables pattern\n if (quadComponents.every(quadComponent => quadComponent === undefined)) {\n return this.size;\n }\n // Determine the best index for this pattern\n const indexWrapped = this.indexesWrapped[(0, OrderUtils_1.getBestIndex)(this.indexesWrappedComponentOrders, quadComponents)];\n // Re-order the quad pattern based on this best index's component order\n const quadComponentsOrdered = (0, OrderUtils_1.orderQuadComponents)(indexWrapped.componentOrder, quadComponents);\n // Call the best index's count method.\n return indexWrapped.index.count(quadComponentsOrdered);\n }\n /**\n * Wrap this store inside a DatasetCore interface.\n * Any mutations in either this store or the wrapper will propagate to each other.\n */\n asDataset() {\n return new DatasetCoreWrapper_1.DatasetCoreWrapper(this);\n }\n}\nRdfStore.DEFAULT_INDEX_COMBINATIONS = [\n ['graph', 'subject', 'predicate', 'object'],\n ['graph', 'predicate', 'object', 'subject'],\n ['graph', 'object', 'subject', 'predicate'],\n];\nexports.RdfStore = RdfStore;\n//# sourceMappingURL=RdfStore.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DatasetCoreWrapper = void 0;\nconst RdfStore_1 = require(\"../RdfStore\");\n/**\n * A DatasetCoreWrapper exposes an RdfStore inside an RDF.DatasetCore.\n */\nclass DatasetCoreWrapper {\n constructor(store) {\n this.store = store;\n }\n get size() {\n return this.store.size;\n }\n add(quad) {\n this.store.addQuad(quad);\n return this;\n }\n delete(quad) {\n this.store.removeQuad(quad);\n return this;\n }\n has(quad) {\n // eslint-disable-next-line no-unreachable-loop\n for (const result of this.store.readQuads(quad.subject, quad.predicate, quad.object, quad.graph)) {\n return true;\n }\n return false;\n }\n match(subject, predicate, object, graph) {\n const newStore = new RdfStore_1.RdfStore(this.store.options);\n for (const quad of this.store.readQuads(subject, predicate, object, graph)) {\n newStore.addQuad(quad);\n }\n return new DatasetCoreWrapper(newStore);\n }\n [Symbol.iterator]() {\n return this.store.readQuads();\n }\n}\nexports.DatasetCoreWrapper = DatasetCoreWrapper;\n//# sourceMappingURL=DatasetCoreWrapper.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=ITermDictionary.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionaryNumberMap = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_string_1 = require(\"rdf-string\");\n/**\n * A term dictionary that encodes to numbers, and stores the dictionary in memory in a Map.\n */\nclass TermDictionaryNumberMap {\n constructor(dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.lastId = 0;\n this.dictionary = new Map();\n this.reverseDictionary = new Map();\n this.features = { quotedTriples: false };\n this.dataFactory = dataFactory;\n }\n encode(term) {\n const key = (0, rdf_string_1.termToString)(term);\n let encoded = this.dictionary.get(key);\n if (encoded === undefined) {\n encoded = this.lastId++;\n this.dictionary.set(key, encoded);\n this.reverseDictionary.set(encoded, key);\n }\n return encoded;\n }\n encodeOptional(term) {\n const key = (0, rdf_string_1.termToString)(term);\n return this.dictionary.get(key);\n }\n decode(encoding) {\n const string = this.reverseDictionary.get(encoding);\n if (string === undefined) {\n throw new Error(`The value ${encoding} is not present in this dictionary`);\n }\n return (0, rdf_string_1.stringToTerm)(string, this.dataFactory);\n }\n encodings() {\n return this.reverseDictionary.keys();\n }\n findQuotedTriples(quotedTriplePattern) {\n throw new Error('findQuotedTriples is not supported');\n }\n findQuotedTriplesEncoded(quotedTriplePattern) {\n throw new Error('findQuotedTriplesEncoded is not supported');\n }\n}\nexports.TermDictionaryNumberMap = TermDictionaryNumberMap;\n//# sourceMappingURL=TermDictionaryNumberMap.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionaryNumberRecord = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_string_1 = require(\"rdf-string\");\n/**\n * A term dictionary that encodes to numbers, and stores the dictionary in memory in a Record.\n */\nclass TermDictionaryNumberRecord {\n constructor(dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.lastId = 0;\n this.dictionary = {};\n this.reverseDictionary = {};\n this.features = { quotedTriples: false };\n this.dataFactory = dataFactory;\n }\n encode(term) {\n const key = (0, rdf_string_1.termToString)(term);\n let encoded = this.dictionary[key];\n if (encoded === undefined) {\n encoded = this.lastId++;\n this.dictionary[key] = encoded;\n this.reverseDictionary[encoded] = key;\n }\n return encoded;\n }\n encodeOptional(term) {\n const key = (0, rdf_string_1.termToString)(term);\n return this.dictionary[key];\n }\n decode(encoding) {\n const string = this.reverseDictionary[encoding];\n if (string === undefined) {\n throw new Error(`The value ${encoding} is not present in this dictionary`);\n }\n return (0, rdf_string_1.stringToTerm)(string, this.dataFactory);\n }\n *encodings() {\n for (const key of Object.keys(this.reverseDictionary)) {\n yield Number.parseInt(key, 10);\n }\n }\n findQuotedTriples(quotedTriplePattern) {\n throw new Error('findQuotedTriples is not supported');\n }\n findQuotedTriplesEncoded(quotedTriplePattern) {\n throw new Error('findQuotedTriplesEncoded is not supported');\n }\n}\nexports.TermDictionaryNumberRecord = TermDictionaryNumberRecord;\n//# sourceMappingURL=TermDictionaryNumberRecord.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionaryNumberRecordFullTerms = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_string_1 = require(\"rdf-string\");\n/**\n * A term dictionary that encodes to numbers, and stores the dictionary in memory in a Record.\n * The reverse dictionary will store full RDF term objects,\n * resulting in slightly better query performance at the cost of slightly higher memory usage.\n */\nclass TermDictionaryNumberRecordFullTerms {\n constructor(dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.lastId = 0;\n this.dictionary = {};\n this.reverseDictionary = {};\n this.features = { quotedTriples: false };\n this.dataFactory = dataFactory;\n }\n encode(term) {\n const key = (0, rdf_string_1.termToString)(term);\n let encoded = this.dictionary[key];\n if (encoded === undefined) {\n encoded = this.lastId++;\n this.dictionary[key] = encoded;\n this.reverseDictionary[encoded] = term;\n }\n return encoded;\n }\n encodeOptional(term) {\n const key = (0, rdf_string_1.termToString)(term);\n return this.dictionary[key];\n }\n decode(encoding) {\n const string = this.reverseDictionary[encoding];\n if (string === undefined) {\n throw new Error(`The value ${encoding} is not present in this dictionary`);\n }\n return string;\n }\n *encodings() {\n for (const key of Object.keys(this.reverseDictionary)) {\n yield Number.parseInt(key, 10);\n }\n }\n findQuotedTriples(quotedTriplePattern) {\n throw new Error('findQuotedTriples is not supported');\n }\n findQuotedTriplesEncoded(quotedTriplePattern) {\n throw new Error('findQuotedTriplesEncoded is not supported');\n }\n}\nexports.TermDictionaryNumberRecordFullTerms = TermDictionaryNumberRecordFullTerms;\n//# sourceMappingURL=TermDictionaryNumberRecordFullTerms.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionaryQuoted = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_terms_1 = require(\"rdf-terms\");\n/**\n * A term dictionary for quoted triples.\n *\n * Plain terms and quoted triples are stored in separate dictionaries.\n *\n * Finding quoted triples is done by iterating over all quoted triples, and filtering by the matching ones.\n */\nclass TermDictionaryQuoted {\n constructor(plainTermDictionary, quotedTriplesDictionary, dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.features = { quotedTriples: true };\n this.plainTermDictionary = plainTermDictionary;\n this.quotedTriplesDictionary = quotedTriplesDictionary;\n this.dataFactory = dataFactory;\n }\n encode(term) {\n if (term.termType === 'Quad') {\n // Mask MSB to indicate that the encoding should refer to the quoted triples dictionary.\n return TermDictionaryQuoted.BITMASK | (1 + this.quotedTriplesDictionary.encode(term));\n }\n return this.plainTermDictionary.encode(term);\n }\n encodeOptional(term) {\n if (term.termType === 'Quad') {\n const encoding = this.quotedTriplesDictionary.encodeOptional(term);\n if (encoding === undefined) {\n return encoding;\n }\n // Mask MSB to indicate that the encoding should refer to the quoted triples dictionary.\n return TermDictionaryQuoted.BITMASK | (1 + encoding);\n }\n return this.plainTermDictionary.encodeOptional(term);\n }\n decode(encoding) {\n if (TermDictionaryQuoted.BITMASK & encoding) {\n // Term comes from the quoted triples dictionary\n const encodingBase = (~TermDictionaryQuoted.BITMASK & encoding) - 1;\n return this.quotedTriplesDictionary.decode(encodingBase);\n }\n // Term comes from the plain terms dictionary\n return this.plainTermDictionary.decode(encoding);\n }\n *encodings() {\n for (const encoding of this.plainTermDictionary.encodings()) {\n yield encoding;\n }\n for (const encoding of this.quotedTriplesDictionary.encodings()) {\n yield TermDictionaryQuoted.BITMASK | (1 + encoding);\n }\n }\n *findQuotedTriples(quotedTriplePattern) {\n for (const termEncoded of this.findQuotedTriplesEncoded(quotedTriplePattern)) {\n yield this.decode(termEncoded);\n }\n }\n *findQuotedTriplesEncoded(quotedTriplePattern) {\n for (let encodedQuotedTriple of this.quotedTriplesDictionary.encodings()) {\n encodedQuotedTriple = TermDictionaryQuoted.BITMASK | (1 + encodedQuotedTriple);\n const quotedTriple = this.decode(encodedQuotedTriple);\n if ((0, rdf_terms_1.matchPattern)(quotedTriple, quotedTriplePattern.subject, quotedTriplePattern.predicate, quotedTriplePattern.object, quotedTriplePattern.graph)) {\n yield encodedQuotedTriple;\n }\n }\n }\n}\nTermDictionaryQuoted.BITMASK = 1 << 31;\nexports.TermDictionaryQuoted = TermDictionaryQuoted;\n//# sourceMappingURL=TermDictionaryQuoted.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionaryQuotedIndexed = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst RdfStoreIndexNestedMap_1 = require(\"../index/RdfStoreIndexNestedMap\");\nconst OrderUtils_1 = require(\"../OrderUtils\");\n/**\n * A term dictionary for quoted triples.\n *\n * Plain terms are stored in a regular dictionary.\n * Quoted triples are stored separately using an index, which is backed the same dictionary.\n *\n * Finding quoted triples is done through indexed lookups.\n */\nclass TermDictionaryQuotedIndexed {\n constructor(rawTermDictionary, dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.quotedTriplesDictionary = [];\n this.features = { quotedTriples: true };\n this.plainTermDictionary = rawTermDictionary;\n const subIndexOpts = {\n // Not required\n indexCombinations: [],\n // Not required\n indexConstructor: undefined,\n dictionary: this,\n dataFactory,\n };\n this.quotedTriplesReverseDictionaries = [\n new RdfStoreIndexNestedMap_1.RdfStoreIndexNestedMap(subIndexOpts),\n new RdfStoreIndexNestedMap_1.RdfStoreIndexNestedMap(subIndexOpts),\n new RdfStoreIndexNestedMap_1.RdfStoreIndexNestedMap(subIndexOpts),\n ];\n this.dataFactory = dataFactory;\n }\n encode(term) {\n if (term.termType === 'Quad') {\n return this.encodeQuotedTriple(term, false);\n }\n return this.plainTermDictionary.encode(term);\n }\n encodeQuotedTriple(quad, optional) {\n // Only quoted triples are supported\n if (quad.graph.termType !== 'DefaultGraph') {\n throw new Error('Encoding of quoted quads outside of the default graph is not allowed');\n }\n // Check if the quad was already encoded\n const encodedTripleOptional = (0, OrderUtils_1.encodeOptionalTerms)([quad.subject, quad.predicate, quad.object, quad.graph], this);\n const id = encodedTripleOptional && encodedTripleOptional.every(encoded => encoded !== undefined) ?\n this.quotedTriplesReverseDictionaries[0].getEncoded(encodedTripleOptional) :\n undefined;\n // Return the encoding if we found one\n if (id !== undefined || optional) {\n // Mask MSB to indicate that the encoding should refer to the quoted triples dictionary.\n return (id === undefined ? undefined : TermDictionaryQuotedIndexed.BITMASK | id);\n }\n // If the quad was not encoded yet, add a new entry for it in the dictionary.\n const encodedTriple = [\n this.encode(quad.subject),\n this.encode(quad.predicate),\n this.encode(quad.object),\n ];\n const encodingBase = this.quotedTriplesDictionary.length + 1;\n this.quotedTriplesDictionary.push(encodedTriple);\n const encodedGraph = this.encode(this.dataFactory.defaultGraph());\n this.quotedTriplesReverseDictionaries[0].set([\n encodedTriple[0],\n encodedTriple[1],\n encodedTriple[2],\n encodedGraph,\n ], encodingBase);\n this.quotedTriplesReverseDictionaries[1].set([\n encodedTriple[1],\n encodedTriple[2],\n encodedTriple[0],\n encodedGraph,\n ], encodingBase);\n this.quotedTriplesReverseDictionaries[2].set([\n encodedTriple[2],\n encodedTriple[0],\n encodedTriple[1],\n encodedGraph,\n ], encodingBase);\n // Mask MSB to indicate that the encoding should refer to the quoted triples dictionary.\n return TermDictionaryQuotedIndexed.BITMASK | encodingBase;\n }\n encodeOptional(term) {\n if (term.termType === 'Quad') {\n return this.encodeQuotedTriple(term, true);\n }\n return this.plainTermDictionary.encodeOptional(term);\n }\n decode(encoding) {\n if (TermDictionaryQuotedIndexed.BITMASK & encoding) {\n // Term comes from the quoted triples dictionary\n const encodingBase = (~TermDictionaryQuotedIndexed.BITMASK & encoding) - 1;\n if (encodingBase >= this.quotedTriplesDictionary.length) {\n throw new Error(`The value ${encoding} is not present in the quoted triples range of the dictionary`);\n }\n const encodedTerms = this.quotedTriplesDictionary[encodingBase];\n return this.dataFactory.quad(this.decode(encodedTerms[0]), this.decode(encodedTerms[1]), this.decode(encodedTerms[2]));\n }\n // Term comes from the plain terms dictionary\n return this.plainTermDictionary.decode(encoding);\n }\n *encodings() {\n for (const encoding of this.plainTermDictionary.encodings()) {\n yield encoding;\n }\n for (const encoding of this.quotedTriplesDictionary.keys()) {\n yield TermDictionaryQuotedIndexed.BITMASK | (1 + encoding);\n }\n }\n *findQuotedTriples(quotedTriplePattern) {\n for (const termEncoded of this.findQuotedTriplesEncoded(quotedTriplePattern)) {\n yield this.decode(termEncoded);\n }\n }\n *findQuotedTriplesEncoded(quotedTriplePattern) {\n const [patternIn, requireQuotedTripleFiltering] = (0, OrderUtils_1.quadToPattern)(quotedTriplePattern.subject, quotedTriplePattern.predicate, quotedTriplePattern.object, quotedTriplePattern.graph, true);\n // Find all matching terms iteratively\n for (const termS of this.patternToIterable(patternIn[0])) {\n for (const termP of this.patternToIterable(patternIn[1])) {\n for (const termO of this.patternToIterable(patternIn[2])) {\n for (const termG of this.patternToIterable(patternIn[3])) {\n // Find all terms matching the pattern from the reverse indexes\n // We select the reverse index according to the current triple pattern\n if ((termS && termP) || (!termP && !termO)) {\n // SPO\n const pattern = [termS, termP, termO, termG];\n for (const termEncoded of this.quotedTriplesReverseDictionaries[0].findEncoded(pattern, patternIn)) {\n yield TermDictionaryQuotedIndexed.BITMASK |\n this.quotedTriplesReverseDictionaries[0].getEncoded(termEncoded);\n }\n }\n else if (!termS && termP) {\n // POS\n const pattern = [termP, termO, termS, termG];\n for (const termEncoded of this.quotedTriplesReverseDictionaries[1].findEncoded(pattern, patternIn)) {\n yield TermDictionaryQuotedIndexed.BITMASK |\n this.quotedTriplesReverseDictionaries[1].getEncoded(termEncoded);\n }\n }\n else {\n // OSP\n const pattern = [termO, termS, termP, termG];\n for (const termEncoded of this.quotedTriplesReverseDictionaries[2].findEncoded(pattern, patternIn)) {\n yield TermDictionaryQuotedIndexed.BITMASK |\n this.quotedTriplesReverseDictionaries[2].getEncoded(termEncoded);\n }\n }\n }\n }\n }\n }\n }\n /**\n * Helper function to convert a term to an iterator over encoded terms.\n * @param patternTerm A term.\n * @protected\n */\n *patternToIterable(patternTerm) {\n // If the term is another quoted quad, recursively find other quoted triples\n if ((patternTerm === null || patternTerm === void 0 ? void 0 : patternTerm.termType) === 'Quad') {\n yield* this.findQuotedTriplesEncoded(patternTerm);\n return;\n }\n // Undefined terms indicate a variable\n if (patternTerm === undefined) {\n // eslint-disable-next-line unicorn/no-useless-undefined\n yield undefined;\n return;\n }\n // Defined terms indicate a precise match\n const enc = this.encodeOptional(patternTerm);\n if (enc === undefined) {\n return;\n }\n yield enc;\n }\n}\nTermDictionaryQuotedIndexed.BITMASK = 1 << 31;\nexports.TermDictionaryQuotedIndexed = TermDictionaryQuotedIndexed;\n//# sourceMappingURL=TermDictionaryQuotedIndexed.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionaryQuotedReferential = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_terms_1 = require(\"rdf-terms\");\nconst OrderUtils_1 = require(\"../OrderUtils\");\n/**\n * A term dictionary for quoted triples.\n *\n * Plain terms and quoted triples are stored in separate dictionaries,\n * but quoted triples are encoded using encodings from the plain term dictionary.\n *\n * Finding quoted triples is done by iterating over all quoted triples, and filtering by the matching ones.\n */\nclass TermDictionaryQuotedReferential {\n constructor(plainTermDictionary, dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.quotedTriplesDictionary = [];\n this.quotedTriplesReverseDictionary = {};\n this.features = { quotedTriples: true };\n this.plainTermDictionary = plainTermDictionary;\n this.dataFactory = dataFactory;\n }\n encode(term) {\n if (term.termType === 'Quad') {\n return this.encodeQuotedTriple(term, false);\n }\n return this.plainTermDictionary.encode(term);\n }\n encodeQuotedTriple(quad, optional) {\n var _a;\n // Only quoted triples are supported\n if (quad.graph.termType !== 'DefaultGraph') {\n throw new Error('Encoding of quoted quads outside of the default graph is not allowed');\n }\n // Check if the quad was already encoded\n const encodedTripleOptional = (_a = (0, OrderUtils_1.encodeOptionalTerms)([quad.subject, quad.predicate, quad.object, undefined], this)) === null || _a === void 0 ? void 0 : _a.slice(0, 3);\n const id = encodedTripleOptional && encodedTripleOptional.every(encoded => encoded !== undefined) ?\n this.quotedTriplesReverseDictionary[encodedTripleOptional.join(TermDictionaryQuotedReferential.SEPARATOR)] :\n undefined;\n // Return the encoding if we found one\n if (id !== undefined || optional) {\n // Mask MSB to indicate that the encoding should refer to the quoted triples dictionary.\n return (id === undefined ? undefined : TermDictionaryQuotedReferential.BITMASK | id);\n }\n // If the quad was not encoded yet, add a new entry for it in the dictionary.\n const encodedTriple = [\n this.encode(quad.subject),\n this.encode(quad.predicate),\n this.encode(quad.object),\n ];\n const encodingBase = this.quotedTriplesDictionary.length + 1;\n this.quotedTriplesDictionary.push(encodedTriple);\n this.quotedTriplesReverseDictionary[encodedTriple.join(TermDictionaryQuotedReferential.SEPARATOR)] = encodingBase;\n // Mask MSB to indicate that the encoding should refer to the quoted triples dictionary.\n return TermDictionaryQuotedReferential.BITMASK | encodingBase;\n }\n encodeOptional(term) {\n if (term.termType === 'Quad') {\n return this.encodeQuotedTriple(term, true);\n }\n return this.plainTermDictionary.encodeOptional(term);\n }\n decode(encoding) {\n if (TermDictionaryQuotedReferential.BITMASK & encoding) {\n // Term comes from the quoted triples dictionary\n const encodingBase = (~TermDictionaryQuotedReferential.BITMASK & encoding) - 1;\n if (encodingBase >= this.quotedTriplesDictionary.length) {\n throw new Error(`The value ${encoding} is not present in the quoted triples range of the dictionary`);\n }\n const encodedTerms = this.quotedTriplesDictionary[encodingBase];\n return this.dataFactory.quad(this.decode(encodedTerms[0]), this.decode(encodedTerms[1]), this.decode(encodedTerms[2]));\n }\n // Term comes from the plain terms dictionary\n return this.plainTermDictionary.decode(encoding);\n }\n *encodings() {\n for (const encoding of this.plainTermDictionary.encodings()) {\n yield encoding;\n }\n for (const encoding of this.quotedTriplesDictionary.keys()) {\n yield TermDictionaryQuotedReferential.BITMASK | (1 + encoding);\n }\n }\n *findQuotedTriples(quotedTriplePattern) {\n for (const termEncoded of this.findQuotedTriplesEncoded(quotedTriplePattern)) {\n yield this.decode(termEncoded);\n }\n }\n *findQuotedTriplesEncoded(quotedTriplePattern) {\n for (let encodedQuotedTriple of this.quotedTriplesDictionary.keys()) {\n encodedQuotedTriple = TermDictionaryQuotedReferential.BITMASK | (1 + encodedQuotedTriple);\n const quotedTriple = this.decode(encodedQuotedTriple);\n if ((0, rdf_terms_1.matchPattern)(quotedTriple, quotedTriplePattern.subject, quotedTriplePattern.predicate, quotedTriplePattern.object, quotedTriplePattern.graph)) {\n yield encodedQuotedTriple;\n }\n }\n }\n}\nTermDictionaryQuotedReferential.BITMASK = 1 << 31;\nTermDictionaryQuotedReferential.SEPARATOR = '_';\nexports.TermDictionaryQuotedReferential = TermDictionaryQuotedReferential;\n//# sourceMappingURL=TermDictionaryQuotedReferential.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TermDictionarySymbol = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst rdf_string_1 = require(\"rdf-string\");\n/**\n * A term dictionary that encodes and decodes using symbols.\n */\nclass TermDictionarySymbol {\n constructor(dataFactory = new rdf_data_factory_1.DataFactory()) {\n this.features = { quotedTriples: false };\n this.dataFactory = dataFactory;\n }\n encode(term) {\n return Symbol.for(`rdf::${(0, rdf_string_1.termToString)(term)}`);\n }\n encodeOptional(term) {\n return this.encode(term);\n }\n decode(encoding) {\n const string = Symbol.keyFor(encoding);\n if (string === undefined) {\n throw new Error(`The value ${String(encoding)} is not present in this dictionary`);\n }\n return (0, rdf_string_1.stringToTerm)(string.slice(5), this.dataFactory);\n }\n encodings() {\n throw new Error('encodings is not supported');\n }\n findQuotedTriples(quotedTriplePattern) {\n throw new Error('findQuotedTriples is not supported');\n }\n findQuotedTriplesEncoded(quotedTriplePattern) {\n throw new Error('findQuotedTriplesEncoded is not supported');\n }\n}\nexports.TermDictionarySymbol = TermDictionarySymbol;\n//# sourceMappingURL=TermDictionarySymbol.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IRdfStoreIndex.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStoreIndexNestedMap = void 0;\nconst OrderUtils_1 = require(\"../OrderUtils\");\n/**\n * An RDF store index that is implemented using nested Maps.\n */\nclass RdfStoreIndexNestedMap {\n constructor(options) {\n this.features = {\n quotedTripleFiltering: false,\n };\n this.dictionary = options.dictionary;\n this.nestedMap = new Map();\n }\n set(terms, value) {\n const map0 = this.nestedMap;\n let map1 = map0.get(terms[0]);\n if (!map1) {\n map1 = new Map();\n map0.set(terms[0], map1);\n }\n let map2 = map1.get(terms[1]);\n if (!map2) {\n map2 = new Map();\n map1.set(terms[1], map2);\n }\n let map3 = map2.get(terms[2]);\n if (!map3) {\n map3 = new Map();\n map2.set(terms[2], map3);\n }\n const contained = map3.has(terms[3]);\n if (!contained) {\n map3.set(terms[3], value);\n }\n return !contained;\n }\n remove(terms) {\n const map0 = this.nestedMap;\n const map1 = map0.get(terms[0]);\n if (!map1) {\n return false;\n }\n const map2 = map1.get(terms[1]);\n if (!map2) {\n return false;\n }\n const map3 = map2.get(terms[2]);\n if (!map3) {\n return false;\n }\n const ret = map3.delete(terms[3]);\n // Clean up intermediate maps\n if (ret && map3.size === 0) {\n map2.delete(terms[2]);\n if (map2.size === 0) {\n map1.delete(terms[1]);\n if (map1.size === 0) {\n map0.delete(terms[0]);\n }\n }\n }\n return ret;\n }\n get(key) {\n const encoded = (0, OrderUtils_1.encodeOptionalTerms)(key, this.dictionary);\n // eslint-disable-next-line unicorn/no-useless-undefined\n if (!encoded || encoded.includes(undefined)) {\n return undefined;\n }\n return this.getEncoded(encoded);\n }\n getEncoded(ids) {\n const map1 = this.nestedMap.get(ids[0]);\n if (!map1) {\n return undefined;\n }\n const map2 = map1.get(ids[1]);\n if (!map2) {\n return undefined;\n }\n const map3 = map2.get(ids[2]);\n if (!map3) {\n return undefined;\n }\n return map3.get(ids[3]);\n }\n *find(terms) {\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return;\n }\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n let partialQuad0;\n let partialQuad1;\n let partialQuad2;\n let partialQuad3;\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedMap;\n const map0Keys = id0 !== undefined ? (map0.has(id0) ? [id0] : []) : map0.keys();\n for (const key1 of map0Keys) {\n map1 = map0.get(key1);\n partialQuad0 = term0 || this.dictionary.decode(key1);\n const map1Keys = id1 !== undefined ? (map1.has(id1) ? [id1] : []) : map1.keys();\n for (const key2 of map1Keys) {\n map2 = map1.get(key2);\n partialQuad1 = term1 || this.dictionary.decode(key2);\n const map2Keys = id2 !== undefined ? (map2.has(id2) ? [id2] : []) : map2.keys();\n for (const key3 of map2Keys) {\n map3 = map2.get(key3);\n partialQuad2 = term2 || this.dictionary.decode(key3);\n const map3Keys = id3 !== undefined ? (map3.has(id3) ? [id3] : []) : map3.keys();\n for (const key4 of map3Keys) {\n partialQuad3 = term3 || this.dictionary.decode(key4);\n yield [partialQuad0, partialQuad1, partialQuad2, partialQuad3];\n }\n }\n }\n }\n }\n // The code below is nearly identical. We duplicate because abstraction would result in a significant performance hit.\n *findEncoded(ids, terms) {\n const [id0, id1, id2, id3] = ids;\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedMap;\n const map0Keys = id0 !== undefined ? (map0.has(id0) ? [id0] : []) : map0.keys();\n for (const key1 of map0Keys) {\n map1 = map0.get(key1);\n const map1Keys = id1 !== undefined ? (map1.has(id1) ? [id1] : []) : map1.keys();\n for (const key2 of map1Keys) {\n map2 = map1.get(key2);\n const map2Keys = id2 !== undefined ? (map2.has(id2) ? [id2] : []) : map2.keys();\n for (const key3 of map2Keys) {\n map3 = map2.get(key3);\n const map3Keys = id3 !== undefined ? (map3.has(id3) ? [id3] : []) : map3.keys();\n for (const key4 of map3Keys) {\n yield [key1, key2, key3, key4];\n }\n }\n }\n }\n }\n count(terms) {\n let count = 0;\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return 0;\n }\n const id0 = ids[0];\n const id1 = ids[1];\n const id2 = ids[2];\n const id3 = ids[3];\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedMap;\n const map0Keys = id0 !== undefined ? (map0.has(id0) ? [id0] : []) : map0.keys();\n for (const key1 of map0Keys) {\n map1 = map0.get(key1);\n const map1Keys = id1 !== undefined ? (map1.has(id1) ? [id1] : []) : map1.keys();\n for (const key2 of map1Keys) {\n map2 = map1.get(key2);\n const map2Keys = id2 !== undefined ? (map2.has(id2) ? [id2] : []) : map2.keys();\n for (const key3 of map2Keys) {\n map3 = map2.get(key3);\n if (id3 !== undefined) {\n if (map3.has(id3)) {\n count++;\n }\n }\n else {\n count += map3.size;\n }\n }\n }\n }\n return count;\n }\n}\nexports.RdfStoreIndexNestedMap = RdfStoreIndexNestedMap;\n//# sourceMappingURL=RdfStoreIndexNestedMap.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStoreIndexNestedMapQuoted = void 0;\nconst OrderUtils_1 = require(\"../OrderUtils\");\nconst RdfStoreIndexNestedMap_1 = require(\"./RdfStoreIndexNestedMap\");\n/**\n * An RDF store index that is implemented using nested Maps with optimized quoted triple support.\n */\nclass RdfStoreIndexNestedMapQuoted extends RdfStoreIndexNestedMap_1.RdfStoreIndexNestedMap {\n constructor(options) {\n super(options);\n this.features = {\n quotedTripleFiltering: true,\n };\n }\n *getQuotedPatternKeys(map, term) {\n for (const quotedTripleEncoded of this.dictionary.findQuotedTriplesEncoded(term)) {\n if (map.has(quotedTripleEncoded)) {\n yield quotedTripleEncoded;\n }\n }\n }\n *find(terms) {\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return;\n }\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n const [quotedTerm0, quotedTerm1, quotedTerm2, quotedTerm3] = (0, OrderUtils_1.arePatternsQuoted)(terms);\n let partialQuad0;\n let partialQuad1;\n let partialQuad2;\n let partialQuad3;\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedMap;\n const map0Keys = (term0 !== undefined ?\n (quotedTerm0 ? this.getQuotedPatternKeys(map0, term0) : (map0.has(id0) ? [id0] : [])) :\n map0.keys());\n for (const key1 of map0Keys) {\n map1 = map0.get(key1);\n partialQuad0 = !quotedTerm0 && term0 ? term0 : this.dictionary.decode(key1);\n const map1Keys = (term1 !== undefined ?\n (quotedTerm1 ? this.getQuotedPatternKeys(map1, term1) : (map1.has(id1) ? [id1] : [])) :\n map1.keys());\n for (const key2 of map1Keys) {\n map2 = map1.get(key2);\n partialQuad1 = !quotedTerm1 && term1 ? term1 : this.dictionary.decode(key2);\n const map2Keys = (term2 !== undefined ?\n (quotedTerm2 ? this.getQuotedPatternKeys(map2, term2) : (map2.has(id2) ? [id2] : [])) :\n map2.keys());\n for (const key3 of map2Keys) {\n map3 = map2.get(key3);\n partialQuad2 = !quotedTerm2 && term2 ? term2 : this.dictionary.decode(key3);\n const map3Keys = (term3 !== undefined ?\n (quotedTerm3 ? this.getQuotedPatternKeys(map3, term3) : (map3.has(id3) ? [id3] : [])) :\n map3.keys());\n for (const key4 of map3Keys) {\n partialQuad3 = !quotedTerm3 && term3 ? term3 : this.dictionary.decode(key4);\n yield [partialQuad0, partialQuad1, partialQuad2, partialQuad3];\n }\n }\n }\n }\n }\n // The code below is nearly identical. We duplicate because abstraction would result in a significant performance hit.\n *findEncoded(ids, terms) {\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n const [quotedTerm0, quotedTerm1, quotedTerm2, quotedTerm3] = (0, OrderUtils_1.arePatternsQuoted)(terms);\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedMap;\n const map0Keys = (term0 !== undefined ?\n (quotedTerm0 ? this.getQuotedPatternKeys(map0, term0) : (map0.has(id0) ? [id0] : [])) :\n map0.keys());\n for (const key1 of map0Keys) {\n map1 = map0.get(key1);\n const map1Keys = (term1 !== undefined ?\n (quotedTerm1 ? this.getQuotedPatternKeys(map1, term1) : (map1.has(id1) ? [id1] : [])) :\n map1.keys());\n for (const key2 of map1Keys) {\n map2 = map1.get(key2);\n const map2Keys = (term2 !== undefined ?\n (quotedTerm2 ? this.getQuotedPatternKeys(map2, term2) : (map2.has(id2) ? [id2] : [])) :\n map2.keys());\n for (const key3 of map2Keys) {\n map3 = map2.get(key3);\n const map3Keys = (term3 !== undefined ?\n (quotedTerm3 ? this.getQuotedPatternKeys(map3, term3) : (map3.has(id3) ? [id3] : [])) :\n map3.keys());\n for (const key4 of map3Keys) {\n yield [\n Number.parseInt(key1, 10),\n Number.parseInt(key2, 10),\n Number.parseInt(key3, 10),\n Number.parseInt(key4, 10),\n ];\n }\n }\n }\n }\n }\n count(terms) {\n let count = 0;\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return 0;\n }\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n const [quotedTerm0, quotedTerm1, quotedTerm2, quotedTerm3] = (0, OrderUtils_1.arePatternsQuoted)(terms);\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedMap;\n const map0Keys = (term0 !== undefined ?\n (quotedTerm0 ? this.getQuotedPatternKeys(map0, term0) : (map0.has(id0) ? [id0] : [])) :\n map0.keys());\n for (const key1 of map0Keys) {\n map1 = map0.get(key1);\n const map1Keys = (term1 !== undefined ?\n (quotedTerm1 ? this.getQuotedPatternKeys(map1, term1) : (map1.has(id1) ? [id1] : [])) :\n map1.keys());\n for (const key2 of map1Keys) {\n map2 = map1.get(key2);\n const map2Keys = (term2 !== undefined ?\n (quotedTerm2 ? this.getQuotedPatternKeys(map2, term2) : (map2.has(id2) ? [id2] : [])) :\n map2.keys());\n for (const key3 of map2Keys) {\n map3 = map2.get(key3);\n if (term3 !== undefined) {\n if (quotedTerm3) {\n count += [...this.getQuotedPatternKeys(map3, term3)].length;\n }\n else if (map3.has(id3)) {\n count++;\n }\n }\n else {\n count += map3.size;\n }\n }\n }\n }\n return count;\n }\n}\nexports.RdfStoreIndexNestedMapQuoted = RdfStoreIndexNestedMapQuoted;\n//# sourceMappingURL=RdfStoreIndexNestedMapQuoted.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStoreIndexNestedMapRecursive = void 0;\nconst OrderUtils_1 = require(\"../OrderUtils\");\n/**\n * An RDF store index that is implemented using nested Maps,\n * and finds quads components via recursive methods calls.\n */\nclass RdfStoreIndexNestedMapRecursive {\n constructor(options) {\n this.features = {\n quotedTripleFiltering: false,\n };\n this.dictionary = options.dictionary;\n this.nestedMap = new Map();\n }\n set(terms, value) {\n let map = this.nestedMap;\n let contained = false;\n for (const [i, term] of terms.entries()) {\n const mapActual = map;\n let nextMap = mapActual.get(term);\n if (!nextMap) {\n nextMap = i === terms.length - 1 ? value : new Map();\n mapActual.set(term, nextMap);\n }\n else if (i === terms.length - 1) {\n contained = true;\n }\n map = nextMap;\n }\n return !contained;\n }\n remove(terms) {\n const map0 = this.nestedMap;\n const map1 = map0.get(terms[0]);\n if (!map1) {\n return false;\n }\n const map2 = map1.get(terms[1]);\n if (!map2) {\n return false;\n }\n const map3 = map2.get(terms[2]);\n if (!map3) {\n return false;\n }\n const ret = map3.delete(terms[3]);\n // Clean up intermediate maps\n if (ret && map3.size === 0) {\n map2.delete(terms[2]);\n if (map2.size === 0) {\n map1.delete(terms[1]);\n if (map1.size === 0) {\n map0.delete(terms[0]);\n }\n }\n }\n return ret;\n }\n get(key) {\n const encoded = (0, OrderUtils_1.encodeOptionalTerms)(key, this.dictionary);\n // eslint-disable-next-line unicorn/no-useless-undefined\n if (!encoded || encoded.includes(undefined)) {\n return undefined;\n }\n return this.getEncoded(encoded);\n }\n getEncoded(ids) {\n const map1 = this.nestedMap.get(ids[0]);\n if (!map1) {\n return undefined;\n }\n const map2 = map1.get(ids[1]);\n if (!map2) {\n return undefined;\n }\n const map3 = map2.get(ids[2]);\n if (!map3) {\n return undefined;\n }\n return map3.get(ids[3]);\n }\n *find(terms) {\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return;\n }\n for (const termsEncoded of this.findEncoded(ids, terms)) {\n yield [\n ids[0] !== undefined ? terms[0] : this.dictionary.decode(termsEncoded[0]),\n ids[1] !== undefined ? terms[1] : this.dictionary.decode(termsEncoded[1]),\n ids[2] !== undefined ? terms[2] : this.dictionary.decode(termsEncoded[2]),\n ids[3] !== undefined ? terms[3] : this.dictionary.decode(termsEncoded[3]),\n ];\n }\n }\n *findEncoded(ids, terms) {\n return yield* this\n .findEncodedInner(0, ids, terms, this.nestedMap, []);\n }\n *findEncodedInner(index, ids, terms, map, partialQuad) {\n if (index === ids.length) {\n yield [...partialQuad];\n }\n else {\n const id = ids[index];\n const currentTerm = terms[index];\n // If current term is undefined, iterate over all terms at this level.\n if (!currentTerm) {\n for (const [key, subMap] of map.entries()) {\n partialQuad[index] = key;\n yield* this\n .findEncodedInner(index + 1, ids, terms, subMap, partialQuad);\n }\n }\n else {\n // If the current term is defined, find one matching map for the current term.\n const encodedTerm = id;\n if (encodedTerm !== undefined) {\n const subMap = map.get(encodedTerm);\n if (subMap) {\n partialQuad[index] = id;\n yield* this\n .findEncodedInner(index + 1, ids, terms, subMap, partialQuad);\n }\n }\n }\n }\n }\n count(terms) {\n return this.countInner(0, terms, this.nestedMap);\n }\n countInner(index, terms, map) {\n const currentTerm = terms[index];\n let count = 0;\n // If current term is undefined, iterate over all terms at this level.\n if (!currentTerm) {\n if (index === terms.length - 1) {\n return map.size;\n }\n for (const subMap of map.values()) {\n count += this.countInner(index + 1, terms, subMap);\n }\n }\n else {\n // If the current term is defined, find one matching map for the current term.\n const encodedTerm = this.dictionary.encodeOptional(currentTerm);\n if (encodedTerm !== undefined) {\n if (index === terms.length - 1) {\n if (map.has(encodedTerm)) {\n return 1;\n }\n return 0;\n }\n const subMap = map.get(encodedTerm);\n if (subMap) {\n count += this.countInner(index + 1, terms, subMap);\n }\n }\n }\n return count;\n }\n}\nexports.RdfStoreIndexNestedMapRecursive = RdfStoreIndexNestedMapRecursive;\n//# sourceMappingURL=RdfStoreIndexNestedMapRecursive.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStoreIndexNestedMapRecursiveQuoted = void 0;\nconst OrderUtils_1 = require(\"../OrderUtils\");\nconst RdfStoreIndexNestedMapRecursive_1 = require(\"./RdfStoreIndexNestedMapRecursive\");\n/**\n * An RDF store index that is implemented using nested Maps,\n * and finds quads components via recursive methods calls\n * with optimized quoted triple support.\n */\nclass RdfStoreIndexNestedMapRecursiveQuoted extends RdfStoreIndexNestedMapRecursive_1.RdfStoreIndexNestedMapRecursive {\n constructor(options) {\n super(options);\n this.features = {\n quotedTripleFiltering: true,\n };\n }\n *findEncoded(ids, terms) {\n return yield* this\n .findEncodedInnerQuoted(0, ids, terms, (0, OrderUtils_1.arePatternsQuoted)(terms), this.nestedMap, []);\n }\n *findEncodedInnerQuoted(index, ids, terms, isQuotedPattern, map, partialQuad) {\n if (index === ids.length) {\n yield [...partialQuad];\n }\n else {\n const id = ids[index];\n const currentTerm = terms[index];\n // If current term is undefined, iterate over all terms at this level.\n if (!currentTerm) {\n for (const [key, subMap] of map.entries()) {\n partialQuad[index] = key;\n yield* this\n .findEncodedInnerQuoted(index + 1, ids, terms, isQuotedPattern, subMap, partialQuad);\n }\n }\n else if (isQuotedPattern[index]) {\n const quotedTriplesEncoded = this\n .dictionary.findQuotedTriplesEncoded(currentTerm);\n // Below, we perform a type of inner (hash) join between quotedTriplesEncoded and map (with hash on map)\n for (const quotedTripleEncoded of quotedTriplesEncoded) {\n const subMap = map.get(quotedTripleEncoded);\n if (subMap) {\n partialQuad[index] = quotedTripleEncoded;\n yield* this.findEncodedInnerQuoted(index + 1, ids, terms, isQuotedPattern, subMap, partialQuad);\n }\n }\n }\n else {\n // If the current term is defined, find one matching map for the current term.\n const encodedTerm = id;\n if (encodedTerm !== undefined) {\n const subMap = map.get(encodedTerm);\n if (subMap) {\n partialQuad[index] = id;\n yield* this.findEncodedInnerQuoted(index + 1, ids, terms, isQuotedPattern, subMap, partialQuad);\n }\n }\n }\n }\n }\n countInner(index, terms, map) {\n const currentTerm = terms[index];\n let count = 0;\n // If current term is undefined, iterate over all terms at this level.\n if (!currentTerm) {\n if (index === terms.length - 1) {\n return map.size;\n }\n for (const subMap of map.values()) {\n count += this.countInner(index + 1, terms, subMap);\n }\n }\n else if (currentTerm.termType === 'Quad' && (0, OrderUtils_1.quadHasVariables)(currentTerm)) {\n const quotedTriplesEncoded = this.dictionary.findQuotedTriplesEncoded(currentTerm);\n // Below, we perform a type of inner (hash) join between quotedTriplesEncoded and map (with hash on map)\n for (const quotedTripleEncoded of quotedTriplesEncoded) {\n if (index === terms.length - 1) {\n if (map.has(quotedTripleEncoded)) {\n count++;\n }\n }\n else {\n const subMap = map.get(quotedTripleEncoded);\n if (subMap) {\n count += this.countInner(index + 1, terms, subMap);\n }\n }\n }\n }\n else {\n // If the current term is defined, find one matching map for the current term.\n const encodedTerm = this.dictionary.encodeOptional(currentTerm);\n if (encodedTerm !== undefined) {\n if (index === terms.length - 1) {\n if (map.has(encodedTerm)) {\n return 1;\n }\n return 0;\n }\n const subMap = map.get(encodedTerm);\n if (subMap) {\n count += this.countInner(index + 1, terms, subMap);\n }\n }\n }\n return count;\n }\n}\nexports.RdfStoreIndexNestedMapRecursiveQuoted = RdfStoreIndexNestedMapRecursiveQuoted;\n//# sourceMappingURL=RdfStoreIndexNestedMapRecursiveQuoted.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStoreIndexNestedRecord = void 0;\nconst OrderUtils_1 = require(\"../OrderUtils\");\n/**\n * An RDF store index that is implemented using nested records.\n */\nclass RdfStoreIndexNestedRecord {\n constructor(options) {\n this.features = {\n quotedTripleFiltering: false,\n };\n this.dictionary = options.dictionary;\n this.nestedRecords = {};\n }\n set(terms, value) {\n const map0 = this.nestedRecords;\n const map1 = map0[terms[0]] || (map0[terms[0]] = {});\n const map2 = map1[terms[1]] || (map1[terms[1]] = {});\n const map3 = map2[terms[2]] || (map2[terms[2]] = {});\n if (map3[terms[3]]) {\n return false;\n }\n map3[terms[3]] = value;\n return true;\n }\n remove(terms) {\n const map0 = this.nestedRecords;\n const map1 = map0[terms[0]];\n if (!map1) {\n return false;\n }\n const map2 = map1[terms[1]];\n if (!map2) {\n return false;\n }\n const map3 = map2[terms[2]];\n if (!map3) {\n return false;\n }\n if (!map3[terms[3]]) {\n return false;\n }\n delete map3[terms[3]];\n // Clean up intermediate maps\n if (Object.keys(map3).length === 0) {\n delete map2[terms[2]];\n if (Object.keys(map2).length === 0) {\n delete map1[terms[1]];\n if (Object.keys(map1).length === 0) {\n delete map0[terms[0]];\n }\n }\n }\n return true;\n }\n get(key) {\n const encoded = (0, OrderUtils_1.encodeOptionalTerms)(key, this.dictionary);\n // eslint-disable-next-line unicorn/no-useless-undefined\n if (!encoded || encoded.includes(undefined)) {\n return undefined;\n }\n return this.getEncoded(encoded);\n }\n getEncoded(ids) {\n var _a, _b, _c;\n return (_c = (_b = (_a = this.nestedRecords[ids[0]]) === null || _a === void 0 ? void 0 : _a[ids[1]]) === null || _b === void 0 ? void 0 : _b[ids[2]]) === null || _c === void 0 ? void 0 : _c[ids[3]];\n }\n *find(terms) {\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return;\n }\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n let partialQuad0;\n let partialQuad1;\n let partialQuad2;\n let partialQuad3;\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedRecords;\n const map0Keys = id0 !== undefined ? (id0 in map0 ? [id0] : []) : Object.keys(map0);\n for (const key1 of map0Keys) {\n map1 = map0[key1];\n partialQuad0 = term0 || this.dictionary.decode(Number.parseInt(key1, 10));\n const map1Keys = id1 !== undefined ? (id1 in map1 ? [id1] : []) : Object.keys(map1);\n for (const key2 of map1Keys) {\n map2 = map1[key2];\n partialQuad1 = term1 || this.dictionary.decode(Number.parseInt(key2, 10));\n const map2Keys = id2 !== undefined ? (id2 in map2 ? [id2] : []) : Object.keys(map2);\n for (const key3 of map2Keys) {\n map3 = map2[key3];\n partialQuad2 = term2 || this.dictionary.decode(Number.parseInt(key3, 10));\n const map3Keys = id3 !== undefined ? (id3 in map3 ? [id3] : []) : Object.keys(map3);\n for (const key4 of map3Keys) {\n partialQuad3 = term3 || this.dictionary.decode(Number.parseInt(key4, 10));\n yield [partialQuad0, partialQuad1, partialQuad2, partialQuad3];\n }\n }\n }\n }\n }\n // The code below is nearly identical. We duplicate because abstraction would result in a significant performance hit.\n *findEncoded(ids, terms) {\n const [id0, id1, id2, id3] = ids;\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedRecords;\n const map0Keys = id0 !== undefined ? (id0 in map0 ? [id0] : []) : Object.keys(map0);\n for (const key1 of map0Keys) {\n map1 = map0[key1];\n const map1Keys = id1 !== undefined ? (id1 in map1 ? [id1] : []) : Object.keys(map1);\n for (const key2 of map1Keys) {\n map2 = map1[key2];\n const map2Keys = id2 !== undefined ? (id2 in map2 ? [id2] : []) : Object.keys(map2);\n for (const key3 of map2Keys) {\n map3 = map2[key3];\n const map3Keys = id3 !== undefined ? (id3 in map3 ? [id3] : []) : Object.keys(map3);\n for (const key4 of map3Keys) {\n yield [\n Number.parseInt(key1, 10),\n Number.parseInt(key2, 10),\n Number.parseInt(key3, 10),\n Number.parseInt(key4, 10),\n ];\n }\n }\n }\n }\n }\n count(terms) {\n let count = 0;\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return 0;\n }\n const id0 = ids[0];\n const id1 = ids[1];\n const id2 = ids[2];\n const id3 = ids[3];\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedRecords;\n const map0Keys = id0 !== undefined ? (id0 in map0 ? [id0] : []) : Object.keys(map0);\n for (const key1 of map0Keys) {\n map1 = map0[key1];\n const map1Keys = id1 !== undefined ? (id1 in map1 ? [id1] : []) : Object.keys(map1);\n for (const key2 of map1Keys) {\n map2 = map1[key2];\n const map2Keys = id2 !== undefined ? (id2 in map2 ? [id2] : []) : Object.keys(map2);\n for (const key3 of map2Keys) {\n map3 = map2[key3];\n if (id3 !== undefined) {\n if (id3 in map3) {\n count++;\n }\n }\n else {\n count += Object.keys(map3).length;\n }\n }\n }\n }\n return count;\n }\n}\nexports.RdfStoreIndexNestedRecord = RdfStoreIndexNestedRecord;\n//# sourceMappingURL=RdfStoreIndexNestedRecord.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfStoreIndexNestedRecordQuoted = void 0;\nconst OrderUtils_1 = require(\"../OrderUtils\");\nconst RdfStoreIndexNestedRecord_1 = require(\"./RdfStoreIndexNestedRecord\");\n/**\n * An RDF store index that is implemented using nested records with optimized quoted triple support.\n */\nclass RdfStoreIndexNestedRecordQuoted extends RdfStoreIndexNestedRecord_1.RdfStoreIndexNestedRecord {\n constructor(options) {\n super(options);\n this.features = {\n quotedTripleFiltering: true,\n };\n }\n *getQuotedPatternKeys(map, term) {\n for (const quotedTripleEncoded of this.dictionary.findQuotedTriplesEncoded(term)) {\n if (quotedTripleEncoded in map) {\n yield quotedTripleEncoded;\n }\n }\n }\n *find(terms) {\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return;\n }\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n const [quotedTerm0, quotedTerm1, quotedTerm2, quotedTerm3] = (0, OrderUtils_1.arePatternsQuoted)(terms);\n let partialQuad0;\n let partialQuad1;\n let partialQuad2;\n let partialQuad3;\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedRecords;\n const map0Keys = (term0 !== undefined ?\n (quotedTerm0 ? this.getQuotedPatternKeys(map0, term0) : (id0 in map0 ? [id0] : [])) :\n Object.keys(map0));\n for (const key1 of map0Keys) {\n map1 = map0[key1];\n partialQuad0 = !quotedTerm0 && term0 ? term0 : this.dictionary.decode(Number.parseInt(key1, 10));\n const map1Keys = (term1 !== undefined ?\n (quotedTerm1 ? this.getQuotedPatternKeys(map1, term1) : (id1 in map1 ? [id1] : [])) :\n Object.keys(map1));\n for (const key2 of map1Keys) {\n map2 = map1[key2];\n partialQuad1 = !quotedTerm1 && term1 ? term1 : this.dictionary.decode(Number.parseInt(key2, 10));\n const map2Keys = (term2 !== undefined ?\n (quotedTerm2 ? this.getQuotedPatternKeys(map2, term2) : (id2 in map2 ? [id2] : [])) :\n Object.keys(map2));\n for (const key3 of map2Keys) {\n map3 = map2[key3];\n partialQuad2 = !quotedTerm2 && term2 ? term2 : this.dictionary.decode(Number.parseInt(key3, 10));\n const map3Keys = (term3 !== undefined ?\n (quotedTerm3 ? this.getQuotedPatternKeys(map3, term3) : (id3 in map3 ? [id3] : [])) :\n Object.keys(map3));\n for (const key4 of map3Keys) {\n partialQuad3 = !quotedTerm3 && term3 ? term3 : this.dictionary.decode(Number.parseInt(key4, 10));\n yield [partialQuad0, partialQuad1, partialQuad2, partialQuad3];\n }\n }\n }\n }\n }\n // The code below is nearly identical. We duplicate because abstraction would result in a significant performance hit.\n *findEncoded(ids, terms) {\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n const [quotedTerm0, quotedTerm1, quotedTerm2, quotedTerm3] = (0, OrderUtils_1.arePatternsQuoted)(terms);\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedRecords;\n const map0Keys = (term0 !== undefined ?\n (quotedTerm0 ? this.getQuotedPatternKeys(map0, term0) : (id0 in map0 ? [id0] : [])) :\n Object.keys(map0));\n for (const key1 of map0Keys) {\n map1 = map0[key1];\n const map1Keys = (term1 !== undefined ?\n (quotedTerm1 ? this.getQuotedPatternKeys(map1, term1) : (id1 in map1 ? [id1] : [])) :\n Object.keys(map1));\n for (const key2 of map1Keys) {\n map2 = map1[key2];\n const map2Keys = (term2 !== undefined ?\n (quotedTerm2 ? this.getQuotedPatternKeys(map2, term2) : (id2 in map2 ? [id2] : [])) :\n Object.keys(map2));\n for (const key3 of map2Keys) {\n map3 = map2[key3];\n const map3Keys = (term3 !== undefined ?\n (quotedTerm3 ? this.getQuotedPatternKeys(map3, term3) : (id3 in map3 ? [id3] : [])) :\n Object.keys(map3));\n for (const key4 of map3Keys) {\n yield [\n Number.parseInt(key1, 10),\n Number.parseInt(key2, 10),\n Number.parseInt(key3, 10),\n Number.parseInt(key4, 10),\n ];\n }\n }\n }\n }\n }\n count(terms) {\n let count = 0;\n const ids = (0, OrderUtils_1.encodeOptionalTerms)(terms, this.dictionary);\n if (!ids) {\n return 0;\n }\n const [id0, id1, id2, id3] = ids;\n const [term0, term1, term2, term3] = terms;\n const [quotedTerm0, quotedTerm1, quotedTerm2, quotedTerm3] = (0, OrderUtils_1.arePatternsQuoted)(terms);\n let map1;\n let map2;\n let map3;\n const map0 = this.nestedRecords;\n const map0Keys = (term0 !== undefined ?\n (quotedTerm0 ? this.getQuotedPatternKeys(map0, term0) : (id0 in map0 ? [id0] : [])) :\n Object.keys(map0));\n for (const key1 of map0Keys) {\n map1 = map0[key1];\n const map1Keys = (term1 !== undefined ?\n (quotedTerm1 ? this.getQuotedPatternKeys(map1, term1) : (id1 in map1 ? [id1] : [])) :\n Object.keys(map1));\n for (const key2 of map1Keys) {\n map2 = map1[key2];\n const map2Keys = (term2 !== undefined ?\n (quotedTerm2 ? this.getQuotedPatternKeys(map2, term2) : (id2 in map2 ? [id2] : [])) :\n Object.keys(map2));\n for (const key3 of map2Keys) {\n map3 = map2[key3];\n if (term3 !== undefined) {\n if (quotedTerm3) {\n count += [...this.getQuotedPatternKeys(map3, term3)].length;\n }\n else if (id3 in map3) {\n count++;\n }\n }\n else {\n count += Object.keys(map3).length;\n }\n }\n }\n }\n return count;\n }\n}\nexports.RdfStoreIndexNestedRecordQuoted = RdfStoreIndexNestedRecordQuoted;\n//# sourceMappingURL=RdfStoreIndexNestedRecordQuoted.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/PendingStreamsIndex\"), exports);\n__exportStar(require(\"./lib/StreamingStore\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PendingStreamsIndex = void 0;\nconst rdf_string_1 = require(\"rdf-string\");\nconst rdf_terms_1 = require(\"rdf-terms\");\n/**\n * A PendingStreamsIndex stores pending streams indexed by the quad pattern they have been created for.\n */\nclass PendingStreamsIndex {\n constructor() {\n this.indexedStreams = new Map();\n this.allStreams = [];\n }\n termToString(term) {\n return term && term.termType !== 'Variable' ? (0, rdf_string_1.termToString)(term) : PendingStreamsIndex.ID_VARIABLE;\n }\n /**\n * Add a new pending stream for the given quad pattern.\n * @param pendingStream A pending stream.\n * @param subject A term.\n * @param predicate A term.\n * @param object A term.\n * @param graph A term.\n */\n addPatternListener(pendingStream, subject, predicate, object, graph) {\n // Append to list of pendingStreams\n this.allStreams.push(pendingStream);\n // Append to index of pendingStreams\n const key = `${this.termToString(subject)}${PendingStreamsIndex.ID_SEPARATOR}${this.termToString(predicate)}${PendingStreamsIndex.ID_SEPARATOR}${this.termToString(object)}${PendingStreamsIndex.ID_SEPARATOR}${this.termToString(graph)}`;\n let existingListeners = this.indexedStreams.get(key);\n if (!existingListeners) {\n existingListeners = [];\n this.indexedStreams.set(key, existingListeners);\n }\n existingListeners.push(pendingStream);\n }\n /**\n * Find all the pending streams from which their quad pattern match the given quad.\n * @param quad The quad to match patterns to.\n */\n getPendingStreamsForQuad(quad) {\n // Determine the combinations of quad patterns to look up\n let keys = [(0, rdf_terms_1.getTerms)(quad).map(term => (0, rdf_string_1.termToString)(term))];\n for (let i = 0; i < rdf_terms_1.QUAD_TERM_NAMES.length; i++) {\n const keysOld = keys;\n keys = [];\n for (const key of keysOld) {\n keys.push(key);\n const keyModified = [...key];\n keyModified[i] = PendingStreamsIndex.ID_VARIABLE;\n keys.push(keyModified);\n }\n }\n // Fetch the pendingStreams for the quad pattern combinations\n const pendingStreams = [];\n for (const key of keys) {\n const found = this.indexedStreams.get(key.join(PendingStreamsIndex.ID_SEPARATOR));\n if (found) {\n pendingStreams.push(...found);\n }\n }\n return pendingStreams;\n }\n}\nPendingStreamsIndex.ID_VARIABLE = '?';\nPendingStreamsIndex.ID_SEPARATOR = ':';\nexports.PendingStreamsIndex = PendingStreamsIndex;\n//# sourceMappingURL=PendingStreamsIndex.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StreamingStore = void 0;\nconst n3_1 = require(\"n3\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst PendingStreamsIndex_1 = require(\"./PendingStreamsIndex\");\n/**\n * A StreamingStore allows data lookup and insertion to happen in parallel.\n * Concretely, this means that `match()` calls happening before `import()` calls, will still consider those triples that\n * are inserted later, which is done by keeping the response streams of `match()` open.\n * Only when the `end()` method is invoked, all response streams will close, and the StreamingStore will be considered\n * immutable.\n *\n * WARNING: `end()` MUST be called at some point, otherwise all `match` streams will remain unended.\n */\nclass StreamingStore {\n constructor(store = new n3_1.Store()) {\n this.pendingStreams = new PendingStreamsIndex_1.PendingStreamsIndex();\n this.ended = false;\n this.store = store;\n }\n /**\n * Mark this store as ended.\n *\n * This will make sure that all running and future `match` calls will end,\n * and all next `import` calls to this store will throw an error.\n */\n end() {\n this.ended = true;\n // Mark all pendingStreams as ended.\n for (const pendingStream of this.pendingStreams.allStreams) {\n pendingStream.push(null);\n pendingStream._pipeSource.unpipe();\n }\n }\n importToListeners(stream) {\n stream.on('data', (quad) => {\n if (!this.ended && !this.store.countQuads(quad.subject, quad.predicate, quad.object, quad.graph)) {\n for (const pendingStream of this.pendingStreams.getPendingStreamsForQuad(quad)) {\n if (pendingStream.isInitialized) {\n pendingStream.push(quad);\n pendingStream.emit('quad', quad);\n }\n }\n }\n });\n }\n import(stream) {\n if (this.ended) {\n throw new Error('Attempted to import into an ended StreamingStore');\n }\n this.importToListeners(stream);\n return this.store.import(stream);\n }\n match(subject, predicate, object, graph) {\n const storeResult = this.store.match(subject, predicate, object, graph);\n let stream = storeResult;\n // If the store hasn't ended yet, also create a new pendingStream\n if (!this.ended) {\n // The new pendingStream remains open, until the store is ended.\n const pendingStream = new readable_stream_1.PassThrough({ objectMode: true });\n this.pendingStreams.addPatternListener(pendingStream, subject, predicate, object, graph);\n stream = storeResult.pipe(pendingStream, { end: false });\n stream._pipeSource = storeResult;\n // This is an ugly hack to annotate pendingStream with the isInitialized once the store stream started being read.\n // This is necessary to avoid duplicate quads cases where match() is called but not yet read, an import is done,\n // and only then the match() stream is read.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n const readOld = storeResult._read;\n storeResult._read = (size) => {\n pendingStream.isInitialized = true;\n readOld.call(storeResult, size);\n };\n }\n return stream;\n }\n /**\n * The internal store with all imported quads.\n */\n getStore() {\n return this.store;\n }\n}\nexports.StreamingStore = StreamingStore;\n//# sourceMappingURL=StreamingStore.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.termToString = exports.stringToTerm = exports.stringQuadToQuad = exports.quadToStringQuad = exports.getLiteralValue = exports.getLiteralType = exports.getLiteralLanguage = void 0;\nconst TermUtil_1 = require(\"./lib/TermUtil\");\nObject.defineProperty(exports, \"getLiteralLanguage\", { enumerable: true, get: function () { return TermUtil_1.getLiteralLanguage; } });\nObject.defineProperty(exports, \"getLiteralType\", { enumerable: true, get: function () { return TermUtil_1.getLiteralType; } });\nObject.defineProperty(exports, \"getLiteralValue\", { enumerable: true, get: function () { return TermUtil_1.getLiteralValue; } });\nObject.defineProperty(exports, \"quadToStringQuad\", { enumerable: true, get: function () { return TermUtil_1.quadToStringQuad; } });\nObject.defineProperty(exports, \"stringQuadToQuad\", { enumerable: true, get: function () { return TermUtil_1.stringQuadToQuad; } });\nObject.defineProperty(exports, \"stringToTerm\", { enumerable: true, get: function () { return TermUtil_1.stringToTerm; } });\nObject.defineProperty(exports, \"termToString\", { enumerable: true, get: function () { return TermUtil_1.termToString; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stringQuadToQuad = exports.quadToStringQuad = exports.stringToTerm = exports.getLiteralLanguage = exports.getLiteralType = exports.getLiteralValue = exports.termToString = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst FACTORY = new rdf_data_factory_1.DataFactory();\n/**\n * Utility methods for converting between string-based RDF representations and RDFJS objects.\n *\n * RDF Terms are represented as follows:\n * * Blank nodes: '_:myBlankNode'\n * * Variables: '_myVariable'\n * * Literals: '\"myString\"', '\"myLanguageString\"@en-us', '\"

e

\"^^'\n * * URIs: ''\n *\n * Quads/triples are represented as hashes with 'subject', 'predicate', 'object' and 'graph' (optional)\n * as keys, and string-based RDF terms as values.\n */\n/**\n * Convert an RDFJS term to a string-based representation.\n * @param {RDF.Term} term An RDFJS term.\n * @return {string} A string-based term representation.\n */\nfunction termToString(term) {\n // TODO: remove nasty any casts when this TS bug has been fixed: https://github.com/microsoft/TypeScript/issues/26933\n if (!term) {\n return undefined;\n }\n switch (term.termType) {\n case 'NamedNode': return (`<${escapeIRI(term.value)}>`);\n case 'BlankNode': return (`_:${term.value}`);\n case 'Literal': {\n const literalValue = term;\n return (`\"${escapeStringRDF(literalValue.value)}\"${literalValue.datatype &&\n literalValue.datatype.value !== 'http://www.w3.org/2001/XMLSchema#string' &&\n literalValue.datatype.value !== 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString' ?\n `^^<${literalValue.datatype.value}>` :\n ''}${literalValue.language ? `@${literalValue.language}` : ''}`);\n }\n case 'Quad': return (`<<${termToString(term.subject)} ${termToString(term.predicate)} ${termToString(term.object)}${term.graph.termType === 'DefaultGraph' ? '' : ` ${termToString(term.graph)}`}>>`);\n case 'Variable': return (`?${term.value}`);\n case 'DefaultGraph': return term.value;\n }\n}\nexports.termToString = termToString;\n/**\n * Get the string value of a literal.\n * @param {string} literalValue An RDF literal enclosed by '\"'.\n * @return {string} The literal value inside the '\"'.\n */\nfunction getLiteralValue(literalValue) {\n const match = /^\"([^]*)\"((\\^\\^.*)|(@.*))?$/u.exec(literalValue);\n if (!match) {\n throw new Error(`${literalValue} is not a literal`);\n }\n return match[1].replace(/\\\\\"/ug, '\"');\n}\nexports.getLiteralValue = getLiteralValue;\n/**\n * Get the datatype of the given literal.\n * @param {string} literalValue An RDF literal.\n * @return {string} The datatype of the literal.\n */\nfunction getLiteralType(literalValue) {\n const match = /^\"[^]*\"(?:\\^\\^<([^\"]+)>|(@)[^@\"]+)?$/u.exec(literalValue);\n if (!match) {\n throw new Error(`${literalValue} is not a literal`);\n }\n return match[1] || (match[2] ?\n 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString' :\n 'http://www.w3.org/2001/XMLSchema#string');\n}\nexports.getLiteralType = getLiteralType;\n/**\n * Get the language of the given literal.\n * @param {string} literalValue An RDF literal.\n * @return {string} The language of the literal.\n */\nfunction getLiteralLanguage(literalValue) {\n const match = /^\"[^]*\"(?:@([^@\"]+)|\\^\\^[^\"]+)?$/u.exec(literalValue);\n if (!match) {\n throw new Error(`${literalValue} is not a literal`);\n }\n return match[1] ? match[1].toLowerCase() : '';\n}\nexports.getLiteralLanguage = getLiteralLanguage;\n/**\n * Transform a string-based RDF term to an RDFJS term.\n * @param {string} value A string-based RDF-term.\n * @param {RDF.DataFactory} dataFactory An optional datafactory to create terms with.\n * @return {RDF.Term} An RDF-JS term.\n */\nfunction stringToTerm(value, dataFactory) {\n dataFactory = dataFactory || FACTORY;\n if (!value || (value.length === 0)) {\n return dataFactory.defaultGraph();\n }\n switch (value[0]) {\n case '_': return dataFactory.blankNode(value.slice(2));\n case '?':\n if (!dataFactory.variable) {\n throw new Error(`Missing 'variable()' method on the given DataFactory`);\n }\n return dataFactory.variable(value.slice(1));\n case '\"': {\n const language = getLiteralLanguage(value);\n const type = dataFactory.namedNode(getLiteralType(value));\n return dataFactory.literal(getLiteralValue(value), language || type);\n }\n case '<':\n default:\n if (value.startsWith('<<') && value.endsWith('>>')) {\n // Iterate character-by-character to detect spaces that are *not* wrapped in <<>>\n const terms = value.slice(2, -2);\n const stringTerms = [];\n let ignoreTags = 0;\n let lastIndex = 0;\n for (let i = 0; i < terms.length; i++) {\n const char = terms[i];\n if (char === '<') {\n ignoreTags++;\n }\n if (char === '>') {\n if (ignoreTags === 0) {\n throw new Error(`Found closing tag without opening tag in ${value}`);\n }\n else {\n ignoreTags--;\n }\n }\n if (char === ' ' && ignoreTags === 0) {\n stringTerms.push(terms.slice(lastIndex, i));\n lastIndex = i + 1;\n }\n }\n if (ignoreTags !== 0) {\n throw new Error(`Found opening tag without closing tag in ${value}`);\n }\n stringTerms.push(terms.slice(lastIndex, terms.length));\n // We require 3 or 4 components\n if (stringTerms.length !== 3 && stringTerms.length !== 4) {\n throw new Error(`Nested quad syntax error ${value}`);\n }\n return dataFactory.quad(stringToTerm(stringTerms[0]), stringToTerm(stringTerms[1]), stringToTerm(stringTerms[2]), stringTerms[3] ? stringToTerm(stringTerms[3]) : undefined);\n }\n if (!value.startsWith('<') || !value.endsWith('>')) {\n throw new Error(`Detected invalid iri for named node (must be wrapped in <>): ${value}`);\n }\n return dataFactory.namedNode(value.slice(1, -1));\n }\n}\nexports.stringToTerm = stringToTerm;\n/**\n * Convert an RDFJS quad to a string-based quad representation.\n * @param {Quad} q An RDFJS quad.\n * @return {IStringQuad} A hash with string-based quad terms.\n * @template Q The type of quad, defaults to RDF.Quad.\n */\nfunction quadToStringQuad(quad) {\n return {\n subject: termToString(quad.subject),\n predicate: termToString(quad.predicate),\n object: termToString(quad.object),\n graph: termToString(quad.graph),\n };\n}\nexports.quadToStringQuad = quadToStringQuad;\n/**\n * Convert a string-based quad representation to an RDFJS quad.\n * @param {IStringQuad} stringQuad A hash with string-based quad terms.\n * @param {RDF.DataFactory} dataFactory An optional datafactory to create terms with.\n * @return {Q} An RDFJS quad.\n * @template Q The type of quad, defaults to RDF.Quad.\n */\nfunction stringQuadToQuad(stringQuad, dataFactory) {\n dataFactory = dataFactory || FACTORY;\n return dataFactory.quad(stringToTerm(stringQuad.subject, dataFactory), stringToTerm(stringQuad.predicate, dataFactory), stringToTerm(stringQuad.object, dataFactory), stringToTerm(stringQuad.graph, dataFactory));\n}\nexports.stringQuadToQuad = stringQuadToQuad;\nfunction escapeIRI(iriValue) {\n return iriValue.replace(escapePattern, replaceEscapedCharacter);\n}\nfunction escapeStringRDF(stringValue) {\n if (escapePattern.test(stringValue)) {\n stringValue = stringValue.replace(escapePattern, replaceEscapedCharacter);\n }\n return stringValue;\n}\n// Characters in literals and IRIs that require escaping\n// Also containing potential surrogate pairs\n/* eslint-disable require-unicode-regexp */ /* eslint-disable unicorn/better-regex */\nconst escapePattern = /[\"\\\\\\t\\n\\r\\b\\f\\u0000-\\u0019]|[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n/* eslint-enable require-unicode-regexp */ /* eslint-enable unicorn/better-regex */\nconst escapes = new Map([\n ['\\\\', '\\\\\\\\'],\n ['\"', '\\\\\"'],\n ['\\t', '\\\\t'],\n ['\\n', '\\\\n'],\n ['\\r', '\\\\r'],\n ['\\b', '\\\\b'],\n ['\\f', '\\\\f'],\n]);\nfunction replaceEscapedCharacter(character) {\n // Try simplest case first, get replacement for character\n const result = escapes.get(character);\n if (!result) {\n if (character.length === 1) {\n // Single unicode charachters, i.e. not a surrogate pair\n const code = character.charCodeAt(0).toString(16);\n return `${'\\\\u0000'.slice(0, -code.length)}${code}`;\n }\n // Surrogate pairs\n const code = ((character.charCodeAt(0) - 55296) * 1024 + character.charCodeAt(1) + 9216).toString(16);\n return `${'\\\\U00000000'.slice(0, -code.length)}${code}`;\n }\n return result;\n}\n//# sourceMappingURL=TermUtil.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.termToString = exports.stringToTerm = exports.stringQuadToQuad = exports.quadToStringQuad = exports.getLiteralValue = exports.getLiteralType = exports.getLiteralLanguage = void 0;\nconst TermUtil_1 = require(\"./lib/TermUtil\");\nObject.defineProperty(exports, \"getLiteralLanguage\", { enumerable: true, get: function () { return TermUtil_1.getLiteralLanguage; } });\nObject.defineProperty(exports, \"getLiteralType\", { enumerable: true, get: function () { return TermUtil_1.getLiteralType; } });\nObject.defineProperty(exports, \"getLiteralValue\", { enumerable: true, get: function () { return TermUtil_1.getLiteralValue; } });\nObject.defineProperty(exports, \"quadToStringQuad\", { enumerable: true, get: function () { return TermUtil_1.quadToStringQuad; } });\nObject.defineProperty(exports, \"stringQuadToQuad\", { enumerable: true, get: function () { return TermUtil_1.stringQuadToQuad; } });\nObject.defineProperty(exports, \"stringToTerm\", { enumerable: true, get: function () { return TermUtil_1.stringToTerm; } });\nObject.defineProperty(exports, \"termToString\", { enumerable: true, get: function () { return TermUtil_1.termToString; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.stringQuadToQuad = exports.quadToStringQuad = exports.stringToTerm = exports.getLiteralLanguage = exports.getLiteralType = exports.getLiteralValue = exports.termToString = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst FACTORY = new rdf_data_factory_1.DataFactory();\n/**\n * Utility methods for converting between string-based RDF representations and RDFJS objects.\n *\n * RDF Terms are represented as follows:\n * * Blank nodes: '_:myBlankNode'\n * * Variables: '?myVariable'\n * * Literals: '\"myString\"', '\"myLanguageString\"@en-us', '\"3\"^^xsd:number'\n * * URIs: 'http://example.org'\n *\n * Quads/triples are represented as hashes with 'subject', 'predicate', 'object' and 'graph' (optional)\n * as keys, and string-based RDF terms as values.\n */\n/**\n * Convert an RDFJS term to a string-based representation.\n * @param {RDF.Term} term An RDFJS term.\n * @return {string} A string-based term representation.\n */\nfunction termToString(term) {\n // TODO: remove nasty any casts when this TS bug has been fixed: https://github.com/microsoft/TypeScript/issues/26933\n if (!term) {\n return undefined;\n }\n switch (term.termType) {\n case 'NamedNode': return term.value;\n case 'BlankNode': return ('_:' + term.value);\n case 'Literal':\n const literalValue = term;\n return ('\"' + literalValue.value + '\"' +\n (literalValue.datatype &&\n literalValue.datatype.value !== 'http://www.w3.org/2001/XMLSchema#string' &&\n literalValue.datatype.value !== 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString' ?\n '^^' + literalValue.datatype.value : '') +\n (literalValue.language ? '@' + literalValue.language : ''));\n case 'Quad': return `<<${termToString(term.subject)} ${termToString(term.predicate)} ${termToString(term.object)}${term.graph.termType === 'DefaultGraph' ? '' : ' ' + termToString(term.graph)}>>`;\n case 'Variable': return ('?' + term.value);\n case 'DefaultGraph': return term.value;\n }\n}\nexports.termToString = termToString;\n/**\n * Get the string value of a literal.\n * @param {string} literalValue An RDF literal enclosed by '\"'.\n * @return {string} The literal value inside the '\"'.\n */\nfunction getLiteralValue(literalValue) {\n const match = /^\"([^]*)\"/.exec(literalValue);\n if (!match) {\n throw new Error(literalValue + ' is not a literal');\n }\n return match[1];\n}\nexports.getLiteralValue = getLiteralValue;\n/**\n * Get the datatype of the given literal.\n * @param {string} literalValue An RDF literal.\n * @return {string} The datatype of the literal.\n */\nfunction getLiteralType(literalValue) {\n const match = /^\"[^]*\"(?:\\^\\^([^\"]+)|(@)[^@\"]+)?$/.exec(literalValue);\n if (!match) {\n throw new Error(literalValue + ' is not a literal');\n }\n return match[1] || (match[2]\n ? 'http://www.w3.org/1999/02/22-rdf-syntax-ns#langString' : 'http://www.w3.org/2001/XMLSchema#string');\n}\nexports.getLiteralType = getLiteralType;\n/**\n * Get the language of the given literal.\n * @param {string} literalValue An RDF literal.\n * @return {string} The language of the literal.\n */\nfunction getLiteralLanguage(literalValue) {\n const match = /^\"[^]*\"(?:@([^@\"]+)|\\^\\^[^\"]+)?$/.exec(literalValue);\n if (!match) {\n throw new Error(literalValue + ' is not a literal');\n }\n return match[1] ? match[1].toLowerCase() : '';\n}\nexports.getLiteralLanguage = getLiteralLanguage;\n/**\n * Transform a string-based RDF term to an RDFJS term.\n * @param {string} value A string-based RDF-term.\n * @param {RDF.DataFactory} dataFactory An optional datafactory to create terms with.\n * @return {RDF.Term} An RDF-JS term.\n */\nfunction stringToTerm(value, dataFactory) {\n dataFactory = dataFactory || FACTORY;\n if (!value || !value.length) {\n return dataFactory.defaultGraph();\n }\n switch (value[0]) {\n case '_': return dataFactory.blankNode(value.substr(2));\n case '?':\n if (!dataFactory.variable) {\n throw new Error(`Missing 'variable()' method on the given DataFactory`);\n }\n return dataFactory.variable(value.substr(1));\n case '\"':\n const language = getLiteralLanguage(value);\n const type = dataFactory.namedNode(getLiteralType(value));\n return dataFactory.literal(getLiteralValue(value), language || type);\n case '<':\n default:\n if (value[0] === '<' && value.length > 4 && value[1] === '<' && value[value.length - 1] === '>' && value[value.length - 2] === '>') {\n // Iterate character-by-character to detect spaces that are *not* wrapped in <<>>\n const terms = value.slice(2, -2).trim();\n let stringTerms = [];\n let ignoreTags = 0;\n let lastIndex = 0;\n let inQuote = false;\n for (let i = 0; i < terms.length; i++) {\n const char = terms[i];\n if (char === '<')\n ignoreTags++;\n if (char === '>') {\n if (ignoreTags === 0) {\n throw new Error('Found closing tag without opening tag in ' + value);\n }\n else {\n ignoreTags--;\n }\n }\n if (char === '\"') {\n let escaped = false;\n let j = i;\n while (j-- > 0 && terms[j] === '\\\\') {\n escaped = !escaped;\n }\n if (!escaped) {\n // We have reached an unescaped quote\n inQuote = !inQuote;\n }\n }\n if (char === ' ' && !inQuote && ignoreTags === 0) {\n stringTerms.push(terms.slice(lastIndex, i));\n while (terms[i + 1] === ' ') {\n i += 1;\n }\n lastIndex = i + 1;\n }\n }\n if (ignoreTags !== 0) {\n throw new Error('Found opening tag without closing tag in ' + value);\n }\n stringTerms.push(terms.slice(lastIndex, terms.length));\n // We require 3 or 4 components\n if (stringTerms.length !== 3 && stringTerms.length !== 4) {\n throw new Error('Nested quad syntax error ' + value);\n }\n stringTerms = stringTerms.map(term => term.startsWith('<') && !term.includes(' ') ? term.slice(1, -1) : term);\n return dataFactory.quad(stringToTerm(stringTerms[0]), stringToTerm(stringTerms[1]), stringToTerm(stringTerms[2]), stringTerms[3] ? stringToTerm(stringTerms[3]) : undefined);\n }\n return dataFactory.namedNode(value);\n }\n}\nexports.stringToTerm = stringToTerm;\n/**\n * Convert an RDFJS quad to a string-based quad representation.\n * @param {Quad} q An RDFJS quad.\n * @return {IStringQuad} A hash with string-based quad terms.\n * @template Q The type of quad, defaults to RDF.Quad.\n */\nfunction quadToStringQuad(q) {\n // tslint:disable:object-literal-sort-keys\n return {\n subject: termToString(q.subject),\n predicate: termToString(q.predicate),\n object: termToString(q.object),\n graph: termToString(q.graph),\n };\n // tslint:enable:object-literal-sort-keys\n}\nexports.quadToStringQuad = quadToStringQuad;\n/**\n * Convert a string-based quad representation to an RDFJS quad.\n * @param {IStringQuad} stringQuad A hash with string-based quad terms.\n * @param {RDF.DataFactory} dataFactory An optional datafactory to create terms with.\n * @return {Q} An RDFJS quad.\n * @template Q The type of quad, defaults to RDF.Quad.\n */\nfunction stringQuadToQuad(stringQuad, dataFactory) {\n dataFactory = dataFactory || FACTORY;\n return dataFactory.quad(stringToTerm(stringQuad.subject, dataFactory), stringToTerm(stringQuad.predicate, dataFactory), stringToTerm(stringQuad.object, dataFactory), stringToTerm(stringQuad.graph, dataFactory));\n}\nexports.stringQuadToQuad = stringQuadToQuad;\n//# sourceMappingURL=TermUtil.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/QuadTermUtil\"), exports);\n__exportStar(require(\"./lib/TermUtil\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.matchPatternMappings = exports.matchPatternComplete = exports.matchPattern = exports.matchTerm = exports.getValueNestedPath = exports.someTermsNested = exports.someTerms = exports.everyTermsNested = exports.everyTerms = exports.reduceTermsNested = exports.reduceTerms = exports.mapTermsNested = exports.mapTerms = exports.filterQuadTermNamesNested = exports.filterQuadTermNames = exports.filterTermsNested = exports.filterTerms = exports.forEachTermsNested = exports.forEachTerms = exports.collectNamedTerms = exports.getNamedTerms = exports.getTermsNested = exports.getTerms = exports.TRIPLE_TERM_NAMES = exports.QUAD_TERM_NAMES = void 0;\nconst rdf_data_factory_1 = require(\"rdf-data-factory\");\nconst DF = new rdf_data_factory_1.DataFactory();\n/**\n * All available quad term names.\n * @type {[string , string , string , string]}\n */\nexports.QUAD_TERM_NAMES = ['subject', 'predicate', 'object', 'graph'];\n/**\n * All available triple term names.\n * @type {[string , string , string]}\n */\nexports.TRIPLE_TERM_NAMES = ['subject', 'predicate', 'object'];\n/**\n * Get all terms in the given quad.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {boolean} ignoreDefaultGraph If true and the quad has the default graph as graph,\n * this term will not be returned in the array.\n * (default: false)\n * @return {Term[]} The available terms in the quad.\n */\nfunction getTerms(quad, ignoreDefaultGraph) {\n if (ignoreDefaultGraph && quad.graph.termType === 'DefaultGraph') {\n return [quad.subject, quad.predicate, quad.object];\n }\n return [quad.subject, quad.predicate, quad.object, quad.graph];\n}\nexports.getTerms = getTerms;\n/**\n * Get all terms in the given quad, including nested quads.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {boolean} ignoreDefaultGraph If true and the quad has the default graph as graph,\n * this term will not be returned in the array.\n * (default: false)\n * @return {Term[]} The available terms in the nested quad, excluding quad terms.\n */\nfunction getTermsNested(quad, ignoreDefaultGraph) {\n const terms = [];\n for (const term of getTerms(quad, ignoreDefaultGraph)) {\n if (term.termType === 'Quad') {\n getTermsNested(term, ignoreDefaultGraph).forEach(subTerm => terms.push(subTerm));\n }\n else {\n terms.push(term);\n }\n }\n return terms;\n}\nexports.getTermsNested = getTermsNested;\n/**\n * Convert the given quad to an array of named terms.\n * This is the reverse operation of {@link collectNamedTerms}.\n * @param {BaseQuad} quad An RDFJS quad.\n * @return {INamedTerm[]} An array of named terms.\n */\nfunction getNamedTerms(quad) {\n return [\n { key: 'subject', value: quad.subject },\n { key: 'predicate', value: quad.predicate },\n { key: 'object', value: quad.object },\n { key: 'graph', value: quad.graph },\n ];\n}\nexports.getNamedTerms = getNamedTerms;\n/**\n * Convert an array of named terms to an RDFJS quad.\n * This is the reverse operation of {@link getNamedTerms}.\n * @param {INamedTerm[]} namedTerms An array of named terms.\n * @param {(termName: QuadTermName) => Term} defaultCb An optional callback for when\n * certain terms are not available in the array.\n * @param {RDF.DataFactory} dataFactory A custom data factory to create quads.\n * @return {Q} The resulting RDFJS quad.\n * @template Q The type of quad to output, defaults to RDF.Quad.\n */\nfunction collectNamedTerms(namedTerms, defaultCb, dataFactory) {\n const elements = {};\n namedTerms.forEach((namedTerm) => elements[namedTerm.key] = namedTerm.value);\n if (defaultCb) {\n elements.subject = elements.subject || defaultCb('subject');\n elements.predicate = elements.predicate || defaultCb('predicate');\n elements.object = elements.object || defaultCb('object');\n elements.graph = elements.graph || defaultCb('graph');\n }\n return (dataFactory || DF).quad(elements.subject, elements.predicate, elements.object, elements.graph);\n}\nexports.collectNamedTerms = collectNamedTerms;\n/**\n * Iterates over each term.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName} cb A callback function.\n */\nfunction forEachTerms(quad, cb) {\n cb(quad.subject, 'subject');\n cb(quad.predicate, 'predicate');\n cb(quad.object, 'object');\n cb(quad.graph, 'graph');\n}\nexports.forEachTerms = forEachTerms;\n/**\n * Iterates over each leaf term, while recursing into quoted triples.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName} cb A callback function.\n * @param QuadTermName[] keys The current key path.\n */\nfunction forEachTermsNested(quad, cb, keys = []) {\n if (quad.subject.termType === 'Quad') {\n forEachTermsNested(quad.subject, cb, [...keys, 'subject']);\n }\n else {\n cb(quad.subject, [...keys, 'subject']);\n }\n if (quad.predicate.termType === 'Quad') {\n forEachTermsNested(quad.predicate, cb, [...keys, 'predicate']);\n }\n else {\n cb(quad.predicate, [...keys, 'predicate']);\n }\n if (quad.object.termType === 'Quad') {\n forEachTermsNested(quad.object, cb, [...keys, 'object']);\n }\n else {\n cb(quad.object, [...keys, 'object']);\n }\n if (quad.graph.termType === 'Quad') {\n forEachTermsNested(quad.graph, cb, [...keys, 'graph']);\n }\n else {\n cb(quad.graph, [...keys, 'graph']);\n }\n}\nexports.forEachTermsNested = forEachTermsNested;\n/**\n * Get all terms in the given quad that return true on the given filter function.\n * @param {BaseQuad} quad A quad.\n * @param {(value: Term, key: QuadTermName) => boolean} filter A filter callback.\n * @return {Term[]} The list of matching terms.\n */\nfunction filterTerms(quad, filter) {\n const terms = [];\n if (filter(quad.subject, 'subject')) {\n terms.push(quad.subject);\n }\n if (filter(quad.predicate, 'predicate')) {\n terms.push(quad.predicate);\n }\n if (filter(quad.object, 'object')) {\n terms.push(quad.object);\n }\n if (filter(quad.graph, 'graph')) {\n terms.push(quad.graph);\n }\n return terms;\n}\nexports.filterTerms = filterTerms;\n/**\n * Get all terms in the given quad that return true on the given filter function, while recursing into quoted triples.\n * @param {BaseQuad} quad A quad.\n * @param {(value: Term, key: QuadTermName) => boolean} filter A filter callback.\n * @param QuadTermName[] keys The current key path.\n * @return {Term[]} The list of matching terms.\n */\nfunction filterTermsNested(quad, filter, keys = []) {\n let terms = [];\n if (quad.subject.termType === 'Quad') {\n terms = [...terms, ...filterTermsNested(quad.subject, filter, [...keys, 'subject'])];\n }\n else {\n if (filter(quad.subject, [...keys, 'subject'])) {\n terms.push(quad.subject);\n }\n }\n if (quad.predicate.termType === 'Quad') {\n terms = [...terms, ...filterTermsNested(quad.predicate, filter, [...keys, 'predicate'])];\n }\n else {\n if (filter(quad.predicate, [...keys, 'predicate'])) {\n terms.push(quad.predicate);\n }\n }\n if (quad.object.termType === 'Quad') {\n terms = [...terms, ...filterTermsNested(quad.object, filter, [...keys, 'object'])];\n }\n else {\n if (filter(quad.object, [...keys, 'object'])) {\n terms.push(quad.object);\n }\n }\n if (quad.graph.termType === 'Quad') {\n terms = [...terms, ...filterTermsNested(quad.graph, filter, [...keys, 'graph'])];\n }\n else {\n if (filter(quad.graph, [...keys, 'graph'])) {\n terms.push(quad.graph);\n }\n }\n return terms;\n}\nexports.filterTermsNested = filterTermsNested;\n/**\n * Get all quad term names in the given quad that return true on the given filter function.\n * @param {BaseQuad} quad A quad.\n * @param {(value: Term, key: QuadTermName, all: INamedTerm[]) => boolean} filter A filter callback.\n * @return {QuadTermName[]} The list of matching quad term names.\n */\nfunction filterQuadTermNames(quad, filter) {\n const names = [];\n if (filter(quad.subject, 'subject')) {\n names.push('subject');\n }\n if (filter(quad.predicate, 'predicate')) {\n names.push('predicate');\n }\n if (filter(quad.object, 'object')) {\n names.push('object');\n }\n if (filter(quad.graph, 'graph')) {\n names.push('graph');\n }\n return names;\n}\nexports.filterQuadTermNames = filterQuadTermNames;\n/**\n * Get all quad term names in the given quad that return true on the given filter function, while recursing into quoted triples.\n * @param {BaseQuad} quad A quad.\n * @param {(value: Term, key: QuadTermName, all: INamedTerm[]) => boolean} filter A filter callback.\n * @param QuadTermName[] keys The current key path.\n * @return {QuadTermName[]} The list of matching quad term names.\n */\nfunction filterQuadTermNamesNested(quad, filter, keys = []) {\n let names = [];\n const keysS = [...keys, 'subject'];\n if (quad.subject.termType === 'Quad') {\n names = [...names, ...filterQuadTermNamesNested(quad.subject, filter, keysS)];\n }\n else {\n if (filter(quad.subject, keysS)) {\n names.push(keysS);\n }\n }\n const keysP = [...keys, 'predicate'];\n if (quad.predicate.termType === 'Quad') {\n names = [...names, ...filterQuadTermNamesNested(quad.predicate, filter, keysP)];\n }\n else {\n if (filter(quad.predicate, keysP)) {\n names.push(keysP);\n }\n }\n const keysO = [...keys, 'object'];\n if (quad.object.termType === 'Quad') {\n names = [...names, ...filterQuadTermNamesNested(quad.object, filter, keysO)];\n }\n else {\n if (filter(quad.object, keysO)) {\n names.push(keysO);\n }\n }\n const keysG = [...keys, 'graph'];\n if (quad.graph.termType === 'Quad') {\n names = [...names, ...filterQuadTermNamesNested(quad.graph, filter, keysG)];\n }\n else {\n if (filter(quad.graph, keysG)) {\n names.push(keysG);\n }\n }\n return names;\n}\nexports.filterQuadTermNamesNested = filterQuadTermNamesNested;\n/**\n * Map all terms of a quad.\n * @param {Quad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName) => Term} mapper A mapper function.\n * @param {RDF.DataFactory} dataFactory A custom data factory to create quads.\n * @return {Quad} A new RDFJS quad.\n * @template Q The type of quad, defaults to RDF.Quad.\n */\nfunction mapTerms(quad, mapper, dataFactory) {\n return (dataFactory || DF).quad(mapper(quad.subject, 'subject'), mapper(quad.predicate, 'predicate'), mapper(quad.object, 'object'), mapper(quad.graph, 'graph'));\n}\nexports.mapTerms = mapTerms;\n/**\n * Map all terms of a quad, while recursing into quoted triples.\n * @param {Quad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName) => Term} mapper A mapper function.\n * @param {RDF.DataFactory} dataFactory A custom data factory to create quads.\n * @param QuadTermName[] keys The current key path.\n * @return {Quad} A new RDFJS quad.\n * @template Q The type of quad, defaults to RDF.Quad.\n */\nfunction mapTermsNested(quad, mapper, dataFactory, keys = []) {\n return (dataFactory || DF).quad(quad.subject.termType === 'Quad' ?\n mapTermsNested(quad.subject, mapper, dataFactory, [...keys, 'subject']) :\n mapper(quad.subject, [...keys, 'subject']), quad.predicate.termType === 'Quad' ?\n mapTermsNested(quad.predicate, mapper, dataFactory, [...keys, 'predicate']) :\n mapper(quad.predicate, [...keys, 'predicate']), quad.object.termType === 'Quad' ?\n mapTermsNested(quad.object, mapper, dataFactory, [...keys, 'object']) :\n mapper(quad.object, [...keys, 'object']), quad.graph.termType === 'Quad' ?\n mapTermsNested(quad.graph, mapper, dataFactory, [...keys, 'graph']) :\n mapper(quad.graph, [...keys, 'graph']));\n}\nexports.mapTermsNested = mapTermsNested;\n/**\n * Reduce all terms of a quad.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(previousValue: U, currentValue: Term, key: QuadTermName) => U} reducer A reduce function.\n * @param {U} initialValue The initial value.\n * @return {U} The final value.\n */\nfunction reduceTerms(quad, reducer, initialValue) {\n let value = initialValue;\n value = reducer(value, quad.subject, 'subject');\n value = reducer(value, quad.predicate, 'predicate');\n value = reducer(value, quad.object, 'object');\n return reducer(value, quad.graph, 'graph');\n}\nexports.reduceTerms = reduceTerms;\n/**\n * Reduce all terms of a quad, while recursing into quoted triples.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(previousValue: U, currentValue: Term, key: QuadTermName) => U} reducer A reduce function.\n * @param {U} initialValue The initial value.\n * @param QuadTermName[] keys The current key path.\n * @return {U} The final value.\n */\nfunction reduceTermsNested(quad, reducer, initialValue, keys = []) {\n let value = initialValue;\n if (quad.subject.termType === 'Quad') {\n value = reduceTermsNested(quad.subject, reducer, value, [...keys, 'subject']);\n }\n else {\n value = reducer(value, quad.subject, [...keys, 'subject']);\n }\n if (quad.predicate.termType === 'Quad') {\n value = reduceTermsNested(quad.predicate, reducer, value, [...keys, 'predicate']);\n }\n else {\n value = reducer(value, quad.predicate, [...keys, 'predicate']);\n }\n if (quad.object.termType === 'Quad') {\n value = reduceTermsNested(quad.object, reducer, value, [...keys, 'object']);\n }\n else {\n value = reducer(value, quad.object, [...keys, 'object']);\n }\n if (quad.graph.termType === 'Quad') {\n value = reduceTermsNested(quad.graph, reducer, value, [...keys, 'graph']);\n }\n else {\n value = reducer(value, quad.graph, [...keys, 'graph']);\n }\n return value;\n}\nexports.reduceTermsNested = reduceTermsNested;\n/**\n * Determines whether all terms satisfy the specified test.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName} checker A checker function.\n * @return {boolean} If all terms satisfy the specified test.\n */\nfunction everyTerms(quad, checker) {\n return checker(quad.subject, 'subject')\n && checker(quad.predicate, 'predicate')\n && checker(quad.object, 'object')\n && checker(quad.graph, 'graph');\n}\nexports.everyTerms = everyTerms;\n/**\n * Determines whether all terms satisfy the specified test, while recursing into quoted triples.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName} checker A checker function.\n * @param QuadTermName[] keys The current key path.\n * @return {boolean} If all terms satisfy the specified test.\n */\nfunction everyTermsNested(quad, checker, keys = []) {\n return (quad.subject.termType === 'Quad' ?\n everyTermsNested(quad.subject, checker, [...keys, 'subject']) :\n checker(quad.subject, [...keys, 'subject']))\n && (quad.predicate.termType === 'Quad' ?\n everyTermsNested(quad.predicate, checker, [...keys, 'predicate']) :\n checker(quad.predicate, [...keys, 'predicate']))\n && (quad.object.termType === 'Quad' ?\n everyTermsNested(quad.object, checker, [...keys, 'object']) :\n checker(quad.object, [...keys, 'object']))\n && (quad.graph.termType === 'Quad' ?\n everyTermsNested(quad.graph, checker, [...keys, 'graph']) :\n checker(quad.graph, [...keys, 'graph']));\n}\nexports.everyTermsNested = everyTermsNested;\n/**\n * Determines whether at least one term satisfies the specified test.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName} checker A checker function.\n * @return {boolean} If at least one term satisfies the specified test.\n */\nfunction someTerms(quad, checker) {\n return checker(quad.subject, 'subject')\n || checker(quad.predicate, 'predicate')\n || checker(quad.object, 'object')\n || checker(quad.graph, 'graph');\n}\nexports.someTerms = someTerms;\n/**\n * Determines whether at least one term satisfies the specified test, while recursing into quoted triples.\n * @param {BaseQuad} quad An RDFJS quad.\n * @param {(value: Term, key: QuadTermName} checker A checker function.\n * @param QuadTermName[] keys The current key path.\n * @return {boolean} If at least one term satisfies the specified test.\n */\nfunction someTermsNested(quad, checker, keys = []) {\n return (quad.subject.termType === 'Quad' ?\n someTermsNested(quad.subject, checker, [...keys, 'subject']) :\n checker(quad.subject, [...keys, 'subject']))\n || (quad.predicate.termType === 'Quad' ?\n someTermsNested(quad.predicate, checker, [...keys, 'predicate']) :\n checker(quad.predicate, [...keys, 'predicate']))\n || (quad.object.termType === 'Quad' ?\n someTermsNested(quad.object, checker, [...keys, 'object']) :\n checker(quad.object, [...keys, 'object']))\n || (quad.graph.termType === 'Quad' ?\n someTermsNested(quad.graph, checker, [...keys, 'graph']) :\n checker(quad.graph, [...keys, 'graph']));\n}\nexports.someTermsNested = someTermsNested;\n/**\n * Get the nested value inside a quoted triple by the given path of quad keys.\n * @param term A term, that can be a quoted triple.\n * @param keys A path of quad term names.\n */\nfunction getValueNestedPath(term, keys) {\n if (keys.length === 0) {\n return term;\n }\n if (term.termType === 'Quad') {\n return getValueNestedPath(term[keys[0]], keys.slice(1));\n }\n throw new Error(`Tried to get ${keys[0]} from term of type ${term.termType}`);\n}\nexports.getValueNestedPath = getValueNestedPath;\n/**\n * Check if the given terms match.\n *\n * At least one of the following must be true:\n * * Term B is undefined.\n * * Term B is a variable.\n * * Term A and B are quads, and return true for `matchPatternComplete`.\n * * Quad term and term are equal (`termB.equals(termA)` return true)\n *\n * @param termA A term.\n * @param termB An optional term.\n */\nfunction matchTerm(termA, termB) {\n return !termB\n || termB.termType === 'Variable'\n || (termB.termType === 'Quad' && termA.termType === 'Quad' && matchPatternComplete(termA, termB))\n || termB.equals(termA);\n}\nexports.matchTerm = matchTerm;\n/**\n * Check if the given quad matches with the given quad terms.\n *\n * Each term must match at least one of the following:\n * * Term is undefined.\n * * Term is a variable.\n * * Quad term and term are both quads, and return true for `matchPatternComplete`.\n * * Quad term and term are equal (`quadTerm.equals(term)` return true)\n *\n * @param {BaseQuad} quad A quad to match with (can not contain variables).\n * @param {Term} subject An optional subject.\n * @param {Term} predicate An optional predicate.\n * @param {Term} object An optional object.\n * @param {Term} graph An optional graph.\n * @return {boolean} If the quad matches with the quad terms.\n */\nfunction matchPattern(quad, subject, predicate, object, graph) {\n return matchTerm(quad.subject, subject)\n && matchTerm(quad.predicate, predicate)\n && matchTerm(quad.object, object)\n && matchTerm(quad.graph, graph);\n}\nexports.matchPattern = matchPattern;\n/**\n * Check if the first quad matches with all terms from the second quad.\n *\n * Each term must match at least one of the following:\n * * Quad2 term is a variable.\n * * Quad1 term and Quad2 term are equal (`term1.equals(term2)` return true)\n *\n * @param {BaseQuad} quad A quad (can not contain variables).\n * @param {BaseQuad} pattern A quad pattern (can contain variables).\n * @return {boolean} If the quad terms match.\n */\nfunction matchPatternComplete(quad, pattern) {\n return matchPattern(quad, pattern.subject, pattern.predicate, pattern.object, pattern.graph);\n}\nexports.matchPatternComplete = matchPatternComplete;\nfunction matchPatternMappings(quad, pattern, opt = {}) {\n const map = {};\n function match(_pattern, _quad) {\n return everyTerms(_pattern, (t1, key) => {\n var _a, _b;\n const t2 = _quad[key];\n switch (t1.termType) {\n case 'Variable':\n return (opt.skipVarMapping && t2.termType === 'Variable')\n || ((_b = (_a = map[t1.value]) === null || _a === void 0 ? void 0 : _a.equals(t2)) !== null && _b !== void 0 ? _b : (map[t1.value] = t2, true));\n case 'Quad':\n return t2.termType === 'Quad' && match(t1, t2);\n default:\n return t1.equals(t2);\n }\n });\n }\n return match(pattern, quad) && (opt.returnMappings ? map : true);\n}\nexports.matchPatternMappings = matchPatternMappings;\n//# sourceMappingURL=QuadTermUtil.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getQuads = exports.getDefaultGraphs = exports.getVariables = exports.getLiterals = exports.getBlankNodes = exports.getNamedNodes = exports.getTermsOfType = exports.uniqTerms = exports.TERM_TYPES = void 0;\nconst rdf_string_1 = require(\"rdf-string\");\n/**\n * All known term types.\n * @see RDF.Term\n * @type {[string , string , string , string , string, string]}\n */\nexports.TERM_TYPES = ['NamedNode', 'BlankNode', 'Literal', 'Variable', 'DefaultGraph', 'Quad'];\n/*\n * Utility methods for handling RDFJS terms.\n */\n/**\n * Create an array of unique terms from the given array.\n * @param {T[]} terms An array of RDFJS terms.\n * @return {T[]} A new array of unique RDFJS terms.\n */\nfunction uniqTerms(terms) {\n const hash = {};\n return terms.filter(term => {\n const termString = (0, rdf_string_1.termToString)(term);\n return !(termString in hash) && (hash[termString] = true);\n });\n}\nexports.uniqTerms = uniqTerms;\n/**\n * Find all terms of the given type in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @param {\"NamedNode\" | \"BlankNode\" | \"Literal\" | \"Variable\" | \"DefaultGraph\" | \"Quad\"} termType A term type.\n * @return {Term[]} A new array with elements from the given array only containing elements of the given type.\n */\nfunction getTermsOfType(terms, termType) {\n return terms.filter((term) => term.termType === termType);\n}\nexports.getTermsOfType = getTermsOfType;\n/**\n * Find all named nodes in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @return {NamedNode[]} A new array with elements from the given array only containing named nodes.\n */\nfunction getNamedNodes(terms) {\n return getTermsOfType(terms, 'NamedNode');\n}\nexports.getNamedNodes = getNamedNodes;\n/**\n * Find all blank nodes in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @return {BlankNode[]} A new array with elements from the given array only containing blank nodes.\n */\nfunction getBlankNodes(terms) {\n return getTermsOfType(terms, 'BlankNode');\n}\nexports.getBlankNodes = getBlankNodes;\n/**\n * Find all literals in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @return {Literal[]} A new array with elements from the given array only containing literals.\n */\nfunction getLiterals(terms) {\n return getTermsOfType(terms, 'Literal');\n}\nexports.getLiterals = getLiterals;\n/**\n * Find all variables in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @return {Variable[]} A new array with elements from the given array only containing variables.\n */\nfunction getVariables(terms) {\n return getTermsOfType(terms, 'Variable');\n}\nexports.getVariables = getVariables;\n/**\n * Find all default graphs in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @return {DefaultGraph[]} A new array with elements from the given array only containing default graphs.\n */\nfunction getDefaultGraphs(terms) {\n return getTermsOfType(terms, 'DefaultGraph');\n}\nexports.getDefaultGraphs = getDefaultGraphs;\n/**\n * Find all quads in the given array.\n * @param {Term[]} terms An array of RDFJS terms.\n * @return {BaseQuad[]} A new array with elements from the given array only containing quads.\n */\nfunction getQuads(terms) {\n return getTermsOfType(terms, 'Quad');\n}\nexports.getQuads = getQuads;\n//# sourceMappingURL=TermUtil.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./lib/IActiveTag\"), exports);\n__exportStar(require(\"./lib/IHtmlParseListener\"), exports);\n__exportStar(require(\"./lib/IRdfaPattern\"), exports);\n__exportStar(require(\"./lib/RdfaParser\"), exports);\n__exportStar(require(\"./lib/RdfaProfile\"), exports);\n__exportStar(require(\"./lib/Util\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IActiveTag.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IHtmlParseListener.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=IRdfaPattern.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RdfaParser = void 0;\nconst htmlparser2_1 = require(\"htmlparser2\");\nconst readable_stream_1 = require(\"readable-stream\");\nconst INITIAL_CONTEXT_XHTML = require(\"./initial-context-xhtml.json\");\nconst INITIAL_CONTEXT = require(\"./initial-context.json\");\nconst RdfaProfile_1 = require(\"./RdfaProfile\");\nconst Util_1 = require(\"./Util\");\n/**\n * A stream transformer that parses RDFa (text) streams to an {@link RDF.Stream}.\n */\nclass RdfaParser extends readable_stream_1.Transform {\n constructor(options) {\n super({ readableObjectMode: true });\n this.activeTagStack = [];\n options = options || {};\n this.options = options;\n this.util = new Util_1.Util(options.dataFactory, options.baseIRI);\n this.defaultGraph = options.defaultGraph || this.util.dataFactory.defaultGraph();\n const profile = options.contentType ? Util_1.Util.contentTypeToProfile(options.contentType) : options.profile || '';\n this.features = options.features || RdfaProfile_1.RDFA_FEATURES[profile];\n this.htmlParseListener = options.htmlParseListener;\n this.rdfaPatterns = this.features.copyRdfaPatterns ? {} : null;\n this.pendingRdfaPatternCopies = this.features.copyRdfaPatterns ? {} : null;\n this.parser = this.initializeParser(profile === 'xml');\n this.activeTagStack.push({\n incompleteTriples: [],\n inlist: false,\n language: options.language,\n listMapping: {},\n listMappingLocal: {},\n name: '',\n prefixesAll: Object.assign(Object.assign({}, INITIAL_CONTEXT['@context']), this.features.xhtmlInitialContext ? INITIAL_CONTEXT_XHTML['@context'] : {}),\n prefixesCustom: {},\n skipElement: false,\n vocab: options.vocab,\n });\n }\n /**\n * Parses the given text stream into a quad stream.\n * @param {NodeJS.EventEmitter} stream A text stream.\n * @return {RDF.Stream} A quad stream.\n */\n import(stream) {\n const output = new readable_stream_1.PassThrough({ readableObjectMode: true });\n stream.on('error', (error) => parsed.emit('error', error));\n stream.on('data', (data) => output.push(data));\n stream.on('end', () => output.push(null));\n const parsed = output.pipe(new RdfaParser(this.options));\n return parsed;\n }\n _transform(chunk, encoding, callback) {\n this.parser.write(chunk.toString());\n callback();\n }\n _flush(callback) {\n this.parser.end();\n callback();\n }\n onTagOpen(name, attributes) {\n // Determine the parent tag (ignore skipped tags)\n let parentTagI = this.activeTagStack.length - 1;\n while (parentTagI > 0 && this.activeTagStack[parentTagI].skipElement) {\n parentTagI--;\n }\n let parentTag = this.activeTagStack[parentTagI];\n // If we skipped a tag, make sure we DO use the lang, prefixes and vocab of the skipped tag\n if (parentTagI !== this.activeTagStack.length - 1) {\n parentTag = Object.assign(Object.assign({}, parentTag), { language: this.activeTagStack[this.activeTagStack.length - 1].language, prefixesAll: this.activeTagStack[this.activeTagStack.length - 1].prefixesAll, prefixesCustom: this.activeTagStack[this.activeTagStack.length - 1].prefixesCustom, vocab: this.activeTagStack[this.activeTagStack.length - 1].vocab });\n }\n // Create a new active tag and inherit language scope and baseIRI from parent\n const activeTag = {\n collectChildTags: parentTag.collectChildTags,\n incompleteTriples: [],\n inlist: 'inlist' in attributes,\n listMapping: [],\n listMappingLocal: parentTag.listMapping,\n localBaseIRI: parentTag.localBaseIRI,\n name,\n prefixesAll: null,\n prefixesCustom: null,\n skipElement: false,\n };\n this.activeTagStack.push(activeTag);\n // Save the tag contents if needed\n if (activeTag.collectChildTags) {\n // Add explicitly defined xmlns, xmlns:* and prefixes to attributes, as required by the spec (Step 11, note)\n // Sort prefixes alphabetically for deterministic namespace declaration order\n for (const prefix of Object.keys(parentTag.prefixesCustom).sort()) {\n const suffix = parentTag.prefixesCustom[prefix];\n const attributeKey = prefix === '' ? 'xmlns' : 'xmlns:' + prefix;\n if (!(attributeKey in attributes)) {\n attributes[attributeKey] = suffix;\n }\n }\n const attributesSerialized = Object.keys(attributes).map((key) => `${key}=\"${attributes[key]}\"`).join(' ');\n activeTag.text = [`<${name}${attributesSerialized ? ' ' + attributesSerialized : ''}>`];\n if (this.features.skipHandlingXmlLiteralChildren) {\n return;\n }\n }\n let allowTermsInRelPredicates = true;\n let allowTermsInRevPredicates = true;\n if (this.features.onlyAllowUriRelRevIfProperty) {\n // Ignore illegal rel/rev values when property is present\n if ('property' in attributes && 'rel' in attributes) {\n allowTermsInRelPredicates = false;\n if (attributes.rel.indexOf(':') < 0) {\n delete attributes.rel;\n }\n }\n if ('property' in attributes && 'rev' in attributes) {\n allowTermsInRevPredicates = false;\n if (attributes.rev.indexOf(':') < 0) {\n delete attributes.rev;\n }\n }\n }\n if (this.features.copyRdfaPatterns) {\n // Save the tag if needed\n if (parentTag.collectedPatternTag) {\n const patternTag = {\n attributes,\n children: [],\n name,\n referenced: false,\n rootPattern: false,\n text: [],\n };\n parentTag.collectedPatternTag.children.push(patternTag);\n activeTag.collectedPatternTag = patternTag;\n return;\n }\n // Store tags with type rdfa:Pattern as patterns\n if (attributes.typeof === 'rdfa:Pattern') {\n activeTag.collectedPatternTag = {\n attributes,\n children: [],\n name,\n parentTag,\n referenced: false,\n rootPattern: true,\n text: [],\n };\n return;\n }\n // Instantiate patterns on rdfa:copy\n if (attributes.property === 'rdfa:copy') {\n const copyTargetPatternId = attributes.resource || attributes.href || attributes.src;\n if (this.rdfaPatterns[copyTargetPatternId]) {\n this.emitPatternCopy(parentTag, this.rdfaPatterns[copyTargetPatternId], copyTargetPatternId);\n }\n else {\n if (!this.pendingRdfaPatternCopies[copyTargetPatternId]) {\n this.pendingRdfaPatternCopies[copyTargetPatternId] = [];\n }\n this.pendingRdfaPatternCopies[copyTargetPatternId].push(parentTag);\n }\n return;\n }\n }\n // tags override the baseIRI of the whole document\n if (this.features.baseTag && name === 'base' && attributes.href) {\n this.util.baseIRI = this.util.getBaseIRI(attributes.href);\n }\n // xml:base attributes override the baseIRI of the current tag and children\n if (this.features.xmlBase && attributes['xml:base']) {\n activeTag.localBaseIRI = this.util.getBaseIRI(attributes['xml:base']);\n }\n //