diff --git a/assets/index-4449f3af.js b/assets/index-88709a98.js similarity index 94% rename from assets/index-4449f3af.js rename to assets/index-88709a98.js index 09a3f5f..a2bc2d2 100644 --- a/assets/index-4449f3af.js +++ b/assets/index-88709a98.js @@ -1,15 +1,15 @@ -var _$=Object.defineProperty;var g$=(t,e,r)=>e in t?_$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var $r=(t,e,r)=>(g$(t,typeof e!="symbol"?e+"":e,r),r),G3=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var fe=(t,e,r)=>(G3(t,e,"read from private field"),r?r.call(t):e.get(t)),wt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ut=(t,e,r,n)=>(G3(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Sy=(t,e,r,n)=>({set _(a){ut(t,e,a,r)},get _(){return fe(t,e,n)}}),it=(t,e,r)=>(G3(t,e,"access private method"),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(a){if(a.ep)return;a.ep=!0;const s=r(a);fetch(a.href,s)}})();function mO(t,e){const r=Object.create(null),n=t.split(",");for(let a=0;a!!r[a.toLowerCase()]:a=>!!r[a]}const Tr={},md=[],rs=()=>{},m$=()=>!1,v$=/^on[^a-z]/,qb=t=>v$.test(t),vO=t=>t.startsWith("onUpdate:"),On=Object.assign,wO=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},w$=Object.prototype.hasOwnProperty,qt=(t,e)=>w$.call(t,e),bt=Array.isArray,vd=t=>Vb(t)==="[object Map]",c8=t=>Vb(t)==="[object Set]",St=t=>typeof t=="function",tn=t=>typeof t=="string",SO=t=>typeof t=="symbol",Fr=t=>t!==null&&typeof t=="object",l8=t=>Fr(t)&&St(t.then)&&St(t.catch),d8=Object.prototype.toString,Vb=t=>d8.call(t),S$=t=>Vb(t).slice(8,-1),f8=t=>Vb(t)==="[object Object]",TO=t=>tn(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,M1=mO(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Hb=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},T$=/-(\w)/g,Vs=Hb(t=>t.replace(T$,(e,r)=>r?r.toUpperCase():"")),E$=/\B([A-Z])/g,rf=Hb(t=>t.replace(E$,"-$1").toLowerCase()),kb=Hb(t=>t.charAt(0).toUpperCase()+t.slice(1)),z3=Hb(t=>t?`on${kb(t)}`:""),ip=(t,e)=>!Object.is(t,e),W3=(t,e)=>{for(let r=0;r{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r})},O$=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let Qx;const YT=()=>Qx||(Qx=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function xu(t){if(bt(t)){const e={};for(let r=0;r{if(r){const n=r.split(R$);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Tn(t){let e="";if(tn(t))e=t;else if(bt(t))for(let r=0;rtn(t)?t:t==null?"":bt(t)||Fr(t)&&(t.toString===d8||!St(t.toString))?JSON.stringify(t,p8,2):String(t),p8=(t,e)=>e&&e.__v_isRef?p8(t,e.value):vd(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,a])=>(r[`${n} =>`]=a,r),{})}:c8(e)?{[`Set(${e.size})`]:[...e.values()]}:Fr(e)&&!bt(e)&&!f8(e)?String(e):e;let Ha;class N${constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Ha,!e&&Ha&&(this.index=(Ha.scopes||(Ha.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const r=Ha;try{return Ha=this,e()}finally{Ha=r}}}on(){Ha=this}off(){Ha=this.parent}stop(e){if(this._active){let r,n;for(r=0,n=this.effects.length;r{const e=new Set(t);return e.w=0,e.n=0,e},y8=t=>(t.w&qu)>0,b8=t=>(t.n&qu)>0,M$=({deps:t})=>{if(t.length)for(let e=0;e{const{deps:e}=t;if(e.length){let r=0;for(let n=0;n{(d==="length"||d>=c)&&u.push(l)})}else switch(r!==void 0&&u.push(o.get(r)),e){case"add":bt(t)?TO(r)&&u.push(o.get("length")):(u.push(o.get(Wc)),vd(t)&&u.push(o.get(tE)));break;case"delete":bt(t)||(u.push(o.get(Wc)),vd(t)&&u.push(o.get(tE)));break;case"set":vd(t)&&u.push(o.get(Wc));break}if(u.length===1)u[0]&&rE(u[0]);else{const c=[];for(const l of u)l&&c.push(...l);rE(EO(c))}}function rE(t,e){const r=bt(t)?t:[...t];for(const n of r)n.computed&&zx(n);for(const n of r)n.computed||zx(n)}function zx(t,e){(t!==Ya||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const L$=mO("__proto__,__v_isRef,__isVue"),m8=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(SO)),B$=AO(),$$=AO(!1,!0),U$=AO(!0),Wx=q$();function q$(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...r){const n=Wt(this);for(let s=0,o=this.length;s{t[e]=function(...r){nf();const n=Wt(this)[e].apply(this,r);return af(),n}}),t}function V$(t){const e=Wt(this);return Ui(e,"has",t),e.hasOwnProperty(t)}function AO(t=!1,e=!1){return function(n,a,s){if(a==="__v_isReactive")return!t;if(a==="__v_isReadonly")return t;if(a==="__v_isShallow")return e;if(a==="__v_raw"&&s===(t?e?iU:E8:e?T8:S8).get(n))return n;const o=bt(n);if(!t){if(o&&qt(Wx,a))return Reflect.get(Wx,a,s);if(a==="hasOwnProperty")return V$}const u=Reflect.get(n,a,s);return(SO(a)?m8.has(a):L$(a))||(t||Ui(n,"get",a),e)?u:Zn(u)?o&&TO(a)?u:u.value:Fr(u)?t?A8(u):Gb(u):u}}const H$=v8(),k$=v8(!0);function v8(t=!1){return function(r,n,a,s){let o=r[n];if(Pd(o)&&Zn(o)&&!Zn(a))return!1;if(!t&&(!sb(a)&&!Pd(a)&&(o=Wt(o),a=Wt(a)),!bt(r)&&Zn(o)&&!Zn(a)))return o.value=a,!0;const u=bt(r)&&TO(n)?Number(n)t,Qb=t=>Reflect.getPrototypeOf(t);function Ty(t,e,r=!1,n=!1){t=t.__v_raw;const a=Wt(t),s=Wt(e);r||(e!==s&&Ui(a,"get",e),Ui(a,"get",s));const{has:o}=Qb(a),u=n?RO:r?PO:ap;if(o.call(a,e))return u(t.get(e));if(o.call(a,s))return u(t.get(s));t!==a&&t.get(e)}function Ey(t,e=!1){const r=this.__v_raw,n=Wt(r),a=Wt(t);return e||(t!==a&&Ui(n,"has",t),Ui(n,"has",a)),t===a?r.has(t):r.has(t)||r.has(a)}function Oy(t,e=!1){return t=t.__v_raw,!e&&Ui(Wt(t),"iterate",Wc),Reflect.get(t,"size",t)}function Xx(t){t=Wt(t);const e=Wt(this);return Qb(e).has.call(e,t)||(e.add(t),Fo(e,"add",t,t)),this}function Kx(t,e){e=Wt(e);const r=Wt(this),{has:n,get:a}=Qb(r);let s=n.call(r,t);s||(t=Wt(t),s=n.call(r,t));const o=a.call(r,t);return r.set(t,e),s?ip(e,o)&&Fo(r,"set",t,e):Fo(r,"add",t,e),this}function Jx(t){const e=Wt(this),{has:r,get:n}=Qb(e);let a=r.call(e,t);a||(t=Wt(t),a=r.call(e,t)),n&&n.call(e,t);const s=e.delete(t);return a&&Fo(e,"delete",t,void 0),s}function Yx(){const t=Wt(this),e=t.size!==0,r=t.clear();return e&&Fo(t,"clear",void 0,void 0),r}function Ay(t,e){return function(n,a){const s=this,o=s.__v_raw,u=Wt(o),c=e?RO:t?PO:ap;return!t&&Ui(u,"iterate",Wc),o.forEach((l,d)=>n.call(a,c(l),c(d),s))}}function Ry(t,e,r){return function(...n){const a=this.__v_raw,s=Wt(a),o=vd(s),u=t==="entries"||t===Symbol.iterator&&o,c=t==="keys"&&o,l=a[t](...n),d=r?RO:e?PO:ap;return!e&&Ui(s,"iterate",c?tE:Wc),{next(){const{value:f,done:h}=l.next();return h?{value:f,done:h}:{value:u?[d(f[0]),d(f[1])]:d(f),done:h}},[Symbol.iterator](){return this}}}}function su(t){return function(...e){return t==="delete"?!1:this}}function K$(){const t={get(s){return Ty(this,s)},get size(){return Oy(this)},has:Ey,add:Xx,set:Kx,delete:Jx,clear:Yx,forEach:Ay(!1,!1)},e={get(s){return Ty(this,s,!1,!0)},get size(){return Oy(this)},has:Ey,add:Xx,set:Kx,delete:Jx,clear:Yx,forEach:Ay(!1,!0)},r={get(s){return Ty(this,s,!0)},get size(){return Oy(this,!0)},has(s){return Ey.call(this,s,!0)},add:su("add"),set:su("set"),delete:su("delete"),clear:su("clear"),forEach:Ay(!0,!1)},n={get(s){return Ty(this,s,!0,!0)},get size(){return Oy(this,!0)},has(s){return Ey.call(this,s,!0)},add:su("add"),set:su("set"),delete:su("delete"),clear:su("clear"),forEach:Ay(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=Ry(s,!1,!1),r[s]=Ry(s,!0,!1),e[s]=Ry(s,!1,!0),n[s]=Ry(s,!0,!0)}),[t,r,e,n]}const[J$,Y$,Z$,eU]=K$();function xO(t,e){const r=e?t?eU:Z$:t?Y$:J$;return(n,a,s)=>a==="__v_isReactive"?!t:a==="__v_isReadonly"?t:a==="__v_raw"?n:Reflect.get(qt(r,a)&&a in n?r:n,a,s)}const tU={get:xO(!1,!1)},rU={get:xO(!1,!0)},nU={get:xO(!0,!1)},S8=new WeakMap,T8=new WeakMap,E8=new WeakMap,iU=new WeakMap;function aU(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function sU(t){return t.__v_skip||!Object.isExtensible(t)?0:aU(S$(t))}function Gb(t){return Pd(t)?t:IO(t,!1,w8,tU,S8)}function O8(t){return IO(t,!1,X$,rU,T8)}function A8(t){return IO(t,!0,W$,nU,E8)}function IO(t,e,r,n,a){if(!Fr(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=a.get(t);if(s)return s;const o=sU(t);if(o===0)return t;const u=new Proxy(t,o===2?n:r);return a.set(t,u),u}function wd(t){return Pd(t)?wd(t.__v_raw):!!(t&&t.__v_isReactive)}function Pd(t){return!!(t&&t.__v_isReadonly)}function sb(t){return!!(t&&t.__v_isShallow)}function R8(t){return wd(t)||Pd(t)}function Wt(t){const e=t&&t.__v_raw;return e?Wt(e):t}function x8(t){return ab(t,"__v_skip",!0),t}const ap=t=>Fr(t)?Gb(t):t,PO=t=>Fr(t)?A8(t):t;function I8(t){Cu&&Ya&&(t=Wt(t),g8(t.dep||(t.dep=EO())))}function P8(t,e){t=Wt(t);const r=t.dep;r&&rE(r)}function Zn(t){return!!(t&&t.__v_isRef===!0)}function pi(t){return D8(t,!1)}function oU(t){return D8(t,!0)}function D8(t,e){return Zn(t)?t:new uU(t,e)}class uU{constructor(e,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?e:Wt(e),this._value=r?e:ap(e)}get value(){return I8(this),this._value}set value(e){const r=this.__v_isShallow||sb(e)||Pd(e);e=r?e:Wt(e),ip(e,this._rawValue)&&(this._rawValue=e,this._value=r?e:ap(e),P8(this))}}function Dt(t){return Zn(t)?t.value:t}const cU={get:(t,e,r)=>Dt(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const a=t[e];return Zn(a)&&!Zn(r)?(a.value=r,!0):Reflect.set(t,e,r,n)}};function N8(t){return wd(t)?t:new Proxy(t,cU)}class lU{constructor(e,r,n,a){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new OO(e,()=>{this._dirty||(this._dirty=!0,P8(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!a,this.__v_isReadonly=n}get value(){const e=Wt(this);return I8(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function dU(t,e,r=!1){let n,a;const s=St(t);return s?(n=t,a=rs):(n=t.get,a=t.set),new lU(n,a,s||!a,r)}function ju(t,e,r,n){let a;try{a=n?t(...n):t()}catch(s){zb(s,e,r)}return a}function ns(t,e,r,n){if(St(t)){const s=ju(t,e,r,n);return s&&l8(s)&&s.catch(o=>{zb(o,e,r)}),s}const a=[];for(let s=0;s>>1;op(Yn[n])Is&&Yn.splice(e,1)}function yU(t){bt(t)?Sd.push(...t):(!go||!go.includes(t,t.allowRecurse?Cc+1:Cc))&&Sd.push(t),M8()}function Zx(t,e=sp?Is+1:0){for(;eop(r)-op(n)),Cc=0;Cct.id==null?1/0:t.id,bU=(t,e)=>{const r=op(t)-op(e);if(r===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return r};function L8(t){nE=!1,sp=!0,Yn.sort(bU);const e=rs;try{for(Is=0;Istn(p)?p.trim():p)),f&&(a=r.map(O$))}let u,c=n[u=z3(e)]||n[u=z3(Vs(e))];!c&&s&&(c=n[u=z3(rf(e))]),c&&ns(c,t,6,a);const l=n[u+"Once"];if(l){if(!t.emitted)t.emitted={};else if(t.emitted[u])return;t.emitted[u]=!0,ns(l,t,6,a)}}function B8(t,e,r=!1){const n=e.emitsCache,a=n.get(t);if(a!==void 0)return a;const s=t.emits;let o={},u=!1;if(!St(t)){const c=l=>{const d=B8(l,e,!0);d&&(u=!0,On(o,d))};!r&&e.mixins.length&&e.mixins.forEach(c),t.extends&&c(t.extends),t.mixins&&t.mixins.forEach(c)}return!s&&!u?(Fr(t)&&n.set(t,null),null):(bt(s)?s.forEach(c=>o[c]=null):On(o,s),Fr(t)&&n.set(t,o),o)}function Wb(t,e){return!t||!qb(e)?!1:(e=e.slice(2).replace(/Once$/,""),qt(t,e[0].toLowerCase()+e.slice(1))||qt(t,rf(e))||qt(t,e))}let Fn=null,Xb=null;function ob(t){const e=Fn;return Fn=t,Xb=t&&t.type.__scopeId||null,e}function gU(t){Xb=t}function mU(){Xb=null}function Hr(t,e=Fn,r){if(!e||t._n)return t;const n=(...a)=>{n._d&&dI(-1);const s=ob(e);let o;try{o=t(...a)}finally{ob(s),n._d&&dI(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function X3(t){const{type:e,vnode:r,proxy:n,withProxy:a,props:s,propsOptions:[o],slots:u,attrs:c,emit:l,render:d,renderCache:f,data:h,setupState:p,ctx:b,inheritAttrs:_}=t;let E,w;const O=ob(t);try{if(r.shapeFlag&4){const T=a||n;E=Rs(d.call(T,T,f,s,p,h,b)),w=c}else{const T=e;E=Rs(T.length>1?T(s,{attrs:c,slots:u,emit:l}):T(s,null)),w=e.props?c:vU(c)}}catch(T){zh.length=0,zb(T,t,1),E=dr(Vu)}let A=E;if(w&&_!==!1){const T=Object.keys(w),{shapeFlag:I}=A;T.length&&I&7&&(o&&T.some(vO)&&(w=wU(w,o)),A=Dd(A,w))}return r.dirs&&(A=Dd(A),A.dirs=A.dirs?A.dirs.concat(r.dirs):r.dirs),r.transition&&(A.transition=r.transition),E=A,ob(O),E}const vU=t=>{let e;for(const r in t)(r==="class"||r==="style"||qb(r))&&((e||(e={}))[r]=t[r]);return e},wU=(t,e)=>{const r={};for(const n in t)(!vO(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function SU(t,e,r){const{props:n,children:a,component:s}=t,{props:o,children:u,patchFlag:c}=e,l=s.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&c>=0){if(c&1024)return!0;if(c&16)return n?eI(n,o,l):!!o;if(c&8){const d=e.dynamicProps;for(let f=0;ft.__isSuspense;function OU(t,e){e&&e.pendingBranch?bt(t)?e.effects.push(...t):e.effects.push(t):yU(t)}function $8(t,e){return CO(t,null,e)}const xy={};function Td(t,e,r){return CO(t,e,r)}function CO(t,e,{immediate:r,deep:n,flush:a,onTrack:s,onTrigger:o}=Tr){var u;const c=j$()===((u=En)==null?void 0:u.scope)?En:null;let l,d=!1,f=!1;if(Zn(t)?(l=()=>t.value,d=sb(t)):wd(t)?(l=()=>t,n=!0):bt(t)?(f=!0,d=t.some(T=>wd(T)||sb(T)),l=()=>t.map(T=>{if(Zn(T))return T.value;if(wd(T))return Vc(T);if(St(T))return ju(T,c,2)})):St(t)?e?l=()=>ju(t,c,2):l=()=>{if(!(c&&c.isUnmounted))return h&&h(),ns(t,c,3,[p])}:l=rs,e&&n){const T=l;l=()=>Vc(T())}let h,p=T=>{h=O.onStop=()=>{ju(T,c,4)}},b;if(cp)if(p=rs,e?r&&ns(e,c,3,[l(),f?[]:void 0,p]):l(),a==="sync"){const T=yq();b=T.__watcherHandles||(T.__watcherHandles=[])}else return rs;let _=f?new Array(t.length).fill(xy):xy;const E=()=>{if(O.active)if(e){const T=O.run();(n||d||(f?T.some((I,D)=>ip(I,_[D])):ip(T,_)))&&(h&&h(),ns(e,c,3,[T,_===xy?void 0:f&&_[0]===xy?[]:_,p]),_=T)}else O.run()};E.allowRecurse=!!e;let w;a==="sync"?w=E:a==="post"?w=()=>ji(E,c&&c.suspense):(E.pre=!0,c&&(E.id=c.uid),w=()=>NO(E));const O=new OO(l,w);e?r?E():_=O.run():a==="post"?ji(O.run.bind(O),c&&c.suspense):O.run();const A=()=>{O.stop(),c&&c.scope&&wO(c.scope.effects,O)};return b&&b.push(A),A}function AU(t,e,r){const n=this.proxy,a=tn(t)?t.includes(".")?U8(n,t):()=>n[t]:t.bind(n,n);let s;St(e)?s=e:(s=e.handler,r=e);const o=En;Nd(this);const u=CO(a,s.bind(n),r);return o?Nd(o):Xc(),u}function U8(t,e){const r=e.split(".");return()=>{let n=t;for(let a=0;a{Vc(r,e)});else if(f8(t))for(const r in t)Vc(t[r],e);return t}function ub(t,e){const r=Fn;if(r===null)return t;const n=Zb(r)||r.proxy,a=t.dirs||(t.dirs=[]);for(let s=0;sOn({name:t.name},e,{setup:t}))():t}const Qh=t=>!!t.type.__asyncLoader,q8=t=>t.type.__isKeepAlive;function RU(t,e){V8(t,"a",e)}function xU(t,e){V8(t,"da",e)}function V8(t,e,r=En){const n=t.__wdc||(t.__wdc=()=>{let a=r;for(;a;){if(a.isDeactivated)return;a=a.parent}return t()});if(Kb(e,n,r),r){let a=r.parent;for(;a&&a.parent;)q8(a.parent.vnode)&&IU(n,e,r,a),a=a.parent}}function IU(t,e,r,n){const a=Kb(e,t,n,!0);jO(()=>{wO(n[e],a)},r)}function Kb(t,e,r=En,n=!1){if(r){const a=r[t]||(r[t]=[]),s=e.__weh||(e.__weh=(...o)=>{if(r.isUnmounted)return;nf(),Nd(r);const u=ns(e,r,t,o);return Xc(),af(),u});return n?a.unshift(s):a.push(s),s}}const Qo=t=>(e,r=En)=>(!cp||t==="sp")&&Kb(t,(...n)=>e(...n),r),PU=Qo("bm"),H8=Qo("m"),DU=Qo("bu"),k8=Qo("u"),NU=Qo("bum"),jO=Qo("um"),CU=Qo("sp"),jU=Qo("rtg"),MU=Qo("rtc");function FU(t,e=En){Kb("ec",t,e)}const MO="components";function bc(t,e){return G8(MO,t,!0,e)||t}const Q8=Symbol.for("v-ndc");function Go(t){return tn(t)?G8(MO,t,!1)||t:t||Q8}function G8(t,e,r=!0,n=!1){const a=Fn||En;if(a){const s=a.type;if(t===MO){const u=fq(s,!1);if(u&&(u===e||u===Vs(e)||u===kb(Vs(e))))return s}const o=tI(a[t]||s[t],e)||tI(a.appContext[t],e);return!o&&n?s:o}}function tI(t,e){return t&&(t[e]||t[Vs(e)]||t[kb(Vs(e))])}function rI(t,e,r,n){let a;const s=r&&r[n];if(bt(t)||tn(t)){a=new Array(t.length);for(let o=0,u=t.length;oe(o,u,void 0,s&&s[u]));else{const o=Object.keys(t);a=new Array(o.length);for(let u=0,c=o.length;udb(e)?!(e.type===Vu||e.type===Fi&&!z8(e.children)):!0)?t:null}const iE=t=>t?i5(t)?Zb(t)||t.proxy:iE(t.parent):null,Gh=On(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>iE(t.parent),$root:t=>iE(t.root),$emit:t=>t.emit,$options:t=>FO(t),$forceUpdate:t=>t.f||(t.f=()=>NO(t.update)),$nextTick:t=>t.n||(t.n=j8.bind(t.proxy)),$watch:t=>AU.bind(t)}),K3=(t,e)=>t!==Tr&&!t.__isScriptSetup&&qt(t,e),LU={get({_:t},e){const{ctx:r,setupState:n,data:a,props:s,accessCache:o,type:u,appContext:c}=t;let l;if(e[0]!=="$"){const p=o[e];if(p!==void 0)switch(p){case 1:return n[e];case 2:return a[e];case 4:return r[e];case 3:return s[e]}else{if(K3(n,e))return o[e]=1,n[e];if(a!==Tr&&qt(a,e))return o[e]=2,a[e];if((l=t.propsOptions[0])&&qt(l,e))return o[e]=3,s[e];if(r!==Tr&&qt(r,e))return o[e]=4,r[e];aE&&(o[e]=0)}}const d=Gh[e];let f,h;if(d)return e==="$attrs"&&Ui(t,"get",e),d(t);if((f=u.__cssModules)&&(f=f[e]))return f;if(r!==Tr&&qt(r,e))return o[e]=4,r[e];if(h=c.config.globalProperties,qt(h,e))return h[e]},set({_:t},e,r){const{data:n,setupState:a,ctx:s}=t;return K3(a,e)?(a[e]=r,!0):n!==Tr&&qt(n,e)?(n[e]=r,!0):qt(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:a,propsOptions:s}},o){let u;return!!r[o]||t!==Tr&&qt(t,o)||K3(e,o)||(u=s[0])&&qt(u,o)||qt(n,o)||qt(Gh,o)||qt(a.config.globalProperties,o)},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:qt(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};function BU(){return $U().attrs}function $U(){const t=uq();return t.setupContext||(t.setupContext=s5(t))}function nI(t){return bt(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}let aE=!0;function UU(t){const e=FO(t),r=t.proxy,n=t.ctx;aE=!1,e.beforeCreate&&iI(e.beforeCreate,t,"bc");const{data:a,computed:s,methods:o,watch:u,provide:c,inject:l,created:d,beforeMount:f,mounted:h,beforeUpdate:p,updated:b,activated:_,deactivated:E,beforeDestroy:w,beforeUnmount:O,destroyed:A,unmounted:T,render:I,renderTracked:D,renderTriggered:U,errorCaptured:H,serverPrefetch:N,expose:x,inheritAttrs:F,components:X,directives:ne,filters:$}=e;if(l&&qU(l,n,null),o)for(const se in o){const ie=o[se];St(ie)&&(n[se]=ie.bind(r))}if(a){const se=a.call(r,r);Fr(se)&&(t.data=Gb(se))}if(aE=!0,s)for(const se in s){const ie=s[se],be=St(ie)?ie.bind(r,r):St(ie.get)?ie.get.bind(r,r):rs,he=!St(ie)&&St(ie.set)?ie.set.bind(r):rs,Te=tr({get:be,set:he});Object.defineProperty(n,se,{enumerable:!0,configurable:!0,get:()=>Te.value,set:Ne=>Te.value=Ne})}if(u)for(const se in u)W8(u[se],n,r,se);if(c){const se=St(c)?c.call(r):c;Reflect.ownKeys(se).forEach(ie=>{F1(ie,se[ie])})}d&&iI(d,t,"c");function Q(se,ie){bt(ie)?ie.forEach(be=>se(be.bind(r))):ie&&se(ie.bind(r))}if(Q(PU,f),Q(H8,h),Q(DU,p),Q(k8,b),Q(RU,_),Q(xU,E),Q(FU,H),Q(MU,D),Q(jU,U),Q(NU,O),Q(jO,T),Q(CU,N),bt(x))if(x.length){const se=t.exposed||(t.exposed={});x.forEach(ie=>{Object.defineProperty(se,ie,{get:()=>r[ie],set:be=>r[ie]=be})})}else t.exposed||(t.exposed={});I&&t.render===rs&&(t.render=I),F!=null&&(t.inheritAttrs=F),X&&(t.components=X),ne&&(t.directives=ne)}function qU(t,e,r=rs){bt(t)&&(t=sE(t));for(const n in t){const a=t[n];let s;Fr(a)?"default"in a?s=as(a.from||n,a.default,!0):s=as(a.from||n):s=as(a),Zn(s)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[n]=s}}function iI(t,e,r){ns(bt(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function W8(t,e,r,n){const a=n.includes(".")?U8(r,n):()=>r[n];if(tn(t)){const s=e[t];St(s)&&Td(a,s)}else if(St(t))Td(a,t.bind(r));else if(Fr(t))if(bt(t))t.forEach(s=>W8(s,e,r,n));else{const s=St(t.handler)?t.handler.bind(r):e[t.handler];St(s)&&Td(a,s,t)}}function FO(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:a,optionsCache:s,config:{optionMergeStrategies:o}}=t.appContext,u=s.get(e);let c;return u?c=u:!a.length&&!r&&!n?c=e:(c={},a.length&&a.forEach(l=>cb(c,l,o,!0)),cb(c,e,o)),Fr(e)&&s.set(e,c),c}function cb(t,e,r,n=!1){const{mixins:a,extends:s}=e;s&&cb(t,s,r,!0),a&&a.forEach(o=>cb(t,o,r,!0));for(const o in e)if(!(n&&o==="expose")){const u=VU[o]||r&&r[o];t[o]=u?u(t[o],e[o]):e[o]}return t}const VU={data:aI,props:sI,emits:sI,methods:Oh,computed:Oh,beforeCreate:di,created:di,beforeMount:di,mounted:di,beforeUpdate:di,updated:di,beforeDestroy:di,beforeUnmount:di,destroyed:di,unmounted:di,activated:di,deactivated:di,errorCaptured:di,serverPrefetch:di,components:Oh,directives:Oh,watch:kU,provide:aI,inject:HU};function aI(t,e){return e?t?function(){return On(St(t)?t.call(this,this):t,St(e)?e.call(this,this):e)}:e:t}function HU(t,e){return Oh(sE(t),sE(e))}function sE(t){if(bt(t)){const e={};for(let r=0;r1)return r&&St(e)?e.call(n&&n.proxy):e}}function zU(t,e,r,n=!1){const a={},s={};ab(s,Yb,1),t.propsDefaults=Object.create(null),K8(t,e,a,s);for(const o in t.propsOptions[0])o in a||(a[o]=void 0);r?t.props=n?a:O8(a):t.type.props?t.props=a:t.props=s,t.attrs=s}function WU(t,e,r,n){const{props:a,attrs:s,vnode:{patchFlag:o}}=t,u=Wt(a),[c]=t.propsOptions;let l=!1;if((n||o>0)&&!(o&16)){if(o&8){const d=t.vnode.dynamicProps;for(let f=0;f{c=!0;const[h,p]=J8(f,e,!0);On(o,h),p&&u.push(...p)};!r&&e.mixins.length&&e.mixins.forEach(d),t.extends&&d(t.extends),t.mixins&&t.mixins.forEach(d)}if(!s&&!c)return Fr(t)&&n.set(t,md),md;if(bt(s))for(let d=0;d-1,p[1]=_<0||b<_,(b>-1||qt(p,"default"))&&u.push(f)}}}const l=[o,u];return Fr(t)&&n.set(t,l),l}function oI(t){return t[0]!=="$"}function uI(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function cI(t,e){return uI(t)===uI(e)}function lI(t,e){return bt(e)?e.findIndex(r=>cI(r,t)):St(e)&&cI(e,t)?0:-1}const Y8=t=>t[0]==="_"||t==="$stable",LO=t=>bt(t)?t.map(Rs):[Rs(t)],XU=(t,e,r)=>{if(e._n)return e;const n=Hr((...a)=>LO(e(...a)),r);return n._c=!1,n},Z8=(t,e,r)=>{const n=t._ctx;for(const a in t){if(Y8(a))continue;const s=t[a];if(St(s))e[a]=XU(a,s,n);else if(s!=null){const o=LO(s);e[a]=()=>o}}},e5=(t,e)=>{const r=LO(e);t.slots.default=()=>r},KU=(t,e)=>{if(t.vnode.shapeFlag&32){const r=e._;r?(t.slots=Wt(e),ab(e,"_",r)):Z8(e,t.slots={})}else t.slots={},e&&e5(t,e);ab(t.slots,Yb,1)},JU=(t,e,r)=>{const{vnode:n,slots:a}=t;let s=!0,o=Tr;if(n.shapeFlag&32){const u=e._;u?r&&u===1?s=!1:(On(a,e),!r&&u===1&&delete a._):(s=!e.$stable,Z8(e,a)),o=e}else e&&(e5(t,e),o={default:1});if(s)for(const u in a)!Y8(u)&&!(u in o)&&delete a[u]};function uE(t,e,r,n,a=!1){if(bt(t)){t.forEach((h,p)=>uE(h,e&&(bt(e)?e[p]:e),r,n,a));return}if(Qh(n)&&!a)return;const s=n.shapeFlag&4?Zb(n.component)||n.component.proxy:n.el,o=a?null:s,{i:u,r:c}=t,l=e&&e.r,d=u.refs===Tr?u.refs={}:u.refs,f=u.setupState;if(l!=null&&l!==c&&(tn(l)?(d[l]=null,qt(f,l)&&(f[l]=null)):Zn(l)&&(l.value=null)),St(c))ju(c,u,12,[o,d]);else{const h=tn(c),p=Zn(c);if(h||p){const b=()=>{if(t.f){const _=h?qt(f,c)?f[c]:d[c]:c.value;a?bt(_)&&wO(_,s):bt(_)?_.includes(s)||_.push(s):h?(d[c]=[s],qt(f,c)&&(f[c]=d[c])):(c.value=[s],t.k&&(d[t.k]=c.value))}else h?(d[c]=o,qt(f,c)&&(f[c]=o)):p&&(c.value=o,t.k&&(d[t.k]=o))};o?(b.id=-1,ji(b,r)):b()}}}const ji=OU;function YU(t){return ZU(t)}function ZU(t,e){const r=YT();r.__VUE__=!0;const{insert:n,remove:a,patchProp:s,createElement:o,createText:u,createComment:c,setText:l,setElementText:d,parentNode:f,nextSibling:h,setScopeId:p=rs,insertStaticContent:b}=t,_=(g,y,v,C=null,V=null,q=null,G=!1,Y=null,ee=!!y.dynamicChildren)=>{if(g===y)return;g&&!$f(g,y)&&(C=J(g),Ne(g,V,q,!0),g=null),y.patchFlag===-2&&(ee=!1,y.dynamicChildren=null);const{type:ae,ref:ve,shapeFlag:me}=y;switch(ae){case Jb:E(g,y,v,C);break;case Vu:w(g,y,v,C);break;case J3:g==null&&O(y,v,C,G);break;case Fi:X(g,y,v,C,V,q,G,Y,ee);break;default:me&1?I(g,y,v,C,V,q,G,Y,ee):me&6?ne(g,y,v,C,V,q,G,Y,ee):(me&64||me&128)&&ae.process(g,y,v,C,V,q,G,Y,ee,pe)}ve!=null&&V&&uE(ve,g&&g.ref,q,y||g,!y)},E=(g,y,v,C)=>{if(g==null)n(y.el=u(y.children),v,C);else{const V=y.el=g.el;y.children!==g.children&&l(V,y.children)}},w=(g,y,v,C)=>{g==null?n(y.el=c(y.children||""),v,C):y.el=g.el},O=(g,y,v,C)=>{[g.el,g.anchor]=b(g.children,y,v,C,g.el,g.anchor)},A=({el:g,anchor:y},v,C)=>{let V;for(;g&&g!==y;)V=h(g),n(g,v,C),g=V;n(y,v,C)},T=({el:g,anchor:y})=>{let v;for(;g&&g!==y;)v=h(g),a(g),g=v;a(y)},I=(g,y,v,C,V,q,G,Y,ee)=>{G=G||y.type==="svg",g==null?D(y,v,C,V,q,G,Y,ee):N(g,y,V,q,G,Y,ee)},D=(g,y,v,C,V,q,G,Y)=>{let ee,ae;const{type:ve,props:me,shapeFlag:Ee,transition:k,dirs:W}=g;if(ee=g.el=o(g.type,q,me&&me.is,me),Ee&8?d(ee,g.children):Ee&16&&H(g.children,ee,null,C,V,q&&ve!=="foreignObject",G,Y),W&&yc(g,null,C,"created"),U(ee,g,g.scopeId,G,C),me){for(const S in me)S!=="value"&&!M1(S)&&s(ee,S,null,me[S],q,g.children,C,V,oe);"value"in me&&s(ee,"value",null,me.value),(ae=me.onVnodeBeforeMount)&&gs(ae,C,g)}W&&yc(g,null,C,"beforeMount");const M=(!V||V&&!V.pendingBranch)&&k&&!k.persisted;M&&k.beforeEnter(ee),n(ee,y,v),((ae=me&&me.onVnodeMounted)||M||W)&&ji(()=>{ae&&gs(ae,C,g),M&&k.enter(ee),W&&yc(g,null,C,"mounted")},V)},U=(g,y,v,C,V)=>{if(v&&p(g,v),C)for(let q=0;q{for(let ae=ee;ae{const Y=y.el=g.el;let{patchFlag:ee,dynamicChildren:ae,dirs:ve}=y;ee|=g.patchFlag&16;const me=g.props||Tr,Ee=y.props||Tr;let k;v&&_c(v,!1),(k=Ee.onVnodeBeforeUpdate)&&gs(k,v,y,g),ve&&yc(y,g,v,"beforeUpdate"),v&&_c(v,!0);const W=V&&y.type!=="foreignObject";if(ae?x(g.dynamicChildren,ae,Y,v,C,W,q):G||ie(g,y,Y,null,v,C,W,q,!1),ee>0){if(ee&16)F(Y,y,me,Ee,v,C,V);else if(ee&2&&me.class!==Ee.class&&s(Y,"class",null,Ee.class,V),ee&4&&s(Y,"style",me.style,Ee.style,V),ee&8){const M=y.dynamicProps;for(let S=0;S{k&&gs(k,v,y,g),ve&&yc(y,g,v,"updated")},C)},x=(g,y,v,C,V,q,G)=>{for(let Y=0;Y{if(v!==C){if(v!==Tr)for(const Y in v)!M1(Y)&&!(Y in C)&&s(g,Y,v[Y],null,G,y.children,V,q,oe);for(const Y in C){if(M1(Y))continue;const ee=C[Y],ae=v[Y];ee!==ae&&Y!=="value"&&s(g,Y,ae,ee,G,y.children,V,q,oe)}"value"in C&&s(g,"value",v.value,C.value)}},X=(g,y,v,C,V,q,G,Y,ee)=>{const ae=y.el=g?g.el:u(""),ve=y.anchor=g?g.anchor:u("");let{patchFlag:me,dynamicChildren:Ee,slotScopeIds:k}=y;k&&(Y=Y?Y.concat(k):k),g==null?(n(ae,v,C),n(ve,v,C),H(y.children,v,ve,V,q,G,Y,ee)):me>0&&me&64&&Ee&&g.dynamicChildren?(x(g.dynamicChildren,Ee,v,V,q,G,Y),(y.key!=null||V&&y===V.subTree)&&t5(g,y,!0)):ie(g,y,v,ve,V,q,G,Y,ee)},ne=(g,y,v,C,V,q,G,Y,ee)=>{y.slotScopeIds=Y,g==null?y.shapeFlag&512?V.ctx.activate(y,v,C,G,ee):$(y,v,C,V,q,G,ee):j(g,y,ee)},$=(g,y,v,C,V,q,G)=>{const Y=g.component=oq(g,C,V);if(q8(g)&&(Y.ctx.renderer=pe),cq(Y),Y.asyncDep){if(V&&V.registerDep(Y,Q),!g.el){const ee=Y.subTree=dr(Vu);w(null,ee,y,v)}return}Q(Y,g,y,v,V,q,G)},j=(g,y,v)=>{const C=y.component=g.component;if(SU(g,y,v))if(C.asyncDep&&!C.asyncResolved){se(C,y,v);return}else C.next=y,pU(C.update),C.update();else y.el=g.el,C.vnode=y},Q=(g,y,v,C,V,q,G)=>{const Y=()=>{if(g.isMounted){let{next:ve,bu:me,u:Ee,parent:k,vnode:W}=g,M=ve,S;_c(g,!1),ve?(ve.el=W.el,se(g,ve,G)):ve=W,me&&W3(me),(S=ve.props&&ve.props.onVnodeBeforeUpdate)&&gs(S,k,ve,W),_c(g,!0);const R=X3(g),z=g.subTree;g.subTree=R,_(z,R,f(z.el),J(z),g,V,q),ve.el=R.el,M===null&&TU(g,R.el),Ee&&ji(Ee,V),(S=ve.props&&ve.props.onVnodeUpdated)&&ji(()=>gs(S,k,ve,W),V)}else{let ve;const{el:me,props:Ee}=y,{bm:k,m:W,parent:M}=g,S=Qh(y);if(_c(g,!1),k&&W3(k),!S&&(ve=Ee&&Ee.onVnodeBeforeMount)&&gs(ve,M,y),_c(g,!0),me&&P){const R=()=>{g.subTree=X3(g),P(me,g.subTree,g,V,null)};S?y.type.__asyncLoader().then(()=>!g.isUnmounted&&R()):R()}else{const R=g.subTree=X3(g);_(null,R,v,C,g,V,q),y.el=R.el}if(W&&ji(W,V),!S&&(ve=Ee&&Ee.onVnodeMounted)){const R=y;ji(()=>gs(ve,M,R),V)}(y.shapeFlag&256||M&&Qh(M.vnode)&&M.vnode.shapeFlag&256)&&g.a&&ji(g.a,V),g.isMounted=!0,y=v=C=null}},ee=g.effect=new OO(Y,()=>NO(ae),g.scope),ae=g.update=()=>ee.run();ae.id=g.uid,_c(g,!0),ae()},se=(g,y,v)=>{y.component=g;const C=g.vnode.props;g.vnode=y,g.next=null,WU(g,y.props,C,v),JU(g,y.children,v),nf(),Zx(),af()},ie=(g,y,v,C,V,q,G,Y,ee=!1)=>{const ae=g&&g.children,ve=g?g.shapeFlag:0,me=y.children,{patchFlag:Ee,shapeFlag:k}=y;if(Ee>0){if(Ee&128){he(ae,me,v,C,V,q,G,Y,ee);return}else if(Ee&256){be(ae,me,v,C,V,q,G,Y,ee);return}}k&8?(ve&16&&oe(ae,V,q),me!==ae&&d(v,me)):ve&16?k&16?he(ae,me,v,C,V,q,G,Y,ee):oe(ae,V,q,!0):(ve&8&&d(v,""),k&16&&H(me,v,C,V,q,G,Y,ee))},be=(g,y,v,C,V,q,G,Y,ee)=>{g=g||md,y=y||md;const ae=g.length,ve=y.length,me=Math.min(ae,ve);let Ee;for(Ee=0;Eeve?oe(g,V,q,!0,!1,me):H(y,v,C,V,q,G,Y,ee,me)},he=(g,y,v,C,V,q,G,Y,ee)=>{let ae=0;const ve=y.length;let me=g.length-1,Ee=ve-1;for(;ae<=me&&ae<=Ee;){const k=g[ae],W=y[ae]=ee?mu(y[ae]):Rs(y[ae]);if($f(k,W))_(k,W,v,null,V,q,G,Y,ee);else break;ae++}for(;ae<=me&&ae<=Ee;){const k=g[me],W=y[Ee]=ee?mu(y[Ee]):Rs(y[Ee]);if($f(k,W))_(k,W,v,null,V,q,G,Y,ee);else break;me--,Ee--}if(ae>me){if(ae<=Ee){const k=Ee+1,W=kEe)for(;ae<=me;)Ne(g[ae],V,q,!0),ae++;else{const k=ae,W=ae,M=new Map;for(ae=W;ae<=Ee;ae++){const Ue=y[ae]=ee?mu(y[ae]):Rs(y[ae]);Ue.key!=null&&M.set(Ue.key,ae)}let S,R=0;const z=Ee-W+1;let ue=!1,ge=0;const we=new Array(z);for(ae=0;ae=z){Ne(Ue,V,q,!0);continue}let Ge;if(Ue.key!=null)Ge=M.get(Ue.key);else for(S=W;S<=Ee;S++)if(we[S-W]===0&&$f(Ue,y[S])){Ge=S;break}Ge===void 0?Ne(Ue,V,q,!0):(we[Ge-W]=ae+1,Ge>=ge?ge=Ge:ue=!0,_(Ue,y[Ge],v,null,V,q,G,Y,ee),R++)}const Me=ue?eq(we):md;for(S=Me.length-1,ae=z-1;ae>=0;ae--){const Ue=W+ae,Ge=y[Ue],We=Ue+1{const{el:q,type:G,transition:Y,children:ee,shapeFlag:ae}=g;if(ae&6){Te(g.component.subTree,y,v,C);return}if(ae&128){g.suspense.move(y,v,C);return}if(ae&64){G.move(g,y,v,pe);return}if(G===Fi){n(q,y,v);for(let me=0;meY.enter(q),V);else{const{leave:me,delayLeave:Ee,afterLeave:k}=Y,W=()=>n(q,y,v),M=()=>{me(q,()=>{W(),k&&k()})};Ee?Ee(q,W,M):M()}else n(q,y,v)},Ne=(g,y,v,C=!1,V=!1)=>{const{type:q,props:G,ref:Y,children:ee,dynamicChildren:ae,shapeFlag:ve,patchFlag:me,dirs:Ee}=g;if(Y!=null&&uE(Y,null,v,g,!0),ve&256){y.ctx.deactivate(g);return}const k=ve&1&&Ee,W=!Qh(g);let M;if(W&&(M=G&&G.onVnodeBeforeUnmount)&&gs(M,y,g),ve&6)Re(g.component,v,C);else{if(ve&128){g.suspense.unmount(v,C);return}k&&yc(g,null,y,"beforeUnmount"),ve&64?g.type.remove(g,y,v,V,pe,C):ae&&(q!==Fi||me>0&&me&64)?oe(ae,y,v,!1,!0):(q===Fi&&me&384||!V&&ve&16)&&oe(ee,y,v),C&&ye(g)}(W&&(M=G&&G.onVnodeUnmounted)||k)&&ji(()=>{M&&gs(M,y,g),k&&yc(g,null,y,"unmounted")},v)},ye=g=>{const{type:y,el:v,anchor:C,transition:V}=g;if(y===Fi){ce(v,C);return}if(y===J3){T(g);return}const q=()=>{a(v),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(g.shapeFlag&1&&V&&!V.persisted){const{leave:G,delayLeave:Y}=V,ee=()=>G(v,q);Y?Y(g.el,q,ee):ee()}else q()},ce=(g,y)=>{let v;for(;g!==y;)v=h(g),a(g),g=v;a(y)},Re=(g,y,v)=>{const{bum:C,scope:V,update:q,subTree:G,um:Y}=g;C&&W3(C),V.stop(),q&&(q.active=!1,Ne(G,g,y,v)),Y&&ji(Y,y),ji(()=>{g.isUnmounted=!0},y),y&&y.pendingBranch&&!y.isUnmounted&&g.asyncDep&&!g.asyncResolved&&g.suspenseId===y.pendingId&&(y.deps--,y.deps===0&&y.resolve())},oe=(g,y,v,C=!1,V=!1,q=0)=>{for(let G=q;Gg.shapeFlag&6?J(g.component.subTree):g.shapeFlag&128?g.suspense.next():h(g.anchor||g.el),le=(g,y,v)=>{g==null?y._vnode&&Ne(y._vnode,null,null,!0):_(y._vnode||null,g,y,null,null,null,v),Zx(),F8(),y._vnode=g},pe={p:_,um:Ne,m:Te,r:ye,mt:$,mc:H,pc:ie,pbc:x,n:J,o:t};let L,P;return e&&([L,P]=e(pe)),{render:le,hydrate:L,createApp:GU(le,L)}}function _c({effect:t,update:e},r){t.allowRecurse=e.allowRecurse=r}function t5(t,e,r=!1){const n=t.children,a=e.children;if(bt(n)&&bt(a))for(let s=0;s>1,t[r[u]]0&&(e[n]=r[s-1]),r[s]=n)}}for(s=r.length,o=r[s-1];s-- >0;)r[s]=o,o=e[o];return r}const tq=t=>t.__isTeleport,Fi=Symbol.for("v-fgt"),Jb=Symbol.for("v-txt"),Vu=Symbol.for("v-cmt"),J3=Symbol.for("v-stc"),zh=[];let ts=null;function Ot(t=!1){zh.push(ts=t?null:[])}function rq(){zh.pop(),ts=zh[zh.length-1]||null}let up=1;function dI(t){up+=t}function r5(t){return t.dynamicChildren=up>0?ts||md:null,rq(),up>0&&ts&&ts.push(t),t}function lr(t,e,r,n,a,s){return r5(Vt(t,e,r,n,a,s,!0))}function na(t,e,r,n,a){return r5(dr(t,e,r,n,a,!0))}function db(t){return t?t.__v_isVNode===!0:!1}function $f(t,e){return t.type===e.type&&t.key===e.key}const Yb="__vInternal",n5=({key:t})=>t??null,L1=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?tn(t)||Zn(t)||St(t)?{i:Fn,r:t,k:e,f:!!r}:t:null);function Vt(t,e=null,r=null,n=0,a=null,s=t===Fi?0:1,o=!1,u=!1){const c={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&n5(e),ref:e&&L1(e),scopeId:Xb,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:n,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:Fn};return u?(BO(c,r),s&128&&t.normalize(c)):r&&(c.shapeFlag|=tn(r)?8:16),up>0&&!o&&ts&&(c.patchFlag>0||s&6)&&c.patchFlag!==32&&ts.push(c),c}const dr=nq;function nq(t,e=null,r=null,n=0,a=null,s=!1){if((!t||t===Q8)&&(t=Vu),db(t)){const u=Dd(t,e,!0);return r&&BO(u,r),up>0&&!s&&ts&&(u.shapeFlag&6?ts[ts.indexOf(t)]=u:ts.push(u)),u.patchFlag|=-2,u}if(hq(t)&&(t=t.__vccOpts),e){e=iq(e);let{class:u,style:c}=e;u&&!tn(u)&&(e.class=Tn(u)),Fr(c)&&(R8(c)&&!bt(c)&&(c=On({},c)),e.style=xu(c))}const o=tn(t)?1:EU(t)?128:tq(t)?64:Fr(t)?4:St(t)?2:0;return Vt(t,e,r,n,a,o,s,!0)}function iq(t){return t?R8(t)||Yb in t?On({},t):t:null}function Dd(t,e,r=!1){const{props:n,ref:a,patchFlag:s,children:o}=t,u=e?cE(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:u,key:u&&n5(u),ref:e&&e.ref?r&&a?bt(a)?a.concat(L1(e)):[a,L1(e)]:L1(e):a,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Fi?s===-1?16:s|16:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Dd(t.ssContent),ssFallback:t.ssFallback&&Dd(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function td(t=" ",e=0){return dr(Jb,null,t,e)}function un(t="",e=!1){return e?(Ot(),na(Vu,null,t)):dr(Vu,null,t)}function Rs(t){return t==null||typeof t=="boolean"?dr(Vu):bt(t)?dr(Fi,null,t.slice()):typeof t=="object"?mu(t):dr(Jb,null,String(t))}function mu(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Dd(t)}function BO(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(bt(e))r=16;else if(typeof e=="object")if(n&65){const a=e.default;a&&(a._c&&(a._d=!1),BO(t,a()),a._c&&(a._d=!0));return}else{r=32;const a=e._;!a&&!(Yb in e)?e._ctx=Fn:a===3&&Fn&&(Fn.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else St(e)?(e={default:e,_ctx:Fn},r=32):(e=String(e),n&64?(r=16,e=[td(e)]):r=8);t.children=e,t.shapeFlag|=r}function cE(...t){const e={};for(let r=0;rEn||Fn;let $O,$l,fI="__VUE_INSTANCE_SETTERS__";($l=YT()[fI])||($l=YT()[fI]=[]),$l.push(t=>En=t),$O=t=>{$l.length>1?$l.forEach(e=>e(t)):$l[0](t)};const Nd=t=>{$O(t),t.scope.on()},Xc=()=>{En&&En.scope.off(),$O(null)};function i5(t){return t.vnode.shapeFlag&4}let cp=!1;function cq(t,e=!1){cp=e;const{props:r,children:n}=t.vnode,a=i5(t);zU(t,r,a,e),KU(t,n);const s=a?lq(t,e):void 0;return cp=!1,s}function lq(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=x8(new Proxy(t.ctx,LU));const{setup:n}=r;if(n){const a=t.setupContext=n.length>1?s5(t):null;Nd(t),nf();const s=ju(n,t,0,[t.props,a]);if(af(),Xc(),l8(s)){if(s.then(Xc,Xc),e)return s.then(o=>{hI(t,o,e)}).catch(o=>{zb(o,t,0)});t.asyncDep=s}else hI(t,s,e)}else a5(t,e)}function hI(t,e,r){St(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Fr(e)&&(t.setupState=N8(e)),a5(t,r)}let pI;function a5(t,e,r){const n=t.type;if(!t.render){if(!e&&pI&&!n.render){const a=n.template||FO(t).template;if(a){const{isCustomElement:s,compilerOptions:o}=t.appContext.config,{delimiters:u,compilerOptions:c}=n,l=On(On({isCustomElement:s,delimiters:u},o),c);n.render=pI(a,l)}}t.render=n.render||rs}Nd(t),nf(),UU(t),af(),Xc()}function dq(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(e,r){return Ui(t,"get","$attrs"),e[r]}}))}function s5(t){const e=r=>{t.exposed=r||{}};return{get attrs(){return dq(t)},slots:t.slots,emit:t.emit,expose:e}}function Zb(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(N8(x8(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in Gh)return Gh[r](t)},has(e,r){return r in e||r in Gh}}))}function fq(t,e=!0){return St(t)?t.displayName||t.name:t.name||e&&t.__name}function hq(t){return St(t)&&"__vccOpts"in t}const tr=(t,e)=>dU(t,e,cp);function o5(t,e,r){const n=arguments.length;return n===2?Fr(e)&&!bt(e)?db(e)?dr(t,null,[e]):dr(t,e):dr(t,null,e):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&db(r)&&(r=[r]),dr(t,e,r))}const pq=Symbol.for("v-scx"),yq=()=>as(pq),bq="3.3.4",_q="http://www.w3.org/2000/svg",jc=typeof document<"u"?document:null,yI=jc&&jc.createElement("template"),gq={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const a=e?jc.createElementNS(_q,t):jc.createElement(t,r?{is:r}:void 0);return t==="select"&&n&&n.multiple!=null&&a.setAttribute("multiple",n.multiple),a},createText:t=>jc.createTextNode(t),createComment:t=>jc.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>jc.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,a,s){const o=r?r.previousSibling:e.lastChild;if(a&&(a===s||a.nextSibling))for(;e.insertBefore(a.cloneNode(!0),r),!(a===s||!(a=a.nextSibling)););else{yI.innerHTML=n?`${t}`:t;const u=yI.content;if(n){const c=u.firstChild;for(;c.firstChild;)u.appendChild(c.firstChild);u.removeChild(c)}e.insertBefore(u,r)}return[o?o.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}};function mq(t,e,r){const n=t._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}function vq(t,e,r){const n=t.style,a=tn(r);if(r&&!a){if(e&&!tn(e))for(const s in e)r[s]==null&&lE(n,s,"");for(const s in r)lE(n,s,r[s])}else{const s=n.display;a?e!==r&&(n.cssText=r):e&&t.removeAttribute("style"),"_vod"in t&&(n.display=s)}}const bI=/\s*!important$/;function lE(t,e,r){if(bt(r))r.forEach(n=>lE(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=wq(t,e);bI.test(r)?t.setProperty(rf(n),r.replace(bI,""),"important"):t[n]=r}}const _I=["Webkit","Moz","ms"],Y3={};function wq(t,e){const r=Y3[e];if(r)return r;let n=Vs(e);if(n!=="filter"&&n in t)return Y3[e]=n;n=kb(n);for(let a=0;a<_I.length;a++){const s=_I[a]+n;if(s in t)return Y3[e]=s}return e}const gI="http://www.w3.org/1999/xlink";function Sq(t,e,r,n,a){if(n&&e.startsWith("xlink:"))r==null?t.removeAttributeNS(gI,e.slice(6,e.length)):t.setAttributeNS(gI,e,r);else{const s=D$(e);r==null||s&&!h8(r)?t.removeAttribute(e):t.setAttribute(e,s?"":r)}}function Tq(t,e,r,n,a,s,o){if(e==="innerHTML"||e==="textContent"){n&&o(n,a,s),t[e]=r??"";return}const u=t.tagName;if(e==="value"&&u!=="PROGRESS"&&!u.includes("-")){t._value=r;const l=u==="OPTION"?t.getAttribute("value"):t.value,d=r??"";l!==d&&(t.value=d),r==null&&t.removeAttribute(e);return}let c=!1;if(r===""||r==null){const l=typeof t[e];l==="boolean"?r=h8(r):r==null&&l==="string"?(r="",c=!0):l==="number"&&(r=0,c=!0)}try{t[e]=r}catch{}c&&t.removeAttribute(e)}function Eq(t,e,r,n){t.addEventListener(e,r,n)}function Oq(t,e,r,n){t.removeEventListener(e,r,n)}function Aq(t,e,r,n,a=null){const s=t._vei||(t._vei={}),o=s[e];if(n&&o)o.value=n;else{const[u,c]=Rq(e);if(n){const l=s[e]=Pq(n,a);Eq(t,u,l,c)}else o&&(Oq(t,u,o,c),s[e]=void 0)}}const mI=/(?:Once|Passive|Capture)$/;function Rq(t){let e;if(mI.test(t)){e={};let n;for(;n=t.match(mI);)t=t.slice(0,t.length-n[0].length),e[n[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):rf(t.slice(2)),e]}let Z3=0;const xq=Promise.resolve(),Iq=()=>Z3||(xq.then(()=>Z3=0),Z3=Date.now());function Pq(t,e){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;ns(Dq(n,r.value),e,5,[n])};return r.value=t,r.attached=Iq(),r}function Dq(t,e){if(bt(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(n=>a=>!a._stopped&&n&&n(a))}else return e}const vI=/^on[a-z]/,Nq=(t,e,r,n,a=!1,s,o,u,c)=>{e==="class"?mq(t,n,a):e==="style"?vq(t,r,n):qb(e)?vO(e)||Aq(t,e,r,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Cq(t,e,n,a))?Tq(t,e,n,s,o,u,c):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),Sq(t,e,n,a))};function Cq(t,e,r,n){return n?!!(e==="innerHTML"||e==="textContent"||e in t&&vI.test(e)&&St(r)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||vI.test(e)&&tn(r)?!1:e in t}const jq=On({patchProp:Nq},gq);let wI;function Mq(){return wI||(wI=YU(jq))}const Fq=(...t)=>{const e=Mq().createApp(...t),{mount:r}=e;return e.mount=n=>{const a=Lq(n);if(!a)return;const s=e._component;!St(s)&&!s.render&&!s.template&&(s.template=a.innerHTML),a.innerHTML="";const o=r(a,!1,a instanceof SVGElement);return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),o},e};function Lq(t){return tn(t)?document.querySelector(t):t}const Bq=["primary","secondary","success","danger","warning","info","light","dark"],$q="rgba({{color}}, 0.2) 0, rgba({{color}}, 0.3) 40%, rgba({{color}}, 0.4) 50%, rgba({{color}}, 0.5) 60%, rgba({{color}}, 0) 70%",Uq=[0,0,0],SI=.5,qq=t=>t&&Bq.includes(t.toLowerCase()),Vq=(t,e)=>{const r=s=>(s.length<7&&(s=`#${s[1]}${s[1]}${s[2]}${s[2]}${s[3]}${s[3]}`),[parseInt(s.substr(1,2),16),parseInt(s.substr(3,2),16),parseInt(s.substr(5,2),16)]),n=s=>{const o=document.body.appendChild(document.createElement("fictum")),u="rgb(1, 2, 3)";return o.style.color=u,o.style.color!==u||(o.style.color=s,o.style.color===u||o.style.color==="")?e:(s=getComputedStyle(o).color,document.body.removeChild(o),s)},a=s=>{const o=s.match(/[.\d]+/g);if(o===null)return;const u=o.map(c=>+Number(c));return u.length=3,u};return typeof t=="string"&&t.toLowerCase()==="transparent"?e:typeof t=="string"&&t[0]==="#"?r(t):(typeof t=="string"&&t.indexOf("rgb")===-1&&(t=n(t)),typeof t=="string"&&t.indexOf("rgb")===0?a(t):e)},Hq=({offsetX:t,offsetY:e,height:r,width:n})=>{const a=e<=r/2,s=t<=n/2,o=(f,h)=>Math.sqrt(f**2+h**2),u=e===r/2&&t===n/2,c={first:a===!0&&s===!1,second:a===!0&&s===!0,third:a===!1&&s===!0,fourth:a===!1&&s===!1},l={topLeft:o(t,e),topRight:o(n-t,e),bottomLeft:o(t,r-e),bottomRight:o(n-t,r-e)};let d=0;return u||c.fourth?d=l.topLeft:c.third?d=l.topRight:c.second?d=l.bottomRight:c.first&&(d=l.bottomLeft),d*2},kq=(t,e)=>{for(const r in e)t.style[r]=e[r]},Qq=t=>{const e=Vq(t,Uq);if(t!==""&&e){const r=e.join(",");return`radial-gradient(circle, ${$q.split("{{color}}").join(`${r}`)})`}},Gq=(t,e,r)=>{const n=document.createElement("div");n.classList.add("ripple-wave");const a={offsetX:r.centered?e.height/2:e.left,offsetY:r.centered?e.width/2:e.top,height:e.height,width:e.width},s=Hq(a),o=r.radius||s/2,u={delay:r.duration&&r.duration*SI,duration:r.duration&&r.duration-r.duration*SI},c={left:r.centered?`${Math.round(e.width/2-o)}px`:`${Math.round(e.left-o)}px`,top:r.centered?`${Math.round(e.height/2-o)}px`:`${Math.round(e.top-o)}px`,height:`${Math.round(r.radius&&r.radius*2||s)}px`,width:`${Math.round(r.radius&&r.radius*2||s)}px`,transitionDelay:`0s, ${u.delay}ms`,transitionDuration:`${r.duration}ms, ${u.duration}ms`};r.unbound&&t.classList.add("ripple-surface-unbound"),qq(r.color)?t.classList.add(`ripple-surface-${r.color}`):c.backgroundImage=Qq(r.color),kq(n,c),t.appendChild(n),setTimeout(()=>{n.classList.add("active")},50),setTimeout(()=>{t.removeChild(n)},r.duration?r.duration+1e3:1e3)},u5={mounted(t,e){if(e.value===!1)return;const r={centered:e.value&&e.value.centered||!1,color:e.value&&e.value.color||"",duration:e.value&&e.value.duration||500,radius:e.value&&e.value.radius||0,unbound:e.value&&e.value.unbound||!1};t.classList.add("ripple-surface"),t.waves=n=>{const a={top:n.layerY,left:n.layerX,height:t.offsetHeight,width:t.offsetWidth};Gq(t,a,r)},t.addEventListener("click",n=>t.waves(n))},updated(t){t.classList.contains("ripple-surface")||t.classList.add("ripple-surface")},unmounted(t){t.removeEventListener("click",e=>t.waves(e))}},zq={name:"MDBBtn"},Wq=Ea({...zq,props:{color:String,size:String,outline:String,rounded:Boolean,floating:Boolean,toggler:Boolean,toggle:Boolean,role:{type:String,default:"button"},type:{type:String,default:"button"},tag:{type:String,default:"button"},block:{type:Boolean,default:!1},ripple:{type:[Object,Boolean],default:t=>t.outline||t.color==="light"||t.color==="link"?{color:"dark"}:!0},picker:Boolean},emits:["update:toggle"],setup(t,{emit:e}){const r=t,n=pi(r.toggle),a=tr(()=>[!r.picker&&"btn",r.color&&`btn-${r.color}`,r.size&&`btn-${r.size}`,r.outline&&`btn-outline-${r.outline}`,r.rounded&&"btn-rounded",r.floating&&"btn-floating",r.block&&"btn-block",n.value&&"active"]),s=()=>{r.toggler&&(n.value=!n.value,e("update:toggle",n.value))};return(o,u)=>ub((Ot(),na(Go(t.tag),{type:t.type,role:t.role,class:Tn(Dt(a)),onClick:s},{default:Hr(()=>[is(o.$slots,"default")]),_:3},8,["type","role","class"])),[[Dt(u5),t.ripple]])}}),Xq={name:"MDBCard"},Kq=Ea({...Xq,props:{tag:{type:String,default:"div"},border:String,bg:String,text:[String,Array],shadow:String},setup(t){const e=t,r=tr(()=>{const a=e.text;return["card",e.border&&`border border-${e.border}`,e.bg&&`bg-${e.bg}`,e.shadow&&`shadow-${e.shadow}`,e.text&&n(a)]}),n=a=>typeof a=="string"?`text-${a}`:a.map(s=>`text-${s}`.trim()).join(" ");return(a,s)=>(Ot(),na(Go(t.tag),{class:Tn(Dt(r))},{default:Hr(()=>[is(a.$slots,"default")]),_:3},8,["class"]))}}),Jq={name:"MDBCardBody"},Yq=Ea({...Jq,props:{tag:{type:String,default:"div"},text:{type:[String,Array]}},setup(t){const e=t,r=tr(()=>{const a=e.text;return["card-body",e.text&&n(a)]}),n=a=>typeof a=="string"?`text-${a}`:a.map(s=>`text-${s}`.trim()).join(" ");return(a,s)=>(Ot(),na(Go(t.tag),{class:Tn(Dt(r))},{default:Hr(()=>[is(a.$slots,"default")]),_:3},8,["class"]))}}),Zq={name:"MDBCardTitle"},eV=Ea({...Zq,props:{tag:{type:String,default:"h5"},subtitle:{type:Boolean,default:!1}},setup(t){const e=t,r=tr(()=>e.subtitle?e.tag!=="h5"?e.tag:"h6":e.tag),n=tr(()=>[e.subtitle?"card-subtitle":"card-title"]);return(a,s)=>(Ot(),na(Go(Dt(r)),{class:Tn(Dt(n))},{default:Hr(()=>[is(a.$slots,"default")]),_:3},8,["class"]))}}),tV={name:"MDBCardText"},rV=Ea({...tV,props:{tag:{type:String,default:"p"}},setup(t){const e=tr(()=>["card-text"]);return(r,n)=>(Ot(),na(Go(t.tag),{class:Tn(Dt(e))},{default:Hr(()=>[is(r.$slots,"default")]),_:3},8,["class"]))}}),nV={name:"MDBCardFooter"},iV=Ea({...nV,props:{tag:{type:String,default:"div"},bg:String,border:String},setup(t){const e=t,r=tr(()=>["card-footer",e.border&&`border-${e.border}`,e.bg&&`bg-${e.bg}`]);return(n,a)=>(Ot(),na(Go(t.tag),{class:Tn(Dt(r))},{default:Hr(()=>[is(n.$slots,"default")]),_:3},8,["class"]))}}),aV=1e6,sV=t=>{do t+=Math.floor(Math.random()*aV);while(document.getElementById(t));return t},oV=/\..*/,uV={mouseenter:"mouseover",mouseleave:"mouseout"},cV=["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"];function c5(t,e,r){const n=typeof e=="string",a=n?r:e;let s=t.replace(oV,"");const o=uV[s];return o&&(s=o),cV.indexOf(s)>-1||(s=t),[n,a,s]}function lV(t,e,r,n){if(typeof e!="string"||!t)return;r||(r=n,n=null);const[a,s,o]=c5(e,r,n);t.addEventListener(o,s,a)}function dV(t,e,r,n){t.removeEventListener(e,r,!!n)}const fV=function(t,e,r,n=void 0){lV(t,e,r,n)},hV=function(t,e,r,n=void 0){if(typeof e!="string"||!t)return;const[a,s,o]=c5(e,r,n);dV(t,o,s,a?r:null)};var dE={stopProp(t){t.stopPropagation()},mounted(t,e){const r=a=>{const s=a.target;!t.contains(s)&&t!==s&&e.value(a)};t.clickOutside=r;const n=e.modifiers.mousedown?"mousedown":"click";document.addEventListener(n,a=>{var s;return(s=t.clickOutside)==null?void 0:s.call(t,a)}),document.addEventListener("touchstart",a=>{var s;return(s=t.clickOutside)==null?void 0:s.call(t,a)})},unmounted(t,e){if(!t.clickOutside)return;const r=e.modifiers.mousedown?"mousedown":"click";document.removeEventListener(r,n=>{var a;return(a=t.clickOutside)==null?void 0:a.call(t,n)}),document.removeEventListener("touchstart",n=>{var a;return(a=t.clickOutside)==null?void 0:a.call(t,n)}),delete t.clickOutside}};const pV={key:1,class:"visually-hidden"},yV={name:"MDBDropdownToggle"};({...yV,props:{...Wq.props}});const bV={name:"MDBContainer"},_V=Ea({...bV,props:{tag:{type:String,default:"div"},sm:{type:Boolean,default:!1},md:{type:Boolean,default:!1},lg:{type:Boolean,default:!1},xl:{type:Boolean,default:!1},xxl:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1}},setup(t){const e=t,r=tr(()=>[e.fluid?"container-fluid":"",e.sm?"container-sm":"",e.md?"container-md":"",e.lg?"container-lg":"",e.xl?"container-xl":"",e.xxl?"container-xxl":"",!e.fluid&&!e.sm&&!e.md&&!e.lg&&!e.xl&&!e.xxl?"container":""]);return(n,a)=>(Ot(),na(Go(t.tag),{class:Tn(Dt(r))},{default:Hr(()=>[is(n.$slots,"default")]),_:3},8,["class"]))}}),gV=["id","value"],mV=["for"],vV={key:2,class:"form-helper"},wV={key:3,class:"form-helper"},SV={class:"form-counter"},TV=Vt("div",{class:"form-notch-trailing"},null,-1),EV=["id","value"],OV=["for"],AV={key:1,class:"form-helper"},RV={key:2,class:"form-helper"},xV={class:"form-counter"},IV=Vt("div",{class:"form-notch-trailing"},null,-1),PV={key:9,class:"form-text"},DV={name:"MDBInput",inheritAttrs:!1},NV=Ea({...DV,props:{id:String,label:String,labelClass:String,modelValue:[String,Number,Date],size:String,formOutline:{type:Boolean,default:!0},wrapperClass:String,inputGroup:{type:[Boolean,String],default:!1},wrap:{type:Boolean,default:!0},formText:String,white:Boolean,validationEvent:String,isValidated:Boolean,isValid:Boolean,validFeedback:String,invalidFeedback:String,tooltipFeedback:{type:Boolean,default:!1},tag:{type:String,default:"div"},helper:String,counter:Boolean,maxlength:{type:Number,default:0}},emits:["update:modelValue","click-outside","on-validate"],setup(t,{expose:e,emit:r}){const n=t,a=BU(),s=pi(null),o=pi(n.modelValue),u=pi(null),c=pi(!1),l=pi(9),d=pi(0),f=n.id||sV("MDBInput-"),h=tr(()=>[n.formOutline&&"form-outline",_.value,n.white&&"form-white",n.wrapperClass]),p=tr(()=>["form-control",n.size?`form-control-${n.size}`:n.inputGroup&&n.inputGroup!==!0&&`form-control-${n.inputGroup}`,(o.value||o.value===0)&&"active",c.value&&"placeholder-active",A.value&&T.value&&"is-valid",A.value&&!T.value&&"is-invalid"]),b=tr(()=>["form-label",n.labelClass]),_=tr(()=>{if(n.inputGroup)return n.inputGroup!==!0?`input-group input-group-${n.inputGroup}`:"input-group"}),E=tr(()=>n.inputGroup&&A.value?{marginBottom:"1rem"}:""),w=tr(()=>n.tooltipFeedback?"valid-tooltip":"valid-feedback"),O=tr(()=>n.tooltipFeedback?"invalid-tooltip":"invalid-feedback"),A=pi(n.isValidated),T=pi(n.isValid),I=pi(""),D=tr(()=>A.value&&!T.value&&n.validationEvent?I.value:n.invalidFeedback),U=he=>{const Te=he.target;T.value=Te.checkValidity(),T.value||(I.value=Te.validationMessage),A.value=!0,r("on-validate",T.value)},H=()=>{n.validationEvent!=="submit"&&typeof s.value!="string"&&fV(s.value,n.validationEvent,U)};function N(){u.value&&(d.value=u.value.clientWidth*.8+8)}function x(){a.placeholder&&!u.value?c.value=!0:c.value=!1}const F=pi(null);F.value=typeof o.value=="string"&&o.value?o.value.length:0;function X(he){const Te=he.target;if(n.counter){if(Te.value.length>n.maxlength){typeof o.value=="string"&&(Te.value=o.value);return}F.value=Te.value.length}o.value=Te.value,r("update:modelValue",o.value)}function ne(){r("click-outside")}const $=pi(null),j=pi(),Q=he=>{j.value.forEach(Te=>Te.style.opacity=he?"0":"1"),he&&($.value.style.opacity="1")},se=a.type&&a.type==="date",ie=(he=!1)=>{var Te;n.label&&n.formOutline&&((Te=j.value)==null?void 0:Te.length)>1&&Q(he),se&&typeof s.value!="string"&&(s.value.type=he?"date":"text")},be=he=>![...he.parentNode.children].findIndex(Te=>Te===he);return H8(()=>{if(N(),x(),ie(),n.label&&n.formOutline&&(j.value=s.value.parentNode.querySelectorAll(".form-notch")),n.label&&n.formOutline&&!be(s.value)){const he=parseFloat(getComputedStyle(u.value).left);u.value.style.left=`${he+s.value.offsetLeft}px`,l.value+=s.value.offsetLeft}n.validationEvent&&H()}),k8(()=>{N(),x()}),jO(()=>{typeof s.value!="string"&&hV(s.value,n.validationEvent,U)}),$8(()=>{var he,Te;if(n.counter&&typeof n.modelValue=="string"){if(((he=n.modelValue)==null?void 0:he.length)>n.maxlength){o.value=n.modelValue.slice(0,n.maxlength),F.value=n.maxlength;return}F.value=((Te=n.modelValue)==null?void 0:Te.length)||0}o.value=n.modelValue}),Td(()=>n.isValidated,he=>A.value=he),Td(()=>n.isValid,he=>T.value=he),e({inputRef:s}),(he,Te)=>(Ot(),lr(Fi,null,[t.wrap?un("",!0):ub((Ot(),lr("input",cE({key:0,class:Dt(p),id:Dt(f),value:o.value},he.$attrs,{onInput:X,ref_key:"inputRef",ref:s,onFocus:Te[0]||(Te[0]=Ne=>ie(!0)),onBlur:Te[1]||(Te[1]=Ne=>ie())}),null,16,gV)),[[Dt(dE),ne]]),t.label&&!t.wrap?(Ot(),lr("label",{key:1,ref_key:"labelRef",ref:u,class:Tn(Dt(b)),for:Dt(f)},jr(t.label),11,mV)):un("",!0),!t.wrap&&t.helper?(Ot(),lr("div",vV,jr(t.helper),1)):un("",!0),!t.wrap&&t.counter?(Ot(),lr("div",wV,[Vt("div",SV,jr(F.value)+" / "+jr(t.maxlength),1)])):un("",!0),t.wrap?un("",!0):is(he.$slots,"default",{key:4}),!t.wrap&&t.validFeedback?(Ot(),lr("div",{key:5,class:Tn(Dt(w))},jr(t.validFeedback),3)):un("",!0),!t.wrap&&Dt(D)?(Ot(),lr("div",{key:6,class:Tn(Dt(O))},jr(Dt(D)),3)):un("",!0),!t.wrap&&t.formOutline?(Ot(),lr("div",{key:7,class:"form-notch",ref_key:"notchRef",ref:$},[Vt("div",{class:"form-notch-leading",style:xu({width:`${l.value}px`})},null,4),Vt("div",{class:"form-notch-middle",style:xu({width:`${d.value}px`})},null,4),TV],512)):un("",!0),t.wrap?ub((Ot(),na(Go(t.tag),{key:8,class:Tn(Dt(h)),style:xu(Dt(E))},{default:Hr(()=>[is(he.$slots,"prepend"),Vt("input",cE({class:Dt(p)},he.$attrs,{id:Dt(f),value:o.value,onInput:X,ref_key:"inputRef",ref:s,onFocus:Te[2]||(Te[2]=Ne=>ie(!0)),onBlur:Te[3]||(Te[3]=Ne=>ie())}),null,16,EV),t.label?(Ot(),lr("label",{key:0,ref_key:"labelRef",ref:u,class:Tn(Dt(b)),for:Dt(f)},jr(t.label),11,OV)):un("",!0),t.helper?(Ot(),lr("div",AV,jr(t.helper),1)):un("",!0),t.counter?(Ot(),lr("div",RV,[Vt("div",xV,jr(F.value)+" / "+jr(t.maxlength),1)])):un("",!0),is(he.$slots,"default"),t.validFeedback?(Ot(),lr("div",{key:3,class:Tn(Dt(w))},jr(t.validFeedback),3)):un("",!0),Dt(D)?(Ot(),lr("div",{key:4,class:Tn(Dt(O))},jr(Dt(D)),3)):un("",!0),t.formOutline?(Ot(),lr("div",{key:5,class:"form-notch",ref_key:"notchRef",ref:$},[Vt("div",{class:"form-notch-leading",style:xu({width:`${l.value}px`})},null,4),Vt("div",{class:"form-notch-middle",style:xu({width:`${d.value}px`})},null,4),IV],512)):un("",!0)]),_:3},8,["class","style"])),[[Dt(dE),ne]]):un("",!0),t.formText?(Ot(),lr("div",PV,jr(t.formText),1)):un("",!0)],64))}});var m=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function CV(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function e_(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return t[n]}})}),r}var l5={},t_={},UO={},Fp={},d5={},r_={},et={},qO={},f5={};Object.defineProperty(f5,"__esModule",{value:!0});var h5={};Object.defineProperty(h5,"__esModule",{value:!0});var p5={};Object.defineProperty(p5,"__esModule",{value:!0});var y5={};Object.defineProperty(y5,"__esModule",{value:!0});var b5={};Object.defineProperty(b5,"__esModule",{value:!0});var _5={};Object.defineProperty(_5,"__esModule",{value:!0});var g5={};Object.defineProperty(g5,"__esModule",{value:!0});var m5={};Object.defineProperty(m5,"__esModule",{value:!0});var v5={};Object.defineProperty(v5,"__esModule",{value:!0});var w5={};Object.defineProperty(w5,"__esModule",{value:!0});var S5={};Object.defineProperty(S5,"__esModule",{value:!0});var T5={};Object.defineProperty(T5,"__esModule",{value:!0});var E5={};Object.defineProperty(E5,"__esModule",{value:!0});var n_={};Object.defineProperty(n_,"__esModule",{value:!0});n_.Logger=void 0;class i_{static getLevelOrdinal(e){return i_.LEVELS[e]}}n_.Logger=i_;i_.LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5};(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(f5,t),r(h5,t),r(p5,t),r(y5,t),r(b5,t),r(_5,t),r(g5,t),r(m5,t),r(v5,t),r(w5,t),r(S5,t),r(T5,t),r(E5,t),r(n_,t)})(qO);var Yc={},Lp="delete",Er=5,ga=1<>>0;if(""+r!==e||r===4294967295)return NaN;e=r}return e<0?Cd(t)+e:e}function O5(){return!0}function Bp(t,e,r){return(t===0&&!R5(t)||r!==void 0&&t<=-r)&&(e===void 0||r!==void 0&&e>=r)}function sf(t,e){return A5(t,e,0)}function $p(t,e){return A5(t,e,e)}function A5(t,e,r){return t===void 0?r:R5(t)?e===1/0?e:Math.max(0,e+t)|0:e===void 0||e===t?t:Math.min(e,t)|0}function R5(t){return t<0||t===0&&1/t===-1/0}var x5="@@__IMMUTABLE_ITERABLE__@@";function ei(t){return!!(t&&t[x5])}var I5="@@__IMMUTABLE_KEYED__@@";function hr(t){return!!(t&&t[I5])}var P5="@@__IMMUTABLE_INDEXED__@@";function Ln(t){return!!(t&&t[P5])}function of(t){return hr(t)||Ln(t)}var Ar=function(e){return ei(e)?e:ti(e)},Oa=function(t){function e(r){return hr(r)?r:Ju(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ar),cl=function(t){function e(r){return Ln(r)?r:Aa(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ar),uf=function(t){function e(r){return ei(r)&&!of(r)?r:df(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ar);Ar.Keyed=Oa;Ar.Indexed=cl;Ar.Set=uf;var D5="@@__IMMUTABLE_SEQ__@@";function Up(t){return!!(t&&t[D5])}var N5="@@__IMMUTABLE_RECORD__@@";function Ku(t){return!!(t&&t[N5])}function oa(t){return ei(t)||Ku(t)}var cf="@@__IMMUTABLE_ORDERED__@@";function ra(t){return!!(t&&t[cf])}var qp=0,ss=1,Sa=2,hE=typeof Symbol=="function"&&Symbol.iterator,C5="@@iterator",a_=hE||C5,Ht=function(e){this.next=e};Ht.prototype.toString=function(){return"[Iterator]"};Ht.KEYS=qp;Ht.VALUES=ss;Ht.ENTRIES=Sa;Ht.prototype.inspect=Ht.prototype.toSource=function(){return this.toString()};Ht.prototype[a_]=function(){return this};function Rr(t,e,r,n){var a=t===0?e:t===1?r:[e,r];return n?n.value=a:n={value:a,done:!1},n}function Ti(){return{value:void 0,done:!0}}function HO(t){return Array.isArray(t)?!0:!!s_(t)}function TI(t){return t&&typeof t.next=="function"}function pE(t){var e=s_(t);return e&&e.call(t)}function s_(t){var e=t&&(hE&&t[hE]||t[C5]);if(typeof e=="function")return e}function jV(t){var e=s_(t);return e&&e===t.entries}function MV(t){var e=s_(t);return e&&e===t.keys}var lf=Object.prototype.hasOwnProperty;function kO(t){return Array.isArray(t)||typeof t=="string"?!0:t&&typeof t=="object"&&Number.isInteger(t.length)&&t.length>=0&&(t.length===0?Object.keys(t).length===1:t.hasOwnProperty(t.length-1))}var ti=function(t){function e(r){return r==null?GO():oa(r)?r.toSeq():LV(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(n,a){var s=this._cache;if(s){for(var o=s.length,u=0;u!==o;){var c=s[a?o-++u:u++];if(n(c[1],c[0],this)===!1)break}return u}return this.__iterateUncached(n,a)},e.prototype.__iterator=function(n,a){var s=this._cache;if(s){var o=s.length,u=0;return new Ht(function(){if(u===o)return Ti();var c=s[a?o-++u:u++];return Rr(n,c[0],c[1])})}return this.__iteratorUncached(n,a)},e}(Ar),Ju=function(t){function e(r){return r==null?GO().toKeyedSeq():ei(r)?hr(r)?r.toSeq():r.fromEntrySeq():Ku(r)?r.toSeq():zO(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(ti),Aa=function(t){function e(r){return r==null?GO():ei(r)?hr(r)?r.entrySeq():r.toIndexedSeq():Ku(r)?r.toSeq().entrySeq():j5(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(ti),df=function(t){function e(r){return(ei(r)&&!of(r)?r:Aa(r)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(ti);ti.isSeq=Up;ti.Keyed=Ju;ti.Set=df;ti.Indexed=Aa;ti.prototype[D5]=!0;var Zc=function(t){function e(r){this._array=r,this.size=r.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n,a){return this.has(n)?this._array[Hu(this,n)]:a},e.prototype.__iterate=function(n,a){for(var s=this._array,o=s.length,u=0;u!==o;){var c=a?o-++u:u++;if(n(s[c],c,this)===!1)break}return u},e.prototype.__iterator=function(n,a){var s=this._array,o=s.length,u=0;return new Ht(function(){if(u===o)return Ti();var c=a?o-++u:u++;return Rr(n,c,s[c])})},e}(Aa),QO=function(t){function e(r){var n=Object.keys(r).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r):[]);this._object=r,this._keys=n,this.size=n.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n,a){return a!==void 0&&!this.has(n)?a:this._object[n]},e.prototype.has=function(n){return lf.call(this._object,n)},e.prototype.__iterate=function(n,a){for(var s=this._object,o=this._keys,u=o.length,c=0;c!==u;){var l=o[a?u-++c:c++];if(n(s[l],l,this)===!1)break}return c},e.prototype.__iterator=function(n,a){var s=this._object,o=this._keys,u=o.length,c=0;return new Ht(function(){if(c===u)return Ti();var l=o[a?u-++c:c++];return Rr(n,l,s[l])})},e}(Ju);QO.prototype[cf]=!0;var FV=function(t){function e(r){this._collection=r,this.size=r.length||r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(n,a){if(a)return this.cacheResult().__iterate(n,a);var s=this._collection,o=pE(s),u=0;if(TI(o))for(var c;!(c=o.next()).done&&n(c.value,u++,this)!==!1;);return u},e.prototype.__iteratorUncached=function(n,a){if(a)return this.cacheResult().__iterator(n,a);var s=this._collection,o=pE(s);if(!TI(o))return new Ht(Ti);var u=0;return new Ht(function(){var c=o.next();return c.done?c:Rr(n,u++,c.value)})},e}(Aa),EI;function GO(){return EI||(EI=new Zc([]))}function zO(t){var e=WO(t);if(e)return e.fromEntrySeq();if(typeof t=="object")return new QO(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function j5(t){var e=WO(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function LV(t){var e=WO(t);if(e)return jV(t)?e.fromEntrySeq():MV(t)?e.toSetSeq():e;if(typeof t=="object")return new QO(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}function WO(t){return kO(t)?new Zc(t):HO(t)?new FV(t):void 0}var M5="@@__IMMUTABLE_MAP__@@";function Vp(t){return!!(t&&t[M5])}function o_(t){return Vp(t)&&ra(t)}function fb(t){return!!(t&&typeof t.equals=="function"&&typeof t.hashCode=="function")}function fn(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if(typeof t.valueOf=="function"&&typeof e.valueOf=="function"){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!!(fb(t)&&fb(e)&&t.equals(e))}var Uf=typeof Math.imul=="function"&&Math.imul(4294967295,2)===-2?Math.imul:function(e,r){e|=0,r|=0;var n=e&65535,a=r&65535;return n*a+((e>>>16)*a+n*(r>>>16)<<16>>>0)|0};function u_(t){return t>>>1&1073741824|t&3221225471}var BV=Object.prototype.valueOf;function gi(t){if(t==null)return OI(t);if(typeof t.hashCode=="function")return u_(t.hashCode(t));var e=kV(t);if(e==null)return OI(e);switch(typeof e){case"boolean":return e?1108378657:1108378656;case"number":return $V(e);case"string":return e.length>QV?UV(e):yE(e);case"object":case"function":return VV(e);case"symbol":return qV(e);default:if(typeof e.toString=="function")return yE(e.toString());throw new Error("Value type "+typeof e+" cannot be hashed.")}}function OI(t){return t===null?1108378658:1108378659}function $V(t){if(t!==t||t===1/0)return 0;var e=t|0;for(e!==t&&(e^=t*4294967295);t>4294967295;)t/=4294967295,e^=t;return u_(e)}function UV(t){var e=rS[t];return e===void 0&&(e=yE(t),tS===GV&&(tS=0,rS={}),tS++,rS[t]=e),e}function yE(t){for(var e=0,r=0;r0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function kV(t){return t.valueOf!==BV&&typeof t.valueOf=="function"?t.valueOf(t):t}function F5(){var t=++eS;return eS&1073741824&&(eS=0),t}var bE=typeof WeakMap=="function",_E;bE&&(_E=new WeakMap);var xI=Object.create(null),eS=0,Mc="__immutablehash__";typeof Symbol=="function"&&(Mc=Symbol(Mc));var QV=16,GV=255,tS=0,rS={},c_=function(t){function e(r,n){this._iter=r,this._useKeys=n,this.size=r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n,a){return this._iter.get(n,a)},e.prototype.has=function(n){return this._iter.has(n)},e.prototype.valueSeq=function(){return this._iter.valueSeq()},e.prototype.reverse=function(){var n=this,a=XO(this,!0);return this._useKeys||(a.valueSeq=function(){return n._iter.toSeq().reverse()}),a},e.prototype.map=function(n,a){var s=this,o=q5(this,n,a);return this._useKeys||(o.valueSeq=function(){return s._iter.toSeq().map(n,a)}),o},e.prototype.__iterate=function(n,a){var s=this;return this._iter.__iterate(function(o,u){return n(o,u,s)},a)},e.prototype.__iterator=function(n,a){return this._iter.__iterator(n,a)},e}(Ju);c_.prototype[cf]=!0;var L5=function(t){function e(r){this._iter=r,this.size=r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.includes=function(n){return this._iter.includes(n)},e.prototype.__iterate=function(n,a){var s=this,o=0;return a&&Cd(this),this._iter.__iterate(function(u){return n(u,a?s.size-++o:o++,s)},a)},e.prototype.__iterator=function(n,a){var s=this,o=this._iter.__iterator(ss,a),u=0;return a&&Cd(this),new Ht(function(){var c=o.next();return c.done?c:Rr(n,a?s.size-++u:u++,c.value,c)})},e}(Aa),B5=function(t){function e(r){this._iter=r,this.size=r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.has=function(n){return this._iter.includes(n)},e.prototype.__iterate=function(n,a){var s=this;return this._iter.__iterate(function(o){return n(o,o,s)},a)},e.prototype.__iterator=function(n,a){var s=this._iter.__iterator(ss,a);return new Ht(function(){var o=s.next();return o.done?o:Rr(n,o.value,o.value,o)})},e}(df),$5=function(t){function e(r){this._iter=r,this.size=r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.entrySeq=function(){return this._iter.toSeq()},e.prototype.__iterate=function(n,a){var s=this;return this._iter.__iterate(function(o){if(o){PI(o);var u=ei(o);return n(u?o.get(1):o[1],u?o.get(0):o[0],s)}},a)},e.prototype.__iterator=function(n,a){var s=this._iter.__iterator(ss,a);return new Ht(function(){for(;;){var o=s.next();if(o.done)return o;var u=o.value;if(u){PI(u);var c=ei(u);return Rr(n,c?u.get(0):u[0],c?u.get(1):u[1],o)}}})},e}(Ju);L5.prototype.cacheResult=c_.prototype.cacheResult=B5.prototype.cacheResult=$5.prototype.cacheResult=YO;function U5(t){var e=Xs(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var r=t.reverse.apply(this);return r.flip=function(){return t.reverse()},r},e.has=function(r){return t.includes(r)},e.includes=function(r){return t.has(r)},e.cacheResult=YO,e.__iterateUncached=function(r,n){var a=this;return t.__iterate(function(s,o){return r(o,s,a)!==!1},n)},e.__iteratorUncached=function(r,n){if(r===Sa){var a=t.__iterator(r,n);return new Ht(function(){var s=a.next();if(!s.done){var o=s.value[0];s.value[0]=s.value[1],s.value[1]=o}return s})}return t.__iterator(r===ss?qp:ss,n)},e}function q5(t,e,r){var n=Xs(t);return n.size=t.size,n.has=function(a){return t.has(a)},n.get=function(a,s){var o=t.get(a,$t);return o===$t?s:e.call(r,o,a,t)},n.__iterateUncached=function(a,s){var o=this;return t.__iterate(function(u,c,l){return a(e.call(r,u,c,l),c,o)!==!1},s)},n.__iteratorUncached=function(a,s){var o=t.__iterator(Sa,s);return new Ht(function(){var u=o.next();if(u.done)return u;var c=u.value,l=c[0];return Rr(a,l,e.call(r,c[1],l,t),u)})},n}function XO(t,e){var r=this,n=Xs(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var a=U5(t);return a.reverse=function(){return t.flip()},a}),n.get=function(a,s){return t.get(e?a:-1-a,s)},n.has=function(a){return t.has(e?a:-1-a)},n.includes=function(a){return t.includes(a)},n.cacheResult=YO,n.__iterate=function(a,s){var o=this,u=0;return s&&Cd(t),t.__iterate(function(c,l){return a(c,e?l:s?o.size-++u:u++,o)},!s)},n.__iterator=function(a,s){var o=0;s&&Cd(t);var u=t.__iterator(Sa,!s);return new Ht(function(){var c=u.next();if(c.done)return c;var l=c.value;return Rr(a,e?l[0]:s?r.size-++o:o++,l[1],c)})},n}function V5(t,e,r,n){var a=Xs(t);return n&&(a.has=function(s){var o=t.get(s,$t);return o!==$t&&!!e.call(r,o,s,t)},a.get=function(s,o){var u=t.get(s,$t);return u!==$t&&e.call(r,u,s,t)?u:o}),a.__iterateUncached=function(s,o){var u=this,c=0;return t.__iterate(function(l,d,f){if(e.call(r,l,d,f))return c++,s(l,n?d:c-1,u)},o),c},a.__iteratorUncached=function(s,o){var u=t.__iterator(Sa,o),c=0;return new Ht(function(){for(;;){var l=u.next();if(l.done)return l;var d=l.value,f=d[0],h=d[1];if(e.call(r,h,f,t))return Rr(s,n?f:c++,h,l)}})},a}function zV(t,e,r){var n=Zu().asMutable();return t.__iterate(function(a,s){n.update(e.call(r,a,s,t),0,function(o){return o+1})}),n.asImmutable()}function WV(t,e,r){var n=hr(t),a=(ra(t)?os():Zu()).asMutable();t.__iterate(function(o,u){a.update(e.call(r,o,u,t),function(c){return c=c||[],c.push(n?[u,o]:o),c})});var s=JO(t);return a.map(function(o){return fr(t,s(o))}).asImmutable()}function XV(t,e,r){var n=hr(t),a=[[],[]];t.__iterate(function(o,u){a[e.call(r,o,u,t)?1:0].push(n?[u,o]:o)});var s=JO(t);return a.map(function(o){return fr(t,s(o))})}function KO(t,e,r,n){var a=t.size;if(Bp(e,r,a))return t;var s=sf(e,a),o=$p(r,a);if(s!==s||o!==o)return KO(t.toSeq().cacheResult(),e,r,n);var u=o-s,c;u===u&&(c=u<0?0:u);var l=Xs(t);return l.size=c===0?c:t.size&&c||void 0,!n&&Up(t)&&c>=0&&(l.get=function(d,f){return d=Hu(this,d),d>=0&&dc)return Ti();var _=h.next();return n||d===ss||_.done?_:d===qp?Rr(d,b-1,void 0,_):Rr(d,b-1,_.value[1],_)})},l}function KV(t,e,r){var n=Xs(t);return n.__iterateUncached=function(a,s){var o=this;if(s)return this.cacheResult().__iterate(a,s);var u=0;return t.__iterate(function(c,l,d){return e.call(r,c,l,d)&&++u&&a(c,l,o)}),u},n.__iteratorUncached=function(a,s){var o=this;if(s)return this.cacheResult().__iterator(a,s);var u=t.__iterator(Sa,s),c=!0;return new Ht(function(){if(!c)return Ti();var l=u.next();if(l.done)return l;var d=l.value,f=d[0],h=d[1];return e.call(r,h,f,o)?a===Sa?l:Rr(a,f,h,l):(c=!1,Ti())})},n}function H5(t,e,r,n){var a=Xs(t);return a.__iterateUncached=function(s,o){var u=this;if(o)return this.cacheResult().__iterate(s,o);var c=!0,l=0;return t.__iterate(function(d,f,h){if(!(c&&(c=e.call(r,d,f,h))))return l++,s(d,n?f:l-1,u)}),l},a.__iteratorUncached=function(s,o){var u=this;if(o)return this.cacheResult().__iterator(s,o);var c=t.__iterator(Sa,o),l=!0,d=0;return new Ht(function(){var f,h,p;do{if(f=c.next(),f.done)return n||s===ss?f:s===qp?Rr(s,d++,void 0,f):Rr(s,d++,f.value[1],f);var b=f.value;h=b[0],p=b[1],l&&(l=e.call(r,p,h,u))}while(l);return s===Sa?f:Rr(s,h,p,f)})},a}function JV(t,e){var r=hr(t),n=[t].concat(e).map(function(o){return ei(o)?r&&(o=Oa(o)):o=r?zO(o):j5(Array.isArray(o)?o:[o]),o}).filter(function(o){return o.size!==0});if(n.length===0)return t;if(n.length===1){var a=n[0];if(a===t||r&&hr(a)||Ln(t)&&Ln(a))return a}var s=new Zc(n);return r?s=s.toKeyedSeq():Ln(t)||(s=s.toSetSeq()),s=s.flatten(!0),s.size=n.reduce(function(o,u){if(o!==void 0){var c=u.size;if(c!==void 0)return o+c}},0),s}function k5(t,e,r){var n=Xs(t);return n.__iterateUncached=function(a,s){if(s)return this.cacheResult().__iterate(a,s);var o=0,u=!1;function c(l,d){l.__iterate(function(f,h){return(!e||d0}function Py(t,e,r,n){var a=Xs(t),s=new Zc(r).map(function(o){return o.size});return a.size=n?s.max():s.min(),a.__iterate=function(o,u){for(var c=this.__iterator(ss,u),l,d=0;!(l=c.next()).done&&o(l.value,d++,this)!==!1;);return d},a.__iteratorUncached=function(o,u){var c=r.map(function(f){return f=Ar(f),pE(u?f.reverse():f)}),l=0,d=!1;return new Ht(function(){var f;return d||(f=c.map(function(h){return h.next()}),d=n?f.every(function(h){return h.done}):f.some(function(h){return h.done})),d?Ti():Rr(o,l++,e.apply(null,f.map(function(h){return h.value})))})},a}function fr(t,e){return t===e?t:Up(t)?e:t.constructor(e)}function PI(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function JO(t){return hr(t)?Oa:Ln(t)?cl:uf}function Xs(t){return Object.create((hr(t)?Ju:Ln(t)?Aa:df).prototype)}function YO(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):ti.prototype.cacheResult.call(this)}function Q5(t,e){return t===void 0&&e===void 0?0:t===void 0?1:e===void 0?-1:t>e?1:t0;)e[r]=arguments[r+1];if(typeof t!="function")throw new TypeError("Invalid merger function: "+t);return K5(this,e,t)}function K5(t,e,r){for(var n=[],a=0;a0;)e[r]=arguments[r+1];return kp(t,e)}function Y5(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return kp(e,r,t)}function Z5(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Hp(t,e)}function eC(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Hp(e,r,t)}function Hp(t,e,r){return kp(t,e,tH(r))}function kp(t,e,r){if(!ku(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(oa(t))return typeof r=="function"&&t.mergeWith?t.mergeWith.apply(t,[r].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var n=Array.isArray(t),a=t,s=n?cl:Oa,o=n?function(c){a===t&&(a=hb(a)),a.push(c)}:function(c,l){var d=lf.call(a,l),f=d&&r?r(a[l],c,l):c;(!d||f!==a[l])&&(a===t&&(a=hb(a)),a[l]=f)},u=0;u0;)e[r]=arguments[r+1];return Hp(this,e,t)}function cA(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Yu(this,t,Za(),function(n){return kp(n,e)})}function lA(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Yu(this,t,Za(),function(n){return Hp(n,e)})}function Qp(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function Gp(){return this.__ownerID?this:this.__ensureOwner(new VO)}function zp(){return this.__ensureOwner()}function dA(){return this.__altered}var Zu=function(t){function e(r){return r==null?Za():Vp(r)&&!ra(r)?r:Za().withMutations(function(n){var a=t(r);Ji(a.size),a.forEach(function(s,o){return n.set(o,s)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return Za().withMutations(function(s){for(var o=0;o=n.length)throw new Error("Missing value for key: "+n[o]);s.set(n[o],n[o+1])}})},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(n,a){return this._root?this._root.get(0,void 0,n,a):a},e.prototype.set=function(n,a){return CI(this,n,a)},e.prototype.remove=function(n){return CI(this,n,$t)},e.prototype.deleteAll=function(n){var a=Ar(n);return a.size===0?this:this.withMutations(function(s){a.forEach(function(o){return s.remove(o)})})},e.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Za()},e.prototype.sort=function(n){return os(jd(this,n))},e.prototype.sortBy=function(n,a){return os(jd(this,a,n))},e.prototype.map=function(n,a){var s=this;return this.withMutations(function(o){o.forEach(function(u,c){o.set(c,n.call(a,u,c,s))})})},e.prototype.__iterator=function(n,a){return new nH(this,n,a)},e.prototype.__iterate=function(n,a){var s=this,o=0;return this._root&&this._root.iterate(function(u){return o++,n(u[1],u[0],s)},a),o},e.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?fA(this.size,this._root,n,this.__hash):this.size===0?Za():(this.__ownerID=n,this.__altered=!1,this)},e}(Oa);Zu.isMap=Vp;var xr=Zu.prototype;xr[M5]=!0;xr[Lp]=xr.remove;xr.removeAll=xr.deleteAll;xr.setIn=iA;xr.removeIn=xr.deleteIn=sA;xr.update=oA;xr.updateIn=uA;xr.merge=xr.concat=W5;xr.mergeWith=X5;xr.mergeDeep=tC;xr.mergeDeepWith=rC;xr.mergeIn=cA;xr.mergeDeepIn=lA;xr.withMutations=Qp;xr.wasAltered=dA;xr.asImmutable=zp;xr["@@transducer/init"]=xr.asMutable=Gp;xr["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])};xr["@@transducer/result"]=function(t){return t.asImmutable()};var dp=function(e,r){this.ownerID=e,this.entries=r};dp.prototype.get=function(e,r,n,a){for(var s=this.entries,o=0,u=s.length;o=cH)return iH(e,l,a,s);var p=e&&e===this.ownerID,b=p?l:Ps(l);return h?c?d===f-1?b.pop():b[d]=b.pop():b[d]=[a,s]:b.push([a,s]),p?(this.entries=b,this):new dp(e,b)}};var Md=function(e,r,n){this.ownerID=e,this.bitmap=r,this.nodes=n};Md.prototype.get=function(e,r,n,a){r===void 0&&(r=gi(n));var s=1<<((e===0?r:r>>>e)&wi),o=this.bitmap;return o&s?this.nodes[nC(o&s-1)].get(e+Er,r,n,a):a};Md.prototype.update=function(e,r,n,a,s,o,u){n===void 0&&(n=gi(a));var c=(r===0?n:n>>>r)&wi,l=1<=lH)return sH(e,p,d,c,_);if(f&&!_&&p.length===2&&jI(p[h^1]))return p[h^1];if(f&&_&&p.length===1&&jI(_))return _;var E=e&&e===this.ownerID,w=f?_?d:d^l:d|l,O=f?_?iC(p,h,_,E):uH(p,h,E):oH(p,h,_,E);return E?(this.bitmap=w,this.nodes=O,this):new Md(e,w,O)};var fp=function(e,r,n){this.ownerID=e,this.count=r,this.nodes=n};fp.prototype.get=function(e,r,n,a){r===void 0&&(r=gi(n));var s=(e===0?r:r>>>e)&wi,o=this.nodes[s];return o?o.get(e+Er,r,n,a):a};fp.prototype.update=function(e,r,n,a,s,o,u){n===void 0&&(n=gi(a));var c=(r===0?n:n>>>r)&wi,l=s===$t,d=this.nodes,f=d[c];if(l&&!f)return this;var h=hA(f,e,r+Er,n,a,s,o,u);if(h===f)return this;var p=this.count;if(!f)p++;else if(!h&&(p--,p>>r)&wi,o=(r===0?n:n>>>r)&wi,u,c=s===o?[pA(t,e,r+Er,n,a)]:(u=new Lo(e,n,a),s>>=1)o[u]=r&1?e[s++]:void 0;return o[n]=a,new fp(t,s+1,o)}function nC(t){return t-=t>>1&1431655765,t=(t&858993459)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,t&127}function iC(t,e,r,n){var a=n?t:Ps(t);return a[e]=r,a}function oH(t,e,r,n){var a=t.length+1;if(n&&e+1===a)return t[e]=r,t;for(var s=new Array(a),o=0,u=0;u0&&s=0&&n>>r&wi;if(a>=this.array.length)return new Mu([],e);var s=a===0,o;if(r>0){var u=this.array[a];if(o=u&&u.removeBefore(e,r-Er,n),o===u&&s)return this}if(s&&!o)return this;var c=Ld(this,e);if(!s)for(var l=0;l>>r&wi;if(a>=this.array.length)return this;var s;if(r>0){var o=this.array[a];if(s=o&&o.removeAfter(e,r-Er,n),s===o&&a===this.array.length-1)return this}var u=Ld(this,e);return u.array.splice(a+1),s&&(u.array[a]=s),u};var Wh={};function MI(t,e){var r=t._origin,n=t._capacity,a=pp(n),s=t._tail;return o(t._root,t._level,0);function o(l,d,f){return d===0?u(l,f):c(l,d,f)}function u(l,d){var f=d===a?s&&s.array:l&&l.array,h=d>r?0:r-d,p=n-d;return p>ga&&(p=ga),function(){if(h===p)return Wh;var b=e?--p:h++;return f&&f[b]}}function c(l,d,f){var h,p=l&&l.array,b=f>r?0:r-f>>d,_=(n-f>>d)+1;return _>ga&&(_=ga),function(){for(;;){if(h){var E=h();if(E!==Wh)return E;h=null}if(b===_)return Wh;var w=e?--_:b++;h=o(p&&p[w],d-Er,f+(w<=t.size||e<0)return t.withMutations(function(o){e<0?vu(o,e).set(0,r):vu(o,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,a=t._root,s=fE();return e>=pp(t._capacity)?n=gE(n,t.__ownerID,0,e,r,s):a=gE(a,t.__ownerID,t._level,e,r,s),s.value?t.__ownerID?(t._root=a,t._tail=n,t.__hash=void 0,t.__altered=!0,t):hp(t._origin,t._capacity,t._level,a,n):t}function gE(t,e,r,n,a,s){var o=n>>>r&wi,u=t&&o0){var l=t&&t.array[o],d=gE(l,e,r-Er,n,a,s);return d===l?t:(c=Ld(t,e),c.array[o]=d,c)}return u&&t.array[o]===a?t:(s&&ma(s),c=Ld(t,e),a===void 0&&o===c.array.length-1?c.array.pop():c.array[o]=a,c)}function Ld(t,e){return e&&t&&e===t.ownerID?t:new Mu(t?t.array.slice():[],e)}function sC(t,e){if(e>=pp(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&wi],n-=Er;return r}}function vu(t,e,r){e!==void 0&&(e|=0),r!==void 0&&(r|=0);var n=t.__ownerID||new VO,a=t._origin,s=t._capacity,o=a+e,u=r===void 0?s:r<0?s+r:a+r;if(o===a&&u===s)return t;if(o>=u)return t.clear();for(var c=t._level,l=t._root,d=0;o+d<0;)l=new Mu(l&&l.array.length?[void 0,l]:[],n),c+=Er,d+=1<=1<f?new Mu([],n):p;if(p&&h>f&&oEr;E-=Er){var w=f>>>E&wi;_=_.array[w]=Ld(_.array[w],n)}_.array[f>>>Er&wi]=p}if(u=h)o-=h,u-=h,c=Er,l=null,b=b&&b.removeBefore(n,0,o);else if(o>a||h>>c&wi;if(O!==h>>>c&wi)break;O&&(d+=(1<a&&(l=l.removeBefore(n,c,o-d)),l&&h>>Er<=ga&&a.size>=n.size*2?(c=a.filter(function(l,d){return l!==void 0&&s!==d}),u=c.toKeyedSeq().map(function(l){return l[0]}).flip().toMap(),t.__ownerID&&(u.__ownerID=c.__ownerID=t.__ownerID)):(u=n.remove(e),c=s===a.size-1?a.pop():a.set(s,void 0))}else if(o){if(r===a.get(s)[1])return t;u=n,c=a.set(s,[e,r])}else u=n.set(e,a.size),c=a.set(a.size,[e,r]);return t.__ownerID?(t.size=u.size,t._map=u,t._list=c,t.__hash=void 0,t.__altered=!0,t):yA(u,c)}var oC="@@__IMMUTABLE_STACK__@@";function yp(t){return!!(t&&t[oC])}var Wp=function(t){function e(r){return r==null?Dy():yp(r)?r:Dy().pushAll(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(n,a){var s=this._head;for(n=Hu(this,n);s&&n--;)s=s.next;return s?s.value:a},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var n=arguments;if(arguments.length===0)return this;for(var a=this.size+arguments.length,s=this._head,o=arguments.length-1;o>=0;o--)s={value:n[o],next:s};return this.__ownerID?(this.size=a,this._head=s,this.__hash=void 0,this.__altered=!0,this):Rh(a,s)},e.prototype.pushAll=function(n){if(n=t(n),n.size===0)return this;if(this.size===0&&yp(n))return n;Ji(n.size);var a=this.size,s=this._head;return n.__iterate(function(o){a++,s={value:o,next:s}},!0),this.__ownerID?(this.size=a,this._head=s,this.__hash=void 0,this.__altered=!0,this):Rh(a,s)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Dy()},e.prototype.slice=function(n,a){if(Bp(n,a,this.size))return this;var s=sf(n,this.size),o=$p(a,this.size);if(o!==this.size)return t.prototype.slice.call(this,n,a);for(var u=this.size-s,c=this._head;s--;)c=c.next;return this.__ownerID?(this.size=u,this._head=c,this.__hash=void 0,this.__altered=!0,this):Rh(u,c)},e.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?Rh(this.size,this._head,n,this.__hash):this.size===0?Dy():(this.__ownerID=n,this.__altered=!1,this)},e.prototype.__iterate=function(n,a){var s=this;if(a)return new Zc(this.toArray()).__iterate(function(c,l){return n(c,l,s)},a);for(var o=0,u=this._head;u&&n(u.value,o++,this)!==!1;)u=u.next;return o},e.prototype.__iterator=function(n,a){if(a)return new Zc(this.toArray()).__iterator(n,a);var s=0,o=this._head;return new Ht(function(){if(o){var u=o.value;return o=o.next,Rr(n,s++,u)}return Ti()})},e}(cl);Wp.isStack=yp;var Ei=Wp.prototype;Ei[oC]=!0;Ei.shift=Ei.pop;Ei.unshift=Ei.push;Ei.unshiftAll=Ei.pushAll;Ei.withMutations=Qp;Ei.wasAltered=dA;Ei.asImmutable=zp;Ei["@@transducer/init"]=Ei.asMutable=Gp;Ei["@@transducer/step"]=function(t,e){return t.unshift(e)};Ei["@@transducer/result"]=function(t){return t.asImmutable()};function Rh(t,e,r,n){var a=Object.create(Ei);return a.size=t,a._head=e,a.__ownerID=r,a.__hash=n,a.__altered=!1,a}var $I;function Dy(){return $I||($I=Rh(0))}var uC="@@__IMMUTABLE_SET__@@";function Xp(t){return!!(t&&t[uC])}function p_(t){return Xp(t)&&ra(t)}function bA(t,e){if(t===e)return!0;if(!ei(e)||t.size!==void 0&&e.size!==void 0&&t.size!==e.size||t.__hash!==void 0&&e.__hash!==void 0&&t.__hash!==e.__hash||hr(t)!==hr(e)||Ln(t)!==Ln(e)||ra(t)!==ra(e))return!1;if(t.size===0&&e.size===0)return!0;var r=!of(t);if(ra(t)){var n=t.entries();return e.every(function(c,l){var d=n.next().value;return d&&fn(d[1],c)&&(r||fn(d[0],l))})&&n.next().done}var a=!1;if(t.size===void 0)if(e.size===void 0)typeof t.cacheResult=="function"&&t.cacheResult();else{a=!0;var s=t;t=e,e=s}var o=!0,u=e.__iterate(function(c,l){if(r?!t.has(c):a?!fn(c,t.get(l,$t)):!fn(t.get(l,$t),c))return o=!1,!1});return o&&t.size===u}function ll(t,e){var r=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function pb(t){if(!t||typeof t!="object")return t;if(!ei(t)){if(!ku(t))return t;t=ti(t)}if(hr(t)){var e={};return t.__iterate(function(n,a){e[a]=pb(n)}),e}var r=[];return t.__iterate(function(n){r.push(pb(n))}),r}var hf=function(t){function e(r){return r==null?xh():Xp(r)&&!ra(r)?r:xh().withMutations(function(n){var a=t(r);Ji(a.size),a.forEach(function(s){return n.add(s)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(n){return this(Oa(n).keySeq())},e.intersect=function(n){return n=Ar(n).toArray(),n.length?Bn.intersect.apply(e(n.pop()),n):xh()},e.union=function(n){return n=Ar(n).toArray(),n.length?Bn.union.apply(e(n.pop()),n):xh()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(n){return this._map.has(n)},e.prototype.add=function(n){return Ny(this,this._map.set(n,n))},e.prototype.remove=function(n){return Ny(this,this._map.remove(n))},e.prototype.clear=function(){return Ny(this,this._map.clear())},e.prototype.map=function(n,a){var s=this,o=!1,u=Ny(this,this._map.mapEntries(function(c){var l=c[1],d=n.call(a,l,l,s);return d!==l&&(o=!0),[d,d]},a));return o?u:this},e.prototype.union=function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return n=n.filter(function(s){return s.size!==0}),n.length===0?this:this.size===0&&!this.__ownerID&&n.length===1?this.constructor(n[0]):this.withMutations(function(s){for(var o=0;o=0&&a=0&&sthis.size?r:this.find(function(n,a){return a===e},void 0,r)},has:function(e){return e=Hu(this,e),e>=0&&(this.size!==void 0?this.size===1/0||ee?-1:0}function bH(t){if(t.size===1/0)return 0;var e=ra(t),r=hr(t),n=e?1:0,a=t.__iterate(r?e?function(s,o){n=31*n+QI(gi(s),gi(o))|0}:function(s,o){n=n+QI(gi(s),gi(o))|0}:e?function(s){n=31*n+gi(s)|0}:function(s){n=n+gi(s)|0});return _H(a,n)}function _H(t,e){return e=Uf(e,3432918353),e=Uf(e<<15|e>>>-15,461845907),e=Uf(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Uf(e^e>>>16,2246822507),e=Uf(e^e>>>13,3266489909),e=u_(e^e>>>16),e}function QI(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var el=function(t){function e(r){return r==null?mE():p_(r)?r:mE().withMutations(function(n){var a=uf(r);Ji(a.size),a.forEach(function(s){return n.add(s)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(n){return this(Oa(n).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(hf);el.isOrderedSet=p_;var dl=el.prototype;dl[cf]=!0;dl.zip=pf.zip;dl.zipWith=pf.zipWith;dl.zipAll=pf.zipAll;dl.__empty=mE;dl.__make=fC;function fC(t,e){var r=Object.create(dl);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}var GI;function mE(){return GI||(GI=fC(Ah()))}var hC={LeftThenRight:-1,RightThenLeft:1};function gH(t){if(Ku(t))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(oa(t))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(t===null||typeof t!="object")throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}var nn=function(e,r){var n;gH(e);var a=function(u){var c=this;if(u instanceof a)return u;if(!(this instanceof a))return new a(u);if(!n){n=!0;var l=Object.keys(e),d=s._indices={};s._name=r,s._keys=l,s._defaultValues=e;for(var f=0;f2?[]:void 0,{"":t})}function bC(t,e,r,n,a,s){if(typeof r!="string"&&!oa(r)&&(kO(r)||HO(r)||l_(r))){if(~t.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");t.push(r),a&&n!==""&&a.push(n);var o=e.call(s,n,ti(r).map(function(u,c){return bC(t,e,u,c,a,r)}),a&&a.slice());return t.pop(),a&&a.pop(),o}return r}function vH(t,e){return Ln(e)?e.toList():hr(e)?e.toMap():e.toSet()}var _C="4.3.4",wH={version:_C,Collection:Ar,Iterable:Ar,Seq:ti,Map:Zu,OrderedMap:os,List:ff,Stack:Wp,Set:hf,OrderedSet:el,PairSorting:hC,Record:nn,Range:_A,Repeat:pC,is:fn,fromJS:yC,hash:gi,isImmutable:oa,isCollection:ei,isKeyed:hr,isIndexed:Ln,isAssociative:of,isOrdered:ra,isValueObject:fb,isPlainObject:l_,isSeq:Up,isList:h_,isMap:Vp,isOrderedMap:o_,isStack:yp,isSet:Xp,isOrderedSet:p_,isRecord:Ku,get:d_,getIn:y_,has:eA,hasIn:gA,merge:J5,mergeDeep:Z5,mergeWith:Y5,mergeDeepWith:eC,remove:tA,removeIn:aA,set:rA,setIn:nA,update:f_,updateIn:Yu},SH=Ar;const TH=Object.freeze(Object.defineProperty({__proto__:null,Collection:Ar,Iterable:SH,List:ff,Map:Zu,OrderedMap:os,OrderedSet:el,PairSorting:hC,Range:_A,Record:nn,Repeat:pC,Seq:ti,Set:hf,Stack:Wp,default:wH,fromJS:yC,get:d_,getIn:y_,has:eA,hasIn:gA,hash:gi,is:fn,isAssociative:of,isCollection:ei,isImmutable:oa,isIndexed:Ln,isKeyed:hr,isList:h_,isMap:Vp,isOrdered:ra,isOrderedMap:o_,isOrderedSet:p_,isPlainObject:l_,isRecord:Ku,isSeq:Up,isSet:Xp,isStack:yp,isValueObject:fb,merge:J5,mergeDeep:Z5,mergeDeepWith:eC,mergeWith:Y5,remove:tA,removeIn:aA,set:rA,setIn:nA,update:f_,updateIn:Yu,version:_C},Symbol.toStringTag,{value:"Module"})),wA=e_(TH);Object.defineProperty(Yc,"__esModule",{value:!0});Yc.ActionContextKey=Yc.ActionContext=void 0;const zI=wA;class od{constructor(e={}){this.map=(0,zI.Map)(e)}setDefault(e,r){return this.has(e)?this:this.set(e,r)}set(e,r){return this.setRaw(e.name,r)}setRaw(e,r){return new od(this.map.set(e,r))}delete(e){return new od(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 r=this;for(const n of e)for(const a of n.keys())r=r.set(a,n.get(a));return r}keys(){return[...this.map.keys()].map(e=>new gC(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 od?e:new od((0,zI.Map)(e||{}))}}Yc.ActionContext=od;class gC{constructor(e){this.name=e}}Yc.ActionContextKey=gC;var Jp={};Object.defineProperty(Jp,"__esModule",{value:!0});Jp.Bus=void 0;class EH{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 r=this.actors.indexOf(e);return r>=0?(this.actors.splice(r,1),!0):!1}unsubscribeObserver(e){const r=this.observers.indexOf(e);return r>=0?(this.observers.splice(r,1),!0):!1}publish(e){return this.actors.map(r=>({actor:r,reply:r.test(e)}))}onRun(e,r,n){for(const a of this.observers)a.onRun(e,r,n)}addDependencies(e,r){for(const n of r){let a=this.dependencyLinks.get(n);a||(a=[],this.dependencyLinks.set(n,a)),a.push(e)}this.reorderForDependencies()}reorderForDependencies(){if(this.dependencyLinks.size>0){const e=[];for(const r of this.dependencyLinks.keys()){const n=this.actors.indexOf(r);n>=0&&(this.actors.splice(n,1),e.push(r))}for(;e.length>0;){let r=-1;for(let a=0;a=0&&n.splice(a,1),n.length===0&&delete this.actorsIndex[r]}return super.unsubscribe(e)}publish(e){const r=this.getActionIdentifier(e);return r?[...this.actorsIndex[r]||[],...this.actorsIndex._undefined_||[]].map(a=>({actor:a,reply:a.test(e)})):super.publish(e)}getActorIdentifier(e){return this.actorIdentifierFields.reduce((r,n)=>r[n],e)}getActionIdentifier(e){return this.actionIdentifierFields.reduce((r,n)=>r[n],e)}}b_.BusIndexed=AH;var Yp={};Object.defineProperty(Yp,"__esModule",{value:!0});Yp.CONTEXT_KEY_LOGGER=void 0;const RH=Yc;Yp.CONTEXT_KEY_LOGGER=new RH.ActionContextKey("@comunica/core:log");var __={};Object.defineProperty(__,"__esModule",{value:!0});__.ActionObserver=void 0;class xH{constructor(e){Object.assign(this,e)}}__.ActionObserver=xH;var g_={};Object.defineProperty(g_,"__esModule",{value:!0});g_.Actor=void 0;const IH=Yp;class wu{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(IH.CONTEXT_KEY_LOGGER)}runObservable(e){const r=this.run(e);return this.bus.onRun(this,e,r),r}async initialize(){return!0}async deinitialize(){return!0}getDefaultLogData(e,r){const n=r?r():{};return n.actor=this.name,n}logTrace(e,r,n){const a=wu.getContextLogger(e);a&&a.trace(r,this.getDefaultLogData(e,n))}logDebug(e,r,n){const a=wu.getContextLogger(e);a&&a.debug(r,this.getDefaultLogData(e,n))}logInfo(e,r,n){const a=wu.getContextLogger(e);a&&a.info(r,this.getDefaultLogData(e,n))}logWarn(e,r,n){const a=wu.getContextLogger(e);a&&a.warn(r,this.getDefaultLogData(e,n))}logError(e,r,n){const a=wu.getContextLogger(e);a&&a.error(r,this.getDefaultLogData(e,n))}logFatal(e,r,n){const a=wu.getContextLogger(e);a&&a.fatal(r,this.getDefaultLogData(e,n))}}g_.Actor=wu;var m_={};Object.defineProperty(m_,"__esModule",{value:!0});m_.Mediator=void 0;class PH{constructor(e){Object.assign(this,e)}publish(e){const r=this.bus.publish(e);if(r.length===0)throw new Error(`No actors are able to reply to a message in the bus ${this.bus.name}`);return r}async mediateActor(e){return await this.mediateWith(e,this.publish(e))}async mediate(e){return(await this.mediateActor(e)).runObservable(e)}}m_.Mediator=PH;(function(t){var e=m&&m.__createBinding||(Object.create?function(s,o,u,c){c===void 0&&(c=u);var l=Object.getOwnPropertyDescriptor(o,u);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[u]}}),Object.defineProperty(s,c,l)}:function(s,o,u,c){c===void 0&&(c=u),s[c]=o[u]}),r=m&&m.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&e(o,s,u)};Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;const a=qO.Logger;t.Logger=a,r(Yc,t),r(Jp,t),r(b_,t),r(Yp,t),r(__,t),r(g_,t),r(m_,t)})(et);Object.defineProperty(r_,"__esModule",{value:!0});r_.ActorInit=void 0;const DH=et;class NH extends DH.Actor{constructor(e){super(e)}}r_.ActorInit=NH;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(r_,t)})(d5);Object.defineProperty(Fp,"__esModule",{value:!0});Fp.ActorInitQueryBase=void 0;const CH=d5;class jH extends CH.ActorInit{constructor(e){var r;(r=e.contextKeyShortcutsExtensions)==null||r.forEach(n=>{if(Object.keys(e.contextKeyShortcuts).some(a=>Object.keys(n).includes(a)))throw new Error("Duplicate keys found while adding `contextKeyShortcutsExtensions`.");e.contextKeyShortcuts={...e.contextKeyShortcuts,...n}}),super(e)}async test(e){return!0}async run(e){throw new Error("ActorInitSparql#run is not supported in the browser.")}}Fp.ActorInitQueryBase=jH;var v_={},oS={exports:{}},WI;function zo(){if(WI)return oS.exports;WI=1;var t=oS.exports={},e,r;function n(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?e=setTimeout:e=n}catch{e=n}try{typeof clearTimeout=="function"?r=clearTimeout:r=a}catch{r=a}})();function s(_){if(e===setTimeout)return setTimeout(_,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(_,0);try{return e(_,0)}catch{try{return e.call(null,_,0)}catch{return e.call(this,_,0)}}}function o(_){if(r===clearTimeout)return clearTimeout(_);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(_);try{return r(_)}catch{try{return r.call(null,_)}catch{return r.call(this,_)}}}var u=[],c=!1,l,d=-1;function f(){!c||!l||(c=!1,l.length?u=l.concat(u):d=-1,u.length&&h())}function h(){if(!c){var _=s(f);c=!0;for(var E=u.length;E;){for(l=u,u=[];++d1)for(var w=1;w"u"&&(globalThis.process=zo());class FH extends MH.ActorInitQueryBase{}v_.ActorInitQuery=FH;var w_={},ct={},Zp={},rr={},Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.KeysRdfUpdateQuads=Mr.KeysRdfResolveQuadPattern=Mr.KeysRdfParseHtmlScript=Mr.KeysRdfParseJsonLd=Mr.KeysQueryOperation=Mr.KeysInitQuery=Mr.KeysHttpProxy=Mr.KeysHttpMemento=Mr.KeysHttpWayback=Mr.KeysHttp=Mr.KeysCore=void 0;const pt=et;Mr.KeysCore={log:pt.CONTEXT_KEY_LOGGER};Mr.KeysHttp={includeCredentials:new pt.ActionContextKey("@comunica/bus-http:include-credentials"),auth:new pt.ActionContextKey("@comunica/bus-http:auth"),fetch:new pt.ActionContextKey("@comunica/bus-http:fetch"),httpTimeout:new pt.ActionContextKey("@comunica/bus-http:http-timeout"),httpBodyTimeout:new pt.ActionContextKey("@comunica/bus-http:http-body-timeout"),httpRetryCount:new pt.ActionContextKey("@comunica/bus-http:http-retry-count"),httpRetryDelay:new pt.ActionContextKey("@comunica/bus-http:http-retry-delay"),httpRetryOnServerError:new pt.ActionContextKey("@comunica/bus-http:http-retry-on-server-error")};Mr.KeysHttpWayback={recoverBrokenLinks:new pt.ActionContextKey("@comunica/bus-http:recover-broken-links")};Mr.KeysHttpMemento={datetime:new pt.ActionContextKey("@comunica/actor-http-memento:datetime")};Mr.KeysHttpProxy={httpProxyHandler:new pt.ActionContextKey("@comunica/actor-http-proxy:httpProxyHandler")};Mr.KeysInitQuery={initialBindings:new pt.ActionContextKey("@comunica/actor-init-query:initialBindings"),queryFormat:new pt.ActionContextKey("@comunica/actor-init-query:queryFormat"),graphqlSingularizeVariables:new pt.ActionContextKey("@comunica/actor-init-query:singularizeVariables"),lenient:new pt.ActionContextKey("@comunica/actor-init-query:lenient"),queryString:new pt.ActionContextKey("@comunica/actor-init-query:queryString"),query:new pt.ActionContextKey("@comunica/actor-init-query:query"),baseIRI:new pt.ActionContextKey("@comunica/actor-init-query:baseIRI"),functionArgumentsCache:new pt.ActionContextKey("@comunica/actor-init-query:functionArgumentsCache"),queryTimestamp:new pt.ActionContextKey("@comunica/actor-init-query:queryTimestamp"),extensionFunctionCreator:new pt.ActionContextKey("@comunica/actor-init-query:extensionFunctionCreator"),extensionFunctions:new pt.ActionContextKey("@comunica/actor-init-query:extensionFunctions"),cliArgsHandlers:new pt.ActionContextKey("@comunica/actor-init-query:cliArgsHandlers"),explain:new pt.ActionContextKey("@comunica/actor-init-query:explain"),physicalQueryPlanLogger:new pt.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanLogger"),physicalQueryPlanNode:new pt.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanNode"),jsonLdContext:new pt.ActionContextKey("@context")};Mr.KeysQueryOperation={operation:new pt.ActionContextKey("@comunica/bus-query-operation:operation"),joinLeftMetadata:new pt.ActionContextKey("@comunica/bus-query-operation:joinLeftMetadata"),joinRightMetadatas:new pt.ActionContextKey("@comunica/bus-query-operation:joinRightMetadatas"),joinBindings:new pt.ActionContextKey("@comunica/bus-query-operation:joinBindings"),readOnly:new pt.ActionContextKey("@comunica/bus-query-operation:readOnly"),isPathArbitraryLengthDistinctKey:new pt.ActionContextKey("@comunica/bus-query-operation:isPathArbitraryLengthDistinct"),limitIndicator:new pt.ActionContextKey("@comunica/bus-query-operation:limitIndicator"),unionDefaultGraph:new pt.ActionContextKey("@comunica/bus-query-operation:unionDefaultGraph")};Mr.KeysRdfParseJsonLd={documentLoader:new pt.ActionContextKey("@comunica/actor-rdf-parse-jsonld:documentLoader"),strictValues:new pt.ActionContextKey("@comunica/actor-rdf-parse-jsonld:strictValues"),parserOptions:new pt.ActionContextKey("@comunica/actor-rdf-parse-jsonld:parserOptions")};Mr.KeysRdfParseHtmlScript={processingHtmlScript:new pt.ActionContextKey("@comunica/actor-rdf-parse-html-script:processingHtmlScript"),extractAllScripts:new pt.ActionContextKey("extractAllScripts")};Mr.KeysRdfResolveQuadPattern={sources:new pt.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:sources"),source:new pt.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:source"),sourceIds:new pt.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:sourceIds"),hypermediaSourcesAggregatedStores:new pt.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:hypermediaSourcesAggregatedStores")};Mr.KeysRdfUpdateQuads={destination:new pt.ActionContextKey("@comunica/bus-rdf-update-quads:destination")};(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Mr,t)})(rr);var S_={},T_={};Object.defineProperty(T_,"__esModule",{value:!0});T_.BlankNodeScoped=void 0;class LH{constructor(e,r){this.termType="BlankNode",this.value=e,this.skolemized=r}equals(e){return!!e&&e.termType==="BlankNode"&&e.value===this.value}}T_.BlankNodeScoped=LH;var E_={};Object.defineProperty(E_,"__esModule",{value:!0});E_.BlankNodeBindingsScoped=void 0;class BH{constructor(e){this.termType="BlankNode",this.singleBindingsScope=!0,this.value=e}equals(e){return!!e&&e.termType==="BlankNode"&&e.value===this.value}}E_.BlankNodeBindingsScoped=BH;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(T_,t),r(E_,t)})(S_);var tl={},$n={},e0={},t0={},nr={},Xn={},ht={},r0={};Object.defineProperty(r0,"__esModule",{value:!0});r0.BlankNode=void 0;let $H=class{constructor(e){this.termType="BlankNode",this.value=e}equals(e){return!!e&&e.termType==="BlankNode"&&e.value===this.value}};r0.BlankNode=$H;var O_={},n0={};Object.defineProperty(n0,"__esModule",{value:!0});n0.DefaultGraph=void 0;let vE=class{constructor(){this.termType="DefaultGraph",this.value=""}equals(e){return!!e&&e.termType==="DefaultGraph"}};n0.DefaultGraph=vE;vE.INSTANCE=new vE;var i0={},yf={};Object.defineProperty(yf,"__esModule",{value:!0});yf.NamedNode=void 0;let UH=class{constructor(e){this.termType="NamedNode",this.value=e}equals(e){return!!e&&e.termType==="NamedNode"&&e.value===this.value}};yf.NamedNode=UH;Object.defineProperty(i0,"__esModule",{value:!0});i0.Literal=void 0;const mC=yf;let SA=class wE{constructor(e,r){this.termType="Literal",this.value=e,typeof r=="string"?(this.language=r,this.datatype=wE.RDF_LANGUAGE_STRING):r?(this.language="",this.datatype=r):(this.language="",this.datatype=wE.XSD_STRING)}equals(e){return!!e&&e.termType==="Literal"&&e.value===this.value&&e.language===this.language&&this.datatype.equals(e.datatype)}};i0.Literal=SA;SA.RDF_LANGUAGE_STRING=new mC.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString");SA.XSD_STRING=new mC.NamedNode("http://www.w3.org/2001/XMLSchema#string");var a0={};Object.defineProperty(a0,"__esModule",{value:!0});a0.Quad=void 0;let qH=class{constructor(e,r,n,a){this.termType="Quad",this.value="",this.subject=e,this.predicate=r,this.object=n,this.graph=a}equals(e){return!!e&&(e.termType==="Quad"||!e.termType)&&this.subject.equals(e.subject)&&this.predicate.equals(e.predicate)&&this.object.equals(e.object)&&this.graph.equals(e.graph)}};a0.Quad=qH;var s0={};Object.defineProperty(s0,"__esModule",{value:!0});s0.Variable=void 0;let VH=class{constructor(e){this.termType="Variable",this.value=e}equals(e){return!!e&&e.termType==="Variable"&&e.value===this.value}};s0.Variable=VH;Object.defineProperty(O_,"__esModule",{value:!0});O_.DataFactory=void 0;const HH=r0,kH=n0,XI=i0,QH=yf,GH=a0,zH=s0;let WH=0,XH=class{constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${WH++}_`}namedNode(e){return new QH.NamedNode(e)}blankNode(e){return new HH.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,r){return new XI.Literal(e,r)}variable(e){return new zH.Variable(e)}defaultGraph(){return kH.DefaultGraph.INSTANCE}quad(e,r,n,a){return new GH.Quad(e,r,n,a||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(XI.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}};O_.DataFactory=XH;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(r0,t),r(O_,t),r(n0,t),r(i0,t),r(yf,t),r(a0,t),r(s0,t)})(ht);Object.defineProperty(Xn,"__esModule",{value:!0});Xn.stringQuadToQuad=Xn.quadToStringQuad=Xn.stringToTerm=Xn.getLiteralLanguage=Xn.getLiteralType=Xn.getLiteralValue=Xn.termToString=void 0;const KH=ht,vC=new KH.DataFactory;function Ro(t){if(t)switch(t.termType){case"NamedNode":return t.value;case"BlankNode":return"_:"+t.value;case"Literal":const e=t;return'"'+e.value+'"'+(e.datatype&&e.datatype.value!=="http://www.w3.org/2001/XMLSchema#string"&&e.datatype.value!=="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"?"^^"+e.datatype.value:"")+(e.language?"@"+e.language:"");case"Quad":return`<<${Ro(t.subject)} ${Ro(t.predicate)} ${Ro(t.object)}${t.graph.termType==="DefaultGraph"?"":" "+Ro(t.graph)}>>`;case"Variable":return"?"+t.value;case"DefaultGraph":return t.value}}Xn.termToString=Ro;function wC(t){const e=/^"([^]*)"/.exec(t);if(!e)throw new Error(t+" is not a literal");return e[1]}Xn.getLiteralValue=wC;function SC(t){const e=/^"[^]*"(?:\^\^([^"]+)|(@)[^@"]+)?$/.exec(t);if(!e)throw new Error(t+" is not a literal");return e[1]||(e[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")}Xn.getLiteralType=SC;function TC(t){const e=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/.exec(t);if(!e)throw new Error(t+" is not a literal");return e[1]?e[1].toLowerCase():""}Xn.getLiteralLanguage=TC;function xo(t,e){if(e=e||vC,!t||!t.length)return e.defaultGraph();switch(t[0]){case"_":return e.blankNode(t.substr(2));case"?":if(!e.variable)throw new Error("Missing 'variable()' method on the given DataFactory");return e.variable(t.substr(1));case'"':const r=TC(t),n=e.namedNode(SC(t));return e.literal(wC(t),r||n);case"<":default:if(t[0]==="<"&&t.length>4&&t[1]==="<"&&t[t.length-1]===">"&&t[t.length-2]===">"){const a=t.slice(2,-2).trim();let s=[],o=0,u=0,c=!1;for(let l=0;l"){if(o===0)throw new Error("Found closing tag without opening tag in "+t);o--}if(d==='"'){let f=!1,h=l;for(;h-- >0&&a[h]==="\\";)f=!f;f||(c=!c)}if(d===" "&&!c&&o===0){for(s.push(a.slice(u,l));a[l+1]===" ";)l+=1;u=l+1}}if(o!==0)throw new Error("Found opening tag without closing tag in "+t);if(s.push(a.slice(u,a.length)),s.length!==3&&s.length!==4)throw new Error("Nested quad syntax error "+t);return s=s.map(l=>l.startsWith("<")&&!l.includes(" ")?l.slice(1,-1):l),e.quad(xo(s[0]),xo(s[1]),xo(s[2]),s[3]?xo(s[3]):void 0)}return e.namedNode(t)}}Xn.stringToTerm=xo;function JH(t){return{subject:Ro(t.subject),predicate:Ro(t.predicate),object:Ro(t.object),graph:Ro(t.graph)}}Xn.quadToStringQuad=JH;function YH(t,e){return e=e||vC,e.quad(xo(t.subject,e),xo(t.predicate,e),xo(t.object,e),xo(t.graph,e))}Xn.stringQuadToQuad=YH;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.termToString=t.stringToTerm=t.stringQuadToQuad=t.quadToStringQuad=t.getLiteralValue=t.getLiteralType=t.getLiteralLanguage=void 0;const e=Xn;Object.defineProperty(t,"getLiteralLanguage",{enumerable:!0,get:function(){return e.getLiteralLanguage}}),Object.defineProperty(t,"getLiteralType",{enumerable:!0,get:function(){return e.getLiteralType}}),Object.defineProperty(t,"getLiteralValue",{enumerable:!0,get:function(){return e.getLiteralValue}}),Object.defineProperty(t,"quadToStringQuad",{enumerable:!0,get:function(){return e.quadToStringQuad}}),Object.defineProperty(t,"stringQuadToQuad",{enumerable:!0,get:function(){return e.stringQuadToQuad}}),Object.defineProperty(t,"stringToTerm",{enumerable:!0,get:function(){return e.stringToTerm}}),Object.defineProperty(t,"termToString",{enumerable:!0,get:function(){return e.termToString}})})(nr);Object.defineProperty(t0,"__esModule",{value:!0});t0.bindingsToString=void 0;const ZH=nr;function ek(t){const e={};for(const r of t.keys())e[r.value]=(0,ZH.termToString)(t.get(r));return JSON.stringify(e,null," ")}t0.bindingsToString=ek;Object.defineProperty(e0,"__esModule",{value:!0});e0.Bindings=void 0;const Cy=wA,tk=t0;class Su{constructor(e,r){this.type="bindings",this.dataFactory=e,this.entries=r}has(e){return this.entries.has(typeof e=="string"?e:e.value)}get(e){return this.entries.get(typeof e=="string"?e:e.value)}set(e,r){return new Su(this.dataFactory,this.entries.set(typeof e=="string"?e:e.value,r))}delete(e){return new Su(this.dataFactory,this.entries.delete(typeof e=="string"?e:e.value))}keys(){return this.mapIterable(this.iteratorToIterable(this.entries.keys()),e=>this.dataFactory.variable(e))}values(){return this.iteratorToIterable(this.entries.values())}forEach(e){this.entries.forEach((r,n)=>e(r,this.dataFactory.variable(n)))}get size(){return this.entries.size}[Symbol.iterator](){return this.mapIterable(this.iteratorToIterable(this.entries.entries()),([e,r])=>[this.dataFactory.variable(e),r])[Symbol.iterator]()}equals(e){var r;if(!e)return!1;if(this===e)return!0;if(this.size!==e.size)return!1;for(const n of this.keys())if(!((r=this.get(n))!=null&&r.equals(e.get(n))))return!1;return!0}filter(e){return new Su(this.dataFactory,(0,Cy.Map)(this.entries.filter((r,n)=>e(r,this.dataFactory.variable(n)))))}map(e){return new Su(this.dataFactory,(0,Cy.Map)(this.entries.map((r,n)=>e(r,this.dataFactory.variable(n)))))}merge(e){const r=new Set([...this.iteratorToIterable(this.entries.keys()),...[...e.keys()].map(a=>a.value)]),n=[];for(const a of r){const s=this.entries.get(a),o=e.get(this.dataFactory.variable(a));if(s&&o&&!s.equals(o))return;const u=s||o;n.push([a,u])}return new Su(this.dataFactory,(0,Cy.Map)(n))}mergeWith(e,r){const n=new Set([...this.iteratorToIterable(this.entries.keys()),...[...r.keys()].map(s=>s.value)]),a=[];for(const s of n){const o=this.dataFactory.variable(s),u=this.entries.get(s),c=r.get(o);let l;u&&c&&!u.equals(c)?l=e(u,c,o):l=u||c,a.push([s,l])}return new Su(this.dataFactory,(0,Cy.Map)(a))}toString(){return(0,tk.bindingsToString)(this)}*mapIterable(e,r){for(const n of e)yield r(n)}iteratorToIterable(e){return{[Symbol.iterator]:()=>e}}}e0.Bindings=Su;var A_={};Object.defineProperty(A_,"__esModule",{value:!0});A_.BindingsFactory=void 0;const rk=wA,nk=ht,ik=e0;class ak{constructor(e=new nk.DataFactory){this.dataFactory=e}bindings(e=[]){return new ik.Bindings(this.dataFactory,(0,rk.Map)(e.map(([r,n])=>[r.value,n])))}fromBindings(e){return this.bindings([...e])}fromRecord(e){return this.bindings(Object.entries(e).map(([r,n])=>[this.dataFactory.variable(r),n]))}}A_.BindingsFactory=ak;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(e0,t),r(A_,t),r(t0,t)})($n);var An={},st={};Object.defineProperty(st,"__esModule",{value:!0});st.matchPatternMappings=st.matchPatternComplete=st.matchPattern=st.matchTerm=st.getValueNestedPath=st.someTermsNested=st.someTerms=st.everyTermsNested=st.everyTerms=st.reduceTermsNested=st.reduceTerms=st.mapTermsNested=st.mapTerms=st.filterQuadTermNamesNested=st.filterQuadTermNames=st.filterTermsNested=st.filterTerms=st.forEachTermsNested=st.forEachTerms=st.collectNamedTerms=st.getNamedTerms=st.getTermsNested=st.getTerms=st.TRIPLE_TERM_NAMES=st.QUAD_TERM_NAMES=void 0;const sk=ht,TA=new sk.DataFactory;st.QUAD_TERM_NAMES=["subject","predicate","object","graph"];st.TRIPLE_TERM_NAMES=["subject","predicate","object"];function EC(t,e){return e&&t.graph.termType==="DefaultGraph"?[t.subject,t.predicate,t.object]:[t.subject,t.predicate,t.object,t.graph]}st.getTerms=EC;function OC(t,e){const r=[];for(const n of EC(t,e))n.termType==="Quad"?OC(n,e).forEach(a=>r.push(a)):r.push(n);return r}st.getTermsNested=OC;function ok(t){return[{key:"subject",value:t.subject},{key:"predicate",value:t.predicate},{key:"object",value:t.object},{key:"graph",value:t.graph}]}st.getNamedTerms=ok;function uk(t,e,r){const n={};return t.forEach(a=>n[a.key]=a.value),e&&(n.subject=n.subject||e("subject"),n.predicate=n.predicate||e("predicate"),n.object=n.object||e("object"),n.graph=n.graph||e("graph")),(r||TA).quad(n.subject,n.predicate,n.object,n.graph)}st.collectNamedTerms=uk;function ck(t,e){e(t.subject,"subject"),e(t.predicate,"predicate"),e(t.object,"object"),e(t.graph,"graph")}st.forEachTerms=ck;function Ih(t,e,r=[]){t.subject.termType==="Quad"?Ih(t.subject,e,[...r,"subject"]):e(t.subject,[...r,"subject"]),t.predicate.termType==="Quad"?Ih(t.predicate,e,[...r,"predicate"]):e(t.predicate,[...r,"predicate"]),t.object.termType==="Quad"?Ih(t.object,e,[...r,"object"]):e(t.object,[...r,"object"]),t.graph.termType==="Quad"?Ih(t.graph,e,[...r,"graph"]):e(t.graph,[...r,"graph"])}st.forEachTermsNested=Ih;function lk(t,e){const r=[];return e(t.subject,"subject")&&r.push(t.subject),e(t.predicate,"predicate")&&r.push(t.predicate),e(t.object,"object")&&r.push(t.object),e(t.graph,"graph")&&r.push(t.graph),r}st.filterTerms=lk;function Ph(t,e,r=[]){let n=[];return t.subject.termType==="Quad"?n=[...n,...Ph(t.subject,e,[...r,"subject"])]:e(t.subject,[...r,"subject"])&&n.push(t.subject),t.predicate.termType==="Quad"?n=[...n,...Ph(t.predicate,e,[...r,"predicate"])]:e(t.predicate,[...r,"predicate"])&&n.push(t.predicate),t.object.termType==="Quad"?n=[...n,...Ph(t.object,e,[...r,"object"])]:e(t.object,[...r,"object"])&&n.push(t.object),t.graph.termType==="Quad"?n=[...n,...Ph(t.graph,e,[...r,"graph"])]:e(t.graph,[...r,"graph"])&&n.push(t.graph),n}st.filterTermsNested=Ph;function dk(t,e){const r=[];return e(t.subject,"subject")&&r.push("subject"),e(t.predicate,"predicate")&&r.push("predicate"),e(t.object,"object")&&r.push("object"),e(t.graph,"graph")&&r.push("graph"),r}st.filterQuadTermNames=dk;function Dh(t,e,r=[]){let n=[];const a=[...r,"subject"];t.subject.termType==="Quad"?n=[...n,...Dh(t.subject,e,a)]:e(t.subject,a)&&n.push(a);const s=[...r,"predicate"];t.predicate.termType==="Quad"?n=[...n,...Dh(t.predicate,e,s)]:e(t.predicate,s)&&n.push(s);const o=[...r,"object"];t.object.termType==="Quad"?n=[...n,...Dh(t.object,e,o)]:e(t.object,o)&&n.push(o);const u=[...r,"graph"];return t.graph.termType==="Quad"?n=[...n,...Dh(t.graph,e,u)]:e(t.graph,u)&&n.push(u),n}st.filterQuadTermNamesNested=Dh;function fk(t,e,r){return(r||TA).quad(e(t.subject,"subject"),e(t.predicate,"predicate"),e(t.object,"object"),e(t.graph,"graph"))}st.mapTerms=fk;function Nh(t,e,r,n=[]){return(r||TA).quad(t.subject.termType==="Quad"?Nh(t.subject,e,r,[...n,"subject"]):e(t.subject,[...n,"subject"]),t.predicate.termType==="Quad"?Nh(t.predicate,e,r,[...n,"predicate"]):e(t.predicate,[...n,"predicate"]),t.object.termType==="Quad"?Nh(t.object,e,r,[...n,"object"]):e(t.object,[...n,"object"]),t.graph.termType==="Quad"?Nh(t.graph,e,r,[...n,"graph"]):e(t.graph,[...n,"graph"]))}st.mapTermsNested=Nh;function hk(t,e,r){let n=r;return n=e(n,t.subject,"subject"),n=e(n,t.predicate,"predicate"),n=e(n,t.object,"object"),e(n,t.graph,"graph")}st.reduceTerms=hk;function Ch(t,e,r,n=[]){let a=r;return t.subject.termType==="Quad"?a=Ch(t.subject,e,a,[...n,"subject"]):a=e(a,t.subject,[...n,"subject"]),t.predicate.termType==="Quad"?a=Ch(t.predicate,e,a,[...n,"predicate"]):a=e(a,t.predicate,[...n,"predicate"]),t.object.termType==="Quad"?a=Ch(t.object,e,a,[...n,"object"]):a=e(a,t.object,[...n,"object"]),t.graph.termType==="Quad"?a=Ch(t.graph,e,a,[...n,"graph"]):a=e(a,t.graph,[...n,"graph"]),a}st.reduceTermsNested=Ch;function AC(t,e){return e(t.subject,"subject")&&e(t.predicate,"predicate")&&e(t.object,"object")&&e(t.graph,"graph")}st.everyTerms=AC;function jh(t,e,r=[]){return(t.subject.termType==="Quad"?jh(t.subject,e,[...r,"subject"]):e(t.subject,[...r,"subject"]))&&(t.predicate.termType==="Quad"?jh(t.predicate,e,[...r,"predicate"]):e(t.predicate,[...r,"predicate"]))&&(t.object.termType==="Quad"?jh(t.object,e,[...r,"object"]):e(t.object,[...r,"object"]))&&(t.graph.termType==="Quad"?jh(t.graph,e,[...r,"graph"]):e(t.graph,[...r,"graph"]))}st.everyTermsNested=jh;function pk(t,e){return e(t.subject,"subject")||e(t.predicate,"predicate")||e(t.object,"object")||e(t.graph,"graph")}st.someTerms=pk;function Mh(t,e,r=[]){return(t.subject.termType==="Quad"?Mh(t.subject,e,[...r,"subject"]):e(t.subject,[...r,"subject"]))||(t.predicate.termType==="Quad"?Mh(t.predicate,e,[...r,"predicate"]):e(t.predicate,[...r,"predicate"]))||(t.object.termType==="Quad"?Mh(t.object,e,[...r,"object"]):e(t.object,[...r,"object"]))||(t.graph.termType==="Quad"?Mh(t.graph,e,[...r,"graph"]):e(t.graph,[...r,"graph"]))}st.someTermsNested=Mh;function RC(t,e){if(e.length===0)return t;if(t.termType==="Quad")return RC(t[e[0]],e.slice(1));throw new Error(`Tried to get ${e[0]} from term of type ${t.termType}`)}st.getValueNestedPath=RC;function Fh(t,e){return!e||e.termType==="Variable"||e.termType==="Quad"&&t.termType==="Quad"&&IC(t,e)||e.equals(t)}st.matchTerm=Fh;function xC(t,e,r,n,a){return Fh(t.subject,e)&&Fh(t.predicate,r)&&Fh(t.object,n)&&Fh(t.graph,a)}st.matchPattern=xC;function IC(t,e){return xC(t,e.subject,e.predicate,e.object,e.graph)}st.matchPatternComplete=IC;function yk(t,e,r={}){const n={};function a(s,o){return AC(s,(u,c)=>{var l,d;const f=o[c];switch(u.termType){case"Variable":return r.skipVarMapping&&f.termType==="Variable"||((d=(l=n[u.value])===null||l===void 0?void 0:l.equals(f))!==null&&d!==void 0?d:(n[u.value]=f,!0));case"Quad":return f.termType==="Quad"&&a(u,f);default:return u.equals(f)}})}return a(e,t)&&(r.returnMappings?n:!0)}st.matchPatternMappings=yk;var en={};Object.defineProperty(en,"__esModule",{value:!0});en.getQuads=en.getDefaultGraphs=en.getVariables=en.getLiterals=en.getBlankNodes=en.getNamedNodes=en.getTermsOfType=en.uniqTerms=en.TERM_TYPES=void 0;const bk=nr;en.TERM_TYPES=["NamedNode","BlankNode","Literal","Variable","DefaultGraph","Quad"];function _k(t){const e={};return t.filter(r=>{const n=(0,bk.termToString)(r);return!(n in e)&&(e[n]=!0)})}en.uniqTerms=_k;function fl(t,e){return t.filter(r=>r.termType===e)}en.getTermsOfType=fl;function gk(t){return fl(t,"NamedNode")}en.getNamedNodes=gk;function mk(t){return fl(t,"BlankNode")}en.getBlankNodes=mk;function vk(t){return fl(t,"Literal")}en.getLiterals=vk;function wk(t){return fl(t,"Variable")}en.getVariables=wk;function Sk(t){return fl(t,"DefaultGraph")}en.getDefaultGraphs=Sk;function Tk(t){return fl(t,"Quad")}en.getQuads=Tk;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(st,t),r(en,t)})(An);var xt={},EA={},Ek=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(a=n;a--!==0;)if(!t(e[a],r[a]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(a of e.entries())if(!r.has(a[0]))return!1;for(a of e.entries())if(!t(a[1],r.get(a[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(a of e.entries())if(!r.has(a[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if(n=e.length,n!=r.length)return!1;for(a=n;a--!==0;)if(e[a]!==r[a])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=n;a--!==0;){var o=s[a];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r},bf={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.expressionTypes=t.types=void 0,function(e){e.ALT="alt",e.ASK="ask",e.BGP="bgp",e.CONSTRUCT="construct",e.DESCRIBE="describe",e.DISTINCT="distinct",e.EXPRESSION="expression",e.EXTEND="extend",e.FILTER="filter",e.FROM="from",e.GRAPH="graph",e.GROUP="group",e.INV="inv",e.JOIN="join",e.LEFT_JOIN="leftjoin",e.LINK="link",e.MINUS="minus",e.NOP="nop",e.NPS="nps",e.ONE_OR_MORE_PATH="OneOrMorePath",e.ORDER_BY="orderby",e.PATH="path",e.PATTERN="pattern",e.PROJECT="project",e.REDUCED="reduced",e.SEQ="seq",e.SERVICE="service",e.SLICE="slice",e.UNION="union",e.VALUES="values",e.ZERO_OR_MORE_PATH="ZeroOrMorePath",e.ZERO_OR_ONE_PATH="ZeroOrOnePath",e.COMPOSITE_UPDATE="compositeupdate",e.DELETE_INSERT="deleteinsert",e.LOAD="load",e.CLEAR="clear",e.CREATE="create",e.DROP="drop",e.ADD="add",e.MOVE="move",e.COPY="copy"}(t.types||(t.types={})),function(e){e.AGGREGATE="aggregate",e.EXISTENCE="existence",e.NAMED="named",e.OPERATOR="operator",e.TERM="term",e.WILDCARD="wildcard"}(t.expressionTypes||(t.expressionTypes={}))})(bf);var _f={},OA={};let R_=class{constructor(){return Ok||this}equals(e){return e&&this.termType===e.termType}};Object.defineProperty(R_.prototype,"value",{enumerable:!0,value:"*"});Object.defineProperty(R_.prototype,"termType",{enumerable:!0,value:"Wildcard"});var Ok=new R_;OA.Wildcard=R_;var Ak=function(){var t=function(xe,Oe,Pe,Le){for(Pe=Pe||{},Le=xe.length;Le--;Pe[xe[Le]]=Oe);return Pe},e=[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],r=[2,247],n=[100,110,113,115,116,123,126,131,329,330,331,332,333],a=[2,409],s=[1,18],o=[1,27],u=[13,16,45,197,224,229,308],c=[28,29,53],l=[28,53],d=[1,42],f=[1,45],h=[1,41],p=[1,44],b=[123,126],_=[1,67],E=[39,45,87],w=[13,16,45,197,224,308],O=[1,87],A=[2,281],T=[1,86],I=[13,16,45,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],D=[6,28,29,53,63,70,73,81,83,85],U=[6,13,16,28,29,53,63,70,73,81,83,85,87,308],H=[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],N=[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],x=[13,16,308],F=[112,132,327,334],X=[13,16,112,132,308],ne=[1,111],$=[1,117],j=[112,132,327,328,334],Q=[13,16,112,132,308,328],se=[28,29,45,53,87],ie=[1,138],be=[1,151],he=[1,128],Te=[1,127],Ne=[1,129],ye=[1,140],ce=[1,141],Re=[1,142],oe=[1,143],J=[1,144],le=[1,145],pe=[1,147],L=[1,148],P=[2,457],g=[1,158],y=[1,159],v=[1,160],C=[1,152],V=[1,153],q=[1,156],G=[1,171],Y=[1,172],ee=[1,173],ae=[1,174],ve=[1,175],me=[1,176],Ee=[1,167],k=[1,168],W=[1,169],M=[1,170],S=[1,157],R=[1,166],z=[1,161],ue=[1,162],ge=[1,163],we=[1,164],Me=[1,165],Ue=[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],Ge=[1,195],We=[6,31,73,81,83,85],lt=[2,285],Wr=[1,199],br=[1,201],Br=[6,31,70,73,81,83,85],Qt=[2,283],_r=[1,207],Pr=[1,218],kr=[1,223],Rn=[1,219],Tt=[1,225],B=[1,226],re=[1,224],Se=[6,63,70,73,81,83,85],Fe=[1,236],Ae=[2,334],ze=[1,243],De=[1,241],Be=[6,193],Je=[2,349],Pt=[2,339],at=[28,128],qe=[47,48,193,272],hs=[47,48,193,242,272],ke=[47,48,193,242,246,272],yn=[47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,341,342,343,344,345,346],gr=[39,47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,338,341,342,343,344,345,346],mr=[1,271],Pi=[1,270],vt=[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],ya=[1,281],ki=[1,280],ir=[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],to=[45,89],ru=[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],Xr=[13,16,31,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],Di=[31,89],an=[48,87],Qi=[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],sn=[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],Na=[1,313],Zr=[6,85],ps=[6,31,81,83,85],Ca=[2,361],ai=[2,353],qn=[1,343],nu=[31,112,335],ja=[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],Il=[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],te=[6,109,193],de=[31,112],_e=[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],$e=[1,390],He=[1,391],Xe=[13,16,87,197,308,314],gt=[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],Bt=[1,417],Yt=[1,418],Dr=[13,16,48,197,229,308],Xt=[6,31,85],vr=[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],si=[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],Vn=[29,31,85,112,159,160,161,163,164],xn=[1,443],oi=[1,444],Ma=[1,449],bn=[31,112,193,232,318,335],ro=[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],uc=[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],cc=[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],Gt=[13,16,31,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],_n=[31,45],no=[1,507],iu=[1,508],cy=[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],ly=[29,31,85,112,159,160,161,163,164,335],lc=[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],Ox=[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],Ax=[2,352],D3=[13,16,197,308,314],Rx=[1,565],Pl=[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],xx=[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],io=[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],Ix=[13,16,87,308],ao=[2,364],Dl=[29,31,85,112,159,160,161,163,164,193,232,318,335],dy=[31,112,193,232,272,318,335],so=[2,359],Px=[13,16,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],fy=[29,31,85,112,159,160,161,163,164,193,232,272,318,335],Dx=[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],Nx=[2,347],N3={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(Oe,Pe,Le,nt,ot,K,Gi){var Z=K.length-1;switch(ot){case 1:if(K[Z-1]=K[Z-1]||{},Rt.base&&(K[Z-1].base=Rt.base),Rt.base="",K[Z-1].prefixes=Rt.prefixes,Rt.prefixes=null,Rt.pathOnly){if(K[Z-1].type==="path"||"termType"in K[Z-1])return K[Z-1];throw new Error("Received full SPARQL query in path only mode")}else if(K[Z-1].type==="path"||"termType"in K[Z-1])throw new Error("Received only path in full SPARQL mode");if(K[Z-1].type==="update"){const Et={};for(const Kt of K[Z-1].updates)if(Kt.updateType==="insert"){const mt={};for(const Pn of Kt.insert)if(Pn.type==="bgp"||Pn.type==="graph")for(const Dn of Pn.triples)Dn.subject.termType==="BlankNode"&&(mt[Dn.subject.value]=!0),Dn.predicate.termType==="BlankNode"&&(mt[Dn.predicate.value]=!0),Dn.object.termType==="BlankNode"&&(mt[Dn.object.value]=!0);for(const Pn of Object.keys(mt)){if(Et[Pn])throw new Error("Detected reuse blank node across different INSERT DATA clauses");Et[Pn]=!0}}}return K[Z-1];case 2:this.$={...K[Z-1],...K[Z],type:"query"};break;case 4:Rt.base=Ff(K[Z]);break;case 5:Rt.prefixes||(Rt.prefixes={}),K[Z-1]=K[Z-1].substr(0,K[Z-1].length-1),K[Z]=Ff(K[Z]),Rt.prefixes[K[Z-1]]=K[Z];break;case 6:this.$={...K[Z-3],...hc(K[Z-2]),...K[Z-1],...K[Z]};break;case 7:if(!Rt.skipValidation&&(U3(K[Z-3].variables.map(Kt=>$3(Kt.expression))).some(Kt=>Kt.aggregation==="count"&&!(Kt.expression instanceof hy))||K[Z].group)){for(const Kt of K[Z-3].variables)if(Kt.termType==="Variable"){if(!K[Z].group||!K[Z].group.map(mt=>Fl(mt)).includes(Fl(Kt)))throw Error("Projection of ungrouped variable (?"+Fl(Kt)+")")}else if($3(Kt.expression).length===0){const mt=p$(Kt.expression);for(const Pn of mt)if(!K[Z].group||!K[Z].group.map||!K[Z].group.map(Dn=>Fl(Dn)).includes(Fl(Pn)))throw Error("Use of ungrouped variable in projection of operation (?"+Fl(Pn)+")")}}const Ll=K[Z-1].where.filter(Et=>Et.type==="query");if(Ll.length>0){const Et=K[Z-3].variables.filter(mt=>mt.variable&&mt.variable.value).map(mt=>mt.variable.value),Kt=U3(Ll.map(mt=>mt.variables)).map(mt=>mt.value||mt.variable.value);for(const mt of Et)if(Kt.indexOf(mt)>=0)throw Error("Target id of 'AS' (?"+mt+") already used in subquery")}this.$=Kr(K[Z-3],hc(K[Z-2]),K[Z-1],K[Z]);break;case 8:this.$=Kr({queryType:"CONSTRUCT",template:K[Z-3]},hc(K[Z-2]),K[Z-1],K[Z]);break;case 9:this.$=Kr({queryType:"CONSTRUCT",template:K[Z-2]=K[Z-2]?K[Z-2].triples:[]},hc(K[Z-5]),{where:[{type:"bgp",triples:Nl([],K[Z-2])}]},K[Z]);break;case 10:this.$=Kr({queryType:"DESCRIBE",variables:K[Z-3]==="*"?[new hy]:K[Z-3]},hc(K[Z-2]),K[Z-1],K[Z]);break;case 11:this.$=Kr({queryType:"ASK"},hc(K[Z-2]),K[Z-1],K[Z]);break;case 12:this.$=Kr(K[Z-1],{variables:[new hy]});break;case 13:const k3=K[Z].map(Et=>Et.value||Et.variable.value),my=y$(k3);if(my.length>0)throw Error("Two or more of the resulting columns have the same name (?"+my[0]+")");this.$=Kr(K[Z-1],{variables:K[Z]});break;case 14:this.$=Kr({queryType:"SELECT"},K[Z]&&(K[Z-1]=ui(K[Z]),K[Z]={},K[Z][K[Z-1]]=!0,K[Z]));break;case 16:case 27:this.$=Cl(K[Z-3],{variable:K[Z-1]});break;case 17:case 18:this.$=Kr(K[Z-3],K[Z-2],K[Z-1],K[Z],{type:"query"});break;case 19:case 58:this.$={iri:K[Z],named:!!K[Z-1]};break;case 20:this.$={where:K[Z].patterns};break;case 21:this.$=Kr(K[Z-1],K[Z]);break;case 22:this.$=Kr(K[Z-2],K[Z-1],K[Z]);break;case 23:this.$={group:K[Z]};break;case 24:case 25:case 28:case 31:case 33:case 34:this.$=Cl(K[Z]);break;case 26:this.$=Cl(K[Z-1]);break;case 29:this.$={having:K[Z]};break;case 30:this.$={order:K[Z]};break;case 32:this.$=Cl(K[Z],{descending:!0});break;case 35:this.$={limit:Ml(K[Z])};break;case 36:this.$={offset:Ml(K[Z])};break;case 37:this.$={limit:Ml(K[Z-2]),offset:Ml(K[Z])};break;case 38:this.$={limit:Ml(K[Z]),offset:Ml(K[Z-2])};break;case 39:case 43:this.$={type:"values",values:K[Z]};break;case 40:case 84:this.$=K[Z-1].map(Et=>({[K[Z-3]]:Et}));break;case 41:case 85:this.$=K[Z-1].map(()=>({}));break;case 42:case 86:var au=K[Z-4].length;K[Z-4]=K[Z-4].map(C3),this.$=K[Z-1].map(function(Et){if(Et.length!==au)throw Error("Inconsistent VALUES length");for(var Kt={},mt=0;mtKt.type==="bind")){const Kt=K[Z-1].indexOf(Et),mt=new Set;for(const Pn of K[Z-1].slice(0,Kt))(Pn.type==="group"||Pn.type==="bgp")&&qx(Pn).forEach(Dn=>mt.add(Dn));if(mt.has(Et.variable.value))throw Error("Variable used to bind is already bound (?"+Et.variable.value+")")}this.$={type:"group",patterns:K[Z-1]};break;case 71:this.$=K[Z-1]?ys([K[Z-1]],K[Z]):ys(K[Z]);break;case 72:this.$=K[Z]?[K[Z-2],K[Z]]:K[Z-2];break;case 75:this.$=Kr(K[Z],{type:"optional"});break;case 76:this.$=Kr(K[Z],{type:"minus"});break;case 77:this.$=Kr(K[Z],{type:"graph",name:K[Z-1]});break;case 78:this.$=Kr(K[Z],{type:"service",name:K[Z-1],silent:!!K[Z-2]});break;case 79:this.$={type:"filter",expression:K[Z]};break;case 80:this.$={type:"bind",variable:K[Z-1],expression:K[Z-3]};break;case 89:this.$=Bf(K[Z]);break;case 90:this.$=void 0;break;case 91:this.$=K[Z-1].length?{type:"union",patterns:ys(K[Z-1].map(M3),[M3(K[Z])])}:K[Z];break;case 95:this.$={...K[Z],function:K[Z-1]};break;case 96:this.$={type:"functionCall",args:[]};break;case 97:this.$={type:"functionCall",args:fc(K[Z-2],K[Z-1]),distinct:!!K[Z-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.$=fc(K[Z-2],K[Z-1]);break;case 101:this.$=ys(K[Z-2],[K[Z-1]]);break;case 102:case 112:this.$=V3(K[Z].map(Et=>Kr(oo(K[Z-1]),Et)));break;case 103:this.$=V3(Nl(K[Z].map(Et=>Kr(oo(K[Z-1].entity),Et)),K[Z-1].triples));break;case 105:this.$=ys([K[Z-1]],K[Z]);break;case 106:this.$=ys(K[Z]);break;case 107:this.$=B3(K[Z-1],K[Z]);break;case 109:case 237:this.$=Rt.factory.namedNode(i$);break;case 110:case 118:this.$=fc(K[Z-1],K[Z]);break;case 111:this.$=K[Z]?{annotation:K[Z],object:K[Z-1]}:K[Z-1];break;case 113:this.$=K[Z]?V3(Nl(K[Z].map(Et=>Kr(oo(K[Z-1].entity),Et)),K[Z-1].triples)):K[Z-1].triples;break;case 114:this.$=B3(...K[Z-1],K[Z]);break;case 116:this.$=B3(...K[Z]);break;case 117:case 159:case 163:this.$=[K[Z-1],K[Z]];break;case 119:this.$=K[Z]?{object:K[Z-1],annotation:K[Z]}:K[Z-1];break;case 120:this.$=K[Z-1].length?jl("|",fc(K[Z-1],K[Z])):K[Z];break;case 121:this.$=K[Z-1].length?jl("/",fc(K[Z-1],K[Z])):K[Z];break;case 122:this.$=K[Z]?jl(K[Z],[K[Z-1]]):K[Z-1];break;case 123:this.$=K[Z-1]?jl(K[Z-1],[K[Z]]):K[Z];break;case 125:case 131:this.$=jl(K[Z-1],[K[Z]]);break;case 129:this.$=jl("|",fc(K[Z-2],K[Z-1]));break;case 132:case 134:this.$=f$(K[Z-1]);break;case 133:case 135:this.$=h$(K[Z-1]);break;case 140:this.$={entity:K[Z],triples:[]};break;case 145:this.$=C3(K[Z]);break;case 149:this.$=Rt.factory.namedNode(Cx);break;case 151:case 153:case 158:case 162:this.$=j3(K[Z-1],K[Z]);break;case 152:this.$=["||",K[Z]];break;case 154:this.$=["&&",K[Z]];break;case 156:this.$=In(K[Z-1],[K[Z-2],K[Z]]);break;case 157:this.$=In(K[Z-2]?"notin":"in",[K[Z-3],K[Z]]);break;case 160:this.$=["+",j3(K[Z-1],K[Z])];break;case 161:var _y=bs(K[Z-1].value.replace("-",""),K[Z-1].datatype);this.$=["-",j3(_y,K[Z])];break;case 164:this.$=In("UPLUS",[K[Z]]);break;case 165:this.$=In(K[Z-1],[K[Z]]);break;case 166:this.$=In("UMINUS",[K[Z]]);break;case 177:this.$=In(ui(K[Z-1]));break;case 178:this.$=In(ui(K[Z-3]),[K[Z-1]]);break;case 179:this.$=Bf(In(ui(K[Z-3]),[K[Z-1]]));break;case 180:this.$=In(ui(K[Z-5]),[K[Z-3],K[Z-1]]);break;case 181:this.$=In(ui(K[Z-7]),[K[Z-5],K[Z-3],K[Z-1]]);break;case 182:this.$=Bf(In(ui(K[Z-7]),[K[Z-5],K[Z-3],K[Z-1]]));break;case 183:this.$=In(ui(K[Z-1]),K[Z]);break;case 184:this.$=In("bound",[C3(K[Z-1])]);break;case 185:this.$=In(K[Z-1],[]);break;case 186:this.$=In(K[Z-3],[K[Z-1]]);break;case 187:this.$=In(K[Z-2]?"notexists":"exists",[M3(K[Z])]);break;case 188:case 189:this.$=Cl(K[Z-1],{type:"aggregate",aggregation:ui(K[Z-4]),distinct:!!K[Z-2]});break;case 190:this.$=Cl(K[Z-2],{type:"aggregate",aggregation:ui(K[Z-5]),distinct:!!K[Z-3],separator:typeof K[Z-1]=="string"?K[Z-1]:" "});break;case 192:this.$=bs(K[Z]);break;case 193:this.$=u$(K[Z-1],ui(K[Z].substr(1)));break;case 194:this.$=bs(K[Z-2],K[Z]);break;case 195:case 204:this.$=bs(K[Z],jx);break;case 196:case 205:this.$=bs(K[Z],Mx);break;case 197:case 206:this.$=bs(ui(K[Z]),Fx);break;case 200:this.$=bs(K[Z].toLowerCase(),o$);break;case 201:this.$=bs(K[Z].substr(1),jx);break;case 202:this.$=bs(K[Z].substr(1),Mx);break;case 203:this.$=bs(K[Z].substr(1).toLowerCase(),Fx);break;case 207:case 208:this.$=Ux(K[Z],1);break;case 209:case 210:this.$=Ux(K[Z],3);break;case 211:this.$=Rt.factory.namedNode(Ff(K[Z]));break;case 213:var gy=K[Z].indexOf(":"),Jr=K[Z].substr(0,gy),_s=Rt.prefixes[Jr];if(!_s)throw new Error("Unknown prefix: "+Jr);var pc=Ff(_s+K[Z].substr(gy+1));this.$=Rt.factory.namedNode(pc);break;case 214:if(K[Z]=K[Z].substr(0,K[Z].length-1),!(K[Z]in Rt.prefixes))throw new Error("Unknown prefix: "+K[Z]);var pc=Ff(Rt.prefixes[K[Z]]);this.$=Rt.factory.namedNode(pc);break;case 215:this.$=Lf(K[Z].replace(/^(_:)/,""));break;case 216:this.$=Lf();break;case 217:case 218:case 232:this.$=Bf(F3(K[Z-3],K[Z-2],K[Z-1]));break;case 230:case 231:this.$=Bf(K[Z-1]);break;case 248:case 250:case 252:case 254:case 256:case 260:case 264:case 268:case 270:case 292:case 294:case 296:case 298:case 300:case 302:case 304:case 306:case 329:case 342:case 356:case 368:case 370:case 372:case 374:case 392:case 402:case 425:case 427:case 429:case 431:case 441:case 445:case 447:case 449:K[Z-1].push(K[Z]);break;case 259:case 269:case 291:case 293:case 295:case 301:case 305:case 371:case 424:case 426:this.$=[K[Z]];break;case 308:K[Z-3].push(K[Z-2]);break;case 350:case 362:case 376:case 380:case 382:case 386:case 396:case 406:case 410:case 412:case 421:K[Z-2].push(K[Z-1]);break}},table:[t(e,r,{3:1,4:2,10:3}),{1:[3]},t(n,[2,307],{5:4,7:5,321:6,214:7,8:8,96:9,215:10,17:11,21:12,97:16,38:17,6:[2,238],13:a,16:a,45:a,197:a,224:a,229:a,308:a,24:[1,13],32:[1,14],36:[1,15],41:s}),t([6,13,16,24,32,36,41,45,100,110,113,115,116,123,126,131,197,224,229,308,329,330,331,332,333],[2,3],{322:19,11:20,14:21,12:[1,22],15:[1,23]}),{6:[1,24]},{6:[2,240]},{6:[2,241]},{6:[2,242]},{6:[2,243],9:25,84:26,85:o},{6:[2,239]},t(u,[2,411],{216:28,217:29}),t(c,[2,249],{18:30}),t(c,[2,251],{22:31}),t(l,[2,255],{25:32,27:33,29:[1,34]}),{13:d,16:f,33:35,39:[1,37],44:39,55:40,87:h,139:38,307:43,308:p,323:36},t(c,[2,267],{37:46}),t(b,[2,326],{98:47,103:49,106:50,117:55,130:61,100:[1,48],110:[1,51],113:[1,52],115:[1,53],116:[1,54],131:[1,62],329:[1,56],330:[1,57],331:[1,58],332:[1,59],333:[1,60]}),{39:[1,63],40:64,43:65,44:66,45:_,87:h},t(E,[2,273],{42:68,324:69,325:[1,70],326:[1,71]}),t(e,[2,248]),t(e,[2,245]),t(e,[2,246]),{13:[1,72]},{16:[1,73]},{1:[2,1]},{6:[2,2]},{6:[2,244]},{45:[1,77],85:[1,78],86:74,87:[1,75],89:[1,76]},t([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],[2,120],{337:[1,79]}),t(w,[2,418],{218:80,222:81,229:[1,82]}),{19:83,28:O,29:A,52:84,53:T,56:85},{19:88,28:O,29:A,52:89,53:T,56:85},t(c,[2,253],{26:90}),{28:[1,91],52:92,53:T},t(I,[2,385],{181:93,182:94,183:95,31:[2,383]}),t(D,[2,263],{34:96}),t(D,[2,261],{44:39,55:40,307:43,139:97,13:d,16:f,87:h,308:p}),t(D,[2,262]),t(U,[2,259]),t(H,[2,143]),t(H,[2,144]),t([6,13,16,28,29,31,39,45,47,48,53,63,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,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,314,317,318,335,338,341,342,343,344,345,346,347,348,349,350,351],[2,145]),t(N,[2,211]),t(N,[2,212]),t(N,[2,213]),t(N,[2,214]),{19:98,28:O,29:A,52:99,53:T,56:85},{6:[2,309],99:100,193:[1,101]},t(x,[2,311],{101:102,328:[1,103]}),t(F,[2,317],{104:104,328:[1,105]}),t(X,[2,322],{107:106,328:[1,107]}),{111:108,112:[2,324],328:[1,109]},{29:ne,114:110},{29:ne,114:112},{29:ne,114:113},{118:114,123:[1,115],125:116,126:$},t(j,[2,315]),t(j,[2,316]),t(Q,[2,319]),t(Q,[2,320]),t(Q,[2,321]),t(b,[2,327]),{13:d,16:f,55:118,307:43,308:p},t(c,[2,12]),t(c,[2,13],{44:66,43:119,45:_,87:h}),t(se,[2,269]),t(se,[2,15]),{13:d,16:f,44:136,45:ie,46:120,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(E,[2,14]),t(E,[2,274]),t(E,[2,271]),t(E,[2,272]),t(e,[2,4]),{13:[1,177]},t(Ue,[2,39]),{29:[1,178]},{29:[1,179]},{87:[1,181],91:180},{45:[1,187],87:[1,185],89:[1,186],93:182,165:183,166:184},t(u,[2,410]),t([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],[2,121],{338:[1,188]}),{13:d,16:f,45:[1,193],55:194,197:Ge,219:189,220:190,223:191,224:[1,192],307:43,308:p},t(w,[2,419]),t(We,lt,{20:196,59:197,69:198,70:Wr}),t(c,[2,250]),{29:br,57:200},t(x,[2,279],{54:202,327:[1,203]}),{29:[2,282]},t(Br,Qt,{23:204,58:205,62:206,63:_r}),t(c,[2,252]),{19:208,28:O,29:A,52:209,53:T,56:85},{29:[1,210]},t(l,[2,256]),{31:[1,211]},{31:[2,384]},{13:d,16:f,44:215,45:Pr,55:220,82:be,87:h,89:kr,145:212,172:221,185:213,187:214,231:Rn,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(Se,[2,265],{56:85,35:227,52:228,19:229,28:O,29:A,53:T}),t(U,[2,260]),t(Br,Qt,{58:205,62:206,23:230,63:_r}),t(c,[2,268]),{6:[2,45]},t(e,r,{10:3,4:231}),{13:d,16:f,55:232,307:43,308:p},t(x,[2,312]),{105:233,112:Fe,122:234,132:[1,237],134:235,327:[1,238],334:[1,239]},t(F,[2,318]),t(x,Ae,{108:240,133:242,112:ze,132:De}),t(X,[2,323]),{112:[1,244]},{112:[2,325]},t(Be,[2,50]),t(I,Je,{135:245,136:246,143:247,144:248,31:Pt,112:Pt}),t(Be,[2,51]),t(Be,[2,52]),t(at,[2,328],{119:249}),{29:ne,114:250},t(at,[2,56]),{29:ne,114:251},t(b,[2,59]),t(se,[2,270]),{47:[1,252]},t(qe,[2,150]),t(hs,[2,428],{240:253}),t(ke,[2,430],{244:254}),t(ke,[2,155],{248:255,249:256,250:[2,438],290:[1,257],341:[1,258],342:[1,259],343:[1,260],344:[1,261],345:[1,262],346:[1,263]}),t(yn,[2,440],{252:264}),t(gr,[2,448],{260:265}),{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,255:154,257:155,264:266,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,255:154,257:155,264:267,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,255:154,257:155,264:268,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(gr,[2,167]),t(gr,[2,168]),t(gr,[2,169]),t(gr,[2,170],{176:269,45:mr,89:Pi}),t(gr,[2,171]),t(gr,[2,172]),t(gr,[2,173]),t(gr,[2,174]),{13:d,16:f,44:136,45:ie,46:272,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(vt,[2,176]),{89:[1,273]},{45:[1,274]},{45:[1,275]},{45:[1,276]},{45:[1,277]},{45:[1,278]},{45:ya,89:ki,179:279},{45:[1,282]},{45:[1,284],89:[1,283]},{279:[1,285]},t(ir,[2,192],{292:[1,286],293:[1,287]}),t(ir,[2,195]),t(ir,[2,196]),t(ir,[2,197]),t(ir,[2,198]),t(ir,[2,199]),t(ir,[2,200]),{13:d,16:f,44:39,55:40,82:be,87:h,139:289,172:291,255:154,257:155,266:290,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,320:288},{45:[1,292]},{45:[1,293]},{45:[1,294]},t(to,[2,452]),t(to,[2,453]),t(to,[2,454]),t(to,[2,455]),t(to,[2,456]),{279:[2,458]},t(ru,[2,207]),t(ru,[2,208]),t(ru,[2,209]),t(ru,[2,210]),t(ir,[2,201]),t(ir,[2,202]),t(ir,[2,203]),t(ir,[2,204]),t(ir,[2,205]),t(ir,[2,206]),t(e,[2,5]),t(Xr,[2,297],{88:295}),t(Di,[2,299],{90:296}),{48:[1,297],87:[1,298]},t(an,[2,301]),t(Ue,[2,43]),t(Ue,[2,82]),t(Ue,[2,83]),{29:[1,299]},{29:[1,300]},{87:[1,302],169:301},t(u,[2,412]),t(Qi,[2,123]),t(Qi,[2,416],{221:303,339:304,39:[1,306],263:[1,307],340:[1,305]}),t(sn,[2,124]),{13:d,16:f,45:[1,311],55:194,89:[1,310],197:Ge,223:312,225:308,226:309,229:Na,307:43,308:p},t(u,a,{215:10,214:314}),t(sn,[2,236]),t(sn,[2,237]),t(Zr,[2,6]),t(ps,[2,287],{60:315,72:316,73:[1,317]}),t(We,[2,286]),{13:d,16:f,45:ie,55:323,67:321,68:322,71:318,77:320,79:319,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,307:43,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me},t([6,31,63,70,73,81,83,85],[2,20]),t(I,Ca,{38:17,49:324,147:325,17:326,21:327,148:328,154:329,155:330,29:ai,31:ai,85:ai,112:ai,159:ai,160:ai,161:ai,163:ai,164:ai,41:s}),{13:d,16:f,55:331,307:43,308:p},t(x,[2,280]),t(Zr,[2,7]),t(We,lt,{59:197,69:198,20:332,70:Wr}),t(Br,[2,284]),{64:[1,333]},t(Br,Qt,{58:205,62:206,23:334,63:_r}),t(c,[2,254]),t(I,Je,{144:248,30:335,143:336,31:[2,257]}),t(c,[2,100]),{31:[2,387],184:337,335:[1,338]},{13:d,16:f,44:39,55:40,87:h,139:342,186:339,190:340,195:341,197:qn,307:43,308:p},t(nu,[2,389],{44:39,55:40,307:43,190:340,195:341,139:342,188:344,189:345,186:346,13:d,16:f,87:h,197:qn,308:p}),t(ja,[2,227]),t(ja,[2,228]),t(ja,[2,229]),{13:d,16:f,44:215,45:Pr,55:220,82:be,87:h,89:kr,172:221,185:351,187:350,200:348,230:347,231:Rn,234:349,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},{13:d,16:f,44:39,55:40,87:h,139:342,186:352,190:340,195:341,197:qn,307:43,308:p},t(ja,[2,146]),t(ja,[2,147]),t(ja,[2,148]),t(ja,[2,149]),{13:d,16:f,44:354,55:355,82:be,87:h,172:357,237:356,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:358,312:re,313:353},t(Il,[2,215]),t(Il,[2,216]),t(Br,Qt,{58:205,62:206,23:359,63:_r}),t(D,[2,264]),t(Se,[2,266]),t(Zr,[2,11]),t(n,[2,308],{6:[2,310]}),t(Be,[2,313],{102:360,120:361,121:[1,362]}),t(Be,[2,47]),t(Be,[2,63]),t(Be,[2,64]),{13:d,16:f,55:363,307:43,308:p},t(Be,[2,336]),t(Be,[2,337]),t(Be,[2,338]),{109:[1,364]},t(te,[2,60]),{13:d,16:f,55:365,307:43,308:p},t(x,[2,335]),{13:d,16:f,55:366,307:43,308:p},{31:[1,367]},t(de,[2,341],{137:368}),t(de,[2,340]),{13:d,16:f,44:215,45:Pr,55:220,82:be,87:h,89:kr,145:369,172:221,185:213,187:214,231:Rn,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},{28:[1,370],127:371,128:[1,372]},t(at,[2,330],{124:373,125:374,126:$}),t(at,[2,57]),{44:375,87:h},t(qe,[2,151],{241:376,242:[1,377]}),t(hs,[2,153],{245:378,246:[1,379]}),{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,247:380,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{250:[1,381]},t(_e,[2,432]),t(_e,[2,433]),t(_e,[2,434]),t(_e,[2,435]),t(_e,[2,436]),t(_e,[2,437]),{250:[2,439]},t([47,48,193,242,246,250,272,290,341,342,343,344,345,346],[2,158],{253:382,254:383,255:384,257:385,263:[1,386],265:[1,387],297:G,298:Y,299:ee,300:ae,301:ve,302:me}),t(yn,[2,162],{261:388,262:389,39:$e,338:He}),t(gr,[2,164]),t(gr,[2,165]),t(gr,[2,166]),t(vt,[2,95]),t(vt,[2,96]),t(_e,[2,377],{177:392,325:[1,393]}),{48:[1,394]},t(vt,[2,177]),{13:d,16:f,44:136,45:ie,46:395,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:396,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:397,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:398,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:399,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(vt,[2,183]),t(vt,[2,98]),t(_e,[2,381],{180:400}),{87:[1,401]},t(vt,[2,185]),{13:d,16:f,44:136,45:ie,46:402,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{29:br,57:403},t(ir,[2,193]),{13:d,16:f,55:404,307:43,308:p},{13:d,16:f,44:39,55:40,87:h,139:342,195:405,197:qn,307:43,308:p},t(Xe,[2,233]),t(Xe,[2,234]),t(Xe,[2,235]),t(gt,[2,459],{281:406,325:[1,407]}),t(_e,[2,463],{284:408,325:[1,409]}),t(_e,[2,465],{286:410,325:[1,411]}),{13:d,16:f,31:[1,412],55:414,82:be,171:413,172:415,173:416,174:Bt,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:Yt},{31:[1,419],89:[1,420]},{29:[1,421]},t(an,[2,302]),t(Xr,[2,367],{167:422}),t(Di,[2,369],{168:423}),{48:[1,424],87:[1,425]},t(an,[2,371]),t(Qi,[2,122]),t(Qi,[2,417]),t(Qi,[2,413]),t(Qi,[2,414]),t(Qi,[2,415]),t(sn,[2,125]),t(sn,[2,127]),t(sn,[2,128]),t(Dr,[2,420],{227:426}),t(sn,[2,130]),{13:d,16:f,55:194,197:Ge,223:427,307:43,308:p},{48:[1,428]},t(Xt,[2,289],{61:429,80:430,81:[1,431],83:[1,432]}),t(ps,[2,288]),{64:[1,433]},t(We,[2,29],{307:43,267:139,275:146,278:149,77:320,67:321,68:322,55:323,79:434,13:d,16:f,45:ie,268:ye,269:ce,270:Re,271:oe,273:J,274:le,276:pe,277:L,279:P,280:g,283:y,285:v,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me}),t(vr,[2,293]),t(si,[2,92]),t(si,[2,93]),t(si,[2,94]),{45:mr,89:Pi,176:269},{31:[1,435]},{31:[1,436]},{19:437,28:O,29:A,56:85},{19:438,28:O,29:A,56:85},t(Vn,[2,355],{149:439}),t(Vn,[2,354]),{13:d,16:f,44:215,45:xn,55:220,82:be,87:h,89:kr,156:440,172:221,185:441,203:442,231:oi,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(D,[2,19]),t(Xt,[2,21]),{13:d,16:f,44:450,45:Ma,55:323,65:445,66:446,67:447,68:448,87:h,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,307:43,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(Zr,[2,8]),{31:[1,451]},{31:[2,258]},{31:[2,101]},t(I,[2,386],{31:[2,388]}),t(nu,[2,102]),t(bn,[2,391],{191:452}),t(I,[2,395],{196:453,198:454}),t(I,[2,108]),t(I,[2,109]),t(nu,[2,103]),t(nu,[2,104]),t(nu,[2,390]),{13:d,16:f,44:215,45:Pr,48:[1,455],55:220,82:be,87:h,89:kr,172:221,185:351,187:350,200:456,231:Rn,234:349,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(ro,[2,424]),t(uc,[2,136]),t(uc,[2,137]),t(cc,[2,140]),{232:[1,457]},{13:d,16:f,44:39,55:40,87:h,139:342,195:458,197:qn,307:43,308:p},t(Xe,[2,219]),t(Xe,[2,220]),t(Xe,[2,221]),t(Xe,[2,222]),t(Xe,[2,223]),t(Zr,[2,10]),t(Be,[2,46]),t(Be,[2,314]),{112:Fe,122:459},t(Be,[2,62]),t(x,Ae,{133:242,108:460,112:ze,132:De}),t(te,[2,61]),t(Be,[2,49]),t([6,28,126,128,193],[2,65]),{31:[2,66],112:[1,462],138:461},t(de,[2,351],{146:463,335:[1,464]}),{29:br,57:465},t(at,[2,329]),t(x,[2,332],{129:466,327:[1,467]}),t(at,[2,55]),t(at,[2,331]),{48:[1,468]},t(hs,[2,429]),{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,239:469,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(ke,[2,431]),{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,243:470,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(ke,[2,156]),{45:ya,89:ki,179:471},t(yn,[2,441]),{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,251:472,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(gr,[2,444],{256:473}),t(gr,[2,446],{258:474}),t(_e,[2,442]),t(_e,[2,443]),t(gr,[2,449]),{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,255:154,257:155,259:475,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(_e,[2,450]),t(_e,[2,451]),t(_e,[2,379],{178:476}),t(_e,[2,378]),t([6,13,16,29,31,39,45,47,48,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],[2,175]),{48:[1,477]},{48:[1,478]},{272:[1,479]},{272:[1,480]},{272:[1,481]},{13:d,16:f,44:136,45:ie,46:482,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{48:[1,483]},{48:[1,484]},t(vt,[2,187]),t(ir,[2,194]),{13:d,16:f,44:39,55:40,82:be,87:h,139:289,172:291,255:154,257:155,266:290,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,320:485},{13:d,16:f,39:[1,487],44:136,45:ie,46:488,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,282:486,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(gt,[2,460]),{13:d,16:f,44:136,45:ie,46:489,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(_e,[2,464]),{13:d,16:f,44:136,45:ie,46:490,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(_e,[2,466]),t(Ue,[2,40]),t(Xr,[2,298]),t(Gt,[2,87]),t(Gt,[2,88]),t(Gt,[2,89]),t(Gt,[2,90]),{13:d,16:f,55:492,82:be,172:493,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,311:494,312:re,315:491},t(Ue,[2,41]),t(Di,[2,300]),t(_n,[2,303],{92:495}),{13:d,16:f,31:[1,496],55:414,82:be,171:497,172:415,173:416,174:Bt,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:Yt},{31:[1,498],89:[1,499]},{29:[1,500]},t(an,[2,372]),{13:d,16:f,48:[2,422],55:194,197:Ge,223:312,226:502,228:501,229:Na,307:43,308:p},t(sn,[2,131]),t(sn,[2,126]),t(Xt,[2,22]),t(Xt,[2,290]),{82:[1,503]},{82:[1,504]},{13:d,16:f,44:510,45:ie,55:323,67:321,68:322,74:505,75:506,76:no,77:320,78:iu,79:509,87:h,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,307:43,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(vr,[2,294]),t(cy,[2,69]),t(cy,[2,70]),t(We,lt,{59:197,69:198,20:511,70:Wr}),t(Br,Qt,{58:205,62:206,23:512,63:_r}),{29:[2,375],31:[2,71],84:522,85:o,112:[1,518],150:513,151:514,158:515,159:[1,516],160:[1,517],161:[1,519],163:[1,520],164:[1,521],175:523},t(Vn,[2,363],{157:524,335:[1,525]}),t(u,a,{215:10,202:526,205:527,208:528,214:529,44:530,87:h}),t(ly,[2,399],{215:10,205:527,208:528,214:529,44:530,204:531,202:532,13:a,16:a,45:a,197:a,224:a,229:a,308:a,87:h}),{13:d,16:f,44:215,45:xn,55:220,82:be,87:h,89:kr,172:221,185:351,203:536,212:534,231:oi,233:533,234:535,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(u,a,{215:10,205:527,208:528,214:529,44:530,202:537,87:h}),t(Br,[2,23],{307:43,267:139,275:146,278:149,55:323,67:447,68:448,44:450,66:538,13:d,16:f,45:Ma,87:h,268:ye,269:ce,270:Re,271:oe,273:J,274:le,276:pe,277:L,279:P,280:g,283:y,285:v,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me}),t(lc,[2,291]),t(lc,[2,24]),t(lc,[2,25]),{13:d,16:f,44:136,45:ie,46:539,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(lc,[2,28]),t(Br,Qt,{58:205,62:206,23:540,63:_r}),t([31,112,232,318,335],[2,105],{192:541,193:[1,542]}),t(bn,[2,107]),{13:d,16:f,44:215,45:Pr,55:220,82:be,87:h,89:kr,172:221,185:351,187:350,199:543,200:544,231:Rn,234:349,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(Ox,[2,132]),t(ro,[2,425]),t(Ox,[2,133]),{13:d,16:f,44:354,55:355,82:be,87:h,172:357,237:356,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:358,312:re,313:545},t(Be,[2,54]),t(Be,[2,48]),t(de,[2,342]),{13:d,16:f,44:39,55:40,87:h,139:546,307:43,308:p},t(de,[2,68]),t(I,[2,350],{31:Ax,112:Ax}),t(Be,[2,53]),{13:d,16:f,55:547,307:43,308:p},t(x,[2,333]),t(se,[2,16]),t(hs,[2,152]),t(ke,[2,154]),t(ke,[2,157]),t(yn,[2,159]),t(yn,[2,160],{262:389,261:548,39:$e,338:He}),t(yn,[2,161],{262:389,261:549,39:$e,338:He}),t(gr,[2,163]),{13:d,16:f,44:136,45:ie,46:550,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(vt,[2,178]),t(vt,[2,179]),{13:d,16:f,44:136,45:ie,46:551,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:552,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:553,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{48:[1,554],272:[1,555]},t(vt,[2,184]),t(vt,[2,186]),{314:[1,556]},{48:[1,557]},{48:[2,461]},{48:[2,462]},{48:[1,558]},{48:[2,467],193:[1,561],287:559,288:560},{13:d,16:f,55:194,197:Ge,223:562,307:43,308:p},t(D3,[2,224]),t(D3,[2,225]),t(D3,[2,226]),{31:[1,563],45:Rx,94:564},t(Ue,[2,84]),t(Xr,[2,368]),t(Ue,[2,85]),t(Di,[2,370]),t(_n,[2,373],{170:566}),{48:[1,567]},{48:[2,423],337:[1,568]},t(Xt,[2,35],{83:[1,569]}),t(Xt,[2,36],{81:[1,570]}),t(ps,[2,30],{307:43,267:139,275:146,278:149,77:320,67:321,68:322,55:323,79:509,44:510,75:571,13:d,16:f,45:ie,76:no,78:iu,87:h,268:ye,269:ce,270:Re,271:oe,273:J,274:le,276:pe,277:L,279:P,280:g,283:y,285:v,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me}),t(Pl,[2,295]),{45:ie,77:572},{45:ie,77:573},t(Pl,[2,33]),t(Pl,[2,34]),{31:[2,275],50:574,84:575,85:o},{31:[2,277],51:576,84:577,85:o},t(Vn,[2,356]),t(xx,[2,357],{152:578,335:[1,579]}),t(io,[2,74]),{29:br,57:580},{29:br,57:581},{13:d,16:f,44:39,55:40,87:h,139:582,307:43,308:p},t(Ix,[2,365],{162:583,328:[1,584]}),{13:d,16:f,45:ie,55:323,67:321,68:322,77:320,79:585,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,307:43,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me},{45:[1,586]},t(io,[2,81]),{29:br,57:587},t(Vn,[2,73]),t(I,[2,362],{29:ao,31:ao,85:ao,112:ao,159:ao,160:ao,161:ao,163:ao,164:ao}),t(ly,[2,112]),t(Dl,[2,401],{206:588}),t(I,[2,405],{209:589,210:590}),t(I,[2,403]),t(I,[2,404]),t(ly,[2,113]),t(ly,[2,400]),{13:d,16:f,44:215,45:xn,48:[1,591],55:220,82:be,87:h,89:kr,172:221,185:351,203:536,212:592,231:oi,234:535,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(ro,[2,426]),t(cc,[2,138]),t(cc,[2,139]),{232:[1,593]},t(lc,[2,292]),{47:[1,595],48:[1,594]},t(Zr,[2,9]),t(bn,[2,392]),t(bn,[2,393],{44:39,55:40,307:43,195:341,139:342,194:596,190:597,13:d,16:f,87:h,197:qn,308:p}),t(bn,[2,110],{272:[1,598]}),t(dy,[2,397],{201:599,316:600,317:[1,601]}),{314:[1,602]},{29:[1,603]},t(at,[2,58]),t(gr,[2,445]),t(gr,[2,447]),{48:[1,604],272:[1,605]},{48:[1,606]},{272:[1,607]},{272:[1,608]},t(vt,[2,99]),t(_e,[2,382]),t([13,16,39,47,48,87,193,197,242,246,250,263,265,272,290,297,298,299,300,301,302,308,314,338,341,342,343,344,345,346],[2,232]),t(vt,[2,188]),t(vt,[2,189]),{48:[1,609]},{48:[2,468]},{289:[1,610]},{13:d,16:f,55:492,82:be,172:493,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,311:494,312:re,315:611},t(Ue,[2,42]),t(_n,[2,304]),{13:d,16:f,55:414,82:be,95:612,171:613,172:415,173:416,174:Bt,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:Yt},{31:[1,614],45:Rx,94:615},t(sn,[2,129]),t(Dr,[2,421]),{82:[1,616]},{82:[1,617]},t(Pl,[2,296]),t(Pl,[2,31]),t(Pl,[2,32]),{31:[2,17]},{31:[2,276]},{31:[2,18]},{31:[2,278]},t(I,Ca,{155:330,153:618,154:619,29:so,31:so,85:so,112:so,159:so,160:so,161:so,163:so,164:so}),t(xx,[2,358]),t(io,[2,75]),t(io,[2,76]),{29:br,57:620},{13:d,16:f,44:39,55:40,87:h,139:621,307:43,308:p},t(Ix,[2,366]),t(io,[2,79]),{13:d,16:f,44:136,45:ie,46:622,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(io,[2,91],{336:[1,623]}),t([29,31,85,112,159,160,161,163,164,232,318,335],[2,114],{207:624,193:[1,625]}),t(Dl,[2,117]),{13:d,16:f,44:215,45:xn,55:220,82:be,87:h,89:kr,172:221,185:351,203:536,211:626,212:627,231:oi,234:535,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(ja,[2,134]),t(ro,[2,427]),t(ja,[2,135]),t(lc,[2,26]),{44:628,87:h},t(bn,[2,106]),t(bn,[2,394]),t(I,[2,396]),t(dy,[2,111]),t(dy,[2,398]),{13:d,16:f,44:39,55:40,87:h,139:342,186:629,190:340,195:341,197:qn,307:43,308:p},t(Il,[2,217]),t(I,Je,{144:248,140:630,143:631,31:[2,343]}),t(vt,[2,97]),t(_e,[2,380]),t(vt,[2,180]),{13:d,16:f,44:136,45:ie,46:632,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:633,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(vt,[2,190]),{290:[1,634]},{314:[1,635]},{13:d,16:f,48:[1,636],55:414,82:be,171:637,172:415,173:416,174:Bt,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:Yt},t(Px,[2,305]),t(Ue,[2,86]),t(_n,[2,374]),t(Xt,[2,37]),t(Xt,[2,38]),t(Vn,[2,72]),t(Vn,[2,360]),t(io,[2,77]),{29:br,57:638},{47:[1,639]},{29:[2,376]},t(Dl,[2,402]),t(Dl,[2,115],{215:10,208:528,214:529,44:530,205:640,13:a,16:a,45:a,197:a,224:a,229:a,308:a,87:h}),t(Dl,[2,118],{272:[1,641]}),t(fy,[2,407],{213:642,319:643,317:[1,644]}),{48:[1,645]},{318:[1,646]},{31:[1,647]},{31:[2,344]},{48:[1,648]},{48:[1,649]},{291:650,303:Ee,304:k,305:W,306:M},t(Gt,[2,218]),t(_n,[2,44]),t(Px,[2,306]),t(io,[2,78]),{44:651,87:h},t(Dl,[2,116]),t(I,[2,406]),t(fy,[2,119]),t(fy,[2,408]),t(u,a,{215:10,205:527,208:528,214:529,44:530,202:652,87:h}),t(lc,[2,27]),t(dy,[2,230]),t(Dx,[2,345],{141:653,335:[1,654]}),t(vt,[2,181]),t(vt,[2,182]),{48:[2,191]},{48:[1,655]},{318:[1,656]},t(I,Je,{144:248,142:657,143:658,31:Nx,112:Nx}),t(Dx,[2,346]),t(io,[2,80]),t(fy,[2,231]),t(de,[2,67]),t(de,[2,348])],defaultActions:{5:[2,240],6:[2,241],7:[2,242],9:[2,239],24:[2,1],25:[2,2],26:[2,244],87:[2,282],94:[2,384],100:[2,45],109:[2,325],166:[2,458],263:[2,439],336:[2,258],337:[2,101],487:[2,461],488:[2,462],560:[2,468],574:[2,17],575:[2,276],576:[2,18],577:[2,278],623:[2,376],631:[2,344],650:[2,191]},parseError:function(Oe,Pe){if(Pe.recoverable)this.trace(Oe);else{var Le=new Error(Oe);throw Le.hash=Pe,Le}},parse:function(Oe){var Pe=this,Le=[0],nt=[null],ot=[],K=this.table,Gi="",Z=0,au=0,by=2,_y=1,gy=ot.slice.call(arguments,1),Jr=Object.create(this.lexer),_s={yy:{}};for(var pc in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pc)&&(_s.yy[pc]=this.yy[pc]);Jr.setInput(Oe,_s.yy),_s.yy.lexer=Jr,_s.yy.parser=this,typeof Jr.yylloc>"u"&&(Jr.yylloc={});var Ll=Jr.yylloc;ot.push(Ll);var k3=Jr.options&&Jr.options.ranges;typeof _s.yy.parseError=="function"?this.parseError=_s.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var my=function(){var Bl;return Bl=Jr.lex()||_y,typeof Bl!="number"&&(Bl=Pe.symbols_[Bl]||Bl),Bl},Et,Kt,mt,Pn,Dn={},vy,uo,kx,wy;;){if(Kt=Le[Le.length-1],this.defaultActions[Kt]?mt=this.defaultActions[Kt]:((Et===null||typeof Et>"u")&&(Et=my()),mt=K[Kt]&&K[Kt][Et]),typeof mt>"u"||!mt.length||!mt[0]){var Q3="";wy=[];for(vy in K[Kt])this.terminals_[vy]&&vy>by&&wy.push("'"+this.terminals_[vy]+"'");Jr.showPosition?Q3="Parse error on line "+(Z+1)+`: +var _$=Object.defineProperty;var g$=(t,e,r)=>e in t?_$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var $r=(t,e,r)=>(g$(t,typeof e!="symbol"?e+"":e,r),r),G3=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var fe=(t,e,r)=>(G3(t,e,"read from private field"),r?r.call(t):e.get(t)),wt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ut=(t,e,r,n)=>(G3(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Ty=(t,e,r,n)=>({set _(a){ut(t,e,a,r)},get _(){return fe(t,e,n)}}),it=(t,e,r)=>(G3(t,e,"access private method"),r);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const s of a)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function n(a){if(a.ep)return;a.ep=!0;const s=r(a);fetch(a.href,s)}})();function mO(t,e){const r=Object.create(null),n=t.split(",");for(let a=0;a!!r[a.toLowerCase()]:a=>!!r[a]}const Tr={},md=[],rs=()=>{},m$=()=>!1,v$=/^on[^a-z]/,qb=t=>v$.test(t),vO=t=>t.startsWith("onUpdate:"),On=Object.assign,wO=(t,e)=>{const r=t.indexOf(e);r>-1&&t.splice(r,1)},w$=Object.prototype.hasOwnProperty,qt=(t,e)=>w$.call(t,e),bt=Array.isArray,vd=t=>Vb(t)==="[object Map]",c8=t=>Vb(t)==="[object Set]",St=t=>typeof t=="function",tn=t=>typeof t=="string",SO=t=>typeof t=="symbol",Fr=t=>t!==null&&typeof t=="object",l8=t=>Fr(t)&&St(t.then)&&St(t.catch),d8=Object.prototype.toString,Vb=t=>d8.call(t),S$=t=>Vb(t).slice(8,-1),f8=t=>Vb(t)==="[object Object]",TO=t=>tn(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,M1=mO(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Hb=t=>{const e=Object.create(null);return r=>e[r]||(e[r]=t(r))},T$=/-(\w)/g,Vs=Hb(t=>t.replace(T$,(e,r)=>r?r.toUpperCase():"")),E$=/\B([A-Z])/g,rf=Hb(t=>t.replace(E$,"-$1").toLowerCase()),kb=Hb(t=>t.charAt(0).toUpperCase()+t.slice(1)),z3=Hb(t=>t?`on${kb(t)}`:""),ap=(t,e)=>!Object.is(t,e),W3=(t,e)=>{for(let r=0;r{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r})},O$=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let Qx;const YT=()=>Qx||(Qx=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function xu(t){if(bt(t)){const e={};for(let r=0;r{if(r){const n=r.split(R$);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Tn(t){let e="";if(tn(t))e=t;else if(bt(t))for(let r=0;rtn(t)?t:t==null?"":bt(t)||Fr(t)&&(t.toString===d8||!St(t.toString))?JSON.stringify(t,p8,2):String(t),p8=(t,e)=>e&&e.__v_isRef?p8(t,e.value):vd(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((r,[n,a])=>(r[`${n} =>`]=a,r),{})}:c8(e)?{[`Set(${e.size})`]:[...e.values()]}:Fr(e)&&!bt(e)&&!f8(e)?String(e):e;let Ha;class N${constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=Ha,!e&&Ha&&(this.index=(Ha.scopes||(Ha.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const r=Ha;try{return Ha=this,e()}finally{Ha=r}}}on(){Ha=this}off(){Ha=this.parent}stop(e){if(this._active){let r,n;for(r=0,n=this.effects.length;r{const e=new Set(t);return e.w=0,e.n=0,e},y8=t=>(t.w&qu)>0,b8=t=>(t.n&qu)>0,M$=({deps:t})=>{if(t.length)for(let e=0;e{const{deps:e}=t;if(e.length){let r=0;for(let n=0;n{(d==="length"||d>=c)&&u.push(l)})}else switch(r!==void 0&&u.push(o.get(r)),e){case"add":bt(t)?TO(r)&&u.push(o.get("length")):(u.push(o.get(Wc)),vd(t)&&u.push(o.get(tE)));break;case"delete":bt(t)||(u.push(o.get(Wc)),vd(t)&&u.push(o.get(tE)));break;case"set":vd(t)&&u.push(o.get(Wc));break}if(u.length===1)u[0]&&rE(u[0]);else{const c=[];for(const l of u)l&&c.push(...l);rE(EO(c))}}function rE(t,e){const r=bt(t)?t:[...t];for(const n of r)n.computed&&zx(n);for(const n of r)n.computed||zx(n)}function zx(t,e){(t!==Ya||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}const L$=mO("__proto__,__v_isRef,__isVue"),m8=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(SO)),B$=AO(),$$=AO(!1,!0),U$=AO(!0),Wx=q$();function q$(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...r){const n=Wt(this);for(let s=0,o=this.length;s{t[e]=function(...r){nf();const n=Wt(this)[e].apply(this,r);return af(),n}}),t}function V$(t){const e=Wt(this);return Ui(e,"has",t),e.hasOwnProperty(t)}function AO(t=!1,e=!1){return function(n,a,s){if(a==="__v_isReactive")return!t;if(a==="__v_isReadonly")return t;if(a==="__v_isShallow")return e;if(a==="__v_raw"&&s===(t?e?iU:E8:e?T8:S8).get(n))return n;const o=bt(n);if(!t){if(o&&qt(Wx,a))return Reflect.get(Wx,a,s);if(a==="hasOwnProperty")return V$}const u=Reflect.get(n,a,s);return(SO(a)?m8.has(a):L$(a))||(t||Ui(n,"get",a),e)?u:Zn(u)?o&&TO(a)?u:u.value:Fr(u)?t?A8(u):Gb(u):u}}const H$=v8(),k$=v8(!0);function v8(t=!1){return function(r,n,a,s){let o=r[n];if(Pd(o)&&Zn(o)&&!Zn(a))return!1;if(!t&&(!sb(a)&&!Pd(a)&&(o=Wt(o),a=Wt(a)),!bt(r)&&Zn(o)&&!Zn(a)))return o.value=a,!0;const u=bt(r)&&TO(n)?Number(n)t,Qb=t=>Reflect.getPrototypeOf(t);function Ey(t,e,r=!1,n=!1){t=t.__v_raw;const a=Wt(t),s=Wt(e);r||(e!==s&&Ui(a,"get",e),Ui(a,"get",s));const{has:o}=Qb(a),u=n?RO:r?PO:sp;if(o.call(a,e))return u(t.get(e));if(o.call(a,s))return u(t.get(s));t!==a&&t.get(e)}function Oy(t,e=!1){const r=this.__v_raw,n=Wt(r),a=Wt(t);return e||(t!==a&&Ui(n,"has",t),Ui(n,"has",a)),t===a?r.has(t):r.has(t)||r.has(a)}function Ay(t,e=!1){return t=t.__v_raw,!e&&Ui(Wt(t),"iterate",Wc),Reflect.get(t,"size",t)}function Xx(t){t=Wt(t);const e=Wt(this);return Qb(e).has.call(e,t)||(e.add(t),Fo(e,"add",t,t)),this}function Kx(t,e){e=Wt(e);const r=Wt(this),{has:n,get:a}=Qb(r);let s=n.call(r,t);s||(t=Wt(t),s=n.call(r,t));const o=a.call(r,t);return r.set(t,e),s?ap(e,o)&&Fo(r,"set",t,e):Fo(r,"add",t,e),this}function Jx(t){const e=Wt(this),{has:r,get:n}=Qb(e);let a=r.call(e,t);a||(t=Wt(t),a=r.call(e,t)),n&&n.call(e,t);const s=e.delete(t);return a&&Fo(e,"delete",t,void 0),s}function Yx(){const t=Wt(this),e=t.size!==0,r=t.clear();return e&&Fo(t,"clear",void 0,void 0),r}function Ry(t,e){return function(n,a){const s=this,o=s.__v_raw,u=Wt(o),c=e?RO:t?PO:sp;return!t&&Ui(u,"iterate",Wc),o.forEach((l,d)=>n.call(a,c(l),c(d),s))}}function xy(t,e,r){return function(...n){const a=this.__v_raw,s=Wt(a),o=vd(s),u=t==="entries"||t===Symbol.iterator&&o,c=t==="keys"&&o,l=a[t](...n),d=r?RO:e?PO:sp;return!e&&Ui(s,"iterate",c?tE:Wc),{next(){const{value:f,done:h}=l.next();return h?{value:f,done:h}:{value:u?[d(f[0]),d(f[1])]:d(f),done:h}},[Symbol.iterator](){return this}}}}function su(t){return function(...e){return t==="delete"?!1:this}}function K$(){const t={get(s){return Ey(this,s)},get size(){return Ay(this)},has:Oy,add:Xx,set:Kx,delete:Jx,clear:Yx,forEach:Ry(!1,!1)},e={get(s){return Ey(this,s,!1,!0)},get size(){return Ay(this)},has:Oy,add:Xx,set:Kx,delete:Jx,clear:Yx,forEach:Ry(!1,!0)},r={get(s){return Ey(this,s,!0)},get size(){return Ay(this,!0)},has(s){return Oy.call(this,s,!0)},add:su("add"),set:su("set"),delete:su("delete"),clear:su("clear"),forEach:Ry(!0,!1)},n={get(s){return Ey(this,s,!0,!0)},get size(){return Ay(this,!0)},has(s){return Oy.call(this,s,!0)},add:su("add"),set:su("set"),delete:su("delete"),clear:su("clear"),forEach:Ry(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(s=>{t[s]=xy(s,!1,!1),r[s]=xy(s,!0,!1),e[s]=xy(s,!1,!0),n[s]=xy(s,!0,!0)}),[t,r,e,n]}const[J$,Y$,Z$,eU]=K$();function xO(t,e){const r=e?t?eU:Z$:t?Y$:J$;return(n,a,s)=>a==="__v_isReactive"?!t:a==="__v_isReadonly"?t:a==="__v_raw"?n:Reflect.get(qt(r,a)&&a in n?r:n,a,s)}const tU={get:xO(!1,!1)},rU={get:xO(!1,!0)},nU={get:xO(!0,!1)},S8=new WeakMap,T8=new WeakMap,E8=new WeakMap,iU=new WeakMap;function aU(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function sU(t){return t.__v_skip||!Object.isExtensible(t)?0:aU(S$(t))}function Gb(t){return Pd(t)?t:IO(t,!1,w8,tU,S8)}function O8(t){return IO(t,!1,X$,rU,T8)}function A8(t){return IO(t,!0,W$,nU,E8)}function IO(t,e,r,n,a){if(!Fr(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const s=a.get(t);if(s)return s;const o=sU(t);if(o===0)return t;const u=new Proxy(t,o===2?n:r);return a.set(t,u),u}function wd(t){return Pd(t)?wd(t.__v_raw):!!(t&&t.__v_isReactive)}function Pd(t){return!!(t&&t.__v_isReadonly)}function sb(t){return!!(t&&t.__v_isShallow)}function R8(t){return wd(t)||Pd(t)}function Wt(t){const e=t&&t.__v_raw;return e?Wt(e):t}function x8(t){return ab(t,"__v_skip",!0),t}const sp=t=>Fr(t)?Gb(t):t,PO=t=>Fr(t)?A8(t):t;function I8(t){Cu&&Ya&&(t=Wt(t),g8(t.dep||(t.dep=EO())))}function P8(t,e){t=Wt(t);const r=t.dep;r&&rE(r)}function Zn(t){return!!(t&&t.__v_isRef===!0)}function pi(t){return D8(t,!1)}function oU(t){return D8(t,!0)}function D8(t,e){return Zn(t)?t:new uU(t,e)}class uU{constructor(e,r){this.__v_isShallow=r,this.dep=void 0,this.__v_isRef=!0,this._rawValue=r?e:Wt(e),this._value=r?e:sp(e)}get value(){return I8(this),this._value}set value(e){const r=this.__v_isShallow||sb(e)||Pd(e);e=r?e:Wt(e),ap(e,this._rawValue)&&(this._rawValue=e,this._value=r?e:sp(e),P8(this))}}function Dt(t){return Zn(t)?t.value:t}const cU={get:(t,e,r)=>Dt(Reflect.get(t,e,r)),set:(t,e,r,n)=>{const a=t[e];return Zn(a)&&!Zn(r)?(a.value=r,!0):Reflect.set(t,e,r,n)}};function N8(t){return wd(t)?t:new Proxy(t,cU)}class lU{constructor(e,r,n,a){this._setter=r,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this._dirty=!0,this.effect=new OO(e,()=>{this._dirty||(this._dirty=!0,P8(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!a,this.__v_isReadonly=n}get value(){const e=Wt(this);return I8(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}function dU(t,e,r=!1){let n,a;const s=St(t);return s?(n=t,a=rs):(n=t.get,a=t.set),new lU(n,a,s||!a,r)}function ju(t,e,r,n){let a;try{a=n?t(...n):t()}catch(s){zb(s,e,r)}return a}function ns(t,e,r,n){if(St(t)){const s=ju(t,e,r,n);return s&&l8(s)&&s.catch(o=>{zb(o,e,r)}),s}const a=[];for(let s=0;s>>1;up(Yn[n])Is&&Yn.splice(e,1)}function yU(t){bt(t)?Sd.push(...t):(!go||!go.includes(t,t.allowRecurse?Cc+1:Cc))&&Sd.push(t),M8()}function Zx(t,e=op?Is+1:0){for(;eup(r)-up(n)),Cc=0;Cct.id==null?1/0:t.id,bU=(t,e)=>{const r=up(t)-up(e);if(r===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return r};function L8(t){nE=!1,op=!0,Yn.sort(bU);const e=rs;try{for(Is=0;Istn(p)?p.trim():p)),f&&(a=r.map(O$))}let u,c=n[u=z3(e)]||n[u=z3(Vs(e))];!c&&s&&(c=n[u=z3(rf(e))]),c&&ns(c,t,6,a);const l=n[u+"Once"];if(l){if(!t.emitted)t.emitted={};else if(t.emitted[u])return;t.emitted[u]=!0,ns(l,t,6,a)}}function B8(t,e,r=!1){const n=e.emitsCache,a=n.get(t);if(a!==void 0)return a;const s=t.emits;let o={},u=!1;if(!St(t)){const c=l=>{const d=B8(l,e,!0);d&&(u=!0,On(o,d))};!r&&e.mixins.length&&e.mixins.forEach(c),t.extends&&c(t.extends),t.mixins&&t.mixins.forEach(c)}return!s&&!u?(Fr(t)&&n.set(t,null),null):(bt(s)?s.forEach(c=>o[c]=null):On(o,s),Fr(t)&&n.set(t,o),o)}function Wb(t,e){return!t||!qb(e)?!1:(e=e.slice(2).replace(/Once$/,""),qt(t,e[0].toLowerCase()+e.slice(1))||qt(t,rf(e))||qt(t,e))}let Fn=null,Xb=null;function ob(t){const e=Fn;return Fn=t,Xb=t&&t.type.__scopeId||null,e}function gU(t){Xb=t}function mU(){Xb=null}function Hr(t,e=Fn,r){if(!e||t._n)return t;const n=(...a)=>{n._d&&dI(-1);const s=ob(e);let o;try{o=t(...a)}finally{ob(s),n._d&&dI(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function X3(t){const{type:e,vnode:r,proxy:n,withProxy:a,props:s,propsOptions:[o],slots:u,attrs:c,emit:l,render:d,renderCache:f,data:h,setupState:p,ctx:b,inheritAttrs:_}=t;let E,w;const O=ob(t);try{if(r.shapeFlag&4){const T=a||n;E=Rs(d.call(T,T,f,s,p,h,b)),w=c}else{const T=e;E=Rs(T.length>1?T(s,{attrs:c,slots:u,emit:l}):T(s,null)),w=e.props?c:vU(c)}}catch(T){Wh.length=0,zb(T,t,1),E=dr(Vu)}let A=E;if(w&&_!==!1){const T=Object.keys(w),{shapeFlag:I}=A;T.length&&I&7&&(o&&T.some(vO)&&(w=wU(w,o)),A=Dd(A,w))}return r.dirs&&(A=Dd(A),A.dirs=A.dirs?A.dirs.concat(r.dirs):r.dirs),r.transition&&(A.transition=r.transition),E=A,ob(O),E}const vU=t=>{let e;for(const r in t)(r==="class"||r==="style"||qb(r))&&((e||(e={}))[r]=t[r]);return e},wU=(t,e)=>{const r={};for(const n in t)(!vO(n)||!(n.slice(9)in e))&&(r[n]=t[n]);return r};function SU(t,e,r){const{props:n,children:a,component:s}=t,{props:o,children:u,patchFlag:c}=e,l=s.emitsOptions;if(e.dirs||e.transition)return!0;if(r&&c>=0){if(c&1024)return!0;if(c&16)return n?eI(n,o,l):!!o;if(c&8){const d=e.dynamicProps;for(let f=0;ft.__isSuspense;function OU(t,e){e&&e.pendingBranch?bt(t)?e.effects.push(...t):e.effects.push(t):yU(t)}function $8(t,e){return CO(t,null,e)}const Iy={};function Td(t,e,r){return CO(t,e,r)}function CO(t,e,{immediate:r,deep:n,flush:a,onTrack:s,onTrigger:o}=Tr){var u;const c=j$()===((u=En)==null?void 0:u.scope)?En:null;let l,d=!1,f=!1;if(Zn(t)?(l=()=>t.value,d=sb(t)):wd(t)?(l=()=>t,n=!0):bt(t)?(f=!0,d=t.some(T=>wd(T)||sb(T)),l=()=>t.map(T=>{if(Zn(T))return T.value;if(wd(T))return Vc(T);if(St(T))return ju(T,c,2)})):St(t)?e?l=()=>ju(t,c,2):l=()=>{if(!(c&&c.isUnmounted))return h&&h(),ns(t,c,3,[p])}:l=rs,e&&n){const T=l;l=()=>Vc(T())}let h,p=T=>{h=O.onStop=()=>{ju(T,c,4)}},b;if(lp)if(p=rs,e?r&&ns(e,c,3,[l(),f?[]:void 0,p]):l(),a==="sync"){const T=yq();b=T.__watcherHandles||(T.__watcherHandles=[])}else return rs;let _=f?new Array(t.length).fill(Iy):Iy;const E=()=>{if(O.active)if(e){const T=O.run();(n||d||(f?T.some((I,D)=>ap(I,_[D])):ap(T,_)))&&(h&&h(),ns(e,c,3,[T,_===Iy?void 0:f&&_[0]===Iy?[]:_,p]),_=T)}else O.run()};E.allowRecurse=!!e;let w;a==="sync"?w=E:a==="post"?w=()=>ji(E,c&&c.suspense):(E.pre=!0,c&&(E.id=c.uid),w=()=>NO(E));const O=new OO(l,w);e?r?E():_=O.run():a==="post"?ji(O.run.bind(O),c&&c.suspense):O.run();const A=()=>{O.stop(),c&&c.scope&&wO(c.scope.effects,O)};return b&&b.push(A),A}function AU(t,e,r){const n=this.proxy,a=tn(t)?t.includes(".")?U8(n,t):()=>n[t]:t.bind(n,n);let s;St(e)?s=e:(s=e.handler,r=e);const o=En;Nd(this);const u=CO(a,s.bind(n),r);return o?Nd(o):Xc(),u}function U8(t,e){const r=e.split(".");return()=>{let n=t;for(let a=0;a{Vc(r,e)});else if(f8(t))for(const r in t)Vc(t[r],e);return t}function ub(t,e){const r=Fn;if(r===null)return t;const n=Zb(r)||r.proxy,a=t.dirs||(t.dirs=[]);for(let s=0;sOn({name:t.name},e,{setup:t}))():t}const Gh=t=>!!t.type.__asyncLoader,q8=t=>t.type.__isKeepAlive;function RU(t,e){V8(t,"a",e)}function xU(t,e){V8(t,"da",e)}function V8(t,e,r=En){const n=t.__wdc||(t.__wdc=()=>{let a=r;for(;a;){if(a.isDeactivated)return;a=a.parent}return t()});if(Kb(e,n,r),r){let a=r.parent;for(;a&&a.parent;)q8(a.parent.vnode)&&IU(n,e,r,a),a=a.parent}}function IU(t,e,r,n){const a=Kb(e,t,n,!0);jO(()=>{wO(n[e],a)},r)}function Kb(t,e,r=En,n=!1){if(r){const a=r[t]||(r[t]=[]),s=e.__weh||(e.__weh=(...o)=>{if(r.isUnmounted)return;nf(),Nd(r);const u=ns(e,r,t,o);return Xc(),af(),u});return n?a.unshift(s):a.push(s),s}}const Qo=t=>(e,r=En)=>(!lp||t==="sp")&&Kb(t,(...n)=>e(...n),r),PU=Qo("bm"),H8=Qo("m"),DU=Qo("bu"),k8=Qo("u"),NU=Qo("bum"),jO=Qo("um"),CU=Qo("sp"),jU=Qo("rtg"),MU=Qo("rtc");function FU(t,e=En){Kb("ec",t,e)}const MO="components";function bc(t,e){return G8(MO,t,!0,e)||t}const Q8=Symbol.for("v-ndc");function Go(t){return tn(t)?G8(MO,t,!1)||t:t||Q8}function G8(t,e,r=!0,n=!1){const a=Fn||En;if(a){const s=a.type;if(t===MO){const u=fq(s,!1);if(u&&(u===e||u===Vs(e)||u===kb(Vs(e))))return s}const o=tI(a[t]||s[t],e)||tI(a.appContext[t],e);return!o&&n?s:o}}function tI(t,e){return t&&(t[e]||t[Vs(e)]||t[kb(Vs(e))])}function rI(t,e,r,n){let a;const s=r&&r[n];if(bt(t)||tn(t)){a=new Array(t.length);for(let o=0,u=t.length;oe(o,u,void 0,s&&s[u]));else{const o=Object.keys(t);a=new Array(o.length);for(let u=0,c=o.length;udb(e)?!(e.type===Vu||e.type===Fi&&!z8(e.children)):!0)?t:null}const iE=t=>t?i5(t)?Zb(t)||t.proxy:iE(t.parent):null,zh=On(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>iE(t.parent),$root:t=>iE(t.root),$emit:t=>t.emit,$options:t=>FO(t),$forceUpdate:t=>t.f||(t.f=()=>NO(t.update)),$nextTick:t=>t.n||(t.n=j8.bind(t.proxy)),$watch:t=>AU.bind(t)}),K3=(t,e)=>t!==Tr&&!t.__isScriptSetup&&qt(t,e),LU={get({_:t},e){const{ctx:r,setupState:n,data:a,props:s,accessCache:o,type:u,appContext:c}=t;let l;if(e[0]!=="$"){const p=o[e];if(p!==void 0)switch(p){case 1:return n[e];case 2:return a[e];case 4:return r[e];case 3:return s[e]}else{if(K3(n,e))return o[e]=1,n[e];if(a!==Tr&&qt(a,e))return o[e]=2,a[e];if((l=t.propsOptions[0])&&qt(l,e))return o[e]=3,s[e];if(r!==Tr&&qt(r,e))return o[e]=4,r[e];aE&&(o[e]=0)}}const d=zh[e];let f,h;if(d)return e==="$attrs"&&Ui(t,"get",e),d(t);if((f=u.__cssModules)&&(f=f[e]))return f;if(r!==Tr&&qt(r,e))return o[e]=4,r[e];if(h=c.config.globalProperties,qt(h,e))return h[e]},set({_:t},e,r){const{data:n,setupState:a,ctx:s}=t;return K3(a,e)?(a[e]=r,!0):n!==Tr&&qt(n,e)?(n[e]=r,!0):qt(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(s[e]=r,!0)},has({_:{data:t,setupState:e,accessCache:r,ctx:n,appContext:a,propsOptions:s}},o){let u;return!!r[o]||t!==Tr&&qt(t,o)||K3(e,o)||(u=s[0])&&qt(u,o)||qt(n,o)||qt(zh,o)||qt(a.config.globalProperties,o)},defineProperty(t,e,r){return r.get!=null?t._.accessCache[e]=0:qt(r,"value")&&this.set(t,e,r.value,null),Reflect.defineProperty(t,e,r)}};function BU(){return $U().attrs}function $U(){const t=uq();return t.setupContext||(t.setupContext=s5(t))}function nI(t){return bt(t)?t.reduce((e,r)=>(e[r]=null,e),{}):t}let aE=!0;function UU(t){const e=FO(t),r=t.proxy,n=t.ctx;aE=!1,e.beforeCreate&&iI(e.beforeCreate,t,"bc");const{data:a,computed:s,methods:o,watch:u,provide:c,inject:l,created:d,beforeMount:f,mounted:h,beforeUpdate:p,updated:b,activated:_,deactivated:E,beforeDestroy:w,beforeUnmount:O,destroyed:A,unmounted:T,render:I,renderTracked:D,renderTriggered:U,errorCaptured:H,serverPrefetch:N,expose:x,inheritAttrs:F,components:X,directives:ne,filters:$}=e;if(l&&qU(l,n,null),o)for(const se in o){const ie=o[se];St(ie)&&(n[se]=ie.bind(r))}if(a){const se=a.call(r,r);Fr(se)&&(t.data=Gb(se))}if(aE=!0,s)for(const se in s){const ie=s[se],be=St(ie)?ie.bind(r,r):St(ie.get)?ie.get.bind(r,r):rs,he=!St(ie)&&St(ie.set)?ie.set.bind(r):rs,Te=tr({get:be,set:he});Object.defineProperty(n,se,{enumerable:!0,configurable:!0,get:()=>Te.value,set:Ne=>Te.value=Ne})}if(u)for(const se in u)W8(u[se],n,r,se);if(c){const se=St(c)?c.call(r):c;Reflect.ownKeys(se).forEach(ie=>{F1(ie,se[ie])})}d&&iI(d,t,"c");function Q(se,ie){bt(ie)?ie.forEach(be=>se(be.bind(r))):ie&&se(ie.bind(r))}if(Q(PU,f),Q(H8,h),Q(DU,p),Q(k8,b),Q(RU,_),Q(xU,E),Q(FU,H),Q(MU,D),Q(jU,U),Q(NU,O),Q(jO,T),Q(CU,N),bt(x))if(x.length){const se=t.exposed||(t.exposed={});x.forEach(ie=>{Object.defineProperty(se,ie,{get:()=>r[ie],set:be=>r[ie]=be})})}else t.exposed||(t.exposed={});I&&t.render===rs&&(t.render=I),F!=null&&(t.inheritAttrs=F),X&&(t.components=X),ne&&(t.directives=ne)}function qU(t,e,r=rs){bt(t)&&(t=sE(t));for(const n in t){const a=t[n];let s;Fr(a)?"default"in a?s=as(a.from||n,a.default,!0):s=as(a.from||n):s=as(a),Zn(s)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>s.value,set:o=>s.value=o}):e[n]=s}}function iI(t,e,r){ns(bt(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,r)}function W8(t,e,r,n){const a=n.includes(".")?U8(r,n):()=>r[n];if(tn(t)){const s=e[t];St(s)&&Td(a,s)}else if(St(t))Td(a,t.bind(r));else if(Fr(t))if(bt(t))t.forEach(s=>W8(s,e,r,n));else{const s=St(t.handler)?t.handler.bind(r):e[t.handler];St(s)&&Td(a,s,t)}}function FO(t){const e=t.type,{mixins:r,extends:n}=e,{mixins:a,optionsCache:s,config:{optionMergeStrategies:o}}=t.appContext,u=s.get(e);let c;return u?c=u:!a.length&&!r&&!n?c=e:(c={},a.length&&a.forEach(l=>cb(c,l,o,!0)),cb(c,e,o)),Fr(e)&&s.set(e,c),c}function cb(t,e,r,n=!1){const{mixins:a,extends:s}=e;s&&cb(t,s,r,!0),a&&a.forEach(o=>cb(t,o,r,!0));for(const o in e)if(!(n&&o==="expose")){const u=VU[o]||r&&r[o];t[o]=u?u(t[o],e[o]):e[o]}return t}const VU={data:aI,props:sI,emits:sI,methods:Ah,computed:Ah,beforeCreate:di,created:di,beforeMount:di,mounted:di,beforeUpdate:di,updated:di,beforeDestroy:di,beforeUnmount:di,destroyed:di,unmounted:di,activated:di,deactivated:di,errorCaptured:di,serverPrefetch:di,components:Ah,directives:Ah,watch:kU,provide:aI,inject:HU};function aI(t,e){return e?t?function(){return On(St(t)?t.call(this,this):t,St(e)?e.call(this,this):e)}:e:t}function HU(t,e){return Ah(sE(t),sE(e))}function sE(t){if(bt(t)){const e={};for(let r=0;r1)return r&&St(e)?e.call(n&&n.proxy):e}}function zU(t,e,r,n=!1){const a={},s={};ab(s,Yb,1),t.propsDefaults=Object.create(null),K8(t,e,a,s);for(const o in t.propsOptions[0])o in a||(a[o]=void 0);r?t.props=n?a:O8(a):t.type.props?t.props=a:t.props=s,t.attrs=s}function WU(t,e,r,n){const{props:a,attrs:s,vnode:{patchFlag:o}}=t,u=Wt(a),[c]=t.propsOptions;let l=!1;if((n||o>0)&&!(o&16)){if(o&8){const d=t.vnode.dynamicProps;for(let f=0;f{c=!0;const[h,p]=J8(f,e,!0);On(o,h),p&&u.push(...p)};!r&&e.mixins.length&&e.mixins.forEach(d),t.extends&&d(t.extends),t.mixins&&t.mixins.forEach(d)}if(!s&&!c)return Fr(t)&&n.set(t,md),md;if(bt(s))for(let d=0;d-1,p[1]=_<0||b<_,(b>-1||qt(p,"default"))&&u.push(f)}}}const l=[o,u];return Fr(t)&&n.set(t,l),l}function oI(t){return t[0]!=="$"}function uI(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function cI(t,e){return uI(t)===uI(e)}function lI(t,e){return bt(e)?e.findIndex(r=>cI(r,t)):St(e)&&cI(e,t)?0:-1}const Y8=t=>t[0]==="_"||t==="$stable",LO=t=>bt(t)?t.map(Rs):[Rs(t)],XU=(t,e,r)=>{if(e._n)return e;const n=Hr((...a)=>LO(e(...a)),r);return n._c=!1,n},Z8=(t,e,r)=>{const n=t._ctx;for(const a in t){if(Y8(a))continue;const s=t[a];if(St(s))e[a]=XU(a,s,n);else if(s!=null){const o=LO(s);e[a]=()=>o}}},e5=(t,e)=>{const r=LO(e);t.slots.default=()=>r},KU=(t,e)=>{if(t.vnode.shapeFlag&32){const r=e._;r?(t.slots=Wt(e),ab(e,"_",r)):Z8(e,t.slots={})}else t.slots={},e&&e5(t,e);ab(t.slots,Yb,1)},JU=(t,e,r)=>{const{vnode:n,slots:a}=t;let s=!0,o=Tr;if(n.shapeFlag&32){const u=e._;u?r&&u===1?s=!1:(On(a,e),!r&&u===1&&delete a._):(s=!e.$stable,Z8(e,a)),o=e}else e&&(e5(t,e),o={default:1});if(s)for(const u in a)!Y8(u)&&!(u in o)&&delete a[u]};function uE(t,e,r,n,a=!1){if(bt(t)){t.forEach((h,p)=>uE(h,e&&(bt(e)?e[p]:e),r,n,a));return}if(Gh(n)&&!a)return;const s=n.shapeFlag&4?Zb(n.component)||n.component.proxy:n.el,o=a?null:s,{i:u,r:c}=t,l=e&&e.r,d=u.refs===Tr?u.refs={}:u.refs,f=u.setupState;if(l!=null&&l!==c&&(tn(l)?(d[l]=null,qt(f,l)&&(f[l]=null)):Zn(l)&&(l.value=null)),St(c))ju(c,u,12,[o,d]);else{const h=tn(c),p=Zn(c);if(h||p){const b=()=>{if(t.f){const _=h?qt(f,c)?f[c]:d[c]:c.value;a?bt(_)&&wO(_,s):bt(_)?_.includes(s)||_.push(s):h?(d[c]=[s],qt(f,c)&&(f[c]=d[c])):(c.value=[s],t.k&&(d[t.k]=c.value))}else h?(d[c]=o,qt(f,c)&&(f[c]=o)):p&&(c.value=o,t.k&&(d[t.k]=o))};o?(b.id=-1,ji(b,r)):b()}}}const ji=OU;function YU(t){return ZU(t)}function ZU(t,e){const r=YT();r.__VUE__=!0;const{insert:n,remove:a,patchProp:s,createElement:o,createText:u,createComment:c,setText:l,setElementText:d,parentNode:f,nextSibling:h,setScopeId:p=rs,insertStaticContent:b}=t,_=(g,y,v,C=null,V=null,q=null,G=!1,Y=null,ee=!!y.dynamicChildren)=>{if(g===y)return;g&&!$f(g,y)&&(C=J(g),Ne(g,V,q,!0),g=null),y.patchFlag===-2&&(ee=!1,y.dynamicChildren=null);const{type:ae,ref:ve,shapeFlag:me}=y;switch(ae){case Jb:E(g,y,v,C);break;case Vu:w(g,y,v,C);break;case J3:g==null&&O(y,v,C,G);break;case Fi:X(g,y,v,C,V,q,G,Y,ee);break;default:me&1?I(g,y,v,C,V,q,G,Y,ee):me&6?ne(g,y,v,C,V,q,G,Y,ee):(me&64||me&128)&&ae.process(g,y,v,C,V,q,G,Y,ee,pe)}ve!=null&&V&&uE(ve,g&&g.ref,q,y||g,!y)},E=(g,y,v,C)=>{if(g==null)n(y.el=u(y.children),v,C);else{const V=y.el=g.el;y.children!==g.children&&l(V,y.children)}},w=(g,y,v,C)=>{g==null?n(y.el=c(y.children||""),v,C):y.el=g.el},O=(g,y,v,C)=>{[g.el,g.anchor]=b(g.children,y,v,C,g.el,g.anchor)},A=({el:g,anchor:y},v,C)=>{let V;for(;g&&g!==y;)V=h(g),n(g,v,C),g=V;n(y,v,C)},T=({el:g,anchor:y})=>{let v;for(;g&&g!==y;)v=h(g),a(g),g=v;a(y)},I=(g,y,v,C,V,q,G,Y,ee)=>{G=G||y.type==="svg",g==null?D(y,v,C,V,q,G,Y,ee):N(g,y,V,q,G,Y,ee)},D=(g,y,v,C,V,q,G,Y)=>{let ee,ae;const{type:ve,props:me,shapeFlag:Ee,transition:k,dirs:W}=g;if(ee=g.el=o(g.type,q,me&&me.is,me),Ee&8?d(ee,g.children):Ee&16&&H(g.children,ee,null,C,V,q&&ve!=="foreignObject",G,Y),W&&yc(g,null,C,"created"),U(ee,g,g.scopeId,G,C),me){for(const S in me)S!=="value"&&!M1(S)&&s(ee,S,null,me[S],q,g.children,C,V,oe);"value"in me&&s(ee,"value",null,me.value),(ae=me.onVnodeBeforeMount)&&gs(ae,C,g)}W&&yc(g,null,C,"beforeMount");const M=(!V||V&&!V.pendingBranch)&&k&&!k.persisted;M&&k.beforeEnter(ee),n(ee,y,v),((ae=me&&me.onVnodeMounted)||M||W)&&ji(()=>{ae&&gs(ae,C,g),M&&k.enter(ee),W&&yc(g,null,C,"mounted")},V)},U=(g,y,v,C,V)=>{if(v&&p(g,v),C)for(let q=0;q{for(let ae=ee;ae{const Y=y.el=g.el;let{patchFlag:ee,dynamicChildren:ae,dirs:ve}=y;ee|=g.patchFlag&16;const me=g.props||Tr,Ee=y.props||Tr;let k;v&&_c(v,!1),(k=Ee.onVnodeBeforeUpdate)&&gs(k,v,y,g),ve&&yc(y,g,v,"beforeUpdate"),v&&_c(v,!0);const W=V&&y.type!=="foreignObject";if(ae?x(g.dynamicChildren,ae,Y,v,C,W,q):G||ie(g,y,Y,null,v,C,W,q,!1),ee>0){if(ee&16)F(Y,y,me,Ee,v,C,V);else if(ee&2&&me.class!==Ee.class&&s(Y,"class",null,Ee.class,V),ee&4&&s(Y,"style",me.style,Ee.style,V),ee&8){const M=y.dynamicProps;for(let S=0;S{k&&gs(k,v,y,g),ve&&yc(y,g,v,"updated")},C)},x=(g,y,v,C,V,q,G)=>{for(let Y=0;Y{if(v!==C){if(v!==Tr)for(const Y in v)!M1(Y)&&!(Y in C)&&s(g,Y,v[Y],null,G,y.children,V,q,oe);for(const Y in C){if(M1(Y))continue;const ee=C[Y],ae=v[Y];ee!==ae&&Y!=="value"&&s(g,Y,ae,ee,G,y.children,V,q,oe)}"value"in C&&s(g,"value",v.value,C.value)}},X=(g,y,v,C,V,q,G,Y,ee)=>{const ae=y.el=g?g.el:u(""),ve=y.anchor=g?g.anchor:u("");let{patchFlag:me,dynamicChildren:Ee,slotScopeIds:k}=y;k&&(Y=Y?Y.concat(k):k),g==null?(n(ae,v,C),n(ve,v,C),H(y.children,v,ve,V,q,G,Y,ee)):me>0&&me&64&&Ee&&g.dynamicChildren?(x(g.dynamicChildren,Ee,v,V,q,G,Y),(y.key!=null||V&&y===V.subTree)&&t5(g,y,!0)):ie(g,y,v,ve,V,q,G,Y,ee)},ne=(g,y,v,C,V,q,G,Y,ee)=>{y.slotScopeIds=Y,g==null?y.shapeFlag&512?V.ctx.activate(y,v,C,G,ee):$(y,v,C,V,q,G,ee):j(g,y,ee)},$=(g,y,v,C,V,q,G)=>{const Y=g.component=oq(g,C,V);if(q8(g)&&(Y.ctx.renderer=pe),cq(Y),Y.asyncDep){if(V&&V.registerDep(Y,Q),!g.el){const ee=Y.subTree=dr(Vu);w(null,ee,y,v)}return}Q(Y,g,y,v,V,q,G)},j=(g,y,v)=>{const C=y.component=g.component;if(SU(g,y,v))if(C.asyncDep&&!C.asyncResolved){se(C,y,v);return}else C.next=y,pU(C.update),C.update();else y.el=g.el,C.vnode=y},Q=(g,y,v,C,V,q,G)=>{const Y=()=>{if(g.isMounted){let{next:ve,bu:me,u:Ee,parent:k,vnode:W}=g,M=ve,S;_c(g,!1),ve?(ve.el=W.el,se(g,ve,G)):ve=W,me&&W3(me),(S=ve.props&&ve.props.onVnodeBeforeUpdate)&&gs(S,k,ve,W),_c(g,!0);const R=X3(g),z=g.subTree;g.subTree=R,_(z,R,f(z.el),J(z),g,V,q),ve.el=R.el,M===null&&TU(g,R.el),Ee&&ji(Ee,V),(S=ve.props&&ve.props.onVnodeUpdated)&&ji(()=>gs(S,k,ve,W),V)}else{let ve;const{el:me,props:Ee}=y,{bm:k,m:W,parent:M}=g,S=Gh(y);if(_c(g,!1),k&&W3(k),!S&&(ve=Ee&&Ee.onVnodeBeforeMount)&&gs(ve,M,y),_c(g,!0),me&&P){const R=()=>{g.subTree=X3(g),P(me,g.subTree,g,V,null)};S?y.type.__asyncLoader().then(()=>!g.isUnmounted&&R()):R()}else{const R=g.subTree=X3(g);_(null,R,v,C,g,V,q),y.el=R.el}if(W&&ji(W,V),!S&&(ve=Ee&&Ee.onVnodeMounted)){const R=y;ji(()=>gs(ve,M,R),V)}(y.shapeFlag&256||M&&Gh(M.vnode)&&M.vnode.shapeFlag&256)&&g.a&&ji(g.a,V),g.isMounted=!0,y=v=C=null}},ee=g.effect=new OO(Y,()=>NO(ae),g.scope),ae=g.update=()=>ee.run();ae.id=g.uid,_c(g,!0),ae()},se=(g,y,v)=>{y.component=g;const C=g.vnode.props;g.vnode=y,g.next=null,WU(g,y.props,C,v),JU(g,y.children,v),nf(),Zx(),af()},ie=(g,y,v,C,V,q,G,Y,ee=!1)=>{const ae=g&&g.children,ve=g?g.shapeFlag:0,me=y.children,{patchFlag:Ee,shapeFlag:k}=y;if(Ee>0){if(Ee&128){he(ae,me,v,C,V,q,G,Y,ee);return}else if(Ee&256){be(ae,me,v,C,V,q,G,Y,ee);return}}k&8?(ve&16&&oe(ae,V,q),me!==ae&&d(v,me)):ve&16?k&16?he(ae,me,v,C,V,q,G,Y,ee):oe(ae,V,q,!0):(ve&8&&d(v,""),k&16&&H(me,v,C,V,q,G,Y,ee))},be=(g,y,v,C,V,q,G,Y,ee)=>{g=g||md,y=y||md;const ae=g.length,ve=y.length,me=Math.min(ae,ve);let Ee;for(Ee=0;Eeve?oe(g,V,q,!0,!1,me):H(y,v,C,V,q,G,Y,ee,me)},he=(g,y,v,C,V,q,G,Y,ee)=>{let ae=0;const ve=y.length;let me=g.length-1,Ee=ve-1;for(;ae<=me&&ae<=Ee;){const k=g[ae],W=y[ae]=ee?mu(y[ae]):Rs(y[ae]);if($f(k,W))_(k,W,v,null,V,q,G,Y,ee);else break;ae++}for(;ae<=me&&ae<=Ee;){const k=g[me],W=y[Ee]=ee?mu(y[Ee]):Rs(y[Ee]);if($f(k,W))_(k,W,v,null,V,q,G,Y,ee);else break;me--,Ee--}if(ae>me){if(ae<=Ee){const k=Ee+1,W=kEe)for(;ae<=me;)Ne(g[ae],V,q,!0),ae++;else{const k=ae,W=ae,M=new Map;for(ae=W;ae<=Ee;ae++){const Ue=y[ae]=ee?mu(y[ae]):Rs(y[ae]);Ue.key!=null&&M.set(Ue.key,ae)}let S,R=0;const z=Ee-W+1;let ue=!1,ge=0;const we=new Array(z);for(ae=0;ae=z){Ne(Ue,V,q,!0);continue}let Ge;if(Ue.key!=null)Ge=M.get(Ue.key);else for(S=W;S<=Ee;S++)if(we[S-W]===0&&$f(Ue,y[S])){Ge=S;break}Ge===void 0?Ne(Ue,V,q,!0):(we[Ge-W]=ae+1,Ge>=ge?ge=Ge:ue=!0,_(Ue,y[Ge],v,null,V,q,G,Y,ee),R++)}const Me=ue?eq(we):md;for(S=Me.length-1,ae=z-1;ae>=0;ae--){const Ue=W+ae,Ge=y[Ue],We=Ue+1{const{el:q,type:G,transition:Y,children:ee,shapeFlag:ae}=g;if(ae&6){Te(g.component.subTree,y,v,C);return}if(ae&128){g.suspense.move(y,v,C);return}if(ae&64){G.move(g,y,v,pe);return}if(G===Fi){n(q,y,v);for(let me=0;meY.enter(q),V);else{const{leave:me,delayLeave:Ee,afterLeave:k}=Y,W=()=>n(q,y,v),M=()=>{me(q,()=>{W(),k&&k()})};Ee?Ee(q,W,M):M()}else n(q,y,v)},Ne=(g,y,v,C=!1,V=!1)=>{const{type:q,props:G,ref:Y,children:ee,dynamicChildren:ae,shapeFlag:ve,patchFlag:me,dirs:Ee}=g;if(Y!=null&&uE(Y,null,v,g,!0),ve&256){y.ctx.deactivate(g);return}const k=ve&1&&Ee,W=!Gh(g);let M;if(W&&(M=G&&G.onVnodeBeforeUnmount)&&gs(M,y,g),ve&6)Re(g.component,v,C);else{if(ve&128){g.suspense.unmount(v,C);return}k&&yc(g,null,y,"beforeUnmount"),ve&64?g.type.remove(g,y,v,V,pe,C):ae&&(q!==Fi||me>0&&me&64)?oe(ae,y,v,!1,!0):(q===Fi&&me&384||!V&&ve&16)&&oe(ee,y,v),C&&ye(g)}(W&&(M=G&&G.onVnodeUnmounted)||k)&&ji(()=>{M&&gs(M,y,g),k&&yc(g,null,y,"unmounted")},v)},ye=g=>{const{type:y,el:v,anchor:C,transition:V}=g;if(y===Fi){ce(v,C);return}if(y===J3){T(g);return}const q=()=>{a(v),V&&!V.persisted&&V.afterLeave&&V.afterLeave()};if(g.shapeFlag&1&&V&&!V.persisted){const{leave:G,delayLeave:Y}=V,ee=()=>G(v,q);Y?Y(g.el,q,ee):ee()}else q()},ce=(g,y)=>{let v;for(;g!==y;)v=h(g),a(g),g=v;a(y)},Re=(g,y,v)=>{const{bum:C,scope:V,update:q,subTree:G,um:Y}=g;C&&W3(C),V.stop(),q&&(q.active=!1,Ne(G,g,y,v)),Y&&ji(Y,y),ji(()=>{g.isUnmounted=!0},y),y&&y.pendingBranch&&!y.isUnmounted&&g.asyncDep&&!g.asyncResolved&&g.suspenseId===y.pendingId&&(y.deps--,y.deps===0&&y.resolve())},oe=(g,y,v,C=!1,V=!1,q=0)=>{for(let G=q;Gg.shapeFlag&6?J(g.component.subTree):g.shapeFlag&128?g.suspense.next():h(g.anchor||g.el),le=(g,y,v)=>{g==null?y._vnode&&Ne(y._vnode,null,null,!0):_(y._vnode||null,g,y,null,null,null,v),Zx(),F8(),y._vnode=g},pe={p:_,um:Ne,m:Te,r:ye,mt:$,mc:H,pc:ie,pbc:x,n:J,o:t};let L,P;return e&&([L,P]=e(pe)),{render:le,hydrate:L,createApp:GU(le,L)}}function _c({effect:t,update:e},r){t.allowRecurse=e.allowRecurse=r}function t5(t,e,r=!1){const n=t.children,a=e.children;if(bt(n)&&bt(a))for(let s=0;s>1,t[r[u]]0&&(e[n]=r[s-1]),r[s]=n)}}for(s=r.length,o=r[s-1];s-- >0;)r[s]=o,o=e[o];return r}const tq=t=>t.__isTeleport,Fi=Symbol.for("v-fgt"),Jb=Symbol.for("v-txt"),Vu=Symbol.for("v-cmt"),J3=Symbol.for("v-stc"),Wh=[];let ts=null;function Ot(t=!1){Wh.push(ts=t?null:[])}function rq(){Wh.pop(),ts=Wh[Wh.length-1]||null}let cp=1;function dI(t){cp+=t}function r5(t){return t.dynamicChildren=cp>0?ts||md:null,rq(),cp>0&&ts&&ts.push(t),t}function lr(t,e,r,n,a,s){return r5(Vt(t,e,r,n,a,s,!0))}function na(t,e,r,n,a){return r5(dr(t,e,r,n,a,!0))}function db(t){return t?t.__v_isVNode===!0:!1}function $f(t,e){return t.type===e.type&&t.key===e.key}const Yb="__vInternal",n5=({key:t})=>t??null,L1=({ref:t,ref_key:e,ref_for:r})=>(typeof t=="number"&&(t=""+t),t!=null?tn(t)||Zn(t)||St(t)?{i:Fn,r:t,k:e,f:!!r}:t:null);function Vt(t,e=null,r=null,n=0,a=null,s=t===Fi?0:1,o=!1,u=!1){const c={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&n5(e),ref:e&&L1(e),scopeId:Xb,slotScopeIds:null,children:r,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:n,dynamicProps:a,dynamicChildren:null,appContext:null,ctx:Fn};return u?(BO(c,r),s&128&&t.normalize(c)):r&&(c.shapeFlag|=tn(r)?8:16),cp>0&&!o&&ts&&(c.patchFlag>0||s&6)&&c.patchFlag!==32&&ts.push(c),c}const dr=nq;function nq(t,e=null,r=null,n=0,a=null,s=!1){if((!t||t===Q8)&&(t=Vu),db(t)){const u=Dd(t,e,!0);return r&&BO(u,r),cp>0&&!s&&ts&&(u.shapeFlag&6?ts[ts.indexOf(t)]=u:ts.push(u)),u.patchFlag|=-2,u}if(hq(t)&&(t=t.__vccOpts),e){e=iq(e);let{class:u,style:c}=e;u&&!tn(u)&&(e.class=Tn(u)),Fr(c)&&(R8(c)&&!bt(c)&&(c=On({},c)),e.style=xu(c))}const o=tn(t)?1:EU(t)?128:tq(t)?64:Fr(t)?4:St(t)?2:0;return Vt(t,e,r,n,a,o,s,!0)}function iq(t){return t?R8(t)||Yb in t?On({},t):t:null}function Dd(t,e,r=!1){const{props:n,ref:a,patchFlag:s,children:o}=t,u=e?cE(n||{},e):n;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:u,key:u&&n5(u),ref:e&&e.ref?r&&a?bt(a)?a.concat(L1(e)):[a,L1(e)]:L1(e):a,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:o,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Fi?s===-1?16:s|16:s,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Dd(t.ssContent),ssFallback:t.ssFallback&&Dd(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function td(t=" ",e=0){return dr(Jb,null,t,e)}function un(t="",e=!1){return e?(Ot(),na(Vu,null,t)):dr(Vu,null,t)}function Rs(t){return t==null||typeof t=="boolean"?dr(Vu):bt(t)?dr(Fi,null,t.slice()):typeof t=="object"?mu(t):dr(Jb,null,String(t))}function mu(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Dd(t)}function BO(t,e){let r=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(bt(e))r=16;else if(typeof e=="object")if(n&65){const a=e.default;a&&(a._c&&(a._d=!1),BO(t,a()),a._c&&(a._d=!0));return}else{r=32;const a=e._;!a&&!(Yb in e)?e._ctx=Fn:a===3&&Fn&&(Fn.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else St(e)?(e={default:e,_ctx:Fn},r=32):(e=String(e),n&64?(r=16,e=[td(e)]):r=8);t.children=e,t.shapeFlag|=r}function cE(...t){const e={};for(let r=0;rEn||Fn;let $O,$l,fI="__VUE_INSTANCE_SETTERS__";($l=YT()[fI])||($l=YT()[fI]=[]),$l.push(t=>En=t),$O=t=>{$l.length>1?$l.forEach(e=>e(t)):$l[0](t)};const Nd=t=>{$O(t),t.scope.on()},Xc=()=>{En&&En.scope.off(),$O(null)};function i5(t){return t.vnode.shapeFlag&4}let lp=!1;function cq(t,e=!1){lp=e;const{props:r,children:n}=t.vnode,a=i5(t);zU(t,r,a,e),KU(t,n);const s=a?lq(t,e):void 0;return lp=!1,s}function lq(t,e){const r=t.type;t.accessCache=Object.create(null),t.proxy=x8(new Proxy(t.ctx,LU));const{setup:n}=r;if(n){const a=t.setupContext=n.length>1?s5(t):null;Nd(t),nf();const s=ju(n,t,0,[t.props,a]);if(af(),Xc(),l8(s)){if(s.then(Xc,Xc),e)return s.then(o=>{hI(t,o,e)}).catch(o=>{zb(o,t,0)});t.asyncDep=s}else hI(t,s,e)}else a5(t,e)}function hI(t,e,r){St(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Fr(e)&&(t.setupState=N8(e)),a5(t,r)}let pI;function a5(t,e,r){const n=t.type;if(!t.render){if(!e&&pI&&!n.render){const a=n.template||FO(t).template;if(a){const{isCustomElement:s,compilerOptions:o}=t.appContext.config,{delimiters:u,compilerOptions:c}=n,l=On(On({isCustomElement:s,delimiters:u},o),c);n.render=pI(a,l)}}t.render=n.render||rs}Nd(t),nf(),UU(t),af(),Xc()}function dq(t){return t.attrsProxy||(t.attrsProxy=new Proxy(t.attrs,{get(e,r){return Ui(t,"get","$attrs"),e[r]}}))}function s5(t){const e=r=>{t.exposed=r||{}};return{get attrs(){return dq(t)},slots:t.slots,emit:t.emit,expose:e}}function Zb(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(N8(x8(t.exposed)),{get(e,r){if(r in e)return e[r];if(r in zh)return zh[r](t)},has(e,r){return r in e||r in zh}}))}function fq(t,e=!0){return St(t)?t.displayName||t.name:t.name||e&&t.__name}function hq(t){return St(t)&&"__vccOpts"in t}const tr=(t,e)=>dU(t,e,lp);function o5(t,e,r){const n=arguments.length;return n===2?Fr(e)&&!bt(e)?db(e)?dr(t,null,[e]):dr(t,e):dr(t,null,e):(n>3?r=Array.prototype.slice.call(arguments,2):n===3&&db(r)&&(r=[r]),dr(t,e,r))}const pq=Symbol.for("v-scx"),yq=()=>as(pq),bq="3.3.4",_q="http://www.w3.org/2000/svg",jc=typeof document<"u"?document:null,yI=jc&&jc.createElement("template"),gq={insert:(t,e,r)=>{e.insertBefore(t,r||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,r,n)=>{const a=e?jc.createElementNS(_q,t):jc.createElement(t,r?{is:r}:void 0);return t==="select"&&n&&n.multiple!=null&&a.setAttribute("multiple",n.multiple),a},createText:t=>jc.createTextNode(t),createComment:t=>jc.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>jc.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,r,n,a,s){const o=r?r.previousSibling:e.lastChild;if(a&&(a===s||a.nextSibling))for(;e.insertBefore(a.cloneNode(!0),r),!(a===s||!(a=a.nextSibling)););else{yI.innerHTML=n?`${t}`:t;const u=yI.content;if(n){const c=u.firstChild;for(;c.firstChild;)u.appendChild(c.firstChild);u.removeChild(c)}e.insertBefore(u,r)}return[o?o.nextSibling:e.firstChild,r?r.previousSibling:e.lastChild]}};function mq(t,e,r){const n=t._vtc;n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):r?t.setAttribute("class",e):t.className=e}function vq(t,e,r){const n=t.style,a=tn(r);if(r&&!a){if(e&&!tn(e))for(const s in e)r[s]==null&&lE(n,s,"");for(const s in r)lE(n,s,r[s])}else{const s=n.display;a?e!==r&&(n.cssText=r):e&&t.removeAttribute("style"),"_vod"in t&&(n.display=s)}}const bI=/\s*!important$/;function lE(t,e,r){if(bt(r))r.forEach(n=>lE(t,e,n));else if(r==null&&(r=""),e.startsWith("--"))t.setProperty(e,r);else{const n=wq(t,e);bI.test(r)?t.setProperty(rf(n),r.replace(bI,""),"important"):t[n]=r}}const _I=["Webkit","Moz","ms"],Y3={};function wq(t,e){const r=Y3[e];if(r)return r;let n=Vs(e);if(n!=="filter"&&n in t)return Y3[e]=n;n=kb(n);for(let a=0;a<_I.length;a++){const s=_I[a]+n;if(s in t)return Y3[e]=s}return e}const gI="http://www.w3.org/1999/xlink";function Sq(t,e,r,n,a){if(n&&e.startsWith("xlink:"))r==null?t.removeAttributeNS(gI,e.slice(6,e.length)):t.setAttributeNS(gI,e,r);else{const s=D$(e);r==null||s&&!h8(r)?t.removeAttribute(e):t.setAttribute(e,s?"":r)}}function Tq(t,e,r,n,a,s,o){if(e==="innerHTML"||e==="textContent"){n&&o(n,a,s),t[e]=r??"";return}const u=t.tagName;if(e==="value"&&u!=="PROGRESS"&&!u.includes("-")){t._value=r;const l=u==="OPTION"?t.getAttribute("value"):t.value,d=r??"";l!==d&&(t.value=d),r==null&&t.removeAttribute(e);return}let c=!1;if(r===""||r==null){const l=typeof t[e];l==="boolean"?r=h8(r):r==null&&l==="string"?(r="",c=!0):l==="number"&&(r=0,c=!0)}try{t[e]=r}catch{}c&&t.removeAttribute(e)}function Eq(t,e,r,n){t.addEventListener(e,r,n)}function Oq(t,e,r,n){t.removeEventListener(e,r,n)}function Aq(t,e,r,n,a=null){const s=t._vei||(t._vei={}),o=s[e];if(n&&o)o.value=n;else{const[u,c]=Rq(e);if(n){const l=s[e]=Pq(n,a);Eq(t,u,l,c)}else o&&(Oq(t,u,o,c),s[e]=void 0)}}const mI=/(?:Once|Passive|Capture)$/;function Rq(t){let e;if(mI.test(t)){e={};let n;for(;n=t.match(mI);)t=t.slice(0,t.length-n[0].length),e[n[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):rf(t.slice(2)),e]}let Z3=0;const xq=Promise.resolve(),Iq=()=>Z3||(xq.then(()=>Z3=0),Z3=Date.now());function Pq(t,e){const r=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=r.attached)return;ns(Dq(n,r.value),e,5,[n])};return r.value=t,r.attached=Iq(),r}function Dq(t,e){if(bt(e)){const r=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{r.call(t),t._stopped=!0},e.map(n=>a=>!a._stopped&&n&&n(a))}else return e}const vI=/^on[a-z]/,Nq=(t,e,r,n,a=!1,s,o,u,c)=>{e==="class"?mq(t,n,a):e==="style"?vq(t,r,n):qb(e)?vO(e)||Aq(t,e,r,n,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Cq(t,e,n,a))?Tq(t,e,n,s,o,u,c):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),Sq(t,e,n,a))};function Cq(t,e,r,n){return n?!!(e==="innerHTML"||e==="textContent"||e in t&&vI.test(e)&&St(r)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||vI.test(e)&&tn(r)?!1:e in t}const jq=On({patchProp:Nq},gq);let wI;function Mq(){return wI||(wI=YU(jq))}const Fq=(...t)=>{const e=Mq().createApp(...t),{mount:r}=e;return e.mount=n=>{const a=Lq(n);if(!a)return;const s=e._component;!St(s)&&!s.render&&!s.template&&(s.template=a.innerHTML),a.innerHTML="";const o=r(a,!1,a instanceof SVGElement);return a instanceof Element&&(a.removeAttribute("v-cloak"),a.setAttribute("data-v-app","")),o},e};function Lq(t){return tn(t)?document.querySelector(t):t}const Bq=["primary","secondary","success","danger","warning","info","light","dark"],$q="rgba({{color}}, 0.2) 0, rgba({{color}}, 0.3) 40%, rgba({{color}}, 0.4) 50%, rgba({{color}}, 0.5) 60%, rgba({{color}}, 0) 70%",Uq=[0,0,0],SI=.5,qq=t=>t&&Bq.includes(t.toLowerCase()),Vq=(t,e)=>{const r=s=>(s.length<7&&(s=`#${s[1]}${s[1]}${s[2]}${s[2]}${s[3]}${s[3]}`),[parseInt(s.substr(1,2),16),parseInt(s.substr(3,2),16),parseInt(s.substr(5,2),16)]),n=s=>{const o=document.body.appendChild(document.createElement("fictum")),u="rgb(1, 2, 3)";return o.style.color=u,o.style.color!==u||(o.style.color=s,o.style.color===u||o.style.color==="")?e:(s=getComputedStyle(o).color,document.body.removeChild(o),s)},a=s=>{const o=s.match(/[.\d]+/g);if(o===null)return;const u=o.map(c=>+Number(c));return u.length=3,u};return typeof t=="string"&&t.toLowerCase()==="transparent"?e:typeof t=="string"&&t[0]==="#"?r(t):(typeof t=="string"&&t.indexOf("rgb")===-1&&(t=n(t)),typeof t=="string"&&t.indexOf("rgb")===0?a(t):e)},Hq=({offsetX:t,offsetY:e,height:r,width:n})=>{const a=e<=r/2,s=t<=n/2,o=(f,h)=>Math.sqrt(f**2+h**2),u=e===r/2&&t===n/2,c={first:a===!0&&s===!1,second:a===!0&&s===!0,third:a===!1&&s===!0,fourth:a===!1&&s===!1},l={topLeft:o(t,e),topRight:o(n-t,e),bottomLeft:o(t,r-e),bottomRight:o(n-t,r-e)};let d=0;return u||c.fourth?d=l.topLeft:c.third?d=l.topRight:c.second?d=l.bottomRight:c.first&&(d=l.bottomLeft),d*2},kq=(t,e)=>{for(const r in e)t.style[r]=e[r]},Qq=t=>{const e=Vq(t,Uq);if(t!==""&&e){const r=e.join(",");return`radial-gradient(circle, ${$q.split("{{color}}").join(`${r}`)})`}},Gq=(t,e,r)=>{const n=document.createElement("div");n.classList.add("ripple-wave");const a={offsetX:r.centered?e.height/2:e.left,offsetY:r.centered?e.width/2:e.top,height:e.height,width:e.width},s=Hq(a),o=r.radius||s/2,u={delay:r.duration&&r.duration*SI,duration:r.duration&&r.duration-r.duration*SI},c={left:r.centered?`${Math.round(e.width/2-o)}px`:`${Math.round(e.left-o)}px`,top:r.centered?`${Math.round(e.height/2-o)}px`:`${Math.round(e.top-o)}px`,height:`${Math.round(r.radius&&r.radius*2||s)}px`,width:`${Math.round(r.radius&&r.radius*2||s)}px`,transitionDelay:`0s, ${u.delay}ms`,transitionDuration:`${r.duration}ms, ${u.duration}ms`};r.unbound&&t.classList.add("ripple-surface-unbound"),qq(r.color)?t.classList.add(`ripple-surface-${r.color}`):c.backgroundImage=Qq(r.color),kq(n,c),t.appendChild(n),setTimeout(()=>{n.classList.add("active")},50),setTimeout(()=>{t.removeChild(n)},r.duration?r.duration+1e3:1e3)},u5={mounted(t,e){if(e.value===!1)return;const r={centered:e.value&&e.value.centered||!1,color:e.value&&e.value.color||"",duration:e.value&&e.value.duration||500,radius:e.value&&e.value.radius||0,unbound:e.value&&e.value.unbound||!1};t.classList.add("ripple-surface"),t.waves=n=>{const a={top:n.layerY,left:n.layerX,height:t.offsetHeight,width:t.offsetWidth};Gq(t,a,r)},t.addEventListener("click",n=>t.waves(n))},updated(t){t.classList.contains("ripple-surface")||t.classList.add("ripple-surface")},unmounted(t){t.removeEventListener("click",e=>t.waves(e))}},zq={name:"MDBBtn"},Wq=Ea({...zq,props:{color:String,size:String,outline:String,rounded:Boolean,floating:Boolean,toggler:Boolean,toggle:Boolean,role:{type:String,default:"button"},type:{type:String,default:"button"},tag:{type:String,default:"button"},block:{type:Boolean,default:!1},ripple:{type:[Object,Boolean],default:t=>t.outline||t.color==="light"||t.color==="link"?{color:"dark"}:!0},picker:Boolean},emits:["update:toggle"],setup(t,{emit:e}){const r=t,n=pi(r.toggle),a=tr(()=>[!r.picker&&"btn",r.color&&`btn-${r.color}`,r.size&&`btn-${r.size}`,r.outline&&`btn-outline-${r.outline}`,r.rounded&&"btn-rounded",r.floating&&"btn-floating",r.block&&"btn-block",n.value&&"active"]),s=()=>{r.toggler&&(n.value=!n.value,e("update:toggle",n.value))};return(o,u)=>ub((Ot(),na(Go(t.tag),{type:t.type,role:t.role,class:Tn(Dt(a)),onClick:s},{default:Hr(()=>[is(o.$slots,"default")]),_:3},8,["type","role","class"])),[[Dt(u5),t.ripple]])}}),Xq={name:"MDBCard"},Kq=Ea({...Xq,props:{tag:{type:String,default:"div"},border:String,bg:String,text:[String,Array],shadow:String},setup(t){const e=t,r=tr(()=>{const a=e.text;return["card",e.border&&`border border-${e.border}`,e.bg&&`bg-${e.bg}`,e.shadow&&`shadow-${e.shadow}`,e.text&&n(a)]}),n=a=>typeof a=="string"?`text-${a}`:a.map(s=>`text-${s}`.trim()).join(" ");return(a,s)=>(Ot(),na(Go(t.tag),{class:Tn(Dt(r))},{default:Hr(()=>[is(a.$slots,"default")]),_:3},8,["class"]))}}),Jq={name:"MDBCardBody"},Yq=Ea({...Jq,props:{tag:{type:String,default:"div"},text:{type:[String,Array]}},setup(t){const e=t,r=tr(()=>{const a=e.text;return["card-body",e.text&&n(a)]}),n=a=>typeof a=="string"?`text-${a}`:a.map(s=>`text-${s}`.trim()).join(" ");return(a,s)=>(Ot(),na(Go(t.tag),{class:Tn(Dt(r))},{default:Hr(()=>[is(a.$slots,"default")]),_:3},8,["class"]))}}),Zq={name:"MDBCardTitle"},eV=Ea({...Zq,props:{tag:{type:String,default:"h5"},subtitle:{type:Boolean,default:!1}},setup(t){const e=t,r=tr(()=>e.subtitle?e.tag!=="h5"?e.tag:"h6":e.tag),n=tr(()=>[e.subtitle?"card-subtitle":"card-title"]);return(a,s)=>(Ot(),na(Go(Dt(r)),{class:Tn(Dt(n))},{default:Hr(()=>[is(a.$slots,"default")]),_:3},8,["class"]))}}),tV={name:"MDBCardText"},rV=Ea({...tV,props:{tag:{type:String,default:"p"}},setup(t){const e=tr(()=>["card-text"]);return(r,n)=>(Ot(),na(Go(t.tag),{class:Tn(Dt(e))},{default:Hr(()=>[is(r.$slots,"default")]),_:3},8,["class"]))}}),nV={name:"MDBCardFooter"},iV=Ea({...nV,props:{tag:{type:String,default:"div"},bg:String,border:String},setup(t){const e=t,r=tr(()=>["card-footer",e.border&&`border-${e.border}`,e.bg&&`bg-${e.bg}`]);return(n,a)=>(Ot(),na(Go(t.tag),{class:Tn(Dt(r))},{default:Hr(()=>[is(n.$slots,"default")]),_:3},8,["class"]))}}),aV=1e6,sV=t=>{do t+=Math.floor(Math.random()*aV);while(document.getElementById(t));return t},oV=/\..*/,uV={mouseenter:"mouseover",mouseleave:"mouseout"},cV=["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"];function c5(t,e,r){const n=typeof e=="string",a=n?r:e;let s=t.replace(oV,"");const o=uV[s];return o&&(s=o),cV.indexOf(s)>-1||(s=t),[n,a,s]}function lV(t,e,r,n){if(typeof e!="string"||!t)return;r||(r=n,n=null);const[a,s,o]=c5(e,r,n);t.addEventListener(o,s,a)}function dV(t,e,r,n){t.removeEventListener(e,r,!!n)}const fV=function(t,e,r,n=void 0){lV(t,e,r,n)},hV=function(t,e,r,n=void 0){if(typeof e!="string"||!t)return;const[a,s,o]=c5(e,r,n);dV(t,o,s,a?r:null)};var dE={stopProp(t){t.stopPropagation()},mounted(t,e){const r=a=>{const s=a.target;!t.contains(s)&&t!==s&&e.value(a)};t.clickOutside=r;const n=e.modifiers.mousedown?"mousedown":"click";document.addEventListener(n,a=>{var s;return(s=t.clickOutside)==null?void 0:s.call(t,a)}),document.addEventListener("touchstart",a=>{var s;return(s=t.clickOutside)==null?void 0:s.call(t,a)})},unmounted(t,e){if(!t.clickOutside)return;const r=e.modifiers.mousedown?"mousedown":"click";document.removeEventListener(r,n=>{var a;return(a=t.clickOutside)==null?void 0:a.call(t,n)}),document.removeEventListener("touchstart",n=>{var a;return(a=t.clickOutside)==null?void 0:a.call(t,n)}),delete t.clickOutside}};const pV={key:1,class:"visually-hidden"},yV={name:"MDBDropdownToggle"};({...yV,props:{...Wq.props}});const bV={name:"MDBContainer"},_V=Ea({...bV,props:{tag:{type:String,default:"div"},sm:{type:Boolean,default:!1},md:{type:Boolean,default:!1},lg:{type:Boolean,default:!1},xl:{type:Boolean,default:!1},xxl:{type:Boolean,default:!1},fluid:{type:Boolean,default:!1}},setup(t){const e=t,r=tr(()=>[e.fluid?"container-fluid":"",e.sm?"container-sm":"",e.md?"container-md":"",e.lg?"container-lg":"",e.xl?"container-xl":"",e.xxl?"container-xxl":"",!e.fluid&&!e.sm&&!e.md&&!e.lg&&!e.xl&&!e.xxl?"container":""]);return(n,a)=>(Ot(),na(Go(t.tag),{class:Tn(Dt(r))},{default:Hr(()=>[is(n.$slots,"default")]),_:3},8,["class"]))}}),gV=["id","value"],mV=["for"],vV={key:2,class:"form-helper"},wV={key:3,class:"form-helper"},SV={class:"form-counter"},TV=Vt("div",{class:"form-notch-trailing"},null,-1),EV=["id","value"],OV=["for"],AV={key:1,class:"form-helper"},RV={key:2,class:"form-helper"},xV={class:"form-counter"},IV=Vt("div",{class:"form-notch-trailing"},null,-1),PV={key:9,class:"form-text"},DV={name:"MDBInput",inheritAttrs:!1},NV=Ea({...DV,props:{id:String,label:String,labelClass:String,modelValue:[String,Number,Date],size:String,formOutline:{type:Boolean,default:!0},wrapperClass:String,inputGroup:{type:[Boolean,String],default:!1},wrap:{type:Boolean,default:!0},formText:String,white:Boolean,validationEvent:String,isValidated:Boolean,isValid:Boolean,validFeedback:String,invalidFeedback:String,tooltipFeedback:{type:Boolean,default:!1},tag:{type:String,default:"div"},helper:String,counter:Boolean,maxlength:{type:Number,default:0}},emits:["update:modelValue","click-outside","on-validate"],setup(t,{expose:e,emit:r}){const n=t,a=BU(),s=pi(null),o=pi(n.modelValue),u=pi(null),c=pi(!1),l=pi(9),d=pi(0),f=n.id||sV("MDBInput-"),h=tr(()=>[n.formOutline&&"form-outline",_.value,n.white&&"form-white",n.wrapperClass]),p=tr(()=>["form-control",n.size?`form-control-${n.size}`:n.inputGroup&&n.inputGroup!==!0&&`form-control-${n.inputGroup}`,(o.value||o.value===0)&&"active",c.value&&"placeholder-active",A.value&&T.value&&"is-valid",A.value&&!T.value&&"is-invalid"]),b=tr(()=>["form-label",n.labelClass]),_=tr(()=>{if(n.inputGroup)return n.inputGroup!==!0?`input-group input-group-${n.inputGroup}`:"input-group"}),E=tr(()=>n.inputGroup&&A.value?{marginBottom:"1rem"}:""),w=tr(()=>n.tooltipFeedback?"valid-tooltip":"valid-feedback"),O=tr(()=>n.tooltipFeedback?"invalid-tooltip":"invalid-feedback"),A=pi(n.isValidated),T=pi(n.isValid),I=pi(""),D=tr(()=>A.value&&!T.value&&n.validationEvent?I.value:n.invalidFeedback),U=he=>{const Te=he.target;T.value=Te.checkValidity(),T.value||(I.value=Te.validationMessage),A.value=!0,r("on-validate",T.value)},H=()=>{n.validationEvent!=="submit"&&typeof s.value!="string"&&fV(s.value,n.validationEvent,U)};function N(){u.value&&(d.value=u.value.clientWidth*.8+8)}function x(){a.placeholder&&!u.value?c.value=!0:c.value=!1}const F=pi(null);F.value=typeof o.value=="string"&&o.value?o.value.length:0;function X(he){const Te=he.target;if(n.counter){if(Te.value.length>n.maxlength){typeof o.value=="string"&&(Te.value=o.value);return}F.value=Te.value.length}o.value=Te.value,r("update:modelValue",o.value)}function ne(){r("click-outside")}const $=pi(null),j=pi(),Q=he=>{j.value.forEach(Te=>Te.style.opacity=he?"0":"1"),he&&($.value.style.opacity="1")},se=a.type&&a.type==="date",ie=(he=!1)=>{var Te;n.label&&n.formOutline&&((Te=j.value)==null?void 0:Te.length)>1&&Q(he),se&&typeof s.value!="string"&&(s.value.type=he?"date":"text")},be=he=>![...he.parentNode.children].findIndex(Te=>Te===he);return H8(()=>{if(N(),x(),ie(),n.label&&n.formOutline&&(j.value=s.value.parentNode.querySelectorAll(".form-notch")),n.label&&n.formOutline&&!be(s.value)){const he=parseFloat(getComputedStyle(u.value).left);u.value.style.left=`${he+s.value.offsetLeft}px`,l.value+=s.value.offsetLeft}n.validationEvent&&H()}),k8(()=>{N(),x()}),jO(()=>{typeof s.value!="string"&&hV(s.value,n.validationEvent,U)}),$8(()=>{var he,Te;if(n.counter&&typeof n.modelValue=="string"){if(((he=n.modelValue)==null?void 0:he.length)>n.maxlength){o.value=n.modelValue.slice(0,n.maxlength),F.value=n.maxlength;return}F.value=((Te=n.modelValue)==null?void 0:Te.length)||0}o.value=n.modelValue}),Td(()=>n.isValidated,he=>A.value=he),Td(()=>n.isValid,he=>T.value=he),e({inputRef:s}),(he,Te)=>(Ot(),lr(Fi,null,[t.wrap?un("",!0):ub((Ot(),lr("input",cE({key:0,class:Dt(p),id:Dt(f),value:o.value},he.$attrs,{onInput:X,ref_key:"inputRef",ref:s,onFocus:Te[0]||(Te[0]=Ne=>ie(!0)),onBlur:Te[1]||(Te[1]=Ne=>ie())}),null,16,gV)),[[Dt(dE),ne]]),t.label&&!t.wrap?(Ot(),lr("label",{key:1,ref_key:"labelRef",ref:u,class:Tn(Dt(b)),for:Dt(f)},jr(t.label),11,mV)):un("",!0),!t.wrap&&t.helper?(Ot(),lr("div",vV,jr(t.helper),1)):un("",!0),!t.wrap&&t.counter?(Ot(),lr("div",wV,[Vt("div",SV,jr(F.value)+" / "+jr(t.maxlength),1)])):un("",!0),t.wrap?un("",!0):is(he.$slots,"default",{key:4}),!t.wrap&&t.validFeedback?(Ot(),lr("div",{key:5,class:Tn(Dt(w))},jr(t.validFeedback),3)):un("",!0),!t.wrap&&Dt(D)?(Ot(),lr("div",{key:6,class:Tn(Dt(O))},jr(Dt(D)),3)):un("",!0),!t.wrap&&t.formOutline?(Ot(),lr("div",{key:7,class:"form-notch",ref_key:"notchRef",ref:$},[Vt("div",{class:"form-notch-leading",style:xu({width:`${l.value}px`})},null,4),Vt("div",{class:"form-notch-middle",style:xu({width:`${d.value}px`})},null,4),TV],512)):un("",!0),t.wrap?ub((Ot(),na(Go(t.tag),{key:8,class:Tn(Dt(h)),style:xu(Dt(E))},{default:Hr(()=>[is(he.$slots,"prepend"),Vt("input",cE({class:Dt(p)},he.$attrs,{id:Dt(f),value:o.value,onInput:X,ref_key:"inputRef",ref:s,onFocus:Te[2]||(Te[2]=Ne=>ie(!0)),onBlur:Te[3]||(Te[3]=Ne=>ie())}),null,16,EV),t.label?(Ot(),lr("label",{key:0,ref_key:"labelRef",ref:u,class:Tn(Dt(b)),for:Dt(f)},jr(t.label),11,OV)):un("",!0),t.helper?(Ot(),lr("div",AV,jr(t.helper),1)):un("",!0),t.counter?(Ot(),lr("div",RV,[Vt("div",xV,jr(F.value)+" / "+jr(t.maxlength),1)])):un("",!0),is(he.$slots,"default"),t.validFeedback?(Ot(),lr("div",{key:3,class:Tn(Dt(w))},jr(t.validFeedback),3)):un("",!0),Dt(D)?(Ot(),lr("div",{key:4,class:Tn(Dt(O))},jr(Dt(D)),3)):un("",!0),t.formOutline?(Ot(),lr("div",{key:5,class:"form-notch",ref_key:"notchRef",ref:$},[Vt("div",{class:"form-notch-leading",style:xu({width:`${l.value}px`})},null,4),Vt("div",{class:"form-notch-middle",style:xu({width:`${d.value}px`})},null,4),IV],512)):un("",!0)]),_:3},8,["class","style"])),[[Dt(dE),ne]]):un("",!0),t.formText?(Ot(),lr("div",PV,jr(t.formText),1)):un("",!0)],64))}});var m=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function CV(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function e_(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,a.get?a:{enumerable:!0,get:function(){return t[n]}})}),r}var l5={},t_={},UO={},Lp={},d5={},r_={},et={},qO={},f5={};Object.defineProperty(f5,"__esModule",{value:!0});var h5={};Object.defineProperty(h5,"__esModule",{value:!0});var p5={};Object.defineProperty(p5,"__esModule",{value:!0});var y5={};Object.defineProperty(y5,"__esModule",{value:!0});var b5={};Object.defineProperty(b5,"__esModule",{value:!0});var _5={};Object.defineProperty(_5,"__esModule",{value:!0});var g5={};Object.defineProperty(g5,"__esModule",{value:!0});var m5={};Object.defineProperty(m5,"__esModule",{value:!0});var v5={};Object.defineProperty(v5,"__esModule",{value:!0});var w5={};Object.defineProperty(w5,"__esModule",{value:!0});var S5={};Object.defineProperty(S5,"__esModule",{value:!0});var T5={};Object.defineProperty(T5,"__esModule",{value:!0});var E5={};Object.defineProperty(E5,"__esModule",{value:!0});var n_={};Object.defineProperty(n_,"__esModule",{value:!0});n_.Logger=void 0;class i_{static getLevelOrdinal(e){return i_.LEVELS[e]}}n_.Logger=i_;i_.LEVELS={trace:0,debug:1,info:2,warn:3,error:4,fatal:5};(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(f5,t),r(h5,t),r(p5,t),r(y5,t),r(b5,t),r(_5,t),r(g5,t),r(m5,t),r(v5,t),r(w5,t),r(S5,t),r(T5,t),r(E5,t),r(n_,t)})(qO);var Yc={},Bp="delete",Er=5,ga=1<>>0;if(""+r!==e||r===4294967295)return NaN;e=r}return e<0?Cd(t)+e:e}function O5(){return!0}function $p(t,e,r){return(t===0&&!R5(t)||r!==void 0&&t<=-r)&&(e===void 0||r!==void 0&&e>=r)}function sf(t,e){return A5(t,e,0)}function Up(t,e){return A5(t,e,e)}function A5(t,e,r){return t===void 0?r:R5(t)?e===1/0?e:Math.max(0,e+t)|0:e===void 0||e===t?t:Math.min(e,t)|0}function R5(t){return t<0||t===0&&1/t===-1/0}var x5="@@__IMMUTABLE_ITERABLE__@@";function ei(t){return!!(t&&t[x5])}var I5="@@__IMMUTABLE_KEYED__@@";function hr(t){return!!(t&&t[I5])}var P5="@@__IMMUTABLE_INDEXED__@@";function Ln(t){return!!(t&&t[P5])}function of(t){return hr(t)||Ln(t)}var Ar=function(e){return ei(e)?e:ti(e)},Oa=function(t){function e(r){return hr(r)?r:Ju(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ar),cl=function(t){function e(r){return Ln(r)?r:Aa(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ar),uf=function(t){function e(r){return ei(r)&&!of(r)?r:df(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e}(Ar);Ar.Keyed=Oa;Ar.Indexed=cl;Ar.Set=uf;var D5="@@__IMMUTABLE_SEQ__@@";function qp(t){return!!(t&&t[D5])}var N5="@@__IMMUTABLE_RECORD__@@";function Ku(t){return!!(t&&t[N5])}function oa(t){return ei(t)||Ku(t)}var cf="@@__IMMUTABLE_ORDERED__@@";function ra(t){return!!(t&&t[cf])}var Vp=0,ss=1,Sa=2,hE=typeof Symbol=="function"&&Symbol.iterator,C5="@@iterator",a_=hE||C5,Ht=function(e){this.next=e};Ht.prototype.toString=function(){return"[Iterator]"};Ht.KEYS=Vp;Ht.VALUES=ss;Ht.ENTRIES=Sa;Ht.prototype.inspect=Ht.prototype.toSource=function(){return this.toString()};Ht.prototype[a_]=function(){return this};function Rr(t,e,r,n){var a=t===0?e:t===1?r:[e,r];return n?n.value=a:n={value:a,done:!1},n}function Ti(){return{value:void 0,done:!0}}function HO(t){return Array.isArray(t)?!0:!!s_(t)}function TI(t){return t&&typeof t.next=="function"}function pE(t){var e=s_(t);return e&&e.call(t)}function s_(t){var e=t&&(hE&&t[hE]||t[C5]);if(typeof e=="function")return e}function jV(t){var e=s_(t);return e&&e===t.entries}function MV(t){var e=s_(t);return e&&e===t.keys}var lf=Object.prototype.hasOwnProperty;function kO(t){return Array.isArray(t)||typeof t=="string"?!0:t&&typeof t=="object"&&Number.isInteger(t.length)&&t.length>=0&&(t.length===0?Object.keys(t).length===1:t.hasOwnProperty(t.length-1))}var ti=function(t){function e(r){return r==null?GO():oa(r)?r.toSeq():LV(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq {","}")},e.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},e.prototype.__iterate=function(n,a){var s=this._cache;if(s){for(var o=s.length,u=0;u!==o;){var c=s[a?o-++u:u++];if(n(c[1],c[0],this)===!1)break}return u}return this.__iterateUncached(n,a)},e.prototype.__iterator=function(n,a){var s=this._cache;if(s){var o=s.length,u=0;return new Ht(function(){if(u===o)return Ti();var c=s[a?o-++u:u++];return Rr(n,c[0],c[1])})}return this.__iteratorUncached(n,a)},e}(Ar),Ju=function(t){function e(r){return r==null?GO().toKeyedSeq():ei(r)?hr(r)?r.toSeq():r.fromEntrySeq():Ku(r)?r.toSeq():zO(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.toKeyedSeq=function(){return this},e}(ti),Aa=function(t){function e(r){return r==null?GO():ei(r)?hr(r)?r.entrySeq():r.toIndexedSeq():Ku(r)?r.toSeq().entrySeq():j5(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toIndexedSeq=function(){return this},e.prototype.toString=function(){return this.__toString("Seq [","]")},e}(ti),df=function(t){function e(r){return(ei(r)&&!of(r)?r:Aa(r)).toSetSeq()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return e(arguments)},e.prototype.toSetSeq=function(){return this},e}(ti);ti.isSeq=qp;ti.Keyed=Ju;ti.Set=df;ti.Indexed=Aa;ti.prototype[D5]=!0;var Zc=function(t){function e(r){this._array=r,this.size=r.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n,a){return this.has(n)?this._array[Hu(this,n)]:a},e.prototype.__iterate=function(n,a){for(var s=this._array,o=s.length,u=0;u!==o;){var c=a?o-++u:u++;if(n(s[c],c,this)===!1)break}return u},e.prototype.__iterator=function(n,a){var s=this._array,o=s.length,u=0;return new Ht(function(){if(u===o)return Ti();var c=a?o-++u:u++;return Rr(n,c,s[c])})},e}(Aa),QO=function(t){function e(r){var n=Object.keys(r).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(r):[]);this._object=r,this._keys=n,this.size=n.length}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n,a){return a!==void 0&&!this.has(n)?a:this._object[n]},e.prototype.has=function(n){return lf.call(this._object,n)},e.prototype.__iterate=function(n,a){for(var s=this._object,o=this._keys,u=o.length,c=0;c!==u;){var l=o[a?u-++c:c++];if(n(s[l],l,this)===!1)break}return c},e.prototype.__iterator=function(n,a){var s=this._object,o=this._keys,u=o.length,c=0;return new Ht(function(){if(c===u)return Ti();var l=o[a?u-++c:c++];return Rr(n,l,s[l])})},e}(Ju);QO.prototype[cf]=!0;var FV=function(t){function e(r){this._collection=r,this.size=r.length||r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.__iterateUncached=function(n,a){if(a)return this.cacheResult().__iterate(n,a);var s=this._collection,o=pE(s),u=0;if(TI(o))for(var c;!(c=o.next()).done&&n(c.value,u++,this)!==!1;);return u},e.prototype.__iteratorUncached=function(n,a){if(a)return this.cacheResult().__iterator(n,a);var s=this._collection,o=pE(s);if(!TI(o))return new Ht(Ti);var u=0;return new Ht(function(){var c=o.next();return c.done?c:Rr(n,u++,c.value)})},e}(Aa),EI;function GO(){return EI||(EI=new Zc([]))}function zO(t){var e=WO(t);if(e)return e.fromEntrySeq();if(typeof t=="object")return new QO(t);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+t)}function j5(t){var e=WO(t);if(e)return e;throw new TypeError("Expected Array or collection object of values: "+t)}function LV(t){var e=WO(t);if(e)return jV(t)?e.fromEntrySeq():MV(t)?e.toSetSeq():e;if(typeof t=="object")return new QO(t);throw new TypeError("Expected Array or collection object of values, or keyed object: "+t)}function WO(t){return kO(t)?new Zc(t):HO(t)?new FV(t):void 0}var M5="@@__IMMUTABLE_MAP__@@";function Hp(t){return!!(t&&t[M5])}function o_(t){return Hp(t)&&ra(t)}function fb(t){return!!(t&&typeof t.equals=="function"&&typeof t.hashCode=="function")}function fn(t,e){if(t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1;if(typeof t.valueOf=="function"&&typeof e.valueOf=="function"){if(t=t.valueOf(),e=e.valueOf(),t===e||t!==t&&e!==e)return!0;if(!t||!e)return!1}return!!(fb(t)&&fb(e)&&t.equals(e))}var Uf=typeof Math.imul=="function"&&Math.imul(4294967295,2)===-2?Math.imul:function(e,r){e|=0,r|=0;var n=e&65535,a=r&65535;return n*a+((e>>>16)*a+n*(r>>>16)<<16>>>0)|0};function u_(t){return t>>>1&1073741824|t&3221225471}var BV=Object.prototype.valueOf;function gi(t){if(t==null)return OI(t);if(typeof t.hashCode=="function")return u_(t.hashCode(t));var e=kV(t);if(e==null)return OI(e);switch(typeof e){case"boolean":return e?1108378657:1108378656;case"number":return $V(e);case"string":return e.length>QV?UV(e):yE(e);case"object":case"function":return VV(e);case"symbol":return qV(e);default:if(typeof e.toString=="function")return yE(e.toString());throw new Error("Value type "+typeof e+" cannot be hashed.")}}function OI(t){return t===null?1108378658:1108378659}function $V(t){if(t!==t||t===1/0)return 0;var e=t|0;for(e!==t&&(e^=t*4294967295);t>4294967295;)t/=4294967295,e^=t;return u_(e)}function UV(t){var e=rS[t];return e===void 0&&(e=yE(t),tS===GV&&(tS=0,rS={}),tS++,rS[t]=e),e}function yE(t){for(var e=0,r=0;r0)switch(t.nodeType){case 1:return t.uniqueID;case 9:return t.documentElement&&t.documentElement.uniqueID}}function kV(t){return t.valueOf!==BV&&typeof t.valueOf=="function"?t.valueOf(t):t}function F5(){var t=++eS;return eS&1073741824&&(eS=0),t}var bE=typeof WeakMap=="function",_E;bE&&(_E=new WeakMap);var xI=Object.create(null),eS=0,Mc="__immutablehash__";typeof Symbol=="function"&&(Mc=Symbol(Mc));var QV=16,GV=255,tS=0,rS={},c_=function(t){function e(r,n){this._iter=r,this._useKeys=n,this.size=r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.get=function(n,a){return this._iter.get(n,a)},e.prototype.has=function(n){return this._iter.has(n)},e.prototype.valueSeq=function(){return this._iter.valueSeq()},e.prototype.reverse=function(){var n=this,a=XO(this,!0);return this._useKeys||(a.valueSeq=function(){return n._iter.toSeq().reverse()}),a},e.prototype.map=function(n,a){var s=this,o=q5(this,n,a);return this._useKeys||(o.valueSeq=function(){return s._iter.toSeq().map(n,a)}),o},e.prototype.__iterate=function(n,a){var s=this;return this._iter.__iterate(function(o,u){return n(o,u,s)},a)},e.prototype.__iterator=function(n,a){return this._iter.__iterator(n,a)},e}(Ju);c_.prototype[cf]=!0;var L5=function(t){function e(r){this._iter=r,this.size=r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.includes=function(n){return this._iter.includes(n)},e.prototype.__iterate=function(n,a){var s=this,o=0;return a&&Cd(this),this._iter.__iterate(function(u){return n(u,a?s.size-++o:o++,s)},a)},e.prototype.__iterator=function(n,a){var s=this,o=this._iter.__iterator(ss,a),u=0;return a&&Cd(this),new Ht(function(){var c=o.next();return c.done?c:Rr(n,a?s.size-++u:u++,c.value,c)})},e}(Aa),B5=function(t){function e(r){this._iter=r,this.size=r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.has=function(n){return this._iter.includes(n)},e.prototype.__iterate=function(n,a){var s=this;return this._iter.__iterate(function(o){return n(o,o,s)},a)},e.prototype.__iterator=function(n,a){var s=this._iter.__iterator(ss,a);return new Ht(function(){var o=s.next();return o.done?o:Rr(n,o.value,o.value,o)})},e}(df),$5=function(t){function e(r){this._iter=r,this.size=r.size}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.entrySeq=function(){return this._iter.toSeq()},e.prototype.__iterate=function(n,a){var s=this;return this._iter.__iterate(function(o){if(o){PI(o);var u=ei(o);return n(u?o.get(1):o[1],u?o.get(0):o[0],s)}},a)},e.prototype.__iterator=function(n,a){var s=this._iter.__iterator(ss,a);return new Ht(function(){for(;;){var o=s.next();if(o.done)return o;var u=o.value;if(u){PI(u);var c=ei(u);return Rr(n,c?u.get(0):u[0],c?u.get(1):u[1],o)}}})},e}(Ju);L5.prototype.cacheResult=c_.prototype.cacheResult=B5.prototype.cacheResult=$5.prototype.cacheResult=YO;function U5(t){var e=Xs(t);return e._iter=t,e.size=t.size,e.flip=function(){return t},e.reverse=function(){var r=t.reverse.apply(this);return r.flip=function(){return t.reverse()},r},e.has=function(r){return t.includes(r)},e.includes=function(r){return t.has(r)},e.cacheResult=YO,e.__iterateUncached=function(r,n){var a=this;return t.__iterate(function(s,o){return r(o,s,a)!==!1},n)},e.__iteratorUncached=function(r,n){if(r===Sa){var a=t.__iterator(r,n);return new Ht(function(){var s=a.next();if(!s.done){var o=s.value[0];s.value[0]=s.value[1],s.value[1]=o}return s})}return t.__iterator(r===ss?Vp:ss,n)},e}function q5(t,e,r){var n=Xs(t);return n.size=t.size,n.has=function(a){return t.has(a)},n.get=function(a,s){var o=t.get(a,$t);return o===$t?s:e.call(r,o,a,t)},n.__iterateUncached=function(a,s){var o=this;return t.__iterate(function(u,c,l){return a(e.call(r,u,c,l),c,o)!==!1},s)},n.__iteratorUncached=function(a,s){var o=t.__iterator(Sa,s);return new Ht(function(){var u=o.next();if(u.done)return u;var c=u.value,l=c[0];return Rr(a,l,e.call(r,c[1],l,t),u)})},n}function XO(t,e){var r=this,n=Xs(t);return n._iter=t,n.size=t.size,n.reverse=function(){return t},t.flip&&(n.flip=function(){var a=U5(t);return a.reverse=function(){return t.flip()},a}),n.get=function(a,s){return t.get(e?a:-1-a,s)},n.has=function(a){return t.has(e?a:-1-a)},n.includes=function(a){return t.includes(a)},n.cacheResult=YO,n.__iterate=function(a,s){var o=this,u=0;return s&&Cd(t),t.__iterate(function(c,l){return a(c,e?l:s?o.size-++u:u++,o)},!s)},n.__iterator=function(a,s){var o=0;s&&Cd(t);var u=t.__iterator(Sa,!s);return new Ht(function(){var c=u.next();if(c.done)return c;var l=c.value;return Rr(a,e?l[0]:s?r.size-++o:o++,l[1],c)})},n}function V5(t,e,r,n){var a=Xs(t);return n&&(a.has=function(s){var o=t.get(s,$t);return o!==$t&&!!e.call(r,o,s,t)},a.get=function(s,o){var u=t.get(s,$t);return u!==$t&&e.call(r,u,s,t)?u:o}),a.__iterateUncached=function(s,o){var u=this,c=0;return t.__iterate(function(l,d,f){if(e.call(r,l,d,f))return c++,s(l,n?d:c-1,u)},o),c},a.__iteratorUncached=function(s,o){var u=t.__iterator(Sa,o),c=0;return new Ht(function(){for(;;){var l=u.next();if(l.done)return l;var d=l.value,f=d[0],h=d[1];if(e.call(r,h,f,t))return Rr(s,n?f:c++,h,l)}})},a}function zV(t,e,r){var n=Zu().asMutable();return t.__iterate(function(a,s){n.update(e.call(r,a,s,t),0,function(o){return o+1})}),n.asImmutable()}function WV(t,e,r){var n=hr(t),a=(ra(t)?os():Zu()).asMutable();t.__iterate(function(o,u){a.update(e.call(r,o,u,t),function(c){return c=c||[],c.push(n?[u,o]:o),c})});var s=JO(t);return a.map(function(o){return fr(t,s(o))}).asImmutable()}function XV(t,e,r){var n=hr(t),a=[[],[]];t.__iterate(function(o,u){a[e.call(r,o,u,t)?1:0].push(n?[u,o]:o)});var s=JO(t);return a.map(function(o){return fr(t,s(o))})}function KO(t,e,r,n){var a=t.size;if($p(e,r,a))return t;var s=sf(e,a),o=Up(r,a);if(s!==s||o!==o)return KO(t.toSeq().cacheResult(),e,r,n);var u=o-s,c;u===u&&(c=u<0?0:u);var l=Xs(t);return l.size=c===0?c:t.size&&c||void 0,!n&&qp(t)&&c>=0&&(l.get=function(d,f){return d=Hu(this,d),d>=0&&dc)return Ti();var _=h.next();return n||d===ss||_.done?_:d===Vp?Rr(d,b-1,void 0,_):Rr(d,b-1,_.value[1],_)})},l}function KV(t,e,r){var n=Xs(t);return n.__iterateUncached=function(a,s){var o=this;if(s)return this.cacheResult().__iterate(a,s);var u=0;return t.__iterate(function(c,l,d){return e.call(r,c,l,d)&&++u&&a(c,l,o)}),u},n.__iteratorUncached=function(a,s){var o=this;if(s)return this.cacheResult().__iterator(a,s);var u=t.__iterator(Sa,s),c=!0;return new Ht(function(){if(!c)return Ti();var l=u.next();if(l.done)return l;var d=l.value,f=d[0],h=d[1];return e.call(r,h,f,o)?a===Sa?l:Rr(a,f,h,l):(c=!1,Ti())})},n}function H5(t,e,r,n){var a=Xs(t);return a.__iterateUncached=function(s,o){var u=this;if(o)return this.cacheResult().__iterate(s,o);var c=!0,l=0;return t.__iterate(function(d,f,h){if(!(c&&(c=e.call(r,d,f,h))))return l++,s(d,n?f:l-1,u)}),l},a.__iteratorUncached=function(s,o){var u=this;if(o)return this.cacheResult().__iterator(s,o);var c=t.__iterator(Sa,o),l=!0,d=0;return new Ht(function(){var f,h,p;do{if(f=c.next(),f.done)return n||s===ss?f:s===Vp?Rr(s,d++,void 0,f):Rr(s,d++,f.value[1],f);var b=f.value;h=b[0],p=b[1],l&&(l=e.call(r,p,h,u))}while(l);return s===Sa?f:Rr(s,h,p,f)})},a}function JV(t,e){var r=hr(t),n=[t].concat(e).map(function(o){return ei(o)?r&&(o=Oa(o)):o=r?zO(o):j5(Array.isArray(o)?o:[o]),o}).filter(function(o){return o.size!==0});if(n.length===0)return t;if(n.length===1){var a=n[0];if(a===t||r&&hr(a)||Ln(t)&&Ln(a))return a}var s=new Zc(n);return r?s=s.toKeyedSeq():Ln(t)||(s=s.toSetSeq()),s=s.flatten(!0),s.size=n.reduce(function(o,u){if(o!==void 0){var c=u.size;if(c!==void 0)return o+c}},0),s}function k5(t,e,r){var n=Xs(t);return n.__iterateUncached=function(a,s){if(s)return this.cacheResult().__iterate(a,s);var o=0,u=!1;function c(l,d){l.__iterate(function(f,h){return(!e||d0}function Dy(t,e,r,n){var a=Xs(t),s=new Zc(r).map(function(o){return o.size});return a.size=n?s.max():s.min(),a.__iterate=function(o,u){for(var c=this.__iterator(ss,u),l,d=0;!(l=c.next()).done&&o(l.value,d++,this)!==!1;);return d},a.__iteratorUncached=function(o,u){var c=r.map(function(f){return f=Ar(f),pE(u?f.reverse():f)}),l=0,d=!1;return new Ht(function(){var f;return d||(f=c.map(function(h){return h.next()}),d=n?f.every(function(h){return h.done}):f.some(function(h){return h.done})),d?Ti():Rr(o,l++,e.apply(null,f.map(function(h){return h.value})))})},a}function fr(t,e){return t===e?t:qp(t)?e:t.constructor(e)}function PI(t){if(t!==Object(t))throw new TypeError("Expected [K, V] tuple: "+t)}function JO(t){return hr(t)?Oa:Ln(t)?cl:uf}function Xs(t){return Object.create((hr(t)?Ju:Ln(t)?Aa:df).prototype)}function YO(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):ti.prototype.cacheResult.call(this)}function Q5(t,e){return t===void 0&&e===void 0?0:t===void 0?1:e===void 0?-1:t>e?1:t0;)e[r]=arguments[r+1];if(typeof t!="function")throw new TypeError("Invalid merger function: "+t);return K5(this,e,t)}function K5(t,e,r){for(var n=[],a=0;a0;)e[r]=arguments[r+1];return Qp(t,e)}function Y5(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Qp(e,r,t)}function Z5(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return kp(t,e)}function eC(t,e){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return kp(e,r,t)}function kp(t,e,r){return Qp(t,e,tH(r))}function Qp(t,e,r){if(!ku(t))throw new TypeError("Cannot merge into non-data-structure value: "+t);if(oa(t))return typeof r=="function"&&t.mergeWith?t.mergeWith.apply(t,[r].concat(e)):t.merge?t.merge.apply(t,e):t.concat.apply(t,e);for(var n=Array.isArray(t),a=t,s=n?cl:Oa,o=n?function(c){a===t&&(a=hb(a)),a.push(c)}:function(c,l){var d=lf.call(a,l),f=d&&r?r(a[l],c,l):c;(!d||f!==a[l])&&(a===t&&(a=hb(a)),a[l]=f)},u=0;u0;)e[r]=arguments[r+1];return kp(this,e,t)}function cA(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Yu(this,t,Za(),function(n){return Qp(n,e)})}function lA(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];return Yu(this,t,Za(),function(n){return kp(n,e)})}function Gp(t){var e=this.asMutable();return t(e),e.wasAltered()?e.__ensureOwner(this.__ownerID):this}function zp(){return this.__ownerID?this:this.__ensureOwner(new VO)}function Wp(){return this.__ensureOwner()}function dA(){return this.__altered}var Zu=function(t){function e(r){return r==null?Za():Hp(r)&&!ra(r)?r:Za().withMutations(function(n){var a=t(r);Ji(a.size),a.forEach(function(s,o){return n.set(o,s)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return Za().withMutations(function(s){for(var o=0;o=n.length)throw new Error("Missing value for key: "+n[o]);s.set(n[o],n[o+1])}})},e.prototype.toString=function(){return this.__toString("Map {","}")},e.prototype.get=function(n,a){return this._root?this._root.get(0,void 0,n,a):a},e.prototype.set=function(n,a){return CI(this,n,a)},e.prototype.remove=function(n){return CI(this,n,$t)},e.prototype.deleteAll=function(n){var a=Ar(n);return a.size===0?this:this.withMutations(function(s){a.forEach(function(o){return s.remove(o)})})},e.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Za()},e.prototype.sort=function(n){return os(jd(this,n))},e.prototype.sortBy=function(n,a){return os(jd(this,a,n))},e.prototype.map=function(n,a){var s=this;return this.withMutations(function(o){o.forEach(function(u,c){o.set(c,n.call(a,u,c,s))})})},e.prototype.__iterator=function(n,a){return new nH(this,n,a)},e.prototype.__iterate=function(n,a){var s=this,o=0;return this._root&&this._root.iterate(function(u){return o++,n(u[1],u[0],s)},a),o},e.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?fA(this.size,this._root,n,this.__hash):this.size===0?Za():(this.__ownerID=n,this.__altered=!1,this)},e}(Oa);Zu.isMap=Hp;var xr=Zu.prototype;xr[M5]=!0;xr[Bp]=xr.remove;xr.removeAll=xr.deleteAll;xr.setIn=iA;xr.removeIn=xr.deleteIn=sA;xr.update=oA;xr.updateIn=uA;xr.merge=xr.concat=W5;xr.mergeWith=X5;xr.mergeDeep=tC;xr.mergeDeepWith=rC;xr.mergeIn=cA;xr.mergeDeepIn=lA;xr.withMutations=Gp;xr.wasAltered=dA;xr.asImmutable=Wp;xr["@@transducer/init"]=xr.asMutable=zp;xr["@@transducer/step"]=function(t,e){return t.set(e[0],e[1])};xr["@@transducer/result"]=function(t){return t.asImmutable()};var fp=function(e,r){this.ownerID=e,this.entries=r};fp.prototype.get=function(e,r,n,a){for(var s=this.entries,o=0,u=s.length;o=cH)return iH(e,l,a,s);var p=e&&e===this.ownerID,b=p?l:Ps(l);return h?c?d===f-1?b.pop():b[d]=b.pop():b[d]=[a,s]:b.push([a,s]),p?(this.entries=b,this):new fp(e,b)}};var Md=function(e,r,n){this.ownerID=e,this.bitmap=r,this.nodes=n};Md.prototype.get=function(e,r,n,a){r===void 0&&(r=gi(n));var s=1<<((e===0?r:r>>>e)&wi),o=this.bitmap;return o&s?this.nodes[nC(o&s-1)].get(e+Er,r,n,a):a};Md.prototype.update=function(e,r,n,a,s,o,u){n===void 0&&(n=gi(a));var c=(r===0?n:n>>>r)&wi,l=1<=lH)return sH(e,p,d,c,_);if(f&&!_&&p.length===2&&jI(p[h^1]))return p[h^1];if(f&&_&&p.length===1&&jI(_))return _;var E=e&&e===this.ownerID,w=f?_?d:d^l:d|l,O=f?_?iC(p,h,_,E):uH(p,h,E):oH(p,h,_,E);return E?(this.bitmap=w,this.nodes=O,this):new Md(e,w,O)};var hp=function(e,r,n){this.ownerID=e,this.count=r,this.nodes=n};hp.prototype.get=function(e,r,n,a){r===void 0&&(r=gi(n));var s=(e===0?r:r>>>e)&wi,o=this.nodes[s];return o?o.get(e+Er,r,n,a):a};hp.prototype.update=function(e,r,n,a,s,o,u){n===void 0&&(n=gi(a));var c=(r===0?n:n>>>r)&wi,l=s===$t,d=this.nodes,f=d[c];if(l&&!f)return this;var h=hA(f,e,r+Er,n,a,s,o,u);if(h===f)return this;var p=this.count;if(!f)p++;else if(!h&&(p--,p>>r)&wi,o=(r===0?n:n>>>r)&wi,u,c=s===o?[pA(t,e,r+Er,n,a)]:(u=new Lo(e,n,a),s>>=1)o[u]=r&1?e[s++]:void 0;return o[n]=a,new hp(t,s+1,o)}function nC(t){return t-=t>>1&1431655765,t=(t&858993459)+(t>>2&858993459),t=t+(t>>4)&252645135,t+=t>>8,t+=t>>16,t&127}function iC(t,e,r,n){var a=n?t:Ps(t);return a[e]=r,a}function oH(t,e,r,n){var a=t.length+1;if(n&&e+1===a)return t[e]=r,t;for(var s=new Array(a),o=0,u=0;u0&&s=0&&n>>r&wi;if(a>=this.array.length)return new Mu([],e);var s=a===0,o;if(r>0){var u=this.array[a];if(o=u&&u.removeBefore(e,r-Er,n),o===u&&s)return this}if(s&&!o)return this;var c=Ld(this,e);if(!s)for(var l=0;l>>r&wi;if(a>=this.array.length)return this;var s;if(r>0){var o=this.array[a];if(s=o&&o.removeAfter(e,r-Er,n),s===o&&a===this.array.length-1)return this}var u=Ld(this,e);return u.array.splice(a+1),s&&(u.array[a]=s),u};var Xh={};function MI(t,e){var r=t._origin,n=t._capacity,a=yp(n),s=t._tail;return o(t._root,t._level,0);function o(l,d,f){return d===0?u(l,f):c(l,d,f)}function u(l,d){var f=d===a?s&&s.array:l&&l.array,h=d>r?0:r-d,p=n-d;return p>ga&&(p=ga),function(){if(h===p)return Xh;var b=e?--p:h++;return f&&f[b]}}function c(l,d,f){var h,p=l&&l.array,b=f>r?0:r-f>>d,_=(n-f>>d)+1;return _>ga&&(_=ga),function(){for(;;){if(h){var E=h();if(E!==Xh)return E;h=null}if(b===_)return Xh;var w=e?--_:b++;h=o(p&&p[w],d-Er,f+(w<=t.size||e<0)return t.withMutations(function(o){e<0?vu(o,e).set(0,r):vu(o,0,e+1).set(e,r)});e+=t._origin;var n=t._tail,a=t._root,s=fE();return e>=yp(t._capacity)?n=gE(n,t.__ownerID,0,e,r,s):a=gE(a,t.__ownerID,t._level,e,r,s),s.value?t.__ownerID?(t._root=a,t._tail=n,t.__hash=void 0,t.__altered=!0,t):pp(t._origin,t._capacity,t._level,a,n):t}function gE(t,e,r,n,a,s){var o=n>>>r&wi,u=t&&o0){var l=t&&t.array[o],d=gE(l,e,r-Er,n,a,s);return d===l?t:(c=Ld(t,e),c.array[o]=d,c)}return u&&t.array[o]===a?t:(s&&ma(s),c=Ld(t,e),a===void 0&&o===c.array.length-1?c.array.pop():c.array[o]=a,c)}function Ld(t,e){return e&&t&&e===t.ownerID?t:new Mu(t?t.array.slice():[],e)}function sC(t,e){if(e>=yp(t._capacity))return t._tail;if(e<1<0;)r=r.array[e>>>n&wi],n-=Er;return r}}function vu(t,e,r){e!==void 0&&(e|=0),r!==void 0&&(r|=0);var n=t.__ownerID||new VO,a=t._origin,s=t._capacity,o=a+e,u=r===void 0?s:r<0?s+r:a+r;if(o===a&&u===s)return t;if(o>=u)return t.clear();for(var c=t._level,l=t._root,d=0;o+d<0;)l=new Mu(l&&l.array.length?[void 0,l]:[],n),c+=Er,d+=1<=1<f?new Mu([],n):p;if(p&&h>f&&oEr;E-=Er){var w=f>>>E&wi;_=_.array[w]=Ld(_.array[w],n)}_.array[f>>>Er&wi]=p}if(u=h)o-=h,u-=h,c=Er,l=null,b=b&&b.removeBefore(n,0,o);else if(o>a||h>>c&wi;if(O!==h>>>c&wi)break;O&&(d+=(1<a&&(l=l.removeBefore(n,c,o-d)),l&&h>>Er<=ga&&a.size>=n.size*2?(c=a.filter(function(l,d){return l!==void 0&&s!==d}),u=c.toKeyedSeq().map(function(l){return l[0]}).flip().toMap(),t.__ownerID&&(u.__ownerID=c.__ownerID=t.__ownerID)):(u=n.remove(e),c=s===a.size-1?a.pop():a.set(s,void 0))}else if(o){if(r===a.get(s)[1])return t;u=n,c=a.set(s,[e,r])}else u=n.set(e,a.size),c=a.set(a.size,[e,r]);return t.__ownerID?(t.size=u.size,t._map=u,t._list=c,t.__hash=void 0,t.__altered=!0,t):yA(u,c)}var oC="@@__IMMUTABLE_STACK__@@";function bp(t){return!!(t&&t[oC])}var Xp=function(t){function e(r){return r==null?Ny():bp(r)?r:Ny().pushAll(r)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.prototype.toString=function(){return this.__toString("Stack [","]")},e.prototype.get=function(n,a){var s=this._head;for(n=Hu(this,n);s&&n--;)s=s.next;return s?s.value:a},e.prototype.peek=function(){return this._head&&this._head.value},e.prototype.push=function(){var n=arguments;if(arguments.length===0)return this;for(var a=this.size+arguments.length,s=this._head,o=arguments.length-1;o>=0;o--)s={value:n[o],next:s};return this.__ownerID?(this.size=a,this._head=s,this.__hash=void 0,this.__altered=!0,this):xh(a,s)},e.prototype.pushAll=function(n){if(n=t(n),n.size===0)return this;if(this.size===0&&bp(n))return n;Ji(n.size);var a=this.size,s=this._head;return n.__iterate(function(o){a++,s={value:o,next:s}},!0),this.__ownerID?(this.size=a,this._head=s,this.__hash=void 0,this.__altered=!0,this):xh(a,s)},e.prototype.pop=function(){return this.slice(1)},e.prototype.clear=function(){return this.size===0?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Ny()},e.prototype.slice=function(n,a){if($p(n,a,this.size))return this;var s=sf(n,this.size),o=Up(a,this.size);if(o!==this.size)return t.prototype.slice.call(this,n,a);for(var u=this.size-s,c=this._head;s--;)c=c.next;return this.__ownerID?(this.size=u,this._head=c,this.__hash=void 0,this.__altered=!0,this):xh(u,c)},e.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?xh(this.size,this._head,n,this.__hash):this.size===0?Ny():(this.__ownerID=n,this.__altered=!1,this)},e.prototype.__iterate=function(n,a){var s=this;if(a)return new Zc(this.toArray()).__iterate(function(c,l){return n(c,l,s)},a);for(var o=0,u=this._head;u&&n(u.value,o++,this)!==!1;)u=u.next;return o},e.prototype.__iterator=function(n,a){if(a)return new Zc(this.toArray()).__iterator(n,a);var s=0,o=this._head;return new Ht(function(){if(o){var u=o.value;return o=o.next,Rr(n,s++,u)}return Ti()})},e}(cl);Xp.isStack=bp;var Ei=Xp.prototype;Ei[oC]=!0;Ei.shift=Ei.pop;Ei.unshift=Ei.push;Ei.unshiftAll=Ei.pushAll;Ei.withMutations=Gp;Ei.wasAltered=dA;Ei.asImmutable=Wp;Ei["@@transducer/init"]=Ei.asMutable=zp;Ei["@@transducer/step"]=function(t,e){return t.unshift(e)};Ei["@@transducer/result"]=function(t){return t.asImmutable()};function xh(t,e,r,n){var a=Object.create(Ei);return a.size=t,a._head=e,a.__ownerID=r,a.__hash=n,a.__altered=!1,a}var $I;function Ny(){return $I||($I=xh(0))}var uC="@@__IMMUTABLE_SET__@@";function Kp(t){return!!(t&&t[uC])}function p_(t){return Kp(t)&&ra(t)}function bA(t,e){if(t===e)return!0;if(!ei(e)||t.size!==void 0&&e.size!==void 0&&t.size!==e.size||t.__hash!==void 0&&e.__hash!==void 0&&t.__hash!==e.__hash||hr(t)!==hr(e)||Ln(t)!==Ln(e)||ra(t)!==ra(e))return!1;if(t.size===0&&e.size===0)return!0;var r=!of(t);if(ra(t)){var n=t.entries();return e.every(function(c,l){var d=n.next().value;return d&&fn(d[1],c)&&(r||fn(d[0],l))})&&n.next().done}var a=!1;if(t.size===void 0)if(e.size===void 0)typeof t.cacheResult=="function"&&t.cacheResult();else{a=!0;var s=t;t=e,e=s}var o=!0,u=e.__iterate(function(c,l){if(r?!t.has(c):a?!fn(c,t.get(l,$t)):!fn(t.get(l,$t),c))return o=!1,!1});return o&&t.size===u}function ll(t,e){var r=function(n){t.prototype[n]=e[n]};return Object.keys(e).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(e).forEach(r),t}function pb(t){if(!t||typeof t!="object")return t;if(!ei(t)){if(!ku(t))return t;t=ti(t)}if(hr(t)){var e={};return t.__iterate(function(n,a){e[a]=pb(n)}),e}var r=[];return t.__iterate(function(n){r.push(pb(n))}),r}var hf=function(t){function e(r){return r==null?Ih():Kp(r)&&!ra(r)?r:Ih().withMutations(function(n){var a=t(r);Ji(a.size),a.forEach(function(s){return n.add(s)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(n){return this(Oa(n).keySeq())},e.intersect=function(n){return n=Ar(n).toArray(),n.length?Bn.intersect.apply(e(n.pop()),n):Ih()},e.union=function(n){return n=Ar(n).toArray(),n.length?Bn.union.apply(e(n.pop()),n):Ih()},e.prototype.toString=function(){return this.__toString("Set {","}")},e.prototype.has=function(n){return this._map.has(n)},e.prototype.add=function(n){return Cy(this,this._map.set(n,n))},e.prototype.remove=function(n){return Cy(this,this._map.remove(n))},e.prototype.clear=function(){return Cy(this,this._map.clear())},e.prototype.map=function(n,a){var s=this,o=!1,u=Cy(this,this._map.mapEntries(function(c){var l=c[1],d=n.call(a,l,l,s);return d!==l&&(o=!0),[d,d]},a));return o?u:this},e.prototype.union=function(){for(var n=[],a=arguments.length;a--;)n[a]=arguments[a];return n=n.filter(function(s){return s.size!==0}),n.length===0?this:this.size===0&&!this.__ownerID&&n.length===1?this.constructor(n[0]):this.withMutations(function(s){for(var o=0;o=0&&a=0&&sthis.size?r:this.find(function(n,a){return a===e},void 0,r)},has:function(e){return e=Hu(this,e),e>=0&&(this.size!==void 0?this.size===1/0||ee?-1:0}function bH(t){if(t.size===1/0)return 0;var e=ra(t),r=hr(t),n=e?1:0,a=t.__iterate(r?e?function(s,o){n=31*n+QI(gi(s),gi(o))|0}:function(s,o){n=n+QI(gi(s),gi(o))|0}:e?function(s){n=31*n+gi(s)|0}:function(s){n=n+gi(s)|0});return _H(a,n)}function _H(t,e){return e=Uf(e,3432918353),e=Uf(e<<15|e>>>-15,461845907),e=Uf(e<<13|e>>>-13,5),e=(e+3864292196|0)^t,e=Uf(e^e>>>16,2246822507),e=Uf(e^e>>>13,3266489909),e=u_(e^e>>>16),e}function QI(t,e){return t^e+2654435769+(t<<6)+(t>>2)|0}var el=function(t){function e(r){return r==null?mE():p_(r)?r:mE().withMutations(function(n){var a=uf(r);Ji(a.size),a.forEach(function(s){return n.add(s)})})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.of=function(){return this(arguments)},e.fromKeys=function(n){return this(Oa(n).keySeq())},e.prototype.toString=function(){return this.__toString("OrderedSet {","}")},e}(hf);el.isOrderedSet=p_;var dl=el.prototype;dl[cf]=!0;dl.zip=pf.zip;dl.zipWith=pf.zipWith;dl.zipAll=pf.zipAll;dl.__empty=mE;dl.__make=fC;function fC(t,e){var r=Object.create(dl);return r.size=t?t.size:0,r._map=t,r.__ownerID=e,r}var GI;function mE(){return GI||(GI=fC(Rh()))}var hC={LeftThenRight:-1,RightThenLeft:1};function gH(t){if(Ku(t))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(oa(t))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(t===null||typeof t!="object")throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}var nn=function(e,r){var n;gH(e);var a=function(u){var c=this;if(u instanceof a)return u;if(!(this instanceof a))return new a(u);if(!n){n=!0;var l=Object.keys(e),d=s._indices={};s._name=r,s._keys=l,s._defaultValues=e;for(var f=0;f2?[]:void 0,{"":t})}function bC(t,e,r,n,a,s){if(typeof r!="string"&&!oa(r)&&(kO(r)||HO(r)||l_(r))){if(~t.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");t.push(r),a&&n!==""&&a.push(n);var o=e.call(s,n,ti(r).map(function(u,c){return bC(t,e,u,c,a,r)}),a&&a.slice());return t.pop(),a&&a.pop(),o}return r}function vH(t,e){return Ln(e)?e.toList():hr(e)?e.toMap():e.toSet()}var _C="4.3.4",wH={version:_C,Collection:Ar,Iterable:Ar,Seq:ti,Map:Zu,OrderedMap:os,List:ff,Stack:Xp,Set:hf,OrderedSet:el,PairSorting:hC,Record:nn,Range:_A,Repeat:pC,is:fn,fromJS:yC,hash:gi,isImmutable:oa,isCollection:ei,isKeyed:hr,isIndexed:Ln,isAssociative:of,isOrdered:ra,isValueObject:fb,isPlainObject:l_,isSeq:qp,isList:h_,isMap:Hp,isOrderedMap:o_,isStack:bp,isSet:Kp,isOrderedSet:p_,isRecord:Ku,get:d_,getIn:y_,has:eA,hasIn:gA,merge:J5,mergeDeep:Z5,mergeWith:Y5,mergeDeepWith:eC,remove:tA,removeIn:aA,set:rA,setIn:nA,update:f_,updateIn:Yu},SH=Ar;const TH=Object.freeze(Object.defineProperty({__proto__:null,Collection:Ar,Iterable:SH,List:ff,Map:Zu,OrderedMap:os,OrderedSet:el,PairSorting:hC,Range:_A,Record:nn,Repeat:pC,Seq:ti,Set:hf,Stack:Xp,default:wH,fromJS:yC,get:d_,getIn:y_,has:eA,hasIn:gA,hash:gi,is:fn,isAssociative:of,isCollection:ei,isImmutable:oa,isIndexed:Ln,isKeyed:hr,isList:h_,isMap:Hp,isOrdered:ra,isOrderedMap:o_,isOrderedSet:p_,isPlainObject:l_,isRecord:Ku,isSeq:qp,isSet:Kp,isStack:bp,isValueObject:fb,merge:J5,mergeDeep:Z5,mergeDeepWith:eC,mergeWith:Y5,remove:tA,removeIn:aA,set:rA,setIn:nA,update:f_,updateIn:Yu,version:_C},Symbol.toStringTag,{value:"Module"})),wA=e_(TH);Object.defineProperty(Yc,"__esModule",{value:!0});Yc.ActionContextKey=Yc.ActionContext=void 0;const zI=wA;class od{constructor(e={}){this.map=(0,zI.Map)(e)}setDefault(e,r){return this.has(e)?this:this.set(e,r)}set(e,r){return this.setRaw(e.name,r)}setRaw(e,r){return new od(this.map.set(e,r))}delete(e){return new od(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 r=this;for(const n of e)for(const a of n.keys())r=r.set(a,n.get(a));return r}keys(){return[...this.map.keys()].map(e=>new gC(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 od?e:new od((0,zI.Map)(e||{}))}}Yc.ActionContext=od;class gC{constructor(e){this.name=e}}Yc.ActionContextKey=gC;var Yp={};Object.defineProperty(Yp,"__esModule",{value:!0});Yp.Bus=void 0;class EH{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 r=this.actors.indexOf(e);return r>=0?(this.actors.splice(r,1),!0):!1}unsubscribeObserver(e){const r=this.observers.indexOf(e);return r>=0?(this.observers.splice(r,1),!0):!1}publish(e){return this.actors.map(r=>({actor:r,reply:r.test(e)}))}onRun(e,r,n){for(const a of this.observers)a.onRun(e,r,n)}addDependencies(e,r){for(const n of r){let a=this.dependencyLinks.get(n);a||(a=[],this.dependencyLinks.set(n,a)),a.push(e)}this.reorderForDependencies()}reorderForDependencies(){if(this.dependencyLinks.size>0){const e=[];for(const r of this.dependencyLinks.keys()){const n=this.actors.indexOf(r);n>=0&&(this.actors.splice(n,1),e.push(r))}for(;e.length>0;){let r=-1;for(let a=0;a=0&&n.splice(a,1),n.length===0&&delete this.actorsIndex[r]}return super.unsubscribe(e)}publish(e){const r=this.getActionIdentifier(e);return r?[...this.actorsIndex[r]||[],...this.actorsIndex._undefined_||[]].map(a=>({actor:a,reply:a.test(e)})):super.publish(e)}getActorIdentifier(e){return this.actorIdentifierFields.reduce((r,n)=>r[n],e)}getActionIdentifier(e){return this.actionIdentifierFields.reduce((r,n)=>r[n],e)}}b_.BusIndexed=AH;var Zp={};Object.defineProperty(Zp,"__esModule",{value:!0});Zp.CONTEXT_KEY_LOGGER=void 0;const RH=Yc;Zp.CONTEXT_KEY_LOGGER=new RH.ActionContextKey("@comunica/core:log");var __={};Object.defineProperty(__,"__esModule",{value:!0});__.ActionObserver=void 0;class xH{constructor(e){Object.assign(this,e)}}__.ActionObserver=xH;var g_={};Object.defineProperty(g_,"__esModule",{value:!0});g_.Actor=void 0;const IH=Zp;class wu{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(IH.CONTEXT_KEY_LOGGER)}runObservable(e){const r=this.run(e);return this.bus.onRun(this,e,r),r}async initialize(){return!0}async deinitialize(){return!0}getDefaultLogData(e,r){const n=r?r():{};return n.actor=this.name,n}logTrace(e,r,n){const a=wu.getContextLogger(e);a&&a.trace(r,this.getDefaultLogData(e,n))}logDebug(e,r,n){const a=wu.getContextLogger(e);a&&a.debug(r,this.getDefaultLogData(e,n))}logInfo(e,r,n){const a=wu.getContextLogger(e);a&&a.info(r,this.getDefaultLogData(e,n))}logWarn(e,r,n){const a=wu.getContextLogger(e);a&&a.warn(r,this.getDefaultLogData(e,n))}logError(e,r,n){const a=wu.getContextLogger(e);a&&a.error(r,this.getDefaultLogData(e,n))}logFatal(e,r,n){const a=wu.getContextLogger(e);a&&a.fatal(r,this.getDefaultLogData(e,n))}}g_.Actor=wu;var m_={};Object.defineProperty(m_,"__esModule",{value:!0});m_.Mediator=void 0;class PH{constructor(e){Object.assign(this,e)}publish(e){const r=this.bus.publish(e);if(r.length===0)throw new Error(`No actors are able to reply to a message in the bus ${this.bus.name}`);return r}async mediateActor(e){return await this.mediateWith(e,this.publish(e))}async mediate(e){return(await this.mediateActor(e)).runObservable(e)}}m_.Mediator=PH;(function(t){var e=m&&m.__createBinding||(Object.create?function(s,o,u,c){c===void 0&&(c=u);var l=Object.getOwnPropertyDescriptor(o,u);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[u]}}),Object.defineProperty(s,c,l)}:function(s,o,u,c){c===void 0&&(c=u),s[c]=o[u]}),r=m&&m.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&e(o,s,u)};Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;const a=qO.Logger;t.Logger=a,r(Yc,t),r(Yp,t),r(b_,t),r(Zp,t),r(__,t),r(g_,t),r(m_,t)})(et);Object.defineProperty(r_,"__esModule",{value:!0});r_.ActorInit=void 0;const DH=et;class NH extends DH.Actor{constructor(e){super(e)}}r_.ActorInit=NH;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(r_,t)})(d5);Object.defineProperty(Lp,"__esModule",{value:!0});Lp.ActorInitQueryBase=void 0;const CH=d5;class jH extends CH.ActorInit{constructor(e){var r;(r=e.contextKeyShortcutsExtensions)==null||r.forEach(n=>{if(Object.keys(e.contextKeyShortcuts).some(a=>Object.keys(n).includes(a)))throw new Error("Duplicate keys found while adding `contextKeyShortcutsExtensions`.");e.contextKeyShortcuts={...e.contextKeyShortcuts,...n}}),super(e)}async test(e){return!0}async run(e){throw new Error("ActorInitSparql#run is not supported in the browser.")}}Lp.ActorInitQueryBase=jH;var v_={},oS={exports:{}},WI;function zo(){if(WI)return oS.exports;WI=1;var t=oS.exports={},e,r;function n(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?e=setTimeout:e=n}catch{e=n}try{typeof clearTimeout=="function"?r=clearTimeout:r=a}catch{r=a}})();function s(_){if(e===setTimeout)return setTimeout(_,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(_,0);try{return e(_,0)}catch{try{return e.call(null,_,0)}catch{return e.call(this,_,0)}}}function o(_){if(r===clearTimeout)return clearTimeout(_);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(_);try{return r(_)}catch{try{return r.call(null,_)}catch{return r.call(this,_)}}}var u=[],c=!1,l,d=-1;function f(){!c||!l||(c=!1,l.length?u=l.concat(u):d=-1,u.length&&h())}function h(){if(!c){var _=s(f);c=!0;for(var E=u.length;E;){for(l=u,u=[];++d1)for(var w=1;w"u"&&(globalThis.process=zo());class FH extends MH.ActorInitQueryBase{}v_.ActorInitQuery=FH;var w_={},ct={},e0={},rr={},Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.KeysRdfUpdateQuads=Mr.KeysRdfResolveQuadPattern=Mr.KeysRdfParseHtmlScript=Mr.KeysRdfParseJsonLd=Mr.KeysQueryOperation=Mr.KeysInitQuery=Mr.KeysHttpProxy=Mr.KeysHttpMemento=Mr.KeysHttpWayback=Mr.KeysHttp=Mr.KeysCore=void 0;const pt=et;Mr.KeysCore={log:pt.CONTEXT_KEY_LOGGER};Mr.KeysHttp={includeCredentials:new pt.ActionContextKey("@comunica/bus-http:include-credentials"),auth:new pt.ActionContextKey("@comunica/bus-http:auth"),fetch:new pt.ActionContextKey("@comunica/bus-http:fetch"),httpTimeout:new pt.ActionContextKey("@comunica/bus-http:http-timeout"),httpBodyTimeout:new pt.ActionContextKey("@comunica/bus-http:http-body-timeout"),httpRetryCount:new pt.ActionContextKey("@comunica/bus-http:http-retry-count"),httpRetryDelay:new pt.ActionContextKey("@comunica/bus-http:http-retry-delay"),httpRetryOnServerError:new pt.ActionContextKey("@comunica/bus-http:http-retry-on-server-error")};Mr.KeysHttpWayback={recoverBrokenLinks:new pt.ActionContextKey("@comunica/bus-http:recover-broken-links")};Mr.KeysHttpMemento={datetime:new pt.ActionContextKey("@comunica/actor-http-memento:datetime")};Mr.KeysHttpProxy={httpProxyHandler:new pt.ActionContextKey("@comunica/actor-http-proxy:httpProxyHandler")};Mr.KeysInitQuery={initialBindings:new pt.ActionContextKey("@comunica/actor-init-query:initialBindings"),queryFormat:new pt.ActionContextKey("@comunica/actor-init-query:queryFormat"),graphqlSingularizeVariables:new pt.ActionContextKey("@comunica/actor-init-query:singularizeVariables"),lenient:new pt.ActionContextKey("@comunica/actor-init-query:lenient"),queryString:new pt.ActionContextKey("@comunica/actor-init-query:queryString"),query:new pt.ActionContextKey("@comunica/actor-init-query:query"),baseIRI:new pt.ActionContextKey("@comunica/actor-init-query:baseIRI"),functionArgumentsCache:new pt.ActionContextKey("@comunica/actor-init-query:functionArgumentsCache"),queryTimestamp:new pt.ActionContextKey("@comunica/actor-init-query:queryTimestamp"),extensionFunctionCreator:new pt.ActionContextKey("@comunica/actor-init-query:extensionFunctionCreator"),extensionFunctions:new pt.ActionContextKey("@comunica/actor-init-query:extensionFunctions"),cliArgsHandlers:new pt.ActionContextKey("@comunica/actor-init-query:cliArgsHandlers"),explain:new pt.ActionContextKey("@comunica/actor-init-query:explain"),physicalQueryPlanLogger:new pt.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanLogger"),physicalQueryPlanNode:new pt.ActionContextKey("@comunica/actor-init-query:physicalQueryPlanNode"),jsonLdContext:new pt.ActionContextKey("@context")};Mr.KeysQueryOperation={operation:new pt.ActionContextKey("@comunica/bus-query-operation:operation"),joinLeftMetadata:new pt.ActionContextKey("@comunica/bus-query-operation:joinLeftMetadata"),joinRightMetadatas:new pt.ActionContextKey("@comunica/bus-query-operation:joinRightMetadatas"),joinBindings:new pt.ActionContextKey("@comunica/bus-query-operation:joinBindings"),readOnly:new pt.ActionContextKey("@comunica/bus-query-operation:readOnly"),isPathArbitraryLengthDistinctKey:new pt.ActionContextKey("@comunica/bus-query-operation:isPathArbitraryLengthDistinct"),limitIndicator:new pt.ActionContextKey("@comunica/bus-query-operation:limitIndicator"),unionDefaultGraph:new pt.ActionContextKey("@comunica/bus-query-operation:unionDefaultGraph")};Mr.KeysRdfParseJsonLd={documentLoader:new pt.ActionContextKey("@comunica/actor-rdf-parse-jsonld:documentLoader"),strictValues:new pt.ActionContextKey("@comunica/actor-rdf-parse-jsonld:strictValues"),parserOptions:new pt.ActionContextKey("@comunica/actor-rdf-parse-jsonld:parserOptions")};Mr.KeysRdfParseHtmlScript={processingHtmlScript:new pt.ActionContextKey("@comunica/actor-rdf-parse-html-script:processingHtmlScript"),extractAllScripts:new pt.ActionContextKey("extractAllScripts")};Mr.KeysRdfResolveQuadPattern={sources:new pt.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:sources"),source:new pt.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:source"),sourceIds:new pt.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:sourceIds"),hypermediaSourcesAggregatedStores:new pt.ActionContextKey("@comunica/bus-rdf-resolve-quad-pattern:hypermediaSourcesAggregatedStores")};Mr.KeysRdfUpdateQuads={destination:new pt.ActionContextKey("@comunica/bus-rdf-update-quads:destination")};(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Mr,t)})(rr);var S_={},T_={};Object.defineProperty(T_,"__esModule",{value:!0});T_.BlankNodeScoped=void 0;class LH{constructor(e,r){this.termType="BlankNode",this.value=e,this.skolemized=r}equals(e){return!!e&&e.termType==="BlankNode"&&e.value===this.value}}T_.BlankNodeScoped=LH;var E_={};Object.defineProperty(E_,"__esModule",{value:!0});E_.BlankNodeBindingsScoped=void 0;class BH{constructor(e){this.termType="BlankNode",this.singleBindingsScope=!0,this.value=e}equals(e){return!!e&&e.termType==="BlankNode"&&e.value===this.value}}E_.BlankNodeBindingsScoped=BH;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(T_,t),r(E_,t)})(S_);var tl={},$n={},t0={},r0={},nr={},Xn={},ht={},n0={};Object.defineProperty(n0,"__esModule",{value:!0});n0.BlankNode=void 0;let $H=class{constructor(e){this.termType="BlankNode",this.value=e}equals(e){return!!e&&e.termType==="BlankNode"&&e.value===this.value}};n0.BlankNode=$H;var O_={},i0={};Object.defineProperty(i0,"__esModule",{value:!0});i0.DefaultGraph=void 0;let vE=class{constructor(){this.termType="DefaultGraph",this.value=""}equals(e){return!!e&&e.termType==="DefaultGraph"}};i0.DefaultGraph=vE;vE.INSTANCE=new vE;var a0={},yf={};Object.defineProperty(yf,"__esModule",{value:!0});yf.NamedNode=void 0;let UH=class{constructor(e){this.termType="NamedNode",this.value=e}equals(e){return!!e&&e.termType==="NamedNode"&&e.value===this.value}};yf.NamedNode=UH;Object.defineProperty(a0,"__esModule",{value:!0});a0.Literal=void 0;const mC=yf;let SA=class wE{constructor(e,r){this.termType="Literal",this.value=e,typeof r=="string"?(this.language=r,this.datatype=wE.RDF_LANGUAGE_STRING):r?(this.language="",this.datatype=r):(this.language="",this.datatype=wE.XSD_STRING)}equals(e){return!!e&&e.termType==="Literal"&&e.value===this.value&&e.language===this.language&&this.datatype.equals(e.datatype)}};a0.Literal=SA;SA.RDF_LANGUAGE_STRING=new mC.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#langString");SA.XSD_STRING=new mC.NamedNode("http://www.w3.org/2001/XMLSchema#string");var s0={};Object.defineProperty(s0,"__esModule",{value:!0});s0.Quad=void 0;let qH=class{constructor(e,r,n,a){this.termType="Quad",this.value="",this.subject=e,this.predicate=r,this.object=n,this.graph=a}equals(e){return!!e&&(e.termType==="Quad"||!e.termType)&&this.subject.equals(e.subject)&&this.predicate.equals(e.predicate)&&this.object.equals(e.object)&&this.graph.equals(e.graph)}};s0.Quad=qH;var o0={};Object.defineProperty(o0,"__esModule",{value:!0});o0.Variable=void 0;let VH=class{constructor(e){this.termType="Variable",this.value=e}equals(e){return!!e&&e.termType==="Variable"&&e.value===this.value}};o0.Variable=VH;Object.defineProperty(O_,"__esModule",{value:!0});O_.DataFactory=void 0;const HH=n0,kH=i0,XI=a0,QH=yf,GH=s0,zH=o0;let WH=0,XH=class{constructor(e){this.blankNodeCounter=0,e=e||{},this.blankNodePrefix=e.blankNodePrefix||`df_${WH++}_`}namedNode(e){return new QH.NamedNode(e)}blankNode(e){return new HH.BlankNode(e||`${this.blankNodePrefix}${this.blankNodeCounter++}`)}literal(e,r){return new XI.Literal(e,r)}variable(e){return new zH.Variable(e)}defaultGraph(){return kH.DefaultGraph.INSTANCE}quad(e,r,n,a){return new GH.Quad(e,r,n,a||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(XI.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}};O_.DataFactory=XH;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(n0,t),r(O_,t),r(i0,t),r(a0,t),r(yf,t),r(s0,t),r(o0,t)})(ht);Object.defineProperty(Xn,"__esModule",{value:!0});Xn.stringQuadToQuad=Xn.quadToStringQuad=Xn.stringToTerm=Xn.getLiteralLanguage=Xn.getLiteralType=Xn.getLiteralValue=Xn.termToString=void 0;const KH=ht,vC=new KH.DataFactory;function Ro(t){if(t)switch(t.termType){case"NamedNode":return t.value;case"BlankNode":return"_:"+t.value;case"Literal":const e=t;return'"'+e.value+'"'+(e.datatype&&e.datatype.value!=="http://www.w3.org/2001/XMLSchema#string"&&e.datatype.value!=="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"?"^^"+e.datatype.value:"")+(e.language?"@"+e.language:"");case"Quad":return`<<${Ro(t.subject)} ${Ro(t.predicate)} ${Ro(t.object)}${t.graph.termType==="DefaultGraph"?"":" "+Ro(t.graph)}>>`;case"Variable":return"?"+t.value;case"DefaultGraph":return t.value}}Xn.termToString=Ro;function wC(t){const e=/^"([^]*)"/.exec(t);if(!e)throw new Error(t+" is not a literal");return e[1]}Xn.getLiteralValue=wC;function SC(t){const e=/^"[^]*"(?:\^\^([^"]+)|(@)[^@"]+)?$/.exec(t);if(!e)throw new Error(t+" is not a literal");return e[1]||(e[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")}Xn.getLiteralType=SC;function TC(t){const e=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/.exec(t);if(!e)throw new Error(t+" is not a literal");return e[1]?e[1].toLowerCase():""}Xn.getLiteralLanguage=TC;function xo(t,e){if(e=e||vC,!t||!t.length)return e.defaultGraph();switch(t[0]){case"_":return e.blankNode(t.substr(2));case"?":if(!e.variable)throw new Error("Missing 'variable()' method on the given DataFactory");return e.variable(t.substr(1));case'"':const r=TC(t),n=e.namedNode(SC(t));return e.literal(wC(t),r||n);case"<":default:if(t[0]==="<"&&t.length>4&&t[1]==="<"&&t[t.length-1]===">"&&t[t.length-2]===">"){const a=t.slice(2,-2).trim();let s=[],o=0,u=0,c=!1;for(let l=0;l"){if(o===0)throw new Error("Found closing tag without opening tag in "+t);o--}if(d==='"'){let f=!1,h=l;for(;h-- >0&&a[h]==="\\";)f=!f;f||(c=!c)}if(d===" "&&!c&&o===0){for(s.push(a.slice(u,l));a[l+1]===" ";)l+=1;u=l+1}}if(o!==0)throw new Error("Found opening tag without closing tag in "+t);if(s.push(a.slice(u,a.length)),s.length!==3&&s.length!==4)throw new Error("Nested quad syntax error "+t);return s=s.map(l=>l.startsWith("<")&&!l.includes(" ")?l.slice(1,-1):l),e.quad(xo(s[0]),xo(s[1]),xo(s[2]),s[3]?xo(s[3]):void 0)}return e.namedNode(t)}}Xn.stringToTerm=xo;function JH(t){return{subject:Ro(t.subject),predicate:Ro(t.predicate),object:Ro(t.object),graph:Ro(t.graph)}}Xn.quadToStringQuad=JH;function YH(t,e){return e=e||vC,e.quad(xo(t.subject,e),xo(t.predicate,e),xo(t.object,e),xo(t.graph,e))}Xn.stringQuadToQuad=YH;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.termToString=t.stringToTerm=t.stringQuadToQuad=t.quadToStringQuad=t.getLiteralValue=t.getLiteralType=t.getLiteralLanguage=void 0;const e=Xn;Object.defineProperty(t,"getLiteralLanguage",{enumerable:!0,get:function(){return e.getLiteralLanguage}}),Object.defineProperty(t,"getLiteralType",{enumerable:!0,get:function(){return e.getLiteralType}}),Object.defineProperty(t,"getLiteralValue",{enumerable:!0,get:function(){return e.getLiteralValue}}),Object.defineProperty(t,"quadToStringQuad",{enumerable:!0,get:function(){return e.quadToStringQuad}}),Object.defineProperty(t,"stringQuadToQuad",{enumerable:!0,get:function(){return e.stringQuadToQuad}}),Object.defineProperty(t,"stringToTerm",{enumerable:!0,get:function(){return e.stringToTerm}}),Object.defineProperty(t,"termToString",{enumerable:!0,get:function(){return e.termToString}})})(nr);Object.defineProperty(r0,"__esModule",{value:!0});r0.bindingsToString=void 0;const ZH=nr;function ek(t){const e={};for(const r of t.keys())e[r.value]=(0,ZH.termToString)(t.get(r));return JSON.stringify(e,null," ")}r0.bindingsToString=ek;Object.defineProperty(t0,"__esModule",{value:!0});t0.Bindings=void 0;const jy=wA,tk=r0;class Su{constructor(e,r){this.type="bindings",this.dataFactory=e,this.entries=r}has(e){return this.entries.has(typeof e=="string"?e:e.value)}get(e){return this.entries.get(typeof e=="string"?e:e.value)}set(e,r){return new Su(this.dataFactory,this.entries.set(typeof e=="string"?e:e.value,r))}delete(e){return new Su(this.dataFactory,this.entries.delete(typeof e=="string"?e:e.value))}keys(){return this.mapIterable(this.iteratorToIterable(this.entries.keys()),e=>this.dataFactory.variable(e))}values(){return this.iteratorToIterable(this.entries.values())}forEach(e){this.entries.forEach((r,n)=>e(r,this.dataFactory.variable(n)))}get size(){return this.entries.size}[Symbol.iterator](){return this.mapIterable(this.iteratorToIterable(this.entries.entries()),([e,r])=>[this.dataFactory.variable(e),r])[Symbol.iterator]()}equals(e){var r;if(!e)return!1;if(this===e)return!0;if(this.size!==e.size)return!1;for(const n of this.keys())if(!((r=this.get(n))!=null&&r.equals(e.get(n))))return!1;return!0}filter(e){return new Su(this.dataFactory,(0,jy.Map)(this.entries.filter((r,n)=>e(r,this.dataFactory.variable(n)))))}map(e){return new Su(this.dataFactory,(0,jy.Map)(this.entries.map((r,n)=>e(r,this.dataFactory.variable(n)))))}merge(e){const r=new Set([...this.iteratorToIterable(this.entries.keys()),...[...e.keys()].map(a=>a.value)]),n=[];for(const a of r){const s=this.entries.get(a),o=e.get(this.dataFactory.variable(a));if(s&&o&&!s.equals(o))return;const u=s||o;n.push([a,u])}return new Su(this.dataFactory,(0,jy.Map)(n))}mergeWith(e,r){const n=new Set([...this.iteratorToIterable(this.entries.keys()),...[...r.keys()].map(s=>s.value)]),a=[];for(const s of n){const o=this.dataFactory.variable(s),u=this.entries.get(s),c=r.get(o);let l;u&&c&&!u.equals(c)?l=e(u,c,o):l=u||c,a.push([s,l])}return new Su(this.dataFactory,(0,jy.Map)(a))}toString(){return(0,tk.bindingsToString)(this)}*mapIterable(e,r){for(const n of e)yield r(n)}iteratorToIterable(e){return{[Symbol.iterator]:()=>e}}}t0.Bindings=Su;var A_={};Object.defineProperty(A_,"__esModule",{value:!0});A_.BindingsFactory=void 0;const rk=wA,nk=ht,ik=t0;class ak{constructor(e=new nk.DataFactory){this.dataFactory=e}bindings(e=[]){return new ik.Bindings(this.dataFactory,(0,rk.Map)(e.map(([r,n])=>[r.value,n])))}fromBindings(e){return this.bindings([...e])}fromRecord(e){return this.bindings(Object.entries(e).map(([r,n])=>[this.dataFactory.variable(r),n]))}}A_.BindingsFactory=ak;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(t0,t),r(A_,t),r(r0,t)})($n);var An={},st={};Object.defineProperty(st,"__esModule",{value:!0});st.matchPatternMappings=st.matchPatternComplete=st.matchPattern=st.matchTerm=st.getValueNestedPath=st.someTermsNested=st.someTerms=st.everyTermsNested=st.everyTerms=st.reduceTermsNested=st.reduceTerms=st.mapTermsNested=st.mapTerms=st.filterQuadTermNamesNested=st.filterQuadTermNames=st.filterTermsNested=st.filterTerms=st.forEachTermsNested=st.forEachTerms=st.collectNamedTerms=st.getNamedTerms=st.getTermsNested=st.getTerms=st.TRIPLE_TERM_NAMES=st.QUAD_TERM_NAMES=void 0;const sk=ht,TA=new sk.DataFactory;st.QUAD_TERM_NAMES=["subject","predicate","object","graph"];st.TRIPLE_TERM_NAMES=["subject","predicate","object"];function EC(t,e){return e&&t.graph.termType==="DefaultGraph"?[t.subject,t.predicate,t.object]:[t.subject,t.predicate,t.object,t.graph]}st.getTerms=EC;function OC(t,e){const r=[];for(const n of EC(t,e))n.termType==="Quad"?OC(n,e).forEach(a=>r.push(a)):r.push(n);return r}st.getTermsNested=OC;function ok(t){return[{key:"subject",value:t.subject},{key:"predicate",value:t.predicate},{key:"object",value:t.object},{key:"graph",value:t.graph}]}st.getNamedTerms=ok;function uk(t,e,r){const n={};return t.forEach(a=>n[a.key]=a.value),e&&(n.subject=n.subject||e("subject"),n.predicate=n.predicate||e("predicate"),n.object=n.object||e("object"),n.graph=n.graph||e("graph")),(r||TA).quad(n.subject,n.predicate,n.object,n.graph)}st.collectNamedTerms=uk;function ck(t,e){e(t.subject,"subject"),e(t.predicate,"predicate"),e(t.object,"object"),e(t.graph,"graph")}st.forEachTerms=ck;function Ph(t,e,r=[]){t.subject.termType==="Quad"?Ph(t.subject,e,[...r,"subject"]):e(t.subject,[...r,"subject"]),t.predicate.termType==="Quad"?Ph(t.predicate,e,[...r,"predicate"]):e(t.predicate,[...r,"predicate"]),t.object.termType==="Quad"?Ph(t.object,e,[...r,"object"]):e(t.object,[...r,"object"]),t.graph.termType==="Quad"?Ph(t.graph,e,[...r,"graph"]):e(t.graph,[...r,"graph"])}st.forEachTermsNested=Ph;function lk(t,e){const r=[];return e(t.subject,"subject")&&r.push(t.subject),e(t.predicate,"predicate")&&r.push(t.predicate),e(t.object,"object")&&r.push(t.object),e(t.graph,"graph")&&r.push(t.graph),r}st.filterTerms=lk;function Dh(t,e,r=[]){let n=[];return t.subject.termType==="Quad"?n=[...n,...Dh(t.subject,e,[...r,"subject"])]:e(t.subject,[...r,"subject"])&&n.push(t.subject),t.predicate.termType==="Quad"?n=[...n,...Dh(t.predicate,e,[...r,"predicate"])]:e(t.predicate,[...r,"predicate"])&&n.push(t.predicate),t.object.termType==="Quad"?n=[...n,...Dh(t.object,e,[...r,"object"])]:e(t.object,[...r,"object"])&&n.push(t.object),t.graph.termType==="Quad"?n=[...n,...Dh(t.graph,e,[...r,"graph"])]:e(t.graph,[...r,"graph"])&&n.push(t.graph),n}st.filterTermsNested=Dh;function dk(t,e){const r=[];return e(t.subject,"subject")&&r.push("subject"),e(t.predicate,"predicate")&&r.push("predicate"),e(t.object,"object")&&r.push("object"),e(t.graph,"graph")&&r.push("graph"),r}st.filterQuadTermNames=dk;function Nh(t,e,r=[]){let n=[];const a=[...r,"subject"];t.subject.termType==="Quad"?n=[...n,...Nh(t.subject,e,a)]:e(t.subject,a)&&n.push(a);const s=[...r,"predicate"];t.predicate.termType==="Quad"?n=[...n,...Nh(t.predicate,e,s)]:e(t.predicate,s)&&n.push(s);const o=[...r,"object"];t.object.termType==="Quad"?n=[...n,...Nh(t.object,e,o)]:e(t.object,o)&&n.push(o);const u=[...r,"graph"];return t.graph.termType==="Quad"?n=[...n,...Nh(t.graph,e,u)]:e(t.graph,u)&&n.push(u),n}st.filterQuadTermNamesNested=Nh;function fk(t,e,r){return(r||TA).quad(e(t.subject,"subject"),e(t.predicate,"predicate"),e(t.object,"object"),e(t.graph,"graph"))}st.mapTerms=fk;function Ch(t,e,r,n=[]){return(r||TA).quad(t.subject.termType==="Quad"?Ch(t.subject,e,r,[...n,"subject"]):e(t.subject,[...n,"subject"]),t.predicate.termType==="Quad"?Ch(t.predicate,e,r,[...n,"predicate"]):e(t.predicate,[...n,"predicate"]),t.object.termType==="Quad"?Ch(t.object,e,r,[...n,"object"]):e(t.object,[...n,"object"]),t.graph.termType==="Quad"?Ch(t.graph,e,r,[...n,"graph"]):e(t.graph,[...n,"graph"]))}st.mapTermsNested=Ch;function hk(t,e,r){let n=r;return n=e(n,t.subject,"subject"),n=e(n,t.predicate,"predicate"),n=e(n,t.object,"object"),e(n,t.graph,"graph")}st.reduceTerms=hk;function jh(t,e,r,n=[]){let a=r;return t.subject.termType==="Quad"?a=jh(t.subject,e,a,[...n,"subject"]):a=e(a,t.subject,[...n,"subject"]),t.predicate.termType==="Quad"?a=jh(t.predicate,e,a,[...n,"predicate"]):a=e(a,t.predicate,[...n,"predicate"]),t.object.termType==="Quad"?a=jh(t.object,e,a,[...n,"object"]):a=e(a,t.object,[...n,"object"]),t.graph.termType==="Quad"?a=jh(t.graph,e,a,[...n,"graph"]):a=e(a,t.graph,[...n,"graph"]),a}st.reduceTermsNested=jh;function AC(t,e){return e(t.subject,"subject")&&e(t.predicate,"predicate")&&e(t.object,"object")&&e(t.graph,"graph")}st.everyTerms=AC;function Mh(t,e,r=[]){return(t.subject.termType==="Quad"?Mh(t.subject,e,[...r,"subject"]):e(t.subject,[...r,"subject"]))&&(t.predicate.termType==="Quad"?Mh(t.predicate,e,[...r,"predicate"]):e(t.predicate,[...r,"predicate"]))&&(t.object.termType==="Quad"?Mh(t.object,e,[...r,"object"]):e(t.object,[...r,"object"]))&&(t.graph.termType==="Quad"?Mh(t.graph,e,[...r,"graph"]):e(t.graph,[...r,"graph"]))}st.everyTermsNested=Mh;function pk(t,e){return e(t.subject,"subject")||e(t.predicate,"predicate")||e(t.object,"object")||e(t.graph,"graph")}st.someTerms=pk;function Fh(t,e,r=[]){return(t.subject.termType==="Quad"?Fh(t.subject,e,[...r,"subject"]):e(t.subject,[...r,"subject"]))||(t.predicate.termType==="Quad"?Fh(t.predicate,e,[...r,"predicate"]):e(t.predicate,[...r,"predicate"]))||(t.object.termType==="Quad"?Fh(t.object,e,[...r,"object"]):e(t.object,[...r,"object"]))||(t.graph.termType==="Quad"?Fh(t.graph,e,[...r,"graph"]):e(t.graph,[...r,"graph"]))}st.someTermsNested=Fh;function RC(t,e){if(e.length===0)return t;if(t.termType==="Quad")return RC(t[e[0]],e.slice(1));throw new Error(`Tried to get ${e[0]} from term of type ${t.termType}`)}st.getValueNestedPath=RC;function Lh(t,e){return!e||e.termType==="Variable"||e.termType==="Quad"&&t.termType==="Quad"&&IC(t,e)||e.equals(t)}st.matchTerm=Lh;function xC(t,e,r,n,a){return Lh(t.subject,e)&&Lh(t.predicate,r)&&Lh(t.object,n)&&Lh(t.graph,a)}st.matchPattern=xC;function IC(t,e){return xC(t,e.subject,e.predicate,e.object,e.graph)}st.matchPatternComplete=IC;function yk(t,e,r={}){const n={};function a(s,o){return AC(s,(u,c)=>{var l,d;const f=o[c];switch(u.termType){case"Variable":return r.skipVarMapping&&f.termType==="Variable"||((d=(l=n[u.value])===null||l===void 0?void 0:l.equals(f))!==null&&d!==void 0?d:(n[u.value]=f,!0));case"Quad":return f.termType==="Quad"&&a(u,f);default:return u.equals(f)}})}return a(e,t)&&(r.returnMappings?n:!0)}st.matchPatternMappings=yk;var en={};Object.defineProperty(en,"__esModule",{value:!0});en.getQuads=en.getDefaultGraphs=en.getVariables=en.getLiterals=en.getBlankNodes=en.getNamedNodes=en.getTermsOfType=en.uniqTerms=en.TERM_TYPES=void 0;const bk=nr;en.TERM_TYPES=["NamedNode","BlankNode","Literal","Variable","DefaultGraph","Quad"];function _k(t){const e={};return t.filter(r=>{const n=(0,bk.termToString)(r);return!(n in e)&&(e[n]=!0)})}en.uniqTerms=_k;function fl(t,e){return t.filter(r=>r.termType===e)}en.getTermsOfType=fl;function gk(t){return fl(t,"NamedNode")}en.getNamedNodes=gk;function mk(t){return fl(t,"BlankNode")}en.getBlankNodes=mk;function vk(t){return fl(t,"Literal")}en.getLiterals=vk;function wk(t){return fl(t,"Variable")}en.getVariables=wk;function Sk(t){return fl(t,"DefaultGraph")}en.getDefaultGraphs=Sk;function Tk(t){return fl(t,"Quad")}en.getQuads=Tk;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(st,t),r(en,t)})(An);var xt={},EA={},Ek=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(a=n;a--!==0;)if(!t(e[a],r[a]))return!1;return!0}if(e instanceof Map&&r instanceof Map){if(e.size!==r.size)return!1;for(a of e.entries())if(!r.has(a[0]))return!1;for(a of e.entries())if(!t(a[1],r.get(a[0])))return!1;return!0}if(e instanceof Set&&r instanceof Set){if(e.size!==r.size)return!1;for(a of e.entries())if(!r.has(a[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(r)){if(n=e.length,n!=r.length)return!1;for(a=n;a--!==0;)if(e[a]!==r[a])return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=n;a--!==0;){var o=s[a];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r},bf={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.expressionTypes=t.types=void 0,function(e){e.ALT="alt",e.ASK="ask",e.BGP="bgp",e.CONSTRUCT="construct",e.DESCRIBE="describe",e.DISTINCT="distinct",e.EXPRESSION="expression",e.EXTEND="extend",e.FILTER="filter",e.FROM="from",e.GRAPH="graph",e.GROUP="group",e.INV="inv",e.JOIN="join",e.LEFT_JOIN="leftjoin",e.LINK="link",e.MINUS="minus",e.NOP="nop",e.NPS="nps",e.ONE_OR_MORE_PATH="OneOrMorePath",e.ORDER_BY="orderby",e.PATH="path",e.PATTERN="pattern",e.PROJECT="project",e.REDUCED="reduced",e.SEQ="seq",e.SERVICE="service",e.SLICE="slice",e.UNION="union",e.VALUES="values",e.ZERO_OR_MORE_PATH="ZeroOrMorePath",e.ZERO_OR_ONE_PATH="ZeroOrOnePath",e.COMPOSITE_UPDATE="compositeupdate",e.DELETE_INSERT="deleteinsert",e.LOAD="load",e.CLEAR="clear",e.CREATE="create",e.DROP="drop",e.ADD="add",e.MOVE="move",e.COPY="copy"}(t.types||(t.types={})),function(e){e.AGGREGATE="aggregate",e.EXISTENCE="existence",e.NAMED="named",e.OPERATOR="operator",e.TERM="term",e.WILDCARD="wildcard"}(t.expressionTypes||(t.expressionTypes={}))})(bf);var _f={},OA={};let R_=class{constructor(){return Ok||this}equals(e){return e&&this.termType===e.termType}};Object.defineProperty(R_.prototype,"value",{enumerable:!0,value:"*"});Object.defineProperty(R_.prototype,"termType",{enumerable:!0,value:"Wildcard"});var Ok=new R_;OA.Wildcard=R_;var Ak=function(){var t=function(xe,Oe,Pe,Le){for(Pe=Pe||{},Le=xe.length;Le--;Pe[xe[Le]]=Oe);return Pe},e=[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],r=[2,247],n=[100,110,113,115,116,123,126,131,329,330,331,332,333],a=[2,409],s=[1,18],o=[1,27],u=[13,16,45,197,224,229,308],c=[28,29,53],l=[28,53],d=[1,42],f=[1,45],h=[1,41],p=[1,44],b=[123,126],_=[1,67],E=[39,45,87],w=[13,16,45,197,224,308],O=[1,87],A=[2,281],T=[1,86],I=[13,16,45,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],D=[6,28,29,53,63,70,73,81,83,85],U=[6,13,16,28,29,53,63,70,73,81,83,85,87,308],H=[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],N=[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],x=[13,16,308],F=[112,132,327,334],X=[13,16,112,132,308],ne=[1,111],$=[1,117],j=[112,132,327,328,334],Q=[13,16,112,132,308,328],se=[28,29,45,53,87],ie=[1,138],be=[1,151],he=[1,128],Te=[1,127],Ne=[1,129],ye=[1,140],ce=[1,141],Re=[1,142],oe=[1,143],J=[1,144],le=[1,145],pe=[1,147],L=[1,148],P=[2,457],g=[1,158],y=[1,159],v=[1,160],C=[1,152],V=[1,153],q=[1,156],G=[1,171],Y=[1,172],ee=[1,173],ae=[1,174],ve=[1,175],me=[1,176],Ee=[1,167],k=[1,168],W=[1,169],M=[1,170],S=[1,157],R=[1,166],z=[1,161],ue=[1,162],ge=[1,163],we=[1,164],Me=[1,165],Ue=[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],Ge=[1,195],We=[6,31,73,81,83,85],lt=[2,285],Wr=[1,199],br=[1,201],Br=[6,31,70,73,81,83,85],Qt=[2,283],_r=[1,207],Pr=[1,218],kr=[1,223],Rn=[1,219],Tt=[1,225],B=[1,226],re=[1,224],Se=[6,63,70,73,81,83,85],Fe=[1,236],Ae=[2,334],ze=[1,243],De=[1,241],Be=[6,193],Je=[2,349],Pt=[2,339],at=[28,128],qe=[47,48,193,272],hs=[47,48,193,242,272],ke=[47,48,193,242,246,272],yn=[47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,341,342,343,344,345,346],gr=[39,47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,338,341,342,343,344,345,346],mr=[1,271],Pi=[1,270],vt=[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],ya=[1,281],ki=[1,280],ir=[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],to=[45,89],ru=[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],Xr=[13,16,31,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],Di=[31,89],an=[48,87],Qi=[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],sn=[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],Na=[1,313],Zr=[6,85],ps=[6,31,81,83,85],Ca=[2,361],ai=[2,353],qn=[1,343],nu=[31,112,335],ja=[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],Il=[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],te=[6,109,193],de=[31,112],_e=[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],$e=[1,390],He=[1,391],Xe=[13,16,87,197,308,314],gt=[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],Bt=[1,417],Yt=[1,418],Dr=[13,16,48,197,229,308],Xt=[6,31,85],vr=[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],si=[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],Vn=[29,31,85,112,159,160,161,163,164],xn=[1,443],oi=[1,444],Ma=[1,449],bn=[31,112,193,232,318,335],ro=[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],uc=[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],cc=[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],Gt=[13,16,31,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],_n=[31,45],no=[1,507],iu=[1,508],ly=[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],dy=[29,31,85,112,159,160,161,163,164,335],lc=[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],Ox=[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],Ax=[2,352],D3=[13,16,197,308,314],Rx=[1,565],Pl=[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],xx=[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],io=[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],Ix=[13,16,87,308],ao=[2,364],Dl=[29,31,85,112,159,160,161,163,164,193,232,318,335],fy=[31,112,193,232,272,318,335],so=[2,359],Px=[13,16,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],hy=[29,31,85,112,159,160,161,163,164,193,232,272,318,335],Dx=[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],Nx=[2,347],N3={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(Oe,Pe,Le,nt,ot,K,Gi){var Z=K.length-1;switch(ot){case 1:if(K[Z-1]=K[Z-1]||{},Rt.base&&(K[Z-1].base=Rt.base),Rt.base="",K[Z-1].prefixes=Rt.prefixes,Rt.prefixes=null,Rt.pathOnly){if(K[Z-1].type==="path"||"termType"in K[Z-1])return K[Z-1];throw new Error("Received full SPARQL query in path only mode")}else if(K[Z-1].type==="path"||"termType"in K[Z-1])throw new Error("Received only path in full SPARQL mode");if(K[Z-1].type==="update"){const Et={};for(const Kt of K[Z-1].updates)if(Kt.updateType==="insert"){const mt={};for(const Pn of Kt.insert)if(Pn.type==="bgp"||Pn.type==="graph")for(const Dn of Pn.triples)Dn.subject.termType==="BlankNode"&&(mt[Dn.subject.value]=!0),Dn.predicate.termType==="BlankNode"&&(mt[Dn.predicate.value]=!0),Dn.object.termType==="BlankNode"&&(mt[Dn.object.value]=!0);for(const Pn of Object.keys(mt)){if(Et[Pn])throw new Error("Detected reuse blank node across different INSERT DATA clauses");Et[Pn]=!0}}}return K[Z-1];case 2:this.$={...K[Z-1],...K[Z],type:"query"};break;case 4:Rt.base=Ff(K[Z]);break;case 5:Rt.prefixes||(Rt.prefixes={}),K[Z-1]=K[Z-1].substr(0,K[Z-1].length-1),K[Z]=Ff(K[Z]),Rt.prefixes[K[Z-1]]=K[Z];break;case 6:this.$={...K[Z-3],...hc(K[Z-2]),...K[Z-1],...K[Z]};break;case 7:if(!Rt.skipValidation&&(U3(K[Z-3].variables.map(Kt=>$3(Kt.expression))).some(Kt=>Kt.aggregation==="count"&&!(Kt.expression instanceof py))||K[Z].group)){for(const Kt of K[Z-3].variables)if(Kt.termType==="Variable"){if(!K[Z].group||!K[Z].group.map(mt=>Fl(mt)).includes(Fl(Kt)))throw Error("Projection of ungrouped variable (?"+Fl(Kt)+")")}else if($3(Kt.expression).length===0){const mt=p$(Kt.expression);for(const Pn of mt)if(!K[Z].group||!K[Z].group.map||!K[Z].group.map(Dn=>Fl(Dn)).includes(Fl(Pn)))throw Error("Use of ungrouped variable in projection of operation (?"+Fl(Pn)+")")}}const Ll=K[Z-1].where.filter(Et=>Et.type==="query");if(Ll.length>0){const Et=K[Z-3].variables.filter(mt=>mt.variable&&mt.variable.value).map(mt=>mt.variable.value),Kt=U3(Ll.map(mt=>mt.variables)).map(mt=>mt.value||mt.variable.value);for(const mt of Et)if(Kt.indexOf(mt)>=0)throw Error("Target id of 'AS' (?"+mt+") already used in subquery")}this.$=Kr(K[Z-3],hc(K[Z-2]),K[Z-1],K[Z]);break;case 8:this.$=Kr({queryType:"CONSTRUCT",template:K[Z-3]},hc(K[Z-2]),K[Z-1],K[Z]);break;case 9:this.$=Kr({queryType:"CONSTRUCT",template:K[Z-2]=K[Z-2]?K[Z-2].triples:[]},hc(K[Z-5]),{where:[{type:"bgp",triples:Nl([],K[Z-2])}]},K[Z]);break;case 10:this.$=Kr({queryType:"DESCRIBE",variables:K[Z-3]==="*"?[new py]:K[Z-3]},hc(K[Z-2]),K[Z-1],K[Z]);break;case 11:this.$=Kr({queryType:"ASK"},hc(K[Z-2]),K[Z-1],K[Z]);break;case 12:this.$=Kr(K[Z-1],{variables:[new py]});break;case 13:const k3=K[Z].map(Et=>Et.value||Et.variable.value),vy=y$(k3);if(vy.length>0)throw Error("Two or more of the resulting columns have the same name (?"+vy[0]+")");this.$=Kr(K[Z-1],{variables:K[Z]});break;case 14:this.$=Kr({queryType:"SELECT"},K[Z]&&(K[Z-1]=ui(K[Z]),K[Z]={},K[Z][K[Z-1]]=!0,K[Z]));break;case 16:case 27:this.$=Cl(K[Z-3],{variable:K[Z-1]});break;case 17:case 18:this.$=Kr(K[Z-3],K[Z-2],K[Z-1],K[Z],{type:"query"});break;case 19:case 58:this.$={iri:K[Z],named:!!K[Z-1]};break;case 20:this.$={where:K[Z].patterns};break;case 21:this.$=Kr(K[Z-1],K[Z]);break;case 22:this.$=Kr(K[Z-2],K[Z-1],K[Z]);break;case 23:this.$={group:K[Z]};break;case 24:case 25:case 28:case 31:case 33:case 34:this.$=Cl(K[Z]);break;case 26:this.$=Cl(K[Z-1]);break;case 29:this.$={having:K[Z]};break;case 30:this.$={order:K[Z]};break;case 32:this.$=Cl(K[Z],{descending:!0});break;case 35:this.$={limit:Ml(K[Z])};break;case 36:this.$={offset:Ml(K[Z])};break;case 37:this.$={limit:Ml(K[Z-2]),offset:Ml(K[Z])};break;case 38:this.$={limit:Ml(K[Z]),offset:Ml(K[Z-2])};break;case 39:case 43:this.$={type:"values",values:K[Z]};break;case 40:case 84:this.$=K[Z-1].map(Et=>({[K[Z-3]]:Et}));break;case 41:case 85:this.$=K[Z-1].map(()=>({}));break;case 42:case 86:var au=K[Z-4].length;K[Z-4]=K[Z-4].map(C3),this.$=K[Z-1].map(function(Et){if(Et.length!==au)throw Error("Inconsistent VALUES length");for(var Kt={},mt=0;mtKt.type==="bind")){const Kt=K[Z-1].indexOf(Et),mt=new Set;for(const Pn of K[Z-1].slice(0,Kt))(Pn.type==="group"||Pn.type==="bgp")&&qx(Pn).forEach(Dn=>mt.add(Dn));if(mt.has(Et.variable.value))throw Error("Variable used to bind is already bound (?"+Et.variable.value+")")}this.$={type:"group",patterns:K[Z-1]};break;case 71:this.$=K[Z-1]?ys([K[Z-1]],K[Z]):ys(K[Z]);break;case 72:this.$=K[Z]?[K[Z-2],K[Z]]:K[Z-2];break;case 75:this.$=Kr(K[Z],{type:"optional"});break;case 76:this.$=Kr(K[Z],{type:"minus"});break;case 77:this.$=Kr(K[Z],{type:"graph",name:K[Z-1]});break;case 78:this.$=Kr(K[Z],{type:"service",name:K[Z-1],silent:!!K[Z-2]});break;case 79:this.$={type:"filter",expression:K[Z]};break;case 80:this.$={type:"bind",variable:K[Z-1],expression:K[Z-3]};break;case 89:this.$=Bf(K[Z]);break;case 90:this.$=void 0;break;case 91:this.$=K[Z-1].length?{type:"union",patterns:ys(K[Z-1].map(M3),[M3(K[Z])])}:K[Z];break;case 95:this.$={...K[Z],function:K[Z-1]};break;case 96:this.$={type:"functionCall",args:[]};break;case 97:this.$={type:"functionCall",args:fc(K[Z-2],K[Z-1]),distinct:!!K[Z-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.$=fc(K[Z-2],K[Z-1]);break;case 101:this.$=ys(K[Z-2],[K[Z-1]]);break;case 102:case 112:this.$=V3(K[Z].map(Et=>Kr(oo(K[Z-1]),Et)));break;case 103:this.$=V3(Nl(K[Z].map(Et=>Kr(oo(K[Z-1].entity),Et)),K[Z-1].triples));break;case 105:this.$=ys([K[Z-1]],K[Z]);break;case 106:this.$=ys(K[Z]);break;case 107:this.$=B3(K[Z-1],K[Z]);break;case 109:case 237:this.$=Rt.factory.namedNode(i$);break;case 110:case 118:this.$=fc(K[Z-1],K[Z]);break;case 111:this.$=K[Z]?{annotation:K[Z],object:K[Z-1]}:K[Z-1];break;case 113:this.$=K[Z]?V3(Nl(K[Z].map(Et=>Kr(oo(K[Z-1].entity),Et)),K[Z-1].triples)):K[Z-1].triples;break;case 114:this.$=B3(...K[Z-1],K[Z]);break;case 116:this.$=B3(...K[Z]);break;case 117:case 159:case 163:this.$=[K[Z-1],K[Z]];break;case 119:this.$=K[Z]?{object:K[Z-1],annotation:K[Z]}:K[Z-1];break;case 120:this.$=K[Z-1].length?jl("|",fc(K[Z-1],K[Z])):K[Z];break;case 121:this.$=K[Z-1].length?jl("/",fc(K[Z-1],K[Z])):K[Z];break;case 122:this.$=K[Z]?jl(K[Z],[K[Z-1]]):K[Z-1];break;case 123:this.$=K[Z-1]?jl(K[Z-1],[K[Z]]):K[Z];break;case 125:case 131:this.$=jl(K[Z-1],[K[Z]]);break;case 129:this.$=jl("|",fc(K[Z-2],K[Z-1]));break;case 132:case 134:this.$=f$(K[Z-1]);break;case 133:case 135:this.$=h$(K[Z-1]);break;case 140:this.$={entity:K[Z],triples:[]};break;case 145:this.$=C3(K[Z]);break;case 149:this.$=Rt.factory.namedNode(Cx);break;case 151:case 153:case 158:case 162:this.$=j3(K[Z-1],K[Z]);break;case 152:this.$=["||",K[Z]];break;case 154:this.$=["&&",K[Z]];break;case 156:this.$=In(K[Z-1],[K[Z-2],K[Z]]);break;case 157:this.$=In(K[Z-2]?"notin":"in",[K[Z-3],K[Z]]);break;case 160:this.$=["+",j3(K[Z-1],K[Z])];break;case 161:var gy=bs(K[Z-1].value.replace("-",""),K[Z-1].datatype);this.$=["-",j3(gy,K[Z])];break;case 164:this.$=In("UPLUS",[K[Z]]);break;case 165:this.$=In(K[Z-1],[K[Z]]);break;case 166:this.$=In("UMINUS",[K[Z]]);break;case 177:this.$=In(ui(K[Z-1]));break;case 178:this.$=In(ui(K[Z-3]),[K[Z-1]]);break;case 179:this.$=Bf(In(ui(K[Z-3]),[K[Z-1]]));break;case 180:this.$=In(ui(K[Z-5]),[K[Z-3],K[Z-1]]);break;case 181:this.$=In(ui(K[Z-7]),[K[Z-5],K[Z-3],K[Z-1]]);break;case 182:this.$=Bf(In(ui(K[Z-7]),[K[Z-5],K[Z-3],K[Z-1]]));break;case 183:this.$=In(ui(K[Z-1]),K[Z]);break;case 184:this.$=In("bound",[C3(K[Z-1])]);break;case 185:this.$=In(K[Z-1],[]);break;case 186:this.$=In(K[Z-3],[K[Z-1]]);break;case 187:this.$=In(K[Z-2]?"notexists":"exists",[M3(K[Z])]);break;case 188:case 189:this.$=Cl(K[Z-1],{type:"aggregate",aggregation:ui(K[Z-4]),distinct:!!K[Z-2]});break;case 190:this.$=Cl(K[Z-2],{type:"aggregate",aggregation:ui(K[Z-5]),distinct:!!K[Z-3],separator:typeof K[Z-1]=="string"?K[Z-1]:" "});break;case 192:this.$=bs(K[Z]);break;case 193:this.$=u$(K[Z-1],ui(K[Z].substr(1)));break;case 194:this.$=bs(K[Z-2],K[Z]);break;case 195:case 204:this.$=bs(K[Z],jx);break;case 196:case 205:this.$=bs(K[Z],Mx);break;case 197:case 206:this.$=bs(ui(K[Z]),Fx);break;case 200:this.$=bs(K[Z].toLowerCase(),o$);break;case 201:this.$=bs(K[Z].substr(1),jx);break;case 202:this.$=bs(K[Z].substr(1),Mx);break;case 203:this.$=bs(K[Z].substr(1).toLowerCase(),Fx);break;case 207:case 208:this.$=Ux(K[Z],1);break;case 209:case 210:this.$=Ux(K[Z],3);break;case 211:this.$=Rt.factory.namedNode(Ff(K[Z]));break;case 213:var my=K[Z].indexOf(":"),Jr=K[Z].substr(0,my),_s=Rt.prefixes[Jr];if(!_s)throw new Error("Unknown prefix: "+Jr);var pc=Ff(_s+K[Z].substr(my+1));this.$=Rt.factory.namedNode(pc);break;case 214:if(K[Z]=K[Z].substr(0,K[Z].length-1),!(K[Z]in Rt.prefixes))throw new Error("Unknown prefix: "+K[Z]);var pc=Ff(Rt.prefixes[K[Z]]);this.$=Rt.factory.namedNode(pc);break;case 215:this.$=Lf(K[Z].replace(/^(_:)/,""));break;case 216:this.$=Lf();break;case 217:case 218:case 232:this.$=Bf(F3(K[Z-3],K[Z-2],K[Z-1]));break;case 230:case 231:this.$=Bf(K[Z-1]);break;case 248:case 250:case 252:case 254:case 256:case 260:case 264:case 268:case 270:case 292:case 294:case 296:case 298:case 300:case 302:case 304:case 306:case 329:case 342:case 356:case 368:case 370:case 372:case 374:case 392:case 402:case 425:case 427:case 429:case 431:case 441:case 445:case 447:case 449:K[Z-1].push(K[Z]);break;case 259:case 269:case 291:case 293:case 295:case 301:case 305:case 371:case 424:case 426:this.$=[K[Z]];break;case 308:K[Z-3].push(K[Z-2]);break;case 350:case 362:case 376:case 380:case 382:case 386:case 396:case 406:case 410:case 412:case 421:K[Z-2].push(K[Z-1]);break}},table:[t(e,r,{3:1,4:2,10:3}),{1:[3]},t(n,[2,307],{5:4,7:5,321:6,214:7,8:8,96:9,215:10,17:11,21:12,97:16,38:17,6:[2,238],13:a,16:a,45:a,197:a,224:a,229:a,308:a,24:[1,13],32:[1,14],36:[1,15],41:s}),t([6,13,16,24,32,36,41,45,100,110,113,115,116,123,126,131,197,224,229,308,329,330,331,332,333],[2,3],{322:19,11:20,14:21,12:[1,22],15:[1,23]}),{6:[1,24]},{6:[2,240]},{6:[2,241]},{6:[2,242]},{6:[2,243],9:25,84:26,85:o},{6:[2,239]},t(u,[2,411],{216:28,217:29}),t(c,[2,249],{18:30}),t(c,[2,251],{22:31}),t(l,[2,255],{25:32,27:33,29:[1,34]}),{13:d,16:f,33:35,39:[1,37],44:39,55:40,87:h,139:38,307:43,308:p,323:36},t(c,[2,267],{37:46}),t(b,[2,326],{98:47,103:49,106:50,117:55,130:61,100:[1,48],110:[1,51],113:[1,52],115:[1,53],116:[1,54],131:[1,62],329:[1,56],330:[1,57],331:[1,58],332:[1,59],333:[1,60]}),{39:[1,63],40:64,43:65,44:66,45:_,87:h},t(E,[2,273],{42:68,324:69,325:[1,70],326:[1,71]}),t(e,[2,248]),t(e,[2,245]),t(e,[2,246]),{13:[1,72]},{16:[1,73]},{1:[2,1]},{6:[2,2]},{6:[2,244]},{45:[1,77],85:[1,78],86:74,87:[1,75],89:[1,76]},t([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],[2,120],{337:[1,79]}),t(w,[2,418],{218:80,222:81,229:[1,82]}),{19:83,28:O,29:A,52:84,53:T,56:85},{19:88,28:O,29:A,52:89,53:T,56:85},t(c,[2,253],{26:90}),{28:[1,91],52:92,53:T},t(I,[2,385],{181:93,182:94,183:95,31:[2,383]}),t(D,[2,263],{34:96}),t(D,[2,261],{44:39,55:40,307:43,139:97,13:d,16:f,87:h,308:p}),t(D,[2,262]),t(U,[2,259]),t(H,[2,143]),t(H,[2,144]),t([6,13,16,28,29,31,39,45,47,48,53,63,70,73,76,78,81,82,83,85,87,89,112,159,160,161,163,164,193,197,224,229,231,232,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,314,317,318,335,338,341,342,343,344,345,346,347,348,349,350,351],[2,145]),t(N,[2,211]),t(N,[2,212]),t(N,[2,213]),t(N,[2,214]),{19:98,28:O,29:A,52:99,53:T,56:85},{6:[2,309],99:100,193:[1,101]},t(x,[2,311],{101:102,328:[1,103]}),t(F,[2,317],{104:104,328:[1,105]}),t(X,[2,322],{107:106,328:[1,107]}),{111:108,112:[2,324],328:[1,109]},{29:ne,114:110},{29:ne,114:112},{29:ne,114:113},{118:114,123:[1,115],125:116,126:$},t(j,[2,315]),t(j,[2,316]),t(Q,[2,319]),t(Q,[2,320]),t(Q,[2,321]),t(b,[2,327]),{13:d,16:f,55:118,307:43,308:p},t(c,[2,12]),t(c,[2,13],{44:66,43:119,45:_,87:h}),t(se,[2,269]),t(se,[2,15]),{13:d,16:f,44:136,45:ie,46:120,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(E,[2,14]),t(E,[2,274]),t(E,[2,271]),t(E,[2,272]),t(e,[2,4]),{13:[1,177]},t(Ue,[2,39]),{29:[1,178]},{29:[1,179]},{87:[1,181],91:180},{45:[1,187],87:[1,185],89:[1,186],93:182,165:183,166:184},t(u,[2,410]),t([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],[2,121],{338:[1,188]}),{13:d,16:f,45:[1,193],55:194,197:Ge,219:189,220:190,223:191,224:[1,192],307:43,308:p},t(w,[2,419]),t(We,lt,{20:196,59:197,69:198,70:Wr}),t(c,[2,250]),{29:br,57:200},t(x,[2,279],{54:202,327:[1,203]}),{29:[2,282]},t(Br,Qt,{23:204,58:205,62:206,63:_r}),t(c,[2,252]),{19:208,28:O,29:A,52:209,53:T,56:85},{29:[1,210]},t(l,[2,256]),{31:[1,211]},{31:[2,384]},{13:d,16:f,44:215,45:Pr,55:220,82:be,87:h,89:kr,145:212,172:221,185:213,187:214,231:Rn,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(Se,[2,265],{56:85,35:227,52:228,19:229,28:O,29:A,53:T}),t(U,[2,260]),t(Br,Qt,{58:205,62:206,23:230,63:_r}),t(c,[2,268]),{6:[2,45]},t(e,r,{10:3,4:231}),{13:d,16:f,55:232,307:43,308:p},t(x,[2,312]),{105:233,112:Fe,122:234,132:[1,237],134:235,327:[1,238],334:[1,239]},t(F,[2,318]),t(x,Ae,{108:240,133:242,112:ze,132:De}),t(X,[2,323]),{112:[1,244]},{112:[2,325]},t(Be,[2,50]),t(I,Je,{135:245,136:246,143:247,144:248,31:Pt,112:Pt}),t(Be,[2,51]),t(Be,[2,52]),t(at,[2,328],{119:249}),{29:ne,114:250},t(at,[2,56]),{29:ne,114:251},t(b,[2,59]),t(se,[2,270]),{47:[1,252]},t(qe,[2,150]),t(hs,[2,428],{240:253}),t(ke,[2,430],{244:254}),t(ke,[2,155],{248:255,249:256,250:[2,438],290:[1,257],341:[1,258],342:[1,259],343:[1,260],344:[1,261],345:[1,262],346:[1,263]}),t(yn,[2,440],{252:264}),t(gr,[2,448],{260:265}),{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,255:154,257:155,264:266,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,255:154,257:155,264:267,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,255:154,257:155,264:268,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(gr,[2,167]),t(gr,[2,168]),t(gr,[2,169]),t(gr,[2,170],{176:269,45:mr,89:Pi}),t(gr,[2,171]),t(gr,[2,172]),t(gr,[2,173]),t(gr,[2,174]),{13:d,16:f,44:136,45:ie,46:272,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(vt,[2,176]),{89:[1,273]},{45:[1,274]},{45:[1,275]},{45:[1,276]},{45:[1,277]},{45:[1,278]},{45:ya,89:ki,179:279},{45:[1,282]},{45:[1,284],89:[1,283]},{279:[1,285]},t(ir,[2,192],{292:[1,286],293:[1,287]}),t(ir,[2,195]),t(ir,[2,196]),t(ir,[2,197]),t(ir,[2,198]),t(ir,[2,199]),t(ir,[2,200]),{13:d,16:f,44:39,55:40,82:be,87:h,139:289,172:291,255:154,257:155,266:290,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,320:288},{45:[1,292]},{45:[1,293]},{45:[1,294]},t(to,[2,452]),t(to,[2,453]),t(to,[2,454]),t(to,[2,455]),t(to,[2,456]),{279:[2,458]},t(ru,[2,207]),t(ru,[2,208]),t(ru,[2,209]),t(ru,[2,210]),t(ir,[2,201]),t(ir,[2,202]),t(ir,[2,203]),t(ir,[2,204]),t(ir,[2,205]),t(ir,[2,206]),t(e,[2,5]),t(Xr,[2,297],{88:295}),t(Di,[2,299],{90:296}),{48:[1,297],87:[1,298]},t(an,[2,301]),t(Ue,[2,43]),t(Ue,[2,82]),t(Ue,[2,83]),{29:[1,299]},{29:[1,300]},{87:[1,302],169:301},t(u,[2,412]),t(Qi,[2,123]),t(Qi,[2,416],{221:303,339:304,39:[1,306],263:[1,307],340:[1,305]}),t(sn,[2,124]),{13:d,16:f,45:[1,311],55:194,89:[1,310],197:Ge,223:312,225:308,226:309,229:Na,307:43,308:p},t(u,a,{215:10,214:314}),t(sn,[2,236]),t(sn,[2,237]),t(Zr,[2,6]),t(ps,[2,287],{60:315,72:316,73:[1,317]}),t(We,[2,286]),{13:d,16:f,45:ie,55:323,67:321,68:322,71:318,77:320,79:319,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,307:43,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me},t([6,31,63,70,73,81,83,85],[2,20]),t(I,Ca,{38:17,49:324,147:325,17:326,21:327,148:328,154:329,155:330,29:ai,31:ai,85:ai,112:ai,159:ai,160:ai,161:ai,163:ai,164:ai,41:s}),{13:d,16:f,55:331,307:43,308:p},t(x,[2,280]),t(Zr,[2,7]),t(We,lt,{59:197,69:198,20:332,70:Wr}),t(Br,[2,284]),{64:[1,333]},t(Br,Qt,{58:205,62:206,23:334,63:_r}),t(c,[2,254]),t(I,Je,{144:248,30:335,143:336,31:[2,257]}),t(c,[2,100]),{31:[2,387],184:337,335:[1,338]},{13:d,16:f,44:39,55:40,87:h,139:342,186:339,190:340,195:341,197:qn,307:43,308:p},t(nu,[2,389],{44:39,55:40,307:43,190:340,195:341,139:342,188:344,189:345,186:346,13:d,16:f,87:h,197:qn,308:p}),t(ja,[2,227]),t(ja,[2,228]),t(ja,[2,229]),{13:d,16:f,44:215,45:Pr,55:220,82:be,87:h,89:kr,172:221,185:351,187:350,200:348,230:347,231:Rn,234:349,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},{13:d,16:f,44:39,55:40,87:h,139:342,186:352,190:340,195:341,197:qn,307:43,308:p},t(ja,[2,146]),t(ja,[2,147]),t(ja,[2,148]),t(ja,[2,149]),{13:d,16:f,44:354,55:355,82:be,87:h,172:357,237:356,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:358,312:re,313:353},t(Il,[2,215]),t(Il,[2,216]),t(Br,Qt,{58:205,62:206,23:359,63:_r}),t(D,[2,264]),t(Se,[2,266]),t(Zr,[2,11]),t(n,[2,308],{6:[2,310]}),t(Be,[2,313],{102:360,120:361,121:[1,362]}),t(Be,[2,47]),t(Be,[2,63]),t(Be,[2,64]),{13:d,16:f,55:363,307:43,308:p},t(Be,[2,336]),t(Be,[2,337]),t(Be,[2,338]),{109:[1,364]},t(te,[2,60]),{13:d,16:f,55:365,307:43,308:p},t(x,[2,335]),{13:d,16:f,55:366,307:43,308:p},{31:[1,367]},t(de,[2,341],{137:368}),t(de,[2,340]),{13:d,16:f,44:215,45:Pr,55:220,82:be,87:h,89:kr,145:369,172:221,185:213,187:214,231:Rn,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},{28:[1,370],127:371,128:[1,372]},t(at,[2,330],{124:373,125:374,126:$}),t(at,[2,57]),{44:375,87:h},t(qe,[2,151],{241:376,242:[1,377]}),t(hs,[2,153],{245:378,246:[1,379]}),{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,247:380,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{250:[1,381]},t(_e,[2,432]),t(_e,[2,433]),t(_e,[2,434]),t(_e,[2,435]),t(_e,[2,436]),t(_e,[2,437]),{250:[2,439]},t([47,48,193,242,246,250,272,290,341,342,343,344,345,346],[2,158],{253:382,254:383,255:384,257:385,263:[1,386],265:[1,387],297:G,298:Y,299:ee,300:ae,301:ve,302:me}),t(yn,[2,162],{261:388,262:389,39:$e,338:He}),t(gr,[2,164]),t(gr,[2,165]),t(gr,[2,166]),t(vt,[2,95]),t(vt,[2,96]),t(_e,[2,377],{177:392,325:[1,393]}),{48:[1,394]},t(vt,[2,177]),{13:d,16:f,44:136,45:ie,46:395,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:396,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:397,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:398,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:399,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(vt,[2,183]),t(vt,[2,98]),t(_e,[2,381],{180:400}),{87:[1,401]},t(vt,[2,185]),{13:d,16:f,44:136,45:ie,46:402,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{29:br,57:403},t(ir,[2,193]),{13:d,16:f,55:404,307:43,308:p},{13:d,16:f,44:39,55:40,87:h,139:342,195:405,197:qn,307:43,308:p},t(Xe,[2,233]),t(Xe,[2,234]),t(Xe,[2,235]),t(gt,[2,459],{281:406,325:[1,407]}),t(_e,[2,463],{284:408,325:[1,409]}),t(_e,[2,465],{286:410,325:[1,411]}),{13:d,16:f,31:[1,412],55:414,82:be,171:413,172:415,173:416,174:Bt,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:Yt},{31:[1,419],89:[1,420]},{29:[1,421]},t(an,[2,302]),t(Xr,[2,367],{167:422}),t(Di,[2,369],{168:423}),{48:[1,424],87:[1,425]},t(an,[2,371]),t(Qi,[2,122]),t(Qi,[2,417]),t(Qi,[2,413]),t(Qi,[2,414]),t(Qi,[2,415]),t(sn,[2,125]),t(sn,[2,127]),t(sn,[2,128]),t(Dr,[2,420],{227:426}),t(sn,[2,130]),{13:d,16:f,55:194,197:Ge,223:427,307:43,308:p},{48:[1,428]},t(Xt,[2,289],{61:429,80:430,81:[1,431],83:[1,432]}),t(ps,[2,288]),{64:[1,433]},t(We,[2,29],{307:43,267:139,275:146,278:149,77:320,67:321,68:322,55:323,79:434,13:d,16:f,45:ie,268:ye,269:ce,270:Re,271:oe,273:J,274:le,276:pe,277:L,279:P,280:g,283:y,285:v,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me}),t(vr,[2,293]),t(si,[2,92]),t(si,[2,93]),t(si,[2,94]),{45:mr,89:Pi,176:269},{31:[1,435]},{31:[1,436]},{19:437,28:O,29:A,56:85},{19:438,28:O,29:A,56:85},t(Vn,[2,355],{149:439}),t(Vn,[2,354]),{13:d,16:f,44:215,45:xn,55:220,82:be,87:h,89:kr,156:440,172:221,185:441,203:442,231:oi,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(D,[2,19]),t(Xt,[2,21]),{13:d,16:f,44:450,45:Ma,55:323,65:445,66:446,67:447,68:448,87:h,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,307:43,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(Zr,[2,8]),{31:[1,451]},{31:[2,258]},{31:[2,101]},t(I,[2,386],{31:[2,388]}),t(nu,[2,102]),t(bn,[2,391],{191:452}),t(I,[2,395],{196:453,198:454}),t(I,[2,108]),t(I,[2,109]),t(nu,[2,103]),t(nu,[2,104]),t(nu,[2,390]),{13:d,16:f,44:215,45:Pr,48:[1,455],55:220,82:be,87:h,89:kr,172:221,185:351,187:350,200:456,231:Rn,234:349,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(ro,[2,424]),t(uc,[2,136]),t(uc,[2,137]),t(cc,[2,140]),{232:[1,457]},{13:d,16:f,44:39,55:40,87:h,139:342,195:458,197:qn,307:43,308:p},t(Xe,[2,219]),t(Xe,[2,220]),t(Xe,[2,221]),t(Xe,[2,222]),t(Xe,[2,223]),t(Zr,[2,10]),t(Be,[2,46]),t(Be,[2,314]),{112:Fe,122:459},t(Be,[2,62]),t(x,Ae,{133:242,108:460,112:ze,132:De}),t(te,[2,61]),t(Be,[2,49]),t([6,28,126,128,193],[2,65]),{31:[2,66],112:[1,462],138:461},t(de,[2,351],{146:463,335:[1,464]}),{29:br,57:465},t(at,[2,329]),t(x,[2,332],{129:466,327:[1,467]}),t(at,[2,55]),t(at,[2,331]),{48:[1,468]},t(hs,[2,429]),{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,239:469,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(ke,[2,431]),{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,243:470,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(ke,[2,156]),{45:ya,89:ki,179:471},t(yn,[2,441]),{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,251:472,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(gr,[2,444],{256:473}),t(gr,[2,446],{258:474}),t(_e,[2,442]),t(_e,[2,443]),t(gr,[2,449]),{13:d,16:f,44:136,45:ie,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,255:154,257:155,259:475,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(_e,[2,450]),t(_e,[2,451]),t(_e,[2,379],{178:476}),t(_e,[2,378]),t([6,13,16,29,31,39,45,47,48,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],[2,175]),{48:[1,477]},{48:[1,478]},{272:[1,479]},{272:[1,480]},{272:[1,481]},{13:d,16:f,44:136,45:ie,46:482,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{48:[1,483]},{48:[1,484]},t(vt,[2,187]),t(ir,[2,194]),{13:d,16:f,44:39,55:40,82:be,87:h,139:289,172:291,255:154,257:155,266:290,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,320:485},{13:d,16:f,39:[1,487],44:136,45:ie,46:488,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,282:486,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(gt,[2,460]),{13:d,16:f,44:136,45:ie,46:489,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(_e,[2,464]),{13:d,16:f,44:136,45:ie,46:490,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(_e,[2,466]),t(Ue,[2,40]),t(Xr,[2,298]),t(Gt,[2,87]),t(Gt,[2,88]),t(Gt,[2,89]),t(Gt,[2,90]),{13:d,16:f,55:492,82:be,172:493,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,311:494,312:re,315:491},t(Ue,[2,41]),t(Di,[2,300]),t(_n,[2,303],{92:495}),{13:d,16:f,31:[1,496],55:414,82:be,171:497,172:415,173:416,174:Bt,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:Yt},{31:[1,498],89:[1,499]},{29:[1,500]},t(an,[2,372]),{13:d,16:f,48:[2,422],55:194,197:Ge,223:312,226:502,228:501,229:Na,307:43,308:p},t(sn,[2,131]),t(sn,[2,126]),t(Xt,[2,22]),t(Xt,[2,290]),{82:[1,503]},{82:[1,504]},{13:d,16:f,44:510,45:ie,55:323,67:321,68:322,74:505,75:506,76:no,77:320,78:iu,79:509,87:h,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,307:43,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(vr,[2,294]),t(ly,[2,69]),t(ly,[2,70]),t(We,lt,{59:197,69:198,20:511,70:Wr}),t(Br,Qt,{58:205,62:206,23:512,63:_r}),{29:[2,375],31:[2,71],84:522,85:o,112:[1,518],150:513,151:514,158:515,159:[1,516],160:[1,517],161:[1,519],163:[1,520],164:[1,521],175:523},t(Vn,[2,363],{157:524,335:[1,525]}),t(u,a,{215:10,202:526,205:527,208:528,214:529,44:530,87:h}),t(dy,[2,399],{215:10,205:527,208:528,214:529,44:530,204:531,202:532,13:a,16:a,45:a,197:a,224:a,229:a,308:a,87:h}),{13:d,16:f,44:215,45:xn,55:220,82:be,87:h,89:kr,172:221,185:351,203:536,212:534,231:oi,233:533,234:535,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(u,a,{215:10,205:527,208:528,214:529,44:530,202:537,87:h}),t(Br,[2,23],{307:43,267:139,275:146,278:149,55:323,67:447,68:448,44:450,66:538,13:d,16:f,45:Ma,87:h,268:ye,269:ce,270:Re,271:oe,273:J,274:le,276:pe,277:L,279:P,280:g,283:y,285:v,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me}),t(lc,[2,291]),t(lc,[2,24]),t(lc,[2,25]),{13:d,16:f,44:136,45:ie,46:539,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(lc,[2,28]),t(Br,Qt,{58:205,62:206,23:540,63:_r}),t([31,112,232,318,335],[2,105],{192:541,193:[1,542]}),t(bn,[2,107]),{13:d,16:f,44:215,45:Pr,55:220,82:be,87:h,89:kr,172:221,185:351,187:350,199:543,200:544,231:Rn,234:349,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(Ox,[2,132]),t(ro,[2,425]),t(Ox,[2,133]),{13:d,16:f,44:354,55:355,82:be,87:h,172:357,237:356,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:358,312:re,313:545},t(Be,[2,54]),t(Be,[2,48]),t(de,[2,342]),{13:d,16:f,44:39,55:40,87:h,139:546,307:43,308:p},t(de,[2,68]),t(I,[2,350],{31:Ax,112:Ax}),t(Be,[2,53]),{13:d,16:f,55:547,307:43,308:p},t(x,[2,333]),t(se,[2,16]),t(hs,[2,152]),t(ke,[2,154]),t(ke,[2,157]),t(yn,[2,159]),t(yn,[2,160],{262:389,261:548,39:$e,338:He}),t(yn,[2,161],{262:389,261:549,39:$e,338:He}),t(gr,[2,163]),{13:d,16:f,44:136,45:ie,46:550,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(vt,[2,178]),t(vt,[2,179]),{13:d,16:f,44:136,45:ie,46:551,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:552,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:553,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{48:[1,554],272:[1,555]},t(vt,[2,184]),t(vt,[2,186]),{314:[1,556]},{48:[1,557]},{48:[2,461]},{48:[2,462]},{48:[1,558]},{48:[2,467],193:[1,561],287:559,288:560},{13:d,16:f,55:194,197:Ge,223:562,307:43,308:p},t(D3,[2,224]),t(D3,[2,225]),t(D3,[2,226]),{31:[1,563],45:Rx,94:564},t(Ue,[2,84]),t(Xr,[2,368]),t(Ue,[2,85]),t(Di,[2,370]),t(_n,[2,373],{170:566}),{48:[1,567]},{48:[2,423],337:[1,568]},t(Xt,[2,35],{83:[1,569]}),t(Xt,[2,36],{81:[1,570]}),t(ps,[2,30],{307:43,267:139,275:146,278:149,77:320,67:321,68:322,55:323,79:509,44:510,75:571,13:d,16:f,45:ie,76:no,78:iu,87:h,268:ye,269:ce,270:Re,271:oe,273:J,274:le,276:pe,277:L,279:P,280:g,283:y,285:v,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me}),t(Pl,[2,295]),{45:ie,77:572},{45:ie,77:573},t(Pl,[2,33]),t(Pl,[2,34]),{31:[2,275],50:574,84:575,85:o},{31:[2,277],51:576,84:577,85:o},t(Vn,[2,356]),t(xx,[2,357],{152:578,335:[1,579]}),t(io,[2,74]),{29:br,57:580},{29:br,57:581},{13:d,16:f,44:39,55:40,87:h,139:582,307:43,308:p},t(Ix,[2,365],{162:583,328:[1,584]}),{13:d,16:f,45:ie,55:323,67:321,68:322,77:320,79:585,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,307:43,308:p,346:R,347:z,348:ue,349:ge,350:we,351:Me},{45:[1,586]},t(io,[2,81]),{29:br,57:587},t(Vn,[2,73]),t(I,[2,362],{29:ao,31:ao,85:ao,112:ao,159:ao,160:ao,161:ao,163:ao,164:ao}),t(dy,[2,112]),t(Dl,[2,401],{206:588}),t(I,[2,405],{209:589,210:590}),t(I,[2,403]),t(I,[2,404]),t(dy,[2,113]),t(dy,[2,400]),{13:d,16:f,44:215,45:xn,48:[1,591],55:220,82:be,87:h,89:kr,172:221,185:351,203:536,212:592,231:oi,234:535,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(ro,[2,426]),t(cc,[2,138]),t(cc,[2,139]),{232:[1,593]},t(lc,[2,292]),{47:[1,595],48:[1,594]},t(Zr,[2,9]),t(bn,[2,392]),t(bn,[2,393],{44:39,55:40,307:43,195:341,139:342,194:596,190:597,13:d,16:f,87:h,197:qn,308:p}),t(bn,[2,110],{272:[1,598]}),t(fy,[2,397],{201:599,316:600,317:[1,601]}),{314:[1,602]},{29:[1,603]},t(at,[2,58]),t(gr,[2,445]),t(gr,[2,447]),{48:[1,604],272:[1,605]},{48:[1,606]},{272:[1,607]},{272:[1,608]},t(vt,[2,99]),t(_e,[2,382]),t([13,16,39,47,48,87,193,197,242,246,250,263,265,272,290,297,298,299,300,301,302,308,314,338,341,342,343,344,345,346],[2,232]),t(vt,[2,188]),t(vt,[2,189]),{48:[1,609]},{48:[2,468]},{289:[1,610]},{13:d,16:f,55:492,82:be,172:493,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,311:494,312:re,315:611},t(Ue,[2,42]),t(_n,[2,304]),{13:d,16:f,55:414,82:be,95:612,171:613,172:415,173:416,174:Bt,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:Yt},{31:[1,614],45:Rx,94:615},t(sn,[2,129]),t(Dr,[2,421]),{82:[1,616]},{82:[1,617]},t(Pl,[2,296]),t(Pl,[2,31]),t(Pl,[2,32]),{31:[2,17]},{31:[2,276]},{31:[2,18]},{31:[2,278]},t(I,Ca,{155:330,153:618,154:619,29:so,31:so,85:so,112:so,159:so,160:so,161:so,163:so,164:so}),t(xx,[2,358]),t(io,[2,75]),t(io,[2,76]),{29:br,57:620},{13:d,16:f,44:39,55:40,87:h,139:621,307:43,308:p},t(Ix,[2,366]),t(io,[2,79]),{13:d,16:f,44:136,45:ie,46:622,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(io,[2,91],{336:[1,623]}),t([29,31,85,112,159,160,161,163,164,232,318,335],[2,114],{207:624,193:[1,625]}),t(Dl,[2,117]),{13:d,16:f,44:215,45:xn,55:220,82:be,87:h,89:kr,172:221,185:351,203:536,211:626,212:627,231:oi,234:535,236:216,237:222,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,309:Tt,310:B,311:217,312:re},t(ja,[2,134]),t(ro,[2,427]),t(ja,[2,135]),t(lc,[2,26]),{44:628,87:h},t(bn,[2,106]),t(bn,[2,394]),t(I,[2,396]),t(fy,[2,111]),t(fy,[2,398]),{13:d,16:f,44:39,55:40,87:h,139:342,186:629,190:340,195:341,197:qn,307:43,308:p},t(Il,[2,217]),t(I,Je,{144:248,140:630,143:631,31:[2,343]}),t(vt,[2,97]),t(_e,[2,380]),t(vt,[2,180]),{13:d,16:f,44:136,45:ie,46:632,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},{13:d,16:f,44:136,45:ie,46:633,55:133,67:132,68:134,77:131,82:be,87:h,172:135,224:he,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:Te,264:130,265:Ne,266:137,267:139,268:ye,269:ce,270:Re,271:oe,273:J,274:le,275:146,276:pe,277:L,278:149,279:P,280:g,283:y,285:v,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:S,346:R,347:z,348:ue,349:ge,350:we,351:Me},t(vt,[2,190]),{290:[1,634]},{314:[1,635]},{13:d,16:f,48:[1,636],55:414,82:be,171:637,172:415,173:416,174:Bt,255:154,257:155,291:150,294:C,295:V,296:q,297:G,298:Y,299:ee,300:ae,301:ve,302:me,303:Ee,304:k,305:W,306:M,307:43,308:p,312:Yt},t(Px,[2,305]),t(Ue,[2,86]),t(_n,[2,374]),t(Xt,[2,37]),t(Xt,[2,38]),t(Vn,[2,72]),t(Vn,[2,360]),t(io,[2,77]),{29:br,57:638},{47:[1,639]},{29:[2,376]},t(Dl,[2,402]),t(Dl,[2,115],{215:10,208:528,214:529,44:530,205:640,13:a,16:a,45:a,197:a,224:a,229:a,308:a,87:h}),t(Dl,[2,118],{272:[1,641]}),t(hy,[2,407],{213:642,319:643,317:[1,644]}),{48:[1,645]},{318:[1,646]},{31:[1,647]},{31:[2,344]},{48:[1,648]},{48:[1,649]},{291:650,303:Ee,304:k,305:W,306:M},t(Gt,[2,218]),t(_n,[2,44]),t(Px,[2,306]),t(io,[2,78]),{44:651,87:h},t(Dl,[2,116]),t(I,[2,406]),t(hy,[2,119]),t(hy,[2,408]),t(u,a,{215:10,205:527,208:528,214:529,44:530,202:652,87:h}),t(lc,[2,27]),t(fy,[2,230]),t(Dx,[2,345],{141:653,335:[1,654]}),t(vt,[2,181]),t(vt,[2,182]),{48:[2,191]},{48:[1,655]},{318:[1,656]},t(I,Je,{144:248,142:657,143:658,31:Nx,112:Nx}),t(Dx,[2,346]),t(io,[2,80]),t(hy,[2,231]),t(de,[2,67]),t(de,[2,348])],defaultActions:{5:[2,240],6:[2,241],7:[2,242],9:[2,239],24:[2,1],25:[2,2],26:[2,244],87:[2,282],94:[2,384],100:[2,45],109:[2,325],166:[2,458],263:[2,439],336:[2,258],337:[2,101],487:[2,461],488:[2,462],560:[2,468],574:[2,17],575:[2,276],576:[2,18],577:[2,278],623:[2,376],631:[2,344],650:[2,191]},parseError:function(Oe,Pe){if(Pe.recoverable)this.trace(Oe);else{var Le=new Error(Oe);throw Le.hash=Pe,Le}},parse:function(Oe){var Pe=this,Le=[0],nt=[null],ot=[],K=this.table,Gi="",Z=0,au=0,_y=2,gy=1,my=ot.slice.call(arguments,1),Jr=Object.create(this.lexer),_s={yy:{}};for(var pc in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pc)&&(_s.yy[pc]=this.yy[pc]);Jr.setInput(Oe,_s.yy),_s.yy.lexer=Jr,_s.yy.parser=this,typeof Jr.yylloc>"u"&&(Jr.yylloc={});var Ll=Jr.yylloc;ot.push(Ll);var k3=Jr.options&&Jr.options.ranges;typeof _s.yy.parseError=="function"?this.parseError=_s.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var vy=function(){var Bl;return Bl=Jr.lex()||gy,typeof Bl!="number"&&(Bl=Pe.symbols_[Bl]||Bl),Bl},Et,Kt,mt,Pn,Dn={},wy,uo,kx,Sy;;){if(Kt=Le[Le.length-1],this.defaultActions[Kt]?mt=this.defaultActions[Kt]:((Et===null||typeof Et>"u")&&(Et=vy()),mt=K[Kt]&&K[Kt][Et]),typeof mt>"u"||!mt.length||!mt[0]){var Q3="";Sy=[];for(wy in K[Kt])this.terminals_[wy]&&wy>_y&&Sy.push("'"+this.terminals_[wy]+"'");Jr.showPosition?Q3="Parse error on line "+(Z+1)+`: `+Jr.showPosition()+` -Expecting `+wy.join(", ")+", got '"+(this.terminals_[Et]||Et)+"'":Q3="Parse error on line "+(Z+1)+": Unexpected "+(Et==_y?"end of input":"'"+(this.terminals_[Et]||Et)+"'"),this.parseError(Q3,{text:Jr.match,token:this.terminals_[Et]||Et,line:Jr.yylineno,loc:Ll,expected:wy})}if(mt[0]instanceof Array&&mt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Kt+", token: "+Et);switch(mt[0]){case 1:Le.push(Et),nt.push(Jr.yytext),ot.push(Jr.yylloc),Le.push(mt[1]),Et=null,au=Jr.yyleng,Gi=Jr.yytext,Z=Jr.yylineno,Ll=Jr.yylloc;break;case 2:if(uo=this.productions_[mt[1]][1],Dn.$=nt[nt.length-uo],Dn._$={first_line:ot[ot.length-(uo||1)].first_line,last_line:ot[ot.length-1].last_line,first_column:ot[ot.length-(uo||1)].first_column,last_column:ot[ot.length-1].last_column},k3&&(Dn._$.range=[ot[ot.length-(uo||1)].range[0],ot[ot.length-1].range[1]]),Pn=this.performAction.apply(Dn,[Gi,au,Z,_s.yy,mt[1],nt,ot].concat(gy)),typeof Pn<"u")return Pn;uo&&(Le=Le.slice(0,-1*uo*2),nt=nt.slice(0,-1*uo),ot=ot.slice(0,-1*uo)),Le.push(this.productions_[mt[1]][0]),nt.push(Dn.$),ot.push(Dn._$),kx=K[Le[Le.length-2]][Le[Le.length-1]],Le.push(kx);break;case 3:return!0}}return!0}},hy=OA.Wildcard,py="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i$=py+"type",a$=py+"first",s$=py+"rest",Cx=py+"nil",yy="http://www.w3.org/2001/XMLSchema#",jx=yy+"integer",Mx=yy+"decimal",Fx=yy+"double",o$=yy+"boolean",dc="",Lx="",Bx="";function ui(xe){return xe.toLowerCase()}function fc(xe,Oe){return xe.push(Oe),xe}function Nl(xe,Oe){return xe.push.apply(xe,Oe),xe}function Kr(xe){xe||(xe={});for(var Oe=1,Pe=arguments.length,Le;Oe1)throw new Error("Parse Error: multiple actions possible at state: "+Kt+", token: "+Et);switch(mt[0]){case 1:Le.push(Et),nt.push(Jr.yytext),ot.push(Jr.yylloc),Le.push(mt[1]),Et=null,au=Jr.yyleng,Gi=Jr.yytext,Z=Jr.yylineno,Ll=Jr.yylloc;break;case 2:if(uo=this.productions_[mt[1]][1],Dn.$=nt[nt.length-uo],Dn._$={first_line:ot[ot.length-(uo||1)].first_line,last_line:ot[ot.length-1].last_line,first_column:ot[ot.length-(uo||1)].first_column,last_column:ot[ot.length-1].last_column},k3&&(Dn._$.range=[ot[ot.length-(uo||1)].range[0],ot[ot.length-1].range[1]]),Pn=this.performAction.apply(Dn,[Gi,au,Z,_s.yy,mt[1],nt,ot].concat(my)),typeof Pn<"u")return Pn;uo&&(Le=Le.slice(0,-1*uo*2),nt=nt.slice(0,-1*uo),ot=ot.slice(0,-1*uo)),Le.push(this.productions_[mt[1]][0]),nt.push(Dn.$),ot.push(Dn._$),kx=K[Le[Le.length-2]][Le[Le.length-1]],Le.push(kx);break;case 3:return!0}}return!0}},py=OA.Wildcard,yy="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i$=yy+"type",a$=yy+"first",s$=yy+"rest",Cx=yy+"nil",by="http://www.w3.org/2001/XMLSchema#",jx=by+"integer",Mx=by+"decimal",Fx=by+"double",o$=by+"boolean",dc="",Lx="",Bx="";function ui(xe){return xe.toLowerCase()}function fc(xe,Oe){return xe.push(Oe),xe}function Nl(xe,Oe){return xe.push.apply(xe,Oe),xe}function Kr(xe){xe||(xe={});for(var Oe=1,Pe=arguments.length,Le;Oe>10),56320+(K&1023))}else{var Gi=l$[ot];if(!Gi)throw new Error;return Gi}})}catch{return""}if(d$.exec(xe))throw new Error("Invalid unicode codepoint of surrogate pair without corresponding codepoint in "+xe);return xe}function f$(xe){var Oe=Lf(),Pe=Oe,Le=[],nt,ot=[];xe.forEach(function(au){Le.push(au.entity),Nl(ot,au.triples)});for(var K=0,Gi=0,Z=Le.length,nt=Array(Z*2);K0&&Le instanceof Array?U3(Le,Oe-1,Pe):Pe.push(Le);return Pe}function q3(xe){return xe.termType==="Variable"}function qx(xe){if(xe.triples){const Oe=[];for(const Pe of xe.triples)q3(Pe.subject)&&Oe.push(Pe.subject.value),q3(Pe.predicate)&&Oe.push(Pe.predicate.value),q3(Pe.object)&&Oe.push(Pe.object.value);return Oe}else if(xe.patterns){const Oe=[];for(const Pe of xe.patterns)Oe.push(...qx(Pe));return Oe}return[]}function y$(xe){const Oe=xe.slice().sort(),Pe=[];for(let Le=0;Le{const Le=oo(Pe.subject,Pe.predicate,Pe.object);Oe.push(Le),Pe.annotations&&Vx(F3(Pe.subject,Pe.predicate,Pe.object),Pe.annotations,Oe)}),Oe}return xe}function Hx(xe){for(const Oe of xe){if(Oe.type==="graph"&&Oe.name.termType==="Variable")throw new Error("Detected illegal variable in GRAPH");if(Oe.type==="bgp"||Oe.type==="graph"){for(const Pe of Oe.triples)if(Pe.subject.termType==="Variable"||Pe.predicate.termType==="Variable"||Pe.object.termType==="Variable")throw new Error("Detected illegal variable in BGP")}}return xe}function H3(xe){for(const Oe of xe)if(Oe.type==="bgp"){for(const Pe of Oe.triples)if(Pe.subject.termType==="BlankNode"||Pe.predicate.termType==="BlankNode"||Pe.object.termType==="BlankNode")throw new Error("Detected illegal blank node in BGP")}return xe}var b$=function(){var xe={EOF:1,parseError:function(Pe,Le){if(this.yy.parser)this.yy.parser.parseError(Pe,Le);else throw new Error(Pe)},setInput:function(Oe,Pe){return this.yy=Pe||this.yy||{},this._input=Oe,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 Oe=this._input[0];this.yytext+=Oe,this.yyleng++,this.offset++,this.match+=Oe,this.matched+=Oe;var Pe=Oe.match(/(?:\r\n?|\n).*/g);return Pe?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Oe},unput:function(Oe){var Pe=Oe.length,Le=Oe.split(/(?:\r\n?|\n)/g);this._input=Oe+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Pe),this.offset-=Pe;var nt=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),Le.length-1&&(this.yylineno-=Le.length-1);var ot=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:Le?(Le.length===nt.length?this.yylloc.first_column:0)+nt[nt.length-Le.length].length-Le[0].length:this.yylloc.first_column-Pe},this.options.ranges&&(this.yylloc.range=[ot[0],ot[0]+this.yyleng-Pe]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Oe){this.unput(this.match.slice(Oe))},pastInput:function(){var Oe=this.matched.substr(0,this.matched.length-this.match.length);return(Oe.length>20?"...":"")+Oe.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Oe=this.match;return Oe.length<20&&(Oe+=this._input.substr(0,20-Oe.length)),(Oe.substr(0,20)+(Oe.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Oe=this.pastInput(),Pe=new Array(Oe.length+1).join("-");return Oe+this.upcomingInput()+` `+Pe+"^"},test_match:function(Oe,Pe){var Le,nt,ot;if(this.options.backtrack_lexer&&(ot={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&&(ot.yylloc.range=this.yylloc.range.slice(0))),nt=Oe[0].match(/(?:\r\n?|\n).*/g),nt&&(this.yylineno+=nt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:nt?nt[nt.length-1].length-nt[nt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Oe[0].length},this.yytext+=Oe[0],this.match+=Oe[0],this.matches=Oe,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(Oe[0].length),this.matched+=Oe[0],Le=this.performAction.call(this,this.yy,this,Pe,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Le)return Le;if(this._backtrack){for(var K in ot)this[K]=ot[K];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Oe,Pe,Le,nt;this._more||(this.yytext="",this.match="");for(var ot=this._currentRules(),K=0;KPe[0].length)){if(Pe=Le,nt=K,this.options.backtrack_lexer){if(Oe=this.test_match(Le,ot[K]),Oe!==!1)return Oe;if(this._backtrack){Pe=!1;continue}else return!1}else if(!this.options.flex)break}return Pe?(Oe=this.test_match(Pe,ot[nt]),Oe!==!1?Oe:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Pe=this.next();return Pe||this.lex()},begin:function(Pe){this.conditionStack.push(Pe)},popState:function(){var Pe=this.conditionStack.length-1;return Pe>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(Pe){return Pe=this.conditionStack.length-1-Math.abs(Pe||0),Pe>=0?this.conditionStack[Pe]:"INITIAL"},pushState:function(Pe){this.begin(Pe)},stateStackSize:function(){return this.conditionStack.length},options:{flex:!0,"case-insensitive":!0},performAction:function(Pe,Le,nt,ot){switch(nt){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(Le.yytext);break}},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}}};return xe}();N3.lexer=b$;function Rt(){this.yy={}}return Rt.prototype=N3,N3.Parser=Rt,new Rt}(),Rk=Ak,xk="http://www.w3.org/2001/XMLSchema#integer",Ik="http://www.w3.org/2001/XMLSchema#string";function Ir(t){this._options=t=t||{};var e=t.prefixes||{};this._prefixByIri={};var r=[];for(var n in e){var a=e[n];Xh(a)&&(this._prefixByIri[a]=n,r.push(a))}var s=r.join("|").replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&");this._prefixRegex=new RegExp("^("+s+")([a-zA-Z][\\-_a-zA-Z0-9]*)$"),this._usedPrefixes={},this._sparqlStar=t.sparqlStar,this._indent=Xh(t.indent)?t.indent:" ",this._newline=Xh(t.newline)?t.newline:` -`,this._explicitDatatype=!!t.explicitDatatype}Ir.prototype.toQuery=function(t){var e="";return t.queryType&&(e+=t.queryType.toUpperCase()+" "),t.reduced&&(e+="REDUCED "),t.distinct&&(e+="DISTINCT "),t.variables?e+=Yi(t.variables,void 0,function(r){return Fu(r)?this.toEntity(r):"("+this.toExpression(r.expression)+" AS "+yb(r.variable)+")"},this)+" ":t.template&&(e+=this.group(t.template,!0)+this._newline),t.from&&(e+=this.graphs("FROM ",t.from.default)+this.graphs("FROM NAMED ",t.from.named)),t.where&&(e+="WHERE "+this.group(t.where,!0)+this._newline),t.updates&&(e+=Yi(t.updates,";"+this._newline,this.toUpdate,this)),t.group&&(e+="GROUP BY "+Yi(t.group,void 0,function(r){var n=Fu(r.expression)?this.toEntity(r.expression):"("+this.toExpression(r.expression)+")";return r.variable?"("+n+" AS "+yb(r.variable)+")":n},this)+this._newline),t.having&&(e+="HAVING ("+Yi(t.having,void 0,this.toExpression,this)+")"+this._newline),t.order&&(e+="ORDER BY "+Yi(t.order,void 0,function(r){var n="("+this.toExpression(r.expression)+")";return r.descending?"DESC "+n:n},this)+this._newline),t.offset&&(e+="OFFSET "+t.offset+this._newline),t.limit&&(e+="LIMIT "+t.limit+this._newline),t.values&&(e+=this.values(t)),e=this.baseAndPrefixes(t)+e,e.trim()};Ir.prototype.baseAndPrefixes=function(t){var e=t.base?"BASE <"+t.base+">"+this._newline:"",r="";for(var n in t.prefixes)(this._options.allPrefixes||this._usedPrefixes[n])&&(r+="PREFIX "+n+": <"+t.prefixes[n]+">"+this._newline);return e+r};Ir.prototype.toPattern=function(t){var e=t.type||t instanceof Array&&"array"||(t.subject&&t.predicate&&t.object?"triple":"");if(!(e in this))throw new Error("Unknown entry type: "+e);return this[e](t)};Ir.prototype.triple=function(t){return this.toEntity(t.subject)+" "+this.toEntity(t.predicate)+" "+this.toEntity(t.object)+"."};Ir.prototype.array=function(t){return Yi(t,this._newline,this.toPattern,this)};Ir.prototype.bgp=function(t){return this.encodeTriples(t.triples)};Ir.prototype.encodeTriples=function(t){if(!t.length)return"";for(var e=[],r=void 0,n=void 0,a=0;a":case">=":case"<=":case"&&":case"||":case"=":case"!=":case"+":case"-":case"*":case"/":return(Fu(r[0])?this.toEntity(r[0]):"("+this.toExpression(r[0])+")")+" "+e+" "+(Fu(r[1])?this.toEntity(r[1]):"("+this.toExpression(r[1])+")");case"!":return"!("+this.toExpression(r[0])+")";case"uplus":return"+("+this.toExpression(r[0])+")";case"uminus":return"-("+this.toExpression(r[0])+")";case"notin":e="NOT IN";case"in":return this.toExpression(r[0])+" "+e+"("+(Xh(r[1])?r[1]:Yi(r[1],", ",this.toExpression,this))+")";case"notexists":e="NOT EXISTS";case"exists":return e+" "+this.group(r[0],!0);default:return e+"("+Yi(r,", ",this.toExpression,this)+")"}default:throw new Error("Unknown expression type: "+t.type)}};Ir.prototype.toEntity=function(t){if(Fu(t))switch(t.termType){case"Wildcard":return"*";case"Variable":return yb(t);case"BlankNode":return"_:"+t.value;case"Literal":var e=t.value||"",r=t.language||"",n=t.datatype;if(t='"'+e.replace(PC,DC)+'"',r)t+="@"+r;else if(n){if(!this._explicitDatatype)switch(n.value){case Ik:return t;case xk:if(/^\d+$/.test(e))return e+" "}t+="^^"+this.encodeIRI(n.value)}return t;case"Quad":if(!this._sparqlStar)throw new Error("SPARQL* support is not enabled");return t.graph&&t.graph.termType!=="DefaultGraph"?"<< GRAPH "+this.toEntity(t.graph)+" { "+this.toEntity(t.subject)+" "+this.toEntity(t.predicate)+" "+this.toEntity(t.object)+" } >>":"<< "+this.toEntity(t.subject)+" "+this.toEntity(t.predicate)+" "+this.toEntity(t.object)+" >>";default:return this.encodeIRI(t.value)}else{var a=t.items.map(this.toEntity,this),s=t.pathType;switch(s){case"^":case"!":return s+a[0];case"*":case"+":case"?":return"("+a[0]+s+")";default:return"("+a.join(s)+")"}}};var PC=/["\\\t\n\r\b\f]/g,DC=function(t){return Pk[t]},Pk={"\\":"\\\\",'"':'\\"'," ":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};Ir.prototype.encodeIRI=function(t){var e=this._prefixRegex.exec(t);if(e){var r=this._prefixByIri[e[1]];return this._usedPrefixes[r]=!0,r+":"+e[2]}return"<"+t+">"};Ir.prototype.toUpdate=function(t){switch(t.type||t.updateType){case"load":return"LOAD"+(t.source?" "+this.toEntity(t.source):"")+(t.destination?" INTO GRAPH "+this.toEntity(t.destination):"");case"insert":return"INSERT DATA "+this.group(t.insert,!0);case"delete":return"DELETE DATA "+this.group(t.delete,!0);case"deletewhere":return"DELETE WHERE "+this.group(t.delete,!0);case"insertdelete":return(t.graph?"WITH "+this.toEntity(t.graph)+this._newline:"")+(t.delete.length?"DELETE "+this.group(t.delete,!0)+this._newline:"")+(t.insert.length?"INSERT "+this.group(t.insert,!0)+this._newline:"")+(t.using?this.graphs("USING ",t.using.default):"")+(t.using?this.graphs("USING NAMED ",t.using.named):"")+"WHERE "+this.group(t.where,!0);case"add":case"copy":case"move":return t.type.toUpperCase()+" "+(t.silent?"SILENT ":"")+(t.source.default?"DEFAULT":this.toEntity(t.source.name))+" TO "+this.toEntity(t.destination.name);case"create":case"clear":case"drop":return t.type.toUpperCase()+(t.silent?" SILENT ":" ")+(t.graph.default?"DEFAULT":t.graph.named?"NAMED":t.graph.all?"ALL":"GRAPH "+this.toEntity(t.graph.name));default:throw new Error("Unknown update query type: "+t.type)}};Ir.prototype.indent=function(t){return t.replace(/^/gm,this._indent)};function yb(t){return"?"+t.value}function Xh(t){return typeof t=="string"}function Fu(t){return typeof t.termType=="string"}function Fc(t,e){if(!t||!Fu(t)||!e||!Fu(e)||t.termType!==e.termType)return!1;switch(t.termType){case"Literal":return t.value===e.value&&t.language===e.language&&Fc(t.datatype,e.datatype);case"Quad":return Fc(t.subject,e.subject)&&Fc(t.predicate,e.predicate)&&Fc(t.object,e.object)&&Fc(t.graph,e.graph);default:return t.value===e.value}}function Yi(t,e,r,n){return t.map(r,n).join(Xh(e)?e:" ")}var Dk=function(e={}){return{stringify:function(r){var n=Object.create(e);return n.prefixes=r.prefixes,new Ir(n).toQuery(r)},createGenerator:function(){return new Ir(e)}}},co=Rk.Parser,Nk=Dk,Ck=OA.Wildcard,{DataFactory:jk}=ht,o0={Parser:function({prefixes:t,baseIRI:e,factory:r,sparqlStar:n,skipValidation:a,skipUngroupedVariableCheck:s,pathOnly:o}={}){var u={};for(var c in t||{})u[c]=t[c];var l=new co;return l.parse=function(){return co.base=e||"",co.prefixes=Object.create(u),co.factory=r||new jk,co.sparqlStar=!!n,co.pathOnly=!!o,co.skipValidation=!!a||!!s,co.prototype.parse.apply(l,arguments)},l._resetBlanks=co._resetBlanks,l},Generator:Nk,Wildcard:Ck},Mk=m&&m.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,a)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Fk=m&&m.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Lk=m&&m.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Mk(e,t,r);return Fk(e,t),e};Object.defineProperty(_f,"__esModule",{value:!0});const tt=Lk(bf),Bk=ht,$k=nr,Uk=o0;class qk{constructor(e){this.dataFactory=e||new Bk.DataFactory,this.stringType=this.createTerm("http://www.w3.org/2001/XMLSchema#string")}createAlt(e,r=!0){return this.flattenMulti({type:tt.types.ALT,input:e},r)}createAsk(e){return{type:tt.types.ASK,input:e}}createBoundAggregate(e,r,n,a,s){const o=this.createAggregateExpression(r,n,a,s);return o.variable=e,o}createBgp(e){return{type:tt.types.BGP,patterns:e}}createConstruct(e,r){return{type:tt.types.CONSTRUCT,input:e,template:r}}createDescribe(e,r){return{type:tt.types.DESCRIBE,input:e,terms:r}}createDistinct(e){return{type:tt.types.DISTINCT,input:e}}createExtend(e,r,n){return{type:tt.types.EXTEND,input:e,variable:r,expression:n}}createFrom(e,r,n){return{type:tt.types.FROM,input:e,default:r,named:n}}createFilter(e,r){return{type:tt.types.FILTER,input:e,expression:r}}createGraph(e,r){return{type:tt.types.GRAPH,input:e,name:r}}createGroup(e,r,n){return{type:tt.types.GROUP,input:e,variables:r,aggregates:n}}createInv(e){return{type:tt.types.INV,path:e}}createJoin(e,r=!0){return this.flattenMulti({type:tt.types.JOIN,input:e},r)}createLeftJoin(e,r,n){return n?{type:tt.types.LEFT_JOIN,input:[e,r],expression:n}:{type:tt.types.LEFT_JOIN,input:[e,r]}}createLink(e){return{type:tt.types.LINK,iri:e}}createMinus(e,r){return{type:tt.types.MINUS,input:[e,r]}}createNop(){return{type:tt.types.NOP}}createNps(e){return{type:tt.types.NPS,iris:e}}createOneOrMorePath(e){return{type:tt.types.ONE_OR_MORE_PATH,path:e}}createOrderBy(e,r){return{type:tt.types.ORDER_BY,input:e,expressions:r}}createPath(e,r,n,a){return a?{type:tt.types.PATH,subject:e,predicate:r,object:n,graph:a}:{type:tt.types.PATH,subject:e,predicate:r,object:n,graph:this.dataFactory.defaultGraph()}}createPattern(e,r,n,a){const s=this.dataFactory.quad(e,r,n,a);return s.type=tt.types.PATTERN,s}createProject(e,r){return{type:tt.types.PROJECT,input:e,variables:r}}createReduced(e){return{type:tt.types.REDUCED,input:e}}createSeq(e,r=!0){return this.flattenMulti({type:tt.types.SEQ,input:e},r)}createService(e,r,n){return{type:tt.types.SERVICE,input:e,name:r,silent:!!n}}createSlice(e,r,n){return r=r||0,n!==void 0?{type:tt.types.SLICE,input:e,start:r,length:n}:{type:tt.types.SLICE,input:e,start:r}}createUnion(e,r=!0){return this.flattenMulti({type:tt.types.UNION,input:e},r)}createValues(e,r){return{type:tt.types.VALUES,variables:e,bindings:r}}createZeroOrMorePath(e){return{type:tt.types.ZERO_OR_MORE_PATH,path:e}}createZeroOrOnePath(e){return{type:tt.types.ZERO_OR_ONE_PATH,path:e}}createAggregateExpression(e,r,n,a){return a?{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.AGGREGATE,aggregator:e,expression:r,separator:a,distinct:n}:{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.AGGREGATE,aggregator:e,expression:r,distinct:n}}createExistenceExpression(e,r){return{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.EXISTENCE,not:e,input:r}}createNamedExpression(e,r){return{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.NAMED,name:e,args:r}}createOperatorExpression(e,r){return{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.OPERATOR,operator:e,args:r}}createTermExpression(e){return{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.TERM,term:e}}createWildcardExpression(){return{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.WILDCARD,wildcard:new Uk.Wildcard}}createTerm(e){return(0,$k.stringToTerm)(e,this.dataFactory)}createCompositeUpdate(e){return{type:tt.types.COMPOSITE_UPDATE,updates:e}}createDeleteInsert(e,r,n){const a={type:tt.types.DELETE_INSERT};return e&&(a.delete=e),r&&(a.insert=r),n&&(a.where=n),a}createLoad(e,r,n){const a={type:tt.types.LOAD,source:e};return r&&(a.destination=r),this.addSilent(a,!!n)}createClear(e,r){return this.addSilent({type:tt.types.CLEAR,source:e},!!r)}createCreate(e,r){return this.addSilent({type:tt.types.CREATE,source:e},!!r)}createDrop(e,r){return this.addSilent({type:tt.types.DROP,source:e},!!r)}createAdd(e,r,n){return this.addSilent({type:tt.types.ADD,source:e,destination:r},!!n)}createMove(e,r,n){return this.addSilent({type:tt.types.MOVE,source:e,destination:r},!!n)}createCopy(e,r,n){return this.addSilent({type:tt.types.COPY,source:e,destination:r},!!n)}addSilent(e,r){return r&&(e.silent=r),e}flattenMulti(e,r){if(!r)return e;const n=e.type,a=e.input;let s=[];for(const o of a)o.type===n?s.push(...o.input):s.push(o);return e.input=s,e}}_f.default=qk;var u0={},Vk=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(u0,"__esModule",{value:!0});const Ce=bf,KI=Vk(_f),Hk=An;let kk=class fi{static flatten(e){return Array.prototype.concat(...e).filter(r=>r)}static objectify(e){if(e.termType){if(e.termType==="Quad")return{type:"pattern",termType:"Quad",subject:fi.objectify(e.subject),predicate:fi.objectify(e.predicate),object:fi.objectify(e.object),graph:fi.objectify(e.graph)};{let r={termType:e.termType,value:e.value};return e.language&&(r.language=e.language),e.datatype&&(r.datatype=fi.objectify(e.datatype)),r}}if(Array.isArray(e))return e.map(r=>fi.objectify(r));if(e===Object(e)){let r={};for(let n of Object.keys(e))r[n]=fi.objectify(e[n]);return r}return e}static inScopeVariables(e){const r=[];function n(s){r.find(o=>s.value===o.value)||r.push(s)}function a(s){s.subject.termType==="Variable"&&n(s.subject),s.predicate.termType==="Variable"&&n(s.predicate),s.object.termType==="Variable"&&n(s.object),s.graph.termType==="Variable"&&n(s.graph),s.subject.termType==="Quad"&&a(s.subject),s.predicate.termType==="Quad"&&a(s.predicate),s.object.termType==="Quad"&&a(s.object),s.graph.termType==="Quad"&&a(s.graph)}return fi.recurseOperation(e,{[Ce.types.EXPRESSION]:s=>(s.expressionType===Ce.expressionTypes.AGGREGATE&&s.variable&&n(s.variable),!0),[Ce.types.EXTEND]:s=>(n(s.variable),!0),[Ce.types.GRAPH]:s=>(s.name.termType==="Variable"&&n(s.name),!0),[Ce.types.GROUP]:s=>(s.variables.forEach(n),!0),[Ce.types.PATH]:s=>(s.subject.termType==="Variable"&&n(s.subject),s.object.termType==="Variable"&&n(s.object),s.graph.termType==="Variable"&&n(s.graph),s.subject.termType==="Quad"&&a(s.subject),s.object.termType==="Quad"&&a(s.object),s.graph.termType==="Quad"&&a(s.graph),!0),[Ce.types.PATTERN]:s=>(a(s),!0),[Ce.types.PROJECT]:s=>(s.variables.forEach(n),!1),[Ce.types.SERVICE]:s=>(s.name.termType==="Variable"&&n(s.name),!0),[Ce.types.VALUES]:s=>(s.variables.forEach(n),!0)}),r}static recurseOperation(e,r){let n=e,a=!0;const s=r[e.type];if(s&&(a=s(e)),!a)return;let o=u=>fi.recurseOperation(u,r);switch(n.type){case Ce.types.ALT:n.input.map(o);break;case Ce.types.ASK:o(n.input);break;case Ce.types.BGP:n.patterns.forEach(o);break;case Ce.types.CONSTRUCT:o(n.input),n.template.map(o);break;case Ce.types.DESCRIBE:o(n.input);break;case Ce.types.DISTINCT:o(n.input);break;case Ce.types.EXPRESSION:n.expressionType===Ce.expressionTypes.EXISTENCE&&o(n.input);break;case Ce.types.EXTEND:o(n.input),o(n.expression);break;case Ce.types.FILTER:o(n.input),o(n.expression);break;case Ce.types.FROM:o(n.input);break;case Ce.types.GRAPH:o(n.input);break;case Ce.types.GROUP:o(n.input),n.aggregates.forEach(o);break;case Ce.types.INV:o(n.path);break;case Ce.types.JOIN:n.input.map(o);break;case Ce.types.LEFT_JOIN:n.input.map(o),n.expression&&o(n.expression);break;case Ce.types.LINK:break;case Ce.types.MINUS:n.input.map(o);break;case Ce.types.NOP:break;case Ce.types.NPS:break;case Ce.types.ONE_OR_MORE_PATH:o(n.path);break;case Ce.types.ORDER_BY:o(n.input),n.expressions.forEach(o);break;case Ce.types.PATH:o(n.predicate);break;case Ce.types.PATTERN:break;case Ce.types.PROJECT:o(n.input);break;case Ce.types.REDUCED:o(n.input);break;case Ce.types.SEQ:n.input.map(o);break;case Ce.types.SERVICE:o(n.input);break;case Ce.types.SLICE:o(n.input);break;case Ce.types.UNION:n.input.map(o);break;case Ce.types.VALUES:break;case Ce.types.ZERO_OR_MORE_PATH:o(n.path);break;case Ce.types.ZERO_OR_ONE_PATH:o(n.path);break;case Ce.types.COMPOSITE_UPDATE:n.updates.forEach(u=>o(u));break;case Ce.types.DELETE_INSERT:n.delete&&n.delete.forEach(u=>o(u)),n.insert&&n.insert.forEach(u=>o(u)),n.where&&o(n.where);break;case Ce.types.LOAD:break;case Ce.types.CLEAR:break;case Ce.types.CREATE:break;case Ce.types.DROP:break;case Ce.types.ADD:break;case Ce.types.MOVE:break;case Ce.types.COPY:break;default:throw new Error(`Unknown Operation type ${n.type}`)}}static mapOperation(e,r,n){let a=e,s=!0,o=!0;n=n||new KI.default;const u=r[e.type];if(u){const d=u(e,n);a=d.result,s=d.recurse,o=d.copyMetadata!==!1}let c;if(o&&(a.metadata||e.metadata)&&(c={...a.metadata,...e.metadata}),!s)return c&&(a.metadata=c),a;let l=d=>fi.mapOperation(d,r,n);switch(a.type){case Ce.types.ALT:a=n.createAlt(a.input.map(l));break;case Ce.types.ASK:a=n.createAsk(l(a.input));break;case Ce.types.BGP:a=n.createBgp(a.patterns.map(l));break;case Ce.types.CONSTRUCT:a=n.createConstruct(l(a.input),a.template.map(l));break;case Ce.types.DESCRIBE:a=n.createDescribe(l(a.input),a.terms);break;case Ce.types.DISTINCT:a=n.createDistinct(l(a.input));break;case Ce.types.EXPRESSION:a=fi.mapExpression(a,r,n);break;case Ce.types.EXTEND:a=n.createExtend(l(a.input),a.variable,l(a.expression));break;case Ce.types.FILTER:a=n.createFilter(l(a.input),l(a.expression));break;case Ce.types.FROM:a=n.createFrom(l(a.input),[...a.default],[...a.named]);break;case Ce.types.GRAPH:a=n.createGraph(l(a.input),a.name);break;case Ce.types.GROUP:a=n.createGroup(l(a.input),[].concat(a.variables),a.aggregates.map(l));break;case Ce.types.INV:a=n.createInv(l(a.path));break;case Ce.types.JOIN:a=n.createJoin(a.input.map(l));break;case Ce.types.LEFT_JOIN:a=n.createLeftJoin(l(a.input[0]),l(a.input[1]),a.expression?l(a.expression):void 0);break;case Ce.types.LINK:a=n.createLink(a.iri);break;case Ce.types.MINUS:a=n.createMinus(l(a.input[0]),l(a.input[1]));break;case Ce.types.NOP:a=n.createNop();break;case Ce.types.NPS:a=n.createNps([].concat(a.iris));break;case Ce.types.ONE_OR_MORE_PATH:a=n.createOneOrMorePath(l(a.path));break;case Ce.types.ORDER_BY:a=n.createOrderBy(l(a.input),a.expressions.map(l));break;case Ce.types.PATH:a=n.createPath(a.subject,l(a.predicate),a.object,a.graph);break;case Ce.types.PATTERN:a=n.createPattern(a.subject,a.predicate,a.object,a.graph);break;case Ce.types.PROJECT:a=n.createProject(l(a.input),[...a.variables]);break;case Ce.types.REDUCED:a=n.createReduced(l(a.input));break;case Ce.types.SEQ:a=n.createSeq(a.input.map(l));break;case Ce.types.SERVICE:a=n.createService(l(a.input),a.name,a.silent);break;case Ce.types.SLICE:a=n.createSlice(l(a.input),a.start,a.length);break;case Ce.types.UNION:a=n.createUnion(a.input.map(l));break;case Ce.types.VALUES:a=n.createValues([].concat(a.variables),a.bindings.map(d=>Object.assign({},d)));break;case Ce.types.ZERO_OR_MORE_PATH:a=n.createZeroOrMorePath(l(a.path));break;case Ce.types.ZERO_OR_ONE_PATH:a=n.createZeroOrOnePath(l(a.path));break;case Ce.types.COMPOSITE_UPDATE:a=n.createCompositeUpdate(a.updates.map(l));break;case Ce.types.DELETE_INSERT:a=n.createDeleteInsert(a.delete?a.delete.map(l):void 0,a.insert?a.insert.map(l):void 0,a.where?l(a.where):void 0);break;case Ce.types.LOAD:a=n.createLoad(a.source,a.destination,a.silent);break;case Ce.types.CLEAR:a=n.createClear(a.source,a.silent);break;case Ce.types.CREATE:a=n.createCreate(a.source,a.silent);break;case Ce.types.DROP:a=n.createDrop(a.source,a.silent);break;case Ce.types.ADD:a=n.createAdd(a.source,a.destination);break;case Ce.types.MOVE:a=n.createMove(a.source,a.destination);break;case Ce.types.COPY:a=n.createCopy(a.source,a.destination);break;default:throw new Error(`Unknown Operation type ${a.type}`)}return c&&(a.metadata=c),a}static mapExpression(e,r,n){let a=e,s=!0;n=n||new KI.default;const o=r[e.expressionType];if(o&&({result:a,recurse:s}=o(e,n)),!s)return a;let u=c=>fi.mapOperation(c,r,n);switch(e.expressionType){case Ce.expressionTypes.AGGREGATE:return e.variable?n.createBoundAggregate(e.variable,e.aggregator,u(e.expression),e.distinct,e.separator):n.createAggregateExpression(e.aggregator,u(e.expression),e.distinct,e.separator);case Ce.expressionTypes.EXISTENCE:return n.createExistenceExpression(e.not,u(e.input));case Ce.expressionTypes.NAMED:return n.createNamedExpression(e.name,e.args.map(u));case Ce.expressionTypes.OPERATOR:return n.createOperatorExpression(e.operator,e.args.map(u));case Ce.expressionTypes.TERM:return n.createTermExpression(e.term);case Ce.expressionTypes.WILDCARD:return n.createWildcardExpression();default:throw new Error(`Unknown Expression type ${e.expressionType}`)}}static cloneOperation(e){return fi.mapOperation(e,{})}static cloneExpression(e){return fi.mapExpression(e,{})}static createUniqueVariable(e,r,n){let a=0,s=e;for(;r[s];)s=`${e}${a++}`;return n.variable(s)}static isSimpleTerm(e){return e.termType!==void 0&&e.termType!=="Quad"&&e.termType!=="Wildcard"}static isQuad(e){return e.termType==="Quad"}static hasQuadVariables(e){return(0,Hk.someTermsNested)(e,r=>r.termType==="Variable")}static isWildcard(e){return e.termType==="Wildcard"}};u0.default=kk;var Qk=m&&m.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,a)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Gk=m&&m.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zk=m&&m.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Qk(e,t,r);return Gk(e,t),e},NC=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(EA,"__esModule",{value:!0});const Wk=Ek,Xk=nr,Lh=zk(bf),Kk=NC(_f),Si=NC(u0),Jk=o0.Parser,vi=Lh.types;let Ud=new Set,CC=0,x_=!1,Qe;function Yk(t,e){e=e||{},Qe=new Kk.default(e.dataFactory);let r;if(Zk(t)){let n=new Jk(e);n._resetBlanks(),r=n.parse(t)}else r=t;return jC(r,e.quads,e.blankToVariable)}EA.default=Yk;function jC(t,e,r){if(Ud=new Set,CC=0,x_=!!e,!t.type)return Qe.createNop();if(t.type!=="query"&&t.type!=="update")throw new Error("Translate only works on complete query or update objects.");let n;if(SE(t),t.type==="query"){const a={type:"group",patterns:t.where||[]};n=Io(a),n=sQ(t,n)}else t.type==="update"&&(n=uQ(t));return r&&(n=LC(n)),n}function Zk(t){return typeof t=="string"}function MC(t){return!!(t!=null&&t.termType)}function eQ(t){return t.subject&&t.predicate&&t.object}function bp(t){return(t==null?void 0:t.termType)==="Variable"}function SE(t){if(MC(t))bp(t)&&Ud.add(`?${t.value}`);else if(Array.isArray(t))for(const e of t)SE(e);else if(t&&typeof t=="object")for(let e of Object.keys(t))e.startsWith("?")&&Ud.add(e),SE(t[e])}function Cn(t){let e={};if(eQ(t)){const r=[Cn(t.subject),Cn(t.predicate),Cn(t.object),t.graph?Cn(t.graph):{}];Object.assign(e,...r)}else if(MC(t))bp(t)&&(e[t.value]=t);else if(t.type==="bgp"){const r=t.triples;Object.assign(e,...r.map(Cn))}else if(t.type==="path")Object.assign(e,...t.items.map(Cn));else if(t.type==="group"||t.type==="union"||t.type==="optional")Object.assign(e,...t.patterns.map(Cn));else if(t.type==="service"||t.type==="graph")Object.assign(e,Cn(t.name)),Object.assign(e,...t.patterns.map(Cn));else if(t.type==="bind")Object.assign(e,Cn(t.variable));else if(t.type==="values"){if(t.values.length>0){const r=Object.keys(t.values[0]).map(n=>Qe.createTerm(n));Object.assign(e,...r.map(Cn))}}else if(t.type==="query"&&(t.queryType==="SELECT"||t.queryType==="DESCRIBE")){t.where&&t.variables.some(Si.default.isWildcard)&&Object.assign(e,...t.where.map(Cn));for(const r of t.variables)bp(r)?Object.assign(e,Cn(r)):r.variable&&Object.assign(e,Cn(r.variable));if(t.queryType==="SELECT"){if(t.group)for(const r of t.group)r.variable&&Object.assign(e,Cn(r.variable));if(t.values){const r={type:"values",values:t.values};Object.assign(e,Cn(r))}}}return e}function Io(t){let e=[],r=[];if("patterns"in t)for(let a of t.patterns)(a.type==="filter"?e:r).push(a);if(t.type==="bgp")return tQ(t);let n;if(t.type==="union")n=Qe.createUnion(r.map(a=>(a.type!=="group"&&(a={type:"group",patterns:[a]}),Io(a))));else{if(t.type==="graph")return nQ(t);if(t.type==="group")n=r.reduce(aQ,Qe.createBgp([]));else if(t.type==="values")n=FC(t);else if(t.type==="query")n=jC(t,x_,!1);else throw new Error(`Unexpected type: ${t.type}`)}if(e.length>0){let a=e.map(s=>Ki(s.expression));a.length>0&&(n=Qe.createFilter(n,a.reduce((s,o)=>Qe.createOperatorExpression("&&",[s,o]))))}return n}function Ki(t){if(Si.default.isSimpleTerm(t))return Qe.createTermExpression(t);if(Si.default.isQuad(t))return Si.default.hasQuadVariables(t)?Qe.createOperatorExpression("triple",[Ki(t.subject),Ki(t.predicate),Ki(t.object)]):Qe.createTermExpression(t);if(Si.default.isWildcard(t))return Qe.createWildcardExpression();if("aggregation"in t)return Qe.createAggregateExpression(t.aggregation,Ki(t.expression),!!t.distinct,t.separator);if("function"in t)return Qe.createNamedExpression(t.function,t.args.map(Ki));if("operator"in t)return t.operator==="exists"||t.operator==="notexists"?Qe.createExistenceExpression(t.operator==="notexists",Io(t.args[0])):((t.operator==="in"||t.operator==="notin")&&(t.args=[t.args[0]].concat(t.args[1])),Qe.createOperatorExpression(t.operator,t.args.map(Ki)));throw new Error(`Unknown expression: ${JSON.stringify(t)}`)}function tQ(t){let e=[],r=[];for(let n of t.triples)if("pathType"in n.predicate){let a=rQ(n);for(let s of a)s.type===vi.PATH?(e.length>0&&r.push(Qe.createBgp(e)),e=[],r.push(s)):e.push(s)}else e.push(AA(n));return e.length>0&&r.push(Qe.createBgp(e)),r.length===1?r[0]:Qe.createJoin(r)}function rQ(t){let e=t.subject,r=xc(t.predicate),n=t.object;return TE(e,r,n)}function xc(t){if(Si.default.isSimpleTerm(t)){if(t.termType==="NamedNode")return Qe.createLink(t);throw new Error(`Path predicate should be a NamedNode, got ${JSON.stringify(t)}`)}if(t.pathType==="^")return Qe.createInv(xc(t.items[0]));if(t.pathType==="!"){let e=[],r=[],n;"pathType"in t.items[0]&&t.items[0].pathType==="|"?n=t.items[0].items:n=t.items;for(let o of n)if(Si.default.isSimpleTerm(o))e.push(o);else if(o.pathType==="^")r.push(o.items[0]);else throw new Error(`Unexpected item: ${JSON.stringify(o)}`);let a=Qe.createNps(e),s=Qe.createInv(Qe.createNps(r));return r.length===0?a:e.length===0?s:Qe.createAlt([a,s])}if(t.pathType==="/")return Qe.createSeq(t.items.map(xc));if(t.pathType==="|")return Qe.createAlt(t.items.map(xc));if(t.pathType==="*")return Qe.createZeroOrMorePath(xc(t.items[0]));if(t.pathType==="+")return Qe.createOneOrMorePath(xc(t.items[0]));if(t.pathType==="?")return Qe.createZeroOrOnePath(xc(t.items[0]));throw new Error(`Unable to translate path expression ${JSON.stringify(t)}`)}function TE(t,e,r){if(e.type===vi.LINK)return[Qe.createPattern(t,e.iri,r)];if(e.type===vi.INV)return TE(r,e.path,t);if(e.type===vi.SEQ){let n=t;return Si.default.flatten(e.input.map((a,s)=>{const o=s===e.input.length-1?r:qd(),u=TE(n,a,o);return o.termType==="Variable"&&(n=o),u}))}return[Qe.createPath(t,e,r)]}function qd(){let t=`?var${CC++}`;return Ud.has(t)?qd():(Ud.add(t),Qe.createTerm(t))}function AA(t){if("pathType"in t.predicate)throw new Error("Trying to translate property path to quad.");return Qe.createPattern(t.subject,t.predicate,t.object,t.graph)}function nQ(t){const e={type:"group",patterns:t.patterns};let r=Io(e);return x_?r=Lc(r,t.name):r=Qe.createGraph(r,t.name),r}let iQ=Object.values(vi);function Lc(t,e,r){if(t.type===vi.GRAPH){if(r)throw new Error("Recursing through nested GRAPH statements with a replacement is impossible.");t=Lc(t.input,t.name)}else if(t.type===vi.BGP)t.patterns=t.patterns.map(n=>(r&&(n.subject.equals(e)&&(n.subject=r),n.predicate.equals(e)&&(n.predicate=r),n.object.equals(e)&&(n.object=r)),n.graph.termType==="DefaultGraph"&&(n.graph=e),n));else if(t.type===vi.PATH)r&&(t.subject.equals(e)&&(t.subject=r),t.object.equals(e)&&(t.object=r)),t.graph.termType==="DefaultGraph"&&(t.graph=e);else if(t.type===vi.PROJECT&&!r)t.variables.some(n=>n.equals(e))||(r=qd()),t.input=Lc(t.input,e,r);else if(t.type===vi.EXTEND&&!r)t.variable.equals(e)&&(r=qd()),t.input=Lc(t.input,e,r);else for(let n of Object.keys(t))Array.isArray(t[n])?t[n]=t[n].map(a=>Lc(a,e,r)):iQ.indexOf(t[n].type)>=0?t[n]=Lc(t[n],e,r):r&&bp(t[n])&&t[n].equals(e)&&(t[n]=r);return t}function aQ(t,e){if(e.type==="optional"){const r=Io({type:"group",patterns:e.patterns});r.type===vi.FILTER?t=Qe.createLeftJoin(t,r.input,r.expression):t=Qe.createLeftJoin(t,r)}else if(e.type==="minus"){const r=Io({type:"group",patterns:e.patterns});t=Qe.createMinus(t,r)}else if(e.type==="bind")t=Qe.createExtend(t,e.variable,Ki(e.expression));else if(e.type==="service"){const r={type:"group",patterns:e.patterns},n=Qe.createService(Io(r),e.name,e.silent);t=JI(t,n)}else{const r=Io(e);t=JI(t,r)}return t}function JI(t,e){return t.type===vi.BGP&&e.type===vi.BGP?t=Qe.createBgp([...t.patterns,...e.patterns]):t.type===vi.BGP&&t.patterns.length===0?t=e:e.type===vi.BGP&&e.patterns.length===0||(t=Qe.createJoin([t,e])),t}function FC(t){let e=(t.values.length===0?[]:Object.keys(t.values[0])).map(Qe.createTerm.bind(Qe)),r=t.values.map(n=>{let a=Object.keys(n);a=a.filter(o=>n[o]!==void 0);let s={};for(let o of a)s[o]=n[o];return s});return Qe.createValues(e,r)}function sQ(t,e){const r=t,n=[],a={};if(r.variables=r.variables&&r.variables.map(o=>Kh(o,a)),r.having=r.having&&r.having.map(o=>Kh(o,a)),r.order=r.order&&r.order.map(o=>Kh(o,a)),r.group||Object.keys(a).length>0){const o=Object.keys(a).map(c=>oQ(a[c],Qe.createTerm(c))),u=[];if(r.group)for(const c of r.group)if(Si.default.isSimpleTerm(c.expression))u.push(c.expression);else{const l="variable"in c?c.variable:qd();e=Qe.createExtend(e,l,Ki(c.expression)),u.push(l)}e=Qe.createGroup(e,u,o)}if(r.having)for(let o of r.having)e=Qe.createFilter(e,Ki(o));t.values&&(e=Qe.createJoin([e,FC(t)]));let s=[];if(t.queryType==="SELECT"||t.queryType==="DESCRIBE")if(t.variables.some(o=>o&&Si.default.isWildcard(o)))s=Object.values(Cn(t)).sort((o,u)=>o.value.localeCompare(u.value));else for(let o of t.variables)bp(o)||!("variable"in o)?s.push(o):o.variable&&(s.push(o.variable),n.push(o));for(let o of n)e=Qe.createExtend(e,o.variable,Ki(o.expression));return r.order&&(e=Qe.createOrderBy(e,r.order.map(o=>{let u=Ki(o.expression);return o.descending&&(u=Qe.createOperatorExpression("desc",[u])),u}))),t.queryType==="SELECT"&&(e=Qe.createProject(e,s)),r.distinct&&(e=Qe.createDistinct(e)),r.reduced&&(e=Qe.createReduced(e)),t.queryType==="CONSTRUCT"?e=Qe.createConstruct(e,(t.template||[]).map(AA)):t.queryType==="ASK"?e=Qe.createAsk(e):t.queryType==="DESCRIBE"&&(e=Qe.createDescribe(e,s)),(r.offset||r.limit)&&(e=Qe.createSlice(e,r.offset||0,r.limit)),r.from&&(e=Qe.createFrom(e,r.from.default,r.from.named)),e}function Kh(t,e){if("type"in t&&t.type==="aggregate"){let r=!1,n;for(let a of Object.keys(e))if(Wk(e[a],t)){n=Qe.createTerm(a),r=!0;break}return r||(n=qd(),e[(0,Xk.termToString)(n)]=t),n}return"expression"in t&&t.expression?{...t,expression:Kh(t.expression,e)}:"args"in t&&t.args?{...t,args:t.args.map(r=>Kh(r,e))}:t}function oQ(t,e){if(t.type!=="aggregate"||!t.aggregation)throw new Error(`Unexpected input: ${JSON.stringify(t)}`);const r=Ki(t);return r.variable=e,r}function uQ(t){return t.updates.length===1?YI(t.updates[0]):Qe.createCompositeUpdate(t.updates.map(YI))}function YI(t){if("type"in t){if(t.type==="load")return dQ(t);if(t.type==="clear"||t.type==="create"||t.type==="drop")return lQ(t);if(t.type==="add"||t.type==="copy"||t.type==="move")return fQ(t)}else if(t.updateType==="insertdelete"||t.updateType==="deletewhere"||t.updateType==="delete"||t.updateType==="insert")return cQ(t);throw new Error(`Unknown update type ${JSON.stringify(t)}`)}function cQ(t){if(!x_)throw new Error("INSERT/DELETE operations are only supported with quads option enabled");let e=[],r=[],n;if(t.delete&&(e=Si.default.flatten(t.delete.map(a=>ZI(a,t.graph)))),t.insert&&(r=Si.default.flatten(t.insert.map(a=>ZI(a,t.graph)))),t.where&&t.where.length>0){n=Io({type:"group",patterns:t.where});const a=t.using;a?n=Qe.createFrom(n,a.default,a.named):t.graph&&(n=Lc(n,t.graph))}else t.updateType==="deletewhere"&&e.length>0&&(n=Qe.createBgp(e));return Qe.createDeleteInsert(e.length>0?e:void 0,r.length>0?r:void 0,n)}function ZI(t,e){let r=e;t.type==="graph"&&(r=t.name);let n=t.triples;return r&&(n=n.map(a=>Object.assign(a,{graph:r}))),n.map(AA)}function lQ(t){let e;switch(Si.default.isSimpleTerm(t.graph)?e=t.graph:t.graph.all?e="ALL":t.graph.default?e="DEFAULT":t.graph.named?e="NAMED":e=t.graph.name,t.type){case"clear":return Qe.createClear(e,t.silent);case"create":return Qe.createCreate(e,t.silent);case"drop":return Qe.createDrop(e,t.silent)}}function dQ(t){return Qe.createLoad(t.source,t.destination,t.silent)}function fQ(t){const e=t.source.default?"DEFAULT":t.source.name,r=t.destination.default?"DEFAULT":t.destination.name;switch(t.type){case"copy":return Qe.createCopy(e,r,t.silent);case"move":return Qe.createMove(e,r,t.silent);case"add":return Qe.createAdd(e,r,t.silent)}}function LC(t){const e={},r=Array.from(Ud).reduce((a,s)=>(a[s]=!0,a),{});return Si.default.mapOperation(t,{[Lh.types.DELETE_INSERT]:a=>({result:a,recurse:!1}),[Lh.types.PATH]:(a,s)=>({result:s.createPath(n(a.subject),a.predicate,n(a.object),n(a.graph)),recurse:!1}),[Lh.types.PATTERN]:(a,s)=>({result:s.createPattern(n(a.subject),n(a.predicate),n(a.object),n(a.graph)),recurse:!1}),[Lh.types.CONSTRUCT]:a=>({result:Qe.createConstruct(LC(a.input),a.template),recurse:!1})});function n(a){if(a.termType==="BlankNode"){let s=e[a.value];return s||(s=Si.default.createUniqueVariable(a.value,r,Qe.dataFactory),r[s.value]=!0,e[a.value]=s),s}return a}}var Vd={},BC={},Mt={},I_={},Lt={},c0=$C;function $C(t,e){if(!t)throw new Error(e||"Assertion failed")}$C.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var EE={exports:{}};typeof Object.create=="function"?EE.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:EE.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var gf=EE.exports,hQ=c0,pQ=gf;Lt.inherits=pQ;function yQ(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function bQ(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),a=0;a>6|192,r[n++]=s&63|128):yQ(t,a)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++a)&1023),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=s&63|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=s&63|128)}else for(a=0;a>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Lt.htonl=UC;function gQ(t,e){for(var r="",n=0;n>>0}return s}Lt.join32=mQ;function vQ(t,e){for(var r=new Array(t.length*4),n=0,a=0;n>>24,r[a+1]=s>>>16&255,r[a+2]=s>>>8&255,r[a+3]=s&255):(r[a+3]=s>>>24,r[a+2]=s>>>16&255,r[a+1]=s>>>8&255,r[a]=s&255)}return r}Lt.split32=vQ;function wQ(t,e){return t>>>e|t<<32-e}Lt.rotr32=wQ;function SQ(t,e){return t<>>32-e}Lt.rotl32=SQ;function TQ(t,e){return t+e>>>0}Lt.sum32=TQ;function EQ(t,e,r){return t+e+r>>>0}Lt.sum32_3=EQ;function OQ(t,e,r,n){return t+e+r+n>>>0}Lt.sum32_4=OQ;function AQ(t,e,r,n,a){return t+e+r+n+a>>>0}Lt.sum32_5=AQ;function RQ(t,e,r,n){var a=t[e],s=t[e+1],o=n+s>>>0,u=(o>>0,t[e+1]=o}Lt.sum64=RQ;function xQ(t,e,r,n){var a=e+n>>>0,s=(a>>0}Lt.sum64_hi=xQ;function IQ(t,e,r,n){var a=e+n;return a>>>0}Lt.sum64_lo=IQ;function PQ(t,e,r,n,a,s,o,u){var c=0,l=e;l=l+n>>>0,c+=l>>0,c+=l>>0,c+=l>>0}Lt.sum64_4_hi=PQ;function DQ(t,e,r,n,a,s,o,u){var c=e+n+s+u;return c>>>0}Lt.sum64_4_lo=DQ;function NQ(t,e,r,n,a,s,o,u,c,l){var d=0,f=e;f=f+n>>>0,d+=f>>0,d+=f>>0,d+=f>>0,d+=f>>0}Lt.sum64_5_hi=NQ;function CQ(t,e,r,n,a,s,o,u,c,l){var d=e+n+s+u+l;return d>>>0}Lt.sum64_5_lo=CQ;function jQ(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Lt.rotr64_hi=jQ;function MQ(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Lt.rotr64_lo=MQ;function FQ(t,e,r){return t>>>r}Lt.shr64_hi=FQ;function LQ(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Lt.shr64_lo=LQ;var mf={},eP=Lt,BQ=c0;function P_(){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}mf.BlockHash=P_;P_.prototype.update=function(e,r){if(e=eP.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=eP.join32(e,0,e.length-n,this.endian);for(var a=0;a>>24&255,a[s++]=e>>>16&255,a[s++]=e>>>8&255,a[s++]=e&255}else for(a[s++]=e&255,a[s++]=e>>>8&255,a[s++]=e>>>16&255,a[s++]=e>>>24&255,a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=0,o=8;o>>3}Ks.g0_256=HQ;function kQ(t){return Cs(t,17)^Cs(t,19)^t>>>10}Ks.g1_256=kQ;var Hd=Lt,QQ=mf,GQ=Ks,uS=Hd.rotl32,qf=Hd.sum32,zQ=Hd.sum32_5,WQ=GQ.ft_1,GC=QQ.BlockHash,XQ=[1518500249,1859775393,2400959708,3395469782];function Hs(){if(!(this instanceof Hs))return new Hs;GC.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Hd.inherits(Hs,GC);var KQ=Hs;Hs.blockSize=512;Hs.outSize=160;Hs.hmacStrength=80;Hs.padLength=64;Hs.prototype._update=function(e,r){for(var n=this.W,a=0;a<16;a++)n[a]=e[r+a];for(;athis.blockSize&&(e=new this.Hash().update(e).digest()),LG(e.length<=this.blockSize);for(var r=e.length;rFs.someTerms(e,r=>r.termType==="BlankNode"||r.termType==="Quad"&&Fs.getTermsNested(r).some(n=>n.termType==="BlankNode")))}Mt.getQuadsWithBlankNodes=RE;function xE(t){return t.filter(e=>Fs.everyTerms(e,r=>r.termType!=="BlankNode"&&!(r.termType==="Quad"&&Fs.getTermsNested(r).some(n=>n.termType==="BlankNode"))))}Mt.getQuadsWithoutBlankNodes=xE;function bb(t){const e={};for(const r of t)e[JSON.stringify(es.quadToStringQuad(r))]=!0;return e}Mt.indexGraph=bb;function sj(t){return Object.keys(t).map(e=>es.stringQuadToQuad(JSON.parse(e)))}Mt.deindexGraph=sj;function IE(t){return sj(bb(t))}Mt.uniqGraph=IE;function PE(t){return Fs.uniqTerms(t.map(e=>Fs.getBlankNodes(Fs.getTermsNested(e))).reduce((e,r)=>e.concat(r),[]))}Mt.getGraphBlankNodes=PE;function DE(t,e,r){const n=Object.assign({},r),a={};let s=!0;for(;s;){const o=Object.keys(n).length;for(const c of e){const l=es.termToString(c);if(!n[l]){const[d,f]=oj(c,t,n);d&&(n[l]=f),a[l]=f}}const u={};for(const c in a){const l=a[c];u[l]===void 0?u[l]=c:u[l]=!1}for(const c in u){const l=u[c];l&&(n[l]=c)}s=o!==Object.keys(n).length}return[n,a]}Mt.hashTerms=DE;function oj(t,e,r){const n=[];let a=!0;for(const o of e){const u=Fs.getTermsNested(o);if(u.some(c=>c.equals(t))){n.push(IA(o,r,t));for(const c of u)!PA(c,r)&&!c.equals(t)&&(a=!1)}}const s=xA(n.sort().join(""));return[a,s]}Mt.hashTerm=oj;function xA(t){return $G.sha1().update(t).digest("hex")}Mt.sha1hex=xA;function IA(t,e,r){return Fs.getTerms(t).map(n=>uj(n,e,r)).join("|")}Mt.quadToSignature=IA;function uj(t,e,r){return t.equals(r)?"@self":t.termType==="BlankNode"?e[es.termToString(t)]||"@blank":t.termType==="Quad"?`<${IA(t,e,r)}>`:es.termToString(t)}Mt.termToSignature=uj;function PA(t,e){return t.termType!=="BlankNode"&&!(t.termType==="Quad"&&Fs.getTermsNested(t).some(r=>!PA(r,e)))||!!e[es.termToString(t)]}Mt.isTermGrounded=PA;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Mt,t)})(BC);var qG=m&&m.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,a)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),VG=m&&m.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HG=m&&m.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&qG(e,t,r);return VG(e,t),e},cj=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Vd,"__esModule",{value:!0});Vd.toSparqlJs=Vd.toSparql=void 0;const kG=BC,QG=nr,lj=o0,dj=HG(bf),GG=cj(_f),Oi=cj(u0),rt=dj.types,Ul=dj.expressionTypes;let qr;const _b=new GG.default;function zG(t,e={}){return new lj.Generator(e).stringify(fj(t))}Vd.toSparql=zG;function fj(t){hj(),t=Fz(t);let e=Lr(t);return e.type==="group"?e.patterns[0]:e}Vd.toSparqlJs=fj;function hj(){qr={project:!1,extend:[],group:[],aggregates:[],order:[]}}function Lr(t){switch(t.type!==rt.EXTEND&&t.type!==rt.ORDER_BY&&t.type!==rt.GRAPH&&(qr.project=!1),t.type){case rt.EXPRESSION:return Gs(t);case rt.ASK:return dS(t,rt.ASK);case rt.BGP:return tz(t);case rt.CONSTRUCT:return rz(t);case rt.DESCRIBE:return dS(t,rt.DESCRIBE);case rt.DISTINCT:return nz(t);case rt.EXTEND:return iz(t);case rt.FROM:return az(t);case rt.FILTER:return sz(t);case rt.GRAPH:return oz(t);case rt.GROUP:return uz(t);case rt.JOIN:return cz(t);case rt.LEFT_JOIN:return lz(t);case rt.MINUS:return dz(t);case rt.NOP:return{};case rt.ORDER_BY:return fz(t);case rt.PATH:return hz(t);case rt.PATTERN:return _p(t);case rt.PROJECT:return dS(t,rt.PROJECT);case rt.REDUCED:return pz(t);case rt.SERVICE:return yz(t);case rt.SLICE:return bz(t);case rt.UNION:return _z(t);case rt.VALUES:return gz(t);case rt.COMPOSITE_UPDATE:return Rz(t);case rt.DELETE_INSERT:return xz(t);case rt.LOAD:return Iz(t);case rt.CLEAR:return Pz(t);case rt.CREATE:return Dz(t);case rt.DROP:return Nz(t);case rt.ADD:return Cz(t);case rt.MOVE:return jz(t);case rt.COPY:return Mz(t)}throw new Error(`Unknown Operation type ${t.type}`)}function Gs(t){switch(t.expressionType){case Ul.AGGREGATE:return WG(t);case Ul.EXISTENCE:return XG(t);case Ul.NAMED:return KG(t);case Ul.OPERATOR:return JG(t);case Ul.TERM:return YG(t);case Ul.WILDCARD:return ZG(t)}throw new Error(`Unknown Expression Operation type ${t.expressionType}`)}function hl(t){switch(t.type){case rt.ALT:return mz(t);case rt.INV:return vz(t);case rt.LINK:return wz(t);case rt.NPS:return Sz(t);case rt.ONE_OR_MORE_PATH:return Tz(t);case rt.SEQ:return Ez(t);case rt.ZERO_OR_MORE_PATH:return Oz(t);case rt.ZERO_OR_ONE_PATH:return Az(t)}throw new Error(`Unknown Path type ${t.type}`)}function ud(t){return(0,QG.termToString)(t)}function WG(t){const e={expression:Gs(t.expression),type:"aggregate",aggregation:t.aggregator,distinct:t.distinct};return t.separator&&(e.separator=t.separator),e}function XG(t){return{type:"operation",operator:t.not?"notexists":"exists",args:Oi.default.flatten([Lr(t.input)])}}function KG(t){return{type:"functionCall",function:t.name,args:t.args.map(Gs)}}function JG(t){if(t.operator==="desc"){const r={expression:Gs(t.args[0])};return r.descending=!0,r}const e={type:"operation",operator:t.operator,args:t.args.map(Gs)};return(e.operator==="in"||e.operator==="notin")&&(e.args=[e.args[0]].concat([e.args.slice(1)])),e}function YG(t){return t.term}function ZG(t){return t.wildcard}function ez(t){return t}function tz(t){let e=t.patterns.map(_p);return e.length===0?null:{type:"bgp",triples:e}}function rz(t){return{type:"query",prefixes:{},queryType:"CONSTRUCT",template:t.template.map(_p),where:Oi.default.flatten([Lr(t.input)])}}function nz(t){let e=Lr(t.input);return e.patterns[0].distinct=!0,e}function iz(t){return qr.project?(qr.extend.push(t),Lr(t.input)):Oi.default.flatten([Lr(t.input),{type:"bind",variable:t.variable,expression:Gs(t.expression)}])}function az(t){const e=Lr(t.input),r=e.patterns[0];return r.from={default:t.default,named:t.named},e}function sz(t){return{type:"group",patterns:Oi.default.flatten([Lr(t.input),{type:"filter",expression:Gs(t.expression)}])}}function oz(t){return{type:"graph",patterns:Oi.default.flatten([Lr(t.input)]),name:t.name}}function uz(t){const e=Lr(t.input),r=t.aggregates.map(ez);return qr.aggregates.push(...r),qr.group.push(...t.variables),e}function cz(t){return Oi.default.flatten(t.input.map(Lr)).reduce((r,n)=>(n.type!=="bgp"||r.length==0||r[r.length-1].type!=="bgp"?r.push(n):r[r.length-1].triples.push(...n.triples),r),[])}function lz(t){const e={type:"optional",patterns:[Lr(t.input[1])]};return t.expression&&e.patterns.push({type:"filter",expression:Gs(t.expression)}),e.patterns=Oi.default.flatten(e.patterns),Oi.default.flatten([Lr(t.input[0]),e])}function dz(t){let e=Lr(t.input[1]);return e.type==="group"&&(e=e.patterns),Array.isArray(e)||(e=[e]),Oi.default.flatten([Lr(t.input[0]),{type:"minus",patterns:e}])}function fz(t){return qr.order.push(...t.expressions),Lr(t.input)}function hz(t){return{type:"bgp",triples:[{subject:t.subject,predicate:hl(t.predicate),object:t.object}]}}function _p(t){return{subject:t.subject,predicate:t.predicate,object:t.object}}function gb(t,e){let r=Oi.default.isSimpleTerm(t)?ud(t):t;if(typeof r=="string"){if(e[r])return e[r]}else if(Array.isArray(t))t=t.map(n=>gb(n,e));else for(let n of Object.keys(t))t[n]=gb(t[n],e);return t}function dS(t,e){const r={type:"query",prefixes:{}},n=r;let a;e===rt.PROJECT?(r.queryType="SELECT",a=t.variables):e===rt.ASK?r.queryType="ASK":e===rt.DESCRIBE&&(r.queryType="DESCRIBE",a=t.terms);const s=qr.extend,o=qr.group,u=qr.aggregates,c=qr.order;hj(),qr.project=!0;let l=Oi.default.flatten([Lr(t.input)]);l.length===1&&l[0].type==="group"&&(l=l[0].patterns),r.where=l;let d={};for(let h of qr.aggregates)d[ud(h.variable)]=Gs(h);let f={};for(let h=qr.extend.length-1;h>=0;--h){let p=qr.extend[h];f[ud(p.variable)]=gb(Gs(p.expression),d)}if(qr.group.length>0&&(n.group=qr.group.map(h=>{let p=ud(h);if(f[p]){let b=f[p];return delete f[p],{variable:h,expression:b}}return{expression:h}})),qr.order.length>0&&(n.order=qr.order.map(Lr).map(h=>h.descending?h:{expression:h})),a&&(n.variables=a.map(h=>{let p=ud(h);return f[p]?{variable:h,expression:f[p]}:h}),n.variables.length===0&&(n.variables=[new lj.Wildcard])),r.where.length>0&&r.where[r.where.length-1].type==="filter"){const h=r.where[r.where.length-1];NE(h,Object.keys(d))&&(n.having=Oi.default.flatten([gb(h.expression,d)]),r.where.splice(-1))}return qr.extend=s,qr.group=o,qr.aggregates=u,qr.order=c,{type:"group",patterns:[n]}}function NE(t,e){return Oi.default.isSimpleTerm(t)?e.indexOf(ud(t))>=0:Array.isArray(t)?t.some(r=>NE(r,e)):t===Object(t)?Object.keys(t).some(r=>NE(t[r],e)):e.indexOf(t)>=0}function pz(t){let e=Lr(t.input);return e.patterns[0].reduced=!0,e}function yz(t){let e=Lr(t.input);return e.type==="group"&&(e=e.patterns),Array.isArray(e)||(e=[e]),{type:"service",name:t.name,silent:t.silent,patterns:e}}function bz(t){let e=Lr(t.input),r=e;return e.type&&e.type==="group"&&(r=e.patterns[0]),t.start!==0&&(r.offset=t.start),t.length!==void 0&&(r.limit=t.length),e}function _z(t){return{type:"union",patterns:Oi.default.flatten(t.input.map(Lr))}}function gz(t){return{type:"values",values:t.bindings.map(e=>{let r={};for(let n of t.variables){let a=`?${n.value}`;e[a]?r[a]=e[a]:r[a]=void 0}return r})}}function mz(t){const e=t.input.map(hl);return e.every(r=>"pathType"in r&&r.pathType==="!")?{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:Oi.default.flatten(e.map(r=>r.items))}]}:{type:"path",pathType:"|",items:e}}function vz(t){if(t.path.type===rt.NPS){const e=t.path.iris.map(r=>({type:"path",pathType:"^",items:[r]}));return e.length<=1?{type:"path",pathType:"!",items:e}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:e}]}}return{type:"path",pathType:"^",items:[hl(t.path)]}}function wz(t){return t.iri}function Sz(t){return t.iris.length<=1?{type:"path",pathType:"!",items:t.iris}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:t.iris}]}}function Tz(t){return{type:"path",pathType:"+",items:[hl(t.path)]}}function Ez(t){return{type:"path",pathType:"/",items:t.input.map(hl)}}function Oz(t){return{type:"path",pathType:"*",items:[hl(t.path)]}}function Az(t){return{type:"path",pathType:"?",items:[hl(t.path)]}}function Rz(t){const e=t.updates.map(r=>Lr(r).updates[0]);return{prefixes:{},type:"update",updates:e}}function xz(t){var e;let r=t.where,n;if(r&&r.type===rt.FROM){let s=r;r=s.input,n={default:s.default,named:s.named}}const a=[{updateType:"insertdelete",delete:aP(t.delete||[]),insert:aP(t.insert||[])}];if(n&&(a[0].using=n),!r||r.type===rt.BGP&&r.patterns.length===0)a[0].where=[];else{const s={};let o=Lr(mb(r,s));o.type==="group"?a[0].where=o.patterns:a[0].where=[o];const u=Object.keys(s);if(u.length>0){if(u.length!==1)throw new Error("This is unexpected and might indicate an error in graph handling for updates.");const c=(e=s[u[0]])===null||e===void 0?void 0:e.graph;c&&c.value!==""&&(a[0].where=[{type:"graph",patterns:a[0].where,name:c}])}}return!t.delete&&!t.where?(a[0].updateType="insert",delete a[0].delete,delete a[0].where):!t.insert&&!t.where?(delete a[0].insert,delete a[0].where,t.delete.some(s=>s.subject.termType==="Variable"||s.predicate.termType==="Variable"||s.object.termType==="Variable")?a[0].updateType="deletewhere":a[0].updateType="delete"):!t.insert&&t.where&&t.where.type==="bgp"&&(0,kG.isomorphic)(t.delete,t.where.patterns)&&(delete a[0].where,a[0].updateType="deletewhere"),{prefixes:{},type:"update",updates:a}}function Iz(t){const e=[{type:"load",silent:!!t.silent,source:t.source}];return t.destination&&(e[0].destination=t.destination),{prefixes:{},type:"update",updates:e}}function Pz(t){return DA(t,"clear")}function Dz(t){return DA(t,"create")}function Nz(t){return DA(t,"drop")}function DA(t,e){const r=[{type:e,silent:!!t.silent}];return t.source==="DEFAULT"?r[0].graph={default:!0}:t.source==="NAMED"?r[0].graph={named:!0}:t.source==="ALL"?r[0].graph={all:!0}:r[0].graph={type:"graph",name:t.source},{prefixes:{},type:"update",updates:r}}function Cz(t){return NA(t,"add")}function jz(t){return NA(t,"move")}function Mz(t){return NA(t,"copy")}function NA(t,e){const r=[{type:e,silent:!!t.silent}];return r[0].source=t.source==="DEFAULT"?{type:"graph",default:!0}:{type:"graph",name:t.source},r[0].destination=t.destination==="DEFAULT"?{type:"graph",default:!0}:{type:"graph",name:t.destination},{prefixes:{},type:"update",updates:r}}function aP(t){if(!t)return[];const e={};return t.forEach(r=>{const n=r.graph.value;e[n]||(e[n]=[]),e[n].push(r)}),Object.keys(e).map(r=>r===""?{type:"bgp",triples:e[r].map(_p)}:{type:"graph",triples:e[r].map(_p),name:e[r][0].graph})}function Fz(t){return mb(t,{})}function mb(t,e){if(Array.isArray(t))return t.map(o=>mb(o,e));if(!t.type||t.type===rt.DELETE_INSERT)return t;if((t.type===rt.PATTERN||t.type===rt.PATH)&&t.graph)return e[t.graph.value]||(e[t.graph.value]={graph:t.graph,values:[]}),e[t.graph.value].values.push(t),t;const r={},n={},a={};for(let o of Object.keys(t)){const u={};r[o]=mb(t[o],u);const c=Object.keys(u);if(c.length>1){let l=sP(u[c[0]].values);for(let d=1;ddelete u[d]),l}else if(c.length===1){const l=u[c[0]].graph;n[o]=l,a[l.value]=l}}const s=Object.keys(a);if(s.length>0)if(s.length===1&&t.type!==rt.PROJECT)e[s[0]]={graph:a[s[0]],values:[r]};else for(let o of Object.keys(n))n[o].value.length>0&&(r[o]=_b.createGraph(r[o],n[o]));return r}function sP(t){const e=_b.createBgp(t),r=t[0].graph;return r.value.length===0?e:_b.createGraph(e,r)}(function(t){var e=m&&m.__createBinding||(Object.create?function(d,f,h,p){p===void 0&&(p=h);var b=Object.getOwnPropertyDescriptor(f,h);(!b||("get"in b?!f.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return f[h]}}),Object.defineProperty(d,p,b)}:function(d,f,h,p){p===void 0&&(p=h),d[p]=f[h]}),r=m&&m.__setModuleDefault||(Object.create?function(d,f){Object.defineProperty(d,"default",{enumerable:!0,value:f})}:function(d,f){d.default=f}),n=m&&m.__importStar||function(d){if(d&&d.__esModule)return d;var f={};if(d!=null)for(var h in d)h!=="default"&&Object.prototype.hasOwnProperty.call(d,h)&&e(f,d,h);return r(f,d),f},a=m&&m.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.toSparqlJs=t.toSparql=t.Factory=t.Algebra=t.translate=void 0;const s=a(EA);t.translate=s.default;const o=n(bf);t.Algebra=o;const u=a(_f);t.Factory=u.default;const c=Vd;Object.defineProperty(t,"toSparql",{enumerable:!0,get:function(){return c.toSparql}}),Object.defineProperty(t,"toSparqlJs",{enumerable:!0,get:function(){return c.toSparqlJs}});const l=a(u0);t.Util=l.default})(xt);Object.defineProperty(tl,"__esModule",{value:!0});tl.materializeOperation=tl.materializeTerm=void 0;const Lz=$n,ql=nr,oP=An,Bz=xt,$z=new Lz.BindingsFactory;function ws(t,e){if(t.termType==="Variable"){const r=e.get(t);if(r)return r}return t.termType==="Quad"&&(0,oP.someTermsNested)(t,r=>r.termType==="Variable")?(0,oP.mapTermsNested)(t,r=>ws(r,e)):t}tl.materializeTerm=ws;function CE(t,e,r={}){return r={strictTargetVariables:"strictTargetVariables"in r?r.strictTargetVariables:!1,bindFilter:"bindFilter"in r?r.bindFilter:!0},Bz.Util.mapOperation(t,{path(n,a){return{recurse:!1,result:a.createPath(ws(n.subject,e),n.predicate,ws(n.object,e),ws(n.graph,e))}},pattern(n,a){return{recurse:!1,result:a.createPattern(ws(n.subject,e),ws(n.predicate,e),ws(n.object,e),ws(n.graph,e))}},extend(n){if(e.has(n.variable)){if(r.strictTargetVariables)throw new Error(`Tried to bind variable ${(0,ql.termToString)(n.variable)} in a BIND operator.`);return{recurse:!0,result:CE(n.input,e,r)}}return{recurse:!0,result:n}},group(n,a){if(r.strictTargetVariables){for(const o of n.variables)if(e.has(o))throw new Error(`Tried to bind variable ${(0,ql.termToString)(o)} in a GROUP BY operator.`);return{recurse:!0,result:n}}const s=n.variables.filter(o=>!e.has(o));return{recurse:!0,result:a.createGroup(n.input,s,n.aggregates)}},project(n,a){if(r.strictTargetVariables){for(const u of n.variables)if(e.has(u))throw new Error(`Tried to bind variable ${(0,ql.termToString)(u)} in a SELECT operator.`);return{recurse:!0,result:n}}const s=n.variables.filter(u=>!e.has(u)),o=$z.bindings(n.variables.map(u=>{const c=e.get(u);if(c)return[u,c]}).filter(u=>!!u));return{recurse:!1,result:a.createProject(CE(n.input,o,r),s)}},values(n,a){if(r.strictTargetVariables){for(const s of n.variables)if(e.has(s))throw new Error(`Tried to bind variable ${(0,ql.termToString)(s)} in a VALUES operator.`)}else{const s=n.variables.filter(u=>!e.has(u)),o=n.bindings.map(u=>{const c={...u};let l=!0;return e.forEach((d,f)=>{const h=(0,ql.termToString)(f);h in c&&(d.equals(c[h])||(l=!1),delete c[h])}),l?c:void 0}).filter(Boolean);return{recurse:!0,result:a.createValues(s,o)}}return{recurse:!1,result:n}},expression(n,a){if(!r.bindFilter)return{recurse:!1,result:n};if(n.expressionType==="term")return{recurse:!1,result:a.createTermExpression(ws(n.term,e))};if(n.expressionType==="aggregate"&&"variable"in n&&e.has(n.variable)){if(r.strictTargetVariables)throw new Error(`Tried to bind ${(0,ql.termToString)(n.variable)} in a ${n.aggregator} aggregate.`);return{recurse:!0,result:n}}return{recurse:!0,result:n}}})}tl.materializeOperation=CE;Object.defineProperty(Zp,"__esModule",{value:!0});Zp.ActorQueryOperation=void 0;const uu=rr,Uz=et,uP=S_,qz=tl;let cP=0;class Tu extends Uz.Actor{constructor(e){super(e)}static getSafeBindings(e){return Tu.validateQueryOutput(e,"bindings"),e}static getSafeQuads(e){return Tu.validateQueryOutput(e,"quads"),e}static getSafeBoolean(e){return Tu.validateQueryOutput(e,"boolean"),e}static getSafeVoid(e){return Tu.validateQueryOutput(e,"void"),e}static cachifyMetadata(e){let r;return()=>(r||(r=e(),r.then(n=>n.state.addInvalidateListener(()=>{r=void 0})).catch(()=>{})),r)}static validateQueryOutput(e,r){if(e.type!==r)throw new Error(`Invalid query output type: Expected '${r}' but got '${e.type}'`)}static getBaseExpressionContext(e){const r=e.get(uu.KeysInitQuery.queryTimestamp),n=e.get(uu.KeysInitQuery.baseIRI),a=e.get(uu.KeysInitQuery.functionArgumentsCache)||{};if(e.has(uu.KeysInitQuery.extensionFunctionCreator)&&e.has(uu.KeysInitQuery.extensionFunctions))throw new Error("Illegal simultaneous usage of extensionFunctionCreator and extensionFunctions in context");let s=e.get(uu.KeysInitQuery.extensionFunctionCreator);const o=e.get(uu.KeysInitQuery.extensionFunctions);return o&&(s=u=>o[u.value]),{now:r,baseIRI:n,extensionFunctionCreator:s,functionArgumentsCache:a}}static getExpressionContext(e,r){return{...this.getBaseExpressionContext(e),bnode:n=>new uP.BlankNodeBindingsScoped(n||`BNODE_${cP++}`)}}static getAsyncExpressionContext(e,r){return{...this.getBaseExpressionContext(e),bnode:n=>Promise.resolve(new uP.BlankNodeBindingsScoped(n||`BNODE_${cP++}`)),exists:Tu.createExistenceResolver(e,r)}}static createExistenceResolver(e,r){return async(n,a)=>{const s=(0,qz.materializeOperation)(n.input,a),o=await r.mediate({operation:s,context:e}),u=Tu.getSafeBindings(o);return new Promise((c,l)=>{u.bindingsStream.on("end",()=>{c(!1)}),u.bindingsStream.on("error",l),u.bindingsStream.on("data",()=>{u.bindingsStream.close(),c(!0)})}).then(c=>n.not?!c:c)}}static throwOnReadOnly(e){if(e.get(uu.KeysQueryOperation.readOnly))throw new Error("Attempted a write operation in read-only mode")}}Zp.ActorQueryOperation=Tu;var l0={};Object.defineProperty(l0,"__esModule",{value:!0});l0.ActorQueryOperationTyped=void 0;const My=rr,lP=Zp;class Vz extends lP.ActorQueryOperation{constructor(e,r){if(super({...e,operationName:r}),!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 r=e.operation;return this.testOperation(r,e.context)}async run(e){const r=e.context.get(My.KeysInitQuery.physicalQueryPlanLogger);r&&(r.logOperation(e.operation.type,void 0,e.operation,e.context.get(My.KeysInitQuery.physicalQueryPlanNode),this.name,{}),e.context=e.context.set(My.KeysInitQuery.physicalQueryPlanNode,e.operation));const n=e.operation,a=e.context.set(My.KeysQueryOperation.operation,n),s=await this.runOperation(n,a);return"metadata"in s&&(s.metadata=lP.ActorQueryOperation.cachifyMetadata(s.metadata)),s}}l0.ActorQueryOperationTyped=Vz;var D_={};Object.defineProperty(D_,"__esModule",{value:!0});D_.ActorQueryOperationTypedMediated=void 0;const Hz=l0;class kz extends Hz.ActorQueryOperationTyped{constructor(e,r){super(e,r)}}D_.ActorQueryOperationTypedMediated=kz;var N_={};Object.defineProperty(N_,"__esModule",{value:!0});N_.BusQueryOperation=void 0;const Qz=et;class Gz extends Qz.BusIndexed{constructor(e){super({...e,actorIdentifierFields:["operationName"],actionIdentifierFields:["operation","type"]})}}N_.BusQueryOperation=Gz;var C_={},Ut={},CA={exports:{}},Ed=typeof Reflect=="object"?Reflect:null,dP=Ed&&typeof Ed.apply=="function"?Ed.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},$1;Ed&&typeof Ed.ownKeys=="function"?$1=Ed.ownKeys:Object.getOwnPropertySymbols?$1=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:$1=function(e){return Object.getOwnPropertyNames(e)};function zz(t){console&&console.warn&&console.warn(t)}var pj=Number.isNaN||function(e){return e!==e};function cr(){cr.init.call(this)}CA.exports=cr;CA.exports.once=Jz;cr.EventEmitter=cr;cr.prototype._events=void 0;cr.prototype._eventsCount=0;cr.prototype._maxListeners=void 0;var fP=10;function j_(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(cr,"defaultMaxListeners",{enumerable:!0,get:function(){return fP},set:function(t){if(typeof t!="number"||t<0||pj(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");fP=t}});cr.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};cr.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||pj(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function yj(t){return t._maxListeners===void 0?cr.defaultMaxListeners:t._maxListeners}cr.prototype.getMaxListeners=function(){return yj(this)};cr.prototype.emit=function(e){for(var r=[],n=1;n0&&(o=r[0]),o instanceof Error)throw o;var u=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw u.context=o,u}var c=s[e];if(c===void 0)return!1;if(typeof c=="function")dP(c,this,r);else for(var l=c.length,d=vj(c,l),n=0;n0&&o.length>a&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=o.length,zz(u)}return t}cr.prototype.addListener=function(e,r){return bj(this,e,r,!1)};cr.prototype.on=cr.prototype.addListener;cr.prototype.prependListener=function(e,r){return bj(this,e,r,!0)};function Wz(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _j(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},a=Wz.bind(n);return a.listener=r,n.wrapFn=a,a}cr.prototype.once=function(e,r){return j_(r),this.on(e,_j(this,e,r)),this};cr.prototype.prependOnceListener=function(e,r){return j_(r),this.prependListener(e,_j(this,e,r)),this};cr.prototype.removeListener=function(e,r){var n,a,s,o,u;if(j_(r),a=this._events,a===void 0)return this;if(n=a[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[e],a.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){u=n[o].listener,s=o;break}if(s<0)return this;s===0?n.shift():Xz(n,s),n.length===1&&(a[e]=n[0]),a.removeListener!==void 0&&this.emit("removeListener",e,u||r)}return this};cr.prototype.off=cr.prototype.removeListener;cr.prototype.removeAllListeners=function(e){var r,n,a;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),o;for(a=0;a=0;a--)this.removeListener(e,r[a]);return this};function gj(t,e,r){var n=t._events;if(n===void 0)return[];var a=n[e];return a===void 0?[]:typeof a=="function"?r?[a.listener||a]:[a]:r?Kz(a):vj(a,a.length)}cr.prototype.listeners=function(e){return gj(this,e,!0)};cr.prototype.rawListeners=function(e){return gj(this,e,!1)};cr.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):mj.call(t,e)};cr.prototype.listenerCount=mj;function mj(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}cr.prototype.eventNames=function(){return this._eventsCount>0?$1(this._events):[]};function vj(t,e){for(var r=new Array(e),n=0;neW.then(a),e=typeof setImmediate=="function"?setImmediate:a=>setTimeout(a,0);let r=0,n=null;return a=>{n!==null?n.push(a):++r<100?t(a):(n=[a],e(()=>{for(const s of n)t(s);n=null,r=0}))}}F_.createTaskScheduler=tW;(function(t){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 e=Sf,r=M_;Object.defineProperty(t,"LinkedList",{enumerable:!0,get:function(){return r.LinkedList}});let a=F_.createTaskScheduler();function s(g){a(g)}t.scheduleTask=s;function o(){return a}t.getTaskScheduler=o;function u(g){a=g}t.setTaskScheduler=u,t.INIT=1,t.OPEN=2,t.CLOSING=4,t.CLOSED=8,t.ENDED=16,t.DESTROYED=32;class c extends e.EventEmitter{constructor(y=t.OPEN){super(),this._readable=!1,this._state=y,this.on("newListener",l)}_changeState(y,v=!1){const C=y>this._state&&this._statethis.emit("end")):this.emit("end"))),C}read(){return null}forEach(y,v){this.on("data",Re(y,v))}close(){this._changeState(t.CLOSED)&&this._endAsync()}destroy(y){this.done||this._destroy(y,v=>{y=y||v,y&&this.emit("error",y),this._end(!0)})}_destroy(y,v){v()}_end(y=!1){this._changeState(y?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(y){y=!!y&&!this.done,this._readable!==y&&(this._readable=y,y&&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 y=this._toStringDetails();return`[${this.constructor.name}${y?` ${y}`:""}]`}_toStringDetails(){return""}toArray(y){const v=[],C=typeof(y==null?void 0:y.limit)=="number"?y.limit:1/0;return this.ended||C<=0?Promise.resolve(v):new Promise((V,q)=>{const G=()=>V(v),Y=ee=>{v.push(ee),v.length>=C&&(this.removeListener("error",q),this.removeListener("data",Y),this.removeListener("end",G),V(v))};this.on("error",q),this.on("data",Y),this.on("end",G)})}getProperty(y,v){const C=this._properties;if(!v)return C&&C[y];if(C&&y in C)a(()=>v(C[y]));else{let V;(V=this._propertyCallbacks)||(this._propertyCallbacks=V=Object.create(null)),y in V?V[y].push(v):V[y]=[v]}}setProperty(y,v){const C=this._properties||(this._properties=Object.create(null));C[y]=v;const V=this._propertyCallbacks||{},q=V[y];if(q){delete V[y],a(()=>{for(const G of q)G(v)});for(y in V)return;delete this._propertyCallbacks}}getProperties(){const y=this._properties,v={};for(const C in y)v[C]=y[C];return v}setProperties(y){for(const v in y)this.setProperty(v,y[v])}copyProperties(y,v){for(const C of v)y.getProperty(C,V=>this.setProperty(C,V))}transform(y){return new x(this,y)}map(y,v){return new w(this,Re(y,v))}filter(y,v){return this.map(function(C){return y.call(v||this,C)?C:null})}uniq(y=E){const v=new Set;return this.filter(function(C){const V=y.call(this,C);return v.has(V)?!1:(v.add(V),!0)})}prepend(y){return this.transform({prepend:y})}append(y){return this.transform({append:y})}surround(y,v){return this.transform({prepend:y,append:v})}skip(y){return this.map(v=>y-- >0?null:v)}take(y){return this.transform({limit:y})}range(y,v){return this.transform({offset:y,limit:Math.max(v-y+1,0)})}clone(){return new $(this)}}t.AsyncIterator=c;function l(g){g==="data"&&(this.removeListener("newListener",l),f(this,"readable",d),this.readable&&a(()=>d.call(this)))}function d(){let g;for(;this.listenerCount("data")!==0&&(g=this.read())!==null;)this.emit("data",g);this.listenerCount("data")===0&&!this.done&&(this.removeListener("readable",d),f(this,"newListener",l))}function f(g,y,v){g.listeners(y).includes(v)||g.on(y,v)}class h extends c{constructor(){super(),this._changeState(t.ENDED,!0)}}t.EmptyIterator=h;class p extends c{constructor(y){super(),this._item=y,y===null?this.close():this.readable=!0}read(){const y=this._item;return this._item=null,this.close(),y}_toStringDetails(){return this._item===null?"":`(${this._item})`}}t.SingletonIterator=p;class b extends c{constructor(y=[],{autoStart:v=!0,preserve:C=!0}={}){super();const V=C||!Array.isArray(y)?[...y]:y;this._index=0,this._sourceStarted=v!==!1,this._truncateThreshold=C?-1:64,this._sourceStarted&&V.length===0?this.close():this._buffer=V,this.readable=!0}read(){this._sourceStarted||(this._sourceStarted=!0);let y=null;return this._buffer&&(this._index=v&&this.close(),Promise.resolve(q)}}t.ArrayIterator=b;class _ extends c{constructor({start:y=0,step:v=1,end:C}={}){super(),Number.isFinite(y)&&(y=Math.trunc(y)),this._next=y,Number.isFinite(v)&&(v=Math.trunc(v)),this._step=v;const V=v>=0,q=V?1/0:-1/0;Number.isFinite(C)?C=Math.trunc(C):C!==-q&&(C=q),this._last=C,!Number.isFinite(y)||(V?y>C:y=0?V>C:Vthis._init(v)),this._sourceStarted=v!==!1}get maxBufferSize(){return this._maxBufferSize}set maxBufferSize(y){y!==1/0&&(y=Number.isFinite(y)?Math.max(Math.trunc(y),1):4),this._maxBufferSize!==y&&(this._maxBufferSize=y,this._state===t.OPEN&&this._fillBuffer())}_init(y){let v=!1;this._reading=!0,this._begin(()=>{if(v)throw new Error("done callback called multiple times");v=!0,this._reading=!1,this._changeState(t.OPEN),y?this._fillBufferAsync():this.readable=!0})}_begin(y){y()}read(){if(this.done)return null;this._sourceStarted||(this._sourceStarted=!0);const y=this._buffer;let v;return y.empty?(v=null,this.readable=!1):v=y.shift(),!this._reading&&y.length0&&(this._pushedCount=0,this._reading=!0,this._read(y,()=>{if(!y)throw new Error("done callback called multiple times");y=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(y,v){this._buffer.clear(),v()}_flush(y){y()}_toStringDetails(){const y=this._buffer;return`{${y.empty?"":`next: ${y.first}, `}buffer: ${y.length}}`}}t.BufferedIterator=A;class T extends A{constructor(y,v=y||{}){super(v),this._boundPush=C=>this._push(C),pe(y)||(y=v.source),J(y)?this.source=y:y&&(this._createSource=le(y)?()=>y:y,this._sourceStarted&&this._loadSourceAsync()),this._optional=!!v.optional,this._destroySource=v.destroySource!==!1}get source(){return oe(this._createSource)&&this._loadSourceAsync(),this._source}set source(y){const v=this._source=this._validateSource(y);v[t.DESTINATION]=this,this.done?this._destroySource&&v.destroy():v.done?this.close():(v.on("end",H),v.on("readable",N),v.on("error",D))}_loadSourceAsync(){oe(this._createSource)&&(Promise.resolve(this._createSource()).then(y=>{delete this._createSource,this.source=y,this._fillBuffer()},y=>this.emit("error",y)),this._createSource=null)}_validateSource(y,v=!1){if(this._source||typeof this._createSource<"u")throw new Error("The source cannot be changed after it has been set");return O(y,v)}_read(y,v){const C=()=>{this._pushedCountthis._readAndTransform(C,v)):v()};this._readAndTransform(C,v)}_readAndTransform(y,v){let C;const V=this.source;!V||V.done||(C=V.read())===null?v():this._optional?this._optionalTransform(C,y):this._transform(C,y,this._boundPush)}_optionalTransform(y,v){const C=this._pushedCount;this._transform(y,()=>{C===this._pushedCount&&this._push(y),v()},this._boundPush)}_transform(y,v,C){C(y),v()}_closeWhenDone(){this.close()}_end(y){const v=this._source;v&&(v.removeListener("end",H),v.removeListener("error",D),v.removeListener("readable",N),delete v[t.DESTINATION],this._destroySource&&v.destroy()),super._end(y)}}t.TransformIterator=T;function I(){this[t.DESTINATION].readable=!0}function D(g){this[t.DESTINATION].emit("error",g)}function U(){this[t.DESTINATION].close()}function H(){this[t.DESTINATION]._closeWhenDone()}function N(){this[t.DESTINATION]._sourceStarted!==!1&&this[t.DESTINATION]._fillBuffer()}class x extends T{constructor(y,v){if(super(y,v),this._offset=0,this._limit=1/0,this._filter=C=>!0,v=v||(pe(y)?null:y),v){const C=oe(v)?v:v.transform,{limit:V,offset:q,filter:G,map:Y,prepend:ee,append:ae}=v;q===1/0||V===-1/0?this._limit=0:(Number.isFinite(q)&&(this._offset=Math.max(Math.trunc(q),0)),Number.isFinite(V)&&(this._limit=Math.max(Math.trunc(V),0)),oe(G)&&(this._filter=G),oe(Y)&&(this._map=Y),this._transform=oe(C)?C:null),ee&&(this._prepender=J(ee)?ee:he(ee)),ae&&(this._appender=J(ae)?ae:he(ae))}}_read(y,v){const C=()=>this._readAndTransformSimple(y,V,v);this._readAndTransformSimple(y,V,v);function V(){a(C)}}_readAndTransformSimple(y,v,C){let V;const{source:q}=this;if(!q||q.done){C();return}for(this._limit===0&&this.close();!this.closed&&this._pushedCount"u"?V:this._map(V);if(G===null)this._optional&&this._push(V);else if(!oe(this._transform))this._push(G);else{this._optional?this._optionalTransform(G,v):this._transform(G,v,this._boundPush);return}--this._limit===0&&this.close()}C()}_begin(y){this._insert(this._prepender,y),delete this._prepender}_flush(y){this._insert(this._appender,y),delete this._appender}_insert(y,v){const C=q=>this._push(q);!y||y.done?v():(y.on("data",C),y.on("end",V));function V(){y.removeListener("data",C),y.removeListener("end",V),v()}}}t.SimpleTransformIterator=x;class F extends T{constructor(y,v){if(super(y,v),this._transformerQueue=[],v){const C=oe(v)?v:v.multiTransform;C&&(this._createTransformer=C)}}_read(y,v){const C=this._transformerQueue,V=this._optional;let q,G;for(;(q=C[0])&&q.transformer.done;){V&&q.item!==null&&(y--,this._push(q.item)),C.shift();const{transformer:ee}=q;ee.removeListener("end",N),ee.removeListener("readable",N),ee.removeListener("error",D)}const{source:Y}=this;for(;Y&&!Y.done&&C.length0&&(G=ee.read())!==null;)this._push(G),V&&(q.item=null)}else Y&&Y.done&&this.close();v()}_createTransformer(y){return new p(y)}_closeWhenDone(){this._transformerQueue.length||this.close()}_end(y){if(super._end(y),this._destroySource)for(const v of this._transformerQueue)v.transformer.destroy()}}t.MultiTransformIterator=F;class X extends A{constructor(y,v={}){super(v),this._sources=[],this._currentSource=-1;const C=v.autoStart!==!1;if(J(y))y.on("error",V=>this.emit("error",V)),this._pending={loading:!1,sources:y},C&&this._loadSources();else if(Array.isArray(y)&&y.length>0)for(const V of y)this._addSource(V);else C&&this.close();this._destroySources=v.destroySources!==!1}_loadSources(){const y=this._pending.sources;this._pending.loading=!0,y.done?(delete this._pending,this.close()):(y.on("data",v=>{this._addSource(v),this._fillBufferAsync()}),y.on("end",()=>{delete this._pending,this._fillBuffer()}))}_addSource(y){le(y)&&(y=se(y)),y.done||(this._sources.push(y),y[t.DESTINATION]=this,y.on("error",D),y.on("readable",N),y.on("end",ne))}_removeEmptySources(){this._sources=this._sources.filter((y,v)=>(y.done&&v<=this._currentSource&&this._currentSource--,!y.done)),this._fillBuffer()}_read(y,v){var C;((C=this._pending)===null||C===void 0?void 0:C.loading)===!1&&this._loadSources();let V=0,q;for(;V!==(V=y);)for(let G=0;G0;G++)this._currentSource=(this._currentSource+1)%this._sources.length,(q=this._sources[this._currentSource].read())!==null&&(y--,this._push(q));!this._pending&&this._sources.length===0&&this.close(),v()}_end(y=!1){if(super._end(y),this._destroySources){for(const v of this._sources)v.destroy();this._pending&&(this._pending.sources.destroy(),delete this._pending)}}}t.UnionIterator=X;function ne(){this[t.DESTINATION]._removeEmptySources()}class $ extends T{constructor(y){super(y,{autoStart:!1}),this._readPosition=0,this._reading=!1,y&&(this.readable=!0)}_init(){}close(){c.prototype.close.call(this)}get source(){return super.source}set source(y){const v=this._source=this._validateSource(y),C=v&&v[t.DESTINATION]||(v[t.DESTINATION]=new j(v));this.done?this._destroySource&&v.destroy():C.endsAt(0)?this.close():(C.register(this),(v._sourceStarted===!1||C.readAt(0)!==null)&&(this.readable=!0));const V=this._propertyCallbacks;for(const q in V){const G=V[q];for(const Y of G)this._getSourceProperty(q,Y)}}_validateSource(y,v=!1){const C=y&&y[t.DESTINATION];return super._validateSource(y,!C||C instanceof j)}getProperty(y,v){const{source:C}=this,V=this._properties,q=V&&y in V;if(!v)return q?V&&V[y]:C&&C.getProperty(y);super.getProperty(y,v),C&&!q&&this._getSourceProperty(y,v)}_getSourceProperty(y,v){this.source.getProperty(y,C=>{(!this._properties||!(y in this._properties))&&v(C)})}getProperties(){const y=this.source?this.source.getProperties():{},v=this._properties;for(const C in v)y[C]=v[C];return y}_toStringDetails(){return`{source: ${this.source?this.source.toString():"none"}}`}read(){this._sourceStarted||(this._sourceStarted=!0);const y=this.source;let v=null;if(!this.done&&y){const C=y[t.DESTINATION];(v=C.readAt(this._readPosition))!==null?this._readPosition++:this.readable=!1,C.endsAt(this._readPosition)&&this.close()}return v}_end(y){const v=this.source,C=v==null?void 0:v[t.DESTINATION];C&&C.unregister(this),A.prototype._end.call(this,y)}}t.ClonedIterator=$;class j{constructor(y){if(this._history=[],this._trackers=new Set,this._source=y,!y.done){const v=()=>{for(const q of this._trackers)q.readable=!0},C=q=>{for(const G of this._trackers)G.emit("error",q)},V=()=>{for(const q of this._trackers)q._sourceStarted!==!1&&q._readPosition===this._history.length&&q.close();this._trackers.clear(),y.removeListener("end",V),y.removeListener("error",C),y.removeListener("readable",v)};y.on("end",V),y.on("error",C),y.on("readable",v)}}register(y){this._source.done||this._trackers.add(y)}unregister(y){this._trackers.delete(y)}readAt(y){let v=null;return y{this._source=null,this.source=C}).catch(C=>this.emit("error",C))):y&&(this.source=y)}set source(y){let v=y;if(this._source!==null)throw new Error("The source cannot be changed after it has been set");if(L(v)&&(v=v[Symbol.iterator]()),P(v)){let C=v;v=new e.EventEmitter,v.read=()=>{if(C!==null){let V;for(;!(V=C.next()).done;)if(V.value!==null)return V.value;C=null,this.close()}return null}}else v=O(v);if(this.done){this._destroySource&&oe(v.destroy)&&v.destroy();return}v[t.DESTINATION]=this,v.on("end",U),v.on("error",D),v.on("readable",I),this._source=v,this.readable=v.readable!==!1}read(){if(this._source!==null&&this._source.readable!==!1){const y=this._source.read();if(y!==null)return y;this.readable=!1}return null}_end(y=!1){this._source!==null&&(this._source.removeListener("end",U),this._source.removeListener("error",D),this._source.removeListener("readable",I),delete this._source[t.DESTINATION],this._destroySource&&oe(this._source.destroy)&&this._source.destroy(),this._source=null),super._end(y)}}t.WrappingIterator=Q;function se(g,y){if(y&&("autoStart"in y||"optional"in y||"source"in y||"maxBufferSize"in y))return g&&!J(g)&&(g=new Q(g)),new T(g,y);if(!g)return ie();if(le(g))return new Q(g,y);if(g instanceof c)return g;if(Array.isArray(g))return he(g);if(L(g)||P(g)||J(g))return new Q(g,y);throw new TypeError(`Invalid source: ${g}`)}t.wrap=se;function ie(){return new h}t.empty=ie;function be(g){return new p(g)}t.single=be;function he(g){return new b(g)}t.fromArray=he;function Te(g){return new Q(g)}t.fromIterator=Te;function Ne(g){return new Q(g)}t.fromIterable=Ne;function ye(g){return new X(g)}t.union=ye;function ce(g,y,v){return new _({start:g,end:y,step:v})}t.range=ce;function Re(g,y){return y?g.bind(y):g}function oe(g){return typeof g=="function"}t.isFunction=oe;function J(g){return oe(g==null?void 0:g.on)}t.isEventEmitter=J;function le(g){return oe(g==null?void 0:g.then)}t.isPromise=le;function pe(g){return g&&(J(g)||le(g)||oe(g))}t.isSourceExpression=pe;function L(g){return g&&Symbol.iterator in g}t.isIterable=L;function P(g){return oe(g==null?void 0:g.next)}t.isIterator=P})(Ut);Object.defineProperty(C_,"__esModule",{value:!0});C_.ClosableTransformIterator=void 0;const rW=Ut;class nW extends rW.TransformIterator{constructor(e,r){super(e,r),this.onClose=r.onClose}_end(e){this.onClose(),super._end(e)}}C_.ClosableTransformIterator=nW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Zp,t),r(l0,t),r(D_,t),r(tl,t),r(N_,t),r(C_,t)})(ct);var L_={};Object.defineProperty(L_,"__esModule",{value:!0});L_.MemoryPhysicalQueryPlanLogger=void 0;const Fy=nr;class iW{constructor(){this.children=new Map}logOperation(e,r,n,a,s,o){const u={actor:s,logicalOperator:e,physicalOperator:r,rawNode:n,children:[],metadata:o};if(this.children.set(n,u.children),this.rootNode){if(!a)throw new Error("Detected more than one parent-less node");const c=this.children.get(a);if(!c)throw new Error("Could not find parent node");c.push(u)}else{if(a)throw new Error("No root node has been set yet, while a parent is being referenced");this.rootNode=u}}toJson(){return this.rootNode?this.planNodeToJson(this.rootNode):{}}planNodeToJson(e){return{logical:e.logicalOperator,physical:e.physicalOperator,...this.getLogicalMetadata(e.rawNode),...e.metadata,...e.children.length>0?{children:e.children.map(r=>this.planNodeToJson(r))}:{}}}getLogicalMetadata(e){if("type"in e){const r=e;switch(r.type){case"pattern":return{pattern:this.quadToString(r)};case"project":return{variables:r.variables.map(n=>n.value)}}}return{}}quadToString(e){return`${(0,Fy.termToString)(e.subject)} ${(0,Fy.termToString)(e.predicate)} ${(0,Fy.termToString)(e.object)}${e.graph.termType==="DefaultGraph"?"":` ${(0,Fy.termToString)(e.graph)}`}`}}L_.MemoryPhysicalQueryPlanLogger=iW;Object.defineProperty(w_,"__esModule",{value:!0});w_.QueryEngineBase=void 0;const aW=ct,gn=rr,Hf=et,sW=L_;class vb{constructor(e){this.actorInitQuery=e,this.defaultFunctionArgumentsCache={}}async queryBindings(e,r){return this.queryOfType(e,r,"bindings")}async queryQuads(e,r){return this.queryOfType(e,r,"quads")}async queryBoolean(e,r){return this.queryOfType(e,r,"boolean")}async queryVoid(e,r){return this.queryOfType(e,r,"void")}async queryOfType(e,r,n){const a=await this.query(e,r);if(a.resultType===n)return await a.execute();throw new Error(`Query result type '${n}' was expected, while '${a.resultType}' was found.`)}async query(e,r){const n=await this.queryOrExplain(e,r);if("explain"in n)throw new Error("Tried to explain a query when in query-only mode");return n}async explain(e,r,n){return r.explain=n,await this.queryOrExplain(e,r)}async queryOrExplain(e,r){r=r||{};for(const h in r)this.actorInitQuery.contextKeyShortcuts[h]&&(r[this.actorInitQuery.contextKeyShortcuts[h]]=r[h],delete r[h]);let n=new Hf.ActionContext(r),a={language:"sparql",version:"1.1"};n.has(gn.KeysInitQuery.queryFormat)&&(a=n.get(gn.KeysInitQuery.queryFormat),n=n.delete(gn.KeysInitQuery.queryFormat),a.language==="graphql"&&(n=n.setDefault(gn.KeysInitQuery.graphqlSingularizeVariables,{})));const s=n.get(gn.KeysInitQuery.baseIRI);n=n.setDefault(gn.KeysInitQuery.queryTimestamp,new Date).setDefault(gn.KeysRdfResolveQuadPattern.sourceIds,new Map).setDefault(gn.KeysCore.log,this.actorInitQuery.logger).setDefault(gn.KeysInitQuery.functionArgumentsCache,this.defaultFunctionArgumentsCache).setDefault(gn.KeysRdfResolveQuadPattern.hypermediaSourcesAggregatedStores,new Map),n=(await this.actorInitQuery.mediatorContextPreprocess.mediate({context:n})).context;const o=n.get(gn.KeysInitQuery.explain);let u;if(typeof e=="string"){n=n.set(gn.KeysInitQuery.queryString,e);const h=await this.actorInitQuery.mediatorQueryParse.mediate({context:n,query:e,queryFormat:a,baseIRI:s});u=h.operation,h.baseIRI&&(n=n.set(gn.KeysInitQuery.baseIRI,h.baseIRI))}else u=e;if(o==="parsed")return{explain:!0,type:o,data:u};n.has(gn.KeysInitQuery.initialBindings)&&(u=(0,aW.materializeOperation)(u,n.get(gn.KeysInitQuery.initialBindings)),n=n.delete(gn.KeysInitQuery.queryString));const c=await this.actorInitQuery.mediatorOptimizeQueryOperation.mediate({context:n,operation:u});if(u=c.operation,n=c.context||n,o==="logical")return{explain:!0,type:o,data:u};n=n.set(gn.KeysInitQuery.query,u);let l;o==="physical"&&(l=new sW.MemoryPhysicalQueryPlanLogger,n=n.set(gn.KeysInitQuery.physicalQueryPlanLogger,l));const d=await this.actorInitQuery.mediatorQueryOperation.mediate({context:n,operation:u});d.context=n;const f=vb.internalToFinalResult(d);if(l){switch(f.resultType){case"bindings":await(await f.execute()).toArray();break;case"quads":await(await f.execute()).toArray();break;case"boolean":await f.execute();break;case"void":await f.execute();break}return{explain:!0,type:o,data:l.toJson()}}return f}async getResultMediaTypes(e){return e=Hf.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeCombiner.mediate({context:e,mediaTypes:!0})).mediaTypes}async getResultMediaTypeFormats(e){return e=Hf.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeFormatCombiner.mediate({context:e,mediaTypeFormats:!0})).mediaTypeFormats}async resultToString(e,r,n){if(n=Hf.ActionContext.ensureActionContext(n),!r)switch(e.resultType){case"bindings":r="application/json";break;case"quads":r="application/trig";break;default:r="simple";break}const a={...await vb.finalToInternalResult(e),context:n};return(await this.actorInitQuery.mediatorQueryResultSerialize.mediate({context:n,handle:a,handleMediaType:r})).handle}invalidateHttpCache(e,r){return r=Hf.ActionContext.ensureActionContext(r),this.actorInitQuery.mediatorHttpInvalidate.mediate({url:e,context:r})}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()}}}}w_.QueryEngineBase=vb;(function(t){var e=m&&m.__createBinding||(Object.create?function(a,s,o,u){u===void 0&&(u=o);var c=Object.getOwnPropertyDescriptor(s,o);(!c||("get"in c?!s.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(a,u,c)}:function(a,s,o,u){u===void 0&&(u=o),a[u]=s[o]}),r=m&&m.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&e(s,a,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryEngineBase=void 0,r(Fp,t),r(v_,t);var n=w_;Object.defineProperty(t,"QueryEngineBase",{enumerable:!0,get:function(){return n.QueryEngineBase}})})(UO);var Sj={},B_={};Object.defineProperty(B_,"__esModule",{value:!0});B_.LoggerVoid=void 0;const oW=qO;class uW extends oW.Logger{debug(){}error(){}fatal(){}info(){}trace(){}warn(){}}B_.LoggerVoid=uW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(B_,t)})(Sj);var Tj={},$_={},Ej={},U_={};Object.defineProperty(U_,"__esModule",{value:!0});U_.ActorContextPreprocess=void 0;const cW=et;class lW extends cW.Actor{constructor(e){super(e)}}U_.ActorContextPreprocess=lW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(U_,t)})(Ej);Object.defineProperty($_,"__esModule",{value:!0});$_.ActorContextPreprocessSourceToDestination=void 0;const dW=Ej,Ly=rr;class fW extends dW.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){if(e.context.get(Ly.KeysRdfResolveQuadPattern.sources)&&!e.context.get(Ly.KeysRdfUpdateQuads.destination)){const r=e.context.get(Ly.KeysRdfResolveQuadPattern.sources);if(r.length===1)return{context:e.context.set(Ly.KeysRdfUpdateQuads.destination,r[0])}}return e}}$_.ActorContextPreprocessSourceToDestination=fW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r($_,t)})(Tj);var jA={},q_={};Object.defineProperty(q_,"__esModule",{value:!0});q_.MediatorCombinePipeline=void 0;const hW=et;class pW extends hW.Mediator{constructor(e){super(e)}async mediate(e){let r;try{r=this.publish(e)}catch{return e}if(this.filterErrors){const a=[];for(const s of r)try{await s.reply,a.push(s)}catch{}r=a}if(r=await Promise.all(r.map(async({actor:a,reply:s})=>({actor:a,reply:await s}))),this.order){const a=s=>{const o=this.field?s[this.field]:s;if(typeof o!="number")throw new Error("Cannot order elements that are not numbers.");return o};r=r.sort((s,o)=>(this.order==="increasing"?1:-1)*(a(s.reply)-a(o.reply)))}let n=e;for(const{actor:a}of r)n={...n,...await a.runObservable(n)};return n}mediateWith(){throw new Error("Method not supported.")}}q_.MediatorCombinePipeline=pW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(q_,t)})(jA);var Oj={},V_={},Aj={},H_={};Object.defineProperty(H_,"__esModule",{value:!0});H_.ActorHashBindings=void 0;const yW=et;class bW extends yW.Actor{constructor(e){super(e)}}H_.ActorHashBindings=bW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(H_,t)})(Aj);var _W=function t(e){if(typeof e=="number"&&isNaN(e))throw new Error("NaN is not allowed");if(typeof e=="number"&&!isFinite(e))throw new Error("Infinity is not allowed");return e===null||typeof e!="object"?JSON.stringify(e):e.toJSON instanceof Function?t(e.toJSON()):Array.isArray(e)?`[${e.reduce((a,s,o)=>`${a}${o===0?"":","}${t(s===void 0||typeof s=="symbol"?null:s)}`,"")}]`:`{${Object.keys(e).sort().reduce((n,a)=>{if(e[a]===void 0||typeof e[a]=="symbol")return n;const s=n.length===0?"":",";return`${n}${s}${t(a)}:${t(e[a])}`},"")}}`};Object.defineProperty(V_,"__esModule",{value:!0});V_.ActorHashBindingsSha1=void 0;const gW=Aj,mW=I_,hP=nr,vW=_W;class wW extends gW.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:r=>(0,mW.sha1)().update(vW(Object.fromEntries([...r].map(([n,a])=>[(0,hP.termToString)(n),(0,hP.termToString)(a)])))).digest("hex"),hashCollisions:!0}}}V_.ActorHashBindingsSha1=wW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(V_,t)})(Oj);var Ri={},k_={};Object.defineProperty(k_,"__esModule",{value:!0});k_.MediatorRace=void 0;const SW=et;class TW extends SW.Mediator{constructor(e){super(e)}mediateWith(e,r){return new Promise((n,a)=>{const s=[];for(const o of r)o.reply.then(()=>{n(o.actor)}).catch(u=>{s.push(u),s.length===r.length&&a(new Error(`${this.name} mediated over all rejecting actors: +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Pe=this.next();return Pe||this.lex()},begin:function(Pe){this.conditionStack.push(Pe)},popState:function(){var Pe=this.conditionStack.length-1;return Pe>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(Pe){return Pe=this.conditionStack.length-1-Math.abs(Pe||0),Pe>=0?this.conditionStack[Pe]:"INITIAL"},pushState:function(Pe){this.begin(Pe)},stateStackSize:function(){return this.conditionStack.length},options:{flex:!0,"case-insensitive":!0},performAction:function(Pe,Le,nt,ot){switch(nt){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(Le.yytext);break}},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}}};return xe}();N3.lexer=b$;function Rt(){this.yy={}}return Rt.prototype=N3,N3.Parser=Rt,new Rt}(),Rk=Ak,xk="http://www.w3.org/2001/XMLSchema#integer",Ik="http://www.w3.org/2001/XMLSchema#string";function Ir(t){this._options=t=t||{};var e=t.prefixes||{};this._prefixByIri={};var r=[];for(var n in e){var a=e[n];Kh(a)&&(this._prefixByIri[a]=n,r.push(a))}var s=r.join("|").replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&");this._prefixRegex=new RegExp("^("+s+")([a-zA-Z][\\-_a-zA-Z0-9]*)$"),this._usedPrefixes={},this._sparqlStar=t.sparqlStar,this._indent=Kh(t.indent)?t.indent:" ",this._newline=Kh(t.newline)?t.newline:` +`,this._explicitDatatype=!!t.explicitDatatype}Ir.prototype.toQuery=function(t){var e="";return t.queryType&&(e+=t.queryType.toUpperCase()+" "),t.reduced&&(e+="REDUCED "),t.distinct&&(e+="DISTINCT "),t.variables?e+=Yi(t.variables,void 0,function(r){return Fu(r)?this.toEntity(r):"("+this.toExpression(r.expression)+" AS "+yb(r.variable)+")"},this)+" ":t.template&&(e+=this.group(t.template,!0)+this._newline),t.from&&(e+=this.graphs("FROM ",t.from.default)+this.graphs("FROM NAMED ",t.from.named)),t.where&&(e+="WHERE "+this.group(t.where,!0)+this._newline),t.updates&&(e+=Yi(t.updates,";"+this._newline,this.toUpdate,this)),t.group&&(e+="GROUP BY "+Yi(t.group,void 0,function(r){var n=Fu(r.expression)?this.toEntity(r.expression):"("+this.toExpression(r.expression)+")";return r.variable?"("+n+" AS "+yb(r.variable)+")":n},this)+this._newline),t.having&&(e+="HAVING ("+Yi(t.having,void 0,this.toExpression,this)+")"+this._newline),t.order&&(e+="ORDER BY "+Yi(t.order,void 0,function(r){var n="("+this.toExpression(r.expression)+")";return r.descending?"DESC "+n:n},this)+this._newline),t.offset&&(e+="OFFSET "+t.offset+this._newline),t.limit&&(e+="LIMIT "+t.limit+this._newline),t.values&&(e+=this.values(t)),e=this.baseAndPrefixes(t)+e,e.trim()};Ir.prototype.baseAndPrefixes=function(t){var e=t.base?"BASE <"+t.base+">"+this._newline:"",r="";for(var n in t.prefixes)(this._options.allPrefixes||this._usedPrefixes[n])&&(r+="PREFIX "+n+": <"+t.prefixes[n]+">"+this._newline);return e+r};Ir.prototype.toPattern=function(t){var e=t.type||t instanceof Array&&"array"||(t.subject&&t.predicate&&t.object?"triple":"");if(!(e in this))throw new Error("Unknown entry type: "+e);return this[e](t)};Ir.prototype.triple=function(t){return this.toEntity(t.subject)+" "+this.toEntity(t.predicate)+" "+this.toEntity(t.object)+"."};Ir.prototype.array=function(t){return Yi(t,this._newline,this.toPattern,this)};Ir.prototype.bgp=function(t){return this.encodeTriples(t.triples)};Ir.prototype.encodeTriples=function(t){if(!t.length)return"";for(var e=[],r=void 0,n=void 0,a=0;a":case">=":case"<=":case"&&":case"||":case"=":case"!=":case"+":case"-":case"*":case"/":return(Fu(r[0])?this.toEntity(r[0]):"("+this.toExpression(r[0])+")")+" "+e+" "+(Fu(r[1])?this.toEntity(r[1]):"("+this.toExpression(r[1])+")");case"!":return"!("+this.toExpression(r[0])+")";case"uplus":return"+("+this.toExpression(r[0])+")";case"uminus":return"-("+this.toExpression(r[0])+")";case"notin":e="NOT IN";case"in":return this.toExpression(r[0])+" "+e+"("+(Kh(r[1])?r[1]:Yi(r[1],", ",this.toExpression,this))+")";case"notexists":e="NOT EXISTS";case"exists":return e+" "+this.group(r[0],!0);default:return e+"("+Yi(r,", ",this.toExpression,this)+")"}default:throw new Error("Unknown expression type: "+t.type)}};Ir.prototype.toEntity=function(t){if(Fu(t))switch(t.termType){case"Wildcard":return"*";case"Variable":return yb(t);case"BlankNode":return"_:"+t.value;case"Literal":var e=t.value||"",r=t.language||"",n=t.datatype;if(t='"'+e.replace(PC,DC)+'"',r)t+="@"+r;else if(n){if(!this._explicitDatatype)switch(n.value){case Ik:return t;case xk:if(/^\d+$/.test(e))return e+" "}t+="^^"+this.encodeIRI(n.value)}return t;case"Quad":if(!this._sparqlStar)throw new Error("SPARQL* support is not enabled");return t.graph&&t.graph.termType!=="DefaultGraph"?"<< GRAPH "+this.toEntity(t.graph)+" { "+this.toEntity(t.subject)+" "+this.toEntity(t.predicate)+" "+this.toEntity(t.object)+" } >>":"<< "+this.toEntity(t.subject)+" "+this.toEntity(t.predicate)+" "+this.toEntity(t.object)+" >>";default:return this.encodeIRI(t.value)}else{var a=t.items.map(this.toEntity,this),s=t.pathType;switch(s){case"^":case"!":return s+a[0];case"*":case"+":case"?":return"("+a[0]+s+")";default:return"("+a.join(s)+")"}}};var PC=/["\\\t\n\r\b\f]/g,DC=function(t){return Pk[t]},Pk={"\\":"\\\\",'"':'\\"'," ":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};Ir.prototype.encodeIRI=function(t){var e=this._prefixRegex.exec(t);if(e){var r=this._prefixByIri[e[1]];return this._usedPrefixes[r]=!0,r+":"+e[2]}return"<"+t+">"};Ir.prototype.toUpdate=function(t){switch(t.type||t.updateType){case"load":return"LOAD"+(t.source?" "+this.toEntity(t.source):"")+(t.destination?" INTO GRAPH "+this.toEntity(t.destination):"");case"insert":return"INSERT DATA "+this.group(t.insert,!0);case"delete":return"DELETE DATA "+this.group(t.delete,!0);case"deletewhere":return"DELETE WHERE "+this.group(t.delete,!0);case"insertdelete":return(t.graph?"WITH "+this.toEntity(t.graph)+this._newline:"")+(t.delete.length?"DELETE "+this.group(t.delete,!0)+this._newline:"")+(t.insert.length?"INSERT "+this.group(t.insert,!0)+this._newline:"")+(t.using?this.graphs("USING ",t.using.default):"")+(t.using?this.graphs("USING NAMED ",t.using.named):"")+"WHERE "+this.group(t.where,!0);case"add":case"copy":case"move":return t.type.toUpperCase()+" "+(t.silent?"SILENT ":"")+(t.source.default?"DEFAULT":this.toEntity(t.source.name))+" TO "+this.toEntity(t.destination.name);case"create":case"clear":case"drop":return t.type.toUpperCase()+(t.silent?" SILENT ":" ")+(t.graph.default?"DEFAULT":t.graph.named?"NAMED":t.graph.all?"ALL":"GRAPH "+this.toEntity(t.graph.name));default:throw new Error("Unknown update query type: "+t.type)}};Ir.prototype.indent=function(t){return t.replace(/^/gm,this._indent)};function yb(t){return"?"+t.value}function Kh(t){return typeof t=="string"}function Fu(t){return typeof t.termType=="string"}function Fc(t,e){if(!t||!Fu(t)||!e||!Fu(e)||t.termType!==e.termType)return!1;switch(t.termType){case"Literal":return t.value===e.value&&t.language===e.language&&Fc(t.datatype,e.datatype);case"Quad":return Fc(t.subject,e.subject)&&Fc(t.predicate,e.predicate)&&Fc(t.object,e.object)&&Fc(t.graph,e.graph);default:return t.value===e.value}}function Yi(t,e,r,n){return t.map(r,n).join(Kh(e)?e:" ")}var Dk=function(e={}){return{stringify:function(r){var n=Object.create(e);return n.prefixes=r.prefixes,new Ir(n).toQuery(r)},createGenerator:function(){return new Ir(e)}}},co=Rk.Parser,Nk=Dk,Ck=OA.Wildcard,{DataFactory:jk}=ht,u0={Parser:function({prefixes:t,baseIRI:e,factory:r,sparqlStar:n,skipValidation:a,skipUngroupedVariableCheck:s,pathOnly:o}={}){var u={};for(var c in t||{})u[c]=t[c];var l=new co;return l.parse=function(){return co.base=e||"",co.prefixes=Object.create(u),co.factory=r||new jk,co.sparqlStar=!!n,co.pathOnly=!!o,co.skipValidation=!!a||!!s,co.prototype.parse.apply(l,arguments)},l._resetBlanks=co._resetBlanks,l},Generator:Nk,Wildcard:Ck},Mk=m&&m.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,a)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Fk=m&&m.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),Lk=m&&m.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Mk(e,t,r);return Fk(e,t),e};Object.defineProperty(_f,"__esModule",{value:!0});const tt=Lk(bf),Bk=ht,$k=nr,Uk=u0;class qk{constructor(e){this.dataFactory=e||new Bk.DataFactory,this.stringType=this.createTerm("http://www.w3.org/2001/XMLSchema#string")}createAlt(e,r=!0){return this.flattenMulti({type:tt.types.ALT,input:e},r)}createAsk(e){return{type:tt.types.ASK,input:e}}createBoundAggregate(e,r,n,a,s){const o=this.createAggregateExpression(r,n,a,s);return o.variable=e,o}createBgp(e){return{type:tt.types.BGP,patterns:e}}createConstruct(e,r){return{type:tt.types.CONSTRUCT,input:e,template:r}}createDescribe(e,r){return{type:tt.types.DESCRIBE,input:e,terms:r}}createDistinct(e){return{type:tt.types.DISTINCT,input:e}}createExtend(e,r,n){return{type:tt.types.EXTEND,input:e,variable:r,expression:n}}createFrom(e,r,n){return{type:tt.types.FROM,input:e,default:r,named:n}}createFilter(e,r){return{type:tt.types.FILTER,input:e,expression:r}}createGraph(e,r){return{type:tt.types.GRAPH,input:e,name:r}}createGroup(e,r,n){return{type:tt.types.GROUP,input:e,variables:r,aggregates:n}}createInv(e){return{type:tt.types.INV,path:e}}createJoin(e,r=!0){return this.flattenMulti({type:tt.types.JOIN,input:e},r)}createLeftJoin(e,r,n){return n?{type:tt.types.LEFT_JOIN,input:[e,r],expression:n}:{type:tt.types.LEFT_JOIN,input:[e,r]}}createLink(e){return{type:tt.types.LINK,iri:e}}createMinus(e,r){return{type:tt.types.MINUS,input:[e,r]}}createNop(){return{type:tt.types.NOP}}createNps(e){return{type:tt.types.NPS,iris:e}}createOneOrMorePath(e){return{type:tt.types.ONE_OR_MORE_PATH,path:e}}createOrderBy(e,r){return{type:tt.types.ORDER_BY,input:e,expressions:r}}createPath(e,r,n,a){return a?{type:tt.types.PATH,subject:e,predicate:r,object:n,graph:a}:{type:tt.types.PATH,subject:e,predicate:r,object:n,graph:this.dataFactory.defaultGraph()}}createPattern(e,r,n,a){const s=this.dataFactory.quad(e,r,n,a);return s.type=tt.types.PATTERN,s}createProject(e,r){return{type:tt.types.PROJECT,input:e,variables:r}}createReduced(e){return{type:tt.types.REDUCED,input:e}}createSeq(e,r=!0){return this.flattenMulti({type:tt.types.SEQ,input:e},r)}createService(e,r,n){return{type:tt.types.SERVICE,input:e,name:r,silent:!!n}}createSlice(e,r,n){return r=r||0,n!==void 0?{type:tt.types.SLICE,input:e,start:r,length:n}:{type:tt.types.SLICE,input:e,start:r}}createUnion(e,r=!0){return this.flattenMulti({type:tt.types.UNION,input:e},r)}createValues(e,r){return{type:tt.types.VALUES,variables:e,bindings:r}}createZeroOrMorePath(e){return{type:tt.types.ZERO_OR_MORE_PATH,path:e}}createZeroOrOnePath(e){return{type:tt.types.ZERO_OR_ONE_PATH,path:e}}createAggregateExpression(e,r,n,a){return a?{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.AGGREGATE,aggregator:e,expression:r,separator:a,distinct:n}:{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.AGGREGATE,aggregator:e,expression:r,distinct:n}}createExistenceExpression(e,r){return{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.EXISTENCE,not:e,input:r}}createNamedExpression(e,r){return{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.NAMED,name:e,args:r}}createOperatorExpression(e,r){return{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.OPERATOR,operator:e,args:r}}createTermExpression(e){return{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.TERM,term:e}}createWildcardExpression(){return{type:tt.types.EXPRESSION,expressionType:tt.expressionTypes.WILDCARD,wildcard:new Uk.Wildcard}}createTerm(e){return(0,$k.stringToTerm)(e,this.dataFactory)}createCompositeUpdate(e){return{type:tt.types.COMPOSITE_UPDATE,updates:e}}createDeleteInsert(e,r,n){const a={type:tt.types.DELETE_INSERT};return e&&(a.delete=e),r&&(a.insert=r),n&&(a.where=n),a}createLoad(e,r,n){const a={type:tt.types.LOAD,source:e};return r&&(a.destination=r),this.addSilent(a,!!n)}createClear(e,r){return this.addSilent({type:tt.types.CLEAR,source:e},!!r)}createCreate(e,r){return this.addSilent({type:tt.types.CREATE,source:e},!!r)}createDrop(e,r){return this.addSilent({type:tt.types.DROP,source:e},!!r)}createAdd(e,r,n){return this.addSilent({type:tt.types.ADD,source:e,destination:r},!!n)}createMove(e,r,n){return this.addSilent({type:tt.types.MOVE,source:e,destination:r},!!n)}createCopy(e,r,n){return this.addSilent({type:tt.types.COPY,source:e,destination:r},!!n)}addSilent(e,r){return r&&(e.silent=r),e}flattenMulti(e,r){if(!r)return e;const n=e.type,a=e.input;let s=[];for(const o of a)o.type===n?s.push(...o.input):s.push(o);return e.input=s,e}}_f.default=qk;var c0={},Vk=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(c0,"__esModule",{value:!0});const Ce=bf,KI=Vk(_f),Hk=An;let kk=class fi{static flatten(e){return Array.prototype.concat(...e).filter(r=>r)}static objectify(e){if(e.termType){if(e.termType==="Quad")return{type:"pattern",termType:"Quad",subject:fi.objectify(e.subject),predicate:fi.objectify(e.predicate),object:fi.objectify(e.object),graph:fi.objectify(e.graph)};{let r={termType:e.termType,value:e.value};return e.language&&(r.language=e.language),e.datatype&&(r.datatype=fi.objectify(e.datatype)),r}}if(Array.isArray(e))return e.map(r=>fi.objectify(r));if(e===Object(e)){let r={};for(let n of Object.keys(e))r[n]=fi.objectify(e[n]);return r}return e}static inScopeVariables(e){const r=[];function n(s){r.find(o=>s.value===o.value)||r.push(s)}function a(s){s.subject.termType==="Variable"&&n(s.subject),s.predicate.termType==="Variable"&&n(s.predicate),s.object.termType==="Variable"&&n(s.object),s.graph.termType==="Variable"&&n(s.graph),s.subject.termType==="Quad"&&a(s.subject),s.predicate.termType==="Quad"&&a(s.predicate),s.object.termType==="Quad"&&a(s.object),s.graph.termType==="Quad"&&a(s.graph)}return fi.recurseOperation(e,{[Ce.types.EXPRESSION]:s=>(s.expressionType===Ce.expressionTypes.AGGREGATE&&s.variable&&n(s.variable),!0),[Ce.types.EXTEND]:s=>(n(s.variable),!0),[Ce.types.GRAPH]:s=>(s.name.termType==="Variable"&&n(s.name),!0),[Ce.types.GROUP]:s=>(s.variables.forEach(n),!0),[Ce.types.PATH]:s=>(s.subject.termType==="Variable"&&n(s.subject),s.object.termType==="Variable"&&n(s.object),s.graph.termType==="Variable"&&n(s.graph),s.subject.termType==="Quad"&&a(s.subject),s.object.termType==="Quad"&&a(s.object),s.graph.termType==="Quad"&&a(s.graph),!0),[Ce.types.PATTERN]:s=>(a(s),!0),[Ce.types.PROJECT]:s=>(s.variables.forEach(n),!1),[Ce.types.SERVICE]:s=>(s.name.termType==="Variable"&&n(s.name),!0),[Ce.types.VALUES]:s=>(s.variables.forEach(n),!0)}),r}static recurseOperation(e,r){let n=e,a=!0;const s=r[e.type];if(s&&(a=s(e)),!a)return;let o=u=>fi.recurseOperation(u,r);switch(n.type){case Ce.types.ALT:n.input.map(o);break;case Ce.types.ASK:o(n.input);break;case Ce.types.BGP:n.patterns.forEach(o);break;case Ce.types.CONSTRUCT:o(n.input),n.template.map(o);break;case Ce.types.DESCRIBE:o(n.input);break;case Ce.types.DISTINCT:o(n.input);break;case Ce.types.EXPRESSION:n.expressionType===Ce.expressionTypes.EXISTENCE&&o(n.input);break;case Ce.types.EXTEND:o(n.input),o(n.expression);break;case Ce.types.FILTER:o(n.input),o(n.expression);break;case Ce.types.FROM:o(n.input);break;case Ce.types.GRAPH:o(n.input);break;case Ce.types.GROUP:o(n.input),n.aggregates.forEach(o);break;case Ce.types.INV:o(n.path);break;case Ce.types.JOIN:n.input.map(o);break;case Ce.types.LEFT_JOIN:n.input.map(o),n.expression&&o(n.expression);break;case Ce.types.LINK:break;case Ce.types.MINUS:n.input.map(o);break;case Ce.types.NOP:break;case Ce.types.NPS:break;case Ce.types.ONE_OR_MORE_PATH:o(n.path);break;case Ce.types.ORDER_BY:o(n.input),n.expressions.forEach(o);break;case Ce.types.PATH:o(n.predicate);break;case Ce.types.PATTERN:break;case Ce.types.PROJECT:o(n.input);break;case Ce.types.REDUCED:o(n.input);break;case Ce.types.SEQ:n.input.map(o);break;case Ce.types.SERVICE:o(n.input);break;case Ce.types.SLICE:o(n.input);break;case Ce.types.UNION:n.input.map(o);break;case Ce.types.VALUES:break;case Ce.types.ZERO_OR_MORE_PATH:o(n.path);break;case Ce.types.ZERO_OR_ONE_PATH:o(n.path);break;case Ce.types.COMPOSITE_UPDATE:n.updates.forEach(u=>o(u));break;case Ce.types.DELETE_INSERT:n.delete&&n.delete.forEach(u=>o(u)),n.insert&&n.insert.forEach(u=>o(u)),n.where&&o(n.where);break;case Ce.types.LOAD:break;case Ce.types.CLEAR:break;case Ce.types.CREATE:break;case Ce.types.DROP:break;case Ce.types.ADD:break;case Ce.types.MOVE:break;case Ce.types.COPY:break;default:throw new Error(`Unknown Operation type ${n.type}`)}}static mapOperation(e,r,n){let a=e,s=!0,o=!0;n=n||new KI.default;const u=r[e.type];if(u){const d=u(e,n);a=d.result,s=d.recurse,o=d.copyMetadata!==!1}let c;if(o&&(a.metadata||e.metadata)&&(c={...a.metadata,...e.metadata}),!s)return c&&(a.metadata=c),a;let l=d=>fi.mapOperation(d,r,n);switch(a.type){case Ce.types.ALT:a=n.createAlt(a.input.map(l));break;case Ce.types.ASK:a=n.createAsk(l(a.input));break;case Ce.types.BGP:a=n.createBgp(a.patterns.map(l));break;case Ce.types.CONSTRUCT:a=n.createConstruct(l(a.input),a.template.map(l));break;case Ce.types.DESCRIBE:a=n.createDescribe(l(a.input),a.terms);break;case Ce.types.DISTINCT:a=n.createDistinct(l(a.input));break;case Ce.types.EXPRESSION:a=fi.mapExpression(a,r,n);break;case Ce.types.EXTEND:a=n.createExtend(l(a.input),a.variable,l(a.expression));break;case Ce.types.FILTER:a=n.createFilter(l(a.input),l(a.expression));break;case Ce.types.FROM:a=n.createFrom(l(a.input),[...a.default],[...a.named]);break;case Ce.types.GRAPH:a=n.createGraph(l(a.input),a.name);break;case Ce.types.GROUP:a=n.createGroup(l(a.input),[].concat(a.variables),a.aggregates.map(l));break;case Ce.types.INV:a=n.createInv(l(a.path));break;case Ce.types.JOIN:a=n.createJoin(a.input.map(l));break;case Ce.types.LEFT_JOIN:a=n.createLeftJoin(l(a.input[0]),l(a.input[1]),a.expression?l(a.expression):void 0);break;case Ce.types.LINK:a=n.createLink(a.iri);break;case Ce.types.MINUS:a=n.createMinus(l(a.input[0]),l(a.input[1]));break;case Ce.types.NOP:a=n.createNop();break;case Ce.types.NPS:a=n.createNps([].concat(a.iris));break;case Ce.types.ONE_OR_MORE_PATH:a=n.createOneOrMorePath(l(a.path));break;case Ce.types.ORDER_BY:a=n.createOrderBy(l(a.input),a.expressions.map(l));break;case Ce.types.PATH:a=n.createPath(a.subject,l(a.predicate),a.object,a.graph);break;case Ce.types.PATTERN:a=n.createPattern(a.subject,a.predicate,a.object,a.graph);break;case Ce.types.PROJECT:a=n.createProject(l(a.input),[...a.variables]);break;case Ce.types.REDUCED:a=n.createReduced(l(a.input));break;case Ce.types.SEQ:a=n.createSeq(a.input.map(l));break;case Ce.types.SERVICE:a=n.createService(l(a.input),a.name,a.silent);break;case Ce.types.SLICE:a=n.createSlice(l(a.input),a.start,a.length);break;case Ce.types.UNION:a=n.createUnion(a.input.map(l));break;case Ce.types.VALUES:a=n.createValues([].concat(a.variables),a.bindings.map(d=>Object.assign({},d)));break;case Ce.types.ZERO_OR_MORE_PATH:a=n.createZeroOrMorePath(l(a.path));break;case Ce.types.ZERO_OR_ONE_PATH:a=n.createZeroOrOnePath(l(a.path));break;case Ce.types.COMPOSITE_UPDATE:a=n.createCompositeUpdate(a.updates.map(l));break;case Ce.types.DELETE_INSERT:a=n.createDeleteInsert(a.delete?a.delete.map(l):void 0,a.insert?a.insert.map(l):void 0,a.where?l(a.where):void 0);break;case Ce.types.LOAD:a=n.createLoad(a.source,a.destination,a.silent);break;case Ce.types.CLEAR:a=n.createClear(a.source,a.silent);break;case Ce.types.CREATE:a=n.createCreate(a.source,a.silent);break;case Ce.types.DROP:a=n.createDrop(a.source,a.silent);break;case Ce.types.ADD:a=n.createAdd(a.source,a.destination);break;case Ce.types.MOVE:a=n.createMove(a.source,a.destination);break;case Ce.types.COPY:a=n.createCopy(a.source,a.destination);break;default:throw new Error(`Unknown Operation type ${a.type}`)}return c&&(a.metadata=c),a}static mapExpression(e,r,n){let a=e,s=!0;n=n||new KI.default;const o=r[e.expressionType];if(o&&({result:a,recurse:s}=o(e,n)),!s)return a;let u=c=>fi.mapOperation(c,r,n);switch(e.expressionType){case Ce.expressionTypes.AGGREGATE:return e.variable?n.createBoundAggregate(e.variable,e.aggregator,u(e.expression),e.distinct,e.separator):n.createAggregateExpression(e.aggregator,u(e.expression),e.distinct,e.separator);case Ce.expressionTypes.EXISTENCE:return n.createExistenceExpression(e.not,u(e.input));case Ce.expressionTypes.NAMED:return n.createNamedExpression(e.name,e.args.map(u));case Ce.expressionTypes.OPERATOR:return n.createOperatorExpression(e.operator,e.args.map(u));case Ce.expressionTypes.TERM:return n.createTermExpression(e.term);case Ce.expressionTypes.WILDCARD:return n.createWildcardExpression();default:throw new Error(`Unknown Expression type ${e.expressionType}`)}}static cloneOperation(e){return fi.mapOperation(e,{})}static cloneExpression(e){return fi.mapExpression(e,{})}static createUniqueVariable(e,r,n){let a=0,s=e;for(;r[s];)s=`${e}${a++}`;return n.variable(s)}static isSimpleTerm(e){return e.termType!==void 0&&e.termType!=="Quad"&&e.termType!=="Wildcard"}static isQuad(e){return e.termType==="Quad"}static hasQuadVariables(e){return(0,Hk.someTermsNested)(e,r=>r.termType==="Variable")}static isWildcard(e){return e.termType==="Wildcard"}};c0.default=kk;var Qk=m&&m.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,a)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),Gk=m&&m.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),zk=m&&m.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&Qk(e,t,r);return Gk(e,t),e},NC=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(EA,"__esModule",{value:!0});const Wk=Ek,Xk=nr,Bh=zk(bf),Kk=NC(_f),Si=NC(c0),Jk=u0.Parser,vi=Bh.types;let Ud=new Set,CC=0,x_=!1,Qe;function Yk(t,e){e=e||{},Qe=new Kk.default(e.dataFactory);let r;if(Zk(t)){let n=new Jk(e);n._resetBlanks(),r=n.parse(t)}else r=t;return jC(r,e.quads,e.blankToVariable)}EA.default=Yk;function jC(t,e,r){if(Ud=new Set,CC=0,x_=!!e,!t.type)return Qe.createNop();if(t.type!=="query"&&t.type!=="update")throw new Error("Translate only works on complete query or update objects.");let n;if(SE(t),t.type==="query"){const a={type:"group",patterns:t.where||[]};n=Io(a),n=sQ(t,n)}else t.type==="update"&&(n=uQ(t));return r&&(n=LC(n)),n}function Zk(t){return typeof t=="string"}function MC(t){return!!(t!=null&&t.termType)}function eQ(t){return t.subject&&t.predicate&&t.object}function _p(t){return(t==null?void 0:t.termType)==="Variable"}function SE(t){if(MC(t))_p(t)&&Ud.add(`?${t.value}`);else if(Array.isArray(t))for(const e of t)SE(e);else if(t&&typeof t=="object")for(let e of Object.keys(t))e.startsWith("?")&&Ud.add(e),SE(t[e])}function Cn(t){let e={};if(eQ(t)){const r=[Cn(t.subject),Cn(t.predicate),Cn(t.object),t.graph?Cn(t.graph):{}];Object.assign(e,...r)}else if(MC(t))_p(t)&&(e[t.value]=t);else if(t.type==="bgp"){const r=t.triples;Object.assign(e,...r.map(Cn))}else if(t.type==="path")Object.assign(e,...t.items.map(Cn));else if(t.type==="group"||t.type==="union"||t.type==="optional")Object.assign(e,...t.patterns.map(Cn));else if(t.type==="service"||t.type==="graph")Object.assign(e,Cn(t.name)),Object.assign(e,...t.patterns.map(Cn));else if(t.type==="bind")Object.assign(e,Cn(t.variable));else if(t.type==="values"){if(t.values.length>0){const r=Object.keys(t.values[0]).map(n=>Qe.createTerm(n));Object.assign(e,...r.map(Cn))}}else if(t.type==="query"&&(t.queryType==="SELECT"||t.queryType==="DESCRIBE")){t.where&&t.variables.some(Si.default.isWildcard)&&Object.assign(e,...t.where.map(Cn));for(const r of t.variables)_p(r)?Object.assign(e,Cn(r)):r.variable&&Object.assign(e,Cn(r.variable));if(t.queryType==="SELECT"){if(t.group)for(const r of t.group)r.variable&&Object.assign(e,Cn(r.variable));if(t.values){const r={type:"values",values:t.values};Object.assign(e,Cn(r))}}}return e}function Io(t){let e=[],r=[];if("patterns"in t)for(let a of t.patterns)(a.type==="filter"?e:r).push(a);if(t.type==="bgp")return tQ(t);let n;if(t.type==="union")n=Qe.createUnion(r.map(a=>(a.type!=="group"&&(a={type:"group",patterns:[a]}),Io(a))));else{if(t.type==="graph")return nQ(t);if(t.type==="group")n=r.reduce(aQ,Qe.createBgp([]));else if(t.type==="values")n=FC(t);else if(t.type==="query")n=jC(t,x_,!1);else throw new Error(`Unexpected type: ${t.type}`)}if(e.length>0){let a=e.map(s=>Ki(s.expression));a.length>0&&(n=Qe.createFilter(n,a.reduce((s,o)=>Qe.createOperatorExpression("&&",[s,o]))))}return n}function Ki(t){if(Si.default.isSimpleTerm(t))return Qe.createTermExpression(t);if(Si.default.isQuad(t))return Si.default.hasQuadVariables(t)?Qe.createOperatorExpression("triple",[Ki(t.subject),Ki(t.predicate),Ki(t.object)]):Qe.createTermExpression(t);if(Si.default.isWildcard(t))return Qe.createWildcardExpression();if("aggregation"in t)return Qe.createAggregateExpression(t.aggregation,Ki(t.expression),!!t.distinct,t.separator);if("function"in t)return Qe.createNamedExpression(t.function,t.args.map(Ki));if("operator"in t)return t.operator==="exists"||t.operator==="notexists"?Qe.createExistenceExpression(t.operator==="notexists",Io(t.args[0])):((t.operator==="in"||t.operator==="notin")&&(t.args=[t.args[0]].concat(t.args[1])),Qe.createOperatorExpression(t.operator,t.args.map(Ki)));throw new Error(`Unknown expression: ${JSON.stringify(t)}`)}function tQ(t){let e=[],r=[];for(let n of t.triples)if("pathType"in n.predicate){let a=rQ(n);for(let s of a)s.type===vi.PATH?(e.length>0&&r.push(Qe.createBgp(e)),e=[],r.push(s)):e.push(s)}else e.push(AA(n));return e.length>0&&r.push(Qe.createBgp(e)),r.length===1?r[0]:Qe.createJoin(r)}function rQ(t){let e=t.subject,r=xc(t.predicate),n=t.object;return TE(e,r,n)}function xc(t){if(Si.default.isSimpleTerm(t)){if(t.termType==="NamedNode")return Qe.createLink(t);throw new Error(`Path predicate should be a NamedNode, got ${JSON.stringify(t)}`)}if(t.pathType==="^")return Qe.createInv(xc(t.items[0]));if(t.pathType==="!"){let e=[],r=[],n;"pathType"in t.items[0]&&t.items[0].pathType==="|"?n=t.items[0].items:n=t.items;for(let o of n)if(Si.default.isSimpleTerm(o))e.push(o);else if(o.pathType==="^")r.push(o.items[0]);else throw new Error(`Unexpected item: ${JSON.stringify(o)}`);let a=Qe.createNps(e),s=Qe.createInv(Qe.createNps(r));return r.length===0?a:e.length===0?s:Qe.createAlt([a,s])}if(t.pathType==="/")return Qe.createSeq(t.items.map(xc));if(t.pathType==="|")return Qe.createAlt(t.items.map(xc));if(t.pathType==="*")return Qe.createZeroOrMorePath(xc(t.items[0]));if(t.pathType==="+")return Qe.createOneOrMorePath(xc(t.items[0]));if(t.pathType==="?")return Qe.createZeroOrOnePath(xc(t.items[0]));throw new Error(`Unable to translate path expression ${JSON.stringify(t)}`)}function TE(t,e,r){if(e.type===vi.LINK)return[Qe.createPattern(t,e.iri,r)];if(e.type===vi.INV)return TE(r,e.path,t);if(e.type===vi.SEQ){let n=t;return Si.default.flatten(e.input.map((a,s)=>{const o=s===e.input.length-1?r:qd(),u=TE(n,a,o);return o.termType==="Variable"&&(n=o),u}))}return[Qe.createPath(t,e,r)]}function qd(){let t=`?var${CC++}`;return Ud.has(t)?qd():(Ud.add(t),Qe.createTerm(t))}function AA(t){if("pathType"in t.predicate)throw new Error("Trying to translate property path to quad.");return Qe.createPattern(t.subject,t.predicate,t.object,t.graph)}function nQ(t){const e={type:"group",patterns:t.patterns};let r=Io(e);return x_?r=Lc(r,t.name):r=Qe.createGraph(r,t.name),r}let iQ=Object.values(vi);function Lc(t,e,r){if(t.type===vi.GRAPH){if(r)throw new Error("Recursing through nested GRAPH statements with a replacement is impossible.");t=Lc(t.input,t.name)}else if(t.type===vi.BGP)t.patterns=t.patterns.map(n=>(r&&(n.subject.equals(e)&&(n.subject=r),n.predicate.equals(e)&&(n.predicate=r),n.object.equals(e)&&(n.object=r)),n.graph.termType==="DefaultGraph"&&(n.graph=e),n));else if(t.type===vi.PATH)r&&(t.subject.equals(e)&&(t.subject=r),t.object.equals(e)&&(t.object=r)),t.graph.termType==="DefaultGraph"&&(t.graph=e);else if(t.type===vi.PROJECT&&!r)t.variables.some(n=>n.equals(e))||(r=qd()),t.input=Lc(t.input,e,r);else if(t.type===vi.EXTEND&&!r)t.variable.equals(e)&&(r=qd()),t.input=Lc(t.input,e,r);else for(let n of Object.keys(t))Array.isArray(t[n])?t[n]=t[n].map(a=>Lc(a,e,r)):iQ.indexOf(t[n].type)>=0?t[n]=Lc(t[n],e,r):r&&_p(t[n])&&t[n].equals(e)&&(t[n]=r);return t}function aQ(t,e){if(e.type==="optional"){const r=Io({type:"group",patterns:e.patterns});r.type===vi.FILTER?t=Qe.createLeftJoin(t,r.input,r.expression):t=Qe.createLeftJoin(t,r)}else if(e.type==="minus"){const r=Io({type:"group",patterns:e.patterns});t=Qe.createMinus(t,r)}else if(e.type==="bind")t=Qe.createExtend(t,e.variable,Ki(e.expression));else if(e.type==="service"){const r={type:"group",patterns:e.patterns},n=Qe.createService(Io(r),e.name,e.silent);t=JI(t,n)}else{const r=Io(e);t=JI(t,r)}return t}function JI(t,e){return t.type===vi.BGP&&e.type===vi.BGP?t=Qe.createBgp([...t.patterns,...e.patterns]):t.type===vi.BGP&&t.patterns.length===0?t=e:e.type===vi.BGP&&e.patterns.length===0||(t=Qe.createJoin([t,e])),t}function FC(t){let e=(t.values.length===0?[]:Object.keys(t.values[0])).map(Qe.createTerm.bind(Qe)),r=t.values.map(n=>{let a=Object.keys(n);a=a.filter(o=>n[o]!==void 0);let s={};for(let o of a)s[o]=n[o];return s});return Qe.createValues(e,r)}function sQ(t,e){const r=t,n=[],a={};if(r.variables=r.variables&&r.variables.map(o=>Jh(o,a)),r.having=r.having&&r.having.map(o=>Jh(o,a)),r.order=r.order&&r.order.map(o=>Jh(o,a)),r.group||Object.keys(a).length>0){const o=Object.keys(a).map(c=>oQ(a[c],Qe.createTerm(c))),u=[];if(r.group)for(const c of r.group)if(Si.default.isSimpleTerm(c.expression))u.push(c.expression);else{const l="variable"in c?c.variable:qd();e=Qe.createExtend(e,l,Ki(c.expression)),u.push(l)}e=Qe.createGroup(e,u,o)}if(r.having)for(let o of r.having)e=Qe.createFilter(e,Ki(o));t.values&&(e=Qe.createJoin([e,FC(t)]));let s=[];if(t.queryType==="SELECT"||t.queryType==="DESCRIBE")if(t.variables.some(o=>o&&Si.default.isWildcard(o)))s=Object.values(Cn(t)).sort((o,u)=>o.value.localeCompare(u.value));else for(let o of t.variables)_p(o)||!("variable"in o)?s.push(o):o.variable&&(s.push(o.variable),n.push(o));for(let o of n)e=Qe.createExtend(e,o.variable,Ki(o.expression));return r.order&&(e=Qe.createOrderBy(e,r.order.map(o=>{let u=Ki(o.expression);return o.descending&&(u=Qe.createOperatorExpression("desc",[u])),u}))),t.queryType==="SELECT"&&(e=Qe.createProject(e,s)),r.distinct&&(e=Qe.createDistinct(e)),r.reduced&&(e=Qe.createReduced(e)),t.queryType==="CONSTRUCT"?e=Qe.createConstruct(e,(t.template||[]).map(AA)):t.queryType==="ASK"?e=Qe.createAsk(e):t.queryType==="DESCRIBE"&&(e=Qe.createDescribe(e,s)),(r.offset||r.limit)&&(e=Qe.createSlice(e,r.offset||0,r.limit)),r.from&&(e=Qe.createFrom(e,r.from.default,r.from.named)),e}function Jh(t,e){if("type"in t&&t.type==="aggregate"){let r=!1,n;for(let a of Object.keys(e))if(Wk(e[a],t)){n=Qe.createTerm(a),r=!0;break}return r||(n=qd(),e[(0,Xk.termToString)(n)]=t),n}return"expression"in t&&t.expression?{...t,expression:Jh(t.expression,e)}:"args"in t&&t.args?{...t,args:t.args.map(r=>Jh(r,e))}:t}function oQ(t,e){if(t.type!=="aggregate"||!t.aggregation)throw new Error(`Unexpected input: ${JSON.stringify(t)}`);const r=Ki(t);return r.variable=e,r}function uQ(t){return t.updates.length===1?YI(t.updates[0]):Qe.createCompositeUpdate(t.updates.map(YI))}function YI(t){if("type"in t){if(t.type==="load")return dQ(t);if(t.type==="clear"||t.type==="create"||t.type==="drop")return lQ(t);if(t.type==="add"||t.type==="copy"||t.type==="move")return fQ(t)}else if(t.updateType==="insertdelete"||t.updateType==="deletewhere"||t.updateType==="delete"||t.updateType==="insert")return cQ(t);throw new Error(`Unknown update type ${JSON.stringify(t)}`)}function cQ(t){if(!x_)throw new Error("INSERT/DELETE operations are only supported with quads option enabled");let e=[],r=[],n;if(t.delete&&(e=Si.default.flatten(t.delete.map(a=>ZI(a,t.graph)))),t.insert&&(r=Si.default.flatten(t.insert.map(a=>ZI(a,t.graph)))),t.where&&t.where.length>0){n=Io({type:"group",patterns:t.where});const a=t.using;a?n=Qe.createFrom(n,a.default,a.named):t.graph&&(n=Lc(n,t.graph))}else t.updateType==="deletewhere"&&e.length>0&&(n=Qe.createBgp(e));return Qe.createDeleteInsert(e.length>0?e:void 0,r.length>0?r:void 0,n)}function ZI(t,e){let r=e;t.type==="graph"&&(r=t.name);let n=t.triples;return r&&(n=n.map(a=>Object.assign(a,{graph:r}))),n.map(AA)}function lQ(t){let e;switch(Si.default.isSimpleTerm(t.graph)?e=t.graph:t.graph.all?e="ALL":t.graph.default?e="DEFAULT":t.graph.named?e="NAMED":e=t.graph.name,t.type){case"clear":return Qe.createClear(e,t.silent);case"create":return Qe.createCreate(e,t.silent);case"drop":return Qe.createDrop(e,t.silent)}}function dQ(t){return Qe.createLoad(t.source,t.destination,t.silent)}function fQ(t){const e=t.source.default?"DEFAULT":t.source.name,r=t.destination.default?"DEFAULT":t.destination.name;switch(t.type){case"copy":return Qe.createCopy(e,r,t.silent);case"move":return Qe.createMove(e,r,t.silent);case"add":return Qe.createAdd(e,r,t.silent)}}function LC(t){const e={},r=Array.from(Ud).reduce((a,s)=>(a[s]=!0,a),{});return Si.default.mapOperation(t,{[Bh.types.DELETE_INSERT]:a=>({result:a,recurse:!1}),[Bh.types.PATH]:(a,s)=>({result:s.createPath(n(a.subject),a.predicate,n(a.object),n(a.graph)),recurse:!1}),[Bh.types.PATTERN]:(a,s)=>({result:s.createPattern(n(a.subject),n(a.predicate),n(a.object),n(a.graph)),recurse:!1}),[Bh.types.CONSTRUCT]:a=>({result:Qe.createConstruct(LC(a.input),a.template),recurse:!1})});function n(a){if(a.termType==="BlankNode"){let s=e[a.value];return s||(s=Si.default.createUniqueVariable(a.value,r,Qe.dataFactory),r[s.value]=!0,e[a.value]=s),s}return a}}var Vd={},BC={},Mt={},I_={},Lt={},l0=$C;function $C(t,e){if(!t)throw new Error(e||"Assertion failed")}$C.equal=function(e,r,n){if(e!=r)throw new Error(n||"Assertion failed: "+e+" != "+r)};var EE={exports:{}};typeof Object.create=="function"?EE.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:EE.exports=function(e,r){if(r){e.super_=r;var n=function(){};n.prototype=r.prototype,e.prototype=new n,e.prototype.constructor=e}};var gf=EE.exports,hQ=l0,pQ=gf;Lt.inherits=pQ;function yQ(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function bQ(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),a=0;a>6|192,r[n++]=s&63|128):yQ(t,a)?(s=65536+((s&1023)<<10)+(t.charCodeAt(++a)&1023),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=s&63|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=s&63|128)}else for(a=0;a>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Lt.htonl=UC;function gQ(t,e){for(var r="",n=0;n>>0}return s}Lt.join32=mQ;function vQ(t,e){for(var r=new Array(t.length*4),n=0,a=0;n>>24,r[a+1]=s>>>16&255,r[a+2]=s>>>8&255,r[a+3]=s&255):(r[a+3]=s>>>24,r[a+2]=s>>>16&255,r[a+1]=s>>>8&255,r[a]=s&255)}return r}Lt.split32=vQ;function wQ(t,e){return t>>>e|t<<32-e}Lt.rotr32=wQ;function SQ(t,e){return t<>>32-e}Lt.rotl32=SQ;function TQ(t,e){return t+e>>>0}Lt.sum32=TQ;function EQ(t,e,r){return t+e+r>>>0}Lt.sum32_3=EQ;function OQ(t,e,r,n){return t+e+r+n>>>0}Lt.sum32_4=OQ;function AQ(t,e,r,n,a){return t+e+r+n+a>>>0}Lt.sum32_5=AQ;function RQ(t,e,r,n){var a=t[e],s=t[e+1],o=n+s>>>0,u=(o>>0,t[e+1]=o}Lt.sum64=RQ;function xQ(t,e,r,n){var a=e+n>>>0,s=(a>>0}Lt.sum64_hi=xQ;function IQ(t,e,r,n){var a=e+n;return a>>>0}Lt.sum64_lo=IQ;function PQ(t,e,r,n,a,s,o,u){var c=0,l=e;l=l+n>>>0,c+=l>>0,c+=l>>0,c+=l>>0}Lt.sum64_4_hi=PQ;function DQ(t,e,r,n,a,s,o,u){var c=e+n+s+u;return c>>>0}Lt.sum64_4_lo=DQ;function NQ(t,e,r,n,a,s,o,u,c,l){var d=0,f=e;f=f+n>>>0,d+=f>>0,d+=f>>0,d+=f>>0,d+=f>>0}Lt.sum64_5_hi=NQ;function CQ(t,e,r,n,a,s,o,u,c,l){var d=e+n+s+u+l;return d>>>0}Lt.sum64_5_lo=CQ;function jQ(t,e,r){var n=e<<32-r|t>>>r;return n>>>0}Lt.rotr64_hi=jQ;function MQ(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Lt.rotr64_lo=MQ;function FQ(t,e,r){return t>>>r}Lt.shr64_hi=FQ;function LQ(t,e,r){var n=t<<32-r|e>>>r;return n>>>0}Lt.shr64_lo=LQ;var mf={},eP=Lt,BQ=l0;function P_(){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}mf.BlockHash=P_;P_.prototype.update=function(e,r){if(e=eP.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),this.pending.length===0&&(this.pending=null),e=eP.join32(e,0,e.length-n,this.endian);for(var a=0;a>>24&255,a[s++]=e>>>16&255,a[s++]=e>>>8&255,a[s++]=e&255}else for(a[s++]=e&255,a[s++]=e>>>8&255,a[s++]=e>>>16&255,a[s++]=e>>>24&255,a[s++]=0,a[s++]=0,a[s++]=0,a[s++]=0,o=8;o>>3}Ks.g0_256=HQ;function kQ(t){return Cs(t,17)^Cs(t,19)^t>>>10}Ks.g1_256=kQ;var Hd=Lt,QQ=mf,GQ=Ks,uS=Hd.rotl32,qf=Hd.sum32,zQ=Hd.sum32_5,WQ=GQ.ft_1,GC=QQ.BlockHash,XQ=[1518500249,1859775393,2400959708,3395469782];function Hs(){if(!(this instanceof Hs))return new Hs;GC.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Hd.inherits(Hs,GC);var KQ=Hs;Hs.blockSize=512;Hs.outSize=160;Hs.hmacStrength=80;Hs.padLength=64;Hs.prototype._update=function(e,r){for(var n=this.W,a=0;a<16;a++)n[a]=e[r+a];for(;athis.blockSize&&(e=new this.Hash().update(e).digest()),LG(e.length<=this.blockSize);for(var r=e.length;rFs.someTerms(e,r=>r.termType==="BlankNode"||r.termType==="Quad"&&Fs.getTermsNested(r).some(n=>n.termType==="BlankNode")))}Mt.getQuadsWithBlankNodes=RE;function xE(t){return t.filter(e=>Fs.everyTerms(e,r=>r.termType!=="BlankNode"&&!(r.termType==="Quad"&&Fs.getTermsNested(r).some(n=>n.termType==="BlankNode"))))}Mt.getQuadsWithoutBlankNodes=xE;function bb(t){const e={};for(const r of t)e[JSON.stringify(es.quadToStringQuad(r))]=!0;return e}Mt.indexGraph=bb;function sj(t){return Object.keys(t).map(e=>es.stringQuadToQuad(JSON.parse(e)))}Mt.deindexGraph=sj;function IE(t){return sj(bb(t))}Mt.uniqGraph=IE;function PE(t){return Fs.uniqTerms(t.map(e=>Fs.getBlankNodes(Fs.getTermsNested(e))).reduce((e,r)=>e.concat(r),[]))}Mt.getGraphBlankNodes=PE;function DE(t,e,r){const n=Object.assign({},r),a={};let s=!0;for(;s;){const o=Object.keys(n).length;for(const c of e){const l=es.termToString(c);if(!n[l]){const[d,f]=oj(c,t,n);d&&(n[l]=f),a[l]=f}}const u={};for(const c in a){const l=a[c];u[l]===void 0?u[l]=c:u[l]=!1}for(const c in u){const l=u[c];l&&(n[l]=c)}s=o!==Object.keys(n).length}return[n,a]}Mt.hashTerms=DE;function oj(t,e,r){const n=[];let a=!0;for(const o of e){const u=Fs.getTermsNested(o);if(u.some(c=>c.equals(t))){n.push(IA(o,r,t));for(const c of u)!PA(c,r)&&!c.equals(t)&&(a=!1)}}const s=xA(n.sort().join(""));return[a,s]}Mt.hashTerm=oj;function xA(t){return $G.sha1().update(t).digest("hex")}Mt.sha1hex=xA;function IA(t,e,r){return Fs.getTerms(t).map(n=>uj(n,e,r)).join("|")}Mt.quadToSignature=IA;function uj(t,e,r){return t.equals(r)?"@self":t.termType==="BlankNode"?e[es.termToString(t)]||"@blank":t.termType==="Quad"?`<${IA(t,e,r)}>`:es.termToString(t)}Mt.termToSignature=uj;function PA(t,e){return t.termType!=="BlankNode"&&!(t.termType==="Quad"&&Fs.getTermsNested(t).some(r=>!PA(r,e)))||!!e[es.termToString(t)]}Mt.isTermGrounded=PA;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Mt,t)})(BC);var qG=m&&m.__createBinding||(Object.create?function(t,e,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(e,r);(!a||("get"in a?!e.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,n,a)}:function(t,e,r,n){n===void 0&&(n=r),t[n]=e[r]}),VG=m&&m.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),HG=m&&m.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.prototype.hasOwnProperty.call(t,r)&&qG(e,t,r);return VG(e,t),e},cj=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Vd,"__esModule",{value:!0});Vd.toSparqlJs=Vd.toSparql=void 0;const kG=BC,QG=nr,lj=u0,dj=HG(bf),GG=cj(_f),Oi=cj(c0),rt=dj.types,Ul=dj.expressionTypes;let qr;const _b=new GG.default;function zG(t,e={}){return new lj.Generator(e).stringify(fj(t))}Vd.toSparql=zG;function fj(t){hj(),t=Fz(t);let e=Lr(t);return e.type==="group"?e.patterns[0]:e}Vd.toSparqlJs=fj;function hj(){qr={project:!1,extend:[],group:[],aggregates:[],order:[]}}function Lr(t){switch(t.type!==rt.EXTEND&&t.type!==rt.ORDER_BY&&t.type!==rt.GRAPH&&(qr.project=!1),t.type){case rt.EXPRESSION:return Gs(t);case rt.ASK:return dS(t,rt.ASK);case rt.BGP:return tz(t);case rt.CONSTRUCT:return rz(t);case rt.DESCRIBE:return dS(t,rt.DESCRIBE);case rt.DISTINCT:return nz(t);case rt.EXTEND:return iz(t);case rt.FROM:return az(t);case rt.FILTER:return sz(t);case rt.GRAPH:return oz(t);case rt.GROUP:return uz(t);case rt.JOIN:return cz(t);case rt.LEFT_JOIN:return lz(t);case rt.MINUS:return dz(t);case rt.NOP:return{};case rt.ORDER_BY:return fz(t);case rt.PATH:return hz(t);case rt.PATTERN:return gp(t);case rt.PROJECT:return dS(t,rt.PROJECT);case rt.REDUCED:return pz(t);case rt.SERVICE:return yz(t);case rt.SLICE:return bz(t);case rt.UNION:return _z(t);case rt.VALUES:return gz(t);case rt.COMPOSITE_UPDATE:return Rz(t);case rt.DELETE_INSERT:return xz(t);case rt.LOAD:return Iz(t);case rt.CLEAR:return Pz(t);case rt.CREATE:return Dz(t);case rt.DROP:return Nz(t);case rt.ADD:return Cz(t);case rt.MOVE:return jz(t);case rt.COPY:return Mz(t)}throw new Error(`Unknown Operation type ${t.type}`)}function Gs(t){switch(t.expressionType){case Ul.AGGREGATE:return WG(t);case Ul.EXISTENCE:return XG(t);case Ul.NAMED:return KG(t);case Ul.OPERATOR:return JG(t);case Ul.TERM:return YG(t);case Ul.WILDCARD:return ZG(t)}throw new Error(`Unknown Expression Operation type ${t.expressionType}`)}function hl(t){switch(t.type){case rt.ALT:return mz(t);case rt.INV:return vz(t);case rt.LINK:return wz(t);case rt.NPS:return Sz(t);case rt.ONE_OR_MORE_PATH:return Tz(t);case rt.SEQ:return Ez(t);case rt.ZERO_OR_MORE_PATH:return Oz(t);case rt.ZERO_OR_ONE_PATH:return Az(t)}throw new Error(`Unknown Path type ${t.type}`)}function ud(t){return(0,QG.termToString)(t)}function WG(t){const e={expression:Gs(t.expression),type:"aggregate",aggregation:t.aggregator,distinct:t.distinct};return t.separator&&(e.separator=t.separator),e}function XG(t){return{type:"operation",operator:t.not?"notexists":"exists",args:Oi.default.flatten([Lr(t.input)])}}function KG(t){return{type:"functionCall",function:t.name,args:t.args.map(Gs)}}function JG(t){if(t.operator==="desc"){const r={expression:Gs(t.args[0])};return r.descending=!0,r}const e={type:"operation",operator:t.operator,args:t.args.map(Gs)};return(e.operator==="in"||e.operator==="notin")&&(e.args=[e.args[0]].concat([e.args.slice(1)])),e}function YG(t){return t.term}function ZG(t){return t.wildcard}function ez(t){return t}function tz(t){let e=t.patterns.map(gp);return e.length===0?null:{type:"bgp",triples:e}}function rz(t){return{type:"query",prefixes:{},queryType:"CONSTRUCT",template:t.template.map(gp),where:Oi.default.flatten([Lr(t.input)])}}function nz(t){let e=Lr(t.input);return e.patterns[0].distinct=!0,e}function iz(t){return qr.project?(qr.extend.push(t),Lr(t.input)):Oi.default.flatten([Lr(t.input),{type:"bind",variable:t.variable,expression:Gs(t.expression)}])}function az(t){const e=Lr(t.input),r=e.patterns[0];return r.from={default:t.default,named:t.named},e}function sz(t){return{type:"group",patterns:Oi.default.flatten([Lr(t.input),{type:"filter",expression:Gs(t.expression)}])}}function oz(t){return{type:"graph",patterns:Oi.default.flatten([Lr(t.input)]),name:t.name}}function uz(t){const e=Lr(t.input),r=t.aggregates.map(ez);return qr.aggregates.push(...r),qr.group.push(...t.variables),e}function cz(t){return Oi.default.flatten(t.input.map(Lr)).reduce((r,n)=>(n.type!=="bgp"||r.length==0||r[r.length-1].type!=="bgp"?r.push(n):r[r.length-1].triples.push(...n.triples),r),[])}function lz(t){const e={type:"optional",patterns:[Lr(t.input[1])]};return t.expression&&e.patterns.push({type:"filter",expression:Gs(t.expression)}),e.patterns=Oi.default.flatten(e.patterns),Oi.default.flatten([Lr(t.input[0]),e])}function dz(t){let e=Lr(t.input[1]);return e.type==="group"&&(e=e.patterns),Array.isArray(e)||(e=[e]),Oi.default.flatten([Lr(t.input[0]),{type:"minus",patterns:e}])}function fz(t){return qr.order.push(...t.expressions),Lr(t.input)}function hz(t){return{type:"bgp",triples:[{subject:t.subject,predicate:hl(t.predicate),object:t.object}]}}function gp(t){return{subject:t.subject,predicate:t.predicate,object:t.object}}function gb(t,e){let r=Oi.default.isSimpleTerm(t)?ud(t):t;if(typeof r=="string"){if(e[r])return e[r]}else if(Array.isArray(t))t=t.map(n=>gb(n,e));else for(let n of Object.keys(t))t[n]=gb(t[n],e);return t}function dS(t,e){const r={type:"query",prefixes:{}},n=r;let a;e===rt.PROJECT?(r.queryType="SELECT",a=t.variables):e===rt.ASK?r.queryType="ASK":e===rt.DESCRIBE&&(r.queryType="DESCRIBE",a=t.terms);const s=qr.extend,o=qr.group,u=qr.aggregates,c=qr.order;hj(),qr.project=!0;let l=Oi.default.flatten([Lr(t.input)]);l.length===1&&l[0].type==="group"&&(l=l[0].patterns),r.where=l;let d={};for(let h of qr.aggregates)d[ud(h.variable)]=Gs(h);let f={};for(let h=qr.extend.length-1;h>=0;--h){let p=qr.extend[h];f[ud(p.variable)]=gb(Gs(p.expression),d)}if(qr.group.length>0&&(n.group=qr.group.map(h=>{let p=ud(h);if(f[p]){let b=f[p];return delete f[p],{variable:h,expression:b}}return{expression:h}})),qr.order.length>0&&(n.order=qr.order.map(Lr).map(h=>h.descending?h:{expression:h})),a&&(n.variables=a.map(h=>{let p=ud(h);return f[p]?{variable:h,expression:f[p]}:h}),n.variables.length===0&&(n.variables=[new lj.Wildcard])),r.where.length>0&&r.where[r.where.length-1].type==="filter"){const h=r.where[r.where.length-1];NE(h,Object.keys(d))&&(n.having=Oi.default.flatten([gb(h.expression,d)]),r.where.splice(-1))}return qr.extend=s,qr.group=o,qr.aggregates=u,qr.order=c,{type:"group",patterns:[n]}}function NE(t,e){return Oi.default.isSimpleTerm(t)?e.indexOf(ud(t))>=0:Array.isArray(t)?t.some(r=>NE(r,e)):t===Object(t)?Object.keys(t).some(r=>NE(t[r],e)):e.indexOf(t)>=0}function pz(t){let e=Lr(t.input);return e.patterns[0].reduced=!0,e}function yz(t){let e=Lr(t.input);return e.type==="group"&&(e=e.patterns),Array.isArray(e)||(e=[e]),{type:"service",name:t.name,silent:t.silent,patterns:e}}function bz(t){let e=Lr(t.input),r=e;return e.type&&e.type==="group"&&(r=e.patterns[0]),t.start!==0&&(r.offset=t.start),t.length!==void 0&&(r.limit=t.length),e}function _z(t){return{type:"union",patterns:Oi.default.flatten(t.input.map(Lr))}}function gz(t){return{type:"values",values:t.bindings.map(e=>{let r={};for(let n of t.variables){let a=`?${n.value}`;e[a]?r[a]=e[a]:r[a]=void 0}return r})}}function mz(t){const e=t.input.map(hl);return e.every(r=>"pathType"in r&&r.pathType==="!")?{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:Oi.default.flatten(e.map(r=>r.items))}]}:{type:"path",pathType:"|",items:e}}function vz(t){if(t.path.type===rt.NPS){const e=t.path.iris.map(r=>({type:"path",pathType:"^",items:[r]}));return e.length<=1?{type:"path",pathType:"!",items:e}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:e}]}}return{type:"path",pathType:"^",items:[hl(t.path)]}}function wz(t){return t.iri}function Sz(t){return t.iris.length<=1?{type:"path",pathType:"!",items:t.iris}:{type:"path",pathType:"!",items:[{type:"path",pathType:"|",items:t.iris}]}}function Tz(t){return{type:"path",pathType:"+",items:[hl(t.path)]}}function Ez(t){return{type:"path",pathType:"/",items:t.input.map(hl)}}function Oz(t){return{type:"path",pathType:"*",items:[hl(t.path)]}}function Az(t){return{type:"path",pathType:"?",items:[hl(t.path)]}}function Rz(t){const e=t.updates.map(r=>Lr(r).updates[0]);return{prefixes:{},type:"update",updates:e}}function xz(t){var e;let r=t.where,n;if(r&&r.type===rt.FROM){let s=r;r=s.input,n={default:s.default,named:s.named}}const a=[{updateType:"insertdelete",delete:aP(t.delete||[]),insert:aP(t.insert||[])}];if(n&&(a[0].using=n),!r||r.type===rt.BGP&&r.patterns.length===0)a[0].where=[];else{const s={};let o=Lr(mb(r,s));o.type==="group"?a[0].where=o.patterns:a[0].where=[o];const u=Object.keys(s);if(u.length>0){if(u.length!==1)throw new Error("This is unexpected and might indicate an error in graph handling for updates.");const c=(e=s[u[0]])===null||e===void 0?void 0:e.graph;c&&c.value!==""&&(a[0].where=[{type:"graph",patterns:a[0].where,name:c}])}}return!t.delete&&!t.where?(a[0].updateType="insert",delete a[0].delete,delete a[0].where):!t.insert&&!t.where?(delete a[0].insert,delete a[0].where,t.delete.some(s=>s.subject.termType==="Variable"||s.predicate.termType==="Variable"||s.object.termType==="Variable")?a[0].updateType="deletewhere":a[0].updateType="delete"):!t.insert&&t.where&&t.where.type==="bgp"&&(0,kG.isomorphic)(t.delete,t.where.patterns)&&(delete a[0].where,a[0].updateType="deletewhere"),{prefixes:{},type:"update",updates:a}}function Iz(t){const e=[{type:"load",silent:!!t.silent,source:t.source}];return t.destination&&(e[0].destination=t.destination),{prefixes:{},type:"update",updates:e}}function Pz(t){return DA(t,"clear")}function Dz(t){return DA(t,"create")}function Nz(t){return DA(t,"drop")}function DA(t,e){const r=[{type:e,silent:!!t.silent}];return t.source==="DEFAULT"?r[0].graph={default:!0}:t.source==="NAMED"?r[0].graph={named:!0}:t.source==="ALL"?r[0].graph={all:!0}:r[0].graph={type:"graph",name:t.source},{prefixes:{},type:"update",updates:r}}function Cz(t){return NA(t,"add")}function jz(t){return NA(t,"move")}function Mz(t){return NA(t,"copy")}function NA(t,e){const r=[{type:e,silent:!!t.silent}];return r[0].source=t.source==="DEFAULT"?{type:"graph",default:!0}:{type:"graph",name:t.source},r[0].destination=t.destination==="DEFAULT"?{type:"graph",default:!0}:{type:"graph",name:t.destination},{prefixes:{},type:"update",updates:r}}function aP(t){if(!t)return[];const e={};return t.forEach(r=>{const n=r.graph.value;e[n]||(e[n]=[]),e[n].push(r)}),Object.keys(e).map(r=>r===""?{type:"bgp",triples:e[r].map(gp)}:{type:"graph",triples:e[r].map(gp),name:e[r][0].graph})}function Fz(t){return mb(t,{})}function mb(t,e){if(Array.isArray(t))return t.map(o=>mb(o,e));if(!t.type||t.type===rt.DELETE_INSERT)return t;if((t.type===rt.PATTERN||t.type===rt.PATH)&&t.graph)return e[t.graph.value]||(e[t.graph.value]={graph:t.graph,values:[]}),e[t.graph.value].values.push(t),t;const r={},n={},a={};for(let o of Object.keys(t)){const u={};r[o]=mb(t[o],u);const c=Object.keys(u);if(c.length>1){let l=sP(u[c[0]].values);for(let d=1;ddelete u[d]),l}else if(c.length===1){const l=u[c[0]].graph;n[o]=l,a[l.value]=l}}const s=Object.keys(a);if(s.length>0)if(s.length===1&&t.type!==rt.PROJECT)e[s[0]]={graph:a[s[0]],values:[r]};else for(let o of Object.keys(n))n[o].value.length>0&&(r[o]=_b.createGraph(r[o],n[o]));return r}function sP(t){const e=_b.createBgp(t),r=t[0].graph;return r.value.length===0?e:_b.createGraph(e,r)}(function(t){var e=m&&m.__createBinding||(Object.create?function(d,f,h,p){p===void 0&&(p=h);var b=Object.getOwnPropertyDescriptor(f,h);(!b||("get"in b?!f.__esModule:b.writable||b.configurable))&&(b={enumerable:!0,get:function(){return f[h]}}),Object.defineProperty(d,p,b)}:function(d,f,h,p){p===void 0&&(p=h),d[p]=f[h]}),r=m&&m.__setModuleDefault||(Object.create?function(d,f){Object.defineProperty(d,"default",{enumerable:!0,value:f})}:function(d,f){d.default=f}),n=m&&m.__importStar||function(d){if(d&&d.__esModule)return d;var f={};if(d!=null)for(var h in d)h!=="default"&&Object.prototype.hasOwnProperty.call(d,h)&&e(f,d,h);return r(f,d),f},a=m&&m.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.toSparqlJs=t.toSparql=t.Factory=t.Algebra=t.translate=void 0;const s=a(EA);t.translate=s.default;const o=n(bf);t.Algebra=o;const u=a(_f);t.Factory=u.default;const c=Vd;Object.defineProperty(t,"toSparql",{enumerable:!0,get:function(){return c.toSparql}}),Object.defineProperty(t,"toSparqlJs",{enumerable:!0,get:function(){return c.toSparqlJs}});const l=a(c0);t.Util=l.default})(xt);Object.defineProperty(tl,"__esModule",{value:!0});tl.materializeOperation=tl.materializeTerm=void 0;const Lz=$n,ql=nr,oP=An,Bz=xt,$z=new Lz.BindingsFactory;function ws(t,e){if(t.termType==="Variable"){const r=e.get(t);if(r)return r}return t.termType==="Quad"&&(0,oP.someTermsNested)(t,r=>r.termType==="Variable")?(0,oP.mapTermsNested)(t,r=>ws(r,e)):t}tl.materializeTerm=ws;function CE(t,e,r={}){return r={strictTargetVariables:"strictTargetVariables"in r?r.strictTargetVariables:!1,bindFilter:"bindFilter"in r?r.bindFilter:!0},Bz.Util.mapOperation(t,{path(n,a){return{recurse:!1,result:a.createPath(ws(n.subject,e),n.predicate,ws(n.object,e),ws(n.graph,e))}},pattern(n,a){return{recurse:!1,result:a.createPattern(ws(n.subject,e),ws(n.predicate,e),ws(n.object,e),ws(n.graph,e))}},extend(n){if(e.has(n.variable)){if(r.strictTargetVariables)throw new Error(`Tried to bind variable ${(0,ql.termToString)(n.variable)} in a BIND operator.`);return{recurse:!0,result:CE(n.input,e,r)}}return{recurse:!0,result:n}},group(n,a){if(r.strictTargetVariables){for(const o of n.variables)if(e.has(o))throw new Error(`Tried to bind variable ${(0,ql.termToString)(o)} in a GROUP BY operator.`);return{recurse:!0,result:n}}const s=n.variables.filter(o=>!e.has(o));return{recurse:!0,result:a.createGroup(n.input,s,n.aggregates)}},project(n,a){if(r.strictTargetVariables){for(const u of n.variables)if(e.has(u))throw new Error(`Tried to bind variable ${(0,ql.termToString)(u)} in a SELECT operator.`);return{recurse:!0,result:n}}const s=n.variables.filter(u=>!e.has(u)),o=$z.bindings(n.variables.map(u=>{const c=e.get(u);if(c)return[u,c]}).filter(u=>!!u));return{recurse:!1,result:a.createProject(CE(n.input,o,r),s)}},values(n,a){if(r.strictTargetVariables){for(const s of n.variables)if(e.has(s))throw new Error(`Tried to bind variable ${(0,ql.termToString)(s)} in a VALUES operator.`)}else{const s=n.variables.filter(u=>!e.has(u)),o=n.bindings.map(u=>{const c={...u};let l=!0;return e.forEach((d,f)=>{const h=(0,ql.termToString)(f);h in c&&(d.equals(c[h])||(l=!1),delete c[h])}),l?c:void 0}).filter(Boolean);return{recurse:!0,result:a.createValues(s,o)}}return{recurse:!1,result:n}},expression(n,a){if(!r.bindFilter)return{recurse:!1,result:n};if(n.expressionType==="term")return{recurse:!1,result:a.createTermExpression(ws(n.term,e))};if(n.expressionType==="aggregate"&&"variable"in n&&e.has(n.variable)){if(r.strictTargetVariables)throw new Error(`Tried to bind ${(0,ql.termToString)(n.variable)} in a ${n.aggregator} aggregate.`);return{recurse:!0,result:n}}return{recurse:!0,result:n}}})}tl.materializeOperation=CE;Object.defineProperty(e0,"__esModule",{value:!0});e0.ActorQueryOperation=void 0;const uu=rr,Uz=et,uP=S_,qz=tl;let cP=0;class Tu extends Uz.Actor{constructor(e){super(e)}static getSafeBindings(e){return Tu.validateQueryOutput(e,"bindings"),e}static getSafeQuads(e){return Tu.validateQueryOutput(e,"quads"),e}static getSafeBoolean(e){return Tu.validateQueryOutput(e,"boolean"),e}static getSafeVoid(e){return Tu.validateQueryOutput(e,"void"),e}static cachifyMetadata(e){let r;return()=>(r||(r=e(),r.then(n=>n.state.addInvalidateListener(()=>{r=void 0})).catch(()=>{})),r)}static validateQueryOutput(e,r){if(e.type!==r)throw new Error(`Invalid query output type: Expected '${r}' but got '${e.type}'`)}static getBaseExpressionContext(e){const r=e.get(uu.KeysInitQuery.queryTimestamp),n=e.get(uu.KeysInitQuery.baseIRI),a=e.get(uu.KeysInitQuery.functionArgumentsCache)||{};if(e.has(uu.KeysInitQuery.extensionFunctionCreator)&&e.has(uu.KeysInitQuery.extensionFunctions))throw new Error("Illegal simultaneous usage of extensionFunctionCreator and extensionFunctions in context");let s=e.get(uu.KeysInitQuery.extensionFunctionCreator);const o=e.get(uu.KeysInitQuery.extensionFunctions);return o&&(s=u=>o[u.value]),{now:r,baseIRI:n,extensionFunctionCreator:s,functionArgumentsCache:a}}static getExpressionContext(e,r){return{...this.getBaseExpressionContext(e),bnode:n=>new uP.BlankNodeBindingsScoped(n||`BNODE_${cP++}`)}}static getAsyncExpressionContext(e,r){return{...this.getBaseExpressionContext(e),bnode:n=>Promise.resolve(new uP.BlankNodeBindingsScoped(n||`BNODE_${cP++}`)),exists:Tu.createExistenceResolver(e,r)}}static createExistenceResolver(e,r){return async(n,a)=>{const s=(0,qz.materializeOperation)(n.input,a),o=await r.mediate({operation:s,context:e}),u=Tu.getSafeBindings(o);return new Promise((c,l)=>{u.bindingsStream.on("end",()=>{c(!1)}),u.bindingsStream.on("error",l),u.bindingsStream.on("data",()=>{u.bindingsStream.close(),c(!0)})}).then(c=>n.not?!c:c)}}static throwOnReadOnly(e){if(e.get(uu.KeysQueryOperation.readOnly))throw new Error("Attempted a write operation in read-only mode")}}e0.ActorQueryOperation=Tu;var d0={};Object.defineProperty(d0,"__esModule",{value:!0});d0.ActorQueryOperationTyped=void 0;const Fy=rr,lP=e0;class Vz extends lP.ActorQueryOperation{constructor(e,r){if(super({...e,operationName:r}),!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 r=e.operation;return this.testOperation(r,e.context)}async run(e){const r=e.context.get(Fy.KeysInitQuery.physicalQueryPlanLogger);r&&(r.logOperation(e.operation.type,void 0,e.operation,e.context.get(Fy.KeysInitQuery.physicalQueryPlanNode),this.name,{}),e.context=e.context.set(Fy.KeysInitQuery.physicalQueryPlanNode,e.operation));const n=e.operation,a=e.context.set(Fy.KeysQueryOperation.operation,n),s=await this.runOperation(n,a);return"metadata"in s&&(s.metadata=lP.ActorQueryOperation.cachifyMetadata(s.metadata)),s}}d0.ActorQueryOperationTyped=Vz;var D_={};Object.defineProperty(D_,"__esModule",{value:!0});D_.ActorQueryOperationTypedMediated=void 0;const Hz=d0;class kz extends Hz.ActorQueryOperationTyped{constructor(e,r){super(e,r)}}D_.ActorQueryOperationTypedMediated=kz;var N_={};Object.defineProperty(N_,"__esModule",{value:!0});N_.BusQueryOperation=void 0;const Qz=et;class Gz extends Qz.BusIndexed{constructor(e){super({...e,actorIdentifierFields:["operationName"],actionIdentifierFields:["operation","type"]})}}N_.BusQueryOperation=Gz;var C_={},Ut={},CA={exports:{}},Ed=typeof Reflect=="object"?Reflect:null,dP=Ed&&typeof Ed.apply=="function"?Ed.apply:function(e,r,n){return Function.prototype.apply.call(e,r,n)},$1;Ed&&typeof Ed.ownKeys=="function"?$1=Ed.ownKeys:Object.getOwnPropertySymbols?$1=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:$1=function(e){return Object.getOwnPropertyNames(e)};function zz(t){console&&console.warn&&console.warn(t)}var pj=Number.isNaN||function(e){return e!==e};function cr(){cr.init.call(this)}CA.exports=cr;CA.exports.once=Jz;cr.EventEmitter=cr;cr.prototype._events=void 0;cr.prototype._eventsCount=0;cr.prototype._maxListeners=void 0;var fP=10;function j_(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(cr,"defaultMaxListeners",{enumerable:!0,get:function(){return fP},set:function(t){if(typeof t!="number"||t<0||pj(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");fP=t}});cr.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};cr.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||pj(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this};function yj(t){return t._maxListeners===void 0?cr.defaultMaxListeners:t._maxListeners}cr.prototype.getMaxListeners=function(){return yj(this)};cr.prototype.emit=function(e){for(var r=[],n=1;n0&&(o=r[0]),o instanceof Error)throw o;var u=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw u.context=o,u}var c=s[e];if(c===void 0)return!1;if(typeof c=="function")dP(c,this,r);else for(var l=c.length,d=vj(c,l),n=0;n0&&o.length>a&&!o.warned){o.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=o.length,zz(u)}return t}cr.prototype.addListener=function(e,r){return bj(this,e,r,!1)};cr.prototype.on=cr.prototype.addListener;cr.prototype.prependListener=function(e,r){return bj(this,e,r,!0)};function Wz(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _j(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},a=Wz.bind(n);return a.listener=r,n.wrapFn=a,a}cr.prototype.once=function(e,r){return j_(r),this.on(e,_j(this,e,r)),this};cr.prototype.prependOnceListener=function(e,r){return j_(r),this.prependListener(e,_j(this,e,r)),this};cr.prototype.removeListener=function(e,r){var n,a,s,o,u;if(j_(r),a=this._events,a===void 0)return this;if(n=a[e],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[e],a.removeListener&&this.emit("removeListener",e,n.listener||r));else if(typeof n!="function"){for(s=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){u=n[o].listener,s=o;break}if(s<0)return this;s===0?n.shift():Xz(n,s),n.length===1&&(a[e]=n[0]),a.removeListener!==void 0&&this.emit("removeListener",e,u||r)}return this};cr.prototype.off=cr.prototype.removeListener;cr.prototype.removeAllListeners=function(e){var r,n,a;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[e]),this;if(arguments.length===0){var s=Object.keys(n),o;for(a=0;a=0;a--)this.removeListener(e,r[a]);return this};function gj(t,e,r){var n=t._events;if(n===void 0)return[];var a=n[e];return a===void 0?[]:typeof a=="function"?r?[a.listener||a]:[a]:r?Kz(a):vj(a,a.length)}cr.prototype.listeners=function(e){return gj(this,e,!0)};cr.prototype.rawListeners=function(e){return gj(this,e,!1)};cr.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):mj.call(t,e)};cr.prototype.listenerCount=mj;function mj(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}cr.prototype.eventNames=function(){return this._eventsCount>0?$1(this._events):[]};function vj(t,e){for(var r=new Array(e),n=0;neW.then(a),e=typeof setImmediate=="function"?setImmediate:a=>setTimeout(a,0);let r=0,n=null;return a=>{n!==null?n.push(a):++r<100?t(a):(n=[a],e(()=>{for(const s of n)t(s);n=null,r=0}))}}F_.createTaskScheduler=tW;(function(t){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 e=Sf,r=M_;Object.defineProperty(t,"LinkedList",{enumerable:!0,get:function(){return r.LinkedList}});let a=F_.createTaskScheduler();function s(g){a(g)}t.scheduleTask=s;function o(){return a}t.getTaskScheduler=o;function u(g){a=g}t.setTaskScheduler=u,t.INIT=1,t.OPEN=2,t.CLOSING=4,t.CLOSED=8,t.ENDED=16,t.DESTROYED=32;class c extends e.EventEmitter{constructor(y=t.OPEN){super(),this._readable=!1,this._state=y,this.on("newListener",l)}_changeState(y,v=!1){const C=y>this._state&&this._statethis.emit("end")):this.emit("end"))),C}read(){return null}forEach(y,v){this.on("data",Re(y,v))}close(){this._changeState(t.CLOSED)&&this._endAsync()}destroy(y){this.done||this._destroy(y,v=>{y=y||v,y&&this.emit("error",y),this._end(!0)})}_destroy(y,v){v()}_end(y=!1){this._changeState(y?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(y){y=!!y&&!this.done,this._readable!==y&&(this._readable=y,y&&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 y=this._toStringDetails();return`[${this.constructor.name}${y?` ${y}`:""}]`}_toStringDetails(){return""}toArray(y){const v=[],C=typeof(y==null?void 0:y.limit)=="number"?y.limit:1/0;return this.ended||C<=0?Promise.resolve(v):new Promise((V,q)=>{const G=()=>V(v),Y=ee=>{v.push(ee),v.length>=C&&(this.removeListener("error",q),this.removeListener("data",Y),this.removeListener("end",G),V(v))};this.on("error",q),this.on("data",Y),this.on("end",G)})}getProperty(y,v){const C=this._properties;if(!v)return C&&C[y];if(C&&y in C)a(()=>v(C[y]));else{let V;(V=this._propertyCallbacks)||(this._propertyCallbacks=V=Object.create(null)),y in V?V[y].push(v):V[y]=[v]}}setProperty(y,v){const C=this._properties||(this._properties=Object.create(null));C[y]=v;const V=this._propertyCallbacks||{},q=V[y];if(q){delete V[y],a(()=>{for(const G of q)G(v)});for(y in V)return;delete this._propertyCallbacks}}getProperties(){const y=this._properties,v={};for(const C in y)v[C]=y[C];return v}setProperties(y){for(const v in y)this.setProperty(v,y[v])}copyProperties(y,v){for(const C of v)y.getProperty(C,V=>this.setProperty(C,V))}transform(y){return new x(this,y)}map(y,v){return new w(this,Re(y,v))}filter(y,v){return this.map(function(C){return y.call(v||this,C)?C:null})}uniq(y=E){const v=new Set;return this.filter(function(C){const V=y.call(this,C);return v.has(V)?!1:(v.add(V),!0)})}prepend(y){return this.transform({prepend:y})}append(y){return this.transform({append:y})}surround(y,v){return this.transform({prepend:y,append:v})}skip(y){return this.map(v=>y-- >0?null:v)}take(y){return this.transform({limit:y})}range(y,v){return this.transform({offset:y,limit:Math.max(v-y+1,0)})}clone(){return new $(this)}}t.AsyncIterator=c;function l(g){g==="data"&&(this.removeListener("newListener",l),f(this,"readable",d),this.readable&&a(()=>d.call(this)))}function d(){let g;for(;this.listenerCount("data")!==0&&(g=this.read())!==null;)this.emit("data",g);this.listenerCount("data")===0&&!this.done&&(this.removeListener("readable",d),f(this,"newListener",l))}function f(g,y,v){g.listeners(y).includes(v)||g.on(y,v)}class h extends c{constructor(){super(),this._changeState(t.ENDED,!0)}}t.EmptyIterator=h;class p extends c{constructor(y){super(),this._item=y,y===null?this.close():this.readable=!0}read(){const y=this._item;return this._item=null,this.close(),y}_toStringDetails(){return this._item===null?"":`(${this._item})`}}t.SingletonIterator=p;class b extends c{constructor(y=[],{autoStart:v=!0,preserve:C=!0}={}){super();const V=C||!Array.isArray(y)?[...y]:y;this._index=0,this._sourceStarted=v!==!1,this._truncateThreshold=C?-1:64,this._sourceStarted&&V.length===0?this.close():this._buffer=V,this.readable=!0}read(){this._sourceStarted||(this._sourceStarted=!0);let y=null;return this._buffer&&(this._index=v&&this.close(),Promise.resolve(q)}}t.ArrayIterator=b;class _ extends c{constructor({start:y=0,step:v=1,end:C}={}){super(),Number.isFinite(y)&&(y=Math.trunc(y)),this._next=y,Number.isFinite(v)&&(v=Math.trunc(v)),this._step=v;const V=v>=0,q=V?1/0:-1/0;Number.isFinite(C)?C=Math.trunc(C):C!==-q&&(C=q),this._last=C,!Number.isFinite(y)||(V?y>C:y=0?V>C:Vthis._init(v)),this._sourceStarted=v!==!1}get maxBufferSize(){return this._maxBufferSize}set maxBufferSize(y){y!==1/0&&(y=Number.isFinite(y)?Math.max(Math.trunc(y),1):4),this._maxBufferSize!==y&&(this._maxBufferSize=y,this._state===t.OPEN&&this._fillBuffer())}_init(y){let v=!1;this._reading=!0,this._begin(()=>{if(v)throw new Error("done callback called multiple times");v=!0,this._reading=!1,this._changeState(t.OPEN),y?this._fillBufferAsync():this.readable=!0})}_begin(y){y()}read(){if(this.done)return null;this._sourceStarted||(this._sourceStarted=!0);const y=this._buffer;let v;return y.empty?(v=null,this.readable=!1):v=y.shift(),!this._reading&&y.length0&&(this._pushedCount=0,this._reading=!0,this._read(y,()=>{if(!y)throw new Error("done callback called multiple times");y=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(y,v){this._buffer.clear(),v()}_flush(y){y()}_toStringDetails(){const y=this._buffer;return`{${y.empty?"":`next: ${y.first}, `}buffer: ${y.length}}`}}t.BufferedIterator=A;class T extends A{constructor(y,v=y||{}){super(v),this._boundPush=C=>this._push(C),pe(y)||(y=v.source),J(y)?this.source=y:y&&(this._createSource=le(y)?()=>y:y,this._sourceStarted&&this._loadSourceAsync()),this._optional=!!v.optional,this._destroySource=v.destroySource!==!1}get source(){return oe(this._createSource)&&this._loadSourceAsync(),this._source}set source(y){const v=this._source=this._validateSource(y);v[t.DESTINATION]=this,this.done?this._destroySource&&v.destroy():v.done?this.close():(v.on("end",H),v.on("readable",N),v.on("error",D))}_loadSourceAsync(){oe(this._createSource)&&(Promise.resolve(this._createSource()).then(y=>{delete this._createSource,this.source=y,this._fillBuffer()},y=>this.emit("error",y)),this._createSource=null)}_validateSource(y,v=!1){if(this._source||typeof this._createSource<"u")throw new Error("The source cannot be changed after it has been set");return O(y,v)}_read(y,v){const C=()=>{this._pushedCountthis._readAndTransform(C,v)):v()};this._readAndTransform(C,v)}_readAndTransform(y,v){let C;const V=this.source;!V||V.done||(C=V.read())===null?v():this._optional?this._optionalTransform(C,y):this._transform(C,y,this._boundPush)}_optionalTransform(y,v){const C=this._pushedCount;this._transform(y,()=>{C===this._pushedCount&&this._push(y),v()},this._boundPush)}_transform(y,v,C){C(y),v()}_closeWhenDone(){this.close()}_end(y){const v=this._source;v&&(v.removeListener("end",H),v.removeListener("error",D),v.removeListener("readable",N),delete v[t.DESTINATION],this._destroySource&&v.destroy()),super._end(y)}}t.TransformIterator=T;function I(){this[t.DESTINATION].readable=!0}function D(g){this[t.DESTINATION].emit("error",g)}function U(){this[t.DESTINATION].close()}function H(){this[t.DESTINATION]._closeWhenDone()}function N(){this[t.DESTINATION]._sourceStarted!==!1&&this[t.DESTINATION]._fillBuffer()}class x extends T{constructor(y,v){if(super(y,v),this._offset=0,this._limit=1/0,this._filter=C=>!0,v=v||(pe(y)?null:y),v){const C=oe(v)?v:v.transform,{limit:V,offset:q,filter:G,map:Y,prepend:ee,append:ae}=v;q===1/0||V===-1/0?this._limit=0:(Number.isFinite(q)&&(this._offset=Math.max(Math.trunc(q),0)),Number.isFinite(V)&&(this._limit=Math.max(Math.trunc(V),0)),oe(G)&&(this._filter=G),oe(Y)&&(this._map=Y),this._transform=oe(C)?C:null),ee&&(this._prepender=J(ee)?ee:he(ee)),ae&&(this._appender=J(ae)?ae:he(ae))}}_read(y,v){const C=()=>this._readAndTransformSimple(y,V,v);this._readAndTransformSimple(y,V,v);function V(){a(C)}}_readAndTransformSimple(y,v,C){let V;const{source:q}=this;if(!q||q.done){C();return}for(this._limit===0&&this.close();!this.closed&&this._pushedCount"u"?V:this._map(V);if(G===null)this._optional&&this._push(V);else if(!oe(this._transform))this._push(G);else{this._optional?this._optionalTransform(G,v):this._transform(G,v,this._boundPush);return}--this._limit===0&&this.close()}C()}_begin(y){this._insert(this._prepender,y),delete this._prepender}_flush(y){this._insert(this._appender,y),delete this._appender}_insert(y,v){const C=q=>this._push(q);!y||y.done?v():(y.on("data",C),y.on("end",V));function V(){y.removeListener("data",C),y.removeListener("end",V),v()}}}t.SimpleTransformIterator=x;class F extends T{constructor(y,v){if(super(y,v),this._transformerQueue=[],v){const C=oe(v)?v:v.multiTransform;C&&(this._createTransformer=C)}}_read(y,v){const C=this._transformerQueue,V=this._optional;let q,G;for(;(q=C[0])&&q.transformer.done;){V&&q.item!==null&&(y--,this._push(q.item)),C.shift();const{transformer:ee}=q;ee.removeListener("end",N),ee.removeListener("readable",N),ee.removeListener("error",D)}const{source:Y}=this;for(;Y&&!Y.done&&C.length0&&(G=ee.read())!==null;)this._push(G),V&&(q.item=null)}else Y&&Y.done&&this.close();v()}_createTransformer(y){return new p(y)}_closeWhenDone(){this._transformerQueue.length||this.close()}_end(y){if(super._end(y),this._destroySource)for(const v of this._transformerQueue)v.transformer.destroy()}}t.MultiTransformIterator=F;class X extends A{constructor(y,v={}){super(v),this._sources=[],this._currentSource=-1;const C=v.autoStart!==!1;if(J(y))y.on("error",V=>this.emit("error",V)),this._pending={loading:!1,sources:y},C&&this._loadSources();else if(Array.isArray(y)&&y.length>0)for(const V of y)this._addSource(V);else C&&this.close();this._destroySources=v.destroySources!==!1}_loadSources(){const y=this._pending.sources;this._pending.loading=!0,y.done?(delete this._pending,this.close()):(y.on("data",v=>{this._addSource(v),this._fillBufferAsync()}),y.on("end",()=>{delete this._pending,this._fillBuffer()}))}_addSource(y){le(y)&&(y=se(y)),y.done||(this._sources.push(y),y[t.DESTINATION]=this,y.on("error",D),y.on("readable",N),y.on("end",ne))}_removeEmptySources(){this._sources=this._sources.filter((y,v)=>(y.done&&v<=this._currentSource&&this._currentSource--,!y.done)),this._fillBuffer()}_read(y,v){var C;((C=this._pending)===null||C===void 0?void 0:C.loading)===!1&&this._loadSources();let V=0,q;for(;V!==(V=y);)for(let G=0;G0;G++)this._currentSource=(this._currentSource+1)%this._sources.length,(q=this._sources[this._currentSource].read())!==null&&(y--,this._push(q));!this._pending&&this._sources.length===0&&this.close(),v()}_end(y=!1){if(super._end(y),this._destroySources){for(const v of this._sources)v.destroy();this._pending&&(this._pending.sources.destroy(),delete this._pending)}}}t.UnionIterator=X;function ne(){this[t.DESTINATION]._removeEmptySources()}class $ extends T{constructor(y){super(y,{autoStart:!1}),this._readPosition=0,this._reading=!1,y&&(this.readable=!0)}_init(){}close(){c.prototype.close.call(this)}get source(){return super.source}set source(y){const v=this._source=this._validateSource(y),C=v&&v[t.DESTINATION]||(v[t.DESTINATION]=new j(v));this.done?this._destroySource&&v.destroy():C.endsAt(0)?this.close():(C.register(this),(v._sourceStarted===!1||C.readAt(0)!==null)&&(this.readable=!0));const V=this._propertyCallbacks;for(const q in V){const G=V[q];for(const Y of G)this._getSourceProperty(q,Y)}}_validateSource(y,v=!1){const C=y&&y[t.DESTINATION];return super._validateSource(y,!C||C instanceof j)}getProperty(y,v){const{source:C}=this,V=this._properties,q=V&&y in V;if(!v)return q?V&&V[y]:C&&C.getProperty(y);super.getProperty(y,v),C&&!q&&this._getSourceProperty(y,v)}_getSourceProperty(y,v){this.source.getProperty(y,C=>{(!this._properties||!(y in this._properties))&&v(C)})}getProperties(){const y=this.source?this.source.getProperties():{},v=this._properties;for(const C in v)y[C]=v[C];return y}_toStringDetails(){return`{source: ${this.source?this.source.toString():"none"}}`}read(){this._sourceStarted||(this._sourceStarted=!0);const y=this.source;let v=null;if(!this.done&&y){const C=y[t.DESTINATION];(v=C.readAt(this._readPosition))!==null?this._readPosition++:this.readable=!1,C.endsAt(this._readPosition)&&this.close()}return v}_end(y){const v=this.source,C=v==null?void 0:v[t.DESTINATION];C&&C.unregister(this),A.prototype._end.call(this,y)}}t.ClonedIterator=$;class j{constructor(y){if(this._history=[],this._trackers=new Set,this._source=y,!y.done){const v=()=>{for(const q of this._trackers)q.readable=!0},C=q=>{for(const G of this._trackers)G.emit("error",q)},V=()=>{for(const q of this._trackers)q._sourceStarted!==!1&&q._readPosition===this._history.length&&q.close();this._trackers.clear(),y.removeListener("end",V),y.removeListener("error",C),y.removeListener("readable",v)};y.on("end",V),y.on("error",C),y.on("readable",v)}}register(y){this._source.done||this._trackers.add(y)}unregister(y){this._trackers.delete(y)}readAt(y){let v=null;return y{this._source=null,this.source=C}).catch(C=>this.emit("error",C))):y&&(this.source=y)}set source(y){let v=y;if(this._source!==null)throw new Error("The source cannot be changed after it has been set");if(L(v)&&(v=v[Symbol.iterator]()),P(v)){let C=v;v=new e.EventEmitter,v.read=()=>{if(C!==null){let V;for(;!(V=C.next()).done;)if(V.value!==null)return V.value;C=null,this.close()}return null}}else v=O(v);if(this.done){this._destroySource&&oe(v.destroy)&&v.destroy();return}v[t.DESTINATION]=this,v.on("end",U),v.on("error",D),v.on("readable",I),this._source=v,this.readable=v.readable!==!1}read(){if(this._source!==null&&this._source.readable!==!1){const y=this._source.read();if(y!==null)return y;this.readable=!1}return null}_end(y=!1){this._source!==null&&(this._source.removeListener("end",U),this._source.removeListener("error",D),this._source.removeListener("readable",I),delete this._source[t.DESTINATION],this._destroySource&&oe(this._source.destroy)&&this._source.destroy(),this._source=null),super._end(y)}}t.WrappingIterator=Q;function se(g,y){if(y&&("autoStart"in y||"optional"in y||"source"in y||"maxBufferSize"in y))return g&&!J(g)&&(g=new Q(g)),new T(g,y);if(!g)return ie();if(le(g))return new Q(g,y);if(g instanceof c)return g;if(Array.isArray(g))return he(g);if(L(g)||P(g)||J(g))return new Q(g,y);throw new TypeError(`Invalid source: ${g}`)}t.wrap=se;function ie(){return new h}t.empty=ie;function be(g){return new p(g)}t.single=be;function he(g){return new b(g)}t.fromArray=he;function Te(g){return new Q(g)}t.fromIterator=Te;function Ne(g){return new Q(g)}t.fromIterable=Ne;function ye(g){return new X(g)}t.union=ye;function ce(g,y,v){return new _({start:g,end:y,step:v})}t.range=ce;function Re(g,y){return y?g.bind(y):g}function oe(g){return typeof g=="function"}t.isFunction=oe;function J(g){return oe(g==null?void 0:g.on)}t.isEventEmitter=J;function le(g){return oe(g==null?void 0:g.then)}t.isPromise=le;function pe(g){return g&&(J(g)||le(g)||oe(g))}t.isSourceExpression=pe;function L(g){return g&&Symbol.iterator in g}t.isIterable=L;function P(g){return oe(g==null?void 0:g.next)}t.isIterator=P})(Ut);Object.defineProperty(C_,"__esModule",{value:!0});C_.ClosableTransformIterator=void 0;const rW=Ut;class nW extends rW.TransformIterator{constructor(e,r){super(e,r),this.onClose=r.onClose}_end(e){this.onClose(),super._end(e)}}C_.ClosableTransformIterator=nW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(e0,t),r(d0,t),r(D_,t),r(tl,t),r(N_,t),r(C_,t)})(ct);var L_={};Object.defineProperty(L_,"__esModule",{value:!0});L_.MemoryPhysicalQueryPlanLogger=void 0;const Ly=nr;class iW{constructor(){this.children=new Map}logOperation(e,r,n,a,s,o){const u={actor:s,logicalOperator:e,physicalOperator:r,rawNode:n,children:[],metadata:o};if(this.children.set(n,u.children),this.rootNode){if(!a)throw new Error("Detected more than one parent-less node");const c=this.children.get(a);if(!c)throw new Error("Could not find parent node");c.push(u)}else{if(a)throw new Error("No root node has been set yet, while a parent is being referenced");this.rootNode=u}}toJson(){return this.rootNode?this.planNodeToJson(this.rootNode):{}}planNodeToJson(e){return{logical:e.logicalOperator,physical:e.physicalOperator,...this.getLogicalMetadata(e.rawNode),...e.metadata,...e.children.length>0?{children:e.children.map(r=>this.planNodeToJson(r))}:{}}}getLogicalMetadata(e){if("type"in e){const r=e;switch(r.type){case"pattern":return{pattern:this.quadToString(r)};case"project":return{variables:r.variables.map(n=>n.value)}}}return{}}quadToString(e){return`${(0,Ly.termToString)(e.subject)} ${(0,Ly.termToString)(e.predicate)} ${(0,Ly.termToString)(e.object)}${e.graph.termType==="DefaultGraph"?"":` ${(0,Ly.termToString)(e.graph)}`}`}}L_.MemoryPhysicalQueryPlanLogger=iW;Object.defineProperty(w_,"__esModule",{value:!0});w_.QueryEngineBase=void 0;const aW=ct,gn=rr,Hf=et,sW=L_;class vb{constructor(e){this.actorInitQuery=e,this.defaultFunctionArgumentsCache={}}async queryBindings(e,r){return this.queryOfType(e,r,"bindings")}async queryQuads(e,r){return this.queryOfType(e,r,"quads")}async queryBoolean(e,r){return this.queryOfType(e,r,"boolean")}async queryVoid(e,r){return this.queryOfType(e,r,"void")}async queryOfType(e,r,n){const a=await this.query(e,r);if(a.resultType===n)return await a.execute();throw new Error(`Query result type '${n}' was expected, while '${a.resultType}' was found.`)}async query(e,r){const n=await this.queryOrExplain(e,r);if("explain"in n)throw new Error("Tried to explain a query when in query-only mode");return n}async explain(e,r,n){return r.explain=n,await this.queryOrExplain(e,r)}async queryOrExplain(e,r){r=r||{};for(const h in r)this.actorInitQuery.contextKeyShortcuts[h]&&(r[this.actorInitQuery.contextKeyShortcuts[h]]=r[h],delete r[h]);let n=new Hf.ActionContext(r),a={language:"sparql",version:"1.1"};n.has(gn.KeysInitQuery.queryFormat)&&(a=n.get(gn.KeysInitQuery.queryFormat),n=n.delete(gn.KeysInitQuery.queryFormat),a.language==="graphql"&&(n=n.setDefault(gn.KeysInitQuery.graphqlSingularizeVariables,{})));const s=n.get(gn.KeysInitQuery.baseIRI);n=n.setDefault(gn.KeysInitQuery.queryTimestamp,new Date).setDefault(gn.KeysRdfResolveQuadPattern.sourceIds,new Map).setDefault(gn.KeysCore.log,this.actorInitQuery.logger).setDefault(gn.KeysInitQuery.functionArgumentsCache,this.defaultFunctionArgumentsCache).setDefault(gn.KeysRdfResolveQuadPattern.hypermediaSourcesAggregatedStores,new Map),n=(await this.actorInitQuery.mediatorContextPreprocess.mediate({context:n})).context;const o=n.get(gn.KeysInitQuery.explain);let u;if(typeof e=="string"){n=n.set(gn.KeysInitQuery.queryString,e);const h=await this.actorInitQuery.mediatorQueryParse.mediate({context:n,query:e,queryFormat:a,baseIRI:s});u=h.operation,h.baseIRI&&(n=n.set(gn.KeysInitQuery.baseIRI,h.baseIRI))}else u=e;if(o==="parsed")return{explain:!0,type:o,data:u};n.has(gn.KeysInitQuery.initialBindings)&&(u=(0,aW.materializeOperation)(u,n.get(gn.KeysInitQuery.initialBindings)),n=n.delete(gn.KeysInitQuery.queryString));const c=await this.actorInitQuery.mediatorOptimizeQueryOperation.mediate({context:n,operation:u});if(u=c.operation,n=c.context||n,o==="logical")return{explain:!0,type:o,data:u};n=n.set(gn.KeysInitQuery.query,u);let l;o==="physical"&&(l=new sW.MemoryPhysicalQueryPlanLogger,n=n.set(gn.KeysInitQuery.physicalQueryPlanLogger,l));const d=await this.actorInitQuery.mediatorQueryOperation.mediate({context:n,operation:u});d.context=n;const f=vb.internalToFinalResult(d);if(l){switch(f.resultType){case"bindings":await(await f.execute()).toArray();break;case"quads":await(await f.execute()).toArray();break;case"boolean":await f.execute();break;case"void":await f.execute();break}return{explain:!0,type:o,data:l.toJson()}}return f}async getResultMediaTypes(e){return e=Hf.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeCombiner.mediate({context:e,mediaTypes:!0})).mediaTypes}async getResultMediaTypeFormats(e){return e=Hf.ActionContext.ensureActionContext(e),(await this.actorInitQuery.mediatorQueryResultSerializeMediaTypeFormatCombiner.mediate({context:e,mediaTypeFormats:!0})).mediaTypeFormats}async resultToString(e,r,n){if(n=Hf.ActionContext.ensureActionContext(n),!r)switch(e.resultType){case"bindings":r="application/json";break;case"quads":r="application/trig";break;default:r="simple";break}const a={...await vb.finalToInternalResult(e),context:n};return(await this.actorInitQuery.mediatorQueryResultSerialize.mediate({context:n,handle:a,handleMediaType:r})).handle}invalidateHttpCache(e,r){return r=Hf.ActionContext.ensureActionContext(r),this.actorInitQuery.mediatorHttpInvalidate.mediate({url:e,context:r})}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()}}}}w_.QueryEngineBase=vb;(function(t){var e=m&&m.__createBinding||(Object.create?function(a,s,o,u){u===void 0&&(u=o);var c=Object.getOwnPropertyDescriptor(s,o);(!c||("get"in c?!s.__esModule:c.writable||c.configurable))&&(c={enumerable:!0,get:function(){return s[o]}}),Object.defineProperty(a,u,c)}:function(a,s,o,u){u===void 0&&(u=o),a[u]=s[o]}),r=m&&m.__exportStar||function(a,s){for(var o in a)o!=="default"&&!Object.prototype.hasOwnProperty.call(s,o)&&e(s,a,o)};Object.defineProperty(t,"__esModule",{value:!0}),t.QueryEngineBase=void 0,r(Lp,t),r(v_,t);var n=w_;Object.defineProperty(t,"QueryEngineBase",{enumerable:!0,get:function(){return n.QueryEngineBase}})})(UO);var Sj={},B_={};Object.defineProperty(B_,"__esModule",{value:!0});B_.LoggerVoid=void 0;const oW=qO;class uW extends oW.Logger{debug(){}error(){}fatal(){}info(){}trace(){}warn(){}}B_.LoggerVoid=uW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(B_,t)})(Sj);var Tj={},$_={},Ej={},U_={};Object.defineProperty(U_,"__esModule",{value:!0});U_.ActorContextPreprocess=void 0;const cW=et;class lW extends cW.Actor{constructor(e){super(e)}}U_.ActorContextPreprocess=lW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(U_,t)})(Ej);Object.defineProperty($_,"__esModule",{value:!0});$_.ActorContextPreprocessSourceToDestination=void 0;const dW=Ej,By=rr;class fW extends dW.ActorContextPreprocess{constructor(e){super(e)}async test(e){return!0}async run(e){if(e.context.get(By.KeysRdfResolveQuadPattern.sources)&&!e.context.get(By.KeysRdfUpdateQuads.destination)){const r=e.context.get(By.KeysRdfResolveQuadPattern.sources);if(r.length===1)return{context:e.context.set(By.KeysRdfUpdateQuads.destination,r[0])}}return e}}$_.ActorContextPreprocessSourceToDestination=fW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r($_,t)})(Tj);var jA={},q_={};Object.defineProperty(q_,"__esModule",{value:!0});q_.MediatorCombinePipeline=void 0;const hW=et;class pW extends hW.Mediator{constructor(e){super(e)}async mediate(e){let r;try{r=this.publish(e)}catch{return e}if(this.filterErrors){const a=[];for(const s of r)try{await s.reply,a.push(s)}catch{}r=a}if(r=await Promise.all(r.map(async({actor:a,reply:s})=>({actor:a,reply:await s}))),this.order){const a=s=>{const o=this.field?s[this.field]:s;if(typeof o!="number")throw new Error("Cannot order elements that are not numbers.");return o};r=r.sort((s,o)=>(this.order==="increasing"?1:-1)*(a(s.reply)-a(o.reply)))}let n=e;for(const{actor:a}of r)n={...n,...await a.runObservable(n)};return n}mediateWith(){throw new Error("Method not supported.")}}q_.MediatorCombinePipeline=pW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(q_,t)})(jA);var Oj={},V_={},Aj={},H_={};Object.defineProperty(H_,"__esModule",{value:!0});H_.ActorHashBindings=void 0;const yW=et;class bW extends yW.Actor{constructor(e){super(e)}}H_.ActorHashBindings=bW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(H_,t)})(Aj);var _W=function t(e){if(typeof e=="number"&&isNaN(e))throw new Error("NaN is not allowed");if(typeof e=="number"&&!isFinite(e))throw new Error("Infinity is not allowed");return e===null||typeof e!="object"?JSON.stringify(e):e.toJSON instanceof Function?t(e.toJSON()):Array.isArray(e)?`[${e.reduce((a,s,o)=>`${a}${o===0?"":","}${t(s===void 0||typeof s=="symbol"?null:s)}`,"")}]`:`{${Object.keys(e).sort().reduce((n,a)=>{if(e[a]===void 0||typeof e[a]=="symbol")return n;const s=n.length===0?"":",";return`${n}${s}${t(a)}:${t(e[a])}`},"")}}`};Object.defineProperty(V_,"__esModule",{value:!0});V_.ActorHashBindingsSha1=void 0;const gW=Aj,mW=I_,hP=nr,vW=_W;class wW extends gW.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:r=>(0,mW.sha1)().update(vW(Object.fromEntries([...r].map(([n,a])=>[(0,hP.termToString)(n),(0,hP.termToString)(a)])))).digest("hex"),hashCollisions:!0}}}V_.ActorHashBindingsSha1=wW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(V_,t)})(Oj);var Ri={},k_={};Object.defineProperty(k_,"__esModule",{value:!0});k_.MediatorRace=void 0;const SW=et;class TW extends SW.Mediator{constructor(e){super(e)}mediateWith(e,r){return new Promise((n,a)=>{const s=[];for(const o of r)o.reply.then(()=>{n(o.actor)}).catch(u=>{s.push(u),s.length===r.length&&a(new Error(`${this.name} mediated over all rejecting actors: ${s.map(c=>c.message).join(` -`)}`))})})}}k_.MediatorRace=TW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(k_,t)})(Ri);var Rj={},Q_={},G_={},z_={};Object.defineProperty(z_,"__esModule",{value:!0});z_.ActorOptimizeQueryOperation=void 0;const EW=et;class OW extends EW.Actor{constructor(e){super(e)}}z_.ActorOptimizeQueryOperation=OW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(z_,t)})(G_);Object.defineProperty(Q_,"__esModule",{value:!0});Q_.ActorOptimizeQueryOperationJoinBgp=void 0;const AW=G_,RW=xt;class xW extends AW.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:RW.Util.mapOperation(e.operation,{join(n,a){return n.input.every(s=>s.type==="bgp")?{recurse:!1,result:a.createBgp(n.input.flatMap(s=>s.patterns))}:{recurse:!1,result:n}}}),context:e.context}}}Q_.ActorOptimizeQueryOperationJoinBgp=xW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Q_,t)})(Rj);var xj={},W_={};Object.defineProperty(W_,"__esModule",{value:!0});W_.ActorOptimizeQueryOperationBgpToJoin=void 0;const IW=G_,PW=xt;class DW extends IW.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:PW.Util.mapOperation(e.operation,{bgp(n,a){return{recurse:!1,result:a.createJoin(n.patterns)}}}),context:e.context}}}W_.ActorOptimizeQueryOperationBgpToJoin=DW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(W_,t)})(xj);var Ij={},X_={};Object.defineProperty(X_,"__esModule",{value:!0});X_.ActorOptimizeQueryOperationJoinConnected=void 0;const NW=G_,pP=xt;class Jh extends NW.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:pP.Util.mapOperation(e.operation,{join(n,a){return{recurse:!1,result:Jh.cluster(n,a)}}}),context:e.context}}static cluster(e,r){const n=e.input.map(u=>({inScopeVariables:Object.fromEntries(pP.Util.inScopeVariables(u).map(c=>[c.value,!0])),entries:[u]}));let a,s=n;do a=s,s=Jh.clusterIteration(a);while(a.length!==s.length);const o=s.map(u=>r.createJoin(u.entries));return o.length===1?o[0]:r.createJoin(o,!1)}static clusterIteration(e){const r=[];for(const n of e){let a=!1;for(const s of r)if(Jh.haveOverlappingVariables(n.inScopeVariables,s.inScopeVariables)){s.entries=[...s.entries,...n.entries],s.inScopeVariables={...s.inScopeVariables,...n.inScopeVariables},a=!0;break}a||r.push({inScopeVariables:n.inScopeVariables,entries:n.entries})}return r}static haveOverlappingVariables(e,r){for(const n of Object.keys(e))if(r[n])return!0;return!1}}X_.ActorOptimizeQueryOperationJoinConnected=Jh;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(X_,t)})(Ij);var Pj={},K_={},MA={},J_={};Object.defineProperty(J_,"__esModule",{value:!0});J_.ActorQueryParse=void 0;const CW=et;class jW extends CW.Actor{constructor(e){super(e)}}J_.ActorQueryParse=jW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(J_,t)})(MA);Object.defineProperty(K_,"__esModule",{value:!0});K_.ActorQueryParseSparql=void 0;const MW=MA,FW=xt,LW=o0;class BW extends MW.ActorQueryParse{constructor(e){super(e),this.prefixes=Object.freeze(this.prefixes)}async test(e){if(e.queryFormat&&e.queryFormat.language!=="sparql")throw new Error("This actor can only parse SPARQL queries");return!0}async run(e){const n=new LW.Parser({prefixes:this.prefixes,baseIRI:e.baseIRI,sparqlStar:!0}).parse(e.query);return{baseIRI:n.type==="query"?n.base:void 0,operation:(0,FW.translate)(n,{quads:!0,prefixes:this.prefixes,blankToVariable:!0,baseIRI:e.baseIRI})}}}K_.ActorQueryParseSparql=BW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(K_,t)})(Pj);var Dj={},Y_={},Nj={},FA={},LA={},Wo={};Object.defineProperty(Wo,"__esModule",{value:!0});Wo.DirectiveNodeHandlerAdapter=void 0;class $W{constructor(e,r,n){this.targetKind=e,this.util=r,this.settings=n}getDirectiveConditionalValue(e,r){const n=this.util.getArgument(e.arguments,"if");if(!n)throw new Error(`The directive ${e.name.value} is missing an if-argument.`);const a=this.util.handleNodeValue(n.value,n.name.value,r);if(a.terms.length!==1)throw new Error(`Can not apply the directive ${e.name.value} with a list.`);return a.terms[0]}isDirectiveScopeAll(e){const r=this.util.getArgument(e.arguments,"scope");return r&&r.value.kind==="EnumValue"&&r.value.value==="all"}}Wo.DirectiveNodeHandlerAdapter=$W;var Z_={};Object.defineProperty(Z_,"__esModule",{value:!0});Z_.DirectiveNodeHandlerInclude=void 0;const UW=Wo;class qW extends UW.DirectiveNodeHandlerAdapter{constructor(e,r){super("include",e,r)}handle(e,r){const n=this.getDirectiveConditionalValue(e.directive,r);return n.termType==="Literal"&&n.value==="false"?{ignore:!0}:{}}}Z_.DirectiveNodeHandlerInclude=qW;var eg={};Object.defineProperty(eg,"__esModule",{value:!0});eg.DirectiveNodeHandlerOptional=void 0;const VW=Wo;class HW extends VW.DirectiveNodeHandlerAdapter{constructor(e,r){super("optional",e,r)}handle(e,r){return{operationOverrider:n=>this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),n)}}}eg.DirectiveNodeHandlerOptional=HW;var tg={},Tf={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SingularizeState=void 0,function(e){e[e.SINGLE=0]="SINGLE",e[e.PLURAL=1]="PLURAL"}(t.SingularizeState||(t.SingularizeState={}))})(Tf);Object.defineProperty(tg,"__esModule",{value:!0});tg.DirectiveNodeHandlerPlural=void 0;const kW=Tf,QW=Wo;class GW extends QW.DirectiveNodeHandlerAdapter{constructor(e,r){super("plural",e,r)}handle(e,r){return this.isDirectiveScopeAll(e.directive)&&(r.singularizeState=kW.SingularizeState.PLURAL),delete r.singularizeVariables[this.util.nameToVariable(e.fieldLabel,r).value],{}}}tg.DirectiveNodeHandlerPlural=GW;var rg={};Object.defineProperty(rg,"__esModule",{value:!0});rg.DirectiveNodeHandlerSingle=void 0;const zW=Tf,WW=Wo;class XW extends WW.DirectiveNodeHandlerAdapter{constructor(e,r){super("single",e,r)}handle(e,r){return this.isDirectiveScopeAll(e.directive)&&(r.singularizeState=zW.SingularizeState.SINGLE),r.singularizeVariables[this.util.nameToVariable(e.fieldLabel,r).value]=!0,{}}}rg.DirectiveNodeHandlerSingle=XW;var ng={};Object.defineProperty(ng,"__esModule",{value:!0});ng.DirectiveNodeHandlerSkip=void 0;const KW=Wo;class JW extends KW.DirectiveNodeHandlerAdapter{constructor(e,r){super("skip",e,r)}handle(e,r){const n=this.getDirectiveConditionalValue(e.directive,r);return n.termType==="Literal"&&n.value==="true"?{ignore:!0}:{}}}ng.DirectiveNodeHandlerSkip=JW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Wo,t),r(Z_,t),r(eg,t),r(tg,t),r(rg,t),r(ng,t)})(LA);var Cj={},ua={};Object.defineProperty(ua,"__esModule",{value:!0});ua.NodeValueHandlerAdapter=void 0;class YW{constructor(e,r,n){this.targetKind=e,this.util=r,this.settings=n}}ua.NodeValueHandlerAdapter=YW;var ig={};Object.defineProperty(ig,"__esModule",{value:!0});ig.NodeValueHandlerBoolean=void 0;const ZW=ua;class eX extends ZW.NodeValueHandlerAdapter{constructor(e,r){super("BooleanValue",e,r),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#boolean")}handle(e,r,n){return{terms:[this.util.dataFactory.literal(e.value?"true":"false",this.datatype)]}}}ig.NodeValueHandlerBoolean=eX;var ag={};Object.defineProperty(ag,"__esModule",{value:!0});ag.NodeValueHandlerEnum=void 0;const tX=ua;class rX extends tX.NodeValueHandlerAdapter{constructor(e,r){super("EnumValue",e,r)}handle(e,r,n){return{terms:[this.util.valueToNamedNode(e.value,n.context)]}}}ag.NodeValueHandlerEnum=rX;var sg={};Object.defineProperty(sg,"__esModule",{value:!0});sg.NodeValueHandlerFloat=void 0;const nX=ua;class iX extends nX.NodeValueHandlerAdapter{constructor(e,r){super("FloatValue",e,r),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#float")}handle(e,r,n){return{terms:[this.util.dataFactory.literal(e.value,this.datatype)]}}}sg.NodeValueHandlerFloat=iX;var og={};Object.defineProperty(og,"__esModule",{value:!0});og.NodeValueHandlerInt=void 0;const aX=ua;class sX extends aX.NodeValueHandlerAdapter{constructor(e,r){super("IntValue",e,r),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#integer")}handle(e,r,n){return{terms:[this.util.dataFactory.literal(e.value,this.datatype)]}}}og.NodeValueHandlerInt=sX;var ug={};Object.defineProperty(ug,"__esModule",{value:!0});ug.NodeValueHandlerList=void 0;const oX=ua;class uX extends oX.NodeValueHandlerAdapter{constructor(e,r){super("ListValue",e,r),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,r,n){const a=[];let s=[];for(const o of e.values){const u=this.util.handleNodeValue(o,r,n);for(const c of u.terms)a.push(c);u.auxiliaryPatterns&&(s=s.concat(u.auxiliaryPatterns))}if(this.settings.arraysToRdfLists){const o=this.util.dataFactory.blankNode();let u=o,c=a.length;for(const l of a){s.push(this.util.operationFactory.createPattern(u,this.nodeFirst,l,n.graph));const d=--c===0?this.nodeNil:this.util.dataFactory.blankNode();s.push(this.util.operationFactory.createPattern(u,this.nodeRest,d,n.graph)),u=d}return{terms:[o],auxiliaryPatterns:s}}else return{terms:a,auxiliaryPatterns:s}}}ug.NodeValueHandlerList=uX;var cg={};Object.defineProperty(cg,"__esModule",{value:!0});cg.NodeValueHandlerNull=void 0;const cX=ua;class lX extends cX.NodeValueHandlerAdapter{constructor(e,r){super("NullValue",e,r),this.nil=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")}handle(e,r,n){return{terms:[this.nil]}}}cg.NodeValueHandlerNull=lX;var lg={};Object.defineProperty(lg,"__esModule",{value:!0});lg.NodeValueHandlerObject=void 0;const dX=ua;class fX extends dX.NodeValueHandlerAdapter{constructor(e,r){super("ObjectValue",e,r)}handle(e,r,n){const a=this.util.dataFactory.blankNode();let s=[];for(const o of e.fields){const u=this.util.handleNodeValue(o.value,r,n);for(const c of u.terms)s.push(this.util.createQuadPattern(a,o.name,c,n.graph,n.context));u.auxiliaryPatterns&&(s=s.concat(u.auxiliaryPatterns))}return{terms:[a],auxiliaryPatterns:s}}}lg.NodeValueHandlerObject=fX;var dg={};Object.defineProperty(dg,"__esModule",{value:!0});dg.NodeValueHandlerString=void 0;const hX=ua;class pX extends hX.NodeValueHandlerAdapter{constructor(e,r){super("StringValue",e,r)}handle(e,r,n){const a=n.context.getContextRaw()[r];let s,o;return a&&typeof a!="string"&&(a["@language"]?s=a["@language"]:a["@type"]&&(o=this.util.dataFactory.namedNode(a["@type"]))),{terms:[this.util.dataFactory.literal(e.value,s||o)]}}}dg.NodeValueHandlerString=pX;var fg={};Object.defineProperty(fg,"__esModule",{value:!0});fg.NodeValueHandlerVariable=void 0;const yX=ua;class bX extends yX.NodeValueHandlerAdapter{constructor(e,r){super("Variable",e,r)}handle(e,r,n){const a=e.name.value,s=n.variablesDict[a],o=n.variablesMetaDict[a];if(!s){if(!n.ignoreUnknownVariables&&(!o||o.mandatory))throw new Error(`Undefined variable: ${a}`);{const u=this.util.dataFactory.variable(a);return n.terminalVariables.map(c=>c.value).indexOf(a)<0&&n.terminalVariables.push(u),{terms:[u]}}}if(s.kind==="Variable")throw new Error(`Variable refers to another variable: ${a}`);if(o)if(o.list){if(s.kind!=="ListValue")throw new Error(`Expected a list, but got ${s.kind} for ${a}`);if(o.type){const u=s;for(const c of u.values)if(c.kind!==o.type)throw new Error(`Expected ${o.type}, but got ${c.kind} for ${a}`)}}else o.type;return this.util.handleNodeValue(s,r,n)}}fg.NodeValueHandlerVariable=bX;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(ua,t),r(ig,t),r(ag,t),r(sg,t),r(og,t),r(ug,t),r(cg,t),r(lg,t),r(dg,t),r(fg,t)})(Cj);var pl={};Object.defineProperty(pl,"__esModule",{value:!0});pl.NodeHandlerAdapter=void 0;class _X{constructor(e,r,n){this.targetKind=e,this.util=r,this.settings=n}getNodeQuadContextSelectionSet(e,r,n){const a={};if(e){for(const s of e.selections)if(s.kind==="Field"){const o=s;this.handleNodeQuadContextField(o,n,a,"id","subject"),this.handleNodeQuadContextField(o,n,a,"graph","graph")}}return a}handleNodeQuadContextField(e,r,n,a,s){if(!n[s]&&e.name.value===a){if(!n[s]){const o=this.util.getArgument(e.arguments,"_");if(o){const u=this.util.handleNodeValue(o.value,e.name.value,r);if(u.terms.length!==1)throw new Error(`Only single values can be set as ${a}, but got ${u.terms.length} at ${e.name.value}`);n[s]=u.terms[0],u.auxiliaryPatterns&&(n.auxiliaryPatterns||(n.auxiliaryPatterns=[]),n.auxiliaryPatterns.concat(u.auxiliaryPatterns))}}if(!n[s]){const o=this.util.nameToVariable(this.util.getFieldLabel(e),r);r.terminalVariables.push(o),n[s]=o}}}getDirectiveOutputs(e,r,n){const a=[];if(e)for(const s of e){const o=this.util.handleDirectiveNode({directive:s,fieldLabel:r},n);if(o){if(o.ignore)return null;a.push(o)}}return a}handleDirectiveOutputs(e,r){for(const n of e){if(n.ignore)return this.util.operationFactory.createBgp([]);n.operationOverrider&&(r=n.operationOverrider(r))}return r}}pl.NodeHandlerAdapter=_X;var Ef={};Object.defineProperty(Ef,"__esModule",{value:!0});Ef.NodeHandlerDefinitionAdapter=void 0;const gX=pl;class mX extends gX.NodeHandlerAdapter{constructor(e,r,n){super(e,r,n)}}Ef.NodeHandlerDefinitionAdapter=mX;var hg={};Object.defineProperty(hg,"__esModule",{value:!0});hg.NodeHandlerDefinitionFragment=void 0;const vX=Ef;class wX extends vX.NodeHandlerDefinitionAdapter{constructor(e,r){super("FragmentDefinition",e,r)}handle(e,r){throw new Error("Illegal state: fragment definitions must be indexed and removed before processing")}}hg.NodeHandlerDefinitionFragment=wX;var pg={};Object.defineProperty(pg,"__esModule",{value:!0});pg.NodeHandlerDefinitionOperation=void 0;const SX=Ef;class TX extends SX.NodeHandlerDefinitionAdapter{constructor(e,r){super("OperationDefinition",e,r)}handle(e,r){if(e.operation!=="query")throw new Error("Unsupported definition operation: "+e.operation);if(e.variableDefinitions)for(const s of e.variableDefinitions){const o=s.variable.name.value;s.defaultValue&&(r.variablesDict[o]||(r.variablesDict[o]=s.defaultValue));let u=s.type;const c=u.kind==="NonNullType";c&&(u=u.type);const l=u.kind==="ListType";l&&(u=u.type);const d=u.name.value;r.variablesMetaDict[o]={mandatory:c,list:l,type:d}}const n=this.getDirectiveOutputs(e.directives,e.name?e.name.value:"",r);if(!n)return this.util.operationFactory.createBgp([]);const a=this.util.joinOperations(e.selectionSet.selections.map(s=>this.util.handleNode(s,r)));return this.handleDirectiveOutputs(n,a)}}pg.NodeHandlerDefinitionOperation=TX;var yg={};Object.defineProperty(yg,"__esModule",{value:!0});yg.NodeHandlerDocument=void 0;const yP=xt,EX=pl;class OX extends EX.NodeHandlerAdapter{constructor(e,r){super("Document",e,r)}handle(e,r){const n=e.definitions.map(s=>{const o=this.getNodeQuadContextDefinitionNode(s,Object.assign(Object.assign({},r),{ignoreUnknownVariables:!0})),u=Object.assign(Object.assign({},r),{graph:o.graph||r.graph,subject:o.subject||this.util.dataFactory.blankNode()});let c=this.util.handleNode(s,u);return o&&o.auxiliaryPatterns&&(c=this.util.joinOperations([c,this.util.operationFactory.createBgp(o.auxiliaryPatterns)])),c}),a=this.util.operationFactory.createProject(n.length===1?n[0]:this.util.operationFactory.createUnion(n),r.terminalVariables);return this.translateBlankNodesToVariables(a)}getNodeQuadContextDefinitionNode(e,r){if(e.kind==="OperationDefinition")return this.getNodeQuadContextSelectionSet(e.selectionSet,e.name?e.name.value:"",r);throw new Error(`Unsupported definition: ${e.kind}`)}translateBlankNodesToVariables(e){const r=this,n={},a=Array.from(e.variables).reduce((o,u)=>(o[u.value]=!0,o),{});return yP.Util.mapOperation(e,{path:(o,u)=>({recurse:!1,result:u.createPath(s(o.subject),o.predicate,s(o.object),s(o.graph))}),pattern:(o,u)=>({recurse:!1,result:u.createPattern(s(o.subject),s(o.predicate),s(o.object),s(o.graph))})});function s(o){if(o.termType==="BlankNode"){let u=n[o.value];return u||(u=yP.Util.createUniqueVariable(o.value,a,r.util.dataFactory),a[u.value]=!0,n[o.value]=u),u}return o}}}yg.NodeHandlerDocument=OX;var yl={};Object.defineProperty(yl,"__esModule",{value:!0});yl.NodeHandlerSelectionAdapter=void 0;const AX=xt,RX=Tf,xX=pl;class IX extends xX.NodeHandlerAdapter{constructor(e,r,n){super(e,r,n)}getNodeQuadContextFieldNode(e,r,n){return this.getNodeQuadContextSelectionSet(e.selectionSet,r,Object.assign(Object.assign({},n),{path:this.util.appendFieldToPath(n.path,r)}))}fieldToOperation(e,r,n,a){const s=n;let o=0,u;if((r.name.value==="id"||r.name.value==="graph")&&(n=!1,r.arguments))for(const w of r.arguments)w.name.value==="_"&&this.util.handleNodeValue(w.value,r.name.value,e);const c=this.util.getFieldLabel(r);if(e.singularizeState===RX.SingularizeState.SINGLE&&(e.singularizeVariables[this.util.nameToVariable(c,e).value]=!0),n){const w=this.handleMetaField(e,c,a);if(w)return w}const l=a?[this.util.operationFactory.createBgp(a)]:[],d=this.getNodeQuadContextFieldNode(r,c,e);let f=d.subject||this.util.nameToVariable(c,e),h=d.graph||e.graph;d.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(d.auxiliaryPatterns));let p=!0,b=null;if(n&&r.arguments&&r.arguments.length){for(const w of r.arguments)if(w.name.value==="_"){const O=this.util.handleNodeValue(w.value,r.name.value,e);b=O.terms,l.push(this.util.operationFactory.createBgp(O.terms.map(A=>this.util.createQuadPattern(e.subject,r.name,A,e.graph,e.context)))),O.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(O.auxiliaryPatterns)),n=!1;break}else if(w.name.value==="graph"){const O=this.util.handleNodeValue(w.value,r.name.value,e);if(O.terms.length!==1)throw new Error(`Only single values can be set as graph, but got ${O.terms.length} at ${r.name.value}`);h=O.terms[0],e=Object.assign(Object.assign({},e),{graph:h}),O.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(O.auxiliaryPatterns));break}else if(w.name.value==="alt"){let O=w.value;O.kind!=="ListValue"&&(O={kind:"ListValue",values:[O]}),l.push(this.util.createQuadPath(e.subject,r.name,O,f,e.graph,e.context)),p=!1;break}}if(n&&p&&l.push(this.util.operationFactory.createBgp([this.util.createQuadPattern(e.subject,r.name,f,e.graph,e.context)])),r.arguments&&r.arguments.length){for(const w of r.arguments)if(!(w.name.value==="_"||w.name.value==="graph"||w.name.value==="alt"))if(w.name.value==="first"){if(w.value.kind!=="IntValue")throw new Error("Invalid value type for 'first' argument: "+w.value.kind);u=parseInt(w.value.value,10)}else if(w.name.value==="offset"){if(w.value.kind!=="IntValue")throw new Error("Invalid value type for 'offset' argument: "+w.value.kind);o=parseInt(w.value.value,10)}else{const O=this.util.handleNodeValue(w.value,w.name.value,e);l.push(this.util.operationFactory.createBgp(O.terms.map(A=>this.util.createQuadPattern(f,w.name,A,e.graph,e.context)))),O.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(O.auxiliaryPatterns))}}const _=this.getDirectiveOutputs(r.directives,c,e);if(!_)return this.util.operationFactory.createBgp([]);let E=this.util.joinOperations(l);if(r.selectionSet&&r.selectionSet.selections.length){if(b){if(b.length!==1)throw new Error(`Only single values can be set as id, but got ${b.length} at ${r.name.value}`);f=b[0]}const w=Object.assign(Object.assign(Object.assign({},e),s?{path:this.util.appendFieldToPath(e.path,c)}:{}),{graph:h,subject:s?f:e.subject});let O=!1;const A=r.selectionSet.selections.filter(I=>I.kind==="Field"&&I.name.value==="totalCount"?(O=!0,!1):!0);let T=this.util.joinOperations(l.concat(A.map(I=>this.util.handleNode(I,w))));if(O){const I=this.util.dataFactory.variable("var"+this.settings.expressionVariableCounter++),D=this.util.dataFactory.variable(f.value+this.settings.variableDelimiter+"totalCount"),U=this.util.operationFactory.createBoundAggregate(I,"count",this.util.operationFactory.createTermExpression(f),!1),H=this.util.operationFactory.createProject(this.util.operationFactory.createExtend(this.util.operationFactory.createGroup(E,[],[U]),D,this.util.operationFactory.createTermExpression(I)),[D]);e.terminalVariables.push(D),A.length?T=this.util.operationFactory.createJoin([this.util.operationFactory.createProject(T,[]),H]):T=H}E=T}else n&&f.termType==="Variable"&&e.terminalVariables.push(f);return(o||u)&&(E=this.util.operationFactory.createSlice(this.util.operationFactory.createProject(E,AX.Util.inScopeVariables(E)),o,u)),this.handleDirectiveOutputs(_,E)}handleMetaField(e,r,n){if(r==="__typename"){const a=this.util.nameToVariable(r,e);return e.terminalVariables.push(a),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(r,e),e.graph)].concat(n||[]))}}}yl.NodeHandlerSelectionAdapter=IX;var bg={};Object.defineProperty(bg,"__esModule",{value:!0});bg.NodeHandlerSelectionField=void 0;const PX=yl;class DX extends PX.NodeHandlerSelectionAdapter{constructor(e,r){super("Field",e,r)}handle(e,r){return this.fieldToOperation(r,e,!0)}}bg.NodeHandlerSelectionField=DX;var _g={};Object.defineProperty(_g,"__esModule",{value:!0});_g.NodeHandlerSelectionFragmentSpread=void 0;const NX=yl;class CX extends NX.NodeHandlerSelectionAdapter{constructor(e,r){super("FragmentSpread",e,r)}handle(e,r){const n=r.fragmentDefinitions[e.name.value];if(!n)throw new Error("Undefined fragment definition: "+e.name.value);const a={alias:void 0,arguments:void 0,directives:n.directives,kind:"Field",name:e.name,selectionSet:n.selectionSet},s=[this.util.newTypePattern(r.subject,n.typeCondition,r)];return this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),this.fieldToOperation(r,a,!1,s))}}_g.NodeHandlerSelectionFragmentSpread=CX;var gg={};Object.defineProperty(gg,"__esModule",{value:!0});gg.NodeHandlerSelectionInlineFragment=void 0;const jX=yl;class MX extends jX.NodeHandlerSelectionAdapter{constructor(e,r){super("InlineFragment",e,r)}handle(e,r){const n={alias:void 0,arguments:void 0,directives:e.directives,kind:"Field",name:{kind:"Name",value:r.subject.value},selectionSet:e.selectionSet},a=e.typeCondition?[this.util.newTypePattern(r.subject,e.typeCondition,r)]:[];return this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),this.fieldToOperation(r,n,!1,a))}}gg.NodeHandlerSelectionInlineFragment=MX;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(LA,t),r(Cj,t),r(pl,t),r(Ef,t),r(hg,t),r(pg,t),r(yg,t),r(yl,t),r(bg,t),r(_g,t),r(gg,t)})(FA);var mg={},jj=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag",FX=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0;const jE=FX;function U1(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?U1=function(r){return typeof r}:U1=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},U1(t)}var LX=10,Mj=2;function Fj(t){return vg(t,[])}function vg(t,e){switch(U1(t)){case"string":return JSON.stringify(t);case"function":return t.name?"[function ".concat(t.name,"]"):"[function]";case"object":return t===null?"null":BX(t,e);default:return String(t)}}function BX(t,e){if(e.indexOf(t)!==-1)return"[Circular]";var r=[].concat(e,[t]),n=qX(t);if(n!==void 0){var a=n.call(t);if(a!==t)return typeof a=="string"?a:vg(a,r)}else if(Array.isArray(t))return UX(t,r);return $X(t,r)}function $X(t,e){var r=Object.keys(t);if(r.length===0)return"{}";if(e.length>Mj)return"["+VX(t)+"]";var n=r.map(function(a){var s=vg(t[a],e);return a+": "+s});return"{ "+n.join(", ")+" }"}function UX(t,e){if(t.length===0)return"[]";if(e.length>Mj)return"[Array]";for(var r=Math.min(LX,t.length),n=t.length-r,a=[],s=0;s1&&a.push("... ".concat(n," more items")),"["+a.join(", ")+"]"}function qX(t){var e=t[String(jE)];if(typeof e=="function")return e;if(typeof t.inspect=="function")return t.inspect}function VX(t){var e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){var r=t.constructor.name;if(typeof r=="string"&&r!=="")return r}return e}function fS(t,e){var r=!!t;if(!r)throw new Error(e)}const HX=function(e,r){return e instanceof r};function bP(t,e){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof e=="string"||fS(0,"Body must be a string. Received: ".concat(Fj(e),".")),this.body=e,this.name=r,this.locationOffset=n,this.locationOffset.line>0||fS(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||fS(0,"column in locationOffset is 1-indexed and must be positive.")}return kX(t,[{key:jj,get:function(){return"Source"}}]),t}();function QX(t){return HX(t,BA)}function wb(t,e){for(var r=/\r\n|[\n\r]/g,n=1,a=e+1,s;(s=r.exec(t.body))&&s.indexs.type==="bgp")?{recurse:!1,result:a.createBgp(n.input.flatMap(s=>s.patterns))}:{recurse:!1,result:n}}}),context:e.context}}}Q_.ActorOptimizeQueryOperationJoinBgp=xW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Q_,t)})(Rj);var xj={},W_={};Object.defineProperty(W_,"__esModule",{value:!0});W_.ActorOptimizeQueryOperationBgpToJoin=void 0;const IW=G_,PW=xt;class DW extends IW.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:PW.Util.mapOperation(e.operation,{bgp(n,a){return{recurse:!1,result:a.createJoin(n.patterns)}}}),context:e.context}}}W_.ActorOptimizeQueryOperationBgpToJoin=DW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(W_,t)})(xj);var Ij={},X_={};Object.defineProperty(X_,"__esModule",{value:!0});X_.ActorOptimizeQueryOperationJoinConnected=void 0;const NW=G_,pP=xt;class Yh extends NW.ActorOptimizeQueryOperation{async test(e){return!0}async run(e){return{operation:pP.Util.mapOperation(e.operation,{join(n,a){return{recurse:!1,result:Yh.cluster(n,a)}}}),context:e.context}}static cluster(e,r){const n=e.input.map(u=>({inScopeVariables:Object.fromEntries(pP.Util.inScopeVariables(u).map(c=>[c.value,!0])),entries:[u]}));let a,s=n;do a=s,s=Yh.clusterIteration(a);while(a.length!==s.length);const o=s.map(u=>r.createJoin(u.entries));return o.length===1?o[0]:r.createJoin(o,!1)}static clusterIteration(e){const r=[];for(const n of e){let a=!1;for(const s of r)if(Yh.haveOverlappingVariables(n.inScopeVariables,s.inScopeVariables)){s.entries=[...s.entries,...n.entries],s.inScopeVariables={...s.inScopeVariables,...n.inScopeVariables},a=!0;break}a||r.push({inScopeVariables:n.inScopeVariables,entries:n.entries})}return r}static haveOverlappingVariables(e,r){for(const n of Object.keys(e))if(r[n])return!0;return!1}}X_.ActorOptimizeQueryOperationJoinConnected=Yh;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(X_,t)})(Ij);var Pj={},K_={},MA={},J_={};Object.defineProperty(J_,"__esModule",{value:!0});J_.ActorQueryParse=void 0;const CW=et;class jW extends CW.Actor{constructor(e){super(e)}}J_.ActorQueryParse=jW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(J_,t)})(MA);Object.defineProperty(K_,"__esModule",{value:!0});K_.ActorQueryParseSparql=void 0;const MW=MA,FW=xt,LW=u0;class BW extends MW.ActorQueryParse{constructor(e){super(e),this.prefixes=Object.freeze(this.prefixes)}async test(e){if(e.queryFormat&&e.queryFormat.language!=="sparql")throw new Error("This actor can only parse SPARQL queries");return!0}async run(e){const n=new LW.Parser({prefixes:this.prefixes,baseIRI:e.baseIRI,sparqlStar:!0}).parse(e.query);return{baseIRI:n.type==="query"?n.base:void 0,operation:(0,FW.translate)(n,{quads:!0,prefixes:this.prefixes,blankToVariable:!0,baseIRI:e.baseIRI})}}}K_.ActorQueryParseSparql=BW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(K_,t)})(Pj);var Dj={},Y_={},Nj={},FA={},LA={},Wo={};Object.defineProperty(Wo,"__esModule",{value:!0});Wo.DirectiveNodeHandlerAdapter=void 0;class $W{constructor(e,r,n){this.targetKind=e,this.util=r,this.settings=n}getDirectiveConditionalValue(e,r){const n=this.util.getArgument(e.arguments,"if");if(!n)throw new Error(`The directive ${e.name.value} is missing an if-argument.`);const a=this.util.handleNodeValue(n.value,n.name.value,r);if(a.terms.length!==1)throw new Error(`Can not apply the directive ${e.name.value} with a list.`);return a.terms[0]}isDirectiveScopeAll(e){const r=this.util.getArgument(e.arguments,"scope");return r&&r.value.kind==="EnumValue"&&r.value.value==="all"}}Wo.DirectiveNodeHandlerAdapter=$W;var Z_={};Object.defineProperty(Z_,"__esModule",{value:!0});Z_.DirectiveNodeHandlerInclude=void 0;const UW=Wo;class qW extends UW.DirectiveNodeHandlerAdapter{constructor(e,r){super("include",e,r)}handle(e,r){const n=this.getDirectiveConditionalValue(e.directive,r);return n.termType==="Literal"&&n.value==="false"?{ignore:!0}:{}}}Z_.DirectiveNodeHandlerInclude=qW;var eg={};Object.defineProperty(eg,"__esModule",{value:!0});eg.DirectiveNodeHandlerOptional=void 0;const VW=Wo;class HW extends VW.DirectiveNodeHandlerAdapter{constructor(e,r){super("optional",e,r)}handle(e,r){return{operationOverrider:n=>this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),n)}}}eg.DirectiveNodeHandlerOptional=HW;var tg={},Tf={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SingularizeState=void 0,function(e){e[e.SINGLE=0]="SINGLE",e[e.PLURAL=1]="PLURAL"}(t.SingularizeState||(t.SingularizeState={}))})(Tf);Object.defineProperty(tg,"__esModule",{value:!0});tg.DirectiveNodeHandlerPlural=void 0;const kW=Tf,QW=Wo;class GW extends QW.DirectiveNodeHandlerAdapter{constructor(e,r){super("plural",e,r)}handle(e,r){return this.isDirectiveScopeAll(e.directive)&&(r.singularizeState=kW.SingularizeState.PLURAL),delete r.singularizeVariables[this.util.nameToVariable(e.fieldLabel,r).value],{}}}tg.DirectiveNodeHandlerPlural=GW;var rg={};Object.defineProperty(rg,"__esModule",{value:!0});rg.DirectiveNodeHandlerSingle=void 0;const zW=Tf,WW=Wo;class XW extends WW.DirectiveNodeHandlerAdapter{constructor(e,r){super("single",e,r)}handle(e,r){return this.isDirectiveScopeAll(e.directive)&&(r.singularizeState=zW.SingularizeState.SINGLE),r.singularizeVariables[this.util.nameToVariable(e.fieldLabel,r).value]=!0,{}}}rg.DirectiveNodeHandlerSingle=XW;var ng={};Object.defineProperty(ng,"__esModule",{value:!0});ng.DirectiveNodeHandlerSkip=void 0;const KW=Wo;class JW extends KW.DirectiveNodeHandlerAdapter{constructor(e,r){super("skip",e,r)}handle(e,r){const n=this.getDirectiveConditionalValue(e.directive,r);return n.termType==="Literal"&&n.value==="true"?{ignore:!0}:{}}}ng.DirectiveNodeHandlerSkip=JW;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Wo,t),r(Z_,t),r(eg,t),r(tg,t),r(rg,t),r(ng,t)})(LA);var Cj={},ua={};Object.defineProperty(ua,"__esModule",{value:!0});ua.NodeValueHandlerAdapter=void 0;class YW{constructor(e,r,n){this.targetKind=e,this.util=r,this.settings=n}}ua.NodeValueHandlerAdapter=YW;var ig={};Object.defineProperty(ig,"__esModule",{value:!0});ig.NodeValueHandlerBoolean=void 0;const ZW=ua;class eX extends ZW.NodeValueHandlerAdapter{constructor(e,r){super("BooleanValue",e,r),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#boolean")}handle(e,r,n){return{terms:[this.util.dataFactory.literal(e.value?"true":"false",this.datatype)]}}}ig.NodeValueHandlerBoolean=eX;var ag={};Object.defineProperty(ag,"__esModule",{value:!0});ag.NodeValueHandlerEnum=void 0;const tX=ua;class rX extends tX.NodeValueHandlerAdapter{constructor(e,r){super("EnumValue",e,r)}handle(e,r,n){return{terms:[this.util.valueToNamedNode(e.value,n.context)]}}}ag.NodeValueHandlerEnum=rX;var sg={};Object.defineProperty(sg,"__esModule",{value:!0});sg.NodeValueHandlerFloat=void 0;const nX=ua;class iX extends nX.NodeValueHandlerAdapter{constructor(e,r){super("FloatValue",e,r),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#float")}handle(e,r,n){return{terms:[this.util.dataFactory.literal(e.value,this.datatype)]}}}sg.NodeValueHandlerFloat=iX;var og={};Object.defineProperty(og,"__esModule",{value:!0});og.NodeValueHandlerInt=void 0;const aX=ua;class sX extends aX.NodeValueHandlerAdapter{constructor(e,r){super("IntValue",e,r),this.datatype=this.util.dataFactory.namedNode("http://www.w3.org/2001/XMLSchema#integer")}handle(e,r,n){return{terms:[this.util.dataFactory.literal(e.value,this.datatype)]}}}og.NodeValueHandlerInt=sX;var ug={};Object.defineProperty(ug,"__esModule",{value:!0});ug.NodeValueHandlerList=void 0;const oX=ua;class uX extends oX.NodeValueHandlerAdapter{constructor(e,r){super("ListValue",e,r),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,r,n){const a=[];let s=[];for(const o of e.values){const u=this.util.handleNodeValue(o,r,n);for(const c of u.terms)a.push(c);u.auxiliaryPatterns&&(s=s.concat(u.auxiliaryPatterns))}if(this.settings.arraysToRdfLists){const o=this.util.dataFactory.blankNode();let u=o,c=a.length;for(const l of a){s.push(this.util.operationFactory.createPattern(u,this.nodeFirst,l,n.graph));const d=--c===0?this.nodeNil:this.util.dataFactory.blankNode();s.push(this.util.operationFactory.createPattern(u,this.nodeRest,d,n.graph)),u=d}return{terms:[o],auxiliaryPatterns:s}}else return{terms:a,auxiliaryPatterns:s}}}ug.NodeValueHandlerList=uX;var cg={};Object.defineProperty(cg,"__esModule",{value:!0});cg.NodeValueHandlerNull=void 0;const cX=ua;class lX extends cX.NodeValueHandlerAdapter{constructor(e,r){super("NullValue",e,r),this.nil=this.util.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")}handle(e,r,n){return{terms:[this.nil]}}}cg.NodeValueHandlerNull=lX;var lg={};Object.defineProperty(lg,"__esModule",{value:!0});lg.NodeValueHandlerObject=void 0;const dX=ua;class fX extends dX.NodeValueHandlerAdapter{constructor(e,r){super("ObjectValue",e,r)}handle(e,r,n){const a=this.util.dataFactory.blankNode();let s=[];for(const o of e.fields){const u=this.util.handleNodeValue(o.value,r,n);for(const c of u.terms)s.push(this.util.createQuadPattern(a,o.name,c,n.graph,n.context));u.auxiliaryPatterns&&(s=s.concat(u.auxiliaryPatterns))}return{terms:[a],auxiliaryPatterns:s}}}lg.NodeValueHandlerObject=fX;var dg={};Object.defineProperty(dg,"__esModule",{value:!0});dg.NodeValueHandlerString=void 0;const hX=ua;class pX extends hX.NodeValueHandlerAdapter{constructor(e,r){super("StringValue",e,r)}handle(e,r,n){const a=n.context.getContextRaw()[r];let s,o;return a&&typeof a!="string"&&(a["@language"]?s=a["@language"]:a["@type"]&&(o=this.util.dataFactory.namedNode(a["@type"]))),{terms:[this.util.dataFactory.literal(e.value,s||o)]}}}dg.NodeValueHandlerString=pX;var fg={};Object.defineProperty(fg,"__esModule",{value:!0});fg.NodeValueHandlerVariable=void 0;const yX=ua;class bX extends yX.NodeValueHandlerAdapter{constructor(e,r){super("Variable",e,r)}handle(e,r,n){const a=e.name.value,s=n.variablesDict[a],o=n.variablesMetaDict[a];if(!s){if(!n.ignoreUnknownVariables&&(!o||o.mandatory))throw new Error(`Undefined variable: ${a}`);{const u=this.util.dataFactory.variable(a);return n.terminalVariables.map(c=>c.value).indexOf(a)<0&&n.terminalVariables.push(u),{terms:[u]}}}if(s.kind==="Variable")throw new Error(`Variable refers to another variable: ${a}`);if(o)if(o.list){if(s.kind!=="ListValue")throw new Error(`Expected a list, but got ${s.kind} for ${a}`);if(o.type){const u=s;for(const c of u.values)if(c.kind!==o.type)throw new Error(`Expected ${o.type}, but got ${c.kind} for ${a}`)}}else o.type;return this.util.handleNodeValue(s,r,n)}}fg.NodeValueHandlerVariable=bX;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(ua,t),r(ig,t),r(ag,t),r(sg,t),r(og,t),r(ug,t),r(cg,t),r(lg,t),r(dg,t),r(fg,t)})(Cj);var pl={};Object.defineProperty(pl,"__esModule",{value:!0});pl.NodeHandlerAdapter=void 0;class _X{constructor(e,r,n){this.targetKind=e,this.util=r,this.settings=n}getNodeQuadContextSelectionSet(e,r,n){const a={};if(e){for(const s of e.selections)if(s.kind==="Field"){const o=s;this.handleNodeQuadContextField(o,n,a,"id","subject"),this.handleNodeQuadContextField(o,n,a,"graph","graph")}}return a}handleNodeQuadContextField(e,r,n,a,s){if(!n[s]&&e.name.value===a){if(!n[s]){const o=this.util.getArgument(e.arguments,"_");if(o){const u=this.util.handleNodeValue(o.value,e.name.value,r);if(u.terms.length!==1)throw new Error(`Only single values can be set as ${a}, but got ${u.terms.length} at ${e.name.value}`);n[s]=u.terms[0],u.auxiliaryPatterns&&(n.auxiliaryPatterns||(n.auxiliaryPatterns=[]),n.auxiliaryPatterns.concat(u.auxiliaryPatterns))}}if(!n[s]){const o=this.util.nameToVariable(this.util.getFieldLabel(e),r);r.terminalVariables.push(o),n[s]=o}}}getDirectiveOutputs(e,r,n){const a=[];if(e)for(const s of e){const o=this.util.handleDirectiveNode({directive:s,fieldLabel:r},n);if(o){if(o.ignore)return null;a.push(o)}}return a}handleDirectiveOutputs(e,r){for(const n of e){if(n.ignore)return this.util.operationFactory.createBgp([]);n.operationOverrider&&(r=n.operationOverrider(r))}return r}}pl.NodeHandlerAdapter=_X;var Ef={};Object.defineProperty(Ef,"__esModule",{value:!0});Ef.NodeHandlerDefinitionAdapter=void 0;const gX=pl;class mX extends gX.NodeHandlerAdapter{constructor(e,r,n){super(e,r,n)}}Ef.NodeHandlerDefinitionAdapter=mX;var hg={};Object.defineProperty(hg,"__esModule",{value:!0});hg.NodeHandlerDefinitionFragment=void 0;const vX=Ef;class wX extends vX.NodeHandlerDefinitionAdapter{constructor(e,r){super("FragmentDefinition",e,r)}handle(e,r){throw new Error("Illegal state: fragment definitions must be indexed and removed before processing")}}hg.NodeHandlerDefinitionFragment=wX;var pg={};Object.defineProperty(pg,"__esModule",{value:!0});pg.NodeHandlerDefinitionOperation=void 0;const SX=Ef;class TX extends SX.NodeHandlerDefinitionAdapter{constructor(e,r){super("OperationDefinition",e,r)}handle(e,r){if(e.operation!=="query")throw new Error("Unsupported definition operation: "+e.operation);if(e.variableDefinitions)for(const s of e.variableDefinitions){const o=s.variable.name.value;s.defaultValue&&(r.variablesDict[o]||(r.variablesDict[o]=s.defaultValue));let u=s.type;const c=u.kind==="NonNullType";c&&(u=u.type);const l=u.kind==="ListType";l&&(u=u.type);const d=u.name.value;r.variablesMetaDict[o]={mandatory:c,list:l,type:d}}const n=this.getDirectiveOutputs(e.directives,e.name?e.name.value:"",r);if(!n)return this.util.operationFactory.createBgp([]);const a=this.util.joinOperations(e.selectionSet.selections.map(s=>this.util.handleNode(s,r)));return this.handleDirectiveOutputs(n,a)}}pg.NodeHandlerDefinitionOperation=TX;var yg={};Object.defineProperty(yg,"__esModule",{value:!0});yg.NodeHandlerDocument=void 0;const yP=xt,EX=pl;class OX extends EX.NodeHandlerAdapter{constructor(e,r){super("Document",e,r)}handle(e,r){const n=e.definitions.map(s=>{const o=this.getNodeQuadContextDefinitionNode(s,Object.assign(Object.assign({},r),{ignoreUnknownVariables:!0})),u=Object.assign(Object.assign({},r),{graph:o.graph||r.graph,subject:o.subject||this.util.dataFactory.blankNode()});let c=this.util.handleNode(s,u);return o&&o.auxiliaryPatterns&&(c=this.util.joinOperations([c,this.util.operationFactory.createBgp(o.auxiliaryPatterns)])),c}),a=this.util.operationFactory.createProject(n.length===1?n[0]:this.util.operationFactory.createUnion(n),r.terminalVariables);return this.translateBlankNodesToVariables(a)}getNodeQuadContextDefinitionNode(e,r){if(e.kind==="OperationDefinition")return this.getNodeQuadContextSelectionSet(e.selectionSet,e.name?e.name.value:"",r);throw new Error(`Unsupported definition: ${e.kind}`)}translateBlankNodesToVariables(e){const r=this,n={},a=Array.from(e.variables).reduce((o,u)=>(o[u.value]=!0,o),{});return yP.Util.mapOperation(e,{path:(o,u)=>({recurse:!1,result:u.createPath(s(o.subject),o.predicate,s(o.object),s(o.graph))}),pattern:(o,u)=>({recurse:!1,result:u.createPattern(s(o.subject),s(o.predicate),s(o.object),s(o.graph))})});function s(o){if(o.termType==="BlankNode"){let u=n[o.value];return u||(u=yP.Util.createUniqueVariable(o.value,a,r.util.dataFactory),a[u.value]=!0,n[o.value]=u),u}return o}}}yg.NodeHandlerDocument=OX;var yl={};Object.defineProperty(yl,"__esModule",{value:!0});yl.NodeHandlerSelectionAdapter=void 0;const AX=xt,RX=Tf,xX=pl;class IX extends xX.NodeHandlerAdapter{constructor(e,r,n){super(e,r,n)}getNodeQuadContextFieldNode(e,r,n){return this.getNodeQuadContextSelectionSet(e.selectionSet,r,Object.assign(Object.assign({},n),{path:this.util.appendFieldToPath(n.path,r)}))}fieldToOperation(e,r,n,a){const s=n;let o=0,u;if((r.name.value==="id"||r.name.value==="graph")&&(n=!1,r.arguments))for(const w of r.arguments)w.name.value==="_"&&this.util.handleNodeValue(w.value,r.name.value,e);const c=this.util.getFieldLabel(r);if(e.singularizeState===RX.SingularizeState.SINGLE&&(e.singularizeVariables[this.util.nameToVariable(c,e).value]=!0),n){const w=this.handleMetaField(e,c,a);if(w)return w}const l=a?[this.util.operationFactory.createBgp(a)]:[],d=this.getNodeQuadContextFieldNode(r,c,e);let f=d.subject||this.util.nameToVariable(c,e),h=d.graph||e.graph;d.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(d.auxiliaryPatterns));let p=!0,b=null;if(n&&r.arguments&&r.arguments.length){for(const w of r.arguments)if(w.name.value==="_"){const O=this.util.handleNodeValue(w.value,r.name.value,e);b=O.terms,l.push(this.util.operationFactory.createBgp(O.terms.map(A=>this.util.createQuadPattern(e.subject,r.name,A,e.graph,e.context)))),O.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(O.auxiliaryPatterns)),n=!1;break}else if(w.name.value==="graph"){const O=this.util.handleNodeValue(w.value,r.name.value,e);if(O.terms.length!==1)throw new Error(`Only single values can be set as graph, but got ${O.terms.length} at ${r.name.value}`);h=O.terms[0],e=Object.assign(Object.assign({},e),{graph:h}),O.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(O.auxiliaryPatterns));break}else if(w.name.value==="alt"){let O=w.value;O.kind!=="ListValue"&&(O={kind:"ListValue",values:[O]}),l.push(this.util.createQuadPath(e.subject,r.name,O,f,e.graph,e.context)),p=!1;break}}if(n&&p&&l.push(this.util.operationFactory.createBgp([this.util.createQuadPattern(e.subject,r.name,f,e.graph,e.context)])),r.arguments&&r.arguments.length){for(const w of r.arguments)if(!(w.name.value==="_"||w.name.value==="graph"||w.name.value==="alt"))if(w.name.value==="first"){if(w.value.kind!=="IntValue")throw new Error("Invalid value type for 'first' argument: "+w.value.kind);u=parseInt(w.value.value,10)}else if(w.name.value==="offset"){if(w.value.kind!=="IntValue")throw new Error("Invalid value type for 'offset' argument: "+w.value.kind);o=parseInt(w.value.value,10)}else{const O=this.util.handleNodeValue(w.value,w.name.value,e);l.push(this.util.operationFactory.createBgp(O.terms.map(A=>this.util.createQuadPattern(f,w.name,A,e.graph,e.context)))),O.auxiliaryPatterns&&l.push(this.util.operationFactory.createBgp(O.auxiliaryPatterns))}}const _=this.getDirectiveOutputs(r.directives,c,e);if(!_)return this.util.operationFactory.createBgp([]);let E=this.util.joinOperations(l);if(r.selectionSet&&r.selectionSet.selections.length){if(b){if(b.length!==1)throw new Error(`Only single values can be set as id, but got ${b.length} at ${r.name.value}`);f=b[0]}const w=Object.assign(Object.assign(Object.assign({},e),s?{path:this.util.appendFieldToPath(e.path,c)}:{}),{graph:h,subject:s?f:e.subject});let O=!1;const A=r.selectionSet.selections.filter(I=>I.kind==="Field"&&I.name.value==="totalCount"?(O=!0,!1):!0);let T=this.util.joinOperations(l.concat(A.map(I=>this.util.handleNode(I,w))));if(O){const I=this.util.dataFactory.variable("var"+this.settings.expressionVariableCounter++),D=this.util.dataFactory.variable(f.value+this.settings.variableDelimiter+"totalCount"),U=this.util.operationFactory.createBoundAggregate(I,"count",this.util.operationFactory.createTermExpression(f),!1),H=this.util.operationFactory.createProject(this.util.operationFactory.createExtend(this.util.operationFactory.createGroup(E,[],[U]),D,this.util.operationFactory.createTermExpression(I)),[D]);e.terminalVariables.push(D),A.length?T=this.util.operationFactory.createJoin([this.util.operationFactory.createProject(T,[]),H]):T=H}E=T}else n&&f.termType==="Variable"&&e.terminalVariables.push(f);return(o||u)&&(E=this.util.operationFactory.createSlice(this.util.operationFactory.createProject(E,AX.Util.inScopeVariables(E)),o,u)),this.handleDirectiveOutputs(_,E)}handleMetaField(e,r,n){if(r==="__typename"){const a=this.util.nameToVariable(r,e);return e.terminalVariables.push(a),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(r,e),e.graph)].concat(n||[]))}}}yl.NodeHandlerSelectionAdapter=IX;var bg={};Object.defineProperty(bg,"__esModule",{value:!0});bg.NodeHandlerSelectionField=void 0;const PX=yl;class DX extends PX.NodeHandlerSelectionAdapter{constructor(e,r){super("Field",e,r)}handle(e,r){return this.fieldToOperation(r,e,!0)}}bg.NodeHandlerSelectionField=DX;var _g={};Object.defineProperty(_g,"__esModule",{value:!0});_g.NodeHandlerSelectionFragmentSpread=void 0;const NX=yl;class CX extends NX.NodeHandlerSelectionAdapter{constructor(e,r){super("FragmentSpread",e,r)}handle(e,r){const n=r.fragmentDefinitions[e.name.value];if(!n)throw new Error("Undefined fragment definition: "+e.name.value);const a={alias:void 0,arguments:void 0,directives:n.directives,kind:"Field",name:e.name,selectionSet:n.selectionSet},s=[this.util.newTypePattern(r.subject,n.typeCondition,r)];return this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),this.fieldToOperation(r,a,!1,s))}}_g.NodeHandlerSelectionFragmentSpread=CX;var gg={};Object.defineProperty(gg,"__esModule",{value:!0});gg.NodeHandlerSelectionInlineFragment=void 0;const jX=yl;class MX extends jX.NodeHandlerSelectionAdapter{constructor(e,r){super("InlineFragment",e,r)}handle(e,r){const n={alias:void 0,arguments:void 0,directives:e.directives,kind:"Field",name:{kind:"Name",value:r.subject.value},selectionSet:e.selectionSet},a=e.typeCondition?[this.util.newTypePattern(r.subject,e.typeCondition,r)]:[];return this.util.operationFactory.createLeftJoin(this.util.operationFactory.createBgp([]),this.fieldToOperation(r,n,!1,a))}}gg.NodeHandlerSelectionInlineFragment=MX;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(LA,t),r(Cj,t),r(pl,t),r(Ef,t),r(hg,t),r(pg,t),r(yg,t),r(yl,t),r(bg,t),r(_g,t),r(gg,t)})(FA);var mg={},jj=typeof Symbol=="function"&&Symbol.toStringTag!=null?Symbol.toStringTag:"@@toStringTag",FX=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0;const jE=FX;function U1(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?U1=function(r){return typeof r}:U1=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},U1(t)}var LX=10,Mj=2;function Fj(t){return vg(t,[])}function vg(t,e){switch(U1(t)){case"string":return JSON.stringify(t);case"function":return t.name?"[function ".concat(t.name,"]"):"[function]";case"object":return t===null?"null":BX(t,e);default:return String(t)}}function BX(t,e){if(e.indexOf(t)!==-1)return"[Circular]";var r=[].concat(e,[t]),n=qX(t);if(n!==void 0){var a=n.call(t);if(a!==t)return typeof a=="string"?a:vg(a,r)}else if(Array.isArray(t))return UX(t,r);return $X(t,r)}function $X(t,e){var r=Object.keys(t);if(r.length===0)return"{}";if(e.length>Mj)return"["+VX(t)+"]";var n=r.map(function(a){var s=vg(t[a],e);return a+": "+s});return"{ "+n.join(", ")+" }"}function UX(t,e){if(t.length===0)return"[]";if(e.length>Mj)return"[Array]";for(var r=Math.min(LX,t.length),n=t.length-r,a=[],s=0;s1&&a.push("... ".concat(n," more items")),"["+a.join(", ")+"]"}function qX(t){var e=t[String(jE)];if(typeof e=="function")return e;if(typeof t.inspect=="function")return t.inspect}function VX(t){var e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){var r=t.constructor.name;if(typeof r=="string"&&r!=="")return r}return e}function fS(t,e){var r=!!t;if(!r)throw new Error(e)}const HX=function(e,r){return e instanceof r};function bP(t,e){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:"GraphQL request",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{line:1,column:1};typeof e=="string"||fS(0,"Body must be a string. Received: ".concat(Fj(e),".")),this.body=e,this.name=r,this.locationOffset=n,this.locationOffset.line>0||fS(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||fS(0,"column in locationOffset is 1-indexed and must be positive.")}return kX(t,[{key:jj,get:function(){return"Source"}}]),t}();function QX(t){return HX(t,BA)}function wb(t,e){for(var r=/\r\n|[\n\r]/g,n=1,a=e+1,s;(s=r.exec(t.body))&&s.index120){for(var h=Math.floor(c/80),p=c%80,b=[],_=0;_",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"});function V1(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V1=function(r){return typeof r}:V1=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},V1(t)}function zX(t){return V1(t)=="object"&&t!==null}function H1(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H1=function(r){return typeof r}:H1=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},H1(t)}function gP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function WX(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function eK(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function gp(t,e){return gp=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},gp(t,e)}function mp(t){return mp=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},mp(t)}var tK=function(t){YX(r,t);var e=ZX(r);function r(n,a,s,o,u,c,l){var d,f,h,p;KX(this,r),p=e.call(this,n),p.name="GraphQLError",p.originalError=c??void 0,p.nodes=vP(Array.isArray(a)?a:a?[a]:void 0);for(var b=[],_=0,E=(w=p.nodes)!==null&&w!==void 0?w:[];_0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),c!=null&&c.stack?(Object.defineProperty(Bh(p),"stack",{value:c.stack,writable:!0,configurable:!0}),Bj(p)):(Error.captureStackTrace?Error.captureStackTrace(Bh(p),r):Object.defineProperty(Bh(p),"stack",{value:Error().stack,writable:!0,configurable:!0}),p)}return JX(r,[{key:"toString",value:function(){return rK(this)}},{key:jj,get:function(){return"Object"}}]),r}(ME(Error));function vP(t){return t===void 0||t.length===0?void 0:t}function rK(t){var e=t.message;if(t.nodes)for(var r=0,n=t.nodes;r",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"});function V1(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?V1=function(r){return typeof r}:V1=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},V1(t)}function zX(t){return V1(t)=="object"&&t!==null}function H1(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H1=function(r){return typeof r}:H1=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},H1(t)}function gP(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function WX(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function eK(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function mp(t,e){return mp=Object.setPrototypeOf||function(n,a){return n.__proto__=a,n},mp(t,e)}function vp(t){return vp=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},vp(t)}var tK=function(t){YX(r,t);var e=ZX(r);function r(n,a,s,o,u,c,l){var d,f,h,p;KX(this,r),p=e.call(this,n),p.name="GraphQLError",p.originalError=c??void 0,p.nodes=vP(Array.isArray(a)?a:a?[a]:void 0);for(var b=[],_=0,E=(w=p.nodes)!==null&&w!==void 0?w:[];_0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),c!=null&&c.stack?(Object.defineProperty($h(p),"stack",{value:c.stack,writable:!0,configurable:!0}),Bj(p)):(Error.captureStackTrace?Error.captureStackTrace($h(p),r):Object.defineProperty($h(p),"stack",{value:Error().stack,writable:!0,configurable:!0}),p)}return JX(r,[{key:"toString",value:function(){return rK(this)}},{key:jj,get:function(){return"Object"}}]),r}(ME(Error));function vP(t){return t===void 0||t.length===0?void 0:t}function rK(t){var e=t.message;if(t.nodes)for(var r=0,n=t.nodes;rc.message).join(` `+e),c+=e?t.replace(/\n/g,` `+e):t,u&&(c+=` `),'"""'+c.replace(/"""/g,'\\"""')+'"""'}var qj=function(){function t(r){var n=new Vr(Ie.SOF,0,0,0,0,null);this.source=r,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}var e=t.prototype;return e.advance=function(){this.lastToken=this.token;var n=this.token=this.lookahead();return n},e.lookahead=function(){var n=this.token;if(n.kind!==Ie.EOF)do{var a;n=(a=n.next)!==null&&a!==void 0?a:n.next=uK(this,n)}while(n.kind===Ie.COMMENT);return n},t}();function oK(t){return t===Ie.BANG||t===Ie.DOLLAR||t===Ie.AMP||t===Ie.PAREN_L||t===Ie.PAREN_R||t===Ie.SPREAD||t===Ie.COLON||t===Ie.EQUALS||t===Ie.AT||t===Ie.BRACKET_L||t===Ie.BRACKET_R||t===Ie.BRACE_L||t===Ie.PIPE||t===Ie.BRACE_R}function nl(t){return isNaN(t)?Ie.EOF:t<127?JSON.stringify(String.fromCharCode(t)):'"\\u'.concat(("00"+t.toString(16).toUpperCase()).slice(-4),'"')}function uK(t,e){for(var r=t.source,n=r.body,a=n.length,s=e.end;s31||o===9));return new Vr(Ie.COMMENT,e,u,r,n,a,s.slice(e+1,u))}function dK(t,e,r,n,a,s){var o=t.body,u=r,c=e,l=!1;if(u===45&&(u=o.charCodeAt(++c)),u===48){if(u=o.charCodeAt(++c),u>=48&&u<=57)throw ta(t,c,"Invalid number, unexpected digit after 0: ".concat(nl(u),"."))}else c=hS(t,c,u),u=o.charCodeAt(c);if(u===46&&(l=!0,u=o.charCodeAt(++c),c=hS(t,c,u),u=o.charCodeAt(c)),(u===69||u===101)&&(l=!0,u=o.charCodeAt(++c),(u===43||u===45)&&(u=o.charCodeAt(++c)),c=hS(t,c,u),u=o.charCodeAt(c)),u===46||bK(u))throw ta(t,c,"Invalid number, expected digit but got: ".concat(nl(u),"."));return new Vr(l?Ie.FLOAT:Ie.INT,e,c,n,a,s,o.slice(e,c))}function hS(t,e,r){var n=t.body,a=e,s=r;if(s>=48&&s<=57){do s=n.charCodeAt(++a);while(s>=48&&s<=57);return a}throw ta(t,a,"Invalid number, expected digit but got: ".concat(nl(s),"."))}function fK(t,e,r,n,a){for(var s=t.body,o=e+1,u=o,c=0,l="";o=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function yK(t,e,r,n,a){for(var s=t.body,o=s.length,u=e+1,c=0;u!==o&&!isNaN(c=s.charCodeAt(u))&&(c===95||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++u;return new Vr(Ie.NAME,e,u,r,n,a,s.slice(e,u))}function bK(t){return t===95||t>=65&&t<=90||t>=97&&t<=122}var Vj=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"});function _K(t,e){var r=new qA(t,e);return r.parseDocument()}function gK(t,e){var r=new qA(t,e);r.expectToken(Ie.SOF);var n=r.parseValueLiteral(!1);return r.expectToken(Ie.EOF),n}function mK(t,e){var r=new qA(t,e);r.expectToken(Ie.SOF);var n=r.parseTypeReference();return r.expectToken(Ie.EOF),n}var qA=function(){function t(r,n){var a=QX(r)?r:new BA(r);this._lexer=new qj(a),this._options=n}var e=t.prototype;return e.parseName=function(){var n=this.expectToken(Ie.NAME);return{kind:Ve.NAME,value:n.value,loc:this.loc(n)}},e.parseDocument=function(){var n=this._lexer.token;return{kind:Ve.DOCUMENT,definitions:this.many(Ie.SOF,this.parseDefinition,Ie.EOF),loc:this.loc(n)}},e.parseDefinition=function(){if(this.peek(Ie.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(Ie.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},e.parseOperationDefinition=function(){var n=this._lexer.token;if(this.peek(Ie.BRACE_L))return{kind:Ve.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(n)};var a=this.parseOperationType(),s;return this.peek(Ie.NAME)&&(s=this.parseName()),{kind:Ve.OPERATION_DEFINITION,operation:a,name:s,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},e.parseOperationType=function(){var n=this.expectToken(Ie.NAME);switch(n.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(n)},e.parseVariableDefinitions=function(){return this.optionalMany(Ie.PAREN_L,this.parseVariableDefinition,Ie.PAREN_R)},e.parseVariableDefinition=function(){var n=this._lexer.token;return{kind:Ve.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Ie.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Ie.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(n)}},e.parseVariable=function(){var n=this._lexer.token;return this.expectToken(Ie.DOLLAR),{kind:Ve.VARIABLE,name:this.parseName(),loc:this.loc(n)}},e.parseSelectionSet=function(){var n=this._lexer.token;return{kind:Ve.SELECTION_SET,selections:this.many(Ie.BRACE_L,this.parseSelection,Ie.BRACE_R),loc:this.loc(n)}},e.parseSelection=function(){return this.peek(Ie.SPREAD)?this.parseFragment():this.parseField()},e.parseField=function(){var n=this._lexer.token,a=this.parseName(),s,o;return this.expectOptionalToken(Ie.COLON)?(s=a,o=this.parseName()):o=a,{kind:Ve.FIELD,alias:s,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Ie.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},e.parseArguments=function(n){var a=n?this.parseConstArgument:this.parseArgument;return this.optionalMany(Ie.PAREN_L,a,Ie.PAREN_R)},e.parseArgument=function(){var n=this._lexer.token,a=this.parseName();return this.expectToken(Ie.COLON),{kind:Ve.ARGUMENT,name:a,value:this.parseValueLiteral(!1),loc:this.loc(n)}},e.parseConstArgument=function(){var n=this._lexer.token;return{kind:Ve.ARGUMENT,name:this.parseName(),value:(this.expectToken(Ie.COLON),this.parseValueLiteral(!0)),loc:this.loc(n)}},e.parseFragment=function(){var n=this._lexer.token;this.expectToken(Ie.SPREAD);var a=this.expectOptionalKeyword("on");return!a&&this.peek(Ie.NAME)?{kind:Ve.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(n)}:{kind:Ve.INLINE_FRAGMENT,typeCondition:a?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},e.parseFragmentDefinition=function(){var n,a=this._lexer.token;return this.expectKeyword("fragment"),((n=this._options)===null||n===void 0?void 0:n.experimentalFragmentVariables)===!0?{kind:Ve.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(a)}:{kind:Ve.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(a)}},e.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},e.parseValueLiteral=function(n){var a=this._lexer.token;switch(a.kind){case Ie.BRACKET_L:return this.parseList(n);case Ie.BRACE_L:return this.parseObject(n);case Ie.INT:return this._lexer.advance(),{kind:Ve.INT,value:a.value,loc:this.loc(a)};case Ie.FLOAT:return this._lexer.advance(),{kind:Ve.FLOAT,value:a.value,loc:this.loc(a)};case Ie.STRING:case Ie.BLOCK_STRING:return this.parseStringLiteral();case Ie.NAME:switch(this._lexer.advance(),a.value){case"true":return{kind:Ve.BOOLEAN,value:!0,loc:this.loc(a)};case"false":return{kind:Ve.BOOLEAN,value:!1,loc:this.loc(a)};case"null":return{kind:Ve.NULL,loc:this.loc(a)};default:return{kind:Ve.ENUM,value:a.value,loc:this.loc(a)}}case Ie.DOLLAR:if(!n)return this.parseVariable();break}throw this.unexpected()},e.parseStringLiteral=function(){var n=this._lexer.token;return this._lexer.advance(),{kind:Ve.STRING,value:n.value,block:n.kind===Ie.BLOCK_STRING,loc:this.loc(n)}},e.parseList=function(n){var a=this,s=this._lexer.token,o=function(){return a.parseValueLiteral(n)};return{kind:Ve.LIST,values:this.any(Ie.BRACKET_L,o,Ie.BRACKET_R),loc:this.loc(s)}},e.parseObject=function(n){var a=this,s=this._lexer.token,o=function(){return a.parseObjectField(n)};return{kind:Ve.OBJECT,fields:this.any(Ie.BRACE_L,o,Ie.BRACE_R),loc:this.loc(s)}},e.parseObjectField=function(n){var a=this._lexer.token,s=this.parseName();return this.expectToken(Ie.COLON),{kind:Ve.OBJECT_FIELD,name:s,value:this.parseValueLiteral(n),loc:this.loc(a)}},e.parseDirectives=function(n){for(var a=[];this.peek(Ie.AT);)a.push(this.parseDirective(n));return a},e.parseDirective=function(n){var a=this._lexer.token;return this.expectToken(Ie.AT),{kind:Ve.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(n),loc:this.loc(a)}},e.parseTypeReference=function(){var n=this._lexer.token,a;return this.expectOptionalToken(Ie.BRACKET_L)?(a=this.parseTypeReference(),this.expectToken(Ie.BRACKET_R),a={kind:Ve.LIST_TYPE,type:a,loc:this.loc(n)}):a=this.parseNamedType(),this.expectOptionalToken(Ie.BANG)?{kind:Ve.NON_NULL_TYPE,type:a,loc:this.loc(n)}:a},e.parseNamedType=function(){var n=this._lexer.token;return{kind:Ve.NAMED_TYPE,name:this.parseName(),loc:this.loc(n)}},e.parseTypeSystemDefinition=function(){var n=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(n.kind===Ie.NAME)switch(n.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(n)},e.peekDescription=function(){return this.peek(Ie.STRING)||this.peek(Ie.BLOCK_STRING)},e.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},e.parseSchemaDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("schema");var s=this.parseDirectives(!0),o=this.many(Ie.BRACE_L,this.parseOperationTypeDefinition,Ie.BRACE_R);return{kind:Ve.SCHEMA_DEFINITION,description:a,directives:s,operationTypes:o,loc:this.loc(n)}},e.parseOperationTypeDefinition=function(){var n=this._lexer.token,a=this.parseOperationType();this.expectToken(Ie.COLON);var s=this.parseNamedType();return{kind:Ve.OPERATION_TYPE_DEFINITION,operation:a,type:s,loc:this.loc(n)}},e.parseScalarTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("scalar");var s=this.parseName(),o=this.parseDirectives(!0);return{kind:Ve.SCALAR_TYPE_DEFINITION,description:a,name:s,directives:o,loc:this.loc(n)}},e.parseObjectTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("type");var s=this.parseName(),o=this.parseImplementsInterfaces(),u=this.parseDirectives(!0),c=this.parseFieldsDefinition();return{kind:Ve.OBJECT_TYPE_DEFINITION,description:a,name:s,interfaces:o,directives:u,fields:c,loc:this.loc(n)}},e.parseImplementsInterfaces=function(){var n;if(!this.expectOptionalKeyword("implements"))return[];if(((n=this._options)===null||n===void 0?void 0:n.allowLegacySDLImplementsInterfaces)===!0){var a=[];this.expectOptionalToken(Ie.AMP);do a.push(this.parseNamedType());while(this.expectOptionalToken(Ie.AMP)||this.peek(Ie.NAME));return a}return this.delimitedMany(Ie.AMP,this.parseNamedType)},e.parseFieldsDefinition=function(){var n;return((n=this._options)===null||n===void 0?void 0:n.allowLegacySDLEmptyFields)===!0&&this.peek(Ie.BRACE_L)&&this._lexer.lookahead().kind===Ie.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(Ie.BRACE_L,this.parseFieldDefinition,Ie.BRACE_R)},e.parseFieldDefinition=function(){var n=this._lexer.token,a=this.parseDescription(),s=this.parseName(),o=this.parseArgumentDefs();this.expectToken(Ie.COLON);var u=this.parseTypeReference(),c=this.parseDirectives(!0);return{kind:Ve.FIELD_DEFINITION,description:a,name:s,arguments:o,type:u,directives:c,loc:this.loc(n)}},e.parseArgumentDefs=function(){return this.optionalMany(Ie.PAREN_L,this.parseInputValueDef,Ie.PAREN_R)},e.parseInputValueDef=function(){var n=this._lexer.token,a=this.parseDescription(),s=this.parseName();this.expectToken(Ie.COLON);var o=this.parseTypeReference(),u;this.expectOptionalToken(Ie.EQUALS)&&(u=this.parseValueLiteral(!0));var c=this.parseDirectives(!0);return{kind:Ve.INPUT_VALUE_DEFINITION,description:a,name:s,type:o,defaultValue:u,directives:c,loc:this.loc(n)}},e.parseInterfaceTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("interface");var s=this.parseName(),o=this.parseImplementsInterfaces(),u=this.parseDirectives(!0),c=this.parseFieldsDefinition();return{kind:Ve.INTERFACE_TYPE_DEFINITION,description:a,name:s,interfaces:o,directives:u,fields:c,loc:this.loc(n)}},e.parseUnionTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("union");var s=this.parseName(),o=this.parseDirectives(!0),u=this.parseUnionMemberTypes();return{kind:Ve.UNION_TYPE_DEFINITION,description:a,name:s,directives:o,types:u,loc:this.loc(n)}},e.parseUnionMemberTypes=function(){return this.expectOptionalToken(Ie.EQUALS)?this.delimitedMany(Ie.PIPE,this.parseNamedType):[]},e.parseEnumTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("enum");var s=this.parseName(),o=this.parseDirectives(!0),u=this.parseEnumValuesDefinition();return{kind:Ve.ENUM_TYPE_DEFINITION,description:a,name:s,directives:o,values:u,loc:this.loc(n)}},e.parseEnumValuesDefinition=function(){return this.optionalMany(Ie.BRACE_L,this.parseEnumValueDefinition,Ie.BRACE_R)},e.parseEnumValueDefinition=function(){var n=this._lexer.token,a=this.parseDescription(),s=this.parseName(),o=this.parseDirectives(!0);return{kind:Ve.ENUM_VALUE_DEFINITION,description:a,name:s,directives:o,loc:this.loc(n)}},e.parseInputObjectTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("input");var s=this.parseName(),o=this.parseDirectives(!0),u=this.parseInputFieldsDefinition();return{kind:Ve.INPUT_OBJECT_TYPE_DEFINITION,description:a,name:s,directives:o,fields:u,loc:this.loc(n)}},e.parseInputFieldsDefinition=function(){return this.optionalMany(Ie.BRACE_L,this.parseInputValueDef,Ie.BRACE_R)},e.parseTypeSystemExtension=function(){var n=this._lexer.lookahead();if(n.kind===Ie.NAME)switch(n.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(n)},e.parseSchemaExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var a=this.parseDirectives(!0),s=this.optionalMany(Ie.BRACE_L,this.parseOperationTypeDefinition,Ie.BRACE_R);if(a.length===0&&s.length===0)throw this.unexpected();return{kind:Ve.SCHEMA_EXTENSION,directives:a,operationTypes:s,loc:this.loc(n)}},e.parseScalarTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var a=this.parseName(),s=this.parseDirectives(!0);if(s.length===0)throw this.unexpected();return{kind:Ve.SCALAR_TYPE_EXTENSION,name:a,directives:s,loc:this.loc(n)}},e.parseObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var a=this.parseName(),s=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),u=this.parseFieldsDefinition();if(s.length===0&&o.length===0&&u.length===0)throw this.unexpected();return{kind:Ve.OBJECT_TYPE_EXTENSION,name:a,interfaces:s,directives:o,fields:u,loc:this.loc(n)}},e.parseInterfaceTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var a=this.parseName(),s=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),u=this.parseFieldsDefinition();if(s.length===0&&o.length===0&&u.length===0)throw this.unexpected();return{kind:Ve.INTERFACE_TYPE_EXTENSION,name:a,interfaces:s,directives:o,fields:u,loc:this.loc(n)}},e.parseUnionTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var a=this.parseName(),s=this.parseDirectives(!0),o=this.parseUnionMemberTypes();if(s.length===0&&o.length===0)throw this.unexpected();return{kind:Ve.UNION_TYPE_EXTENSION,name:a,directives:s,types:o,loc:this.loc(n)}},e.parseEnumTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var a=this.parseName(),s=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();if(s.length===0&&o.length===0)throw this.unexpected();return{kind:Ve.ENUM_TYPE_EXTENSION,name:a,directives:s,values:o,loc:this.loc(n)}},e.parseInputObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var a=this.parseName(),s=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();if(s.length===0&&o.length===0)throw this.unexpected();return{kind:Ve.INPUT_OBJECT_TYPE_EXTENSION,name:a,directives:s,fields:o,loc:this.loc(n)}},e.parseDirectiveDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Ie.AT);var s=this.parseName(),o=this.parseArgumentDefs(),u=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var c=this.parseDirectiveLocations();return{kind:Ve.DIRECTIVE_DEFINITION,description:a,name:s,arguments:o,repeatable:u,locations:c,loc:this.loc(n)}},e.parseDirectiveLocations=function(){return this.delimitedMany(Ie.PIPE,this.parseDirectiveLocation)},e.parseDirectiveLocation=function(){var n=this._lexer.token,a=this.parseName();if(Vj[a.value]!==void 0)return a;throw this.unexpected(n)},e.loc=function(n){var a;if(((a=this._options)===null||a===void 0?void 0:a.noLocation)!==!0)return new UA(n,this._lexer.lastToken,this._lexer.source)},e.peek=function(n){return this._lexer.token.kind===n},e.expectToken=function(n){var a=this._lexer.token;if(a.kind===n)return this._lexer.advance(),a;throw ta(this._lexer.source,a.start,"Expected ".concat(Hj(n),", found ").concat(pS(a),"."))},e.expectOptionalToken=function(n){var a=this._lexer.token;if(a.kind===n)return this._lexer.advance(),a},e.expectKeyword=function(n){var a=this._lexer.token;if(a.kind===Ie.NAME&&a.value===n)this._lexer.advance();else throw ta(this._lexer.source,a.start,'Expected "'.concat(n,'", found ').concat(pS(a),"."))},e.expectOptionalKeyword=function(n){var a=this._lexer.token;return a.kind===Ie.NAME&&a.value===n?(this._lexer.advance(),!0):!1},e.unexpected=function(n){var a=n??this._lexer.token;return ta(this._lexer.source,a.start,"Unexpected ".concat(pS(a),"."))},e.any=function(n,a,s){this.expectToken(n);for(var o=[];!this.expectOptionalToken(s);)o.push(a.call(this));return o},e.optionalMany=function(n,a,s){if(this.expectOptionalToken(n)){var o=[];do o.push(a.call(this));while(!this.expectOptionalToken(s));return o}return[]},e.many=function(n,a,s){this.expectToken(n);var o=[];do o.push(a.call(this));while(!this.expectOptionalToken(s));return o},e.delimitedMany=function(n,a){this.expectOptionalToken(n);var s=[];do s.push(a.call(this));while(this.expectOptionalToken(n));return s},t}();function pS(t){var e=t.value;return Hj(t.kind)+(e!=null?' "'.concat(e,'"'):"")}function Hj(t){return oK(t)?'"'.concat(t,'"'):t}var vK={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},cd=Object.freeze({});function kj(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vK,n=void 0,a=Array.isArray(t),s=[t],o=-1,u=[],c=void 0,l=void 0,d=void 0,f=[],h=[],p=t;do{o++;var b=o===s.length,_=b&&u.length!==0;if(b){if(l=h.length===0?void 0:f[f.length-1],c=d,d=h.pop(),_){if(a)c=c.slice();else{for(var E={},w=0,O=Object.keys(c);w=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function yK(t,e,r,n,a){for(var s=t.body,o=s.length,u=e+1,c=0;u!==o&&!isNaN(c=s.charCodeAt(u))&&(c===95||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122);)++u;return new Vr(Ie.NAME,e,u,r,n,a,s.slice(e,u))}function bK(t){return t===95||t>=65&&t<=90||t>=97&&t<=122}var Vj=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"});function _K(t,e){var r=new qA(t,e);return r.parseDocument()}function gK(t,e){var r=new qA(t,e);r.expectToken(Ie.SOF);var n=r.parseValueLiteral(!1);return r.expectToken(Ie.EOF),n}function mK(t,e){var r=new qA(t,e);r.expectToken(Ie.SOF);var n=r.parseTypeReference();return r.expectToken(Ie.EOF),n}var qA=function(){function t(r,n){var a=QX(r)?r:new BA(r);this._lexer=new qj(a),this._options=n}var e=t.prototype;return e.parseName=function(){var n=this.expectToken(Ie.NAME);return{kind:Ve.NAME,value:n.value,loc:this.loc(n)}},e.parseDocument=function(){var n=this._lexer.token;return{kind:Ve.DOCUMENT,definitions:this.many(Ie.SOF,this.parseDefinition,Ie.EOF),loc:this.loc(n)}},e.parseDefinition=function(){if(this.peek(Ie.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(Ie.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},e.parseOperationDefinition=function(){var n=this._lexer.token;if(this.peek(Ie.BRACE_L))return{kind:Ve.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(n)};var a=this.parseOperationType(),s;return this.peek(Ie.NAME)&&(s=this.parseName()),{kind:Ve.OPERATION_DEFINITION,operation:a,name:s,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},e.parseOperationType=function(){var n=this.expectToken(Ie.NAME);switch(n.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(n)},e.parseVariableDefinitions=function(){return this.optionalMany(Ie.PAREN_L,this.parseVariableDefinition,Ie.PAREN_R)},e.parseVariableDefinition=function(){var n=this._lexer.token;return{kind:Ve.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Ie.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Ie.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(n)}},e.parseVariable=function(){var n=this._lexer.token;return this.expectToken(Ie.DOLLAR),{kind:Ve.VARIABLE,name:this.parseName(),loc:this.loc(n)}},e.parseSelectionSet=function(){var n=this._lexer.token;return{kind:Ve.SELECTION_SET,selections:this.many(Ie.BRACE_L,this.parseSelection,Ie.BRACE_R),loc:this.loc(n)}},e.parseSelection=function(){return this.peek(Ie.SPREAD)?this.parseFragment():this.parseField()},e.parseField=function(){var n=this._lexer.token,a=this.parseName(),s,o;return this.expectOptionalToken(Ie.COLON)?(s=a,o=this.parseName()):o=a,{kind:Ve.FIELD,alias:s,name:o,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Ie.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},e.parseArguments=function(n){var a=n?this.parseConstArgument:this.parseArgument;return this.optionalMany(Ie.PAREN_L,a,Ie.PAREN_R)},e.parseArgument=function(){var n=this._lexer.token,a=this.parseName();return this.expectToken(Ie.COLON),{kind:Ve.ARGUMENT,name:a,value:this.parseValueLiteral(!1),loc:this.loc(n)}},e.parseConstArgument=function(){var n=this._lexer.token;return{kind:Ve.ARGUMENT,name:this.parseName(),value:(this.expectToken(Ie.COLON),this.parseValueLiteral(!0)),loc:this.loc(n)}},e.parseFragment=function(){var n=this._lexer.token;this.expectToken(Ie.SPREAD);var a=this.expectOptionalKeyword("on");return!a&&this.peek(Ie.NAME)?{kind:Ve.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(n)}:{kind:Ve.INLINE_FRAGMENT,typeCondition:a?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},e.parseFragmentDefinition=function(){var n,a=this._lexer.token;return this.expectKeyword("fragment"),((n=this._options)===null||n===void 0?void 0:n.experimentalFragmentVariables)===!0?{kind:Ve.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(a)}:{kind:Ve.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(a)}},e.parseFragmentName=function(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()},e.parseValueLiteral=function(n){var a=this._lexer.token;switch(a.kind){case Ie.BRACKET_L:return this.parseList(n);case Ie.BRACE_L:return this.parseObject(n);case Ie.INT:return this._lexer.advance(),{kind:Ve.INT,value:a.value,loc:this.loc(a)};case Ie.FLOAT:return this._lexer.advance(),{kind:Ve.FLOAT,value:a.value,loc:this.loc(a)};case Ie.STRING:case Ie.BLOCK_STRING:return this.parseStringLiteral();case Ie.NAME:switch(this._lexer.advance(),a.value){case"true":return{kind:Ve.BOOLEAN,value:!0,loc:this.loc(a)};case"false":return{kind:Ve.BOOLEAN,value:!1,loc:this.loc(a)};case"null":return{kind:Ve.NULL,loc:this.loc(a)};default:return{kind:Ve.ENUM,value:a.value,loc:this.loc(a)}}case Ie.DOLLAR:if(!n)return this.parseVariable();break}throw this.unexpected()},e.parseStringLiteral=function(){var n=this._lexer.token;return this._lexer.advance(),{kind:Ve.STRING,value:n.value,block:n.kind===Ie.BLOCK_STRING,loc:this.loc(n)}},e.parseList=function(n){var a=this,s=this._lexer.token,o=function(){return a.parseValueLiteral(n)};return{kind:Ve.LIST,values:this.any(Ie.BRACKET_L,o,Ie.BRACKET_R),loc:this.loc(s)}},e.parseObject=function(n){var a=this,s=this._lexer.token,o=function(){return a.parseObjectField(n)};return{kind:Ve.OBJECT,fields:this.any(Ie.BRACE_L,o,Ie.BRACE_R),loc:this.loc(s)}},e.parseObjectField=function(n){var a=this._lexer.token,s=this.parseName();return this.expectToken(Ie.COLON),{kind:Ve.OBJECT_FIELD,name:s,value:this.parseValueLiteral(n),loc:this.loc(a)}},e.parseDirectives=function(n){for(var a=[];this.peek(Ie.AT);)a.push(this.parseDirective(n));return a},e.parseDirective=function(n){var a=this._lexer.token;return this.expectToken(Ie.AT),{kind:Ve.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(n),loc:this.loc(a)}},e.parseTypeReference=function(){var n=this._lexer.token,a;return this.expectOptionalToken(Ie.BRACKET_L)?(a=this.parseTypeReference(),this.expectToken(Ie.BRACKET_R),a={kind:Ve.LIST_TYPE,type:a,loc:this.loc(n)}):a=this.parseNamedType(),this.expectOptionalToken(Ie.BANG)?{kind:Ve.NON_NULL_TYPE,type:a,loc:this.loc(n)}:a},e.parseNamedType=function(){var n=this._lexer.token;return{kind:Ve.NAMED_TYPE,name:this.parseName(),loc:this.loc(n)}},e.parseTypeSystemDefinition=function(){var n=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(n.kind===Ie.NAME)switch(n.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(n)},e.peekDescription=function(){return this.peek(Ie.STRING)||this.peek(Ie.BLOCK_STRING)},e.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},e.parseSchemaDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("schema");var s=this.parseDirectives(!0),o=this.many(Ie.BRACE_L,this.parseOperationTypeDefinition,Ie.BRACE_R);return{kind:Ve.SCHEMA_DEFINITION,description:a,directives:s,operationTypes:o,loc:this.loc(n)}},e.parseOperationTypeDefinition=function(){var n=this._lexer.token,a=this.parseOperationType();this.expectToken(Ie.COLON);var s=this.parseNamedType();return{kind:Ve.OPERATION_TYPE_DEFINITION,operation:a,type:s,loc:this.loc(n)}},e.parseScalarTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("scalar");var s=this.parseName(),o=this.parseDirectives(!0);return{kind:Ve.SCALAR_TYPE_DEFINITION,description:a,name:s,directives:o,loc:this.loc(n)}},e.parseObjectTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("type");var s=this.parseName(),o=this.parseImplementsInterfaces(),u=this.parseDirectives(!0),c=this.parseFieldsDefinition();return{kind:Ve.OBJECT_TYPE_DEFINITION,description:a,name:s,interfaces:o,directives:u,fields:c,loc:this.loc(n)}},e.parseImplementsInterfaces=function(){var n;if(!this.expectOptionalKeyword("implements"))return[];if(((n=this._options)===null||n===void 0?void 0:n.allowLegacySDLImplementsInterfaces)===!0){var a=[];this.expectOptionalToken(Ie.AMP);do a.push(this.parseNamedType());while(this.expectOptionalToken(Ie.AMP)||this.peek(Ie.NAME));return a}return this.delimitedMany(Ie.AMP,this.parseNamedType)},e.parseFieldsDefinition=function(){var n;return((n=this._options)===null||n===void 0?void 0:n.allowLegacySDLEmptyFields)===!0&&this.peek(Ie.BRACE_L)&&this._lexer.lookahead().kind===Ie.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(Ie.BRACE_L,this.parseFieldDefinition,Ie.BRACE_R)},e.parseFieldDefinition=function(){var n=this._lexer.token,a=this.parseDescription(),s=this.parseName(),o=this.parseArgumentDefs();this.expectToken(Ie.COLON);var u=this.parseTypeReference(),c=this.parseDirectives(!0);return{kind:Ve.FIELD_DEFINITION,description:a,name:s,arguments:o,type:u,directives:c,loc:this.loc(n)}},e.parseArgumentDefs=function(){return this.optionalMany(Ie.PAREN_L,this.parseInputValueDef,Ie.PAREN_R)},e.parseInputValueDef=function(){var n=this._lexer.token,a=this.parseDescription(),s=this.parseName();this.expectToken(Ie.COLON);var o=this.parseTypeReference(),u;this.expectOptionalToken(Ie.EQUALS)&&(u=this.parseValueLiteral(!0));var c=this.parseDirectives(!0);return{kind:Ve.INPUT_VALUE_DEFINITION,description:a,name:s,type:o,defaultValue:u,directives:c,loc:this.loc(n)}},e.parseInterfaceTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("interface");var s=this.parseName(),o=this.parseImplementsInterfaces(),u=this.parseDirectives(!0),c=this.parseFieldsDefinition();return{kind:Ve.INTERFACE_TYPE_DEFINITION,description:a,name:s,interfaces:o,directives:u,fields:c,loc:this.loc(n)}},e.parseUnionTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("union");var s=this.parseName(),o=this.parseDirectives(!0),u=this.parseUnionMemberTypes();return{kind:Ve.UNION_TYPE_DEFINITION,description:a,name:s,directives:o,types:u,loc:this.loc(n)}},e.parseUnionMemberTypes=function(){return this.expectOptionalToken(Ie.EQUALS)?this.delimitedMany(Ie.PIPE,this.parseNamedType):[]},e.parseEnumTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("enum");var s=this.parseName(),o=this.parseDirectives(!0),u=this.parseEnumValuesDefinition();return{kind:Ve.ENUM_TYPE_DEFINITION,description:a,name:s,directives:o,values:u,loc:this.loc(n)}},e.parseEnumValuesDefinition=function(){return this.optionalMany(Ie.BRACE_L,this.parseEnumValueDefinition,Ie.BRACE_R)},e.parseEnumValueDefinition=function(){var n=this._lexer.token,a=this.parseDescription(),s=this.parseName(),o=this.parseDirectives(!0);return{kind:Ve.ENUM_VALUE_DEFINITION,description:a,name:s,directives:o,loc:this.loc(n)}},e.parseInputObjectTypeDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("input");var s=this.parseName(),o=this.parseDirectives(!0),u=this.parseInputFieldsDefinition();return{kind:Ve.INPUT_OBJECT_TYPE_DEFINITION,description:a,name:s,directives:o,fields:u,loc:this.loc(n)}},e.parseInputFieldsDefinition=function(){return this.optionalMany(Ie.BRACE_L,this.parseInputValueDef,Ie.BRACE_R)},e.parseTypeSystemExtension=function(){var n=this._lexer.lookahead();if(n.kind===Ie.NAME)switch(n.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(n)},e.parseSchemaExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var a=this.parseDirectives(!0),s=this.optionalMany(Ie.BRACE_L,this.parseOperationTypeDefinition,Ie.BRACE_R);if(a.length===0&&s.length===0)throw this.unexpected();return{kind:Ve.SCHEMA_EXTENSION,directives:a,operationTypes:s,loc:this.loc(n)}},e.parseScalarTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var a=this.parseName(),s=this.parseDirectives(!0);if(s.length===0)throw this.unexpected();return{kind:Ve.SCALAR_TYPE_EXTENSION,name:a,directives:s,loc:this.loc(n)}},e.parseObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var a=this.parseName(),s=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),u=this.parseFieldsDefinition();if(s.length===0&&o.length===0&&u.length===0)throw this.unexpected();return{kind:Ve.OBJECT_TYPE_EXTENSION,name:a,interfaces:s,directives:o,fields:u,loc:this.loc(n)}},e.parseInterfaceTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var a=this.parseName(),s=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),u=this.parseFieldsDefinition();if(s.length===0&&o.length===0&&u.length===0)throw this.unexpected();return{kind:Ve.INTERFACE_TYPE_EXTENSION,name:a,interfaces:s,directives:o,fields:u,loc:this.loc(n)}},e.parseUnionTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var a=this.parseName(),s=this.parseDirectives(!0),o=this.parseUnionMemberTypes();if(s.length===0&&o.length===0)throw this.unexpected();return{kind:Ve.UNION_TYPE_EXTENSION,name:a,directives:s,types:o,loc:this.loc(n)}},e.parseEnumTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var a=this.parseName(),s=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();if(s.length===0&&o.length===0)throw this.unexpected();return{kind:Ve.ENUM_TYPE_EXTENSION,name:a,directives:s,values:o,loc:this.loc(n)}},e.parseInputObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var a=this.parseName(),s=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();if(s.length===0&&o.length===0)throw this.unexpected();return{kind:Ve.INPUT_OBJECT_TYPE_EXTENSION,name:a,directives:s,fields:o,loc:this.loc(n)}},e.parseDirectiveDefinition=function(){var n=this._lexer.token,a=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Ie.AT);var s=this.parseName(),o=this.parseArgumentDefs(),u=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var c=this.parseDirectiveLocations();return{kind:Ve.DIRECTIVE_DEFINITION,description:a,name:s,arguments:o,repeatable:u,locations:c,loc:this.loc(n)}},e.parseDirectiveLocations=function(){return this.delimitedMany(Ie.PIPE,this.parseDirectiveLocation)},e.parseDirectiveLocation=function(){var n=this._lexer.token,a=this.parseName();if(Vj[a.value]!==void 0)return a;throw this.unexpected(n)},e.loc=function(n){var a;if(((a=this._options)===null||a===void 0?void 0:a.noLocation)!==!0)return new UA(n,this._lexer.lastToken,this._lexer.source)},e.peek=function(n){return this._lexer.token.kind===n},e.expectToken=function(n){var a=this._lexer.token;if(a.kind===n)return this._lexer.advance(),a;throw ta(this._lexer.source,a.start,"Expected ".concat(Hj(n),", found ").concat(pS(a),"."))},e.expectOptionalToken=function(n){var a=this._lexer.token;if(a.kind===n)return this._lexer.advance(),a},e.expectKeyword=function(n){var a=this._lexer.token;if(a.kind===Ie.NAME&&a.value===n)this._lexer.advance();else throw ta(this._lexer.source,a.start,'Expected "'.concat(n,'", found ').concat(pS(a),"."))},e.expectOptionalKeyword=function(n){var a=this._lexer.token;return a.kind===Ie.NAME&&a.value===n?(this._lexer.advance(),!0):!1},e.unexpected=function(n){var a=n??this._lexer.token;return ta(this._lexer.source,a.start,"Unexpected ".concat(pS(a),"."))},e.any=function(n,a,s){this.expectToken(n);for(var o=[];!this.expectOptionalToken(s);)o.push(a.call(this));return o},e.optionalMany=function(n,a,s){if(this.expectOptionalToken(n)){var o=[];do o.push(a.call(this));while(!this.expectOptionalToken(s));return o}return[]},e.many=function(n,a,s){this.expectToken(n);var o=[];do o.push(a.call(this));while(!this.expectOptionalToken(s));return o},e.delimitedMany=function(n,a){this.expectOptionalToken(n);var s=[];do s.push(a.call(this));while(this.expectOptionalToken(n));return s},t}();function pS(t){var e=t.value;return Hj(t.kind)+(e!=null?' "'.concat(e,'"'):"")}function Hj(t){return oK(t)?'"'.concat(t,'"'):t}var vK={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},cd=Object.freeze({});function kj(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:vK,n=void 0,a=Array.isArray(t),s=[t],o=-1,u=[],c=void 0,l=void 0,d=void 0,f=[],h=[],p=t;do{o++;var b=o===s.length,_=b&&u.length!==0;if(b){if(l=h.length===0?void 0:f[f.length-1],c=d,d=h.pop(),_){if(a)c=c.slice();else{for(var E={},w=0,O=Object.keys(c);wTK&&(c=u+Ur(`( @@ -37,15 +37,15 @@ ${s.map(c=>c.message).join(` `)),` }`)}function Ur(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return e!=null&&e!==""?t+e+r:""}function Q1(t){return Ur(" ",t.replace(/\n/g,` `))}function OK(t){return t.indexOf(` -`)!==-1}function TP(t){return t!=null&&t.some(OK)}function AK(t){return Qj(t)||Gj(t)||Wj(t)}function Qj(t){return t.kind===Ve.OPERATION_DEFINITION||t.kind===Ve.FRAGMENT_DEFINITION}function RK(t){return t.kind===Ve.FIELD||t.kind===Ve.FRAGMENT_SPREAD||t.kind===Ve.INLINE_FRAGMENT}function xK(t){return t.kind===Ve.VARIABLE||t.kind===Ve.INT||t.kind===Ve.FLOAT||t.kind===Ve.STRING||t.kind===Ve.BOOLEAN||t.kind===Ve.NULL||t.kind===Ve.ENUM||t.kind===Ve.LIST||t.kind===Ve.OBJECT}function IK(t){return t.kind===Ve.NAMED_TYPE||t.kind===Ve.LIST_TYPE||t.kind===Ve.NON_NULL_TYPE}function Gj(t){return t.kind===Ve.SCHEMA_DEFINITION||zj(t)||t.kind===Ve.DIRECTIVE_DEFINITION}function zj(t){return t.kind===Ve.SCALAR_TYPE_DEFINITION||t.kind===Ve.OBJECT_TYPE_DEFINITION||t.kind===Ve.INTERFACE_TYPE_DEFINITION||t.kind===Ve.UNION_TYPE_DEFINITION||t.kind===Ve.ENUM_TYPE_DEFINITION||t.kind===Ve.INPUT_OBJECT_TYPE_DEFINITION}function Wj(t){return t.kind===Ve.SCHEMA_EXTENSION||Xj(t)}function Xj(t){return t.kind===Ve.SCALAR_TYPE_EXTENSION||t.kind===Ve.OBJECT_TYPE_EXTENSION||t.kind===Ve.INTERFACE_TYPE_EXTENSION||t.kind===Ve.UNION_TYPE_EXTENSION||t.kind===Ve.ENUM_TYPE_EXTENSION||t.kind===Ve.INPUT_OBJECT_TYPE_EXTENSION}const PK=Object.freeze(Object.defineProperty({__proto__:null,BREAK:cd,DirectiveLocation:Vj,Kind:Ve,Lexer:qj,Location:UA,Source:BA,Token:Vr,TokenKind:Ie,getLocation:wb,getVisitFn:Sb,isDefinitionNode:AK,isExecutableDefinitionNode:Qj,isSelectionNode:RK,isTypeDefinitionNode:zj,isTypeExtensionNode:Xj,isTypeNode:IK,isTypeSystemDefinitionNode:Gj,isTypeSystemExtensionNode:Wj,isValueNode:xK,parse:_K,parseType:mK,parseValue:gK,print:SK,printLocation:Lj,printSourceLocation:$A,visit:kj,visitInParallel:wK},Symbol.toStringTag,{value:"Module"})),DK=e_(PK);var d0={},hn={},wg={};(function(){(function(t){(function(e){var r={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};function n(N){return N&&DataView.prototype.isPrototypeOf(N)}if(r.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(N){return N&&a.indexOf(Object.prototype.toString.call(N))>-1};function o(N){if(typeof N!="string"&&(N=String(N)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(N))throw new TypeError("Invalid character in header field name");return N.toLowerCase()}function u(N){return typeof N!="string"&&(N=String(N)),N}function c(N){var x={next:function(){var F=N.shift();return{done:F===void 0,value:F}}};return r.iterable&&(x[Symbol.iterator]=function(){return x}),x}function l(N){this.map={},N instanceof l?N.forEach(function(x,F){this.append(F,x)},this):Array.isArray(N)?N.forEach(function(x){this.append(x[0],x[1])},this):N&&Object.getOwnPropertyNames(N).forEach(function(x){this.append(x,N[x])},this)}l.prototype.append=function(N,x){N=o(N),x=u(x);var F=this.map[N];this.map[N]=F?F+", "+x:x},l.prototype.delete=function(N){delete this.map[o(N)]},l.prototype.get=function(N){return N=o(N),this.has(N)?this.map[N]:null},l.prototype.has=function(N){return this.map.hasOwnProperty(o(N))},l.prototype.set=function(N,x){this.map[o(N)]=u(x)},l.prototype.forEach=function(N,x){for(var F in this.map)this.map.hasOwnProperty(F)&&N.call(x,this.map[F],F,this)},l.prototype.keys=function(){var N=[];return this.forEach(function(x,F){N.push(F)}),c(N)},l.prototype.values=function(){var N=[];return this.forEach(function(x){N.push(x)}),c(N)},l.prototype.entries=function(){var N=[];return this.forEach(function(x,F){N.push([F,x])}),c(N)},r.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);function d(N){if(N.bodyUsed)return Promise.reject(new TypeError("Already read"));N.bodyUsed=!0}function f(N){return new Promise(function(x,F){N.onload=function(){x(N.result)},N.onerror=function(){F(N.error)}})}function h(N){var x=new FileReader,F=f(x);return x.readAsArrayBuffer(N),F}function p(N){var x=new FileReader,F=f(x);return x.readAsText(N),F}function b(N){for(var x=new Uint8Array(N),F=new Array(x.length),X=0;X-1?x:N}function A(N,x){x=x||{};var F=x.body;if(N instanceof A){if(N.bodyUsed)throw new TypeError("Already read");this.url=N.url,this.credentials=N.credentials,x.headers||(this.headers=new l(N.headers)),this.method=N.method,this.mode=N.mode,this.signal=N.signal,!F&&N._bodyInit!=null&&(F=N._bodyInit,N.bodyUsed=!0)}else this.url=String(N);if(this.credentials=x.credentials||this.credentials||"same-origin",(x.headers||!this.headers)&&(this.headers=new l(x.headers)),this.method=O(x.method||this.method||"GET"),this.mode=x.mode||this.mode||null,this.signal=x.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&F)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(F)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})};function T(N){var x=new FormData;return N.trim().split("&").forEach(function(F){if(F){var X=F.split("="),ne=X.shift().replace(/\+/g," "),$=X.join("=").replace(/\+/g," ");x.append(decodeURIComponent(ne),decodeURIComponent($))}}),x}function I(N){var x=new l,F=N.replace(/\r?\n[\t ]+/g," ");return F.split(/\r?\n/).forEach(function(X){var ne=X.split(":"),$=ne.shift().trim();if($){var j=ne.join(":").trim();x.append($,j)}}),x}E.call(A.prototype);function D(N,x){x||(x={}),this.type="default",this.status=x.status===void 0?200:x.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in x?x.statusText:"OK",this.headers=new l(x.headers),this.url=x.url||"",this._initBody(N)}E.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},D.error=function(){var N=new D(null,{status:0,statusText:""});return N.type="error",N};var U=[301,302,303,307,308];D.redirect=function(N,x){if(U.indexOf(x)===-1)throw new RangeError("Invalid status code");return new D(null,{status:x,headers:{location:N}})},e.DOMException=t.DOMException;try{new e.DOMException}catch{e.DOMException=function(x,F){this.message=x,this.name=F;var X=Error(x);this.stack=X.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function H(N,x){return new Promise(function(F,X){var ne=new A(N,x);if(ne.signal&&ne.signal.aborted)return X(new e.DOMException("Aborted","AbortError"));var $=new XMLHttpRequest;function j(){$.abort()}$.onload=function(){var Q={status:$.status,statusText:$.statusText,headers:I($.getAllResponseHeaders()||"")};Q.url="responseURL"in $?$.responseURL:Q.headers.get("X-Request-URL");var se="response"in $?$.response:$.responseText;F(new D(se,Q))},$.onerror=function(){X(new TypeError("Network request failed"))},$.ontimeout=function(){X(new TypeError("Network request failed"))},$.onabort=function(){X(new e.DOMException("Aborted","AbortError"))},$.open(ne.method,ne.url,!0),ne.credentials==="include"?$.withCredentials=!0:ne.credentials==="omit"&&($.withCredentials=!1),"responseType"in $&&r.blob&&($.responseType="blob"),ne.headers.forEach(function(Q,se){$.setRequestHeader(se,Q)}),ne.signal&&(ne.signal.addEventListener("abort",j),$.onreadystatechange=function(){$.readyState===4&&ne.signal.removeEventListener("abort",j)}),$.send(typeof ne._bodyInit>"u"?null:ne._bodyInit)})}return H.polyfill=!0,t.fetch||(t.fetch=H,t.Headers=l,t.Request=A,t.Response=D),e.Headers=l,e.Request=A,e.Response=D,e.fetch=H,Object.defineProperty(e,"__esModule",{value:!0}),e})({})})(typeof self<"u"?self:m)})();var Ra={},Lu={};Object.defineProperty(Lu,"__esModule",{value:!0});Lu.removeDotSegmentsOfPath=Lu.removeDotSegments=Lu.resolve=void 0;function NK(t,e){e=e||"";const r=e.indexOf("#");if(r>0&&(e=e.substr(0,r)),!t.length){if(e.indexOf(":")<0)throw new Error(`Found invalid baseIRI '${e}' for value '${t}'`);return e}if(t.startsWith("?")){const l=e.indexOf("?");return l>0&&(e=e.substr(0,l)),e+t}if(t.startsWith("#"))return e+t;if(!e.length){const l=t.indexOf(":");if(l<0)throw new Error(`Found invalid relative IRI '${t}' for a missing baseIRI`);return Ic(t,l)}const n=t.indexOf(":");if(n>=0)return Ic(t,n);const a=e.indexOf(":");if(a<0)throw new Error(`Found invalid baseIRI '${e}' for value '${t}'`);const s=e.substr(0,a+1);if(t.indexOf("//")===0)return s+Ic(t,n);let o;if(e.indexOf("//",a)===a+1){if(o=e.indexOf("/",a+3),o<0)return e.length>a+3?e+"/"+Ic(t,n):s+Ic(t,n)}else if(o=e.indexOf("/",a+1),o<0)return s+Ic(t,n);if(t.indexOf("/")===0)return e.substr(0,o)+Tb(t);let u=e.substr(o);const c=u.lastIndexOf("/");return c>=0&&cn.join("")).join("/")}Lu.removeDotSegments=Tb;function Ic(t,e){let r=e+1;e>=0?t[e+1]==="/"&&t[e+2]==="/"&&(r=e+3):t[0]==="/"&&t[1]==="/"&&(r=2);const n=t.indexOf("/",r);if(n<0)return t;const a=t.substr(0,n),s=t.substr(n);return a+Tb(s)}Lu.removeDotSegmentsOfPath=Ic;function EP(t){return!t||t==="#"||t==="?"||t==="/"}(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Lu,t)})(Ra);var Of={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR_CODES=t.ErrorCoded=void 0;class e extends Error{constructor(n,a){super(n),this.code=a}}t.ErrorCoded=e,function(r){r.COLLIDING_KEYWORDS="colliding keywords",r.CONFLICTING_INDEXES="conflicting indexes",r.CYCLIC_IRI_MAPPING="cyclic IRI mapping",r.INVALID_ID_VALUE="invalid @id value",r.INVALID_INDEX_VALUE="invalid @index value",r.INVALID_NEST_VALUE="invalid @nest value",r.INVALID_PREFIX_VALUE="invalid @prefix value",r.INVALID_PROPAGATE_VALUE="invalid @propagate value",r.INVALID_REVERSE_VALUE="invalid @reverse value",r.INVALID_IMPORT_VALUE="invalid @import value",r.INVALID_VERSION_VALUE="invalid @version value",r.INVALID_BASE_IRI="invalid base IRI",r.INVALID_CONTAINER_MAPPING="invalid container mapping",r.INVALID_CONTEXT_ENTRY="invalid context entry",r.INVALID_CONTEXT_NULLIFICATION="invalid context nullification",r.INVALID_DEFAULT_LANGUAGE="invalid default language",r.INVALID_INCLUDED_VALUE="invalid @included value",r.INVALID_IRI_MAPPING="invalid IRI mapping",r.INVALID_JSON_LITERAL="invalid JSON literal",r.INVALID_KEYWORD_ALIAS="invalid keyword alias",r.INVALID_LANGUAGE_MAP_VALUE="invalid language map value",r.INVALID_LANGUAGE_MAPPING="invalid language mapping",r.INVALID_LANGUAGE_TAGGED_STRING="invalid language-tagged string",r.INVALID_LANGUAGE_TAGGED_VALUE="invalid language-tagged value",r.INVALID_LOCAL_CONTEXT="invalid local context",r.INVALID_REMOTE_CONTEXT="invalid remote context",r.INVALID_REVERSE_PROPERTY="invalid reverse property",r.INVALID_REVERSE_PROPERTY_MAP="invalid reverse property map",r.INVALID_REVERSE_PROPERTY_VALUE="invalid reverse property value",r.INVALID_SCOPED_CONTEXT="invalid scoped context",r.INVALID_SCRIPT_ELEMENT="invalid script element",r.INVALID_SET_OR_LIST_OBJECT="invalid set or list object",r.INVALID_TERM_DEFINITION="invalid term definition",r.INVALID_TYPE_MAPPING="invalid type mapping",r.INVALID_TYPE_VALUE="invalid type value",r.INVALID_TYPED_VALUE="invalid typed value",r.INVALID_VALUE_OBJECT="invalid value object",r.INVALID_VALUE_OBJECT_VALUE="invalid value object value",r.INVALID_VOCAB_MAPPING="invalid vocab mapping",r.IRI_CONFUSED_WITH_PREFIX="IRI confused with prefix",r.KEYWORD_REDEFINITION="keyword redefinition",r.LOADING_DOCUMENT_FAILED="loading document failed",r.LOADING_REMOTE_CONTEXT_FAILED="loading remote context failed",r.MULTIPLE_CONTEXT_LINK_HEADERS="multiple context link headers",r.PROCESSING_MODE_CONFLICT="processing mode conflict",r.PROTECTED_TERM_REDEFINITION="protected term redefinition",r.CONTEXT_OVERFLOW="context overflow",r.INVALID_BASE_DIRECTION="invalid base direction",r.RECURSIVE_CONTEXT_INCLUSION="recursive context inclusion",r.INVALID_STREAMING_KEY_ORDER="invalid streaming key order",r.INVALID_EMBEDDED_NODE="invalid embedded node",r.INVALID_ANNOTATION="invalid annotation"}(t.ERROR_CODES||(t.ERROR_CODES={}))})(Of);var f0={},CK=/^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i,jK=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,MK=/\s|\uFEFF|\xA0/,FK=/\r?\n[\x20\x09]+/g,LK=/[;,"]/,BK=/[;,"]|\s/,$K=/^[!#$%&'*+\-\.^_`|~\da-zA-Z]+$/,lo={IDLE:1,URI:2,ATTR:4};function OP(t){return t.replace(jK,"")}function G1(t){return MK.test(t)}function UK(t,e){for(;G1(t[e]);)e++;return e}function AP(t){return BK.test(t)||!$K.test(t)}function qK(t,e){return Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>r in e&&t[r]===e[r])}class Or{constructor(e){this.refs=[],e&&this.parse(e)}rel(e){for(var r=[],n=e.toLowerCase(),a=0;aqK(r,e))||this.refs.push(e),this}has(e,r){e=e.toLowerCase();for(var n=0;n",s);if(u===-1)throw new Error("Expected end of URI delimiter at offset "+s);o={uri:e.slice(s+1,u)},s=u,n=lo.URI}else throw new Error('Unexpected character "'+e[s]+'" at offset '+s);s++}else if(n===lo.URI)if(G1(e[s])){s++;continue}else if(e[s]===";")n=lo.ATTR,s++;else if(e[s]===",")n=lo.IDLE,s++;else throw new Error('Unexpected character "'+e[s]+'" at offset '+s);else if(n===lo.ATTR){if(e[s]===";"||G1(e[s])){s++;continue}var u=e.indexOf("=",s);u===-1&&(u=e.indexOf(";",s)),u===-1&&(u=e.length);var c=OP(e.slice(s,u)).toLowerCase(),l="";if(s=u+1,s=UK(e,s),e[s]==='"')for(s++;s"),e.push(r);return e.join(", ")}}Or.isCompatibleEncoding=function(t){return CK.test(t)};Or.parse=function(t,e){return new Or().parse(t,e)};Or.isSingleOccurenceAttr=function(t){return t==="rel"||t==="type"||t==="media"||t==="title"||t==="title*"};Or.isTokenAttr=function(t){return t==="rel"||t==="type"||t==="anchor"};Or.escapeQuotes=function(t){return t.replace(/"/g,'\\"')};Or.expandRelations=function(t){var e=t.rel.split(" ");return e.map(function(r){var n=Object.assign({},t);return n.rel=r,n})};Or.parseExtendedValue=function(t){var e=/([^']+)?(?:'([^']*)')?(.+)/.exec(t);return{language:e[2].toLowerCase(),encoding:Or.isCompatibleEncoding(e[1])?null:e[1].toLowerCase(),value:Or.isCompatibleEncoding(e[1])?decodeURIComponent(e[3]):e[3]}};Or.formatExtendedAttribute=function(t,e){var r=(e.encoding||"utf-8").toUpperCase(),n=e.language||"en",a="";return Buffer.isBuffer(e.value)&&Or.isCompatibleEncoding(r)?a=e.value.toString(r):Buffer.isBuffer(e.value)?a=e.value.toString("hex").replace(/[0-9a-f]{2}/gi,"%$1"):a=encodeURIComponent(e.value),t+"="+r+"'"+n+"'"+a};Or.formatAttribute=function(t,e){return Array.isArray(e)?e.map(r=>Or.formatAttribute(t,r)).join("; "):t[t.length-1]==="*"||typeof e!="string"?Or.formatExtendedAttribute(t,e):(Or.isTokenAttr(t)?e=AP(e)?'"'+Or.escapeQuotes(e)+'"':Or.escapeQuotes(e):AP(e)&&(e=encodeURIComponent(e),e=e.replace(/%20/g," ").replace(/%2C/g,",").replace(/%3B/g,";"),e='"'+e+'"'),t+"="+e)};var Kj=Or;Object.defineProperty(f0,"__esModule",{value:!0});f0.FetchDocumentLoader=void 0;const RP=Of,VK=Kj,HK=Ra;class kK{constructor(e){this.fetcher=e}async load(e){const r=await(this.fetcher||fetch)(e,{headers:new Headers({accept:"application/ld+json"})});if(r.ok&&r.headers){let n=r.headers.get("Content-Type");if(n){const a=n.indexOf(";");a>0&&(n=n.substr(0,a))}if(n==="application/ld+json")return await r.json();if(r.headers.has("Link")){let a;if(r.headers.forEach((s,o)=>{if(o==="link"){const u=(0,VK.parse)(s);for(const c of u.get("type","application/ld+json"))if(c.rel==="alternate"){if(a)throw new Error("Multiple JSON-LD alternate links were found on "+e);a=(0,HK.resolve)(c.uri,e)}}}),a)return this.load(a)}throw new RP.ErrorCoded(`Unsupported JSON-LD media type ${n}`,RP.ERROR_CODES.LOADING_DOCUMENT_FAILED)}else throw new Error(r.statusText||`Status code: ${r.status}`)}}f0.FetchDocumentLoader=kK;var VA={},Af={};Object.defineProperty(Af,"__esModule",{value:!0});Af.Util=void 0;let ca=class _o{static isCompactIri(e){return e.indexOf(":")>0&&!(e&&e[0]==="#")}static getPrefix(e,r){if(e&&e[0]==="#")return null;const n=e.indexOf(":");if(n>=0){if(e.length>n+1&&e.charAt(n+1)==="/"&&e.charAt(n+2)==="/")return null;const a=e.substr(0,n);if(a==="_")return null;if(r[a])return a}return null}static getContextValueId(e){if(e===null||typeof e=="string")return e;const r=e["@id"];return r||null}static isSimpleTermDefinitionPrefix(e,r){return!_o.isPotentialKeyword(e)&&(r.allowPrefixNonGenDelims||typeof e=="string"&&(e[0]==="_"||_o.isPrefixIriEndingWithGenDelim(e)))}static isPotentialKeyword(e){return typeof e=="string"&&_o.KEYWORD_REGEX.test(e)}static isPrefixIriEndingWithGenDelim(e){return _o.ENDS_WITH_GEN_DELIM.test(e)}static isPrefixValue(e){return e&&(typeof e=="string"||e&&typeof e=="object")}static isValidIri(e){return!!(e&&_o.IRI_REGEX.test(e))}static isValidIriWeak(e){return!!e&&e[0]!==":"&&_o.IRI_REGEX_WEAK.test(e)}static isValidKeyword(e){return _o.VALID_KEYWORDS[e]}static isTermProtected(e,r){const n=e[r];return typeof n!="string"&&n&&n["@protected"]}static hasProtectedTerms(e){for(const r of Object.keys(e))if(_o.isTermProtected(e,r))return!0;return!1}static isReservedInternalKeyword(e){return e.startsWith("@__")}static deepEqual(e,r){const n=Object.keys(e),a=Object.keys(r);return n.length!==a.length?!1:n.every(s=>{const o=e[s],u=r[s];return o===u||o!==null&&u!==null&&typeof o=="object"&&typeof u=="object"&&this.deepEqual(o,u)})}};ca.IRI_REGEX=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^ "<>{}|\\\[\]`#]*(#[^#]*)?$/;ca.IRI_REGEX_WEAK=/(?::[^:])|\//;ca.KEYWORD_REGEX=/^@[a-z]+$/i;ca.ENDS_WITH_GEN_DELIM=/[:/?#\[\]@]$/;ca.REGEX_LANGUAGE_TAG=/^[a-zA-Z]+(-[a-zA-Z0-9]+)*$/;ca.REGEX_DIRECTION_TAG=/^(ltr)|(rtl)$/;ca.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};ca.EXPAND_KEYS_BLACKLIST=["@base","@vocab","@language","@version","@direction"];ca.ALIAS_DOMAIN_BLACKLIST=["@container","@graph","@id","@index","@list","@nest","@none","@prefix","@reverse","@set","@type","@value","@version"];ca.ALIAS_RANGE_BLACKLIST=["@context","@preserve"];ca.CONTAINERS=["@list","@set","@index","@language","@graph","@id","@type"];ca.CONTAINERS_1_0=["@list","@set","@index"];Af.Util=ca;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultExpandOptions=t.JsonLdContextNormalized=void 0;const e=Ra,r=Of,n=Af;class a{constructor(o){this.contextRaw=o}getContextRaw(){return this.contextRaw}expandTerm(o,u,c=t.defaultExpandOptions){const l=this.contextRaw[o];if(l===null||l&&l["@id"]===null)return null;let d=!0;if(l&&u){const E=n.Util.getContextValueId(l);if(E&&E!==o)if(typeof E!="string"||!n.Util.isValidIri(E)&&!n.Util.isValidKeyword(E))n.Util.isPotentialKeyword(E)||(d=!1);else return E}const f=n.Util.getPrefix(o,this.contextRaw),h=this.contextRaw["@vocab"],p=(!!h||h==="")&&h.indexOf(":")<0,b=this.contextRaw["@base"],_=n.Util.isPotentialKeyword(o);if(f){const E=this.contextRaw[f],w=n.Util.getContextValueId(E);if(w){if(typeof E=="string"||!c.allowPrefixForcing){if(!n.Util.isSimpleTermDefinitionPrefix(w,c))return o}else if(w[0]!=="_"&&!_&&!E["@prefix"]&&!(o in this.contextRaw))return o;return w+o.substr(f.length+1)}}else if(u&&(h||h===""||c.allowVocabRelativeToBase&&b&&p)&&!_&&!n.Util.isCompactIri(o))if(p){if(c.allowVocabRelativeToBase)return(h||b?(0,e.resolve)(h,b):"")+o;throw new r.ErrorCoded(`Relative vocab expansion for term '${o}' with vocab '${h}' is not allowed.`,r.ERROR_CODES.INVALID_VOCAB_MAPPING)}else return h+o;else if(!u&&b&&!_&&!n.Util.isCompactIri(o))return(0,e.resolve)(o,b);if(d)return o;throw new r.ErrorCoded(`Invalid IRI mapping found for context entry '${o}': '${JSON.stringify(l)}'`,r.ERROR_CODES.INVALID_IRI_MAPPING)}compactIri(o,u){if(u&&this.contextRaw["@vocab"]&&o.startsWith(this.contextRaw["@vocab"]))return o.substr(this.contextRaw["@vocab"].length);if(!u&&this.contextRaw["@base"]&&o.startsWith(this.contextRaw["@base"]))return o.substr(this.contextRaw["@base"].length);const c={prefix:"",suffix:o};for(const l in this.contextRaw){const d=this.contextRaw[l];if(d&&!n.Util.isPotentialKeyword(l)){const f=n.Util.getContextValueId(d);if(o.startsWith(f)){const h=o.substr(f.length);if(h)h.length=0&&(s!=="@type"||typeof a[s]=="object"&&!(a[s]["@protected"]||a[s]["@container"]==="@set")))throw new je.ErrorCoded(`Keywords can not be aliased to something else. +`)!==-1}function TP(t){return t!=null&&t.some(OK)}function AK(t){return Qj(t)||Gj(t)||Wj(t)}function Qj(t){return t.kind===Ve.OPERATION_DEFINITION||t.kind===Ve.FRAGMENT_DEFINITION}function RK(t){return t.kind===Ve.FIELD||t.kind===Ve.FRAGMENT_SPREAD||t.kind===Ve.INLINE_FRAGMENT}function xK(t){return t.kind===Ve.VARIABLE||t.kind===Ve.INT||t.kind===Ve.FLOAT||t.kind===Ve.STRING||t.kind===Ve.BOOLEAN||t.kind===Ve.NULL||t.kind===Ve.ENUM||t.kind===Ve.LIST||t.kind===Ve.OBJECT}function IK(t){return t.kind===Ve.NAMED_TYPE||t.kind===Ve.LIST_TYPE||t.kind===Ve.NON_NULL_TYPE}function Gj(t){return t.kind===Ve.SCHEMA_DEFINITION||zj(t)||t.kind===Ve.DIRECTIVE_DEFINITION}function zj(t){return t.kind===Ve.SCALAR_TYPE_DEFINITION||t.kind===Ve.OBJECT_TYPE_DEFINITION||t.kind===Ve.INTERFACE_TYPE_DEFINITION||t.kind===Ve.UNION_TYPE_DEFINITION||t.kind===Ve.ENUM_TYPE_DEFINITION||t.kind===Ve.INPUT_OBJECT_TYPE_DEFINITION}function Wj(t){return t.kind===Ve.SCHEMA_EXTENSION||Xj(t)}function Xj(t){return t.kind===Ve.SCALAR_TYPE_EXTENSION||t.kind===Ve.OBJECT_TYPE_EXTENSION||t.kind===Ve.INTERFACE_TYPE_EXTENSION||t.kind===Ve.UNION_TYPE_EXTENSION||t.kind===Ve.ENUM_TYPE_EXTENSION||t.kind===Ve.INPUT_OBJECT_TYPE_EXTENSION}const PK=Object.freeze(Object.defineProperty({__proto__:null,BREAK:cd,DirectiveLocation:Vj,Kind:Ve,Lexer:qj,Location:UA,Source:BA,Token:Vr,TokenKind:Ie,getLocation:wb,getVisitFn:Sb,isDefinitionNode:AK,isExecutableDefinitionNode:Qj,isSelectionNode:RK,isTypeDefinitionNode:zj,isTypeExtensionNode:Xj,isTypeNode:IK,isTypeSystemDefinitionNode:Gj,isTypeSystemExtensionNode:Wj,isValueNode:xK,parse:_K,parseType:mK,parseValue:gK,print:SK,printLocation:Lj,printSourceLocation:$A,visit:kj,visitInParallel:wK},Symbol.toStringTag,{value:"Module"})),DK=e_(PK);var f0={},hn={},wg={};(function(){(function(t){(function(e){var r={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};function n(N){return N&&DataView.prototype.isPrototypeOf(N)}if(r.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(N){return N&&a.indexOf(Object.prototype.toString.call(N))>-1};function o(N){if(typeof N!="string"&&(N=String(N)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(N))throw new TypeError("Invalid character in header field name");return N.toLowerCase()}function u(N){return typeof N!="string"&&(N=String(N)),N}function c(N){var x={next:function(){var F=N.shift();return{done:F===void 0,value:F}}};return r.iterable&&(x[Symbol.iterator]=function(){return x}),x}function l(N){this.map={},N instanceof l?N.forEach(function(x,F){this.append(F,x)},this):Array.isArray(N)?N.forEach(function(x){this.append(x[0],x[1])},this):N&&Object.getOwnPropertyNames(N).forEach(function(x){this.append(x,N[x])},this)}l.prototype.append=function(N,x){N=o(N),x=u(x);var F=this.map[N];this.map[N]=F?F+", "+x:x},l.prototype.delete=function(N){delete this.map[o(N)]},l.prototype.get=function(N){return N=o(N),this.has(N)?this.map[N]:null},l.prototype.has=function(N){return this.map.hasOwnProperty(o(N))},l.prototype.set=function(N,x){this.map[o(N)]=u(x)},l.prototype.forEach=function(N,x){for(var F in this.map)this.map.hasOwnProperty(F)&&N.call(x,this.map[F],F,this)},l.prototype.keys=function(){var N=[];return this.forEach(function(x,F){N.push(F)}),c(N)},l.prototype.values=function(){var N=[];return this.forEach(function(x){N.push(x)}),c(N)},l.prototype.entries=function(){var N=[];return this.forEach(function(x,F){N.push([F,x])}),c(N)},r.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);function d(N){if(N.bodyUsed)return Promise.reject(new TypeError("Already read"));N.bodyUsed=!0}function f(N){return new Promise(function(x,F){N.onload=function(){x(N.result)},N.onerror=function(){F(N.error)}})}function h(N){var x=new FileReader,F=f(x);return x.readAsArrayBuffer(N),F}function p(N){var x=new FileReader,F=f(x);return x.readAsText(N),F}function b(N){for(var x=new Uint8Array(N),F=new Array(x.length),X=0;X-1?x:N}function A(N,x){x=x||{};var F=x.body;if(N instanceof A){if(N.bodyUsed)throw new TypeError("Already read");this.url=N.url,this.credentials=N.credentials,x.headers||(this.headers=new l(N.headers)),this.method=N.method,this.mode=N.mode,this.signal=N.signal,!F&&N._bodyInit!=null&&(F=N._bodyInit,N.bodyUsed=!0)}else this.url=String(N);if(this.credentials=x.credentials||this.credentials||"same-origin",(x.headers||!this.headers)&&(this.headers=new l(x.headers)),this.method=O(x.method||this.method||"GET"),this.mode=x.mode||this.mode||null,this.signal=x.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&F)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(F)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})};function T(N){var x=new FormData;return N.trim().split("&").forEach(function(F){if(F){var X=F.split("="),ne=X.shift().replace(/\+/g," "),$=X.join("=").replace(/\+/g," ");x.append(decodeURIComponent(ne),decodeURIComponent($))}}),x}function I(N){var x=new l,F=N.replace(/\r?\n[\t ]+/g," ");return F.split(/\r?\n/).forEach(function(X){var ne=X.split(":"),$=ne.shift().trim();if($){var j=ne.join(":").trim();x.append($,j)}}),x}E.call(A.prototype);function D(N,x){x||(x={}),this.type="default",this.status=x.status===void 0?200:x.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in x?x.statusText:"OK",this.headers=new l(x.headers),this.url=x.url||"",this._initBody(N)}E.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},D.error=function(){var N=new D(null,{status:0,statusText:""});return N.type="error",N};var U=[301,302,303,307,308];D.redirect=function(N,x){if(U.indexOf(x)===-1)throw new RangeError("Invalid status code");return new D(null,{status:x,headers:{location:N}})},e.DOMException=t.DOMException;try{new e.DOMException}catch{e.DOMException=function(x,F){this.message=x,this.name=F;var X=Error(x);this.stack=X.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function H(N,x){return new Promise(function(F,X){var ne=new A(N,x);if(ne.signal&&ne.signal.aborted)return X(new e.DOMException("Aborted","AbortError"));var $=new XMLHttpRequest;function j(){$.abort()}$.onload=function(){var Q={status:$.status,statusText:$.statusText,headers:I($.getAllResponseHeaders()||"")};Q.url="responseURL"in $?$.responseURL:Q.headers.get("X-Request-URL");var se="response"in $?$.response:$.responseText;F(new D(se,Q))},$.onerror=function(){X(new TypeError("Network request failed"))},$.ontimeout=function(){X(new TypeError("Network request failed"))},$.onabort=function(){X(new e.DOMException("Aborted","AbortError"))},$.open(ne.method,ne.url,!0),ne.credentials==="include"?$.withCredentials=!0:ne.credentials==="omit"&&($.withCredentials=!1),"responseType"in $&&r.blob&&($.responseType="blob"),ne.headers.forEach(function(Q,se){$.setRequestHeader(se,Q)}),ne.signal&&(ne.signal.addEventListener("abort",j),$.onreadystatechange=function(){$.readyState===4&&ne.signal.removeEventListener("abort",j)}),$.send(typeof ne._bodyInit>"u"?null:ne._bodyInit)})}return H.polyfill=!0,t.fetch||(t.fetch=H,t.Headers=l,t.Request=A,t.Response=D),e.Headers=l,e.Request=A,e.Response=D,e.fetch=H,Object.defineProperty(e,"__esModule",{value:!0}),e})({})})(typeof self<"u"?self:m)})();var Ra={},Lu={};Object.defineProperty(Lu,"__esModule",{value:!0});Lu.removeDotSegmentsOfPath=Lu.removeDotSegments=Lu.resolve=void 0;function NK(t,e){e=e||"";const r=e.indexOf("#");if(r>0&&(e=e.substr(0,r)),!t.length){if(e.indexOf(":")<0)throw new Error(`Found invalid baseIRI '${e}' for value '${t}'`);return e}if(t.startsWith("?")){const l=e.indexOf("?");return l>0&&(e=e.substr(0,l)),e+t}if(t.startsWith("#"))return e+t;if(!e.length){const l=t.indexOf(":");if(l<0)throw new Error(`Found invalid relative IRI '${t}' for a missing baseIRI`);return Ic(t,l)}const n=t.indexOf(":");if(n>=0)return Ic(t,n);const a=e.indexOf(":");if(a<0)throw new Error(`Found invalid baseIRI '${e}' for value '${t}'`);const s=e.substr(0,a+1);if(t.indexOf("//")===0)return s+Ic(t,n);let o;if(e.indexOf("//",a)===a+1){if(o=e.indexOf("/",a+3),o<0)return e.length>a+3?e+"/"+Ic(t,n):s+Ic(t,n)}else if(o=e.indexOf("/",a+1),o<0)return s+Ic(t,n);if(t.indexOf("/")===0)return e.substr(0,o)+Tb(t);let u=e.substr(o);const c=u.lastIndexOf("/");return c>=0&&cn.join("")).join("/")}Lu.removeDotSegments=Tb;function Ic(t,e){let r=e+1;e>=0?t[e+1]==="/"&&t[e+2]==="/"&&(r=e+3):t[0]==="/"&&t[1]==="/"&&(r=2);const n=t.indexOf("/",r);if(n<0)return t;const a=t.substr(0,n),s=t.substr(n);return a+Tb(s)}Lu.removeDotSegmentsOfPath=Ic;function EP(t){return!t||t==="#"||t==="?"||t==="/"}(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Lu,t)})(Ra);var Of={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ERROR_CODES=t.ErrorCoded=void 0;class e extends Error{constructor(n,a){super(n),this.code=a}}t.ErrorCoded=e,function(r){r.COLLIDING_KEYWORDS="colliding keywords",r.CONFLICTING_INDEXES="conflicting indexes",r.CYCLIC_IRI_MAPPING="cyclic IRI mapping",r.INVALID_ID_VALUE="invalid @id value",r.INVALID_INDEX_VALUE="invalid @index value",r.INVALID_NEST_VALUE="invalid @nest value",r.INVALID_PREFIX_VALUE="invalid @prefix value",r.INVALID_PROPAGATE_VALUE="invalid @propagate value",r.INVALID_REVERSE_VALUE="invalid @reverse value",r.INVALID_IMPORT_VALUE="invalid @import value",r.INVALID_VERSION_VALUE="invalid @version value",r.INVALID_BASE_IRI="invalid base IRI",r.INVALID_CONTAINER_MAPPING="invalid container mapping",r.INVALID_CONTEXT_ENTRY="invalid context entry",r.INVALID_CONTEXT_NULLIFICATION="invalid context nullification",r.INVALID_DEFAULT_LANGUAGE="invalid default language",r.INVALID_INCLUDED_VALUE="invalid @included value",r.INVALID_IRI_MAPPING="invalid IRI mapping",r.INVALID_JSON_LITERAL="invalid JSON literal",r.INVALID_KEYWORD_ALIAS="invalid keyword alias",r.INVALID_LANGUAGE_MAP_VALUE="invalid language map value",r.INVALID_LANGUAGE_MAPPING="invalid language mapping",r.INVALID_LANGUAGE_TAGGED_STRING="invalid language-tagged string",r.INVALID_LANGUAGE_TAGGED_VALUE="invalid language-tagged value",r.INVALID_LOCAL_CONTEXT="invalid local context",r.INVALID_REMOTE_CONTEXT="invalid remote context",r.INVALID_REVERSE_PROPERTY="invalid reverse property",r.INVALID_REVERSE_PROPERTY_MAP="invalid reverse property map",r.INVALID_REVERSE_PROPERTY_VALUE="invalid reverse property value",r.INVALID_SCOPED_CONTEXT="invalid scoped context",r.INVALID_SCRIPT_ELEMENT="invalid script element",r.INVALID_SET_OR_LIST_OBJECT="invalid set or list object",r.INVALID_TERM_DEFINITION="invalid term definition",r.INVALID_TYPE_MAPPING="invalid type mapping",r.INVALID_TYPE_VALUE="invalid type value",r.INVALID_TYPED_VALUE="invalid typed value",r.INVALID_VALUE_OBJECT="invalid value object",r.INVALID_VALUE_OBJECT_VALUE="invalid value object value",r.INVALID_VOCAB_MAPPING="invalid vocab mapping",r.IRI_CONFUSED_WITH_PREFIX="IRI confused with prefix",r.KEYWORD_REDEFINITION="keyword redefinition",r.LOADING_DOCUMENT_FAILED="loading document failed",r.LOADING_REMOTE_CONTEXT_FAILED="loading remote context failed",r.MULTIPLE_CONTEXT_LINK_HEADERS="multiple context link headers",r.PROCESSING_MODE_CONFLICT="processing mode conflict",r.PROTECTED_TERM_REDEFINITION="protected term redefinition",r.CONTEXT_OVERFLOW="context overflow",r.INVALID_BASE_DIRECTION="invalid base direction",r.RECURSIVE_CONTEXT_INCLUSION="recursive context inclusion",r.INVALID_STREAMING_KEY_ORDER="invalid streaming key order",r.INVALID_EMBEDDED_NODE="invalid embedded node",r.INVALID_ANNOTATION="invalid annotation"}(t.ERROR_CODES||(t.ERROR_CODES={}))})(Of);var h0={},CK=/^utf-?8|ascii|utf-?16-?le|ucs-?2|base-?64|latin-?1$/i,jK=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,MK=/\s|\uFEFF|\xA0/,FK=/\r?\n[\x20\x09]+/g,LK=/[;,"]/,BK=/[;,"]|\s/,$K=/^[!#$%&'*+\-\.^_`|~\da-zA-Z]+$/,lo={IDLE:1,URI:2,ATTR:4};function OP(t){return t.replace(jK,"")}function G1(t){return MK.test(t)}function UK(t,e){for(;G1(t[e]);)e++;return e}function AP(t){return BK.test(t)||!$K.test(t)}function qK(t,e){return Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>r in e&&t[r]===e[r])}class Or{constructor(e){this.refs=[],e&&this.parse(e)}rel(e){for(var r=[],n=e.toLowerCase(),a=0;aqK(r,e))||this.refs.push(e),this}has(e,r){e=e.toLowerCase();for(var n=0;n",s);if(u===-1)throw new Error("Expected end of URI delimiter at offset "+s);o={uri:e.slice(s+1,u)},s=u,n=lo.URI}else throw new Error('Unexpected character "'+e[s]+'" at offset '+s);s++}else if(n===lo.URI)if(G1(e[s])){s++;continue}else if(e[s]===";")n=lo.ATTR,s++;else if(e[s]===",")n=lo.IDLE,s++;else throw new Error('Unexpected character "'+e[s]+'" at offset '+s);else if(n===lo.ATTR){if(e[s]===";"||G1(e[s])){s++;continue}var u=e.indexOf("=",s);u===-1&&(u=e.indexOf(";",s)),u===-1&&(u=e.length);var c=OP(e.slice(s,u)).toLowerCase(),l="";if(s=u+1,s=UK(e,s),e[s]==='"')for(s++;s"),e.push(r);return e.join(", ")}}Or.isCompatibleEncoding=function(t){return CK.test(t)};Or.parse=function(t,e){return new Or().parse(t,e)};Or.isSingleOccurenceAttr=function(t){return t==="rel"||t==="type"||t==="media"||t==="title"||t==="title*"};Or.isTokenAttr=function(t){return t==="rel"||t==="type"||t==="anchor"};Or.escapeQuotes=function(t){return t.replace(/"/g,'\\"')};Or.expandRelations=function(t){var e=t.rel.split(" ");return e.map(function(r){var n=Object.assign({},t);return n.rel=r,n})};Or.parseExtendedValue=function(t){var e=/([^']+)?(?:'([^']*)')?(.+)/.exec(t);return{language:e[2].toLowerCase(),encoding:Or.isCompatibleEncoding(e[1])?null:e[1].toLowerCase(),value:Or.isCompatibleEncoding(e[1])?decodeURIComponent(e[3]):e[3]}};Or.formatExtendedAttribute=function(t,e){var r=(e.encoding||"utf-8").toUpperCase(),n=e.language||"en",a="";return Buffer.isBuffer(e.value)&&Or.isCompatibleEncoding(r)?a=e.value.toString(r):Buffer.isBuffer(e.value)?a=e.value.toString("hex").replace(/[0-9a-f]{2}/gi,"%$1"):a=encodeURIComponent(e.value),t+"="+r+"'"+n+"'"+a};Or.formatAttribute=function(t,e){return Array.isArray(e)?e.map(r=>Or.formatAttribute(t,r)).join("; "):t[t.length-1]==="*"||typeof e!="string"?Or.formatExtendedAttribute(t,e):(Or.isTokenAttr(t)?e=AP(e)?'"'+Or.escapeQuotes(e)+'"':Or.escapeQuotes(e):AP(e)&&(e=encodeURIComponent(e),e=e.replace(/%20/g," ").replace(/%2C/g,",").replace(/%3B/g,";"),e='"'+e+'"'),t+"="+e)};var Kj=Or;Object.defineProperty(h0,"__esModule",{value:!0});h0.FetchDocumentLoader=void 0;const RP=Of,VK=Kj,HK=Ra;class kK{constructor(e){this.fetcher=e}async load(e){const r=await(this.fetcher||fetch)(e,{headers:new Headers({accept:"application/ld+json"})});if(r.ok&&r.headers){let n=r.headers.get("Content-Type");if(n){const a=n.indexOf(";");a>0&&(n=n.substr(0,a))}if(n==="application/ld+json")return await r.json();if(r.headers.has("Link")){let a;if(r.headers.forEach((s,o)=>{if(o==="link"){const u=(0,VK.parse)(s);for(const c of u.get("type","application/ld+json"))if(c.rel==="alternate"){if(a)throw new Error("Multiple JSON-LD alternate links were found on "+e);a=(0,HK.resolve)(c.uri,e)}}}),a)return this.load(a)}throw new RP.ErrorCoded(`Unsupported JSON-LD media type ${n}`,RP.ERROR_CODES.LOADING_DOCUMENT_FAILED)}else throw new Error(r.statusText||`Status code: ${r.status}`)}}h0.FetchDocumentLoader=kK;var VA={},Af={};Object.defineProperty(Af,"__esModule",{value:!0});Af.Util=void 0;let ca=class _o{static isCompactIri(e){return e.indexOf(":")>0&&!(e&&e[0]==="#")}static getPrefix(e,r){if(e&&e[0]==="#")return null;const n=e.indexOf(":");if(n>=0){if(e.length>n+1&&e.charAt(n+1)==="/"&&e.charAt(n+2)==="/")return null;const a=e.substr(0,n);if(a==="_")return null;if(r[a])return a}return null}static getContextValueId(e){if(e===null||typeof e=="string")return e;const r=e["@id"];return r||null}static isSimpleTermDefinitionPrefix(e,r){return!_o.isPotentialKeyword(e)&&(r.allowPrefixNonGenDelims||typeof e=="string"&&(e[0]==="_"||_o.isPrefixIriEndingWithGenDelim(e)))}static isPotentialKeyword(e){return typeof e=="string"&&_o.KEYWORD_REGEX.test(e)}static isPrefixIriEndingWithGenDelim(e){return _o.ENDS_WITH_GEN_DELIM.test(e)}static isPrefixValue(e){return e&&(typeof e=="string"||e&&typeof e=="object")}static isValidIri(e){return!!(e&&_o.IRI_REGEX.test(e))}static isValidIriWeak(e){return!!e&&e[0]!==":"&&_o.IRI_REGEX_WEAK.test(e)}static isValidKeyword(e){return _o.VALID_KEYWORDS[e]}static isTermProtected(e,r){const n=e[r];return typeof n!="string"&&n&&n["@protected"]}static hasProtectedTerms(e){for(const r of Object.keys(e))if(_o.isTermProtected(e,r))return!0;return!1}static isReservedInternalKeyword(e){return e.startsWith("@__")}static deepEqual(e,r){const n=Object.keys(e),a=Object.keys(r);return n.length!==a.length?!1:n.every(s=>{const o=e[s],u=r[s];return o===u||o!==null&&u!==null&&typeof o=="object"&&typeof u=="object"&&this.deepEqual(o,u)})}};ca.IRI_REGEX=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^ "<>{}|\\\[\]`#]*(#[^#]*)?$/;ca.IRI_REGEX_WEAK=/(?::[^:])|\//;ca.KEYWORD_REGEX=/^@[a-z]+$/i;ca.ENDS_WITH_GEN_DELIM=/[:/?#\[\]@]$/;ca.REGEX_LANGUAGE_TAG=/^[a-zA-Z]+(-[a-zA-Z0-9]+)*$/;ca.REGEX_DIRECTION_TAG=/^(ltr)|(rtl)$/;ca.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};ca.EXPAND_KEYS_BLACKLIST=["@base","@vocab","@language","@version","@direction"];ca.ALIAS_DOMAIN_BLACKLIST=["@container","@graph","@id","@index","@list","@nest","@none","@prefix","@reverse","@set","@type","@value","@version"];ca.ALIAS_RANGE_BLACKLIST=["@context","@preserve"];ca.CONTAINERS=["@list","@set","@index","@language","@graph","@id","@type"];ca.CONTAINERS_1_0=["@list","@set","@index"];Af.Util=ca;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultExpandOptions=t.JsonLdContextNormalized=void 0;const e=Ra,r=Of,n=Af;class a{constructor(o){this.contextRaw=o}getContextRaw(){return this.contextRaw}expandTerm(o,u,c=t.defaultExpandOptions){const l=this.contextRaw[o];if(l===null||l&&l["@id"]===null)return null;let d=!0;if(l&&u){const E=n.Util.getContextValueId(l);if(E&&E!==o)if(typeof E!="string"||!n.Util.isValidIri(E)&&!n.Util.isValidKeyword(E))n.Util.isPotentialKeyword(E)||(d=!1);else return E}const f=n.Util.getPrefix(o,this.contextRaw),h=this.contextRaw["@vocab"],p=(!!h||h==="")&&h.indexOf(":")<0,b=this.contextRaw["@base"],_=n.Util.isPotentialKeyword(o);if(f){const E=this.contextRaw[f],w=n.Util.getContextValueId(E);if(w){if(typeof E=="string"||!c.allowPrefixForcing){if(!n.Util.isSimpleTermDefinitionPrefix(w,c))return o}else if(w[0]!=="_"&&!_&&!E["@prefix"]&&!(o in this.contextRaw))return o;return w+o.substr(f.length+1)}}else if(u&&(h||h===""||c.allowVocabRelativeToBase&&b&&p)&&!_&&!n.Util.isCompactIri(o))if(p){if(c.allowVocabRelativeToBase)return(h||b?(0,e.resolve)(h,b):"")+o;throw new r.ErrorCoded(`Relative vocab expansion for term '${o}' with vocab '${h}' is not allowed.`,r.ERROR_CODES.INVALID_VOCAB_MAPPING)}else return h+o;else if(!u&&b&&!_&&!n.Util.isCompactIri(o))return(0,e.resolve)(o,b);if(d)return o;throw new r.ErrorCoded(`Invalid IRI mapping found for context entry '${o}': '${JSON.stringify(l)}'`,r.ERROR_CODES.INVALID_IRI_MAPPING)}compactIri(o,u){if(u&&this.contextRaw["@vocab"]&&o.startsWith(this.contextRaw["@vocab"]))return o.substr(this.contextRaw["@vocab"].length);if(!u&&this.contextRaw["@base"]&&o.startsWith(this.contextRaw["@base"]))return o.substr(this.contextRaw["@base"].length);const c={prefix:"",suffix:o};for(const l in this.contextRaw){const d=this.contextRaw[l];if(d&&!n.Util.isPotentialKeyword(l)){const f=n.Util.getContextValueId(d);if(o.startsWith(f)){const h=o.substr(f.length);if(h)h.length=0&&(s!=="@type"||typeof a[s]=="object"&&!(a[s]["@protected"]||a[s]["@container"]==="@set")))throw new je.ErrorCoded(`Keywords can not be aliased to something else. Tried mapping ${s} to ${JSON.stringify(o)}`,je.ERROR_CODES.KEYWORD_REDEFINITION);if(dt.Util.ALIAS_RANGE_BLACKLIST.indexOf(dt.Util.getContextValueId(o))>=0)throw new je.ErrorCoded(`Aliasing to certain keywords is not allowed. -Tried mapping ${s} to ${JSON.stringify(o)}`,je.ERROR_CODES.INVALID_KEYWORD_ALIAS);if(o&&dt.Util.isPotentialKeyword(dt.Util.getContextValueId(o))&&o["@prefix"]===!0)throw new je.ErrorCoded(`Tried to use keyword aliases as prefix: '${s}': '${JSON.stringify(o)}'`,je.ERROR_CODES.INVALID_TERM_DEFINITION);for(;dt.Util.isPrefixValue(a[s]);){const u=a[s];let c=!1;if(typeof u=="string")a[s]=e.expandTerm(u,!0),c=c||u!==a[s];else{const l=u["@id"],d=u["@type"],f=!("@prefix"in u)||dt.Util.isValidIri(s);if("@id"in u)l!=null&&typeof l=="string"&&(a[s]=Object.assign(Object.assign({},a[s]),{"@id":e.expandTerm(l,!0)}),c=c||l!==a[s]["@id"]);else if(!dt.Util.isPotentialKeyword(s)&&f){const h=e.expandTerm(s,!0);h!==s&&(a[s]=Object.assign(Object.assign({},a[s]),{"@id":h}),c=!0)}if(d&&typeof d=="string"&&d!=="@vocab"&&(!u["@container"]||!u["@container"]["@type"])&&f){let h=e.expandTerm(d,!0);r&&d===h&&(h=e.expandTerm(d,!1)),h!==d&&(c=!0,a[s]=Object.assign(Object.assign({},a[s]),{"@type":h}))}}if(!c)break}}}normalize(e,{processingMode:r,normalizeLanguageTags:n}){if(n||r===1)for(const a of Object.keys(e))if(a==="@language"&&typeof e[a]=="string")e[a]=e[a].toLowerCase();else{const s=e[a];if(s&&typeof s=="object"&&typeof s["@language"]=="string"){const o=s["@language"].toLowerCase();o!==s["@language"]&&(e[a]=Object.assign(Object.assign({},s),{"@language":o}))}}}containersToHash(e){for(const r of Object.keys(e)){const n=e[r];if(n&&typeof n=="object"){if(typeof n["@container"]=="string")e[r]=Object.assign(Object.assign({},n),{"@container":{[n["@container"]]:!0}});else if(Array.isArray(n["@container"])){const a={};for(const s of n["@container"])a[s]=!0;e[r]=Object.assign(Object.assign({},n),{"@container":a})}}}}applyScopedProtected(e,{processingMode:r},n){if(r&&r>=1.1&&e["@protected"]){for(const a of Object.keys(e))if(!dt.Util.isReservedInternalKeyword(a)&&!dt.Util.isPotentialKeyword(a)&&!dt.Util.isTermProtected(e,a)){const s=e[a];s&&typeof s=="object"?"@protected"in e[a]||(e[a]=Object.assign(Object.assign({},e[a]),{"@protected":!0})):(e[a]={"@id":s,"@protected":!0},dt.Util.isSimpleTermDefinitionPrefix(s,n)&&(e[a]=Object.assign(Object.assign({},e[a]),{"@prefix":!0})))}delete e["@protected"]}}validateKeywordRedefinitions(e,r,n,a){for(const s of a??Object.keys(r))if(dt.Util.isTermProtected(e,s)&&(typeof r[s]=="string"?r[s]={"@id":r[s],"@protected":!0}:r[s]=Object.assign(Object.assign({},r[s]),{"@protected":!0}),!dt.Util.deepEqual(e[s],r[s])))throw new je.ErrorCoded(`Attempted to override the protected keyword ${s} from ${JSON.stringify(dt.Util.getContextValueId(e[s]))} to ${JSON.stringify(dt.Util.getContextValueId(r[s]))}`,je.ERROR_CODES.PROTECTED_TERM_REDEFINITION)}validate(e,{processingMode:r}){for(const n of Object.keys(e)){if(dt.Util.isReservedInternalKeyword(n))continue;if(n==="")throw new je.ErrorCoded(`The empty term is not allowed, got: '${n}': '${JSON.stringify(e[n])}'`,je.ERROR_CODES.INVALID_TERM_DEFINITION);const a=e[n],s=typeof a;if(dt.Util.isPotentialKeyword(n)){switch(n.substr(1)){case"vocab":if(a!==null&&s!=="string")throw new je.ErrorCoded(`Found an invalid @vocab IRI: ${a}`,je.ERROR_CODES.INVALID_VOCAB_MAPPING);break;case"base":if(a!==null&&s!=="string")throw new je.ErrorCoded(`Found an invalid @base IRI: ${e[n]}`,je.ERROR_CODES.INVALID_BASE_IRI);break;case"language":a!==null&&vo.validateLanguage(a,!0,je.ERROR_CODES.INVALID_DEFAULT_LANGUAGE);break;case"version":if(a!==null&&s!=="number")throw new je.ErrorCoded(`Found an invalid @version number: ${a}`,je.ERROR_CODES.INVALID_VERSION_VALUE);break;case"direction":a!==null&&vo.validateDirection(a,!0);break;case"propagate":if(r===1)throw new je.ErrorCoded(`Found an illegal @propagate keyword: ${a}`,je.ERROR_CODES.INVALID_CONTEXT_ENTRY);if(a!==null&&s!=="boolean")throw new je.ErrorCoded(`Found an invalid @propagate value: ${a}`,je.ERROR_CODES.INVALID_PROPAGATE_VALUE);break}if(dt.Util.isValidKeyword(n)&&dt.Util.isValidKeyword(dt.Util.getContextValueId(a)))throw new je.ErrorCoded(`Illegal keyword alias in term value, found: '${n}': '${dt.Util.getContextValueId(a)}'`,je.ERROR_CODES.KEYWORD_REDEFINITION);continue}if(a!==null)switch(s){case"string":if(dt.Util.getPrefix(a,e)===n)throw new je.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.CYCLIC_IRI_MAPPING);if(dt.Util.isValidIriWeak(n)){if(a==="@type")throw new je.ErrorCoded(`IRIs can not be mapped to @type, found: '${n}': '${a}'`,je.ERROR_CODES.INVALID_IRI_MAPPING);if(dt.Util.isValidIri(a)&&a!==new $a.JsonLdContextNormalized(e).expandTerm(n))throw new je.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${n}': '${a}'`,je.ERROR_CODES.INVALID_IRI_MAPPING)}break;case"object":if(!dt.Util.isCompactIri(n)&&!("@id"in a)&&(a["@type"]==="@id"?!e["@base"]:!e["@vocab"]))throw new je.ErrorCoded(`Missing @id in context entry: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_IRI_MAPPING);for(const o of Object.keys(a)){const u=a[o];if(u)switch(o){case"@id":if(dt.Util.isValidKeyword(u)&&u!=="@type"&&u!=="@id"&&u!=="@graph"&&u!=="@nest")throw new je.ErrorCoded(`Illegal keyword alias in term value, found: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_IRI_MAPPING);if(dt.Util.isValidIriWeak(n)){if(u==="@type")throw new je.ErrorCoded(`IRIs can not be mapped to @type, found: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_IRI_MAPPING);if(dt.Util.isValidIri(u)&&u!==new $a.JsonLdContextNormalized(e).expandTerm(n))throw new je.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_IRI_MAPPING)}if(typeof u!="string")throw new je.ErrorCoded(`Detected non-string @id in context entry: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_IRI_MAPPING);if(dt.Util.getPrefix(u,e)===n)throw new je.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.CYCLIC_IRI_MAPPING);break;case"@type":if(a["@container"]==="@type"&&u!=="@id"&&u!=="@vocab")throw new je.ErrorCoded(`@container: @type only allows @type: @id or @vocab, but got: '${n}': '${u}'`,je.ERROR_CODES.INVALID_TYPE_MAPPING);if(typeof u!="string")throw new je.ErrorCoded(`The value of an '@type' must be a string, got '${JSON.stringify(s)}'`,je.ERROR_CODES.INVALID_TYPE_MAPPING);if(u!=="@id"&&u!=="@vocab"&&(r===1||u!=="@json")&&(r===1||u!=="@none")&&(u[0]==="_"||!dt.Util.isValidIri(u)))throw new je.ErrorCoded(`A context @type must be an absolute IRI, found: '${n}': '${u}'`,je.ERROR_CODES.INVALID_TYPE_MAPPING);break;case"@reverse":if(typeof u=="string"&&a["@id"]&&a["@id"]!==u)throw new je.ErrorCoded(`Found non-matching @id and @reverse term values in '${n}':'${u}' and '${a["@id"]}'`,je.ERROR_CODES.INVALID_REVERSE_PROPERTY);if("@nest"in a)throw new je.ErrorCoded(`@nest is not allowed in the reverse property '${n}'`,je.ERROR_CODES.INVALID_REVERSE_PROPERTY);break;case"@container":if(r===1&&(Object.keys(u).length>1||dt.Util.CONTAINERS_1_0.indexOf(Object.keys(u)[0])<0))throw new je.ErrorCoded(`Invalid term @container for '${n}' ('${Object.keys(u)}') in 1.0, must be only one of ${dt.Util.CONTAINERS_1_0.join(", ")}`,je.ERROR_CODES.INVALID_CONTAINER_MAPPING);for(const c of Object.keys(u)){if(c==="@list"&&a["@reverse"])throw new je.ErrorCoded(`Term value can not be @container: @list and @reverse at the same time on '${n}'`,je.ERROR_CODES.INVALID_REVERSE_PROPERTY);if(dt.Util.CONTAINERS.indexOf(c)<0)throw new je.ErrorCoded(`Invalid term @container for '${n}' ('${c}'), must be one of ${dt.Util.CONTAINERS.join(", ")}`,je.ERROR_CODES.INVALID_CONTAINER_MAPPING)}break;case"@language":vo.validateLanguage(u,!0,je.ERROR_CODES.INVALID_LANGUAGE_MAPPING);break;case"@direction":vo.validateDirection(u,!0);break;case"@prefix":if(u!==null&&typeof u!="boolean")throw new je.ErrorCoded(`Found an invalid term @prefix boolean in: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_PREFIX_VALUE);if(!("@id"in a)&&!dt.Util.isValidIri(n))throw new je.ErrorCoded(`Invalid @prefix definition for '${n}' ('${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@index":if(r===1||!a["@container"]||!a["@container"]["@index"])throw new je.ErrorCoded(`Attempt to add illegal key to value object: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@nest":if(dt.Util.isPotentialKeyword(u)&&u!=="@nest")throw new je.ErrorCoded(`Found an invalid term @nest value in: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_NEST_VALUE)}}break;default:throw new je.ErrorCoded(`Found an invalid term value: '${n}': '${a}'`,je.ERROR_CODES.INVALID_TERM_DEFINITION)}}}applyBaseEntry(e,r,n){return typeof e=="string"||(n&&!("@base"in e)&&r.parentContext&&typeof r.parentContext=="object"&&"@base"in r.parentContext&&(e["@base"]=r.parentContext["@base"],r.parentContext["@__baseDocument"]&&(e["@__baseDocument"]=!0)),r.baseIRI&&!r.external&&("@base"in e?e["@base"]!==null&&typeof e["@base"]=="string"&&!dt.Util.isValidIri(e["@base"])&&(e["@base"]=(0,xP.resolve)(e["@base"],r.parentContext&&r.parentContext["@base"]||r.baseIRI)):(e["@base"]=r.baseIRI,e["@__baseDocument"]=!0))),e}normalizeContextIri(e,r){if(!dt.Util.isValidIri(e))try{e=(0,xP.resolve)(e,r)}catch{throw new Error(`Invalid context IRI: ${e}`)}return this.redirectSchemaOrgHttps&&e.startsWith("http://schema.org")&&(e="https://schema.org/"),e}async parseInnerContexts(e,r,n){for(const a of n??Object.keys(e)){const s=e[a];if(s&&typeof s=="object"&&"@context"in s&&s["@context"]!==null&&!r.ignoreScopedContexts){if(this.validateContext)try{const o=Object.assign(Object.assign({},e),{[a]:Object.assign({},e[a])});delete o[a]["@context"],await this.parse(s["@context"],Object.assign(Object.assign({},r),{external:!1,parentContext:o,ignoreProtection:!0,ignoreRemoteScopedContexts:!0,ignoreScopedContexts:!0}))}catch(o){throw new je.ErrorCoded(o.message,je.ERROR_CODES.INVALID_SCOPED_CONTEXT)}e[a]=Object.assign(Object.assign({},s),{"@context":(await this.parse(s["@context"],Object.assign(Object.assign({},r),{external:!1,minimalProcessing:!0,ignoreRemoteScopedContexts:!0,parentContext:e}))).getContextRaw()})}}return e}async parse(e,r={},n={}){const{baseIRI:a,parentContext:s,external:o,processingMode:u=vo.DEFAULT_PROCESSING_MODE,normalizeLanguageTags:c,ignoreProtection:l,minimalProcessing:d}=r,f=r.remoteContexts||{};if(Object.keys(f).length>=this.remoteContextsDepthLimit)throw new je.ErrorCoded("Detected an overflow in remote context inclusions: "+Object.keys(f),je.ERROR_CODES.CONTEXT_OVERFLOW);if(e==null){if(!l&&s&&dt.Util.hasProtectedTerms(s))throw new je.ErrorCoded("Illegal context nullification when terms are protected",je.ERROR_CODES.INVALID_CONTEXT_NULLIFICATION);return new $a.JsonLdContextNormalized(this.applyBaseEntry({},r,!1))}else if(typeof e=="string"){const h=this.normalizeContextIri(e,a),p=this.getOverriddenLoad(h,r);if(p)return new $a.JsonLdContextNormalized(p);const b=await this.parse(await this.load(h),Object.assign(Object.assign({},r),{baseIRI:h,external:!0,remoteContexts:Object.assign(Object.assign({},f),{[h]:!0})}));return this.applyBaseEntry(b.getContextRaw(),r,!0),b}else if(Array.isArray(e)){const h=[],p=await Promise.all(e.map((_,E)=>{if(typeof _=="string"){const w=this.normalizeContextIri(_,a);h[E]=w;const O=this.getOverriddenLoad(w,r);return O||this.load(w)}else return _}));if(d)return new $a.JsonLdContextNormalized(p);const b=await p.reduce((_,E,w)=>_.then(O=>this.parse(E,Object.assign(Object.assign({},r),{baseIRI:h[w]||r.baseIRI,external:!!h[w]||r.external,parentContext:O.getContextRaw(),remoteContexts:h[w]?Object.assign(Object.assign({},f),{[h[w]]:!0}):f}),{skipValidation:w=1.1){if(typeof e["@import"]!="string")throw new je.ErrorCoded("An @import value must be a string, but got "+typeof e["@import"],je.ERROR_CODES.INVALID_IMPORT_VALUE);h=await this.loadImportContext(this.normalizeContextIri(e["@import"],a)),delete e["@import"]}else throw new je.ErrorCoded("Context importing is not supported in JSON-LD 1.0",je.ERROR_CODES.INVALID_CONTEXT_ENTRY);this.applyScopedProtected(h,{processingMode:u},$a.defaultExpandOptions);const p=Object.assign(h,e);this.idifyReverseTerms(p),this.normalize(p,{processingMode:u,normalizeLanguageTags:c}),this.applyScopedProtected(p,{processingMode:u},$a.defaultExpandOptions);const b=Object.keys(p),_=[];if(typeof s=="object")for(const w in s)w in p?_.push(w):p[w]=s[w];await this.parseInnerContexts(p,r,b);const E=new $a.JsonLdContextNormalized(p);return(p&&p["@version"]||vo.DEFAULT_PROCESSING_MODE)>=1.1&&(e["@vocab"]&&typeof e["@vocab"]=="string"||e["@vocab"]==="")&&(s&&"@vocab"in s&&e["@vocab"].indexOf(":")<0?p["@vocab"]=s["@vocab"]+e["@vocab"]:(dt.Util.isCompactIri(e["@vocab"])||e["@vocab"]in p)&&(p["@vocab"]=E.expandTerm(e["@vocab"],!0))),this.expandPrefixedTerms(E,this.expandContentTypeToBase,b),!l&&s&&u>=1.1&&this.validateKeywordRedefinitions(s,p,$a.defaultExpandOptions,_),this.validateContext&&!n.skipValidation&&this.validate(p,{processingMode:u}),E}else throw new je.ErrorCoded(`Tried parsing a context that is not a string, array or object, but got ${e}`,je.ERROR_CODES.INVALID_LOCAL_CONTEXT)}async load(e){const r=this.documentCache[e];if(r)return r;let n;try{n=await this.documentLoader.load(e)}catch(a){throw new je.ErrorCoded(`Failed to load remote context ${e}: ${a.message}`,je.ERROR_CODES.LOADING_REMOTE_CONTEXT_FAILED)}if(!("@context"in n))throw new je.ErrorCoded(`Missing @context in remote context at ${e}`,je.ERROR_CODES.INVALID_REMOTE_CONTEXT);return this.documentCache[e]=n["@context"]}getOverriddenLoad(e,r){if(e in(r.remoteContexts||{})){if(r.ignoreRemoteScopedContexts)return e;throw new je.ErrorCoded("Detected a cyclic context inclusion of "+e,je.ERROR_CODES.RECURSIVE_CONTEXT_INCLUSION)}return null}async loadImportContext(e){let r=await this.load(e);if(typeof r!="object"||Array.isArray(r))throw new je.ErrorCoded("An imported context must be a single object: "+e,je.ERROR_CODES.INVALID_REMOTE_CONTEXT);if("@import"in r)throw new je.ErrorCoded("An imported context can not import another context: "+e,je.ERROR_CODES.INVALID_CONTEXT_ENTRY);return r=Object.assign({},r),this.containersToHash(r),r}}vo.DEFAULT_PROCESSING_MODE=1.1;wg.ContextParser=vo;var Jj={};Object.defineProperty(Jj,"__esModule",{value:!0});var Yj={};Object.defineProperty(Yj,"__esModule",{value:!0});(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(wg,t),r(Of,t),r(f0,t),r(Jj,t),r(Yj,t),r(VA,t),r(Af,t)})(hn);Object.defineProperty(d0,"__esModule",{value:!0});d0.Util=void 0;const GK=ht,zK=hn,WK=xt;let XK=class{constructor(e){this.nodeHandlers={},this.nodeValueHandlers={},this.directiveNodeHandlers={},this.settings=e,this.dataFactory=e.dataFactory||new GK.DataFactory,this.operationFactory=new WK.Factory(this.dataFactory),this.contextParser=new zK.ContextParser}registerNodeHandler(e){this.nodeHandlers[e.targetKind]=e}registerNodeValueHandler(e){this.nodeValueHandlers[e.targetKind]=e}registerDirectiveNodeHandler(e){this.directiveNodeHandlers[e.targetKind]=e}handleNode(e,r){const n=this.nodeHandlers[e.kind];if(!n)throw new Error(`Unsupported GraphQL node '${e.kind}'`);return n.handle(e,r)}handleNodeValue(e,r,n){const a=this.nodeValueHandlers[e.kind];if(!a)throw new Error(`Unsupported GraphQL value node '${e.kind}'`);return a.handle(e,r,n)}handleDirectiveNode(e,r){const n=this.directiveNodeHandlers[e.directive.name.value];return n?n.handle(e,r):null}joinOperations(e){if(e.length===1)return e[0];const r=[],n=[];for(const a of e)a.type==="bgp"?r.push(a):n.push(a);if(r.length===e.length)return this.joinOperationsAsBgp(r);if(r.length===e.length-1&&n[0].type==="leftjoin"&&n[0].input[0].type==="bgp"){const a=n[0];return r.push(a.input[0]),this.operationFactory.createLeftJoin(this.joinOperationsAsBgp(r),a.input[1])}else return n.length===e.length?this.joinOperationsAsNestedJoin(n):this.joinOperationsAsNestedJoin([this.joinOperationsAsBgp(r),this.joinOperationsAsNestedJoin(n)])}joinOperationsAsBgp(e){return this.operationFactory.createBgp([].concat.apply([],e.map(r=>r.patterns)))}joinOperationsAsNestedJoin(e){return this.operationFactory.createJoin(e)}appendFieldToPath(e,r){return e.concat([r])}getFieldLabel(e){return(e.alias?e.alias:e.name).value}nameToVariable(e,r){return this.dataFactory.variable((r.path.length?r.path.join(this.settings.variableDelimiter)+this.settings.variableDelimiter:"")+e)}valueToNamedNode(e,r){const n=r.expandTerm(e,!0);if(this.settings.requireContext&&!n)throw new Error("No context entry was found for "+e);return this.dataFactory.namedNode(n||e)}getArgument(e,r){if(e){for(const n of e)if(n.name.value===r)return n}}newTypePattern(e,r,n){return this.operationFactory.createPattern(e,this.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),this.valueToNamedNode(r.name.value,n.context),n.graph)}createQuadPattern(e,r,n,a,s){const o=this.valueToNamedNode(r.value,s);return s&&s.getContextRaw()[r.value]&&s.getContextRaw()[r.value]["@reverse"]?this.operationFactory.createPattern(n,o,e,a):this.operationFactory.createPattern(e,o,n,a)}createQuadPath(e,r,n,a,s,o){const u=this.valueToNamedNode(r.value,o);let c=this.operationFactory.createLink(u);for(const l of n.values){if(l.kind!=="EnumValue")throw new Error("Invalid value type for 'alt' argument, must be EnumValue, but got "+l.kind);c=this.operationFactory.createAlt([c,this.operationFactory.createLink(this.valueToNamedNode(l.value,o))])}return o&&o.getContextRaw()[r.value]&&o.getContextRaw()[r.value]["@reverse"]?this.operationFactory.createPath(a,c,e,s):this.operationFactory.createPath(e,c,a,s)}};d0.Util=XK;var KK=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(mg,"__esModule",{value:!0});mg.Converter=void 0;const JK=DK,ci=FA,kf=LA,YK=Tf,ZK=d0;let eJ=class z1{constructor(e){e=e||{},e.variableDelimiter=e.variableDelimiter||"_",e.expressionVariableCounter=e.expressionVariableCounter||0,this.util=new ZK.Util(e),this.initializeNodeHandlers(e)}static registerNodeHandlers(e,r){e.registerNodeHandler(new ci.NodeHandlerDocument(e,r)),e.registerNodeHandler(new ci.NodeHandlerDefinitionOperation(e,r)),e.registerNodeHandler(new ci.NodeHandlerDefinitionFragment(e,r)),e.registerNodeHandler(new ci.NodeHandlerSelectionFragmentSpread(e,r)),e.registerNodeHandler(new ci.NodeHandlerSelectionInlineFragment(e,r)),e.registerNodeHandler(new ci.NodeHandlerSelectionField(e,r))}static registerNodeValueHandlers(e,r){e.registerNodeValueHandler(new ci.NodeValueHandlerVariable(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerInt(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerFloat(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerString(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerBoolean(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerNull(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerEnum(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerList(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerObject(e,r))}static registerDirectiveNodeHandlers(e,r){e.registerDirectiveNodeHandler(new kf.DirectiveNodeHandlerInclude(e,r)),e.registerDirectiveNodeHandler(new kf.DirectiveNodeHandlerOptional(e,r)),e.registerDirectiveNodeHandler(new kf.DirectiveNodeHandlerPlural(e,r)),e.registerDirectiveNodeHandler(new kf.DirectiveNodeHandlerSingle(e,r)),e.registerDirectiveNodeHandler(new kf.DirectiveNodeHandlerSkip(e,r))}graphqlToSparqlAlgebra(e,r,n){return KK(this,void 0,void 0,function*(){return this.graphqlToSparqlAlgebraRawContext(e,yield this.util.contextParser.parse(r),n)})}graphqlToSparqlAlgebraRawContext(e,r,n){n=n||{};const a=typeof e=="string"?(0,JK.parse)(e):e,s=this.indexFragments(a),o={context:r,fragmentDefinitions:s,graph:this.util.dataFactory.defaultGraph(),path:[],singularizeState:YK.SingularizeState.PLURAL,singularizeVariables:n.singularizeVariables||{},subject:null,terminalVariables:[],variablesDict:n.variablesDict||{},variablesMetaDict:{}};return this.util.handleNode(a,o)}indexFragments(e){const r={},n=[];for(const a of e.definitions)a.kind==="FragmentDefinition"?r[a.name.value]=a:n.push(a);return e.definitions=n,r}initializeNodeHandlers(e){z1.registerNodeHandlers(this.util,e),z1.registerNodeValueHandlers(this.util,e),z1.registerDirectiveNodeHandlers(this.util,e)}};mg.Converter=eJ;var Zj={};Object.defineProperty(Zj,"__esModule",{value:!0});(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(FA,t),r(mg,t),r(Tf,t),r(Zj,t),r(d0,t)})(Nj);Object.defineProperty(Y_,"__esModule",{value:!0});Y_.ActorQueryParseGraphql=void 0;const tJ=MA,IP=rr,rJ=Nj;class nJ extends tJ.ActorQueryParse{constructor(e){super(e),this.graphqlToSparql=new rJ.Converter({requireContext:!0})}async test(e){var r;if(((r=e.queryFormat)==null?void 0:r.language)!=="graphql")throw new Error("This actor can only parse GraphQL queries");return!0}async run(e){const r=e.context.get(IP.KeysInitQuery.jsonLdContext)||{},n={singularizeVariables:e.context.get(IP.KeysInitQuery.graphqlSingularizeVariables)};return{operation:await this.graphqlToSparql.graphqlToSparqlAlgebra(e.query,r,n)}}}Y_.ActorQueryParseGraphql=nJ;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Y_,t)})(Dj);var e9={},Sg={},ls={},Tg={},bl={},h0={};Object.defineProperty(h0,"__esModule",{value:!0});h0.ActorAbstractMediaTyped=void 0;const iJ=et;class aJ extends iJ.Actor{constructor(e){super(e)}async run(e){if("handle"in e){const r=e;return{handle:await this.runHandle(r.handle,r.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 r=e;return{handle:await this.testHandle(r.handle,r.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")}}h0.ActorAbstractMediaTyped=aJ;var Eg={};Object.defineProperty(Eg,"__esModule",{value:!0});Eg.ActorAbstractMediaTypedFixed=void 0;const sJ=h0;class oJ extends sJ.ActorAbstractMediaTyped{constructor(e){super(e);const r=this.priorityScale||this.priorityScale===0?this.priorityScale:1;this.mediaTypePriorities&&Object.entries(this.mediaTypePriorities).forEach(([n,a],s)=>{this.mediaTypePriorities[n]=r*a}),this.mediaTypePriorities=Object.freeze(this.mediaTypePriorities),this.mediaTypeFormats=Object.freeze(this.mediaTypeFormats)}async testHandle(e,r,n){if(!r||!(r in this.mediaTypePriorities))throw new Error(`Unrecognized media type: ${r}`);return await this.testHandleChecked(e,n)}async testMediaType(e){return!0}async getMediaTypes(e){return this.mediaTypePriorities}async testMediaTypeFormats(e){return!0}async getMediaTypeFormats(e){return this.mediaTypeFormats}}Eg.ActorAbstractMediaTypedFixed=oJ;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(h0,t),r(Eg,t)})(bl);Object.defineProperty(Tg,"__esModule",{value:!0});Tg.ActorQueryResultSerialize=void 0;const uJ=bl;class cJ extends uJ.ActorAbstractMediaTyped{constructor(e){super(e)}}Tg.ActorQueryResultSerialize=cJ;var Og={};Object.defineProperty(Og,"__esModule",{value:!0});Og.ActorQueryResultSerializeFixedMediaTypes=void 0;const lJ=bl;class dJ extends lJ.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e,r){return!0}}Og.ActorQueryResultSerializeFixedMediaTypes=dJ;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Tg,t),r(Og,t)})(ls);var t9={exports:{}},yS={exports:{}},la={},Ag={};Ag.byteLength=pJ;Ag.toByteArray=bJ;Ag.fromByteArray=mJ;var Ds=[],ba=[],fJ=typeof Uint8Array<"u"?Uint8Array:Array,bS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Vl=0,hJ=bS.length;Vl0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function pJ(t){var e=r9(t),r=e[0],n=e[1];return(r+n)*3/4-n}function yJ(t,e,r){return(e+r)*3/4-r}function bJ(t){var e,r=r9(t),n=r[0],a=r[1],s=new fJ(yJ(t,n,a)),o=0,u=a>0?n-4:n,c;for(c=0;c>16&255,s[o++]=e>>8&255,s[o++]=e&255;return a===2&&(e=ba[t.charCodeAt(c)]<<2|ba[t.charCodeAt(c+1)]>>4,s[o++]=e&255),a===1&&(e=ba[t.charCodeAt(c)]<<10|ba[t.charCodeAt(c+1)]<<4|ba[t.charCodeAt(c+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function _J(t){return Ds[t>>18&63]+Ds[t>>12&63]+Ds[t>>6&63]+Ds[t&63]}function gJ(t,e,r){for(var n,a=[],s=e;su?u:o+s));return n===1?(e=t[r-1],a.push(Ds[e>>2]+Ds[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],a.push(Ds[e>>10]+Ds[e>>4&63]+Ds[e<<2&63]+"=")),a.join("")}var HA={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */HA.read=function(t,e,r,n,a){var s,o,u=a*8-n-1,c=(1<>1,d=-7,f=r?a-1:0,h=r?-1:1,p=t[e+f];for(f+=h,s=p&(1<<-d)-1,p>>=-d,d+=u;d>0;s=s*256+t[e+f],f+=h,d-=8);for(o=s&(1<<-d)-1,s>>=-d,d+=n;d>0;o=o*256+t[e+f],f+=h,d-=8);if(s===0)s=1-l;else{if(s===c)return o?NaN:(p?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-l}return(p?-1:1)*o*Math.pow(2,s-n)};HA.write=function(t,e,r,n,a,s){var o,u,c,l=s*8-a-1,d=(1<>1,h=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,b=n?1:-1,_=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,o=d):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+f>=1?e+=h/c:e+=h*Math.pow(2,1-f),e*c>=2&&(o++,c/=2),o+f>=d?(u=0,o=d):o+f>=1?(u=(e*c-1)*Math.pow(2,a),o=o+f):(u=e*Math.pow(2,f-1)*Math.pow(2,a),o=0));a>=8;t[r+p]=u&255,p+=b,u/=256,a-=8);for(o=o<0;t[r+p]=o&255,p+=b,o/=256,l-=8);t[r+p-b]|=_*128};/*! +Tried mapping ${s} to ${JSON.stringify(o)}`,je.ERROR_CODES.INVALID_KEYWORD_ALIAS);if(o&&dt.Util.isPotentialKeyword(dt.Util.getContextValueId(o))&&o["@prefix"]===!0)throw new je.ErrorCoded(`Tried to use keyword aliases as prefix: '${s}': '${JSON.stringify(o)}'`,je.ERROR_CODES.INVALID_TERM_DEFINITION);for(;dt.Util.isPrefixValue(a[s]);){const u=a[s];let c=!1;if(typeof u=="string")a[s]=e.expandTerm(u,!0),c=c||u!==a[s];else{const l=u["@id"],d=u["@type"],f=!("@prefix"in u)||dt.Util.isValidIri(s);if("@id"in u)l!=null&&typeof l=="string"&&(a[s]=Object.assign(Object.assign({},a[s]),{"@id":e.expandTerm(l,!0)}),c=c||l!==a[s]["@id"]);else if(!dt.Util.isPotentialKeyword(s)&&f){const h=e.expandTerm(s,!0);h!==s&&(a[s]=Object.assign(Object.assign({},a[s]),{"@id":h}),c=!0)}if(d&&typeof d=="string"&&d!=="@vocab"&&(!u["@container"]||!u["@container"]["@type"])&&f){let h=e.expandTerm(d,!0);r&&d===h&&(h=e.expandTerm(d,!1)),h!==d&&(c=!0,a[s]=Object.assign(Object.assign({},a[s]),{"@type":h}))}}if(!c)break}}}normalize(e,{processingMode:r,normalizeLanguageTags:n}){if(n||r===1)for(const a of Object.keys(e))if(a==="@language"&&typeof e[a]=="string")e[a]=e[a].toLowerCase();else{const s=e[a];if(s&&typeof s=="object"&&typeof s["@language"]=="string"){const o=s["@language"].toLowerCase();o!==s["@language"]&&(e[a]=Object.assign(Object.assign({},s),{"@language":o}))}}}containersToHash(e){for(const r of Object.keys(e)){const n=e[r];if(n&&typeof n=="object"){if(typeof n["@container"]=="string")e[r]=Object.assign(Object.assign({},n),{"@container":{[n["@container"]]:!0}});else if(Array.isArray(n["@container"])){const a={};for(const s of n["@container"])a[s]=!0;e[r]=Object.assign(Object.assign({},n),{"@container":a})}}}}applyScopedProtected(e,{processingMode:r},n){if(r&&r>=1.1&&e["@protected"]){for(const a of Object.keys(e))if(!dt.Util.isReservedInternalKeyword(a)&&!dt.Util.isPotentialKeyword(a)&&!dt.Util.isTermProtected(e,a)){const s=e[a];s&&typeof s=="object"?"@protected"in e[a]||(e[a]=Object.assign(Object.assign({},e[a]),{"@protected":!0})):(e[a]={"@id":s,"@protected":!0},dt.Util.isSimpleTermDefinitionPrefix(s,n)&&(e[a]=Object.assign(Object.assign({},e[a]),{"@prefix":!0})))}delete e["@protected"]}}validateKeywordRedefinitions(e,r,n,a){for(const s of a??Object.keys(r))if(dt.Util.isTermProtected(e,s)&&(typeof r[s]=="string"?r[s]={"@id":r[s],"@protected":!0}:r[s]=Object.assign(Object.assign({},r[s]),{"@protected":!0}),!dt.Util.deepEqual(e[s],r[s])))throw new je.ErrorCoded(`Attempted to override the protected keyword ${s} from ${JSON.stringify(dt.Util.getContextValueId(e[s]))} to ${JSON.stringify(dt.Util.getContextValueId(r[s]))}`,je.ERROR_CODES.PROTECTED_TERM_REDEFINITION)}validate(e,{processingMode:r}){for(const n of Object.keys(e)){if(dt.Util.isReservedInternalKeyword(n))continue;if(n==="")throw new je.ErrorCoded(`The empty term is not allowed, got: '${n}': '${JSON.stringify(e[n])}'`,je.ERROR_CODES.INVALID_TERM_DEFINITION);const a=e[n],s=typeof a;if(dt.Util.isPotentialKeyword(n)){switch(n.substr(1)){case"vocab":if(a!==null&&s!=="string")throw new je.ErrorCoded(`Found an invalid @vocab IRI: ${a}`,je.ERROR_CODES.INVALID_VOCAB_MAPPING);break;case"base":if(a!==null&&s!=="string")throw new je.ErrorCoded(`Found an invalid @base IRI: ${e[n]}`,je.ERROR_CODES.INVALID_BASE_IRI);break;case"language":a!==null&&vo.validateLanguage(a,!0,je.ERROR_CODES.INVALID_DEFAULT_LANGUAGE);break;case"version":if(a!==null&&s!=="number")throw new je.ErrorCoded(`Found an invalid @version number: ${a}`,je.ERROR_CODES.INVALID_VERSION_VALUE);break;case"direction":a!==null&&vo.validateDirection(a,!0);break;case"propagate":if(r===1)throw new je.ErrorCoded(`Found an illegal @propagate keyword: ${a}`,je.ERROR_CODES.INVALID_CONTEXT_ENTRY);if(a!==null&&s!=="boolean")throw new je.ErrorCoded(`Found an invalid @propagate value: ${a}`,je.ERROR_CODES.INVALID_PROPAGATE_VALUE);break}if(dt.Util.isValidKeyword(n)&&dt.Util.isValidKeyword(dt.Util.getContextValueId(a)))throw new je.ErrorCoded(`Illegal keyword alias in term value, found: '${n}': '${dt.Util.getContextValueId(a)}'`,je.ERROR_CODES.KEYWORD_REDEFINITION);continue}if(a!==null)switch(s){case"string":if(dt.Util.getPrefix(a,e)===n)throw new je.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.CYCLIC_IRI_MAPPING);if(dt.Util.isValidIriWeak(n)){if(a==="@type")throw new je.ErrorCoded(`IRIs can not be mapped to @type, found: '${n}': '${a}'`,je.ERROR_CODES.INVALID_IRI_MAPPING);if(dt.Util.isValidIri(a)&&a!==new $a.JsonLdContextNormalized(e).expandTerm(n))throw new je.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${n}': '${a}'`,je.ERROR_CODES.INVALID_IRI_MAPPING)}break;case"object":if(!dt.Util.isCompactIri(n)&&!("@id"in a)&&(a["@type"]==="@id"?!e["@base"]:!e["@vocab"]))throw new je.ErrorCoded(`Missing @id in context entry: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_IRI_MAPPING);for(const o of Object.keys(a)){const u=a[o];if(u)switch(o){case"@id":if(dt.Util.isValidKeyword(u)&&u!=="@type"&&u!=="@id"&&u!=="@graph"&&u!=="@nest")throw new je.ErrorCoded(`Illegal keyword alias in term value, found: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_IRI_MAPPING);if(dt.Util.isValidIriWeak(n)){if(u==="@type")throw new je.ErrorCoded(`IRIs can not be mapped to @type, found: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_IRI_MAPPING);if(dt.Util.isValidIri(u)&&u!==new $a.JsonLdContextNormalized(e).expandTerm(n))throw new je.ErrorCoded(`IRIs can not be mapped to other IRIs, found: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_IRI_MAPPING)}if(typeof u!="string")throw new je.ErrorCoded(`Detected non-string @id in context entry: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_IRI_MAPPING);if(dt.Util.getPrefix(u,e)===n)throw new je.ErrorCoded(`Detected cyclical IRI mapping in context entry: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.CYCLIC_IRI_MAPPING);break;case"@type":if(a["@container"]==="@type"&&u!=="@id"&&u!=="@vocab")throw new je.ErrorCoded(`@container: @type only allows @type: @id or @vocab, but got: '${n}': '${u}'`,je.ERROR_CODES.INVALID_TYPE_MAPPING);if(typeof u!="string")throw new je.ErrorCoded(`The value of an '@type' must be a string, got '${JSON.stringify(s)}'`,je.ERROR_CODES.INVALID_TYPE_MAPPING);if(u!=="@id"&&u!=="@vocab"&&(r===1||u!=="@json")&&(r===1||u!=="@none")&&(u[0]==="_"||!dt.Util.isValidIri(u)))throw new je.ErrorCoded(`A context @type must be an absolute IRI, found: '${n}': '${u}'`,je.ERROR_CODES.INVALID_TYPE_MAPPING);break;case"@reverse":if(typeof u=="string"&&a["@id"]&&a["@id"]!==u)throw new je.ErrorCoded(`Found non-matching @id and @reverse term values in '${n}':'${u}' and '${a["@id"]}'`,je.ERROR_CODES.INVALID_REVERSE_PROPERTY);if("@nest"in a)throw new je.ErrorCoded(`@nest is not allowed in the reverse property '${n}'`,je.ERROR_CODES.INVALID_REVERSE_PROPERTY);break;case"@container":if(r===1&&(Object.keys(u).length>1||dt.Util.CONTAINERS_1_0.indexOf(Object.keys(u)[0])<0))throw new je.ErrorCoded(`Invalid term @container for '${n}' ('${Object.keys(u)}') in 1.0, must be only one of ${dt.Util.CONTAINERS_1_0.join(", ")}`,je.ERROR_CODES.INVALID_CONTAINER_MAPPING);for(const c of Object.keys(u)){if(c==="@list"&&a["@reverse"])throw new je.ErrorCoded(`Term value can not be @container: @list and @reverse at the same time on '${n}'`,je.ERROR_CODES.INVALID_REVERSE_PROPERTY);if(dt.Util.CONTAINERS.indexOf(c)<0)throw new je.ErrorCoded(`Invalid term @container for '${n}' ('${c}'), must be one of ${dt.Util.CONTAINERS.join(", ")}`,je.ERROR_CODES.INVALID_CONTAINER_MAPPING)}break;case"@language":vo.validateLanguage(u,!0,je.ERROR_CODES.INVALID_LANGUAGE_MAPPING);break;case"@direction":vo.validateDirection(u,!0);break;case"@prefix":if(u!==null&&typeof u!="boolean")throw new je.ErrorCoded(`Found an invalid term @prefix boolean in: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_PREFIX_VALUE);if(!("@id"in a)&&!dt.Util.isValidIri(n))throw new je.ErrorCoded(`Invalid @prefix definition for '${n}' ('${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@index":if(r===1||!a["@container"]||!a["@container"]["@index"])throw new je.ErrorCoded(`Attempt to add illegal key to value object: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_TERM_DEFINITION);break;case"@nest":if(dt.Util.isPotentialKeyword(u)&&u!=="@nest")throw new je.ErrorCoded(`Found an invalid term @nest value in: '${n}': '${JSON.stringify(a)}'`,je.ERROR_CODES.INVALID_NEST_VALUE)}}break;default:throw new je.ErrorCoded(`Found an invalid term value: '${n}': '${a}'`,je.ERROR_CODES.INVALID_TERM_DEFINITION)}}}applyBaseEntry(e,r,n){return typeof e=="string"||(n&&!("@base"in e)&&r.parentContext&&typeof r.parentContext=="object"&&"@base"in r.parentContext&&(e["@base"]=r.parentContext["@base"],r.parentContext["@__baseDocument"]&&(e["@__baseDocument"]=!0)),r.baseIRI&&!r.external&&("@base"in e?e["@base"]!==null&&typeof e["@base"]=="string"&&!dt.Util.isValidIri(e["@base"])&&(e["@base"]=(0,xP.resolve)(e["@base"],r.parentContext&&r.parentContext["@base"]||r.baseIRI)):(e["@base"]=r.baseIRI,e["@__baseDocument"]=!0))),e}normalizeContextIri(e,r){if(!dt.Util.isValidIri(e))try{e=(0,xP.resolve)(e,r)}catch{throw new Error(`Invalid context IRI: ${e}`)}return this.redirectSchemaOrgHttps&&e.startsWith("http://schema.org")&&(e="https://schema.org/"),e}async parseInnerContexts(e,r,n){for(const a of n??Object.keys(e)){const s=e[a];if(s&&typeof s=="object"&&"@context"in s&&s["@context"]!==null&&!r.ignoreScopedContexts){if(this.validateContext)try{const o=Object.assign(Object.assign({},e),{[a]:Object.assign({},e[a])});delete o[a]["@context"],await this.parse(s["@context"],Object.assign(Object.assign({},r),{external:!1,parentContext:o,ignoreProtection:!0,ignoreRemoteScopedContexts:!0,ignoreScopedContexts:!0}))}catch(o){throw new je.ErrorCoded(o.message,je.ERROR_CODES.INVALID_SCOPED_CONTEXT)}e[a]=Object.assign(Object.assign({},s),{"@context":(await this.parse(s["@context"],Object.assign(Object.assign({},r),{external:!1,minimalProcessing:!0,ignoreRemoteScopedContexts:!0,parentContext:e}))).getContextRaw()})}}return e}async parse(e,r={},n={}){const{baseIRI:a,parentContext:s,external:o,processingMode:u=vo.DEFAULT_PROCESSING_MODE,normalizeLanguageTags:c,ignoreProtection:l,minimalProcessing:d}=r,f=r.remoteContexts||{};if(Object.keys(f).length>=this.remoteContextsDepthLimit)throw new je.ErrorCoded("Detected an overflow in remote context inclusions: "+Object.keys(f),je.ERROR_CODES.CONTEXT_OVERFLOW);if(e==null){if(!l&&s&&dt.Util.hasProtectedTerms(s))throw new je.ErrorCoded("Illegal context nullification when terms are protected",je.ERROR_CODES.INVALID_CONTEXT_NULLIFICATION);return new $a.JsonLdContextNormalized(this.applyBaseEntry({},r,!1))}else if(typeof e=="string"){const h=this.normalizeContextIri(e,a),p=this.getOverriddenLoad(h,r);if(p)return new $a.JsonLdContextNormalized(p);const b=await this.parse(await this.load(h),Object.assign(Object.assign({},r),{baseIRI:h,external:!0,remoteContexts:Object.assign(Object.assign({},f),{[h]:!0})}));return this.applyBaseEntry(b.getContextRaw(),r,!0),b}else if(Array.isArray(e)){const h=[],p=await Promise.all(e.map((_,E)=>{if(typeof _=="string"){const w=this.normalizeContextIri(_,a);h[E]=w;const O=this.getOverriddenLoad(w,r);return O||this.load(w)}else return _}));if(d)return new $a.JsonLdContextNormalized(p);const b=await p.reduce((_,E,w)=>_.then(O=>this.parse(E,Object.assign(Object.assign({},r),{baseIRI:h[w]||r.baseIRI,external:!!h[w]||r.external,parentContext:O.getContextRaw(),remoteContexts:h[w]?Object.assign(Object.assign({},f),{[h[w]]:!0}):f}),{skipValidation:w=1.1){if(typeof e["@import"]!="string")throw new je.ErrorCoded("An @import value must be a string, but got "+typeof e["@import"],je.ERROR_CODES.INVALID_IMPORT_VALUE);h=await this.loadImportContext(this.normalizeContextIri(e["@import"],a)),delete e["@import"]}else throw new je.ErrorCoded("Context importing is not supported in JSON-LD 1.0",je.ERROR_CODES.INVALID_CONTEXT_ENTRY);this.applyScopedProtected(h,{processingMode:u},$a.defaultExpandOptions);const p=Object.assign(h,e);this.idifyReverseTerms(p),this.normalize(p,{processingMode:u,normalizeLanguageTags:c}),this.applyScopedProtected(p,{processingMode:u},$a.defaultExpandOptions);const b=Object.keys(p),_=[];if(typeof s=="object")for(const w in s)w in p?_.push(w):p[w]=s[w];await this.parseInnerContexts(p,r,b);const E=new $a.JsonLdContextNormalized(p);return(p&&p["@version"]||vo.DEFAULT_PROCESSING_MODE)>=1.1&&(e["@vocab"]&&typeof e["@vocab"]=="string"||e["@vocab"]==="")&&(s&&"@vocab"in s&&e["@vocab"].indexOf(":")<0?p["@vocab"]=s["@vocab"]+e["@vocab"]:(dt.Util.isCompactIri(e["@vocab"])||e["@vocab"]in p)&&(p["@vocab"]=E.expandTerm(e["@vocab"],!0))),this.expandPrefixedTerms(E,this.expandContentTypeToBase,b),!l&&s&&u>=1.1&&this.validateKeywordRedefinitions(s,p,$a.defaultExpandOptions,_),this.validateContext&&!n.skipValidation&&this.validate(p,{processingMode:u}),E}else throw new je.ErrorCoded(`Tried parsing a context that is not a string, array or object, but got ${e}`,je.ERROR_CODES.INVALID_LOCAL_CONTEXT)}async load(e){const r=this.documentCache[e];if(r)return r;let n;try{n=await this.documentLoader.load(e)}catch(a){throw new je.ErrorCoded(`Failed to load remote context ${e}: ${a.message}`,je.ERROR_CODES.LOADING_REMOTE_CONTEXT_FAILED)}if(!("@context"in n))throw new je.ErrorCoded(`Missing @context in remote context at ${e}`,je.ERROR_CODES.INVALID_REMOTE_CONTEXT);return this.documentCache[e]=n["@context"]}getOverriddenLoad(e,r){if(e in(r.remoteContexts||{})){if(r.ignoreRemoteScopedContexts)return e;throw new je.ErrorCoded("Detected a cyclic context inclusion of "+e,je.ERROR_CODES.RECURSIVE_CONTEXT_INCLUSION)}return null}async loadImportContext(e){let r=await this.load(e);if(typeof r!="object"||Array.isArray(r))throw new je.ErrorCoded("An imported context must be a single object: "+e,je.ERROR_CODES.INVALID_REMOTE_CONTEXT);if("@import"in r)throw new je.ErrorCoded("An imported context can not import another context: "+e,je.ERROR_CODES.INVALID_CONTEXT_ENTRY);return r=Object.assign({},r),this.containersToHash(r),r}}vo.DEFAULT_PROCESSING_MODE=1.1;wg.ContextParser=vo;var Jj={};Object.defineProperty(Jj,"__esModule",{value:!0});var Yj={};Object.defineProperty(Yj,"__esModule",{value:!0});(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(wg,t),r(Of,t),r(h0,t),r(Jj,t),r(Yj,t),r(VA,t),r(Af,t)})(hn);Object.defineProperty(f0,"__esModule",{value:!0});f0.Util=void 0;const GK=ht,zK=hn,WK=xt;let XK=class{constructor(e){this.nodeHandlers={},this.nodeValueHandlers={},this.directiveNodeHandlers={},this.settings=e,this.dataFactory=e.dataFactory||new GK.DataFactory,this.operationFactory=new WK.Factory(this.dataFactory),this.contextParser=new zK.ContextParser}registerNodeHandler(e){this.nodeHandlers[e.targetKind]=e}registerNodeValueHandler(e){this.nodeValueHandlers[e.targetKind]=e}registerDirectiveNodeHandler(e){this.directiveNodeHandlers[e.targetKind]=e}handleNode(e,r){const n=this.nodeHandlers[e.kind];if(!n)throw new Error(`Unsupported GraphQL node '${e.kind}'`);return n.handle(e,r)}handleNodeValue(e,r,n){const a=this.nodeValueHandlers[e.kind];if(!a)throw new Error(`Unsupported GraphQL value node '${e.kind}'`);return a.handle(e,r,n)}handleDirectiveNode(e,r){const n=this.directiveNodeHandlers[e.directive.name.value];return n?n.handle(e,r):null}joinOperations(e){if(e.length===1)return e[0];const r=[],n=[];for(const a of e)a.type==="bgp"?r.push(a):n.push(a);if(r.length===e.length)return this.joinOperationsAsBgp(r);if(r.length===e.length-1&&n[0].type==="leftjoin"&&n[0].input[0].type==="bgp"){const a=n[0];return r.push(a.input[0]),this.operationFactory.createLeftJoin(this.joinOperationsAsBgp(r),a.input[1])}else return n.length===e.length?this.joinOperationsAsNestedJoin(n):this.joinOperationsAsNestedJoin([this.joinOperationsAsBgp(r),this.joinOperationsAsNestedJoin(n)])}joinOperationsAsBgp(e){return this.operationFactory.createBgp([].concat.apply([],e.map(r=>r.patterns)))}joinOperationsAsNestedJoin(e){return this.operationFactory.createJoin(e)}appendFieldToPath(e,r){return e.concat([r])}getFieldLabel(e){return(e.alias?e.alias:e.name).value}nameToVariable(e,r){return this.dataFactory.variable((r.path.length?r.path.join(this.settings.variableDelimiter)+this.settings.variableDelimiter:"")+e)}valueToNamedNode(e,r){const n=r.expandTerm(e,!0);if(this.settings.requireContext&&!n)throw new Error("No context entry was found for "+e);return this.dataFactory.namedNode(n||e)}getArgument(e,r){if(e){for(const n of e)if(n.name.value===r)return n}}newTypePattern(e,r,n){return this.operationFactory.createPattern(e,this.dataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),this.valueToNamedNode(r.name.value,n.context),n.graph)}createQuadPattern(e,r,n,a,s){const o=this.valueToNamedNode(r.value,s);return s&&s.getContextRaw()[r.value]&&s.getContextRaw()[r.value]["@reverse"]?this.operationFactory.createPattern(n,o,e,a):this.operationFactory.createPattern(e,o,n,a)}createQuadPath(e,r,n,a,s,o){const u=this.valueToNamedNode(r.value,o);let c=this.operationFactory.createLink(u);for(const l of n.values){if(l.kind!=="EnumValue")throw new Error("Invalid value type for 'alt' argument, must be EnumValue, but got "+l.kind);c=this.operationFactory.createAlt([c,this.operationFactory.createLink(this.valueToNamedNode(l.value,o))])}return o&&o.getContextRaw()[r.value]&&o.getContextRaw()[r.value]["@reverse"]?this.operationFactory.createPath(a,c,e,s):this.operationFactory.createPath(e,c,a,s)}};f0.Util=XK;var KK=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(mg,"__esModule",{value:!0});mg.Converter=void 0;const JK=DK,ci=FA,kf=LA,YK=Tf,ZK=f0;let eJ=class z1{constructor(e){e=e||{},e.variableDelimiter=e.variableDelimiter||"_",e.expressionVariableCounter=e.expressionVariableCounter||0,this.util=new ZK.Util(e),this.initializeNodeHandlers(e)}static registerNodeHandlers(e,r){e.registerNodeHandler(new ci.NodeHandlerDocument(e,r)),e.registerNodeHandler(new ci.NodeHandlerDefinitionOperation(e,r)),e.registerNodeHandler(new ci.NodeHandlerDefinitionFragment(e,r)),e.registerNodeHandler(new ci.NodeHandlerSelectionFragmentSpread(e,r)),e.registerNodeHandler(new ci.NodeHandlerSelectionInlineFragment(e,r)),e.registerNodeHandler(new ci.NodeHandlerSelectionField(e,r))}static registerNodeValueHandlers(e,r){e.registerNodeValueHandler(new ci.NodeValueHandlerVariable(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerInt(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerFloat(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerString(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerBoolean(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerNull(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerEnum(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerList(e,r)),e.registerNodeValueHandler(new ci.NodeValueHandlerObject(e,r))}static registerDirectiveNodeHandlers(e,r){e.registerDirectiveNodeHandler(new kf.DirectiveNodeHandlerInclude(e,r)),e.registerDirectiveNodeHandler(new kf.DirectiveNodeHandlerOptional(e,r)),e.registerDirectiveNodeHandler(new kf.DirectiveNodeHandlerPlural(e,r)),e.registerDirectiveNodeHandler(new kf.DirectiveNodeHandlerSingle(e,r)),e.registerDirectiveNodeHandler(new kf.DirectiveNodeHandlerSkip(e,r))}graphqlToSparqlAlgebra(e,r,n){return KK(this,void 0,void 0,function*(){return this.graphqlToSparqlAlgebraRawContext(e,yield this.util.contextParser.parse(r),n)})}graphqlToSparqlAlgebraRawContext(e,r,n){n=n||{};const a=typeof e=="string"?(0,JK.parse)(e):e,s=this.indexFragments(a),o={context:r,fragmentDefinitions:s,graph:this.util.dataFactory.defaultGraph(),path:[],singularizeState:YK.SingularizeState.PLURAL,singularizeVariables:n.singularizeVariables||{},subject:null,terminalVariables:[],variablesDict:n.variablesDict||{},variablesMetaDict:{}};return this.util.handleNode(a,o)}indexFragments(e){const r={},n=[];for(const a of e.definitions)a.kind==="FragmentDefinition"?r[a.name.value]=a:n.push(a);return e.definitions=n,r}initializeNodeHandlers(e){z1.registerNodeHandlers(this.util,e),z1.registerNodeValueHandlers(this.util,e),z1.registerDirectiveNodeHandlers(this.util,e)}};mg.Converter=eJ;var Zj={};Object.defineProperty(Zj,"__esModule",{value:!0});(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(FA,t),r(mg,t),r(Tf,t),r(Zj,t),r(f0,t)})(Nj);Object.defineProperty(Y_,"__esModule",{value:!0});Y_.ActorQueryParseGraphql=void 0;const tJ=MA,IP=rr,rJ=Nj;class nJ extends tJ.ActorQueryParse{constructor(e){super(e),this.graphqlToSparql=new rJ.Converter({requireContext:!0})}async test(e){var r;if(((r=e.queryFormat)==null?void 0:r.language)!=="graphql")throw new Error("This actor can only parse GraphQL queries");return!0}async run(e){const r=e.context.get(IP.KeysInitQuery.jsonLdContext)||{},n={singularizeVariables:e.context.get(IP.KeysInitQuery.graphqlSingularizeVariables)};return{operation:await this.graphqlToSparql.graphqlToSparqlAlgebra(e.query,r,n)}}}Y_.ActorQueryParseGraphql=nJ;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Y_,t)})(Dj);var e9={},Sg={},ls={},Tg={},bl={},p0={};Object.defineProperty(p0,"__esModule",{value:!0});p0.ActorAbstractMediaTyped=void 0;const iJ=et;class aJ extends iJ.Actor{constructor(e){super(e)}async run(e){if("handle"in e){const r=e;return{handle:await this.runHandle(r.handle,r.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 r=e;return{handle:await this.testHandle(r.handle,r.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")}}p0.ActorAbstractMediaTyped=aJ;var Eg={};Object.defineProperty(Eg,"__esModule",{value:!0});Eg.ActorAbstractMediaTypedFixed=void 0;const sJ=p0;class oJ extends sJ.ActorAbstractMediaTyped{constructor(e){super(e);const r=this.priorityScale||this.priorityScale===0?this.priorityScale:1;this.mediaTypePriorities&&Object.entries(this.mediaTypePriorities).forEach(([n,a],s)=>{this.mediaTypePriorities[n]=r*a}),this.mediaTypePriorities=Object.freeze(this.mediaTypePriorities),this.mediaTypeFormats=Object.freeze(this.mediaTypeFormats)}async testHandle(e,r,n){if(!r||!(r in this.mediaTypePriorities))throw new Error(`Unrecognized media type: ${r}`);return await this.testHandleChecked(e,n)}async testMediaType(e){return!0}async getMediaTypes(e){return this.mediaTypePriorities}async testMediaTypeFormats(e){return!0}async getMediaTypeFormats(e){return this.mediaTypeFormats}}Eg.ActorAbstractMediaTypedFixed=oJ;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(p0,t),r(Eg,t)})(bl);Object.defineProperty(Tg,"__esModule",{value:!0});Tg.ActorQueryResultSerialize=void 0;const uJ=bl;class cJ extends uJ.ActorAbstractMediaTyped{constructor(e){super(e)}}Tg.ActorQueryResultSerialize=cJ;var Og={};Object.defineProperty(Og,"__esModule",{value:!0});Og.ActorQueryResultSerializeFixedMediaTypes=void 0;const lJ=bl;class dJ extends lJ.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e,r){return!0}}Og.ActorQueryResultSerializeFixedMediaTypes=dJ;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Tg,t),r(Og,t)})(ls);var t9={exports:{}},yS={exports:{}},la={},Ag={};Ag.byteLength=pJ;Ag.toByteArray=bJ;Ag.fromByteArray=mJ;var Ds=[],ba=[],fJ=typeof Uint8Array<"u"?Uint8Array:Array,bS="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Vl=0,hJ=bS.length;Vl0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function pJ(t){var e=r9(t),r=e[0],n=e[1];return(r+n)*3/4-n}function yJ(t,e,r){return(e+r)*3/4-r}function bJ(t){var e,r=r9(t),n=r[0],a=r[1],s=new fJ(yJ(t,n,a)),o=0,u=a>0?n-4:n,c;for(c=0;c>16&255,s[o++]=e>>8&255,s[o++]=e&255;return a===2&&(e=ba[t.charCodeAt(c)]<<2|ba[t.charCodeAt(c+1)]>>4,s[o++]=e&255),a===1&&(e=ba[t.charCodeAt(c)]<<10|ba[t.charCodeAt(c+1)]<<4|ba[t.charCodeAt(c+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function _J(t){return Ds[t>>18&63]+Ds[t>>12&63]+Ds[t>>6&63]+Ds[t&63]}function gJ(t,e,r){for(var n,a=[],s=e;su?u:o+s));return n===1?(e=t[r-1],a.push(Ds[e>>2]+Ds[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],a.push(Ds[e>>10]+Ds[e>>4&63]+Ds[e<<2&63]+"=")),a.join("")}var HA={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */HA.read=function(t,e,r,n,a){var s,o,u=a*8-n-1,c=(1<>1,d=-7,f=r?a-1:0,h=r?-1:1,p=t[e+f];for(f+=h,s=p&(1<<-d)-1,p>>=-d,d+=u;d>0;s=s*256+t[e+f],f+=h,d-=8);for(o=s&(1<<-d)-1,s>>=-d,d+=n;d>0;o=o*256+t[e+f],f+=h,d-=8);if(s===0)s=1-l;else{if(s===c)return o?NaN:(p?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-l}return(p?-1:1)*o*Math.pow(2,s-n)};HA.write=function(t,e,r,n,a,s){var o,u,c,l=s*8-a-1,d=(1<>1,h=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:s-1,b=n?1:-1,_=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,o=d):(o=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+f>=1?e+=h/c:e+=h*Math.pow(2,1-f),e*c>=2&&(o++,c/=2),o+f>=d?(u=0,o=d):o+f>=1?(u=(e*c-1)*Math.pow(2,a),o=o+f):(u=e*Math.pow(2,f-1)*Math.pow(2,a),o=0));a>=8;t[r+p]=u&255,p+=b,u/=256,a-=8);for(o=o<0;t[r+p]=o&255,p+=b,o/=256,l-=8);t[r+p-b]|=_*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */(function(t){const e=Ag,r=HA,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=O,t.INSPECT_MAX_BYTES=50;const a=2147483647;t.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=s(),!u.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const M=new Uint8Array(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,Uint8Array.prototype),Object.setPrototypeOf(M,S),M.foo()===42}catch{return!1}}Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}});function o(M){if(M>a)throw new RangeError('The value "'+M+'" is invalid for option "size"');const S=new Uint8Array(M);return Object.setPrototypeOf(S,u.prototype),S}function u(M,S,R){if(typeof M=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return f(M)}return c(M,S,R)}u.poolSize=8192;function c(M,S,R){if(typeof M=="string")return h(M,S);if(ArrayBuffer.isView(M))return b(M);if(M==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M);if(ve(M,ArrayBuffer)||M&&ve(M.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ve(M,SharedArrayBuffer)||M&&ve(M.buffer,SharedArrayBuffer)))return _(M,S,R);if(typeof M=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const z=M.valueOf&&M.valueOf();if(z!=null&&z!==M)return u.from(z,S,R);const ue=E(M);if(ue)return ue;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof M[Symbol.toPrimitive]=="function")return u.from(M[Symbol.toPrimitive]("string"),S,R);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof M)}u.from=function(M,S,R){return c(M,S,R)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array);function l(M){if(typeof M!="number")throw new TypeError('"size" argument must be of type number');if(M<0)throw new RangeError('The value "'+M+'" is invalid for option "size"')}function d(M,S,R){return l(M),M<=0?o(M):S!==void 0?typeof R=="string"?o(M).fill(S,R):o(M).fill(S):o(M)}u.alloc=function(M,S,R){return d(M,S,R)};function f(M){return l(M),o(M<0?0:w(M)|0)}u.allocUnsafe=function(M){return f(M)},u.allocUnsafeSlow=function(M){return f(M)};function h(M,S){if((typeof S!="string"||S==="")&&(S="utf8"),!u.isEncoding(S))throw new TypeError("Unknown encoding: "+S);const R=A(M,S)|0;let z=o(R);const ue=z.write(M,S);return ue!==R&&(z=z.slice(0,ue)),z}function p(M){const S=M.length<0?0:w(M.length)|0,R=o(S);for(let z=0;z=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return M|0}function O(M){return+M!=M&&(M=0),u.alloc(+M)}u.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==u.prototype},u.compare=function(S,R){if(ve(S,Uint8Array)&&(S=u.from(S,S.offset,S.byteLength)),ve(R,Uint8Array)&&(R=u.from(R,R.offset,R.byteLength)),!u.isBuffer(S)||!u.isBuffer(R))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===R)return 0;let z=S.length,ue=R.length;for(let ge=0,we=Math.min(z,ue);geue.length?(u.isBuffer(we)||(we=u.from(we)),we.copy(ue,ge)):Uint8Array.prototype.set.call(ue,we,ge);else if(u.isBuffer(we))we.copy(ue,ge);else throw new TypeError('"list" argument must be an Array of Buffers');ge+=we.length}return ue};function A(M,S){if(u.isBuffer(M))return M.length;if(ArrayBuffer.isView(M)||ve(M,ArrayBuffer))return M.byteLength;if(typeof M!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof M);const R=M.length,z=arguments.length>2&&arguments[2]===!0;if(!z&&R===0)return 0;let ue=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return R;case"utf8":case"utf-8":return q(M).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R*2;case"hex":return R>>>1;case"base64":return ee(M).length;default:if(ue)return z?-1:q(M).length;S=(""+S).toLowerCase(),ue=!0}}u.byteLength=A;function T(M,S,R){let z=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((R===void 0||R>this.length)&&(R=this.length),R<=0)||(R>>>=0,S>>>=0,R<=S))return"";for(M||(M="utf8");;)switch(M){case"hex":return be(this,S,R);case"utf8":case"utf-8":return $(this,S,R);case"ascii":return se(this,S,R);case"latin1":case"binary":return ie(this,S,R);case"base64":return ne(this,S,R);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return he(this,S,R);default:if(z)throw new TypeError("Unknown encoding: "+M);M=(M+"").toLowerCase(),z=!0}}u.prototype._isBuffer=!0;function I(M,S,R){const z=M[S];M[S]=M[R],M[R]=z}u.prototype.swap16=function(){const S=this.length;if(S%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let R=0;RR&&(S+=" ... "),""},n&&(u.prototype[n]=u.prototype.inspect),u.prototype.compare=function(S,R,z,ue,ge){if(ve(S,Uint8Array)&&(S=u.from(S,S.offset,S.byteLength)),!u.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(R===void 0&&(R=0),z===void 0&&(z=S?S.length:0),ue===void 0&&(ue=0),ge===void 0&&(ge=this.length),R<0||z>S.length||ue<0||ge>this.length)throw new RangeError("out of range index");if(ue>=ge&&R>=z)return 0;if(ue>=ge)return-1;if(R>=z)return 1;if(R>>>=0,z>>>=0,ue>>>=0,ge>>>=0,this===S)return 0;let we=ge-ue,Me=z-R;const Ue=Math.min(we,Me),Ge=this.slice(ue,ge),We=S.slice(R,z);for(let lt=0;lt2147483647?R=2147483647:R<-2147483648&&(R=-2147483648),R=+R,me(R)&&(R=ue?0:M.length-1),R<0&&(R=M.length+R),R>=M.length){if(ue)return-1;R=M.length-1}else if(R<0)if(ue)R=0;else return-1;if(typeof S=="string"&&(S=u.from(S,z)),u.isBuffer(S))return S.length===0?-1:U(M,S,R,z,ue);if(typeof S=="number")return S=S&255,typeof Uint8Array.prototype.indexOf=="function"?ue?Uint8Array.prototype.indexOf.call(M,S,R):Uint8Array.prototype.lastIndexOf.call(M,S,R):U(M,[S],R,z,ue);throw new TypeError("val must be string, number or Buffer")}function U(M,S,R,z,ue){let ge=1,we=M.length,Me=S.length;if(z!==void 0&&(z=String(z).toLowerCase(),z==="ucs2"||z==="ucs-2"||z==="utf16le"||z==="utf-16le")){if(M.length<2||S.length<2)return-1;ge=2,we/=2,Me/=2,R/=2}function Ue(We,lt){return ge===1?We[lt]:We.readUInt16BE(lt*ge)}let Ge;if(ue){let We=-1;for(Ge=R;Gewe&&(R=we-Me),Ge=R;Ge>=0;Ge--){let We=!0;for(let lt=0;ltue&&(z=ue)):z=ue;const ge=S.length;z>ge/2&&(z=ge/2);let we;for(we=0;we>>0,isFinite(z)?(z=z>>>0,ue===void 0&&(ue="utf8")):(ue=z,z=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ge=this.length-R;if((z===void 0||z>ge)&&(z=ge),S.length>0&&(z<0||R<0)||R>this.length)throw new RangeError("Attempt to write outside buffer bounds");ue||(ue="utf8");let we=!1;for(;;)switch(ue){case"hex":return H(this,S,R,z);case"utf8":case"utf-8":return N(this,S,R,z);case"ascii":case"latin1":case"binary":return x(this,S,R,z);case"base64":return F(this,S,R,z);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,S,R,z);default:if(we)throw new TypeError("Unknown encoding: "+ue);ue=(""+ue).toLowerCase(),we=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ne(M,S,R){return S===0&&R===M.length?e.fromByteArray(M):e.fromByteArray(M.slice(S,R))}function $(M,S,R){R=Math.min(M.length,R);const z=[];let ue=S;for(;ue239?4:ge>223?3:ge>191?2:1;if(ue+Me<=R){let Ue,Ge,We,lt;switch(Me){case 1:ge<128&&(we=ge);break;case 2:Ue=M[ue+1],(Ue&192)===128&&(lt=(ge&31)<<6|Ue&63,lt>127&&(we=lt));break;case 3:Ue=M[ue+1],Ge=M[ue+2],(Ue&192)===128&&(Ge&192)===128&&(lt=(ge&15)<<12|(Ue&63)<<6|Ge&63,lt>2047&&(lt<55296||lt>57343)&&(we=lt));break;case 4:Ue=M[ue+1],Ge=M[ue+2],We=M[ue+3],(Ue&192)===128&&(Ge&192)===128&&(We&192)===128&&(lt=(ge&15)<<18|(Ue&63)<<12|(Ge&63)<<6|We&63,lt>65535&<<1114112&&(we=lt))}}we===null?(we=65533,Me=1):we>65535&&(we-=65536,z.push(we>>>10&1023|55296),we=56320|we&1023),z.push(we),ue+=Me}return Q(z)}const j=4096;function Q(M){const S=M.length;if(S<=j)return String.fromCharCode.apply(String,M);let R="",z=0;for(;zz)&&(R=z);let ue="";for(let ge=S;gez&&(S=z),R<0?(R+=z,R<0&&(R=0)):R>z&&(R=z),RR)throw new RangeError("Trying to access beyond buffer length")}u.prototype.readUintLE=u.prototype.readUIntLE=function(S,R,z){S=S>>>0,R=R>>>0,z||Te(S,R,this.length);let ue=this[S],ge=1,we=0;for(;++we>>0,R=R>>>0,z||Te(S,R,this.length);let ue=this[S+--R],ge=1;for(;R>0&&(ge*=256);)ue+=this[S+--R]*ge;return ue},u.prototype.readUint8=u.prototype.readUInt8=function(S,R){return S=S>>>0,R||Te(S,1,this.length),this[S]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(S,R){return S=S>>>0,R||Te(S,2,this.length),this[S]|this[S+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(S,R){return S=S>>>0,R||Te(S,2,this.length),this[S]<<8|this[S+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(S,R){return S=S>>>0,R||Te(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+this[S+3]*16777216},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(S,R){return S=S>>>0,R||Te(S,4,this.length),this[S]*16777216+(this[S+1]<<16|this[S+2]<<8|this[S+3])},u.prototype.readBigUInt64LE=k(function(S){S=S>>>0,y(S,"offset");const R=this[S],z=this[S+7];(R===void 0||z===void 0)&&v(S,this.length-8);const ue=R+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24,ge=this[++S]+this[++S]*2**8+this[++S]*2**16+z*2**24;return BigInt(ue)+(BigInt(ge)<>>0,y(S,"offset");const R=this[S],z=this[S+7];(R===void 0||z===void 0)&&v(S,this.length-8);const ue=R*2**24+this[++S]*2**16+this[++S]*2**8+this[++S],ge=this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+z;return(BigInt(ue)<>>0,R=R>>>0,z||Te(S,R,this.length);let ue=this[S],ge=1,we=0;for(;++we=ge&&(ue-=Math.pow(2,8*R)),ue},u.prototype.readIntBE=function(S,R,z){S=S>>>0,R=R>>>0,z||Te(S,R,this.length);let ue=R,ge=1,we=this[S+--ue];for(;ue>0&&(ge*=256);)we+=this[S+--ue]*ge;return ge*=128,we>=ge&&(we-=Math.pow(2,8*R)),we},u.prototype.readInt8=function(S,R){return S=S>>>0,R||Te(S,1,this.length),this[S]&128?(255-this[S]+1)*-1:this[S]},u.prototype.readInt16LE=function(S,R){S=S>>>0,R||Te(S,2,this.length);const z=this[S]|this[S+1]<<8;return z&32768?z|4294901760:z},u.prototype.readInt16BE=function(S,R){S=S>>>0,R||Te(S,2,this.length);const z=this[S+1]|this[S]<<8;return z&32768?z|4294901760:z},u.prototype.readInt32LE=function(S,R){return S=S>>>0,R||Te(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},u.prototype.readInt32BE=function(S,R){return S=S>>>0,R||Te(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},u.prototype.readBigInt64LE=k(function(S){S=S>>>0,y(S,"offset");const R=this[S],z=this[S+7];(R===void 0||z===void 0)&&v(S,this.length-8);const ue=this[S+4]+this[S+5]*2**8+this[S+6]*2**16+(z<<24);return(BigInt(ue)<>>0,y(S,"offset");const R=this[S],z=this[S+7];(R===void 0||z===void 0)&&v(S,this.length-8);const ue=(R<<24)+this[++S]*2**16+this[++S]*2**8+this[++S];return(BigInt(ue)<>>0,R||Te(S,4,this.length),r.read(this,S,!0,23,4)},u.prototype.readFloatBE=function(S,R){return S=S>>>0,R||Te(S,4,this.length),r.read(this,S,!1,23,4)},u.prototype.readDoubleLE=function(S,R){return S=S>>>0,R||Te(S,8,this.length),r.read(this,S,!0,52,8)},u.prototype.readDoubleBE=function(S,R){return S=S>>>0,R||Te(S,8,this.length),r.read(this,S,!1,52,8)};function Ne(M,S,R,z,ue,ge){if(!u.isBuffer(M))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>ue||SM.length)throw new RangeError("Index out of range")}u.prototype.writeUintLE=u.prototype.writeUIntLE=function(S,R,z,ue){if(S=+S,R=R>>>0,z=z>>>0,!ue){const Me=Math.pow(2,8*z)-1;Ne(this,S,R,z,Me,0)}let ge=1,we=0;for(this[R]=S&255;++we>>0,z=z>>>0,!ue){const Me=Math.pow(2,8*z)-1;Ne(this,S,R,z,Me,0)}let ge=z-1,we=1;for(this[R+ge]=S&255;--ge>=0&&(we*=256);)this[R+ge]=S/we&255;return R+z},u.prototype.writeUint8=u.prototype.writeUInt8=function(S,R,z){return S=+S,R=R>>>0,z||Ne(this,S,R,1,255,0),this[R]=S&255,R+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(S,R,z){return S=+S,R=R>>>0,z||Ne(this,S,R,2,65535,0),this[R]=S&255,this[R+1]=S>>>8,R+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(S,R,z){return S=+S,R=R>>>0,z||Ne(this,S,R,2,65535,0),this[R]=S>>>8,this[R+1]=S&255,R+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(S,R,z){return S=+S,R=R>>>0,z||Ne(this,S,R,4,4294967295,0),this[R+3]=S>>>24,this[R+2]=S>>>16,this[R+1]=S>>>8,this[R]=S&255,R+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(S,R,z){return S=+S,R=R>>>0,z||Ne(this,S,R,4,4294967295,0),this[R]=S>>>24,this[R+1]=S>>>16,this[R+2]=S>>>8,this[R+3]=S&255,R+4};function ye(M,S,R,z,ue){g(S,z,ue,M,R,7);let ge=Number(S&BigInt(4294967295));M[R++]=ge,ge=ge>>8,M[R++]=ge,ge=ge>>8,M[R++]=ge,ge=ge>>8,M[R++]=ge;let we=Number(S>>BigInt(32)&BigInt(4294967295));return M[R++]=we,we=we>>8,M[R++]=we,we=we>>8,M[R++]=we,we=we>>8,M[R++]=we,R}function ce(M,S,R,z,ue){g(S,z,ue,M,R,7);let ge=Number(S&BigInt(4294967295));M[R+7]=ge,ge=ge>>8,M[R+6]=ge,ge=ge>>8,M[R+5]=ge,ge=ge>>8,M[R+4]=ge;let we=Number(S>>BigInt(32)&BigInt(4294967295));return M[R+3]=we,we=we>>8,M[R+2]=we,we=we>>8,M[R+1]=we,we=we>>8,M[R]=we,R+8}u.prototype.writeBigUInt64LE=k(function(S,R=0){return ye(this,S,R,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=k(function(S,R=0){return ce(this,S,R,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(S,R,z,ue){if(S=+S,R=R>>>0,!ue){const Ue=Math.pow(2,8*z-1);Ne(this,S,R,z,Ue-1,-Ue)}let ge=0,we=1,Me=0;for(this[R]=S&255;++ge>0)-Me&255;return R+z},u.prototype.writeIntBE=function(S,R,z,ue){if(S=+S,R=R>>>0,!ue){const Ue=Math.pow(2,8*z-1);Ne(this,S,R,z,Ue-1,-Ue)}let ge=z-1,we=1,Me=0;for(this[R+ge]=S&255;--ge>=0&&(we*=256);)S<0&&Me===0&&this[R+ge+1]!==0&&(Me=1),this[R+ge]=(S/we>>0)-Me&255;return R+z},u.prototype.writeInt8=function(S,R,z){return S=+S,R=R>>>0,z||Ne(this,S,R,1,127,-128),S<0&&(S=255+S+1),this[R]=S&255,R+1},u.prototype.writeInt16LE=function(S,R,z){return S=+S,R=R>>>0,z||Ne(this,S,R,2,32767,-32768),this[R]=S&255,this[R+1]=S>>>8,R+2},u.prototype.writeInt16BE=function(S,R,z){return S=+S,R=R>>>0,z||Ne(this,S,R,2,32767,-32768),this[R]=S>>>8,this[R+1]=S&255,R+2},u.prototype.writeInt32LE=function(S,R,z){return S=+S,R=R>>>0,z||Ne(this,S,R,4,2147483647,-2147483648),this[R]=S&255,this[R+1]=S>>>8,this[R+2]=S>>>16,this[R+3]=S>>>24,R+4},u.prototype.writeInt32BE=function(S,R,z){return S=+S,R=R>>>0,z||Ne(this,S,R,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),this[R]=S>>>24,this[R+1]=S>>>16,this[R+2]=S>>>8,this[R+3]=S&255,R+4},u.prototype.writeBigInt64LE=k(function(S,R=0){return ye(this,S,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=k(function(S,R=0){return ce(this,S,R,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Re(M,S,R,z,ue,ge){if(R+z>M.length)throw new RangeError("Index out of range");if(R<0)throw new RangeError("Index out of range")}function oe(M,S,R,z,ue){return S=+S,R=R>>>0,ue||Re(M,S,R,4),r.write(M,S,R,z,23,4),R+4}u.prototype.writeFloatLE=function(S,R,z){return oe(this,S,R,!0,z)},u.prototype.writeFloatBE=function(S,R,z){return oe(this,S,R,!1,z)};function J(M,S,R,z,ue){return S=+S,R=R>>>0,ue||Re(M,S,R,8),r.write(M,S,R,z,52,8),R+8}u.prototype.writeDoubleLE=function(S,R,z){return J(this,S,R,!0,z)},u.prototype.writeDoubleBE=function(S,R,z){return J(this,S,R,!1,z)},u.prototype.copy=function(S,R,z,ue){if(!u.isBuffer(S))throw new TypeError("argument should be a Buffer");if(z||(z=0),!ue&&ue!==0&&(ue=this.length),R>=S.length&&(R=S.length),R||(R=0),ue>0&&ue=this.length)throw new RangeError("Index out of range");if(ue<0)throw new RangeError("sourceEnd out of bounds");ue>this.length&&(ue=this.length),S.length-R>>0,z=z===void 0?this.length:z>>>0,S||(S=0);let ge;if(typeof S=="number")for(ge=R;ge2**32?ue=L(String(R)):typeof R=="bigint"&&(ue=String(R),(R>BigInt(2)**BigInt(32)||R<-(BigInt(2)**BigInt(32)))&&(ue=L(ue)),ue+="n"),z+=` It must be ${S}. Received ${ue}`,z},RangeError);function L(M){let S="",R=M.length;const z=M[0]==="-"?1:0;for(;R>=z+4;R-=3)S=`_${M.slice(R-3,R)}${S}`;return`${M.slice(0,R)}${S}`}function P(M,S,R){y(S,"offset"),(M[S]===void 0||M[S+R]===void 0)&&v(S,M.length-(R+1))}function g(M,S,R,z,ue,ge){if(M>R||M3?S===0||S===BigInt(0)?Me=`>= 0${we} and < 2${we} ** ${(ge+1)*8}${we}`:Me=`>= -(2${we} ** ${(ge+1)*8-1}${we}) and < 2 ** ${(ge+1)*8-1}${we}`:Me=`>= ${S}${we} and <= ${R}${we}`,new le.ERR_OUT_OF_RANGE("value",Me,M)}P(z,ue,ge)}function y(M,S){if(typeof M!="number")throw new le.ERR_INVALID_ARG_TYPE(S,"number",M)}function v(M,S,R){throw Math.floor(M)!==M?(y(M,R),new le.ERR_OUT_OF_RANGE(R||"offset","an integer",M)):S<0?new le.ERR_BUFFER_OUT_OF_BOUNDS:new le.ERR_OUT_OF_RANGE(R||"offset",`>= ${R?1:0} and <= ${S}`,M)}const C=/[^+/0-9A-Za-z-_]/g;function V(M){if(M=M.split("=")[0],M=M.trim().replace(C,""),M.length<2)return"";for(;M.length%4!==0;)M=M+"=";return M}function q(M,S){S=S||1/0;let R;const z=M.length;let ue=null;const ge=[];for(let we=0;we55295&&R<57344){if(!ue){if(R>56319){(S-=3)>-1&&ge.push(239,191,189);continue}else if(we+1===z){(S-=3)>-1&&ge.push(239,191,189);continue}ue=R;continue}if(R<56320){(S-=3)>-1&&ge.push(239,191,189),ue=R;continue}R=(ue-55296<<10|R-56320)+65536}else ue&&(S-=3)>-1&&ge.push(239,191,189);if(ue=null,R<128){if((S-=1)<0)break;ge.push(R)}else if(R<2048){if((S-=2)<0)break;ge.push(R>>6|192,R&63|128)}else if(R<65536){if((S-=3)<0)break;ge.push(R>>12|224,R>>6&63|128,R&63|128)}else if(R<1114112){if((S-=4)<0)break;ge.push(R>>18|240,R>>12&63|128,R>>6&63|128,R&63|128)}else throw new Error("Invalid code point")}return ge}function G(M){const S=[];for(let R=0;R>8,ue=R%256,ge.push(ue),ge.push(z);return ge}function ee(M){return e.toByteArray(V(M))}function ae(M,S,R,z){let ue;for(ue=0;ue=S.length||ue>=M.length);++ue)S[ue+R]=M[ue];return ue}function ve(M,S){return M instanceof S||M!=null&&M.constructor!=null&&M.constructor.name!=null&&M.constructor.name===S.name}function me(M){return M!==M}const Ee=function(){const M="0123456789abcdef",S=new Array(256);for(let R=0;R<16;++R){const z=R*16;for(let ue=0;ue<16;++ue)S[z+ue]=M[R]+M[ue]}return S}();function k(M){return typeof BigInt>"u"?W:M}function W(){throw new Error("BigInt not supported")}})(la);var pn={ArrayIsArray(t){return Array.isArray(t)},ArrayPrototypeIncludes(t,e){return t.includes(e)},ArrayPrototypeIndexOf(t,e){return t.indexOf(e)},ArrayPrototypeJoin(t,e){return t.join(e)},ArrayPrototypeMap(t,e){return t.map(e)},ArrayPrototypePop(t,e){return t.pop(e)},ArrayPrototypePush(t,e){return t.push(e)},ArrayPrototypeSlice(t,e,r){return t.slice(e,r)},Error,FunctionPrototypeCall(t,e,...r){return t.call(e,...r)},FunctionPrototypeSymbolHasInstance(t,e){return Function.prototype[Symbol.hasInstance].call(t,e)},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(t,e){return Object.defineProperties(t,e)},ObjectDefineProperty(t,e,r){return Object.defineProperty(t,e,r)},ObjectGetOwnPropertyDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)},ObjectKeys(t){return Object.keys(t)},ObjectSetPrototypeOf(t,e){return Object.setPrototypeOf(t,e)},Promise,PromisePrototypeCatch(t,e){return t.catch(e)},PromisePrototypeThen(t,e,r){return t.then(e,r)},PromiseReject(t){return Promise.reject(t)},ReflectApply:Reflect.apply,RegExpPrototypeTest(t,e){return t.test(e)},SafeSet:Set,String,StringPrototypeSlice(t,e,r){return t.slice(e,r)},StringPrototypeToLowerCase(t){return t.toLowerCase()},StringPrototypeToUpperCase(t){return t.toUpperCase()},StringPrototypeTrim(t){return t.trim()},Symbol,SymbolFor:Symbol.for,SymbolAsyncIterator:Symbol.asyncIterator,SymbolHasInstance:Symbol.hasInstance,SymbolIterator:Symbol.iterator,TypedArrayPrototypeSet(t,e,r){return t.set(e,r)},Uint8Array},n9={exports:{}};(function(t){const e=la,r=Object.getPrototypeOf(async function(){}).constructor,n=globalThis.Blob||e.Blob,a=typeof n<"u"?function(u){return u instanceof n}:function(u){return!1};class s extends Error{constructor(u){if(!Array.isArray(u))throw new TypeError(`Expected input to be an Array, got ${typeof u}`);let c="";for(let l=0;l{o=l,u=d}),resolve:o,reject:u}},promisify(o){return new Promise((u,c)=>{o((l,...d)=>l?c(l):u(...d))})},debuglog(){return function(){}},format(o,...u){return o.replace(/%([sdifj])/g,function(...[c,l]){const d=u.shift();return l==="f"?d.toFixed(6):l==="j"?JSON.stringify(d):l==="s"&&typeof d=="object"?`${d.constructor!==Object?d.constructor.name:""} {}`.trim():d.toString()})},inspect(o){switch(typeof o){case"string":if(o.includes("'"))if(o.includes('"')){if(!o.includes("`")&&!o.includes("${"))return`\`${o}\``}else return`"${o}"`;return`'${o}'`;case"number":return isNaN(o)?"NaN":Object.is(o,-0)?String(o):o;case"bigint":return`${String(o)}n`;case"boolean":case"undefined":return String(o);case"object":return"{}"}},types:{isAsyncFunction(o){return o instanceof r},isArrayBufferView(o){return ArrayBuffer.isView(o)}},isBlob:a},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(n9);var Xo=n9.exports,kA={},Rg={exports:{}};const{AbortController:i9,AbortSignal:vJ}=typeof self<"u"?self:typeof window<"u"?window:void 0;Rg.exports=i9;Rg.exports.AbortSignal=vJ;Rg.exports.default=i9;var xg=Rg.exports;const{format:wJ,inspect:Eb,AggregateError:SJ}=Xo,TJ=globalThis.AggregateError||SJ,EJ=Symbol("kIsNodeError"),OJ=["string","function","number","object","Function","Object","boolean","bigint","symbol"],AJ=/^([A-Z][a-z0-9]*)+$/,RJ="__node_internal_",Ig={};function Kc(t,e){if(!t)throw new Ig.ERR_INTERNAL_ASSERTION(e)}function PP(t){let e="",r=t.length;const n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function xJ(t,e,r){if(typeof e=="function")return Kc(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);const n=(e.match(/%[dfijoOs]/g)||[]).length;return Kc(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:wJ(e,...r)}function Un(t,e,r){r||(r=Error);class n extends r{constructor(...s){super(xJ(t,e,s))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[EJ]=!0,Ig[t]=n}function DP(t){const e=RJ+t.name;return Object.defineProperty(t,"name",{value:e}),t}function IJ(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;const r=new TJ([e,t],e.message);return r.code=e.code,r}return t||e}let PJ=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new Ig.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};Un("ERR_ASSERTION","%s",Error);Un("ERR_INVALID_ARG_TYPE",(t,e,r)=>{Kc(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";const a=[],s=[],o=[];for(const c of e)Kc(typeof c=="string","All expected entries have to be of type string"),OJ.includes(c)?a.push(c.toLowerCase()):AJ.test(c)?s.push(c):(Kc(c!=="object",'The value "object" should be written as "Object"'),o.push(c));if(s.length>0){const c=a.indexOf("object");c!==-1&&(a.splice(a,c,1),s.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 c=a.pop();n+=`one of type ${a.join(", ")}, or ${c}`}}(s.length>0||o.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const c=s.pop();n+=`an instance of ${s.join(", ")}, or ${c}`}}o.length>0&&(n+=" or ")}switch(o.length){case 0:break;case 1:o[0].toLowerCase()!==o[0]&&(n+="an "),n+=`${o[0]}`;break;case 2:n+=`one of ${o[0]} or ${o[1]}`;break;default:{const c=o.pop();n+=`one of ${o.join(", ")}, or ${c}`}}if(r==null)n+=`. Received ${r}`;else if(typeof r=="function"&&r.name)n+=`. Received function ${r.name}`;else if(typeof r=="object"){var u;if((u=r.constructor)!==null&&u!==void 0&&u.name)n+=`. Received an instance of ${r.constructor.name}`;else{const c=Eb(r,{depth:-1});n+=`. Received ${c}`}}else{let c=Eb(r,{colors:!1});c.length>25&&(c=`${c.slice(0,25)}...`),n+=`. Received type ${typeof r} (${c})`}return n},TypeError);Un("ERR_INVALID_ARG_VALUE",(t,e,r="is invalid")=>{let n=Eb(e);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${r}. Received ${n}`},TypeError);Un("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var n;const a=r!=null&&(n=r.constructor)!==null&&n!==void 0&&n.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${t} to be returned from the "${e}" function but got ${a}.`},TypeError);Un("ERR_MISSING_ARGS",(...t)=>{Kc(t.length>0,"At least one arg needs to be specified");let e;const r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(n=>`"${n}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{const n=t.pop();e+=`The ${t.join(", ")}, and ${n} arguments`}break}return`${e} must be specified`},TypeError);Un("ERR_OUT_OF_RANGE",(t,e,r)=>{Kc(e,'Missing "range" argument');let n;return Number.isInteger(r)&&Math.abs(r)>2**32?n=PP(String(r)):typeof r=="bigint"?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=PP(n)),n+="n"):n=Eb(r),`The value of "${t}" is out of range. It must be ${e}. Received ${n}`},RangeError);Un("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);Un("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);Un("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);Un("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);Un("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);Un("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Un("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);Un("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);Un("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);Un("ERR_STREAM_WRITE_AFTER_END","write after end",Error);Un("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);var Vi={AbortError:PJ,aggregateTwoErrors:DP(IJ),hideStackFrames:DP,codes:Ig};const{ArrayIsArray:QA,ArrayPrototypeIncludes:a9,ArrayPrototypeJoin:s9,ArrayPrototypeMap:DJ,NumberIsInteger:GA,NumberIsNaN:NJ,NumberMAX_SAFE_INTEGER:CJ,NumberMIN_SAFE_INTEGER:jJ,NumberParseInt:MJ,ObjectPrototypeHasOwnProperty:FJ,RegExpPrototypeExec:o9,String:LJ,StringPrototypeToUpperCase:BJ,StringPrototypeTrim:$J}=pn,{hideStackFrames:xa,codes:{ERR_SOCKET_BAD_PORT:UJ,ERR_INVALID_ARG_TYPE:xi,ERR_INVALID_ARG_VALUE:Rf,ERR_OUT_OF_RANGE:il,ERR_UNKNOWN_SIGNAL:NP}}=Vi,{normalizeEncoding:qJ}=Xo,{isAsyncFunction:VJ,isArrayBufferView:HJ}=Xo.types,CP={};function kJ(t){return t===(t|0)}function QJ(t){return t===t>>>0}const GJ=/^[0-7]+$/,zJ="must be a 32-bit unsigned integer or an octal string";function WJ(t,e,r){if(typeof t>"u"&&(t=r),typeof t=="string"){if(o9(GJ,t)===null)throw new Rf(e,t,zJ);t=MJ(t,8)}return u9(t,e),t}const XJ=xa((t,e,r=jJ,n=CJ)=>{if(typeof t!="number")throw new xi(e,"number",t);if(!GA(t))throw new il(e,"an integer",t);if(tn)throw new il(e,`>= ${r} && <= ${n}`,t)}),KJ=xa((t,e,r=-2147483648,n=2147483647)=>{if(typeof t!="number")throw new xi(e,"number",t);if(!GA(t))throw new il(e,"an integer",t);if(tn)throw new il(e,`>= ${r} && <= ${n}`,t)}),u9=xa((t,e,r=!1)=>{if(typeof t!="number")throw new xi(e,"number",t);if(!GA(t))throw new il(e,"an integer",t);const n=r?1:0,a=4294967295;if(ta)throw new il(e,`>= ${n} && <= ${a}`,t)});function zA(t,e){if(typeof t!="string")throw new xi(e,"string",t)}function JJ(t,e,r=void 0,n){if(typeof t!="number")throw new xi(e,"number",t);if(r!=null&&tn||(r!=null||n!=null)&&NJ(t))throw new il(e,`${r!=null?`>= ${r}`:""}${r!=null&&n!=null?" && ":""}${n!=null?`<= ${n}`:""}`,t)}const YJ=xa((t,e,r)=>{if(!a9(r,t)){const a="must be one of: "+s9(DJ(r,s=>typeof s=="string"?`'${s}'`:LJ(s)),", ");throw new Rf(e,t,a)}});function c9(t,e){if(typeof t!="boolean")throw new xi(e,"boolean",t)}function _S(t,e,r){return t==null||!FJ(t,e)?r:t[e]}const ZJ=xa((t,e,r=null)=>{const n=_S(r,"allowArray",!1),a=_S(r,"allowFunction",!1);if(!_S(r,"nullable",!1)&&t===null||!n&&QA(t)||typeof t!="object"&&(!a||typeof t!="function"))throw new xi(e,"Object",t)}),eY=xa((t,e)=>{if(t!=null&&typeof t!="object"&&typeof t!="function")throw new xi(e,"a dictionary",t)}),WA=xa((t,e,r=0)=>{if(!QA(t))throw new xi(e,"Array",t);if(t.length{if(!HJ(t))throw new xi(e,["Buffer","TypedArray","DataView"],t)});function aY(t,e){const r=qJ(e),n=t.length;if(r==="hex"&&n%2!==0)throw new Rf("encoding",e,`is invalid for data of length ${n}`)}function sY(t,e="Port",r=!0){if(typeof t!="number"&&typeof t!="string"||typeof t=="string"&&$J(t).length===0||+t!==+t>>>0||t>65535||t===0&&!r)throw new UJ(e,t,r);return t|0}const oY=xa((t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new xi(e,"AbortSignal",t)}),uY=xa((t,e)=>{if(typeof t!="function")throw new xi(e,"Function",t)}),cY=xa((t,e)=>{if(typeof t!="function"||VJ(t))throw new xi(e,"Function",t)}),lY=xa((t,e)=>{if(t!==void 0)throw new xi(e,"undefined",t)});function dY(t,e,r){if(!a9(r,t))throw new xi(e,`('${s9(r,"|")}')`,t)}const fY=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function jP(t,e){if(typeof t>"u"||!o9(fY,t))throw new Rf(e,t,'must be an array or string of format "; rel=preload; as=style"')}function hY(t){if(typeof t=="string")return jP(t,"hints"),t;if(QA(t)){const e=t.length;let r="";if(e===0)return r;for(let n=0;n; rel=preload; as=style"')}var Pg={isInt32:kJ,isUint32:QJ,parseFileMode:WJ,validateArray:WA,validateStringArray:tY,validateBooleanArray:rY,validateBoolean:c9,validateBuffer:iY,validateDictionary:eY,validateEncoding:aY,validateFunction:uY,validateInt32:KJ,validateInteger:XJ,validateNumber:JJ,validateObject:ZJ,validateOneOf:YJ,validatePlainFunction:cY,validatePort:sY,validateSignalName:nY,validateString:zA,validateUint32:u9,validateUndefined:lY,validateUnion:dY,validateAbortSignal:oY,validateLinkHeaderValue:hY},XA={exports:{}};const{Symbol:Dg,SymbolAsyncIterator:MP,SymbolIterator:FP,SymbolFor:l9}=pn,d9=Dg("kDestroyed"),f9=Dg("kIsErrored"),FE=Dg("kIsReadable"),h9=Dg("kIsDisturbed"),pY=l9("nodejs.webstream.isClosedPromise"),yY=l9("nodejs.webstream.controllerErrorFunction");function Ng(t,e=!1){var r;return!!(t&&typeof t.pipe=="function"&&typeof t.on=="function"&&(!e||typeof t.pause=="function"&&typeof t.resume=="function")&&(!t._writableState||((r=t._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!t._writableState||t._readableState))}function Cg(t){var e;return!!(t&&typeof t.write=="function"&&typeof t.on=="function"&&(!t._readableState||((e=t._writableState)===null||e===void 0?void 0:e.writable)!==!1))}function bY(t){return!!(t&&typeof t.pipe=="function"&&t._readableState&&typeof t.on=="function"&&typeof t.write=="function")}function Js(t){return t&&(t._readableState||t._writableState||typeof t.write=="function"&&typeof t.on=="function"||typeof t.pipe=="function"&&typeof t.on=="function")}function p9(t){return!!(t&&!Js(t)&&typeof t.pipeThrough=="function"&&typeof t.getReader=="function"&&typeof t.cancel=="function")}function y9(t){return!!(t&&!Js(t)&&typeof t.getWriter=="function"&&typeof t.abort=="function")}function b9(t){return!!(t&&!Js(t)&&typeof t.readable=="object"&&typeof t.writable=="object")}function _Y(t){return p9(t)||y9(t)||b9(t)}function gY(t,e){return t==null?!1:e===!0?typeof t[MP]=="function":e===!1?typeof t[FP]=="function":typeof t[MP]=="function"||typeof t[FP]=="function"}function jg(t){if(!Js(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!!(t.destroyed||t[d9]||n!=null&&n.destroyed)}function _9(t){if(!Cg(t))return null;if(t.writableEnded===!0)return!0;const e=t._writableState;return e!=null&&e.errored?!1:typeof(e==null?void 0:e.ended)!="boolean"?null:e.ended}function mY(t,e){if(!Cg(t))return null;if(t.writableFinished===!0)return!0;const r=t._writableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.finished)!="boolean"?null:!!(r.finished||e===!1&&r.ended===!0&&r.length===0)}function vY(t){if(!Ng(t))return null;if(t.readableEnded===!0)return!0;const e=t._readableState;return!e||e.errored?!1:typeof(e==null?void 0:e.ended)!="boolean"?null:e.ended}function g9(t,e){if(!Ng(t))return null;const r=t._readableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.endEmitted)!="boolean"?null:!!(r.endEmitted||e===!1&&r.ended===!0&&r.length===0)}function m9(t){return t&&t[FE]!=null?t[FE]:typeof(t==null?void 0:t.readable)!="boolean"?null:jg(t)?!1:Ng(t)&&t.readable&&!g9(t)}function v9(t){return typeof(t==null?void 0:t.writable)!="boolean"?null:jg(t)?!1:Cg(t)&&t.writable&&!_9(t)}function wY(t,e){return Js(t)?jg(t)?!0:!((e==null?void 0:e.readable)!==!1&&m9(t)||(e==null?void 0:e.writable)!==!1&&v9(t)):null}function SY(t){var e,r;return Js(t)?t.writableErrored?t.writableErrored:(e=(r=t._writableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function TY(t){var e,r;return Js(t)?t.readableErrored?t.readableErrored:(e=(r=t._readableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function EY(t){if(!Js(t))return null;if(typeof t.closed=="boolean")return t.closed;const e=t._writableState,r=t._readableState;return typeof(e==null?void 0:e.closed)=="boolean"||typeof(r==null?void 0:r.closed)=="boolean"?(e==null?void 0:e.closed)||(r==null?void 0:r.closed):typeof t._closed=="boolean"&&w9(t)?t._closed:null}function w9(t){return typeof t._closed=="boolean"&&typeof t._defaultKeepAlive=="boolean"&&typeof t._removedConnection=="boolean"&&typeof t._removedContLen=="boolean"}function S9(t){return typeof t._sent100=="boolean"&&w9(t)}function OY(t){var e;return typeof t._consuming=="boolean"&&typeof t._dumped=="boolean"&&((e=t.req)===null||e===void 0?void 0:e.upgradeOrConnect)===void 0}function AY(t){if(!Js(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!n&&S9(t)||!!(n&&n.autoDestroy&&n.emitClose&&n.closed===!1)}function RY(t){var e;return!!(t&&((e=t[h9])!==null&&e!==void 0?e:t.readableDidRead||t.readableAborted))}function xY(t){var e,r,n,a,s,o,u,c,l,d;return!!(t&&((e=(r=(n=(a=(s=(o=t[f9])!==null&&o!==void 0?o:t.readableErrored)!==null&&s!==void 0?s:t.writableErrored)!==null&&a!==void 0?a:(u=t._readableState)===null||u===void 0?void 0:u.errorEmitted)!==null&&n!==void 0?n:(c=t._writableState)===null||c===void 0?void 0:c.errorEmitted)!==null&&r!==void 0?r:(l=t._readableState)===null||l===void 0?void 0:l.errored)!==null&&e!==void 0?e:!((d=t._writableState)===null||d===void 0)&&d.errored))}var Ko={kDestroyed:d9,isDisturbed:RY,kIsDisturbed:h9,isErrored:xY,kIsErrored:f9,isReadable:m9,kIsReadable:FE,kIsClosedPromise:pY,kControllerErrorFunction:yY,isClosed:EY,isDestroyed:jg,isDuplexNodeStream:bY,isFinished:wY,isIterable:gY,isReadableNodeStream:Ng,isReadableStream:p9,isReadableEnded:vY,isReadableFinished:g9,isReadableErrored:TY,isNodeStream:Js,isWebStream:_Y,isWritable:v9,isWritableNodeStream:Cg,isWritableStream:y9,isWritableEnded:_9,isWritableFinished:mY,isWritableErrored:SY,isServerRequest:OY,isServerResponse:S9,willEmitClose:AY,isTransformStream:b9};const Eu=zo(),{AbortError:T9,codes:IY}=Vi,{ERR_INVALID_ARG_TYPE:PY,ERR_STREAM_PREMATURE_CLOSE:LP}=IY,{kEmptyObject:LE,once:BE}=Xo,{validateAbortSignal:DY,validateFunction:NY,validateObject:CY,validateBoolean:jY}=Pg,{Promise:MY,PromisePrototypeThen:FY}=pn,{isClosed:LY,isReadable:BP,isReadableNodeStream:gS,isReadableStream:BY,isReadableFinished:$P,isReadableErrored:UP,isWritable:qP,isWritableNodeStream:VP,isWritableStream:$Y,isWritableFinished:HP,isWritableErrored:kP,isNodeStream:UY,willEmitClose:qY,kIsClosedPromise:VY}=Ko;function HY(t){return t.setHeader&&typeof t.abort=="function"}const $E=()=>{};function E9(t,e,r){var n,a;if(arguments.length===2?(r=e,e=LE):e==null?e=LE:CY(e,"options"),NY(r,"callback"),DY(e.signal,"options.signal"),r=BE(r),BY(t)||$Y(t))return kY(t,e,r);if(!UY(t))throw new PY("stream",["ReadableStream","WritableStream","Stream"],t);const s=(n=e.readable)!==null&&n!==void 0?n:gS(t),o=(a=e.writable)!==null&&a!==void 0?a:VP(t),u=t._writableState,c=t._readableState,l=()=>{t.writable||h()};let d=qY(t)&&gS(t)===s&&VP(t)===o,f=HP(t,!1);const h=()=>{f=!0,t.destroyed&&(d=!1),!(d&&(!t.readable||s))&&(!s||p)&&r.call(t)};let p=$P(t,!1);const b=()=>{p=!0,t.destroyed&&(d=!1),!(d&&(!t.writable||o))&&(!o||f)&&r.call(t)},_=I=>{r.call(t,I)};let E=LY(t);const w=()=>{E=!0;const I=kP(t)||UP(t);if(I&&typeof I!="boolean")return r.call(t,I);if(s&&!p&&gS(t,!0)&&!$P(t,!1))return r.call(t,new LP);if(o&&!f&&!HP(t,!1))return r.call(t,new LP);r.call(t)},O=()=>{E=!0;const I=kP(t)||UP(t);if(I&&typeof I!="boolean")return r.call(t,I);r.call(t)},A=()=>{t.req.on("finish",h)};HY(t)?(t.on("complete",h),d||t.on("abort",w),t.req?A():t.on("request",A)):o&&!u&&(t.on("end",l),t.on("close",l)),!d&&typeof t.aborted=="boolean"&&t.on("aborted",w),t.on("end",b),t.on("finish",h),e.error!==!1&&t.on("error",_),t.on("close",w),E?Eu.nextTick(w):u!=null&&u.errorEmitted||c!=null&&c.errorEmitted?d||Eu.nextTick(O):(!s&&(!d||BP(t))&&(f||qP(t)===!1)||!o&&(!d||qP(t))&&(p||BP(t)===!1)||c&&t.req&&t.aborted)&&Eu.nextTick(O);const T=()=>{r=$E,t.removeListener("aborted",w),t.removeListener("complete",h),t.removeListener("abort",w),t.removeListener("request",A),t.req&&t.req.removeListener("finish",h),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",h),t.removeListener("end",b),t.removeListener("error",_),t.removeListener("close",w)};if(e.signal&&!E){const I=()=>{const D=r;T(),D.call(t,new T9(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)Eu.nextTick(I);else{const D=r;r=BE((...U)=>{e.signal.removeEventListener("abort",I),D.apply(t,U)}),e.signal.addEventListener("abort",I)}}return T}function kY(t,e,r){let n=!1,a=$E;if(e.signal)if(a=()=>{n=!0,r.call(t,new T9(void 0,{cause:e.signal.reason}))},e.signal.aborted)Eu.nextTick(a);else{const o=r;r=BE((...u)=>{e.signal.removeEventListener("abort",a),o.apply(t,u)}),e.signal.addEventListener("abort",a)}const s=(...o)=>{n||Eu.nextTick(()=>r.apply(t,o))};return FY(t[VY].promise,s,s),$E}function QY(t,e){var r;let n=!1;return e===null&&(e=LE),(r=e)!==null&&r!==void 0&&r.cleanup&&(jY(e.cleanup,"cleanup"),n=e.cleanup),new MY((a,s)=>{const o=E9(t,e,u=>{n&&o(),u?s(u):a()})})}XA.exports=E9;XA.exports.finished=QY;var ec=XA.exports;const Ls=zo(),{aggregateTwoErrors:GY,codes:{ERR_MULTIPLE_CALLBACK:zY},AbortError:WY}=Vi,{Symbol:O9}=pn,{kDestroyed:XY,isDestroyed:KY,isFinished:JY,isServerRequest:YY}=Ko,A9=O9("kDestroy"),UE=O9("kConstruct");function R9(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t))}function ZY(t,e){const r=this._readableState,n=this._writableState,a=n||r;return n!=null&&n.destroyed||r!=null&&r.destroyed?(typeof e=="function"&&e(),this):(R9(t,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),a.constructed?QP(this,t,e):this.once(A9,function(s){QP(this,GY(s,t),e)}),this)}function QP(t,e,r){let n=!1;function a(s){if(n)return;n=!0;const o=t._readableState,u=t._writableState;R9(s,u,o),u&&(u.closed=!0),o&&(o.closed=!0),typeof r=="function"&&r(s),s?Ls.nextTick(eZ,t,s):Ls.nextTick(x9,t)}try{t._destroy(e||null,a)}catch(s){a(s)}}function eZ(t,e){qE(t,e),x9(t)}function x9(t){const e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(r!=null&&r.emitClose||e!=null&&e.emitClose)&&t.emit("close")}function qE(t,e){const r=t._readableState,n=t._writableState;n!=null&&n.errorEmitted||r!=null&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit("error",e))}function tZ(){const t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=e.writable===!1,e.ending=e.writable===!1,e.finished=e.writable===!1)}function VE(t,e,r){const n=t._readableState,a=t._writableState;if(a!=null&&a.destroyed||n!=null&&n.destroyed)return this;n!=null&&n.autoDestroy||a!=null&&a.autoDestroy?t.destroy(e):e&&(e.stack,a&&!a.errored&&(a.errored=e),n&&!n.errored&&(n.errored=e),r?Ls.nextTick(qE,t,e):qE(t,e))}function rZ(t,e){if(typeof t._construct!="function")return;const r=t._readableState,n=t._writableState;r&&(r.constructed=!1),n&&(n.constructed=!1),t.once(UE,e),!(t.listenerCount(UE)>1)&&Ls.nextTick(nZ,t)}function nZ(t){let e=!1;function r(n){if(e){VE(t,n??new zY);return}e=!0;const a=t._readableState,s=t._writableState,o=s||a;a&&(a.constructed=!0),s&&(s.constructed=!0),o.destroyed?t.emit(A9,n):n?VE(t,n,!0):Ls.nextTick(iZ,t)}try{t._construct(n=>{Ls.nextTick(r,n)})}catch(n){Ls.nextTick(r,n)}}function iZ(t){t.emit(UE)}function GP(t){return(t==null?void 0:t.setHeader)&&typeof t.abort=="function"}function I9(t){t.emit("close")}function aZ(t,e){t.emit("error",e),Ls.nextTick(I9,t)}function sZ(t,e){!t||KY(t)||(!e&&!JY(t)&&(e=new WY),YY(t)?(t.socket=null,t.destroy(e)):GP(t)?t.abort():GP(t.req)?t.req.abort():typeof t.destroy=="function"?t.destroy(e):typeof t.close=="function"?t.close():e?Ls.nextTick(aZ,t,e):Ls.nextTick(I9,t),t.destroyed||(t[XY]=!0))}var xf={construct:rZ,destroyer:sZ,destroy:ZY,undestroy:tZ,errorOrDestroy:VE};const{ArrayIsArray:oZ,ObjectSetPrototypeOf:P9}=pn,{EventEmitter:Mg}=Sf;function Fg(t){Mg.call(this,t)}P9(Fg.prototype,Mg.prototype);P9(Fg,Mg);Fg.prototype.pipe=function(t,e){const r=this;function n(d){t.writable&&t.write(d)===!1&&r.pause&&r.pause()}r.on("data",n);function a(){r.readable&&r.resume&&r.resume()}t.on("drain",a),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",o),r.on("close",u));let s=!1;function o(){s||(s=!0,t.end())}function u(){s||(s=!0,typeof t.destroy=="function"&&t.destroy())}function c(d){l(),Mg.listenerCount(this,"error")===0&&this.emit("error",d)}HE(r,"error",c),HE(t,"error",c);function l(){r.removeListener("data",n),t.removeListener("drain",a),r.removeListener("end",o),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t};function HE(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):oZ(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}var KA={Stream:Fg,prependListener:HE},D9={exports:{}};(function(t){const{AbortError:e,codes:r}=Vi,{isNodeStream:n,isWebStream:a,kControllerErrorFunction:s}=Ko,o=ec,{ERR_INVALID_ARG_TYPE:u}=r,c=(l,d)=>{if(typeof l!="object"||!("aborted"in l))throw new u(d,"AbortSignal",l)};t.exports.addAbortSignal=function(d,f){if(c(d,"signal"),!n(f)&&!a(f))throw new u("stream",["ReadableStream","WritableStream","Stream"],f);return t.exports.addAbortSignalNoValidate(d,f)},t.exports.addAbortSignalNoValidate=function(l,d){if(typeof l!="object"||!("aborted"in l))return d;const f=n(d)?()=>{d.destroy(new e(void 0,{cause:l.reason}))}:()=>{d[s](new e(void 0,{cause:l.reason}))};return l.aborted?f():(l.addEventListener("abort",f),o(d,()=>l.removeEventListener("abort",f))),d}})(D9);var Lg=D9.exports;const{StringPrototypeSlice:zP,SymbolIterator:uZ,TypedArrayPrototypeSet:$y,Uint8Array:cZ}=pn,{Buffer:mS}=la,{inspect:lZ}=Xo;var dZ=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const r={data:e,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length}unshift(e){const r={data:e,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length}shift(){if(this.length===0)return;const e=this.head.data;return this.length===1?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(this.length===0)return"";let r=this.head,n=""+r.data;for(;(r=r.next)!==null;)n+=e+r.data;return n}concat(e){if(this.length===0)return mS.alloc(0);const r=mS.allocUnsafe(e>>>0);let n=this.head,a=0;for(;n;)$y(r,n.data,a),a+=n.data.length,n=n.next;return r}consume(e,r){const n=this.head.data;if(es.length)r+=s,e-=s.length;else{e===s.length?(r+=s,++a,n.next?this.head=n.next:this.head=this.tail=null):(r+=zP(s,0,e),this.head=n,n.data=zP(s,e));break}++a}while((n=n.next)!==null);return this.length-=a,r}_getBuffer(e){const r=mS.allocUnsafe(e),n=e;let a=this.head,s=0;do{const o=a.data;if(e>o.length)$y(r,o,n-e),e-=o.length;else{e===o.length?($y(r,o,n-e),++s,a.next?this.head=a.next:this.head=this.tail=null):($y(r,new cZ(o.buffer,o.byteOffset,e),n-e),this.head=a,a.data=o.slice(e));break}++s}while((a=a.next)!==null);return this.length-=s,r}[Symbol.for("nodejs.util.inspect.custom")](e,r){return lZ(this,{...r,depth:0,customInspect:!1})}};const{MathFloor:fZ,NumberIsInteger:hZ}=pn,{ERR_INVALID_ARG_VALUE:pZ}=Vi.codes;function yZ(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function N9(t){return t?16:16*1024}function bZ(t,e,r,n){const a=yZ(e,n,r);if(a!=null){if(!hZ(a)||a<0){const s=n?`options.${r}`:"options.highWaterMark";throw new pZ(s,a)}return fZ(a)}return N9(t.objectMode)}var JA={getHighWaterMark:bZ,getDefaultHighWaterMark:N9},Ob={},kE={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(t,e){var r=la,n=r.Buffer;function a(o,u){for(var c in o)u[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,e),e.Buffer=s);function s(o,u,c){return n(o,u,c)}s.prototype=Object.create(n.prototype),a(n,s),s.from=function(o,u,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,u,c)},s.alloc=function(o,u,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=n(o);return u!==void 0?typeof c=="string"?l.fill(u,c):l.fill(u):l.fill(0),l},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(kE,kE.exports);var _Z=kE.exports,YA=_Z.Buffer,WP=YA.isEncoding||function(t){switch(t=""+t,t&&t.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 gZ(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function mZ(t){var e=gZ(t);if(typeof e!="string"&&(YA.isEncoding===WP||!WP(t)))throw new Error("Unknown encoding: "+t);return e||t}Ob.StringDecoder=p0;function p0(t){this.encoding=mZ(t);var e;switch(this.encoding){case"utf16le":this.text=OZ,this.end=AZ,e=4;break;case"utf8":this.fillLast=SZ,e=4;break;case"base64":this.text=RZ,this.end=xZ,e=3;break;default:this.write=IZ,this.end=PZ;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=YA.allocUnsafe(e)}p0.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function vZ(t,e,r){var n=e.length-1;if(n=0?(a>0&&(t.lastNeed=a-1),a):--n=0?(a>0&&(t.lastNeed=a-2),a):--n=0?(a>0&&(a===2?a=0:t.lastNeed=a-3),a):0))}function wZ(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function SZ(t){var e=this.lastTotal-this.lastNeed,r=wZ(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function TZ(t,e){var r=vZ(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function EZ(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function OZ(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function AZ(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function RZ(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function xZ(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function IZ(t){return t.toString(this.encoding)}function PZ(t){return t&&t.length?this.write(t):""}const XP=zo(),{PromisePrototypeThen:DZ,SymbolAsyncIterator:KP,SymbolIterator:JP}=pn,{Buffer:NZ}=la,{ERR_INVALID_ARG_TYPE:CZ,ERR_STREAM_NULL_VALUES:jZ}=Vi.codes;function MZ(t,e,r){let n;if(typeof e=="string"||e instanceof NZ)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null)}});let a;if(e&&e[KP])a=!0,n=e[KP]();else if(e&&e[JP])a=!1,n=e[JP]();else throw new CZ("iterable",["Iterable"],e);const s=new t({objectMode:!0,highWaterMark:1,...r});let o=!1;s._read=function(){o||(o=!0,c())},s._destroy=function(l,d){DZ(u(l),()=>XP.nextTick(d,l),f=>XP.nextTick(d,f||l))};async function u(l){const d=l!=null,f=typeof n.throw=="function";if(d&&f){const{value:h,done:p}=await n.throw(l);if(await h,p)return}if(typeof n.return=="function"){const{value:h}=await n.return();await h}}async function c(){for(;;){try{const{value:l,done:d}=a?await n.next():n.next();if(d)s.push(null);else{const f=l&&typeof l.then=="function"?await l:l;if(f===null)throw o=!1,new jZ;if(s.push(f))continue;o=!1}}catch(l){s.destroy(l)}break}}return s}var C9=MZ,wS,YP;function Bg(){if(YP)return wS;YP=1;const t=zo(),{ArrayPrototypeIndexOf:e,NumberIsInteger:r,NumberIsNaN:n,NumberParseInt:a,ObjectDefineProperties:s,ObjectKeys:o,ObjectSetPrototypeOf:u,Promise:c,SafeSet:l,SymbolAsyncIterator:d,Symbol:f}=pn;wS=he,he.ReadableState=be;const{EventEmitter:h}=Sf,{Stream:p,prependListener:b}=KA,{Buffer:_}=la,{addAbortSignal:E}=Lg,w=ec;let O=Xo.debuglog("stream",k=>{O=k});const A=dZ,T=xf,{getHighWaterMark:I,getDefaultHighWaterMark:D}=JA,{aggregateTwoErrors:U,codes:{ERR_INVALID_ARG_TYPE:H,ERR_METHOD_NOT_IMPLEMENTED:N,ERR_OUT_OF_RANGE:x,ERR_STREAM_PUSH_AFTER_EOF:F,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:X}}=Vi,{validateObject:ne}=Pg,$=f("kPaused"),{StringDecoder:j}=Ob,Q=C9;u(he.prototype,p.prototype),u(he,p);const se=()=>{},{errorOrDestroy:ie}=T;function be(k,W,M){typeof M!="boolean"&&(M=W instanceof Uo()),this.objectMode=!!(k&&k.objectMode),M&&(this.objectMode=this.objectMode||!!(k&&k.readableObjectMode)),this.highWaterMark=k?I(this,k,"readableHighWaterMark",M):D(!1),this.buffer=new A,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[$]=null,this.errorEmitted=!1,this.emitClose=!k||k.emitClose!==!1,this.autoDestroy=!k||k.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=k&&k.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,k&&k.encoding&&(this.decoder=new j(k.encoding),this.encoding=k.encoding)}function he(k){if(!(this instanceof he))return new he(k);const W=this instanceof Uo();this._readableState=new be(k,this,W),k&&(typeof k.read=="function"&&(this._read=k.read),typeof k.destroy=="function"&&(this._destroy=k.destroy),typeof k.construct=="function"&&(this._construct=k.construct),k.signal&&!W&&E(k.signal,this)),p.call(this,k),T.construct(this,()=>{this._readableState.needReadable&&pe(this,this._readableState)})}he.prototype.destroy=T.destroy,he.prototype._undestroy=T.undestroy,he.prototype._destroy=function(k,W){W(k)},he.prototype[h.captureRejectionSymbol]=function(k){this.destroy(k)},he.prototype.push=function(k,W){return Te(this,k,W,!1)},he.prototype.unshift=function(k,W){return Te(this,k,W,!0)};function Te(k,W,M,S){O("readableAddChunk",W);const R=k._readableState;let z;if(R.objectMode||(typeof W=="string"?(M=M||R.defaultEncoding,R.encoding!==M&&(S&&R.encoding?W=_.from(W,M).toString(R.encoding):(W=_.from(W,M),M=""))):W instanceof _?M="":p._isUint8Array(W)?(W=p._uint8ArrayToBuffer(W),M=""):W!=null&&(z=new H("chunk",["string","Buffer","Uint8Array"],W))),z)ie(k,z);else if(W===null)R.reading=!1,oe(k,R);else if(R.objectMode||W&&W.length>0)if(S)if(R.endEmitted)ie(k,new X);else{if(R.destroyed||R.errored)return!1;Ne(k,R,W,!0)}else if(R.ended)ie(k,new F);else{if(R.destroyed||R.errored)return!1;R.reading=!1,R.decoder&&!M?(W=R.decoder.write(W),R.objectMode||W.length!==0?Ne(k,R,W,!1):pe(k,R)):Ne(k,R,W,!1)}else S||(R.reading=!1,pe(k,R));return!R.ended&&(R.length0?(W.multiAwaitDrain?W.awaitDrainWriters.clear():W.awaitDrainWriters=null,W.dataEmitted=!0,k.emit("data",M)):(W.length+=W.objectMode?1:M.length,S?W.buffer.unshift(M):W.buffer.push(M),W.needReadable&&J(k)),pe(k,W)}he.prototype.isPaused=function(){const k=this._readableState;return k[$]===!0||k.flowing===!1},he.prototype.setEncoding=function(k){const W=new j(k);this._readableState.decoder=W,this._readableState.encoding=this._readableState.decoder.encoding;const M=this._readableState.buffer;let S="";for(const R of M)S+=W.write(R);return M.clear(),S!==""&&M.push(S),this._readableState.length=S.length,this};const ye=1073741824;function ce(k){if(k>ye)throw new x("size","<= 1GiB",k);return k--,k|=k>>>1,k|=k>>>2,k|=k>>>4,k|=k>>>8,k|=k>>>16,k++,k}function Re(k,W){return k<=0||W.length===0&&W.ended?0:W.objectMode?1:n(k)?W.flowing&&W.length?W.buffer.first().length:W.length:k<=W.length?k:W.ended?W.length:0}he.prototype.read=function(k){O("read",k),k===void 0?k=NaN:r(k)||(k=a(k,10));const W=this._readableState,M=k;if(k>W.highWaterMark&&(W.highWaterMark=ce(k)),k!==0&&(W.emittedReadable=!1),k===0&&W.needReadable&&((W.highWaterMark!==0?W.length>=W.highWaterMark:W.length>0)||W.ended))return O("read: emitReadable",W.length,W.ended),W.length===0&&W.ended?ee(this):J(this),null;if(k=Re(k,W),k===0&&W.ended)return W.length===0&&ee(this),null;let S=W.needReadable;if(O("need readable",S),(W.length===0||W.length-k0?R=Y(k,W):R=null,R===null?(W.needReadable=W.length<=W.highWaterMark,k=0):(W.length-=k,W.multiAwaitDrain?W.awaitDrainWriters.clear():W.awaitDrainWriters=null),W.length===0&&(W.ended||(W.needReadable=!0),M!==k&&W.ended&&ee(this)),R!==null&&!W.errorEmitted&&!W.closeEmitted&&(W.dataEmitted=!0,this.emit("data",R)),R};function oe(k,W){if(O("onEofChunk"),!W.ended){if(W.decoder){const M=W.decoder.end();M&&M.length&&(W.buffer.push(M),W.length+=W.objectMode?1:M.length)}W.ended=!0,W.sync?J(k):(W.needReadable=!1,W.emittedReadable=!0,le(k))}}function J(k){const W=k._readableState;O("emitReadable",W.needReadable,W.emittedReadable),W.needReadable=!1,W.emittedReadable||(O("emitReadable",W.flowing),W.emittedReadable=!0,t.nextTick(le,k))}function le(k){const W=k._readableState;O("emitReadable_",W.destroyed,W.length,W.ended),!W.destroyed&&!W.errored&&(W.length||W.ended)&&(k.emit("readable"),W.emittedReadable=!1),W.needReadable=!W.flowing&&!W.ended&&W.length<=W.highWaterMark,V(k)}function pe(k,W){!W.readingMore&&W.constructed&&(W.readingMore=!0,t.nextTick(L,k,W))}function L(k,W){for(;!W.reading&&!W.ended&&(W.length1&&S.pipes.includes(k)&&(O("false write response, pause",S.awaitDrainWriters.size),S.awaitDrainWriters.add(k)),M.pause()),we||(we=P(M,k),k.on("drain",we))}M.on("data",We);function We(Qt){O("ondata");const _r=k.write(Qt);O("dest.write",_r),_r===!1&&Ge()}function lt(Qt){if(O("onerror",Qt),Br(),k.removeListener("error",lt),k.listenerCount("error")===0){const _r=k._writableState||k._readableState;_r&&!_r.errorEmitted?ie(k,Qt):k.emit("error",Qt)}}b(k,"error",lt);function Wr(){k.removeListener("finish",br),Br()}k.once("close",Wr);function br(){O("onfinish"),k.removeListener("close",Wr),Br()}k.once("finish",br);function Br(){O("unpipe"),M.unpipe(k)}return k.emit("pipe",M),k.writableNeedDrain===!0?S.flowing&&Ge():S.flowing||(O("pipe resume"),M.resume()),k};function P(k,W){return function(){const S=k._readableState;S.awaitDrainWriters===W?(O("pipeOnDrain",1),S.awaitDrainWriters=null):S.multiAwaitDrain&&(O("pipeOnDrain",S.awaitDrainWriters.size),S.awaitDrainWriters.delete(W)),(!S.awaitDrainWriters||S.awaitDrainWriters.size===0)&&k.listenerCount("data")&&k.resume()}}he.prototype.unpipe=function(k){const W=this._readableState,M={hasUnpiped:!1};if(W.pipes.length===0)return this;if(!k){const R=W.pipes;W.pipes=[],this.pause();for(let z=0;z0,S.flowing!==!1&&this.resume()):k==="readable"&&!S.endEmitted&&!S.readableListening&&(S.readableListening=S.needReadable=!0,S.flowing=!1,S.emittedReadable=!1,O("on readable",S.length,S.reading),S.length?J(this):S.reading||t.nextTick(y,this)),M},he.prototype.addListener=he.prototype.on,he.prototype.removeListener=function(k,W){const M=p.prototype.removeListener.call(this,k,W);return k==="readable"&&t.nextTick(g,this),M},he.prototype.off=he.prototype.removeListener,he.prototype.removeAllListeners=function(k){const W=p.prototype.removeAllListeners.apply(this,arguments);return(k==="readable"||k===void 0)&&t.nextTick(g,this),W};function g(k){const W=k._readableState;W.readableListening=k.listenerCount("readable")>0,W.resumeScheduled&&W[$]===!1?W.flowing=!0:k.listenerCount("data")>0?k.resume():W.readableListening||(W.flowing=null)}function y(k){O("readable nexttick read 0"),k.read(0)}he.prototype.resume=function(){const k=this._readableState;return k.flowing||(O("resume"),k.flowing=!k.readableListening,v(this,k)),k[$]=!1,this};function v(k,W){W.resumeScheduled||(W.resumeScheduled=!0,t.nextTick(C,k,W))}function C(k,W){O("resume",W.reading),W.reading||k.read(0),W.resumeScheduled=!1,k.emit("resume"),V(k),W.flowing&&!W.reading&&k.read(0)}he.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(O("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[$]=!0,this};function V(k){const W=k._readableState;for(O("flow",W.flowing);W.flowing&&k.read()!==null;);}he.prototype.wrap=function(k){let W=!1;k.on("data",S=>{!this.push(S)&&k.pause&&(W=!0,k.pause())}),k.on("end",()=>{this.push(null)}),k.on("error",S=>{ie(this,S)}),k.on("close",()=>{this.destroy()}),k.on("destroy",()=>{this.destroy()}),this._read=()=>{W&&k.resume&&(W=!1,k.resume())};const M=o(k);for(let S=1;S{R=ue?U(R,ue):null,M(),M=se});try{for(;;){const ue=k.destroyed?null:k.read();if(ue!==null)yield ue;else{if(R)throw R;if(R===null)return;await new c(S)}}}catch(ue){throw R=U(R,ue),R}finally{(R||(W==null?void 0:W.destroyOnReturn)!==!1)&&(R===void 0||k._readableState.autoDestroy)?T.destroyer(k,null):(k.off("readable",S),z())}}s(he.prototype,{readable:{__proto__:null,get(){const k=this._readableState;return!!k&&k.readable!==!1&&!k.destroyed&&!k.errorEmitted&&!k.endEmitted},set(k){this._readableState&&(this._readableState.readable=!!k)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(k){this._readableState&&(this._readableState.flowing=k)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(k){this._readableState&&(this._readableState.destroyed=k)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),s(be.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[$]!==!1},set(k){this[$]=!!k}}}),he._fromList=Y;function Y(k,W){if(W.length===0)return null;let M;return W.objectMode?M=W.buffer.shift():!k||k>=W.length?(W.decoder?M=W.buffer.join(""):W.buffer.length===1?M=W.buffer.first():M=W.buffer.concat(W.length),W.buffer.clear()):M=W.buffer.consume(k,W.decoder),M}function ee(k){const W=k._readableState;O("endReadable",W.endEmitted),W.endEmitted||(W.ended=!0,t.nextTick(ae,W,k))}function ae(k,W){if(O("endReadableNT",k.endEmitted,k.length),!k.errored&&!k.closeEmitted&&!k.endEmitted&&k.length===0){if(k.endEmitted=!0,W.emit("end"),W.writable&&W.allowHalfOpen===!1)t.nextTick(ve,W);else if(k.autoDestroy){const M=W._writableState;(!M||M.autoDestroy&&(M.finished||M.writable===!1))&&W.destroy()}}}function ve(k){k.writable&&!k.writableEnded&&!k.destroyed&&k.end()}he.from=function(k,W){return Q(he,k,W)};let me;function Ee(){return me===void 0&&(me={}),me}return he.fromWeb=function(k,W){return Ee().newStreamReadableFromReadableStream(k,W)},he.toWeb=function(k,W){return Ee().newReadableStreamFromStreamReadable(k,W)},he.wrap=function(k,W){var M,S;return new he({objectMode:(M=(S=k.readableObjectMode)!==null&&S!==void 0?S:k.objectMode)!==null&&M!==void 0?M:!0,...W,destroy(R,z){T.destroyer(k,R),z(R)}}).wrap(k)},wS}var SS,ZP;function j9(){if(ZP)return SS;ZP=1;const t=zo(),{ArrayPrototypeSlice:e,Error:r,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:a,ObjectDefineProperties:s,ObjectSetPrototypeOf:o,StringPrototypeToLowerCase:u,Symbol:c,SymbolHasInstance:l}=pn;SS=j,j.WritableState=ne;const{EventEmitter:d}=Sf,f=KA.Stream,{Buffer:h}=la,p=xf,{addAbortSignal:b}=Lg,{getHighWaterMark:_,getDefaultHighWaterMark:E}=JA,{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:O,ERR_MULTIPLE_CALLBACK:A,ERR_STREAM_CANNOT_PIPE:T,ERR_STREAM_DESTROYED:I,ERR_STREAM_ALREADY_FINISHED:D,ERR_STREAM_NULL_VALUES:U,ERR_STREAM_WRITE_AFTER_END:H,ERR_UNKNOWN_ENCODING:N}=Vi.codes,{errorOrDestroy:x}=p;o(j.prototype,f.prototype),o(j,f);function F(){}const X=c("kOnFinished");function ne(y,v,C){typeof C!="boolean"&&(C=v instanceof Uo()),this.objectMode=!!(y&&y.objectMode),C&&(this.objectMode=this.objectMode||!!(y&&y.writableObjectMode)),this.highWaterMark=y?_(this,y,"writableHighWaterMark",C):E(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const V=!!(y&&y.decodeStrings===!1);this.decodeStrings=!V,this.defaultEncoding=y&&y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=he.bind(void 0,v),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,$(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!y||y.emitClose!==!1,this.autoDestroy=!y||y.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[X]=[]}function $(y){y.buffered=[],y.bufferedIndex=0,y.allBuffers=!0,y.allNoop=!0}ne.prototype.getBuffer=function(){return e(this.buffered,this.bufferedIndex)},a(ne.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function j(y){const v=this instanceof Uo();if(!v&&!n(j,this))return new j(y);this._writableState=new ne(y,this,v),y&&(typeof y.write=="function"&&(this._write=y.write),typeof y.writev=="function"&&(this._writev=y.writev),typeof y.destroy=="function"&&(this._destroy=y.destroy),typeof y.final=="function"&&(this._final=y.final),typeof y.construct=="function"&&(this._construct=y.construct),y.signal&&b(y.signal,this)),f.call(this,y),p.construct(this,()=>{const C=this._writableState;C.writing||ce(this,C),le(this,C)})}a(j,l,{__proto__:null,value:function(y){return n(this,y)?!0:this!==j?!1:y&&y._writableState instanceof ne}}),j.prototype.pipe=function(){x(this,new T)};function Q(y,v,C,V){const q=y._writableState;if(typeof C=="function")V=C,C=q.defaultEncoding;else{if(!C)C=q.defaultEncoding;else if(C!=="buffer"&&!h.isEncoding(C))throw new N(C);typeof V!="function"&&(V=F)}if(v===null)throw new U;if(!q.objectMode)if(typeof v=="string")q.decodeStrings!==!1&&(v=h.from(v,C),C="buffer");else if(v instanceof h)C="buffer";else if(f._isUint8Array(v))v=f._uint8ArrayToBuffer(v),C="buffer";else throw new w("chunk",["string","Buffer","Uint8Array"],v);let G;return q.ending?G=new H:q.destroyed&&(G=new I("write")),G?(t.nextTick(V,G),x(y,G,!0),G):(q.pendingcb++,se(y,q,v,C,V))}j.prototype.write=function(y,v,C){return Q(this,y,v,C)===!0},j.prototype.cork=function(){this._writableState.corked++},j.prototype.uncork=function(){const y=this._writableState;y.corked&&(y.corked--,y.writing||ce(this,y))},j.prototype.setDefaultEncoding=function(v){if(typeof v=="string"&&(v=u(v)),!h.isEncoding(v))throw new N(v);return this._writableState.defaultEncoding=v,this};function se(y,v,C,V,q){const G=v.objectMode?1:C.length;v.length+=G;const Y=v.lengthC.bufferedIndex&&ce(y,C),V?C.afterWriteTickInfo!==null&&C.afterWriteTickInfo.cb===q?C.afterWriteTickInfo.count++:(C.afterWriteTickInfo={count:1,cb:q,stream:y,state:C},t.nextTick(Te,C.afterWriteTickInfo)):Ne(y,C,1,q))}function Te({stream:y,state:v,count:C,cb:V}){return v.afterWriteTickInfo=null,Ne(y,v,C,V)}function Ne(y,v,C,V){for(!v.ending&&!y.destroyed&&v.length===0&&v.needDrain&&(v.needDrain=!1,y.emit("drain"));C-- >0;)v.pendingcb--,V();v.destroyed&&ye(v),le(y,v)}function ye(y){if(y.writing)return;for(let q=y.bufferedIndex;q1&&y._writev){v.pendingcb-=G-1;const ee=v.allNoop?F:ve=>{for(let me=Y;me256?(C.splice(0,Y),v.bufferedIndex=0):v.bufferedIndex=Y}v.bufferProcessing=!1}j.prototype._write=function(y,v,C){if(this._writev)this._writev([{chunk:y,encoding:v}],C);else throw new O("_write()")},j.prototype._writev=null,j.prototype.end=function(y,v,C){const V=this._writableState;typeof y=="function"?(C=y,y=null,v=null):typeof v=="function"&&(C=v,v=null);let q;if(y!=null){const G=Q(this,y,v);G instanceof r&&(q=G)}return V.corked&&(V.corked=1,this.uncork()),q||(!V.errored&&!V.ending?(V.ending=!0,le(this,V,!0),V.ended=!0):V.finished?q=new D("end"):V.destroyed&&(q=new I("end"))),typeof C=="function"&&(q||V.finished?t.nextTick(C,q):V[X].push(C)),this};function Re(y){return y.ending&&!y.destroyed&&y.constructed&&y.length===0&&!y.errored&&y.buffered.length===0&&!y.finished&&!y.writing&&!y.errorEmitted&&!y.closeEmitted}function oe(y,v){let C=!1;function V(q){if(C){x(y,q??A());return}if(C=!0,v.pendingcb--,q){const G=v[X].splice(0);for(let Y=0;Y{Re(q)?pe(V,q):q.pendingcb--},y,v)):Re(v)&&(v.pendingcb++,pe(y,v))))}function pe(y,v){v.pendingcb--,v.finished=!0;const C=v[X].splice(0);for(let V=0;V{if(he!=null)throw new h("nully","body",he)},he=>{p(ie,he)});return ie=new D({objectMode:!0,readable:!1,write:$,final(he){j(async()=>{try{await be,t.nextTick(he,null)}catch(Te){t.nextTick(he,Te)}})},destroy:Q})}throw new h("Iterable, AsyncIterable or AsyncFunction",F,ne)}if(A(x))return N(x.arrayBuffer());if(a(x))return w(D,x,{objectMode:!0,writable:!1});if(typeof(x==null?void 0:x.writable)=="object"||typeof(x==null?void 0:x.readable)=="object"){const ne=x!=null&&x.readable?o(x==null?void 0:x.readable)?x==null?void 0:x.readable:N(x.readable):void 0,$=x!=null&&x.writable?u(x==null?void 0:x.writable)?x==null?void 0:x.writable:N(x.writable):void 0;return H({readable:ne,writable:$})}const X=x==null?void 0:x.then;if(typeof X=="function"){let ne;return I(X,x,$=>{$!=null&&ne.push($),ne.push(null)},$=>{p(ne,$)}),ne=new D({objectMode:!0,writable:!1,read(){}})}throw new f(F,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],x)};function U(N){let{promise:x,resolve:F}=E();const X=new T,ne=X.signal;return{value:N(async function*(){for(;;){const j=x;x=null;const{chunk:Q,done:se,cb:ie}=await j;if(t.nextTick(ie),se)return;if(ne.aborted)throw new d(void 0,{cause:ne.reason});({promise:x,resolve:F}=E()),yield Q}}(),{signal:ne}),write(j,Q,se){const ie=F;F=null,ie({chunk:j,done:!1,cb:se})},final(j){const Q=F;F=null,Q({done:!0,cb:j})},destroy(j,Q){X.abort(),Q(j)}}}function H(N){const x=N.readable&&typeof N.readable.read!="function"?_.wrap(N.readable):N.readable,F=N.writable;let X=!!r(x),ne=!!n(F),$,j,Q,se,ie;function be(he){const Te=se;se=null,Te?Te(he):he&&ie.destroy(he)}return ie=new D({readableObjectMode:!!(x!=null&&x.readableObjectMode),writableObjectMode:!!(F!=null&&F.writableObjectMode),readable:X,writable:ne}),ne&&(l(F,he=>{ne=!1,he&&p(x,he),be(he)}),ie._write=function(he,Te,Ne){F.write(he,Te)?Ne():$=Ne},ie._final=function(he){F.end(),j=he},F.on("drain",function(){if($){const he=$;$=null,he()}}),F.on("finish",function(){if(j){const he=j;j=null,he()}})),X&&(l(x,he=>{X=!1,he&&p(x,he),be(he)}),x.on("readable",function(){if(Q){const he=Q;Q=null,he()}}),x.on("end",function(){ie.push(null)}),ie._read=function(){for(;;){const he=x.read();if(he===null){Q=ie._read;return}if(!ie.push(he))return}}),ie._destroy=function(he,Te){!he&&se!==null&&(he=new d),Q=null,$=null,j=null,se===null?Te(he):(se=Te,p(F,he),p(x,he))},ie}return TS}var ES,tD;function Uo(){if(tD)return ES;tD=1;const{ObjectDefineProperties:t,ObjectGetOwnPropertyDescriptor:e,ObjectKeys:r,ObjectSetPrototypeOf:n}=pn;ES=o;const a=Bg(),s=j9();n(o.prototype,a.prototype),n(o,a);{const d=r(s.prototype);for(let f=0;f{if(e){t?t(e):this.destroy(e);return}r!=null&&this.push(r),this.push(null),t&&t()}):(this.push(null),t&&t())}function UZ(){this._final!==QE&&QE.call(this)}qo.prototype._final=QE;qo.prototype._transform=function(t,e,r){throw new BZ("_transform()")};qo.prototype._write=function(t,e,r){const n=this._readableState,a=this._writableState,s=n.length;this._transform(t,e,(o,u)=>{if(o){r(o);return}u!=null&&this.push(u),a.ended||s===n.length||n.length{n=!0});const a=Ab(t,{readable:e,writable:r},s=>{n=!s});return{destroy:s=>{n||(n=!0,QZ.destroyer(t,s||new WZ("pipe")))},cleanup:a}}function ree(t){return JZ(t[t.length-1],"streams[stream.length - 1]"),t.pop()}function PS(t){if(Pc(t))return t;if(W1(t))return nee(t);throw new GE("val",["Readable","Iterable","AsyncIterable"],t)}async function*nee(t){IS||(IS=Bg()),yield*IS.prototype[HZ].call(t)}async function Uy(t,e,r,{end:n}){let a,s=null;const o=l=>{if(l&&(a=l),s){const d=s;s=null,d()}},u=()=>new VZ((l,d)=>{a?d(a):s=()=>{a?d(a):l()}});e.on("drain",o);const c=Ab(e,{readable:!1},o);try{e.writableNeedDrain&&await u();for await(const l of t)e.write(l)||await u();n&&e.end(),await u(),r()}catch(l){r(a!==l?GZ(a,l):l)}finally{c(),e.off("drain",o)}}async function DS(t,e,r,{end:n}){rd(e)&&(e=e.writable);const a=e.getWriter();try{for await(const s of t)await a.ready,a.write(s).catch(()=>{});await a.ready,n&&await a.close(),r()}catch(s){try{await a.abort(s),r(s)}catch(o){r(o)}}}function iee(...t){return $9(t,kZ(ree(t)))}function $9(t,e,r){if(t.length===1&&qZ(t[0])&&(t=t[0]),t.length<2)throw new zZ("streams");const n=new tee,a=n.signal,s=r==null?void 0:r.signal,o=[];YZ(s,"options.signal");function u(){p(new KZ)}s==null||s.addEventListener("abort",u);let c,l;const d=[];let f=0;function h(O){p(O,--f===0)}function p(O,A){if(O&&(!c||c.code==="ERR_STREAM_PREMATURE_CLOSE")&&(c=O),!(!c&&!A)){for(;d.length;)d.shift()(c);s==null||s.removeEventListener("abort",u),n.abort(),A&&(c||o.forEach(T=>T()),$h.nextTick(e,c,l))}}let b;for(let O=0;O0,D=T||(r==null?void 0:r.end)!==!1,U=O===t.length-1;if(nD(A)){let H=function(N){N&&N.name!=="AbortError"&&N.code!=="ERR_STREAM_PREMATURE_CLOSE"&&h(N)};var w=H;if(D){const{destroy:N,cleanup:x}=iD(A,T,I);d.push(N),AS(A)&&U&&o.push(x)}A.on("error",H),AS(A)&&U&&o.push(()=>{A.removeListener("error",H)})}if(O===0)if(typeof A=="function"){if(b=A({signal:a}),!Pc(b))throw new OS("Iterable, AsyncIterable or Stream","source",b)}else Pc(A)||W1(A)||rd(A)?b=A:b=rD.from(A);else if(typeof A=="function"){if(rd(b)){var _;b=PS((_=b)===null||_===void 0?void 0:_.readable)}else b=PS(b);if(b=A(b,{signal:a}),T){if(!Pc(b,!0))throw new OS("AsyncIterable",`transform[${O-1}]`,b)}else{var E;xS||(xS=B9);const H=new xS({objectMode:!0}),N=(E=b)===null||E===void 0?void 0:E.then;if(typeof N=="function")f++,N.call(b,X=>{l=X,X!=null&&H.write(X),D&&H.end(),$h.nextTick(h)},X=>{H.destroy(X),$h.nextTick(h,X)});else if(Pc(b,!0))f++,Uy(b,H,h,{end:D});else if(RS(b)||rd(b)){const X=b.readable||b;f++,Uy(X,H,h,{end:D})}else throw new OS("AsyncIterable or Promise","destination",b);b=H;const{destroy:x,cleanup:F}=iD(b,!1,!0);d.push(x),U&&o.push(F)}}else if(nD(A)){if(W1(b)){f+=2;const H=aee(b,A,h,{end:D});AS(A)&&U&&o.push(H)}else if(rd(b)||RS(b)){const H=b.readable||b;f++,Uy(H,A,h,{end:D})}else if(Pc(b))f++,Uy(b,A,h,{end:D});else throw new GE("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],b);b=A}else if(ZZ(A)){if(W1(b))f++,DS(PS(b),A,h,{end:D});else if(RS(b)||Pc(b))f++,DS(b,A,h,{end:D});else if(rd(b))f++,DS(b.readable,A,h,{end:D});else throw new GE("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],b);b=A}else b=rD.from(A)}return(a!=null&&a.aborted||s!=null&&s.aborted)&&$h.nextTick(u),b}function aee(t,e,r,{end:n}){let a=!1;if(e.on("close",()=>{a||r(new XZ)}),t.pipe(e,{end:!1}),n){let o=function(){a=!0,e.end()};var s=o;eee(t)?$h.nextTick(o):t.once("end",o)}else r();return Ab(t,{readable:!0,writable:!1},o=>{const u=t._readableState;o&&o.code==="ERR_STREAM_PREMATURE_CLOSE"&&u&&u.ended&&!u.errored&&!u.errorEmitted?t.once("end",r).once("error",r):r(o)}),Ab(e,{readable:!1,writable:!0},r)}var tR={pipelineImpl:$9,pipeline:iee};const{pipeline:see}=tR,qy=Uo(),{destroyer:oee}=xf,{isNodeStream:Vy,isReadable:aD,isWritable:sD,isWebStream:NS,isTransformStream:gc,isWritableStream:oD,isReadableStream:uD}=Ko,{AbortError:uee,codes:{ERR_INVALID_ARG_VALUE:cD,ERR_MISSING_ARGS:cee}}=Vi,lee=ec;var U9=function(...e){if(e.length===0)throw new cee("streams");if(e.length===1)return qy.from(e[0]);const r=[...e];if(typeof e[0]=="function"&&(e[0]=qy.from(e[0])),typeof e[e.length-1]=="function"){const p=e.length-1;e[p]=qy.from(e[p])}for(let p=0;p0&&!(sD(e[p])||oD(e[p])||gc(e[p])))throw new cD(`streams[${p}]`,r[p],"must be writable")}let n,a,s,o,u;function c(p){const b=o;o=null,b?b(p):p?u.destroy(p):!h&&!f&&u.destroy()}const l=e[0],d=see(e,c),f=!!(sD(l)||oD(l)||gc(l)),h=!!(aD(d)||uD(d)||gc(d));if(u=new qy({writableObjectMode:!!(l!=null&&l.writableObjectMode),readableObjectMode:!!(d!=null&&d.writableObjectMode),writable:f,readable:h}),f){if(Vy(l))u._write=function(b,_,E){l.write(b,_)?E():n=E},u._final=function(b){l.end(),a=b},l.on("drain",function(){if(n){const b=n;n=null,b()}});else if(NS(l)){const _=(gc(l)?l.writable:l).getWriter();u._write=async function(E,w,O){try{await _.ready,_.write(E).catch(()=>{}),O()}catch(A){O(A)}},u._final=async function(E){try{await _.ready,_.close().catch(()=>{}),a=E}catch(w){E(w)}}}const p=gc(d)?d.readable:d;lee(p,()=>{if(a){const b=a;a=null,b()}})}if(h){if(Vy(d))d.on("readable",function(){if(s){const p=s;s=null,p()}}),d.on("end",function(){u.push(null)}),u._read=function(){for(;;){const p=d.read();if(p===null){s=u._read;return}if(!u.push(p))return}};else if(NS(d)){const b=(gc(d)?d.readable:d).getReader();u._read=async function(){for(;;)try{const{value:_,done:E}=await b.read();if(!u.push(_))return;if(E){u.push(null);return}}catch{return}}}}return u._destroy=function(p,b){!p&&o!==null&&(p=new uee),s=null,n=null,a=null,o===null?b(p):(o=b,Vy(d)&&oee(d,p))},u};const q9=globalThis.AbortController||xg.AbortController,{codes:{ERR_INVALID_ARG_VALUE:dee,ERR_INVALID_ARG_TYPE:y0,ERR_MISSING_ARGS:fee,ERR_OUT_OF_RANGE:hee},AbortError:zs}=Vi,{validateAbortSignal:_l,validateInteger:pee,validateObject:gl}=Pg,yee=pn.Symbol("kWeak"),{finished:bee}=ec,_ee=U9,{addAbortSignalNoValidate:gee}=Lg,{isWritable:mee,isNodeStream:vee}=Ko,{ArrayPrototypePush:wee,MathFloor:See,Number:Tee,NumberIsNaN:Eee,Promise:lD,PromiseReject:dD,PromisePrototypeThen:Oee,Symbol:V9}=pn,Rb=V9("kEmpty"),fD=V9("kEof");function Aee(t,e){if(e!=null&&gl(e,"options"),(e==null?void 0:e.signal)!=null&&_l(e.signal,"options.signal"),vee(t)&&!mee(t))throw new dee("stream",t,"must be writable");const r=_ee(this,t);return e!=null&&e.signal&&gee(e.signal,r),r}function $g(t,e){if(typeof t!="function")throw new y0("fn",["Function","AsyncFunction"],t);e!=null&&gl(e,"options"),(e==null?void 0:e.signal)!=null&&_l(e.signal,"options.signal");let r=1;return(e==null?void 0:e.concurrency)!=null&&(r=See(e.concurrency)),pee(r,"concurrency",1),(async function*(){var a,s;const o=new q9,u=this,c=[],l=o.signal,d={signal:l},f=()=>o.abort();e!=null&&(a=e.signal)!==null&&a!==void 0&&a.aborted&&f(),e==null||(s=e.signal)===null||s===void 0||s.addEventListener("abort",f);let h,p,b=!1;function _(){b=!0}async function E(){try{for await(let A of u){var w;if(b)return;if(l.aborted)throw new zs;try{A=t(A,d)}catch(T){A=dD(T)}A!==Rb&&(typeof((w=A)===null||w===void 0?void 0:w.catch)=="function"&&A.catch(_),c.push(A),h&&(h(),h=null),!b&&c.length&&c.length>=r&&await new lD(T=>{p=T}))}c.push(fD)}catch(A){const T=dD(A);Oee(T,void 0,_),c.push(T)}finally{var O;b=!0,h&&(h(),h=null),e==null||(O=e.signal)===null||O===void 0||O.removeEventListener("abort",f)}}E();try{for(;;){for(;c.length>0;){const w=await c[0];if(w===fD)return;if(l.aborted)throw new zs;w!==Rb&&(yield w),c.shift(),p&&(p(),p=null)}await new lD(w=>{h=w})}}finally{o.abort(),b=!0,p&&(p(),p=null)}}).call(this)}function Ree(t=void 0){return t!=null&&gl(t,"options"),(t==null?void 0:t.signal)!=null&&_l(t.signal,"options.signal"),(async function*(){let r=0;for await(const a of this){var n;if(t!=null&&(n=t.signal)!==null&&n!==void 0&&n.aborted)throw new zs({cause:t.signal.reason});yield[r++,a]}}).call(this)}async function H9(t,e=void 0){for await(const r of rR.call(this,t,e))return!0;return!1}async function xee(t,e=void 0){if(typeof t!="function")throw new y0("fn",["Function","AsyncFunction"],t);return!await H9.call(this,async(...r)=>!await t(...r),e)}async function Iee(t,e){for await(const r of rR.call(this,t,e))return r}async function Pee(t,e){if(typeof t!="function")throw new y0("fn",["Function","AsyncFunction"],t);async function r(n,a){return await t(n,a),Rb}for await(const n of $g.call(this,r,e));}function rR(t,e){if(typeof t!="function")throw new y0("fn",["Function","AsyncFunction"],t);async function r(n,a){return await t(n,a)?n:Rb}return $g.call(this,r,e)}class Dee extends fee{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function Nee(t,e,r){var n;if(typeof t!="function")throw new y0("reducer",["Function","AsyncFunction"],t);r!=null&&gl(r,"options"),(r==null?void 0:r.signal)!=null&&_l(r.signal,"options.signal");let a=arguments.length>1;if(r!=null&&(n=r.signal)!==null&&n!==void 0&&n.aborted){const l=new zs(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await bee(this.destroy(l)),l}const s=new q9,o=s.signal;if(r!=null&&r.signal){const l={once:!0,[yee]:this};r.signal.addEventListener("abort",()=>s.abort(),l)}let u=!1;try{for await(const l of this){var c;if(u=!0,r!=null&&(c=r.signal)!==null&&c!==void 0&&c.aborted)throw new zs;a?e=await t(e,l,{signal:o}):(e=l,a=!0)}if(!u&&!a)throw new Dee}finally{s.abort()}return e}async function Cee(t){t!=null&&gl(t,"options"),(t==null?void 0:t.signal)!=null&&_l(t.signal,"options.signal");const e=[];for await(const n of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new zs(void 0,{cause:t.signal.reason});wee(e,n)}return e}function jee(t,e){const r=$g.call(this,t,e);return(async function*(){for await(const a of r)yield*a}).call(this)}function k9(t){if(t=Tee(t),Eee(t))return 0;if(t<0)throw new hee("number",">= 0",t);return t}function Mee(t,e=void 0){return e!=null&&gl(e,"options"),(e==null?void 0:e.signal)!=null&&_l(e.signal,"options.signal"),t=k9(t),(async function*(){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new zs;for await(const s of this){var a;if(e!=null&&(a=e.signal)!==null&&a!==void 0&&a.aborted)throw new zs;t--<=0&&(yield s)}}).call(this)}function Fee(t,e=void 0){return e!=null&&gl(e,"options"),(e==null?void 0:e.signal)!=null&&_l(e.signal,"options.signal"),t=k9(t),(async function*(){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new zs;for await(const s of this){var a;if(e!=null&&(a=e.signal)!==null&&a!==void 0&&a.aborted)throw new zs;if(t-- >0)yield s;else return}}).call(this)}kA.streamReturningOperators={asIndexedPairs:Ree,drop:Mee,filter:rR,flatMap:jee,map:$g,take:Fee,compose:Aee};kA.promiseReturningOperators={every:xee,forEach:Pee,reduce:Nee,toArray:Cee,some:H9,find:Iee};var CS,hD;function Q9(){if(hD)return CS;hD=1;const{ArrayPrototypePop:t,Promise:e}=pn,{isIterable:r,isNodeStream:n,isWebStream:a}=Ko,{pipelineImpl:s}=tR,{finished:o}=ec;G9();function u(...c){return new e((l,d)=>{let f,h;const p=c[c.length-1];if(p&&typeof p=="object"&&!n(p)&&!r(p)&&!a(p)){const b=t(c);f=b.signal,h=b.end}s(c,(b,_)=>{b?d(b):l(_)},{signal:f,end:h})})}return CS={finished:o,pipeline:u},CS}var pD;function G9(){if(pD)return yS.exports;pD=1;const{Buffer:t}=la,{ObjectDefineProperty:e,ObjectKeys:r,ReflectApply:n}=pn,{promisify:{custom:a}}=Xo,{streamReturningOperators:s,promiseReturningOperators:o}=kA,{codes:{ERR_ILLEGAL_CONSTRUCTOR:u}}=Vi,c=U9,{pipeline:l}=tR,{destroyer:d}=xf,f=ec,h=Q9(),p=Ko,b=yS.exports=KA.Stream;b.isDisturbed=p.isDisturbed,b.isErrored=p.isErrored,b.isReadable=p.isReadable,b.Readable=Bg();for(const w of r(s)){let A=function(...T){if(new.target)throw u();return b.Readable.from(n(O,this,T))};var E=A;const O=s[w];e(A,"name",{__proto__:null,value:O.name}),e(A,"length",{__proto__:null,value:O.length}),e(b.Readable.prototype,w,{__proto__:null,value:A,enumerable:!1,configurable:!0,writable:!0})}for(const w of r(o)){let A=function(...I){if(new.target)throw u();return n(O,this,I)};var E=A;const O=o[w];e(A,"name",{__proto__:null,value:O.name}),e(A,"length",{__proto__:null,value:O.length}),e(b.Readable.prototype,w,{__proto__:null,value:A,enumerable:!1,configurable:!0,writable:!0})}b.Writable=j9(),b.Duplex=Uo(),b.Transform=F9,b.PassThrough=B9,b.pipeline=l;const{addAbortSignal:_}=Lg;return b.addAbortSignal=_,b.finished=f,b.destroy=d,b.compose=c,e(b,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return h}}),e(l,a,{__proto__:null,enumerable:!0,get(){return h.pipeline}}),e(f,a,{__proto__:null,enumerable:!0,get(){return h.finished}}),b.Stream=b,b._isUint8Array=function(O){return O instanceof Uint8Array},b._uint8ArrayToBuffer=function(O){return t.from(O.buffer,O.byteOffset,O.byteLength)},yS.exports}(function(t){const e=G9(),r=Q9(),n=e.Readable.destroy;t.exports=e.Readable,t.exports._uint8ArrayToBuffer=e._uint8ArrayToBuffer,t.exports._isUint8Array=e._isUint8Array,t.exports.isDisturbed=e.isDisturbed,t.exports.isErrored=e.isErrored,t.exports.isReadable=e.isReadable,t.exports.Readable=e.Readable,t.exports.Writable=e.Writable,t.exports.Duplex=e.Duplex,t.exports.Transform=e.Transform,t.exports.PassThrough=e.PassThrough,t.exports.addAbortSignal=e.addAbortSignal,t.exports.finished=e.finished,t.exports.destroy=e.destroy,t.exports.destroy=n,t.exports.pipeline=e.pipeline,t.exports.compose=e.compose,Object.defineProperty(e,"promises",{configurable:!0,enumerable:!0,get(){return r}}),t.exports.Stream=e.Stream,t.exports.default=t.exports})(t9);var kt=t9.exports;Object.defineProperty(Sg,"__esModule",{value:!0});Sg.ActorQueryResultSerializeJson=void 0;const Lee=ls,yD=nr,Bee=kt;class $ee extends Lee.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,r){if(!["bindings","quads","boolean"].includes(e.type))throw new Error("This actor can only handle bindings or quad streams.");return!0}async runHandle(e,r,n){const a=new Bee.Readable;a._read=()=>{};let s=!0;if(e.type==="bindings"){const o=e.bindingsStream;a.push("["),o.on("error",u=>a.emit("error",u)),o.on("data",u=>{a.push(s?` +`;super(c),this.name="AggregateError",this.errors=u}}t.exports={AggregateError:s,kEmptyObject:Object.freeze({}),once(o){let u=!1;return function(...c){u||(u=!0,o.apply(this,c))}},createDeferredPromise:function(){let o,u;return{promise:new Promise((l,d)=>{o=l,u=d}),resolve:o,reject:u}},promisify(o){return new Promise((u,c)=>{o((l,...d)=>l?c(l):u(...d))})},debuglog(){return function(){}},format(o,...u){return o.replace(/%([sdifj])/g,function(...[c,l]){const d=u.shift();return l==="f"?d.toFixed(6):l==="j"?JSON.stringify(d):l==="s"&&typeof d=="object"?`${d.constructor!==Object?d.constructor.name:""} {}`.trim():d.toString()})},inspect(o){switch(typeof o){case"string":if(o.includes("'"))if(o.includes('"')){if(!o.includes("`")&&!o.includes("${"))return`\`${o}\``}else return`"${o}"`;return`'${o}'`;case"number":return isNaN(o)?"NaN":Object.is(o,-0)?String(o):o;case"bigint":return`${String(o)}n`;case"boolean":case"undefined":return String(o);case"object":return"{}"}},types:{isAsyncFunction(o){return o instanceof r},isArrayBufferView(o){return ArrayBuffer.isView(o)}},isBlob:a},t.exports.promisify.custom=Symbol.for("nodejs.util.promisify.custom")})(n9);var Xo=n9.exports,kA={},Rg={exports:{}};const{AbortController:i9,AbortSignal:vJ}=typeof self<"u"?self:typeof window<"u"?window:void 0;Rg.exports=i9;Rg.exports.AbortSignal=vJ;Rg.exports.default=i9;var xg=Rg.exports;const{format:wJ,inspect:Eb,AggregateError:SJ}=Xo,TJ=globalThis.AggregateError||SJ,EJ=Symbol("kIsNodeError"),OJ=["string","function","number","object","Function","Object","boolean","bigint","symbol"],AJ=/^([A-Z][a-z0-9]*)+$/,RJ="__node_internal_",Ig={};function Kc(t,e){if(!t)throw new Ig.ERR_INTERNAL_ASSERTION(e)}function PP(t){let e="",r=t.length;const n=t[0]==="-"?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function xJ(t,e,r){if(typeof e=="function")return Kc(e.length<=r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${e.length}).`),e(...r);const n=(e.match(/%[dfijoOs]/g)||[]).length;return Kc(n===r.length,`Code: ${t}; The provided arguments length (${r.length}) does not match the required ones (${n}).`),r.length===0?e:wJ(e,...r)}function Un(t,e,r){r||(r=Error);class n extends r{constructor(...s){super(xJ(t,e,s))}toString(){return`${this.name} [${t}]: ${this.message}`}}Object.defineProperties(n.prototype,{name:{value:r.name,writable:!0,enumerable:!1,configurable:!0},toString:{value(){return`${this.name} [${t}]: ${this.message}`},writable:!0,enumerable:!1,configurable:!0}}),n.prototype.code=t,n.prototype[EJ]=!0,Ig[t]=n}function DP(t){const e=RJ+t.name;return Object.defineProperty(t,"name",{value:e}),t}function IJ(t,e){if(t&&e&&t!==e){if(Array.isArray(e.errors))return e.errors.push(t),e;const r=new TJ([e,t],e.message);return r.code=e.code,r}return t||e}let PJ=class extends Error{constructor(e="The operation was aborted",r=void 0){if(r!==void 0&&typeof r!="object")throw new Ig.ERR_INVALID_ARG_TYPE("options","Object",r);super(e,r),this.code="ABORT_ERR",this.name="AbortError"}};Un("ERR_ASSERTION","%s",Error);Un("ERR_INVALID_ARG_TYPE",(t,e,r)=>{Kc(typeof t=="string","'name' must be a string"),Array.isArray(e)||(e=[e]);let n="The ";t.endsWith(" argument")?n+=`${t} `:n+=`"${t}" ${t.includes(".")?"property":"argument"} `,n+="must be ";const a=[],s=[],o=[];for(const c of e)Kc(typeof c=="string","All expected entries have to be of type string"),OJ.includes(c)?a.push(c.toLowerCase()):AJ.test(c)?s.push(c):(Kc(c!=="object",'The value "object" should be written as "Object"'),o.push(c));if(s.length>0){const c=a.indexOf("object");c!==-1&&(a.splice(a,c,1),s.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 c=a.pop();n+=`one of type ${a.join(", ")}, or ${c}`}}(s.length>0||o.length>0)&&(n+=" or ")}if(s.length>0){switch(s.length){case 1:n+=`an instance of ${s[0]}`;break;case 2:n+=`an instance of ${s[0]} or ${s[1]}`;break;default:{const c=s.pop();n+=`an instance of ${s.join(", ")}, or ${c}`}}o.length>0&&(n+=" or ")}switch(o.length){case 0:break;case 1:o[0].toLowerCase()!==o[0]&&(n+="an "),n+=`${o[0]}`;break;case 2:n+=`one of ${o[0]} or ${o[1]}`;break;default:{const c=o.pop();n+=`one of ${o.join(", ")}, or ${c}`}}if(r==null)n+=`. Received ${r}`;else if(typeof r=="function"&&r.name)n+=`. Received function ${r.name}`;else if(typeof r=="object"){var u;if((u=r.constructor)!==null&&u!==void 0&&u.name)n+=`. Received an instance of ${r.constructor.name}`;else{const c=Eb(r,{depth:-1});n+=`. Received ${c}`}}else{let c=Eb(r,{colors:!1});c.length>25&&(c=`${c.slice(0,25)}...`),n+=`. Received type ${typeof r} (${c})`}return n},TypeError);Un("ERR_INVALID_ARG_VALUE",(t,e,r="is invalid")=>{let n=Eb(e);return n.length>128&&(n=n.slice(0,128)+"..."),`The ${t.includes(".")?"property":"argument"} '${t}' ${r}. Received ${n}`},TypeError);Un("ERR_INVALID_RETURN_VALUE",(t,e,r)=>{var n;const a=r!=null&&(n=r.constructor)!==null&&n!==void 0&&n.name?`instance of ${r.constructor.name}`:`type ${typeof r}`;return`Expected ${t} to be returned from the "${e}" function but got ${a}.`},TypeError);Un("ERR_MISSING_ARGS",(...t)=>{Kc(t.length>0,"At least one arg needs to be specified");let e;const r=t.length;switch(t=(Array.isArray(t)?t:[t]).map(n=>`"${n}"`).join(" or "),r){case 1:e+=`The ${t[0]} argument`;break;case 2:e+=`The ${t[0]} and ${t[1]} arguments`;break;default:{const n=t.pop();e+=`The ${t.join(", ")}, and ${n} arguments`}break}return`${e} must be specified`},TypeError);Un("ERR_OUT_OF_RANGE",(t,e,r)=>{Kc(e,'Missing "range" argument');let n;return Number.isInteger(r)&&Math.abs(r)>2**32?n=PP(String(r)):typeof r=="bigint"?(n=String(r),(r>2n**32n||r<-(2n**32n))&&(n=PP(n)),n+="n"):n=Eb(r),`The value of "${t}" is out of range. It must be ${e}. Received ${n}`},RangeError);Un("ERR_MULTIPLE_CALLBACK","Callback called multiple times",Error);Un("ERR_METHOD_NOT_IMPLEMENTED","The %s method is not implemented",Error);Un("ERR_STREAM_ALREADY_FINISHED","Cannot call %s after a stream was finished",Error);Un("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable",Error);Un("ERR_STREAM_DESTROYED","Cannot call %s after a stream was destroyed",Error);Un("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Un("ERR_STREAM_PREMATURE_CLOSE","Premature close",Error);Un("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF",Error);Un("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event",Error);Un("ERR_STREAM_WRITE_AFTER_END","write after end",Error);Un("ERR_UNKNOWN_ENCODING","Unknown encoding: %s",TypeError);var Vi={AbortError:PJ,aggregateTwoErrors:DP(IJ),hideStackFrames:DP,codes:Ig};const{ArrayIsArray:QA,ArrayPrototypeIncludes:a9,ArrayPrototypeJoin:s9,ArrayPrototypeMap:DJ,NumberIsInteger:GA,NumberIsNaN:NJ,NumberMAX_SAFE_INTEGER:CJ,NumberMIN_SAFE_INTEGER:jJ,NumberParseInt:MJ,ObjectPrototypeHasOwnProperty:FJ,RegExpPrototypeExec:o9,String:LJ,StringPrototypeToUpperCase:BJ,StringPrototypeTrim:$J}=pn,{hideStackFrames:xa,codes:{ERR_SOCKET_BAD_PORT:UJ,ERR_INVALID_ARG_TYPE:xi,ERR_INVALID_ARG_VALUE:Rf,ERR_OUT_OF_RANGE:il,ERR_UNKNOWN_SIGNAL:NP}}=Vi,{normalizeEncoding:qJ}=Xo,{isAsyncFunction:VJ,isArrayBufferView:HJ}=Xo.types,CP={};function kJ(t){return t===(t|0)}function QJ(t){return t===t>>>0}const GJ=/^[0-7]+$/,zJ="must be a 32-bit unsigned integer or an octal string";function WJ(t,e,r){if(typeof t>"u"&&(t=r),typeof t=="string"){if(o9(GJ,t)===null)throw new Rf(e,t,zJ);t=MJ(t,8)}return u9(t,e),t}const XJ=xa((t,e,r=jJ,n=CJ)=>{if(typeof t!="number")throw new xi(e,"number",t);if(!GA(t))throw new il(e,"an integer",t);if(tn)throw new il(e,`>= ${r} && <= ${n}`,t)}),KJ=xa((t,e,r=-2147483648,n=2147483647)=>{if(typeof t!="number")throw new xi(e,"number",t);if(!GA(t))throw new il(e,"an integer",t);if(tn)throw new il(e,`>= ${r} && <= ${n}`,t)}),u9=xa((t,e,r=!1)=>{if(typeof t!="number")throw new xi(e,"number",t);if(!GA(t))throw new il(e,"an integer",t);const n=r?1:0,a=4294967295;if(ta)throw new il(e,`>= ${n} && <= ${a}`,t)});function zA(t,e){if(typeof t!="string")throw new xi(e,"string",t)}function JJ(t,e,r=void 0,n){if(typeof t!="number")throw new xi(e,"number",t);if(r!=null&&tn||(r!=null||n!=null)&&NJ(t))throw new il(e,`${r!=null?`>= ${r}`:""}${r!=null&&n!=null?" && ":""}${n!=null?`<= ${n}`:""}`,t)}const YJ=xa((t,e,r)=>{if(!a9(r,t)){const a="must be one of: "+s9(DJ(r,s=>typeof s=="string"?`'${s}'`:LJ(s)),", ");throw new Rf(e,t,a)}});function c9(t,e){if(typeof t!="boolean")throw new xi(e,"boolean",t)}function _S(t,e,r){return t==null||!FJ(t,e)?r:t[e]}const ZJ=xa((t,e,r=null)=>{const n=_S(r,"allowArray",!1),a=_S(r,"allowFunction",!1);if(!_S(r,"nullable",!1)&&t===null||!n&&QA(t)||typeof t!="object"&&(!a||typeof t!="function"))throw new xi(e,"Object",t)}),eY=xa((t,e)=>{if(t!=null&&typeof t!="object"&&typeof t!="function")throw new xi(e,"a dictionary",t)}),WA=xa((t,e,r=0)=>{if(!QA(t))throw new xi(e,"Array",t);if(t.length{if(!HJ(t))throw new xi(e,["Buffer","TypedArray","DataView"],t)});function aY(t,e){const r=qJ(e),n=t.length;if(r==="hex"&&n%2!==0)throw new Rf("encoding",e,`is invalid for data of length ${n}`)}function sY(t,e="Port",r=!0){if(typeof t!="number"&&typeof t!="string"||typeof t=="string"&&$J(t).length===0||+t!==+t>>>0||t>65535||t===0&&!r)throw new UJ(e,t,r);return t|0}const oY=xa((t,e)=>{if(t!==void 0&&(t===null||typeof t!="object"||!("aborted"in t)))throw new xi(e,"AbortSignal",t)}),uY=xa((t,e)=>{if(typeof t!="function")throw new xi(e,"Function",t)}),cY=xa((t,e)=>{if(typeof t!="function"||VJ(t))throw new xi(e,"Function",t)}),lY=xa((t,e)=>{if(t!==void 0)throw new xi(e,"undefined",t)});function dY(t,e,r){if(!a9(r,t))throw new xi(e,`('${s9(r,"|")}')`,t)}const fY=/^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/;function jP(t,e){if(typeof t>"u"||!o9(fY,t))throw new Rf(e,t,'must be an array or string of format "; rel=preload; as=style"')}function hY(t){if(typeof t=="string")return jP(t,"hints"),t;if(QA(t)){const e=t.length;let r="";if(e===0)return r;for(let n=0;n; rel=preload; as=style"')}var Pg={isInt32:kJ,isUint32:QJ,parseFileMode:WJ,validateArray:WA,validateStringArray:tY,validateBooleanArray:rY,validateBoolean:c9,validateBuffer:iY,validateDictionary:eY,validateEncoding:aY,validateFunction:uY,validateInt32:KJ,validateInteger:XJ,validateNumber:JJ,validateObject:ZJ,validateOneOf:YJ,validatePlainFunction:cY,validatePort:sY,validateSignalName:nY,validateString:zA,validateUint32:u9,validateUndefined:lY,validateUnion:dY,validateAbortSignal:oY,validateLinkHeaderValue:hY},XA={exports:{}};const{Symbol:Dg,SymbolAsyncIterator:MP,SymbolIterator:FP,SymbolFor:l9}=pn,d9=Dg("kDestroyed"),f9=Dg("kIsErrored"),FE=Dg("kIsReadable"),h9=Dg("kIsDisturbed"),pY=l9("nodejs.webstream.isClosedPromise"),yY=l9("nodejs.webstream.controllerErrorFunction");function Ng(t,e=!1){var r;return!!(t&&typeof t.pipe=="function"&&typeof t.on=="function"&&(!e||typeof t.pause=="function"&&typeof t.resume=="function")&&(!t._writableState||((r=t._readableState)===null||r===void 0?void 0:r.readable)!==!1)&&(!t._writableState||t._readableState))}function Cg(t){var e;return!!(t&&typeof t.write=="function"&&typeof t.on=="function"&&(!t._readableState||((e=t._writableState)===null||e===void 0?void 0:e.writable)!==!1))}function bY(t){return!!(t&&typeof t.pipe=="function"&&t._readableState&&typeof t.on=="function"&&typeof t.write=="function")}function Js(t){return t&&(t._readableState||t._writableState||typeof t.write=="function"&&typeof t.on=="function"||typeof t.pipe=="function"&&typeof t.on=="function")}function p9(t){return!!(t&&!Js(t)&&typeof t.pipeThrough=="function"&&typeof t.getReader=="function"&&typeof t.cancel=="function")}function y9(t){return!!(t&&!Js(t)&&typeof t.getWriter=="function"&&typeof t.abort=="function")}function b9(t){return!!(t&&!Js(t)&&typeof t.readable=="object"&&typeof t.writable=="object")}function _Y(t){return p9(t)||y9(t)||b9(t)}function gY(t,e){return t==null?!1:e===!0?typeof t[MP]=="function":e===!1?typeof t[FP]=="function":typeof t[MP]=="function"||typeof t[FP]=="function"}function jg(t){if(!Js(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!!(t.destroyed||t[d9]||n!=null&&n.destroyed)}function _9(t){if(!Cg(t))return null;if(t.writableEnded===!0)return!0;const e=t._writableState;return e!=null&&e.errored?!1:typeof(e==null?void 0:e.ended)!="boolean"?null:e.ended}function mY(t,e){if(!Cg(t))return null;if(t.writableFinished===!0)return!0;const r=t._writableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.finished)!="boolean"?null:!!(r.finished||e===!1&&r.ended===!0&&r.length===0)}function vY(t){if(!Ng(t))return null;if(t.readableEnded===!0)return!0;const e=t._readableState;return!e||e.errored?!1:typeof(e==null?void 0:e.ended)!="boolean"?null:e.ended}function g9(t,e){if(!Ng(t))return null;const r=t._readableState;return r!=null&&r.errored?!1:typeof(r==null?void 0:r.endEmitted)!="boolean"?null:!!(r.endEmitted||e===!1&&r.ended===!0&&r.length===0)}function m9(t){return t&&t[FE]!=null?t[FE]:typeof(t==null?void 0:t.readable)!="boolean"?null:jg(t)?!1:Ng(t)&&t.readable&&!g9(t)}function v9(t){return typeof(t==null?void 0:t.writable)!="boolean"?null:jg(t)?!1:Cg(t)&&t.writable&&!_9(t)}function wY(t,e){return Js(t)?jg(t)?!0:!((e==null?void 0:e.readable)!==!1&&m9(t)||(e==null?void 0:e.writable)!==!1&&v9(t)):null}function SY(t){var e,r;return Js(t)?t.writableErrored?t.writableErrored:(e=(r=t._writableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function TY(t){var e,r;return Js(t)?t.readableErrored?t.readableErrored:(e=(r=t._readableState)===null||r===void 0?void 0:r.errored)!==null&&e!==void 0?e:null:null}function EY(t){if(!Js(t))return null;if(typeof t.closed=="boolean")return t.closed;const e=t._writableState,r=t._readableState;return typeof(e==null?void 0:e.closed)=="boolean"||typeof(r==null?void 0:r.closed)=="boolean"?(e==null?void 0:e.closed)||(r==null?void 0:r.closed):typeof t._closed=="boolean"&&w9(t)?t._closed:null}function w9(t){return typeof t._closed=="boolean"&&typeof t._defaultKeepAlive=="boolean"&&typeof t._removedConnection=="boolean"&&typeof t._removedContLen=="boolean"}function S9(t){return typeof t._sent100=="boolean"&&w9(t)}function OY(t){var e;return typeof t._consuming=="boolean"&&typeof t._dumped=="boolean"&&((e=t.req)===null||e===void 0?void 0:e.upgradeOrConnect)===void 0}function AY(t){if(!Js(t))return null;const e=t._writableState,r=t._readableState,n=e||r;return!n&&S9(t)||!!(n&&n.autoDestroy&&n.emitClose&&n.closed===!1)}function RY(t){var e;return!!(t&&((e=t[h9])!==null&&e!==void 0?e:t.readableDidRead||t.readableAborted))}function xY(t){var e,r,n,a,s,o,u,c,l,d;return!!(t&&((e=(r=(n=(a=(s=(o=t[f9])!==null&&o!==void 0?o:t.readableErrored)!==null&&s!==void 0?s:t.writableErrored)!==null&&a!==void 0?a:(u=t._readableState)===null||u===void 0?void 0:u.errorEmitted)!==null&&n!==void 0?n:(c=t._writableState)===null||c===void 0?void 0:c.errorEmitted)!==null&&r!==void 0?r:(l=t._readableState)===null||l===void 0?void 0:l.errored)!==null&&e!==void 0?e:!((d=t._writableState)===null||d===void 0)&&d.errored))}var Ko={kDestroyed:d9,isDisturbed:RY,kIsDisturbed:h9,isErrored:xY,kIsErrored:f9,isReadable:m9,kIsReadable:FE,kIsClosedPromise:pY,kControllerErrorFunction:yY,isClosed:EY,isDestroyed:jg,isDuplexNodeStream:bY,isFinished:wY,isIterable:gY,isReadableNodeStream:Ng,isReadableStream:p9,isReadableEnded:vY,isReadableFinished:g9,isReadableErrored:TY,isNodeStream:Js,isWebStream:_Y,isWritable:v9,isWritableNodeStream:Cg,isWritableStream:y9,isWritableEnded:_9,isWritableFinished:mY,isWritableErrored:SY,isServerRequest:OY,isServerResponse:S9,willEmitClose:AY,isTransformStream:b9};const Eu=zo(),{AbortError:T9,codes:IY}=Vi,{ERR_INVALID_ARG_TYPE:PY,ERR_STREAM_PREMATURE_CLOSE:LP}=IY,{kEmptyObject:LE,once:BE}=Xo,{validateAbortSignal:DY,validateFunction:NY,validateObject:CY,validateBoolean:jY}=Pg,{Promise:MY,PromisePrototypeThen:FY}=pn,{isClosed:LY,isReadable:BP,isReadableNodeStream:gS,isReadableStream:BY,isReadableFinished:$P,isReadableErrored:UP,isWritable:qP,isWritableNodeStream:VP,isWritableStream:$Y,isWritableFinished:HP,isWritableErrored:kP,isNodeStream:UY,willEmitClose:qY,kIsClosedPromise:VY}=Ko;function HY(t){return t.setHeader&&typeof t.abort=="function"}const $E=()=>{};function E9(t,e,r){var n,a;if(arguments.length===2?(r=e,e=LE):e==null?e=LE:CY(e,"options"),NY(r,"callback"),DY(e.signal,"options.signal"),r=BE(r),BY(t)||$Y(t))return kY(t,e,r);if(!UY(t))throw new PY("stream",["ReadableStream","WritableStream","Stream"],t);const s=(n=e.readable)!==null&&n!==void 0?n:gS(t),o=(a=e.writable)!==null&&a!==void 0?a:VP(t),u=t._writableState,c=t._readableState,l=()=>{t.writable||h()};let d=qY(t)&&gS(t)===s&&VP(t)===o,f=HP(t,!1);const h=()=>{f=!0,t.destroyed&&(d=!1),!(d&&(!t.readable||s))&&(!s||p)&&r.call(t)};let p=$P(t,!1);const b=()=>{p=!0,t.destroyed&&(d=!1),!(d&&(!t.writable||o))&&(!o||f)&&r.call(t)},_=I=>{r.call(t,I)};let E=LY(t);const w=()=>{E=!0;const I=kP(t)||UP(t);if(I&&typeof I!="boolean")return r.call(t,I);if(s&&!p&&gS(t,!0)&&!$P(t,!1))return r.call(t,new LP);if(o&&!f&&!HP(t,!1))return r.call(t,new LP);r.call(t)},O=()=>{E=!0;const I=kP(t)||UP(t);if(I&&typeof I!="boolean")return r.call(t,I);r.call(t)},A=()=>{t.req.on("finish",h)};HY(t)?(t.on("complete",h),d||t.on("abort",w),t.req?A():t.on("request",A)):o&&!u&&(t.on("end",l),t.on("close",l)),!d&&typeof t.aborted=="boolean"&&t.on("aborted",w),t.on("end",b),t.on("finish",h),e.error!==!1&&t.on("error",_),t.on("close",w),E?Eu.nextTick(w):u!=null&&u.errorEmitted||c!=null&&c.errorEmitted?d||Eu.nextTick(O):(!s&&(!d||BP(t))&&(f||qP(t)===!1)||!o&&(!d||qP(t))&&(p||BP(t)===!1)||c&&t.req&&t.aborted)&&Eu.nextTick(O);const T=()=>{r=$E,t.removeListener("aborted",w),t.removeListener("complete",h),t.removeListener("abort",w),t.removeListener("request",A),t.req&&t.req.removeListener("finish",h),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",h),t.removeListener("end",b),t.removeListener("error",_),t.removeListener("close",w)};if(e.signal&&!E){const I=()=>{const D=r;T(),D.call(t,new T9(void 0,{cause:e.signal.reason}))};if(e.signal.aborted)Eu.nextTick(I);else{const D=r;r=BE((...U)=>{e.signal.removeEventListener("abort",I),D.apply(t,U)}),e.signal.addEventListener("abort",I)}}return T}function kY(t,e,r){let n=!1,a=$E;if(e.signal)if(a=()=>{n=!0,r.call(t,new T9(void 0,{cause:e.signal.reason}))},e.signal.aborted)Eu.nextTick(a);else{const o=r;r=BE((...u)=>{e.signal.removeEventListener("abort",a),o.apply(t,u)}),e.signal.addEventListener("abort",a)}const s=(...o)=>{n||Eu.nextTick(()=>r.apply(t,o))};return FY(t[VY].promise,s,s),$E}function QY(t,e){var r;let n=!1;return e===null&&(e=LE),(r=e)!==null&&r!==void 0&&r.cleanup&&(jY(e.cleanup,"cleanup"),n=e.cleanup),new MY((a,s)=>{const o=E9(t,e,u=>{n&&o(),u?s(u):a()})})}XA.exports=E9;XA.exports.finished=QY;var ec=XA.exports;const Ls=zo(),{aggregateTwoErrors:GY,codes:{ERR_MULTIPLE_CALLBACK:zY},AbortError:WY}=Vi,{Symbol:O9}=pn,{kDestroyed:XY,isDestroyed:KY,isFinished:JY,isServerRequest:YY}=Ko,A9=O9("kDestroy"),UE=O9("kConstruct");function R9(t,e,r){t&&(t.stack,e&&!e.errored&&(e.errored=t),r&&!r.errored&&(r.errored=t))}function ZY(t,e){const r=this._readableState,n=this._writableState,a=n||r;return n!=null&&n.destroyed||r!=null&&r.destroyed?(typeof e=="function"&&e(),this):(R9(t,n,r),n&&(n.destroyed=!0),r&&(r.destroyed=!0),a.constructed?QP(this,t,e):this.once(A9,function(s){QP(this,GY(s,t),e)}),this)}function QP(t,e,r){let n=!1;function a(s){if(n)return;n=!0;const o=t._readableState,u=t._writableState;R9(s,u,o),u&&(u.closed=!0),o&&(o.closed=!0),typeof r=="function"&&r(s),s?Ls.nextTick(eZ,t,s):Ls.nextTick(x9,t)}try{t._destroy(e||null,a)}catch(s){a(s)}}function eZ(t,e){qE(t,e),x9(t)}function x9(t){const e=t._readableState,r=t._writableState;r&&(r.closeEmitted=!0),e&&(e.closeEmitted=!0),(r!=null&&r.emitClose||e!=null&&e.emitClose)&&t.emit("close")}function qE(t,e){const r=t._readableState,n=t._writableState;n!=null&&n.errorEmitted||r!=null&&r.errorEmitted||(n&&(n.errorEmitted=!0),r&&(r.errorEmitted=!0),t.emit("error",e))}function tZ(){const t=this._readableState,e=this._writableState;t&&(t.constructed=!0,t.closed=!1,t.closeEmitted=!1,t.destroyed=!1,t.errored=null,t.errorEmitted=!1,t.reading=!1,t.ended=t.readable===!1,t.endEmitted=t.readable===!1),e&&(e.constructed=!0,e.destroyed=!1,e.closed=!1,e.closeEmitted=!1,e.errored=null,e.errorEmitted=!1,e.finalCalled=!1,e.prefinished=!1,e.ended=e.writable===!1,e.ending=e.writable===!1,e.finished=e.writable===!1)}function VE(t,e,r){const n=t._readableState,a=t._writableState;if(a!=null&&a.destroyed||n!=null&&n.destroyed)return this;n!=null&&n.autoDestroy||a!=null&&a.autoDestroy?t.destroy(e):e&&(e.stack,a&&!a.errored&&(a.errored=e),n&&!n.errored&&(n.errored=e),r?Ls.nextTick(qE,t,e):qE(t,e))}function rZ(t,e){if(typeof t._construct!="function")return;const r=t._readableState,n=t._writableState;r&&(r.constructed=!1),n&&(n.constructed=!1),t.once(UE,e),!(t.listenerCount(UE)>1)&&Ls.nextTick(nZ,t)}function nZ(t){let e=!1;function r(n){if(e){VE(t,n??new zY);return}e=!0;const a=t._readableState,s=t._writableState,o=s||a;a&&(a.constructed=!0),s&&(s.constructed=!0),o.destroyed?t.emit(A9,n):n?VE(t,n,!0):Ls.nextTick(iZ,t)}try{t._construct(n=>{Ls.nextTick(r,n)})}catch(n){Ls.nextTick(r,n)}}function iZ(t){t.emit(UE)}function GP(t){return(t==null?void 0:t.setHeader)&&typeof t.abort=="function"}function I9(t){t.emit("close")}function aZ(t,e){t.emit("error",e),Ls.nextTick(I9,t)}function sZ(t,e){!t||KY(t)||(!e&&!JY(t)&&(e=new WY),YY(t)?(t.socket=null,t.destroy(e)):GP(t)?t.abort():GP(t.req)?t.req.abort():typeof t.destroy=="function"?t.destroy(e):typeof t.close=="function"?t.close():e?Ls.nextTick(aZ,t,e):Ls.nextTick(I9,t),t.destroyed||(t[XY]=!0))}var xf={construct:rZ,destroyer:sZ,destroy:ZY,undestroy:tZ,errorOrDestroy:VE};const{ArrayIsArray:oZ,ObjectSetPrototypeOf:P9}=pn,{EventEmitter:Mg}=Sf;function Fg(t){Mg.call(this,t)}P9(Fg.prototype,Mg.prototype);P9(Fg,Mg);Fg.prototype.pipe=function(t,e){const r=this;function n(d){t.writable&&t.write(d)===!1&&r.pause&&r.pause()}r.on("data",n);function a(){r.readable&&r.resume&&r.resume()}t.on("drain",a),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",o),r.on("close",u));let s=!1;function o(){s||(s=!0,t.end())}function u(){s||(s=!0,typeof t.destroy=="function"&&t.destroy())}function c(d){l(),Mg.listenerCount(this,"error")===0&&this.emit("error",d)}HE(r,"error",c),HE(t,"error",c);function l(){r.removeListener("data",n),t.removeListener("drain",a),r.removeListener("end",o),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t};function HE(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):oZ(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}var KA={Stream:Fg,prependListener:HE},D9={exports:{}};(function(t){const{AbortError:e,codes:r}=Vi,{isNodeStream:n,isWebStream:a,kControllerErrorFunction:s}=Ko,o=ec,{ERR_INVALID_ARG_TYPE:u}=r,c=(l,d)=>{if(typeof l!="object"||!("aborted"in l))throw new u(d,"AbortSignal",l)};t.exports.addAbortSignal=function(d,f){if(c(d,"signal"),!n(f)&&!a(f))throw new u("stream",["ReadableStream","WritableStream","Stream"],f);return t.exports.addAbortSignalNoValidate(d,f)},t.exports.addAbortSignalNoValidate=function(l,d){if(typeof l!="object"||!("aborted"in l))return d;const f=n(d)?()=>{d.destroy(new e(void 0,{cause:l.reason}))}:()=>{d[s](new e(void 0,{cause:l.reason}))};return l.aborted?f():(l.addEventListener("abort",f),o(d,()=>l.removeEventListener("abort",f))),d}})(D9);var Lg=D9.exports;const{StringPrototypeSlice:zP,SymbolIterator:uZ,TypedArrayPrototypeSet:Uy,Uint8Array:cZ}=pn,{Buffer:mS}=la,{inspect:lZ}=Xo;var dZ=class{constructor(){this.head=null,this.tail=null,this.length=0}push(e){const r={data:e,next:null};this.length>0?this.tail.next=r:this.head=r,this.tail=r,++this.length}unshift(e){const r={data:e,next:this.head};this.length===0&&(this.tail=r),this.head=r,++this.length}shift(){if(this.length===0)return;const e=this.head.data;return this.length===1?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(this.length===0)return"";let r=this.head,n=""+r.data;for(;(r=r.next)!==null;)n+=e+r.data;return n}concat(e){if(this.length===0)return mS.alloc(0);const r=mS.allocUnsafe(e>>>0);let n=this.head,a=0;for(;n;)Uy(r,n.data,a),a+=n.data.length,n=n.next;return r}consume(e,r){const n=this.head.data;if(es.length)r+=s,e-=s.length;else{e===s.length?(r+=s,++a,n.next?this.head=n.next:this.head=this.tail=null):(r+=zP(s,0,e),this.head=n,n.data=zP(s,e));break}++a}while((n=n.next)!==null);return this.length-=a,r}_getBuffer(e){const r=mS.allocUnsafe(e),n=e;let a=this.head,s=0;do{const o=a.data;if(e>o.length)Uy(r,o,n-e),e-=o.length;else{e===o.length?(Uy(r,o,n-e),++s,a.next?this.head=a.next:this.head=this.tail=null):(Uy(r,new cZ(o.buffer,o.byteOffset,e),n-e),this.head=a,a.data=o.slice(e));break}++s}while((a=a.next)!==null);return this.length-=s,r}[Symbol.for("nodejs.util.inspect.custom")](e,r){return lZ(this,{...r,depth:0,customInspect:!1})}};const{MathFloor:fZ,NumberIsInteger:hZ}=pn,{ERR_INVALID_ARG_VALUE:pZ}=Vi.codes;function yZ(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function N9(t){return t?16:16*1024}function bZ(t,e,r,n){const a=yZ(e,n,r);if(a!=null){if(!hZ(a)||a<0){const s=n?`options.${r}`:"options.highWaterMark";throw new pZ(s,a)}return fZ(a)}return N9(t.objectMode)}var JA={getHighWaterMark:bZ,getDefaultHighWaterMark:N9},Ob={},kE={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh */(function(t,e){var r=la,n=r.Buffer;function a(o,u){for(var c in o)u[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=r:(a(r,e),e.Buffer=s);function s(o,u,c){return n(o,u,c)}s.prototype=Object.create(n.prototype),a(n,s),s.from=function(o,u,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,u,c)},s.alloc=function(o,u,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var l=n(o);return u!==void 0?typeof c=="string"?l.fill(u,c):l.fill(u):l.fill(0),l},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}})(kE,kE.exports);var _Z=kE.exports,YA=_Z.Buffer,WP=YA.isEncoding||function(t){switch(t=""+t,t&&t.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 gZ(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function mZ(t){var e=gZ(t);if(typeof e!="string"&&(YA.isEncoding===WP||!WP(t)))throw new Error("Unknown encoding: "+t);return e||t}Ob.StringDecoder=y0;function y0(t){this.encoding=mZ(t);var e;switch(this.encoding){case"utf16le":this.text=OZ,this.end=AZ,e=4;break;case"utf8":this.fillLast=SZ,e=4;break;case"base64":this.text=RZ,this.end=xZ,e=3;break;default:this.write=IZ,this.end=PZ;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=YA.allocUnsafe(e)}y0.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function vZ(t,e,r){var n=e.length-1;if(n=0?(a>0&&(t.lastNeed=a-1),a):--n=0?(a>0&&(t.lastNeed=a-2),a):--n=0?(a>0&&(a===2?a=0:t.lastNeed=a-3),a):0))}function wZ(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"�"}}function SZ(t){var e=this.lastTotal-this.lastNeed,r=wZ(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function TZ(t,e){var r=vZ(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)}function EZ(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function OZ(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function AZ(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function RZ(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function xZ(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function IZ(t){return t.toString(this.encoding)}function PZ(t){return t&&t.length?this.write(t):""}const XP=zo(),{PromisePrototypeThen:DZ,SymbolAsyncIterator:KP,SymbolIterator:JP}=pn,{Buffer:NZ}=la,{ERR_INVALID_ARG_TYPE:CZ,ERR_STREAM_NULL_VALUES:jZ}=Vi.codes;function MZ(t,e,r){let n;if(typeof e=="string"||e instanceof NZ)return new t({objectMode:!0,...r,read(){this.push(e),this.push(null)}});let a;if(e&&e[KP])a=!0,n=e[KP]();else if(e&&e[JP])a=!1,n=e[JP]();else throw new CZ("iterable",["Iterable"],e);const s=new t({objectMode:!0,highWaterMark:1,...r});let o=!1;s._read=function(){o||(o=!0,c())},s._destroy=function(l,d){DZ(u(l),()=>XP.nextTick(d,l),f=>XP.nextTick(d,f||l))};async function u(l){const d=l!=null,f=typeof n.throw=="function";if(d&&f){const{value:h,done:p}=await n.throw(l);if(await h,p)return}if(typeof n.return=="function"){const{value:h}=await n.return();await h}}async function c(){for(;;){try{const{value:l,done:d}=a?await n.next():n.next();if(d)s.push(null);else{const f=l&&typeof l.then=="function"?await l:l;if(f===null)throw o=!1,new jZ;if(s.push(f))continue;o=!1}}catch(l){s.destroy(l)}break}}return s}var C9=MZ,wS,YP;function Bg(){if(YP)return wS;YP=1;const t=zo(),{ArrayPrototypeIndexOf:e,NumberIsInteger:r,NumberIsNaN:n,NumberParseInt:a,ObjectDefineProperties:s,ObjectKeys:o,ObjectSetPrototypeOf:u,Promise:c,SafeSet:l,SymbolAsyncIterator:d,Symbol:f}=pn;wS=he,he.ReadableState=be;const{EventEmitter:h}=Sf,{Stream:p,prependListener:b}=KA,{Buffer:_}=la,{addAbortSignal:E}=Lg,w=ec;let O=Xo.debuglog("stream",k=>{O=k});const A=dZ,T=xf,{getHighWaterMark:I,getDefaultHighWaterMark:D}=JA,{aggregateTwoErrors:U,codes:{ERR_INVALID_ARG_TYPE:H,ERR_METHOD_NOT_IMPLEMENTED:N,ERR_OUT_OF_RANGE:x,ERR_STREAM_PUSH_AFTER_EOF:F,ERR_STREAM_UNSHIFT_AFTER_END_EVENT:X}}=Vi,{validateObject:ne}=Pg,$=f("kPaused"),{StringDecoder:j}=Ob,Q=C9;u(he.prototype,p.prototype),u(he,p);const se=()=>{},{errorOrDestroy:ie}=T;function be(k,W,M){typeof M!="boolean"&&(M=W instanceof Uo()),this.objectMode=!!(k&&k.objectMode),M&&(this.objectMode=this.objectMode||!!(k&&k.readableObjectMode)),this.highWaterMark=k?I(this,k,"readableHighWaterMark",M):D(!1),this.buffer=new A,this.length=0,this.pipes=[],this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.constructed=!0,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this[$]=null,this.errorEmitted=!1,this.emitClose=!k||k.emitClose!==!1,this.autoDestroy=!k||k.autoDestroy!==!1,this.destroyed=!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this.defaultEncoding=k&&k.defaultEncoding||"utf8",this.awaitDrainWriters=null,this.multiAwaitDrain=!1,this.readingMore=!1,this.dataEmitted=!1,this.decoder=null,this.encoding=null,k&&k.encoding&&(this.decoder=new j(k.encoding),this.encoding=k.encoding)}function he(k){if(!(this instanceof he))return new he(k);const W=this instanceof Uo();this._readableState=new be(k,this,W),k&&(typeof k.read=="function"&&(this._read=k.read),typeof k.destroy=="function"&&(this._destroy=k.destroy),typeof k.construct=="function"&&(this._construct=k.construct),k.signal&&!W&&E(k.signal,this)),p.call(this,k),T.construct(this,()=>{this._readableState.needReadable&&pe(this,this._readableState)})}he.prototype.destroy=T.destroy,he.prototype._undestroy=T.undestroy,he.prototype._destroy=function(k,W){W(k)},he.prototype[h.captureRejectionSymbol]=function(k){this.destroy(k)},he.prototype.push=function(k,W){return Te(this,k,W,!1)},he.prototype.unshift=function(k,W){return Te(this,k,W,!0)};function Te(k,W,M,S){O("readableAddChunk",W);const R=k._readableState;let z;if(R.objectMode||(typeof W=="string"?(M=M||R.defaultEncoding,R.encoding!==M&&(S&&R.encoding?W=_.from(W,M).toString(R.encoding):(W=_.from(W,M),M=""))):W instanceof _?M="":p._isUint8Array(W)?(W=p._uint8ArrayToBuffer(W),M=""):W!=null&&(z=new H("chunk",["string","Buffer","Uint8Array"],W))),z)ie(k,z);else if(W===null)R.reading=!1,oe(k,R);else if(R.objectMode||W&&W.length>0)if(S)if(R.endEmitted)ie(k,new X);else{if(R.destroyed||R.errored)return!1;Ne(k,R,W,!0)}else if(R.ended)ie(k,new F);else{if(R.destroyed||R.errored)return!1;R.reading=!1,R.decoder&&!M?(W=R.decoder.write(W),R.objectMode||W.length!==0?Ne(k,R,W,!1):pe(k,R)):Ne(k,R,W,!1)}else S||(R.reading=!1,pe(k,R));return!R.ended&&(R.length0?(W.multiAwaitDrain?W.awaitDrainWriters.clear():W.awaitDrainWriters=null,W.dataEmitted=!0,k.emit("data",M)):(W.length+=W.objectMode?1:M.length,S?W.buffer.unshift(M):W.buffer.push(M),W.needReadable&&J(k)),pe(k,W)}he.prototype.isPaused=function(){const k=this._readableState;return k[$]===!0||k.flowing===!1},he.prototype.setEncoding=function(k){const W=new j(k);this._readableState.decoder=W,this._readableState.encoding=this._readableState.decoder.encoding;const M=this._readableState.buffer;let S="";for(const R of M)S+=W.write(R);return M.clear(),S!==""&&M.push(S),this._readableState.length=S.length,this};const ye=1073741824;function ce(k){if(k>ye)throw new x("size","<= 1GiB",k);return k--,k|=k>>>1,k|=k>>>2,k|=k>>>4,k|=k>>>8,k|=k>>>16,k++,k}function Re(k,W){return k<=0||W.length===0&&W.ended?0:W.objectMode?1:n(k)?W.flowing&&W.length?W.buffer.first().length:W.length:k<=W.length?k:W.ended?W.length:0}he.prototype.read=function(k){O("read",k),k===void 0?k=NaN:r(k)||(k=a(k,10));const W=this._readableState,M=k;if(k>W.highWaterMark&&(W.highWaterMark=ce(k)),k!==0&&(W.emittedReadable=!1),k===0&&W.needReadable&&((W.highWaterMark!==0?W.length>=W.highWaterMark:W.length>0)||W.ended))return O("read: emitReadable",W.length,W.ended),W.length===0&&W.ended?ee(this):J(this),null;if(k=Re(k,W),k===0&&W.ended)return W.length===0&&ee(this),null;let S=W.needReadable;if(O("need readable",S),(W.length===0||W.length-k0?R=Y(k,W):R=null,R===null?(W.needReadable=W.length<=W.highWaterMark,k=0):(W.length-=k,W.multiAwaitDrain?W.awaitDrainWriters.clear():W.awaitDrainWriters=null),W.length===0&&(W.ended||(W.needReadable=!0),M!==k&&W.ended&&ee(this)),R!==null&&!W.errorEmitted&&!W.closeEmitted&&(W.dataEmitted=!0,this.emit("data",R)),R};function oe(k,W){if(O("onEofChunk"),!W.ended){if(W.decoder){const M=W.decoder.end();M&&M.length&&(W.buffer.push(M),W.length+=W.objectMode?1:M.length)}W.ended=!0,W.sync?J(k):(W.needReadable=!1,W.emittedReadable=!0,le(k))}}function J(k){const W=k._readableState;O("emitReadable",W.needReadable,W.emittedReadable),W.needReadable=!1,W.emittedReadable||(O("emitReadable",W.flowing),W.emittedReadable=!0,t.nextTick(le,k))}function le(k){const W=k._readableState;O("emitReadable_",W.destroyed,W.length,W.ended),!W.destroyed&&!W.errored&&(W.length||W.ended)&&(k.emit("readable"),W.emittedReadable=!1),W.needReadable=!W.flowing&&!W.ended&&W.length<=W.highWaterMark,V(k)}function pe(k,W){!W.readingMore&&W.constructed&&(W.readingMore=!0,t.nextTick(L,k,W))}function L(k,W){for(;!W.reading&&!W.ended&&(W.length1&&S.pipes.includes(k)&&(O("false write response, pause",S.awaitDrainWriters.size),S.awaitDrainWriters.add(k)),M.pause()),we||(we=P(M,k),k.on("drain",we))}M.on("data",We);function We(Qt){O("ondata");const _r=k.write(Qt);O("dest.write",_r),_r===!1&&Ge()}function lt(Qt){if(O("onerror",Qt),Br(),k.removeListener("error",lt),k.listenerCount("error")===0){const _r=k._writableState||k._readableState;_r&&!_r.errorEmitted?ie(k,Qt):k.emit("error",Qt)}}b(k,"error",lt);function Wr(){k.removeListener("finish",br),Br()}k.once("close",Wr);function br(){O("onfinish"),k.removeListener("close",Wr),Br()}k.once("finish",br);function Br(){O("unpipe"),M.unpipe(k)}return k.emit("pipe",M),k.writableNeedDrain===!0?S.flowing&&Ge():S.flowing||(O("pipe resume"),M.resume()),k};function P(k,W){return function(){const S=k._readableState;S.awaitDrainWriters===W?(O("pipeOnDrain",1),S.awaitDrainWriters=null):S.multiAwaitDrain&&(O("pipeOnDrain",S.awaitDrainWriters.size),S.awaitDrainWriters.delete(W)),(!S.awaitDrainWriters||S.awaitDrainWriters.size===0)&&k.listenerCount("data")&&k.resume()}}he.prototype.unpipe=function(k){const W=this._readableState,M={hasUnpiped:!1};if(W.pipes.length===0)return this;if(!k){const R=W.pipes;W.pipes=[],this.pause();for(let z=0;z0,S.flowing!==!1&&this.resume()):k==="readable"&&!S.endEmitted&&!S.readableListening&&(S.readableListening=S.needReadable=!0,S.flowing=!1,S.emittedReadable=!1,O("on readable",S.length,S.reading),S.length?J(this):S.reading||t.nextTick(y,this)),M},he.prototype.addListener=he.prototype.on,he.prototype.removeListener=function(k,W){const M=p.prototype.removeListener.call(this,k,W);return k==="readable"&&t.nextTick(g,this),M},he.prototype.off=he.prototype.removeListener,he.prototype.removeAllListeners=function(k){const W=p.prototype.removeAllListeners.apply(this,arguments);return(k==="readable"||k===void 0)&&t.nextTick(g,this),W};function g(k){const W=k._readableState;W.readableListening=k.listenerCount("readable")>0,W.resumeScheduled&&W[$]===!1?W.flowing=!0:k.listenerCount("data")>0?k.resume():W.readableListening||(W.flowing=null)}function y(k){O("readable nexttick read 0"),k.read(0)}he.prototype.resume=function(){const k=this._readableState;return k.flowing||(O("resume"),k.flowing=!k.readableListening,v(this,k)),k[$]=!1,this};function v(k,W){W.resumeScheduled||(W.resumeScheduled=!0,t.nextTick(C,k,W))}function C(k,W){O("resume",W.reading),W.reading||k.read(0),W.resumeScheduled=!1,k.emit("resume"),V(k),W.flowing&&!W.reading&&k.read(0)}he.prototype.pause=function(){return O("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(O("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState[$]=!0,this};function V(k){const W=k._readableState;for(O("flow",W.flowing);W.flowing&&k.read()!==null;);}he.prototype.wrap=function(k){let W=!1;k.on("data",S=>{!this.push(S)&&k.pause&&(W=!0,k.pause())}),k.on("end",()=>{this.push(null)}),k.on("error",S=>{ie(this,S)}),k.on("close",()=>{this.destroy()}),k.on("destroy",()=>{this.destroy()}),this._read=()=>{W&&k.resume&&(W=!1,k.resume())};const M=o(k);for(let S=1;S{R=ue?U(R,ue):null,M(),M=se});try{for(;;){const ue=k.destroyed?null:k.read();if(ue!==null)yield ue;else{if(R)throw R;if(R===null)return;await new c(S)}}}catch(ue){throw R=U(R,ue),R}finally{(R||(W==null?void 0:W.destroyOnReturn)!==!1)&&(R===void 0||k._readableState.autoDestroy)?T.destroyer(k,null):(k.off("readable",S),z())}}s(he.prototype,{readable:{__proto__:null,get(){const k=this._readableState;return!!k&&k.readable!==!1&&!k.destroyed&&!k.errorEmitted&&!k.endEmitted},set(k){this._readableState&&(this._readableState.readable=!!k)}},readableDidRead:{__proto__:null,enumerable:!1,get:function(){return this._readableState.dataEmitted}},readableAborted:{__proto__:null,enumerable:!1,get:function(){return!!(this._readableState.readable!==!1&&(this._readableState.destroyed||this._readableState.errored)&&!this._readableState.endEmitted)}},readableHighWaterMark:{__proto__:null,enumerable:!1,get:function(){return this._readableState.highWaterMark}},readableBuffer:{__proto__:null,enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}},readableFlowing:{__proto__:null,enumerable:!1,get:function(){return this._readableState.flowing},set:function(k){this._readableState&&(this._readableState.flowing=k)}},readableLength:{__proto__:null,enumerable:!1,get(){return this._readableState.length}},readableObjectMode:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.objectMode:!1}},readableEncoding:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.encoding:null}},errored:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.errored:null}},closed:{__proto__:null,get(){return this._readableState?this._readableState.closed:!1}},destroyed:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.destroyed:!1},set(k){this._readableState&&(this._readableState.destroyed=k)}},readableEnded:{__proto__:null,enumerable:!1,get(){return this._readableState?this._readableState.endEmitted:!1}}}),s(be.prototype,{pipesCount:{__proto__:null,get(){return this.pipes.length}},paused:{__proto__:null,get(){return this[$]!==!1},set(k){this[$]=!!k}}}),he._fromList=Y;function Y(k,W){if(W.length===0)return null;let M;return W.objectMode?M=W.buffer.shift():!k||k>=W.length?(W.decoder?M=W.buffer.join(""):W.buffer.length===1?M=W.buffer.first():M=W.buffer.concat(W.length),W.buffer.clear()):M=W.buffer.consume(k,W.decoder),M}function ee(k){const W=k._readableState;O("endReadable",W.endEmitted),W.endEmitted||(W.ended=!0,t.nextTick(ae,W,k))}function ae(k,W){if(O("endReadableNT",k.endEmitted,k.length),!k.errored&&!k.closeEmitted&&!k.endEmitted&&k.length===0){if(k.endEmitted=!0,W.emit("end"),W.writable&&W.allowHalfOpen===!1)t.nextTick(ve,W);else if(k.autoDestroy){const M=W._writableState;(!M||M.autoDestroy&&(M.finished||M.writable===!1))&&W.destroy()}}}function ve(k){k.writable&&!k.writableEnded&&!k.destroyed&&k.end()}he.from=function(k,W){return Q(he,k,W)};let me;function Ee(){return me===void 0&&(me={}),me}return he.fromWeb=function(k,W){return Ee().newStreamReadableFromReadableStream(k,W)},he.toWeb=function(k,W){return Ee().newReadableStreamFromStreamReadable(k,W)},he.wrap=function(k,W){var M,S;return new he({objectMode:(M=(S=k.readableObjectMode)!==null&&S!==void 0?S:k.objectMode)!==null&&M!==void 0?M:!0,...W,destroy(R,z){T.destroyer(k,R),z(R)}}).wrap(k)},wS}var SS,ZP;function j9(){if(ZP)return SS;ZP=1;const t=zo(),{ArrayPrototypeSlice:e,Error:r,FunctionPrototypeSymbolHasInstance:n,ObjectDefineProperty:a,ObjectDefineProperties:s,ObjectSetPrototypeOf:o,StringPrototypeToLowerCase:u,Symbol:c,SymbolHasInstance:l}=pn;SS=j,j.WritableState=ne;const{EventEmitter:d}=Sf,f=KA.Stream,{Buffer:h}=la,p=xf,{addAbortSignal:b}=Lg,{getHighWaterMark:_,getDefaultHighWaterMark:E}=JA,{ERR_INVALID_ARG_TYPE:w,ERR_METHOD_NOT_IMPLEMENTED:O,ERR_MULTIPLE_CALLBACK:A,ERR_STREAM_CANNOT_PIPE:T,ERR_STREAM_DESTROYED:I,ERR_STREAM_ALREADY_FINISHED:D,ERR_STREAM_NULL_VALUES:U,ERR_STREAM_WRITE_AFTER_END:H,ERR_UNKNOWN_ENCODING:N}=Vi.codes,{errorOrDestroy:x}=p;o(j.prototype,f.prototype),o(j,f);function F(){}const X=c("kOnFinished");function ne(y,v,C){typeof C!="boolean"&&(C=v instanceof Uo()),this.objectMode=!!(y&&y.objectMode),C&&(this.objectMode=this.objectMode||!!(y&&y.writableObjectMode)),this.highWaterMark=y?_(this,y,"writableHighWaterMark",C):E(!1),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;const V=!!(y&&y.decodeStrings===!1);this.decodeStrings=!V,this.defaultEncoding=y&&y.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=he.bind(void 0,v),this.writecb=null,this.writelen=0,this.afterWriteTickInfo=null,$(this),this.pendingcb=0,this.constructed=!0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!y||y.emitClose!==!1,this.autoDestroy=!y||y.autoDestroy!==!1,this.errored=null,this.closed=!1,this.closeEmitted=!1,this[X]=[]}function $(y){y.buffered=[],y.bufferedIndex=0,y.allBuffers=!0,y.allNoop=!0}ne.prototype.getBuffer=function(){return e(this.buffered,this.bufferedIndex)},a(ne.prototype,"bufferedRequestCount",{__proto__:null,get(){return this.buffered.length-this.bufferedIndex}});function j(y){const v=this instanceof Uo();if(!v&&!n(j,this))return new j(y);this._writableState=new ne(y,this,v),y&&(typeof y.write=="function"&&(this._write=y.write),typeof y.writev=="function"&&(this._writev=y.writev),typeof y.destroy=="function"&&(this._destroy=y.destroy),typeof y.final=="function"&&(this._final=y.final),typeof y.construct=="function"&&(this._construct=y.construct),y.signal&&b(y.signal,this)),f.call(this,y),p.construct(this,()=>{const C=this._writableState;C.writing||ce(this,C),le(this,C)})}a(j,l,{__proto__:null,value:function(y){return n(this,y)?!0:this!==j?!1:y&&y._writableState instanceof ne}}),j.prototype.pipe=function(){x(this,new T)};function Q(y,v,C,V){const q=y._writableState;if(typeof C=="function")V=C,C=q.defaultEncoding;else{if(!C)C=q.defaultEncoding;else if(C!=="buffer"&&!h.isEncoding(C))throw new N(C);typeof V!="function"&&(V=F)}if(v===null)throw new U;if(!q.objectMode)if(typeof v=="string")q.decodeStrings!==!1&&(v=h.from(v,C),C="buffer");else if(v instanceof h)C="buffer";else if(f._isUint8Array(v))v=f._uint8ArrayToBuffer(v),C="buffer";else throw new w("chunk",["string","Buffer","Uint8Array"],v);let G;return q.ending?G=new H:q.destroyed&&(G=new I("write")),G?(t.nextTick(V,G),x(y,G,!0),G):(q.pendingcb++,se(y,q,v,C,V))}j.prototype.write=function(y,v,C){return Q(this,y,v,C)===!0},j.prototype.cork=function(){this._writableState.corked++},j.prototype.uncork=function(){const y=this._writableState;y.corked&&(y.corked--,y.writing||ce(this,y))},j.prototype.setDefaultEncoding=function(v){if(typeof v=="string"&&(v=u(v)),!h.isEncoding(v))throw new N(v);return this._writableState.defaultEncoding=v,this};function se(y,v,C,V,q){const G=v.objectMode?1:C.length;v.length+=G;const Y=v.lengthC.bufferedIndex&&ce(y,C),V?C.afterWriteTickInfo!==null&&C.afterWriteTickInfo.cb===q?C.afterWriteTickInfo.count++:(C.afterWriteTickInfo={count:1,cb:q,stream:y,state:C},t.nextTick(Te,C.afterWriteTickInfo)):Ne(y,C,1,q))}function Te({stream:y,state:v,count:C,cb:V}){return v.afterWriteTickInfo=null,Ne(y,v,C,V)}function Ne(y,v,C,V){for(!v.ending&&!y.destroyed&&v.length===0&&v.needDrain&&(v.needDrain=!1,y.emit("drain"));C-- >0;)v.pendingcb--,V();v.destroyed&&ye(v),le(y,v)}function ye(y){if(y.writing)return;for(let q=y.bufferedIndex;q1&&y._writev){v.pendingcb-=G-1;const ee=v.allNoop?F:ve=>{for(let me=Y;me256?(C.splice(0,Y),v.bufferedIndex=0):v.bufferedIndex=Y}v.bufferProcessing=!1}j.prototype._write=function(y,v,C){if(this._writev)this._writev([{chunk:y,encoding:v}],C);else throw new O("_write()")},j.prototype._writev=null,j.prototype.end=function(y,v,C){const V=this._writableState;typeof y=="function"?(C=y,y=null,v=null):typeof v=="function"&&(C=v,v=null);let q;if(y!=null){const G=Q(this,y,v);G instanceof r&&(q=G)}return V.corked&&(V.corked=1,this.uncork()),q||(!V.errored&&!V.ending?(V.ending=!0,le(this,V,!0),V.ended=!0):V.finished?q=new D("end"):V.destroyed&&(q=new I("end"))),typeof C=="function"&&(q||V.finished?t.nextTick(C,q):V[X].push(C)),this};function Re(y){return y.ending&&!y.destroyed&&y.constructed&&y.length===0&&!y.errored&&y.buffered.length===0&&!y.finished&&!y.writing&&!y.errorEmitted&&!y.closeEmitted}function oe(y,v){let C=!1;function V(q){if(C){x(y,q??A());return}if(C=!0,v.pendingcb--,q){const G=v[X].splice(0);for(let Y=0;Y{Re(q)?pe(V,q):q.pendingcb--},y,v)):Re(v)&&(v.pendingcb++,pe(y,v))))}function pe(y,v){v.pendingcb--,v.finished=!0;const C=v[X].splice(0);for(let V=0;V{if(he!=null)throw new h("nully","body",he)},he=>{p(ie,he)});return ie=new D({objectMode:!0,readable:!1,write:$,final(he){j(async()=>{try{await be,t.nextTick(he,null)}catch(Te){t.nextTick(he,Te)}})},destroy:Q})}throw new h("Iterable, AsyncIterable or AsyncFunction",F,ne)}if(A(x))return N(x.arrayBuffer());if(a(x))return w(D,x,{objectMode:!0,writable:!1});if(typeof(x==null?void 0:x.writable)=="object"||typeof(x==null?void 0:x.readable)=="object"){const ne=x!=null&&x.readable?o(x==null?void 0:x.readable)?x==null?void 0:x.readable:N(x.readable):void 0,$=x!=null&&x.writable?u(x==null?void 0:x.writable)?x==null?void 0:x.writable:N(x.writable):void 0;return H({readable:ne,writable:$})}const X=x==null?void 0:x.then;if(typeof X=="function"){let ne;return I(X,x,$=>{$!=null&&ne.push($),ne.push(null)},$=>{p(ne,$)}),ne=new D({objectMode:!0,writable:!1,read(){}})}throw new f(F,["Blob","ReadableStream","WritableStream","Stream","Iterable","AsyncIterable","Function","{ readable, writable } pair","Promise"],x)};function U(N){let{promise:x,resolve:F}=E();const X=new T,ne=X.signal;return{value:N(async function*(){for(;;){const j=x;x=null;const{chunk:Q,done:se,cb:ie}=await j;if(t.nextTick(ie),se)return;if(ne.aborted)throw new d(void 0,{cause:ne.reason});({promise:x,resolve:F}=E()),yield Q}}(),{signal:ne}),write(j,Q,se){const ie=F;F=null,ie({chunk:j,done:!1,cb:se})},final(j){const Q=F;F=null,Q({done:!0,cb:j})},destroy(j,Q){X.abort(),Q(j)}}}function H(N){const x=N.readable&&typeof N.readable.read!="function"?_.wrap(N.readable):N.readable,F=N.writable;let X=!!r(x),ne=!!n(F),$,j,Q,se,ie;function be(he){const Te=se;se=null,Te?Te(he):he&&ie.destroy(he)}return ie=new D({readableObjectMode:!!(x!=null&&x.readableObjectMode),writableObjectMode:!!(F!=null&&F.writableObjectMode),readable:X,writable:ne}),ne&&(l(F,he=>{ne=!1,he&&p(x,he),be(he)}),ie._write=function(he,Te,Ne){F.write(he,Te)?Ne():$=Ne},ie._final=function(he){F.end(),j=he},F.on("drain",function(){if($){const he=$;$=null,he()}}),F.on("finish",function(){if(j){const he=j;j=null,he()}})),X&&(l(x,he=>{X=!1,he&&p(x,he),be(he)}),x.on("readable",function(){if(Q){const he=Q;Q=null,he()}}),x.on("end",function(){ie.push(null)}),ie._read=function(){for(;;){const he=x.read();if(he===null){Q=ie._read;return}if(!ie.push(he))return}}),ie._destroy=function(he,Te){!he&&se!==null&&(he=new d),Q=null,$=null,j=null,se===null?Te(he):(se=Te,p(F,he),p(x,he))},ie}return TS}var ES,tD;function Uo(){if(tD)return ES;tD=1;const{ObjectDefineProperties:t,ObjectGetOwnPropertyDescriptor:e,ObjectKeys:r,ObjectSetPrototypeOf:n}=pn;ES=o;const a=Bg(),s=j9();n(o.prototype,a.prototype),n(o,a);{const d=r(s.prototype);for(let f=0;f{if(e){t?t(e):this.destroy(e);return}r!=null&&this.push(r),this.push(null),t&&t()}):(this.push(null),t&&t())}function UZ(){this._final!==QE&&QE.call(this)}qo.prototype._final=QE;qo.prototype._transform=function(t,e,r){throw new BZ("_transform()")};qo.prototype._write=function(t,e,r){const n=this._readableState,a=this._writableState,s=n.length;this._transform(t,e,(o,u)=>{if(o){r(o);return}u!=null&&this.push(u),a.ended||s===n.length||n.length{n=!0});const a=Ab(t,{readable:e,writable:r},s=>{n=!s});return{destroy:s=>{n||(n=!0,QZ.destroyer(t,s||new WZ("pipe")))},cleanup:a}}function ree(t){return JZ(t[t.length-1],"streams[stream.length - 1]"),t.pop()}function PS(t){if(Pc(t))return t;if(W1(t))return nee(t);throw new GE("val",["Readable","Iterable","AsyncIterable"],t)}async function*nee(t){IS||(IS=Bg()),yield*IS.prototype[HZ].call(t)}async function qy(t,e,r,{end:n}){let a,s=null;const o=l=>{if(l&&(a=l),s){const d=s;s=null,d()}},u=()=>new VZ((l,d)=>{a?d(a):s=()=>{a?d(a):l()}});e.on("drain",o);const c=Ab(e,{readable:!1},o);try{e.writableNeedDrain&&await u();for await(const l of t)e.write(l)||await u();n&&e.end(),await u(),r()}catch(l){r(a!==l?GZ(a,l):l)}finally{c(),e.off("drain",o)}}async function DS(t,e,r,{end:n}){rd(e)&&(e=e.writable);const a=e.getWriter();try{for await(const s of t)await a.ready,a.write(s).catch(()=>{});await a.ready,n&&await a.close(),r()}catch(s){try{await a.abort(s),r(s)}catch(o){r(o)}}}function iee(...t){return $9(t,kZ(ree(t)))}function $9(t,e,r){if(t.length===1&&qZ(t[0])&&(t=t[0]),t.length<2)throw new zZ("streams");const n=new tee,a=n.signal,s=r==null?void 0:r.signal,o=[];YZ(s,"options.signal");function u(){p(new KZ)}s==null||s.addEventListener("abort",u);let c,l;const d=[];let f=0;function h(O){p(O,--f===0)}function p(O,A){if(O&&(!c||c.code==="ERR_STREAM_PREMATURE_CLOSE")&&(c=O),!(!c&&!A)){for(;d.length;)d.shift()(c);s==null||s.removeEventListener("abort",u),n.abort(),A&&(c||o.forEach(T=>T()),Uh.nextTick(e,c,l))}}let b;for(let O=0;O0,D=T||(r==null?void 0:r.end)!==!1,U=O===t.length-1;if(nD(A)){let H=function(N){N&&N.name!=="AbortError"&&N.code!=="ERR_STREAM_PREMATURE_CLOSE"&&h(N)};var w=H;if(D){const{destroy:N,cleanup:x}=iD(A,T,I);d.push(N),AS(A)&&U&&o.push(x)}A.on("error",H),AS(A)&&U&&o.push(()=>{A.removeListener("error",H)})}if(O===0)if(typeof A=="function"){if(b=A({signal:a}),!Pc(b))throw new OS("Iterable, AsyncIterable or Stream","source",b)}else Pc(A)||W1(A)||rd(A)?b=A:b=rD.from(A);else if(typeof A=="function"){if(rd(b)){var _;b=PS((_=b)===null||_===void 0?void 0:_.readable)}else b=PS(b);if(b=A(b,{signal:a}),T){if(!Pc(b,!0))throw new OS("AsyncIterable",`transform[${O-1}]`,b)}else{var E;xS||(xS=B9);const H=new xS({objectMode:!0}),N=(E=b)===null||E===void 0?void 0:E.then;if(typeof N=="function")f++,N.call(b,X=>{l=X,X!=null&&H.write(X),D&&H.end(),Uh.nextTick(h)},X=>{H.destroy(X),Uh.nextTick(h,X)});else if(Pc(b,!0))f++,qy(b,H,h,{end:D});else if(RS(b)||rd(b)){const X=b.readable||b;f++,qy(X,H,h,{end:D})}else throw new OS("AsyncIterable or Promise","destination",b);b=H;const{destroy:x,cleanup:F}=iD(b,!1,!0);d.push(x),U&&o.push(F)}}else if(nD(A)){if(W1(b)){f+=2;const H=aee(b,A,h,{end:D});AS(A)&&U&&o.push(H)}else if(rd(b)||RS(b)){const H=b.readable||b;f++,qy(H,A,h,{end:D})}else if(Pc(b))f++,qy(b,A,h,{end:D});else throw new GE("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],b);b=A}else if(ZZ(A)){if(W1(b))f++,DS(PS(b),A,h,{end:D});else if(RS(b)||Pc(b))f++,DS(b,A,h,{end:D});else if(rd(b))f++,DS(b.readable,A,h,{end:D});else throw new GE("val",["Readable","Iterable","AsyncIterable","ReadableStream","TransformStream"],b);b=A}else b=rD.from(A)}return(a!=null&&a.aborted||s!=null&&s.aborted)&&Uh.nextTick(u),b}function aee(t,e,r,{end:n}){let a=!1;if(e.on("close",()=>{a||r(new XZ)}),t.pipe(e,{end:!1}),n){let o=function(){a=!0,e.end()};var s=o;eee(t)?Uh.nextTick(o):t.once("end",o)}else r();return Ab(t,{readable:!0,writable:!1},o=>{const u=t._readableState;o&&o.code==="ERR_STREAM_PREMATURE_CLOSE"&&u&&u.ended&&!u.errored&&!u.errorEmitted?t.once("end",r).once("error",r):r(o)}),Ab(e,{readable:!1,writable:!0},r)}var tR={pipelineImpl:$9,pipeline:iee};const{pipeline:see}=tR,Vy=Uo(),{destroyer:oee}=xf,{isNodeStream:Hy,isReadable:aD,isWritable:sD,isWebStream:NS,isTransformStream:gc,isWritableStream:oD,isReadableStream:uD}=Ko,{AbortError:uee,codes:{ERR_INVALID_ARG_VALUE:cD,ERR_MISSING_ARGS:cee}}=Vi,lee=ec;var U9=function(...e){if(e.length===0)throw new cee("streams");if(e.length===1)return Vy.from(e[0]);const r=[...e];if(typeof e[0]=="function"&&(e[0]=Vy.from(e[0])),typeof e[e.length-1]=="function"){const p=e.length-1;e[p]=Vy.from(e[p])}for(let p=0;p0&&!(sD(e[p])||oD(e[p])||gc(e[p])))throw new cD(`streams[${p}]`,r[p],"must be writable")}let n,a,s,o,u;function c(p){const b=o;o=null,b?b(p):p?u.destroy(p):!h&&!f&&u.destroy()}const l=e[0],d=see(e,c),f=!!(sD(l)||oD(l)||gc(l)),h=!!(aD(d)||uD(d)||gc(d));if(u=new Vy({writableObjectMode:!!(l!=null&&l.writableObjectMode),readableObjectMode:!!(d!=null&&d.writableObjectMode),writable:f,readable:h}),f){if(Hy(l))u._write=function(b,_,E){l.write(b,_)?E():n=E},u._final=function(b){l.end(),a=b},l.on("drain",function(){if(n){const b=n;n=null,b()}});else if(NS(l)){const _=(gc(l)?l.writable:l).getWriter();u._write=async function(E,w,O){try{await _.ready,_.write(E).catch(()=>{}),O()}catch(A){O(A)}},u._final=async function(E){try{await _.ready,_.close().catch(()=>{}),a=E}catch(w){E(w)}}}const p=gc(d)?d.readable:d;lee(p,()=>{if(a){const b=a;a=null,b()}})}if(h){if(Hy(d))d.on("readable",function(){if(s){const p=s;s=null,p()}}),d.on("end",function(){u.push(null)}),u._read=function(){for(;;){const p=d.read();if(p===null){s=u._read;return}if(!u.push(p))return}};else if(NS(d)){const b=(gc(d)?d.readable:d).getReader();u._read=async function(){for(;;)try{const{value:_,done:E}=await b.read();if(!u.push(_))return;if(E){u.push(null);return}}catch{return}}}}return u._destroy=function(p,b){!p&&o!==null&&(p=new uee),s=null,n=null,a=null,o===null?b(p):(o=b,Hy(d)&&oee(d,p))},u};const q9=globalThis.AbortController||xg.AbortController,{codes:{ERR_INVALID_ARG_VALUE:dee,ERR_INVALID_ARG_TYPE:b0,ERR_MISSING_ARGS:fee,ERR_OUT_OF_RANGE:hee},AbortError:zs}=Vi,{validateAbortSignal:_l,validateInteger:pee,validateObject:gl}=Pg,yee=pn.Symbol("kWeak"),{finished:bee}=ec,_ee=U9,{addAbortSignalNoValidate:gee}=Lg,{isWritable:mee,isNodeStream:vee}=Ko,{ArrayPrototypePush:wee,MathFloor:See,Number:Tee,NumberIsNaN:Eee,Promise:lD,PromiseReject:dD,PromisePrototypeThen:Oee,Symbol:V9}=pn,Rb=V9("kEmpty"),fD=V9("kEof");function Aee(t,e){if(e!=null&&gl(e,"options"),(e==null?void 0:e.signal)!=null&&_l(e.signal,"options.signal"),vee(t)&&!mee(t))throw new dee("stream",t,"must be writable");const r=_ee(this,t);return e!=null&&e.signal&&gee(e.signal,r),r}function $g(t,e){if(typeof t!="function")throw new b0("fn",["Function","AsyncFunction"],t);e!=null&&gl(e,"options"),(e==null?void 0:e.signal)!=null&&_l(e.signal,"options.signal");let r=1;return(e==null?void 0:e.concurrency)!=null&&(r=See(e.concurrency)),pee(r,"concurrency",1),(async function*(){var a,s;const o=new q9,u=this,c=[],l=o.signal,d={signal:l},f=()=>o.abort();e!=null&&(a=e.signal)!==null&&a!==void 0&&a.aborted&&f(),e==null||(s=e.signal)===null||s===void 0||s.addEventListener("abort",f);let h,p,b=!1;function _(){b=!0}async function E(){try{for await(let A of u){var w;if(b)return;if(l.aborted)throw new zs;try{A=t(A,d)}catch(T){A=dD(T)}A!==Rb&&(typeof((w=A)===null||w===void 0?void 0:w.catch)=="function"&&A.catch(_),c.push(A),h&&(h(),h=null),!b&&c.length&&c.length>=r&&await new lD(T=>{p=T}))}c.push(fD)}catch(A){const T=dD(A);Oee(T,void 0,_),c.push(T)}finally{var O;b=!0,h&&(h(),h=null),e==null||(O=e.signal)===null||O===void 0||O.removeEventListener("abort",f)}}E();try{for(;;){for(;c.length>0;){const w=await c[0];if(w===fD)return;if(l.aborted)throw new zs;w!==Rb&&(yield w),c.shift(),p&&(p(),p=null)}await new lD(w=>{h=w})}}finally{o.abort(),b=!0,p&&(p(),p=null)}}).call(this)}function Ree(t=void 0){return t!=null&&gl(t,"options"),(t==null?void 0:t.signal)!=null&&_l(t.signal,"options.signal"),(async function*(){let r=0;for await(const a of this){var n;if(t!=null&&(n=t.signal)!==null&&n!==void 0&&n.aborted)throw new zs({cause:t.signal.reason});yield[r++,a]}}).call(this)}async function H9(t,e=void 0){for await(const r of rR.call(this,t,e))return!0;return!1}async function xee(t,e=void 0){if(typeof t!="function")throw new b0("fn",["Function","AsyncFunction"],t);return!await H9.call(this,async(...r)=>!await t(...r),e)}async function Iee(t,e){for await(const r of rR.call(this,t,e))return r}async function Pee(t,e){if(typeof t!="function")throw new b0("fn",["Function","AsyncFunction"],t);async function r(n,a){return await t(n,a),Rb}for await(const n of $g.call(this,r,e));}function rR(t,e){if(typeof t!="function")throw new b0("fn",["Function","AsyncFunction"],t);async function r(n,a){return await t(n,a)?n:Rb}return $g.call(this,r,e)}class Dee extends fee{constructor(){super("reduce"),this.message="Reduce of an empty stream requires an initial value"}}async function Nee(t,e,r){var n;if(typeof t!="function")throw new b0("reducer",["Function","AsyncFunction"],t);r!=null&&gl(r,"options"),(r==null?void 0:r.signal)!=null&&_l(r.signal,"options.signal");let a=arguments.length>1;if(r!=null&&(n=r.signal)!==null&&n!==void 0&&n.aborted){const l=new zs(void 0,{cause:r.signal.reason});throw this.once("error",()=>{}),await bee(this.destroy(l)),l}const s=new q9,o=s.signal;if(r!=null&&r.signal){const l={once:!0,[yee]:this};r.signal.addEventListener("abort",()=>s.abort(),l)}let u=!1;try{for await(const l of this){var c;if(u=!0,r!=null&&(c=r.signal)!==null&&c!==void 0&&c.aborted)throw new zs;a?e=await t(e,l,{signal:o}):(e=l,a=!0)}if(!u&&!a)throw new Dee}finally{s.abort()}return e}async function Cee(t){t!=null&&gl(t,"options"),(t==null?void 0:t.signal)!=null&&_l(t.signal,"options.signal");const e=[];for await(const n of this){var r;if(t!=null&&(r=t.signal)!==null&&r!==void 0&&r.aborted)throw new zs(void 0,{cause:t.signal.reason});wee(e,n)}return e}function jee(t,e){const r=$g.call(this,t,e);return(async function*(){for await(const a of r)yield*a}).call(this)}function k9(t){if(t=Tee(t),Eee(t))return 0;if(t<0)throw new hee("number",">= 0",t);return t}function Mee(t,e=void 0){return e!=null&&gl(e,"options"),(e==null?void 0:e.signal)!=null&&_l(e.signal,"options.signal"),t=k9(t),(async function*(){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new zs;for await(const s of this){var a;if(e!=null&&(a=e.signal)!==null&&a!==void 0&&a.aborted)throw new zs;t--<=0&&(yield s)}}).call(this)}function Fee(t,e=void 0){return e!=null&&gl(e,"options"),(e==null?void 0:e.signal)!=null&&_l(e.signal,"options.signal"),t=k9(t),(async function*(){var n;if(e!=null&&(n=e.signal)!==null&&n!==void 0&&n.aborted)throw new zs;for await(const s of this){var a;if(e!=null&&(a=e.signal)!==null&&a!==void 0&&a.aborted)throw new zs;if(t-- >0)yield s;else return}}).call(this)}kA.streamReturningOperators={asIndexedPairs:Ree,drop:Mee,filter:rR,flatMap:jee,map:$g,take:Fee,compose:Aee};kA.promiseReturningOperators={every:xee,forEach:Pee,reduce:Nee,toArray:Cee,some:H9,find:Iee};var CS,hD;function Q9(){if(hD)return CS;hD=1;const{ArrayPrototypePop:t,Promise:e}=pn,{isIterable:r,isNodeStream:n,isWebStream:a}=Ko,{pipelineImpl:s}=tR,{finished:o}=ec;G9();function u(...c){return new e((l,d)=>{let f,h;const p=c[c.length-1];if(p&&typeof p=="object"&&!n(p)&&!r(p)&&!a(p)){const b=t(c);f=b.signal,h=b.end}s(c,(b,_)=>{b?d(b):l(_)},{signal:f,end:h})})}return CS={finished:o,pipeline:u},CS}var pD;function G9(){if(pD)return yS.exports;pD=1;const{Buffer:t}=la,{ObjectDefineProperty:e,ObjectKeys:r,ReflectApply:n}=pn,{promisify:{custom:a}}=Xo,{streamReturningOperators:s,promiseReturningOperators:o}=kA,{codes:{ERR_ILLEGAL_CONSTRUCTOR:u}}=Vi,c=U9,{pipeline:l}=tR,{destroyer:d}=xf,f=ec,h=Q9(),p=Ko,b=yS.exports=KA.Stream;b.isDisturbed=p.isDisturbed,b.isErrored=p.isErrored,b.isReadable=p.isReadable,b.Readable=Bg();for(const w of r(s)){let A=function(...T){if(new.target)throw u();return b.Readable.from(n(O,this,T))};var E=A;const O=s[w];e(A,"name",{__proto__:null,value:O.name}),e(A,"length",{__proto__:null,value:O.length}),e(b.Readable.prototype,w,{__proto__:null,value:A,enumerable:!1,configurable:!0,writable:!0})}for(const w of r(o)){let A=function(...I){if(new.target)throw u();return n(O,this,I)};var E=A;const O=o[w];e(A,"name",{__proto__:null,value:O.name}),e(A,"length",{__proto__:null,value:O.length}),e(b.Readable.prototype,w,{__proto__:null,value:A,enumerable:!1,configurable:!0,writable:!0})}b.Writable=j9(),b.Duplex=Uo(),b.Transform=F9,b.PassThrough=B9,b.pipeline=l;const{addAbortSignal:_}=Lg;return b.addAbortSignal=_,b.finished=f,b.destroy=d,b.compose=c,e(b,"promises",{__proto__:null,configurable:!0,enumerable:!0,get(){return h}}),e(l,a,{__proto__:null,enumerable:!0,get(){return h.pipeline}}),e(f,a,{__proto__:null,enumerable:!0,get(){return h.finished}}),b.Stream=b,b._isUint8Array=function(O){return O instanceof Uint8Array},b._uint8ArrayToBuffer=function(O){return t.from(O.buffer,O.byteOffset,O.byteLength)},yS.exports}(function(t){const e=G9(),r=Q9(),n=e.Readable.destroy;t.exports=e.Readable,t.exports._uint8ArrayToBuffer=e._uint8ArrayToBuffer,t.exports._isUint8Array=e._isUint8Array,t.exports.isDisturbed=e.isDisturbed,t.exports.isErrored=e.isErrored,t.exports.isReadable=e.isReadable,t.exports.Readable=e.Readable,t.exports.Writable=e.Writable,t.exports.Duplex=e.Duplex,t.exports.Transform=e.Transform,t.exports.PassThrough=e.PassThrough,t.exports.addAbortSignal=e.addAbortSignal,t.exports.finished=e.finished,t.exports.destroy=e.destroy,t.exports.destroy=n,t.exports.pipeline=e.pipeline,t.exports.compose=e.compose,Object.defineProperty(e,"promises",{configurable:!0,enumerable:!0,get(){return r}}),t.exports.Stream=e.Stream,t.exports.default=t.exports})(t9);var kt=t9.exports;Object.defineProperty(Sg,"__esModule",{value:!0});Sg.ActorQueryResultSerializeJson=void 0;const Lee=ls,yD=nr,Bee=kt;class $ee extends Lee.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,r){if(!["bindings","quads","boolean"].includes(e.type))throw new Error("This actor can only handle bindings or quad streams.");return!0}async runHandle(e,r,n){const a=new Bee.Readable;a._read=()=>{};let s=!0;if(e.type==="bindings"){const o=e.bindingsStream;a.push("["),o.on("error",u=>a.emit("error",u)),o.on("data",u=>{a.push(s?` `:`, `),a.push(JSON.stringify(Object.fromEntries([...u].map(([c,l])=>[c.value,yD.termToString(l)])))),s=!1}),o.on("end",()=>{a.push(s?`] `:` @@ -68,8 +68,8 @@ graph: ${Bc.termToString(o.graph)} `),a.push(null)}catch(o){setTimeout(()=>a.emit("error",o))}else e.execute().then(()=>{a.push(`ok `),a.push(null)}).catch(o=>setTimeout(()=>a.emit("error",o)));return{data:a}}}Ug.ActorQueryResultSerializeSimple=Bc;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ug,t)})(z9);var W9={},qg={};Object.defineProperty(qg,"__esModule",{value:!0});qg.ActorQueryResultSerializeSparqlCsv=void 0;const Hee=ls,kee=kt;class ld extends Hee.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToCsvBindings(e){if(!e)return"";let r=e.value;if(e.termType==="Literal")r=`${r}`;else if(e.termType==="BlankNode")r=`_:${r}`;else if(e.termType==="Quad"){let n=ld.bindingToCsvBindings(e.object);e.object.termType==="Literal"&&(n=`"${n.replace(/"/ug,'""')}"`),r=`<< ${ld.bindingToCsvBindings(e.subject)} ${ld.bindingToCsvBindings(e.predicate)} ${n} >>`}else r=`<${r}>`;return/[",\n\r]/u.test(r)&&(r=`"${r.replace(/"/ug,'""')}"`),r}async testHandleChecked(e,r){if(e.type!=="bindings")throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,r,n){const a=e,s=new kee.Readable;s._read=()=>{};const o=await a.metadata();return s.push(`${o.variables.map(u=>u.value).join(",")}\r `),a.bindingsStream.on("error",u=>{s.emit("error",u)}),a.bindingsStream.on("data",u=>{s.push(`${o.variables.map(c=>ld.bindingToCsvBindings(u.get(c))).join(",")}\r -`)}),a.bindingsStream.on("end",()=>{s.push(null)}),{data:s}}}qg.ActorQueryResultSerializeSparqlCsv=ld;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(qg,t)})(W9);var X9={},Vg={},b0={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.stringQuadToQuad=Kn.quadToStringQuad=Kn.stringToTerm=Kn.getLiteralLanguage=Kn.getLiteralType=Kn.getLiteralValue=Kn.termToString=void 0;const Qee=ht,K9=new Qee.DataFactory;function Po(t){if(t)switch(t.termType){case"NamedNode":return`<${Wee(t.value)}>`;case"BlankNode":return`_:${t.value}`;case"Literal":{const e=t;return`"${Xee(e.value)}"${e.datatype&&e.datatype.value!=="http://www.w3.org/2001/XMLSchema#string"&&e.datatype.value!=="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"?`^^<${e.datatype.value}>`:""}${e.language?`@${e.language}`:""}`}case"Quad":return`<<${Po(t.subject)} ${Po(t.predicate)} ${Po(t.object)}${t.graph.termType==="DefaultGraph"?"":` ${Po(t.graph)}`}>>`;case"Variable":return`?${t.value}`;case"DefaultGraph":return t.value}}Kn.termToString=Po;function J9(t){const e=/^"([^]*)"((\^\^.*)|(@.*))?$/u.exec(t);if(!e)throw new Error(`${t} is not a literal`);return e[1].replace(/\\"/ug,'"')}Kn.getLiteralValue=J9;function Y9(t){const e=/^"[^]*"(?:\^\^<([^"]+)>|(@)[^@"]+)?$/u.exec(t);if(!e)throw new Error(`${t} is not a literal`);return e[1]||(e[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")}Kn.getLiteralType=Y9;function Z9(t){const e=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/u.exec(t);if(!e)throw new Error(`${t} is not a literal`);return e[1]?e[1].toLowerCase():""}Kn.getLiteralLanguage=Z9;function Do(t,e){if(e=e||K9,!t||t.length===0)return e.defaultGraph();switch(t[0]){case"_":return e.blankNode(t.slice(2));case"?":if(!e.variable)throw new Error("Missing 'variable()' method on the given DataFactory");return e.variable(t.slice(1));case'"':{const r=Z9(t),n=e.namedNode(Y9(t));return e.literal(J9(t),r||n)}case"<":default:if(t.startsWith("<<")&&t.endsWith(">>")){const r=t.slice(2,-2),n=[];let a=0,s=0;for(let o=0;o"){if(a===0)throw new Error(`Found closing tag without opening tag in ${t}`);a--}u===" "&&a===0&&(n.push(r.slice(s,o)),s=o+1)}if(a!==0)throw new Error(`Found opening tag without closing tag in ${t}`);if(n.push(r.slice(s,r.length)),n.length!==3&&n.length!==4)throw new Error(`Nested quad syntax error ${t}`);return e.quad(Do(n[0]),Do(n[1]),Do(n[2]),n[3]?Do(n[3]):void 0)}if(!t.startsWith("<")||!t.endsWith(">"))throw new Error(`Detected invalid iri for named node (must be wrapped in <>): ${t}`);return e.namedNode(t.slice(1,-1))}}Kn.stringToTerm=Do;function Gee(t){return{subject:Po(t.subject),predicate:Po(t.predicate),object:Po(t.object),graph:Po(t.graph)}}Kn.quadToStringQuad=Gee;function zee(t,e){return e=e||K9,e.quad(Do(t.subject,e),Do(t.predicate,e),Do(t.object,e),Do(t.graph,e))}Kn.stringQuadToQuad=zee;function Wee(t){return t.replace(zE,eM)}function Xee(t){return zE.test(t)&&(t=t.replace(zE,eM)),t}const zE=/["\\\t\n\r\b\f\u0000-\u0019]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Kee=new Map([["\\","\\\\"],['"','\\"'],[" ","\\t"],[` -`,"\\n"],["\r","\\r"],["\b","\\b"],["\f","\\f"]]);function eM(t){const e=Kee.get(t);if(!e){if(t.length===1){const n=t.charCodeAt(0).toString(16);return`${"\\u0000".slice(0,-n.length)}${n}`}const r=((t.charCodeAt(0)-55296)*1024+t.charCodeAt(1)+9216).toString(16);return`${"\\U00000000".slice(0,-r.length)}${r}`}return e}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.termToString=t.stringToTerm=t.stringQuadToQuad=t.quadToStringQuad=t.getLiteralValue=t.getLiteralType=t.getLiteralLanguage=void 0;const e=Kn;Object.defineProperty(t,"getLiteralLanguage",{enumerable:!0,get:function(){return e.getLiteralLanguage}}),Object.defineProperty(t,"getLiteralType",{enumerable:!0,get:function(){return e.getLiteralType}}),Object.defineProperty(t,"getLiteralValue",{enumerable:!0,get:function(){return e.getLiteralValue}}),Object.defineProperty(t,"quadToStringQuad",{enumerable:!0,get:function(){return e.quadToStringQuad}}),Object.defineProperty(t,"stringQuadToQuad",{enumerable:!0,get:function(){return e.stringQuadToQuad}}),Object.defineProperty(t,"stringToTerm",{enumerable:!0,get:function(){return e.stringToTerm}}),Object.defineProperty(t,"termToString",{enumerable:!0,get:function(){return e.termToString}})})(b0);Object.defineProperty(Vg,"__esModule",{value:!0});Vg.ActorQueryResultSerializeSparqlTsv=void 0;const Jee=ls,Yee=b0,Zee=kt;class nR extends Jee.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToTsvBindings(e){return e?(0,Yee.termToString)(e).replace(/\t/gu,"\\t").replace(/\n/gu,"\\n").replace(/\r/gu,"\\r"):""}async testHandleChecked(e,r){if(e.type!=="bindings")throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,r,n){const a=e,s=new Zee.Readable;s._read=()=>{};const o=await a.metadata();return s.push(`${o.variables.map(u=>u.value).join(" ")} +`)}),a.bindingsStream.on("end",()=>{s.push(null)}),{data:s}}}qg.ActorQueryResultSerializeSparqlCsv=ld;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(qg,t)})(W9);var X9={},Vg={},_0={},Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.stringQuadToQuad=Kn.quadToStringQuad=Kn.stringToTerm=Kn.getLiteralLanguage=Kn.getLiteralType=Kn.getLiteralValue=Kn.termToString=void 0;const Qee=ht,K9=new Qee.DataFactory;function Po(t){if(t)switch(t.termType){case"NamedNode":return`<${Wee(t.value)}>`;case"BlankNode":return`_:${t.value}`;case"Literal":{const e=t;return`"${Xee(e.value)}"${e.datatype&&e.datatype.value!=="http://www.w3.org/2001/XMLSchema#string"&&e.datatype.value!=="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString"?`^^<${e.datatype.value}>`:""}${e.language?`@${e.language}`:""}`}case"Quad":return`<<${Po(t.subject)} ${Po(t.predicate)} ${Po(t.object)}${t.graph.termType==="DefaultGraph"?"":` ${Po(t.graph)}`}>>`;case"Variable":return`?${t.value}`;case"DefaultGraph":return t.value}}Kn.termToString=Po;function J9(t){const e=/^"([^]*)"((\^\^.*)|(@.*))?$/u.exec(t);if(!e)throw new Error(`${t} is not a literal`);return e[1].replace(/\\"/ug,'"')}Kn.getLiteralValue=J9;function Y9(t){const e=/^"[^]*"(?:\^\^<([^"]+)>|(@)[^@"]+)?$/u.exec(t);if(!e)throw new Error(`${t} is not a literal`);return e[1]||(e[2]?"http://www.w3.org/1999/02/22-rdf-syntax-ns#langString":"http://www.w3.org/2001/XMLSchema#string")}Kn.getLiteralType=Y9;function Z9(t){const e=/^"[^]*"(?:@([^@"]+)|\^\^[^"]+)?$/u.exec(t);if(!e)throw new Error(`${t} is not a literal`);return e[1]?e[1].toLowerCase():""}Kn.getLiteralLanguage=Z9;function Do(t,e){if(e=e||K9,!t||t.length===0)return e.defaultGraph();switch(t[0]){case"_":return e.blankNode(t.slice(2));case"?":if(!e.variable)throw new Error("Missing 'variable()' method on the given DataFactory");return e.variable(t.slice(1));case'"':{const r=Z9(t),n=e.namedNode(Y9(t));return e.literal(J9(t),r||n)}case"<":default:if(t.startsWith("<<")&&t.endsWith(">>")){const r=t.slice(2,-2),n=[];let a=0,s=0;for(let o=0;o"){if(a===0)throw new Error(`Found closing tag without opening tag in ${t}`);a--}u===" "&&a===0&&(n.push(r.slice(s,o)),s=o+1)}if(a!==0)throw new Error(`Found opening tag without closing tag in ${t}`);if(n.push(r.slice(s,r.length)),n.length!==3&&n.length!==4)throw new Error(`Nested quad syntax error ${t}`);return e.quad(Do(n[0]),Do(n[1]),Do(n[2]),n[3]?Do(n[3]):void 0)}if(!t.startsWith("<")||!t.endsWith(">"))throw new Error(`Detected invalid iri for named node (must be wrapped in <>): ${t}`);return e.namedNode(t.slice(1,-1))}}Kn.stringToTerm=Do;function Gee(t){return{subject:Po(t.subject),predicate:Po(t.predicate),object:Po(t.object),graph:Po(t.graph)}}Kn.quadToStringQuad=Gee;function zee(t,e){return e=e||K9,e.quad(Do(t.subject,e),Do(t.predicate,e),Do(t.object,e),Do(t.graph,e))}Kn.stringQuadToQuad=zee;function Wee(t){return t.replace(zE,eM)}function Xee(t){return zE.test(t)&&(t=t.replace(zE,eM)),t}const zE=/["\\\t\n\r\b\f\u0000-\u0019]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Kee=new Map([["\\","\\\\"],['"','\\"'],[" ","\\t"],[` +`,"\\n"],["\r","\\r"],["\b","\\b"],["\f","\\f"]]);function eM(t){const e=Kee.get(t);if(!e){if(t.length===1){const n=t.charCodeAt(0).toString(16);return`${"\\u0000".slice(0,-n.length)}${n}`}const r=((t.charCodeAt(0)-55296)*1024+t.charCodeAt(1)+9216).toString(16);return`${"\\U00000000".slice(0,-r.length)}${r}`}return e}(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.termToString=t.stringToTerm=t.stringQuadToQuad=t.quadToStringQuad=t.getLiteralValue=t.getLiteralType=t.getLiteralLanguage=void 0;const e=Kn;Object.defineProperty(t,"getLiteralLanguage",{enumerable:!0,get:function(){return e.getLiteralLanguage}}),Object.defineProperty(t,"getLiteralType",{enumerable:!0,get:function(){return e.getLiteralType}}),Object.defineProperty(t,"getLiteralValue",{enumerable:!0,get:function(){return e.getLiteralValue}}),Object.defineProperty(t,"quadToStringQuad",{enumerable:!0,get:function(){return e.quadToStringQuad}}),Object.defineProperty(t,"stringQuadToQuad",{enumerable:!0,get:function(){return e.stringQuadToQuad}}),Object.defineProperty(t,"stringToTerm",{enumerable:!0,get:function(){return e.stringToTerm}}),Object.defineProperty(t,"termToString",{enumerable:!0,get:function(){return e.termToString}})})(_0);Object.defineProperty(Vg,"__esModule",{value:!0});Vg.ActorQueryResultSerializeSparqlTsv=void 0;const Jee=ls,Yee=_0,Zee=kt;class nR extends Jee.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToTsvBindings(e){return e?(0,Yee.termToString)(e).replace(/\t/gu,"\\t").replace(/\n/gu,"\\n").replace(/\r/gu,"\\r"):""}async testHandleChecked(e,r){if(e.type!=="bindings")throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,r,n){const a=e,s=new Zee.Readable;s._read=()=>{};const o=await a.metadata();return s.push(`${o.variables.map(u=>u.value).join(" ")} `),a.bindingsStream.on("error",u=>{s.emit("error",u)}),a.bindingsStream.on("data",u=>{s.push(`${o.variables.map(c=>nR.bindingToTsvBindings(u.get(c))).join(" ")} `)}),a.bindingsStream.on("end",()=>{s.push(null)}),{data:s}}}Vg.ActorQueryResultSerializeSparqlTsv=nR;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Vg,t)})(X9);var tM={},Hg={},kg={};Object.defineProperty(kg,"__esModule",{value:!0});kg.XmlSerializer=void 0;class ete{constructor(e){this.stack=[],this.push=e,this.push(` `)}open(e,r){this.push(`${this.identation()+this.formatTag(e,r,"open")} @@ -82,11 +82,11 @@ graph: ${Bc.termToString(o.graph)} ${xb.repeat("-",n.length)} `)}pushRow(e,r,n){e.push(`${r.map(a=>n.has(a)?this.termToString(n.get(a)):"").map(a=>this.pad(a)).join(" ")} `)}async runHandle(e,r,n){const a=new ote.Readable;a._read=()=>{};let s;if(e.type==="bindings"){s=e.bindingsStream;const o=(await e.metadata()).variables;this.pushHeader(a,o),s.on("error",u=>a.emit("error",u)),s.on("data",u=>this.pushRow(a,o,u))}else s=e.quadStream,this.pushHeader(a,cte),s.on("error",o=>a.emit("error",o)),s.on("data",o=>a.push(`${(0,nM.getTerms)(o).map(u=>this.pad(this.termToString(u))).join(" ")} -`));return s.on("end",()=>a.push(null)),{data:a}}}Qg.ActorQueryResultSerializeTable=xb;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Qg,t)})(rM);var iM={},vp={},aM={},Gg={},sM={},WE={},zg={},Vo={};Object.defineProperty(Vo,"__esModule",{value:!0});Vo.Translator=void 0;class lte{constructor(){this.supportedRdfDatatypes=[],this.fromRdfHandlers={},this.toRdfHandlers={}}static incorrectRdfDataType(e){throw new Error(`Invalid RDF ${e.datatype.value} value: '${e.value}'`)}registerHandler(e,r,n){for(const a of r)this.supportedRdfDatatypes.push(a),this.fromRdfHandlers[a.value]=e;for(const a of n){let s=this.toRdfHandlers[a];s||(this.toRdfHandlers[a]=s=[]),s.push(e)}}fromRdf(e,r){const n=this.fromRdfHandlers[e.datatype.value];return n?n.fromRdf(e,r):e.value}toRdf(e,r){const n=this.toRdfHandlers[typeof e];if(n)for(const a of n){const s=a.toRdf(e,r);if(s)return s}throw new Error(`Invalid JavaScript value: '${e}'`)}getSupportedRdfDatatypes(){return this.supportedRdfDatatypes}getSupportedJavaScriptPrimitives(){return Object.keys(this.toRdfHandlers)}}Vo.Translator=lte;Object.defineProperty(zg,"__esModule",{value:!0});zg.TypeHandlerBoolean=void 0;const dte=Vo;class Wg{fromRdf(e,r){switch(e.value){case"true":return!0;case"false":return!1;case"1":return!0;case"0":return!1}return r&&dte.Translator.incorrectRdfDataType(e),!1}toRdf(e,{datatype:r,dataFactory:n}){return n.literal(e?"true":"false",r||n.namedNode(Wg.TYPE))}}zg.TypeHandlerBoolean=Wg;Wg.TYPE="http://www.w3.org/2001/XMLSchema#boolean";var Xg={};Object.defineProperty(Xg,"__esModule",{value:!0});Xg.TypeHandlerDate=void 0;const fte=Vo;class zd{fromRdf(e,r){switch(r&&!e.value.match(zd.VALIDATORS[e.datatype.value.substr(33,e.datatype.value.length)])&&fte.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 n=e.value.split("-");return new Date(0,parseInt(n[0],10)-1,parseInt(n[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:r,dataFactory:n}){if(r=r||n.namedNode(zd.TYPES[0]),!(e instanceof Date))return null;const a=e;let s;switch(r.value){case"http://www.w3.org/2001/XMLSchema#gDay":s=String(a.getUTCDate());break;case"http://www.w3.org/2001/XMLSchema#gMonthDay":s=a.getUTCMonth()+1+"-"+a.getUTCDate();break;case"http://www.w3.org/2001/XMLSchema#gYear":s=String(a.getUTCFullYear());break;case"http://www.w3.org/2001/XMLSchema#gYearMonth":s=a.getUTCFullYear()+"-"+(a.getUTCMonth()+1);break;case"http://www.w3.org/2001/XMLSchema#date":s=a.toISOString().replace(/T.*$/,"");break;default:s=a.toISOString()}return n.literal(s,r)}}Xg.TypeHandlerDate=zd;zd.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"];zd.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]$/};var Kg={};Object.defineProperty(Kg,"__esModule",{value:!0});Kg.TypeHandlerNumberDouble=void 0;const hte=Vo;class Jg{fromRdf(e,r){const n=parseFloat(e.value);return r&&isNaN(n)&&hte.Translator.incorrectRdfDataType(e),n}toRdf(e,{datatype:r,dataFactory:n}){return r=r||n.namedNode(Jg.TYPES[0]),isNaN(e)?n.literal("NaN",r):isFinite(e)?e%1===0?null:n.literal(e.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),r):n.literal(e>0?"INF":"-INF",r)}}Kg.TypeHandlerNumberDouble=Jg;Jg.TYPES=["http://www.w3.org/2001/XMLSchema#double","http://www.w3.org/2001/XMLSchema#decimal","http://www.w3.org/2001/XMLSchema#float"];var Yg={};Object.defineProperty(Yg,"__esModule",{value:!0});Yg.TypeHandlerNumberInteger=void 0;const pte=Vo;class No{fromRdf(e,r){const n=parseInt(e.value,10);return r&&(isNaN(n)||e.value.indexOf(".")>=0)&&pte.Translator.incorrectRdfDataType(e),n}toRdf(e,{datatype:r,dataFactory:n}){return n.literal(String(e),r||(e<=No.MAX_INT&&e>=No.MIN_INT?n.namedNode(No.TYPES[0]):n.namedNode(No.TYPES[1])))}}Yg.TypeHandlerNumberInteger=No;No.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"];No.MAX_INT=2147483647;No.MIN_INT=-2147483648;var Zg={};Object.defineProperty(Zg,"__esModule",{value:!0});Zg.TypeHandlerString=void 0;class oM{fromRdf(e){return e.value}toRdf(e,{datatype:r,dataFactory:n}){return n.literal(e,r)}}Zg.TypeHandlerString=oM;oM.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"];(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(zg,t),r(Xg,t),r(Kg,t),r(Yg,t),r(Zg,t)})(WE);var uM={};Object.defineProperty(uM,"__esModule",{value:!0});(function(t){var e=m&&m.__createBinding||(Object.create?function(p,b,_,E){E===void 0&&(E=_),Object.defineProperty(p,E,{enumerable:!0,get:function(){return b[_]}})}:function(p,b,_,E){E===void 0&&(E=_),p[E]=b[_]}),r=m&&m.__exportStar||function(p,b){for(var _ in p)_!=="default"&&!Object.prototype.hasOwnProperty.call(b,_)&&e(b,p,_)};Object.defineProperty(t,"__esModule",{value:!0}),t.getSupportedJavaScriptPrimitives=t.getSupportedRdfDatatypes=t.getTermRaw=t.toRdf=t.fromRdf=void 0;const n=ht,a=WE,s=Vo;r(WE,t),r(uM,t),r(Vo,t);const o=new n.DataFactory,u=new s.Translator;u.registerHandler(new a.TypeHandlerString,a.TypeHandlerString.TYPES.map(p=>o.namedNode(p)),["string"]),u.registerHandler(new a.TypeHandlerBoolean,[a.TypeHandlerBoolean.TYPE].map(p=>o.namedNode(p)),["boolean"]),u.registerHandler(new a.TypeHandlerNumberDouble,a.TypeHandlerNumberDouble.TYPES.map(p=>o.namedNode(p)),["number"]),u.registerHandler(new a.TypeHandlerNumberInteger,a.TypeHandlerNumberInteger.TYPES.map(p=>o.namedNode(p)),["number"]),u.registerHandler(new a.TypeHandlerDate,a.TypeHandlerDate.TYPES.map(p=>o.namedNode(p)),["object"]);function c(p,b){return u.fromRdf(p,b)}t.fromRdf=c;function l(p,b){return b&&"namedNode"in b&&(b={dataFactory:b}),b=b||{},b&&!b.dataFactory&&(b.dataFactory=o),u.toRdf(p,b)}t.toRdf=l;function d(p,b){return p.termType==="Literal"?c(p,b):p.value}t.getTermRaw=d;function f(){return u.getSupportedRdfDatatypes()}t.getSupportedRdfDatatypes=f;function h(){return u.getSupportedJavaScriptPrimitives()}t.getSupportedJavaScriptPrimitives=h})(sM);var aR={},em={},{Buffer:Iu}=la,Nt={},cM=Nt.LEFT_BRACE=1,X1=Nt.RIGHT_BRACE=2,lM=Nt.LEFT_BRACKET=3,XE=Nt.RIGHT_BRACKET=4,K1=Nt.COLON=5,Ib=Nt.COMMA=6,dM=Nt.TRUE=7,fM=Nt.FALSE=8,hM=Nt.NULL=9,Pb=Nt.STRING=10,pM=Nt.NUMBER=11,Dc=Nt.START=17,yM=Nt.STOP=18,bD=Nt.TRUE1=33,_D=Nt.TRUE2=34,gD=Nt.TRUE3=35,mD=Nt.FALSE1=49,vD=Nt.FALSE2=50,wD=Nt.FALSE3=51,SD=Nt.FALSE4=52,TD=Nt.NULL1=65,ED=Nt.NULL2=66,OD=Nt.NULL3=67,AD=Nt.NUMBER1=81,jS=Nt.NUMBER3=83,Ua=Nt.STRING1=97,RD=Nt.STRING2=98,xD=Nt.STRING3=99,yte=Nt.STRING4=100,bte=Nt.STRING5=101,ID=Nt.STRING6=102,dd=Nt.VALUE=113,MS=Nt.KEY=114,Hy=Nt.OBJECT=129,ky=Nt.ARRAY=130,_te="\\".charCodeAt(0),gte="/".charCodeAt(0),mte="\b".charCodeAt(0),vte="\f".charCodeAt(0),wte=` -`.charCodeAt(0),Ste="\r".charCodeAt(0),Tte=" ".charCodeAt(0),sR=64*1024;function Qy(t){return Iu.alloc?Iu.alloc(t):new Iu(t)}function Qu(){this.tState=Dc,this.value=void 0,this.string=void 0,this.stringBuffer=Qy(sR),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=dd,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:Qy(2),3:Qy(3),4:Qy(4)},this.offset=-1}Qu.toknam=function(t){for(var e=Object.keys(Nt),r=0,n=e.length;r=sR&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=t};da.appendStringBuf=function(t,e,r){var n=t.length;typeof e=="number"&&(typeof r=="number"?r<0?n=t.length-e+r:n=r-e:n=t.length-e),n<0&&(n=0),this.stringBufferOffset+n>sR&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),t.copy(this.stringBuffer,this.stringBufferOffset,e,r),this.stringBufferOffset+=n};da.write=function(t){typeof t=="string"&&(t=new Iu(t));for(var e,r=0,n=t.length;r=48&&e<64)this.string=String.fromCharCode(e),this.tState=jS;else if(!(e===32||e===9||e===10||e===13))return this.charError(t,r)}else if(this.tState===Ua)if(e=t[r],this.bytes_remaining>0){for(var a=0;a=128){if(e<=193||e>244)return this.onError(new Error("Invalid UTF-8 character at position "+r+" in state "+Qu.toknam(this.tState)));if(e>=194&&e<=223&&(this.bytes_in_sequence=2),e>=224&&e<=239&&(this.bytes_in_sequence=3),e>=240&&e<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+r>t.length){for(var s=0;s<=t.length-1-r;s++)this.temp_buffs[this.bytes_in_sequence][s]=t[r+s];this.bytes_remaining=r+this.bytes_in_sequence-t.length,r=t.length-1}else this.appendStringBuf(t,r,r+this.bytes_in_sequence),r=r+this.bytes_in_sequence-1}else if(e===34)this.tState=Dc,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(Pb,this.string),this.offset+=Iu.byteLength(this.string,"utf8")+1,this.string=void 0;else if(e===92)this.tState=RD;else if(e>=32)this.appendStringChar(e);else return this.charError(t,r);else if(this.tState===RD)if(e=t[r],e===34)this.appendStringChar(e),this.tState=Ua;else if(e===92)this.appendStringChar(_te),this.tState=Ua;else if(e===47)this.appendStringChar(gte),this.tState=Ua;else if(e===98)this.appendStringChar(mte),this.tState=Ua;else if(e===102)this.appendStringChar(vte),this.tState=Ua;else if(e===110)this.appendStringChar(wte),this.tState=Ua;else if(e===114)this.appendStringChar(Ste),this.tState=Ua;else if(e===116)this.appendStringChar(Tte),this.tState=Ua;else if(e===117)this.unicode="",this.tState=xD;else return this.charError(t,r);else if(this.tState===xD||this.tState===yte||this.tState===bte||this.tState===ID)if(e=t[r],e>=48&&e<64||e>64&&e<=70||e>96&&e<=102){if(this.unicode+=String.fromCharCode(e),this.tState++===ID){var o=parseInt(this.unicode,16);this.unicode=void 0,this.highSurrogate!==void 0&&o>=56320&&o<57343+1?(this.appendStringBuf(new Iu(String.fromCharCode(this.highSurrogate,o))),this.highSurrogate=void 0):this.highSurrogate===void 0&&o>=55296&&o<56319+1?this.highSurrogate=o:(this.highSurrogate!==void 0&&(this.appendStringBuf(new Iu(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new Iu(String.fromCharCode(o)))),this.tState=Ua}}else return this.charError(t,r);else if(this.tState===AD||this.tState===jS)switch(e=t[r],e){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(e),this.tState=jS;break;default:this.tState=Dc;var u=this.numberReviver(this.string);if(u)return u;this.offset+=this.string.length-1,this.string=void 0,r--;break}else if(this.tState===bD)if(t[r]===114)this.tState=_D;else return this.charError(t,r);else if(this.tState===_D)if(t[r]===117)this.tState=gD;else return this.charError(t,r);else if(this.tState===gD)if(t[r]===101)this.tState=Dc,this.onToken(dM,!0),this.offset+=3;else return this.charError(t,r);else if(this.tState===mD)if(t[r]===97)this.tState=vD;else return this.charError(t,r);else if(this.tState===vD)if(t[r]===108)this.tState=wD;else return this.charError(t,r);else if(this.tState===wD)if(t[r]===115)this.tState=SD;else return this.charError(t,r);else if(this.tState===SD)if(t[r]===101)this.tState=Dc,this.onToken(fM,!1),this.offset+=4;else return this.charError(t,r);else if(this.tState===TD)if(t[r]===117)this.tState=ED;else return this.charError(t,r);else if(this.tState===ED)if(t[r]===108)this.tState=OD;else return this.charError(t,r);else if(this.tState===OD)if(t[r]===108)this.tState=Dc,this.onToken(hM,null),this.offset+=3;else return this.charError(t,r)};da.onToken=function(t,e){};da.parseError=function(t,e){this.tState=yM,this.onError(new Error("Unexpected "+Qu.toknam(t)+(e?"("+JSON.stringify(e)+")":"")+" in state "+Qu.toknam(this.state)))};da.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})};da.pop=function(){var t=this.value,e=this.stack.pop();this.value=e.value,this.key=e.key,this.mode=e.mode,this.emit(t),this.mode||(this.state=dd)};da.emit=function(t){this.mode&&(this.state=Ib),this.onValue(t)};da.onValue=function(t){};da.onToken=function(t,e){if(this.state===dd)if(t===Pb||t===pM||t===dM||t===fM||t===hM)this.value&&(this.value[this.key]=e),this.emit(e);else if(t===cM)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=MS,this.mode=Hy;else if(t===lM)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=ky,this.state=dd;else if(t===X1)if(this.mode===Hy)this.pop();else return this.parseError(t,e);else if(t===XE)if(this.mode===ky)this.pop();else return this.parseError(t,e);else return this.parseError(t,e);else if(this.state===MS)if(t===Pb)this.key=e,this.state=K1;else if(t===X1)this.pop();else return this.parseError(t,e);else if(this.state===K1)if(t===K1)this.state=dd;else return this.parseError(t,e);else if(this.state===Ib)if(t===Ib)this.mode===ky?(this.key++,this.state=dd):this.mode===Hy&&(this.state=MS);else if(t===XE&&this.mode===ky||t===X1&&this.mode===Hy)this.pop();else return this.parseError(t,e);else return this.parseError(t,e)};da.numberReviver=function(t){var e=Number(t);if(isNaN(e))return this.charError(buffer,i);t.match(/[0-9]+/)==t&&e.toString()!=t?this.onToken(Pb,t):this.onToken(pM,e)};Qu.C=Nt;var bM=Qu;Object.defineProperty(em,"__esModule",{value:!0});em.SparqlJsonParser=void 0;const Ete=ht,Ote=kt,PD=bM;class Ate{constructor(e){var r;e=e||{},this.dataFactory=e.dataFactory||new Ete.DataFactory,this.prefixVariableQuestionMark=!!e.prefixVariableQuestionMark,this.suppressMissingStreamResultsError=(r=e.suppressMissingStreamResultsError)!==null&&r!==void 0?r:!0}parseJsonResults(e){return e.results.bindings.map(r=>this.parseJsonBindings(r))}parseJsonResultsStream(e){const r=u=>o.emit("error",u);e.on("error",r);const n=new PD;n.onError=r;let a=!1,s=!1;n.onValue=u=>{if(n.key==="vars"&&n.stack.length===2&&n.stack[1].key==="head")o.emit("variables",u.map(c=>this.dataFactory.variable(c))),a=!0;else if(n.key==="results"&&n.stack.length===1)s=!0;else if(typeof n.key=="number"&&n.stack.length===3&&n.stack[1].key==="results"&&n.stack[2].key==="bindings")try{o.push(this.parseJsonBindings(u))}catch(c){o.emit("error",c)}else n.key==="metadata"&&n.stack.length===1&&o.emit("metadata",u)};const o=e.on("end",u=>{!s&&!this.suppressMissingStreamResultsError?o.emit("error",new Error("No valid SPARQL query results were found.")):a||o.emit("variables",[])}).pipe(new Ote.Transform({objectMode:!0,transform(u,c,l){n.write(u),l()}}));return o}parseJsonBindings(e){const r={};for(const n in e){const a=e[n];r[this.prefixVariableQuestionMark?"?"+n:n]=this.parseJsonValue(a)}return r}parseJsonValue(e){let r;switch(e.type){case"bnode":r=this.dataFactory.blankNode(e.value);break;case"literal":e["xml:lang"]?r=this.dataFactory.literal(e.value,e["xml:lang"]):e.datatype?r=this.dataFactory.literal(e.value,this.dataFactory.namedNode(e.datatype)):r=this.dataFactory.literal(e.value);break;case"typed-literal":r=this.dataFactory.literal(e.value,this.dataFactory.namedNode(e.datatype));break;case"triple":const n=e.value;if(!n||!n.subject||!n.predicate||!n.object)throw new Error("Invalid quoted triple: "+JSON.stringify(e));r=this.dataFactory.quad(this.parseJsonValue(n.subject),this.parseJsonValue(n.predicate),this.parseJsonValue(n.object));break;default:r=this.dataFactory.namedNode(e.value);break}return r}parseJsonBoolean(e){if("boolean"in e)return e.boolean;throw new Error("No valid ASK response was found.")}parseJsonBooleanStream(e){return new Promise((r,n)=>{const a=new PD;a.onError=n,a.onValue=s=>{a.key==="boolean"&&typeof s=="boolean"&&a.stack.length===1&&r(s)},e.on("error",n).on("data",s=>a.write(s)).on("end",()=>n(new Error("No valid ASK response was found.")))})}}em.SparqlJsonParser=Ate;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(em,t)})(aR);Object.defineProperty(Gg,"__esModule",{value:!0});Gg.Converter=void 0;const Rte=sM,xte=aR;class Ss{constructor(e){e=e||{delimiter:"_"},e.prefixVariableQuestionMark=!1,this.delimiter=e.delimiter||"_",this.parser=new xte.SparqlJsonParser(e),this.materializeRdfJsTerms=e.materializeRdfJsTerms}static addValueToTree(e,r,n,a,s,o){const u=r[0],c=a?a+o+u:u,l=s.singularizeVariables[c];if(r.length===1)l?e[u]||(e[u]=n):(e[u]||(e[u]=[]),e[u].push(n));else{let d;l?(e[u]||(e[u]={}),d=e[u]):(e[u]||(e[u]=[{}]),d=e[u][0]),Ss.addValueToTree(d,r.slice(1),n,c,s,o)}}static mergeTrees(e,r){if(typeof e!=typeof r)throw new Error(`Two incompatible tree nodes were found: ${typeof e} and ${typeof r}`);if(Array.isArray(e)!==Array.isArray(r))throw new Error(`Two incompatible tree nodes were found: Array?${Array.isArray(e)} and Array?${Array.isArray(r)}`);if(typeof e=="object"&&typeof r=="object"){if(e.termType&&r.termType)return e.equals(r)?{valid:!0,result:e}:{valid:!1,result:e};if(Array.isArray(e)&&Array.isArray(r)){if(e.length>0){const n=[];let a=!1;for(const s of e){const o=Ss.mergeTrees(s,r[0]);o.valid?(a=!0,n.push(o.result)):n.push(s)}if(a)return{valid:!0,result:n}}return{valid:!0,result:e.concat(r)}}else{const n={};for(const a in r)n[a]=r[a];for(const a in e)if(n[a]){const s=Ss.mergeTrees(e[a],n[a]);if(s.valid)n[a]=s.result;else return{valid:!1,result:e}}else n[a]=e[a];return{valid:!0,result:n}}}else throw new Error(`Unmergable tree types: ${typeof e} and ${typeof r}`)}static materializeTree(e){if(e.termType)return(0,Rte.getTermRaw)(e);if(Array.isArray(e))return e.map(Ss.materializeTree);{const r={};for(const n in e)r[n]=Ss.materializeTree(e[n]);return r}}sparqlJsonResultsToTree(e,r){return this.bindingsToTree(this.parser.parseJsonResults(e),r||{singularizeVariables:{}})}bindingsToTree(e,r){const n=r&&r.singularizeVariables[""];let a=n?{}:[];for(const s of e){const o=n?{}:[{}];for(const u in s){const c=u.split(this.delimiter),l=s[u];Ss.addValueToTree(n?o:o[0],c,l,"",r,this.delimiter)}a=Ss.mergeTrees(a,o).result}return this.materializeRdfJsTerms&&(a=Ss.materializeTree(a)),a}}Gg.Converter=Ss;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Gg,t)})(aM);Object.defineProperty(vp,"__esModule",{value:!0});vp.ActorQueryResultSerializeTree=void 0;const Ite=ls,Pte=rr,Dte=et,Nte=kt,Cte=aM;class oR extends Ite.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingsStreamToGraphQl(e,r,n){const a=Dte.ActionContext.ensureActionContext(r);return new Promise((s,o)=>{const u=[],c=new Cte.Converter(n),l={singularizeVariables:a.get(Pte.KeysInitQuery.graphqlSingularizeVariables)||{}};e.on("error",o),e.on("data",d=>{u.push(Object.fromEntries([...d].map(([f,h])=>[f.value,h])))}),e.on("end",()=>{s(c.bindingsToTree(u,l))})})}async testHandleChecked(e){if(e.type!=="bindings")throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,r){const n=new Nte.Readable;n._read=()=>{};const a=e.bindingsStream;return a.on("error",s=>n.emit("error",s)),oR.bindingsStreamToGraphQl(a,e.context,{materializeRdfJsTerms:!0}).then(s=>{n.push(JSON.stringify(s,null," ")),n.push(null)}).catch(s=>n.emit("error",s)),{data:n}}}vp.ActorQueryResultSerializeTree=oR;(function(t){var e=m&&m.__createBinding||(Object.create?function(s,o,u,c){c===void 0&&(c=u);var l=Object.getOwnPropertyDescriptor(o,u);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[u]}}),Object.defineProperty(s,c,l)}:function(s,o,u,c){c===void 0&&(c=u),s[c]=o[u]}),r=m&&m.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&e(o,s,u)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindingsStreamToGraphQl=void 0;const n=vp,{bindingsStreamToGraphQl:a}=n.ActorQueryResultSerializeTree;t.bindingsStreamToGraphQl=a,r(vp,t)})(iM);var tc={},tm={};Object.defineProperty(tm,"__esModule",{value:!0});tm.MediatorCombineUnion=void 0;const jte=et;class Mte extends jte.Mediator{constructor(e){super(e),this.combiner=this.createCombiner()}async mediate(e){let r;try{r=this.publish(e)}catch{r=[]}await Promise.all(r.map(({reply:a})=>a));const n=await Promise.all(r.map(a=>a.actor.runObservable(e)));return this.combiner(n)}mediateWith(){throw new Error("Method not supported.")}createCombiner(){return e=>{const r={};return r[this.field]={},[{}].concat(e.map(n=>n[this.field])).forEach((n,a,s)=>{r[this.field]={...n,...r[this.field]}}),r}}}tm.MediatorCombineUnion=Mte;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(tm,t)})(tc);var _M={},rm={},nm={},im={},Bs={};Object.defineProperty(Bs,"__esModule",{value:!0});Bs.ActorDereferenceBase=Bs.isHardError=Bs.emptyReadable=void 0;const Fte=rr,Lte=et,Bte=kt;function gM(){const t=new Bte.Readable;return t.push(null),t}Bs.emptyReadable=gM;function mM(t){return!t.get(Fte.KeysInitQuery.lenient)}Bs.isHardError=mM;class $te extends Lte.Actor{constructor(e){super(e)}async dereferenceErrorHandler(e,r,n){if(mM(e.context))throw r;return this.logError(e.context,r.message),{...n,data:gM()}}}Bs.ActorDereferenceBase=$te;Object.defineProperty(im,"__esModule",{value:!0});im.ActorDereference=void 0;const Ute=Bs;class qte extends Ute.ActorDereferenceBase{constructor(e){super(e)}async handleDereferenceErrors(e,r,n,a=0){return this.dereferenceErrorHandler(e,r,{url:e.url,exists:!1,headers:n,requestTime:a})}}im.ActorDereference=qte;var Wd={};Object.defineProperty(Wd,"__esModule",{value:!0});Wd.ActorDereferenceParse=Wd.getMediaTypeFromExtension=void 0;const Vte=kt,DD=Bs;function vM(t,e){const r=t.lastIndexOf(".");return r>=0&&(e==null?void 0:e[t.slice(r+1)])||""}Wd.getMediaTypeFromExtension=vM;class Hte extends DD.ActorDereferenceBase{constructor(e){super(e)}async test(e){return!0}handleDereferenceStreamErrors(e,r){return(0,DD.isHardError)(e.context)||(r.on("error",n=>{this.logError(e.context,n.message,()=>({url:e.url})),r.push(null)}),r=r.pipe(new Vte.PassThrough({objectMode:!0}))),r}async run(e){var s,o;const{context:r}=e,n=await this.mediatorDereference.mediate({...e,mediaTypes:async()=>{var u,c;return(c=await((u=this.mediatorParseMediatypes)==null?void 0:u.mediate({context:r,mediaTypes:!0})))==null?void 0:c.mediaTypes}});let a;try{a=(await this.mediatorParse.mediate({context:r,handle:{context:r,...n,metadata:await this.getMetadata(n)},handleMediaType:n.mediaType||vM(n.url,this.mediaMappings)||e.mediaType})).handle,a.data=this.handleDereferenceStreamErrors(e,a.data)}catch(u){await((o=(s=n.data).close)==null?void 0:o.call(s)),a=await this.dereferenceErrorHandler(e,u,{})}return{...n,...a}}}Wd.ActorDereferenceParse=Hte;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(im,t),r(Wd,t),r(Bs,t)})(nm);Object.defineProperty(rm,"__esModule",{value:!0});rm.ActorDereferenceFallback=void 0;const kte=nm;class Qte extends kte.ActorDereference{constructor(e){super(e)}async test(e){return!0}async run(e){return this.handleDereferenceErrors(e,new Error(`Could not dereference '${e.url}'`))}}rm.ActorDereferenceFallback=Qte;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(rm,t)})(_M);var wM={},am={},SM={},sm={};Object.defineProperty(sm,"__esModule",{value:!0});sm.ActorRdfJoinEntriesSort=void 0;const Gte=et;class zte extends Gte.Actor{constructor(e){super(e)}}sm.ActorRdfJoinEntriesSort=zte;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(sm,t)})(SM);Object.defineProperty(am,"__esModule",{value:!0});am.ActorRdfJoinEntriesSortCardinality=void 0;const Wte=SM;class Xte extends Wte.ActorRdfJoinEntriesSort{constructor(e){super(e)}async test(e){return!0}async run(e){return{entries:[...e.entries].sort((n,a)=>n.metadata.cardinality.value-a.metadata.cardinality.value)}}}am.ActorRdfJoinEntriesSortCardinality=Xte;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(am,t)})(wM);var TM={},Xd={},EM={},om={};Object.defineProperty(om,"__esModule",{value:!0});om.ActorRdfJoinSelectivity=void 0;const Kte=et;class Jte extends Kte.Actor{constructor(e){super(e)}}om.ActorRdfJoinSelectivity=Jte;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(om,t)})(EM);Object.defineProperty(Xd,"__esModule",{value:!0});Xd.JoinTypes=Xd.ActorRdfJoinSelectivityVariableCounting=void 0;const Yte=EM,Gy=xt;class wo extends Yte.ActorRdfJoinSelectivity{constructor(e){super(e)}async test(e){return{accuracy:.5}}static getPatternCost(e){let r=1;return e.subject.termType==="Variable"&&(r+=4),(e.predicate.termType==="Variable"||e.type===Gy.Algebra.types.PATH)&&(r+=1),e.object.termType==="Variable"&&(r+=2),e.graph.termType==="Variable"&&(r+=1),r/9}static getJoinTypes(e,r){const n=[];return e.subject.termType==="Variable"?(e.subject.equals(r.subject)&&n.push(Ye.unboundSS),r.type==="pattern"&&e.subject.equals(r.predicate)&&n.push(Ye.unboundSP),e.subject.equals(r.object)&&n.push(Ye.unboundSO),e.subject.equals(r.graph)&&n.push(Ye.unboundSG)):(e.subject.equals(r.subject)&&n.push(Ye.boundSS),r.type==="pattern"&&e.subject.equals(r.predicate)&&n.push(Ye.boundSP),e.subject.equals(r.object)&&n.push(Ye.boundSO),e.subject.equals(r.graph)&&n.push(Ye.boundSG)),e.type==="pattern"&&(e.predicate.termType==="Variable"?(e.predicate.equals(r.subject)&&n.push(Ye.unboundPS),r.type==="pattern"&&e.predicate.equals(r.predicate)&&n.push(Ye.unboundPP),e.predicate.equals(r.object)&&n.push(Ye.unboundPO),e.predicate.equals(r.graph)&&n.push(Ye.unboundPG)):(e.predicate.equals(r.subject)&&n.push(Ye.boundPS),r.type==="pattern"&&e.predicate.equals(r.predicate)&&n.push(Ye.boundPP),e.predicate.equals(r.object)&&n.push(Ye.boundPO),e.predicate.equals(r.graph)&&n.push(Ye.boundPG))),e.object.termType==="Variable"?(e.object.equals(r.subject)&&n.push(Ye.unboundOS),r.type==="pattern"&&e.object.equals(r.predicate)&&n.push(Ye.unboundOP),e.object.equals(r.object)&&n.push(Ye.unboundOO),e.object.equals(r.graph)&&n.push(Ye.unboundOG)):(e.object.equals(r.subject)&&n.push(Ye.boundOS),r.type==="pattern"&&e.object.equals(r.predicate)&&n.push(Ye.boundOP),e.object.equals(r.object)&&n.push(Ye.boundOO),e.object.equals(r.graph)&&n.push(Ye.boundOG)),e.graph.termType==="Variable"?(e.graph.equals(r.subject)&&n.push(Ye.unboundGS),r.type==="pattern"&&e.graph.equals(r.predicate)&&n.push(Ye.unboundGP),e.graph.equals(r.object)&&n.push(Ye.unboundGO),e.graph.equals(r.graph)&&n.push(Ye.unboundGG)):(e.graph.equals(r.subject)&&n.push(Ye.boundGS),r.type==="pattern"&&e.graph.equals(r.predicate)&&n.push(Ye.boundGP),e.graph.equals(r.object)&&n.push(Ye.boundGO),e.graph.equals(r.graph)&&n.push(Ye.boundGG)),n}static getOperationsPairwiseJoinCost(e,r){let n=wo.MAX_PAIRWISE_COST;for(const a of wo.getJoinTypes(e,r))switch(a){case Ye.boundSS:n-=2*2;break;case Ye.boundSP:n-=3*2;break;case Ye.boundSO:n-=1*2;break;case Ye.boundSG:n-=3*2;break;case Ye.boundPS:n-=3*2;break;case Ye.boundPP:return 1;case Ye.boundPO:n-=3*2;break;case Ye.boundPG:n-=3*2;break;case Ye.boundOS:n-=1*2;break;case Ye.boundOP:n-=3*2;break;case Ye.boundOO:n-=1*2;break;case Ye.boundOG:n-=3*2;break;case Ye.boundGS:n-=3*2;break;case Ye.boundGP:n-=3*2;break;case Ye.boundGO:n-=3*2;break;case Ye.boundGG:n-=3*2;break;case Ye.unboundSS:n-=2;break;case Ye.unboundSP:n-=3;break;case Ye.unboundSO:n-=1;break;case Ye.unboundSG:n-=3;break;case Ye.unboundPS:n-=3;break;case Ye.unboundPP:n-=3;break;case Ye.unboundPO:n-=3;break;case Ye.unboundPG:n-=3;break;case Ye.unboundOS:n-=1;break;case Ye.unboundOP:n-=3;break;case Ye.unboundOO:n-=1;break;case Ye.unboundOG:n-=3;break;case Ye.unboundGS:n-=3;break;case Ye.unboundGP:n-=3;break;case Ye.unboundGO:n-=3;break;case Ye.unboundGG:n-=3;break}return n/wo.MAX_PAIRWISE_COST}static getOperationsJoinCost(e){const r=[];for(const s of e)Gy.Util.recurseOperation(s,{[Gy.Algebra.types.PATTERN](o){return r.push(o),!1},[Gy.Algebra.types.PATH](o){return r.push(o),!1}});let n=0,a=0;for(const s of r)for(const o of r)s!==o&&(n+=wo.getOperationsPairwiseJoinCost(s,o),a++);return a===0?1:n/a*r.reduce((s,o)=>s*wo.getPatternCost(o),1)}async run(e){return e.entries.length<=1?{selectivity:1}:{selectivity:wo.getOperationsJoinCost(e.entries.map(r=>r.operation))}}}Xd.ActorRdfJoinSelectivityVariableCounting=wo;wo.MAX_PAIRWISE_COST=41*2;var Ye;(function(t){t[t.boundSS=0]="boundSS",t[t.boundSP=1]="boundSP",t[t.boundSO=2]="boundSO",t[t.boundSG=3]="boundSG",t[t.boundPS=4]="boundPS",t[t.boundPP=5]="boundPP",t[t.boundPO=6]="boundPO",t[t.boundPG=7]="boundPG",t[t.boundOS=8]="boundOS",t[t.boundOP=9]="boundOP",t[t.boundOO=10]="boundOO",t[t.boundOG=11]="boundOG",t[t.boundGS=12]="boundGS",t[t.boundGP=13]="boundGP",t[t.boundGO=14]="boundGO",t[t.boundGG=15]="boundGG",t[t.unboundSS=16]="unboundSS",t[t.unboundSP=17]="unboundSP",t[t.unboundSO=18]="unboundSO",t[t.unboundSG=19]="unboundSG",t[t.unboundPS=20]="unboundPS",t[t.unboundPP=21]="unboundPP",t[t.unboundPO=22]="unboundPO",t[t.unboundPG=23]="unboundPG",t[t.unboundOS=24]="unboundOS",t[t.unboundOP=25]="unboundOP",t[t.unboundOO=26]="unboundOO",t[t.unboundOG=27]="unboundOG",t[t.unboundGS=28]="unboundGS",t[t.unboundGP=29]="unboundGP",t[t.unboundGO=30]="unboundGO",t[t.unboundGG=31]="unboundGG"})(Ye||(Xd.JoinTypes=Ye={}));(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Xd,t)})(TM);var If={},um={};Object.defineProperty(um,"__esModule",{value:!0});um.MediatorNumber=void 0;const Zte=et;class ere extends Zte.Mediator{constructor(e){super(e),this.indexPicker=this.createIndexPicker()}createIndexPicker(){switch(this.type){case"min":return e=>e.reduce((r,n,a)=>{const s=this.getOrDefault(n[this.field],Number.POSITIVE_INFINITY);return s!==null&&(Number.isNaN(r[0])||r[0]>s)?[s,a]:r},[Number.NaN,-1])[1];case"max":return e=>e.reduce((r,n,a)=>{const s=this.getOrDefault(n[this.field],Number.NEGATIVE_INFINITY);return s!==null&&(Number.isNaN(r[0])||r[0]u);const a=[];if(this.ignoreErrors){const u={};u[this.field]=null,n=n.map(c=>c.catch(l=>(a.push(l),u)))}const s=await Promise.all(n),o=this.indexPicker(s);if(o<0)throw new Error(`All actors rejected their test in ${this.name} +`));return s.on("end",()=>a.push(null)),{data:a}}}Qg.ActorQueryResultSerializeTable=xb;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Qg,t)})(rM);var iM={},wp={},aM={},Gg={},sM={},WE={},zg={},Vo={};Object.defineProperty(Vo,"__esModule",{value:!0});Vo.Translator=void 0;class lte{constructor(){this.supportedRdfDatatypes=[],this.fromRdfHandlers={},this.toRdfHandlers={}}static incorrectRdfDataType(e){throw new Error(`Invalid RDF ${e.datatype.value} value: '${e.value}'`)}registerHandler(e,r,n){for(const a of r)this.supportedRdfDatatypes.push(a),this.fromRdfHandlers[a.value]=e;for(const a of n){let s=this.toRdfHandlers[a];s||(this.toRdfHandlers[a]=s=[]),s.push(e)}}fromRdf(e,r){const n=this.fromRdfHandlers[e.datatype.value];return n?n.fromRdf(e,r):e.value}toRdf(e,r){const n=this.toRdfHandlers[typeof e];if(n)for(const a of n){const s=a.toRdf(e,r);if(s)return s}throw new Error(`Invalid JavaScript value: '${e}'`)}getSupportedRdfDatatypes(){return this.supportedRdfDatatypes}getSupportedJavaScriptPrimitives(){return Object.keys(this.toRdfHandlers)}}Vo.Translator=lte;Object.defineProperty(zg,"__esModule",{value:!0});zg.TypeHandlerBoolean=void 0;const dte=Vo;class Wg{fromRdf(e,r){switch(e.value){case"true":return!0;case"false":return!1;case"1":return!0;case"0":return!1}return r&&dte.Translator.incorrectRdfDataType(e),!1}toRdf(e,{datatype:r,dataFactory:n}){return n.literal(e?"true":"false",r||n.namedNode(Wg.TYPE))}}zg.TypeHandlerBoolean=Wg;Wg.TYPE="http://www.w3.org/2001/XMLSchema#boolean";var Xg={};Object.defineProperty(Xg,"__esModule",{value:!0});Xg.TypeHandlerDate=void 0;const fte=Vo;class zd{fromRdf(e,r){switch(r&&!e.value.match(zd.VALIDATORS[e.datatype.value.substr(33,e.datatype.value.length)])&&fte.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 n=e.value.split("-");return new Date(0,parseInt(n[0],10)-1,parseInt(n[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:r,dataFactory:n}){if(r=r||n.namedNode(zd.TYPES[0]),!(e instanceof Date))return null;const a=e;let s;switch(r.value){case"http://www.w3.org/2001/XMLSchema#gDay":s=String(a.getUTCDate());break;case"http://www.w3.org/2001/XMLSchema#gMonthDay":s=a.getUTCMonth()+1+"-"+a.getUTCDate();break;case"http://www.w3.org/2001/XMLSchema#gYear":s=String(a.getUTCFullYear());break;case"http://www.w3.org/2001/XMLSchema#gYearMonth":s=a.getUTCFullYear()+"-"+(a.getUTCMonth()+1);break;case"http://www.w3.org/2001/XMLSchema#date":s=a.toISOString().replace(/T.*$/,"");break;default:s=a.toISOString()}return n.literal(s,r)}}Xg.TypeHandlerDate=zd;zd.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"];zd.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]$/};var Kg={};Object.defineProperty(Kg,"__esModule",{value:!0});Kg.TypeHandlerNumberDouble=void 0;const hte=Vo;class Jg{fromRdf(e,r){const n=parseFloat(e.value);return r&&isNaN(n)&&hte.Translator.incorrectRdfDataType(e),n}toRdf(e,{datatype:r,dataFactory:n}){return r=r||n.namedNode(Jg.TYPES[0]),isNaN(e)?n.literal("NaN",r):isFinite(e)?e%1===0?null:n.literal(e.toExponential(15).replace(/(\d)0*e\+?/,"$1E"),r):n.literal(e>0?"INF":"-INF",r)}}Kg.TypeHandlerNumberDouble=Jg;Jg.TYPES=["http://www.w3.org/2001/XMLSchema#double","http://www.w3.org/2001/XMLSchema#decimal","http://www.w3.org/2001/XMLSchema#float"];var Yg={};Object.defineProperty(Yg,"__esModule",{value:!0});Yg.TypeHandlerNumberInteger=void 0;const pte=Vo;class No{fromRdf(e,r){const n=parseInt(e.value,10);return r&&(isNaN(n)||e.value.indexOf(".")>=0)&&pte.Translator.incorrectRdfDataType(e),n}toRdf(e,{datatype:r,dataFactory:n}){return n.literal(String(e),r||(e<=No.MAX_INT&&e>=No.MIN_INT?n.namedNode(No.TYPES[0]):n.namedNode(No.TYPES[1])))}}Yg.TypeHandlerNumberInteger=No;No.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"];No.MAX_INT=2147483647;No.MIN_INT=-2147483648;var Zg={};Object.defineProperty(Zg,"__esModule",{value:!0});Zg.TypeHandlerString=void 0;class oM{fromRdf(e){return e.value}toRdf(e,{datatype:r,dataFactory:n}){return n.literal(e,r)}}Zg.TypeHandlerString=oM;oM.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"];(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(zg,t),r(Xg,t),r(Kg,t),r(Yg,t),r(Zg,t)})(WE);var uM={};Object.defineProperty(uM,"__esModule",{value:!0});(function(t){var e=m&&m.__createBinding||(Object.create?function(p,b,_,E){E===void 0&&(E=_),Object.defineProperty(p,E,{enumerable:!0,get:function(){return b[_]}})}:function(p,b,_,E){E===void 0&&(E=_),p[E]=b[_]}),r=m&&m.__exportStar||function(p,b){for(var _ in p)_!=="default"&&!Object.prototype.hasOwnProperty.call(b,_)&&e(b,p,_)};Object.defineProperty(t,"__esModule",{value:!0}),t.getSupportedJavaScriptPrimitives=t.getSupportedRdfDatatypes=t.getTermRaw=t.toRdf=t.fromRdf=void 0;const n=ht,a=WE,s=Vo;r(WE,t),r(uM,t),r(Vo,t);const o=new n.DataFactory,u=new s.Translator;u.registerHandler(new a.TypeHandlerString,a.TypeHandlerString.TYPES.map(p=>o.namedNode(p)),["string"]),u.registerHandler(new a.TypeHandlerBoolean,[a.TypeHandlerBoolean.TYPE].map(p=>o.namedNode(p)),["boolean"]),u.registerHandler(new a.TypeHandlerNumberDouble,a.TypeHandlerNumberDouble.TYPES.map(p=>o.namedNode(p)),["number"]),u.registerHandler(new a.TypeHandlerNumberInteger,a.TypeHandlerNumberInteger.TYPES.map(p=>o.namedNode(p)),["number"]),u.registerHandler(new a.TypeHandlerDate,a.TypeHandlerDate.TYPES.map(p=>o.namedNode(p)),["object"]);function c(p,b){return u.fromRdf(p,b)}t.fromRdf=c;function l(p,b){return b&&"namedNode"in b&&(b={dataFactory:b}),b=b||{},b&&!b.dataFactory&&(b.dataFactory=o),u.toRdf(p,b)}t.toRdf=l;function d(p,b){return p.termType==="Literal"?c(p,b):p.value}t.getTermRaw=d;function f(){return u.getSupportedRdfDatatypes()}t.getSupportedRdfDatatypes=f;function h(){return u.getSupportedJavaScriptPrimitives()}t.getSupportedJavaScriptPrimitives=h})(sM);var aR={},em={},{Buffer:Iu}=la,Nt={},cM=Nt.LEFT_BRACE=1,X1=Nt.RIGHT_BRACE=2,lM=Nt.LEFT_BRACKET=3,XE=Nt.RIGHT_BRACKET=4,K1=Nt.COLON=5,Ib=Nt.COMMA=6,dM=Nt.TRUE=7,fM=Nt.FALSE=8,hM=Nt.NULL=9,Pb=Nt.STRING=10,pM=Nt.NUMBER=11,Dc=Nt.START=17,yM=Nt.STOP=18,bD=Nt.TRUE1=33,_D=Nt.TRUE2=34,gD=Nt.TRUE3=35,mD=Nt.FALSE1=49,vD=Nt.FALSE2=50,wD=Nt.FALSE3=51,SD=Nt.FALSE4=52,TD=Nt.NULL1=65,ED=Nt.NULL2=66,OD=Nt.NULL3=67,AD=Nt.NUMBER1=81,jS=Nt.NUMBER3=83,Ua=Nt.STRING1=97,RD=Nt.STRING2=98,xD=Nt.STRING3=99,yte=Nt.STRING4=100,bte=Nt.STRING5=101,ID=Nt.STRING6=102,dd=Nt.VALUE=113,MS=Nt.KEY=114,ky=Nt.OBJECT=129,Qy=Nt.ARRAY=130,_te="\\".charCodeAt(0),gte="/".charCodeAt(0),mte="\b".charCodeAt(0),vte="\f".charCodeAt(0),wte=` +`.charCodeAt(0),Ste="\r".charCodeAt(0),Tte=" ".charCodeAt(0),sR=64*1024;function Gy(t){return Iu.alloc?Iu.alloc(t):new Iu(t)}function Qu(){this.tState=Dc,this.value=void 0,this.string=void 0,this.stringBuffer=Gy(sR),this.stringBufferOffset=0,this.unicode=void 0,this.highSurrogate=void 0,this.key=void 0,this.mode=void 0,this.stack=[],this.state=dd,this.bytes_remaining=0,this.bytes_in_sequence=0,this.temp_buffs={2:Gy(2),3:Gy(3),4:Gy(4)},this.offset=-1}Qu.toknam=function(t){for(var e=Object.keys(Nt),r=0,n=e.length;r=sR&&(this.string+=this.stringBuffer.toString("utf8"),this.stringBufferOffset=0),this.stringBuffer[this.stringBufferOffset++]=t};da.appendStringBuf=function(t,e,r){var n=t.length;typeof e=="number"&&(typeof r=="number"?r<0?n=t.length-e+r:n=r-e:n=t.length-e),n<0&&(n=0),this.stringBufferOffset+n>sR&&(this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0),t.copy(this.stringBuffer,this.stringBufferOffset,e,r),this.stringBufferOffset+=n};da.write=function(t){typeof t=="string"&&(t=new Iu(t));for(var e,r=0,n=t.length;r=48&&e<64)this.string=String.fromCharCode(e),this.tState=jS;else if(!(e===32||e===9||e===10||e===13))return this.charError(t,r)}else if(this.tState===Ua)if(e=t[r],this.bytes_remaining>0){for(var a=0;a=128){if(e<=193||e>244)return this.onError(new Error("Invalid UTF-8 character at position "+r+" in state "+Qu.toknam(this.tState)));if(e>=194&&e<=223&&(this.bytes_in_sequence=2),e>=224&&e<=239&&(this.bytes_in_sequence=3),e>=240&&e<=244&&(this.bytes_in_sequence=4),this.bytes_in_sequence+r>t.length){for(var s=0;s<=t.length-1-r;s++)this.temp_buffs[this.bytes_in_sequence][s]=t[r+s];this.bytes_remaining=r+this.bytes_in_sequence-t.length,r=t.length-1}else this.appendStringBuf(t,r,r+this.bytes_in_sequence),r=r+this.bytes_in_sequence-1}else if(e===34)this.tState=Dc,this.string+=this.stringBuffer.toString("utf8",0,this.stringBufferOffset),this.stringBufferOffset=0,this.onToken(Pb,this.string),this.offset+=Iu.byteLength(this.string,"utf8")+1,this.string=void 0;else if(e===92)this.tState=RD;else if(e>=32)this.appendStringChar(e);else return this.charError(t,r);else if(this.tState===RD)if(e=t[r],e===34)this.appendStringChar(e),this.tState=Ua;else if(e===92)this.appendStringChar(_te),this.tState=Ua;else if(e===47)this.appendStringChar(gte),this.tState=Ua;else if(e===98)this.appendStringChar(mte),this.tState=Ua;else if(e===102)this.appendStringChar(vte),this.tState=Ua;else if(e===110)this.appendStringChar(wte),this.tState=Ua;else if(e===114)this.appendStringChar(Ste),this.tState=Ua;else if(e===116)this.appendStringChar(Tte),this.tState=Ua;else if(e===117)this.unicode="",this.tState=xD;else return this.charError(t,r);else if(this.tState===xD||this.tState===yte||this.tState===bte||this.tState===ID)if(e=t[r],e>=48&&e<64||e>64&&e<=70||e>96&&e<=102){if(this.unicode+=String.fromCharCode(e),this.tState++===ID){var o=parseInt(this.unicode,16);this.unicode=void 0,this.highSurrogate!==void 0&&o>=56320&&o<57343+1?(this.appendStringBuf(new Iu(String.fromCharCode(this.highSurrogate,o))),this.highSurrogate=void 0):this.highSurrogate===void 0&&o>=55296&&o<56319+1?this.highSurrogate=o:(this.highSurrogate!==void 0&&(this.appendStringBuf(new Iu(String.fromCharCode(this.highSurrogate))),this.highSurrogate=void 0),this.appendStringBuf(new Iu(String.fromCharCode(o)))),this.tState=Ua}}else return this.charError(t,r);else if(this.tState===AD||this.tState===jS)switch(e=t[r],e){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(e),this.tState=jS;break;default:this.tState=Dc;var u=this.numberReviver(this.string);if(u)return u;this.offset+=this.string.length-1,this.string=void 0,r--;break}else if(this.tState===bD)if(t[r]===114)this.tState=_D;else return this.charError(t,r);else if(this.tState===_D)if(t[r]===117)this.tState=gD;else return this.charError(t,r);else if(this.tState===gD)if(t[r]===101)this.tState=Dc,this.onToken(dM,!0),this.offset+=3;else return this.charError(t,r);else if(this.tState===mD)if(t[r]===97)this.tState=vD;else return this.charError(t,r);else if(this.tState===vD)if(t[r]===108)this.tState=wD;else return this.charError(t,r);else if(this.tState===wD)if(t[r]===115)this.tState=SD;else return this.charError(t,r);else if(this.tState===SD)if(t[r]===101)this.tState=Dc,this.onToken(fM,!1),this.offset+=4;else return this.charError(t,r);else if(this.tState===TD)if(t[r]===117)this.tState=ED;else return this.charError(t,r);else if(this.tState===ED)if(t[r]===108)this.tState=OD;else return this.charError(t,r);else if(this.tState===OD)if(t[r]===108)this.tState=Dc,this.onToken(hM,null),this.offset+=3;else return this.charError(t,r)};da.onToken=function(t,e){};da.parseError=function(t,e){this.tState=yM,this.onError(new Error("Unexpected "+Qu.toknam(t)+(e?"("+JSON.stringify(e)+")":"")+" in state "+Qu.toknam(this.state)))};da.push=function(){this.stack.push({value:this.value,key:this.key,mode:this.mode})};da.pop=function(){var t=this.value,e=this.stack.pop();this.value=e.value,this.key=e.key,this.mode=e.mode,this.emit(t),this.mode||(this.state=dd)};da.emit=function(t){this.mode&&(this.state=Ib),this.onValue(t)};da.onValue=function(t){};da.onToken=function(t,e){if(this.state===dd)if(t===Pb||t===pM||t===dM||t===fM||t===hM)this.value&&(this.value[this.key]=e),this.emit(e);else if(t===cM)this.push(),this.value?this.value=this.value[this.key]={}:this.value={},this.key=void 0,this.state=MS,this.mode=ky;else if(t===lM)this.push(),this.value?this.value=this.value[this.key]=[]:this.value=[],this.key=0,this.mode=Qy,this.state=dd;else if(t===X1)if(this.mode===ky)this.pop();else return this.parseError(t,e);else if(t===XE)if(this.mode===Qy)this.pop();else return this.parseError(t,e);else return this.parseError(t,e);else if(this.state===MS)if(t===Pb)this.key=e,this.state=K1;else if(t===X1)this.pop();else return this.parseError(t,e);else if(this.state===K1)if(t===K1)this.state=dd;else return this.parseError(t,e);else if(this.state===Ib)if(t===Ib)this.mode===Qy?(this.key++,this.state=dd):this.mode===ky&&(this.state=MS);else if(t===XE&&this.mode===Qy||t===X1&&this.mode===ky)this.pop();else return this.parseError(t,e);else return this.parseError(t,e)};da.numberReviver=function(t){var e=Number(t);if(isNaN(e))return this.charError(buffer,i);t.match(/[0-9]+/)==t&&e.toString()!=t?this.onToken(Pb,t):this.onToken(pM,e)};Qu.C=Nt;var bM=Qu;Object.defineProperty(em,"__esModule",{value:!0});em.SparqlJsonParser=void 0;const Ete=ht,Ote=kt,PD=bM;class Ate{constructor(e){var r;e=e||{},this.dataFactory=e.dataFactory||new Ete.DataFactory,this.prefixVariableQuestionMark=!!e.prefixVariableQuestionMark,this.suppressMissingStreamResultsError=(r=e.suppressMissingStreamResultsError)!==null&&r!==void 0?r:!0}parseJsonResults(e){return e.results.bindings.map(r=>this.parseJsonBindings(r))}parseJsonResultsStream(e){const r=u=>o.emit("error",u);e.on("error",r);const n=new PD;n.onError=r;let a=!1,s=!1;n.onValue=u=>{if(n.key==="vars"&&n.stack.length===2&&n.stack[1].key==="head")o.emit("variables",u.map(c=>this.dataFactory.variable(c))),a=!0;else if(n.key==="results"&&n.stack.length===1)s=!0;else if(typeof n.key=="number"&&n.stack.length===3&&n.stack[1].key==="results"&&n.stack[2].key==="bindings")try{o.push(this.parseJsonBindings(u))}catch(c){o.emit("error",c)}else n.key==="metadata"&&n.stack.length===1&&o.emit("metadata",u)};const o=e.on("end",u=>{!s&&!this.suppressMissingStreamResultsError?o.emit("error",new Error("No valid SPARQL query results were found.")):a||o.emit("variables",[])}).pipe(new Ote.Transform({objectMode:!0,transform(u,c,l){n.write(u),l()}}));return o}parseJsonBindings(e){const r={};for(const n in e){const a=e[n];r[this.prefixVariableQuestionMark?"?"+n:n]=this.parseJsonValue(a)}return r}parseJsonValue(e){let r;switch(e.type){case"bnode":r=this.dataFactory.blankNode(e.value);break;case"literal":e["xml:lang"]?r=this.dataFactory.literal(e.value,e["xml:lang"]):e.datatype?r=this.dataFactory.literal(e.value,this.dataFactory.namedNode(e.datatype)):r=this.dataFactory.literal(e.value);break;case"typed-literal":r=this.dataFactory.literal(e.value,this.dataFactory.namedNode(e.datatype));break;case"triple":const n=e.value;if(!n||!n.subject||!n.predicate||!n.object)throw new Error("Invalid quoted triple: "+JSON.stringify(e));r=this.dataFactory.quad(this.parseJsonValue(n.subject),this.parseJsonValue(n.predicate),this.parseJsonValue(n.object));break;default:r=this.dataFactory.namedNode(e.value);break}return r}parseJsonBoolean(e){if("boolean"in e)return e.boolean;throw new Error("No valid ASK response was found.")}parseJsonBooleanStream(e){return new Promise((r,n)=>{const a=new PD;a.onError=n,a.onValue=s=>{a.key==="boolean"&&typeof s=="boolean"&&a.stack.length===1&&r(s)},e.on("error",n).on("data",s=>a.write(s)).on("end",()=>n(new Error("No valid ASK response was found.")))})}}em.SparqlJsonParser=Ate;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(em,t)})(aR);Object.defineProperty(Gg,"__esModule",{value:!0});Gg.Converter=void 0;const Rte=sM,xte=aR;class Ss{constructor(e){e=e||{delimiter:"_"},e.prefixVariableQuestionMark=!1,this.delimiter=e.delimiter||"_",this.parser=new xte.SparqlJsonParser(e),this.materializeRdfJsTerms=e.materializeRdfJsTerms}static addValueToTree(e,r,n,a,s,o){const u=r[0],c=a?a+o+u:u,l=s.singularizeVariables[c];if(r.length===1)l?e[u]||(e[u]=n):(e[u]||(e[u]=[]),e[u].push(n));else{let d;l?(e[u]||(e[u]={}),d=e[u]):(e[u]||(e[u]=[{}]),d=e[u][0]),Ss.addValueToTree(d,r.slice(1),n,c,s,o)}}static mergeTrees(e,r){if(typeof e!=typeof r)throw new Error(`Two incompatible tree nodes were found: ${typeof e} and ${typeof r}`);if(Array.isArray(e)!==Array.isArray(r))throw new Error(`Two incompatible tree nodes were found: Array?${Array.isArray(e)} and Array?${Array.isArray(r)}`);if(typeof e=="object"&&typeof r=="object"){if(e.termType&&r.termType)return e.equals(r)?{valid:!0,result:e}:{valid:!1,result:e};if(Array.isArray(e)&&Array.isArray(r)){if(e.length>0){const n=[];let a=!1;for(const s of e){const o=Ss.mergeTrees(s,r[0]);o.valid?(a=!0,n.push(o.result)):n.push(s)}if(a)return{valid:!0,result:n}}return{valid:!0,result:e.concat(r)}}else{const n={};for(const a in r)n[a]=r[a];for(const a in e)if(n[a]){const s=Ss.mergeTrees(e[a],n[a]);if(s.valid)n[a]=s.result;else return{valid:!1,result:e}}else n[a]=e[a];return{valid:!0,result:n}}}else throw new Error(`Unmergable tree types: ${typeof e} and ${typeof r}`)}static materializeTree(e){if(e.termType)return(0,Rte.getTermRaw)(e);if(Array.isArray(e))return e.map(Ss.materializeTree);{const r={};for(const n in e)r[n]=Ss.materializeTree(e[n]);return r}}sparqlJsonResultsToTree(e,r){return this.bindingsToTree(this.parser.parseJsonResults(e),r||{singularizeVariables:{}})}bindingsToTree(e,r){const n=r&&r.singularizeVariables[""];let a=n?{}:[];for(const s of e){const o=n?{}:[{}];for(const u in s){const c=u.split(this.delimiter),l=s[u];Ss.addValueToTree(n?o:o[0],c,l,"",r,this.delimiter)}a=Ss.mergeTrees(a,o).result}return this.materializeRdfJsTerms&&(a=Ss.materializeTree(a)),a}}Gg.Converter=Ss;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Gg,t)})(aM);Object.defineProperty(wp,"__esModule",{value:!0});wp.ActorQueryResultSerializeTree=void 0;const Ite=ls,Pte=rr,Dte=et,Nte=kt,Cte=aM;class oR extends Ite.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingsStreamToGraphQl(e,r,n){const a=Dte.ActionContext.ensureActionContext(r);return new Promise((s,o)=>{const u=[],c=new Cte.Converter(n),l={singularizeVariables:a.get(Pte.KeysInitQuery.graphqlSingularizeVariables)||{}};e.on("error",o),e.on("data",d=>{u.push(Object.fromEntries([...d].map(([f,h])=>[f.value,h])))}),e.on("end",()=>{s(c.bindingsToTree(u,l))})})}async testHandleChecked(e){if(e.type!=="bindings")throw new Error("This actor can only handle bindings streams.");return!0}async runHandle(e,r){const n=new Nte.Readable;n._read=()=>{};const a=e.bindingsStream;return a.on("error",s=>n.emit("error",s)),oR.bindingsStreamToGraphQl(a,e.context,{materializeRdfJsTerms:!0}).then(s=>{n.push(JSON.stringify(s,null," ")),n.push(null)}).catch(s=>n.emit("error",s)),{data:n}}}wp.ActorQueryResultSerializeTree=oR;(function(t){var e=m&&m.__createBinding||(Object.create?function(s,o,u,c){c===void 0&&(c=u);var l=Object.getOwnPropertyDescriptor(o,u);(!l||("get"in l?!o.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return o[u]}}),Object.defineProperty(s,c,l)}:function(s,o,u,c){c===void 0&&(c=u),s[c]=o[u]}),r=m&&m.__exportStar||function(s,o){for(var u in s)u!=="default"&&!Object.prototype.hasOwnProperty.call(o,u)&&e(o,s,u)};Object.defineProperty(t,"__esModule",{value:!0}),t.bindingsStreamToGraphQl=void 0;const n=wp,{bindingsStreamToGraphQl:a}=n.ActorQueryResultSerializeTree;t.bindingsStreamToGraphQl=a,r(wp,t)})(iM);var tc={},tm={};Object.defineProperty(tm,"__esModule",{value:!0});tm.MediatorCombineUnion=void 0;const jte=et;class Mte extends jte.Mediator{constructor(e){super(e),this.combiner=this.createCombiner()}async mediate(e){let r;try{r=this.publish(e)}catch{r=[]}await Promise.all(r.map(({reply:a})=>a));const n=await Promise.all(r.map(a=>a.actor.runObservable(e)));return this.combiner(n)}mediateWith(){throw new Error("Method not supported.")}createCombiner(){return e=>{const r={};return r[this.field]={},[{}].concat(e.map(n=>n[this.field])).forEach((n,a,s)=>{r[this.field]={...n,...r[this.field]}}),r}}}tm.MediatorCombineUnion=Mte;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(tm,t)})(tc);var _M={},rm={},nm={},im={},Bs={};Object.defineProperty(Bs,"__esModule",{value:!0});Bs.ActorDereferenceBase=Bs.isHardError=Bs.emptyReadable=void 0;const Fte=rr,Lte=et,Bte=kt;function gM(){const t=new Bte.Readable;return t.push(null),t}Bs.emptyReadable=gM;function mM(t){return!t.get(Fte.KeysInitQuery.lenient)}Bs.isHardError=mM;class $te extends Lte.Actor{constructor(e){super(e)}async dereferenceErrorHandler(e,r,n){if(mM(e.context))throw r;return this.logError(e.context,r.message),{...n,data:gM()}}}Bs.ActorDereferenceBase=$te;Object.defineProperty(im,"__esModule",{value:!0});im.ActorDereference=void 0;const Ute=Bs;class qte extends Ute.ActorDereferenceBase{constructor(e){super(e)}async handleDereferenceErrors(e,r,n,a=0){return this.dereferenceErrorHandler(e,r,{url:e.url,exists:!1,headers:n,requestTime:a})}}im.ActorDereference=qte;var Wd={};Object.defineProperty(Wd,"__esModule",{value:!0});Wd.ActorDereferenceParse=Wd.getMediaTypeFromExtension=void 0;const Vte=kt,DD=Bs;function vM(t,e){const r=t.lastIndexOf(".");return r>=0&&(e==null?void 0:e[t.slice(r+1)])||""}Wd.getMediaTypeFromExtension=vM;class Hte extends DD.ActorDereferenceBase{constructor(e){super(e)}async test(e){return!0}handleDereferenceStreamErrors(e,r){return(0,DD.isHardError)(e.context)||(r.on("error",n=>{this.logError(e.context,n.message,()=>({url:e.url})),r.push(null)}),r=r.pipe(new Vte.PassThrough({objectMode:!0}))),r}async run(e){var s,o;const{context:r}=e,n=await this.mediatorDereference.mediate({...e,mediaTypes:async()=>{var u,c;return(c=await((u=this.mediatorParseMediatypes)==null?void 0:u.mediate({context:r,mediaTypes:!0})))==null?void 0:c.mediaTypes}});let a;try{a=(await this.mediatorParse.mediate({context:r,handle:{context:r,...n,metadata:await this.getMetadata(n)},handleMediaType:n.mediaType||vM(n.url,this.mediaMappings)||e.mediaType})).handle,a.data=this.handleDereferenceStreamErrors(e,a.data)}catch(u){await((o=(s=n.data).close)==null?void 0:o.call(s)),a=await this.dereferenceErrorHandler(e,u,{})}return{...n,...a}}}Wd.ActorDereferenceParse=Hte;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(im,t),r(Wd,t),r(Bs,t)})(nm);Object.defineProperty(rm,"__esModule",{value:!0});rm.ActorDereferenceFallback=void 0;const kte=nm;class Qte extends kte.ActorDereference{constructor(e){super(e)}async test(e){return!0}async run(e){return this.handleDereferenceErrors(e,new Error(`Could not dereference '${e.url}'`))}}rm.ActorDereferenceFallback=Qte;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(rm,t)})(_M);var wM={},am={},SM={},sm={};Object.defineProperty(sm,"__esModule",{value:!0});sm.ActorRdfJoinEntriesSort=void 0;const Gte=et;class zte extends Gte.Actor{constructor(e){super(e)}}sm.ActorRdfJoinEntriesSort=zte;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(sm,t)})(SM);Object.defineProperty(am,"__esModule",{value:!0});am.ActorRdfJoinEntriesSortCardinality=void 0;const Wte=SM;class Xte extends Wte.ActorRdfJoinEntriesSort{constructor(e){super(e)}async test(e){return!0}async run(e){return{entries:[...e.entries].sort((n,a)=>n.metadata.cardinality.value-a.metadata.cardinality.value)}}}am.ActorRdfJoinEntriesSortCardinality=Xte;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(am,t)})(wM);var TM={},Xd={},EM={},om={};Object.defineProperty(om,"__esModule",{value:!0});om.ActorRdfJoinSelectivity=void 0;const Kte=et;class Jte extends Kte.Actor{constructor(e){super(e)}}om.ActorRdfJoinSelectivity=Jte;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(om,t)})(EM);Object.defineProperty(Xd,"__esModule",{value:!0});Xd.JoinTypes=Xd.ActorRdfJoinSelectivityVariableCounting=void 0;const Yte=EM,zy=xt;class wo extends Yte.ActorRdfJoinSelectivity{constructor(e){super(e)}async test(e){return{accuracy:.5}}static getPatternCost(e){let r=1;return e.subject.termType==="Variable"&&(r+=4),(e.predicate.termType==="Variable"||e.type===zy.Algebra.types.PATH)&&(r+=1),e.object.termType==="Variable"&&(r+=2),e.graph.termType==="Variable"&&(r+=1),r/9}static getJoinTypes(e,r){const n=[];return e.subject.termType==="Variable"?(e.subject.equals(r.subject)&&n.push(Ye.unboundSS),r.type==="pattern"&&e.subject.equals(r.predicate)&&n.push(Ye.unboundSP),e.subject.equals(r.object)&&n.push(Ye.unboundSO),e.subject.equals(r.graph)&&n.push(Ye.unboundSG)):(e.subject.equals(r.subject)&&n.push(Ye.boundSS),r.type==="pattern"&&e.subject.equals(r.predicate)&&n.push(Ye.boundSP),e.subject.equals(r.object)&&n.push(Ye.boundSO),e.subject.equals(r.graph)&&n.push(Ye.boundSG)),e.type==="pattern"&&(e.predicate.termType==="Variable"?(e.predicate.equals(r.subject)&&n.push(Ye.unboundPS),r.type==="pattern"&&e.predicate.equals(r.predicate)&&n.push(Ye.unboundPP),e.predicate.equals(r.object)&&n.push(Ye.unboundPO),e.predicate.equals(r.graph)&&n.push(Ye.unboundPG)):(e.predicate.equals(r.subject)&&n.push(Ye.boundPS),r.type==="pattern"&&e.predicate.equals(r.predicate)&&n.push(Ye.boundPP),e.predicate.equals(r.object)&&n.push(Ye.boundPO),e.predicate.equals(r.graph)&&n.push(Ye.boundPG))),e.object.termType==="Variable"?(e.object.equals(r.subject)&&n.push(Ye.unboundOS),r.type==="pattern"&&e.object.equals(r.predicate)&&n.push(Ye.unboundOP),e.object.equals(r.object)&&n.push(Ye.unboundOO),e.object.equals(r.graph)&&n.push(Ye.unboundOG)):(e.object.equals(r.subject)&&n.push(Ye.boundOS),r.type==="pattern"&&e.object.equals(r.predicate)&&n.push(Ye.boundOP),e.object.equals(r.object)&&n.push(Ye.boundOO),e.object.equals(r.graph)&&n.push(Ye.boundOG)),e.graph.termType==="Variable"?(e.graph.equals(r.subject)&&n.push(Ye.unboundGS),r.type==="pattern"&&e.graph.equals(r.predicate)&&n.push(Ye.unboundGP),e.graph.equals(r.object)&&n.push(Ye.unboundGO),e.graph.equals(r.graph)&&n.push(Ye.unboundGG)):(e.graph.equals(r.subject)&&n.push(Ye.boundGS),r.type==="pattern"&&e.graph.equals(r.predicate)&&n.push(Ye.boundGP),e.graph.equals(r.object)&&n.push(Ye.boundGO),e.graph.equals(r.graph)&&n.push(Ye.boundGG)),n}static getOperationsPairwiseJoinCost(e,r){let n=wo.MAX_PAIRWISE_COST;for(const a of wo.getJoinTypes(e,r))switch(a){case Ye.boundSS:n-=2*2;break;case Ye.boundSP:n-=3*2;break;case Ye.boundSO:n-=1*2;break;case Ye.boundSG:n-=3*2;break;case Ye.boundPS:n-=3*2;break;case Ye.boundPP:return 1;case Ye.boundPO:n-=3*2;break;case Ye.boundPG:n-=3*2;break;case Ye.boundOS:n-=1*2;break;case Ye.boundOP:n-=3*2;break;case Ye.boundOO:n-=1*2;break;case Ye.boundOG:n-=3*2;break;case Ye.boundGS:n-=3*2;break;case Ye.boundGP:n-=3*2;break;case Ye.boundGO:n-=3*2;break;case Ye.boundGG:n-=3*2;break;case Ye.unboundSS:n-=2;break;case Ye.unboundSP:n-=3;break;case Ye.unboundSO:n-=1;break;case Ye.unboundSG:n-=3;break;case Ye.unboundPS:n-=3;break;case Ye.unboundPP:n-=3;break;case Ye.unboundPO:n-=3;break;case Ye.unboundPG:n-=3;break;case Ye.unboundOS:n-=1;break;case Ye.unboundOP:n-=3;break;case Ye.unboundOO:n-=1;break;case Ye.unboundOG:n-=3;break;case Ye.unboundGS:n-=3;break;case Ye.unboundGP:n-=3;break;case Ye.unboundGO:n-=3;break;case Ye.unboundGG:n-=3;break}return n/wo.MAX_PAIRWISE_COST}static getOperationsJoinCost(e){const r=[];for(const s of e)zy.Util.recurseOperation(s,{[zy.Algebra.types.PATTERN](o){return r.push(o),!1},[zy.Algebra.types.PATH](o){return r.push(o),!1}});let n=0,a=0;for(const s of r)for(const o of r)s!==o&&(n+=wo.getOperationsPairwiseJoinCost(s,o),a++);return a===0?1:n/a*r.reduce((s,o)=>s*wo.getPatternCost(o),1)}async run(e){return e.entries.length<=1?{selectivity:1}:{selectivity:wo.getOperationsJoinCost(e.entries.map(r=>r.operation))}}}Xd.ActorRdfJoinSelectivityVariableCounting=wo;wo.MAX_PAIRWISE_COST=41*2;var Ye;(function(t){t[t.boundSS=0]="boundSS",t[t.boundSP=1]="boundSP",t[t.boundSO=2]="boundSO",t[t.boundSG=3]="boundSG",t[t.boundPS=4]="boundPS",t[t.boundPP=5]="boundPP",t[t.boundPO=6]="boundPO",t[t.boundPG=7]="boundPG",t[t.boundOS=8]="boundOS",t[t.boundOP=9]="boundOP",t[t.boundOO=10]="boundOO",t[t.boundOG=11]="boundOG",t[t.boundGS=12]="boundGS",t[t.boundGP=13]="boundGP",t[t.boundGO=14]="boundGO",t[t.boundGG=15]="boundGG",t[t.unboundSS=16]="unboundSS",t[t.unboundSP=17]="unboundSP",t[t.unboundSO=18]="unboundSO",t[t.unboundSG=19]="unboundSG",t[t.unboundPS=20]="unboundPS",t[t.unboundPP=21]="unboundPP",t[t.unboundPO=22]="unboundPO",t[t.unboundPG=23]="unboundPG",t[t.unboundOS=24]="unboundOS",t[t.unboundOP=25]="unboundOP",t[t.unboundOO=26]="unboundOO",t[t.unboundOG=27]="unboundOG",t[t.unboundGS=28]="unboundGS",t[t.unboundGP=29]="unboundGP",t[t.unboundGO=30]="unboundGO",t[t.unboundGG=31]="unboundGG"})(Ye||(Xd.JoinTypes=Ye={}));(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Xd,t)})(TM);var If={},um={};Object.defineProperty(um,"__esModule",{value:!0});um.MediatorNumber=void 0;const Zte=et;class ere extends Zte.Mediator{constructor(e){super(e),this.indexPicker=this.createIndexPicker()}createIndexPicker(){switch(this.type){case"min":return e=>e.reduce((r,n,a)=>{const s=this.getOrDefault(n[this.field],Number.POSITIVE_INFINITY);return s!==null&&(Number.isNaN(r[0])||r[0]>s)?[s,a]:r},[Number.NaN,-1])[1];case"max":return e=>e.reduce((r,n,a)=>{const s=this.getOrDefault(n[this.field],Number.NEGATIVE_INFINITY);return s!==null&&(Number.isNaN(r[0])||r[0]u);const a=[];if(this.ignoreErrors){const u={};u[this.field]=null,n=n.map(c=>c.catch(l=>(a.push(l),u)))}const s=await Promise.all(n),o=this.indexPicker(s);if(o<0)throw new Error(`All actors rejected their test in ${this.name} ${a.map(u=>u.message).join(` -`)}`);return r[o].actor}}um.MediatorNumber=ere;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(um,t)})(If);var OM={},cm={},uR={},lm={};Object.defineProperty(lm,"__esModule",{value:!0});lm.ActorRdfMetadata=void 0;const tre=et;class rre extends tre.Actor{constructor(e){super(e)}}lm.ActorRdfMetadata=rre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(lm,t)})(uR);Object.defineProperty(cm,"__esModule",{value:!0});cm.ActorRdfMetadataPrimaryTopic=void 0;const nre=uR,ND=kt;class ire extends nre.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 r=new ND.Readable({objectMode:!0}),n=new ND.Readable({objectMode:!0}),a=()=>{r._read=n._read=()=>{},e.quads.on("error",c=>{r.emit("error",c),n.emit("error",c)});const s={};let o;const u={};e.quads.on("data",c=>{c.predicate.value==="http://rdfs.org/ns/void#subset"&&c.object.value===e.url?o=c.subject.value:c.predicate.value==="http://xmlns.com/foaf/0.1/primaryTopic"&&(u[c.object.value]=c.subject.value);let l=s[c.graph.value];l||(l=s[c.graph.value]=[]),l.push(c)}),e.quads.on("end",()=>{const c=o?u[o]:void 0;for(const l in s)if(l===c){for(const d of s[l])n.push(d);if(this.metadataToData)for(const d of s[l])r.push(d)}else{for(const d of s[l])r.push(d);if(!c&&this.dataToMetadataOnInvalidMetadataGraph)for(const d of s[l])n.push(d)}r.push(null),n.push(null)})};return r._read=n._read=()=>{a()},{data:r,metadata:n}}}cm.ActorRdfMetadataPrimaryTopic=ire;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(cm,t)})(OM);var AM={},dm={};Object.defineProperty(dm,"__esModule",{value:!0});dm.ActorRdfMetadataAll=void 0;const are=uR,CD=kt;class sre extends are.ActorRdfMetadata{constructor(e){super(e)}async test(e){return!0}async run(e){const r=new CD.Readable({objectMode:!0}),n=new CD.Readable({objectMode:!0});e.quads.on("error",s=>{r.emit("error",s),n.emit("error",s)});const a=()=>{r._read=n._read=()=>{},e.quads.on("data",s=>{r.push(s),n.push(s)}),e.quads.on("end",()=>{r.push(null),n.push(null)})};return r._read=n._read=()=>{a()},{data:r,metadata:n}}}dm.ActorRdfMetadataAll=sre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(dm,t)})(AM);var RM={},fm={},_0={},hm={};Object.defineProperty(hm,"__esModule",{value:!0});hm.ActorRdfMetadataAccumulate=void 0;const ore=et;class ure extends ore.Actor{constructor(e){super(e)}}hm.ActorRdfMetadataAccumulate=ure;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(hm,t)})(_0);Object.defineProperty(fm,"__esModule",{value:!0});fm.ActorRdfMetadataAccumulateCanContainUndefs=void 0;const cre=_0;class lre extends cre.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){if(e.mode==="initialize")return{metadata:{canContainUndefs:!1}};let r=e.accumulatedMetadata.canContainUndefs;return e.appendingMetadata.canContainUndefs&&(r=!0),{metadata:{canContainUndefs:r}}}}fm.ActorRdfMetadataAccumulateCanContainUndefs=lre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(fm,t)})(RM);var xM={},pm={};Object.defineProperty(pm,"__esModule",{value:!0});pm.ActorRdfMetadataAccumulateCardinality=void 0;const dre=_0;class fre extends dre.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){if(e.mode==="initialize")return{metadata:{cardinality:{type:"exact",value:0}}};const r={...e.accumulatedMetadata.cardinality};if(r.dataset)if(e.appendingMetadata.cardinality.dataset){if(r.dataset!==e.appendingMetadata.cardinality.dataset&&e.appendingMetadata.subsetOf===r.dataset)return{metadata:{cardinality:e.appendingMetadata.cardinality}};if(r.dataset!==e.appendingMetadata.cardinality.dataset)delete r.dataset;else return{metadata:{cardinality:r}}}else return{metadata:{cardinality:r}};return!e.appendingMetadata.cardinality||!Number.isFinite(e.appendingMetadata.cardinality.value)?(r.type="estimate",r.value=Number.POSITIVE_INFINITY):(e.appendingMetadata.cardinality.type==="estimate"&&(r.type="estimate"),r.value+=e.appendingMetadata.cardinality.value),{metadata:{cardinality:r}}}}pm.ActorRdfMetadataAccumulateCardinality=fre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(pm,t)})(xM);var IM={},ym={};Object.defineProperty(ym,"__esModule",{value:!0});ym.ActorRdfMetadataAccumulatePageSize=void 0;const hre=_0;class pre extends hre.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){return e.mode==="initialize"?{metadata:{}}:{metadata:{..."pageSize"in e.accumulatedMetadata||"pageSize"in e.appendingMetadata?{pageSize:(e.accumulatedMetadata.pageSize||0)+(e.appendingMetadata.pageSize||0)}:{}}}}}ym.ActorRdfMetadataAccumulatePageSize=pre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(ym,t)})(IM);var PM={},bm={};Object.defineProperty(bm,"__esModule",{value:!0});bm.ActorRdfMetadataAccumulateRequestTime=void 0;const yre=_0;class bre extends yre.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){return e.mode==="initialize"?{metadata:{}}:{metadata:{..."requestTime"in e.accumulatedMetadata||"requestTime"in e.appendingMetadata?{requestTime:(e.accumulatedMetadata.requestTime||0)+(e.appendingMetadata.requestTime||0)}:{}}}}}bm.ActorRdfMetadataAccumulateRequestTime=bre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(bm,t)})(PM);var DM={},_m={},Jo={},gm={};Object.defineProperty(gm,"__esModule",{value:!0});gm.ActorRdfMetadataExtract=void 0;const _re=et;class gre extends _re.Actor{constructor(e){super(e)}}gm.ActorRdfMetadataExtract=gre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(gm,t)})(Jo);var NM={exports:{}};(function(t){(function(e){var r=function(){function b(_){this.options=_}return b.prototype.toString=function(){return JSON&&JSON.stringify?JSON.stringify(this.options):this.options},b}(),n=function(){function b(U){return Object.prototype.toString.apply(U)==="[object Array]"}function _(U){return Object.prototype.toString.apply(U)==="[object String]"}function E(U){return Object.prototype.toString.apply(U)==="[object Number]"}function w(U){return Object.prototype.toString.apply(U)==="[object Boolean]"}function O(U,H){var N="",x=!0,F;for(F=0;F="a"&&w<="z"||w>="A"&&w<="Z"}function _(w){return w>="0"&&w<="9"}function E(w){return _(w)||w>="a"&&w<="f"||w>="A"&&w<="F"}return{isAlpha:b,isDigit:_,isHexDigit:E}}(),s=function(){var b={encode:function(T){return unescape(encodeURIComponent(T))},numBytes:function(T){return T<=127?1:194<=T&&T<=223?2:224<=T&&T<=239?3:240<=T&&T<=244?4:0},isValidFollowingCharCode:function(T){return 128<=T&&T<=191}};function _(T){var I="",D=b.encode(T),U,H;for(H=0;H1||o.isReserved(T)||o.isUnreserved(T)?T:s.encodeCharacter(T)}function w(O){var A="",T,I="";for(T=0;T1?A+=I:A+=o.isReserved(I)||o.isUnreserved(I)?I:s.encodeCharacter(I);return A}return{encode:b,encodePassReserved:_,encodeLiteral:w,encodeLiteralCharacter:E}}(),c=function(){var b={};function _(E){b[E]={symbol:E,separator:E==="?"?"&":E===""||E==="+"||E==="#"?",":E,named:E===";"||E==="&"||E==="?",ifEmpty:E==="&"||E==="?"?"=":"",first:E==="+"?"":E,encode:E==="+"||E==="#"?u.encodePassReserved:u.encode,toString:function(){return this.symbol}}}return _(""),_("+"),_("#"),_("."),_("/"),_(";"),_("?"),_("&"),{valueOf:function(E){return b[E]?b[E]:"=,!@|".indexOf(E)>=0?null:b[""]}}}();function l(b){var _;if(b==null)return!1;if(n.isArray(b))return b.length>0;if(typeof b=="string"||typeof b=="number"||typeof b=="boolean")return!0;for(_ in b)if(b.hasOwnProperty(_)&&l(b[_]))return!0;return!1}var d=function(){function b(_){this.literal=u.encodeLiteral(_)}return b.prototype.expand=function(){return this.literal},b.prototype.toString=b.prototype.expand,b}(),f=function(){function b(E){var w,O=[],A=null,T=null,I=null,D,U="";function H(){var x=E.substring(T,D);if(x.length===0)throw new r({expressionText:E,message:"a varname must be specified",position:D});A={varname:x,exploded:!1,maxLength:null},T=null}function N(){if(I===D)throw new r({expressionText:E,message:"after a ':' you have to specify the length",position:D});A.maxLength=parseInt(E.substring(I,D),10),I=null}for(w=function(x){var F=c.valueOf(x);if(F===null)throw new r({expressionText:E,message:"illegal use of reserved operator",position:D,operator:x});return F}(E.charAt(0)),D=w.symbol.length,T=D;D=4)throw new r({expressionText:E,message:"A :prefix must have max 4 digits",position:D});continue}N()}if(U===":"){if(A.maxLength!==null)throw new r({expressionText:E,message:"only one :maxLength is allowed per varspec",position:D});if(A.exploded)throw new r({expressionText:E,message:"an exploeded varspec MUST NOT be varspeced",position:D});I=D+1;continue}if(U==="*"){if(A===null)throw new r({expressionText:E,message:"exploded without varspec",position:D});if(A.exploded)throw new r({expressionText:E,message:"exploded twice",position:D});if(A.maxLength)throw new r({expressionText:E,message:"an explode (*) MUST NOT follow to a prefix",position:D});A.exploded=!0;continue}if(U===","){O.push(A),A=null,T=D+1;continue}throw new r({expressionText:E,message:"illegal character",character:U,position:D})}return T!==null&&H(),I!==null&&N(),O.push(A),new h(E,w,O)}function _(E){var w,O,A=[],T=null,I=0;for(w=0;w{const a=r[n]||r[`${n}Page`],s=a&&a[e];return[n,s&&s.length>0?s[0]:null]}))}parseUriTemplateCached(e){const r=this.parsedUriTemplateCache[e];return r||(this.parsedUriTemplateCache[e]=(0,wre.parse)(e))}getSearchForms(e){const r=e.search,n=[];if(r)for(const a in r)for(const s of r[a]){const o=(e.template||{})[s]||[];if(o.length!==1)throw new Error(`Expected 1 hydra:template for ${s}`);const u=o[0],c=this.parseUriTemplateCached(u),l=Object.fromEntries(((e.mapping||{})[s]||[]).map(f=>{const h=((e.variable||{})[f]||[])[0],p=((e.property||{})[f]||[])[0];if(!h)throw new Error(`Expected a hydra:variable for ${f}`);if(!p)throw new Error(`Expected a hydra:property for ${f}`);return[p,h]})),d=f=>c.expand(Object.fromEntries(Object.keys(f).map(h=>[l[h],f[h]])));n.push({dataset:a,template:u,mappings:l,getUri:d})}return{values:n}}getHydraProperties(e){return new Promise((r,n)=>{e.on("error",n);const a={};e.on("data",s=>{if(s.predicate.value.startsWith(Jc.HYDRA)){const o=s.predicate.value.slice(Jc.HYDRA.length),u=a[o]||(a[o]={});(u[s.subject.value]||(u[s.subject.value]=[])).push(s.object.value)}}),e.on("end",()=>r(a))})}async run(e){const r={},n=await this.getHydraProperties(e.metadata);return Object.assign(r,this.getLinks(e.url,n)),r.searchForms=this.getSearchForms(n),{metadata:r}}}_m.ActorRdfMetadataExtractHydraControls=Jc;Jc.HYDRA="http://www.w3.org/ns/hydra/core#";Jc.LINK_TYPES=["first","next","previous","last"];(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(_m,t)})(DM);var CM={},mm={};Object.defineProperty(mm,"__esModule",{value:!0});mm.ActorRdfMetadataExtractHydraCount=void 0;const Sre=Jo;class Tre extends Sre.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}run(e){return new Promise((r,n)=>{e.metadata.on("error",n),e.metadata.on("data",a=>{this.predicates.includes(a.predicate.value)&&r({metadata:{cardinality:{type:"estimate",value:Number.parseInt(a.object.value,10),dataset:a.subject.value}}})}),e.metadata.on("end",()=>{r({metadata:{cardinality:{type:"estimate",value:0}}})})})}}mm.ActorRdfMetadataExtractHydraCount=Tre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(mm,t)})(CM);var jM={},vm={};Object.defineProperty(vm,"__esModule",{value:!0});vm.ActorRdfMetadataExtractHydraPagesize=void 0;const Ere=Jo;class Ore extends Ere.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return new Promise((r,n)=>{e.metadata.on("error",n),e.metadata.on("data",a=>{this.predicates.includes(a.predicate.value)&&r({metadata:{pageSize:Number.parseInt(a.object.value,10)}})}),e.metadata.on("end",()=>{r({metadata:{}})})})}}vm.ActorRdfMetadataExtractHydraPagesize=Ore;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(vm,t)})(jM);var MM={},wm={};Object.defineProperty(wm,"__esModule",{value:!0});wm.ActorRdfMetadataExtractRequestTime=void 0;const Are=Jo;class Rre extends Are.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return{metadata:{requestTime:e.requestTime}}}}wm.ActorRdfMetadataExtractRequestTime=Rre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(wm,t)})(MM);var FM={},Sm={};Object.defineProperty(Sm,"__esModule",{value:!0});Sm.ActorRdfMetadataExtractAllowHttpMethods=void 0;const xre=Jo;class Ire extends xre.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){var n,a;const r={};return(n=e.headers)!=null&&n.get("allow")&&(r.allowHttpMethods=(a=e.headers.get("allow"))==null?void 0:a.split(/, */u)),{metadata:r}}}Sm.ActorRdfMetadataExtractAllowHttpMethods=Ire;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Sm,t)})(FM);var LM={},Tm={};Object.defineProperty(Tm,"__esModule",{value:!0});Tm.ActorRdfMetadataExtractPutAccepted=void 0;const Pre=Jo;class Dre extends Pre.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){var n,a;const r={};return(n=e.headers)!=null&&n.get("accept-put")&&(r.putAccepted=(a=e.headers.get("accept-put"))==null?void 0:a.split(/, */u)),{metadata:r}}}Tm.ActorRdfMetadataExtractPutAccepted=Dre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Tm,t)})(LM);var BM={},Em={};Object.defineProperty(Em,"__esModule",{value:!0});Em.ActorRdfMetadataExtractPatchSparqlUpdate=void 0;const Nre=Jo;class Cre extends Nre.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){var n,a,s,o;const r={};return((a=(n=e.headers)==null?void 0:n.get("accept-patch"))!=null&&a.includes("application/sparql-update")||(o=(s=e.headers)==null?void 0:s.get("ms-author-via"))!=null&&o.includes("SPARQL"))&&(r.patchSparqlUpdate=!0),{metadata:r}}}Em.ActorRdfMetadataExtractPatchSparqlUpdate=Cre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Em,t)})(BM);var $M={},Om={};Object.defineProperty(Om,"__esModule",{value:!0});Om.ActorRdfMetadataExtractSparqlService=void 0;const jre=Jo,Mre=Ra;class Fre extends jre.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return new Promise((r,n)=>{e.metadata.on("error",n);const a={};e.metadata.on("data",s=>{s.predicate.value==="http://www.w3.org/ns/sparql-service-description#endpoint"&&(s.subject.termType==="BlankNode"||s.subject.value===e.url)?(a.sparqlService=s.object.termType==="Literal"?(0,Mre.resolve)(s.object.value,e.url):s.object.value,this.inferHttpsEndpoint&&e.url.startsWith("https")&&!a.sparqlService.startsWith("https")&&(a.sparqlService=a.sparqlService.replace("http:","https:"))):s.predicate.value==="http://www.w3.org/ns/sparql-service-description#defaultGraph"&&(a.defaultGraph=s.object.value)}),e.metadata.on("end",()=>{r({metadata:a})})})}}Om.ActorRdfMetadataExtractSparqlService=Fre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Om,t)})($M);var UM={},Am={},ml={},Rm={};Object.defineProperty(Rm,"__esModule",{value:!0});Rm.ActorRdfParse=void 0;const Lre=bl;class Bre extends Lre.ActorAbstractMediaTyped{constructor(e){super(e)}}Rm.ActorRdfParse=Bre;var xm={};Object.defineProperty(xm,"__esModule",{value:!0});xm.ActorRdfParseFixedMediaTypes=void 0;const $re=bl;class Ure extends $re.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e){return!0}}xm.ActorRdfParseFixedMediaTypes=Ure;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Rm,t),r(xm,t)})(ml);const Qf="http://www.w3.org/1999/02/22-rdf-syntax-ns#",Gf="http://www.w3.org/2001/XMLSchema#",FS="http://www.w3.org/2000/10/swap/",Wn={xsd:{decimal:`${Gf}decimal`,boolean:`${Gf}boolean`,double:`${Gf}double`,integer:`${Gf}integer`,string:`${Gf}string`},rdf:{type:`${Qf}type`,nil:`${Qf}nil`,first:`${Qf}first`,rest:`${Qf}rest`,langString:`${Qf}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${FS}reify#forSome`,forAll:`${FS}reify#forAll`},log:{implies:`${FS}log#implies`}};/*! queue-microtask. MIT License. Feross Aboukhadijeh */let jD;var qre=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:m):t=>(jD||(jD=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0));const Vre=CV(qre),{xsd:zy}=Wn,Hre=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,MD={"\\":"\\","'":"'",'"':'"',n:` -`,r:"\r",t:" ",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},kre=/[\x00-\x20<>\\"\{\}\|\^\`]/,Qre={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},Gre=/$0^/;class cR{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 r in this)!(r in Qre)&&this[r]instanceof RegExp&&(this[r]=Gre)}else this._n3Mode=e.n3!==!1;this._comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,r){let n=this._input,a=n.length;for(;;){let u,c;for(;u=this._newline.exec(n);)this._comments&&(c=this._comment.exec(u[0]))&&s("comment",c[1],"",this._line,u[0].length),n=n.substr(u[0].length,n.length),a=n.length,this._line++;if(!u&&(u=this._whitespace.exec(n))&&(n=n.substr(u[0].length,n.length)),this._endOfFile.test(n))return r&&(this._comments&&(c=this._comment.exec(n))&&s("comment",c[1],"",this._line,n.length),n=null,s("eof","","",this._line,0)),this._input=n;const l=this._line,d=n[0];let f="",h="",p="",b=null,_=0,E=!1;switch(d){case"^":if(n.length<3)break;if(n[1]==="^"){if(this._previousMarker="^^",n=n.substr(2),n[0]!=="<"){E=!0;break}}else{this._n3Mode&&(_=1,f="^");break}case"<":if(b=this._unescapedIri.exec(n))f="IRI",h=b[1];else if(b=this._iri.exec(n)){if(h=this._unescape(b[1]),h===null||kre.test(h))return o(this);f="IRI"}else n.length>1&&n[1]==="<"?(f="<<",_=2):this._n3Mode&&n.length>1&&n[1]==="="&&(f="inverse",_=2,h=">");break;case">":n.length>1&&n[1]===">"&&(f=">>",_=2);break;case"_":((b=this._blank.exec(n))||r&&(b=this._blank.exec(`${n} `)))&&(f="blank",p="_",h=b[1]);break;case'"':if(b=this._simpleQuotedString.exec(n))h=b[1];else if({value:h,matchLength:_}=this._parseLiteral(n),h===null)return o(this);(b!==null||_!==0)&&(f="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(b=this._simpleApostropheString.exec(n))h=b[1];else if({value:h,matchLength:_}=this._parseLiteral(n),h===null)return o(this);(b!==null||_!==0)&&(f="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(b=this._variable.exec(n))&&(f="var",h=b[0]);break;case"@":this._previousMarker==="literal"&&(b=this._langcode.exec(n))?(f="langcode",h=b[1]):(b=this._keyword.exec(n))&&(f=b[0]);break;case".":if(n.length===1?r:n[1]<"0"||n[1]>"9"){f=".",_=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(b=this._number.exec(n)||r&&(b=this._number.exec(`${n} `)))&&(f="literal",h=b[0],p=typeof b[1]=="string"?zy.double:typeof b[2]=="string"?zy.decimal:zy.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(b=this._sparqlKeyword.exec(n))?f=b[0].toUpperCase():E=!0;break;case"f":case"t":(b=this._boolean.exec(n))?(f="literal",h=b[0],p=zy.boolean):E=!0;break;case"a":(b=this._shortPredicates.exec(n))?(f="abbreviation",h="a"):E=!0;break;case"=":this._n3Mode&&n.length>1&&(f="abbreviation",n[1]!==">"?(_=1,h="="):(_=2,h=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"}":this._lineMode||(_=1,f=d);break;case"{":!this._lineMode&&n.length>=2&&(n[1]==="|"?(f="{|",_=2):(f=d,_=1));break;case"|":n.length>=2&&n[1]==="}"&&(f="|}",_=2);break;default:E=!0}if(E&&((this._previousMarker==="@prefix"||this._previousMarker==="PREFIX")&&(b=this._prefix.exec(n))?(f="prefix",h=b[1]||""):((b=this._prefixed.exec(n))||r&&(b=this._prefixed.exec(`${n} `)))&&(f="prefixed",p=b[1]||"",h=this._unescape(b[2]))),this._previousMarker==="^^")switch(f){case"prefixed":f="type";break;case"IRI":f="typeIRI";break;default:f=""}if(!f)return r||!/^'''|^"""/.test(n)&&/\n|\r/.test(n)?o(this):this._input=n;const w=_||b[0].length,O=s(f,h,p,l,w);this.previousToken=O,this._previousMarker=f,n=n.substr(w,n.length)}function s(u,c,l,d,f){const h=n?a-n.length:a,p=h+f,b={type:u,value:c,prefix:l,line:d,start:h,end:p};return e(null,b),b}function o(u){e(u._syntaxError(/^\S*/.exec(n)[0]))}}_unescape(e){let r=!1;const n=e.replace(Hre,(a,s,o,u)=>{if(typeof s=="string")return String.fromCharCode(Number.parseInt(s,16));if(typeof o=="string"){let c=Number.parseInt(o,16);return c<=65535?String.fromCharCode(Number.parseInt(o,16)):String.fromCharCode(55296+((c-=65536)>>10),56320+(c&1023))}return u in MD?MD[u]:(r=!0,"")});return r?null:n}_parseLiteral(e){if(e.length>=3){const r=e.match(/^(?:"""|"|'''|'|)/)[0],n=r.length;let a=Math.max(this._literalClosingPos,n);for(;(a=e.indexOf(r,a))>0;){let s=0;for(;e[a-s-1]==="\\";)s++;if(s%2===0){const o=e.substring(n,a),u=o.split(/\r\n|\r|\n/).length-1,c=a+n;if(n===1&&u!==0||n===3&&this._lineMode)break;return this._line+=u,{value:this._unescape(o),matchLength:c}}a++}this._literalClosingPos=e.length-n+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const r=new Error(`Unexpected "${e}" on line ${this._line}.`);return r.context={token:void 0,line:this._line,previousToken:this.previousToken},r}_readStartingBom(e){return e.startsWith("\uFEFF")?e.substr(1):e}tokenize(e,r){if(this._line=1,typeof e=="string")if(this._input=this._readStartingBom(e),typeof r=="function")Vre(()=>this._tokenizeToEnd(r,!0));else{const n=[];let a;if(this._tokenizeToEnd((s,o)=>s?a=s:n.push(o),!0),a)throw a;return n}else this._pendingBuffer=null,typeof e.setEncoding=="function"&&e.setEncoding("utf8"),e.on("data",n=>{this._input!==null&&n.length!==0&&(this._pendingBuffer&&(n=Buffer.concat([this._pendingBuffer,n]),this._pendingBuffer=null),n[n.length-1]&128?this._pendingBuffer=n:(typeof this._input>"u"?this._input=this._readStartingBom(typeof n=="string"?n:n.toString()):this._input+=n,this._tokenizeToEnd(r,!1)))}),e.on("end",()=>{typeof this._input=="string"&&this._tokenizeToEnd(r,!0)}),e.on("error",r)}}function zre(t){return!!t&&t.termType==="NamedNode"}function Wre(t){return!!t&&t.termType==="BlankNode"}function Xre(t){return!!t&&t.termType==="Literal"}function Kre(t){return!!t&&t.termType==="Variable"}function Kd(t){return!!t&&t.termType==="DefaultGraph"}function Jre(t){return Kd(t.graph)}function Yre(t,e){return qM({"":t.value||t},e)("")}function qM(t,e){const r=Object.create(null);for(const a in t)n(a,t[a]);e=e||Pf;function n(a,s){if(typeof s=="string"){const o=Object.create(null);r[a]=u=>o[u]||(o[u]=e.namedNode(s+u))}else if(!(a in r))throw new Error(`Unknown prefix: ${a}`);return r[a]}return n}const VM=Object.freeze(Object.defineProperty({__proto__:null,inDefaultGraph:Jre,isBlankNode:Wre,isDefaultGraph:Kd,isLiteral:Xre,isNamedNode:zre,isVariable:Kre,prefix:Yre,prefixes:qM},Symbol.toStringTag,{value:"Module"})),{rdf:Zre,xsd:$c}=Wn;let g0,ene=0;const KE={namedNode:tne,blankNode:rne,variable:ine,literal:nne,defaultGraph:ane,quad:FD,triple:FD},Pf=KE;let Ys=class HM{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof HM?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 Im extends Ys{get termType(){return"NamedNode"}}class Bu extends Ys{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let r=e.lastIndexOf('"')+1;return r0?"INF":"-INF")))),r===""||r===$c.string?new Bu(`"${t}"`):new Bu(`"${t}"^^${r}`)}function ine(t){return new dR(t)}function ane(){return g0}function FD(t,e,r,n){return new wp(t,e,r,n)}let LD=0;class Pm{constructor(e){this._contextStack=[],this._graph=null,e=e||{},this._setBase(e.baseIRI),e.factory&&kM(this,e.factory);const r=typeof e.format=="string"?e.format.match(/\w*$/)[0].toLowerCase():"",n=/turtle/.test(r),a=/trig/.test(r),s=/triple/.test(r),o=/quad/.test(r),u=this._n3Mode=/n3/.test(r),c=s||o;(this._supportsNamedGraphs=!(n||u))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(n||a||s||u),this._supportsRDFStar=r===""||/star|\*$/.test(r),c&&(this._resolveRelativeIRI=l=>null),this._blankNodePrefix=typeof e.blankNodePrefix!="string"?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new cR({lineMode:c,n3:u}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){LD=0}_setBase(e){if(!e)this._base="",this._basePath="";else{const r=e.indexOf("#");r>=0&&(e=e.substr(0,r)),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]}}_saveContext(e,r,n,a,s){const o=this._n3Mode;this._contextStack.push({type:e,subject:n,predicate:a,object:s,graph:r,inverse:o?this._inversePredicate:!1,blankPrefix:o?this._prefixes._:"",quantified:o?this._quantified:null}),o&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(e,r){const n=this._contextStack.pop();if(!n||n.type!==e)return this._error(`Unexpected ${r.type}`,r);this._subject=n.subject,this._predicate=n.predicate,this._object=n.object,this._graph=n.graph,this._n3Mode&&(this._inversePredicate=n.inverse,this._prefixes._=n.blankPrefix,this._quantified=n.quantified)}_readInTopContext(e){switch(e.type){case"eof":return this._graph!==null?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,r){let n;switch(e.type){case"IRI":case"typeIRI":const a=this._resolveIRI(e.value);if(a===null)return this._error("Invalid IRI",e);n=this._namedNode(a);break;case"type":case"prefixed":const s=this._prefixes[e.prefix];if(s===void 0)return this._error(`Undefined prefix "${e.prefix}:"`,e);n=this._namedNode(s+e.value);break;case"blank":n=this._blankNode(this._prefixes[e.prefix]+e.value);break;case"var":n=this._variable(e.value.substr(1));break;default:return this._error(`Expected entity but got ${e.type}`,e)}return!r&&this._n3Mode&&n.id in this._quantified&&(n=this._quantified[n.id]),n}_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(e.prefix.length===0)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((this._subject=this._readEntity(e))===void 0)return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const r=e.type;switch(r){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":return this._predicate===null?this._error(`Unexpected ${r}`,e):(this._subject=null,r==="]"?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return this._predicate!==null?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((this._predicate=this._readEntity(e))===void 0)return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(e.prefix.length===0)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((this._object=this._readEntity(e))===void 0)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);this._subject!==null&&this._emit(this._subject,this._predicate,this._object,this._graph);const r=this._predicate===null;return this._restoreContext("blank",e),this._object!==null?this._getContextEndReader():this._predicate!==null?this._readObject:r?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 r=null,n=null,a=this._readListItem;const s=this._subject,o=this._contextStack,u=o[o.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,n=this._blankNode(),this.RDF_FIRST,this._subject=r=this._blankNode()),a=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,n=this._blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",e),o.length!==0&&o[o.length-1].type==="list"&&this._emit(this._subject,this._predicate,this._object,this._graph),this._predicate===null){if(a=this._readPredicate,this._subject===this.RDF_NIL)return a}else if(a=this._getContextEndReader(),this._object===this.RDF_NIL)return a;n=this.RDF_NIL;break;case"literal":e.prefix.length===0?(this._literalValue=e.value,a=this._readListItemDataTypeOrLang):(r=this._literal(e.value,this._namedNode(e.prefix)),a=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((r=this._readEntity(e))===void 0)return}if(n===null&&(this._subject=n=this._blankNode()),s===null?u.predicate===null?u.subject=n:u.object=n:this._emit(s,this.RDF_REST,n,this._graph),r!==null){if(this._n3Mode&&(e.type==="IRI"||e.type==="prefixed"))return this._saveContext("item",this._graph,n,this.RDF_FIRST,r),this._subject=r,this._predicate=null,this._getPathReader(this._readListItem);this._emit(n,this.RDF_FIRST,r,this._graph)}return a}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let r=this._literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const n=this._readEntity(e);if(n===void 0)return;r=this._literal(this._literalValue,n),e=null;break;case"langcode":r=this._literal(this._literalValue,e.value),e=null;break}return{token:e,literal:r}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,r){const n=this._completeLiteral(e);if(n)return this._object=n.literal,r&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),n.token===null?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(n.token))}_readFormulaTail(e){return e.type!=="}"?this._readPunctuation(e):(this._subject!==null&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",e),this._object===null?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let r,n=this._graph;const a=this._subject,s=this._inversePredicate;switch(e.type){case"}":if(this._graph===null)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,r=this._contextStack.length?this._readSubject:this._readInTopContext,s&&(this._inversePredicate=!1);break;case";":r=this._readPredicate;break;case",":r=this._readObject;break;case"{|":if(!this._supportsRDFStar)return this._error("Unexpected RDF* syntax",e);const o=this._predicate,u=this._object;this._subject=this._quad(a,o,u,this.DEFAULTGRAPH),r=this._readPredicate;break;case"|}":if(this._subject.termType!=="Quad")return this._error("Unexpected asserted triple closing",e);this._subject=null,r=this._readPunctuation;break;default:if(this._supportsQuads&&this._graph===null&&(n=this._readEntity(e))!==void 0){r=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(a!==null){const o=this._predicate,u=this._object;s?this._emit(u,o,a,n):this._emit(a,o,u,n)}return r}_readBlankNodePunctuation(e){let r;switch(e.type){case";":r=this._readPredicate;break;case",":r=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),r}_readQuadPunctuation(e){return e.type!=="."?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return e.type!=="prefix"?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if(e.type!=="IRI")return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const r=this._readEntity(e);return this._prefixes[this._prefix]=r.value,this._prefixCallback(this._prefix,r),this._readDeclarationPunctuation}_readBaseIRI(e){const r=e.type==="IRI"&&this._resolveIRI(e.value);return r?(this._setBase(r),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 r;switch(e.type){case"IRI":case"prefixed":if((r=this._readEntity(e,!0))!==void 0)break;default:return this._error(`Unexpected ${e.type}`,e)}return this._explicitQuantifiers?(this._subject===null?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,r,this.QUANTIFIERS_GRAPH)):this._quantified[r.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 r=this._contextStack,n=r.length&&r[r.length-1];if(n&&n.type==="item"){const a=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,a,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let r,n;const a=this._blankNode();if((n=this._readEntity(e))!==void 0)return this._predicate===null?(r=this._subject,this._subject=a):(r=this._object,this._object=a),this._emit(r,n,a,this._graph),this._readPath}_readBackwardPath(e){const r=this._blankNode();let n,a;if((n=this._readEntity(e))!==void 0)return this._predicate===null?(a=this._subject,this._subject=r):(a=this._object,this._object=r),this._emit(r,n,a,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return e.type!==">>"?this._supportsQuads&&this._graph===null&&(this._graph=this._readEntity(e))!==void 0?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 r=this._quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<",e),this._subject===null?(this._subject=r,this._readPredicate):(this._object=r,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,r,n,a){this._callback(null,this._quad(e,r,n,a||this.DEFAULTGRAPH))}_error(e,r){const n=new Error(`${e} on line ${r.line}.`);n.context={token:r,line:r.line,previousToken:this._lexer.previousToken},this._callback(n),this._callback=LS}_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 r=e.length;let n="",a=-1,s=-1,o=0,u="/";for(;a=s&&(n=n.substr(0,o)),u!=="/")return`${n}/${e.substr(a+1)}`;o=a+1}}}u=e[++a]}return n+e.substring(o)}parse(e,r,n){if(this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${LD++}_`,this._prefixCallback=n||LS,this._inversePredicate=!1,this._quantified=Object.create(null),!r){const a=[];let s;if(this._callback=(o,u)=>{o?s=o:u&&a.push(u)},this._lexer.tokenize(e).every(o=>this._readCallback=this._readCallback(o)),s)throw s;return a}this._callback=r,this._lexer.tokenize(e,(a,s)=>{a!==null?(this._callback(a),this._callback=LS):this._readCallback&&(this._readCallback=this._readCallback(s))})}}function LS(){}function kM(t,e){const r=e.namedNode;t._namedNode=r,t._blankNode=e.blankNode,t._literal=e.literal,t._variable=e.variable,t._quad=e.quad,t.DEFAULTGRAPH=e.defaultGraph(),t.RDF_FIRST=r(Wn.rdf.first),t.RDF_REST=r(Wn.rdf.rest),t.RDF_NIL=r(Wn.rdf.nil),t.N3_FORALL=r(Wn.r.forAll),t.N3_FORSOME=r(Wn.r.forSome),t.ABBREVIATIONS={a:r(Wn.rdf.type),"=":r(Wn.owl.sameAs),">":r(Wn.log.implies)},t.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}kM(Pm.prototype,Pf);const zf=Pf.defaultGraph(),{rdf:sne,xsd:Hl}=Wn,BD=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,$D=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,one={"\\":"\\\\",'"':'\\"'," ":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class Wf extends Ys{equals(e){return e===this}}class hR{constructor(e,r){if(this._prefixRegex=/$0^/,e&&typeof e.write!="function"&&(r=e,e=null),r=r||{},this._lists=r.lists,e)this._outputStream=e,this._endStream=r.end===void 0?!0:!!r.end;else{let n="";this._outputStream={write(a,s,o){n+=a,o&&o()},end:a=>{a&&a(null,n)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(r.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=zf,this._prefixIRIs=Object.create(null),r.prefixes&&this.addPrefixes(r.prefixes),r.baseIRI&&(this._baseMatcher=new RegExp(`^${qD(r.baseIRI)}${r.baseIRI.endsWith("/")?"":"[#?]"}`),this._baseLength=r.baseIRI.length))}get _inDefaultGraph(){return zf.equals(this._graph)}_write(e,r){this._outputStream.write(e,"utf8",r)}_writeQuad(e,r,n,a,s){try{a.equals(this._graph)||(this._write((this._subject===null?"":this._inDefaultGraph?`. +`)}`);return r[o].actor}}um.MediatorNumber=ere;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(um,t)})(If);var OM={},cm={},uR={},lm={};Object.defineProperty(lm,"__esModule",{value:!0});lm.ActorRdfMetadata=void 0;const tre=et;class rre extends tre.Actor{constructor(e){super(e)}}lm.ActorRdfMetadata=rre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(lm,t)})(uR);Object.defineProperty(cm,"__esModule",{value:!0});cm.ActorRdfMetadataPrimaryTopic=void 0;const nre=uR,ND=kt;class ire extends nre.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 r=new ND.Readable({objectMode:!0}),n=new ND.Readable({objectMode:!0}),a=()=>{r._read=n._read=()=>{},e.quads.on("error",c=>{r.emit("error",c),n.emit("error",c)});const s={};let o;const u={};e.quads.on("data",c=>{c.predicate.value==="http://rdfs.org/ns/void#subset"&&c.object.value===e.url?o=c.subject.value:c.predicate.value==="http://xmlns.com/foaf/0.1/primaryTopic"&&(u[c.object.value]=c.subject.value);let l=s[c.graph.value];l||(l=s[c.graph.value]=[]),l.push(c)}),e.quads.on("end",()=>{const c=o?u[o]:void 0;for(const l in s)if(l===c){for(const d of s[l])n.push(d);if(this.metadataToData)for(const d of s[l])r.push(d)}else{for(const d of s[l])r.push(d);if(!c&&this.dataToMetadataOnInvalidMetadataGraph)for(const d of s[l])n.push(d)}r.push(null),n.push(null)})};return r._read=n._read=()=>{a()},{data:r,metadata:n}}}cm.ActorRdfMetadataPrimaryTopic=ire;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(cm,t)})(OM);var AM={},dm={};Object.defineProperty(dm,"__esModule",{value:!0});dm.ActorRdfMetadataAll=void 0;const are=uR,CD=kt;class sre extends are.ActorRdfMetadata{constructor(e){super(e)}async test(e){return!0}async run(e){const r=new CD.Readable({objectMode:!0}),n=new CD.Readable({objectMode:!0});e.quads.on("error",s=>{r.emit("error",s),n.emit("error",s)});const a=()=>{r._read=n._read=()=>{},e.quads.on("data",s=>{r.push(s),n.push(s)}),e.quads.on("end",()=>{r.push(null),n.push(null)})};return r._read=n._read=()=>{a()},{data:r,metadata:n}}}dm.ActorRdfMetadataAll=sre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(dm,t)})(AM);var RM={},fm={},g0={},hm={};Object.defineProperty(hm,"__esModule",{value:!0});hm.ActorRdfMetadataAccumulate=void 0;const ore=et;class ure extends ore.Actor{constructor(e){super(e)}}hm.ActorRdfMetadataAccumulate=ure;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(hm,t)})(g0);Object.defineProperty(fm,"__esModule",{value:!0});fm.ActorRdfMetadataAccumulateCanContainUndefs=void 0;const cre=g0;class lre extends cre.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){if(e.mode==="initialize")return{metadata:{canContainUndefs:!1}};let r=e.accumulatedMetadata.canContainUndefs;return e.appendingMetadata.canContainUndefs&&(r=!0),{metadata:{canContainUndefs:r}}}}fm.ActorRdfMetadataAccumulateCanContainUndefs=lre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(fm,t)})(RM);var xM={},pm={};Object.defineProperty(pm,"__esModule",{value:!0});pm.ActorRdfMetadataAccumulateCardinality=void 0;const dre=g0;class fre extends dre.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){if(e.mode==="initialize")return{metadata:{cardinality:{type:"exact",value:0}}};const r={...e.accumulatedMetadata.cardinality};if(r.dataset)if(e.appendingMetadata.cardinality.dataset){if(r.dataset!==e.appendingMetadata.cardinality.dataset&&e.appendingMetadata.subsetOf===r.dataset)return{metadata:{cardinality:e.appendingMetadata.cardinality}};if(r.dataset!==e.appendingMetadata.cardinality.dataset)delete r.dataset;else return{metadata:{cardinality:r}}}else return{metadata:{cardinality:r}};return!e.appendingMetadata.cardinality||!Number.isFinite(e.appendingMetadata.cardinality.value)?(r.type="estimate",r.value=Number.POSITIVE_INFINITY):(e.appendingMetadata.cardinality.type==="estimate"&&(r.type="estimate"),r.value+=e.appendingMetadata.cardinality.value),{metadata:{cardinality:r}}}}pm.ActorRdfMetadataAccumulateCardinality=fre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(pm,t)})(xM);var IM={},ym={};Object.defineProperty(ym,"__esModule",{value:!0});ym.ActorRdfMetadataAccumulatePageSize=void 0;const hre=g0;class pre extends hre.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){return e.mode==="initialize"?{metadata:{}}:{metadata:{..."pageSize"in e.accumulatedMetadata||"pageSize"in e.appendingMetadata?{pageSize:(e.accumulatedMetadata.pageSize||0)+(e.appendingMetadata.pageSize||0)}:{}}}}}ym.ActorRdfMetadataAccumulatePageSize=pre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(ym,t)})(IM);var PM={},bm={};Object.defineProperty(bm,"__esModule",{value:!0});bm.ActorRdfMetadataAccumulateRequestTime=void 0;const yre=g0;class bre extends yre.ActorRdfMetadataAccumulate{constructor(e){super(e)}async test(e){return!0}async run(e){return e.mode==="initialize"?{metadata:{}}:{metadata:{..."requestTime"in e.accumulatedMetadata||"requestTime"in e.appendingMetadata?{requestTime:(e.accumulatedMetadata.requestTime||0)+(e.appendingMetadata.requestTime||0)}:{}}}}}bm.ActorRdfMetadataAccumulateRequestTime=bre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(bm,t)})(PM);var DM={},_m={},Jo={},gm={};Object.defineProperty(gm,"__esModule",{value:!0});gm.ActorRdfMetadataExtract=void 0;const _re=et;class gre extends _re.Actor{constructor(e){super(e)}}gm.ActorRdfMetadataExtract=gre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(gm,t)})(Jo);var NM={exports:{}};(function(t){(function(e){var r=function(){function b(_){this.options=_}return b.prototype.toString=function(){return JSON&&JSON.stringify?JSON.stringify(this.options):this.options},b}(),n=function(){function b(U){return Object.prototype.toString.apply(U)==="[object Array]"}function _(U){return Object.prototype.toString.apply(U)==="[object String]"}function E(U){return Object.prototype.toString.apply(U)==="[object Number]"}function w(U){return Object.prototype.toString.apply(U)==="[object Boolean]"}function O(U,H){var N="",x=!0,F;for(F=0;F="a"&&w<="z"||w>="A"&&w<="Z"}function _(w){return w>="0"&&w<="9"}function E(w){return _(w)||w>="a"&&w<="f"||w>="A"&&w<="F"}return{isAlpha:b,isDigit:_,isHexDigit:E}}(),s=function(){var b={encode:function(T){return unescape(encodeURIComponent(T))},numBytes:function(T){return T<=127?1:194<=T&&T<=223?2:224<=T&&T<=239?3:240<=T&&T<=244?4:0},isValidFollowingCharCode:function(T){return 128<=T&&T<=191}};function _(T){var I="",D=b.encode(T),U,H;for(H=0;H1||o.isReserved(T)||o.isUnreserved(T)?T:s.encodeCharacter(T)}function w(O){var A="",T,I="";for(T=0;T1?A+=I:A+=o.isReserved(I)||o.isUnreserved(I)?I:s.encodeCharacter(I);return A}return{encode:b,encodePassReserved:_,encodeLiteral:w,encodeLiteralCharacter:E}}(),c=function(){var b={};function _(E){b[E]={symbol:E,separator:E==="?"?"&":E===""||E==="+"||E==="#"?",":E,named:E===";"||E==="&"||E==="?",ifEmpty:E==="&"||E==="?"?"=":"",first:E==="+"?"":E,encode:E==="+"||E==="#"?u.encodePassReserved:u.encode,toString:function(){return this.symbol}}}return _(""),_("+"),_("#"),_("."),_("/"),_(";"),_("?"),_("&"),{valueOf:function(E){return b[E]?b[E]:"=,!@|".indexOf(E)>=0?null:b[""]}}}();function l(b){var _;if(b==null)return!1;if(n.isArray(b))return b.length>0;if(typeof b=="string"||typeof b=="number"||typeof b=="boolean")return!0;for(_ in b)if(b.hasOwnProperty(_)&&l(b[_]))return!0;return!1}var d=function(){function b(_){this.literal=u.encodeLiteral(_)}return b.prototype.expand=function(){return this.literal},b.prototype.toString=b.prototype.expand,b}(),f=function(){function b(E){var w,O=[],A=null,T=null,I=null,D,U="";function H(){var x=E.substring(T,D);if(x.length===0)throw new r({expressionText:E,message:"a varname must be specified",position:D});A={varname:x,exploded:!1,maxLength:null},T=null}function N(){if(I===D)throw new r({expressionText:E,message:"after a ':' you have to specify the length",position:D});A.maxLength=parseInt(E.substring(I,D),10),I=null}for(w=function(x){var F=c.valueOf(x);if(F===null)throw new r({expressionText:E,message:"illegal use of reserved operator",position:D,operator:x});return F}(E.charAt(0)),D=w.symbol.length,T=D;D=4)throw new r({expressionText:E,message:"A :prefix must have max 4 digits",position:D});continue}N()}if(U===":"){if(A.maxLength!==null)throw new r({expressionText:E,message:"only one :maxLength is allowed per varspec",position:D});if(A.exploded)throw new r({expressionText:E,message:"an exploeded varspec MUST NOT be varspeced",position:D});I=D+1;continue}if(U==="*"){if(A===null)throw new r({expressionText:E,message:"exploded without varspec",position:D});if(A.exploded)throw new r({expressionText:E,message:"exploded twice",position:D});if(A.maxLength)throw new r({expressionText:E,message:"an explode (*) MUST NOT follow to a prefix",position:D});A.exploded=!0;continue}if(U===","){O.push(A),A=null,T=D+1;continue}throw new r({expressionText:E,message:"illegal character",character:U,position:D})}return T!==null&&H(),I!==null&&N(),O.push(A),new h(E,w,O)}function _(E){var w,O,A=[],T=null,I=0;for(w=0;w{const a=r[n]||r[`${n}Page`],s=a&&a[e];return[n,s&&s.length>0?s[0]:null]}))}parseUriTemplateCached(e){const r=this.parsedUriTemplateCache[e];return r||(this.parsedUriTemplateCache[e]=(0,wre.parse)(e))}getSearchForms(e){const r=e.search,n=[];if(r)for(const a in r)for(const s of r[a]){const o=(e.template||{})[s]||[];if(o.length!==1)throw new Error(`Expected 1 hydra:template for ${s}`);const u=o[0],c=this.parseUriTemplateCached(u),l=Object.fromEntries(((e.mapping||{})[s]||[]).map(f=>{const h=((e.variable||{})[f]||[])[0],p=((e.property||{})[f]||[])[0];if(!h)throw new Error(`Expected a hydra:variable for ${f}`);if(!p)throw new Error(`Expected a hydra:property for ${f}`);return[p,h]})),d=f=>c.expand(Object.fromEntries(Object.keys(f).map(h=>[l[h],f[h]])));n.push({dataset:a,template:u,mappings:l,getUri:d})}return{values:n}}getHydraProperties(e){return new Promise((r,n)=>{e.on("error",n);const a={};e.on("data",s=>{if(s.predicate.value.startsWith(Jc.HYDRA)){const o=s.predicate.value.slice(Jc.HYDRA.length),u=a[o]||(a[o]={});(u[s.subject.value]||(u[s.subject.value]=[])).push(s.object.value)}}),e.on("end",()=>r(a))})}async run(e){const r={},n=await this.getHydraProperties(e.metadata);return Object.assign(r,this.getLinks(e.url,n)),r.searchForms=this.getSearchForms(n),{metadata:r}}}_m.ActorRdfMetadataExtractHydraControls=Jc;Jc.HYDRA="http://www.w3.org/ns/hydra/core#";Jc.LINK_TYPES=["first","next","previous","last"];(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(_m,t)})(DM);var CM={},mm={};Object.defineProperty(mm,"__esModule",{value:!0});mm.ActorRdfMetadataExtractHydraCount=void 0;const Sre=Jo;class Tre extends Sre.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}run(e){return new Promise((r,n)=>{e.metadata.on("error",n),e.metadata.on("data",a=>{this.predicates.includes(a.predicate.value)&&r({metadata:{cardinality:{type:"estimate",value:Number.parseInt(a.object.value,10),dataset:a.subject.value}}})}),e.metadata.on("end",()=>{r({metadata:{cardinality:{type:"estimate",value:0}}})})})}}mm.ActorRdfMetadataExtractHydraCount=Tre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(mm,t)})(CM);var jM={},vm={};Object.defineProperty(vm,"__esModule",{value:!0});vm.ActorRdfMetadataExtractHydraPagesize=void 0;const Ere=Jo;class Ore extends Ere.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return new Promise((r,n)=>{e.metadata.on("error",n),e.metadata.on("data",a=>{this.predicates.includes(a.predicate.value)&&r({metadata:{pageSize:Number.parseInt(a.object.value,10)}})}),e.metadata.on("end",()=>{r({metadata:{}})})})}}vm.ActorRdfMetadataExtractHydraPagesize=Ore;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(vm,t)})(jM);var MM={},wm={};Object.defineProperty(wm,"__esModule",{value:!0});wm.ActorRdfMetadataExtractRequestTime=void 0;const Are=Jo;class Rre extends Are.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return{metadata:{requestTime:e.requestTime}}}}wm.ActorRdfMetadataExtractRequestTime=Rre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(wm,t)})(MM);var FM={},Sm={};Object.defineProperty(Sm,"__esModule",{value:!0});Sm.ActorRdfMetadataExtractAllowHttpMethods=void 0;const xre=Jo;class Ire extends xre.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){var n,a;const r={};return(n=e.headers)!=null&&n.get("allow")&&(r.allowHttpMethods=(a=e.headers.get("allow"))==null?void 0:a.split(/, */u)),{metadata:r}}}Sm.ActorRdfMetadataExtractAllowHttpMethods=Ire;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Sm,t)})(FM);var LM={},Tm={};Object.defineProperty(Tm,"__esModule",{value:!0});Tm.ActorRdfMetadataExtractPutAccepted=void 0;const Pre=Jo;class Dre extends Pre.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){var n,a;const r={};return(n=e.headers)!=null&&n.get("accept-put")&&(r.putAccepted=(a=e.headers.get("accept-put"))==null?void 0:a.split(/, */u)),{metadata:r}}}Tm.ActorRdfMetadataExtractPutAccepted=Dre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Tm,t)})(LM);var BM={},Em={};Object.defineProperty(Em,"__esModule",{value:!0});Em.ActorRdfMetadataExtractPatchSparqlUpdate=void 0;const Nre=Jo;class Cre extends Nre.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){var n,a,s,o;const r={};return((a=(n=e.headers)==null?void 0:n.get("accept-patch"))!=null&&a.includes("application/sparql-update")||(o=(s=e.headers)==null?void 0:s.get("ms-author-via"))!=null&&o.includes("SPARQL"))&&(r.patchSparqlUpdate=!0),{metadata:r}}}Em.ActorRdfMetadataExtractPatchSparqlUpdate=Cre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Em,t)})(BM);var $M={},Om={};Object.defineProperty(Om,"__esModule",{value:!0});Om.ActorRdfMetadataExtractSparqlService=void 0;const jre=Jo,Mre=Ra;class Fre extends jre.ActorRdfMetadataExtract{constructor(e){super(e)}async test(e){return!0}async run(e){return new Promise((r,n)=>{e.metadata.on("error",n);const a={};e.metadata.on("data",s=>{s.predicate.value==="http://www.w3.org/ns/sparql-service-description#endpoint"&&(s.subject.termType==="BlankNode"||s.subject.value===e.url)?(a.sparqlService=s.object.termType==="Literal"?(0,Mre.resolve)(s.object.value,e.url):s.object.value,this.inferHttpsEndpoint&&e.url.startsWith("https")&&!a.sparqlService.startsWith("https")&&(a.sparqlService=a.sparqlService.replace("http:","https:"))):s.predicate.value==="http://www.w3.org/ns/sparql-service-description#defaultGraph"&&(a.defaultGraph=s.object.value)}),e.metadata.on("end",()=>{r({metadata:a})})})}}Om.ActorRdfMetadataExtractSparqlService=Fre;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Om,t)})($M);var UM={},Am={},ml={},Rm={};Object.defineProperty(Rm,"__esModule",{value:!0});Rm.ActorRdfParse=void 0;const Lre=bl;class Bre extends Lre.ActorAbstractMediaTyped{constructor(e){super(e)}}Rm.ActorRdfParse=Bre;var xm={};Object.defineProperty(xm,"__esModule",{value:!0});xm.ActorRdfParseFixedMediaTypes=void 0;const $re=bl;class Ure extends $re.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e){return!0}}xm.ActorRdfParseFixedMediaTypes=Ure;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Rm,t),r(xm,t)})(ml);const Qf="http://www.w3.org/1999/02/22-rdf-syntax-ns#",Gf="http://www.w3.org/2001/XMLSchema#",FS="http://www.w3.org/2000/10/swap/",Wn={xsd:{decimal:`${Gf}decimal`,boolean:`${Gf}boolean`,double:`${Gf}double`,integer:`${Gf}integer`,string:`${Gf}string`},rdf:{type:`${Qf}type`,nil:`${Qf}nil`,first:`${Qf}first`,rest:`${Qf}rest`,langString:`${Qf}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${FS}reify#forSome`,forAll:`${FS}reify#forAll`},log:{implies:`${FS}log#implies`}};/*! queue-microtask. MIT License. Feross Aboukhadijeh */let jD;var qre=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:m):t=>(jD||(jD=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0));const Vre=CV(qre),{xsd:Wy}=Wn,Hre=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\([^])/g,MD={"\\":"\\","'":"'",'"':'"',n:` +`,r:"\r",t:" ",f:"\f",b:"\b",_:"_","~":"~",".":".","-":"-","!":"!",$:"$","&":"&","(":"(",")":")","*":"*","+":"+",",":",",";":";","=":"=","/":"/","?":"?","#":"#","@":"@","%":"%"},kre=/[\x00-\x20<>\\"\{\}\|\^\`]/,Qre={_iri:!0,_unescapedIri:!0,_simpleQuotedString:!0,_langcode:!0,_blank:!0,_newline:!0,_comment:!0,_whitespace:!0,_endOfFile:!0},Gre=/$0^/;class cR{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 r in this)!(r in Qre)&&this[r]instanceof RegExp&&(this[r]=Gre)}else this._n3Mode=e.n3!==!1;this._comments=!!e.comments,this._literalClosingPos=0}_tokenizeToEnd(e,r){let n=this._input,a=n.length;for(;;){let u,c;for(;u=this._newline.exec(n);)this._comments&&(c=this._comment.exec(u[0]))&&s("comment",c[1],"",this._line,u[0].length),n=n.substr(u[0].length,n.length),a=n.length,this._line++;if(!u&&(u=this._whitespace.exec(n))&&(n=n.substr(u[0].length,n.length)),this._endOfFile.test(n))return r&&(this._comments&&(c=this._comment.exec(n))&&s("comment",c[1],"",this._line,n.length),n=null,s("eof","","",this._line,0)),this._input=n;const l=this._line,d=n[0];let f="",h="",p="",b=null,_=0,E=!1;switch(d){case"^":if(n.length<3)break;if(n[1]==="^"){if(this._previousMarker="^^",n=n.substr(2),n[0]!=="<"){E=!0;break}}else{this._n3Mode&&(_=1,f="^");break}case"<":if(b=this._unescapedIri.exec(n))f="IRI",h=b[1];else if(b=this._iri.exec(n)){if(h=this._unescape(b[1]),h===null||kre.test(h))return o(this);f="IRI"}else n.length>1&&n[1]==="<"?(f="<<",_=2):this._n3Mode&&n.length>1&&n[1]==="="&&(f="inverse",_=2,h=">");break;case">":n.length>1&&n[1]===">"&&(f=">>",_=2);break;case"_":((b=this._blank.exec(n))||r&&(b=this._blank.exec(`${n} `)))&&(f="blank",p="_",h=b[1]);break;case'"':if(b=this._simpleQuotedString.exec(n))h=b[1];else if({value:h,matchLength:_}=this._parseLiteral(n),h===null)return o(this);(b!==null||_!==0)&&(f="literal",this._literalClosingPos=0);break;case"'":if(!this._lineMode){if(b=this._simpleApostropheString.exec(n))h=b[1];else if({value:h,matchLength:_}=this._parseLiteral(n),h===null)return o(this);(b!==null||_!==0)&&(f="literal",this._literalClosingPos=0)}break;case"?":this._n3Mode&&(b=this._variable.exec(n))&&(f="var",h=b[0]);break;case"@":this._previousMarker==="literal"&&(b=this._langcode.exec(n))?(f="langcode",h=b[1]):(b=this._keyword.exec(n))&&(f=b[0]);break;case".":if(n.length===1?r:n[1]<"0"||n[1]>"9"){f=".",_=1;break}case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"+":case"-":(b=this._number.exec(n)||r&&(b=this._number.exec(`${n} `)))&&(f="literal",h=b[0],p=typeof b[1]=="string"?Wy.double:typeof b[2]=="string"?Wy.decimal:Wy.integer);break;case"B":case"b":case"p":case"P":case"G":case"g":(b=this._sparqlKeyword.exec(n))?f=b[0].toUpperCase():E=!0;break;case"f":case"t":(b=this._boolean.exec(n))?(f="literal",h=b[0],p=Wy.boolean):E=!0;break;case"a":(b=this._shortPredicates.exec(n))?(f="abbreviation",h="a"):E=!0;break;case"=":this._n3Mode&&n.length>1&&(f="abbreviation",n[1]!==">"?(_=1,h="="):(_=2,h=">"));break;case"!":if(!this._n3Mode)break;case",":case";":case"[":case"]":case"(":case")":case"}":this._lineMode||(_=1,f=d);break;case"{":!this._lineMode&&n.length>=2&&(n[1]==="|"?(f="{|",_=2):(f=d,_=1));break;case"|":n.length>=2&&n[1]==="}"&&(f="|}",_=2);break;default:E=!0}if(E&&((this._previousMarker==="@prefix"||this._previousMarker==="PREFIX")&&(b=this._prefix.exec(n))?(f="prefix",h=b[1]||""):((b=this._prefixed.exec(n))||r&&(b=this._prefixed.exec(`${n} `)))&&(f="prefixed",p=b[1]||"",h=this._unescape(b[2]))),this._previousMarker==="^^")switch(f){case"prefixed":f="type";break;case"IRI":f="typeIRI";break;default:f=""}if(!f)return r||!/^'''|^"""/.test(n)&&/\n|\r/.test(n)?o(this):this._input=n;const w=_||b[0].length,O=s(f,h,p,l,w);this.previousToken=O,this._previousMarker=f,n=n.substr(w,n.length)}function s(u,c,l,d,f){const h=n?a-n.length:a,p=h+f,b={type:u,value:c,prefix:l,line:d,start:h,end:p};return e(null,b),b}function o(u){e(u._syntaxError(/^\S*/.exec(n)[0]))}}_unescape(e){let r=!1;const n=e.replace(Hre,(a,s,o,u)=>{if(typeof s=="string")return String.fromCharCode(Number.parseInt(s,16));if(typeof o=="string"){let c=Number.parseInt(o,16);return c<=65535?String.fromCharCode(Number.parseInt(o,16)):String.fromCharCode(55296+((c-=65536)>>10),56320+(c&1023))}return u in MD?MD[u]:(r=!0,"")});return r?null:n}_parseLiteral(e){if(e.length>=3){const r=e.match(/^(?:"""|"|'''|'|)/)[0],n=r.length;let a=Math.max(this._literalClosingPos,n);for(;(a=e.indexOf(r,a))>0;){let s=0;for(;e[a-s-1]==="\\";)s++;if(s%2===0){const o=e.substring(n,a),u=o.split(/\r\n|\r|\n/).length-1,c=a+n;if(n===1&&u!==0||n===3&&this._lineMode)break;return this._line+=u,{value:this._unescape(o),matchLength:c}}a++}this._literalClosingPos=e.length-n+1}return{value:"",matchLength:0}}_syntaxError(e){this._input=null;const r=new Error(`Unexpected "${e}" on line ${this._line}.`);return r.context={token:void 0,line:this._line,previousToken:this.previousToken},r}_readStartingBom(e){return e.startsWith("\uFEFF")?e.substr(1):e}tokenize(e,r){if(this._line=1,typeof e=="string")if(this._input=this._readStartingBom(e),typeof r=="function")Vre(()=>this._tokenizeToEnd(r,!0));else{const n=[];let a;if(this._tokenizeToEnd((s,o)=>s?a=s:n.push(o),!0),a)throw a;return n}else this._pendingBuffer=null,typeof e.setEncoding=="function"&&e.setEncoding("utf8"),e.on("data",n=>{this._input!==null&&n.length!==0&&(this._pendingBuffer&&(n=Buffer.concat([this._pendingBuffer,n]),this._pendingBuffer=null),n[n.length-1]&128?this._pendingBuffer=n:(typeof this._input>"u"?this._input=this._readStartingBom(typeof n=="string"?n:n.toString()):this._input+=n,this._tokenizeToEnd(r,!1)))}),e.on("end",()=>{typeof this._input=="string"&&this._tokenizeToEnd(r,!0)}),e.on("error",r)}}function zre(t){return!!t&&t.termType==="NamedNode"}function Wre(t){return!!t&&t.termType==="BlankNode"}function Xre(t){return!!t&&t.termType==="Literal"}function Kre(t){return!!t&&t.termType==="Variable"}function Kd(t){return!!t&&t.termType==="DefaultGraph"}function Jre(t){return Kd(t.graph)}function Yre(t,e){return qM({"":t.value||t},e)("")}function qM(t,e){const r=Object.create(null);for(const a in t)n(a,t[a]);e=e||Pf;function n(a,s){if(typeof s=="string"){const o=Object.create(null);r[a]=u=>o[u]||(o[u]=e.namedNode(s+u))}else if(!(a in r))throw new Error(`Unknown prefix: ${a}`);return r[a]}return n}const VM=Object.freeze(Object.defineProperty({__proto__:null,inDefaultGraph:Jre,isBlankNode:Wre,isDefaultGraph:Kd,isLiteral:Xre,isNamedNode:zre,isVariable:Kre,prefix:Yre,prefixes:qM},Symbol.toStringTag,{value:"Module"})),{rdf:Zre,xsd:$c}=Wn;let m0,ene=0;const KE={namedNode:tne,blankNode:rne,variable:ine,literal:nne,defaultGraph:ane,quad:FD,triple:FD},Pf=KE;let Ys=class HM{constructor(e){this.id=e}get value(){return this.id}equals(e){return e instanceof HM?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 Im extends Ys{get termType(){return"NamedNode"}}class Bu extends Ys{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const e=this.id;let r=e.lastIndexOf('"')+1;return r0?"INF":"-INF")))),r===""||r===$c.string?new Bu(`"${t}"`):new Bu(`"${t}"^^${r}`)}function ine(t){return new dR(t)}function ane(){return m0}function FD(t,e,r,n){return new Sp(t,e,r,n)}let LD=0;class Pm{constructor(e){this._contextStack=[],this._graph=null,e=e||{},this._setBase(e.baseIRI),e.factory&&kM(this,e.factory);const r=typeof e.format=="string"?e.format.match(/\w*$/)[0].toLowerCase():"",n=/turtle/.test(r),a=/trig/.test(r),s=/triple/.test(r),o=/quad/.test(r),u=this._n3Mode=/n3/.test(r),c=s||o;(this._supportsNamedGraphs=!(n||u))||(this._readPredicateOrNamedGraph=this._readPredicate),this._supportsQuads=!(n||a||s||u),this._supportsRDFStar=r===""||/star|\*$/.test(r),c&&(this._resolveRelativeIRI=l=>null),this._blankNodePrefix=typeof e.blankNodePrefix!="string"?"":e.blankNodePrefix.replace(/^(?!_:)/,"_:"),this._lexer=e.lexer||new cR({lineMode:c,n3:u}),this._explicitQuantifiers=!!e.explicitQuantifiers}static _resetBlankNodePrefix(){LD=0}_setBase(e){if(!e)this._base="",this._basePath="";else{const r=e.indexOf("#");r>=0&&(e=e.substr(0,r)),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]}}_saveContext(e,r,n,a,s){const o=this._n3Mode;this._contextStack.push({type:e,subject:n,predicate:a,object:s,graph:r,inverse:o?this._inversePredicate:!1,blankPrefix:o?this._prefixes._:"",quantified:o?this._quantified:null}),o&&(this._inversePredicate=!1,this._prefixes._=this._graph?`${this._graph.value}.`:".",this._quantified=Object.create(this._quantified))}_restoreContext(e,r){const n=this._contextStack.pop();if(!n||n.type!==e)return this._error(`Unexpected ${r.type}`,r);this._subject=n.subject,this._predicate=n.predicate,this._object=n.object,this._graph=n.graph,this._n3Mode&&(this._inversePredicate=n.inverse,this._prefixes._=n.blankPrefix,this._quantified=n.quantified)}_readInTopContext(e){switch(e.type){case"eof":return this._graph!==null?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,r){let n;switch(e.type){case"IRI":case"typeIRI":const a=this._resolveIRI(e.value);if(a===null)return this._error("Invalid IRI",e);n=this._namedNode(a);break;case"type":case"prefixed":const s=this._prefixes[e.prefix];if(s===void 0)return this._error(`Undefined prefix "${e.prefix}:"`,e);n=this._namedNode(s+e.value);break;case"blank":n=this._blankNode(this._prefixes[e.prefix]+e.value);break;case"var":n=this._variable(e.value.substr(1));break;default:return this._error(`Expected entity but got ${e.type}`,e)}return!r&&this._n3Mode&&n.id in this._quantified&&(n=this._quantified[n.id]),n}_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(e.prefix.length===0)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((this._subject=this._readEntity(e))===void 0)return;if(this._n3Mode)return this._getPathReader(this._readPredicateOrNamedGraph)}return this._readPredicateOrNamedGraph}_readPredicate(e){const r=e.type;switch(r){case"inverse":this._inversePredicate=!0;case"abbreviation":this._predicate=this.ABBREVIATIONS[e.value];break;case".":case"]":case"}":return this._predicate===null?this._error(`Unexpected ${r}`,e):(this._subject=null,r==="]"?this._readBlankNodeTail(e):this._readPunctuation(e));case";":return this._predicate!==null?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((this._predicate=this._readEntity(e))===void 0)return}return this._readObject}_readObject(e){switch(e.type){case"literal":if(e.prefix.length===0)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((this._object=this._readEntity(e))===void 0)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);this._subject!==null&&this._emit(this._subject,this._predicate,this._object,this._graph);const r=this._predicate===null;return this._restoreContext("blank",e),this._object!==null?this._getContextEndReader():this._predicate!==null?this._readObject:r?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 r=null,n=null,a=this._readListItem;const s=this._subject,o=this._contextStack,u=o[o.length-1];switch(e.type){case"[":this._saveContext("blank",this._graph,n=this._blankNode(),this.RDF_FIRST,this._subject=r=this._blankNode()),a=this._readBlankNodeHead;break;case"(":this._saveContext("list",this._graph,n=this._blankNode(),this.RDF_FIRST,this.RDF_NIL),this._subject=null;break;case")":if(this._restoreContext("list",e),o.length!==0&&o[o.length-1].type==="list"&&this._emit(this._subject,this._predicate,this._object,this._graph),this._predicate===null){if(a=this._readPredicate,this._subject===this.RDF_NIL)return a}else if(a=this._getContextEndReader(),this._object===this.RDF_NIL)return a;n=this.RDF_NIL;break;case"literal":e.prefix.length===0?(this._literalValue=e.value,a=this._readListItemDataTypeOrLang):(r=this._literal(e.value,this._namedNode(e.prefix)),a=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((r=this._readEntity(e))===void 0)return}if(n===null&&(this._subject=n=this._blankNode()),s===null?u.predicate===null?u.subject=n:u.object=n:this._emit(s,this.RDF_REST,n,this._graph),r!==null){if(this._n3Mode&&(e.type==="IRI"||e.type==="prefixed"))return this._saveContext("item",this._graph,n,this.RDF_FIRST,r),this._subject=r,this._predicate=null,this._getPathReader(this._readListItem);this._emit(n,this.RDF_FIRST,r,this._graph)}return a}_readDataTypeOrLang(e){return this._completeObjectLiteral(e,!1)}_readListItemDataTypeOrLang(e){return this._completeObjectLiteral(e,!0)}_completeLiteral(e){let r=this._literal(this._literalValue);switch(e.type){case"type":case"typeIRI":const n=this._readEntity(e);if(n===void 0)return;r=this._literal(this._literalValue,n),e=null;break;case"langcode":r=this._literal(this._literalValue,e.value),e=null;break}return{token:e,literal:r}}_completeSubjectLiteral(e){return this._subject=this._completeLiteral(e).literal,this._readPredicateOrNamedGraph}_completeObjectLiteral(e,r){const n=this._completeLiteral(e);if(n)return this._object=n.literal,r&&this._emit(this._subject,this.RDF_FIRST,this._object,this._graph),n.token===null?this._getContextEndReader():(this._readCallback=this._getContextEndReader(),this._readCallback(n.token))}_readFormulaTail(e){return e.type!=="}"?this._readPunctuation(e):(this._subject!==null&&this._emit(this._subject,this._predicate,this._object,this._graph),this._restoreContext("formula",e),this._object===null?this._readPredicate:this._getContextEndReader())}_readPunctuation(e){let r,n=this._graph;const a=this._subject,s=this._inversePredicate;switch(e.type){case"}":if(this._graph===null)return this._error("Unexpected graph closing",e);if(this._n3Mode)return this._readFormulaTail(e);this._graph=null;case".":this._subject=null,r=this._contextStack.length?this._readSubject:this._readInTopContext,s&&(this._inversePredicate=!1);break;case";":r=this._readPredicate;break;case",":r=this._readObject;break;case"{|":if(!this._supportsRDFStar)return this._error("Unexpected RDF* syntax",e);const o=this._predicate,u=this._object;this._subject=this._quad(a,o,u,this.DEFAULTGRAPH),r=this._readPredicate;break;case"|}":if(this._subject.termType!=="Quad")return this._error("Unexpected asserted triple closing",e);this._subject=null,r=this._readPunctuation;break;default:if(this._supportsQuads&&this._graph===null&&(n=this._readEntity(e))!==void 0){r=this._readQuadPunctuation;break}return this._error(`Expected punctuation to follow "${this._object.id}"`,e)}if(a!==null){const o=this._predicate,u=this._object;s?this._emit(u,o,a,n):this._emit(a,o,u,n)}return r}_readBlankNodePunctuation(e){let r;switch(e.type){case";":r=this._readPredicate;break;case",":r=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),r}_readQuadPunctuation(e){return e.type!=="."?this._error("Expected dot to follow quad",e):this._readInTopContext}_readPrefix(e){return e.type!=="prefix"?this._error("Expected prefix to follow @prefix",e):(this._prefix=e.value,this._readPrefixIRI)}_readPrefixIRI(e){if(e.type!=="IRI")return this._error(`Expected IRI to follow prefix "${this._prefix}:"`,e);const r=this._readEntity(e);return this._prefixes[this._prefix]=r.value,this._prefixCallback(this._prefix,r),this._readDeclarationPunctuation}_readBaseIRI(e){const r=e.type==="IRI"&&this._resolveIRI(e.value);return r?(this._setBase(r),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 r;switch(e.type){case"IRI":case"prefixed":if((r=this._readEntity(e,!0))!==void 0)break;default:return this._error(`Unexpected ${e.type}`,e)}return this._explicitQuantifiers?(this._subject===null?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,r,this.QUANTIFIERS_GRAPH)):this._quantified[r.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 r=this._contextStack,n=r.length&&r[r.length-1];if(n&&n.type==="item"){const a=this._subject;this._restoreContext("item",e),this._emit(this._subject,this.RDF_FIRST,a,this._graph)}return this._afterPath(e)}}_readForwardPath(e){let r,n;const a=this._blankNode();if((n=this._readEntity(e))!==void 0)return this._predicate===null?(r=this._subject,this._subject=a):(r=this._object,this._object=a),this._emit(r,n,a,this._graph),this._readPath}_readBackwardPath(e){const r=this._blankNode();let n,a;if((n=this._readEntity(e))!==void 0)return this._predicate===null?(a=this._subject,this._subject=r):(a=this._object,this._object=r),this._emit(r,n,a,this._graph),this._readPath}_readRDFStarTailOrGraph(e){return e.type!==">>"?this._supportsQuads&&this._graph===null&&(this._graph=this._readEntity(e))!==void 0?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 r=this._quad(this._subject,this._predicate,this._object,this._graph||this.DEFAULTGRAPH);return this._restoreContext("<<",e),this._subject===null?(this._subject=r,this._readPredicate):(this._object=r,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,r,n,a){this._callback(null,this._quad(e,r,n,a||this.DEFAULTGRAPH))}_error(e,r){const n=new Error(`${e} on line ${r.line}.`);n.context={token:r,line:r.line,previousToken:this._lexer.previousToken},this._callback(n),this._callback=LS}_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 r=e.length;let n="",a=-1,s=-1,o=0,u="/";for(;a=s&&(n=n.substr(0,o)),u!=="/")return`${n}/${e.substr(a+1)}`;o=a+1}}}u=e[++a]}return n+e.substring(o)}parse(e,r,n){if(this._readCallback=this._readInTopContext,this._sparqlStyle=!1,this._prefixes=Object.create(null),this._prefixes._=this._blankNodePrefix?this._blankNodePrefix.substr(2):`b${LD++}_`,this._prefixCallback=n||LS,this._inversePredicate=!1,this._quantified=Object.create(null),!r){const a=[];let s;if(this._callback=(o,u)=>{o?s=o:u&&a.push(u)},this._lexer.tokenize(e).every(o=>this._readCallback=this._readCallback(o)),s)throw s;return a}this._callback=r,this._lexer.tokenize(e,(a,s)=>{a!==null?(this._callback(a),this._callback=LS):this._readCallback&&(this._readCallback=this._readCallback(s))})}}function LS(){}function kM(t,e){const r=e.namedNode;t._namedNode=r,t._blankNode=e.blankNode,t._literal=e.literal,t._variable=e.variable,t._quad=e.quad,t.DEFAULTGRAPH=e.defaultGraph(),t.RDF_FIRST=r(Wn.rdf.first),t.RDF_REST=r(Wn.rdf.rest),t.RDF_NIL=r(Wn.rdf.nil),t.N3_FORALL=r(Wn.r.forAll),t.N3_FORSOME=r(Wn.r.forSome),t.ABBREVIATIONS={a:r(Wn.rdf.type),"=":r(Wn.owl.sameAs),">":r(Wn.log.implies)},t.QUANTIFIERS_GRAPH=r("urn:n3:quantifiers")}kM(Pm.prototype,Pf);const zf=Pf.defaultGraph(),{rdf:sne,xsd:Hl}=Wn,BD=/["\\\t\n\r\b\f\u0000-\u0019\ud800-\udbff]/,$D=/["\\\t\n\r\b\f\u0000-\u0019]|[\ud800-\udbff][\udc00-\udfff]/g,one={"\\":"\\\\",'"':'\\"'," ":"\\t","\n":"\\n","\r":"\\r","\b":"\\b","\f":"\\f"};class Wf extends Ys{equals(e){return e===this}}class hR{constructor(e,r){if(this._prefixRegex=/$0^/,e&&typeof e.write!="function"&&(r=e,e=null),r=r||{},this._lists=r.lists,e)this._outputStream=e,this._endStream=r.end===void 0?!0:!!r.end;else{let n="";this._outputStream={write(a,s,o){n+=a,o&&o()},end:a=>{a&&a(null,n)}},this._endStream=!0}this._subject=null,/triple|quad/i.test(r.format)?(this._lineMode=!0,this._writeQuad=this._writeQuadLine):(this._lineMode=!1,this._graph=zf,this._prefixIRIs=Object.create(null),r.prefixes&&this.addPrefixes(r.prefixes),r.baseIRI&&(this._baseMatcher=new RegExp(`^${qD(r.baseIRI)}${r.baseIRI.endsWith("/")?"":"[#?]"}`),this._baseLength=r.baseIRI.length))}get _inDefaultGraph(){return zf.equals(this._graph)}_write(e,r){this._outputStream.write(e,"utf8",r)}_writeQuad(e,r,n,a,s){try{a.equals(this._graph)||(this._write((this._subject===null?"":this._inDefaultGraph?`. `:` } `)+(zf.equals(a)?"":`${this._encodeIriOrBlank(a)} { @@ -105,7 +105,7 @@ ${a.map(u=>u.message).join(` ]`)}}list(e){const r=e&&e.length||0,n=new Array(r);for(let a=0;a{r=null,e(n,a)});if(this._endStream)try{return this._outputStream.end(r)}catch{}r&&r()}}function UD(t){let e=one[t];return e===void 0&&(t.length===1?(e=t.charCodeAt(0).toString(16),e="\\u0000".substr(0,6-e.length)+e):(e=((t.charCodeAt(0)-55296)*1024+t.charCodeAt(1)+9216).toString(16),e="\\U00000000".substr(0,10-e.length)+e)),e}function qD(t){return t.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}class pR{constructor(e,r){this._size=0,this._graphs=Object.create(null),this._id=0,this._ids=Object.create(null),this._entities=Object.create(null),this._blankNodeIndex=0,!r&&e&&!e[0]&&(r=e,e=null),r=r||{},this._factory=r.factory||Pf,e&&this.addQuads(e)}_termFromId(e,r){if(e[0]==="."){const n=this._entities,a=e.split(".");return this._factory.quad(this._termFromId(n[a[1]]),this._termFromId(n[a[2]]),this._termFromId(n[a[3]]),a[4]&&this._termFromId(n[a[4]]))}return Hc(e,r)}_termToNumericId(e){if(e.termType==="Quad"){const r=this._termToNumericId(e.subject),n=this._termToNumericId(e.predicate),a=this._termToNumericId(e.object);let s;return r&&n&&a&&(Kd(e.graph)||(s=this._termToNumericId(e.graph)))&&this._ids[s?`.${r}.${n}.${a}.${s}`:`.${r}.${n}.${a}`]}return this._ids[_i(e)]}_termToNewNumericId(e){const r=e&&e.termType==="Quad"?`.${this._termToNewNumericId(e.subject)}.${this._termToNewNumericId(e.predicate)}.${this._termToNewNumericId(e.object)}${Kd(e.graph)?"":`.${this._termToNewNumericId(e.graph)}`}`:_i(e);return this._ids[r]||(this._ids[this._entities[++this._id]=r]=this._id)}get size(){let e=this._size;if(e!==null)return e;e=0;const r=this._graphs;let n,a;for(const s in r)for(const o in n=r[s].subjects)for(const u in a=n[o])e+=Object.keys(a[u]).length;return this._size=e}_addToIndex(e,r,n,a){const s=e[r]||(e[r]={}),o=s[n]||(s[n]={}),u=a in o;return u||(o[a]=null),!u}_removeFromIndex(e,r,n,a){const s=e[r],o=s[n];delete o[a];for(const u in o)return;delete s[n];for(const u in s)return;delete e[r]}*_findInIndex(e,r,n,a,s,o,u,c){let l,d,f;const h=this._entities,p=this._termFromId(c,this._factory),b={subject:null,predicate:null,object:null};r&&((l=e,e={})[r]=l[r]);for(const _ in e)if(d=e[_]){b[s]=this._termFromId(h[_],this._factory),n&&((l=d,d={})[n]=l[n]);for(const E in d)if(f=d[E]){b[o]=this._termFromId(h[E],this._factory);const w=a?a in f?[a]:[]:Object.keys(f);for(let O=0;O{n in r||(r[n]=!0,e(this._termFromId(this._entities[n],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,r,n,a){r||(a=e.graph,n=e.object,r=e.predicate,e=e.subject),a=_i(a);let s=this._graphs[a];s||(s=this._graphs[a]={subjects:{},predicates:{},objects:{}},Object.freeze(s)),e=this._termToNewNumericId(e),r=this._termToNewNumericId(r),n=this._termToNewNumericId(n);const o=this._addToIndex(s.subjects,e,r,n);return this._addToIndex(s.predicates,r,n,e),this._addToIndex(s.objects,n,e,r),this._size=null,o}addQuads(e){for(let r=0;r{this.addQuad(r)}),e}removeQuad(e,r,n,a){r||(a=e.graph,n=e.object,r=e.predicate,e=e.subject),a=_i(a);const s=this._graphs;let o,u,c;if(!(e=e&&this._termToNumericId(e))||!(r=r&&this._termToNumericId(r))||!(n=n&&this._termToNumericId(n))||!(o=s[a])||!(u=o.subjects[e])||!(c=u[r])||!(n in c))return!1;this._removeFromIndex(o.subjects,e,r,n),this._removeFromIndex(o.predicates,r,n,e),this._removeFromIndex(o.objects,n,e,r),this._size!==null&&this._size--;for(e in o.subjects)return!0;return delete s[a],!0}removeQuads(e){for(let r=0;r{this.removeQuad(r)}),e}removeMatches(e,r,n,a){const s=new kt.Readable({objectMode:!0});return s._read=()=>{for(const o of this.readQuads(e,r,n,a))s.push(o);s.push(null)},this.remove(s)}deleteGraph(e){return this.removeMatches(null,null,null,e)}getQuads(e,r,n,a){return[...this.readQuads(e,r,n,a)]}*readQuads(e,r,n,a){a=a&&_i(a);const s=this._getGraphs(a);let o,u,c,l;if(!(e&&!(u=this._termToNumericId(e))||r&&!(c=this._termToNumericId(r))||n&&!(l=this._termToNumericId(n))))for(const d in s)(o=s[d])&&(u?l?yield*this._findInIndex(o.objects,l,u,c,"object","subject","predicate",d):yield*this._findInIndex(o.subjects,u,c,null,"subject","predicate","object",d):c?yield*this._findInIndex(o.predicates,c,l,null,"predicate","object","subject",d):l?yield*this._findInIndex(o.objects,l,null,null,"object","subject","predicate",d):yield*this._findInIndex(o.subjects,null,null,null,"subject","predicate","object",d))}match(e,r,n,a){return new yR(this,e,r,n,a)}countQuads(e,r,n,a){a=a&&_i(a);const s=this._getGraphs(a);let o=0,u,c,l,d;if(e&&!(c=this._termToNumericId(e))||r&&!(l=this._termToNumericId(r))||n&&!(d=this._termToNumericId(n)))return 0;for(const f in s)(u=s[f])&&(e?n?o+=this._countInIndex(u.objects,d,c,l):o+=this._countInIndex(u.subjects,c,l,d):r?o+=this._countInIndex(u.predicates,l,d,c):o+=this._countInIndex(u.objects,d,c,l));return o}forEach(e,r,n,a,s){this.some(o=>(e(o),!1),r,n,a,s)}every(e,r,n,a,s){let o=!1;const u=!this.some(c=>(o=!0,!e(c)),r,n,a,s);return o&&u}some(e,r,n,a,s){for(const o of this.readQuads(r,n,a,s))if(e(o))return!0;return!1}getSubjects(e,r,n){const a=[];return this.forSubjects(s=>{a.push(s)},e,r,n),a}forSubjects(e,r,n,a){a=a&&_i(a);const s=this._getGraphs(a);let o,u,c;if(e=this._uniqueEntities(e),!(r&&!(u=this._termToNumericId(r))||n&&!(c=this._termToNumericId(n))))for(a in s)(o=s[a])&&(u?c?this._loopBy2Keys(o.predicates,u,c,e):this._loopByKey1(o.subjects,u,e):c?this._loopByKey0(o.objects,c,e):this._loop(o.subjects,e))}getPredicates(e,r,n){const a=[];return this.forPredicates(s=>{a.push(s)},e,r,n),a}forPredicates(e,r,n,a){a=a&&_i(a);const s=this._getGraphs(a);let o,u,c;if(e=this._uniqueEntities(e),!(r&&!(u=this._termToNumericId(r))||n&&!(c=this._termToNumericId(n))))for(a in s)(o=s[a])&&(u?c?this._loopBy2Keys(o.objects,c,u,e):this._loopByKey0(o.subjects,u,e):c?this._loopByKey1(o.predicates,c,e):this._loop(o.predicates,e))}getObjects(e,r,n){const a=[];return this.forObjects(s=>{a.push(s)},e,r,n),a}forObjects(e,r,n,a){a=a&&_i(a);const s=this._getGraphs(a);let o,u,c;if(e=this._uniqueEntities(e),!(r&&!(u=this._termToNumericId(r))||n&&!(c=this._termToNumericId(n))))for(a in s)(o=s[a])&&(u?c?this._loopBy2Keys(o.subjects,u,c,e):this._loopByKey1(o.objects,u,e):c?this._loopByKey0(o.predicates,c,e):this._loop(o.objects,e))}getGraphs(e,r,n){const a=[];return this.forGraphs(s=>{a.push(s)},e,r,n),a}forGraphs(e,r,n,a){for(const s in this._graphs)this.some(o=>(e(o.graph),!0),r,n,a,s)}createBlankNode(e){let r,n;if(e)for(r=e=`_:${e}`,n=1;this._ids[r];)r=e+n++;else do r=`_:b${this._blankNodeIndex++}`;while(this._ids[r]);return this._ids[r]=++this._id,this._entities[this._id]=r,this._factory.blankNode(r.substr(2))}extractLists({remove:e=!1,ignoreErrors:r=!1}={}){const n={},a=r?()=>!0:(u,c)=>{throw new Error(`${u.value} ${c}`)},s=this.getQuads(null,Wn.rdf.rest,Wn.rdf.nil,null),o=e?[...s]:[];return s.forEach(u=>{const c=[];let l=!1,d,f;const h=u.graph;let p=u.subject;for(;p&&!l;){const b=this.getQuads(null,null,p,null),_=this.getQuads(p,null,null,null);let E,w=null,O=null,A=null;for(let T=0;T<_.length&&!l;T++)E=_[T],E.graph.equals(h)?d?l=a(p,"has non-list arcs out"):E.predicate.value===Wn.rdf.first?w?l=a(p,"has multiple rdf:first arcs"):o.push(w=E):E.predicate.value===Wn.rdf.rest?O?l=a(p,"has multiple rdf:rest arcs"):o.push(O=E):b.length?l=a(p,"can't be subject and object"):(d=E,f="subject"):l=a(p,"not confined to single graph");for(let T=0;T{switch(s){case"data":n=o;break;case"end":a=o;break}}},(s,o)=>{s&&this.emit("error",s)||o&&this.push(o)},(s,o)=>{this.emit("prefix",s,o)}),this._transform=(s,o,u)=>{n(s),u()},this._flush=s=>{a(),s()}}import(e){return e.on("data",r=>{this.write(r)}),e.on("end",()=>{this.end()}),e.on("error",r=>{this.emit("error",r)}),this}}class GM extends kt.Transform{constructor(e){super({encoding:"utf8",writableObjectMode:!0});const r=this._writer=new hR({write:(n,a,s)=>{this.push(n),s&&s()},end:n=>{this.push(null),n&&n()}},e);this._transform=(n,a,s)=>{r.addQuad(n,s)},this._flush=n=>{r.end(n)}}import(e){return e.on("data",r=>{this.write(r)}),e.on("end",()=>{this.end()}),e.on("error",r=>{this.emit("error",r)}),e.on("prefix",(r,n)=>{this._writer.addPrefix(r,n)}),this}}const cne={Lexer:cR,Parser:Pm,Writer:hR,Store:pR,StreamParser:QM,StreamWriter:GM,Util:VM,DataFactory:Pf,Term:Ys,NamedNode:Im,Literal:Bu,BlankNode:lR,Variable:dR,DefaultGraph:fR,Quad:wp,Triple:wp,termFromId:Hc,termToId:_i},lne=Object.freeze(Object.defineProperty({__proto__:null,BlankNode:lR,DataFactory:Pf,DefaultGraph:fR,Lexer:cR,Literal:Bu,NamedNode:Im,Parser:Pm,Quad:wp,Store:pR,StreamParser:QM,StreamWriter:GM,Term:Ys,Triple:wp,Util:VM,Variable:dR,Writer:hR,default:cne,termFromId:Hc,termToId:_i},Symbol.toStringTag,{value:"Module"})),rc=e_(lne);Object.defineProperty(Am,"__esModule",{value:!0});Am.ActorRdfParseN3=void 0;const dne=ml,fne=rc;class hne extends dne.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){var s;e.data.on("error",o=>a.emit("error",o));const a=e.data.pipe(new fne.StreamParser({baseIRI:(s=e.metadata)==null?void 0:s.baseIRI,format:r.endsWith("n3")?r:`${r}*`}));return{data:a,metadata:{triples:r==="text/turtle"||r==="application/n-triples"||r==="text/n3"}}}}Am.ActorRdfParseN3=hne;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Am,t)})(UM);var zM={},Dm={},WM={},Jd={},al={},XM={};(function(t){/** +`),this._subject=null),this._write=this._blockedWrite;let r=e&&((n,a)=>{r=null,e(n,a)});if(this._endStream)try{return this._outputStream.end(r)}catch{}r&&r()}}function UD(t){let e=one[t];return e===void 0&&(t.length===1?(e=t.charCodeAt(0).toString(16),e="\\u0000".substr(0,6-e.length)+e):(e=((t.charCodeAt(0)-55296)*1024+t.charCodeAt(1)+9216).toString(16),e="\\U00000000".substr(0,10-e.length)+e)),e}function qD(t){return t.replace(/[\]\/\(\)\*\+\?\.\\\$]/g,"\\$&")}class pR{constructor(e,r){this._size=0,this._graphs=Object.create(null),this._id=0,this._ids=Object.create(null),this._entities=Object.create(null),this._blankNodeIndex=0,!r&&e&&!e[0]&&(r=e,e=null),r=r||{},this._factory=r.factory||Pf,e&&this.addQuads(e)}_termFromId(e,r){if(e[0]==="."){const n=this._entities,a=e.split(".");return this._factory.quad(this._termFromId(n[a[1]]),this._termFromId(n[a[2]]),this._termFromId(n[a[3]]),a[4]&&this._termFromId(n[a[4]]))}return Hc(e,r)}_termToNumericId(e){if(e.termType==="Quad"){const r=this._termToNumericId(e.subject),n=this._termToNumericId(e.predicate),a=this._termToNumericId(e.object);let s;return r&&n&&a&&(Kd(e.graph)||(s=this._termToNumericId(e.graph)))&&this._ids[s?`.${r}.${n}.${a}.${s}`:`.${r}.${n}.${a}`]}return this._ids[_i(e)]}_termToNewNumericId(e){const r=e&&e.termType==="Quad"?`.${this._termToNewNumericId(e.subject)}.${this._termToNewNumericId(e.predicate)}.${this._termToNewNumericId(e.object)}${Kd(e.graph)?"":`.${this._termToNewNumericId(e.graph)}`}`:_i(e);return this._ids[r]||(this._ids[this._entities[++this._id]=r]=this._id)}get size(){let e=this._size;if(e!==null)return e;e=0;const r=this._graphs;let n,a;for(const s in r)for(const o in n=r[s].subjects)for(const u in a=n[o])e+=Object.keys(a[u]).length;return this._size=e}_addToIndex(e,r,n,a){const s=e[r]||(e[r]={}),o=s[n]||(s[n]={}),u=a in o;return u||(o[a]=null),!u}_removeFromIndex(e,r,n,a){const s=e[r],o=s[n];delete o[a];for(const u in o)return;delete s[n];for(const u in s)return;delete e[r]}*_findInIndex(e,r,n,a,s,o,u,c){let l,d,f;const h=this._entities,p=this._termFromId(c,this._factory),b={subject:null,predicate:null,object:null};r&&((l=e,e={})[r]=l[r]);for(const _ in e)if(d=e[_]){b[s]=this._termFromId(h[_],this._factory),n&&((l=d,d={})[n]=l[n]);for(const E in d)if(f=d[E]){b[o]=this._termFromId(h[E],this._factory);const w=a?a in f?[a]:[]:Object.keys(f);for(let O=0;O{n in r||(r[n]=!0,e(this._termFromId(this._entities[n],this._factory)))}}add(e){return this.addQuad(e),this}addQuad(e,r,n,a){r||(a=e.graph,n=e.object,r=e.predicate,e=e.subject),a=_i(a);let s=this._graphs[a];s||(s=this._graphs[a]={subjects:{},predicates:{},objects:{}},Object.freeze(s)),e=this._termToNewNumericId(e),r=this._termToNewNumericId(r),n=this._termToNewNumericId(n);const o=this._addToIndex(s.subjects,e,r,n);return this._addToIndex(s.predicates,r,n,e),this._addToIndex(s.objects,n,e,r),this._size=null,o}addQuads(e){for(let r=0;r{this.addQuad(r)}),e}removeQuad(e,r,n,a){r||(a=e.graph,n=e.object,r=e.predicate,e=e.subject),a=_i(a);const s=this._graphs;let o,u,c;if(!(e=e&&this._termToNumericId(e))||!(r=r&&this._termToNumericId(r))||!(n=n&&this._termToNumericId(n))||!(o=s[a])||!(u=o.subjects[e])||!(c=u[r])||!(n in c))return!1;this._removeFromIndex(o.subjects,e,r,n),this._removeFromIndex(o.predicates,r,n,e),this._removeFromIndex(o.objects,n,e,r),this._size!==null&&this._size--;for(e in o.subjects)return!0;return delete s[a],!0}removeQuads(e){for(let r=0;r{this.removeQuad(r)}),e}removeMatches(e,r,n,a){const s=new kt.Readable({objectMode:!0});return s._read=()=>{for(const o of this.readQuads(e,r,n,a))s.push(o);s.push(null)},this.remove(s)}deleteGraph(e){return this.removeMatches(null,null,null,e)}getQuads(e,r,n,a){return[...this.readQuads(e,r,n,a)]}*readQuads(e,r,n,a){a=a&&_i(a);const s=this._getGraphs(a);let o,u,c,l;if(!(e&&!(u=this._termToNumericId(e))||r&&!(c=this._termToNumericId(r))||n&&!(l=this._termToNumericId(n))))for(const d in s)(o=s[d])&&(u?l?yield*this._findInIndex(o.objects,l,u,c,"object","subject","predicate",d):yield*this._findInIndex(o.subjects,u,c,null,"subject","predicate","object",d):c?yield*this._findInIndex(o.predicates,c,l,null,"predicate","object","subject",d):l?yield*this._findInIndex(o.objects,l,null,null,"object","subject","predicate",d):yield*this._findInIndex(o.subjects,null,null,null,"subject","predicate","object",d))}match(e,r,n,a){return new yR(this,e,r,n,a)}countQuads(e,r,n,a){a=a&&_i(a);const s=this._getGraphs(a);let o=0,u,c,l,d;if(e&&!(c=this._termToNumericId(e))||r&&!(l=this._termToNumericId(r))||n&&!(d=this._termToNumericId(n)))return 0;for(const f in s)(u=s[f])&&(e?n?o+=this._countInIndex(u.objects,d,c,l):o+=this._countInIndex(u.subjects,c,l,d):r?o+=this._countInIndex(u.predicates,l,d,c):o+=this._countInIndex(u.objects,d,c,l));return o}forEach(e,r,n,a,s){this.some(o=>(e(o),!1),r,n,a,s)}every(e,r,n,a,s){let o=!1;const u=!this.some(c=>(o=!0,!e(c)),r,n,a,s);return o&&u}some(e,r,n,a,s){for(const o of this.readQuads(r,n,a,s))if(e(o))return!0;return!1}getSubjects(e,r,n){const a=[];return this.forSubjects(s=>{a.push(s)},e,r,n),a}forSubjects(e,r,n,a){a=a&&_i(a);const s=this._getGraphs(a);let o,u,c;if(e=this._uniqueEntities(e),!(r&&!(u=this._termToNumericId(r))||n&&!(c=this._termToNumericId(n))))for(a in s)(o=s[a])&&(u?c?this._loopBy2Keys(o.predicates,u,c,e):this._loopByKey1(o.subjects,u,e):c?this._loopByKey0(o.objects,c,e):this._loop(o.subjects,e))}getPredicates(e,r,n){const a=[];return this.forPredicates(s=>{a.push(s)},e,r,n),a}forPredicates(e,r,n,a){a=a&&_i(a);const s=this._getGraphs(a);let o,u,c;if(e=this._uniqueEntities(e),!(r&&!(u=this._termToNumericId(r))||n&&!(c=this._termToNumericId(n))))for(a in s)(o=s[a])&&(u?c?this._loopBy2Keys(o.objects,c,u,e):this._loopByKey0(o.subjects,u,e):c?this._loopByKey1(o.predicates,c,e):this._loop(o.predicates,e))}getObjects(e,r,n){const a=[];return this.forObjects(s=>{a.push(s)},e,r,n),a}forObjects(e,r,n,a){a=a&&_i(a);const s=this._getGraphs(a);let o,u,c;if(e=this._uniqueEntities(e),!(r&&!(u=this._termToNumericId(r))||n&&!(c=this._termToNumericId(n))))for(a in s)(o=s[a])&&(u?c?this._loopBy2Keys(o.subjects,u,c,e):this._loopByKey1(o.objects,u,e):c?this._loopByKey0(o.predicates,c,e):this._loop(o.objects,e))}getGraphs(e,r,n){const a=[];return this.forGraphs(s=>{a.push(s)},e,r,n),a}forGraphs(e,r,n,a){for(const s in this._graphs)this.some(o=>(e(o.graph),!0),r,n,a,s)}createBlankNode(e){let r,n;if(e)for(r=e=`_:${e}`,n=1;this._ids[r];)r=e+n++;else do r=`_:b${this._blankNodeIndex++}`;while(this._ids[r]);return this._ids[r]=++this._id,this._entities[this._id]=r,this._factory.blankNode(r.substr(2))}extractLists({remove:e=!1,ignoreErrors:r=!1}={}){const n={},a=r?()=>!0:(u,c)=>{throw new Error(`${u.value} ${c}`)},s=this.getQuads(null,Wn.rdf.rest,Wn.rdf.nil,null),o=e?[...s]:[];return s.forEach(u=>{const c=[];let l=!1,d,f;const h=u.graph;let p=u.subject;for(;p&&!l;){const b=this.getQuads(null,null,p,null),_=this.getQuads(p,null,null,null);let E,w=null,O=null,A=null;for(let T=0;T<_.length&&!l;T++)E=_[T],E.graph.equals(h)?d?l=a(p,"has non-list arcs out"):E.predicate.value===Wn.rdf.first?w?l=a(p,"has multiple rdf:first arcs"):o.push(w=E):E.predicate.value===Wn.rdf.rest?O?l=a(p,"has multiple rdf:rest arcs"):o.push(O=E):b.length?l=a(p,"can't be subject and object"):(d=E,f="subject"):l=a(p,"not confined to single graph");for(let T=0;T{switch(s){case"data":n=o;break;case"end":a=o;break}}},(s,o)=>{s&&this.emit("error",s)||o&&this.push(o)},(s,o)=>{this.emit("prefix",s,o)}),this._transform=(s,o,u)=>{n(s),u()},this._flush=s=>{a(),s()}}import(e){return e.on("data",r=>{this.write(r)}),e.on("end",()=>{this.end()}),e.on("error",r=>{this.emit("error",r)}),this}}class GM extends kt.Transform{constructor(e){super({encoding:"utf8",writableObjectMode:!0});const r=this._writer=new hR({write:(n,a,s)=>{this.push(n),s&&s()},end:n=>{this.push(null),n&&n()}},e);this._transform=(n,a,s)=>{r.addQuad(n,s)},this._flush=n=>{r.end(n)}}import(e){return e.on("data",r=>{this.write(r)}),e.on("end",()=>{this.end()}),e.on("error",r=>{this.emit("error",r)}),e.on("prefix",(r,n)=>{this._writer.addPrefix(r,n)}),this}}const cne={Lexer:cR,Parser:Pm,Writer:hR,Store:pR,StreamParser:QM,StreamWriter:GM,Util:VM,DataFactory:Pf,Term:Ys,NamedNode:Im,Literal:Bu,BlankNode:lR,Variable:dR,DefaultGraph:fR,Quad:Sp,Triple:Sp,termFromId:Hc,termToId:_i},lne=Object.freeze(Object.defineProperty({__proto__:null,BlankNode:lR,DataFactory:Pf,DefaultGraph:fR,Lexer:cR,Literal:Bu,NamedNode:Im,Parser:Pm,Quad:Sp,Store:pR,StreamParser:QM,StreamWriter:GM,Term:Ys,Triple:Sp,Util:VM,Variable:dR,Writer:hR,default:cne,termFromId:Hc,termToId:_i},Symbol.toStringTag,{value:"Module"})),rc=e_(lne);Object.defineProperty(Am,"__esModule",{value:!0});Am.ActorRdfParseN3=void 0;const dne=ml,fne=rc;class hne extends dne.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){var s;e.data.on("error",o=>a.emit("error",o));const a=e.data.pipe(new fne.StreamParser({baseIRI:(s=e.metadata)==null?void 0:s.baseIRI,format:r.endsWith("n3")?r:`${r}*`}));return{data:a,metadata:{triples:r==="text/turtle"||r==="application/n-triples"||r==="text/n3"}}}}Am.ActorRdfParseN3=hne;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Am,t)})(UM);var zM={},Dm={},WM={},Jd={},al={},XM={};(function(t){/** * Character classes and associated utilities for the 5th edition of XML 1.0. * * @author Louis-Dominique Dubeau @@ -126,24 +126,24 @@ ${a.map(u=>u.message).join(` * @author Louis-Dominique Dubeau * @license MIT * @copyright Louis-Dominique Dubeau - */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");function e(n){return n>=65&&n<=90||n===95||n>=97&&n<=122||n>=192&&n<=214||n>=216&&n<=246||n>=248&&n<=767||n>=880&&n<=893||n>=895&&n<=8191||n>=8204&&n<=8205||n>=8304&&n<=8591||n>=11264&&n<=12271||n>=12289&&n<=55295||n>=63744&&n<=64975||n>=65008&&n<=65533||n>=65536&&n<=983039}t.isNCNameStartChar=e;function r(n){return e(n)||n===45||n===46||n>=48&&n<=57||n===183||n>=768&&n<=879||n>=8255&&n<=8256}t.isNCNameChar=r})(JM);Object.defineProperty(al,"__esModule",{value:!0});al.SaxesParser=al.EVENTS=void 0;const Df=XM,pne=KM,bR=JM;var Ni=Df.isS,yne=Df.isChar,Xf=Df.isNameStartChar,VD=Df.isNameChar,YM=Df.S_LIST,bne=Df.NAME_RE,_ne=pne.isChar,gne=bR.isNCNameStartChar,mne=bR.isNCNameChar,vne=bR.NC_NAME_RE;const J1="http://www.w3.org/XML/1998/namespace",fd="http://www.w3.org/2000/xmlns/",wne={__proto__:null,xml:J1,xmlns:fd},Sne={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},Nr=-1,ms=-2,HD=0,Tne=1,BS=2,Ene=3,kl=4,One=5,Ane=6,Rne=7,$S=8,xne=9,Ine=10,Pne=11,Dne=12,li=13,Wy=14,US=15,Nne=16,qS=17,Cne=18,jne=19,VS=20,Mne=21,Fne=22,Lne=23,kD=24,HS=25,Xy=26,QD=27,Bne=28,$ne=29,GD=30,Une=31,qne=32,mc=33,Vne=34,kS=35,Kf=36,QS=37,Hne=38,zD=39,WD=40,kne=41,XD=42,Qne=43,Gne=44,GS=9,qa=10,zS=13,KD=32,JD=33,ZM=34,Uh=38,eF=39,Ky=45,Jy=47,zne=59,Ou=60,nd=61,on=62,jn=63,tF=91,id=93,YD=133,ZD=8232,Yy=t=>t===ZM||t===eF,rF=[ZM,eF],Wne=[...rF,tF,on],Xne=[...rF,Ou,id],Kne=[nd,jn,...YM],Jne=[...YM,on,Uh,Ou];function JE(t,e,r){switch(e){case"xml":r!==J1&&t.fail(`xml prefix must be bound to ${J1}.`);break;case"xmlns":r!==fd&&t.fail(`xmlns prefix must be bound to ${fd}.`);break}switch(r){case fd:t.fail(e===""?`the default namespace may not be set to ${r}.`:`may not assign a prefix (even "xmlns") to the URI ${fd}.`);break;case J1:switch(e){case"xml":break;case"":t.fail(`the default namespace may not be set to ${r}.`);break;default:t.fail("may not assign the xml namespace to another prefix.")}break}}function Yne(t,e){for(const r of Object.keys(e))JE(t,r,e[r])}const Zne=t=>vne.test(t),eie=t=>bne.test(t),vc=0,eN=1,WS=2;al.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const tN={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"};class tie{get closed(){return this._closed}constructor(e){this.opt=e??{},this.fragmentOpt=!!this.opt.fragment;const r=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,r){this.nameStartCheck=gne,this.nameCheck=mne,this.isName=Zne,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},wne);const n=this.opt.additionalNamespaces;n!=null&&(Yne(this,n),Object.assign(this.ns,n))}else this.nameStartCheck=Xf,this.nameCheck=VD,this.isName=eie,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=vc,this.attribList=[];const{fragmentOpt:r}=this;this.state=r?li:HD,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=r,this.xmlDeclPossible=!r,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:n}=this.opt;if(n===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");n="1.0"}this.setXMLVersion(n),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(Sne),(e=this.readyHandler)===null||e===void 0||e.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,r){this[tN[e]]=r}off(e){this[tN[e]]=void 0}makeError(e){var r;let n=(r=this.fileName)!==null&&r!==void 0?r:"";return this.trackPosition&&(n.length>0&&(n+=":"),n+=`${this.line}:${this.column}`),n.length>0&&(n+=": "),new Error(n+e)}fail(e){const r=this.makeError(e),n=this.errorHandler;if(n===void 0)throw r;return n(r),this}write(e){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let r=!1;e===null?(r=!0,e=""):typeof e=="object"&&(e=e.toString()),this.carriedFromPrevious!==void 0&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let n=e.length;const a=e.charCodeAt(n-1);!r&&(a===zS||a>=55296&&a<=56319)&&(this.carriedFromPrevious=e[n-1],n--,e=e.slice(0,n));const{stateTable:s}=this;for(this.chunk=e,this.i=0;this.i=e.length)return Nr;const n=e.charCodeAt(r);if(this.column++,n<55296){if(n>=KD||n===GS)return n;switch(n){case qa:return this.line++,this.column=0,this.positionAtNewLine=this.position,qa;case zS:return e.charCodeAt(r+1)===qa&&(this.i=r+2),this.line++,this.column=0,this.positionAtNewLine=this.position,ms;default:return this.fail("disallowed character."),n}}if(n>56319)return n>=57344&&n<=65533||this.fail("disallowed character."),n;const a=65536+(n-55296)*1024+(e.charCodeAt(r+1)-56320);return this.i=r+2,a>1114111&&this.fail("disallowed character."),a}getCode11(){const{chunk:e,i:r}=this;if(this.prevI=r,this.i=r+1,r>=e.length)return Nr;const n=e.charCodeAt(r);if(this.column++,n<55296){if(n>31&&n<127||n>159&&n!==ZD||n===GS)return n;switch(n){case qa:return this.line++,this.column=0,this.positionAtNewLine=this.position,qa;case zS:{const s=e.charCodeAt(r+1);(s===qa||s===YD)&&(this.i=r+2)}case YD:case ZD:return this.line++,this.column=0,this.positionAtNewLine=this.position,ms;default:return this.fail("disallowed character."),n}}if(n>56319)return n>=57344&&n<=65533||this.fail("disallowed character."),n;const a=65536+(n-55296)*1024+(e.charCodeAt(r+1)-56320);return this.i=r+2,a>1114111&&this.fail("disallowed character."),a}getCodeNorm(){const e=this.getCode();return e===ms?qa:e}unget(){this.i=this.prevI,this.column--}captureTo(e){let{i:r}=this;const{chunk:n}=this;for(;;){const a=this.getCode(),s=a===ms,o=s?qa:a;if(o===Nr||e.includes(o))return this.text+=n.slice(r,this.prevI),o;s&&(this.text+=`${n.slice(r,this.prevI)} + */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");function e(n){return n>=65&&n<=90||n===95||n>=97&&n<=122||n>=192&&n<=214||n>=216&&n<=246||n>=248&&n<=767||n>=880&&n<=893||n>=895&&n<=8191||n>=8204&&n<=8205||n>=8304&&n<=8591||n>=11264&&n<=12271||n>=12289&&n<=55295||n>=63744&&n<=64975||n>=65008&&n<=65533||n>=65536&&n<=983039}t.isNCNameStartChar=e;function r(n){return e(n)||n===45||n===46||n>=48&&n<=57||n===183||n>=768&&n<=879||n>=8255&&n<=8256}t.isNCNameChar=r})(JM);Object.defineProperty(al,"__esModule",{value:!0});al.SaxesParser=al.EVENTS=void 0;const Df=XM,pne=KM,bR=JM;var Ni=Df.isS,yne=Df.isChar,Xf=Df.isNameStartChar,VD=Df.isNameChar,YM=Df.S_LIST,bne=Df.NAME_RE,_ne=pne.isChar,gne=bR.isNCNameStartChar,mne=bR.isNCNameChar,vne=bR.NC_NAME_RE;const J1="http://www.w3.org/XML/1998/namespace",fd="http://www.w3.org/2000/xmlns/",wne={__proto__:null,xml:J1,xmlns:fd},Sne={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},Nr=-1,ms=-2,HD=0,Tne=1,BS=2,Ene=3,kl=4,One=5,Ane=6,Rne=7,$S=8,xne=9,Ine=10,Pne=11,Dne=12,li=13,Xy=14,US=15,Nne=16,qS=17,Cne=18,jne=19,VS=20,Mne=21,Fne=22,Lne=23,kD=24,HS=25,Ky=26,QD=27,Bne=28,$ne=29,GD=30,Une=31,qne=32,mc=33,Vne=34,kS=35,Kf=36,QS=37,Hne=38,zD=39,WD=40,kne=41,XD=42,Qne=43,Gne=44,GS=9,qa=10,zS=13,KD=32,JD=33,ZM=34,qh=38,eF=39,Jy=45,Yy=47,zne=59,Ou=60,nd=61,on=62,jn=63,tF=91,id=93,YD=133,ZD=8232,Zy=t=>t===ZM||t===eF,rF=[ZM,eF],Wne=[...rF,tF,on],Xne=[...rF,Ou,id],Kne=[nd,jn,...YM],Jne=[...YM,on,qh,Ou];function JE(t,e,r){switch(e){case"xml":r!==J1&&t.fail(`xml prefix must be bound to ${J1}.`);break;case"xmlns":r!==fd&&t.fail(`xmlns prefix must be bound to ${fd}.`);break}switch(r){case fd:t.fail(e===""?`the default namespace may not be set to ${r}.`:`may not assign a prefix (even "xmlns") to the URI ${fd}.`);break;case J1:switch(e){case"xml":break;case"":t.fail(`the default namespace may not be set to ${r}.`);break;default:t.fail("may not assign the xml namespace to another prefix.")}break}}function Yne(t,e){for(const r of Object.keys(e))JE(t,r,e[r])}const Zne=t=>vne.test(t),eie=t=>bne.test(t),vc=0,eN=1,WS=2;al.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];const tN={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"};class tie{get closed(){return this._closed}constructor(e){this.opt=e??{},this.fragmentOpt=!!this.opt.fragment;const r=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,r){this.nameStartCheck=gne,this.nameCheck=mne,this.isName=Zne,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},wne);const n=this.opt.additionalNamespaces;n!=null&&(Yne(this,n),Object.assign(this.ns,n))}else this.nameStartCheck=Xf,this.nameCheck=VD,this.isName=eie,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=vc,this.attribList=[];const{fragmentOpt:r}=this;this.state=r?li:HD,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=r,this.xmlDeclPossible=!r,this.xmlDeclExpects=["version"],this.entityReturnState=void 0;let{defaultXMLVersion:n}=this.opt;if(n===void 0){if(this.opt.forceXMLVersion===!0)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");n="1.0"}this.setXMLVersion(n),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(Sne),(e=this.readyHandler)===null||e===void 0||e.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,r){this[tN[e]]=r}off(e){this[tN[e]]=void 0}makeError(e){var r;let n=(r=this.fileName)!==null&&r!==void 0?r:"";return this.trackPosition&&(n.length>0&&(n+=":"),n+=`${this.line}:${this.column}`),n.length>0&&(n+=": "),new Error(n+e)}fail(e){const r=this.makeError(e),n=this.errorHandler;if(n===void 0)throw r;return n(r),this}write(e){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");let r=!1;e===null?(r=!0,e=""):typeof e=="object"&&(e=e.toString()),this.carriedFromPrevious!==void 0&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let n=e.length;const a=e.charCodeAt(n-1);!r&&(a===zS||a>=55296&&a<=56319)&&(this.carriedFromPrevious=e[n-1],n--,e=e.slice(0,n));const{stateTable:s}=this;for(this.chunk=e,this.i=0;this.i=e.length)return Nr;const n=e.charCodeAt(r);if(this.column++,n<55296){if(n>=KD||n===GS)return n;switch(n){case qa:return this.line++,this.column=0,this.positionAtNewLine=this.position,qa;case zS:return e.charCodeAt(r+1)===qa&&(this.i=r+2),this.line++,this.column=0,this.positionAtNewLine=this.position,ms;default:return this.fail("disallowed character."),n}}if(n>56319)return n>=57344&&n<=65533||this.fail("disallowed character."),n;const a=65536+(n-55296)*1024+(e.charCodeAt(r+1)-56320);return this.i=r+2,a>1114111&&this.fail("disallowed character."),a}getCode11(){const{chunk:e,i:r}=this;if(this.prevI=r,this.i=r+1,r>=e.length)return Nr;const n=e.charCodeAt(r);if(this.column++,n<55296){if(n>31&&n<127||n>159&&n!==ZD||n===GS)return n;switch(n){case qa:return this.line++,this.column=0,this.positionAtNewLine=this.position,qa;case zS:{const s=e.charCodeAt(r+1);(s===qa||s===YD)&&(this.i=r+2)}case YD:case ZD:return this.line++,this.column=0,this.positionAtNewLine=this.position,ms;default:return this.fail("disallowed character."),n}}if(n>56319)return n>=57344&&n<=65533||this.fail("disallowed character."),n;const a=65536+(n-55296)*1024+(e.charCodeAt(r+1)-56320);return this.i=r+2,a>1114111&&this.fail("disallowed character."),a}getCodeNorm(){const e=this.getCode();return e===ms?qa:e}unget(){this.i=this.prevI,this.column--}captureTo(e){let{i:r}=this;const{chunk:n}=this;for(;;){const a=this.getCode(),s=a===ms,o=s?qa:a;if(o===Nr||e.includes(o))return this.text+=n.slice(r,this.prevI),o;s&&(this.text+=`${n.slice(r,this.prevI)} `,r=this.i)}}captureToChar(e){let{i:r}=this;const{chunk:n}=this;for(;;){let a=this.getCode();switch(a){case ms:this.text+=`${n.slice(r,this.prevI)} -`,r=this.i,a=qa;break;case Nr:return this.text+=n.slice(r),!1}if(a===e)return this.text+=n.slice(r,this.prevI),!0}}captureNameChars(){const{chunk:e,i:r}=this;for(;;){const n=this.getCode();if(n===Nr)return this.name+=e.slice(r),Nr;if(!VD(n))return this.name+=e.slice(r,this.prevI),n===ms?qa:n}}skipSpaces(){for(;;){const e=this.getCodeNorm();if(e===Nr||!Ni(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,e==="1.0"?(this.isChar=yne,this.getCode=this.getCode10):(this.isChar=_ne,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=Tne}sBeginWhitespace(){const e=this.i,r=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),r){case Ou:if(this.state=US,this.text.length!==0)throw new Error("no-empty text at start");break;case Nr:break;default:this.unget(),this.state=li,this.xmlDeclPossible=!1}}sDoctype(){var e;const r=this.captureTo(Wne);switch(r){case on:{(e=this.doctypeHandler)===null||e===void 0||e.call(this,this.text),this.text="",this.state=li,this.doctype=!0;break}case Nr:break;default:this.text+=String.fromCodePoint(r),r===tF?this.state=kl:Yy(r)&&(this.state=Ene,this.q=r)}}sDoctypeQuote(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=BS)}sDTD(){const e=this.captureTo(Xne);e!==Nr&&(this.text+=String.fromCodePoint(e),e===id?this.state=BS:e===Ou?this.state=Ane:Yy(e)&&(this.state=One,this.q=e))}sDTDQuoted(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=kl,this.q=null)}sDTDOpenWaka(){const e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case JD:this.state=Rne,this.openWakaBang="";break;case jn:this.state=Pne;break;default:this.state=kl}}sDTDOpenWakaBang(){const e=String.fromCodePoint(this.getCodeNorm()),r=this.openWakaBang+=e;this.text+=e,r!=="-"&&(this.state=r==="--"?$S:kl,this.openWakaBang="")}sDTDComment(){this.captureToChar(Ky)&&(this.text+="-",this.state=xne)}sDTDCommentEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=e===Ky?Ine:$S}sDTDCommentEnded(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===on?this.state=kl:(this.fail("malformed comment."),this.state=$S)}sDTDPI(){this.captureToChar(jn)&&(this.text+="?",this.state=Dne)}sDTDPIEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===on&&(this.state=kl)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:e}=this;const{chunk:r}=this;e:for(;;)switch(this.getCode()){case ms:this.entity+=`${r.slice(e,this.prevI)} -`,e=this.i;break;case zne:{const{entityReturnState:n}=this,a=this.entity+r.slice(e,this.prevI);this.state=n;let s;a===""?(this.fail("empty entity name."),s="&;"):(s=this.parseEntity(a),this.entity=""),(n!==li||this.textHandler!==void 0)&&(this.text+=s);break e}case Nr:this.entity+=r.slice(e);break e}}sOpenWaka(){const e=this.getCode();if(Xf(e))this.state=Vne,this.unget(),this.xmlDeclPossible=!1;else switch(e){case Jy:this.state=Qne,this.xmlDeclPossible=!1;break;case JD:this.state=Nne,this.openWakaBang="",this.xmlDeclPossible=!1;break;case jn:this.state=Lne;break;default:this.fail("disallowed character in tag name"),this.state=li,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=VS,this.openWakaBang="";break;case"--":this.state=qS,this.openWakaBang="";break;case"DOCTYPE":this.state=BS,(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(Ky)&&(this.state=Cne)}sCommentEnding(){var e;const r=this.getCodeNorm();r===Ky?(this.state=jne,(e=this.commentHandler)===null||e===void 0||e.call(this,this.text),this.text=""):(this.text+=`-${String.fromCodePoint(r)}`,this.state=qS)}sCommentEnded(){const e=this.getCodeNorm();e!==on?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(e)}`,this.state=qS):this.state=li}sCData(){this.captureToChar(id)&&(this.state=Mne)}sCDataEnding(){const e=this.getCodeNorm();e===id?this.state=Fne:(this.text+=`]${String.fromCodePoint(e)}`,this.state=VS)}sCDataEnding2(){var e;const r=this.getCodeNorm();switch(r){case on:{(e=this.cdataHandler)===null||e===void 0||e.call(this,this.text),this.text="",this.state=li;break}case id:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(r)}`,this.state=VS}}sPIFirstChar(){const e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=kD):e===jn||Ni(e)?(this.fail("processing instruction without a target."),this.state=e===jn?Xy:HS):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(e),this.state=kD)}sPIRest(){const{chunk:e,i:r}=this;for(;;){const n=this.getCodeNorm();if(n===Nr){this.piTarget+=e.slice(r);return}if(!this.nameCheck(n)){this.piTarget+=e.slice(r,this.prevI);const a=n===jn;a||Ni(n)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=a?mc:QD):this.state=a?Xy:HS:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(n));break}}}sPIBody(){if(this.text.length===0){const e=this.getCodeNorm();e===jn?this.state=Xy:Ni(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(jn)&&(this.state=Xy)}sPIEnding(){var e;const r=this.getCodeNorm();if(r===on){const{piTarget:n}=this;n.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),(e=this.piHandler)===null||e===void 0||e.call(this,{target:n,body:this.text}),this.piTarget=this.text="",this.state=li}else r===jn?this.text+="?":(this.text+=`?${String.fromCodePoint(r)}`,this.state=HS);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const e=this.skipSpaces();if(e===jn){this.state=mc;return}e!==Nr&&(this.state=Bne,this.name=String.fromCodePoint(e))}sXMLDeclName(){const e=this.captureTo(Kne);if(e===jn){this.state=mc,this.name+=this.text,this.text="",this.fail("XML declaration is incomplete.");return}if(Ni(e)||e===nd){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===nd?GD:$ne}}sXMLDeclEq(){const e=this.getCodeNorm();if(e===jn){this.state=mc,this.fail("XML declaration is incomplete.");return}Ni(e)||(e!==nd&&this.fail("value required."),this.state=GD)}sXMLDeclValueStart(){const e=this.getCodeNorm();if(e===jn){this.state=mc,this.fail("XML declaration is incomplete.");return}Ni(e)||(Yy(e)?this.q=e:(this.fail("value must be quoted."),this.q=KD),this.state=Une)}sXMLDeclValue(){const e=this.captureTo([this.q,jn]);if(e===jn){this.state=mc,this.text="",this.fail("XML declaration is incomplete.");return}if(e===Nr)return;const r=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const n=r;this.xmlDecl.version=n,/^1\.[0-9]+$/.test(n)?this.opt.forceXMLVersion||this.setXMLVersion(n):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(r)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=r;break;case"standalone":r!=="yes"&&r!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=r;break}this.name="",this.state=qne}sXMLDeclSeparator(){const e=this.getCodeNorm();if(e===jn){this.state=mc;return}Ni(e)||(this.fail("whitespace required."),this.unget()),this.state=QD}sXMLDeclEnding(){var e;this.getCodeNorm()===on?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),(e=this.xmldeclHandler)===null||e===void 0||e.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=li):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){var e;const r=this.captureNameChars();if(r===Nr)return;const n=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=n.ns=Object.create(null)),(e=this.openTagStartHandler)===null||e===void 0||e.call(this,n),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),r){case on:this.openTag();break;case Jy:this.state=kS;break;default:Ni(r)||this.fail("disallowed character in tag name."),this.state=Kf}}sOpenTagSlash(){this.getCode()===on?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=Kf)}sAttrib(){const e=this.skipSpaces();e!==Nr&&(Xf(e)?(this.unget(),this.state=QS):e===on?this.openTag():e===Jy?this.state=kS:this.fail("disallowed character in attribute name."))}sAttribName(){const e=this.captureNameChars();e===nd?this.state=zD:Ni(e)?this.state=Hne:e===on?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):e!==Nr&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const e=this.skipSpaces();switch(e){case Nr:return;case nd:this.state=zD;break;default:this.fail("attribute without value."),this.text="",this.name="",e===on?this.openTag():Xf(e)?(this.unget(),this.state=QS):(this.fail("disallowed character in attribute name."),this.state=Kf)}}sAttribValue(){const e=this.getCodeNorm();Yy(e)?(this.q=e,this.state=WD):Ni(e)||(this.fail("unquoted attribute value."),this.state=XD,this.unget())}sAttribValueQuoted(){const{q:e,chunk:r}=this;let{i:n}=this;for(;;)switch(this.getCode()){case e:this.pushAttrib(this.name,this.text+r.slice(n,this.prevI)),this.name=this.text="",this.q=null,this.state=kne;return;case Uh:this.text+=r.slice(n,this.prevI),this.state=Wy,this.entityReturnState=WD;return;case qa:case ms:case GS:this.text+=`${r.slice(n,this.prevI)} `,n=this.i;break;case Ou:this.text+=r.slice(n,this.prevI),this.fail("disallowed character.");return;case Nr:this.text+=r.slice(n);return}}sAttribValueClosed(){const e=this.getCodeNorm();Ni(e)?this.state=Kf:e===on?this.openTag():e===Jy?this.state=kS:Xf(e)?(this.fail("no whitespace between attributes."),this.unget(),this.state=QS):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const e=this.captureTo(Jne);switch(e){case Uh:this.state=Wy,this.entityReturnState=XD;break;case Ou:this.fail("disallowed character.");break;case Nr: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===on?this.openTag():this.state=Kf}}sCloseTag(){const e=this.captureNameChars();e===on?this.closeTag():Ni(e)?this.state=Gne:e!==Nr&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case on:this.closeTag();break;case Nr:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:e,forbiddenState:r}=this;const{chunk:n,textHandler:a}=this;e:for(;;)switch(this.getCode()){case Ou:{if(this.state=US,a!==void 0){const{text:s}=this,o=n.slice(e,this.prevI);s.length!==0?(a(s+o),this.text=""):o.length!==0&&a(o)}r=vc;break e}case Uh:this.state=Wy,this.entityReturnState=li,a!==void 0&&(this.text+=n.slice(e,this.prevI)),r=vc;break e;case id:switch(r){case vc:r=eN;break;case eN:r=WS;break;case WS:break;default:throw new Error("impossible state")}break;case on:r===WS&&this.fail('the string "]]>" is disallowed in char data.'),r=vc;break;case ms:a!==void 0&&(this.text+=`${n.slice(e,this.prevI)} -`),e=this.i,r=vc;break;case Nr:a!==void 0&&(this.text+=n.slice(e));break e;default:r=vc}this.forbiddenState=r}handleTextOutsideRoot(){let{i:e}=this;const{chunk:r,textHandler:n}=this;let a=!1;e:for(;;){const s=this.getCode();switch(s){case Ou:{if(this.state=US,n!==void 0){const{text:o}=this,u=r.slice(e,this.prevI);o.length!==0?(n(o+u),this.text=""):u.length!==0&&n(u)}break e}case Uh:this.state=Wy,this.entityReturnState=li,n!==void 0&&(this.text+=r.slice(e,this.prevI)),a=!0;break e;case ms:n!==void 0&&(this.text+=`${r.slice(e,this.prevI)} -`),e=this.i;break;case Nr:n!==void 0&&(this.text+=r.slice(e));break e;default:Ni(s)||(a=!0)}}a&&(!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,r){var n;const{prefix:a,local:s}=this.qname(e),o={name:e,prefix:a,local:s,value:r};if(this.attribList.push(o),(n=this.attributeHandler)===null||n===void 0||n.call(this,o),a==="xmlns"){const u=r.trim();this.currentXMLVersion==="1.0"&&u===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[s]=u,JE(this,s,u)}else if(e==="xmlns"){const u=r.trim();this.topNS[""]=u,JE(this,"",u)}}pushAttribPlain(e,r){var n;const a={name:e,value:r};this.attribList.push(a),(n=this.attributeHandler)===null||n===void 0||n.call(this,a)}end(){var e,r;this.sawRoot||this.fail("document must contain a root element.");const{tags:n}=this;for(;n.length>0;){const s=n.pop();this.fail(`unclosed tag: ${s.name}`)}this.state!==HD&&this.state!==li&&this.fail("unexpected end.");const{text:a}=this;return a.length!==0&&((e=this.textHandler)===null||e===void 0||e.call(this,a),this.text=""),this._closed=!0,(r=this.endHandler)===null||r===void 0||r.call(this),this._init(),this}resolve(e){var r,n;let a=this.topNS[e];if(a!==void 0)return a;const{tags:s}=this;for(let o=s.length-1;o>=0;o--)if(a=s[o].ns[e],a!==void 0)return a;return a=this.ns[e],a!==void 0?a:(n=(r=this.opt).resolvePrefix)===null||n===void 0?void 0:n.call(r,e)}qname(e){const r=e.indexOf(":");if(r===-1)return{prefix:"",local:e};const n=e.slice(r+1),a=e.slice(0,r);return(a===""||n===""||n.includes(":"))&&this.fail(`malformed name: ${e}.`),{prefix:a,local:n}}processAttribsNS(){var e;const{attribList:r}=this,n=this.tag;{const{prefix:o,local:u}=this.qname(n.name);n.prefix=o,n.local=u;const c=n.uri=(e=this.resolve(o))!==null&&e!==void 0?e:"";o!==""&&(o==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),c===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(o)}.`),n.uri=o))}if(r.length===0)return;const{attributes:a}=n,s=new Set;for(const o of r){const{name:u,prefix:c,local:l}=o;let d,f;c===""?(d=u==="xmlns"?fd:"",f=u):(d=this.resolve(c),d===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(c)}.`),d=c),f=`{${d}}${l}`),s.has(f)&&this.fail(`duplicate attribute: ${f}.`),s.add(f),o.uri=d,a[u]=o}this.attribList=[]}processAttribsPlain(){const{attribList:e}=this,r=this.tag.attributes;for(const{name:n,value:a}of e)r[n]!==void 0&&this.fail(`duplicate attribute: ${n}.`),r[n]=a;this.attribList=[]}openTag(){var e;this.processAttribs();const{tags:r}=this,n=this.tag;n.isSelfClosing=!1,(e=this.openTagHandler)===null||e===void 0||e.call(this,n),r.push(n),this.state=li,this.name=""}openSelfClosingTag(){var e,r,n;this.processAttribs();const{tags:a}=this,s=this.tag;s.isSelfClosing=!0,(e=this.openTagHandler)===null||e===void 0||e.call(this,s),(r=this.closeTagHandler)===null||r===void 0||r.call(this,s),(this.tag=(n=a[a.length-1])!==null&&n!==void 0?n:null)===null&&(this.closedRoot=!0),this.state=li,this.name=""}closeTag(){const{tags:e,name:r}=this;if(this.state=li,this.name="",r===""){this.fail("weird empty close tag."),this.text+="";return}const n=this.closeTagHandler;let a=e.length;for(;a-- >0;){const s=this.tag=e.pop();if(this.topNS=s.ns,n==null||n(s),s.name===r)break;this.fail("unexpected close tag.")}a===0?this.closedRoot=!0:a<0&&(this.fail(`unmatched closing tag: ${r}.`),this.text+=``)}parseEntity(e){if(e[0]!=="#"){const n=this.ENTITIES[e];return n!==void 0?n:(this.fail(this.isName(e)?"undefined entity.":"disallowed character in entity name."),`&${e};`)}let r=NaN;return e[1]==="x"&&/^#x[0-9a-f]+$/i.test(e)?r=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(r=parseInt(e.slice(1),10)),this.isChar(r)?String.fromCodePoint(r):(this.fail("malformed character entity."),`&${e};`)}}al.SaxesParser=tie;var Nm={};Object.defineProperty(Nm,"__esModule",{value:!0});Nm.ParseError=void 0;let rie=class extends Error{constructor(e,r){const n=e.saxParser;super(e.trackPosition?`Line ${n.line} column ${n.column+1}: ${r}`:r)}};Nm.ParseError=rie;var nF={},iF={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateIri=t.IriValidationStrategy=void 0;function e(){const u="[!$&'()*+,;=]",c="%[a-fA-F0-9]{2}",l="([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",d=`${l}\\.${l}\\.${l}\\.${l}`,f="[a-fA-F0-9]{1,4}",h=`(${f}:${f}|${d})`,p=`((${f}:){6}${h}|::(${f}:){5}${h}|(${f})?::(${f}:){4}${h}|((${f}:){0,1}${f})?::(${f}:){3}${h}|((${f}:){0,2}${f})?::(${f}:){2}${h}|((${f}:){0,3}${f})?::${f}:${h}|((${f}:){0,4}${f})?::${h}|((${f}:){0,5}${f})?::${f}|((${f}:){0,6}${f})?::)`,b=`v[a-fA-F0-9]+\\.(${u}|${u}|":)+`,_=`\\[(${p}|${b})\\]`,E="[0-9]*",w="[a-zA-Z][a-zA-Z0-9+\\-.]*",A="[-󰀀-󿿽􀀀-􏿽]",D="[a-zA-Z0-9\\-._~ -퟿豈-﷏ﷰ-￯𐀀-🿽𠀀-𯿽𰀀-𿿽񀀀-񏿽񐀀-񟿽񠀀-񯿽񰀀-񿿽򀀀-򏿽򐀀-򟿽򠀀-򯿽򰀀-򿿽󀀀-󏿽󐀀-󟿽󡀀-󯿽]",U=`(${D}|${c}|${u}|[:@])*`,H=`(${U}|[\\/?])*`,N=`(${U}|${A}|[\\/?])*`,x=`(${U})+`,F=`(${U})*`,X="",ne=`${x}(\\/${F})*`,$=`\\/(${x}(\\/${F})*)?`,j=`(\\/${F})*`,Q=`(${D}|${c}|${u})*`,se=`(${_}|${d}|${Q})`,he=`(\\/\\/${`(${`(${D}|${c}|${u}|:)*`}@)?${se}(:${E})?`}${j}|${$}|${ne}|${X})`,Te=`^${w}:${he}(\\?${N})?(#${H})?$`;return new RegExp(Te,"u")}const r=e(),n=/^[A-Za-z][\d+-.A-Za-z]*:[^\u0000-\u0020"<>\\^`{|}]*$/u;var a;(function(o){o.Strict="strict",o.Pragmatic="pragmatic",o.None="none"})(a=t.IriValidationStrategy||(t.IriValidationStrategy={}));function s(o,u=a.Strict){switch(u){case a.Strict:return r.test(o)?void 0:new Error(`Invalid IRI according to RFC 3987: '${o}'`);case a.Pragmatic:return n.test(o)?void 0:new Error(`Invalid IRI according to RDF Turtle: '${o}'`);case a.None:return;default:return new Error(`Not supported validation strategy "${u}"`)}}t.validateIri=s})(iF);(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(iF,t)})(nF);Object.defineProperty(Jd,"__esModule",{value:!0});Jd.ParseType=Jd.RdfXmlParser=void 0;const rN=Ra,nie=al,nN=kt,iie=Nm,aie=ht,XS=nF;class Jt extends nN.Transform{constructor(e){super({readableObjectMode:!0}),this.activeTagStack=[],this.nodeIds={},e&&(Object.assign(this,e),this.options=e),this.dataFactory||(this.dataFactory=new aie.DataFactory),this.baseIRI||(this.baseIRI=""),this.defaultGraph||(this.defaultGraph=this.dataFactory.defaultGraph()),this.validateUri!==!1&&(this.validateUri=!0),this.iriValidationStrategy||(this.iriValidationStrategy=this.validateUri?XS.IriValidationStrategy.Pragmatic:XS.IriValidationStrategy.None),this.saxParser=new nie.SaxesParser({xmlns:!0,position:this.trackPosition}),this.attachSaxListeners()}import(e){const r=new nN.PassThrough({readableObjectMode:!0});e.on("error",a=>n.emit("error",a)),e.on("data",a=>r.push(a)),e.on("end",()=>r.push(null));const n=r.pipe(new Jt(this.options));return n}_transform(e,r,n){try{this.saxParser.write(e)}catch(a){return n(a)}n()}newParseError(e){return new iie.ParseError(this,e)}valueToUri(e,r){return this.uriToNamedNode((0,rN.resolve)(e,r.baseIRI))}uriToNamedNode(e){const r=(0,XS.validateIri)(e,this.iriValidationStrategy);if(r instanceof Error)throw this.newParseError(r.message);return this.dataFactory.namedNode(e)}validateNcname(e){if(!Jt.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 r=this.activeTagStack.length?this.activeTagStack[this.activeTagStack.length-1]:null;let n=mo.RESOURCE;if(r&&(r.hadChildren=!0,n=r.childrenParseType),r&&r.childrenStringTags){const s=e.name;let o="";for(const d in e.attributes)o+=` ${d}="${e.attributes[d].value}"`;const c=`<${`${s}${o}`}>`;r.childrenStringTags.push(c);const l={childrenStringTags:r.childrenStringTags};l.childrenStringEmitClosingTag=``,this.activeTagStack.push(l);return}const a={};r?(a.language=r.language,a.baseIRI=r.baseIRI):a.baseIRI=this.baseIRI,this.activeTagStack.push(a),n===mo.RESOURCE?this.onTagResource(e,a,r,!r):this.onTagProperty(e,a,r)}onTagResource(e,r,n,a){r.childrenParseType=mo.PROPERTY;let s=!0;if(e.uri===Jt.RDF){if(!a&&Jt.FORBIDDEN_NODE_ELEMENTS.indexOf(e.local)>=0)throw this.newParseError(`Illegal node element name: ${e.local}`);switch(e.local){case"RDF":r.childrenParseType=mo.RESOURCE;case"Description":s=!1}}const o=[],u=[];let c=null,l=!1,d=!1,f=null;for(const h in e.attributes){const p=e.attributes[h];if(n&&p.uri===Jt.RDF)switch(p.local){case"about":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${p.value} and ${c} where found.`);c=p.value;continue;case"ID":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${p.value} and ${c} where found.`);this.validateNcname(p.value),c="#"+p.value,l=!0;continue;case"nodeID":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${p.value} and ${c} where found.`);this.validateNcname(p.value),c=p.value,d=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"type":f=p.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(p.uri===Jt.XML){if(p.local==="lang"){r.language=p.value===""?null:p.value.toLowerCase();continue}else if(p.local==="base"){r.baseIRI=(0,rN.resolve)(p.value,r.baseIRI);continue}}p.prefix!=="xml"&&p.uri&&(o.push(this.uriToNamedNode(p.uri+p.local)),u.push(p.value))}if(c!==null&&(r.subject=d?this.dataFactory.blankNode(c):this.valueToUri(c,r),l&&this.claimNodeId(r.subject)),r.subject||(r.subject=this.dataFactory.blankNode()),s){const h=this.uriToNamedNode(e.uri+e.local);this.emitTriple(r.subject,this.dataFactory.namedNode(Jt.RDF+"type"),h,n?n.reifiedStatementId:null)}if(n){if(n.predicate)if(n.childrenCollectionSubject){const h=this.dataFactory.blankNode();this.emitTriple(n.childrenCollectionSubject,n.childrenCollectionPredicate,h,n.reifiedStatementId),this.emitTriple(h,this.dataFactory.namedNode(Jt.RDF+"first"),r.subject,r.reifiedStatementId),n.childrenCollectionSubject=h,n.childrenCollectionPredicate=this.dataFactory.namedNode(Jt.RDF+"rest")}else{this.emitTriple(n.subject,n.predicate,r.subject,n.reifiedStatementId);for(let h=0;h=0)throw this.newParseError(`Illegal property element name: ${e.local}`);r.predicateSubPredicates=[],r.predicateSubObjects=[];let a=!1,s=!1,o=null,u=!0;const c=[],l=[];for(const d in e.attributes){const f=e.attributes[d];if(f.uri===Jt.RDF)switch(f.local){case"resource":if(o)throw this.newParseError(`Found both rdf:resource (${f.value}) and rdf:nodeID (${o}).`);if(a)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:resource (${f.value})`);r.hadChildren=!0,o=f.value,u=!1;continue;case"datatype":if(s)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:datatype (${f.value}).`);if(a)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${f.value})`);r.datatype=this.valueToUri(f.value,r);continue;case"nodeID":if(s)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:nodeID (${f.value}).`);if(r.hadChildren)throw this.newParseError(`Found both rdf:resource and rdf:nodeID (${f.value}).`);if(a)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID (${f.value})`);this.validateNcname(f.value),r.hadChildren=!0,o=f.value,u=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"parseType":if(s)throw this.newParseError("rdf:parseType is not allowed when non-rdf:* property attributes are present");if(r.datatype)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${r.datatype.value})`);if(o)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID or rdf:resource (${o})`);if(f.value==="Resource"){a=!0,r.childrenParseType=mo.PROPERTY;const h=this.dataFactory.blankNode();this.emitTriple(r.subject,r.predicate,h,r.reifiedStatementId),r.subject=h,r.predicate=null}else f.value==="Collection"?(a=!0,r.hadChildren=!0,r.childrenCollectionSubject=r.subject,r.childrenCollectionPredicate=r.predicate,u=!1):f.value==="Literal"&&(a=!0,r.childrenTagsToString=!0,r.childrenStringTags=[]);continue;case"ID":this.validateNcname(f.value),r.reifiedStatementId=this.valueToUri("#"+f.value,r),this.claimNodeId(r.reifiedStatementId);continue}else if(f.uri===Jt.XML&&f.local==="lang"){r.language=f.value===""?null:f.value.toLowerCase();continue}if(f.prefix!=="xml"&&f.prefix!=="xmlns"&&(f.prefix!==""||f.local!=="xmlns")&&f.uri){if(a||r.datatype)throw this.newParseError(`Found illegal rdf:* properties on property element with attribute: ${f.value}`);r.hadChildren=!0,s=!0,c.push(this.uriToNamedNode(f.uri+f.local)),l.push(this.dataFactory.literal(f.value,r.datatype||r.language))}}if(o!==null){const d=r.subject;r.subject=u?this.dataFactory.blankNode(o):this.valueToUri(o,r),this.emitTriple(d,r.predicate,r.subject,r.reifiedStatementId);for(let f=0;f/g,(r,n,a)=>(this.saxParser.ENTITIES[n]=a,""))}}Jd.RdfXmlParser=Jt;Jt.MIME_TYPE="application/rdf+xml";Jt.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#";Jt.XML="http://www.w3.org/XML/1998/namespace";Jt.FORBIDDEN_NODE_ELEMENTS=["RDF","ID","about","bagID","parseType","resource","nodeID","li","aboutEach","aboutEachPrefix"];Jt.FORBIDDEN_PROPERTY_ELEMENTS=["Description","RDF","ID","about","bagID","parseType","resource","nodeID","aboutEach","aboutEachPrefix"];Jt.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;var mo;(function(t){t[t.RESOURCE=0]="RESOURCE",t[t.PROPERTY=1]="PROPERTY"})(mo||(Jd.ParseType=mo={}));(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Jd,t)})(WM);Object.defineProperty(Dm,"__esModule",{value:!0});Dm.ActorRdfParseRdfXml=void 0;const sie=ml,oie=WM;class uie extends sie.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){var s;e.data.on("error",o=>a.emit("error",o));const a=e.data.pipe(new oie.RdfXmlParser({baseIRI:(s=e.metadata)==null?void 0:s.baseIRI}));return{data:a,metadata:{triples:!0}}}}Dm.ActorRdfParseRdfXml=uie;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Dm,t)})(zM);var aF={},Cm={},_R={},sF={};Object.defineProperty(sF,"__esModule",{value:!0});var oF={};Object.defineProperty(oF,"__esModule",{value:!0});var uF={};Object.defineProperty(uF,"__esModule",{value:!0});var jm={},cF={},Sp={},gR={},Ho={},mR={};Object.defineProperty(mR,"__esModule",{value:!0});mR.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(t){return t.charCodeAt(0)}));var vR={};Object.defineProperty(vR,"__esModule",{value:!0});vR.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(t){return t.charCodeAt(0)}));var YE={};(function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var r=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]]);t.fromCodePoint=(e=String.fromCodePoint)!==null&&e!==void 0?e:function(s){var o="";return s>65535&&(s-=65536,o+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),o+=String.fromCharCode(s),o};function n(s){var o;return s>=55296&&s<=57343||s>1114111?65533:(o=r.get(s))!==null&&o!==void 0?o:s}t.replaceCodePoint=n;function a(s){return(0,t.fromCodePoint)(n(s))}t.default=a})(YE);(function(t){var e=m&&m.__createBinding||(Object.create?function(F,X,ne,$){$===void 0&&($=ne);var j=Object.getOwnPropertyDescriptor(X,ne);(!j||("get"in j?!X.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return X[ne]}}),Object.defineProperty(F,$,j)}:function(F,X,ne,$){$===void 0&&($=ne),F[$]=X[ne]}),r=m&&m.__setModuleDefault||(Object.create?function(F,X){Object.defineProperty(F,"default",{enumerable:!0,value:X})}:function(F,X){F.default=X}),n=m&&m.__importStar||function(F){if(F&&F.__esModule)return F;var X={};if(F!=null)for(var ne in F)ne!=="default"&&Object.prototype.hasOwnProperty.call(F,ne)&&e(X,F,ne);return r(X,F),X},a=m&&m.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};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=a(mR);t.htmlDecodeTree=s.default;var o=a(vR);t.xmlDecodeTree=o.default;var u=n(YE);t.decodeCodePoint=u.default;var c=YE;Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return c.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return c.fromCodePoint}});var l;(function(F){F[F.NUM=35]="NUM",F[F.SEMI=59]="SEMI",F[F.EQUALS=61]="EQUALS",F[F.ZERO=48]="ZERO",F[F.NINE=57]="NINE",F[F.LOWER_A=97]="LOWER_A",F[F.LOWER_F=102]="LOWER_F",F[F.LOWER_X=120]="LOWER_X",F[F.LOWER_Z=122]="LOWER_Z",F[F.UPPER_A=65]="UPPER_A",F[F.UPPER_F=70]="UPPER_F",F[F.UPPER_Z=90]="UPPER_Z"})(l||(l={}));var d=32,f;(function(F){F[F.VALUE_LENGTH=49152]="VALUE_LENGTH",F[F.BRANCH_LENGTH=16256]="BRANCH_LENGTH",F[F.JUMP_TABLE=127]="JUMP_TABLE"})(f=t.BinTrieFlags||(t.BinTrieFlags={}));function h(F){return F>=l.ZERO&&F<=l.NINE}function p(F){return F>=l.UPPER_A&&F<=l.UPPER_F||F>=l.LOWER_A&&F<=l.LOWER_F}function b(F){return F>=l.UPPER_A&&F<=l.UPPER_Z||F>=l.LOWER_A&&F<=l.LOWER_Z||h(F)}function _(F){return F===l.EQUALS||b(F)}var E;(function(F){F[F.EntityStart=0]="EntityStart",F[F.NumericStart=1]="NumericStart",F[F.NumericDecimal=2]="NumericDecimal",F[F.NumericHex=3]="NumericHex",F[F.NamedEntity=4]="NamedEntity"})(E||(E={}));var w;(function(F){F[F.Legacy=0]="Legacy",F[F.Strict=1]="Strict",F[F.Attribute=2]="Attribute"})(w=t.DecodingMode||(t.DecodingMode={}));var O=function(){function F(X,ne,$){this.decodeTree=X,this.emitCodePoint=ne,this.errors=$,this.state=E.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=w.Strict}return F.prototype.startEntity=function(X){this.decodeMode=X,this.state=E.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},F.prototype.write=function(X,ne){switch(this.state){case E.EntityStart:return X.charCodeAt(ne)===l.NUM?(this.state=E.NumericStart,this.consumed+=1,this.stateNumericStart(X,ne+1)):(this.state=E.NamedEntity,this.stateNamedEntity(X,ne));case E.NumericStart:return this.stateNumericStart(X,ne);case E.NumericDecimal:return this.stateNumericDecimal(X,ne);case E.NumericHex:return this.stateNumericHex(X,ne);case E.NamedEntity:return this.stateNamedEntity(X,ne)}},F.prototype.stateNumericStart=function(X,ne){return ne>=X.length?-1:(X.charCodeAt(ne)|d)===l.LOWER_X?(this.state=E.NumericHex,this.consumed+=1,this.stateNumericHex(X,ne+1)):(this.state=E.NumericDecimal,this.stateNumericDecimal(X,ne))},F.prototype.addToNumericResult=function(X,ne,$,j){if(ne!==$){var Q=$-ne;this.result=this.result*Math.pow(j,Q)+parseInt(X.substr(ne,Q),j),this.consumed+=Q}},F.prototype.stateNumericHex=function(X,ne){for(var $=ne;ne>14;ne>14,Q!==0){if(se===l.SEMI)return this.emitNamedEntityData(this.treeIndex,Q,this.consumed+this.excess);this.decodeMode!==w.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},F.prototype.emitNotTerminatedNamedEntity=function(){var X,ne=this,$=ne.result,j=ne.decodeTree,Q=(j[$]&f.VALUE_LENGTH)>>14;return this.emitNamedEntityData($,Q,this.consumed),(X=this.errors)===null||X===void 0||X.missingSemicolonAfterCharacterReference(),this.consumed},F.prototype.emitNamedEntityData=function(X,ne,$){var j=this.decodeTree;return this.emitCodePoint(ne===1?j[X]&~f.VALUE_LENGTH:j[X+1],$),ne===3&&this.emitCodePoint(j[X+2],$),$},F.prototype.end=function(){var X;switch(this.state){case E.NamedEntity:return this.result!==0&&(this.decodeMode!==w.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case E.NumericDecimal:return this.emitNumericEntity(0,2);case E.NumericHex:return this.emitNumericEntity(0,3);case E.NumericStart:return(X=this.errors)===null||X===void 0||X.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case E.EntityStart:return 0}},F}();t.EntityDecoder=O;function A(F){var X="",ne=new O(F,function($){return X+=(0,u.fromCodePoint)($)});return function(j,Q){for(var se=0,ie=0;(ie=j.indexOf("&",ie))>=0;){X+=j.slice(se,ie),ne.startEntity(Q);var be=ne.write(j,ie+1);if(be<0){se=ie+ne.end();break}se=ie+be,ie=be===0?se+1:se}var he=X+j.slice(se);return X="",he}}function T(F,X,ne,$){var j=(X&f.BRANCH_LENGTH)>>7,Q=X&f.JUMP_TABLE;if(j===0)return Q!==0&&$===Q?ne:-1;if(Q){var se=$-Q;return se<0||se>=j?-1:F[ne+se]-1}for(var ie=ne,be=ie+j-1;ie<=be;){var he=ie+be>>>1,Te=F[he];if(Te<$)ie=he+1;else if(Te>$)be=he-1;else return F[he+j]}return-1}t.determineBranch=T;var I=A(s.default),D=A(o.default);function U(F,X){return X===void 0&&(X=w.Legacy),I(F,X)}t.decodeHTML=U;function H(F){return I(F,w.Attribute)}t.decodeHTMLAttribute=H;function N(F){return I(F,w.Strict)}t.decodeHTMLStrict=N;function x(F){return D(F,w.Strict)}t.decodeXML=x})(Ho);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var e=Ho,r;(function(h){h[h.Tab=9]="Tab",h[h.NewLine=10]="NewLine",h[h.FormFeed=12]="FormFeed",h[h.CarriageReturn=13]="CarriageReturn",h[h.Space=32]="Space",h[h.ExclamationMark=33]="ExclamationMark",h[h.Number=35]="Number",h[h.Amp=38]="Amp",h[h.SingleQuote=39]="SingleQuote",h[h.DoubleQuote=34]="DoubleQuote",h[h.Dash=45]="Dash",h[h.Slash=47]="Slash",h[h.Zero=48]="Zero",h[h.Nine=57]="Nine",h[h.Semi=59]="Semi",h[h.Lt=60]="Lt",h[h.Eq=61]="Eq",h[h.Gt=62]="Gt",h[h.Questionmark=63]="Questionmark",h[h.UpperA=65]="UpperA",h[h.LowerA=97]="LowerA",h[h.UpperF=70]="UpperF",h[h.LowerF=102]="LowerF",h[h.UpperZ=90]="UpperZ",h[h.LowerZ=122]="LowerZ",h[h.LowerX=120]="LowerX",h[h.OpeningSquareBracket=91]="OpeningSquareBracket"})(r||(r={}));var n;(function(h){h[h.Text=1]="Text",h[h.BeforeTagName=2]="BeforeTagName",h[h.InTagName=3]="InTagName",h[h.InSelfClosingTag=4]="InSelfClosingTag",h[h.BeforeClosingTagName=5]="BeforeClosingTagName",h[h.InClosingTagName=6]="InClosingTagName",h[h.AfterClosingTagName=7]="AfterClosingTagName",h[h.BeforeAttributeName=8]="BeforeAttributeName",h[h.InAttributeName=9]="InAttributeName",h[h.AfterAttributeName=10]="AfterAttributeName",h[h.BeforeAttributeValue=11]="BeforeAttributeValue",h[h.InAttributeValueDq=12]="InAttributeValueDq",h[h.InAttributeValueSq=13]="InAttributeValueSq",h[h.InAttributeValueNq=14]="InAttributeValueNq",h[h.BeforeDeclaration=15]="BeforeDeclaration",h[h.InDeclaration=16]="InDeclaration",h[h.InProcessingInstruction=17]="InProcessingInstruction",h[h.BeforeComment=18]="BeforeComment",h[h.CDATASequence=19]="CDATASequence",h[h.InSpecialComment=20]="InSpecialComment",h[h.InCommentLike=21]="InCommentLike",h[h.BeforeSpecialS=22]="BeforeSpecialS",h[h.SpecialStartSequence=23]="SpecialStartSequence",h[h.InSpecialTag=24]="InSpecialTag",h[h.BeforeEntity=25]="BeforeEntity",h[h.BeforeNumericEntity=26]="BeforeNumericEntity",h[h.InNamedEntity=27]="InNamedEntity",h[h.InNumericEntity=28]="InNumericEntity",h[h.InHexEntity=29]="InHexEntity"})(n||(n={}));function a(h){return h===r.Space||h===r.NewLine||h===r.Tab||h===r.FormFeed||h===r.CarriageReturn}function s(h){return h===r.Slash||h===r.Gt||a(h)}function o(h){return h>=r.Zero&&h<=r.Nine}function u(h){return h>=r.LowerA&&h<=r.LowerZ||h>=r.UpperA&&h<=r.UpperZ}function c(h){return h>=r.UpperA&&h<=r.UpperF||h>=r.LowerA&&h<=r.LowerF}var l;(function(h){h[h.NoValue=0]="NoValue",h[h.Unquoted=1]="Unquoted",h[h.Single=2]="Single",h[h.Double=3]="Double"})(l=t.QuoteType||(t.QuoteType={}));var d={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])},f=function(){function h(p,b){var _=p.xmlMode,E=_===void 0?!1:_,w=p.decodeEntities,O=w===void 0?!0:w;this.cbs=b,this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.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=E,this.decodeEntities=O,this.entityTrie=E?e.xmlDecodeTree:e.htmlDecodeTree}return h.prototype.reset=function(){this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},h.prototype.write=function(p){this.offset+=this.buffer.length,this.buffer=p,this.parse()},h.prototype.end=function(){this.running&&this.finish()},h.prototype.pause=function(){this.running=!1},h.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=n.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&p===r.Amp&&(this.state=n.BeforeEntity)},h.prototype.stateSpecialStartSequence=function(p){var b=this.sequenceIndex===this.currentSequence.length,_=b?s(p):(p|32)===this.currentSequence[this.sequenceIndex];if(!_)this.isSpecial=!1;else if(!b){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=n.InTagName,this.stateInTagName(p)},h.prototype.stateInSpecialTag=function(p){if(this.sequenceIndex===this.currentSequence.length){if(p===r.Gt||a(p)){var b=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&p!==r.Semi)this.trieIndex+=_;else{var E=this.index-this.entityExcess+1;E>this.sectionStart&&this.emitPartial(this.sectionStart,E),this.entityResult=this.trieIndex,this.trieIndex+=_,this.entityExcess=0,this.sectionStart=this.index+1,_===0&&this.emitNamedEntity()}}},h.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var p=(this.entityTrie[this.entityResult]&e.BinTrieFlags.VALUE_LENGTH)>>14;switch(p){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~e.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])}}},h.prototype.stateBeforeNumericEntity=function(p){(p|32)===r.LowerX?(this.entityExcess++,this.state=n.InHexEntity):(this.state=n.InNumericEntity,this.stateInNumericEntity(p))},h.prototype.emitNumericEntity=function(p){var b=this.index-this.entityExcess-1,_=b+2+ +(this.state===n.InHexEntity);_!==this.index&&(b>this.sectionStart&&this.emitPartial(this.sectionStart,b),this.sectionStart=this.index+Number(p),this.emitCodePoint((0,e.replaceCodePoint)(this.entityResult))),this.state=this.baseState},h.prototype.stateInNumericEntity=function(p){p===r.Semi?this.emitNumericEntity(!0):o(p)?(this.entityResult=this.entityResult*10+(p-r.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},h.prototype.stateInHexEntity=function(p){p===r.Semi?this.emitNumericEntity(!0):o(p)?(this.entityResult=this.entityResult*16+(p-r.Zero),this.entityExcess++):c(p)?(this.entityResult=this.entityResult*16+((p|32)-r.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},h.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===n.Text||this.baseState===n.InSpecialTag)},h.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===n.Text||this.state===n.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===n.InAttributeValueDq||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},h.prototype.shouldContinue=function(){return this.index0&&o.has(this.stack[this.stack.length-1]);){var u=this.stack.pop();(n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,u,!0)}this.isVoidElement(e)||(this.stack.push(e),uN.has(e)?this.foreignContext.push(!0):cN.has(e)&&this.foreignContext.push(!1)),(s=(a=this.cbs).onopentagname)===null||s===void 0||s.call(a,e),this.cbs.onopentag&&(this.attribs={})},t.prototype.endOpenTag=function(e){var r,n;this.startIndex=this.openTagStart,this.attribs&&((n=(r=this.cbs).onopentag)===null||n===void 0||n.call(r,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},t.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},t.prototype.onclosetag=function(e,r){var n,a,s,o,u,c;this.endIndex=r;var l=this.getSlice(e,r);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(uN.has(l)||cN.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))!this.options.xmlMode&&l==="br"&&((a=(n=this.cbs).onopentagname)===null||a===void 0||a.call(n,"br"),(o=(s=this.cbs).onopentag)===null||o===void 0||o.call(s,"br",{},!0),(c=(u=this.cbs).onclosetag)===null||c===void 0||c.call(u,"br",!1));else{var d=this.stack.lastIndexOf(l);if(d!==-1)if(this.cbs.onclosetag)for(var f=this.stack.length-d;f--;)this.cbs.onclosetag(this.stack.pop(),f!==0);else this.stack.length=d;else!this.options.xmlMode&&l==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1},t.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)},t.prototype.closeCurrentTag=function(e){var r,n,a=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===a&&((n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,a,!e),this.stack.pop())},t.prototype.onattribname=function(e,r){this.startIndex=e;var n=this.getSlice(e,r);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n},t.prototype.onattribdata=function(e,r){this.attribvalue+=this.getSlice(e,r)},t.prototype.onattribentity=function(e){this.attribvalue+=(0,iN.fromCodePoint)(e)},t.prototype.onattribend=function(e,r){var n,a;this.endIndex=r,(a=(n=this.cbs).onattribute)===null||a===void 0||a.call(n,this.attribname,this.attribvalue,e===Zy.QuoteType.Double?'"':e===Zy.QuoteType.Single?"'":e===Zy.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},t.prototype.getInstructionName=function(e){var r=e.search(pie),n=r<0?e:e.substr(0,r);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},t.prototype.ondeclaration=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("!".concat(a),"!".concat(n))}this.startIndex=r+1},t.prototype.onprocessinginstruction=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("?".concat(a),"?".concat(n))}this.startIndex=r+1},t.prototype.oncomment=function(e,r,n){var a,s,o,u;this.endIndex=r,(s=(a=this.cbs).oncomment)===null||s===void 0||s.call(a,this.getSlice(e,r-n)),(u=(o=this.cbs).oncommentend)===null||u===void 0||u.call(o),this.startIndex=r+1},t.prototype.oncdata=function(e,r,n){var a,s,o,u,c,l,d,f,h,p;this.endIndex=r;var b=this.getSlice(e,r-n);this.options.xmlMode||this.options.recognizeCDATA?((s=(a=this.cbs).oncdatastart)===null||s===void 0||s.call(a),(u=(o=this.cbs).ontext)===null||u===void 0||u.call(o,b),(l=(c=this.cbs).oncdataend)===null||l===void 0||l.call(c)):((f=(d=this.cbs).oncomment)===null||f===void 0||f.call(d,"[CDATA[".concat(b,"]]")),(p=(h=this.cbs).oncommentend)===null||p===void 0||p.call(h)),this.startIndex=r+1},t.prototype.onend=function(){var e,r;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n],!0));}(r=(e=this.cbs).onend)===null||r===void 0||r.call(e)},t.prototype.reset=function(){var e,r,n,a;(r=(e=this.cbs).onreset)===null||r===void 0||r.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(a=(n=this.cbs).onparserinit)===null||a===void 0||a.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},t.prototype.parseComplete=function(e){this.reset(),this.end(e)},t.prototype.getSlice=function(e,r){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var n=this.buffers[0].slice(e-this.bufferOffset,r-this.bufferOffset);r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,r-this.bufferOffset);return n},t.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},t.prototype.write=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".write() after done!"));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)},t.prototype.end=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".end() after done!"));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()},t.prototype.pause=function(){this.tokenizer.pause()},t.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),e}(wR);Ct.NodeWithChildren=Fm;var hF=function(t){ic(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=$i.ElementType.CDATA,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(Fm);Ct.CDATA=hF;var pF=function(t){ic(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=$i.ElementType.Root,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(Fm);Ct.Document=pF;var yF=function(t){ic(e,t);function e(r,n,a,s){a===void 0&&(a=[]),s===void 0&&(s=r==="script"?$i.ElementType.Script:r==="style"?$i.ElementType.Style:$i.ElementType.Tag);var o=t.call(this,a)||this;return o.name=r,o.attribs=n,o.type=s,o}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(n){var a,s;return{name:n,value:r.attribs[n],namespace:(a=r["x-attribsNamespace"])===null||a===void 0?void 0:a[n],prefix:(s=r["x-attribsPrefix"])===null||s===void 0?void 0:s[n]}})},enumerable:!1,configurable:!0}),e}(Fm);Ct.Element=yF;function bF(t){return(0,$i.isTag)(t)}Ct.isTag=bF;function _F(t){return t.type===$i.ElementType.CDATA}Ct.isCDATA=_F;function gF(t){return t.type===$i.ElementType.Text}Ct.isText=gF;function mF(t){return t.type===$i.ElementType.Comment}Ct.isComment=mF;function vF(t){return t.type===$i.ElementType.Directive}Ct.isDirective=vF;function wF(t){return t.type===$i.ElementType.Root}Ct.isDocument=wF;function bie(t){return Object.prototype.hasOwnProperty.call(t,"children")}Ct.hasChildren=bie;function SR(t,e){e===void 0&&(e=!1);var r;if(gF(t))r=new lF(t.data);else if(mF(t))r=new dF(t.data);else if(bF(t)){var n=e?KS(t.children):[],a=new yF(t.name,Zh({},t.attribs),n);n.forEach(function(c){return c.parent=a}),t.namespace!=null&&(a.namespace=t.namespace),t["x-attribsNamespace"]&&(a["x-attribsNamespace"]=Zh({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(a["x-attribsPrefix"]=Zh({},t["x-attribsPrefix"])),r=a}else if(_F(t)){var n=e?KS(t.children):[],s=new hF(n);n.forEach(function(l){return l.parent=s}),r=s}else if(wF(t)){var n=e?KS(t.children):[],o=new pF(n);n.forEach(function(l){return l.parent=o}),t["x-mode"]&&(o["x-mode"]=t["x-mode"]),r=o}else if(vF(t)){var u=new fF(t.name,t.data);t["x-name"]!=null&&(u["x-name"]=t["x-name"],u["x-publicId"]=t["x-publicId"],u["x-systemId"]=t["x-systemId"]),r=u}else throw new Error("Not implemented yet: ".concat(t.type));return r.startIndex=t.startIndex,r.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(r.sourceCodeLocation=t.sourceCodeLocation),r}Ct.cloneNode=SR;function KS(t){for(var e=t.map(function(n){return SR(n,!0)}),r=1;r$\x80-\uFFFF]/g;var e=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);t.getCodePoint=String.prototype.codePointAt!=null?function(a,s){return a.codePointAt(s)}:function(a,s){return(a.charCodeAt(s)&64512)===55296?(a.charCodeAt(s)-55296)*1024+a.charCodeAt(s+1)-56320+65536:a.charCodeAt(s)};function r(a){for(var s="",o=0,u;(u=t.xmlReplacer.exec(a))!==null;){var c=u.index,l=a.charCodeAt(c),d=e.get(l);d!==void 0?(s+=a.substring(o,c)+d,o=c+1):(s+="".concat(a.substring(o,c),"&#x").concat((0,t.getCodePoint)(a,c).toString(16),";"),o=t.xmlReplacer.lastIndex+=+((l&64512)===55296))}return s+a.substr(o)}t.encodeXML=r,t.escape=r;function n(a,s){return function(u){for(var c,l=0,d="";c=a.exec(u);)l!==c.index&&(d+=u.substring(l,c.index)),d+=s.get(c[0].charCodeAt(0)),l=c.index+1;return d+u.substring(l)}}t.escapeUTF8=n(/[&<>'"]/g,e),t.escapeAttribute=n(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=n(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(Db);var _ie=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sl,"__esModule",{value:!0});sl.encodeNonAsciiHTML=sl.encodeHTML=void 0;var gie=_ie(TR),TF=Db,mie=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function vie(t){return EF(mie,t)}sl.encodeHTML=vie;function wie(t){return EF(TF.xmlReplacer,t)}sl.encodeNonAsciiHTML=wie;function EF(t,e){for(var r="",n=0,a;(a=t.exec(e))!==null;){var s=a.index;r+=e.substring(n,s);var o=e.charCodeAt(s),u=gie.default.get(o);if(typeof u=="object"){if(s+10&&(n+=Lm(t.children,e)),(e.xmlMode||!lN.has(t.name))&&(n+=""))),n}function Nie(t){return"<".concat(t.data,">")}function Cie(t,e){var r,n=t.data||"";return((r=e.encodeEntities)!==null&&r!==void 0?r:e.decodeEntities)!==!1&&!(!e.xmlMode&&t.parent&&Oie.has(t.parent.name))&&(n=e.xmlMode||e.encodeEntities!=="utf8"?(0,Nb.encodeXML)(n):(0,Nb.escapeText)(n)),n}function jie(t){return"")}function Mie(t){return"")}var Fie=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.innerText=Zi.textContent=Zi.getText=Zi.getInnerHTML=Zi.getOuterHTML=void 0;var Us=ia,Lie=Fie(m0),Bie=nc;function AF(t,e){return(0,Lie.default)(t,e)}Zi.getOuterHTML=AF;function $ie(t,e){return(0,Us.hasChildren)(t)?t.children.map(function(r){return AF(r,e)}).join(""):""}Zi.getInnerHTML=$ie;function Y1(t){return Array.isArray(t)?t.map(Y1).join(""):(0,Us.isTag)(t)?t.name==="br"?` -`:Y1(t.children):(0,Us.isCDATA)(t)?Y1(t.children):(0,Us.isText)(t)?t.data:""}Zi.getText=Y1;function ZE(t){return Array.isArray(t)?t.map(ZE).join(""):(0,Us.hasChildren)(t)&&!(0,Us.isComment)(t)?ZE(t.children):(0,Us.isText)(t)?t.data:""}Zi.textContent=ZE;function eO(t){return Array.isArray(t)?t.map(eO).join(""):(0,Us.hasChildren)(t)&&(t.type===Bie.ElementType.Tag||(0,Us.isCDATA)(t))?eO(t.children):(0,Us.isText)(t)?t.data:""}Zi.innerText=eO;var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.prevElementSibling=Sn.nextElementSibling=Sn.getName=Sn.hasAttrib=Sn.getAttributeValue=Sn.getSiblings=Sn.getParent=Sn.getChildren=void 0;var ER=ia;function RF(t){return(0,ER.hasChildren)(t)?t.children:[]}Sn.getChildren=RF;function xF(t){return t.parent||null}Sn.getParent=xF;function Uie(t){var e,r,n=xF(t);if(n!=null)return RF(n);for(var a=[t],s=t.prev,o=t.next;s!=null;)a.unshift(s),e=s,s=e.prev;for(;o!=null;)a.push(o),r=o,o=r.next;return a}Sn.getSiblings=Uie;function qie(t,e){var r;return(r=t.attribs)===null||r===void 0?void 0:r[e]}Sn.getAttributeValue=qie;function Vie(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null}Sn.hasAttrib=Vie;function Hie(t){return t.name}Sn.getName=Hie;function kie(t){for(var e,r=t.next;r!==null&&!(0,ER.isTag)(r);)e=r,r=e.next;return r}Sn.nextElementSibling=kie;function Qie(t){for(var e,r=t.prev;r!==null&&!(0,ER.isTag)(r);)e=r,r=e.prev;return r}Sn.prevElementSibling=Qie;var Li={};Object.defineProperty(Li,"__esModule",{value:!0});Li.prepend=Li.prependChild=Li.append=Li.appendChild=Li.replaceElement=Li.removeElement=void 0;function v0(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children,r=e.lastIndexOf(t);r>=0&&e.splice(r,1)}t.next=null,t.prev=null,t.parent=null}Li.removeElement=v0;function Gie(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var a=e.parent=t.parent;if(a){var s=a.children;s[s.lastIndexOf(t)]=e,t.parent=null}}Li.replaceElement=Gie;function zie(t,e){if(v0(e),e.next=null,e.parent=t,t.children.push(e)>1){var r=t.children[t.children.length-2];r.next=e,e.prev=r}else e.prev=null}Li.appendChild=zie;function Wie(t,e){v0(e);var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var a=r.children;a.splice(a.lastIndexOf(n),0,e)}}else r&&r.children.push(e)}Li.append=Wie;function Xie(t,e){if(v0(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1){var r=t.children[1];r.prev=e,e.next=r}else e.next=null}Li.prependChild=Xie;function Kie(t,e){v0(e);var r=t.parent;if(r){var n=r.children;n.splice(n.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}Li.prepend=Kie;var mi={};Object.defineProperty(mi,"__esModule",{value:!0});mi.findAll=mi.existsOne=mi.findOne=mi.findOneChild=mi.find=mi.filter=void 0;var Bm=ia;function Jie(t,e,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),IF(t,Array.isArray(e)?e:[e],r,n)}mi.filter=Jie;function IF(t,e,r,n){for(var a=[],s=[e],o=[0];;){if(o[0]>=s[0].length){if(o.length===1)return a;s.shift(),o.shift();continue}var u=s[0][o[0]++];if(t(u)&&(a.push(u),--n<=0))return a;r&&(0,Bm.hasChildren)(u)&&u.children.length>0&&(o.unshift(0),s.unshift(u.children))}}mi.find=IF;function Yie(t,e){return e.find(t)}mi.findOneChild=Yie;function PF(t,e,r){r===void 0&&(r=!0);for(var n=null,a=0;a0&&(n=PF(t,s.children,!0));else continue}return n}mi.findOne=PF;function DF(t,e){return e.some(function(r){return(0,Bm.isTag)(r)&&(t(r)||DF(t,r.children))})}mi.existsOne=DF;function Zie(t,e){for(var r=[],n=[e],a=[0];;){if(a[0]>=n[0].length){if(n.length===1)return r;n.shift(),a.shift();continue}var s=n[0][a[0]++];(0,Bm.isTag)(s)&&(t(s)&&r.push(s),s.children.length>0&&(a.unshift(0),n.unshift(s.children)))}}mi.findAll=Zie;var ea={};Object.defineProperty(ea,"__esModule",{value:!0});ea.getElementsByTagType=ea.getElementsByTagName=ea.getElementById=ea.getElements=ea.testElement=void 0;var Uc=ia,$m=mi,Cb={tag_name:function(t){return typeof t=="function"?function(e){return(0,Uc.isTag)(e)&&t(e.name)}:t==="*"?Uc.isTag:function(e){return(0,Uc.isTag)(e)&&e.name===t}},tag_type:function(t){return typeof t=="function"?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return typeof t=="function"?function(e){return(0,Uc.isText)(e)&&t(e.data)}:function(e){return(0,Uc.isText)(e)&&e.data===t}}};function NF(t,e){return typeof e=="function"?function(r){return(0,Uc.isTag)(r)&&e(r.attribs[t])}:function(r){return(0,Uc.isTag)(r)&&r.attribs[t]===e}}function eae(t,e){return function(r){return t(r)||e(r)}}function CF(t){var e=Object.keys(t).map(function(r){var n=t[r];return Object.prototype.hasOwnProperty.call(Cb,r)?Cb[r](n):NF(r,n)});return e.length===0?null:e.reduce(eae)}function tae(t,e){var r=CF(t);return r?r(e):!0}ea.testElement=tae;function rae(t,e,r,n){n===void 0&&(n=1/0);var a=CF(t);return a?(0,$m.filter)(a,e,r,n):[]}ea.getElements=rae;function nae(t,e,r){return r===void 0&&(r=!0),Array.isArray(e)||(e=[e]),(0,$m.findOne)(NF("id",t),e,r)}ea.getElementById=nae;function iae(t,e,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),(0,$m.filter)(Cb.tag_name(t),e,r,n)}ea.getElementsByTagName=iae;function aae(t,e,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),(0,$m.filter)(Cb.tag_type(t),e,r,n)}ea.getElementsByTagType=aae;var jF={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.DocumentPosition=t.removeSubsets=void 0;var e=ia;function r(o){for(var u=o.length;--u>=0;){var c=o[u];if(u>0&&o.lastIndexOf(c,u-1)>=0){o.splice(u,1);continue}for(var l=c.parent;l;l=l.parent)if(o.includes(l)){o.splice(u,1);break}}return o}t.removeSubsets=r;var n;(function(o){o[o.DISCONNECTED=1]="DISCONNECTED",o[o.PRECEDING=2]="PRECEDING",o[o.FOLLOWING=4]="FOLLOWING",o[o.CONTAINS=8]="CONTAINS",o[o.CONTAINED_BY=16]="CONTAINED_BY"})(n=t.DocumentPosition||(t.DocumentPosition={}));function a(o,u){var c=[],l=[];if(o===u)return 0;for(var d=(0,e.hasChildren)(o)?o:o.parent;d;)c.unshift(d),d=d.parent;for(d=(0,e.hasChildren)(u)?u:u.parent;d;)l.unshift(d),d=d.parent;for(var f=Math.min(c.length,l.length),h=0;hb.indexOf(E)?p===u?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:p===o?n.PRECEDING|n.CONTAINS:n.PRECEDING}t.compareDocumentPosition=a;function s(o){return o=o.filter(function(u,c,l){return!l.includes(u,c+1)}),o.sort(function(u,c){var l=a(u,c);return l&n.PRECEDING?-1:l&n.FOLLOWING?1:0}),o}t.uniqueSort=s})(jF);var Um={};Object.defineProperty(Um,"__esModule",{value:!0});Um.getFeed=void 0;var sae=Zi,w0=ea;function oae(t){var e=jb(fae,t);return e?e.name==="feed"?uae(e):cae(e):null}Um.getFeed=oae;function uae(t){var e,r=t.children,n={type:"atom",items:(0,w0.getElementsByTagName)("entry",r).map(function(o){var u,c=o.children,l={media:MF(c)};Mi(l,"id","id",c),Mi(l,"title","title",c);var d=(u=jb("link",c))===null||u===void 0?void 0:u.attribs.href;d&&(l.link=d);var f=Du("summary",c)||Du("content",c);f&&(l.description=f);var h=Du("updated",c);return h&&(l.pubDate=new Date(h)),l})};Mi(n,"id","id",r),Mi(n,"title","title",r);var a=(e=jb("link",r))===null||e===void 0?void 0:e.attribs.href;a&&(n.link=a),Mi(n,"description","subtitle",r);var s=Du("updated",r);return s&&(n.updated=new Date(s)),Mi(n,"author","email",r,!0),n}function cae(t){var e,r,n=(r=(e=jb("channel",t.children))===null||e===void 0?void 0:e.children)!==null&&r!==void 0?r:[],a={type:t.name.substr(0,3),id:"",items:(0,w0.getElementsByTagName)("item",t.children).map(function(o){var u=o.children,c={media:MF(u)};Mi(c,"id","guid",u),Mi(c,"title","title",u),Mi(c,"link","link",u),Mi(c,"description","description",u);var l=Du("pubDate",u)||Du("dc:date",u);return l&&(c.pubDate=new Date(l)),c})};Mi(a,"title","title",n),Mi(a,"link","link",n),Mi(a,"description","description",n);var s=Du("lastBuildDate",n);return s&&(a.updated=new Date(s)),Mi(a,"author","managingEditor",n,!0),a}var lae=["url","type","lang"],dae=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function MF(t){return(0,w0.getElementsByTagName)("media:content",t).map(function(e){for(var r=e.attribs,n={medium:r.medium,isDefault:!!r.isDefault},a=0,s=lae;a0){const s=Object.assign(Object.assign({},r),a);if(e.prefix){let o;for(;o=fu.PREFIX_REGEX.exec(e.prefix);)s[o[1]]=o[2]}return s}else return r}static expandPrefixedTerm(e,r){const n=e.indexOf(":");let a,s;if(n>=0&&(a=e.substr(0,n),s=e.substr(n+1)),a==="")return"http://www.w3.org/1999/xhtml/vocab#"+s;if(a){const o=r.prefixesAll[a];if(o)return o+s}if(e){const o=r.prefixesAll[e.toLocaleLowerCase()];if(o)return o}return e}static isValidIri(e){return fu.IRI_REGEX.test(e)}static contentTypeToProfile(e){return yae.RDFA_CONTENTTYPES[e]||""}getBaseIRI(e){let r=e;const n=r.indexOf("#");return n>=0&&(r=r.substr(0,n)),this.dataFactory.namedNode((0,t1.resolve)(r,this.baseIRI.value))}getResourceOrBaseIri(e,r){return e===!0?this.getBaseIriTerm(r):e}getBaseIriTerm(e){return e.localBaseIRI||this.baseIRI}createVocabIris(e,r,n,a){return e.split(/\s+/).filter(s=>s&&(n||s.indexOf(":")>=0)).map(s=>this.createIri(s,r,!0,!0,a)).filter(s=>s!=null)}createLiteral(e,r){if(r.interpretObjectAsTime&&!r.datatype){for(const n of fu.TIME_REGEXES)if(e.match(n.regex)){r.datatype=this.dataFactory.namedNode(fu.XSD+n.type);break}}return this.dataFactory.literal(e,r.datatype||r.language)}createBlankNode(){return this.blankNodeFactory?this.blankNodeFactory():this.dataFactory.blankNode()}createIri(e,r,n,a,s){if(e=e||"",!a)return n||(e=(0,t1.resolve)(e,this.getBaseIriTerm(r).value)),fu.isValidIri(e)?this.dataFactory.namedNode(e):null;if(e.length>0&&e[0]==="["&&e[e.length-1]==="]"&&(e=e.substr(1,e.length-2),e.indexOf(":")<0))return null;if(e.startsWith("_:"))return s?this.dataFactory.blankNode(e.substr(2)||"b_identity"):null;if(n&&r.vocab&&e.indexOf(":")<0)return this.dataFactory.namedNode(r.vocab+e);let o=fu.expandPrefixedTerm(e,r);return n?e!==o&&(o=(0,t1.resolve)(o,this.baseIRIDocument.value)):o=(0,t1.resolve)(o,this.getBaseIriTerm(r).value),fu.isValidIri(o)?this.dataFactory.namedNode(o):null}};S0.Util=vl;vl.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#";vl.XSD="http://www.w3.org/2001/XMLSchema#";vl.RDFA="http://www.w3.org/ns/rdfa#";vl.PREFIX_REGEX=/\s*([^:\s]*)*:\s*([^\s]*)*\s*/g;vl.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"}];vl.IRI_REGEX=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^ "<>{}|\\\[\]`]*$/;Object.defineProperty(jm,"__esModule",{value:!0});jm.RdfaParser=void 0;const _ae=cF,dN=kt,gae=hae,mae=pae,vae=Gu,Ci=S0;class OR extends dN.Transform{constructor(e){super({readableObjectMode:!0}),this.activeTagStack=[],e=e||{},this.options=e,this.util=new Ci.Util(e.dataFactory,e.baseIRI),this.defaultGraph=e.defaultGraph||this.util.dataFactory.defaultGraph();const r=e.contentType?Ci.Util.contentTypeToProfile(e.contentType):e.profile||"";this.features=e.features||vae.RDFA_FEATURES[r],this.htmlParseListener=e.htmlParseListener,this.rdfaPatterns=this.features.copyRdfaPatterns?{}:null,this.pendingRdfaPatternCopies=this.features.copyRdfaPatterns?{}:null,this.parser=this.initializeParser(r==="xml"),this.activeTagStack.push({incompleteTriples:[],inlist:!1,language:e.language,listMapping:{},listMappingLocal:{},name:"",prefixesAll:Object.assign(Object.assign({},mae["@context"]),this.features.xhtmlInitialContext?gae["@context"]:{}),prefixesCustom:{},skipElement:!1,vocab:e.vocab})}import(e){const r=new dN.PassThrough({readableObjectMode:!0});e.on("error",a=>n.emit("error",a)),e.on("data",a=>r.push(a)),e.on("end",()=>r.push(null));const n=r.pipe(new OR(this.options));return n}_transform(e,r,n){this.parser.write(e.toString()),n()}_flush(e){this.parser.end(),e()}onTagOpen(e,r){let n=this.activeTagStack.length-1;for(;n>0&&this.activeTagStack[n].skipElement;)n--;let a=this.activeTagStack[n];n!==this.activeTagStack.length-1&&(a=Object.assign(Object.assign({},a),{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 s={collectChildTags:a.collectChildTags,incompleteTriples:[],inlist:"inlist"in r,listMapping:[],listMappingLocal:a.listMapping,localBaseIRI:a.localBaseIRI,name:e,prefixesAll:null,prefixesCustom:null,skipElement:!1};if(this.activeTagStack.push(s),s.collectChildTags){for(const b of Object.keys(a.prefixesCustom).sort()){const _=a.prefixesCustom[b],E=b===""?"xmlns":"xmlns:"+b;E in r||(r[E]=_)}const p=Object.keys(r).map(b=>`${b}="${r[b]}"`).join(" ");if(s.text=[`<${e}${p?" "+p:""}>`],this.features.skipHandlingXmlLiteralChildren)return}let o=!0,u=!0;if(this.features.onlyAllowUriRelRevIfProperty&&("property"in r&&"rel"in r&&(o=!1,r.rel.indexOf(":")<0&&delete r.rel),"property"in r&&"rev"in r&&(u=!1,r.rev.indexOf(":")<0&&delete r.rev)),this.features.copyRdfaPatterns){if(a.collectedPatternTag){const p={attributes:r,children:[],name:e,referenced:!1,rootPattern:!1,text:[]};a.collectedPatternTag.children.push(p),s.collectedPatternTag=p;return}if(r.typeof==="rdfa:Pattern"){s.collectedPatternTag={attributes:r,children:[],name:e,parentTag:a,referenced:!1,rootPattern:!0,text:[]};return}if(r.property==="rdfa:copy"){const p=r.resource||r.href||r.src;this.rdfaPatterns[p]?this.emitPatternCopy(a,this.rdfaPatterns[p],p):(this.pendingRdfaPatternCopies[p]||(this.pendingRdfaPatternCopies[p]=[]),this.pendingRdfaPatternCopies[p].push(a));return}}this.features.baseTag&&e==="base"&&r.href&&(this.util.baseIRI=this.util.getBaseIRI(r.href)),this.features.xmlBase&&r["xml:base"]&&(s.localBaseIRI=this.util.getBaseIRI(r["xml:base"])),this.features.timeTag&&e==="time"&&!r.datatype&&(s.interpretObjectAsTime=!0);let c,l,d;if("vocab"in r?r.vocab?(s.vocab=r.vocab,this.emitTriple(this.util.getBaseIriTerm(s),this.util.dataFactory.namedNode(Ci.Util.RDFA+"usesVocabulary"),this.util.dataFactory.namedNode(s.vocab))):s.vocab=this.activeTagStack[0].vocab:s.vocab=a.vocab,s.prefixesCustom=Ci.Util.parsePrefixes(r,a.prefixesCustom,this.features.xmlnsPrefixMappings),s.prefixesAll=Object.keys(s.prefixesCustom).length>0?Object.assign(Object.assign({},a.prefixesAll),s.prefixesCustom):a.prefixesAll,this.features.roleAttribute&&r.role){const p=r.id?this.util.createIri("#"+r.id,s,!1,!1,!1):this.util.createBlankNode(),b=s.vocab;s.vocab="http://www.w3.org/1999/xhtml/vocab#";for(const _ of this.util.createVocabIris(r.role,s,!0,!1))this.emitTriple(p,this.util.dataFactory.namedNode("http://www.w3.org/1999/xhtml/vocab#role"),_);s.vocab=b}"xml:lang"in r||this.features.langAttribute&&"lang"in r?s.language=r["xml:lang"]||r.lang:s.language=a.language;const f=this.activeTagStack.length===2;if(!("rel"in r)&&!("rev"in r)?"property"in r&&!("content"in r)&&!("datatype"in r)?("about"in r?(c=this.util.createIri(r.about,s,!1,!0,!0),s.explicitNewSubject=!!c):f?c=!0:a.object&&(c=a.object),"typeof"in r&&("about"in r&&(d=this.util.createIri(r.about,s,!1,!0,!0)),!d&&f&&(d=!0),!d&&"resource"in r&&(d=this.util.createIri(r.resource,s,!1,!0,!0)),!d&&("href"in r||"src"in r)&&(d=this.util.createIri(r.href||r.src,s,!1,!1,!0)),!d&&this.isInheritSubjectInHeadBody(e)&&(d=c),d||(d=this.util.createBlankNode()),l=d)):(("about"in r||"resource"in r)&&(c=this.util.createIri(r.about||r.resource,s,!1,!0,!0),s.explicitNewSubject=!!c),!c&&("href"in r||"src"in r)&&(c=this.util.createIri(r.href||r.src,s,!1,!1,!0),s.explicitNewSubject=!!c),c||(f?c=!0:this.isInheritSubjectInHeadBody(e)?c=a.object:"typeof"in r?(c=this.util.createBlankNode(),s.explicitNewSubject=!0):a.object&&(c=a.object,"property"in r||(s.skipElement=!0))),"typeof"in r&&(d=c)):("about"in r?(c=this.util.createIri(r.about,s,!1,!0,!0),s.explicitNewSubject=!!c,"typeof"in r&&(d=c)):f?c=!0:a.object&&(c=a.object),"resource"in r&&(l=this.util.createIri(r.resource,s,!1,!0,!0)),l||("href"in r||"src"in r?l=this.util.createIri(r.href||r.src,s,!1,!1,!0):"typeof"in r&&!("about"in r)&&!this.isInheritSubjectInHeadBody(e)&&(l=this.util.createBlankNode())),"typeof"in r&&!("about"in r)&&(this.isInheritSubjectInHeadBody(e)?d=c:d=l)),d)for(const p of this.util.createVocabIris(r.typeof,s,!0,!0))this.emitTriple(this.util.getResourceOrBaseIri(d,s),this.util.dataFactory.namedNode(Ci.Util.RDF+"type"),p);if(c&&(s.listMapping={}),l){if("rel"in r&&"inlist"in r)for(const p of this.util.createVocabIris(r.rel,s,o,!1))this.addListMapping(s,c,p,l);if(!("rel"in r&&"inlist"in r)){if("rel"in r)for(const p of this.util.createVocabIris(r.rel,s,o,!1))this.emitTriple(this.util.getResourceOrBaseIri(c,s),p,this.util.getResourceOrBaseIri(l,s));if("rev"in r)for(const p of this.util.createVocabIris(r.rev,s,u,!1))this.emitTriple(this.util.getResourceOrBaseIri(l,s),p,this.util.getResourceOrBaseIri(c,s))}}if(!l){if("rel"in r)if("inlist"in r)for(const p of this.util.createVocabIris(r.rel,s,o,!1))this.addListMapping(s,c,p,null),s.incompleteTriples.push({predicate:p,reverse:!1,list:!0});else for(const p of this.util.createVocabIris(r.rel,s,o,!1))s.incompleteTriples.push({predicate:p,reverse:!1});if("rev"in r)for(const p of this.util.createVocabIris(r.rev,s,u,!1))s.incompleteTriples.push({predicate:p,reverse:!0});s.incompleteTriples.length>0&&(l=this.util.createBlankNode())}if("property"in r){s.predicates=this.util.createVocabIris(r.property,s,!0,!1);let p;if("datatype"in r?(s.datatype=this.util.createIri(r.datatype,s,!0,!0,!1),s.datatype&&(s.datatype.value===Ci.Util.RDF+"XMLLiteral"||this.features.htmlDatatype&&s.datatype.value===Ci.Util.RDF+"HTML")&&(s.collectChildTags=!0)):(!("rev"in r)&&!("rel"in r)&&!("content"in r)&&("resource"in r&&(p=this.util.createIri(r.resource,s,!1,!0,!0)),!p&&"href"in r&&(p=this.util.createIri(r.href,s,!1,!1,!0)),!p&&"src"in r&&(p=this.util.createIri(r.src,s,!1,!1,!0))),"typeof"in r&&!("about"in r)&&(p=d)),"content"in r){const b=this.util.createLiteral(r.content,s);if("inlist"in r)for(const _ of s.predicates)this.addListMapping(s,c,_,b);else{const _=this.util.getResourceOrBaseIri(c,s);for(const E of s.predicates)this.emitTriple(_,E,b)}s.predicates=null}else if(this.features.datetimeAttribute&&"datetime"in r){s.interpretObjectAsTime=!0;const b=this.util.createLiteral(r.datetime,s);if("inlist"in r)for(const _ of s.predicates)this.addListMapping(s,c,_,b);else{const _=this.util.getResourceOrBaseIri(c,s);for(const E of s.predicates)this.emitTriple(_,E,b)}s.predicates=null}else if(p){const b=this.util.getResourceOrBaseIri(p,s);if("inlist"in r)for(const _ of s.predicates)this.addListMapping(s,c,_,b);else{const _=this.util.getResourceOrBaseIri(c,s);for(const E of s.predicates)this.emitTriple(_,E,b)}s.predicates=null}}let h=!1;if(!s.skipElement&&c&&a.incompleteTriples.length>0){h=!0;const p=this.util.getResourceOrBaseIri(a.subject,s),b=this.util.getResourceOrBaseIri(c,s);for(const _ of a.incompleteTriples)if(_.reverse)this.emitTriple(b,_.predicate,p);else if(_.list){let E=null;for(let w=this.activeTagStack.length-1;w>=0;w--)if(this.activeTagStack[w].inlist){E=this.activeTagStack[w];break}this.addListMapping(E,c,_.predicate,b)}else this.emitTriple(p,_.predicate,b)}!h&&a.incompleteTriples.length>0&&(s.incompleteTriples=s.incompleteTriples.concat(a.incompleteTriples)),s.subject=c||a.subject,s.object=l||c}onText(e){const r=this.activeTagStack[this.activeTagStack.length-1];if(this.features.copyRdfaPatterns&&r.collectedPatternTag){r.collectedPatternTag.text.push(e);return}r.text||(r.text=[]),r.text.push(e)}onTagClose(){const e=this.activeTagStack[this.activeTagStack.length-1],r=this.activeTagStack[this.activeTagStack.length-2];if(!(e.collectChildTags&&r.collectChildTags&&this.features.skipHandlingXmlLiteralChildren)){if(this.features.copyRdfaPatterns&&e.collectedPatternTag&&e.collectedPatternTag.rootPattern){const n=e.collectedPatternTag.attributes.resource;if(delete e.collectedPatternTag.attributes.resource,delete e.collectedPatternTag.attributes.typeof,this.rdfaPatterns[n]=e.collectedPatternTag,this.pendingRdfaPatternCopies[n]){for(const a of this.pendingRdfaPatternCopies[n])this.emitPatternCopy(a,e.collectedPatternTag,n);delete this.pendingRdfaPatternCopies[n]}this.activeTagStack.pop();return}if(e.predicates){const n=this.util.getResourceOrBaseIri(e.subject,e);let a=e.text||[];e.collectChildTags&&r.collectChildTags&&(a=a.slice(1));const s=this.util.createLiteral(a.join(""),e);if(e.inlist)for(const o of e.predicates)this.addListMapping(e,n,o,s);else for(const o of e.predicates)this.emitTriple(n,o,s);r.predicates||(e.text=null)}if(e.object&&Object.keys(e.listMapping).length>0){const n=this.util.getResourceOrBaseIri(e.object,e);for(const a in e.listMapping){const s=this.util.dataFactory.namedNode(a),o=e.listMapping[a];if(o.length>0){const u=o.map(()=>this.util.createBlankNode());for(let c=0;c`),e.text&&r&&(r.text?r.text=r.text.concat(e.text):r.text=e.text)}onEnd(){if(this.features.copyRdfaPatterns){this.features.copyRdfaPatterns=!1;for(const e in this.rdfaPatterns){const r=this.rdfaPatterns[e];r.referenced||(r.attributes.typeof="rdfa:Pattern",r.attributes.resource=e,this.emitPatternCopy(r.parentTag,r,e),r.referenced=!1,delete r.attributes.typeof,delete r.attributes.resource)}for(const e in this.pendingRdfaPatternCopies)for(const r of this.pendingRdfaPatternCopies[e])this.activeTagStack.push(r),this.onTagOpen("link",{property:"rdfa:copy",href:e}),this.onTagClose(),this.activeTagStack.pop();this.features.copyRdfaPatterns=!0}}isInheritSubjectInHeadBody(e){return this.features.inheritSubjectInHeadBody&&(e==="head"||e==="body")}addListMapping(e,r,n,a){if(e.explicitNewSubject){const s=this.util.createBlankNode();this.emitTriple(this.util.getResourceOrBaseIri(r,e),n,s),this.emitTriple(s,this.util.dataFactory.namedNode(Ci.Util.RDF+"first"),this.util.getResourceOrBaseIri(a,e)),this.emitTriple(s,this.util.dataFactory.namedNode(Ci.Util.RDF+"rest"),this.util.dataFactory.namedNode(Ci.Util.RDF+"nil"))}else{let s=e.listMappingLocal[n.value];s||(e.listMappingLocal[n.value]=s=[]),a&&s.push(a)}}emitTriple(e,r,n){e.termType==="NamedNode"&&e.value.indexOf(":")<0||r.termType==="NamedNode"&&r.value.indexOf(":")<0||n.termType==="NamedNode"&&n.value.indexOf(":")<0||this.push(this.util.dataFactory.quad(e,r,n,this.defaultGraph))}emitPatternCopy(e,r,n){if(this.activeTagStack.push(e),r.referenced=!0,!r.constructedBlankNodes)r.constructedBlankNodes=[],this.util.blankNodeFactory=()=>{const a=this.util.dataFactory.blankNode();return r.constructedBlankNodes.push(a),a};else{let a=0;this.util.blankNodeFactory=()=>r.constructedBlankNodes[a++]}this.emitPatternCopyAbsolute(r,!0,n),this.util.blankNodeFactory=null,this.activeTagStack.pop()}emitPatternCopyAbsolute(e,r,n){if(!(!r&&e.attributes.property==="rdfa:copy"&&e.attributes.href===n)){this.onTagOpen(e.name,e.attributes);for(const a of e.text)this.onText(a);for(const a of e.children)this.emitPatternCopyAbsolute(a,!1,n);this.onTagClose()}}initializeParser(e){return new _ae.Parser({onclosetag:()=>{try{this.onTagClose(),this.htmlParseListener&&this.htmlParseListener.onTagClose()}catch(r){this.emit("error",r)}},onend:()=>{try{this.onEnd(),this.htmlParseListener&&this.htmlParseListener.onEnd()}catch(r){this.emit("error",r)}},onopentag:(r,n)=>{try{this.onTagOpen(r,n),this.htmlParseListener&&this.htmlParseListener.onTagOpen(r,n)}catch(a){this.emit("error",a)}},ontext:r=>{try{this.onText(r),this.htmlParseListener&&this.htmlParseListener.onText(r)}catch(n){this.emit("error",n)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:e})}}jm.RdfaParser=OR;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(sF,t),r(oF,t),r(uF,t),r(jm,t),r(Gu,t),r(S0,t)})(_R);Object.defineProperty(Cm,"__esModule",{value:!0});Cm.ActorRdfParseXmlRdfa=void 0;const wae=ml,Sae=_R;class Tae extends wae.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){var o;const a=(e.headers&&e.headers.get("content-language"))??void 0;e.data.on("error",u=>s.emit("error",u));const s=e.data.pipe(new Sae.RdfaParser({baseIRI:(o=e.metadata)==null?void 0:o.baseIRI,profile:"xml",language:a}));return{data:s,metadata:{triples:!0}}}}Cm.ActorRdfParseXmlRdfa=Tae;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Cm,t)})(aF);var FF={},qm={},AR={},Eae=function(){var t=function(ze,De,Be,Je){for(Be=Be||{},Je=ze.length;Je--;Be[ze[Je]]=De);return Be},e=[7,12,13,14,15,16,20,25,115,130],r=[7,13,16,20,25,115,130],n=[7,13,16,115,130],a=[1,25],s=[1,29],o=[1,27],u=[1,28],c=[13,16,115,130],l=[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],d=[28,56],f=[1,42],h=[46,48,53,56],p=[1,54],b=[1,60],_=[1,56],E=[1,57],w=[1,58],O=[1,63],A=[1,64],T=[1,65],I=[1,66],D=[1,67],U=[1,68],H=[1,75],N=[28,46,48,53,56],x=[28,42,46,48,53,56],F=[13,16,28,38,40,42,44,46,48,53,56,92,115,119,120,130,131,132,133,134,135,136],X=[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],ne=[13,16,38,40,44,92,115,119,120,130,131,132,133,134,135,136],$=[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],j=[13,16,28,56,115,130],Q=[13,16,38,58,87,96,109,115,126,130],se=[1,116],ie=[1,112],be=[1,108],he=[1,114],Te=[1,111],Ne=[7,13,16,20,25,44,48,53,56,67,85,87,95,96,115,128,129,130],ye=[48,53],ce=[48,53,87,96,126],Re=[13,16,44,48,53,56,85,87,95,96,115,128,129,130],oe=[1,126],J=[13,16,40,44,48,53,56,85,87,95,96,115,128,129,130],le=[1,129],pe=[48,53,67,87,96,126],L=[13,16,40,44,48,53,56,67,85,87,95,96,115,128,129,130],P=[1,133],g=[13,16,40,44,48,53,56,67,85,87,95,96,102,115,128,129,130],y=[13,16,40,44,48,53,56,67,85,87,93,95,96,102,110,111,115,128,129,130],v=[1,151],C=[1,153],V=[1,156],q=[1,157],G=[1,158],Y=[1,167],ee=[1,175],ae=[13,16,44,48,53,56,67,85,87,95,96,115,128,129,130],ve=[13,16,44,48,53,56,67,85,87,95,96,115,126,128,129,130],me=[13,16,46,92,115,119,120,130,131,132,133,134,135,136],Ee={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(De,Be,Je,Pt,at,qe,hs){var ke=qe.length-1;switch(at){case 1:this.$=Tt(Ae.factory.namedNode(br("")),Ae.factory.namedNode(W),Ae.factory.namedNode(Ge+"Ontology"));break;case 5:Ae.base=Ae.factory.namedNode(qe[ke].slice(1,-1)),Ae.n3Parser._setBase(Ae.base.value);break;case 6:this.$=Tt(Ae.base,Ae.factory.namedNode(Ge+"imports"),Ae.factory.namedNode(qe[ke].slice(1,-1)));break;case 7:this.$=Ae.prefixes[qe[ke-1].substr(0,qe[ke-1].length-1)]=br(qe[ke]);break;case 8:Ae.nodeShapeStack=!1,Tt(Ae.currentNodeShape=qe[ke],Ae.factory.namedNode(W),Ae.factory.namedNode(Ue+"NodeShape"));break;case 10:this.$=Tt(Ae.currentNodeShape,Ae.factory.namedNode(W),Ae.factory.namedNode(We+"Class"));break;case 11:this.$=Se();break;case 13:this.$=qe[ke].forEach(mr=>Tt(Ae.currentNodeShape,qe[ke-1],mr));break;case 14:this.$=[qe[ke-1],...qe[ke]];break;case 18:this.$=Wr(qe[ke-1],!0);break;case 19:case 34:case 42:case 60:case 63:this.$=qe[ke];break;case 20:Ae.tempCurrentNodeShape=Ae.currentNodeShape,this.$=Ae.currentNodeShape=Pr();break;case 21:Ae.currentNodeShape=Ae.tempCurrentNodeShape;break;case 22:case 31:this.$=qe[ke-2];break;case 23:Ae.tempCurrentNodeShape=Ae.currentNodeShape,Ae.currentNodeShape=Ae.currentPropertyNode;break;case 24:Ae.currentNodeShape=Ae.tempCurrentNodeShape;break;case 26:Ae.currentNodeShape=qe[ke];break;case 29:Ae.nodeShapeStack?(Ae.nodeShapeStack.push(Ae.currentNodeShape),Tt(Ae.currentPropertyNode,Ae.factory.namedNode(Ue+"node"),Ae.currentNodeShape=Pr())):Ae.nodeShapeStack=[],this.$=Ae.currentNodeShape;break;case 30:Ae.nodeShapeStack.length>0&&(Ae.currentNodeShape=Ae.nodeShapeStack.pop());break;case 32:this.$=qe[ke].forEach(mr=>{Tt(Ae.currentNodeShape,Ae.factory.namedNode(Ue+"targetClass"),mr)});break;case 35:this.$=Tt(Ae.currentNodeShape,Ae.factory.namedNode(Ue+qe[ke][0]),qe[ke][1]);break;case 36:break;case 37:const yn=Wr([qe[ke-1],...qe[ke]].map(mr=>{const Pi=Pr();return Tt(Pi,Ae.factory.namedNode(Ue+mr[0]),mr[1]),Pi}));this.$=["or",yn];break;case 39:case 46:this.$=re("not",...qe[ke]);break;case 40:case 50:this.$=[qe[ke-2],qe[ke]];break;case 43:this.$=qe[ke]&&B(...qe[ke]);break;case 44:this.$=B("or",Wr([qe[ke-1],...qe[ke]].map(mr=>{const Pi=Pr();return Tt(Pi,Ae.factory.namedNode(Ue+mr[0]),mr[1]),Pi})));break;case 47:this.$=[lt[qe[ke].value]?"datatype":"class",qe[ke]];break;case 48:this.$=["nodeKind",Ae.factory.namedNode(Ue+qe[ke])];break;case 49:this.$=["node",Ae.factory.namedNode(qe[ke])];break;case 51:this.$=void 0;break;case 53:this.$=qe[ke]>0&&B("minCount",Qt(qe[ke],ue));break;case 54:this.$=B("maxCount",Qt(qe[ke],ue));break;case 56:this.$=Br(qe[ke].slice(1));break;case 57:this.$=br(qe[ke]);break;case 59:Tt(Ae.currentNodeShape,Ae.factory.namedNode(Ue+"property"),Ae.currentPropertyNode=Pr()),B("path",qe[ke]);break;case 62:const gr=Pr();Tt(gr,Ae.factory.namedNode(Ue+"alternativePath"),Wr([qe[ke-1],...qe[ke]])),this.$=gr;break;case 65:this.$=Wr([qe[ke-1],...qe[ke]]);break;case 67:Tt(this.$=Pr(),Ae.factory.namedNode(Ue+qe[ke]),qe[ke-1]);break;case 69:Tt(this.$=Pr(),Ae.factory.namedNode(Ue+"inversePath"),qe[ke]);break;case 71:this.$="zeroOrOnePath";break;case 72:this.$="zeroOrMorePath";break;case 73:this.$="oneOrMorePath";break;case 75:this.$=qe[ke-1];break;case 77:this.$=Wr(qe[ke-1]);break;case 80:this.$=Ae.factory.namedNode(br(qe[ke]));break;case 81:this.$=Ae.factory.namedNode(Br(qe[ke]));break;case 82:this.$=Se(Ae.factory.namedNode(W));break;case 83:this.$=Qt(qe[ke]);break;case 84:this.$=_r(qe[ke-1],lowercase(qe[ke].substr(1)));break;case 85:this.$=Qt(qe[ke-2],qe[ke]);break;case 86:this.$=Qt(qe[ke],ue);break;case 87:this.$=Qt(qe[ke],ge);break;case 88:this.$=Qt(qe[ke].toLowerCase(),we);break;case 89:this.$=Qt(qe[ke].toLowerCase(),Me);break;case 90:this.$=Rn(qe[ke],1);break;case 91:this.$=Rn(qe[ke],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:qe[ke-1].push(qe[ke]);break;case 114:case 116:case 122:case 130:case 134:case 136:this.$=[qe[ke]];break}},table:[t(e,[2,92],{3:1,4:2}),{1:[3]},t(r,[2,96],{5:3,8:4,9:5,10:6,11:7,12:[1,8],14:[1,9],15:[1,10]}),t(n,[2,110],{6:11,124:12,54:13,19:14,24:15,20:[1,16],25:[1,17]}),t(e,[2,93]),t(e,[2,2]),t(e,[2,3]),t(e,[2,4]),{13:[1,18]},{13:[1,19]},{16:[1,20]},{7:[1,21]},t(r,[2,97]),{7:[2,28],13:a,16:s,18:24,51:23,52:22,114:26,115:o,130:u},t(r,[2,94]),t(r,[2,95]),{13:a,16:s,17:30,18:31,114:26,115:o,130:u},{13:a,16:s,17:32,18:31,114:26,115:o,130:u},t(e,[2,5]),t(e,[2,6]),{13:[1,33]},{1:[2,1]},t(n,[2,111]),{13:a,16:s,18:36,29:34,30:35,114:26,115:o,130:u},t(c,[2,26]),t(l,[2,80]),t(l,[2,81]),t(l,[2,82]),t(l,[2,140]),t(l,[2,141]),t(d,[2,98],{21:37,60:38,61:[1,39]}),t([28,56,61],[2,8]),{26:40,27:41,28:f,56:[2,102]},t(e,[2,7]),{53:[1,43]},t(h,[2,104],{31:44,27:45,28:f}),{13:a,16:s,18:51,32:46,33:47,35:48,36:49,37:50,38:p,43:53,44:b,92:_,113:52,114:26,115:o,116:55,119:E,120:w,121:59,122:61,123:62,130:u,131:O,132:A,133:T,134:I,135:D,136:U},{22:69,27:70,28:f,56:[2,100]},t(d,[2,99]),{13:a,16:s,18:72,62:71,114:26,115:o,130:u},{23:73,55:74,56:H},{56:[2,103]},{13:a,16:s,18:36,29:76,30:35,114:26,115:o,130:u},t(n,[2,27]),t(h,[2,12]),t(h,[2,105]),t(N,[2,13]),t(x,[2,106],{34:77}),t(F,[2,15]),t(F,[2,16]),t(F,[2,17]),t(X,[2,78]),t(X,[2,79]),{13:a,16:s,18:36,29:78,30:35,114:26,115:o,130:u},t(ne,[2,108],{39:79}),t(X,[2,83],{117:[1,80],118:[1,81]}),t(X,[2,86]),t(X,[2,87]),t(X,[2,88]),t(X,[2,89]),t(c,[2,20]),t($,[2,90]),t($,[2,91]),t(X,[2,142]),t(X,[2,143]),t($,[2,144]),t($,[2,145]),t($,[2,146]),t($,[2,147]),{23:82,55:74,56:H},{56:[2,101]},t(d,[2,32],{114:26,18:83,13:a,16:s,115:o,130:u}),t(j,[2,114]),t(r,[2,10]),t(Q,[2,112],{59:84}),t(Q,[2,29]),t(h,[2,11]),t(N,[2,14],{41:85,42:[1,86]}),{45:87,46:[1,88]},{13:a,16:s,18:51,33:90,35:48,36:49,37:50,38:p,40:[1,89],43:53,44:b,92:_,113:52,114:26,115:o,116:55,119:E,120:w,121:59,122:61,123:62,130:u,131:O,132:A,133:T,134:I,135:D,136:U},t(X,[2,84]),{13:a,16:s,18:91,114:26,115:o,130:u},t(r,[2,9]),t(j,[2,115]),{13:a,16:s,18:115,38:se,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:ie,96:be,97:101,99:103,103:106,105:109,106:113,108:110,109:he,114:26,115:o,125:96,126:Te,130:u},t(x,[2,107]),{13:a,16:s,18:51,33:117,35:48,36:49,37:50,38:p,43:53,44:b,92:_,113:52,114:26,115:o,116:55,119:E,120:w,121:59,122:61,123:62,130:u,131:O,132:A,133:T,134:I,135:D,136:U},t(F,[2,22]),t(F,[2,21]),t(F,[2,18]),t(ne,[2,109]),t(X,[2,85]),t(Ne,[2,31]),t(Q,[2,113]),t(Ne,[2,30]),{47:120,48:[1,121],50:119,53:[2,120],65:118},t(ye,[2,118],{70:100,68:102,72:104,73:105,74:107,69:122,87:ie,96:be,126:Te}),t(ye,[2,119]),t(ce,[2,116]),t(Re,[2,128],{79:123}),t(ce,[2,35]),t(Re,[2,59]),t(ce,[2,36],{71:124,66:125,67:oe}),t(J,[2,61],{100:127,98:128,67:le}),t(pe,[2,38]),{72:130,74:107,87:ie,126:Te},t(L,[2,64],{104:131,101:132,102:P}),{75:[1,134]},t([13,16,56,85,87,95,115,126,128,129,130],[2,58]),t(g,[2,68]),{13:a,16:s,18:115,38:se,105:135,106:113,114:26,115:o,130:u},{75:[2,124]},{75:[2,125]},t(g,[2,66],{107:136,93:[1,138],110:[1,137],111:[1,139]}),t([13,16,38,115,130],[2,70]),t(y,[2,74]),{13:a,16:s,18:115,38:se,97:140,99:103,103:106,105:109,106:113,108:110,109:he,114:26,115:o,130:u},t(x,[2,19]),{53:[1,141]},{53:[2,121]},{13:a,16:s,18:36,29:142,30:35,114:26,115:o,130:u},t(c,[2,23]),t(ce,[2,117]),t(ye,[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:a,16:s,44:[1,146],56:H,85:v,87:C,95:V,96:be,115:o,128:q,129:G,130:u}),t(ce,[2,37],{66:159,67:oe}),t(pe,[2,122]),{68:160,72:104,73:105,74:107,87:ie,96:be,126:Te},t(J,[2,62],{98:161,67:le}),t(L,[2,134]),{13:a,16:s,18:115,38:se,99:162,103:106,105:109,106:113,108:110,109:he,114:26,115:o,130:u},t(pe,[2,39]),t(L,[2,65],{101:163,102:P}),t(g,[2,136]),{13:a,16:s,18:115,38:se,103:164,105:109,106:113,108:110,109:he,114:26,115:o,130:u},{13:a,16:s,18:51,35:166,44:Y,76:165,92:_,113:52,114:26,115:o,116:55,119:E,120:w,121:59,122:61,123:62,130:u,131:O,132:A,133:T,134:I,135:D,136:U},t(g,[2,69]),t(g,[2,67]),t(g,[2,71]),t(g,[2,72]),t(g,[2,73]),{40:[1,168]},t(Q,[2,33]),{48:[1,170],49:169},t(Re,[2,129]),t(Re,[2,126]),t(Re,[2,127]),{89:171,92:[1,172]},t(Re,[2,43],{83:173,80:174,67:ee}),t(ae,[2,45]),{13:a,16:s,18:150,23:154,55:74,56:H,84:176,85:v,86:152,87:C,94:155,95:V,114:26,115:o,128:q,129:G,130:u},t(ae,[2,47]),t(ae,[2,48]),t(ae,[2,49]),{75:[1,177]},t(ae,[2,51]),t(ae,[2,56]),{13:[1,178]},t(ae,[2,132]),t(ae,[2,133]),t(pe,[2,123]),t(pe,[2,34]),t(L,[2,135]),t(L,[2,60]),t(g,[2,137]),t(g,[2,63]),t(pe,[2,40]),t(ve,[2,76]),t(me,[2,138],{112:179}),t(y,[2,75]),{53:[2,25]},{53:[2,24]},{90:[1,180]},{90:[2,53]},t(Re,[2,44],{80:181,67:ee}),t(ae,[2,130]),{13:a,16:s,18:150,23:154,55:74,56:H,73:149,81:182,84:148,85:v,86:152,87:C,94:155,95:V,96:be,114:26,115:o,128:q,129:G,130:u},t(ae,[2,46]),{13:a,16:s,18:51,35:166,44:Y,76:183,92:_,113:52,114:26,115:o,116:55,119:E,120:w,121:59,122:61,123:62,130:u,131:O,132:A,133:T,134:I,135:D,136:U},t(ae,[2,57]),{13:a,16:s,18:51,35:185,46:[1,184],92:_,113:52,114:26,115:o,116:55,119:E,120:w,121:59,122:61,123:62,130:u,131:O,132:A,133:T,134:I,135:D,136:U},{91:186,92:[1,187],93:[1,188]},t(ae,[2,131]),t(ae,[2,42]),t(ae,[2,50]),t(ve,[2,77]),t(me,[2,139]),{46:[1,189]},{46:[2,54]},{46:[2,55]},t(Re,[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(De,Be){if(Be.recoverable)this.trace(De);else{var Je=new Error(De);throw Je.hash=Be,Je}},parse:function(De){var Be=this,Je=[0],Pt=[null],at=[],qe=this.table,hs="",ke=0,yn=0,gr=2,mr=1,Pi=at.slice.call(arguments,1),vt=Object.create(this.lexer),ya={yy:{}};for(var ki in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ki)&&(ya.yy[ki]=this.yy[ki]);vt.setInput(De,ya.yy),ya.yy.lexer=vt,ya.yy.parser=this,typeof vt.yylloc>"u"&&(vt.yylloc={});var ir=vt.yylloc;at.push(ir);var to=vt.options&&vt.options.ranges;typeof ya.yy.parseError=="function"?this.parseError=ya.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var ru=function(){var qn;return qn=vt.lex()||mr,typeof qn!="number"&&(qn=Be.symbols_[qn]||qn),qn},Xr,Di,an,Qi,sn={},Na,Zr,ps,Ca;;){if(Di=Je[Je.length-1],this.defaultActions[Di]?an=this.defaultActions[Di]:((Xr===null||typeof Xr>"u")&&(Xr=ru()),an=qe[Di]&&qe[Di][Xr]),typeof an>"u"||!an.length||!an[0]){var ai="";Ca=[];for(Na in qe[Di])this.terminals_[Na]&&Na>gr&&Ca.push("'"+this.terminals_[Na]+"'");vt.showPosition?ai="Parse error on line "+(ke+1)+`: +`,r=this.i,a=qa;break;case Nr:return this.text+=n.slice(r),!1}if(a===e)return this.text+=n.slice(r,this.prevI),!0}}captureNameChars(){const{chunk:e,i:r}=this;for(;;){const n=this.getCode();if(n===Nr)return this.name+=e.slice(r),Nr;if(!VD(n))return this.name+=e.slice(r,this.prevI),n===ms?qa:n}}skipSpaces(){for(;;){const e=this.getCodeNorm();if(e===Nr||!Ni(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,e==="1.0"?(this.isChar=yne,this.getCode=this.getCode10):(this.isChar=_ne,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=Tne}sBeginWhitespace(){const e=this.i,r=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),r){case Ou:if(this.state=US,this.text.length!==0)throw new Error("no-empty text at start");break;case Nr:break;default:this.unget(),this.state=li,this.xmlDeclPossible=!1}}sDoctype(){var e;const r=this.captureTo(Wne);switch(r){case on:{(e=this.doctypeHandler)===null||e===void 0||e.call(this,this.text),this.text="",this.state=li,this.doctype=!0;break}case Nr:break;default:this.text+=String.fromCodePoint(r),r===tF?this.state=kl:Zy(r)&&(this.state=Ene,this.q=r)}}sDoctypeQuote(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=BS)}sDTD(){const e=this.captureTo(Xne);e!==Nr&&(this.text+=String.fromCodePoint(e),e===id?this.state=BS:e===Ou?this.state=Ane:Zy(e)&&(this.state=One,this.q=e))}sDTDQuoted(){const e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=kl,this.q=null)}sDTDOpenWaka(){const e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case JD:this.state=Rne,this.openWakaBang="";break;case jn:this.state=Pne;break;default:this.state=kl}}sDTDOpenWakaBang(){const e=String.fromCodePoint(this.getCodeNorm()),r=this.openWakaBang+=e;this.text+=e,r!=="-"&&(this.state=r==="--"?$S:kl,this.openWakaBang="")}sDTDComment(){this.captureToChar(Jy)&&(this.text+="-",this.state=xne)}sDTDCommentEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=e===Jy?Ine:$S}sDTDCommentEnded(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===on?this.state=kl:(this.fail("malformed comment."),this.state=$S)}sDTDPI(){this.captureToChar(jn)&&(this.text+="?",this.state=Dne)}sDTDPIEnding(){const e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===on&&(this.state=kl)}sText(){this.tags.length!==0?this.handleTextInRoot():this.handleTextOutsideRoot()}sEntity(){let{i:e}=this;const{chunk:r}=this;e:for(;;)switch(this.getCode()){case ms:this.entity+=`${r.slice(e,this.prevI)} +`,e=this.i;break;case zne:{const{entityReturnState:n}=this,a=this.entity+r.slice(e,this.prevI);this.state=n;let s;a===""?(this.fail("empty entity name."),s="&;"):(s=this.parseEntity(a),this.entity=""),(n!==li||this.textHandler!==void 0)&&(this.text+=s);break e}case Nr:this.entity+=r.slice(e);break e}}sOpenWaka(){const e=this.getCode();if(Xf(e))this.state=Vne,this.unget(),this.xmlDeclPossible=!1;else switch(e){case Yy:this.state=Qne,this.xmlDeclPossible=!1;break;case JD:this.state=Nne,this.openWakaBang="",this.xmlDeclPossible=!1;break;case jn:this.state=Lne;break;default:this.fail("disallowed character in tag name"),this.state=li,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=VS,this.openWakaBang="";break;case"--":this.state=qS,this.openWakaBang="";break;case"DOCTYPE":this.state=BS,(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(Jy)&&(this.state=Cne)}sCommentEnding(){var e;const r=this.getCodeNorm();r===Jy?(this.state=jne,(e=this.commentHandler)===null||e===void 0||e.call(this,this.text),this.text=""):(this.text+=`-${String.fromCodePoint(r)}`,this.state=qS)}sCommentEnded(){const e=this.getCodeNorm();e!==on?(this.fail("malformed comment."),this.text+=`--${String.fromCodePoint(e)}`,this.state=qS):this.state=li}sCData(){this.captureToChar(id)&&(this.state=Mne)}sCDataEnding(){const e=this.getCodeNorm();e===id?this.state=Fne:(this.text+=`]${String.fromCodePoint(e)}`,this.state=VS)}sCDataEnding2(){var e;const r=this.getCodeNorm();switch(r){case on:{(e=this.cdataHandler)===null||e===void 0||e.call(this,this.text),this.text="",this.state=li;break}case id:this.text+="]";break;default:this.text+=`]]${String.fromCodePoint(r)}`,this.state=VS}}sPIFirstChar(){const e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=kD):e===jn||Ni(e)?(this.fail("processing instruction without a target."),this.state=e===jn?Ky:HS):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(e),this.state=kD)}sPIRest(){const{chunk:e,i:r}=this;for(;;){const n=this.getCodeNorm();if(n===Nr){this.piTarget+=e.slice(r);return}if(!this.nameCheck(n)){this.piTarget+=e.slice(r,this.prevI);const a=n===jn;a||Ni(n)?this.piTarget==="xml"?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=a?mc:QD):this.state=a?Ky:HS:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(n));break}}}sPIBody(){if(this.text.length===0){const e=this.getCodeNorm();e===jn?this.state=Ky:Ni(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(jn)&&(this.state=Ky)}sPIEnding(){var e;const r=this.getCodeNorm();if(r===on){const{piTarget:n}=this;n.toLowerCase()==="xml"&&this.fail("the XML declaration must appear at the start of the document."),(e=this.piHandler)===null||e===void 0||e.call(this,{target:n,body:this.text}),this.piTarget=this.text="",this.state=li}else r===jn?this.text+="?":(this.text+=`?${String.fromCodePoint(r)}`,this.state=HS);this.xmlDeclPossible=!1}sXMLDeclNameStart(){const e=this.skipSpaces();if(e===jn){this.state=mc;return}e!==Nr&&(this.state=Bne,this.name=String.fromCodePoint(e))}sXMLDeclName(){const e=this.captureTo(Kne);if(e===jn){this.state=mc,this.name+=this.text,this.text="",this.fail("XML declaration is incomplete.");return}if(Ni(e)||e===nd){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===nd?GD:$ne}}sXMLDeclEq(){const e=this.getCodeNorm();if(e===jn){this.state=mc,this.fail("XML declaration is incomplete.");return}Ni(e)||(e!==nd&&this.fail("value required."),this.state=GD)}sXMLDeclValueStart(){const e=this.getCodeNorm();if(e===jn){this.state=mc,this.fail("XML declaration is incomplete.");return}Ni(e)||(Zy(e)?this.q=e:(this.fail("value must be quoted."),this.q=KD),this.state=Une)}sXMLDeclValue(){const e=this.captureTo([this.q,jn]);if(e===jn){this.state=mc,this.text="",this.fail("XML declaration is incomplete.");return}if(e===Nr)return;const r=this.text;switch(this.text="",this.name){case"version":{this.xmlDeclExpects=["encoding","standalone"];const n=r;this.xmlDecl.version=n,/^1\.[0-9]+$/.test(n)?this.opt.forceXMLVersion||this.setXMLVersion(n):this.fail("version number must match /^1\\.[0-9]+$/.");break}case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(r)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=r;break;case"standalone":r!=="yes"&&r!=="no"&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=r;break}this.name="",this.state=qne}sXMLDeclSeparator(){const e=this.getCodeNorm();if(e===jn){this.state=mc;return}Ni(e)||(this.fail("whitespace required."),this.unget()),this.state=QD}sXMLDeclEnding(){var e;this.getCodeNorm()===on?(this.piTarget!=="xml"?this.fail("processing instructions are not allowed before root."):this.name!=="version"&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),(e=this.xmldeclHandler)===null||e===void 0||e.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=li):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}sOpenTag(){var e;const r=this.captureNameChars();if(r===Nr)return;const n=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=n.ns=Object.create(null)),(e=this.openTagStartHandler)===null||e===void 0||e.call(this,n),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),r){case on:this.openTag();break;case Yy:this.state=kS;break;default:Ni(r)||this.fail("disallowed character in tag name."),this.state=Kf}}sOpenTagSlash(){this.getCode()===on?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=Kf)}sAttrib(){const e=this.skipSpaces();e!==Nr&&(Xf(e)?(this.unget(),this.state=QS):e===on?this.openTag():e===Yy?this.state=kS:this.fail("disallowed character in attribute name."))}sAttribName(){const e=this.captureNameChars();e===nd?this.state=zD:Ni(e)?this.state=Hne:e===on?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):e!==Nr&&this.fail("disallowed character in attribute name.")}sAttribNameSawWhite(){const e=this.skipSpaces();switch(e){case Nr:return;case nd:this.state=zD;break;default:this.fail("attribute without value."),this.text="",this.name="",e===on?this.openTag():Xf(e)?(this.unget(),this.state=QS):(this.fail("disallowed character in attribute name."),this.state=Kf)}}sAttribValue(){const e=this.getCodeNorm();Zy(e)?(this.q=e,this.state=WD):Ni(e)||(this.fail("unquoted attribute value."),this.state=XD,this.unget())}sAttribValueQuoted(){const{q:e,chunk:r}=this;let{i:n}=this;for(;;)switch(this.getCode()){case e:this.pushAttrib(this.name,this.text+r.slice(n,this.prevI)),this.name=this.text="",this.q=null,this.state=kne;return;case qh:this.text+=r.slice(n,this.prevI),this.state=Xy,this.entityReturnState=WD;return;case qa:case ms:case GS:this.text+=`${r.slice(n,this.prevI)} `,n=this.i;break;case Ou:this.text+=r.slice(n,this.prevI),this.fail("disallowed character.");return;case Nr:this.text+=r.slice(n);return}}sAttribValueClosed(){const e=this.getCodeNorm();Ni(e)?this.state=Kf:e===on?this.openTag():e===Yy?this.state=kS:Xf(e)?(this.fail("no whitespace between attributes."),this.unget(),this.state=QS):this.fail("disallowed character in attribute name.")}sAttribValueUnquoted(){const e=this.captureTo(Jne);switch(e){case qh:this.state=Xy,this.entityReturnState=XD;break;case Ou:this.fail("disallowed character.");break;case Nr: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===on?this.openTag():this.state=Kf}}sCloseTag(){const e=this.captureNameChars();e===on?this.closeTag():Ni(e)?this.state=Gne:e!==Nr&&this.fail("disallowed character in closing tag.")}sCloseTagSawWhite(){switch(this.skipSpaces()){case on:this.closeTag();break;case Nr:break;default:this.fail("disallowed character in closing tag.")}}handleTextInRoot(){let{i:e,forbiddenState:r}=this;const{chunk:n,textHandler:a}=this;e:for(;;)switch(this.getCode()){case Ou:{if(this.state=US,a!==void 0){const{text:s}=this,o=n.slice(e,this.prevI);s.length!==0?(a(s+o),this.text=""):o.length!==0&&a(o)}r=vc;break e}case qh:this.state=Xy,this.entityReturnState=li,a!==void 0&&(this.text+=n.slice(e,this.prevI)),r=vc;break e;case id:switch(r){case vc:r=eN;break;case eN:r=WS;break;case WS:break;default:throw new Error("impossible state")}break;case on:r===WS&&this.fail('the string "]]>" is disallowed in char data.'),r=vc;break;case ms:a!==void 0&&(this.text+=`${n.slice(e,this.prevI)} +`),e=this.i,r=vc;break;case Nr:a!==void 0&&(this.text+=n.slice(e));break e;default:r=vc}this.forbiddenState=r}handleTextOutsideRoot(){let{i:e}=this;const{chunk:r,textHandler:n}=this;let a=!1;e:for(;;){const s=this.getCode();switch(s){case Ou:{if(this.state=US,n!==void 0){const{text:o}=this,u=r.slice(e,this.prevI);o.length!==0?(n(o+u),this.text=""):u.length!==0&&n(u)}break e}case qh:this.state=Xy,this.entityReturnState=li,n!==void 0&&(this.text+=r.slice(e,this.prevI)),a=!0;break e;case ms:n!==void 0&&(this.text+=`${r.slice(e,this.prevI)} +`),e=this.i;break;case Nr:n!==void 0&&(this.text+=r.slice(e));break e;default:Ni(s)||(a=!0)}}a&&(!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,r){var n;const{prefix:a,local:s}=this.qname(e),o={name:e,prefix:a,local:s,value:r};if(this.attribList.push(o),(n=this.attributeHandler)===null||n===void 0||n.call(this,o),a==="xmlns"){const u=r.trim();this.currentXMLVersion==="1.0"&&u===""&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[s]=u,JE(this,s,u)}else if(e==="xmlns"){const u=r.trim();this.topNS[""]=u,JE(this,"",u)}}pushAttribPlain(e,r){var n;const a={name:e,value:r};this.attribList.push(a),(n=this.attributeHandler)===null||n===void 0||n.call(this,a)}end(){var e,r;this.sawRoot||this.fail("document must contain a root element.");const{tags:n}=this;for(;n.length>0;){const s=n.pop();this.fail(`unclosed tag: ${s.name}`)}this.state!==HD&&this.state!==li&&this.fail("unexpected end.");const{text:a}=this;return a.length!==0&&((e=this.textHandler)===null||e===void 0||e.call(this,a),this.text=""),this._closed=!0,(r=this.endHandler)===null||r===void 0||r.call(this),this._init(),this}resolve(e){var r,n;let a=this.topNS[e];if(a!==void 0)return a;const{tags:s}=this;for(let o=s.length-1;o>=0;o--)if(a=s[o].ns[e],a!==void 0)return a;return a=this.ns[e],a!==void 0?a:(n=(r=this.opt).resolvePrefix)===null||n===void 0?void 0:n.call(r,e)}qname(e){const r=e.indexOf(":");if(r===-1)return{prefix:"",local:e};const n=e.slice(r+1),a=e.slice(0,r);return(a===""||n===""||n.includes(":"))&&this.fail(`malformed name: ${e}.`),{prefix:a,local:n}}processAttribsNS(){var e;const{attribList:r}=this,n=this.tag;{const{prefix:o,local:u}=this.qname(n.name);n.prefix=o,n.local=u;const c=n.uri=(e=this.resolve(o))!==null&&e!==void 0?e:"";o!==""&&(o==="xmlns"&&this.fail('tags may not have "xmlns" as prefix.'),c===""&&(this.fail(`unbound namespace prefix: ${JSON.stringify(o)}.`),n.uri=o))}if(r.length===0)return;const{attributes:a}=n,s=new Set;for(const o of r){const{name:u,prefix:c,local:l}=o;let d,f;c===""?(d=u==="xmlns"?fd:"",f=u):(d=this.resolve(c),d===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(c)}.`),d=c),f=`{${d}}${l}`),s.has(f)&&this.fail(`duplicate attribute: ${f}.`),s.add(f),o.uri=d,a[u]=o}this.attribList=[]}processAttribsPlain(){const{attribList:e}=this,r=this.tag.attributes;for(const{name:n,value:a}of e)r[n]!==void 0&&this.fail(`duplicate attribute: ${n}.`),r[n]=a;this.attribList=[]}openTag(){var e;this.processAttribs();const{tags:r}=this,n=this.tag;n.isSelfClosing=!1,(e=this.openTagHandler)===null||e===void 0||e.call(this,n),r.push(n),this.state=li,this.name=""}openSelfClosingTag(){var e,r,n;this.processAttribs();const{tags:a}=this,s=this.tag;s.isSelfClosing=!0,(e=this.openTagHandler)===null||e===void 0||e.call(this,s),(r=this.closeTagHandler)===null||r===void 0||r.call(this,s),(this.tag=(n=a[a.length-1])!==null&&n!==void 0?n:null)===null&&(this.closedRoot=!0),this.state=li,this.name=""}closeTag(){const{tags:e,name:r}=this;if(this.state=li,this.name="",r===""){this.fail("weird empty close tag."),this.text+="";return}const n=this.closeTagHandler;let a=e.length;for(;a-- >0;){const s=this.tag=e.pop();if(this.topNS=s.ns,n==null||n(s),s.name===r)break;this.fail("unexpected close tag.")}a===0?this.closedRoot=!0:a<0&&(this.fail(`unmatched closing tag: ${r}.`),this.text+=``)}parseEntity(e){if(e[0]!=="#"){const n=this.ENTITIES[e];return n!==void 0?n:(this.fail(this.isName(e)?"undefined entity.":"disallowed character in entity name."),`&${e};`)}let r=NaN;return e[1]==="x"&&/^#x[0-9a-f]+$/i.test(e)?r=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(r=parseInt(e.slice(1),10)),this.isChar(r)?String.fromCodePoint(r):(this.fail("malformed character entity."),`&${e};`)}}al.SaxesParser=tie;var Nm={};Object.defineProperty(Nm,"__esModule",{value:!0});Nm.ParseError=void 0;let rie=class extends Error{constructor(e,r){const n=e.saxParser;super(e.trackPosition?`Line ${n.line} column ${n.column+1}: ${r}`:r)}};Nm.ParseError=rie;var nF={},iF={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateIri=t.IriValidationStrategy=void 0;function e(){const u="[!$&'()*+,;=]",c="%[a-fA-F0-9]{2}",l="([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])",d=`${l}\\.${l}\\.${l}\\.${l}`,f="[a-fA-F0-9]{1,4}",h=`(${f}:${f}|${d})`,p=`((${f}:){6}${h}|::(${f}:){5}${h}|(${f})?::(${f}:){4}${h}|((${f}:){0,1}${f})?::(${f}:){3}${h}|((${f}:){0,2}${f})?::(${f}:){2}${h}|((${f}:){0,3}${f})?::${f}:${h}|((${f}:){0,4}${f})?::${h}|((${f}:){0,5}${f})?::${f}|((${f}:){0,6}${f})?::)`,b=`v[a-fA-F0-9]+\\.(${u}|${u}|":)+`,_=`\\[(${p}|${b})\\]`,E="[0-9]*",w="[a-zA-Z][a-zA-Z0-9+\\-.]*",A="[-󰀀-󿿽􀀀-􏿽]",D="[a-zA-Z0-9\\-._~ -퟿豈-﷏ﷰ-￯𐀀-🿽𠀀-𯿽𰀀-𿿽񀀀-񏿽񐀀-񟿽񠀀-񯿽񰀀-񿿽򀀀-򏿽򐀀-򟿽򠀀-򯿽򰀀-򿿽󀀀-󏿽󐀀-󟿽󡀀-󯿽]",U=`(${D}|${c}|${u}|[:@])*`,H=`(${U}|[\\/?])*`,N=`(${U}|${A}|[\\/?])*`,x=`(${U})+`,F=`(${U})*`,X="",ne=`${x}(\\/${F})*`,$=`\\/(${x}(\\/${F})*)?`,j=`(\\/${F})*`,Q=`(${D}|${c}|${u})*`,se=`(${_}|${d}|${Q})`,he=`(\\/\\/${`(${`(${D}|${c}|${u}|:)*`}@)?${se}(:${E})?`}${j}|${$}|${ne}|${X})`,Te=`^${w}:${he}(\\?${N})?(#${H})?$`;return new RegExp(Te,"u")}const r=e(),n=/^[A-Za-z][\d+-.A-Za-z]*:[^\u0000-\u0020"<>\\^`{|}]*$/u;var a;(function(o){o.Strict="strict",o.Pragmatic="pragmatic",o.None="none"})(a=t.IriValidationStrategy||(t.IriValidationStrategy={}));function s(o,u=a.Strict){switch(u){case a.Strict:return r.test(o)?void 0:new Error(`Invalid IRI according to RFC 3987: '${o}'`);case a.Pragmatic:return n.test(o)?void 0:new Error(`Invalid IRI according to RDF Turtle: '${o}'`);case a.None:return;default:return new Error(`Not supported validation strategy "${u}"`)}}t.validateIri=s})(iF);(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(iF,t)})(nF);Object.defineProperty(Jd,"__esModule",{value:!0});Jd.ParseType=Jd.RdfXmlParser=void 0;const rN=Ra,nie=al,nN=kt,iie=Nm,aie=ht,XS=nF;class Jt extends nN.Transform{constructor(e){super({readableObjectMode:!0}),this.activeTagStack=[],this.nodeIds={},e&&(Object.assign(this,e),this.options=e),this.dataFactory||(this.dataFactory=new aie.DataFactory),this.baseIRI||(this.baseIRI=""),this.defaultGraph||(this.defaultGraph=this.dataFactory.defaultGraph()),this.validateUri!==!1&&(this.validateUri=!0),this.iriValidationStrategy||(this.iriValidationStrategy=this.validateUri?XS.IriValidationStrategy.Pragmatic:XS.IriValidationStrategy.None),this.saxParser=new nie.SaxesParser({xmlns:!0,position:this.trackPosition}),this.attachSaxListeners()}import(e){const r=new nN.PassThrough({readableObjectMode:!0});e.on("error",a=>n.emit("error",a)),e.on("data",a=>r.push(a)),e.on("end",()=>r.push(null));const n=r.pipe(new Jt(this.options));return n}_transform(e,r,n){try{this.saxParser.write(e)}catch(a){return n(a)}n()}newParseError(e){return new iie.ParseError(this,e)}valueToUri(e,r){return this.uriToNamedNode((0,rN.resolve)(e,r.baseIRI))}uriToNamedNode(e){const r=(0,XS.validateIri)(e,this.iriValidationStrategy);if(r instanceof Error)throw this.newParseError(r.message);return this.dataFactory.namedNode(e)}validateNcname(e){if(!Jt.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 r=this.activeTagStack.length?this.activeTagStack[this.activeTagStack.length-1]:null;let n=mo.RESOURCE;if(r&&(r.hadChildren=!0,n=r.childrenParseType),r&&r.childrenStringTags){const s=e.name;let o="";for(const d in e.attributes)o+=` ${d}="${e.attributes[d].value}"`;const c=`<${`${s}${o}`}>`;r.childrenStringTags.push(c);const l={childrenStringTags:r.childrenStringTags};l.childrenStringEmitClosingTag=``,this.activeTagStack.push(l);return}const a={};r?(a.language=r.language,a.baseIRI=r.baseIRI):a.baseIRI=this.baseIRI,this.activeTagStack.push(a),n===mo.RESOURCE?this.onTagResource(e,a,r,!r):this.onTagProperty(e,a,r)}onTagResource(e,r,n,a){r.childrenParseType=mo.PROPERTY;let s=!0;if(e.uri===Jt.RDF){if(!a&&Jt.FORBIDDEN_NODE_ELEMENTS.indexOf(e.local)>=0)throw this.newParseError(`Illegal node element name: ${e.local}`);switch(e.local){case"RDF":r.childrenParseType=mo.RESOURCE;case"Description":s=!1}}const o=[],u=[];let c=null,l=!1,d=!1,f=null;for(const h in e.attributes){const p=e.attributes[h];if(n&&p.uri===Jt.RDF)switch(p.local){case"about":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${p.value} and ${c} where found.`);c=p.value;continue;case"ID":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${p.value} and ${c} where found.`);this.validateNcname(p.value),c="#"+p.value,l=!0;continue;case"nodeID":if(c)throw this.newParseError(`Only one of rdf:about, rdf:nodeID and rdf:ID can be present, while ${p.value} and ${c} where found.`);this.validateNcname(p.value),c=p.value,d=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"type":f=p.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(p.uri===Jt.XML){if(p.local==="lang"){r.language=p.value===""?null:p.value.toLowerCase();continue}else if(p.local==="base"){r.baseIRI=(0,rN.resolve)(p.value,r.baseIRI);continue}}p.prefix!=="xml"&&p.uri&&(o.push(this.uriToNamedNode(p.uri+p.local)),u.push(p.value))}if(c!==null&&(r.subject=d?this.dataFactory.blankNode(c):this.valueToUri(c,r),l&&this.claimNodeId(r.subject)),r.subject||(r.subject=this.dataFactory.blankNode()),s){const h=this.uriToNamedNode(e.uri+e.local);this.emitTriple(r.subject,this.dataFactory.namedNode(Jt.RDF+"type"),h,n?n.reifiedStatementId:null)}if(n){if(n.predicate)if(n.childrenCollectionSubject){const h=this.dataFactory.blankNode();this.emitTriple(n.childrenCollectionSubject,n.childrenCollectionPredicate,h,n.reifiedStatementId),this.emitTriple(h,this.dataFactory.namedNode(Jt.RDF+"first"),r.subject,r.reifiedStatementId),n.childrenCollectionSubject=h,n.childrenCollectionPredicate=this.dataFactory.namedNode(Jt.RDF+"rest")}else{this.emitTriple(n.subject,n.predicate,r.subject,n.reifiedStatementId);for(let h=0;h=0)throw this.newParseError(`Illegal property element name: ${e.local}`);r.predicateSubPredicates=[],r.predicateSubObjects=[];let a=!1,s=!1,o=null,u=!0;const c=[],l=[];for(const d in e.attributes){const f=e.attributes[d];if(f.uri===Jt.RDF)switch(f.local){case"resource":if(o)throw this.newParseError(`Found both rdf:resource (${f.value}) and rdf:nodeID (${o}).`);if(a)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:resource (${f.value})`);r.hadChildren=!0,o=f.value,u=!1;continue;case"datatype":if(s)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:datatype (${f.value}).`);if(a)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${f.value})`);r.datatype=this.valueToUri(f.value,r);continue;case"nodeID":if(s)throw this.newParseError(`Found both non-rdf:* property attributes and rdf:nodeID (${f.value}).`);if(r.hadChildren)throw this.newParseError(`Found both rdf:resource and rdf:nodeID (${f.value}).`);if(a)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID (${f.value})`);this.validateNcname(f.value),r.hadChildren=!0,o=f.value,u=!0;continue;case"bagID":throw this.newParseError("rdf:bagID is not supported.");case"parseType":if(s)throw this.newParseError("rdf:parseType is not allowed when non-rdf:* property attributes are present");if(r.datatype)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:datatype (${r.datatype.value})`);if(o)throw this.newParseError(`rdf:parseType is not allowed on property elements with rdf:nodeID or rdf:resource (${o})`);if(f.value==="Resource"){a=!0,r.childrenParseType=mo.PROPERTY;const h=this.dataFactory.blankNode();this.emitTriple(r.subject,r.predicate,h,r.reifiedStatementId),r.subject=h,r.predicate=null}else f.value==="Collection"?(a=!0,r.hadChildren=!0,r.childrenCollectionSubject=r.subject,r.childrenCollectionPredicate=r.predicate,u=!1):f.value==="Literal"&&(a=!0,r.childrenTagsToString=!0,r.childrenStringTags=[]);continue;case"ID":this.validateNcname(f.value),r.reifiedStatementId=this.valueToUri("#"+f.value,r),this.claimNodeId(r.reifiedStatementId);continue}else if(f.uri===Jt.XML&&f.local==="lang"){r.language=f.value===""?null:f.value.toLowerCase();continue}if(f.prefix!=="xml"&&f.prefix!=="xmlns"&&(f.prefix!==""||f.local!=="xmlns")&&f.uri){if(a||r.datatype)throw this.newParseError(`Found illegal rdf:* properties on property element with attribute: ${f.value}`);r.hadChildren=!0,s=!0,c.push(this.uriToNamedNode(f.uri+f.local)),l.push(this.dataFactory.literal(f.value,r.datatype||r.language))}}if(o!==null){const d=r.subject;r.subject=u?this.dataFactory.blankNode(o):this.valueToUri(o,r),this.emitTriple(d,r.predicate,r.subject,r.reifiedStatementId);for(let f=0;f/g,(r,n,a)=>(this.saxParser.ENTITIES[n]=a,""))}}Jd.RdfXmlParser=Jt;Jt.MIME_TYPE="application/rdf+xml";Jt.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#";Jt.XML="http://www.w3.org/XML/1998/namespace";Jt.FORBIDDEN_NODE_ELEMENTS=["RDF","ID","about","bagID","parseType","resource","nodeID","li","aboutEach","aboutEachPrefix"];Jt.FORBIDDEN_PROPERTY_ELEMENTS=["Description","RDF","ID","about","bagID","parseType","resource","nodeID","aboutEach","aboutEachPrefix"];Jt.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;var mo;(function(t){t[t.RESOURCE=0]="RESOURCE",t[t.PROPERTY=1]="PROPERTY"})(mo||(Jd.ParseType=mo={}));(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Jd,t)})(WM);Object.defineProperty(Dm,"__esModule",{value:!0});Dm.ActorRdfParseRdfXml=void 0;const sie=ml,oie=WM;class uie extends sie.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){var s;e.data.on("error",o=>a.emit("error",o));const a=e.data.pipe(new oie.RdfXmlParser({baseIRI:(s=e.metadata)==null?void 0:s.baseIRI}));return{data:a,metadata:{triples:!0}}}}Dm.ActorRdfParseRdfXml=uie;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Dm,t)})(zM);var aF={},Cm={},_R={},sF={};Object.defineProperty(sF,"__esModule",{value:!0});var oF={};Object.defineProperty(oF,"__esModule",{value:!0});var uF={};Object.defineProperty(uF,"__esModule",{value:!0});var jm={},cF={},Tp={},gR={},Ho={},mR={};Object.defineProperty(mR,"__esModule",{value:!0});mR.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(t){return t.charCodeAt(0)}));var vR={};Object.defineProperty(vR,"__esModule",{value:!0});vR.default=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(function(t){return t.charCodeAt(0)}));var YE={};(function(t){var e;Object.defineProperty(t,"__esModule",{value:!0}),t.replaceCodePoint=t.fromCodePoint=void 0;var r=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]]);t.fromCodePoint=(e=String.fromCodePoint)!==null&&e!==void 0?e:function(s){var o="";return s>65535&&(s-=65536,o+=String.fromCharCode(s>>>10&1023|55296),s=56320|s&1023),o+=String.fromCharCode(s),o};function n(s){var o;return s>=55296&&s<=57343||s>1114111?65533:(o=r.get(s))!==null&&o!==void 0?o:s}t.replaceCodePoint=n;function a(s){return(0,t.fromCodePoint)(n(s))}t.default=a})(YE);(function(t){var e=m&&m.__createBinding||(Object.create?function(F,X,ne,$){$===void 0&&($=ne);var j=Object.getOwnPropertyDescriptor(X,ne);(!j||("get"in j?!X.__esModule:j.writable||j.configurable))&&(j={enumerable:!0,get:function(){return X[ne]}}),Object.defineProperty(F,$,j)}:function(F,X,ne,$){$===void 0&&($=ne),F[$]=X[ne]}),r=m&&m.__setModuleDefault||(Object.create?function(F,X){Object.defineProperty(F,"default",{enumerable:!0,value:X})}:function(F,X){F.default=X}),n=m&&m.__importStar||function(F){if(F&&F.__esModule)return F;var X={};if(F!=null)for(var ne in F)ne!=="default"&&Object.prototype.hasOwnProperty.call(F,ne)&&e(X,F,ne);return r(X,F),X},a=m&&m.__importDefault||function(F){return F&&F.__esModule?F:{default:F}};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=a(mR);t.htmlDecodeTree=s.default;var o=a(vR);t.xmlDecodeTree=o.default;var u=n(YE);t.decodeCodePoint=u.default;var c=YE;Object.defineProperty(t,"replaceCodePoint",{enumerable:!0,get:function(){return c.replaceCodePoint}}),Object.defineProperty(t,"fromCodePoint",{enumerable:!0,get:function(){return c.fromCodePoint}});var l;(function(F){F[F.NUM=35]="NUM",F[F.SEMI=59]="SEMI",F[F.EQUALS=61]="EQUALS",F[F.ZERO=48]="ZERO",F[F.NINE=57]="NINE",F[F.LOWER_A=97]="LOWER_A",F[F.LOWER_F=102]="LOWER_F",F[F.LOWER_X=120]="LOWER_X",F[F.LOWER_Z=122]="LOWER_Z",F[F.UPPER_A=65]="UPPER_A",F[F.UPPER_F=70]="UPPER_F",F[F.UPPER_Z=90]="UPPER_Z"})(l||(l={}));var d=32,f;(function(F){F[F.VALUE_LENGTH=49152]="VALUE_LENGTH",F[F.BRANCH_LENGTH=16256]="BRANCH_LENGTH",F[F.JUMP_TABLE=127]="JUMP_TABLE"})(f=t.BinTrieFlags||(t.BinTrieFlags={}));function h(F){return F>=l.ZERO&&F<=l.NINE}function p(F){return F>=l.UPPER_A&&F<=l.UPPER_F||F>=l.LOWER_A&&F<=l.LOWER_F}function b(F){return F>=l.UPPER_A&&F<=l.UPPER_Z||F>=l.LOWER_A&&F<=l.LOWER_Z||h(F)}function _(F){return F===l.EQUALS||b(F)}var E;(function(F){F[F.EntityStart=0]="EntityStart",F[F.NumericStart=1]="NumericStart",F[F.NumericDecimal=2]="NumericDecimal",F[F.NumericHex=3]="NumericHex",F[F.NamedEntity=4]="NamedEntity"})(E||(E={}));var w;(function(F){F[F.Legacy=0]="Legacy",F[F.Strict=1]="Strict",F[F.Attribute=2]="Attribute"})(w=t.DecodingMode||(t.DecodingMode={}));var O=function(){function F(X,ne,$){this.decodeTree=X,this.emitCodePoint=ne,this.errors=$,this.state=E.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=w.Strict}return F.prototype.startEntity=function(X){this.decodeMode=X,this.state=E.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1},F.prototype.write=function(X,ne){switch(this.state){case E.EntityStart:return X.charCodeAt(ne)===l.NUM?(this.state=E.NumericStart,this.consumed+=1,this.stateNumericStart(X,ne+1)):(this.state=E.NamedEntity,this.stateNamedEntity(X,ne));case E.NumericStart:return this.stateNumericStart(X,ne);case E.NumericDecimal:return this.stateNumericDecimal(X,ne);case E.NumericHex:return this.stateNumericHex(X,ne);case E.NamedEntity:return this.stateNamedEntity(X,ne)}},F.prototype.stateNumericStart=function(X,ne){return ne>=X.length?-1:(X.charCodeAt(ne)|d)===l.LOWER_X?(this.state=E.NumericHex,this.consumed+=1,this.stateNumericHex(X,ne+1)):(this.state=E.NumericDecimal,this.stateNumericDecimal(X,ne))},F.prototype.addToNumericResult=function(X,ne,$,j){if(ne!==$){var Q=$-ne;this.result=this.result*Math.pow(j,Q)+parseInt(X.substr(ne,Q),j),this.consumed+=Q}},F.prototype.stateNumericHex=function(X,ne){for(var $=ne;ne>14;ne>14,Q!==0){if(se===l.SEMI)return this.emitNamedEntityData(this.treeIndex,Q,this.consumed+this.excess);this.decodeMode!==w.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1},F.prototype.emitNotTerminatedNamedEntity=function(){var X,ne=this,$=ne.result,j=ne.decodeTree,Q=(j[$]&f.VALUE_LENGTH)>>14;return this.emitNamedEntityData($,Q,this.consumed),(X=this.errors)===null||X===void 0||X.missingSemicolonAfterCharacterReference(),this.consumed},F.prototype.emitNamedEntityData=function(X,ne,$){var j=this.decodeTree;return this.emitCodePoint(ne===1?j[X]&~f.VALUE_LENGTH:j[X+1],$),ne===3&&this.emitCodePoint(j[X+2],$),$},F.prototype.end=function(){var X;switch(this.state){case E.NamedEntity:return this.result!==0&&(this.decodeMode!==w.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case E.NumericDecimal:return this.emitNumericEntity(0,2);case E.NumericHex:return this.emitNumericEntity(0,3);case E.NumericStart:return(X=this.errors)===null||X===void 0||X.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case E.EntityStart:return 0}},F}();t.EntityDecoder=O;function A(F){var X="",ne=new O(F,function($){return X+=(0,u.fromCodePoint)($)});return function(j,Q){for(var se=0,ie=0;(ie=j.indexOf("&",ie))>=0;){X+=j.slice(se,ie),ne.startEntity(Q);var be=ne.write(j,ie+1);if(be<0){se=ie+ne.end();break}se=ie+be,ie=be===0?se+1:se}var he=X+j.slice(se);return X="",he}}function T(F,X,ne,$){var j=(X&f.BRANCH_LENGTH)>>7,Q=X&f.JUMP_TABLE;if(j===0)return Q!==0&&$===Q?ne:-1;if(Q){var se=$-Q;return se<0||se>=j?-1:F[ne+se]-1}for(var ie=ne,be=ie+j-1;ie<=be;){var he=ie+be>>>1,Te=F[he];if(Te<$)ie=he+1;else if(Te>$)be=he-1;else return F[he+j]}return-1}t.determineBranch=T;var I=A(s.default),D=A(o.default);function U(F,X){return X===void 0&&(X=w.Legacy),I(F,X)}t.decodeHTML=U;function H(F){return I(F,w.Attribute)}t.decodeHTMLAttribute=H;function N(F){return I(F,w.Strict)}t.decodeHTMLStrict=N;function x(F){return D(F,w.Strict)}t.decodeXML=x})(Ho);(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var e=Ho,r;(function(h){h[h.Tab=9]="Tab",h[h.NewLine=10]="NewLine",h[h.FormFeed=12]="FormFeed",h[h.CarriageReturn=13]="CarriageReturn",h[h.Space=32]="Space",h[h.ExclamationMark=33]="ExclamationMark",h[h.Number=35]="Number",h[h.Amp=38]="Amp",h[h.SingleQuote=39]="SingleQuote",h[h.DoubleQuote=34]="DoubleQuote",h[h.Dash=45]="Dash",h[h.Slash=47]="Slash",h[h.Zero=48]="Zero",h[h.Nine=57]="Nine",h[h.Semi=59]="Semi",h[h.Lt=60]="Lt",h[h.Eq=61]="Eq",h[h.Gt=62]="Gt",h[h.Questionmark=63]="Questionmark",h[h.UpperA=65]="UpperA",h[h.LowerA=97]="LowerA",h[h.UpperF=70]="UpperF",h[h.LowerF=102]="LowerF",h[h.UpperZ=90]="UpperZ",h[h.LowerZ=122]="LowerZ",h[h.LowerX=120]="LowerX",h[h.OpeningSquareBracket=91]="OpeningSquareBracket"})(r||(r={}));var n;(function(h){h[h.Text=1]="Text",h[h.BeforeTagName=2]="BeforeTagName",h[h.InTagName=3]="InTagName",h[h.InSelfClosingTag=4]="InSelfClosingTag",h[h.BeforeClosingTagName=5]="BeforeClosingTagName",h[h.InClosingTagName=6]="InClosingTagName",h[h.AfterClosingTagName=7]="AfterClosingTagName",h[h.BeforeAttributeName=8]="BeforeAttributeName",h[h.InAttributeName=9]="InAttributeName",h[h.AfterAttributeName=10]="AfterAttributeName",h[h.BeforeAttributeValue=11]="BeforeAttributeValue",h[h.InAttributeValueDq=12]="InAttributeValueDq",h[h.InAttributeValueSq=13]="InAttributeValueSq",h[h.InAttributeValueNq=14]="InAttributeValueNq",h[h.BeforeDeclaration=15]="BeforeDeclaration",h[h.InDeclaration=16]="InDeclaration",h[h.InProcessingInstruction=17]="InProcessingInstruction",h[h.BeforeComment=18]="BeforeComment",h[h.CDATASequence=19]="CDATASequence",h[h.InSpecialComment=20]="InSpecialComment",h[h.InCommentLike=21]="InCommentLike",h[h.BeforeSpecialS=22]="BeforeSpecialS",h[h.SpecialStartSequence=23]="SpecialStartSequence",h[h.InSpecialTag=24]="InSpecialTag",h[h.BeforeEntity=25]="BeforeEntity",h[h.BeforeNumericEntity=26]="BeforeNumericEntity",h[h.InNamedEntity=27]="InNamedEntity",h[h.InNumericEntity=28]="InNumericEntity",h[h.InHexEntity=29]="InHexEntity"})(n||(n={}));function a(h){return h===r.Space||h===r.NewLine||h===r.Tab||h===r.FormFeed||h===r.CarriageReturn}function s(h){return h===r.Slash||h===r.Gt||a(h)}function o(h){return h>=r.Zero&&h<=r.Nine}function u(h){return h>=r.LowerA&&h<=r.LowerZ||h>=r.UpperA&&h<=r.UpperZ}function c(h){return h>=r.UpperA&&h<=r.UpperF||h>=r.LowerA&&h<=r.LowerF}var l;(function(h){h[h.NoValue=0]="NoValue",h[h.Unquoted=1]="Unquoted",h[h.Single=2]="Single",h[h.Double=3]="Double"})(l=t.QuoteType||(t.QuoteType={}));var d={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])},f=function(){function h(p,b){var _=p.xmlMode,E=_===void 0?!1:_,w=p.decodeEntities,O=w===void 0?!0:w;this.cbs=b,this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.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=E,this.decodeEntities=O,this.entityTrie=E?e.xmlDecodeTree:e.htmlDecodeTree}return h.prototype.reset=function(){this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},h.prototype.write=function(p){this.offset+=this.buffer.length,this.buffer=p,this.parse()},h.prototype.end=function(){this.running&&this.finish()},h.prototype.pause=function(){this.running=!1},h.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=n.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&p===r.Amp&&(this.state=n.BeforeEntity)},h.prototype.stateSpecialStartSequence=function(p){var b=this.sequenceIndex===this.currentSequence.length,_=b?s(p):(p|32)===this.currentSequence[this.sequenceIndex];if(!_)this.isSpecial=!1;else if(!b){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=n.InTagName,this.stateInTagName(p)},h.prototype.stateInSpecialTag=function(p){if(this.sequenceIndex===this.currentSequence.length){if(p===r.Gt||a(p)){var b=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&p!==r.Semi)this.trieIndex+=_;else{var E=this.index-this.entityExcess+1;E>this.sectionStart&&this.emitPartial(this.sectionStart,E),this.entityResult=this.trieIndex,this.trieIndex+=_,this.entityExcess=0,this.sectionStart=this.index+1,_===0&&this.emitNamedEntity()}}},h.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var p=(this.entityTrie[this.entityResult]&e.BinTrieFlags.VALUE_LENGTH)>>14;switch(p){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~e.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])}}},h.prototype.stateBeforeNumericEntity=function(p){(p|32)===r.LowerX?(this.entityExcess++,this.state=n.InHexEntity):(this.state=n.InNumericEntity,this.stateInNumericEntity(p))},h.prototype.emitNumericEntity=function(p){var b=this.index-this.entityExcess-1,_=b+2+ +(this.state===n.InHexEntity);_!==this.index&&(b>this.sectionStart&&this.emitPartial(this.sectionStart,b),this.sectionStart=this.index+Number(p),this.emitCodePoint((0,e.replaceCodePoint)(this.entityResult))),this.state=this.baseState},h.prototype.stateInNumericEntity=function(p){p===r.Semi?this.emitNumericEntity(!0):o(p)?(this.entityResult=this.entityResult*10+(p-r.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},h.prototype.stateInHexEntity=function(p){p===r.Semi?this.emitNumericEntity(!0):o(p)?(this.entityResult=this.entityResult*16+(p-r.Zero),this.entityExcess++):c(p)?(this.entityResult=this.entityResult*16+((p|32)-r.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},h.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===n.Text||this.baseState===n.InSpecialTag)},h.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===n.Text||this.state===n.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===n.InAttributeValueDq||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},h.prototype.shouldContinue=function(){return this.index0&&o.has(this.stack[this.stack.length-1]);){var u=this.stack.pop();(n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,u,!0)}this.isVoidElement(e)||(this.stack.push(e),uN.has(e)?this.foreignContext.push(!0):cN.has(e)&&this.foreignContext.push(!1)),(s=(a=this.cbs).onopentagname)===null||s===void 0||s.call(a,e),this.cbs.onopentag&&(this.attribs={})},t.prototype.endOpenTag=function(e){var r,n;this.startIndex=this.openTagStart,this.attribs&&((n=(r=this.cbs).onopentag)===null||n===void 0||n.call(r,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},t.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},t.prototype.onclosetag=function(e,r){var n,a,s,o,u,c;this.endIndex=r;var l=this.getSlice(e,r);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(uN.has(l)||cN.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))!this.options.xmlMode&&l==="br"&&((a=(n=this.cbs).onopentagname)===null||a===void 0||a.call(n,"br"),(o=(s=this.cbs).onopentag)===null||o===void 0||o.call(s,"br",{},!0),(c=(u=this.cbs).onclosetag)===null||c===void 0||c.call(u,"br",!1));else{var d=this.stack.lastIndexOf(l);if(d!==-1)if(this.cbs.onclosetag)for(var f=this.stack.length-d;f--;)this.cbs.onclosetag(this.stack.pop(),f!==0);else this.stack.length=d;else!this.options.xmlMode&&l==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1},t.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)},t.prototype.closeCurrentTag=function(e){var r,n,a=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===a&&((n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,a,!e),this.stack.pop())},t.prototype.onattribname=function(e,r){this.startIndex=e;var n=this.getSlice(e,r);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n},t.prototype.onattribdata=function(e,r){this.attribvalue+=this.getSlice(e,r)},t.prototype.onattribentity=function(e){this.attribvalue+=(0,iN.fromCodePoint)(e)},t.prototype.onattribend=function(e,r){var n,a;this.endIndex=r,(a=(n=this.cbs).onattribute)===null||a===void 0||a.call(n,this.attribname,this.attribvalue,e===e1.QuoteType.Double?'"':e===e1.QuoteType.Single?"'":e===e1.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},t.prototype.getInstructionName=function(e){var r=e.search(pie),n=r<0?e:e.substr(0,r);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},t.prototype.ondeclaration=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("!".concat(a),"!".concat(n))}this.startIndex=r+1},t.prototype.onprocessinginstruction=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("?".concat(a),"?".concat(n))}this.startIndex=r+1},t.prototype.oncomment=function(e,r,n){var a,s,o,u;this.endIndex=r,(s=(a=this.cbs).oncomment)===null||s===void 0||s.call(a,this.getSlice(e,r-n)),(u=(o=this.cbs).oncommentend)===null||u===void 0||u.call(o),this.startIndex=r+1},t.prototype.oncdata=function(e,r,n){var a,s,o,u,c,l,d,f,h,p;this.endIndex=r;var b=this.getSlice(e,r-n);this.options.xmlMode||this.options.recognizeCDATA?((s=(a=this.cbs).oncdatastart)===null||s===void 0||s.call(a),(u=(o=this.cbs).ontext)===null||u===void 0||u.call(o,b),(l=(c=this.cbs).oncdataend)===null||l===void 0||l.call(c)):((f=(d=this.cbs).oncomment)===null||f===void 0||f.call(d,"[CDATA[".concat(b,"]]")),(p=(h=this.cbs).oncommentend)===null||p===void 0||p.call(h)),this.startIndex=r+1},t.prototype.onend=function(){var e,r;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n],!0));}(r=(e=this.cbs).onend)===null||r===void 0||r.call(e)},t.prototype.reset=function(){var e,r,n,a;(r=(e=this.cbs).onreset)===null||r===void 0||r.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(a=(n=this.cbs).onparserinit)===null||a===void 0||a.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},t.prototype.parseComplete=function(e){this.reset(),this.end(e)},t.prototype.getSlice=function(e,r){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var n=this.buffers[0].slice(e-this.bufferOffset,r-this.bufferOffset);r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,r-this.bufferOffset);return n},t.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},t.prototype.write=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".write() after done!"));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)},t.prototype.end=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".end() after done!"));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()},t.prototype.pause=function(){this.tokenizer.pause()},t.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),e}(wR);Ct.NodeWithChildren=Fm;var hF=function(t){ic(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=$i.ElementType.CDATA,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),e}(Fm);Ct.CDATA=hF;var pF=function(t){ic(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.type=$i.ElementType.Root,r}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),e}(Fm);Ct.Document=pF;var yF=function(t){ic(e,t);function e(r,n,a,s){a===void 0&&(a=[]),s===void 0&&(s=r==="script"?$i.ElementType.Script:r==="style"?$i.ElementType.Style:$i.ElementType.Tag);var o=t.call(this,a)||this;return o.name=r,o.attribs=n,o.type=s,o}return Object.defineProperty(e.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(n){var a,s;return{name:n,value:r.attribs[n],namespace:(a=r["x-attribsNamespace"])===null||a===void 0?void 0:a[n],prefix:(s=r["x-attribsPrefix"])===null||s===void 0?void 0:s[n]}})},enumerable:!1,configurable:!0}),e}(Fm);Ct.Element=yF;function bF(t){return(0,$i.isTag)(t)}Ct.isTag=bF;function _F(t){return t.type===$i.ElementType.CDATA}Ct.isCDATA=_F;function gF(t){return t.type===$i.ElementType.Text}Ct.isText=gF;function mF(t){return t.type===$i.ElementType.Comment}Ct.isComment=mF;function vF(t){return t.type===$i.ElementType.Directive}Ct.isDirective=vF;function wF(t){return t.type===$i.ElementType.Root}Ct.isDocument=wF;function bie(t){return Object.prototype.hasOwnProperty.call(t,"children")}Ct.hasChildren=bie;function SR(t,e){e===void 0&&(e=!1);var r;if(gF(t))r=new lF(t.data);else if(mF(t))r=new dF(t.data);else if(bF(t)){var n=e?KS(t.children):[],a=new yF(t.name,ep({},t.attribs),n);n.forEach(function(c){return c.parent=a}),t.namespace!=null&&(a.namespace=t.namespace),t["x-attribsNamespace"]&&(a["x-attribsNamespace"]=ep({},t["x-attribsNamespace"])),t["x-attribsPrefix"]&&(a["x-attribsPrefix"]=ep({},t["x-attribsPrefix"])),r=a}else if(_F(t)){var n=e?KS(t.children):[],s=new hF(n);n.forEach(function(l){return l.parent=s}),r=s}else if(wF(t)){var n=e?KS(t.children):[],o=new pF(n);n.forEach(function(l){return l.parent=o}),t["x-mode"]&&(o["x-mode"]=t["x-mode"]),r=o}else if(vF(t)){var u=new fF(t.name,t.data);t["x-name"]!=null&&(u["x-name"]=t["x-name"],u["x-publicId"]=t["x-publicId"],u["x-systemId"]=t["x-systemId"]),r=u}else throw new Error("Not implemented yet: ".concat(t.type));return r.startIndex=t.startIndex,r.endIndex=t.endIndex,t.sourceCodeLocation!=null&&(r.sourceCodeLocation=t.sourceCodeLocation),r}Ct.cloneNode=SR;function KS(t){for(var e=t.map(function(n){return SR(n,!0)}),r=1;r$\x80-\uFFFF]/g;var e=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);t.getCodePoint=String.prototype.codePointAt!=null?function(a,s){return a.codePointAt(s)}:function(a,s){return(a.charCodeAt(s)&64512)===55296?(a.charCodeAt(s)-55296)*1024+a.charCodeAt(s+1)-56320+65536:a.charCodeAt(s)};function r(a){for(var s="",o=0,u;(u=t.xmlReplacer.exec(a))!==null;){var c=u.index,l=a.charCodeAt(c),d=e.get(l);d!==void 0?(s+=a.substring(o,c)+d,o=c+1):(s+="".concat(a.substring(o,c),"&#x").concat((0,t.getCodePoint)(a,c).toString(16),";"),o=t.xmlReplacer.lastIndex+=+((l&64512)===55296))}return s+a.substr(o)}t.encodeXML=r,t.escape=r;function n(a,s){return function(u){for(var c,l=0,d="";c=a.exec(u);)l!==c.index&&(d+=u.substring(l,c.index)),d+=s.get(c[0].charCodeAt(0)),l=c.index+1;return d+u.substring(l)}}t.escapeUTF8=n(/[&<>'"]/g,e),t.escapeAttribute=n(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),t.escapeText=n(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))})(Db);var _ie=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(sl,"__esModule",{value:!0});sl.encodeNonAsciiHTML=sl.encodeHTML=void 0;var gie=_ie(TR),TF=Db,mie=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function vie(t){return EF(mie,t)}sl.encodeHTML=vie;function wie(t){return EF(TF.xmlReplacer,t)}sl.encodeNonAsciiHTML=wie;function EF(t,e){for(var r="",n=0,a;(a=t.exec(e))!==null;){var s=a.index;r+=e.substring(n,s);var o=e.charCodeAt(s),u=gie.default.get(o);if(typeof u=="object"){if(s+10&&(n+=Lm(t.children,e)),(e.xmlMode||!lN.has(t.name))&&(n+=""))),n}function Nie(t){return"<".concat(t.data,">")}function Cie(t,e){var r,n=t.data||"";return((r=e.encodeEntities)!==null&&r!==void 0?r:e.decodeEntities)!==!1&&!(!e.xmlMode&&t.parent&&Oie.has(t.parent.name))&&(n=e.xmlMode||e.encodeEntities!=="utf8"?(0,Nb.encodeXML)(n):(0,Nb.escapeText)(n)),n}function jie(t){return"")}function Mie(t){return"")}var Fie=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Zi,"__esModule",{value:!0});Zi.innerText=Zi.textContent=Zi.getText=Zi.getInnerHTML=Zi.getOuterHTML=void 0;var Us=ia,Lie=Fie(v0),Bie=nc;function AF(t,e){return(0,Lie.default)(t,e)}Zi.getOuterHTML=AF;function $ie(t,e){return(0,Us.hasChildren)(t)?t.children.map(function(r){return AF(r,e)}).join(""):""}Zi.getInnerHTML=$ie;function Y1(t){return Array.isArray(t)?t.map(Y1).join(""):(0,Us.isTag)(t)?t.name==="br"?` +`:Y1(t.children):(0,Us.isCDATA)(t)?Y1(t.children):(0,Us.isText)(t)?t.data:""}Zi.getText=Y1;function ZE(t){return Array.isArray(t)?t.map(ZE).join(""):(0,Us.hasChildren)(t)&&!(0,Us.isComment)(t)?ZE(t.children):(0,Us.isText)(t)?t.data:""}Zi.textContent=ZE;function eO(t){return Array.isArray(t)?t.map(eO).join(""):(0,Us.hasChildren)(t)&&(t.type===Bie.ElementType.Tag||(0,Us.isCDATA)(t))?eO(t.children):(0,Us.isText)(t)?t.data:""}Zi.innerText=eO;var Sn={};Object.defineProperty(Sn,"__esModule",{value:!0});Sn.prevElementSibling=Sn.nextElementSibling=Sn.getName=Sn.hasAttrib=Sn.getAttributeValue=Sn.getSiblings=Sn.getParent=Sn.getChildren=void 0;var ER=ia;function RF(t){return(0,ER.hasChildren)(t)?t.children:[]}Sn.getChildren=RF;function xF(t){return t.parent||null}Sn.getParent=xF;function Uie(t){var e,r,n=xF(t);if(n!=null)return RF(n);for(var a=[t],s=t.prev,o=t.next;s!=null;)a.unshift(s),e=s,s=e.prev;for(;o!=null;)a.push(o),r=o,o=r.next;return a}Sn.getSiblings=Uie;function qie(t,e){var r;return(r=t.attribs)===null||r===void 0?void 0:r[e]}Sn.getAttributeValue=qie;function Vie(t,e){return t.attribs!=null&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&t.attribs[e]!=null}Sn.hasAttrib=Vie;function Hie(t){return t.name}Sn.getName=Hie;function kie(t){for(var e,r=t.next;r!==null&&!(0,ER.isTag)(r);)e=r,r=e.next;return r}Sn.nextElementSibling=kie;function Qie(t){for(var e,r=t.prev;r!==null&&!(0,ER.isTag)(r);)e=r,r=e.prev;return r}Sn.prevElementSibling=Qie;var Li={};Object.defineProperty(Li,"__esModule",{value:!0});Li.prepend=Li.prependChild=Li.append=Li.appendChild=Li.replaceElement=Li.removeElement=void 0;function w0(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children,r=e.lastIndexOf(t);r>=0&&e.splice(r,1)}t.next=null,t.prev=null,t.parent=null}Li.removeElement=w0;function Gie(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var a=e.parent=t.parent;if(a){var s=a.children;s[s.lastIndexOf(t)]=e,t.parent=null}}Li.replaceElement=Gie;function zie(t,e){if(w0(e),e.next=null,e.parent=t,t.children.push(e)>1){var r=t.children[t.children.length-2];r.next=e,e.prev=r}else e.prev=null}Li.appendChild=zie;function Wie(t,e){w0(e);var r=t.parent,n=t.next;if(e.next=n,e.prev=t,t.next=e,e.parent=r,n){if(n.prev=e,r){var a=r.children;a.splice(a.lastIndexOf(n),0,e)}}else r&&r.children.push(e)}Li.append=Wie;function Xie(t,e){if(w0(e),e.parent=t,e.prev=null,t.children.unshift(e)!==1){var r=t.children[1];r.prev=e,e.next=r}else e.next=null}Li.prependChild=Xie;function Kie(t,e){w0(e);var r=t.parent;if(r){var n=r.children;n.splice(n.indexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}Li.prepend=Kie;var mi={};Object.defineProperty(mi,"__esModule",{value:!0});mi.findAll=mi.existsOne=mi.findOne=mi.findOneChild=mi.find=mi.filter=void 0;var Bm=ia;function Jie(t,e,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),IF(t,Array.isArray(e)?e:[e],r,n)}mi.filter=Jie;function IF(t,e,r,n){for(var a=[],s=[e],o=[0];;){if(o[0]>=s[0].length){if(o.length===1)return a;s.shift(),o.shift();continue}var u=s[0][o[0]++];if(t(u)&&(a.push(u),--n<=0))return a;r&&(0,Bm.hasChildren)(u)&&u.children.length>0&&(o.unshift(0),s.unshift(u.children))}}mi.find=IF;function Yie(t,e){return e.find(t)}mi.findOneChild=Yie;function PF(t,e,r){r===void 0&&(r=!0);for(var n=null,a=0;a0&&(n=PF(t,s.children,!0));else continue}return n}mi.findOne=PF;function DF(t,e){return e.some(function(r){return(0,Bm.isTag)(r)&&(t(r)||DF(t,r.children))})}mi.existsOne=DF;function Zie(t,e){for(var r=[],n=[e],a=[0];;){if(a[0]>=n[0].length){if(n.length===1)return r;n.shift(),a.shift();continue}var s=n[0][a[0]++];(0,Bm.isTag)(s)&&(t(s)&&r.push(s),s.children.length>0&&(a.unshift(0),n.unshift(s.children)))}}mi.findAll=Zie;var ea={};Object.defineProperty(ea,"__esModule",{value:!0});ea.getElementsByTagType=ea.getElementsByTagName=ea.getElementById=ea.getElements=ea.testElement=void 0;var Uc=ia,$m=mi,Cb={tag_name:function(t){return typeof t=="function"?function(e){return(0,Uc.isTag)(e)&&t(e.name)}:t==="*"?Uc.isTag:function(e){return(0,Uc.isTag)(e)&&e.name===t}},tag_type:function(t){return typeof t=="function"?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return typeof t=="function"?function(e){return(0,Uc.isText)(e)&&t(e.data)}:function(e){return(0,Uc.isText)(e)&&e.data===t}}};function NF(t,e){return typeof e=="function"?function(r){return(0,Uc.isTag)(r)&&e(r.attribs[t])}:function(r){return(0,Uc.isTag)(r)&&r.attribs[t]===e}}function eae(t,e){return function(r){return t(r)||e(r)}}function CF(t){var e=Object.keys(t).map(function(r){var n=t[r];return Object.prototype.hasOwnProperty.call(Cb,r)?Cb[r](n):NF(r,n)});return e.length===0?null:e.reduce(eae)}function tae(t,e){var r=CF(t);return r?r(e):!0}ea.testElement=tae;function rae(t,e,r,n){n===void 0&&(n=1/0);var a=CF(t);return a?(0,$m.filter)(a,e,r,n):[]}ea.getElements=rae;function nae(t,e,r){return r===void 0&&(r=!0),Array.isArray(e)||(e=[e]),(0,$m.findOne)(NF("id",t),e,r)}ea.getElementById=nae;function iae(t,e,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),(0,$m.filter)(Cb.tag_name(t),e,r,n)}ea.getElementsByTagName=iae;function aae(t,e,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),(0,$m.filter)(Cb.tag_type(t),e,r,n)}ea.getElementsByTagType=aae;var jF={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.uniqueSort=t.compareDocumentPosition=t.DocumentPosition=t.removeSubsets=void 0;var e=ia;function r(o){for(var u=o.length;--u>=0;){var c=o[u];if(u>0&&o.lastIndexOf(c,u-1)>=0){o.splice(u,1);continue}for(var l=c.parent;l;l=l.parent)if(o.includes(l)){o.splice(u,1);break}}return o}t.removeSubsets=r;var n;(function(o){o[o.DISCONNECTED=1]="DISCONNECTED",o[o.PRECEDING=2]="PRECEDING",o[o.FOLLOWING=4]="FOLLOWING",o[o.CONTAINS=8]="CONTAINS",o[o.CONTAINED_BY=16]="CONTAINED_BY"})(n=t.DocumentPosition||(t.DocumentPosition={}));function a(o,u){var c=[],l=[];if(o===u)return 0;for(var d=(0,e.hasChildren)(o)?o:o.parent;d;)c.unshift(d),d=d.parent;for(d=(0,e.hasChildren)(u)?u:u.parent;d;)l.unshift(d),d=d.parent;for(var f=Math.min(c.length,l.length),h=0;hb.indexOf(E)?p===u?n.FOLLOWING|n.CONTAINED_BY:n.FOLLOWING:p===o?n.PRECEDING|n.CONTAINS:n.PRECEDING}t.compareDocumentPosition=a;function s(o){return o=o.filter(function(u,c,l){return!l.includes(u,c+1)}),o.sort(function(u,c){var l=a(u,c);return l&n.PRECEDING?-1:l&n.FOLLOWING?1:0}),o}t.uniqueSort=s})(jF);var Um={};Object.defineProperty(Um,"__esModule",{value:!0});Um.getFeed=void 0;var sae=Zi,S0=ea;function oae(t){var e=jb(fae,t);return e?e.name==="feed"?uae(e):cae(e):null}Um.getFeed=oae;function uae(t){var e,r=t.children,n={type:"atom",items:(0,S0.getElementsByTagName)("entry",r).map(function(o){var u,c=o.children,l={media:MF(c)};Mi(l,"id","id",c),Mi(l,"title","title",c);var d=(u=jb("link",c))===null||u===void 0?void 0:u.attribs.href;d&&(l.link=d);var f=Du("summary",c)||Du("content",c);f&&(l.description=f);var h=Du("updated",c);return h&&(l.pubDate=new Date(h)),l})};Mi(n,"id","id",r),Mi(n,"title","title",r);var a=(e=jb("link",r))===null||e===void 0?void 0:e.attribs.href;a&&(n.link=a),Mi(n,"description","subtitle",r);var s=Du("updated",r);return s&&(n.updated=new Date(s)),Mi(n,"author","email",r,!0),n}function cae(t){var e,r,n=(r=(e=jb("channel",t.children))===null||e===void 0?void 0:e.children)!==null&&r!==void 0?r:[],a={type:t.name.substr(0,3),id:"",items:(0,S0.getElementsByTagName)("item",t.children).map(function(o){var u=o.children,c={media:MF(u)};Mi(c,"id","guid",u),Mi(c,"title","title",u),Mi(c,"link","link",u),Mi(c,"description","description",u);var l=Du("pubDate",u)||Du("dc:date",u);return l&&(c.pubDate=new Date(l)),c})};Mi(a,"title","title",n),Mi(a,"link","link",n),Mi(a,"description","description",n);var s=Du("lastBuildDate",n);return s&&(a.updated=new Date(s)),Mi(a,"author","managingEditor",n,!0),a}var lae=["url","type","lang"],dae=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function MF(t){return(0,S0.getElementsByTagName)("media:content",t).map(function(e){for(var r=e.attribs,n={medium:r.medium,isDefault:!!r.isDefault},a=0,s=lae;a0){const s=Object.assign(Object.assign({},r),a);if(e.prefix){let o;for(;o=fu.PREFIX_REGEX.exec(e.prefix);)s[o[1]]=o[2]}return s}else return r}static expandPrefixedTerm(e,r){const n=e.indexOf(":");let a,s;if(n>=0&&(a=e.substr(0,n),s=e.substr(n+1)),a==="")return"http://www.w3.org/1999/xhtml/vocab#"+s;if(a){const o=r.prefixesAll[a];if(o)return o+s}if(e){const o=r.prefixesAll[e.toLocaleLowerCase()];if(o)return o}return e}static isValidIri(e){return fu.IRI_REGEX.test(e)}static contentTypeToProfile(e){return yae.RDFA_CONTENTTYPES[e]||""}getBaseIRI(e){let r=e;const n=r.indexOf("#");return n>=0&&(r=r.substr(0,n)),this.dataFactory.namedNode((0,r1.resolve)(r,this.baseIRI.value))}getResourceOrBaseIri(e,r){return e===!0?this.getBaseIriTerm(r):e}getBaseIriTerm(e){return e.localBaseIRI||this.baseIRI}createVocabIris(e,r,n,a){return e.split(/\s+/).filter(s=>s&&(n||s.indexOf(":")>=0)).map(s=>this.createIri(s,r,!0,!0,a)).filter(s=>s!=null)}createLiteral(e,r){if(r.interpretObjectAsTime&&!r.datatype){for(const n of fu.TIME_REGEXES)if(e.match(n.regex)){r.datatype=this.dataFactory.namedNode(fu.XSD+n.type);break}}return this.dataFactory.literal(e,r.datatype||r.language)}createBlankNode(){return this.blankNodeFactory?this.blankNodeFactory():this.dataFactory.blankNode()}createIri(e,r,n,a,s){if(e=e||"",!a)return n||(e=(0,r1.resolve)(e,this.getBaseIriTerm(r).value)),fu.isValidIri(e)?this.dataFactory.namedNode(e):null;if(e.length>0&&e[0]==="["&&e[e.length-1]==="]"&&(e=e.substr(1,e.length-2),e.indexOf(":")<0))return null;if(e.startsWith("_:"))return s?this.dataFactory.blankNode(e.substr(2)||"b_identity"):null;if(n&&r.vocab&&e.indexOf(":")<0)return this.dataFactory.namedNode(r.vocab+e);let o=fu.expandPrefixedTerm(e,r);return n?e!==o&&(o=(0,r1.resolve)(o,this.baseIRIDocument.value)):o=(0,r1.resolve)(o,this.getBaseIriTerm(r).value),fu.isValidIri(o)?this.dataFactory.namedNode(o):null}};T0.Util=vl;vl.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#";vl.XSD="http://www.w3.org/2001/XMLSchema#";vl.RDFA="http://www.w3.org/ns/rdfa#";vl.PREFIX_REGEX=/\s*([^:\s]*)*:\s*([^\s]*)*\s*/g;vl.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"}];vl.IRI_REGEX=/^([A-Za-z][A-Za-z0-9+-.]*|_):[^ "<>{}|\\\[\]`]*$/;Object.defineProperty(jm,"__esModule",{value:!0});jm.RdfaParser=void 0;const _ae=cF,dN=kt,gae=hae,mae=pae,vae=Gu,Ci=T0;class OR extends dN.Transform{constructor(e){super({readableObjectMode:!0}),this.activeTagStack=[],e=e||{},this.options=e,this.util=new Ci.Util(e.dataFactory,e.baseIRI),this.defaultGraph=e.defaultGraph||this.util.dataFactory.defaultGraph();const r=e.contentType?Ci.Util.contentTypeToProfile(e.contentType):e.profile||"";this.features=e.features||vae.RDFA_FEATURES[r],this.htmlParseListener=e.htmlParseListener,this.rdfaPatterns=this.features.copyRdfaPatterns?{}:null,this.pendingRdfaPatternCopies=this.features.copyRdfaPatterns?{}:null,this.parser=this.initializeParser(r==="xml"),this.activeTagStack.push({incompleteTriples:[],inlist:!1,language:e.language,listMapping:{},listMappingLocal:{},name:"",prefixesAll:Object.assign(Object.assign({},mae["@context"]),this.features.xhtmlInitialContext?gae["@context"]:{}),prefixesCustom:{},skipElement:!1,vocab:e.vocab})}import(e){const r=new dN.PassThrough({readableObjectMode:!0});e.on("error",a=>n.emit("error",a)),e.on("data",a=>r.push(a)),e.on("end",()=>r.push(null));const n=r.pipe(new OR(this.options));return n}_transform(e,r,n){this.parser.write(e.toString()),n()}_flush(e){this.parser.end(),e()}onTagOpen(e,r){let n=this.activeTagStack.length-1;for(;n>0&&this.activeTagStack[n].skipElement;)n--;let a=this.activeTagStack[n];n!==this.activeTagStack.length-1&&(a=Object.assign(Object.assign({},a),{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 s={collectChildTags:a.collectChildTags,incompleteTriples:[],inlist:"inlist"in r,listMapping:[],listMappingLocal:a.listMapping,localBaseIRI:a.localBaseIRI,name:e,prefixesAll:null,prefixesCustom:null,skipElement:!1};if(this.activeTagStack.push(s),s.collectChildTags){for(const b of Object.keys(a.prefixesCustom).sort()){const _=a.prefixesCustom[b],E=b===""?"xmlns":"xmlns:"+b;E in r||(r[E]=_)}const p=Object.keys(r).map(b=>`${b}="${r[b]}"`).join(" ");if(s.text=[`<${e}${p?" "+p:""}>`],this.features.skipHandlingXmlLiteralChildren)return}let o=!0,u=!0;if(this.features.onlyAllowUriRelRevIfProperty&&("property"in r&&"rel"in r&&(o=!1,r.rel.indexOf(":")<0&&delete r.rel),"property"in r&&"rev"in r&&(u=!1,r.rev.indexOf(":")<0&&delete r.rev)),this.features.copyRdfaPatterns){if(a.collectedPatternTag){const p={attributes:r,children:[],name:e,referenced:!1,rootPattern:!1,text:[]};a.collectedPatternTag.children.push(p),s.collectedPatternTag=p;return}if(r.typeof==="rdfa:Pattern"){s.collectedPatternTag={attributes:r,children:[],name:e,parentTag:a,referenced:!1,rootPattern:!0,text:[]};return}if(r.property==="rdfa:copy"){const p=r.resource||r.href||r.src;this.rdfaPatterns[p]?this.emitPatternCopy(a,this.rdfaPatterns[p],p):(this.pendingRdfaPatternCopies[p]||(this.pendingRdfaPatternCopies[p]=[]),this.pendingRdfaPatternCopies[p].push(a));return}}this.features.baseTag&&e==="base"&&r.href&&(this.util.baseIRI=this.util.getBaseIRI(r.href)),this.features.xmlBase&&r["xml:base"]&&(s.localBaseIRI=this.util.getBaseIRI(r["xml:base"])),this.features.timeTag&&e==="time"&&!r.datatype&&(s.interpretObjectAsTime=!0);let c,l,d;if("vocab"in r?r.vocab?(s.vocab=r.vocab,this.emitTriple(this.util.getBaseIriTerm(s),this.util.dataFactory.namedNode(Ci.Util.RDFA+"usesVocabulary"),this.util.dataFactory.namedNode(s.vocab))):s.vocab=this.activeTagStack[0].vocab:s.vocab=a.vocab,s.prefixesCustom=Ci.Util.parsePrefixes(r,a.prefixesCustom,this.features.xmlnsPrefixMappings),s.prefixesAll=Object.keys(s.prefixesCustom).length>0?Object.assign(Object.assign({},a.prefixesAll),s.prefixesCustom):a.prefixesAll,this.features.roleAttribute&&r.role){const p=r.id?this.util.createIri("#"+r.id,s,!1,!1,!1):this.util.createBlankNode(),b=s.vocab;s.vocab="http://www.w3.org/1999/xhtml/vocab#";for(const _ of this.util.createVocabIris(r.role,s,!0,!1))this.emitTriple(p,this.util.dataFactory.namedNode("http://www.w3.org/1999/xhtml/vocab#role"),_);s.vocab=b}"xml:lang"in r||this.features.langAttribute&&"lang"in r?s.language=r["xml:lang"]||r.lang:s.language=a.language;const f=this.activeTagStack.length===2;if(!("rel"in r)&&!("rev"in r)?"property"in r&&!("content"in r)&&!("datatype"in r)?("about"in r?(c=this.util.createIri(r.about,s,!1,!0,!0),s.explicitNewSubject=!!c):f?c=!0:a.object&&(c=a.object),"typeof"in r&&("about"in r&&(d=this.util.createIri(r.about,s,!1,!0,!0)),!d&&f&&(d=!0),!d&&"resource"in r&&(d=this.util.createIri(r.resource,s,!1,!0,!0)),!d&&("href"in r||"src"in r)&&(d=this.util.createIri(r.href||r.src,s,!1,!1,!0)),!d&&this.isInheritSubjectInHeadBody(e)&&(d=c),d||(d=this.util.createBlankNode()),l=d)):(("about"in r||"resource"in r)&&(c=this.util.createIri(r.about||r.resource,s,!1,!0,!0),s.explicitNewSubject=!!c),!c&&("href"in r||"src"in r)&&(c=this.util.createIri(r.href||r.src,s,!1,!1,!0),s.explicitNewSubject=!!c),c||(f?c=!0:this.isInheritSubjectInHeadBody(e)?c=a.object:"typeof"in r?(c=this.util.createBlankNode(),s.explicitNewSubject=!0):a.object&&(c=a.object,"property"in r||(s.skipElement=!0))),"typeof"in r&&(d=c)):("about"in r?(c=this.util.createIri(r.about,s,!1,!0,!0),s.explicitNewSubject=!!c,"typeof"in r&&(d=c)):f?c=!0:a.object&&(c=a.object),"resource"in r&&(l=this.util.createIri(r.resource,s,!1,!0,!0)),l||("href"in r||"src"in r?l=this.util.createIri(r.href||r.src,s,!1,!1,!0):"typeof"in r&&!("about"in r)&&!this.isInheritSubjectInHeadBody(e)&&(l=this.util.createBlankNode())),"typeof"in r&&!("about"in r)&&(this.isInheritSubjectInHeadBody(e)?d=c:d=l)),d)for(const p of this.util.createVocabIris(r.typeof,s,!0,!0))this.emitTriple(this.util.getResourceOrBaseIri(d,s),this.util.dataFactory.namedNode(Ci.Util.RDF+"type"),p);if(c&&(s.listMapping={}),l){if("rel"in r&&"inlist"in r)for(const p of this.util.createVocabIris(r.rel,s,o,!1))this.addListMapping(s,c,p,l);if(!("rel"in r&&"inlist"in r)){if("rel"in r)for(const p of this.util.createVocabIris(r.rel,s,o,!1))this.emitTriple(this.util.getResourceOrBaseIri(c,s),p,this.util.getResourceOrBaseIri(l,s));if("rev"in r)for(const p of this.util.createVocabIris(r.rev,s,u,!1))this.emitTriple(this.util.getResourceOrBaseIri(l,s),p,this.util.getResourceOrBaseIri(c,s))}}if(!l){if("rel"in r)if("inlist"in r)for(const p of this.util.createVocabIris(r.rel,s,o,!1))this.addListMapping(s,c,p,null),s.incompleteTriples.push({predicate:p,reverse:!1,list:!0});else for(const p of this.util.createVocabIris(r.rel,s,o,!1))s.incompleteTriples.push({predicate:p,reverse:!1});if("rev"in r)for(const p of this.util.createVocabIris(r.rev,s,u,!1))s.incompleteTriples.push({predicate:p,reverse:!0});s.incompleteTriples.length>0&&(l=this.util.createBlankNode())}if("property"in r){s.predicates=this.util.createVocabIris(r.property,s,!0,!1);let p;if("datatype"in r?(s.datatype=this.util.createIri(r.datatype,s,!0,!0,!1),s.datatype&&(s.datatype.value===Ci.Util.RDF+"XMLLiteral"||this.features.htmlDatatype&&s.datatype.value===Ci.Util.RDF+"HTML")&&(s.collectChildTags=!0)):(!("rev"in r)&&!("rel"in r)&&!("content"in r)&&("resource"in r&&(p=this.util.createIri(r.resource,s,!1,!0,!0)),!p&&"href"in r&&(p=this.util.createIri(r.href,s,!1,!1,!0)),!p&&"src"in r&&(p=this.util.createIri(r.src,s,!1,!1,!0))),"typeof"in r&&!("about"in r)&&(p=d)),"content"in r){const b=this.util.createLiteral(r.content,s);if("inlist"in r)for(const _ of s.predicates)this.addListMapping(s,c,_,b);else{const _=this.util.getResourceOrBaseIri(c,s);for(const E of s.predicates)this.emitTriple(_,E,b)}s.predicates=null}else if(this.features.datetimeAttribute&&"datetime"in r){s.interpretObjectAsTime=!0;const b=this.util.createLiteral(r.datetime,s);if("inlist"in r)for(const _ of s.predicates)this.addListMapping(s,c,_,b);else{const _=this.util.getResourceOrBaseIri(c,s);for(const E of s.predicates)this.emitTriple(_,E,b)}s.predicates=null}else if(p){const b=this.util.getResourceOrBaseIri(p,s);if("inlist"in r)for(const _ of s.predicates)this.addListMapping(s,c,_,b);else{const _=this.util.getResourceOrBaseIri(c,s);for(const E of s.predicates)this.emitTriple(_,E,b)}s.predicates=null}}let h=!1;if(!s.skipElement&&c&&a.incompleteTriples.length>0){h=!0;const p=this.util.getResourceOrBaseIri(a.subject,s),b=this.util.getResourceOrBaseIri(c,s);for(const _ of a.incompleteTriples)if(_.reverse)this.emitTriple(b,_.predicate,p);else if(_.list){let E=null;for(let w=this.activeTagStack.length-1;w>=0;w--)if(this.activeTagStack[w].inlist){E=this.activeTagStack[w];break}this.addListMapping(E,c,_.predicate,b)}else this.emitTriple(p,_.predicate,b)}!h&&a.incompleteTriples.length>0&&(s.incompleteTriples=s.incompleteTriples.concat(a.incompleteTriples)),s.subject=c||a.subject,s.object=l||c}onText(e){const r=this.activeTagStack[this.activeTagStack.length-1];if(this.features.copyRdfaPatterns&&r.collectedPatternTag){r.collectedPatternTag.text.push(e);return}r.text||(r.text=[]),r.text.push(e)}onTagClose(){const e=this.activeTagStack[this.activeTagStack.length-1],r=this.activeTagStack[this.activeTagStack.length-2];if(!(e.collectChildTags&&r.collectChildTags&&this.features.skipHandlingXmlLiteralChildren)){if(this.features.copyRdfaPatterns&&e.collectedPatternTag&&e.collectedPatternTag.rootPattern){const n=e.collectedPatternTag.attributes.resource;if(delete e.collectedPatternTag.attributes.resource,delete e.collectedPatternTag.attributes.typeof,this.rdfaPatterns[n]=e.collectedPatternTag,this.pendingRdfaPatternCopies[n]){for(const a of this.pendingRdfaPatternCopies[n])this.emitPatternCopy(a,e.collectedPatternTag,n);delete this.pendingRdfaPatternCopies[n]}this.activeTagStack.pop();return}if(e.predicates){const n=this.util.getResourceOrBaseIri(e.subject,e);let a=e.text||[];e.collectChildTags&&r.collectChildTags&&(a=a.slice(1));const s=this.util.createLiteral(a.join(""),e);if(e.inlist)for(const o of e.predicates)this.addListMapping(e,n,o,s);else for(const o of e.predicates)this.emitTriple(n,o,s);r.predicates||(e.text=null)}if(e.object&&Object.keys(e.listMapping).length>0){const n=this.util.getResourceOrBaseIri(e.object,e);for(const a in e.listMapping){const s=this.util.dataFactory.namedNode(a),o=e.listMapping[a];if(o.length>0){const u=o.map(()=>this.util.createBlankNode());for(let c=0;c`),e.text&&r&&(r.text?r.text=r.text.concat(e.text):r.text=e.text)}onEnd(){if(this.features.copyRdfaPatterns){this.features.copyRdfaPatterns=!1;for(const e in this.rdfaPatterns){const r=this.rdfaPatterns[e];r.referenced||(r.attributes.typeof="rdfa:Pattern",r.attributes.resource=e,this.emitPatternCopy(r.parentTag,r,e),r.referenced=!1,delete r.attributes.typeof,delete r.attributes.resource)}for(const e in this.pendingRdfaPatternCopies)for(const r of this.pendingRdfaPatternCopies[e])this.activeTagStack.push(r),this.onTagOpen("link",{property:"rdfa:copy",href:e}),this.onTagClose(),this.activeTagStack.pop();this.features.copyRdfaPatterns=!0}}isInheritSubjectInHeadBody(e){return this.features.inheritSubjectInHeadBody&&(e==="head"||e==="body")}addListMapping(e,r,n,a){if(e.explicitNewSubject){const s=this.util.createBlankNode();this.emitTriple(this.util.getResourceOrBaseIri(r,e),n,s),this.emitTriple(s,this.util.dataFactory.namedNode(Ci.Util.RDF+"first"),this.util.getResourceOrBaseIri(a,e)),this.emitTriple(s,this.util.dataFactory.namedNode(Ci.Util.RDF+"rest"),this.util.dataFactory.namedNode(Ci.Util.RDF+"nil"))}else{let s=e.listMappingLocal[n.value];s||(e.listMappingLocal[n.value]=s=[]),a&&s.push(a)}}emitTriple(e,r,n){e.termType==="NamedNode"&&e.value.indexOf(":")<0||r.termType==="NamedNode"&&r.value.indexOf(":")<0||n.termType==="NamedNode"&&n.value.indexOf(":")<0||this.push(this.util.dataFactory.quad(e,r,n,this.defaultGraph))}emitPatternCopy(e,r,n){if(this.activeTagStack.push(e),r.referenced=!0,!r.constructedBlankNodes)r.constructedBlankNodes=[],this.util.blankNodeFactory=()=>{const a=this.util.dataFactory.blankNode();return r.constructedBlankNodes.push(a),a};else{let a=0;this.util.blankNodeFactory=()=>r.constructedBlankNodes[a++]}this.emitPatternCopyAbsolute(r,!0,n),this.util.blankNodeFactory=null,this.activeTagStack.pop()}emitPatternCopyAbsolute(e,r,n){if(!(!r&&e.attributes.property==="rdfa:copy"&&e.attributes.href===n)){this.onTagOpen(e.name,e.attributes);for(const a of e.text)this.onText(a);for(const a of e.children)this.emitPatternCopyAbsolute(a,!1,n);this.onTagClose()}}initializeParser(e){return new _ae.Parser({onclosetag:()=>{try{this.onTagClose(),this.htmlParseListener&&this.htmlParseListener.onTagClose()}catch(r){this.emit("error",r)}},onend:()=>{try{this.onEnd(),this.htmlParseListener&&this.htmlParseListener.onEnd()}catch(r){this.emit("error",r)}},onopentag:(r,n)=>{try{this.onTagOpen(r,n),this.htmlParseListener&&this.htmlParseListener.onTagOpen(r,n)}catch(a){this.emit("error",a)}},ontext:r=>{try{this.onText(r),this.htmlParseListener&&this.htmlParseListener.onText(r)}catch(n){this.emit("error",n)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:e})}}jm.RdfaParser=OR;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(sF,t),r(oF,t),r(uF,t),r(jm,t),r(Gu,t),r(T0,t)})(_R);Object.defineProperty(Cm,"__esModule",{value:!0});Cm.ActorRdfParseXmlRdfa=void 0;const wae=ml,Sae=_R;class Tae extends wae.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){var o;const a=(e.headers&&e.headers.get("content-language"))??void 0;e.data.on("error",u=>s.emit("error",u));const s=e.data.pipe(new Sae.RdfaParser({baseIRI:(o=e.metadata)==null?void 0:o.baseIRI,profile:"xml",language:a}));return{data:s,metadata:{triples:!0}}}}Cm.ActorRdfParseXmlRdfa=Tae;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Cm,t)})(aF);var FF={},qm={},AR={},Eae=function(){var t=function(ze,De,Be,Je){for(Be=Be||{},Je=ze.length;Je--;Be[ze[Je]]=De);return Be},e=[7,12,13,14,15,16,20,25,115,130],r=[7,13,16,20,25,115,130],n=[7,13,16,115,130],a=[1,25],s=[1,29],o=[1,27],u=[1,28],c=[13,16,115,130],l=[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],d=[28,56],f=[1,42],h=[46,48,53,56],p=[1,54],b=[1,60],_=[1,56],E=[1,57],w=[1,58],O=[1,63],A=[1,64],T=[1,65],I=[1,66],D=[1,67],U=[1,68],H=[1,75],N=[28,46,48,53,56],x=[28,42,46,48,53,56],F=[13,16,28,38,40,42,44,46,48,53,56,92,115,119,120,130,131,132,133,134,135,136],X=[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],ne=[13,16,38,40,44,92,115,119,120,130,131,132,133,134,135,136],$=[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],j=[13,16,28,56,115,130],Q=[13,16,38,58,87,96,109,115,126,130],se=[1,116],ie=[1,112],be=[1,108],he=[1,114],Te=[1,111],Ne=[7,13,16,20,25,44,48,53,56,67,85,87,95,96,115,128,129,130],ye=[48,53],ce=[48,53,87,96,126],Re=[13,16,44,48,53,56,85,87,95,96,115,128,129,130],oe=[1,126],J=[13,16,40,44,48,53,56,85,87,95,96,115,128,129,130],le=[1,129],pe=[48,53,67,87,96,126],L=[13,16,40,44,48,53,56,67,85,87,95,96,115,128,129,130],P=[1,133],g=[13,16,40,44,48,53,56,67,85,87,95,96,102,115,128,129,130],y=[13,16,40,44,48,53,56,67,85,87,93,95,96,102,110,111,115,128,129,130],v=[1,151],C=[1,153],V=[1,156],q=[1,157],G=[1,158],Y=[1,167],ee=[1,175],ae=[13,16,44,48,53,56,67,85,87,95,96,115,128,129,130],ve=[13,16,44,48,53,56,67,85,87,95,96,115,126,128,129,130],me=[13,16,46,92,115,119,120,130,131,132,133,134,135,136],Ee={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(De,Be,Je,Pt,at,qe,hs){var ke=qe.length-1;switch(at){case 1:this.$=Tt(Ae.factory.namedNode(br("")),Ae.factory.namedNode(W),Ae.factory.namedNode(Ge+"Ontology"));break;case 5:Ae.base=Ae.factory.namedNode(qe[ke].slice(1,-1)),Ae.n3Parser._setBase(Ae.base.value);break;case 6:this.$=Tt(Ae.base,Ae.factory.namedNode(Ge+"imports"),Ae.factory.namedNode(qe[ke].slice(1,-1)));break;case 7:this.$=Ae.prefixes[qe[ke-1].substr(0,qe[ke-1].length-1)]=br(qe[ke]);break;case 8:Ae.nodeShapeStack=!1,Tt(Ae.currentNodeShape=qe[ke],Ae.factory.namedNode(W),Ae.factory.namedNode(Ue+"NodeShape"));break;case 10:this.$=Tt(Ae.currentNodeShape,Ae.factory.namedNode(W),Ae.factory.namedNode(We+"Class"));break;case 11:this.$=Se();break;case 13:this.$=qe[ke].forEach(mr=>Tt(Ae.currentNodeShape,qe[ke-1],mr));break;case 14:this.$=[qe[ke-1],...qe[ke]];break;case 18:this.$=Wr(qe[ke-1],!0);break;case 19:case 34:case 42:case 60:case 63:this.$=qe[ke];break;case 20:Ae.tempCurrentNodeShape=Ae.currentNodeShape,this.$=Ae.currentNodeShape=Pr();break;case 21:Ae.currentNodeShape=Ae.tempCurrentNodeShape;break;case 22:case 31:this.$=qe[ke-2];break;case 23:Ae.tempCurrentNodeShape=Ae.currentNodeShape,Ae.currentNodeShape=Ae.currentPropertyNode;break;case 24:Ae.currentNodeShape=Ae.tempCurrentNodeShape;break;case 26:Ae.currentNodeShape=qe[ke];break;case 29:Ae.nodeShapeStack?(Ae.nodeShapeStack.push(Ae.currentNodeShape),Tt(Ae.currentPropertyNode,Ae.factory.namedNode(Ue+"node"),Ae.currentNodeShape=Pr())):Ae.nodeShapeStack=[],this.$=Ae.currentNodeShape;break;case 30:Ae.nodeShapeStack.length>0&&(Ae.currentNodeShape=Ae.nodeShapeStack.pop());break;case 32:this.$=qe[ke].forEach(mr=>{Tt(Ae.currentNodeShape,Ae.factory.namedNode(Ue+"targetClass"),mr)});break;case 35:this.$=Tt(Ae.currentNodeShape,Ae.factory.namedNode(Ue+qe[ke][0]),qe[ke][1]);break;case 36:break;case 37:const yn=Wr([qe[ke-1],...qe[ke]].map(mr=>{const Pi=Pr();return Tt(Pi,Ae.factory.namedNode(Ue+mr[0]),mr[1]),Pi}));this.$=["or",yn];break;case 39:case 46:this.$=re("not",...qe[ke]);break;case 40:case 50:this.$=[qe[ke-2],qe[ke]];break;case 43:this.$=qe[ke]&&B(...qe[ke]);break;case 44:this.$=B("or",Wr([qe[ke-1],...qe[ke]].map(mr=>{const Pi=Pr();return Tt(Pi,Ae.factory.namedNode(Ue+mr[0]),mr[1]),Pi})));break;case 47:this.$=[lt[qe[ke].value]?"datatype":"class",qe[ke]];break;case 48:this.$=["nodeKind",Ae.factory.namedNode(Ue+qe[ke])];break;case 49:this.$=["node",Ae.factory.namedNode(qe[ke])];break;case 51:this.$=void 0;break;case 53:this.$=qe[ke]>0&&B("minCount",Qt(qe[ke],ue));break;case 54:this.$=B("maxCount",Qt(qe[ke],ue));break;case 56:this.$=Br(qe[ke].slice(1));break;case 57:this.$=br(qe[ke]);break;case 59:Tt(Ae.currentNodeShape,Ae.factory.namedNode(Ue+"property"),Ae.currentPropertyNode=Pr()),B("path",qe[ke]);break;case 62:const gr=Pr();Tt(gr,Ae.factory.namedNode(Ue+"alternativePath"),Wr([qe[ke-1],...qe[ke]])),this.$=gr;break;case 65:this.$=Wr([qe[ke-1],...qe[ke]]);break;case 67:Tt(this.$=Pr(),Ae.factory.namedNode(Ue+qe[ke]),qe[ke-1]);break;case 69:Tt(this.$=Pr(),Ae.factory.namedNode(Ue+"inversePath"),qe[ke]);break;case 71:this.$="zeroOrOnePath";break;case 72:this.$="zeroOrMorePath";break;case 73:this.$="oneOrMorePath";break;case 75:this.$=qe[ke-1];break;case 77:this.$=Wr(qe[ke-1]);break;case 80:this.$=Ae.factory.namedNode(br(qe[ke]));break;case 81:this.$=Ae.factory.namedNode(Br(qe[ke]));break;case 82:this.$=Se(Ae.factory.namedNode(W));break;case 83:this.$=Qt(qe[ke]);break;case 84:this.$=_r(qe[ke-1],lowercase(qe[ke].substr(1)));break;case 85:this.$=Qt(qe[ke-2],qe[ke]);break;case 86:this.$=Qt(qe[ke],ue);break;case 87:this.$=Qt(qe[ke],ge);break;case 88:this.$=Qt(qe[ke].toLowerCase(),we);break;case 89:this.$=Qt(qe[ke].toLowerCase(),Me);break;case 90:this.$=Rn(qe[ke],1);break;case 91:this.$=Rn(qe[ke],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:qe[ke-1].push(qe[ke]);break;case 114:case 116:case 122:case 130:case 134:case 136:this.$=[qe[ke]];break}},table:[t(e,[2,92],{3:1,4:2}),{1:[3]},t(r,[2,96],{5:3,8:4,9:5,10:6,11:7,12:[1,8],14:[1,9],15:[1,10]}),t(n,[2,110],{6:11,124:12,54:13,19:14,24:15,20:[1,16],25:[1,17]}),t(e,[2,93]),t(e,[2,2]),t(e,[2,3]),t(e,[2,4]),{13:[1,18]},{13:[1,19]},{16:[1,20]},{7:[1,21]},t(r,[2,97]),{7:[2,28],13:a,16:s,18:24,51:23,52:22,114:26,115:o,130:u},t(r,[2,94]),t(r,[2,95]),{13:a,16:s,17:30,18:31,114:26,115:o,130:u},{13:a,16:s,17:32,18:31,114:26,115:o,130:u},t(e,[2,5]),t(e,[2,6]),{13:[1,33]},{1:[2,1]},t(n,[2,111]),{13:a,16:s,18:36,29:34,30:35,114:26,115:o,130:u},t(c,[2,26]),t(l,[2,80]),t(l,[2,81]),t(l,[2,82]),t(l,[2,140]),t(l,[2,141]),t(d,[2,98],{21:37,60:38,61:[1,39]}),t([28,56,61],[2,8]),{26:40,27:41,28:f,56:[2,102]},t(e,[2,7]),{53:[1,43]},t(h,[2,104],{31:44,27:45,28:f}),{13:a,16:s,18:51,32:46,33:47,35:48,36:49,37:50,38:p,43:53,44:b,92:_,113:52,114:26,115:o,116:55,119:E,120:w,121:59,122:61,123:62,130:u,131:O,132:A,133:T,134:I,135:D,136:U},{22:69,27:70,28:f,56:[2,100]},t(d,[2,99]),{13:a,16:s,18:72,62:71,114:26,115:o,130:u},{23:73,55:74,56:H},{56:[2,103]},{13:a,16:s,18:36,29:76,30:35,114:26,115:o,130:u},t(n,[2,27]),t(h,[2,12]),t(h,[2,105]),t(N,[2,13]),t(x,[2,106],{34:77}),t(F,[2,15]),t(F,[2,16]),t(F,[2,17]),t(X,[2,78]),t(X,[2,79]),{13:a,16:s,18:36,29:78,30:35,114:26,115:o,130:u},t(ne,[2,108],{39:79}),t(X,[2,83],{117:[1,80],118:[1,81]}),t(X,[2,86]),t(X,[2,87]),t(X,[2,88]),t(X,[2,89]),t(c,[2,20]),t($,[2,90]),t($,[2,91]),t(X,[2,142]),t(X,[2,143]),t($,[2,144]),t($,[2,145]),t($,[2,146]),t($,[2,147]),{23:82,55:74,56:H},{56:[2,101]},t(d,[2,32],{114:26,18:83,13:a,16:s,115:o,130:u}),t(j,[2,114]),t(r,[2,10]),t(Q,[2,112],{59:84}),t(Q,[2,29]),t(h,[2,11]),t(N,[2,14],{41:85,42:[1,86]}),{45:87,46:[1,88]},{13:a,16:s,18:51,33:90,35:48,36:49,37:50,38:p,40:[1,89],43:53,44:b,92:_,113:52,114:26,115:o,116:55,119:E,120:w,121:59,122:61,123:62,130:u,131:O,132:A,133:T,134:I,135:D,136:U},t(X,[2,84]),{13:a,16:s,18:91,114:26,115:o,130:u},t(r,[2,9]),t(j,[2,115]),{13:a,16:s,18:115,38:se,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:ie,96:be,97:101,99:103,103:106,105:109,106:113,108:110,109:he,114:26,115:o,125:96,126:Te,130:u},t(x,[2,107]),{13:a,16:s,18:51,33:117,35:48,36:49,37:50,38:p,43:53,44:b,92:_,113:52,114:26,115:o,116:55,119:E,120:w,121:59,122:61,123:62,130:u,131:O,132:A,133:T,134:I,135:D,136:U},t(F,[2,22]),t(F,[2,21]),t(F,[2,18]),t(ne,[2,109]),t(X,[2,85]),t(Ne,[2,31]),t(Q,[2,113]),t(Ne,[2,30]),{47:120,48:[1,121],50:119,53:[2,120],65:118},t(ye,[2,118],{70:100,68:102,72:104,73:105,74:107,69:122,87:ie,96:be,126:Te}),t(ye,[2,119]),t(ce,[2,116]),t(Re,[2,128],{79:123}),t(ce,[2,35]),t(Re,[2,59]),t(ce,[2,36],{71:124,66:125,67:oe}),t(J,[2,61],{100:127,98:128,67:le}),t(pe,[2,38]),{72:130,74:107,87:ie,126:Te},t(L,[2,64],{104:131,101:132,102:P}),{75:[1,134]},t([13,16,56,85,87,95,115,126,128,129,130],[2,58]),t(g,[2,68]),{13:a,16:s,18:115,38:se,105:135,106:113,114:26,115:o,130:u},{75:[2,124]},{75:[2,125]},t(g,[2,66],{107:136,93:[1,138],110:[1,137],111:[1,139]}),t([13,16,38,115,130],[2,70]),t(y,[2,74]),{13:a,16:s,18:115,38:se,97:140,99:103,103:106,105:109,106:113,108:110,109:he,114:26,115:o,130:u},t(x,[2,19]),{53:[1,141]},{53:[2,121]},{13:a,16:s,18:36,29:142,30:35,114:26,115:o,130:u},t(c,[2,23]),t(ce,[2,117]),t(ye,[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:a,16:s,44:[1,146],56:H,85:v,87:C,95:V,96:be,115:o,128:q,129:G,130:u}),t(ce,[2,37],{66:159,67:oe}),t(pe,[2,122]),{68:160,72:104,73:105,74:107,87:ie,96:be,126:Te},t(J,[2,62],{98:161,67:le}),t(L,[2,134]),{13:a,16:s,18:115,38:se,99:162,103:106,105:109,106:113,108:110,109:he,114:26,115:o,130:u},t(pe,[2,39]),t(L,[2,65],{101:163,102:P}),t(g,[2,136]),{13:a,16:s,18:115,38:se,103:164,105:109,106:113,108:110,109:he,114:26,115:o,130:u},{13:a,16:s,18:51,35:166,44:Y,76:165,92:_,113:52,114:26,115:o,116:55,119:E,120:w,121:59,122:61,123:62,130:u,131:O,132:A,133:T,134:I,135:D,136:U},t(g,[2,69]),t(g,[2,67]),t(g,[2,71]),t(g,[2,72]),t(g,[2,73]),{40:[1,168]},t(Q,[2,33]),{48:[1,170],49:169},t(Re,[2,129]),t(Re,[2,126]),t(Re,[2,127]),{89:171,92:[1,172]},t(Re,[2,43],{83:173,80:174,67:ee}),t(ae,[2,45]),{13:a,16:s,18:150,23:154,55:74,56:H,84:176,85:v,86:152,87:C,94:155,95:V,114:26,115:o,128:q,129:G,130:u},t(ae,[2,47]),t(ae,[2,48]),t(ae,[2,49]),{75:[1,177]},t(ae,[2,51]),t(ae,[2,56]),{13:[1,178]},t(ae,[2,132]),t(ae,[2,133]),t(pe,[2,123]),t(pe,[2,34]),t(L,[2,135]),t(L,[2,60]),t(g,[2,137]),t(g,[2,63]),t(pe,[2,40]),t(ve,[2,76]),t(me,[2,138],{112:179}),t(y,[2,75]),{53:[2,25]},{53:[2,24]},{90:[1,180]},{90:[2,53]},t(Re,[2,44],{80:181,67:ee}),t(ae,[2,130]),{13:a,16:s,18:150,23:154,55:74,56:H,73:149,81:182,84:148,85:v,86:152,87:C,94:155,95:V,96:be,114:26,115:o,128:q,129:G,130:u},t(ae,[2,46]),{13:a,16:s,18:51,35:166,44:Y,76:183,92:_,113:52,114:26,115:o,116:55,119:E,120:w,121:59,122:61,123:62,130:u,131:O,132:A,133:T,134:I,135:D,136:U},t(ae,[2,57]),{13:a,16:s,18:51,35:185,46:[1,184],92:_,113:52,114:26,115:o,116:55,119:E,120:w,121:59,122:61,123:62,130:u,131:O,132:A,133:T,134:I,135:D,136:U},{91:186,92:[1,187],93:[1,188]},t(ae,[2,131]),t(ae,[2,42]),t(ae,[2,50]),t(ve,[2,77]),t(me,[2,139]),{46:[1,189]},{46:[2,54]},{46:[2,55]},t(Re,[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(De,Be){if(Be.recoverable)this.trace(De);else{var Je=new Error(De);throw Je.hash=Be,Je}},parse:function(De){var Be=this,Je=[0],Pt=[null],at=[],qe=this.table,hs="",ke=0,yn=0,gr=2,mr=1,Pi=at.slice.call(arguments,1),vt=Object.create(this.lexer),ya={yy:{}};for(var ki in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ki)&&(ya.yy[ki]=this.yy[ki]);vt.setInput(De,ya.yy),ya.yy.lexer=vt,ya.yy.parser=this,typeof vt.yylloc>"u"&&(vt.yylloc={});var ir=vt.yylloc;at.push(ir);var to=vt.options&&vt.options.ranges;typeof ya.yy.parseError=="function"?this.parseError=ya.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var ru=function(){var qn;return qn=vt.lex()||mr,typeof qn!="number"&&(qn=Be.symbols_[qn]||qn),qn},Xr,Di,an,Qi,sn={},Na,Zr,ps,Ca;;){if(Di=Je[Je.length-1],this.defaultActions[Di]?an=this.defaultActions[Di]:((Xr===null||typeof Xr>"u")&&(Xr=ru()),an=qe[Di]&&qe[Di][Xr]),typeof an>"u"||!an.length||!an[0]){var ai="";Ca=[];for(Na in qe[Di])this.terminals_[Na]&&Na>gr&&Ca.push("'"+this.terminals_[Na]+"'");vt.showPosition?ai="Parse error on line "+(ke+1)+`: `+vt.showPosition()+` Expecting `+Ca.join(", ")+", got '"+(this.terminals_[Xr]||Xr)+"'":ai="Parse error on line "+(ke+1)+": Unexpected "+(Xr==mr?"end of input":"'"+(this.terminals_[Xr]||Xr)+"'"),this.parseError(ai,{text:vt.match,token:this.terminals_[Xr]||Xr,line:vt.yylineno,loc:ir,expected:Ca})}if(an[0]instanceof Array&&an.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Di+", token: "+Xr);switch(an[0]){case 1:Je.push(Xr),Pt.push(vt.yytext),at.push(vt.yylloc),Je.push(an[1]),Xr=null,yn=vt.yyleng,hs=vt.yytext,ke=vt.yylineno,ir=vt.yylloc;break;case 2:if(Zr=this.productions_[an[1]][1],sn.$=Pt[Pt.length-Zr],sn._$={first_line:at[at.length-(Zr||1)].first_line,last_line:at[at.length-1].last_line,first_column:at[at.length-(Zr||1)].first_column,last_column:at[at.length-1].last_column},to&&(sn._$.range=[at[at.length-(Zr||1)].range[0],at[at.length-1].range[1]]),Qi=this.performAction.apply(sn,[hs,yn,ke,ya.yy,an[1],Pt,at].concat(Pi)),typeof Qi<"u")return Qi;Zr&&(Je=Je.slice(0,-1*Zr*2),Pt=Pt.slice(0,-1*Zr),at=at.slice(0,-1*Zr)),Je.push(this.productions_[an[1]][0]),Pt.push(sn.$),at.push(sn._$),ps=qe[Je[Je.length-2]][Je[Je.length-1]],Je.push(ps);break;case 3:return!0}}return!0}};const k="http://www.w3.org/1999/02/22-rdf-syntax-ns#",W=k+"type",M=k+"first",S=k+"rest",R=k+"nil",z="http://www.w3.org/2001/XMLSchema#",ue=z+"integer",ge=z+"decimal",we=z+"double",Me=z+"boolean",Ue="http://www.w3.org/ns/shacl#",Ge="http://www.w3.org/2002/07/owl#",We="http://www.w3.org/2000/01/rdf-schema#",lt={[ue]:!0,[ge]:!0,[z+"float"]:!0,[we]:!0,[z+"string"]:!0,[Me]:!0,[z+"dateTime"]:!0,[z+"nonPositiveInteger"]:!0,[z+"negativeInteger"]:!0,[z+"long"]:!0,[z+"int"]:!0,[z+"short"]:!0,[z+"byte"]:!0,[z+"nonNegativeInteger"]:!0,[z+"unsignedLong"]:!0,[z+"unsignedShort"]:!0,[z+"unsignedByte"]:!0,[z+"positiveInteger"]:!0,[k+"langString"]:!0};function Wr(ze,De=!1){let Be=0,Je=ze.length;if(De&&Je===0)return Ae.factory.namedNode(R);const Pt=head=Pr();return Je===0&&Tt(head,Ae.factory.namedNode(S),Ae.factory.namedNode(R)),ze.forEach(at=>{if(at===void 0)throw new Error("b");Tt(head,Ae.factory.namedNode(M),at),Tt(head,Ae.factory.namedNode(S),head=++Be20?"...":"")+De.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var De=this.match;return De.length<20&&(De+=this._input.substr(0,20-De.length)),(De.substr(0,20)+(De.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var De=this.pastInput(),Be=new Array(De.length+1).join("-");return De+this.upcomingInput()+` `+Be+"^"},test_match:function(De,Be){var Je,Pt,at;if(this.options.backtrack_lexer&&(at={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&&(at.yylloc.range=this.yylloc.range.slice(0))),Pt=De[0].match(/(?:\r\n?|\n).*/g),Pt&&(this.yylineno+=Pt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Pt?Pt[Pt.length-1].length-Pt[Pt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+De[0].length},this.yytext+=De[0],this.match+=De[0],this.matches=De,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(De[0].length),this.matched+=De[0],Je=this.performAction.call(this,this.yy,this,Be,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Je)return Je;if(this._backtrack){for(var qe in at)this[qe]=at[qe];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var De,Be,Je,Pt;this._more||(this.yytext="",this.match="");for(var at=this._currentRules(),qe=0;qeBe[0].length)){if(Be=Je,Pt=qe,this.options.backtrack_lexer){if(De=this.test_match(Je,at[qe]),De!==!1)return De;if(this._backtrack){Be=!1;continue}else return!1}else if(!this.options.flex)break}return Be?(De=this.test_match(Be,at[Pt]),De!==!1?De:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Be=this.next();return Be||this.lex()},begin:function(Be){this.conditionStack.push(Be)},popState:function(){var Be=this.conditionStack.length-1;return Be>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(Be){return Be=this.conditionStack.length-1-Math.abs(Be||0),Be>=0?this.conditionStack[Be]:"INITIAL"},pushState:function(Be){this.begin(Be)},stateStackSize:function(){return this.conditionStack.length},options:{flex:!0,"case-insensitive":!0},performAction:function(Be,Je,Pt,at){switch(Pt){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(Je.yytext);break}},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}}};return ze}();Ee.lexer=Fe;function Ae(){this.yy={}}return Ae.prototype=Ee,Ee.Parser=Ae,new Ae}(),Oae=Eae;const Aae=Oae.Parser,JS=rc;let LF=class{constructor(){}parse(e,{extendedSyntax:r,baseIRI:n}={}){this._parser=new Aae,this._parser.Parser.factory=JS.DataFactory,this._parser.Parser.base=JS.DataFactory.namedNode(n||"urn:x-base:default"),this._parser.Parser.extended=r===!0,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 JS.Parser({baseIRI:n||"urn:x-base:default"});const a=[];return this._parser.Parser.onQuad=s=>{a.push(s)},this._parser.parse(e),a.prefixes=this._parser.Parser.prefixes,a}};AR.Parser=LF;AR.parse=function(e,r){return new LF().parse(e,r)};var BF={exports:{}};(function(t){(function(){var e;typeof window=="object"&&window?e=window:e=m,t.exports?t.exports=e.Promise?e.Promise:s:e.Promise||(e.Promise=s);var r=e.setImmediate||function(h){setTimeout(h,1)};function n(h,p){return function(){h.apply(p,arguments)}}var a=Array.isArray||function(h){return Object.prototype.toString.call(h)==="[object Array]"};function s(h){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");if(typeof h!="function")throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],f(h,n(u,this),n(c,this))}function o(h){var p=this;if(this._state===null){this._deferreds.push(h);return}r(function(){var b=p._state?h.onFulfilled:h.onRejected;if(b===null){(p._state?h.resolve:h.reject)(p._value);return}var _;try{_=b(p._value)}catch(E){h.reject(E);return}h.resolve(_)})}function u(h){try{if(h===this)throw new TypeError("A promise cannot be resolved with itself.");if(h&&(typeof h=="object"||typeof h=="function")){var p=h.then;if(typeof p=="function"){f(n(p,h),n(u,this),n(c,this));return}}this._state=!0,this._value=h,l.call(this)}catch(b){c.call(this,b)}}function c(h){this._state=!1,this._value=h,l.call(this)}function l(){for(var h=0,p=this._deferreds.length;h(this.prefixes=r.prefixes,r)))}read(){if(this.prefixes){for(const e of Object.entries(this.prefixes))this.emit("prefix",...e);delete this.prefixes}return super.read()}}Vm.PrefixWrappingIterator=Pae;Object.defineProperty(qm,"__esModule",{value:!0});qm.ActorRdfParseShaclc=void 0;const Dae=ml,Nae=kt,Cae=AR,jae=wl,Mae=Vm;class Fae extends Dae.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){const a=new Mae.PrefixWrappingIterator(jae(e.data).then(o=>{var u;return(0,Cae.parse)(o,{extendedSyntax:r==="text/shaclc-ext",baseIRI:(u=e.metadata)==null?void 0:u.baseIRI})})),s=new Nae.Readable({objectMode:!0});return a.on("prefix",(...o)=>s.emit("prefix",...o)),{data:s.wrap(a),metadata:{triples:!0}}}}qm.ActorRdfParseShaclc=Fae;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(qm,t)})(FF);var $F={},Hm={},UF={},Tp={},RR={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var e=Ho,r;(function(d){d[d.Tab=9]="Tab",d[d.NewLine=10]="NewLine",d[d.FormFeed=12]="FormFeed",d[d.CarriageReturn=13]="CarriageReturn",d[d.Space=32]="Space",d[d.ExclamationMark=33]="ExclamationMark",d[d.Number=35]="Number",d[d.Amp=38]="Amp",d[d.SingleQuote=39]="SingleQuote",d[d.DoubleQuote=34]="DoubleQuote",d[d.Dash=45]="Dash",d[d.Slash=47]="Slash",d[d.Zero=48]="Zero",d[d.Nine=57]="Nine",d[d.Semi=59]="Semi",d[d.Lt=60]="Lt",d[d.Eq=61]="Eq",d[d.Gt=62]="Gt",d[d.Questionmark=63]="Questionmark",d[d.UpperA=65]="UpperA",d[d.LowerA=97]="LowerA",d[d.UpperF=70]="UpperF",d[d.LowerF=102]="LowerF",d[d.UpperZ=90]="UpperZ",d[d.LowerZ=122]="LowerZ",d[d.LowerX=120]="LowerX",d[d.OpeningSquareBracket=91]="OpeningSquareBracket"})(r||(r={}));var n;(function(d){d[d.Text=1]="Text",d[d.BeforeTagName=2]="BeforeTagName",d[d.InTagName=3]="InTagName",d[d.InSelfClosingTag=4]="InSelfClosingTag",d[d.BeforeClosingTagName=5]="BeforeClosingTagName",d[d.InClosingTagName=6]="InClosingTagName",d[d.AfterClosingTagName=7]="AfterClosingTagName",d[d.BeforeAttributeName=8]="BeforeAttributeName",d[d.InAttributeName=9]="InAttributeName",d[d.AfterAttributeName=10]="AfterAttributeName",d[d.BeforeAttributeValue=11]="BeforeAttributeValue",d[d.InAttributeValueDq=12]="InAttributeValueDq",d[d.InAttributeValueSq=13]="InAttributeValueSq",d[d.InAttributeValueNq=14]="InAttributeValueNq",d[d.BeforeDeclaration=15]="BeforeDeclaration",d[d.InDeclaration=16]="InDeclaration",d[d.InProcessingInstruction=17]="InProcessingInstruction",d[d.BeforeComment=18]="BeforeComment",d[d.CDATASequence=19]="CDATASequence",d[d.InSpecialComment=20]="InSpecialComment",d[d.InCommentLike=21]="InCommentLike",d[d.BeforeSpecialS=22]="BeforeSpecialS",d[d.SpecialStartSequence=23]="SpecialStartSequence",d[d.InSpecialTag=24]="InSpecialTag",d[d.InEntity=25]="InEntity"})(n||(n={}));function a(d){return d===r.Space||d===r.NewLine||d===r.Tab||d===r.FormFeed||d===r.CarriageReturn}function s(d){return d===r.Slash||d===r.Gt||a(d)}function o(d){return d>=r.LowerA&&d<=r.LowerZ||d>=r.UpperA&&d<=r.UpperZ}var u;(function(d){d[d.NoValue=0]="NoValue",d[d.Unquoted=1]="Unquoted",d[d.Single=2]="Single",d[d.Double=3]="Double"})(u=t.QuoteType||(t.QuoteType={}));var c={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])},l=function(){function d(f,h){var p=f.xmlMode,b=p===void 0?!1:p,_=f.decodeEntities,E=_===void 0?!0:_,w=this;this.cbs=h,this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=n.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=b,this.decodeEntities=E,this.entityDecoder=new e.EntityDecoder(b?e.xmlDecodeTree:e.htmlDecodeTree,function(O,A){return w.emitCodePoint(O,A)})}return d.prototype.reset=function(){this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},d.prototype.write=function(f){this.offset+=this.buffer.length,this.buffer=f,this.parse()},d.prototype.end=function(){this.running&&this.finish()},d.prototype.pause=function(){this.running=!1},d.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=n.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&f===r.Amp&&this.startEntity()},d.prototype.stateSpecialStartSequence=function(f){var h=this.sequenceIndex===this.currentSequence.length,p=h?s(f):(f|32)===this.currentSequence[this.sequenceIndex];if(!p)this.isSpecial=!1;else if(!h){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=n.InTagName,this.stateInTagName(f)},d.prototype.stateInSpecialTag=function(f){if(this.sequenceIndex===this.currentSequence.length){if(f===r.Gt||a(f)){var h=this.index-this.currentSequence.length;if(this.sectionStart=0?(this.state=this.baseState,f===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1},d.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===n.Text||this.state===n.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===n.InAttributeValueDq||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},d.prototype.shouldContinue=function(){return this.index=f||(this.state===n.InCommentLike?this.currentSequence===c.CdataEnd?this.cbs.oncdata(this.sectionStart,f,0):this.cbs.oncomment(this.sectionStart,f,0):this.state===n.InTagName||this.state===n.BeforeAttributeName||this.state===n.BeforeAttributeValue||this.state===n.AfterAttributeName||this.state===n.InAttributeName||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueDq||this.state===n.InAttributeValueNq||this.state===n.InClosingTagName||this.cbs.ontext(this.sectionStart,f))},d.prototype.emitCodePoint=function(f,h){this.baseState!==n.Text&&this.baseState!==n.InSpecialTag?(this.sectionStart0&&o.has(this.stack[0]);){var u=this.stack.shift();(n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,u,!0)}this.isVoidElement(e)||(this.stack.unshift(e),this.htmlMode&&(bN.has(e)?this.foreignContext.unshift(!0):_N.has(e)&&this.foreignContext.unshift(!1))),(s=(a=this.cbs).onopentagname)===null||s===void 0||s.call(a,e),this.cbs.onopentag&&(this.attribs={})},t.prototype.endOpenTag=function(e){var r,n;this.startIndex=this.openTagStart,this.attribs&&((n=(r=this.cbs).onopentag)===null||n===void 0||n.call(r,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},t.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},t.prototype.onclosetag=function(e,r){var n,a,s,o,u,c,l,d;this.endIndex=r;var f=this.getSlice(e,r);if(this.lowerCaseTagNames&&(f=f.toLowerCase()),this.htmlMode&&(bN.has(f)||_N.has(f))&&this.foreignContext.shift(),this.isVoidElement(f))this.htmlMode&&f==="br"&&((o=(s=this.cbs).onopentagname)===null||o===void 0||o.call(s,"br"),(c=(u=this.cbs).onopentag)===null||c===void 0||c.call(u,"br",{},!0),(d=(l=this.cbs).onclosetag)===null||d===void 0||d.call(l,"br",!1));else{var h=this.stack.indexOf(f);if(h!==-1)for(var p=0;p<=h;p++){var b=this.stack.shift();(a=(n=this.cbs).onclosetag)===null||a===void 0||a.call(n,b,p!==h)}else this.htmlMode&&f==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1},t.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},t.prototype.closeCurrentTag=function(e){var r,n,a=this.tagname;this.endOpenTag(e),this.stack[0]===a&&((n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,a,!e),this.stack.shift())},t.prototype.onattribname=function(e,r){this.startIndex=e;var n=this.getSlice(e,r);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n},t.prototype.onattribdata=function(e,r){this.attribvalue+=this.getSlice(e,r)},t.prototype.onattribentity=function(e){this.attribvalue+=(0,fN.fromCodePoint)(e)},t.prototype.onattribend=function(e,r){var n,a;this.endIndex=r,(a=(n=this.cbs).onattribute)===null||a===void 0||a.call(n,this.attribname,this.attribvalue,e===r1.QuoteType.Double?'"':e===r1.QuoteType.Single?"'":e===r1.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},t.prototype.getInstructionName=function(e){var r=e.search(Vae),n=r<0?e:e.substr(0,r);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},t.prototype.ondeclaration=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("!".concat(a),"!".concat(n))}this.startIndex=r+1},t.prototype.onprocessinginstruction=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("?".concat(a),"?".concat(n))}this.startIndex=r+1},t.prototype.oncomment=function(e,r,n){var a,s,o,u;this.endIndex=r,(s=(a=this.cbs).oncomment)===null||s===void 0||s.call(a,this.getSlice(e,r-n)),(u=(o=this.cbs).oncommentend)===null||u===void 0||u.call(o),this.startIndex=r+1},t.prototype.oncdata=function(e,r,n){var a,s,o,u,c,l,d,f,h,p;this.endIndex=r;var b=this.getSlice(e,r-n);!this.htmlMode||this.options.recognizeCDATA?((s=(a=this.cbs).oncdatastart)===null||s===void 0||s.call(a),(u=(o=this.cbs).ontext)===null||u===void 0||u.call(o,b),(l=(c=this.cbs).oncdataend)===null||l===void 0||l.call(c)):((f=(d=this.cbs).oncomment)===null||f===void 0||f.call(d,"[CDATA[".concat(b,"]]")),(p=(h=this.cbs).oncommentend)===null||p===void 0||p.call(h)),this.startIndex=r+1},t.prototype.onend=function(){var e,r;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var n=0;n=this.buffers[0].length;)this.shiftBuffer();for(var n=this.buffers[0].slice(e-this.bufferOffset,r-this.bufferOffset);r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,r-this.bufferOffset);return n},t.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},t.prototype.write=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".write() after done!"));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)},t.prototype.end=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".end() after done!"));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()},t.prototype.pause=function(){this.tokenizer.pause()},t.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{var d;a._read=()=>{};let s=1;function o(f){a.emit("data",f)}function u(f){a.emit("error",f)}function c(){--s===0&&a.push(null)}const l={baseIRI:((d=e.metadata)==null?void 0:d.baseIRI)??"",context:n,emit:o,end:c,error:u,headers:e.headers};Promise.all(this.busRdfParseHtml.publish(l)).then(async f=>{s+=f.length;const h=[];for(const b of f){const{htmlParseListener:_}=await b.actor.run(l);h.push(_)}const p=new Qae.Parser({onclosetag(){try{for(const b of h)b.onTagClose()}catch(b){u(b)}},onend(){try{for(const b of h)b.onEnd()}catch(b){u(b)}c()},onopentag(b,_){try{for(const E of h)E.onTagOpen(b,_)}catch(E){u(E)}},ontext(b){try{for(const _ of h)_.onText(b)}catch(_){u(_)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:!1});e.data.on("error",u).on("data",b=>p.write(b.toString())).on("end",()=>p.end())}).catch(u)},{data:a}}};Hm.ActorRdfParseHtml=zae;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Hm,t)})($F);var qF={},km={},Qm={},Gm={};Object.defineProperty(Gm,"__esModule",{value:!0});Gm.ActorRdfParseHtml=void 0;const Wae=et;class Xae extends Wae.Actor{constructor(e){super(e)}}Gm.ActorRdfParseHtml=Xae;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Gm,t)})(Qm);var VF={},HF={};Object.defineProperty(HF,"__esModule",{value:!0});var T0={};Object.defineProperty(T0,"__esModule",{value:!0});T0.ItemPropertyHandlerContent=void 0;class Kae{canHandle(e,r){return"content"in r}getObject(e,r,n){return r.createLiteral(e.content,n)}}T0.ItemPropertyHandlerContent=Kae;var E0={},Sl={};Object.defineProperty(Sl,"__esModule",{value:!0});Sl.Util=void 0;const Jae=ht,gN=Ra;let O0=class qh{constructor(e,r){this.dataFactory=e||new Jae.DataFactory,this.baseIRI=r||""}static isValidIri(e){return qh.IRI_REGEX.test(e)}createVocabIris(e,r,n){return e.split(/\s+/u).filter(a=>!!a).map(a=>{if(!qh.isValidIri(a)){if(!n)return;a=`${r.vocab||`${this.baseIRI}#`}${a}`}return this.dataFactory.namedNode(a)}).filter(a=>!!a)}getVocabularyExpansionType(e,r,n){const a=e.split(/\s+/u);if(a.includes("subPropertyOf")||a.includes("equivalentProperty"))return[this.dataFactory.namedNode(`${qh.RDF}type`)];if(r.vocab&&r.vocab in n&&n[r.vocab].properties){let s=[];for(const[o,u]of Object.entries(n[r.vocab].properties))a.includes(o)&&(s=[...Object.values(u).map(c=>this.dataFactory.namedNode(c))]);return s}return[]}createSubject(e){if(!qh.isValidIri(e))try{e=(0,gN.resolve)(e,this.baseIRI)}catch{return}return this.dataFactory.namedNode(e)}createLiteral(e,r){return this.dataFactory.literal(e,r.language)}deriveVocab(e,r){let n;for(const a in r)if(e.startsWith(a)){n=a,n.endsWith("/")||(n+="#");break}if(!n){const a=e.indexOf("#");a>0?n=e.slice(0,a+1):n=(0,gN.resolve)(".",e)}return n}};Sl.Util=O0;O0.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#";O0.XSD="http://www.w3.org/2001/XMLSchema#";O0.RDFA="http://www.w3.org/ns/rdfa#";O0.IRI_REGEX=/^([A-Za-z][\d+-.A-Za-z]*|_):[^ "<>[\\\]`{|}]*$/u;Object.defineProperty(E0,"__esModule",{value:!0});E0.ItemPropertyHandlerNumber=void 0;const mN=Sl;class Yae{constructor(e,r){this.tagName=e,this.attributeName=r}canHandle(e,r){return this.tagName===e&&this.attributeName in r}getObject(e,r,n){const a=e[this.attributeName];let s;return!Number.isNaN(Number.parseInt(a,10))&&!a.includes(".")?s=`${mN.Util.XSD}integer`:Number.isNaN(Number.parseFloat(a))||(s=`${mN.Util.XSD}double`),r.dataFactory.literal(a,s&&r.dataFactory.namedNode(s))}}E0.ItemPropertyHandlerNumber=Yae;var A0={};Object.defineProperty(A0,"__esModule",{value:!0});A0.ItemPropertyHandlerTime=void 0;const Zae=Sl;class zm{canHandle(e,r){return e==="time"&&"datetime"in r}getObject(e,r,n){const a=e.datetime;let s;for(const o of zm.TIME_REGEXES)if(o.regex.test(a)){s=r.dataFactory.namedNode(Zae.Util.XSD+o.type);break}return r.dataFactory.literal(a,s)}}A0.ItemPropertyHandlerTime=zm;zm.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"}];var R0={};Object.defineProperty(R0,"__esModule",{value:!0});R0.ItemPropertyHandlerUrl=void 0;const ese=Ra;class tse{constructor(e,r){this.tagName=e,this.attributeName=r}canHandle(e,r){return this.tagName===e&&this.attributeName in r}getObject(e,r,n){return r.dataFactory.namedNode((0,ese.resolve)(e[this.attributeName],r.baseIRI))}}R0.ItemPropertyHandlerUrl=tse;var kF={};Object.defineProperty(kF,"__esModule",{value:!0});var QF={};Object.defineProperty(QF,"__esModule",{value:!0});var GF={};Object.defineProperty(GF,"__esModule",{value:!0});var Wm={},zF={},Ep={},xR={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var e=Ho,r;(function(h){h[h.Tab=9]="Tab",h[h.NewLine=10]="NewLine",h[h.FormFeed=12]="FormFeed",h[h.CarriageReturn=13]="CarriageReturn",h[h.Space=32]="Space",h[h.ExclamationMark=33]="ExclamationMark",h[h.Number=35]="Number",h[h.Amp=38]="Amp",h[h.SingleQuote=39]="SingleQuote",h[h.DoubleQuote=34]="DoubleQuote",h[h.Dash=45]="Dash",h[h.Slash=47]="Slash",h[h.Zero=48]="Zero",h[h.Nine=57]="Nine",h[h.Semi=59]="Semi",h[h.Lt=60]="Lt",h[h.Eq=61]="Eq",h[h.Gt=62]="Gt",h[h.Questionmark=63]="Questionmark",h[h.UpperA=65]="UpperA",h[h.LowerA=97]="LowerA",h[h.UpperF=70]="UpperF",h[h.LowerF=102]="LowerF",h[h.UpperZ=90]="UpperZ",h[h.LowerZ=122]="LowerZ",h[h.LowerX=120]="LowerX",h[h.OpeningSquareBracket=91]="OpeningSquareBracket"})(r||(r={}));var n;(function(h){h[h.Text=1]="Text",h[h.BeforeTagName=2]="BeforeTagName",h[h.InTagName=3]="InTagName",h[h.InSelfClosingTag=4]="InSelfClosingTag",h[h.BeforeClosingTagName=5]="BeforeClosingTagName",h[h.InClosingTagName=6]="InClosingTagName",h[h.AfterClosingTagName=7]="AfterClosingTagName",h[h.BeforeAttributeName=8]="BeforeAttributeName",h[h.InAttributeName=9]="InAttributeName",h[h.AfterAttributeName=10]="AfterAttributeName",h[h.BeforeAttributeValue=11]="BeforeAttributeValue",h[h.InAttributeValueDq=12]="InAttributeValueDq",h[h.InAttributeValueSq=13]="InAttributeValueSq",h[h.InAttributeValueNq=14]="InAttributeValueNq",h[h.BeforeDeclaration=15]="BeforeDeclaration",h[h.InDeclaration=16]="InDeclaration",h[h.InProcessingInstruction=17]="InProcessingInstruction",h[h.BeforeComment=18]="BeforeComment",h[h.CDATASequence=19]="CDATASequence",h[h.InSpecialComment=20]="InSpecialComment",h[h.InCommentLike=21]="InCommentLike",h[h.BeforeSpecialS=22]="BeforeSpecialS",h[h.SpecialStartSequence=23]="SpecialStartSequence",h[h.InSpecialTag=24]="InSpecialTag",h[h.BeforeEntity=25]="BeforeEntity",h[h.BeforeNumericEntity=26]="BeforeNumericEntity",h[h.InNamedEntity=27]="InNamedEntity",h[h.InNumericEntity=28]="InNumericEntity",h[h.InHexEntity=29]="InHexEntity"})(n||(n={}));function a(h){return h===r.Space||h===r.NewLine||h===r.Tab||h===r.FormFeed||h===r.CarriageReturn}function s(h){return h===r.Slash||h===r.Gt||a(h)}function o(h){return h>=r.Zero&&h<=r.Nine}function u(h){return h>=r.LowerA&&h<=r.LowerZ||h>=r.UpperA&&h<=r.UpperZ}function c(h){return h>=r.UpperA&&h<=r.UpperF||h>=r.LowerA&&h<=r.LowerF}var l;(function(h){h[h.NoValue=0]="NoValue",h[h.Unquoted=1]="Unquoted",h[h.Single=2]="Single",h[h.Double=3]="Double"})(l=t.QuoteType||(t.QuoteType={}));var d={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])},f=function(){function h(p,b){var _=p.xmlMode,E=_===void 0?!1:_,w=p.decodeEntities,O=w===void 0?!0:w;this.cbs=b,this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.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=E,this.decodeEntities=O,this.entityTrie=E?e.xmlDecodeTree:e.htmlDecodeTree}return h.prototype.reset=function(){this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},h.prototype.write=function(p){this.offset+=this.buffer.length,this.buffer=p,this.parse()},h.prototype.end=function(){this.running&&this.finish()},h.prototype.pause=function(){this.running=!1},h.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=n.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&p===r.Amp&&(this.state=n.BeforeEntity)},h.prototype.stateSpecialStartSequence=function(p){var b=this.sequenceIndex===this.currentSequence.length,_=b?s(p):(p|32)===this.currentSequence[this.sequenceIndex];if(!_)this.isSpecial=!1;else if(!b){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=n.InTagName,this.stateInTagName(p)},h.prototype.stateInSpecialTag=function(p){if(this.sequenceIndex===this.currentSequence.length){if(p===r.Gt||a(p)){var b=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&p!==r.Semi)this.trieIndex+=_;else{var E=this.index-this.entityExcess+1;E>this.sectionStart&&this.emitPartial(this.sectionStart,E),this.entityResult=this.trieIndex,this.trieIndex+=_,this.entityExcess=0,this.sectionStart=this.index+1,_===0&&this.emitNamedEntity()}}},h.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var p=(this.entityTrie[this.entityResult]&e.BinTrieFlags.VALUE_LENGTH)>>14;switch(p){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~e.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])}}},h.prototype.stateBeforeNumericEntity=function(p){(p|32)===r.LowerX?(this.entityExcess++,this.state=n.InHexEntity):(this.state=n.InNumericEntity,this.stateInNumericEntity(p))},h.prototype.emitNumericEntity=function(p){var b=this.index-this.entityExcess-1,_=b+2+ +(this.state===n.InHexEntity);_!==this.index&&(b>this.sectionStart&&this.emitPartial(this.sectionStart,b),this.sectionStart=this.index+Number(p),this.emitCodePoint((0,e.replaceCodePoint)(this.entityResult))),this.state=this.baseState},h.prototype.stateInNumericEntity=function(p){p===r.Semi?this.emitNumericEntity(!0):o(p)?(this.entityResult=this.entityResult*10+(p-r.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},h.prototype.stateInHexEntity=function(p){p===r.Semi?this.emitNumericEntity(!0):o(p)?(this.entityResult=this.entityResult*16+(p-r.Zero),this.entityExcess++):c(p)?(this.entityResult=this.entityResult*16+((p|32)-r.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},h.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===n.Text||this.baseState===n.InSpecialTag)},h.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===n.Text||this.state===n.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===n.InAttributeValueDq||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},h.prototype.shouldContinue=function(){return this.index0&&o.has(this.stack[this.stack.length-1]);){var u=this.stack.pop();(n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,u,!0)}this.isVoidElement(e)||(this.stack.push(e),EN.has(e)?this.foreignContext.push(!0):ON.has(e)&&this.foreignContext.push(!1)),(s=(a=this.cbs).onopentagname)===null||s===void 0||s.call(a,e),this.cbs.onopentag&&(this.attribs={})},t.prototype.endOpenTag=function(e){var r,n;this.startIndex=this.openTagStart,this.attribs&&((n=(r=this.cbs).onopentag)===null||n===void 0||n.call(r,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},t.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},t.prototype.onclosetag=function(e,r){var n,a,s,o,u,c;this.endIndex=r;var l=this.getSlice(e,r);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(EN.has(l)||ON.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))!this.options.xmlMode&&l==="br"&&((a=(n=this.cbs).onopentagname)===null||a===void 0||a.call(n,"br"),(o=(s=this.cbs).onopentag)===null||o===void 0||o.call(s,"br",{},!0),(c=(u=this.cbs).onclosetag)===null||c===void 0||c.call(u,"br",!1));else{var d=this.stack.lastIndexOf(l);if(d!==-1)if(this.cbs.onclosetag)for(var f=this.stack.length-d;f--;)this.cbs.onclosetag(this.stack.pop(),f!==0);else this.stack.length=d;else!this.options.xmlMode&&l==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1},t.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)},t.prototype.closeCurrentTag=function(e){var r,n,a=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===a&&((n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,a,!e),this.stack.pop())},t.prototype.onattribname=function(e,r){this.startIndex=e;var n=this.getSlice(e,r);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n},t.prototype.onattribdata=function(e,r){this.attribvalue+=this.getSlice(e,r)},t.prototype.onattribentity=function(e){this.attribvalue+=(0,vN.fromCodePoint)(e)},t.prototype.onattribend=function(e,r){var n,a;this.endIndex=r,(a=(n=this.cbs).onattribute)===null||a===void 0||a.call(n,this.attribname,this.attribvalue,e===n1.QuoteType.Double?'"':e===n1.QuoteType.Single?"'":e===n1.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},t.prototype.getInstructionName=function(e){var r=e.search(ose),n=r<0?e:e.substr(0,r);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},t.prototype.ondeclaration=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("!".concat(a),"!".concat(n))}this.startIndex=r+1},t.prototype.onprocessinginstruction=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("?".concat(a),"?".concat(n))}this.startIndex=r+1},t.prototype.oncomment=function(e,r,n){var a,s,o,u;this.endIndex=r,(s=(a=this.cbs).oncomment)===null||s===void 0||s.call(a,this.getSlice(e,r-n)),(u=(o=this.cbs).oncommentend)===null||u===void 0||u.call(o),this.startIndex=r+1},t.prototype.oncdata=function(e,r,n){var a,s,o,u,c,l,d,f,h,p;this.endIndex=r;var b=this.getSlice(e,r-n);this.options.xmlMode||this.options.recognizeCDATA?((s=(a=this.cbs).oncdatastart)===null||s===void 0||s.call(a),(u=(o=this.cbs).ontext)===null||u===void 0||u.call(o,b),(l=(c=this.cbs).oncdataend)===null||l===void 0||l.call(c)):((f=(d=this.cbs).oncomment)===null||f===void 0||f.call(d,"[CDATA[".concat(b,"]]")),(p=(h=this.cbs).oncommentend)===null||p===void 0||p.call(h)),this.startIndex=r+1},t.prototype.onend=function(){var e,r;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n],!0));}(r=(e=this.cbs).onend)===null||r===void 0||r.call(e)},t.prototype.reset=function(){var e,r,n,a;(r=(e=this.cbs).onreset)===null||r===void 0||r.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(a=(n=this.cbs).onparserinit)===null||a===void 0||a.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},t.prototype.parseComplete=function(e){this.reset(),this.end(e)},t.prototype.getSlice=function(e,r){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var n=this.buffers[0].slice(e-this.bufferOffset,r-this.bufferOffset);r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,r-this.bufferOffset);return n},t.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},t.prototype.write=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".write() after done!"));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)},t.prototype.end=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".end() after done!"));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()},t.prototype.pause=function(){this.tokenizer.pause()},t.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndexn.emit("error",a)),e.on("data",a=>r.push(a)),e.on("end",()=>r.push(null));const n=r.pipe(new Op(this.options));return n}_transform(e,r,n){this.parser.write(e.toString()),n()}_flush(e){this.parser.end(),e()}getItemScope(e){let r=this.itemScopeStack.length-(e?2:1);for(;r>0&&!this.itemScopeStack[r];)r--;return this.itemScopeStack[r]}getDepth(){return this.itemScopeStack.length}onTagOpen(e,r){if(!this.isEmittingReferences){if("id"in r){const a=r.id;this.pendingItemRefsRangeCollecting[a]={events:[],counter:0,ids:[]}}for(const a of Object.values(this.pendingItemRefsRangeCollecting))a.counter++,a.events.push({type:"open",name:e,attributes:r})}this.textBufferStack.push(void 0);let n;if("itemscope"in r){let a;if(this.emittingReferencesItemScopeIdGenerator)a=this.emittingReferencesItemScopeIdGenerator();else{a="itemid"in r&&this.util.createSubject(r.itemid)||this.util.dataFactory.blankNode();for(const o of Object.values(this.pendingItemRefsRangeCollecting))o.ids.push(a)}n={subject:a},this.isEmittingReferences&&(n.blockEmission=!0);const s=this.getItemScope();s&&s.vocab&&(n.vocab=s.vocab),this.itemScopeStack.push(n)}else n=this.getItemScope(),this.itemScopeStack.push(void 0);if(n){if("itemtype"in r)for(const a of this.util.createVocabIris(r.itemtype,n,!1))n.vocab||(n.vocab=this.util.deriveVocab(a.value,this.vocabRegistry)),n.blockEmission||this.emitTriple(n.subject,this.util.dataFactory.namedNode(`${xN.Util.RDF}type`),a);if("lang"in r&&(n.language=r.lang),"xml:lang"in r&&(n.language=r["xml:lang"]),"itemscope"in r&&!this.isEmittingReferences&&"itemref"in r)for(const a of r.itemref.split(/\s+/u))a in this.pendingItemRefsDomain||(this.pendingItemRefsDomain[a]=[]),this.pendingItemRefsDomain[a].push(n),this.tryToEmitReferences(a,n)}"itemprop"in r&&this.handleItemProperties(r.itemprop,!1,n,e,r),"itemprop-reverse"in r&&this.handleItemProperties(r["itemprop-reverse"],!0,n,e,r)}onText(e){if(!this.isEmittingReferences)for(const r of Object.values(this.pendingItemRefsRangeCollecting))r.events.push({type:"text",data:e});for(const r of this.textBufferStack)r&&r.push(e)}onTagClose(){if(!this.isEmittingReferences)for(const[r,n]of Object.entries(this.pendingItemRefsRangeCollecting))n.counter--,n.events.push({type:"close"}),n.counter===0&&(this.pendingItemRefsRangeFinalized[r]=n,delete this.pendingItemRefsRangeCollecting[r],this.tryToEmitReferences(r));const e=this.getItemScope(!0);if(e){const r=this.getDepth();if(e.predicates&&r in e.predicates)for(const[n,a]of Object.entries(e.predicates[r])){const s=this.util.createLiteral(this.textBufferStack[r].join(""),e);this.emitPredicateTriples(e,a,s,n==="reverse"),delete e.predicates[r][n]}}this.itemScopeStack.pop(),this.textBufferStack.pop()}onEnd(){}initializeParser(e){return new lse.Parser({onclosetag:()=>{try{this.onTagClose(),this.htmlParseListener&&this.htmlParseListener.onTagClose()}catch(r){this.emit("error",r)}},onend:()=>{try{this.onEnd(),this.htmlParseListener&&this.htmlParseListener.onEnd()}catch(r){this.emit("error",r)}},onopentag:(r,n)=>{try{this.onTagOpen(r,n),this.htmlParseListener&&this.htmlParseListener.onTagOpen(r,n)}catch(a){this.emit("error",a)}},ontext:r=>{try{this.onText(r),this.htmlParseListener&&this.htmlParseListener.onText(r)}catch(n){this.emit("error",n)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:e})}handleItemProperties(e,r,n,a,s){const o=this.getItemScope(!0);if(o){const u=this.getDepth(),c=this.util.createVocabIris(e,o,!0);o.predicates||(o.predicates={}),o.predicates[u]||(o.predicates[u]={});const l=r?"reverse":"forward";o.predicates[u][l]=c;for(const d of this.util.getVocabularyExpansionType(e,o,this.vocabRegistry))c.push(d);if(n&&"itemscope"in s)this.emitPredicateTriples(o,c,n.subject,r),delete o.predicates[u][l];else for(const d of Op.ITEM_PROPERTY_HANDLERS)if(d.canHandle(a,s)){const f=d.getObject(s,this.util,o);this.emitPredicateTriples(o,c,f,r),delete o.predicates[u][l]}o.predicates[u][l]&&(this.textBufferStack[u]=[])}}emitPredicateTriples(e,r,n,a){if(!e.blockEmission)for(const s of r)a?n.termType!=="Literal"&&this.emitTriple(n,s,e.subject):this.emitTriple(e.subject,s,n)}emitTriple(e,r,n){this.push(this.util.dataFactory.quad(e,r,n,this.defaultGraph))}tryToEmitReferences(e,r){const n=this.pendingItemRefsRangeFinalized[e];if(n){let a;if(r){a=[r];const s=this.pendingItemRefsDomain[e].indexOf(r);this.pendingItemRefsDomain[e].splice(s,1)}else a=this.pendingItemRefsDomain[e],delete this.pendingItemRefsDomain[e];if(a){const s=this.itemScopeStack,o=this.textBufferStack;this.isEmittingReferences=!0;for(const u of a){this.itemScopeStack=[u],this.textBufferStack=[void 0];const c=[...n.ids];this.emittingReferencesItemScopeIdGenerator=()=>c.shift();for(const l of n.events)switch(l.type){case"open":this.onTagOpen(l.name,l.attributes);break;case"text":this.onText(l.data);break;case"close":this.onTagClose();break}}this.emittingReferencesItemScopeIdGenerator=void 0,this.itemScopeStack=s,this.textBufferStack=o,this.isEmittingReferences=!1}}}}Wm.MicrodataRdfParser=Op;Op.ITEM_PROPERTY_HANDLERS=[new dse.ItemPropertyHandlerContent,new Va.ItemPropertyHandlerUrl("a","href"),new Va.ItemPropertyHandlerUrl("area","href"),new Va.ItemPropertyHandlerUrl("audio","src"),new Va.ItemPropertyHandlerUrl("embed","src"),new Va.ItemPropertyHandlerUrl("iframe","src"),new Va.ItemPropertyHandlerUrl("img","src"),new Va.ItemPropertyHandlerUrl("link","href"),new Va.ItemPropertyHandlerUrl("object","data"),new Va.ItemPropertyHandlerUrl("source","src"),new Va.ItemPropertyHandlerUrl("track","src"),new Va.ItemPropertyHandlerUrl("video","src"),new RN.ItemPropertyHandlerNumber("data","value"),new RN.ItemPropertyHandlerNumber("meter","value"),new fse.ItemPropertyHandlerTime];(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(HF,t),r(T0,t),r(E0,t),r(A0,t),r(R0,t),r(kF,t),r(QF,t),r(GF,t),r(Wm,t),r(Sl,t)})(VF);Object.defineProperty(km,"__esModule",{value:!0});km.ActorRdfParseHtmlMicrodata=void 0;const pse=Qm,yse=VF;class bse extends pse.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const r=e.headers?e.headers.get("content-type"):null,n=r==null?void 0:r.includes("xml"),a=new yse.MicrodataRdfParser({baseIRI:e.baseIRI,xmlMode:n});a.on("error",e.error),a.on("data",e.emit);const s=a.onEnd;return a.onEnd=()=>{s.call(a),e.end()},{htmlParseListener:a}}}km.ActorRdfParseHtmlMicrodata=bse;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(km,t)})(qF);var WF={},Xm={};Object.defineProperty(Xm,"__esModule",{value:!0});Xm.ActorRdfParseHtmlRdfa=void 0;const _se=Qm,gse=_R;class mse extends _se.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const r=e.headers?e.headers.get("content-type"):null,n=(e.headers&&e.headers.get("content-language"))??void 0,a=r&&r.includes("xml")?"xhtml":"html",s=new gse.RdfaParser({baseIRI:e.baseIRI,profile:a,language:n});s.on("error",e.error),s.on("data",e.emit);const o=s.onEnd;return s.onEnd=()=>{o.call(s),e.end()},{htmlParseListener:s}}}Xm.ActorRdfParseHtmlRdfa=mse;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Xm,t)})(WF);var XF={},Km={},IR={},Jm={},Tl={},x0={};Object.defineProperty(x0,"__esModule",{value:!0});x0.ActorRdfResolveQuadPattern=void 0;const vse=et;class wse extends vse.Actor{constructor(e){super(e)}}x0.ActorRdfResolveQuadPattern=wse;var Ym={};Object.defineProperty(Ym,"__esModule",{value:!0});Ym.ActorRdfResolveQuadPatternSource=void 0;const Sse=x0;class Tse extends Sse.ActorRdfResolveQuadPattern{constructor(e){super(e)}async test(e){return!0}async run(e){const r=await this.getSource(e.context,e.pattern);return await this.getOutput(r,e.pattern,e.context)}async getOutput(e,r,n){return{data:e.match(r.subject,r.predicate,r.object,r.graph,n)}}}Ym.ActorRdfResolveQuadPatternSource=Tse;var Gr={};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.hasContextSingleSourceOfType=Gr.hasContextSingleSource=Gr.getContextSourceUrl=Gr.getContextSourceFirst=Gr.getContextSource=Gr.getContextSources=Gr.getDataSourceContext=Gr.getDataSourceValue=Gr.getDataSourceType=Gr.isDataSourceRawType=void 0;const ep=rr,Ese=et;function Zm(t){return typeof t=="string"||"match"in t}Gr.isDataSourceRawType=Zm;function KF(t){return typeof t=="string"?"":"match"in t?"rdfjsSource":t.type}Gr.getDataSourceType=KF;function PR(t){return Zm(t)?t:t.value}Gr.getDataSourceValue=PR;function Ose(t,e){return Zm(t)||!t.context?e:e.merge(Ese.ActionContext.ensureActionContext(t.context))}Gr.getDataSourceContext=Ose;function Ase(t){return t.get(ep.KeysRdfResolveQuadPattern.sources)}Gr.getContextSources=Ase;function DR(t){return t.get(ep.KeysRdfResolveQuadPattern.source)}Gr.getContextSource=DR;function Rse(t){if(t.has(ep.KeysRdfResolveQuadPattern.source))return t.get(ep.KeysRdfResolveQuadPattern.source);const e=t.get(ep.KeysRdfResolveQuadPattern.sources);if((e==null?void 0:e.length)===1)return e[0]}Gr.getContextSourceFirst=Rse;function xse(t){if(t){let e=PR(t);if(typeof e=="string"){const r=e.indexOf("#");return r>=0&&(e=e.slice(0,r)),e}}}Gr.getContextSourceUrl=xse;function Ise(t){const e=DR(t);return!!(e&&(Zm(e)||e.value))}Gr.hasContextSingleSource=Ise;function Pse(t,e){const r=DR(e);return!!(r&&KF(r)===t&&PR(r))}Gr.hasContextSingleSourceOfType=Pse;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(x0,t),r(Ym,t),r(Gr,t)})(Tl);var I0={},Hi={},ev={};Object.defineProperty(ev,"__esModule",{value:!0});ev.MetadataValidationState=void 0;class Dse{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()}}}ev.MetadataValidationState=Dse;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(ev,t)})(Hi);Object.defineProperty(I0,"__esModule",{value:!0});I0.RdfJsQuadSource=void 0;const Nse=Hi,Cse=Ut,jse=ht,Wl=An,IN=new jse.DataFactory;class hi{constructor(e){this.source=e}static nullifyVariables(e,r){return!e||e.termType==="Variable"||!r&&e.termType==="Quad"&&(0,Wl.someTermsNested)(e,n=>n.termType==="Variable")?void 0:e}static hasDuplicateVariables(e){const r=(0,Wl.filterTermsNested)(e,n=>n.termType==="Variable");return r.length>1&&(0,Wl.uniqTerms)(r).lengthd.termType==="Quad")&&(u=u.filter(d=>(0,Wl.matchPatternComplete)(d,c))),this.setMetadata(u,e,r,n,a).catch(d=>u.destroy(d)),u}async setMetadata(e,r,n,a,s){var d;const o=!!((d=this.source.features)!=null&&d.quotedTripleFiltering);let u;if(this.source.countQuads)u=await this.source.countQuads(hi.nullifyVariables(r,o),hi.nullifyVariables(n,o),hi.nullifyVariables(a,o),hi.nullifyVariables(s,o));else{let f=0;u=await new Promise((h,p)=>{const b=this.source.match(hi.nullifyVariables(r,o),hi.nullifyVariables(n,o),hi.nullifyVariables(a,o),hi.nullifyVariables(s,o));b.on("error",p),b.on("end",()=>h(f)),b.on("data",()=>f++)})}const c=IN.quad(r,n,a,s),l=!o&&(0,Wl.someTerms)(c,f=>f.termType==="Quad")||hi.hasDuplicateVariables(c);e.setProperty("metadata",{state:new Nse.MetadataValidationState,cardinality:{type:l?"estimate":"exact",value:u},canContainUndefs:!1})}}I0.RdfJsQuadSource=hi;Object.defineProperty(Jm,"__esModule",{value:!0});Jm.ActorRdfResolveQuadPatternRdfJsSource=void 0;const i1=Tl,Mse=I0;class Fse extends i1.ActorRdfResolveQuadPatternSource{constructor(e){super(e)}async test(e){if(!(0,i1.hasContextSingleSourceOfType)("rdfjsSource",e.context))throw new Error(`${this.name} requires a single source with an rdfjsSource to be present in the context.`);const r=(0,i1.getContextSource)(e.context);if(!r||typeof r=="string"||!("match"in r)&&!r.value.match)throw new Error(`${this.name} received an invalid rdfjsSource.`);return!0}async getSource(e){const r=(0,i1.getContextSource)(e);return new Mse.RdfJsQuadSource("match"in r?r:r.value)}}Jm.ActorRdfResolveQuadPatternRdfJsSource=Fse;var JF={};Object.defineProperty(JF,"__esModule",{value:!0});(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Jm,t),r(JF,t),r(I0,t)})(IR);var tv={},rv={};Object.defineProperty(rv,"__esModule",{value:!0});rv.ActorRdfResolveHypermedia=void 0;const Lse=et;class Bse extends Lse.Actor{constructor(e,r){super(e),this.sourceType=r}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)}}rv.ActorRdfResolveHypermedia=Bse;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(rv,t)})(tv);var P0={},YF={},Jf={},Yf={},D0={};Object.defineProperty(D0,"__esModule",{value:!0});D0.TermDictionaryNumberRecordFullTerms=void 0;const $se=ht,PN=nr;class Use{constructor(e=new $se.DataFactory){this.lastId=0,this.dictionary={},this.reverseDictionary={},this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const r=(0,PN.termToString)(e);let n=this.dictionary[r];return n===void 0&&(n=this.lastId++,this.dictionary[r]=n,this.reverseDictionary[n]=e),n}encodeOptional(e){const r=(0,PN.termToString)(e);return this.dictionary[r]}decode(e){const r=this.reverseDictionary[e];if(r===void 0)throw new Error(`The value ${e} is not present in this dictionary`);return r}*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")}}D0.TermDictionaryNumberRecordFullTerms=Use;var N0={},Nf={},ds={};(function(t){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 e=An;t.QUAD_TERM_NAMES_INVERSE=Object.fromEntries(e.QUAD_TERM_NAMES.map((l,d)=>[l,d]));function r(l,d){if(l.length===1||d.every(p=>p!==void 0))return 0;const f=[];for(let p=0;p({score:n(p,f),index:b})).sort((p,b)=>b.score-p.score)[0].index}t.getBestIndex=r;function n(l,d){return l.map((f,h)=>d.includes(f)?l.length-h:0).reduce((f,h)=>f+h,0)}t.getComponentOrderScore=n;function a(l,d){return l.map(f=>{const h=t.QUAD_TERM_NAMES_INVERSE[f];return d[h]})}t.orderQuadComponents=a;function s(l,d){const f=l.map(h=>{if(h){if(h.termType==="Quad"&&u(h))return;const p=d.encodeOptional(h);return p===void 0?"none":p}return h});if(!f.includes("none"))return f}t.encodeOptionalTerms=s;function o(l,d,f,h,p){let b=!1;return[[l||void 0,d||void 0,f||void 0,h||void 0].map(E=>{if(E){if(E.termType==="Variable")return;if(E.termType==="Quad"){if(p)return E;b=!0;return}}return E}),b]}t.quadToPattern=o;function u(l){for(const d of e.QUAD_TERM_NAMES){const f=l[d];if(f.termType==="Variable"||f.termType==="Quad"&&u(f))return!0}return!1}t.quadHasVariables=u;function c(l){return l.map(d=>(d==null?void 0:d.termType)==="Quad"&&u(d))}t.arePatternsQuoted=c})(ds);Object.defineProperty(Nf,"__esModule",{value:!0});Nf.RdfStoreIndexNestedMap=void 0;const YS=ds;class qse{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedMap=new Map}set(e,r){const n=this.nestedMap;let a=n.get(e[0]);a||(a=new Map,n.set(e[0],a));let s=a.get(e[1]);s||(s=new Map,a.set(e[1],s));let o=s.get(e[2]);o||(o=new Map,s.set(e[2],o));const u=o.has(e[3]);return u||o.set(e[3],r),!u}remove(e){const r=this.nestedMap,n=r.get(e[0]);if(!n)return!1;const a=n.get(e[1]);if(!a)return!1;const s=a.get(e[2]);if(!s)return!1;const o=s.delete(e[3]);return o&&s.size===0&&(a.delete(e[2]),a.size===0&&(n.delete(e[1]),n.size===0&&r.delete(e[0]))),o}get(e){const r=(0,YS.encodeOptionalTerms)(e,this.dictionary);if(!(!r||r.includes(void 0)))return this.getEncoded(r)}getEncoded(e){const r=this.nestedMap.get(e[0]);if(!r)return;const n=r.get(e[1]);if(!n)return;const a=n.get(e[2]);if(a)return a.get(e[3])}*find(e){const r=(0,YS.encodeOptionalTerms)(e,this.dictionary);if(!r)return;const[n,a,s,o]=r,[u,c,l,d]=e;let f,h,p,b,_,E,w;const O=this.nestedMap,A=n!==void 0?O.has(n)?[n]:[]:O.keys();for(const T of A){_=O.get(T),f=u||this.dictionary.decode(T);const I=a!==void 0?_.has(a)?[a]:[]:_.keys();for(const D of I){E=_.get(D),h=c||this.dictionary.decode(D);const U=s!==void 0?E.has(s)?[s]:[]:E.keys();for(const H of U){w=E.get(H),p=l||this.dictionary.decode(H);const N=o!==void 0?w.has(o)?[o]:[]:w.keys();for(const x of N)b=d||this.dictionary.decode(x),yield[f,h,p,b]}}}}*findEncoded(e,r){const[n,a,s,o]=e;let u,c,l;const d=this.nestedMap,f=n!==void 0?d.has(n)?[n]:[]:d.keys();for(const h of f){u=d.get(h);const p=a!==void 0?u.has(a)?[a]:[]:u.keys();for(const b of p){c=u.get(b);const _=s!==void 0?c.has(s)?[s]:[]:c.keys();for(const E of _){l=c.get(E);const w=o!==void 0?l.has(o)?[o]:[]:l.keys();for(const O of w)yield[h,b,E,O]}}}}count(e){let r=0;const n=(0,YS.encodeOptionalTerms)(e,this.dictionary);if(!n)return 0;const a=n[0],s=n[1],o=n[2],u=n[3];let c,l,d;const f=this.nestedMap,h=a!==void 0?f.has(a)?[a]:[]:f.keys();for(const p of h){c=f.get(p);const b=s!==void 0?c.has(s)?[s]:[]:c.keys();for(const _ of b){l=c.get(_);const E=o!==void 0?l.has(o)?[o]:[]:l.keys();for(const w of E)d=l.get(w),u!==void 0?d.has(u)&&r++:r+=d.size}}return r}}Nf.RdfStoreIndexNestedMap=qse;Object.defineProperty(N0,"__esModule",{value:!0});N0.TermDictionaryQuotedIndexed=void 0;const Vse=ht,ZS=Nf,DN=ds;class ka{constructor(e,r=new Vse.DataFactory){this.quotedTriplesDictionary=[],this.features={quotedTriples:!0},this.plainTermDictionary=e;const n={indexCombinations:[],indexConstructor:void 0,dictionary:this,dataFactory:r};this.quotedTriplesReverseDictionaries=[new ZS.RdfStoreIndexNestedMap(n),new ZS.RdfStoreIndexNestedMap(n),new ZS.RdfStoreIndexNestedMap(n)],this.dataFactory=r}encode(e){return e.termType==="Quad"?this.encodeQuotedTriple(e,!1):this.plainTermDictionary.encode(e)}encodeQuotedTriple(e,r){if(e.graph.termType!=="DefaultGraph")throw new Error("Encoding of quoted quads outside of the default graph is not allowed");const n=(0,DN.encodeOptionalTerms)([e.subject,e.predicate,e.object,e.graph],this),a=n&&n.every(c=>c!==void 0)?this.quotedTriplesReverseDictionaries[0].getEncoded(n):void 0;if(a!==void 0||r)return a===void 0?void 0:ka.BITMASK|a;const s=[this.encode(e.subject),this.encode(e.predicate),this.encode(e.object)],o=this.quotedTriplesDictionary.length+1;this.quotedTriplesDictionary.push(s);const u=this.encode(this.dataFactory.defaultGraph());return this.quotedTriplesReverseDictionaries[0].set([s[0],s[1],s[2],u],o),this.quotedTriplesReverseDictionaries[1].set([s[1],s[2],s[0],u],o),this.quotedTriplesReverseDictionaries[2].set([s[2],s[0],s[1],u],o),ka.BITMASK|o}encodeOptional(e){return e.termType==="Quad"?this.encodeQuotedTriple(e,!0):this.plainTermDictionary.encodeOptional(e)}decode(e){if(ka.BITMASK&e){const r=(~ka.BITMASK&e)-1;if(r>=this.quotedTriplesDictionary.length)throw new Error(`The value ${e} is not present in the quoted triples range of the dictionary`);const n=this.quotedTriplesDictionary[r];return this.dataFactory.quad(this.decode(n[0]),this.decode(n[1]),this.decode(n[2]))}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.keys())yield ka.BITMASK|1+e}*findQuotedTriples(e){for(const r of this.findQuotedTriplesEncoded(e))yield this.decode(r)}*findQuotedTriplesEncoded(e){const[r,n]=(0,DN.quadToPattern)(e.subject,e.predicate,e.object,e.graph,!0);for(const a of this.patternToIterable(r[0]))for(const s of this.patternToIterable(r[1]))for(const o of this.patternToIterable(r[2]))for(const u of this.patternToIterable(r[3]))if(a&&s||!s&&!o){const c=[a,s,o,u];for(const l of this.quotedTriplesReverseDictionaries[0].findEncoded(c,r))yield ka.BITMASK|this.quotedTriplesReverseDictionaries[0].getEncoded(l)}else if(!a&&s){const c=[s,o,a,u];for(const l of this.quotedTriplesReverseDictionaries[1].findEncoded(c,r))yield ka.BITMASK|this.quotedTriplesReverseDictionaries[1].getEncoded(l)}else{const c=[o,a,s,u];for(const l of this.quotedTriplesReverseDictionaries[2].findEncoded(c,r))yield ka.BITMASK|this.quotedTriplesReverseDictionaries[2].getEncoded(l)}}*patternToIterable(e){if((e==null?void 0:e.termType)==="Quad"){yield*this.findQuotedTriplesEncoded(e);return}if(e===void 0){yield void 0;return}const r=this.encodeOptional(e);r!==void 0&&(yield r)}}ka.BITMASK=1<<31;N0.TermDictionaryQuotedIndexed=ka;var C0={};Object.defineProperty(C0,"__esModule",{value:!0});C0.RdfStoreIndexNestedMapQuoted=void 0;const Zf=ds,Hse=Nf;class kse extends Hse.RdfStoreIndexNestedMap{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*getQuotedPatternKeys(e,r){for(const n of this.dictionary.findQuotedTriplesEncoded(r))e.has(n)&&(yield n)}*find(e){const r=(0,Zf.encodeOptionalTerms)(e,this.dictionary);if(!r)return;const[n,a,s,o]=r,[u,c,l,d]=e,[f,h,p,b]=(0,Zf.arePatternsQuoted)(e);let _,E,w,O,A,T,I;const D=this.nestedMap,U=u!==void 0?f?this.getQuotedPatternKeys(D,u):D.has(n)?[n]:[]:D.keys();for(const H of U){A=D.get(H),_=!f&&u?u:this.dictionary.decode(H);const N=c!==void 0?h?this.getQuotedPatternKeys(A,c):A.has(a)?[a]:[]:A.keys();for(const x of N){T=A.get(x),E=!h&&c?c:this.dictionary.decode(x);const F=l!==void 0?p?this.getQuotedPatternKeys(T,l):T.has(s)?[s]:[]:T.keys();for(const X of F){I=T.get(X),w=!p&&l?l:this.dictionary.decode(X);const ne=d!==void 0?b?this.getQuotedPatternKeys(I,d):I.has(o)?[o]:[]:I.keys();for(const $ of ne)O=!b&&d?d:this.dictionary.decode($),yield[_,E,w,O]}}}}*findEncoded(e,r){const[n,a,s,o]=e,[u,c,l,d]=r,[f,h,p,b]=(0,Zf.arePatternsQuoted)(r);let _,E,w;const O=this.nestedMap,A=u!==void 0?f?this.getQuotedPatternKeys(O,u):O.has(n)?[n]:[]:O.keys();for(const T of A){_=O.get(T);const I=c!==void 0?h?this.getQuotedPatternKeys(_,c):_.has(a)?[a]:[]:_.keys();for(const D of I){E=_.get(D);const U=l!==void 0?p?this.getQuotedPatternKeys(E,l):E.has(s)?[s]:[]:E.keys();for(const H of U){w=E.get(H);const N=d!==void 0?b?this.getQuotedPatternKeys(w,d):w.has(o)?[o]:[]:w.keys();for(const x of N)yield[Number.parseInt(T,10),Number.parseInt(D,10),Number.parseInt(H,10),Number.parseInt(x,10)]}}}}count(e){let r=0;const n=(0,Zf.encodeOptionalTerms)(e,this.dictionary);if(!n)return 0;const[a,s,o,u]=n,[c,l,d,f]=e,[h,p,b,_]=(0,Zf.arePatternsQuoted)(e);let E,w,O;const A=this.nestedMap,T=c!==void 0?h?this.getQuotedPatternKeys(A,c):A.has(a)?[a]:[]:A.keys();for(const I of T){E=A.get(I);const D=l!==void 0?p?this.getQuotedPatternKeys(E,l):E.has(s)?[s]:[]:E.keys();for(const U of D){w=E.get(U);const H=d!==void 0?b?this.getQuotedPatternKeys(w,d):w.has(o)?[o]:[]:w.keys();for(const N of H)O=w.get(N),f!==void 0?_?r+=[...this.getQuotedPatternKeys(O,f)].length:O.has(u)&&r++:r+=O.size}}return r}}C0.RdfStoreIndexNestedMapQuoted=kse;var NN;function ZF(){if(NN)return Yf;NN=1,Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.RdfStore=void 0;const t=Ut,e=ht,r=An,n=t7(),a=D0,s=N0,o=C0,u=ds;let c=class Vh{constructor(d){this.features={quotedTripleFiltering:!0},this._size=0,this.options=d,this.dataFactory=d.dataFactory,this.dictionary=d.dictionary,this.indexesWrapped=Vh.constructIndexesWrapped(d),this.indexesWrappedComponentOrders=this.indexesWrapped.map(f=>f.componentOrder)}static createDefault(){return new Vh({indexCombinations:Vh.DEFAULT_INDEX_COMBINATIONS,indexConstructor:d=>new o.RdfStoreIndexNestedMapQuoted(d),dictionary:new s.TermDictionaryQuotedIndexed(new a.TermDictionaryNumberRecordFullTerms),dataFactory:new e.DataFactory})}static constructIndexesWrapped(d){const f=[];if(d.indexCombinations.length===0)throw new Error("At least one index combination is required");for(const h of d.indexCombinations){if(!Vh.isCombinationValid(h))throw new Error(`Invalid index combination: ${h}`);f.push({index:d.indexConstructor(d),componentOrder:h,componentOrderInverse:Object.fromEntries(h.map((p,b)=>[p,b]))})}return f}static isCombinationValid(d){for(const f of r.QUAD_TERM_NAMES)if(!d.includes(f))return!1;return d.length===4}get size(){return this._size}addQuad(d){const f=[this.dictionary.encode(d.subject),this.dictionary.encode(d.predicate),this.dictionary.encode(d.object),this.dictionary.encode(d.graph)];let h=!1;for(const p of this.indexesWrapped)h=p.index.set((0,u.orderQuadComponents)(p.componentOrder,f),!0);return h?(this._size++,!0):!1}removeQuad(d){const f=[this.dictionary.encodeOptional(d.subject),this.dictionary.encodeOptional(d.predicate),this.dictionary.encodeOptional(d.object),this.dictionary.encodeOptional(d.graph)];if(f.includes(void 0))return!1;let h=!1;for(const p of this.indexesWrapped)if(h=p.index.remove((0,u.orderQuadComponents)(p.componentOrder,f)),!h)break;return h?(this._size--,!0):!1}remove(d){return d.on("data",f=>this.removeQuad(f)),d}removeMatches(d,f,h,p){return this.remove(this.match(d,f,h,p))}deleteGraph(d){return typeof d=="string"&&(d=this.dataFactory.namedNode(d)),this.removeMatches(void 0,void 0,void 0,d)}import(d){return d.on("data",f=>this.addQuad(f)),d}*readQuads(d,f,h,p){const b=!!this.dictionary.features.quotedTriples&&Object.values(this.indexesWrapped).every(A=>A.index.features.quotedTripleFiltering),[_,E]=(0,u.quadToPattern)(d,f,h,p,b),w=this.indexesWrapped[(0,u.getBestIndex)(this.indexesWrappedComponentOrders,_)],O=(0,u.orderQuadComponents)(w.componentOrder,_);for(const A of w.index.find(O)){const T=this.dataFactory.quad(A[w.componentOrderInverse.subject],A[w.componentOrderInverse.predicate],A[w.componentOrderInverse.object],A[w.componentOrderInverse.graph]);E?(0,r.matchPattern)(T,d,f,h,p)&&(yield T):yield T}}getQuads(d,f,h,p){return[...this.readQuads(d,f,h,p)]}match(d,f,h,p){return(0,t.wrap)(this.readQuads(d,f,h,p))}countQuads(d,f,h,p){const b=!!this.dictionary.features.quotedTriples&&Object.values(this.indexesWrapped).every(O=>O.index.features.quotedTripleFiltering),[_]=(0,u.quadToPattern)(d,f,h,p,b);if(_.every(O=>O===void 0))return this.size;const E=this.indexesWrapped[(0,u.getBestIndex)(this.indexesWrappedComponentOrders,_)],w=(0,u.orderQuadComponents)(E.componentOrder,_);return E.index.count(w)}asDataset(){return new n.DatasetCoreWrapper(this)}};return c.DEFAULT_INDEX_COMBINATIONS=[["graph","subject","predicate","object"],["graph","predicate","object","subject"],["graph","object","subject","predicate"]],Yf.RdfStore=c,Yf}var CN;function t7(){if(CN)return Jf;CN=1,Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.DatasetCoreWrapper=void 0;const t=ZF();let e=class e7{constructor(n){this.store=n}get size(){return this.store.size}add(n){return this.store.addQuad(n),this}delete(n){return this.store.removeQuad(n),this}has(n){for(const a of this.store.readQuads(n.subject,n.predicate,n.object,n.graph))return!0;return!1}match(n,a,s,o){const u=new t.RdfStore(this.store.options);for(const c of this.store.readQuads(n,a,s,o))u.addQuad(c);return new e7(u)}[Symbol.iterator](){return this.store.readQuads()}};return Jf.DatasetCoreWrapper=e,Jf}var r7={};Object.defineProperty(r7,"__esModule",{value:!0});var nv={};Object.defineProperty(nv,"__esModule",{value:!0});nv.TermDictionaryNumberMap=void 0;const Qse=ht,eT=nr;class Gse{constructor(e=new Qse.DataFactory){this.lastId=0,this.dictionary=new Map,this.reverseDictionary=new Map,this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const r=(0,eT.termToString)(e);let n=this.dictionary.get(r);return n===void 0&&(n=this.lastId++,this.dictionary.set(r,n),this.reverseDictionary.set(n,r)),n}encodeOptional(e){const r=(0,eT.termToString)(e);return this.dictionary.get(r)}decode(e){const r=this.reverseDictionary.get(e);if(r===void 0)throw new Error(`The value ${e} is not present in this dictionary`);return(0,eT.stringToTerm)(r,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")}}nv.TermDictionaryNumberMap=Gse;var iv={};Object.defineProperty(iv,"__esModule",{value:!0});iv.TermDictionaryNumberRecord=void 0;const zse=ht,tT=nr;class Wse{constructor(e=new zse.DataFactory){this.lastId=0,this.dictionary={},this.reverseDictionary={},this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const r=(0,tT.termToString)(e);let n=this.dictionary[r];return n===void 0&&(n=this.lastId++,this.dictionary[r]=n,this.reverseDictionary[n]=r),n}encodeOptional(e){const r=(0,tT.termToString)(e);return this.dictionary[r]}decode(e){const r=this.reverseDictionary[e];if(r===void 0)throw new Error(`The value ${e} is not present in this dictionary`);return(0,tT.stringToTerm)(r,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")}}iv.TermDictionaryNumberRecord=Wse;var av={};Object.defineProperty(av,"__esModule",{value:!0});av.TermDictionaryQuoted=void 0;const Xse=ht,Kse=An;class So{constructor(e,r,n=new Xse.DataFactory){this.features={quotedTriples:!0},this.plainTermDictionary=e,this.quotedTriplesDictionary=r,this.dataFactory=n}encode(e){return e.termType==="Quad"?So.BITMASK|1+this.quotedTriplesDictionary.encode(e):this.plainTermDictionary.encode(e)}encodeOptional(e){if(e.termType==="Quad"){const r=this.quotedTriplesDictionary.encodeOptional(e);return r===void 0?r:So.BITMASK|1+r}return this.plainTermDictionary.encodeOptional(e)}decode(e){if(So.BITMASK&e){const r=(~So.BITMASK&e)-1;return this.quotedTriplesDictionary.decode(r)}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.encodings())yield So.BITMASK|1+e}*findQuotedTriples(e){for(const r of this.findQuotedTriplesEncoded(e))yield this.decode(r)}*findQuotedTriplesEncoded(e){for(let r of this.quotedTriplesDictionary.encodings()){r=So.BITMASK|1+r;const n=this.decode(r);(0,Kse.matchPattern)(n,e.subject,e.predicate,e.object,e.graph)&&(yield r)}}}So.BITMASK=1<<31;av.TermDictionaryQuoted=So;var sv={};Object.defineProperty(sv,"__esModule",{value:!0});sv.TermDictionaryQuotedReferential=void 0;const Jse=ht,Yse=An,Zse=ds;class _a{constructor(e,r=new Jse.DataFactory){this.quotedTriplesDictionary=[],this.quotedTriplesReverseDictionary={},this.features={quotedTriples:!0},this.plainTermDictionary=e,this.dataFactory=r}encode(e){return e.termType==="Quad"?this.encodeQuotedTriple(e,!1):this.plainTermDictionary.encode(e)}encodeQuotedTriple(e,r){var n;if(e.graph.termType!=="DefaultGraph")throw new Error("Encoding of quoted quads outside of the default graph is not allowed");const a=(n=(0,Zse.encodeOptionalTerms)([e.subject,e.predicate,e.object,void 0],this))===null||n===void 0?void 0:n.slice(0,3),s=a&&a.every(c=>c!==void 0)?this.quotedTriplesReverseDictionary[a.join(_a.SEPARATOR)]:void 0;if(s!==void 0||r)return s===void 0?void 0:_a.BITMASK|s;const o=[this.encode(e.subject),this.encode(e.predicate),this.encode(e.object)],u=this.quotedTriplesDictionary.length+1;return this.quotedTriplesDictionary.push(o),this.quotedTriplesReverseDictionary[o.join(_a.SEPARATOR)]=u,_a.BITMASK|u}encodeOptional(e){return e.termType==="Quad"?this.encodeQuotedTriple(e,!0):this.plainTermDictionary.encodeOptional(e)}decode(e){if(_a.BITMASK&e){const r=(~_a.BITMASK&e)-1;if(r>=this.quotedTriplesDictionary.length)throw new Error(`The value ${e} is not present in the quoted triples range of the dictionary`);const n=this.quotedTriplesDictionary[r];return this.dataFactory.quad(this.decode(n[0]),this.decode(n[1]),this.decode(n[2]))}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.keys())yield _a.BITMASK|1+e}*findQuotedTriples(e){for(const r of this.findQuotedTriplesEncoded(e))yield this.decode(r)}*findQuotedTriplesEncoded(e){for(let r of this.quotedTriplesDictionary.keys()){r=_a.BITMASK|1+r;const n=this.decode(r);(0,Yse.matchPattern)(n,e.subject,e.predicate,e.object,e.graph)&&(yield r)}}}_a.BITMASK=1<<31;_a.SEPARATOR="_";sv.TermDictionaryQuotedReferential=_a;var ov={};Object.defineProperty(ov,"__esModule",{value:!0});ov.TermDictionarySymbol=void 0;const eoe=ht,jN=nr;class toe{constructor(e=new eoe.DataFactory){this.features={quotedTriples:!1},this.dataFactory=e}encode(e){return Symbol.for(`rdf::${(0,jN.termToString)(e)}`)}encodeOptional(e){return this.encode(e)}decode(e){const r=Symbol.keyFor(e);if(r===void 0)throw new Error(`The value ${String(e)} is not present in this dictionary`);return(0,jN.stringToTerm)(r.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")}}ov.TermDictionarySymbol=toe;var n7={};Object.defineProperty(n7,"__esModule",{value:!0});var j0={};Object.defineProperty(j0,"__esModule",{value:!0});j0.RdfStoreIndexNestedMapRecursive=void 0;const MN=ds;class roe{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedMap=new Map}set(e,r){let n=this.nestedMap,a=!1;for(const[s,o]of e.entries()){const u=n;let c=u.get(o);c?s===e.length-1&&(a=!0):(c=s===e.length-1?r:new Map,u.set(o,c)),n=c}return!a}remove(e){const r=this.nestedMap,n=r.get(e[0]);if(!n)return!1;const a=n.get(e[1]);if(!a)return!1;const s=a.get(e[2]);if(!s)return!1;const o=s.delete(e[3]);return o&&s.size===0&&(a.delete(e[2]),a.size===0&&(n.delete(e[1]),n.size===0&&r.delete(e[0]))),o}get(e){const r=(0,MN.encodeOptionalTerms)(e,this.dictionary);if(!(!r||r.includes(void 0)))return this.getEncoded(r)}getEncoded(e){const r=this.nestedMap.get(e[0]);if(!r)return;const n=r.get(e[1]);if(!n)return;const a=n.get(e[2]);if(a)return a.get(e[3])}*find(e){const r=(0,MN.encodeOptionalTerms)(e,this.dictionary);if(r)for(const n of this.findEncoded(r,e))yield[r[0]!==void 0?e[0]:this.dictionary.decode(n[0]),r[1]!==void 0?e[1]:this.dictionary.decode(n[1]),r[2]!==void 0?e[2]:this.dictionary.decode(n[2]),r[3]!==void 0?e[3]:this.dictionary.decode(n[3])]}*findEncoded(e,r){return yield*this.findEncodedInner(0,e,r,this.nestedMap,[])}*findEncodedInner(e,r,n,a,s){if(e===r.length)yield[...s];else{const o=r[e];if(n[e]){const c=o;if(c!==void 0){const l=a.get(c);l&&(s[e]=o,yield*this.findEncodedInner(e+1,r,n,l,s))}}else for(const[c,l]of a.entries())s[e]=c,yield*this.findEncodedInner(e+1,r,n,l,s)}}count(e){return this.countInner(0,e,this.nestedMap)}countInner(e,r,n){const a=r[e];let s=0;if(a){const o=this.dictionary.encodeOptional(a);if(o!==void 0){if(e===r.length-1)return n.has(o)?1:0;const u=n.get(o);u&&(s+=this.countInner(e+1,r,u))}}else{if(e===r.length-1)return n.size;for(const o of n.values())s+=this.countInner(e+1,r,o)}return s}}j0.RdfStoreIndexNestedMapRecursive=roe;var uv={};Object.defineProperty(uv,"__esModule",{value:!0});uv.RdfStoreIndexNestedMapRecursiveQuoted=void 0;const FN=ds,noe=j0;class ioe extends noe.RdfStoreIndexNestedMapRecursive{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*findEncoded(e,r){return yield*this.findEncodedInnerQuoted(0,e,r,(0,FN.arePatternsQuoted)(r),this.nestedMap,[])}*findEncodedInnerQuoted(e,r,n,a,s,o){if(e===r.length)yield[...o];else{const u=r[e],c=n[e];if(c)if(a[e]){const l=this.dictionary.findQuotedTriplesEncoded(c);for(const d of l){const f=s.get(d);f&&(o[e]=d,yield*this.findEncodedInnerQuoted(e+1,r,n,a,f,o))}}else{const l=u;if(l!==void 0){const d=s.get(l);d&&(o[e]=u,yield*this.findEncodedInnerQuoted(e+1,r,n,a,d,o))}}else for(const[l,d]of s.entries())o[e]=l,yield*this.findEncodedInnerQuoted(e+1,r,n,a,d,o)}}countInner(e,r,n){const a=r[e];let s=0;if(a)if(a.termType==="Quad"&&(0,FN.quadHasVariables)(a)){const o=this.dictionary.findQuotedTriplesEncoded(a);for(const u of o)if(e===r.length-1)n.has(u)&&s++;else{const c=n.get(u);c&&(s+=this.countInner(e+1,r,c))}}else{const o=this.dictionary.encodeOptional(a);if(o!==void 0){if(e===r.length-1)return n.has(o)?1:0;const u=n.get(o);u&&(s+=this.countInner(e+1,r,u))}}else{if(e===r.length-1)return n.size;for(const o of n.values())s+=this.countInner(e+1,r,o)}return s}}uv.RdfStoreIndexNestedMapRecursiveQuoted=ioe;var M0={};Object.defineProperty(M0,"__esModule",{value:!0});M0.RdfStoreIndexNestedRecord=void 0;const rT=ds;class aoe{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedRecords={}}set(e,r){const n=this.nestedRecords,a=n[e[0]]||(n[e[0]]={}),s=a[e[1]]||(a[e[1]]={}),o=s[e[2]]||(s[e[2]]={});return o[e[3]]?!1:(o[e[3]]=r,!0)}remove(e){const r=this.nestedRecords,n=r[e[0]];if(!n)return!1;const a=n[e[1]];if(!a)return!1;const s=a[e[2]];return!s||!s[e[3]]?!1:(delete s[e[3]],Object.keys(s).length===0&&(delete a[e[2]],Object.keys(a).length===0&&(delete n[e[1]],Object.keys(n).length===0&&delete r[e[0]])),!0)}get(e){const r=(0,rT.encodeOptionalTerms)(e,this.dictionary);if(!(!r||r.includes(void 0)))return this.getEncoded(r)}getEncoded(e){var r,n,a;return(a=(n=(r=this.nestedRecords[e[0]])===null||r===void 0?void 0:r[e[1]])===null||n===void 0?void 0:n[e[2]])===null||a===void 0?void 0:a[e[3]]}*find(e){const r=(0,rT.encodeOptionalTerms)(e,this.dictionary);if(!r)return;const[n,a,s,o]=r,[u,c,l,d]=e;let f,h,p,b,_,E,w;const O=this.nestedRecords,A=n!==void 0?n in O?[n]:[]:Object.keys(O);for(const T of A){_=O[T],f=u||this.dictionary.decode(Number.parseInt(T,10));const I=a!==void 0?a in _?[a]:[]:Object.keys(_);for(const D of I){E=_[D],h=c||this.dictionary.decode(Number.parseInt(D,10));const U=s!==void 0?s in E?[s]:[]:Object.keys(E);for(const H of U){w=E[H],p=l||this.dictionary.decode(Number.parseInt(H,10));const N=o!==void 0?o in w?[o]:[]:Object.keys(w);for(const x of N)b=d||this.dictionary.decode(Number.parseInt(x,10)),yield[f,h,p,b]}}}}*findEncoded(e,r){const[n,a,s,o]=e;let u,c,l;const d=this.nestedRecords,f=n!==void 0?n in d?[n]:[]:Object.keys(d);for(const h of f){u=d[h];const p=a!==void 0?a in u?[a]:[]:Object.keys(u);for(const b of p){c=u[b];const _=s!==void 0?s in c?[s]:[]:Object.keys(c);for(const E of _){l=c[E];const w=o!==void 0?o in l?[o]:[]:Object.keys(l);for(const O of w)yield[Number.parseInt(h,10),Number.parseInt(b,10),Number.parseInt(E,10),Number.parseInt(O,10)]}}}}count(e){let r=0;const n=(0,rT.encodeOptionalTerms)(e,this.dictionary);if(!n)return 0;const a=n[0],s=n[1],o=n[2],u=n[3];let c,l,d;const f=this.nestedRecords,h=a!==void 0?a in f?[a]:[]:Object.keys(f);for(const p of h){c=f[p];const b=s!==void 0?s in c?[s]:[]:Object.keys(c);for(const _ of b){l=c[_];const E=o!==void 0?o in l?[o]:[]:Object.keys(l);for(const w of E)d=l[w],u!==void 0?u in d&&r++:r+=Object.keys(d).length}}return r}}M0.RdfStoreIndexNestedRecord=aoe;var cv={};Object.defineProperty(cv,"__esModule",{value:!0});cv.RdfStoreIndexNestedRecordQuoted=void 0;const eh=ds,soe=M0;class ooe extends soe.RdfStoreIndexNestedRecord{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*getQuotedPatternKeys(e,r){for(const n of this.dictionary.findQuotedTriplesEncoded(r))n in e&&(yield n)}*find(e){const r=(0,eh.encodeOptionalTerms)(e,this.dictionary);if(!r)return;const[n,a,s,o]=r,[u,c,l,d]=e,[f,h,p,b]=(0,eh.arePatternsQuoted)(e);let _,E,w,O,A,T,I;const D=this.nestedRecords,U=u!==void 0?f?this.getQuotedPatternKeys(D,u):n in D?[n]:[]:Object.keys(D);for(const H of U){A=D[H],_=!f&&u?u:this.dictionary.decode(Number.parseInt(H,10));const N=c!==void 0?h?this.getQuotedPatternKeys(A,c):a in A?[a]:[]:Object.keys(A);for(const x of N){T=A[x],E=!h&&c?c:this.dictionary.decode(Number.parseInt(x,10));const F=l!==void 0?p?this.getQuotedPatternKeys(T,l):s in T?[s]:[]:Object.keys(T);for(const X of F){I=T[X],w=!p&&l?l:this.dictionary.decode(Number.parseInt(X,10));const ne=d!==void 0?b?this.getQuotedPatternKeys(I,d):o in I?[o]:[]:Object.keys(I);for(const $ of ne)O=!b&&d?d:this.dictionary.decode(Number.parseInt($,10)),yield[_,E,w,O]}}}}*findEncoded(e,r){const[n,a,s,o]=e,[u,c,l,d]=r,[f,h,p,b]=(0,eh.arePatternsQuoted)(r);let _,E,w;const O=this.nestedRecords,A=u!==void 0?f?this.getQuotedPatternKeys(O,u):n in O?[n]:[]:Object.keys(O);for(const T of A){_=O[T];const I=c!==void 0?h?this.getQuotedPatternKeys(_,c):a in _?[a]:[]:Object.keys(_);for(const D of I){E=_[D];const U=l!==void 0?p?this.getQuotedPatternKeys(E,l):s in E?[s]:[]:Object.keys(E);for(const H of U){w=E[H];const N=d!==void 0?b?this.getQuotedPatternKeys(w,d):o in w?[o]:[]:Object.keys(w);for(const x of N)yield[Number.parseInt(T,10),Number.parseInt(D,10),Number.parseInt(H,10),Number.parseInt(x,10)]}}}}count(e){let r=0;const n=(0,eh.encodeOptionalTerms)(e,this.dictionary);if(!n)return 0;const[a,s,o,u]=n,[c,l,d,f]=e,[h,p,b,_]=(0,eh.arePatternsQuoted)(e);let E,w,O;const A=this.nestedRecords,T=c!==void 0?h?this.getQuotedPatternKeys(A,c):a in A?[a]:[]:Object.keys(A);for(const I of T){E=A[I];const D=l!==void 0?p?this.getQuotedPatternKeys(E,l):s in E?[s]:[]:Object.keys(E);for(const U of D){w=E[U];const H=d!==void 0?b?this.getQuotedPatternKeys(w,d):o in w?[o]:[]:Object.keys(w);for(const N of H)O=w[N],f!==void 0?_?r+=[...this.getQuotedPatternKeys(O,f)].length:u in O&&r++:r+=Object.keys(O).length}}return r}}cv.RdfStoreIndexNestedRecordQuoted=ooe;var i7={};Object.defineProperty(i7,"__esModule",{value:!0});var a7={};Object.defineProperty(a7,"__esModule",{value:!0});(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(t7(),t),r(r7,t),r(nv,t),r(iv,t),r(D0,t),r(av,t),r(N0,t),r(sv,t),r(ov,t),r(n7,t),r(Nf,t),r(C0,t),r(j0,t),r(uv,t),r(M0,t),r(cv,t),r(i7,t),r(ds,t),r(a7,t),r(ZF(),t)})(YF);Object.defineProperty(P0,"__esModule",{value:!0});P0.storeStream=void 0;const uoe=YF;function coe(t){const e=uoe.RdfStore.createDefault();return new Promise((r,n)=>e.import(t).on("error",n).once("end",()=>r(e)))}P0.storeStream=coe;Object.defineProperty(Km,"__esModule",{value:!0});Km.ActorRdfResolveHypermediaNone=void 0;const loe=IR,doe=tv,foe=P0;class hoe extends doe.ActorRdfResolveHypermedia{constructor(e){super(e,"file")}async testMetadata(e){return{filterFactor:0}}async run(e){return this.logInfo(e.context,`Identified as file source: ${e.url}`),{source:new loe.RdfJsQuadSource(await(0,foe.storeStream)(e.quads))}}}Km.ActorRdfResolveHypermediaNone=hoe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Km,t)})(XF);var s7={},lv={},o7={},dv={};Object.defineProperty(dv,"__esModule",{value:!0});dv.ActorRdfResolveHypermediaLinks=void 0;const poe=et;class yoe extends poe.Actor{constructor(e){super(e)}}dv.ActorRdfResolveHypermediaLinks=yoe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(dv,t)})(o7);Object.defineProperty(lv,"__esModule",{value:!0});lv.ActorRdfResolveHypermediaLinksNext=void 0;const boe=o7;class _oe extends boe.ActorRdfResolveHypermediaLinks{constructor(e){super(e)}async test(e){if(!e.metadata.next)throw new Error(`Actor ${this.name} requires a 'next' metadata entry.`);return!0}async run(e){return{links:[{url:e.metadata.next}]}}}lv.ActorRdfResolveHypermediaLinksNext=_oe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(lv,t)})(s7);var u7={},fv={},c7={},hv={};Object.defineProperty(hv,"__esModule",{value:!0});hv.ActorRdfResolveHypermediaLinksQueue=void 0;const goe=et;class moe extends goe.Actor{constructor(e){super(e)}}hv.ActorRdfResolveHypermediaLinksQueue=moe;var l7={};Object.defineProperty(l7,"__esModule",{value:!0});var pv={};Object.defineProperty(pv,"__esModule",{value:!0});pv.LinkQueueWrapper=void 0;class voe{constructor(e){this.linkQueue=e}push(e,r){return this.linkQueue.push(e,r)}getSize(){return this.linkQueue.getSize()}isEmpty(){return this.linkQueue.isEmpty()}pop(){return this.linkQueue.pop()}peek(){return this.linkQueue.peek()}}pv.LinkQueueWrapper=voe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(hv,t),r(l7,t),r(pv,t)})(c7);var F0={};Object.defineProperty(F0,"__esModule",{value:!0});F0.LinkQueueFifo=void 0;class woe{constructor(){this.links=[]}push(e){return this.links.push(e),!0}getSize(){return this.links.length}isEmpty(){return this.links.length===0}pop(){return this.links.shift()}peek(){return this.links[0]}}F0.LinkQueueFifo=woe;Object.defineProperty(fv,"__esModule",{value:!0});fv.ActorRdfResolveHypermediaLinksQueueFifo=void 0;const Soe=c7,Toe=F0;class Eoe extends Soe.ActorRdfResolveHypermediaLinksQueue{constructor(e){super(e)}async test(e){return!0}async run(e){return{linkQueue:new Toe.LinkQueueFifo}}}fv.ActorRdfResolveHypermediaLinksQueueFifo=Eoe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(fv,t),r(F0,t)})(u7);var d7={},yv={},bv={},_v={};Object.defineProperty(_v,"__esModule",{value:!0});_v.ActorRdfSerialize=void 0;const Ooe=bl;class Aoe extends Ooe.ActorAbstractMediaTyped{constructor(e){super(e)}}_v.ActorRdfSerialize=Aoe;var gv={};Object.defineProperty(gv,"__esModule",{value:!0});gv.ActorRdfSerializeFixedMediaTypes=void 0;const Roe=bl;class xoe extends Roe.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e){return!0}}gv.ActorRdfSerializeFixedMediaTypes=xoe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(_v,t),r(gv,t)})(bv);Object.defineProperty(yv,"__esModule",{value:!0});yv.ActorRdfSerializeN3=void 0;const Ioe=bv,Poe=rc;class Doe extends Ioe.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){const a=new Poe.StreamWriter({format:r});let s;return"pipe"in e.quadStream?(e.quadStream.on("error",o=>a.emit("error",o)),s=e.quadStream.pipe(a)):s=a.import(e.quadStream),{data:s,triples:r==="text/turtle"||r==="application/n-triples"||r==="text/n3"}}}yv.ActorRdfSerializeN3=Doe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(yv,t)})(d7);var f7={},mv={},h7={},vv={},wv={};Object.defineProperty(wv,"__esModule",{value:!0});wv.SeparatorType=void 0;class Yr{constructor(e){this.label=e}}wv.SeparatorType=Yr;Yr.COMMA=new Yr(",");Yr.OBJECT_START=new Yr("{");Yr.OBJECT_END=new Yr("}");Yr.OBJECT_END_COMMA=new Yr("},");Yr.ARRAY_START=new Yr("[");Yr.ARRAY_END=new Yr("]");Yr.ARRAY_END_COMMA=new Yr("],");Yr.GRAPH_FIELD_NONCOMPACT=new Yr('"@graph": [');Yr.GRAPH_FIELD_COMPACT=new Yr('"@graph":[');Yr.CONTEXT_FIELD=new Yr('"@context":');var L0={};Object.defineProperty(L0,"__esModule",{value:!0});L0.Util=void 0;const LN=hn;let Ws=class hu{static termToValue(e,r,n={compactIds:!1,useNativeTypes:!1}){switch(e.termType){case"NamedNode":const a=r.compactIri(e.value,n.vocab);return n.compactIds?a:{"@id":a};case"DefaultGraph":return n.compactIds?e.value:{"@id":e.value};case"BlankNode":const s=`_:${e.value}`;return n.compactIds?s:{"@id":s};case"Literal":if(e.datatype.value===hu.RDF_JSON){let c;try{c=JSON.parse(e.value)}catch(l){throw new LN.ErrorCoded("Invalid JSON literal: "+l.message,LN.ERROR_CODES.INVALID_JSON_LITERAL)}return{"@value":c,"@type":"@json"}}if(n.rdfDirection==="i18n-datatype"&&e.datatype.value.startsWith(hu.I18N)){const[c,l]=e.datatype.value.substr(hu.I18N.length,e.datatype.value.length).split("_");return Object.assign(Object.assign({"@value":e.value},c?{"@language":c}:{}),l?{"@direction":l}:{})}const o=e.datatype.value===hu.XSD_STRING,u={"@value":!o&&n.useNativeTypes?hu.stringToNativeType(e.value,e.datatype.value):e.value};return e.language?Object.assign(Object.assign({},u),{"@language":e.language}):!o&&typeof u["@value"]=="string"?Object.assign(Object.assign({},u),{"@type":e.datatype.value}):u}}static stringToNativeType(e,r){if(r.startsWith(hu.XSD))switch(r.substr(hu.XSD.length)){case"boolean":if(e==="true")return!0;if(e==="false")return!1;throw new Error(`Invalid xsd:boolean value '${e}'`);case"integer":case"number":case"int":case"byte":case"long":const a=parseInt(e,10);if(isNaN(a))throw new Error(`Invalid xsd:integer value '${e}'`);return a;case"float":case"double":const s=parseFloat(e);if(isNaN(s))throw new Error(`Invalid xsd:float value '${e}'`);return s}return e}};L0.Util=Ws;Ws.XSD="http://www.w3.org/2001/XMLSchema#";Ws.XSD_STRING=Ws.XSD+"string";Ws.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#";Ws.RDF_TYPE=Ws.RDF+"type";Ws.RDF_JSON=Ws.RDF+"JSON";Ws.I18N="https://www.w3.org/ns/i18n#";Object.defineProperty(vv,"__esModule",{value:!0});vv.JsonLdSerializer=void 0;const BN=hn,Qr=wv,nT=L0,$N=kt;class NR extends $N.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 BN.ContextParser().parse(this.options.context,{baseIRI:this.options.baseIRI})):this.context=Promise.resolve(new BN.JsonLdContextNormalized({}))}import(e){const r=new $N.PassThrough({objectMode:!0});e.on("error",a=>n.emit("error",a)),e.on("data",a=>r.push(a)),e.on("end",()=>r.push(null));const n=r.pipe(new NR(this.options));return n}_transform(e,r,n){this.context.then(a=>{this.transformQuad(e,a),n()}).catch(n)}async list(e){const r=await this.context;return{"@list":e.map(n=>nT.Util.termToValue(n,r,this.options))}}_flush(e){return this.opened||this.pushDocumentStart(),this.lastPredicate&&this.endPredicate(),this.lastSubject&&this.endSubject(),this.lastGraph&&this.lastGraph.termType!=="DefaultGraph"&&this.endGraph(),this.endDocument(),e(null,null)}transformQuad(e,r){this.opened||this.pushDocumentStart();const n=this.lastGraph&&this.lastGraph.termType!=="DefaultGraph"&&this.lastGraph.equals(e.subject);if(!n&&(!this.lastGraph||!e.graph.equals(this.lastGraph))){let a=e.graph.termType!=="DefaultGraph"&&this.lastSubject&&this.lastSubject.equals(e.graph);this.lastGraph&&(this.lastGraph.termType!=="DefaultGraph"?(this.endPredicate(),this.endSubject(),this.endGraph(!0),a=!1):a?(this.endPredicate(!0),this.lastSubject=null):(this.endPredicate(),this.endSubject(!0))),e.graph.termType!=="DefaultGraph"&&(a||this.pushId(e.graph,!0,r),this.pushSeparator(this.options.space?Qr.SeparatorType.GRAPH_FIELD_NONCOMPACT:Qr.SeparatorType.GRAPH_FIELD_COMPACT),this.indentation++),this.lastGraph=e.graph}(!this.lastSubject||!e.subject.equals(this.lastSubject))&&(n?(this.endPredicate(),this.endSubject(),this.indentation--,this.pushSeparator(Qr.SeparatorType.ARRAY_END_COMMA),this.lastGraph=e.graph):(this.lastSubject&&(this.endPredicate(),this.endSubject(!0)),this.pushId(e.subject,!0,r)),this.lastSubject=e.subject),(!this.lastPredicate||!e.predicate.equals(this.lastPredicate))&&(this.lastPredicate&&this.endPredicate(!0),this.pushPredicate(e.predicate,r)),this.pushObject(e.object,r)}pushDocumentStart(){this.opened=!0,this.originalContext&&!this.options.excludeContext?(this.pushSeparator(Qr.SeparatorType.OBJECT_START),this.indentation++,this.pushSeparator(Qr.SeparatorType.CONTEXT_FIELD),this.pushIndented(JSON.stringify(this.originalContext,null,this.options.space)+","),this.pushSeparator(this.options.space?Qr.SeparatorType.GRAPH_FIELD_NONCOMPACT:Qr.SeparatorType.GRAPH_FIELD_COMPACT),this.indentation++):(this.pushSeparator(Qr.SeparatorType.ARRAY_START),this.indentation++)}pushId(e,r,n){if(e.termType==="Quad")this.pushNestedQuad(e,!0,n);else{const a=e.termType==="BlankNode"?"_:"+e.value:n.compactIri(e.value,!1);r?this.pushSeparator(Qr.SeparatorType.OBJECT_START):(this.push(Qr.SeparatorType.OBJECT_START.label),this.options.space&&this.push(` +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Be=this.next();return Be||this.lex()},begin:function(Be){this.conditionStack.push(Be)},popState:function(){var Be=this.conditionStack.length-1;return Be>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(Be){return Be=this.conditionStack.length-1-Math.abs(Be||0),Be>=0?this.conditionStack[Be]:"INITIAL"},pushState:function(Be){this.begin(Be)},stateStackSize:function(){return this.conditionStack.length},options:{flex:!0,"case-insensitive":!0},performAction:function(Be,Je,Pt,at){switch(Pt){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(Je.yytext);break}},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}}};return ze}();Ee.lexer=Fe;function Ae(){this.yy={}}return Ae.prototype=Ee,Ee.Parser=Ae,new Ae}(),Oae=Eae;const Aae=Oae.Parser,JS=rc;let LF=class{constructor(){}parse(e,{extendedSyntax:r,baseIRI:n}={}){this._parser=new Aae,this._parser.Parser.factory=JS.DataFactory,this._parser.Parser.base=JS.DataFactory.namedNode(n||"urn:x-base:default"),this._parser.Parser.extended=r===!0,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 JS.Parser({baseIRI:n||"urn:x-base:default"});const a=[];return this._parser.Parser.onQuad=s=>{a.push(s)},this._parser.parse(e),a.prefixes=this._parser.Parser.prefixes,a}};AR.Parser=LF;AR.parse=function(e,r){return new LF().parse(e,r)};var BF={exports:{}};(function(t){(function(){var e;typeof window=="object"&&window?e=window:e=m,t.exports?t.exports=e.Promise?e.Promise:s:e.Promise||(e.Promise=s);var r=e.setImmediate||function(h){setTimeout(h,1)};function n(h,p){return function(){h.apply(p,arguments)}}var a=Array.isArray||function(h){return Object.prototype.toString.call(h)==="[object Array]"};function s(h){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");if(typeof h!="function")throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],f(h,n(u,this),n(c,this))}function o(h){var p=this;if(this._state===null){this._deferreds.push(h);return}r(function(){var b=p._state?h.onFulfilled:h.onRejected;if(b===null){(p._state?h.resolve:h.reject)(p._value);return}var _;try{_=b(p._value)}catch(E){h.reject(E);return}h.resolve(_)})}function u(h){try{if(h===this)throw new TypeError("A promise cannot be resolved with itself.");if(h&&(typeof h=="object"||typeof h=="function")){var p=h.then;if(typeof p=="function"){f(n(p,h),n(u,this),n(c,this));return}}this._state=!0,this._value=h,l.call(this)}catch(b){c.call(this,b)}}function c(h){this._state=!1,this._value=h,l.call(this)}function l(){for(var h=0,p=this._deferreds.length;h(this.prefixes=r.prefixes,r)))}read(){if(this.prefixes){for(const e of Object.entries(this.prefixes))this.emit("prefix",...e);delete this.prefixes}return super.read()}}Vm.PrefixWrappingIterator=Pae;Object.defineProperty(qm,"__esModule",{value:!0});qm.ActorRdfParseShaclc=void 0;const Dae=ml,Nae=kt,Cae=AR,jae=wl,Mae=Vm;class Fae extends Dae.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){const a=new Mae.PrefixWrappingIterator(jae(e.data).then(o=>{var u;return(0,Cae.parse)(o,{extendedSyntax:r==="text/shaclc-ext",baseIRI:(u=e.metadata)==null?void 0:u.baseIRI})})),s=new Nae.Readable({objectMode:!0});return a.on("prefix",(...o)=>s.emit("prefix",...o)),{data:s.wrap(a),metadata:{triples:!0}}}}qm.ActorRdfParseShaclc=Fae;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(qm,t)})(FF);var $F={},Hm={},UF={},Ep={},RR={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var e=Ho,r;(function(d){d[d.Tab=9]="Tab",d[d.NewLine=10]="NewLine",d[d.FormFeed=12]="FormFeed",d[d.CarriageReturn=13]="CarriageReturn",d[d.Space=32]="Space",d[d.ExclamationMark=33]="ExclamationMark",d[d.Number=35]="Number",d[d.Amp=38]="Amp",d[d.SingleQuote=39]="SingleQuote",d[d.DoubleQuote=34]="DoubleQuote",d[d.Dash=45]="Dash",d[d.Slash=47]="Slash",d[d.Zero=48]="Zero",d[d.Nine=57]="Nine",d[d.Semi=59]="Semi",d[d.Lt=60]="Lt",d[d.Eq=61]="Eq",d[d.Gt=62]="Gt",d[d.Questionmark=63]="Questionmark",d[d.UpperA=65]="UpperA",d[d.LowerA=97]="LowerA",d[d.UpperF=70]="UpperF",d[d.LowerF=102]="LowerF",d[d.UpperZ=90]="UpperZ",d[d.LowerZ=122]="LowerZ",d[d.LowerX=120]="LowerX",d[d.OpeningSquareBracket=91]="OpeningSquareBracket"})(r||(r={}));var n;(function(d){d[d.Text=1]="Text",d[d.BeforeTagName=2]="BeforeTagName",d[d.InTagName=3]="InTagName",d[d.InSelfClosingTag=4]="InSelfClosingTag",d[d.BeforeClosingTagName=5]="BeforeClosingTagName",d[d.InClosingTagName=6]="InClosingTagName",d[d.AfterClosingTagName=7]="AfterClosingTagName",d[d.BeforeAttributeName=8]="BeforeAttributeName",d[d.InAttributeName=9]="InAttributeName",d[d.AfterAttributeName=10]="AfterAttributeName",d[d.BeforeAttributeValue=11]="BeforeAttributeValue",d[d.InAttributeValueDq=12]="InAttributeValueDq",d[d.InAttributeValueSq=13]="InAttributeValueSq",d[d.InAttributeValueNq=14]="InAttributeValueNq",d[d.BeforeDeclaration=15]="BeforeDeclaration",d[d.InDeclaration=16]="InDeclaration",d[d.InProcessingInstruction=17]="InProcessingInstruction",d[d.BeforeComment=18]="BeforeComment",d[d.CDATASequence=19]="CDATASequence",d[d.InSpecialComment=20]="InSpecialComment",d[d.InCommentLike=21]="InCommentLike",d[d.BeforeSpecialS=22]="BeforeSpecialS",d[d.SpecialStartSequence=23]="SpecialStartSequence",d[d.InSpecialTag=24]="InSpecialTag",d[d.InEntity=25]="InEntity"})(n||(n={}));function a(d){return d===r.Space||d===r.NewLine||d===r.Tab||d===r.FormFeed||d===r.CarriageReturn}function s(d){return d===r.Slash||d===r.Gt||a(d)}function o(d){return d>=r.LowerA&&d<=r.LowerZ||d>=r.UpperA&&d<=r.UpperZ}var u;(function(d){d[d.NoValue=0]="NoValue",d[d.Unquoted=1]="Unquoted",d[d.Single=2]="Single",d[d.Double=3]="Double"})(u=t.QuoteType||(t.QuoteType={}));var c={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])},l=function(){function d(f,h){var p=f.xmlMode,b=p===void 0?!1:p,_=f.decodeEntities,E=_===void 0?!0:_,w=this;this.cbs=h,this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=n.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=b,this.decodeEntities=E,this.entityDecoder=new e.EntityDecoder(b?e.xmlDecodeTree:e.htmlDecodeTree,function(O,A){return w.emitCodePoint(O,A)})}return d.prototype.reset=function(){this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},d.prototype.write=function(f){this.offset+=this.buffer.length,this.buffer=f,this.parse()},d.prototype.end=function(){this.running&&this.finish()},d.prototype.pause=function(){this.running=!1},d.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=n.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&f===r.Amp&&this.startEntity()},d.prototype.stateSpecialStartSequence=function(f){var h=this.sequenceIndex===this.currentSequence.length,p=h?s(f):(f|32)===this.currentSequence[this.sequenceIndex];if(!p)this.isSpecial=!1;else if(!h){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=n.InTagName,this.stateInTagName(f)},d.prototype.stateInSpecialTag=function(f){if(this.sequenceIndex===this.currentSequence.length){if(f===r.Gt||a(f)){var h=this.index-this.currentSequence.length;if(this.sectionStart=0?(this.state=this.baseState,f===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1},d.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===n.Text||this.state===n.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===n.InAttributeValueDq||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},d.prototype.shouldContinue=function(){return this.index=f||(this.state===n.InCommentLike?this.currentSequence===c.CdataEnd?this.cbs.oncdata(this.sectionStart,f,0):this.cbs.oncomment(this.sectionStart,f,0):this.state===n.InTagName||this.state===n.BeforeAttributeName||this.state===n.BeforeAttributeValue||this.state===n.AfterAttributeName||this.state===n.InAttributeName||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueDq||this.state===n.InAttributeValueNq||this.state===n.InClosingTagName||this.cbs.ontext(this.sectionStart,f))},d.prototype.emitCodePoint=function(f,h){this.baseState!==n.Text&&this.baseState!==n.InSpecialTag?(this.sectionStart0&&o.has(this.stack[0]);){var u=this.stack.shift();(n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,u,!0)}this.isVoidElement(e)||(this.stack.unshift(e),this.htmlMode&&(bN.has(e)?this.foreignContext.unshift(!0):_N.has(e)&&this.foreignContext.unshift(!1))),(s=(a=this.cbs).onopentagname)===null||s===void 0||s.call(a,e),this.cbs.onopentag&&(this.attribs={})},t.prototype.endOpenTag=function(e){var r,n;this.startIndex=this.openTagStart,this.attribs&&((n=(r=this.cbs).onopentag)===null||n===void 0||n.call(r,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},t.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},t.prototype.onclosetag=function(e,r){var n,a,s,o,u,c,l,d;this.endIndex=r;var f=this.getSlice(e,r);if(this.lowerCaseTagNames&&(f=f.toLowerCase()),this.htmlMode&&(bN.has(f)||_N.has(f))&&this.foreignContext.shift(),this.isVoidElement(f))this.htmlMode&&f==="br"&&((o=(s=this.cbs).onopentagname)===null||o===void 0||o.call(s,"br"),(c=(u=this.cbs).onopentag)===null||c===void 0||c.call(u,"br",{},!0),(d=(l=this.cbs).onclosetag)===null||d===void 0||d.call(l,"br",!1));else{var h=this.stack.indexOf(f);if(h!==-1)for(var p=0;p<=h;p++){var b=this.stack.shift();(a=(n=this.cbs).onclosetag)===null||a===void 0||a.call(n,b,p!==h)}else this.htmlMode&&f==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1},t.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},t.prototype.closeCurrentTag=function(e){var r,n,a=this.tagname;this.endOpenTag(e),this.stack[0]===a&&((n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,a,!e),this.stack.shift())},t.prototype.onattribname=function(e,r){this.startIndex=e;var n=this.getSlice(e,r);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n},t.prototype.onattribdata=function(e,r){this.attribvalue+=this.getSlice(e,r)},t.prototype.onattribentity=function(e){this.attribvalue+=(0,fN.fromCodePoint)(e)},t.prototype.onattribend=function(e,r){var n,a;this.endIndex=r,(a=(n=this.cbs).onattribute)===null||a===void 0||a.call(n,this.attribname,this.attribvalue,e===n1.QuoteType.Double?'"':e===n1.QuoteType.Single?"'":e===n1.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},t.prototype.getInstructionName=function(e){var r=e.search(Vae),n=r<0?e:e.substr(0,r);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},t.prototype.ondeclaration=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("!".concat(a),"!".concat(n))}this.startIndex=r+1},t.prototype.onprocessinginstruction=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("?".concat(a),"?".concat(n))}this.startIndex=r+1},t.prototype.oncomment=function(e,r,n){var a,s,o,u;this.endIndex=r,(s=(a=this.cbs).oncomment)===null||s===void 0||s.call(a,this.getSlice(e,r-n)),(u=(o=this.cbs).oncommentend)===null||u===void 0||u.call(o),this.startIndex=r+1},t.prototype.oncdata=function(e,r,n){var a,s,o,u,c,l,d,f,h,p;this.endIndex=r;var b=this.getSlice(e,r-n);!this.htmlMode||this.options.recognizeCDATA?((s=(a=this.cbs).oncdatastart)===null||s===void 0||s.call(a),(u=(o=this.cbs).ontext)===null||u===void 0||u.call(o,b),(l=(c=this.cbs).oncdataend)===null||l===void 0||l.call(c)):((f=(d=this.cbs).oncomment)===null||f===void 0||f.call(d,"[CDATA[".concat(b,"]]")),(p=(h=this.cbs).oncommentend)===null||p===void 0||p.call(h)),this.startIndex=r+1},t.prototype.onend=function(){var e,r;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var n=0;n=this.buffers[0].length;)this.shiftBuffer();for(var n=this.buffers[0].slice(e-this.bufferOffset,r-this.bufferOffset);r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,r-this.bufferOffset);return n},t.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},t.prototype.write=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".write() after done!"));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)},t.prototype.end=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".end() after done!"));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()},t.prototype.pause=function(){this.tokenizer.pause()},t.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{var d;a._read=()=>{};let s=1;function o(f){a.emit("data",f)}function u(f){a.emit("error",f)}function c(){--s===0&&a.push(null)}const l={baseIRI:((d=e.metadata)==null?void 0:d.baseIRI)??"",context:n,emit:o,end:c,error:u,headers:e.headers};Promise.all(this.busRdfParseHtml.publish(l)).then(async f=>{s+=f.length;const h=[];for(const b of f){const{htmlParseListener:_}=await b.actor.run(l);h.push(_)}const p=new Qae.Parser({onclosetag(){try{for(const b of h)b.onTagClose()}catch(b){u(b)}},onend(){try{for(const b of h)b.onEnd()}catch(b){u(b)}c()},onopentag(b,_){try{for(const E of h)E.onTagOpen(b,_)}catch(E){u(E)}},ontext(b){try{for(const _ of h)_.onText(b)}catch(_){u(_)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:!1});e.data.on("error",u).on("data",b=>p.write(b.toString())).on("end",()=>p.end())}).catch(u)},{data:a}}};Hm.ActorRdfParseHtml=zae;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Hm,t)})($F);var qF={},km={},Qm={},Gm={};Object.defineProperty(Gm,"__esModule",{value:!0});Gm.ActorRdfParseHtml=void 0;const Wae=et;class Xae extends Wae.Actor{constructor(e){super(e)}}Gm.ActorRdfParseHtml=Xae;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Gm,t)})(Qm);var VF={},HF={};Object.defineProperty(HF,"__esModule",{value:!0});var E0={};Object.defineProperty(E0,"__esModule",{value:!0});E0.ItemPropertyHandlerContent=void 0;class Kae{canHandle(e,r){return"content"in r}getObject(e,r,n){return r.createLiteral(e.content,n)}}E0.ItemPropertyHandlerContent=Kae;var O0={},Sl={};Object.defineProperty(Sl,"__esModule",{value:!0});Sl.Util=void 0;const Jae=ht,gN=Ra;let A0=class Vh{constructor(e,r){this.dataFactory=e||new Jae.DataFactory,this.baseIRI=r||""}static isValidIri(e){return Vh.IRI_REGEX.test(e)}createVocabIris(e,r,n){return e.split(/\s+/u).filter(a=>!!a).map(a=>{if(!Vh.isValidIri(a)){if(!n)return;a=`${r.vocab||`${this.baseIRI}#`}${a}`}return this.dataFactory.namedNode(a)}).filter(a=>!!a)}getVocabularyExpansionType(e,r,n){const a=e.split(/\s+/u);if(a.includes("subPropertyOf")||a.includes("equivalentProperty"))return[this.dataFactory.namedNode(`${Vh.RDF}type`)];if(r.vocab&&r.vocab in n&&n[r.vocab].properties){let s=[];for(const[o,u]of Object.entries(n[r.vocab].properties))a.includes(o)&&(s=[...Object.values(u).map(c=>this.dataFactory.namedNode(c))]);return s}return[]}createSubject(e){if(!Vh.isValidIri(e))try{e=(0,gN.resolve)(e,this.baseIRI)}catch{return}return this.dataFactory.namedNode(e)}createLiteral(e,r){return this.dataFactory.literal(e,r.language)}deriveVocab(e,r){let n;for(const a in r)if(e.startsWith(a)){n=a,n.endsWith("/")||(n+="#");break}if(!n){const a=e.indexOf("#");a>0?n=e.slice(0,a+1):n=(0,gN.resolve)(".",e)}return n}};Sl.Util=A0;A0.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#";A0.XSD="http://www.w3.org/2001/XMLSchema#";A0.RDFA="http://www.w3.org/ns/rdfa#";A0.IRI_REGEX=/^([A-Za-z][\d+-.A-Za-z]*|_):[^ "<>[\\\]`{|}]*$/u;Object.defineProperty(O0,"__esModule",{value:!0});O0.ItemPropertyHandlerNumber=void 0;const mN=Sl;class Yae{constructor(e,r){this.tagName=e,this.attributeName=r}canHandle(e,r){return this.tagName===e&&this.attributeName in r}getObject(e,r,n){const a=e[this.attributeName];let s;return!Number.isNaN(Number.parseInt(a,10))&&!a.includes(".")?s=`${mN.Util.XSD}integer`:Number.isNaN(Number.parseFloat(a))||(s=`${mN.Util.XSD}double`),r.dataFactory.literal(a,s&&r.dataFactory.namedNode(s))}}O0.ItemPropertyHandlerNumber=Yae;var R0={};Object.defineProperty(R0,"__esModule",{value:!0});R0.ItemPropertyHandlerTime=void 0;const Zae=Sl;class zm{canHandle(e,r){return e==="time"&&"datetime"in r}getObject(e,r,n){const a=e.datetime;let s;for(const o of zm.TIME_REGEXES)if(o.regex.test(a)){s=r.dataFactory.namedNode(Zae.Util.XSD+o.type);break}return r.dataFactory.literal(a,s)}}R0.ItemPropertyHandlerTime=zm;zm.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"}];var x0={};Object.defineProperty(x0,"__esModule",{value:!0});x0.ItemPropertyHandlerUrl=void 0;const ese=Ra;class tse{constructor(e,r){this.tagName=e,this.attributeName=r}canHandle(e,r){return this.tagName===e&&this.attributeName in r}getObject(e,r,n){return r.dataFactory.namedNode((0,ese.resolve)(e[this.attributeName],r.baseIRI))}}x0.ItemPropertyHandlerUrl=tse;var kF={};Object.defineProperty(kF,"__esModule",{value:!0});var QF={};Object.defineProperty(QF,"__esModule",{value:!0});var GF={};Object.defineProperty(GF,"__esModule",{value:!0});var Wm={},zF={},Op={},xR={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.QuoteType=void 0;var e=Ho,r;(function(h){h[h.Tab=9]="Tab",h[h.NewLine=10]="NewLine",h[h.FormFeed=12]="FormFeed",h[h.CarriageReturn=13]="CarriageReturn",h[h.Space=32]="Space",h[h.ExclamationMark=33]="ExclamationMark",h[h.Number=35]="Number",h[h.Amp=38]="Amp",h[h.SingleQuote=39]="SingleQuote",h[h.DoubleQuote=34]="DoubleQuote",h[h.Dash=45]="Dash",h[h.Slash=47]="Slash",h[h.Zero=48]="Zero",h[h.Nine=57]="Nine",h[h.Semi=59]="Semi",h[h.Lt=60]="Lt",h[h.Eq=61]="Eq",h[h.Gt=62]="Gt",h[h.Questionmark=63]="Questionmark",h[h.UpperA=65]="UpperA",h[h.LowerA=97]="LowerA",h[h.UpperF=70]="UpperF",h[h.LowerF=102]="LowerF",h[h.UpperZ=90]="UpperZ",h[h.LowerZ=122]="LowerZ",h[h.LowerX=120]="LowerX",h[h.OpeningSquareBracket=91]="OpeningSquareBracket"})(r||(r={}));var n;(function(h){h[h.Text=1]="Text",h[h.BeforeTagName=2]="BeforeTagName",h[h.InTagName=3]="InTagName",h[h.InSelfClosingTag=4]="InSelfClosingTag",h[h.BeforeClosingTagName=5]="BeforeClosingTagName",h[h.InClosingTagName=6]="InClosingTagName",h[h.AfterClosingTagName=7]="AfterClosingTagName",h[h.BeforeAttributeName=8]="BeforeAttributeName",h[h.InAttributeName=9]="InAttributeName",h[h.AfterAttributeName=10]="AfterAttributeName",h[h.BeforeAttributeValue=11]="BeforeAttributeValue",h[h.InAttributeValueDq=12]="InAttributeValueDq",h[h.InAttributeValueSq=13]="InAttributeValueSq",h[h.InAttributeValueNq=14]="InAttributeValueNq",h[h.BeforeDeclaration=15]="BeforeDeclaration",h[h.InDeclaration=16]="InDeclaration",h[h.InProcessingInstruction=17]="InProcessingInstruction",h[h.BeforeComment=18]="BeforeComment",h[h.CDATASequence=19]="CDATASequence",h[h.InSpecialComment=20]="InSpecialComment",h[h.InCommentLike=21]="InCommentLike",h[h.BeforeSpecialS=22]="BeforeSpecialS",h[h.SpecialStartSequence=23]="SpecialStartSequence",h[h.InSpecialTag=24]="InSpecialTag",h[h.BeforeEntity=25]="BeforeEntity",h[h.BeforeNumericEntity=26]="BeforeNumericEntity",h[h.InNamedEntity=27]="InNamedEntity",h[h.InNumericEntity=28]="InNumericEntity",h[h.InHexEntity=29]="InHexEntity"})(n||(n={}));function a(h){return h===r.Space||h===r.NewLine||h===r.Tab||h===r.FormFeed||h===r.CarriageReturn}function s(h){return h===r.Slash||h===r.Gt||a(h)}function o(h){return h>=r.Zero&&h<=r.Nine}function u(h){return h>=r.LowerA&&h<=r.LowerZ||h>=r.UpperA&&h<=r.UpperZ}function c(h){return h>=r.UpperA&&h<=r.UpperF||h>=r.LowerA&&h<=r.LowerF}var l;(function(h){h[h.NoValue=0]="NoValue",h[h.Unquoted=1]="Unquoted",h[h.Single=2]="Single",h[h.Double=3]="Double"})(l=t.QuoteType||(t.QuoteType={}));var d={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])},f=function(){function h(p,b){var _=p.xmlMode,E=_===void 0?!1:_,w=p.decodeEntities,O=w===void 0?!0:w;this.cbs=b,this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.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=E,this.decodeEntities=O,this.entityTrie=E?e.xmlDecodeTree:e.htmlDecodeTree}return h.prototype.reset=function(){this.state=n.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=n.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},h.prototype.write=function(p){this.offset+=this.buffer.length,this.buffer=p,this.parse()},h.prototype.end=function(){this.running&&this.finish()},h.prototype.pause=function(){this.running=!1},h.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=n.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&p===r.Amp&&(this.state=n.BeforeEntity)},h.prototype.stateSpecialStartSequence=function(p){var b=this.sequenceIndex===this.currentSequence.length,_=b?s(p):(p|32)===this.currentSequence[this.sequenceIndex];if(!_)this.isSpecial=!1;else if(!b){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=n.InTagName,this.stateInTagName(p)},h.prototype.stateInSpecialTag=function(p){if(this.sequenceIndex===this.currentSequence.length){if(p===r.Gt||a(p)){var b=this.index-this.currentSequence.length;if(this.sectionStart>14)-1;if(!this.allowLegacyEntity()&&p!==r.Semi)this.trieIndex+=_;else{var E=this.index-this.entityExcess+1;E>this.sectionStart&&this.emitPartial(this.sectionStart,E),this.entityResult=this.trieIndex,this.trieIndex+=_,this.entityExcess=0,this.sectionStart=this.index+1,_===0&&this.emitNamedEntity()}}},h.prototype.emitNamedEntity=function(){if(this.state=this.baseState,this.entityResult!==0){var p=(this.entityTrie[this.entityResult]&e.BinTrieFlags.VALUE_LENGTH)>>14;switch(p){case 1:{this.emitCodePoint(this.entityTrie[this.entityResult]&~e.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])}}},h.prototype.stateBeforeNumericEntity=function(p){(p|32)===r.LowerX?(this.entityExcess++,this.state=n.InHexEntity):(this.state=n.InNumericEntity,this.stateInNumericEntity(p))},h.prototype.emitNumericEntity=function(p){var b=this.index-this.entityExcess-1,_=b+2+ +(this.state===n.InHexEntity);_!==this.index&&(b>this.sectionStart&&this.emitPartial(this.sectionStart,b),this.sectionStart=this.index+Number(p),this.emitCodePoint((0,e.replaceCodePoint)(this.entityResult))),this.state=this.baseState},h.prototype.stateInNumericEntity=function(p){p===r.Semi?this.emitNumericEntity(!0):o(p)?(this.entityResult=this.entityResult*10+(p-r.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},h.prototype.stateInHexEntity=function(p){p===r.Semi?this.emitNumericEntity(!0):o(p)?(this.entityResult=this.entityResult*16+(p-r.Zero),this.entityExcess++):c(p)?(this.entityResult=this.entityResult*16+((p|32)-r.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},h.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===n.Text||this.baseState===n.InSpecialTag)},h.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===n.Text||this.state===n.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===n.InAttributeValueDq||this.state===n.InAttributeValueSq||this.state===n.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},h.prototype.shouldContinue=function(){return this.index0&&o.has(this.stack[this.stack.length-1]);){var u=this.stack.pop();(n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,u,!0)}this.isVoidElement(e)||(this.stack.push(e),EN.has(e)?this.foreignContext.push(!0):ON.has(e)&&this.foreignContext.push(!1)),(s=(a=this.cbs).onopentagname)===null||s===void 0||s.call(a,e),this.cbs.onopentag&&(this.attribs={})},t.prototype.endOpenTag=function(e){var r,n;this.startIndex=this.openTagStart,this.attribs&&((n=(r=this.cbs).onopentag)===null||n===void 0||n.call(r,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},t.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},t.prototype.onclosetag=function(e,r){var n,a,s,o,u,c;this.endIndex=r;var l=this.getSlice(e,r);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(EN.has(l)||ON.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))!this.options.xmlMode&&l==="br"&&((a=(n=this.cbs).onopentagname)===null||a===void 0||a.call(n,"br"),(o=(s=this.cbs).onopentag)===null||o===void 0||o.call(s,"br",{},!0),(c=(u=this.cbs).onclosetag)===null||c===void 0||c.call(u,"br",!1));else{var d=this.stack.lastIndexOf(l);if(d!==-1)if(this.cbs.onclosetag)for(var f=this.stack.length-d;f--;)this.cbs.onclosetag(this.stack.pop(),f!==0);else this.stack.length=d;else!this.options.xmlMode&&l==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1},t.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)},t.prototype.closeCurrentTag=function(e){var r,n,a=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===a&&((n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,a,!e),this.stack.pop())},t.prototype.onattribname=function(e,r){this.startIndex=e;var n=this.getSlice(e,r);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n},t.prototype.onattribdata=function(e,r){this.attribvalue+=this.getSlice(e,r)},t.prototype.onattribentity=function(e){this.attribvalue+=(0,vN.fromCodePoint)(e)},t.prototype.onattribend=function(e,r){var n,a;this.endIndex=r,(a=(n=this.cbs).onattribute)===null||a===void 0||a.call(n,this.attribname,this.attribvalue,e===i1.QuoteType.Double?'"':e===i1.QuoteType.Single?"'":e===i1.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},t.prototype.getInstructionName=function(e){var r=e.search(ose),n=r<0?e:e.substr(0,r);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},t.prototype.ondeclaration=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("!".concat(a),"!".concat(n))}this.startIndex=r+1},t.prototype.onprocessinginstruction=function(e,r){this.endIndex=r;var n=this.getSlice(e,r);if(this.cbs.onprocessinginstruction){var a=this.getInstructionName(n);this.cbs.onprocessinginstruction("?".concat(a),"?".concat(n))}this.startIndex=r+1},t.prototype.oncomment=function(e,r,n){var a,s,o,u;this.endIndex=r,(s=(a=this.cbs).oncomment)===null||s===void 0||s.call(a,this.getSlice(e,r-n)),(u=(o=this.cbs).oncommentend)===null||u===void 0||u.call(o),this.startIndex=r+1},t.prototype.oncdata=function(e,r,n){var a,s,o,u,c,l,d,f,h,p;this.endIndex=r;var b=this.getSlice(e,r-n);this.options.xmlMode||this.options.recognizeCDATA?((s=(a=this.cbs).oncdatastart)===null||s===void 0||s.call(a),(u=(o=this.cbs).ontext)===null||u===void 0||u.call(o,b),(l=(c=this.cbs).oncdataend)===null||l===void 0||l.call(c)):((f=(d=this.cbs).oncomment)===null||f===void 0||f.call(d,"[CDATA[".concat(b,"]]")),(p=(h=this.cbs).oncommentend)===null||p===void 0||p.call(h)),this.startIndex=r+1},t.prototype.onend=function(){var e,r;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n],!0));}(r=(e=this.cbs).onend)===null||r===void 0||r.call(e)},t.prototype.reset=function(){var e,r,n,a;(r=(e=this.cbs).onreset)===null||r===void 0||r.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,(a=(n=this.cbs).onparserinit)===null||a===void 0||a.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},t.prototype.parseComplete=function(e){this.reset(),this.end(e)},t.prototype.getSlice=function(e,r){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var n=this.buffers[0].slice(e-this.bufferOffset,r-this.bufferOffset);r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,r-this.bufferOffset);return n},t.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},t.prototype.write=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".write() after done!"));return}this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++)},t.prototype.end=function(e){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".end() after done!"));return}e&&this.write(e),this.ended=!0,this.tokenizer.end()},t.prototype.pause=function(){this.tokenizer.pause()},t.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndexn.emit("error",a)),e.on("data",a=>r.push(a)),e.on("end",()=>r.push(null));const n=r.pipe(new Ap(this.options));return n}_transform(e,r,n){this.parser.write(e.toString()),n()}_flush(e){this.parser.end(),e()}getItemScope(e){let r=this.itemScopeStack.length-(e?2:1);for(;r>0&&!this.itemScopeStack[r];)r--;return this.itemScopeStack[r]}getDepth(){return this.itemScopeStack.length}onTagOpen(e,r){if(!this.isEmittingReferences){if("id"in r){const a=r.id;this.pendingItemRefsRangeCollecting[a]={events:[],counter:0,ids:[]}}for(const a of Object.values(this.pendingItemRefsRangeCollecting))a.counter++,a.events.push({type:"open",name:e,attributes:r})}this.textBufferStack.push(void 0);let n;if("itemscope"in r){let a;if(this.emittingReferencesItemScopeIdGenerator)a=this.emittingReferencesItemScopeIdGenerator();else{a="itemid"in r&&this.util.createSubject(r.itemid)||this.util.dataFactory.blankNode();for(const o of Object.values(this.pendingItemRefsRangeCollecting))o.ids.push(a)}n={subject:a},this.isEmittingReferences&&(n.blockEmission=!0);const s=this.getItemScope();s&&s.vocab&&(n.vocab=s.vocab),this.itemScopeStack.push(n)}else n=this.getItemScope(),this.itemScopeStack.push(void 0);if(n){if("itemtype"in r)for(const a of this.util.createVocabIris(r.itemtype,n,!1))n.vocab||(n.vocab=this.util.deriveVocab(a.value,this.vocabRegistry)),n.blockEmission||this.emitTriple(n.subject,this.util.dataFactory.namedNode(`${xN.Util.RDF}type`),a);if("lang"in r&&(n.language=r.lang),"xml:lang"in r&&(n.language=r["xml:lang"]),"itemscope"in r&&!this.isEmittingReferences&&"itemref"in r)for(const a of r.itemref.split(/\s+/u))a in this.pendingItemRefsDomain||(this.pendingItemRefsDomain[a]=[]),this.pendingItemRefsDomain[a].push(n),this.tryToEmitReferences(a,n)}"itemprop"in r&&this.handleItemProperties(r.itemprop,!1,n,e,r),"itemprop-reverse"in r&&this.handleItemProperties(r["itemprop-reverse"],!0,n,e,r)}onText(e){if(!this.isEmittingReferences)for(const r of Object.values(this.pendingItemRefsRangeCollecting))r.events.push({type:"text",data:e});for(const r of this.textBufferStack)r&&r.push(e)}onTagClose(){if(!this.isEmittingReferences)for(const[r,n]of Object.entries(this.pendingItemRefsRangeCollecting))n.counter--,n.events.push({type:"close"}),n.counter===0&&(this.pendingItemRefsRangeFinalized[r]=n,delete this.pendingItemRefsRangeCollecting[r],this.tryToEmitReferences(r));const e=this.getItemScope(!0);if(e){const r=this.getDepth();if(e.predicates&&r in e.predicates)for(const[n,a]of Object.entries(e.predicates[r])){const s=this.util.createLiteral(this.textBufferStack[r].join(""),e);this.emitPredicateTriples(e,a,s,n==="reverse"),delete e.predicates[r][n]}}this.itemScopeStack.pop(),this.textBufferStack.pop()}onEnd(){}initializeParser(e){return new lse.Parser({onclosetag:()=>{try{this.onTagClose(),this.htmlParseListener&&this.htmlParseListener.onTagClose()}catch(r){this.emit("error",r)}},onend:()=>{try{this.onEnd(),this.htmlParseListener&&this.htmlParseListener.onEnd()}catch(r){this.emit("error",r)}},onopentag:(r,n)=>{try{this.onTagOpen(r,n),this.htmlParseListener&&this.htmlParseListener.onTagOpen(r,n)}catch(a){this.emit("error",a)}},ontext:r=>{try{this.onText(r),this.htmlParseListener&&this.htmlParseListener.onText(r)}catch(n){this.emit("error",n)}}},{decodeEntities:!0,recognizeSelfClosing:!0,xmlMode:e})}handleItemProperties(e,r,n,a,s){const o=this.getItemScope(!0);if(o){const u=this.getDepth(),c=this.util.createVocabIris(e,o,!0);o.predicates||(o.predicates={}),o.predicates[u]||(o.predicates[u]={});const l=r?"reverse":"forward";o.predicates[u][l]=c;for(const d of this.util.getVocabularyExpansionType(e,o,this.vocabRegistry))c.push(d);if(n&&"itemscope"in s)this.emitPredicateTriples(o,c,n.subject,r),delete o.predicates[u][l];else for(const d of Ap.ITEM_PROPERTY_HANDLERS)if(d.canHandle(a,s)){const f=d.getObject(s,this.util,o);this.emitPredicateTriples(o,c,f,r),delete o.predicates[u][l]}o.predicates[u][l]&&(this.textBufferStack[u]=[])}}emitPredicateTriples(e,r,n,a){if(!e.blockEmission)for(const s of r)a?n.termType!=="Literal"&&this.emitTriple(n,s,e.subject):this.emitTriple(e.subject,s,n)}emitTriple(e,r,n){this.push(this.util.dataFactory.quad(e,r,n,this.defaultGraph))}tryToEmitReferences(e,r){const n=this.pendingItemRefsRangeFinalized[e];if(n){let a;if(r){a=[r];const s=this.pendingItemRefsDomain[e].indexOf(r);this.pendingItemRefsDomain[e].splice(s,1)}else a=this.pendingItemRefsDomain[e],delete this.pendingItemRefsDomain[e];if(a){const s=this.itemScopeStack,o=this.textBufferStack;this.isEmittingReferences=!0;for(const u of a){this.itemScopeStack=[u],this.textBufferStack=[void 0];const c=[...n.ids];this.emittingReferencesItemScopeIdGenerator=()=>c.shift();for(const l of n.events)switch(l.type){case"open":this.onTagOpen(l.name,l.attributes);break;case"text":this.onText(l.data);break;case"close":this.onTagClose();break}}this.emittingReferencesItemScopeIdGenerator=void 0,this.itemScopeStack=s,this.textBufferStack=o,this.isEmittingReferences=!1}}}}Wm.MicrodataRdfParser=Ap;Ap.ITEM_PROPERTY_HANDLERS=[new dse.ItemPropertyHandlerContent,new Va.ItemPropertyHandlerUrl("a","href"),new Va.ItemPropertyHandlerUrl("area","href"),new Va.ItemPropertyHandlerUrl("audio","src"),new Va.ItemPropertyHandlerUrl("embed","src"),new Va.ItemPropertyHandlerUrl("iframe","src"),new Va.ItemPropertyHandlerUrl("img","src"),new Va.ItemPropertyHandlerUrl("link","href"),new Va.ItemPropertyHandlerUrl("object","data"),new Va.ItemPropertyHandlerUrl("source","src"),new Va.ItemPropertyHandlerUrl("track","src"),new Va.ItemPropertyHandlerUrl("video","src"),new RN.ItemPropertyHandlerNumber("data","value"),new RN.ItemPropertyHandlerNumber("meter","value"),new fse.ItemPropertyHandlerTime];(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(HF,t),r(E0,t),r(O0,t),r(R0,t),r(x0,t),r(kF,t),r(QF,t),r(GF,t),r(Wm,t),r(Sl,t)})(VF);Object.defineProperty(km,"__esModule",{value:!0});km.ActorRdfParseHtmlMicrodata=void 0;const pse=Qm,yse=VF;class bse extends pse.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const r=e.headers?e.headers.get("content-type"):null,n=r==null?void 0:r.includes("xml"),a=new yse.MicrodataRdfParser({baseIRI:e.baseIRI,xmlMode:n});a.on("error",e.error),a.on("data",e.emit);const s=a.onEnd;return a.onEnd=()=>{s.call(a),e.end()},{htmlParseListener:a}}}km.ActorRdfParseHtmlMicrodata=bse;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(km,t)})(qF);var WF={},Xm={};Object.defineProperty(Xm,"__esModule",{value:!0});Xm.ActorRdfParseHtmlRdfa=void 0;const _se=Qm,gse=_R;class mse extends _se.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const r=e.headers?e.headers.get("content-type"):null,n=(e.headers&&e.headers.get("content-language"))??void 0,a=r&&r.includes("xml")?"xhtml":"html",s=new gse.RdfaParser({baseIRI:e.baseIRI,profile:a,language:n});s.on("error",e.error),s.on("data",e.emit);const o=s.onEnd;return s.onEnd=()=>{o.call(s),e.end()},{htmlParseListener:s}}}Xm.ActorRdfParseHtmlRdfa=mse;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Xm,t)})(WF);var XF={},Km={},IR={},Jm={},Tl={},I0={};Object.defineProperty(I0,"__esModule",{value:!0});I0.ActorRdfResolveQuadPattern=void 0;const vse=et;class wse extends vse.Actor{constructor(e){super(e)}}I0.ActorRdfResolveQuadPattern=wse;var Ym={};Object.defineProperty(Ym,"__esModule",{value:!0});Ym.ActorRdfResolveQuadPatternSource=void 0;const Sse=I0;class Tse extends Sse.ActorRdfResolveQuadPattern{constructor(e){super(e)}async test(e){return!0}async run(e){const r=await this.getSource(e.context,e.pattern);return await this.getOutput(r,e.pattern,e.context)}async getOutput(e,r,n){return{data:e.match(r.subject,r.predicate,r.object,r.graph,n)}}}Ym.ActorRdfResolveQuadPatternSource=Tse;var Gr={};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.hasContextSingleSourceOfType=Gr.hasContextSingleSource=Gr.getContextSourceUrl=Gr.getContextSourceFirst=Gr.getContextSource=Gr.getContextSources=Gr.getDataSourceContext=Gr.getDataSourceValue=Gr.getDataSourceType=Gr.isDataSourceRawType=void 0;const tp=rr,Ese=et;function Zm(t){return typeof t=="string"||"match"in t}Gr.isDataSourceRawType=Zm;function KF(t){return typeof t=="string"?"":"match"in t?"rdfjsSource":t.type}Gr.getDataSourceType=KF;function PR(t){return Zm(t)?t:t.value}Gr.getDataSourceValue=PR;function Ose(t,e){return Zm(t)||!t.context?e:e.merge(Ese.ActionContext.ensureActionContext(t.context))}Gr.getDataSourceContext=Ose;function Ase(t){return t.get(tp.KeysRdfResolveQuadPattern.sources)}Gr.getContextSources=Ase;function DR(t){return t.get(tp.KeysRdfResolveQuadPattern.source)}Gr.getContextSource=DR;function Rse(t){if(t.has(tp.KeysRdfResolveQuadPattern.source))return t.get(tp.KeysRdfResolveQuadPattern.source);const e=t.get(tp.KeysRdfResolveQuadPattern.sources);if((e==null?void 0:e.length)===1)return e[0]}Gr.getContextSourceFirst=Rse;function xse(t){if(t){let e=PR(t);if(typeof e=="string"){const r=e.indexOf("#");return r>=0&&(e=e.slice(0,r)),e}}}Gr.getContextSourceUrl=xse;function Ise(t){const e=DR(t);return!!(e&&(Zm(e)||e.value))}Gr.hasContextSingleSource=Ise;function Pse(t,e){const r=DR(e);return!!(r&&KF(r)===t&&PR(r))}Gr.hasContextSingleSourceOfType=Pse;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(I0,t),r(Ym,t),r(Gr,t)})(Tl);var P0={},Hi={},ev={};Object.defineProperty(ev,"__esModule",{value:!0});ev.MetadataValidationState=void 0;class Dse{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()}}}ev.MetadataValidationState=Dse;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(ev,t)})(Hi);Object.defineProperty(P0,"__esModule",{value:!0});P0.RdfJsQuadSource=void 0;const Nse=Hi,Cse=Ut,jse=ht,Wl=An,IN=new jse.DataFactory;class hi{constructor(e){this.source=e}static nullifyVariables(e,r){return!e||e.termType==="Variable"||!r&&e.termType==="Quad"&&(0,Wl.someTermsNested)(e,n=>n.termType==="Variable")?void 0:e}static hasDuplicateVariables(e){const r=(0,Wl.filterTermsNested)(e,n=>n.termType==="Variable");return r.length>1&&(0,Wl.uniqTerms)(r).lengthd.termType==="Quad")&&(u=u.filter(d=>(0,Wl.matchPatternComplete)(d,c))),this.setMetadata(u,e,r,n,a).catch(d=>u.destroy(d)),u}async setMetadata(e,r,n,a,s){var d;const o=!!((d=this.source.features)!=null&&d.quotedTripleFiltering);let u;if(this.source.countQuads)u=await this.source.countQuads(hi.nullifyVariables(r,o),hi.nullifyVariables(n,o),hi.nullifyVariables(a,o),hi.nullifyVariables(s,o));else{let f=0;u=await new Promise((h,p)=>{const b=this.source.match(hi.nullifyVariables(r,o),hi.nullifyVariables(n,o),hi.nullifyVariables(a,o),hi.nullifyVariables(s,o));b.on("error",p),b.on("end",()=>h(f)),b.on("data",()=>f++)})}const c=IN.quad(r,n,a,s),l=!o&&(0,Wl.someTerms)(c,f=>f.termType==="Quad")||hi.hasDuplicateVariables(c);e.setProperty("metadata",{state:new Nse.MetadataValidationState,cardinality:{type:l?"estimate":"exact",value:u},canContainUndefs:!1})}}P0.RdfJsQuadSource=hi;Object.defineProperty(Jm,"__esModule",{value:!0});Jm.ActorRdfResolveQuadPatternRdfJsSource=void 0;const a1=Tl,Mse=P0;class Fse extends a1.ActorRdfResolveQuadPatternSource{constructor(e){super(e)}async test(e){if(!(0,a1.hasContextSingleSourceOfType)("rdfjsSource",e.context))throw new Error(`${this.name} requires a single source with an rdfjsSource to be present in the context.`);const r=(0,a1.getContextSource)(e.context);if(!r||typeof r=="string"||!("match"in r)&&!r.value.match)throw new Error(`${this.name} received an invalid rdfjsSource.`);return!0}async getSource(e){const r=(0,a1.getContextSource)(e);return new Mse.RdfJsQuadSource("match"in r?r:r.value)}}Jm.ActorRdfResolveQuadPatternRdfJsSource=Fse;var JF={};Object.defineProperty(JF,"__esModule",{value:!0});(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Jm,t),r(JF,t),r(P0,t)})(IR);var tv={},rv={};Object.defineProperty(rv,"__esModule",{value:!0});rv.ActorRdfResolveHypermedia=void 0;const Lse=et;class Bse extends Lse.Actor{constructor(e,r){super(e),this.sourceType=r}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)}}rv.ActorRdfResolveHypermedia=Bse;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(rv,t)})(tv);var D0={},YF={},Jf={},Yf={},N0={};Object.defineProperty(N0,"__esModule",{value:!0});N0.TermDictionaryNumberRecordFullTerms=void 0;const $se=ht,PN=nr;class Use{constructor(e=new $se.DataFactory){this.lastId=0,this.dictionary={},this.reverseDictionary={},this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const r=(0,PN.termToString)(e);let n=this.dictionary[r];return n===void 0&&(n=this.lastId++,this.dictionary[r]=n,this.reverseDictionary[n]=e),n}encodeOptional(e){const r=(0,PN.termToString)(e);return this.dictionary[r]}decode(e){const r=this.reverseDictionary[e];if(r===void 0)throw new Error(`The value ${e} is not present in this dictionary`);return r}*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")}}N0.TermDictionaryNumberRecordFullTerms=Use;var C0={},Nf={},ds={};(function(t){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 e=An;t.QUAD_TERM_NAMES_INVERSE=Object.fromEntries(e.QUAD_TERM_NAMES.map((l,d)=>[l,d]));function r(l,d){if(l.length===1||d.every(p=>p!==void 0))return 0;const f=[];for(let p=0;p({score:n(p,f),index:b})).sort((p,b)=>b.score-p.score)[0].index}t.getBestIndex=r;function n(l,d){return l.map((f,h)=>d.includes(f)?l.length-h:0).reduce((f,h)=>f+h,0)}t.getComponentOrderScore=n;function a(l,d){return l.map(f=>{const h=t.QUAD_TERM_NAMES_INVERSE[f];return d[h]})}t.orderQuadComponents=a;function s(l,d){const f=l.map(h=>{if(h){if(h.termType==="Quad"&&u(h))return;const p=d.encodeOptional(h);return p===void 0?"none":p}return h});if(!f.includes("none"))return f}t.encodeOptionalTerms=s;function o(l,d,f,h,p){let b=!1;return[[l||void 0,d||void 0,f||void 0,h||void 0].map(E=>{if(E){if(E.termType==="Variable")return;if(E.termType==="Quad"){if(p)return E;b=!0;return}}return E}),b]}t.quadToPattern=o;function u(l){for(const d of e.QUAD_TERM_NAMES){const f=l[d];if(f.termType==="Variable"||f.termType==="Quad"&&u(f))return!0}return!1}t.quadHasVariables=u;function c(l){return l.map(d=>(d==null?void 0:d.termType)==="Quad"&&u(d))}t.arePatternsQuoted=c})(ds);Object.defineProperty(Nf,"__esModule",{value:!0});Nf.RdfStoreIndexNestedMap=void 0;const YS=ds;class qse{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedMap=new Map}set(e,r){const n=this.nestedMap;let a=n.get(e[0]);a||(a=new Map,n.set(e[0],a));let s=a.get(e[1]);s||(s=new Map,a.set(e[1],s));let o=s.get(e[2]);o||(o=new Map,s.set(e[2],o));const u=o.has(e[3]);return u||o.set(e[3],r),!u}remove(e){const r=this.nestedMap,n=r.get(e[0]);if(!n)return!1;const a=n.get(e[1]);if(!a)return!1;const s=a.get(e[2]);if(!s)return!1;const o=s.delete(e[3]);return o&&s.size===0&&(a.delete(e[2]),a.size===0&&(n.delete(e[1]),n.size===0&&r.delete(e[0]))),o}get(e){const r=(0,YS.encodeOptionalTerms)(e,this.dictionary);if(!(!r||r.includes(void 0)))return this.getEncoded(r)}getEncoded(e){const r=this.nestedMap.get(e[0]);if(!r)return;const n=r.get(e[1]);if(!n)return;const a=n.get(e[2]);if(a)return a.get(e[3])}*find(e){const r=(0,YS.encodeOptionalTerms)(e,this.dictionary);if(!r)return;const[n,a,s,o]=r,[u,c,l,d]=e;let f,h,p,b,_,E,w;const O=this.nestedMap,A=n!==void 0?O.has(n)?[n]:[]:O.keys();for(const T of A){_=O.get(T),f=u||this.dictionary.decode(T);const I=a!==void 0?_.has(a)?[a]:[]:_.keys();for(const D of I){E=_.get(D),h=c||this.dictionary.decode(D);const U=s!==void 0?E.has(s)?[s]:[]:E.keys();for(const H of U){w=E.get(H),p=l||this.dictionary.decode(H);const N=o!==void 0?w.has(o)?[o]:[]:w.keys();for(const x of N)b=d||this.dictionary.decode(x),yield[f,h,p,b]}}}}*findEncoded(e,r){const[n,a,s,o]=e;let u,c,l;const d=this.nestedMap,f=n!==void 0?d.has(n)?[n]:[]:d.keys();for(const h of f){u=d.get(h);const p=a!==void 0?u.has(a)?[a]:[]:u.keys();for(const b of p){c=u.get(b);const _=s!==void 0?c.has(s)?[s]:[]:c.keys();for(const E of _){l=c.get(E);const w=o!==void 0?l.has(o)?[o]:[]:l.keys();for(const O of w)yield[h,b,E,O]}}}}count(e){let r=0;const n=(0,YS.encodeOptionalTerms)(e,this.dictionary);if(!n)return 0;const a=n[0],s=n[1],o=n[2],u=n[3];let c,l,d;const f=this.nestedMap,h=a!==void 0?f.has(a)?[a]:[]:f.keys();for(const p of h){c=f.get(p);const b=s!==void 0?c.has(s)?[s]:[]:c.keys();for(const _ of b){l=c.get(_);const E=o!==void 0?l.has(o)?[o]:[]:l.keys();for(const w of E)d=l.get(w),u!==void 0?d.has(u)&&r++:r+=d.size}}return r}}Nf.RdfStoreIndexNestedMap=qse;Object.defineProperty(C0,"__esModule",{value:!0});C0.TermDictionaryQuotedIndexed=void 0;const Vse=ht,ZS=Nf,DN=ds;class ka{constructor(e,r=new Vse.DataFactory){this.quotedTriplesDictionary=[],this.features={quotedTriples:!0},this.plainTermDictionary=e;const n={indexCombinations:[],indexConstructor:void 0,dictionary:this,dataFactory:r};this.quotedTriplesReverseDictionaries=[new ZS.RdfStoreIndexNestedMap(n),new ZS.RdfStoreIndexNestedMap(n),new ZS.RdfStoreIndexNestedMap(n)],this.dataFactory=r}encode(e){return e.termType==="Quad"?this.encodeQuotedTriple(e,!1):this.plainTermDictionary.encode(e)}encodeQuotedTriple(e,r){if(e.graph.termType!=="DefaultGraph")throw new Error("Encoding of quoted quads outside of the default graph is not allowed");const n=(0,DN.encodeOptionalTerms)([e.subject,e.predicate,e.object,e.graph],this),a=n&&n.every(c=>c!==void 0)?this.quotedTriplesReverseDictionaries[0].getEncoded(n):void 0;if(a!==void 0||r)return a===void 0?void 0:ka.BITMASK|a;const s=[this.encode(e.subject),this.encode(e.predicate),this.encode(e.object)],o=this.quotedTriplesDictionary.length+1;this.quotedTriplesDictionary.push(s);const u=this.encode(this.dataFactory.defaultGraph());return this.quotedTriplesReverseDictionaries[0].set([s[0],s[1],s[2],u],o),this.quotedTriplesReverseDictionaries[1].set([s[1],s[2],s[0],u],o),this.quotedTriplesReverseDictionaries[2].set([s[2],s[0],s[1],u],o),ka.BITMASK|o}encodeOptional(e){return e.termType==="Quad"?this.encodeQuotedTriple(e,!0):this.plainTermDictionary.encodeOptional(e)}decode(e){if(ka.BITMASK&e){const r=(~ka.BITMASK&e)-1;if(r>=this.quotedTriplesDictionary.length)throw new Error(`The value ${e} is not present in the quoted triples range of the dictionary`);const n=this.quotedTriplesDictionary[r];return this.dataFactory.quad(this.decode(n[0]),this.decode(n[1]),this.decode(n[2]))}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.keys())yield ka.BITMASK|1+e}*findQuotedTriples(e){for(const r of this.findQuotedTriplesEncoded(e))yield this.decode(r)}*findQuotedTriplesEncoded(e){const[r,n]=(0,DN.quadToPattern)(e.subject,e.predicate,e.object,e.graph,!0);for(const a of this.patternToIterable(r[0]))for(const s of this.patternToIterable(r[1]))for(const o of this.patternToIterable(r[2]))for(const u of this.patternToIterable(r[3]))if(a&&s||!s&&!o){const c=[a,s,o,u];for(const l of this.quotedTriplesReverseDictionaries[0].findEncoded(c,r))yield ka.BITMASK|this.quotedTriplesReverseDictionaries[0].getEncoded(l)}else if(!a&&s){const c=[s,o,a,u];for(const l of this.quotedTriplesReverseDictionaries[1].findEncoded(c,r))yield ka.BITMASK|this.quotedTriplesReverseDictionaries[1].getEncoded(l)}else{const c=[o,a,s,u];for(const l of this.quotedTriplesReverseDictionaries[2].findEncoded(c,r))yield ka.BITMASK|this.quotedTriplesReverseDictionaries[2].getEncoded(l)}}*patternToIterable(e){if((e==null?void 0:e.termType)==="Quad"){yield*this.findQuotedTriplesEncoded(e);return}if(e===void 0){yield void 0;return}const r=this.encodeOptional(e);r!==void 0&&(yield r)}}ka.BITMASK=1<<31;C0.TermDictionaryQuotedIndexed=ka;var j0={};Object.defineProperty(j0,"__esModule",{value:!0});j0.RdfStoreIndexNestedMapQuoted=void 0;const Zf=ds,Hse=Nf;class kse extends Hse.RdfStoreIndexNestedMap{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*getQuotedPatternKeys(e,r){for(const n of this.dictionary.findQuotedTriplesEncoded(r))e.has(n)&&(yield n)}*find(e){const r=(0,Zf.encodeOptionalTerms)(e,this.dictionary);if(!r)return;const[n,a,s,o]=r,[u,c,l,d]=e,[f,h,p,b]=(0,Zf.arePatternsQuoted)(e);let _,E,w,O,A,T,I;const D=this.nestedMap,U=u!==void 0?f?this.getQuotedPatternKeys(D,u):D.has(n)?[n]:[]:D.keys();for(const H of U){A=D.get(H),_=!f&&u?u:this.dictionary.decode(H);const N=c!==void 0?h?this.getQuotedPatternKeys(A,c):A.has(a)?[a]:[]:A.keys();for(const x of N){T=A.get(x),E=!h&&c?c:this.dictionary.decode(x);const F=l!==void 0?p?this.getQuotedPatternKeys(T,l):T.has(s)?[s]:[]:T.keys();for(const X of F){I=T.get(X),w=!p&&l?l:this.dictionary.decode(X);const ne=d!==void 0?b?this.getQuotedPatternKeys(I,d):I.has(o)?[o]:[]:I.keys();for(const $ of ne)O=!b&&d?d:this.dictionary.decode($),yield[_,E,w,O]}}}}*findEncoded(e,r){const[n,a,s,o]=e,[u,c,l,d]=r,[f,h,p,b]=(0,Zf.arePatternsQuoted)(r);let _,E,w;const O=this.nestedMap,A=u!==void 0?f?this.getQuotedPatternKeys(O,u):O.has(n)?[n]:[]:O.keys();for(const T of A){_=O.get(T);const I=c!==void 0?h?this.getQuotedPatternKeys(_,c):_.has(a)?[a]:[]:_.keys();for(const D of I){E=_.get(D);const U=l!==void 0?p?this.getQuotedPatternKeys(E,l):E.has(s)?[s]:[]:E.keys();for(const H of U){w=E.get(H);const N=d!==void 0?b?this.getQuotedPatternKeys(w,d):w.has(o)?[o]:[]:w.keys();for(const x of N)yield[Number.parseInt(T,10),Number.parseInt(D,10),Number.parseInt(H,10),Number.parseInt(x,10)]}}}}count(e){let r=0;const n=(0,Zf.encodeOptionalTerms)(e,this.dictionary);if(!n)return 0;const[a,s,o,u]=n,[c,l,d,f]=e,[h,p,b,_]=(0,Zf.arePatternsQuoted)(e);let E,w,O;const A=this.nestedMap,T=c!==void 0?h?this.getQuotedPatternKeys(A,c):A.has(a)?[a]:[]:A.keys();for(const I of T){E=A.get(I);const D=l!==void 0?p?this.getQuotedPatternKeys(E,l):E.has(s)?[s]:[]:E.keys();for(const U of D){w=E.get(U);const H=d!==void 0?b?this.getQuotedPatternKeys(w,d):w.has(o)?[o]:[]:w.keys();for(const N of H)O=w.get(N),f!==void 0?_?r+=[...this.getQuotedPatternKeys(O,f)].length:O.has(u)&&r++:r+=O.size}}return r}}j0.RdfStoreIndexNestedMapQuoted=kse;var NN;function ZF(){if(NN)return Yf;NN=1,Object.defineProperty(Yf,"__esModule",{value:!0}),Yf.RdfStore=void 0;const t=Ut,e=ht,r=An,n=t7(),a=N0,s=C0,o=j0,u=ds;let c=class Hh{constructor(d){this.features={quotedTripleFiltering:!0},this._size=0,this.options=d,this.dataFactory=d.dataFactory,this.dictionary=d.dictionary,this.indexesWrapped=Hh.constructIndexesWrapped(d),this.indexesWrappedComponentOrders=this.indexesWrapped.map(f=>f.componentOrder)}static createDefault(){return new Hh({indexCombinations:Hh.DEFAULT_INDEX_COMBINATIONS,indexConstructor:d=>new o.RdfStoreIndexNestedMapQuoted(d),dictionary:new s.TermDictionaryQuotedIndexed(new a.TermDictionaryNumberRecordFullTerms),dataFactory:new e.DataFactory})}static constructIndexesWrapped(d){const f=[];if(d.indexCombinations.length===0)throw new Error("At least one index combination is required");for(const h of d.indexCombinations){if(!Hh.isCombinationValid(h))throw new Error(`Invalid index combination: ${h}`);f.push({index:d.indexConstructor(d),componentOrder:h,componentOrderInverse:Object.fromEntries(h.map((p,b)=>[p,b]))})}return f}static isCombinationValid(d){for(const f of r.QUAD_TERM_NAMES)if(!d.includes(f))return!1;return d.length===4}get size(){return this._size}addQuad(d){const f=[this.dictionary.encode(d.subject),this.dictionary.encode(d.predicate),this.dictionary.encode(d.object),this.dictionary.encode(d.graph)];let h=!1;for(const p of this.indexesWrapped)h=p.index.set((0,u.orderQuadComponents)(p.componentOrder,f),!0);return h?(this._size++,!0):!1}removeQuad(d){const f=[this.dictionary.encodeOptional(d.subject),this.dictionary.encodeOptional(d.predicate),this.dictionary.encodeOptional(d.object),this.dictionary.encodeOptional(d.graph)];if(f.includes(void 0))return!1;let h=!1;for(const p of this.indexesWrapped)if(h=p.index.remove((0,u.orderQuadComponents)(p.componentOrder,f)),!h)break;return h?(this._size--,!0):!1}remove(d){return d.on("data",f=>this.removeQuad(f)),d}removeMatches(d,f,h,p){return this.remove(this.match(d,f,h,p))}deleteGraph(d){return typeof d=="string"&&(d=this.dataFactory.namedNode(d)),this.removeMatches(void 0,void 0,void 0,d)}import(d){return d.on("data",f=>this.addQuad(f)),d}*readQuads(d,f,h,p){const b=!!this.dictionary.features.quotedTriples&&Object.values(this.indexesWrapped).every(A=>A.index.features.quotedTripleFiltering),[_,E]=(0,u.quadToPattern)(d,f,h,p,b),w=this.indexesWrapped[(0,u.getBestIndex)(this.indexesWrappedComponentOrders,_)],O=(0,u.orderQuadComponents)(w.componentOrder,_);for(const A of w.index.find(O)){const T=this.dataFactory.quad(A[w.componentOrderInverse.subject],A[w.componentOrderInverse.predicate],A[w.componentOrderInverse.object],A[w.componentOrderInverse.graph]);E?(0,r.matchPattern)(T,d,f,h,p)&&(yield T):yield T}}getQuads(d,f,h,p){return[...this.readQuads(d,f,h,p)]}match(d,f,h,p){return(0,t.wrap)(this.readQuads(d,f,h,p))}countQuads(d,f,h,p){const b=!!this.dictionary.features.quotedTriples&&Object.values(this.indexesWrapped).every(O=>O.index.features.quotedTripleFiltering),[_]=(0,u.quadToPattern)(d,f,h,p,b);if(_.every(O=>O===void 0))return this.size;const E=this.indexesWrapped[(0,u.getBestIndex)(this.indexesWrappedComponentOrders,_)],w=(0,u.orderQuadComponents)(E.componentOrder,_);return E.index.count(w)}asDataset(){return new n.DatasetCoreWrapper(this)}};return c.DEFAULT_INDEX_COMBINATIONS=[["graph","subject","predicate","object"],["graph","predicate","object","subject"],["graph","object","subject","predicate"]],Yf.RdfStore=c,Yf}var CN;function t7(){if(CN)return Jf;CN=1,Object.defineProperty(Jf,"__esModule",{value:!0}),Jf.DatasetCoreWrapper=void 0;const t=ZF();let e=class e7{constructor(n){this.store=n}get size(){return this.store.size}add(n){return this.store.addQuad(n),this}delete(n){return this.store.removeQuad(n),this}has(n){for(const a of this.store.readQuads(n.subject,n.predicate,n.object,n.graph))return!0;return!1}match(n,a,s,o){const u=new t.RdfStore(this.store.options);for(const c of this.store.readQuads(n,a,s,o))u.addQuad(c);return new e7(u)}[Symbol.iterator](){return this.store.readQuads()}};return Jf.DatasetCoreWrapper=e,Jf}var r7={};Object.defineProperty(r7,"__esModule",{value:!0});var nv={};Object.defineProperty(nv,"__esModule",{value:!0});nv.TermDictionaryNumberMap=void 0;const Qse=ht,eT=nr;class Gse{constructor(e=new Qse.DataFactory){this.lastId=0,this.dictionary=new Map,this.reverseDictionary=new Map,this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const r=(0,eT.termToString)(e);let n=this.dictionary.get(r);return n===void 0&&(n=this.lastId++,this.dictionary.set(r,n),this.reverseDictionary.set(n,r)),n}encodeOptional(e){const r=(0,eT.termToString)(e);return this.dictionary.get(r)}decode(e){const r=this.reverseDictionary.get(e);if(r===void 0)throw new Error(`The value ${e} is not present in this dictionary`);return(0,eT.stringToTerm)(r,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")}}nv.TermDictionaryNumberMap=Gse;var iv={};Object.defineProperty(iv,"__esModule",{value:!0});iv.TermDictionaryNumberRecord=void 0;const zse=ht,tT=nr;class Wse{constructor(e=new zse.DataFactory){this.lastId=0,this.dictionary={},this.reverseDictionary={},this.features={quotedTriples:!1},this.dataFactory=e}encode(e){const r=(0,tT.termToString)(e);let n=this.dictionary[r];return n===void 0&&(n=this.lastId++,this.dictionary[r]=n,this.reverseDictionary[n]=r),n}encodeOptional(e){const r=(0,tT.termToString)(e);return this.dictionary[r]}decode(e){const r=this.reverseDictionary[e];if(r===void 0)throw new Error(`The value ${e} is not present in this dictionary`);return(0,tT.stringToTerm)(r,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")}}iv.TermDictionaryNumberRecord=Wse;var av={};Object.defineProperty(av,"__esModule",{value:!0});av.TermDictionaryQuoted=void 0;const Xse=ht,Kse=An;class So{constructor(e,r,n=new Xse.DataFactory){this.features={quotedTriples:!0},this.plainTermDictionary=e,this.quotedTriplesDictionary=r,this.dataFactory=n}encode(e){return e.termType==="Quad"?So.BITMASK|1+this.quotedTriplesDictionary.encode(e):this.plainTermDictionary.encode(e)}encodeOptional(e){if(e.termType==="Quad"){const r=this.quotedTriplesDictionary.encodeOptional(e);return r===void 0?r:So.BITMASK|1+r}return this.plainTermDictionary.encodeOptional(e)}decode(e){if(So.BITMASK&e){const r=(~So.BITMASK&e)-1;return this.quotedTriplesDictionary.decode(r)}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.encodings())yield So.BITMASK|1+e}*findQuotedTriples(e){for(const r of this.findQuotedTriplesEncoded(e))yield this.decode(r)}*findQuotedTriplesEncoded(e){for(let r of this.quotedTriplesDictionary.encodings()){r=So.BITMASK|1+r;const n=this.decode(r);(0,Kse.matchPattern)(n,e.subject,e.predicate,e.object,e.graph)&&(yield r)}}}So.BITMASK=1<<31;av.TermDictionaryQuoted=So;var sv={};Object.defineProperty(sv,"__esModule",{value:!0});sv.TermDictionaryQuotedReferential=void 0;const Jse=ht,Yse=An,Zse=ds;class _a{constructor(e,r=new Jse.DataFactory){this.quotedTriplesDictionary=[],this.quotedTriplesReverseDictionary={},this.features={quotedTriples:!0},this.plainTermDictionary=e,this.dataFactory=r}encode(e){return e.termType==="Quad"?this.encodeQuotedTriple(e,!1):this.plainTermDictionary.encode(e)}encodeQuotedTriple(e,r){var n;if(e.graph.termType!=="DefaultGraph")throw new Error("Encoding of quoted quads outside of the default graph is not allowed");const a=(n=(0,Zse.encodeOptionalTerms)([e.subject,e.predicate,e.object,void 0],this))===null||n===void 0?void 0:n.slice(0,3),s=a&&a.every(c=>c!==void 0)?this.quotedTriplesReverseDictionary[a.join(_a.SEPARATOR)]:void 0;if(s!==void 0||r)return s===void 0?void 0:_a.BITMASK|s;const o=[this.encode(e.subject),this.encode(e.predicate),this.encode(e.object)],u=this.quotedTriplesDictionary.length+1;return this.quotedTriplesDictionary.push(o),this.quotedTriplesReverseDictionary[o.join(_a.SEPARATOR)]=u,_a.BITMASK|u}encodeOptional(e){return e.termType==="Quad"?this.encodeQuotedTriple(e,!0):this.plainTermDictionary.encodeOptional(e)}decode(e){if(_a.BITMASK&e){const r=(~_a.BITMASK&e)-1;if(r>=this.quotedTriplesDictionary.length)throw new Error(`The value ${e} is not present in the quoted triples range of the dictionary`);const n=this.quotedTriplesDictionary[r];return this.dataFactory.quad(this.decode(n[0]),this.decode(n[1]),this.decode(n[2]))}return this.plainTermDictionary.decode(e)}*encodings(){for(const e of this.plainTermDictionary.encodings())yield e;for(const e of this.quotedTriplesDictionary.keys())yield _a.BITMASK|1+e}*findQuotedTriples(e){for(const r of this.findQuotedTriplesEncoded(e))yield this.decode(r)}*findQuotedTriplesEncoded(e){for(let r of this.quotedTriplesDictionary.keys()){r=_a.BITMASK|1+r;const n=this.decode(r);(0,Yse.matchPattern)(n,e.subject,e.predicate,e.object,e.graph)&&(yield r)}}}_a.BITMASK=1<<31;_a.SEPARATOR="_";sv.TermDictionaryQuotedReferential=_a;var ov={};Object.defineProperty(ov,"__esModule",{value:!0});ov.TermDictionarySymbol=void 0;const eoe=ht,jN=nr;class toe{constructor(e=new eoe.DataFactory){this.features={quotedTriples:!1},this.dataFactory=e}encode(e){return Symbol.for(`rdf::${(0,jN.termToString)(e)}`)}encodeOptional(e){return this.encode(e)}decode(e){const r=Symbol.keyFor(e);if(r===void 0)throw new Error(`The value ${String(e)} is not present in this dictionary`);return(0,jN.stringToTerm)(r.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")}}ov.TermDictionarySymbol=toe;var n7={};Object.defineProperty(n7,"__esModule",{value:!0});var M0={};Object.defineProperty(M0,"__esModule",{value:!0});M0.RdfStoreIndexNestedMapRecursive=void 0;const MN=ds;class roe{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedMap=new Map}set(e,r){let n=this.nestedMap,a=!1;for(const[s,o]of e.entries()){const u=n;let c=u.get(o);c?s===e.length-1&&(a=!0):(c=s===e.length-1?r:new Map,u.set(o,c)),n=c}return!a}remove(e){const r=this.nestedMap,n=r.get(e[0]);if(!n)return!1;const a=n.get(e[1]);if(!a)return!1;const s=a.get(e[2]);if(!s)return!1;const o=s.delete(e[3]);return o&&s.size===0&&(a.delete(e[2]),a.size===0&&(n.delete(e[1]),n.size===0&&r.delete(e[0]))),o}get(e){const r=(0,MN.encodeOptionalTerms)(e,this.dictionary);if(!(!r||r.includes(void 0)))return this.getEncoded(r)}getEncoded(e){const r=this.nestedMap.get(e[0]);if(!r)return;const n=r.get(e[1]);if(!n)return;const a=n.get(e[2]);if(a)return a.get(e[3])}*find(e){const r=(0,MN.encodeOptionalTerms)(e,this.dictionary);if(r)for(const n of this.findEncoded(r,e))yield[r[0]!==void 0?e[0]:this.dictionary.decode(n[0]),r[1]!==void 0?e[1]:this.dictionary.decode(n[1]),r[2]!==void 0?e[2]:this.dictionary.decode(n[2]),r[3]!==void 0?e[3]:this.dictionary.decode(n[3])]}*findEncoded(e,r){return yield*this.findEncodedInner(0,e,r,this.nestedMap,[])}*findEncodedInner(e,r,n,a,s){if(e===r.length)yield[...s];else{const o=r[e];if(n[e]){const c=o;if(c!==void 0){const l=a.get(c);l&&(s[e]=o,yield*this.findEncodedInner(e+1,r,n,l,s))}}else for(const[c,l]of a.entries())s[e]=c,yield*this.findEncodedInner(e+1,r,n,l,s)}}count(e){return this.countInner(0,e,this.nestedMap)}countInner(e,r,n){const a=r[e];let s=0;if(a){const o=this.dictionary.encodeOptional(a);if(o!==void 0){if(e===r.length-1)return n.has(o)?1:0;const u=n.get(o);u&&(s+=this.countInner(e+1,r,u))}}else{if(e===r.length-1)return n.size;for(const o of n.values())s+=this.countInner(e+1,r,o)}return s}}M0.RdfStoreIndexNestedMapRecursive=roe;var uv={};Object.defineProperty(uv,"__esModule",{value:!0});uv.RdfStoreIndexNestedMapRecursiveQuoted=void 0;const FN=ds,noe=M0;class ioe extends noe.RdfStoreIndexNestedMapRecursive{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*findEncoded(e,r){return yield*this.findEncodedInnerQuoted(0,e,r,(0,FN.arePatternsQuoted)(r),this.nestedMap,[])}*findEncodedInnerQuoted(e,r,n,a,s,o){if(e===r.length)yield[...o];else{const u=r[e],c=n[e];if(c)if(a[e]){const l=this.dictionary.findQuotedTriplesEncoded(c);for(const d of l){const f=s.get(d);f&&(o[e]=d,yield*this.findEncodedInnerQuoted(e+1,r,n,a,f,o))}}else{const l=u;if(l!==void 0){const d=s.get(l);d&&(o[e]=u,yield*this.findEncodedInnerQuoted(e+1,r,n,a,d,o))}}else for(const[l,d]of s.entries())o[e]=l,yield*this.findEncodedInnerQuoted(e+1,r,n,a,d,o)}}countInner(e,r,n){const a=r[e];let s=0;if(a)if(a.termType==="Quad"&&(0,FN.quadHasVariables)(a)){const o=this.dictionary.findQuotedTriplesEncoded(a);for(const u of o)if(e===r.length-1)n.has(u)&&s++;else{const c=n.get(u);c&&(s+=this.countInner(e+1,r,c))}}else{const o=this.dictionary.encodeOptional(a);if(o!==void 0){if(e===r.length-1)return n.has(o)?1:0;const u=n.get(o);u&&(s+=this.countInner(e+1,r,u))}}else{if(e===r.length-1)return n.size;for(const o of n.values())s+=this.countInner(e+1,r,o)}return s}}uv.RdfStoreIndexNestedMapRecursiveQuoted=ioe;var F0={};Object.defineProperty(F0,"__esModule",{value:!0});F0.RdfStoreIndexNestedRecord=void 0;const rT=ds;class aoe{constructor(e){this.features={quotedTripleFiltering:!1},this.dictionary=e.dictionary,this.nestedRecords={}}set(e,r){const n=this.nestedRecords,a=n[e[0]]||(n[e[0]]={}),s=a[e[1]]||(a[e[1]]={}),o=s[e[2]]||(s[e[2]]={});return o[e[3]]?!1:(o[e[3]]=r,!0)}remove(e){const r=this.nestedRecords,n=r[e[0]];if(!n)return!1;const a=n[e[1]];if(!a)return!1;const s=a[e[2]];return!s||!s[e[3]]?!1:(delete s[e[3]],Object.keys(s).length===0&&(delete a[e[2]],Object.keys(a).length===0&&(delete n[e[1]],Object.keys(n).length===0&&delete r[e[0]])),!0)}get(e){const r=(0,rT.encodeOptionalTerms)(e,this.dictionary);if(!(!r||r.includes(void 0)))return this.getEncoded(r)}getEncoded(e){var r,n,a;return(a=(n=(r=this.nestedRecords[e[0]])===null||r===void 0?void 0:r[e[1]])===null||n===void 0?void 0:n[e[2]])===null||a===void 0?void 0:a[e[3]]}*find(e){const r=(0,rT.encodeOptionalTerms)(e,this.dictionary);if(!r)return;const[n,a,s,o]=r,[u,c,l,d]=e;let f,h,p,b,_,E,w;const O=this.nestedRecords,A=n!==void 0?n in O?[n]:[]:Object.keys(O);for(const T of A){_=O[T],f=u||this.dictionary.decode(Number.parseInt(T,10));const I=a!==void 0?a in _?[a]:[]:Object.keys(_);for(const D of I){E=_[D],h=c||this.dictionary.decode(Number.parseInt(D,10));const U=s!==void 0?s in E?[s]:[]:Object.keys(E);for(const H of U){w=E[H],p=l||this.dictionary.decode(Number.parseInt(H,10));const N=o!==void 0?o in w?[o]:[]:Object.keys(w);for(const x of N)b=d||this.dictionary.decode(Number.parseInt(x,10)),yield[f,h,p,b]}}}}*findEncoded(e,r){const[n,a,s,o]=e;let u,c,l;const d=this.nestedRecords,f=n!==void 0?n in d?[n]:[]:Object.keys(d);for(const h of f){u=d[h];const p=a!==void 0?a in u?[a]:[]:Object.keys(u);for(const b of p){c=u[b];const _=s!==void 0?s in c?[s]:[]:Object.keys(c);for(const E of _){l=c[E];const w=o!==void 0?o in l?[o]:[]:Object.keys(l);for(const O of w)yield[Number.parseInt(h,10),Number.parseInt(b,10),Number.parseInt(E,10),Number.parseInt(O,10)]}}}}count(e){let r=0;const n=(0,rT.encodeOptionalTerms)(e,this.dictionary);if(!n)return 0;const a=n[0],s=n[1],o=n[2],u=n[3];let c,l,d;const f=this.nestedRecords,h=a!==void 0?a in f?[a]:[]:Object.keys(f);for(const p of h){c=f[p];const b=s!==void 0?s in c?[s]:[]:Object.keys(c);for(const _ of b){l=c[_];const E=o!==void 0?o in l?[o]:[]:Object.keys(l);for(const w of E)d=l[w],u!==void 0?u in d&&r++:r+=Object.keys(d).length}}return r}}F0.RdfStoreIndexNestedRecord=aoe;var cv={};Object.defineProperty(cv,"__esModule",{value:!0});cv.RdfStoreIndexNestedRecordQuoted=void 0;const eh=ds,soe=F0;class ooe extends soe.RdfStoreIndexNestedRecord{constructor(e){super(e),this.features={quotedTripleFiltering:!0}}*getQuotedPatternKeys(e,r){for(const n of this.dictionary.findQuotedTriplesEncoded(r))n in e&&(yield n)}*find(e){const r=(0,eh.encodeOptionalTerms)(e,this.dictionary);if(!r)return;const[n,a,s,o]=r,[u,c,l,d]=e,[f,h,p,b]=(0,eh.arePatternsQuoted)(e);let _,E,w,O,A,T,I;const D=this.nestedRecords,U=u!==void 0?f?this.getQuotedPatternKeys(D,u):n in D?[n]:[]:Object.keys(D);for(const H of U){A=D[H],_=!f&&u?u:this.dictionary.decode(Number.parseInt(H,10));const N=c!==void 0?h?this.getQuotedPatternKeys(A,c):a in A?[a]:[]:Object.keys(A);for(const x of N){T=A[x],E=!h&&c?c:this.dictionary.decode(Number.parseInt(x,10));const F=l!==void 0?p?this.getQuotedPatternKeys(T,l):s in T?[s]:[]:Object.keys(T);for(const X of F){I=T[X],w=!p&&l?l:this.dictionary.decode(Number.parseInt(X,10));const ne=d!==void 0?b?this.getQuotedPatternKeys(I,d):o in I?[o]:[]:Object.keys(I);for(const $ of ne)O=!b&&d?d:this.dictionary.decode(Number.parseInt($,10)),yield[_,E,w,O]}}}}*findEncoded(e,r){const[n,a,s,o]=e,[u,c,l,d]=r,[f,h,p,b]=(0,eh.arePatternsQuoted)(r);let _,E,w;const O=this.nestedRecords,A=u!==void 0?f?this.getQuotedPatternKeys(O,u):n in O?[n]:[]:Object.keys(O);for(const T of A){_=O[T];const I=c!==void 0?h?this.getQuotedPatternKeys(_,c):a in _?[a]:[]:Object.keys(_);for(const D of I){E=_[D];const U=l!==void 0?p?this.getQuotedPatternKeys(E,l):s in E?[s]:[]:Object.keys(E);for(const H of U){w=E[H];const N=d!==void 0?b?this.getQuotedPatternKeys(w,d):o in w?[o]:[]:Object.keys(w);for(const x of N)yield[Number.parseInt(T,10),Number.parseInt(D,10),Number.parseInt(H,10),Number.parseInt(x,10)]}}}}count(e){let r=0;const n=(0,eh.encodeOptionalTerms)(e,this.dictionary);if(!n)return 0;const[a,s,o,u]=n,[c,l,d,f]=e,[h,p,b,_]=(0,eh.arePatternsQuoted)(e);let E,w,O;const A=this.nestedRecords,T=c!==void 0?h?this.getQuotedPatternKeys(A,c):a in A?[a]:[]:Object.keys(A);for(const I of T){E=A[I];const D=l!==void 0?p?this.getQuotedPatternKeys(E,l):s in E?[s]:[]:Object.keys(E);for(const U of D){w=E[U];const H=d!==void 0?b?this.getQuotedPatternKeys(w,d):o in w?[o]:[]:Object.keys(w);for(const N of H)O=w[N],f!==void 0?_?r+=[...this.getQuotedPatternKeys(O,f)].length:u in O&&r++:r+=Object.keys(O).length}}return r}}cv.RdfStoreIndexNestedRecordQuoted=ooe;var i7={};Object.defineProperty(i7,"__esModule",{value:!0});var a7={};Object.defineProperty(a7,"__esModule",{value:!0});(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(t7(),t),r(r7,t),r(nv,t),r(iv,t),r(N0,t),r(av,t),r(C0,t),r(sv,t),r(ov,t),r(n7,t),r(Nf,t),r(j0,t),r(M0,t),r(uv,t),r(F0,t),r(cv,t),r(i7,t),r(ds,t),r(a7,t),r(ZF(),t)})(YF);Object.defineProperty(D0,"__esModule",{value:!0});D0.storeStream=void 0;const uoe=YF;function coe(t){const e=uoe.RdfStore.createDefault();return new Promise((r,n)=>e.import(t).on("error",n).once("end",()=>r(e)))}D0.storeStream=coe;Object.defineProperty(Km,"__esModule",{value:!0});Km.ActorRdfResolveHypermediaNone=void 0;const loe=IR,doe=tv,foe=D0;class hoe extends doe.ActorRdfResolveHypermedia{constructor(e){super(e,"file")}async testMetadata(e){return{filterFactor:0}}async run(e){return this.logInfo(e.context,`Identified as file source: ${e.url}`),{source:new loe.RdfJsQuadSource(await(0,foe.storeStream)(e.quads))}}}Km.ActorRdfResolveHypermediaNone=hoe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Km,t)})(XF);var s7={},lv={},o7={},dv={};Object.defineProperty(dv,"__esModule",{value:!0});dv.ActorRdfResolveHypermediaLinks=void 0;const poe=et;class yoe extends poe.Actor{constructor(e){super(e)}}dv.ActorRdfResolveHypermediaLinks=yoe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(dv,t)})(o7);Object.defineProperty(lv,"__esModule",{value:!0});lv.ActorRdfResolveHypermediaLinksNext=void 0;const boe=o7;class _oe extends boe.ActorRdfResolveHypermediaLinks{constructor(e){super(e)}async test(e){if(!e.metadata.next)throw new Error(`Actor ${this.name} requires a 'next' metadata entry.`);return!0}async run(e){return{links:[{url:e.metadata.next}]}}}lv.ActorRdfResolveHypermediaLinksNext=_oe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(lv,t)})(s7);var u7={},fv={},c7={},hv={};Object.defineProperty(hv,"__esModule",{value:!0});hv.ActorRdfResolveHypermediaLinksQueue=void 0;const goe=et;class moe extends goe.Actor{constructor(e){super(e)}}hv.ActorRdfResolveHypermediaLinksQueue=moe;var l7={};Object.defineProperty(l7,"__esModule",{value:!0});var pv={};Object.defineProperty(pv,"__esModule",{value:!0});pv.LinkQueueWrapper=void 0;class voe{constructor(e){this.linkQueue=e}push(e,r){return this.linkQueue.push(e,r)}getSize(){return this.linkQueue.getSize()}isEmpty(){return this.linkQueue.isEmpty()}pop(){return this.linkQueue.pop()}peek(){return this.linkQueue.peek()}}pv.LinkQueueWrapper=voe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(hv,t),r(l7,t),r(pv,t)})(c7);var L0={};Object.defineProperty(L0,"__esModule",{value:!0});L0.LinkQueueFifo=void 0;class woe{constructor(){this.links=[]}push(e){return this.links.push(e),!0}getSize(){return this.links.length}isEmpty(){return this.links.length===0}pop(){return this.links.shift()}peek(){return this.links[0]}}L0.LinkQueueFifo=woe;Object.defineProperty(fv,"__esModule",{value:!0});fv.ActorRdfResolveHypermediaLinksQueueFifo=void 0;const Soe=c7,Toe=L0;class Eoe extends Soe.ActorRdfResolveHypermediaLinksQueue{constructor(e){super(e)}async test(e){return!0}async run(e){return{linkQueue:new Toe.LinkQueueFifo}}}fv.ActorRdfResolveHypermediaLinksQueueFifo=Eoe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(fv,t),r(L0,t)})(u7);var d7={},yv={},bv={},_v={};Object.defineProperty(_v,"__esModule",{value:!0});_v.ActorRdfSerialize=void 0;const Ooe=bl;class Aoe extends Ooe.ActorAbstractMediaTyped{constructor(e){super(e)}}_v.ActorRdfSerialize=Aoe;var gv={};Object.defineProperty(gv,"__esModule",{value:!0});gv.ActorRdfSerializeFixedMediaTypes=void 0;const Roe=bl;class xoe extends Roe.ActorAbstractMediaTypedFixed{constructor(e){super(e)}async testHandleChecked(e){return!0}}gv.ActorRdfSerializeFixedMediaTypes=xoe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(_v,t),r(gv,t)})(bv);Object.defineProperty(yv,"__esModule",{value:!0});yv.ActorRdfSerializeN3=void 0;const Ioe=bv,Poe=rc;class Doe extends Ioe.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){const a=new Poe.StreamWriter({format:r});let s;return"pipe"in e.quadStream?(e.quadStream.on("error",o=>a.emit("error",o)),s=e.quadStream.pipe(a)):s=a.import(e.quadStream),{data:s,triples:r==="text/turtle"||r==="application/n-triples"||r==="text/n3"}}}yv.ActorRdfSerializeN3=Doe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(yv,t)})(d7);var f7={},mv={},h7={},vv={},wv={};Object.defineProperty(wv,"__esModule",{value:!0});wv.SeparatorType=void 0;class Yr{constructor(e){this.label=e}}wv.SeparatorType=Yr;Yr.COMMA=new Yr(",");Yr.OBJECT_START=new Yr("{");Yr.OBJECT_END=new Yr("}");Yr.OBJECT_END_COMMA=new Yr("},");Yr.ARRAY_START=new Yr("[");Yr.ARRAY_END=new Yr("]");Yr.ARRAY_END_COMMA=new Yr("],");Yr.GRAPH_FIELD_NONCOMPACT=new Yr('"@graph": [');Yr.GRAPH_FIELD_COMPACT=new Yr('"@graph":[');Yr.CONTEXT_FIELD=new Yr('"@context":');var B0={};Object.defineProperty(B0,"__esModule",{value:!0});B0.Util=void 0;const LN=hn;let Ws=class hu{static termToValue(e,r,n={compactIds:!1,useNativeTypes:!1}){switch(e.termType){case"NamedNode":const a=r.compactIri(e.value,n.vocab);return n.compactIds?a:{"@id":a};case"DefaultGraph":return n.compactIds?e.value:{"@id":e.value};case"BlankNode":const s=`_:${e.value}`;return n.compactIds?s:{"@id":s};case"Literal":if(e.datatype.value===hu.RDF_JSON){let c;try{c=JSON.parse(e.value)}catch(l){throw new LN.ErrorCoded("Invalid JSON literal: "+l.message,LN.ERROR_CODES.INVALID_JSON_LITERAL)}return{"@value":c,"@type":"@json"}}if(n.rdfDirection==="i18n-datatype"&&e.datatype.value.startsWith(hu.I18N)){const[c,l]=e.datatype.value.substr(hu.I18N.length,e.datatype.value.length).split("_");return Object.assign(Object.assign({"@value":e.value},c?{"@language":c}:{}),l?{"@direction":l}:{})}const o=e.datatype.value===hu.XSD_STRING,u={"@value":!o&&n.useNativeTypes?hu.stringToNativeType(e.value,e.datatype.value):e.value};return e.language?Object.assign(Object.assign({},u),{"@language":e.language}):!o&&typeof u["@value"]=="string"?Object.assign(Object.assign({},u),{"@type":e.datatype.value}):u}}static stringToNativeType(e,r){if(r.startsWith(hu.XSD))switch(r.substr(hu.XSD.length)){case"boolean":if(e==="true")return!0;if(e==="false")return!1;throw new Error(`Invalid xsd:boolean value '${e}'`);case"integer":case"number":case"int":case"byte":case"long":const a=parseInt(e,10);if(isNaN(a))throw new Error(`Invalid xsd:integer value '${e}'`);return a;case"float":case"double":const s=parseFloat(e);if(isNaN(s))throw new Error(`Invalid xsd:float value '${e}'`);return s}return e}};B0.Util=Ws;Ws.XSD="http://www.w3.org/2001/XMLSchema#";Ws.XSD_STRING=Ws.XSD+"string";Ws.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#";Ws.RDF_TYPE=Ws.RDF+"type";Ws.RDF_JSON=Ws.RDF+"JSON";Ws.I18N="https://www.w3.org/ns/i18n#";Object.defineProperty(vv,"__esModule",{value:!0});vv.JsonLdSerializer=void 0;const BN=hn,Qr=wv,nT=B0,$N=kt;class NR extends $N.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 BN.ContextParser().parse(this.options.context,{baseIRI:this.options.baseIRI})):this.context=Promise.resolve(new BN.JsonLdContextNormalized({}))}import(e){const r=new $N.PassThrough({objectMode:!0});e.on("error",a=>n.emit("error",a)),e.on("data",a=>r.push(a)),e.on("end",()=>r.push(null));const n=r.pipe(new NR(this.options));return n}_transform(e,r,n){this.context.then(a=>{this.transformQuad(e,a),n()}).catch(n)}async list(e){const r=await this.context;return{"@list":e.map(n=>nT.Util.termToValue(n,r,this.options))}}_flush(e){return this.opened||this.pushDocumentStart(),this.lastPredicate&&this.endPredicate(),this.lastSubject&&this.endSubject(),this.lastGraph&&this.lastGraph.termType!=="DefaultGraph"&&this.endGraph(),this.endDocument(),e(null,null)}transformQuad(e,r){this.opened||this.pushDocumentStart();const n=this.lastGraph&&this.lastGraph.termType!=="DefaultGraph"&&this.lastGraph.equals(e.subject);if(!n&&(!this.lastGraph||!e.graph.equals(this.lastGraph))){let a=e.graph.termType!=="DefaultGraph"&&this.lastSubject&&this.lastSubject.equals(e.graph);this.lastGraph&&(this.lastGraph.termType!=="DefaultGraph"?(this.endPredicate(),this.endSubject(),this.endGraph(!0),a=!1):a?(this.endPredicate(!0),this.lastSubject=null):(this.endPredicate(),this.endSubject(!0))),e.graph.termType!=="DefaultGraph"&&(a||this.pushId(e.graph,!0,r),this.pushSeparator(this.options.space?Qr.SeparatorType.GRAPH_FIELD_NONCOMPACT:Qr.SeparatorType.GRAPH_FIELD_COMPACT),this.indentation++),this.lastGraph=e.graph}(!this.lastSubject||!e.subject.equals(this.lastSubject))&&(n?(this.endPredicate(),this.endSubject(),this.indentation--,this.pushSeparator(Qr.SeparatorType.ARRAY_END_COMMA),this.lastGraph=e.graph):(this.lastSubject&&(this.endPredicate(),this.endSubject(!0)),this.pushId(e.subject,!0,r)),this.lastSubject=e.subject),(!this.lastPredicate||!e.predicate.equals(this.lastPredicate))&&(this.lastPredicate&&this.endPredicate(!0),this.pushPredicate(e.predicate,r)),this.pushObject(e.object,r)}pushDocumentStart(){this.opened=!0,this.originalContext&&!this.options.excludeContext?(this.pushSeparator(Qr.SeparatorType.OBJECT_START),this.indentation++,this.pushSeparator(Qr.SeparatorType.CONTEXT_FIELD),this.pushIndented(JSON.stringify(this.originalContext,null,this.options.space)+","),this.pushSeparator(this.options.space?Qr.SeparatorType.GRAPH_FIELD_NONCOMPACT:Qr.SeparatorType.GRAPH_FIELD_COMPACT),this.indentation++):(this.pushSeparator(Qr.SeparatorType.ARRAY_START),this.indentation++)}pushId(e,r,n){if(e.termType==="Quad")this.pushNestedQuad(e,!0,n);else{const a=e.termType==="BlankNode"?"_:"+e.value:n.compactIri(e.value,!1);r?this.pushSeparator(Qr.SeparatorType.OBJECT_START):(this.push(Qr.SeparatorType.OBJECT_START.label),this.options.space&&this.push(` `)),this.indentation++,this.pushIndented(this.options.space?`"@id": "${a}",`:`"@id":"${a}",`)}}pushPredicate(e,r){let n=e.value;!this.options.useRdfType&&n===nT.Util.RDF_TYPE&&(n="@type",this.objectOptions=Object.assign(Object.assign({},this.options),{compactIds:!0,vocab:!0}));const a=r.compactIri(n,!0);this.pushIndented(this.options.space?`"${a}": [`:`"${a}":[`),this.indentation++,this.lastPredicate=e}pushObject(e,r){if(this.hadObjectForPredicate?this.pushSeparator(Qr.SeparatorType.COMMA):this.hadObjectForPredicate=!0,e.termType==="Quad"){const a=this.lastSubject,s=this.lastPredicate;this.hadObjectForPredicate=!1,this.pushNestedQuad(e,!1,r),this.endSubject(!1),this.hadObjectForPredicate=!0,this.lastPredicate=s,this.lastSubject=a;return}let n;try{e["@list"]?n=e:n=nT.Util.termToValue(e,r,this.objectOptions||this.options)}catch(a){return this.emit("error",a)}this.pushIndented(JSON.stringify(n,null,this.options.space))}pushNestedQuad(e,r,n){this.pushSeparator(Qr.SeparatorType.OBJECT_START),this.indentation++,this.pushIndented(this.options.space?'"@id": ':'"@id":',!1),e.graph.termType!=="DefaultGraph"&&this.emit("error",new Error(`Found a nested quad with the non-default graph: ${e.graph.value}`)),this.pushId(e.subject,!1,n),this.pushPredicate(e.predicate,n),this.pushObject(e.object,n),this.endPredicate(!1),this.endSubject(r)}endDocument(){this.opened=!1,this.originalContext&&!this.options.excludeContext?(this.indentation--,this.pushSeparator(Qr.SeparatorType.ARRAY_END),this.indentation--,this.pushSeparator(Qr.SeparatorType.OBJECT_END)):(this.indentation--,this.pushSeparator(Qr.SeparatorType.ARRAY_END))}endPredicate(e){this.indentation--,this.pushSeparator(e?Qr.SeparatorType.ARRAY_END_COMMA:Qr.SeparatorType.ARRAY_END),this.hadObjectForPredicate=!1,this.objectOptions=null,this.lastPredicate=null}endSubject(e){this.indentation--,this.pushSeparator(e?Qr.SeparatorType.OBJECT_END_COMMA:Qr.SeparatorType.OBJECT_END),this.lastSubject=null}endGraph(e){this.indentation--,this.pushSeparator(Qr.SeparatorType.ARRAY_END),this.indentation--,this.pushSeparator(e?Qr.SeparatorType.OBJECT_END_COMMA:Qr.SeparatorType.OBJECT_END),this.lastGraph=null}pushSeparator(e){this.pushIndented(e.label)}pushIndented(e,r=!0){const n=this.getIndentPrefix(),a=e.split(` `).map(s=>n+s).join(` `);this.push(a),this.options.space&&r&&this.push(` -`)}getIndentPrefix(){return this.options.space?this.options.space.repeat(this.indentation):""}}vv.JsonLdSerializer=NR;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(vv,t),r(L0,t)})(h7);Object.defineProperty(mv,"__esModule",{value:!0});mv.ActorRdfSerializeJsonLd=void 0;const Noe=bv,Coe=h7;class joe extends Noe.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){const a=new Coe.JsonLdSerializer({space:" ".repeat(this.jsonStringifyIndentSpaces)});let s;return"pipe"in e.quadStream?(e.quadStream.on("error",o=>a.emit("error",o)),s=e.quadStream.pipe(a)):s=a.import(e.quadStream),{data:s}}}mv.ActorRdfSerializeJsonLd=joe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(mv,t)})(f7);var p7={},Sv={},CR={};Object.defineProperty(CR,"__esModule",{value:!0});function Moe(t,e){return new Promise((r,n)=>{t.on("end",()=>r(e)),t.on("error",n)})}function Foe(t){const e=[];return Moe(t.on("data",r=>e.push(r)),e)}CR.default=Foe;var Tv={},jR={},y7={},Ev={};Object.defineProperty(Ev,"__esModule",{value:!0});Ev.fragment=void 0;function Loe(t){let e=t;(e.endsWith("/")||e.endsWith("#"))&&(e=e.slice(0,e.length-1));const r=[];e.lastIndexOf("/")>0&&r.push(e.lastIndexOf("/")),e.lastIndexOf("#")>0&&r.push(e.lastIndexOf("#"));const n=Math.max(...r);return e.slice(n+1)}function Boe(t){var e;const r=(e=t.split(/[^a-z0-9]+/ig).filter(n=>n!=="").map(n=>n[0].toUpperCase()+n.slice(1)).join("").match(/[a-z][a-z0-9]+/ig))===null||e===void 0?void 0:e[0];return typeof r>"u"?void 0:r[0].toLowerCase()+r.slice(1)}function $oe(t){let e=Loe(t);return e=e?Boe(e):void 0,e||"v"}Ev.fragment=$oe;var tO={},Ov={},zu={},rO={exports:{}};(function(t,e){var r=typeof self<"u"?self:m,n=function(){function s(){this.fetch=!1,this.DOMException=r.DOMException}return s.prototype=r,new s}();(function(s){(function(o){var u={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function c($){return $&&DataView.prototype.isPrototypeOf($)}if(u.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function($){return $&&l.indexOf(Object.prototype.toString.call($))>-1};function f($){if(typeof $!="string"&&($=String($)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test($))throw new TypeError("Invalid character in header field name");return $.toLowerCase()}function h($){return typeof $!="string"&&($=String($)),$}function p($){var j={next:function(){var Q=$.shift();return{done:Q===void 0,value:Q}}};return u.iterable&&(j[Symbol.iterator]=function(){return j}),j}function b($){this.map={},$ instanceof b?$.forEach(function(j,Q){this.append(Q,j)},this):Array.isArray($)?$.forEach(function(j){this.append(j[0],j[1])},this):$&&Object.getOwnPropertyNames($).forEach(function(j){this.append(j,$[j])},this)}b.prototype.append=function($,j){$=f($),j=h(j);var Q=this.map[$];this.map[$]=Q?Q+", "+j:j},b.prototype.delete=function($){delete this.map[f($)]},b.prototype.get=function($){return $=f($),this.has($)?this.map[$]:null},b.prototype.has=function($){return this.map.hasOwnProperty(f($))},b.prototype.set=function($,j){this.map[f($)]=h(j)},b.prototype.forEach=function($,j){for(var Q in this.map)this.map.hasOwnProperty(Q)&&$.call(j,this.map[Q],Q,this)},b.prototype.keys=function(){var $=[];return this.forEach(function(j,Q){$.push(Q)}),p($)},b.prototype.values=function(){var $=[];return this.forEach(function(j){$.push(j)}),p($)},b.prototype.entries=function(){var $=[];return this.forEach(function(j,Q){$.push([Q,j])}),p($)},u.iterable&&(b.prototype[Symbol.iterator]=b.prototype.entries);function _($){if($.bodyUsed)return Promise.reject(new TypeError("Already read"));$.bodyUsed=!0}function E($){return new Promise(function(j,Q){$.onload=function(){j($.result)},$.onerror=function(){Q($.error)}})}function w($){var j=new FileReader,Q=E(j);return j.readAsArrayBuffer($),Q}function O($){var j=new FileReader,Q=E(j);return j.readAsText($),Q}function A($){for(var j=new Uint8Array($),Q=new Array(j.length),se=0;se-1?j:$}function H($,j){j=j||{};var Q=j.body;if($ instanceof H){if($.bodyUsed)throw new TypeError("Already read");this.url=$.url,this.credentials=$.credentials,j.headers||(this.headers=new b($.headers)),this.method=$.method,this.mode=$.mode,this.signal=$.signal,!Q&&$._bodyInit!=null&&(Q=$._bodyInit,$.bodyUsed=!0)}else this.url=String($);if(this.credentials=j.credentials||this.credentials||"same-origin",(j.headers||!this.headers)&&(this.headers=new b(j.headers)),this.method=U(j.method||this.method||"GET"),this.mode=j.mode||this.mode||null,this.signal=j.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Q)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(Q)}H.prototype.clone=function(){return new H(this,{body:this._bodyInit})};function N($){var j=new FormData;return $.trim().split("&").forEach(function(Q){if(Q){var se=Q.split("="),ie=se.shift().replace(/\+/g," "),be=se.join("=").replace(/\+/g," ");j.append(decodeURIComponent(ie),decodeURIComponent(be))}}),j}function x($){var j=new b,Q=$.replace(/\r?\n[\t ]+/g," ");return Q.split(/\r?\n/).forEach(function(se){var ie=se.split(":"),be=ie.shift().trim();if(be){var he=ie.join(":").trim();j.append(be,he)}}),j}I.call(H.prototype);function F($,j){j||(j={}),this.type="default",this.status=j.status===void 0?200:j.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in j?j.statusText:"OK",this.headers=new b(j.headers),this.url=j.url||"",this._initBody($)}I.call(F.prototype),F.prototype.clone=function(){return new F(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},F.error=function(){var $=new F(null,{status:0,statusText:""});return $.type="error",$};var X=[301,302,303,307,308];F.redirect=function($,j){if(X.indexOf(j)===-1)throw new RangeError("Invalid status code");return new F(null,{status:j,headers:{location:$}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(j,Q){this.message=j,this.name=Q;var se=Error(j);this.stack=se.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function ne($,j){return new Promise(function(Q,se){var ie=new H($,j);if(ie.signal&&ie.signal.aborted)return se(new o.DOMException("Aborted","AbortError"));var be=new XMLHttpRequest;function he(){be.abort()}be.onload=function(){var Te={status:be.status,statusText:be.statusText,headers:x(be.getAllResponseHeaders()||"")};Te.url="responseURL"in be?be.responseURL:Te.headers.get("X-Request-URL");var Ne="response"in be?be.response:be.responseText;Q(new F(Ne,Te))},be.onerror=function(){se(new TypeError("Network request failed"))},be.ontimeout=function(){se(new TypeError("Network request failed"))},be.onabort=function(){se(new o.DOMException("Aborted","AbortError"))},be.open(ie.method,ie.url,!0),ie.credentials==="include"?be.withCredentials=!0:ie.credentials==="omit"&&(be.withCredentials=!1),"responseType"in be&&u.blob&&(be.responseType="blob"),ie.headers.forEach(function(Te,Ne){be.setRequestHeader(Ne,Te)}),ie.signal&&(ie.signal.addEventListener("abort",he),be.onreadystatechange=function(){be.readyState===4&&ie.signal.removeEventListener("abort",he)}),be.send(typeof ie._bodyInit>"u"?null:ie._bodyInit)})}return ne.polyfill=!0,s.fetch||(s.fetch=ne,s.Headers=b,s.Request=H,s.Response=F),o.Headers=b,o.Request=H,o.Response=F,o.fetch=ne,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var a=n;e=a.fetch,e.default=a.fetch,e.fetch=a.fetch,e.Headers=a.Headers,e.Request=a.Request,e.Response=a.Response,t.exports=e})(rO,rO.exports);var Uoe=rO.exports,b7=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(zu,"__esModule",{value:!0});zu.fetchContext=zu.fetchJson=void 0;const qoe=Uoe;function _7(t,e){var r;return b7(this,void 0,void 0,function*(){return(yield((r=e==null?void 0:e.fetch)!==null&&r!==void 0?r:qoe.fetch)(t)).json()})}zu.fetchJson=_7;function Voe(t,e){return b7(this,void 0,void 0,function*(){return(yield _7(t,e))["@context"]})}zu.fetchContext=Voe;var Hoe=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ov,"__esModule",{value:!0});Ov.lookupUri=void 0;const koe=zu;function Qoe(t,e){return Hoe(this,void 0,void 0,function*(){const r=(yield(0,koe.fetchContext)(`https://prefix.cc/${t}.file.jsonld`,e))[t];if(typeof r!="string")throw new Error(`Expected uri to be a string, received: ${r} of type ${typeof r}`);return r})}Ov.lookupUri=Qoe;var Av={},Goe=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Av,"__esModule",{value:!0});Av.lookupPrefix=void 0;const zoe=zu;function Woe(t,e){return Goe(this,void 0,void 0,function*(){const r=new URL("https://prefix.cc/reverse");r.searchParams.append("uri",t),r.searchParams.append("format","jsonld");const n=Object.keys(yield(0,zoe.fetchContext)(r,e));if(n.length===0)throw new Error("No prefixes returned");return n[0]})}Av.lookupPrefix=Woe;var Rv={},Xoe=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Rv,"__esModule",{value:!0});Rv.lookupAllPrefixes=void 0;const Koe=zu;function Joe(t){return Xoe(this,void 0,void 0,function*(){return(0,Koe.fetchContext)("https://prefix.cc/context",t)})}Rv.lookupAllPrefixes=Joe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ov,t),r(Av,t),r(Rv,t)})(tO);(function(t){var e=m&&m.__awaiter||function(u,c,l,d){function f(h){return h instanceof l?h:new l(function(p){p(h)})}return new(l||(l=Promise))(function(h,p){function b(w){try{E(d.next(w))}catch(O){p(O)}}function _(w){try{E(d.throw(w))}catch(O){p(O)}}function E(w){w.done?h(w.value):f(w.value).then(b,_)}E((d=d.apply(u,c||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupAllPrefixes=t.prefixToUri=t.uriToPrefix=void 0;const r=Ev,n=tO;function a(u,c){return e(this,void 0,void 0,function*(){let l;try{l=yield(0,n.lookupPrefix)(u,c)}catch{c!=null&&c.mintOnUnknown&&(l=(0,r.fragment)(u).slice(0,4))}if(typeof l<"u"&&typeof(c==null?void 0:c.existingPrefixes)=="object"&&l in c.existingPrefixes){let d=0;for(;`${l}${d}`in c.existingPrefixes;)d+=1;l=`${l}${d}`}return l})}t.uriToPrefix=a;function s(u,c){return e(this,void 0,void 0,function*(){try{return yield(0,n.lookupUri)(u,c)}catch{return}})}t.prefixToUri=s;var o=tO;Object.defineProperty(t,"lookupAllPrefixes",{enumerable:!0,get:function(){return o.lookupAllPrefixes}})})(y7);var xv={};Object.defineProperty(xv,"__esModule",{value:!0});xv.getShaclName=void 0;function Yoe(t){if(t.termType!=="NamedNode"||!t.value.startsWith("http://www.w3.org/ns/shacl#"))throw new Error(`Term ${t.value} is not part of the SHACL namespace`);return t.value.slice(27)}xv.getShaclName=Yoe;var MR={};Object.defineProperty(MR,"__esModule",{value:!0});MR.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};var FR={};Object.defineProperty(FR,"__esModule",{value:!0});FR.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#"};var LR={};Object.defineProperty(LR,"__esModule",{value:!0});LR.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};var Nn=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})},BR=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jR,"__esModule",{value:!0});const zt=rc,Zoe=y7,a1=b0,th=xv,eue=BR(MR),tue=BR(FR),UN=BR(LR);function iT(t){var e;return(e=/^[^]*[#/]/.exec(t))===null||e===void 0?void 0:e[0]}const aT={"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"},sT={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#"};class rue{constructor(e,r,n={},a=void 0,s=!0,o=!1,u,c=!1){this.store=e,this.base=a,this.errorOnExtraQuads=s,this.mintUnspecifiedPrefixes=o,this.fetch=u,this.extendedSyntax=c,this.prefixes={},this.prefixRev={};for(const l of Object.keys(n)){const d=n[l],f=typeof d=="string"?d:d.value;!(f in aT)&&!(l in sT)&&(this.prefixRev[f]=l,this.prefixes[l]=f)}this.writer=r}write(){return Nn(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(e.length===1&&e[0].subject.termType==="NamedNode"){const n=e[0].subject;this.store.removeQuads(e),n.equals(new zt.NamedNode("urn:x-base:default"))||this.writer.add(`BASE ${(0,a1.termToString)(n)}`),yield this.writeImports(n)}else throw new Error("Base expected");if(this.mintUnspecifiedPrefixes){const n=new Set;for(const s of[...this.store.getSubjects(null,null,null),...this.store.getPredicates(null,null,null),...this.store.getObjects(null,null,null)])if(s.termType==="NamedNode"){const o=iT(s.value);o&&!(o in this.prefixRev)&&!(o in aT)&&n.add(o)}const a=Object.assign(Object.assign({},this.prefixes),sT);yield Promise.all([...n].map(s=>(0,Zoe.uriToPrefix)(s,{fetch:this.fetch,mintOnUnknown:!0,existingPrefixes:a}).then(o=>{this.prefixes[o]=s,a[o]=s,this.prefixRev[s]=o})))}const r=new Set([...this.store.getSubjects(null,null,null),...this.store.getPredicates(null,null,null),...this.store.getObjects(null,null,null)].filter(n=>n.termType==="NamedNode").map(n=>iT(n.value)).filter(n=>typeof n=="string"));for(const n in this.prefixRev)r.has(n)||(delete this.prefixes[this.prefixRev[n]],delete this.prefixRev[n]);if(yield this.writePrefixes(),this.prefixes=Object.assign(Object.assign({},this.prefixes),sT),this.prefixRev=Object.assign(Object.assign({},this.prefixRev),aT),this.writer.newLine(),yield this.writeShapes(),this.extendedSyntax){const n=this.store.getSubjects(null,null,null);n.length>0&&this.writer.newLine(1);for(const a of n)this.writer.add(yield this.termToString(a,!0,!0)),this.writer.add(" "),this.writer.indent(),yield this.writeTurtlePredicates(a),this.writer.deindent();n.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 Nn(this,void 0,void 0,function*(){const r=this.store.getObjectsOnce(e,new zt.NamedNode("http://www.w3.org/2002/07/owl#imports"),null);if(r.length>0)for(const n of r)this.writer.add(`IMPORTS <${n.value}>`,!0)})}writePrefixes(){return Nn(this,void 0,void 0,function*(){const e=Object.keys(this.prefixes).filter(r=>!(r in tue.default)).sort();if(e.length>0)for(const r of e)this.writer.add(`PREFIX ${r}: <${this.prefixes[r]}>`,!0)})}termToString(e,r=!1,n=!1){return Nn(this,void 0,void 0,function*(){try{if(r)throw new Error("Shacl name disabled");return(0,th.getShaclName)(e)}catch{}if(e.termType==="NamedNode"){const a=iT(e.value);return a&&a in this.prefixRev&&a in this.prefixRev?`${this.prefixRev[a]}:${e.value.slice(a.length)}`:(0,a1.termToString)(e)}if(e.termType==="Literal")return e.datatypeString==="http://www.w3.org/2001/XMLSchema#integer"||e.datatypeString==="http://www.w3.org/2001/XMLSchema#boolean"?e.value:(0,a1.termToString)(e);throw e.termType==="BlankNode"&&n&&(0,a1.termToString)(e),new Error(`Invalid term type for extra statement ${e.value} (${e.termType})`)})}writeShapes(){return Nn(this,void 0,void 0,function*(){for(const e of this.store.getSubjectsOnce(new zt.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new zt.NamedNode("http://www.w3.org/ns/shacl#NodeShape"),null)){this.store.getQuadsOnce(e,new zt.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new zt.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 r=this.store.getObjectsOnce(e,new zt.NamedNode("http://www.w3.org/ns/shacl#targetClass"),null);if(r.length>0){this.writer.add("-> ");for(const a of r)a.termType==="NamedNode"?this.writer.add(yield this.termToString(a)):(this.writer.add("!"),this.writer.add(yield this.termToString(this.singleObject(a,new zt.NamedNode("http://www.w3.org/ns/shacl#not"),!0)))),this.writer.add(" ")}const n=this.store.getPredicates(e,null,null).filter(a=>[new zt.NamedNode("http://www.w3.org/ns/shacl#targetClass"),new zt.NamedNode("http://www.w3.org/ns/shacl#property"),new zt.NamedNode("http://www.w3.org/ns/shacl#or"),...Object.keys(UN.default).map(s=>new zt.NamedNode("http://www.w3.org/ns/shacl#"+s))].every(s=>!a.equals(s)));n.length>0&&(this.writer.add(";"),this.writer.indent(),this.writer.newLine(1)),this.extendedSyntax&&(yield this.writeGivenTurtlePredicates(e,n)),n.length>0&&(this.writer.add(" "),this.writer.deindent()),yield this.writeShapeBody(e,!1)}})}getSingleProperty(e,r){let n=[e];try{let a=(0,th.getShaclName)(e.predicate),s="pred";if(a==="not"){const o=this.store.getQuadsOnce(e.object,null,null,null);if(n=n.concat(o),o.length!==1)throw new Error("Can only handle having one predicate of 'not'");[e]=o,a=(0,th.getShaclName)(e.predicate),s="not"}if(!(a in r))throw new Error(`${a} is not allowed`);return{name:a,type:s,object:e.object}}catch{this.store.addQuads(n)}}singleLayerPropertiesList(e,r){const n=[];for(const a of this.store.getQuadsOnce(e,null,null,null)){const s=this.getSingleProperty(a,r);s&&n.push(s)}return n}expectOneProperty(e,r){const n=this.store.getQuadsOnce(e,null,null,null);if(n.length===1){const a=this.getSingleProperty(n[0],r);if(a)return a}this.store.addQuads(n)}orProperties(e,r){const n=[];for(const a of this.store.getQuadsOnce(e,new zt.NamedNode("http://www.w3.org/ns/shacl#or"),null,null)){const s=[];for(const o of this.getList(a.object)){const u=this.expectOneProperty(o,r);if(!u)throw this.store.addQuad(a),new Error("Each entry of the 'or' statement must declare exactly one property");s.push(u)}n.push(s)}return n}getList(e){let r=e;const n=[];for(;!r.equals(new zt.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));)n.push(this.singleObject(r,new zt.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),!0)),r=this.singleObject(r,new zt.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),!0);return n}writeIriLiteralOrArray(e){return Nn(this,void 0,void 0,function*(){if(e.termType==="BlankNode"){this.writer.add("[");let r=!0;for(const n of this.getList(e))r?r=!1:this.writer.add(" "),this.writer.add(yield this.termToString(n));this.writer.add("]")}else this.writer.add(yield this.termToString(e))})}singleObject(e,r,n){var a;return(a=this.singleQuad(e,r,n))===null||a===void 0?void 0:a.object}singleQuad(e,r,n=!1){const a=this.store.getQuadsOnce(e,r,null,null);if(n&&a.length!==1)throw this.store.addQuads(a),new Error(`The subject and predicate ${e==null?void 0:e.value} ${r==null?void 0:r.value} must have exactly one object. Instead has ${a.length}`);if(a.length>1)throw this.store.addQuads(a),new Error(`The subject and predicate ${e==null?void 0:e.value} ${r==null?void 0:r.value} can have at most one object. Instead has ${a.length}`);return a.length===1?a[0]:void 0}writeAssigment({name:e,type:r,object:n}){return Nn(this,void 0,void 0,function*(){r==="not"&&this.writer.add("!"),this.writer.add(e),this.writer.add("="),yield this.writeIriLiteralOrArray(n)})}writeAtom({name:e,type:r,object:n}){return Nn(this,void 0,void 0,function*(){switch(r==="not"&&this.writer.add("!"),e){case"node":{if(n.termType==="NamedNode")this.writer.add(`@${yield this.termToString(n)}`);else if(n.termType==="BlankNode")yield this.writeShapeBody(n);else throw new Error("Invalid nested shape, must be blank node or IRI");return}case"nodeKind":{this.writer.add((0,th.getShaclName)(n));return}case"class":{this.writer.add(yield this.termToString(n));return}case"datatype":{this.writer.add(yield this.termToString(n));return}default:this.writer.add(e),this.writer.add("="),yield this.writeIriLiteralOrArray(n)}})}writeAssigments(e,r=" ",n=!0,a){return Nn(this,void 0,void 0,function*(){for(const s of e)n?n=!1:this.writer.add(r),a?yield this.writeAtom(s):yield this.writeAssigment(s)})}writeParams(e,r=!0,n,a=!1,s=!1){return Nn(this,void 0,void 0,function*(){const o=this.orProperties(e,n),u=this.singleLayerPropertiesList(e,n);s&&(o.length>0||u.length>0)&&this.writer.newLine(1);for(const c of o)r?r=!1:this.writer.add(" "),yield this.writeAssigments(c,"|",!0,a);yield this.writeAssigments(u," ",r,a),s&&(o.length>0||u.length>0)&&this.writer.add(" .")})}writeShapeBody(e,r=!0){return Nn(this,void 0,void 0,function*(){this.writer.add("{").indent();const n=this.store.getObjectsOnce(e,new zt.NamedNode("http://www.w3.org/ns/shacl#property"),null);yield this.writeParams(e,!0,UN.default,!1,!0);for(const a of n)this.writer.newLine(1),yield this.writeProperty(a);this.writer.deindent().newLine(1),r?this.writer.add("} ."):this.writer.add("}").newLine(1)})}writeProperty(e){return Nn(this,void 0,void 0,function*(){yield this.writePath(this.singleObject(e,new zt.NamedNode("http://www.w3.org/ns/shacl#path"),!0));const r=this.singleObject(e,new zt.NamedNode("http://www.w3.org/ns/shacl#minCount")),n=this.singleObject(e,new zt.NamedNode("http://www.w3.org/ns/shacl#maxCount")),a=this.singleObject(e,new zt.NamedNode("http://www.w3.org/ns/shacl#nodeKind")),s=this.singleObject(e,new zt.NamedNode("http://www.w3.org/ns/shacl#class")),o=this.singleObject(e,new zt.NamedNode("http://www.w3.org/ns/shacl#datatype")),u=this.store.getObjectsOnce(e,new zt.NamedNode("http://www.w3.org/ns/shacl#node"),null);if(a&&(this.writer.add(" "),this.writer.add((0,th.getShaclName)(a))),s&&(this.writer.add(" "),this.writer.add(yield this.termToString(s))),o&&(this.writer.add(" "),this.writer.add(yield this.termToString(o))),r!==void 0||n!==void 0){if(this.writer.add(" ["),r){if(r.termType!=="Literal"||r.datatypeString!=="http://www.w3.org/2001/XMLSchema#integer")throw new Error("Invalid min value, must me an integer literal");this.writer.add(r.value)}else this.writer.add("0");if(this.writer.add(".."),n){if(n.termType!=="Literal"||n.datatypeString!=="http://www.w3.org/2001/XMLSchema#integer")throw new Error("Invalid max value, must me an integer literal");this.store.removeMatches(e,new zt.NamedNode("http://www.w3.org/ns/shacl#maxCount"),void 0,void 0),this.writer.add(n.value)}else this.writer.add("*");this.writer.add("]")}yield this.writeParams(e,!1,eue.default,!0);const c=[];for(const l of u)if(l.termType==="NamedNode")this.writer.add(" "),this.writer.add(`@${yield this.termToString(l)}`);else if(l.termType==="BlankNode")c.push(l);else throw new Error("Invalid nested shape, must be blank node or IRI");for(const l of c)this.writer.add(" "),yield this.writeShapeBody(l);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("%")),c.length===0&&this.writer.add(" .")})}writeTurtlePredicates(e){return Nn(this,void 0,void 0,function*(){return this.writeGivenTurtlePredicates(e,this.store.getPredicates(e,null,null))})}writeGivenTurtlePredicates(e,r){return Nn(this,void 0,void 0,function*(){let n=!1;if(r.some(a=>a.equals(zt.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")))){const a=this.store.getObjectsOnce(e,zt.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),null);a.length>0&&(n=!0,this.writer.add("a "),yield this.writeTurtleObjects(a))}for(const a of r)a.equals(zt.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))||(n?(this.writer.add(" ;"),this.writer.newLine(1)):n=!0,this.writer.add(yield this.termToString(a,!0)),this.writer.add(" "),yield this.writeTurtleObjects(this.store.getObjectsOnce(e,a,null)))})}writeTurtleObjects(e){return Nn(this,void 0,void 0,function*(){const r=[],n=[];for(const s of e)s.termType==="BlankNode"&&[...this.store.match(null,null,s),...this.store.match(null,s,null)].length===0?r.push(s):n.push(s);this.writer.add((yield Promise.all(n.map(s=>this.termToString(s,!0,!0)))).join(", "));let a=n.length>0;if(r.length>0)for(const s of r)a?this.writer.add(", "):a=!0,(yield this.writeList(s))||(this.writer.add("["),this.writer.indent(),this.writer.newLine(1),yield this.writeTurtlePredicates(s),this.writer.deindent(),this.writer.newLine(1),this.writer.add("]"))})}writeList(e){return Nn(this,void 0,void 0,function*(){let r=e;const n=[],a=[];for(;!r.equals(zt.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));){const o=this.store.getQuadsOnce(r,zt.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),null,null),u=this.store.getQuadsOnce(r,zt.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),null,null);if(a.push(...o,...u),o.length!==1||u.length!==1||this.store.getQuads(r,null,null,null).length!==0)return this.store.addQuads(a),!1;n.push(o[0].object),r=u[0].object}let s=!1;this.writer.add("(");for(const o of n)s?this.writer.add(" "):s=!0,yield this.writeTurtleObjects([o]);return this.writer.add(")"),!0})}writePath(e,r=!1){return Nn(this,void 0,void 0,function*(){if(e.termType==="NamedNode")this.writer.add(yield this.termToString(e));else if(e.termType==="BlankNode"){const n=this.store.getQuadsOnce(e,null,null,null);if(n.length===1){const{predicate:a,object:s}=n[0];switch(a.value){case"http://www.w3.org/ns/shacl#inversePath":this.writer.add("^"),yield this.writePath(s,!0);return;case"http://www.w3.org/ns/shacl#alternativePath":{const o=this.getList(s);if(o.length===0)throw new Error("Invalid Alternative Path - no options");if(o.length===1)yield this.writePath(o[0]);else{r&&this.writer.add("(");let u=!0;for(const c of o)u?u=!1:this.writer.add("|"),yield this.writePath(c,!0);r&&this.writer.add(")")}return}case"http://www.w3.org/ns/shacl#zeroOrMorePath":yield this.writePath(s,!0),this.writer.add("*");return;case"http://www.w3.org/ns/shacl#oneOrMorePath":yield this.writePath(s,!0),this.writer.add("+");return;case"http://www.w3.org/ns/shacl#zeroOrOnePath":yield this.writePath(s,!0),this.writer.add("?");return;default:throw new Error(`Invalid path type ${e.value}`)}}else{this.store.addQuads(n);const a=this.getList(e);if(a.length===0)throw new Error("Invalid Path");{r&&this.writer.add("(");let s=!0;for(const o of a)s?s=!1:this.writer.add("/"),yield this.writePath(o,!0);r&&this.writer.add(")")}}}else throw new Error("Path should be named node or blank node")})}}jR.default=rue;var $R={};Object.defineProperty($R,"__esModule",{value:!0});class nue{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,r=!1){return this.write(r?` +`)}getIndentPrefix(){return this.options.space?this.options.space.repeat(this.indentation):""}}vv.JsonLdSerializer=NR;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s),Object.defineProperty(n,o,{enumerable:!0,get:function(){return a[s]}})}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(vv,t),r(B0,t)})(h7);Object.defineProperty(mv,"__esModule",{value:!0});mv.ActorRdfSerializeJsonLd=void 0;const Noe=bv,Coe=h7;class joe extends Noe.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){const a=new Coe.JsonLdSerializer({space:" ".repeat(this.jsonStringifyIndentSpaces)});let s;return"pipe"in e.quadStream?(e.quadStream.on("error",o=>a.emit("error",o)),s=e.quadStream.pipe(a)):s=a.import(e.quadStream),{data:s}}}mv.ActorRdfSerializeJsonLd=joe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(mv,t)})(f7);var p7={},Sv={},CR={};Object.defineProperty(CR,"__esModule",{value:!0});function Moe(t,e){return new Promise((r,n)=>{t.on("end",()=>r(e)),t.on("error",n)})}function Foe(t){const e=[];return Moe(t.on("data",r=>e.push(r)),e)}CR.default=Foe;var Tv={},jR={},y7={},Ev={};Object.defineProperty(Ev,"__esModule",{value:!0});Ev.fragment=void 0;function Loe(t){let e=t;(e.endsWith("/")||e.endsWith("#"))&&(e=e.slice(0,e.length-1));const r=[];e.lastIndexOf("/")>0&&r.push(e.lastIndexOf("/")),e.lastIndexOf("#")>0&&r.push(e.lastIndexOf("#"));const n=Math.max(...r);return e.slice(n+1)}function Boe(t){var e;const r=(e=t.split(/[^a-z0-9]+/ig).filter(n=>n!=="").map(n=>n[0].toUpperCase()+n.slice(1)).join("").match(/[a-z][a-z0-9]+/ig))===null||e===void 0?void 0:e[0];return typeof r>"u"?void 0:r[0].toLowerCase()+r.slice(1)}function $oe(t){let e=Loe(t);return e=e?Boe(e):void 0,e||"v"}Ev.fragment=$oe;var tO={},Ov={},zu={},rO={exports:{}};(function(t,e){var r=typeof self<"u"?self:m,n=function(){function s(){this.fetch=!1,this.DOMException=r.DOMException}return s.prototype=r,new s}();(function(s){(function(o){var u={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function c($){return $&&DataView.prototype.isPrototypeOf($)}if(u.arrayBuffer)var l=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function($){return $&&l.indexOf(Object.prototype.toString.call($))>-1};function f($){if(typeof $!="string"&&($=String($)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test($))throw new TypeError("Invalid character in header field name");return $.toLowerCase()}function h($){return typeof $!="string"&&($=String($)),$}function p($){var j={next:function(){var Q=$.shift();return{done:Q===void 0,value:Q}}};return u.iterable&&(j[Symbol.iterator]=function(){return j}),j}function b($){this.map={},$ instanceof b?$.forEach(function(j,Q){this.append(Q,j)},this):Array.isArray($)?$.forEach(function(j){this.append(j[0],j[1])},this):$&&Object.getOwnPropertyNames($).forEach(function(j){this.append(j,$[j])},this)}b.prototype.append=function($,j){$=f($),j=h(j);var Q=this.map[$];this.map[$]=Q?Q+", "+j:j},b.prototype.delete=function($){delete this.map[f($)]},b.prototype.get=function($){return $=f($),this.has($)?this.map[$]:null},b.prototype.has=function($){return this.map.hasOwnProperty(f($))},b.prototype.set=function($,j){this.map[f($)]=h(j)},b.prototype.forEach=function($,j){for(var Q in this.map)this.map.hasOwnProperty(Q)&&$.call(j,this.map[Q],Q,this)},b.prototype.keys=function(){var $=[];return this.forEach(function(j,Q){$.push(Q)}),p($)},b.prototype.values=function(){var $=[];return this.forEach(function(j){$.push(j)}),p($)},b.prototype.entries=function(){var $=[];return this.forEach(function(j,Q){$.push([Q,j])}),p($)},u.iterable&&(b.prototype[Symbol.iterator]=b.prototype.entries);function _($){if($.bodyUsed)return Promise.reject(new TypeError("Already read"));$.bodyUsed=!0}function E($){return new Promise(function(j,Q){$.onload=function(){j($.result)},$.onerror=function(){Q($.error)}})}function w($){var j=new FileReader,Q=E(j);return j.readAsArrayBuffer($),Q}function O($){var j=new FileReader,Q=E(j);return j.readAsText($),Q}function A($){for(var j=new Uint8Array($),Q=new Array(j.length),se=0;se-1?j:$}function H($,j){j=j||{};var Q=j.body;if($ instanceof H){if($.bodyUsed)throw new TypeError("Already read");this.url=$.url,this.credentials=$.credentials,j.headers||(this.headers=new b($.headers)),this.method=$.method,this.mode=$.mode,this.signal=$.signal,!Q&&$._bodyInit!=null&&(Q=$._bodyInit,$.bodyUsed=!0)}else this.url=String($);if(this.credentials=j.credentials||this.credentials||"same-origin",(j.headers||!this.headers)&&(this.headers=new b(j.headers)),this.method=U(j.method||this.method||"GET"),this.mode=j.mode||this.mode||null,this.signal=j.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Q)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(Q)}H.prototype.clone=function(){return new H(this,{body:this._bodyInit})};function N($){var j=new FormData;return $.trim().split("&").forEach(function(Q){if(Q){var se=Q.split("="),ie=se.shift().replace(/\+/g," "),be=se.join("=").replace(/\+/g," ");j.append(decodeURIComponent(ie),decodeURIComponent(be))}}),j}function x($){var j=new b,Q=$.replace(/\r?\n[\t ]+/g," ");return Q.split(/\r?\n/).forEach(function(se){var ie=se.split(":"),be=ie.shift().trim();if(be){var he=ie.join(":").trim();j.append(be,he)}}),j}I.call(H.prototype);function F($,j){j||(j={}),this.type="default",this.status=j.status===void 0?200:j.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in j?j.statusText:"OK",this.headers=new b(j.headers),this.url=j.url||"",this._initBody($)}I.call(F.prototype),F.prototype.clone=function(){return new F(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new b(this.headers),url:this.url})},F.error=function(){var $=new F(null,{status:0,statusText:""});return $.type="error",$};var X=[301,302,303,307,308];F.redirect=function($,j){if(X.indexOf(j)===-1)throw new RangeError("Invalid status code");return new F(null,{status:j,headers:{location:$}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(j,Q){this.message=j,this.name=Q;var se=Error(j);this.stack=se.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function ne($,j){return new Promise(function(Q,se){var ie=new H($,j);if(ie.signal&&ie.signal.aborted)return se(new o.DOMException("Aborted","AbortError"));var be=new XMLHttpRequest;function he(){be.abort()}be.onload=function(){var Te={status:be.status,statusText:be.statusText,headers:x(be.getAllResponseHeaders()||"")};Te.url="responseURL"in be?be.responseURL:Te.headers.get("X-Request-URL");var Ne="response"in be?be.response:be.responseText;Q(new F(Ne,Te))},be.onerror=function(){se(new TypeError("Network request failed"))},be.ontimeout=function(){se(new TypeError("Network request failed"))},be.onabort=function(){se(new o.DOMException("Aborted","AbortError"))},be.open(ie.method,ie.url,!0),ie.credentials==="include"?be.withCredentials=!0:ie.credentials==="omit"&&(be.withCredentials=!1),"responseType"in be&&u.blob&&(be.responseType="blob"),ie.headers.forEach(function(Te,Ne){be.setRequestHeader(Ne,Te)}),ie.signal&&(ie.signal.addEventListener("abort",he),be.onreadystatechange=function(){be.readyState===4&&ie.signal.removeEventListener("abort",he)}),be.send(typeof ie._bodyInit>"u"?null:ie._bodyInit)})}return ne.polyfill=!0,s.fetch||(s.fetch=ne,s.Headers=b,s.Request=H,s.Response=F),o.Headers=b,o.Request=H,o.Response=F,o.fetch=ne,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var a=n;e=a.fetch,e.default=a.fetch,e.fetch=a.fetch,e.Headers=a.Headers,e.Request=a.Request,e.Response=a.Response,t.exports=e})(rO,rO.exports);var Uoe=rO.exports,b7=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(zu,"__esModule",{value:!0});zu.fetchContext=zu.fetchJson=void 0;const qoe=Uoe;function _7(t,e){var r;return b7(this,void 0,void 0,function*(){return(yield((r=e==null?void 0:e.fetch)!==null&&r!==void 0?r:qoe.fetch)(t)).json()})}zu.fetchJson=_7;function Voe(t,e){return b7(this,void 0,void 0,function*(){return(yield _7(t,e))["@context"]})}zu.fetchContext=Voe;var Hoe=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Ov,"__esModule",{value:!0});Ov.lookupUri=void 0;const koe=zu;function Qoe(t,e){return Hoe(this,void 0,void 0,function*(){const r=(yield(0,koe.fetchContext)(`https://prefix.cc/${t}.file.jsonld`,e))[t];if(typeof r!="string")throw new Error(`Expected uri to be a string, received: ${r} of type ${typeof r}`);return r})}Ov.lookupUri=Qoe;var Av={},Goe=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Av,"__esModule",{value:!0});Av.lookupPrefix=void 0;const zoe=zu;function Woe(t,e){return Goe(this,void 0,void 0,function*(){const r=new URL("https://prefix.cc/reverse");r.searchParams.append("uri",t),r.searchParams.append("format","jsonld");const n=Object.keys(yield(0,zoe.fetchContext)(r,e));if(n.length===0)throw new Error("No prefixes returned");return n[0]})}Av.lookupPrefix=Woe;var Rv={},Xoe=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})};Object.defineProperty(Rv,"__esModule",{value:!0});Rv.lookupAllPrefixes=void 0;const Koe=zu;function Joe(t){return Xoe(this,void 0,void 0,function*(){return(0,Koe.fetchContext)("https://prefix.cc/context",t)})}Rv.lookupAllPrefixes=Joe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ov,t),r(Av,t),r(Rv,t)})(tO);(function(t){var e=m&&m.__awaiter||function(u,c,l,d){function f(h){return h instanceof l?h:new l(function(p){p(h)})}return new(l||(l=Promise))(function(h,p){function b(w){try{E(d.next(w))}catch(O){p(O)}}function _(w){try{E(d.throw(w))}catch(O){p(O)}}function E(w){w.done?h(w.value):f(w.value).then(b,_)}E((d=d.apply(u,c||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.lookupAllPrefixes=t.prefixToUri=t.uriToPrefix=void 0;const r=Ev,n=tO;function a(u,c){return e(this,void 0,void 0,function*(){let l;try{l=yield(0,n.lookupPrefix)(u,c)}catch{c!=null&&c.mintOnUnknown&&(l=(0,r.fragment)(u).slice(0,4))}if(typeof l<"u"&&typeof(c==null?void 0:c.existingPrefixes)=="object"&&l in c.existingPrefixes){let d=0;for(;`${l}${d}`in c.existingPrefixes;)d+=1;l=`${l}${d}`}return l})}t.uriToPrefix=a;function s(u,c){return e(this,void 0,void 0,function*(){try{return yield(0,n.lookupUri)(u,c)}catch{return}})}t.prefixToUri=s;var o=tO;Object.defineProperty(t,"lookupAllPrefixes",{enumerable:!0,get:function(){return o.lookupAllPrefixes}})})(y7);var xv={};Object.defineProperty(xv,"__esModule",{value:!0});xv.getShaclName=void 0;function Yoe(t){if(t.termType!=="NamedNode"||!t.value.startsWith("http://www.w3.org/ns/shacl#"))throw new Error(`Term ${t.value} is not part of the SHACL namespace`);return t.value.slice(27)}xv.getShaclName=Yoe;var MR={};Object.defineProperty(MR,"__esModule",{value:!0});MR.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};var FR={};Object.defineProperty(FR,"__esModule",{value:!0});FR.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#"};var LR={};Object.defineProperty(LR,"__esModule",{value:!0});LR.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};var Nn=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})},BR=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(jR,"__esModule",{value:!0});const zt=rc,Zoe=y7,s1=_0,th=xv,eue=BR(MR),tue=BR(FR),UN=BR(LR);function iT(t){var e;return(e=/^[^]*[#/]/.exec(t))===null||e===void 0?void 0:e[0]}const aT={"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"},sT={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#"};class rue{constructor(e,r,n={},a=void 0,s=!0,o=!1,u,c=!1){this.store=e,this.base=a,this.errorOnExtraQuads=s,this.mintUnspecifiedPrefixes=o,this.fetch=u,this.extendedSyntax=c,this.prefixes={},this.prefixRev={};for(const l of Object.keys(n)){const d=n[l],f=typeof d=="string"?d:d.value;!(f in aT)&&!(l in sT)&&(this.prefixRev[f]=l,this.prefixes[l]=f)}this.writer=r}write(){return Nn(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(e.length===1&&e[0].subject.termType==="NamedNode"){const n=e[0].subject;this.store.removeQuads(e),n.equals(new zt.NamedNode("urn:x-base:default"))||this.writer.add(`BASE ${(0,s1.termToString)(n)}`),yield this.writeImports(n)}else throw new Error("Base expected");if(this.mintUnspecifiedPrefixes){const n=new Set;for(const s of[...this.store.getSubjects(null,null,null),...this.store.getPredicates(null,null,null),...this.store.getObjects(null,null,null)])if(s.termType==="NamedNode"){const o=iT(s.value);o&&!(o in this.prefixRev)&&!(o in aT)&&n.add(o)}const a=Object.assign(Object.assign({},this.prefixes),sT);yield Promise.all([...n].map(s=>(0,Zoe.uriToPrefix)(s,{fetch:this.fetch,mintOnUnknown:!0,existingPrefixes:a}).then(o=>{this.prefixes[o]=s,a[o]=s,this.prefixRev[s]=o})))}const r=new Set([...this.store.getSubjects(null,null,null),...this.store.getPredicates(null,null,null),...this.store.getObjects(null,null,null)].filter(n=>n.termType==="NamedNode").map(n=>iT(n.value)).filter(n=>typeof n=="string"));for(const n in this.prefixRev)r.has(n)||(delete this.prefixes[this.prefixRev[n]],delete this.prefixRev[n]);if(yield this.writePrefixes(),this.prefixes=Object.assign(Object.assign({},this.prefixes),sT),this.prefixRev=Object.assign(Object.assign({},this.prefixRev),aT),this.writer.newLine(),yield this.writeShapes(),this.extendedSyntax){const n=this.store.getSubjects(null,null,null);n.length>0&&this.writer.newLine(1);for(const a of n)this.writer.add(yield this.termToString(a,!0,!0)),this.writer.add(" "),this.writer.indent(),yield this.writeTurtlePredicates(a),this.writer.deindent();n.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 Nn(this,void 0,void 0,function*(){const r=this.store.getObjectsOnce(e,new zt.NamedNode("http://www.w3.org/2002/07/owl#imports"),null);if(r.length>0)for(const n of r)this.writer.add(`IMPORTS <${n.value}>`,!0)})}writePrefixes(){return Nn(this,void 0,void 0,function*(){const e=Object.keys(this.prefixes).filter(r=>!(r in tue.default)).sort();if(e.length>0)for(const r of e)this.writer.add(`PREFIX ${r}: <${this.prefixes[r]}>`,!0)})}termToString(e,r=!1,n=!1){return Nn(this,void 0,void 0,function*(){try{if(r)throw new Error("Shacl name disabled");return(0,th.getShaclName)(e)}catch{}if(e.termType==="NamedNode"){const a=iT(e.value);return a&&a in this.prefixRev&&a in this.prefixRev?`${this.prefixRev[a]}:${e.value.slice(a.length)}`:(0,s1.termToString)(e)}if(e.termType==="Literal")return e.datatypeString==="http://www.w3.org/2001/XMLSchema#integer"||e.datatypeString==="http://www.w3.org/2001/XMLSchema#boolean"?e.value:(0,s1.termToString)(e);throw e.termType==="BlankNode"&&n&&(0,s1.termToString)(e),new Error(`Invalid term type for extra statement ${e.value} (${e.termType})`)})}writeShapes(){return Nn(this,void 0,void 0,function*(){for(const e of this.store.getSubjectsOnce(new zt.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new zt.NamedNode("http://www.w3.org/ns/shacl#NodeShape"),null)){this.store.getQuadsOnce(e,new zt.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),new zt.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 r=this.store.getObjectsOnce(e,new zt.NamedNode("http://www.w3.org/ns/shacl#targetClass"),null);if(r.length>0){this.writer.add("-> ");for(const a of r)a.termType==="NamedNode"?this.writer.add(yield this.termToString(a)):(this.writer.add("!"),this.writer.add(yield this.termToString(this.singleObject(a,new zt.NamedNode("http://www.w3.org/ns/shacl#not"),!0)))),this.writer.add(" ")}const n=this.store.getPredicates(e,null,null).filter(a=>[new zt.NamedNode("http://www.w3.org/ns/shacl#targetClass"),new zt.NamedNode("http://www.w3.org/ns/shacl#property"),new zt.NamedNode("http://www.w3.org/ns/shacl#or"),...Object.keys(UN.default).map(s=>new zt.NamedNode("http://www.w3.org/ns/shacl#"+s))].every(s=>!a.equals(s)));n.length>0&&(this.writer.add(";"),this.writer.indent(),this.writer.newLine(1)),this.extendedSyntax&&(yield this.writeGivenTurtlePredicates(e,n)),n.length>0&&(this.writer.add(" "),this.writer.deindent()),yield this.writeShapeBody(e,!1)}})}getSingleProperty(e,r){let n=[e];try{let a=(0,th.getShaclName)(e.predicate),s="pred";if(a==="not"){const o=this.store.getQuadsOnce(e.object,null,null,null);if(n=n.concat(o),o.length!==1)throw new Error("Can only handle having one predicate of 'not'");[e]=o,a=(0,th.getShaclName)(e.predicate),s="not"}if(!(a in r))throw new Error(`${a} is not allowed`);return{name:a,type:s,object:e.object}}catch{this.store.addQuads(n)}}singleLayerPropertiesList(e,r){const n=[];for(const a of this.store.getQuadsOnce(e,null,null,null)){const s=this.getSingleProperty(a,r);s&&n.push(s)}return n}expectOneProperty(e,r){const n=this.store.getQuadsOnce(e,null,null,null);if(n.length===1){const a=this.getSingleProperty(n[0],r);if(a)return a}this.store.addQuads(n)}orProperties(e,r){const n=[];for(const a of this.store.getQuadsOnce(e,new zt.NamedNode("http://www.w3.org/ns/shacl#or"),null,null)){const s=[];for(const o of this.getList(a.object)){const u=this.expectOneProperty(o,r);if(!u)throw this.store.addQuad(a),new Error("Each entry of the 'or' statement must declare exactly one property");s.push(u)}n.push(s)}return n}getList(e){let r=e;const n=[];for(;!r.equals(new zt.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));)n.push(this.singleObject(r,new zt.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),!0)),r=this.singleObject(r,new zt.NamedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),!0);return n}writeIriLiteralOrArray(e){return Nn(this,void 0,void 0,function*(){if(e.termType==="BlankNode"){this.writer.add("[");let r=!0;for(const n of this.getList(e))r?r=!1:this.writer.add(" "),this.writer.add(yield this.termToString(n));this.writer.add("]")}else this.writer.add(yield this.termToString(e))})}singleObject(e,r,n){var a;return(a=this.singleQuad(e,r,n))===null||a===void 0?void 0:a.object}singleQuad(e,r,n=!1){const a=this.store.getQuadsOnce(e,r,null,null);if(n&&a.length!==1)throw this.store.addQuads(a),new Error(`The subject and predicate ${e==null?void 0:e.value} ${r==null?void 0:r.value} must have exactly one object. Instead has ${a.length}`);if(a.length>1)throw this.store.addQuads(a),new Error(`The subject and predicate ${e==null?void 0:e.value} ${r==null?void 0:r.value} can have at most one object. Instead has ${a.length}`);return a.length===1?a[0]:void 0}writeAssigment({name:e,type:r,object:n}){return Nn(this,void 0,void 0,function*(){r==="not"&&this.writer.add("!"),this.writer.add(e),this.writer.add("="),yield this.writeIriLiteralOrArray(n)})}writeAtom({name:e,type:r,object:n}){return Nn(this,void 0,void 0,function*(){switch(r==="not"&&this.writer.add("!"),e){case"node":{if(n.termType==="NamedNode")this.writer.add(`@${yield this.termToString(n)}`);else if(n.termType==="BlankNode")yield this.writeShapeBody(n);else throw new Error("Invalid nested shape, must be blank node or IRI");return}case"nodeKind":{this.writer.add((0,th.getShaclName)(n));return}case"class":{this.writer.add(yield this.termToString(n));return}case"datatype":{this.writer.add(yield this.termToString(n));return}default:this.writer.add(e),this.writer.add("="),yield this.writeIriLiteralOrArray(n)}})}writeAssigments(e,r=" ",n=!0,a){return Nn(this,void 0,void 0,function*(){for(const s of e)n?n=!1:this.writer.add(r),a?yield this.writeAtom(s):yield this.writeAssigment(s)})}writeParams(e,r=!0,n,a=!1,s=!1){return Nn(this,void 0,void 0,function*(){const o=this.orProperties(e,n),u=this.singleLayerPropertiesList(e,n);s&&(o.length>0||u.length>0)&&this.writer.newLine(1);for(const c of o)r?r=!1:this.writer.add(" "),yield this.writeAssigments(c,"|",!0,a);yield this.writeAssigments(u," ",r,a),s&&(o.length>0||u.length>0)&&this.writer.add(" .")})}writeShapeBody(e,r=!0){return Nn(this,void 0,void 0,function*(){this.writer.add("{").indent();const n=this.store.getObjectsOnce(e,new zt.NamedNode("http://www.w3.org/ns/shacl#property"),null);yield this.writeParams(e,!0,UN.default,!1,!0);for(const a of n)this.writer.newLine(1),yield this.writeProperty(a);this.writer.deindent().newLine(1),r?this.writer.add("} ."):this.writer.add("}").newLine(1)})}writeProperty(e){return Nn(this,void 0,void 0,function*(){yield this.writePath(this.singleObject(e,new zt.NamedNode("http://www.w3.org/ns/shacl#path"),!0));const r=this.singleObject(e,new zt.NamedNode("http://www.w3.org/ns/shacl#minCount")),n=this.singleObject(e,new zt.NamedNode("http://www.w3.org/ns/shacl#maxCount")),a=this.singleObject(e,new zt.NamedNode("http://www.w3.org/ns/shacl#nodeKind")),s=this.singleObject(e,new zt.NamedNode("http://www.w3.org/ns/shacl#class")),o=this.singleObject(e,new zt.NamedNode("http://www.w3.org/ns/shacl#datatype")),u=this.store.getObjectsOnce(e,new zt.NamedNode("http://www.w3.org/ns/shacl#node"),null);if(a&&(this.writer.add(" "),this.writer.add((0,th.getShaclName)(a))),s&&(this.writer.add(" "),this.writer.add(yield this.termToString(s))),o&&(this.writer.add(" "),this.writer.add(yield this.termToString(o))),r!==void 0||n!==void 0){if(this.writer.add(" ["),r){if(r.termType!=="Literal"||r.datatypeString!=="http://www.w3.org/2001/XMLSchema#integer")throw new Error("Invalid min value, must me an integer literal");this.writer.add(r.value)}else this.writer.add("0");if(this.writer.add(".."),n){if(n.termType!=="Literal"||n.datatypeString!=="http://www.w3.org/2001/XMLSchema#integer")throw new Error("Invalid max value, must me an integer literal");this.store.removeMatches(e,new zt.NamedNode("http://www.w3.org/ns/shacl#maxCount"),void 0,void 0),this.writer.add(n.value)}else this.writer.add("*");this.writer.add("]")}yield this.writeParams(e,!1,eue.default,!0);const c=[];for(const l of u)if(l.termType==="NamedNode")this.writer.add(" "),this.writer.add(`@${yield this.termToString(l)}`);else if(l.termType==="BlankNode")c.push(l);else throw new Error("Invalid nested shape, must be blank node or IRI");for(const l of c)this.writer.add(" "),yield this.writeShapeBody(l);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("%")),c.length===0&&this.writer.add(" .")})}writeTurtlePredicates(e){return Nn(this,void 0,void 0,function*(){return this.writeGivenTurtlePredicates(e,this.store.getPredicates(e,null,null))})}writeGivenTurtlePredicates(e,r){return Nn(this,void 0,void 0,function*(){let n=!1;if(r.some(a=>a.equals(zt.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")))){const a=this.store.getObjectsOnce(e,zt.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),null);a.length>0&&(n=!0,this.writer.add("a "),yield this.writeTurtleObjects(a))}for(const a of r)a.equals(zt.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"))||(n?(this.writer.add(" ;"),this.writer.newLine(1)):n=!0,this.writer.add(yield this.termToString(a,!0)),this.writer.add(" "),yield this.writeTurtleObjects(this.store.getObjectsOnce(e,a,null)))})}writeTurtleObjects(e){return Nn(this,void 0,void 0,function*(){const r=[],n=[];for(const s of e)s.termType==="BlankNode"&&[...this.store.match(null,null,s),...this.store.match(null,s,null)].length===0?r.push(s):n.push(s);this.writer.add((yield Promise.all(n.map(s=>this.termToString(s,!0,!0)))).join(", "));let a=n.length>0;if(r.length>0)for(const s of r)a?this.writer.add(", "):a=!0,(yield this.writeList(s))||(this.writer.add("["),this.writer.indent(),this.writer.newLine(1),yield this.writeTurtlePredicates(s),this.writer.deindent(),this.writer.newLine(1),this.writer.add("]"))})}writeList(e){return Nn(this,void 0,void 0,function*(){let r=e;const n=[],a=[];for(;!r.equals(zt.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"));){const o=this.store.getQuadsOnce(r,zt.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),null,null),u=this.store.getQuadsOnce(r,zt.DataFactory.namedNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),null,null);if(a.push(...o,...u),o.length!==1||u.length!==1||this.store.getQuads(r,null,null,null).length!==0)return this.store.addQuads(a),!1;n.push(o[0].object),r=u[0].object}let s=!1;this.writer.add("(");for(const o of n)s?this.writer.add(" "):s=!0,yield this.writeTurtleObjects([o]);return this.writer.add(")"),!0})}writePath(e,r=!1){return Nn(this,void 0,void 0,function*(){if(e.termType==="NamedNode")this.writer.add(yield this.termToString(e));else if(e.termType==="BlankNode"){const n=this.store.getQuadsOnce(e,null,null,null);if(n.length===1){const{predicate:a,object:s}=n[0];switch(a.value){case"http://www.w3.org/ns/shacl#inversePath":this.writer.add("^"),yield this.writePath(s,!0);return;case"http://www.w3.org/ns/shacl#alternativePath":{const o=this.getList(s);if(o.length===0)throw new Error("Invalid Alternative Path - no options");if(o.length===1)yield this.writePath(o[0]);else{r&&this.writer.add("(");let u=!0;for(const c of o)u?u=!1:this.writer.add("|"),yield this.writePath(c,!0);r&&this.writer.add(")")}return}case"http://www.w3.org/ns/shacl#zeroOrMorePath":yield this.writePath(s,!0),this.writer.add("*");return;case"http://www.w3.org/ns/shacl#oneOrMorePath":yield this.writePath(s,!0),this.writer.add("+");return;case"http://www.w3.org/ns/shacl#zeroOrOnePath":yield this.writePath(s,!0),this.writer.add("?");return;default:throw new Error(`Invalid path type ${e.value}`)}}else{this.store.addQuads(n);const a=this.getList(e);if(a.length===0)throw new Error("Invalid Path");{r&&this.writer.add("(");let s=!0;for(const o of a)s?s=!1:this.writer.add("/"),yield this.writePath(o,!0);r&&this.writer.add(")")}}}else throw new Error("Path should be named node or blank node")})}}jR.default=rue;var $R={};Object.defineProperty($R,"__esModule",{value:!0});class nue{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,r=!1){return this.write(r?` ${" ".repeat(this.indents)}${e}`:e,"utf-8"),this}newLine(e=2){return this.write(` -`.repeat(e)+" ".repeat(this.indents),"utf-8"),this}}$R.default=nue;var UR={};Object.defineProperty(UR,"__esModule",{value:!0});const iue=rc;class aue extends iue.Store{getQuadsOnce(e,r,n,a){const s=this.getQuads(e,r,n,a);return this.removeQuads(s),s}getSubjectsOnce(e,r,n){return this.getQuadsOnce(null,e,r,n).map(a=>a.subject)}getObjectsOnce(e,r,n){return this.getQuadsOnce(e,r,null,n).map(a=>a.object)}}UR.default=aue;var qN=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})},qR=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Tv,"__esModule",{value:!0});Tv.write=void 0;const sue=rc,oue=qR(jR),uue=qR($R),cue=qR(UR);function lue(t,e){return qN(this,void 0,void 0,function*(){return new Promise((r,n)=>qN(this,void 0,void 0,function*(){try{let a="";const s=new cue.default(t),o=s.getGraphs(null,null,null);if(o.length>1)throw new Error("More than one graph found - can serialize in the default graph");if(o.length===1&&!o[0].equals(sue.DataFactory.defaultGraph()))throw new Error(`Expected all triples to be in the default graph, instead triples were in ${o[0].value}`);const u=new uue.default({write:l=>{a+=l},end:()=>{let l=s.getQuads(null,null,null,null);l.length===0&&(l=void 0),r({text:a,extraQuads:l})}});yield new oue.default(s,u,e==null?void 0:e.prefixes,void 0,(e==null?void 0:e.errorOnUnused)!==!1,e==null?void 0:e.mintPrefixes,e==null?void 0:e.fetch,e==null?void 0:e.extendedSyntax).write()}catch(a){n(a)}}))})}Tv.write=lue;Object.defineProperty(Sv,"__esModule",{value:!0});Sv.ActorRdfSerializeShaclc=void 0;const due=bv,fue=CR,hue=kt,pue=Tv;class yue extends due.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){const a=new hue.Readable;a._read=()=>{};try{const s={};e.quadStream.on("prefix",(u,c)=>{s[u]=c});const{text:o}=await(0,pue.write)(await(0,fue.default)(e.quadStream),{errorOnUnused:!0,extendedSyntax:r==="text/shaclc-ext",prefixes:s});a.push(o),a.push(null)}catch(s){a._read=()=>{a.emit("error",s)}}return{data:a,triples:!0}}}Sv.ActorRdfSerializeShaclc=yue;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Sv,t)})(p7);var g7={},Iv={},Cf={},B0={};Object.defineProperty(B0,"__esModule",{value:!0});B0.ActorRdfUpdateQuads=void 0;const bue=et;class _ue extends bue.Actor{constructor(e){super(e)}}B0.ActorRdfUpdateQuads=_ue;var $u={},VR={},Pv={},$0={};Object.defineProperty($0,"__esModule",{value:!0});$0.FederatedQuadSource=void 0;const gue=ct,mue=Tl,s1=rr,vue=S_,oT=Hi,VN=Ut,wue=ht,HN=An,Sue=xt,kN=new wue.DataFactory;class cn{constructor(e,r,n,a,s){if(this.mediatorResolveQuadPattern=e,this.mediatorRdfMetadataAccumulate=r,this.sources=n.get(s1.KeysRdfResolveQuadPattern.sources),this.contextDefault=n.delete(s1.KeysRdfResolveQuadPattern.sources),this.emptyPatterns=a,this.sourceIds=n.get(s1.KeysRdfResolveQuadPattern.sourceIds)??new Map,this.skipEmptyPatterns=s,this.algebraFactory=new Sue.Factory,this.skipEmptyPatterns)for(const o of this.sources)this.emptyPatterns.has(o)||this.emptyPatterns.set(o,[])}static isTermBound(e){return e.termType!=="Variable"}static isSubPatternOf(e,r){return(!cn.isTermBound(r.subject)||r.subject.equals(e.subject))&&(!cn.isTermBound(r.predicate)||r.predicate.equals(e.predicate))&&(!cn.isTermBound(r.object)||r.object.equals(e.object))&&(!cn.isTermBound(r.graph)||r.graph.equals(e.graph))}static skolemizeTerm(e,r){return e.termType==="BlankNode"?new vue.BlankNodeScoped(`bc_${r}_${e.value}`,kN.namedNode(`${cn.SKOLEM_PREFIX}${r}:${e.value}`)):e}static skolemizeQuad(e,r){return(0,HN.mapTermsNested)(e,n=>cn.skolemizeTerm(n,r))}static deskolemizeTerm(e,r){if(e.termType==="BlankNode"&&"skolemized"in e&&(e=e.skolemized),e.termType==="NamedNode"&&e.value.startsWith(cn.SKOLEM_PREFIX)){const n=e.value.indexOf(":",cn.SKOLEM_PREFIX.length);if(e.value.slice(cn.SKOLEM_PREFIX.length,n)===r){const s=e.value.slice(n+1,e.value.length);return kN.blankNode(s)}return null}return e}static deskolemizeQuad(e,r){return(0,HN.mapTermsNested)(e,n=>{const a=cn.deskolemizeTerm(n,r);return a||n})}isSourceEmpty(e,r){if(!this.skipEmptyPatterns)return!1;const n=this.emptyPatterns.get(e);if(n){for(const a of n)if(cn.isSubPatternOf(r,a))return!0}return!1}getSourceId(e){let r=this.sourceIds.get(e);return r===void 0&&(r=`${this.sourceIds.size}`,this.sourceIds.set(e,r)),r}match(e,r,n,a){const s=async()=>{if(o.size===this.sources.length){let l=(await this.mediatorRdfMetadataAccumulate.mediate({mode:"initialize",context:this.contextDefault})).metadata;for(const f of o.values())l={...f,...(await this.mediatorRdfMetadataAccumulate.mediate({mode:"append",accumulatedMetadata:l,appendingMetadata:f,context:this.contextDefault})).metadata};l.state=new oT.MetadataValidationState;const d=c.getProperty("metadata");c.setProperty("metadata",l),d==null||d.state.invalidate()}},o=new Map,u=Promise.all(this.sources.map(async(l,d)=>{const f=this.getSourceId(l),h=cn.deskolemizeTerm(e,f),p=cn.deskolemizeTerm(r,f),b=cn.deskolemizeTerm(n,f),_=cn.deskolemizeTerm(a,f);let E,w=(0,mue.getDataSourceContext)(l,this.contextDefault);w=w.set(s1.KeysRdfResolveQuadPattern.source,l);let O;!h||!p||!b||!_||this.isSourceEmpty(l,E=this.algebraFactory.createPattern(h,p,b,_))?(O={data:new VN.ArrayIterator([],{autoStart:!1})},O.data.setProperty("metadata",{state:new oT.MetadataValidationState,...(await this.mediatorRdfMetadataAccumulate.mediate({mode:"initialize",context:this.contextDefault})).metadata})):O=await this.mediatorResolveQuadPattern.mediate({pattern:E,context:w});const A=()=>{O.data.getProperty("metadata",I=>{var D,U;o.set(`${d}`,I),this.skipEmptyPatterns&&!((D=I.cardinality)!=null&&D.value)&&E&&!this.isSourceEmpty(l,E)&&this.emptyPatterns.get(l).push(E),s().catch(H=>c.emit("error",H)),(U=I.state)==null||U.addInvalidateListener(()=>{o.delete(`${d}`),A()})})};A();const T=O.data.map(I=>cn.skolemizeQuad(I,f));return T.on("error",I=>c.emit("error",I)),T}));u.catch(l=>c.emit("error",l));const c=new gue.ClosableTransformIterator(async()=>new VN.UnionIterator(await u),{autoStart:!1,onClose(){u.then(l=>{for(const d of l)d.destroy()},()=>{})}});return this.sources.length===0&&this.mediatorRdfMetadataAccumulate.mediate({mode:"initialize",context:this.contextDefault}).then(l=>c.setProperty("metadata",{state:new oT.MetadataValidationState,...l.metadata})).catch(l=>c.emit("error",l)),c}}$0.FederatedQuadSource=cn;cn.SKOLEM_PREFIX="urn:comunica_skolem:source_";Object.defineProperty(Pv,"__esModule",{value:!0});Pv.ActorRdfResolveQuadPatternFederated=void 0;const QN=Tl,Tue=$0;class Eue extends QN.ActorRdfResolveQuadPatternSource{constructor(e){super(e),this.emptyPatterns=new Map,e.mediatorRdfMetadataAccumulate||(this.mediatorRdfMetadataAccumulate={async mediate(r){if(r.mode==="initialize")return{metadata:{cardinality:{type:"exact",value:0},canContainUndefs:!1}};const n={...r.accumulatedMetadata},a=r.appendingMetadata;return!a.cardinality||!Number.isFinite(a.cardinality.value)?(n.cardinality.type="estimate",n.cardinality.value=Number.POSITIVE_INFINITY):(a.cardinality.type==="estimate"&&(n.cardinality.type="estimate"),n.cardinality.value+=a.cardinality.value),(n.requestTime||a.requestTime)&&(n.requestTime=n.requestTime||0,a.requestTime=a.requestTime||0,n.requestTime+=a.requestTime),(n.pageSize||a.pageSize)&&(n.pageSize=n.pageSize||0,a.pageSize=a.pageSize||0,n.pageSize+=a.pageSize),a.canContainUndefs&&(n.canContainUndefs=!0),{metadata:n}}})}async test(e){if(!(0,QN.getContextSources)(e.context))throw new Error(`Actor ${this.name} can only resolve quad pattern queries against a sources array.`);return!0}async getSource(e){return new Tue.FederatedQuadSource(this.mediatorResolveQuadPattern,this.mediatorRdfMetadataAccumulate,e,this.emptyPatterns,this.skipEmptyPatterns)}}Pv.ActorRdfResolveQuadPatternFederated=Eue;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Pv,t),r($0,t)})(VR);Object.defineProperty($u,"__esModule",{value:!0});$u.ActorRdfUpdateQuadsDestination=$u.deskolemize=$u.deskolemizeStream=void 0;const Oue=VR,GN=rr,Aue=B0;function nO(t,e){return t==null?void 0:t.map(r=>Oue.FederatedQuadSource.deskolemizeQuad(r,e))}$u.deskolemizeStream=nO;function m7(t){var n;const e=t.context.get(GN.KeysRdfUpdateQuads.destination),r=(n=t.context.get(GN.KeysRdfResolveQuadPattern.sourceIds))==null?void 0:n.get(e);return r?{...t,quadStreamInsert:nO(t.quadStreamInsert,r),quadStreamDelete:nO(t.quadStreamDelete,r)}:t}$u.deskolemize=m7;class Rue extends Aue.ActorRdfUpdateQuads{async test(e){return!0}async run(e){const r=await this.getDestination(e.context);return await this.getOutput(r,m7(e),e.context)}async getOutput(e,r,n){return{execute:()=>Promise.all([r.quadStreamInsert?e.insert(r.quadStreamInsert):Promise.resolve(),r.quadStreamDelete?e.delete(r.quadStreamDelete):Promise.resolve(),r.deleteGraphs?e.deleteGraphs(r.deleteGraphs.graphs,r.deleteGraphs.requireExistence,r.deleteGraphs.dropGraphs):Promise.resolve(),r.createGraphs?e.createGraphs(r.createGraphs.graphs,r.createGraphs.requireNonExistence):Promise.resolve()]).then(()=>{})}}}$u.ActorRdfUpdateQuadsDestination=Rue;var Dv={},Zs={},Nv={},U0={},iO={exports:{}},v7=Sf.EventEmitter;const xue={},Iue=Object.freeze(Object.defineProperty({__proto__:null,default:xue},Symbol.toStringTag,{value:"Module"})),w7=e_(Iue);var uT,zN;function Pue(){if(zN)return uT;zN=1;function t(b,_){var E=Object.keys(b);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(b);_&&(w=w.filter(function(O){return Object.getOwnPropertyDescriptor(b,O).enumerable})),E.push.apply(E,w)}return E}function e(b){for(var _=1;_0?this.tail.next=w:this.head=w,this.tail=w,++this.length}},{key:"unshift",value:function(E){var w={data:E,next:this.head};this.length===0&&(this.tail=w),this.head=w,++this.length}},{key:"shift",value:function(){if(this.length!==0){var E=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,E}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(E){if(this.length===0)return"";for(var w=this.head,O=""+w.data;w=w.next;)O+=E+w.data;return O}},{key:"concat",value:function(E){if(this.length===0)return l.alloc(0);for(var w=l.allocUnsafe(E>>>0),O=this.head,A=0;O;)p(O.data,w,A),A+=O.data.length,O=O.next;return w}},{key:"consume",value:function(E,w){var O;return ET.length?T.length:E;if(I===T.length?A+=T:A+=T.slice(0,E),E-=I,E===0){I===T.length?(++O,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=T.slice(I));break}++O}return this.length-=O,A}},{key:"_getBuffer",value:function(E){var w=l.allocUnsafe(E),O=this.head,A=1;for(O.data.copy(w),E-=O.data.length;O=O.next;){var T=O.data,I=E>T.length?T.length:E;if(T.copy(w,w.length-E,0,I),E-=I,E===0){I===T.length?(++A,O.next?this.head=O.next:this.head=this.tail=null):(this.head=O,O.data=T.slice(I));break}++A}return this.length-=A,w}},{key:h,value:function(E,w){return f(this,e(e({},w),{},{depth:0,customInspect:!1}))}}]),b}(),uT}function Due(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return n||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(aO,this,t)):process.nextTick(aO,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Z1,r):(r._writableState.errorEmitted=!0,process.nextTick(WN,r,s)):process.nextTick(WN,r,s):e?(process.nextTick(Z1,r),e(s)):process.nextTick(Z1,r)}),this)}function WN(t,e){aO(t,e),Z1(t)}function Z1(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Nue(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function aO(t,e){t.emit("error",e)}function Cue(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}var S7={destroy:Due,undestroy:Nue,errorOrDestroy:Cue},El={};function jue(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var T7={};function Ia(t,e,r){r||(r=Error);function n(s,o,u){return typeof e=="string"?e:e(s,o,u)}var a=function(s){jue(o,s);function o(u,c,l){return s.call(this,n(u,c,l))||this}return o}(r);a.prototype.name=r.name,a.prototype.code=t,T7[t]=a}function XN(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function Mue(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Fue(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Lue(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Ia("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Ia("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&Mue(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var a;if(Fue(t," argument"))a="The ".concat(t," ").concat(n," ").concat(XN(e,"type"));else{var s=Lue(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(s," ").concat(n," ").concat(XN(e,"type"))}return a+=". Received type ".concat(typeof r),a},TypeError);Ia("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ia("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Ia("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ia("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Ia("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ia("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ia("ERR_STREAM_WRITE_AFTER_END","write after end");Ia("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ia("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Ia("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");El.codes=T7;var Bue=El.codes.ERR_INVALID_OPT_VALUE;function $ue(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Uue(t,e,r,n){var a=$ue(e,n,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var s=n?r:"highWaterMark";throw new Bue(s,a)}return Math.floor(a)}return t.objectMode?16:16*1024}var E7={getHighWaterMark:Uue},que=Vue;function Vue(t,e){if(cT("noDeprecation"))return t;var r=!1;function n(){if(!r){if(cT("throwDeprecation"))throw new Error(e);cT("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function cT(t){try{if(!m.localStorage)return!1}catch{return!1}var e=m.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}var lT,KN;function O7(){if(KN)return lT;KN=1,lT=H;function t(oe){var J=this;this.next=null,this.entry=null,this.finish=function(){Re(J,oe)}}var e;H.WritableState=D;var r={deprecate:que},n=v7,a=la.Buffer,s=(typeof m<"u"?m:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(oe){return a.from(oe)}function u(oe){return a.isBuffer(oe)||oe instanceof s}var c=S7,l=E7,d=l.getHighWaterMark,f=El.codes,h=f.ERR_INVALID_ARG_TYPE,p=f.ERR_METHOD_NOT_IMPLEMENTED,b=f.ERR_MULTIPLE_CALLBACK,_=f.ERR_STREAM_CANNOT_PIPE,E=f.ERR_STREAM_DESTROYED,w=f.ERR_STREAM_NULL_VALUES,O=f.ERR_STREAM_WRITE_AFTER_END,A=f.ERR_UNKNOWN_ENCODING,T=c.errorOrDestroy;gf(H,n);function I(){}function D(oe,J,le){e=e||Zd(),oe=oe||{},typeof le!="boolean"&&(le=J instanceof e),this.objectMode=!!oe.objectMode,le&&(this.objectMode=this.objectMode||!!oe.writableObjectMode),this.highWaterMark=d(this,oe,"writableHighWaterMark",le),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var pe=oe.decodeStrings===!1;this.decodeStrings=!pe,this.defaultEncoding=oe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){Q(J,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=oe.emitClose!==!1,this.autoDestroy=!!oe.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}D.prototype.getBuffer=function(){for(var J=this.bufferedRequest,le=[];J;)le.push(J),J=J.next;return le},function(){try{Object.defineProperty(D.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var U;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(U=Function.prototype[Symbol.hasInstance],Object.defineProperty(H,Symbol.hasInstance,{value:function(J){return U.call(this,J)?!0:this!==H?!1:J&&J._writableState instanceof D}})):U=function(J){return J instanceof this};function H(oe){e=e||Zd();var J=this instanceof e;if(!J&&!U.call(H,this))return new H(oe);this._writableState=new D(oe,this,J),this.writable=!0,oe&&(typeof oe.write=="function"&&(this._write=oe.write),typeof oe.writev=="function"&&(this._writev=oe.writev),typeof oe.destroy=="function"&&(this._destroy=oe.destroy),typeof oe.final=="function"&&(this._final=oe.final)),n.call(this)}H.prototype.pipe=function(){T(this,new _)};function N(oe,J){var le=new O;T(oe,le),process.nextTick(J,le)}function x(oe,J,le,pe){var L;return le===null?L=new w:typeof le!="string"&&!J.objectMode&&(L=new h("chunk",["string","Buffer"],le)),L?(T(oe,L),process.nextTick(pe,L),!1):!0}H.prototype.write=function(oe,J,le){var pe=this._writableState,L=!1,P=!pe.objectMode&&u(oe);return P&&!a.isBuffer(oe)&&(oe=o(oe)),typeof J=="function"&&(le=J,J=null),P?J="buffer":J||(J=pe.defaultEncoding),typeof le!="function"&&(le=I),pe.ending?N(this,le):(P||x(this,pe,oe,le))&&(pe.pendingcb++,L=X(this,pe,P,oe,J,le)),L},H.prototype.cork=function(){this._writableState.corked++},H.prototype.uncork=function(){var oe=this._writableState;oe.corked&&(oe.corked--,!oe.writing&&!oe.corked&&!oe.bufferProcessing&&oe.bufferedRequest&&be(this,oe))},H.prototype.setDefaultEncoding=function(J){if(typeof J=="string"&&(J=J.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((J+"").toLowerCase())>-1))throw new A(J);return this._writableState.defaultEncoding=J,this},Object.defineProperty(H.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function F(oe,J,le){return!oe.objectMode&&oe.decodeStrings!==!1&&typeof J=="string"&&(J=a.from(J,le)),J}Object.defineProperty(H.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function X(oe,J,le,pe,L,P){if(!le){var g=F(J,pe,L);pe!==g&&(le=!0,L="buffer",pe=g)}var y=J.objectMode?1:pe.length;J.length+=y;var v=J.length0)if(typeof g!="string"&&!V.objectMode&&Object.getPrototypeOf(g)!==n.prototype&&(g=s(g)),v)V.endEmitted?I(P,new w):F(P,V,g,!0);else if(V.ended)I(P,new _);else{if(V.destroyed)return!1;V.reading=!1,V.decoder&&!y?(g=V.decoder.write(g),V.objectMode||g.length!==0?F(P,V,g,!1):be(P,V)):F(P,V,g,!1)}else v||(V.reading=!1,be(P,V))}return!V.ended&&(V.length=ne?P=ne:(P--,P|=P>>>1,P|=P>>>2,P|=P>>>4,P|=P>>>8,P|=P>>>16,P++),P}function j(P,g){return P<=0||g.length===0&&g.ended?0:g.objectMode?1:P!==P?g.flowing&&g.length?g.buffer.head.data.length:g.length:(P>g.highWaterMark&&(g.highWaterMark=$(P)),P<=g.length?P:g.ended?g.length:(g.needReadable=!0,0))}N.prototype.read=function(P){c("read",P),P=parseInt(P,10);var g=this._readableState,y=P;if(P!==0&&(g.emittedReadable=!1),P===0&&g.needReadable&&((g.highWaterMark!==0?g.length>=g.highWaterMark:g.length>0)||g.ended))return c("read: emitReadable",g.length,g.ended),g.length===0&&g.ended?le(this):se(this),null;if(P=j(P,g),P===0&&g.ended)return g.length===0&&le(this),null;var v=g.needReadable;c("need readable",v),(g.length===0||g.length-P0?C=J(P,g):C=null,C===null?(g.needReadable=g.length<=g.highWaterMark,P=0):(g.length-=P,g.awaitDrain=0),g.length===0&&(g.ended||(g.needReadable=!0),y!==P&&g.ended&&le(this)),C!==null&&this.emit("data",C),C};function Q(P,g){if(c("onEofChunk"),!g.ended){if(g.decoder){var y=g.decoder.end();y&&y.length&&(g.buffer.push(y),g.length+=g.objectMode?1:y.length)}g.ended=!0,g.sync?se(P):(g.needReadable=!1,g.emittedReadable||(g.emittedReadable=!0,ie(P)))}}function se(P){var g=P._readableState;c("emitReadable",g.needReadable,g.emittedReadable),g.needReadable=!1,g.emittedReadable||(c("emitReadable",g.flowing),g.emittedReadable=!0,process.nextTick(ie,P))}function ie(P){var g=P._readableState;c("emitReadable_",g.destroyed,g.length,g.ended),!g.destroyed&&(g.length||g.ended)&&(P.emit("readable"),g.emittedReadable=!1),g.needReadable=!g.flowing&&!g.ended&&g.length<=g.highWaterMark,oe(P)}function be(P,g){g.readingMore||(g.readingMore=!0,process.nextTick(he,P,g))}function he(P,g){for(;!g.reading&&!g.ended&&(g.length1&&L(v.pipes,P)!==-1)&&!ee&&(c("false write response, pause",v.awaitDrain),v.awaitDrain++),y.pause())}function me(M){c("onerror",M),W(),P.removeListener("error",me),e(P,"error")===0&&I(P,M)}U(P,"error",me);function Ee(){P.removeListener("finish",k),W()}P.once("close",Ee);function k(){c("onfinish"),P.removeListener("close",Ee),W()}P.once("finish",k);function W(){c("unpipe"),y.unpipe(P)}return P.emit("pipe",y),v.flowing||(c("pipe resume"),y.resume()),P};function Te(P){return function(){var y=P._readableState;c("pipeOnDrain",y.awaitDrain),y.awaitDrain&&y.awaitDrain--,y.awaitDrain===0&&e(P,"data")&&(y.flowing=!0,oe(P))}}N.prototype.unpipe=function(P){var g=this._readableState,y={hasUnpiped:!1};if(g.pipesCount===0)return this;if(g.pipesCount===1)return P&&P!==g.pipes?this:(P||(P=g.pipes),g.pipes=null,g.pipesCount=0,g.flowing=!1,P&&P.emit("unpipe",this,y),this);if(!P){var v=g.pipes,C=g.pipesCount;g.pipes=null,g.pipesCount=0,g.flowing=!1;for(var V=0;V0,v.flowing!==!1&&this.resume()):P==="readable"&&!v.endEmitted&&!v.readableListening&&(v.readableListening=v.needReadable=!0,v.flowing=!1,v.emittedReadable=!1,c("on readable",v.length,v.reading),v.length?se(this):v.reading||process.nextTick(ye,this)),y},N.prototype.addListener=N.prototype.on,N.prototype.removeListener=function(P,g){var y=r.prototype.removeListener.call(this,P,g);return P==="readable"&&process.nextTick(Ne,this),y},N.prototype.removeAllListeners=function(P){var g=r.prototype.removeAllListeners.apply(this,arguments);return(P==="readable"||P===void 0)&&process.nextTick(Ne,this),g};function Ne(P){var g=P._readableState;g.readableListening=P.listenerCount("readable")>0,g.resumeScheduled&&!g.paused?g.flowing=!0:P.listenerCount("data")>0&&P.resume()}function ye(P){c("readable nexttick read 0"),P.read(0)}N.prototype.resume=function(){var P=this._readableState;return P.flowing||(c("resume"),P.flowing=!P.readableListening,ce(this,P)),P.paused=!1,this};function ce(P,g){g.resumeScheduled||(g.resumeScheduled=!0,process.nextTick(Re,P,g))}function Re(P,g){c("resume",g.reading),g.reading||P.read(0),g.resumeScheduled=!1,P.emit("resume"),oe(P),g.flowing&&!g.reading&&P.read(0)}N.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function oe(P){var g=P._readableState;for(c("flow",g.flowing);g.flowing&&P.read()!==null;);}N.prototype.wrap=function(P){var g=this,y=this._readableState,v=!1;P.on("end",function(){if(c("wrapped end"),y.decoder&&!y.ended){var q=y.decoder.end();q&&q.length&&g.push(q)}g.push(null)}),P.on("data",function(q){if(c("wrapped data"),y.decoder&&(q=y.decoder.write(q)),!(y.objectMode&&q==null)&&!(!y.objectMode&&(!q||!q.length))){var G=g.push(q);G||(v=!0,P.pause())}});for(var C in P)this[C]===void 0&&typeof P[C]=="function"&&(this[C]=function(G){return function(){return P[G].apply(P,arguments)}}(C));for(var V=0;V=g.length?(g.decoder?y=g.buffer.join(""):g.buffer.length===1?y=g.buffer.first():y=g.buffer.concat(g.length),g.buffer.clear()):y=g.buffer.consume(P,g.decoder),y}function le(P){var g=P._readableState;c("endReadable",g.endEmitted),g.endEmitted||(g.ended=!0,process.nextTick(pe,g,P))}function pe(P,g){if(c("endReadableNT",P.endEmitted,P.length),!P.endEmitted&&P.length===0&&(P.endEmitted=!0,g.readable=!1,g.emit("end"),P.autoDestroy)){var y=g._writableState;(!y||y.autoDestroy&&y.finished)&&g.destroy()}}typeof Symbol=="function"&&(N.from=function(P,g){return T===void 0&&(T=zue()),T(N,P,g)});function L(P,g){for(var y=0,v=P.length;y0;return ace(o,c,l,function(d){a||(a=d),d&&s.forEach(i4),!c&&(s.forEach(i4),n(a))})});return e.reduce(sce)}var cce=uce;(function(t,e){e=t.exports=R7(),e.Stream=e,e.Readable=e,e.Writable=O7(),e.Duplex=Zd(),e.Transform=x7,e.PassThrough=ece,e.finished=HR,e.pipeline=cce})(iO,iO.exports);var lce=iO.exports;Object.defineProperty(U0,"__esModule",{value:!0});U0.ReadableWebToNodeStream=void 0;const dce=lce;class fce extends dce.Readable{constructor(e){super(),this.bytesRead=0,this.released=!1,this.reader=e.getReader()}async _read(){if(this.released){this.push(null);return}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()}}U0.ReadableWebToNodeStream=fce;function o1(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bT={exports:{}},a4;function hce(){return a4||(a4=1,function(t,e){(function(r){t.exports=r()})(function(){return function r(n,a,s){function o(l,d){if(!a[l]){if(!n[l]){var f=typeof o1=="function"&&o1;if(!d&&f)return f(l,!0);if(u)return u(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var p=a[l]={exports:{}};n[l][0].call(p.exports,function(b){var _=n[l][1][b];return o(_||b)},p,p.exports,r,n,a,s)}return a[l].exports}for(var u=typeof o1=="function"&&o1,c=0;c=0;Te--)if(Ne[Te]!==ye[Te])return!1;for(Te=Ne.length-1;Te>=0;Te--)if(he=Ne[Te],!E($[he],j[he],Q,se))return!1;return!0}function A($,j,Q){E($,j,!0)&&b($,j,Q,"notDeepStrictEqual",A)}function T($,j){if(!$||!j)return!1;if(Object.prototype.toString.call(j)=="[object RegExp]")return j.test($);try{if($ instanceof j)return!0}catch{}return!Error.isPrototypeOf(j)&&j.call({},$)===!0}function I($){var j;try{$()}catch(Q){j=Q}return j}function D($,j,Q,se){var ie;if(typeof j!="function")throw new TypeError('"block" argument must be a function');typeof Q=="string"&&(se=Q,Q=null),ie=I(j),se=(Q&&Q.name?" ("+Q.name+").":".")+(se?" "+se:"."),$&&!ie&&b(ie,Q,"Missing expected exception"+se);var be=typeof se=="string",he=!$&&U.isError(ie),Te=!$&&ie&&!Q;if((he&&be&&T(ie,Q)||Te)&&b(ie,Q,"Got unwanted exception"+se),$&&ie&&Q&&!T(ie,Q)||!$&&ie)throw ie}var U=r("util/"),H=Object.prototype.hasOwnProperty,N=Array.prototype.slice,x=(function(){}).name==="foo",F=n.exports=_,X=/\s*function\s+([^\(\s]*)\s*/;F.AssertionError=function(j){this.name="AssertionError",this.actual=j.actual,this.expected=j.expected,this.operator=j.operator,j.message?(this.message=j.message,this.generatedMessage=!1):(this.message=p(this),this.generatedMessage=!0);var Q=j.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,Q);else{var se=new Error;if(se.stack){var ie=se.stack,be=d(Q),he=ie.indexOf(` +`.repeat(e)+" ".repeat(this.indents),"utf-8"),this}}$R.default=nue;var UR={};Object.defineProperty(UR,"__esModule",{value:!0});const iue=rc;class aue extends iue.Store{getQuadsOnce(e,r,n,a){const s=this.getQuads(e,r,n,a);return this.removeQuads(s),s}getSubjectsOnce(e,r,n){return this.getQuadsOnce(null,e,r,n).map(a=>a.subject)}getObjectsOnce(e,r,n){return this.getQuadsOnce(e,r,null,n).map(a=>a.object)}}UR.default=aue;var qN=m&&m.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})},qR=m&&m.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Tv,"__esModule",{value:!0});Tv.write=void 0;const sue=rc,oue=qR(jR),uue=qR($R),cue=qR(UR);function lue(t,e){return qN(this,void 0,void 0,function*(){return new Promise((r,n)=>qN(this,void 0,void 0,function*(){try{let a="";const s=new cue.default(t),o=s.getGraphs(null,null,null);if(o.length>1)throw new Error("More than one graph found - can serialize in the default graph");if(o.length===1&&!o[0].equals(sue.DataFactory.defaultGraph()))throw new Error(`Expected all triples to be in the default graph, instead triples were in ${o[0].value}`);const u=new uue.default({write:l=>{a+=l},end:()=>{let l=s.getQuads(null,null,null,null);l.length===0&&(l=void 0),r({text:a,extraQuads:l})}});yield new oue.default(s,u,e==null?void 0:e.prefixes,void 0,(e==null?void 0:e.errorOnUnused)!==!1,e==null?void 0:e.mintPrefixes,e==null?void 0:e.fetch,e==null?void 0:e.extendedSyntax).write()}catch(a){n(a)}}))})}Tv.write=lue;Object.defineProperty(Sv,"__esModule",{value:!0});Sv.ActorRdfSerializeShaclc=void 0;const due=bv,fue=CR,hue=kt,pue=Tv;class yue extends due.ActorRdfSerializeFixedMediaTypes{constructor(e){super(e)}async runHandle(e,r,n){const a=new hue.Readable;a._read=()=>{};try{const s={};e.quadStream.on("prefix",(u,c)=>{s[u]=c});const{text:o}=await(0,pue.write)(await(0,fue.default)(e.quadStream),{errorOnUnused:!0,extendedSyntax:r==="text/shaclc-ext",prefixes:s});a.push(o),a.push(null)}catch(s){a._read=()=>{a.emit("error",s)}}return{data:a,triples:!0}}}Sv.ActorRdfSerializeShaclc=yue;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Sv,t)})(p7);var g7={},Iv={},Cf={},$0={};Object.defineProperty($0,"__esModule",{value:!0});$0.ActorRdfUpdateQuads=void 0;const bue=et;class _ue extends bue.Actor{constructor(e){super(e)}}$0.ActorRdfUpdateQuads=_ue;var $u={},VR={},Pv={},U0={};Object.defineProperty(U0,"__esModule",{value:!0});U0.FederatedQuadSource=void 0;const gue=ct,mue=Tl,o1=rr,vue=S_,oT=Hi,VN=Ut,wue=ht,HN=An,Sue=xt,kN=new wue.DataFactory;class cn{constructor(e,r,n,a,s){if(this.mediatorResolveQuadPattern=e,this.mediatorRdfMetadataAccumulate=r,this.sources=n.get(o1.KeysRdfResolveQuadPattern.sources),this.contextDefault=n.delete(o1.KeysRdfResolveQuadPattern.sources),this.emptyPatterns=a,this.sourceIds=n.get(o1.KeysRdfResolveQuadPattern.sourceIds)??new Map,this.skipEmptyPatterns=s,this.algebraFactory=new Sue.Factory,this.skipEmptyPatterns)for(const o of this.sources)this.emptyPatterns.has(o)||this.emptyPatterns.set(o,[])}static isTermBound(e){return e.termType!=="Variable"}static isSubPatternOf(e,r){return(!cn.isTermBound(r.subject)||r.subject.equals(e.subject))&&(!cn.isTermBound(r.predicate)||r.predicate.equals(e.predicate))&&(!cn.isTermBound(r.object)||r.object.equals(e.object))&&(!cn.isTermBound(r.graph)||r.graph.equals(e.graph))}static skolemizeTerm(e,r){return e.termType==="BlankNode"?new vue.BlankNodeScoped(`bc_${r}_${e.value}`,kN.namedNode(`${cn.SKOLEM_PREFIX}${r}:${e.value}`)):e}static skolemizeQuad(e,r){return(0,HN.mapTermsNested)(e,n=>cn.skolemizeTerm(n,r))}static deskolemizeTerm(e,r){if(e.termType==="BlankNode"&&"skolemized"in e&&(e=e.skolemized),e.termType==="NamedNode"&&e.value.startsWith(cn.SKOLEM_PREFIX)){const n=e.value.indexOf(":",cn.SKOLEM_PREFIX.length);if(e.value.slice(cn.SKOLEM_PREFIX.length,n)===r){const s=e.value.slice(n+1,e.value.length);return kN.blankNode(s)}return null}return e}static deskolemizeQuad(e,r){return(0,HN.mapTermsNested)(e,n=>{const a=cn.deskolemizeTerm(n,r);return a||n})}isSourceEmpty(e,r){if(!this.skipEmptyPatterns)return!1;const n=this.emptyPatterns.get(e);if(n){for(const a of n)if(cn.isSubPatternOf(r,a))return!0}return!1}getSourceId(e){let r=this.sourceIds.get(e);return r===void 0&&(r=`${this.sourceIds.size}`,this.sourceIds.set(e,r)),r}match(e,r,n,a){const s=async()=>{if(o.size===this.sources.length){let l=(await this.mediatorRdfMetadataAccumulate.mediate({mode:"initialize",context:this.contextDefault})).metadata;for(const f of o.values())l={...f,...(await this.mediatorRdfMetadataAccumulate.mediate({mode:"append",accumulatedMetadata:l,appendingMetadata:f,context:this.contextDefault})).metadata};l.state=new oT.MetadataValidationState;const d=c.getProperty("metadata");c.setProperty("metadata",l),d==null||d.state.invalidate()}},o=new Map,u=Promise.all(this.sources.map(async(l,d)=>{const f=this.getSourceId(l),h=cn.deskolemizeTerm(e,f),p=cn.deskolemizeTerm(r,f),b=cn.deskolemizeTerm(n,f),_=cn.deskolemizeTerm(a,f);let E,w=(0,mue.getDataSourceContext)(l,this.contextDefault);w=w.set(o1.KeysRdfResolveQuadPattern.source,l);let O;!h||!p||!b||!_||this.isSourceEmpty(l,E=this.algebraFactory.createPattern(h,p,b,_))?(O={data:new VN.ArrayIterator([],{autoStart:!1})},O.data.setProperty("metadata",{state:new oT.MetadataValidationState,...(await this.mediatorRdfMetadataAccumulate.mediate({mode:"initialize",context:this.contextDefault})).metadata})):O=await this.mediatorResolveQuadPattern.mediate({pattern:E,context:w});const A=()=>{O.data.getProperty("metadata",I=>{var D,U;o.set(`${d}`,I),this.skipEmptyPatterns&&!((D=I.cardinality)!=null&&D.value)&&E&&!this.isSourceEmpty(l,E)&&this.emptyPatterns.get(l).push(E),s().catch(H=>c.emit("error",H)),(U=I.state)==null||U.addInvalidateListener(()=>{o.delete(`${d}`),A()})})};A();const T=O.data.map(I=>cn.skolemizeQuad(I,f));return T.on("error",I=>c.emit("error",I)),T}));u.catch(l=>c.emit("error",l));const c=new gue.ClosableTransformIterator(async()=>new VN.UnionIterator(await u),{autoStart:!1,onClose(){u.then(l=>{for(const d of l)d.destroy()},()=>{})}});return this.sources.length===0&&this.mediatorRdfMetadataAccumulate.mediate({mode:"initialize",context:this.contextDefault}).then(l=>c.setProperty("metadata",{state:new oT.MetadataValidationState,...l.metadata})).catch(l=>c.emit("error",l)),c}}U0.FederatedQuadSource=cn;cn.SKOLEM_PREFIX="urn:comunica_skolem:source_";Object.defineProperty(Pv,"__esModule",{value:!0});Pv.ActorRdfResolveQuadPatternFederated=void 0;const QN=Tl,Tue=U0;class Eue extends QN.ActorRdfResolveQuadPatternSource{constructor(e){super(e),this.emptyPatterns=new Map,e.mediatorRdfMetadataAccumulate||(this.mediatorRdfMetadataAccumulate={async mediate(r){if(r.mode==="initialize")return{metadata:{cardinality:{type:"exact",value:0},canContainUndefs:!1}};const n={...r.accumulatedMetadata},a=r.appendingMetadata;return!a.cardinality||!Number.isFinite(a.cardinality.value)?(n.cardinality.type="estimate",n.cardinality.value=Number.POSITIVE_INFINITY):(a.cardinality.type==="estimate"&&(n.cardinality.type="estimate"),n.cardinality.value+=a.cardinality.value),(n.requestTime||a.requestTime)&&(n.requestTime=n.requestTime||0,a.requestTime=a.requestTime||0,n.requestTime+=a.requestTime),(n.pageSize||a.pageSize)&&(n.pageSize=n.pageSize||0,a.pageSize=a.pageSize||0,n.pageSize+=a.pageSize),a.canContainUndefs&&(n.canContainUndefs=!0),{metadata:n}}})}async test(e){if(!(0,QN.getContextSources)(e.context))throw new Error(`Actor ${this.name} can only resolve quad pattern queries against a sources array.`);return!0}async getSource(e){return new Tue.FederatedQuadSource(this.mediatorResolveQuadPattern,this.mediatorRdfMetadataAccumulate,e,this.emptyPatterns,this.skipEmptyPatterns)}}Pv.ActorRdfResolveQuadPatternFederated=Eue;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Pv,t),r(U0,t)})(VR);Object.defineProperty($u,"__esModule",{value:!0});$u.ActorRdfUpdateQuadsDestination=$u.deskolemize=$u.deskolemizeStream=void 0;const Oue=VR,GN=rr,Aue=$0;function nO(t,e){return t==null?void 0:t.map(r=>Oue.FederatedQuadSource.deskolemizeQuad(r,e))}$u.deskolemizeStream=nO;function m7(t){var n;const e=t.context.get(GN.KeysRdfUpdateQuads.destination),r=(n=t.context.get(GN.KeysRdfResolveQuadPattern.sourceIds))==null?void 0:n.get(e);return r?{...t,quadStreamInsert:nO(t.quadStreamInsert,r),quadStreamDelete:nO(t.quadStreamDelete,r)}:t}$u.deskolemize=m7;class Rue extends Aue.ActorRdfUpdateQuads{async test(e){return!0}async run(e){const r=await this.getDestination(e.context);return await this.getOutput(r,m7(e),e.context)}async getOutput(e,r,n){return{execute:()=>Promise.all([r.quadStreamInsert?e.insert(r.quadStreamInsert):Promise.resolve(),r.quadStreamDelete?e.delete(r.quadStreamDelete):Promise.resolve(),r.deleteGraphs?e.deleteGraphs(r.deleteGraphs.graphs,r.deleteGraphs.requireExistence,r.deleteGraphs.dropGraphs):Promise.resolve(),r.createGraphs?e.createGraphs(r.createGraphs.graphs,r.createGraphs.requireNonExistence):Promise.resolve()]).then(()=>{})}}}$u.ActorRdfUpdateQuadsDestination=Rue;var Dv={},Zs={},Nv={},q0={},iO={exports:{}},v7=Sf.EventEmitter;const xue={},Iue=Object.freeze(Object.defineProperty({__proto__:null,default:xue},Symbol.toStringTag,{value:"Module"})),w7=e_(Iue);var uT,zN;function Pue(){if(zN)return uT;zN=1;function t(b,_){var E=Object.keys(b);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(b);_&&(w=w.filter(function(O){return Object.getOwnPropertyDescriptor(b,O).enumerable})),E.push.apply(E,w)}return E}function e(b){for(var _=1;_0?this.tail.next=w:this.head=w,this.tail=w,++this.length}},{key:"unshift",value:function(E){var w={data:E,next:this.head};this.length===0&&(this.tail=w),this.head=w,++this.length}},{key:"shift",value:function(){if(this.length!==0){var E=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,E}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(E){if(this.length===0)return"";for(var w=this.head,O=""+w.data;w=w.next;)O+=E+w.data;return O}},{key:"concat",value:function(E){if(this.length===0)return l.alloc(0);for(var w=l.allocUnsafe(E>>>0),O=this.head,A=0;O;)p(O.data,w,A),A+=O.data.length,O=O.next;return w}},{key:"consume",value:function(E,w){var O;return ET.length?T.length:E;if(I===T.length?A+=T:A+=T.slice(0,E),E-=I,E===0){I===T.length?(++O,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=T.slice(I));break}++O}return this.length-=O,A}},{key:"_getBuffer",value:function(E){var w=l.allocUnsafe(E),O=this.head,A=1;for(O.data.copy(w),E-=O.data.length;O=O.next;){var T=O.data,I=E>T.length?T.length:E;if(T.copy(w,w.length-E,0,I),E-=I,E===0){I===T.length?(++A,O.next?this.head=O.next:this.head=this.tail=null):(this.head=O,O.data=T.slice(I));break}++A}return this.length-=A,w}},{key:h,value:function(E,w){return f(this,e(e({},w),{},{depth:0,customInspect:!1}))}}]),b}(),uT}function Due(t,e){var r=this,n=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return n||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(aO,this,t)):process.nextTick(aO,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Z1,r):(r._writableState.errorEmitted=!0,process.nextTick(WN,r,s)):process.nextTick(WN,r,s):e?(process.nextTick(Z1,r),e(s)):process.nextTick(Z1,r)}),this)}function WN(t,e){aO(t,e),Z1(t)}function Z1(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Nue(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function aO(t,e){t.emit("error",e)}function Cue(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}var S7={destroy:Due,undestroy:Nue,errorOrDestroy:Cue},El={};function jue(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var T7={};function Ia(t,e,r){r||(r=Error);function n(s,o,u){return typeof e=="string"?e:e(s,o,u)}var a=function(s){jue(o,s);function o(u,c,l){return s.call(this,n(u,c,l))||this}return o}(r);a.prototype.name=r.name,a.prototype.code=t,T7[t]=a}function XN(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(n){return String(n)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function Mue(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Fue(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Lue(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Ia("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Ia("ERR_INVALID_ARG_TYPE",function(t,e,r){var n;typeof e=="string"&&Mue(e,"not ")?(n="must not be",e=e.replace(/^not /,"")):n="must be";var a;if(Fue(t," argument"))a="The ".concat(t," ").concat(n," ").concat(XN(e,"type"));else{var s=Lue(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(s," ").concat(n," ").concat(XN(e,"type"))}return a+=". Received type ".concat(typeof r),a},TypeError);Ia("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Ia("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Ia("ERR_STREAM_PREMATURE_CLOSE","Premature close");Ia("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Ia("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Ia("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Ia("ERR_STREAM_WRITE_AFTER_END","write after end");Ia("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Ia("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Ia("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");El.codes=T7;var Bue=El.codes.ERR_INVALID_OPT_VALUE;function $ue(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Uue(t,e,r,n){var a=$ue(e,n,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var s=n?r:"highWaterMark";throw new Bue(s,a)}return Math.floor(a)}return t.objectMode?16:16*1024}var E7={getHighWaterMark:Uue},que=Vue;function Vue(t,e){if(cT("noDeprecation"))return t;var r=!1;function n(){if(!r){if(cT("throwDeprecation"))throw new Error(e);cT("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function cT(t){try{if(!m.localStorage)return!1}catch{return!1}var e=m.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}var lT,KN;function O7(){if(KN)return lT;KN=1,lT=H;function t(oe){var J=this;this.next=null,this.entry=null,this.finish=function(){Re(J,oe)}}var e;H.WritableState=D;var r={deprecate:que},n=v7,a=la.Buffer,s=(typeof m<"u"?m:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(oe){return a.from(oe)}function u(oe){return a.isBuffer(oe)||oe instanceof s}var c=S7,l=E7,d=l.getHighWaterMark,f=El.codes,h=f.ERR_INVALID_ARG_TYPE,p=f.ERR_METHOD_NOT_IMPLEMENTED,b=f.ERR_MULTIPLE_CALLBACK,_=f.ERR_STREAM_CANNOT_PIPE,E=f.ERR_STREAM_DESTROYED,w=f.ERR_STREAM_NULL_VALUES,O=f.ERR_STREAM_WRITE_AFTER_END,A=f.ERR_UNKNOWN_ENCODING,T=c.errorOrDestroy;gf(H,n);function I(){}function D(oe,J,le){e=e||Zd(),oe=oe||{},typeof le!="boolean"&&(le=J instanceof e),this.objectMode=!!oe.objectMode,le&&(this.objectMode=this.objectMode||!!oe.writableObjectMode),this.highWaterMark=d(this,oe,"writableHighWaterMark",le),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var pe=oe.decodeStrings===!1;this.decodeStrings=!pe,this.defaultEncoding=oe.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(L){Q(J,L)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=oe.emitClose!==!1,this.autoDestroy=!!oe.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}D.prototype.getBuffer=function(){for(var J=this.bufferedRequest,le=[];J;)le.push(J),J=J.next;return le},function(){try{Object.defineProperty(D.prototype,"buffer",{get:r.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var U;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(U=Function.prototype[Symbol.hasInstance],Object.defineProperty(H,Symbol.hasInstance,{value:function(J){return U.call(this,J)?!0:this!==H?!1:J&&J._writableState instanceof D}})):U=function(J){return J instanceof this};function H(oe){e=e||Zd();var J=this instanceof e;if(!J&&!U.call(H,this))return new H(oe);this._writableState=new D(oe,this,J),this.writable=!0,oe&&(typeof oe.write=="function"&&(this._write=oe.write),typeof oe.writev=="function"&&(this._writev=oe.writev),typeof oe.destroy=="function"&&(this._destroy=oe.destroy),typeof oe.final=="function"&&(this._final=oe.final)),n.call(this)}H.prototype.pipe=function(){T(this,new _)};function N(oe,J){var le=new O;T(oe,le),process.nextTick(J,le)}function x(oe,J,le,pe){var L;return le===null?L=new w:typeof le!="string"&&!J.objectMode&&(L=new h("chunk",["string","Buffer"],le)),L?(T(oe,L),process.nextTick(pe,L),!1):!0}H.prototype.write=function(oe,J,le){var pe=this._writableState,L=!1,P=!pe.objectMode&&u(oe);return P&&!a.isBuffer(oe)&&(oe=o(oe)),typeof J=="function"&&(le=J,J=null),P?J="buffer":J||(J=pe.defaultEncoding),typeof le!="function"&&(le=I),pe.ending?N(this,le):(P||x(this,pe,oe,le))&&(pe.pendingcb++,L=X(this,pe,P,oe,J,le)),L},H.prototype.cork=function(){this._writableState.corked++},H.prototype.uncork=function(){var oe=this._writableState;oe.corked&&(oe.corked--,!oe.writing&&!oe.corked&&!oe.bufferProcessing&&oe.bufferedRequest&&be(this,oe))},H.prototype.setDefaultEncoding=function(J){if(typeof J=="string"&&(J=J.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((J+"").toLowerCase())>-1))throw new A(J);return this._writableState.defaultEncoding=J,this},Object.defineProperty(H.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function F(oe,J,le){return!oe.objectMode&&oe.decodeStrings!==!1&&typeof J=="string"&&(J=a.from(J,le)),J}Object.defineProperty(H.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function X(oe,J,le,pe,L,P){if(!le){var g=F(J,pe,L);pe!==g&&(le=!0,L="buffer",pe=g)}var y=J.objectMode?1:pe.length;J.length+=y;var v=J.length0)if(typeof g!="string"&&!V.objectMode&&Object.getPrototypeOf(g)!==n.prototype&&(g=s(g)),v)V.endEmitted?I(P,new w):F(P,V,g,!0);else if(V.ended)I(P,new _);else{if(V.destroyed)return!1;V.reading=!1,V.decoder&&!y?(g=V.decoder.write(g),V.objectMode||g.length!==0?F(P,V,g,!1):be(P,V)):F(P,V,g,!1)}else v||(V.reading=!1,be(P,V))}return!V.ended&&(V.length=ne?P=ne:(P--,P|=P>>>1,P|=P>>>2,P|=P>>>4,P|=P>>>8,P|=P>>>16,P++),P}function j(P,g){return P<=0||g.length===0&&g.ended?0:g.objectMode?1:P!==P?g.flowing&&g.length?g.buffer.head.data.length:g.length:(P>g.highWaterMark&&(g.highWaterMark=$(P)),P<=g.length?P:g.ended?g.length:(g.needReadable=!0,0))}N.prototype.read=function(P){c("read",P),P=parseInt(P,10);var g=this._readableState,y=P;if(P!==0&&(g.emittedReadable=!1),P===0&&g.needReadable&&((g.highWaterMark!==0?g.length>=g.highWaterMark:g.length>0)||g.ended))return c("read: emitReadable",g.length,g.ended),g.length===0&&g.ended?le(this):se(this),null;if(P=j(P,g),P===0&&g.ended)return g.length===0&&le(this),null;var v=g.needReadable;c("need readable",v),(g.length===0||g.length-P0?C=J(P,g):C=null,C===null?(g.needReadable=g.length<=g.highWaterMark,P=0):(g.length-=P,g.awaitDrain=0),g.length===0&&(g.ended||(g.needReadable=!0),y!==P&&g.ended&&le(this)),C!==null&&this.emit("data",C),C};function Q(P,g){if(c("onEofChunk"),!g.ended){if(g.decoder){var y=g.decoder.end();y&&y.length&&(g.buffer.push(y),g.length+=g.objectMode?1:y.length)}g.ended=!0,g.sync?se(P):(g.needReadable=!1,g.emittedReadable||(g.emittedReadable=!0,ie(P)))}}function se(P){var g=P._readableState;c("emitReadable",g.needReadable,g.emittedReadable),g.needReadable=!1,g.emittedReadable||(c("emitReadable",g.flowing),g.emittedReadable=!0,process.nextTick(ie,P))}function ie(P){var g=P._readableState;c("emitReadable_",g.destroyed,g.length,g.ended),!g.destroyed&&(g.length||g.ended)&&(P.emit("readable"),g.emittedReadable=!1),g.needReadable=!g.flowing&&!g.ended&&g.length<=g.highWaterMark,oe(P)}function be(P,g){g.readingMore||(g.readingMore=!0,process.nextTick(he,P,g))}function he(P,g){for(;!g.reading&&!g.ended&&(g.length1&&L(v.pipes,P)!==-1)&&!ee&&(c("false write response, pause",v.awaitDrain),v.awaitDrain++),y.pause())}function me(M){c("onerror",M),W(),P.removeListener("error",me),e(P,"error")===0&&I(P,M)}U(P,"error",me);function Ee(){P.removeListener("finish",k),W()}P.once("close",Ee);function k(){c("onfinish"),P.removeListener("close",Ee),W()}P.once("finish",k);function W(){c("unpipe"),y.unpipe(P)}return P.emit("pipe",y),v.flowing||(c("pipe resume"),y.resume()),P};function Te(P){return function(){var y=P._readableState;c("pipeOnDrain",y.awaitDrain),y.awaitDrain&&y.awaitDrain--,y.awaitDrain===0&&e(P,"data")&&(y.flowing=!0,oe(P))}}N.prototype.unpipe=function(P){var g=this._readableState,y={hasUnpiped:!1};if(g.pipesCount===0)return this;if(g.pipesCount===1)return P&&P!==g.pipes?this:(P||(P=g.pipes),g.pipes=null,g.pipesCount=0,g.flowing=!1,P&&P.emit("unpipe",this,y),this);if(!P){var v=g.pipes,C=g.pipesCount;g.pipes=null,g.pipesCount=0,g.flowing=!1;for(var V=0;V0,v.flowing!==!1&&this.resume()):P==="readable"&&!v.endEmitted&&!v.readableListening&&(v.readableListening=v.needReadable=!0,v.flowing=!1,v.emittedReadable=!1,c("on readable",v.length,v.reading),v.length?se(this):v.reading||process.nextTick(ye,this)),y},N.prototype.addListener=N.prototype.on,N.prototype.removeListener=function(P,g){var y=r.prototype.removeListener.call(this,P,g);return P==="readable"&&process.nextTick(Ne,this),y},N.prototype.removeAllListeners=function(P){var g=r.prototype.removeAllListeners.apply(this,arguments);return(P==="readable"||P===void 0)&&process.nextTick(Ne,this),g};function Ne(P){var g=P._readableState;g.readableListening=P.listenerCount("readable")>0,g.resumeScheduled&&!g.paused?g.flowing=!0:P.listenerCount("data")>0&&P.resume()}function ye(P){c("readable nexttick read 0"),P.read(0)}N.prototype.resume=function(){var P=this._readableState;return P.flowing||(c("resume"),P.flowing=!P.readableListening,ce(this,P)),P.paused=!1,this};function ce(P,g){g.resumeScheduled||(g.resumeScheduled=!0,process.nextTick(Re,P,g))}function Re(P,g){c("resume",g.reading),g.reading||P.read(0),g.resumeScheduled=!1,P.emit("resume"),oe(P),g.flowing&&!g.reading&&P.read(0)}N.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function oe(P){var g=P._readableState;for(c("flow",g.flowing);g.flowing&&P.read()!==null;);}N.prototype.wrap=function(P){var g=this,y=this._readableState,v=!1;P.on("end",function(){if(c("wrapped end"),y.decoder&&!y.ended){var q=y.decoder.end();q&&q.length&&g.push(q)}g.push(null)}),P.on("data",function(q){if(c("wrapped data"),y.decoder&&(q=y.decoder.write(q)),!(y.objectMode&&q==null)&&!(!y.objectMode&&(!q||!q.length))){var G=g.push(q);G||(v=!0,P.pause())}});for(var C in P)this[C]===void 0&&typeof P[C]=="function"&&(this[C]=function(G){return function(){return P[G].apply(P,arguments)}}(C));for(var V=0;V=g.length?(g.decoder?y=g.buffer.join(""):g.buffer.length===1?y=g.buffer.first():y=g.buffer.concat(g.length),g.buffer.clear()):y=g.buffer.consume(P,g.decoder),y}function le(P){var g=P._readableState;c("endReadable",g.endEmitted),g.endEmitted||(g.ended=!0,process.nextTick(pe,g,P))}function pe(P,g){if(c("endReadableNT",P.endEmitted,P.length),!P.endEmitted&&P.length===0&&(P.endEmitted=!0,g.readable=!1,g.emit("end"),P.autoDestroy)){var y=g._writableState;(!y||y.autoDestroy&&y.finished)&&g.destroy()}}typeof Symbol=="function"&&(N.from=function(P,g){return T===void 0&&(T=zue()),T(N,P,g)});function L(P,g){for(var y=0,v=P.length;y0;return ace(o,c,l,function(d){a||(a=d),d&&s.forEach(i4),!c&&(s.forEach(i4),n(a))})});return e.reduce(sce)}var cce=uce;(function(t,e){e=t.exports=R7(),e.Stream=e,e.Readable=e,e.Writable=O7(),e.Duplex=Zd(),e.Transform=x7,e.PassThrough=ece,e.finished=HR,e.pipeline=cce})(iO,iO.exports);var lce=iO.exports;Object.defineProperty(q0,"__esModule",{value:!0});q0.ReadableWebToNodeStream=void 0;const dce=lce;class fce extends dce.Readable{constructor(e){super(),this.bytesRead=0,this.released=!1,this.reader=e.getReader()}async _read(){if(this.released){this.push(null);return}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()}}q0.ReadableWebToNodeStream=fce;function u1(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var bT={exports:{}},a4;function hce(){return a4||(a4=1,function(t,e){(function(r){t.exports=r()})(function(){return function r(n,a,s){function o(l,d){if(!a[l]){if(!n[l]){var f=typeof u1=="function"&&u1;if(!d&&f)return f(l,!0);if(u)return u(l,!0);var h=new Error("Cannot find module '"+l+"'");throw h.code="MODULE_NOT_FOUND",h}var p=a[l]={exports:{}};n[l][0].call(p.exports,function(b){var _=n[l][1][b];return o(_||b)},p,p.exports,r,n,a,s)}return a[l].exports}for(var u=typeof u1=="function"&&u1,c=0;c=0;Te--)if(Ne[Te]!==ye[Te])return!1;for(Te=Ne.length-1;Te>=0;Te--)if(he=Ne[Te],!E($[he],j[he],Q,se))return!1;return!0}function A($,j,Q){E($,j,!0)&&b($,j,Q,"notDeepStrictEqual",A)}function T($,j){if(!$||!j)return!1;if(Object.prototype.toString.call(j)=="[object RegExp]")return j.test($);try{if($ instanceof j)return!0}catch{}return!Error.isPrototypeOf(j)&&j.call({},$)===!0}function I($){var j;try{$()}catch(Q){j=Q}return j}function D($,j,Q,se){var ie;if(typeof j!="function")throw new TypeError('"block" argument must be a function');typeof Q=="string"&&(se=Q,Q=null),ie=I(j),se=(Q&&Q.name?" ("+Q.name+").":".")+(se?" "+se:"."),$&&!ie&&b(ie,Q,"Missing expected exception"+se);var be=typeof se=="string",he=!$&&U.isError(ie),Te=!$&&ie&&!Q;if((he&&be&&T(ie,Q)||Te)&&b(ie,Q,"Got unwanted exception"+se),$&&ie&&Q&&!T(ie,Q)||!$&&ie)throw ie}var U=r("util/"),H=Object.prototype.hasOwnProperty,N=Array.prototype.slice,x=(function(){}).name==="foo",F=n.exports=_,X=/\s*function\s+([^\(\s]*)\s*/;F.AssertionError=function(j){this.name="AssertionError",this.actual=j.actual,this.expected=j.expected,this.operator=j.operator,j.message?(this.message=j.message,this.generatedMessage=!1):(this.message=p(this),this.generatedMessage=!0);var Q=j.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,Q);else{var se=new Error;if(se.stack){var ie=se.stack,be=d(Q),he=ie.indexOf(` `+be);if(he>=0){var Te=ie.indexOf(` `,he+1);ie=ie.substring(Te+1)}this.stack=ie}}},U.inherits(F.AssertionError,Error),F.fail=b,F.ok=_,F.equal=function(j,Q,se){j!=Q&&b(j,Q,se,"==",F.equal)},F.notEqual=function(j,Q,se){j==Q&&b(j,Q,se,"!=",F.notEqual)},F.deepEqual=function(j,Q,se){E(j,Q,!1)||b(j,Q,se,"deepEqual",F.deepEqual)},F.deepStrictEqual=function(j,Q,se){E(j,Q,!0)||b(j,Q,se,"deepStrictEqual",F.deepStrictEqual)},F.notDeepEqual=function(j,Q,se){E(j,Q,!1)&&b(j,Q,se,"notDeepEqual",F.notDeepEqual)},F.notDeepStrictEqual=A,F.strictEqual=function(j,Q,se){j!==Q&&b(j,Q,se,"===",F.strictEqual)},F.notStrictEqual=function(j,Q,se){j===Q&&b(j,Q,se,"!==",F.notStrictEqual)},F.throws=function($,j,Q){D(!0,$,j,Q)},F.doesNotThrow=function($,j,Q){D(!1,$,j,Q)},F.ifError=function($){if($)throw $};var ne=Object.keys||function($){var j=[];for(var Q in $)H.call($,Q)&&j.push(Q);return j}}).call(this,typeof m<"u"?m:typeof self<"u"?self:typeof window<"u"?window:{})},{"util/":7}],3:[function(r,n,a){},{}],4:[function(r,n,a){function s(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function u(T){if(p===setTimeout)return setTimeout(T,0);if((p===s||!p)&&setTimeout)return p=setTimeout,setTimeout(T,0);try{return p(T,0)}catch{try{return p.call(null,T,0)}catch{return p.call(this,T,0)}}}function c(T){if(b===clearTimeout)return clearTimeout(T);if((b===o||!b)&&clearTimeout)return b=clearTimeout,clearTimeout(T);try{return b(T)}catch{try{return b.call(null,T)}catch{return b.call(this,T)}}}function l(){O&&E&&(O=!1,E.length?w=E.concat(w):A=-1,w.length&&d())}function d(){if(!O){var T=u(l);O=!0;for(var I=w.length;I;){for(E=w,w=[];++A1)for(var D=1;D=3&&(Re.depth=arguments[2]),arguments.length>=4&&(Re.colors=arguments[3]),O(ce)?Re.showHidden=ce:ce&&a._extend(Re,ce),H(Re.showHidden)&&(Re.showHidden=!1),H(Re.depth)&&(Re.depth=2),H(Re.colors)&&(Re.colors=!1),H(Re.customInspect)&&(Re.customInspect=!0),Re.colors&&(Re.stylize=c),f(Re,ye,Re.depth)}function c(ye,ce){var Re=u.styles[ce];return Re?"\x1B["+u.colors[Re][0]+"m"+ye+"\x1B["+u.colors[Re][1]+"m":ye}function l(ye,ce){return ye}function d(ye){var ce={};return ye.forEach(function(Re,oe){ce[Re]=!0}),ce}function f(ye,ce,Re){if(ye.customInspect&&ce&&ne(ce.inspect)&&ce.inspect!==a.inspect&&(!ce.constructor||ce.constructor.prototype!==ce)){var oe=ce.inspect(Re,ye);return D(oe)||(oe=f(ye,oe,Re)),oe}var J=h(ye,ce);if(J)return J;var le=Object.keys(ce),pe=d(le);if(ye.showHidden&&(le=Object.getOwnPropertyNames(ce)),X(ce)&&(le.indexOf("message")>=0||le.indexOf("description")>=0))return p(ce);if(le.length===0){if(ne(ce)){var L=ce.name?": "+ce.name:"";return ye.stylize("[Function"+L+"]","special")}if(N(ce))return ye.stylize(RegExp.prototype.toString.call(ce),"regexp");if(F(ce))return ye.stylize(Date.prototype.toString.call(ce),"date");if(X(ce))return p(ce)}var P="",g=!1,y=["{","}"];if(w(ce)&&(g=!0,y=["[","]"]),ne(ce)&&(P=" [Function"+(ce.name?": "+ce.name:"")+"]"),N(ce)&&(P=" "+RegExp.prototype.toString.call(ce)),F(ce)&&(P=" "+Date.prototype.toUTCString.call(ce)),X(ce)&&(P=" "+p(ce)),le.length===0&&(!g||ce.length==0))return y[0]+P+y[1];if(Re<0)return N(ce)?ye.stylize(RegExp.prototype.toString.call(ce),"regexp"):ye.stylize("[Object]","special");ye.seen.push(ce);var v;return v=g?b(ye,ce,Re,pe,le):le.map(function(C){return _(ye,ce,Re,pe,C,g)}),ye.seen.pop(),E(v,P,y)}function h(ye,ce){if(H(ce))return ye.stylize("undefined","undefined");if(D(ce)){var Re="'"+JSON.stringify(ce).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return ye.stylize(Re,"string")}return I(ce)?ye.stylize(""+ce,"number"):O(ce)?ye.stylize(""+ce,"boolean"):A(ce)?ye.stylize("null","null"):void 0}function p(ye){return"["+Error.prototype.toString.call(ye)+"]"}function b(ye,ce,Re,oe,J){for(var le=[],pe=0,L=ce.length;pe-1&&(L=le?L.split(` @@ -154,23 +154,23 @@ ${" ".repeat(this.indents)}${e}`:e,"utf-8"),this}newLine(e=2){return this.write( `)):L=ye.stylize("[Circular]","special")),H(pe)){if(le&&J.match(/^\d+$/))return L;(pe=JSON.stringify(""+J)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(pe=pe.substr(1,pe.length-2),pe=ye.stylize(pe,"name")):(pe=pe.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),pe=ye.stylize(pe,"string"))}return pe+": "+L}function E(ye,ce,Re){var oe=0;return ye.reduce(function(J,le){return oe++,le.indexOf(` `)>=0&&oe++,J+le.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?Re[0]+(ce===""?"":ce+` `)+" "+ye.join(`, - `)+" "+Re[1]:Re[0]+ce+" "+ye.join(", ")+" "+Re[1]}function w(ye){return Array.isArray(ye)}function O(ye){return typeof ye=="boolean"}function A(ye){return ye===null}function T(ye){return ye==null}function I(ye){return typeof ye=="number"}function D(ye){return typeof ye=="string"}function U(ye){return typeof ye=="symbol"}function H(ye){return ye===void 0}function N(ye){return x(ye)&&j(ye)==="[object RegExp]"}function x(ye){return typeof ye=="object"&&ye!==null}function F(ye){return x(ye)&&j(ye)==="[object Date]"}function X(ye){return x(ye)&&(j(ye)==="[object Error]"||ye instanceof Error)}function ne(ye){return typeof ye=="function"}function $(ye){return ye===null||typeof ye=="boolean"||typeof ye=="number"||typeof ye=="string"||typeof ye=="symbol"||ye===void 0}function j(ye){return Object.prototype.toString.call(ye)}function Q(ye){return ye<10?"0"+ye.toString(10):ye.toString(10)}function se(){var ye=new Date,ce=[Q(ye.getHours()),Q(ye.getMinutes()),Q(ye.getSeconds())].join(":");return[ye.getDate(),Ne[ye.getMonth()],ce].join(" ")}function ie(ye,ce){return Object.prototype.hasOwnProperty.call(ye,ce)}var be=/%[sdj%]/g;a.format=function(ye){if(!D(ye)){for(var ce=[],Re=0;Re=J)return P;switch(P){case"%s":return String(oe[Re++]);case"%d":return Number(oe[Re++]);case"%j":try{return JSON.stringify(oe[Re++])}catch{return"[Circular]"}default:return P}}),pe=oe[Re];Re3&&arguments[3]!==void 0?arguments[3]:1,He=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return 1},Xe=Object.create(Ca.prototype);return d(Xe),J(Xe,Object.create(nu.prototype),te,de,_e,$e,He),Xe}function l(te,de,_e){var $e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,He=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0,Xe=Object.create(Ca.prototype);return d(Xe),we(Xe,Object.create(Il.prototype),te,de,_e,$e,He),Xe}function d(te){te._state="readable",te._reader=void 0,te._storedError=void 0,te._disturbed=!1}function f(te){return!!yn(te)&&!!Object.prototype.hasOwnProperty.call(te,"_readableStreamController")}function h(te){return te._disturbed}function p(te){return te._reader!==void 0}function b(te,de){function _e(){return Q(He).then(function(xn){var oi=xn.value;if(xn.done===!0&&Xe===!1&&(gt===!1&&he(Xt._readableStreamController),Bt===!1&&he(vr._readableStreamController),Xe=!0),Xe!==!0){var Ma=oi,bn=oi;gt===!1&&Te(Xt._readableStreamController,Ma),Bt===!1&&Te(vr._readableStreamController,bn)}})}function $e(){}var He=u(te),Xe=!1,gt=!1,Bt=!1,Yt=void 0,Dr=void 0,Xt=void 0,vr=void 0,si=void 0,Vn=new Promise(function(xn){si=xn});return Xt=c($e,_e,function(oi){if(gt=!0,Yt=oi,Bt===!0){var Ma=ke([Yt,Dr]),bn=w(te,Ma);si(bn)}return Vn}),vr=c($e,_e,function(oi){if(Bt=!0,Dr=oi,gt===!0){var Ma=ke([Yt,Dr]),bn=w(te,Ma);si(bn)}return Vn}),He._closedPromise.catch(function(xn){Xe!==!0&&(ye(Xt._readableStreamController,xn),ye(vr._readableStreamController,xn),Xe=!0)}),[Xt,vr]}function _(te){return new Promise(function(de,_e){var $e={_resolve:de,_reject:_e};te._reader._readIntoRequests.push($e)})}function E(te){return new Promise(function(de,_e){var $e={_resolve:de,_reject:_e};te._reader._readRequests.push($e)})}function w(te,de){return te._disturbed=!0,te._state==="closed"?Promise.resolve(void 0):te._state==="errored"?Promise.reject(te._storedError):(O(te),te._readableStreamController[Zr](de).then(function(){}))}function O(te){te._state="closed";var de=te._reader;if(de!==void 0){if(F(de)===!0){var _e=!0,$e=!1,He=void 0;try{for(var Xe,gt=de._readRequests[Symbol.iterator]();!(_e=(Xe=gt.next()).done);_e=!0)(0,Xe.value._resolve)(De(void 0,!0))}catch(Bt){$e=!0,He=Bt}finally{try{!_e&>.return&>.return()}finally{if($e)throw He}}de._readRequests=[]}Pr(de)}}function A(te,de){te._state="errored",te._storedError=de;var _e=te._reader;if(_e!==void 0){if(F(_e)===!0){var $e=!0,He=!1,Xe=void 0;try{for(var gt,Bt=_e._readRequests[Symbol.iterator]();!($e=(gt=Bt.next()).done);$e=!0)gt.value._reject(de)}catch(Vn){He=!0,Xe=Vn}finally{try{!$e&&Bt.return&&Bt.return()}finally{if(He)throw Xe}}_e._readRequests=[]}else{var Yt=!0,Dr=!1,Xt=void 0;try{for(var vr,si=_e._readIntoRequests[Symbol.iterator]();!(Yt=(vr=si.next()).done);Yt=!0)vr.value._reject(de)}catch(Vn){Dr=!0,Xt=Vn}finally{try{!Yt&&si.return&&si.return()}finally{if(Dr)throw Xt}}_e._readIntoRequests=[]}Qt(_e,de),_e._closedPromise.catch(function(){})}}function T(te,de,_e){te._reader._readIntoRequests.shift()._resolve(De(de,_e))}function I(te,de,_e){te._reader._readRequests.shift()._resolve(De(de,_e))}function D(te){return te._reader._readIntoRequests.length}function U(te){return te._reader._readRequests.length}function H(te){var de=te._reader;return de!==void 0&&x(de)!==!1}function N(te){var de=te._reader;return de!==void 0&&F(de)!==!1}function x(te){return!!yn(te)&&!!Object.prototype.hasOwnProperty.call(te,"_readIntoRequests")}function F(te){return!!yn(te)&&!!Object.prototype.hasOwnProperty.call(te,"_readRequests")}function X(te,de){te._ownerReadableStream=de,de._reader=te,de._state==="readable"?Wr(te):de._state==="closed"?Br(te):(br(te,de._storedError),te._closedPromise.catch(function(){}))}function ne(te,de){return w(te._ownerReadableStream,de)}function $(te){te._ownerReadableStream._state==="readable"?Qt(te,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):_r(te,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),te._closedPromise.catch(function(){}),te._ownerReadableStream._reader=void 0,te._ownerReadableStream=void 0}function j(te,de){var _e=te._ownerReadableStream;return _e._disturbed=!0,_e._state==="errored"?Promise.reject(_e._storedError):ae(_e._readableStreamController,de)}function Q(te){var de=te._ownerReadableStream;return de._disturbed=!0,de._state==="closed"?Promise.resolve(De(void 0,!0)):de._state==="errored"?Promise.reject(de._storedError):de._readableStreamController[ps]()}function se(te){return!!yn(te)&&!!Object.prototype.hasOwnProperty.call(te,"_controlledReadableStream")}function ie(te){be(te)!==!1&&(te._pulling!==!0?(te._pulling=!0,te._pullAlgorithm().then(function(){if(te._pulling=!1,te._pullAgain===!0)return te._pullAgain=!1,ie(te)},function(de){ye(te,de)}).catch(mr)):te._pullAgain=!0)}function be(te){var de=te._controlledReadableStream;return oe(te)!==!1&&te._started!==!1&&(p(de)===!0&&U(de)>0||ce(te)>0)}function he(te){var de=te._controlledReadableStream;te._closeRequested=!0,te._queue.length===0&&O(de)}function Te(te,de){var _e=te._controlledReadableStream;if(p(_e)===!0&&U(_e)>0)I(_e,de,!1);else{var $e=void 0;try{$e=te._strategySizeAlgorithm(de)}catch(He){throw ye(te,He),He}try{ya(te,de,$e)}catch(He){throw ye(te,He),He}}ie(te)}function Ne(te,de){var _e=te._controlledReadableStream;ki(te),A(_e,de)}function ye(te,de){te._controlledReadableStream._state==="readable"&&Ne(te,de)}function ce(te){var de=te._controlledReadableStream._state;return de==="errored"?null:de==="closed"?0:te._strategyHWM-te._queueTotalSize}function Re(te){return be(te)!==!0}function oe(te){var de=te._controlledReadableStream._state;return te._closeRequested===!1&&de==="readable"}function J(te,de,_e,$e,He,Xe,gt){de._controlledReadableStream=te,de._queue=void 0,de._queueTotalSize=void 0,ki(de),de._started=!1,de._closeRequested=!1,de._pullAgain=!1,de._pulling=!1,de._strategySizeAlgorithm=gt,de._strategyHWM=Xe,de._pullAlgorithm=$e,de._cancelAlgorithm=He,te._readableStreamController=de;var Bt=_e();Promise.resolve(Bt).then(function(){de._started=!0,ie(de)},function(Yt){ye(de,Yt)}).catch(mr)}function le(te,de,_e,$e){var He=Object.create(nu.prototype),Xe=ze(de,"pull",0,[He]),gt=ze(de,"cancel",1,[]);J(te,He,function(){return Je(de,"start",[He])},Xe,gt,_e,$e)}function pe(te){return!!yn(te)&&!!Object.prototype.hasOwnProperty.call(te,"_controlledReadableByteStream")}function L(te){return!!yn(te)&&!!Object.prototype.hasOwnProperty.call(te,"_associatedReadableByteStreamController")}function P(te){W(te)!==!1&&(te._pulling!==!0?(te._pulling=!0,te._pullAlgorithm().then(function(){te._pulling=!1,te._pullAgain===!0&&(te._pullAgain=!1,P(te))},function(de){te._controlledReadableByteStream._state==="readable"&&R(te,de)}).catch(mr)):te._pullAgain=!0)}function g(te){Y(te),te._pendingPullIntos=[]}function y(te,de){var _e=!1;te._state==="closed"&&(_e=!0);var $e=v(de);de.readerType==="default"?I(te,$e,_e):T(te,$e,_e)}function v(te){var de=te.bytesFilled,_e=te.elementSize;return new te.ctor(te.buffer,te.byteOffset,de/_e)}function C(te,de,_e,$e){te._queue.push({buffer:de,byteOffset:_e,byteLength:$e}),te._queueTotalSize+=$e}function V(te,de){var _e=de.elementSize,$e=de.bytesFilled-de.bytesFilled%_e,He=Math.min(te._queueTotalSize,de.byteLength-de.bytesFilled),Xe=de.bytesFilled+He,gt=Xe-Xe%_e,Bt=He,Yt=!1;gt>$e&&(Bt=gt-de.bytesFilled,Yt=!0);for(var Dr=te._queue;Bt>0;){var Xt=Dr[0],vr=Math.min(Bt,Xt.byteLength),si=de.byteOffset+de.bytesFilled;Ae(de.buffer,si,Xt.buffer,Xt.byteOffset,vr),Xt.byteLength===vr?Dr.shift():(Xt.byteOffset+=vr,Xt.byteLength-=vr),te._queueTotalSize-=vr,q(te,vr,de),Bt-=vr}return Yt}function q(te,de,_e){Y(te),_e.bytesFilled+=de}function G(te){te._queueTotalSize===0&&te._closeRequested===!0?O(te._controlledReadableByteStream):P(te)}function Y(te){te._byobRequest!==void 0&&(te._byobRequest._associatedReadableByteStreamController=void 0,te._byobRequest._view=void 0,te._byobRequest=void 0)}function ee(te){for(;te._pendingPullIntos.length>0;){if(te._queueTotalSize===0)return;var de=te._pendingPullIntos[0];V(te,de)===!0&&(k(te),y(te._controlledReadableByteStream,de))}}function ae(te,de){var _e=te._controlledReadableByteStream,$e=1;de.constructor!==DataView&&($e=de.constructor.BYTES_PER_ELEMENT);var He=de.constructor,Xe={buffer:at(de.buffer),byteOffset:de.byteOffset,byteLength:de.byteLength,bytesFilled:0,elementSize:$e,ctor:He,readerType:"byob"};if(te._pendingPullIntos.length>0)return te._pendingPullIntos.push(Xe),_(_e);if(_e._state==="closed"){var gt=new de.constructor(Xe.buffer,Xe.byteOffset,0);return Promise.resolve(De(gt,!0))}if(te._queueTotalSize>0){if(V(te,Xe)===!0){var Bt=v(Xe);return G(te),Promise.resolve(De(Bt,!1))}if(te._closeRequested===!0){var Yt=new TypeError("Insufficient bytes to fill elements in the given buffer");return R(te,Yt),Promise.reject(Yt)}}te._pendingPullIntos.push(Xe);var Dr=_(_e);return P(te),Dr}function ve(te,de){de.buffer=at(de.buffer);var _e=te._controlledReadableByteStream;if(H(_e)===!0)for(;D(_e)>0;)y(_e,k(te))}function me(te,de,_e){if(_e.bytesFilled+de>_e.byteLength)throw new RangeError("bytesWritten out of range");if(q(te,de,_e),!(_e.bytesFilled<_e.elementSize)){k(te);var $e=_e.bytesFilled%_e.elementSize;if($e>0){var He=_e.byteOffset+_e.bytesFilled,Xe=_e.buffer.slice(He-$e,He);C(te,Xe,0,Xe.byteLength)}_e.buffer=at(_e.buffer),_e.bytesFilled-=$e,y(te._controlledReadableByteStream,_e),ee(te)}}function Ee(te,de){var _e=te._pendingPullIntos[0];if(te._controlledReadableByteStream._state==="closed"){if(de!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");ve(te,_e)}else me(te,de,_e)}function k(te){var de=te._pendingPullIntos.shift();return Y(te),de}function W(te){var de=te._controlledReadableByteStream;return de._state==="readable"&&te._closeRequested!==!0&&te._started!==!1&&(N(de)===!0&&U(de)>0||H(de)===!0&&D(de)>0||z(te)>0)}function M(te){var de=te._controlledReadableByteStream;if(te._queueTotalSize>0)te._closeRequested=!0;else{if(te._pendingPullIntos.length>0&&te._pendingPullIntos[0].bytesFilled>0){var _e=new TypeError("Insufficient bytes to fill elements in the given buffer");throw R(te,_e),_e}O(de)}}function S(te,de){var _e=te._controlledReadableByteStream,$e=de.buffer,He=de.byteOffset,Xe=de.byteLength,gt=at($e);N(_e)===!0?U(_e)===0?C(te,gt,He,Xe):I(_e,new Uint8Array(gt,He,Xe),!1):H(_e)===!0?(C(te,gt,He,Xe),ee(te)):C(te,gt,He,Xe)}function R(te,de){var _e=te._controlledReadableByteStream;g(te),ki(te),A(_e,de)}function z(te){var de=te._controlledReadableByteStream._state;return de==="errored"?null:de==="closed"?0:te._strategyHWM-te._queueTotalSize}function ue(te,de){if(de=Number(de),Be(de)===!1)throw new RangeError("bytesWritten must be a finite");Ee(te,de)}function ge(te,de){var _e=te._pendingPullIntos[0];if(_e.byteOffset+_e.bytesFilled!==de.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(_e.byteLength!==de.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");_e.buffer=de.buffer,Ee(te,de.byteLength)}function we(te,de,_e,$e,He,Xe,gt){de._controlledReadableByteStream=te,de._pullAgain=!1,de._pulling=!1,g(de),de._queue=de._queueTotalSize=void 0,ki(de),de._closeRequested=!1,de._started=!1,de._strategyHWM=qe(Xe),de._pullAlgorithm=$e,de._cancelAlgorithm=He,de._autoAllocateChunkSize=gt,de._pendingPullIntos=[],te._readableStreamController=de;var Bt=_e();Promise.resolve(Bt).then(function(){de._started=!0,P(de)},function(Yt){te._state==="readable"&&R(de,Yt)}).catch(mr)}function Me(te,de,_e){var $e=Object.create(Il.prototype),He=ze(de,"pull",0,[$e]),Xe=ze(de,"cancel",1,[]),gt=de.autoAllocateChunkSize;if(gt!==void 0&&(Number.isInteger(gt)===!1||gt<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");we(te,$e,function(){return Je(de,"start",[$e])},He,Xe,_e,gt)}function Ue(te,de,_e){te._associatedReadableByteStreamController=de,te._view=_e}function Ge(te){return new TypeError("ReadableStream.prototype."+te+" can only be used on a ReadableStream")}function We(te){return new TypeError("Cannot "+te+" a stream using a released reader")}function lt(te){return new TypeError("ReadableStreamDefaultReader.prototype."+te+" can only be used on a ReadableStreamDefaultReader")}function Wr(te){te._closedPromise=new Promise(function(de,_e){te._closedPromise_resolve=de,te._closedPromise_reject=_e})}function br(te,de){te._closedPromise=Promise.reject(de),te._closedPromise_resolve=void 0,te._closedPromise_reject=void 0}function Br(te){te._closedPromise=Promise.resolve(void 0),te._closedPromise_resolve=void 0,te._closedPromise_reject=void 0}function Qt(te,de){te._closedPromise_reject(de),te._closedPromise_resolve=void 0,te._closedPromise_reject=void 0}function _r(te,de){te._closedPromise=Promise.reject(de)}function Pr(te){te._closedPromise_resolve(void 0),te._closedPromise_resolve=void 0,te._closedPromise_reject=void 0}function kr(te){return new TypeError("ReadableStreamBYOBReader.prototype."+te+" can only be used on a ReadableStreamBYOBReader")}function Rn(te){return new TypeError("ReadableStreamDefaultController.prototype."+te+" can only be used on a ReadableStreamDefaultController")}function Tt(te){return new TypeError("ReadableStreamBYOBRequest.prototype."+te+" can only be used on a ReadableStreamBYOBRequest")}function B(te){return new TypeError("ReadableByteStreamController.prototype."+te+" can only be used on a ReadableByteStreamController")}function re(te){try{Promise.prototype.then.call(te,void 0,function(){})}catch{}}var Se=function(){function te(de,_e){for(var $e=0;$e<_e.length;$e++){var He=_e[$e];He.enumerable=He.enumerable||!1,He.configurable=!0,"value"in He&&(He.writable=!0),Object.defineProperty(de,He.key,He)}}return function(de,_e,$e){return _e&&te(de.prototype,_e),$e&&te(de,$e),de}}();r("better-assert");var Fe=r("./helpers.js"),Ae=Fe.ArrayBufferCopy,ze=Fe.CreateAlgorithmFromUnderlyingMethod,De=Fe.CreateIterResultObject,Be=Fe.IsFiniteNonNegativeNumber,Je=Fe.InvokeOrNoop,Pt=Fe.IsDetachedBuffer,at=Fe.TransferArrayBuffer,qe=Fe.ValidateAndNormalizeHighWaterMark;Fe.IsNonNegativeNumber;var hs=Fe.MakeSizeAlgorithmFromSizeFunction,ke=Fe.createArrayFromList,yn=Fe.typeIsObject,gr=r("./utils.js"),mr=gr.rethrowAssertionErrorRejection,Pi=r("./queue-with-sizes.js"),vt=Pi.DequeueValue,ya=Pi.EnqueueValueWithSize,ki=Pi.ResetQueue,ir=r("./writable-stream.js"),to=ir.AcquireWritableStreamDefaultWriter,ru=ir.IsWritableStream,Xr=ir.IsWritableStreamLocked,Di=ir.WritableStreamAbort,an=ir.WritableStreamDefaultWriterCloseWithErrorPropagation,Qi=ir.WritableStreamDefaultWriterRelease,sn=ir.WritableStreamDefaultWriterWrite,Na=ir.WritableStreamCloseQueuedOrInFlight,Zr=Symbol("[[CancelSteps]]"),ps=Symbol("[[PullSteps]]"),Ca=function(){function te(){var de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$e=_e.size,He=_e.highWaterMark;s(this,te),d(this);var Xe=de.type;if(String(Xe)==="bytes"){if(He===void 0&&(He=0),He=qe(He),$e!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");Me(this,de,He)}else{if(Xe!==void 0)throw new RangeError("Invalid type is specified");He===void 0&&(He=1),le(this,de,He=qe(He),hs($e))}}return Se(te,[{key:"cancel",value:function(_e){return f(this)===!1?Promise.reject(Ge("cancel")):p(this)===!0?Promise.reject(new TypeError("Cannot cancel a stream that already has a reader")):w(this,_e)}},{key:"getReader",value:function(){var _e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).mode;if(f(this)===!1)throw Ge("getReader");if(_e===void 0)return u(this);if((_e=String(_e))==="byob")return o(this);throw new RangeError("Invalid mode is specified")}},{key:"pipeThrough",value:function(_e,$e){var He=_e.writable,Xe=_e.readable;if(He===void 0||Xe===void 0)throw new TypeError("readable and writable arguments must be defined");return re(this.pipeTo(He,$e)),Xe}},{key:"pipeTo",value:function(_e){var $e=this,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Xe=He.preventClose,gt=He.preventAbort,Bt=He.preventCancel;if(f(this)===!1)return Promise.reject(Ge("pipeTo"));if(ru(_e)===!1)return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));if(Xe=!!Xe,gt=!!gt,Bt=!!Bt,p(this)===!0)return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(Xr(_e)===!0)return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));var Yt=u(this),Dr=to(_e),Xt=!1,vr=Promise.resolve();return new Promise(function(si,Vn){function xn(){return Xt===!0?Promise.resolve():Dr._readyPromise.then(function(){return Q(Yt).then(function(Gt){var _n=Gt.value;Gt.done!==!0&&(vr=sn(Dr,_n).catch(function(){}))})}).then(xn)}function oi(){var Gt=vr;return vr.then(function(){return Gt!==vr?oi():void 0})}function Ma(Gt,_n,no){Gt._state==="errored"?no(Gt._storedError):_n.catch(no).catch(mr)}function bn(Gt,_n,no){function iu(){Gt().then(function(){return uc(_n,no)},function(cy){return uc(!0,cy)}).catch(mr)}Xt!==!0&&(Xt=!0,_e._state==="writable"&&Na(_e)===!1?oi().then(iu):iu())}function ro(Gt,_n){Xt!==!0&&(Xt=!0,_e._state==="writable"&&Na(_e)===!1?oi().then(function(){return uc(Gt,_n)}).catch(mr):uc(Gt,_n))}function uc(Gt,_n){Qi(Dr),$(Yt),Gt?Vn(_n):si(void 0)}if(Ma($e,Yt._closedPromise,function(Gt){gt===!1?bn(function(){return Di(_e,Gt)},!0,Gt):ro(!0,Gt)}),Ma(_e,Dr._closedPromise,function(Gt){Bt===!1?bn(function(){return w($e,Gt)},!0,Gt):ro(!0,Gt)}),function(_n,no,iu){_n._state==="closed"?iu():no.then(iu).catch(mr)}($e,Yt._closedPromise,function(){Xe===!1?bn(function(){return an(Dr)}):ro()}),Na(_e)===!0||_e._state==="closed"){var cc=new TypeError("the destination writable stream closed before all data could be piped to it");Bt===!1?bn(function(){return w($e,cc)},!0,cc):ro(!0,cc)}xn().catch(function(Gt){vr=Promise.resolve(),mr(Gt)})})}},{key:"tee",value:function(){if(f(this)===!1)throw Ge("tee");var _e=b(this);return ke(_e)}},{key:"locked",get:function(){if(f(this)===!1)throw Ge("locked");return p(this)}}]),te}();n.exports={CreateReadableByteStream:l,CreateReadableStream:c,ReadableStream:Ca,IsReadableStreamDisturbed:h,ReadableStreamDefaultControllerClose:he,ReadableStreamDefaultControllerEnqueue:Te,ReadableStreamDefaultControllerError:Ne,ReadableStreamDefaultControllerGetDesiredSize:ce,ReadableStreamDefaultControllerHasBackpressure:Re,ReadableStreamDefaultControllerCanCloseOrEnqueue:oe};var ai=function(){function te(de){if(s(this,te),f(de)===!1)throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(p(de)===!0)throw new TypeError("This stream has already been locked for exclusive reading by another reader");X(this,de),this._readRequests=[]}return Se(te,[{key:"cancel",value:function(_e){return F(this)===!1?Promise.reject(lt("cancel")):this._ownerReadableStream===void 0?Promise.reject(We("cancel")):ne(this,_e)}},{key:"read",value:function(){return F(this)===!1?Promise.reject(lt("read")):this._ownerReadableStream===void 0?Promise.reject(We("read from")):Q(this)}},{key:"releaseLock",value:function(){if(F(this)===!1)throw lt("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");$(this)}}},{key:"closed",get:function(){return F(this)===!1?Promise.reject(lt("closed")):this._closedPromise}}]),te}(),qn=function(){function te(de){if(s(this,te),!f(de))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(pe(de._readableStreamController)===!1)throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(p(de))throw new TypeError("This stream has already been locked for exclusive reading by another reader");X(this,de),this._readIntoRequests=[]}return Se(te,[{key:"cancel",value:function(_e){return x(this)?this._ownerReadableStream===void 0?Promise.reject(We("cancel")):ne(this,_e):Promise.reject(kr("cancel"))}},{key:"read",value:function(_e){return x(this)?this._ownerReadableStream===void 0?Promise.reject(We("read from")):ArrayBuffer.isView(_e)?Pt(_e.buffer)===!0?Promise.reject(new TypeError("Cannot read into a view onto a detached ArrayBuffer")):_e.byteLength===0?Promise.reject(new TypeError("view must have non-zero byteLength")):j(this,_e):Promise.reject(new TypeError("view must be an array buffer view")):Promise.reject(kr("read"))}},{key:"releaseLock",value:function(){if(!x(this))throw kr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");$(this)}}},{key:"closed",get:function(){return x(this)?this._closedPromise:Promise.reject(kr("closed"))}}]),te}(),nu=function(){function te(){throw s(this,te),new TypeError}return Se(te,[{key:"close",value:function(){if(se(this)===!1)throw Rn("close");if(oe(this)===!1)throw new TypeError("The stream is not in a state that permits close");he(this)}},{key:"enqueue",value:function(_e){if(se(this)===!1)throw Rn("enqueue");if(oe(this)===!1)throw new TypeError("The stream is not in a state that permits enqueue");return Te(this,_e)}},{key:"error",value:function(_e){if(se(this)===!1)throw Rn("error");var $e=this._controlledReadableStream;if($e._state!=="readable")throw new TypeError("The stream is "+$e._state+" and so cannot be errored");Ne(this,_e)}},{key:Zr,value:function(_e){return ki(this),this._cancelAlgorithm(_e)}},{key:ps,value:function(){var _e=this._controlledReadableStream;if(this._queue.length>0){var $e=vt(this);return this._closeRequested===!0&&this._queue.length===0?O(_e):ie(this),Promise.resolve(De($e,!1))}var He=E(_e);return ie(this),He}},{key:"desiredSize",get:function(){if(se(this)===!1)throw Rn("desiredSize");return ce(this)}}]),te}(),ja=function(){function te(){throw s(this,te),new TypeError("ReadableStreamBYOBRequest cannot be used directly")}return Se(te,[{key:"respond",value:function(_e){if(L(this)===!1)throw Tt("respond");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pt(this._view.buffer)===!0)throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");ue(this._associatedReadableByteStreamController,_e)}},{key:"respondWithNewView",value:function(_e){if(L(this)===!1)throw Tt("respond");if(this._associatedReadableByteStreamController===void 0)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(Pt(_e.buffer)===!0)throw new TypeError("The supplied view's buffer has been detached and so cannot be used as a response");ge(this._associatedReadableByteStreamController,_e)}},{key:"view",get:function(){if(L(this)===!1)throw Tt("view");return this._view}}]),te}(),Il=function(){function te(){throw s(this,te),new TypeError("ReadableByteStreamController constructor cannot be used directly")}return Se(te,[{key:"close",value:function(){if(pe(this)===!1)throw B("close");if(this._closeRequested===!0)throw new TypeError("The stream has already been closed; do not close it again!");var _e=this._controlledReadableByteStream._state;if(_e!=="readable")throw new TypeError("The stream (in "+_e+" state) is not in the readable state and cannot be closed");M(this)}},{key:"enqueue",value:function(_e){if(pe(this)===!1)throw B("enqueue");if(this._closeRequested===!0)throw new TypeError("stream is closed or draining");var $e=this._controlledReadableByteStream._state;if($e!=="readable")throw new TypeError("The stream (in "+$e+" 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(Pt(_e.buffer)===!0)throw new TypeError("Cannot enqueue a view onto a detached ArrayBuffer");S(this,_e)}},{key:"error",value:function(_e){if(pe(this)===!1)throw B("error");var $e=this._controlledReadableByteStream;if($e._state!=="readable")throw new TypeError("The stream is "+$e._state+" and so cannot be errored");R(this,_e)}},{key:Zr,value:function(_e){return this._pendingPullIntos.length>0&&(this._pendingPullIntos[0].bytesFilled=0),ki(this),this._cancelAlgorithm(_e)}},{key:ps,value:function(){var _e=this._controlledReadableByteStream;if(this._queueTotalSize>0){var $e=this._queue.shift();this._queueTotalSize-=$e.byteLength,G(this);var He=void 0;try{He=new Uint8Array($e.buffer,$e.byteOffset,$e.byteLength)}catch(Dr){return Promise.reject(Dr)}return Promise.resolve(De(He,!1))}var Xe=this._autoAllocateChunkSize;if(Xe!==void 0){var gt=void 0;try{gt=new ArrayBuffer(Xe)}catch(Dr){return Promise.reject(Dr)}var Bt={buffer:gt,byteOffset:0,byteLength:Xe,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Bt)}var Yt=E(_e);return P(this),Yt}},{key:"byobRequest",get:function(){if(pe(this)===!1)throw B("byobRequest");if(this._byobRequest===void 0&&this._pendingPullIntos.length>0){var _e=this._pendingPullIntos[0],$e=new Uint8Array(_e.buffer,_e.byteOffset+_e.bytesFilled,_e.byteLength-_e.bytesFilled),He=Object.create(ja.prototype);Ue(He,this,$e),this._byobRequest=He}return this._byobRequest}},{key:"desiredSize",get:function(){if(pe(this)===!1)throw B("desiredSize");return z(this)}}]),te}()},{"./helpers.js":10,"./queue-with-sizes.js":11,"./utils.js":14,"./writable-stream.js":15,"better-assert":16}],13:[function(r,n,a){function s(L,P){if(!(L instanceof P))throw new TypeError("Cannot call a class as a function")}function o(L,P,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,v=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return 1},C=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,V=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){return 1},q=Object.create(le.prototype),G=void 0;u(q,new Promise(function(ee){G=ee}),y,v,C,V),p(q,Object.create(pe.prototype),P,g);var Y=L();return G(Y),q}function u(L,P,g,y,v,C){function V(){return P}L._writable=oe(V,function(G){return O(L,G)},function(){return T(L)},function(){return A(L)},g,y),L._readable=ie(V,function(){return I(L)},function(G){return d(L,G),Promise.resolve()},v,C),L._backpressure=void 0,L._backpressureChangePromise=void 0,L._backpressureChangePromise_resolve=void 0,f(L,!0),L._transformStreamController=void 0}function c(L){return!!$(L)&&!!Object.prototype.hasOwnProperty.call(L,"_transformStreamController")}function l(L,P){N("TransformStreamError()"),L._readable._state==="readable"&&Te(L._readable._readableStreamController,P),d(L,P)}function d(L,P){J(L._writable._writableStreamController,P),L._backpressure===!0&&f(L,!1)}function f(L,P){N("TransformStreamSetBackpressure() [backpressure = "+P+"]"),L._backpressureChangePromise!==void 0&&L._backpressureChangePromise_resolve(),L._backpressureChangePromise=new Promise(function(g){L._backpressureChangePromise_resolve=g}),L._backpressure=P}function h(L){return!!$(L)&&!!Object.prototype.hasOwnProperty.call(L,"_controlledTransformStream")}function p(L,P,g,y){P._controlledTransformStream=L,L._transformStreamController=P,P._transformAlgorithm=g,P._flushAlgorithm=y}function b(L,P){var g=Object.create(pe.prototype),y=function(q){try{return _(g,q),Promise.resolve()}catch(G){return Promise.reject(G)}},v=P.transform;if(v!==void 0){if(typeof v!="function")throw new TypeError("transform is not a method");y=function(q){return ne(v,P,[q,g]).catch(function(G){throw l(L,G),G})}}var C=X(P,"flush",0,[g]);p(L,g,y,C)}function _(L,P){N("TransformStreamDefaultControllerEnqueue()");var g=L._controlledTransformStream,y=g._readable._readableStreamController;if(ce(y)===!1)throw new TypeError("Readable side is not in a state that permits enqueue");try{he(y,P)}catch(v){throw d(g,v),g._readable._storedError}ye(y)!==g._backpressure&&f(g,!0)}function E(L,P){l(L._controlledTransformStream,P)}function w(L){N("TransformStreamDefaultControllerTerminate()");var P=L._controlledTransformStream,g=P._readable._readableStreamController;ce(g)===!0&&be(g),d(P,new TypeError("TransformStream terminated"))}function O(L,P){N("TransformStreamDefaultSinkWriteAlgorithm()");var g=L._transformStreamController;return L._backpressure===!0?L._backpressureChangePromise.then(function(){var y=L._writable;if(y._state==="erroring")throw y._storedError;return g._transformAlgorithm(P)}):g._transformAlgorithm(P)}function A(L){return l(L,new TypeError("Writable side aborted")),Promise.resolve()}function T(L){N("TransformStreamDefaultSinkCloseAlgorithm()");var P=L._readable;return L._transformStreamController._flushAlgorithm().then(function(){if(P._state==="errored")throw P._storedError;var g=P._readableStreamController;ce(g)===!0&&be(g)}).catch(function(g){throw l(L,g),P._storedError})}function I(L){return N("TransformStreamDefaultSourcePullAlgorithm()"),f(L,!1),L._backpressureChangePromise}function D(L){return new TypeError("TransformStreamDefaultController.prototype."+L+" can only be used on a TransformStreamDefaultController")}function U(L){return new TypeError("TransformStream.prototype."+L+" can only be used on a TransformStream")}var H=function(){function L(P,g){for(var y=0;y0&&arguments[0]!==void 0?arguments[0]:{},g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(s(this,L),P.readableType!==void 0)throw new RangeError("Invalid readable type specified");if(P.writableType!==void 0)throw new RangeError("Invalid writable type specified");var v=g.size,C=Q(v),V=g.highWaterMark;V===void 0&&(V=1),V=j(V);var q=y.size,G=Q(q),Y=y.highWaterMark;Y===void 0&&(Y=0),Y=j(Y);var ee=void 0;u(this,new Promise(function(ve){ee=ve}),V,C,Y,G),b(this,P);var ae=F(P,"start",[this._transformStreamController]);ee(ae)}return H(L,[{key:"readable",get:function(){if(c(this)===!1)throw U("readable");return this._readable}},{key:"writable",get:function(){if(c(this)===!1)throw U("writable");return this._writable}}]),L}(),pe=function(){function L(){throw s(this,L),new TypeError("TransformStreamDefaultController instances cannot be created directly")}return H(L,[{key:"enqueue",value:function(g){if(h(this)===!1)throw D("enqueue");_(this,g)}},{key:"error",value:function(g){if(h(this)===!1)throw D("error");E(this,g)}},{key:"terminate",value:function(){if(h(this)===!1)throw D("terminate");w(this)}},{key:"desiredSize",get:function(){if(h(this)===!1)throw D("desiredSize");var g=this._controlledTransformStream._readable._readableStreamController;return Ne(g)}}]),L}();n.exports={CreateTransformStream:o,TransformStream:le}},{"./helpers.js":10,"./readable-stream.js":12,"./writable-stream.js":15,"better-assert":16,debug:18}],14:[function(r,n,a){var s=r("better-assert");a.rethrowAssertionErrorRejection=function(o){o&&o.constructor===s.AssertionError&&setTimeout(function(){throw o},0)}},{"better-assert":16}],15:[function(r,n,a){function s(B,re){if(!(B instanceof re))throw new TypeError("Cannot call a class as a function")}function o(B){return new Rn(B)}function u(B,re,Se,Fe){var Ae=arguments.length>4&&arguments[4]!==void 0?arguments[4]:1,ze=arguments.length>5&&arguments[5]!==void 0?arguments[5]:function(){return 1},De=Object.create(kr.prototype);return c(De),he(De,Object.create(Tt.prototype),B,re,Se,Fe,Ae,ze),De}function c(B){B._state="writable",B._storedError=void 0,B._writer=void 0,B._writableStreamController=void 0,B._writeRequests=[],B._inFlightWriteRequest=void 0,B._closeRequest=void 0,B._inFlightCloseRequest=void 0,B._pendingAbortRequest=void 0,B._backpressure=!1}function l(B){return!!Ue(B)&&!!Object.prototype.hasOwnProperty.call(B,"_writableStreamController")}function d(B){return B._writer!==void 0}function f(B,re){var Se=B._state;if(Se==="closed")return Promise.resolve(void 0);if(Se==="errored")return Promise.reject(B._storedError);var Fe=new TypeError("Requested to abort");if(B._pendingAbortRequest!==void 0)return Promise.reject(Fe);var Ae=!1;Se==="erroring"&&(Ae=!0,re=void 0);var ze=new Promise(function(De,Be){B._pendingAbortRequest={_resolve:De,_reject:Be,_reason:re,_wasAlreadyErroring:Ae}});return Ae===!1&&b(B,Fe),ze}function h(B){return new Promise(function(re,Se){var Fe={_resolve:re,_reject:Se};B._writeRequests.push(Fe)})}function p(B,re){R("WritableStreamDealWithRejection(stream, %o)",re),B._state!=="writable"?_(B):b(B,re)}function b(B,re){R("WritableStreamStartErroring(stream, %o)",re);var Se=B._writableStreamController;B._state="erroring",B._storedError=re;var Fe=B._writer;Fe!==void 0&&j(Fe,re),I(B)===!1&&Se._started===!0&&_(B)}function _(B){R("WritableStreamFinishErroring()"),B._state="errored",B._writableStreamController[Pr]();var re=B._storedError,Se=!0,Fe=!1,Ae=void 0;try{for(var ze,De=B._writeRequests[Symbol.iterator]();!(Se=(ze=De.next()).done);Se=!0)ze.value._reject(re)}catch(Je){Fe=!0,Ae=Je}finally{try{!Se&&De.return&&De.return()}finally{if(Fe)throw Ae}}if(B._writeRequests=[],B._pendingAbortRequest!==void 0){var Be=B._pendingAbortRequest;if(B._pendingAbortRequest=void 0,Be._wasAlreadyErroring===!0)return Be._reject(re),void H(B);B._writableStreamController[_r](Be._reason).then(function(){Be._resolve(),H(B)},function(Je){Be._reject(Je),H(B)})}else H(B)}function E(B){B._inFlightWriteRequest._resolve(void 0),B._inFlightWriteRequest=void 0}function w(B,re){B._inFlightWriteRequest._reject(re),B._inFlightWriteRequest=void 0,p(B,re)}function O(B){B._inFlightCloseRequest._resolve(void 0),B._inFlightCloseRequest=void 0,B._state==="erroring"&&(B._storedError=void 0,B._pendingAbortRequest!==void 0&&(B._pendingAbortRequest._resolve(),B._pendingAbortRequest=void 0)),B._state="closed";var re=B._writer;re!==void 0&&ee(re)}function A(B,re){B._inFlightCloseRequest._reject(re),B._inFlightCloseRequest=void 0,B._pendingAbortRequest!==void 0&&(B._pendingAbortRequest._reject(re),B._pendingAbortRequest=void 0),p(B,re)}function T(B){return B._closeRequest!==void 0||B._inFlightCloseRequest!==void 0}function I(B){return B._inFlightWriteRequest===void 0&&B._inFlightCloseRequest===void 0?(R("WritableStreamHasOperationMarkedInFlight() is false"),!1):(R("WritableStreamHasOperationMarkedInFlight() is true"),!0)}function D(B){B._inFlightCloseRequest=B._closeRequest,B._closeRequest=void 0}function U(B){B._inFlightWriteRequest=B._writeRequests.shift()}function H(B){R("WritableStreamRejectCloseAndClosedPromiseIfNeeded()"),B._closeRequest!==void 0&&(B._closeRequest._reject(B._storedError),B._closeRequest=void 0);var re=B._writer;re!==void 0&&(G(re,B._storedError),re._closedPromise.catch(function(){}))}function N(B,re){var Se=B._writer;Se!==void 0&&re!==B._backpressure&&(re===!0?k(Se):M(Se)),B._backpressure=re}function x(B){return!!Ue(B)&&!!Object.prototype.hasOwnProperty.call(B,"_ownerWritableStream")}function F(B,re){return f(B._ownerWritableStream,re)}function X(B){var re=B._ownerWritableStream,Se=re._state;if(Se==="closed"||Se==="errored")return Promise.reject(new TypeError("The stream (in "+Se+" state) is not in the writable state and cannot be closed"));var Fe=new Promise(function(Ae,ze){var De={_resolve:Ae,_reject:ze};re._closeRequest=De});return re._backpressure===!0&&Se==="writable"&&M(B),Ne(re._writableStreamController),Fe}function ne(B){var re=B._ownerWritableStream,Se=re._state;return T(re)===!0||Se==="closed"?Promise.resolve():Se==="errored"?Promise.reject(re._storedError):X(B)}function $(B,re){B._closedPromiseState==="pending"?G(B,re):Y(B,re),B._closedPromise.catch(function(){})}function j(B,re){R("WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, %o)",re),B._readyPromiseState==="pending"?Ee(B,re):W(B,re),B._readyPromise.catch(function(){})}function Q(B){var re=B._ownerWritableStream,Se=re._state;return Se==="errored"||Se==="erroring"?null:Se==="closed"?0:ce(re._writableStreamController)}function se(B){var re=B._ownerWritableStream,Se=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");j(B,Se),$(B,Se),re._writer=void 0,B._ownerWritableStream=void 0}function ie(B,re){var Se=B._ownerWritableStream,Fe=Se._writableStreamController,Ae=ye(Fe,re);if(Se!==B._ownerWritableStream)return Promise.reject(v("write to"));var ze=Se._state;if(ze==="errored")return Promise.reject(Se._storedError);if(T(Se)===!0||ze==="closed")return Promise.reject(new TypeError("The stream is closing or closed and cannot be written to"));if(ze==="erroring")return Promise.reject(Se._storedError);var De=h(Se);return Re(Fe,re,Ae),De}function be(B){return!!Ue(B)&&!!Object.prototype.hasOwnProperty.call(B,"_controlledWritableStream")}function he(B,re,Se,Fe,Ae,ze,De,Be){re._controlledWritableStream=B,B._writableStreamController=re,re._queue=void 0,re._queueTotalSize=void 0,Qt(re),re._started=!1,re._strategySizeAlgorithm=Be,re._strategyHWM=De,re._writeAlgorithm=Fe,re._closeAlgorithm=Ae,re._abortAlgorithm=ze;var Je=L(re);N(B,Je);var Pt=Se();Promise.resolve(Pt).then(function(){re._started=!0,oe(re)},function(at){re._started=!0,p(B,at)}).catch(We)}function Te(B,re,Se,Fe){var Ae=Object.create(Tt.prototype),ze=ue(re,"write",1,[Ae]),De=ue(re,"close",0,[]),Be=ue(re,"abort",1,[]);he(B,Ae,function(){return ge(re,"start",[Ae])},ze,De,Be,Se,Fe)}function Ne(B){br(B,"close",0),oe(B)}function ye(B,re){try{return B._strategySizeAlgorithm(re)}catch(Se){return J(B,Se),1}}function ce(B){return B._strategyHWM-B._queueTotalSize}function Re(B,re,Se){var Fe={chunk:re};try{br(B,Fe,Se)}catch(ze){return void J(B,ze)}var Ae=B._controlledWritableStream;T(Ae)===!1&&Ae._state==="writable"&&N(Ae,L(B)),oe(B)}function oe(B){R("WritableStreamDefaultControllerAdvanceQueueIfNeeded()");var re=B._controlledWritableStream;if(B._started!==!1&&re._inFlightWriteRequest===void 0){var Se=re._state;if(Se!=="closed"&&Se!=="errored")if(Se!=="erroring"){if(B._queue.length!==0){var Fe=Br(B);Fe==="close"?le(B):pe(B,Fe.chunk)}}else _(re)}}function J(B,re){B._controlledWritableStream._state==="writable"&&P(B,re)}function le(B){var re=B._controlledWritableStream;D(re),Wr(B),B._closeAlgorithm().then(function(){O(re)},function(Se){A(re,Se)}).catch(We)}function pe(B,re){var Se=B._controlledWritableStream;U(Se),B._writeAlgorithm(re).then(function(){E(Se);var Fe=Se._state;if(Wr(B),T(Se)===!1&&Fe==="writable"){var Ae=L(B);N(Se,Ae)}oe(B)},function(Fe){w(Se,Fe)}).catch(We)}function L(B){return ce(B)<=0}function P(B,re){b(B._controlledWritableStream,re)}function g(B){return new TypeError("WritableStream.prototype."+B+" can only be used on a WritableStream")}function y(B){return new TypeError("WritableStreamDefaultWriter.prototype."+B+" can only be used on a WritableStreamDefaultWriter")}function v(B){return new TypeError("Cannot "+B+" a stream using a released writer")}function C(B){B._closedPromise=new Promise(function(re,Se){B._closedPromise_resolve=re,B._closedPromise_reject=Se,B._closedPromiseState="pending"})}function V(B,re){B._closedPromise=Promise.reject(re),B._closedPromise_resolve=void 0,B._closedPromise_reject=void 0,B._closedPromiseState="rejected"}function q(B){B._closedPromise=Promise.resolve(void 0),B._closedPromise_resolve=void 0,B._closedPromise_reject=void 0,B._closedPromiseState="resolved"}function G(B,re){B._closedPromise_reject(re),B._closedPromise_resolve=void 0,B._closedPromise_reject=void 0,B._closedPromiseState="rejected"}function Y(B,re){B._closedPromise=Promise.reject(re),B._closedPromiseState="rejected"}function ee(B){B._closedPromise_resolve(void 0),B._closedPromise_resolve=void 0,B._closedPromise_reject=void 0,B._closedPromiseState="resolved"}function ae(B){R("defaultWriterReadyPromiseInitialize()"),B._readyPromise=new Promise(function(re,Se){B._readyPromise_resolve=re,B._readyPromise_reject=Se}),B._readyPromiseState="pending"}function ve(B,re){R("defaultWriterReadyPromiseInitializeAsRejected(writer, %o)",re),B._readyPromise=Promise.reject(re),B._readyPromise_resolve=void 0,B._readyPromise_reject=void 0,B._readyPromiseState="rejected"}function me(B){R("defaultWriterReadyPromiseInitializeAsResolved()"),B._readyPromise=Promise.resolve(void 0),B._readyPromise_resolve=void 0,B._readyPromise_reject=void 0,B._readyPromiseState="fulfilled"}function Ee(B,re){R("defaultWriterReadyPromiseReject(writer, %o)",re),B._readyPromise_reject(re),B._readyPromise_resolve=void 0,B._readyPromise_reject=void 0,B._readyPromiseState="rejected"}function k(B){R("defaultWriterReadyPromiseReset()"),B._readyPromise=new Promise(function(re,Se){B._readyPromise_resolve=re,B._readyPromise_reject=Se}),B._readyPromiseState="pending"}function W(B,re){R("defaultWriterReadyPromiseResetToRejected(writer, %o)",re),B._readyPromise=Promise.reject(re),B._readyPromiseState="rejected"}function M(B){R("defaultWriterReadyPromiseResolve()"),B._readyPromise_resolve(void 0),B._readyPromise_resolve=void 0,B._readyPromise_reject=void 0,B._readyPromiseState="fulfilled"}var S=function(){function B(re,Se){for(var Fe=0;Fe0&&arguments[0]!==void 0?arguments[0]:{},Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe=Se.size,Ae=Se.highWaterMark,ze=Ae===void 0?1:Ae;if(s(this,B),c(this),re.type!==void 0)throw new RangeError("Invalid type is specified");var De=Me(Fe);Te(this,re,ze=we(ze),De)}return S(B,[{key:"abort",value:function(Se){return l(this)===!1?Promise.reject(g("abort")):d(this)===!0?Promise.reject(new TypeError("Cannot abort a stream that already has a writer")):f(this,Se)}},{key:"getWriter",value:function(){if(l(this)===!1)throw g("getWriter");return o(this)}},{key:"locked",get:function(){if(l(this)===!1)throw g("locked");return d(this)}}]),B}();n.exports={AcquireWritableStreamDefaultWriter:o,CreateWritableStream:u,IsWritableStream:l,IsWritableStreamLocked:d,WritableStream:kr,WritableStreamAbort:f,WritableStreamDefaultControllerErrorIfNeeded:J,WritableStreamDefaultWriterCloseWithErrorPropagation:ne,WritableStreamDefaultWriterRelease:se,WritableStreamDefaultWriterWrite:ie,WritableStreamCloseQueuedOrInFlight:T};var Rn=function(){function B(re){if(s(this,B),l(re)===!1)throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(d(re)===!0)throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=re,re._writer=this;var Se=re._state;if(Se==="writable")T(re)===!1&&re._backpressure===!0?ae(this):me(this),C(this);else if(Se==="erroring")ve(this,re._storedError),this._readyPromise.catch(function(){}),C(this);else if(Se==="closed")me(this),q(this);else{var Fe=re._storedError;ve(this,Fe),this._readyPromise.catch(function(){}),V(this,Fe),this._closedPromise.catch(function(){})}}return S(B,[{key:"abort",value:function(Se){return x(this)===!1?Promise.reject(y("abort")):this._ownerWritableStream===void 0?Promise.reject(v("abort")):F(this,Se)}},{key:"close",value:function(){if(x(this)===!1)return Promise.reject(y("close"));var Se=this._ownerWritableStream;return Se===void 0?Promise.reject(v("close")):T(Se)===!0?Promise.reject(new TypeError("cannot close an already-closing stream")):X(this)}},{key:"releaseLock",value:function(){if(x(this)===!1)throw y("releaseLock");this._ownerWritableStream!==void 0&&se(this)}},{key:"write",value:function(Se){return x(this)===!1?Promise.reject(y("write")):this._ownerWritableStream===void 0?Promise.reject(v("write to")):ie(this,Se)}},{key:"closed",get:function(){return x(this)===!1?Promise.reject(y("closed")):this._closedPromise}},{key:"desiredSize",get:function(){if(x(this)===!1)throw y("desiredSize");if(this._ownerWritableStream===void 0)throw v("desiredSize");return Q(this)}},{key:"ready",get:function(){return x(this)===!1?Promise.reject(y("ready")):this._readyPromise}}]),B}(),Tt=function(){function B(){throw s(this,B),new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}return S(B,[{key:"error",value:function(Se){if(be(this)===!1)throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");this._controlledWritableStream._state==="writable"&&P(this,Se)}},{key:_r,value:function(Se){return this._abortAlgorithm(Se)}},{key:Pr,value:function(){Qt(this)}}]),B}()},{"./helpers.js":10,"./queue-with-sizes.js":11,"./utils.js":14,"better-assert":16,debug:18}],16:[function(r,n,a){(function(s){function o(d){if(!d){var f=c(),h=f[1],p=h.getFileName(),b=h.getLineNumber(),_=(_=l.readFileSync(p,"utf8")).split(` -`)[b-1].match(/assert\((.*)\)/)[1];throw new u({message:_,stackStartFunction:f[0].getFunction()})}}var u=r("assert").AssertionError,c=r("callsite"),l=r("fs");n.exports={}.NO_ASSERT?function(){}:o}).call(this,r("_process"))},{_process:4,assert:2,callsite:17,fs:3}],17:[function(r,n,a){n.exports=function(){var s=Error.prepareStackTrace;Error.prepareStackTrace=function(c,l){return l};var o=new Error;Error.captureStackTrace(o,arguments.callee);var u=o.stack;return Error.prepareStackTrace=s,u}},{}],18:[function(r,n,a){(function(s){function o(){return!(typeof window>"u"||!window.process||window.process.type!=="renderer")||(typeof navigator>"u"||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function u(h){var p=this.useColors;if(h[0]=(p?"%c":"")+this.namespace+(p?" %c":" ")+h[0]+(p?"%c ":" ")+"+"+a.humanize(this.diff),p){var b="color: "+this.color;h.splice(1,0,b,"color: inherit");var _=0,E=0;h[0].replace(/%[a-zA-Z%]/g,function(w){w!=="%%"&&(_++,w==="%c"&&(E=_))}),h.splice(E,0,b)}}function c(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function l(h){try{h==null?a.storage.removeItem("debug"):a.storage.debug=h}catch{}}function d(){var h;try{h=a.storage.debug}catch{}return!h&&typeof s<"u"&&"env"in s&&(h={}.DEBUG),h}function f(){try{return window.localStorage}catch{}}a=n.exports=r("./debug"),a.log=c,a.formatArgs=u,a.save=l,a.load=d,a.useColors=o,a.storage=typeof chrome<"u"&&chrome.storage!==void 0?chrome.storage.local:f(),a.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"],a.formatters.j=function(h){try{return JSON.stringify(h)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}},a.enable(d())}).call(this,r("_process"))},{"./debug":19,_process:4}],19:[function(r,n,a){function s(h){var p,b=0;for(p in h)b=(b<<5)-b+h.charCodeAt(p),b|=0;return a.colors[Math.abs(b)%a.colors.length]}function o(h){function p(){if(p.enabled){var _=p,E=+new Date,w=E-(b||E);_.diff=w,_.prev=b,_.curr=E,b=E;for(var O=new Array(arguments.length),A=0;A100)){var _=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(b);if(_){var E=parseFloat(_[1]);switch((_[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return E*p;case"days":case"day":case"d":return E*h;case"hours":case"hour":case"hrs":case"hr":case"h":return E*f;case"minutes":case"minute":case"mins":case"min":case"m":return E*d;case"seconds":case"second":case"secs":case"sec":case"s":return E*l;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return E;default:return}}}}function o(b){return b>=h?Math.round(b/h)+"d":b>=f?Math.round(b/f)+"h":b>=d?Math.round(b/d)+"m":b>=l?Math.round(b/l)+"s":b+"ms"}function u(b){return c(b,h,"day")||c(b,f,"hour")||c(b,d,"minute")||c(b,l,"second")||b+" ms"}function c(b,_,E){if(!(b<_))return b<1.5*_?Math.floor(b/_)+" "+E:Math.ceil(b/_)+" "+E+"s"}var l=1e3,d=60*l,f=60*d,h=24*f,p=365.25*h;n.exports=function(b,_){_=_||{};var E=typeof b;if(E==="string"&&b.length>0)return s(b);if(E==="number"&&isNaN(b)===!1)return _.long?u(b):o(b);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(b))}},{}]},{},[1])(1)})}(bT)),bT.exports}const qs=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";qs.writable=t=>qs(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";qs.readable=t=>qs(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";qs.duplex=t=>qs.writable(t)&&qs.readable(t);qs.transform=t=>qs.duplex(t)&&typeof t._transform=="function";var D7=qs,N7={exports:{}};(function(t){t.exports=e,t.exports.WEBSTREAM_SUPPORT=typeof ReadableStream<"u";function e(r){if(!t.exports.WEBSTREAM_SUPPORT)throw new Error("No web ReadableStream support");var n=!1,a={};function s(c){a.data=d,a.end=d,a.end=f,a.close=f,a.error=f;for(var l in a)r.on(l,a[l]);r.pause();function d(h){n||(c.enqueue(h),r.pause())}function f(h){if(!n){n=!0;for(var p in a)r.removeListener(p,a[p]);h?c.error(h):c.close()}}}function o(){n||r.resume()}function u(){n=!0;for(var c in a)r.removeListener(c,a[c]);r.push(null),r.pause(),r.destroy?r.destroy():r.close&&r.close()}return new ReadableStream({start:s,pull:o,cancel:u})}})(N7);var pce=N7.exports;Object.defineProperty(Nv,"__esModule",{value:!0});Nv.ActorHttp=void 0;const yce=et,bce=U0;globalThis.ReadableStream||(globalThis.ReadableStream=hce().ReadableStream);const _ce=D7,gce=pce;class mce extends yce.Actor{constructor(e){super(e)}static toNodeReadable(e){return _ce(e)||e===null?e:new bce.ReadableWebToNodeStream(e)}static toWebReadableStream(e){return gce(e)}static headersToHash(e){const r={};return e.forEach((n,a)=>{r[a]=n}),r}}Nv.ActorHttp=mce;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Nv,t)})(Zs);Object.defineProperty(Dv,"__esModule",{value:!0});Dv.validateHttpResponse=void 0;const vce=Zs,wce=wl;async function Sce(t,e){var r;if(e.status>=400){let n="empty response";if(e.body){const a=vce.ActorHttp.toNodeReadable(e.body);n=await wce(a)}throw new Error(`Could not update ${t} (HTTP status ${e.status}): -${n}`)}await((r=e.body)==null?void 0:r.cancel())}Dv.validateHttpResponse=Sce;var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.getContextDestinationUrl=Jn.getContextDestinationFirst=Jn.getContextDestination=Jn.getDataDestinationContext=Jn.getDataDestinationValue=Jn.getDataDestinationType=Jn.isDataDestinationRawType=void 0;const sO=rr;function C7(t){return typeof t=="string"||"remove"in t}Jn.isDataDestinationRawType=C7;function Tce(t){return typeof t=="string"?"":"remove"in t?"rdfjsStore":t.type}Jn.getDataDestinationType=Tce;function j7(t){return C7(t)?t:t.value}Jn.getDataDestinationValue=j7;function Ece(t,e){return typeof t=="string"||"remove"in t||!t.context?e:e.merge(t.context)}Jn.getDataDestinationContext=Ece;function Oce(t){return t.get(sO.KeysRdfUpdateQuads.destination)}Jn.getContextDestination=Oce;function Ace(t){if(t.has(sO.KeysRdfUpdateQuads.destination))return t.get(sO.KeysRdfUpdateQuads.destination)}Jn.getContextDestinationFirst=Ace;function Rce(t){if(t){let e=j7(t);if(typeof e=="string"){const r=e.indexOf("#");return r>=0&&(e=e.slice(0,r)),e}}}Jn.getContextDestinationUrl=Rce;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(B0,t),r($u,t),r(Dv,t),r(Jn,t)})(Cf);var Mv={};Object.defineProperty(Mv,"__esModule",{value:!0});Mv.RdfJsQuadDestination=void 0;const xce=ht,s4=nr,Ice=new xce.DataFactory;class Pce{constructor(e){this.store=e}promisifyEventEmitter(e){return new Promise((r,n)=>{e.on("end",r),e.on("error",n)})}delete(e){return this.promisifyEventEmitter(this.store.remove(e))}insert(e){return this.promisifyEventEmitter(this.store.import(e))}async deleteGraphs(e,r,n){switch(e){case"ALL":await this.promisifyEventEmitter(this.store.deleteGraph(Ice.defaultGraph()));case"NAMED":const a=this.store.match(),s={};a.on("data",o=>{o.graph.termType!=="DefaultGraph"&&(s[(0,s4.termToString)(o.graph)]=!0)}),await this.promisifyEventEmitter(a),await Promise.all(Object.keys(s).map(o=>this.promisifyEventEmitter(this.store.deleteGraph((0,s4.stringToTerm)(o)))));break;default:for(const o of Array.isArray(e)?e:[e])await this.promisifyEventEmitter(this.store.deleteGraph(o))}}async createGraphs(e,r){if(r)for(const n of e){const a=this.store.match(void 0,void 0,void 0,n);await new Promise((s,o)=>{a.once("data",()=>{o(new Error(`Unable to create graph ${n.value} as it already exists`))}),a.on("end",s),a.on("error",o)})}}}Mv.RdfJsQuadDestination=Pce;Object.defineProperty(Iv,"__esModule",{value:!0});Iv.ActorRdfUpdateQuadsRdfJsStore=void 0;const _T=Cf,Dce=Mv;class Nce extends _T.ActorRdfUpdateQuadsDestination{constructor(e){super(e)}async test(e){const r=(0,_T.getContextDestination)(e.context);if(!r||typeof r=="string"||!("remove"in r)&&"value"in r&&!r.value.remove)throw new Error(`${this.name} received an invalid rdfjsStore.`);return!0}async getDestination(e){const r=(0,_T.getContextDestination)(e);return new Dce.RdfJsQuadDestination("remove"in r?r:r.value)}}Iv.ActorRdfUpdateQuadsRdfJsStore=Nce;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Iv,t)})(g7);var M7={},Fv={};(function(t){(function(e){var r=typeof globalThis<"u"&&globalThis||typeof t<"u"&&t||typeof r<"u"&&r,n={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function a(x){return x&&DataView.prototype.isPrototypeOf(x)}if(n.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(x){return x&&s.indexOf(Object.prototype.toString.call(x))>-1};function u(x){if(typeof x!="string"&&(x=String(x)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(x)||x==="")throw new TypeError('Invalid character in header field name: "'+x+'"');return x.toLowerCase()}function c(x){return typeof x!="string"&&(x=String(x)),x}function l(x){var F={next:function(){var X=x.shift();return{done:X===void 0,value:X}}};return n.iterable&&(F[Symbol.iterator]=function(){return F}),F}function d(x){this.map={},x instanceof d?x.forEach(function(F,X){this.append(X,F)},this):Array.isArray(x)?x.forEach(function(F){this.append(F[0],F[1])},this):x&&Object.getOwnPropertyNames(x).forEach(function(F){this.append(F,x[F])},this)}d.prototype.append=function(x,F){x=u(x),F=c(F);var X=this.map[x];this.map[x]=X?X+", "+F:F},d.prototype.delete=function(x){delete this.map[u(x)]},d.prototype.get=function(x){return x=u(x),this.has(x)?this.map[x]:null},d.prototype.has=function(x){return this.map.hasOwnProperty(u(x))},d.prototype.set=function(x,F){this.map[u(x)]=c(F)},d.prototype.forEach=function(x,F){for(var X in this.map)this.map.hasOwnProperty(X)&&x.call(F,this.map[X],X,this)},d.prototype.keys=function(){var x=[];return this.forEach(function(F,X){x.push(X)}),l(x)},d.prototype.values=function(){var x=[];return this.forEach(function(F){x.push(F)}),l(x)},d.prototype.entries=function(){var x=[];return this.forEach(function(F,X){x.push([X,F])}),l(x)},n.iterable&&(d.prototype[Symbol.iterator]=d.prototype.entries);function f(x){if(x.bodyUsed)return Promise.reject(new TypeError("Already read"));x.bodyUsed=!0}function h(x){return new Promise(function(F,X){x.onload=function(){F(x.result)},x.onerror=function(){X(x.error)}})}function p(x){var F=new FileReader,X=h(F);return F.readAsArrayBuffer(x),X}function b(x){var F=new FileReader,X=h(F);return F.readAsText(x),X}function _(x){for(var F=new Uint8Array(x),X=new Array(F.length),ne=0;ne-1?F:x}function T(x,F){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');F=F||{};var X=F.body;if(x instanceof T){if(x.bodyUsed)throw new TypeError("Already read");this.url=x.url,this.credentials=x.credentials,F.headers||(this.headers=new d(x.headers)),this.method=x.method,this.mode=x.mode,this.signal=x.signal,!X&&x._bodyInit!=null&&(X=x._bodyInit,x.bodyUsed=!0)}else this.url=String(x);if(this.credentials=F.credentials||this.credentials||"same-origin",(F.headers||!this.headers)&&(this.headers=new d(F.headers)),this.method=A(F.method||this.method||"GET"),this.mode=F.mode||this.mode||null,this.signal=F.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&X)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(X),(this.method==="GET"||this.method==="HEAD")&&(F.cache==="no-store"||F.cache==="no-cache")){var ne=/([?&])_=[^&]*/;if(ne.test(this.url))this.url=this.url.replace(ne,"$1_="+new Date().getTime());else{var $=/\?/;this.url+=($.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}T.prototype.clone=function(){return new T(this,{body:this._bodyInit})};function I(x){var F=new FormData;return x.trim().split("&").forEach(function(X){if(X){var ne=X.split("="),$=ne.shift().replace(/\+/g," "),j=ne.join("=").replace(/\+/g," ");F.append(decodeURIComponent($),decodeURIComponent(j))}}),F}function D(x){var F=new d,X=x.replace(/\r?\n[\t ]+/g," ");return X.split("\r").map(function(ne){return ne.indexOf(` + `)+" "+Re[1]:Re[0]+ce+" "+ye.join(", ")+" "+Re[1]}function w(ye){return Array.isArray(ye)}function O(ye){return typeof ye=="boolean"}function A(ye){return ye===null}function T(ye){return ye==null}function I(ye){return typeof ye=="number"}function D(ye){return typeof ye=="string"}function U(ye){return typeof ye=="symbol"}function H(ye){return ye===void 0}function N(ye){return x(ye)&&j(ye)==="[object RegExp]"}function x(ye){return typeof ye=="object"&&ye!==null}function F(ye){return x(ye)&&j(ye)==="[object Date]"}function X(ye){return x(ye)&&(j(ye)==="[object Error]"||ye instanceof Error)}function ne(ye){return typeof ye=="function"}function $(ye){return ye===null||typeof ye=="boolean"||typeof ye=="number"||typeof ye=="string"||typeof ye=="symbol"||ye===void 0}function j(ye){return Object.prototype.toString.call(ye)}function Q(ye){return ye<10?"0"+ye.toString(10):ye.toString(10)}function se(){var ye=new Date,ce=[Q(ye.getHours()),Q(ye.getMinutes()),Q(ye.getSeconds())].join(":");return[ye.getDate(),Ne[ye.getMonth()],ce].join(" ")}function ie(ye,ce){return Object.prototype.hasOwnProperty.call(ye,ce)}var be=/%[sdj%]/g;a.format=function(ye){if(!D(ye)){for(var ce=[],Re=0;Re=J)return P;switch(P){case"%s":return String(oe[Re++]);case"%d":return Number(oe[Re++]);case"%j":try{return JSON.stringify(oe[Re++])}catch{return"[Circular]"}default:return P}}),pe=oe[Re];Re3&&arguments[3]!==void 0?arguments[3]:1,He=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return 1},Xe=Object.create(Ca.prototype);return d(Xe),J(Xe,Object.create(nu.prototype),te,de,_e,$e,He),Xe}function l(te,de,_e){var $e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,He=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0,Xe=Object.create(Ca.prototype);return d(Xe),we(Xe,Object.create(Il.prototype),te,de,_e,$e,He),Xe}function d(te){te._state="readable",te._reader=void 0,te._storedError=void 0,te._disturbed=!1}function f(te){return!!yn(te)&&!!Object.prototype.hasOwnProperty.call(te,"_readableStreamController")}function h(te){return te._disturbed}function p(te){return te._reader!==void 0}function b(te,de){function _e(){return Q(He).then(function(xn){var oi=xn.value;if(xn.done===!0&&Xe===!1&&(gt===!1&&he(Xt._readableStreamController),Bt===!1&&he(vr._readableStreamController),Xe=!0),Xe!==!0){var Ma=oi,bn=oi;gt===!1&&Te(Xt._readableStreamController,Ma),Bt===!1&&Te(vr._readableStreamController,bn)}})}function $e(){}var He=u(te),Xe=!1,gt=!1,Bt=!1,Yt=void 0,Dr=void 0,Xt=void 0,vr=void 0,si=void 0,Vn=new Promise(function(xn){si=xn});return Xt=c($e,_e,function(oi){if(gt=!0,Yt=oi,Bt===!0){var Ma=ke([Yt,Dr]),bn=w(te,Ma);si(bn)}return Vn}),vr=c($e,_e,function(oi){if(Bt=!0,Dr=oi,gt===!0){var Ma=ke([Yt,Dr]),bn=w(te,Ma);si(bn)}return Vn}),He._closedPromise.catch(function(xn){Xe!==!0&&(ye(Xt._readableStreamController,xn),ye(vr._readableStreamController,xn),Xe=!0)}),[Xt,vr]}function _(te){return new Promise(function(de,_e){var $e={_resolve:de,_reject:_e};te._reader._readIntoRequests.push($e)})}function E(te){return new Promise(function(de,_e){var $e={_resolve:de,_reject:_e};te._reader._readRequests.push($e)})}function w(te,de){return te._disturbed=!0,te._state==="closed"?Promise.resolve(void 0):te._state==="errored"?Promise.reject(te._storedError):(O(te),te._readableStreamController[Zr](de).then(function(){}))}function O(te){te._state="closed";var de=te._reader;if(de!==void 0){if(F(de)===!0){var _e=!0,$e=!1,He=void 0;try{for(var Xe,gt=de._readRequests[Symbol.iterator]();!(_e=(Xe=gt.next()).done);_e=!0)(0,Xe.value._resolve)(De(void 0,!0))}catch(Bt){$e=!0,He=Bt}finally{try{!_e&>.return&>.return()}finally{if($e)throw He}}de._readRequests=[]}Pr(de)}}function A(te,de){te._state="errored",te._storedError=de;var _e=te._reader;if(_e!==void 0){if(F(_e)===!0){var $e=!0,He=!1,Xe=void 0;try{for(var gt,Bt=_e._readRequests[Symbol.iterator]();!($e=(gt=Bt.next()).done);$e=!0)gt.value._reject(de)}catch(Vn){He=!0,Xe=Vn}finally{try{!$e&&Bt.return&&Bt.return()}finally{if(He)throw Xe}}_e._readRequests=[]}else{var Yt=!0,Dr=!1,Xt=void 0;try{for(var vr,si=_e._readIntoRequests[Symbol.iterator]();!(Yt=(vr=si.next()).done);Yt=!0)vr.value._reject(de)}catch(Vn){Dr=!0,Xt=Vn}finally{try{!Yt&&si.return&&si.return()}finally{if(Dr)throw Xt}}_e._readIntoRequests=[]}Qt(_e,de),_e._closedPromise.catch(function(){})}}function T(te,de,_e){te._reader._readIntoRequests.shift()._resolve(De(de,_e))}function I(te,de,_e){te._reader._readRequests.shift()._resolve(De(de,_e))}function D(te){return te._reader._readIntoRequests.length}function U(te){return te._reader._readRequests.length}function H(te){var de=te._reader;return de!==void 0&&x(de)!==!1}function N(te){var de=te._reader;return de!==void 0&&F(de)!==!1}function x(te){return!!yn(te)&&!!Object.prototype.hasOwnProperty.call(te,"_readIntoRequests")}function F(te){return!!yn(te)&&!!Object.prototype.hasOwnProperty.call(te,"_readRequests")}function X(te,de){te._ownerReadableStream=de,de._reader=te,de._state==="readable"?Wr(te):de._state==="closed"?Br(te):(br(te,de._storedError),te._closedPromise.catch(function(){}))}function ne(te,de){return w(te._ownerReadableStream,de)}function $(te){te._ownerReadableStream._state==="readable"?Qt(te,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):_r(te,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),te._closedPromise.catch(function(){}),te._ownerReadableStream._reader=void 0,te._ownerReadableStream=void 0}function j(te,de){var _e=te._ownerReadableStream;return _e._disturbed=!0,_e._state==="errored"?Promise.reject(_e._storedError):ae(_e._readableStreamController,de)}function Q(te){var de=te._ownerReadableStream;return de._disturbed=!0,de._state==="closed"?Promise.resolve(De(void 0,!0)):de._state==="errored"?Promise.reject(de._storedError):de._readableStreamController[ps]()}function se(te){return!!yn(te)&&!!Object.prototype.hasOwnProperty.call(te,"_controlledReadableStream")}function ie(te){be(te)!==!1&&(te._pulling!==!0?(te._pulling=!0,te._pullAlgorithm().then(function(){if(te._pulling=!1,te._pullAgain===!0)return te._pullAgain=!1,ie(te)},function(de){ye(te,de)}).catch(mr)):te._pullAgain=!0)}function be(te){var de=te._controlledReadableStream;return oe(te)!==!1&&te._started!==!1&&(p(de)===!0&&U(de)>0||ce(te)>0)}function he(te){var de=te._controlledReadableStream;te._closeRequested=!0,te._queue.length===0&&O(de)}function Te(te,de){var _e=te._controlledReadableStream;if(p(_e)===!0&&U(_e)>0)I(_e,de,!1);else{var $e=void 0;try{$e=te._strategySizeAlgorithm(de)}catch(He){throw ye(te,He),He}try{ya(te,de,$e)}catch(He){throw ye(te,He),He}}ie(te)}function Ne(te,de){var _e=te._controlledReadableStream;ki(te),A(_e,de)}function ye(te,de){te._controlledReadableStream._state==="readable"&&Ne(te,de)}function ce(te){var de=te._controlledReadableStream._state;return de==="errored"?null:de==="closed"?0:te._strategyHWM-te._queueTotalSize}function Re(te){return be(te)!==!0}function oe(te){var de=te._controlledReadableStream._state;return te._closeRequested===!1&&de==="readable"}function J(te,de,_e,$e,He,Xe,gt){de._controlledReadableStream=te,de._queue=void 0,de._queueTotalSize=void 0,ki(de),de._started=!1,de._closeRequested=!1,de._pullAgain=!1,de._pulling=!1,de._strategySizeAlgorithm=gt,de._strategyHWM=Xe,de._pullAlgorithm=$e,de._cancelAlgorithm=He,te._readableStreamController=de;var Bt=_e();Promise.resolve(Bt).then(function(){de._started=!0,ie(de)},function(Yt){ye(de,Yt)}).catch(mr)}function le(te,de,_e,$e){var He=Object.create(nu.prototype),Xe=ze(de,"pull",0,[He]),gt=ze(de,"cancel",1,[]);J(te,He,function(){return Je(de,"start",[He])},Xe,gt,_e,$e)}function pe(te){return!!yn(te)&&!!Object.prototype.hasOwnProperty.call(te,"_controlledReadableByteStream")}function L(te){return!!yn(te)&&!!Object.prototype.hasOwnProperty.call(te,"_associatedReadableByteStreamController")}function P(te){W(te)!==!1&&(te._pulling!==!0?(te._pulling=!0,te._pullAlgorithm().then(function(){te._pulling=!1,te._pullAgain===!0&&(te._pullAgain=!1,P(te))},function(de){te._controlledReadableByteStream._state==="readable"&&R(te,de)}).catch(mr)):te._pullAgain=!0)}function g(te){Y(te),te._pendingPullIntos=[]}function y(te,de){var _e=!1;te._state==="closed"&&(_e=!0);var $e=v(de);de.readerType==="default"?I(te,$e,_e):T(te,$e,_e)}function v(te){var de=te.bytesFilled,_e=te.elementSize;return new te.ctor(te.buffer,te.byteOffset,de/_e)}function C(te,de,_e,$e){te._queue.push({buffer:de,byteOffset:_e,byteLength:$e}),te._queueTotalSize+=$e}function V(te,de){var _e=de.elementSize,$e=de.bytesFilled-de.bytesFilled%_e,He=Math.min(te._queueTotalSize,de.byteLength-de.bytesFilled),Xe=de.bytesFilled+He,gt=Xe-Xe%_e,Bt=He,Yt=!1;gt>$e&&(Bt=gt-de.bytesFilled,Yt=!0);for(var Dr=te._queue;Bt>0;){var Xt=Dr[0],vr=Math.min(Bt,Xt.byteLength),si=de.byteOffset+de.bytesFilled;Ae(de.buffer,si,Xt.buffer,Xt.byteOffset,vr),Xt.byteLength===vr?Dr.shift():(Xt.byteOffset+=vr,Xt.byteLength-=vr),te._queueTotalSize-=vr,q(te,vr,de),Bt-=vr}return Yt}function q(te,de,_e){Y(te),_e.bytesFilled+=de}function G(te){te._queueTotalSize===0&&te._closeRequested===!0?O(te._controlledReadableByteStream):P(te)}function Y(te){te._byobRequest!==void 0&&(te._byobRequest._associatedReadableByteStreamController=void 0,te._byobRequest._view=void 0,te._byobRequest=void 0)}function ee(te){for(;te._pendingPullIntos.length>0;){if(te._queueTotalSize===0)return;var de=te._pendingPullIntos[0];V(te,de)===!0&&(k(te),y(te._controlledReadableByteStream,de))}}function ae(te,de){var _e=te._controlledReadableByteStream,$e=1;de.constructor!==DataView&&($e=de.constructor.BYTES_PER_ELEMENT);var He=de.constructor,Xe={buffer:at(de.buffer),byteOffset:de.byteOffset,byteLength:de.byteLength,bytesFilled:0,elementSize:$e,ctor:He,readerType:"byob"};if(te._pendingPullIntos.length>0)return te._pendingPullIntos.push(Xe),_(_e);if(_e._state==="closed"){var gt=new de.constructor(Xe.buffer,Xe.byteOffset,0);return Promise.resolve(De(gt,!0))}if(te._queueTotalSize>0){if(V(te,Xe)===!0){var Bt=v(Xe);return G(te),Promise.resolve(De(Bt,!1))}if(te._closeRequested===!0){var Yt=new TypeError("Insufficient bytes to fill elements in the given buffer");return R(te,Yt),Promise.reject(Yt)}}te._pendingPullIntos.push(Xe);var Dr=_(_e);return P(te),Dr}function ve(te,de){de.buffer=at(de.buffer);var _e=te._controlledReadableByteStream;if(H(_e)===!0)for(;D(_e)>0;)y(_e,k(te))}function me(te,de,_e){if(_e.bytesFilled+de>_e.byteLength)throw new RangeError("bytesWritten out of range");if(q(te,de,_e),!(_e.bytesFilled<_e.elementSize)){k(te);var $e=_e.bytesFilled%_e.elementSize;if($e>0){var He=_e.byteOffset+_e.bytesFilled,Xe=_e.buffer.slice(He-$e,He);C(te,Xe,0,Xe.byteLength)}_e.buffer=at(_e.buffer),_e.bytesFilled-=$e,y(te._controlledReadableByteStream,_e),ee(te)}}function Ee(te,de){var _e=te._pendingPullIntos[0];if(te._controlledReadableByteStream._state==="closed"){if(de!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");ve(te,_e)}else me(te,de,_e)}function k(te){var de=te._pendingPullIntos.shift();return Y(te),de}function W(te){var de=te._controlledReadableByteStream;return de._state==="readable"&&te._closeRequested!==!0&&te._started!==!1&&(N(de)===!0&&U(de)>0||H(de)===!0&&D(de)>0||z(te)>0)}function M(te){var de=te._controlledReadableByteStream;if(te._queueTotalSize>0)te._closeRequested=!0;else{if(te._pendingPullIntos.length>0&&te._pendingPullIntos[0].bytesFilled>0){var _e=new TypeError("Insufficient bytes to fill elements in the given buffer");throw R(te,_e),_e}O(de)}}function S(te,de){var _e=te._controlledReadableByteStream,$e=de.buffer,He=de.byteOffset,Xe=de.byteLength,gt=at($e);N(_e)===!0?U(_e)===0?C(te,gt,He,Xe):I(_e,new Uint8Array(gt,He,Xe),!1):H(_e)===!0?(C(te,gt,He,Xe),ee(te)):C(te,gt,He,Xe)}function R(te,de){var _e=te._controlledReadableByteStream;g(te),ki(te),A(_e,de)}function z(te){var de=te._controlledReadableByteStream._state;return de==="errored"?null:de==="closed"?0:te._strategyHWM-te._queueTotalSize}function ue(te,de){if(de=Number(de),Be(de)===!1)throw new RangeError("bytesWritten must be a finite");Ee(te,de)}function ge(te,de){var _e=te._pendingPullIntos[0];if(_e.byteOffset+_e.bytesFilled!==de.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(_e.byteLength!==de.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");_e.buffer=de.buffer,Ee(te,de.byteLength)}function we(te,de,_e,$e,He,Xe,gt){de._controlledReadableByteStream=te,de._pullAgain=!1,de._pulling=!1,g(de),de._queue=de._queueTotalSize=void 0,ki(de),de._closeRequested=!1,de._started=!1,de._strategyHWM=qe(Xe),de._pullAlgorithm=$e,de._cancelAlgorithm=He,de._autoAllocateChunkSize=gt,de._pendingPullIntos=[],te._readableStreamController=de;var Bt=_e();Promise.resolve(Bt).then(function(){de._started=!0,P(de)},function(Yt){te._state==="readable"&&R(de,Yt)}).catch(mr)}function Me(te,de,_e){var $e=Object.create(Il.prototype),He=ze(de,"pull",0,[$e]),Xe=ze(de,"cancel",1,[]),gt=de.autoAllocateChunkSize;if(gt!==void 0&&(Number.isInteger(gt)===!1||gt<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");we(te,$e,function(){return Je(de,"start",[$e])},He,Xe,_e,gt)}function Ue(te,de,_e){te._associatedReadableByteStreamController=de,te._view=_e}function Ge(te){return new TypeError("ReadableStream.prototype."+te+" can only be used on a ReadableStream")}function We(te){return new TypeError("Cannot "+te+" a stream using a released reader")}function lt(te){return new TypeError("ReadableStreamDefaultReader.prototype."+te+" can only be used on a ReadableStreamDefaultReader")}function Wr(te){te._closedPromise=new Promise(function(de,_e){te._closedPromise_resolve=de,te._closedPromise_reject=_e})}function br(te,de){te._closedPromise=Promise.reject(de),te._closedPromise_resolve=void 0,te._closedPromise_reject=void 0}function Br(te){te._closedPromise=Promise.resolve(void 0),te._closedPromise_resolve=void 0,te._closedPromise_reject=void 0}function Qt(te,de){te._closedPromise_reject(de),te._closedPromise_resolve=void 0,te._closedPromise_reject=void 0}function _r(te,de){te._closedPromise=Promise.reject(de)}function Pr(te){te._closedPromise_resolve(void 0),te._closedPromise_resolve=void 0,te._closedPromise_reject=void 0}function kr(te){return new TypeError("ReadableStreamBYOBReader.prototype."+te+" can only be used on a ReadableStreamBYOBReader")}function Rn(te){return new TypeError("ReadableStreamDefaultController.prototype."+te+" can only be used on a ReadableStreamDefaultController")}function Tt(te){return new TypeError("ReadableStreamBYOBRequest.prototype."+te+" can only be used on a ReadableStreamBYOBRequest")}function B(te){return new TypeError("ReadableByteStreamController.prototype."+te+" can only be used on a ReadableByteStreamController")}function re(te){try{Promise.prototype.then.call(te,void 0,function(){})}catch{}}var Se=function(){function te(de,_e){for(var $e=0;$e<_e.length;$e++){var He=_e[$e];He.enumerable=He.enumerable||!1,He.configurable=!0,"value"in He&&(He.writable=!0),Object.defineProperty(de,He.key,He)}}return function(de,_e,$e){return _e&&te(de.prototype,_e),$e&&te(de,$e),de}}();r("better-assert");var Fe=r("./helpers.js"),Ae=Fe.ArrayBufferCopy,ze=Fe.CreateAlgorithmFromUnderlyingMethod,De=Fe.CreateIterResultObject,Be=Fe.IsFiniteNonNegativeNumber,Je=Fe.InvokeOrNoop,Pt=Fe.IsDetachedBuffer,at=Fe.TransferArrayBuffer,qe=Fe.ValidateAndNormalizeHighWaterMark;Fe.IsNonNegativeNumber;var hs=Fe.MakeSizeAlgorithmFromSizeFunction,ke=Fe.createArrayFromList,yn=Fe.typeIsObject,gr=r("./utils.js"),mr=gr.rethrowAssertionErrorRejection,Pi=r("./queue-with-sizes.js"),vt=Pi.DequeueValue,ya=Pi.EnqueueValueWithSize,ki=Pi.ResetQueue,ir=r("./writable-stream.js"),to=ir.AcquireWritableStreamDefaultWriter,ru=ir.IsWritableStream,Xr=ir.IsWritableStreamLocked,Di=ir.WritableStreamAbort,an=ir.WritableStreamDefaultWriterCloseWithErrorPropagation,Qi=ir.WritableStreamDefaultWriterRelease,sn=ir.WritableStreamDefaultWriterWrite,Na=ir.WritableStreamCloseQueuedOrInFlight,Zr=Symbol("[[CancelSteps]]"),ps=Symbol("[[PullSteps]]"),Ca=function(){function te(){var de=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$e=_e.size,He=_e.highWaterMark;s(this,te),d(this);var Xe=de.type;if(String(Xe)==="bytes"){if(He===void 0&&(He=0),He=qe(He),$e!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");Me(this,de,He)}else{if(Xe!==void 0)throw new RangeError("Invalid type is specified");He===void 0&&(He=1),le(this,de,He=qe(He),hs($e))}}return Se(te,[{key:"cancel",value:function(_e){return f(this)===!1?Promise.reject(Ge("cancel")):p(this)===!0?Promise.reject(new TypeError("Cannot cancel a stream that already has a reader")):w(this,_e)}},{key:"getReader",value:function(){var _e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).mode;if(f(this)===!1)throw Ge("getReader");if(_e===void 0)return u(this);if((_e=String(_e))==="byob")return o(this);throw new RangeError("Invalid mode is specified")}},{key:"pipeThrough",value:function(_e,$e){var He=_e.writable,Xe=_e.readable;if(He===void 0||Xe===void 0)throw new TypeError("readable and writable arguments must be defined");return re(this.pipeTo(He,$e)),Xe}},{key:"pipeTo",value:function(_e){var $e=this,He=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Xe=He.preventClose,gt=He.preventAbort,Bt=He.preventCancel;if(f(this)===!1)return Promise.reject(Ge("pipeTo"));if(ru(_e)===!1)return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));if(Xe=!!Xe,gt=!!gt,Bt=!!Bt,p(this)===!0)return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(Xr(_e)===!0)return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));var Yt=u(this),Dr=to(_e),Xt=!1,vr=Promise.resolve();return new Promise(function(si,Vn){function xn(){return Xt===!0?Promise.resolve():Dr._readyPromise.then(function(){return Q(Yt).then(function(Gt){var _n=Gt.value;Gt.done!==!0&&(vr=sn(Dr,_n).catch(function(){}))})}).then(xn)}function oi(){var Gt=vr;return vr.then(function(){return Gt!==vr?oi():void 0})}function Ma(Gt,_n,no){Gt._state==="errored"?no(Gt._storedError):_n.catch(no).catch(mr)}function bn(Gt,_n,no){function iu(){Gt().then(function(){return uc(_n,no)},function(ly){return uc(!0,ly)}).catch(mr)}Xt!==!0&&(Xt=!0,_e._state==="writable"&&Na(_e)===!1?oi().then(iu):iu())}function ro(Gt,_n){Xt!==!0&&(Xt=!0,_e._state==="writable"&&Na(_e)===!1?oi().then(function(){return uc(Gt,_n)}).catch(mr):uc(Gt,_n))}function uc(Gt,_n){Qi(Dr),$(Yt),Gt?Vn(_n):si(void 0)}if(Ma($e,Yt._closedPromise,function(Gt){gt===!1?bn(function(){return Di(_e,Gt)},!0,Gt):ro(!0,Gt)}),Ma(_e,Dr._closedPromise,function(Gt){Bt===!1?bn(function(){return w($e,Gt)},!0,Gt):ro(!0,Gt)}),function(_n,no,iu){_n._state==="closed"?iu():no.then(iu).catch(mr)}($e,Yt._closedPromise,function(){Xe===!1?bn(function(){return an(Dr)}):ro()}),Na(_e)===!0||_e._state==="closed"){var cc=new TypeError("the destination writable stream closed before all data could be piped to it");Bt===!1?bn(function(){return w($e,cc)},!0,cc):ro(!0,cc)}xn().catch(function(Gt){vr=Promise.resolve(),mr(Gt)})})}},{key:"tee",value:function(){if(f(this)===!1)throw Ge("tee");var _e=b(this);return ke(_e)}},{key:"locked",get:function(){if(f(this)===!1)throw Ge("locked");return p(this)}}]),te}();n.exports={CreateReadableByteStream:l,CreateReadableStream:c,ReadableStream:Ca,IsReadableStreamDisturbed:h,ReadableStreamDefaultControllerClose:he,ReadableStreamDefaultControllerEnqueue:Te,ReadableStreamDefaultControllerError:Ne,ReadableStreamDefaultControllerGetDesiredSize:ce,ReadableStreamDefaultControllerHasBackpressure:Re,ReadableStreamDefaultControllerCanCloseOrEnqueue:oe};var ai=function(){function te(de){if(s(this,te),f(de)===!1)throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(p(de)===!0)throw new TypeError("This stream has already been locked for exclusive reading by another reader");X(this,de),this._readRequests=[]}return Se(te,[{key:"cancel",value:function(_e){return F(this)===!1?Promise.reject(lt("cancel")):this._ownerReadableStream===void 0?Promise.reject(We("cancel")):ne(this,_e)}},{key:"read",value:function(){return F(this)===!1?Promise.reject(lt("read")):this._ownerReadableStream===void 0?Promise.reject(We("read from")):Q(this)}},{key:"releaseLock",value:function(){if(F(this)===!1)throw lt("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");$(this)}}},{key:"closed",get:function(){return F(this)===!1?Promise.reject(lt("closed")):this._closedPromise}}]),te}(),qn=function(){function te(de){if(s(this,te),!f(de))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(pe(de._readableStreamController)===!1)throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(p(de))throw new TypeError("This stream has already been locked for exclusive reading by another reader");X(this,de),this._readIntoRequests=[]}return Se(te,[{key:"cancel",value:function(_e){return x(this)?this._ownerReadableStream===void 0?Promise.reject(We("cancel")):ne(this,_e):Promise.reject(kr("cancel"))}},{key:"read",value:function(_e){return x(this)?this._ownerReadableStream===void 0?Promise.reject(We("read from")):ArrayBuffer.isView(_e)?Pt(_e.buffer)===!0?Promise.reject(new TypeError("Cannot read into a view onto a detached ArrayBuffer")):_e.byteLength===0?Promise.reject(new TypeError("view must have non-zero byteLength")):j(this,_e):Promise.reject(new TypeError("view must be an array buffer view")):Promise.reject(kr("read"))}},{key:"releaseLock",value:function(){if(!x(this))throw kr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");$(this)}}},{key:"closed",get:function(){return x(this)?this._closedPromise:Promise.reject(kr("closed"))}}]),te}(),nu=function(){function te(){throw s(this,te),new TypeError}return Se(te,[{key:"close",value:function(){if(se(this)===!1)throw Rn("close");if(oe(this)===!1)throw new TypeError("The stream is not in a state that permits close");he(this)}},{key:"enqueue",value:function(_e){if(se(this)===!1)throw Rn("enqueue");if(oe(this)===!1)throw new TypeError("The stream is not in a state that permits enqueue");return Te(this,_e)}},{key:"error",value:function(_e){if(se(this)===!1)throw Rn("error");var $e=this._controlledReadableStream;if($e._state!=="readable")throw new TypeError("The stream is "+$e._state+" and so cannot be errored");Ne(this,_e)}},{key:Zr,value:function(_e){return ki(this),this._cancelAlgorithm(_e)}},{key:ps,value:function(){var _e=this._controlledReadableStream;if(this._queue.length>0){var $e=vt(this);return this._closeRequested===!0&&this._queue.length===0?O(_e):ie(this),Promise.resolve(De($e,!1))}var He=E(_e);return ie(this),He}},{key:"desiredSize",get:function(){if(se(this)===!1)throw Rn("desiredSize");return ce(this)}}]),te}(),ja=function(){function te(){throw s(this,te),new TypeError("ReadableStreamBYOBRequest cannot be used directly")}return Se(te,[{key:"respond",value:function(_e){if(L(this)===!1)throw Tt("respond");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");if(Pt(this._view.buffer)===!0)throw new TypeError("The BYOB request's buffer has been detached and so cannot be used as a response");ue(this._associatedReadableByteStreamController,_e)}},{key:"respondWithNewView",value:function(_e){if(L(this)===!1)throw Tt("respond");if(this._associatedReadableByteStreamController===void 0)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(Pt(_e.buffer)===!0)throw new TypeError("The supplied view's buffer has been detached and so cannot be used as a response");ge(this._associatedReadableByteStreamController,_e)}},{key:"view",get:function(){if(L(this)===!1)throw Tt("view");return this._view}}]),te}(),Il=function(){function te(){throw s(this,te),new TypeError("ReadableByteStreamController constructor cannot be used directly")}return Se(te,[{key:"close",value:function(){if(pe(this)===!1)throw B("close");if(this._closeRequested===!0)throw new TypeError("The stream has already been closed; do not close it again!");var _e=this._controlledReadableByteStream._state;if(_e!=="readable")throw new TypeError("The stream (in "+_e+" state) is not in the readable state and cannot be closed");M(this)}},{key:"enqueue",value:function(_e){if(pe(this)===!1)throw B("enqueue");if(this._closeRequested===!0)throw new TypeError("stream is closed or draining");var $e=this._controlledReadableByteStream._state;if($e!=="readable")throw new TypeError("The stream (in "+$e+" 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(Pt(_e.buffer)===!0)throw new TypeError("Cannot enqueue a view onto a detached ArrayBuffer");S(this,_e)}},{key:"error",value:function(_e){if(pe(this)===!1)throw B("error");var $e=this._controlledReadableByteStream;if($e._state!=="readable")throw new TypeError("The stream is "+$e._state+" and so cannot be errored");R(this,_e)}},{key:Zr,value:function(_e){return this._pendingPullIntos.length>0&&(this._pendingPullIntos[0].bytesFilled=0),ki(this),this._cancelAlgorithm(_e)}},{key:ps,value:function(){var _e=this._controlledReadableByteStream;if(this._queueTotalSize>0){var $e=this._queue.shift();this._queueTotalSize-=$e.byteLength,G(this);var He=void 0;try{He=new Uint8Array($e.buffer,$e.byteOffset,$e.byteLength)}catch(Dr){return Promise.reject(Dr)}return Promise.resolve(De(He,!1))}var Xe=this._autoAllocateChunkSize;if(Xe!==void 0){var gt=void 0;try{gt=new ArrayBuffer(Xe)}catch(Dr){return Promise.reject(Dr)}var Bt={buffer:gt,byteOffset:0,byteLength:Xe,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Bt)}var Yt=E(_e);return P(this),Yt}},{key:"byobRequest",get:function(){if(pe(this)===!1)throw B("byobRequest");if(this._byobRequest===void 0&&this._pendingPullIntos.length>0){var _e=this._pendingPullIntos[0],$e=new Uint8Array(_e.buffer,_e.byteOffset+_e.bytesFilled,_e.byteLength-_e.bytesFilled),He=Object.create(ja.prototype);Ue(He,this,$e),this._byobRequest=He}return this._byobRequest}},{key:"desiredSize",get:function(){if(pe(this)===!1)throw B("desiredSize");return z(this)}}]),te}()},{"./helpers.js":10,"./queue-with-sizes.js":11,"./utils.js":14,"./writable-stream.js":15,"better-assert":16}],13:[function(r,n,a){function s(L,P){if(!(L instanceof P))throw new TypeError("Cannot call a class as a function")}function o(L,P,g){var y=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,v=arguments.length>4&&arguments[4]!==void 0?arguments[4]:function(){return 1},C=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,V=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){return 1},q=Object.create(le.prototype),G=void 0;u(q,new Promise(function(ee){G=ee}),y,v,C,V),p(q,Object.create(pe.prototype),P,g);var Y=L();return G(Y),q}function u(L,P,g,y,v,C){function V(){return P}L._writable=oe(V,function(G){return O(L,G)},function(){return T(L)},function(){return A(L)},g,y),L._readable=ie(V,function(){return I(L)},function(G){return d(L,G),Promise.resolve()},v,C),L._backpressure=void 0,L._backpressureChangePromise=void 0,L._backpressureChangePromise_resolve=void 0,f(L,!0),L._transformStreamController=void 0}function c(L){return!!$(L)&&!!Object.prototype.hasOwnProperty.call(L,"_transformStreamController")}function l(L,P){N("TransformStreamError()"),L._readable._state==="readable"&&Te(L._readable._readableStreamController,P),d(L,P)}function d(L,P){J(L._writable._writableStreamController,P),L._backpressure===!0&&f(L,!1)}function f(L,P){N("TransformStreamSetBackpressure() [backpressure = "+P+"]"),L._backpressureChangePromise!==void 0&&L._backpressureChangePromise_resolve(),L._backpressureChangePromise=new Promise(function(g){L._backpressureChangePromise_resolve=g}),L._backpressure=P}function h(L){return!!$(L)&&!!Object.prototype.hasOwnProperty.call(L,"_controlledTransformStream")}function p(L,P,g,y){P._controlledTransformStream=L,L._transformStreamController=P,P._transformAlgorithm=g,P._flushAlgorithm=y}function b(L,P){var g=Object.create(pe.prototype),y=function(q){try{return _(g,q),Promise.resolve()}catch(G){return Promise.reject(G)}},v=P.transform;if(v!==void 0){if(typeof v!="function")throw new TypeError("transform is not a method");y=function(q){return ne(v,P,[q,g]).catch(function(G){throw l(L,G),G})}}var C=X(P,"flush",0,[g]);p(L,g,y,C)}function _(L,P){N("TransformStreamDefaultControllerEnqueue()");var g=L._controlledTransformStream,y=g._readable._readableStreamController;if(ce(y)===!1)throw new TypeError("Readable side is not in a state that permits enqueue");try{he(y,P)}catch(v){throw d(g,v),g._readable._storedError}ye(y)!==g._backpressure&&f(g,!0)}function E(L,P){l(L._controlledTransformStream,P)}function w(L){N("TransformStreamDefaultControllerTerminate()");var P=L._controlledTransformStream,g=P._readable._readableStreamController;ce(g)===!0&&be(g),d(P,new TypeError("TransformStream terminated"))}function O(L,P){N("TransformStreamDefaultSinkWriteAlgorithm()");var g=L._transformStreamController;return L._backpressure===!0?L._backpressureChangePromise.then(function(){var y=L._writable;if(y._state==="erroring")throw y._storedError;return g._transformAlgorithm(P)}):g._transformAlgorithm(P)}function A(L){return l(L,new TypeError("Writable side aborted")),Promise.resolve()}function T(L){N("TransformStreamDefaultSinkCloseAlgorithm()");var P=L._readable;return L._transformStreamController._flushAlgorithm().then(function(){if(P._state==="errored")throw P._storedError;var g=P._readableStreamController;ce(g)===!0&&be(g)}).catch(function(g){throw l(L,g),P._storedError})}function I(L){return N("TransformStreamDefaultSourcePullAlgorithm()"),f(L,!1),L._backpressureChangePromise}function D(L){return new TypeError("TransformStreamDefaultController.prototype."+L+" can only be used on a TransformStreamDefaultController")}function U(L){return new TypeError("TransformStream.prototype."+L+" can only be used on a TransformStream")}var H=function(){function L(P,g){for(var y=0;y0&&arguments[0]!==void 0?arguments[0]:{},g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(s(this,L),P.readableType!==void 0)throw new RangeError("Invalid readable type specified");if(P.writableType!==void 0)throw new RangeError("Invalid writable type specified");var v=g.size,C=Q(v),V=g.highWaterMark;V===void 0&&(V=1),V=j(V);var q=y.size,G=Q(q),Y=y.highWaterMark;Y===void 0&&(Y=0),Y=j(Y);var ee=void 0;u(this,new Promise(function(ve){ee=ve}),V,C,Y,G),b(this,P);var ae=F(P,"start",[this._transformStreamController]);ee(ae)}return H(L,[{key:"readable",get:function(){if(c(this)===!1)throw U("readable");return this._readable}},{key:"writable",get:function(){if(c(this)===!1)throw U("writable");return this._writable}}]),L}(),pe=function(){function L(){throw s(this,L),new TypeError("TransformStreamDefaultController instances cannot be created directly")}return H(L,[{key:"enqueue",value:function(g){if(h(this)===!1)throw D("enqueue");_(this,g)}},{key:"error",value:function(g){if(h(this)===!1)throw D("error");E(this,g)}},{key:"terminate",value:function(){if(h(this)===!1)throw D("terminate");w(this)}},{key:"desiredSize",get:function(){if(h(this)===!1)throw D("desiredSize");var g=this._controlledTransformStream._readable._readableStreamController;return Ne(g)}}]),L}();n.exports={CreateTransformStream:o,TransformStream:le}},{"./helpers.js":10,"./readable-stream.js":12,"./writable-stream.js":15,"better-assert":16,debug:18}],14:[function(r,n,a){var s=r("better-assert");a.rethrowAssertionErrorRejection=function(o){o&&o.constructor===s.AssertionError&&setTimeout(function(){throw o},0)}},{"better-assert":16}],15:[function(r,n,a){function s(B,re){if(!(B instanceof re))throw new TypeError("Cannot call a class as a function")}function o(B){return new Rn(B)}function u(B,re,Se,Fe){var Ae=arguments.length>4&&arguments[4]!==void 0?arguments[4]:1,ze=arguments.length>5&&arguments[5]!==void 0?arguments[5]:function(){return 1},De=Object.create(kr.prototype);return c(De),he(De,Object.create(Tt.prototype),B,re,Se,Fe,Ae,ze),De}function c(B){B._state="writable",B._storedError=void 0,B._writer=void 0,B._writableStreamController=void 0,B._writeRequests=[],B._inFlightWriteRequest=void 0,B._closeRequest=void 0,B._inFlightCloseRequest=void 0,B._pendingAbortRequest=void 0,B._backpressure=!1}function l(B){return!!Ue(B)&&!!Object.prototype.hasOwnProperty.call(B,"_writableStreamController")}function d(B){return B._writer!==void 0}function f(B,re){var Se=B._state;if(Se==="closed")return Promise.resolve(void 0);if(Se==="errored")return Promise.reject(B._storedError);var Fe=new TypeError("Requested to abort");if(B._pendingAbortRequest!==void 0)return Promise.reject(Fe);var Ae=!1;Se==="erroring"&&(Ae=!0,re=void 0);var ze=new Promise(function(De,Be){B._pendingAbortRequest={_resolve:De,_reject:Be,_reason:re,_wasAlreadyErroring:Ae}});return Ae===!1&&b(B,Fe),ze}function h(B){return new Promise(function(re,Se){var Fe={_resolve:re,_reject:Se};B._writeRequests.push(Fe)})}function p(B,re){R("WritableStreamDealWithRejection(stream, %o)",re),B._state!=="writable"?_(B):b(B,re)}function b(B,re){R("WritableStreamStartErroring(stream, %o)",re);var Se=B._writableStreamController;B._state="erroring",B._storedError=re;var Fe=B._writer;Fe!==void 0&&j(Fe,re),I(B)===!1&&Se._started===!0&&_(B)}function _(B){R("WritableStreamFinishErroring()"),B._state="errored",B._writableStreamController[Pr]();var re=B._storedError,Se=!0,Fe=!1,Ae=void 0;try{for(var ze,De=B._writeRequests[Symbol.iterator]();!(Se=(ze=De.next()).done);Se=!0)ze.value._reject(re)}catch(Je){Fe=!0,Ae=Je}finally{try{!Se&&De.return&&De.return()}finally{if(Fe)throw Ae}}if(B._writeRequests=[],B._pendingAbortRequest!==void 0){var Be=B._pendingAbortRequest;if(B._pendingAbortRequest=void 0,Be._wasAlreadyErroring===!0)return Be._reject(re),void H(B);B._writableStreamController[_r](Be._reason).then(function(){Be._resolve(),H(B)},function(Je){Be._reject(Je),H(B)})}else H(B)}function E(B){B._inFlightWriteRequest._resolve(void 0),B._inFlightWriteRequest=void 0}function w(B,re){B._inFlightWriteRequest._reject(re),B._inFlightWriteRequest=void 0,p(B,re)}function O(B){B._inFlightCloseRequest._resolve(void 0),B._inFlightCloseRequest=void 0,B._state==="erroring"&&(B._storedError=void 0,B._pendingAbortRequest!==void 0&&(B._pendingAbortRequest._resolve(),B._pendingAbortRequest=void 0)),B._state="closed";var re=B._writer;re!==void 0&&ee(re)}function A(B,re){B._inFlightCloseRequest._reject(re),B._inFlightCloseRequest=void 0,B._pendingAbortRequest!==void 0&&(B._pendingAbortRequest._reject(re),B._pendingAbortRequest=void 0),p(B,re)}function T(B){return B._closeRequest!==void 0||B._inFlightCloseRequest!==void 0}function I(B){return B._inFlightWriteRequest===void 0&&B._inFlightCloseRequest===void 0?(R("WritableStreamHasOperationMarkedInFlight() is false"),!1):(R("WritableStreamHasOperationMarkedInFlight() is true"),!0)}function D(B){B._inFlightCloseRequest=B._closeRequest,B._closeRequest=void 0}function U(B){B._inFlightWriteRequest=B._writeRequests.shift()}function H(B){R("WritableStreamRejectCloseAndClosedPromiseIfNeeded()"),B._closeRequest!==void 0&&(B._closeRequest._reject(B._storedError),B._closeRequest=void 0);var re=B._writer;re!==void 0&&(G(re,B._storedError),re._closedPromise.catch(function(){}))}function N(B,re){var Se=B._writer;Se!==void 0&&re!==B._backpressure&&(re===!0?k(Se):M(Se)),B._backpressure=re}function x(B){return!!Ue(B)&&!!Object.prototype.hasOwnProperty.call(B,"_ownerWritableStream")}function F(B,re){return f(B._ownerWritableStream,re)}function X(B){var re=B._ownerWritableStream,Se=re._state;if(Se==="closed"||Se==="errored")return Promise.reject(new TypeError("The stream (in "+Se+" state) is not in the writable state and cannot be closed"));var Fe=new Promise(function(Ae,ze){var De={_resolve:Ae,_reject:ze};re._closeRequest=De});return re._backpressure===!0&&Se==="writable"&&M(B),Ne(re._writableStreamController),Fe}function ne(B){var re=B._ownerWritableStream,Se=re._state;return T(re)===!0||Se==="closed"?Promise.resolve():Se==="errored"?Promise.reject(re._storedError):X(B)}function $(B,re){B._closedPromiseState==="pending"?G(B,re):Y(B,re),B._closedPromise.catch(function(){})}function j(B,re){R("WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, %o)",re),B._readyPromiseState==="pending"?Ee(B,re):W(B,re),B._readyPromise.catch(function(){})}function Q(B){var re=B._ownerWritableStream,Se=re._state;return Se==="errored"||Se==="erroring"?null:Se==="closed"?0:ce(re._writableStreamController)}function se(B){var re=B._ownerWritableStream,Se=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");j(B,Se),$(B,Se),re._writer=void 0,B._ownerWritableStream=void 0}function ie(B,re){var Se=B._ownerWritableStream,Fe=Se._writableStreamController,Ae=ye(Fe,re);if(Se!==B._ownerWritableStream)return Promise.reject(v("write to"));var ze=Se._state;if(ze==="errored")return Promise.reject(Se._storedError);if(T(Se)===!0||ze==="closed")return Promise.reject(new TypeError("The stream is closing or closed and cannot be written to"));if(ze==="erroring")return Promise.reject(Se._storedError);var De=h(Se);return Re(Fe,re,Ae),De}function be(B){return!!Ue(B)&&!!Object.prototype.hasOwnProperty.call(B,"_controlledWritableStream")}function he(B,re,Se,Fe,Ae,ze,De,Be){re._controlledWritableStream=B,B._writableStreamController=re,re._queue=void 0,re._queueTotalSize=void 0,Qt(re),re._started=!1,re._strategySizeAlgorithm=Be,re._strategyHWM=De,re._writeAlgorithm=Fe,re._closeAlgorithm=Ae,re._abortAlgorithm=ze;var Je=L(re);N(B,Je);var Pt=Se();Promise.resolve(Pt).then(function(){re._started=!0,oe(re)},function(at){re._started=!0,p(B,at)}).catch(We)}function Te(B,re,Se,Fe){var Ae=Object.create(Tt.prototype),ze=ue(re,"write",1,[Ae]),De=ue(re,"close",0,[]),Be=ue(re,"abort",1,[]);he(B,Ae,function(){return ge(re,"start",[Ae])},ze,De,Be,Se,Fe)}function Ne(B){br(B,"close",0),oe(B)}function ye(B,re){try{return B._strategySizeAlgorithm(re)}catch(Se){return J(B,Se),1}}function ce(B){return B._strategyHWM-B._queueTotalSize}function Re(B,re,Se){var Fe={chunk:re};try{br(B,Fe,Se)}catch(ze){return void J(B,ze)}var Ae=B._controlledWritableStream;T(Ae)===!1&&Ae._state==="writable"&&N(Ae,L(B)),oe(B)}function oe(B){R("WritableStreamDefaultControllerAdvanceQueueIfNeeded()");var re=B._controlledWritableStream;if(B._started!==!1&&re._inFlightWriteRequest===void 0){var Se=re._state;if(Se!=="closed"&&Se!=="errored")if(Se!=="erroring"){if(B._queue.length!==0){var Fe=Br(B);Fe==="close"?le(B):pe(B,Fe.chunk)}}else _(re)}}function J(B,re){B._controlledWritableStream._state==="writable"&&P(B,re)}function le(B){var re=B._controlledWritableStream;D(re),Wr(B),B._closeAlgorithm().then(function(){O(re)},function(Se){A(re,Se)}).catch(We)}function pe(B,re){var Se=B._controlledWritableStream;U(Se),B._writeAlgorithm(re).then(function(){E(Se);var Fe=Se._state;if(Wr(B),T(Se)===!1&&Fe==="writable"){var Ae=L(B);N(Se,Ae)}oe(B)},function(Fe){w(Se,Fe)}).catch(We)}function L(B){return ce(B)<=0}function P(B,re){b(B._controlledWritableStream,re)}function g(B){return new TypeError("WritableStream.prototype."+B+" can only be used on a WritableStream")}function y(B){return new TypeError("WritableStreamDefaultWriter.prototype."+B+" can only be used on a WritableStreamDefaultWriter")}function v(B){return new TypeError("Cannot "+B+" a stream using a released writer")}function C(B){B._closedPromise=new Promise(function(re,Se){B._closedPromise_resolve=re,B._closedPromise_reject=Se,B._closedPromiseState="pending"})}function V(B,re){B._closedPromise=Promise.reject(re),B._closedPromise_resolve=void 0,B._closedPromise_reject=void 0,B._closedPromiseState="rejected"}function q(B){B._closedPromise=Promise.resolve(void 0),B._closedPromise_resolve=void 0,B._closedPromise_reject=void 0,B._closedPromiseState="resolved"}function G(B,re){B._closedPromise_reject(re),B._closedPromise_resolve=void 0,B._closedPromise_reject=void 0,B._closedPromiseState="rejected"}function Y(B,re){B._closedPromise=Promise.reject(re),B._closedPromiseState="rejected"}function ee(B){B._closedPromise_resolve(void 0),B._closedPromise_resolve=void 0,B._closedPromise_reject=void 0,B._closedPromiseState="resolved"}function ae(B){R("defaultWriterReadyPromiseInitialize()"),B._readyPromise=new Promise(function(re,Se){B._readyPromise_resolve=re,B._readyPromise_reject=Se}),B._readyPromiseState="pending"}function ve(B,re){R("defaultWriterReadyPromiseInitializeAsRejected(writer, %o)",re),B._readyPromise=Promise.reject(re),B._readyPromise_resolve=void 0,B._readyPromise_reject=void 0,B._readyPromiseState="rejected"}function me(B){R("defaultWriterReadyPromiseInitializeAsResolved()"),B._readyPromise=Promise.resolve(void 0),B._readyPromise_resolve=void 0,B._readyPromise_reject=void 0,B._readyPromiseState="fulfilled"}function Ee(B,re){R("defaultWriterReadyPromiseReject(writer, %o)",re),B._readyPromise_reject(re),B._readyPromise_resolve=void 0,B._readyPromise_reject=void 0,B._readyPromiseState="rejected"}function k(B){R("defaultWriterReadyPromiseReset()"),B._readyPromise=new Promise(function(re,Se){B._readyPromise_resolve=re,B._readyPromise_reject=Se}),B._readyPromiseState="pending"}function W(B,re){R("defaultWriterReadyPromiseResetToRejected(writer, %o)",re),B._readyPromise=Promise.reject(re),B._readyPromiseState="rejected"}function M(B){R("defaultWriterReadyPromiseResolve()"),B._readyPromise_resolve(void 0),B._readyPromise_resolve=void 0,B._readyPromise_reject=void 0,B._readyPromiseState="fulfilled"}var S=function(){function B(re,Se){for(var Fe=0;Fe0&&arguments[0]!==void 0?arguments[0]:{},Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Fe=Se.size,Ae=Se.highWaterMark,ze=Ae===void 0?1:Ae;if(s(this,B),c(this),re.type!==void 0)throw new RangeError("Invalid type is specified");var De=Me(Fe);Te(this,re,ze=we(ze),De)}return S(B,[{key:"abort",value:function(Se){return l(this)===!1?Promise.reject(g("abort")):d(this)===!0?Promise.reject(new TypeError("Cannot abort a stream that already has a writer")):f(this,Se)}},{key:"getWriter",value:function(){if(l(this)===!1)throw g("getWriter");return o(this)}},{key:"locked",get:function(){if(l(this)===!1)throw g("locked");return d(this)}}]),B}();n.exports={AcquireWritableStreamDefaultWriter:o,CreateWritableStream:u,IsWritableStream:l,IsWritableStreamLocked:d,WritableStream:kr,WritableStreamAbort:f,WritableStreamDefaultControllerErrorIfNeeded:J,WritableStreamDefaultWriterCloseWithErrorPropagation:ne,WritableStreamDefaultWriterRelease:se,WritableStreamDefaultWriterWrite:ie,WritableStreamCloseQueuedOrInFlight:T};var Rn=function(){function B(re){if(s(this,B),l(re)===!1)throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(d(re)===!0)throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=re,re._writer=this;var Se=re._state;if(Se==="writable")T(re)===!1&&re._backpressure===!0?ae(this):me(this),C(this);else if(Se==="erroring")ve(this,re._storedError),this._readyPromise.catch(function(){}),C(this);else if(Se==="closed")me(this),q(this);else{var Fe=re._storedError;ve(this,Fe),this._readyPromise.catch(function(){}),V(this,Fe),this._closedPromise.catch(function(){})}}return S(B,[{key:"abort",value:function(Se){return x(this)===!1?Promise.reject(y("abort")):this._ownerWritableStream===void 0?Promise.reject(v("abort")):F(this,Se)}},{key:"close",value:function(){if(x(this)===!1)return Promise.reject(y("close"));var Se=this._ownerWritableStream;return Se===void 0?Promise.reject(v("close")):T(Se)===!0?Promise.reject(new TypeError("cannot close an already-closing stream")):X(this)}},{key:"releaseLock",value:function(){if(x(this)===!1)throw y("releaseLock");this._ownerWritableStream!==void 0&&se(this)}},{key:"write",value:function(Se){return x(this)===!1?Promise.reject(y("write")):this._ownerWritableStream===void 0?Promise.reject(v("write to")):ie(this,Se)}},{key:"closed",get:function(){return x(this)===!1?Promise.reject(y("closed")):this._closedPromise}},{key:"desiredSize",get:function(){if(x(this)===!1)throw y("desiredSize");if(this._ownerWritableStream===void 0)throw v("desiredSize");return Q(this)}},{key:"ready",get:function(){return x(this)===!1?Promise.reject(y("ready")):this._readyPromise}}]),B}(),Tt=function(){function B(){throw s(this,B),new TypeError("WritableStreamDefaultController cannot be constructed explicitly")}return S(B,[{key:"error",value:function(Se){if(be(this)===!1)throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");this._controlledWritableStream._state==="writable"&&P(this,Se)}},{key:_r,value:function(Se){return this._abortAlgorithm(Se)}},{key:Pr,value:function(){Qt(this)}}]),B}()},{"./helpers.js":10,"./queue-with-sizes.js":11,"./utils.js":14,"better-assert":16,debug:18}],16:[function(r,n,a){(function(s){function o(d){if(!d){var f=c(),h=f[1],p=h.getFileName(),b=h.getLineNumber(),_=(_=l.readFileSync(p,"utf8")).split(` +`)[b-1].match(/assert\((.*)\)/)[1];throw new u({message:_,stackStartFunction:f[0].getFunction()})}}var u=r("assert").AssertionError,c=r("callsite"),l=r("fs");n.exports={}.NO_ASSERT?function(){}:o}).call(this,r("_process"))},{_process:4,assert:2,callsite:17,fs:3}],17:[function(r,n,a){n.exports=function(){var s=Error.prepareStackTrace;Error.prepareStackTrace=function(c,l){return l};var o=new Error;Error.captureStackTrace(o,arguments.callee);var u=o.stack;return Error.prepareStackTrace=s,u}},{}],18:[function(r,n,a){(function(s){function o(){return!(typeof window>"u"||!window.process||window.process.type!=="renderer")||(typeof navigator>"u"||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&(typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function u(h){var p=this.useColors;if(h[0]=(p?"%c":"")+this.namespace+(p?" %c":" ")+h[0]+(p?"%c ":" ")+"+"+a.humanize(this.diff),p){var b="color: "+this.color;h.splice(1,0,b,"color: inherit");var _=0,E=0;h[0].replace(/%[a-zA-Z%]/g,function(w){w!=="%%"&&(_++,w==="%c"&&(E=_))}),h.splice(E,0,b)}}function c(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function l(h){try{h==null?a.storage.removeItem("debug"):a.storage.debug=h}catch{}}function d(){var h;try{h=a.storage.debug}catch{}return!h&&typeof s<"u"&&"env"in s&&(h={}.DEBUG),h}function f(){try{return window.localStorage}catch{}}a=n.exports=r("./debug"),a.log=c,a.formatArgs=u,a.save=l,a.load=d,a.useColors=o,a.storage=typeof chrome<"u"&&chrome.storage!==void 0?chrome.storage.local:f(),a.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"],a.formatters.j=function(h){try{return JSON.stringify(h)}catch(p){return"[UnexpectedJSONParseError]: "+p.message}},a.enable(d())}).call(this,r("_process"))},{"./debug":19,_process:4}],19:[function(r,n,a){function s(h){var p,b=0;for(p in h)b=(b<<5)-b+h.charCodeAt(p),b|=0;return a.colors[Math.abs(b)%a.colors.length]}function o(h){function p(){if(p.enabled){var _=p,E=+new Date,w=E-(b||E);_.diff=w,_.prev=b,_.curr=E,b=E;for(var O=new Array(arguments.length),A=0;A100)){var _=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(b);if(_){var E=parseFloat(_[1]);switch((_[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return E*p;case"days":case"day":case"d":return E*h;case"hours":case"hour":case"hrs":case"hr":case"h":return E*f;case"minutes":case"minute":case"mins":case"min":case"m":return E*d;case"seconds":case"second":case"secs":case"sec":case"s":return E*l;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return E;default:return}}}}function o(b){return b>=h?Math.round(b/h)+"d":b>=f?Math.round(b/f)+"h":b>=d?Math.round(b/d)+"m":b>=l?Math.round(b/l)+"s":b+"ms"}function u(b){return c(b,h,"day")||c(b,f,"hour")||c(b,d,"minute")||c(b,l,"second")||b+" ms"}function c(b,_,E){if(!(b<_))return b<1.5*_?Math.floor(b/_)+" "+E:Math.ceil(b/_)+" "+E+"s"}var l=1e3,d=60*l,f=60*d,h=24*f,p=365.25*h;n.exports=function(b,_){_=_||{};var E=typeof b;if(E==="string"&&b.length>0)return s(b);if(E==="number"&&isNaN(b)===!1)return _.long?u(b):o(b);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(b))}},{}]},{},[1])(1)})}(bT)),bT.exports}const qs=t=>t!==null&&typeof t=="object"&&typeof t.pipe=="function";qs.writable=t=>qs(t)&&t.writable!==!1&&typeof t._write=="function"&&typeof t._writableState=="object";qs.readable=t=>qs(t)&&t.readable!==!1&&typeof t._read=="function"&&typeof t._readableState=="object";qs.duplex=t=>qs.writable(t)&&qs.readable(t);qs.transform=t=>qs.duplex(t)&&typeof t._transform=="function";var D7=qs,N7={exports:{}};(function(t){t.exports=e,t.exports.WEBSTREAM_SUPPORT=typeof ReadableStream<"u";function e(r){if(!t.exports.WEBSTREAM_SUPPORT)throw new Error("No web ReadableStream support");var n=!1,a={};function s(c){a.data=d,a.end=d,a.end=f,a.close=f,a.error=f;for(var l in a)r.on(l,a[l]);r.pause();function d(h){n||(c.enqueue(h),r.pause())}function f(h){if(!n){n=!0;for(var p in a)r.removeListener(p,a[p]);h?c.error(h):c.close()}}}function o(){n||r.resume()}function u(){n=!0;for(var c in a)r.removeListener(c,a[c]);r.push(null),r.pause(),r.destroy?r.destroy():r.close&&r.close()}return new ReadableStream({start:s,pull:o,cancel:u})}})(N7);var pce=N7.exports;Object.defineProperty(Nv,"__esModule",{value:!0});Nv.ActorHttp=void 0;const yce=et,bce=q0;globalThis.ReadableStream||(globalThis.ReadableStream=hce().ReadableStream);const _ce=D7,gce=pce;class mce extends yce.Actor{constructor(e){super(e)}static toNodeReadable(e){return _ce(e)||e===null?e:new bce.ReadableWebToNodeStream(e)}static toWebReadableStream(e){return gce(e)}static headersToHash(e){const r={};return e.forEach((n,a)=>{r[a]=n}),r}}Nv.ActorHttp=mce;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Nv,t)})(Zs);Object.defineProperty(Dv,"__esModule",{value:!0});Dv.validateHttpResponse=void 0;const vce=Zs,wce=wl;async function Sce(t,e){var r;if(e.status>=400){let n="empty response";if(e.body){const a=vce.ActorHttp.toNodeReadable(e.body);n=await wce(a)}throw new Error(`Could not update ${t} (HTTP status ${e.status}): +${n}`)}await((r=e.body)==null?void 0:r.cancel())}Dv.validateHttpResponse=Sce;var Jn={};Object.defineProperty(Jn,"__esModule",{value:!0});Jn.getContextDestinationUrl=Jn.getContextDestinationFirst=Jn.getContextDestination=Jn.getDataDestinationContext=Jn.getDataDestinationValue=Jn.getDataDestinationType=Jn.isDataDestinationRawType=void 0;const sO=rr;function C7(t){return typeof t=="string"||"remove"in t}Jn.isDataDestinationRawType=C7;function Tce(t){return typeof t=="string"?"":"remove"in t?"rdfjsStore":t.type}Jn.getDataDestinationType=Tce;function j7(t){return C7(t)?t:t.value}Jn.getDataDestinationValue=j7;function Ece(t,e){return typeof t=="string"||"remove"in t||!t.context?e:e.merge(t.context)}Jn.getDataDestinationContext=Ece;function Oce(t){return t.get(sO.KeysRdfUpdateQuads.destination)}Jn.getContextDestination=Oce;function Ace(t){if(t.has(sO.KeysRdfUpdateQuads.destination))return t.get(sO.KeysRdfUpdateQuads.destination)}Jn.getContextDestinationFirst=Ace;function Rce(t){if(t){let e=j7(t);if(typeof e=="string"){const r=e.indexOf("#");return r>=0&&(e=e.slice(0,r)),e}}}Jn.getContextDestinationUrl=Rce;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r($0,t),r($u,t),r(Dv,t),r(Jn,t)})(Cf);var Mv={};Object.defineProperty(Mv,"__esModule",{value:!0});Mv.RdfJsQuadDestination=void 0;const xce=ht,s4=nr,Ice=new xce.DataFactory;class Pce{constructor(e){this.store=e}promisifyEventEmitter(e){return new Promise((r,n)=>{e.on("end",r),e.on("error",n)})}delete(e){return this.promisifyEventEmitter(this.store.remove(e))}insert(e){return this.promisifyEventEmitter(this.store.import(e))}async deleteGraphs(e,r,n){switch(e){case"ALL":await this.promisifyEventEmitter(this.store.deleteGraph(Ice.defaultGraph()));case"NAMED":const a=this.store.match(),s={};a.on("data",o=>{o.graph.termType!=="DefaultGraph"&&(s[(0,s4.termToString)(o.graph)]=!0)}),await this.promisifyEventEmitter(a),await Promise.all(Object.keys(s).map(o=>this.promisifyEventEmitter(this.store.deleteGraph((0,s4.stringToTerm)(o)))));break;default:for(const o of Array.isArray(e)?e:[e])await this.promisifyEventEmitter(this.store.deleteGraph(o))}}async createGraphs(e,r){if(r)for(const n of e){const a=this.store.match(void 0,void 0,void 0,n);await new Promise((s,o)=>{a.once("data",()=>{o(new Error(`Unable to create graph ${n.value} as it already exists`))}),a.on("end",s),a.on("error",o)})}}}Mv.RdfJsQuadDestination=Pce;Object.defineProperty(Iv,"__esModule",{value:!0});Iv.ActorRdfUpdateQuadsRdfJsStore=void 0;const _T=Cf,Dce=Mv;class Nce extends _T.ActorRdfUpdateQuadsDestination{constructor(e){super(e)}async test(e){const r=(0,_T.getContextDestination)(e.context);if(!r||typeof r=="string"||!("remove"in r)&&"value"in r&&!r.value.remove)throw new Error(`${this.name} received an invalid rdfjsStore.`);return!0}async getDestination(e){const r=(0,_T.getContextDestination)(e);return new Dce.RdfJsQuadDestination("remove"in r?r:r.value)}}Iv.ActorRdfUpdateQuadsRdfJsStore=Nce;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Iv,t)})(g7);var M7={},Fv={};(function(t){(function(e){var r=typeof globalThis<"u"&&globalThis||typeof t<"u"&&t||typeof r<"u"&&r,n={searchParams:"URLSearchParams"in r,iterable:"Symbol"in r&&"iterator"in Symbol,blob:"FileReader"in r&&"Blob"in r&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in r,arrayBuffer:"ArrayBuffer"in r};function a(x){return x&&DataView.prototype.isPrototypeOf(x)}if(n.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],o=ArrayBuffer.isView||function(x){return x&&s.indexOf(Object.prototype.toString.call(x))>-1};function u(x){if(typeof x!="string"&&(x=String(x)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(x)||x==="")throw new TypeError('Invalid character in header field name: "'+x+'"');return x.toLowerCase()}function c(x){return typeof x!="string"&&(x=String(x)),x}function l(x){var F={next:function(){var X=x.shift();return{done:X===void 0,value:X}}};return n.iterable&&(F[Symbol.iterator]=function(){return F}),F}function d(x){this.map={},x instanceof d?x.forEach(function(F,X){this.append(X,F)},this):Array.isArray(x)?x.forEach(function(F){this.append(F[0],F[1])},this):x&&Object.getOwnPropertyNames(x).forEach(function(F){this.append(F,x[F])},this)}d.prototype.append=function(x,F){x=u(x),F=c(F);var X=this.map[x];this.map[x]=X?X+", "+F:F},d.prototype.delete=function(x){delete this.map[u(x)]},d.prototype.get=function(x){return x=u(x),this.has(x)?this.map[x]:null},d.prototype.has=function(x){return this.map.hasOwnProperty(u(x))},d.prototype.set=function(x,F){this.map[u(x)]=c(F)},d.prototype.forEach=function(x,F){for(var X in this.map)this.map.hasOwnProperty(X)&&x.call(F,this.map[X],X,this)},d.prototype.keys=function(){var x=[];return this.forEach(function(F,X){x.push(X)}),l(x)},d.prototype.values=function(){var x=[];return this.forEach(function(F){x.push(F)}),l(x)},d.prototype.entries=function(){var x=[];return this.forEach(function(F,X){x.push([X,F])}),l(x)},n.iterable&&(d.prototype[Symbol.iterator]=d.prototype.entries);function f(x){if(x.bodyUsed)return Promise.reject(new TypeError("Already read"));x.bodyUsed=!0}function h(x){return new Promise(function(F,X){x.onload=function(){F(x.result)},x.onerror=function(){X(x.error)}})}function p(x){var F=new FileReader,X=h(F);return F.readAsArrayBuffer(x),X}function b(x){var F=new FileReader,X=h(F);return F.readAsText(x),X}function _(x){for(var F=new Uint8Array(x),X=new Array(F.length),ne=0;ne-1?F:x}function T(x,F){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');F=F||{};var X=F.body;if(x instanceof T){if(x.bodyUsed)throw new TypeError("Already read");this.url=x.url,this.credentials=x.credentials,F.headers||(this.headers=new d(x.headers)),this.method=x.method,this.mode=x.mode,this.signal=x.signal,!X&&x._bodyInit!=null&&(X=x._bodyInit,x.bodyUsed=!0)}else this.url=String(x);if(this.credentials=F.credentials||this.credentials||"same-origin",(F.headers||!this.headers)&&(this.headers=new d(F.headers)),this.method=A(F.method||this.method||"GET"),this.mode=F.mode||this.mode||null,this.signal=F.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&X)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(X),(this.method==="GET"||this.method==="HEAD")&&(F.cache==="no-store"||F.cache==="no-cache")){var ne=/([?&])_=[^&]*/;if(ne.test(this.url))this.url=this.url.replace(ne,"$1_="+new Date().getTime());else{var $=/\?/;this.url+=($.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}T.prototype.clone=function(){return new T(this,{body:this._bodyInit})};function I(x){var F=new FormData;return x.trim().split("&").forEach(function(X){if(X){var ne=X.split("="),$=ne.shift().replace(/\+/g," "),j=ne.join("=").replace(/\+/g," ");F.append(decodeURIComponent($),decodeURIComponent(j))}}),F}function D(x){var F=new d,X=x.replace(/\r?\n[\t ]+/g," ");return X.split("\r").map(function(ne){return ne.indexOf(` `)===0?ne.substr(1,ne.length):ne}).forEach(function(ne){var $=ne.split(":"),j=$.shift().trim();if(j){var Q=$.join(":").trim();F.append(j,Q)}}),F}w.call(T.prototype);function U(x,F){if(!(this instanceof U))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');F||(F={}),this.type="default",this.status=F.status===void 0?200:F.status,this.ok=this.status>=200&&this.status<300,this.statusText=F.statusText===void 0?"":""+F.statusText,this.headers=new d(F.headers),this.url=F.url||"",this._initBody(x)}w.call(U.prototype),U.prototype.clone=function(){return new U(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new d(this.headers),url:this.url})},U.error=function(){var x=new U(null,{status:0,statusText:""});return x.type="error",x};var H=[301,302,303,307,308];U.redirect=function(x,F){if(H.indexOf(F)===-1)throw new RangeError("Invalid status code");return new U(null,{status:F,headers:{location:x}})},e.DOMException=r.DOMException;try{new e.DOMException}catch{e.DOMException=function(F,X){this.message=F,this.name=X;var ne=Error(F);this.stack=ne.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function N(x,F){return new Promise(function(X,ne){var $=new T(x,F);if($.signal&&$.signal.aborted)return ne(new e.DOMException("Aborted","AbortError"));var j=new XMLHttpRequest;function Q(){j.abort()}j.onload=function(){var ie={status:j.status,statusText:j.statusText,headers:D(j.getAllResponseHeaders()||"")};ie.url="responseURL"in j?j.responseURL:ie.headers.get("X-Request-URL");var be="response"in j?j.response:j.responseText;setTimeout(function(){X(new U(be,ie))},0)},j.onerror=function(){setTimeout(function(){ne(new TypeError("Network request failed"))},0)},j.ontimeout=function(){setTimeout(function(){ne(new TypeError("Network request failed"))},0)},j.onabort=function(){setTimeout(function(){ne(new e.DOMException("Aborted","AbortError"))},0)};function se(ie){try{return ie===""&&r.location.href?r.location.href:ie}catch{return ie}}j.open($.method,se($.url),!0),$.credentials==="include"?j.withCredentials=!0:$.credentials==="omit"&&(j.withCredentials=!1),"responseType"in j&&(n.blob?j.responseType="blob":n.arrayBuffer&&$.headers.get("Content-Type")&&$.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(j.responseType="arraybuffer")),F&&typeof F.headers=="object"&&!(F.headers instanceof d)?Object.getOwnPropertyNames(F.headers).forEach(function(ie){j.setRequestHeader(ie,c(F.headers[ie]))}):$.headers.forEach(function(ie,be){j.setRequestHeader(be,ie)}),$.signal&&($.signal.addEventListener("abort",Q),j.onreadystatechange=function(){j.readyState===4&&$.signal.removeEventListener("abort",Q)}),j.send(typeof $._bodyInit>"u"?null:$._bodyInit)})}return N.polyfill=!0,r.fetch||(r.fetch=N,r.Headers=d,r.Request=T,r.Response=U),e.Headers=d,e.Request=T,e.Response=U,e.fetch=N,e})({})})(typeof self<"u"?self:m);var Lv={};Object.defineProperty(Lv,"__esModule",{value:!0});Lv.FetchInitPreprocessor=void 0;const Cce=Zs;class jce{async handle(e){if(e.headers){const r=new Headers(e.headers);r.has("user-agent")&&r.delete("user-agent"),e.headers=r}if(e!=null&&e.headers&&"append"in e.headers&&(e.headers=Cce.ActorHttp.headersToHash(e.headers)),e.body&&typeof e.body!="string"&&"getReader"in e.body){const r=e.body.getReader(),n=[];for(;;){const{done:a,value:s}=await r.read();if(a)break;n.push(s)}e.body=n.join("")}return{keepalive:!e.body,...e}}async createAbortController(){return new AbortController}}Lv.FetchInitPreprocessor=jce;Object.defineProperty(Fv,"__esModule",{value:!0});Fv.ActorHttpFetch=void 0;const gT=Zs,ho=rr,Mce=Lv;class Mb extends gT.ActorHttp{constructor(e){super(e),this.userAgent=Mb.createUserAgent(),this.fetchInitPreprocessor=new Mce.FetchInitPreprocessor(e.agentOptions)}static createUserAgent(){return`Comunica/actor-http-fetch (${typeof globalThis.navigator>"u"?`Node.js ${process.version}; ${process.platform}`:`Browser-${globalThis.navigator.userAgent}`})`}async test(e){return{time:Number.POSITIVE_INFINITY}}static async getResponse(e,r,n,a,s,o){var l;let u,c=a+1;for(;c-- >0;)try{const d=await e(r,n);if(o&&d.status>=500&&d.status<600)throw new Error(`Server replied with response code ${d.status}: ${d.statusText}`);return d}catch(d){if(u=d,(l=n.signal)!=null&&l.aborted)throw d;c>0&&await new Promise((f,h)=>{var p;setTimeout(f,s),(p=n.signal)==null||p.addEventListener("abort",()=>{h(new Error("Fetch aborted by timeout."))})})}throw a>0?new Error(`Number of fetch retries (${a}) exceeded. Last error: ${String(u)}`):u}async run(e){var c,l,d,f,h,p,b,_;const r=((c=e.init)==null?void 0:c.headers)??{};e.init=e.init??{},e.init.headers=new Headers(r),e.init.headers.has("user-agent")||e.init.headers.append("user-agent",this.userAgent);const n=e.context.get(ho.KeysHttp.auth);n&&e.init.headers.append("Authorization",`Basic ${Buffer.from(n).toString("base64")}`),this.logInfo(e.context,`Requesting ${typeof e.input=="string"?e.input:e.input.url}`,()=>({headers:gT.ActorHttp.headersToHash(new Headers(e.init.headers)),method:e.init.method||"GET"})),(l=e.init)!=null&&l.headers&&"append"in e.init.headers&&e.context.has(ho.KeysHttp.fetch)&&(e.init.headers=gT.ActorHttp.headersToHash(e.init.headers));let a={...e.init};e.context.get(ho.KeysHttp.includeCredentials)&&(a.credentials="include");const s=(d=e.context)==null?void 0:d.get(ho.KeysHttp.httpTimeout);let o,u;if(s!==void 0){const E=await this.fetchInitPreprocessor.createAbortController();a.signal=E.signal,u=()=>E.abort(),o=setTimeout(()=>u(),s)}try{a=await this.fetchInitPreprocessor.handle(a);const E=((f=e.context)==null?void 0:f.get(ho.KeysHttp.httpRetryCount))??0,w=((h=e.context)==null?void 0:h.get(ho.KeysHttp.httpRetryDelay))??0,O=((p=e.context)==null?void 0:p.get(ho.KeysHttp.httpRetryOnServerError))??!1,A=(b=e.context)==null?void 0:b.get(ho.KeysHttp.fetch),T=await Mb.getResponse(A||fetch,e.input,a,E,w,O);return o!==void 0&&((((_=e.context)==null?void 0:_.get(ho.KeysHttp.httpBodyTimeout))||!1)&&T.body?(u=()=>{var D;return(D=T.body)==null?void 0:D.cancel(new Error(`HTTP timeout when reading the body of ${T.url}. This error can be disabled by modifying the 'httpBodyTimeout' and/or 'httpTimeout' options.`))},T.body.on("close",()=>{clearTimeout(o)})):clearTimeout(o)),T.body&&!T.body.cancel&&(T.body.cancel=async I=>{T.body.destroy(I),o!==void 0&&clearTimeout(o)}),T}catch(E){throw o!==void 0&&clearTimeout(o),E}}}Fv.ActorHttpFetch=Mb;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Fv,t)})(M7);var F7={},Bv={};Object.defineProperty(Bv,"__esModule",{value:!0});Bv.ActorQueryOperationValues=void 0;const Fce=$n,Lce=ct,Bce=Hi,$ce=Ut,Uce=ht,qce=new Fce.BindingsFactory,Vce=new Uce.DataFactory;class Hce extends Lce.ActorQueryOperationTyped{constructor(e){super(e,"values")}async testOperation(e,r){return!0}async runOperation(e,r){const n=new $ce.ArrayIterator(e.bindings.map(o=>qce.bindings(Object.entries(o).map(([u,c])=>[Vce.variable(u.slice(1)),c])))),a=e.variables;return{type:"bindings",bindingsStream:n,metadata:()=>Promise.resolve({state:new Bce.MetadataValidationState,cardinality:{type:"exact",value:e.bindings.length},canContainUndefs:e.bindings.some(o=>a.some(u=>!(`?${u.value}`in o))),variables:a})}}}Bv.ActorQueryOperationValues=Hce;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Bv,t)})(F7);var L7={},$v={};Object.defineProperty($v,"__esModule",{value:!0});$v.MediatorJoinCoefficientsFixed=void 0;const kce=rr,o4=et;class Qce extends o4.Mediator{constructor(e){super(e)}async mediateWith(e,r){var h;const n=[],a=r.map(({reply:p})=>p).map(p=>p.catch(b=>{n.push(b)})),s=await Promise.all(a);let o=s.map((p,b)=>{if(p)return p.iterations*this.cpuWeight+p.persistedItems*this.memoryWeight+p.blockingItems*this.timeWeight+p.requestTime*this.ioWeight});const u=Math.max(...o.filter(p=>p!==void 0)),c=e.context.get(kce.KeysQueryOperation.limitIndicator);c&&(o=o.map((p,b)=>p!==void 0&&s[b].persistedItems>0&&s[b].iterations>c?p+u:p));let l=-1,d=Number.POSITIVE_INFINITY;for(const[p,b]of o.entries())b!==void 0&&(l===-1||bp.message).join(` -`)}`);const f=r[l].actor;return f.includeInLogs&&((h=o4.Actor.getContextLogger(e.context))==null||h.debug(`Determined physical join operator '${f.logicalType}-${f.physicalName}'`,{entries:e.entries.length,variables:await Promise.all(e.entries.map(async p=>(await p.output.metadata()).variables.map(b=>b.value))),costs:Object.fromEntries(o.map((p,b)=>[`${r[b].actor.logicalType}-${r[b].actor.physicalName}`,p])),coefficients:Object.fromEntries(s.map((p,b)=>[`${r[b].actor.logicalType}-${r[b].actor.physicalName}`,p]))})),f}}$v.MediatorJoinCoefficientsFixed=Qce;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r($v,t)})(L7);var B7={},Uv={};Object.defineProperty(Uv,"__esModule",{value:!0});Uv.MediatorAll=void 0;const Gce=et;class zce extends Gce.Mediator{constructor(e){super(e)}async mediate(e){const r=[];let n;try{n=this.publish(e)}catch{n=[]}for(const s of n)try{await s.reply,r.push(s.actor)}catch{}return(await Promise.all(r.map(s=>s.runObservable(e))))[0]}async mediateWith(){throw new Error("Unsupported operation: MediatorAll#mediateWith")}}Uv.MediatorAll=zce;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Uv,t)})(B7);var q0={},V0={};Object.defineProperty(V0,"__esModule",{value:!0});V0.ActorHttpInvalidate=void 0;const Wce=et;class Xce extends Wce.Actor{constructor(e){super(e)}}V0.ActorHttpInvalidate=Xce;var qv={};Object.defineProperty(qv,"__esModule",{value:!0});qv.ActorHttpInvalidateListenable=void 0;const Kce=V0;class Jce extends Kce.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 r of this.invalidateListeners)r(e);return{}}}qv.ActorHttpInvalidateListenable=Jce;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(V0,t),r(qv,t)})(q0);var $7={},Vv={},fa={},Hv={};Object.defineProperty(Hv,"__esModule",{value:!0});Hv.ActorRdfJoin=void 0;const Yce=ct,u1=rr,Zce=et,ele=Hi,tle=ht,rle=nr,nle=new tle.DataFactory;class Au extends Zce.Actor{constructor(e,r){super(e),this.includeInLogs=!0,this.logicalType=r.logicalType,this.physicalName=r.physicalName,this.limitEntries=r.limitEntries??Number.POSITIVE_INFINITY,this.limitEntriesMin=r.limitEntriesMin??!1,this.canHandleUndefs=r.canHandleUndefs??!1}static hash(e,r){return r.filter(n=>e.has(n)).map(n=>(0,rle.termToString)(e.get(n))).join("")}static overlappingVariables(e){const r=e.map(a=>a.variables);let n=r[0];for(const a of r.slice(1))n=n.filter(s=>a.some(o=>o.value===s.value));return n}static joinVariables(e){return[...new Set(e.flatMap(r=>r.variables.map(n=>n.value)))].map(r=>nle.variable(r))}static joinBindings(...e){if(e.length===0)return null;if(e.length===1)return e[0];let r=e[0];for(const n of e.slice(1)){const a=r.merge(n);if(!a)return null;r=a}return r}static getCardinality(e){return e.cardinality}static async getMetadatas(e){return await Promise.all(e.map(r=>r.output.metadata()))}static async getEntriesWithMetadatas(e){const r=await Au.getMetadatas(e);return e.map((n,a)=>({...n,metadata:r[a]}))}static getRequestInitialTimes(e){return e.map(r=>r.pageSize?0:r.requestTime||0)}static getRequestItemTimes(e){return e.map(r=>r.pageSize?(r.requestTime||0)/r.pageSize:0)}async constructResultMetadata(e,r,n,a={}){let s;a.cardinality?s=a.cardinality:(s=r.reduce((c,l)=>{const d=Au.getCardinality(l);return{type:d.type==="estimate"?"estimate":c.type,value:c.value*d.value}},{type:"exact",value:1}),s.value*=(await this.mediatorJoinSelectivity.mediate({entries:e,context:n})).selectivity);const o=new ele.MetadataValidationState,u=()=>o.invalidate();for(const c of r)c.state.addInvalidateListener(u);return{state:o,...a,cardinality:{type:s.type,value:s.value},canContainUndefs:a.canContainUndefs??r.some(c=>c.canContainUndefs),variables:Au.joinVariables(r)}}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 n of e.entries)if(n.output.type!=="bindings")throw new Error(`Invalid type of a join entry: Expected 'bindings' but got '${n.output.type}'`);const r=await Au.getMetadatas(e.entries);if(!this.canHandleUndefs){for(const n of r)if(n.canContainUndefs)throw new Error(`Actor ${this.name} can not join streams containing undefs`)}return await this.getJoinCoefficients(e,r)}async run(e){let r;e.context.has(u1.KeysInitQuery.physicalQueryPlanLogger)&&(r=e.context.get(u1.KeysInitQuery.physicalQueryPlanNode),e.context=e.context.set(u1.KeysInitQuery.physicalQueryPlanNode,e));const n=e.context.get(u1.KeysInitQuery.physicalQueryPlanLogger);let a;this.includeInLogs&&n&&(a={},n.logOperation(`join-${this.logicalType}`,this.physicalName,e,r,this.name,a));const{result:s,physicalPlanMetadata:o}=await this.getOutput(e),u=await Au.getMetadatas(e.entries);return a&&(Object.assign(a,o),a.cardinalities=u.map(Au.getCardinality),a.joinCoefficients=await this.getJoinCoefficients(e,u)),s.metadata=Yce.ActorQueryOperation.cachifyMetadata(s.metadata),s}}Hv.ActorRdfJoin=Au;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Hv,t)})(fa);Object.defineProperty(Vv,"__esModule",{value:!0});Vv.ActorRdfJoinNone=void 0;const ile=$n,ale=fa,sle=Hi,ole=Ut,ule=new ile.BindingsFactory;class cle extends ale.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){return{result:{bindingsStream:new ole.ArrayIterator([ule.bindings()],{autoStart:!1}),metadata:()=>Promise.resolve({state:new sle.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}async getJoinCoefficients(){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}Vv.ActorRdfJoinNone=cle;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Vv,t)})($7);var U7={},kv={};Object.defineProperty(kv,"__esModule",{value:!0});kv.ActorRdfJoinSingle=void 0;const lle=fa;class dle extends lle.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"single",limitEntries:1}),this.includeInLogs=!1}async test(e){if(e.entries.length!==1)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}}}kv.ActorRdfJoinSingle=dle;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(kv,t)})(U7);var q7={},Qv={};Object.defineProperty(Qv,"__esModule",{value:!0});Qv.ActorRdfJoinMultiEmpty=void 0;const rh=fa,fle=Hi,hle=Ut;class ple extends rh.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-empty",canHandleUndefs:!0})}async test(e){if((await rh.ActorRdfJoin.getMetadatas(e.entries)).every(r=>rh.ActorRdfJoin.getCardinality(r).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 r of e.entries)r.output.bindingsStream.close();return{result:{bindingsStream:new hle.ArrayIterator([],{autoStart:!1}),metadata:async()=>({state:new fle.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:rh.ActorRdfJoin.joinVariables(await rh.ActorRdfJoin.getMetadatas(e.entries))}),type:"bindings"}}}async getJoinCoefficients(e,r){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}Qv.ActorRdfJoinMultiEmpty=ple;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Qv,t)})(q7);var V7={},Gv={};let H7=Ut,yle=H7.MultiTransformIterator,ble=H7.SimpleTransformIterator,_le=class extends yle{constructor(e,r,n,a){super(e,a),this.funRight=r,this.funJoin=n}_createTransformer(e){return new ble(this.funRight(e),{transform:(r,n,a)=>{let s=this.funJoin(e,r);s!==null&&a(s),n()}})}};var gle=_le;let mle=Ut.AsyncIterator,vle=class extends mle{constructor(e,r,n,a){super(),this.addedDataListener=!1,this.left=e,this.right=r,this.funHash=n,this.funJoin=a,this.leftMap=new Map,this.match=null,this.matches=[],this.matchIdx=0,this.left.on("error",o=>this.destroy(o)),this.right.on("error",o=>this.destroy(o)),this.readable=!1,this.left.on("end",s.bind(this));function s(){if(this.leftMap.size<=0)return this.close();this.readable=!0,this.right.on("readable",()=>this.readable=!0),this.right.on("end",()=>{this.hasResults()||this._end()})}this.on("newListener",o=>{o==="data"&&!this.addedDataListener&&(this.addedDataListener=!0,this._addDataListener())})}hasResults(){return!this.right.ended||this.matchIdxthis.right.close())}_end(){super._end(),Ele(()=>this.right.destroy())}_createTransformer(e){return new Tle(this.right.clone(),{transform:(r,n,a)=>{let s=this.funJoin(e,r);s!==null&&a(s),n()}})}};var Ale=Ole;let Rle=Ut.AsyncIterator,xle=class extends Rle{constructor(e,r,n,a){super(),this.left=e,this.right=r,this.funHash=n,this.funJoin=a,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",s=>this.destroy(s)),this.right.on("error",s=>this.destroy(s)),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.matchIdxthis.emit("readable")),r.on("end",()=>this._removeStream(r));this.streams.length===0&&this.close(),this.idx=this.streams.length-1}_removeStream(e){let r=this.streams.indexOf(e);r<0||(this.streams.splice(r,1),this.idx>=this.streams.length&&--this.idx,this.streams.length===0&&this._end())}close(){super.close();for(let e of this.streams)e.close()}read(){for(let e=0;ewc.ActorRdfJoin.hash(s,n),wc.ActorRdfJoin.joinBindings),metadata:async()=>await this.constructResultMetadata(e.entries,r,e.context)}}}async getJoinCoefficients(e,r){const n=wc.ActorRdfJoin.getRequestInitialTimes(r),a=wc.ActorRdfJoin.getRequestItemTimes(r);return{iterations:r[0].cardinality.value+r[1].cardinality.value,persistedItems:r[0].cardinality.value,blockingItems:r[0].cardinality.value,requestTime:n[0]+r[0].cardinality.value*a[0]+n[1]+r[1].cardinality.value*a[1]}}}Gv.ActorRdfJoinHash=$le;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Gv,t)})(V7);var k7={},Wv={};Object.defineProperty(Wv,"__esModule",{value:!0});Wv.ActorRdfJoinSymmetricHash=void 0;const Xl=fa,Ule=zv;class kR extends Xl.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"symmetric-hash",limitEntries:2})}async getOutput(e){const r=await Xl.ActorRdfJoin.getMetadatas(e.entries),n=Xl.ActorRdfJoin.overlappingVariables(r);return{result:{type:"bindings",bindingsStream:new Ule.SymmetricHashJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,s=>kR.hash(s,n),Xl.ActorRdfJoin.joinBindings),metadata:async()=>await this.constructResultMetadata(e.entries,r,e.context)}}}async getJoinCoefficients(e,r){const n=Xl.ActorRdfJoin.getRequestInitialTimes(r),a=Xl.ActorRdfJoin.getRequestItemTimes(r);return{iterations:r[0].cardinality.value+r[1].cardinality.value,persistedItems:r[0].cardinality.value+r[1].cardinality.value,blockingItems:0,requestTime:n[0]+r[0].cardinality.value*a[0]+n[1]+r[1].cardinality.value*a[1]}}}Wv.ActorRdfJoinSymmetricHash=kR;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Wv,t)})(k7);var Q7={},Xv={};Object.defineProperty(Xv,"__esModule",{value:!0});Xv.ActorRdfJoinNestedLoop=void 0;const nh=fa,qle=zv;class Vle extends nh.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"nested-loop",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){return{result:{type:"bindings",bindingsStream:new qle.NestedLoopJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,nh.ActorRdfJoin.joinBindings,{autoStart:!1}),metadata:async()=>await this.constructResultMetadata(e.entries,await nh.ActorRdfJoin.getMetadatas(e.entries),e.context)}}}async getJoinCoefficients(e,r){const n=nh.ActorRdfJoin.getRequestInitialTimes(r),a=nh.ActorRdfJoin.getRequestItemTimes(r);return{iterations:r[0].cardinality.value*r[1].cardinality.value,persistedItems:0,blockingItems:0,requestTime:n[0]+r[0].cardinality.value*a[0]+n[1]+r[1].cardinality.value*a[1]}}}Xv.ActorRdfJoinNestedLoop=Vle;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Xv,t)})(Q7);var G7={},Kv={};Object.defineProperty(Kv,"__esModule",{value:!0});Kv.ActorRdfJoinMinusHash=void 0;const Hle=ct,Sc=fa;class kle extends Sc.ActorRdfJoin{constructor(e){super(e,{logicalType:"minus",physicalName:"hash",limitEntries:2})}async getOutput(e){const r=e.entries[1].output,n=e.entries[0].output,a=await Sc.ActorRdfJoin.getMetadatas(e.entries),s=Sc.ActorRdfJoin.overlappingVariables(a);if(s.length>0){const o={};return{result:{type:"bindings",bindingsStream:new Hle.ClosableTransformIterator(async()=>(await new Promise(c=>{r.bindingsStream.on("data",l=>{o[Sc.ActorRdfJoin.hash(l,s)]=!0}),r.bindingsStream.on("end",c)}),n.bindingsStream.filter(c=>!o[Sc.ActorRdfJoin.hash(c,s)])),{autoStart:!1,onClose(){r.bindingsStream.destroy(),n.bindingsStream.destroy()}}),metadata:n.metadata}}}return r.bindingsStream.destroy(),{result:n}}async getJoinCoefficients(e,r){const n=Sc.ActorRdfJoin.getRequestInitialTimes(r),a=Sc.ActorRdfJoin.getRequestItemTimes(r);return{iterations:r[0].cardinality.value+r[1].cardinality.value,persistedItems:r[0].cardinality.value,blockingItems:r[0].cardinality.value,requestTime:n[0]+r[0].cardinality.value*a[0]+n[1]+r[1].cardinality.value*a[1]}}}Kv.ActorRdfJoinMinusHash=kle;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Kv,t)})(G7);var z7={},Jv={},Yv={};Object.defineProperty(Yv,"__esModule",{value:!0});Yv.BindingsIndex=void 0;const Qle=nr;class Fb{constructor(e){this.data={},this.keys=e}static hashTerm(e){return e&&e.termType!=="Variable"?(0,Qle.termToString)(e):""}add(e){if(this.isBindingsValid(e)){let r=this.data;for(const n of this.keys){const a=Fb.hashTerm(e.get(n));let s=r[a];s||(s=r[a]={}),r=s}}}contains(e){return this.isBindingsValid(e)?this.containsRecursive(e,this.keys,[this.data]):!1}isBindingsValid(e){let r=!1;for(const n of this.keys)if(e.get(n)){r=!0;break}return r}containsRecursive(e,r,n){if(r.length===0)return!0;let a;[a,...r]=r;for(const s of n){const o=Fb.hashTerm(e.get(a));if(o){const u=[s[o],s[""]].filter(Boolean);if(u.length===0)continue;if(this.containsRecursive(e,r,u))return!0}else{let u=Object.keys(s).map(c=>s[c]);if(u.length===0&&(u=[{}]),this.containsRecursive(e,r,u))return!0}}return!1}}Yv.BindingsIndex=Fb;Object.defineProperty(Jv,"__esModule",{value:!0});Jv.ActorRdfJoinMinusHashUndef=void 0;const Gle=ct,ih=fa,zle=Yv;class Wle extends ih.ActorRdfJoin{constructor(e){super(e,{logicalType:"minus",physicalName:"hash-undef",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){const r=e.entries[1].output,n=e.entries[0].output,a=await ih.ActorRdfJoin.getMetadatas(e.entries),s=ih.ActorRdfJoin.overlappingVariables(a);if(s.length>0){const o=new zle.BindingsIndex(s);return{result:{type:"bindings",bindingsStream:new Gle.ClosableTransformIterator(async()=>(await new Promise(c=>{r.bindingsStream.on("data",l=>o.add(l)),r.bindingsStream.on("end",c)}),n.bindingsStream.filter(c=>!o.contains(c))),{autoStart:!1,onClose(){r.bindingsStream.destroy(),n.bindingsStream.destroy()}}),async metadata(){const c=await n.metadata(),l=await n.metadata();return{...l,canContainUndefs:c.canContainUndefs||l.canContainUndefs}}}}}return r.bindingsStream.destroy(),{result:n}}async getJoinCoefficients(e,r){const n=ih.ActorRdfJoin.getRequestInitialTimes(r),a=ih.ActorRdfJoin.getRequestItemTimes(r);return{iterations:(r[0].cardinality.value+r[1].cardinality.value)*1.01,persistedItems:r[0].cardinality.value,blockingItems:r[0].cardinality.value,requestTime:n[0]+r[0].cardinality.value*a[0]+n[1]+r[1].cardinality.value*a[1]}}}Jv.ActorRdfJoinMinusHashUndef=Wle;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Jv,t)})(z7);var W7={},Zv={};Object.defineProperty(Zv,"__esModule",{value:!0});Zv.ActorRdfJoinOptionalNestedLoop=void 0;const ah=fa,Xle=zv;class Kle extends ah.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:"nested-loop",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){return{result:{type:"bindings",bindingsStream:new Xle.NestedLoopJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,ah.ActorRdfJoin.joinBindings,{optional:!0,autoStart:!1}),metadata:async()=>await this.constructResultMetadata(e.entries,await ah.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0})}}}async getJoinCoefficients(e,r){const n=ah.ActorRdfJoin.getRequestInitialTimes(r),a=ah.ActorRdfJoin.getRequestItemTimes(r);return{iterations:r[0].cardinality.value*r[1].cardinality.value,persistedItems:0,blockingItems:0,requestTime:n[0]+r[0].cardinality.value*a[0]+n[1]+r[1].cardinality.value*a[1]}}}Zv.ActorRdfJoinOptionalNestedLoop=Kle;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Zv,t)})(W7);var X7={},e2={},t2={};Object.defineProperty(t2,"__esModule",{value:!0});t2.RdfSourceQpf=void 0;const c1=Ut,Jle=ht,K7=nr,l1=An,Tc=new Jle.DataFactory;class Yle{constructor(e,r,n,a,s,o,u,c,l,d,f){this.mediatorMetadata=e,this.mediatorMetadataExtract=r,this.mediatorDereferenceRdf=n,this.subjectUri=a,this.predicateUri=s,this.objectUri=o,this.graphUri=u,this.url=c,this.context=d,this.cachedQuads={};const h=this.getSearchForm(l);if(!h)throw new Error("Illegal state: found no TPF/QPF search form anymore in metadata.");if(this.searchForm=h,this.defaultGraph=l.defaultGraph?Tc.namedNode(l.defaultGraph):void 0,f){let p=(0,c1.wrap)(f);this.defaultGraph&&(p=this.reverseMapQuadsToDefaultGraph(p)),p.setProperty("metadata",l),this.cacheQuads(p,Tc.variable(""),Tc.variable(""),Tc.variable(""),Tc.variable(""))}}getSearchForm(e){if(!e.searchForms||!e.searchForms.values)return;const{searchForms:r}=e;for(const n of r.values)if(this.graphUri&&this.subjectUri in n.mappings&&this.predicateUri in n.mappings&&this.objectUri in n.mappings&&this.graphUri in n.mappings&&Object.keys(n.mappings).length===4||this.subjectUri in n.mappings&&this.predicateUri in n.mappings&&this.objectUri in n.mappings&&Object.keys(n.mappings).length===3)return n}createFragmentUri(e,r,n,a,s){const o={},u=[{uri:this.subjectUri,term:r},{uri:this.predicateUri,term:n},{uri:this.objectUri,term:a},{uri:this.graphUri,term:s}];for(const c of u)c.uri&&c.term.termType!=="Variable"&&(c.term.termType!=="Quad"||(0,l1.everyTermsNested)(c.term,l=>l.termType!=="Variable"))&&(o[c.uri]=(0,K7.termToString)(c.term));return e.getUri(o)}match(e,r,n,a){let s=!1;if(a.termType==="DefaultGraph"){if(this.defaultGraph)s=!0,a=this.defaultGraph;else if(Object.keys(this.searchForm.mappings).length===4&&!this.defaultGraph){const c=new c1.ArrayIterator([],{autoStart:!1});return c.setProperty("metadata",{requestTime:0,cardinality:{type:"exact",value:0},first:null,next:null,last:null,canContainUndefs:!1}),c}}const o=this.getCachedQuads(e,r,n,a);if(o)return o;const u=new c1.TransformIterator(async()=>{var b;let c=this.createFragmentUri(this.searchForm,e,r,n,a);const l=await this.mediatorDereferenceRdf.mediate({context:this.context,url:c});c=l.url;const d=await this.mediatorMetadata.mediate({context:this.context,url:c,quads:l.data,triples:(b=l.metadata)==null?void 0:b.triples}),f=this.mediatorMetadataExtract.mediate({context:this.context,url:c,metadata:d.metadata,requestTime:l.requestTime}).then(({metadata:_})=>u.setProperty("metadata",{..._,canContainUndefs:!1,subsetOf:this.url})),h=Tc.defaultGraph();let p=(0,c1.wrap)(d.data).transform({filter(_){return(0,l1.matchPattern)(_,e,r,n,a)?!0:s&&(0,l1.matchPattern)(_,e,r,n,h)}});return(s||a.termType==="Variable")&&(p=this.reverseMapQuadsToDefaultGraph(p)),p.on("error",()=>{}),await f,p},{autoStart:!1});return this.cacheQuads(u,e,r,n,a),this.getCachedQuads(e,r,n,a)}reverseMapQuadsToDefaultGraph(e){const r=Tc.defaultGraph();return e.map(n=>(0,l1.mapTerms)(n,(a,s)=>s==="graph"&&a.equals(this.defaultGraph)?r:a))}getPatternId(e,r,n,a){return JSON.stringify({s:e.termType==="Variable"?"":d1(e),p:r.termType==="Variable"?"":d1(r),o:n.termType==="Variable"?"":d1(n),g:a.termType==="Variable"?"":d1(a)})}cacheQuads(e,r,n,a,s){const o=this.getPatternId(r,n,a,s);this.cachedQuads[o]=e.clone()}getCachedQuads(e,r,n,a){const s=this.getPatternId(e,r,n,a),o=this.cachedQuads[s];if(o)return o.clone()}}t2.RdfSourceQpf=Yle;function d1(t){return t.termType==="DefaultGraph"?"|":(0,K7.termToString)(t)}Object.defineProperty(e2,"__esModule",{value:!0});e2.ActorRdfResolveHypermediaQpf=void 0;const Zle=tv,ede=t2;class tde extends Zle.ActorRdfResolveHypermedia{constructor(e){super(e,"qpf")}async testMetadata(e){const{searchForm:r}=this.createSource(e.url,e.metadata,e.context);if(e.handledDatasets&&e.handledDatasets[r.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 r=this.createSource(e.url,e.metadata,e.context,e.quads);return{source:r,dataset:r.searchForm.dataset}}createSource(e,r,n,a){return new ede.RdfSourceQpf(this.mediatorMetadata,this.mediatorMetadataExtract,this.mediatorDereferenceRdf,this.subjectUri,this.predicateUri,this.objectUri,this.graphUri,e,r,n,a)}}e2.ActorRdfResolveHypermediaQpf=tde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(e2,t)})(X7);var J7={},r2={},Y7={},n2={};Object.defineProperty(n2,"__esModule",{value:!0});n2.ActorDereferenceRdf=void 0;const rde=nm;class nde extends rde.ActorDereferenceParse{constructor(e){super(e)}}n2.ActorDereferenceRdf=nde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(n2,t)})(Y7);Object.defineProperty(r2,"__esModule",{value:!0});r2.ActorDereferenceRdfParse=void 0;const ide=Y7;class ade extends ide.ActorDereferenceRdf{constructor(e){super(e)}async getMetadata(e){return{baseIRI:e.url}}}r2.ActorDereferenceRdfParse=ade;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(r2,t)})(J7);var Z7={},i2={},a2={};Object.defineProperty(a2,"__esModule",{value:!0});a2.HtmlScriptListener=void 0;const u4=rr,sde=kt,ode=Ra;class pd{constructor(e,r,n,a,s,o,u,c){this.textChunksJsonLd=[],this.endBarrier=1,this.passedScripts=0,this.isFinalJsonLdProcessing=!1,this.mediatorRdfParseHandle=e,this.cbQuad=r,this.cbError=n,this.cbEnd=a,this.supportedTypes=s,this.context=o.set(u4.KeysRdfParseHtmlScript.processingHtmlScript,!0),this.baseIRI=u,this.headers=c,this.onlyFirstScript=o.get(u4.KeysRdfParseHtmlScript.extractAllScripts)===!1;const l=this.baseIRI.indexOf("#");this.targetScriptId=l>0?this.baseIRI.slice(l+1,this.baseIRI.length):null}static newErrorCoded(e,r){const n=new Error(e);return n.code=r,n}onEnd(){--this.endBarrier===0&&(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()):(this.passedScripts===0&&this.targetScriptId&&this.cbError(pd.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 sde.Readable({objectMode:!0});e._read=()=>{};const r=this.textChunks,n={context:this.context,handle:{metadata:{baseIRI:this.baseIRI},data:e,headers:this.headers,context:this.context},handleMediaType:this.handleMediaType};this.mediatorRdfParseHandle.mediate(n).then(({handle:a})=>{a.data.on("error",s=>this.cbError(pd.newErrorCoded(s.message,"invalid script element"))).on("data",this.cbQuad).on("end",()=>this.onEnd());for(const s of r)e.push(s);e.push(null)}).catch(a=>{this.targetScriptId?this.cbError(pd.newErrorCoded(a.message,"loading document failed")):this.onEnd()}),this.handleMediaType=void 0,this.textChunks=void 0}}onTagOpen(e,r){e==="base"&&r.href&&(this.baseIRI=(0,ode.resolve)(r.href,this.baseIRI)),e==="script"&&(!this.targetScriptId||r.id===this.targetScriptId)?this.supportedTypes[r.type]?this.onlyFirstScript&&this.passedScripts>0?this.handleMediaType=void 0:(this.passedScripts++,this.handleMediaType=r.type,this.endBarrier++,this.requiresCustomJsonLdHandling(this.handleMediaType)?(this.textChunks=this.textChunksJsonLd,this.textChunks.push(this.textChunks.length===0?"[":",")):this.textChunks=[]):this.targetScriptId&&this.cbError(pd.newErrorCoded(`Targeted script "${this.targetScriptId}" does not have a supported type`,"loading document failed")):this.handleMediaType=void 0}onText(e){this.handleMediaType&&this.textChunks.push(e)}requiresCustomJsonLdHandling(e){return!this.onlyFirstScript&&!this.targetScriptId&&e==="application/ld+json"}}a2.HtmlScriptListener=pd;Object.defineProperty(i2,"__esModule",{value:!0});i2.ActorRdfParseHtmlScript=void 0;const ude=Qm,cde=a2;class lde extends ude.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const r=(await this.mediatorRdfParseMediatypes.mediate({context:e.context,mediaTypes:!0})).mediaTypes;return{htmlParseListener:new cde.HtmlScriptListener(this.mediatorRdfParseHandle,e.emit,e.error,e.end,r,e.context,e.baseIRI,e.headers)}}}i2.ActorRdfParseHtmlScript=lde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(i2,t)})(Z7);var eL={},s2={};Object.defineProperty(s2,"__esModule",{value:!0});s2.ActorQueryResultSerializeRdf=void 0;const dde=ls;class fde extends dde.ActorQueryResultSerialize{constructor(e){super(e)}async testHandle(e,r,n){if(e.type!=="quads")throw new Error(`Actor ${this.name} can only handle quad streams`);const{mediaTypes:a}=await this.mediatorMediaTypeCombiner.mediate({context:n,mediaTypes:!0});if(!(r in a))throw new Error(`Actor ${this.name} can not handle media type ${r}. All available types: ${Object.keys(a)}`);return!0}async runHandle(e,r,n){return(await this.mediatorRdfSerialize.mediate({context:n,handle:{context:n,quadStream:e.quadStream},handleMediaType:r})).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}}s2.ActorQueryResultSerializeRdf=fde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s2,t)})(eL);var tL={},o2={};Object.defineProperty(o2,"__esModule",{value:!0});o2.ActorHttpWayback=void 0;const c4=Zs,eb=rr,hde=wl,pde="http://wayback.archive-it.org/";function l4(t){const e=new Request(t.input,t.init);return{input:new Request(new URL(`/${e.url}`,pde),e)}}function yde(t){const e=t.get(eb.KeysHttpProxy.httpProxyHandler);return e?r=>e.getProxy(l4(r)):r=>Promise.resolve(l4(r))}class bde extends c4.ActorHttp{constructor(e){super(e)}async test(e){return!0}async run(e){let r=await this.mediatorHttp.mediate(e);if(r.status===404&&e.context.get(eb.KeysHttpWayback.recoverBrokenLinks)){let n=await this.mediatorHttp.mediate({...e,context:e.context.set(eb.KeysHttpWayback.recoverBrokenLinks,!1).set(eb.KeysHttpProxy.httpProxyHandler,{getProxy:yde(e.context)})});n.status===200&&([r,n]=[n,r]);const{body:a}=n;a&&("destroy"in a&&typeof a.destroy=="function"?a.destroy():await hde(c4.ActorHttp.toNodeReadable(n.body)))}return r}}o2.ActorHttpWayback=bde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(o2,t)})(tL);var rL={},u2={},nL={},sh={},c2={},oh={},uh={},l2={};Object.defineProperty(l2,"__esModule",{value:!0});l2.ContainerHandlerIdentifier=void 0;class _de{canCombineWithGraph(){return!0}async handle(e,r,n,a,s,o){let u;if(r.emittedStack[o+1]&&r.idStack[o+1])u=r.idStack[o+1][0];else{const d=await n.getContainerKey(a[o],a,o)!==null?await n.resourceToTerm(await r.getContext(a),a[o]):n.dataFactory.blankNode();if(!d){r.emittedStack[o]=!1;return}u=d,r.idStack[o+1]=[u]}let c=r.idStack[o];c||(c=r.idStack[o]=[]),c.some(l=>l.equals(u))||c.push(u),await r.handlePendingContainerFlushBuffers()||(r.emittedStack[o]=!1)}}l2.ContainerHandlerIdentifier=_de;var ch={},lh={},d4;function d2(){if(d4)return lh;d4=1,Object.defineProperty(lh,"__esModule",{value:!0}),lh.EntryHandlerPredicate=void 0;const t=hn,e=Ol();let r=class iL{static async handlePredicateObject(a,s,o,u,c,l,d,f,h){const p=await s.getPropertiesDepth(o,u),b=await s.getDepthOffsetGraph(u,o),_=u-b,E=a.idStack[p];if(E&&!h)for(const w of E)if(b>=0){const A=a.idStack[_-1];if(A)for(const T of A)s.emitQuadChecked(u,w,c,l,T,d,f);else d?(s.validateReverseSubject(l),a.getUnidentifiedGraphBufferSafe(_-1).push({subject:l,predicate:c,object:w,isEmbedded:f})):a.getUnidentifiedGraphBufferSafe(_-1).push({subject:w,predicate:c,object:l,isEmbedded:f})}else{const A=await s.getGraphContainerValue(o,p);s.emitQuadChecked(u,w,c,l,A,d,f)}else if(d&&s.validateReverseSubject(l),h){if(a.rdfstar){a.idStack[u]&&a.emitError(new t.ErrorCoded(`Found an illegal @id inside an annotation: ${a.idStack[u][0].value}`,t.ERROR_CODES.INVALID_ANNOTATION));for(let A=0;A=0;A--){const T=w[A];T.depth>p&&(O.nestedAnnotations.push(T),w.splice(A,1))}}}else a.getUnidentifiedValueBufferSafe(p).push({predicate:c,object:l,reverse:d,isEmbedded:f})}isPropertyHandler(){return!0}isStackProcessor(){return!0}async validate(a,s,o,u,c){const l=o[u];if(l){const d=await a.getContext(o);if(!a.jsonLiteralStack[u]&&await s.predicateToTerm(d,o[u]))return e.Util.getContextValueType(d,l)==="@json"&&(a.jsonLiteralStack[u+1]=!0),!0}return!1}async test(a,s,o,u,c){return u[c]}async handle(a,s,o,u,c,l,d){const f=u[l],h=await a.getContext(u),p=await s.predicateToTerm(h,o);if(p){const b=await s.valueToTerm(h,o,c,l,u);if(b.length)for(let _ of b){let E=await s.unaliasKeywordParent(u,l);const w=e.Util.isPropertyReverse(h,f,E);let O=0;for(;E==="@reverse"||typeof E=="number";)typeof E=="number"?O++:l--,E=await s.unaliasKeywordParent(u,l-O);const A=e.Util.isPropertyInEmbeddedNode(E);s.validateReverseInEmbeddedNode(o,w,A);const T=e.Util.isPropertyInAnnotationObject(E);if(c){const I="@list"in e.Util.getContextValueContainer(h,o);if(I||c["@list"]){if((I&&!Array.isArray(c)&&!c["@list"]||c["@list"]&&!Array.isArray(c["@list"]))&&_!==s.rdfNil){const D=s.dataFactory.blankNode();a.emitQuad(l,s.dataFactory.quad(D,s.rdfRest,s.rdfNil,s.getDefaultGraph())),a.emitQuad(l,s.dataFactory.quad(D,s.rdfFirst,_,s.getDefaultGraph())),_=D}if(w&&!a.allowSubjectList)throw new t.ErrorCoded(`Found illegal list value in subject position at ${o}`,t.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}}await iL.handlePredicateObject(a,s,u,l,p,_,w,A,T)}}}};return lh.EntryHandlerPredicate=r,lh}var f4;function gde(){if(f4)return ch;f4=1,Object.defineProperty(ch,"__esModule",{value:!0}),ch.ContainerHandlerIndex=void 0;const t=hn,e=d2(),r=Ol();let n=class{canCombineWithGraph(){return!0}async handle(s,o,u,c,l,d){if(!Array.isArray(l)){const f="@graph"in s,h=await o.getContext(c),p=c[d-1],b=r.Util.getContextValueIndex(h,p);if(b){if(t.Util.isPotentialKeyword(b))throw new t.ErrorCoded(`Keywords can not be used as @index value, got: ${b}`,t.ERROR_CODES.INVALID_TERM_DEFINITION);if(typeof b!="string")throw new t.ErrorCoded(`@index values must be strings, got: ${b}`,t.ERROR_CODES.INVALID_TERM_DEFINITION);if(typeof l!="object"){if(r.Util.getContextValueType(h,p)!=="@id")throw new t.ErrorCoded(`Property-based index containers require nodes as values or strings with @type: @id, but got: ${l}`,t.ERROR_CODES.INVALID_VALUE_OBJECT);const w=u.resourceToTerm(h,l);w&&(o.idStack[d+1]=[w])}const E=u.createVocabOrBaseTerm(h,b);if(E){const w=await u.valueToTerm(h,b,await u.getContainerKey(c[d],c,d),d,c);if(f){const O=await u.getGraphContainerValue(c,d+1);for(const A of w)o.emitQuad(d,u.dataFactory.quad(O,E,A,u.getDefaultGraph()))}else for(const O of w)await e.EntryHandlerPredicate.handlePredicateObject(o,u,c,d+1,E,O,!1,!1,!1)}}const _=f?2:1;await o.newOnValueJob(c.slice(0,c.length-_),l,d-_,!0),await o.handlePendingContainerFlushBuffers()}o.emittedStack[d]=!1}};return ch.ContainerHandlerIndex=n,ch}var f2={};Object.defineProperty(f2,"__esModule",{value:!0});f2.ContainerHandlerLanguage=void 0;const h4=hn;class mde{canCombineWithGraph(){return!1}async handle(e,r,n,a,s,o){const u=await n.getContainerKey(a[o],a,o);if(Array.isArray(s))s=s.map(c=>({"@value":c,"@language":u}));else{if(typeof s!="string")throw new h4.ErrorCoded(`Got invalid language map value, got '${JSON.stringify(s)}', but expected string`,h4.ERROR_CODES.INVALID_LANGUAGE_MAP_VALUE);s={"@value":s,"@language":u}}await r.newOnValueJob(a.slice(0,a.length-1),s,o-1,!0),r.emittedStack[o]=!1}}f2.ContainerHandlerLanguage=mde;var dh={},p4;function vde(){if(p4)return dh;p4=1,Object.defineProperty(dh,"__esModule",{value:!0}),dh.ContainerHandlerType=void 0;const t=d2(),e=Ol();let r=class{canCombineWithGraph(){return!1}async handle(a,s,o,u,c,l){if(!Array.isArray(c)){if(typeof c=="string"){const h=await s.getContext(u),b=e.Util.getContextValueType(h,u[l-1])==="@vocab"?await o.createVocabOrBaseTerm(h,c):await o.resourceToTerm(h,c);if(b){const _={"@id":b.termType==="NamedNode"?b.value:c};await s.newOnValueJob(u.slice(0,u.length-1),_,l-1,!0),s.idStack[l+1]=[b]}}else{const h=!!s.idStack[l+1];h||delete s.idStack[l],await s.newOnValueJob(u.slice(0,u.length-1),c,l-1,!0),h||(s.idStack[l+1]=s.idStack[l])}const d=await o.getContainerKey(u[l],u,l),f=d!==null?o.createVocabOrBaseTerm(await s.getContext(u),d):null;f&&await t.EntryHandlerPredicate.handlePredicateObject(s,o,u,l+1,o.rdfType,f,!1,!1,!1),await s.handlePendingContainerFlushBuffers()}s.emittedStack[l]=!1}};return dh.ContainerHandlerType=r,dh}var y4;function aL(){if(y4)return uh;y4=1,Object.defineProperty(uh,"__esModule",{value:!0}),uh.EntryHandlerContainer=void 0;const t=l2,e=gde(),r=f2,n=vde(),a=Ol();let s=class pu{static isSimpleGraphContainer(u){return"@graph"in u&&("@set"in u&&Object.keys(u).length===2||Object.keys(u).length===1)}static isComplexGraphContainer(u){return"@graph"in u&&("@set"in u&&Object.keys(u).length>2||!("@set"in u)&&Object.keys(u).length>1)}static getContainerGraphIndex(u,c,l){let d=pu.isSimpleGraphContainer(u),f="";for(let h=c;h=0;p--)if(typeof c[p]!="number"){const b=a.Util.getContextValue(h,"@container",c[p],!1);if(b&&pu.isSimpleGraphContainer(b))return{containers:b,depth:p+1,fallback:!1};const _=a.Util.getContextValue(h,"@container",c[p-1],!1);if(_){const E="@graph"in _;for(const w in pu.CONTAINER_HANDLERS)if(_[w])return E?pu.CONTAINER_HANDLERS[w].canCombineWithGraph()?{containers:_,depth:p,fallback:!1}:d:f?d:{containers:_,depth:p,fallback:!1};return d}else{if(f)return d;f=!0}}return d}static async isBufferableContainerHandler(u,c,l){const d=await pu.getContainerHandler(u,c,l);return!d.fallback&&!("@graph"in d.containers)}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(u,c,l,d,f){return!!await this.test(u,c,null,l,d)}async test(u,c,l,d,f){const h=a.Util.getContextValueContainer(await u.getContext(d,2),d[f-1]);for(const p in pu.CONTAINER_HANDLERS)if(h[p])return{containers:h,handler:pu.CONTAINER_HANDLERS[p]};return null}async handle(u,c,l,d,f,h,p){return p.handler.handle(p.containers,u,c,d,f,h)}};return s.CONTAINER_HANDLERS={"@id":new t.ContainerHandlerIdentifier,"@index":new e.ContainerHandlerIndex,"@language":new r.ContainerHandlerLanguage,"@type":new n.ContainerHandlerType},uh.EntryHandlerContainer=s,uh}var wde=function t(e){return e===null||typeof e!="object"||e.toJSON!=null?JSON.stringify(e):Array.isArray(e)?"["+e.reduce((r,n,a)=>{const s=a===0?"":",",o=n===void 0||typeof n=="symbol"?null:n;return r+s+t(o)},"")+"]":"{"+Object.keys(e).sort().reduce((r,n,a)=>{if(e[n]===void 0||typeof e[n]=="symbol")return r;const s=r.length===0?"":",";return r+s+t(n)+":"+t(e[n])},"")+"}"},b4;function Ol(){if(b4)return oh;b4=1,Object.defineProperty(oh,"__esModule",{value:!0}),oh.Util=void 0;const t=hn,e=ht,r=aL(),n=wde;let a=class Zt{constructor(o){this.parsingContext=o.parsingContext,this.dataFactory=o.dataFactory||new e.DataFactory,this.rdfFirst=this.dataFactory.namedNode(Zt.RDF+"first"),this.rdfRest=this.dataFactory.namedNode(Zt.RDF+"rest"),this.rdfNil=this.dataFactory.namedNode(Zt.RDF+"nil"),this.rdfType=this.dataFactory.namedNode(Zt.RDF+"type"),this.rdfJson=this.dataFactory.namedNode(Zt.RDF+"JSON")}static getContextValue(o,u,c,l){const d=o.getContextRaw()[c];if(!d)return l;const f=d[u];return f===void 0?l:f}static getContextValueContainer(o,u){return Zt.getContextValue(o,"@container",u,{"@set":!0})}static getContextValueType(o,u){const c=Zt.getContextValue(o,"@type",u,null);return c==="@none"?null:c}static getContextValueLanguage(o,u){return Zt.getContextValue(o,"@language",u,o.getContextRaw()["@language"]||null)}static getContextValueDirection(o,u){return Zt.getContextValue(o,"@direction",u,o.getContextRaw()["@direction"]||null)}static isContextValueReverse(o,u){return!!Zt.getContextValue(o,"@reverse",u,null)}static getContextValueIndex(o,u){return Zt.getContextValue(o,"@index",u,o.getContextRaw()["@index"]||null)}static isPropertyReverse(o,u,c){return c==="@reverse"!==Zt.isContextValueReverse(o,u)}static isPropertyInEmbeddedNode(o){return o==="@id"}static isPropertyInAnnotationObject(o){return o==="@annotation"}static isValidIri(o){return o!==null&&t.Util.isValidIri(o)}static isPrefixArray(o,u){if(o.length>u.length)return!1;for(let c=0;c1)throw new t.ErrorCoded(`Found illegal neighbouring entries next to @set for key: '${u}'`,t.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);return[]}else if("@list"in c){if(Object.keys(c).length>1)throw new t.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${u}'`,t.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);const h=c["@list"];return Array.isArray(h)?h.length===0?[this.rdfNil]:this.parsingContext.idStack[l+1]||[]:await this.valueToTerm(await this.parsingContext.getContext(d),u,h,l-1,d.slice(0,-1))}else{if("@reverse"in c&&typeof c["@reverse"]=="boolean")return[];if("@graph"in Zt.getContextValueContainer(await this.parsingContext.getContext(d),u)){const h=this.parsingContext.graphContainerTermStack[l+1];return h?Object.values(h):[this.dataFactory.blankNode()]}else if("@id"in c){if(Object.keys(c).length>1&&(o=await this.parsingContext.getContext(d,0)),"@context"in c&&(o=await this.parsingContext.parseContext(c["@context"],o.getContextRaw())),c["@type"]==="@vocab")return this.nullableTermToArray(this.createVocabOrBaseTerm(o,c["@id"]));{const h=c["@id"];let p;if(typeof h=="object")if(this.parsingContext.rdfstar)p=this.parsingContext.idStack[l+1][0];else throw new t.ErrorCoded(`Found illegal @id '${c}'`,t.ERROR_CODES.INVALID_ID_VALUE);else p=this.resourceToTerm(o,h);return this.nullableTermToArray(p)}}else return this.parsingContext.emittedStack[l+1]||c&&typeof c=="object"&&Object.keys(c).length===0?this.parsingContext.idStack[l+1]||(this.parsingContext.idStack[l+1]=[this.dataFactory.blankNode()]):[]}case"string":return this.nullableTermToArray(this.stringValueToTerm(l,await this.getContextSelfOrPropertyScoped(o,u),u,c,null));case"boolean":return this.nullableTermToArray(this.stringValueToTerm(l,await this.getContextSelfOrPropertyScoped(o,u),u,(!!c).toString(),this.dataFactory.namedNode(Zt.XSD_BOOLEAN)));case"number":return this.nullableTermToArray(this.stringValueToTerm(l,await this.getContextSelfOrPropertyScoped(o,u),u,c,this.dataFactory.namedNode(c%1===0&&c<1e21?Zt.XSD_INTEGER:Zt.XSD_DOUBLE)));default:return this.parsingContext.emitError(new Error(`Could not determine the RDF type of a ${f}`)),[]}}async getContextSelfOrPropertyScoped(o,u){const c=o.getContextRaw()[u];return c&&typeof c=="object"&&"@context"in c&&(o=await this.parsingContext.parseContext(c,o.getContextRaw(),!0)),o}nullableTermToArray(o){return o?[o]:[]}predicateToTerm(o,u){const c=o.expandTerm(u,!0,this.parsingContext.getExpandOptions());if(!c)return null;if(c[0]==="_"&&c[1]===":")return this.parsingContext.produceGeneralizedRdf?this.dataFactory.blankNode(c.substr(2)):null;if(Zt.isValidIri(c))return this.dataFactory.namedNode(c);if(c&&this.parsingContext.strictValues)this.parsingContext.emitError(new t.ErrorCoded(`Invalid predicate IRI: ${c}`,t.ERROR_CODES.INVALID_IRI_MAPPING));else return null;return null}resourceToTerm(o,u){if(u.startsWith("_:"))return this.dataFactory.blankNode(u.substr(2));const c=o.expandTerm(u,!1,this.parsingContext.getExpandOptions());if(!Zt.isValidIri(c))if(c&&this.parsingContext.strictValues)this.parsingContext.emitError(new Error(`Invalid resource IRI: ${c}`));else return null;return this.dataFactory.namedNode(c)}createVocabOrBaseTerm(o,u){if(u.startsWith("_:"))return this.dataFactory.blankNode(u.substr(2));const c=this.parsingContext.getExpandOptions();let l=o.expandTerm(u,!0,c);if(l===u&&(l=o.expandTerm(u,!1,c)),!Zt.isValidIri(l))if(l&&this.parsingContext.strictValues&&!l.startsWith("@"))this.parsingContext.emitError(new Error(`Invalid term IRI: ${l}`));else return null;return this.dataFactory.namedNode(l)}intToString(o,u){return typeof o=="number"?Number.isFinite(o)?o%1===0&&(!u||u.value!==Zt.XSD_DOUBLE)?Number(o).toString():o.toExponential(15).replace(/(\d)0*e\+?/,"$1E"):o>0?"INF":"-INF":o}stringValueToTerm(o,u,c,l,d){const f=Zt.getContextValueType(u,c);if(f)if(f==="@id"){if(!d)return this.resourceToTerm(u,this.intToString(l,d))}else if(f==="@vocab"){if(!d)return this.createVocabOrBaseTerm(u,this.intToString(l,d))}else d=this.dataFactory.namedNode(f);if(!d){const h=Zt.getContextValueLanguage(u,c),p=Zt.getContextValueDirection(u,c);return p&&this.parsingContext.rdfDirection?this.createLanguageDirectionLiteral(o,this.intToString(l,d),h,p):this.dataFactory.literal(this.intToString(l,d),h)}return this.dataFactory.literal(this.intToString(l,d),d)}createLanguageDirectionLiteral(o,u,c,l){if(this.parsingContext.rdfDirection==="i18n-datatype")return c||(c=""),this.dataFactory.literal(u,this.dataFactory.namedNode(`https://www.w3.org/ns/i18n#${c}_${l}`));{const d=this.dataFactory.blankNode(),f=this.getDefaultGraph();return this.parsingContext.emitQuad(o,this.dataFactory.quad(d,this.dataFactory.namedNode(Zt.RDF+"value"),this.dataFactory.literal(u),f)),c&&this.parsingContext.emitQuad(o,this.dataFactory.quad(d,this.dataFactory.namedNode(Zt.RDF+"language"),this.dataFactory.literal(c),f)),this.parsingContext.emitQuad(o,this.dataFactory.quad(d,this.dataFactory.namedNode(Zt.RDF+"direction"),this.dataFactory.literal(l),f)),d}}valueToJsonString(o){return n(o)}async unaliasKeyword(o,u,c,l,d){if(Number.isInteger(o))return o;if(!l){const f=this.parsingContext.unaliasedKeywordCacheStack[c];if(f)return f}if(!t.Util.isPotentialKeyword(o)){d=d||await this.parsingContext.getContext(u);let f=d.getContextRaw()[o];f&&typeof f=="object"&&(f=f["@id"]),t.Util.isValidKeyword(f)&&(o=f)}return l?o:this.parsingContext.unaliasedKeywordCacheStack[c]=o}async unaliasKeywordParent(o,u){return await this.unaliasKeyword(u>0&&o[u-1],o,u-1)}async unaliasKeywords(o,u,c,l){const d={};for(const f in o)d[await this.unaliasKeyword(f,u,c+1,!0,l)]=o[f];return d}async isLiteral(o,u){for(let c=u;c>=0;c--){if(await this.unaliasKeyword(o[c],o,c)==="@annotation")return!1;if(this.parsingContext.literalStack[c]||this.parsingContext.jsonLiteralStack[c])return!0}return!1}async getDepthOffsetGraph(o,u){for(let c=o-1;c>0;c--)if(await this.unaliasKeyword(u[c],u,c)==="@graph"){const l=(await r.EntryHandlerContainer.getContainerHandler(this.parsingContext,u,c)).containers;return r.EntryHandlerContainer.isComplexGraphContainer(l)?-1:o-c-1}return-1}validateReverseSubject(o){if(o.termType==="Literal")throw new t.ErrorCoded(`Found illegal literal in subject position: ${o.value}`,t.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}getDefaultGraph(){return this.parsingContext.defaultGraph||this.dataFactory.defaultGraph()}async getGraphContainerValue(o,u){let c=this.getDefaultGraph();const{containers:l,depth:d}=await r.EntryHandlerContainer.getContainerHandler(this.parsingContext,o,u);if("@graph"in l){const f=r.EntryHandlerContainer.getContainerGraphIndex(l,d,o),h=this.parsingContext.graphContainerTermStack[d];if(c=h?h[f]:null,!c){let p=null;if("@id"in l){const b=await this.getContainerKey(o[d],o,d);b!==null&&(p=await this.resourceToTerm(await this.parsingContext.getContext(o),b))}p||(p=this.dataFactory.blankNode()),this.parsingContext.graphContainerTermStack[d]||(this.parsingContext.graphContainerTermStack[d]={}),c=this.parsingContext.graphContainerTermStack[d][f]=p}}return c}async getPropertiesDepth(o,u){let c=u;for(let l=u-1;l>0;l--)if(typeof o[l]!="number"){const d=await this.unaliasKeyword(o[l],o,l);if(d==="@reverse")return l;if(d==="@nest")c=l;else return c}return c}async getContainerKey(o,u,c){const l=await this.unaliasKeyword(o,u,c);return l==="@none"?null:l}validateReverseInEmbeddedNode(o,u,c){if(c&&u&&!this.parsingContext.rdfstarReverseInEmbedded)throw new t.ErrorCoded(`Illegal reverse property in embedded node in ${o}`,t.ERROR_CODES.INVALID_EMBEDDED_NODE)}emitQuadChecked(o,u,c,l,d,f,h){let p;if(f?(this.validateReverseSubject(l),p=this.dataFactory.quad(l,c,u,d)):p=this.dataFactory.quad(u,c,l,d),h){if(p.graph.termType!=="DefaultGraph"&&(p=this.dataFactory.quad(p.subject,p.predicate,p.object)),this.parsingContext.idStack[o-1])throw new t.ErrorCoded("Illegal multiple properties in an embedded node",t.ERROR_CODES.INVALID_EMBEDDED_NODE);this.parsingContext.idStack[o-1]=[p]}else this.parsingContext.emitQuad(o,p);const b=this.parsingContext.annotationsBuffer[o];if(b){for(const _ of b)this.emitAnnotation(o,p,_);delete this.parsingContext.annotationsBuffer[o]}}emitAnnotation(o,u,c){let l;c.reverse?(this.validateReverseSubject(c.object),l=this.dataFactory.quad(c.object,c.predicate,u)):l=this.dataFactory.quad(u,c.predicate,c.object),this.parsingContext.emitQuad(o,l);for(const d of c.nestedAnnotations)this.emitAnnotation(o,l,d)}};return a.XSD="http://www.w3.org/2001/XMLSchema#",a.XSD_BOOLEAN=a.XSD+"boolean",a.XSD_INTEGER=a.XSD+"integer",a.XSD_DOUBLE=a.XSD+"double",a.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",oh.Util=a,oh}Object.defineProperty(c2,"__esModule",{value:!0});c2.EntryHandlerArrayValue=void 0;const Sde=Ol(),_4=hn;class Tde{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,r,n,a,s){return this.test(e,r,null,n,a)}async test(e,r,n,a,s){return typeof a[s]=="number"}async handle(e,r,n,a,s,o){let u=await r.unaliasKeywordParent(a,o);if(u==="@list"){let c=null,l=0;for(let d=o-2;d>0;d--){const f=a[d];if(typeof f=="string"||typeof f=="number"){l=d,c=f;break}}if(c!==null){const d=await r.valueToTerm(await e.getContext(a),c,s,o,a);for(const f of d)await this.handleListElement(e,r,f,s,o,a.slice(0,l),l);d.length===0&&await this.handleListElement(e,r,null,s,o,a.slice(0,l),l)}}else if(u==="@set")await e.newOnValueJob(a.slice(0,-2),s,o-2,!1);else if(u!==void 0&&u!=="@type"){for(let l=o-1;l>0;l--)if(typeof a[l]!="number"){u=await r.unaliasKeyword(a[l],a,l);break}const c=await e.getContext(a.slice(0,-1));if("@list"in Sde.Util.getContextValueContainer(c,u)){e.emittedStack[o+1]=!0;const l=await r.valueToTerm(await e.getContext(a),u,s,o,a);for(const d of l)await this.handleListElement(e,r,d,s,o,a.slice(0,-1),o-1);l.length===0&&await this.handleListElement(e,r,null,s,o,a.slice(0,-1),o-1)}else e.shiftStack(o,1),await e.newOnValueJob(a.slice(0,-1),s,o-1,!1),e.contextTree.removeContext(a.slice(0,-1))}}async handleListElement(e,r,n,a,s,o,u){let c=e.listPointerStack[s];if(a!==null&&(await r.unaliasKeywords(a,o,s))["@value"]!==null){if(!c||!c.value){const l=r.dataFactory.blankNode();c={value:l,listRootDepth:u,listId:l}}else{const l=r.dataFactory.blankNode();e.emitQuad(s,r.dataFactory.quad(c.value,r.rdfRest,l,r.getDefaultGraph())),c.value=l}n&&e.emitQuad(s,r.dataFactory.quad(c.value,r.rdfFirst,n,r.getDefaultGraph()))}else c||(c={listRootDepth:u,listId:r.rdfNil});e.listPointerStack[s]=c,e.rdfstar&&e.annotationsBuffer[s]&&e.emitError(new _4.ErrorCoded("Found an illegal annotation inside a list",_4.ERROR_CODES.INVALID_ANNOTATION))}}c2.EntryHandlerArrayValue=Tde;var h2={};Object.defineProperty(h2,"__esModule",{value:!0});h2.EntryHandlerInvalidFallback=void 0;class Ede{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,r,n,a,s){return!1}async test(e,r,n,a,s){return!0}async handle(e,r,n,a,s,o){e.emittedStack[o]=!1}}h2.EntryHandlerInvalidFallback=Ede;var p2={},fs={};Object.defineProperty(fs,"__esModule",{value:!0});fs.EntryHandlerKeyword=void 0;class Ode{constructor(e){this.keyword=e}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,r,n,a,s){return!1}async test(e,r,n,a,s){return n===this.keyword}}fs.EntryHandlerKeyword=Ode;Object.defineProperty(p2,"__esModule",{value:!0});p2.EntryHandlerKeywordContext=void 0;const g4=hn,Ade=fs;class Rde extends Ade.EntryHandlerKeyword{constructor(){super("@context")}isStackProcessor(){return!1}async handle(e,r,n,a,s,o){e.streamingProfile&&(e.processingStack[o]||e.processingType[o]||e.idStack[o]!==void 0)&&e.emitError(new g4.ErrorCoded("Found an out-of-order context, while streaming is enabled.(disable `streamingProfile`)",g4.ERROR_CODES.INVALID_STREAMING_KEY_ORDER));const u=e.getContext(a),c=e.parseContext(s,(await u).getContextRaw());e.contextTree.setContext(a.slice(0,-1),c),e.emitContext(s),await e.validateContext(await c)}}p2.EntryHandlerKeywordContext=Rde;var y2={};Object.defineProperty(y2,"__esModule",{value:!0});y2.EntryHandlerKeywordGraph=void 0;const xde=fs;class Ide extends xde.EntryHandlerKeyword{constructor(){super("@graph")}async handle(e,r,n,a,s,o){e.graphStack[o+1]=!0}}y2.EntryHandlerKeywordGraph=Ide;var b2={};Object.defineProperty(b2,"__esModule",{value:!0});b2.EntryHandlerKeywordId=void 0;const vs=hn,Pde=fs;class Dde extends Pde.EntryHandlerKeyword{constructor(){super("@id")}isStackProcessor(){return!1}async handle(e,r,n,a,s,o){if(typeof s!="string"){if(e.rdfstar&&typeof s=="object"){const c=Object.keys(s);c.length===1&&c[0]==="@id"&&e.emitError(new vs.ErrorCoded(`Invalid embedded node without property with @id ${s["@id"]}`,vs.ERROR_CODES.INVALID_EMBEDDED_NODE))}else e.emitError(new vs.ErrorCoded(`Found illegal @id '${s}'`,vs.ERROR_CODES.INVALID_ID_VALUE));return}const u=await r.getPropertiesDepth(a,o);if(e.idStack[u]!==void 0&&(e.idStack[u][0].listHead?e.emitError(new vs.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${a[o-1]}'`,vs.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT)):e.emitError(new vs.ErrorCoded(`Found duplicate @ids '${e.idStack[u][0].value}' and '${s}'`,vs.ERROR_CODES.COLLIDING_KEYWORDS))),e.rdfstar&&e.annotationsBuffer[o])for(const c of e.annotationsBuffer[o])c.depth===o&&e.emitError(new vs.ErrorCoded(`Found an illegal @id inside an annotation: ${s}`,vs.ERROR_CODES.INVALID_ANNOTATION));e.idStack[u]=r.nullableTermToArray(await r.resourceToTerm(await e.getContext(a),s))}}b2.EntryHandlerKeywordId=Dde;var _2={};Object.defineProperty(_2,"__esModule",{value:!0});_2.EntryHandlerKeywordIncluded=void 0;const Kl=hn,Nde=fs;class Cde extends Nde.EntryHandlerKeyword{constructor(){super("@included")}async handle(e,r,n,a,s,o){typeof s!="object"&&e.emitError(new Kl.ErrorCoded(`Found illegal @included '${s}'`,Kl.ERROR_CODES.INVALID_INCLUDED_VALUE));const u=await r.unaliasKeywords(s,a,o,await e.getContext(a));"@value"in u&&e.emitError(new Kl.ErrorCoded(`Found an illegal @included @value node '${JSON.stringify(s)}'`,Kl.ERROR_CODES.INVALID_INCLUDED_VALUE)),"@list"in u&&e.emitError(new Kl.ErrorCoded(`Found an illegal @included @list node '${JSON.stringify(s)}'`,Kl.ERROR_CODES.INVALID_INCLUDED_VALUE)),e.emittedStack[o]=!1}}_2.EntryHandlerKeywordIncluded=Cde;var g2={};Object.defineProperty(g2,"__esModule",{value:!0});g2.EntryHandlerKeywordNest=void 0;const f1=hn,jde=fs;class Mde extends jde.EntryHandlerKeyword{constructor(){super("@nest")}async handle(e,r,n,a,s,o){typeof s!="object"&&e.emitError(new f1.ErrorCoded(`Found invalid @nest entry for '${n}': '${s}'`,f1.ERROR_CODES.INVALID_NEST_VALUE)),"@value"in await r.unaliasKeywords(s,a,o,await e.getContext(a))&&e.emitError(new f1.ErrorCoded(`Found an invalid @value node for '${n}'`,f1.ERROR_CODES.INVALID_NEST_VALUE)),e.emittedStack[o]=!1}}g2.EntryHandlerKeywordNest=Mde;var m2={};Object.defineProperty(m2,"__esModule",{value:!0});m2.EntryHandlerKeywordType=void 0;const h1=hn,p1=Ol(),Fde=d2(),Lde=fs;class Bde extends Lde.EntryHandlerKeyword{constructor(){super("@type")}isStackProcessor(){return!1}async handle(e,r,n,a,s,o){const u=a[o],c=await e.getContext(a),l=r.rdfType,d=await r.unaliasKeywordParent(a,o),f=p1.Util.isPropertyReverse(c,u,d),h=p1.Util.isPropertyInEmbeddedNode(d);r.validateReverseInEmbeddedNode(n,f,h);const p=p1.Util.isPropertyInAnnotationObject(d),b=Array.isArray(s)?s:[s];for(const w of b){typeof w!="string"&&e.emitError(new h1.ErrorCoded(`Found illegal @type '${w}'`,h1.ERROR_CODES.INVALID_TYPE_VALUE));const O=r.createVocabOrBaseTerm(c,w);O&&await Fde.EntryHandlerPredicate.handlePredicateObject(e,r,a,o,l,O,f,h,p)}let _=Promise.resolve(c),E=!1;for(const w of b.sort()){const O=p1.Util.getContextValue(c,"@context",w,null);O&&(E=!0,_=_.then(A=>e.parseContext(O,A.getContextRaw())))}e.streamingProfile&&(E||!e.streamingProfileAllowOutOfOrderPlainType)&&(e.processingStack[o]||e.idStack[o])&&e.emitError(new h1.ErrorCoded("Found an out-of-order type-scoped context, while streaming is enabled.(disable `streamingProfile`)",h1.ERROR_CODES.INVALID_STREAMING_KEY_ORDER)),E&&(_=_.then(w=>("@propagate"in w.getContextRaw()||(w.getContextRaw()["@propagate"]=!1),w.getContextRaw()["@propagate"]===!1&&(w.getContextRaw()["@__propagateFallback"]=c.getContextRaw()),w)),e.contextTree.setContext(a.slice(0,a.length-1),_)),e.processingType[o]=!0}}m2.EntryHandlerKeywordType=Bde;var v2={};Object.defineProperty(v2,"__esModule",{value:!0});v2.EntryHandlerKeywordUnknownFallback=void 0;const tp=hn;class w2{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,r,n,a,s){const o=await r.unaliasKeyword(n[a],n,a);return tp.Util.isPotentialKeyword(o)?!(!s&&o==="@list"):!1}async test(e,r,n,a,s){return tp.Util.isPotentialKeyword(n)}async handle(e,r,n,a,s,o){const u=w2.VALID_KEYWORDS_TYPES[n];u!==void 0?u&&typeof s!==u.type&&e.emitError(new tp.ErrorCoded(`Invalid value type for '${n}' with value '${s}'`,u.errorCode)):e.strictValues&&e.emitError(new Error(`Unknown keyword '${n}' with value '${s}'`)),e.emittedStack[o]=!1}}w2.VALID_KEYWORDS_TYPES={"@index":{type:"string",errorCode:tp.ERROR_CODES.INVALID_INDEX_VALUE},"@list":null,"@reverse":{type:"object",errorCode:tp.ERROR_CODES.INVALID_REVERSE_VALUE},"@set":null,"@value":null};v2.EntryHandlerKeywordUnknownFallback=w2;var S2={};Object.defineProperty(S2,"__esModule",{value:!0});S2.EntryHandlerKeywordValue=void 0;const $de=fs;class Ude extends $de.EntryHandlerKeyword{constructor(){super("@value")}async validate(e,r,n,a,s){const o=n[a];return o&&!e.literalStack[a]&&await this.test(e,r,o,n,a)&&(e.literalStack[a]=!0),super.validate(e,r,n,a,s)}async test(e,r,n,a,s){return await r.unaliasKeyword(a[s],a.slice(0,a.length-1),s-1,!0)==="@value"}async handle(e,r,n,a,s,o){e.literalStack[o]=!0,delete e.unidentifiedValuesBuffer[o],delete e.unidentifiedGraphsBuffer[o],e.emittedStack[o]=!1}}S2.EntryHandlerKeywordValue=Ude;var fh={},T2={};Object.defineProperty(T2,"__esModule",{value:!0});T2.ContextTree=void 0;class QR{constructor(){this.subTrees={}}getContext(e){if(e.length>0){const[r,...n]=e,a=this.subTrees[r];if(a){const s=a.getContext(n);if(s)return s.then(({context:o,depth:u})=>({context:o,depth:u+1}))}}return this.context?this.context.then(r=>({context:r,depth:0})):null}setContext(e,r){if(e.length===0)this.context=r;else{const[n,...a]=e;let s=this.subTrees[n];s||(s=this.subTrees[n]=new QR),s.setContext(a,r)}}removeContext(e){this.setContext(e,null)}}T2.ContextTree=QR;var m4;function qde(){if(m4)return fh;m4=1,Object.defineProperty(fh,"__esModule",{value:!0}),fh.ParsingContext=void 0;const t=hn,e=Of,r=T2,n=oL();let a=class sL{constructor(o){this.contextParser=new t.ContextParser({documentLoader:o.documentLoader,skipValidation:o.skipContextValidation}),this.streamingProfile=!!o.streamingProfile,this.baseIRI=o.baseIRI,this.produceGeneralizedRdf=!!o.produceGeneralizedRdf,this.allowSubjectList=!!o.allowSubjectList,this.processingMode=o.processingMode||n.JsonLdParser.DEFAULT_PROCESSING_MODE,this.strictValues=!!o.strictValues,this.validateValueIndexes=!!o.validateValueIndexes,this.defaultGraph=o.defaultGraph,this.rdfDirection=o.rdfDirection,this.normalizeLanguageTags=o.normalizeLanguageTags,this.streamingProfileAllowOutOfOrderPlainType=o.streamingProfileAllowOutOfOrderPlainType,this.rdfstar=o.rdfstar!==!1,this.rdfstarReverseInEmbedded=o.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 r.ContextTree,this.literalStack=[],this.validationStack=[],this.unaliasedKeywordCacheStack=[],this.jsonLiteralStack=[],this.unidentifiedValuesBuffer=[],this.unidentifiedGraphsBuffer=[],this.annotationsBuffer=[],this.pendingContainerFlushBuffers=[],this.parser=o.parser,o.context?(this.rootContext=this.parseContext(o.context),this.rootContext.then(u=>this.validateContext(u))):this.rootContext=Promise.resolve(new t.JsonLdContextNormalized(this.baseIRI?{"@base":this.baseIRI,"@__baseDocument":!0}:{}))}async parseContext(o,u,c){return this.contextParser.parse(o,{baseIRI:this.baseIRI,ignoreProtection:c,normalizeLanguageTags:this.normalizeLanguageTags,parentContext:u,processingMode:this.activeProcessingMode})}validateContext(o){const u=o.getContextRaw()["@version"];if(u){if(this.activeProcessingMode&&u>this.activeProcessingMode)throw new e.ErrorCoded(`Unsupported JSON-LD version '${u}' under active processing mode ${this.activeProcessingMode}.`,e.ERROR_CODES.PROCESSING_MODE_CONFLICT);if(this.activeProcessingMode&&u0&&c.context.getContextRaw()["@propagate"]===!1&&c.depth!==u&&!l);return c.depth===0&&c.context.getContextRaw()["@propagate"]===!1&&c.depth!==u&&(c.context=new t.JsonLdContextNormalized({})),c}async newOnValueJob(o,u,c,l){await this.parser.newOnValueJob(o,u,c,l)}async handlePendingContainerFlushBuffers(){if(this.pendingContainerFlushBuffers.length>0){for(const o of this.pendingContainerFlushBuffers)await this.parser.flushBuffer(o.depth,o.keys),this.parser.flushStacks(o.depth);return this.pendingContainerFlushBuffers.splice(0,this.pendingContainerFlushBuffers.length),!0}else return!1}emitQuad(o,u){o===1&&(this.topLevelProperties=!0),this.parser.push(u)}emitError(o){this.parser.emit("error",o)}emitContext(o){this.parser.emit("context",o)}getUnidentifiedValueBufferSafe(o){let u=this.unidentifiedValuesBuffer[o];return u||(u=[],this.unidentifiedValuesBuffer[o]=u),u}getUnidentifiedGraphBufferSafe(o){let u=this.unidentifiedGraphsBuffer[o];return u||(u=[],this.unidentifiedGraphsBuffer[o]=u),u}getAnnotationsBufferSafe(o){let u=this.annotationsBuffer[o];return u||(u=[],this.annotationsBuffer[o]=u),u}getExpandOptions(){return sL.EXPAND_OPTIONS[this.activeProcessingMode]}shiftStack(o,u){const c=this.idStack[o+u];if(c&&(this.idStack[o]=c,this.emittedStack[o]=!0,delete this.idStack[o+u]),this.pendingContainerFlushBuffers.length)for(const l of this.pendingContainerFlushBuffers)l.depth>=o+u&&(l.depth-=u,l.keys.splice(o,u));this.unidentifiedValuesBuffer[o+u]&&(this.unidentifiedValuesBuffer[o]=this.unidentifiedValuesBuffer[o+u],delete this.unidentifiedValuesBuffer[o+u]),this.annotationsBuffer[o+u-1]&&(this.annotationsBuffer[o-1]||(this.annotationsBuffer[o-1]=[]),this.annotationsBuffer[o-1]=[...this.annotationsBuffer[o-1],...this.annotationsBuffer[o+u-1]],delete this.annotationsBuffer[o+u-1])}};return a.EXPAND_OPTIONS={1:{allowPrefixForcing:!1,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!1},1.1:{allowPrefixForcing:!0,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!0}},fh.ParsingContext=a,fh}var E2={};Object.defineProperty(E2,"__esModule",{value:!0});E2.EntryHandlerKeywordAnnotation=void 0;const Vde=fs,v4=hn;class Hde extends Vde.EntryHandlerKeyword{constructor(){super("@annotation")}async handle(e,r,n,a,s,o){(typeof s=="string"||typeof s=="object"&&s["@value"])&&e.emitError(new v4.ErrorCoded(`Found illegal annotation value: ${JSON.stringify(s)}`,v4.ERROR_CODES.INVALID_ANNOTATION))}}E2.EntryHandlerKeywordAnnotation=Hde;var w4;function oL(){if(w4)return sh;w4=1,Object.defineProperty(sh,"__esModule",{value:!0}),sh.JsonLdParser=void 0;const t=bM,e=hn,r=kt,n=c2,a=aL(),s=h2,o=d2(),u=p2,c=y2,l=b2,d=_2,f=g2,h=m2,p=v2,b=S2,_=qde(),E=Ol(),w=Kj,O=E2;let A=class ad extends r.Transform{constructor(I){super({readableObjectMode:!0}),I=I||{},this.options=I,this.parsingContext=new _.ParsingContext(Object.assign({parser:this},I)),this.util=new E.Util({dataFactory:I.dataFactory,parsingContext:this.parsingContext}),this.jsonParser=new t,this.contextJobs=[],this.typeJobs=[],this.contextAwaitingJobs=[],this.lastDepth=0,this.lastKeys=[],this.lastOnValueJob=Promise.resolve(),this.attachJsonParserListeners(),this.on("end",()=>{typeof this.jsonParser.mode<"u"&&this.emit("error",new Error("Unclosed document"))})}static fromHttpResponse(I,D,U,H){let N;if(D!=="application/ld+json"){if(D!=="application/json"&&!D.endsWith("+json"))throw new e.ErrorCoded(`Unsupported JSON-LD media type ${D}`,e.ERROR_CODES.LOADING_DOCUMENT_FAILED);if(U&&U.has("Link")&&U.forEach((F,X)=>{if(X==="link"){const ne=(0,w.parse)(F);for(const $ of ne.get("rel","http://www.w3.org/ns/json-ld#context")){if(N)throw new e.ErrorCoded("Multiple JSON-LD context link headers were found on "+I,e.ERROR_CODES.MULTIPLE_CONTEXT_LINK_HEADERS);N=$.uri}}}),!N&&!(H!=null&&H.ignoreMissingContextLinkHeader))throw new e.ErrorCoded(`Missing context link header for media type ${D} on ${I}`,e.ERROR_CODES.LOADING_DOCUMENT_FAILED)}let x;if(U&&U.has("Content-Type")){const F=U.get("Content-Type"),X=/; *profile=([^"]*)/.exec(F);X&&X[1]==="http://www.w3.org/ns/json-ld#streaming"&&(x=!0)}return new ad(Object.assign({baseIRI:I,context:N,streamingProfile:x},H||{}))}import(I){if("pipe"in I){I.on("error",U=>D.emit("error",U));const D=I.pipe(new ad(this.options));return D}else{const D=new r.PassThrough({readableObjectMode:!0});I.on("error",H=>U.emit("error",H)),I.on("data",H=>D.push(H)),I.on("end",()=>D.push(null));const U=D.pipe(new ad(this.options));return U}}_transform(I,D,U){this.jsonParser.write(I),this.lastOnValueJob.then(()=>U(),H=>U(H))}async newOnValueJob(I,D,U,H){let N=!0;if(H&&U1&&(ne=this.parsingContext.validationStack[this.parsingContext.validationStack.length-1].property);for(let $=Math.max(1,this.parsingContext.validationStack.length-1);$=0?this.parsingContext.idStack[I-ne-1]:[await this.util.getGraphContainerValue(D,I)];if($)for(const j of $){this.parsingContext.emittedStack[I]=!0;for(const Q of N)this.util.emitQuadChecked(I,X,Q.predicate,Q.object,j,Q.reverse,Q.isEmbedded)}else{const j=this.parsingContext.getUnidentifiedGraphBufferSafe(I-await this.util.getDepthOffsetGraph(I,D)-1);for(const Q of N)Q.reverse?j.push({object:X,predicate:Q.predicate,subject:Q.object,isEmbedded:Q.isEmbedded}):j.push({object:Q.object,predicate:Q.predicate,subject:X,isEmbedded:Q.isEmbedded})}}this.parsingContext.unidentifiedValuesBuffer.splice(I,1),this.parsingContext.literalStack.splice(I,1),this.parsingContext.jsonLiteralStack.splice(I,1)}const x=this.parsingContext.unidentifiedGraphsBuffer[I];if(x){for(const X of U){const ne=I===1&&X.termType==="BlankNode"&&!this.parsingContext.topLevelProperties?this.util.getDefaultGraph():X;this.parsingContext.emittedStack[I]=!0;for(const $ of x)this.parsingContext.emitQuad(I,this.util.dataFactory.quad($.subject,$.predicate,$.object,ne))}this.parsingContext.unidentifiedGraphsBuffer.splice(I,1)}const F=this.parsingContext.annotationsBuffer[I];if(F){F.length>0&&I===1&&this.parsingContext.emitError(new e.ErrorCoded("Annotations can not be made on top-level nodes",e.ERROR_CODES.INVALID_ANNOTATION));const X=this.parsingContext.getAnnotationsBufferSafe(I-1);for(const ne of F)X.push(ne);delete this.parsingContext.annotationsBuffer[I]}}async validateKey(I,D,U){for(const H of ad.ENTRY_HANDLERS)if(await H.validate(this.parsingContext,this.util,I,D,U))return{valid:!0,property:U||H.isPropertyHandler()};return{valid:!1,property:!1}}attachJsonParserListeners(){this.jsonParser.onValue=I=>{const D=this.jsonParser.stack.length,U=new Array(D+1).fill(0).map((H,N)=>N===D?this.jsonParser.key:this.jsonParser.stack[N].key);if(!this.isParsingContextInner(D)){const H=()=>this.newOnValueJob(U,I,D,!0);if(!this.parsingContext.streamingProfile&&!this.parsingContext.contextTree.getContext(U.slice(0,-1)))if(U[D]==="@context"){let N=this.contextJobs[D];N||(N=this.contextJobs[D]=[]),N.push(H)}else this.contextAwaitingJobs.push({job:H,keys:U,depth:D});else this.lastOnValueJob=this.lastOnValueJob.then(H);!this.parsingContext.streamingProfile&&D===0&&(this.lastOnValueJob=this.lastOnValueJob.then(()=>this.executeBufferedJobs()))}},this.jsonParser.onError=I=>{this.emit("error",I)}}isParsingContextInner(I){for(let D=I;D>0;D--)if(this.jsonParser.stack[D-1].key==="@context")return!0;return!1}async executeBufferedJobs(){for(const D of this.contextJobs)if(D)for(const U of D)await U();this.parsingContext.unaliasedKeywordCacheStack.splice(0);const I=[];for(const D of this.contextAwaitingJobs)await this.util.unaliasKeyword(D.keys[D.depth],D.keys,D.depth,!0)==="@type"||typeof D.keys[D.depth]=="number"&&await this.util.unaliasKeyword(D.keys[D.depth-1],D.keys,D.depth-1,!0)==="@type"?this.typeJobs.push({job:D.job,keys:D.keys.slice(0,D.keys.length-1)}):I.push(D);for(const D of I){if(this.typeJobs.length>0){const U=[],H=[];for(let F=0;FF.keys.length-X.keys.length);for(const F of N)await F.job();const x=H.sort().reverse();for(const F of x)this.typeJobs.splice(F,1)}await D.job()}}};return A.DEFAULT_PROCESSING_MODE="1.1",A.ENTRY_HANDLERS=[new n.EntryHandlerArrayValue,new u.EntryHandlerKeywordContext,new l.EntryHandlerKeywordId,new d.EntryHandlerKeywordIncluded,new c.EntryHandlerKeywordGraph,new f.EntryHandlerKeywordNest,new h.EntryHandlerKeywordType,new b.EntryHandlerKeywordValue,new O.EntryHandlerKeywordAnnotation,new a.EntryHandlerContainer,new p.EntryHandlerKeywordUnknownFallback,new o.EntryHandlerPredicate,new s.EntryHandlerInvalidFallback],sh.JsonLdParser=A,sh}(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(oL(),t)})(nL);var H0={};Object.defineProperty(H0,"__esModule",{value:!0});H0.DocumentLoaderMediated=void 0;const kde=Zs,Qde=hn,Gde=wl;class GR extends Qde.FetchDocumentLoader{constructor(e,r){super(GR.createFetcher(e,r)),this.mediatorHttp=e,this.context=r}static createFetcher(e,r){return async(n,a)=>{const s=await e.mediate({input:n,init:a,context:r});return s.json=async()=>JSON.parse(await Gde(kde.ActorHttp.toNodeReadable(s.body))),s}}}H0.DocumentLoaderMediated=GR;Object.defineProperty(u2,"__esModule",{value:!0});u2.ActorRdfParseJsonLd=void 0;const zde=ml,y1=rr,Wde=nL,Xde=H0;class Kde extends zde.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async testHandle(e,r,n){if(n.has(y1.KeysRdfParseHtmlScript.processingHtmlScript)&&r!=="application/ld+json")throw new Error("JSON-LD in script tags can only have media type 'application/ld+json'");if(!r||!(r in this.mediaTypePriorities||r.endsWith("+json")))throw new Error(`Unrecognized media type: ${r}`);return await this.testHandleChecked(e)}async runHandle(e,r,n){var o;return{data:Wde.JsonLdParser.fromHttpResponse(((o=e.metadata)==null?void 0:o.baseIRI)??"",r,e.headers,{documentLoader:n.get(y1.KeysRdfParseJsonLd.documentLoader)||new Xde.DocumentLoaderMediated(this.mediatorHttp,n),strictValues:n.get(y1.KeysRdfParseJsonLd.strictValues),...n.get(y1.KeysRdfParseJsonLd.parserOptions)}).import(e.data)}}}u2.ActorRdfParseJsonLd=Kde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(u2,t),r(H0,t)})(rL);var uL={},O2={},A2={},R2={},x2={};(function(){(function(t){(function(e){var r={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};function n(N){return N&&DataView.prototype.isPrototypeOf(N)}if(r.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(N){return N&&a.indexOf(Object.prototype.toString.call(N))>-1};function o(N){if(typeof N!="string"&&(N=String(N)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(N))throw new TypeError("Invalid character in header field name");return N.toLowerCase()}function u(N){return typeof N!="string"&&(N=String(N)),N}function c(N){var x={next:function(){var F=N.shift();return{done:F===void 0,value:F}}};return r.iterable&&(x[Symbol.iterator]=function(){return x}),x}function l(N){this.map={},N instanceof l?N.forEach(function(x,F){this.append(F,x)},this):Array.isArray(N)?N.forEach(function(x){this.append(x[0],x[1])},this):N&&Object.getOwnPropertyNames(N).forEach(function(x){this.append(x,N[x])},this)}l.prototype.append=function(N,x){N=o(N),x=u(x);var F=this.map[N];this.map[N]=F?F+", "+x:x},l.prototype.delete=function(N){delete this.map[o(N)]},l.prototype.get=function(N){return N=o(N),this.has(N)?this.map[N]:null},l.prototype.has=function(N){return this.map.hasOwnProperty(o(N))},l.prototype.set=function(N,x){this.map[o(N)]=u(x)},l.prototype.forEach=function(N,x){for(var F in this.map)this.map.hasOwnProperty(F)&&N.call(x,this.map[F],F,this)},l.prototype.keys=function(){var N=[];return this.forEach(function(x,F){N.push(F)}),c(N)},l.prototype.values=function(){var N=[];return this.forEach(function(x){N.push(x)}),c(N)},l.prototype.entries=function(){var N=[];return this.forEach(function(x,F){N.push([F,x])}),c(N)},r.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);function d(N){if(N.bodyUsed)return Promise.reject(new TypeError("Already read"));N.bodyUsed=!0}function f(N){return new Promise(function(x,F){N.onload=function(){x(N.result)},N.onerror=function(){F(N.error)}})}function h(N){var x=new FileReader,F=f(x);return x.readAsArrayBuffer(N),F}function p(N){var x=new FileReader,F=f(x);return x.readAsText(N),F}function b(N){for(var x=new Uint8Array(N),F=new Array(x.length),X=0;X-1?x:N}function A(N,x){x=x||{};var F=x.body;if(N instanceof A){if(N.bodyUsed)throw new TypeError("Already read");this.url=N.url,this.credentials=N.credentials,x.headers||(this.headers=new l(N.headers)),this.method=N.method,this.mode=N.mode,this.signal=N.signal,!F&&N._bodyInit!=null&&(F=N._bodyInit,N.bodyUsed=!0)}else this.url=String(N);if(this.credentials=x.credentials||this.credentials||"same-origin",(x.headers||!this.headers)&&(this.headers=new l(x.headers)),this.method=O(x.method||this.method||"GET"),this.mode=x.mode||this.mode||null,this.signal=x.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&F)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(F)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})};function T(N){var x=new FormData;return N.trim().split("&").forEach(function(F){if(F){var X=F.split("="),ne=X.shift().replace(/\+/g," "),$=X.join("=").replace(/\+/g," ");x.append(decodeURIComponent(ne),decodeURIComponent($))}}),x}function I(N){var x=new l,F=N.replace(/\r?\n[\t ]+/g," ");return F.split(/\r?\n/).forEach(function(X){var ne=X.split(":"),$=ne.shift().trim();if($){var j=ne.join(":").trim();x.append($,j)}}),x}E.call(A.prototype);function D(N,x){x||(x={}),this.type="default",this.status=x.status===void 0?200:x.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in x?x.statusText:"OK",this.headers=new l(x.headers),this.url=x.url||"",this._initBody(N)}E.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},D.error=function(){var N=new D(null,{status:0,statusText:""});return N.type="error",N};var U=[301,302,303,307,308];D.redirect=function(N,x){if(U.indexOf(x)===-1)throw new RangeError("Invalid status code");return new D(null,{status:x,headers:{location:N}})},e.DOMException=t.DOMException;try{new e.DOMException}catch{e.DOMException=function(x,F){this.message=x,this.name=F;var X=Error(x);this.stack=X.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function H(N,x){return new Promise(function(F,X){var ne=new A(N,x);if(ne.signal&&ne.signal.aborted)return X(new e.DOMException("Aborted","AbortError"));var $=new XMLHttpRequest;function j(){$.abort()}$.onload=function(){var Q={status:$.status,statusText:$.statusText,headers:I($.getAllResponseHeaders()||"")};Q.url="responseURL"in $?$.responseURL:Q.headers.get("X-Request-URL");var se="response"in $?$.response:$.responseText;F(new D(se,Q))},$.onerror=function(){X(new TypeError("Network request failed"))},$.ontimeout=function(){X(new TypeError("Network request failed"))},$.onabort=function(){X(new e.DOMException("Aborted","AbortError"))},$.open(ne.method,ne.url,!0),ne.credentials==="include"?$.withCredentials=!0:ne.credentials==="omit"&&($.withCredentials=!1),"responseType"in $&&r.blob&&($.responseType="blob"),ne.headers.forEach(function(Q,se){$.setRequestHeader(se,Q)}),ne.signal&&(ne.signal.addEventListener("abort",j),$.onreadystatechange=function(){$.readyState===4&&ne.signal.removeEventListener("abort",j)}),$.send(typeof ne._bodyInit>"u"?null:ne._bodyInit)})}return H.polyfill=!0,t.fetch||(t.fetch=H,t.Headers=l,t.Request=A,t.Response=D),e.Headers=l,e.Request=A,e.Response=D,e.fetch=H,Object.defineProperty(e,"__esModule",{value:!0}),e})({})})(typeof self<"u"?self:m)})();var cL={},I2={};Object.defineProperty(I2,"__esModule",{value:!0});I2.SparqlXmlParser=void 0;const Jde=ht,S4=al,Yde=kt;class Zde{constructor(e){e=e||{},this.dataFactory=e.dataFactory||new Jde.DataFactory,this.prefixVariableQuestionMark=!!e.prefixVariableQuestionMark}parseXmlResultsStream(e){const r=_=>b.emit("error",_);e.on("error",r);const n=new S4.SaxesParser,a=[];let s=!1,o=!1;const u=[];let c={},l="",d="",f,h="",p=[];n.on("error",r),n.on("opentag",_=>{_.name==="variable"&&this.stackEquals(a,["sparql","head"])?u.push(this.dataFactory.variable(_.attributes.name)):_.name==="results"&&this.stackEquals(a,["sparql"])?o=!0:_.name==="result"&&this.stackEquals(a,["sparql","results"])?c={}:_.name==="binding"&&this.stackEquals(a,["sparql","results","result"])?(l=_.attributes.name||"",d="",f="",h="",p=[]):_.name==="triple"&&this.stackBeginsWith(a,["sparql","results","result"])?p.push({components:{}}):a[a.length-1]==="triple"&&this.stackBeginsWith(a,["sparql","results","result","binding"])?(d="",f="",h="",["subject","predicate","object"].includes(_.name)?p[p.length-1].currentComponent=_.name:r(new Error(`Illegal quoted triple component '${_.name}' found on line ${n.line+1}`))):this.stackBeginsWith(a,["sparql","results","result","binding"])&&(d=_.name,"xml:lang"in _.attributes?f=_.attributes["xml:lang"]:"datatype"in _.attributes?f=this.dataFactory.namedNode(_.attributes.datatype):f=void 0),a.push(_.name)}),n.on("closetag",_=>{if(this.stackEquals(a,["sparql","head"])&&(b.emit("variables",u),s=!0),this.stackEquals(a,["sparql","results","result"])&&b.push(c),this.stackBeginsWith(a,["sparql","results","result","binding"])){let E;if(!l&&d)r(new Error(`Terms should have a name on line ${n.line+1}`));else if(d==="uri")E=this.dataFactory.namedNode(h);else if(d==="bnode")E=this.dataFactory.blankNode(h);else if(d==="literal")E=this.dataFactory.literal(h,f);else if(a[a.length-1]==="triple"){const w=p.pop();w&&w.components.subject&&w.components.predicate&&w.components.object?E=this.dataFactory.quad(w.components.subject,w.components.predicate,w.components.object):r(new Error(`Incomplete quoted triple on line ${n.line+1}`))}else d&&r(new Error(`Invalid term type '${d}' on line ${n.line+1}`));if(E)if(p.length>0){const w=p[p.length-1];w.components[w.currentComponent]&&r(new Error(`The ${w.currentComponent} in a quoted triple on line ${n.line+1} was already defined before`)),w.components[w.currentComponent]=E}else{const w=this.prefixVariableQuestionMark?"?"+l:l;c[w]=E}d=void 0}a.pop()}),n.on("text",_=>{this.stackBeginsWith(a,["sparql","results","result","binding"])&&a[a.length-1]===d&&(h=_)});const b=e.on("end",_=>{o?s||b.emit("variables",[]):b.emit("error",new Error("No valid SPARQL query results were found."))}).pipe(new Yde.Transform({objectMode:!0,transform(_,E,w){n.write(_),w()}}));return b}parseXmlBooleanStream(e){return new Promise((r,n)=>{const a=new S4.SaxesParser,s=[];a.on("error",n),a.on("opentag",o=>{s.push(o.name)}),a.on("closetag",o=>{s.pop()}),a.on("text",o=>{this.stackEquals(s,["sparql","boolean"])&&r(o==="true")}),e.on("error",n).on("data",o=>a.write(o)).on("end",()=>n(new Error("No valid ASK response was found.")))})}stackEquals(e,r){return e.length===r.length&&e.every((n,a)=>r[a]===n)}stackBeginsWith(e,r){return e.length>=r.length&&r.every((n,a)=>e[a]===n)}}I2.SparqlXmlParser=Zde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(I2,t)})(cL);Object.defineProperty(x2,"__esModule",{value:!0});x2.SparqlEndpointFetcher=void 0;const T4=xg,E4=o0,efe=aR,tfe=cL,rfe=wl,nfe=U0,ife=rc,afe=D7;class Bi{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 efe.SparqlJsonParser(e),this.sparqlXmlParser=new tfe.SparqlXmlParser(e),this.sparqlParsers={[Bi.CONTENTTYPE_SPARQL_JSON]:{parseBooleanStream:r=>this.sparqlJsonParser.parseJsonBooleanStream(r),parseResultsStream:r=>this.sparqlJsonParser.parseJsonResultsStream(r)},[Bi.CONTENTTYPE_SPARQL_XML]:{parseBooleanStream:r=>this.sparqlXmlParser.parseXmlBooleanStream(r),parseResultsStream:r=>this.sparqlXmlParser.parseXmlResultsStream(r)}},this.timeout=e.timeout}getQueryType(e){const r=new E4.Parser({sparqlStar:!0}).parse(e);return r.type==="query"?r.queryType==="DESCRIBE"?"CONSTRUCT":r.queryType:"UNKNOWN"}getUpdateTypes(e){const r=new E4.Parser({sparqlStar:!0}).parse(e);if(r.type==="update"){const n={};for(const a of r.updates)"type"in a?n[a.type]=!0:n[a.updateType]=!0;return n}else return"UNKNOWN"}async fetchBindings(e,r){const[n,a]=await this.fetchRawStream(e,r,Bi.CONTENTTYPE_SPARQL),s=this.sparqlParsers[n];if(!s)throw new Error("Unknown SPARQL results content type: "+n);return s.parseResultsStream(a)}async fetchAsk(e,r){const[n,a]=await this.fetchRawStream(e,r,Bi.CONTENTTYPE_SPARQL),s=this.sparqlParsers[n];if(!s)throw new Error("Unknown SPARQL results content type: "+n);return s.parseBooleanStream(a)}async fetchTriples(e,r){return(await this.fetchRawStream(e,r,Bi.CONTENTTYPE_TURTLE))[1].pipe(new ife.StreamParser({format:Bi.CONTENTTYPE_TURTLE}))}async fetchUpdate(e,r){const n=new T4.default,a={};this.defaultHeaders.forEach((o,u)=>{a[u]=o});const s={method:"POST",headers:Object.assign(Object.assign({},a),{"content-type":"application/sparql-update"}),body:r,signal:n.signal};await this.handleFetchCall(e,s,{ignoreBody:!0}),n.abort()}async fetchRawStream(e,r,n){let a=this.method==="POST"?e:e+"?query="+encodeURIComponent(r);const s=new Headers(this.defaultHeaders);let o;return s.append("Accept",n),this.method==="POST"?(s.append("Content-Type","application/x-www-form-urlencoded"),o=new URLSearchParams,o.set("query",r),this.additionalUrlParams.forEach((u,c)=>{o.set(c,u)}),s.append("Content-Length",o.toString().length.toString())):this.additionalUrlParams.toString()!==""&&(a+=`&${this.additionalUrlParams.toString()}`),this.handleFetchCall(a,{headers:s,method:this.method,body:o})}async handleFetchCall(e,r,n={}){let a;if(this.timeout){const c=new T4.default;r.signal=c.signal,a=setTimeout(()=>c.abort(),this.timeout)}const s=await(this.fetchCb||fetch)(e,r);clearTimeout(a);let o;n.ignoreBody||(o=afe(s.body)?s.body:new nfe.ReadableWebToNodeStream(s.body));let u=s.headers.get("Content-Type")||"";if(u.indexOf(";")>0&&(u=u.substr(0,u.indexOf(";"))),!s.ok){const c=/^[^?]*/u.exec(e)[0];let l="empty response";throw o&&(l=await rfe(o)),new Error(`Invalid SPARQL endpoint response from ${c} (HTTP status ${s.status}): -${l}`)}return[u,o]}}Bi.CONTENTTYPE_SPARQL_JSON="application/sparql-results+json";Bi.CONTENTTYPE_SPARQL_XML="application/sparql-results+xml";Bi.CONTENTTYPE_SPARQL=`${Bi.CONTENTTYPE_SPARQL_JSON};q=1.0,${Bi.CONTENTTYPE_SPARQL_XML};q=0.7`;Bi.CONTENTTYPE_TURTLE="text/turtle";x2.SparqlEndpointFetcher=Bi;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(x2,t)})(R2);var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0});Pa.LRUCache=void 0;const hh=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,lL=new Set,oO=typeof process=="object"&&process?process:{},dL=(t,e,r,n)=>{typeof oO.emitWarning=="function"?oO.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)};let Lb=globalThis.AbortController,O4=globalThis.AbortSignal;var u8;if(typeof Lb>"u"){O4=class{constructor(){$r(this,"onabort");$r(this,"_onabort",[]);$r(this,"reason");$r(this,"aborted",!1)}addEventListener(n,a){this._onabort.push(a)}},Lb=class{constructor(){$r(this,"signal",new O4);e()}abort(n){var a,s;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(const o of this.signal._onabort)o(n);(s=(a=this.signal).onabort)==null||s.call(a,n)}}};let t=((u8=oO.env)==null?void 0:u8.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,dL("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",e))}}const sfe=t=>!lL.has(t),yu=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),fL=t=>yu(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?tb:null:null;class tb extends Array{constructor(e){super(e),this.fill(0)}}var Od;const qc=class qc{constructor(e,r){$r(this,"heap");$r(this,"length");if(!fe(qc,Od))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=fL(e);if(!r)return[];ut(qc,Od,!0);const n=new qc(e,r);return ut(qc,Od,!1),n}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Od=new WeakMap,wt(qc,Od,!1);let uO=qc;var Qa,zi,Ga,za,Ad,ln,Wa,dn,Sr,_t,yi,Wi,zn,vn,Xa,wn,To,Eo,Ka,Ja,Pu,bi,Dp,lO,Qc,Oo,Np,Xi,Ub,hL,Gc,Rd,Cp,Os,bu,As,_u,jp,dO,xd,rb,Id,nb,pr,Cr,Mp,fO,zc,Hh;const Ex=class Ex{constructor(e){wt(this,Dp);wt(this,Ub);wt(this,Os);wt(this,As);wt(this,jp);wt(this,xd);wt(this,Id);wt(this,pr);wt(this,Mp);wt(this,zc);wt(this,Qa,void 0);wt(this,zi,void 0);wt(this,Ga,void 0);wt(this,za,void 0);wt(this,Ad,void 0);$r(this,"ttl");$r(this,"ttlResolution");$r(this,"ttlAutopurge");$r(this,"updateAgeOnGet");$r(this,"updateAgeOnHas");$r(this,"allowStale");$r(this,"noDisposeOnSet");$r(this,"noUpdateTTL");$r(this,"maxEntrySize");$r(this,"sizeCalculation");$r(this,"noDeleteOnFetchRejection");$r(this,"noDeleteOnStaleGet");$r(this,"allowStaleOnFetchAbort");$r(this,"allowStaleOnFetchRejection");$r(this,"ignoreFetchAbort");wt(this,ln,void 0);wt(this,Wa,void 0);wt(this,dn,void 0);wt(this,Sr,void 0);wt(this,_t,void 0);wt(this,yi,void 0);wt(this,Wi,void 0);wt(this,zn,void 0);wt(this,vn,void 0);wt(this,Xa,void 0);wt(this,wn,void 0);wt(this,To,void 0);wt(this,Eo,void 0);wt(this,Ka,void 0);wt(this,Ja,void 0);wt(this,Pu,void 0);wt(this,bi,void 0);wt(this,Qc,()=>{});wt(this,Oo,()=>{});wt(this,Np,()=>{});wt(this,Xi,()=>!1);wt(this,Gc,e=>{});wt(this,Rd,(e,r,n)=>{});wt(this,Cp,(e,r,n,a)=>{if(n||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});const{max:r=0,ttl:n,ttlResolution:a=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:u,allowStale:c,dispose:l,disposeAfter:d,noDisposeOnSet:f,noUpdateTTL:h,maxSize:p=0,maxEntrySize:b=0,sizeCalculation:_,fetchMethod:E,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:T,ignoreFetchAbort:I}=e;if(r!==0&&!yu(r))throw new TypeError("max option must be a nonnegative integer");const D=r?fL(r):Array;if(!D)throw new Error("invalid max value: "+r);if(ut(this,Qa,r),ut(this,zi,p),this.maxEntrySize=b||fe(this,zi),this.sizeCalculation=_,this.sizeCalculation){if(!fe(this,zi)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(E!==void 0&&typeof E!="function")throw new TypeError("fetchMethod must be a function if specified");if(ut(this,Ad,E),ut(this,Pu,!!E),ut(this,dn,new Map),ut(this,Sr,new Array(r).fill(void 0)),ut(this,_t,new Array(r).fill(void 0)),ut(this,yi,new D(r)),ut(this,Wi,new D(r)),ut(this,zn,0),ut(this,vn,0),ut(this,Xa,uO.create(r)),ut(this,ln,0),ut(this,Wa,0),typeof l=="function"&&ut(this,Ga,l),typeof d=="function"?(ut(this,za,d),ut(this,wn,[])):(ut(this,za,void 0),ut(this,wn,void 0)),ut(this,Ja,!!fe(this,Ga)),ut(this,bi,!!fe(this,za)),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!A,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!I,this.maxEntrySize!==0){if(fe(this,zi)!==0&&!yu(fe(this,zi)))throw new TypeError("maxSize must be a positive integer if specified");if(!yu(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");it(this,Ub,hL).call(this)}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!u,this.ttlResolution=yu(a)||a===0?a:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!yu(this.ttl))throw new TypeError("ttl must be a positive integer if specified");it(this,Dp,lO).call(this)}if(fe(this,Qa)===0&&this.ttl===0&&fe(this,zi)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!fe(this,Qa)&&!fe(this,zi)){const U="LRU_CACHE_UNBOUNDED";sfe(U)&&(lL.add(U),dL("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",U,Ex))}}static unsafeExposeInternals(e){return{starts:fe(e,Eo),ttls:fe(e,Ka),sizes:fe(e,To),keyMap:fe(e,dn),keyList:fe(e,Sr),valList:fe(e,_t),next:fe(e,yi),prev:fe(e,Wi),get head(){return fe(e,zn)},get tail(){return fe(e,vn)},free:fe(e,Xa),isBackgroundFetch:r=>{var n;return it(n=e,pr,Cr).call(n,r)},backgroundFetch:(r,n,a,s)=>{var o;return it(o=e,Id,nb).call(o,r,n,a,s)},moveToTail:r=>{var n;return it(n=e,zc,Hh).call(n,r)},indexes:r=>{var n;return it(n=e,Os,bu).call(n,r)},rindexes:r=>{var n;return it(n=e,As,_u).call(n,r)},isStale:r=>{var n;return fe(n=e,Xi).call(n,r)}}}get max(){return fe(this,Qa)}get maxSize(){return fe(this,zi)}get calculatedSize(){return fe(this,Wa)}get size(){return fe(this,ln)}get fetchMethod(){return fe(this,Ad)}get dispose(){return fe(this,Ga)}get disposeAfter(){return fe(this,za)}getRemainingTTL(e){return fe(this,dn).has(e)?1/0:0}*entries(){for(const e of it(this,Os,bu).call(this))fe(this,_t)[e]!==void 0&&fe(this,Sr)[e]!==void 0&&!it(this,pr,Cr).call(this,fe(this,_t)[e])&&(yield[fe(this,Sr)[e],fe(this,_t)[e]])}*rentries(){for(const e of it(this,As,_u).call(this))fe(this,_t)[e]!==void 0&&fe(this,Sr)[e]!==void 0&&!it(this,pr,Cr).call(this,fe(this,_t)[e])&&(yield[fe(this,Sr)[e],fe(this,_t)[e]])}*keys(){for(const e of it(this,Os,bu).call(this)){const r=fe(this,Sr)[e];r!==void 0&&!it(this,pr,Cr).call(this,fe(this,_t)[e])&&(yield r)}}*rkeys(){for(const e of it(this,As,_u).call(this)){const r=fe(this,Sr)[e];r!==void 0&&!it(this,pr,Cr).call(this,fe(this,_t)[e])&&(yield r)}}*values(){for(const e of it(this,Os,bu).call(this))fe(this,_t)[e]!==void 0&&!it(this,pr,Cr).call(this,fe(this,_t)[e])&&(yield fe(this,_t)[e])}*rvalues(){for(const e of it(this,As,_u).call(this))fe(this,_t)[e]!==void 0&&!it(this,pr,Cr).call(this,fe(this,_t)[e])&&(yield fe(this,_t)[e])}[Symbol.iterator](){return this.entries()}find(e,r={}){for(const n of it(this,Os,bu).call(this)){const a=fe(this,_t)[n],s=it(this,pr,Cr).call(this,a)?a.__staleWhileFetching:a;if(s!==void 0&&e(s,fe(this,Sr)[n],this))return this.get(fe(this,Sr)[n],r)}}forEach(e,r=this){for(const n of it(this,Os,bu).call(this)){const a=fe(this,_t)[n],s=it(this,pr,Cr).call(this,a)?a.__staleWhileFetching:a;s!==void 0&&e.call(r,s,fe(this,Sr)[n],this)}}rforEach(e,r=this){for(const n of it(this,As,_u).call(this)){const a=fe(this,_t)[n],s=it(this,pr,Cr).call(this,a)?a.__staleWhileFetching:a;s!==void 0&&e.call(r,s,fe(this,Sr)[n],this)}}purgeStale(){let e=!1;for(const r of it(this,As,_u).call(this,{allowStale:!0}))fe(this,Xi).call(this,r)&&(this.delete(fe(this,Sr)[r]),e=!0);return e}dump(){const e=[];for(const r of it(this,Os,bu).call(this,{allowStale:!0})){const n=fe(this,Sr)[r],a=fe(this,_t)[r],s=it(this,pr,Cr).call(this,a)?a.__staleWhileFetching:a;if(s===void 0||n===void 0)continue;const o={value:s};if(fe(this,Ka)&&fe(this,Eo)){o.ttl=fe(this,Ka)[r];const u=hh.now()-fe(this,Eo)[r];o.start=Math.floor(Date.now()-u)}fe(this,To)&&(o.size=fe(this,To)[r]),e.unshift([n,o])}return e}load(e){this.clear();for(const[r,n]of e){if(n.start){const a=Date.now()-n.start;n.start=hh.now()-a}this.set(r,n.value,n)}}set(e,r,n={}){var h,p,b,_,E;if(r===void 0)return this.delete(e),this;const{ttl:a=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:c}=n;let{noUpdateTTL:l=this.noUpdateTTL}=n;const d=fe(this,Cp).call(this,e,r,n.size||0,u);if(this.maxEntrySize&&d>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.delete(e),this;let f=fe(this,ln)===0?void 0:fe(this,dn).get(e);if(f===void 0)f=fe(this,ln)===0?fe(this,vn):fe(this,Xa).length!==0?fe(this,Xa).pop():fe(this,ln)===fe(this,Qa)?it(this,xd,rb).call(this,!1):fe(this,ln),fe(this,Sr)[f]=e,fe(this,_t)[f]=r,fe(this,dn).set(e,f),fe(this,yi)[fe(this,vn)]=f,fe(this,Wi)[f]=fe(this,vn),ut(this,vn,f),Sy(this,ln)._++,fe(this,Rd).call(this,f,d,c),c&&(c.set="add"),l=!1;else{it(this,zc,Hh).call(this,f);const w=fe(this,_t)[f];if(r!==w){if(fe(this,Pu)&&it(this,pr,Cr).call(this,w)){w.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:O}=w;O!==void 0&&!o&&(fe(this,Ja)&&((h=fe(this,Ga))==null||h.call(this,O,e,"set")),fe(this,bi)&&((p=fe(this,wn))==null||p.push([O,e,"set"])))}else o||(fe(this,Ja)&&((b=fe(this,Ga))==null||b.call(this,w,e,"set")),fe(this,bi)&&((_=fe(this,wn))==null||_.push([w,e,"set"])));if(fe(this,Gc).call(this,f),fe(this,Rd).call(this,f,d,c),fe(this,_t)[f]=r,c){c.set="replace";const O=w&&it(this,pr,Cr).call(this,w)?w.__staleWhileFetching:w;O!==void 0&&(c.oldValue=O)}}else c&&(c.set="update")}if(a!==0&&!fe(this,Ka)&&it(this,Dp,lO).call(this),fe(this,Ka)&&(l||fe(this,Np).call(this,f,a,s),c&&fe(this,Oo).call(this,c,f)),!o&&fe(this,bi)&&fe(this,wn)){const w=fe(this,wn);let O;for(;O=w==null?void 0:w.shift();)(E=fe(this,za))==null||E.call(this,...O)}return this}pop(){var e;try{for(;fe(this,ln);){const r=fe(this,_t)[fe(this,zn)];if(it(this,xd,rb).call(this,!0),it(this,pr,Cr).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(fe(this,bi)&&fe(this,wn)){const r=fe(this,wn);let n;for(;n=r==null?void 0:r.shift();)(e=fe(this,za))==null||e.call(this,...n)}}}has(e,r={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:a}=r,s=fe(this,dn).get(e);if(s!==void 0){const o=fe(this,_t)[s];if(it(this,pr,Cr).call(this,o)&&o.__staleWhileFetching===void 0)return!1;if(fe(this,Xi).call(this,s))a&&(a.has="stale",fe(this,Oo).call(this,a,s));else return n&&fe(this,Qc).call(this,s),a&&(a.has="hit",fe(this,Oo).call(this,a,s)),!0}else a&&(a.has="miss");return!1}peek(e,r={}){const{allowStale:n=this.allowStale}=r,a=fe(this,dn).get(e);if(a!==void 0&&(n||!fe(this,Xi).call(this,a))){const s=fe(this,_t)[a];return it(this,pr,Cr).call(this,s)?s.__staleWhileFetching:s}}async fetch(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:b=this.allowStaleOnFetchAbort,context:_,forceRefresh:E=!1,status:w,signal:O}=r;if(!fe(this,Pu))return w&&(w.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:a,noDeleteOnStaleGet:s,status:w});const A={allowStale:n,updateAgeOnGet:a,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:u,size:c,sizeCalculation:l,noUpdateTTL:d,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:b,ignoreFetchAbort:p,status:w,signal:O};let T=fe(this,dn).get(e);if(T===void 0){w&&(w.fetch="miss");const I=it(this,Id,nb).call(this,e,T,A,_);return I.__returned=I}else{const I=fe(this,_t)[T];if(it(this,pr,Cr).call(this,I)){const x=n&&I.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",x&&(w.returnedStale=!0)),x?I.__staleWhileFetching:I.__returned=I}const D=fe(this,Xi).call(this,T);if(!E&&!D)return w&&(w.fetch="hit"),it(this,zc,Hh).call(this,T),a&&fe(this,Qc).call(this,T),w&&fe(this,Oo).call(this,w,T),I;const U=it(this,Id,nb).call(this,e,T,A,_),N=U.__staleWhileFetching!==void 0&&n;return w&&(w.fetch=D?"stale":"refresh",N&&D&&(w.returnedStale=!0)),N?U.__staleWhileFetching:U.__returned=U}}get(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=r,u=fe(this,dn).get(e);if(u!==void 0){const c=fe(this,_t)[u],l=it(this,pr,Cr).call(this,c);return o&&fe(this,Oo).call(this,o,u),fe(this,Xi).call(this,u)?(o&&(o.get="stale"),l?(o&&n&&c.__staleWhileFetching!==void 0&&(o.returnedStale=!0),n?c.__staleWhileFetching:void 0):(s||this.delete(e),o&&n&&(o.returnedStale=!0),n?c:void 0)):(o&&(o.get="hit"),l?c.__staleWhileFetching:(it(this,zc,Hh).call(this,u),a&&fe(this,Qc).call(this,u),c))}else o&&(o.get="miss")}delete(e){var n,a,s,o;let r=!1;if(fe(this,ln)!==0){const u=fe(this,dn).get(e);if(u!==void 0)if(r=!0,fe(this,ln)===1)this.clear();else{fe(this,Gc).call(this,u);const c=fe(this,_t)[u];it(this,pr,Cr).call(this,c)?c.__abortController.abort(new Error("deleted")):(fe(this,Ja)||fe(this,bi))&&(fe(this,Ja)&&((n=fe(this,Ga))==null||n.call(this,c,e,"delete")),fe(this,bi)&&((a=fe(this,wn))==null||a.push([c,e,"delete"]))),fe(this,dn).delete(e),fe(this,Sr)[u]=void 0,fe(this,_t)[u]=void 0,u===fe(this,vn)?ut(this,vn,fe(this,Wi)[u]):u===fe(this,zn)?ut(this,zn,fe(this,yi)[u]):(fe(this,yi)[fe(this,Wi)[u]]=fe(this,yi)[u],fe(this,Wi)[fe(this,yi)[u]]=fe(this,Wi)[u]),Sy(this,ln)._--,fe(this,Xa).push(u)}}if(fe(this,bi)&&((s=fe(this,wn))!=null&&s.length)){const u=fe(this,wn);let c;for(;c=u==null?void 0:u.shift();)(o=fe(this,za))==null||o.call(this,...c)}return r}clear(){var e,r,n;for(const a of it(this,As,_u).call(this,{allowStale:!0})){const s=fe(this,_t)[a];if(it(this,pr,Cr).call(this,s))s.__abortController.abort(new Error("deleted"));else{const o=fe(this,Sr)[a];fe(this,Ja)&&((e=fe(this,Ga))==null||e.call(this,s,o,"delete")),fe(this,bi)&&((r=fe(this,wn))==null||r.push([s,o,"delete"]))}}if(fe(this,dn).clear(),fe(this,_t).fill(void 0),fe(this,Sr).fill(void 0),fe(this,Ka)&&fe(this,Eo)&&(fe(this,Ka).fill(0),fe(this,Eo).fill(0)),fe(this,To)&&fe(this,To).fill(0),ut(this,zn,0),ut(this,vn,0),fe(this,Xa).length=0,ut(this,Wa,0),ut(this,ln,0),fe(this,bi)&&fe(this,wn)){const a=fe(this,wn);let s;for(;s=a==null?void 0:a.shift();)(n=fe(this,za))==null||n.call(this,...s)}}};Qa=new WeakMap,zi=new WeakMap,Ga=new WeakMap,za=new WeakMap,Ad=new WeakMap,ln=new WeakMap,Wa=new WeakMap,dn=new WeakMap,Sr=new WeakMap,_t=new WeakMap,yi=new WeakMap,Wi=new WeakMap,zn=new WeakMap,vn=new WeakMap,Xa=new WeakMap,wn=new WeakMap,To=new WeakMap,Eo=new WeakMap,Ka=new WeakMap,Ja=new WeakMap,Pu=new WeakMap,bi=new WeakMap,Dp=new WeakSet,lO=function(){const e=new tb(fe(this,Qa)),r=new tb(fe(this,Qa));ut(this,Ka,e),ut(this,Eo,r),ut(this,Np,(s,o,u=hh.now())=>{if(r[s]=o!==0?u:0,e[s]=o,o!==0&&this.ttlAutopurge){const c=setTimeout(()=>{fe(this,Xi).call(this,s)&&this.delete(fe(this,Sr)[s])},o+1);c.unref&&c.unref()}}),ut(this,Qc,s=>{r[s]=e[s]!==0?hh.now():0}),ut(this,Oo,(s,o)=>{if(e[o]){const u=e[o],c=r[o];s.ttl=u,s.start=c,s.now=n||a();const l=s.now-c;s.remainingTTL=u-l}});let n=0;const a=()=>{const s=hh.now();if(this.ttlResolution>0){n=s;const o=setTimeout(()=>n=0,this.ttlResolution);o.unref&&o.unref()}return s};this.getRemainingTTL=s=>{const o=fe(this,dn).get(s);if(o===void 0)return 0;const u=e[o],c=r[o];if(u===0||c===0)return 1/0;const l=(n||a())-c;return u-l},ut(this,Xi,s=>e[s]!==0&&r[s]!==0&&(n||a())-r[s]>e[s])},Qc=new WeakMap,Oo=new WeakMap,Np=new WeakMap,Xi=new WeakMap,Ub=new WeakSet,hL=function(){const e=new tb(fe(this,Qa));ut(this,Wa,0),ut(this,To,e),ut(this,Gc,r=>{ut(this,Wa,fe(this,Wa)-e[r]),e[r]=0}),ut(this,Cp,(r,n,a,s)=>{if(it(this,pr,Cr).call(this,n))return 0;if(!yu(a))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(a=s(n,r),!yu(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a}),ut(this,Rd,(r,n,a)=>{if(e[r]=n,fe(this,zi)){const s=fe(this,zi)-e[r];for(;fe(this,Wa)>s;)it(this,xd,rb).call(this,!0)}ut(this,Wa,fe(this,Wa)+e[r]),a&&(a.entrySize=n,a.totalCalculatedSize=fe(this,Wa))})},Gc=new WeakMap,Rd=new WeakMap,Cp=new WeakMap,Os=new WeakSet,bu=function*({allowStale:e=this.allowStale}={}){if(fe(this,ln))for(let r=fe(this,vn);!(!it(this,jp,dO).call(this,r)||((e||!fe(this,Xi).call(this,r))&&(yield r),r===fe(this,zn)));)r=fe(this,Wi)[r]},As=new WeakSet,_u=function*({allowStale:e=this.allowStale}={}){if(fe(this,ln))for(let r=fe(this,zn);!(!it(this,jp,dO).call(this,r)||((e||!fe(this,Xi).call(this,r))&&(yield r),r===fe(this,vn)));)r=fe(this,yi)[r]},jp=new WeakSet,dO=function(e){return e!==void 0&&fe(this,dn).get(fe(this,Sr)[e])===e},xd=new WeakSet,rb=function(e){var s,o;const r=fe(this,zn),n=fe(this,Sr)[r],a=fe(this,_t)[r];return fe(this,Pu)&&it(this,pr,Cr).call(this,a)?a.__abortController.abort(new Error("evicted")):(fe(this,Ja)||fe(this,bi))&&(fe(this,Ja)&&((s=fe(this,Ga))==null||s.call(this,a,n,"evict")),fe(this,bi)&&((o=fe(this,wn))==null||o.push([a,n,"evict"]))),fe(this,Gc).call(this,r),e&&(fe(this,Sr)[r]=void 0,fe(this,_t)[r]=void 0,fe(this,Xa).push(r)),fe(this,ln)===1?(ut(this,zn,ut(this,vn,0)),fe(this,Xa).length=0):ut(this,zn,fe(this,yi)[r]),fe(this,dn).delete(n),Sy(this,ln)._--,r},Id=new WeakSet,nb=function(e,r,n,a){const s=r===void 0?void 0:fe(this,_t)[r];if(it(this,pr,Cr).call(this,s))return s;const o=new Lb,{signal:u}=n;u==null||u.addEventListener("abort",()=>o.abort(u.reason),{signal:o.signal});const c={signal:o.signal,options:n,context:a},l=(_,E=!1)=>{const{aborted:w}=o.signal,O=n.ignoreFetchAbort&&_!==void 0;if(n.status&&(w&&!E?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,O&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),w&&!O&&!E)return f(o.signal.reason);const A=p;return fe(this,_t)[r]===p&&(_===void 0?A.__staleWhileFetching?fe(this,_t)[r]=A.__staleWhileFetching:this.delete(e):(n.status&&(n.status.fetchUpdated=!0),this.set(e,_,c.options))),_},d=_=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=_),f(_)),f=_=>{const{aborted:E}=o.signal,w=E&&n.allowStaleOnFetchAbort,O=w||n.allowStaleOnFetchRejection,A=O||n.noDeleteOnFetchRejection,T=p;if(fe(this,_t)[r]===p&&(!A||T.__staleWhileFetching===void 0?this.delete(e):w||(fe(this,_t)[r]=T.__staleWhileFetching)),O)return n.status&&T.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)throw _},h=(_,E)=>{var O;const w=(O=fe(this,Ad))==null?void 0:O.call(this,e,s,c);w&&w instanceof Promise&&w.then(A=>_(A===void 0?void 0:A),E),o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(_(void 0),n.allowStaleOnFetchAbort&&(_=A=>l(A,!0)))})};n.status&&(n.status.fetchDispatched=!0);const p=new Promise(h).then(l,d),b=Object.assign(p,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,b,{...c.options,status:void 0}),r=fe(this,dn).get(e)):fe(this,_t)[r]=b,b},pr=new WeakSet,Cr=function(e){if(!fe(this,Pu))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Lb},Mp=new WeakSet,fO=function(e,r){fe(this,Wi)[r]=e,fe(this,yi)[e]=r},zc=new WeakSet,Hh=function(e){e!==fe(this,vn)&&(e===fe(this,zn)?ut(this,zn,fe(this,yi)[e]):it(this,Mp,fO).call(this,fe(this,Wi)[e],fe(this,yi)[e]),it(this,Mp,fO).call(this,fe(this,vn),e),ut(this,vn,e))};let cO=Ex;Pa.LRUCache=cO;Object.defineProperty(A2,"__esModule",{value:!0});A2.RdfSourceSparql=void 0;const ofe=$n,A4=Ut,ufe=R2,cfe=Pa,lfe=ht,Jl=An,hO=xt,Nc=new lfe.DataFactory,dfe=new ofe.BindingsFactory,ffe=Nc.variable("count");class mn{constructor(e,r,n,a,s){this.url=e,this.context=r,this.mediatorHttp=n,this.endpointFetcher=new ufe.SparqlEndpointFetcher({method:a?"GET":"POST",fetch:(o,u)=>this.mediatorHttp.mediate({input:o,init:u,context:this.context}),prefixVariableQuestionMark:!0}),this.cache=s>0?new cfe.LRUCache({max:s}):void 0}static replaceBlankNodes(e){const r=(0,Jl.getVariables)((0,Jl.getTerms)(e)).map(o=>o.value),n={};let a=!1;const s=(0,Jl.mapTermsNested)(e,o=>{if(o.termType==="BlankNode"){let u=o.value;if(n[u])u=n[u];else{if(r.includes(u)){let c=0;for(;r.includes(`${u}${c}`);)++c;u+=c}n[o.value]=u,r.push(u)}return a=!0,Nc.variable(u)}return o});return a?s:e}static patternToBgp(e){return mn.FACTORY.createBgp([mn.FACTORY.createPattern(e.subject,e.predicate,e.object,e.graph)])}static patternToSelectQuery(e){const r=(0,Jl.getVariables)((0,Jl.getTerms)(e));return(0,hO.toSparql)(mn.FACTORY.createProject(mn.patternToBgp(e),r),{sparqlStar:!0})}static patternToCountQuery(e){return(0,hO.toSparql)(mn.FACTORY.createProject(mn.FACTORY.createExtend(mn.FACTORY.createGroup(mn.patternToBgp(e),[],[mn.FACTORY.createBoundAggregate(Nc.variable("var0"),"count",mn.FACTORY.createWildcardExpression(),!1)]),Nc.variable("count"),mn.FACTORY.createTermExpression(Nc.variable("var0"))),[Nc.variable("count")]),{sparqlStar:!0})}async queryBindings(e,r){const n=await this.endpointFetcher.fetchBindings(e,r);return(0,A4.wrap)(n,{autoStart:!1,maxBufferSize:Number.POSITIVE_INFINITY}).map(a=>dfe.bindings(Object.entries(a).map(([s,o])=>[Nc.variable(s.slice(1)),o])))}match(e,r,n,a){const s=mn.replaceBlankNodes(mn.FACTORY.createPattern(e,r,n,a)),o=mn.patternToCountQuery(s),u=mn.patternToSelectQuery(s);new Promise(async(l,d)=>{var f;try{const h=(f=this.cache)==null?void 0:f.get(o);if(h!==void 0)return l(h);const p=await this.queryBindings(this.url,o);p.on("data",b=>{var w;const _=b.get(ffe),E={type:"estimate",value:Number.POSITIVE_INFINITY};if(_){const O=Number.parseInt(_.value,10);Number.isNaN(O)||(E.type="exact",E.value=O,(w=this.cache)==null||w.set(o,E))}return l(E)}),p.on("error",()=>l({type:"estimate",value:Number.POSITIVE_INFINITY})),p.on("end",()=>l({type:"estimate",value:Number.POSITIVE_INFINITY}))}catch(h){d(h)}}).then(l=>c.setProperty("metadata",{cardinality:l,canContainUndefs:!1})).catch(()=>c.setProperty("metadata",{cardinality:{type:"estimate",value:Number.POSITIVE_INFINITY},canContainUndefs:!1}));const c=new A4.TransformIterator(async()=>this.queryBindings(this.url,u),{autoStart:!1}).transform({map:l=>(0,Jl.mapTermsNested)(s,d=>{if(d.termType==="Variable"){const f=l.get(d);return f||c.destroy(new Error(`The endpoint ${this.url} failed to provide a binding for ${d.value}.`)),f}return d}),autoStart:!1});return c}}A2.RdfSourceSparql=mn;mn.FACTORY=new hO.Factory;Object.defineProperty(O2,"__esModule",{value:!0});O2.ActorRdfResolveHypermediaSparql=void 0;const hfe=tv,pfe=A2;class yfe extends hfe.ActorRdfResolveHypermedia{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 pfe.RdfSourceSparql(e.metadata.sparqlService||e.url,e.context,this.mediatorHttp,this.forceHttpGet,this.cacheSize)}}}O2.ActorRdfResolveHypermediaSparql=yfe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(O2,t)})(uL);var pL={},P2={},D2={},N2={};Object.defineProperty(N2,"__esModule",{value:!0});N2.ActorRdfUpdateHypermedia=void 0;const bfe=et;class _fe extends bfe.Actor{constructor(e,r){super(e),this.destinationType=r}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)}}N2.ActorRdfUpdateHypermedia=_fe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(N2,t)})(D2);var k0={},pO={exports:{}};(function(t,e){var r=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof m<"u"&&m,n=function(){function s(){this.fetch=!1,this.DOMException=r.DOMException}return s.prototype=r,new s}();(function(s){(function(o){var u=typeof s<"u"&&s||typeof self<"u"&&self||typeof u<"u"&&u,c={searchParams:"URLSearchParams"in u,iterable:"Symbol"in u&&"iterator"in Symbol,blob:"FileReader"in u&&"Blob"in u&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in u,arrayBuffer:"ArrayBuffer"in u};function l(j){return j&&DataView.prototype.isPrototypeOf(j)}if(c.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(j){return j&&d.indexOf(Object.prototype.toString.call(j))>-1};function h(j){if(typeof j!="string"&&(j=String(j)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(j)||j==="")throw new TypeError('Invalid character in header field name: "'+j+'"');return j.toLowerCase()}function p(j){return typeof j!="string"&&(j=String(j)),j}function b(j){var Q={next:function(){var se=j.shift();return{done:se===void 0,value:se}}};return c.iterable&&(Q[Symbol.iterator]=function(){return Q}),Q}function _(j){this.map={},j instanceof _?j.forEach(function(Q,se){this.append(se,Q)},this):Array.isArray(j)?j.forEach(function(Q){this.append(Q[0],Q[1])},this):j&&Object.getOwnPropertyNames(j).forEach(function(Q){this.append(Q,j[Q])},this)}_.prototype.append=function(j,Q){j=h(j),Q=p(Q);var se=this.map[j];this.map[j]=se?se+", "+Q:Q},_.prototype.delete=function(j){delete this.map[h(j)]},_.prototype.get=function(j){return j=h(j),this.has(j)?this.map[j]:null},_.prototype.has=function(j){return this.map.hasOwnProperty(h(j))},_.prototype.set=function(j,Q){this.map[h(j)]=p(Q)},_.prototype.forEach=function(j,Q){for(var se in this.map)this.map.hasOwnProperty(se)&&j.call(Q,this.map[se],se,this)},_.prototype.keys=function(){var j=[];return this.forEach(function(Q,se){j.push(se)}),b(j)},_.prototype.values=function(){var j=[];return this.forEach(function(Q){j.push(Q)}),b(j)},_.prototype.entries=function(){var j=[];return this.forEach(function(Q,se){j.push([se,Q])}),b(j)},c.iterable&&(_.prototype[Symbol.iterator]=_.prototype.entries);function E(j){if(j.bodyUsed)return Promise.reject(new TypeError("Already read"));j.bodyUsed=!0}function w(j){return new Promise(function(Q,se){j.onload=function(){Q(j.result)},j.onerror=function(){se(j.error)}})}function O(j){var Q=new FileReader,se=w(Q);return Q.readAsArrayBuffer(j),se}function A(j){var Q=new FileReader,se=w(Q);return Q.readAsText(j),se}function T(j){for(var Q=new Uint8Array(j),se=new Array(Q.length),ie=0;ie-1?Q:j}function N(j,Q){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');Q=Q||{};var se=Q.body;if(j instanceof N){if(j.bodyUsed)throw new TypeError("Already read");this.url=j.url,this.credentials=j.credentials,Q.headers||(this.headers=new _(j.headers)),this.method=j.method,this.mode=j.mode,this.signal=j.signal,!se&&j._bodyInit!=null&&(se=j._bodyInit,j.bodyUsed=!0)}else this.url=String(j);if(this.credentials=Q.credentials||this.credentials||"same-origin",(Q.headers||!this.headers)&&(this.headers=new _(Q.headers)),this.method=H(Q.method||this.method||"GET"),this.mode=Q.mode||this.mode||null,this.signal=Q.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&se)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(se),(this.method==="GET"||this.method==="HEAD")&&(Q.cache==="no-store"||Q.cache==="no-cache")){var ie=/([?&])_=[^&]*/;if(ie.test(this.url))this.url=this.url.replace(ie,"$1_="+new Date().getTime());else{var be=/\?/;this.url+=(be.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}N.prototype.clone=function(){return new N(this,{body:this._bodyInit})};function x(j){var Q=new FormData;return j.trim().split("&").forEach(function(se){if(se){var ie=se.split("="),be=ie.shift().replace(/\+/g," "),he=ie.join("=").replace(/\+/g," ");Q.append(decodeURIComponent(be),decodeURIComponent(he))}}),Q}function F(j){var Q=new _,se=j.replace(/\r?\n[\t ]+/g," ");return se.split("\r").map(function(ie){return ie.indexOf(` -`)===0?ie.substr(1,ie.length):ie}).forEach(function(ie){var be=ie.split(":"),he=be.shift().trim();if(he){var Te=be.join(":").trim();Q.append(he,Te)}}),Q}D.call(N.prototype);function X(j,Q){if(!(this instanceof X))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');Q||(Q={}),this.type="default",this.status=Q.status===void 0?200:Q.status,this.ok=this.status>=200&&this.status<300,this.statusText=Q.statusText===void 0?"":""+Q.statusText,this.headers=new _(Q.headers),this.url=Q.url||"",this._initBody(j)}D.call(X.prototype),X.prototype.clone=function(){return new X(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _(this.headers),url:this.url})},X.error=function(){var j=new X(null,{status:0,statusText:""});return j.type="error",j};var ne=[301,302,303,307,308];X.redirect=function(j,Q){if(ne.indexOf(Q)===-1)throw new RangeError("Invalid status code");return new X(null,{status:Q,headers:{location:j}})},o.DOMException=u.DOMException;try{new o.DOMException}catch{o.DOMException=function(Q,se){this.message=Q,this.name=se;var ie=Error(Q);this.stack=ie.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function $(j,Q){return new Promise(function(se,ie){var be=new N(j,Q);if(be.signal&&be.signal.aborted)return ie(new o.DOMException("Aborted","AbortError"));var he=new XMLHttpRequest;function Te(){he.abort()}he.onload=function(){var ye={status:he.status,statusText:he.statusText,headers:F(he.getAllResponseHeaders()||"")};ye.url="responseURL"in he?he.responseURL:ye.headers.get("X-Request-URL");var ce="response"in he?he.response:he.responseText;setTimeout(function(){se(new X(ce,ye))},0)},he.onerror=function(){setTimeout(function(){ie(new TypeError("Network request failed"))},0)},he.ontimeout=function(){setTimeout(function(){ie(new TypeError("Network request failed"))},0)},he.onabort=function(){setTimeout(function(){ie(new o.DOMException("Aborted","AbortError"))},0)};function Ne(ye){try{return ye===""&&u.location.href?u.location.href:ye}catch{return ye}}he.open(be.method,Ne(be.url),!0),be.credentials==="include"?he.withCredentials=!0:be.credentials==="omit"&&(he.withCredentials=!1),"responseType"in he&&(c.blob?he.responseType="blob":c.arrayBuffer&&be.headers.get("Content-Type")&&be.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(he.responseType="arraybuffer")),Q&&typeof Q.headers=="object"&&!(Q.headers instanceof _)?Object.getOwnPropertyNames(Q.headers).forEach(function(ye){he.setRequestHeader(ye,p(Q.headers[ye]))}):be.headers.forEach(function(ye,ce){he.setRequestHeader(ce,ye)}),be.signal&&(be.signal.addEventListener("abort",Te),he.onreadystatechange=function(){he.readyState===4&&be.signal.removeEventListener("abort",Te)}),he.send(typeof be._bodyInit>"u"?null:be._bodyInit)})}return $.polyfill=!0,u.fetch||(u.fetch=$,u.Headers=_,u.Request=N,u.Response=X),o.Headers=_,o.Request=N,o.Response=X,o.fetch=$,o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var a=r.fetch?r:n;e=a.fetch,e.default=a.fetch,e.fetch=a.fetch,e.Headers=a.Headers,e.Request=a.Request,e.Response=a.Response,t.exports=e})(pO,pO.exports);var zR=pO.exports;Object.defineProperty(k0,"__esModule",{value:!0});k0.QuadDestinationPatchSparqlUpdate=void 0;const gfe=Zs,mfe=Cf,vfe=zR,b1=b0,wfe=kt;class Sfe{constructor(e,r,n){this.url=e,this.context=r,this.mediatorHttp=n}insert(e){return this.wrapSparqlUpdateRequest("INSERT",e)}async delete(e){return this.wrapSparqlUpdateRequest("DELETE",e)}async wrapSparqlUpdateRequest(e,r){const n=r.map(u=>{let c=`${(0,b1.termToString)(u.subject)} ${(0,b1.termToString)(u.predicate)} ${(0,b1.termToString)(u.object)} .`;return u.graph.termType!=="DefaultGraph"?c=` GRAPH ${(0,b1.termToString)(u.graph)} { ${c} } +`)}`);const f=r[l].actor;return f.includeInLogs&&((h=o4.Actor.getContextLogger(e.context))==null||h.debug(`Determined physical join operator '${f.logicalType}-${f.physicalName}'`,{entries:e.entries.length,variables:await Promise.all(e.entries.map(async p=>(await p.output.metadata()).variables.map(b=>b.value))),costs:Object.fromEntries(o.map((p,b)=>[`${r[b].actor.logicalType}-${r[b].actor.physicalName}`,p])),coefficients:Object.fromEntries(s.map((p,b)=>[`${r[b].actor.logicalType}-${r[b].actor.physicalName}`,p]))})),f}}$v.MediatorJoinCoefficientsFixed=Qce;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r($v,t)})(L7);var B7={},Uv={};Object.defineProperty(Uv,"__esModule",{value:!0});Uv.MediatorAll=void 0;const Gce=et;class zce extends Gce.Mediator{constructor(e){super(e)}async mediate(e){const r=[];let n;try{n=this.publish(e)}catch{n=[]}for(const s of n)try{await s.reply,r.push(s.actor)}catch{}return(await Promise.all(r.map(s=>s.runObservable(e))))[0]}async mediateWith(){throw new Error("Unsupported operation: MediatorAll#mediateWith")}}Uv.MediatorAll=zce;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Uv,t)})(B7);var V0={},H0={};Object.defineProperty(H0,"__esModule",{value:!0});H0.ActorHttpInvalidate=void 0;const Wce=et;class Xce extends Wce.Actor{constructor(e){super(e)}}H0.ActorHttpInvalidate=Xce;var qv={};Object.defineProperty(qv,"__esModule",{value:!0});qv.ActorHttpInvalidateListenable=void 0;const Kce=H0;class Jce extends Kce.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 r of this.invalidateListeners)r(e);return{}}}qv.ActorHttpInvalidateListenable=Jce;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(H0,t),r(qv,t)})(V0);var $7={},Vv={},fa={},Hv={};Object.defineProperty(Hv,"__esModule",{value:!0});Hv.ActorRdfJoin=void 0;const Yce=ct,c1=rr,Zce=et,ele=Hi,tle=ht,rle=nr,nle=new tle.DataFactory;class Au extends Zce.Actor{constructor(e,r){super(e),this.includeInLogs=!0,this.logicalType=r.logicalType,this.physicalName=r.physicalName,this.limitEntries=r.limitEntries??Number.POSITIVE_INFINITY,this.limitEntriesMin=r.limitEntriesMin??!1,this.canHandleUndefs=r.canHandleUndefs??!1}static hash(e,r){return r.filter(n=>e.has(n)).map(n=>(0,rle.termToString)(e.get(n))).join("")}static overlappingVariables(e){const r=e.map(a=>a.variables);let n=r[0];for(const a of r.slice(1))n=n.filter(s=>a.some(o=>o.value===s.value));return n}static joinVariables(e){return[...new Set(e.flatMap(r=>r.variables.map(n=>n.value)))].map(r=>nle.variable(r))}static joinBindings(...e){if(e.length===0)return null;if(e.length===1)return e[0];let r=e[0];for(const n of e.slice(1)){const a=r.merge(n);if(!a)return null;r=a}return r}static getCardinality(e){return e.cardinality}static async getMetadatas(e){return await Promise.all(e.map(r=>r.output.metadata()))}static async getEntriesWithMetadatas(e){const r=await Au.getMetadatas(e);return e.map((n,a)=>({...n,metadata:r[a]}))}static getRequestInitialTimes(e){return e.map(r=>r.pageSize?0:r.requestTime||0)}static getRequestItemTimes(e){return e.map(r=>r.pageSize?(r.requestTime||0)/r.pageSize:0)}async constructResultMetadata(e,r,n,a={}){let s;a.cardinality?s=a.cardinality:(s=r.reduce((c,l)=>{const d=Au.getCardinality(l);return{type:d.type==="estimate"?"estimate":c.type,value:c.value*d.value}},{type:"exact",value:1}),s.value*=(await this.mediatorJoinSelectivity.mediate({entries:e,context:n})).selectivity);const o=new ele.MetadataValidationState,u=()=>o.invalidate();for(const c of r)c.state.addInvalidateListener(u);return{state:o,...a,cardinality:{type:s.type,value:s.value},canContainUndefs:a.canContainUndefs??r.some(c=>c.canContainUndefs),variables:Au.joinVariables(r)}}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 n of e.entries)if(n.output.type!=="bindings")throw new Error(`Invalid type of a join entry: Expected 'bindings' but got '${n.output.type}'`);const r=await Au.getMetadatas(e.entries);if(!this.canHandleUndefs){for(const n of r)if(n.canContainUndefs)throw new Error(`Actor ${this.name} can not join streams containing undefs`)}return await this.getJoinCoefficients(e,r)}async run(e){let r;e.context.has(c1.KeysInitQuery.physicalQueryPlanLogger)&&(r=e.context.get(c1.KeysInitQuery.physicalQueryPlanNode),e.context=e.context.set(c1.KeysInitQuery.physicalQueryPlanNode,e));const n=e.context.get(c1.KeysInitQuery.physicalQueryPlanLogger);let a;this.includeInLogs&&n&&(a={},n.logOperation(`join-${this.logicalType}`,this.physicalName,e,r,this.name,a));const{result:s,physicalPlanMetadata:o}=await this.getOutput(e),u=await Au.getMetadatas(e.entries);return a&&(Object.assign(a,o),a.cardinalities=u.map(Au.getCardinality),a.joinCoefficients=await this.getJoinCoefficients(e,u)),s.metadata=Yce.ActorQueryOperation.cachifyMetadata(s.metadata),s}}Hv.ActorRdfJoin=Au;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Hv,t)})(fa);Object.defineProperty(Vv,"__esModule",{value:!0});Vv.ActorRdfJoinNone=void 0;const ile=$n,ale=fa,sle=Hi,ole=Ut,ule=new ile.BindingsFactory;class cle extends ale.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){return{result:{bindingsStream:new ole.ArrayIterator([ule.bindings()],{autoStart:!1}),metadata:()=>Promise.resolve({state:new sle.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}async getJoinCoefficients(){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}Vv.ActorRdfJoinNone=cle;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Vv,t)})($7);var U7={},kv={};Object.defineProperty(kv,"__esModule",{value:!0});kv.ActorRdfJoinSingle=void 0;const lle=fa;class dle extends lle.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"single",limitEntries:1}),this.includeInLogs=!1}async test(e){if(e.entries.length!==1)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}}}kv.ActorRdfJoinSingle=dle;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(kv,t)})(U7);var q7={},Qv={};Object.defineProperty(Qv,"__esModule",{value:!0});Qv.ActorRdfJoinMultiEmpty=void 0;const rh=fa,fle=Hi,hle=Ut;class ple extends rh.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-empty",canHandleUndefs:!0})}async test(e){if((await rh.ActorRdfJoin.getMetadatas(e.entries)).every(r=>rh.ActorRdfJoin.getCardinality(r).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 r of e.entries)r.output.bindingsStream.close();return{result:{bindingsStream:new hle.ArrayIterator([],{autoStart:!1}),metadata:async()=>({state:new fle.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1,variables:rh.ActorRdfJoin.joinVariables(await rh.ActorRdfJoin.getMetadatas(e.entries))}),type:"bindings"}}}async getJoinCoefficients(e,r){return{iterations:0,persistedItems:0,blockingItems:0,requestTime:0}}}Qv.ActorRdfJoinMultiEmpty=ple;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Qv,t)})(q7);var V7={},Gv={};let H7=Ut,yle=H7.MultiTransformIterator,ble=H7.SimpleTransformIterator,_le=class extends yle{constructor(e,r,n,a){super(e,a),this.funRight=r,this.funJoin=n}_createTransformer(e){return new ble(this.funRight(e),{transform:(r,n,a)=>{let s=this.funJoin(e,r);s!==null&&a(s),n()}})}};var gle=_le;let mle=Ut.AsyncIterator,vle=class extends mle{constructor(e,r,n,a){super(),this.addedDataListener=!1,this.left=e,this.right=r,this.funHash=n,this.funJoin=a,this.leftMap=new Map,this.match=null,this.matches=[],this.matchIdx=0,this.left.on("error",o=>this.destroy(o)),this.right.on("error",o=>this.destroy(o)),this.readable=!1,this.left.on("end",s.bind(this));function s(){if(this.leftMap.size<=0)return this.close();this.readable=!0,this.right.on("readable",()=>this.readable=!0),this.right.on("end",()=>{this.hasResults()||this._end()})}this.on("newListener",o=>{o==="data"&&!this.addedDataListener&&(this.addedDataListener=!0,this._addDataListener())})}hasResults(){return!this.right.ended||this.matchIdxthis.right.close())}_end(){super._end(),Ele(()=>this.right.destroy())}_createTransformer(e){return new Tle(this.right.clone(),{transform:(r,n,a)=>{let s=this.funJoin(e,r);s!==null&&a(s),n()}})}};var Ale=Ole;let Rle=Ut.AsyncIterator,xle=class extends Rle{constructor(e,r,n,a){super(),this.left=e,this.right=r,this.funHash=n,this.funJoin=a,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",s=>this.destroy(s)),this.right.on("error",s=>this.destroy(s)),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.matchIdxthis.emit("readable")),r.on("end",()=>this._removeStream(r));this.streams.length===0&&this.close(),this.idx=this.streams.length-1}_removeStream(e){let r=this.streams.indexOf(e);r<0||(this.streams.splice(r,1),this.idx>=this.streams.length&&--this.idx,this.streams.length===0&&this._end())}close(){super.close();for(let e of this.streams)e.close()}read(){for(let e=0;ewc.ActorRdfJoin.hash(s,n),wc.ActorRdfJoin.joinBindings),metadata:async()=>await this.constructResultMetadata(e.entries,r,e.context)}}}async getJoinCoefficients(e,r){const n=wc.ActorRdfJoin.getRequestInitialTimes(r),a=wc.ActorRdfJoin.getRequestItemTimes(r);return{iterations:r[0].cardinality.value+r[1].cardinality.value,persistedItems:r[0].cardinality.value,blockingItems:r[0].cardinality.value,requestTime:n[0]+r[0].cardinality.value*a[0]+n[1]+r[1].cardinality.value*a[1]}}}Gv.ActorRdfJoinHash=$le;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Gv,t)})(V7);var k7={},Wv={};Object.defineProperty(Wv,"__esModule",{value:!0});Wv.ActorRdfJoinSymmetricHash=void 0;const Xl=fa,Ule=zv;class kR extends Xl.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"symmetric-hash",limitEntries:2})}async getOutput(e){const r=await Xl.ActorRdfJoin.getMetadatas(e.entries),n=Xl.ActorRdfJoin.overlappingVariables(r);return{result:{type:"bindings",bindingsStream:new Ule.SymmetricHashJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,s=>kR.hash(s,n),Xl.ActorRdfJoin.joinBindings),metadata:async()=>await this.constructResultMetadata(e.entries,r,e.context)}}}async getJoinCoefficients(e,r){const n=Xl.ActorRdfJoin.getRequestInitialTimes(r),a=Xl.ActorRdfJoin.getRequestItemTimes(r);return{iterations:r[0].cardinality.value+r[1].cardinality.value,persistedItems:r[0].cardinality.value+r[1].cardinality.value,blockingItems:0,requestTime:n[0]+r[0].cardinality.value*a[0]+n[1]+r[1].cardinality.value*a[1]}}}Wv.ActorRdfJoinSymmetricHash=kR;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Wv,t)})(k7);var Q7={},Xv={};Object.defineProperty(Xv,"__esModule",{value:!0});Xv.ActorRdfJoinNestedLoop=void 0;const nh=fa,qle=zv;class Vle extends nh.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"nested-loop",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){return{result:{type:"bindings",bindingsStream:new qle.NestedLoopJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,nh.ActorRdfJoin.joinBindings,{autoStart:!1}),metadata:async()=>await this.constructResultMetadata(e.entries,await nh.ActorRdfJoin.getMetadatas(e.entries),e.context)}}}async getJoinCoefficients(e,r){const n=nh.ActorRdfJoin.getRequestInitialTimes(r),a=nh.ActorRdfJoin.getRequestItemTimes(r);return{iterations:r[0].cardinality.value*r[1].cardinality.value,persistedItems:0,blockingItems:0,requestTime:n[0]+r[0].cardinality.value*a[0]+n[1]+r[1].cardinality.value*a[1]}}}Xv.ActorRdfJoinNestedLoop=Vle;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Xv,t)})(Q7);var G7={},Kv={};Object.defineProperty(Kv,"__esModule",{value:!0});Kv.ActorRdfJoinMinusHash=void 0;const Hle=ct,Sc=fa;class kle extends Sc.ActorRdfJoin{constructor(e){super(e,{logicalType:"minus",physicalName:"hash",limitEntries:2})}async getOutput(e){const r=e.entries[1].output,n=e.entries[0].output,a=await Sc.ActorRdfJoin.getMetadatas(e.entries),s=Sc.ActorRdfJoin.overlappingVariables(a);if(s.length>0){const o={};return{result:{type:"bindings",bindingsStream:new Hle.ClosableTransformIterator(async()=>(await new Promise(c=>{r.bindingsStream.on("data",l=>{o[Sc.ActorRdfJoin.hash(l,s)]=!0}),r.bindingsStream.on("end",c)}),n.bindingsStream.filter(c=>!o[Sc.ActorRdfJoin.hash(c,s)])),{autoStart:!1,onClose(){r.bindingsStream.destroy(),n.bindingsStream.destroy()}}),metadata:n.metadata}}}return r.bindingsStream.destroy(),{result:n}}async getJoinCoefficients(e,r){const n=Sc.ActorRdfJoin.getRequestInitialTimes(r),a=Sc.ActorRdfJoin.getRequestItemTimes(r);return{iterations:r[0].cardinality.value+r[1].cardinality.value,persistedItems:r[0].cardinality.value,blockingItems:r[0].cardinality.value,requestTime:n[0]+r[0].cardinality.value*a[0]+n[1]+r[1].cardinality.value*a[1]}}}Kv.ActorRdfJoinMinusHash=kle;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Kv,t)})(G7);var z7={},Jv={},Yv={};Object.defineProperty(Yv,"__esModule",{value:!0});Yv.BindingsIndex=void 0;const Qle=nr;class Fb{constructor(e){this.data={},this.keys=e}static hashTerm(e){return e&&e.termType!=="Variable"?(0,Qle.termToString)(e):""}add(e){if(this.isBindingsValid(e)){let r=this.data;for(const n of this.keys){const a=Fb.hashTerm(e.get(n));let s=r[a];s||(s=r[a]={}),r=s}}}contains(e){return this.isBindingsValid(e)?this.containsRecursive(e,this.keys,[this.data]):!1}isBindingsValid(e){let r=!1;for(const n of this.keys)if(e.get(n)){r=!0;break}return r}containsRecursive(e,r,n){if(r.length===0)return!0;let a;[a,...r]=r;for(const s of n){const o=Fb.hashTerm(e.get(a));if(o){const u=[s[o],s[""]].filter(Boolean);if(u.length===0)continue;if(this.containsRecursive(e,r,u))return!0}else{let u=Object.keys(s).map(c=>s[c]);if(u.length===0&&(u=[{}]),this.containsRecursive(e,r,u))return!0}}return!1}}Yv.BindingsIndex=Fb;Object.defineProperty(Jv,"__esModule",{value:!0});Jv.ActorRdfJoinMinusHashUndef=void 0;const Gle=ct,ih=fa,zle=Yv;class Wle extends ih.ActorRdfJoin{constructor(e){super(e,{logicalType:"minus",physicalName:"hash-undef",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){const r=e.entries[1].output,n=e.entries[0].output,a=await ih.ActorRdfJoin.getMetadatas(e.entries),s=ih.ActorRdfJoin.overlappingVariables(a);if(s.length>0){const o=new zle.BindingsIndex(s);return{result:{type:"bindings",bindingsStream:new Gle.ClosableTransformIterator(async()=>(await new Promise(c=>{r.bindingsStream.on("data",l=>o.add(l)),r.bindingsStream.on("end",c)}),n.bindingsStream.filter(c=>!o.contains(c))),{autoStart:!1,onClose(){r.bindingsStream.destroy(),n.bindingsStream.destroy()}}),async metadata(){const c=await n.metadata(),l=await n.metadata();return{...l,canContainUndefs:c.canContainUndefs||l.canContainUndefs}}}}}return r.bindingsStream.destroy(),{result:n}}async getJoinCoefficients(e,r){const n=ih.ActorRdfJoin.getRequestInitialTimes(r),a=ih.ActorRdfJoin.getRequestItemTimes(r);return{iterations:(r[0].cardinality.value+r[1].cardinality.value)*1.01,persistedItems:r[0].cardinality.value,blockingItems:r[0].cardinality.value,requestTime:n[0]+r[0].cardinality.value*a[0]+n[1]+r[1].cardinality.value*a[1]}}}Jv.ActorRdfJoinMinusHashUndef=Wle;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Jv,t)})(z7);var W7={},Zv={};Object.defineProperty(Zv,"__esModule",{value:!0});Zv.ActorRdfJoinOptionalNestedLoop=void 0;const ah=fa,Xle=zv;class Kle extends ah.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:"nested-loop",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){return{result:{type:"bindings",bindingsStream:new Xle.NestedLoopJoin(e.entries[0].output.bindingsStream,e.entries[1].output.bindingsStream,ah.ActorRdfJoin.joinBindings,{optional:!0,autoStart:!1}),metadata:async()=>await this.constructResultMetadata(e.entries,await ah.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0})}}}async getJoinCoefficients(e,r){const n=ah.ActorRdfJoin.getRequestInitialTimes(r),a=ah.ActorRdfJoin.getRequestItemTimes(r);return{iterations:r[0].cardinality.value*r[1].cardinality.value,persistedItems:0,blockingItems:0,requestTime:n[0]+r[0].cardinality.value*a[0]+n[1]+r[1].cardinality.value*a[1]}}}Zv.ActorRdfJoinOptionalNestedLoop=Kle;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Zv,t)})(W7);var X7={},e2={},t2={};Object.defineProperty(t2,"__esModule",{value:!0});t2.RdfSourceQpf=void 0;const l1=Ut,Jle=ht,K7=nr,d1=An,Tc=new Jle.DataFactory;class Yle{constructor(e,r,n,a,s,o,u,c,l,d,f){this.mediatorMetadata=e,this.mediatorMetadataExtract=r,this.mediatorDereferenceRdf=n,this.subjectUri=a,this.predicateUri=s,this.objectUri=o,this.graphUri=u,this.url=c,this.context=d,this.cachedQuads={};const h=this.getSearchForm(l);if(!h)throw new Error("Illegal state: found no TPF/QPF search form anymore in metadata.");if(this.searchForm=h,this.defaultGraph=l.defaultGraph?Tc.namedNode(l.defaultGraph):void 0,f){let p=(0,l1.wrap)(f);this.defaultGraph&&(p=this.reverseMapQuadsToDefaultGraph(p)),p.setProperty("metadata",l),this.cacheQuads(p,Tc.variable(""),Tc.variable(""),Tc.variable(""),Tc.variable(""))}}getSearchForm(e){if(!e.searchForms||!e.searchForms.values)return;const{searchForms:r}=e;for(const n of r.values)if(this.graphUri&&this.subjectUri in n.mappings&&this.predicateUri in n.mappings&&this.objectUri in n.mappings&&this.graphUri in n.mappings&&Object.keys(n.mappings).length===4||this.subjectUri in n.mappings&&this.predicateUri in n.mappings&&this.objectUri in n.mappings&&Object.keys(n.mappings).length===3)return n}createFragmentUri(e,r,n,a,s){const o={},u=[{uri:this.subjectUri,term:r},{uri:this.predicateUri,term:n},{uri:this.objectUri,term:a},{uri:this.graphUri,term:s}];for(const c of u)c.uri&&c.term.termType!=="Variable"&&(c.term.termType!=="Quad"||(0,d1.everyTermsNested)(c.term,l=>l.termType!=="Variable"))&&(o[c.uri]=(0,K7.termToString)(c.term));return e.getUri(o)}match(e,r,n,a){let s=!1;if(a.termType==="DefaultGraph"){if(this.defaultGraph)s=!0,a=this.defaultGraph;else if(Object.keys(this.searchForm.mappings).length===4&&!this.defaultGraph){const c=new l1.ArrayIterator([],{autoStart:!1});return c.setProperty("metadata",{requestTime:0,cardinality:{type:"exact",value:0},first:null,next:null,last:null,canContainUndefs:!1}),c}}const o=this.getCachedQuads(e,r,n,a);if(o)return o;const u=new l1.TransformIterator(async()=>{var b;let c=this.createFragmentUri(this.searchForm,e,r,n,a);const l=await this.mediatorDereferenceRdf.mediate({context:this.context,url:c});c=l.url;const d=await this.mediatorMetadata.mediate({context:this.context,url:c,quads:l.data,triples:(b=l.metadata)==null?void 0:b.triples}),f=this.mediatorMetadataExtract.mediate({context:this.context,url:c,metadata:d.metadata,requestTime:l.requestTime}).then(({metadata:_})=>u.setProperty("metadata",{..._,canContainUndefs:!1,subsetOf:this.url})),h=Tc.defaultGraph();let p=(0,l1.wrap)(d.data).transform({filter(_){return(0,d1.matchPattern)(_,e,r,n,a)?!0:s&&(0,d1.matchPattern)(_,e,r,n,h)}});return(s||a.termType==="Variable")&&(p=this.reverseMapQuadsToDefaultGraph(p)),p.on("error",()=>{}),await f,p},{autoStart:!1});return this.cacheQuads(u,e,r,n,a),this.getCachedQuads(e,r,n,a)}reverseMapQuadsToDefaultGraph(e){const r=Tc.defaultGraph();return e.map(n=>(0,d1.mapTerms)(n,(a,s)=>s==="graph"&&a.equals(this.defaultGraph)?r:a))}getPatternId(e,r,n,a){return JSON.stringify({s:e.termType==="Variable"?"":f1(e),p:r.termType==="Variable"?"":f1(r),o:n.termType==="Variable"?"":f1(n),g:a.termType==="Variable"?"":f1(a)})}cacheQuads(e,r,n,a,s){const o=this.getPatternId(r,n,a,s);this.cachedQuads[o]=e.clone()}getCachedQuads(e,r,n,a){const s=this.getPatternId(e,r,n,a),o=this.cachedQuads[s];if(o)return o.clone()}}t2.RdfSourceQpf=Yle;function f1(t){return t.termType==="DefaultGraph"?"|":(0,K7.termToString)(t)}Object.defineProperty(e2,"__esModule",{value:!0});e2.ActorRdfResolveHypermediaQpf=void 0;const Zle=tv,ede=t2;class tde extends Zle.ActorRdfResolveHypermedia{constructor(e){super(e,"qpf")}async testMetadata(e){const{searchForm:r}=this.createSource(e.url,e.metadata,e.context);if(e.handledDatasets&&e.handledDatasets[r.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 r=this.createSource(e.url,e.metadata,e.context,e.quads);return{source:r,dataset:r.searchForm.dataset}}createSource(e,r,n,a){return new ede.RdfSourceQpf(this.mediatorMetadata,this.mediatorMetadataExtract,this.mediatorDereferenceRdf,this.subjectUri,this.predicateUri,this.objectUri,this.graphUri,e,r,n,a)}}e2.ActorRdfResolveHypermediaQpf=tde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(e2,t)})(X7);var J7={},r2={},Y7={},n2={};Object.defineProperty(n2,"__esModule",{value:!0});n2.ActorDereferenceRdf=void 0;const rde=nm;class nde extends rde.ActorDereferenceParse{constructor(e){super(e)}}n2.ActorDereferenceRdf=nde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(n2,t)})(Y7);Object.defineProperty(r2,"__esModule",{value:!0});r2.ActorDereferenceRdfParse=void 0;const ide=Y7;class ade extends ide.ActorDereferenceRdf{constructor(e){super(e)}async getMetadata(e){return{baseIRI:e.url}}}r2.ActorDereferenceRdfParse=ade;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(r2,t)})(J7);var Z7={},i2={},a2={};Object.defineProperty(a2,"__esModule",{value:!0});a2.HtmlScriptListener=void 0;const u4=rr,sde=kt,ode=Ra;class pd{constructor(e,r,n,a,s,o,u,c){this.textChunksJsonLd=[],this.endBarrier=1,this.passedScripts=0,this.isFinalJsonLdProcessing=!1,this.mediatorRdfParseHandle=e,this.cbQuad=r,this.cbError=n,this.cbEnd=a,this.supportedTypes=s,this.context=o.set(u4.KeysRdfParseHtmlScript.processingHtmlScript,!0),this.baseIRI=u,this.headers=c,this.onlyFirstScript=o.get(u4.KeysRdfParseHtmlScript.extractAllScripts)===!1;const l=this.baseIRI.indexOf("#");this.targetScriptId=l>0?this.baseIRI.slice(l+1,this.baseIRI.length):null}static newErrorCoded(e,r){const n=new Error(e);return n.code=r,n}onEnd(){--this.endBarrier===0&&(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()):(this.passedScripts===0&&this.targetScriptId&&this.cbError(pd.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 sde.Readable({objectMode:!0});e._read=()=>{};const r=this.textChunks,n={context:this.context,handle:{metadata:{baseIRI:this.baseIRI},data:e,headers:this.headers,context:this.context},handleMediaType:this.handleMediaType};this.mediatorRdfParseHandle.mediate(n).then(({handle:a})=>{a.data.on("error",s=>this.cbError(pd.newErrorCoded(s.message,"invalid script element"))).on("data",this.cbQuad).on("end",()=>this.onEnd());for(const s of r)e.push(s);e.push(null)}).catch(a=>{this.targetScriptId?this.cbError(pd.newErrorCoded(a.message,"loading document failed")):this.onEnd()}),this.handleMediaType=void 0,this.textChunks=void 0}}onTagOpen(e,r){e==="base"&&r.href&&(this.baseIRI=(0,ode.resolve)(r.href,this.baseIRI)),e==="script"&&(!this.targetScriptId||r.id===this.targetScriptId)?this.supportedTypes[r.type]?this.onlyFirstScript&&this.passedScripts>0?this.handleMediaType=void 0:(this.passedScripts++,this.handleMediaType=r.type,this.endBarrier++,this.requiresCustomJsonLdHandling(this.handleMediaType)?(this.textChunks=this.textChunksJsonLd,this.textChunks.push(this.textChunks.length===0?"[":",")):this.textChunks=[]):this.targetScriptId&&this.cbError(pd.newErrorCoded(`Targeted script "${this.targetScriptId}" does not have a supported type`,"loading document failed")):this.handleMediaType=void 0}onText(e){this.handleMediaType&&this.textChunks.push(e)}requiresCustomJsonLdHandling(e){return!this.onlyFirstScript&&!this.targetScriptId&&e==="application/ld+json"}}a2.HtmlScriptListener=pd;Object.defineProperty(i2,"__esModule",{value:!0});i2.ActorRdfParseHtmlScript=void 0;const ude=Qm,cde=a2;class lde extends ude.ActorRdfParseHtml{constructor(e){super(e)}async test(e){return!0}async run(e){const r=(await this.mediatorRdfParseMediatypes.mediate({context:e.context,mediaTypes:!0})).mediaTypes;return{htmlParseListener:new cde.HtmlScriptListener(this.mediatorRdfParseHandle,e.emit,e.error,e.end,r,e.context,e.baseIRI,e.headers)}}}i2.ActorRdfParseHtmlScript=lde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(i2,t)})(Z7);var eL={},s2={};Object.defineProperty(s2,"__esModule",{value:!0});s2.ActorQueryResultSerializeRdf=void 0;const dde=ls;class fde extends dde.ActorQueryResultSerialize{constructor(e){super(e)}async testHandle(e,r,n){if(e.type!=="quads")throw new Error(`Actor ${this.name} can only handle quad streams`);const{mediaTypes:a}=await this.mediatorMediaTypeCombiner.mediate({context:n,mediaTypes:!0});if(!(r in a))throw new Error(`Actor ${this.name} can not handle media type ${r}. All available types: ${Object.keys(a)}`);return!0}async runHandle(e,r,n){return(await this.mediatorRdfSerialize.mediate({context:n,handle:{context:n,quadStream:e.quadStream},handleMediaType:r})).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}}s2.ActorQueryResultSerializeRdf=fde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s2,t)})(eL);var tL={},o2={};Object.defineProperty(o2,"__esModule",{value:!0});o2.ActorHttpWayback=void 0;const c4=Zs,eb=rr,hde=wl,pde="http://wayback.archive-it.org/";function l4(t){const e=new Request(t.input,t.init);return{input:new Request(new URL(`/${e.url}`,pde),e)}}function yde(t){const e=t.get(eb.KeysHttpProxy.httpProxyHandler);return e?r=>e.getProxy(l4(r)):r=>Promise.resolve(l4(r))}class bde extends c4.ActorHttp{constructor(e){super(e)}async test(e){return!0}async run(e){let r=await this.mediatorHttp.mediate(e);if(r.status===404&&e.context.get(eb.KeysHttpWayback.recoverBrokenLinks)){let n=await this.mediatorHttp.mediate({...e,context:e.context.set(eb.KeysHttpWayback.recoverBrokenLinks,!1).set(eb.KeysHttpProxy.httpProxyHandler,{getProxy:yde(e.context)})});n.status===200&&([r,n]=[n,r]);const{body:a}=n;a&&("destroy"in a&&typeof a.destroy=="function"?a.destroy():await hde(c4.ActorHttp.toNodeReadable(n.body)))}return r}}o2.ActorHttpWayback=bde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(o2,t)})(tL);var rL={},u2={},nL={},sh={},c2={},oh={},uh={},l2={};Object.defineProperty(l2,"__esModule",{value:!0});l2.ContainerHandlerIdentifier=void 0;class _de{canCombineWithGraph(){return!0}async handle(e,r,n,a,s,o){let u;if(r.emittedStack[o+1]&&r.idStack[o+1])u=r.idStack[o+1][0];else{const d=await n.getContainerKey(a[o],a,o)!==null?await n.resourceToTerm(await r.getContext(a),a[o]):n.dataFactory.blankNode();if(!d){r.emittedStack[o]=!1;return}u=d,r.idStack[o+1]=[u]}let c=r.idStack[o];c||(c=r.idStack[o]=[]),c.some(l=>l.equals(u))||c.push(u),await r.handlePendingContainerFlushBuffers()||(r.emittedStack[o]=!1)}}l2.ContainerHandlerIdentifier=_de;var ch={},lh={},d4;function d2(){if(d4)return lh;d4=1,Object.defineProperty(lh,"__esModule",{value:!0}),lh.EntryHandlerPredicate=void 0;const t=hn,e=Ol();let r=class iL{static async handlePredicateObject(a,s,o,u,c,l,d,f,h){const p=await s.getPropertiesDepth(o,u),b=await s.getDepthOffsetGraph(u,o),_=u-b,E=a.idStack[p];if(E&&!h)for(const w of E)if(b>=0){const A=a.idStack[_-1];if(A)for(const T of A)s.emitQuadChecked(u,w,c,l,T,d,f);else d?(s.validateReverseSubject(l),a.getUnidentifiedGraphBufferSafe(_-1).push({subject:l,predicate:c,object:w,isEmbedded:f})):a.getUnidentifiedGraphBufferSafe(_-1).push({subject:w,predicate:c,object:l,isEmbedded:f})}else{const A=await s.getGraphContainerValue(o,p);s.emitQuadChecked(u,w,c,l,A,d,f)}else if(d&&s.validateReverseSubject(l),h){if(a.rdfstar){a.idStack[u]&&a.emitError(new t.ErrorCoded(`Found an illegal @id inside an annotation: ${a.idStack[u][0].value}`,t.ERROR_CODES.INVALID_ANNOTATION));for(let A=0;A=0;A--){const T=w[A];T.depth>p&&(O.nestedAnnotations.push(T),w.splice(A,1))}}}else a.getUnidentifiedValueBufferSafe(p).push({predicate:c,object:l,reverse:d,isEmbedded:f})}isPropertyHandler(){return!0}isStackProcessor(){return!0}async validate(a,s,o,u,c){const l=o[u];if(l){const d=await a.getContext(o);if(!a.jsonLiteralStack[u]&&await s.predicateToTerm(d,o[u]))return e.Util.getContextValueType(d,l)==="@json"&&(a.jsonLiteralStack[u+1]=!0),!0}return!1}async test(a,s,o,u,c){return u[c]}async handle(a,s,o,u,c,l,d){const f=u[l],h=await a.getContext(u),p=await s.predicateToTerm(h,o);if(p){const b=await s.valueToTerm(h,o,c,l,u);if(b.length)for(let _ of b){let E=await s.unaliasKeywordParent(u,l);const w=e.Util.isPropertyReverse(h,f,E);let O=0;for(;E==="@reverse"||typeof E=="number";)typeof E=="number"?O++:l--,E=await s.unaliasKeywordParent(u,l-O);const A=e.Util.isPropertyInEmbeddedNode(E);s.validateReverseInEmbeddedNode(o,w,A);const T=e.Util.isPropertyInAnnotationObject(E);if(c){const I="@list"in e.Util.getContextValueContainer(h,o);if(I||c["@list"]){if((I&&!Array.isArray(c)&&!c["@list"]||c["@list"]&&!Array.isArray(c["@list"]))&&_!==s.rdfNil){const D=s.dataFactory.blankNode();a.emitQuad(l,s.dataFactory.quad(D,s.rdfRest,s.rdfNil,s.getDefaultGraph())),a.emitQuad(l,s.dataFactory.quad(D,s.rdfFirst,_,s.getDefaultGraph())),_=D}if(w&&!a.allowSubjectList)throw new t.ErrorCoded(`Found illegal list value in subject position at ${o}`,t.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}}await iL.handlePredicateObject(a,s,u,l,p,_,w,A,T)}}}};return lh.EntryHandlerPredicate=r,lh}var f4;function gde(){if(f4)return ch;f4=1,Object.defineProperty(ch,"__esModule",{value:!0}),ch.ContainerHandlerIndex=void 0;const t=hn,e=d2(),r=Ol();let n=class{canCombineWithGraph(){return!0}async handle(s,o,u,c,l,d){if(!Array.isArray(l)){const f="@graph"in s,h=await o.getContext(c),p=c[d-1],b=r.Util.getContextValueIndex(h,p);if(b){if(t.Util.isPotentialKeyword(b))throw new t.ErrorCoded(`Keywords can not be used as @index value, got: ${b}`,t.ERROR_CODES.INVALID_TERM_DEFINITION);if(typeof b!="string")throw new t.ErrorCoded(`@index values must be strings, got: ${b}`,t.ERROR_CODES.INVALID_TERM_DEFINITION);if(typeof l!="object"){if(r.Util.getContextValueType(h,p)!=="@id")throw new t.ErrorCoded(`Property-based index containers require nodes as values or strings with @type: @id, but got: ${l}`,t.ERROR_CODES.INVALID_VALUE_OBJECT);const w=u.resourceToTerm(h,l);w&&(o.idStack[d+1]=[w])}const E=u.createVocabOrBaseTerm(h,b);if(E){const w=await u.valueToTerm(h,b,await u.getContainerKey(c[d],c,d),d,c);if(f){const O=await u.getGraphContainerValue(c,d+1);for(const A of w)o.emitQuad(d,u.dataFactory.quad(O,E,A,u.getDefaultGraph()))}else for(const O of w)await e.EntryHandlerPredicate.handlePredicateObject(o,u,c,d+1,E,O,!1,!1,!1)}}const _=f?2:1;await o.newOnValueJob(c.slice(0,c.length-_),l,d-_,!0),await o.handlePendingContainerFlushBuffers()}o.emittedStack[d]=!1}};return ch.ContainerHandlerIndex=n,ch}var f2={};Object.defineProperty(f2,"__esModule",{value:!0});f2.ContainerHandlerLanguage=void 0;const h4=hn;class mde{canCombineWithGraph(){return!1}async handle(e,r,n,a,s,o){const u=await n.getContainerKey(a[o],a,o);if(Array.isArray(s))s=s.map(c=>({"@value":c,"@language":u}));else{if(typeof s!="string")throw new h4.ErrorCoded(`Got invalid language map value, got '${JSON.stringify(s)}', but expected string`,h4.ERROR_CODES.INVALID_LANGUAGE_MAP_VALUE);s={"@value":s,"@language":u}}await r.newOnValueJob(a.slice(0,a.length-1),s,o-1,!0),r.emittedStack[o]=!1}}f2.ContainerHandlerLanguage=mde;var dh={},p4;function vde(){if(p4)return dh;p4=1,Object.defineProperty(dh,"__esModule",{value:!0}),dh.ContainerHandlerType=void 0;const t=d2(),e=Ol();let r=class{canCombineWithGraph(){return!1}async handle(a,s,o,u,c,l){if(!Array.isArray(c)){if(typeof c=="string"){const h=await s.getContext(u),b=e.Util.getContextValueType(h,u[l-1])==="@vocab"?await o.createVocabOrBaseTerm(h,c):await o.resourceToTerm(h,c);if(b){const _={"@id":b.termType==="NamedNode"?b.value:c};await s.newOnValueJob(u.slice(0,u.length-1),_,l-1,!0),s.idStack[l+1]=[b]}}else{const h=!!s.idStack[l+1];h||delete s.idStack[l],await s.newOnValueJob(u.slice(0,u.length-1),c,l-1,!0),h||(s.idStack[l+1]=s.idStack[l])}const d=await o.getContainerKey(u[l],u,l),f=d!==null?o.createVocabOrBaseTerm(await s.getContext(u),d):null;f&&await t.EntryHandlerPredicate.handlePredicateObject(s,o,u,l+1,o.rdfType,f,!1,!1,!1),await s.handlePendingContainerFlushBuffers()}s.emittedStack[l]=!1}};return dh.ContainerHandlerType=r,dh}var y4;function aL(){if(y4)return uh;y4=1,Object.defineProperty(uh,"__esModule",{value:!0}),uh.EntryHandlerContainer=void 0;const t=l2,e=gde(),r=f2,n=vde(),a=Ol();let s=class pu{static isSimpleGraphContainer(u){return"@graph"in u&&("@set"in u&&Object.keys(u).length===2||Object.keys(u).length===1)}static isComplexGraphContainer(u){return"@graph"in u&&("@set"in u&&Object.keys(u).length>2||!("@set"in u)&&Object.keys(u).length>1)}static getContainerGraphIndex(u,c,l){let d=pu.isSimpleGraphContainer(u),f="";for(let h=c;h=0;p--)if(typeof c[p]!="number"){const b=a.Util.getContextValue(h,"@container",c[p],!1);if(b&&pu.isSimpleGraphContainer(b))return{containers:b,depth:p+1,fallback:!1};const _=a.Util.getContextValue(h,"@container",c[p-1],!1);if(_){const E="@graph"in _;for(const w in pu.CONTAINER_HANDLERS)if(_[w])return E?pu.CONTAINER_HANDLERS[w].canCombineWithGraph()?{containers:_,depth:p,fallback:!1}:d:f?d:{containers:_,depth:p,fallback:!1};return d}else{if(f)return d;f=!0}}return d}static async isBufferableContainerHandler(u,c,l){const d=await pu.getContainerHandler(u,c,l);return!d.fallback&&!("@graph"in d.containers)}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(u,c,l,d,f){return!!await this.test(u,c,null,l,d)}async test(u,c,l,d,f){const h=a.Util.getContextValueContainer(await u.getContext(d,2),d[f-1]);for(const p in pu.CONTAINER_HANDLERS)if(h[p])return{containers:h,handler:pu.CONTAINER_HANDLERS[p]};return null}async handle(u,c,l,d,f,h,p){return p.handler.handle(p.containers,u,c,d,f,h)}};return s.CONTAINER_HANDLERS={"@id":new t.ContainerHandlerIdentifier,"@index":new e.ContainerHandlerIndex,"@language":new r.ContainerHandlerLanguage,"@type":new n.ContainerHandlerType},uh.EntryHandlerContainer=s,uh}var wde=function t(e){return e===null||typeof e!="object"||e.toJSON!=null?JSON.stringify(e):Array.isArray(e)?"["+e.reduce((r,n,a)=>{const s=a===0?"":",",o=n===void 0||typeof n=="symbol"?null:n;return r+s+t(o)},"")+"]":"{"+Object.keys(e).sort().reduce((r,n,a)=>{if(e[n]===void 0||typeof e[n]=="symbol")return r;const s=r.length===0?"":",";return r+s+t(n)+":"+t(e[n])},"")+"}"},b4;function Ol(){if(b4)return oh;b4=1,Object.defineProperty(oh,"__esModule",{value:!0}),oh.Util=void 0;const t=hn,e=ht,r=aL(),n=wde;let a=class Zt{constructor(o){this.parsingContext=o.parsingContext,this.dataFactory=o.dataFactory||new e.DataFactory,this.rdfFirst=this.dataFactory.namedNode(Zt.RDF+"first"),this.rdfRest=this.dataFactory.namedNode(Zt.RDF+"rest"),this.rdfNil=this.dataFactory.namedNode(Zt.RDF+"nil"),this.rdfType=this.dataFactory.namedNode(Zt.RDF+"type"),this.rdfJson=this.dataFactory.namedNode(Zt.RDF+"JSON")}static getContextValue(o,u,c,l){const d=o.getContextRaw()[c];if(!d)return l;const f=d[u];return f===void 0?l:f}static getContextValueContainer(o,u){return Zt.getContextValue(o,"@container",u,{"@set":!0})}static getContextValueType(o,u){const c=Zt.getContextValue(o,"@type",u,null);return c==="@none"?null:c}static getContextValueLanguage(o,u){return Zt.getContextValue(o,"@language",u,o.getContextRaw()["@language"]||null)}static getContextValueDirection(o,u){return Zt.getContextValue(o,"@direction",u,o.getContextRaw()["@direction"]||null)}static isContextValueReverse(o,u){return!!Zt.getContextValue(o,"@reverse",u,null)}static getContextValueIndex(o,u){return Zt.getContextValue(o,"@index",u,o.getContextRaw()["@index"]||null)}static isPropertyReverse(o,u,c){return c==="@reverse"!==Zt.isContextValueReverse(o,u)}static isPropertyInEmbeddedNode(o){return o==="@id"}static isPropertyInAnnotationObject(o){return o==="@annotation"}static isValidIri(o){return o!==null&&t.Util.isValidIri(o)}static isPrefixArray(o,u){if(o.length>u.length)return!1;for(let c=0;c1)throw new t.ErrorCoded(`Found illegal neighbouring entries next to @set for key: '${u}'`,t.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);return[]}else if("@list"in c){if(Object.keys(c).length>1)throw new t.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${u}'`,t.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT);const h=c["@list"];return Array.isArray(h)?h.length===0?[this.rdfNil]:this.parsingContext.idStack[l+1]||[]:await this.valueToTerm(await this.parsingContext.getContext(d),u,h,l-1,d.slice(0,-1))}else{if("@reverse"in c&&typeof c["@reverse"]=="boolean")return[];if("@graph"in Zt.getContextValueContainer(await this.parsingContext.getContext(d),u)){const h=this.parsingContext.graphContainerTermStack[l+1];return h?Object.values(h):[this.dataFactory.blankNode()]}else if("@id"in c){if(Object.keys(c).length>1&&(o=await this.parsingContext.getContext(d,0)),"@context"in c&&(o=await this.parsingContext.parseContext(c["@context"],o.getContextRaw())),c["@type"]==="@vocab")return this.nullableTermToArray(this.createVocabOrBaseTerm(o,c["@id"]));{const h=c["@id"];let p;if(typeof h=="object")if(this.parsingContext.rdfstar)p=this.parsingContext.idStack[l+1][0];else throw new t.ErrorCoded(`Found illegal @id '${c}'`,t.ERROR_CODES.INVALID_ID_VALUE);else p=this.resourceToTerm(o,h);return this.nullableTermToArray(p)}}else return this.parsingContext.emittedStack[l+1]||c&&typeof c=="object"&&Object.keys(c).length===0?this.parsingContext.idStack[l+1]||(this.parsingContext.idStack[l+1]=[this.dataFactory.blankNode()]):[]}case"string":return this.nullableTermToArray(this.stringValueToTerm(l,await this.getContextSelfOrPropertyScoped(o,u),u,c,null));case"boolean":return this.nullableTermToArray(this.stringValueToTerm(l,await this.getContextSelfOrPropertyScoped(o,u),u,(!!c).toString(),this.dataFactory.namedNode(Zt.XSD_BOOLEAN)));case"number":return this.nullableTermToArray(this.stringValueToTerm(l,await this.getContextSelfOrPropertyScoped(o,u),u,c,this.dataFactory.namedNode(c%1===0&&c<1e21?Zt.XSD_INTEGER:Zt.XSD_DOUBLE)));default:return this.parsingContext.emitError(new Error(`Could not determine the RDF type of a ${f}`)),[]}}async getContextSelfOrPropertyScoped(o,u){const c=o.getContextRaw()[u];return c&&typeof c=="object"&&"@context"in c&&(o=await this.parsingContext.parseContext(c,o.getContextRaw(),!0)),o}nullableTermToArray(o){return o?[o]:[]}predicateToTerm(o,u){const c=o.expandTerm(u,!0,this.parsingContext.getExpandOptions());if(!c)return null;if(c[0]==="_"&&c[1]===":")return this.parsingContext.produceGeneralizedRdf?this.dataFactory.blankNode(c.substr(2)):null;if(Zt.isValidIri(c))return this.dataFactory.namedNode(c);if(c&&this.parsingContext.strictValues)this.parsingContext.emitError(new t.ErrorCoded(`Invalid predicate IRI: ${c}`,t.ERROR_CODES.INVALID_IRI_MAPPING));else return null;return null}resourceToTerm(o,u){if(u.startsWith("_:"))return this.dataFactory.blankNode(u.substr(2));const c=o.expandTerm(u,!1,this.parsingContext.getExpandOptions());if(!Zt.isValidIri(c))if(c&&this.parsingContext.strictValues)this.parsingContext.emitError(new Error(`Invalid resource IRI: ${c}`));else return null;return this.dataFactory.namedNode(c)}createVocabOrBaseTerm(o,u){if(u.startsWith("_:"))return this.dataFactory.blankNode(u.substr(2));const c=this.parsingContext.getExpandOptions();let l=o.expandTerm(u,!0,c);if(l===u&&(l=o.expandTerm(u,!1,c)),!Zt.isValidIri(l))if(l&&this.parsingContext.strictValues&&!l.startsWith("@"))this.parsingContext.emitError(new Error(`Invalid term IRI: ${l}`));else return null;return this.dataFactory.namedNode(l)}intToString(o,u){return typeof o=="number"?Number.isFinite(o)?o%1===0&&(!u||u.value!==Zt.XSD_DOUBLE)?Number(o).toString():o.toExponential(15).replace(/(\d)0*e\+?/,"$1E"):o>0?"INF":"-INF":o}stringValueToTerm(o,u,c,l,d){const f=Zt.getContextValueType(u,c);if(f)if(f==="@id"){if(!d)return this.resourceToTerm(u,this.intToString(l,d))}else if(f==="@vocab"){if(!d)return this.createVocabOrBaseTerm(u,this.intToString(l,d))}else d=this.dataFactory.namedNode(f);if(!d){const h=Zt.getContextValueLanguage(u,c),p=Zt.getContextValueDirection(u,c);return p&&this.parsingContext.rdfDirection?this.createLanguageDirectionLiteral(o,this.intToString(l,d),h,p):this.dataFactory.literal(this.intToString(l,d),h)}return this.dataFactory.literal(this.intToString(l,d),d)}createLanguageDirectionLiteral(o,u,c,l){if(this.parsingContext.rdfDirection==="i18n-datatype")return c||(c=""),this.dataFactory.literal(u,this.dataFactory.namedNode(`https://www.w3.org/ns/i18n#${c}_${l}`));{const d=this.dataFactory.blankNode(),f=this.getDefaultGraph();return this.parsingContext.emitQuad(o,this.dataFactory.quad(d,this.dataFactory.namedNode(Zt.RDF+"value"),this.dataFactory.literal(u),f)),c&&this.parsingContext.emitQuad(o,this.dataFactory.quad(d,this.dataFactory.namedNode(Zt.RDF+"language"),this.dataFactory.literal(c),f)),this.parsingContext.emitQuad(o,this.dataFactory.quad(d,this.dataFactory.namedNode(Zt.RDF+"direction"),this.dataFactory.literal(l),f)),d}}valueToJsonString(o){return n(o)}async unaliasKeyword(o,u,c,l,d){if(Number.isInteger(o))return o;if(!l){const f=this.parsingContext.unaliasedKeywordCacheStack[c];if(f)return f}if(!t.Util.isPotentialKeyword(o)){d=d||await this.parsingContext.getContext(u);let f=d.getContextRaw()[o];f&&typeof f=="object"&&(f=f["@id"]),t.Util.isValidKeyword(f)&&(o=f)}return l?o:this.parsingContext.unaliasedKeywordCacheStack[c]=o}async unaliasKeywordParent(o,u){return await this.unaliasKeyword(u>0&&o[u-1],o,u-1)}async unaliasKeywords(o,u,c,l){const d={};for(const f in o)d[await this.unaliasKeyword(f,u,c+1,!0,l)]=o[f];return d}async isLiteral(o,u){for(let c=u;c>=0;c--){if(await this.unaliasKeyword(o[c],o,c)==="@annotation")return!1;if(this.parsingContext.literalStack[c]||this.parsingContext.jsonLiteralStack[c])return!0}return!1}async getDepthOffsetGraph(o,u){for(let c=o-1;c>0;c--)if(await this.unaliasKeyword(u[c],u,c)==="@graph"){const l=(await r.EntryHandlerContainer.getContainerHandler(this.parsingContext,u,c)).containers;return r.EntryHandlerContainer.isComplexGraphContainer(l)?-1:o-c-1}return-1}validateReverseSubject(o){if(o.termType==="Literal")throw new t.ErrorCoded(`Found illegal literal in subject position: ${o.value}`,t.ERROR_CODES.INVALID_REVERSE_PROPERTY_VALUE)}getDefaultGraph(){return this.parsingContext.defaultGraph||this.dataFactory.defaultGraph()}async getGraphContainerValue(o,u){let c=this.getDefaultGraph();const{containers:l,depth:d}=await r.EntryHandlerContainer.getContainerHandler(this.parsingContext,o,u);if("@graph"in l){const f=r.EntryHandlerContainer.getContainerGraphIndex(l,d,o),h=this.parsingContext.graphContainerTermStack[d];if(c=h?h[f]:null,!c){let p=null;if("@id"in l){const b=await this.getContainerKey(o[d],o,d);b!==null&&(p=await this.resourceToTerm(await this.parsingContext.getContext(o),b))}p||(p=this.dataFactory.blankNode()),this.parsingContext.graphContainerTermStack[d]||(this.parsingContext.graphContainerTermStack[d]={}),c=this.parsingContext.graphContainerTermStack[d][f]=p}}return c}async getPropertiesDepth(o,u){let c=u;for(let l=u-1;l>0;l--)if(typeof o[l]!="number"){const d=await this.unaliasKeyword(o[l],o,l);if(d==="@reverse")return l;if(d==="@nest")c=l;else return c}return c}async getContainerKey(o,u,c){const l=await this.unaliasKeyword(o,u,c);return l==="@none"?null:l}validateReverseInEmbeddedNode(o,u,c){if(c&&u&&!this.parsingContext.rdfstarReverseInEmbedded)throw new t.ErrorCoded(`Illegal reverse property in embedded node in ${o}`,t.ERROR_CODES.INVALID_EMBEDDED_NODE)}emitQuadChecked(o,u,c,l,d,f,h){let p;if(f?(this.validateReverseSubject(l),p=this.dataFactory.quad(l,c,u,d)):p=this.dataFactory.quad(u,c,l,d),h){if(p.graph.termType!=="DefaultGraph"&&(p=this.dataFactory.quad(p.subject,p.predicate,p.object)),this.parsingContext.idStack[o-1])throw new t.ErrorCoded("Illegal multiple properties in an embedded node",t.ERROR_CODES.INVALID_EMBEDDED_NODE);this.parsingContext.idStack[o-1]=[p]}else this.parsingContext.emitQuad(o,p);const b=this.parsingContext.annotationsBuffer[o];if(b){for(const _ of b)this.emitAnnotation(o,p,_);delete this.parsingContext.annotationsBuffer[o]}}emitAnnotation(o,u,c){let l;c.reverse?(this.validateReverseSubject(c.object),l=this.dataFactory.quad(c.object,c.predicate,u)):l=this.dataFactory.quad(u,c.predicate,c.object),this.parsingContext.emitQuad(o,l);for(const d of c.nestedAnnotations)this.emitAnnotation(o,l,d)}};return a.XSD="http://www.w3.org/2001/XMLSchema#",a.XSD_BOOLEAN=a.XSD+"boolean",a.XSD_INTEGER=a.XSD+"integer",a.XSD_DOUBLE=a.XSD+"double",a.RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#",oh.Util=a,oh}Object.defineProperty(c2,"__esModule",{value:!0});c2.EntryHandlerArrayValue=void 0;const Sde=Ol(),_4=hn;class Tde{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,r,n,a,s){return this.test(e,r,null,n,a)}async test(e,r,n,a,s){return typeof a[s]=="number"}async handle(e,r,n,a,s,o){let u=await r.unaliasKeywordParent(a,o);if(u==="@list"){let c=null,l=0;for(let d=o-2;d>0;d--){const f=a[d];if(typeof f=="string"||typeof f=="number"){l=d,c=f;break}}if(c!==null){const d=await r.valueToTerm(await e.getContext(a),c,s,o,a);for(const f of d)await this.handleListElement(e,r,f,s,o,a.slice(0,l),l);d.length===0&&await this.handleListElement(e,r,null,s,o,a.slice(0,l),l)}}else if(u==="@set")await e.newOnValueJob(a.slice(0,-2),s,o-2,!1);else if(u!==void 0&&u!=="@type"){for(let l=o-1;l>0;l--)if(typeof a[l]!="number"){u=await r.unaliasKeyword(a[l],a,l);break}const c=await e.getContext(a.slice(0,-1));if("@list"in Sde.Util.getContextValueContainer(c,u)){e.emittedStack[o+1]=!0;const l=await r.valueToTerm(await e.getContext(a),u,s,o,a);for(const d of l)await this.handleListElement(e,r,d,s,o,a.slice(0,-1),o-1);l.length===0&&await this.handleListElement(e,r,null,s,o,a.slice(0,-1),o-1)}else e.shiftStack(o,1),await e.newOnValueJob(a.slice(0,-1),s,o-1,!1),e.contextTree.removeContext(a.slice(0,-1))}}async handleListElement(e,r,n,a,s,o,u){let c=e.listPointerStack[s];if(a!==null&&(await r.unaliasKeywords(a,o,s))["@value"]!==null){if(!c||!c.value){const l=r.dataFactory.blankNode();c={value:l,listRootDepth:u,listId:l}}else{const l=r.dataFactory.blankNode();e.emitQuad(s,r.dataFactory.quad(c.value,r.rdfRest,l,r.getDefaultGraph())),c.value=l}n&&e.emitQuad(s,r.dataFactory.quad(c.value,r.rdfFirst,n,r.getDefaultGraph()))}else c||(c={listRootDepth:u,listId:r.rdfNil});e.listPointerStack[s]=c,e.rdfstar&&e.annotationsBuffer[s]&&e.emitError(new _4.ErrorCoded("Found an illegal annotation inside a list",_4.ERROR_CODES.INVALID_ANNOTATION))}}c2.EntryHandlerArrayValue=Tde;var h2={};Object.defineProperty(h2,"__esModule",{value:!0});h2.EntryHandlerInvalidFallback=void 0;class Ede{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,r,n,a,s){return!1}async test(e,r,n,a,s){return!0}async handle(e,r,n,a,s,o){e.emittedStack[o]=!1}}h2.EntryHandlerInvalidFallback=Ede;var p2={},fs={};Object.defineProperty(fs,"__esModule",{value:!0});fs.EntryHandlerKeyword=void 0;class Ode{constructor(e){this.keyword=e}isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,r,n,a,s){return!1}async test(e,r,n,a,s){return n===this.keyword}}fs.EntryHandlerKeyword=Ode;Object.defineProperty(p2,"__esModule",{value:!0});p2.EntryHandlerKeywordContext=void 0;const g4=hn,Ade=fs;class Rde extends Ade.EntryHandlerKeyword{constructor(){super("@context")}isStackProcessor(){return!1}async handle(e,r,n,a,s,o){e.streamingProfile&&(e.processingStack[o]||e.processingType[o]||e.idStack[o]!==void 0)&&e.emitError(new g4.ErrorCoded("Found an out-of-order context, while streaming is enabled.(disable `streamingProfile`)",g4.ERROR_CODES.INVALID_STREAMING_KEY_ORDER));const u=e.getContext(a),c=e.parseContext(s,(await u).getContextRaw());e.contextTree.setContext(a.slice(0,-1),c),e.emitContext(s),await e.validateContext(await c)}}p2.EntryHandlerKeywordContext=Rde;var y2={};Object.defineProperty(y2,"__esModule",{value:!0});y2.EntryHandlerKeywordGraph=void 0;const xde=fs;class Ide extends xde.EntryHandlerKeyword{constructor(){super("@graph")}async handle(e,r,n,a,s,o){e.graphStack[o+1]=!0}}y2.EntryHandlerKeywordGraph=Ide;var b2={};Object.defineProperty(b2,"__esModule",{value:!0});b2.EntryHandlerKeywordId=void 0;const vs=hn,Pde=fs;class Dde extends Pde.EntryHandlerKeyword{constructor(){super("@id")}isStackProcessor(){return!1}async handle(e,r,n,a,s,o){if(typeof s!="string"){if(e.rdfstar&&typeof s=="object"){const c=Object.keys(s);c.length===1&&c[0]==="@id"&&e.emitError(new vs.ErrorCoded(`Invalid embedded node without property with @id ${s["@id"]}`,vs.ERROR_CODES.INVALID_EMBEDDED_NODE))}else e.emitError(new vs.ErrorCoded(`Found illegal @id '${s}'`,vs.ERROR_CODES.INVALID_ID_VALUE));return}const u=await r.getPropertiesDepth(a,o);if(e.idStack[u]!==void 0&&(e.idStack[u][0].listHead?e.emitError(new vs.ErrorCoded(`Found illegal neighbouring entries next to @list for key: '${a[o-1]}'`,vs.ERROR_CODES.INVALID_SET_OR_LIST_OBJECT)):e.emitError(new vs.ErrorCoded(`Found duplicate @ids '${e.idStack[u][0].value}' and '${s}'`,vs.ERROR_CODES.COLLIDING_KEYWORDS))),e.rdfstar&&e.annotationsBuffer[o])for(const c of e.annotationsBuffer[o])c.depth===o&&e.emitError(new vs.ErrorCoded(`Found an illegal @id inside an annotation: ${s}`,vs.ERROR_CODES.INVALID_ANNOTATION));e.idStack[u]=r.nullableTermToArray(await r.resourceToTerm(await e.getContext(a),s))}}b2.EntryHandlerKeywordId=Dde;var _2={};Object.defineProperty(_2,"__esModule",{value:!0});_2.EntryHandlerKeywordIncluded=void 0;const Kl=hn,Nde=fs;class Cde extends Nde.EntryHandlerKeyword{constructor(){super("@included")}async handle(e,r,n,a,s,o){typeof s!="object"&&e.emitError(new Kl.ErrorCoded(`Found illegal @included '${s}'`,Kl.ERROR_CODES.INVALID_INCLUDED_VALUE));const u=await r.unaliasKeywords(s,a,o,await e.getContext(a));"@value"in u&&e.emitError(new Kl.ErrorCoded(`Found an illegal @included @value node '${JSON.stringify(s)}'`,Kl.ERROR_CODES.INVALID_INCLUDED_VALUE)),"@list"in u&&e.emitError(new Kl.ErrorCoded(`Found an illegal @included @list node '${JSON.stringify(s)}'`,Kl.ERROR_CODES.INVALID_INCLUDED_VALUE)),e.emittedStack[o]=!1}}_2.EntryHandlerKeywordIncluded=Cde;var g2={};Object.defineProperty(g2,"__esModule",{value:!0});g2.EntryHandlerKeywordNest=void 0;const h1=hn,jde=fs;class Mde extends jde.EntryHandlerKeyword{constructor(){super("@nest")}async handle(e,r,n,a,s,o){typeof s!="object"&&e.emitError(new h1.ErrorCoded(`Found invalid @nest entry for '${n}': '${s}'`,h1.ERROR_CODES.INVALID_NEST_VALUE)),"@value"in await r.unaliasKeywords(s,a,o,await e.getContext(a))&&e.emitError(new h1.ErrorCoded(`Found an invalid @value node for '${n}'`,h1.ERROR_CODES.INVALID_NEST_VALUE)),e.emittedStack[o]=!1}}g2.EntryHandlerKeywordNest=Mde;var m2={};Object.defineProperty(m2,"__esModule",{value:!0});m2.EntryHandlerKeywordType=void 0;const fh=hn,p1=Ol(),Fde=d2(),Lde=fs;class Bde extends Lde.EntryHandlerKeyword{constructor(){super("@type")}isStackProcessor(){return!1}async handle(e,r,n,a,s,o){const u=a[o],c=await e.getContext(a),l=r.rdfType,d=await r.unaliasKeywordParent(a,o),f=p1.Util.isPropertyReverse(c,u,d),h=p1.Util.isPropertyInEmbeddedNode(d);r.validateReverseInEmbeddedNode(n,f,h);const p=p1.Util.isPropertyInAnnotationObject(d),b=Array.isArray(s)?s:[s];for(const w of b){typeof w!="string"&&e.emitError(new fh.ErrorCoded(`Found illegal @type '${w}'`,fh.ERROR_CODES.INVALID_TYPE_VALUE));const O=r.createVocabOrBaseTerm(c,w);O&&await Fde.EntryHandlerPredicate.handlePredicateObject(e,r,a,o,l,O,f,h,p)}let _=Promise.resolve(c),E=!1;for(const w of b.sort()){const O=p1.Util.getContextValue(c,"@context",w,null);O&&(E=!0,_=_.then(A=>e.parseContext(O,A.getContextRaw())))}e.streamingProfile&&(E||!e.streamingProfileAllowOutOfOrderPlainType)&&(e.processingStack[o]||e.idStack[o])&&e.emitError(new fh.ErrorCoded("Found an out-of-order type-scoped context, while streaming is enabled.(disable `streamingProfile`)",fh.ERROR_CODES.INVALID_STREAMING_KEY_ORDER)),E&&(_=_.then(w=>w.getContextRaw()["@propagate"]!==!0?new fh.JsonLdContextNormalized(Object.assign(Object.assign({},w.getContextRaw()),{"@propagate":!1,"@__propagateFallback":c.getContextRaw()})):w),e.contextTree.setContext(a.slice(0,a.length-1),_)),e.processingType[o]=!0}}m2.EntryHandlerKeywordType=Bde;var v2={};Object.defineProperty(v2,"__esModule",{value:!0});v2.EntryHandlerKeywordUnknownFallback=void 0;const rp=hn;class w2{isPropertyHandler(){return!1}isStackProcessor(){return!0}async validate(e,r,n,a,s){const o=await r.unaliasKeyword(n[a],n,a);return rp.Util.isPotentialKeyword(o)?!(!s&&o==="@list"):!1}async test(e,r,n,a,s){return rp.Util.isPotentialKeyword(n)}async handle(e,r,n,a,s,o){const u=w2.VALID_KEYWORDS_TYPES[n];u!==void 0?u&&typeof s!==u.type&&e.emitError(new rp.ErrorCoded(`Invalid value type for '${n}' with value '${s}'`,u.errorCode)):e.strictValues&&e.emitError(new Error(`Unknown keyword '${n}' with value '${s}'`)),e.emittedStack[o]=!1}}w2.VALID_KEYWORDS_TYPES={"@index":{type:"string",errorCode:rp.ERROR_CODES.INVALID_INDEX_VALUE},"@list":null,"@reverse":{type:"object",errorCode:rp.ERROR_CODES.INVALID_REVERSE_VALUE},"@set":null,"@value":null};v2.EntryHandlerKeywordUnknownFallback=w2;var S2={};Object.defineProperty(S2,"__esModule",{value:!0});S2.EntryHandlerKeywordValue=void 0;const $de=fs;class Ude extends $de.EntryHandlerKeyword{constructor(){super("@value")}async validate(e,r,n,a,s){const o=n[a];return o&&!e.literalStack[a]&&await this.test(e,r,o,n,a)&&(e.literalStack[a]=!0),super.validate(e,r,n,a,s)}async test(e,r,n,a,s){return await r.unaliasKeyword(a[s],a.slice(0,a.length-1),s-1,!0)==="@value"}async handle(e,r,n,a,s,o){e.literalStack[o]=!0,delete e.unidentifiedValuesBuffer[o],delete e.unidentifiedGraphsBuffer[o],e.emittedStack[o]=!1}}S2.EntryHandlerKeywordValue=Ude;var hh={},T2={};Object.defineProperty(T2,"__esModule",{value:!0});T2.ContextTree=void 0;class QR{constructor(){this.subTrees={}}getContext(e){if(e.length>0){const[r,...n]=e,a=this.subTrees[r];if(a){const s=a.getContext(n);if(s)return s.then(({context:o,depth:u})=>({context:o,depth:u+1}))}}return this.context?this.context.then(r=>({context:r,depth:0})):null}setContext(e,r){if(e.length===0)this.context=r;else{const[n,...a]=e;let s=this.subTrees[n];s||(s=this.subTrees[n]=new QR),s.setContext(a,r)}}removeContext(e){this.setContext(e,null)}}T2.ContextTree=QR;var m4;function qde(){if(m4)return hh;m4=1,Object.defineProperty(hh,"__esModule",{value:!0}),hh.ParsingContext=void 0;const t=hn,e=Of,r=T2,n=oL();let a=class sL{constructor(o){this.contextParser=new t.ContextParser({documentLoader:o.documentLoader,skipValidation:o.skipContextValidation}),this.streamingProfile=!!o.streamingProfile,this.baseIRI=o.baseIRI,this.produceGeneralizedRdf=!!o.produceGeneralizedRdf,this.allowSubjectList=!!o.allowSubjectList,this.processingMode=o.processingMode||n.JsonLdParser.DEFAULT_PROCESSING_MODE,this.strictValues=!!o.strictValues,this.validateValueIndexes=!!o.validateValueIndexes,this.defaultGraph=o.defaultGraph,this.rdfDirection=o.rdfDirection,this.normalizeLanguageTags=o.normalizeLanguageTags,this.streamingProfileAllowOutOfOrderPlainType=o.streamingProfileAllowOutOfOrderPlainType,this.rdfstar=o.rdfstar!==!1,this.rdfstarReverseInEmbedded=o.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 r.ContextTree,this.literalStack=[],this.validationStack=[],this.unaliasedKeywordCacheStack=[],this.jsonLiteralStack=[],this.unidentifiedValuesBuffer=[],this.unidentifiedGraphsBuffer=[],this.annotationsBuffer=[],this.pendingContainerFlushBuffers=[],this.parser=o.parser,o.context?(this.rootContext=this.parseContext(o.context),this.rootContext.then(u=>this.validateContext(u))):this.rootContext=Promise.resolve(new t.JsonLdContextNormalized(this.baseIRI?{"@base":this.baseIRI,"@__baseDocument":!0}:{}))}async parseContext(o,u,c){return this.contextParser.parse(o,{baseIRI:this.baseIRI,ignoreProtection:c,normalizeLanguageTags:this.normalizeLanguageTags,parentContext:u,processingMode:this.activeProcessingMode})}validateContext(o){const u=o.getContextRaw()["@version"];if(u){if(this.activeProcessingMode&&u>this.activeProcessingMode)throw new e.ErrorCoded(`Unsupported JSON-LD version '${u}' under active processing mode ${this.activeProcessingMode}.`,e.ERROR_CODES.PROCESSING_MODE_CONFLICT);if(this.activeProcessingMode&&u0&&c.context.getContextRaw()["@propagate"]===!1&&c.depth!==u&&!l);return c.depth===0&&c.context.getContextRaw()["@propagate"]===!1&&c.depth!==u&&(c.context=new t.JsonLdContextNormalized({})),c}async newOnValueJob(o,u,c,l){await this.parser.newOnValueJob(o,u,c,l)}async handlePendingContainerFlushBuffers(){if(this.pendingContainerFlushBuffers.length>0){for(const o of this.pendingContainerFlushBuffers)await this.parser.flushBuffer(o.depth,o.keys),this.parser.flushStacks(o.depth);return this.pendingContainerFlushBuffers.splice(0,this.pendingContainerFlushBuffers.length),!0}else return!1}emitQuad(o,u){o===1&&(this.topLevelProperties=!0),this.parser.push(u)}emitError(o){this.parser.emit("error",o)}emitContext(o){this.parser.emit("context",o)}getUnidentifiedValueBufferSafe(o){let u=this.unidentifiedValuesBuffer[o];return u||(u=[],this.unidentifiedValuesBuffer[o]=u),u}getUnidentifiedGraphBufferSafe(o){let u=this.unidentifiedGraphsBuffer[o];return u||(u=[],this.unidentifiedGraphsBuffer[o]=u),u}getAnnotationsBufferSafe(o){let u=this.annotationsBuffer[o];return u||(u=[],this.annotationsBuffer[o]=u),u}getExpandOptions(){return sL.EXPAND_OPTIONS[this.activeProcessingMode]}shiftStack(o,u){const c=this.idStack[o+u];if(c&&(this.idStack[o]=c,this.emittedStack[o]=!0,delete this.idStack[o+u]),this.pendingContainerFlushBuffers.length)for(const l of this.pendingContainerFlushBuffers)l.depth>=o+u&&(l.depth-=u,l.keys.splice(o,u));this.unidentifiedValuesBuffer[o+u]&&(this.unidentifiedValuesBuffer[o]=this.unidentifiedValuesBuffer[o+u],delete this.unidentifiedValuesBuffer[o+u]),this.annotationsBuffer[o+u-1]&&(this.annotationsBuffer[o-1]||(this.annotationsBuffer[o-1]=[]),this.annotationsBuffer[o-1]=[...this.annotationsBuffer[o-1],...this.annotationsBuffer[o+u-1]],delete this.annotationsBuffer[o+u-1])}};return a.EXPAND_OPTIONS={1:{allowPrefixForcing:!1,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!1},1.1:{allowPrefixForcing:!0,allowPrefixNonGenDelims:!1,allowVocabRelativeToBase:!0}},hh.ParsingContext=a,hh}var E2={};Object.defineProperty(E2,"__esModule",{value:!0});E2.EntryHandlerKeywordAnnotation=void 0;const Vde=fs,v4=hn;class Hde extends Vde.EntryHandlerKeyword{constructor(){super("@annotation")}async handle(e,r,n,a,s,o){(typeof s=="string"||typeof s=="object"&&s["@value"])&&e.emitError(new v4.ErrorCoded(`Found illegal annotation value: ${JSON.stringify(s)}`,v4.ERROR_CODES.INVALID_ANNOTATION))}}E2.EntryHandlerKeywordAnnotation=Hde;var w4;function oL(){if(w4)return sh;w4=1,Object.defineProperty(sh,"__esModule",{value:!0}),sh.JsonLdParser=void 0;const t=bM,e=hn,r=kt,n=c2,a=aL(),s=h2,o=d2(),u=p2,c=y2,l=b2,d=_2,f=g2,h=m2,p=v2,b=S2,_=qde(),E=Ol(),w=Kj,O=E2;let A=class ad extends r.Transform{constructor(I){super({readableObjectMode:!0}),I=I||{},this.options=I,this.parsingContext=new _.ParsingContext(Object.assign({parser:this},I)),this.util=new E.Util({dataFactory:I.dataFactory,parsingContext:this.parsingContext}),this.jsonParser=new t,this.contextJobs=[],this.typeJobs=[],this.contextAwaitingJobs=[],this.lastDepth=0,this.lastKeys=[],this.lastOnValueJob=Promise.resolve(),this.attachJsonParserListeners(),this.on("end",()=>{typeof this.jsonParser.mode<"u"&&this.emit("error",new Error("Unclosed document"))})}static fromHttpResponse(I,D,U,H){let N;if(D!=="application/ld+json"){if(D!=="application/json"&&!D.endsWith("+json"))throw new e.ErrorCoded(`Unsupported JSON-LD media type ${D}`,e.ERROR_CODES.LOADING_DOCUMENT_FAILED);if(U&&U.has("Link")&&U.forEach((F,X)=>{if(X==="link"){const ne=(0,w.parse)(F);for(const $ of ne.get("rel","http://www.w3.org/ns/json-ld#context")){if(N)throw new e.ErrorCoded("Multiple JSON-LD context link headers were found on "+I,e.ERROR_CODES.MULTIPLE_CONTEXT_LINK_HEADERS);N=$.uri}}}),!N&&!(H!=null&&H.ignoreMissingContextLinkHeader))throw new e.ErrorCoded(`Missing context link header for media type ${D} on ${I}`,e.ERROR_CODES.LOADING_DOCUMENT_FAILED)}let x;if(U&&U.has("Content-Type")){const F=U.get("Content-Type"),X=/; *profile=([^"]*)/.exec(F);X&&X[1]==="http://www.w3.org/ns/json-ld#streaming"&&(x=!0)}return new ad(Object.assign({baseIRI:I,context:N,streamingProfile:x},H||{}))}import(I){if("pipe"in I){I.on("error",U=>D.emit("error",U));const D=I.pipe(new ad(this.options));return D}else{const D=new r.PassThrough({readableObjectMode:!0});I.on("error",H=>U.emit("error",H)),I.on("data",H=>D.push(H)),I.on("end",()=>D.push(null));const U=D.pipe(new ad(this.options));return U}}_transform(I,D,U){this.jsonParser.write(I),this.lastOnValueJob.then(()=>U(),H=>U(H))}async newOnValueJob(I,D,U,H){let N=!0;if(H&&U1&&(ne=this.parsingContext.validationStack[this.parsingContext.validationStack.length-1].property);for(let $=Math.max(1,this.parsingContext.validationStack.length-1);$=0?this.parsingContext.idStack[I-ne-1]:[await this.util.getGraphContainerValue(D,I)];if($)for(const j of $){this.parsingContext.emittedStack[I]=!0;for(const Q of N)this.util.emitQuadChecked(I,X,Q.predicate,Q.object,j,Q.reverse,Q.isEmbedded)}else{const j=this.parsingContext.getUnidentifiedGraphBufferSafe(I-await this.util.getDepthOffsetGraph(I,D)-1);for(const Q of N)Q.reverse?j.push({object:X,predicate:Q.predicate,subject:Q.object,isEmbedded:Q.isEmbedded}):j.push({object:Q.object,predicate:Q.predicate,subject:X,isEmbedded:Q.isEmbedded})}}this.parsingContext.unidentifiedValuesBuffer.splice(I,1),this.parsingContext.literalStack.splice(I,1),this.parsingContext.jsonLiteralStack.splice(I,1)}const x=this.parsingContext.unidentifiedGraphsBuffer[I];if(x){for(const X of U){const ne=I===1&&X.termType==="BlankNode"&&!this.parsingContext.topLevelProperties?this.util.getDefaultGraph():X;this.parsingContext.emittedStack[I]=!0;for(const $ of x)this.parsingContext.emitQuad(I,this.util.dataFactory.quad($.subject,$.predicate,$.object,ne))}this.parsingContext.unidentifiedGraphsBuffer.splice(I,1)}const F=this.parsingContext.annotationsBuffer[I];if(F){F.length>0&&I===1&&this.parsingContext.emitError(new e.ErrorCoded("Annotations can not be made on top-level nodes",e.ERROR_CODES.INVALID_ANNOTATION));const X=this.parsingContext.getAnnotationsBufferSafe(I-1);for(const ne of F)X.push(ne);delete this.parsingContext.annotationsBuffer[I]}}async validateKey(I,D,U){for(const H of ad.ENTRY_HANDLERS)if(await H.validate(this.parsingContext,this.util,I,D,U))return{valid:!0,property:U||H.isPropertyHandler()};return{valid:!1,property:!1}}attachJsonParserListeners(){this.jsonParser.onValue=I=>{const D=this.jsonParser.stack.length,U=new Array(D+1).fill(0).map((H,N)=>N===D?this.jsonParser.key:this.jsonParser.stack[N].key);if(!this.isParsingContextInner(D)){const H=()=>this.newOnValueJob(U,I,D,!0);if(!this.parsingContext.streamingProfile&&!this.parsingContext.contextTree.getContext(U.slice(0,-1)))if(U[D]==="@context"){let N=this.contextJobs[D];N||(N=this.contextJobs[D]=[]),N.push(H)}else this.contextAwaitingJobs.push({job:H,keys:U,depth:D});else this.lastOnValueJob=this.lastOnValueJob.then(H);!this.parsingContext.streamingProfile&&D===0&&(this.lastOnValueJob=this.lastOnValueJob.then(()=>this.executeBufferedJobs()))}},this.jsonParser.onError=I=>{this.emit("error",I)}}isParsingContextInner(I){for(let D=I;D>0;D--)if(this.jsonParser.stack[D-1].key==="@context")return!0;return!1}async executeBufferedJobs(){for(const D of this.contextJobs)if(D)for(const U of D)await U();this.parsingContext.unaliasedKeywordCacheStack.splice(0);const I=[];for(const D of this.contextAwaitingJobs)await this.util.unaliasKeyword(D.keys[D.depth],D.keys,D.depth,!0)==="@type"||typeof D.keys[D.depth]=="number"&&await this.util.unaliasKeyword(D.keys[D.depth-1],D.keys,D.depth-1,!0)==="@type"?this.typeJobs.push({job:D.job,keys:D.keys.slice(0,D.keys.length-1)}):I.push(D);for(const D of I){if(this.typeJobs.length>0){const U=[],H=[];for(let F=0;FF.keys.length-X.keys.length);for(const F of N)await F.job();const x=H.sort().reverse();for(const F of x)this.typeJobs.splice(F,1)}await D.job()}}};return A.DEFAULT_PROCESSING_MODE="1.1",A.ENTRY_HANDLERS=[new n.EntryHandlerArrayValue,new u.EntryHandlerKeywordContext,new l.EntryHandlerKeywordId,new d.EntryHandlerKeywordIncluded,new c.EntryHandlerKeywordGraph,new f.EntryHandlerKeywordNest,new h.EntryHandlerKeywordType,new b.EntryHandlerKeywordValue,new O.EntryHandlerKeywordAnnotation,new a.EntryHandlerContainer,new p.EntryHandlerKeywordUnknownFallback,new o.EntryHandlerPredicate,new s.EntryHandlerInvalidFallback],sh.JsonLdParser=A,sh}(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(oL(),t)})(nL);var k0={};Object.defineProperty(k0,"__esModule",{value:!0});k0.DocumentLoaderMediated=void 0;const kde=Zs,Qde=hn,Gde=wl;class GR extends Qde.FetchDocumentLoader{constructor(e,r){super(GR.createFetcher(e,r)),this.mediatorHttp=e,this.context=r}static createFetcher(e,r){return async(n,a)=>{const s=await e.mediate({input:n,init:a,context:r});return s.json=async()=>JSON.parse(await Gde(kde.ActorHttp.toNodeReadable(s.body))),s}}}k0.DocumentLoaderMediated=GR;Object.defineProperty(u2,"__esModule",{value:!0});u2.ActorRdfParseJsonLd=void 0;const zde=ml,y1=rr,Wde=nL,Xde=k0;class Kde extends zde.ActorRdfParseFixedMediaTypes{constructor(e){super(e)}async testHandle(e,r,n){if(n.has(y1.KeysRdfParseHtmlScript.processingHtmlScript)&&r!=="application/ld+json")throw new Error("JSON-LD in script tags can only have media type 'application/ld+json'");if(!r||!(r in this.mediaTypePriorities||r.endsWith("+json")))throw new Error(`Unrecognized media type: ${r}`);return await this.testHandleChecked(e)}async runHandle(e,r,n){var o;return{data:Wde.JsonLdParser.fromHttpResponse(((o=e.metadata)==null?void 0:o.baseIRI)??"",r,e.headers,{documentLoader:n.get(y1.KeysRdfParseJsonLd.documentLoader)||new Xde.DocumentLoaderMediated(this.mediatorHttp,n),strictValues:n.get(y1.KeysRdfParseJsonLd.strictValues),...n.get(y1.KeysRdfParseJsonLd.parserOptions)}).import(e.data)}}}u2.ActorRdfParseJsonLd=Kde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(u2,t),r(k0,t)})(rL);var uL={},O2={},A2={},R2={},x2={};(function(){(function(t){(function(e){var r={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};function n(N){return N&&DataView.prototype.isPrototypeOf(N)}if(r.arrayBuffer)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],s=ArrayBuffer.isView||function(N){return N&&a.indexOf(Object.prototype.toString.call(N))>-1};function o(N){if(typeof N!="string"&&(N=String(N)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(N))throw new TypeError("Invalid character in header field name");return N.toLowerCase()}function u(N){return typeof N!="string"&&(N=String(N)),N}function c(N){var x={next:function(){var F=N.shift();return{done:F===void 0,value:F}}};return r.iterable&&(x[Symbol.iterator]=function(){return x}),x}function l(N){this.map={},N instanceof l?N.forEach(function(x,F){this.append(F,x)},this):Array.isArray(N)?N.forEach(function(x){this.append(x[0],x[1])},this):N&&Object.getOwnPropertyNames(N).forEach(function(x){this.append(x,N[x])},this)}l.prototype.append=function(N,x){N=o(N),x=u(x);var F=this.map[N];this.map[N]=F?F+", "+x:x},l.prototype.delete=function(N){delete this.map[o(N)]},l.prototype.get=function(N){return N=o(N),this.has(N)?this.map[N]:null},l.prototype.has=function(N){return this.map.hasOwnProperty(o(N))},l.prototype.set=function(N,x){this.map[o(N)]=u(x)},l.prototype.forEach=function(N,x){for(var F in this.map)this.map.hasOwnProperty(F)&&N.call(x,this.map[F],F,this)},l.prototype.keys=function(){var N=[];return this.forEach(function(x,F){N.push(F)}),c(N)},l.prototype.values=function(){var N=[];return this.forEach(function(x){N.push(x)}),c(N)},l.prototype.entries=function(){var N=[];return this.forEach(function(x,F){N.push([F,x])}),c(N)},r.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);function d(N){if(N.bodyUsed)return Promise.reject(new TypeError("Already read"));N.bodyUsed=!0}function f(N){return new Promise(function(x,F){N.onload=function(){x(N.result)},N.onerror=function(){F(N.error)}})}function h(N){var x=new FileReader,F=f(x);return x.readAsArrayBuffer(N),F}function p(N){var x=new FileReader,F=f(x);return x.readAsText(N),F}function b(N){for(var x=new Uint8Array(N),F=new Array(x.length),X=0;X-1?x:N}function A(N,x){x=x||{};var F=x.body;if(N instanceof A){if(N.bodyUsed)throw new TypeError("Already read");this.url=N.url,this.credentials=N.credentials,x.headers||(this.headers=new l(N.headers)),this.method=N.method,this.mode=N.mode,this.signal=N.signal,!F&&N._bodyInit!=null&&(F=N._bodyInit,N.bodyUsed=!0)}else this.url=String(N);if(this.credentials=x.credentials||this.credentials||"same-origin",(x.headers||!this.headers)&&(this.headers=new l(x.headers)),this.method=O(x.method||this.method||"GET"),this.mode=x.mode||this.mode||null,this.signal=x.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&F)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(F)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})};function T(N){var x=new FormData;return N.trim().split("&").forEach(function(F){if(F){var X=F.split("="),ne=X.shift().replace(/\+/g," "),$=X.join("=").replace(/\+/g," ");x.append(decodeURIComponent(ne),decodeURIComponent($))}}),x}function I(N){var x=new l,F=N.replace(/\r?\n[\t ]+/g," ");return F.split(/\r?\n/).forEach(function(X){var ne=X.split(":"),$=ne.shift().trim();if($){var j=ne.join(":").trim();x.append($,j)}}),x}E.call(A.prototype);function D(N,x){x||(x={}),this.type="default",this.status=x.status===void 0?200:x.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in x?x.statusText:"OK",this.headers=new l(x.headers),this.url=x.url||"",this._initBody(N)}E.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},D.error=function(){var N=new D(null,{status:0,statusText:""});return N.type="error",N};var U=[301,302,303,307,308];D.redirect=function(N,x){if(U.indexOf(x)===-1)throw new RangeError("Invalid status code");return new D(null,{status:x,headers:{location:N}})},e.DOMException=t.DOMException;try{new e.DOMException}catch{e.DOMException=function(x,F){this.message=x,this.name=F;var X=Error(x);this.stack=X.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function H(N,x){return new Promise(function(F,X){var ne=new A(N,x);if(ne.signal&&ne.signal.aborted)return X(new e.DOMException("Aborted","AbortError"));var $=new XMLHttpRequest;function j(){$.abort()}$.onload=function(){var Q={status:$.status,statusText:$.statusText,headers:I($.getAllResponseHeaders()||"")};Q.url="responseURL"in $?$.responseURL:Q.headers.get("X-Request-URL");var se="response"in $?$.response:$.responseText;F(new D(se,Q))},$.onerror=function(){X(new TypeError("Network request failed"))},$.ontimeout=function(){X(new TypeError("Network request failed"))},$.onabort=function(){X(new e.DOMException("Aborted","AbortError"))},$.open(ne.method,ne.url,!0),ne.credentials==="include"?$.withCredentials=!0:ne.credentials==="omit"&&($.withCredentials=!1),"responseType"in $&&r.blob&&($.responseType="blob"),ne.headers.forEach(function(Q,se){$.setRequestHeader(se,Q)}),ne.signal&&(ne.signal.addEventListener("abort",j),$.onreadystatechange=function(){$.readyState===4&&ne.signal.removeEventListener("abort",j)}),$.send(typeof ne._bodyInit>"u"?null:ne._bodyInit)})}return H.polyfill=!0,t.fetch||(t.fetch=H,t.Headers=l,t.Request=A,t.Response=D),e.Headers=l,e.Request=A,e.Response=D,e.fetch=H,Object.defineProperty(e,"__esModule",{value:!0}),e})({})})(typeof self<"u"?self:m)})();var cL={},I2={};Object.defineProperty(I2,"__esModule",{value:!0});I2.SparqlXmlParser=void 0;const Jde=ht,S4=al,Yde=kt;class Zde{constructor(e){e=e||{},this.dataFactory=e.dataFactory||new Jde.DataFactory,this.prefixVariableQuestionMark=!!e.prefixVariableQuestionMark}parseXmlResultsStream(e){const r=_=>b.emit("error",_);e.on("error",r);const n=new S4.SaxesParser,a=[];let s=!1,o=!1;const u=[];let c={},l="",d="",f,h="",p=[];n.on("error",r),n.on("opentag",_=>{_.name==="variable"&&this.stackEquals(a,["sparql","head"])?u.push(this.dataFactory.variable(_.attributes.name)):_.name==="results"&&this.stackEquals(a,["sparql"])?o=!0:_.name==="result"&&this.stackEquals(a,["sparql","results"])?c={}:_.name==="binding"&&this.stackEquals(a,["sparql","results","result"])?(l=_.attributes.name||"",d="",f="",h="",p=[]):_.name==="triple"&&this.stackBeginsWith(a,["sparql","results","result"])?p.push({components:{}}):a[a.length-1]==="triple"&&this.stackBeginsWith(a,["sparql","results","result","binding"])?(d="",f="",h="",["subject","predicate","object"].includes(_.name)?p[p.length-1].currentComponent=_.name:r(new Error(`Illegal quoted triple component '${_.name}' found on line ${n.line+1}`))):this.stackBeginsWith(a,["sparql","results","result","binding"])&&(d=_.name,"xml:lang"in _.attributes?f=_.attributes["xml:lang"]:"datatype"in _.attributes?f=this.dataFactory.namedNode(_.attributes.datatype):f=void 0),a.push(_.name)}),n.on("closetag",_=>{if(this.stackEquals(a,["sparql","head"])&&(b.emit("variables",u),s=!0),this.stackEquals(a,["sparql","results","result"])&&b.push(c),this.stackBeginsWith(a,["sparql","results","result","binding"])){let E;if(!l&&d)r(new Error(`Terms should have a name on line ${n.line+1}`));else if(d==="uri")E=this.dataFactory.namedNode(h);else if(d==="bnode")E=this.dataFactory.blankNode(h);else if(d==="literal")E=this.dataFactory.literal(h,f);else if(a[a.length-1]==="triple"){const w=p.pop();w&&w.components.subject&&w.components.predicate&&w.components.object?E=this.dataFactory.quad(w.components.subject,w.components.predicate,w.components.object):r(new Error(`Incomplete quoted triple on line ${n.line+1}`))}else d&&r(new Error(`Invalid term type '${d}' on line ${n.line+1}`));if(E)if(p.length>0){const w=p[p.length-1];w.components[w.currentComponent]&&r(new Error(`The ${w.currentComponent} in a quoted triple on line ${n.line+1} was already defined before`)),w.components[w.currentComponent]=E}else{const w=this.prefixVariableQuestionMark?"?"+l:l;c[w]=E}d=void 0}a.pop()}),n.on("text",_=>{this.stackBeginsWith(a,["sparql","results","result","binding"])&&a[a.length-1]===d&&(h=_)});const b=e.on("end",_=>{o?s||b.emit("variables",[]):b.emit("error",new Error("No valid SPARQL query results were found."))}).pipe(new Yde.Transform({objectMode:!0,transform(_,E,w){n.write(_),w()}}));return b}parseXmlBooleanStream(e){return new Promise((r,n)=>{const a=new S4.SaxesParser,s=[];a.on("error",n),a.on("opentag",o=>{s.push(o.name)}),a.on("closetag",o=>{s.pop()}),a.on("text",o=>{this.stackEquals(s,["sparql","boolean"])&&r(o==="true")}),e.on("error",n).on("data",o=>a.write(o)).on("end",()=>n(new Error("No valid ASK response was found.")))})}stackEquals(e,r){return e.length===r.length&&e.every((n,a)=>r[a]===n)}stackBeginsWith(e,r){return e.length>=r.length&&r.every((n,a)=>e[a]===n)}}I2.SparqlXmlParser=Zde;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(I2,t)})(cL);Object.defineProperty(x2,"__esModule",{value:!0});x2.SparqlEndpointFetcher=void 0;const T4=xg,E4=u0,efe=aR,tfe=cL,rfe=wl,nfe=q0,ife=rc,afe=D7;class Bi{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 efe.SparqlJsonParser(e),this.sparqlXmlParser=new tfe.SparqlXmlParser(e),this.sparqlParsers={[Bi.CONTENTTYPE_SPARQL_JSON]:{parseBooleanStream:r=>this.sparqlJsonParser.parseJsonBooleanStream(r),parseResultsStream:r=>this.sparqlJsonParser.parseJsonResultsStream(r)},[Bi.CONTENTTYPE_SPARQL_XML]:{parseBooleanStream:r=>this.sparqlXmlParser.parseXmlBooleanStream(r),parseResultsStream:r=>this.sparqlXmlParser.parseXmlResultsStream(r)}},this.timeout=e.timeout}getQueryType(e){const r=new E4.Parser({sparqlStar:!0}).parse(e);return r.type==="query"?r.queryType==="DESCRIBE"?"CONSTRUCT":r.queryType:"UNKNOWN"}getUpdateTypes(e){const r=new E4.Parser({sparqlStar:!0}).parse(e);if(r.type==="update"){const n={};for(const a of r.updates)"type"in a?n[a.type]=!0:n[a.updateType]=!0;return n}else return"UNKNOWN"}async fetchBindings(e,r){const[n,a]=await this.fetchRawStream(e,r,Bi.CONTENTTYPE_SPARQL),s=this.sparqlParsers[n];if(!s)throw new Error("Unknown SPARQL results content type: "+n);return s.parseResultsStream(a)}async fetchAsk(e,r){const[n,a]=await this.fetchRawStream(e,r,Bi.CONTENTTYPE_SPARQL),s=this.sparqlParsers[n];if(!s)throw new Error("Unknown SPARQL results content type: "+n);return s.parseBooleanStream(a)}async fetchTriples(e,r){return(await this.fetchRawStream(e,r,Bi.CONTENTTYPE_TURTLE))[1].pipe(new ife.StreamParser({format:Bi.CONTENTTYPE_TURTLE}))}async fetchUpdate(e,r){const n=new T4.default,a={};this.defaultHeaders.forEach((o,u)=>{a[u]=o});const s={method:"POST",headers:Object.assign(Object.assign({},a),{"content-type":"application/sparql-update"}),body:r,signal:n.signal};await this.handleFetchCall(e,s,{ignoreBody:!0}),n.abort()}async fetchRawStream(e,r,n){let a=this.method==="POST"?e:e+"?query="+encodeURIComponent(r);const s=new Headers(this.defaultHeaders);let o;return s.append("Accept",n),this.method==="POST"?(s.append("Content-Type","application/x-www-form-urlencoded"),o=new URLSearchParams,o.set("query",r),this.additionalUrlParams.forEach((u,c)=>{o.set(c,u)}),s.append("Content-Length",o.toString().length.toString())):this.additionalUrlParams.toString()!==""&&(a+=`&${this.additionalUrlParams.toString()}`),this.handleFetchCall(a,{headers:s,method:this.method,body:o})}async handleFetchCall(e,r,n={}){let a;if(this.timeout){const c=new T4.default;r.signal=c.signal,a=setTimeout(()=>c.abort(),this.timeout)}const s=await(this.fetchCb||fetch)(e,r);clearTimeout(a);let o;n.ignoreBody||(o=afe(s.body)?s.body:new nfe.ReadableWebToNodeStream(s.body));let u=s.headers.get("Content-Type")||"";if(u.indexOf(";")>0&&(u=u.substr(0,u.indexOf(";"))),!s.ok){const c=/^[^?]*/u.exec(e)[0];let l="empty response";throw o&&(l=await rfe(o)),new Error(`Invalid SPARQL endpoint response from ${c} (HTTP status ${s.status}): +${l}`)}return[u,o]}}Bi.CONTENTTYPE_SPARQL_JSON="application/sparql-results+json";Bi.CONTENTTYPE_SPARQL_XML="application/sparql-results+xml";Bi.CONTENTTYPE_SPARQL=`${Bi.CONTENTTYPE_SPARQL_JSON};q=1.0,${Bi.CONTENTTYPE_SPARQL_XML};q=0.7`;Bi.CONTENTTYPE_TURTLE="text/turtle";x2.SparqlEndpointFetcher=Bi;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(x2,t)})(R2);var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0});Pa.LRUCache=void 0;const ph=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,lL=new Set,oO=typeof process=="object"&&process?process:{},dL=(t,e,r,n)=>{typeof oO.emitWarning=="function"?oO.emitWarning(t,e,r,n):console.error(`[${r}] ${e}: ${t}`)};let Lb=globalThis.AbortController,O4=globalThis.AbortSignal;var u8;if(typeof Lb>"u"){O4=class{constructor(){$r(this,"onabort");$r(this,"_onabort",[]);$r(this,"reason");$r(this,"aborted",!1)}addEventListener(n,a){this._onabort.push(a)}},Lb=class{constructor(){$r(this,"signal",new O4);e()}abort(n){var a,s;if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(const o of this.signal._onabort)o(n);(s=(a=this.signal).onabort)==null||s.call(a,n)}}};let t=((u8=oO.env)==null?void 0:u8.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,dL("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",e))}}const sfe=t=>!lL.has(t),yu=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),fL=t=>yu(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?tb:null:null;class tb extends Array{constructor(e){super(e),this.fill(0)}}var Od;const qc=class qc{constructor(e,r){$r(this,"heap");$r(this,"length");if(!fe(qc,Od))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=fL(e);if(!r)return[];ut(qc,Od,!0);const n=new qc(e,r);return ut(qc,Od,!1),n}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Od=new WeakMap,wt(qc,Od,!1);let uO=qc;var Qa,zi,Ga,za,Ad,ln,Wa,dn,Sr,_t,yi,Wi,zn,vn,Xa,wn,To,Eo,Ka,Ja,Pu,bi,Np,lO,Qc,Oo,Cp,Xi,Ub,hL,Gc,Rd,jp,Os,bu,As,_u,Mp,dO,xd,rb,Id,nb,pr,Cr,Fp,fO,zc,kh;const Ex=class Ex{constructor(e){wt(this,Np);wt(this,Ub);wt(this,Os);wt(this,As);wt(this,Mp);wt(this,xd);wt(this,Id);wt(this,pr);wt(this,Fp);wt(this,zc);wt(this,Qa,void 0);wt(this,zi,void 0);wt(this,Ga,void 0);wt(this,za,void 0);wt(this,Ad,void 0);$r(this,"ttl");$r(this,"ttlResolution");$r(this,"ttlAutopurge");$r(this,"updateAgeOnGet");$r(this,"updateAgeOnHas");$r(this,"allowStale");$r(this,"noDisposeOnSet");$r(this,"noUpdateTTL");$r(this,"maxEntrySize");$r(this,"sizeCalculation");$r(this,"noDeleteOnFetchRejection");$r(this,"noDeleteOnStaleGet");$r(this,"allowStaleOnFetchAbort");$r(this,"allowStaleOnFetchRejection");$r(this,"ignoreFetchAbort");wt(this,ln,void 0);wt(this,Wa,void 0);wt(this,dn,void 0);wt(this,Sr,void 0);wt(this,_t,void 0);wt(this,yi,void 0);wt(this,Wi,void 0);wt(this,zn,void 0);wt(this,vn,void 0);wt(this,Xa,void 0);wt(this,wn,void 0);wt(this,To,void 0);wt(this,Eo,void 0);wt(this,Ka,void 0);wt(this,Ja,void 0);wt(this,Pu,void 0);wt(this,bi,void 0);wt(this,Qc,()=>{});wt(this,Oo,()=>{});wt(this,Cp,()=>{});wt(this,Xi,()=>!1);wt(this,Gc,e=>{});wt(this,Rd,(e,r,n)=>{});wt(this,jp,(e,r,n,a)=>{if(n||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});const{max:r=0,ttl:n,ttlResolution:a=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:u,allowStale:c,dispose:l,disposeAfter:d,noDisposeOnSet:f,noUpdateTTL:h,maxSize:p=0,maxEntrySize:b=0,sizeCalculation:_,fetchMethod:E,noDeleteOnFetchRejection:w,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:T,ignoreFetchAbort:I}=e;if(r!==0&&!yu(r))throw new TypeError("max option must be a nonnegative integer");const D=r?fL(r):Array;if(!D)throw new Error("invalid max value: "+r);if(ut(this,Qa,r),ut(this,zi,p),this.maxEntrySize=b||fe(this,zi),this.sizeCalculation=_,this.sizeCalculation){if(!fe(this,zi)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(E!==void 0&&typeof E!="function")throw new TypeError("fetchMethod must be a function if specified");if(ut(this,Ad,E),ut(this,Pu,!!E),ut(this,dn,new Map),ut(this,Sr,new Array(r).fill(void 0)),ut(this,_t,new Array(r).fill(void 0)),ut(this,yi,new D(r)),ut(this,Wi,new D(r)),ut(this,zn,0),ut(this,vn,0),ut(this,Xa,uO.create(r)),ut(this,ln,0),ut(this,Wa,0),typeof l=="function"&&ut(this,Ga,l),typeof d=="function"?(ut(this,za,d),ut(this,wn,[])):(ut(this,za,void 0),ut(this,wn,void 0)),ut(this,Ja,!!fe(this,Ga)),ut(this,bi,!!fe(this,za)),this.noDisposeOnSet=!!f,this.noUpdateTTL=!!h,this.noDeleteOnFetchRejection=!!w,this.allowStaleOnFetchRejection=!!A,this.allowStaleOnFetchAbort=!!T,this.ignoreFetchAbort=!!I,this.maxEntrySize!==0){if(fe(this,zi)!==0&&!yu(fe(this,zi)))throw new TypeError("maxSize must be a positive integer if specified");if(!yu(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");it(this,Ub,hL).call(this)}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!u,this.ttlResolution=yu(a)||a===0?a:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!yu(this.ttl))throw new TypeError("ttl must be a positive integer if specified");it(this,Np,lO).call(this)}if(fe(this,Qa)===0&&this.ttl===0&&fe(this,zi)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!fe(this,Qa)&&!fe(this,zi)){const U="LRU_CACHE_UNBOUNDED";sfe(U)&&(lL.add(U),dL("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",U,Ex))}}static unsafeExposeInternals(e){return{starts:fe(e,Eo),ttls:fe(e,Ka),sizes:fe(e,To),keyMap:fe(e,dn),keyList:fe(e,Sr),valList:fe(e,_t),next:fe(e,yi),prev:fe(e,Wi),get head(){return fe(e,zn)},get tail(){return fe(e,vn)},free:fe(e,Xa),isBackgroundFetch:r=>{var n;return it(n=e,pr,Cr).call(n,r)},backgroundFetch:(r,n,a,s)=>{var o;return it(o=e,Id,nb).call(o,r,n,a,s)},moveToTail:r=>{var n;return it(n=e,zc,kh).call(n,r)},indexes:r=>{var n;return it(n=e,Os,bu).call(n,r)},rindexes:r=>{var n;return it(n=e,As,_u).call(n,r)},isStale:r=>{var n;return fe(n=e,Xi).call(n,r)}}}get max(){return fe(this,Qa)}get maxSize(){return fe(this,zi)}get calculatedSize(){return fe(this,Wa)}get size(){return fe(this,ln)}get fetchMethod(){return fe(this,Ad)}get dispose(){return fe(this,Ga)}get disposeAfter(){return fe(this,za)}getRemainingTTL(e){return fe(this,dn).has(e)?1/0:0}*entries(){for(const e of it(this,Os,bu).call(this))fe(this,_t)[e]!==void 0&&fe(this,Sr)[e]!==void 0&&!it(this,pr,Cr).call(this,fe(this,_t)[e])&&(yield[fe(this,Sr)[e],fe(this,_t)[e]])}*rentries(){for(const e of it(this,As,_u).call(this))fe(this,_t)[e]!==void 0&&fe(this,Sr)[e]!==void 0&&!it(this,pr,Cr).call(this,fe(this,_t)[e])&&(yield[fe(this,Sr)[e],fe(this,_t)[e]])}*keys(){for(const e of it(this,Os,bu).call(this)){const r=fe(this,Sr)[e];r!==void 0&&!it(this,pr,Cr).call(this,fe(this,_t)[e])&&(yield r)}}*rkeys(){for(const e of it(this,As,_u).call(this)){const r=fe(this,Sr)[e];r!==void 0&&!it(this,pr,Cr).call(this,fe(this,_t)[e])&&(yield r)}}*values(){for(const e of it(this,Os,bu).call(this))fe(this,_t)[e]!==void 0&&!it(this,pr,Cr).call(this,fe(this,_t)[e])&&(yield fe(this,_t)[e])}*rvalues(){for(const e of it(this,As,_u).call(this))fe(this,_t)[e]!==void 0&&!it(this,pr,Cr).call(this,fe(this,_t)[e])&&(yield fe(this,_t)[e])}[Symbol.iterator](){return this.entries()}find(e,r={}){for(const n of it(this,Os,bu).call(this)){const a=fe(this,_t)[n],s=it(this,pr,Cr).call(this,a)?a.__staleWhileFetching:a;if(s!==void 0&&e(s,fe(this,Sr)[n],this))return this.get(fe(this,Sr)[n],r)}}forEach(e,r=this){for(const n of it(this,Os,bu).call(this)){const a=fe(this,_t)[n],s=it(this,pr,Cr).call(this,a)?a.__staleWhileFetching:a;s!==void 0&&e.call(r,s,fe(this,Sr)[n],this)}}rforEach(e,r=this){for(const n of it(this,As,_u).call(this)){const a=fe(this,_t)[n],s=it(this,pr,Cr).call(this,a)?a.__staleWhileFetching:a;s!==void 0&&e.call(r,s,fe(this,Sr)[n],this)}}purgeStale(){let e=!1;for(const r of it(this,As,_u).call(this,{allowStale:!0}))fe(this,Xi).call(this,r)&&(this.delete(fe(this,Sr)[r]),e=!0);return e}dump(){const e=[];for(const r of it(this,Os,bu).call(this,{allowStale:!0})){const n=fe(this,Sr)[r],a=fe(this,_t)[r],s=it(this,pr,Cr).call(this,a)?a.__staleWhileFetching:a;if(s===void 0||n===void 0)continue;const o={value:s};if(fe(this,Ka)&&fe(this,Eo)){o.ttl=fe(this,Ka)[r];const u=ph.now()-fe(this,Eo)[r];o.start=Math.floor(Date.now()-u)}fe(this,To)&&(o.size=fe(this,To)[r]),e.unshift([n,o])}return e}load(e){this.clear();for(const[r,n]of e){if(n.start){const a=Date.now()-n.start;n.start=ph.now()-a}this.set(r,n.value,n)}}set(e,r,n={}){var h,p,b,_,E;if(r===void 0)return this.delete(e),this;const{ttl:a=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:c}=n;let{noUpdateTTL:l=this.noUpdateTTL}=n;const d=fe(this,jp).call(this,e,r,n.size||0,u);if(this.maxEntrySize&&d>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.delete(e),this;let f=fe(this,ln)===0?void 0:fe(this,dn).get(e);if(f===void 0)f=fe(this,ln)===0?fe(this,vn):fe(this,Xa).length!==0?fe(this,Xa).pop():fe(this,ln)===fe(this,Qa)?it(this,xd,rb).call(this,!1):fe(this,ln),fe(this,Sr)[f]=e,fe(this,_t)[f]=r,fe(this,dn).set(e,f),fe(this,yi)[fe(this,vn)]=f,fe(this,Wi)[f]=fe(this,vn),ut(this,vn,f),Ty(this,ln)._++,fe(this,Rd).call(this,f,d,c),c&&(c.set="add"),l=!1;else{it(this,zc,kh).call(this,f);const w=fe(this,_t)[f];if(r!==w){if(fe(this,Pu)&&it(this,pr,Cr).call(this,w)){w.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:O}=w;O!==void 0&&!o&&(fe(this,Ja)&&((h=fe(this,Ga))==null||h.call(this,O,e,"set")),fe(this,bi)&&((p=fe(this,wn))==null||p.push([O,e,"set"])))}else o||(fe(this,Ja)&&((b=fe(this,Ga))==null||b.call(this,w,e,"set")),fe(this,bi)&&((_=fe(this,wn))==null||_.push([w,e,"set"])));if(fe(this,Gc).call(this,f),fe(this,Rd).call(this,f,d,c),fe(this,_t)[f]=r,c){c.set="replace";const O=w&&it(this,pr,Cr).call(this,w)?w.__staleWhileFetching:w;O!==void 0&&(c.oldValue=O)}}else c&&(c.set="update")}if(a!==0&&!fe(this,Ka)&&it(this,Np,lO).call(this),fe(this,Ka)&&(l||fe(this,Cp).call(this,f,a,s),c&&fe(this,Oo).call(this,c,f)),!o&&fe(this,bi)&&fe(this,wn)){const w=fe(this,wn);let O;for(;O=w==null?void 0:w.shift();)(E=fe(this,za))==null||E.call(this,...O)}return this}pop(){var e;try{for(;fe(this,ln);){const r=fe(this,_t)[fe(this,zn)];if(it(this,xd,rb).call(this,!0),it(this,pr,Cr).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(fe(this,bi)&&fe(this,wn)){const r=fe(this,wn);let n;for(;n=r==null?void 0:r.shift();)(e=fe(this,za))==null||e.call(this,...n)}}}has(e,r={}){const{updateAgeOnHas:n=this.updateAgeOnHas,status:a}=r,s=fe(this,dn).get(e);if(s!==void 0){const o=fe(this,_t)[s];if(it(this,pr,Cr).call(this,o)&&o.__staleWhileFetching===void 0)return!1;if(fe(this,Xi).call(this,s))a&&(a.has="stale",fe(this,Oo).call(this,a,s));else return n&&fe(this,Qc).call(this,s),a&&(a.has="hit",fe(this,Oo).call(this,a,s)),!0}else a&&(a.has="miss");return!1}peek(e,r={}){const{allowStale:n=this.allowStale}=r,a=fe(this,dn).get(e);if(a!==void 0&&(n||!fe(this,Xi).call(this,a))){const s=fe(this,_t)[a];return it(this,pr,Cr).call(this,s)?s.__staleWhileFetching:s}}async fetch(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:d=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:p=this.ignoreFetchAbort,allowStaleOnFetchAbort:b=this.allowStaleOnFetchAbort,context:_,forceRefresh:E=!1,status:w,signal:O}=r;if(!fe(this,Pu))return w&&(w.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:a,noDeleteOnStaleGet:s,status:w});const A={allowStale:n,updateAgeOnGet:a,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:u,size:c,sizeCalculation:l,noUpdateTTL:d,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:b,ignoreFetchAbort:p,status:w,signal:O};let T=fe(this,dn).get(e);if(T===void 0){w&&(w.fetch="miss");const I=it(this,Id,nb).call(this,e,T,A,_);return I.__returned=I}else{const I=fe(this,_t)[T];if(it(this,pr,Cr).call(this,I)){const x=n&&I.__staleWhileFetching!==void 0;return w&&(w.fetch="inflight",x&&(w.returnedStale=!0)),x?I.__staleWhileFetching:I.__returned=I}const D=fe(this,Xi).call(this,T);if(!E&&!D)return w&&(w.fetch="hit"),it(this,zc,kh).call(this,T),a&&fe(this,Qc).call(this,T),w&&fe(this,Oo).call(this,w,T),I;const U=it(this,Id,nb).call(this,e,T,A,_),N=U.__staleWhileFetching!==void 0&&n;return w&&(w.fetch=D?"stale":"refresh",N&&D&&(w.returnedStale=!0)),N?U.__staleWhileFetching:U.__returned=U}}get(e,r={}){const{allowStale:n=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=r,u=fe(this,dn).get(e);if(u!==void 0){const c=fe(this,_t)[u],l=it(this,pr,Cr).call(this,c);return o&&fe(this,Oo).call(this,o,u),fe(this,Xi).call(this,u)?(o&&(o.get="stale"),l?(o&&n&&c.__staleWhileFetching!==void 0&&(o.returnedStale=!0),n?c.__staleWhileFetching:void 0):(s||this.delete(e),o&&n&&(o.returnedStale=!0),n?c:void 0)):(o&&(o.get="hit"),l?c.__staleWhileFetching:(it(this,zc,kh).call(this,u),a&&fe(this,Qc).call(this,u),c))}else o&&(o.get="miss")}delete(e){var n,a,s,o;let r=!1;if(fe(this,ln)!==0){const u=fe(this,dn).get(e);if(u!==void 0)if(r=!0,fe(this,ln)===1)this.clear();else{fe(this,Gc).call(this,u);const c=fe(this,_t)[u];it(this,pr,Cr).call(this,c)?c.__abortController.abort(new Error("deleted")):(fe(this,Ja)||fe(this,bi))&&(fe(this,Ja)&&((n=fe(this,Ga))==null||n.call(this,c,e,"delete")),fe(this,bi)&&((a=fe(this,wn))==null||a.push([c,e,"delete"]))),fe(this,dn).delete(e),fe(this,Sr)[u]=void 0,fe(this,_t)[u]=void 0,u===fe(this,vn)?ut(this,vn,fe(this,Wi)[u]):u===fe(this,zn)?ut(this,zn,fe(this,yi)[u]):(fe(this,yi)[fe(this,Wi)[u]]=fe(this,yi)[u],fe(this,Wi)[fe(this,yi)[u]]=fe(this,Wi)[u]),Ty(this,ln)._--,fe(this,Xa).push(u)}}if(fe(this,bi)&&((s=fe(this,wn))!=null&&s.length)){const u=fe(this,wn);let c;for(;c=u==null?void 0:u.shift();)(o=fe(this,za))==null||o.call(this,...c)}return r}clear(){var e,r,n;for(const a of it(this,As,_u).call(this,{allowStale:!0})){const s=fe(this,_t)[a];if(it(this,pr,Cr).call(this,s))s.__abortController.abort(new Error("deleted"));else{const o=fe(this,Sr)[a];fe(this,Ja)&&((e=fe(this,Ga))==null||e.call(this,s,o,"delete")),fe(this,bi)&&((r=fe(this,wn))==null||r.push([s,o,"delete"]))}}if(fe(this,dn).clear(),fe(this,_t).fill(void 0),fe(this,Sr).fill(void 0),fe(this,Ka)&&fe(this,Eo)&&(fe(this,Ka).fill(0),fe(this,Eo).fill(0)),fe(this,To)&&fe(this,To).fill(0),ut(this,zn,0),ut(this,vn,0),fe(this,Xa).length=0,ut(this,Wa,0),ut(this,ln,0),fe(this,bi)&&fe(this,wn)){const a=fe(this,wn);let s;for(;s=a==null?void 0:a.shift();)(n=fe(this,za))==null||n.call(this,...s)}}};Qa=new WeakMap,zi=new WeakMap,Ga=new WeakMap,za=new WeakMap,Ad=new WeakMap,ln=new WeakMap,Wa=new WeakMap,dn=new WeakMap,Sr=new WeakMap,_t=new WeakMap,yi=new WeakMap,Wi=new WeakMap,zn=new WeakMap,vn=new WeakMap,Xa=new WeakMap,wn=new WeakMap,To=new WeakMap,Eo=new WeakMap,Ka=new WeakMap,Ja=new WeakMap,Pu=new WeakMap,bi=new WeakMap,Np=new WeakSet,lO=function(){const e=new tb(fe(this,Qa)),r=new tb(fe(this,Qa));ut(this,Ka,e),ut(this,Eo,r),ut(this,Cp,(s,o,u=ph.now())=>{if(r[s]=o!==0?u:0,e[s]=o,o!==0&&this.ttlAutopurge){const c=setTimeout(()=>{fe(this,Xi).call(this,s)&&this.delete(fe(this,Sr)[s])},o+1);c.unref&&c.unref()}}),ut(this,Qc,s=>{r[s]=e[s]!==0?ph.now():0}),ut(this,Oo,(s,o)=>{if(e[o]){const u=e[o],c=r[o];s.ttl=u,s.start=c,s.now=n||a();const l=s.now-c;s.remainingTTL=u-l}});let n=0;const a=()=>{const s=ph.now();if(this.ttlResolution>0){n=s;const o=setTimeout(()=>n=0,this.ttlResolution);o.unref&&o.unref()}return s};this.getRemainingTTL=s=>{const o=fe(this,dn).get(s);if(o===void 0)return 0;const u=e[o],c=r[o];if(u===0||c===0)return 1/0;const l=(n||a())-c;return u-l},ut(this,Xi,s=>e[s]!==0&&r[s]!==0&&(n||a())-r[s]>e[s])},Qc=new WeakMap,Oo=new WeakMap,Cp=new WeakMap,Xi=new WeakMap,Ub=new WeakSet,hL=function(){const e=new tb(fe(this,Qa));ut(this,Wa,0),ut(this,To,e),ut(this,Gc,r=>{ut(this,Wa,fe(this,Wa)-e[r]),e[r]=0}),ut(this,jp,(r,n,a,s)=>{if(it(this,pr,Cr).call(this,n))return 0;if(!yu(a))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(a=s(n,r),!yu(a))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return a}),ut(this,Rd,(r,n,a)=>{if(e[r]=n,fe(this,zi)){const s=fe(this,zi)-e[r];for(;fe(this,Wa)>s;)it(this,xd,rb).call(this,!0)}ut(this,Wa,fe(this,Wa)+e[r]),a&&(a.entrySize=n,a.totalCalculatedSize=fe(this,Wa))})},Gc=new WeakMap,Rd=new WeakMap,jp=new WeakMap,Os=new WeakSet,bu=function*({allowStale:e=this.allowStale}={}){if(fe(this,ln))for(let r=fe(this,vn);!(!it(this,Mp,dO).call(this,r)||((e||!fe(this,Xi).call(this,r))&&(yield r),r===fe(this,zn)));)r=fe(this,Wi)[r]},As=new WeakSet,_u=function*({allowStale:e=this.allowStale}={}){if(fe(this,ln))for(let r=fe(this,zn);!(!it(this,Mp,dO).call(this,r)||((e||!fe(this,Xi).call(this,r))&&(yield r),r===fe(this,vn)));)r=fe(this,yi)[r]},Mp=new WeakSet,dO=function(e){return e!==void 0&&fe(this,dn).get(fe(this,Sr)[e])===e},xd=new WeakSet,rb=function(e){var s,o;const r=fe(this,zn),n=fe(this,Sr)[r],a=fe(this,_t)[r];return fe(this,Pu)&&it(this,pr,Cr).call(this,a)?a.__abortController.abort(new Error("evicted")):(fe(this,Ja)||fe(this,bi))&&(fe(this,Ja)&&((s=fe(this,Ga))==null||s.call(this,a,n,"evict")),fe(this,bi)&&((o=fe(this,wn))==null||o.push([a,n,"evict"]))),fe(this,Gc).call(this,r),e&&(fe(this,Sr)[r]=void 0,fe(this,_t)[r]=void 0,fe(this,Xa).push(r)),fe(this,ln)===1?(ut(this,zn,ut(this,vn,0)),fe(this,Xa).length=0):ut(this,zn,fe(this,yi)[r]),fe(this,dn).delete(n),Ty(this,ln)._--,r},Id=new WeakSet,nb=function(e,r,n,a){const s=r===void 0?void 0:fe(this,_t)[r];if(it(this,pr,Cr).call(this,s))return s;const o=new Lb,{signal:u}=n;u==null||u.addEventListener("abort",()=>o.abort(u.reason),{signal:o.signal});const c={signal:o.signal,options:n,context:a},l=(_,E=!1)=>{const{aborted:w}=o.signal,O=n.ignoreFetchAbort&&_!==void 0;if(n.status&&(w&&!E?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,O&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),w&&!O&&!E)return f(o.signal.reason);const A=p;return fe(this,_t)[r]===p&&(_===void 0?A.__staleWhileFetching?fe(this,_t)[r]=A.__staleWhileFetching:this.delete(e):(n.status&&(n.status.fetchUpdated=!0),this.set(e,_,c.options))),_},d=_=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=_),f(_)),f=_=>{const{aborted:E}=o.signal,w=E&&n.allowStaleOnFetchAbort,O=w||n.allowStaleOnFetchRejection,A=O||n.noDeleteOnFetchRejection,T=p;if(fe(this,_t)[r]===p&&(!A||T.__staleWhileFetching===void 0?this.delete(e):w||(fe(this,_t)[r]=T.__staleWhileFetching)),O)return n.status&&T.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),T.__staleWhileFetching;if(T.__returned===T)throw _},h=(_,E)=>{var O;const w=(O=fe(this,Ad))==null?void 0:O.call(this,e,s,c);w&&w instanceof Promise&&w.then(A=>_(A===void 0?void 0:A),E),o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(_(void 0),n.allowStaleOnFetchAbort&&(_=A=>l(A,!0)))})};n.status&&(n.status.fetchDispatched=!0);const p=new Promise(h).then(l,d),b=Object.assign(p,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,b,{...c.options,status:void 0}),r=fe(this,dn).get(e)):fe(this,_t)[r]=b,b},pr=new WeakSet,Cr=function(e){if(!fe(this,Pu))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Lb},Fp=new WeakSet,fO=function(e,r){fe(this,Wi)[r]=e,fe(this,yi)[e]=r},zc=new WeakSet,kh=function(e){e!==fe(this,vn)&&(e===fe(this,zn)?ut(this,zn,fe(this,yi)[e]):it(this,Fp,fO).call(this,fe(this,Wi)[e],fe(this,yi)[e]),it(this,Fp,fO).call(this,fe(this,vn),e),ut(this,vn,e))};let cO=Ex;Pa.LRUCache=cO;Object.defineProperty(A2,"__esModule",{value:!0});A2.RdfSourceSparql=void 0;const ofe=$n,A4=Ut,ufe=R2,cfe=Pa,lfe=ht,Jl=An,hO=xt,Nc=new lfe.DataFactory,dfe=new ofe.BindingsFactory,ffe=Nc.variable("count");class mn{constructor(e,r,n,a,s){this.url=e,this.context=r,this.mediatorHttp=n,this.endpointFetcher=new ufe.SparqlEndpointFetcher({method:a?"GET":"POST",fetch:(o,u)=>this.mediatorHttp.mediate({input:o,init:u,context:this.context}),prefixVariableQuestionMark:!0}),this.cache=s>0?new cfe.LRUCache({max:s}):void 0}static replaceBlankNodes(e){const r=(0,Jl.getVariables)((0,Jl.getTerms)(e)).map(o=>o.value),n={};let a=!1;const s=(0,Jl.mapTermsNested)(e,o=>{if(o.termType==="BlankNode"){let u=o.value;if(n[u])u=n[u];else{if(r.includes(u)){let c=0;for(;r.includes(`${u}${c}`);)++c;u+=c}n[o.value]=u,r.push(u)}return a=!0,Nc.variable(u)}return o});return a?s:e}static patternToBgp(e){return mn.FACTORY.createBgp([mn.FACTORY.createPattern(e.subject,e.predicate,e.object,e.graph)])}static patternToSelectQuery(e){const r=(0,Jl.getVariables)((0,Jl.getTerms)(e));return(0,hO.toSparql)(mn.FACTORY.createProject(mn.patternToBgp(e),r),{sparqlStar:!0})}static patternToCountQuery(e){return(0,hO.toSparql)(mn.FACTORY.createProject(mn.FACTORY.createExtend(mn.FACTORY.createGroup(mn.patternToBgp(e),[],[mn.FACTORY.createBoundAggregate(Nc.variable("var0"),"count",mn.FACTORY.createWildcardExpression(),!1)]),Nc.variable("count"),mn.FACTORY.createTermExpression(Nc.variable("var0"))),[Nc.variable("count")]),{sparqlStar:!0})}async queryBindings(e,r){const n=await this.endpointFetcher.fetchBindings(e,r);return(0,A4.wrap)(n,{autoStart:!1,maxBufferSize:Number.POSITIVE_INFINITY}).map(a=>dfe.bindings(Object.entries(a).map(([s,o])=>[Nc.variable(s.slice(1)),o])))}match(e,r,n,a){const s=mn.replaceBlankNodes(mn.FACTORY.createPattern(e,r,n,a)),o=mn.patternToCountQuery(s),u=mn.patternToSelectQuery(s);new Promise(async(l,d)=>{var f;try{const h=(f=this.cache)==null?void 0:f.get(o);if(h!==void 0)return l(h);const p=await this.queryBindings(this.url,o);p.on("data",b=>{var w;const _=b.get(ffe),E={type:"estimate",value:Number.POSITIVE_INFINITY};if(_){const O=Number.parseInt(_.value,10);Number.isNaN(O)||(E.type="exact",E.value=O,(w=this.cache)==null||w.set(o,E))}return l(E)}),p.on("error",()=>l({type:"estimate",value:Number.POSITIVE_INFINITY})),p.on("end",()=>l({type:"estimate",value:Number.POSITIVE_INFINITY}))}catch(h){d(h)}}).then(l=>c.setProperty("metadata",{cardinality:l,canContainUndefs:!1})).catch(()=>c.setProperty("metadata",{cardinality:{type:"estimate",value:Number.POSITIVE_INFINITY},canContainUndefs:!1}));const c=new A4.TransformIterator(async()=>this.queryBindings(this.url,u),{autoStart:!1}).transform({map:l=>(0,Jl.mapTermsNested)(s,d=>{if(d.termType==="Variable"){const f=l.get(d);return f||c.destroy(new Error(`The endpoint ${this.url} failed to provide a binding for ${d.value}.`)),f}return d}),autoStart:!1});return c}}A2.RdfSourceSparql=mn;mn.FACTORY=new hO.Factory;Object.defineProperty(O2,"__esModule",{value:!0});O2.ActorRdfResolveHypermediaSparql=void 0;const hfe=tv,pfe=A2;class yfe extends hfe.ActorRdfResolveHypermedia{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 pfe.RdfSourceSparql(e.metadata.sparqlService||e.url,e.context,this.mediatorHttp,this.forceHttpGet,this.cacheSize)}}}O2.ActorRdfResolveHypermediaSparql=yfe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(O2,t)})(uL);var pL={},P2={},D2={},N2={};Object.defineProperty(N2,"__esModule",{value:!0});N2.ActorRdfUpdateHypermedia=void 0;const bfe=et;class _fe extends bfe.Actor{constructor(e,r){super(e),this.destinationType=r}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)}}N2.ActorRdfUpdateHypermedia=_fe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(N2,t)})(D2);var Q0={},pO={exports:{}};(function(t,e){var r=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof m<"u"&&m,n=function(){function s(){this.fetch=!1,this.DOMException=r.DOMException}return s.prototype=r,new s}();(function(s){(function(o){var u=typeof s<"u"&&s||typeof self<"u"&&self||typeof u<"u"&&u,c={searchParams:"URLSearchParams"in u,iterable:"Symbol"in u&&"iterator"in Symbol,blob:"FileReader"in u&&"Blob"in u&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in u,arrayBuffer:"ArrayBuffer"in u};function l(j){return j&&DataView.prototype.isPrototypeOf(j)}if(c.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],f=ArrayBuffer.isView||function(j){return j&&d.indexOf(Object.prototype.toString.call(j))>-1};function h(j){if(typeof j!="string"&&(j=String(j)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(j)||j==="")throw new TypeError('Invalid character in header field name: "'+j+'"');return j.toLowerCase()}function p(j){return typeof j!="string"&&(j=String(j)),j}function b(j){var Q={next:function(){var se=j.shift();return{done:se===void 0,value:se}}};return c.iterable&&(Q[Symbol.iterator]=function(){return Q}),Q}function _(j){this.map={},j instanceof _?j.forEach(function(Q,se){this.append(se,Q)},this):Array.isArray(j)?j.forEach(function(Q){this.append(Q[0],Q[1])},this):j&&Object.getOwnPropertyNames(j).forEach(function(Q){this.append(Q,j[Q])},this)}_.prototype.append=function(j,Q){j=h(j),Q=p(Q);var se=this.map[j];this.map[j]=se?se+", "+Q:Q},_.prototype.delete=function(j){delete this.map[h(j)]},_.prototype.get=function(j){return j=h(j),this.has(j)?this.map[j]:null},_.prototype.has=function(j){return this.map.hasOwnProperty(h(j))},_.prototype.set=function(j,Q){this.map[h(j)]=p(Q)},_.prototype.forEach=function(j,Q){for(var se in this.map)this.map.hasOwnProperty(se)&&j.call(Q,this.map[se],se,this)},_.prototype.keys=function(){var j=[];return this.forEach(function(Q,se){j.push(se)}),b(j)},_.prototype.values=function(){var j=[];return this.forEach(function(Q){j.push(Q)}),b(j)},_.prototype.entries=function(){var j=[];return this.forEach(function(Q,se){j.push([se,Q])}),b(j)},c.iterable&&(_.prototype[Symbol.iterator]=_.prototype.entries);function E(j){if(j.bodyUsed)return Promise.reject(new TypeError("Already read"));j.bodyUsed=!0}function w(j){return new Promise(function(Q,se){j.onload=function(){Q(j.result)},j.onerror=function(){se(j.error)}})}function O(j){var Q=new FileReader,se=w(Q);return Q.readAsArrayBuffer(j),se}function A(j){var Q=new FileReader,se=w(Q);return Q.readAsText(j),se}function T(j){for(var Q=new Uint8Array(j),se=new Array(Q.length),ie=0;ie-1?Q:j}function N(j,Q){if(!(this instanceof N))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');Q=Q||{};var se=Q.body;if(j instanceof N){if(j.bodyUsed)throw new TypeError("Already read");this.url=j.url,this.credentials=j.credentials,Q.headers||(this.headers=new _(j.headers)),this.method=j.method,this.mode=j.mode,this.signal=j.signal,!se&&j._bodyInit!=null&&(se=j._bodyInit,j.bodyUsed=!0)}else this.url=String(j);if(this.credentials=Q.credentials||this.credentials||"same-origin",(Q.headers||!this.headers)&&(this.headers=new _(Q.headers)),this.method=H(Q.method||this.method||"GET"),this.mode=Q.mode||this.mode||null,this.signal=Q.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&se)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(se),(this.method==="GET"||this.method==="HEAD")&&(Q.cache==="no-store"||Q.cache==="no-cache")){var ie=/([?&])_=[^&]*/;if(ie.test(this.url))this.url=this.url.replace(ie,"$1_="+new Date().getTime());else{var be=/\?/;this.url+=(be.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}N.prototype.clone=function(){return new N(this,{body:this._bodyInit})};function x(j){var Q=new FormData;return j.trim().split("&").forEach(function(se){if(se){var ie=se.split("="),be=ie.shift().replace(/\+/g," "),he=ie.join("=").replace(/\+/g," ");Q.append(decodeURIComponent(be),decodeURIComponent(he))}}),Q}function F(j){var Q=new _,se=j.replace(/\r?\n[\t ]+/g," ");return se.split("\r").map(function(ie){return ie.indexOf(` +`)===0?ie.substr(1,ie.length):ie}).forEach(function(ie){var be=ie.split(":"),he=be.shift().trim();if(he){var Te=be.join(":").trim();Q.append(he,Te)}}),Q}D.call(N.prototype);function X(j,Q){if(!(this instanceof X))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');Q||(Q={}),this.type="default",this.status=Q.status===void 0?200:Q.status,this.ok=this.status>=200&&this.status<300,this.statusText=Q.statusText===void 0?"":""+Q.statusText,this.headers=new _(Q.headers),this.url=Q.url||"",this._initBody(j)}D.call(X.prototype),X.prototype.clone=function(){return new X(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _(this.headers),url:this.url})},X.error=function(){var j=new X(null,{status:0,statusText:""});return j.type="error",j};var ne=[301,302,303,307,308];X.redirect=function(j,Q){if(ne.indexOf(Q)===-1)throw new RangeError("Invalid status code");return new X(null,{status:Q,headers:{location:j}})},o.DOMException=u.DOMException;try{new o.DOMException}catch{o.DOMException=function(Q,se){this.message=Q,this.name=se;var ie=Error(Q);this.stack=ie.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function $(j,Q){return new Promise(function(se,ie){var be=new N(j,Q);if(be.signal&&be.signal.aborted)return ie(new o.DOMException("Aborted","AbortError"));var he=new XMLHttpRequest;function Te(){he.abort()}he.onload=function(){var ye={status:he.status,statusText:he.statusText,headers:F(he.getAllResponseHeaders()||"")};ye.url="responseURL"in he?he.responseURL:ye.headers.get("X-Request-URL");var ce="response"in he?he.response:he.responseText;setTimeout(function(){se(new X(ce,ye))},0)},he.onerror=function(){setTimeout(function(){ie(new TypeError("Network request failed"))},0)},he.ontimeout=function(){setTimeout(function(){ie(new TypeError("Network request failed"))},0)},he.onabort=function(){setTimeout(function(){ie(new o.DOMException("Aborted","AbortError"))},0)};function Ne(ye){try{return ye===""&&u.location.href?u.location.href:ye}catch{return ye}}he.open(be.method,Ne(be.url),!0),be.credentials==="include"?he.withCredentials=!0:be.credentials==="omit"&&(he.withCredentials=!1),"responseType"in he&&(c.blob?he.responseType="blob":c.arrayBuffer&&be.headers.get("Content-Type")&&be.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(he.responseType="arraybuffer")),Q&&typeof Q.headers=="object"&&!(Q.headers instanceof _)?Object.getOwnPropertyNames(Q.headers).forEach(function(ye){he.setRequestHeader(ye,p(Q.headers[ye]))}):be.headers.forEach(function(ye,ce){he.setRequestHeader(ce,ye)}),be.signal&&(be.signal.addEventListener("abort",Te),he.onreadystatechange=function(){he.readyState===4&&be.signal.removeEventListener("abort",Te)}),he.send(typeof be._bodyInit>"u"?null:be._bodyInit)})}return $.polyfill=!0,u.fetch||(u.fetch=$,u.Headers=_,u.Request=N,u.Response=X),o.Headers=_,o.Request=N,o.Response=X,o.fetch=$,o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var a=r.fetch?r:n;e=a.fetch,e.default=a.fetch,e.fetch=a.fetch,e.Headers=a.Headers,e.Request=a.Request,e.Response=a.Response,t.exports=e})(pO,pO.exports);var zR=pO.exports;Object.defineProperty(Q0,"__esModule",{value:!0});Q0.QuadDestinationPatchSparqlUpdate=void 0;const gfe=Zs,mfe=Cf,vfe=zR,b1=_0,wfe=kt;class Sfe{constructor(e,r,n){this.url=e,this.context=r,this.mediatorHttp=n}insert(e){return this.wrapSparqlUpdateRequest("INSERT",e)}async delete(e){return this.wrapSparqlUpdateRequest("DELETE",e)}async wrapSparqlUpdateRequest(e,r){const n=r.map(u=>{let c=`${(0,b1.termToString)(u.subject)} ${(0,b1.termToString)(u.predicate)} ${(0,b1.termToString)(u.object)} .`;return u.graph.termType!=="DefaultGraph"?c=` GRAPH ${(0,b1.termToString)(u.graph)} { ${c} } `:c=` ${c} `,c}).prepend([`${e} DATA { -`]).append(["}"]),a=new wfe.Readable;a._read=()=>!0,n.on("data",u=>a.push(u)),n.on("end",()=>a.push(null));const s=new vfe.Headers({"content-type":"application/sparql-update"}),o=await this.mediatorHttp.mediate({context:this.context,init:{headers:s,method:"PATCH",body:gfe.ActorHttp.toWebReadableStream(a)},input:this.url});await(0,mfe.validateHttpResponse)(this.url,o)}async deleteGraphs(e,r,n){throw new Error("Patch-based SPARQL Update destinations don't support named graphs")}async createGraphs(e,r){throw new Error("Patch-based SPARQL Update destinations don't support named graphs")}}k0.QuadDestinationPatchSparqlUpdate=Sfe;Object.defineProperty(P2,"__esModule",{value:!0});P2.ActorRdfUpdateHypermediaPatchSparqlUpdate=void 0;const Tfe=D2,Efe=k0;class Ofe extends Tfe.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 Efe.QuadDestinationPatchSparqlUpdate(e.url,e.context,this.mediatorHttp)}}}P2.ActorRdfUpdateHypermediaPatchSparqlUpdate=Ofe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(P2,t),r(k0,t)})(pL);var yL={},C2={},Q0={};Object.defineProperty(Q0,"__esModule",{value:!0});Q0.QuadDestinationPutLdp=void 0;const Afe=Zs,Rfe=Cf,xfe=zR;class Ife{constructor(e,r,n,a,s,o){this.url=e,this.context=r,this.mediaTypes=n,this.mediatorHttp=a,this.mediatorRdfSerializeMediatypes=s,this.mediatorRdfSerialize=o}insert(e){return this.wrapRdfUpdateRequest("INSERT",e)}async delete(e){throw new Error("Put-based LDP destinations don't support deletions")}async wrapRdfUpdateRequest(e,r){const{mediaTypes:n}=await this.mediatorRdfSerializeMediatypes.mediate({context:this.context,mediaTypes:!0}),a=this.mediaTypes.filter(l=>l in n),s=a.length>0?a[0]:Object.keys(n).sort((l,d)=>n[d]-n[l])[0],{handle:{data:o}}=await this.mediatorRdfSerialize.mediate({context:this.context,handle:{quadStream:r,context:this.context},handleMediaType:s}),u=new xfe.Headers({"content-type":s}),c=await this.mediatorHttp.mediate({context:this.context,init:{headers:u,method:"PUT",body:Afe.ActorHttp.toWebReadableStream(o)},input:this.url});await(0,Rfe.validateHttpResponse)(this.url,c)}async deleteGraphs(e,r,n){throw new Error("Put-based LDP destinations don't support named graphs")}async createGraphs(e,r){throw new Error("Put-based LDP destinations don't support named graphs")}}Q0.QuadDestinationPutLdp=Ife;Object.defineProperty(C2,"__esModule",{value:!0});C2.ActorRdfUpdateHypermediaPutLdp=void 0;const Pfe=D2,Dfe=Q0;class Nfe extends Pfe.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 Dfe.QuadDestinationPutLdp(e.url,e.context,e.metadata.putAccepted||[],this.mediatorHttp,this.mediatorRdfSerializeMediatypes,this.mediatorRdfSerialize)}}}C2.ActorRdfUpdateHypermediaPutLdp=Nfe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(C2,t),r(Q0,t)})(yL);var bL={},j2={},G0={};Object.defineProperty(G0,"__esModule",{value:!0});G0.QuadDestinationSparql=void 0;const Cfe=R2,_1=b0,jfe=wl;class Mfe{constructor(e,r,n){this.url=e,this.context=r,this.mediatorHttp=n,this.endpointFetcher=new Cfe.SparqlEndpointFetcher({fetch:(a,s)=>this.mediatorHttp.mediate({input:a,init:s,context:this.context}),prefixVariableQuestionMark:!0})}insert(e){return this.wrapSparqlUpdateRequest("INSERT",e)}async delete(e){return this.wrapSparqlUpdateRequest("DELETE",e)}async wrapSparqlUpdateRequest(e,r){const n=r.map(s=>{let o=`${(0,_1.termToString)(s.subject)} ${(0,_1.termToString)(s.predicate)} ${(0,_1.termToString)(s.object)} .`;return s.graph.termType!=="DefaultGraph"?o=` GRAPH ${(0,_1.termToString)(s.graph)} { ${o} } +`]).append(["}"]),a=new wfe.Readable;a._read=()=>!0,n.on("data",u=>a.push(u)),n.on("end",()=>a.push(null));const s=new vfe.Headers({"content-type":"application/sparql-update"}),o=await this.mediatorHttp.mediate({context:this.context,init:{headers:s,method:"PATCH",body:gfe.ActorHttp.toWebReadableStream(a)},input:this.url});await(0,mfe.validateHttpResponse)(this.url,o)}async deleteGraphs(e,r,n){throw new Error("Patch-based SPARQL Update destinations don't support named graphs")}async createGraphs(e,r){throw new Error("Patch-based SPARQL Update destinations don't support named graphs")}}Q0.QuadDestinationPatchSparqlUpdate=Sfe;Object.defineProperty(P2,"__esModule",{value:!0});P2.ActorRdfUpdateHypermediaPatchSparqlUpdate=void 0;const Tfe=D2,Efe=Q0;class Ofe extends Tfe.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 Efe.QuadDestinationPatchSparqlUpdate(e.url,e.context,this.mediatorHttp)}}}P2.ActorRdfUpdateHypermediaPatchSparqlUpdate=Ofe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(P2,t),r(Q0,t)})(pL);var yL={},C2={},G0={};Object.defineProperty(G0,"__esModule",{value:!0});G0.QuadDestinationPutLdp=void 0;const Afe=Zs,Rfe=Cf,xfe=zR;class Ife{constructor(e,r,n,a,s,o){this.url=e,this.context=r,this.mediaTypes=n,this.mediatorHttp=a,this.mediatorRdfSerializeMediatypes=s,this.mediatorRdfSerialize=o}insert(e){return this.wrapRdfUpdateRequest("INSERT",e)}async delete(e){throw new Error("Put-based LDP destinations don't support deletions")}async wrapRdfUpdateRequest(e,r){const{mediaTypes:n}=await this.mediatorRdfSerializeMediatypes.mediate({context:this.context,mediaTypes:!0}),a=this.mediaTypes.filter(l=>l in n),s=a.length>0?a[0]:Object.keys(n).sort((l,d)=>n[d]-n[l])[0],{handle:{data:o}}=await this.mediatorRdfSerialize.mediate({context:this.context,handle:{quadStream:r,context:this.context},handleMediaType:s}),u=new xfe.Headers({"content-type":s}),c=await this.mediatorHttp.mediate({context:this.context,init:{headers:u,method:"PUT",body:Afe.ActorHttp.toWebReadableStream(o)},input:this.url});await(0,Rfe.validateHttpResponse)(this.url,c)}async deleteGraphs(e,r,n){throw new Error("Put-based LDP destinations don't support named graphs")}async createGraphs(e,r){throw new Error("Put-based LDP destinations don't support named graphs")}}G0.QuadDestinationPutLdp=Ife;Object.defineProperty(C2,"__esModule",{value:!0});C2.ActorRdfUpdateHypermediaPutLdp=void 0;const Pfe=D2,Dfe=G0;class Nfe extends Pfe.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 Dfe.QuadDestinationPutLdp(e.url,e.context,e.metadata.putAccepted||[],this.mediatorHttp,this.mediatorRdfSerializeMediatypes,this.mediatorRdfSerialize)}}}C2.ActorRdfUpdateHypermediaPutLdp=Nfe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(C2,t),r(G0,t)})(yL);var bL={},j2={},z0={};Object.defineProperty(z0,"__esModule",{value:!0});z0.QuadDestinationSparql=void 0;const Cfe=R2,_1=_0,jfe=wl;class Mfe{constructor(e,r,n){this.url=e,this.context=r,this.mediatorHttp=n,this.endpointFetcher=new Cfe.SparqlEndpointFetcher({fetch:(a,s)=>this.mediatorHttp.mediate({input:a,init:s,context:this.context}),prefixVariableQuestionMark:!0})}insert(e){return this.wrapSparqlUpdateRequest("INSERT",e)}async delete(e){return this.wrapSparqlUpdateRequest("DELETE",e)}async wrapSparqlUpdateRequest(e,r){const n=r.map(s=>{let o=`${(0,_1.termToString)(s.subject)} ${(0,_1.termToString)(s.predicate)} ${(0,_1.termToString)(s.object)} .`;return s.graph.termType!=="DefaultGraph"?o=` GRAPH ${(0,_1.termToString)(s.graph)} { ${o} } `:o=` ${o} `,o}).prepend([`${e} DATA { -`]).append(["}"]),a=await jfe(n);await this.endpointFetcher.fetchUpdate(this.url,a)}async deleteGraphs(e,r,n){const a=Array.isArray(e)?e:[e],s=[];for(const o of a){let u;typeof o=="string"?u=o:o.termType==="DefaultGraph"?u="DEFAULT":u=`GRAPH <${o.value}>`,s.push(`${n?"DROP":"CLEAR"} ${r?"":"SILENT "}${u}`)}await this.endpointFetcher.fetchUpdate(this.url,s.join("; "))}async createGraphs(e,r){const n=[];for(const a of e)n.push(`CREATE${r?"":" SILENT"} GRAPH <${a.value}>`);await this.endpointFetcher.fetchUpdate(this.url,n.join("; "))}}G0.QuadDestinationSparql=Mfe;Object.defineProperty(j2,"__esModule",{value:!0});j2.ActorRdfUpdateHypermediaSparql=void 0;const Ffe=D2,Lfe=G0;class Bfe extends Ffe.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 Lfe.QuadDestinationSparql(e.metadata.sparqlService||e.url,e.context,this.mediatorHttp)}}}j2.ActorRdfUpdateHypermediaSparql=Bfe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(j2,t),r(G0,t)})(bL);var _L={},M2={},F2={};Object.defineProperty(F2,"__esModule",{value:!0});F2.LazyCardinalityIterator=void 0;const kc=Ut;class $fe extends kc.AsyncIterator{constructor(e){super(),this._source=e,this._count=0,this._buffering=!0,e[kc.DESTINATION]=this,e.on("readable",Yl),e.on("end",Yl),e.on("error",R4),this.readable=e.readable}read(){if(this._buffer)return this._buffer.empty?(this._buffering||this.close(),this.readable=!1,null):this._buffer.shift();let e=null;return this._source.readable&&(e=this._source.read())!==null?this._count+=1:(this.readable=!1,this._source.done&&this.close()),e}getCardinality(){return this._cardinality?this._cardinality:this._error?Promise.reject(this._error):(this._source.done&&this.close(),this.done?this._cardinality=Promise.resolve(this._count):(this._buffer=new kc.LinkedList,this._cardinality=new Promise((e,r)=>{this._source.removeListener("readable",Yl),this._source.removeListener("end",Yl);const n=()=>{this._source.removeListener("data",a),this._source.removeListener("end",s),this._source.removeListener("error",o)},a=u=>{this._buffer.push(u),this._count+=1,this.readable=!0},s=()=>{this._buffering=!1,n(),e(this._count)},o=u=>{this._buffering=!1,n(),r(u)};this._source.on("data",a),this._source.on("end",s),this._source.on("error",o)})),this._cardinality)}close(){this._source.removeListener("readable",Yl),this._source.removeListener("end",Yl),this._source.removeListener("error",R4),delete this._source[kc.DESTINATION],this._source.destroy(),super.close()}}F2.LazyCardinalityIterator=$fe;function Yl(){this[kc.DESTINATION].readable=!0}function R4(t){this[kc.DESTINATION]._error=t,this[kc.DESTINATION].emit("error",t)}Object.defineProperty(M2,"__esModule",{value:!0});M2.ActorQueryOperationSparqlEndpoint=void 0;const Ufe=$n,qfe=ct,ph=Tl,mT=Cf,Vfe=rr,Hfe=Hi,kfe=Ut,Qfe=R2,Gfe=ht,gu=xt,zfe=F2,Wfe=new Ufe.BindingsFactory,Xfe=new Gfe.DataFactory;class Rp extends qfe.ActorQueryOperation{constructor(e){super(e),this.endpointFetcher=new Qfe.SparqlEndpointFetcher({method:e.forceHttpGet?"GET":"POST",fetch:(r,n)=>this.mediatorHttp.mediate({input:r,init:n,context:this.lastContext}),prefixVariableQuestionMark:!0})}async test(e){if(!e.operation)throw new Error("Missing field 'operation' in a query operation action.");const r=(0,ph.getContextSourceFirst)(e.context),n=(0,mT.getContextDestinationFirst)(e.context),a=r?(0,ph.getDataSourceType)(r):void 0,s=n?(0,mT.getDataDestinationType)(n):void 0,o=r?(0,ph.getDataSourceValue)(r):void 0,u=n?(0,mT.getDataDestinationValue)(n):void 0;if(r&&a==="sparql"&&(!n||s==="sparql"&&u===o)||r&&!a&&(!n||!s&&u===o)&&typeof o=="string"&&(this.checkUrlSuffixSparql&&o.endsWith("/sparql")||this.checkUrlSuffixUpdate&&o.endsWith("/update")))return{httpRequests:1};throw new Error(`${this.name} requires a single source with a 'sparql' endpoint to be present in the context or URL ending on /sparql or /update.`)}async run(e){const r=(0,ph.getContextSourceFirst)(e.context);if(!r)throw new Error("Illegal state: undefined sparql endpoint source.");const n=(0,ph.getDataSourceValue)(r);this.lastContext=e.context;let a,s,o;try{a=e.context.get(Vfe.KeysInitQuery.queryString)??(0,gu.toSparql)(e.operation,{sparqlStar:!0}),s=this.endpointFetcher.getQueryType(a),s==="UNKNOWN"&&(s=this.endpointFetcher.getUpdateTypes(a))}catch{}(!s||s==="UNKNOWN")&&(o=gu.Util.inScopeVariables(e.operation),a=(0,gu.toSparql)(Rp.FACTORY.createProject(e.operation,o)),s="SELECT");const u=this.canOperationContainUndefs(e.operation);switch(s){case"SELECT":return o||(o=gu.Util.inScopeVariables(e.operation)),this.executeQuery(n,a,!1,o,u);case"CONSTRUCT":return this.executeQuery(n,a,!0,void 0,!1);case"ASK":return{type:"boolean",execute:()=>this.endpointFetcher.fetchAsk(n,a)};default:return{type:"void",execute:()=>this.endpointFetcher.fetchUpdate(n,a)}}}executeQuery(e,r,n,a,s){const o=n?this.endpointFetcher.fetchTriples(e,r):this.endpointFetcher.fetchBindings(e,r),u=(0,kfe.wrap)(o,{autoStart:!1}).map(d=>n?d:Wfe.bindings(Object.entries(d).map(([f,h])=>[Xfe.variable(f.slice(1)),h]))),c=new zfe.LazyCardinalityIterator(u),l=Rp.cachifyMetadata(async()=>({state:new Hfe.MetadataValidationState,cardinality:{type:"exact",value:await c.getCardinality()},canContainUndefs:s,variables:a}));return n?{type:"quads",quadStream:c,metadata:l}:{type:"bindings",bindingsStream:c,metadata:l}}canOperationContainUndefs(e){let r=!1;return gu.Util.recurseOperation(e,{[gu.Algebra.types.LEFT_JOIN](){return r=!0,!1},[gu.Algebra.types.VALUES](n){for(const a of n.bindings){const s=Object.keys(a);n.variables.every(o=>s.includes(`?${o.value}`))||(r=!0)}return!1}}),r}}M2.ActorQueryOperationSparqlEndpoint=Rp;Rp.FACTORY=new gu.Factory;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(M2,t)})(_L);var gL={},L2={};Object.defineProperty(L2,"__esModule",{value:!0});L2.ActorQueryOperationAsk=void 0;const x4=ct;class Kfe extends x4.ActorQueryOperationTypedMediated{constructor(e){super(e,"ask")}async testOperation(e,r){return!0}async runOperation(e,r){const n=await this.mediatorQueryOperation.mediate({operation:e.input,context:r}),{bindingsStream:a}=x4.ActorQueryOperation.getSafeBindings(n);return{type:"boolean",execute:async()=>(await a.take(1).toArray()).length===1}}}L2.ActorQueryOperationAsk=Kfe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(L2,t)})(gL);var mL={},B2={};Object.defineProperty(B2,"__esModule",{value:!0});B2.ActorQueryOperationBgpJoin=void 0;const Jfe=ct,Yfe=xt;class $2 extends Jfe.ActorQueryOperationTypedMediated{constructor(e){super(e,"bgp")}async testOperation(e,r){return!0}async runOperation(e,r){return this.mediatorQueryOperation.mediate({operation:$2.FACTORY.createJoin(e.patterns),context:r})}}B2.ActorQueryOperationBgpJoin=$2;$2.FACTORY=new Yfe.Factory;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(B2,t)})(mL);var WR={},U2={},z0={};Object.defineProperty(z0,"__esModule",{value:!0});z0.BindingsToQuadsIterator=void 0;const I4=Ut,Zfe=ht,P4=An,ehe=new Zfe.DataFactory;class yd extends I4.MultiTransformIterator{constructor(e,r){super(r,{autoStart:!1}),this.template=e,this.blankNodeCounter=0}static bindTerm(e,r){return r.termType==="Variable"?e.get(r):r}static bindQuad(e,r){try{return(0,P4.mapTermsNested)(r,n=>{const a=yd.bindTerm(e,n);if(!a)throw new Error("Unbound term");return a})}catch{}}static localizeBlankNode(e,r){return r.termType==="BlankNode"?ehe.blankNode(`${r.value}${e}`):r}static localizeQuad(e,r){return(0,P4.mapTermsNested)(r,n=>yd.localizeBlankNode(e,n))}bindTemplate(e,r,n){return r.map(yd.localizeQuad.bind(null,n)).map(s=>yd.bindQuad.bind(null,e)(s)).filter(Boolean)}_createTransformer(e){return new I4.ArrayIterator(this.bindTemplate(e,this.template,this.blankNodeCounter++),{autoStart:!1})}}z0.BindingsToQuadsIterator=yd;Object.defineProperty(U2,"__esModule",{value:!0});U2.ActorQueryOperationConstruct=void 0;const D4=ct,vT=An,the=xt,rhe=z0;class XR extends D4.ActorQueryOperationTypedMediated{constructor(e){super(e,"construct")}static getVariables(e){return(0,vT.uniqTerms)([].concat.apply([],e.map(r=>(0,vT.getVariables)((0,vT.getTermsNested)(r)))))}async testOperation(e,r){return!0}async runOperation(e,r){const n=XR.getVariables(e.template),a={type:the.Algebra.types.PROJECT,input:e.input,variables:n},s=D4.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:a,context:r})),o=new rhe.BindingsToQuadsIterator(e.template,s.bindingsStream);return{metadata:()=>s.metadata().then(c=>({...c,order:void 0,cardinality:{type:c.cardinality.type,value:c.cardinality.value*e.template.length},canContainUndefs:!1,availableOrders:void 0})),quadStream:o,type:"quads"}}}U2.ActorQueryOperationConstruct=XR;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(U2,t),r(z0,t)})(WR);var vL={},q2={},V2={},H2={};Object.defineProperty(H2,"__esModule",{value:!0});H2.ActorQueryOperationUnion=void 0;const N4=ct,nhe=Hi,ihe=Ut,ahe=An;class Bb extends N4.ActorQueryOperationTypedMediated{constructor(e){super(e,"union")}static unionVariables(e){return(0,ahe.uniqTerms)(e.flat())}static unionMetadata(e,r){const n={type:"exact",value:0};for(const o of e)if(o.cardinality.value&&Number.isFinite(o.cardinality.value)||o.cardinality.value===0)o.cardinality.type==="estimate"&&(n.type="estimate"),n.value+=o.cardinality.value;else{n.type="estimate",n.value=Number.POSITIVE_INFINITY;break}const a={state:new nhe.MetadataValidationState,cardinality:n,canContainUndefs:e.some(o=>o.canContainUndefs)},s=()=>a.state.invalidate();for(const o of e)o.state.addInvalidateListener(s);return r&&(a.variables=Bb.unionVariables(e.map(o=>o.variables))),a}async testOperation(e,r){return!0}async runOperation(e,r){const n=(await Promise.all(e.input.map(o=>this.mediatorQueryOperation.mediate({operation:o,context:r})))).map(N4.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new ihe.UnionIterator(n.map(o=>o.bindingsStream),{autoStart:!1}),metadata:()=>Promise.all(n.map(o=>o.metadata())).then(o=>Bb.unionMetadata(o,!0))}}}H2.ActorQueryOperationUnion=Bb;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(H2,t)})(V2);Object.defineProperty(q2,"__esModule",{value:!0});q2.ActorQueryOperationDescribeSubject=void 0;const she=V2,C4=ct,ohe=Ut,uhe=ht,g1=xt,Zl=new uhe.DataFactory;class che extends C4.ActorQueryOperationTypedMediated{constructor(e){super(e,"describe")}async testOperation(e,r){return!0}async runOperation(e,r){const n=e.terms.filter(u=>u.termType!=="Variable").map(u=>{const c=[Zl.quad(u,Zl.variable("__predicate"),Zl.variable("__object"))];return c.forEach(d=>d.type="pattern"),{input:{type:g1.Algebra.types.BGP,patterns:c},template:c,type:"construct"}});if(n.length!==e.terms.length){let u=[];e.terms.filter(c=>c.termType==="Variable").forEach((c,l)=>{const d=[Zl.quad(c,Zl.variable(`__predicate${l}`),Zl.variable(`__object${l}`))];d.forEach(f=>f.type="pattern"),u=[...u,...d]}),n.push({input:{type:g1.Algebra.types.JOIN,input:[e.input,{type:g1.Algebra.types.BGP,patterns:u}]},template:u,type:g1.Algebra.types.CONSTRUCT})}const a=(await Promise.all(n.map(u=>this.mediatorQueryOperation.mediate({operation:u,context:r})))).map(C4.ActorQueryOperation.getSafeQuads);return{type:"quads",quadStream:new ohe.UnionIterator(a.map(u=>u.quadStream),{autoStart:!1}),metadata:()=>Promise.all(a.map(u=>u.metadata())).then(u=>she.ActorQueryOperationUnion.unionMetadata(u,!1))}}}q2.ActorQueryOperationDescribeSubject=che;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(q2,t)})(vL);var wL={},k2={};Object.defineProperty(k2,"__esModule",{value:!0});k2.ActorQueryOperationDistinctHash=void 0;const j4=ct;class lhe extends j4.ActorQueryOperationTypedMediated{constructor(e){super(e,"distinct")}async testOperation(e,r){return!0}async runOperation(e,r){const n=j4.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:r}));return{type:"bindings",bindingsStream:n.bindingsStream.filter(await this.newHashFilter(r)),metadata:n.metadata}}async newHashFilter(e){const{hashFunction:r}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:e}),n={};return a=>{const s=r(a);return!(s in n)&&(n[s]=!0)}}}k2.ActorQueryOperationDistinctHash=lhe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(k2,t)})(wL);var SL={},Q2={},Al={},W0={},X0={},wT={},Ai={};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.asTermType=Ai.ExpressionType=void 0;var M4;(function(t){t.Aggregate="aggregate",t.Existence="existence",t.Named="named",t.Operator="operator",t.SpecialOperator="specialOperator",t.Term="term",t.Variable="variable",t.AsyncExtension="asyncExtension",t.SyncExtension="syncExtension"})(M4||(Ai.ExpressionType=M4={}));function dhe(t){if(t==="namedNode"||t==="literal"||t==="blankNode"||t==="quad")return t}Ai.asTermType=dhe;var G2={};Object.defineProperty(G2,"__esModule",{value:!0});G2.Variable=void 0;const fhe=Ai;class hhe{constructor(e){this.expressionType=fhe.ExpressionType.Variable,this.name=e}}G2.Variable=hhe;var ft={},yh={},ni={};(function(t){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;var e;(function(o){o.SPARQL_NUMERIC="SPARQL_NUMERIC",o.SPARQL_STRINGLY="SPARQL_STRINGLY"})(e||(t.TypeAlias=e={}));var r;(function(o){o.XSD_ANY_URI="http://www.w3.org/2001/XMLSchema#anyURI",o.XSD_STRING="http://www.w3.org/2001/XMLSchema#string",o.RDF_LANG_STRING="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",o.XSD_BOOLEAN="http://www.w3.org/2001/XMLSchema#boolean",o.XSD_DATE_TIME="http://www.w3.org/2001/XMLSchema#dateTime",o.XSD_DATE_TIME_STAMP="http://www.w3.org/2001/XMLSchema#dateTimeStamp",o.XSD_DATE="http://www.w3.org/2001/XMLSchema#date",o.XSD_G_MONTH="http://www.w3.org/2001/XMLSchema#gMonth",o.XSD_G_MONTHDAY="http://www.w3.org/2001/XMLSchema#gMonthDay",o.XSD_G_YEAR="http://www.w3.org/2001/XMLSchema#gYear",o.XSD_G_YEAR_MONTH="http://www.w3.org/2001/XMLSchema#gYearMonth",o.XSD_TIME="http://www.w3.org/2001/XMLSchema#time",o.XSD_G_DAY="http://www.w3.org/2001/XMLSchema#gDay",o.XSD_DECIMAL="http://www.w3.org/2001/XMLSchema#decimal",o.XSD_FLOAT="http://www.w3.org/2001/XMLSchema#float",o.XSD_DOUBLE="http://www.w3.org/2001/XMLSchema#double",o.XSD_INTEGER="http://www.w3.org/2001/XMLSchema#integer",o.XSD_NON_POSITIVE_INTEGER="http://www.w3.org/2001/XMLSchema#nonPositiveInteger",o.XSD_NEGATIVE_INTEGER="http://www.w3.org/2001/XMLSchema#negativeInteger",o.XSD_LONG="http://www.w3.org/2001/XMLSchema#long",o.XSD_INT="http://www.w3.org/2001/XMLSchema#int",o.XSD_SHORT="http://www.w3.org/2001/XMLSchema#short",o.XSD_BYTE="http://www.w3.org/2001/XMLSchema#byte",o.XSD_NON_NEGATIVE_INTEGER="http://www.w3.org/2001/XMLSchema#nonNegativeInteger",o.XSD_POSITIVE_INTEGER="http://www.w3.org/2001/XMLSchema#positiveInteger",o.XSD_UNSIGNED_LONG="http://www.w3.org/2001/XMLSchema#unsignedLong",o.XSD_UNSIGNED_INT="http://www.w3.org/2001/XMLSchema#unsignedInt",o.XSD_UNSIGNED_SHORT="http://www.w3.org/2001/XMLSchema#unsignedShort",o.XSD_UNSIGNED_BYTE="http://www.w3.org/2001/XMLSchema#unsignedByte",o.XSD_NORMALIZED_STRING="http://www.w3.org/2001/XMLSchema#normalizedString",o.XSD_TOKEN="http://www.w3.org/2001/XMLSchema#token",o.XSD_LANGUAGE="http://www.w3.org/2001/XMLSchema#language",o.XSD_NM_TOKEN="http://www.w3.org/2001/XMLSchema#NMTOKEN",o.XSD_NAME="http://www.w3.org/2001/XMLSchema#name",o.XSD_NC_NAME="http://www.w3.org/2001/XMLSchema#NCName",o.XSD_ENTITY="http://www.w3.org/2001/XMLSchema#ENTITY",o.XSD_ID="http://www.w3.org/2001/XMLSchema#ID",o.XSD_ID_REF="http://www.w3.org/2001/XMLSchema#IDREF",o.XSD_DURATION="http://www.w3.org/2001/XMLSchema#duration",o.XSD_YEAR_MONTH_DURATION="http://www.w3.org/2001/XMLSchema#yearMonthDuration",o.XSD_DAY_TIME_DURATION="http://www.w3.org/2001/XMLSchema#dayTimeDuration"})(r||(t.TypeURL=r={}));var n;(function(o){o.NOT="!",o.UMINUS="uminus",o.UPLUS="uplus",o.EQUAL="=",o.NOT_EQUAL="!=",o.LT="<",o.GT=">",o.LTE="<=",o.GTE=">=",o.MULTIPLICATION="*",o.DIVISION="/",o.ADDITION="+",o.SUBTRACTION="-",o.IS_IRI="isiri",o.IS_URI="isuri",o.IS_BLANK="isblank",o.IS_LITERAL="isliteral",o.IS_NUMERIC="isnumeric",o.STR="str",o.LANG="lang",o.DATATYPE="datatype",o.IRI="iri",o.URI="uri",o.STRDT="strdt",o.STRLANG="strlang",o.UUID="uuid",o.STRUUID="struuid",o.STRLEN="strlen",o.SUBSTR="substr",o.UCASE="ucase",o.LCASE="lcase",o.STRSTARTS="strstarts",o.STRENDS="strends",o.CONTAINS="contains",o.STRBEFORE="strbefore",o.STRAFTER="strafter",o.ENCODE_FOR_URI="encode_for_uri",o.LANG_MATCHES="langmatches",o.REGEX="regex",o.REPLACE="replace",o.ABS="abs",o.ROUND="round",o.CEIL="ceil",o.FLOOR="floor",o.RAND="rand",o.NOW="now",o.YEAR="year",o.MONTH="month",o.DAY="day",o.HOURS="hours",o.MINUTES="minutes",o.SECONDS="seconds",o.TIMEZONE="timezone",o.TZ="tz",o.MD5="md5",o.SHA1="sha1",o.SHA256="sha256",o.SHA384="sha384",o.SHA512="sha512",o.TRIPLE="triple",o.SUBJECT="subject",o.PREDICATE="predicate",o.OBJECT="object",o.IS_TRIPLE="istriple"})(n||(t.RegularOperator=n={}));var a;(function(o){o.BOUND="bound",o.IF="if",o.COALESCE="coalesce",o.LOGICAL_OR="||",o.LOGICAL_AND="&&",o.SAME_TERM="sameterm",o.IN="in",o.NOT_IN="notin",o.CONCAT="concat",o.BNODE="bnode"})(a||(t.SpecialOperator=a={})),t.RegularOperators=new Set(Object.values(n)),t.SpecialOperators=new Set(Object.values(a)),t.Operators=new Set([...t.RegularOperators,...t.SpecialOperators]);var s;(function(o){o.COUNT="count",o.SUM="sum",o.MIN="min",o.MAX="max",o.AVG="avg",o.GROUP_CONCAT="group_concat",o.SAMPLE="sample"})(s||(t.SetFunction=s={})),t.SetFunctions=new Set(Object.values(s)),t.NamedOperators=new Set([r.XSD_STRING,r.XSD_FLOAT,r.XSD_DOUBLE,r.XSD_DECIMAL,r.XSD_INTEGER,r.XSD_DATE_TIME,r.XSD_DATE,r.XSD_BOOLEAN,r.XSD_TIME,r.XSD_DURATION,r.XSD_DAY_TIME_DURATION,r.XSD_YEAR_MONTH_DURATION])})(ni);var Ke={};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.NoExistenceHook=Ke.NoAggregator=Ke.ExtensionFunctionError=Ke.UnknownNamedOperator=Ke.UnknownOperator=Ke.InvalidTermType=Ke.InvalidExpressionType=Ke.InvalidExpression=Ke.InvalidArity=Ke.UnexpectedError=Ke.ParseError=Ke.EmptyAggregateError=Ke.IncompatibleLanguageOperation=Ke.InvalidTimezoneCall=Ke.CastError=Ke.InvalidCompareArgumentTypes=Ke.InvalidArgumentTypes=Ke.InError=Ke.CoalesceError=Ke.RDFEqualTypeError=Ke.EBVCoercionError=Ke.UnboundVariableError=Ke.InvalidLexicalForm=Ke.isExpressionError=Ke.ExpressionError=void 0;class Ii extends Error{}Ke.ExpressionError=Ii;function phe(t){return t instanceof Ii}Ke.isExpressionError=phe;class yhe extends Ii{constructor(e){super(`Invalid lexical form '${ii(e)}'`),this.arg=e}}Ke.InvalidLexicalForm=yhe;class bhe extends Ii{constructor(e,r){super(`Unbound variable '${ii(e)}'`),this.variable=e,this.bindings=r}}Ke.UnboundVariableError=bhe;class _he extends Ii{constructor(e){super(`Cannot coerce term to EBV '${ii(e)}'`),this.arg=e}}Ke.EBVCoercionError=_he;class ghe extends Ii{constructor(e){super("Equality test for literals with unsupported datatypes"),this.args=e}}Ke.RDFEqualTypeError=ghe;class mhe extends Ii{constructor(e){super("All COALESCE arguments threw errors"),this.errors=e}}Ke.CoalesceError=mhe;class vhe extends Ii{constructor(e){super(`Some argument to IN errorred and none where equal. ${e.map(r=>`(${r.toString()}) `).join("and ")}`),this.errors=e}}Ke.InError=vhe;class whe extends Ii{constructor(e,r){super(`Argument types not valid for operator: '${ii(r)}' with '${ii(e)}`),this.args=e,this.op=r}}Ke.InvalidArgumentTypes=whe;class She extends Ii{constructor(e,r){super(`Compared argument types are supported: '${e.termType}' and '${r.termType}'`),this.arg0=e,this.arg1=r}}Ke.InvalidCompareArgumentTypes=She;class The extends Ii{constructor(e,r){super(`Invalid cast: '${ii(e)}' to '${ii(r)}'`),this.arg=e}}Ke.CastError=The;class Ehe extends Ii{constructor(e){super(`TIMEZONE call on ${e} which has no timezone`),this.dateString=e}}Ke.InvalidTimezoneCall=Ehe;class Ohe extends Ii{constructor(e,r){super(`Operation on incompatible language literals '${ii(e)}' and '${ii(r)}'`),this.arg1=e,this.arg2=r}}Ke.IncompatibleLanguageOperation=Ohe;class Ahe extends Ii{constructor(){super("Empty aggregate expression")}}Ke.EmptyAggregateError=Ahe;class Rhe extends Ii{constructor(e,r){super(`Failed to parse ${e} as ${r}.`)}}Ke.ParseError=Rhe;class xhe extends Error{constructor(e,r){super(`Programmer Error '${e}'`),this.payload=r}}Ke.UnexpectedError=xhe;class Ihe extends Error{constructor(e,r){super(`The number of args does not match the arity of the operator '${ii(r)}'.`),this.args=e,this.op=r}}Ke.InvalidArity=Ihe;class Phe extends Error{constructor(e){super(`Invalid SPARQL Expression '${ii(e)}'`)}}Ke.InvalidExpression=Phe;class Dhe extends Error{constructor(e){super(`Invalid expression type for SPARQL Expression '${ii(e)}'`),this.expr=e}}Ke.InvalidExpressionType=Dhe;class Nhe extends Error{constructor(e){super(`Invalid term type for term '${ii(e)}'`),this.term=e}}Ke.InvalidTermType=Nhe;class Che extends Error{constructor(e){super(`Unknown operator: '${ii(e)}`)}}Ke.UnknownOperator=Che;class jhe extends Error{constructor(e){super(`Unknown named operator: '${ii(e)}'`)}}Ke.UnknownNamedOperator=jhe;class Mhe extends Error{constructor(e,r){r instanceof Error?super(`Error thrown in ${e}: ${r.message}${r.stack?` -${r.stack}`:""}`):super(`Error thrown in ${e}`)}}Ke.ExtensionFunctionError=Mhe;class Fhe extends Error{constructor(e){super(`Aggregate expression ${ii(e)} found, but no aggregate hook provided.`)}}Ke.NoAggregator=Fhe;class Lhe extends Error{constructor(){super("EXISTS found, but no existence hook provided.")}}Ke.NoExistenceHook=Lhe;function ii(t){return JSON.stringify(t)}var zr={},jt={};Object.defineProperty(jt,"__esModule",{value:!0});jt.extractTimeZone=jt.extractRawTimeZone=jt.dayTimeDurationsToSeconds=jt.yearMonthDurationsToMonths=jt.trimToDayTimeDuration=jt.trimToYearMonthDuration=jt.toUTCDate=jt.toJSDate=jt.negateDuration=jt.toDateTimeRepresentation=jt.defaultedDateTimeRepresentation=jt.simplifyDurationRepresentation=jt.defaultedDurationRepresentation=jt.defaultedYearMonthDurationRepresentation=jt.defaultedDayTimeDurationRepresentation=void 0;function TL(t){return{day:t.day||0,hours:t.hours||0,minutes:t.minutes||0,seconds:t.seconds||0}}jt.defaultedDayTimeDurationRepresentation=TL;function EL(t){return{year:t.year||0,month:t.month||0}}jt.defaultedYearMonthDurationRepresentation=EL;function OL(t){return{...TL(t),...EL(t)}}jt.defaultedDurationRepresentation=OL;function Bhe(t){const e=OL(t),r={},n=e.year+Math.trunc(e.month/12);n&&(r.year=n,e.month%=12),e.month&&(r.month=e.month);const a=e.day+Math.trunc(e.hours/24)+Math.trunc(e.minutes/(24*60))+Math.trunc(e.seconds/(24*60*60));a&&(r.day=a,e.hours%=24,e.minutes%=24*60,e.seconds%=24*60*60);const s=e.hours+Math.trunc(e.minutes/60)+Math.trunc(e.seconds/(60*60));s&&(r.hours=s,e.minutes%=60,e.seconds%=60*60);const o=e.minutes+Math.trunc(e.seconds/60);return o&&(r.minutes=o,e.seconds%=60),e.seconds&&(r.seconds=e.seconds),r}jt.simplifyDurationRepresentation=Bhe;function AL(t){return{...t,day:t.day||1,hours:t.hours||0,month:t.month||1,year:t.year||0,seconds:t.seconds||0,minutes:t.minutes||0}}jt.defaultedDateTimeRepresentation=AL;function $he({date:t,timeZone:e}){return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),zoneHours:e.zoneHours,zoneMinutes:e.zoneMinutes}}jt.toDateTimeRepresentation=$he;function Uhe(t){return{year:t.year!==void 0?-1*t.year:void 0,month:t.month!==void 0?-1*t.month:void 0,day:t.day!==void 0?-1*t.day:void 0,hours:t.hours!==void 0?-1*t.hours:void 0,minutes:t.minutes!==void 0?-1*t.minutes:void 0,seconds:t.seconds!==void 0?-1*t.seconds:void 0}}jt.negateDuration=Uhe;function RL(t){const e=new Date(t.year,t.month-1,t.day,t.hours,t.minutes,Math.trunc(t.seconds),t.seconds%1*1e3);return 0<=t.year&&t.year<100&&e.setFullYear(e.getFullYear()-1900),e}jt.toJSDate=RL;function qhe(t,e){const r=RL(AL(t)),n=r.getTimezoneOffset(),a=t.zoneHours===void 0?e.zoneHours:t.zoneHours,s=t.zoneMinutes===void 0?e.zoneMinutes:t.zoneMinutes;return new Date(r.getTime()-(n+a*60+s)*60*1e3)}jt.toUTCDate=qhe;function Vhe(t){return{year:t.year,month:t.month}}jt.trimToYearMonthDuration=Vhe;function Hhe(t){return{day:t.day,hours:t.hours,minutes:t.minutes,seconds:t.seconds}}jt.trimToDayTimeDuration=Hhe;function khe(t){return t.year*12+t.month}jt.yearMonthDurationsToMonths=khe;function Qhe(t){return((t.day*24+t.hours)*60+t.minutes)*60+t.seconds}jt.dayTimeDurationsToSeconds=Qhe;function Ghe(t){return/(Z|([+-]\d\d:\d\d))?$/u.exec(t)[0]}jt.extractRawTimeZone=Ghe;function zhe(t){return{zoneHours:t.getTimezoneOffset()/60,zoneMinutes:t.getTimezoneOffset()%60}}jt.extractTimeZone=zhe;var Co={};Object.defineProperty(Co,"__esModule",{value:!0});Co.elapsedDuration=Co.addDurationToDateTime=Co.maximumDayInMonthFor=void 0;const F4=jt;function Ao(t,e,r=0){const n=t-r,a=e-r,s=Math.floor(n/a);return{intDiv:s,remainder:t-s*a}}function ib(t,e){const{intDiv:r,remainder:n}=Ao(e,13,1),a=t+r;return[1,3,5,7,8,10,12].includes(n)?31:[4,6,9,11].includes(n)?30:n===2&&(Ao(a,400).remainder===0||Ao(a,100).remainder!==0&&Ao(a,4).remainder===0)?29:28}Co.maximumDayInMonthFor=ib;function Whe(t,e){const r={...t};let n=Ao(t.month+e.month,13,1);for(r.month=n.remainder,r.year=t.year+e.year+n.intDiv,n=Ao(t.seconds+e.seconds,60),r.seconds=n.remainder,n=Ao(t.minutes+e.minutes+n.intDiv,60),r.minutes=n.remainder,n=Ao(t.hours+e.hours+n.intDiv,24),r.hours=n.remainder,r.day=t.day+e.day+n.intDiv;;){let a;if(r.day<1)r.day+=ib(r.year,r.month-1),a=-1;else if(r.day>ib(r.year,r.month))r.day-=ib(r.year,r.month),a=1;else break;n=Ao(r.month+a,13,1),r.month=n.remainder,r.year+=n.intDiv}return r}Co.addDurationToDateTime=Whe;function Xhe(t,e,r){const n=(0,F4.toUTCDate)(t,r),a=(0,F4.toUTCDate)(e,r),s=n.getTime()-a.getTime();return{day:Math.floor(s/(1e3*60*60*24)),hours:Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),minutes:Math.floor(s%(1e3*60*60)/(1e3*60)),seconds:s%(1e3*60)}}Co.elapsedDuration=Xhe;Object.defineProperty(zr,"__esModule",{value:!0});zr.parseDayTimeDuration=zr.parseYearMonthDuration=zr.parseDuration=zr.parseTime=zr.parseDate=zr.parseDateTime=zr.parseXSDInteger=zr.parseXSDDecimal=zr.parseXSDFloat=void 0;const Khe=jt,jo=Ke,Jhe=Co;function Yhe(t){const e=Number(t);return Number.isNaN(e)?t==="NaN"?Number.NaN:t==="INF"||t==="+INF"?Number.POSITIVE_INFINITY:t==="-INF"?Number.NEGATIVE_INFINITY:void 0:e}zr.parseXSDFloat=Yhe;function Zhe(t){const e=Number(t);return Number.isNaN(e)?void 0:e}zr.parseXSDDecimal=Zhe;function epe(t){const e=Number.parseInt(t,10);return Number.isNaN(e)?void 0:e}zr.parseXSDInteger=epe;function tpe(t){const[e,r]=t.split("T");return{...IL(e),...PL(r)}}zr.parseDateTime=tpe;function xL(t){if(t==="")return{zoneHours:void 0,zoneMinutes:void 0};if(t==="Z")return{zoneHours:0,zoneMinutes:0};const r=t.replace(/^([+|-])(\d\d):(\d\d)$/gu,"$11!$2!$3").split("!").map(n=>Number(n));return{zoneHours:r[0]*r[1],zoneMinutes:r[0]*r[2]}}function IL(t){const e=t.replace(/^(-)?([123456789]*\d{4})-(\d\d)-(\d\d)(Z|([+-]\d\d:\d\d))?$/gu,"$11!$2!$3!$4!$5");if(e===t)throw new jo.ParseError(t,"date");const r=e.split("!"),n=r.slice(0,-1).map(s=>Number(s)),a={year:n[0]*n[1],month:n[2],day:n[3],...xL(r[4])};if(!(1<=a.month&&a.month<=12)||!(1<=a.day&&a.day<=(0,Jhe.maximumDayInMonthFor)(a.year,a.month)))throw new jo.ParseError(t,"date");return a}zr.parseDate=IL;function PL(t){const e=t.replace(/^(\d\d):(\d\d):(\d\d(\.\d+)?)(Z|([+-]\d\d:\d\d))?$/gu,"$1!$2!$3!$5");if(e===t)throw new jo.ParseError(t,"time");const r=e.split("!"),n=r.slice(0,-1).map(s=>Number(s)),a={hours:n[0],minutes:n[1],seconds:n[2],...xL(r[3])};if(a.seconds>=60||a.minutes>=60||a.hours>24||a.hours===24&&(a.minutes!==0||a.seconds!==0))throw new jo.ParseError(t,"time");return a}function rpe(t){const e=PL(t);return e.hours%=24,e}zr.parseTime=rpe;function KR(t){const[e,r]=t.split("T"),n=e.replace(/^(-)?P(\d+Y)?(\d+M)?(\d+D)?$/gu,"$11S!$2!$3!$4");if(n===e)throw new jo.ParseError(t,"duration");const a=n.split("!");if(r!==void 0){const u=r.replace(/^(\d+H)?(\d+M)?(\d+(\.\d+)?S)?$/gu,"$1!$2!$3");if(r===""||r===u)throw new jo.ParseError(t,"duration");a.push(...u.split("!"))}const s=a.map(u=>u.slice(0,-1));if(!s.slice(1).some(u=>u))throw new jo.ParseError(t,"duration");const o=Number(s[0]);return(0,Khe.simplifyDurationRepresentation)({year:s[1]?o*Number(s[1]):void 0,month:s[2]?o*Number(s[2]):void 0,day:s[3]?o*Number(s[3]):void 0,hours:s[4]?o*Number(s[4]):void 0,minutes:s[5]?o*Number(s[5]):void 0,seconds:s[6]?o*Number(s[6]):void 0})}zr.parseDuration=KR;function npe(t){const e=KR(t);if(["hours","minutes","seconds","day"].some(r=>!!e[r]))throw new jo.ParseError(t,"yearMonthDuration");return e}zr.parseYearMonthDuration=npe;function ipe(t){const e=KR(t);if(["year","month"].some(r=>!!e[r]))throw new jo.ParseError(t,"dayTimeDuration");return e}zr.parseDayTimeDuration=ipe;var ST={},wr={},bh={},L4;function DL(){if(L4)return bh;L4=1,Object.defineProperty(bh,"__esModule",{value:!0}),bh.OverloadTree=void 0;const t=aa(),e=z2();let r=class yO{constructor(a,s){this.identifier=a,this.implementation=void 0,this.generalOverloads=Object.create(null),this.literalOverLoads=[],this.depth=s||0,this.promotionCount=void 0}getSubtree(a){const s=(0,e.asGeneralType)(a);if(s)return this.generalOverloads[s];for(const[o,u]of this.literalOverLoads)if(a===o)return u}getImplementationExact(a){let s=this;for(const o of a)if(s=s.getSubtree(o),!s)return;return s.implementation}search(a,s,o){let u=o[this.identifier],c=0;for(;c({node:f,index:d+1})));l.length>0;){const{index:f,node:h}=l.pop();if(f===a.length&&h.implementation)return this.addToCache(o,a,h.implementation),h.implementation;l.push(...h.getSubTreeWithArg(a[f],s).map(p=>({node:p,index:f+1})))}}addToCache(a,s,o){function u(l,d){return d in l||(l[d]={}),l[d]}let c=u(a,this.identifier);for(const l of s){const d=(0,t.isLiteralTermExpression)(l),f=d?d.dataType:l.termType;c.cache=c.cache||{},c=u(c.cache,f)}c.func=o}addOverload(a,s){this._addOverload([...a],s,0)}_addOverload(a,s,o){var d;const[u,...c]=a;if(!u){(this.promotionCount===void 0||o<=this.promotionCount)&&(this.promotionCount=o,this.implementation=s);return}let l=this.getSubtree(u);if(!l){const f=new yO(this.identifier,this.depth+1),h=(0,e.asGeneralType)(u);h&&(this.generalOverloads[h]=f);const p=(0,e.asOverrideType)(u);p&&this.literalOverLoads.push([p,f]),l=f}l._addOverload(c,s,o),(d=e.typePromotion[u])==null||d.forEach(f=>this.addPromotedOverload(f.typeToPromote,s,f.conversionFunction,c,o))}addPromotedOverload(a,s,o,u,c){let l=this.getSubtree(a);if(!l){const d=new yO(this.identifier,this.depth+1);this.literalOverLoads.push([a,d]),l=d}l._addOverload(u,d=>f=>s(d)([...f.slice(0,this.depth),o(f[this.depth]),...f.slice(this.depth+1,f.length)]),c+1)}getSubTreeWithArg(a,s){const o=[],u=(0,t.isLiteralTermExpression)(a);if(this.generalOverloads.term&&o.push(this.generalOverloads.term),this.generalOverloads[a.termType]&&o.push(this.generalOverloads[a.termType]),u){const c=(0,e.asKnownLiteralType)(u.dataType);let l;c?l=e.superTypeDictTable[c]:l=(0,e.getSuperTypes)(u.dataType,s);const d=this.literalOverLoads.filter(([f,h])=>f in l).map(([f,h])=>[l[f],h]);d.sort(([f,h],[p,b])=>f-p),o.push(...d.map(([f,h])=>h))}return o}};return bh.OverloadTree=r,bh}var B4;function eo(){if(B4)return wr;B4=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.expressionToVar=wr.dateTime=wr.langString=wr.string=wr.double=wr.float=wr.decimal=wr.integer=wr.bool=wr.Builder=wr.declare=void 0;const t=ht,e=aa(),r=aa(),n=ni,a=ni,s=Ke,o=DL(),u=new t.DataFactory;function c(A){return new l(A)}wr.declare=c;class l{constructor(T){this.overloadTree=new o.OverloadTree(T),this.collected=!1}collect(){if(this.collected)throw new Error("Builders can only be collected once!");return this.collected=!0,this.overloadTree}static wrapInvalidLexicalProtected(T){return I=>D=>(D.forEach((U,H)=>{if(U instanceof r.NonLexicalLiteral)throw new s.InvalidLexicalForm(D[H].toRDF())}),T(I)(D))}set(T,I,D=!0){return this.overloadTree.addOverload(T,D?l.wrapInvalidLexicalProtected(I):I),this}copy({from:T,to:I}){const D=this.overloadTree.getImplementationExact(T);if(!D)throw new s.UnexpectedError("Tried to copy implementation, but types not found",{from:T,to:I});return this.set(I,D)}onUnary(T,I,D=!0){return this.set([T],U=>([H])=>I(U)(H),D)}onUnaryTyped(T,I,D=!0){return this.set([T],U=>([H])=>I(U)(H.typedValue),D)}onBinary(T,I,D=!0){return this.set(T,U=>([H,N])=>I(U)(H,N),D)}onBinaryTyped(T,I,D=!0){return this.set(T,U=>([H,N])=>I(U)(H.typedValue,N.typedValue),D)}onTernaryTyped(T,I,D=!0){return this.set(T,U=>([H,N,x])=>I(U)(H.typedValue,N.typedValue,x.typedValue),D)}onTernary(T,I,D=!0){return this.set(T,U=>([H,N,x])=>I(U)(H,N,x),D)}onQuaternaryTyped(T,I,D=!0){return this.set(T,U=>([H,N,x,F])=>I(U)(H.typedValue,N.typedValue,x.typedValue,F.typedValue),D)}onTerm1(T,I=!1){return this.set(["term"],D=>([U])=>T(D)(U),I)}onTerm3(T){return this.set(["term","term","term"],I=>([D,U,H])=>T(I)(D,U,H))}onQuad1(T){return this.set(["quad"],I=>([D])=>T(I)(D))}onLiteral1(T,I=!0){return this.set(["literal"],D=>([U])=>T(D)(U),I)}onBoolean1(T,I=!0){return this.set([n.TypeURL.XSD_BOOLEAN],D=>([U])=>T(D)(U),I)}onBoolean1Typed(T,I=!0){return this.set([n.TypeURL.XSD_BOOLEAN],D=>([U])=>T(D)(U.typedValue),I)}onString1(T,I=!0){return this.set([n.TypeURL.XSD_STRING],D=>([U])=>T(D)(U),I)}onString1Typed(T,I=!0){return this.set([n.TypeURL.XSD_STRING],D=>([U])=>T(D)(U.typedValue),I)}onLangString1(T,I=!0){return this.set([n.TypeURL.RDF_LANG_STRING],D=>([U])=>T(D)(U),I)}onStringly1(T,I=!0){return this.set([n.TypeAlias.SPARQL_STRINGLY],D=>([U])=>T(D)(U),I)}onStringly1Typed(T,I=!0){return this.set([n.TypeAlias.SPARQL_STRINGLY],D=>([U])=>T(D)(U.typedValue),I)}onNumeric1(T,I=!0){return this.set([n.TypeAlias.SPARQL_NUMERIC],D=>([U])=>T(D)(U),I)}onDateTime1(T,I=!0){return this.set([n.TypeURL.XSD_DATE_TIME],D=>([U])=>T(D)(U),I)}numericConverter(T,I=!0){const D=U=>H=>T(U)(H.typedValue);return this.onBinary([a.TypeURL.XSD_INTEGER],U=>H=>f(D(U)(H)),I).onBinary([a.TypeURL.XSD_DECIMAL],U=>H=>h(D(U)(H)),I).onBinary([a.TypeURL.XSD_FLOAT],U=>H=>p(D(U)(H)),I).onBinary([a.TypeURL.XSD_DOUBLE],U=>H=>b(D(U)(H)),I)}arithmetic(T,I=!0){const D=U=>(H,N)=>T(U)(H.typedValue,N.typedValue);return this.onBinary([a.TypeURL.XSD_INTEGER,a.TypeURL.XSD_INTEGER],U=>(H,N)=>f(D(U)(H,N)),I).onBinary([a.TypeURL.XSD_DECIMAL,a.TypeURL.XSD_DECIMAL],U=>(H,N)=>h(D(U)(H,N)),I).onBinary([a.TypeURL.XSD_FLOAT,a.TypeURL.XSD_FLOAT],U=>(H,N)=>p(D(U)(H,N)),I).onBinary([a.TypeURL.XSD_DOUBLE,a.TypeURL.XSD_DOUBLE],U=>(H,N)=>b(D(U)(H,N)),I)}numberTest(T){return this.numeric(I=>([D,U])=>{const H=T(I)(D.typedValue,U.typedValue);return d(H)})}stringTest(T,I=!0){return this.set([n.TypeURL.XSD_STRING,n.TypeURL.XSD_STRING],D=>([U,H])=>{const N=T(D)(U.typedValue,H.typedValue);return d(N)},I)}booleanTest(T,I=!0){return this.set([n.TypeURL.XSD_BOOLEAN,n.TypeURL.XSD_BOOLEAN],D=>([U,H])=>{const N=T(D)(U.typedValue,H.typedValue);return d(N)},I)}dateTimeTest(T,I=!0){return this.set([n.TypeURL.XSD_DATE_TIME,n.TypeURL.XSD_DATE_TIME],D=>([U,H])=>{const N=T(D)(U.typedValue,H.typedValue);return d(N)},I)}numeric(T){return this.set([n.TypeAlias.SPARQL_NUMERIC,n.TypeAlias.SPARQL_NUMERIC],T)}}wr.Builder=l;function d(A){return new e.BooleanLiteral(A)}wr.bool=d;function f(A){return new e.IntegerLiteral(A)}wr.integer=f;function h(A){return new e.DecimalLiteral(A)}wr.decimal=h;function p(A){return new e.FloatLiteral(A)}wr.float=p;function b(A){return new e.DoubleLiteral(A)}wr.double=b;function _(A){return new e.StringLiteral(A)}wr.string=_;function E(A,T){return new e.LangStringLiteral(A,T)}wr.langString=E;function w(A,T){return new e.DateTimeLiteral(A,T)}wr.dateTime=w;function O(A){return u.variable(A.name.slice(1))}return wr.expressionToVar=O,wr}var $4;function z2(){return $4||($4=1,function(t){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 e=aa(),r=eo(),n=ni;t.extensionTableInput={[n.TypeURL.XSD_DATE_TIME_STAMP]:n.TypeURL.XSD_DATE_TIME,[n.TypeURL.XSD_DAY_TIME_DURATION]:n.TypeURL.XSD_DURATION,[n.TypeURL.XSD_YEAR_MONTH_DURATION]:n.TypeURL.XSD_DURATION,[n.TypeURL.RDF_LANG_STRING]:n.TypeAlias.SPARQL_STRINGLY,[n.TypeURL.XSD_STRING]:n.TypeAlias.SPARQL_STRINGLY,[n.TypeURL.XSD_NORMALIZED_STRING]:n.TypeURL.XSD_STRING,[n.TypeURL.XSD_TOKEN]:n.TypeURL.XSD_NORMALIZED_STRING,[n.TypeURL.XSD_LANGUAGE]:n.TypeURL.XSD_TOKEN,[n.TypeURL.XSD_NM_TOKEN]:n.TypeURL.XSD_TOKEN,[n.TypeURL.XSD_NAME]:n.TypeURL.XSD_TOKEN,[n.TypeURL.XSD_NC_NAME]:n.TypeURL.XSD_NAME,[n.TypeURL.XSD_ENTITY]:n.TypeURL.XSD_NC_NAME,[n.TypeURL.XSD_ID]:n.TypeURL.XSD_NC_NAME,[n.TypeURL.XSD_ID_REF]:n.TypeURL.XSD_NC_NAME,[n.TypeURL.XSD_DOUBLE]:n.TypeAlias.SPARQL_NUMERIC,[n.TypeURL.XSD_FLOAT]:n.TypeAlias.SPARQL_NUMERIC,[n.TypeURL.XSD_DECIMAL]:n.TypeAlias.SPARQL_NUMERIC,[n.TypeURL.XSD_INTEGER]:n.TypeURL.XSD_DECIMAL,[n.TypeURL.XSD_NON_POSITIVE_INTEGER]:n.TypeURL.XSD_INTEGER,[n.TypeURL.XSD_NEGATIVE_INTEGER]:n.TypeURL.XSD_NON_POSITIVE_INTEGER,[n.TypeURL.XSD_LONG]:n.TypeURL.XSD_INTEGER,[n.TypeURL.XSD_INT]:n.TypeURL.XSD_LONG,[n.TypeURL.XSD_SHORT]:n.TypeURL.XSD_INT,[n.TypeURL.XSD_BYTE]:n.TypeURL.XSD_SHORT,[n.TypeURL.XSD_NON_NEGATIVE_INTEGER]:n.TypeURL.XSD_INTEGER,[n.TypeURL.XSD_POSITIVE_INTEGER]:n.TypeURL.XSD_NON_NEGATIVE_INTEGER,[n.TypeURL.XSD_UNSIGNED_LONG]:n.TypeURL.XSD_NON_NEGATIVE_INTEGER,[n.TypeURL.XSD_UNSIGNED_INT]:n.TypeURL.XSD_UNSIGNED_LONG,[n.TypeURL.XSD_UNSIGNED_SHORT]:n.TypeURL.XSD_UNSIGNED_INT,[n.TypeURL.XSD_UNSIGNED_BYTE]:n.TypeURL.XSD_UNSIGNED_SHORT,[n.TypeURL.XSD_DATE_TIME]:"term",[n.TypeURL.XSD_BOOLEAN]:"term",[n.TypeURL.XSD_DATE]:"term",[n.TypeURL.XSD_G_MONTH]:"term",[n.TypeURL.XSD_G_MONTHDAY]:"term",[n.TypeURL.XSD_G_YEAR]:"term",[n.TypeURL.XSD_G_YEAR_MONTH]:"term",[n.TypeURL.XSD_TIME]:"term",[n.TypeURL.XSD_G_DAY]:"term",[n.TypeURL.XSD_DURATION]:"term",[n.TypeAlias.SPARQL_NUMERIC]:"term",[n.TypeAlias.SPARQL_STRINGLY]:"term",[n.TypeURL.XSD_ANY_URI]:"term"},t.superTypeDictTable=Object.create(null);function a(_,E){const w=E.cache.get(_);if(w)return w;const O=E.discoverer(_);if(O==="term"){const I=Object.create(null);return I.__depth=0,I[_]=0,E.cache.set(_,I),I}let A;const T=l(O);return T?A={...t.superTypeDictTable[T]}:A={...a(O,E)},A.__depth++,A[_]=A.__depth,E.cache.set(_,A),A}t.getSuperTypes=a;function s(){for(const[_,E]of Object.entries(t.extensionTableInput)){const w=_;t.superTypeDictTable[w]||o(w,E,t.superTypeDictTable)}}t.extensionTableInit=s,s();function o(_,E,w){if(E==="term"||E===void 0){const O=Object.create(null);O.__depth=0,O[_]=0,w[_]=O;return}w[E]||o(E,t.extensionTableInput[E],w),w[_]={...w[E],[_]:w[E].__depth+1,__depth:w[E].__depth+1}}t.typeAliasCheck=Object.create(null);function u(){for(const _ of Object.values(n.TypeAlias))t.typeAliasCheck[_]=!0}u();function c(_){if(_ in t.typeAliasCheck)return _}t.asTypeAlias=c;function l(_){if(_ in t.superTypeDictTable)return _}t.asKnownLiteralType=l;function d(_){if(l(_)||_==="term")return _}t.asOverrideType=d;function f(_){if(_==="term"||(0,e.asTermType)(_))return _}t.asGeneralType=f;function h(_,E){return _!=="term"&&t.superTypeDictTable[_]&&t.superTypeDictTable[_][E]!==void 0}t.isInternalSubType=h;function p(_,E){const w=l(_);return w?t.superTypeDictTable[w]:a(_,E)}t.getSuperTypeDict=p;function b(_,E,w){return _==="term"?!1:p(_,w)[E]!==void 0}t.isSubTypeOf=b,t.typePromotion={[n.TypeURL.XSD_STRING]:[{typeToPromote:n.TypeURL.XSD_ANY_URI,conversionFunction:_=>(0,r.string)(_.str())}],[n.TypeURL.XSD_DOUBLE]:[{typeToPromote:n.TypeURL.XSD_FLOAT,conversionFunction:_=>(0,r.double)(_.typedValue)},{typeToPromote:n.TypeURL.XSD_DECIMAL,conversionFunction:_=>(0,r.double)(_.typedValue)}],[n.TypeURL.XSD_FLOAT]:[{typeToPromote:n.TypeURL.XSD_DECIMAL,conversionFunction:_=>(0,r.float)(_.typedValue)}]}}(ST)),ST}var U4;function Rl(){if(U4)return yh;U4=1,Object.defineProperty(yh,"__esModule",{value:!0}),yh.TermTransformer=void 0;const t=nr,e=xt,r=aa(),n=ni,a=Ke,s=Ke,o=zr,u=zr,c=z2();let l=class{constructor(f){this.superTypeProvider=f}transformRDFTermUnsafe(f){return this.transformTerm({term:f,type:e.Algebra.types.EXPRESSION,expressionType:e.Algebra.expressionTypes.TERM})}transformTerm(f){if(!f.term)throw new a.InvalidExpression(f);switch(f.term.termType){case"Variable":return new r.Variable(t.termToString(f.term));case"Literal":return this.transformLiteral(f.term);case"NamedNode":return new r.NamedNode(f.term.value);case"BlankNode":return new r.BlankNode(f.term.value);case"Quad":return new r.Quad(f.term,this.superTypeProvider);default:throw new a.InvalidTermType(f)}}transformLiteral(f){if(!f.datatype||[null,void 0,""].includes(f.datatype.value))return f.language?new r.LangStringLiteral(f.value,f.language):new r.StringLiteral(f.value);const h=f.datatype.value,p=(0,c.getSuperTypeDict)(h,this.superTypeProvider);try{if(n.TypeURL.XSD_STRING in p)return new r.StringLiteral(f.value,h);if(n.TypeURL.RDF_LANG_STRING in p)return new r.LangStringLiteral(f.value,f.language);if(n.TypeURL.XSD_YEAR_MONTH_DURATION in p)return new r.YearMonthDurationLiteral((0,o.parseYearMonthDuration)(f.value),f.value,h);if(n.TypeURL.XSD_DAY_TIME_DURATION in p)return new r.DayTimeDurationLiteral((0,o.parseDayTimeDuration)(f.value),f.value,h);if(n.TypeURL.XSD_DURATION in p)return new r.DurationLiteral((0,o.parseDuration)(f.value),f.value,h);if(n.TypeURL.XSD_DATE_TIME in p){const E=new Date(f.value);return Number.isNaN(E.getTime())?new r.NonLexicalLiteral(void 0,h,this.superTypeProvider,f.value):new r.DateTimeLiteral((0,o.parseDateTime)(f.value),f.value,h)}if(n.TypeURL.XSD_DATE in p)return new r.DateLiteral((0,o.parseDate)(f.value),f.value,h);if(n.TypeURL.XSD_TIME in p)return new r.TimeLiteral((0,o.parseTime)(f.value),f.value,h);if(n.TypeURL.XSD_BOOLEAN in p)return f.value!=="true"&&f.value!=="false"&&f.value!=="1"&&f.value!=="0"?new r.NonLexicalLiteral(void 0,h,this.superTypeProvider,f.value):new r.BooleanLiteral(f.value==="true"||f.value==="1",f.value);if(n.TypeURL.XSD_DECIMAL in p){const E=u.parseXSDDecimal(f.value);return E===void 0?new r.NonLexicalLiteral(void 0,h,this.superTypeProvider,f.value):n.TypeURL.XSD_INTEGER in p?new r.IntegerLiteral(E,h,f.value):new r.DecimalLiteral(E,h,f.value)}const b=n.TypeURL.XSD_FLOAT in p,_=n.TypeURL.XSD_DOUBLE in p;if(b||_){const E=u.parseXSDFloat(f.value);return E===void 0?new r.NonLexicalLiteral(void 0,h,this.superTypeProvider,f.value):b?new r.FloatLiteral(E,h,f.value):new r.DoubleLiteral(E,h,f.value)}return new r.Literal(f.value,h,f.value)}catch(b){if(b instanceof Error&&(0,s.isExpressionError)(b))return new r.NonLexicalLiteral(void 0,h,this.superTypeProvider,f.value);throw b}}};return yh.TermTransformer=l,yh}var Ns={};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.serializeDuration=Ns.serializeTime=Ns.serializeDate=Ns.serializeDateTime=void 0;function Mo(t,e=2){return t.toLocaleString(void 0,{minimumIntegerDigits:e,useGrouping:!1})}function ape(t){return`${CL({year:t.year,month:t.month,day:t.day})}T${jL(t)}`}Ns.serializeDateTime=ape;function NL(t){return t.zoneHours===void 0||t.zoneMinutes===void 0?"":t.zoneHours===0&&t.zoneMinutes===0?"Z":`${t.zoneHours>=0?`+${Mo(t.zoneHours)}`:Mo(t.zoneHours)}:${Mo(Math.abs(t.zoneMinutes))}`}function CL(t){return`${Mo(t.year,4)}-${Mo(t.month)}-${Mo(t.day)}${NL(t)}`}Ns.serializeDate=CL;function jL(t){return`${Mo(t.hours)}:${Mo(t.minutes)}:${Mo(t.seconds)}${NL(t)}`}Ns.serializeTime=jL;function spe(t,e="PT0S"){if(!Object.values(t).some(d=>(d||0)!==0))return e;const r=Object.values(t).some(d=>(d||0)<0)?"-":"",n=t.year?`${Math.abs(t.year)}Y`:"",a=t.month?`${Math.abs(t.month)}M`:"",s=t.day?`${Math.abs(t.day)}D`:"",o=`${r}P${n}${a}${s}`;if(!(t.hours||t.minutes||t.seconds))return o;const u=t.hours?`${Math.abs(t.hours)}H`:"",c=t.minutes?`${Math.abs(t.minutes)}M`:"",l=t.seconds?`${Math.abs(t.seconds)}S`:"";return`${o}T${u}${c}${l}`}Ns.serializeDuration=spe;var q4;function ope(){if(q4)return ft;q4=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.isNonLexicalLiteral=ft.NonLexicalLiteral=ft.YearMonthDurationLiteral=ft.DayTimeDurationLiteral=ft.DurationLiteral=ft.DateLiteral=ft.TimeLiteral=ft.DateTimeLiteral=ft.StringLiteral=ft.LangStringLiteral=ft.BooleanLiteral=ft.DoubleLiteral=ft.FloatLiteral=ft.DecimalLiteral=ft.IntegerLiteral=ft.NumericLiteral=ft.Literal=ft.isLiteralTermExpression=ft.Quad=ft.BlankNode=ft.NamedNode=ft.Term=void 0;const t=ht,e=Rl(),r=ni,n=ni,a=Ke,s=Ns,o=z2(),u=Ai,c=new t.DataFactory;let l=class{constructor(){this.expressionType=u.ExpressionType.Term}str(){throw new a.InvalidArgumentTypes([this],r.RegularOperator.STR)}coerceEBV(){throw new a.EBVCoercionError(this)}};ft.Term=l;class d extends l{constructor(Q){super(),this.value=Q,this.termType="namedNode"}toRDF(){return c.namedNode(this.value)}str(){return this.value}}ft.NamedNode=d;class f extends l{constructor(Q){super(),this.termType="blankNode",this.value=typeof Q=="string"?c.blankNode(Q):Q}toRDF(){return this.value}}ft.BlankNode=f;class h extends l{constructor(Q,se){super(),this.termType="quad",this.transformer=new e.TermTransformer(se),this.valueTerm=Q}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}}ft.Quad=h;function p(j){if(j.termType==="literal")return j}ft.isLiteralTermExpression=p;class b extends l{constructor(Q,se,ie,be){super(),this.typedValue=Q,this.dataType=se,this.strValue=ie,this.language=be,this.termType="literal"}toRDF(){return c.literal(this.strValue||this.str(),this.language||c.namedNode(this.dataType))}str(){return this.strValue||this.typedValue.toString()}}ft.Literal=b;class _ extends b{constructor(Q,se,ie,be){super(Q,se,ie,be),this.typedValue=Q,this.strValue=ie,this.language=be}coerceEBV(){return!!this.typedValue}toRDF(){const Q=super.toRDF();return Number.isFinite(this.typedValue)||(Q.value=Q.value.replace("Infinity","INF")),Q}str(){return this.strValue||this.specificFormatter(this.typedValue)}}ft.NumericLiteral=_;class E extends _{constructor(Q,se,ie,be){super(Q,se||n.TypeURL.XSD_INTEGER,ie,be),this.typedValue=Q,this.strValue=ie,this.language=be}specificFormatter(Q){return Q.toFixed(0)}}ft.IntegerLiteral=E;class w extends _{constructor(Q,se,ie,be){super(Q,se||n.TypeURL.XSD_DECIMAL,ie,be),this.typedValue=Q,this.strValue=ie,this.language=be}specificFormatter(Q){return Q.toString()}}ft.DecimalLiteral=w;class O extends _{constructor(Q,se,ie,be){super(Q,se||n.TypeURL.XSD_FLOAT,ie,be),this.typedValue=Q,this.strValue=ie,this.language=be}specificFormatter(Q){return Q.toString()}}ft.FloatLiteral=O;class A extends _{constructor(Q,se,ie,be){super(Q,se||n.TypeURL.XSD_DOUBLE,ie,be),this.typedValue=Q,this.strValue=ie,this.language=be}specificFormatter(Q){if(!Number.isFinite(Q))return Q>0?"INF":Q<0?"-INF":"NaN";const se=Q.toExponential(),[ie,be]=se.split("e"),he=be.replace(/\+/u,"");return`${ie.includes(".")?ie:`${ie}.0`}E${he}`}}ft.DoubleLiteral=A;class T extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.XSD_BOOLEAN,se),this.typedValue=Q,this.strValue=se}coerceEBV(){return this.typedValue}}ft.BooleanLiteral=T;class I extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.RDF_LANG_STRING,Q,se),this.typedValue=Q,this.language=se}coerceEBV(){return this.str().length>0}}ft.LangStringLiteral=I;class D extends b{constructor(Q,se){super(Q,se||n.TypeURL.XSD_STRING,Q),this.typedValue=Q}coerceEBV(){return this.str().length>0}}ft.StringLiteral=D;class U extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.XSD_DATE_TIME,se),this.typedValue=Q,this.strValue=se}str(){return(0,s.serializeDateTime)(this.typedValue)}}ft.DateTimeLiteral=U;class H extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.XSD_TIME,se),this.typedValue=Q,this.strValue=se}str(){return(0,s.serializeTime)(this.typedValue)}}ft.TimeLiteral=H;class N extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.XSD_DATE,se),this.typedValue=Q,this.strValue=se}str(){return(0,s.serializeDate)(this.typedValue)}}ft.DateLiteral=N;class x extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.XSD_DURATION,se),this.typedValue=Q,this.strValue=se}str(){return(0,s.serializeDuration)(this.typedValue)}}ft.DurationLiteral=x;class F extends x{constructor(Q,se,ie){super(Q,se,ie||n.TypeURL.XSD_DAY_TIME_DURATION),this.typedValue=Q,this.strValue=se}}ft.DayTimeDurationLiteral=F;class X extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.XSD_YEAR_MONTH_DURATION,se),this.typedValue=Q,this.strValue=se}str(){return(0,s.serializeDuration)(this.typedValue,"P0M")}}ft.YearMonthDurationLiteral=X;class ne extends b{constructor(Q,se,ie,be,he){super({toString:()=>"undefined"},se,be,he),this.openWorldType=ie}coerceEBV(){if((0,o.isSubTypeOf)(this.dataType,n.TypeURL.XSD_BOOLEAN,this.openWorldType)||(0,o.isSubTypeOf)(this.dataType,n.TypeAlias.SPARQL_NUMERIC,this.openWorldType))return!1;throw new a.EBVCoercionError(this)}toRDF(){return c.literal(this.str(),this.language||c.namedNode(this.dataType))}str(){return this.strValue||""}}ft.NonLexicalLiteral=ne;function $(j){if(j instanceof ne)return j}return ft.isNonLexicalLiteral=$,ft}var W2={};Object.defineProperty(W2,"__esModule",{value:!0});W2.Operator=void 0;const upe=Ai;class cpe{constructor(e,r){this.args=e,this.apply=r,this.expressionType=upe.ExpressionType.Operator}}W2.Operator=cpe;var X2={};Object.defineProperty(X2,"__esModule",{value:!0});X2.SpecialOperator=void 0;const lpe=Ai;class dpe{constructor(e,r,n){this.args=e,this.applyAsync=r,this.applySynchronously=n,this.expressionType=lpe.ExpressionType.SpecialOperator}}X2.SpecialOperator=dpe;var K2={};Object.defineProperty(K2,"__esModule",{value:!0});K2.Named=void 0;const fpe=Ai;class hpe{constructor(e,r,n){this.name=e,this.args=r,this.apply=n,this.expressionType=fpe.ExpressionType.Named}}K2.Named=hpe;var J2={};Object.defineProperty(J2,"__esModule",{value:!0});J2.Aggregate=void 0;const ppe=Ai;class ype{constructor(e,r){this.name=e,this.expression=r,this.expressionType=ppe.ExpressionType.Aggregate}}J2.Aggregate=ype;var Y2={};Object.defineProperty(Y2,"__esModule",{value:!0});Y2.Existence=void 0;const bpe=Ai;class _pe{constructor(e){this.expression=e,this.expressionType=bpe.ExpressionType.Existence}}Y2.Existence=_pe;var Z2={};Object.defineProperty(Z2,"__esModule",{value:!0});Z2.AsyncExtension=void 0;const gpe=Ai;class mpe{constructor(e,r,n){this.name=e,this.args=r,this.apply=n,this.expressionType=gpe.ExpressionType.AsyncExtension}}Z2.AsyncExtension=mpe;var ew={};Object.defineProperty(ew,"__esModule",{value:!0});ew.SyncExtension=void 0;const vpe=Ai;class wpe{constructor(e,r,n){this.name=e,this.args=r,this.apply=n,this.expressionType=vpe.ExpressionType.SyncExtension}}ew.SyncExtension=wpe;var V4;function aa(){return V4||(V4=1,function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ai,t),r(G2,t),r(ope(),t),r(W2,t),r(X2,t),r(K2,t),r(J2,t),r(Y2,t),r(Z2,t),r(ew,t)}(wT)),wT}var TT={},va={};Object.defineProperty(va,"__esModule",{value:!0});va.SpecialFunction=va.NamedFunction=va.RegularFunction=va.BaseFunction=void 0;const ML=Ke;class JR{constructor(e,r){this.operator=e,this.apply=(n,a)=>(this.monomorph(n,a.superTypeProvider,a.functionArgumentsCache)||this.handleInvalidTypes(n))(a)(n),this.arity=r.arity,this.overloads=r.overloads}monomorph(e,r,n){return this.overloads.search(e,r,n)}}va.BaseFunction=JR;class Spe extends JR{constructor(e,r){super(e,r),this.functionClass="regular"}handleInvalidTypes(e){throw new ML.InvalidArgumentTypes(e,this.operator)}}va.RegularFunction=Spe;class Tpe extends JR{constructor(e,r){super(e,r),this.functionClass="named"}handleInvalidTypes(e){throw new ML.InvalidArgumentTypes(e,this.operator)}}va.NamedFunction=Tpe;class Epe{constructor(e,r){this.operator=e,this.functionClass="special",this.arity=r.arity,this.applySynchronously=r.applySynchronously,this.applyAsync=r.applyAsync,this.checkArity=r.checkArity||Ope(this.arity)}}va.SpecialFunction=Epe;function Ope(t){return e=>t===Number.POSITIVE_INFINITY?!0:e.length===t}var tw={};Object.defineProperty(tw,"__esModule",{value:!0});tw.namedDefinitions=void 0;const wa=aa(),Ape=aa(),yt=ni,FL=jt,ol=Ke,Ta=zr,Ft=eo(),Rpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_STRING).onNumeric1(()=>t=>(0,Ft.string)((0,Ft.float)(t.typedValue).str())).onBoolean1Typed(()=>t=>(0,Ft.string)((0,Ft.bool)(t).str())).onTerm1(()=>t=>(0,Ft.string)(t.str())).collect()},xpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_FLOAT).onNumeric1(()=>t=>(0,Ft.float)(t.typedValue)).onBoolean1Typed(()=>t=>(0,Ft.float)(t?1:0)).onUnary(yt.TypeURL.XSD_STRING,()=>t=>{const e=(0,Ta.parseXSDFloat)(t.str());if(e===void 0)throw new ol.CastError(t,yt.TypeURL.XSD_FLOAT);return(0,Ft.float)(e)},!1).collect()},Ipe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_DOUBLE).onNumeric1(()=>t=>(0,Ft.double)(t.typedValue)).onBoolean1Typed(()=>t=>(0,Ft.double)(t?1:0)).onUnary(yt.TypeURL.XSD_STRING,()=>t=>{const e=(0,Ta.parseXSDFloat)(t.str());if(e===void 0)throw new ol.CastError(t,yt.TypeURL.XSD_DOUBLE);return(0,Ft.double)(e)},!1).collect()},Ppe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_DECIMAL).onNumeric1(()=>t=>{const e=(0,Ta.parseXSDDecimal)(t.str());if(e===void 0)throw new ol.CastError(t,yt.TypeURL.XSD_DECIMAL);return(0,Ft.decimal)(e)}).onString1(()=>t=>{const e=t.str(),r=/^([+-])?(\d+(\.\d+)?)$/u.test(e)?(0,Ta.parseXSDDecimal)(e):void 0;if(r===void 0)throw new ol.CastError(t,yt.TypeURL.XSD_DECIMAL);return(0,Ft.decimal)(r)},!1).onBoolean1Typed(()=>t=>(0,Ft.decimal)(t?1:0)).collect()},Dpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_INTEGER).onBoolean1Typed(()=>t=>(0,Ft.integer)(t?1:0)).onNumeric1(()=>t=>{const e=(0,Ta.parseXSDInteger)(t.str());if(e===void 0)throw new ol.CastError(t,yt.TypeURL.XSD_INTEGER);return(0,Ft.integer)(e)},!1).onString1(()=>t=>{const e=t.str(),r=/^\d+$/u.test(e)?(0,Ta.parseXSDInteger)(e):void 0;if(r===void 0)throw new ol.CastError(t,yt.TypeURL.XSD_INTEGER);return(0,Ft.integer)(r)}).collect()},Npe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_DATE_TIME).onUnary(yt.TypeURL.XSD_DATE_TIME,()=>t=>t).onUnary(yt.TypeURL.XSD_STRING,()=>t=>(0,Ft.dateTime)((0,Ta.parseDateTime)(t.str()),t.str()),!1).onUnary(yt.TypeURL.XSD_DATE,()=>t=>new wa.DateTimeLiteral({...t.typedValue,hours:0,minutes:0,seconds:0})).collect()},Cpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_BOOLEAN).onNumeric1(()=>t=>(0,Ft.bool)(t.coerceEBV()),!0).onUnary(yt.TypeURL.XSD_BOOLEAN,()=>t=>(0,Ft.bool)(t.coerceEBV()),!0).onUnary(yt.TypeURL.XSD_STRING,()=>t=>{switch(t.str()){case"true":return(0,Ft.bool)(!0);case"false":return(0,Ft.bool)(!1);case"1":return(0,Ft.bool)(!0);case"0":return(0,Ft.bool)(!1);default:throw new ol.CastError(t,yt.TypeURL.XSD_BOOLEAN)}},!1).collect()},jpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_TIME).onUnary(yt.TypeURL.XSD_TIME,()=>t=>new wa.TimeLiteral(t.typedValue,t.strValue)).onUnary(yt.TypeURL.XSD_DATE_TIME,()=>t=>new wa.TimeLiteral(t.typedValue)).onStringly1(()=>t=>new wa.TimeLiteral((0,Ta.parseTime)(t.str()))).collect()},Mpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_DATE).onUnary(yt.TypeURL.XSD_DATE,()=>t=>new wa.DateLiteral(t.typedValue,t.strValue)).onUnary(yt.TypeURL.XSD_DATE_TIME,()=>t=>new wa.DateLiteral(t.typedValue)).onStringly1(()=>t=>new wa.DateLiteral((0,Ta.parseDate)(t.str()))).collect()},Fpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_DURATION).onUnary(yt.TypeURL.XSD_DURATION,()=>t=>new wa.DurationLiteral(t.typedValue,t.strValue)).onStringly1(()=>t=>new Ape.DurationLiteral((0,Ta.parseDuration)(t.str()))).collect()},Lpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_DAY_TIME_DURATION).onUnary(yt.TypeURL.XSD_DURATION,()=>t=>new wa.DayTimeDurationLiteral((0,FL.trimToDayTimeDuration)(t.typedValue))).onStringly1(()=>t=>new wa.DayTimeDurationLiteral((0,Ta.parseDayTimeDuration)(t.str()))).collect()},Bpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_YEAR_MONTH_DURATION).onUnary(yt.TypeURL.XSD_DURATION,()=>t=>new wa.YearMonthDurationLiteral((0,FL.trimToYearMonthDuration)(t.typedValue))).onStringly1(()=>t=>new wa.YearMonthDurationLiteral((0,Ta.parseYearMonthDuration)(t.str()))).collect()};tw.namedDefinitions={[yt.TypeURL.XSD_STRING]:Rpe,[yt.TypeURL.XSD_FLOAT]:xpe,[yt.TypeURL.XSD_DOUBLE]:Ipe,[yt.TypeURL.XSD_DECIMAL]:Ppe,[yt.TypeURL.XSD_INTEGER]:Dpe,[yt.TypeURL.XSD_DATE_TIME]:Npe,[yt.TypeURL.XSD_DATE]:Mpe,[yt.TypeURL.XSD_BOOLEAN]:Cpe,[yt.TypeURL.XSD_TIME]:jpe,[yt.TypeURL.XSD_DURATION]:Fpe,[yt.TypeURL.XSD_DAY_TIME_DURATION]:Lpe,[yt.TypeURL.XSD_YEAR_MONTH_DURATION]:Bpe};var _h={},LL={exports:{}};(function(t){(function(e){var r,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,s=Math.floor,o="[BigNumber Error] ",u=o+"Number primitive has more than 15 significant digits: ",c=1e14,l=14,d=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,p=1e9;function b(D){var U,H,N,x=ce.prototype={constructor:ce,toString:null,valueOf:null},F=new ce(1),X=20,ne=4,$=-7,j=21,Q=-1e7,se=1e7,ie=!1,be=1,he=0,Te={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},Ne="0123456789abcdefghijklmnopqrstuvwxyz",ye=!0;function ce(L,P){var g,y,v,C,V,q,G,Y,ee=this;if(!(ee instanceof ce))return new ce(L,P);if(P==null){if(L&&L._isBigNumber===!0){ee.s=L.s,!L.c||L.e>se?ee.c=ee.e=null:L.e=10;V/=10,C++);C>se?ee.c=ee.e=null:(ee.e=C,ee.c=[L]);return}Y=String(L)}else{if(!n.test(Y=String(L)))return N(ee,Y,q);ee.s=Y.charCodeAt(0)==45?(Y=Y.slice(1),-1):1}(C=Y.indexOf("."))>-1&&(Y=Y.replace(".","")),(V=Y.search(/e/i))>0?(C<0&&(C=V),C+=+Y.slice(V+1),Y=Y.substring(0,V)):C<0&&(C=Y.length)}else{if(O(P,2,Ne.length,"Base"),P==10&&ye)return ee=new ce(L),le(ee,X+ee.e+1,ne);if(Y=String(L),q=typeof L=="number"){if(L*0!=0)return N(ee,Y,q,P);if(ee.s=1/L<0?(Y=Y.slice(1),-1):1,ce.DEBUG&&Y.replace(/^0\.0*|\./,"").length>15)throw Error(u+L)}else ee.s=Y.charCodeAt(0)===45?(Y=Y.slice(1),-1):1;for(g=Ne.slice(0,P),C=V=0,G=Y.length;VC){C=G;continue}}else if(!v&&(Y==Y.toUpperCase()&&(Y=Y.toLowerCase())||Y==Y.toLowerCase()&&(Y=Y.toUpperCase()))){v=!0,V=-1,C=0;continue}return N(ee,String(L),q,P)}q=!1,Y=H(Y,P,10,ee.s),(C=Y.indexOf("."))>-1?Y=Y.replace(".",""):C=Y.length}for(V=0;Y.charCodeAt(V)===48;V++);for(G=Y.length;Y.charCodeAt(--G)===48;);if(Y=Y.slice(V,++G)){if(G-=V,q&&ce.DEBUG&&G>15&&(L>d||L!==s(L)))throw Error(u+ee.s*L);if((C=C-V-1)>se)ee.c=ee.e=null;else if(C=-p&&v<=p&&v===s(v)){if(y[0]===0){if(v===0&&y.length===1)return!0;break e}if(P=(v+1)%l,P<1&&(P+=l),String(y[0]).length==P){for(P=0;P=c||g!==s(g))break e;if(g!==0)return!0}}}else if(y===null&&v===null&&(C===null||C===1||C===-1))return!0;throw Error(o+"Invalid BigNumber: "+L)},ce.maximum=ce.max=function(){return oe(arguments,-1)},ce.minimum=ce.min=function(){return oe(arguments,1)},ce.random=function(){var L=9007199254740992,P=Math.random()*L&2097151?function(){return s(Math.random()*L)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(g){var y,v,C,V,q,G=0,Y=[],ee=new ce(F);if(g==null?g=X:O(g,0,p),V=a(g/l),ie)if(crypto.getRandomValues){for(y=crypto.getRandomValues(new Uint32Array(V*=2));G>>11),q>=9e15?(v=crypto.getRandomValues(new Uint32Array(2)),y[G]=v[0],y[G+1]=v[1]):(Y.push(q%1e14),G+=2);G=V/2}else if(crypto.randomBytes){for(y=crypto.randomBytes(V*=7);G=9e15?crypto.randomBytes(7).copy(y,G):(Y.push(q%1e14),G+=7);G=V/7}else throw ie=!1,Error(o+"crypto unavailable");if(!ie)for(;G=10;q/=10,G++);Gv-1&&(q[V+1]==null&&(q[V+1]=0),q[V+1]+=q[V]/v|0,q[V]%=v)}return q.reverse()}return function(g,y,v,C,V){var q,G,Y,ee,ae,ve,me,Ee,k=g.indexOf("."),W=X,M=ne;for(k>=0&&(ee=he,he=0,g=g.replace(".",""),Ee=new ce(y),ve=Ee.pow(g.length-k),he=ee,Ee.c=P(I(E(ve.c),ve.e,"0"),10,v,L),Ee.e=Ee.c.length),me=P(g,y,v,V?(q=Ne,L):(q=L,Ne)),Y=ee=me.length;me[--ee]==0;me.pop());if(!me[0])return q.charAt(0);if(k<0?--Y:(ve.c=me,ve.e=Y,ve.s=C,ve=U(ve,Ee,W,M,v),me=ve.c,ae=ve.r,Y=ve.e),G=Y+W+1,k=me[G],ee=v/2,ae=ae||G<0||me[G+1]!=null,ae=M<4?(k!=null||ae)&&(M==0||M==(ve.s<0?3:2)):k>ee||k==ee&&(M==4||ae||M==6&&me[G-1]&1||M==(ve.s<0?8:7)),G<1||!me[0])g=ae?I(q.charAt(1),-W,q.charAt(0)):q.charAt(0);else{if(me.length=G,ae)for(--v;++me[--G]>v;)me[G]=0,G||(++Y,me=[1].concat(me));for(ee=me.length;!me[--ee];);for(k=0,g="";k<=ee;g+=q.charAt(me[k++]));g=I(g,Y,q.charAt(0))}return g}}(),U=function(){function L(y,v,C){var V,q,G,Y,ee=0,ae=y.length,ve=v%h,me=v/h|0;for(y=y.slice();ae--;)G=y[ae]%h,Y=y[ae]/h|0,V=me*G+Y*ve,q=ve*G+V%h*h+ee,ee=(q/C|0)+(V/h|0)+me*Y,y[ae]=q%C;return ee&&(y=[ee].concat(y)),y}function P(y,v,C,V){var q,G;if(C!=V)G=C>V?1:-1;else for(q=G=0;qv[q]?1:-1;break}return G}function g(y,v,C,V){for(var q=0;C--;)y[C]-=q,q=y[C]1;y.splice(0,1));}return function(y,v,C,V,q){var G,Y,ee,ae,ve,me,Ee,k,W,M,S,R,z,ue,ge,we,Me,Ue=y.s==v.s?1:-1,Ge=y.c,We=v.c;if(!Ge||!Ge[0]||!We||!We[0])return new ce(!y.s||!v.s||(Ge?We&&Ge[0]==We[0]:!We)?NaN:Ge&&Ge[0]==0||!We?Ue*0:Ue/0);for(k=new ce(Ue),W=k.c=[],Y=y.e-v.e,Ue=C+Y+1,q||(q=c,Y=_(y.e/l)-_(v.e/l),Ue=Ue/l|0),ee=0;We[ee]==(Ge[ee]||0);ee++);if(We[ee]>(Ge[ee]||0)&&Y--,Ue<0)W.push(1),ae=!0;else{for(ue=Ge.length,we=We.length,ee=0,Ue+=2,ve=s(q/(We[0]+1)),ve>1&&(We=L(We,ve,q),Ge=L(Ge,ve,q),we=We.length,ue=Ge.length),z=we,M=Ge.slice(0,we),S=M.length;S=q/2&&ge++;do{if(ve=0,G=P(We,M,we,S),G<0){if(R=M[0],we!=S&&(R=R*q+(M[1]||0)),ve=s(R/ge),ve>1)for(ve>=q&&(ve=q-1),me=L(We,ve,q),Ee=me.length,S=M.length;P(me,M,Ee,S)==1;)ve--,g(me,we=10;Ue/=10,ee++);le(k,C+(k.e=ee+Y*l-1)+1,V,ae)}else k.e=Y,k.r=+ae;return k}}();function Re(L,P,g,y){var v,C,V,q,G;if(g==null?g=ne:O(g,0,8),!L.c)return L.toString();if(v=L.c[0],V=L.e,P==null)G=E(L.c),G=y==1||y==2&&(V<=$||V>=j)?T(G,V):I(G,V,"0");else if(L=le(new ce(L),P,g),C=L.e,G=E(L.c),q=G.length,y==1||y==2&&(P<=C||C<=$)){for(;qq){if(--P>0)for(G+=".";P--;G+="0");}else if(P+=C-q,P>0)for(C+1==q&&(G+=".");P--;G+="0");return L.s<0&&v?"-"+G:G}function oe(L,P){for(var g,y,v=1,C=new ce(L[0]);v=10;v/=10,y++);return(g=y+g*l-1)>se?L.c=L.e=null:g=10;q/=10,v++);if(C=P-v,C<0)C+=l,V=P,G=ae[Y=0],ee=s(G/ve[v-V-1]%10);else if(Y=a((C+1)/l),Y>=ae.length)if(y){for(;ae.length<=Y;ae.push(0));G=ee=0,v=1,C%=l,V=C-l+1}else break e;else{for(G=q=ae[Y],v=1;q>=10;q/=10,v++);C%=l,V=C-l+v,ee=V<0?0:s(G/ve[v-V-1]%10)}if(y=y||P<0||ae[Y+1]!=null||(V<0?G:G%ve[v-V-1]),y=g<4?(ee||y)&&(g==0||g==(L.s<0?3:2)):ee>5||ee==5&&(g==4||y||g==6&&(C>0?V>0?G/ve[v-V]:0:ae[Y-1])%10&1||g==(L.s<0?8:7)),P<1||!ae[0])return ae.length=0,y?(P-=L.e+1,ae[0]=ve[(l-P%l)%l],L.e=-P||0):ae[0]=L.e=0,L;if(C==0?(ae.length=Y,q=1,Y--):(ae.length=Y+1,q=ve[l-C],ae[Y]=V>0?s(G/ve[v-V]%ve[V])*q:0),y)for(;;)if(Y==0){for(C=1,V=ae[0];V>=10;V/=10,C++);for(V=ae[0]+=q,q=1;V>=10;V/=10,q++);C!=q&&(L.e++,ae[0]==c&&(ae[0]=1));break}else{if(ae[Y]+=q,ae[Y]!=c)break;ae[Y--]=0,q=1}for(C=ae.length;ae[--C]===0;ae.pop());}L.e>se?L.c=L.e=null:L.e=j?T(P,g):I(P,g,"0"),L.s<0?"-"+P:P)}return x.absoluteValue=x.abs=function(){var L=new ce(this);return L.s<0&&(L.s=1),L},x.comparedTo=function(L,P){return w(this,new ce(L,P))},x.decimalPlaces=x.dp=function(L,P){var g,y,v,C=this;if(L!=null)return O(L,0,p),P==null?P=ne:O(P,0,8),le(new ce(C),L+C.e+1,P);if(!(g=C.c))return null;if(y=((v=g.length-1)-_(this.e/l))*l,v=g[v])for(;v%10==0;v/=10,y--);return y<0&&(y=0),y},x.dividedBy=x.div=function(L,P){return U(this,new ce(L,P),X,ne)},x.dividedToIntegerBy=x.idiv=function(L,P){return U(this,new ce(L,P),0,1)},x.exponentiatedBy=x.pow=function(L,P){var g,y,v,C,V,q,G,Y,ee,ae=this;if(L=new ce(L),L.c&&!L.isInteger())throw Error(o+"Exponent not an integer: "+pe(L));if(P!=null&&(P=new ce(P)),q=L.e>14,!ae.c||!ae.c[0]||ae.c[0]==1&&!ae.e&&ae.c.length==1||!L.c||!L.c[0])return ee=new ce(Math.pow(+pe(ae),q?L.s*(2-A(L)):+pe(L))),P?ee.mod(P):ee;if(G=L.s<0,P){if(P.c?!P.c[0]:!P.s)return new ce(NaN);y=!G&&ae.isInteger()&&P.isInteger(),y&&(ae=ae.mod(P))}else{if(L.e>9&&(ae.e>0||ae.e<-1||(ae.e==0?ae.c[0]>1||q&&ae.c[1]>=24e7:ae.c[0]<8e13||q&&ae.c[0]<=9999975e7)))return C=ae.s<0&&A(L)?-0:0,ae.e>-1&&(C=1/C),new ce(G?1/C:C);he&&(C=a(he/l+2))}for(q?(g=new ce(.5),G&&(L.s=1),Y=A(L)):(v=Math.abs(+pe(L)),Y=v%2),ee=new ce(F);;){if(Y){if(ee=ee.times(ae),!ee.c)break;C?ee.c.length>C&&(ee.c.length=C):y&&(ee=ee.mod(P))}if(v){if(v=s(v/2),v===0)break;Y=v%2}else if(L=L.times(g),le(L,L.e+1,1),L.e>14)Y=A(L);else{if(v=+pe(L),v===0)break;Y=v%2}ae=ae.times(ae),C?ae.c&&ae.c.length>C&&(ae.c.length=C):y&&(ae=ae.mod(P))}return y?ee:(G&&(ee=F.div(ee)),P?ee.mod(P):C?le(ee,he,ne,V):ee)},x.integerValue=function(L){var P=new ce(this);return L==null?L=ne:O(L,0,8),le(P,P.e+1,L)},x.isEqualTo=x.eq=function(L,P){return w(this,new ce(L,P))===0},x.isFinite=function(){return!!this.c},x.isGreaterThan=x.gt=function(L,P){return w(this,new ce(L,P))>0},x.isGreaterThanOrEqualTo=x.gte=function(L,P){return(P=w(this,new ce(L,P)))===1||P===0},x.isInteger=function(){return!!this.c&&_(this.e/l)>this.c.length-2},x.isLessThan=x.lt=function(L,P){return w(this,new ce(L,P))<0},x.isLessThanOrEqualTo=x.lte=function(L,P){return(P=w(this,new ce(L,P)))===-1||P===0},x.isNaN=function(){return!this.s},x.isNegative=function(){return this.s<0},x.isPositive=function(){return this.s>0},x.isZero=function(){return!!this.c&&this.c[0]==0},x.minus=function(L,P){var g,y,v,C,V=this,q=V.s;if(L=new ce(L,P),P=L.s,!q||!P)return new ce(NaN);if(q!=P)return L.s=-P,V.plus(L);var G=V.e/l,Y=L.e/l,ee=V.c,ae=L.c;if(!G||!Y){if(!ee||!ae)return ee?(L.s=-P,L):new ce(ae?V:NaN);if(!ee[0]||!ae[0])return ae[0]?(L.s=-P,L):new ce(ee[0]?V:ne==3?-0:0)}if(G=_(G),Y=_(Y),ee=ee.slice(),q=G-Y){for((C=q<0)?(q=-q,v=ee):(Y=G,v=ae),v.reverse(),P=q;P--;v.push(0));v.reverse()}else for(y=(C=(q=ee.length)<(P=ae.length))?q:P,q=P=0;P0)for(;P--;ee[g++]=0);for(P=c-1;y>q;){if(ee[--y]=0;){for(g=0,ve=R[v]%W,me=R[v]/W|0,V=G,C=v+V;C>v;)Y=S[--V]%W,ee=S[V]/W|0,q=me*Y+ee*ve,Y=ve*Y+q%W*W+Ee[C]+g,g=(Y/k|0)+(q/W|0)+me*ee,Ee[C--]=Y%k;Ee[C]=g}return g?++y:Ee.splice(0,1),J(L,Ee,y)},x.negated=function(){var L=new ce(this);return L.s=-L.s||null,L},x.plus=function(L,P){var g,y=this,v=y.s;if(L=new ce(L,P),P=L.s,!v||!P)return new ce(NaN);if(v!=P)return L.s=-P,y.minus(L);var C=y.e/l,V=L.e/l,q=y.c,G=L.c;if(!C||!V){if(!q||!G)return new ce(v/0);if(!q[0]||!G[0])return G[0]?L:new ce(q[0]?y:v*0)}if(C=_(C),V=_(V),q=q.slice(),v=C-V){for(v>0?(V=C,g=G):(v=-v,g=q),g.reverse();v--;g.push(0));g.reverse()}for(v=q.length,P=G.length,v-P<0&&(g=G,G=q,q=g,P=v),v=0;P;)v=(q[--P]=q[P]+G[P]+v)/c|0,q[P]=c===q[P]?0:q[P]%c;return v&&(q=[v].concat(q),++V),J(L,q,V)},x.precision=x.sd=function(L,P){var g,y,v,C=this;if(L!=null&&L!==!!L)return O(L,1,p),P==null?P=ne:O(P,0,8),le(new ce(C),L,P);if(!(g=C.c))return null;if(v=g.length-1,y=v*l+1,v=g[v]){for(;v%10==0;v/=10,y--);for(v=g[0];v>=10;v/=10,y++);}return L&&C.e+1>y&&(y=C.e+1),y},x.shiftedBy=function(L){return O(L,-d,d),this.times("1e"+L)},x.squareRoot=x.sqrt=function(){var L,P,g,y,v,C=this,V=C.c,q=C.s,G=C.e,Y=X+4,ee=new ce("0.5");if(q!==1||!V||!V[0])return new ce(!q||q<0&&(!V||V[0])?NaN:V?C:1/0);if(q=Math.sqrt(+pe(C)),q==0||q==1/0?(P=E(V),(P.length+G)%2==0&&(P+="0"),q=Math.sqrt(+P),G=_((G+1)/2)-(G<0||G%2),q==1/0?P="5e"+G:(P=q.toExponential(),P=P.slice(0,P.indexOf("e")+1)+G),g=new ce(P)):g=new ce(q+""),g.c[0]){for(G=g.e,q=G+Y,q<3&&(q=0);;)if(v=g,g=ee.times(v.plus(U(C,v,Y,1))),E(v.c).slice(0,q)===(P=E(g.c)).slice(0,q))if(g.e0&&Ee>0){for(C=Ee%q||q,ee=me.substr(0,C);C0&&(ee+=Y+me.slice(C)),ve&&(ee="-"+ee)}y=ae?ee+(g.decimalSeparator||"")+((G=+g.fractionGroupSize)?ae.replace(new RegExp("\\d{"+G+"}\\B","g"),"$&"+(g.fractionGroupSeparator||"")):ae):ee}return(g.prefix||"")+y+(g.suffix||"")},x.toFraction=function(L){var P,g,y,v,C,V,q,G,Y,ee,ae,ve,me=this,Ee=me.c;if(L!=null&&(q=new ce(L),!q.isInteger()&&(q.c||q.s!==1)||q.lt(F)))throw Error(o+"Argument "+(q.isInteger()?"out of range: ":"not an integer: ")+pe(q));if(!Ee)return new ce(me);for(P=new ce(F),Y=g=new ce(F),y=G=new ce(F),ve=E(Ee),C=P.e=ve.length-me.e-1,P.c[0]=f[(V=C%l)<0?l+V:V],L=!L||q.comparedTo(P)>0?C>0?P:Y:q,V=se,se=1/0,q=new ce(ve),G.c[0]=0;ee=U(q,P,0,1),v=g.plus(ee.times(y)),v.comparedTo(L)!=1;)g=y,y=v,Y=G.plus(ee.times(v=Y)),G=v,P=q.minus(ee.times(v=P)),q=v;return v=U(L.minus(g),y,0,1),G=G.plus(v.times(Y)),g=g.plus(v.times(y)),G.s=Y.s=me.s,C=C*2,ae=U(Y,y,C,ne).minus(me).abs().comparedTo(U(G,g,C,ne).minus(me).abs())<1?[Y,y]:[G,g],se=V,ae},x.toNumber=function(){return+pe(this)},x.toPrecision=function(L,P){return L!=null&&O(L,1,p),Re(this,L,P,2)},x.toString=function(L){var P,g=this,y=g.s,v=g.e;return v===null?y?(P="Infinity",y<0&&(P="-"+P)):P="NaN":(L==null?P=v<=$||v>=j?T(E(g.c),v):I(E(g.c),v,"0"):L===10&&ye?(g=le(new ce(g),X+v+1,ne),P=I(E(g.c),g.e,"0")):(O(L,2,Ne.length,"Base"),P=H(I(E(g.c),v,"0"),10,L,y,!0)),y<0&&g.c[0]&&(P="-"+P)),P},x.valueOf=x.toJSON=function(){return pe(this)},x._isBigNumber=!0,D!=null&&ce.set(D),ce}function _(D){var U=D|0;return D>0||D===U?U:U-1}function E(D){for(var U,H,N=1,x=D.length,F=D[0]+"";Nj^H?1:-1;for(ne=($=x.length)<(j=F.length)?$:j,X=0;XF[X]^H?1:-1;return $==j?0:$>j^H?1:-1}function O(D,U,H,N){if(DH||D!==s(D))throw Error(o+(N||"Argument")+(typeof D=="number"?DH?" out of range: ":" not an integer: ":" not a primitive number: ")+String(D))}function A(D){var U=D.c.length-1;return _(D.e/l)==U&&D.c[U]%2!=0}function T(D,U){return(D.length>1?D.charAt(0)+"."+D.slice(1):D)+(U<0?"e":"e+")+U}function I(D,U,H){var N,x;if(U<0){for(x=H+".";++U;x+=H);D=x+D}else if(N=D.length,++U>N){for(x=H,U-=N;--U;x+=H);D+=x}else U>>25)+T|0,D+=(A&T|~A&I)+O[1]-389564586|0,D=(D<<12|D>>>20)+A|0,I+=(D&A|~D&T)+O[2]+606105819|0,I=(I<<17|I>>>15)+D|0,T+=(I&D|~I&A)+O[3]-1044525330|0,T=(T<<22|T>>>10)+I|0,A+=(T&I|~T&D)+O[4]-176418897|0,A=(A<<7|A>>>25)+T|0,D+=(A&T|~A&I)+O[5]+1200080426|0,D=(D<<12|D>>>20)+A|0,I+=(D&A|~D&T)+O[6]-1473231341|0,I=(I<<17|I>>>15)+D|0,T+=(I&D|~I&A)+O[7]-45705983|0,T=(T<<22|T>>>10)+I|0,A+=(T&I|~T&D)+O[8]+1770035416|0,A=(A<<7|A>>>25)+T|0,D+=(A&T|~A&I)+O[9]-1958414417|0,D=(D<<12|D>>>20)+A|0,I+=(D&A|~D&T)+O[10]-42063|0,I=(I<<17|I>>>15)+D|0,T+=(I&D|~I&A)+O[11]-1990404162|0,T=(T<<22|T>>>10)+I|0,A+=(T&I|~T&D)+O[12]+1804603682|0,A=(A<<7|A>>>25)+T|0,D+=(A&T|~A&I)+O[13]-40341101|0,D=(D<<12|D>>>20)+A|0,I+=(D&A|~D&T)+O[14]-1502002290|0,I=(I<<17|I>>>15)+D|0,T+=(I&D|~I&A)+O[15]+1236535329|0,T=(T<<22|T>>>10)+I|0,A+=(T&D|I&~D)+O[1]-165796510|0,A=(A<<5|A>>>27)+T|0,D+=(A&I|T&~I)+O[6]-1069501632|0,D=(D<<9|D>>>23)+A|0,I+=(D&T|A&~T)+O[11]+643717713|0,I=(I<<14|I>>>18)+D|0,T+=(I&A|D&~A)+O[0]-373897302|0,T=(T<<20|T>>>12)+I|0,A+=(T&D|I&~D)+O[5]-701558691|0,A=(A<<5|A>>>27)+T|0,D+=(A&I|T&~I)+O[10]+38016083|0,D=(D<<9|D>>>23)+A|0,I+=(D&T|A&~T)+O[15]-660478335|0,I=(I<<14|I>>>18)+D|0,T+=(I&A|D&~A)+O[4]-405537848|0,T=(T<<20|T>>>12)+I|0,A+=(T&D|I&~D)+O[9]+568446438|0,A=(A<<5|A>>>27)+T|0,D+=(A&I|T&~I)+O[14]-1019803690|0,D=(D<<9|D>>>23)+A|0,I+=(D&T|A&~T)+O[3]-187363961|0,I=(I<<14|I>>>18)+D|0,T+=(I&A|D&~A)+O[8]+1163531501|0,T=(T<<20|T>>>12)+I|0,A+=(T&D|I&~D)+O[13]-1444681467|0,A=(A<<5|A>>>27)+T|0,D+=(A&I|T&~I)+O[2]-51403784|0,D=(D<<9|D>>>23)+A|0,I+=(D&T|A&~T)+O[7]+1735328473|0,I=(I<<14|I>>>18)+D|0,T+=(I&A|D&~A)+O[12]-1926607734|0,T=(T<<20|T>>>12)+I|0,A+=(T^I^D)+O[5]-378558|0,A=(A<<4|A>>>28)+T|0,D+=(A^T^I)+O[8]-2022574463|0,D=(D<<11|D>>>21)+A|0,I+=(D^A^T)+O[11]+1839030562|0,I=(I<<16|I>>>16)+D|0,T+=(I^D^A)+O[14]-35309556|0,T=(T<<23|T>>>9)+I|0,A+=(T^I^D)+O[1]-1530992060|0,A=(A<<4|A>>>28)+T|0,D+=(A^T^I)+O[4]+1272893353|0,D=(D<<11|D>>>21)+A|0,I+=(D^A^T)+O[7]-155497632|0,I=(I<<16|I>>>16)+D|0,T+=(I^D^A)+O[10]-1094730640|0,T=(T<<23|T>>>9)+I|0,A+=(T^I^D)+O[13]+681279174|0,A=(A<<4|A>>>28)+T|0,D+=(A^T^I)+O[0]-358537222|0,D=(D<<11|D>>>21)+A|0,I+=(D^A^T)+O[3]-722521979|0,I=(I<<16|I>>>16)+D|0,T+=(I^D^A)+O[6]+76029189|0,T=(T<<23|T>>>9)+I|0,A+=(T^I^D)+O[9]-640364487|0,A=(A<<4|A>>>28)+T|0,D+=(A^T^I)+O[12]-421815835|0,D=(D<<11|D>>>21)+A|0,I+=(D^A^T)+O[15]+530742520|0,I=(I<<16|I>>>16)+D|0,T+=(I^D^A)+O[2]-995338651|0,T=(T<<23|T>>>9)+I|0,A+=(I^(T|~D))+O[0]-198630844|0,A=(A<<6|A>>>26)+T|0,D+=(T^(A|~I))+O[7]+1126891415|0,D=(D<<10|D>>>22)+A|0,I+=(A^(D|~T))+O[14]-1416354905|0,I=(I<<15|I>>>17)+D|0,T+=(D^(I|~A))+O[5]-57434055|0,T=(T<<21|T>>>11)+I|0,A+=(I^(T|~D))+O[12]+1700485571|0,A=(A<<6|A>>>26)+T|0,D+=(T^(A|~I))+O[3]-1894986606|0,D=(D<<10|D>>>22)+A|0,I+=(A^(D|~T))+O[10]-1051523|0,I=(I<<15|I>>>17)+D|0,T+=(D^(I|~A))+O[1]-2054922799|0,T=(T<<21|T>>>11)+I|0,A+=(I^(T|~D))+O[8]+1873313359|0,A=(A<<6|A>>>26)+T|0,D+=(T^(A|~I))+O[15]-30611744|0,D=(D<<10|D>>>22)+A|0,I+=(A^(D|~T))+O[6]-1560198380|0,I=(I<<15|I>>>17)+D|0,T+=(D^(I|~A))+O[13]+1309151649|0,T=(T<<21|T>>>11)+I|0,A+=(I^(T|~D))+O[4]-145523070|0,A=(A<<6|A>>>26)+T|0,D+=(T^(A|~I))+O[11]-1120210379|0,D=(D<<10|D>>>22)+A|0,I+=(A^(D|~T))+O[2]+718787259|0,I=(I<<15|I>>>17)+D|0,T+=(D^(I|~A))+O[9]-343485551|0,T=(T<<21|T>>>11)+I|0,w[0]=A+w[0]|0,w[1]=T+w[1]|0,w[2]=I+w[2]|0,w[3]=D+w[3]|0}function s(w){var O=[],A;for(A=0;A<64;A+=4)O[A>>2]=w.charCodeAt(A)+(w.charCodeAt(A+1)<<8)+(w.charCodeAt(A+2)<<16)+(w.charCodeAt(A+3)<<24);return O}function o(w){var O=[],A;for(A=0;A<64;A+=4)O[A>>2]=w[A]+(w[A+1]<<8)+(w[A+2]<<16)+(w[A+3]<<24);return O}function u(w){var O=w.length,A=[1732584193,-271733879,-1732584194,271733878],T,I,D,U,H,N;for(T=64;T<=O;T+=64)a(A,s(w.substring(T-64,T)));for(w=w.substring(T-64),I=w.length,D=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T=0;T>2]|=w.charCodeAt(T)<<(T%4<<3);if(D[T>>2]|=128<<(T%4<<3),T>55)for(a(A,D),T=0;T<16;T+=1)D[T]=0;return U=O*8,U=U.toString(16).match(/(.*?)(.{0,8})$/),H=parseInt(U[2],16),N=parseInt(U[1],16)||0,D[14]=H,D[15]=N,a(A,D),A}function c(w){var O=w.length,A=[1732584193,-271733879,-1732584194,271733878],T,I,D,U,H,N;for(T=64;T<=O;T+=64)a(A,o(w.subarray(T-64,T)));for(w=T-64>2]|=w[T]<<(T%4<<3);if(D[T>>2]|=128<<(T%4<<3),T>55)for(a(A,D),T=0;T<16;T+=1)D[T]=0;return U=O*8,U=U.toString(16).match(/(.*?)(.{0,8})$/),H=parseInt(U[2],16),N=parseInt(U[1],16)||0,D[14]=H,D[15]=N,a(A,D),A}function l(w){var O="",A;for(A=0;A<4;A+=1)O+=n[w>>A*8+4&15]+n[w>>A*8&15];return O}function d(w){var O;for(O=0;OD?new ArrayBuffer(0):(U=D-I,H=new ArrayBuffer(U),N=new Uint8Array(H),x=new Uint8Array(this,I,U),N.set(x),H)}}();function f(w){return/[\u0080-\uFFFF]/.test(w)&&(w=unescape(encodeURIComponent(w))),w}function h(w,O){var A=w.length,T=new ArrayBuffer(A),I=new Uint8Array(T),D;for(D=0;D>2]|=O.charCodeAt(T)<<(T%4<<3);return this._finish(I,A),D=d(this._hash),w&&(D=_(D)),this.reset(),D},E.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},E.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},E.prototype.setState=function(w){return this._buff=w.buff,this._length=w.length,this._hash=w.hash,this},E.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},E.prototype._finish=function(w,O){var A=O,T,I,D;if(w[A>>2]|=128<<(A%4<<3),A>55)for(a(this._hash,w),A=0;A<16;A+=1)w[A]=0;T=this._length*8,T=T.toString(16).match(/(.*?)(.{0,8})$/),I=parseInt(T[2],16),D=parseInt(T[1],16)||0,w[14]=I,w[15]=D,a(this._hash,w)},E.hash=function(w,O){return E.hashBinary(f(w),O)},E.hashBinary=function(w,O){var A=u(w),T=d(A);return O?_(T):T},E.ArrayBuffer=function(){this.reset()},E.ArrayBuffer.prototype.append=function(w){var O=b(this._buff.buffer,w,!0),A=O.length,T;for(this._length+=w.byteLength,T=64;T<=A;T+=64)a(this._hash,o(O.subarray(T-64,T)));return this._buff=T-64>2]|=O[I]<<(I%4<<3);return this._finish(T,A),D=d(this._hash),w&&(D=_(D)),this.reset(),D},E.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},E.ArrayBuffer.prototype.getState=function(){var w=E.prototype.getState.call(this);return w.buff=p(w.buff),w},E.ArrayBuffer.prototype.setState=function(w){return w.buff=h(w.buff,!0),E.prototype.setState.call(this,w)},E.ArrayBuffer.prototype.destroy=E.prototype.destroy,E.ArrayBuffer.prototype._finish=E.prototype._finish,E.ArrayBuffer.hash=function(w,O){var A=c(new Uint8Array(w)),T=d(A);return O?_(T):T},E})})(BL);var Upe=BL.exports,YR={},rw={},nw={};Object.defineProperty(nw,"__esModule",{value:!0});nw.default=Vpe;let m1;const qpe=new Uint8Array(16);function Vpe(){if(!m1&&(m1=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!m1))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return m1(qpe)}var ac={},xl={},iw={};Object.defineProperty(iw,"__esModule",{value:!0});iw.default=void 0;var Hpe=/^(?:[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;iw.default=Hpe;Object.defineProperty(xl,"__esModule",{value:!0});xl.default=void 0;var kpe=Qpe(iw);function Qpe(t){return t&&t.__esModule?t:{default:t}}function Gpe(t){return typeof t=="string"&&kpe.default.test(t)}var zpe=Gpe;xl.default=zpe;Object.defineProperty(ac,"__esModule",{value:!0});ac.default=void 0;ac.unsafeStringify=$L;var Wpe=Xpe(xl);function Xpe(t){return t&&t.__esModule?t:{default:t}}const Mn=[];for(let t=0;t<256;++t)Mn.push((t+256).toString(16).slice(1));function $L(t,e=0){return Mn[t[e+0]]+Mn[t[e+1]]+Mn[t[e+2]]+Mn[t[e+3]]+"-"+Mn[t[e+4]]+Mn[t[e+5]]+"-"+Mn[t[e+6]]+Mn[t[e+7]]+"-"+Mn[t[e+8]]+Mn[t[e+9]]+"-"+Mn[t[e+10]]+Mn[t[e+11]]+Mn[t[e+12]]+Mn[t[e+13]]+Mn[t[e+14]]+Mn[t[e+15]]}function Kpe(t,e=0){const r=$L(t,e);if(!(0,Wpe.default)(r))throw TypeError("Stringified UUID is invalid");return r}var Jpe=Kpe;ac.default=Jpe;Object.defineProperty(rw,"__esModule",{value:!0});rw.default=void 0;var Ype=e0e(nw),Zpe=ac;function e0e(t){return t&&t.__esModule?t:{default:t}}let H4,ET,OT=0,AT=0;function t0e(t,e,r){let n=e&&r||0;const a=e||new Array(16);t=t||{};let s=t.node||H4,o=t.clockseq!==void 0?t.clockseq:ET;if(s==null||o==null){const h=t.random||(t.rng||Ype.default)();s==null&&(s=H4=[h[0]|1,h[1],h[2],h[3],h[4],h[5]]),o==null&&(o=ET=(h[6]<<8|h[7])&16383)}let u=t.msecs!==void 0?t.msecs:Date.now(),c=t.nsecs!==void 0?t.nsecs:AT+1;const l=u-OT+(c-AT)/1e4;if(l<0&&t.clockseq===void 0&&(o=o+1&16383),(l<0||u>OT)&&t.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");OT=u,AT=c,ET=o,u+=122192928e5;const d=((u&268435455)*1e4+c)%4294967296;a[n++]=d>>>24&255,a[n++]=d>>>16&255,a[n++]=d>>>8&255,a[n++]=d&255;const f=u/4294967296*1e4&268435455;a[n++]=f>>>8&255,a[n++]=f&255,a[n++]=f>>>24&15|16,a[n++]=f>>>16&255,a[n++]=o>>>8|128,a[n++]=o&255;for(let h=0;h<6;++h)a[n+h]=s[h];return e||(0,Zpe.unsafeStringify)(a)}var r0e=t0e;rw.default=r0e;var aw={},Wu={},K0={};Object.defineProperty(K0,"__esModule",{value:!0});K0.default=void 0;var n0e=i0e(xl);function i0e(t){return t&&t.__esModule?t:{default:t}}function a0e(t){if(!(0,n0e.default)(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}var s0e=a0e;K0.default=s0e;Object.defineProperty(Wu,"__esModule",{value:!0});Wu.URL=Wu.DNS=void 0;Wu.default=d0e;var o0e=ac,u0e=c0e(K0);function c0e(t){return t&&t.__esModule?t:{default:t}}function l0e(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>5]>>>a%32&255,o=parseInt(n.charAt(s>>>4&15)+n.charAt(s&15),16);e.push(o)}return e}function VL(t){return(t+64>>>9<<4)+14+1}function p0e(t,e){t[e>>5]|=128<>5]|=(t[n/8]&255)<>16)+(e>>16)+(r>>16)<<16|r&65535}function b0e(t,e){return t<>>32-e}function ow(t,e,r,n,a,s){return Nu(b0e(Nu(Nu(e,t),Nu(n,s)),a),r)}function Hn(t,e,r,n,a,s,o){return ow(e&r|~e&n,t,e,a,s,o)}function kn(t,e,r,n,a,s,o){return ow(e&n|r&~n,t,e,a,s,o)}function Qn(t,e,r,n,a,s,o){return ow(e^r^n,t,e,a,s,o)}function Gn(t,e,r,n,a,s,o){return ow(r^(e|~n),t,e,a,s,o)}var _0e=f0e;sw.default=_0e;Object.defineProperty(aw,"__esModule",{value:!0});aw.default=void 0;var g0e=HL(Wu),m0e=HL(sw);function HL(t){return t&&t.__esModule?t:{default:t}}const v0e=(0,g0e.default)("v3",48,m0e.default);var w0e=v0e;aw.default=w0e;var uw={},cw={};Object.defineProperty(cw,"__esModule",{value:!0});cw.default=void 0;const S0e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var T0e={randomUUID:S0e};cw.default=T0e;Object.defineProperty(uw,"__esModule",{value:!0});uw.default=void 0;var k4=kL(cw),E0e=kL(nw),O0e=ac;function kL(t){return t&&t.__esModule?t:{default:t}}function A0e(t,e,r){if(k4.default.randomUUID&&!e&&!t)return k4.default.randomUUID();t=t||{};const n=t.random||(t.rng||E0e.default)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let a=0;a<16;++a)e[r+a]=n[a];return e}return(0,O0e.unsafeStringify)(n)}var R0e=A0e;uw.default=R0e;var lw={},dw={};Object.defineProperty(dw,"__esModule",{value:!0});dw.default=void 0;function x0e(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function RT(t,e){return t<>>32-e}function I0e(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const o=unescape(encodeURIComponent(t));t=[];for(let u=0;u>>0;h=f,f=d,d=RT(l,30)>>>0,l=c,c=_}r[0]=r[0]+c>>>0,r[1]=r[1]+l>>>0,r[2]=r[2]+d>>>0,r[3]=r[3]+f>>>0,r[4]=r[4]+h>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var P0e=I0e;dw.default=P0e;Object.defineProperty(lw,"__esModule",{value:!0});lw.default=void 0;var D0e=QL(Wu),N0e=QL(dw);function QL(t){return t&&t.__esModule?t:{default:t}}const C0e=(0,D0e.default)("v5",80,N0e.default);var j0e=C0e;lw.default=j0e;var fw={};Object.defineProperty(fw,"__esModule",{value:!0});fw.default=void 0;var M0e="00000000-0000-0000-0000-000000000000";fw.default=M0e;var hw={};Object.defineProperty(hw,"__esModule",{value:!0});hw.default=void 0;var F0e=L0e(xl);function L0e(t){return t&&t.__esModule?t:{default:t}}function B0e(t){if(!(0,F0e.default)(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}var $0e=B0e;hw.default=$0e;(function(t){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 l.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return o.default}});var e=d(rw),r=d(aw),n=d(uw),a=d(lw),s=d(fw),o=d(hw),u=d(xl),c=d(ac),l=d(K0);function d(f){return f&&f.__esModule?f:{default:f}}})(YR);var gh={},Q4;function pw(){if(Q4)return gh;Q4=1,Object.defineProperty(gh,"__esModule",{value:!0}),gh.orderTypes=void 0;const t=Pa,e=jf(),r=Rl(),n=ni,a=Ke;function s(l,d,f=!1,h,p){if(l===d)return 0;if(l===void 0)return-1;if(d===void 0)return 1;if(l.termType!==d.termType)return c[l.termType]"term"),cache:h||new t.LRUCache({max:1e3})},defaultTimeZone:{zoneHours:0,zoneMinutes:0}},E=new r.TermTransformer(_.superTypeProvider),w=E.transformLiteral(l),O=E.transformLiteral(d);try{return b.apply([w,O],_).typedValue?0:p.apply([w,O],_).typedValue?1:-1}catch{const A=u(w.dataType,O.dataType);return A!==0?A:u(w.str(),O.str())}}function u(l,d){return l===d?0:lB=>(0,_.bool)(!B.coerceEBV())).collect()},T={arity:1,overloads:(0,_.declare)(c.RegularOperator.UPLUS).numericConverter(()=>B=>B).collect()},I={arity:1,overloads:(0,_.declare)(c.RegularOperator.UMINUS).numericConverter(()=>B=>-B).collect()},D={arity:2,overloads:(0,_.declare)(c.RegularOperator.MULTIPLICATION).arithmetic(()=>(B,re)=>new t.BigNumber(B).times(re).toNumber()).collect()},U={arity:2,overloads:(0,_.declare)(c.RegularOperator.DIVISION).arithmetic(()=>(B,re)=>new t.BigNumber(B).div(re).toNumber()).onBinaryTyped([l.TypeURL.XSD_INTEGER,l.TypeURL.XSD_INTEGER],()=>(B,re)=>{if(re===0)throw new f.ExpressionError("Integer division by 0");return(0,_.decimal)(new t.BigNumber(B).div(re).toNumber())}).collect()},H={arity:2,overloads:(0,_.declare)(c.RegularOperator.ADDITION).arithmetic(()=>(B,re)=>new t.BigNumber(B).plus(re).toNumber()).set([l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>new o.DateTimeLiteral((0,p.addDurationToDateTime)(B.typedValue,(0,d.defaultedDurationRepresentation)(re.typedValue)))).copy({from:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],to:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([l.TypeURL.XSD_DATE,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>new o.DateLiteral((0,p.addDurationToDateTime)((0,d.defaultedDateTimeRepresentation)(B.typedValue),(0,d.defaultedDurationRepresentation)(re.typedValue)))).copy({from:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_DAY_TIME_DURATION],to:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([l.TypeURL.XSD_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>new o.TimeLiteral((0,p.addDurationToDateTime)((0,d.defaultedDateTimeRepresentation)(B.typedValue),(0,d.defaultedDurationRepresentation)(re.typedValue)))).copy({from:[l.TypeURL.XSD_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],to:[l.TypeURL.XSD_TIME,l.TypeURL.XSD_YEAR_MONTH_DURATION]}).collect()},N={arity:2,overloads:(0,_.declare)(c.RegularOperator.SUBTRACTION).arithmetic(()=>(B,re)=>new t.BigNumber(B).minus(re).toNumber()).set([l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DATE_TIME],({defaultTimeZone:B})=>([re,Se])=>new o.DayTimeDurationLiteral((0,p.elapsedDuration)(re.typedValue,Se.typedValue,B))).copy({from:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_DATE]}).copy({from:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_TIME,l.TypeURL.XSD_TIME]}).set([l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>new o.DateTimeLiteral((0,p.addDurationToDateTime)(B.typedValue,(0,d.defaultedDurationRepresentation)((0,d.negateDuration)(re.typedValue))))).copy({from:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],to:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([l.TypeURL.XSD_DATE,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>new o.DateLiteral((0,p.addDurationToDateTime)((0,d.defaultedDateTimeRepresentation)(B.typedValue),(0,d.defaultedDurationRepresentation)((0,d.negateDuration)(re.typedValue))))).copy({from:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_DAY_TIME_DURATION],to:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([l.TypeURL.XSD_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>new o.TimeLiteral((0,p.addDurationToDateTime)((0,d.defaultedDateTimeRepresentation)(B.typedValue),(0,d.defaultedDurationRepresentation)((0,d.negateDuration)(re.typedValue))))).collect()},x={arity:2,overloads:(0,_.declare)(c.RegularOperator.EQUAL).numberTest(()=>(B,re)=>B===re).stringTest(()=>(B,re)=>B.localeCompare(re)===0).set([l.TypeURL.RDF_LANG_STRING,l.TypeURL.RDF_LANG_STRING],()=>([B,re])=>(0,_.bool)(B.str()===re.str()&&B.language===re.language)).set([l.TypeAlias.SPARQL_STRINGLY,l.TypeAlias.SPARQL_STRINGLY],()=>()=>(0,_.bool)(!1)).booleanTest(()=>(B,re)=>B===re).dateTimeTest(({defaultTimeZone:B})=>(re,Se)=>(0,d.toUTCDate)(re,B).getTime()===(0,d.toUTCDate)(Se,B).getTime()).copy({from:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_DATE]}).set(["quad","quad"],B=>([re,Se])=>{const Fe=new b.RegularFunction(l.RegularOperator.EQUAL,x);return(0,_.bool)(Fe.apply([re.subject,Se.subject],B).coerceEBV()&&Fe.apply([re.predicate,Se.predicate],B).coerceEBV()&&Fe.apply([re.object,Se.object],B).coerceEBV())},!1).set(["term","term"],()=>([B,re])=>(0,_.bool)(F(B,re)),!1).set([l.TypeURL.XSD_DURATION,l.TypeURL.XSD_DURATION],()=>([B,re])=>(0,_.bool)((0,d.yearMonthDurationsToMonths)((0,d.defaultedYearMonthDurationRepresentation)(B.typedValue))===(0,d.yearMonthDurationsToMonths)((0,d.defaultedYearMonthDurationRepresentation)(re.typedValue))&&(0,d.dayTimeDurationsToSeconds)((0,d.defaultedDayTimeDurationRepresentation)(B.typedValue))===(0,d.dayTimeDurationsToSeconds)((0,d.defaultedDayTimeDurationRepresentation)(re.typedValue)))).set([l.TypeURL.XSD_TIME,l.TypeURL.XSD_TIME],({defaultTimeZone:B})=>([re,Se])=>(0,_.bool)((0,d.toUTCDate)((0,d.defaultedDateTimeRepresentation)(re.typedValue),B).getTime()===(0,d.toUTCDate)((0,d.defaultedDateTimeRepresentation)(Se.typedValue),B).getTime())).collect()};function F(B,re){const Se=B.toRDF(),Fe=re.toRDF(),Ae=Se.equals(Fe);if(!Ae&&Se.termType==="Literal"&&Fe.termType==="Literal")throw new f.RDFEqualTypeError([B,re]);return Ae}const X={arity:2,overloads:(0,_.declare)(c.RegularOperator.NOT_EQUAL).set(["term","term"],B=>([re,Se])=>(0,_.bool)(!w.regularFunctions[c.RegularOperator.EQUAL].apply([re,Se],B).typedValue)).collect()},ne={arity:2,overloads:(0,_.declare)(c.RegularOperator.LT).numberTest(()=>(B,re)=>B(B,re)=>B.localeCompare(re)===-1).booleanTest(()=>(B,re)=>B([B,re])=>(0,_.bool)((0,h.orderTypes)(B.toRDF(),re.toRDF(),!0)===-1),!1).dateTimeTest(({defaultTimeZone:B})=>(re,Se)=>(0,d.toUTCDate)(re,B).getTime()<(0,d.toUTCDate)(Se,B).getTime()).copy({from:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_DATE]}).set([l.TypeURL.XSD_YEAR_MONTH_DURATION,l.TypeURL.XSD_YEAR_MONTH_DURATION],()=>([B,re])=>(0,_.bool)((0,d.yearMonthDurationsToMonths)((0,d.defaultedYearMonthDurationRepresentation)(B.typedValue))<(0,d.yearMonthDurationsToMonths)((0,d.defaultedYearMonthDurationRepresentation)(re.typedValue)))).set([l.TypeURL.XSD_DAY_TIME_DURATION,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>(0,_.bool)((0,d.dayTimeDurationsToSeconds)((0,d.defaultedDayTimeDurationRepresentation)(B.typedValue))<(0,d.dayTimeDurationsToSeconds)((0,d.defaultedDayTimeDurationRepresentation)(re.typedValue)))).set([l.TypeURL.XSD_TIME,l.TypeURL.XSD_TIME],({defaultTimeZone:B})=>([re,Se])=>(0,_.bool)((0,d.toUTCDate)((0,d.defaultedDateTimeRepresentation)(re.typedValue),B).getTime()<(0,d.toUTCDate)((0,d.defaultedDateTimeRepresentation)(Se.typedValue),B).getTime())).collect()},$={arity:2,overloads:(0,_.declare)(c.RegularOperator.GT).set(["term","term"],B=>([re,Se])=>w.regularFunctions[c.RegularOperator.LT].apply([Se,re],B)).collect()},j={arity:2,overloads:(0,_.declare)(c.RegularOperator.LTE).set(["term","term"],B=>([re,Se])=>(0,_.bool)(w.regularFunctions[c.RegularOperator.LT].apply([re,Se],B).typedValue||w.regularFunctions[c.RegularOperator.EQUAL].apply([re,Se],B).typedValue)).collect()},Q={arity:2,overloads:(0,_.declare)(c.RegularOperator.GTE).set(["term","term"],B=>([re,Se])=>w.regularFunctions[c.RegularOperator.LTE].apply([Se,re],B)).collect()},se={arity:1,overloads:(0,_.declare)(c.RegularOperator.IS_IRI).onTerm1(()=>B=>(0,_.bool)(B.termType==="namedNode")).collect()},ie={arity:1,overloads:(0,_.declare)(c.RegularOperator.IS_BLANK).onTerm1(()=>B=>(0,_.bool)(B.termType==="blankNode")).collect()},be={arity:1,overloads:(0,_.declare)(c.RegularOperator.IS_LITERAL).onTerm1(()=>B=>(0,_.bool)(B.termType==="literal")).collect()},he={arity:1,overloads:(0,_.declare)(c.RegularOperator.IS_NUMERIC).onNumeric1(()=>()=>(0,_.bool)(!0)).onTerm1(()=>()=>(0,_.bool)(!1)).collect()},Te={arity:1,overloads:(0,_.declare)(c.RegularOperator.STR).onTerm1(()=>B=>(0,_.string)(B.str())).collect()},Ne={arity:1,overloads:(0,_.declare)(c.RegularOperator.LANG).onLiteral1(()=>B=>(0,_.string)(B.language||"")).collect()},ye={arity:1,overloads:(0,_.declare)(c.RegularOperator.DATATYPE).onLiteral1(()=>B=>new o.NamedNode(B.dataType)).collect()},ce={arity:1,overloads:(0,_.declare)(c.RegularOperator.IRI).set(["namedNode"],B=>re=>{const Se=re[0],Fe=(0,n.resolve)(Se.str(),B.baseIRI||"");return new o.NamedNode(Fe)}).onString1(B=>re=>{const Se=(0,n.resolve)(re.str(),B.baseIRI||"");return new o.NamedNode(Se)}).collect()},Re={arity:2,overloads:(0,_.declare)(c.RegularOperator.STRDT).set([l.TypeURL.XSD_STRING,"namedNode"],({superTypeProvider:B})=>([re,Se])=>{const Fe=O.literal(re.typedValue,O.namedNode(Se.value));return new u.TermTransformer(B).transformLiteral(Fe)}).collect()},oe={arity:2,overloads:(0,_.declare)(c.RegularOperator.STRLANG).onBinaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>(B,re)=>new o.LangStringLiteral(B,re.toLowerCase())).collect()},J={arity:0,overloads:(0,_.declare)(c.RegularOperator.UUID).set([],()=>()=>new o.NamedNode(`urn:uuid:${s.v4()}`)).collect()},le={arity:0,overloads:(0,_.declare)(c.RegularOperator.STRUUID).set([],()=>()=>(0,_.string)(s.v4())).collect()},pe={arity:1,overloads:(0,_.declare)(c.RegularOperator.STRLEN).onStringly1(()=>B=>(0,_.integer)([...B.typedValue].length)).collect()},L={arity:[2,3],overloads:(0,_.declare)(c.RegularOperator.SUBSTR).onBinaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_INTEGER],()=>(B,re)=>(0,_.string)([...B].slice(re-1).join(""))).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.XSD_INTEGER],()=>(B,re)=>{const Se=[...B.typedValue].slice(re.typedValue-1).join("");return(0,_.langString)(Se,B.language)}).onTernaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_INTEGER,l.TypeURL.XSD_INTEGER],()=>(B,re,Se)=>(0,_.string)([...B].slice(re-1,Se+re-1).join(""))).onTernary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.XSD_INTEGER,l.TypeURL.XSD_INTEGER],()=>(B,re,Se)=>{const Fe=[...B.typedValue].slice(re.typedValue-1,Se.typedValue+re.typedValue-1).join("");return(0,_.langString)(Fe,B.language)}).collect()},P={arity:1,overloads:(0,_.declare)(c.RegularOperator.UCASE).onString1Typed(()=>B=>(0,_.string)(B.toUpperCase())).onLangString1(()=>B=>(0,_.langString)(B.typedValue.toUpperCase(),B.language)).collect()},g={arity:1,overloads:(0,_.declare)(c.RegularOperator.LCASE).onString1Typed(()=>B=>(0,_.string)(B.toLowerCase())).onLangString1(()=>B=>(0,_.langString)(B.typedValue.toLowerCase(),B.language)).collect()},y={arity:2,overloads:(0,_.declare)(c.RegularOperator.STRSTARTS).onBinaryTyped([l.TypeAlias.SPARQL_STRINGLY,l.TypeURL.XSD_STRING],()=>(B,re)=>(0,_.bool)(B.startsWith(re))).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.RDF_LANG_STRING],()=>(B,re)=>{if(B.language!==re.language)throw new f.IncompatibleLanguageOperation(B,re);return(0,_.bool)(B.typedValue.startsWith(re.typedValue))}).collect()},v={arity:2,overloads:(0,_.declare)(c.RegularOperator.STRENDS).onBinaryTyped([l.TypeAlias.SPARQL_STRINGLY,l.TypeURL.XSD_STRING],()=>(B,re)=>(0,_.bool)(B.endsWith(re))).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.RDF_LANG_STRING],()=>(B,re)=>{if(B.language!==re.language)throw new f.IncompatibleLanguageOperation(B,re);return(0,_.bool)(B.typedValue.endsWith(re.typedValue))}).collect()},C={arity:2,overloads:(0,_.declare)(c.RegularOperator.CONTAINS).onBinaryTyped([l.TypeAlias.SPARQL_STRINGLY,l.TypeURL.XSD_STRING],()=>(B,re)=>(0,_.bool)(B.includes(re))).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.RDF_LANG_STRING],()=>(B,re)=>{if(B.language!==re.language)throw new f.IncompatibleLanguageOperation(B,re);return(0,_.bool)(B.typedValue.includes(re.typedValue))}).collect()},V={arity:2,overloads:(0,_.declare)(c.RegularOperator.STRBEFORE).onBinaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>(B,re)=>(0,_.string)(B.slice(0,Math.max(0,B.indexOf(re))))).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.XSD_STRING],()=>(B,re)=>{const[Se,Fe]=[B.typedValue,re.typedValue],Ae=B.typedValue.slice(0,Math.max(0,Se.indexOf(Fe)));return Ae||!Fe?(0,_.langString)(Ae,B.language):(0,_.string)(Ae)}).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.RDF_LANG_STRING],()=>(B,re)=>{if(B.language!==re.language)throw new f.IncompatibleLanguageOperation(B,re);const[Se,Fe]=[B.typedValue,re.typedValue],Ae=B.typedValue.slice(0,Math.max(0,Se.indexOf(Fe)));return Ae||!Fe?(0,_.langString)(Ae,B.language):(0,_.string)(Ae)}).collect()},q={arity:2,overloads:(0,_.declare)(c.RegularOperator.STRAFTER).onBinaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>(B,re)=>(0,_.string)(B.slice(B.indexOf(re)).slice(re.length))).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.XSD_STRING],()=>(B,re)=>{const[Se,Fe]=[B.typedValue,re.typedValue],Ae=Se.slice(Se.indexOf(Fe)).slice(Fe.length);return Ae||!Fe?(0,_.langString)(Ae,B.language):(0,_.string)(Ae)}).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.RDF_LANG_STRING],()=>(B,re)=>{if(B.language!==re.language)throw new f.IncompatibleLanguageOperation(B,re);const[Se,Fe]=[B.typedValue,re.typedValue],Ae=Se.slice(Se.indexOf(Fe)).slice(Fe.length);return Ae||!Fe?(0,_.langString)(Ae,B.language):(0,_.string)(Ae)}).collect()},G={arity:1,overloads:(0,_.declare)(c.RegularOperator.ENCODE_FOR_URI).onStringly1Typed(()=>B=>(0,_.string)(encodeURI(B))).collect()},Y={arity:2,overloads:(0,_.declare)(c.RegularOperator.LANG_MATCHES).onBinaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>(B,re)=>(0,_.bool)(E.langMatches(B,re))).collect()},ee=()=>(B,re)=>(0,_.bool)(E.matches(B,re)),ae=()=>(B,re,Se)=>(0,_.bool)(E.matches(B,re,Se)),ve={arity:[2,3],overloads:(0,_.declare)(c.RegularOperator.REGEX).onBinaryTyped([l.TypeAlias.SPARQL_STRINGLY,l.TypeURL.XSD_STRING],ee).onTernaryTyped([l.TypeAlias.SPARQL_STRINGLY,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],ae).collect()},me={arity:[3,4],overloads:(0,_.declare)(c.RegularOperator.REPLACE).onTernaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>(B,re,Se)=>(0,_.string)(E.replace(B,re,Se))).set([l.TypeURL.RDF_LANG_STRING,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>([B,re,Se])=>{const Fe=E.replace(B.typedValue,re.typedValue,Se.typedValue);return(0,_.langString)(Fe,B.language)}).onQuaternaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>(B,re,Se,Fe)=>(0,_.string)(E.replace(B,re,Se,Fe))).set([l.TypeURL.RDF_LANG_STRING,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>([B,re,Se,Fe])=>{const Ae=E.replace(B.typedValue,re.typedValue,Se.typedValue,Fe.typedValue);return(0,_.langString)(Ae,B.language)}).collect()},Ee={arity:1,overloads:(0,_.declare)(c.RegularOperator.ABS).numericConverter(()=>B=>Math.abs(B)).collect()},k={arity:1,overloads:(0,_.declare)(c.RegularOperator.ROUND).numericConverter(()=>B=>Math.round(B)).collect()},W={arity:1,overloads:(0,_.declare)(c.RegularOperator.CEIL).numericConverter(()=>B=>Math.ceil(B)).collect()},M={arity:1,overloads:(0,_.declare)(c.RegularOperator.FLOOR).numericConverter(()=>B=>Math.floor(B)).collect()},S={arity:0,overloads:(0,_.declare)(c.RegularOperator.RAND).set([],()=>()=>(0,_.double)(Math.random())).collect()},R={arity:0,overloads:(0,_.declare)(c.RegularOperator.NOW).set([],B=>()=>new o.DateTimeLiteral((0,d.toDateTimeRepresentation)({date:B.now,timeZone:B.defaultTimeZone}))).collect()},z={arity:1,overloads:(0,_.declare)(c.RegularOperator.YEAR).onDateTime1(()=>B=>(0,_.integer)(B.typedValue.year)).set([l.TypeURL.XSD_DATE],()=>([B])=>(0,_.integer)(B.typedValue.year)).collect()},ue={arity:1,overloads:(0,_.declare)(c.RegularOperator.MONTH).onDateTime1(()=>B=>(0,_.integer)(B.typedValue.month)).set([l.TypeURL.XSD_DATE],()=>([B])=>(0,_.integer)(B.typedValue.month)).collect()},ge={arity:1,overloads:(0,_.declare)(c.RegularOperator.DAY).onDateTime1(()=>B=>(0,_.integer)(B.typedValue.day)).set([l.TypeURL.XSD_DATE],()=>([B])=>(0,_.integer)(B.typedValue.day)).collect()},we={arity:1,overloads:(0,_.declare)(c.RegularOperator.HOURS).onDateTime1(()=>B=>(0,_.integer)(B.typedValue.hours)).set([l.TypeURL.XSD_TIME],()=>([B])=>(0,_.integer)(B.typedValue.hours)).collect()},Me={arity:1,overloads:(0,_.declare)(c.RegularOperator.MINUTES).onDateTime1(()=>B=>(0,_.integer)(B.typedValue.minutes)).set([l.TypeURL.XSD_TIME],()=>([B])=>(0,_.integer)(B.typedValue.minutes)).collect()},Ue={arity:1,overloads:(0,_.declare)(c.RegularOperator.SECONDS).onDateTime1(()=>B=>(0,_.decimal)(B.typedValue.seconds)).set([l.TypeURL.XSD_TIME],()=>([B])=>(0,_.integer)(B.typedValue.seconds)).collect()},Ge={arity:1,overloads:(0,_.declare)(c.RegularOperator.TIMEZONE).onDateTime1(()=>B=>{const re={hours:B.typedValue.zoneHours,minutes:B.typedValue.zoneMinutes};if(re.hours===void 0&&re.minutes===void 0)throw new f.InvalidTimezoneCall(B.str());return new o.DayTimeDurationLiteral(re)}).copy({from:[l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_DATE]}).copy({from:[l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_TIME]}).collect()},We={arity:1,overloads:(0,_.declare)(c.RegularOperator.TZ).onDateTime1(()=>B=>(0,_.string)((0,d.extractRawTimeZone)(B.str()))).copy({from:[l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_DATE]}).copy({from:[l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_TIME]}).collect()},lt={arity:1,overloads:(0,_.declare)(c.RegularOperator.MD5).onString1Typed(()=>B=>(0,_.string)((0,a.hash)(B))).collect()},Wr={arity:1,overloads:(0,_.declare)(c.RegularOperator.SHA1).onString1Typed(()=>B=>(0,_.string)((0,e.sha1)().update(B).digest("hex"))).collect()},br={arity:1,overloads:(0,_.declare)(c.RegularOperator.SHA256).onString1Typed(()=>B=>(0,_.string)((0,e.sha256)().update(B).digest("hex"))).collect()},Br={arity:1,overloads:(0,_.declare)(c.RegularOperator.SHA384).onString1Typed(()=>B=>(0,_.string)((0,e.sha384)().update(B).digest("hex"))).collect()},Qt={arity:1,overloads:(0,_.declare)(c.RegularOperator.SHA512).onString1Typed(()=>B=>(0,_.string)((0,e.sha512)().update(B).digest("hex"))).collect()},_r={arity:3,overloads:(0,_.declare)(c.RegularOperator.TRIPLE).onTerm3(B=>(...re)=>new o.Quad(O.quad(re[0].toRDF(),re[1].toRDF(),re[2].toRDF()),B.superTypeProvider)).collect()},Pr={arity:1,overloads:(0,_.declare)(c.RegularOperator.SUBJECT).onQuad1(()=>B=>B.subject).collect()},kr={arity:1,overloads:(0,_.declare)(c.RegularOperator.PREDICATE).onQuad1(()=>B=>B.predicate).collect()},Rn={arity:1,overloads:(0,_.declare)(c.RegularOperator.OBJECT).onQuad1(()=>B=>B.object).collect()},Tt={arity:1,overloads:(0,_.declare)(c.RegularOperator.IS_TRIPLE).onTerm1(()=>B=>(0,_.bool)(B.termType==="quad")).collect()};return _h.definitions={"!":A,uplus:T,uminus:I,"*":D,"/":U,"+":H,"-":N,"=":x,"!=":X,"<":ne,">":$,"<=":j,">=":Q,isiri:se,isuri:se,isblank:ie,isliteral:be,isnumeric:he,str:Te,lang:Ne,datatype:ye,iri:ce,uri:ce,strdt:Re,strlang:oe,uuid:J,struuid:le,strlen:pe,substr:L,ucase:P,lcase:g,strstarts:y,strends:v,contains:C,strbefore:V,strafter:q,encode_for_uri:G,langmatches:Y,regex:ve,replace:me,abs:Ee,round:k,ceil:W,floor:M,rand:S,now:R,year:z,month:ue,day:ge,hours:we,minutes:Me,seconds:Ue,timezone:Ge,tz:We,md5:lt,sha1:Wr,sha256:br,sha384:Br,sha512:Qt,triple:_r,subject:Pr,predicate:kr,object:Rn,istriple:Tt},_h}var mh={},X4;function k0e(){if(X4)return mh;X4=1,Object.defineProperty(mh,"__esModule",{value:!0}),mh.specialDefinitions=void 0;const t=YR,e=aa(),r=ni,n=Ke,a=eo(),s=jf(),o={arity:1,async applyAsync({args:U,mapping:H}){return u({args:U,mapping:H})},applySynchronously({args:U,mapping:H}){return u({args:U,mapping:H})}};function u({args:U,mapping:H}){const N=U[0];if(N.expressionType!==e.ExpressionType.Variable)throw new n.InvalidArgumentTypes(U,r.SpecialOperator.BOUND);const x=H.has((0,a.expressionToVar)(N));return(0,a.bool)(x)}const c={arity:3,async applyAsync({args:U,mapping:H,evaluate:N}){const F=(await N(U[0],H)).coerceEBV();return N(F?U[1]:U[2],H)},applySynchronously({args:U,mapping:H,evaluate:N}){const F=N(U[0],H).coerceEBV();return N(F?U[1]:U[2],H)}},l={arity:Number.POSITIVE_INFINITY,async applyAsync({args:U,mapping:H,evaluate:N}){const x=[];for(const F of U)try{return await N(F,H)}catch(X){x.push(X)}throw new n.CoalesceError(x)},applySynchronously({args:U,mapping:H,evaluate:N}){const x=[];for(const F of U)try{return N(F,H)}catch(X){x.push(X)}throw new n.CoalesceError(x)}},d={arity:2,async applyAsync({args:U,mapping:H,evaluate:N}){const[x,F]=U;try{if((await N(x,H)).coerceEBV())return(0,a.bool)(!0);const j=(await N(F,H)).coerceEBV();return(0,a.bool)(j)}catch(X){if(!(await N(F,H)).coerceEBV())throw X;return(0,a.bool)(!0)}},applySynchronously({args:U,mapping:H,evaluate:N}){const[x,F]=U;try{if(N(x,H).coerceEBV())return(0,a.bool)(!0);const j=N(F,H).coerceEBV();return(0,a.bool)(j)}catch(X){if(!N(F,H).coerceEBV())throw X;return(0,a.bool)(!0)}}},f={arity:2,async applyAsync({args:U,mapping:H,evaluate:N}){const[x,F]=U;try{if(!(await N(x,H)).coerceEBV())return(0,a.bool)(!1);const j=(await N(F,H)).coerceEBV();return(0,a.bool)(j)}catch(X){if((await N(F,H)).coerceEBV())throw X;return(0,a.bool)(!1)}},applySynchronously({args:U,mapping:H,evaluate:N}){const[x,F]=U;try{if(!N(x,H).coerceEBV())return(0,a.bool)(!1);const j=N(F,H).coerceEBV();return(0,a.bool)(j)}catch(X){if(N(F,H).coerceEBV())throw X;return(0,a.bool)(!1)}}},h={arity:2,async applyAsync({args:U,mapping:H,evaluate:N}){const[x,F]=U.map($=>N($,H)),[X,ne]=await Promise.all([x,F]);return(0,a.bool)(X.toRDF().equals(ne.toRDF()))},applySynchronously({args:U,mapping:H,evaluate:N}){const[x,F]=U.map(X=>N(X,H));return(0,a.bool)(x.toRDF().equals(F.toRDF()))}},p={arity:Number.POSITIVE_INFINITY,checkArity(U){return U.length>0},async applyAsync(U){const{args:H,mapping:N,evaluate:x}=U,[F,...X]=H,ne=await x(F,N);return b(ne,{...U,args:X},[])},applySynchronously(U){const{args:H,mapping:N,evaluate:x}=U,[F,...X]=H,ne=x(F,N);return _(ne,{...U,args:X},[])}};async function b(U,H,N){const{args:x,mapping:F,evaluate:X}=H;if(x.length===0)return N.every($=>!$)?(0,a.bool)(!1):Promise.reject(new n.InError(N));try{const ne=x.shift(),$=await X(ne,F);return s.regularFunctions[r.RegularOperator.EQUAL].apply([U,$],H).typedValue?(0,a.bool)(!0):b(U,H,[...N,!1])}catch(ne){return b(U,H,[...N,ne])}}function _(U,H,N){const{args:x,mapping:F,evaluate:X}=H;if(x.length===0){if(N.every($=>!$))return(0,a.bool)(!1);throw new n.InError(N)}try{const ne=x.shift(),$=X(ne,F);return s.regularFunctions[r.RegularOperator.EQUAL].apply([U,$],H).typedValue?(0,a.bool)(!0):_(U,H,[...N,!1])}catch(ne){return _(U,H,[...N,ne])}}const E={arity:Number.POSITIVE_INFINITY,checkArity(U){return U.length>0},async applyAsync(U){const N=await s.specialFunctions[r.SpecialOperator.IN].applyAsync(U);return(0,a.bool)(!N.typedValue)},applySynchronously(U){const N=s.specialFunctions[r.SpecialOperator.IN].applySynchronously(U);return(0,a.bool)(!N.typedValue)}},w=(0,a.declare)(r.SpecialOperator.CONCAT).onStringly1(()=>U=>U).collect(),O={arity:Number.POSITIVE_INFINITY,async applyAsync(U){const{args:H,mapping:N,evaluate:x,functionArgumentsCache:F,superTypeProvider:X}=U,ne=H.map(async ie=>x(ie,N)).map(async ie=>{const be=w.search([await ie],X,F);if(!be)throw new n.InvalidArgumentTypes(H,r.SpecialOperator.CONCAT);return be(U)([await ie])}),$=await Promise.all(ne),Q=$.map(ie=>ie.typedValue).join(""),se=A($)?$[0].language:void 0;return se?(0,a.langString)(Q,se):(0,a.string)(Q)},applySynchronously(U){const{args:H,mapping:N,evaluate:x,superTypeProvider:F,functionArgumentsCache:X}=U,ne=H.map(se=>x(se,N)).map(se=>{const ie=w.search([se],F,X);if(!ie)throw new n.InvalidArgumentTypes(H,r.SpecialOperator.CONCAT);return ie(U)([se])}),j=ne.map(se=>se.typedValue).join(""),Q=A(ne)?ne[0].language:void 0;return Q?(0,a.langString)(j,Q):(0,a.string)(j)}};function A(U){return U.length>0&&U.every(H=>H.language===U[0].language)}const T=(0,a.declare)(r.SpecialOperator.BNODE).onString1(()=>U=>U).collect(),I={arity:Number.POSITIVE_INFINITY,checkArity(U){return U.length===0||U.length===1},async applyAsync(U){const{args:H,mapping:N,evaluate:x,superTypeProvider:F,functionArgumentsCache:X}=U,ne=H.length===1?await x(H[0],N):void 0;let $;if(ne){const j=T.search([ne],F,X);if(!j)throw new n.InvalidArgumentTypes(H,r.SpecialOperator.BNODE);$=j(U)([ne]).str()}if(U.bnode){const j=await U.bnode($);return new e.BlankNode(j)}return D($)},applySynchronously(U){const{args:H,mapping:N,evaluate:x,superTypeProvider:F,functionArgumentsCache:X}=U,ne=H.length===1?x(H[0],N):void 0;let $;if(ne){const j=T.search([ne],F,X);if(!j)throw new n.InvalidArgumentTypes(H,r.SpecialOperator.BNODE);$=j(U)([ne]).str()}if(U.bnode){const j=U.bnode($);return new e.BlankNode(j)}return D($)}};function D(U){return new e.BlankNode(U||t.v4())}return mh.specialDefinitions={bound:o,if:c,coalesce:l,"&&":f,"||":d,sameterm:h,in:p,notin:E,concat:O,bnode:I},mh}var K4;function jf(){return K4||(K4=1,function(t){var e=m&&m.__createBinding||(Object.create?function(c,l,d,f){f===void 0&&(f=d);var h=Object.getOwnPropertyDescriptor(l,d);(!h||("get"in h?!l.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return l[d]}}),Object.defineProperty(c,f,h)}:function(c,l,d,f){f===void 0&&(f=d),c[f]=l[d]}),r=m&&m.__exportStar||function(c,l){for(var d in c)d!=="default"&&!Object.prototype.hasOwnProperty.call(l,d)&&e(l,c,d)};Object.defineProperty(t,"__esModule",{value:!0}),t.OverloadTree=t.namedFunctions=t.specialFunctions=t.regularFunctions=void 0;const n=va,a=tw,s=H0e(),o=k0e();r(va,t),t.regularFunctions=Object.fromEntries(Object.entries(s.definitions).map(([c,l])=>[c,new n.RegularFunction(c,l)])),t.specialFunctions=Object.fromEntries(Object.entries(o.specialDefinitions).map(([c,l])=>[c,new n.SpecialFunction(c,l)])),t.namedFunctions=Object.fromEntries(Object.entries(a.namedDefinitions).map(([c,l])=>[c,new n.NamedFunction(c,l)]));var u=DL();Object.defineProperty(t,"OverloadTree",{enumerable:!0,get:function(){return u.OverloadTree}})}(TT)),TT}Object.defineProperty(X0,"__esModule",{value:!0});X0.AlgebraTransformer=void 0;const Q0e=xt,cu=aa(),xT=jf(),IT=ni,v1=Ke,J4=Ke,G0e=Rl();class bd extends G0e.TermTransformer{constructor(e){super(e.superTypeProvider),this.algebraConfig=e,this.creatorConfig={type:e.type,creator:e.creator}}transformAlgebra(e){const r=Q0e.Algebra.expressionTypes;switch(e.expressionType){case r.TERM:return this.transformTerm(e);case r.OPERATOR:return this.transformOperator(e);case r.NAMED:return this.transformNamed(e);case r.EXISTENCE:return bd.transformExistence(e);case r.AGGREGATE:return bd.transformAggregate(e);case r.WILDCARD:return bd.transformWildcard(e)}}static transformWildcard(e){return new cu.NamedNode(e.wildcard.value)}transformOperator(e){const r=e.operator.toLowerCase();if(IT.SpecialOperators.has(r)){const o=r,u=e.args.map(l=>this.transformAlgebra(l)),c=xT.specialFunctions[o];if(!c.checkArity(u))throw new v1.InvalidArity(u,o);return new cu.SpecialOperator(u,c.applyAsync,c.applySynchronously)}if(!IT.Operators.has(r))throw new v1.UnknownOperator(e.operator);const n=r,a=e.args.map(o=>this.transformAlgebra(o)),s=xT.regularFunctions[n];if(!bd.hasCorrectArity(a,s.arity))throw new v1.InvalidArity(a,n);return new cu.Operator(a,o=>s.apply(o,this.algebraConfig))}wrapSyncFunction(e,r){return n=>{try{const a=e(n.map(s=>s.toRDF()));return this.transformRDFTermUnsafe(a)}catch(a){throw new J4.ExtensionFunctionError(r,a)}}}wrapAsyncFunction(e,r){return async n=>{try{const a=await e(n.map(s=>s.toRDF()));return this.transformRDFTermUnsafe(a)}catch(a){throw new J4.ExtensionFunctionError(r,a)}}}transformNamed(e){const r=e.name.value,n=e.args.map(a=>this.transformAlgebra(a));if(IT.NamedOperators.has(r)){const a=e.name.value,s=xT.namedFunctions[a];return new cu.Named(e.name,n,o=>s.apply(o,this.algebraConfig))}if(this.creatorConfig.type==="sync"){const a=this.creatorConfig.creator(e.name);if(a){const s=this.wrapSyncFunction(a,e.name.value);return new cu.SyncExtension(e.name,n,s)}}else{const a=this.creatorConfig.creator(e.name);if(a){const s=this.wrapAsyncFunction(a,e.name.value);return new cu.AsyncExtension(e.name,n,s)}}throw new v1.UnknownNamedOperator(e.name.value)}static hasCorrectArity(e,r){return Array.isArray(r)?r.includes(e.length):e.length===r}static transformAggregate(e){const r=e.aggregator;return new cu.Aggregate(r,e)}static transformExistence(e){return new cu.Existence(e)}}X0.AlgebraTransformer=bd;var yw={},J0={};Object.defineProperty(J0,"__esModule",{value:!0});J0.BaseExpressionEvaluator=void 0;const z0e=eo(),W0e=Ke;class X0e{constructor(e){this.termTransformer=e}term(e,r){return e}variable(e,r){const n=r.get((0,z0e.expressionToVar)(e));if(!n)throw new W0e.UnboundVariableError(e.name,r);return this.termTransformer.transformRDFTermUnsafe(n)}}J0.BaseExpressionEvaluator=X0e;Object.defineProperty(yw,"__esModule",{value:!0});yw.AsyncRecursiveEvaluator=void 0;const po=aa(),K0e=Rl(),PT=Ke,J0e=J0;class Y0e extends J0e.BaseExpressionEvaluator{constructor(e,r){super(r||new K0e.TermTransformer(e.superTypeProvider)),this.context=e,this.subEvaluators={[po.ExpressionType.Term]:this.term.bind(this),[po.ExpressionType.Variable]:this.variable.bind(this),[po.ExpressionType.Operator]:this.evalOperator.bind(this),[po.ExpressionType.SpecialOperator]:this.evalSpecialOperator.bind(this),[po.ExpressionType.Named]:this.evalNamed.bind(this),[po.ExpressionType.Existence]:this.evalExistence.bind(this),[po.ExpressionType.Aggregate]:this.evalAggregate.bind(this),[po.ExpressionType.AsyncExtension]:this.evalAsyncExtension.bind(this)}}async evaluate(e,r){const n=this.subEvaluators[e.expressionType];if(!n)throw new PT.InvalidExpressionType(e);return n.bind(this)(e,r)}async evalOperator(e,r){const n=e.args.map(s=>this.evaluate(s,r)),a=await Promise.all(n);return e.apply(a)}async evalSpecialOperator(e,r){const n=this.evaluate.bind(this),a={args:e.args,mapping:r,superTypeProvider:this.context.superTypeProvider,now:this.context.now,baseIRI:this.context.baseIRI,functionArgumentsCache:this.context.functionArgumentsCache,evaluate:n,bnode:this.context.bnode,defaultTimeZone:this.context.defaultTimeZone};return e.applyAsync(a)}async _evalAsyncArgs(e,r){const n=e.map(a=>this.evaluate(a,r));return await Promise.all(n)}async evalNamed(e,r){return e.apply(await this._evalAsyncArgs(e.args,r))}async evalAsyncExtension(e,r){return await e.apply(await this._evalAsyncArgs(e.args,r))}async evalExistence(e,r){if(!this.context.exists)throw new PT.NoExistenceHook;return new po.BooleanLiteral(await this.context.exists(e.expression,r))}async evalAggregate(e,r){if(!this.context.aggregate)throw new PT.NoAggregator;return this.termTransformer.transformRDFTermUnsafe(await this.context.aggregate(e.expression))}}yw.AsyncRecursiveEvaluator=Y0e;Object.defineProperty(W0,"__esModule",{value:!0});W0.AsyncEvaluator=void 0;const Z0e=Pa,eye=X0,tye=jt,rye=yw;class ZR{static completeContext(e){const r=e.now||new Date(Date.now());return{now:r,baseIRI:e.baseIRI||void 0,functionArgumentsCache:e.functionArgumentsCache||{},superTypeProvider:{cache:e.typeCache||new Z0e.LRUCache({max:1e3}),discoverer:e.getSuperType||(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,defaultTimeZone:e.defaultTimeZone||(0,tye.extractTimeZone)(r)}}constructor(e,r={}){this.algExpr=e;const n=r.extensionFunctionCreator||(()=>{}),a=ZR.completeContext(r),s=new eye.AlgebraTransformer({type:"async",creator:n,...a});this.expr=s.transformAlgebra(e),this.evaluator=new rye.AsyncRecursiveEvaluator(a,s)}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)}}W0.AsyncEvaluator=ZR;var Y0={},bw={};Object.defineProperty(bw,"__esModule",{value:!0});bw.SyncRecursiveEvaluator=void 0;const yo=aa(),nye=Rl(),DT=Ke,iye=J0;class aye extends iye.BaseExpressionEvaluator{constructor(e,r){super(r||new nye.TermTransformer(e.superTypeProvider)),this.context=e,this.subEvaluators={[yo.ExpressionType.Term]:this.term.bind(this),[yo.ExpressionType.Variable]:this.variable.bind(this),[yo.ExpressionType.Operator]:this.evalOperator.bind(this),[yo.ExpressionType.SpecialOperator]:this.evalSpecialOperator.bind(this),[yo.ExpressionType.Named]:this.evalNamed.bind(this),[yo.ExpressionType.Existence]:this.evalExistence.bind(this),[yo.ExpressionType.Aggregate]:this.evalAggregate.bind(this),[yo.ExpressionType.SyncExtension]:this.evalSyncExtension.bind(this)}}evaluate(e,r){const n=this.subEvaluators[e.expressionType];if(!n)throw new DT.InvalidExpressionType(e);return n.bind(this)(e,r)}evalOperator(e,r){const n=e.args.map(a=>this.evaluate(a,r));return e.apply(n)}evalSpecialOperator(e,r){const n=this.evaluate.bind(this),a={args:e.args,mapping:r,superTypeProvider:this.context.superTypeProvider,now:this.context.now,baseIRI:this.context.baseIRI,functionArgumentsCache:this.context.functionArgumentsCache,evaluate:n,bnode:this.context.bnode,defaultTimeZone:this.context.defaultTimeZone};return e.applySynchronously(a)}evalNamed(e,r){const n=e.args.map(a=>this.evaluate(a,r));return e.apply(n)}evalSyncExtension(e,r){const n=e.args.map(a=>this.evaluate(a,r));return e.apply(n)}evalExistence(e,r){if(!this.context.exists)throw new DT.NoExistenceHook;return new yo.BooleanLiteral(this.context.exists(e.expression,r))}evalAggregate(e,r){if(!this.context.aggregate)throw new DT.NoAggregator;return this.termTransformer.transformRDFTermUnsafe(this.context.aggregate(e.expression))}}bw.SyncRecursiveEvaluator=aye;Object.defineProperty(Y0,"__esModule",{value:!0});Y0.SyncEvaluator=void 0;const sye=Pa,oye=X0,uye=jt,cye=bw;class ex{static completeContext(e){const r=e.now||new Date(Date.now());return{now:r,baseIRI:e.baseIRI||void 0,functionArgumentsCache:e.functionArgumentsCache||{},superTypeProvider:{cache:e.typeCache||new sye.LRUCache({max:1e3}),discoverer:e.getSuperType||(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,defaultTimeZone:e.defaultTimeZone||(0,uye.extractTimeZone)(r)}}constructor(e,r={}){this.algExpr=e,this.context=r;const n=r.extensionFunctionCreator||(()=>{}),a=ex.completeContext(r),s=new oye.AlgebraTransformer({type:"sync",creator:n,...a});this.expr=s.transformAlgebra(e),this.evaluator=new cye.SyncRecursiveEvaluator(a,s)}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)}}Y0.SyncEvaluator=ex;var _w={},Z0={},gw={},mw={},sa={};Object.defineProperty(sa,"__esModule",{value:!0});sa.Aggregator=sa.AggregatorComponent=void 0;const Y4=nr,lye=Rl(),dye=ni,fye=z2();class hye{static emptyValue(){}constructor(e,r){this.sharedContext=r,this.separator=e.separator||" ",this.termTransformer=new lye.TermTransformer(r.superTypeProvider)}termToNumericOrError(e){if(e.termType!=="Literal")throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a numeric literal`);if(!(0,fye.isSubTypeOf)(e.datatype.value,dye.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)}}sa.AggregatorComponent=hye;class pye{constructor(e,r){this.aggregatorComponent=r,this.variableValues=new Map,this.distinct=e.distinct}static emptyValue(e){return e.emptyValue()}result(){return this.aggregatorComponent.result()}put(e,r=""){this.canSkip(e,r)||(this.aggregatorComponent.put(e),this.addSeen(e,r))}canSkip(e,r){const n=this.variableValues.get(r);return this.distinct&&n!==void 0&&n.has(Y4.termToString(e))}addSeen(e,r){this.distinct&&(this.variableValues.has(r)||this.variableValues.set(r,new Set),this.variableValues.get(r).add(Y4.termToString(e)))}}sa.Aggregator=pye;Object.defineProperty(mw,"__esModule",{value:!0});mw.Average=void 0;const yye=aa(),Z4=jf(),bye=eo(),e6=ni,_ye=sa;class tx extends _ye.AggregatorComponent{constructor(){super(...arguments),this.summer=Z4.regularFunctions[e6.RegularOperator.ADDITION],this.divider=Z4.regularFunctions[e6.RegularOperator.DIVISION],this.state=void 0}static emptyValue(){return(0,bye.integer)(0).toRDF()}put(e){if(this.state===void 0){const r=this.termToNumericOrError(e);this.state={sum:r,count:1}}else{const r=this.termToNumericOrError(e);this.state.sum=this.summer.apply([this.state.sum,r],this.sharedContext),this.state.count++}}result(){if(this.state===void 0)return tx.emptyValue();const e=new yye.IntegerLiteral(this.state.count);return this.divider.apply([this.state.sum,e],this.sharedContext).toRDF()}}mw.Average=tx;var vw={};Object.defineProperty(vw,"__esModule",{value:!0});vw.Count=void 0;const t6=eo(),gye=sa;class rx extends gye.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}static emptyValue(){return(0,t6.integer)(0).toRDF()}put(e){this.state===void 0&&(this.state=0),this.state++}result(){return this.state===void 0?rx.emptyValue():(0,t6.integer)(this.state).toRDF()}}vw.Count=rx;var ww={};Object.defineProperty(ww,"__esModule",{value:!0});ww.GroupConcat=void 0;const r6=eo(),mye=sa;class nx extends mye.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}static emptyValue(){return(0,r6.string)("").toRDF()}put(e){this.state===void 0?this.state=e.value:this.state+=this.separator+e.value}result(){return this.state===void 0?nx.emptyValue():(0,r6.string)(this.state).toRDF()}}ww.GroupConcat=nx;var Sw={};Object.defineProperty(Sw,"__esModule",{value:!0});Sw.Max=void 0;const vye=pw(),wye=sa;class ix extends wye.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){if(e.termType!=="Literal")throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a literal`);this.state===void 0?this.state=e:(0,vye.orderTypes)(this.state,e)===-1&&(this.state=e)}result(){return this.state===void 0?ix.emptyValue():this.state}}Sw.Max=ix;var Tw={};Object.defineProperty(Tw,"__esModule",{value:!0});Tw.Min=void 0;const Sye=pw(),Tye=sa;class ax extends Tye.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){if(e.termType!=="Literal")throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a literal`);this.state===void 0?this.state=e:(0,Sye.orderTypes)(this.state,e)===1&&(this.state=e)}result(){return this.state===void 0?ax.emptyValue():this.state}}Tw.Min=ax;var Ew={};Object.defineProperty(Ew,"__esModule",{value:!0});Ew.Sample=void 0;const Eye=sa;class sx extends Eye.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){this.state===void 0&&(this.state=e)}result(){return this.state===void 0?sx.emptyValue():this.state}}Ew.Sample=sx;var Ow={};Object.defineProperty(Ow,"__esModule",{value:!0});Ow.Sum=void 0;const Oye=jf(),Aye=eo(),Rye=ni,xye=sa;class ox extends xye.AggregatorComponent{constructor(){super(...arguments),this.state=void 0,this.summer=Oye.regularFunctions[Rye.RegularOperator.ADDITION]}static emptyValue(){return(0,Aye.integer)(0).toRDF()}put(e){if(this.state===void 0)this.state=this.termToNumericOrError(e);else{const r=this.termToNumericOrError(e);this.state=this.summer.apply([this.state,r],this.sharedContext)}}result(){return this.state===void 0?ox.emptyValue():this.state.toRDF()}}Ow.Sum=ox;Object.defineProperty(gw,"__esModule",{value:!0});gw.aggregators=void 0;const Iye=mw,Pye=vw,Dye=ww,Nye=Sw,Cye=Tw,jye=Ew,Mye=Ow;gw.aggregators={count:Pye.Count,sum:Mye.Sum,min:Cye.Min,max:Nye.Max,avg:Iye.Average,group_concat:Dye.GroupConcat,sample:jye.Sample};var Aw={};Object.defineProperty(Aw,"__esModule",{value:!0});Aw.WildcardCountAggregator=void 0;const Fye=nr,n6=eo();class Lye{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,n6.integer)(0).toRDF()}result(){return(0,n6.integer)(this.counter).toRDF()}handleDistinct(e){if(this.distinct){const r=[...e];r.sort((u,c)=>u[0].value.localeCompare(c[0].value));const n=r.map(([u])=>u.value).join(","),a=r.map(([,u])=>Fye.termToString(u)).join(","),s=this.bindingValues.get(n),o=s!==void 0&&s.has(a);return s||this.bindingValues.set(n,new Set),this.bindingValues.get(n).add(a),o}return!1}}Aw.WildcardCountAggregator=Lye;Object.defineProperty(Z0,"__esModule",{value:!0});Z0.BaseAggregateEvaluator=void 0;const i6=xt,a6=gw,s6=sa,o6=Aw,Bye=Ke;class $ye{constructor(e,r,n){this.throwError=!1,this.isWildcard=!1,this.errorOccurred=!1,this.expression=e,this.aggregator=new s6.Aggregator(e,new a6.aggregators[e.aggregator](e,r)),this.throwError=n||!1,this.isWildcard=e.expression.expressionType===i6.Algebra.expressionTypes.WILDCARD,this.isWildcard&&(this.wildcardAggregator=new o6.WildcardCountAggregator(e))}static emptyValue(e,r=!1){let n;if(e.expression.expressionType===i6.Algebra.expressionTypes.WILDCARD?n=o6.WildcardCountAggregator.emptyValue():n=s6.Aggregator.emptyValue(a6.aggregators[e.aggregator]),n===void 0&&r)throw new Bye.EmptyAggregateError;return n}result(){if(!this.errorOccurred)return this.isWildcard?this.wildcardAggregator.result():this.aggregator.result()}}Z0.BaseAggregateEvaluator=$ye;Object.defineProperty(_w,"__esModule",{value:!0});_w.AggregateEvaluator=void 0;const Uye=Z0,u6=Y0;class qye extends Uye.BaseAggregateEvaluator{constructor(e,r,n){super(e,u6.SyncEvaluator.completeContext(r||{}),n),this.evaluator=new u6.SyncEvaluator(e.expression,r)}put(e){if(!this.errorOccurred)if(this.isWildcard)this.wildcardAggregator.putBindings(e);else try{const r=this.evaluator.evaluate(e);this.aggregator.put(r)}catch(r){this.safeThrow(r)}}safeThrow(e){if(this.throwError)throw e;this.errorOccurred=!0}}_w.AggregateEvaluator=qye;var Rw={};Object.defineProperty(Rw,"__esModule",{value:!0});Rw.AsyncAggregateEvaluator=void 0;const c6=W0,Vye=Z0;class Hye extends Vye.BaseAggregateEvaluator{constructor(e,r,n){super(e,c6.AsyncEvaluator.completeContext(r||{}),n),this.evaluator=new c6.AsyncEvaluator(e.expression,r),this.errorOccurred=!1}async put(e){if(!this.errorOccurred)if(this.isWildcard)this.wildcardAggregator.putBindings(e);else try{const r=await this.evaluator.evaluate(e);if(!r||this.errorOccurred)return;this.aggregator.put(r)}catch(r){this.safeThrow(r)}}safeThrow(e){if(this.throwError)throw e;this.errorOccurred=!0}}Rw.AsyncAggregateEvaluator=Hye;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAggregateEvaluator=t.orderTypes=t.isExpressionError=t.ExpressionError=t.AggregateEvaluator=t.SyncEvaluator=t.AsyncEvaluator=void 0;var e=W0;Object.defineProperty(t,"AsyncEvaluator",{enumerable:!0,get:function(){return e.AsyncEvaluator}});var r=Y0;Object.defineProperty(t,"SyncEvaluator",{enumerable:!0,get:function(){return r.SyncEvaluator}});var n=_w;Object.defineProperty(t,"AggregateEvaluator",{enumerable:!0,get:function(){return n.AggregateEvaluator}});var a=Ke;Object.defineProperty(t,"ExpressionError",{enumerable:!0,get:function(){return a.ExpressionError}}),Object.defineProperty(t,"isExpressionError",{enumerable:!0,get:function(){return a.isExpressionError}});var s=pw();Object.defineProperty(t,"orderTypes",{enumerable:!0,get:function(){return s.orderTypes}});var o=Rw;Object.defineProperty(t,"AsyncAggregateEvaluator",{enumerable:!0,get:function(){return o.AsyncAggregateEvaluator}})})(Al);Object.defineProperty(Q2,"__esModule",{value:!0});Q2.ActorQueryOperationFilterSparqlee=void 0;const kye=$n,vh=ct,NT=Al;class Qye extends vh.ActorQueryOperationTypedMediated{constructor(e){super(e,"filter")}async testOperation(e,r){const n={...vh.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation)};return new NT.AsyncEvaluator(e.expression,n),!0}async runOperation(e,r){const n=await this.mediatorQueryOperation.mediate({operation:e.input,context:r}),a=vh.ActorQueryOperation.getSafeBindings(n);vh.ActorQueryOperation.validateQueryOutput(a,"bindings");const s={...vh.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation)},o=new NT.AsyncEvaluator(e.expression,s),u=async(l,d,f)=>{try{await o.evaluateAsEBV(l)&&f(l)}catch(h){(0,NT.isExpressionError)(h)?this.logWarn(r,"Error occurred while filtering.",()=>({error:h,bindings:(0,kye.bindingsToString)(l)})):c.emit("error",h)}d()},c=a.bindingsStream.transform({transform:u,autoStart:!1});return{type:"bindings",bindingsStream:c,metadata:a.metadata}}}Q2.ActorQueryOperationFilterSparqlee=Qye;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Q2,t)})(SL);var GL={},xw={};Object.defineProperty(xw,"__esModule",{value:!0});xw.ActorQueryOperationFromQuad=void 0;const Gye=ct,xp=xt;class ur extends Gye.ActorQueryOperationTypedMediated{constructor(e){super(e,"from")}static copyOperation(e,r){const n={};for(const a of Object.keys(e))Array.isArray(e[a])&&a!=="template"?a==="variables"?n[a]=e[a]:n[a]=e[a].map(r):ur.ALGEBRA_TYPES.includes(e[a].type)?n[a]=r(e[a]):n[a]=e[a];return n}static applyOperationDefaultGraph(e,r){if(e.type==="bgp"&&e.patterns.length>0||e.type==="path"||e.type==="pattern"){if(e.type==="bgp")return ur.joinOperations(e.patterns.map(a=>{if(a.graph.termType!=="DefaultGraph")return ur.FACTORY.createBgp([a]);const s=r.map(o=>ur.FACTORY.createBgp([ur.FACTORY.createPattern(a.subject,a.predicate,a.object,o)]));return ur.unionOperations(s)}));if(e.graph.termType!=="DefaultGraph")return e;const n=r.map(a=>e.type==="path"?ur.FACTORY.createPath(e.subject,e.predicate,e.object,a):ur.FACTORY.createPattern(e.subject,e.predicate,e.object,a));return ur.unionOperations(n)}return ur.copyOperation(e,n=>this.applyOperationDefaultGraph(n,r))}static applyOperationNamedGraph(e,r,n){if(e.type==="bgp"&&e.patterns.length>0||e.type==="path"||e.type==="pattern"){const a=e.type==="bgp"?e.patterns[0].graph:e.graph;if(a.termType==="DefaultGraph")return{type:xp.Algebra.types.BGP,patterns:[]};if(a.termType==="Variable"){if(r.length===1){const o=r[0],u={};u[`?${a.value}`]=o;const c=ur.FACTORY.createValues([a],[u]);let l;return e.type==="bgp"?l=ur.FACTORY.createBgp(e.patterns.map(d=>ur.FACTORY.createPattern(d.subject,d.predicate,d.object,o))):e.type==="path"?l=ur.FACTORY.createPath(e.subject,e.predicate,e.object,o):l=ur.FACTORY.createPattern(e.subject,e.predicate,e.object,o),ur.FACTORY.createJoin([c,l])}return ur.unionOperations(r.map(o=>ur.applyOperationNamedGraph(e,[o],n)))}return[...r,...n].some(o=>o.equals(a))?e:{type:xp.Algebra.types.BGP,patterns:[]}}return ur.copyOperation(e,a=>this.applyOperationNamedGraph(a,r,n))}static joinOperations(e){if(e.length===1)return e[0];if(e.length>1)return ur.FACTORY.createJoin(e);throw new Error("A join can only be applied on at least one operation")}static unionOperations(e){if(e.length===1)return e[0];if(e.length>1)return ur.FACTORY.createUnion(e);throw new Error("A union can only be applied on at least one operation")}static createOperation(e){let r=e.input;return e.default.length>0&&(r=ur.applyOperationDefaultGraph(r,e.default)),(e.named.length>0||e.default.length>0)&&(r=ur.applyOperationNamedGraph(r,e.named,e.default)),r}async testOperation(e,r){return!0}async runOperation(e,r){const n=ur.createOperation(e);return this.mediatorQueryOperation.mediate({operation:n,context:r})}}xw.ActorQueryOperationFromQuad=ur;ur.FACTORY=new xp.Factory;ur.ALGEBRA_TYPES=Object.keys(xp.Algebra.types).map(t=>xp.Algebra.types[t]);(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(xw,t)})(GL);var zL={},Iw={};Object.defineProperty(Iw,"__esModule",{value:!0});Iw.ActorQueryOperationExtend=void 0;const zye=$n,w1=ct,CT=Al;class Wye extends w1.ActorQueryOperationTypedMediated{constructor(e){super(e,"extend")}async testOperation(e,r){return new CT.AsyncEvaluator(e.expression,w1.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation)),!0}async runOperation(e,r){const{expression:n,input:a,variable:s}=e,o=w1.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:a,context:r}));if((await o.metadata()).variables.some(f=>f.equals(s)))throw new Error(`Illegal binding to variable '${s.value}' that has already been bound`);const u={...w1.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation)},c=new CT.AsyncEvaluator(n,u),l=async(f,h,p)=>{try{const b=await c.evaluate(f),_=f.set(s,b);p(_)}catch(b){(0,CT.isExpressionError)(b)?(p(f),this.logWarn(r,`Expression error for extend operation (${b.message})with bindings '${(0,zye.bindingsToString)(f)}'`)):d.emit("error",b)}h()},d=o.bindingsStream.transform({autoStart:!1,transform:l});return{type:"bindings",bindingsStream:d,async metadata(){const f=await o.metadata();return{...f,variables:[...f.variables,s]}}}}}Iw.ActorQueryOperationExtend=Wye;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Iw,t)})(zL);var WL={},Pw={},Dw={};Object.defineProperty(Dw,"__esModule",{value:!0});Dw.GroupsState=void 0;const Xye=$n,l6=Al,Kye=ht,Jye=new Kye.DataFactory,Yye=new Xye.BindingsFactory;class Zye{constructor(e,r,n){this.hashFunction=e,this.pattern=r,this.sparqleeConfig=n,this.groups=new Map,this.groupsInitializer=new Map,this.groupVariables=new Set(this.pattern.variables.map(a=>a.value)),this.distinctHashes=r.aggregates.some(({distinct:a})=>a)?new Map:null,this.waitCounter=1,this.resultHasBeenCalled=!1}consumeBindings(e){const r=this.resultCheck();if(r)return r;this.waitCounter++;const n=e.filter((u,c)=>this.groupVariables.has(c.value)),a=this.hashBindings(n);let s=this.groupsInitializer.get(a),o;if(!s)s=(async()=>{const u={};if(await Promise.all(this.pattern.aggregates.map(async l=>{const d=l.variable.value;u[d]=new l6.AsyncAggregateEvaluator(l,this.sparqleeConfig),await u[d].put(e)})),this.distinctHashes){const l=this.hashBindings(e);this.distinctHashes.set(a,new Set([l]))}const c={aggregators:u,bindings:n};return this.groups.set(a,c),this.subtractWaitCounterAndCollect(),c})(),this.groupsInitializer.set(a,s),o=s;else{const u=s;o=(async()=>{const c=await u;await Promise.all(this.pattern.aggregates.map(async l=>{if(l.distinct){const f=this.hashBindings(e);if(this.distinctHashes.get(a).has(f))return;this.distinctHashes.get(a).add(f)}const d=l.variable.value;await c.aggregators[d].put(e)}))})().then(()=>{this.subtractWaitCounterAndCollect()})}return o}subtractWaitCounterAndCollect(){--this.waitCounter===0&&this.handleResultCollection()}handleResultCollection(){let e=[...this.groups].map(([r,n])=>{const{bindings:a,aggregators:s}=n;let o=a;for(const u in s){const c=s[u].result();c&&(o=o.set(Jye.variable(u),c))}return o});if(e.length===0&&this.groupVariables.size===0){const r=[];for(const n of this.pattern.aggregates){const a=n.variable,s=l6.AsyncAggregateEvaluator.emptyValue(n);s!==void 0&&r.push([a,s])}e=[Yye.bindings(r)]}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 r=new Promise(n=>{this.waitResolver=n});return this.subtractWaitCounterAndCollect(),r}hashBindings(e){return this.hashFunction(e)}}Dw.GroupsState=Zye;Object.defineProperty(Pw,"__esModule",{value:!0});Pw.ActorQueryOperationGroup=void 0;const S1=ct,e1e=Al,d6=Ut,t1e=Dw;class r1e extends S1.ActorQueryOperationTypedMediated{constructor(e){super(e,"group")}async testOperation(e,r){for(const n of e.aggregates)new e1e.AsyncEvaluator(n.expression,S1.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation));return!0}async runOperation(e,r){const{hashFunction:n}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:r}),{input:a,aggregates:s}=e,o=await this.mediatorQueryOperation.mediate({operation:a,context:r}),u=S1.ActorQueryOperation.getSafeBindings(o),c=[...e.variables,...s.map(f=>f.variable)],l=S1.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation);return{type:"bindings",bindingsStream:new d6.TransformIterator(()=>new Promise((f,h)=>{const p=new t1e.GroupsState(n,e,l);u.bindingsStream.on("end",async()=>{try{const b=new d6.ArrayIterator(await p.collectResults(),{autoStart:!1});f(b)}catch(b){h(b)}}),u.bindingsStream.on("error",h),u.bindingsStream.on("data",b=>{p.consumeBindings(b).catch(h)})}),{autoStart:!1}),metadata:async()=>({...await u.metadata(),variables:c})}}}Pw.ActorQueryOperationGroup=r1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Pw,t)})(WL);var XL={},Nw={};Object.defineProperty(Nw,"__esModule",{value:!0});Nw.ActorQueryOperationNop=void 0;const n1e=$n,i1e=ct,a1e=Hi,s1e=Ut,o1e=new n1e.BindingsFactory;class u1e extends i1e.ActorQueryOperationTypedMediated{constructor(e){super(e,"nop")}async testOperation(e,r){return!0}async runOperation(e,r){return{bindingsStream:new s1e.SingletonIterator(o1e.bindings()),metadata:()=>Promise.resolve({state:new a1e.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}Nw.ActorQueryOperationNop=u1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Nw,t)})(XL);var KL={},Cw={},jw={};Object.defineProperty(jw,"__esModule",{value:!0});jw.SortIterator=void 0;const c1e=Ut;class l1e extends c1e.TransformIterator{constructor(e,r,n){super(e,n);const a=n&&n.window;this.windowLength=Number.isFinite(a)&&a>0?a:Number.POSITIVE_INFINITY,this.sort=r,this.sorted=[]}_read(e,r){let n,{length:a}=this.sorted;for(;a!==this.windowLength&&(n=this.source.read(),n!==null);){let s=0,o=a-1,u,c;for(;s<=o;)u=Math.trunc((s+o)/2),c=this.sort(n,this.sorted[u]),c<0?s=u+1:c>0?o=u-1:(s=u,o=-1);this.sorted.splice(s,0,n),a++}a===this.windowLength&&this._push(this.sorted.pop()),r()}_flush(e){let{length:r}=this.sorted;for(;r--;)this._push(this.sorted.pop());e()}}jw.SortIterator=l1e;Object.defineProperty(Cw,"__esModule",{value:!0});Cw.ActorQueryOperationOrderBySparqlee=void 0;const T1=ct,E1=Al,f6=xt,d1e=jw;class f1e extends T1.ActorQueryOperationTypedMediated{constructor(e){super(e,"orderby"),this.window=e.window??Number.POSITIVE_INFINITY}async testOperation(e,r){for(let n of e.expressions)n=this.extractSortExpression(n),new E1.AsyncEvaluator(n,T1.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation));return!0}async runOperation(e,r){const n=await this.mediatorQueryOperation.mediate({operation:e.input,context:r}),a=T1.ActorQueryOperation.getSafeBindings(n),s={window:this.window},o={...T1.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation)};let{bindingsStream:u}=a;for(let c=e.expressions.length-1;c>=0;c--){let l=e.expressions[c];const d=this.isAscending(l);l=this.extractSortExpression(l);const f=new E1.AsyncEvaluator(l,o),h=async(_,E,w)=>{try{const O=await f.evaluate(_);w({bindings:_,result:O})}catch(O){(0,E1.isExpressionError)(O)||u.emit("error",O),w({bindings:_,result:void 0})}E()},p=u.transform({transform:h});u=new d1e.SortIterator(p,(_,E)=>{let w=(0,E1.orderTypes)(_.result,E.result);return d||(w*=-1),w},s).map(({bindings:_,result:E})=>_)}return{type:"bindings",bindingsStream:u,metadata:a.metadata}}extractSortExpression(e){const{expressionType:r,operator:n}=e;return r!==f6.Algebra.expressionTypes.OPERATOR?e:n==="desc"?e.args[0]:e}isAscending(e){const{expressionType:r,operator:n}=e;return r!==f6.Algebra.expressionTypes.OPERATOR?!0:n!=="desc"}}Cw.ActorQueryOperationOrderBySparqlee=f1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Cw,t)})(KL);var JL={},Mw={};Object.defineProperty(Mw,"__esModule",{value:!0});Mw.ActorQueryOperationProject=void 0;const h6=ct,h1e=S_,p1e=ht,y1e=new p1e.DataFactory;class b1e extends h6.ActorQueryOperationTypedMediated{constructor(e){super(e,"project")}async testOperation(e,r){return!0}async runOperation(e,r){const n=h6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:r})),a=await n.metadata(),s=e.variables,o=a.variables.filter(d=>!s.some(f=>d.value===f.value)),u=s.filter(d=>!a.variables.some(f=>d.value===f.value));if(u.length>0)throw new Error(`Variables '${u.map(d=>`?${d.value}`)}' are used in the projection result, but are not assigned.`);let c=o.length===0?n.bindingsStream:n.bindingsStream.transform({map(d){for(const f of o)d=d.delete(f);return d},autoStart:!1}),l=0;return c=c.transform({map(d){l++;const f=new Map;return d.map(h=>{if(h instanceof h1e.BlankNodeBindingsScoped){let p=f.get(h.value);return p||(p=y1e.blankNode(`${h.value}${l}`),f.set(h.value,p)),p}return h})},autoStart:!1}),{type:"bindings",bindingsStream:c,metadata:async()=>({...a,variables:s})}}}Mw.ActorQueryOperationProject=b1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Mw,t)})(JL);var YL={},Fw={};Object.defineProperty(Fw,"__esModule",{value:!0});Fw.ActorQueryOperationReducedHash=void 0;const p6=ct,_1e=Pa;class g1e extends p6.ActorQueryOperationTypedMediated{constructor(e){super(e,"reduced")}async testOperation(e,r){return!0}async runOperation(e,r){const n=p6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:r}));return{type:"bindings",bindingsStream:n.bindingsStream.filter(await this.newHashFilter(r)),metadata:n.metadata}}async newHashFilter(e){const{hashFunction:r}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:e}),n=new _1e.LRUCache({max:this.cacheSize});return a=>{const s=r(a);return n.has(s)?!1:(n.set(s,!0),!0)}}}Fw.ActorQueryOperationReducedHash=g1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Fw,t)})(YL);var ZL={},Lw={};Object.defineProperty(Lw,"__esModule",{value:!0});Lw.ActorQueryOperationService=void 0;const m1e=$n,y6=ct,O1=rr,v1e=Hi,w1e=Ut,S1e=new m1e.BindingsFactory;class T1e extends y6.ActorQueryOperationTypedMediated{constructor(e){super(e,"service")}async testOperation(e,r){if(e.name.termType!=="NamedNode")throw new Error(`${this.name} can only query services by IRI, while a ${e.name.termType} was given.`);return!0}async runOperation(e,r){const n=e.name.value;let a=r.delete(O1.KeysRdfResolveQuadPattern.source).delete(O1.KeysRdfResolveQuadPattern.sources).delete(O1.KeysInitQuery.queryString);const s=this.forceSparqlEndpoint?"sparql":void 0;a=a.set(O1.KeysRdfResolveQuadPattern.sources,[{type:s,value:n}]);let o;try{o=y6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:a}))}catch(u){if(e.silent)o={bindingsStream:new w1e.SingletonIterator(S1e.bindings()),type:"bindings",metadata:async()=>({state:new v1e.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})};else throw u}return o}}Lw.ActorQueryOperationService=T1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Lw,t)})(ZL);var eB={},Bw={};Object.defineProperty(Bw,"__esModule",{value:!0});Bw.ActorQueryOperationSlice=void 0;const E1e=ct,O1e=rr;class A1e extends E1e.ActorQueryOperationTypedMediated{constructor(e){super(e,"slice")}async testOperation(e,r){return!0}async runOperation(e,r){e.length&&(r=r.set(O1e.KeysQueryOperation.limitIndicator,e.length));const n=await this.mediatorQueryOperation.mediate({operation:e.input,context:r});if(n.type==="bindings")return{type:"bindings",bindingsStream:this.sliceStream(n.bindingsStream,e),metadata:this.sliceMetadata(n,e)};if(n.type==="quads")return{type:"quads",quadStream:this.sliceStream(n.quadStream,e),metadata:this.sliceMetadata(n,e)};throw new Error(`Invalid query output type: Expected 'bindings' or 'quads' but got '${n.type}'`)}sliceStream(e,r){const n=!!r.length||r.length===0,{start:a}=r,s=n?r.start+r.length-1:Number.POSITIVE_INFINITY;return e.transform({offset:a,limit:Math.max(s-a+1,0),autoStart:!1})}sliceMetadata(e,r){const n=!!r.length||r.length===0;return()=>e.metadata().then(a=>{const s={...a.cardinality};return Number.isFinite(s.value)&&(s.value=Math.max(0,s.value-r.start),n&&(s.value=Math.min(s.value,r.length))),{...a,cardinality:s}})}}Bw.ActorQueryOperationSlice=A1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Bw,t)})(eB);var tB={},$w={},Yo={},Uw={},ey={};Object.defineProperty(ey,"__esModule",{value:!0});ey.PathVariableObjectIterator=void 0;const R1e=ct,x1e=Ut,I1e=ht,P1e=nr,D1e=xt,N1e=new I1e.DataFactory,C1e=new D1e.Factory;class j1e extends x1e.BufferedIterator{constructor(e,r,n,a,s,o,u=16){super({autoStart:!0}),this.subject=e,this.predicate=r,this.graph=n,this.context=a,this.mediatorQueryOperation=s,this.maxRunningOperations=u,this.termHashes=new Map,this.runningOperations=[],this.pendingOperations=[],this._push(this.subject,o)}_end(e){for(const r of this.runningOperations)r.destroy();super._end(e)}_push(e,r=!0){let n;if(r&&(n=(0,P1e.termToString)(e),this.termHashes.has(n)))return;const a=N1e.variable("b");this.pendingOperations.push({variable:a,operation:C1e.createPath(e,this.predicate,a,this.graph)}),n&&(this.termHashes.set(n,e),super._push(e))}_read(e,r){const n=this;(async function(){for(;n.runningOperations.lengthn.destroy(l)),c.on("readable",()=>{n.readable=!0,n._fillBufferAsync()}),c.on("end",()=>{n.runningOperations.splice(n.runningOperations.indexOf(c),1),n.readable=!0,n._fillBufferAsync()})),n.setProperty("metadata",u.metadata)}let a=0,s;for(;a!==(a=e);)for(let o=0;o0;o++)(s=n.runningOperations[o].read())!==null&&(e--,n._push(s));n.runningOperations.length===0&&n.pendingOperations.length===0&&n.close()})().then(()=>{r()},a=>this.destroy(a))}}ey.PathVariableObjectIterator=j1e;Object.defineProperty(Uw,"__esModule",{value:!0});Uw.ActorAbstractPath=void 0;const M1e=$n,wh=ct,jT=rr,A1=Ut,F1e=ht,MT=nr,L1e=xt,B1e=ey,$1e=new F1e.DataFactory,FT=new M1e.BindingsFactory;class Es extends wh.ActorQueryOperationTypedMediated{constructor(e,r){super(e,"path"),this.predicateType=r}async testOperation(e,r){if(e.predicate.type!==this.predicateType)throw new Error(`This Actor only supports ${this.predicateType} Path operations.`);return!0}generateVariable(e,r){return r?e&&(e.subject.value===r||e.object.value===r)?this.generateVariable(e,`${r}b`):$1e.variable(r):this.generateVariable(e,"b")}async isPathArbitraryLengthDistinct(e,r){return e.get(jT.KeysQueryOperation.isPathArbitraryLengthDistinctKey)?(e=e.set(jT.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!1),{context:e,operation:void 0}):(e=e.set(jT.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!0),{context:e,operation:wh.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:Es.FACTORY.createDistinct(r),context:e}))})}async predicateStarGraphVariable(e,r,n,a,s){const o=this.generateVariable(Es.FACTORY.createPath(e,n,r,a)),u=Es.FACTORY.createUnion([Es.FACTORY.createPattern(e,o,r,a),Es.FACTORY.createPattern(r,o,e,a)]),c=wh.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:s,operation:u})),l=new Set;return{bindingsStream:new A1.MultiTransformIterator(c.bindingsStream,{multiTransform:f=>{const h=f.get(a);return l.has(h.value)?new A1.EmptyIterator:(l.add(h.value),new A1.TransformIterator(async()=>{const p=new A1.BufferedIterator;return await this.getObjectsPredicateStar(e,n,h,s,{},p,{count:0}),p.transform({transform(b,_,E){E(FT.bindings([[r,b],[a,h]])),_()}})},{maxBufferSize:128}))},autoStart:!1}),metadata:c.metadata}}async getObjectsPredicateStarEval(e,r,n,a,s,o){if(a.termType==="Variable")return this.predicateStarGraphVariable(e,n,r,a,s);const u=new B1e.PathVariableObjectIterator(e,r,a,s,this.mediatorQueryOperation,o);return{bindingsStream:u.transform({autoStart:!1,transform(l,d,f){f(FT.bindings([[n,l]])),d()}}),async metadata(){const l=await new Promise(d=>{u.getProperty("metadata",f=>d(f()))});return l.cardinality.value++,l}}}async getObjectsPredicateStar(e,r,n,a,s,o,u){const c=(0,MT.termToString)(e);if(s[c])return;o._push(e),s[c]=e,u.count++;const l=this.generateVariable(),d=Es.FACTORY.createPath(e,r,l,n),f=wh.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:d,context:a}));return f.bindingsStream.on("data",async h=>{const p=h.get(l);await this.getObjectsPredicateStar(p,r,n,a,s,o,u)}),f.bindingsStream.on("end",()=>{--u.count===0&&o.close()}),f.metadata}async getSubjectAndObjectBindingsPredicateStar(e,r,n,a,s,o,u,c,l,d,f){const h=(0,MT.termToString)(a)+(0,MT.termToString)(o);if(l[h])return;if(f.count++,l[h]=!0,d._push(FT.bindings([[e,n],[r,a]])),h in c){const b=await c[h];for(const _ of b)await this.getSubjectAndObjectBindingsPredicateStar(e,r,n,_,s,o,u,c,l,d,f);--f.count===0&&d.close();return}const p=new Promise(async(b,_)=>{const E=[],w=this.generateVariable(),O=Es.FACTORY.createPath(a,s,w,o),A=wh.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:O,context:u}));A.bindingsStream.on("data",async T=>{const I=T.get(w);E.push(I),await this.getSubjectAndObjectBindingsPredicateStar(e,r,n,I,s,o,u,c,l,d,f)}),A.bindingsStream.on("error",_),A.bindingsStream.on("end",()=>{--f.count===0&&d.close(),b(E)})});c[h]=p}}Uw.ActorAbstractPath=Es;Es.FACTORY=new L1e.Factory;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Uw,t),r(ey,t)})(Yo);Object.defineProperty($w,"__esModule",{value:!0});$w.ActorQueryOperationPathAlt=void 0;const b6=Yo,U1e=V2,q1e=ct,V1e=Ut,H1e=xt;class k1e extends b6.ActorAbstractPath{constructor(e){super(e,H1e.Algebra.types.ALT)}async runOperation(e,r){const n=e.predicate,a=(await Promise.all(n.input.map(u=>this.mediatorQueryOperation.mediate({context:r,operation:b6.ActorAbstractPath.FACTORY.createPath(e.subject,u,e.object,e.graph)})))).map(q1e.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new V1e.UnionIterator(a.map(u=>u.bindingsStream),{autoStart:!1}),metadata:()=>Promise.all(a.map(u=>u.metadata())).then(u=>U1e.ActorQueryOperationUnion.unionMetadata(u,!0))}}}$w.ActorQueryOperationPathAlt=k1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r($w,t)})(tB);var rB={},qw={};Object.defineProperty(qw,"__esModule",{value:!0});qw.ActorQueryOperationPathInv=void 0;const _6=Yo,Q1e=xt;class G1e extends _6.ActorAbstractPath{constructor(e){super(e,Q1e.Algebra.types.INV)}async runOperation(e,r){const n=e.predicate,a=_6.ActorAbstractPath.FACTORY.createPath(e.object,n.path,e.subject,e.graph);return this.mediatorQueryOperation.mediate({operation:a,context:r})}}qw.ActorQueryOperationPathInv=G1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(qw,t)})(rB);var nB={},Vw={};Object.defineProperty(Vw,"__esModule",{value:!0});Vw.ActorQueryOperationPathLink=void 0;const g6=Yo,z1e=xt;class W1e extends g6.ActorAbstractPath{constructor(e){super(e,z1e.Algebra.types.LINK)}async runOperation(e,r){const n=e.predicate,a=g6.ActorAbstractPath.FACTORY.createPattern(e.subject,n.iri,e.object,e.graph);return this.mediatorQueryOperation.mediate({operation:a,context:r})}}Vw.ActorQueryOperationPathLink=W1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Vw,t)})(nB);var iB={},Hw={};Object.defineProperty(Hw,"__esModule",{value:!0});Hw.ActorQueryOperationPathNps=void 0;const m6=Yo,X1e=ct,K1e=xt;class J1e extends m6.ActorAbstractPath{constructor(e){super(e,K1e.Algebra.types.NPS)}async runOperation(e,r){const n=e.predicate,a=this.generateVariable(e),s=m6.ActorAbstractPath.FACTORY.createPattern(e.subject,a,e.object,e.graph),o=X1e.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:s,context:r}));return{type:"bindings",bindingsStream:o.bindingsStream.transform({filter(c){return!n.iris.some(l=>l.equals(c.get(a)))},transform(c,l,d){d(c.delete(a)),l()}}),metadata:o.metadata}}}Hw.ActorQueryOperationPathNps=J1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Hw,t)})(iB);var aB={},kw={};Object.defineProperty(kw,"__esModule",{value:!0});kw.ActorQueryOperationPathOneOrMore=void 0;const Ec=Yo,Y1e=$n,v6=ct,LT=Ut,Z1e=xt,w6=new Y1e.BindingsFactory;class ebe extends Ec.ActorAbstractPath{constructor(e){super(e,Z1e.Algebra.types.ONE_OR_MORE_PATH)}async runOperation(e,r){const n=await this.isPathArbitraryLengthDistinct(r,e);if(n.operation)return n.operation;r=n.context;const a=e.predicate;if(e.subject.termType!=="Variable"&&e.object.termType==="Variable"){const c=e.object,l=await this.getObjectsPredicateStarEval(e.subject,a.path,c,e.graph,r,!1),d=e.graph.termType==="Variable"?[c,e.graph]:[c];return{type:"bindings",bindingsStream:l.bindingsStream,metadata:async()=>({...await l.metadata(),variables:d})}}if(e.subject.termType==="Variable"&&e.object.termType==="Variable"){const c=Ec.ActorAbstractPath.FACTORY.createDistinct(Ec.ActorAbstractPath.FACTORY.createPath(e.subject,e.predicate.path,e.object,e.graph)),l=v6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:r,operation:c})),d=e.subject,f=e.object,h={},p=new LT.MultiTransformIterator(l.bindingsStream,{multiTransform:_=>{const E=_.get(d),w=_.get(f),O=e.graph.termType==="Variable"?_.get(e.graph):e.graph;return new LT.TransformIterator(async()=>{const A=new LT.BufferedIterator;return await this.getSubjectAndObjectBindingsPredicateStar(d,f,E,w,a.path,O,r,h,{},A,{count:0}),A.transform({transform(T,I,D){e.graph.termType==="Variable"&&(T=T.set(e.graph,O)),D(T),I()}})},{maxBufferSize:128})},autoStart:!1}),b=e.graph.termType==="Variable"?[d,f,e.graph]:[d,f];return{type:"bindings",bindingsStream:p,metadata:async()=>({...await l.metadata(),variables:b})}}if(e.subject.termType==="Variable"&&e.object.termType!=="Variable")return this.mediatorQueryOperation.mediate({context:r,operation:Ec.ActorAbstractPath.FACTORY.createPath(e.object,Ec.ActorAbstractPath.FACTORY.createOneOrMorePath(Ec.ActorAbstractPath.FACTORY.createInv(a.path)),e.subject,e.graph)});const s=this.generateVariable(),o=v6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:r,operation:Ec.ActorAbstractPath.FACTORY.createPath(e.subject,a,s,e.graph)}));return{type:"bindings",bindingsStream:o.bindingsStream.transform({filter:c=>e.object.equals(c.get(s)),transform(c,l,d){const f=e.graph.termType==="Variable"?w6.bindings([[e.graph,c.get(e.graph)]]):w6.bindings();d(f),l()}}),metadata:async()=>({...await o.metadata(),variables:e.graph.termType==="Variable"?[e.graph]:[]})}}}kw.ActorQueryOperationPathOneOrMore=ebe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(kw,t)})(aB);var sB={},Qw={};Object.defineProperty(Qw,"__esModule",{value:!0});Qw.ActorQueryOperationPathZeroOrMore=void 0;const BT=Yo,tbe=$n,rbe=ct,R1=Ut,x1=nr,nbe=xt,S6=new tbe.BindingsFactory;class ibe extends BT.ActorAbstractPath{constructor(e){super(e,nbe.Algebra.types.ZERO_OR_MORE_PATH)}async runOperation(e,r){const n=await this.isPathArbitraryLengthDistinct(r,e);if(n.operation)return n.operation;r=n.context;const a=e.predicate,s=e.subject.termType==="Variable",o=e.object.termType==="Variable";if(e.subject.termType==="Variable"&&e.object.termType==="Variable"){const h=this.generateVariable(e),p=BT.ActorAbstractPath.FACTORY.createPattern(e.subject,h,e.object,e.graph),b=rbe.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:r,operation:p})),_=e.subject,E=e.object,w=new Set,O={},A=new R1.MultiTransformIterator(b.bindingsStream,{multiTransform:I=>{const D=I.get(_),U=I.get(E),H=e.graph.termType==="Variable"?I.get(e.graph):e.graph,N=(0,x1.termToString)(D)+(0,x1.termToString)(H),x=(0,x1.termToString)(U)+(0,x1.termToString)(H);return new R1.TransformIterator(async()=>{if(w.has(N)&&w.has(x))return new R1.EmptyIterator;const F=new R1.BufferedIterator,X={count:0};return w.has(N)||(w.add(N),await this.getSubjectAndObjectBindingsPredicateStar(_,E,D,D,a.path,H,r,O,{},F,X)),w.has(x)||(w.add(x),await this.getSubjectAndObjectBindingsPredicateStar(_,E,U,U,a.path,H,r,O,{},F,X)),F.transform({transform(ne,$,j){e.graph.termType==="Variable"&&(ne=ne.set(e.graph,H)),j(ne),$()}})})}}),T=e.graph.termType==="Variable"?[_,e.object,e.graph]:[_,e.object];return{type:"bindings",bindingsStream:A,metadata:async()=>({...await b.metadata(),variables:T})}}if(!s&&!o){const h=this.generateVariable(),p=await this.getObjectsPredicateStarEval(e.subject,a.path,h,e.graph,r,!0);return{type:"bindings",bindingsStream:p.bindingsStream.transform({filter:_=>e.object.equals(_.get(h)),transform(_,E,w){const O=e.graph.termType==="Variable"?S6.bindings([[e.graph,_.get(e.graph)]]):S6.bindings();w(O),E()}}),metadata:async()=>({...await p.metadata(),variables:e.graph.termType==="Variable"?[e.graph]:[]})}}const u=s?e.object:e.subject,c=s?e.subject:e.object,l=s?BT.ActorAbstractPath.FACTORY.createInv(a.path):a.path,d=await this.getObjectsPredicateStarEval(u,l,c,e.graph,r,!0),f=e.graph.termType==="Variable"?[c,e.graph]:[c];return{type:"bindings",bindingsStream:d.bindingsStream,metadata:async()=>({...await d.metadata(),variables:f})}}}Qw.ActorQueryOperationPathZeroOrMore=ibe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Qw,t)})(sB);var oB={},Gw={};Object.defineProperty(Gw,"__esModule",{value:!0});Gw.ActorQueryOperationPathZeroOrOne=void 0;const Oc=Yo,abe=$n,T6=ct,sbe=Hi,E6=Ut,obe=xt,$T=new abe.BindingsFactory;class ube extends Oc.ActorAbstractPath{constructor(e){super(e,obe.Algebra.types.ZERO_OR_ONE_PATH)}async runOperation(e,r){const n=e.predicate,a=[];if(e.subject.termType!=="Variable"&&e.object.termType!=="Variable"&&e.subject.equals(e.object))return{type:"bindings",bindingsStream:new E6.SingletonIterator($T.bindings()),metadata:()=>Promise.resolve({state:new sbe.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})};const s=await this.isPathArbitraryLengthDistinct(r,e);if(s.operation)return s.operation;r=s.context;const o=T6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:r,operation:Oc.ActorAbstractPath.FACTORY.createPath(e.subject,n.path,e.object,e.graph)}));let u;if(e.subject.termType==="Variable"&&e.object.termType==="Variable"){const c=this.generateVariable(e),l=T6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:r,operation:Oc.ActorAbstractPath.FACTORY.createFilter(Oc.ActorAbstractPath.FACTORY.createPattern(e.subject,c,e.object,e.graph),Oc.ActorAbstractPath.FACTORY.createOperatorExpression("=",[Oc.ActorAbstractPath.FACTORY.createTermExpression(e.subject),Oc.ActorAbstractPath.FACTORY.createTermExpression(e.object)]))})).bindingsStream.transform({map(d){return d.delete(c)},autoStart:!1});u=new E6.UnionIterator([l,o.bindingsStream],{autoStart:!1})}else e.subject.termType==="Variable"&&a.push($T.bindings([[e.subject,e.object]])),e.object.termType==="Variable"&&a.push($T.bindings([[e.object,e.subject]])),u=o.bindingsStream.prepend(a);return{type:"bindings",bindingsStream:u,metadata:o.metadata}}}Gw.ActorQueryOperationPathZeroOrOne=ube;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Gw,t)})(oB);var uB={},zw={};Object.defineProperty(zw,"__esModule",{value:!0});zw.ActorQueryOperationClear=void 0;const O6=ct,cbe=ht,lbe=new cbe.DataFactory;class dbe extends O6.ActorQueryOperationTypedMediated{constructor(e){super(e,"clear")}async testOperation(e,r){return O6.ActorQueryOperation.throwOnReadOnly(r),!0}async runOperation(e,r){let n;e.source==="DEFAULT"?n=lbe.defaultGraph():typeof e.source=="string"?n=e.source:n=[e.source];const{execute:a}=await this.mediatorUpdateQuads.mediate({deleteGraphs:{graphs:n,requireExistence:!e.silent,dropGraphs:!1},context:r});return{type:"void",execute:a}}}zw.ActorQueryOperationClear=dbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(zw,t)})(uB);var cB={},Ww={};Object.defineProperty(Ww,"__esModule",{value:!0});Ww.ActorQueryOperationUpdateCompositeUpdate=void 0;const UT=ct;class fbe extends UT.ActorQueryOperationTypedMediated{constructor(e){super(e,"compositeupdate")}async testOperation(e,r){return UT.ActorQueryOperation.throwOnReadOnly(r),!0}async runOperation(e,r){return{type:"void",execute:()=>(async()=>{for(const a of e.updates)await UT.ActorQueryOperation.getSafeVoid(await this.mediatorQueryOperation.mediate({operation:a,context:r})).execute()})()}}}Ww.ActorQueryOperationUpdateCompositeUpdate=fbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ww,t)})(cB);var lB={},Xw={};Object.defineProperty(Xw,"__esModule",{value:!0});Xw.ActorQueryOperationAddRewrite=void 0;const A6=ct,hbe=ht,pbe=xt,lu=new hbe.DataFactory;class ybe extends A6.ActorQueryOperationTypedMediated{constructor(e){super(e,"add"),this.factory=new pbe.Factory}async testOperation(e,r){return A6.ActorQueryOperation.throwOnReadOnly(r),!0}runOperation(e,r){const n=e.destination==="DEFAULT"?lu.defaultGraph():e.destination,a=e.source==="DEFAULT"?lu.defaultGraph():e.source,s=this.factory.createDeleteInsert(void 0,[this.factory.createPattern(lu.variable("s"),lu.variable("p"),lu.variable("o"),n)],this.factory.createPattern(lu.variable("s"),lu.variable("p"),lu.variable("o"),a));return this.mediatorQueryOperation.mediate({operation:s,context:r})}}Xw.ActorQueryOperationAddRewrite=ybe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Xw,t)})(lB);var dB={},Kw={};Object.defineProperty(Kw,"__esModule",{value:!0});Kw.ActorQueryOperationCopyRewrite=void 0;const R6=ct,bbe=xt;class _be extends R6.ActorQueryOperationTypedMediated{constructor(e){super(e,"copy"),this.factory=new bbe.Factory}async testOperation(e,r){return R6.ActorQueryOperation.throwOnReadOnly(r),!0}runOperation(e,r){if(typeof e.destination=="string"&&typeof e.source=="string"&&e.destination===e.source||typeof e.destination!="string"&&typeof e.source!="string"&&e.destination.equals(e.source))return Promise.resolve({type:"void",execute:()=>Promise.resolve()});const n=this.factory.createCompositeUpdate([this.factory.createDrop(e.destination,!0),this.factory.createAdd(e.source,e.destination,e.silent)]);return this.mediatorQueryOperation.mediate({operation:n,context:r})}}Kw.ActorQueryOperationCopyRewrite=_be;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Kw,t)})(dB);var fB={},Jw={};Object.defineProperty(Jw,"__esModule",{value:!0});Jw.ActorQueryOperationCreate=void 0;const x6=ct;class gbe extends x6.ActorQueryOperationTypedMediated{constructor(e){super(e,"create")}async testOperation(e,r){return x6.ActorQueryOperation.throwOnReadOnly(r),!0}async runOperation(e,r){const{execute:n}=await this.mediatorUpdateQuads.mediate({createGraphs:{graphs:[e.source],requireNonExistence:!e.silent},context:r});return{type:"void",execute:n}}}Jw.ActorQueryOperationCreate=gbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Jw,t)})(fB);var hB={},Yw={};Object.defineProperty(Yw,"__esModule",{value:!0});Yw.ActorQueryOperationUpdateDeleteInsert=void 0;const I1=WR,mbe=$n,qT=ct,vbe=Ut,wbe=new mbe.BindingsFactory;class Sbe extends qT.ActorQueryOperationTypedMediated{constructor(e){super(e,"deleteinsert"),this.blankNodeCounter=0}async testOperation(e,r){return qT.ActorQueryOperation.throwOnReadOnly(r),!0}async runOperation(e,r){const n=e.where?qT.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.where,context:r})).bindingsStream:new vbe.ArrayIterator([wbe.bindings()],{autoStart:!1});let a,s;e.insert&&(a=new I1.BindingsToQuadsIterator(e.insert.map(I1.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),n.clone()),this.blankNodeCounter++),e.delete&&(s=new I1.BindingsToQuadsIterator(e.delete.map(I1.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),n.clone()),this.blankNodeCounter++);const{execute:o}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:a,quadStreamDelete:s,context:r});return{type:"void",execute:o}}}Yw.ActorQueryOperationUpdateDeleteInsert=Sbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Yw,t)})(hB);var pB={},Zw={};Object.defineProperty(Zw,"__esModule",{value:!0});Zw.ActorQueryOperationDrop=void 0;const I6=ct,Tbe=ht,Ebe=new Tbe.DataFactory;class Obe extends I6.ActorQueryOperationTypedMediated{constructor(e){super(e,"drop")}async testOperation(e,r){return I6.ActorQueryOperation.throwOnReadOnly(r),!0}async runOperation(e,r){let n;e.source==="DEFAULT"?n=Ebe.defaultGraph():typeof e.source=="string"?n=e.source:n=[e.source];const{execute:a}=await this.mediatorUpdateQuads.mediate({deleteGraphs:{graphs:n,requireExistence:!e.silent,dropGraphs:!0},context:r});return{type:"void",execute:a}}}Zw.ActorQueryOperationDrop=Obe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Zw,t)})(pB);var yB={},e3={};Object.defineProperty(e3,"__esModule",{value:!0});e3.ActorQueryOperationLoad=void 0;const P6=ct,D6=rr,Abe=ht,Rbe=xt,Ac=new Abe.DataFactory;class ux extends P6.ActorQueryOperationTypedMediated{constructor(e){super(e,"load"),this.factory=new Rbe.Factory,this.constructOperation=this.factory.createConstruct(this.factory.createPattern(Ac.variable("s"),Ac.variable("p"),Ac.variable("o")),[this.factory.createPattern(Ac.variable("s"),Ac.variable("p"),Ac.variable("o"))])}async testOperation(e,r){return P6.ActorQueryOperation.throwOnReadOnly(r),!0}async runOperation(e,r){let n=r.set(D6.KeysRdfResolveQuadPattern.sources,[e.source.value]);e.silent&&(n=n.set(D6.KeysInitQuery.lenient,!0));let s=ux.getSafeQuads(await this.mediatorQueryOperation.mediate({operation:this.constructOperation,context:n})).quadStream;e.destination&&(s=s.map(u=>Ac.quad(u.subject,u.predicate,u.object,e.destination)));const{execute:o}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:s,context:r});return{type:"void",execute:o}}}e3.ActorQueryOperationLoad=ux;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(e3,t)})(yB);var bB={},t3={};Object.defineProperty(t3,"__esModule",{value:!0});t3.ActorQueryOperationMoveRewrite=void 0;const N6=ct,xbe=xt;class Ibe extends N6.ActorQueryOperationTypedMediated{constructor(e){super(e,"move"),this.factory=new xbe.Factory}async testOperation(e,r){return N6.ActorQueryOperation.throwOnReadOnly(r),!0}runOperation(e,r){if(typeof e.destination=="string"&&typeof e.source=="string"&&e.destination===e.source||typeof e.destination!="string"&&typeof e.source!="string"&&e.destination.equals(e.source))return Promise.resolve({type:"void",execute:()=>Promise.resolve()});const n=[this.factory.createDrop(e.destination,!0),this.factory.createAdd(e.source,e.destination,e.silent),this.factory.createDrop(e.source)],a=this.factory.createCompositeUpdate(n);return this.mediatorQueryOperation.mediate({operation:a,context:r})}}t3.ActorQueryOperationMoveRewrite=Ibe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(t3,t)})(bB);var cx={},r3={};Object.defineProperty(r3,"__esModule",{value:!0});r3.ActorRdfJoinMultiBind=void 0;const C6=ct,P1=fa,VT=rr,HT=Ut,kh=xt;class Ip extends P1.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"bind",canHandleUndefs:!0})}static createBindStream(e,r,n,a,s){const o=u=>{const c=n.map(d=>(0,C6.materializeOperation)(d,u,{bindFilter:!1})),l=d=>d.merge(u);return new HT.TransformIterator(async()=>(await a(c,u)).transform({map:l}),{maxBufferSize:128,autoStart:!1})};switch(e){case"depth-first":return new HT.MultiTransformIterator(r,{autoStart:!1,multiTransform:o,optional:s});case"breadth-first":return new HT.UnionIterator(r.transform({map:o,optional:s}),{autoStart:!1});default:throw new Error(`Received request for unknown bind order: ${e}`)}}async sortJoinEntries(e,r){if(e.some(u=>u.metadata.canContainUndefs))return e;const a={};for(const u of e)for(const c of u.metadata.variables){let l=a[c.value];l||(l=0),a[c.value]=++l}const s=[];for(const[u,c]of Object.entries(a))c>=2&&s.push(u);if(s.length===0)throw new Error("Bind join can only join entries with at least one common variable");const o=[];for(const u of e){let c=!1;for(const l of u.metadata.variables)if(s.includes(l.value)){c=!0;break}c||o.push(u)}return(await this.mediatorJoinEntriesSort.mediate({entries:e,context:r})).entries.sort((u,c)=>{const l=o.includes(u),d=o.includes(c);return l===d?0:l?1:-1})}async getOutput(e){const r=await P1.ActorRdfJoin.getEntriesWithMetadatas(e.entries),n=await this.sortJoinEntries(r,e.context);this.logDebug(e.context,"First entry for Bind Join: ",()=>({entry:n[0].operation,metadata:n[0].metadata}));for(const[c,l]of n.entries())c!==0&&l.output.bindingsStream.close();const a=n[0].output,s=[...n];s.splice(0,1);const o=e.context.set(VT.KeysQueryOperation.joinLeftMetadata,n[0].metadata).set(VT.KeysQueryOperation.joinRightMetadatas,s.map(c=>c.metadata));return{result:{type:"bindings",bindingsStream:Ip.createBindStream(this.bindOrder,a.bindingsStream,s.map(c=>c.operation),async(c,l)=>{const d=c.length===1?c[0]:Ip.FACTORY.createJoin(c);return C6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:d,context:o==null?void 0:o.set(VT.KeysQueryOperation.joinBindings,l)})).bindingsStream},!1),metadata:()=>this.constructResultMetadata(n,n.map(c=>c.metadata),e.context)},physicalPlanMetadata:{bindIndex:r.indexOf(n[0]),bindOrder:this.bindOrder}}}canBindWithOperation(e){let r=!0;return kh.Util.recurseOperation(e,{[kh.Algebra.types.EXTEND](){return r=!1,!1},[kh.Algebra.types.GROUP](){return r=!1,!1},[kh.Algebra.types.FILTER](){return r=!1,!1}}),r}async getJoinCoefficients(e,r){const n=await this.sortJoinEntries(e.entries.map((p,b)=>({...p,metadata:r[b]})),e.context);r=n.map(p=>p.metadata);const a=P1.ActorRdfJoin.getRequestInitialTimes(r),s=P1.ActorRdfJoin.getRequestItemTimes(r),o=[...n],u=[...a],c=[...s];if(o.splice(0,1),u.splice(0,1),c.splice(0,1),o.some(p=>!this.canBindWithOperation(p.operation)))throw new Error(`Actor ${this.name} can not bind on Extend, Group, and Filter operations`);const l=await Promise.all(o.map(async p=>(await this.mediatorJoinSelectivity.mediate({entries:[n[0],p],context:e.context})).selectivity*this.selectivityModifier)),d=o.map((p,b)=>p.metadata.cardinality.value*l[b]).reduce((p,b)=>p+b,0),f=u.reduce((p,b,_)=>p+b*l[_],0),h=c.reduce((p,b,_)=>p+b*l[_],0);return{iterations:r[0].cardinality.value*d,persistedItems:0,blockingItems:0,requestTime:a[0]+r[0].cardinality.value*(s[0]+f+d*h)}}}r3.ActorRdfJoinMultiBind=Ip;Ip.FACTORY=new kh.Factory;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(r3,t)})(cx);var _B={},n3={};Object.defineProperty(n3,"__esModule",{value:!0});n3.ActorRdfJoinOptionalBind=void 0;const Pbe=cx,Dbe=ct,D1=fa,kT=rr,j6=xt;class Nbe extends D1.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:"bind",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){e.entries[1].output.bindingsStream.close();const r=e.context.set(kT.KeysQueryOperation.joinLeftMetadata,await e.entries[0].output.metadata()).set(kT.KeysQueryOperation.joinRightMetadatas,[await e.entries[1].output.metadata()]);return{result:{type:"bindings",bindingsStream:Pbe.ActorRdfJoinMultiBind.createBindStream(this.bindOrder,e.entries[0].output.bindingsStream,[e.entries[1].operation],async(a,s)=>{const o=a[0];return Dbe.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:o,context:r==null?void 0:r.set(kT.KeysQueryOperation.joinBindings,s)})).bindingsStream},!0),metadata:async()=>await this.constructResultMetadata(e.entries,await D1.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0})}}}async getJoinCoefficients(e,r){const n=D1.ActorRdfJoin.getRequestInitialTimes(r),a=D1.ActorRdfJoin.getRequestItemTimes(r);if(e.entries[1].operation.type===j6.Algebra.types.EXTEND||e.entries[1].operation.type===j6.Algebra.types.GROUP)throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);const s=(await this.mediatorJoinSelectivity.mediate({entries:e.entries,context:e.context})).selectivity*this.selectivityModifier;return{iterations:r[0].cardinality.value*r[1].cardinality.value*s,persistedItems:0,blockingItems:0,requestTime:n[0]+r[0].cardinality.value*s*(a[0]+n[1]+r[1].cardinality.value*a[1])}}}n3.ActorRdfJoinOptionalBind=Nbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(n3,t)})(_B);var gB={},i3={};Object.defineProperty(i3,"__esModule",{value:!0});i3.ActorQueryOperationJoin=void 0;const M6=ct;class Cbe extends M6.ActorQueryOperationTypedMediated{constructor(e){super(e,"join")}async testOperation(e,r){return!0}async runOperation(e,r){const n=(await Promise.all(e.input.map(async a=>({output:await this.mediatorQueryOperation.mediate({operation:a,context:r}),operation:a})))).map(({output:a,operation:s})=>({output:M6.ActorQueryOperation.getSafeBindings(a),operation:s}));return this.mediatorJoin.mediate({type:"inner",entries:n,context:r})}}i3.ActorQueryOperationJoin=Cbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(i3,t)})(gB);var mB={},a3={};Object.defineProperty(a3,"__esModule",{value:!0});a3.ActorQueryOperationLeftJoin=void 0;const QT=ct,F6=Al;class jbe extends QT.ActorQueryOperationTypedMediated{constructor(e){super(e,"leftjoin")}async testOperation(e,r){return!0}async runOperation(e,r){const n=(await Promise.all(e.input.map(async s=>({output:await this.mediatorQueryOperation.mediate({operation:s,context:r}),operation:s})))).map(({output:s,operation:o})=>({output:QT.ActorQueryOperation.getSafeBindings(s),operation:o})),a=await this.mediatorJoin.mediate({type:"optional",entries:n,context:r});if(e.expression){const o=(await n[1].output.metadata()).variables,u={...QT.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation)},c=new F6.AsyncEvaluator(e.expression,u),l=a.bindingsStream.transform({autoStart:!1,transform:async(d,f,h)=>{if(!o.every(p=>d.has(p.value)))return h(d),f();try{await c.evaluateAsEBV(d)&&h(d)}catch(p){(0,F6.isExpressionError)(p)?this.logWarn(r,"Error occurred while filtering.",()=>({error:p,bindings:d})):l.emit("error",p)}f()}});a.bindingsStream=l}return a}}a3.ActorQueryOperationLeftJoin=jbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(a3,t)})(mB);var vB={},s3={};Object.defineProperty(s3,"__esModule",{value:!0});s3.ActorQueryOperationMinus=void 0;const L6=ct;class Mbe extends L6.ActorQueryOperationTypedMediated{constructor(e){super(e,"minus")}async testOperation(e,r){return!0}async runOperation(e,r){const n=(await Promise.all(e.input.map(async a=>({output:await this.mediatorQueryOperation.mediate({operation:a,context:r}),operation:a})))).map(({output:a,operation:s})=>({output:L6.ActorQueryOperation.getSafeBindings(a),operation:s}));return this.mediatorJoin.mediate({type:"minus",entries:n,context:r})}}s3.ActorQueryOperationMinus=Mbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s3,t)})(vB);var wB={},o3={};Object.defineProperty(o3,"__esModule",{value:!0});o3.ActorQueryOperationPathSeq=void 0;const B6=Yo,$6=ct,Fbe=xt;class Lbe extends B6.ActorAbstractPath{constructor(e){super(e,Fbe.Algebra.types.SEQ)}async runOperation(e,r){const n=e.predicate;let a=e.subject;const s=[],o=await Promise.all(n.input.map((l,d)=>{const f=d===n.input.length-1?e.object:this.generateVariable(e,`b${d}`),h=B6.ActorAbstractPath.FACTORY.createPath(a,l,f,e.graph),p=this.mediatorQueryOperation.mediate({context:r,operation:h});return a=f,d({output:$6.ActorQueryOperation.getSafeBindings(await l),operation:d}))),u=$6.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:"inner",entries:o,context:r}));return{type:"bindings",bindingsStream:u.bindingsStream.transform({transform(l,d,f){for(const h of s)l=l.delete(h);f(l),d()}}),async metadata(){const l=await u.metadata(),d=l.variables.filter(f=>!s.some(h=>h.value===f.value));return{...l,variables:d}}}}}o3.ActorQueryOperationPathSeq=Lbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(o3,t)})(wB);var SB={},u3={};Object.defineProperty(u3,"__esModule",{value:!0});u3.ActorRdfJoinMultiSmallest=void 0;const Bbe=ct,N1=fa,$be=xt;class c3 extends N1.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-smallest",limitEntries:3,limitEntriesMin:!0,canHandleUndefs:!0})}async sortJoinEntries(e,r){return(await this.mediatorJoinEntriesSort.mediate({entries:e,context:r})).entries}async getOutput(e){const r=await this.sortJoinEntries(await N1.ActorRdfJoin.getEntriesWithMetadatas([...e.entries]),e.context),n=r[0],a=r[1];r.splice(0,2);const s={output:Bbe.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:e.type,entries:[n,a],context:e.context})),operation:c3.FACTORY.createJoin([n.operation,a.operation],!1)};return r.push(s),{result:await this.mediatorJoin.mediate({type:e.type,entries:r,context:e.context})}}async getJoinCoefficients(e,r){r=[...r],r=(await this.sortJoinEntries(e.entries.map((o,u)=>({...o,metadata:r[u]})),e.context)).map(o=>o.metadata);const a=N1.ActorRdfJoin.getRequestInitialTimes(r),s=N1.ActorRdfJoin.getRequestItemTimes(r);return{iterations:r[0].cardinality.value*r[1].cardinality.value*r.slice(2).reduce((o,u)=>o*u.cardinality.value,1),persistedItems:0,blockingItems:0,requestTime:a[0]+r[0].cardinality.value*s[0]+a[1]+r[1].cardinality.value*s[1]+r.slice(2).reduce((o,u,c)=>o+a.slice(2)[c]+u.cardinality.value*s.slice(2)[c],0)}}}u3.ActorRdfJoinMultiSmallest=c3;c3.FACTORY=new $be.Factory;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(u3,t)})(SB);var TB={},l3={};Object.defineProperty(l3,"__esModule",{value:!0});l3.ActorQueryOperationQuadpattern=void 0;const Ube=$n,U6=ct,qbe=rr,Vbe=ht,Hbe=nr,Rc=An,kbe=xt,Qbe=new Ube.BindingsFactory,GT=new Vbe.DataFactory,Gbe=new kbe.Factory;class Ts extends U6.ActorQueryOperationTyped{constructor(e){super(e,"pattern")}static isTermVariable(e){return e.termType==="Variable"}static getVariables(e){return(0,Rc.uniqTerms)((0,Rc.getTermsNested)(e).filter(Ts.isTermVariable))}static getDuplicateElementLinks(e){const r={};let n=!1;if((0,Rc.forEachTermsNested)(e,(s,o)=>{if(s.termType==="Variable"){const u=(0,Hbe.termToString)(s),c=(r[u]||(r[u]=[])).push(o);n=n||c>1}}),!n)return;const a={};for(const s in r){const o=r[s],u=o.slice(1);u.length>0&&(a[o[0].join("_")]=u)}return a}static validateMetadata(e){for(const r of["cardinality","canContainUndefs"])if(!(r in e))throw new Error(`Invalid metadata: missing ${r} in ${JSON.stringify(e)}`);return e}static getMetadata(e,r,n){return()=>new Promise((a,s)=>{e.getProperty("metadata",o=>a(o)),e.on("error",s)}).then(a=>("canContainUndefs"in a||(a.canContainUndefs=!1),Ts.quadsMetadataToBindingsMetadata(Ts.validateMetadata(a),r,n)))}static quadsMetadataToBindingsMetadata(e,r,n){return{...e,order:e.order?Ts.quadsOrderToBindingsOrder(e.order,r):void 0,availableOrders:e.availableOrders?e.availableOrders.map(a=>({cost:a.cost,terms:Ts.quadsOrderToBindingsOrder(a.terms,r)})):void 0,variables:n}}static quadsOrderToBindingsOrder(e,r){const n={};return e.map(a=>{const s=r[a.term];if(s&&!n[s])return n[s]=!0,{term:GT.variable(s),direction:a.direction}}).filter(a=>!!a)}async testOperation(e,r){return!0}async runOperation(e,r){e.context&&(r=r.merge(e.context));let n=e;const a=this.unionDefaultGraph||r.get(qbe.KeysQueryOperation.unionDefaultGraph);e.graph.termType==="DefaultGraph"&&a&&(n=Gbe.createPattern(e.subject,e.predicate,e.object,GT.variable("__comunica:defaultGraph")));const s=await this.mediatorResolveQuadPattern.mediate({pattern:n,context:r}),o=Ts.getVariables(e),u=(0,Rc.reduceTermsNested)(e,(d,f,h)=>(f.termType==="Variable"&&(d[h.join("_")]=f.value),d),{}),c=Ts.getMetadata(s.data,u,o);return{type:"bindings",bindingsStream:new U6.ClosableTransformIterator(async()=>{let d=s.data;const f=Ts.getDuplicateElementLinks(e);return e.graph.termType==="Variable"&&!a&&(d=d.filter(h=>h.graph.termType!=="DefaultGraph")),f&&(d=d.filter(h=>{for(const p in f){const b=p.split("_"),_=(0,Rc.getValueNestedPath)(h,b);for(const E of f[p])if(!_.equals((0,Rc.getValueNestedPath)(h,E)))return!1}return!0})),d.map(h=>Qbe.bindings(Object.keys(u).map(p=>{const b=p.split("_"),_=u[p],E=(0,Rc.getValueNestedPath)(h,b);return[GT.variable(_),E]})))},{autoStart:!1,onClose:()=>s.data.destroy()}),metadata:c}}}l3.ActorQueryOperationQuadpattern=Ts;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(l3,t)})(TB);var EB={},d3={},ul={};Object.defineProperty(ul,"__esModule",{value:!0});ul.ActorDereferenceHttpBase=ul.mediaTypesToAcceptString=void 0;const q6=nm,V6=Zs,zbe=zR,Wbe=Ra,Xbe=wl,Kbe=/^[^ ;]*/u;function OB(t,e){const r="*/*;q=0.1",n=[],a=Object.entries(t).map(([o,u])=>({mediaType:o,priority:u})).sort((o,u)=>u.priority===o.priority?o.mediaType.localeCompare(u.mediaType):u.priority-o.priority);let s=a.length-1;for(const{mediaType:o,priority:u}of a){const c=o+(u!==1?`;q=${u.toFixed(3).replace(/0*$/u,"")}`:"");if(s+c.length>e){for(;s+r.length>e;){const l=n.pop()||"";s-=l.length+1}n.push(r);break}n.push(c),s+=c.length}return n.length===0?"*/*":n.join(",")}ul.mediaTypesToAcceptString=OB;class Jbe extends q6.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){var l,d;let r=!0;const n=new zbe.Headers(e.headers);n.append("Accept",OB(await((l=e.mediaTypes)==null?void 0:l.call(e))??{},this.getMaxAcceptHeaderLength()));let a;const s=Date.now();try{a=await this.mediatorHttp.mediate({context:e.context,init:{headers:n,method:e.method},input:e.url})}catch(f){return this.handleDereferenceErrors(e,f)}const o=(0,Wbe.resolve)(a.url,e.url),u=Date.now()-s;if(a.status!==200){r=!1;const f=a.body?await Xbe(V6.ActorHttp.toNodeReadable(a.body)):"empty response";if(!e.acceptErrors){const h=new Error(`Could not retrieve ${e.url} (HTTP status ${a.status}): -${f}`);return this.handleDereferenceErrors(e,h,a.headers,u)}}const c=(d=Kbe.exec(a.headers.get("content-type")??""))==null?void 0:d[0];return{url:o,data:r?V6.ActorHttp.toNodeReadable(a.body):(0,q6.emptyReadable)(),exists:r,requestTime:u,headers:a.headers,mediaType:c!=="text/plain"?c:void 0}}}ul.ActorDereferenceHttpBase=Jbe;Object.defineProperty(d3,"__esModule",{value:!0});d3.ActorDereferenceHttp=void 0;const Ybe=ul;class Zbe extends Ybe.ActorDereferenceHttpBase{getMaxAcceptHeaderLength(){return this.maxAcceptHeaderLengthBrowser}}d3.ActorDereferenceHttp=Zbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(d3,t),r(ul,t)})(EB);var AB={},f3={};Object.defineProperty(f3,"__esModule",{value:!0});f3.ActorHttpProxy=void 0;const e_e=Zs,zT=rr;class t_e extends e_e.ActorHttp{constructor(e){super(e)}async test(e){const r=e.context.get(zT.KeysHttpProxy.httpProxyHandler);if(!r)throw new Error(`Actor ${this.name} could not find a proxy handler in the context.`);if(!await r.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 r=typeof e.input=="string"?e.input:e.input.url,n=e.context.get(zT.KeysHttpProxy.httpProxyHandler),a=await this.mediatorHttp.mediate({...await n.getProxy(e),context:e.context.delete(zT.KeysHttpProxy.httpProxyHandler)});return Object.defineProperty(a,"url",{configurable:!0,enumerable:!0,get:()=>a.headers.get("x-final-url")??r}),a}}f3.ActorHttpProxy=t_e;var h3={};Object.defineProperty(h3,"__esModule",{value:!0});h3.ProxyHandlerStatic=void 0;class r_e{constructor(e){this.prefixUrl=e}async getProxy(e){return{init:e.init,input:this.modifyInput(e.input)}}modifyInput(e){return typeof e=="string"?this.prefixUrl+e:new Request(this.prefixUrl+e.url,e)}}h3.ProxyHandlerStatic=r_e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(f3,t),r(h3,t)})(AB);var RB={},p3={};Object.defineProperty(p3,"__esModule",{value:!0});p3.ActorRdfUpdateQuadsHypermedia=void 0;const ed=Cf,n_e=Pa;class i_e extends ed.ActorRdfUpdateQuadsDestination{constructor(e){super(e),this.cache=this.cacheSize?new n_e.LRUCache({max:this.cacheSize}):void 0;const r=this.cache;r&&this.httpInvalidator.addInvalidateListener(({url:n})=>n?r.delete(n):r.clear())}async test(e){if(!(0,ed.getContextDestinationUrl)((0,ed.getContextDestination)(e.context)))throw new Error(`Actor ${this.name} can only update quads against a single destination URL.`);return!0}getDestination(e){const r=(0,ed.getContextDestination)(e);let n=(0,ed.getContextDestinationUrl)(r);if(this.cache&&this.cache.has(n))return this.cache.get(n);const a=(async()=>{var c;let s,o;try{const l=await this.mediatorDereferenceRdf.mediate({context:e,url:n,acceptErrors:!0});o=l.exists,n=l.url;const d=await this.mediatorMetadata.mediate({context:e,url:n,quads:l.data,triples:(c=l.metadata)==null?void 0:c.triples});s=(await this.mediatorMetadataExtract.mediate({context:e,url:n,metadata:d.metadata,headers:l.headers,requestTime:l.requestTime})).metadata}catch{s={},o=!1}const{destination:u}=await this.mediatorRdfUpdateHypermedia.mediate({context:e,url:n,metadata:s,exists:o,forceDestinationType:(0,ed.getDataDestinationType)(r)});return u})();return this.cache&&this.cache.set(n,a),a}}p3.ActorRdfUpdateQuadsHypermedia=i_e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(p3,t)})(RB);var xB={},y3={},ty={},b3={},_3={};Object.defineProperty(_3,"__esModule",{value:!0});_3.LinkedRdfSourcesAsyncRdfIterator=void 0;const a_e=Hi,s_e=Ut,o_e=Pa;class u_e extends s_e.BufferedIterator{constructor(e,r,n,a,s,o,u,c){if(super({autoStart:!0,...c}),this.started=!1,this.currentIterators=[],this.iteratorsPendingCreation=0,this.accumulatedMetadata=Promise.resolve(void 0),this.cacheSize=e,this.subject=r,this.predicate=n,this.object=a,this.graph=s,this.firstUrl=o,this.maxIterators=u,this.maxIterators<=0)throw new Error(`LinkedRdfSourcesAsyncRdfIterator.maxIterators must be larger than zero, but got ${this.maxIterators}`)}_end(e){for(const r of this.currentIterators)r.destroy();super._end(e)}setSourcesState(e){e?this.sourcesState=e:(this.sourcesState={sources:new o_e.LRUCache({max:this.cacheSize})},this.getSourceCached({url:this.firstUrl},{}).catch(r=>this.destroy(r)))}getSourceCached(e,r){let n=this.sourcesState.sources.get(e.url);return n||(n=this.getSource(e,r),(e.url===this.firstUrl||this.shouldStoreSourcesStates())&&this.sourcesState.sources.set(e.url,n),n)}shouldStoreSourcesStates(){return!0}_read(e,r){if(!this.started)this.started=!0,this.sourcesState||this.setSourcesState(),this.getSourceCached({url:this.firstUrl},{}).then(n=>{this.startIterator(n,!0),r()}).catch(n=>setTimeout(()=>this.destroy(n)));else{for(const n of this.currentIterators){for(;e>0;){const a=n.read();if(a!==null)e--,this._push(a);else break}if(e<=0)break}e>=0&&this.canStartNewIterator()?this.getSourceCached({url:this.firstUrl},{}).then(n=>{this.startIteratorsForNextUrls(n.handledDatasets,!1),r()}).catch(n=>this.destroy(n)):r()}}canStartNewIterator(){return this.currentIterators.length+this.iteratorsPendingCreation0}startIterator(e,r){const n=e.source.match(this.subject,this.predicate,this.object,this.graph);this.currentIterators.push(n);let a=!1;n._destination=this,n.on("error",s=>this.destroy(s)),n.on("readable",()=>this._fillBuffer()),n.on("end",()=>{this.currentIterators.splice(this.currentIterators.indexOf(n),1),a&&this.startIteratorsForNextUrls(e.handledDatasets,!0)}),n.getProperty("metadata",s=>{this.accumulatedMetadata=this.accumulatedMetadata.then(o=>(async()=>(o||(o=e.metadata),this.accumulateMetadata(o,s)))().then(u=>{const c={...e.metadata,...s,...u};return c.state=new a_e.MetadataValidationState,this.updateMetadata(c),this.getSourceLinks(c).then(l=>Promise.all(l)).then(async l=>{const d=await this.getLinkQueue();for(const f of l)d.push(f,e.link);a=!0,this.startIteratorsForNextUrls(e.handledDatasets,!0)}).catch(l=>this.destroy(l)),c})).catch(o=>(this.destroy(o),{}))})}updateMetadata(e){const r=this.getProperty("metadata");this.setProperty("metadata",e),r==null||r.state.invalidate()}isRunning(){return!this.done}startIteratorsForNextUrls(e,r){this.getLinkQueue().then(n=>{for(;this.canStartNewIterator()&&this.isRunning();){const a=n.pop();if(a)this.iteratorsPendingCreation++,this.getSourceCached(a,e).then(s=>{this.iteratorsPendingCreation--,this.startIterator(s,!1)}).catch(s=>this.destroy(s));else break}r&&this.isCloseable(n)&&this.close()}).catch(n=>this.destroy(n))}isCloseable(e){return e.isEmpty()&&!this.areIteratorsRunning()}}_3.LinkedRdfSourcesAsyncRdfIterator=u_e;Object.defineProperty(b3,"__esModule",{value:!0});b3.MediatedLinkedRdfSourcesAsyncRdfIterator=void 0;const c_e=ht,l_e=kt,d_e=_3,C1=new c_e.DataFactory;class f_e extends d_e.LinkedRdfSourcesAsyncRdfIterator{constructor(e,r,n,a,s,o,u,c,l,d,f){super(e,a,s,o,u,c,l,d?{maxBufferSize:Number.POSITIVE_INFINITY}:void 0),this.wasForcefullyClosed=!1,this.context=r,this.forceSourceType=n,this.mediatorDereferenceRdf=f.mediatorDereferenceRdf,this.mediatorMetadata=f.mediatorMetadata,this.mediatorMetadataExtract=f.mediatorMetadataExtract,this.mediatorMetadataAccumulate=f.mediatorMetadataAccumulate,this.mediatorRdfResolveHypermedia=f.mediatorRdfResolveHypermedia,this.mediatorRdfResolveHypermediaLinks=f.mediatorRdfResolveHypermediaLinks,this.mediatorRdfResolveHypermediaLinksQueue=f.mediatorRdfResolveHypermediaLinksQueue,this.handledUrls={[c]:!0},this.aggregatedStore=d}close(){if(!this.aggregatedStore){super.close();return}this.getLinkQueue().then(e=>{var r;this.isCloseable(e)?((r=this.aggregatedStore)==null||r.end(),super.close()):this.wasForcefullyClosed=!0}).catch(e=>super.destroy(e))}destroy(e){if(!this.aggregatedStore){super.destroy(e);return}this.getLinkQueue().then(r=>{var n;e||this.isCloseable(r)?((n=this.aggregatedStore)==null||n.end(),super.destroy(e)):this.wasForcefullyClosed=!0}).catch(r=>super.destroy(r))}isCloseable(e){return(this.wasForcefullyClosed||e.isEmpty())&&!this.areIteratorsRunning()}canStartNewIterator(){return!this.wasForcefullyClosed&&this.aggregatedStore&&this.aggregatedStore.hasRunningIterators()||super.canStartNewIterator()}isRunning(){return this.aggregatedStore&&this.aggregatedStore.hasRunningIterators()||!this.done}shouldStoreSourcesStates(){return this.aggregatedStore===void 0}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:r}=await this.mediatorRdfResolveHypermediaLinks.mediate({context:this.context,metadata:e});return r.filter(n=>this.handledUrls[n.url]?!1:(this.handledUrls[n.url]=!0,!0))}catch{return[]}}async getSource(e,r){var l,d,f,h;let n=this.context;e.context&&(n=n.merge(e.context));let a=e.url,s,o;try{const p=await this.mediatorDereferenceRdf.mediate({context:n,url:a});a=p.url;const b=await this.mediatorMetadata.mediate({context:n,url:a,quads:p.data,triples:(l=p.metadata)==null?void 0:l.triples});b.data.on("error",()=>{}),o=(await this.mediatorMetadataExtract.mediate({context:n,url:a,metadata:b.metadata,headers:p.headers,requestTime:p.requestTime})).metadata,s=b.data,e.transform&&(s=await e.transform(s))}catch(p){s=new l_e.Readable,s.read=()=>(setTimeout(()=>s.emit("error",p)),null),o={}}(d=this.aggregatedStore)==null||d.setBaseMetadata(o,!1),(f=this.aggregatedStore)==null||f.containedSources.add(e.url),(h=this.aggregatedStore)==null||h.import(s);const{source:u,dataset:c}=await this.mediatorRdfResolveHypermedia.mediate({context:n,forceSourceType:this.forceSourceType,handledDatasets:r,metadata:o,quads:s,url:a});return c&&(r[c]=!0),{link:e,source:u,metadata:o,handledDatasets:r}}startIterator(e,r){var n;if(this.aggregatedStore&&!this.aggregatedStore.containedSources.has(e.link.url)){(n=this.aggregatedStore)==null||n.containedSources.add(e.link.url);const a=e.source.match(C1.variable("s"),C1.variable("p"),C1.variable("o"),C1.variable("g"),this.context);this.aggregatedStore.import(a).on("end",()=>{super.startIterator(e,r)})}else super.startIterator(e,r)}async accumulateMetadata(e,r){return(await this.mediatorMetadataAccumulate.mediate({mode:"append",accumulatedMetadata:e,appendingMetadata:r,context:this.context})).metadata}updateMetadata(e){var r;super.updateMetadata(e),(r=this.aggregatedStore)==null||r.setBaseMetadata(e,!0)}}b3.MediatedLinkedRdfSourcesAsyncRdfIterator=f_e;var g3={},IB={},ry={};Object.defineProperty(ry,"__esModule",{value:!0});ry.PendingStreamsIndex=void 0;const H6=nr,k6=An;class xs{constructor(){this.indexedStreams=new Map,this.allStreams=[]}termToString(e){return e&&e.termType!=="Variable"?(0,H6.termToString)(e):xs.ID_VARIABLE}addPatternListener(e,r,n,a,s){this.allStreams.push(e);const o=`${this.termToString(r)}${xs.ID_SEPARATOR}${this.termToString(n)}${xs.ID_SEPARATOR}${this.termToString(a)}${xs.ID_SEPARATOR}${this.termToString(s)}`;let u=this.indexedStreams.get(o);u||(u=[],this.indexedStreams.set(o,u)),u.push(e)}getPendingStreamsForQuad(e){let r=[(0,k6.getTerms)(e).map(a=>(0,H6.termToString)(a))];for(let a=0;a{for(const n of this.pendingStreams.getPendingStreamsForQuad(r))this.ended||(n.push(r),n.emit("quad",r))})}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,r,n,a){const s=this.store.match(e,r,n,a);let o=s;if(!this.ended){const u=new p_e.PassThrough({objectMode:!0});this.pendingStreams.addPatternListener(u,e,r,n,a),o=s.pipe(u,{end:!1}),o._pipeSource=s}return o}getStore(){return this.store}}m3.StreamingStore=b_e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(ry,t),r(m3,t)})(IB);Object.defineProperty(g3,"__esModule",{value:!0});g3.StreamingStoreMetadata=void 0;const __e=ct,j1=Hi,g_e=IB;class m_e extends g_e.StreamingStore{constructor(e,r){super(e),this.started=!1,this.containedSources=new Set,this.runningIterators=new Set,this.baseMetadata={state:new j1.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1},this.metadataAccumulator=r}import(e){return this.ended||super.import(e),e}hasRunningIterators(){return this.runningIterators.size>0}match(e,r,n,a){const s=super.match(e,r,n,a),o=new __e.ClosableTransformIterator(s,{autoStart:!1,onClose:()=>{this.runningIterators.delete(o)}});let u=this.getStore().countQuads(e,r,n,a);const c={state:new j1.MetadataValidationState,cardinality:{type:"estimate",value:u},canContainUndefs:!1};return o.setProperty("metadata",c),o.setProperty("lastCount",u),s.on("quad",()=>{o.setProperty("lastCount",++u),this.updateMetadataState(o,u)}),this.runningIterators.add(o),o}setBaseMetadata(e,r){if(this.baseMetadata={...e},this.baseMetadata.cardinality={type:"exact",value:0},r)for(const n of this.runningIterators){const a=n.getProperty("lastCount");this.updateMetadataState(n,a)}}updateMetadataState(e,r){const n={state:new j1.MetadataValidationState,cardinality:{type:"estimate",value:r},canContainUndefs:!1};this.metadataAccumulator(this.baseMetadata,n).then(a=>{a.state=new j1.MetadataValidationState;const s=e.getProperty("metadata");e.setProperty("metadata",a),s==null||s.state.invalidate()}).catch(()=>{})}}g3.StreamingStoreMetadata=m_e;Object.defineProperty(ty,"__esModule",{value:!0});ty.MediatedQuadSource=void 0;const v_e=rr,w_e=b3,S_e=g3;class _d{constructor(e,r,n,a,s,o){this.cacheSize=e,this.firstUrl=r,this.forceSourceType=n,this.maxIterators=a,this.aggregateStore=s,this.mediators=o}static nullifyVariables(e){return!e||e.termType==="Variable"?void 0:e}match(e,r,n,a,s){let o;if(this.aggregateStore){const c=s.get(v_e.KeysRdfResolveQuadPattern.hypermediaSourcesAggregatedStores);if(c&&(o=c.get(this.firstUrl),o||(o=new S_e.StreamingStoreMetadata(void 0,(l,d)=>u.accumulateMetadata(l,d)),c.set(this.firstUrl,o)),o.started))return o.match(_d.nullifyVariables(e),_d.nullifyVariables(r),_d.nullifyVariables(n),_d.nullifyVariables(a))}const u=new w_e.MediatedLinkedRdfSourcesAsyncRdfIterator(this.cacheSize,s,this.forceSourceType,e,r,n,a,this.firstUrl,this.maxIterators,o,this.mediators);return this.sourcesState?u.setSourcesState(this.sourcesState):(u.setSourcesState(),this.sourcesState=u.sourcesState),o&&(o.started=!0),u}}ty.MediatedQuadSource=_d;Object.defineProperty(y3,"__esModule",{value:!0});y3.ActorRdfResolveQuadPatternHypermedia=void 0;const Sh=Tl,T_e=Pa,E_e=ty;class O_e extends Sh.ActorRdfResolveQuadPatternSource{constructor(e){super(e),this.cache=this.cacheSize?new T_e.LRUCache({max:this.cacheSize}):void 0;const r=this.cache;r&&this.httpInvalidator.addInvalidateListener(({url:n})=>n?r.delete(n):r.clear()),e.mediatorMetadataAccumulate||(this.mediatorMetadataAccumulate={async mediate(n){return{metadata:{...n.accumulatedMetadata,...n.appendingMetadata}}}})}async test(e){if(!(0,Sh.hasContextSingleSource)(e.context))throw new Error(`Actor ${this.name} can only resolve quad pattern queries against a single source.`);return!0}getSource(e,r){const n=(0,Sh.getContextSource)(e),a=(0,Sh.getContextSourceUrl)(n);let s;return this.cache&&this.cache.has(a)?s=this.cache.get(a):(s=new E_e.MediatedQuadSource(this.cacheSize,a,(0,Sh.getDataSourceType)(n),this.maxIterators,this.aggregateStore,{mediatorMetadata:this.mediatorMetadata,mediatorMetadataExtract:this.mediatorMetadataExtract,mediatorMetadataAccumulate:this.mediatorMetadataAccumulate,mediatorDereferenceRdf:this.mediatorDereferenceRdf,mediatorRdfResolveHypermedia:this.mediatorRdfResolveHypermedia,mediatorRdfResolveHypermediaLinks:this.mediatorRdfResolveHypermediaLinks,mediatorRdfResolveHypermediaLinksQueue:this.mediatorRdfResolveHypermediaLinksQueue}),this.cache&&this.cache.set(a,s)),Promise.resolve(s)}}y3.ActorRdfResolveQuadPatternHypermedia=O_e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(y3,t),r(ty,t)})(xB);var lx={},v3={};Object.defineProperty(v3,"__esModule",{value:!0});v3.ActionObserverHttp=void 0;const A_e=et;let R_e=class extends A_e.ActionObserver{constructor(e){super(e),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener(()=>{this.requests=0})}onRun(e,r,n){this.requests++}};v3.ActionObserverHttp=R_e;var w3={};Object.defineProperty(w3,"__esModule",{value:!0});w3.ActorQueryResultSerializeSparqlJson=void 0;const x_e=ls,I_e=kt;class gd extends x_e.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToJsonBindings(e){if(e.termType==="Literal"){const r=e,n={value:r.value,type:"literal"},{language:a}=r,{datatype:s}=r;return a?n["xml:lang"]=a:s&&s.value!=="http://www.w3.org/2001/XMLSchema#string"&&(n.datatype=s.value),n}return e.termType==="BlankNode"?{value:e.value,type:"bnode"}:e.termType==="Quad"?{value:{subject:gd.bindingToJsonBindings(e.subject),predicate:gd.bindingToJsonBindings(e.predicate),object:gd.bindingToJsonBindings(e.object)},type:"triple"}:{value:e.value,type:"uri"}}async testHandleChecked(e,r){if(!["bindings","boolean"].includes(e.type))throw new Error("This actor can only handle bindings streams or booleans.");return!0}async runHandle(e,r,n){const a=new I_e.Readable;a._read=()=>{};const s={};if(e.type==="bindings"){const u=await e.metadata();u.variables.length>0&&(s.vars=u.variables.map(c=>c.value))}a.push(`{"head": ${JSON.stringify(s)}, +`]).append(["}"]),a=await jfe(n);await this.endpointFetcher.fetchUpdate(this.url,a)}async deleteGraphs(e,r,n){const a=Array.isArray(e)?e:[e],s=[];for(const o of a){let u;typeof o=="string"?u=o:o.termType==="DefaultGraph"?u="DEFAULT":u=`GRAPH <${o.value}>`,s.push(`${n?"DROP":"CLEAR"} ${r?"":"SILENT "}${u}`)}await this.endpointFetcher.fetchUpdate(this.url,s.join("; "))}async createGraphs(e,r){const n=[];for(const a of e)n.push(`CREATE${r?"":" SILENT"} GRAPH <${a.value}>`);await this.endpointFetcher.fetchUpdate(this.url,n.join("; "))}}z0.QuadDestinationSparql=Mfe;Object.defineProperty(j2,"__esModule",{value:!0});j2.ActorRdfUpdateHypermediaSparql=void 0;const Ffe=D2,Lfe=z0;class Bfe extends Ffe.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 Lfe.QuadDestinationSparql(e.metadata.sparqlService||e.url,e.context,this.mediatorHttp)}}}j2.ActorRdfUpdateHypermediaSparql=Bfe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(j2,t),r(z0,t)})(bL);var _L={},M2={},F2={};Object.defineProperty(F2,"__esModule",{value:!0});F2.LazyCardinalityIterator=void 0;const kc=Ut;class $fe extends kc.AsyncIterator{constructor(e){super(),this._source=e,this._count=0,this._buffering=!0,e[kc.DESTINATION]=this,e.on("readable",Yl),e.on("end",Yl),e.on("error",R4),this.readable=e.readable}read(){if(this._buffer)return this._buffer.empty?(this._buffering||this.close(),this.readable=!1,null):this._buffer.shift();let e=null;return this._source.readable&&(e=this._source.read())!==null?this._count+=1:(this.readable=!1,this._source.done&&this.close()),e}getCardinality(){return this._cardinality?this._cardinality:this._error?Promise.reject(this._error):(this._source.done&&this.close(),this.done?this._cardinality=Promise.resolve(this._count):(this._buffer=new kc.LinkedList,this._cardinality=new Promise((e,r)=>{this._source.removeListener("readable",Yl),this._source.removeListener("end",Yl);const n=()=>{this._source.removeListener("data",a),this._source.removeListener("end",s),this._source.removeListener("error",o)},a=u=>{this._buffer.push(u),this._count+=1,this.readable=!0},s=()=>{this._buffering=!1,n(),e(this._count)},o=u=>{this._buffering=!1,n(),r(u)};this._source.on("data",a),this._source.on("end",s),this._source.on("error",o)})),this._cardinality)}close(){this._source.removeListener("readable",Yl),this._source.removeListener("end",Yl),this._source.removeListener("error",R4),delete this._source[kc.DESTINATION],this._source.destroy(),super.close()}}F2.LazyCardinalityIterator=$fe;function Yl(){this[kc.DESTINATION].readable=!0}function R4(t){this[kc.DESTINATION]._error=t,this[kc.DESTINATION].emit("error",t)}Object.defineProperty(M2,"__esModule",{value:!0});M2.ActorQueryOperationSparqlEndpoint=void 0;const Ufe=$n,qfe=ct,yh=Tl,mT=Cf,Vfe=rr,Hfe=Hi,kfe=Ut,Qfe=R2,Gfe=ht,gu=xt,zfe=F2,Wfe=new Ufe.BindingsFactory,Xfe=new Gfe.DataFactory;class xp extends qfe.ActorQueryOperation{constructor(e){super(e),this.endpointFetcher=new Qfe.SparqlEndpointFetcher({method:e.forceHttpGet?"GET":"POST",fetch:(r,n)=>this.mediatorHttp.mediate({input:r,init:n,context:this.lastContext}),prefixVariableQuestionMark:!0})}async test(e){if(!e.operation)throw new Error("Missing field 'operation' in a query operation action.");const r=(0,yh.getContextSourceFirst)(e.context),n=(0,mT.getContextDestinationFirst)(e.context),a=r?(0,yh.getDataSourceType)(r):void 0,s=n?(0,mT.getDataDestinationType)(n):void 0,o=r?(0,yh.getDataSourceValue)(r):void 0,u=n?(0,mT.getDataDestinationValue)(n):void 0;if(r&&a==="sparql"&&(!n||s==="sparql"&&u===o)||r&&!a&&(!n||!s&&u===o)&&typeof o=="string"&&(this.checkUrlSuffixSparql&&o.endsWith("/sparql")||this.checkUrlSuffixUpdate&&o.endsWith("/update")))return{httpRequests:1};throw new Error(`${this.name} requires a single source with a 'sparql' endpoint to be present in the context or URL ending on /sparql or /update.`)}async run(e){const r=(0,yh.getContextSourceFirst)(e.context);if(!r)throw new Error("Illegal state: undefined sparql endpoint source.");const n=(0,yh.getDataSourceValue)(r);this.lastContext=e.context;let a,s,o;try{a=e.context.get(Vfe.KeysInitQuery.queryString)??(0,gu.toSparql)(e.operation,{sparqlStar:!0}),s=this.endpointFetcher.getQueryType(a),s==="UNKNOWN"&&(s=this.endpointFetcher.getUpdateTypes(a))}catch{}(!s||s==="UNKNOWN")&&(o=gu.Util.inScopeVariables(e.operation),a=(0,gu.toSparql)(xp.FACTORY.createProject(e.operation,o)),s="SELECT");const u=this.canOperationContainUndefs(e.operation);switch(s){case"SELECT":return o||(o=gu.Util.inScopeVariables(e.operation)),this.executeQuery(n,a,!1,o,u);case"CONSTRUCT":return this.executeQuery(n,a,!0,void 0,!1);case"ASK":return{type:"boolean",execute:()=>this.endpointFetcher.fetchAsk(n,a)};default:return{type:"void",execute:()=>this.endpointFetcher.fetchUpdate(n,a)}}}executeQuery(e,r,n,a,s){const o=n?this.endpointFetcher.fetchTriples(e,r):this.endpointFetcher.fetchBindings(e,r),u=(0,kfe.wrap)(o,{autoStart:!1}).map(d=>n?d:Wfe.bindings(Object.entries(d).map(([f,h])=>[Xfe.variable(f.slice(1)),h]))),c=new zfe.LazyCardinalityIterator(u),l=xp.cachifyMetadata(async()=>({state:new Hfe.MetadataValidationState,cardinality:{type:"exact",value:await c.getCardinality()},canContainUndefs:s,variables:a}));return n?{type:"quads",quadStream:c,metadata:l}:{type:"bindings",bindingsStream:c,metadata:l}}canOperationContainUndefs(e){let r=!1;return gu.Util.recurseOperation(e,{[gu.Algebra.types.LEFT_JOIN](){return r=!0,!1},[gu.Algebra.types.VALUES](n){for(const a of n.bindings){const s=Object.keys(a);n.variables.every(o=>s.includes(`?${o.value}`))||(r=!0)}return!1}}),r}}M2.ActorQueryOperationSparqlEndpoint=xp;xp.FACTORY=new gu.Factory;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(M2,t)})(_L);var gL={},L2={};Object.defineProperty(L2,"__esModule",{value:!0});L2.ActorQueryOperationAsk=void 0;const x4=ct;class Kfe extends x4.ActorQueryOperationTypedMediated{constructor(e){super(e,"ask")}async testOperation(e,r){return!0}async runOperation(e,r){const n=await this.mediatorQueryOperation.mediate({operation:e.input,context:r}),{bindingsStream:a}=x4.ActorQueryOperation.getSafeBindings(n);return{type:"boolean",execute:async()=>(await a.take(1).toArray()).length===1}}}L2.ActorQueryOperationAsk=Kfe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(L2,t)})(gL);var mL={},B2={};Object.defineProperty(B2,"__esModule",{value:!0});B2.ActorQueryOperationBgpJoin=void 0;const Jfe=ct,Yfe=xt;class $2 extends Jfe.ActorQueryOperationTypedMediated{constructor(e){super(e,"bgp")}async testOperation(e,r){return!0}async runOperation(e,r){return this.mediatorQueryOperation.mediate({operation:$2.FACTORY.createJoin(e.patterns),context:r})}}B2.ActorQueryOperationBgpJoin=$2;$2.FACTORY=new Yfe.Factory;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(B2,t)})(mL);var WR={},U2={},W0={};Object.defineProperty(W0,"__esModule",{value:!0});W0.BindingsToQuadsIterator=void 0;const I4=Ut,Zfe=ht,P4=An,ehe=new Zfe.DataFactory;class yd extends I4.MultiTransformIterator{constructor(e,r){super(r,{autoStart:!1}),this.template=e,this.blankNodeCounter=0}static bindTerm(e,r){return r.termType==="Variable"?e.get(r):r}static bindQuad(e,r){try{return(0,P4.mapTermsNested)(r,n=>{const a=yd.bindTerm(e,n);if(!a)throw new Error("Unbound term");return a})}catch{}}static localizeBlankNode(e,r){return r.termType==="BlankNode"?ehe.blankNode(`${r.value}${e}`):r}static localizeQuad(e,r){return(0,P4.mapTermsNested)(r,n=>yd.localizeBlankNode(e,n))}bindTemplate(e,r,n){return r.map(yd.localizeQuad.bind(null,n)).map(s=>yd.bindQuad.bind(null,e)(s)).filter(Boolean)}_createTransformer(e){return new I4.ArrayIterator(this.bindTemplate(e,this.template,this.blankNodeCounter++),{autoStart:!1})}}W0.BindingsToQuadsIterator=yd;Object.defineProperty(U2,"__esModule",{value:!0});U2.ActorQueryOperationConstruct=void 0;const D4=ct,vT=An,the=xt,rhe=W0;class XR extends D4.ActorQueryOperationTypedMediated{constructor(e){super(e,"construct")}static getVariables(e){return(0,vT.uniqTerms)([].concat.apply([],e.map(r=>(0,vT.getVariables)((0,vT.getTermsNested)(r)))))}async testOperation(e,r){return!0}async runOperation(e,r){const n=XR.getVariables(e.template),a={type:the.Algebra.types.PROJECT,input:e.input,variables:n},s=D4.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:a,context:r})),o=new rhe.BindingsToQuadsIterator(e.template,s.bindingsStream);return{metadata:()=>s.metadata().then(c=>({...c,order:void 0,cardinality:{type:c.cardinality.type,value:c.cardinality.value*e.template.length},canContainUndefs:!1,availableOrders:void 0})),quadStream:o,type:"quads"}}}U2.ActorQueryOperationConstruct=XR;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(U2,t),r(W0,t)})(WR);var vL={},q2={},V2={},H2={};Object.defineProperty(H2,"__esModule",{value:!0});H2.ActorQueryOperationUnion=void 0;const N4=ct,nhe=Hi,ihe=Ut,ahe=An;class Bb extends N4.ActorQueryOperationTypedMediated{constructor(e){super(e,"union")}static unionVariables(e){return(0,ahe.uniqTerms)(e.flat())}static unionMetadata(e,r){const n={type:"exact",value:0};for(const o of e)if(o.cardinality.value&&Number.isFinite(o.cardinality.value)||o.cardinality.value===0)o.cardinality.type==="estimate"&&(n.type="estimate"),n.value+=o.cardinality.value;else{n.type="estimate",n.value=Number.POSITIVE_INFINITY;break}const a={state:new nhe.MetadataValidationState,cardinality:n,canContainUndefs:e.some(o=>o.canContainUndefs)},s=()=>a.state.invalidate();for(const o of e)o.state.addInvalidateListener(s);return r&&(a.variables=Bb.unionVariables(e.map(o=>o.variables))),a}async testOperation(e,r){return!0}async runOperation(e,r){const n=(await Promise.all(e.input.map(o=>this.mediatorQueryOperation.mediate({operation:o,context:r})))).map(N4.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new ihe.UnionIterator(n.map(o=>o.bindingsStream),{autoStart:!1}),metadata:()=>Promise.all(n.map(o=>o.metadata())).then(o=>Bb.unionMetadata(o,!0))}}}H2.ActorQueryOperationUnion=Bb;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(H2,t)})(V2);Object.defineProperty(q2,"__esModule",{value:!0});q2.ActorQueryOperationDescribeSubject=void 0;const she=V2,C4=ct,ohe=Ut,uhe=ht,g1=xt,Zl=new uhe.DataFactory;class che extends C4.ActorQueryOperationTypedMediated{constructor(e){super(e,"describe")}async testOperation(e,r){return!0}async runOperation(e,r){const n=e.terms.filter(u=>u.termType!=="Variable").map(u=>{const c=[Zl.quad(u,Zl.variable("__predicate"),Zl.variable("__object"))];return c.forEach(d=>d.type="pattern"),{input:{type:g1.Algebra.types.BGP,patterns:c},template:c,type:"construct"}});if(n.length!==e.terms.length){let u=[];e.terms.filter(c=>c.termType==="Variable").forEach((c,l)=>{const d=[Zl.quad(c,Zl.variable(`__predicate${l}`),Zl.variable(`__object${l}`))];d.forEach(f=>f.type="pattern"),u=[...u,...d]}),n.push({input:{type:g1.Algebra.types.JOIN,input:[e.input,{type:g1.Algebra.types.BGP,patterns:u}]},template:u,type:g1.Algebra.types.CONSTRUCT})}const a=(await Promise.all(n.map(u=>this.mediatorQueryOperation.mediate({operation:u,context:r})))).map(C4.ActorQueryOperation.getSafeQuads);return{type:"quads",quadStream:new ohe.UnionIterator(a.map(u=>u.quadStream),{autoStart:!1}),metadata:()=>Promise.all(a.map(u=>u.metadata())).then(u=>she.ActorQueryOperationUnion.unionMetadata(u,!1))}}}q2.ActorQueryOperationDescribeSubject=che;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(q2,t)})(vL);var wL={},k2={};Object.defineProperty(k2,"__esModule",{value:!0});k2.ActorQueryOperationDistinctHash=void 0;const j4=ct;class lhe extends j4.ActorQueryOperationTypedMediated{constructor(e){super(e,"distinct")}async testOperation(e,r){return!0}async runOperation(e,r){const n=j4.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:r}));return{type:"bindings",bindingsStream:n.bindingsStream.filter(await this.newHashFilter(r)),metadata:n.metadata}}async newHashFilter(e){const{hashFunction:r}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:e}),n={};return a=>{const s=r(a);return!(s in n)&&(n[s]=!0)}}}k2.ActorQueryOperationDistinctHash=lhe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(k2,t)})(wL);var SL={},Q2={},Al={},X0={},K0={},wT={},Ai={};Object.defineProperty(Ai,"__esModule",{value:!0});Ai.asTermType=Ai.ExpressionType=void 0;var M4;(function(t){t.Aggregate="aggregate",t.Existence="existence",t.Named="named",t.Operator="operator",t.SpecialOperator="specialOperator",t.Term="term",t.Variable="variable",t.AsyncExtension="asyncExtension",t.SyncExtension="syncExtension"})(M4||(Ai.ExpressionType=M4={}));function dhe(t){if(t==="namedNode"||t==="literal"||t==="blankNode"||t==="quad")return t}Ai.asTermType=dhe;var G2={};Object.defineProperty(G2,"__esModule",{value:!0});G2.Variable=void 0;const fhe=Ai;class hhe{constructor(e){this.expressionType=fhe.ExpressionType.Variable,this.name=e}}G2.Variable=hhe;var ft={},bh={},ni={};(function(t){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;var e;(function(o){o.SPARQL_NUMERIC="SPARQL_NUMERIC",o.SPARQL_STRINGLY="SPARQL_STRINGLY"})(e||(t.TypeAlias=e={}));var r;(function(o){o.XSD_ANY_URI="http://www.w3.org/2001/XMLSchema#anyURI",o.XSD_STRING="http://www.w3.org/2001/XMLSchema#string",o.RDF_LANG_STRING="http://www.w3.org/1999/02/22-rdf-syntax-ns#langString",o.XSD_BOOLEAN="http://www.w3.org/2001/XMLSchema#boolean",o.XSD_DATE_TIME="http://www.w3.org/2001/XMLSchema#dateTime",o.XSD_DATE_TIME_STAMP="http://www.w3.org/2001/XMLSchema#dateTimeStamp",o.XSD_DATE="http://www.w3.org/2001/XMLSchema#date",o.XSD_G_MONTH="http://www.w3.org/2001/XMLSchema#gMonth",o.XSD_G_MONTHDAY="http://www.w3.org/2001/XMLSchema#gMonthDay",o.XSD_G_YEAR="http://www.w3.org/2001/XMLSchema#gYear",o.XSD_G_YEAR_MONTH="http://www.w3.org/2001/XMLSchema#gYearMonth",o.XSD_TIME="http://www.w3.org/2001/XMLSchema#time",o.XSD_G_DAY="http://www.w3.org/2001/XMLSchema#gDay",o.XSD_DECIMAL="http://www.w3.org/2001/XMLSchema#decimal",o.XSD_FLOAT="http://www.w3.org/2001/XMLSchema#float",o.XSD_DOUBLE="http://www.w3.org/2001/XMLSchema#double",o.XSD_INTEGER="http://www.w3.org/2001/XMLSchema#integer",o.XSD_NON_POSITIVE_INTEGER="http://www.w3.org/2001/XMLSchema#nonPositiveInteger",o.XSD_NEGATIVE_INTEGER="http://www.w3.org/2001/XMLSchema#negativeInteger",o.XSD_LONG="http://www.w3.org/2001/XMLSchema#long",o.XSD_INT="http://www.w3.org/2001/XMLSchema#int",o.XSD_SHORT="http://www.w3.org/2001/XMLSchema#short",o.XSD_BYTE="http://www.w3.org/2001/XMLSchema#byte",o.XSD_NON_NEGATIVE_INTEGER="http://www.w3.org/2001/XMLSchema#nonNegativeInteger",o.XSD_POSITIVE_INTEGER="http://www.w3.org/2001/XMLSchema#positiveInteger",o.XSD_UNSIGNED_LONG="http://www.w3.org/2001/XMLSchema#unsignedLong",o.XSD_UNSIGNED_INT="http://www.w3.org/2001/XMLSchema#unsignedInt",o.XSD_UNSIGNED_SHORT="http://www.w3.org/2001/XMLSchema#unsignedShort",o.XSD_UNSIGNED_BYTE="http://www.w3.org/2001/XMLSchema#unsignedByte",o.XSD_NORMALIZED_STRING="http://www.w3.org/2001/XMLSchema#normalizedString",o.XSD_TOKEN="http://www.w3.org/2001/XMLSchema#token",o.XSD_LANGUAGE="http://www.w3.org/2001/XMLSchema#language",o.XSD_NM_TOKEN="http://www.w3.org/2001/XMLSchema#NMTOKEN",o.XSD_NAME="http://www.w3.org/2001/XMLSchema#name",o.XSD_NC_NAME="http://www.w3.org/2001/XMLSchema#NCName",o.XSD_ENTITY="http://www.w3.org/2001/XMLSchema#ENTITY",o.XSD_ID="http://www.w3.org/2001/XMLSchema#ID",o.XSD_ID_REF="http://www.w3.org/2001/XMLSchema#IDREF",o.XSD_DURATION="http://www.w3.org/2001/XMLSchema#duration",o.XSD_YEAR_MONTH_DURATION="http://www.w3.org/2001/XMLSchema#yearMonthDuration",o.XSD_DAY_TIME_DURATION="http://www.w3.org/2001/XMLSchema#dayTimeDuration"})(r||(t.TypeURL=r={}));var n;(function(o){o.NOT="!",o.UMINUS="uminus",o.UPLUS="uplus",o.EQUAL="=",o.NOT_EQUAL="!=",o.LT="<",o.GT=">",o.LTE="<=",o.GTE=">=",o.MULTIPLICATION="*",o.DIVISION="/",o.ADDITION="+",o.SUBTRACTION="-",o.IS_IRI="isiri",o.IS_URI="isuri",o.IS_BLANK="isblank",o.IS_LITERAL="isliteral",o.IS_NUMERIC="isnumeric",o.STR="str",o.LANG="lang",o.DATATYPE="datatype",o.IRI="iri",o.URI="uri",o.STRDT="strdt",o.STRLANG="strlang",o.UUID="uuid",o.STRUUID="struuid",o.STRLEN="strlen",o.SUBSTR="substr",o.UCASE="ucase",o.LCASE="lcase",o.STRSTARTS="strstarts",o.STRENDS="strends",o.CONTAINS="contains",o.STRBEFORE="strbefore",o.STRAFTER="strafter",o.ENCODE_FOR_URI="encode_for_uri",o.LANG_MATCHES="langmatches",o.REGEX="regex",o.REPLACE="replace",o.ABS="abs",o.ROUND="round",o.CEIL="ceil",o.FLOOR="floor",o.RAND="rand",o.NOW="now",o.YEAR="year",o.MONTH="month",o.DAY="day",o.HOURS="hours",o.MINUTES="minutes",o.SECONDS="seconds",o.TIMEZONE="timezone",o.TZ="tz",o.MD5="md5",o.SHA1="sha1",o.SHA256="sha256",o.SHA384="sha384",o.SHA512="sha512",o.TRIPLE="triple",o.SUBJECT="subject",o.PREDICATE="predicate",o.OBJECT="object",o.IS_TRIPLE="istriple"})(n||(t.RegularOperator=n={}));var a;(function(o){o.BOUND="bound",o.IF="if",o.COALESCE="coalesce",o.LOGICAL_OR="||",o.LOGICAL_AND="&&",o.SAME_TERM="sameterm",o.IN="in",o.NOT_IN="notin",o.CONCAT="concat",o.BNODE="bnode"})(a||(t.SpecialOperator=a={})),t.RegularOperators=new Set(Object.values(n)),t.SpecialOperators=new Set(Object.values(a)),t.Operators=new Set([...t.RegularOperators,...t.SpecialOperators]);var s;(function(o){o.COUNT="count",o.SUM="sum",o.MIN="min",o.MAX="max",o.AVG="avg",o.GROUP_CONCAT="group_concat",o.SAMPLE="sample"})(s||(t.SetFunction=s={})),t.SetFunctions=new Set(Object.values(s)),t.NamedOperators=new Set([r.XSD_STRING,r.XSD_FLOAT,r.XSD_DOUBLE,r.XSD_DECIMAL,r.XSD_INTEGER,r.XSD_DATE_TIME,r.XSD_DATE,r.XSD_BOOLEAN,r.XSD_TIME,r.XSD_DURATION,r.XSD_DAY_TIME_DURATION,r.XSD_YEAR_MONTH_DURATION])})(ni);var Ke={};Object.defineProperty(Ke,"__esModule",{value:!0});Ke.NoExistenceHook=Ke.NoAggregator=Ke.ExtensionFunctionError=Ke.UnknownNamedOperator=Ke.UnknownOperator=Ke.InvalidTermType=Ke.InvalidExpressionType=Ke.InvalidExpression=Ke.InvalidArity=Ke.UnexpectedError=Ke.ParseError=Ke.EmptyAggregateError=Ke.IncompatibleLanguageOperation=Ke.InvalidTimezoneCall=Ke.CastError=Ke.InvalidCompareArgumentTypes=Ke.InvalidArgumentTypes=Ke.InError=Ke.CoalesceError=Ke.RDFEqualTypeError=Ke.EBVCoercionError=Ke.UnboundVariableError=Ke.InvalidLexicalForm=Ke.isExpressionError=Ke.ExpressionError=void 0;class Ii extends Error{}Ke.ExpressionError=Ii;function phe(t){return t instanceof Ii}Ke.isExpressionError=phe;class yhe extends Ii{constructor(e){super(`Invalid lexical form '${ii(e)}'`),this.arg=e}}Ke.InvalidLexicalForm=yhe;class bhe extends Ii{constructor(e,r){super(`Unbound variable '${ii(e)}'`),this.variable=e,this.bindings=r}}Ke.UnboundVariableError=bhe;class _he extends Ii{constructor(e){super(`Cannot coerce term to EBV '${ii(e)}'`),this.arg=e}}Ke.EBVCoercionError=_he;class ghe extends Ii{constructor(e){super("Equality test for literals with unsupported datatypes"),this.args=e}}Ke.RDFEqualTypeError=ghe;class mhe extends Ii{constructor(e){super("All COALESCE arguments threw errors"),this.errors=e}}Ke.CoalesceError=mhe;class vhe extends Ii{constructor(e){super(`Some argument to IN errorred and none where equal. ${e.map(r=>`(${r.toString()}) `).join("and ")}`),this.errors=e}}Ke.InError=vhe;class whe extends Ii{constructor(e,r){super(`Argument types not valid for operator: '${ii(r)}' with '${ii(e)}`),this.args=e,this.op=r}}Ke.InvalidArgumentTypes=whe;class She extends Ii{constructor(e,r){super(`Compared argument types are supported: '${e.termType}' and '${r.termType}'`),this.arg0=e,this.arg1=r}}Ke.InvalidCompareArgumentTypes=She;class The extends Ii{constructor(e,r){super(`Invalid cast: '${ii(e)}' to '${ii(r)}'`),this.arg=e}}Ke.CastError=The;class Ehe extends Ii{constructor(e){super(`TIMEZONE call on ${e} which has no timezone`),this.dateString=e}}Ke.InvalidTimezoneCall=Ehe;class Ohe extends Ii{constructor(e,r){super(`Operation on incompatible language literals '${ii(e)}' and '${ii(r)}'`),this.arg1=e,this.arg2=r}}Ke.IncompatibleLanguageOperation=Ohe;class Ahe extends Ii{constructor(){super("Empty aggregate expression")}}Ke.EmptyAggregateError=Ahe;class Rhe extends Ii{constructor(e,r){super(`Failed to parse ${e} as ${r}.`)}}Ke.ParseError=Rhe;class xhe extends Error{constructor(e,r){super(`Programmer Error '${e}'`),this.payload=r}}Ke.UnexpectedError=xhe;class Ihe extends Error{constructor(e,r){super(`The number of args does not match the arity of the operator '${ii(r)}'.`),this.args=e,this.op=r}}Ke.InvalidArity=Ihe;class Phe extends Error{constructor(e){super(`Invalid SPARQL Expression '${ii(e)}'`)}}Ke.InvalidExpression=Phe;class Dhe extends Error{constructor(e){super(`Invalid expression type for SPARQL Expression '${ii(e)}'`),this.expr=e}}Ke.InvalidExpressionType=Dhe;class Nhe extends Error{constructor(e){super(`Invalid term type for term '${ii(e)}'`),this.term=e}}Ke.InvalidTermType=Nhe;class Che extends Error{constructor(e){super(`Unknown operator: '${ii(e)}`)}}Ke.UnknownOperator=Che;class jhe extends Error{constructor(e){super(`Unknown named operator: '${ii(e)}'`)}}Ke.UnknownNamedOperator=jhe;class Mhe extends Error{constructor(e,r){r instanceof Error?super(`Error thrown in ${e}: ${r.message}${r.stack?` +${r.stack}`:""}`):super(`Error thrown in ${e}`)}}Ke.ExtensionFunctionError=Mhe;class Fhe extends Error{constructor(e){super(`Aggregate expression ${ii(e)} found, but no aggregate hook provided.`)}}Ke.NoAggregator=Fhe;class Lhe extends Error{constructor(){super("EXISTS found, but no existence hook provided.")}}Ke.NoExistenceHook=Lhe;function ii(t){return JSON.stringify(t)}var zr={},jt={};Object.defineProperty(jt,"__esModule",{value:!0});jt.extractTimeZone=jt.extractRawTimeZone=jt.dayTimeDurationsToSeconds=jt.yearMonthDurationsToMonths=jt.trimToDayTimeDuration=jt.trimToYearMonthDuration=jt.toUTCDate=jt.toJSDate=jt.negateDuration=jt.toDateTimeRepresentation=jt.defaultedDateTimeRepresentation=jt.simplifyDurationRepresentation=jt.defaultedDurationRepresentation=jt.defaultedYearMonthDurationRepresentation=jt.defaultedDayTimeDurationRepresentation=void 0;function TL(t){return{day:t.day||0,hours:t.hours||0,minutes:t.minutes||0,seconds:t.seconds||0}}jt.defaultedDayTimeDurationRepresentation=TL;function EL(t){return{year:t.year||0,month:t.month||0}}jt.defaultedYearMonthDurationRepresentation=EL;function OL(t){return{...TL(t),...EL(t)}}jt.defaultedDurationRepresentation=OL;function Bhe(t){const e=OL(t),r={},n=e.year+Math.trunc(e.month/12);n&&(r.year=n,e.month%=12),e.month&&(r.month=e.month);const a=e.day+Math.trunc(e.hours/24)+Math.trunc(e.minutes/(24*60))+Math.trunc(e.seconds/(24*60*60));a&&(r.day=a,e.hours%=24,e.minutes%=24*60,e.seconds%=24*60*60);const s=e.hours+Math.trunc(e.minutes/60)+Math.trunc(e.seconds/(60*60));s&&(r.hours=s,e.minutes%=60,e.seconds%=60*60);const o=e.minutes+Math.trunc(e.seconds/60);return o&&(r.minutes=o,e.seconds%=60),e.seconds&&(r.seconds=e.seconds),r}jt.simplifyDurationRepresentation=Bhe;function AL(t){return{...t,day:t.day||1,hours:t.hours||0,month:t.month||1,year:t.year||0,seconds:t.seconds||0,minutes:t.minutes||0}}jt.defaultedDateTimeRepresentation=AL;function $he({date:t,timeZone:e}){return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),hours:t.getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),zoneHours:e.zoneHours,zoneMinutes:e.zoneMinutes}}jt.toDateTimeRepresentation=$he;function Uhe(t){return{year:t.year!==void 0?-1*t.year:void 0,month:t.month!==void 0?-1*t.month:void 0,day:t.day!==void 0?-1*t.day:void 0,hours:t.hours!==void 0?-1*t.hours:void 0,minutes:t.minutes!==void 0?-1*t.minutes:void 0,seconds:t.seconds!==void 0?-1*t.seconds:void 0}}jt.negateDuration=Uhe;function RL(t){const e=new Date(t.year,t.month-1,t.day,t.hours,t.minutes,Math.trunc(t.seconds),t.seconds%1*1e3);return 0<=t.year&&t.year<100&&e.setFullYear(e.getFullYear()-1900),e}jt.toJSDate=RL;function qhe(t,e){const r=RL(AL(t)),n=r.getTimezoneOffset(),a=t.zoneHours===void 0?e.zoneHours:t.zoneHours,s=t.zoneMinutes===void 0?e.zoneMinutes:t.zoneMinutes;return new Date(r.getTime()-(n+a*60+s)*60*1e3)}jt.toUTCDate=qhe;function Vhe(t){return{year:t.year,month:t.month}}jt.trimToYearMonthDuration=Vhe;function Hhe(t){return{day:t.day,hours:t.hours,minutes:t.minutes,seconds:t.seconds}}jt.trimToDayTimeDuration=Hhe;function khe(t){return t.year*12+t.month}jt.yearMonthDurationsToMonths=khe;function Qhe(t){return((t.day*24+t.hours)*60+t.minutes)*60+t.seconds}jt.dayTimeDurationsToSeconds=Qhe;function Ghe(t){return/(Z|([+-]\d\d:\d\d))?$/u.exec(t)[0]}jt.extractRawTimeZone=Ghe;function zhe(t){return{zoneHours:t.getTimezoneOffset()/60,zoneMinutes:t.getTimezoneOffset()%60}}jt.extractTimeZone=zhe;var Co={};Object.defineProperty(Co,"__esModule",{value:!0});Co.elapsedDuration=Co.addDurationToDateTime=Co.maximumDayInMonthFor=void 0;const F4=jt;function Ao(t,e,r=0){const n=t-r,a=e-r,s=Math.floor(n/a);return{intDiv:s,remainder:t-s*a}}function ib(t,e){const{intDiv:r,remainder:n}=Ao(e,13,1),a=t+r;return[1,3,5,7,8,10,12].includes(n)?31:[4,6,9,11].includes(n)?30:n===2&&(Ao(a,400).remainder===0||Ao(a,100).remainder!==0&&Ao(a,4).remainder===0)?29:28}Co.maximumDayInMonthFor=ib;function Whe(t,e){const r={...t};let n=Ao(t.month+e.month,13,1);for(r.month=n.remainder,r.year=t.year+e.year+n.intDiv,n=Ao(t.seconds+e.seconds,60),r.seconds=n.remainder,n=Ao(t.minutes+e.minutes+n.intDiv,60),r.minutes=n.remainder,n=Ao(t.hours+e.hours+n.intDiv,24),r.hours=n.remainder,r.day=t.day+e.day+n.intDiv;;){let a;if(r.day<1)r.day+=ib(r.year,r.month-1),a=-1;else if(r.day>ib(r.year,r.month))r.day-=ib(r.year,r.month),a=1;else break;n=Ao(r.month+a,13,1),r.month=n.remainder,r.year+=n.intDiv}return r}Co.addDurationToDateTime=Whe;function Xhe(t,e,r){const n=(0,F4.toUTCDate)(t,r),a=(0,F4.toUTCDate)(e,r),s=n.getTime()-a.getTime();return{day:Math.floor(s/(1e3*60*60*24)),hours:Math.floor(s%(1e3*60*60*24)/(1e3*60*60)),minutes:Math.floor(s%(1e3*60*60)/(1e3*60)),seconds:s%(1e3*60)}}Co.elapsedDuration=Xhe;Object.defineProperty(zr,"__esModule",{value:!0});zr.parseDayTimeDuration=zr.parseYearMonthDuration=zr.parseDuration=zr.parseTime=zr.parseDate=zr.parseDateTime=zr.parseXSDInteger=zr.parseXSDDecimal=zr.parseXSDFloat=void 0;const Khe=jt,jo=Ke,Jhe=Co;function Yhe(t){const e=Number(t);return Number.isNaN(e)?t==="NaN"?Number.NaN:t==="INF"||t==="+INF"?Number.POSITIVE_INFINITY:t==="-INF"?Number.NEGATIVE_INFINITY:void 0:e}zr.parseXSDFloat=Yhe;function Zhe(t){const e=Number(t);return Number.isNaN(e)?void 0:e}zr.parseXSDDecimal=Zhe;function epe(t){const e=Number.parseInt(t,10);return Number.isNaN(e)?void 0:e}zr.parseXSDInteger=epe;function tpe(t){const[e,r]=t.split("T");return{...IL(e),...PL(r)}}zr.parseDateTime=tpe;function xL(t){if(t==="")return{zoneHours:void 0,zoneMinutes:void 0};if(t==="Z")return{zoneHours:0,zoneMinutes:0};const r=t.replace(/^([+|-])(\d\d):(\d\d)$/gu,"$11!$2!$3").split("!").map(n=>Number(n));return{zoneHours:r[0]*r[1],zoneMinutes:r[0]*r[2]}}function IL(t){const e=t.replace(/^(-)?([123456789]*\d{4})-(\d\d)-(\d\d)(Z|([+-]\d\d:\d\d))?$/gu,"$11!$2!$3!$4!$5");if(e===t)throw new jo.ParseError(t,"date");const r=e.split("!"),n=r.slice(0,-1).map(s=>Number(s)),a={year:n[0]*n[1],month:n[2],day:n[3],...xL(r[4])};if(!(1<=a.month&&a.month<=12)||!(1<=a.day&&a.day<=(0,Jhe.maximumDayInMonthFor)(a.year,a.month)))throw new jo.ParseError(t,"date");return a}zr.parseDate=IL;function PL(t){const e=t.replace(/^(\d\d):(\d\d):(\d\d(\.\d+)?)(Z|([+-]\d\d:\d\d))?$/gu,"$1!$2!$3!$5");if(e===t)throw new jo.ParseError(t,"time");const r=e.split("!"),n=r.slice(0,-1).map(s=>Number(s)),a={hours:n[0],minutes:n[1],seconds:n[2],...xL(r[3])};if(a.seconds>=60||a.minutes>=60||a.hours>24||a.hours===24&&(a.minutes!==0||a.seconds!==0))throw new jo.ParseError(t,"time");return a}function rpe(t){const e=PL(t);return e.hours%=24,e}zr.parseTime=rpe;function KR(t){const[e,r]=t.split("T"),n=e.replace(/^(-)?P(\d+Y)?(\d+M)?(\d+D)?$/gu,"$11S!$2!$3!$4");if(n===e)throw new jo.ParseError(t,"duration");const a=n.split("!");if(r!==void 0){const u=r.replace(/^(\d+H)?(\d+M)?(\d+(\.\d+)?S)?$/gu,"$1!$2!$3");if(r===""||r===u)throw new jo.ParseError(t,"duration");a.push(...u.split("!"))}const s=a.map(u=>u.slice(0,-1));if(!s.slice(1).some(u=>u))throw new jo.ParseError(t,"duration");const o=Number(s[0]);return(0,Khe.simplifyDurationRepresentation)({year:s[1]?o*Number(s[1]):void 0,month:s[2]?o*Number(s[2]):void 0,day:s[3]?o*Number(s[3]):void 0,hours:s[4]?o*Number(s[4]):void 0,minutes:s[5]?o*Number(s[5]):void 0,seconds:s[6]?o*Number(s[6]):void 0})}zr.parseDuration=KR;function npe(t){const e=KR(t);if(["hours","minutes","seconds","day"].some(r=>!!e[r]))throw new jo.ParseError(t,"yearMonthDuration");return e}zr.parseYearMonthDuration=npe;function ipe(t){const e=KR(t);if(["year","month"].some(r=>!!e[r]))throw new jo.ParseError(t,"dayTimeDuration");return e}zr.parseDayTimeDuration=ipe;var ST={},wr={},_h={},L4;function DL(){if(L4)return _h;L4=1,Object.defineProperty(_h,"__esModule",{value:!0}),_h.OverloadTree=void 0;const t=aa(),e=z2();let r=class yO{constructor(a,s){this.identifier=a,this.implementation=void 0,this.generalOverloads=Object.create(null),this.literalOverLoads=[],this.depth=s||0,this.promotionCount=void 0}getSubtree(a){const s=(0,e.asGeneralType)(a);if(s)return this.generalOverloads[s];for(const[o,u]of this.literalOverLoads)if(a===o)return u}getImplementationExact(a){let s=this;for(const o of a)if(s=s.getSubtree(o),!s)return;return s.implementation}search(a,s,o){let u=o[this.identifier],c=0;for(;c({node:f,index:d+1})));l.length>0;){const{index:f,node:h}=l.pop();if(f===a.length&&h.implementation)return this.addToCache(o,a,h.implementation),h.implementation;l.push(...h.getSubTreeWithArg(a[f],s).map(p=>({node:p,index:f+1})))}}addToCache(a,s,o){function u(l,d){return d in l||(l[d]={}),l[d]}let c=u(a,this.identifier);for(const l of s){const d=(0,t.isLiteralTermExpression)(l),f=d?d.dataType:l.termType;c.cache=c.cache||{},c=u(c.cache,f)}c.func=o}addOverload(a,s){this._addOverload([...a],s,0)}_addOverload(a,s,o){var d;const[u,...c]=a;if(!u){(this.promotionCount===void 0||o<=this.promotionCount)&&(this.promotionCount=o,this.implementation=s);return}let l=this.getSubtree(u);if(!l){const f=new yO(this.identifier,this.depth+1),h=(0,e.asGeneralType)(u);h&&(this.generalOverloads[h]=f);const p=(0,e.asOverrideType)(u);p&&this.literalOverLoads.push([p,f]),l=f}l._addOverload(c,s,o),(d=e.typePromotion[u])==null||d.forEach(f=>this.addPromotedOverload(f.typeToPromote,s,f.conversionFunction,c,o))}addPromotedOverload(a,s,o,u,c){let l=this.getSubtree(a);if(!l){const d=new yO(this.identifier,this.depth+1);this.literalOverLoads.push([a,d]),l=d}l._addOverload(u,d=>f=>s(d)([...f.slice(0,this.depth),o(f[this.depth]),...f.slice(this.depth+1,f.length)]),c+1)}getSubTreeWithArg(a,s){const o=[],u=(0,t.isLiteralTermExpression)(a);if(this.generalOverloads.term&&o.push(this.generalOverloads.term),this.generalOverloads[a.termType]&&o.push(this.generalOverloads[a.termType]),u){const c=(0,e.asKnownLiteralType)(u.dataType);let l;c?l=e.superTypeDictTable[c]:l=(0,e.getSuperTypes)(u.dataType,s);const d=this.literalOverLoads.filter(([f,h])=>f in l).map(([f,h])=>[l[f],h]);d.sort(([f,h],[p,b])=>f-p),o.push(...d.map(([f,h])=>h))}return o}};return _h.OverloadTree=r,_h}var B4;function eo(){if(B4)return wr;B4=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.expressionToVar=wr.dateTime=wr.langString=wr.string=wr.double=wr.float=wr.decimal=wr.integer=wr.bool=wr.Builder=wr.declare=void 0;const t=ht,e=aa(),r=aa(),n=ni,a=ni,s=Ke,o=DL(),u=new t.DataFactory;function c(A){return new l(A)}wr.declare=c;class l{constructor(T){this.overloadTree=new o.OverloadTree(T),this.collected=!1}collect(){if(this.collected)throw new Error("Builders can only be collected once!");return this.collected=!0,this.overloadTree}static wrapInvalidLexicalProtected(T){return I=>D=>(D.forEach((U,H)=>{if(U instanceof r.NonLexicalLiteral)throw new s.InvalidLexicalForm(D[H].toRDF())}),T(I)(D))}set(T,I,D=!0){return this.overloadTree.addOverload(T,D?l.wrapInvalidLexicalProtected(I):I),this}copy({from:T,to:I}){const D=this.overloadTree.getImplementationExact(T);if(!D)throw new s.UnexpectedError("Tried to copy implementation, but types not found",{from:T,to:I});return this.set(I,D)}onUnary(T,I,D=!0){return this.set([T],U=>([H])=>I(U)(H),D)}onUnaryTyped(T,I,D=!0){return this.set([T],U=>([H])=>I(U)(H.typedValue),D)}onBinary(T,I,D=!0){return this.set(T,U=>([H,N])=>I(U)(H,N),D)}onBinaryTyped(T,I,D=!0){return this.set(T,U=>([H,N])=>I(U)(H.typedValue,N.typedValue),D)}onTernaryTyped(T,I,D=!0){return this.set(T,U=>([H,N,x])=>I(U)(H.typedValue,N.typedValue,x.typedValue),D)}onTernary(T,I,D=!0){return this.set(T,U=>([H,N,x])=>I(U)(H,N,x),D)}onQuaternaryTyped(T,I,D=!0){return this.set(T,U=>([H,N,x,F])=>I(U)(H.typedValue,N.typedValue,x.typedValue,F.typedValue),D)}onTerm1(T,I=!1){return this.set(["term"],D=>([U])=>T(D)(U),I)}onTerm3(T){return this.set(["term","term","term"],I=>([D,U,H])=>T(I)(D,U,H))}onQuad1(T){return this.set(["quad"],I=>([D])=>T(I)(D))}onLiteral1(T,I=!0){return this.set(["literal"],D=>([U])=>T(D)(U),I)}onBoolean1(T,I=!0){return this.set([n.TypeURL.XSD_BOOLEAN],D=>([U])=>T(D)(U),I)}onBoolean1Typed(T,I=!0){return this.set([n.TypeURL.XSD_BOOLEAN],D=>([U])=>T(D)(U.typedValue),I)}onString1(T,I=!0){return this.set([n.TypeURL.XSD_STRING],D=>([U])=>T(D)(U),I)}onString1Typed(T,I=!0){return this.set([n.TypeURL.XSD_STRING],D=>([U])=>T(D)(U.typedValue),I)}onLangString1(T,I=!0){return this.set([n.TypeURL.RDF_LANG_STRING],D=>([U])=>T(D)(U),I)}onStringly1(T,I=!0){return this.set([n.TypeAlias.SPARQL_STRINGLY],D=>([U])=>T(D)(U),I)}onStringly1Typed(T,I=!0){return this.set([n.TypeAlias.SPARQL_STRINGLY],D=>([U])=>T(D)(U.typedValue),I)}onNumeric1(T,I=!0){return this.set([n.TypeAlias.SPARQL_NUMERIC],D=>([U])=>T(D)(U),I)}onDateTime1(T,I=!0){return this.set([n.TypeURL.XSD_DATE_TIME],D=>([U])=>T(D)(U),I)}numericConverter(T,I=!0){const D=U=>H=>T(U)(H.typedValue);return this.onBinary([a.TypeURL.XSD_INTEGER],U=>H=>f(D(U)(H)),I).onBinary([a.TypeURL.XSD_DECIMAL],U=>H=>h(D(U)(H)),I).onBinary([a.TypeURL.XSD_FLOAT],U=>H=>p(D(U)(H)),I).onBinary([a.TypeURL.XSD_DOUBLE],U=>H=>b(D(U)(H)),I)}arithmetic(T,I=!0){const D=U=>(H,N)=>T(U)(H.typedValue,N.typedValue);return this.onBinary([a.TypeURL.XSD_INTEGER,a.TypeURL.XSD_INTEGER],U=>(H,N)=>f(D(U)(H,N)),I).onBinary([a.TypeURL.XSD_DECIMAL,a.TypeURL.XSD_DECIMAL],U=>(H,N)=>h(D(U)(H,N)),I).onBinary([a.TypeURL.XSD_FLOAT,a.TypeURL.XSD_FLOAT],U=>(H,N)=>p(D(U)(H,N)),I).onBinary([a.TypeURL.XSD_DOUBLE,a.TypeURL.XSD_DOUBLE],U=>(H,N)=>b(D(U)(H,N)),I)}numberTest(T){return this.numeric(I=>([D,U])=>{const H=T(I)(D.typedValue,U.typedValue);return d(H)})}stringTest(T,I=!0){return this.set([n.TypeURL.XSD_STRING,n.TypeURL.XSD_STRING],D=>([U,H])=>{const N=T(D)(U.typedValue,H.typedValue);return d(N)},I)}booleanTest(T,I=!0){return this.set([n.TypeURL.XSD_BOOLEAN,n.TypeURL.XSD_BOOLEAN],D=>([U,H])=>{const N=T(D)(U.typedValue,H.typedValue);return d(N)},I)}dateTimeTest(T,I=!0){return this.set([n.TypeURL.XSD_DATE_TIME,n.TypeURL.XSD_DATE_TIME],D=>([U,H])=>{const N=T(D)(U.typedValue,H.typedValue);return d(N)},I)}numeric(T){return this.set([n.TypeAlias.SPARQL_NUMERIC,n.TypeAlias.SPARQL_NUMERIC],T)}}wr.Builder=l;function d(A){return new e.BooleanLiteral(A)}wr.bool=d;function f(A){return new e.IntegerLiteral(A)}wr.integer=f;function h(A){return new e.DecimalLiteral(A)}wr.decimal=h;function p(A){return new e.FloatLiteral(A)}wr.float=p;function b(A){return new e.DoubleLiteral(A)}wr.double=b;function _(A){return new e.StringLiteral(A)}wr.string=_;function E(A,T){return new e.LangStringLiteral(A,T)}wr.langString=E;function w(A,T){return new e.DateTimeLiteral(A,T)}wr.dateTime=w;function O(A){return u.variable(A.name.slice(1))}return wr.expressionToVar=O,wr}var $4;function z2(){return $4||($4=1,function(t){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 e=aa(),r=eo(),n=ni;t.extensionTableInput={[n.TypeURL.XSD_DATE_TIME_STAMP]:n.TypeURL.XSD_DATE_TIME,[n.TypeURL.XSD_DAY_TIME_DURATION]:n.TypeURL.XSD_DURATION,[n.TypeURL.XSD_YEAR_MONTH_DURATION]:n.TypeURL.XSD_DURATION,[n.TypeURL.RDF_LANG_STRING]:n.TypeAlias.SPARQL_STRINGLY,[n.TypeURL.XSD_STRING]:n.TypeAlias.SPARQL_STRINGLY,[n.TypeURL.XSD_NORMALIZED_STRING]:n.TypeURL.XSD_STRING,[n.TypeURL.XSD_TOKEN]:n.TypeURL.XSD_NORMALIZED_STRING,[n.TypeURL.XSD_LANGUAGE]:n.TypeURL.XSD_TOKEN,[n.TypeURL.XSD_NM_TOKEN]:n.TypeURL.XSD_TOKEN,[n.TypeURL.XSD_NAME]:n.TypeURL.XSD_TOKEN,[n.TypeURL.XSD_NC_NAME]:n.TypeURL.XSD_NAME,[n.TypeURL.XSD_ENTITY]:n.TypeURL.XSD_NC_NAME,[n.TypeURL.XSD_ID]:n.TypeURL.XSD_NC_NAME,[n.TypeURL.XSD_ID_REF]:n.TypeURL.XSD_NC_NAME,[n.TypeURL.XSD_DOUBLE]:n.TypeAlias.SPARQL_NUMERIC,[n.TypeURL.XSD_FLOAT]:n.TypeAlias.SPARQL_NUMERIC,[n.TypeURL.XSD_DECIMAL]:n.TypeAlias.SPARQL_NUMERIC,[n.TypeURL.XSD_INTEGER]:n.TypeURL.XSD_DECIMAL,[n.TypeURL.XSD_NON_POSITIVE_INTEGER]:n.TypeURL.XSD_INTEGER,[n.TypeURL.XSD_NEGATIVE_INTEGER]:n.TypeURL.XSD_NON_POSITIVE_INTEGER,[n.TypeURL.XSD_LONG]:n.TypeURL.XSD_INTEGER,[n.TypeURL.XSD_INT]:n.TypeURL.XSD_LONG,[n.TypeURL.XSD_SHORT]:n.TypeURL.XSD_INT,[n.TypeURL.XSD_BYTE]:n.TypeURL.XSD_SHORT,[n.TypeURL.XSD_NON_NEGATIVE_INTEGER]:n.TypeURL.XSD_INTEGER,[n.TypeURL.XSD_POSITIVE_INTEGER]:n.TypeURL.XSD_NON_NEGATIVE_INTEGER,[n.TypeURL.XSD_UNSIGNED_LONG]:n.TypeURL.XSD_NON_NEGATIVE_INTEGER,[n.TypeURL.XSD_UNSIGNED_INT]:n.TypeURL.XSD_UNSIGNED_LONG,[n.TypeURL.XSD_UNSIGNED_SHORT]:n.TypeURL.XSD_UNSIGNED_INT,[n.TypeURL.XSD_UNSIGNED_BYTE]:n.TypeURL.XSD_UNSIGNED_SHORT,[n.TypeURL.XSD_DATE_TIME]:"term",[n.TypeURL.XSD_BOOLEAN]:"term",[n.TypeURL.XSD_DATE]:"term",[n.TypeURL.XSD_G_MONTH]:"term",[n.TypeURL.XSD_G_MONTHDAY]:"term",[n.TypeURL.XSD_G_YEAR]:"term",[n.TypeURL.XSD_G_YEAR_MONTH]:"term",[n.TypeURL.XSD_TIME]:"term",[n.TypeURL.XSD_G_DAY]:"term",[n.TypeURL.XSD_DURATION]:"term",[n.TypeAlias.SPARQL_NUMERIC]:"term",[n.TypeAlias.SPARQL_STRINGLY]:"term",[n.TypeURL.XSD_ANY_URI]:"term"},t.superTypeDictTable=Object.create(null);function a(_,E){const w=E.cache.get(_);if(w)return w;const O=E.discoverer(_);if(O==="term"){const I=Object.create(null);return I.__depth=0,I[_]=0,E.cache.set(_,I),I}let A;const T=l(O);return T?A={...t.superTypeDictTable[T]}:A={...a(O,E)},A.__depth++,A[_]=A.__depth,E.cache.set(_,A),A}t.getSuperTypes=a;function s(){for(const[_,E]of Object.entries(t.extensionTableInput)){const w=_;t.superTypeDictTable[w]||o(w,E,t.superTypeDictTable)}}t.extensionTableInit=s,s();function o(_,E,w){if(E==="term"||E===void 0){const O=Object.create(null);O.__depth=0,O[_]=0,w[_]=O;return}w[E]||o(E,t.extensionTableInput[E],w),w[_]={...w[E],[_]:w[E].__depth+1,__depth:w[E].__depth+1}}t.typeAliasCheck=Object.create(null);function u(){for(const _ of Object.values(n.TypeAlias))t.typeAliasCheck[_]=!0}u();function c(_){if(_ in t.typeAliasCheck)return _}t.asTypeAlias=c;function l(_){if(_ in t.superTypeDictTable)return _}t.asKnownLiteralType=l;function d(_){if(l(_)||_==="term")return _}t.asOverrideType=d;function f(_){if(_==="term"||(0,e.asTermType)(_))return _}t.asGeneralType=f;function h(_,E){return _!=="term"&&t.superTypeDictTable[_]&&t.superTypeDictTable[_][E]!==void 0}t.isInternalSubType=h;function p(_,E){const w=l(_);return w?t.superTypeDictTable[w]:a(_,E)}t.getSuperTypeDict=p;function b(_,E,w){return _==="term"?!1:p(_,w)[E]!==void 0}t.isSubTypeOf=b,t.typePromotion={[n.TypeURL.XSD_STRING]:[{typeToPromote:n.TypeURL.XSD_ANY_URI,conversionFunction:_=>(0,r.string)(_.str())}],[n.TypeURL.XSD_DOUBLE]:[{typeToPromote:n.TypeURL.XSD_FLOAT,conversionFunction:_=>(0,r.double)(_.typedValue)},{typeToPromote:n.TypeURL.XSD_DECIMAL,conversionFunction:_=>(0,r.double)(_.typedValue)}],[n.TypeURL.XSD_FLOAT]:[{typeToPromote:n.TypeURL.XSD_DECIMAL,conversionFunction:_=>(0,r.float)(_.typedValue)}]}}(ST)),ST}var U4;function Rl(){if(U4)return bh;U4=1,Object.defineProperty(bh,"__esModule",{value:!0}),bh.TermTransformer=void 0;const t=nr,e=xt,r=aa(),n=ni,a=Ke,s=Ke,o=zr,u=zr,c=z2();let l=class{constructor(f){this.superTypeProvider=f}transformRDFTermUnsafe(f){return this.transformTerm({term:f,type:e.Algebra.types.EXPRESSION,expressionType:e.Algebra.expressionTypes.TERM})}transformTerm(f){if(!f.term)throw new a.InvalidExpression(f);switch(f.term.termType){case"Variable":return new r.Variable(t.termToString(f.term));case"Literal":return this.transformLiteral(f.term);case"NamedNode":return new r.NamedNode(f.term.value);case"BlankNode":return new r.BlankNode(f.term.value);case"Quad":return new r.Quad(f.term,this.superTypeProvider);default:throw new a.InvalidTermType(f)}}transformLiteral(f){if(!f.datatype||[null,void 0,""].includes(f.datatype.value))return f.language?new r.LangStringLiteral(f.value,f.language):new r.StringLiteral(f.value);const h=f.datatype.value,p=(0,c.getSuperTypeDict)(h,this.superTypeProvider);try{if(n.TypeURL.XSD_STRING in p)return new r.StringLiteral(f.value,h);if(n.TypeURL.RDF_LANG_STRING in p)return new r.LangStringLiteral(f.value,f.language);if(n.TypeURL.XSD_YEAR_MONTH_DURATION in p)return new r.YearMonthDurationLiteral((0,o.parseYearMonthDuration)(f.value),f.value,h);if(n.TypeURL.XSD_DAY_TIME_DURATION in p)return new r.DayTimeDurationLiteral((0,o.parseDayTimeDuration)(f.value),f.value,h);if(n.TypeURL.XSD_DURATION in p)return new r.DurationLiteral((0,o.parseDuration)(f.value),f.value,h);if(n.TypeURL.XSD_DATE_TIME in p){const E=new Date(f.value);return Number.isNaN(E.getTime())?new r.NonLexicalLiteral(void 0,h,this.superTypeProvider,f.value):new r.DateTimeLiteral((0,o.parseDateTime)(f.value),f.value,h)}if(n.TypeURL.XSD_DATE in p)return new r.DateLiteral((0,o.parseDate)(f.value),f.value,h);if(n.TypeURL.XSD_TIME in p)return new r.TimeLiteral((0,o.parseTime)(f.value),f.value,h);if(n.TypeURL.XSD_BOOLEAN in p)return f.value!=="true"&&f.value!=="false"&&f.value!=="1"&&f.value!=="0"?new r.NonLexicalLiteral(void 0,h,this.superTypeProvider,f.value):new r.BooleanLiteral(f.value==="true"||f.value==="1",f.value);if(n.TypeURL.XSD_DECIMAL in p){const E=u.parseXSDDecimal(f.value);return E===void 0?new r.NonLexicalLiteral(void 0,h,this.superTypeProvider,f.value):n.TypeURL.XSD_INTEGER in p?new r.IntegerLiteral(E,h,f.value):new r.DecimalLiteral(E,h,f.value)}const b=n.TypeURL.XSD_FLOAT in p,_=n.TypeURL.XSD_DOUBLE in p;if(b||_){const E=u.parseXSDFloat(f.value);return E===void 0?new r.NonLexicalLiteral(void 0,h,this.superTypeProvider,f.value):b?new r.FloatLiteral(E,h,f.value):new r.DoubleLiteral(E,h,f.value)}return new r.Literal(f.value,h,f.value)}catch(b){if(b instanceof Error&&(0,s.isExpressionError)(b))return new r.NonLexicalLiteral(void 0,h,this.superTypeProvider,f.value);throw b}}};return bh.TermTransformer=l,bh}var Ns={};Object.defineProperty(Ns,"__esModule",{value:!0});Ns.serializeDuration=Ns.serializeTime=Ns.serializeDate=Ns.serializeDateTime=void 0;function Mo(t,e=2){return t.toLocaleString(void 0,{minimumIntegerDigits:e,useGrouping:!1})}function ape(t){return`${CL({year:t.year,month:t.month,day:t.day})}T${jL(t)}`}Ns.serializeDateTime=ape;function NL(t){return t.zoneHours===void 0||t.zoneMinutes===void 0?"":t.zoneHours===0&&t.zoneMinutes===0?"Z":`${t.zoneHours>=0?`+${Mo(t.zoneHours)}`:Mo(t.zoneHours)}:${Mo(Math.abs(t.zoneMinutes))}`}function CL(t){return`${Mo(t.year,4)}-${Mo(t.month)}-${Mo(t.day)}${NL(t)}`}Ns.serializeDate=CL;function jL(t){return`${Mo(t.hours)}:${Mo(t.minutes)}:${Mo(t.seconds)}${NL(t)}`}Ns.serializeTime=jL;function spe(t,e="PT0S"){if(!Object.values(t).some(d=>(d||0)!==0))return e;const r=Object.values(t).some(d=>(d||0)<0)?"-":"",n=t.year?`${Math.abs(t.year)}Y`:"",a=t.month?`${Math.abs(t.month)}M`:"",s=t.day?`${Math.abs(t.day)}D`:"",o=`${r}P${n}${a}${s}`;if(!(t.hours||t.minutes||t.seconds))return o;const u=t.hours?`${Math.abs(t.hours)}H`:"",c=t.minutes?`${Math.abs(t.minutes)}M`:"",l=t.seconds?`${Math.abs(t.seconds)}S`:"";return`${o}T${u}${c}${l}`}Ns.serializeDuration=spe;var q4;function ope(){if(q4)return ft;q4=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.isNonLexicalLiteral=ft.NonLexicalLiteral=ft.YearMonthDurationLiteral=ft.DayTimeDurationLiteral=ft.DurationLiteral=ft.DateLiteral=ft.TimeLiteral=ft.DateTimeLiteral=ft.StringLiteral=ft.LangStringLiteral=ft.BooleanLiteral=ft.DoubleLiteral=ft.FloatLiteral=ft.DecimalLiteral=ft.IntegerLiteral=ft.NumericLiteral=ft.Literal=ft.isLiteralTermExpression=ft.Quad=ft.BlankNode=ft.NamedNode=ft.Term=void 0;const t=ht,e=Rl(),r=ni,n=ni,a=Ke,s=Ns,o=z2(),u=Ai,c=new t.DataFactory;let l=class{constructor(){this.expressionType=u.ExpressionType.Term}str(){throw new a.InvalidArgumentTypes([this],r.RegularOperator.STR)}coerceEBV(){throw new a.EBVCoercionError(this)}};ft.Term=l;class d extends l{constructor(Q){super(),this.value=Q,this.termType="namedNode"}toRDF(){return c.namedNode(this.value)}str(){return this.value}}ft.NamedNode=d;class f extends l{constructor(Q){super(),this.termType="blankNode",this.value=typeof Q=="string"?c.blankNode(Q):Q}toRDF(){return this.value}}ft.BlankNode=f;class h extends l{constructor(Q,se){super(),this.termType="quad",this.transformer=new e.TermTransformer(se),this.valueTerm=Q}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}}ft.Quad=h;function p(j){if(j.termType==="literal")return j}ft.isLiteralTermExpression=p;class b extends l{constructor(Q,se,ie,be){super(),this.typedValue=Q,this.dataType=se,this.strValue=ie,this.language=be,this.termType="literal"}toRDF(){return c.literal(this.strValue||this.str(),this.language||c.namedNode(this.dataType))}str(){return this.strValue||this.typedValue.toString()}}ft.Literal=b;class _ extends b{constructor(Q,se,ie,be){super(Q,se,ie,be),this.typedValue=Q,this.strValue=ie,this.language=be}coerceEBV(){return!!this.typedValue}toRDF(){const Q=super.toRDF();return Number.isFinite(this.typedValue)||(Q.value=Q.value.replace("Infinity","INF")),Q}str(){return this.strValue||this.specificFormatter(this.typedValue)}}ft.NumericLiteral=_;class E extends _{constructor(Q,se,ie,be){super(Q,se||n.TypeURL.XSD_INTEGER,ie,be),this.typedValue=Q,this.strValue=ie,this.language=be}specificFormatter(Q){return Q.toFixed(0)}}ft.IntegerLiteral=E;class w extends _{constructor(Q,se,ie,be){super(Q,se||n.TypeURL.XSD_DECIMAL,ie,be),this.typedValue=Q,this.strValue=ie,this.language=be}specificFormatter(Q){return Q.toString()}}ft.DecimalLiteral=w;class O extends _{constructor(Q,se,ie,be){super(Q,se||n.TypeURL.XSD_FLOAT,ie,be),this.typedValue=Q,this.strValue=ie,this.language=be}specificFormatter(Q){return Q.toString()}}ft.FloatLiteral=O;class A extends _{constructor(Q,se,ie,be){super(Q,se||n.TypeURL.XSD_DOUBLE,ie,be),this.typedValue=Q,this.strValue=ie,this.language=be}specificFormatter(Q){if(!Number.isFinite(Q))return Q>0?"INF":Q<0?"-INF":"NaN";const se=Q.toExponential(),[ie,be]=se.split("e"),he=be.replace(/\+/u,"");return`${ie.includes(".")?ie:`${ie}.0`}E${he}`}}ft.DoubleLiteral=A;class T extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.XSD_BOOLEAN,se),this.typedValue=Q,this.strValue=se}coerceEBV(){return this.typedValue}}ft.BooleanLiteral=T;class I extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.RDF_LANG_STRING,Q,se),this.typedValue=Q,this.language=se}coerceEBV(){return this.str().length>0}}ft.LangStringLiteral=I;class D extends b{constructor(Q,se){super(Q,se||n.TypeURL.XSD_STRING,Q),this.typedValue=Q}coerceEBV(){return this.str().length>0}}ft.StringLiteral=D;class U extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.XSD_DATE_TIME,se),this.typedValue=Q,this.strValue=se}str(){return(0,s.serializeDateTime)(this.typedValue)}}ft.DateTimeLiteral=U;class H extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.XSD_TIME,se),this.typedValue=Q,this.strValue=se}str(){return(0,s.serializeTime)(this.typedValue)}}ft.TimeLiteral=H;class N extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.XSD_DATE,se),this.typedValue=Q,this.strValue=se}str(){return(0,s.serializeDate)(this.typedValue)}}ft.DateLiteral=N;class x extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.XSD_DURATION,se),this.typedValue=Q,this.strValue=se}str(){return(0,s.serializeDuration)(this.typedValue)}}ft.DurationLiteral=x;class F extends x{constructor(Q,se,ie){super(Q,se,ie||n.TypeURL.XSD_DAY_TIME_DURATION),this.typedValue=Q,this.strValue=se}}ft.DayTimeDurationLiteral=F;class X extends b{constructor(Q,se,ie){super(Q,ie||n.TypeURL.XSD_YEAR_MONTH_DURATION,se),this.typedValue=Q,this.strValue=se}str(){return(0,s.serializeDuration)(this.typedValue,"P0M")}}ft.YearMonthDurationLiteral=X;class ne extends b{constructor(Q,se,ie,be,he){super({toString:()=>"undefined"},se,be,he),this.openWorldType=ie}coerceEBV(){if((0,o.isSubTypeOf)(this.dataType,n.TypeURL.XSD_BOOLEAN,this.openWorldType)||(0,o.isSubTypeOf)(this.dataType,n.TypeAlias.SPARQL_NUMERIC,this.openWorldType))return!1;throw new a.EBVCoercionError(this)}toRDF(){return c.literal(this.str(),this.language||c.namedNode(this.dataType))}str(){return this.strValue||""}}ft.NonLexicalLiteral=ne;function $(j){if(j instanceof ne)return j}return ft.isNonLexicalLiteral=$,ft}var W2={};Object.defineProperty(W2,"__esModule",{value:!0});W2.Operator=void 0;const upe=Ai;class cpe{constructor(e,r){this.args=e,this.apply=r,this.expressionType=upe.ExpressionType.Operator}}W2.Operator=cpe;var X2={};Object.defineProperty(X2,"__esModule",{value:!0});X2.SpecialOperator=void 0;const lpe=Ai;class dpe{constructor(e,r,n){this.args=e,this.applyAsync=r,this.applySynchronously=n,this.expressionType=lpe.ExpressionType.SpecialOperator}}X2.SpecialOperator=dpe;var K2={};Object.defineProperty(K2,"__esModule",{value:!0});K2.Named=void 0;const fpe=Ai;class hpe{constructor(e,r,n){this.name=e,this.args=r,this.apply=n,this.expressionType=fpe.ExpressionType.Named}}K2.Named=hpe;var J2={};Object.defineProperty(J2,"__esModule",{value:!0});J2.Aggregate=void 0;const ppe=Ai;class ype{constructor(e,r){this.name=e,this.expression=r,this.expressionType=ppe.ExpressionType.Aggregate}}J2.Aggregate=ype;var Y2={};Object.defineProperty(Y2,"__esModule",{value:!0});Y2.Existence=void 0;const bpe=Ai;class _pe{constructor(e){this.expression=e,this.expressionType=bpe.ExpressionType.Existence}}Y2.Existence=_pe;var Z2={};Object.defineProperty(Z2,"__esModule",{value:!0});Z2.AsyncExtension=void 0;const gpe=Ai;class mpe{constructor(e,r,n){this.name=e,this.args=r,this.apply=n,this.expressionType=gpe.ExpressionType.AsyncExtension}}Z2.AsyncExtension=mpe;var ew={};Object.defineProperty(ew,"__esModule",{value:!0});ew.SyncExtension=void 0;const vpe=Ai;class wpe{constructor(e,r,n){this.name=e,this.args=r,this.apply=n,this.expressionType=vpe.ExpressionType.SyncExtension}}ew.SyncExtension=wpe;var V4;function aa(){return V4||(V4=1,function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ai,t),r(G2,t),r(ope(),t),r(W2,t),r(X2,t),r(K2,t),r(J2,t),r(Y2,t),r(Z2,t),r(ew,t)}(wT)),wT}var TT={},va={};Object.defineProperty(va,"__esModule",{value:!0});va.SpecialFunction=va.NamedFunction=va.RegularFunction=va.BaseFunction=void 0;const ML=Ke;class JR{constructor(e,r){this.operator=e,this.apply=(n,a)=>(this.monomorph(n,a.superTypeProvider,a.functionArgumentsCache)||this.handleInvalidTypes(n))(a)(n),this.arity=r.arity,this.overloads=r.overloads}monomorph(e,r,n){return this.overloads.search(e,r,n)}}va.BaseFunction=JR;class Spe extends JR{constructor(e,r){super(e,r),this.functionClass="regular"}handleInvalidTypes(e){throw new ML.InvalidArgumentTypes(e,this.operator)}}va.RegularFunction=Spe;class Tpe extends JR{constructor(e,r){super(e,r),this.functionClass="named"}handleInvalidTypes(e){throw new ML.InvalidArgumentTypes(e,this.operator)}}va.NamedFunction=Tpe;class Epe{constructor(e,r){this.operator=e,this.functionClass="special",this.arity=r.arity,this.applySynchronously=r.applySynchronously,this.applyAsync=r.applyAsync,this.checkArity=r.checkArity||Ope(this.arity)}}va.SpecialFunction=Epe;function Ope(t){return e=>t===Number.POSITIVE_INFINITY?!0:e.length===t}var tw={};Object.defineProperty(tw,"__esModule",{value:!0});tw.namedDefinitions=void 0;const wa=aa(),Ape=aa(),yt=ni,FL=jt,ol=Ke,Ta=zr,Ft=eo(),Rpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_STRING).onNumeric1(()=>t=>(0,Ft.string)((0,Ft.float)(t.typedValue).str())).onBoolean1Typed(()=>t=>(0,Ft.string)((0,Ft.bool)(t).str())).onTerm1(()=>t=>(0,Ft.string)(t.str())).collect()},xpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_FLOAT).onNumeric1(()=>t=>(0,Ft.float)(t.typedValue)).onBoolean1Typed(()=>t=>(0,Ft.float)(t?1:0)).onUnary(yt.TypeURL.XSD_STRING,()=>t=>{const e=(0,Ta.parseXSDFloat)(t.str());if(e===void 0)throw new ol.CastError(t,yt.TypeURL.XSD_FLOAT);return(0,Ft.float)(e)},!1).collect()},Ipe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_DOUBLE).onNumeric1(()=>t=>(0,Ft.double)(t.typedValue)).onBoolean1Typed(()=>t=>(0,Ft.double)(t?1:0)).onUnary(yt.TypeURL.XSD_STRING,()=>t=>{const e=(0,Ta.parseXSDFloat)(t.str());if(e===void 0)throw new ol.CastError(t,yt.TypeURL.XSD_DOUBLE);return(0,Ft.double)(e)},!1).collect()},Ppe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_DECIMAL).onNumeric1(()=>t=>{const e=(0,Ta.parseXSDDecimal)(t.str());if(e===void 0)throw new ol.CastError(t,yt.TypeURL.XSD_DECIMAL);return(0,Ft.decimal)(e)}).onString1(()=>t=>{const e=t.str(),r=/^([+-])?(\d+(\.\d+)?)$/u.test(e)?(0,Ta.parseXSDDecimal)(e):void 0;if(r===void 0)throw new ol.CastError(t,yt.TypeURL.XSD_DECIMAL);return(0,Ft.decimal)(r)},!1).onBoolean1Typed(()=>t=>(0,Ft.decimal)(t?1:0)).collect()},Dpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_INTEGER).onBoolean1Typed(()=>t=>(0,Ft.integer)(t?1:0)).onNumeric1(()=>t=>{const e=(0,Ta.parseXSDInteger)(t.str());if(e===void 0)throw new ol.CastError(t,yt.TypeURL.XSD_INTEGER);return(0,Ft.integer)(e)},!1).onString1(()=>t=>{const e=t.str(),r=/^\d+$/u.test(e)?(0,Ta.parseXSDInteger)(e):void 0;if(r===void 0)throw new ol.CastError(t,yt.TypeURL.XSD_INTEGER);return(0,Ft.integer)(r)}).collect()},Npe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_DATE_TIME).onUnary(yt.TypeURL.XSD_DATE_TIME,()=>t=>t).onUnary(yt.TypeURL.XSD_STRING,()=>t=>(0,Ft.dateTime)((0,Ta.parseDateTime)(t.str()),t.str()),!1).onUnary(yt.TypeURL.XSD_DATE,()=>t=>new wa.DateTimeLiteral({...t.typedValue,hours:0,minutes:0,seconds:0})).collect()},Cpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_BOOLEAN).onNumeric1(()=>t=>(0,Ft.bool)(t.coerceEBV()),!0).onUnary(yt.TypeURL.XSD_BOOLEAN,()=>t=>(0,Ft.bool)(t.coerceEBV()),!0).onUnary(yt.TypeURL.XSD_STRING,()=>t=>{switch(t.str()){case"true":return(0,Ft.bool)(!0);case"false":return(0,Ft.bool)(!1);case"1":return(0,Ft.bool)(!0);case"0":return(0,Ft.bool)(!1);default:throw new ol.CastError(t,yt.TypeURL.XSD_BOOLEAN)}},!1).collect()},jpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_TIME).onUnary(yt.TypeURL.XSD_TIME,()=>t=>new wa.TimeLiteral(t.typedValue,t.strValue)).onUnary(yt.TypeURL.XSD_DATE_TIME,()=>t=>new wa.TimeLiteral(t.typedValue)).onStringly1(()=>t=>new wa.TimeLiteral((0,Ta.parseTime)(t.str()))).collect()},Mpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_DATE).onUnary(yt.TypeURL.XSD_DATE,()=>t=>new wa.DateLiteral(t.typedValue,t.strValue)).onUnary(yt.TypeURL.XSD_DATE_TIME,()=>t=>new wa.DateLiteral(t.typedValue)).onStringly1(()=>t=>new wa.DateLiteral((0,Ta.parseDate)(t.str()))).collect()},Fpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_DURATION).onUnary(yt.TypeURL.XSD_DURATION,()=>t=>new wa.DurationLiteral(t.typedValue,t.strValue)).onStringly1(()=>t=>new Ape.DurationLiteral((0,Ta.parseDuration)(t.str()))).collect()},Lpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_DAY_TIME_DURATION).onUnary(yt.TypeURL.XSD_DURATION,()=>t=>new wa.DayTimeDurationLiteral((0,FL.trimToDayTimeDuration)(t.typedValue))).onStringly1(()=>t=>new wa.DayTimeDurationLiteral((0,Ta.parseDayTimeDuration)(t.str()))).collect()},Bpe={arity:1,overloads:(0,Ft.declare)(yt.TypeURL.XSD_YEAR_MONTH_DURATION).onUnary(yt.TypeURL.XSD_DURATION,()=>t=>new wa.YearMonthDurationLiteral((0,FL.trimToYearMonthDuration)(t.typedValue))).onStringly1(()=>t=>new wa.YearMonthDurationLiteral((0,Ta.parseYearMonthDuration)(t.str()))).collect()};tw.namedDefinitions={[yt.TypeURL.XSD_STRING]:Rpe,[yt.TypeURL.XSD_FLOAT]:xpe,[yt.TypeURL.XSD_DOUBLE]:Ipe,[yt.TypeURL.XSD_DECIMAL]:Ppe,[yt.TypeURL.XSD_INTEGER]:Dpe,[yt.TypeURL.XSD_DATE_TIME]:Npe,[yt.TypeURL.XSD_DATE]:Mpe,[yt.TypeURL.XSD_BOOLEAN]:Cpe,[yt.TypeURL.XSD_TIME]:jpe,[yt.TypeURL.XSD_DURATION]:Fpe,[yt.TypeURL.XSD_DAY_TIME_DURATION]:Lpe,[yt.TypeURL.XSD_YEAR_MONTH_DURATION]:Bpe};var gh={},LL={exports:{}};(function(t){(function(e){var r,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,a=Math.ceil,s=Math.floor,o="[BigNumber Error] ",u=o+"Number primitive has more than 15 significant digits: ",c=1e14,l=14,d=9007199254740991,f=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,p=1e9;function b(D){var U,H,N,x=ce.prototype={constructor:ce,toString:null,valueOf:null},F=new ce(1),X=20,ne=4,$=-7,j=21,Q=-1e7,se=1e7,ie=!1,be=1,he=0,Te={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},Ne="0123456789abcdefghijklmnopqrstuvwxyz",ye=!0;function ce(L,P){var g,y,v,C,V,q,G,Y,ee=this;if(!(ee instanceof ce))return new ce(L,P);if(P==null){if(L&&L._isBigNumber===!0){ee.s=L.s,!L.c||L.e>se?ee.c=ee.e=null:L.e=10;V/=10,C++);C>se?ee.c=ee.e=null:(ee.e=C,ee.c=[L]);return}Y=String(L)}else{if(!n.test(Y=String(L)))return N(ee,Y,q);ee.s=Y.charCodeAt(0)==45?(Y=Y.slice(1),-1):1}(C=Y.indexOf("."))>-1&&(Y=Y.replace(".","")),(V=Y.search(/e/i))>0?(C<0&&(C=V),C+=+Y.slice(V+1),Y=Y.substring(0,V)):C<0&&(C=Y.length)}else{if(O(P,2,Ne.length,"Base"),P==10&&ye)return ee=new ce(L),le(ee,X+ee.e+1,ne);if(Y=String(L),q=typeof L=="number"){if(L*0!=0)return N(ee,Y,q,P);if(ee.s=1/L<0?(Y=Y.slice(1),-1):1,ce.DEBUG&&Y.replace(/^0\.0*|\./,"").length>15)throw Error(u+L)}else ee.s=Y.charCodeAt(0)===45?(Y=Y.slice(1),-1):1;for(g=Ne.slice(0,P),C=V=0,G=Y.length;VC){C=G;continue}}else if(!v&&(Y==Y.toUpperCase()&&(Y=Y.toLowerCase())||Y==Y.toLowerCase()&&(Y=Y.toUpperCase()))){v=!0,V=-1,C=0;continue}return N(ee,String(L),q,P)}q=!1,Y=H(Y,P,10,ee.s),(C=Y.indexOf("."))>-1?Y=Y.replace(".",""):C=Y.length}for(V=0;Y.charCodeAt(V)===48;V++);for(G=Y.length;Y.charCodeAt(--G)===48;);if(Y=Y.slice(V,++G)){if(G-=V,q&&ce.DEBUG&&G>15&&(L>d||L!==s(L)))throw Error(u+ee.s*L);if((C=C-V-1)>se)ee.c=ee.e=null;else if(C=-p&&v<=p&&v===s(v)){if(y[0]===0){if(v===0&&y.length===1)return!0;break e}if(P=(v+1)%l,P<1&&(P+=l),String(y[0]).length==P){for(P=0;P=c||g!==s(g))break e;if(g!==0)return!0}}}else if(y===null&&v===null&&(C===null||C===1||C===-1))return!0;throw Error(o+"Invalid BigNumber: "+L)},ce.maximum=ce.max=function(){return oe(arguments,-1)},ce.minimum=ce.min=function(){return oe(arguments,1)},ce.random=function(){var L=9007199254740992,P=Math.random()*L&2097151?function(){return s(Math.random()*L)}:function(){return(Math.random()*1073741824|0)*8388608+(Math.random()*8388608|0)};return function(g){var y,v,C,V,q,G=0,Y=[],ee=new ce(F);if(g==null?g=X:O(g,0,p),V=a(g/l),ie)if(crypto.getRandomValues){for(y=crypto.getRandomValues(new Uint32Array(V*=2));G>>11),q>=9e15?(v=crypto.getRandomValues(new Uint32Array(2)),y[G]=v[0],y[G+1]=v[1]):(Y.push(q%1e14),G+=2);G=V/2}else if(crypto.randomBytes){for(y=crypto.randomBytes(V*=7);G=9e15?crypto.randomBytes(7).copy(y,G):(Y.push(q%1e14),G+=7);G=V/7}else throw ie=!1,Error(o+"crypto unavailable");if(!ie)for(;G=10;q/=10,G++);Gv-1&&(q[V+1]==null&&(q[V+1]=0),q[V+1]+=q[V]/v|0,q[V]%=v)}return q.reverse()}return function(g,y,v,C,V){var q,G,Y,ee,ae,ve,me,Ee,k=g.indexOf("."),W=X,M=ne;for(k>=0&&(ee=he,he=0,g=g.replace(".",""),Ee=new ce(y),ve=Ee.pow(g.length-k),he=ee,Ee.c=P(I(E(ve.c),ve.e,"0"),10,v,L),Ee.e=Ee.c.length),me=P(g,y,v,V?(q=Ne,L):(q=L,Ne)),Y=ee=me.length;me[--ee]==0;me.pop());if(!me[0])return q.charAt(0);if(k<0?--Y:(ve.c=me,ve.e=Y,ve.s=C,ve=U(ve,Ee,W,M,v),me=ve.c,ae=ve.r,Y=ve.e),G=Y+W+1,k=me[G],ee=v/2,ae=ae||G<0||me[G+1]!=null,ae=M<4?(k!=null||ae)&&(M==0||M==(ve.s<0?3:2)):k>ee||k==ee&&(M==4||ae||M==6&&me[G-1]&1||M==(ve.s<0?8:7)),G<1||!me[0])g=ae?I(q.charAt(1),-W,q.charAt(0)):q.charAt(0);else{if(me.length=G,ae)for(--v;++me[--G]>v;)me[G]=0,G||(++Y,me=[1].concat(me));for(ee=me.length;!me[--ee];);for(k=0,g="";k<=ee;g+=q.charAt(me[k++]));g=I(g,Y,q.charAt(0))}return g}}(),U=function(){function L(y,v,C){var V,q,G,Y,ee=0,ae=y.length,ve=v%h,me=v/h|0;for(y=y.slice();ae--;)G=y[ae]%h,Y=y[ae]/h|0,V=me*G+Y*ve,q=ve*G+V%h*h+ee,ee=(q/C|0)+(V/h|0)+me*Y,y[ae]=q%C;return ee&&(y=[ee].concat(y)),y}function P(y,v,C,V){var q,G;if(C!=V)G=C>V?1:-1;else for(q=G=0;qv[q]?1:-1;break}return G}function g(y,v,C,V){for(var q=0;C--;)y[C]-=q,q=y[C]1;y.splice(0,1));}return function(y,v,C,V,q){var G,Y,ee,ae,ve,me,Ee,k,W,M,S,R,z,ue,ge,we,Me,Ue=y.s==v.s?1:-1,Ge=y.c,We=v.c;if(!Ge||!Ge[0]||!We||!We[0])return new ce(!y.s||!v.s||(Ge?We&&Ge[0]==We[0]:!We)?NaN:Ge&&Ge[0]==0||!We?Ue*0:Ue/0);for(k=new ce(Ue),W=k.c=[],Y=y.e-v.e,Ue=C+Y+1,q||(q=c,Y=_(y.e/l)-_(v.e/l),Ue=Ue/l|0),ee=0;We[ee]==(Ge[ee]||0);ee++);if(We[ee]>(Ge[ee]||0)&&Y--,Ue<0)W.push(1),ae=!0;else{for(ue=Ge.length,we=We.length,ee=0,Ue+=2,ve=s(q/(We[0]+1)),ve>1&&(We=L(We,ve,q),Ge=L(Ge,ve,q),we=We.length,ue=Ge.length),z=we,M=Ge.slice(0,we),S=M.length;S=q/2&&ge++;do{if(ve=0,G=P(We,M,we,S),G<0){if(R=M[0],we!=S&&(R=R*q+(M[1]||0)),ve=s(R/ge),ve>1)for(ve>=q&&(ve=q-1),me=L(We,ve,q),Ee=me.length,S=M.length;P(me,M,Ee,S)==1;)ve--,g(me,we=10;Ue/=10,ee++);le(k,C+(k.e=ee+Y*l-1)+1,V,ae)}else k.e=Y,k.r=+ae;return k}}();function Re(L,P,g,y){var v,C,V,q,G;if(g==null?g=ne:O(g,0,8),!L.c)return L.toString();if(v=L.c[0],V=L.e,P==null)G=E(L.c),G=y==1||y==2&&(V<=$||V>=j)?T(G,V):I(G,V,"0");else if(L=le(new ce(L),P,g),C=L.e,G=E(L.c),q=G.length,y==1||y==2&&(P<=C||C<=$)){for(;qq){if(--P>0)for(G+=".";P--;G+="0");}else if(P+=C-q,P>0)for(C+1==q&&(G+=".");P--;G+="0");return L.s<0&&v?"-"+G:G}function oe(L,P){for(var g,y,v=1,C=new ce(L[0]);v=10;v/=10,y++);return(g=y+g*l-1)>se?L.c=L.e=null:g=10;q/=10,v++);if(C=P-v,C<0)C+=l,V=P,G=ae[Y=0],ee=s(G/ve[v-V-1]%10);else if(Y=a((C+1)/l),Y>=ae.length)if(y){for(;ae.length<=Y;ae.push(0));G=ee=0,v=1,C%=l,V=C-l+1}else break e;else{for(G=q=ae[Y],v=1;q>=10;q/=10,v++);C%=l,V=C-l+v,ee=V<0?0:s(G/ve[v-V-1]%10)}if(y=y||P<0||ae[Y+1]!=null||(V<0?G:G%ve[v-V-1]),y=g<4?(ee||y)&&(g==0||g==(L.s<0?3:2)):ee>5||ee==5&&(g==4||y||g==6&&(C>0?V>0?G/ve[v-V]:0:ae[Y-1])%10&1||g==(L.s<0?8:7)),P<1||!ae[0])return ae.length=0,y?(P-=L.e+1,ae[0]=ve[(l-P%l)%l],L.e=-P||0):ae[0]=L.e=0,L;if(C==0?(ae.length=Y,q=1,Y--):(ae.length=Y+1,q=ve[l-C],ae[Y]=V>0?s(G/ve[v-V]%ve[V])*q:0),y)for(;;)if(Y==0){for(C=1,V=ae[0];V>=10;V/=10,C++);for(V=ae[0]+=q,q=1;V>=10;V/=10,q++);C!=q&&(L.e++,ae[0]==c&&(ae[0]=1));break}else{if(ae[Y]+=q,ae[Y]!=c)break;ae[Y--]=0,q=1}for(C=ae.length;ae[--C]===0;ae.pop());}L.e>se?L.c=L.e=null:L.e=j?T(P,g):I(P,g,"0"),L.s<0?"-"+P:P)}return x.absoluteValue=x.abs=function(){var L=new ce(this);return L.s<0&&(L.s=1),L},x.comparedTo=function(L,P){return w(this,new ce(L,P))},x.decimalPlaces=x.dp=function(L,P){var g,y,v,C=this;if(L!=null)return O(L,0,p),P==null?P=ne:O(P,0,8),le(new ce(C),L+C.e+1,P);if(!(g=C.c))return null;if(y=((v=g.length-1)-_(this.e/l))*l,v=g[v])for(;v%10==0;v/=10,y--);return y<0&&(y=0),y},x.dividedBy=x.div=function(L,P){return U(this,new ce(L,P),X,ne)},x.dividedToIntegerBy=x.idiv=function(L,P){return U(this,new ce(L,P),0,1)},x.exponentiatedBy=x.pow=function(L,P){var g,y,v,C,V,q,G,Y,ee,ae=this;if(L=new ce(L),L.c&&!L.isInteger())throw Error(o+"Exponent not an integer: "+pe(L));if(P!=null&&(P=new ce(P)),q=L.e>14,!ae.c||!ae.c[0]||ae.c[0]==1&&!ae.e&&ae.c.length==1||!L.c||!L.c[0])return ee=new ce(Math.pow(+pe(ae),q?L.s*(2-A(L)):+pe(L))),P?ee.mod(P):ee;if(G=L.s<0,P){if(P.c?!P.c[0]:!P.s)return new ce(NaN);y=!G&&ae.isInteger()&&P.isInteger(),y&&(ae=ae.mod(P))}else{if(L.e>9&&(ae.e>0||ae.e<-1||(ae.e==0?ae.c[0]>1||q&&ae.c[1]>=24e7:ae.c[0]<8e13||q&&ae.c[0]<=9999975e7)))return C=ae.s<0&&A(L)?-0:0,ae.e>-1&&(C=1/C),new ce(G?1/C:C);he&&(C=a(he/l+2))}for(q?(g=new ce(.5),G&&(L.s=1),Y=A(L)):(v=Math.abs(+pe(L)),Y=v%2),ee=new ce(F);;){if(Y){if(ee=ee.times(ae),!ee.c)break;C?ee.c.length>C&&(ee.c.length=C):y&&(ee=ee.mod(P))}if(v){if(v=s(v/2),v===0)break;Y=v%2}else if(L=L.times(g),le(L,L.e+1,1),L.e>14)Y=A(L);else{if(v=+pe(L),v===0)break;Y=v%2}ae=ae.times(ae),C?ae.c&&ae.c.length>C&&(ae.c.length=C):y&&(ae=ae.mod(P))}return y?ee:(G&&(ee=F.div(ee)),P?ee.mod(P):C?le(ee,he,ne,V):ee)},x.integerValue=function(L){var P=new ce(this);return L==null?L=ne:O(L,0,8),le(P,P.e+1,L)},x.isEqualTo=x.eq=function(L,P){return w(this,new ce(L,P))===0},x.isFinite=function(){return!!this.c},x.isGreaterThan=x.gt=function(L,P){return w(this,new ce(L,P))>0},x.isGreaterThanOrEqualTo=x.gte=function(L,P){return(P=w(this,new ce(L,P)))===1||P===0},x.isInteger=function(){return!!this.c&&_(this.e/l)>this.c.length-2},x.isLessThan=x.lt=function(L,P){return w(this,new ce(L,P))<0},x.isLessThanOrEqualTo=x.lte=function(L,P){return(P=w(this,new ce(L,P)))===-1||P===0},x.isNaN=function(){return!this.s},x.isNegative=function(){return this.s<0},x.isPositive=function(){return this.s>0},x.isZero=function(){return!!this.c&&this.c[0]==0},x.minus=function(L,P){var g,y,v,C,V=this,q=V.s;if(L=new ce(L,P),P=L.s,!q||!P)return new ce(NaN);if(q!=P)return L.s=-P,V.plus(L);var G=V.e/l,Y=L.e/l,ee=V.c,ae=L.c;if(!G||!Y){if(!ee||!ae)return ee?(L.s=-P,L):new ce(ae?V:NaN);if(!ee[0]||!ae[0])return ae[0]?(L.s=-P,L):new ce(ee[0]?V:ne==3?-0:0)}if(G=_(G),Y=_(Y),ee=ee.slice(),q=G-Y){for((C=q<0)?(q=-q,v=ee):(Y=G,v=ae),v.reverse(),P=q;P--;v.push(0));v.reverse()}else for(y=(C=(q=ee.length)<(P=ae.length))?q:P,q=P=0;P0)for(;P--;ee[g++]=0);for(P=c-1;y>q;){if(ee[--y]=0;){for(g=0,ve=R[v]%W,me=R[v]/W|0,V=G,C=v+V;C>v;)Y=S[--V]%W,ee=S[V]/W|0,q=me*Y+ee*ve,Y=ve*Y+q%W*W+Ee[C]+g,g=(Y/k|0)+(q/W|0)+me*ee,Ee[C--]=Y%k;Ee[C]=g}return g?++y:Ee.splice(0,1),J(L,Ee,y)},x.negated=function(){var L=new ce(this);return L.s=-L.s||null,L},x.plus=function(L,P){var g,y=this,v=y.s;if(L=new ce(L,P),P=L.s,!v||!P)return new ce(NaN);if(v!=P)return L.s=-P,y.minus(L);var C=y.e/l,V=L.e/l,q=y.c,G=L.c;if(!C||!V){if(!q||!G)return new ce(v/0);if(!q[0]||!G[0])return G[0]?L:new ce(q[0]?y:v*0)}if(C=_(C),V=_(V),q=q.slice(),v=C-V){for(v>0?(V=C,g=G):(v=-v,g=q),g.reverse();v--;g.push(0));g.reverse()}for(v=q.length,P=G.length,v-P<0&&(g=G,G=q,q=g,P=v),v=0;P;)v=(q[--P]=q[P]+G[P]+v)/c|0,q[P]=c===q[P]?0:q[P]%c;return v&&(q=[v].concat(q),++V),J(L,q,V)},x.precision=x.sd=function(L,P){var g,y,v,C=this;if(L!=null&&L!==!!L)return O(L,1,p),P==null?P=ne:O(P,0,8),le(new ce(C),L,P);if(!(g=C.c))return null;if(v=g.length-1,y=v*l+1,v=g[v]){for(;v%10==0;v/=10,y--);for(v=g[0];v>=10;v/=10,y++);}return L&&C.e+1>y&&(y=C.e+1),y},x.shiftedBy=function(L){return O(L,-d,d),this.times("1e"+L)},x.squareRoot=x.sqrt=function(){var L,P,g,y,v,C=this,V=C.c,q=C.s,G=C.e,Y=X+4,ee=new ce("0.5");if(q!==1||!V||!V[0])return new ce(!q||q<0&&(!V||V[0])?NaN:V?C:1/0);if(q=Math.sqrt(+pe(C)),q==0||q==1/0?(P=E(V),(P.length+G)%2==0&&(P+="0"),q=Math.sqrt(+P),G=_((G+1)/2)-(G<0||G%2),q==1/0?P="5e"+G:(P=q.toExponential(),P=P.slice(0,P.indexOf("e")+1)+G),g=new ce(P)):g=new ce(q+""),g.c[0]){for(G=g.e,q=G+Y,q<3&&(q=0);;)if(v=g,g=ee.times(v.plus(U(C,v,Y,1))),E(v.c).slice(0,q)===(P=E(g.c)).slice(0,q))if(g.e0&&Ee>0){for(C=Ee%q||q,ee=me.substr(0,C);C0&&(ee+=Y+me.slice(C)),ve&&(ee="-"+ee)}y=ae?ee+(g.decimalSeparator||"")+((G=+g.fractionGroupSize)?ae.replace(new RegExp("\\d{"+G+"}\\B","g"),"$&"+(g.fractionGroupSeparator||"")):ae):ee}return(g.prefix||"")+y+(g.suffix||"")},x.toFraction=function(L){var P,g,y,v,C,V,q,G,Y,ee,ae,ve,me=this,Ee=me.c;if(L!=null&&(q=new ce(L),!q.isInteger()&&(q.c||q.s!==1)||q.lt(F)))throw Error(o+"Argument "+(q.isInteger()?"out of range: ":"not an integer: ")+pe(q));if(!Ee)return new ce(me);for(P=new ce(F),Y=g=new ce(F),y=G=new ce(F),ve=E(Ee),C=P.e=ve.length-me.e-1,P.c[0]=f[(V=C%l)<0?l+V:V],L=!L||q.comparedTo(P)>0?C>0?P:Y:q,V=se,se=1/0,q=new ce(ve),G.c[0]=0;ee=U(q,P,0,1),v=g.plus(ee.times(y)),v.comparedTo(L)!=1;)g=y,y=v,Y=G.plus(ee.times(v=Y)),G=v,P=q.minus(ee.times(v=P)),q=v;return v=U(L.minus(g),y,0,1),G=G.plus(v.times(Y)),g=g.plus(v.times(y)),G.s=Y.s=me.s,C=C*2,ae=U(Y,y,C,ne).minus(me).abs().comparedTo(U(G,g,C,ne).minus(me).abs())<1?[Y,y]:[G,g],se=V,ae},x.toNumber=function(){return+pe(this)},x.toPrecision=function(L,P){return L!=null&&O(L,1,p),Re(this,L,P,2)},x.toString=function(L){var P,g=this,y=g.s,v=g.e;return v===null?y?(P="Infinity",y<0&&(P="-"+P)):P="NaN":(L==null?P=v<=$||v>=j?T(E(g.c),v):I(E(g.c),v,"0"):L===10&&ye?(g=le(new ce(g),X+v+1,ne),P=I(E(g.c),g.e,"0")):(O(L,2,Ne.length,"Base"),P=H(I(E(g.c),v,"0"),10,L,y,!0)),y<0&&g.c[0]&&(P="-"+P)),P},x.valueOf=x.toJSON=function(){return pe(this)},x._isBigNumber=!0,D!=null&&ce.set(D),ce}function _(D){var U=D|0;return D>0||D===U?U:U-1}function E(D){for(var U,H,N=1,x=D.length,F=D[0]+"";Nj^H?1:-1;for(ne=($=x.length)<(j=F.length)?$:j,X=0;XF[X]^H?1:-1;return $==j?0:$>j^H?1:-1}function O(D,U,H,N){if(DH||D!==s(D))throw Error(o+(N||"Argument")+(typeof D=="number"?DH?" out of range: ":" not an integer: ":" not a primitive number: ")+String(D))}function A(D){var U=D.c.length-1;return _(D.e/l)==U&&D.c[U]%2!=0}function T(D,U){return(D.length>1?D.charAt(0)+"."+D.slice(1):D)+(U<0?"e":"e+")+U}function I(D,U,H){var N,x;if(U<0){for(x=H+".";++U;x+=H);D=x+D}else if(N=D.length,++U>N){for(x=H,U-=N;--U;x+=H);D+=x}else U>>25)+T|0,D+=(A&T|~A&I)+O[1]-389564586|0,D=(D<<12|D>>>20)+A|0,I+=(D&A|~D&T)+O[2]+606105819|0,I=(I<<17|I>>>15)+D|0,T+=(I&D|~I&A)+O[3]-1044525330|0,T=(T<<22|T>>>10)+I|0,A+=(T&I|~T&D)+O[4]-176418897|0,A=(A<<7|A>>>25)+T|0,D+=(A&T|~A&I)+O[5]+1200080426|0,D=(D<<12|D>>>20)+A|0,I+=(D&A|~D&T)+O[6]-1473231341|0,I=(I<<17|I>>>15)+D|0,T+=(I&D|~I&A)+O[7]-45705983|0,T=(T<<22|T>>>10)+I|0,A+=(T&I|~T&D)+O[8]+1770035416|0,A=(A<<7|A>>>25)+T|0,D+=(A&T|~A&I)+O[9]-1958414417|0,D=(D<<12|D>>>20)+A|0,I+=(D&A|~D&T)+O[10]-42063|0,I=(I<<17|I>>>15)+D|0,T+=(I&D|~I&A)+O[11]-1990404162|0,T=(T<<22|T>>>10)+I|0,A+=(T&I|~T&D)+O[12]+1804603682|0,A=(A<<7|A>>>25)+T|0,D+=(A&T|~A&I)+O[13]-40341101|0,D=(D<<12|D>>>20)+A|0,I+=(D&A|~D&T)+O[14]-1502002290|0,I=(I<<17|I>>>15)+D|0,T+=(I&D|~I&A)+O[15]+1236535329|0,T=(T<<22|T>>>10)+I|0,A+=(T&D|I&~D)+O[1]-165796510|0,A=(A<<5|A>>>27)+T|0,D+=(A&I|T&~I)+O[6]-1069501632|0,D=(D<<9|D>>>23)+A|0,I+=(D&T|A&~T)+O[11]+643717713|0,I=(I<<14|I>>>18)+D|0,T+=(I&A|D&~A)+O[0]-373897302|0,T=(T<<20|T>>>12)+I|0,A+=(T&D|I&~D)+O[5]-701558691|0,A=(A<<5|A>>>27)+T|0,D+=(A&I|T&~I)+O[10]+38016083|0,D=(D<<9|D>>>23)+A|0,I+=(D&T|A&~T)+O[15]-660478335|0,I=(I<<14|I>>>18)+D|0,T+=(I&A|D&~A)+O[4]-405537848|0,T=(T<<20|T>>>12)+I|0,A+=(T&D|I&~D)+O[9]+568446438|0,A=(A<<5|A>>>27)+T|0,D+=(A&I|T&~I)+O[14]-1019803690|0,D=(D<<9|D>>>23)+A|0,I+=(D&T|A&~T)+O[3]-187363961|0,I=(I<<14|I>>>18)+D|0,T+=(I&A|D&~A)+O[8]+1163531501|0,T=(T<<20|T>>>12)+I|0,A+=(T&D|I&~D)+O[13]-1444681467|0,A=(A<<5|A>>>27)+T|0,D+=(A&I|T&~I)+O[2]-51403784|0,D=(D<<9|D>>>23)+A|0,I+=(D&T|A&~T)+O[7]+1735328473|0,I=(I<<14|I>>>18)+D|0,T+=(I&A|D&~A)+O[12]-1926607734|0,T=(T<<20|T>>>12)+I|0,A+=(T^I^D)+O[5]-378558|0,A=(A<<4|A>>>28)+T|0,D+=(A^T^I)+O[8]-2022574463|0,D=(D<<11|D>>>21)+A|0,I+=(D^A^T)+O[11]+1839030562|0,I=(I<<16|I>>>16)+D|0,T+=(I^D^A)+O[14]-35309556|0,T=(T<<23|T>>>9)+I|0,A+=(T^I^D)+O[1]-1530992060|0,A=(A<<4|A>>>28)+T|0,D+=(A^T^I)+O[4]+1272893353|0,D=(D<<11|D>>>21)+A|0,I+=(D^A^T)+O[7]-155497632|0,I=(I<<16|I>>>16)+D|0,T+=(I^D^A)+O[10]-1094730640|0,T=(T<<23|T>>>9)+I|0,A+=(T^I^D)+O[13]+681279174|0,A=(A<<4|A>>>28)+T|0,D+=(A^T^I)+O[0]-358537222|0,D=(D<<11|D>>>21)+A|0,I+=(D^A^T)+O[3]-722521979|0,I=(I<<16|I>>>16)+D|0,T+=(I^D^A)+O[6]+76029189|0,T=(T<<23|T>>>9)+I|0,A+=(T^I^D)+O[9]-640364487|0,A=(A<<4|A>>>28)+T|0,D+=(A^T^I)+O[12]-421815835|0,D=(D<<11|D>>>21)+A|0,I+=(D^A^T)+O[15]+530742520|0,I=(I<<16|I>>>16)+D|0,T+=(I^D^A)+O[2]-995338651|0,T=(T<<23|T>>>9)+I|0,A+=(I^(T|~D))+O[0]-198630844|0,A=(A<<6|A>>>26)+T|0,D+=(T^(A|~I))+O[7]+1126891415|0,D=(D<<10|D>>>22)+A|0,I+=(A^(D|~T))+O[14]-1416354905|0,I=(I<<15|I>>>17)+D|0,T+=(D^(I|~A))+O[5]-57434055|0,T=(T<<21|T>>>11)+I|0,A+=(I^(T|~D))+O[12]+1700485571|0,A=(A<<6|A>>>26)+T|0,D+=(T^(A|~I))+O[3]-1894986606|0,D=(D<<10|D>>>22)+A|0,I+=(A^(D|~T))+O[10]-1051523|0,I=(I<<15|I>>>17)+D|0,T+=(D^(I|~A))+O[1]-2054922799|0,T=(T<<21|T>>>11)+I|0,A+=(I^(T|~D))+O[8]+1873313359|0,A=(A<<6|A>>>26)+T|0,D+=(T^(A|~I))+O[15]-30611744|0,D=(D<<10|D>>>22)+A|0,I+=(A^(D|~T))+O[6]-1560198380|0,I=(I<<15|I>>>17)+D|0,T+=(D^(I|~A))+O[13]+1309151649|0,T=(T<<21|T>>>11)+I|0,A+=(I^(T|~D))+O[4]-145523070|0,A=(A<<6|A>>>26)+T|0,D+=(T^(A|~I))+O[11]-1120210379|0,D=(D<<10|D>>>22)+A|0,I+=(A^(D|~T))+O[2]+718787259|0,I=(I<<15|I>>>17)+D|0,T+=(D^(I|~A))+O[9]-343485551|0,T=(T<<21|T>>>11)+I|0,w[0]=A+w[0]|0,w[1]=T+w[1]|0,w[2]=I+w[2]|0,w[3]=D+w[3]|0}function s(w){var O=[],A;for(A=0;A<64;A+=4)O[A>>2]=w.charCodeAt(A)+(w.charCodeAt(A+1)<<8)+(w.charCodeAt(A+2)<<16)+(w.charCodeAt(A+3)<<24);return O}function o(w){var O=[],A;for(A=0;A<64;A+=4)O[A>>2]=w[A]+(w[A+1]<<8)+(w[A+2]<<16)+(w[A+3]<<24);return O}function u(w){var O=w.length,A=[1732584193,-271733879,-1732584194,271733878],T,I,D,U,H,N;for(T=64;T<=O;T+=64)a(A,s(w.substring(T-64,T)));for(w=w.substring(T-64),I=w.length,D=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],T=0;T>2]|=w.charCodeAt(T)<<(T%4<<3);if(D[T>>2]|=128<<(T%4<<3),T>55)for(a(A,D),T=0;T<16;T+=1)D[T]=0;return U=O*8,U=U.toString(16).match(/(.*?)(.{0,8})$/),H=parseInt(U[2],16),N=parseInt(U[1],16)||0,D[14]=H,D[15]=N,a(A,D),A}function c(w){var O=w.length,A=[1732584193,-271733879,-1732584194,271733878],T,I,D,U,H,N;for(T=64;T<=O;T+=64)a(A,o(w.subarray(T-64,T)));for(w=T-64>2]|=w[T]<<(T%4<<3);if(D[T>>2]|=128<<(T%4<<3),T>55)for(a(A,D),T=0;T<16;T+=1)D[T]=0;return U=O*8,U=U.toString(16).match(/(.*?)(.{0,8})$/),H=parseInt(U[2],16),N=parseInt(U[1],16)||0,D[14]=H,D[15]=N,a(A,D),A}function l(w){var O="",A;for(A=0;A<4;A+=1)O+=n[w>>A*8+4&15]+n[w>>A*8&15];return O}function d(w){var O;for(O=0;OD?new ArrayBuffer(0):(U=D-I,H=new ArrayBuffer(U),N=new Uint8Array(H),x=new Uint8Array(this,I,U),N.set(x),H)}}();function f(w){return/[\u0080-\uFFFF]/.test(w)&&(w=unescape(encodeURIComponent(w))),w}function h(w,O){var A=w.length,T=new ArrayBuffer(A),I=new Uint8Array(T),D;for(D=0;D>2]|=O.charCodeAt(T)<<(T%4<<3);return this._finish(I,A),D=d(this._hash),w&&(D=_(D)),this.reset(),D},E.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},E.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},E.prototype.setState=function(w){return this._buff=w.buff,this._length=w.length,this._hash=w.hash,this},E.prototype.destroy=function(){delete this._hash,delete this._buff,delete this._length},E.prototype._finish=function(w,O){var A=O,T,I,D;if(w[A>>2]|=128<<(A%4<<3),A>55)for(a(this._hash,w),A=0;A<16;A+=1)w[A]=0;T=this._length*8,T=T.toString(16).match(/(.*?)(.{0,8})$/),I=parseInt(T[2],16),D=parseInt(T[1],16)||0,w[14]=I,w[15]=D,a(this._hash,w)},E.hash=function(w,O){return E.hashBinary(f(w),O)},E.hashBinary=function(w,O){var A=u(w),T=d(A);return O?_(T):T},E.ArrayBuffer=function(){this.reset()},E.ArrayBuffer.prototype.append=function(w){var O=b(this._buff.buffer,w,!0),A=O.length,T;for(this._length+=w.byteLength,T=64;T<=A;T+=64)a(this._hash,o(O.subarray(T-64,T)));return this._buff=T-64>2]|=O[I]<<(I%4<<3);return this._finish(T,A),D=d(this._hash),w&&(D=_(D)),this.reset(),D},E.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},E.ArrayBuffer.prototype.getState=function(){var w=E.prototype.getState.call(this);return w.buff=p(w.buff),w},E.ArrayBuffer.prototype.setState=function(w){return w.buff=h(w.buff,!0),E.prototype.setState.call(this,w)},E.ArrayBuffer.prototype.destroy=E.prototype.destroy,E.ArrayBuffer.prototype._finish=E.prototype._finish,E.ArrayBuffer.hash=function(w,O){var A=c(new Uint8Array(w)),T=d(A);return O?_(T):T},E})})(BL);var Upe=BL.exports,YR={},rw={},nw={};Object.defineProperty(nw,"__esModule",{value:!0});nw.default=Vpe;let m1;const qpe=new Uint8Array(16);function Vpe(){if(!m1&&(m1=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!m1))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return m1(qpe)}var ac={},xl={},iw={};Object.defineProperty(iw,"__esModule",{value:!0});iw.default=void 0;var Hpe=/^(?:[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;iw.default=Hpe;Object.defineProperty(xl,"__esModule",{value:!0});xl.default=void 0;var kpe=Qpe(iw);function Qpe(t){return t&&t.__esModule?t:{default:t}}function Gpe(t){return typeof t=="string"&&kpe.default.test(t)}var zpe=Gpe;xl.default=zpe;Object.defineProperty(ac,"__esModule",{value:!0});ac.default=void 0;ac.unsafeStringify=$L;var Wpe=Xpe(xl);function Xpe(t){return t&&t.__esModule?t:{default:t}}const Mn=[];for(let t=0;t<256;++t)Mn.push((t+256).toString(16).slice(1));function $L(t,e=0){return Mn[t[e+0]]+Mn[t[e+1]]+Mn[t[e+2]]+Mn[t[e+3]]+"-"+Mn[t[e+4]]+Mn[t[e+5]]+"-"+Mn[t[e+6]]+Mn[t[e+7]]+"-"+Mn[t[e+8]]+Mn[t[e+9]]+"-"+Mn[t[e+10]]+Mn[t[e+11]]+Mn[t[e+12]]+Mn[t[e+13]]+Mn[t[e+14]]+Mn[t[e+15]]}function Kpe(t,e=0){const r=$L(t,e);if(!(0,Wpe.default)(r))throw TypeError("Stringified UUID is invalid");return r}var Jpe=Kpe;ac.default=Jpe;Object.defineProperty(rw,"__esModule",{value:!0});rw.default=void 0;var Ype=e0e(nw),Zpe=ac;function e0e(t){return t&&t.__esModule?t:{default:t}}let H4,ET,OT=0,AT=0;function t0e(t,e,r){let n=e&&r||0;const a=e||new Array(16);t=t||{};let s=t.node||H4,o=t.clockseq!==void 0?t.clockseq:ET;if(s==null||o==null){const h=t.random||(t.rng||Ype.default)();s==null&&(s=H4=[h[0]|1,h[1],h[2],h[3],h[4],h[5]]),o==null&&(o=ET=(h[6]<<8|h[7])&16383)}let u=t.msecs!==void 0?t.msecs:Date.now(),c=t.nsecs!==void 0?t.nsecs:AT+1;const l=u-OT+(c-AT)/1e4;if(l<0&&t.clockseq===void 0&&(o=o+1&16383),(l<0||u>OT)&&t.nsecs===void 0&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");OT=u,AT=c,ET=o,u+=122192928e5;const d=((u&268435455)*1e4+c)%4294967296;a[n++]=d>>>24&255,a[n++]=d>>>16&255,a[n++]=d>>>8&255,a[n++]=d&255;const f=u/4294967296*1e4&268435455;a[n++]=f>>>8&255,a[n++]=f&255,a[n++]=f>>>24&15|16,a[n++]=f>>>16&255,a[n++]=o>>>8|128,a[n++]=o&255;for(let h=0;h<6;++h)a[n+h]=s[h];return e||(0,Zpe.unsafeStringify)(a)}var r0e=t0e;rw.default=r0e;var aw={},Wu={},J0={};Object.defineProperty(J0,"__esModule",{value:!0});J0.default=void 0;var n0e=i0e(xl);function i0e(t){return t&&t.__esModule?t:{default:t}}function a0e(t){if(!(0,n0e.default)(t))throw TypeError("Invalid UUID");let e;const r=new Uint8Array(16);return r[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=e&255,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=e&255,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=e&255,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=e&255,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=e&255,r}var s0e=a0e;J0.default=s0e;Object.defineProperty(Wu,"__esModule",{value:!0});Wu.URL=Wu.DNS=void 0;Wu.default=d0e;var o0e=ac,u0e=c0e(J0);function c0e(t){return t&&t.__esModule?t:{default:t}}function l0e(t){t=unescape(encodeURIComponent(t));const e=[];for(let r=0;r>5]>>>a%32&255,o=parseInt(n.charAt(s>>>4&15)+n.charAt(s&15),16);e.push(o)}return e}function VL(t){return(t+64>>>9<<4)+14+1}function p0e(t,e){t[e>>5]|=128<>5]|=(t[n/8]&255)<>16)+(e>>16)+(r>>16)<<16|r&65535}function b0e(t,e){return t<>>32-e}function ow(t,e,r,n,a,s){return Nu(b0e(Nu(Nu(e,t),Nu(n,s)),a),r)}function Hn(t,e,r,n,a,s,o){return ow(e&r|~e&n,t,e,a,s,o)}function kn(t,e,r,n,a,s,o){return ow(e&n|r&~n,t,e,a,s,o)}function Qn(t,e,r,n,a,s,o){return ow(e^r^n,t,e,a,s,o)}function Gn(t,e,r,n,a,s,o){return ow(r^(e|~n),t,e,a,s,o)}var _0e=f0e;sw.default=_0e;Object.defineProperty(aw,"__esModule",{value:!0});aw.default=void 0;var g0e=HL(Wu),m0e=HL(sw);function HL(t){return t&&t.__esModule?t:{default:t}}const v0e=(0,g0e.default)("v3",48,m0e.default);var w0e=v0e;aw.default=w0e;var uw={},cw={};Object.defineProperty(cw,"__esModule",{value:!0});cw.default=void 0;const S0e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var T0e={randomUUID:S0e};cw.default=T0e;Object.defineProperty(uw,"__esModule",{value:!0});uw.default=void 0;var k4=kL(cw),E0e=kL(nw),O0e=ac;function kL(t){return t&&t.__esModule?t:{default:t}}function A0e(t,e,r){if(k4.default.randomUUID&&!e&&!t)return k4.default.randomUUID();t=t||{};const n=t.random||(t.rng||E0e.default)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let a=0;a<16;++a)e[r+a]=n[a];return e}return(0,O0e.unsafeStringify)(n)}var R0e=A0e;uw.default=R0e;var lw={},dw={};Object.defineProperty(dw,"__esModule",{value:!0});dw.default=void 0;function x0e(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function RT(t,e){return t<>>32-e}function I0e(t){const e=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof t=="string"){const o=unescape(encodeURIComponent(t));t=[];for(let u=0;u>>0;h=f,f=d,d=RT(l,30)>>>0,l=c,c=_}r[0]=r[0]+c>>>0,r[1]=r[1]+l>>>0,r[2]=r[2]+d>>>0,r[3]=r[3]+f>>>0,r[4]=r[4]+h>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var P0e=I0e;dw.default=P0e;Object.defineProperty(lw,"__esModule",{value:!0});lw.default=void 0;var D0e=QL(Wu),N0e=QL(dw);function QL(t){return t&&t.__esModule?t:{default:t}}const C0e=(0,D0e.default)("v5",80,N0e.default);var j0e=C0e;lw.default=j0e;var fw={};Object.defineProperty(fw,"__esModule",{value:!0});fw.default=void 0;var M0e="00000000-0000-0000-0000-000000000000";fw.default=M0e;var hw={};Object.defineProperty(hw,"__esModule",{value:!0});hw.default=void 0;var F0e=L0e(xl);function L0e(t){return t&&t.__esModule?t:{default:t}}function B0e(t){if(!(0,F0e.default)(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)}var $0e=B0e;hw.default=$0e;(function(t){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 l.default}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(t,"v1",{enumerable:!0,get:function(){return e.default}}),Object.defineProperty(t,"v3",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"v4",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(t,"validate",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(t,"version",{enumerable:!0,get:function(){return o.default}});var e=d(rw),r=d(aw),n=d(uw),a=d(lw),s=d(fw),o=d(hw),u=d(xl),c=d(ac),l=d(J0);function d(f){return f&&f.__esModule?f:{default:f}}})(YR);var mh={},Q4;function pw(){if(Q4)return mh;Q4=1,Object.defineProperty(mh,"__esModule",{value:!0}),mh.orderTypes=void 0;const t=Pa,e=jf(),r=Rl(),n=ni,a=Ke;function s(l,d,f=!1,h,p){if(l===d)return 0;if(l===void 0)return-1;if(d===void 0)return 1;if(l.termType!==d.termType)return c[l.termType]"term"),cache:h||new t.LRUCache({max:1e3})},defaultTimeZone:{zoneHours:0,zoneMinutes:0}},E=new r.TermTransformer(_.superTypeProvider),w=E.transformLiteral(l),O=E.transformLiteral(d);try{return b.apply([w,O],_).typedValue?0:p.apply([w,O],_).typedValue?1:-1}catch{const A=u(w.dataType,O.dataType);return A!==0?A:u(w.str(),O.str())}}function u(l,d){return l===d?0:lB=>(0,_.bool)(!B.coerceEBV())).collect()},T={arity:1,overloads:(0,_.declare)(c.RegularOperator.UPLUS).numericConverter(()=>B=>B).collect()},I={arity:1,overloads:(0,_.declare)(c.RegularOperator.UMINUS).numericConverter(()=>B=>-B).collect()},D={arity:2,overloads:(0,_.declare)(c.RegularOperator.MULTIPLICATION).arithmetic(()=>(B,re)=>new t.BigNumber(B).times(re).toNumber()).collect()},U={arity:2,overloads:(0,_.declare)(c.RegularOperator.DIVISION).arithmetic(()=>(B,re)=>new t.BigNumber(B).div(re).toNumber()).onBinaryTyped([l.TypeURL.XSD_INTEGER,l.TypeURL.XSD_INTEGER],()=>(B,re)=>{if(re===0)throw new f.ExpressionError("Integer division by 0");return(0,_.decimal)(new t.BigNumber(B).div(re).toNumber())}).collect()},H={arity:2,overloads:(0,_.declare)(c.RegularOperator.ADDITION).arithmetic(()=>(B,re)=>new t.BigNumber(B).plus(re).toNumber()).set([l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>new o.DateTimeLiteral((0,p.addDurationToDateTime)(B.typedValue,(0,d.defaultedDurationRepresentation)(re.typedValue)))).copy({from:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],to:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([l.TypeURL.XSD_DATE,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>new o.DateLiteral((0,p.addDurationToDateTime)((0,d.defaultedDateTimeRepresentation)(B.typedValue),(0,d.defaultedDurationRepresentation)(re.typedValue)))).copy({from:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_DAY_TIME_DURATION],to:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([l.TypeURL.XSD_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>new o.TimeLiteral((0,p.addDurationToDateTime)((0,d.defaultedDateTimeRepresentation)(B.typedValue),(0,d.defaultedDurationRepresentation)(re.typedValue)))).copy({from:[l.TypeURL.XSD_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],to:[l.TypeURL.XSD_TIME,l.TypeURL.XSD_YEAR_MONTH_DURATION]}).collect()},N={arity:2,overloads:(0,_.declare)(c.RegularOperator.SUBTRACTION).arithmetic(()=>(B,re)=>new t.BigNumber(B).minus(re).toNumber()).set([l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DATE_TIME],({defaultTimeZone:B})=>([re,Se])=>new o.DayTimeDurationLiteral((0,p.elapsedDuration)(re.typedValue,Se.typedValue,B))).copy({from:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_DATE]}).copy({from:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_TIME,l.TypeURL.XSD_TIME]}).set([l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>new o.DateTimeLiteral((0,p.addDurationToDateTime)(B.typedValue,(0,d.defaultedDurationRepresentation)((0,d.negateDuration)(re.typedValue))))).copy({from:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],to:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([l.TypeURL.XSD_DATE,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>new o.DateLiteral((0,p.addDurationToDateTime)((0,d.defaultedDateTimeRepresentation)(B.typedValue),(0,d.defaultedDurationRepresentation)((0,d.negateDuration)(re.typedValue))))).copy({from:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_DAY_TIME_DURATION],to:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_YEAR_MONTH_DURATION]}).set([l.TypeURL.XSD_TIME,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>new o.TimeLiteral((0,p.addDurationToDateTime)((0,d.defaultedDateTimeRepresentation)(B.typedValue),(0,d.defaultedDurationRepresentation)((0,d.negateDuration)(re.typedValue))))).collect()},x={arity:2,overloads:(0,_.declare)(c.RegularOperator.EQUAL).numberTest(()=>(B,re)=>B===re).stringTest(()=>(B,re)=>B.localeCompare(re)===0).set([l.TypeURL.RDF_LANG_STRING,l.TypeURL.RDF_LANG_STRING],()=>([B,re])=>(0,_.bool)(B.str()===re.str()&&B.language===re.language)).set([l.TypeAlias.SPARQL_STRINGLY,l.TypeAlias.SPARQL_STRINGLY],()=>()=>(0,_.bool)(!1)).booleanTest(()=>(B,re)=>B===re).dateTimeTest(({defaultTimeZone:B})=>(re,Se)=>(0,d.toUTCDate)(re,B).getTime()===(0,d.toUTCDate)(Se,B).getTime()).copy({from:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_DATE]}).set(["quad","quad"],B=>([re,Se])=>{const Fe=new b.RegularFunction(l.RegularOperator.EQUAL,x);return(0,_.bool)(Fe.apply([re.subject,Se.subject],B).coerceEBV()&&Fe.apply([re.predicate,Se.predicate],B).coerceEBV()&&Fe.apply([re.object,Se.object],B).coerceEBV())},!1).set(["term","term"],()=>([B,re])=>(0,_.bool)(F(B,re)),!1).set([l.TypeURL.XSD_DURATION,l.TypeURL.XSD_DURATION],()=>([B,re])=>(0,_.bool)((0,d.yearMonthDurationsToMonths)((0,d.defaultedYearMonthDurationRepresentation)(B.typedValue))===(0,d.yearMonthDurationsToMonths)((0,d.defaultedYearMonthDurationRepresentation)(re.typedValue))&&(0,d.dayTimeDurationsToSeconds)((0,d.defaultedDayTimeDurationRepresentation)(B.typedValue))===(0,d.dayTimeDurationsToSeconds)((0,d.defaultedDayTimeDurationRepresentation)(re.typedValue)))).set([l.TypeURL.XSD_TIME,l.TypeURL.XSD_TIME],({defaultTimeZone:B})=>([re,Se])=>(0,_.bool)((0,d.toUTCDate)((0,d.defaultedDateTimeRepresentation)(re.typedValue),B).getTime()===(0,d.toUTCDate)((0,d.defaultedDateTimeRepresentation)(Se.typedValue),B).getTime())).collect()};function F(B,re){const Se=B.toRDF(),Fe=re.toRDF(),Ae=Se.equals(Fe);if(!Ae&&Se.termType==="Literal"&&Fe.termType==="Literal")throw new f.RDFEqualTypeError([B,re]);return Ae}const X={arity:2,overloads:(0,_.declare)(c.RegularOperator.NOT_EQUAL).set(["term","term"],B=>([re,Se])=>(0,_.bool)(!w.regularFunctions[c.RegularOperator.EQUAL].apply([re,Se],B).typedValue)).collect()},ne={arity:2,overloads:(0,_.declare)(c.RegularOperator.LT).numberTest(()=>(B,re)=>B(B,re)=>B.localeCompare(re)===-1).booleanTest(()=>(B,re)=>B([B,re])=>(0,_.bool)((0,h.orderTypes)(B.toRDF(),re.toRDF(),!0)===-1),!1).dateTimeTest(({defaultTimeZone:B})=>(re,Se)=>(0,d.toUTCDate)(re,B).getTime()<(0,d.toUTCDate)(Se,B).getTime()).copy({from:[l.TypeURL.XSD_DATE_TIME,l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_DATE,l.TypeURL.XSD_DATE]}).set([l.TypeURL.XSD_YEAR_MONTH_DURATION,l.TypeURL.XSD_YEAR_MONTH_DURATION],()=>([B,re])=>(0,_.bool)((0,d.yearMonthDurationsToMonths)((0,d.defaultedYearMonthDurationRepresentation)(B.typedValue))<(0,d.yearMonthDurationsToMonths)((0,d.defaultedYearMonthDurationRepresentation)(re.typedValue)))).set([l.TypeURL.XSD_DAY_TIME_DURATION,l.TypeURL.XSD_DAY_TIME_DURATION],()=>([B,re])=>(0,_.bool)((0,d.dayTimeDurationsToSeconds)((0,d.defaultedDayTimeDurationRepresentation)(B.typedValue))<(0,d.dayTimeDurationsToSeconds)((0,d.defaultedDayTimeDurationRepresentation)(re.typedValue)))).set([l.TypeURL.XSD_TIME,l.TypeURL.XSD_TIME],({defaultTimeZone:B})=>([re,Se])=>(0,_.bool)((0,d.toUTCDate)((0,d.defaultedDateTimeRepresentation)(re.typedValue),B).getTime()<(0,d.toUTCDate)((0,d.defaultedDateTimeRepresentation)(Se.typedValue),B).getTime())).collect()},$={arity:2,overloads:(0,_.declare)(c.RegularOperator.GT).set(["term","term"],B=>([re,Se])=>w.regularFunctions[c.RegularOperator.LT].apply([Se,re],B)).collect()},j={arity:2,overloads:(0,_.declare)(c.RegularOperator.LTE).set(["term","term"],B=>([re,Se])=>(0,_.bool)(w.regularFunctions[c.RegularOperator.LT].apply([re,Se],B).typedValue||w.regularFunctions[c.RegularOperator.EQUAL].apply([re,Se],B).typedValue)).collect()},Q={arity:2,overloads:(0,_.declare)(c.RegularOperator.GTE).set(["term","term"],B=>([re,Se])=>w.regularFunctions[c.RegularOperator.LTE].apply([Se,re],B)).collect()},se={arity:1,overloads:(0,_.declare)(c.RegularOperator.IS_IRI).onTerm1(()=>B=>(0,_.bool)(B.termType==="namedNode")).collect()},ie={arity:1,overloads:(0,_.declare)(c.RegularOperator.IS_BLANK).onTerm1(()=>B=>(0,_.bool)(B.termType==="blankNode")).collect()},be={arity:1,overloads:(0,_.declare)(c.RegularOperator.IS_LITERAL).onTerm1(()=>B=>(0,_.bool)(B.termType==="literal")).collect()},he={arity:1,overloads:(0,_.declare)(c.RegularOperator.IS_NUMERIC).onNumeric1(()=>()=>(0,_.bool)(!0)).onTerm1(()=>()=>(0,_.bool)(!1)).collect()},Te={arity:1,overloads:(0,_.declare)(c.RegularOperator.STR).onTerm1(()=>B=>(0,_.string)(B.str())).collect()},Ne={arity:1,overloads:(0,_.declare)(c.RegularOperator.LANG).onLiteral1(()=>B=>(0,_.string)(B.language||"")).collect()},ye={arity:1,overloads:(0,_.declare)(c.RegularOperator.DATATYPE).onLiteral1(()=>B=>new o.NamedNode(B.dataType)).collect()},ce={arity:1,overloads:(0,_.declare)(c.RegularOperator.IRI).set(["namedNode"],B=>re=>{const Se=re[0],Fe=(0,n.resolve)(Se.str(),B.baseIRI||"");return new o.NamedNode(Fe)}).onString1(B=>re=>{const Se=(0,n.resolve)(re.str(),B.baseIRI||"");return new o.NamedNode(Se)}).collect()},Re={arity:2,overloads:(0,_.declare)(c.RegularOperator.STRDT).set([l.TypeURL.XSD_STRING,"namedNode"],({superTypeProvider:B})=>([re,Se])=>{const Fe=O.literal(re.typedValue,O.namedNode(Se.value));return new u.TermTransformer(B).transformLiteral(Fe)}).collect()},oe={arity:2,overloads:(0,_.declare)(c.RegularOperator.STRLANG).onBinaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>(B,re)=>new o.LangStringLiteral(B,re.toLowerCase())).collect()},J={arity:0,overloads:(0,_.declare)(c.RegularOperator.UUID).set([],()=>()=>new o.NamedNode(`urn:uuid:${s.v4()}`)).collect()},le={arity:0,overloads:(0,_.declare)(c.RegularOperator.STRUUID).set([],()=>()=>(0,_.string)(s.v4())).collect()},pe={arity:1,overloads:(0,_.declare)(c.RegularOperator.STRLEN).onStringly1(()=>B=>(0,_.integer)([...B.typedValue].length)).collect()},L={arity:[2,3],overloads:(0,_.declare)(c.RegularOperator.SUBSTR).onBinaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_INTEGER],()=>(B,re)=>(0,_.string)([...B].slice(re-1).join(""))).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.XSD_INTEGER],()=>(B,re)=>{const Se=[...B.typedValue].slice(re.typedValue-1).join("");return(0,_.langString)(Se,B.language)}).onTernaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_INTEGER,l.TypeURL.XSD_INTEGER],()=>(B,re,Se)=>(0,_.string)([...B].slice(re-1,Se+re-1).join(""))).onTernary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.XSD_INTEGER,l.TypeURL.XSD_INTEGER],()=>(B,re,Se)=>{const Fe=[...B.typedValue].slice(re.typedValue-1,Se.typedValue+re.typedValue-1).join("");return(0,_.langString)(Fe,B.language)}).collect()},P={arity:1,overloads:(0,_.declare)(c.RegularOperator.UCASE).onString1Typed(()=>B=>(0,_.string)(B.toUpperCase())).onLangString1(()=>B=>(0,_.langString)(B.typedValue.toUpperCase(),B.language)).collect()},g={arity:1,overloads:(0,_.declare)(c.RegularOperator.LCASE).onString1Typed(()=>B=>(0,_.string)(B.toLowerCase())).onLangString1(()=>B=>(0,_.langString)(B.typedValue.toLowerCase(),B.language)).collect()},y={arity:2,overloads:(0,_.declare)(c.RegularOperator.STRSTARTS).onBinaryTyped([l.TypeAlias.SPARQL_STRINGLY,l.TypeURL.XSD_STRING],()=>(B,re)=>(0,_.bool)(B.startsWith(re))).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.RDF_LANG_STRING],()=>(B,re)=>{if(B.language!==re.language)throw new f.IncompatibleLanguageOperation(B,re);return(0,_.bool)(B.typedValue.startsWith(re.typedValue))}).collect()},v={arity:2,overloads:(0,_.declare)(c.RegularOperator.STRENDS).onBinaryTyped([l.TypeAlias.SPARQL_STRINGLY,l.TypeURL.XSD_STRING],()=>(B,re)=>(0,_.bool)(B.endsWith(re))).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.RDF_LANG_STRING],()=>(B,re)=>{if(B.language!==re.language)throw new f.IncompatibleLanguageOperation(B,re);return(0,_.bool)(B.typedValue.endsWith(re.typedValue))}).collect()},C={arity:2,overloads:(0,_.declare)(c.RegularOperator.CONTAINS).onBinaryTyped([l.TypeAlias.SPARQL_STRINGLY,l.TypeURL.XSD_STRING],()=>(B,re)=>(0,_.bool)(B.includes(re))).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.RDF_LANG_STRING],()=>(B,re)=>{if(B.language!==re.language)throw new f.IncompatibleLanguageOperation(B,re);return(0,_.bool)(B.typedValue.includes(re.typedValue))}).collect()},V={arity:2,overloads:(0,_.declare)(c.RegularOperator.STRBEFORE).onBinaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>(B,re)=>(0,_.string)(B.slice(0,Math.max(0,B.indexOf(re))))).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.XSD_STRING],()=>(B,re)=>{const[Se,Fe]=[B.typedValue,re.typedValue],Ae=B.typedValue.slice(0,Math.max(0,Se.indexOf(Fe)));return Ae||!Fe?(0,_.langString)(Ae,B.language):(0,_.string)(Ae)}).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.RDF_LANG_STRING],()=>(B,re)=>{if(B.language!==re.language)throw new f.IncompatibleLanguageOperation(B,re);const[Se,Fe]=[B.typedValue,re.typedValue],Ae=B.typedValue.slice(0,Math.max(0,Se.indexOf(Fe)));return Ae||!Fe?(0,_.langString)(Ae,B.language):(0,_.string)(Ae)}).collect()},q={arity:2,overloads:(0,_.declare)(c.RegularOperator.STRAFTER).onBinaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>(B,re)=>(0,_.string)(B.slice(B.indexOf(re)).slice(re.length))).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.XSD_STRING],()=>(B,re)=>{const[Se,Fe]=[B.typedValue,re.typedValue],Ae=Se.slice(Se.indexOf(Fe)).slice(Fe.length);return Ae||!Fe?(0,_.langString)(Ae,B.language):(0,_.string)(Ae)}).onBinary([l.TypeURL.RDF_LANG_STRING,l.TypeURL.RDF_LANG_STRING],()=>(B,re)=>{if(B.language!==re.language)throw new f.IncompatibleLanguageOperation(B,re);const[Se,Fe]=[B.typedValue,re.typedValue],Ae=Se.slice(Se.indexOf(Fe)).slice(Fe.length);return Ae||!Fe?(0,_.langString)(Ae,B.language):(0,_.string)(Ae)}).collect()},G={arity:1,overloads:(0,_.declare)(c.RegularOperator.ENCODE_FOR_URI).onStringly1Typed(()=>B=>(0,_.string)(encodeURI(B))).collect()},Y={arity:2,overloads:(0,_.declare)(c.RegularOperator.LANG_MATCHES).onBinaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>(B,re)=>(0,_.bool)(E.langMatches(B,re))).collect()},ee=()=>(B,re)=>(0,_.bool)(E.matches(B,re)),ae=()=>(B,re,Se)=>(0,_.bool)(E.matches(B,re,Se)),ve={arity:[2,3],overloads:(0,_.declare)(c.RegularOperator.REGEX).onBinaryTyped([l.TypeAlias.SPARQL_STRINGLY,l.TypeURL.XSD_STRING],ee).onTernaryTyped([l.TypeAlias.SPARQL_STRINGLY,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],ae).collect()},me={arity:[3,4],overloads:(0,_.declare)(c.RegularOperator.REPLACE).onTernaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>(B,re,Se)=>(0,_.string)(E.replace(B,re,Se))).set([l.TypeURL.RDF_LANG_STRING,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>([B,re,Se])=>{const Fe=E.replace(B.typedValue,re.typedValue,Se.typedValue);return(0,_.langString)(Fe,B.language)}).onQuaternaryTyped([l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>(B,re,Se,Fe)=>(0,_.string)(E.replace(B,re,Se,Fe))).set([l.TypeURL.RDF_LANG_STRING,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING,l.TypeURL.XSD_STRING],()=>([B,re,Se,Fe])=>{const Ae=E.replace(B.typedValue,re.typedValue,Se.typedValue,Fe.typedValue);return(0,_.langString)(Ae,B.language)}).collect()},Ee={arity:1,overloads:(0,_.declare)(c.RegularOperator.ABS).numericConverter(()=>B=>Math.abs(B)).collect()},k={arity:1,overloads:(0,_.declare)(c.RegularOperator.ROUND).numericConverter(()=>B=>Math.round(B)).collect()},W={arity:1,overloads:(0,_.declare)(c.RegularOperator.CEIL).numericConverter(()=>B=>Math.ceil(B)).collect()},M={arity:1,overloads:(0,_.declare)(c.RegularOperator.FLOOR).numericConverter(()=>B=>Math.floor(B)).collect()},S={arity:0,overloads:(0,_.declare)(c.RegularOperator.RAND).set([],()=>()=>(0,_.double)(Math.random())).collect()},R={arity:0,overloads:(0,_.declare)(c.RegularOperator.NOW).set([],B=>()=>new o.DateTimeLiteral((0,d.toDateTimeRepresentation)({date:B.now,timeZone:B.defaultTimeZone}))).collect()},z={arity:1,overloads:(0,_.declare)(c.RegularOperator.YEAR).onDateTime1(()=>B=>(0,_.integer)(B.typedValue.year)).set([l.TypeURL.XSD_DATE],()=>([B])=>(0,_.integer)(B.typedValue.year)).collect()},ue={arity:1,overloads:(0,_.declare)(c.RegularOperator.MONTH).onDateTime1(()=>B=>(0,_.integer)(B.typedValue.month)).set([l.TypeURL.XSD_DATE],()=>([B])=>(0,_.integer)(B.typedValue.month)).collect()},ge={arity:1,overloads:(0,_.declare)(c.RegularOperator.DAY).onDateTime1(()=>B=>(0,_.integer)(B.typedValue.day)).set([l.TypeURL.XSD_DATE],()=>([B])=>(0,_.integer)(B.typedValue.day)).collect()},we={arity:1,overloads:(0,_.declare)(c.RegularOperator.HOURS).onDateTime1(()=>B=>(0,_.integer)(B.typedValue.hours)).set([l.TypeURL.XSD_TIME],()=>([B])=>(0,_.integer)(B.typedValue.hours)).collect()},Me={arity:1,overloads:(0,_.declare)(c.RegularOperator.MINUTES).onDateTime1(()=>B=>(0,_.integer)(B.typedValue.minutes)).set([l.TypeURL.XSD_TIME],()=>([B])=>(0,_.integer)(B.typedValue.minutes)).collect()},Ue={arity:1,overloads:(0,_.declare)(c.RegularOperator.SECONDS).onDateTime1(()=>B=>(0,_.decimal)(B.typedValue.seconds)).set([l.TypeURL.XSD_TIME],()=>([B])=>(0,_.integer)(B.typedValue.seconds)).collect()},Ge={arity:1,overloads:(0,_.declare)(c.RegularOperator.TIMEZONE).onDateTime1(()=>B=>{const re={hours:B.typedValue.zoneHours,minutes:B.typedValue.zoneMinutes};if(re.hours===void 0&&re.minutes===void 0)throw new f.InvalidTimezoneCall(B.str());return new o.DayTimeDurationLiteral(re)}).copy({from:[l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_DATE]}).copy({from:[l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_TIME]}).collect()},We={arity:1,overloads:(0,_.declare)(c.RegularOperator.TZ).onDateTime1(()=>B=>(0,_.string)((0,d.extractRawTimeZone)(B.str()))).copy({from:[l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_DATE]}).copy({from:[l.TypeURL.XSD_DATE_TIME],to:[l.TypeURL.XSD_TIME]}).collect()},lt={arity:1,overloads:(0,_.declare)(c.RegularOperator.MD5).onString1Typed(()=>B=>(0,_.string)((0,a.hash)(B))).collect()},Wr={arity:1,overloads:(0,_.declare)(c.RegularOperator.SHA1).onString1Typed(()=>B=>(0,_.string)((0,e.sha1)().update(B).digest("hex"))).collect()},br={arity:1,overloads:(0,_.declare)(c.RegularOperator.SHA256).onString1Typed(()=>B=>(0,_.string)((0,e.sha256)().update(B).digest("hex"))).collect()},Br={arity:1,overloads:(0,_.declare)(c.RegularOperator.SHA384).onString1Typed(()=>B=>(0,_.string)((0,e.sha384)().update(B).digest("hex"))).collect()},Qt={arity:1,overloads:(0,_.declare)(c.RegularOperator.SHA512).onString1Typed(()=>B=>(0,_.string)((0,e.sha512)().update(B).digest("hex"))).collect()},_r={arity:3,overloads:(0,_.declare)(c.RegularOperator.TRIPLE).onTerm3(B=>(...re)=>new o.Quad(O.quad(re[0].toRDF(),re[1].toRDF(),re[2].toRDF()),B.superTypeProvider)).collect()},Pr={arity:1,overloads:(0,_.declare)(c.RegularOperator.SUBJECT).onQuad1(()=>B=>B.subject).collect()},kr={arity:1,overloads:(0,_.declare)(c.RegularOperator.PREDICATE).onQuad1(()=>B=>B.predicate).collect()},Rn={arity:1,overloads:(0,_.declare)(c.RegularOperator.OBJECT).onQuad1(()=>B=>B.object).collect()},Tt={arity:1,overloads:(0,_.declare)(c.RegularOperator.IS_TRIPLE).onTerm1(()=>B=>(0,_.bool)(B.termType==="quad")).collect()};return gh.definitions={"!":A,uplus:T,uminus:I,"*":D,"/":U,"+":H,"-":N,"=":x,"!=":X,"<":ne,">":$,"<=":j,">=":Q,isiri:se,isuri:se,isblank:ie,isliteral:be,isnumeric:he,str:Te,lang:Ne,datatype:ye,iri:ce,uri:ce,strdt:Re,strlang:oe,uuid:J,struuid:le,strlen:pe,substr:L,ucase:P,lcase:g,strstarts:y,strends:v,contains:C,strbefore:V,strafter:q,encode_for_uri:G,langmatches:Y,regex:ve,replace:me,abs:Ee,round:k,ceil:W,floor:M,rand:S,now:R,year:z,month:ue,day:ge,hours:we,minutes:Me,seconds:Ue,timezone:Ge,tz:We,md5:lt,sha1:Wr,sha256:br,sha384:Br,sha512:Qt,triple:_r,subject:Pr,predicate:kr,object:Rn,istriple:Tt},gh}var vh={},X4;function k0e(){if(X4)return vh;X4=1,Object.defineProperty(vh,"__esModule",{value:!0}),vh.specialDefinitions=void 0;const t=YR,e=aa(),r=ni,n=Ke,a=eo(),s=jf(),o={arity:1,async applyAsync({args:U,mapping:H}){return u({args:U,mapping:H})},applySynchronously({args:U,mapping:H}){return u({args:U,mapping:H})}};function u({args:U,mapping:H}){const N=U[0];if(N.expressionType!==e.ExpressionType.Variable)throw new n.InvalidArgumentTypes(U,r.SpecialOperator.BOUND);const x=H.has((0,a.expressionToVar)(N));return(0,a.bool)(x)}const c={arity:3,async applyAsync({args:U,mapping:H,evaluate:N}){const F=(await N(U[0],H)).coerceEBV();return N(F?U[1]:U[2],H)},applySynchronously({args:U,mapping:H,evaluate:N}){const F=N(U[0],H).coerceEBV();return N(F?U[1]:U[2],H)}},l={arity:Number.POSITIVE_INFINITY,async applyAsync({args:U,mapping:H,evaluate:N}){const x=[];for(const F of U)try{return await N(F,H)}catch(X){x.push(X)}throw new n.CoalesceError(x)},applySynchronously({args:U,mapping:H,evaluate:N}){const x=[];for(const F of U)try{return N(F,H)}catch(X){x.push(X)}throw new n.CoalesceError(x)}},d={arity:2,async applyAsync({args:U,mapping:H,evaluate:N}){const[x,F]=U;try{if((await N(x,H)).coerceEBV())return(0,a.bool)(!0);const j=(await N(F,H)).coerceEBV();return(0,a.bool)(j)}catch(X){if(!(await N(F,H)).coerceEBV())throw X;return(0,a.bool)(!0)}},applySynchronously({args:U,mapping:H,evaluate:N}){const[x,F]=U;try{if(N(x,H).coerceEBV())return(0,a.bool)(!0);const j=N(F,H).coerceEBV();return(0,a.bool)(j)}catch(X){if(!N(F,H).coerceEBV())throw X;return(0,a.bool)(!0)}}},f={arity:2,async applyAsync({args:U,mapping:H,evaluate:N}){const[x,F]=U;try{if(!(await N(x,H)).coerceEBV())return(0,a.bool)(!1);const j=(await N(F,H)).coerceEBV();return(0,a.bool)(j)}catch(X){if((await N(F,H)).coerceEBV())throw X;return(0,a.bool)(!1)}},applySynchronously({args:U,mapping:H,evaluate:N}){const[x,F]=U;try{if(!N(x,H).coerceEBV())return(0,a.bool)(!1);const j=N(F,H).coerceEBV();return(0,a.bool)(j)}catch(X){if(N(F,H).coerceEBV())throw X;return(0,a.bool)(!1)}}},h={arity:2,async applyAsync({args:U,mapping:H,evaluate:N}){const[x,F]=U.map($=>N($,H)),[X,ne]=await Promise.all([x,F]);return(0,a.bool)(X.toRDF().equals(ne.toRDF()))},applySynchronously({args:U,mapping:H,evaluate:N}){const[x,F]=U.map(X=>N(X,H));return(0,a.bool)(x.toRDF().equals(F.toRDF()))}},p={arity:Number.POSITIVE_INFINITY,checkArity(U){return U.length>0},async applyAsync(U){const{args:H,mapping:N,evaluate:x}=U,[F,...X]=H,ne=await x(F,N);return b(ne,{...U,args:X},[])},applySynchronously(U){const{args:H,mapping:N,evaluate:x}=U,[F,...X]=H,ne=x(F,N);return _(ne,{...U,args:X},[])}};async function b(U,H,N){const{args:x,mapping:F,evaluate:X}=H;if(x.length===0)return N.every($=>!$)?(0,a.bool)(!1):Promise.reject(new n.InError(N));try{const ne=x.shift(),$=await X(ne,F);return s.regularFunctions[r.RegularOperator.EQUAL].apply([U,$],H).typedValue?(0,a.bool)(!0):b(U,H,[...N,!1])}catch(ne){return b(U,H,[...N,ne])}}function _(U,H,N){const{args:x,mapping:F,evaluate:X}=H;if(x.length===0){if(N.every($=>!$))return(0,a.bool)(!1);throw new n.InError(N)}try{const ne=x.shift(),$=X(ne,F);return s.regularFunctions[r.RegularOperator.EQUAL].apply([U,$],H).typedValue?(0,a.bool)(!0):_(U,H,[...N,!1])}catch(ne){return _(U,H,[...N,ne])}}const E={arity:Number.POSITIVE_INFINITY,checkArity(U){return U.length>0},async applyAsync(U){const N=await s.specialFunctions[r.SpecialOperator.IN].applyAsync(U);return(0,a.bool)(!N.typedValue)},applySynchronously(U){const N=s.specialFunctions[r.SpecialOperator.IN].applySynchronously(U);return(0,a.bool)(!N.typedValue)}},w=(0,a.declare)(r.SpecialOperator.CONCAT).onStringly1(()=>U=>U).collect(),O={arity:Number.POSITIVE_INFINITY,async applyAsync(U){const{args:H,mapping:N,evaluate:x,functionArgumentsCache:F,superTypeProvider:X}=U,ne=H.map(async ie=>x(ie,N)).map(async ie=>{const be=w.search([await ie],X,F);if(!be)throw new n.InvalidArgumentTypes(H,r.SpecialOperator.CONCAT);return be(U)([await ie])}),$=await Promise.all(ne),Q=$.map(ie=>ie.typedValue).join(""),se=A($)?$[0].language:void 0;return se?(0,a.langString)(Q,se):(0,a.string)(Q)},applySynchronously(U){const{args:H,mapping:N,evaluate:x,superTypeProvider:F,functionArgumentsCache:X}=U,ne=H.map(se=>x(se,N)).map(se=>{const ie=w.search([se],F,X);if(!ie)throw new n.InvalidArgumentTypes(H,r.SpecialOperator.CONCAT);return ie(U)([se])}),j=ne.map(se=>se.typedValue).join(""),Q=A(ne)?ne[0].language:void 0;return Q?(0,a.langString)(j,Q):(0,a.string)(j)}};function A(U){return U.length>0&&U.every(H=>H.language===U[0].language)}const T=(0,a.declare)(r.SpecialOperator.BNODE).onString1(()=>U=>U).collect(),I={arity:Number.POSITIVE_INFINITY,checkArity(U){return U.length===0||U.length===1},async applyAsync(U){const{args:H,mapping:N,evaluate:x,superTypeProvider:F,functionArgumentsCache:X}=U,ne=H.length===1?await x(H[0],N):void 0;let $;if(ne){const j=T.search([ne],F,X);if(!j)throw new n.InvalidArgumentTypes(H,r.SpecialOperator.BNODE);$=j(U)([ne]).str()}if(U.bnode){const j=await U.bnode($);return new e.BlankNode(j)}return D($)},applySynchronously(U){const{args:H,mapping:N,evaluate:x,superTypeProvider:F,functionArgumentsCache:X}=U,ne=H.length===1?x(H[0],N):void 0;let $;if(ne){const j=T.search([ne],F,X);if(!j)throw new n.InvalidArgumentTypes(H,r.SpecialOperator.BNODE);$=j(U)([ne]).str()}if(U.bnode){const j=U.bnode($);return new e.BlankNode(j)}return D($)}};function D(U){return new e.BlankNode(U||t.v4())}return vh.specialDefinitions={bound:o,if:c,coalesce:l,"&&":f,"||":d,sameterm:h,in:p,notin:E,concat:O,bnode:I},vh}var K4;function jf(){return K4||(K4=1,function(t){var e=m&&m.__createBinding||(Object.create?function(c,l,d,f){f===void 0&&(f=d);var h=Object.getOwnPropertyDescriptor(l,d);(!h||("get"in h?!l.__esModule:h.writable||h.configurable))&&(h={enumerable:!0,get:function(){return l[d]}}),Object.defineProperty(c,f,h)}:function(c,l,d,f){f===void 0&&(f=d),c[f]=l[d]}),r=m&&m.__exportStar||function(c,l){for(var d in c)d!=="default"&&!Object.prototype.hasOwnProperty.call(l,d)&&e(l,c,d)};Object.defineProperty(t,"__esModule",{value:!0}),t.OverloadTree=t.namedFunctions=t.specialFunctions=t.regularFunctions=void 0;const n=va,a=tw,s=H0e(),o=k0e();r(va,t),t.regularFunctions=Object.fromEntries(Object.entries(s.definitions).map(([c,l])=>[c,new n.RegularFunction(c,l)])),t.specialFunctions=Object.fromEntries(Object.entries(o.specialDefinitions).map(([c,l])=>[c,new n.SpecialFunction(c,l)])),t.namedFunctions=Object.fromEntries(Object.entries(a.namedDefinitions).map(([c,l])=>[c,new n.NamedFunction(c,l)]));var u=DL();Object.defineProperty(t,"OverloadTree",{enumerable:!0,get:function(){return u.OverloadTree}})}(TT)),TT}Object.defineProperty(K0,"__esModule",{value:!0});K0.AlgebraTransformer=void 0;const Q0e=xt,cu=aa(),xT=jf(),IT=ni,v1=Ke,J4=Ke,G0e=Rl();class bd extends G0e.TermTransformer{constructor(e){super(e.superTypeProvider),this.algebraConfig=e,this.creatorConfig={type:e.type,creator:e.creator}}transformAlgebra(e){const r=Q0e.Algebra.expressionTypes;switch(e.expressionType){case r.TERM:return this.transformTerm(e);case r.OPERATOR:return this.transformOperator(e);case r.NAMED:return this.transformNamed(e);case r.EXISTENCE:return bd.transformExistence(e);case r.AGGREGATE:return bd.transformAggregate(e);case r.WILDCARD:return bd.transformWildcard(e)}}static transformWildcard(e){return new cu.NamedNode(e.wildcard.value)}transformOperator(e){const r=e.operator.toLowerCase();if(IT.SpecialOperators.has(r)){const o=r,u=e.args.map(l=>this.transformAlgebra(l)),c=xT.specialFunctions[o];if(!c.checkArity(u))throw new v1.InvalidArity(u,o);return new cu.SpecialOperator(u,c.applyAsync,c.applySynchronously)}if(!IT.Operators.has(r))throw new v1.UnknownOperator(e.operator);const n=r,a=e.args.map(o=>this.transformAlgebra(o)),s=xT.regularFunctions[n];if(!bd.hasCorrectArity(a,s.arity))throw new v1.InvalidArity(a,n);return new cu.Operator(a,o=>s.apply(o,this.algebraConfig))}wrapSyncFunction(e,r){return n=>{try{const a=e(n.map(s=>s.toRDF()));return this.transformRDFTermUnsafe(a)}catch(a){throw new J4.ExtensionFunctionError(r,a)}}}wrapAsyncFunction(e,r){return async n=>{try{const a=await e(n.map(s=>s.toRDF()));return this.transformRDFTermUnsafe(a)}catch(a){throw new J4.ExtensionFunctionError(r,a)}}}transformNamed(e){const r=e.name.value,n=e.args.map(a=>this.transformAlgebra(a));if(IT.NamedOperators.has(r)){const a=e.name.value,s=xT.namedFunctions[a];return new cu.Named(e.name,n,o=>s.apply(o,this.algebraConfig))}if(this.creatorConfig.type==="sync"){const a=this.creatorConfig.creator(e.name);if(a){const s=this.wrapSyncFunction(a,e.name.value);return new cu.SyncExtension(e.name,n,s)}}else{const a=this.creatorConfig.creator(e.name);if(a){const s=this.wrapAsyncFunction(a,e.name.value);return new cu.AsyncExtension(e.name,n,s)}}throw new v1.UnknownNamedOperator(e.name.value)}static hasCorrectArity(e,r){return Array.isArray(r)?r.includes(e.length):e.length===r}static transformAggregate(e){const r=e.aggregator;return new cu.Aggregate(r,e)}static transformExistence(e){return new cu.Existence(e)}}K0.AlgebraTransformer=bd;var yw={},Y0={};Object.defineProperty(Y0,"__esModule",{value:!0});Y0.BaseExpressionEvaluator=void 0;const z0e=eo(),W0e=Ke;class X0e{constructor(e){this.termTransformer=e}term(e,r){return e}variable(e,r){const n=r.get((0,z0e.expressionToVar)(e));if(!n)throw new W0e.UnboundVariableError(e.name,r);return this.termTransformer.transformRDFTermUnsafe(n)}}Y0.BaseExpressionEvaluator=X0e;Object.defineProperty(yw,"__esModule",{value:!0});yw.AsyncRecursiveEvaluator=void 0;const po=aa(),K0e=Rl(),PT=Ke,J0e=Y0;class Y0e extends J0e.BaseExpressionEvaluator{constructor(e,r){super(r||new K0e.TermTransformer(e.superTypeProvider)),this.context=e,this.subEvaluators={[po.ExpressionType.Term]:this.term.bind(this),[po.ExpressionType.Variable]:this.variable.bind(this),[po.ExpressionType.Operator]:this.evalOperator.bind(this),[po.ExpressionType.SpecialOperator]:this.evalSpecialOperator.bind(this),[po.ExpressionType.Named]:this.evalNamed.bind(this),[po.ExpressionType.Existence]:this.evalExistence.bind(this),[po.ExpressionType.Aggregate]:this.evalAggregate.bind(this),[po.ExpressionType.AsyncExtension]:this.evalAsyncExtension.bind(this)}}async evaluate(e,r){const n=this.subEvaluators[e.expressionType];if(!n)throw new PT.InvalidExpressionType(e);return n.bind(this)(e,r)}async evalOperator(e,r){const n=e.args.map(s=>this.evaluate(s,r)),a=await Promise.all(n);return e.apply(a)}async evalSpecialOperator(e,r){const n=this.evaluate.bind(this),a={args:e.args,mapping:r,superTypeProvider:this.context.superTypeProvider,now:this.context.now,baseIRI:this.context.baseIRI,functionArgumentsCache:this.context.functionArgumentsCache,evaluate:n,bnode:this.context.bnode,defaultTimeZone:this.context.defaultTimeZone};return e.applyAsync(a)}async _evalAsyncArgs(e,r){const n=e.map(a=>this.evaluate(a,r));return await Promise.all(n)}async evalNamed(e,r){return e.apply(await this._evalAsyncArgs(e.args,r))}async evalAsyncExtension(e,r){return await e.apply(await this._evalAsyncArgs(e.args,r))}async evalExistence(e,r){if(!this.context.exists)throw new PT.NoExistenceHook;return new po.BooleanLiteral(await this.context.exists(e.expression,r))}async evalAggregate(e,r){if(!this.context.aggregate)throw new PT.NoAggregator;return this.termTransformer.transformRDFTermUnsafe(await this.context.aggregate(e.expression))}}yw.AsyncRecursiveEvaluator=Y0e;Object.defineProperty(X0,"__esModule",{value:!0});X0.AsyncEvaluator=void 0;const Z0e=Pa,eye=K0,tye=jt,rye=yw;class ZR{static completeContext(e){const r=e.now||new Date(Date.now());return{now:r,baseIRI:e.baseIRI||void 0,functionArgumentsCache:e.functionArgumentsCache||{},superTypeProvider:{cache:e.typeCache||new Z0e.LRUCache({max:1e3}),discoverer:e.getSuperType||(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,defaultTimeZone:e.defaultTimeZone||(0,tye.extractTimeZone)(r)}}constructor(e,r={}){this.algExpr=e;const n=r.extensionFunctionCreator||(()=>{}),a=ZR.completeContext(r),s=new eye.AlgebraTransformer({type:"async",creator:n,...a});this.expr=s.transformAlgebra(e),this.evaluator=new rye.AsyncRecursiveEvaluator(a,s)}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)}}X0.AsyncEvaluator=ZR;var Z0={},bw={};Object.defineProperty(bw,"__esModule",{value:!0});bw.SyncRecursiveEvaluator=void 0;const yo=aa(),nye=Rl(),DT=Ke,iye=Y0;class aye extends iye.BaseExpressionEvaluator{constructor(e,r){super(r||new nye.TermTransformer(e.superTypeProvider)),this.context=e,this.subEvaluators={[yo.ExpressionType.Term]:this.term.bind(this),[yo.ExpressionType.Variable]:this.variable.bind(this),[yo.ExpressionType.Operator]:this.evalOperator.bind(this),[yo.ExpressionType.SpecialOperator]:this.evalSpecialOperator.bind(this),[yo.ExpressionType.Named]:this.evalNamed.bind(this),[yo.ExpressionType.Existence]:this.evalExistence.bind(this),[yo.ExpressionType.Aggregate]:this.evalAggregate.bind(this),[yo.ExpressionType.SyncExtension]:this.evalSyncExtension.bind(this)}}evaluate(e,r){const n=this.subEvaluators[e.expressionType];if(!n)throw new DT.InvalidExpressionType(e);return n.bind(this)(e,r)}evalOperator(e,r){const n=e.args.map(a=>this.evaluate(a,r));return e.apply(n)}evalSpecialOperator(e,r){const n=this.evaluate.bind(this),a={args:e.args,mapping:r,superTypeProvider:this.context.superTypeProvider,now:this.context.now,baseIRI:this.context.baseIRI,functionArgumentsCache:this.context.functionArgumentsCache,evaluate:n,bnode:this.context.bnode,defaultTimeZone:this.context.defaultTimeZone};return e.applySynchronously(a)}evalNamed(e,r){const n=e.args.map(a=>this.evaluate(a,r));return e.apply(n)}evalSyncExtension(e,r){const n=e.args.map(a=>this.evaluate(a,r));return e.apply(n)}evalExistence(e,r){if(!this.context.exists)throw new DT.NoExistenceHook;return new yo.BooleanLiteral(this.context.exists(e.expression,r))}evalAggregate(e,r){if(!this.context.aggregate)throw new DT.NoAggregator;return this.termTransformer.transformRDFTermUnsafe(this.context.aggregate(e.expression))}}bw.SyncRecursiveEvaluator=aye;Object.defineProperty(Z0,"__esModule",{value:!0});Z0.SyncEvaluator=void 0;const sye=Pa,oye=K0,uye=jt,cye=bw;class ex{static completeContext(e){const r=e.now||new Date(Date.now());return{now:r,baseIRI:e.baseIRI||void 0,functionArgumentsCache:e.functionArgumentsCache||{},superTypeProvider:{cache:e.typeCache||new sye.LRUCache({max:1e3}),discoverer:e.getSuperType||(()=>"term")},extensionFunctionCreator:e.extensionFunctionCreator,exists:e.exists,aggregate:e.aggregate,bnode:e.bnode,defaultTimeZone:e.defaultTimeZone||(0,uye.extractTimeZone)(r)}}constructor(e,r={}){this.algExpr=e,this.context=r;const n=r.extensionFunctionCreator||(()=>{}),a=ex.completeContext(r),s=new oye.AlgebraTransformer({type:"sync",creator:n,...a});this.expr=s.transformAlgebra(e),this.evaluator=new cye.SyncRecursiveEvaluator(a,s)}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)}}Z0.SyncEvaluator=ex;var _w={},ey={},gw={},mw={},sa={};Object.defineProperty(sa,"__esModule",{value:!0});sa.Aggregator=sa.AggregatorComponent=void 0;const Y4=nr,lye=Rl(),dye=ni,fye=z2();class hye{static emptyValue(){}constructor(e,r){this.sharedContext=r,this.separator=e.separator||" ",this.termTransformer=new lye.TermTransformer(r.superTypeProvider)}termToNumericOrError(e){if(e.termType!=="Literal")throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a numeric literal`);if(!(0,fye.isSubTypeOf)(e.datatype.value,dye.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)}}sa.AggregatorComponent=hye;class pye{constructor(e,r){this.aggregatorComponent=r,this.variableValues=new Map,this.distinct=e.distinct}static emptyValue(e){return e.emptyValue()}result(){return this.aggregatorComponent.result()}put(e,r=""){this.canSkip(e,r)||(this.aggregatorComponent.put(e),this.addSeen(e,r))}canSkip(e,r){const n=this.variableValues.get(r);return this.distinct&&n!==void 0&&n.has(Y4.termToString(e))}addSeen(e,r){this.distinct&&(this.variableValues.has(r)||this.variableValues.set(r,new Set),this.variableValues.get(r).add(Y4.termToString(e)))}}sa.Aggregator=pye;Object.defineProperty(mw,"__esModule",{value:!0});mw.Average=void 0;const yye=aa(),Z4=jf(),bye=eo(),e6=ni,_ye=sa;class tx extends _ye.AggregatorComponent{constructor(){super(...arguments),this.summer=Z4.regularFunctions[e6.RegularOperator.ADDITION],this.divider=Z4.regularFunctions[e6.RegularOperator.DIVISION],this.state=void 0}static emptyValue(){return(0,bye.integer)(0).toRDF()}put(e){if(this.state===void 0){const r=this.termToNumericOrError(e);this.state={sum:r,count:1}}else{const r=this.termToNumericOrError(e);this.state.sum=this.summer.apply([this.state.sum,r],this.sharedContext),this.state.count++}}result(){if(this.state===void 0)return tx.emptyValue();const e=new yye.IntegerLiteral(this.state.count);return this.divider.apply([this.state.sum,e],this.sharedContext).toRDF()}}mw.Average=tx;var vw={};Object.defineProperty(vw,"__esModule",{value:!0});vw.Count=void 0;const t6=eo(),gye=sa;class rx extends gye.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}static emptyValue(){return(0,t6.integer)(0).toRDF()}put(e){this.state===void 0&&(this.state=0),this.state++}result(){return this.state===void 0?rx.emptyValue():(0,t6.integer)(this.state).toRDF()}}vw.Count=rx;var ww={};Object.defineProperty(ww,"__esModule",{value:!0});ww.GroupConcat=void 0;const r6=eo(),mye=sa;class nx extends mye.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}static emptyValue(){return(0,r6.string)("").toRDF()}put(e){this.state===void 0?this.state=e.value:this.state+=this.separator+e.value}result(){return this.state===void 0?nx.emptyValue():(0,r6.string)(this.state).toRDF()}}ww.GroupConcat=nx;var Sw={};Object.defineProperty(Sw,"__esModule",{value:!0});Sw.Max=void 0;const vye=pw(),wye=sa;class ix extends wye.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){if(e.termType!=="Literal")throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a literal`);this.state===void 0?this.state=e:(0,vye.orderTypes)(this.state,e)===-1&&(this.state=e)}result(){return this.state===void 0?ix.emptyValue():this.state}}Sw.Max=ix;var Tw={};Object.defineProperty(Tw,"__esModule",{value:!0});Tw.Min=void 0;const Sye=pw(),Tye=sa;class ax extends Tye.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){if(e.termType!=="Literal")throw new Error(`Term with value ${e.value} has type ${e.termType} and is not a literal`);this.state===void 0?this.state=e:(0,Sye.orderTypes)(this.state,e)===1&&(this.state=e)}result(){return this.state===void 0?ax.emptyValue():this.state}}Tw.Min=ax;var Ew={};Object.defineProperty(Ew,"__esModule",{value:!0});Ew.Sample=void 0;const Eye=sa;class sx extends Eye.AggregatorComponent{constructor(){super(...arguments),this.state=void 0}put(e){this.state===void 0&&(this.state=e)}result(){return this.state===void 0?sx.emptyValue():this.state}}Ew.Sample=sx;var Ow={};Object.defineProperty(Ow,"__esModule",{value:!0});Ow.Sum=void 0;const Oye=jf(),Aye=eo(),Rye=ni,xye=sa;class ox extends xye.AggregatorComponent{constructor(){super(...arguments),this.state=void 0,this.summer=Oye.regularFunctions[Rye.RegularOperator.ADDITION]}static emptyValue(){return(0,Aye.integer)(0).toRDF()}put(e){if(this.state===void 0)this.state=this.termToNumericOrError(e);else{const r=this.termToNumericOrError(e);this.state=this.summer.apply([this.state,r],this.sharedContext)}}result(){return this.state===void 0?ox.emptyValue():this.state.toRDF()}}Ow.Sum=ox;Object.defineProperty(gw,"__esModule",{value:!0});gw.aggregators=void 0;const Iye=mw,Pye=vw,Dye=ww,Nye=Sw,Cye=Tw,jye=Ew,Mye=Ow;gw.aggregators={count:Pye.Count,sum:Mye.Sum,min:Cye.Min,max:Nye.Max,avg:Iye.Average,group_concat:Dye.GroupConcat,sample:jye.Sample};var Aw={};Object.defineProperty(Aw,"__esModule",{value:!0});Aw.WildcardCountAggregator=void 0;const Fye=nr,n6=eo();class Lye{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,n6.integer)(0).toRDF()}result(){return(0,n6.integer)(this.counter).toRDF()}handleDistinct(e){if(this.distinct){const r=[...e];r.sort((u,c)=>u[0].value.localeCompare(c[0].value));const n=r.map(([u])=>u.value).join(","),a=r.map(([,u])=>Fye.termToString(u)).join(","),s=this.bindingValues.get(n),o=s!==void 0&&s.has(a);return s||this.bindingValues.set(n,new Set),this.bindingValues.get(n).add(a),o}return!1}}Aw.WildcardCountAggregator=Lye;Object.defineProperty(ey,"__esModule",{value:!0});ey.BaseAggregateEvaluator=void 0;const i6=xt,a6=gw,s6=sa,o6=Aw,Bye=Ke;class $ye{constructor(e,r,n){this.throwError=!1,this.isWildcard=!1,this.errorOccurred=!1,this.expression=e,this.aggregator=new s6.Aggregator(e,new a6.aggregators[e.aggregator](e,r)),this.throwError=n||!1,this.isWildcard=e.expression.expressionType===i6.Algebra.expressionTypes.WILDCARD,this.isWildcard&&(this.wildcardAggregator=new o6.WildcardCountAggregator(e))}static emptyValue(e,r=!1){let n;if(e.expression.expressionType===i6.Algebra.expressionTypes.WILDCARD?n=o6.WildcardCountAggregator.emptyValue():n=s6.Aggregator.emptyValue(a6.aggregators[e.aggregator]),n===void 0&&r)throw new Bye.EmptyAggregateError;return n}result(){if(!this.errorOccurred)return this.isWildcard?this.wildcardAggregator.result():this.aggregator.result()}}ey.BaseAggregateEvaluator=$ye;Object.defineProperty(_w,"__esModule",{value:!0});_w.AggregateEvaluator=void 0;const Uye=ey,u6=Z0;class qye extends Uye.BaseAggregateEvaluator{constructor(e,r,n){super(e,u6.SyncEvaluator.completeContext(r||{}),n),this.evaluator=new u6.SyncEvaluator(e.expression,r)}put(e){if(!this.errorOccurred)if(this.isWildcard)this.wildcardAggregator.putBindings(e);else try{const r=this.evaluator.evaluate(e);this.aggregator.put(r)}catch(r){this.safeThrow(r)}}safeThrow(e){if(this.throwError)throw e;this.errorOccurred=!0}}_w.AggregateEvaluator=qye;var Rw={};Object.defineProperty(Rw,"__esModule",{value:!0});Rw.AsyncAggregateEvaluator=void 0;const c6=X0,Vye=ey;class Hye extends Vye.BaseAggregateEvaluator{constructor(e,r,n){super(e,c6.AsyncEvaluator.completeContext(r||{}),n),this.evaluator=new c6.AsyncEvaluator(e.expression,r),this.errorOccurred=!1}async put(e){if(!this.errorOccurred)if(this.isWildcard)this.wildcardAggregator.putBindings(e);else try{const r=await this.evaluator.evaluate(e);if(!r||this.errorOccurred)return;this.aggregator.put(r)}catch(r){this.safeThrow(r)}}safeThrow(e){if(this.throwError)throw e;this.errorOccurred=!0}}Rw.AsyncAggregateEvaluator=Hye;(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAggregateEvaluator=t.orderTypes=t.isExpressionError=t.ExpressionError=t.AggregateEvaluator=t.SyncEvaluator=t.AsyncEvaluator=void 0;var e=X0;Object.defineProperty(t,"AsyncEvaluator",{enumerable:!0,get:function(){return e.AsyncEvaluator}});var r=Z0;Object.defineProperty(t,"SyncEvaluator",{enumerable:!0,get:function(){return r.SyncEvaluator}});var n=_w;Object.defineProperty(t,"AggregateEvaluator",{enumerable:!0,get:function(){return n.AggregateEvaluator}});var a=Ke;Object.defineProperty(t,"ExpressionError",{enumerable:!0,get:function(){return a.ExpressionError}}),Object.defineProperty(t,"isExpressionError",{enumerable:!0,get:function(){return a.isExpressionError}});var s=pw();Object.defineProperty(t,"orderTypes",{enumerable:!0,get:function(){return s.orderTypes}});var o=Rw;Object.defineProperty(t,"AsyncAggregateEvaluator",{enumerable:!0,get:function(){return o.AsyncAggregateEvaluator}})})(Al);Object.defineProperty(Q2,"__esModule",{value:!0});Q2.ActorQueryOperationFilterSparqlee=void 0;const kye=$n,wh=ct,NT=Al;class Qye extends wh.ActorQueryOperationTypedMediated{constructor(e){super(e,"filter")}async testOperation(e,r){const n={...wh.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation)};return new NT.AsyncEvaluator(e.expression,n),!0}async runOperation(e,r){const n=await this.mediatorQueryOperation.mediate({operation:e.input,context:r}),a=wh.ActorQueryOperation.getSafeBindings(n);wh.ActorQueryOperation.validateQueryOutput(a,"bindings");const s={...wh.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation)},o=new NT.AsyncEvaluator(e.expression,s),u=async(l,d,f)=>{try{await o.evaluateAsEBV(l)&&f(l)}catch(h){(0,NT.isExpressionError)(h)?this.logWarn(r,"Error occurred while filtering.",()=>({error:h,bindings:(0,kye.bindingsToString)(l)})):c.emit("error",h)}d()},c=a.bindingsStream.transform({transform:u,autoStart:!1});return{type:"bindings",bindingsStream:c,metadata:a.metadata}}}Q2.ActorQueryOperationFilterSparqlee=Qye;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Q2,t)})(SL);var GL={},xw={};Object.defineProperty(xw,"__esModule",{value:!0});xw.ActorQueryOperationFromQuad=void 0;const Gye=ct,Ip=xt;class ur extends Gye.ActorQueryOperationTypedMediated{constructor(e){super(e,"from")}static copyOperation(e,r){const n={};for(const a of Object.keys(e))Array.isArray(e[a])&&a!=="template"?a==="variables"?n[a]=e[a]:n[a]=e[a].map(r):ur.ALGEBRA_TYPES.includes(e[a].type)?n[a]=r(e[a]):n[a]=e[a];return n}static applyOperationDefaultGraph(e,r){if(e.type==="bgp"&&e.patterns.length>0||e.type==="path"||e.type==="pattern"){if(e.type==="bgp")return ur.joinOperations(e.patterns.map(a=>{if(a.graph.termType!=="DefaultGraph")return ur.FACTORY.createBgp([a]);const s=r.map(o=>ur.FACTORY.createBgp([ur.FACTORY.createPattern(a.subject,a.predicate,a.object,o)]));return ur.unionOperations(s)}));if(e.graph.termType!=="DefaultGraph")return e;const n=r.map(a=>e.type==="path"?ur.FACTORY.createPath(e.subject,e.predicate,e.object,a):ur.FACTORY.createPattern(e.subject,e.predicate,e.object,a));return ur.unionOperations(n)}return ur.copyOperation(e,n=>this.applyOperationDefaultGraph(n,r))}static applyOperationNamedGraph(e,r,n){if(e.type==="bgp"&&e.patterns.length>0||e.type==="path"||e.type==="pattern"){const a=e.type==="bgp"?e.patterns[0].graph:e.graph;if(a.termType==="DefaultGraph")return{type:Ip.Algebra.types.BGP,patterns:[]};if(a.termType==="Variable"){if(r.length===1){const o=r[0],u={};u[`?${a.value}`]=o;const c=ur.FACTORY.createValues([a],[u]);let l;return e.type==="bgp"?l=ur.FACTORY.createBgp(e.patterns.map(d=>ur.FACTORY.createPattern(d.subject,d.predicate,d.object,o))):e.type==="path"?l=ur.FACTORY.createPath(e.subject,e.predicate,e.object,o):l=ur.FACTORY.createPattern(e.subject,e.predicate,e.object,o),ur.FACTORY.createJoin([c,l])}return ur.unionOperations(r.map(o=>ur.applyOperationNamedGraph(e,[o],n)))}return[...r,...n].some(o=>o.equals(a))?e:{type:Ip.Algebra.types.BGP,patterns:[]}}return ur.copyOperation(e,a=>this.applyOperationNamedGraph(a,r,n))}static joinOperations(e){if(e.length===1)return e[0];if(e.length>1)return ur.FACTORY.createJoin(e);throw new Error("A join can only be applied on at least one operation")}static unionOperations(e){if(e.length===1)return e[0];if(e.length>1)return ur.FACTORY.createUnion(e);throw new Error("A union can only be applied on at least one operation")}static createOperation(e){let r=e.input;return e.default.length>0&&(r=ur.applyOperationDefaultGraph(r,e.default)),(e.named.length>0||e.default.length>0)&&(r=ur.applyOperationNamedGraph(r,e.named,e.default)),r}async testOperation(e,r){return!0}async runOperation(e,r){const n=ur.createOperation(e);return this.mediatorQueryOperation.mediate({operation:n,context:r})}}xw.ActorQueryOperationFromQuad=ur;ur.FACTORY=new Ip.Factory;ur.ALGEBRA_TYPES=Object.keys(Ip.Algebra.types).map(t=>Ip.Algebra.types[t]);(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(xw,t)})(GL);var zL={},Iw={};Object.defineProperty(Iw,"__esModule",{value:!0});Iw.ActorQueryOperationExtend=void 0;const zye=$n,w1=ct,CT=Al;class Wye extends w1.ActorQueryOperationTypedMediated{constructor(e){super(e,"extend")}async testOperation(e,r){return new CT.AsyncEvaluator(e.expression,w1.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation)),!0}async runOperation(e,r){const{expression:n,input:a,variable:s}=e,o=w1.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:a,context:r}));if((await o.metadata()).variables.some(f=>f.equals(s)))throw new Error(`Illegal binding to variable '${s.value}' that has already been bound`);const u={...w1.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation)},c=new CT.AsyncEvaluator(n,u),l=async(f,h,p)=>{try{const b=await c.evaluate(f),_=f.set(s,b);p(_)}catch(b){(0,CT.isExpressionError)(b)?(p(f),this.logWarn(r,`Expression error for extend operation (${b.message})with bindings '${(0,zye.bindingsToString)(f)}'`)):d.emit("error",b)}h()},d=o.bindingsStream.transform({autoStart:!1,transform:l});return{type:"bindings",bindingsStream:d,async metadata(){const f=await o.metadata();return{...f,variables:[...f.variables,s]}}}}}Iw.ActorQueryOperationExtend=Wye;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Iw,t)})(zL);var WL={},Pw={},Dw={};Object.defineProperty(Dw,"__esModule",{value:!0});Dw.GroupsState=void 0;const Xye=$n,l6=Al,Kye=ht,Jye=new Kye.DataFactory,Yye=new Xye.BindingsFactory;class Zye{constructor(e,r,n){this.hashFunction=e,this.pattern=r,this.sparqleeConfig=n,this.groups=new Map,this.groupsInitializer=new Map,this.groupVariables=new Set(this.pattern.variables.map(a=>a.value)),this.distinctHashes=r.aggregates.some(({distinct:a})=>a)?new Map:null,this.waitCounter=1,this.resultHasBeenCalled=!1}consumeBindings(e){const r=this.resultCheck();if(r)return r;this.waitCounter++;const n=e.filter((u,c)=>this.groupVariables.has(c.value)),a=this.hashBindings(n);let s=this.groupsInitializer.get(a),o;if(!s)s=(async()=>{const u={};if(await Promise.all(this.pattern.aggregates.map(async l=>{const d=l.variable.value;u[d]=new l6.AsyncAggregateEvaluator(l,this.sparqleeConfig),await u[d].put(e)})),this.distinctHashes){const l=this.hashBindings(e);this.distinctHashes.set(a,new Set([l]))}const c={aggregators:u,bindings:n};return this.groups.set(a,c),this.subtractWaitCounterAndCollect(),c})(),this.groupsInitializer.set(a,s),o=s;else{const u=s;o=(async()=>{const c=await u;await Promise.all(this.pattern.aggregates.map(async l=>{if(l.distinct){const f=this.hashBindings(e);if(this.distinctHashes.get(a).has(f))return;this.distinctHashes.get(a).add(f)}const d=l.variable.value;await c.aggregators[d].put(e)}))})().then(()=>{this.subtractWaitCounterAndCollect()})}return o}subtractWaitCounterAndCollect(){--this.waitCounter===0&&this.handleResultCollection()}handleResultCollection(){let e=[...this.groups].map(([r,n])=>{const{bindings:a,aggregators:s}=n;let o=a;for(const u in s){const c=s[u].result();c&&(o=o.set(Jye.variable(u),c))}return o});if(e.length===0&&this.groupVariables.size===0){const r=[];for(const n of this.pattern.aggregates){const a=n.variable,s=l6.AsyncAggregateEvaluator.emptyValue(n);s!==void 0&&r.push([a,s])}e=[Yye.bindings(r)]}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 r=new Promise(n=>{this.waitResolver=n});return this.subtractWaitCounterAndCollect(),r}hashBindings(e){return this.hashFunction(e)}}Dw.GroupsState=Zye;Object.defineProperty(Pw,"__esModule",{value:!0});Pw.ActorQueryOperationGroup=void 0;const S1=ct,e1e=Al,d6=Ut,t1e=Dw;class r1e extends S1.ActorQueryOperationTypedMediated{constructor(e){super(e,"group")}async testOperation(e,r){for(const n of e.aggregates)new e1e.AsyncEvaluator(n.expression,S1.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation));return!0}async runOperation(e,r){const{hashFunction:n}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:r}),{input:a,aggregates:s}=e,o=await this.mediatorQueryOperation.mediate({operation:a,context:r}),u=S1.ActorQueryOperation.getSafeBindings(o),c=[...e.variables,...s.map(f=>f.variable)],l=S1.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation);return{type:"bindings",bindingsStream:new d6.TransformIterator(()=>new Promise((f,h)=>{const p=new t1e.GroupsState(n,e,l);u.bindingsStream.on("end",async()=>{try{const b=new d6.ArrayIterator(await p.collectResults(),{autoStart:!1});f(b)}catch(b){h(b)}}),u.bindingsStream.on("error",h),u.bindingsStream.on("data",b=>{p.consumeBindings(b).catch(h)})}),{autoStart:!1}),metadata:async()=>({...await u.metadata(),variables:c})}}}Pw.ActorQueryOperationGroup=r1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Pw,t)})(WL);var XL={},Nw={};Object.defineProperty(Nw,"__esModule",{value:!0});Nw.ActorQueryOperationNop=void 0;const n1e=$n,i1e=ct,a1e=Hi,s1e=Ut,o1e=new n1e.BindingsFactory;class u1e extends i1e.ActorQueryOperationTypedMediated{constructor(e){super(e,"nop")}async testOperation(e,r){return!0}async runOperation(e,r){return{bindingsStream:new s1e.SingletonIterator(o1e.bindings()),metadata:()=>Promise.resolve({state:new a1e.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]}),type:"bindings"}}}Nw.ActorQueryOperationNop=u1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Nw,t)})(XL);var KL={},Cw={},jw={};Object.defineProperty(jw,"__esModule",{value:!0});jw.SortIterator=void 0;const c1e=Ut;class l1e extends c1e.TransformIterator{constructor(e,r,n){super(e,n);const a=n&&n.window;this.windowLength=Number.isFinite(a)&&a>0?a:Number.POSITIVE_INFINITY,this.sort=r,this.sorted=[]}_read(e,r){let n,{length:a}=this.sorted;for(;a!==this.windowLength&&(n=this.source.read(),n!==null);){let s=0,o=a-1,u,c;for(;s<=o;)u=Math.trunc((s+o)/2),c=this.sort(n,this.sorted[u]),c<0?s=u+1:c>0?o=u-1:(s=u,o=-1);this.sorted.splice(s,0,n),a++}a===this.windowLength&&this._push(this.sorted.pop()),r()}_flush(e){let{length:r}=this.sorted;for(;r--;)this._push(this.sorted.pop());e()}}jw.SortIterator=l1e;Object.defineProperty(Cw,"__esModule",{value:!0});Cw.ActorQueryOperationOrderBySparqlee=void 0;const T1=ct,E1=Al,f6=xt,d1e=jw;class f1e extends T1.ActorQueryOperationTypedMediated{constructor(e){super(e,"orderby"),this.window=e.window??Number.POSITIVE_INFINITY}async testOperation(e,r){for(let n of e.expressions)n=this.extractSortExpression(n),new E1.AsyncEvaluator(n,T1.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation));return!0}async runOperation(e,r){const n=await this.mediatorQueryOperation.mediate({operation:e.input,context:r}),a=T1.ActorQueryOperation.getSafeBindings(n),s={window:this.window},o={...T1.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation)};let{bindingsStream:u}=a;for(let c=e.expressions.length-1;c>=0;c--){let l=e.expressions[c];const d=this.isAscending(l);l=this.extractSortExpression(l);const f=new E1.AsyncEvaluator(l,o),h=async(_,E,w)=>{try{const O=await f.evaluate(_);w({bindings:_,result:O})}catch(O){(0,E1.isExpressionError)(O)||u.emit("error",O),w({bindings:_,result:void 0})}E()},p=u.transform({transform:h});u=new d1e.SortIterator(p,(_,E)=>{let w=(0,E1.orderTypes)(_.result,E.result);return d||(w*=-1),w},s).map(({bindings:_,result:E})=>_)}return{type:"bindings",bindingsStream:u,metadata:a.metadata}}extractSortExpression(e){const{expressionType:r,operator:n}=e;return r!==f6.Algebra.expressionTypes.OPERATOR?e:n==="desc"?e.args[0]:e}isAscending(e){const{expressionType:r,operator:n}=e;return r!==f6.Algebra.expressionTypes.OPERATOR?!0:n!=="desc"}}Cw.ActorQueryOperationOrderBySparqlee=f1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Cw,t)})(KL);var JL={},Mw={};Object.defineProperty(Mw,"__esModule",{value:!0});Mw.ActorQueryOperationProject=void 0;const h6=ct,h1e=S_,p1e=ht,y1e=new p1e.DataFactory;class b1e extends h6.ActorQueryOperationTypedMediated{constructor(e){super(e,"project")}async testOperation(e,r){return!0}async runOperation(e,r){const n=h6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:r})),a=await n.metadata(),s=e.variables,o=a.variables.filter(d=>!s.some(f=>d.value===f.value)),u=s.filter(d=>!a.variables.some(f=>d.value===f.value));if(u.length>0)throw new Error(`Variables '${u.map(d=>`?${d.value}`)}' are used in the projection result, but are not assigned.`);let c=o.length===0?n.bindingsStream:n.bindingsStream.transform({map(d){for(const f of o)d=d.delete(f);return d},autoStart:!1}),l=0;return c=c.transform({map(d){l++;const f=new Map;return d.map(h=>{if(h instanceof h1e.BlankNodeBindingsScoped){let p=f.get(h.value);return p||(p=y1e.blankNode(`${h.value}${l}`),f.set(h.value,p)),p}return h})},autoStart:!1}),{type:"bindings",bindingsStream:c,metadata:async()=>({...a,variables:s})}}}Mw.ActorQueryOperationProject=b1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Mw,t)})(JL);var YL={},Fw={};Object.defineProperty(Fw,"__esModule",{value:!0});Fw.ActorQueryOperationReducedHash=void 0;const p6=ct,_1e=Pa;class g1e extends p6.ActorQueryOperationTypedMediated{constructor(e){super(e,"reduced")}async testOperation(e,r){return!0}async runOperation(e,r){const n=p6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:r}));return{type:"bindings",bindingsStream:n.bindingsStream.filter(await this.newHashFilter(r)),metadata:n.metadata}}async newHashFilter(e){const{hashFunction:r}=await this.mediatorHashBindings.mediate({allowHashCollisions:!0,context:e}),n=new _1e.LRUCache({max:this.cacheSize});return a=>{const s=r(a);return n.has(s)?!1:(n.set(s,!0),!0)}}}Fw.ActorQueryOperationReducedHash=g1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Fw,t)})(YL);var ZL={},Lw={};Object.defineProperty(Lw,"__esModule",{value:!0});Lw.ActorQueryOperationService=void 0;const m1e=$n,y6=ct,O1=rr,v1e=Hi,w1e=Ut,S1e=new m1e.BindingsFactory;class T1e extends y6.ActorQueryOperationTypedMediated{constructor(e){super(e,"service")}async testOperation(e,r){if(e.name.termType!=="NamedNode")throw new Error(`${this.name} can only query services by IRI, while a ${e.name.termType} was given.`);return!0}async runOperation(e,r){const n=e.name.value;let a=r.delete(O1.KeysRdfResolveQuadPattern.source).delete(O1.KeysRdfResolveQuadPattern.sources).delete(O1.KeysInitQuery.queryString);const s=this.forceSparqlEndpoint?"sparql":void 0;a=a.set(O1.KeysRdfResolveQuadPattern.sources,[{type:s,value:n}]);let o;try{o=y6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.input,context:a}))}catch(u){if(e.silent)o={bindingsStream:new w1e.SingletonIterator(S1e.bindings()),type:"bindings",metadata:async()=>({state:new v1e.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})};else throw u}return o}}Lw.ActorQueryOperationService=T1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Lw,t)})(ZL);var eB={},Bw={};Object.defineProperty(Bw,"__esModule",{value:!0});Bw.ActorQueryOperationSlice=void 0;const E1e=ct,O1e=rr;class A1e extends E1e.ActorQueryOperationTypedMediated{constructor(e){super(e,"slice")}async testOperation(e,r){return!0}async runOperation(e,r){e.length&&(r=r.set(O1e.KeysQueryOperation.limitIndicator,e.length));const n=await this.mediatorQueryOperation.mediate({operation:e.input,context:r});if(n.type==="bindings")return{type:"bindings",bindingsStream:this.sliceStream(n.bindingsStream,e),metadata:this.sliceMetadata(n,e)};if(n.type==="quads")return{type:"quads",quadStream:this.sliceStream(n.quadStream,e),metadata:this.sliceMetadata(n,e)};throw new Error(`Invalid query output type: Expected 'bindings' or 'quads' but got '${n.type}'`)}sliceStream(e,r){const n=!!r.length||r.length===0,{start:a}=r,s=n?r.start+r.length-1:Number.POSITIVE_INFINITY;return e.transform({offset:a,limit:Math.max(s-a+1,0),autoStart:!1})}sliceMetadata(e,r){const n=!!r.length||r.length===0;return()=>e.metadata().then(a=>{const s={...a.cardinality};return Number.isFinite(s.value)&&(s.value=Math.max(0,s.value-r.start),n&&(s.value=Math.min(s.value,r.length))),{...a,cardinality:s}})}}Bw.ActorQueryOperationSlice=A1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Bw,t)})(eB);var tB={},$w={},Yo={},Uw={},ty={};Object.defineProperty(ty,"__esModule",{value:!0});ty.PathVariableObjectIterator=void 0;const R1e=ct,x1e=Ut,I1e=ht,P1e=nr,D1e=xt,N1e=new I1e.DataFactory,C1e=new D1e.Factory;class j1e extends x1e.BufferedIterator{constructor(e,r,n,a,s,o,u=16){super({autoStart:!0}),this.subject=e,this.predicate=r,this.graph=n,this.context=a,this.mediatorQueryOperation=s,this.maxRunningOperations=u,this.termHashes=new Map,this.runningOperations=[],this.pendingOperations=[],this._push(this.subject,o)}_end(e){for(const r of this.runningOperations)r.destroy();super._end(e)}_push(e,r=!0){let n;if(r&&(n=(0,P1e.termToString)(e),this.termHashes.has(n)))return;const a=N1e.variable("b");this.pendingOperations.push({variable:a,operation:C1e.createPath(e,this.predicate,a,this.graph)}),n&&(this.termHashes.set(n,e),super._push(e))}_read(e,r){const n=this;(async function(){for(;n.runningOperations.lengthn.destroy(l)),c.on("readable",()=>{n.readable=!0,n._fillBufferAsync()}),c.on("end",()=>{n.runningOperations.splice(n.runningOperations.indexOf(c),1),n.readable=!0,n._fillBufferAsync()})),n.setProperty("metadata",u.metadata)}let a=0,s;for(;a!==(a=e);)for(let o=0;o0;o++)(s=n.runningOperations[o].read())!==null&&(e--,n._push(s));n.runningOperations.length===0&&n.pendingOperations.length===0&&n.close()})().then(()=>{r()},a=>this.destroy(a))}}ty.PathVariableObjectIterator=j1e;Object.defineProperty(Uw,"__esModule",{value:!0});Uw.ActorAbstractPath=void 0;const M1e=$n,Sh=ct,jT=rr,A1=Ut,F1e=ht,MT=nr,L1e=xt,B1e=ty,$1e=new F1e.DataFactory,FT=new M1e.BindingsFactory;class Es extends Sh.ActorQueryOperationTypedMediated{constructor(e,r){super(e,"path"),this.predicateType=r}async testOperation(e,r){if(e.predicate.type!==this.predicateType)throw new Error(`This Actor only supports ${this.predicateType} Path operations.`);return!0}generateVariable(e,r){return r?e&&(e.subject.value===r||e.object.value===r)?this.generateVariable(e,`${r}b`):$1e.variable(r):this.generateVariable(e,"b")}async isPathArbitraryLengthDistinct(e,r){return e.get(jT.KeysQueryOperation.isPathArbitraryLengthDistinctKey)?(e=e.set(jT.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!1),{context:e,operation:void 0}):(e=e.set(jT.KeysQueryOperation.isPathArbitraryLengthDistinctKey,!0),{context:e,operation:Sh.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:Es.FACTORY.createDistinct(r),context:e}))})}async predicateStarGraphVariable(e,r,n,a,s){const o=this.generateVariable(Es.FACTORY.createPath(e,n,r,a)),u=Es.FACTORY.createUnion([Es.FACTORY.createPattern(e,o,r,a),Es.FACTORY.createPattern(r,o,e,a)]),c=Sh.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:s,operation:u})),l=new Set;return{bindingsStream:new A1.MultiTransformIterator(c.bindingsStream,{multiTransform:f=>{const h=f.get(a);return l.has(h.value)?new A1.EmptyIterator:(l.add(h.value),new A1.TransformIterator(async()=>{const p=new A1.BufferedIterator;return await this.getObjectsPredicateStar(e,n,h,s,{},p,{count:0}),p.transform({transform(b,_,E){E(FT.bindings([[r,b],[a,h]])),_()}})},{maxBufferSize:128}))},autoStart:!1}),metadata:c.metadata}}async getObjectsPredicateStarEval(e,r,n,a,s,o){if(a.termType==="Variable")return this.predicateStarGraphVariable(e,n,r,a,s);const u=new B1e.PathVariableObjectIterator(e,r,a,s,this.mediatorQueryOperation,o);return{bindingsStream:u.transform({autoStart:!1,transform(l,d,f){f(FT.bindings([[n,l]])),d()}}),async metadata(){const l=await new Promise(d=>{u.getProperty("metadata",f=>d(f()))});return l.cardinality.value++,l}}}async getObjectsPredicateStar(e,r,n,a,s,o,u){const c=(0,MT.termToString)(e);if(s[c])return;o._push(e),s[c]=e,u.count++;const l=this.generateVariable(),d=Es.FACTORY.createPath(e,r,l,n),f=Sh.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:d,context:a}));return f.bindingsStream.on("data",async h=>{const p=h.get(l);await this.getObjectsPredicateStar(p,r,n,a,s,o,u)}),f.bindingsStream.on("end",()=>{--u.count===0&&o.close()}),f.metadata}async getSubjectAndObjectBindingsPredicateStar(e,r,n,a,s,o,u,c,l,d,f){const h=(0,MT.termToString)(a)+(0,MT.termToString)(o);if(l[h])return;if(f.count++,l[h]=!0,d._push(FT.bindings([[e,n],[r,a]])),h in c){const b=await c[h];for(const _ of b)await this.getSubjectAndObjectBindingsPredicateStar(e,r,n,_,s,o,u,c,l,d,f);--f.count===0&&d.close();return}const p=new Promise(async(b,_)=>{const E=[],w=this.generateVariable(),O=Es.FACTORY.createPath(a,s,w,o),A=Sh.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:O,context:u}));A.bindingsStream.on("data",async T=>{const I=T.get(w);E.push(I),await this.getSubjectAndObjectBindingsPredicateStar(e,r,n,I,s,o,u,c,l,d,f)}),A.bindingsStream.on("error",_),A.bindingsStream.on("end",()=>{--f.count===0&&d.close(),b(E)})});c[h]=p}}Uw.ActorAbstractPath=Es;Es.FACTORY=new L1e.Factory;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Uw,t),r(ty,t)})(Yo);Object.defineProperty($w,"__esModule",{value:!0});$w.ActorQueryOperationPathAlt=void 0;const b6=Yo,U1e=V2,q1e=ct,V1e=Ut,H1e=xt;class k1e extends b6.ActorAbstractPath{constructor(e){super(e,H1e.Algebra.types.ALT)}async runOperation(e,r){const n=e.predicate,a=(await Promise.all(n.input.map(u=>this.mediatorQueryOperation.mediate({context:r,operation:b6.ActorAbstractPath.FACTORY.createPath(e.subject,u,e.object,e.graph)})))).map(q1e.ActorQueryOperation.getSafeBindings);return{type:"bindings",bindingsStream:new V1e.UnionIterator(a.map(u=>u.bindingsStream),{autoStart:!1}),metadata:()=>Promise.all(a.map(u=>u.metadata())).then(u=>U1e.ActorQueryOperationUnion.unionMetadata(u,!0))}}}$w.ActorQueryOperationPathAlt=k1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r($w,t)})(tB);var rB={},qw={};Object.defineProperty(qw,"__esModule",{value:!0});qw.ActorQueryOperationPathInv=void 0;const _6=Yo,Q1e=xt;class G1e extends _6.ActorAbstractPath{constructor(e){super(e,Q1e.Algebra.types.INV)}async runOperation(e,r){const n=e.predicate,a=_6.ActorAbstractPath.FACTORY.createPath(e.object,n.path,e.subject,e.graph);return this.mediatorQueryOperation.mediate({operation:a,context:r})}}qw.ActorQueryOperationPathInv=G1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(qw,t)})(rB);var nB={},Vw={};Object.defineProperty(Vw,"__esModule",{value:!0});Vw.ActorQueryOperationPathLink=void 0;const g6=Yo,z1e=xt;class W1e extends g6.ActorAbstractPath{constructor(e){super(e,z1e.Algebra.types.LINK)}async runOperation(e,r){const n=e.predicate,a=g6.ActorAbstractPath.FACTORY.createPattern(e.subject,n.iri,e.object,e.graph);return this.mediatorQueryOperation.mediate({operation:a,context:r})}}Vw.ActorQueryOperationPathLink=W1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Vw,t)})(nB);var iB={},Hw={};Object.defineProperty(Hw,"__esModule",{value:!0});Hw.ActorQueryOperationPathNps=void 0;const m6=Yo,X1e=ct,K1e=xt;class J1e extends m6.ActorAbstractPath{constructor(e){super(e,K1e.Algebra.types.NPS)}async runOperation(e,r){const n=e.predicate,a=this.generateVariable(e),s=m6.ActorAbstractPath.FACTORY.createPattern(e.subject,a,e.object,e.graph),o=X1e.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:s,context:r}));return{type:"bindings",bindingsStream:o.bindingsStream.transform({filter(c){return!n.iris.some(l=>l.equals(c.get(a)))},transform(c,l,d){d(c.delete(a)),l()}}),metadata:o.metadata}}}Hw.ActorQueryOperationPathNps=J1e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Hw,t)})(iB);var aB={},kw={};Object.defineProperty(kw,"__esModule",{value:!0});kw.ActorQueryOperationPathOneOrMore=void 0;const Ec=Yo,Y1e=$n,v6=ct,LT=Ut,Z1e=xt,w6=new Y1e.BindingsFactory;class ebe extends Ec.ActorAbstractPath{constructor(e){super(e,Z1e.Algebra.types.ONE_OR_MORE_PATH)}async runOperation(e,r){const n=await this.isPathArbitraryLengthDistinct(r,e);if(n.operation)return n.operation;r=n.context;const a=e.predicate;if(e.subject.termType!=="Variable"&&e.object.termType==="Variable"){const c=e.object,l=await this.getObjectsPredicateStarEval(e.subject,a.path,c,e.graph,r,!1),d=e.graph.termType==="Variable"?[c,e.graph]:[c];return{type:"bindings",bindingsStream:l.bindingsStream,metadata:async()=>({...await l.metadata(),variables:d})}}if(e.subject.termType==="Variable"&&e.object.termType==="Variable"){const c=Ec.ActorAbstractPath.FACTORY.createDistinct(Ec.ActorAbstractPath.FACTORY.createPath(e.subject,e.predicate.path,e.object,e.graph)),l=v6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:r,operation:c})),d=e.subject,f=e.object,h={},p=new LT.MultiTransformIterator(l.bindingsStream,{multiTransform:_=>{const E=_.get(d),w=_.get(f),O=e.graph.termType==="Variable"?_.get(e.graph):e.graph;return new LT.TransformIterator(async()=>{const A=new LT.BufferedIterator;return await this.getSubjectAndObjectBindingsPredicateStar(d,f,E,w,a.path,O,r,h,{},A,{count:0}),A.transform({transform(T,I,D){e.graph.termType==="Variable"&&(T=T.set(e.graph,O)),D(T),I()}})},{maxBufferSize:128})},autoStart:!1}),b=e.graph.termType==="Variable"?[d,f,e.graph]:[d,f];return{type:"bindings",bindingsStream:p,metadata:async()=>({...await l.metadata(),variables:b})}}if(e.subject.termType==="Variable"&&e.object.termType!=="Variable")return this.mediatorQueryOperation.mediate({context:r,operation:Ec.ActorAbstractPath.FACTORY.createPath(e.object,Ec.ActorAbstractPath.FACTORY.createOneOrMorePath(Ec.ActorAbstractPath.FACTORY.createInv(a.path)),e.subject,e.graph)});const s=this.generateVariable(),o=v6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:r,operation:Ec.ActorAbstractPath.FACTORY.createPath(e.subject,a,s,e.graph)}));return{type:"bindings",bindingsStream:o.bindingsStream.transform({filter:c=>e.object.equals(c.get(s)),transform(c,l,d){const f=e.graph.termType==="Variable"?w6.bindings([[e.graph,c.get(e.graph)]]):w6.bindings();d(f),l()}}),metadata:async()=>({...await o.metadata(),variables:e.graph.termType==="Variable"?[e.graph]:[]})}}}kw.ActorQueryOperationPathOneOrMore=ebe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(kw,t)})(aB);var sB={},Qw={};Object.defineProperty(Qw,"__esModule",{value:!0});Qw.ActorQueryOperationPathZeroOrMore=void 0;const BT=Yo,tbe=$n,rbe=ct,R1=Ut,x1=nr,nbe=xt,S6=new tbe.BindingsFactory;class ibe extends BT.ActorAbstractPath{constructor(e){super(e,nbe.Algebra.types.ZERO_OR_MORE_PATH)}async runOperation(e,r){const n=await this.isPathArbitraryLengthDistinct(r,e);if(n.operation)return n.operation;r=n.context;const a=e.predicate,s=e.subject.termType==="Variable",o=e.object.termType==="Variable";if(e.subject.termType==="Variable"&&e.object.termType==="Variable"){const h=this.generateVariable(e),p=BT.ActorAbstractPath.FACTORY.createPattern(e.subject,h,e.object,e.graph),b=rbe.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:r,operation:p})),_=e.subject,E=e.object,w=new Set,O={},A=new R1.MultiTransformIterator(b.bindingsStream,{multiTransform:I=>{const D=I.get(_),U=I.get(E),H=e.graph.termType==="Variable"?I.get(e.graph):e.graph,N=(0,x1.termToString)(D)+(0,x1.termToString)(H),x=(0,x1.termToString)(U)+(0,x1.termToString)(H);return new R1.TransformIterator(async()=>{if(w.has(N)&&w.has(x))return new R1.EmptyIterator;const F=new R1.BufferedIterator,X={count:0};return w.has(N)||(w.add(N),await this.getSubjectAndObjectBindingsPredicateStar(_,E,D,D,a.path,H,r,O,{},F,X)),w.has(x)||(w.add(x),await this.getSubjectAndObjectBindingsPredicateStar(_,E,U,U,a.path,H,r,O,{},F,X)),F.transform({transform(ne,$,j){e.graph.termType==="Variable"&&(ne=ne.set(e.graph,H)),j(ne),$()}})})}}),T=e.graph.termType==="Variable"?[_,e.object,e.graph]:[_,e.object];return{type:"bindings",bindingsStream:A,metadata:async()=>({...await b.metadata(),variables:T})}}if(!s&&!o){const h=this.generateVariable(),p=await this.getObjectsPredicateStarEval(e.subject,a.path,h,e.graph,r,!0);return{type:"bindings",bindingsStream:p.bindingsStream.transform({filter:_=>e.object.equals(_.get(h)),transform(_,E,w){const O=e.graph.termType==="Variable"?S6.bindings([[e.graph,_.get(e.graph)]]):S6.bindings();w(O),E()}}),metadata:async()=>({...await p.metadata(),variables:e.graph.termType==="Variable"?[e.graph]:[]})}}const u=s?e.object:e.subject,c=s?e.subject:e.object,l=s?BT.ActorAbstractPath.FACTORY.createInv(a.path):a.path,d=await this.getObjectsPredicateStarEval(u,l,c,e.graph,r,!0),f=e.graph.termType==="Variable"?[c,e.graph]:[c];return{type:"bindings",bindingsStream:d.bindingsStream,metadata:async()=>({...await d.metadata(),variables:f})}}}Qw.ActorQueryOperationPathZeroOrMore=ibe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Qw,t)})(sB);var oB={},Gw={};Object.defineProperty(Gw,"__esModule",{value:!0});Gw.ActorQueryOperationPathZeroOrOne=void 0;const Oc=Yo,abe=$n,T6=ct,sbe=Hi,E6=Ut,obe=xt,$T=new abe.BindingsFactory;class ube extends Oc.ActorAbstractPath{constructor(e){super(e,obe.Algebra.types.ZERO_OR_ONE_PATH)}async runOperation(e,r){const n=e.predicate,a=[];if(e.subject.termType!=="Variable"&&e.object.termType!=="Variable"&&e.subject.equals(e.object))return{type:"bindings",bindingsStream:new E6.SingletonIterator($T.bindings()),metadata:()=>Promise.resolve({state:new sbe.MetadataValidationState,cardinality:{type:"exact",value:1},canContainUndefs:!1,variables:[]})};const s=await this.isPathArbitraryLengthDistinct(r,e);if(s.operation)return s.operation;r=s.context;const o=T6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:r,operation:Oc.ActorAbstractPath.FACTORY.createPath(e.subject,n.path,e.object,e.graph)}));let u;if(e.subject.termType==="Variable"&&e.object.termType==="Variable"){const c=this.generateVariable(e),l=T6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({context:r,operation:Oc.ActorAbstractPath.FACTORY.createFilter(Oc.ActorAbstractPath.FACTORY.createPattern(e.subject,c,e.object,e.graph),Oc.ActorAbstractPath.FACTORY.createOperatorExpression("=",[Oc.ActorAbstractPath.FACTORY.createTermExpression(e.subject),Oc.ActorAbstractPath.FACTORY.createTermExpression(e.object)]))})).bindingsStream.transform({map(d){return d.delete(c)},autoStart:!1});u=new E6.UnionIterator([l,o.bindingsStream],{autoStart:!1})}else e.subject.termType==="Variable"&&a.push($T.bindings([[e.subject,e.object]])),e.object.termType==="Variable"&&a.push($T.bindings([[e.object,e.subject]])),u=o.bindingsStream.prepend(a);return{type:"bindings",bindingsStream:u,metadata:o.metadata}}}Gw.ActorQueryOperationPathZeroOrOne=ube;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Gw,t)})(oB);var uB={},zw={};Object.defineProperty(zw,"__esModule",{value:!0});zw.ActorQueryOperationClear=void 0;const O6=ct,cbe=ht,lbe=new cbe.DataFactory;class dbe extends O6.ActorQueryOperationTypedMediated{constructor(e){super(e,"clear")}async testOperation(e,r){return O6.ActorQueryOperation.throwOnReadOnly(r),!0}async runOperation(e,r){let n;e.source==="DEFAULT"?n=lbe.defaultGraph():typeof e.source=="string"?n=e.source:n=[e.source];const{execute:a}=await this.mediatorUpdateQuads.mediate({deleteGraphs:{graphs:n,requireExistence:!e.silent,dropGraphs:!1},context:r});return{type:"void",execute:a}}}zw.ActorQueryOperationClear=dbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(zw,t)})(uB);var cB={},Ww={};Object.defineProperty(Ww,"__esModule",{value:!0});Ww.ActorQueryOperationUpdateCompositeUpdate=void 0;const UT=ct;class fbe extends UT.ActorQueryOperationTypedMediated{constructor(e){super(e,"compositeupdate")}async testOperation(e,r){return UT.ActorQueryOperation.throwOnReadOnly(r),!0}async runOperation(e,r){return{type:"void",execute:()=>(async()=>{for(const a of e.updates)await UT.ActorQueryOperation.getSafeVoid(await this.mediatorQueryOperation.mediate({operation:a,context:r})).execute()})()}}}Ww.ActorQueryOperationUpdateCompositeUpdate=fbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Ww,t)})(cB);var lB={},Xw={};Object.defineProperty(Xw,"__esModule",{value:!0});Xw.ActorQueryOperationAddRewrite=void 0;const A6=ct,hbe=ht,pbe=xt,lu=new hbe.DataFactory;class ybe extends A6.ActorQueryOperationTypedMediated{constructor(e){super(e,"add"),this.factory=new pbe.Factory}async testOperation(e,r){return A6.ActorQueryOperation.throwOnReadOnly(r),!0}runOperation(e,r){const n=e.destination==="DEFAULT"?lu.defaultGraph():e.destination,a=e.source==="DEFAULT"?lu.defaultGraph():e.source,s=this.factory.createDeleteInsert(void 0,[this.factory.createPattern(lu.variable("s"),lu.variable("p"),lu.variable("o"),n)],this.factory.createPattern(lu.variable("s"),lu.variable("p"),lu.variable("o"),a));return this.mediatorQueryOperation.mediate({operation:s,context:r})}}Xw.ActorQueryOperationAddRewrite=ybe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Xw,t)})(lB);var dB={},Kw={};Object.defineProperty(Kw,"__esModule",{value:!0});Kw.ActorQueryOperationCopyRewrite=void 0;const R6=ct,bbe=xt;class _be extends R6.ActorQueryOperationTypedMediated{constructor(e){super(e,"copy"),this.factory=new bbe.Factory}async testOperation(e,r){return R6.ActorQueryOperation.throwOnReadOnly(r),!0}runOperation(e,r){if(typeof e.destination=="string"&&typeof e.source=="string"&&e.destination===e.source||typeof e.destination!="string"&&typeof e.source!="string"&&e.destination.equals(e.source))return Promise.resolve({type:"void",execute:()=>Promise.resolve()});const n=this.factory.createCompositeUpdate([this.factory.createDrop(e.destination,!0),this.factory.createAdd(e.source,e.destination,e.silent)]);return this.mediatorQueryOperation.mediate({operation:n,context:r})}}Kw.ActorQueryOperationCopyRewrite=_be;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Kw,t)})(dB);var fB={},Jw={};Object.defineProperty(Jw,"__esModule",{value:!0});Jw.ActorQueryOperationCreate=void 0;const x6=ct;class gbe extends x6.ActorQueryOperationTypedMediated{constructor(e){super(e,"create")}async testOperation(e,r){return x6.ActorQueryOperation.throwOnReadOnly(r),!0}async runOperation(e,r){const{execute:n}=await this.mediatorUpdateQuads.mediate({createGraphs:{graphs:[e.source],requireNonExistence:!e.silent},context:r});return{type:"void",execute:n}}}Jw.ActorQueryOperationCreate=gbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Jw,t)})(fB);var hB={},Yw={};Object.defineProperty(Yw,"__esModule",{value:!0});Yw.ActorQueryOperationUpdateDeleteInsert=void 0;const I1=WR,mbe=$n,qT=ct,vbe=Ut,wbe=new mbe.BindingsFactory;class Sbe extends qT.ActorQueryOperationTypedMediated{constructor(e){super(e,"deleteinsert"),this.blankNodeCounter=0}async testOperation(e,r){return qT.ActorQueryOperation.throwOnReadOnly(r),!0}async runOperation(e,r){const n=e.where?qT.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:e.where,context:r})).bindingsStream:new vbe.ArrayIterator([wbe.bindings()],{autoStart:!1});let a,s;e.insert&&(a=new I1.BindingsToQuadsIterator(e.insert.map(I1.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),n.clone()),this.blankNodeCounter++),e.delete&&(s=new I1.BindingsToQuadsIterator(e.delete.map(I1.BindingsToQuadsIterator.localizeQuad.bind(null,this.blankNodeCounter)),n.clone()),this.blankNodeCounter++);const{execute:o}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:a,quadStreamDelete:s,context:r});return{type:"void",execute:o}}}Yw.ActorQueryOperationUpdateDeleteInsert=Sbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Yw,t)})(hB);var pB={},Zw={};Object.defineProperty(Zw,"__esModule",{value:!0});Zw.ActorQueryOperationDrop=void 0;const I6=ct,Tbe=ht,Ebe=new Tbe.DataFactory;class Obe extends I6.ActorQueryOperationTypedMediated{constructor(e){super(e,"drop")}async testOperation(e,r){return I6.ActorQueryOperation.throwOnReadOnly(r),!0}async runOperation(e,r){let n;e.source==="DEFAULT"?n=Ebe.defaultGraph():typeof e.source=="string"?n=e.source:n=[e.source];const{execute:a}=await this.mediatorUpdateQuads.mediate({deleteGraphs:{graphs:n,requireExistence:!e.silent,dropGraphs:!0},context:r});return{type:"void",execute:a}}}Zw.ActorQueryOperationDrop=Obe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(Zw,t)})(pB);var yB={},e3={};Object.defineProperty(e3,"__esModule",{value:!0});e3.ActorQueryOperationLoad=void 0;const P6=ct,D6=rr,Abe=ht,Rbe=xt,Ac=new Abe.DataFactory;class ux extends P6.ActorQueryOperationTypedMediated{constructor(e){super(e,"load"),this.factory=new Rbe.Factory,this.constructOperation=this.factory.createConstruct(this.factory.createPattern(Ac.variable("s"),Ac.variable("p"),Ac.variable("o")),[this.factory.createPattern(Ac.variable("s"),Ac.variable("p"),Ac.variable("o"))])}async testOperation(e,r){return P6.ActorQueryOperation.throwOnReadOnly(r),!0}async runOperation(e,r){let n=r.set(D6.KeysRdfResolveQuadPattern.sources,[e.source.value]);e.silent&&(n=n.set(D6.KeysInitQuery.lenient,!0));let s=ux.getSafeQuads(await this.mediatorQueryOperation.mediate({operation:this.constructOperation,context:n})).quadStream;e.destination&&(s=s.map(u=>Ac.quad(u.subject,u.predicate,u.object,e.destination)));const{execute:o}=await this.mediatorUpdateQuads.mediate({quadStreamInsert:s,context:r});return{type:"void",execute:o}}}e3.ActorQueryOperationLoad=ux;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(e3,t)})(yB);var bB={},t3={};Object.defineProperty(t3,"__esModule",{value:!0});t3.ActorQueryOperationMoveRewrite=void 0;const N6=ct,xbe=xt;class Ibe extends N6.ActorQueryOperationTypedMediated{constructor(e){super(e,"move"),this.factory=new xbe.Factory}async testOperation(e,r){return N6.ActorQueryOperation.throwOnReadOnly(r),!0}runOperation(e,r){if(typeof e.destination=="string"&&typeof e.source=="string"&&e.destination===e.source||typeof e.destination!="string"&&typeof e.source!="string"&&e.destination.equals(e.source))return Promise.resolve({type:"void",execute:()=>Promise.resolve()});const n=[this.factory.createDrop(e.destination,!0),this.factory.createAdd(e.source,e.destination,e.silent),this.factory.createDrop(e.source)],a=this.factory.createCompositeUpdate(n);return this.mediatorQueryOperation.mediate({operation:a,context:r})}}t3.ActorQueryOperationMoveRewrite=Ibe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(t3,t)})(bB);var cx={},r3={};Object.defineProperty(r3,"__esModule",{value:!0});r3.ActorRdfJoinMultiBind=void 0;const C6=ct,P1=fa,VT=rr,HT=Ut,Qh=xt;class Pp extends P1.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"bind",canHandleUndefs:!0})}static createBindStream(e,r,n,a,s){const o=u=>{const c=n.map(d=>(0,C6.materializeOperation)(d,u,{bindFilter:!1})),l=d=>d.merge(u);return new HT.TransformIterator(async()=>(await a(c,u)).transform({map:l}),{maxBufferSize:128,autoStart:!1})};switch(e){case"depth-first":return new HT.MultiTransformIterator(r,{autoStart:!1,multiTransform:o,optional:s});case"breadth-first":return new HT.UnionIterator(r.transform({map:o,optional:s}),{autoStart:!1});default:throw new Error(`Received request for unknown bind order: ${e}`)}}async sortJoinEntries(e,r){if(e.some(u=>u.metadata.canContainUndefs))return e;const a={};for(const u of e)for(const c of u.metadata.variables){let l=a[c.value];l||(l=0),a[c.value]=++l}const s=[];for(const[u,c]of Object.entries(a))c>=2&&s.push(u);if(s.length===0)throw new Error("Bind join can only join entries with at least one common variable");const o=[];for(const u of e){let c=!1;for(const l of u.metadata.variables)if(s.includes(l.value)){c=!0;break}c||o.push(u)}return(await this.mediatorJoinEntriesSort.mediate({entries:e,context:r})).entries.sort((u,c)=>{const l=o.includes(u),d=o.includes(c);return l===d?0:l?1:-1})}async getOutput(e){const r=await P1.ActorRdfJoin.getEntriesWithMetadatas(e.entries),n=await this.sortJoinEntries(r,e.context);this.logDebug(e.context,"First entry for Bind Join: ",()=>({entry:n[0].operation,metadata:n[0].metadata}));for(const[c,l]of n.entries())c!==0&&l.output.bindingsStream.close();const a=n[0].output,s=[...n];s.splice(0,1);const o=e.context.set(VT.KeysQueryOperation.joinLeftMetadata,n[0].metadata).set(VT.KeysQueryOperation.joinRightMetadatas,s.map(c=>c.metadata));return{result:{type:"bindings",bindingsStream:Pp.createBindStream(this.bindOrder,a.bindingsStream,s.map(c=>c.operation),async(c,l)=>{const d=c.length===1?c[0]:Pp.FACTORY.createJoin(c);return C6.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:d,context:o==null?void 0:o.set(VT.KeysQueryOperation.joinBindings,l)})).bindingsStream},!1),metadata:()=>this.constructResultMetadata(n,n.map(c=>c.metadata),e.context)},physicalPlanMetadata:{bindIndex:r.indexOf(n[0]),bindOrder:this.bindOrder}}}canBindWithOperation(e){let r=!0;return Qh.Util.recurseOperation(e,{[Qh.Algebra.types.EXTEND](){return r=!1,!1},[Qh.Algebra.types.GROUP](){return r=!1,!1},[Qh.Algebra.types.FILTER](){return r=!1,!1}}),r}async getJoinCoefficients(e,r){const n=await this.sortJoinEntries(e.entries.map((p,b)=>({...p,metadata:r[b]})),e.context);r=n.map(p=>p.metadata);const a=P1.ActorRdfJoin.getRequestInitialTimes(r),s=P1.ActorRdfJoin.getRequestItemTimes(r),o=[...n],u=[...a],c=[...s];if(o.splice(0,1),u.splice(0,1),c.splice(0,1),o.some(p=>!this.canBindWithOperation(p.operation)))throw new Error(`Actor ${this.name} can not bind on Extend, Group, and Filter operations`);const l=await Promise.all(o.map(async p=>(await this.mediatorJoinSelectivity.mediate({entries:[n[0],p],context:e.context})).selectivity*this.selectivityModifier)),d=o.map((p,b)=>p.metadata.cardinality.value*l[b]).reduce((p,b)=>p+b,0),f=u.reduce((p,b,_)=>p+b*l[_],0),h=c.reduce((p,b,_)=>p+b*l[_],0);return{iterations:r[0].cardinality.value*d,persistedItems:0,blockingItems:0,requestTime:a[0]+r[0].cardinality.value*(s[0]+f+d*h)}}}r3.ActorRdfJoinMultiBind=Pp;Pp.FACTORY=new Qh.Factory;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(r3,t)})(cx);var _B={},n3={};Object.defineProperty(n3,"__esModule",{value:!0});n3.ActorRdfJoinOptionalBind=void 0;const Pbe=cx,Dbe=ct,D1=fa,kT=rr,j6=xt;class Nbe extends D1.ActorRdfJoin{constructor(e){super(e,{logicalType:"optional",physicalName:"bind",limitEntries:2,canHandleUndefs:!0})}async getOutput(e){e.entries[1].output.bindingsStream.close();const r=e.context.set(kT.KeysQueryOperation.joinLeftMetadata,await e.entries[0].output.metadata()).set(kT.KeysQueryOperation.joinRightMetadatas,[await e.entries[1].output.metadata()]);return{result:{type:"bindings",bindingsStream:Pbe.ActorRdfJoinMultiBind.createBindStream(this.bindOrder,e.entries[0].output.bindingsStream,[e.entries[1].operation],async(a,s)=>{const o=a[0];return Dbe.ActorQueryOperation.getSafeBindings(await this.mediatorQueryOperation.mediate({operation:o,context:r==null?void 0:r.set(kT.KeysQueryOperation.joinBindings,s)})).bindingsStream},!0),metadata:async()=>await this.constructResultMetadata(e.entries,await D1.ActorRdfJoin.getMetadatas(e.entries),e.context,{canContainUndefs:!0})}}}async getJoinCoefficients(e,r){const n=D1.ActorRdfJoin.getRequestInitialTimes(r),a=D1.ActorRdfJoin.getRequestItemTimes(r);if(e.entries[1].operation.type===j6.Algebra.types.EXTEND||e.entries[1].operation.type===j6.Algebra.types.GROUP)throw new Error(`Actor ${this.name} can not bind on Extend and Group operations`);const s=(await this.mediatorJoinSelectivity.mediate({entries:e.entries,context:e.context})).selectivity*this.selectivityModifier;return{iterations:r[0].cardinality.value*r[1].cardinality.value*s,persistedItems:0,blockingItems:0,requestTime:n[0]+r[0].cardinality.value*s*(a[0]+n[1]+r[1].cardinality.value*a[1])}}}n3.ActorRdfJoinOptionalBind=Nbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(n3,t)})(_B);var gB={},i3={};Object.defineProperty(i3,"__esModule",{value:!0});i3.ActorQueryOperationJoin=void 0;const M6=ct;class Cbe extends M6.ActorQueryOperationTypedMediated{constructor(e){super(e,"join")}async testOperation(e,r){return!0}async runOperation(e,r){const n=(await Promise.all(e.input.map(async a=>({output:await this.mediatorQueryOperation.mediate({operation:a,context:r}),operation:a})))).map(({output:a,operation:s})=>({output:M6.ActorQueryOperation.getSafeBindings(a),operation:s}));return this.mediatorJoin.mediate({type:"inner",entries:n,context:r})}}i3.ActorQueryOperationJoin=Cbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(i3,t)})(gB);var mB={},a3={};Object.defineProperty(a3,"__esModule",{value:!0});a3.ActorQueryOperationLeftJoin=void 0;const QT=ct,F6=Al;class jbe extends QT.ActorQueryOperationTypedMediated{constructor(e){super(e,"leftjoin")}async testOperation(e,r){return!0}async runOperation(e,r){const n=(await Promise.all(e.input.map(async s=>({output:await this.mediatorQueryOperation.mediate({operation:s,context:r}),operation:s})))).map(({output:s,operation:o})=>({output:QT.ActorQueryOperation.getSafeBindings(s),operation:o})),a=await this.mediatorJoin.mediate({type:"optional",entries:n,context:r});if(e.expression){const o=(await n[1].output.metadata()).variables,u={...QT.ActorQueryOperation.getAsyncExpressionContext(r,this.mediatorQueryOperation)},c=new F6.AsyncEvaluator(e.expression,u),l=a.bindingsStream.transform({autoStart:!1,transform:async(d,f,h)=>{if(!o.every(p=>d.has(p.value)))return h(d),f();try{await c.evaluateAsEBV(d)&&h(d)}catch(p){(0,F6.isExpressionError)(p)?this.logWarn(r,"Error occurred while filtering.",()=>({error:p,bindings:d})):l.emit("error",p)}f()}});a.bindingsStream=l}return a}}a3.ActorQueryOperationLeftJoin=jbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(a3,t)})(mB);var vB={},s3={};Object.defineProperty(s3,"__esModule",{value:!0});s3.ActorQueryOperationMinus=void 0;const L6=ct;class Mbe extends L6.ActorQueryOperationTypedMediated{constructor(e){super(e,"minus")}async testOperation(e,r){return!0}async runOperation(e,r){const n=(await Promise.all(e.input.map(async a=>({output:await this.mediatorQueryOperation.mediate({operation:a,context:r}),operation:a})))).map(({output:a,operation:s})=>({output:L6.ActorQueryOperation.getSafeBindings(a),operation:s}));return this.mediatorJoin.mediate({type:"minus",entries:n,context:r})}}s3.ActorQueryOperationMinus=Mbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(s3,t)})(vB);var wB={},o3={};Object.defineProperty(o3,"__esModule",{value:!0});o3.ActorQueryOperationPathSeq=void 0;const B6=Yo,$6=ct,Fbe=xt;class Lbe extends B6.ActorAbstractPath{constructor(e){super(e,Fbe.Algebra.types.SEQ)}async runOperation(e,r){const n=e.predicate;let a=e.subject;const s=[],o=await Promise.all(n.input.map((l,d)=>{const f=d===n.input.length-1?e.object:this.generateVariable(e,`b${d}`),h=B6.ActorAbstractPath.FACTORY.createPath(a,l,f,e.graph),p=this.mediatorQueryOperation.mediate({context:r,operation:h});return a=f,d({output:$6.ActorQueryOperation.getSafeBindings(await l),operation:d}))),u=$6.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:"inner",entries:o,context:r}));return{type:"bindings",bindingsStream:u.bindingsStream.transform({transform(l,d,f){for(const h of s)l=l.delete(h);f(l),d()}}),async metadata(){const l=await u.metadata(),d=l.variables.filter(f=>!s.some(h=>h.value===f.value));return{...l,variables:d}}}}}o3.ActorQueryOperationPathSeq=Lbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(o3,t)})(wB);var SB={},u3={};Object.defineProperty(u3,"__esModule",{value:!0});u3.ActorRdfJoinMultiSmallest=void 0;const Bbe=ct,N1=fa,$be=xt;class c3 extends N1.ActorRdfJoin{constructor(e){super(e,{logicalType:"inner",physicalName:"multi-smallest",limitEntries:3,limitEntriesMin:!0,canHandleUndefs:!0})}async sortJoinEntries(e,r){return(await this.mediatorJoinEntriesSort.mediate({entries:e,context:r})).entries}async getOutput(e){const r=await this.sortJoinEntries(await N1.ActorRdfJoin.getEntriesWithMetadatas([...e.entries]),e.context),n=r[0],a=r[1];r.splice(0,2);const s={output:Bbe.ActorQueryOperation.getSafeBindings(await this.mediatorJoin.mediate({type:e.type,entries:[n,a],context:e.context})),operation:c3.FACTORY.createJoin([n.operation,a.operation],!1)};return r.push(s),{result:await this.mediatorJoin.mediate({type:e.type,entries:r,context:e.context})}}async getJoinCoefficients(e,r){r=[...r],r=(await this.sortJoinEntries(e.entries.map((o,u)=>({...o,metadata:r[u]})),e.context)).map(o=>o.metadata);const a=N1.ActorRdfJoin.getRequestInitialTimes(r),s=N1.ActorRdfJoin.getRequestItemTimes(r);return{iterations:r[0].cardinality.value*r[1].cardinality.value*r.slice(2).reduce((o,u)=>o*u.cardinality.value,1),persistedItems:0,blockingItems:0,requestTime:a[0]+r[0].cardinality.value*s[0]+a[1]+r[1].cardinality.value*s[1]+r.slice(2).reduce((o,u,c)=>o+a.slice(2)[c]+u.cardinality.value*s.slice(2)[c],0)}}}u3.ActorRdfJoinMultiSmallest=c3;c3.FACTORY=new $be.Factory;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(u3,t)})(SB);var TB={},l3={};Object.defineProperty(l3,"__esModule",{value:!0});l3.ActorQueryOperationQuadpattern=void 0;const Ube=$n,U6=ct,qbe=rr,Vbe=ht,Hbe=nr,Rc=An,kbe=xt,Qbe=new Ube.BindingsFactory,GT=new Vbe.DataFactory,Gbe=new kbe.Factory;class Ts extends U6.ActorQueryOperationTyped{constructor(e){super(e,"pattern")}static isTermVariable(e){return e.termType==="Variable"}static getVariables(e){return(0,Rc.uniqTerms)((0,Rc.getTermsNested)(e).filter(Ts.isTermVariable))}static getDuplicateElementLinks(e){const r={};let n=!1;if((0,Rc.forEachTermsNested)(e,(s,o)=>{if(s.termType==="Variable"){const u=(0,Hbe.termToString)(s),c=(r[u]||(r[u]=[])).push(o);n=n||c>1}}),!n)return;const a={};for(const s in r){const o=r[s],u=o.slice(1);u.length>0&&(a[o[0].join("_")]=u)}return a}static validateMetadata(e){for(const r of["cardinality","canContainUndefs"])if(!(r in e))throw new Error(`Invalid metadata: missing ${r} in ${JSON.stringify(e)}`);return e}static getMetadata(e,r,n){return()=>new Promise((a,s)=>{e.getProperty("metadata",o=>a(o)),e.on("error",s)}).then(a=>("canContainUndefs"in a||(a.canContainUndefs=!1),Ts.quadsMetadataToBindingsMetadata(Ts.validateMetadata(a),r,n)))}static quadsMetadataToBindingsMetadata(e,r,n){return{...e,order:e.order?Ts.quadsOrderToBindingsOrder(e.order,r):void 0,availableOrders:e.availableOrders?e.availableOrders.map(a=>({cost:a.cost,terms:Ts.quadsOrderToBindingsOrder(a.terms,r)})):void 0,variables:n}}static quadsOrderToBindingsOrder(e,r){const n={};return e.map(a=>{const s=r[a.term];if(s&&!n[s])return n[s]=!0,{term:GT.variable(s),direction:a.direction}}).filter(a=>!!a)}async testOperation(e,r){return!0}async runOperation(e,r){e.context&&(r=r.merge(e.context));let n=e;const a=this.unionDefaultGraph||r.get(qbe.KeysQueryOperation.unionDefaultGraph);e.graph.termType==="DefaultGraph"&&a&&(n=Gbe.createPattern(e.subject,e.predicate,e.object,GT.variable("__comunica:defaultGraph")));const s=await this.mediatorResolveQuadPattern.mediate({pattern:n,context:r}),o=Ts.getVariables(e),u=(0,Rc.reduceTermsNested)(e,(d,f,h)=>(f.termType==="Variable"&&(d[h.join("_")]=f.value),d),{}),c=Ts.getMetadata(s.data,u,o);return{type:"bindings",bindingsStream:new U6.ClosableTransformIterator(async()=>{let d=s.data;const f=Ts.getDuplicateElementLinks(e);return e.graph.termType==="Variable"&&!a&&(d=d.filter(h=>h.graph.termType!=="DefaultGraph")),f&&(d=d.filter(h=>{for(const p in f){const b=p.split("_"),_=(0,Rc.getValueNestedPath)(h,b);for(const E of f[p])if(!_.equals((0,Rc.getValueNestedPath)(h,E)))return!1}return!0})),d.map(h=>Qbe.bindings(Object.keys(u).map(p=>{const b=p.split("_"),_=u[p],E=(0,Rc.getValueNestedPath)(h,b);return[GT.variable(_),E]})))},{autoStart:!1,onClose:()=>s.data.destroy()}),metadata:c}}}l3.ActorQueryOperationQuadpattern=Ts;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(l3,t)})(TB);var EB={},d3={},ul={};Object.defineProperty(ul,"__esModule",{value:!0});ul.ActorDereferenceHttpBase=ul.mediaTypesToAcceptString=void 0;const q6=nm,V6=Zs,zbe=zR,Wbe=Ra,Xbe=wl,Kbe=/^[^ ;]*/u;function OB(t,e){const r="*/*;q=0.1",n=[],a=Object.entries(t).map(([o,u])=>({mediaType:o,priority:u})).sort((o,u)=>u.priority===o.priority?o.mediaType.localeCompare(u.mediaType):u.priority-o.priority);let s=a.length-1;for(const{mediaType:o,priority:u}of a){const c=o+(u!==1?`;q=${u.toFixed(3).replace(/0*$/u,"")}`:"");if(s+c.length>e){for(;s+r.length>e;){const l=n.pop()||"";s-=l.length+1}n.push(r);break}n.push(c),s+=c.length}return n.length===0?"*/*":n.join(",")}ul.mediaTypesToAcceptString=OB;class Jbe extends q6.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){var l,d;let r=!0;const n=new zbe.Headers(e.headers);n.append("Accept",OB(await((l=e.mediaTypes)==null?void 0:l.call(e))??{},this.getMaxAcceptHeaderLength()));let a;const s=Date.now();try{a=await this.mediatorHttp.mediate({context:e.context,init:{headers:n,method:e.method},input:e.url})}catch(f){return this.handleDereferenceErrors(e,f)}const o=(0,Wbe.resolve)(a.url,e.url),u=Date.now()-s;if(a.status!==200){r=!1;const f=a.body?await Xbe(V6.ActorHttp.toNodeReadable(a.body)):"empty response";if(!e.acceptErrors){const h=new Error(`Could not retrieve ${e.url} (HTTP status ${a.status}): +${f}`);return this.handleDereferenceErrors(e,h,a.headers,u)}}const c=(d=Kbe.exec(a.headers.get("content-type")??""))==null?void 0:d[0];return{url:o,data:r?V6.ActorHttp.toNodeReadable(a.body):(0,q6.emptyReadable)(),exists:r,requestTime:u,headers:a.headers,mediaType:c!=="text/plain"?c:void 0}}}ul.ActorDereferenceHttpBase=Jbe;Object.defineProperty(d3,"__esModule",{value:!0});d3.ActorDereferenceHttp=void 0;const Ybe=ul;class Zbe extends Ybe.ActorDereferenceHttpBase{getMaxAcceptHeaderLength(){return this.maxAcceptHeaderLengthBrowser}}d3.ActorDereferenceHttp=Zbe;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(d3,t),r(ul,t)})(EB);var AB={},f3={};Object.defineProperty(f3,"__esModule",{value:!0});f3.ActorHttpProxy=void 0;const e_e=Zs,zT=rr;class t_e extends e_e.ActorHttp{constructor(e){super(e)}async test(e){const r=e.context.get(zT.KeysHttpProxy.httpProxyHandler);if(!r)throw new Error(`Actor ${this.name} could not find a proxy handler in the context.`);if(!await r.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 r=typeof e.input=="string"?e.input:e.input.url,n=e.context.get(zT.KeysHttpProxy.httpProxyHandler),a=await this.mediatorHttp.mediate({...await n.getProxy(e),context:e.context.delete(zT.KeysHttpProxy.httpProxyHandler)});return Object.defineProperty(a,"url",{configurable:!0,enumerable:!0,get:()=>a.headers.get("x-final-url")??r}),a}}f3.ActorHttpProxy=t_e;var h3={};Object.defineProperty(h3,"__esModule",{value:!0});h3.ProxyHandlerStatic=void 0;class r_e{constructor(e){this.prefixUrl=e}async getProxy(e){return{init:e.init,input:this.modifyInput(e.input)}}modifyInput(e){return typeof e=="string"?this.prefixUrl+e:new Request(this.prefixUrl+e.url,e)}}h3.ProxyHandlerStatic=r_e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(f3,t),r(h3,t)})(AB);var RB={},p3={};Object.defineProperty(p3,"__esModule",{value:!0});p3.ActorRdfUpdateQuadsHypermedia=void 0;const ed=Cf,n_e=Pa;class i_e extends ed.ActorRdfUpdateQuadsDestination{constructor(e){super(e),this.cache=this.cacheSize?new n_e.LRUCache({max:this.cacheSize}):void 0;const r=this.cache;r&&this.httpInvalidator.addInvalidateListener(({url:n})=>n?r.delete(n):r.clear())}async test(e){if(!(0,ed.getContextDestinationUrl)((0,ed.getContextDestination)(e.context)))throw new Error(`Actor ${this.name} can only update quads against a single destination URL.`);return!0}getDestination(e){const r=(0,ed.getContextDestination)(e);let n=(0,ed.getContextDestinationUrl)(r);if(this.cache&&this.cache.has(n))return this.cache.get(n);const a=(async()=>{var c;let s,o;try{const l=await this.mediatorDereferenceRdf.mediate({context:e,url:n,acceptErrors:!0});o=l.exists,n=l.url;const d=await this.mediatorMetadata.mediate({context:e,url:n,quads:l.data,triples:(c=l.metadata)==null?void 0:c.triples});s=(await this.mediatorMetadataExtract.mediate({context:e,url:n,metadata:d.metadata,headers:l.headers,requestTime:l.requestTime})).metadata}catch{s={},o=!1}const{destination:u}=await this.mediatorRdfUpdateHypermedia.mediate({context:e,url:n,metadata:s,exists:o,forceDestinationType:(0,ed.getDataDestinationType)(r)});return u})();return this.cache&&this.cache.set(n,a),a}}p3.ActorRdfUpdateQuadsHypermedia=i_e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(p3,t)})(RB);var xB={},y3={},ry={},b3={},_3={};Object.defineProperty(_3,"__esModule",{value:!0});_3.LinkedRdfSourcesAsyncRdfIterator=void 0;const a_e=Hi,s_e=Ut,o_e=Pa;class u_e extends s_e.BufferedIterator{constructor(e,r,n,a,s,o,u,c){if(super({autoStart:!0,...c}),this.started=!1,this.currentIterators=[],this.iteratorsPendingCreation=0,this.accumulatedMetadata=Promise.resolve(void 0),this.cacheSize=e,this.subject=r,this.predicate=n,this.object=a,this.graph=s,this.firstUrl=o,this.maxIterators=u,this.maxIterators<=0)throw new Error(`LinkedRdfSourcesAsyncRdfIterator.maxIterators must be larger than zero, but got ${this.maxIterators}`)}_end(e){for(const r of this.currentIterators)r.destroy();super._end(e)}setSourcesState(e){e?this.sourcesState=e:(this.sourcesState={sources:new o_e.LRUCache({max:this.cacheSize})},this.getSourceCached({url:this.firstUrl},{}).catch(r=>this.destroy(r)))}getSourceCached(e,r){let n=this.sourcesState.sources.get(e.url);return n||(n=this.getSource(e,r),(e.url===this.firstUrl||this.shouldStoreSourcesStates())&&this.sourcesState.sources.set(e.url,n),n)}shouldStoreSourcesStates(){return!0}_read(e,r){if(!this.started)this.started=!0,this.sourcesState||this.setSourcesState(),this.getSourceCached({url:this.firstUrl},{}).then(n=>{this.startIterator(n,!0),r()}).catch(n=>setTimeout(()=>this.destroy(n)));else{for(const n of this.currentIterators){for(;e>0;){const a=n.read();if(a!==null)e--,this._push(a);else break}if(e<=0)break}e>=0&&this.canStartNewIterator()?this.getSourceCached({url:this.firstUrl},{}).then(n=>{this.startIteratorsForNextUrls(n.handledDatasets,!1),r()}).catch(n=>this.destroy(n)):r()}}canStartNewIterator(){return this.currentIterators.length+this.iteratorsPendingCreation0}startIterator(e,r){const n=e.source.match(this.subject,this.predicate,this.object,this.graph);this.currentIterators.push(n);let a=!1;n._destination=this,n.on("error",s=>this.destroy(s)),n.on("readable",()=>this._fillBuffer()),n.on("end",()=>{this.currentIterators.splice(this.currentIterators.indexOf(n),1),a&&this.startIteratorsForNextUrls(e.handledDatasets,!0)}),n.getProperty("metadata",s=>{this.accumulatedMetadata=this.accumulatedMetadata.then(o=>(async()=>(o||(o=e.metadata),this.accumulateMetadata(o,s)))().then(u=>{const c={...e.metadata,...s,...u};return c.state=new a_e.MetadataValidationState,this.updateMetadata(c),this.getSourceLinks(c).then(l=>Promise.all(l)).then(async l=>{const d=await this.getLinkQueue();for(const f of l)d.push(f,e.link);a=!0,this.startIteratorsForNextUrls(e.handledDatasets,!0)}).catch(l=>this.destroy(l)),c})).catch(o=>(this.destroy(o),{}))})}updateMetadata(e){const r=this.getProperty("metadata");this.setProperty("metadata",e),r==null||r.state.invalidate()}isRunning(){return!this.done}startIteratorsForNextUrls(e,r){this.getLinkQueue().then(n=>{for(;this.canStartNewIterator()&&this.isRunning();){const a=n.pop();if(a)this.iteratorsPendingCreation++,this.getSourceCached(a,e).then(s=>{this.iteratorsPendingCreation--,this.startIterator(s,!1)}).catch(s=>this.destroy(s));else break}r&&this.isCloseable(n)&&this.close()}).catch(n=>this.destroy(n))}isCloseable(e){return e.isEmpty()&&!this.areIteratorsRunning()}}_3.LinkedRdfSourcesAsyncRdfIterator=u_e;Object.defineProperty(b3,"__esModule",{value:!0});b3.MediatedLinkedRdfSourcesAsyncRdfIterator=void 0;const c_e=ht,l_e=kt,d_e=_3,C1=new c_e.DataFactory;class f_e extends d_e.LinkedRdfSourcesAsyncRdfIterator{constructor(e,r,n,a,s,o,u,c,l,d,f){super(e,a,s,o,u,c,l,d?{maxBufferSize:Number.POSITIVE_INFINITY}:void 0),this.wasForcefullyClosed=!1,this.context=r,this.forceSourceType=n,this.mediatorDereferenceRdf=f.mediatorDereferenceRdf,this.mediatorMetadata=f.mediatorMetadata,this.mediatorMetadataExtract=f.mediatorMetadataExtract,this.mediatorMetadataAccumulate=f.mediatorMetadataAccumulate,this.mediatorRdfResolveHypermedia=f.mediatorRdfResolveHypermedia,this.mediatorRdfResolveHypermediaLinks=f.mediatorRdfResolveHypermediaLinks,this.mediatorRdfResolveHypermediaLinksQueue=f.mediatorRdfResolveHypermediaLinksQueue,this.handledUrls={[c]:!0},this.aggregatedStore=d}close(){if(!this.aggregatedStore){super.close();return}this.getLinkQueue().then(e=>{var r;this.isCloseable(e)?((r=this.aggregatedStore)==null||r.end(),super.close()):this.wasForcefullyClosed=!0}).catch(e=>super.destroy(e))}destroy(e){if(!this.aggregatedStore){super.destroy(e);return}this.getLinkQueue().then(r=>{var n;e||this.isCloseable(r)?((n=this.aggregatedStore)==null||n.end(),super.destroy(e)):this.wasForcefullyClosed=!0}).catch(r=>super.destroy(r))}isCloseable(e){return(this.wasForcefullyClosed||e.isEmpty())&&!this.areIteratorsRunning()}canStartNewIterator(){return!this.wasForcefullyClosed&&this.aggregatedStore&&this.aggregatedStore.hasRunningIterators()||super.canStartNewIterator()}isRunning(){return this.aggregatedStore&&this.aggregatedStore.hasRunningIterators()||!this.done}shouldStoreSourcesStates(){return this.aggregatedStore===void 0}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:r}=await this.mediatorRdfResolveHypermediaLinks.mediate({context:this.context,metadata:e});return r.filter(n=>this.handledUrls[n.url]?!1:(this.handledUrls[n.url]=!0,!0))}catch{return[]}}async getSource(e,r){var l,d,f,h;let n=this.context;e.context&&(n=n.merge(e.context));let a=e.url,s,o;try{const p=await this.mediatorDereferenceRdf.mediate({context:n,url:a});a=p.url;const b=await this.mediatorMetadata.mediate({context:n,url:a,quads:p.data,triples:(l=p.metadata)==null?void 0:l.triples});b.data.on("error",()=>{}),o=(await this.mediatorMetadataExtract.mediate({context:n,url:a,metadata:b.metadata,headers:p.headers,requestTime:p.requestTime})).metadata,s=b.data,e.transform&&(s=await e.transform(s))}catch(p){s=new l_e.Readable,s.read=()=>(setTimeout(()=>s.emit("error",p)),null),o={}}(d=this.aggregatedStore)==null||d.setBaseMetadata(o,!1),(f=this.aggregatedStore)==null||f.containedSources.add(e.url),(h=this.aggregatedStore)==null||h.import(s);const{source:u,dataset:c}=await this.mediatorRdfResolveHypermedia.mediate({context:n,forceSourceType:this.forceSourceType,handledDatasets:r,metadata:o,quads:s,url:a});return c&&(r[c]=!0),{link:e,source:u,metadata:o,handledDatasets:r}}startIterator(e,r){var n;if(this.aggregatedStore&&!this.aggregatedStore.containedSources.has(e.link.url)){(n=this.aggregatedStore)==null||n.containedSources.add(e.link.url);const a=e.source.match(C1.variable("s"),C1.variable("p"),C1.variable("o"),C1.variable("g"),this.context);this.aggregatedStore.import(a).on("end",()=>{super.startIterator(e,r)})}else super.startIterator(e,r)}async accumulateMetadata(e,r){return(await this.mediatorMetadataAccumulate.mediate({mode:"append",accumulatedMetadata:e,appendingMetadata:r,context:this.context})).metadata}updateMetadata(e){var r;super.updateMetadata(e),(r=this.aggregatedStore)==null||r.setBaseMetadata(e,!0)}}b3.MediatedLinkedRdfSourcesAsyncRdfIterator=f_e;var g3={},IB={},ny={};Object.defineProperty(ny,"__esModule",{value:!0});ny.PendingStreamsIndex=void 0;const H6=nr,k6=An;class xs{constructor(){this.indexedStreams=new Map,this.allStreams=[]}termToString(e){return e&&e.termType!=="Variable"?(0,H6.termToString)(e):xs.ID_VARIABLE}addPatternListener(e,r,n,a,s){this.allStreams.push(e);const o=`${this.termToString(r)}${xs.ID_SEPARATOR}${this.termToString(n)}${xs.ID_SEPARATOR}${this.termToString(a)}${xs.ID_SEPARATOR}${this.termToString(s)}`;let u=this.indexedStreams.get(o);u||(u=[],this.indexedStreams.set(o,u)),u.push(e)}getPendingStreamsForQuad(e){let r=[(0,k6.getTerms)(e).map(a=>(0,H6.termToString)(a))];for(let a=0;a{for(const n of this.pendingStreams.getPendingStreamsForQuad(r))this.ended||(n.push(r),n.emit("quad",r))})}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,r,n,a){const s=this.store.match(e,r,n,a);let o=s;if(!this.ended){const u=new p_e.PassThrough({objectMode:!0});this.pendingStreams.addPatternListener(u,e,r,n,a),o=s.pipe(u,{end:!1}),o._pipeSource=s}return o}getStore(){return this.store}}m3.StreamingStore=b_e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(ny,t),r(m3,t)})(IB);Object.defineProperty(g3,"__esModule",{value:!0});g3.StreamingStoreMetadata=void 0;const __e=ct,j1=Hi,g_e=IB;class m_e extends g_e.StreamingStore{constructor(e,r){super(e),this.started=!1,this.containedSources=new Set,this.runningIterators=new Set,this.baseMetadata={state:new j1.MetadataValidationState,cardinality:{type:"exact",value:0},canContainUndefs:!1},this.metadataAccumulator=r}import(e){return this.ended||super.import(e),e}hasRunningIterators(){return this.runningIterators.size>0}match(e,r,n,a){const s=super.match(e,r,n,a),o=new __e.ClosableTransformIterator(s,{autoStart:!1,onClose:()=>{this.runningIterators.delete(o)}});let u=this.getStore().countQuads(e,r,n,a);const c={state:new j1.MetadataValidationState,cardinality:{type:"estimate",value:u},canContainUndefs:!1};return o.setProperty("metadata",c),o.setProperty("lastCount",u),s.on("quad",()=>{o.setProperty("lastCount",++u),this.updateMetadataState(o,u)}),this.runningIterators.add(o),o}setBaseMetadata(e,r){if(this.baseMetadata={...e},this.baseMetadata.cardinality={type:"exact",value:0},r)for(const n of this.runningIterators){const a=n.getProperty("lastCount");this.updateMetadataState(n,a)}}updateMetadataState(e,r){const n={state:new j1.MetadataValidationState,cardinality:{type:"estimate",value:r},canContainUndefs:!1};this.metadataAccumulator(this.baseMetadata,n).then(a=>{a.state=new j1.MetadataValidationState;const s=e.getProperty("metadata");e.setProperty("metadata",a),s==null||s.state.invalidate()}).catch(()=>{})}}g3.StreamingStoreMetadata=m_e;Object.defineProperty(ry,"__esModule",{value:!0});ry.MediatedQuadSource=void 0;const v_e=rr,w_e=b3,S_e=g3;class _d{constructor(e,r,n,a,s,o){this.cacheSize=e,this.firstUrl=r,this.forceSourceType=n,this.maxIterators=a,this.aggregateStore=s,this.mediators=o}static nullifyVariables(e){return!e||e.termType==="Variable"?void 0:e}match(e,r,n,a,s){let o;if(this.aggregateStore){const c=s.get(v_e.KeysRdfResolveQuadPattern.hypermediaSourcesAggregatedStores);if(c&&(o=c.get(this.firstUrl),o||(o=new S_e.StreamingStoreMetadata(void 0,(l,d)=>u.accumulateMetadata(l,d)),c.set(this.firstUrl,o)),o.started))return o.match(_d.nullifyVariables(e),_d.nullifyVariables(r),_d.nullifyVariables(n),_d.nullifyVariables(a))}const u=new w_e.MediatedLinkedRdfSourcesAsyncRdfIterator(this.cacheSize,s,this.forceSourceType,e,r,n,a,this.firstUrl,this.maxIterators,o,this.mediators);return this.sourcesState?u.setSourcesState(this.sourcesState):(u.setSourcesState(),this.sourcesState=u.sourcesState),o&&(o.started=!0),u}}ry.MediatedQuadSource=_d;Object.defineProperty(y3,"__esModule",{value:!0});y3.ActorRdfResolveQuadPatternHypermedia=void 0;const Th=Tl,T_e=Pa,E_e=ry;class O_e extends Th.ActorRdfResolveQuadPatternSource{constructor(e){super(e),this.cache=this.cacheSize?new T_e.LRUCache({max:this.cacheSize}):void 0;const r=this.cache;r&&this.httpInvalidator.addInvalidateListener(({url:n})=>n?r.delete(n):r.clear()),e.mediatorMetadataAccumulate||(this.mediatorMetadataAccumulate={async mediate(n){return{metadata:{...n.accumulatedMetadata,...n.appendingMetadata}}}})}async test(e){if(!(0,Th.hasContextSingleSource)(e.context))throw new Error(`Actor ${this.name} can only resolve quad pattern queries against a single source.`);return!0}getSource(e,r){const n=(0,Th.getContextSource)(e),a=(0,Th.getContextSourceUrl)(n);let s;return this.cache&&this.cache.has(a)?s=this.cache.get(a):(s=new E_e.MediatedQuadSource(this.cacheSize,a,(0,Th.getDataSourceType)(n),this.maxIterators,this.aggregateStore,{mediatorMetadata:this.mediatorMetadata,mediatorMetadataExtract:this.mediatorMetadataExtract,mediatorMetadataAccumulate:this.mediatorMetadataAccumulate,mediatorDereferenceRdf:this.mediatorDereferenceRdf,mediatorRdfResolveHypermedia:this.mediatorRdfResolveHypermedia,mediatorRdfResolveHypermediaLinks:this.mediatorRdfResolveHypermediaLinks,mediatorRdfResolveHypermediaLinksQueue:this.mediatorRdfResolveHypermediaLinksQueue}),this.cache&&this.cache.set(a,s)),Promise.resolve(s)}}y3.ActorRdfResolveQuadPatternHypermedia=O_e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(y3,t),r(ry,t)})(xB);var lx={},v3={};Object.defineProperty(v3,"__esModule",{value:!0});v3.ActionObserverHttp=void 0;const A_e=et;let R_e=class extends A_e.ActionObserver{constructor(e){super(e),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener(()=>{this.requests=0})}onRun(e,r,n){this.requests++}};v3.ActionObserverHttp=R_e;var w3={};Object.defineProperty(w3,"__esModule",{value:!0});w3.ActorQueryResultSerializeSparqlJson=void 0;const x_e=ls,I_e=kt;class gd extends x_e.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}static bindingToJsonBindings(e){if(e.termType==="Literal"){const r=e,n={value:r.value,type:"literal"},{language:a}=r,{datatype:s}=r;return a?n["xml:lang"]=a:s&&s.value!=="http://www.w3.org/2001/XMLSchema#string"&&(n.datatype=s.value),n}return e.termType==="BlankNode"?{value:e.value,type:"bnode"}:e.termType==="Quad"?{value:{subject:gd.bindingToJsonBindings(e.subject),predicate:gd.bindingToJsonBindings(e.predicate),object:gd.bindingToJsonBindings(e.object)},type:"triple"}:{value:e.value,type:"uri"}}async testHandleChecked(e,r){if(!["bindings","boolean"].includes(e.type))throw new Error("This actor can only handle bindings streams or booleans.");return!0}async runHandle(e,r,n){const a=new I_e.Readable;a._read=()=>{};const s={};if(e.type==="bindings"){const u=await e.metadata();u.variables.length>0&&(s.vars=u.variables.map(c=>c.value))}a.push(`{"head": ${JSON.stringify(s)}, `);let o=!0;if(e.type==="bindings"){const u=e.bindingsStream;u.on("error",c=>{a.emit("error",c)}),u.on("data",c=>{o?a.push(`"results": { "bindings": [ `):a.push(`, `);const l=Object.fromEntries([...c].map(([d,f])=>[d.value,gd.bindingToJsonBindings(f)]));a.push(JSON.stringify(l)),o=!1}),u.on("end",()=>{o&&a.push(`"results": { "bindings": [ @@ -182,7 +182,7 @@ ${f}`);return this.handleDereferenceErrors(e,h,a.headers,u)}}const c=(d=Kbe.exec `),a.push(null)}catch(u){a.once("newListener",()=>a.emit("error",u))}return{data:a}}}w3.ActorQueryResultSerializeSparqlJson=gd;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(v3,t),r(w3,t)})(lx);var dx={},S3={};Object.defineProperty(S3,"__esModule",{value:!0});S3.ActionObserverHttp=void 0;const P_e=et;class D_e extends P_e.ActionObserver{constructor(e){super(e),this.requests=0,this.bus.subscribeObserver(this),this.httpInvalidator.addInvalidateListener(()=>{this.requests=0})}onRun(e,r,n){this.requests++}}S3.ActionObserverHttp=D_e;var T3={};Object.defineProperty(T3,"__esModule",{value:!0});T3.ActorQueryResultSerializeStats=void 0;const N_e=ls,C_e=kt,j_e=zo();class M_e extends N_e.ActorQueryResultSerializeFixedMediaTypes{constructor(e){super(e)}async testHandleChecked(e,r){if(!["bindings","quads"].includes(e.type))throw new Error("This actor can only handle bindings streams or quad streams.");return!0}pushHeader(e){const r=["Result","Delay (ms)","HTTP requests"].join(",");e.push(`${r} `)}pushStat(e,r,n){const a=[n,this.delay(r),this.httpObserver.requests].join(",");e.push(`${a} `)}pushFooter(e,r){const n=["TOTAL",this.delay(r),this.httpObserver.requests].join(",");e.push(`${n} -`),e.push(null)}async runHandle(e,r,n){const a=new C_e.Readable;a._read=()=>{};const s=e.type==="bindings"?e.bindingsStream:e.quadStream,o=this.now();let u=1;return this.pushHeader(a),s.on("error",c=>a.emit("error",c)),s.on("data",()=>this.pushStat(a,o,u++)),s.on("end",()=>this.pushFooter(a,o)),{data:a}}now(){if(typeof performance>"u"){const e=j_e.hrtime();return e[0]*1e3+e[1]/1e6}return performance.now()}delay(e){return this.now()-e}}T3.ActorQueryResultSerializeStats=M_e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(S3,t),r(T3,t)})(dx);var PB={},E3={};Object.defineProperty(E3,"__esModule",{value:!0});E3.ActorRdfResolveQuadPatternStringSource=void 0;const WT=Tl,F_e=rr,L_e=Pa,B_e=P0,$_e=kt;class O3 extends WT.ActorRdfResolveQuadPattern{constructor(e){super(e),this.cache=this.cacheSize?new L_e.LRUCache({max:this.cacheSize}):void 0}async test(e){const r=(0,WT.getContextSource)(e.context);if(!r)throw new Error(`Actor ${this.name} can only resolve quad pattern queries against a source.`);if(!this.isStringSource(r.valueOf()))throw new Error(`Actor ${this.name} can only resolve stringSource quad pattern`);return!0}run(e){var a;const r=(0,WT.getContextSource)(e.context);let n=(a=this.cache)==null?void 0:a.get(r);return n||(n=this.getRdfSource(e.context,r),this.cache&&this.cache.set(r,n)),n.then(s=>this.mediatorRdfResolveQuadPattern.mediate({pattern:e.pattern,context:e.context.set(F_e.KeysRdfResolveQuadPattern.source,{value:s,type:"rdfjsSource"})}))}async getRdfSource(e,r){const n=new $_e.Readable({objectMode:!0});n._read=()=>{},n.push(r.value),n.push(null);const a={context:e,handle:{metadata:{baseIRI:r.baseIRI},data:n,context:e},handleMediaType:r.mediaType},s=await this.mediatorRdfParse.mediate(a);return await(0,B_e.storeStream)(s.handle.data)}isStringSource(e){return"type"in e?e.type===O3.sourceType:typeof e.value!="string"?!1:"mediaType"in e}}E3.ActorRdfResolveQuadPatternStringSource=O3;O3.sourceType="stringSource";(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(E3,t)})(PB);const U_e=new Sj.LoggerVoid,q_e=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-init/^2.0.0/components/ActorInit.jsonld#ActorInit_default_bus"}),DB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-context-preprocess/^2.0.0/components/ActorContextPreprocess.jsonld#ActorContextPreprocess_default_bus"}),NB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-hash-bindings/^2.0.0/components/ActorHashBindings.jsonld#ActorHashBindings_default_bus"}),A3=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-optimize-query-operation/^2.0.0/components/ActorOptimizeQueryOperation.jsonld#ActorOptimizeQueryOperation_default_bus"}),fx=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-parse/^2.0.0/components/ActorQueryParse.jsonld#ActorQueryParse_default_bus"}),ha=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-result-serialize/^2.0.0/components/ActorQueryResultSerialize.jsonld#ActorQueryResultSerialize_default_bus"}),hx=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^2.0.0/components/ActorDereference.jsonld#ActorDereference_default_bus"}),CB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference-rdf/^2.0.0/components/ActorDereferenceRdf.jsonld#ActorDereferenceRdf_default_bus"}),jB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-entries-sort/^2.0.0/components/ActorRdfJoinEntriesSort.jsonld#ActorRdfJoinEntriesSort_default_bus"}),MB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-selectivity/^2.0.0/components/ActorRdfJoinSelectivity.jsonld#ActorRdfJoinSelectivity_default_bus"}),px=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata/^2.0.0/components/ActorRdfMetadata.jsonld#ActorRdfMetadata_default_bus"}),ny=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-accumulate/^2.0.0/components/ActorRdfMetadataAccumulate.jsonld#ActorRdfMetadataAccumulate_default_bus"}),Zo=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-extract/^2.0.0/components/ActorRdfMetadataExtract.jsonld#ActorRdfMetadataExtract_default_bus"}),sc=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse/^2.0.0/components/ActorRdfParse.jsonld#ActorRdfParse_default_bus"}),R3=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse-html/^2.0.0/components/ActorRdfParseHtml.jsonld#ActorRdfParseHtml_default_bus"}),x3=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia/^2.0.0/components/ActorRdfResolveHypermedia.jsonld#ActorRdfResolveHypermedia_default_bus"}),FB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links/^2.0.0/components/ActorRdfResolveHypermediaLinks.jsonld#ActorRdfResolveHypermediaLinks_default_bus"}),LB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links-queue/^2.0.0/components/ActorRdfResolveHypermediaLinksQueue.jsonld#ActorRdfResolveHypermediaLinksQueue_default_bus"}),Mf=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-serialize/^2.0.0/components/ActorRdfSerialize.jsonld#ActorRdfSerialize_default_bus"}),I3=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-hypermedia/^2.0.0/components/ActorRdfUpdateHypermedia.jsonld#ActorRdfUpdateHypermedia_default_bus"}),yx=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-quads/^2.0.0/components/ActorRdfUpdateQuads.jsonld#ActorRdfUpdateQuads_default_bus"}),iy=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^2.0.0/components/ActorHttp.jsonld#ActorHttp_default_bus"}),BB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^2.0.0/components/ActorHttp.jsonld#ActorHttp_fallback_bus"}),At=new ct.BusQueryOperation({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^2.0.0/components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus"}),pa=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^2.0.0/components/ActorRdfJoin.jsonld#ActorRdfJoin_default_bus"}),ay=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-quad-pattern/^2.0.0/components/ActorRdfResolveQuadPattern.jsonld#ActorRdfResolveQuadPattern_default_bus"}),sy=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http-invalidate/^2.0.0/components/ActorHttpInvalidate.jsonld#ActorHttpInvalidate_default_bus"});new Tj.ActorContextPreprocessSourceToDestination({name:"urn:comunica:default:context-preprocess/actors#source-to-destination",bus:DB});const V_e=new jA.MediatorCombinePipeline({name:"urn:comunica:default:context-preprocess/mediators#main",bus:DB});new Oj.ActorHashBindingsSha1({name:"urn:comunica:default:hash-bindings/actors#sha1",bus:NB});const bx=new Ri.MediatorRace({name:"urn:comunica:default:hash-bindings/mediators#main",bus:NB});new Rj.ActorOptimizeQueryOperationJoinBgp({name:"urn:comunica:default:optimize-query-operation/actors#join-bgp",bus:A3});new xj.ActorOptimizeQueryOperationBgpToJoin({name:"urn:comunica:default:optimize-query-operation/actors#bgp-to-join",bus:A3});new Ij.ActorOptimizeQueryOperationJoinConnected({name:"urn:comunica:default:optimize-query-operation/actors#join-connected",bus:A3});const H_e=new jA.MediatorCombinePipeline({name:"urn:comunica:default:optimize-query-operation/mediators#main",bus:A3});new Pj.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:fx});new Dj.ActorQueryParseGraphql({name:"urn:comunica:default:query-parse/actors#graphql",bus:fx});const k_e=new Ri.MediatorRace({name:"urn:comunica:default:query-parse/mediators#main",bus:fx});new e9.ActorQueryResultSerializeJson({mediaTypePriorities:{"application/json":1},mediaTypeFormats:{"application/json":"https://comunica.linkeddatafragments.org/#results_JSON"},name:"urn:comunica:default:query-result-serialize/actors#json",bus:ha});new z9.ActorQueryResultSerializeSimple({mediaTypePriorities:{simple:.9},mediaTypeFormats:{simple:"https://comunica.linkeddatafragments.org/#results_simple"},name:"urn:comunica:default:query-result-serialize/actors#simple",bus:ha});new W9.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:ha});new X9.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:ha});new tM.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:ha});new rM.ActorQueryResultSerializeTable({columnWidth:50,mediaTypePriorities:{table:.6},mediaTypeFormats:{table:"https://comunica.linkeddatafragments.org/#results_table"},name:"urn:comunica:default:query-result-serialize/actors#table",bus:ha});new iM.ActorQueryResultSerializeTree({mediaTypePriorities:{tree:.5},mediaTypeFormats:{tree:"https://comunica.linkeddatafragments.org/#results_tree"},name:"urn:comunica:default:query-result-serialize/actors#tree",bus:ha});const Q_e=new Ri.MediatorRace({name:"urn:comunica:default:query-result-serialize/mediators#serialize",bus:ha}),G_e=new tc.MediatorCombineUnion({field:"mediaTypes",name:"urn:comunica:default:query-result-serialize/mediators#mediaType",bus:ha}),z_e=new tc.MediatorCombineUnion({field:"mediaTypeFormats",name:"urn:comunica:default:query-result-serialize/mediators#mediaTypeFormat",bus:ha}),W_e=new _M.ActorDereferenceFallback({name:"urn:comunica:default:dereference/actors#fallback",bus:hx}),X_e=new Ri.MediatorRace({name:"urn:comunica:default:dereference/mediators#main",bus:hx}),_x=new Ri.MediatorRace({name:"urn:comunica:default:dereference-rdf/mediators#main",bus:CB});new wM.ActorRdfJoinEntriesSortCardinality({name:"urn:comunica:default:rdf-join-entries-sort/actors#cardinality",bus:jB});const $B=new Ri.MediatorRace({name:"urn:comunica:default:rdf-join-entries-sort/mediators#main",bus:jB});new TM.ActorRdfJoinSelectivityVariableCounting({name:"urn:comunica:default:rdf-join-selectivity/actors#variable-counting",bus:MB});const Da=new If.MediatorNumber({field:"accuracy",type:"max",ignoreErrors:!0,name:"urn:comunica:default:rdf-join-selectivity/mediators#main",bus:MB});new OM.ActorRdfMetadataPrimaryTopic({metadataToData:!1,dataToMetadataOnInvalidMetadataGraph:!0,name:"urn:comunica:default:rdf-metadata/actors#primary-topic",bus:px});new AM.ActorRdfMetadataAll({name:"urn:comunica:default:rdf-metadata/actors#all",bus:px});const gx=new Ri.MediatorRace({name:"urn:comunica:default:rdf-metadata/mediators#main",bus:px});new RM.ActorRdfMetadataAccumulateCanContainUndefs({name:"urn:comunica:default:rdf-metadata-accumulate/actors#cancontainundefs",bus:ny});new xM.ActorRdfMetadataAccumulateCardinality({name:"urn:comunica:default:rdf-metadata-accumulate/actors#cardinality",bus:ny});new IM.ActorRdfMetadataAccumulatePageSize({name:"urn:comunica:default:rdf-metadata-accumulate/actors#pagesize",bus:ny});new PM.ActorRdfMetadataAccumulateRequestTime({name:"urn:comunica:default:rdf-metadata-accumulate/actors#requesttime",bus:ny});const UB=new tc.MediatorCombineUnion({field:"metadata",name:"urn:comunica:default:rdf-metadata-accumulate/mediators#main",bus:ny});new DM.ActorRdfMetadataExtractHydraControls({name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-controls",bus:Zo});new CM.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:Zo});new jM.ActorRdfMetadataExtractHydraPagesize({predicates:["http://www.w3.org/ns/hydra/core#itemsPerPage"],name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-pagesize",bus:Zo});new MM.ActorRdfMetadataExtractRequestTime({name:"urn:comunica:default:rdf-metadata-extract/actors#request-time",bus:Zo});new FM.ActorRdfMetadataExtractAllowHttpMethods({name:"urn:comunica:default:rdf-metadata-extract/actors#allow-http-methods",bus:Zo});new LM.ActorRdfMetadataExtractPutAccepted({name:"urn:comunica:default:rdf-metadata-extract/actors#put-accepted",bus:Zo});new BM.ActorRdfMetadataExtractPatchSparqlUpdate({name:"urn:comunica:default:rdf-metadata-extract/actors#patch-sparql-update",bus:Zo});new $M.ActorRdfMetadataExtractSparqlService({inferHttpsEndpoint:!0,name:"urn:comunica:default:rdf-metadata-extract/actors#sparql-service",bus:Zo});const mx=new tc.MediatorCombineUnion({field:"metadata",name:"urn:comunica:default:rdf-metadata-extract/mediators#main",bus:Zo});new UM.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:sc});new zM.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:sc});new aF.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:sc});new FF.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:sc});const vx=new Ri.MediatorRace({name:"urn:comunica:default:rdf-parse/mediators#parse",bus:sc}),qB=new tc.MediatorCombineUnion({field:"mediaTypes",name:"urn:comunica:default:rdf-parse/mediators#mediaType",bus:sc});new $F.ActorRdfParseHtml({busRdfParseHtml:R3,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:sc});new qF.ActorRdfParseHtmlMicrodata({name:"urn:comunica:default:rdf-parse-html/actors#microdata",bus:R3});new WF.ActorRdfParseHtmlRdfa({name:"urn:comunica:default:rdf-parse-html/actors#rdfa",bus:R3});new XF.ActorRdfResolveHypermediaNone({name:"urn:comunica:default:rdf-resolve-hypermedia/actors#none",bus:x3});const K_e=new If.MediatorNumber({field:"filterFactor",type:"max",ignoreErrors:!0,name:"urn:comunica:default:rdf-resolve-hypermedia/mediators#main",bus:x3});new s7.ActorRdfResolveHypermediaLinksNext({name:"urn:comunica:default:rdf-resolve-hypermedia-links/actors#next",bus:FB});const J_e=new Ri.MediatorRace({name:"urn:comunica:default:rdf-resolve-hypermedia-links/mediators#main",bus:FB});new u7.ActorRdfResolveHypermediaLinksQueueFifo({name:"urn:comunica:default:rdf-resolve-hypermedia-links-queue/actors#fifo",bus:LB});const Y_e=new Ri.MediatorRace({name:"urn:comunica:default:rdf-resolve-hypermedia-links-queue/mediators#main",bus:LB});new d7.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:Mf});new f7.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:Mf});new p7.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:Mf});const VB=new Ri.MediatorRace({name:"urn:comunica:default:rdf-serialize/mediators#serialize",bus:Mf}),HB=new tc.MediatorCombineUnion({field:"mediaTypes",name:"urn:comunica:default:rdf-serialize/mediators#mediaType",bus:Mf}),Z_e=new tc.MediatorCombineUnion({field:"mediaTypeFormats",name:"urn:comunica:default:rdf-serialize/mediators#mediaTypeFormat",bus:Mf}),ege=new Ri.MediatorRace({name:"urn:comunica:default:rdf-update-hypermedia/mediators#main",bus:I3});new g7.ActorRdfUpdateQuadsRdfJsStore({name:"urn:comunica:default:rdf-update-quads/actors#rdfjs-store",bus:yx});const oy=new Ri.MediatorRace({name:"urn:comunica:default:rdf-update-quads/mediators#main",bus:yx}),tge=new M7.ActorHttpFetch({agentOptions:{keepAlive:!0,maxSockets:5},name:"urn:comunica:default:http/actors#fetch",bus:iy}),rge=new If.MediatorNumber({field:"time",type:"min",ignoreErrors:!0,name:"urn:comunica:default:http/mediators#no-fallback",bus:iy}),oc=new If.MediatorNumber({field:"time",type:"min",ignoreErrors:!0,name:"urn:comunica:default:http/mediators#main",bus:BB});new F7.ActorQueryOperationValues({name:"urn:comunica:default:query-operation/actors#values",bus:At});const It=new If.MediatorNumber({field:"httpRequests",type:"min",ignoreErrors:!0,name:"urn:comunica:default:query-operation/mediators#main",bus:At}),uy=new L7.MediatorJoinCoefficientsFixed({cpuWeight:1,memoryWeight:1,timeWeight:10,ioWeight:100,name:"urn:comunica:default:rdf-join/mediators#main",bus:pa}),wx=new Ri.MediatorRace({name:"urn:comunica:default:rdf-resolve-quad-pattern/mediators#main",bus:ay}),nge=new B7.MediatorAll({name:"urn:comunica:default:http-invalidate/mediators#main",bus:sy}),ige=new q0.ActorHttpInvalidateListenable({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-quads-hypermedia/^2.0.0/components/ActorRdfUpdateQuadsHypermedia.jsonld#IActorRdfUpdateQuadsHypermediaArgs_default_invalidator",bus:sy}),age=new q0.ActorHttpInvalidateListenable({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-resolve-quad-pattern-hypermedia/^2.0.0/components/ActorRdfResolveQuadPatternHypermedia.jsonld#IActorRdfResolveQuadPatternHypermediaArgs_default_invalidator",bus:sy}),sge=new q0.ActorHttpInvalidateListenable({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^2.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator",bus:sy}),oge=new q0.ActorHttpInvalidateListenable({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^2.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator",bus:sy});new $7.ActorRdfJoinNone({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-none",bus:pa});new U7.ActorRdfJoinSingle({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-single",bus:pa});new q7.ActorRdfJoinMultiEmpty({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-multi-empty",bus:pa});new V7.ActorRdfJoinHash({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-hash",bus:pa});new k7.ActorRdfJoinSymmetricHash({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-symmetric-hash",bus:pa});new Q7.ActorRdfJoinNestedLoop({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-nested-loop",bus:pa});new G7.ActorRdfJoinMinusHash({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#minus-hash",bus:pa});new z7.ActorRdfJoinMinusHashUndef({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#minus-hash-undef",bus:pa});new W7.ActorRdfJoinOptionalNestedLoop({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#optional-nested-loop",bus:pa});new X7.ActorRdfResolveHypermediaQpf({mediatorMetadata:gx,mediatorMetadataExtract:mx,mediatorDereferenceRdf:_x,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:rdf-resolve-hypermedia/actors#qpf",bus:x3});new J7.ActorDereferenceRdfParse({mediatorDereference:X_e,mediatorParse:vx,mediatorParseMediatypes:qB,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:CB});new Z7.ActorRdfParseHtmlScript({mediatorRdfParseMediatypes:qB,mediatorRdfParseHandle:vx,name:"urn:comunica:default:rdf-parse-html/actors#script",bus:R3});new eL.ActorQueryResultSerializeRdf({mediatorRdfSerialize:VB,mediatorMediaTypeCombiner:HB,mediatorMediaTypeFormatCombiner:Z_e,name:"urn:comunica:default:query-result-serialize/actors#rdf",bus:ha});new tL.ActorHttpWayback({mediatorHttp:rge,name:"urn:comunica:default:http/actors#wayback",bus:BB});new rL.ActorRdfParseJsonLd({mediatorHttp:oc,mediaTypePriorities:{"application/json":.5,"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:sc});new uL.ActorRdfResolveHypermediaSparql({mediatorHttp:oc,checkUrlSuffix:!0,forceHttpGet:!1,cacheSize:1024,name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#sparql",bus:x3});new pL.ActorRdfUpdateHypermediaPatchSparqlUpdate({mediatorHttp:oc,name:"urn:comunica:default:rdf-update-hypermedia/actors#patch-sparql-update",bus:I3});new yL.ActorRdfUpdateHypermediaPutLdp({mediatorHttp:oc,mediatorRdfSerializeMediatypes:HB,mediatorRdfSerialize:VB,name:"urn:comunica:default:rdf-update-hypermedia/actors#put-ldp",bus:I3});new bL.ActorRdfUpdateHypermediaSparql({mediatorHttp:oc,checkUrlSuffixSparql:!0,checkUrlSuffixUpdate:!0,name:"urn:comunica:default:rdf-update-hypermedia/actors#sparql",bus:I3});new _L.ActorQueryOperationSparqlEndpoint({mediatorHttp:oc,checkUrlSuffixSparql:!0,checkUrlSuffixUpdate:!0,forceHttpGet:!1,name:"urn:comunica:default:query-operation/actors#sparql-endpoint",bus:At});new gL.ActorQueryOperationAsk({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#ask",bus:At});new mL.ActorQueryOperationBgpJoin({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#bgp",bus:At});new WR.ActorQueryOperationConstruct({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#construct",bus:At});new vL.ActorQueryOperationDescribeSubject({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#describe",bus:At});new wL.ActorQueryOperationDistinctHash({mediatorHashBindings:bx,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#distinct",bus:At});new SL.ActorQueryOperationFilterSparqlee({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#filter",bus:At});new GL.ActorQueryOperationFromQuad({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#from",bus:At});new zL.ActorQueryOperationExtend({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#extend",bus:At});new WL.ActorQueryOperationGroup({mediatorHashBindings:bx,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#group",bus:At});new XL.ActorQueryOperationNop({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#nop",bus:At});new KL.ActorQueryOperationOrderBySparqlee({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#orderby",bus:At});new JL.ActorQueryOperationProject({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#project",bus:At});new YL.ActorQueryOperationReducedHash({mediatorHashBindings:bx,cacheSize:100,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#reduced",bus:At});new ZL.ActorQueryOperationService({forceSparqlEndpoint:!1,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#service",bus:At});new eB.ActorQueryOperationSlice({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#slice",bus:At});new V2.ActorQueryOperationUnion({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#union",bus:At});new tB.ActorQueryOperationPathAlt({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-alt",bus:At});new rB.ActorQueryOperationPathInv({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-inv",bus:At});new nB.ActorQueryOperationPathLink({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-link",bus:At});new iB.ActorQueryOperationPathNps({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-nps",bus:At});new aB.ActorQueryOperationPathOneOrMore({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-one-or-more",bus:At});new sB.ActorQueryOperationPathZeroOrMore({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-zero-or-more",bus:At});new oB.ActorQueryOperationPathZeroOrOne({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-zero-or-one",bus:At});new uB.ActorQueryOperationClear({mediatorUpdateQuads:oy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-clear",bus:At});new cB.ActorQueryOperationUpdateCompositeUpdate({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-composite",bus:At});new lB.ActorQueryOperationAddRewrite({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-add",bus:At});new dB.ActorQueryOperationCopyRewrite({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-copy",bus:At});new fB.ActorQueryOperationCreate({mediatorUpdateQuads:oy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-create",bus:At});new hB.ActorQueryOperationUpdateDeleteInsert({mediatorUpdateQuads:oy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-delete-insert",bus:At});new pB.ActorQueryOperationDrop({mediatorUpdateQuads:oy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-drop",bus:At});new yB.ActorQueryOperationLoad({mediatorUpdateQuads:oy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-load",bus:At});new bB.ActorQueryOperationMoveRewrite({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-move",bus:At});new cx.ActorRdfJoinMultiBind({bindOrder:"depth-first",selectivityModifier:1e-4,mediatorJoinEntriesSort:$B,mediatorQueryOperation:It,mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-multi-bind",bus:pa});new _B.ActorRdfJoinOptionalBind({bindOrder:"depth-first",selectivityModifier:1e-4,mediatorQueryOperation:It,mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#optional-bind",bus:pa});new gB.ActorQueryOperationJoin({mediatorJoin:uy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#join",bus:At});new mB.ActorQueryOperationLeftJoin({mediatorJoin:uy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#leftjoin",bus:At});new vB.ActorQueryOperationMinus({mediatorJoin:uy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#minus",bus:At});new wB.ActorQueryOperationPathSeq({mediatorJoin:uy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-seq",bus:At});new SB.ActorRdfJoinMultiSmallest({mediatorJoinEntriesSort:$B,mediatorJoin:uy,mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-multi-smallest",bus:pa});new TB.ActorQueryOperationQuadpattern({mediatorResolveQuadPattern:wx,unionDefaultGraph:!1,name:"urn:comunica:default:query-operation/actors#quadpattern",bus:At});new VR.ActorRdfResolveQuadPatternFederated({mediatorResolveQuadPattern:wx,mediatorRdfMetadataAccumulate:UB,skipEmptyPatterns:!1,name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#federated",bus:ay});new EB.ActorDereferenceHttp({mediatorHttp:oc,maxAcceptHeaderLength:1024,maxAcceptHeaderLengthBrowser:128,name:"urn:comunica:default:dereference/actors#http",bus:hx,beforeActors:[W_e]});new AB.ActorHttpProxy({mediatorHttp:oc,name:"urn:comunica:default:http/actors#proxy",bus:iy,beforeActors:[tge]});const uge=new UO.ActorInitQuery({mediatorOptimizeQueryOperation:H_e,mediatorQueryOperation:It,mediatorQueryParse:k_e,mediatorQueryResultSerialize:Q_e,mediatorQueryResultSerializeMediaTypeCombiner:G_e,mediatorQueryResultSerializeMediaTypeFormatCombiner:z_e,mediatorContextPreprocess:V_e,mediatorHttpInvalidate:nge,logger:U_e,defaultQueryInputFormat:"sparql",allowNoSources:!1,contextKeyShortcuts:{baseIRI:"@comunica/actor-init-query:baseIRI",datetime:"@comunica/actor-http-memento:datetime",destination:"@comunica/bus-rdf-update-quads:destination",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",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",source:"@comunica/bus-rdf-resolve-quad-pattern:source",sources:"@comunica/bus-rdf-resolve-quad-pattern:sources",unionDefaultGraph:"@comunica/bus-query-operation:unionDefaultGraph"},name:"urn:comunica:default:init/actors#query",bus:q_e});new RB.ActorRdfUpdateQuadsHypermedia({cacheSize:100,httpInvalidator:ige,mediatorDereferenceRdf:_x,mediatorMetadata:gx,mediatorMetadataExtract:mx,mediatorRdfUpdateHypermedia:ege,name:"urn:comunica:default:rdf-update-quads/actors#hypermedia",bus:yx});const kB=new xB.ActorRdfResolveQuadPatternHypermedia({cacheSize:100,httpInvalidator:age,maxIterators:64,aggregateStore:!1,mediatorDereferenceRdf:_x,mediatorMetadata:gx,mediatorMetadataExtract:mx,mediatorMetadataAccumulate:UB,mediatorRdfResolveHypermedia:K_e,mediatorRdfResolveHypermediaLinks:J_e,mediatorRdfResolveHypermediaLinksQueue:Y_e,name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#hypermedia",bus:ay}),cge=new lx.ActionObserverHttp({httpInvalidator:sge,name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^2.0.0/components/ActorQueryResultSerializeSparqlJson.jsonld#ActorQueryResultSerializeSparqlJson_default_observer",bus:iy}),lge=new dx.ActionObserverHttp({httpInvalidator:oge,name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^2.0.0/components/ActorQueryResultSerializeStats.jsonld#ActorQueryResultSerializeStats_default_observer",bus:iy});new lx.ActorQueryResultSerializeSparqlJson({emitMetadata:!0,httpObserver:cge,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:ha});new dx.ActorQueryResultSerializeStats({httpObserver:lge,mediaTypePriorities:{stats:.5},mediaTypeFormats:{stats:"https://comunica.linkeddatafragments.org/#results_stats"},name:"urn:comunica:default:query-result-serialize/actors#stats",bus:ha});new IR.ActorRdfResolveQuadPatternRdfJsSource({name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#rdfjs-source",bus:ay,beforeActors:[kB]});new PB.ActorRdfResolveQuadPatternStringSource({cacheSize:100,mediatorRdfParse:vx,mediatorRdfResolveQuadPattern:wx,name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#string-source",bus:ay,beforeActors:[kB]});var dge=uge;Object.defineProperty(t_,"__esModule",{value:!0});t_.QueryEngine=void 0;const fge=UO,hge=dge;class pge extends fge.QueryEngineBase{constructor(e=hge){super(e)}}t_.QueryEngine=pge;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(t_,t)})(l5);var eu=globalThis&&globalThis.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})};const Xu=new l5.QueryEngine;function yge(t){var e;return eu(this,void 0,void 0,function*(){const r=yield bge(t),a=(yield _ge(r))[0],s=yield gge((e=a.viewDescription)!==null&&e!==void 0?e:a.view);if(s){const o=yield mge(a.view);return{ldes:r,view:a,relations:o,LDESinLDP:s}}else throw new Error("Only LDES in LDP is supported at the moment")})}function bge(t){var e,r;return eu(this,void 0,void 0,function*(){const a=(e=(yield fetch(t,{method:"HEAD"})).headers.get("Link"))===null||e===void 0?void 0:e.split(",").map(o=>{const u=o.trim().split(";"),c=u[0].slice(1,-1),l=u[1].trim().split("=")[1].slice(1,-1);return{url:c,rel:l}}),s=(r=a==null?void 0:a.find(o=>o.rel==="https://w3id.org/ldes#EventStream"))===null||r===void 0?void 0:r.url;if(!s)throw new Error("No LDES found");return console.log("Found LDES: "+s),s})}function _ge(t){return eu(this,void 0,void 0,function*(){const e=` +`),e.push(null)}async runHandle(e,r,n){const a=new C_e.Readable;a._read=()=>{};const s=e.type==="bindings"?e.bindingsStream:e.quadStream,o=this.now();let u=1;return this.pushHeader(a),s.on("error",c=>a.emit("error",c)),s.on("data",()=>this.pushStat(a,o,u++)),s.on("end",()=>this.pushFooter(a,o)),{data:a}}now(){if(typeof performance>"u"){const e=j_e.hrtime();return e[0]*1e3+e[1]/1e6}return performance.now()}delay(e){return this.now()-e}}T3.ActorQueryResultSerializeStats=M_e;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(S3,t),r(T3,t)})(dx);var PB={},E3={};Object.defineProperty(E3,"__esModule",{value:!0});E3.ActorRdfResolveQuadPatternStringSource=void 0;const WT=Tl,F_e=rr,L_e=Pa,B_e=D0,$_e=kt;class O3 extends WT.ActorRdfResolveQuadPattern{constructor(e){super(e),this.cache=this.cacheSize?new L_e.LRUCache({max:this.cacheSize}):void 0}async test(e){const r=(0,WT.getContextSource)(e.context);if(!r)throw new Error(`Actor ${this.name} can only resolve quad pattern queries against a source.`);if(!this.isStringSource(r.valueOf()))throw new Error(`Actor ${this.name} can only resolve stringSource quad pattern`);return!0}run(e){var a;const r=(0,WT.getContextSource)(e.context);let n=(a=this.cache)==null?void 0:a.get(r);return n||(n=this.getRdfSource(e.context,r),this.cache&&this.cache.set(r,n)),n.then(s=>this.mediatorRdfResolveQuadPattern.mediate({pattern:e.pattern,context:e.context.set(F_e.KeysRdfResolveQuadPattern.source,{value:s,type:"rdfjsSource"})}))}async getRdfSource(e,r){const n=new $_e.Readable({objectMode:!0});n._read=()=>{},n.push(r.value),n.push(null);const a={context:e,handle:{metadata:{baseIRI:r.baseIRI},data:n,context:e},handleMediaType:r.mediaType},s=await this.mediatorRdfParse.mediate(a);return await(0,B_e.storeStream)(s.handle.data)}isStringSource(e){return"type"in e?e.type===O3.sourceType:typeof e.value!="string"?!1:"mediaType"in e}}E3.ActorRdfResolveQuadPatternStringSource=O3;O3.sourceType="stringSource";(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(E3,t)})(PB);const U_e=new Sj.LoggerVoid,q_e=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-init/^2.0.0/components/ActorInit.jsonld#ActorInit_default_bus"}),DB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-context-preprocess/^2.0.0/components/ActorContextPreprocess.jsonld#ActorContextPreprocess_default_bus"}),NB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-hash-bindings/^2.0.0/components/ActorHashBindings.jsonld#ActorHashBindings_default_bus"}),A3=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-optimize-query-operation/^2.0.0/components/ActorOptimizeQueryOperation.jsonld#ActorOptimizeQueryOperation_default_bus"}),fx=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-parse/^2.0.0/components/ActorQueryParse.jsonld#ActorQueryParse_default_bus"}),ha=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-result-serialize/^2.0.0/components/ActorQueryResultSerialize.jsonld#ActorQueryResultSerialize_default_bus"}),hx=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference/^2.0.0/components/ActorDereference.jsonld#ActorDereference_default_bus"}),CB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-dereference-rdf/^2.0.0/components/ActorDereferenceRdf.jsonld#ActorDereferenceRdf_default_bus"}),jB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-entries-sort/^2.0.0/components/ActorRdfJoinEntriesSort.jsonld#ActorRdfJoinEntriesSort_default_bus"}),MB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join-selectivity/^2.0.0/components/ActorRdfJoinSelectivity.jsonld#ActorRdfJoinSelectivity_default_bus"}),px=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata/^2.0.0/components/ActorRdfMetadata.jsonld#ActorRdfMetadata_default_bus"}),iy=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-accumulate/^2.0.0/components/ActorRdfMetadataAccumulate.jsonld#ActorRdfMetadataAccumulate_default_bus"}),Zo=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-metadata-extract/^2.0.0/components/ActorRdfMetadataExtract.jsonld#ActorRdfMetadataExtract_default_bus"}),sc=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse/^2.0.0/components/ActorRdfParse.jsonld#ActorRdfParse_default_bus"}),R3=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-parse-html/^2.0.0/components/ActorRdfParseHtml.jsonld#ActorRdfParseHtml_default_bus"}),x3=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia/^2.0.0/components/ActorRdfResolveHypermedia.jsonld#ActorRdfResolveHypermedia_default_bus"}),FB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links/^2.0.0/components/ActorRdfResolveHypermediaLinks.jsonld#ActorRdfResolveHypermediaLinks_default_bus"}),LB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-hypermedia-links-queue/^2.0.0/components/ActorRdfResolveHypermediaLinksQueue.jsonld#ActorRdfResolveHypermediaLinksQueue_default_bus"}),Mf=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-serialize/^2.0.0/components/ActorRdfSerialize.jsonld#ActorRdfSerialize_default_bus"}),I3=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-hypermedia/^2.0.0/components/ActorRdfUpdateHypermedia.jsonld#ActorRdfUpdateHypermedia_default_bus"}),yx=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-update-quads/^2.0.0/components/ActorRdfUpdateQuads.jsonld#ActorRdfUpdateQuads_default_bus"}),ay=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^2.0.0/components/ActorHttp.jsonld#ActorHttp_default_bus"}),BB=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http/^2.0.0/components/ActorHttp.jsonld#ActorHttp_fallback_bus"}),At=new ct.BusQueryOperation({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-query-operation/^2.0.0/components/ActorQueryOperation.jsonld#ActorQueryOperation_default_bus"}),pa=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-join/^2.0.0/components/ActorRdfJoin.jsonld#ActorRdfJoin_default_bus"}),sy=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-rdf-resolve-quad-pattern/^2.0.0/components/ActorRdfResolveQuadPattern.jsonld#ActorRdfResolveQuadPattern_default_bus"}),oy=new et.Bus({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/bus-http-invalidate/^2.0.0/components/ActorHttpInvalidate.jsonld#ActorHttpInvalidate_default_bus"});new Tj.ActorContextPreprocessSourceToDestination({name:"urn:comunica:default:context-preprocess/actors#source-to-destination",bus:DB});const V_e=new jA.MediatorCombinePipeline({name:"urn:comunica:default:context-preprocess/mediators#main",bus:DB});new Oj.ActorHashBindingsSha1({name:"urn:comunica:default:hash-bindings/actors#sha1",bus:NB});const bx=new Ri.MediatorRace({name:"urn:comunica:default:hash-bindings/mediators#main",bus:NB});new Rj.ActorOptimizeQueryOperationJoinBgp({name:"urn:comunica:default:optimize-query-operation/actors#join-bgp",bus:A3});new xj.ActorOptimizeQueryOperationBgpToJoin({name:"urn:comunica:default:optimize-query-operation/actors#bgp-to-join",bus:A3});new Ij.ActorOptimizeQueryOperationJoinConnected({name:"urn:comunica:default:optimize-query-operation/actors#join-connected",bus:A3});const H_e=new jA.MediatorCombinePipeline({name:"urn:comunica:default:optimize-query-operation/mediators#main",bus:A3});new Pj.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:fx});new Dj.ActorQueryParseGraphql({name:"urn:comunica:default:query-parse/actors#graphql",bus:fx});const k_e=new Ri.MediatorRace({name:"urn:comunica:default:query-parse/mediators#main",bus:fx});new e9.ActorQueryResultSerializeJson({mediaTypePriorities:{"application/json":1},mediaTypeFormats:{"application/json":"https://comunica.linkeddatafragments.org/#results_JSON"},name:"urn:comunica:default:query-result-serialize/actors#json",bus:ha});new z9.ActorQueryResultSerializeSimple({mediaTypePriorities:{simple:.9},mediaTypeFormats:{simple:"https://comunica.linkeddatafragments.org/#results_simple"},name:"urn:comunica:default:query-result-serialize/actors#simple",bus:ha});new W9.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:ha});new X9.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:ha});new tM.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:ha});new rM.ActorQueryResultSerializeTable({columnWidth:50,mediaTypePriorities:{table:.6},mediaTypeFormats:{table:"https://comunica.linkeddatafragments.org/#results_table"},name:"urn:comunica:default:query-result-serialize/actors#table",bus:ha});new iM.ActorQueryResultSerializeTree({mediaTypePriorities:{tree:.5},mediaTypeFormats:{tree:"https://comunica.linkeddatafragments.org/#results_tree"},name:"urn:comunica:default:query-result-serialize/actors#tree",bus:ha});const Q_e=new Ri.MediatorRace({name:"urn:comunica:default:query-result-serialize/mediators#serialize",bus:ha}),G_e=new tc.MediatorCombineUnion({field:"mediaTypes",name:"urn:comunica:default:query-result-serialize/mediators#mediaType",bus:ha}),z_e=new tc.MediatorCombineUnion({field:"mediaTypeFormats",name:"urn:comunica:default:query-result-serialize/mediators#mediaTypeFormat",bus:ha}),W_e=new _M.ActorDereferenceFallback({name:"urn:comunica:default:dereference/actors#fallback",bus:hx}),X_e=new Ri.MediatorRace({name:"urn:comunica:default:dereference/mediators#main",bus:hx}),_x=new Ri.MediatorRace({name:"urn:comunica:default:dereference-rdf/mediators#main",bus:CB});new wM.ActorRdfJoinEntriesSortCardinality({name:"urn:comunica:default:rdf-join-entries-sort/actors#cardinality",bus:jB});const $B=new Ri.MediatorRace({name:"urn:comunica:default:rdf-join-entries-sort/mediators#main",bus:jB});new TM.ActorRdfJoinSelectivityVariableCounting({name:"urn:comunica:default:rdf-join-selectivity/actors#variable-counting",bus:MB});const Da=new If.MediatorNumber({field:"accuracy",type:"max",ignoreErrors:!0,name:"urn:comunica:default:rdf-join-selectivity/mediators#main",bus:MB});new OM.ActorRdfMetadataPrimaryTopic({metadataToData:!1,dataToMetadataOnInvalidMetadataGraph:!0,name:"urn:comunica:default:rdf-metadata/actors#primary-topic",bus:px});new AM.ActorRdfMetadataAll({name:"urn:comunica:default:rdf-metadata/actors#all",bus:px});const gx=new Ri.MediatorRace({name:"urn:comunica:default:rdf-metadata/mediators#main",bus:px});new RM.ActorRdfMetadataAccumulateCanContainUndefs({name:"urn:comunica:default:rdf-metadata-accumulate/actors#cancontainundefs",bus:iy});new xM.ActorRdfMetadataAccumulateCardinality({name:"urn:comunica:default:rdf-metadata-accumulate/actors#cardinality",bus:iy});new IM.ActorRdfMetadataAccumulatePageSize({name:"urn:comunica:default:rdf-metadata-accumulate/actors#pagesize",bus:iy});new PM.ActorRdfMetadataAccumulateRequestTime({name:"urn:comunica:default:rdf-metadata-accumulate/actors#requesttime",bus:iy});const UB=new tc.MediatorCombineUnion({field:"metadata",name:"urn:comunica:default:rdf-metadata-accumulate/mediators#main",bus:iy});new DM.ActorRdfMetadataExtractHydraControls({name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-controls",bus:Zo});new CM.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:Zo});new jM.ActorRdfMetadataExtractHydraPagesize({predicates:["http://www.w3.org/ns/hydra/core#itemsPerPage"],name:"urn:comunica:default:rdf-metadata-extract/actors#hydra-pagesize",bus:Zo});new MM.ActorRdfMetadataExtractRequestTime({name:"urn:comunica:default:rdf-metadata-extract/actors#request-time",bus:Zo});new FM.ActorRdfMetadataExtractAllowHttpMethods({name:"urn:comunica:default:rdf-metadata-extract/actors#allow-http-methods",bus:Zo});new LM.ActorRdfMetadataExtractPutAccepted({name:"urn:comunica:default:rdf-metadata-extract/actors#put-accepted",bus:Zo});new BM.ActorRdfMetadataExtractPatchSparqlUpdate({name:"urn:comunica:default:rdf-metadata-extract/actors#patch-sparql-update",bus:Zo});new $M.ActorRdfMetadataExtractSparqlService({inferHttpsEndpoint:!0,name:"urn:comunica:default:rdf-metadata-extract/actors#sparql-service",bus:Zo});const mx=new tc.MediatorCombineUnion({field:"metadata",name:"urn:comunica:default:rdf-metadata-extract/mediators#main",bus:Zo});new UM.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:sc});new zM.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:sc});new aF.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:sc});new FF.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:sc});const vx=new Ri.MediatorRace({name:"urn:comunica:default:rdf-parse/mediators#parse",bus:sc}),qB=new tc.MediatorCombineUnion({field:"mediaTypes",name:"urn:comunica:default:rdf-parse/mediators#mediaType",bus:sc});new $F.ActorRdfParseHtml({busRdfParseHtml:R3,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:sc});new qF.ActorRdfParseHtmlMicrodata({name:"urn:comunica:default:rdf-parse-html/actors#microdata",bus:R3});new WF.ActorRdfParseHtmlRdfa({name:"urn:comunica:default:rdf-parse-html/actors#rdfa",bus:R3});new XF.ActorRdfResolveHypermediaNone({name:"urn:comunica:default:rdf-resolve-hypermedia/actors#none",bus:x3});const K_e=new If.MediatorNumber({field:"filterFactor",type:"max",ignoreErrors:!0,name:"urn:comunica:default:rdf-resolve-hypermedia/mediators#main",bus:x3});new s7.ActorRdfResolveHypermediaLinksNext({name:"urn:comunica:default:rdf-resolve-hypermedia-links/actors#next",bus:FB});const J_e=new Ri.MediatorRace({name:"urn:comunica:default:rdf-resolve-hypermedia-links/mediators#main",bus:FB});new u7.ActorRdfResolveHypermediaLinksQueueFifo({name:"urn:comunica:default:rdf-resolve-hypermedia-links-queue/actors#fifo",bus:LB});const Y_e=new Ri.MediatorRace({name:"urn:comunica:default:rdf-resolve-hypermedia-links-queue/mediators#main",bus:LB});new d7.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:Mf});new f7.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:Mf});new p7.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:Mf});const VB=new Ri.MediatorRace({name:"urn:comunica:default:rdf-serialize/mediators#serialize",bus:Mf}),HB=new tc.MediatorCombineUnion({field:"mediaTypes",name:"urn:comunica:default:rdf-serialize/mediators#mediaType",bus:Mf}),Z_e=new tc.MediatorCombineUnion({field:"mediaTypeFormats",name:"urn:comunica:default:rdf-serialize/mediators#mediaTypeFormat",bus:Mf}),ege=new Ri.MediatorRace({name:"urn:comunica:default:rdf-update-hypermedia/mediators#main",bus:I3});new g7.ActorRdfUpdateQuadsRdfJsStore({name:"urn:comunica:default:rdf-update-quads/actors#rdfjs-store",bus:yx});const uy=new Ri.MediatorRace({name:"urn:comunica:default:rdf-update-quads/mediators#main",bus:yx}),tge=new M7.ActorHttpFetch({agentOptions:{keepAlive:!0,maxSockets:5},name:"urn:comunica:default:http/actors#fetch",bus:ay}),rge=new If.MediatorNumber({field:"time",type:"min",ignoreErrors:!0,name:"urn:comunica:default:http/mediators#no-fallback",bus:ay}),oc=new If.MediatorNumber({field:"time",type:"min",ignoreErrors:!0,name:"urn:comunica:default:http/mediators#main",bus:BB});new F7.ActorQueryOperationValues({name:"urn:comunica:default:query-operation/actors#values",bus:At});const It=new If.MediatorNumber({field:"httpRequests",type:"min",ignoreErrors:!0,name:"urn:comunica:default:query-operation/mediators#main",bus:At}),cy=new L7.MediatorJoinCoefficientsFixed({cpuWeight:1,memoryWeight:1,timeWeight:10,ioWeight:100,name:"urn:comunica:default:rdf-join/mediators#main",bus:pa}),wx=new Ri.MediatorRace({name:"urn:comunica:default:rdf-resolve-quad-pattern/mediators#main",bus:sy}),nge=new B7.MediatorAll({name:"urn:comunica:default:http-invalidate/mediators#main",bus:oy}),ige=new V0.ActorHttpInvalidateListenable({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-update-quads-hypermedia/^2.0.0/components/ActorRdfUpdateQuadsHypermedia.jsonld#IActorRdfUpdateQuadsHypermediaArgs_default_invalidator",bus:oy}),age=new V0.ActorHttpInvalidateListenable({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-rdf-resolve-quad-pattern-hypermedia/^2.0.0/components/ActorRdfResolveQuadPatternHypermedia.jsonld#IActorRdfResolveQuadPatternHypermediaArgs_default_invalidator",bus:oy}),sge=new V0.ActorHttpInvalidateListenable({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^2.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator",bus:oy}),oge=new V0.ActorHttpInvalidateListenable({name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^2.0.0/components/ActionObserverHttp.jsonld#IActionObserverHttpArgs_default_invalidator",bus:oy});new $7.ActorRdfJoinNone({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-none",bus:pa});new U7.ActorRdfJoinSingle({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-single",bus:pa});new q7.ActorRdfJoinMultiEmpty({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-multi-empty",bus:pa});new V7.ActorRdfJoinHash({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-hash",bus:pa});new k7.ActorRdfJoinSymmetricHash({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-symmetric-hash",bus:pa});new Q7.ActorRdfJoinNestedLoop({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-nested-loop",bus:pa});new G7.ActorRdfJoinMinusHash({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#minus-hash",bus:pa});new z7.ActorRdfJoinMinusHashUndef({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#minus-hash-undef",bus:pa});new W7.ActorRdfJoinOptionalNestedLoop({mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#optional-nested-loop",bus:pa});new X7.ActorRdfResolveHypermediaQpf({mediatorMetadata:gx,mediatorMetadataExtract:mx,mediatorDereferenceRdf:_x,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:rdf-resolve-hypermedia/actors#qpf",bus:x3});new J7.ActorDereferenceRdfParse({mediatorDereference:X_e,mediatorParse:vx,mediatorParseMediatypes:qB,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:CB});new Z7.ActorRdfParseHtmlScript({mediatorRdfParseMediatypes:qB,mediatorRdfParseHandle:vx,name:"urn:comunica:default:rdf-parse-html/actors#script",bus:R3});new eL.ActorQueryResultSerializeRdf({mediatorRdfSerialize:VB,mediatorMediaTypeCombiner:HB,mediatorMediaTypeFormatCombiner:Z_e,name:"urn:comunica:default:query-result-serialize/actors#rdf",bus:ha});new tL.ActorHttpWayback({mediatorHttp:rge,name:"urn:comunica:default:http/actors#wayback",bus:BB});new rL.ActorRdfParseJsonLd({mediatorHttp:oc,mediaTypePriorities:{"application/json":.5,"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:sc});new uL.ActorRdfResolveHypermediaSparql({mediatorHttp:oc,checkUrlSuffix:!0,forceHttpGet:!1,cacheSize:1024,name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#sparql",bus:x3});new pL.ActorRdfUpdateHypermediaPatchSparqlUpdate({mediatorHttp:oc,name:"urn:comunica:default:rdf-update-hypermedia/actors#patch-sparql-update",bus:I3});new yL.ActorRdfUpdateHypermediaPutLdp({mediatorHttp:oc,mediatorRdfSerializeMediatypes:HB,mediatorRdfSerialize:VB,name:"urn:comunica:default:rdf-update-hypermedia/actors#put-ldp",bus:I3});new bL.ActorRdfUpdateHypermediaSparql({mediatorHttp:oc,checkUrlSuffixSparql:!0,checkUrlSuffixUpdate:!0,name:"urn:comunica:default:rdf-update-hypermedia/actors#sparql",bus:I3});new _L.ActorQueryOperationSparqlEndpoint({mediatorHttp:oc,checkUrlSuffixSparql:!0,checkUrlSuffixUpdate:!0,forceHttpGet:!1,name:"urn:comunica:default:query-operation/actors#sparql-endpoint",bus:At});new gL.ActorQueryOperationAsk({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#ask",bus:At});new mL.ActorQueryOperationBgpJoin({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#bgp",bus:At});new WR.ActorQueryOperationConstruct({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#construct",bus:At});new vL.ActorQueryOperationDescribeSubject({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#describe",bus:At});new wL.ActorQueryOperationDistinctHash({mediatorHashBindings:bx,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#distinct",bus:At});new SL.ActorQueryOperationFilterSparqlee({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#filter",bus:At});new GL.ActorQueryOperationFromQuad({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#from",bus:At});new zL.ActorQueryOperationExtend({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#extend",bus:At});new WL.ActorQueryOperationGroup({mediatorHashBindings:bx,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#group",bus:At});new XL.ActorQueryOperationNop({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#nop",bus:At});new KL.ActorQueryOperationOrderBySparqlee({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#orderby",bus:At});new JL.ActorQueryOperationProject({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#project",bus:At});new YL.ActorQueryOperationReducedHash({mediatorHashBindings:bx,cacheSize:100,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#reduced",bus:At});new ZL.ActorQueryOperationService({forceSparqlEndpoint:!1,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#service",bus:At});new eB.ActorQueryOperationSlice({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#slice",bus:At});new V2.ActorQueryOperationUnion({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#union",bus:At});new tB.ActorQueryOperationPathAlt({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-alt",bus:At});new rB.ActorQueryOperationPathInv({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-inv",bus:At});new nB.ActorQueryOperationPathLink({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-link",bus:At});new iB.ActorQueryOperationPathNps({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-nps",bus:At});new aB.ActorQueryOperationPathOneOrMore({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-one-or-more",bus:At});new sB.ActorQueryOperationPathZeroOrMore({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-zero-or-more",bus:At});new oB.ActorQueryOperationPathZeroOrOne({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-zero-or-one",bus:At});new uB.ActorQueryOperationClear({mediatorUpdateQuads:uy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-clear",bus:At});new cB.ActorQueryOperationUpdateCompositeUpdate({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-composite",bus:At});new lB.ActorQueryOperationAddRewrite({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-add",bus:At});new dB.ActorQueryOperationCopyRewrite({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-copy",bus:At});new fB.ActorQueryOperationCreate({mediatorUpdateQuads:uy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-create",bus:At});new hB.ActorQueryOperationUpdateDeleteInsert({mediatorUpdateQuads:uy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-delete-insert",bus:At});new pB.ActorQueryOperationDrop({mediatorUpdateQuads:uy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-drop",bus:At});new yB.ActorQueryOperationLoad({mediatorUpdateQuads:uy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-load",bus:At});new bB.ActorQueryOperationMoveRewrite({mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#update-move",bus:At});new cx.ActorRdfJoinMultiBind({bindOrder:"depth-first",selectivityModifier:1e-4,mediatorJoinEntriesSort:$B,mediatorQueryOperation:It,mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-multi-bind",bus:pa});new _B.ActorRdfJoinOptionalBind({bindOrder:"depth-first",selectivityModifier:1e-4,mediatorQueryOperation:It,mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#optional-bind",bus:pa});new gB.ActorQueryOperationJoin({mediatorJoin:cy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#join",bus:At});new mB.ActorQueryOperationLeftJoin({mediatorJoin:cy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#leftjoin",bus:At});new vB.ActorQueryOperationMinus({mediatorJoin:cy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#minus",bus:At});new wB.ActorQueryOperationPathSeq({mediatorJoin:cy,mediatorQueryOperation:It,name:"urn:comunica:default:query-operation/actors#path-seq",bus:At});new SB.ActorRdfJoinMultiSmallest({mediatorJoinEntriesSort:$B,mediatorJoin:cy,mediatorJoinSelectivity:Da,name:"urn:comunica:default:rdf-join/actors#inner-multi-smallest",bus:pa});new TB.ActorQueryOperationQuadpattern({mediatorResolveQuadPattern:wx,unionDefaultGraph:!1,name:"urn:comunica:default:query-operation/actors#quadpattern",bus:At});new VR.ActorRdfResolveQuadPatternFederated({mediatorResolveQuadPattern:wx,mediatorRdfMetadataAccumulate:UB,skipEmptyPatterns:!1,name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#federated",bus:sy});new EB.ActorDereferenceHttp({mediatorHttp:oc,maxAcceptHeaderLength:1024,maxAcceptHeaderLengthBrowser:128,name:"urn:comunica:default:dereference/actors#http",bus:hx,beforeActors:[W_e]});new AB.ActorHttpProxy({mediatorHttp:oc,name:"urn:comunica:default:http/actors#proxy",bus:ay,beforeActors:[tge]});const uge=new UO.ActorInitQuery({mediatorOptimizeQueryOperation:H_e,mediatorQueryOperation:It,mediatorQueryParse:k_e,mediatorQueryResultSerialize:Q_e,mediatorQueryResultSerializeMediaTypeCombiner:G_e,mediatorQueryResultSerializeMediaTypeFormatCombiner:z_e,mediatorContextPreprocess:V_e,mediatorHttpInvalidate:nge,logger:U_e,defaultQueryInputFormat:"sparql",allowNoSources:!1,contextKeyShortcuts:{baseIRI:"@comunica/actor-init-query:baseIRI",datetime:"@comunica/actor-http-memento:datetime",destination:"@comunica/bus-rdf-update-quads:destination",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",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",source:"@comunica/bus-rdf-resolve-quad-pattern:source",sources:"@comunica/bus-rdf-resolve-quad-pattern:sources",unionDefaultGraph:"@comunica/bus-query-operation:unionDefaultGraph"},name:"urn:comunica:default:init/actors#query",bus:q_e});new RB.ActorRdfUpdateQuadsHypermedia({cacheSize:100,httpInvalidator:ige,mediatorDereferenceRdf:_x,mediatorMetadata:gx,mediatorMetadataExtract:mx,mediatorRdfUpdateHypermedia:ege,name:"urn:comunica:default:rdf-update-quads/actors#hypermedia",bus:yx});const kB=new xB.ActorRdfResolveQuadPatternHypermedia({cacheSize:100,httpInvalidator:age,maxIterators:64,aggregateStore:!1,mediatorDereferenceRdf:_x,mediatorMetadata:gx,mediatorMetadataExtract:mx,mediatorMetadataAccumulate:UB,mediatorRdfResolveHypermedia:K_e,mediatorRdfResolveHypermediaLinks:J_e,mediatorRdfResolveHypermediaLinksQueue:Y_e,name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#hypermedia",bus:sy}),cge=new lx.ActionObserverHttp({httpInvalidator:sge,name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-sparql-json/^2.0.0/components/ActorQueryResultSerializeSparqlJson.jsonld#ActorQueryResultSerializeSparqlJson_default_observer",bus:ay}),lge=new dx.ActionObserverHttp({httpInvalidator:oge,name:"https://linkedsoftwaredependencies.org/bundles/npm/@comunica/actor-query-result-serialize-stats/^2.0.0/components/ActorQueryResultSerializeStats.jsonld#ActorQueryResultSerializeStats_default_observer",bus:ay});new lx.ActorQueryResultSerializeSparqlJson({emitMetadata:!0,httpObserver:cge,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:ha});new dx.ActorQueryResultSerializeStats({httpObserver:lge,mediaTypePriorities:{stats:.5},mediaTypeFormats:{stats:"https://comunica.linkeddatafragments.org/#results_stats"},name:"urn:comunica:default:query-result-serialize/actors#stats",bus:ha});new IR.ActorRdfResolveQuadPatternRdfJsSource({name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#rdfjs-source",bus:sy,beforeActors:[kB]});new PB.ActorRdfResolveQuadPatternStringSource({cacheSize:100,mediatorRdfParse:vx,mediatorRdfResolveQuadPattern:wx,name:"urn:comunica:default:rdf-resolve-quad-pattern/actors#string-source",bus:sy,beforeActors:[kB]});var dge=uge;Object.defineProperty(t_,"__esModule",{value:!0});t_.QueryEngine=void 0;const fge=UO,hge=dge;class pge extends fge.QueryEngineBase{constructor(e=hge){super(e)}}t_.QueryEngine=pge;(function(t){var e=m&&m.__createBinding||(Object.create?function(n,a,s,o){o===void 0&&(o=s);var u=Object.getOwnPropertyDescriptor(a,s);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[s]}}),Object.defineProperty(n,o,u)}:function(n,a,s,o){o===void 0&&(o=s),n[o]=a[s]}),r=m&&m.__exportStar||function(n,a){for(var s in n)s!=="default"&&!Object.prototype.hasOwnProperty.call(a,s)&&e(a,n,s)};Object.defineProperty(t,"__esModule",{value:!0}),r(t_,t)})(l5);var eu=globalThis&&globalThis.__awaiter||function(t,e,r,n){function a(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function u(d){try{l(n.next(d))}catch(f){o(f)}}function c(d){try{l(n.throw(d))}catch(f){o(f)}}function l(d){d.done?s(d.value):a(d.value).then(u,c)}l((n=n.apply(t,e||[])).next())})};const Xu=new l5.QueryEngine;function yge(t){var e;return eu(this,void 0,void 0,function*(){const r=yield bge(t),a=(yield _ge(r))[0],s=yield gge((e=a.viewDescription)!==null&&e!==void 0?e:a.view);if(s){const o=yield mge(a.view);return{ldes:r,view:a,relations:o,LDESinLDP:s}}else throw new Error("Only LDES in LDP is supported at the moment")})}function bge(t){var e,r;return eu(this,void 0,void 0,function*(){const a=(e=(yield fetch(t,{method:"HEAD"})).headers.get("Link"))===null||e===void 0?void 0:e.split(",").map(o=>{const u=o.trim().split(";"),c=u[0].slice(1,-1),l=u[1].trim().split("=")[1].slice(1,-1);return{url:c,rel:l}}),s=(r=a==null?void 0:a.find(o=>o.rel==="https://w3id.org/ldes#EventStream"))===null||r===void 0?void 0:r.url;if(!s)throw new Error("No LDES found");return console.log("Found LDES: "+s),s})}function _ge(t){return eu(this,void 0,void 0,function*(){const e=` PREFIX ldes: PREFIX tree: @@ -222,7 +222,7 @@ ${f}`);return this.handleDereferenceErrors(e,h,a.headers,u)}}const c=(d=Kbe.exec WHERE { <${t}> a ldp:BasicContainer; ldp:contains ?member. - }`;return(yield(yield Xu.queryBindings(r,{sources:[t]})).toArray()).map(a=>a.get("member").value)}else throw new Error("Only LDES in LDP is supported at the moment")})}function wge(t){return eu(this,void 0,void 0,function*(){const e=` + }`,n=(s,o)=>fetch(s,Object.assign(Object.assign({},o),{headers:Object.assign(Object.assign({},o==null?void 0:o.headers),{"Cache-Control":"no-cache"})}));return(yield(yield Xu.queryBindings(r,{sources:[t],fetch:n})).toArray()).map(s=>s.get("member").value)}else throw new Error("Only LDES in LDP is supported at the moment")})}function wge(t){return eu(this,void 0,void 0,function*(){const e=` PREFIX as: SELECT ?id ?actorUrl ?actorName ?object ?targetUrl ?targetName ?context @@ -259,4 +259,4 @@ ${f}`);return this.handleDereferenceErrors(e,h,a.headers,u)}}const c=(d=Kbe.exec * vue-router v4.2.5 * (c) 2023 Eduardo San Martin Morote * @license MIT - */const sd=typeof window<"u";function Wge(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const er=Object.assign;function XT(t,e){const r={};for(const n in e){const a=e[n];r[n]=cs(a)?a.map(t):t(a)}return r}const rp=()=>{},cs=Array.isArray,Xge=/\/$/,Kge=t=>t.replace(Xge,"");function KT(t,e,r="/"){let n,a={},s="",o="";const u=e.indexOf("#");let c=e.indexOf("?");return u=0&&(c=-1),c>-1&&(n=e.slice(0,c),s=e.slice(c+1,u>-1?u:e.length),a=t(s)),u>-1&&(n=n||e.slice(0,u),o=e.slice(u,e.length)),n=eme(n??e,r),{fullPath:n+(s&&"?")+s+o,path:n,query:a,hash:o}}function Jge(t,e){const r=e.query?t(e.query):"";return e.path+(r&&"?")+r+(e.hash||"")}function G6(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function Yge(t,e,r){const n=e.matched.length-1,a=r.matched.length-1;return n>-1&&n===a&&ef(e.matched[n],r.matched[a])&&GB(e.params,r.params)&&t(e.query)===t(r.query)&&e.hash===r.hash}function ef(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function GB(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(!Zge(t[r],e[r]))return!1;return!0}function Zge(t,e){return cs(t)?z6(t,e):cs(e)?z6(e,t):t===e}function z6(t,e){return cs(e)?t.length===e.length&&t.every((r,n)=>r===e[n]):t.length===1&&t[0]===e}function eme(t,e){if(t.startsWith("/"))return t;if(!t)return e;const r=e.split("/"),n=t.split("/"),a=n[n.length-1];(a===".."||a===".")&&n.push("");let s=r.length-1,o,u;for(o=0;o1&&s--;else break;return r.slice(0,s).join("/")+"/"+n.slice(o-(o===n.length?1:0)).join("/")}var Pp;(function(t){t.pop="pop",t.push="push"})(Pp||(Pp={}));var np;(function(t){t.back="back",t.forward="forward",t.unknown=""})(np||(np={}));function tme(t){if(!t)if(sd){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),Kge(t)}const rme=/^[^#]+#/;function nme(t,e){return t.replace(rme,"#")+e}function ime(t,e){const r=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{behavior:e.behavior,left:n.left-r.left-(e.left||0),top:n.top-r.top-(e.top||0)}}const P3=()=>({left:window.pageXOffset,top:window.pageYOffset});function ame(t){let e;if("el"in t){const r=t.el,n=typeof r=="string"&&r.startsWith("#"),a=typeof r=="string"?n?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!a)return;e=ime(a,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function W6(t,e){return(history.state?history.state.position-e:-1)+t}const bO=new Map;function sme(t,e){bO.set(t,e)}function ome(t){const e=bO.get(t);return bO.delete(t),e}let ume=()=>location.protocol+"//"+location.host;function zB(t,e){const{pathname:r,search:n,hash:a}=e,s=t.indexOf("#");if(s>-1){let u=a.includes(t.slice(s))?t.slice(s).length:1,c=a.slice(u);return c[0]!=="/"&&(c="/"+c),G6(c,"")}return G6(r,t)+n+a}function cme(t,e,r,n){let a=[],s=[],o=null;const u=({state:h})=>{const p=zB(t,location),b=r.value,_=e.value;let E=0;if(h){if(r.value=p,e.value=h,o&&o===b){o=null;return}E=_?h.position-_.position:0}else n(p);a.forEach(w=>{w(r.value,b,{delta:E,type:Pp.pop,direction:E?E>0?np.forward:np.back:np.unknown})})};function c(){o=r.value}function l(h){a.push(h);const p=()=>{const b=a.indexOf(h);b>-1&&a.splice(b,1)};return s.push(p),p}function d(){const{history:h}=window;h.state&&h.replaceState(er({},h.state,{scroll:P3()}),"")}function f(){for(const h of s)h();s=[],window.removeEventListener("popstate",u),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",u),window.addEventListener("beforeunload",d,{passive:!0}),{pauseListeners:c,listen:l,destroy:f}}function X6(t,e,r,n=!1,a=!1){return{back:t,current:e,forward:r,replaced:n,position:window.history.length,scroll:a?P3():null}}function lme(t){const{history:e,location:r}=window,n={value:zB(t,r)},a={value:e.state};a.value||s(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(c,l,d){const f=t.indexOf("#"),h=f>-1?(r.host&&document.querySelector("base")?t:t.slice(f))+c:ume()+t+c;try{e[d?"replaceState":"pushState"](l,"",h),a.value=l}catch(p){console.error(p),r[d?"replace":"assign"](h)}}function o(c,l){const d=er({},e.state,X6(a.value.back,c,a.value.forward,!0),l,{position:a.value.position});s(c,d,!0),n.value=c}function u(c,l){const d=er({},a.value,e.state,{forward:c,scroll:P3()});s(d.current,d,!0);const f=er({},X6(n.value,c,null),{position:d.position+1},l);s(c,f,!1),n.value=c}return{location:n,state:a,push:u,replace:o}}function dme(t){t=tme(t);const e=lme(t),r=cme(t,e.state,e.location,e.replace);function n(s,o=!0){o||r.pauseListeners(),history.go(s)}const a=er({location:"",base:t,go:n,createHref:nme.bind(null,t)},e,r);return Object.defineProperty(a,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(a,"state",{enumerable:!0,get:()=>e.state.value}),a}function fme(t){return typeof t=="string"||t&&typeof t=="object"}function WB(t){return typeof t=="string"||typeof t=="symbol"}const du={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},XB=Symbol("");var K6;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(K6||(K6={}));function tf(t,e){return er(new Error,{type:t,[XB]:!0},e)}function bo(t,e){return t instanceof Error&&XB in t&&(e==null||!!(t.type&e))}const J6="[^/]+?",hme={sensitive:!1,strict:!1,start:!0,end:!0},pme=/[.+*?^${}()[\]/\\]/g;function yme(t,e){const r=er({},hme,e),n=[];let a=r.start?"^":"";const s=[];for(const l of t){const d=l.length?[]:[90];r.strict&&!l.length&&(a+="/");for(let f=0;fe.length?e.length===1&&e[0]===40+40?1:-1:0}function _me(t,e){let r=0;const n=t.score,a=e.score;for(;r0&&e[e.length-1]<0}const gme={type:0,value:""},mme=/[a-zA-Z0-9_]/;function vme(t){if(!t)return[[]];if(t==="/")return[[gme]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(p){throw new Error(`ERR (${r})/"${l}": ${p}`)}let r=0,n=r;const a=[];let s;function o(){s&&a.push(s),s=[]}let u=0,c,l="",d="";function f(){l&&(r===0?s.push({type:0,value:l}):r===1||r===2||r===3?(s.length>1&&(c==="*"||c==="+")&&e(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:l,regexp:d,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):e("Invalid state to consume buffer"),l="")}function h(){l+=c}for(;u{o(O)}:rp}function o(d){if(WB(d)){const f=n.get(d);f&&(n.delete(d),r.splice(r.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=r.indexOf(d);f>-1&&(r.splice(f,1),d.record.name&&n.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function u(){return r}function c(d){let f=0;for(;f=0&&(d.record.path!==r[f].record.path||!KB(d,r[f]));)f++;r.splice(f,0,d),d.record.name&&!e8(d)&&n.set(d.record.name,d)}function l(d,f){let h,p={},b,_;if("name"in d&&d.name){if(h=n.get(d.name),!h)throw tf(1,{location:d});_=h.record.name,p=er(Z6(f.params,h.keys.filter(O=>!O.optional).map(O=>O.name)),d.params&&Z6(d.params,h.keys.map(O=>O.name))),b=h.stringify(p)}else if("path"in d)b=d.path,h=r.find(O=>O.re.test(b)),h&&(p=h.parse(b),_=h.record.name);else{if(h=f.name?n.get(f.name):r.find(O=>O.re.test(f.path)),!h)throw tf(1,{location:d,currentLocation:f});_=h.record.name,p=er({},f.params,d.params),b=h.stringify(p)}const E=[];let w=h;for(;w;)E.unshift(w.record),w=w.parent;return{name:_,path:b,params:p,matched:E,meta:Ome(E)}}return t.forEach(d=>s(d)),{addRoute:s,resolve:l,removeRoute:o,getRoutes:u,getRecordMatcher:a}}function Z6(t,e){const r={};for(const n of e)n in t&&(r[n]=t[n]);return r}function Tme(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:Eme(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function Eme(t){const e={},r=t.props||!1;if("component"in t)e.default=r;else for(const n in t.components)e[n]=typeof r=="object"?r[n]:r;return e}function e8(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function Ome(t){return t.reduce((e,r)=>er(e,r.meta),{})}function t8(t,e){const r={};for(const n in t)r[n]=n in e?e[n]:t[n];return r}function KB(t,e){return e.children.some(r=>r===t||KB(t,r))}const JB=/#/g,Ame=/&/g,Rme=/\//g,xme=/=/g,Ime=/\?/g,YB=/\+/g,Pme=/%5B/g,Dme=/%5D/g,ZB=/%5E/g,Nme=/%60/g,e$=/%7B/g,Cme=/%7C/g,t$=/%7D/g,jme=/%20/g;function Sx(t){return encodeURI(""+t).replace(Cme,"|").replace(Pme,"[").replace(Dme,"]")}function Mme(t){return Sx(t).replace(e$,"{").replace(t$,"}").replace(ZB,"^")}function _O(t){return Sx(t).replace(YB,"%2B").replace(jme,"+").replace(JB,"%23").replace(Ame,"%26").replace(Nme,"`").replace(e$,"{").replace(t$,"}").replace(ZB,"^")}function Fme(t){return _O(t).replace(xme,"%3D")}function Lme(t){return Sx(t).replace(JB,"%23").replace(Ime,"%3F")}function Bme(t){return t==null?"":Lme(t).replace(Rme,"%2F")}function $b(t){try{return decodeURIComponent(""+t)}catch{}return""+t}function $me(t){const e={};if(t===""||t==="?")return e;const n=(t[0]==="?"?t.slice(1):t).split("&");for(let a=0;as&&_O(s)):[n&&_O(n)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+r,s!=null&&(e+="="+s))})}return e}function Ume(t){const e={};for(const r in t){const n=t[r];n!==void 0&&(e[r]=cs(n)?n.map(a=>a==null?null:""+a):n==null?n:""+n)}return e}const qme=Symbol(""),n8=Symbol(""),Tx=Symbol(""),r$=Symbol(""),gO=Symbol("");function Th(){let t=[];function e(n){return t.push(n),()=>{const a=t.indexOf(n);a>-1&&t.splice(a,1)}}function r(){t=[]}return{add:e,list:()=>t.slice(),reset:r}}function Ru(t,e,r,n,a){const s=n&&(n.enterCallbacks[a]=n.enterCallbacks[a]||[]);return()=>new Promise((o,u)=>{const c=f=>{f===!1?u(tf(4,{from:r,to:e})):f instanceof Error?u(f):fme(f)?u(tf(2,{from:e,to:f})):(s&&n.enterCallbacks[a]===s&&typeof f=="function"&&s.push(f),o())},l=t.call(n&&n.instances[a],e,r,c);let d=Promise.resolve(l);t.length<3&&(d=d.then(c)),d.catch(f=>u(f))})}function JT(t,e,r,n){const a=[];for(const s of t)for(const o in s.components){let u=s.components[o];if(!(e!=="beforeRouteEnter"&&!s.instances[o]))if(Vme(u)){const l=(u.__vccOpts||u)[e];l&&a.push(Ru(l,r,n,s,o))}else{let c=u();a.push(()=>c.then(l=>{if(!l)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${s.path}"`));const d=Wge(l)?l.default:l;s.components[o]=d;const h=(d.__vccOpts||d)[e];return h&&Ru(h,r,n,s,o)()}))}}return a}function Vme(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function i8(t){const e=as(Tx),r=as(r$),n=tr(()=>e.resolve(Dt(t.to))),a=tr(()=>{const{matched:c}=n.value,{length:l}=c,d=c[l-1],f=r.matched;if(!d||!f.length)return-1;const h=f.findIndex(ef.bind(null,d));if(h>-1)return h;const p=a8(c[l-2]);return l>1&&a8(d)===p&&f[f.length-1].path!==p?f.findIndex(ef.bind(null,c[l-2])):h}),s=tr(()=>a.value>-1&&Gme(r.params,n.value.params)),o=tr(()=>a.value>-1&&a.value===r.matched.length-1&&GB(r.params,n.value.params));function u(c={}){return Qme(c)?e[Dt(t.replace)?"replace":"push"](Dt(t.to)).catch(rp):Promise.resolve()}return{route:n,href:tr(()=>n.value.href),isActive:s,isExactActive:o,navigate:u}}const Hme=Ea({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:i8,setup(t,{slots:e}){const r=Gb(i8(t)),{options:n}=as(Tx),a=tr(()=>({[s8(t.activeClass,n.linkActiveClass,"router-link-active")]:r.isActive,[s8(t.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const s=e.default&&e.default(r);return t.custom?s:o5("a",{"aria-current":r.isExactActive?t.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:a.value},s)}}}),kme=Hme;function Qme(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function Gme(t,e){for(const r in e){const n=e[r],a=t[r];if(typeof n=="string"){if(n!==a)return!1}else if(!cs(a)||a.length!==n.length||n.some((s,o)=>s!==a[o]))return!1}return!0}function a8(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const s8=(t,e,r)=>t??e??r,zme=Ea({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:r}){const n=as(gO),a=tr(()=>t.route||n.value),s=as(n8,0),o=tr(()=>{let l=Dt(s);const{matched:d}=a.value;let f;for(;(f=d[l])&&!f.components;)l++;return l}),u=tr(()=>a.value.matched[o.value]);F1(n8,tr(()=>o.value+1)),F1(qme,u),F1(gO,a);const c=pi();return Td(()=>[c.value,u.value,t.name],([l,d,f],[h,p,b])=>{d&&(d.instances[f]=l,p&&p!==d&&l&&l===h&&(d.leaveGuards.size||(d.leaveGuards=p.leaveGuards),d.updateGuards.size||(d.updateGuards=p.updateGuards))),l&&d&&(!p||!ef(d,p)||!h)&&(d.enterCallbacks[f]||[]).forEach(_=>_(l))},{flush:"post"}),()=>{const l=a.value,d=t.name,f=u.value,h=f&&f.components[d];if(!h)return o8(r.default,{Component:h,route:l});const p=f.props[d],b=p?p===!0?l.params:typeof p=="function"?p(l):p:null,E=o5(h,er({},b,e,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(f.instances[d]=null)},ref:c}));return o8(r.default,{Component:E,route:l})||E}}});function o8(t,e){if(!t)return null;const r=t(e);return r.length===1?r[0]:r}const Wme=zme;function Xme(t){const e=Sme(t.routes,t),r=t.parseQuery||$me,n=t.stringifyQuery||r8,a=t.history,s=Th(),o=Th(),u=Th(),c=oU(du);let l=du;sd&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=XT.bind(null,J=>""+J),f=XT.bind(null,Bme),h=XT.bind(null,$b);function p(J,le){let pe,L;return WB(J)?(pe=e.getRecordMatcher(J),L=le):L=J,e.addRoute(L,pe)}function b(J){const le=e.getRecordMatcher(J);le&&e.removeRoute(le)}function _(){return e.getRoutes().map(J=>J.record)}function E(J){return!!e.getRecordMatcher(J)}function w(J,le){if(le=er({},le||c.value),typeof J=="string"){const v=KT(r,J,le.path),C=e.resolve({path:v.path},le),V=a.createHref(v.fullPath);return er(v,C,{params:h(C.params),hash:$b(v.hash),redirectedFrom:void 0,href:V})}let pe;if("path"in J)pe=er({},J,{path:KT(r,J.path,le.path).path});else{const v=er({},J.params);for(const C in v)v[C]==null&&delete v[C];pe=er({},J,{params:f(v)}),le.params=f(le.params)}const L=e.resolve(pe,le),P=J.hash||"";L.params=d(h(L.params));const g=Jge(n,er({},J,{hash:Mme(P),path:L.path})),y=a.createHref(g);return er({fullPath:g,hash:P,query:n===r8?Ume(J.query):J.query||{}},L,{redirectedFrom:void 0,href:y})}function O(J){return typeof J=="string"?KT(r,J,c.value.path):er({},J)}function A(J,le){if(l!==J)return tf(8,{from:le,to:J})}function T(J){return U(J)}function I(J){return T(er(O(J),{replace:!0}))}function D(J){const le=J.matched[J.matched.length-1];if(le&&le.redirect){const{redirect:pe}=le;let L=typeof pe=="function"?pe(J):pe;return typeof L=="string"&&(L=L.includes("?")||L.includes("#")?L=O(L):{path:L},L.params={}),er({query:J.query,hash:J.hash,params:"path"in L?{}:J.params},L)}}function U(J,le){const pe=l=w(J),L=c.value,P=J.state,g=J.force,y=J.replace===!0,v=D(pe);if(v)return U(er(O(v),{state:typeof v=="object"?er({},P,v.state):P,force:g,replace:y}),le||pe);const C=pe;C.redirectedFrom=le;let V;return!g&&Yge(n,L,pe)&&(V=tf(16,{to:C,from:L}),Te(L,L,!0,!1)),(V?Promise.resolve(V):x(C,L)).catch(q=>bo(q)?bo(q,2)?q:he(q):ie(q,C,L)).then(q=>{if(q){if(bo(q,2))return U(er({replace:y},O(q.to),{state:typeof q.to=="object"?er({},P,q.to.state):P,force:g}),le||C)}else q=X(C,L,!0,y,P);return F(C,L,q),q})}function H(J,le){const pe=A(J,le);return pe?Promise.reject(pe):Promise.resolve()}function N(J){const le=ce.values().next().value;return le&&typeof le.runWithContext=="function"?le.runWithContext(J):J()}function x(J,le){let pe;const[L,P,g]=Kme(J,le);pe=JT(L.reverse(),"beforeRouteLeave",J,le);for(const v of L)v.leaveGuards.forEach(C=>{pe.push(Ru(C,J,le))});const y=H.bind(null,J,le);return pe.push(y),oe(pe).then(()=>{pe=[];for(const v of s.list())pe.push(Ru(v,J,le));return pe.push(y),oe(pe)}).then(()=>{pe=JT(P,"beforeRouteUpdate",J,le);for(const v of P)v.updateGuards.forEach(C=>{pe.push(Ru(C,J,le))});return pe.push(y),oe(pe)}).then(()=>{pe=[];for(const v of g)if(v.beforeEnter)if(cs(v.beforeEnter))for(const C of v.beforeEnter)pe.push(Ru(C,J,le));else pe.push(Ru(v.beforeEnter,J,le));return pe.push(y),oe(pe)}).then(()=>(J.matched.forEach(v=>v.enterCallbacks={}),pe=JT(g,"beforeRouteEnter",J,le),pe.push(y),oe(pe))).then(()=>{pe=[];for(const v of o.list())pe.push(Ru(v,J,le));return pe.push(y),oe(pe)}).catch(v=>bo(v,8)?v:Promise.reject(v))}function F(J,le,pe){u.list().forEach(L=>N(()=>L(J,le,pe)))}function X(J,le,pe,L,P){const g=A(J,le);if(g)return g;const y=le===du,v=sd?history.state:{};pe&&(L||y?a.replace(J.fullPath,er({scroll:y&&v&&v.scroll},P)):a.push(J.fullPath,P)),c.value=J,Te(J,le,pe,y),he()}let ne;function $(){ne||(ne=a.listen((J,le,pe)=>{if(!Re.listening)return;const L=w(J),P=D(L);if(P){U(er(P,{replace:!0}),L).catch(rp);return}l=L;const g=c.value;sd&&sme(W6(g.fullPath,pe.delta),P3()),x(L,g).catch(y=>bo(y,12)?y:bo(y,2)?(U(y.to,L).then(v=>{bo(v,20)&&!pe.delta&&pe.type===Pp.pop&&a.go(-1,!1)}).catch(rp),Promise.reject()):(pe.delta&&a.go(-pe.delta,!1),ie(y,L,g))).then(y=>{y=y||X(L,g,!1),y&&(pe.delta&&!bo(y,8)?a.go(-pe.delta,!1):pe.type===Pp.pop&&bo(y,20)&&a.go(-1,!1)),F(L,g,y)}).catch(rp)}))}let j=Th(),Q=Th(),se;function ie(J,le,pe){he(J);const L=Q.list();return L.length?L.forEach(P=>P(J,le,pe)):console.error(J),Promise.reject(J)}function be(){return se&&c.value!==du?Promise.resolve():new Promise((J,le)=>{j.add([J,le])})}function he(J){return se||(se=!J,$(),j.list().forEach(([le,pe])=>J?pe(J):le()),j.reset()),J}function Te(J,le,pe,L){const{scrollBehavior:P}=t;if(!sd||!P)return Promise.resolve();const g=!pe&&ome(W6(J.fullPath,0))||(L||!pe)&&history.state&&history.state.scroll||null;return j8().then(()=>P(J,le,g)).then(y=>y&&ame(y)).catch(y=>ie(y,J,le))}const Ne=J=>a.go(J);let ye;const ce=new Set,Re={currentRoute:c,listening:!0,addRoute:p,removeRoute:b,hasRoute:E,getRoutes:_,resolve:w,options:t,push:T,replace:I,go:Ne,back:()=>Ne(-1),forward:()=>Ne(1),beforeEach:s.add,beforeResolve:o.add,afterEach:u.add,onError:Q.add,isReady:be,install(J){const le=this;J.component("RouterLink",kme),J.component("RouterView",Wme),J.config.globalProperties.$router=le,Object.defineProperty(J.config.globalProperties,"$route",{enumerable:!0,get:()=>Dt(c)}),sd&&!ye&&c.value===du&&(ye=!0,T(a.location).catch(P=>{}));const pe={};for(const P in du)Object.defineProperty(pe,P,{get:()=>c.value[P],enumerable:!0});J.provide(Tx,le),J.provide(r$,O8(pe)),J.provide(gO,c);const L=J.unmount;ce.add(J),J.unmount=function(){ce.delete(J),ce.size<1&&(l=du,ne&&ne(),ne=null,c.value=du,ye=!1,se=!1),L()}}};function oe(J){return J.reduce((le,pe)=>le.then(()=>N(pe)),Promise.resolve())}return Re}function Kme(t,e){const r=[],n=[],a=[],s=Math.max(e.matched.length,t.matched.length);for(let o=0;oef(l,u))?n.push(u):r.push(u));const c=t.matched[o];c&&(e.matched.find(l=>ef(l,c))||a.push(c))}return[r,n,a]}const Jme=Xme({history:dme("/scholarly-browser/"),routes:[{path:"/",component:QB,props:!0}]}),n$=Fq(QB);n$.use(Jme);n$.mount("#app"); + */const sd=typeof window<"u";function Wge(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const er=Object.assign;function XT(t,e){const r={};for(const n in e){const a=e[n];r[n]=cs(a)?a.map(t):t(a)}return r}const np=()=>{},cs=Array.isArray,Xge=/\/$/,Kge=t=>t.replace(Xge,"");function KT(t,e,r="/"){let n,a={},s="",o="";const u=e.indexOf("#");let c=e.indexOf("?");return u=0&&(c=-1),c>-1&&(n=e.slice(0,c),s=e.slice(c+1,u>-1?u:e.length),a=t(s)),u>-1&&(n=n||e.slice(0,u),o=e.slice(u,e.length)),n=eme(n??e,r),{fullPath:n+(s&&"?")+s+o,path:n,query:a,hash:o}}function Jge(t,e){const r=e.query?t(e.query):"";return e.path+(r&&"?")+r+(e.hash||"")}function G6(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function Yge(t,e,r){const n=e.matched.length-1,a=r.matched.length-1;return n>-1&&n===a&&ef(e.matched[n],r.matched[a])&&GB(e.params,r.params)&&t(e.query)===t(r.query)&&e.hash===r.hash}function ef(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function GB(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const r in t)if(!Zge(t[r],e[r]))return!1;return!0}function Zge(t,e){return cs(t)?z6(t,e):cs(e)?z6(e,t):t===e}function z6(t,e){return cs(e)?t.length===e.length&&t.every((r,n)=>r===e[n]):t.length===1&&t[0]===e}function eme(t,e){if(t.startsWith("/"))return t;if(!t)return e;const r=e.split("/"),n=t.split("/"),a=n[n.length-1];(a===".."||a===".")&&n.push("");let s=r.length-1,o,u;for(o=0;o1&&s--;else break;return r.slice(0,s).join("/")+"/"+n.slice(o-(o===n.length?1:0)).join("/")}var Dp;(function(t){t.pop="pop",t.push="push"})(Dp||(Dp={}));var ip;(function(t){t.back="back",t.forward="forward",t.unknown=""})(ip||(ip={}));function tme(t){if(!t)if(sd){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),Kge(t)}const rme=/^[^#]+#/;function nme(t,e){return t.replace(rme,"#")+e}function ime(t,e){const r=document.documentElement.getBoundingClientRect(),n=t.getBoundingClientRect();return{behavior:e.behavior,left:n.left-r.left-(e.left||0),top:n.top-r.top-(e.top||0)}}const P3=()=>({left:window.pageXOffset,top:window.pageYOffset});function ame(t){let e;if("el"in t){const r=t.el,n=typeof r=="string"&&r.startsWith("#"),a=typeof r=="string"?n?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!a)return;e=ime(a,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.pageXOffset,e.top!=null?e.top:window.pageYOffset)}function W6(t,e){return(history.state?history.state.position-e:-1)+t}const bO=new Map;function sme(t,e){bO.set(t,e)}function ome(t){const e=bO.get(t);return bO.delete(t),e}let ume=()=>location.protocol+"//"+location.host;function zB(t,e){const{pathname:r,search:n,hash:a}=e,s=t.indexOf("#");if(s>-1){let u=a.includes(t.slice(s))?t.slice(s).length:1,c=a.slice(u);return c[0]!=="/"&&(c="/"+c),G6(c,"")}return G6(r,t)+n+a}function cme(t,e,r,n){let a=[],s=[],o=null;const u=({state:h})=>{const p=zB(t,location),b=r.value,_=e.value;let E=0;if(h){if(r.value=p,e.value=h,o&&o===b){o=null;return}E=_?h.position-_.position:0}else n(p);a.forEach(w=>{w(r.value,b,{delta:E,type:Dp.pop,direction:E?E>0?ip.forward:ip.back:ip.unknown})})};function c(){o=r.value}function l(h){a.push(h);const p=()=>{const b=a.indexOf(h);b>-1&&a.splice(b,1)};return s.push(p),p}function d(){const{history:h}=window;h.state&&h.replaceState(er({},h.state,{scroll:P3()}),"")}function f(){for(const h of s)h();s=[],window.removeEventListener("popstate",u),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",u),window.addEventListener("beforeunload",d,{passive:!0}),{pauseListeners:c,listen:l,destroy:f}}function X6(t,e,r,n=!1,a=!1){return{back:t,current:e,forward:r,replaced:n,position:window.history.length,scroll:a?P3():null}}function lme(t){const{history:e,location:r}=window,n={value:zB(t,r)},a={value:e.state};a.value||s(n.value,{back:null,current:n.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function s(c,l,d){const f=t.indexOf("#"),h=f>-1?(r.host&&document.querySelector("base")?t:t.slice(f))+c:ume()+t+c;try{e[d?"replaceState":"pushState"](l,"",h),a.value=l}catch(p){console.error(p),r[d?"replace":"assign"](h)}}function o(c,l){const d=er({},e.state,X6(a.value.back,c,a.value.forward,!0),l,{position:a.value.position});s(c,d,!0),n.value=c}function u(c,l){const d=er({},a.value,e.state,{forward:c,scroll:P3()});s(d.current,d,!0);const f=er({},X6(n.value,c,null),{position:d.position+1},l);s(c,f,!1),n.value=c}return{location:n,state:a,push:u,replace:o}}function dme(t){t=tme(t);const e=lme(t),r=cme(t,e.state,e.location,e.replace);function n(s,o=!0){o||r.pauseListeners(),history.go(s)}const a=er({location:"",base:t,go:n,createHref:nme.bind(null,t)},e,r);return Object.defineProperty(a,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(a,"state",{enumerable:!0,get:()=>e.state.value}),a}function fme(t){return typeof t=="string"||t&&typeof t=="object"}function WB(t){return typeof t=="string"||typeof t=="symbol"}const du={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},XB=Symbol("");var K6;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(K6||(K6={}));function tf(t,e){return er(new Error,{type:t,[XB]:!0},e)}function bo(t,e){return t instanceof Error&&XB in t&&(e==null||!!(t.type&e))}const J6="[^/]+?",hme={sensitive:!1,strict:!1,start:!0,end:!0},pme=/[.+*?^${}()[\]/\\]/g;function yme(t,e){const r=er({},hme,e),n=[];let a=r.start?"^":"";const s=[];for(const l of t){const d=l.length?[]:[90];r.strict&&!l.length&&(a+="/");for(let f=0;fe.length?e.length===1&&e[0]===40+40?1:-1:0}function _me(t,e){let r=0;const n=t.score,a=e.score;for(;r0&&e[e.length-1]<0}const gme={type:0,value:""},mme=/[a-zA-Z0-9_]/;function vme(t){if(!t)return[[]];if(t==="/")return[[gme]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(p){throw new Error(`ERR (${r})/"${l}": ${p}`)}let r=0,n=r;const a=[];let s;function o(){s&&a.push(s),s=[]}let u=0,c,l="",d="";function f(){l&&(r===0?s.push({type:0,value:l}):r===1||r===2||r===3?(s.length>1&&(c==="*"||c==="+")&&e(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:l,regexp:d,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):e("Invalid state to consume buffer"),l="")}function h(){l+=c}for(;u{o(O)}:np}function o(d){if(WB(d)){const f=n.get(d);f&&(n.delete(d),r.splice(r.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=r.indexOf(d);f>-1&&(r.splice(f,1),d.record.name&&n.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function u(){return r}function c(d){let f=0;for(;f=0&&(d.record.path!==r[f].record.path||!KB(d,r[f]));)f++;r.splice(f,0,d),d.record.name&&!e8(d)&&n.set(d.record.name,d)}function l(d,f){let h,p={},b,_;if("name"in d&&d.name){if(h=n.get(d.name),!h)throw tf(1,{location:d});_=h.record.name,p=er(Z6(f.params,h.keys.filter(O=>!O.optional).map(O=>O.name)),d.params&&Z6(d.params,h.keys.map(O=>O.name))),b=h.stringify(p)}else if("path"in d)b=d.path,h=r.find(O=>O.re.test(b)),h&&(p=h.parse(b),_=h.record.name);else{if(h=f.name?n.get(f.name):r.find(O=>O.re.test(f.path)),!h)throw tf(1,{location:d,currentLocation:f});_=h.record.name,p=er({},f.params,d.params),b=h.stringify(p)}const E=[];let w=h;for(;w;)E.unshift(w.record),w=w.parent;return{name:_,path:b,params:p,matched:E,meta:Ome(E)}}return t.forEach(d=>s(d)),{addRoute:s,resolve:l,removeRoute:o,getRoutes:u,getRecordMatcher:a}}function Z6(t,e){const r={};for(const n of e)n in t&&(r[n]=t[n]);return r}function Tme(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:Eme(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function Eme(t){const e={},r=t.props||!1;if("component"in t)e.default=r;else for(const n in t.components)e[n]=typeof r=="object"?r[n]:r;return e}function e8(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function Ome(t){return t.reduce((e,r)=>er(e,r.meta),{})}function t8(t,e){const r={};for(const n in t)r[n]=n in e?e[n]:t[n];return r}function KB(t,e){return e.children.some(r=>r===t||KB(t,r))}const JB=/#/g,Ame=/&/g,Rme=/\//g,xme=/=/g,Ime=/\?/g,YB=/\+/g,Pme=/%5B/g,Dme=/%5D/g,ZB=/%5E/g,Nme=/%60/g,e$=/%7B/g,Cme=/%7C/g,t$=/%7D/g,jme=/%20/g;function Sx(t){return encodeURI(""+t).replace(Cme,"|").replace(Pme,"[").replace(Dme,"]")}function Mme(t){return Sx(t).replace(e$,"{").replace(t$,"}").replace(ZB,"^")}function _O(t){return Sx(t).replace(YB,"%2B").replace(jme,"+").replace(JB,"%23").replace(Ame,"%26").replace(Nme,"`").replace(e$,"{").replace(t$,"}").replace(ZB,"^")}function Fme(t){return _O(t).replace(xme,"%3D")}function Lme(t){return Sx(t).replace(JB,"%23").replace(Ime,"%3F")}function Bme(t){return t==null?"":Lme(t).replace(Rme,"%2F")}function $b(t){try{return decodeURIComponent(""+t)}catch{}return""+t}function $me(t){const e={};if(t===""||t==="?")return e;const n=(t[0]==="?"?t.slice(1):t).split("&");for(let a=0;as&&_O(s)):[n&&_O(n)]).forEach(s=>{s!==void 0&&(e+=(e.length?"&":"")+r,s!=null&&(e+="="+s))})}return e}function Ume(t){const e={};for(const r in t){const n=t[r];n!==void 0&&(e[r]=cs(n)?n.map(a=>a==null?null:""+a):n==null?n:""+n)}return e}const qme=Symbol(""),n8=Symbol(""),Tx=Symbol(""),r$=Symbol(""),gO=Symbol("");function Eh(){let t=[];function e(n){return t.push(n),()=>{const a=t.indexOf(n);a>-1&&t.splice(a,1)}}function r(){t=[]}return{add:e,list:()=>t.slice(),reset:r}}function Ru(t,e,r,n,a){const s=n&&(n.enterCallbacks[a]=n.enterCallbacks[a]||[]);return()=>new Promise((o,u)=>{const c=f=>{f===!1?u(tf(4,{from:r,to:e})):f instanceof Error?u(f):fme(f)?u(tf(2,{from:e,to:f})):(s&&n.enterCallbacks[a]===s&&typeof f=="function"&&s.push(f),o())},l=t.call(n&&n.instances[a],e,r,c);let d=Promise.resolve(l);t.length<3&&(d=d.then(c)),d.catch(f=>u(f))})}function JT(t,e,r,n){const a=[];for(const s of t)for(const o in s.components){let u=s.components[o];if(!(e!=="beforeRouteEnter"&&!s.instances[o]))if(Vme(u)){const l=(u.__vccOpts||u)[e];l&&a.push(Ru(l,r,n,s,o))}else{let c=u();a.push(()=>c.then(l=>{if(!l)return Promise.reject(new Error(`Couldn't resolve component "${o}" at "${s.path}"`));const d=Wge(l)?l.default:l;s.components[o]=d;const h=(d.__vccOpts||d)[e];return h&&Ru(h,r,n,s,o)()}))}}return a}function Vme(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function i8(t){const e=as(Tx),r=as(r$),n=tr(()=>e.resolve(Dt(t.to))),a=tr(()=>{const{matched:c}=n.value,{length:l}=c,d=c[l-1],f=r.matched;if(!d||!f.length)return-1;const h=f.findIndex(ef.bind(null,d));if(h>-1)return h;const p=a8(c[l-2]);return l>1&&a8(d)===p&&f[f.length-1].path!==p?f.findIndex(ef.bind(null,c[l-2])):h}),s=tr(()=>a.value>-1&&Gme(r.params,n.value.params)),o=tr(()=>a.value>-1&&a.value===r.matched.length-1&&GB(r.params,n.value.params));function u(c={}){return Qme(c)?e[Dt(t.replace)?"replace":"push"](Dt(t.to)).catch(np):Promise.resolve()}return{route:n,href:tr(()=>n.value.href),isActive:s,isExactActive:o,navigate:u}}const Hme=Ea({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:i8,setup(t,{slots:e}){const r=Gb(i8(t)),{options:n}=as(Tx),a=tr(()=>({[s8(t.activeClass,n.linkActiveClass,"router-link-active")]:r.isActive,[s8(t.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:r.isExactActive}));return()=>{const s=e.default&&e.default(r);return t.custom?s:o5("a",{"aria-current":r.isExactActive?t.ariaCurrentValue:null,href:r.href,onClick:r.navigate,class:a.value},s)}}}),kme=Hme;function Qme(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function Gme(t,e){for(const r in e){const n=e[r],a=t[r];if(typeof n=="string"){if(n!==a)return!1}else if(!cs(a)||a.length!==n.length||n.some((s,o)=>s!==a[o]))return!1}return!0}function a8(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const s8=(t,e,r)=>t??e??r,zme=Ea({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:r}){const n=as(gO),a=tr(()=>t.route||n.value),s=as(n8,0),o=tr(()=>{let l=Dt(s);const{matched:d}=a.value;let f;for(;(f=d[l])&&!f.components;)l++;return l}),u=tr(()=>a.value.matched[o.value]);F1(n8,tr(()=>o.value+1)),F1(qme,u),F1(gO,a);const c=pi();return Td(()=>[c.value,u.value,t.name],([l,d,f],[h,p,b])=>{d&&(d.instances[f]=l,p&&p!==d&&l&&l===h&&(d.leaveGuards.size||(d.leaveGuards=p.leaveGuards),d.updateGuards.size||(d.updateGuards=p.updateGuards))),l&&d&&(!p||!ef(d,p)||!h)&&(d.enterCallbacks[f]||[]).forEach(_=>_(l))},{flush:"post"}),()=>{const l=a.value,d=t.name,f=u.value,h=f&&f.components[d];if(!h)return o8(r.default,{Component:h,route:l});const p=f.props[d],b=p?p===!0?l.params:typeof p=="function"?p(l):p:null,E=o5(h,er({},b,e,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(f.instances[d]=null)},ref:c}));return o8(r.default,{Component:E,route:l})||E}}});function o8(t,e){if(!t)return null;const r=t(e);return r.length===1?r[0]:r}const Wme=zme;function Xme(t){const e=Sme(t.routes,t),r=t.parseQuery||$me,n=t.stringifyQuery||r8,a=t.history,s=Eh(),o=Eh(),u=Eh(),c=oU(du);let l=du;sd&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=XT.bind(null,J=>""+J),f=XT.bind(null,Bme),h=XT.bind(null,$b);function p(J,le){let pe,L;return WB(J)?(pe=e.getRecordMatcher(J),L=le):L=J,e.addRoute(L,pe)}function b(J){const le=e.getRecordMatcher(J);le&&e.removeRoute(le)}function _(){return e.getRoutes().map(J=>J.record)}function E(J){return!!e.getRecordMatcher(J)}function w(J,le){if(le=er({},le||c.value),typeof J=="string"){const v=KT(r,J,le.path),C=e.resolve({path:v.path},le),V=a.createHref(v.fullPath);return er(v,C,{params:h(C.params),hash:$b(v.hash),redirectedFrom:void 0,href:V})}let pe;if("path"in J)pe=er({},J,{path:KT(r,J.path,le.path).path});else{const v=er({},J.params);for(const C in v)v[C]==null&&delete v[C];pe=er({},J,{params:f(v)}),le.params=f(le.params)}const L=e.resolve(pe,le),P=J.hash||"";L.params=d(h(L.params));const g=Jge(n,er({},J,{hash:Mme(P),path:L.path})),y=a.createHref(g);return er({fullPath:g,hash:P,query:n===r8?Ume(J.query):J.query||{}},L,{redirectedFrom:void 0,href:y})}function O(J){return typeof J=="string"?KT(r,J,c.value.path):er({},J)}function A(J,le){if(l!==J)return tf(8,{from:le,to:J})}function T(J){return U(J)}function I(J){return T(er(O(J),{replace:!0}))}function D(J){const le=J.matched[J.matched.length-1];if(le&&le.redirect){const{redirect:pe}=le;let L=typeof pe=="function"?pe(J):pe;return typeof L=="string"&&(L=L.includes("?")||L.includes("#")?L=O(L):{path:L},L.params={}),er({query:J.query,hash:J.hash,params:"path"in L?{}:J.params},L)}}function U(J,le){const pe=l=w(J),L=c.value,P=J.state,g=J.force,y=J.replace===!0,v=D(pe);if(v)return U(er(O(v),{state:typeof v=="object"?er({},P,v.state):P,force:g,replace:y}),le||pe);const C=pe;C.redirectedFrom=le;let V;return!g&&Yge(n,L,pe)&&(V=tf(16,{to:C,from:L}),Te(L,L,!0,!1)),(V?Promise.resolve(V):x(C,L)).catch(q=>bo(q)?bo(q,2)?q:he(q):ie(q,C,L)).then(q=>{if(q){if(bo(q,2))return U(er({replace:y},O(q.to),{state:typeof q.to=="object"?er({},P,q.to.state):P,force:g}),le||C)}else q=X(C,L,!0,y,P);return F(C,L,q),q})}function H(J,le){const pe=A(J,le);return pe?Promise.reject(pe):Promise.resolve()}function N(J){const le=ce.values().next().value;return le&&typeof le.runWithContext=="function"?le.runWithContext(J):J()}function x(J,le){let pe;const[L,P,g]=Kme(J,le);pe=JT(L.reverse(),"beforeRouteLeave",J,le);for(const v of L)v.leaveGuards.forEach(C=>{pe.push(Ru(C,J,le))});const y=H.bind(null,J,le);return pe.push(y),oe(pe).then(()=>{pe=[];for(const v of s.list())pe.push(Ru(v,J,le));return pe.push(y),oe(pe)}).then(()=>{pe=JT(P,"beforeRouteUpdate",J,le);for(const v of P)v.updateGuards.forEach(C=>{pe.push(Ru(C,J,le))});return pe.push(y),oe(pe)}).then(()=>{pe=[];for(const v of g)if(v.beforeEnter)if(cs(v.beforeEnter))for(const C of v.beforeEnter)pe.push(Ru(C,J,le));else pe.push(Ru(v.beforeEnter,J,le));return pe.push(y),oe(pe)}).then(()=>(J.matched.forEach(v=>v.enterCallbacks={}),pe=JT(g,"beforeRouteEnter",J,le),pe.push(y),oe(pe))).then(()=>{pe=[];for(const v of o.list())pe.push(Ru(v,J,le));return pe.push(y),oe(pe)}).catch(v=>bo(v,8)?v:Promise.reject(v))}function F(J,le,pe){u.list().forEach(L=>N(()=>L(J,le,pe)))}function X(J,le,pe,L,P){const g=A(J,le);if(g)return g;const y=le===du,v=sd?history.state:{};pe&&(L||y?a.replace(J.fullPath,er({scroll:y&&v&&v.scroll},P)):a.push(J.fullPath,P)),c.value=J,Te(J,le,pe,y),he()}let ne;function $(){ne||(ne=a.listen((J,le,pe)=>{if(!Re.listening)return;const L=w(J),P=D(L);if(P){U(er(P,{replace:!0}),L).catch(np);return}l=L;const g=c.value;sd&&sme(W6(g.fullPath,pe.delta),P3()),x(L,g).catch(y=>bo(y,12)?y:bo(y,2)?(U(y.to,L).then(v=>{bo(v,20)&&!pe.delta&&pe.type===Dp.pop&&a.go(-1,!1)}).catch(np),Promise.reject()):(pe.delta&&a.go(-pe.delta,!1),ie(y,L,g))).then(y=>{y=y||X(L,g,!1),y&&(pe.delta&&!bo(y,8)?a.go(-pe.delta,!1):pe.type===Dp.pop&&bo(y,20)&&a.go(-1,!1)),F(L,g,y)}).catch(np)}))}let j=Eh(),Q=Eh(),se;function ie(J,le,pe){he(J);const L=Q.list();return L.length?L.forEach(P=>P(J,le,pe)):console.error(J),Promise.reject(J)}function be(){return se&&c.value!==du?Promise.resolve():new Promise((J,le)=>{j.add([J,le])})}function he(J){return se||(se=!J,$(),j.list().forEach(([le,pe])=>J?pe(J):le()),j.reset()),J}function Te(J,le,pe,L){const{scrollBehavior:P}=t;if(!sd||!P)return Promise.resolve();const g=!pe&&ome(W6(J.fullPath,0))||(L||!pe)&&history.state&&history.state.scroll||null;return j8().then(()=>P(J,le,g)).then(y=>y&&ame(y)).catch(y=>ie(y,J,le))}const Ne=J=>a.go(J);let ye;const ce=new Set,Re={currentRoute:c,listening:!0,addRoute:p,removeRoute:b,hasRoute:E,getRoutes:_,resolve:w,options:t,push:T,replace:I,go:Ne,back:()=>Ne(-1),forward:()=>Ne(1),beforeEach:s.add,beforeResolve:o.add,afterEach:u.add,onError:Q.add,isReady:be,install(J){const le=this;J.component("RouterLink",kme),J.component("RouterView",Wme),J.config.globalProperties.$router=le,Object.defineProperty(J.config.globalProperties,"$route",{enumerable:!0,get:()=>Dt(c)}),sd&&!ye&&c.value===du&&(ye=!0,T(a.location).catch(P=>{}));const pe={};for(const P in du)Object.defineProperty(pe,P,{get:()=>c.value[P],enumerable:!0});J.provide(Tx,le),J.provide(r$,O8(pe)),J.provide(gO,c);const L=J.unmount;ce.add(J),J.unmount=function(){ce.delete(J),ce.size<1&&(l=du,ne&&ne(),ne=null,c.value=du,ye=!1,se=!1),L()}}};function oe(J){return J.reduce((le,pe)=>le.then(()=>N(pe)),Promise.resolve())}return Re}function Kme(t,e){const r=[],n=[],a=[],s=Math.max(e.matched.length,t.matched.length);for(let o=0;oef(l,u))?n.push(u):r.push(u));const c=t.matched[o];c&&(e.matched.find(l=>ef(l,c))||a.push(c))}return[r,n,a]}const Jme=Xme({history:dme("/scholarly-browser/"),routes:[{path:"/",component:QB,props:!0}]}),n$=Fq(QB);n$.use(Jme);n$.mount("#app"); diff --git a/index.html b/index.html index 7ff1f24..482ad0a 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ Scholarly Browser - +