@kitelev/exocortex-cli 16.9.0 → 16.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +8 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
- // @kitelev/exocortex-cli v16.9.0
2
+ // @kitelev/exocortex-cli v16.9.1
3
3
  // CLI tool for Exocortex knowledge management system - SPARQL queries, task management, and more
4
4
  // License: MIT
5
5
 
6
- "use strict";var QD=Object.create;var fu=Object.defineProperty;var KD=Object.getOwnPropertyDescriptor;var YD=Object.getOwnPropertyNames;var XD=Object.getPrototypeOf,JD=Object.prototype.hasOwnProperty;var o=(n,e)=>fu(n,"name",{value:e,configurable:!0});var ZD=(n,e)=>()=>(n&&(e=n(n=0)),e);var b=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),py=(n,e)=>{for(var t in e)fu(n,t,{get:e[t],enumerable:!0})},o2=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of YD(e))!JD.call(n,i)&&i!==t&&fu(n,i,{get:()=>e[i],enumerable:!(r=KD(e,i))||r.enumerable});return n};var ce=(n,e,t)=>(t=n!=null?QD(XD(n)):{},o2(e||!n||!n.__esModule?fu(t,"default",{value:n,enumerable:!0}):t,n)),Sd=n=>o2(fu({},"__esModule",{value:!0}),n);var my=b(()=>{var c2;(function(n){(function(e){var t=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:c(),r=i(n);typeof t.Reflect<"u"&&(r=i(t.Reflect,r)),e(r,t),typeof t.Reflect>"u"&&(t.Reflect=n);function i(l,u){return function(f,d){Object.defineProperty(l,f,{configurable:!0,writable:!0,value:d}),u&&u(f,d)}}o(i,"makeExporter");function s(){try{return Function("return this;")()}catch{}}o(s,"functionThis");function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}o(a,"indirectEvalThis");function c(){return s()||a()}o(c,"sloppyModeThis")})(function(e,t){var r=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",s=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",c=typeof Object.create=="function",l={__proto__:[]}instanceof Array,u=!c&&!l,f={create:c?function(){return We(Object.create(null))}:l?function(){return We({__proto__:null})}:function(){return We({})},has:u?function(E,A){return r.call(E,A)}:function(E,A){return A in E},get:u?function(E,A){return r.call(E,A)?E[A]:void 0}:function(E,A){return E[A]}},d=Object.getPrototypeOf(Function),h=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:Se(),p=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:st(),y=typeof WeakMap=="function"?WeakMap:Ze(),S=i?Symbol.for("@reflect-metadata:registry"):void 0,v=ye(),w=_e(v);function T(E,A,x,F){if(H(x)){if(!ze(E))throw new TypeError;if(!He(A))throw new TypeError;return qe(E,A)}else{if(!ze(E))throw new TypeError;if(!te(A))throw new TypeError;if(!te(F)&&!H(F)&&!De(F))throw new TypeError;return De(F)&&(F=void 0),x=xe(x),et(E,A,x,F)}}o(T,"decorate"),e("decorate",T);function C(E,A){function x(F,X){if(!te(F))throw new TypeError;if(!H(X)&&!Je(X))throw new TypeError;Z(E,A,F,X)}return o(x,"decorator"),x}o(C,"metadata"),e("metadata",C);function M(E,A,x,F){if(!te(x))throw new TypeError;return H(F)||(F=xe(F)),Z(E,A,x,F)}o(M,"defineMetadata"),e("defineMetadata",M);function $(E,A,x){if(!te(A))throw new TypeError;return H(x)||(x=xe(x)),ve(E,A,x)}o($,"hasMetadata"),e("hasMetadata",$);function ee(E,A,x){if(!te(A))throw new TypeError;return H(x)||(x=xe(x)),$e(E,A,x)}o(ee,"hasOwnMetadata"),e("hasOwnMetadata",ee);function B(E,A,x){if(!te(A))throw new TypeError;return H(x)||(x=xe(x)),Re(E,A,x)}o(B,"getMetadata"),e("getMetadata",B);function z(E,A,x){if(!te(A))throw new TypeError;return H(x)||(x=xe(x)),ne(E,A,x)}o(z,"getOwnMetadata"),e("getOwnMetadata",z);function P(E,A){if(!te(E))throw new TypeError;return H(A)||(A=xe(A)),U(E,A)}o(P,"getMetadataKeys"),e("getMetadataKeys",P);function D(E,A){if(!te(E))throw new TypeError;return H(A)||(A=xe(A)),it(E,A)}o(D,"getOwnMetadataKeys"),e("getOwnMetadataKeys",D);function J(E,A,x){if(!te(A))throw new TypeError;if(H(x)||(x=xe(x)),!te(A))throw new TypeError;H(x)||(x=xe(x));var F=se(A,x,!1);return H(F)?!1:F.OrdinaryDeleteMetadata(E,A,x)}o(J,"deleteMetadata"),e("deleteMetadata",J);function qe(E,A){for(var x=E.length-1;x>=0;--x){var F=E[x],X=F(A);if(!H(X)&&!De(X)){if(!He(X))throw new TypeError;A=X}}return A}o(qe,"DecorateConstructor");function et(E,A,x,F){for(var X=E.length-1;X>=0;--X){var bt=E[X],xt=bt(A,x,F);if(!H(xt)&&!De(xt)){if(!te(xt))throw new TypeError;F=xt}}return F}o(et,"DecorateProperty");function ve(E,A,x){var F=$e(E,A,x);if(F)return!0;var X=oe(A);return De(X)?!1:ve(E,X,x)}o(ve,"OrdinaryHasMetadata");function $e(E,A,x){var F=se(A,x,!1);return H(F)?!1:Ge(F.OrdinaryHasOwnMetadata(E,A,x))}o($e,"OrdinaryHasOwnMetadata");function Re(E,A,x){var F=$e(E,A,x);if(F)return ne(E,A,x);var X=oe(A);if(!De(X))return Re(E,X,x)}o(Re,"OrdinaryGetMetadata");function ne(E,A,x){var F=se(A,x,!1);if(!H(F))return F.OrdinaryGetOwnMetadata(E,A,x)}o(ne,"OrdinaryGetOwnMetadata");function Z(E,A,x,F){var X=se(x,F,!0);X.OrdinaryDefineOwnMetadata(E,A,x,F)}o(Z,"OrdinaryDefineOwnMetadata");function U(E,A){var x=it(E,A),F=oe(E);if(F===null)return x;var X=U(F,A);if(X.length<=0)return x;if(x.length<=0)return X;for(var bt=new p,xt=[],ke=0,W=x;ke<W.length;ke++){var G=W[ke],Q=bt.has(G);Q||(bt.add(G),xt.push(G))}for(var K=0,Oe=X;K<Oe.length;K++){var G=Oe[K],Q=bt.has(G);Q||(bt.add(G),xt.push(G))}return xt}o(U,"OrdinaryMetadataKeys");function it(E,A){var x=se(E,A,!1);return x?x.OrdinaryOwnMetadataKeys(E,A):[]}o(it,"OrdinaryOwnMetadataKeys");function mt(E){if(E===null)return 1;switch(typeof E){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return E===null?1:6;default:return 6}}o(mt,"Type");function H(E){return E===void 0}o(H,"IsUndefined");function De(E){return E===null}o(De,"IsNull");function Qe(E){return typeof E=="symbol"}o(Qe,"IsSymbol");function te(E){return typeof E=="object"?E!==null:typeof E=="function"}o(te,"IsObject");function Ke(E,A){switch(mt(E)){case 0:return E;case 1:return E;case 2:return E;case 3:return E;case 4:return E;case 5:return E}var x=A===3?"string":A===5?"number":"default",F=pe(E,s);if(F!==void 0){var X=F.call(E,x);if(te(X))throw new TypeError;return X}return Ye(E,x==="default"?"number":x)}o(Ke,"ToPrimitive");function Ye(E,A){if(A==="string"){var x=E.toString;if(Ne(x)){var F=x.call(E);if(!te(F))return F}var X=E.valueOf;if(Ne(X)){var F=X.call(E);if(!te(F))return F}}else{var X=E.valueOf;if(Ne(X)){var F=X.call(E);if(!te(F))return F}var bt=E.toString;if(Ne(bt)){var F=bt.call(E);if(!te(F))return F}}throw new TypeError}o(Ye,"OrdinaryToPrimitive");function Ge(E){return!!E}o(Ge,"ToBoolean");function Xe(E){return""+E}o(Xe,"ToString");function xe(E){var A=Ke(E,3);return Qe(A)?A:Xe(A)}o(xe,"ToPropertyKey");function ze(E){return Array.isArray?Array.isArray(E):E instanceof Object?E instanceof Array:Object.prototype.toString.call(E)==="[object Array]"}o(ze,"IsArray");function Ne(E){return typeof E=="function"}o(Ne,"IsCallable");function He(E){return typeof E=="function"}o(He,"IsConstructor");function Je(E){switch(mt(E)){case 3:return!0;case 4:return!0;default:return!1}}o(Je,"IsPropertyKey");function le(E,A){return E===A||E!==E&&A!==A}o(le,"SameValueZero");function pe(E,A){var x=E[A];if(x!=null){if(!Ne(x))throw new TypeError;return x}}o(pe,"GetMethod");function me(E){var A=pe(E,a);if(!Ne(A))throw new TypeError;var x=A.call(E);if(!te(x))throw new TypeError;return x}o(me,"GetIterator");function ue(E){return E.value}o(ue,"IteratorValue");function fe(E){var A=E.next();return A.done?!1:A}o(fe,"IteratorStep");function de(E){var A=E.return;A&&A.call(E)}o(de,"IteratorClose");function oe(E){var A=Object.getPrototypeOf(E);if(typeof E!="function"||E===d||A!==d)return A;var x=E.prototype,F=x&&Object.getPrototypeOf(x);if(F==null||F===Object.prototype)return A;var X=F.constructor;return typeof X!="function"||X===E?A:X}o(oe,"OrdinaryGetPrototypeOf");function ge(){var E;!H(S)&&typeof t.Reflect<"u"&&!(S in t.Reflect)&&typeof t.Reflect.defineMetadata=="function"&&(E=be(t.Reflect));var A,x,F,X=new y,bt={registerProvider:xt,getProvider:W,setProvider:Q};return bt;function xt(K){if(!Object.isExtensible(bt))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case E===K:break;case H(A):A=K;break;case A===K:break;case H(x):x=K;break;case x===K:break;default:F===void 0&&(F=new p),F.add(K);break}}function ke(K,Oe){if(!H(A)){if(A.isProviderFor(K,Oe))return A;if(!H(x)){if(x.isProviderFor(K,Oe))return A;if(!H(F))for(var ot=me(F);;){var ct=fe(ot);if(!ct)return;var Cr=ue(ct);if(Cr.isProviderFor(K,Oe))return de(ot),Cr}}}if(!H(E)&&E.isProviderFor(K,Oe))return E}function W(K,Oe){var ot=X.get(K),ct;return H(ot)||(ct=ot.get(Oe)),H(ct)&&(ct=ke(K,Oe),H(ct)||(H(ot)&&(ot=new h,X.set(K,ot)),ot.set(Oe,ct))),ct}function G(K){if(H(K))throw new TypeError;return A===K||x===K||!H(F)&&F.has(K)}function Q(K,Oe,ot){if(!G(ot))throw new Error("Metadata provider not registered.");var ct=W(K,Oe);if(ct!==ot){if(!H(ct))return!1;var Cr=X.get(K);H(Cr)&&(Cr=new h,X.set(K,Cr)),Cr.set(Oe,ot)}return!0}}o(ge,"CreateMetadataRegistry");function ye(){var E;return!H(S)&&te(t.Reflect)&&Object.isExtensible(t.Reflect)&&(E=t.Reflect[S]),H(E)&&(E=ge()),!H(S)&&te(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,S,{enumerable:!1,configurable:!1,writable:!1,value:E}),E}o(ye,"GetOrCreateMetadataRegistry");function _e(E){var A=new y,x={isProviderFor:o(function(G,Q){var K=A.get(G);return H(K)?!1:K.has(Q)},"isProviderFor"),OrdinaryDefineOwnMetadata:xt,OrdinaryHasOwnMetadata:X,OrdinaryGetOwnMetadata:bt,OrdinaryOwnMetadataKeys:ke,OrdinaryDeleteMetadata:W};return v.registerProvider(x),x;function F(G,Q,K){var Oe=A.get(G),ot=!1;if(H(Oe)){if(!K)return;Oe=new h,A.set(G,Oe),ot=!0}var ct=Oe.get(Q);if(H(ct)){if(!K)return;if(ct=new h,Oe.set(Q,ct),!E.setProvider(G,Q,x))throw Oe.delete(Q),ot&&A.delete(G),new Error("Wrong provider for target.")}return ct}o(F,"GetOrCreateMetadataMap");function X(G,Q,K){var Oe=F(Q,K,!1);return H(Oe)?!1:Ge(Oe.has(G))}o(X,"OrdinaryHasOwnMetadata");function bt(G,Q,K){var Oe=F(Q,K,!1);if(!H(Oe))return Oe.get(G)}o(bt,"OrdinaryGetOwnMetadata");function xt(G,Q,K,Oe){var ot=F(K,Oe,!0);ot.set(G,Q)}o(xt,"OrdinaryDefineOwnMetadata");function ke(G,Q){var K=[],Oe=F(G,Q,!1);if(H(Oe))return K;for(var ot=Oe.keys(),ct=me(ot),Cr=0;;){var Sn=fe(ct);if(!Sn)return K.length=Cr,K;var Ln=ue(Sn);try{K[Cr]=Ln}catch(tn){try{de(ct)}finally{throw tn}}Cr++}}o(ke,"OrdinaryOwnMetadataKeys");function W(G,Q,K){var Oe=F(Q,K,!1);if(H(Oe)||!Oe.delete(G))return!1;if(Oe.size===0){var ot=A.get(Q);H(ot)||(ot.delete(K),ot.size===0&&A.delete(ot))}return!0}o(W,"OrdinaryDeleteMetadata")}o(_e,"CreateMetadataProvider");function be(E){var A=E.defineMetadata,x=E.hasOwnMetadata,F=E.getOwnMetadata,X=E.getOwnMetadataKeys,bt=E.deleteMetadata,xt=new y,ke={isProviderFor:o(function(W,G){var Q=xt.get(W);return!H(Q)&&Q.has(G)?!0:X(W,G).length?(H(Q)&&(Q=new p,xt.set(W,Q)),Q.add(G),!0):!1},"isProviderFor"),OrdinaryDefineOwnMetadata:A,OrdinaryHasOwnMetadata:x,OrdinaryGetOwnMetadata:F,OrdinaryOwnMetadataKeys:X,OrdinaryDeleteMetadata:bt};return ke}o(be,"CreateFallbackProvider");function se(E,A,x){var F=v.getProvider(E,A);if(!H(F))return F;if(x){if(v.setProvider(E,A,w))return w;throw new Error("Illegal state.")}}o(se,"GetMetadataProvider");function Se(){var E={},A=[],x=(function(){function ke(W,G,Q){this._index=0,this._keys=W,this._values=G,this._selector=Q}return o(ke,"MapIterator"),ke.prototype["@@iterator"]=function(){return this},ke.prototype[a]=function(){return this},ke.prototype.next=function(){var W=this._index;if(W>=0&&W<this._keys.length){var G=this._selector(this._keys[W],this._values[W]);return W+1>=this._keys.length?(this._index=-1,this._keys=A,this._values=A):this._index++,{value:G,done:!1}}return{value:void 0,done:!0}},ke.prototype.throw=function(W){throw this._index>=0&&(this._index=-1,this._keys=A,this._values=A),W},ke.prototype.return=function(W){return this._index>=0&&(this._index=-1,this._keys=A,this._values=A),{value:W,done:!0}},ke})(),F=(function(){function ke(){this._keys=[],this._values=[],this._cacheKey=E,this._cacheIndex=-2}return o(ke,"Map"),Object.defineProperty(ke.prototype,"size",{get:o(function(){return this._keys.length},"get"),enumerable:!0,configurable:!0}),ke.prototype.has=function(W){return this._find(W,!1)>=0},ke.prototype.get=function(W){var G=this._find(W,!1);return G>=0?this._values[G]:void 0},ke.prototype.set=function(W,G){var Q=this._find(W,!0);return this._values[Q]=G,this},ke.prototype.delete=function(W){var G=this._find(W,!1);if(G>=0){for(var Q=this._keys.length,K=G+1;K<Q;K++)this._keys[K-1]=this._keys[K],this._values[K-1]=this._values[K];return this._keys.length--,this._values.length--,le(W,this._cacheKey)&&(this._cacheKey=E,this._cacheIndex=-2),!0}return!1},ke.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=E,this._cacheIndex=-2},ke.prototype.keys=function(){return new x(this._keys,this._values,X)},ke.prototype.values=function(){return new x(this._keys,this._values,bt)},ke.prototype.entries=function(){return new x(this._keys,this._values,xt)},ke.prototype["@@iterator"]=function(){return this.entries()},ke.prototype[a]=function(){return this.entries()},ke.prototype._find=function(W,G){if(!le(this._cacheKey,W)){this._cacheIndex=-1;for(var Q=0;Q<this._keys.length;Q++)if(le(this._keys[Q],W)){this._cacheIndex=Q;break}}return this._cacheIndex<0&&G&&(this._cacheIndex=this._keys.length,this._keys.push(W),this._values.push(void 0)),this._cacheIndex},ke})();return F;function X(ke,W){return ke}function bt(ke,W){return W}function xt(ke,W){return[ke,W]}}o(Se,"CreateMapPolyfill");function st(){var E=(function(){function A(){this._map=new h}return o(A,"Set"),Object.defineProperty(A.prototype,"size",{get:o(function(){return this._map.size},"get"),enumerable:!0,configurable:!0}),A.prototype.has=function(x){return this._map.has(x)},A.prototype.add=function(x){return this._map.set(x,x),this},A.prototype.delete=function(x){return this._map.delete(x)},A.prototype.clear=function(){this._map.clear()},A.prototype.keys=function(){return this._map.keys()},A.prototype.values=function(){return this._map.keys()},A.prototype.entries=function(){return this._map.entries()},A.prototype["@@iterator"]=function(){return this.keys()},A.prototype[a]=function(){return this.keys()},A})();return E}o(st,"CreateSetPolyfill");function Ze(){var E=16,A=f.create(),x=F();return(function(){function W(){this._key=F()}return o(W,"WeakMap"),W.prototype.has=function(G){var Q=X(G,!1);return Q!==void 0?f.has(Q,this._key):!1},W.prototype.get=function(G){var Q=X(G,!1);return Q!==void 0?f.get(Q,this._key):void 0},W.prototype.set=function(G,Q){var K=X(G,!0);return K[this._key]=Q,this},W.prototype.delete=function(G){var Q=X(G,!1);return Q!==void 0?delete Q[this._key]:!1},W.prototype.clear=function(){this._key=F()},W})();function F(){var W;do W="@@WeakMap@@"+ke();while(f.has(A,W));return A[W]=!0,W}function X(W,G){if(!r.call(W,x)){if(!G)return;Object.defineProperty(W,x,{value:f.create()})}return W[x]}function bt(W,G){for(var Q=0;Q<G;++Q)W[Q]=Math.random()*255|0;return W}function xt(W){if(typeof Uint8Array=="function"){var G=new Uint8Array(W);return typeof crypto<"u"?crypto.getRandomValues(G):typeof msCrypto<"u"?msCrypto.getRandomValues(G):bt(G,W),G}return bt(new Array(W),W)}function ke(){var W=xt(E);W[6]=W[6]&79|64,W[8]=W[8]&191|128;for(var G="",Q=0;Q<E;++Q){var K=W[Q];(Q===4||Q===6||Q===8)&&(G+="-"),K<16&&(G+="0"),G+=K.toString(16).toLowerCase()}return G}}o(Ze,"CreateWeakMapPolyfill");function We(E){return E.__=void 0,delete E.__,E}o(We,"MakeDictionary")})})(c2||(c2={}))});var du=b(yy=>{var wd=class extends Error{static{o(this,"CommanderError")}constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},gy=class extends wd{static{o(this,"InvalidArgumentError")}constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};yy.CommanderError=wd;yy.InvalidArgumentError=gy});var vd=b(by=>{var{InvalidArgumentError:eN}=du(),_y=class{static{o(this,"Argument")}constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new eN(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,r):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function tN(n){let e=n.name()+(n.variadic===!0?"...":"");return n.required?"<"+e+">":"["+e+"]"}o(tN,"humanReadableArgName");by.Argument=_y;by.humanReadableArgName=tN});var vy=b(wy=>{var{humanReadableArgName:rN}=vd(),Sy=class{static{o(this,"Help")}constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(i=>!i._hidden),r=e._getHelpCommand();return r&&!r._hidden&&t.push(r),this.sortSubcommands&&t.sort((i,s)=>i.name().localeCompare(s.name())),t}compareOptions(e,t){let r=o(i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,""),"getSortKey");return r(e).localeCompare(r(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),r=e._getHelpOption();if(r&&!r.hidden){let i=r.short&&e._findOption(r.short),s=r.long&&e._findOption(r.long);!i&&!s?t.push(r):r.long&&!s?t.push(e.createOption(r.long,r.description)):r.short&&!i&&t.push(e.createOption(r.short,r.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let r=e.parent;r;r=r.parent){let i=r.options.filter(s=>!s.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(r=>rN(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(i)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(i)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let r="";for(let i=e.parent;i;i=i.parent)r=i.name()+" "+r;return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatItemList(e,t,r){return t.length===0?[]:[r.styleTitle(e),...t,""]}groupItems(e,t,r){let i=new Map;return e.forEach(s=>{let a=r(s);i.has(a)||i.set(a,[])}),t.forEach(s=>{let a=r(s);i.has(a)||i.set(a,[]),i.get(a).push(s)}),i}formatHelp(e,t){let r=t.padWidth(e,t),i=t.helpWidth??80;function s(d,h){return t.formatItem(d,r,h,t)}o(s,"callFormatItem");let a=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],c=t.commandDescription(e);c.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(c),i),""]));let l=t.visibleArguments(e).map(d=>s(t.styleArgumentTerm(t.argumentTerm(d)),t.styleArgumentDescription(t.argumentDescription(d))));if(a=a.concat(this.formatItemList("Arguments:",l,t)),this.groupItems(e.options,t.visibleOptions(e),d=>d.helpGroupHeading??"Options:").forEach((d,h)=>{let p=d.map(y=>s(t.styleOptionTerm(t.optionTerm(y)),t.styleOptionDescription(t.optionDescription(y))));a=a.concat(this.formatItemList(h,p,t))}),t.showGlobalOptions){let d=t.visibleGlobalOptions(e).map(h=>s(t.styleOptionTerm(t.optionTerm(h)),t.styleOptionDescription(t.optionDescription(h))));a=a.concat(this.formatItemList("Global Options:",d,t))}return this.groupItems(e.commands,t.visibleCommands(e),d=>d.helpGroup()||"Commands:").forEach((d,h)=>{let p=d.map(y=>s(t.styleSubcommandTerm(t.subcommandTerm(y)),t.styleSubcommandDescription(t.subcommandDescription(y))));a=a.concat(this.formatItemList(h,p,t))}),a.join(`
6
+ "use strict";var QD=Object.create;var fu=Object.defineProperty;var KD=Object.getOwnPropertyDescriptor;var YD=Object.getOwnPropertyNames;var XD=Object.getPrototypeOf,JD=Object.prototype.hasOwnProperty;var o=(n,e)=>fu(n,"name",{value:e,configurable:!0});var ZD=(n,e)=>()=>(n&&(e=n(n=0)),e);var b=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),py=(n,e)=>{for(var t in e)fu(n,t,{get:e[t],enumerable:!0})},o2=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of YD(e))!JD.call(n,i)&&i!==t&&fu(n,i,{get:()=>e[i],enumerable:!(r=KD(e,i))||r.enumerable});return n};var ce=(n,e,t)=>(t=n!=null?QD(XD(n)):{},o2(e||!n||!n.__esModule?fu(t,"default",{value:n,enumerable:!0}):t,n)),Sd=n=>o2(fu({},"__esModule",{value:!0}),n);var my=b(()=>{var c2;(function(n){(function(e){var t=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:c(),r=i(n);typeof t.Reflect<"u"&&(r=i(t.Reflect,r)),e(r,t),typeof t.Reflect>"u"&&(t.Reflect=n);function i(l,u){return function(f,d){Object.defineProperty(l,f,{configurable:!0,writable:!0,value:d}),u&&u(f,d)}}o(i,"makeExporter");function s(){try{return Function("return this;")()}catch{}}o(s,"functionThis");function a(){try{return(0,eval)("(function() { return this; })()")}catch{}}o(a,"indirectEvalThis");function c(){return s()||a()}o(c,"sloppyModeThis")})(function(e,t){var r=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",s=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",a=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",c=typeof Object.create=="function",l={__proto__:[]}instanceof Array,u=!c&&!l,f={create:c?function(){return We(Object.create(null))}:l?function(){return We({__proto__:null})}:function(){return We({})},has:u?function(E,A){return r.call(E,A)}:function(E,A){return A in E},get:u?function(E,A){return r.call(E,A)?E[A]:void 0}:function(E,A){return E[A]}},d=Object.getPrototypeOf(Function),h=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:we(),p=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:st(),y=typeof WeakMap=="function"?WeakMap:Ze(),S=i?Symbol.for("@reflect-metadata:registry"):void 0,v=_e(),w=be(v);function T(E,A,x,F){if(H(x)){if(!ze(E))throw new TypeError;if(!He(A))throw new TypeError;return qe(E,A)}else{if(!ze(E))throw new TypeError;if(!te(A))throw new TypeError;if(!te(F)&&!H(F)&&!De(F))throw new TypeError;return De(F)&&(F=void 0),x=xe(x),et(E,A,x,F)}}o(T,"decorate"),e("decorate",T);function C(E,A){function x(F,X){if(!te(F))throw new TypeError;if(!H(X)&&!Je(X))throw new TypeError;Z(E,A,F,X)}return o(x,"decorator"),x}o(C,"metadata"),e("metadata",C);function M(E,A,x,F){if(!te(x))throw new TypeError;return H(F)||(F=xe(F)),Z(E,A,x,F)}o(M,"defineMetadata"),e("defineMetadata",M);function $(E,A,x){if(!te(A))throw new TypeError;return H(x)||(x=xe(x)),pe(E,A,x)}o($,"hasMetadata"),e("hasMetadata",$);function ee(E,A,x){if(!te(A))throw new TypeError;return H(x)||(x=xe(x)),$e(E,A,x)}o(ee,"hasOwnMetadata"),e("hasOwnMetadata",ee);function B(E,A,x){if(!te(A))throw new TypeError;return H(x)||(x=xe(x)),Re(E,A,x)}o(B,"getMetadata"),e("getMetadata",B);function z(E,A,x){if(!te(A))throw new TypeError;return H(x)||(x=xe(x)),ne(E,A,x)}o(z,"getOwnMetadata"),e("getOwnMetadata",z);function P(E,A){if(!te(E))throw new TypeError;return H(A)||(A=xe(A)),U(E,A)}o(P,"getMetadataKeys"),e("getMetadataKeys",P);function D(E,A){if(!te(E))throw new TypeError;return H(A)||(A=xe(A)),it(E,A)}o(D,"getOwnMetadataKeys"),e("getOwnMetadataKeys",D);function J(E,A,x){if(!te(A))throw new TypeError;if(H(x)||(x=xe(x)),!te(A))throw new TypeError;H(x)||(x=xe(x));var F=se(A,x,!1);return H(F)?!1:F.OrdinaryDeleteMetadata(E,A,x)}o(J,"deleteMetadata"),e("deleteMetadata",J);function qe(E,A){for(var x=E.length-1;x>=0;--x){var F=E[x],X=F(A);if(!H(X)&&!De(X)){if(!He(X))throw new TypeError;A=X}}return A}o(qe,"DecorateConstructor");function et(E,A,x,F){for(var X=E.length-1;X>=0;--X){var bt=E[X],xt=bt(A,x,F);if(!H(xt)&&!De(xt)){if(!te(xt))throw new TypeError;F=xt}}return F}o(et,"DecorateProperty");function pe(E,A,x){var F=$e(E,A,x);if(F)return!0;var X=oe(A);return De(X)?!1:pe(E,X,x)}o(pe,"OrdinaryHasMetadata");function $e(E,A,x){var F=se(A,x,!1);return H(F)?!1:Ge(F.OrdinaryHasOwnMetadata(E,A,x))}o($e,"OrdinaryHasOwnMetadata");function Re(E,A,x){var F=$e(E,A,x);if(F)return ne(E,A,x);var X=oe(A);if(!De(X))return Re(E,X,x)}o(Re,"OrdinaryGetMetadata");function ne(E,A,x){var F=se(A,x,!1);if(!H(F))return F.OrdinaryGetOwnMetadata(E,A,x)}o(ne,"OrdinaryGetOwnMetadata");function Z(E,A,x,F){var X=se(x,F,!0);X.OrdinaryDefineOwnMetadata(E,A,x,F)}o(Z,"OrdinaryDefineOwnMetadata");function U(E,A){var x=it(E,A),F=oe(E);if(F===null)return x;var X=U(F,A);if(X.length<=0)return x;if(x.length<=0)return X;for(var bt=new p,xt=[],ke=0,W=x;ke<W.length;ke++){var G=W[ke],Q=bt.has(G);Q||(bt.add(G),xt.push(G))}for(var K=0,Oe=X;K<Oe.length;K++){var G=Oe[K],Q=bt.has(G);Q||(bt.add(G),xt.push(G))}return xt}o(U,"OrdinaryMetadataKeys");function it(E,A){var x=se(E,A,!1);return x?x.OrdinaryOwnMetadataKeys(E,A):[]}o(it,"OrdinaryOwnMetadataKeys");function mt(E){if(E===null)return 1;switch(typeof E){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return E===null?1:6;default:return 6}}o(mt,"Type");function H(E){return E===void 0}o(H,"IsUndefined");function De(E){return E===null}o(De,"IsNull");function Qe(E){return typeof E=="symbol"}o(Qe,"IsSymbol");function te(E){return typeof E=="object"?E!==null:typeof E=="function"}o(te,"IsObject");function Ke(E,A){switch(mt(E)){case 0:return E;case 1:return E;case 2:return E;case 3:return E;case 4:return E;case 5:return E}var x=A===3?"string":A===5?"number":"default",F=me(E,s);if(F!==void 0){var X=F.call(E,x);if(te(X))throw new TypeError;return X}return Ye(E,x==="default"?"number":x)}o(Ke,"ToPrimitive");function Ye(E,A){if(A==="string"){var x=E.toString;if(Ne(x)){var F=x.call(E);if(!te(F))return F}var X=E.valueOf;if(Ne(X)){var F=X.call(E);if(!te(F))return F}}else{var X=E.valueOf;if(Ne(X)){var F=X.call(E);if(!te(F))return F}var bt=E.toString;if(Ne(bt)){var F=bt.call(E);if(!te(F))return F}}throw new TypeError}o(Ye,"OrdinaryToPrimitive");function Ge(E){return!!E}o(Ge,"ToBoolean");function Xe(E){return""+E}o(Xe,"ToString");function xe(E){var A=Ke(E,3);return Qe(A)?A:Xe(A)}o(xe,"ToPropertyKey");function ze(E){return Array.isArray?Array.isArray(E):E instanceof Object?E instanceof Array:Object.prototype.toString.call(E)==="[object Array]"}o(ze,"IsArray");function Ne(E){return typeof E=="function"}o(Ne,"IsCallable");function He(E){return typeof E=="function"}o(He,"IsConstructor");function Je(E){switch(mt(E)){case 3:return!0;case 4:return!0;default:return!1}}o(Je,"IsPropertyKey");function le(E,A){return E===A||E!==E&&A!==A}o(le,"SameValueZero");function me(E,A){var x=E[A];if(x!=null){if(!Ne(x))throw new TypeError;return x}}o(me,"GetMethod");function ge(E){var A=me(E,a);if(!Ne(A))throw new TypeError;var x=A.call(E);if(!te(x))throw new TypeError;return x}o(ge,"GetIterator");function ue(E){return E.value}o(ue,"IteratorValue");function fe(E){var A=E.next();return A.done?!1:A}o(fe,"IteratorStep");function de(E){var A=E.return;A&&A.call(E)}o(de,"IteratorClose");function oe(E){var A=Object.getPrototypeOf(E);if(typeof E!="function"||E===d||A!==d)return A;var x=E.prototype,F=x&&Object.getPrototypeOf(x);if(F==null||F===Object.prototype)return A;var X=F.constructor;return typeof X!="function"||X===E?A:X}o(oe,"OrdinaryGetPrototypeOf");function ye(){var E;!H(S)&&typeof t.Reflect<"u"&&!(S in t.Reflect)&&typeof t.Reflect.defineMetadata=="function"&&(E=Se(t.Reflect));var A,x,F,X=new y,bt={registerProvider:xt,getProvider:W,setProvider:Q};return bt;function xt(K){if(!Object.isExtensible(bt))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case E===K:break;case H(A):A=K;break;case A===K:break;case H(x):x=K;break;case x===K:break;default:F===void 0&&(F=new p),F.add(K);break}}function ke(K,Oe){if(!H(A)){if(A.isProviderFor(K,Oe))return A;if(!H(x)){if(x.isProviderFor(K,Oe))return A;if(!H(F))for(var ot=ge(F);;){var ct=fe(ot);if(!ct)return;var Cr=ue(ct);if(Cr.isProviderFor(K,Oe))return de(ot),Cr}}}if(!H(E)&&E.isProviderFor(K,Oe))return E}function W(K,Oe){var ot=X.get(K),ct;return H(ot)||(ct=ot.get(Oe)),H(ct)&&(ct=ke(K,Oe),H(ct)||(H(ot)&&(ot=new h,X.set(K,ot)),ot.set(Oe,ct))),ct}function G(K){if(H(K))throw new TypeError;return A===K||x===K||!H(F)&&F.has(K)}function Q(K,Oe,ot){if(!G(ot))throw new Error("Metadata provider not registered.");var ct=W(K,Oe);if(ct!==ot){if(!H(ct))return!1;var Cr=X.get(K);H(Cr)&&(Cr=new h,X.set(K,Cr)),Cr.set(Oe,ot)}return!0}}o(ye,"CreateMetadataRegistry");function _e(){var E;return!H(S)&&te(t.Reflect)&&Object.isExtensible(t.Reflect)&&(E=t.Reflect[S]),H(E)&&(E=ye()),!H(S)&&te(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,S,{enumerable:!1,configurable:!1,writable:!1,value:E}),E}o(_e,"GetOrCreateMetadataRegistry");function be(E){var A=new y,x={isProviderFor:o(function(G,Q){var K=A.get(G);return H(K)?!1:K.has(Q)},"isProviderFor"),OrdinaryDefineOwnMetadata:xt,OrdinaryHasOwnMetadata:X,OrdinaryGetOwnMetadata:bt,OrdinaryOwnMetadataKeys:ke,OrdinaryDeleteMetadata:W};return v.registerProvider(x),x;function F(G,Q,K){var Oe=A.get(G),ot=!1;if(H(Oe)){if(!K)return;Oe=new h,A.set(G,Oe),ot=!0}var ct=Oe.get(Q);if(H(ct)){if(!K)return;if(ct=new h,Oe.set(Q,ct),!E.setProvider(G,Q,x))throw Oe.delete(Q),ot&&A.delete(G),new Error("Wrong provider for target.")}return ct}o(F,"GetOrCreateMetadataMap");function X(G,Q,K){var Oe=F(Q,K,!1);return H(Oe)?!1:Ge(Oe.has(G))}o(X,"OrdinaryHasOwnMetadata");function bt(G,Q,K){var Oe=F(Q,K,!1);if(!H(Oe))return Oe.get(G)}o(bt,"OrdinaryGetOwnMetadata");function xt(G,Q,K,Oe){var ot=F(K,Oe,!0);ot.set(G,Q)}o(xt,"OrdinaryDefineOwnMetadata");function ke(G,Q){var K=[],Oe=F(G,Q,!1);if(H(Oe))return K;for(var ot=Oe.keys(),ct=ge(ot),Cr=0;;){var Sn=fe(ct);if(!Sn)return K.length=Cr,K;var Ln=ue(Sn);try{K[Cr]=Ln}catch(tn){try{de(ct)}finally{throw tn}}Cr++}}o(ke,"OrdinaryOwnMetadataKeys");function W(G,Q,K){var Oe=F(Q,K,!1);if(H(Oe)||!Oe.delete(G))return!1;if(Oe.size===0){var ot=A.get(Q);H(ot)||(ot.delete(K),ot.size===0&&A.delete(ot))}return!0}o(W,"OrdinaryDeleteMetadata")}o(be,"CreateMetadataProvider");function Se(E){var A=E.defineMetadata,x=E.hasOwnMetadata,F=E.getOwnMetadata,X=E.getOwnMetadataKeys,bt=E.deleteMetadata,xt=new y,ke={isProviderFor:o(function(W,G){var Q=xt.get(W);return!H(Q)&&Q.has(G)?!0:X(W,G).length?(H(Q)&&(Q=new p,xt.set(W,Q)),Q.add(G),!0):!1},"isProviderFor"),OrdinaryDefineOwnMetadata:A,OrdinaryHasOwnMetadata:x,OrdinaryGetOwnMetadata:F,OrdinaryOwnMetadataKeys:X,OrdinaryDeleteMetadata:bt};return ke}o(Se,"CreateFallbackProvider");function se(E,A,x){var F=v.getProvider(E,A);if(!H(F))return F;if(x){if(v.setProvider(E,A,w))return w;throw new Error("Illegal state.")}}o(se,"GetMetadataProvider");function we(){var E={},A=[],x=(function(){function ke(W,G,Q){this._index=0,this._keys=W,this._values=G,this._selector=Q}return o(ke,"MapIterator"),ke.prototype["@@iterator"]=function(){return this},ke.prototype[a]=function(){return this},ke.prototype.next=function(){var W=this._index;if(W>=0&&W<this._keys.length){var G=this._selector(this._keys[W],this._values[W]);return W+1>=this._keys.length?(this._index=-1,this._keys=A,this._values=A):this._index++,{value:G,done:!1}}return{value:void 0,done:!0}},ke.prototype.throw=function(W){throw this._index>=0&&(this._index=-1,this._keys=A,this._values=A),W},ke.prototype.return=function(W){return this._index>=0&&(this._index=-1,this._keys=A,this._values=A),{value:W,done:!0}},ke})(),F=(function(){function ke(){this._keys=[],this._values=[],this._cacheKey=E,this._cacheIndex=-2}return o(ke,"Map"),Object.defineProperty(ke.prototype,"size",{get:o(function(){return this._keys.length},"get"),enumerable:!0,configurable:!0}),ke.prototype.has=function(W){return this._find(W,!1)>=0},ke.prototype.get=function(W){var G=this._find(W,!1);return G>=0?this._values[G]:void 0},ke.prototype.set=function(W,G){var Q=this._find(W,!0);return this._values[Q]=G,this},ke.prototype.delete=function(W){var G=this._find(W,!1);if(G>=0){for(var Q=this._keys.length,K=G+1;K<Q;K++)this._keys[K-1]=this._keys[K],this._values[K-1]=this._values[K];return this._keys.length--,this._values.length--,le(W,this._cacheKey)&&(this._cacheKey=E,this._cacheIndex=-2),!0}return!1},ke.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=E,this._cacheIndex=-2},ke.prototype.keys=function(){return new x(this._keys,this._values,X)},ke.prototype.values=function(){return new x(this._keys,this._values,bt)},ke.prototype.entries=function(){return new x(this._keys,this._values,xt)},ke.prototype["@@iterator"]=function(){return this.entries()},ke.prototype[a]=function(){return this.entries()},ke.prototype._find=function(W,G){if(!le(this._cacheKey,W)){this._cacheIndex=-1;for(var Q=0;Q<this._keys.length;Q++)if(le(this._keys[Q],W)){this._cacheIndex=Q;break}}return this._cacheIndex<0&&G&&(this._cacheIndex=this._keys.length,this._keys.push(W),this._values.push(void 0)),this._cacheIndex},ke})();return F;function X(ke,W){return ke}function bt(ke,W){return W}function xt(ke,W){return[ke,W]}}o(we,"CreateMapPolyfill");function st(){var E=(function(){function A(){this._map=new h}return o(A,"Set"),Object.defineProperty(A.prototype,"size",{get:o(function(){return this._map.size},"get"),enumerable:!0,configurable:!0}),A.prototype.has=function(x){return this._map.has(x)},A.prototype.add=function(x){return this._map.set(x,x),this},A.prototype.delete=function(x){return this._map.delete(x)},A.prototype.clear=function(){this._map.clear()},A.prototype.keys=function(){return this._map.keys()},A.prototype.values=function(){return this._map.keys()},A.prototype.entries=function(){return this._map.entries()},A.prototype["@@iterator"]=function(){return this.keys()},A.prototype[a]=function(){return this.keys()},A})();return E}o(st,"CreateSetPolyfill");function Ze(){var E=16,A=f.create(),x=F();return(function(){function W(){this._key=F()}return o(W,"WeakMap"),W.prototype.has=function(G){var Q=X(G,!1);return Q!==void 0?f.has(Q,this._key):!1},W.prototype.get=function(G){var Q=X(G,!1);return Q!==void 0?f.get(Q,this._key):void 0},W.prototype.set=function(G,Q){var K=X(G,!0);return K[this._key]=Q,this},W.prototype.delete=function(G){var Q=X(G,!1);return Q!==void 0?delete Q[this._key]:!1},W.prototype.clear=function(){this._key=F()},W})();function F(){var W;do W="@@WeakMap@@"+ke();while(f.has(A,W));return A[W]=!0,W}function X(W,G){if(!r.call(W,x)){if(!G)return;Object.defineProperty(W,x,{value:f.create()})}return W[x]}function bt(W,G){for(var Q=0;Q<G;++Q)W[Q]=Math.random()*255|0;return W}function xt(W){if(typeof Uint8Array=="function"){var G=new Uint8Array(W);return typeof crypto<"u"?crypto.getRandomValues(G):typeof msCrypto<"u"?msCrypto.getRandomValues(G):bt(G,W),G}return bt(new Array(W),W)}function ke(){var W=xt(E);W[6]=W[6]&79|64,W[8]=W[8]&191|128;for(var G="",Q=0;Q<E;++Q){var K=W[Q];(Q===4||Q===6||Q===8)&&(G+="-"),K<16&&(G+="0"),G+=K.toString(16).toLowerCase()}return G}}o(Ze,"CreateWeakMapPolyfill");function We(E){return E.__=void 0,delete E.__,E}o(We,"MakeDictionary")})})(c2||(c2={}))});var du=b(yy=>{var wd=class extends Error{static{o(this,"CommanderError")}constructor(e,t,r){super(r),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},gy=class extends wd{static{o(this,"InvalidArgumentError")}constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};yy.CommanderError=wd;yy.InvalidArgumentError=gy});var vd=b(by=>{var{InvalidArgumentError:eN}=du(),_y=class{static{o(this,"Argument")}constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e;break}this._name.endsWith("...")&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(t,r)=>{if(!this.argChoices.includes(t))throw new eN(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._collectValue(t,r):t},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function tN(n){let e=n.name()+(n.variadic===!0?"...":"");return n.required?"<"+e+">":"["+e+"]"}o(tN,"humanReadableArgName");by.Argument=_y;by.humanReadableArgName=tN});var vy=b(wy=>{var{humanReadableArgName:rN}=vd(),Sy=class{static{o(this,"Help")}constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(i=>!i._hidden),r=e._getHelpCommand();return r&&!r._hidden&&t.push(r),this.sortSubcommands&&t.sort((i,s)=>i.name().localeCompare(s.name())),t}compareOptions(e,t){let r=o(i=>i.short?i.short.replace(/^-/,""):i.long.replace(/^--/,""),"getSortKey");return r(e).localeCompare(r(t))}visibleOptions(e){let t=e.options.filter(i=>!i.hidden),r=e._getHelpOption();if(r&&!r.hidden){let i=r.short&&e._findOption(r.short),s=r.long&&e._findOption(r.long);!i&&!s?t.push(r):r.long&&!s?t.push(e.createOption(r.long,r.description)):r.short&&!i&&t.push(e.createOption(r.short,r.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let r=e.parent;r;r=r.parent){let i=r.options.filter(s=>!s.hidden);t.push(...i)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||""}),e.registeredArguments.find(t=>t.description)?e.registeredArguments:[]}subcommandTerm(e){let t=e.registeredArguments.map(r=>rN(r)).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(i)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleOptionTerm(t.optionTerm(i)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((r,i)=>Math.max(r,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(i)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let r="";for(let i=e.parent;i;i=i.parent)r=i.name()+" "+r;return r+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue=="boolean")&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(r=>JSON.stringify(r)).join(", ")}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let r=`(${t.join(", ")})`;return e.description?`${e.description} ${r}`:r}return e.description}formatItemList(e,t,r){return t.length===0?[]:[r.styleTitle(e),...t,""]}groupItems(e,t,r){let i=new Map;return e.forEach(s=>{let a=r(s);i.has(a)||i.set(a,[])}),t.forEach(s=>{let a=r(s);i.has(a)||i.set(a,[]),i.get(a).push(s)}),i}formatHelp(e,t){let r=t.padWidth(e,t),i=t.helpWidth??80;function s(d,h){return t.formatItem(d,r,h,t)}o(s,"callFormatItem");let a=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],c=t.commandDescription(e);c.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(c),i),""]));let l=t.visibleArguments(e).map(d=>s(t.styleArgumentTerm(t.argumentTerm(d)),t.styleArgumentDescription(t.argumentDescription(d))));if(a=a.concat(this.formatItemList("Arguments:",l,t)),this.groupItems(e.options,t.visibleOptions(e),d=>d.helpGroupHeading??"Options:").forEach((d,h)=>{let p=d.map(y=>s(t.styleOptionTerm(t.optionTerm(y)),t.styleOptionDescription(t.optionDescription(y))));a=a.concat(this.formatItemList(h,p,t))}),t.showGlobalOptions){let d=t.visibleGlobalOptions(e).map(h=>s(t.styleOptionTerm(t.optionTerm(h)),t.styleOptionDescription(t.optionDescription(h))));a=a.concat(this.formatItemList("Global Options:",d,t))}return this.groupItems(e.commands,t.visibleCommands(e),d=>d.helpGroup()||"Commands:").forEach((d,h)=>{let p=d.map(y=>s(t.styleSubcommandTerm(t.subcommandTerm(y)),t.styleSubcommandDescription(t.subcommandDescription(y))));a=a.concat(this.formatItemList(h,p,t))}),a.join(`
7
7
  `)}displayWidth(e){return l2(e).length}styleTitle(e){return e}styleUsage(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t==="[command]"?this.styleSubcommandText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleCommandText(t)).join(" ")}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(" ").map(t=>t==="[options]"?this.styleOptionText(t):t[0]==="["||t[0]==="<"?this.styleArgumentText(t):this.styleSubcommandText(t)).join(" ")}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,r,i){let a=" ".repeat(2);if(!r)return a+e;let c=e.padEnd(t+e.length-i.displayWidth(e)),l=2,f=(this.helpWidth??80)-t-l-2,d;return f<this.minWidthToWrap||i.preformatted(r)?d=r:d=i.boxWrap(r,f).replace(/\n/g,`
8
8
  `+" ".repeat(t+l)),a+c+" ".repeat(l)+d.replace(/\n/g,`
9
9
  ${a}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,s=[];return r.forEach(a=>{let c=a.match(i);if(c===null){s.push("");return}let l=[c.shift()],u=this.displayWidth(l[0]);c.forEach(f=>{let d=this.displayWidth(f);if(u+d<=t){l.push(f),u+=d;return}s.push(l.join(""));let h=f.trimStart();l=[h],u=this.displayWidth(h)}),s.push(l.join(""))}),s.join(`
@@ -30,7 +30,7 @@ Expecting one of '${r.join("', '")}'`);return this._lifeCycleHooks[e]?this._life
30
30
  Expecting one of '${r.join("', '")}'`);let i=`${e}Help`;return this.on(i,s=>{let a;typeof t=="function"?a=t({error:s.error,command:s.command}):a=t,a&&s.write(`${a}
31
31
  `)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(i=>t.is(i))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function m2(n){return n.map(e=>{if(!e.startsWith("--inspect"))return e;let t,r="127.0.0.1",i="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?i=s[3]:r=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],r=s[3],i=s[4]),t&&i!=="0"?`${t}=${r}:${parseInt(i)+1}`:e})}o(m2,"incrementNodeInspectorPort");function Oy(){if(ut.env.NO_COLOR||ut.env.FORCE_COLOR==="0"||ut.env.FORCE_COLOR==="false")return!1;if(ut.env.FORCE_COLOR||ut.env.CLICOLOR_FORCE!==void 0)return!0}o(Oy,"useColor");Py.Command=Ry;Py.useColor=Oy});var S2=b(Hn=>{var{Argument:y2}=vd(),{Command:Fy}=g2(),{CommanderError:hN,InvalidArgumentError:_2}=du(),{Help:pN}=vy(),{Option:b2}=xy();Hn.program=new Fy;Hn.createCommand=n=>new Fy(n);Hn.createOption=(n,e)=>new b2(n,e);Hn.createArgument=(n,e)=>new y2(n,e);Hn.Command=Fy;Hn.Option=b2;Hn.Argument=y2;Hn.Help=pN;Hn.CommanderError=hN;Hn.InvalidArgumentError=_2;Hn.InvalidOptionArgumentError=_2});var hu=b(Td=>{"use strict";Object.defineProperty(Td,"__esModule",{value:!0});Td.AssetClass=void 0;var v2;(function(n){n.AREA="ems__Area",n.TASK="ems__Task",n.PROJECT="ems__Project",n.MEETING="ems__Meeting",n.INITIATIVE="ems__Initiative",n.TASK_PROTOTYPE="ems__TaskPrototype",n.MEETING_PROTOTYPE="ems__MeetingPrototype",n.EVENT_PROTOTYPE="exo__EventPrototype",n.PROJECT_PROTOTYPE="ems__ProjectPrototype",n.EVENT="exo__Event",n.DAILY_NOTE="pn__DailyNote",n.CONCEPT="ims__Concept",n.SESSION_START_EVENT="ems__SessionStartEvent",n.SESSION_END_EVENT="ems__SessionEndEvent",n.PROTOTYPE="exo__Prototype",n.CLASS="exo__Class",n.FLEETING_NOTE="ztlk__FleetingNote",n.WORKFLOW="ems__Workflow",n.WORKFLOW_STATE="ems__WorkflowState",n.WORKFLOW_TRANSITION="ems__WorkflowTransition",n.COMMAND="exocmd__Command",n.PRECONDITION="exocmd__Precondition",n.GROUNDING="exocmd__Grounding",n.COMMAND_BINDING="exocmd__CommandBinding"})(v2||(Td.AssetClass=v2={}))});var hc=b(Ad=>{"use strict";Object.defineProperty(Ad,"__esModule",{value:!0});Ad.EffortStatus=void 0;var E2;(function(n){n.DRAFT="ems__EffortStatusDraft",n.BACKLOG="ems__EffortStatusBacklog",n.ANALYSIS="ems__EffortStatusAnalysis",n.TODO="ems__EffortStatusToDo",n.DOING="ems__EffortStatusDoing",n.DONE="ems__EffortStatusDone",n.TRASHED="ems__EffortStatusTrashed"})(E2||(Ad.EffortStatus=E2={}))});var Dy=b(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.EFFORT_STATUS_OPTIONS=Gt.STATUS_NAME_TO_WIKILINK=Gt.STATUS_NAME_TO_ENUM=Gt.EFFORT_STATUS_CONFIG=void 0;Gt.normalizeEffortStatus=mN;Gt.isDoneStatus=gN;Gt.isTrashedStatus=yN;Gt.getEffortStatusLabel=_N;var es=hc();Gt.EFFORT_STATUS_CONFIG=[{name:"Draft",status:es.EffortStatus.DRAFT,wikilink:"[[ems__EffortStatusDraft]]"},{name:"Backlog",status:es.EffortStatus.BACKLOG,wikilink:"[[ems__EffortStatusBacklog]]"},{name:"Analysis",status:es.EffortStatus.ANALYSIS,wikilink:"[[ems__EffortStatusAnalysis]]"},{name:"To Do",status:es.EffortStatus.TODO,wikilink:"[[ems__EffortStatusToDo]]"},{name:"Doing",status:es.EffortStatus.DOING,wikilink:"[[ems__EffortStatusDoing]]"},{name:"Done",status:es.EffortStatus.DONE,wikilink:"[[ems__EffortStatusDone]]"},{name:"Trashed",status:es.EffortStatus.TRASHED,wikilink:"[[ems__EffortStatusTrashed]]"}];Gt.STATUS_NAME_TO_ENUM=Object.fromEntries(Gt.EFFORT_STATUS_CONFIG.map(n=>[n.name,n.status]));Gt.STATUS_NAME_TO_WIKILINK=Object.fromEntries(Gt.EFFORT_STATUS_CONFIG.map(n=>[n.name,n.wikilink]));Gt.EFFORT_STATUS_OPTIONS=Gt.EFFORT_STATUS_CONFIG.map(n=>({value:n.wikilink,label:n.name}));function mN(n,e=es.EffortStatus.DRAFT){if(n.startsWith("ems__")){let r=Gt.EFFORT_STATUS_CONFIG.find(i=>i.status===n);return r?r.status:e}return Gt.STATUS_NAME_TO_ENUM[n]??e}o(mN,"normalizeEffortStatus");function gN(n){return n===es.EffortStatus.DONE}o(gN,"isDoneStatus");function yN(n){return n===es.EffortStatus.TRASHED}o(yN,"isTrashedStatus");function _N(n){if(!n)return"-";let e=String(n);if(e==="")return"-";for(let r of Gt.EFFORT_STATUS_CONFIG)if(r.wikilink===e||`[[${e}]]`===r.wikilink||r.status===e||r.name===e)return r.name;let t=e.toLowerCase();for(let r of Gt.EFFORT_STATUS_CONFIG)if(r.name.toLowerCase()===t)return r.name;return e}o(_N,"getEffortStatusLabel")});var po=b(xd=>{"use strict";Object.defineProperty(xd,"__esModule",{value:!0});xd.GroundingType=void 0;var T2;(function(n){n.SPARQL_UPDATE="sparql_update",n.PROPERTY_DELETE="property_delete",n.PROPERTY_SET="property_set",n.COMPOSITE="composite",n.SERVICE_CALL="service_call",n.CREATE_INSTANCE="create_instance",n.PROPERTY_APPEND="property_append",n.PROPERTY_INCREMENT="property_increment",n.PROPERTY_SHIFT="property_shift"})(T2||(xd.GroundingType=T2={}))});var Ny=b(Qn=>{"use strict";Object.defineProperty(Qn,"__esModule",{value:!0});Qn.CommandBindingStyleProperty=Qn.CommandBindingProperty=Qn.GroundingProperty=Qn.PreconditionProperty=Qn.CommandProperty=void 0;Qn.CommandProperty={ICON:"exocmd__Command_icon",PRECONDITION:"exocmd__Command_precondition",GROUNDING:"exocmd__Command_grounding",CONFIRM_MESSAGE:"exocmd__Command_confirmMessage",SUCCESS_MESSAGE:"exocmd__Command_successMessage",CATEGORY:"exocmd__Command_category"};Qn.PreconditionProperty={SPARQL_ASK:"exocmd__Precondition_sparqlAsk",QUERY:"exocmd__Precondition_query"};Qn.GroundingProperty={TYPE:"exocmd__Grounding_type",SPARQL_UPDATE:"exocmd__Grounding_sparqlUpdate",TARGET_PROPERTY:"exocmd__Grounding_targetProperty",TARGET_VALUE:"exocmd__Grounding_targetValue",STEPS:"exocmd__Grounding_steps",IS_DEFINED_BY:"exocmd__Grounding_isDefinedBy"};Qn.CommandBindingProperty={COMMAND:"exocmd__CommandBinding_command",TARGET_CLASS:"exocmd__CommandBinding_targetClass",TARGET_PROTOTYPE:"exocmd__CommandBinding_targetPrototype",TARGET_ASSET:"exocmd__CommandBinding_targetAsset",POSITION:"exocmd__CommandBinding_position",ORDER:"exocmd__CommandBinding_order",PRECONDITION:"exocmd__CommandBinding_precondition",STYLE:"exocmd__CommandBinding_style",VARIANT:"exocmd__CommandBinding_variant"};Qn.CommandBindingStyleProperty={VARIANT:"exocmd__CommandBindingStyle_variant",SHOW_ICON:"exocmd__CommandBindingStyle_showIcon",LABEL_CLASS:"exocmd__CommandBindingStyle_labelClass",ARIA_LABEL:"exocmd__CommandBindingStyle_ariaLabel",TOOLTIP:"exocmd__CommandBindingStyle_tooltip",KEYBOARD_SHORTCUT:"exocmd__CommandBindingStyle_keyboardShortcut",SOURCE:"exocmd__CommandBindingStyle_source"}});var Ly=b(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.STYLE_SOURCE_VALUES=vn.LABEL_CLASS_VALUES=vn.COMMAND_VARIANT_VALUES=void 0;vn.isCommandVariant=bN;vn.isLabelClass=SN;vn.isStyleSource=wN;vn.COMMAND_VARIANT_VALUES=Object.freeze(["primary","secondary","success","warning","danger","muted"]);vn.LABEL_CLASS_VALUES=Object.freeze(["muted","bold","uppercase","compact"]);vn.STYLE_SOURCE_VALUES=Object.freeze(["vendor","user"]);function bN(n){return typeof n=="string"&&vn.COMMAND_VARIANT_VALUES.includes(n)}o(bN,"isCommandVariant");function SN(n){return typeof n=="string"&&vn.LABEL_CLASS_VALUES.includes(n)}o(SN,"isLabelClass");function wN(n){return typeof n=="string"&&vn.STYLE_SOURCE_VALUES.includes(n)}o(wN,"isStyleSource")});var A2=b(pc=>{"use strict";Object.defineProperty(pc,"__esModule",{value:!0});pc.isCommandFrontmatter=vN;pc.isPreconditionFrontmatter=EN;pc.isGroundingFrontmatter=TN;pc.isCommandBindingFrontmatter=AN;function vN(n){return Id(n,"exocmd__Command")}o(vN,"isCommandFrontmatter");function EN(n){return Id(n,"exocmd__Precondition")}o(EN,"isPreconditionFrontmatter");function TN(n){return Id(n,"exocmd__Grounding")}o(TN,"isGroundingFrontmatter");function AN(n){return Id(n,"exocmd__CommandBinding")}o(AN,"isCommandBindingFrontmatter");function Id(n,e){let t=n.exo__Instance_class;if(t==null)return!1;let r=Array.isArray(t)?t:[t];for(let i of r){if(typeof i!="string")continue;let s=i.match(/\[\[([^|\]]+)/);if((s?s[1]:i)===e)return!0}return!1}o(Id,"hasInstanceClass")});var x2=b(Cd=>{"use strict";Object.defineProperty(Cd,"__esModule",{value:!0});Cd.hasPosition=xN;Cd.isFixed=IN;function xN(n){return typeof n.x=="number"&&typeof n.y=="number"}o(xN,"hasPosition");function IN(n){return n.fx!==null&&n.fx!==void 0&&n.fy!==null&&n.fy!==void 0}o(IN,"isFixed")});var I2=b(Rd=>{"use strict";Object.defineProperty(Rd,"__esModule",{value:!0});Rd.createEmptyGraphData=CN;Rd.mergeGraphData=RN;function CN(){return{nodes:[],edges:[],lastUpdated:Date.now(),version:0}}o(CN,"createEmptyGraphData");function RN(n,e){let t=new Map,r=new Set,i=[];for(let s of n.nodes)t.set(s.id,s);for(let s of e.nodes)t.set(s.id,s);for(let s of n.edges){let a=`${s.source}->${s.target}:${s.type}`;r.has(a)||(r.add(a),i.push(s))}for(let s of e.edges){let a=`${s.source}->${s.target}:${s.type}`;r.has(a)||(r.add(a),i.push(s))}return{nodes:Array.from(t.values()),edges:i,lastUpdated:Date.now(),version:Math.max(n.version??0,e.version??0)+1}}o(RN,"mergeGraphData")});var ky=b(Od=>{"use strict";Object.defineProperty(Od,"__esModule",{value:!0});Od.createEdgeId=ON;Od.edgesEqual=PN;function ON(n,e,t,r){let i=r?`|${r}`:"";return`${n}->${e}:${t}${i}`}o(ON,"createEdgeId");function PN(n,e){return n.source===e.source&&n.target===e.target&&n.type===e.type&&n.predicate===e.predicate}o(PN,"edgesEqual")});var jy=b(Mt=>{"use strict";Object.defineProperty(Mt,"__esModule",{value:!0});Mt.BUILT_IN_EDGE_STYLES=Mt.BUILT_IN_NODE_STYLES=Mt.DEFAULT_EDGE_STYLE=Mt.DEFAULT_NODE_STYLE=Mt.RDF_TYPE_PREDICATES=void 0;Mt.mergeNodeStyles=FN;Mt.mergeEdgeStyles=DN;Mt.extractLocalName=NN;Mt.isClassType=LN;Mt.isTypePredicate=kN;Mt.isSubClassPredicate=jN;Mt.RDF_TYPE_PREDICATES={RDF_TYPE:"http://www.w3.org/1999/02/22-rdf-syntax-ns#type",RDFS_CLASS:"http://www.w3.org/2000/01/rdf-schema#Class",OWL_CLASS:"http://www.w3.org/2002/07/owl#Class",RDFS_SUBCLASS_OF:"http://www.w3.org/2000/01/rdf-schema#subClassOf",OWL_EQUIVALENT_CLASS:"http://www.w3.org/2002/07/owl#equivalentClass",RDFS_LABEL:"http://www.w3.org/2000/01/rdf-schema#label",RDFS_COMMENT:"http://www.w3.org/2000/01/rdf-schema#comment"};Mt.DEFAULT_NODE_STYLE={color:"#6366f1",borderColor:"#4f46e5",borderWidth:2,size:30,shape:"circle",icon:"",opacity:1,shadow:!1,animation:"none"};Mt.DEFAULT_EDGE_STYLE={color:"#9ca3af",width:1,lineStyle:"solid",arrow:"standard",curvature:0,opacity:.6,showLabel:!1,labelPosition:.5};Mt.BUILT_IN_NODE_STYLES={"http://www.w3.org/2000/01/rdf-schema#Class":{color:"#f59e0b",shape:"diamond",size:40},"http://www.w3.org/2002/07/owl#Class":{color:"#f59e0b",shape:"diamond",size:40},ems__Task:{color:"#22c55e",shape:"circle"},ems__Project:{color:"#3b82f6",shape:"square"},ems__Area:{color:"#8b5cf6",shape:"hexagon",size:40},ems__Meeting:{color:"#ec4899",shape:"circle"},exo__Class:{color:"#f59e0b",shape:"diamond"},ims__Person:{color:"#06b6d4",shape:"circle"}};Mt.BUILT_IN_EDGE_STYLES={"http://www.w3.org/1999/02/22-rdf-syntax-ns#type":{color:"#f59e0b",lineStyle:"dashed",arrow:"standard"},"http://www.w3.org/2000/01/rdf-schema#subClassOf":{color:"#8b5cf6",width:2,arrow:"triangle"},"https://exocortex.my/ontology/ems#Effort_parent":{color:"#6366f1",width:2,arrow:"standard"},"https://exocortex.my/ontology/exo#Asset_prototype":{color:"#f59e0b",lineStyle:"dashed",arrow:"circle"},"https://exocortex.my/ontology/exo#references":{color:"#22c55e",opacity:.4,arrow:"standard"}};function FN(n,e){return{...n,...Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}}o(FN,"mergeNodeStyles");function DN(n,e){return{...n,...Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}}o(DN,"mergeEdgeStyles");function NN(n){let e=n.lastIndexOf("#"),t=n.lastIndexOf("/"),r=Math.max(e,t);return r>=0?n.substring(r+1):n}o(NN,"extractLocalName");function LN(n){return n===Mt.RDF_TYPE_PREDICATES.RDFS_CLASS||n===Mt.RDF_TYPE_PREDICATES.OWL_CLASS}o(LN,"isClassType");function kN(n){return n===Mt.RDF_TYPE_PREDICATES.RDF_TYPE}o(kN,"isTypePredicate");function jN(n){return n===Mt.RDF_TYPE_PREDICATES.RDFS_SUBCLASS_OF}o(jN,"isSubClassPredicate")});var R2=b(C2=>{"use strict";Object.defineProperty(C2,"__esModule",{value:!0})});var Ee=b(Pd=>{"use strict";Object.defineProperty(Pd,"__esModule",{value:!0});Pd.IRI=void 0;var My=class n{static{o(this,"IRI")}constructor(e){let t=e.trim();if(t.length===0)throw new Error("IRI cannot be empty");if(!n.isValidIRI(t))throw new Error("Invalid IRI format");this._value=t}get value(){return this._value}equals(e){return this._value===e._value}toString(){return this._value}static isValidIRI(e){if(!e||e.trim().length===0||/\s/.test(e)||!/^[a-z][a-z0-9+.-]*:/i.test(e))return!1;let r=["http","https","ftp","ftps","file","mailto","tel","data","ws","wss","urn","obsidian"],i=e.match(/^([a-z][a-z0-9+.-]*?):/i);if(i){let s=i[1].toLowerCase();if(!r.includes(s))return!1}try{return new URL(e),!0}catch{return/^urn:[a-z0-9][a-z0-9-]{0,31}:[^\s]+$/i.test(e)}}};Pd.IRI=My});var je=b(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.Literal=void 0;mo.parseLanguageTag=O2;mo.createDirectionalLiteral=$N;mo.createLiteralFromLanguageTag=VN;var MN="http://www.w3.org/2001/XMLSchema#string",pu=class{static{o(this,"Literal")}constructor(e,t,r,i){if(e.length===0)throw new Error("Literal value cannot be empty");if(t&&r)throw new Error("Literal cannot have both datatype and language tag");if(i&&!r)throw new Error("Literal cannot have direction without language tag");if(i&&i!=="ltr"&&i!=="rtl")throw new Error('Direction must be "ltr" or "rtl"');this._value=e,this._datatype=t,this._language=r?r.toLowerCase():void 0,this._direction=i}get value(){return this._value}get datatype(){return this._datatype}get language(){return this._language}get direction(){return this._direction}hasDirection(){return this._direction!==void 0}equals(e){if(this._value!==e._value||this._language!==e._language||this._direction!==e._direction)return!1;let t=this.normalizedDatatype(),r=e.normalizedDatatype();return t===r}normalizedDatatype(){return!this._datatype||this._datatype.value===MN?null:this._datatype.value}toString(){let e=`"${this._value}"`;return this._datatype?e+=`^^<${this._datatype.value}>`:this._language&&(e+=`@${this._language}`,this._direction&&(e+=`--${this._direction}`)),e}};mo.Literal=pu;function O2(n){let t=n.lastIndexOf("--");if(t===-1)return{language:n.toLowerCase()};let r=n.substring(t+2),i=n.substring(0,t);return r==="ltr"||r==="rtl"?{language:i.toLowerCase(),direction:r}:{language:n.toLowerCase()}}o(O2,"parseLanguageTag");function $N(n,e,t){return new pu(n,void 0,e,t)}o($N,"createDirectionalLiteral");function VN(n,e){let{language:t,direction:r}=O2(e);return new pu(n,void 0,t,r)}o(VN,"createLiteralFromLanguageTag")});var $t=b(Dd=>{"use strict";Object.defineProperty(Dd,"__esModule",{value:!0});Dd.BlankNode=void 0;var Fd=class n{static{o(this,"BlankNode")}constructor(e){let t=e.trim();if(t.length===0)throw new Error("BlankNode id cannot be empty");this._id=t}get id(){return this._id}equals(e){return this._id===e._id}toString(){return`_:${this._id}`}static generateId(){return`b${++n.counter}`}static create(){return new n(n.generateId())}};Dd.BlankNode=Fd;Fd.counter=0});var ar=b(Nd=>{"use strict";Object.defineProperty(Nd,"__esModule",{value:!0});Nd.Namespace=void 0;var P2=Ee(),Be=class n{static{o(this,"Namespace")}constructor(e,t){if(e.trim().length===0)throw new Error("Namespace prefix cannot be empty");this._prefix=e,this._iri=new P2.IRI(t)}get prefix(){return this._prefix}get iri(){return this._iri}term(e){return new P2.IRI(`${this._iri.value}${e}`)}expand(e){let t=e.split(":");if(t.length!==2)return null;let[r,i]=t;return r!==this._prefix?null:this.term(i)}static forPrefix(e){if(!/^[a-z][a-zA-Z0-9]*$/.test(e))return null;let t=n.KNOWN_NAMESPACES.find(r=>r.prefix===e);return t||new n(e,`${n.EXOCORTEX_ONTOLOGY_BASE}${e}#`)}static fromPropertyKey(e){let t=/^([a-z][a-zA-Z0-9]*)__(.+)$/.exec(e);if(!t)return null;let r=n.forPrefix(t[1]);return r?{namespace:r,localName:t[2]}:null}};Nd.Namespace=Be;Be.RDF=new Be("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#");Be.RDFS=new Be("rdfs","http://www.w3.org/2000/01/rdf-schema#");Be.OWL=new Be("owl","http://www.w3.org/2002/07/owl#");Be.XSD=new Be("xsd","http://www.w3.org/2001/XMLSchema#");Be.EXO=new Be("exo","https://exocortex.my/ontology/exo#");Be.EMS=new Be("ems","https://exocortex.my/ontology/ems#");Be.EXOCMD=new Be("exocmd","https://exocortex.my/ontology/exocmd#");Be.IMS=new Be("ims","https://exocortex.my/ontology/ims#");Be.ZTLK=new Be("ztlk","https://exocortex.my/ontology/ztlk#");Be.PTMS=new Be("ptms","https://exocortex.my/ontology/ptms#");Be.LIT=new Be("lit","https://exocortex.my/ontology/lit#");Be.INBOX=new Be("inbox","https://exocortex.my/ontology/inbox#");Be.PMBOK=new Be("pmbok","https://exocortex.my/ontology/pmbok#");Be.EXOCORTEX_ONTOLOGY_BASE="https://exocortex.my/ontology/";Be.KNOWN_NAMESPACES=[Be.EXO,Be.EMS,Be.EXOCMD,Be.IMS,Be.ZTLK,Be.PTMS,Be.LIT,Be.INBOX,Be.PMBOK]});var Kn=b(Ld=>{"use strict";Object.defineProperty(Ld,"__esModule",{value:!0});Ld.Triple=void 0;var $y=Ee(),Vy=je(),By=$t(),Uy=class{static{o(this,"Triple")}constructor(e,t,r){this._subject=e,this._predicate=t,this._object=r}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}equals(e){return!(!this.equalsNode(this._subject,e._subject)||!this._predicate.equals(e._predicate)||!this.equalsNode(this._object,e._object))}equalsNode(e,t){return e instanceof $y.IRI&&t instanceof $y.IRI||e instanceof By.BlankNode&&t instanceof By.BlankNode||e instanceof Vy.Literal&&t instanceof Vy.Literal||this.isQuotedTriple(e)&&this.isQuotedTriple(t)?e.equals(t):!1}isQuotedTriple(e){return typeof e=="object"&&e!==null&&"termType"in e&&e.termType==="QuotedTriple"}toString(){let e=this.nodeToString(this._subject),t=`<${this._predicate.value}>`,r=this.nodeToString(this._object);return`${e} ${t} ${r} .`}nodeToString(e){return e instanceof $y.IRI?`<${e.value}>`:e instanceof By.BlankNode||e instanceof Vy.Literal||this.isQuotedTriple(e)?e.toString():""}};Ld.Triple=Uy});var mu=b(kd=>{"use strict";Object.defineProperty(kd,"__esModule",{value:!0});kd.QuotedTriple=void 0;var qy=Ee(),Wy=je(),Gy=$t(),zy=class n{static{o(this,"QuotedTriple")}constructor(e,t,r){this._subject=e,this._predicate=t,this._object=r}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}equals(e){return!(!this.equalsNode(this._subject,e._subject)||!this._predicate.equals(e._predicate)||!this.equalsNode(this._object,e._object))}equalsNode(e,t){return e instanceof qy.IRI&&t instanceof qy.IRI||e instanceof Gy.BlankNode&&t instanceof Gy.BlankNode||e instanceof Wy.Literal&&t instanceof Wy.Literal||e instanceof n&&t instanceof n?e.equals(t):!1}get termType(){return"QuotedTriple"}toString(){let e=this.nodeToString(this._subject),t=`<${this._predicate.value}>`,r=this.nodeToString(this._object);return`<< ${e} ${t} ${r} >>`}nodeToString(e){return e instanceof qy.IRI?`<${e.value}>`:e instanceof Gy.BlankNode||e instanceof Wy.Literal||e instanceof n?e.toString():""}};kd.QuotedTriple=zy});var F2=b(Jt=>{"use strict";Object.defineProperty(Jt,"__esModule",{value:!0});Jt.QuotedTriple=Jt.Triple=Jt.Namespace=Jt.BlankNode=Jt.createLiteralFromLanguageTag=Jt.createDirectionalLiteral=Jt.parseLanguageTag=Jt.Literal=Jt.IRI=void 0;var BN=Ee();Object.defineProperty(Jt,"IRI",{enumerable:!0,get:o(function(){return BN.IRI},"get")});var jd=je();Object.defineProperty(Jt,"Literal",{enumerable:!0,get:o(function(){return jd.Literal},"get")});Object.defineProperty(Jt,"parseLanguageTag",{enumerable:!0,get:o(function(){return jd.parseLanguageTag},"get")});Object.defineProperty(Jt,"createDirectionalLiteral",{enumerable:!0,get:o(function(){return jd.createDirectionalLiteral},"get")});Object.defineProperty(Jt,"createLiteralFromLanguageTag",{enumerable:!0,get:o(function(){return jd.createLiteralFromLanguageTag},"get")});var UN=$t();Object.defineProperty(Jt,"BlankNode",{enumerable:!0,get:o(function(){return UN.BlankNode},"get")});var qN=ar();Object.defineProperty(Jt,"Namespace",{enumerable:!0,get:o(function(){return qN.Namespace},"get")});var WN=Kn();Object.defineProperty(Jt,"Triple",{enumerable:!0,get:o(function(){return WN.Triple},"get")});var GN=mu();Object.defineProperty(Jt,"QuotedTriple",{enumerable:!0,get:o(function(){return GN.QuotedTriple},"get")})});var Md=b(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.UUID_URL_NAMESPACE=Xn.DEFAULT_LANGUAGE_TAG=Xn.REQUIRED_PROPERTIES=Xn.ALLOWED_PROPERTIES=Xn.Exo003MetadataType=void 0;var Yn;(function(n){n.Namespace="namespace",n.Anchor="anchor",n.BlankNode="blank_node",n.Statement="statement",n.Body="body"})(Yn||(Xn.Exo003MetadataType=Yn={}));Xn.ALLOWED_PROPERTIES={[Yn.Namespace]:["metadata","uri","aliases"],[Yn.Anchor]:["metadata","uri","aliases"],[Yn.BlankNode]:["metadata","uri","aliases"],[Yn.Statement]:["metadata","subject","predicate","object","aliases"],[Yn.Body]:["metadata","subject","predicate","aliases"]};Xn.REQUIRED_PROPERTIES={[Yn.Namespace]:["metadata","uri"],[Yn.Anchor]:["metadata","uri"],[Yn.BlankNode]:["metadata","uri"],[Yn.Statement]:["metadata","subject","predicate","object"],[Yn.Body]:["metadata","subject","predicate"]};Xn.DEFAULT_LANGUAGE_TAG="ru";Xn.UUID_URL_NAMESPACE="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});var D2=b(Hy=>{"use strict";Object.defineProperty(Hy,"__esModule",{value:!0});Hy.default="ffffffff-ffff-ffff-ffff-ffffffffffff"});var N2=b(Qy=>{"use strict";Object.defineProperty(Qy,"__esModule",{value:!0});Qy.default="00000000-0000-0000-0000-000000000000"});var L2=b(Ky=>{"use strict";Object.defineProperty(Ky,"__esModule",{value:!0});Ky.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i});var gu=b(Yy=>{"use strict";Object.defineProperty(Yy,"__esModule",{value:!0});var zN=L2();function HN(n){return typeof n=="string"&&zN.default.test(n)}o(HN,"validate");Yy.default=HN});var yu=b(Xy=>{"use strict";Object.defineProperty(Xy,"__esModule",{value:!0});var QN=gu();function KN(n){if(!(0,QN.default)(n))throw TypeError("Invalid UUID");let e;return Uint8Array.of((e=parseInt(n.slice(0,8),16))>>>24,e>>>16&255,e>>>8&255,e&255,(e=parseInt(n.slice(9,13),16))>>>8,e&255,(e=parseInt(n.slice(14,18),16))>>>8,e&255,(e=parseInt(n.slice(19,23),16))>>>8,e&255,(e=parseInt(n.slice(24,36),16))/1099511627776&255,e/4294967296&255,e>>>24&255,e>>>16&255,e>>>8&255,e&255)}o(KN,"parse");Xy.default=KN});var Ms=b(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.unsafeStringify=void 0;var YN=gu(),Pr=[];for(let n=0;n<256;++n)Pr.push((n+256).toString(16).slice(1));function k2(n,e=0){return(Pr[n[e+0]]+Pr[n[e+1]]+Pr[n[e+2]]+Pr[n[e+3]]+"-"+Pr[n[e+4]]+Pr[n[e+5]]+"-"+Pr[n[e+6]]+Pr[n[e+7]]+"-"+Pr[n[e+8]]+Pr[n[e+9]]+"-"+Pr[n[e+10]]+Pr[n[e+11]]+Pr[n[e+12]]+Pr[n[e+13]]+Pr[n[e+14]]+Pr[n[e+15]]).toLowerCase()}o(k2,"unsafeStringify");_u.unsafeStringify=k2;function XN(n,e=0){let t=k2(n,e);if(!(0,YN.default)(t))throw TypeError("Stringified UUID is invalid");return t}o(XN,"stringify");_u.default=XN});var Bd=b(Jy=>{"use strict";Object.defineProperty(Jy,"__esModule",{value:!0});var JN=require("crypto"),Vd=new Uint8Array(256),$d=Vd.length;function ZN(){return $d>Vd.length-16&&((0,JN.randomFillSync)(Vd),$d=0),Vd.slice($d,$d+=16)}o(ZN,"rng");Jy.default=ZN});var Zy=b(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.updateV1State=void 0;var j2=Bd(),eL=Ms(),bu={};function tL(n,e,t){let r,i=n?._v6??!1;if(n){let s=Object.keys(n);s.length===1&&s[0]==="_v6"&&(n=void 0)}if(n)r=M2(n.random??n.rng?.()??(0,j2.default)(),n.msecs,n.nsecs,n.clockseq,n.node,e,t);else{let s=Date.now(),a=(0,j2.default)();$2(bu,s,a),r=M2(a,bu.msecs,bu.nsecs,i?void 0:bu.clockseq,i?void 0:bu.node,e,t)}return e??(0,eL.unsafeStringify)(r)}o(tL,"v1");function $2(n,e,t){return n.msecs??=-1/0,n.nsecs??=0,e===n.msecs?(n.nsecs++,n.nsecs>=1e4&&(n.node=void 0,n.nsecs=0)):e>n.msecs?n.nsecs=0:e<n.msecs&&(n.node=void 0),n.node||(n.node=t.slice(10,16),n.node[0]|=1,n.clockseq=(t[8]<<8|t[9])&16383),n.msecs=e,n}o($2,"updateV1State");Su.updateV1State=$2;function M2(n,e,t,r,i,s,a=0){if(n.length<16)throw new Error("Random bytes length must be >= 16");if(!s)s=new Uint8Array(16),a=0;else if(a<0||a+16>s.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);e??=Date.now(),t??=0,r??=(n[8]<<8|n[9])&16383,i??=n.slice(10,16),e+=122192928e5;let c=((e&268435455)*1e4+t)%4294967296;s[a++]=c>>>24&255,s[a++]=c>>>16&255,s[a++]=c>>>8&255,s[a++]=c&255;let l=e/4294967296*1e4&268435455;s[a++]=l>>>8&255,s[a++]=l&255,s[a++]=l>>>24&15|16,s[a++]=l>>>16&255,s[a++]=r>>>8|128,s[a++]=r&255;for(let u=0;u<6;++u)s[a++]=i[u];return s}o(M2,"v1Bytes");Su.default=tL});var t0=b(e0=>{"use strict";Object.defineProperty(e0,"__esModule",{value:!0});var rL=yu(),nL=Ms();function iL(n){let e=typeof n=="string"?(0,rL.default)(n):n,t=sL(e);return typeof n=="string"?(0,nL.unsafeStringify)(t):t}o(iL,"v1ToV6");e0.default=iL;function sL(n){return Uint8Array.of((n[6]&15)<<4|n[7]>>4&15,(n[7]&15)<<4|(n[4]&240)>>4,(n[4]&15)<<4|(n[5]&240)>>4,(n[5]&15)<<4|(n[0]&240)>>4,(n[0]&15)<<4|(n[1]&240)>>4,(n[1]&15)<<4|(n[2]&240)>>4,96|n[2]&15,n[3],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15])}o(sL,"_v1ToV6")});var V2=b(r0=>{"use strict";Object.defineProperty(r0,"__esModule",{value:!0});var aL=require("crypto");function oL(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),(0,aL.createHash)("md5").update(n).digest()}o(oL,"md5");r0.default=oL});var wu=b($s=>{"use strict";Object.defineProperty($s,"__esModule",{value:!0});$s.URL=$s.DNS=$s.stringToBytes=void 0;var B2=yu(),cL=Ms();function U2(n){n=unescape(encodeURIComponent(n));let e=new Uint8Array(n.length);for(let t=0;t<n.length;++t)e[t]=n.charCodeAt(t);return e}o(U2,"stringToBytes");$s.stringToBytes=U2;$s.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8";$s.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function lL(n,e,t,r,i,s){let a=typeof t=="string"?U2(t):t,c=typeof r=="string"?(0,B2.default)(r):r;if(typeof r=="string"&&(r=(0,B2.default)(r)),r?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+a.length);if(l.set(c),l.set(a,c.length),l=e(l),l[6]=l[6]&15|n,l[8]=l[8]&63|128,i){s=s||0;for(let u=0;u<16;++u)i[s+u]=l[u];return i}return(0,cL.unsafeStringify)(l)}o(lL,"v35");$s.default=lL});var W2=b(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.URL=go.DNS=void 0;var uL=V2(),n0=wu(),q2=wu();Object.defineProperty(go,"DNS",{enumerable:!0,get:o(function(){return q2.DNS},"get")});Object.defineProperty(go,"URL",{enumerable:!0,get:o(function(){return q2.URL},"get")});function i0(n,e,t,r){return(0,n0.default)(48,uL.default,n,e,t,r)}o(i0,"v3");i0.DNS=n0.DNS;i0.URL=n0.URL;go.default=i0});var G2=b(s0=>{"use strict";Object.defineProperty(s0,"__esModule",{value:!0});var fL=require("crypto");s0.default={randomUUID:fL.randomUUID}});var H2=b(a0=>{"use strict";Object.defineProperty(a0,"__esModule",{value:!0});var z2=G2(),dL=Bd(),hL=Ms();function pL(n,e,t){if(z2.default.randomUUID&&!e&&!n)return z2.default.randomUUID();n=n||{};let r=n.random??n.rng?.()??(0,dL.default)();if(r.length<16)throw new Error("Random bytes length must be >= 16");if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){if(t=t||0,t<0||t+16>e.length)throw new RangeError(`UUID byte range ${t}:${t+15} is out of buffer bounds`);for(let i=0;i<16;++i)e[t+i]=r[i];return e}return(0,hL.unsafeStringify)(r)}o(pL,"v4");a0.default=pL});var Q2=b(o0=>{"use strict";Object.defineProperty(o0,"__esModule",{value:!0});var mL=require("crypto");function gL(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),(0,mL.createHash)("sha1").update(n).digest()}o(gL,"sha1");o0.default=gL});var Y2=b(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.URL=yo.DNS=void 0;var yL=Q2(),c0=wu(),K2=wu();Object.defineProperty(yo,"DNS",{enumerable:!0,get:o(function(){return K2.DNS},"get")});Object.defineProperty(yo,"URL",{enumerable:!0,get:o(function(){return K2.URL},"get")});function l0(n,e,t,r){return(0,c0.default)(80,yL.default,n,e,t,r)}o(l0,"v5");l0.DNS=c0.DNS;l0.URL=c0.URL;yo.default=l0});var X2=b(u0=>{"use strict";Object.defineProperty(u0,"__esModule",{value:!0});var _L=Ms(),bL=Zy(),SL=t0();function wL(n,e,t){n??={},t??=0;let r=(0,bL.default)({...n,_v6:!0},new Uint8Array(16));if(r=(0,SL.default)(r),e){for(let i=0;i<16;i++)e[t+i]=r[i];return e}return(0,_L.unsafeStringify)(r)}o(wL,"v6");u0.default=wL});var J2=b(f0=>{"use strict";Object.defineProperty(f0,"__esModule",{value:!0});var vL=yu(),EL=Ms();function TL(n){let e=typeof n=="string"?(0,vL.default)(n):n,t=AL(e);return typeof n=="string"?(0,EL.unsafeStringify)(t):t}o(TL,"v6ToV1");f0.default=TL;function AL(n){return Uint8Array.of((n[3]&15)<<4|n[4]>>4&15,(n[4]&15)<<4|(n[5]&240)>>4,(n[5]&15)<<4|n[6]&15,n[7],(n[1]&15)<<4|(n[2]&240)>>4,(n[2]&15)<<4|(n[3]&240)>>4,16|(n[0]&240)>>4,(n[0]&15)<<4|(n[1]&240)>>4,n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15])}o(AL,"_v6ToV1")});var rT=b(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.updateV7State=void 0;var Z2=Bd(),xL=Ms(),d0={};function IL(n,e,t){let r;if(n)r=eT(n.random??n.rng?.()??(0,Z2.default)(),n.msecs,n.seq,e,t);else{let i=Date.now(),s=(0,Z2.default)();tT(d0,i,s),r=eT(s,d0.msecs,d0.seq,e,t)}return e??(0,xL.unsafeStringify)(r)}o(IL,"v7");function tT(n,e,t){return n.msecs??=-1/0,n.seq??=0,e>n.msecs?(n.seq=t[6]<<23|t[7]<<16|t[8]<<8|t[9],n.msecs=e):(n.seq=n.seq+1|0,n.seq===0&&n.msecs++),n}o(tT,"updateV7State");vu.updateV7State=tT;function eT(n,e,t,r,i=0){if(n.length<16)throw new Error("Random bytes length must be >= 16");if(!r)r=new Uint8Array(16),i=0;else if(i<0||i+16>r.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return e??=Date.now(),t??=n[6]*127<<24|n[7]<<16|n[8]<<8|n[9],r[i++]=e/1099511627776&255,r[i++]=e/4294967296&255,r[i++]=e/16777216&255,r[i++]=e/65536&255,r[i++]=e/256&255,r[i++]=e&255,r[i++]=112|t>>>28&15,r[i++]=t>>>20&255,r[i++]=128|t>>>14&63,r[i++]=t>>>6&255,r[i++]=t<<2&255|n[10]&3,r[i++]=n[11],r[i++]=n[12],r[i++]=n[13],r[i++]=n[14],r[i++]=n[15],r}o(eT,"v7Bytes");vu.default=IL});var nT=b(h0=>{"use strict";Object.defineProperty(h0,"__esModule",{value:!0});var CL=gu();function RL(n){if(!(0,CL.default)(n))throw TypeError("Invalid UUID");return parseInt(n.slice(14,15),16)}o(RL,"version");h0.default=RL});var Jn=b(ft=>{"use strict";Object.defineProperty(ft,"__esModule",{value:!0});ft.version=ft.validate=ft.v7=ft.v6ToV1=ft.v6=ft.v5=ft.v4=ft.v3=ft.v1ToV6=ft.v1=ft.stringify=ft.parse=ft.NIL=ft.MAX=void 0;var OL=D2();Object.defineProperty(ft,"MAX",{enumerable:!0,get:o(function(){return OL.default},"get")});var PL=N2();Object.defineProperty(ft,"NIL",{enumerable:!0,get:o(function(){return PL.default},"get")});var FL=yu();Object.defineProperty(ft,"parse",{enumerable:!0,get:o(function(){return FL.default},"get")});var DL=Ms();Object.defineProperty(ft,"stringify",{enumerable:!0,get:o(function(){return DL.default},"get")});var NL=Zy();Object.defineProperty(ft,"v1",{enumerable:!0,get:o(function(){return NL.default},"get")});var LL=t0();Object.defineProperty(ft,"v1ToV6",{enumerable:!0,get:o(function(){return LL.default},"get")});var kL=W2();Object.defineProperty(ft,"v3",{enumerable:!0,get:o(function(){return kL.default},"get")});var jL=H2();Object.defineProperty(ft,"v4",{enumerable:!0,get:o(function(){return jL.default},"get")});var ML=Y2();Object.defineProperty(ft,"v5",{enumerable:!0,get:o(function(){return ML.default},"get")});var $L=X2();Object.defineProperty(ft,"v6",{enumerable:!0,get:o(function(){return $L.default},"get")});var VL=J2();Object.defineProperty(ft,"v6ToV1",{enumerable:!0,get:o(function(){return VL.default},"get")});var BL=rT();Object.defineProperty(ft,"v7",{enumerable:!0,get:o(function(){return BL.default},"get")});var UL=gu();Object.defineProperty(ft,"validate",{enumerable:!0,get:o(function(){return UL.default},"get")});var qL=nT();Object.defineProperty(ft,"version",{enumerable:!0,get:o(function(){return qL.default},"get")})});var g0=b(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});Ud.Exo003UUIDGenerator=void 0;var p0=Jn(),iT=Md(),m0=class{static{o(this,"Exo003UUIDGenerator")}static generateNamespaceUUID(e){if(!e||e.trim().length===0)throw new Error("Namespace URI cannot be empty");return(0,p0.v5)(e,iT.UUID_URL_NAMESPACE)}static generateAssetUUID(e,t){if(!t||t.trim().length===0)throw new Error("Local identifier cannot be empty");let r=this.generateNamespaceUUID(e);return(0,p0.v5)(t,r)}static generateFromIRI(e){if(!e||e.trim().length===0)throw new Error("IRI cannot be empty");let{namespace:t,localName:r}=this.splitIRI(e);return r?this.generateAssetUUID(t,r):(0,p0.v5)(e,iT.UUID_URL_NAMESPACE)}static generateBlankNodeUUID(e,t){if(!e||e.trim().length===0)throw new Error("Blank node ID cannot be empty");let r="urn:exocortex:blank-node:",i=t?`${t}#${e}`:e;return this.generateAssetUUID(r,i)}static generateStatementUUID(e,t,r){if(!e||!t||!r)throw new Error("Subject, predicate, and object cannot be empty");let i="urn:exocortex:statement:",s=`${e} ${t} ${r}`;return this.generateAssetUUID(i,s)}static generateBodyUUID(e,t){let r="urn:exocortex:body:",i=e;return t?.datatype?i+=`^^${t.datatype}`:t?.language&&(i+=`@${t.language}`,t.direction&&(i+=`--${t.direction}`)),this.generateAssetUUID(r,i)}static splitIRI(e){let t=e.lastIndexOf("#");if(t!==-1&&t<e.length-1)return{namespace:e.substring(0,t+1),localName:e.substring(t+1)};let r=e.lastIndexOf("/"),i=e.indexOf("://");return r!==-1&&r>i+2&&r<e.length-1?{namespace:e.substring(0,r+1),localName:e.substring(r+1)}:{namespace:e,localName:""}}static isValidUUID(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)}};Ud.Exo003UUIDGenerator=m0});var aT=b(Wd=>{"use strict";Object.defineProperty(Wd,"__esModule",{value:!0});Wd.Exo003Parser=void 0;var gt=Md(),Eu=g0(),Sa=Ee(),qd=je(),sT=$t(),WL=Kn(),y0=class{static{o(this,"Exo003Parser")}static parse(e,t){let r=this.validate(e);if(!r.valid)return{success:!1,errors:r.errors};let i=e.metadata;try{return{success:!0,metadata:this.parseByType(e,i),bodyContent:i===gt.Exo003MetadataType.Body?t:void 0}}catch(s){return{success:!1,errors:[s instanceof Error?s.message:String(s)]}}}static validate(e){let t=[],r=[];if(!e.metadata)return t.push("Missing required property: metadata"),{valid:!1,errors:t,warnings:r};let i=e.metadata;if(!Object.values(gt.Exo003MetadataType).includes(i))return t.push(`Invalid metadata: ${i}. Valid types: ${Object.values(gt.Exo003MetadataType).join(", ")}`),{valid:!1,errors:t,warnings:r};let s=i,a=gt.ALLOWED_PROPERTIES[s],c=gt.REQUIRED_PROPERTIES[s];for(let l of c)(e[l]===void 0||e[l]===null)&&t.push(`Missing required property: ${l}`);for(let l of Object.keys(e))a.includes(l)||t.push(`Forbidden property for ${s}: ${l}`);switch(s){case gt.Exo003MetadataType.Namespace:this.validateNamespaceMetadata(e,t);break;case gt.Exo003MetadataType.Anchor:this.validateAnchorMetadata(e,t);break;case gt.Exo003MetadataType.BlankNode:this.validateBlankNodeMetadata(e,t);break;case gt.Exo003MetadataType.Statement:this.validateStatementMetadata(e,t);break;case gt.Exo003MetadataType.Body:this.validateBodyMetadata(e,t,r);break}return{valid:t.length===0,errors:t,warnings:r}}static parseByType(e,t){let r={metadata:t,aliases:e.aliases};switch(t){case gt.Exo003MetadataType.Namespace:return{...r,metadata:gt.Exo003MetadataType.Namespace,uri:e.uri};case gt.Exo003MetadataType.Anchor:return{...r,metadata:gt.Exo003MetadataType.Anchor,uri:e.uri};case gt.Exo003MetadataType.BlankNode:return{...r,metadata:gt.Exo003MetadataType.BlankNode,uri:e.uri};case gt.Exo003MetadataType.Statement:return{...r,metadata:gt.Exo003MetadataType.Statement,subject:e.subject,predicate:e.predicate,object:e.object};case gt.Exo003MetadataType.Body:return{...r,metadata:gt.Exo003MetadataType.Body,subject:e.subject,predicate:e.predicate}}}static validateNamespaceMetadata(e,t){let r=e.uri;if(r&&typeof r!="string")t.push("uri must be a string");else if(r)try{new Sa.IRI(r)}catch{t.push(`uri is not a valid IRI: ${String(r)}`)}}static validateAnchorMetadata(e,t){let r=e.uri;if(r&&typeof r!="string")t.push("uri must be a string");else if(r)try{new Sa.IRI(r)}catch{t.push(`uri is not a valid IRI: ${String(r)}`)}}static validateBlankNodeMetadata(e,t){let r=e.uri;if(r&&typeof r!="string")t.push("uri must be a string");else if(r){let i=r;if(!i.startsWith("_:"))try{new Sa.IRI(i)}catch{t.push(`uri is not a valid IRI or blank node identifier: ${String(r)}`)}}}static validateStatementMetadata(e,t){let r=e.subject,i=e.predicate,s=e.object,a=[["subject",r],["predicate",i],["object",s]];for(let[c,l]of a)l&&typeof l!="string"&&t.push(`${c} must be a string`)}static validateBodyMetadata(e,t,r){let i=e.subject,s=e.predicate;i&&typeof i!="string"&&t.push("subject must be a string"),s&&typeof s!="string"&&t.push("predicate must be a string")}static toTriple(e,t,r){let i=t(e.subject),s;if(i.type==="iri")s=new Sa.IRI(i.value);else if(i.type==="blank")s=new sT.BlankNode(i.value);else throw new Error("Statement subject cannot be a literal");let a=t(e.predicate);if(a.type!=="iri")throw new Error("Statement predicate must be an IRI");let c=new Sa.IRI(a.value),l=t(e.object),u;if(l.type==="iri")u=new Sa.IRI(l.value);else if(l.type==="blank")u=new sT.BlankNode(l.value);else{let f=r||l.value;if(l.datatype)u=new qd.Literal(f,new Sa.IRI(l.datatype));else{let d=l.language||gt.DEFAULT_LANGUAGE_TAG;u=(0,qd.createDirectionalLiteral)(f,d,l.direction)}}return new WL.Triple(s,c,u)}static toLiteral(e,t,r){if(r?.datatype)return new qd.Literal(t,new Sa.IRI(r.datatype));let i=r?.language||gt.DEFAULT_LANGUAGE_TAG;return(0,qd.createDirectionalLiteral)(t,i,r?.direction)}static isExo003Format(e){let t=e.metadata;return typeof t=="string"&&Object.values(gt.Exo003MetadataType).includes(t)}static generateUUID(e,t){switch(e.metadata){case gt.Exo003MetadataType.Namespace:return Eu.Exo003UUIDGenerator.generateNamespaceUUID(e.uri);case gt.Exo003MetadataType.Anchor:return Eu.Exo003UUIDGenerator.generateNamespaceUUID(e.uri);case gt.Exo003MetadataType.BlankNode:return Eu.Exo003UUIDGenerator.generateNamespaceUUID(e.uri);case gt.Exo003MetadataType.Statement:{let r=e;return Eu.Exo003UUIDGenerator.generateStatementUUID(r.subject,r.predicate,r.object)}case gt.Exo003MetadataType.Body:{let r=e;return Eu.Exo003UUIDGenerator.generateBodyUUID(r.subject+"|"+r.predicate)}}}};Wd.Exo003Parser=y0});var _0=b(Vr=>{"use strict";Object.defineProperty(Vr,"__esModule",{value:!0});Vr.Exo003Parser=Vr.Exo003UUIDGenerator=Vr.UUID_URL_NAMESPACE=Vr.DEFAULT_LANGUAGE_TAG=Vr.REQUIRED_PROPERTIES=Vr.ALLOWED_PROPERTIES=Vr.Exo003MetadataType=void 0;var Tu=Md();Object.defineProperty(Vr,"Exo003MetadataType",{enumerable:!0,get:o(function(){return Tu.Exo003MetadataType},"get")});Object.defineProperty(Vr,"ALLOWED_PROPERTIES",{enumerable:!0,get:o(function(){return Tu.ALLOWED_PROPERTIES},"get")});Object.defineProperty(Vr,"REQUIRED_PROPERTIES",{enumerable:!0,get:o(function(){return Tu.REQUIRED_PROPERTIES},"get")});Object.defineProperty(Vr,"DEFAULT_LANGUAGE_TAG",{enumerable:!0,get:o(function(){return Tu.DEFAULT_LANGUAGE_TAG},"get")});Object.defineProperty(Vr,"UUID_URL_NAMESPACE",{enumerable:!0,get:o(function(){return Tu.UUID_URL_NAMESPACE},"get")});var GL=g0();Object.defineProperty(Vr,"Exo003UUIDGenerator",{enumerable:!0,get:o(function(){return GL.Exo003UUIDGenerator},"get")});var zL=aT();Object.defineProperty(Vr,"Exo003Parser",{enumerable:!0,get:o(function(){return zL.Exo003Parser},"get")})});var ts=b(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});Gd.WikiLinkHelpers=void 0;var Au=class{static{o(this,"WikiLinkHelpers")}static normalize(e){if(!e)return"";let t=e.replace(this.WIKI_LINK_PATTERN,"").trim();if(!t)return"";let r=t.indexOf("|");if(r===-1)return t;let i=t.substring(0,r).trim(),s=t.substring(r+1).trim();return this.UUID_PATTERN.test(i)&&s||i}static normalizeArray(e){return e?(Array.isArray(e)?e:[e]).map(r=>this.normalize(r)).filter(r=>r.length>0):[]}static equals(e,t){return this.normalize(e)===this.normalize(t)}static includes(e,t){let r=this.normalizeArray(e),i=this.normalize(t);return r.includes(i)}static resolveSymbolic(e,t){let r=this.normalize(e);if(!r)return"";if(this.UUID_PATTERN.test(r)){let i=t(r);return i&&i.length>0?i:r}return r}static resolveSymbolicArray(e,t){return e?(Array.isArray(e)?e:[e]).map(i=>this.resolveSymbolic(i,t)).filter(i=>i.length>0):[]}};Gd.WikiLinkHelpers=Au;Au.WIKI_LINK_PATTERN=/\[\[|\]\]/g;Au.UUID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i});var kn=b(at=>{"use strict";Object.defineProperty(at,"__esModule",{value:!0});at.CommandBindingProperty=at.GroundingProperty=at.PreconditionProperty=at.CommandProperty=at.GroundingType=at.getEffortStatusLabel=at.isTrashedStatus=at.isDoneStatus=at.normalizeEffortStatus=at.EFFORT_STATUS_OPTIONS=at.STATUS_NAME_TO_WIKILINK=at.STATUS_NAME_TO_ENUM=at.EFFORT_STATUS_CONFIG=at.EffortStatus=at.AssetClass=void 0;var HL=hu();Object.defineProperty(at,"AssetClass",{enumerable:!0,get:o(function(){return HL.AssetClass},"get")});var QL=hc();Object.defineProperty(at,"EffortStatus",{enumerable:!0,get:o(function(){return QL.EffortStatus},"get")});var wa=Dy();Object.defineProperty(at,"EFFORT_STATUS_CONFIG",{enumerable:!0,get:o(function(){return wa.EFFORT_STATUS_CONFIG},"get")});Object.defineProperty(at,"STATUS_NAME_TO_ENUM",{enumerable:!0,get:o(function(){return wa.STATUS_NAME_TO_ENUM},"get")});Object.defineProperty(at,"STATUS_NAME_TO_WIKILINK",{enumerable:!0,get:o(function(){return wa.STATUS_NAME_TO_WIKILINK},"get")});Object.defineProperty(at,"EFFORT_STATUS_OPTIONS",{enumerable:!0,get:o(function(){return wa.EFFORT_STATUS_OPTIONS},"get")});Object.defineProperty(at,"normalizeEffortStatus",{enumerable:!0,get:o(function(){return wa.normalizeEffortStatus},"get")});Object.defineProperty(at,"isDoneStatus",{enumerable:!0,get:o(function(){return wa.isDoneStatus},"get")});Object.defineProperty(at,"isTrashedStatus",{enumerable:!0,get:o(function(){return wa.isTrashedStatus},"get")});Object.defineProperty(at,"getEffortStatusLabel",{enumerable:!0,get:o(function(){return wa.getEffortStatusLabel},"get")});var KL=po();Object.defineProperty(at,"GroundingType",{enumerable:!0,get:o(function(){return KL.GroundingType},"get")});var zd=Ny();Object.defineProperty(at,"CommandProperty",{enumerable:!0,get:o(function(){return zd.CommandProperty},"get")});Object.defineProperty(at,"PreconditionProperty",{enumerable:!0,get:o(function(){return zd.PreconditionProperty},"get")});Object.defineProperty(at,"GroundingProperty",{enumerable:!0,get:o(function(){return zd.GroundingProperty},"get")});Object.defineProperty(at,"CommandBindingProperty",{enumerable:!0,get:o(function(){return zd.CommandBindingProperty},"get")})});var So=b(Br=>{"use strict";Object.defineProperty(Br,"__esModule",{value:!0});Br.hasClass=bo;Br.isAreaOrProject=YL;Br.isEffort=XL;Br.hasStatus=JL;Br.isAssetArchived=ZL;Br.hasEmptyProperties=ek;Br.needsFolderRepair=tk;Br.getTodayDateString=b0;Br.isPlannedForToday=rk;Br.hasPlannedStartTimestamp=nk;Br.extractDailyNoteDate=ik;Br.isCurrentDateGteDay=sk;Br.inheritsFromPrototype=lT;Br.isPrototypeClass=ok;var cT=ts(),_o=kn();function bo(n,e){return n?(Array.isArray(n)?n:[n]).some(r=>cT.WikiLinkHelpers.normalize(r)===e):!1}o(bo,"hasClass");function YL(n){return bo(n,_o.AssetClass.AREA)||bo(n,_o.AssetClass.PROJECT)}o(YL,"isAreaOrProject");function XL(n){return bo(n,_o.AssetClass.TASK)||bo(n,_o.AssetClass.PROJECT)||bo(n,_o.AssetClass.MEETING)}o(XL,"isEffort");function JL(n,e){if(!n)return!1;let t=Array.isArray(n)?n[0]:n;return t?cT.WikiLinkHelpers.normalize(t)===e:!1}o(JL,"hasStatus");function ZL(n){if(n===!0||n===1)return!0;if(typeof n=="string"){let e=n.toLowerCase();return e==="true"||e==="yes"}return!1}o(ZL,"isAssetArchived");function ek(n){return!n||Object.keys(n).length===0?!1:Object.values(n).some(e=>!!(e==null||typeof e=="string"&&e.trim()===""||Array.isArray(e)&&e.length===0||typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0))}o(ek,"hasEmptyProperties");function tk(n,e){if(!e)return!1;let t=n.replace(/\/$/,""),r=e.replace(/\/$/,"");return t!==r}o(tk,"needsFolderRepair");function b0(){let n=new Date,e=n.getFullYear(),t=String(n.getMonth()+1).padStart(2,"0"),r=String(n.getDate()).padStart(2,"0");return`${e}-${t}-${r}`}o(b0,"getTodayDateString");function rk(n){let e=n.ems__Effort_plannedStartTimestamp;if(!e)return!1;let t=b0();return typeof e=="string"?e.split("T")[0]===t:Array.isArray(e)&&e.length>0?String(e[0]).split("T")[0]===t:!1}o(rk,"isPlannedForToday");function nk(n){let e=n.ems__Effort_plannedStartTimestamp;return e?typeof e=="string"?e.trim().length>0:Array.isArray(e)&&e.length>0?String(e[0]).trim().length>0:!1:!1}o(nk,"hasPlannedStartTimestamp");function ik(n){let e=n.pn__DailyNote_day;if(!e)return null;if(typeof e=="string"){let t=e.match(/\[\[([^\[\]]+)\]\]/);return t?t[1]:e}if(Array.isArray(e)&&e.length>0){let t=String(e[0]),r=t.match(/\[\[([^\[\]]+)\]\]/);return r?r[1]:t}return null}o(ik,"extractDailyNoteDate");function sk(n){return b0()>=n}o(sk,"isCurrentDateGteDay");function oT(n){return n?n.replace(/^["']|["']$/g,"").replace(/\[\[|\]\]/g,"").trim():""}o(oT,"normalizeWithQuotes");var ak=10;function lT(n,e=ak){let t=n.exo__Class_superClass;if(!t)return!1;let r=new Set,i=[],s=Array.isArray(t)?t:[t];for(let a of s){let c=oT(a);c&&i.push({className:c,depth:0})}for(;i.length>0;){let a=i.shift();if(!a)continue;let{className:c,depth:l}=a;if(l>e)continue;if(c===_o.AssetClass.PROTOTYPE)return!0;if(r.has(c))continue;r.add(c);let u=`${c}__exo__Class_superClass`,f=n[u];if(f){let d=Array.isArray(f)?f:[f];for(let h of d){let p=oT(h);p&&!r.has(p)&&i.push({className:p,depth:l+1})}}}return!1}o(lT,"inheritsFromPrototype");function ok(n,e){return bo(n,_o.AssetClass.CLASS)?lT(e):!1}o(ok,"isPrototypeClass")});var uT=b(gc=>{"use strict";Object.defineProperty(gc,"__esModule",{value:!0});gc.canCreateTask=ck;gc.canCreateRelatedTask=lk;gc.canConvertTaskToProject=uk;gc.canSetCriticalityZone=fk;var mc=So(),S0=kn();function ck(n){return(0,mc.isAreaOrProject)(n.instanceClass)}o(ck,"canCreateTask");function lk(n){return!(!(0,mc.hasClass)(n.instanceClass,S0.AssetClass.TASK)||(0,mc.isAssetArchived)(n.isArchived))}o(lk,"canCreateRelatedTask");function uk(n){return(0,mc.hasClass)(n.instanceClass,S0.AssetClass.TASK)}o(uk,"canConvertTaskToProject");function fk(n){return!(!(0,mc.hasClass)(n.instanceClass,S0.AssetClass.TASK)||(0,mc.isAssetArchived)(n.isArchived))}o(fk,"canSetCriticalityZone")});var fT=b(yc=>{"use strict";Object.defineProperty(yc,"__esModule",{value:!0});yc.canCreateProject=dk;yc.canMoveToAnalysis=hk;yc.canMoveToToDo=pk;yc.canConvertProjectToTask=mk;var va=So(),Ea=kn();function dk(n){return(0,va.hasClass)(n.instanceClass,Ea.AssetClass.AREA)||(0,va.hasClass)(n.instanceClass,Ea.AssetClass.INITIATIVE)||(0,va.hasClass)(n.instanceClass,Ea.AssetClass.PROJECT)}o(dk,"canCreateProject");function hk(n){return(0,va.hasClass)(n.instanceClass,Ea.AssetClass.PROJECT)?(0,va.hasStatus)(n.currentStatus,Ea.EffortStatus.BACKLOG):!1}o(hk,"canMoveToAnalysis");function pk(n){return(0,va.hasClass)(n.instanceClass,Ea.AssetClass.PROJECT)?(0,va.hasStatus)(n.currentStatus,Ea.EffortStatus.ANALYSIS):!1}o(pk,"canMoveToToDo");function mk(n){return(0,va.hasClass)(n.instanceClass,Ea.AssetClass.PROJECT)}o(mk,"canConvertProjectToTask")});var pT=b(Hd=>{"use strict";Object.defineProperty(Hd,"__esModule",{value:!0});Hd.canCreateChildArea=gk;Hd.canSetActiveFocus=yk;var dT=So(),hT=kn();function gk(n){return(0,dT.hasClass)(n.instanceClass,hT.AssetClass.AREA)}o(gk,"canCreateChildArea");function yk(n){return(0,dT.hasClass)(n.instanceClass,hT.AssetClass.AREA)}o(yk,"canSetActiveFocus")});var gT=b(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.canPlanOnToday=_k;on.canPlanForEvening=bk;on.canShiftDayBackward=Sk;on.canShiftDayForward=wk;on.canSetDraftStatus=vk;on.canMoveToBacklog=Ek;on.canStartEffort=Tk;on.canMarkDone=Ak;on.canTrashEffort=xk;on.canVoteOnEffort=Ik;on.canRollbackStatus=Ck;on.canArchiveTask=Rk;on.canMarkReviewed=Ok;var mT=ts(),ht=So(),an=kn();function _k(n){return!(!(0,ht.isEffort)(n.instanceClass)||(0,ht.isPlannedForToday)(n.metadata))}o(_k,"canPlanOnToday");function bk(n){return!(0,ht.hasClass)(n.instanceClass,an.AssetClass.TASK)&&!(0,ht.hasClass)(n.instanceClass,an.AssetClass.MEETING)?!1:(0,ht.hasStatus)(n.currentStatus,an.EffortStatus.BACKLOG)}o(bk,"canPlanForEvening");function Sk(n){return(0,ht.isEffort)(n.instanceClass)?(0,ht.hasPlannedStartTimestamp)(n.metadata):!1}o(Sk,"canShiftDayBackward");function wk(n){return(0,ht.isEffort)(n.instanceClass)?(0,ht.hasPlannedStartTimestamp)(n.metadata):!1}o(wk,"canShiftDayForward");function vk(n){return(0,ht.isEffort)(n.instanceClass)?!n.currentStatus:!1}o(vk,"canSetDraftStatus");function Ek(n){return(0,ht.isEffort)(n.instanceClass)?(0,ht.hasStatus)(n.currentStatus,an.EffortStatus.DRAFT):!1}o(Ek,"canMoveToBacklog");function Tk(n){return(0,ht.isEffort)(n.instanceClass)?(0,ht.hasClass)(n.instanceClass,an.AssetClass.TASK)||(0,ht.hasClass)(n.instanceClass,an.AssetClass.MEETING)?(0,ht.hasStatus)(n.currentStatus,an.EffortStatus.BACKLOG):(0,ht.hasClass)(n.instanceClass,an.AssetClass.PROJECT)?(0,ht.hasStatus)(n.currentStatus,an.EffortStatus.TODO):!1:!1}o(Tk,"canStartEffort");function Ak(n){return(0,ht.isEffort)(n.instanceClass)?(0,ht.hasStatus)(n.currentStatus,an.EffortStatus.DOING):!1}o(Ak,"canMarkDone");function xk(n){return(0,ht.isEffort)(n.instanceClass)?n.currentStatus?!(Array.isArray(n.currentStatus)?n.currentStatus:[n.currentStatus]).some(r=>{let i=mT.WikiLinkHelpers.normalize(r);return i===an.EffortStatus.TRASHED||i===an.EffortStatus.DONE}):!0:!1}o(xk,"canTrashEffort");function Ik(n){return!(!(0,ht.isEffort)(n.instanceClass)||(0,ht.isAssetArchived)(n.isArchived))}o(Ik,"canVoteOnEffort");function Ck(n){if(!(0,ht.isEffort)(n.instanceClass)||(0,ht.isAssetArchived)(n.isArchived)||!n.currentStatus)return!1;let e=Array.isArray(n.currentStatus)?n.currentStatus[0]:n.currentStatus;return!(!e||mT.WikiLinkHelpers.normalize(e)===an.EffortStatus.TRASHED)}o(Ck,"canRollbackStatus");function Rk(n){return!(0,ht.isAssetArchived)(n.isArchived)}o(Rk,"canArchiveTask");function Ok(n){return!(!(0,ht.hasClass)(n.instanceClass,an.AssetClass.TASK)&&!(0,ht.hasClass)(n.instanceClass,an.AssetClass.PROJECT)||(0,ht.isAssetArchived)(n.isArchived))}o(Ok,"canMarkReviewed")});var yT=b(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.canCreateEvent=Dk;Zn.canCreateInstance=Nk;Zn.canCleanProperties=Lk;Zn.canRepairFolder=kk;Zn.canRenameToUid=jk;Zn.canCopyLabelToAliases=Mk;Zn.canCreateNarrowerConcept=$k;Zn.canCreateSubclass=Vk;Zn.canCreateTaskForDailyNote=Bk;Zn.canCopyFleetingNoteLabel=Uk;var Ur=So(),Vs=kn(),Pk="75302770-279e-4a59-ba85-09df29725713",Fk="fca0a931-a01f-48e4-b72a-4af206c94bc7";function Dk(n){return(0,Ur.isAreaOrProject)(n.instanceClass)}o(Dk,"canCreateEvent");function Nk(n){return(0,Ur.hasClass)(n.instanceClass,Vs.AssetClass.TASK_PROTOTYPE)||(0,Ur.hasClass)(n.instanceClass,Pk)||(0,Ur.hasClass)(n.instanceClass,Vs.AssetClass.MEETING_PROTOTYPE)||(0,Ur.hasClass)(n.instanceClass,Vs.AssetClass.EVENT_PROTOTYPE)||(0,Ur.hasClass)(n.instanceClass,Vs.AssetClass.PROJECT_PROTOTYPE)||(0,Ur.hasClass)(n.instanceClass,Vs.AssetClass.PROTOTYPE)||n.classIsPrototype?!0:(0,Ur.isPrototypeClass)(n.instanceClass,n.metadata)}o(Nk,"canCreateInstance");function Lk(n){return(0,Ur.hasEmptyProperties)(n.metadata)}o(Lk,"canCleanProperties");function kk(n){return(0,Ur.needsFolderRepair)(n.currentFolder,n.expectedFolder)}o(kk,"canRepairFolder");function jk(n,e){let t=n.metadata.exo__Asset_uid;return t?e!==t:!1}o(jk,"canRenameToUid");function Mk(n){let e=n.metadata.exo__Asset_label;if(!e||typeof e!="string"||e.trim()==="")return!1;let t=e.trim(),r=n.metadata.aliases;return!r||!Array.isArray(r)||r.length===0?!0:!r.some(i=>typeof i!="string"?!1:i.trim()===t)}o(Mk,"canCopyLabelToAliases");function $k(n){return(0,Ur.hasClass)(n.instanceClass,Vs.AssetClass.CONCEPT)}o($k,"canCreateNarrowerConcept");function Vk(n){return(0,Ur.hasClass)(n.instanceClass,Vs.AssetClass.CLASS)}o(Vk,"canCreateSubclass");function Bk(n){return!(!(0,Ur.hasClass)(n.instanceClass,Vs.AssetClass.DAILY_NOTE)||n.isArchived||!(0,Ur.extractDailyNoteDate)(n.metadata))}o(Bk,"canCreateTaskForDailyNote");function Uk(n){return(0,Ur.hasClass)(n.instanceClass,Vs.AssetClass.FLEETING_NOTE)||(0,Ur.hasClass)(n.instanceClass,Fk)}o(Uk,"canCopyFleetingNoteLabel")});var bT=b(L=>{"use strict";Object.defineProperty(L,"__esModule",{value:!0});L.canCopyFleetingNoteLabel=L.canCreateTaskForDailyNote=L.canCreateSubclass=L.canCreateNarrowerConcept=L.canCopyLabelToAliases=L.canRenameToUid=L.canRepairFolder=L.canCleanProperties=L.canCreateInstance=L.canCreateEvent=L.canMarkReviewed=L.canArchiveTask=L.canRollbackStatus=L.canVoteOnEffort=L.canTrashEffort=L.canMarkDone=L.canStartEffort=L.canMoveToBacklog=L.canSetDraftStatus=L.canShiftDayForward=L.canShiftDayBackward=L.canPlanForEvening=L.canPlanOnToday=L.canSetActiveFocus=L.canCreateChildArea=L.canConvertProjectToTask=L.canMoveToToDo=L.canMoveToAnalysis=L.canCreateProject=L.canSetCriticalityZone=L.canConvertTaskToProject=L.canCreateRelatedTask=L.canCreateTask=L.isPrototypeClass=L.inheritsFromPrototype=L.isCurrentDateGteDay=L.extractDailyNoteDate=L.hasPlannedStartTimestamp=L.isPlannedForToday=L.getTodayDateString=L.needsFolderRepair=L.hasEmptyProperties=L.isAssetArchived=L.hasStatus=L.isEffort=L.isAreaOrProject=L.hasClass=void 0;var En=So();Object.defineProperty(L,"hasClass",{enumerable:!0,get:o(function(){return En.hasClass},"get")});Object.defineProperty(L,"isAreaOrProject",{enumerable:!0,get:o(function(){return En.isAreaOrProject},"get")});Object.defineProperty(L,"isEffort",{enumerable:!0,get:o(function(){return En.isEffort},"get")});Object.defineProperty(L,"hasStatus",{enumerable:!0,get:o(function(){return En.hasStatus},"get")});Object.defineProperty(L,"isAssetArchived",{enumerable:!0,get:o(function(){return En.isAssetArchived},"get")});Object.defineProperty(L,"hasEmptyProperties",{enumerable:!0,get:o(function(){return En.hasEmptyProperties},"get")});Object.defineProperty(L,"needsFolderRepair",{enumerable:!0,get:o(function(){return En.needsFolderRepair},"get")});Object.defineProperty(L,"getTodayDateString",{enumerable:!0,get:o(function(){return En.getTodayDateString},"get")});Object.defineProperty(L,"isPlannedForToday",{enumerable:!0,get:o(function(){return En.isPlannedForToday},"get")});Object.defineProperty(L,"hasPlannedStartTimestamp",{enumerable:!0,get:o(function(){return En.hasPlannedStartTimestamp},"get")});Object.defineProperty(L,"extractDailyNoteDate",{enumerable:!0,get:o(function(){return En.extractDailyNoteDate},"get")});Object.defineProperty(L,"isCurrentDateGteDay",{enumerable:!0,get:o(function(){return En.isCurrentDateGteDay},"get")});Object.defineProperty(L,"inheritsFromPrototype",{enumerable:!0,get:o(function(){return En.inheritsFromPrototype},"get")});Object.defineProperty(L,"isPrototypeClass",{enumerable:!0,get:o(function(){return En.isPrototypeClass},"get")});var Qd=uT();Object.defineProperty(L,"canCreateTask",{enumerable:!0,get:o(function(){return Qd.canCreateTask},"get")});Object.defineProperty(L,"canCreateRelatedTask",{enumerable:!0,get:o(function(){return Qd.canCreateRelatedTask},"get")});Object.defineProperty(L,"canConvertTaskToProject",{enumerable:!0,get:o(function(){return Qd.canConvertTaskToProject},"get")});Object.defineProperty(L,"canSetCriticalityZone",{enumerable:!0,get:o(function(){return Qd.canSetCriticalityZone},"get")});var Kd=fT();Object.defineProperty(L,"canCreateProject",{enumerable:!0,get:o(function(){return Kd.canCreateProject},"get")});Object.defineProperty(L,"canMoveToAnalysis",{enumerable:!0,get:o(function(){return Kd.canMoveToAnalysis},"get")});Object.defineProperty(L,"canMoveToToDo",{enumerable:!0,get:o(function(){return Kd.canMoveToToDo},"get")});Object.defineProperty(L,"canConvertProjectToTask",{enumerable:!0,get:o(function(){return Kd.canConvertProjectToTask},"get")});var _T=pT();Object.defineProperty(L,"canCreateChildArea",{enumerable:!0,get:o(function(){return _T.canCreateChildArea},"get")});Object.defineProperty(L,"canSetActiveFocus",{enumerable:!0,get:o(function(){return _T.canSetActiveFocus},"get")});var jn=gT();Object.defineProperty(L,"canPlanOnToday",{enumerable:!0,get:o(function(){return jn.canPlanOnToday},"get")});Object.defineProperty(L,"canPlanForEvening",{enumerable:!0,get:o(function(){return jn.canPlanForEvening},"get")});Object.defineProperty(L,"canShiftDayBackward",{enumerable:!0,get:o(function(){return jn.canShiftDayBackward},"get")});Object.defineProperty(L,"canShiftDayForward",{enumerable:!0,get:o(function(){return jn.canShiftDayForward},"get")});Object.defineProperty(L,"canSetDraftStatus",{enumerable:!0,get:o(function(){return jn.canSetDraftStatus},"get")});Object.defineProperty(L,"canMoveToBacklog",{enumerable:!0,get:o(function(){return jn.canMoveToBacklog},"get")});Object.defineProperty(L,"canStartEffort",{enumerable:!0,get:o(function(){return jn.canStartEffort},"get")});Object.defineProperty(L,"canMarkDone",{enumerable:!0,get:o(function(){return jn.canMarkDone},"get")});Object.defineProperty(L,"canTrashEffort",{enumerable:!0,get:o(function(){return jn.canTrashEffort},"get")});Object.defineProperty(L,"canVoteOnEffort",{enumerable:!0,get:o(function(){return jn.canVoteOnEffort},"get")});Object.defineProperty(L,"canRollbackStatus",{enumerable:!0,get:o(function(){return jn.canRollbackStatus},"get")});Object.defineProperty(L,"canArchiveTask",{enumerable:!0,get:o(function(){return jn.canArchiveTask},"get")});Object.defineProperty(L,"canMarkReviewed",{enumerable:!0,get:o(function(){return jn.canMarkReviewed},"get")});var rs=yT();Object.defineProperty(L,"canCreateEvent",{enumerable:!0,get:o(function(){return rs.canCreateEvent},"get")});Object.defineProperty(L,"canCreateInstance",{enumerable:!0,get:o(function(){return rs.canCreateInstance},"get")});Object.defineProperty(L,"canCleanProperties",{enumerable:!0,get:o(function(){return rs.canCleanProperties},"get")});Object.defineProperty(L,"canRepairFolder",{enumerable:!0,get:o(function(){return rs.canRepairFolder},"get")});Object.defineProperty(L,"canRenameToUid",{enumerable:!0,get:o(function(){return rs.canRenameToUid},"get")});Object.defineProperty(L,"canCopyLabelToAliases",{enumerable:!0,get:o(function(){return rs.canCopyLabelToAliases},"get")});Object.defineProperty(L,"canCreateNarrowerConcept",{enumerable:!0,get:o(function(){return rs.canCreateNarrowerConcept},"get")});Object.defineProperty(L,"canCreateSubclass",{enumerable:!0,get:o(function(){return rs.canCreateSubclass},"get")});Object.defineProperty(L,"canCreateTaskForDailyNote",{enumerable:!0,get:o(function(){return rs.canCreateTaskForDailyNote},"get")});Object.defineProperty(L,"canCopyFleetingNoteLabel",{enumerable:!0,get:o(function(){return rs.canCopyFleetingNoteLabel},"get")})});var ST=b(wo=>{"use strict";var qk=wo&&wo.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),Wk=wo&&wo.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&qk(e,n,t)};Object.defineProperty(wo,"__esModule",{value:!0});Wk(bT(),wo)});var Yd=b(xu=>{"use strict";Object.defineProperty(xu,"__esModule",{value:!0});xu.PropertyFieldType=void 0;xu.rangeToFieldType=Hk;var Fr;(function(n){n.Text="text",n.Number="number",n.Date="date",n.DateTime="datetime",n.Boolean="boolean",n.Reference="reference",n.Enum="enum",n.StatusSelect="status-select",n.SizeSelect="size-select",n.Wikilink="wikilink",n.Timestamp="timestamp",n.Unknown="unknown"})(Fr||(xu.PropertyFieldType=Fr={}));var wT="http://www.w3.org/2001/XMLSchema#",Gk="https://exocortex.my/ontology/exo#",zk="https://exocortex.my/ontology/ems#";function Hk(n){if(!n)return Fr.Unknown;let e=n.trim();if(!e)return Fr.Unknown;if(e.startsWith(wT)){let t=e.substring(wT.length);return w0(t)}if(e.startsWith("xsd:")){let t=e.substring(4);return w0(t)}if(e.includes("XMLSchema#")){let t=e.indexOf("XMLSchema#"),r=e.substring(t+10);return w0(r)}return e.startsWith(zk)||e.startsWith("ems:")?Qk(e):e.startsWith(Gk)||e.startsWith("exo:")||Kk(e)?Fr.Reference:Fr.Text}o(Hk,"rangeToFieldType");function w0(n){switch(n.toLowerCase()){case"string":case"normalizedstring":case"token":case"language":case"nmtoken":case"name":case"ncname":case"anyuri":return Fr.Text;case"integer":case"int":case"long":case"short":case"byte":case"nonnegativeinteger":case"positiveinteger":case"nonpositiveinteger":case"negativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"decimal":case"float":case"double":return Fr.Number;case"date":return Fr.Date;case"datetime":case"datetimestamp":return Fr.DateTime;case"boolean":return Fr.Boolean;case"time":return Fr.Timestamp;default:return Fr.Text}}o(w0,"xsdTypeToFieldType");function Qk(n){let e=n.toLowerCase();return e.includes("effortstatus")?Fr.StatusSelect:e.includes("tasksize")?Fr.SizeSelect:Fr.Reference}o(Qk,"emsTypeToFieldType");function Kk(n){let e=n.toLowerCase();return e.includes("exocortex.my/ontology")?!0:["asset","task","project","area","effort","class","property","concept"].some(r=>e.includes(r))}o(Kk,"isClassReference")});var v0=b(Iu=>{"use strict";Object.defineProperty(Iu,"__esModule",{value:!0});Iu.propertyNameToUri=Yk;Iu.uriToPropertyName=vT;Iu.extractPropertyLabel=Xk;function Yk(n){return n.replace(/^([a-z]+)__/,"$1:")}o(Yk,"propertyNameToUri");function vT(n){if(n.startsWith("http://")||n.startsWith("https://")){let e=n.match(/\/([a-z]+)#([A-Za-z0-9_]+)$/);if(e)return`${e[1]}__${e[2]}`;let t=n.lastIndexOf("#"),r=n.lastIndexOf("/"),i=Math.max(t,r);return i>=0?n.substring(i+1):n}return n.replace(/^([a-z]+):/,"$1__")}o(vT,"uriToPropertyName");function Xk(n){let r=(n.includes(":")?vT(n):n).replace(/^[a-z]+__/,"").split("_");return(r.length>1?r.slice(1).join(" "):r[0]).replace(/([a-z])([A-Z])/g,"$1 $2").replace(/^./,s=>s.toUpperCase())}o(Xk,"extractPropertyLabel")});var Xd={};py(Xd,{__assign:()=>T0,__asyncDelegator:()=>u4,__asyncGenerator:()=>l4,__asyncValues:()=>f4,__await:()=>Cu,__awaiter:()=>n4,__classPrivateFieldGet:()=>m4,__classPrivateFieldSet:()=>g4,__createBinding:()=>s4,__decorate:()=>e4,__exportStar:()=>a4,__extends:()=>Jk,__generator:()=>i4,__importDefault:()=>p4,__importStar:()=>h4,__makeTemplateObject:()=>d4,__metadata:()=>r4,__param:()=>t4,__read:()=>ET,__rest:()=>Zk,__spread:()=>o4,__spreadArrays:()=>c4,__values:()=>A0});function Jk(n,e){E0(n,e);function t(){this.constructor=n}o(t,"__"),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Zk(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t}function e4(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s}function t4(n,e){return function(t,r){e(t,r,n)}}function r4(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)}function n4(n,e,t,r){function i(s){return s instanceof t?s:new t(function(a){a(s)})}return o(i,"adopt"),new(t||(t=Promise))(function(s,a){function c(f){try{u(r.next(f))}catch(d){a(d)}}o(c,"fulfilled");function l(f){try{u(r.throw(f))}catch(d){a(d)}}o(l,"rejected");function u(f){f.done?s(f.value):i(f.value).then(c,l)}o(u,"step"),u((r=r.apply(n,e||[])).next())})}function i4(n,e){var t={label:0,sent:o(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},r,i,s,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(u){return function(f){return l([u,f])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;t;)try{if(r=1,i&&(s=u[0]&2?i.return:u[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,u[1])).done)return s;switch(i=0,s&&(u=[u[0]&2,s.value]),u[0]){case 0:case 1:s=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,i=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!s||u[1]>s[0]&&u[1]<s[3])){t.label=u[1];break}if(u[0]===6&&t.label<s[1]){t.label=s[1],s=u;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(u);break}s[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(n,t)}catch(f){u=[6,f],i=0}finally{r=s=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function s4(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}function a4(n,e){for(var t in n)t!=="default"&&!e.hasOwnProperty(t)&&(e[t]=n[t])}function A0(n){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&n[e],r=0;if(t)return t.call(n);if(n&&typeof n.length=="number")return{next:o(function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}},"next")};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function ET(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r=t.call(n),i,s=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(c){a={error:c}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(a)throw a.error}}return s}function o4(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(ET(arguments[e]));return n}function c4(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;for(var r=Array(n),i=0,e=0;e<t;e++)for(var s=arguments[e],a=0,c=s.length;a<c;a++,i++)r[i]=s[a];return r}function Cu(n){return this instanceof Cu?(this.v=n,this):new Cu(n)}function l4(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=t.apply(n,e||[]),i,s=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(h){r[h]&&(i[h]=function(p){return new Promise(function(y,S){s.push([h,p,y,S])>1||c(h,p)})})}function c(h,p){try{l(r[h](p))}catch(y){d(s[0][3],y)}}function l(h){h.value instanceof Cu?Promise.resolve(h.value.v).then(u,f):d(s[0][2],h)}function u(h){c("next",h)}function f(h){c("throw",h)}function d(h,p){h(p),s.shift(),s.length&&c(s[0][0],s[0][1])}}function u4(n){var e,t;return e={},r("next"),r("throw",function(i){throw i}),r("return"),e[Symbol.iterator]=function(){return this},e;function r(i,s){e[i]=n[i]?function(a){return(t=!t)?{value:Cu(n[i](a)),done:i==="return"}:s?s(a):a}:s}}function f4(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=n[Symbol.asyncIterator],t;return e?e.call(n):(n=typeof A0=="function"?A0(n):n[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(s){t[s]=n[s]&&function(a){return new Promise(function(c,l){a=n[s](a),i(c,l,a.done,a.value)})}}function i(s,a,c,l){Promise.resolve(l).then(function(u){s({value:u,done:c})},a)}}function d4(n,e){return Object.defineProperty?Object.defineProperty(n,"raw",{value:e}):n.raw=e,n}function h4(n){if(n&&n.__esModule)return n;var e={};if(n!=null)for(var t in n)Object.hasOwnProperty.call(n,t)&&(e[t]=n[t]);return e.default=n,e}function p4(n){return n&&n.__esModule?n:{default:n}}function m4(n,e){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return e.get(n)}function g4(n,e,t){if(!e.has(n))throw new TypeError("attempted to set private field on non-instance");return e.set(n,t),t}var E0,T0,Jd=ZD(()=>{E0=o(function(n,e){return E0=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var i in r)r.hasOwnProperty(i)&&(t[i]=r[i])},E0(n,e)},"extendStatics");o(Jk,"__extends");T0=o(function(){return T0=Object.assign||o(function(e){for(var t,r=1,i=arguments.length;r<i;r++){t=arguments[r];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},"__assign"),T0.apply(this,arguments)},"__assign");o(Zk,"__rest");o(e4,"__decorate");o(t4,"__param");o(r4,"__metadata");o(n4,"__awaiter");o(i4,"__generator");o(s4,"__createBinding");o(a4,"__exportStar");o(A0,"__values");o(ET,"__read");o(o4,"__spread");o(c4,"__spreadArrays");o(Cu,"__await");o(l4,"__asyncGenerator");o(u4,"__asyncDelegator");o(f4,"__asyncValues");o(d4,"__makeTemplateObject");o(h4,"__importStar");o(p4,"__importDefault");o(m4,"__classPrivateFieldGet");o(g4,"__classPrivateFieldSet")});var C0=b(I0=>{"use strict";Object.defineProperty(I0,"__esModule",{value:!0});var x0;(function(n){n[n.Transient=0]="Transient",n[n.Singleton=1]="Singleton",n[n.ResolutionScoped=2]="ResolutionScoped",n[n.ContainerScoped=3]="ContainerScoped"})(x0||(x0={}));I0.default=x0});var TT=b(R0=>{"use strict";Object.defineProperty(R0,"__esModule",{value:!0});var y4=C0();Object.defineProperty(R0,"Lifecycle",{enumerable:!0,get:o(function(){return y4.default},"get")})});var vo=b(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});di.defineInjectionTokenMetadata=di.getParamInfo=di.INJECTION_TOKEN_METADATA_KEY=void 0;di.INJECTION_TOKEN_METADATA_KEY="injectionTokens";function _4(n){let e=Reflect.getMetadata("design:paramtypes",n)||[],t=Reflect.getOwnMetadata(di.INJECTION_TOKEN_METADATA_KEY,n)||{};return Object.keys(t).forEach(r=>{e[+r]=t[r]}),e}o(_4,"getParamInfo");di.getParamInfo=_4;function b4(n,e){return function(t,r,i){let s=Reflect.getOwnMetadata(di.INJECTION_TOKEN_METADATA_KEY,t)||{};s[i]=e?{token:n,transform:e.transformToken,transformArgs:e.args||[]}:n,Reflect.defineMetadata(di.INJECTION_TOKEN_METADATA_KEY,s,t)}}o(b4,"defineInjectionTokenMetadata");di.defineInjectionTokenMetadata=b4});var O0=b(Zd=>{"use strict";Object.defineProperty(Zd,"__esModule",{value:!0});Zd.isClassProvider=void 0;function S4(n){return!!n.useClass}o(S4,"isClassProvider");Zd.isClassProvider=S4});var P0=b(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0});eh.isFactoryProvider=void 0;function w4(n){return!!n.useFactory}o(w4,"isFactoryProvider");eh.isFactoryProvider=w4});var rh=b(_c=>{"use strict";Object.defineProperty(_c,"__esModule",{value:!0});_c.delay=_c.DelayedConstructor=void 0;var th=class{static{o(this,"DelayedConstructor")}constructor(e){this.wrap=e,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}createProxy(e){let t={},r=!1,i,s=o(()=>(r||(i=e(this.wrap()),r=!0),i),"delayedObject");return new Proxy(t,this.createHandler(s))}createHandler(e){let t={},r=o(i=>{t[i]=(...s)=>{s[0]=e();let a=Reflect[i];return a(...s)}},"install");return this.reflectMethods.forEach(r),t}};_c.DelayedConstructor=th;function v4(n){if(typeof n>"u")throw new Error("Attempt to `delay` undefined. Constructor must be wrapped in a callback");return new th(n)}o(v4,"delay");_c.delay=v4});var nh=b(ns=>{"use strict";Object.defineProperty(ns,"__esModule",{value:!0});ns.isConstructorToken=ns.isTransformDescriptor=ns.isTokenDescriptor=ns.isNormalToken=void 0;var E4=rh();function T4(n){return typeof n=="string"||typeof n=="symbol"}o(T4,"isNormalToken");ns.isNormalToken=T4;function A4(n){return typeof n=="object"&&"token"in n&&"multiple"in n}o(A4,"isTokenDescriptor");ns.isTokenDescriptor=A4;function x4(n){return typeof n=="object"&&"token"in n&&"transform"in n}o(x4,"isTransformDescriptor");ns.isTransformDescriptor=x4;function I4(n){return typeof n=="function"||n instanceof E4.DelayedConstructor}o(I4,"isConstructorToken");ns.isConstructorToken=I4});var F0=b(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});ih.isTokenProvider=void 0;function C4(n){return!!n.useToken}o(C4,"isTokenProvider");ih.isTokenProvider=C4});var D0=b(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0});sh.isValueProvider=void 0;function R4(n){return n.useValue!=null}o(R4,"isValueProvider");sh.isValueProvider=R4});var N0=b(Eo=>{"use strict";Object.defineProperty(Eo,"__esModule",{value:!0});var O4=O0();Object.defineProperty(Eo,"isClassProvider",{enumerable:!0,get:o(function(){return O4.isClassProvider},"get")});var P4=P0();Object.defineProperty(Eo,"isFactoryProvider",{enumerable:!0,get:o(function(){return P4.isFactoryProvider},"get")});var F4=nh();Object.defineProperty(Eo,"isNormalToken",{enumerable:!0,get:o(function(){return F4.isNormalToken},"get")});var D4=F0();Object.defineProperty(Eo,"isTokenProvider",{enumerable:!0,get:o(function(){return D4.isTokenProvider},"get")});var N4=D0();Object.defineProperty(Eo,"isValueProvider",{enumerable:!0,get:o(function(){return N4.isValueProvider},"get")})});var AT=b(ah=>{"use strict";Object.defineProperty(ah,"__esModule",{value:!0});ah.isProvider=void 0;var L4=O0(),k4=D0(),j4=F0(),M4=P0();function $4(n){return L4.isClassProvider(n)||k4.isValueProvider(n)||j4.isTokenProvider(n)||M4.isFactoryProvider(n)}o($4,"isProvider");ah.isProvider=$4});var j0=b(k0=>{"use strict";Object.defineProperty(k0,"__esModule",{value:!0});var L0=class{static{o(this,"RegistryBase")}constructor(){this._registryMap=new Map}entries(){return this._registryMap.entries()}getAll(e){return this.ensure(e),this._registryMap.get(e)}get(e){this.ensure(e);let t=this._registryMap.get(e);return t[t.length-1]||null}set(e,t){this.ensure(e),this._registryMap.get(e).push(t)}setAll(e,t){this._registryMap.set(e,t)}has(e){return this.ensure(e),this._registryMap.get(e).length>0}clear(){this._registryMap.clear()}ensure(e){this._registryMap.has(e)||this._registryMap.set(e,[])}};k0.default=L0});var xT=b($0=>{"use strict";Object.defineProperty($0,"__esModule",{value:!0});var V4=j0(),M0=class extends V4.default{static{o(this,"Registry")}};$0.default=M0});var IT=b(B0=>{"use strict";Object.defineProperty(B0,"__esModule",{value:!0});var V0=class{static{o(this,"ResolutionContext")}constructor(){this.scopedResolutions=new Map}};B0.default=V0});var U0=b(oh=>{"use strict";Object.defineProperty(oh,"__esModule",{value:!0});oh.formatErrorCtor=void 0;function B4(n,e){return n===null?`at position #${e}`:`"${n.split(",")[e].trim()}" at position #${e}`}o(B4,"formatDependency");function U4(n,e,t=" "){return[n,...e.message.split(`
32
32
  `).map(r=>t+r)].join(`
33
- `)}o(U4,"composeErrorMessage");function q4(n,e,t){let[,r=null]=n.toString().match(/constructor\(([\w, ]+)\)/)||[],i=B4(r,e);return U4(`Cannot inject the dependency ${i} of "${n.name}" constructor. Reason:`,t)}o(q4,"formatErrorCtor");oh.formatErrorCtor=q4});var CT=b(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});ch.isDisposable=void 0;function W4(n){return!(typeof n.dispose!="function"||n.dispose.length>0)}o(W4,"isDisposable");ch.isDisposable=W4});var OT=b(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.PostResolutionInterceptors=To.PreResolutionInterceptors=void 0;var RT=j0(),lh=class extends RT.default{static{o(this,"PreResolutionInterceptors")}};To.PreResolutionInterceptors=lh;var uh=class extends RT.default{static{o(this,"PostResolutionInterceptors")}};To.PostResolutionInterceptors=uh;var q0=class{static{o(this,"Interceptors")}constructor(){this.preResolution=new lh,this.postResolution=new uh}};To.default=q0});var Ta=b(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});Bs.instance=Bs.typeInfo=void 0;var G4=(Jd(),Sd(Xd)),cn=N0(),z4=AT(),fh=nh(),H4=xT(),Tn=C0(),dh=IT(),Q4=U0(),K4=rh(),Y4=CT(),X4=OT();Bs.typeInfo=new Map;var W0=class n{static{o(this,"InternalDependencyContainer")}constructor(e){this.parent=e,this._registry=new H4.default,this.interceptors=new X4.default,this.disposed=!1,this.disposables=new Set}register(e,t,r={lifecycle:Tn.default.Transient}){this.ensureNotDisposed();let i;if(z4.isProvider(t)?i=t:i={useClass:t},cn.isTokenProvider(i)){let s=[e],a=i;for(;a!=null;){let c=a.useToken;if(s.includes(c))throw new Error(`Token registration cycle detected! ${[...s,c].join(" -> ")}`);s.push(c);let l=this._registry.get(c);l&&cn.isTokenProvider(l.provider)?a=l.provider:a=null}}if((r.lifecycle===Tn.default.Singleton||r.lifecycle==Tn.default.ContainerScoped||r.lifecycle==Tn.default.ResolutionScoped)&&(cn.isValueProvider(i)||cn.isFactoryProvider(i)))throw new Error(`Cannot use lifecycle "${Tn.default[r.lifecycle]}" with ValueProviders or FactoryProviders`);return this._registry.set(e,{provider:i,options:r}),this}registerType(e,t){return this.ensureNotDisposed(),cn.isNormalToken(t)?this.register(e,{useToken:t}):this.register(e,{useClass:t})}registerInstance(e,t){return this.ensureNotDisposed(),this.register(e,{useValue:t})}registerSingleton(e,t){if(this.ensureNotDisposed(),cn.isNormalToken(e)){if(cn.isNormalToken(t))return this.register(e,{useToken:t},{lifecycle:Tn.default.Singleton});if(t)return this.register(e,{useClass:t},{lifecycle:Tn.default.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}let r=e;return t&&!cn.isNormalToken(t)&&(r=t),this.register(e,{useClass:r},{lifecycle:Tn.default.Singleton})}resolve(e,t=new dh.default,r=!1){this.ensureNotDisposed();let i=this.getRegistration(e);if(!i&&cn.isNormalToken(e)){if(r)return;throw new Error(`Attempted to resolve unregistered dependency token: "${e.toString()}"`)}if(this.executePreResolutionInterceptor(e,"Single"),i){let s=this.resolveRegistration(i,t);return this.executePostResolutionInterceptor(e,s,"Single"),s}if(fh.isConstructorToken(e)){let s=this.construct(e,t);return this.executePostResolutionInterceptor(e,s,"Single"),s}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")}executePreResolutionInterceptor(e,t){if(this.interceptors.preResolution.has(e)){let r=[];for(let i of this.interceptors.preResolution.getAll(e))i.options.frequency!="Once"&&r.push(i),i.callback(e,t);this.interceptors.preResolution.setAll(e,r)}}executePostResolutionInterceptor(e,t,r){if(this.interceptors.postResolution.has(e)){let i=[];for(let s of this.interceptors.postResolution.getAll(e))s.options.frequency!="Once"&&i.push(s),s.callback(e,t,r);this.interceptors.postResolution.setAll(e,i)}}resolveRegistration(e,t){if(this.ensureNotDisposed(),e.options.lifecycle===Tn.default.ResolutionScoped&&t.scopedResolutions.has(e))return t.scopedResolutions.get(e);let r=e.options.lifecycle===Tn.default.Singleton,i=e.options.lifecycle===Tn.default.ContainerScoped,s=r||i,a;return cn.isValueProvider(e.provider)?a=e.provider.useValue:cn.isTokenProvider(e.provider)?a=s?e.instance||(e.instance=this.resolve(e.provider.useToken,t)):this.resolve(e.provider.useToken,t):cn.isClassProvider(e.provider)?a=s?e.instance||(e.instance=this.construct(e.provider.useClass,t)):this.construct(e.provider.useClass,t):cn.isFactoryProvider(e.provider)?a=e.provider.useFactory(this):a=this.construct(e.provider,t),e.options.lifecycle===Tn.default.ResolutionScoped&&t.scopedResolutions.set(e,a),a}resolveAll(e,t=new dh.default,r=!1){this.ensureNotDisposed();let i=this.getAllRegistrations(e);if(!i&&cn.isNormalToken(e)){if(r)return[];throw new Error(`Attempted to resolve unregistered dependency token: "${e.toString()}"`)}if(this.executePreResolutionInterceptor(e,"All"),i){let a=i.map(c=>this.resolveRegistration(c,t));return this.executePostResolutionInterceptor(e,a,"All"),a}let s=[this.construct(e,t)];return this.executePostResolutionInterceptor(e,s,"All"),s}isRegistered(e,t=!1){return this.ensureNotDisposed(),this._registry.has(e)||t&&(this.parent||!1)&&this.parent.isRegistered(e,!0)}reset(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()}clearInstances(){this.ensureNotDisposed();for(let[e,t]of this._registry.entries())this._registry.setAll(e,t.filter(r=>!cn.isValueProvider(r.provider)).map(r=>(r.instance=void 0,r)))}createChildContainer(){this.ensureNotDisposed();let e=new n(this);for(let[t,r]of this._registry.entries())r.some(({options:i})=>i.lifecycle===Tn.default.ContainerScoped)&&e._registry.setAll(t,r.map(i=>i.options.lifecycle===Tn.default.ContainerScoped?{provider:i.provider,options:i.options}:i));return e}beforeResolution(e,t,r={frequency:"Always"}){this.interceptors.preResolution.set(e,{callback:t,options:r})}afterResolution(e,t,r={frequency:"Always"}){this.interceptors.postResolution.set(e,{callback:t,options:r})}dispose(){return G4.__awaiter(this,void 0,void 0,function*(){this.disposed=!0;let e=[];this.disposables.forEach(t=>{let r=t.dispose();r&&e.push(r)}),yield Promise.all(e)})}getRegistration(e){return this.isRegistered(e)?this._registry.get(e):this.parent?this.parent.getRegistration(e):null}getAllRegistrations(e){return this.isRegistered(e)?this._registry.getAll(e):this.parent?this.parent.getAllRegistrations(e):null}construct(e,t){if(e instanceof K4.DelayedConstructor)return e.createProxy(i=>this.resolve(i,t));let r=(()=>{let i=Bs.typeInfo.get(e);if(!i||i.length===0){if(e.length===0)return new e;throw new Error(`TypeInfo not known for "${e.name}"`)}let s=i.map(this.resolveParams(t,e));return new e(...s)})();return Y4.isDisposable(r)&&this.disposables.add(r),r}resolveParams(e,t){return(r,i)=>{try{return fh.isTokenDescriptor(r)?fh.isTransformDescriptor(r)?r.multiple?this.resolve(r.transform).transform(this.resolveAll(r.token,new dh.default,r.isOptional),...r.transformArgs):this.resolve(r.transform).transform(this.resolve(r.token,e,r.isOptional),...r.transformArgs):r.multiple?this.resolveAll(r.token,new dh.default,r.isOptional):this.resolve(r.token,e,r.isOptional):fh.isTransformDescriptor(r)?this.resolve(r.transform,e).transform(this.resolve(r.token,e),...r.transformArgs):this.resolve(r,e)}catch(s){throw new Error(Q4.formatErrorCtor(t,i,s))}}}ensureNotDisposed(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")}};Bs.instance=new W0;Bs.default=Bs.instance});var PT=b(z0=>{"use strict";Object.defineProperty(z0,"__esModule",{value:!0});var J4=vo(),Us=Ta(),G0=nh(),Z4=U0();function ej(){return function(n){let e=J4.getParamInfo(n);return class extends n{constructor(...t){super(...t.concat(e.slice(t.length).map((r,i)=>{try{return G0.isTokenDescriptor(r)?G0.isTransformDescriptor(r)?r.multiple?Us.instance.resolve(r.transform).transform(Us.instance.resolveAll(r.token),...r.transformArgs):Us.instance.resolve(r.transform).transform(Us.instance.resolve(r.token),...r.transformArgs):r.multiple?Us.instance.resolveAll(r.token):Us.instance.resolve(r.token):G0.isTransformDescriptor(r)?Us.instance.resolve(r.transform).transform(Us.instance.resolve(r.token),...r.transformArgs):Us.instance.resolve(r)}catch(s){let a=i+t.length;throw new Error(Z4.formatErrorCtor(n,a,s))}})))}}}}o(ej,"autoInjectable");z0.default=ej});var FT=b(H0=>{"use strict";Object.defineProperty(H0,"__esModule",{value:!0});var tj=vo();function rj(n,e){let t={token:n,multiple:!1,isOptional:e&&e.isOptional};return tj.defineInjectionTokenMetadata(t)}o(rj,"inject");H0.default=rj});var hh=b(Q0=>{"use strict";Object.defineProperty(Q0,"__esModule",{value:!0});var nj=vo(),ij=Ta(),DT=Ta();function sj(n){return function(e){ij.typeInfo.set(e,nj.getParamInfo(e)),n&&n.token&&(Array.isArray(n.token)?n.token.forEach(t=>{DT.instance.register(t,e)}):DT.instance.register(n.token,e))}}o(sj,"injectable");Q0.default=sj});var NT=b(K0=>{"use strict";Object.defineProperty(K0,"__esModule",{value:!0});var aj=(Jd(),Sd(Xd)),oj=Ta();function cj(n=[]){return function(e){return n.forEach(t=>{var{token:r,options:i}=t,s=aj.__rest(t,["token","options"]);return oj.instance.register(r,s,i)}),e}}o(cj,"registry");K0.default=cj});var LT=b(Y0=>{"use strict";Object.defineProperty(Y0,"__esModule",{value:!0});var lj=hh(),uj=Ta();function fj(){return function(n){lj.default()(n),uj.instance.registerSingleton(n)}}o(fj,"singleton");Y0.default=fj});var kT=b(X0=>{"use strict";Object.defineProperty(X0,"__esModule",{value:!0});var dj=vo();function hj(n,e){let t={token:n,multiple:!0,isOptional:e&&e.isOptional};return dj.defineInjectionTokenMetadata(t)}o(hj,"injectAll");X0.default=hj});var jT=b(J0=>{"use strict";Object.defineProperty(J0,"__esModule",{value:!0});var pj=vo();function mj(n,e,...t){let r={token:n,multiple:!0,transform:e,transformArgs:t};return pj.defineInjectionTokenMetadata(r)}o(mj,"injectAllWithTransform");J0.default=mj});var MT=b(Z0=>{"use strict";Object.defineProperty(Z0,"__esModule",{value:!0});var gj=vo();function yj(n,e,...t){return gj.defineInjectionTokenMetadata(n,{transformToken:e,args:t})}o(yj,"injectWithTransform");Z0.default=yj});var $T=b(e_=>{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});var _j=hh(),bj=Ta();function Sj(n,e){return function(t){_j.default()(t),bj.instance.register(e||t,t,{lifecycle:n})}}o(Sj,"scoped");e_.default=Sj});var VT=b(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});var wj=PT();Object.defineProperty(hi,"autoInjectable",{enumerable:!0,get:o(function(){return wj.default},"get")});var vj=FT();Object.defineProperty(hi,"inject",{enumerable:!0,get:o(function(){return vj.default},"get")});var Ej=hh();Object.defineProperty(hi,"injectable",{enumerable:!0,get:o(function(){return Ej.default},"get")});var Tj=NT();Object.defineProperty(hi,"registry",{enumerable:!0,get:o(function(){return Tj.default},"get")});var Aj=LT();Object.defineProperty(hi,"singleton",{enumerable:!0,get:o(function(){return Aj.default},"get")});var xj=kT();Object.defineProperty(hi,"injectAll",{enumerable:!0,get:o(function(){return xj.default},"get")});var Ij=jT();Object.defineProperty(hi,"injectAllWithTransform",{enumerable:!0,get:o(function(){return Ij.default},"get")});var Cj=MT();Object.defineProperty(hi,"injectWithTransform",{enumerable:!0,get:o(function(){return Cj.default},"get")});var Rj=$T();Object.defineProperty(hi,"scoped",{enumerable:!0,get:o(function(){return Rj.default},"get")})});var BT=b(t_=>{"use strict";Object.defineProperty(t_,"__esModule",{value:!0});function Oj(n){let e;return t=>(e==null&&(e=n(t)),e)}o(Oj,"instanceCachingFactory");t_.default=Oj});var UT=b(r_=>{"use strict";Object.defineProperty(r_,"__esModule",{value:!0});function Pj(n){let e=new WeakMap;return t=>{let r=e.get(t);return r==null&&(r=n(t),e.set(t,r)),r}}o(Pj,"instancePerContainerCachingFactory");r_.default=Pj});var qT=b(n_=>{"use strict";Object.defineProperty(n_,"__esModule",{value:!0});function Fj(n,e,t,r=!0){let i,s;return a=>{let c=n(a);return(!r||s!==c)&&((s=c)?i=a.resolve(e):i=a.resolve(t)),i}}o(Fj,"predicateAwareClassFactory");n_.default=Fj});var WT=b(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});var Dj=BT();Object.defineProperty(Ru,"instanceCachingFactory",{enumerable:!0,get:o(function(){return Dj.default},"get")});var Nj=UT();Object.defineProperty(Ru,"instancePerContainerCachingFactory",{enumerable:!0,get:o(function(){return Nj.default},"get")});var Lj=qT();Object.defineProperty(Ru,"predicateAwareClassFactory",{enumerable:!0,get:o(function(){return Lj.default},"get")})});var Ce=b(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});var i_=(Jd(),Sd(Xd));if(typeof Reflect>"u"||!Reflect.getMetadata)throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);var kj=TT();Object.defineProperty(Aa,"Lifecycle",{enumerable:!0,get:o(function(){return kj.Lifecycle},"get")});i_.__exportStar(VT(),Aa);i_.__exportStar(WT(),Aa);i_.__exportStar(N0(),Aa);var jj=rh();Object.defineProperty(Aa,"delay",{enumerable:!0,get:o(function(){return jj.delay},"get")});var Mj=Ta();Object.defineProperty(Aa,"container",{enumerable:!0,get:o(function(){return Mj.instance},"get")})});var bc=b(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});ph.NullLogger=void 0;ph.NullLogger={debug(){},info(){},warn(){},error(){}}});var s_=b((Zee,GT)=>{var Sc=class{static{o(this,"Wildcard")}constructor(){return $j||this}equals(e){return e&&this.termType===e.termType}};Object.defineProperty(Sc.prototype,"value",{enumerable:!0,value:"*"});Object.defineProperty(Sc.prototype,"termType",{enumerable:!0,value:"Wildcard"});var $j=new Sc;GT.exports.Wildcard=Sc});var HT=b((tte,zT)=>{var Vj=(function(){var n=o(function(R,I,O,N){for(O=O||{},N=R.length;N--;O[R[N]]=I);return O},"o"),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],t=[2,247],r=[100,110,113,115,116,123,126,131,329,330,331,332,333],i=[2,409],s=[1,18],a=[1,27],c=[13,16,45,197,224,229,308],l=[28,29,53],u=[28,53],f=[1,42],d=[1,45],h=[1,41],p=[1,44],y=[123,126],S=[1,67],v=[39,45,87],w=[13,16,45,197,224,308],T=[1,87],C=[2,281],M=[1,86],$=[13,16,45,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],ee=[6,28,29,53,63,70,73,81,83,85],B=[6,13,16,28,29,53,63,70,73,81,83,85,87,308],z=[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],P=[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],D=[13,16,308],J=[112,132,327,334],qe=[13,16,112,132,308],et=[1,111],ve=[1,117],$e=[112,132,327,328,334],Re=[13,16,112,132,308,328],ne=[28,29,45,53,87],Z=[1,138],U=[1,151],it=[1,128],mt=[1,127],H=[1,129],De=[1,140],Qe=[1,141],te=[1,142],Ke=[1,143],Ye=[1,144],Ge=[1,145],Xe=[1,147],xe=[1,148],ze=[2,457],Ne=[1,158],He=[1,159],Je=[1,160],le=[1,152],pe=[1,153],me=[1,156],ue=[1,171],fe=[1,172],de=[1,173],oe=[1,174],ge=[1,175],ye=[1,176],_e=[1,167],be=[1,168],se=[1,169],Se=[1,170],st=[1,157],Ze=[1,166],We=[1,161],E=[1,162],A=[1,163],x=[1,164],F=[1,165],X=[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],bt=[1,195],xt=[6,31,73,81,83,85],ke=[2,285],W=[1,199],G=[1,201],Q=[6,31,70,73,81,83,85],K=[2,283],Oe=[1,207],ot=[1,218],ct=[1,223],Cr=[1,219],Sn=[1,225],Ln=[1,226],tn=[1,224],bE=[6,63,70,73,81,83,85],SE=[1,236],wE=[2,334],vE=[1,243],EE=[1,241],Rr=[6,193],Jf=[2,349],TE=[2,339],ya=[28,128],AE=[47,48,193,272],Zf=[47,48,193,242,272],rc=[47,48,193,242,246,272],nc=[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],xE=[1,271],IE=[1,270],Yt=[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],CE=[1,281],RE=[1,280],rn=[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],tu=[45,89],ed=[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],td=[13,16,31,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],rd=[31,89],nd=[48,87],no=[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],Qi=[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],OE=[1,313],ic=[6,85],Hg=[6,31,81,83,85],PE=[2,361],Rs=[2,353],io=[1,343],ru=[31,112,335],Os=[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],Qg=[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],FE=[6,109,193],so=[31,112],Xt=[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],Kg=[1,390],Yg=[1,391],_a=[13,16,87,197,308,314],DE=[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],id=[1,417],sd=[1,418],NE=[13,16,48,197,229,308],ba=[6,31,85],LE=[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],Xg=[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],ao=[29,31,85,112,159,160,161,163,164],ad=[1,443],od=[1,444],kE=[1,449],oo=[31,112,193,232,318,335],cd=[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],jE=[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],Jg=[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],nu=[13,16,31,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],iu=[31,45],ME=[1,507],$E=[1,508],VE=[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],ld=[29,31,85,112,159,160,161,163,164,335],co=[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],BE=[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],UE=[2,352],Zg=[13,16,197,308,314],qE=[1,565],sc=[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],WE=[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],Ps=[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=[13,16,87,308],Fs=[2,364],ac=[29,31,85,112,159,160,161,163,164,193,232,318,335],ud=[31,112,193,232,272,318,335],Ds=[2,359],zE=[13,16,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],fd=[29,31,85,112,159,160,161,163,164,193,232,272,318,335],HE=[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],QE=[2,347],ey={trace:o(function(){},"trace"),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:o(function(I,O,N,re,Le,g,sn){var _=g.length-1;switch(Le){case 1:if(g[_-1]=g[_-1]||{},Ve.base&&(g[_-1].base=Ve.base),Ve.base="",g[_-1].prefixes=Ve.prefixes,Ve.prefixes=null,Ve.pathOnly){if(g[_-1].type==="path"||"termType"in g[_-1])return g[_-1];throw new Error("Received full SPARQL query in path only mode")}else if(g[_-1].type==="path"||"termType"in g[_-1])throw new Error("Received only path in full SPARQL mode");if(g[_-1].type==="update"){let St={};for(let Dt of g[_-1].updates)if(Dt.updateType==="insert"){let lt={};for(let dt of Dt.insert)if(dt.type==="bgp"||dt.type==="graph")for(let wn of dt.triples)wn.subject.termType==="BlankNode"&&(lt[wn.subject.value]=!0),wn.predicate.termType==="BlankNode"&&(lt[wn.predicate.value]=!0),wn.object.termType==="BlankNode"&&(lt[wn.object.value]=!0);for(let dt of Object.keys(lt)){if(St[dt])throw new Error("Detected reuse blank node across different INSERT DATA clauses");St[dt]=!0}}}return g[_-1];case 2:this.$={...g[_-1],...g[_],type:"query"};break;case 4:Ve.base=su(g[_]);break;case 5:Ve.prefixes||(Ve.prefixes={}),g[_-1]=g[_-1].substr(0,g[_-1].length-1),g[_]=su(g[_]),Ve.prefixes[g[_-1]]=g[_];break;case 6:this.$={...g[_-3],...fo(g[_-2]),...g[_-1],...g[_]};break;case 7:if(!Ve.skipValidation&&(cy(g[_-3].variables.map(Dt=>oy(Dt.expression))).some(Dt=>Dt.aggregation==="count"&&!(Dt.expression instanceof dd))||g[_].group)){for(let Dt of g[_-3].variables)if(Dt.termType==="Variable"){if(!g[_].group||!g[_].group.map(lt=>uc(lt)).includes(uc(Dt)))throw Error("Projection of ungrouped variable (?"+uc(Dt)+")")}else if(oy(Dt.expression).length===0){let lt=GD(Dt.expression);for(let dt of lt)if(!g[_].group||!g[_].group.map||!g[_].group.map(wn=>uc(wn)).includes(uc(dt)))throw Error("Use of ungrouped variable in projection of operation (?"+uc(dt)+")")}}let Ji=g[_-1].where.filter(St=>St.type==="query");if(Ji.length>0){let St=g[_-3].variables.filter(lt=>lt.variable&&lt.variable.value).map(lt=>lt.variable.value),Dt=cy(Ji.map(lt=>lt.variables)).map(lt=>lt.value||lt.variable.value);for(let lt of St)if(Dt.indexOf(lt)>=0)throw Error("Target id of 'AS' (?"+lt+") already used in subquery")}this.$=Wt(g[_-3],fo(g[_-2]),g[_-1],g[_]);break;case 8:this.$=Wt({queryType:"CONSTRUCT",template:g[_-3]},fo(g[_-2]),g[_-1],g[_]);break;case 9:this.$=Wt({queryType:"CONSTRUCT",template:g[_-2]=g[_-2]?g[_-2].triples:[]},fo(g[_-5]),{where:[{type:"bgp",triples:uo([],g[_-2])}]},g[_]);break;case 10:this.$=Wt({queryType:"DESCRIBE",variables:g[_-3]==="*"?[new dd]:g[_-3]},fo(g[_-2]),g[_-1],g[_]);break;case 11:this.$=Wt({queryType:"ASK"},fo(g[_-2]),g[_-1],g[_]);break;case 12:this.$=Wt(g[_-1],{variables:[new dd]});break;case 13:let uu=g[_].map(St=>St.value||St.variable.value),fc=zD(uu);if(fc.length>0)throw Error("Two or more of the resulting columns have the same name (?"+fc[0]+")");this.$=Wt(g[_-1],{variables:g[_]});break;case 14:this.$=Wt({queryType:"SELECT"},g[_]&&(g[_-1]=nn(g[_]),g[_]={},g[_][g[_-1]]=!0,g[_]));break;case 16:case 27:this.$=oc(g[_-3],{variable:g[_-1]});break;case 17:case 18:this.$=Wt(g[_-3],g[_-2],g[_-1],g[_],{type:"query"});break;case 19:case 58:this.$={iri:g[_],named:!!g[_-1]};break;case 20:this.$={where:g[_].patterns};break;case 21:this.$=Wt(g[_-1],g[_]);break;case 22:this.$=Wt(g[_-2],g[_-1],g[_]);break;case 23:this.$={group:g[_]};break;case 24:case 25:case 28:case 31:case 33:case 34:this.$=oc(g[_]);break;case 26:this.$=oc(g[_-1]);break;case 29:this.$={having:g[_]};break;case 30:this.$={order:g[_]};break;case 32:this.$=oc(g[_],{descending:!0});break;case 35:this.$={limit:lc(g[_])};break;case 36:this.$={offset:lc(g[_])};break;case 37:this.$={limit:lc(g[_-2]),offset:lc(g[_])};break;case 38:this.$={limit:lc(g[_]),offset:lc(g[_-2])};break;case 39:case 43:this.$={type:"values",values:g[_]};break;case 40:case 84:this.$=g[_-1].map(St=>({[g[_-3]]:St}));break;case 41:case 85:this.$=g[_-1].map(()=>({}));break;case 42:case 86:var Xi=g[_-4].length;g[_-4]=g[_-4].map(ty),this.$=g[_-1].map(function(St){if(St.length!==Xi)throw Error("Inconsistent VALUES length");for(var Dt={},lt=0;lt<Xi;lt++)Dt["?"+g[_-4][lt].value]=St[lt];return Dt});break;case 44:case 65:case 100:case 126:case 175:this.$=g[_-1];break;case 45:this.$={type:"update",updates:Ns(g[_-2],g[_-1])};break;case 46:this.$=Wt({type:"load",silent:!!g[_-2],source:g[_-1]},g[_]&&{destination:g[_]});break;case 47:this.$={type:nn(g[_-2]),silent:!!g[_-1],graph:g[_]};break;case 48:this.$={type:nn(g[_-4]),silent:!!g[_-3],source:g[_-2],destination:g[_]};break;case 49:this.$={type:"create",silent:!!g[_-2],graph:{type:"graph",name:g[_]}};break;case 50:this.$={updateType:"insert",insert:s2(g[_])};break;case 51:this.$={updateType:"delete",delete:fy(s2(g[_]))};break;case 52:this.$={updateType:"deletewhere",delete:fy(g[_])};break;case 53:this.$={updateType:"insertdelete",...g[_-4],...g[_-3],...fo(g[_-2],"using"),where:g[_].patterns};break;case 54:case 57:case 62:case 167:case 191:case 236:this.$=g[_];break;case 55:this.$={delete:fy(g[_-1]),insert:g[_]||[]};break;case 56:this.$={delete:[],insert:g[_]};break;case 59:this.$={graph:g[_]};break;case 60:this.$={type:"graph",default:!0};break;case 61:case 63:this.$={type:"graph",name:g[_]};break;case 64:this.$={[nn(g[_])]:!0};break;case 66:this.$=g[_-1]?Ki(g[_],[g[_-1]]):Ki(g[_]);break;case 67:var cu=Wt(g[_-3]||{triples:[]},{type:"graph",name:g[_-5]});this.$=g[_]?[cu,g[_]]:[cu];break;case 68:case 73:this.$={type:"bgp",triples:Ki(g[_-2],[g[_-1]])};break;case 69:this.$={type:"group",patterns:[g[_-1]]};break;case 70:for(let St of g[_-1].filter(Dt=>Dt.type==="bind")){let Dt=g[_-1].indexOf(St),lt=new Set;for(let dt of g[_-1].slice(0,Dt))(dt.type==="group"||dt.type==="bgp")&&n2(dt).forEach(wn=>lt.add(wn));if(lt.has(St.variable.value))throw Error("Variable used to bind is already bound (?"+St.variable.value+")")}this.$={type:"group",patterns:g[_-1]};break;case 71:this.$=g[_-1]?Ki([g[_-1]],g[_]):Ki(g[_]);break;case 72:this.$=g[_]?[g[_-2],g[_]]:g[_-2];break;case 75:this.$=Wt(g[_],{type:"optional"});break;case 76:this.$=Wt(g[_],{type:"minus"});break;case 77:this.$=Wt(g[_],{type:"graph",name:g[_-1]});break;case 78:this.$=Wt(g[_],{type:"service",name:g[_-1],silent:!!g[_-2]});break;case 79:this.$={type:"filter",expression:g[_]};break;case 80:this.$={type:"bind",variable:g[_-1],expression:g[_-3]};break;case 89:this.$=ou(g[_]);break;case 90:this.$=void 0;break;case 91:this.$=g[_-1].length?{type:"union",patterns:Ki(g[_-1].map(ny),[ny(g[_])])}:g[_];break;case 95:this.$={...g[_],function:g[_-1]};break;case 96:this.$={type:"functionCall",args:[]};break;case 97:this.$={type:"functionCall",args:Ns(g[_-2],g[_-1]),distinct:!!g[_-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.$=Ns(g[_-2],g[_-1]);break;case 101:this.$=Ki(g[_-2],[g[_-1]]);break;case 102:case 112:this.$=uy(g[_].map(St=>Wt(Ls(g[_-1]),St)));break;case 103:this.$=uy(uo(g[_].map(St=>Wt(Ls(g[_-1].entity),St)),g[_-1].triples));break;case 105:this.$=Ki([g[_-1]],g[_]);break;case 106:this.$=Ki(g[_]);break;case 107:this.$=ay(g[_-1],g[_]);break;case 109:case 237:this.$=Ve.factory.namedNode(LD);break;case 110:case 118:this.$=Ns(g[_-1],g[_]);break;case 111:this.$=g[_]?{annotation:g[_],object:g[_-1]}:g[_-1];break;case 113:this.$=g[_]?uy(uo(g[_].map(St=>Wt(Ls(g[_-1].entity),St)),g[_-1].triples)):g[_-1].triples;break;case 114:this.$=ay(...g[_-1],g[_]);break;case 116:this.$=ay(...g[_]);break;case 117:case 159:case 163:this.$=[g[_-1],g[_]];break;case 119:this.$=g[_]?{object:g[_-1],annotation:g[_]}:g[_-1];break;case 120:this.$=g[_-1].length?cc("|",Ns(g[_-1],g[_])):g[_];break;case 121:this.$=g[_-1].length?cc("/",Ns(g[_-1],g[_])):g[_];break;case 122:this.$=g[_]?cc(g[_],[g[_-1]]):g[_-1];break;case 123:this.$=g[_-1]?cc(g[_-1],[g[_]]):g[_];break;case 125:case 131:this.$=cc(g[_-1],[g[_]]);break;case 129:this.$=cc("|",Ns(g[_-2],g[_-1]));break;case 132:case 134:this.$=qD(g[_-1]);break;case 133:case 135:this.$=WD(g[_-1]);break;case 140:this.$={entity:g[_],triples:[]};break;case 145:this.$=ty(g[_]);break;case 149:this.$=Ve.factory.namedNode(KE);break;case 151:case 153:case 158:case 162:this.$=ry(g[_-1],g[_]);break;case 152:this.$=["||",g[_]];break;case 154:this.$=["&&",g[_]];break;case 156:this.$=Or(g[_-1],[g[_-2],g[_]]);break;case 157:this.$=Or(g[_-2]?"notin":"in",[g[_-3],g[_]]);break;case 160:this.$=["+",ry(g[_-1],g[_])];break;case 161:var md=Yi(g[_-1].value.replace("-",""),g[_-1].datatype);this.$=["-",ry(md,g[_])];break;case 164:this.$=Or("UPLUS",[g[_]]);break;case 165:this.$=Or(g[_-1],[g[_]]);break;case 166:this.$=Or("UMINUS",[g[_]]);break;case 177:this.$=Or(nn(g[_-1]));break;case 178:this.$=Or(nn(g[_-3]),[g[_-1]]);break;case 179:this.$=ou(Or(nn(g[_-3]),[g[_-1]]));break;case 180:this.$=Or(nn(g[_-5]),[g[_-3],g[_-1]]);break;case 181:this.$=Or(nn(g[_-7]),[g[_-5],g[_-3],g[_-1]]);break;case 182:this.$=ou(Or(nn(g[_-7]),[g[_-5],g[_-3],g[_-1]]));break;case 183:this.$=Or(nn(g[_-1]),g[_]);break;case 184:this.$=Or("bound",[ty(g[_-1])]);break;case 185:this.$=Or(g[_-1],[]);break;case 186:this.$=Or(g[_-3],[g[_-1]]);break;case 187:this.$=Or(g[_-2]?"notexists":"exists",[ny(g[_])]);break;case 188:case 189:this.$=oc(g[_-1],{type:"aggregate",aggregation:nn(g[_-4]),distinct:!!g[_-2]});break;case 190:this.$=oc(g[_-2],{type:"aggregate",aggregation:nn(g[_-5]),distinct:!!g[_-3],separator:typeof g[_-1]=="string"?g[_-1]:" "});break;case 192:this.$=Yi(g[_]);break;case 193:this.$=$D(g[_-1],nn(g[_].substr(1)));break;case 194:this.$=Yi(g[_-2],g[_]);break;case 195:case 204:this.$=Yi(g[_],YE);break;case 196:case 205:this.$=Yi(g[_],XE);break;case 197:case 206:this.$=Yi(nn(g[_]),JE);break;case 200:this.$=Yi(g[_].toLowerCase(),MD);break;case 201:this.$=Yi(g[_].substr(1),YE);break;case 202:this.$=Yi(g[_].substr(1),XE);break;case 203:this.$=Yi(g[_].substr(1).toLowerCase(),JE);break;case 207:case 208:this.$=r2(g[_],1);break;case 209:case 210:this.$=r2(g[_],3);break;case 211:this.$=Ve.factory.namedNode(su(g[_]));break;case 213:var gd=g[_].indexOf(":"),lu=g[_].substr(0,gd),yd=Ve.prefixes[lu];if(!yd)throw new Error("Unknown prefix: "+lu);var jt=su(yd+g[_].substr(gd+1));this.$=Ve.factory.namedNode(jt);break;case 214:if(g[_]=g[_].substr(0,g[_].length-1),!(g[_]in Ve.prefixes))throw new Error("Unknown prefix: "+g[_]);var jt=su(Ve.prefixes[g[_]]);this.$=Ve.factory.namedNode(jt);break;case 215:this.$=au(g[_].replace(/^(_:)/,""));break;case 216:this.$=au();break;case 217:case 218:case 232:this.$=ou(iy(g[_-3],g[_-2],g[_-1]));break;case 230:case 231:this.$=ou(g[_-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:g[_-1].push(g[_]);break;case 259:case 269:case 291:case 293:case 295:case 301:case 305:case 371:case 424:case 426:this.$=[g[_]];break;case 308:g[_-3].push(g[_-2]);break;case 350:case 362:case 376:case 380:case 382:case 386:case 396:case 406:case 410:case 412:case 421:g[_-2].push(g[_-1]);break}},"anonymous"),table:[n(e,t,{3:1,4:2,10:3}),{1:[3]},n(r,[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:i,16:i,45:i,197:i,224:i,229:i,308:i,24:[1,13],32:[1,14],36:[1,15],41:s}),n([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:a},{6:[2,239]},n(c,[2,411],{216:28,217:29}),n(l,[2,249],{18:30}),n(l,[2,251],{22:31}),n(u,[2,255],{25:32,27:33,29:[1,34]}),{13:f,16:d,33:35,39:[1,37],44:39,55:40,87:h,139:38,307:43,308:p,323:36},n(l,[2,267],{37:46}),n(y,[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:S,87:h},n(v,[2,273],{42:68,324:69,325:[1,70],326:[1,71]}),n(e,[2,248]),n(e,[2,245]),n(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]},n([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]}),n(w,[2,418],{218:80,222:81,229:[1,82]}),{19:83,28:T,29:C,52:84,53:M,56:85},{19:88,28:T,29:C,52:89,53:M,56:85},n(l,[2,253],{26:90}),{28:[1,91],52:92,53:M},n($,[2,385],{181:93,182:94,183:95,31:[2,383]}),n(ee,[2,263],{34:96}),n(ee,[2,261],{44:39,55:40,307:43,139:97,13:f,16:d,87:h,308:p}),n(ee,[2,262]),n(B,[2,259]),n(z,[2,143]),n(z,[2,144]),n([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]),n(P,[2,211]),n(P,[2,212]),n(P,[2,213]),n(P,[2,214]),{19:98,28:T,29:C,52:99,53:M,56:85},{6:[2,309],99:100,193:[1,101]},n(D,[2,311],{101:102,328:[1,103]}),n(J,[2,317],{104:104,328:[1,105]}),n(qe,[2,322],{107:106,328:[1,107]}),{111:108,112:[2,324],328:[1,109]},{29:et,114:110},{29:et,114:112},{29:et,114:113},{118:114,123:[1,115],125:116,126:ve},n($e,[2,315]),n($e,[2,316]),n(Re,[2,319]),n(Re,[2,320]),n(Re,[2,321]),n(y,[2,327]),{13:f,16:d,55:118,307:43,308:p},n(l,[2,12]),n(l,[2,13],{44:66,43:119,45:S,87:h}),n(ne,[2,269]),n(ne,[2,15]),{13:f,16:d,44:136,45:Z,46:120,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(v,[2,14]),n(v,[2,274]),n(v,[2,271]),n(v,[2,272]),n(e,[2,4]),{13:[1,177]},n(X,[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},n(c,[2,410]),n([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:f,16:d,45:[1,193],55:194,197:bt,219:189,220:190,223:191,224:[1,192],307:43,308:p},n(w,[2,419]),n(xt,ke,{20:196,59:197,69:198,70:W}),n(l,[2,250]),{29:G,57:200},n(D,[2,279],{54:202,327:[1,203]}),{29:[2,282]},n(Q,K,{23:204,58:205,62:206,63:Oe}),n(l,[2,252]),{19:208,28:T,29:C,52:209,53:M,56:85},{29:[1,210]},n(u,[2,256]),{31:[1,211]},{31:[2,384]},{13:f,16:d,44:215,45:ot,55:220,82:U,87:h,89:ct,145:212,172:221,185:213,187:214,231:Cr,236:216,237:222,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(bE,[2,265],{56:85,35:227,52:228,19:229,28:T,29:C,53:M}),n(B,[2,260]),n(Q,K,{58:205,62:206,23:230,63:Oe}),n(l,[2,268]),{6:[2,45]},n(e,t,{10:3,4:231}),{13:f,16:d,55:232,307:43,308:p},n(D,[2,312]),{105:233,112:SE,122:234,132:[1,237],134:235,327:[1,238],334:[1,239]},n(J,[2,318]),n(D,wE,{108:240,133:242,112:vE,132:EE}),n(qe,[2,323]),{112:[1,244]},{112:[2,325]},n(Rr,[2,50]),n($,Jf,{135:245,136:246,143:247,144:248,31:TE,112:TE}),n(Rr,[2,51]),n(Rr,[2,52]),n(ya,[2,328],{119:249}),{29:et,114:250},n(ya,[2,56]),{29:et,114:251},n(y,[2,59]),n(ne,[2,270]),{47:[1,252]},n(AE,[2,150]),n(Zf,[2,428],{240:253}),n(rc,[2,430],{244:254}),n(rc,[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]}),n(nc,[2,440],{252:264}),n(gr,[2,448],{260:265}),{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,255:154,257:155,264:266,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,255:154,257:155,264:267,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,255:154,257:155,264:268,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(gr,[2,167]),n(gr,[2,168]),n(gr,[2,169]),n(gr,[2,170],{176:269,45:xE,89:IE}),n(gr,[2,171]),n(gr,[2,172]),n(gr,[2,173]),n(gr,[2,174]),{13:f,16:d,44:136,45:Z,46:272,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Yt,[2,176]),{89:[1,273]},{45:[1,274]},{45:[1,275]},{45:[1,276]},{45:[1,277]},{45:[1,278]},{45:CE,89:RE,179:279},{45:[1,282]},{45:[1,284],89:[1,283]},{279:[1,285]},n(rn,[2,192],{292:[1,286],293:[1,287]}),n(rn,[2,195]),n(rn,[2,196]),n(rn,[2,197]),n(rn,[2,198]),n(rn,[2,199]),n(rn,[2,200]),{13:f,16:d,44:39,55:40,82:U,87:h,139:289,172:291,255:154,257:155,266:290,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,320:288},{45:[1,292]},{45:[1,293]},{45:[1,294]},n(tu,[2,452]),n(tu,[2,453]),n(tu,[2,454]),n(tu,[2,455]),n(tu,[2,456]),{279:[2,458]},n(ed,[2,207]),n(ed,[2,208]),n(ed,[2,209]),n(ed,[2,210]),n(rn,[2,201]),n(rn,[2,202]),n(rn,[2,203]),n(rn,[2,204]),n(rn,[2,205]),n(rn,[2,206]),n(e,[2,5]),n(td,[2,297],{88:295}),n(rd,[2,299],{90:296}),{48:[1,297],87:[1,298]},n(nd,[2,301]),n(X,[2,43]),n(X,[2,82]),n(X,[2,83]),{29:[1,299]},{29:[1,300]},{87:[1,302],169:301},n(c,[2,412]),n(no,[2,123]),n(no,[2,416],{221:303,339:304,39:[1,306],263:[1,307],340:[1,305]}),n(Qi,[2,124]),{13:f,16:d,45:[1,311],55:194,89:[1,310],197:bt,223:312,225:308,226:309,229:OE,307:43,308:p},n(c,i,{215:10,214:314}),n(Qi,[2,236]),n(Qi,[2,237]),n(ic,[2,6]),n(Hg,[2,287],{60:315,72:316,73:[1,317]}),n(xt,[2,286]),{13:f,16:d,45:Z,55:323,67:321,68:322,71:318,77:320,79:319,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,307:43,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F},n([6,31,63,70,73,81,83,85],[2,20]),n($,PE,{38:17,49:324,147:325,17:326,21:327,148:328,154:329,155:330,29:Rs,31:Rs,85:Rs,112:Rs,159:Rs,160:Rs,161:Rs,163:Rs,164:Rs,41:s}),{13:f,16:d,55:331,307:43,308:p},n(D,[2,280]),n(ic,[2,7]),n(xt,ke,{59:197,69:198,20:332,70:W}),n(Q,[2,284]),{64:[1,333]},n(Q,K,{58:205,62:206,23:334,63:Oe}),n(l,[2,254]),n($,Jf,{144:248,30:335,143:336,31:[2,257]}),n(l,[2,100]),{31:[2,387],184:337,335:[1,338]},{13:f,16:d,44:39,55:40,87:h,139:342,186:339,190:340,195:341,197:io,307:43,308:p},n(ru,[2,389],{44:39,55:40,307:43,190:340,195:341,139:342,188:344,189:345,186:346,13:f,16:d,87:h,197:io,308:p}),n(Os,[2,227]),n(Os,[2,228]),n(Os,[2,229]),{13:f,16:d,44:215,45:ot,55:220,82:U,87:h,89:ct,172:221,185:351,187:350,200:348,230:347,231:Cr,234:349,236:216,237:222,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},{13:f,16:d,44:39,55:40,87:h,139:342,186:352,190:340,195:341,197:io,307:43,308:p},n(Os,[2,146]),n(Os,[2,147]),n(Os,[2,148]),n(Os,[2,149]),{13:f,16:d,44:354,55:355,82:U,87:h,172:357,237:356,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,309:Sn,310:Ln,311:358,312:tn,313:353},n(Qg,[2,215]),n(Qg,[2,216]),n(Q,K,{58:205,62:206,23:359,63:Oe}),n(ee,[2,264]),n(bE,[2,266]),n(ic,[2,11]),n(r,[2,308],{6:[2,310]}),n(Rr,[2,313],{102:360,120:361,121:[1,362]}),n(Rr,[2,47]),n(Rr,[2,63]),n(Rr,[2,64]),{13:f,16:d,55:363,307:43,308:p},n(Rr,[2,336]),n(Rr,[2,337]),n(Rr,[2,338]),{109:[1,364]},n(FE,[2,60]),{13:f,16:d,55:365,307:43,308:p},n(D,[2,335]),{13:f,16:d,55:366,307:43,308:p},{31:[1,367]},n(so,[2,341],{137:368}),n(so,[2,340]),{13:f,16:d,44:215,45:ot,55:220,82:U,87:h,89:ct,145:369,172:221,185:213,187:214,231:Cr,236:216,237:222,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},{28:[1,370],127:371,128:[1,372]},n(ya,[2,330],{124:373,125:374,126:ve}),n(ya,[2,57]),{44:375,87:h},n(AE,[2,151],{241:376,242:[1,377]}),n(Zf,[2,153],{245:378,246:[1,379]}),{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,247:380,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{250:[1,381]},n(Xt,[2,432]),n(Xt,[2,433]),n(Xt,[2,434]),n(Xt,[2,435]),n(Xt,[2,436]),n(Xt,[2,437]),{250:[2,439]},n([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:ue,298:fe,299:de,300:oe,301:ge,302:ye}),n(nc,[2,162],{261:388,262:389,39:Kg,338:Yg}),n(gr,[2,164]),n(gr,[2,165]),n(gr,[2,166]),n(Yt,[2,95]),n(Yt,[2,96]),n(Xt,[2,377],{177:392,325:[1,393]}),{48:[1,394]},n(Yt,[2,177]),{13:f,16:d,44:136,45:Z,46:395,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:396,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:397,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:398,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:399,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Yt,[2,183]),n(Yt,[2,98]),n(Xt,[2,381],{180:400}),{87:[1,401]},n(Yt,[2,185]),{13:f,16:d,44:136,45:Z,46:402,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{29:G,57:403},n(rn,[2,193]),{13:f,16:d,55:404,307:43,308:p},{13:f,16:d,44:39,55:40,87:h,139:342,195:405,197:io,307:43,308:p},n(_a,[2,233]),n(_a,[2,234]),n(_a,[2,235]),n(DE,[2,459],{281:406,325:[1,407]}),n(Xt,[2,463],{284:408,325:[1,409]}),n(Xt,[2,465],{286:410,325:[1,411]}),{13:f,16:d,31:[1,412],55:414,82:U,171:413,172:415,173:416,174:id,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:sd},{31:[1,419],89:[1,420]},{29:[1,421]},n(nd,[2,302]),n(td,[2,367],{167:422}),n(rd,[2,369],{168:423}),{48:[1,424],87:[1,425]},n(nd,[2,371]),n(no,[2,122]),n(no,[2,417]),n(no,[2,413]),n(no,[2,414]),n(no,[2,415]),n(Qi,[2,125]),n(Qi,[2,127]),n(Qi,[2,128]),n(NE,[2,420],{227:426}),n(Qi,[2,130]),{13:f,16:d,55:194,197:bt,223:427,307:43,308:p},{48:[1,428]},n(ba,[2,289],{61:429,80:430,81:[1,431],83:[1,432]}),n(Hg,[2,288]),{64:[1,433]},n(xt,[2,29],{307:43,267:139,275:146,278:149,77:320,67:321,68:322,55:323,79:434,13:f,16:d,45:Z,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,276:Xe,277:xe,279:ze,280:Ne,283:He,285:Je,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F}),n(LE,[2,293]),n(Xg,[2,92]),n(Xg,[2,93]),n(Xg,[2,94]),{45:xE,89:IE,176:269},{31:[1,435]},{31:[1,436]},{19:437,28:T,29:C,56:85},{19:438,28:T,29:C,56:85},n(ao,[2,355],{149:439}),n(ao,[2,354]),{13:f,16:d,44:215,45:ad,55:220,82:U,87:h,89:ct,156:440,172:221,185:441,203:442,231:od,236:216,237:222,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(ee,[2,19]),n(ba,[2,21]),{13:f,16:d,44:450,45:kE,55:323,65:445,66:446,67:447,68:448,87:h,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,307:43,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F},n(ic,[2,8]),{31:[1,451]},{31:[2,258]},{31:[2,101]},n($,[2,386],{31:[2,388]}),n(ru,[2,102]),n(oo,[2,391],{191:452}),n($,[2,395],{196:453,198:454}),n($,[2,108]),n($,[2,109]),n(ru,[2,103]),n(ru,[2,104]),n(ru,[2,390]),{13:f,16:d,44:215,45:ot,48:[1,455],55:220,82:U,87:h,89:ct,172:221,185:351,187:350,200:456,231:Cr,234:349,236:216,237:222,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(cd,[2,424]),n(jE,[2,136]),n(jE,[2,137]),n(Jg,[2,140]),{232:[1,457]},{13:f,16:d,44:39,55:40,87:h,139:342,195:458,197:io,307:43,308:p},n(_a,[2,219]),n(_a,[2,220]),n(_a,[2,221]),n(_a,[2,222]),n(_a,[2,223]),n(ic,[2,10]),n(Rr,[2,46]),n(Rr,[2,314]),{112:SE,122:459},n(Rr,[2,62]),n(D,wE,{133:242,108:460,112:vE,132:EE}),n(FE,[2,61]),n(Rr,[2,49]),n([6,28,126,128,193],[2,65]),{31:[2,66],112:[1,462],138:461},n(so,[2,351],{146:463,335:[1,464]}),{29:G,57:465},n(ya,[2,329]),n(D,[2,332],{129:466,327:[1,467]}),n(ya,[2,55]),n(ya,[2,331]),{48:[1,468]},n(Zf,[2,429]),{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,239:469,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(rc,[2,431]),{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,243:470,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(rc,[2,156]),{45:CE,89:RE,179:471},n(nc,[2,441]),{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,251:472,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(gr,[2,444],{256:473}),n(gr,[2,446],{258:474}),n(Xt,[2,442]),n(Xt,[2,443]),n(gr,[2,449]),{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,255:154,257:155,259:475,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Xt,[2,450]),n(Xt,[2,451]),n(Xt,[2,379],{178:476}),n(Xt,[2,378]),n([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:f,16:d,44:136,45:Z,46:482,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{48:[1,483]},{48:[1,484]},n(Yt,[2,187]),n(rn,[2,194]),{13:f,16:d,44:39,55:40,82:U,87:h,139:289,172:291,255:154,257:155,266:290,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,320:485},{13:f,16:d,39:[1,487],44:136,45:Z,46:488,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,282:486,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(DE,[2,460]),{13:f,16:d,44:136,45:Z,46:489,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Xt,[2,464]),{13:f,16:d,44:136,45:Z,46:490,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Xt,[2,466]),n(X,[2,40]),n(td,[2,298]),n(nu,[2,87]),n(nu,[2,88]),n(nu,[2,89]),n(nu,[2,90]),{13:f,16:d,55:492,82:U,172:493,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,311:494,312:tn,315:491},n(X,[2,41]),n(rd,[2,300]),n(iu,[2,303],{92:495}),{13:f,16:d,31:[1,496],55:414,82:U,171:497,172:415,173:416,174:id,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:sd},{31:[1,498],89:[1,499]},{29:[1,500]},n(nd,[2,372]),{13:f,16:d,48:[2,422],55:194,197:bt,223:312,226:502,228:501,229:OE,307:43,308:p},n(Qi,[2,131]),n(Qi,[2,126]),n(ba,[2,22]),n(ba,[2,290]),{82:[1,503]},{82:[1,504]},{13:f,16:d,44:510,45:Z,55:323,67:321,68:322,74:505,75:506,76:ME,77:320,78:$E,79:509,87:h,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,307:43,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F},n(LE,[2,294]),n(VE,[2,69]),n(VE,[2,70]),n(xt,ke,{59:197,69:198,20:511,70:W}),n(Q,K,{58:205,62:206,23:512,63:Oe}),{29:[2,375],31:[2,71],84:522,85:a,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},n(ao,[2,363],{157:524,335:[1,525]}),n(c,i,{215:10,202:526,205:527,208:528,214:529,44:530,87:h}),n(ld,[2,399],{215:10,205:527,208:528,214:529,44:530,204:531,202:532,13:i,16:i,45:i,197:i,224:i,229:i,308:i,87:h}),{13:f,16:d,44:215,45:ad,55:220,82:U,87:h,89:ct,172:221,185:351,203:536,212:534,231:od,233:533,234:535,236:216,237:222,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(c,i,{215:10,205:527,208:528,214:529,44:530,202:537,87:h}),n(Q,[2,23],{307:43,267:139,275:146,278:149,55:323,67:447,68:448,44:450,66:538,13:f,16:d,45:kE,87:h,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,276:Xe,277:xe,279:ze,280:Ne,283:He,285:Je,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F}),n(co,[2,291]),n(co,[2,24]),n(co,[2,25]),{13:f,16:d,44:136,45:Z,46:539,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(co,[2,28]),n(Q,K,{58:205,62:206,23:540,63:Oe}),n([31,112,232,318,335],[2,105],{192:541,193:[1,542]}),n(oo,[2,107]),{13:f,16:d,44:215,45:ot,55:220,82:U,87:h,89:ct,172:221,185:351,187:350,199:543,200:544,231:Cr,234:349,236:216,237:222,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(BE,[2,132]),n(cd,[2,425]),n(BE,[2,133]),{13:f,16:d,44:354,55:355,82:U,87:h,172:357,237:356,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,309:Sn,310:Ln,311:358,312:tn,313:545},n(Rr,[2,54]),n(Rr,[2,48]),n(so,[2,342]),{13:f,16:d,44:39,55:40,87:h,139:546,307:43,308:p},n(so,[2,68]),n($,[2,350],{31:UE,112:UE}),n(Rr,[2,53]),{13:f,16:d,55:547,307:43,308:p},n(D,[2,333]),n(ne,[2,16]),n(Zf,[2,152]),n(rc,[2,154]),n(rc,[2,157]),n(nc,[2,159]),n(nc,[2,160],{262:389,261:548,39:Kg,338:Yg}),n(nc,[2,161],{262:389,261:549,39:Kg,338:Yg}),n(gr,[2,163]),{13:f,16:d,44:136,45:Z,46:550,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Yt,[2,178]),n(Yt,[2,179]),{13:f,16:d,44:136,45:Z,46:551,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:552,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:553,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{48:[1,554],272:[1,555]},n(Yt,[2,184]),n(Yt,[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:f,16:d,55:194,197:bt,223:562,307:43,308:p},n(Zg,[2,224]),n(Zg,[2,225]),n(Zg,[2,226]),{31:[1,563],45:qE,94:564},n(X,[2,84]),n(td,[2,368]),n(X,[2,85]),n(rd,[2,370]),n(iu,[2,373],{170:566}),{48:[1,567]},{48:[2,423],337:[1,568]},n(ba,[2,35],{83:[1,569]}),n(ba,[2,36],{81:[1,570]}),n(Hg,[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:f,16:d,45:Z,76:ME,78:$E,87:h,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,276:Xe,277:xe,279:ze,280:Ne,283:He,285:Je,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F}),n(sc,[2,295]),{45:Z,77:572},{45:Z,77:573},n(sc,[2,33]),n(sc,[2,34]),{31:[2,275],50:574,84:575,85:a},{31:[2,277],51:576,84:577,85:a},n(ao,[2,356]),n(WE,[2,357],{152:578,335:[1,579]}),n(Ps,[2,74]),{29:G,57:580},{29:G,57:581},{13:f,16:d,44:39,55:40,87:h,139:582,307:43,308:p},n(GE,[2,365],{162:583,328:[1,584]}),{13:f,16:d,45:Z,55:323,67:321,68:322,77:320,79:585,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,307:43,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F},{45:[1,586]},n(Ps,[2,81]),{29:G,57:587},n(ao,[2,73]),n($,[2,362],{29:Fs,31:Fs,85:Fs,112:Fs,159:Fs,160:Fs,161:Fs,163:Fs,164:Fs}),n(ld,[2,112]),n(ac,[2,401],{206:588}),n($,[2,405],{209:589,210:590}),n($,[2,403]),n($,[2,404]),n(ld,[2,113]),n(ld,[2,400]),{13:f,16:d,44:215,45:ad,48:[1,591],55:220,82:U,87:h,89:ct,172:221,185:351,203:536,212:592,231:od,234:535,236:216,237:222,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(cd,[2,426]),n(Jg,[2,138]),n(Jg,[2,139]),{232:[1,593]},n(co,[2,292]),{47:[1,595],48:[1,594]},n(ic,[2,9]),n(oo,[2,392]),n(oo,[2,393],{44:39,55:40,307:43,195:341,139:342,194:596,190:597,13:f,16:d,87:h,197:io,308:p}),n(oo,[2,110],{272:[1,598]}),n(ud,[2,397],{201:599,316:600,317:[1,601]}),{314:[1,602]},{29:[1,603]},n(ya,[2,58]),n(gr,[2,445]),n(gr,[2,447]),{48:[1,604],272:[1,605]},{48:[1,606]},{272:[1,607]},{272:[1,608]},n(Yt,[2,99]),n(Xt,[2,382]),n([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]),n(Yt,[2,188]),n(Yt,[2,189]),{48:[1,609]},{48:[2,468]},{289:[1,610]},{13:f,16:d,55:492,82:U,172:493,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,311:494,312:tn,315:611},n(X,[2,42]),n(iu,[2,304]),{13:f,16:d,55:414,82:U,95:612,171:613,172:415,173:416,174:id,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:sd},{31:[1,614],45:qE,94:615},n(Qi,[2,129]),n(NE,[2,421]),{82:[1,616]},{82:[1,617]},n(sc,[2,296]),n(sc,[2,31]),n(sc,[2,32]),{31:[2,17]},{31:[2,276]},{31:[2,18]},{31:[2,278]},n($,PE,{155:330,153:618,154:619,29:Ds,31:Ds,85:Ds,112:Ds,159:Ds,160:Ds,161:Ds,163:Ds,164:Ds}),n(WE,[2,358]),n(Ps,[2,75]),n(Ps,[2,76]),{29:G,57:620},{13:f,16:d,44:39,55:40,87:h,139:621,307:43,308:p},n(GE,[2,366]),n(Ps,[2,79]),{13:f,16:d,44:136,45:Z,46:622,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Ps,[2,91],{336:[1,623]}),n([29,31,85,112,159,160,161,163,164,232,318,335],[2,114],{207:624,193:[1,625]}),n(ac,[2,117]),{13:f,16:d,44:215,45:ad,55:220,82:U,87:h,89:ct,172:221,185:351,203:536,211:626,212:627,231:od,234:535,236:216,237:222,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(Os,[2,134]),n(cd,[2,427]),n(Os,[2,135]),n(co,[2,26]),{44:628,87:h},n(oo,[2,106]),n(oo,[2,394]),n($,[2,396]),n(ud,[2,111]),n(ud,[2,398]),{13:f,16:d,44:39,55:40,87:h,139:342,186:629,190:340,195:341,197:io,307:43,308:p},n(Qg,[2,217]),n($,Jf,{144:248,140:630,143:631,31:[2,343]}),n(Yt,[2,97]),n(Xt,[2,380]),n(Yt,[2,180]),{13:f,16:d,44:136,45:Z,46:632,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:633,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Yt,[2,190]),{290:[1,634]},{314:[1,635]},{13:f,16:d,48:[1,636],55:414,82:U,171:637,172:415,173:416,174:id,255:154,257:155,291:150,294:le,295:pe,296:me,297:ue,298:fe,299:de,300:oe,301:ge,302:ye,303:_e,304:be,305:se,306:Se,307:43,308:p,312:sd},n(zE,[2,305]),n(X,[2,86]),n(iu,[2,374]),n(ba,[2,37]),n(ba,[2,38]),n(ao,[2,72]),n(ao,[2,360]),n(Ps,[2,77]),{29:G,57:638},{47:[1,639]},{29:[2,376]},n(ac,[2,402]),n(ac,[2,115],{215:10,208:528,214:529,44:530,205:640,13:i,16:i,45:i,197:i,224:i,229:i,308:i,87:h}),n(ac,[2,118],{272:[1,641]}),n(fd,[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:_e,304:be,305:se,306:Se},n(nu,[2,218]),n(iu,[2,44]),n(zE,[2,306]),n(Ps,[2,78]),{44:651,87:h},n(ac,[2,116]),n($,[2,406]),n(fd,[2,119]),n(fd,[2,408]),n(c,i,{215:10,205:527,208:528,214:529,44:530,202:652,87:h}),n(co,[2,27]),n(ud,[2,230]),n(HE,[2,345],{141:653,335:[1,654]}),n(Yt,[2,181]),n(Yt,[2,182]),{48:[2,191]},{48:[1,655]},{318:[1,656]},n($,Jf,{144:248,142:657,143:658,31:QE,112:QE}),n(HE,[2,346]),n(Ps,[2,80]),n(fd,[2,231]),n(so,[2,67]),n(so,[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:o(function(I,O){if(O.recoverable)this.trace(I);else{var N=new Error(I);throw N.hash=O,N}},"parseError"),parse:o(function(I){var O=this,N=[0],re=[],Le=[null],g=[],sn=this.table,_="",Xi=0,cu=0,md=0,gd=2,lu=1,yd=g.slice.call(arguments,1),jt=Object.create(this.lexer),Ji={yy:{}};for(var uu in this.yy)Object.prototype.hasOwnProperty.call(this.yy,uu)&&(Ji.yy[uu]=this.yy[uu]);jt.setInput(I,Ji.yy),Ji.yy.lexer=jt,Ji.yy.parser=this,typeof jt.yylloc>"u"&&(jt.yylloc={});var fc=jt.yylloc;g.push(fc);var St=jt.options&&jt.options.ranges;typeof Ji.yy.parseError=="function"?this.parseError=Ji.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Dt(Zi){N.length=N.length-2*Zi,Le.length=Le.length-Zi,g.length=g.length-Zi}o(Dt,"popStack");for(var lt=o(function(){var Zi;return Zi=jt.lex()||lu,typeof Zi!="number"&&(Zi=O.symbols_[Zi]||Zi),Zi},"lex"),dt,wn,ho,zn,gX,dy,dc={},_d,ks,a2,bd;;){if(ho=N[N.length-1],this.defaultActions[ho]?zn=this.defaultActions[ho]:((dt===null||typeof dt>"u")&&(dt=lt()),zn=sn[ho]&&sn[ho][dt]),typeof zn>"u"||!zn.length||!zn[0]){var hy="";bd=[];for(_d in sn[ho])this.terminals_[_d]&&_d>gd&&bd.push("'"+this.terminals_[_d]+"'");jt.showPosition?hy="Parse error on line "+(Xi+1)+`:
33
+ `)}o(U4,"composeErrorMessage");function q4(n,e,t){let[,r=null]=n.toString().match(/constructor\(([\w, ]+)\)/)||[],i=B4(r,e);return U4(`Cannot inject the dependency ${i} of "${n.name}" constructor. Reason:`,t)}o(q4,"formatErrorCtor");oh.formatErrorCtor=q4});var CT=b(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});ch.isDisposable=void 0;function W4(n){return!(typeof n.dispose!="function"||n.dispose.length>0)}o(W4,"isDisposable");ch.isDisposable=W4});var OT=b(To=>{"use strict";Object.defineProperty(To,"__esModule",{value:!0});To.PostResolutionInterceptors=To.PreResolutionInterceptors=void 0;var RT=j0(),lh=class extends RT.default{static{o(this,"PreResolutionInterceptors")}};To.PreResolutionInterceptors=lh;var uh=class extends RT.default{static{o(this,"PostResolutionInterceptors")}};To.PostResolutionInterceptors=uh;var q0=class{static{o(this,"Interceptors")}constructor(){this.preResolution=new lh,this.postResolution=new uh}};To.default=q0});var Ta=b(Bs=>{"use strict";Object.defineProperty(Bs,"__esModule",{value:!0});Bs.instance=Bs.typeInfo=void 0;var G4=(Jd(),Sd(Xd)),cn=N0(),z4=AT(),fh=nh(),H4=xT(),Tn=C0(),dh=IT(),Q4=U0(),K4=rh(),Y4=CT(),X4=OT();Bs.typeInfo=new Map;var W0=class n{static{o(this,"InternalDependencyContainer")}constructor(e){this.parent=e,this._registry=new H4.default,this.interceptors=new X4.default,this.disposed=!1,this.disposables=new Set}register(e,t,r={lifecycle:Tn.default.Transient}){this.ensureNotDisposed();let i;if(z4.isProvider(t)?i=t:i={useClass:t},cn.isTokenProvider(i)){let s=[e],a=i;for(;a!=null;){let c=a.useToken;if(s.includes(c))throw new Error(`Token registration cycle detected! ${[...s,c].join(" -> ")}`);s.push(c);let l=this._registry.get(c);l&&cn.isTokenProvider(l.provider)?a=l.provider:a=null}}if((r.lifecycle===Tn.default.Singleton||r.lifecycle==Tn.default.ContainerScoped||r.lifecycle==Tn.default.ResolutionScoped)&&(cn.isValueProvider(i)||cn.isFactoryProvider(i)))throw new Error(`Cannot use lifecycle "${Tn.default[r.lifecycle]}" with ValueProviders or FactoryProviders`);return this._registry.set(e,{provider:i,options:r}),this}registerType(e,t){return this.ensureNotDisposed(),cn.isNormalToken(t)?this.register(e,{useToken:t}):this.register(e,{useClass:t})}registerInstance(e,t){return this.ensureNotDisposed(),this.register(e,{useValue:t})}registerSingleton(e,t){if(this.ensureNotDisposed(),cn.isNormalToken(e)){if(cn.isNormalToken(t))return this.register(e,{useToken:t},{lifecycle:Tn.default.Singleton});if(t)return this.register(e,{useClass:t},{lifecycle:Tn.default.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}let r=e;return t&&!cn.isNormalToken(t)&&(r=t),this.register(e,{useClass:r},{lifecycle:Tn.default.Singleton})}resolve(e,t=new dh.default,r=!1){this.ensureNotDisposed();let i=this.getRegistration(e);if(!i&&cn.isNormalToken(e)){if(r)return;throw new Error(`Attempted to resolve unregistered dependency token: "${e.toString()}"`)}if(this.executePreResolutionInterceptor(e,"Single"),i){let s=this.resolveRegistration(i,t);return this.executePostResolutionInterceptor(e,s,"Single"),s}if(fh.isConstructorToken(e)){let s=this.construct(e,t);return this.executePostResolutionInterceptor(e,s,"Single"),s}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")}executePreResolutionInterceptor(e,t){if(this.interceptors.preResolution.has(e)){let r=[];for(let i of this.interceptors.preResolution.getAll(e))i.options.frequency!="Once"&&r.push(i),i.callback(e,t);this.interceptors.preResolution.setAll(e,r)}}executePostResolutionInterceptor(e,t,r){if(this.interceptors.postResolution.has(e)){let i=[];for(let s of this.interceptors.postResolution.getAll(e))s.options.frequency!="Once"&&i.push(s),s.callback(e,t,r);this.interceptors.postResolution.setAll(e,i)}}resolveRegistration(e,t){if(this.ensureNotDisposed(),e.options.lifecycle===Tn.default.ResolutionScoped&&t.scopedResolutions.has(e))return t.scopedResolutions.get(e);let r=e.options.lifecycle===Tn.default.Singleton,i=e.options.lifecycle===Tn.default.ContainerScoped,s=r||i,a;return cn.isValueProvider(e.provider)?a=e.provider.useValue:cn.isTokenProvider(e.provider)?a=s?e.instance||(e.instance=this.resolve(e.provider.useToken,t)):this.resolve(e.provider.useToken,t):cn.isClassProvider(e.provider)?a=s?e.instance||(e.instance=this.construct(e.provider.useClass,t)):this.construct(e.provider.useClass,t):cn.isFactoryProvider(e.provider)?a=e.provider.useFactory(this):a=this.construct(e.provider,t),e.options.lifecycle===Tn.default.ResolutionScoped&&t.scopedResolutions.set(e,a),a}resolveAll(e,t=new dh.default,r=!1){this.ensureNotDisposed();let i=this.getAllRegistrations(e);if(!i&&cn.isNormalToken(e)){if(r)return[];throw new Error(`Attempted to resolve unregistered dependency token: "${e.toString()}"`)}if(this.executePreResolutionInterceptor(e,"All"),i){let a=i.map(c=>this.resolveRegistration(c,t));return this.executePostResolutionInterceptor(e,a,"All"),a}let s=[this.construct(e,t)];return this.executePostResolutionInterceptor(e,s,"All"),s}isRegistered(e,t=!1){return this.ensureNotDisposed(),this._registry.has(e)||t&&(this.parent||!1)&&this.parent.isRegistered(e,!0)}reset(){this.ensureNotDisposed(),this._registry.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()}clearInstances(){this.ensureNotDisposed();for(let[e,t]of this._registry.entries())this._registry.setAll(e,t.filter(r=>!cn.isValueProvider(r.provider)).map(r=>(r.instance=void 0,r)))}createChildContainer(){this.ensureNotDisposed();let e=new n(this);for(let[t,r]of this._registry.entries())r.some(({options:i})=>i.lifecycle===Tn.default.ContainerScoped)&&e._registry.setAll(t,r.map(i=>i.options.lifecycle===Tn.default.ContainerScoped?{provider:i.provider,options:i.options}:i));return e}beforeResolution(e,t,r={frequency:"Always"}){this.interceptors.preResolution.set(e,{callback:t,options:r})}afterResolution(e,t,r={frequency:"Always"}){this.interceptors.postResolution.set(e,{callback:t,options:r})}dispose(){return G4.__awaiter(this,void 0,void 0,function*(){this.disposed=!0;let e=[];this.disposables.forEach(t=>{let r=t.dispose();r&&e.push(r)}),yield Promise.all(e)})}getRegistration(e){return this.isRegistered(e)?this._registry.get(e):this.parent?this.parent.getRegistration(e):null}getAllRegistrations(e){return this.isRegistered(e)?this._registry.getAll(e):this.parent?this.parent.getAllRegistrations(e):null}construct(e,t){if(e instanceof K4.DelayedConstructor)return e.createProxy(i=>this.resolve(i,t));let r=(()=>{let i=Bs.typeInfo.get(e);if(!i||i.length===0){if(e.length===0)return new e;throw new Error(`TypeInfo not known for "${e.name}"`)}let s=i.map(this.resolveParams(t,e));return new e(...s)})();return Y4.isDisposable(r)&&this.disposables.add(r),r}resolveParams(e,t){return(r,i)=>{try{return fh.isTokenDescriptor(r)?fh.isTransformDescriptor(r)?r.multiple?this.resolve(r.transform).transform(this.resolveAll(r.token,new dh.default,r.isOptional),...r.transformArgs):this.resolve(r.transform).transform(this.resolve(r.token,e,r.isOptional),...r.transformArgs):r.multiple?this.resolveAll(r.token,new dh.default,r.isOptional):this.resolve(r.token,e,r.isOptional):fh.isTransformDescriptor(r)?this.resolve(r.transform,e).transform(this.resolve(r.token,e),...r.transformArgs):this.resolve(r,e)}catch(s){throw new Error(Q4.formatErrorCtor(t,i,s))}}}ensureNotDisposed(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")}};Bs.instance=new W0;Bs.default=Bs.instance});var PT=b(z0=>{"use strict";Object.defineProperty(z0,"__esModule",{value:!0});var J4=vo(),Us=Ta(),G0=nh(),Z4=U0();function ej(){return function(n){let e=J4.getParamInfo(n);return class extends n{constructor(...t){super(...t.concat(e.slice(t.length).map((r,i)=>{try{return G0.isTokenDescriptor(r)?G0.isTransformDescriptor(r)?r.multiple?Us.instance.resolve(r.transform).transform(Us.instance.resolveAll(r.token),...r.transformArgs):Us.instance.resolve(r.transform).transform(Us.instance.resolve(r.token),...r.transformArgs):r.multiple?Us.instance.resolveAll(r.token):Us.instance.resolve(r.token):G0.isTransformDescriptor(r)?Us.instance.resolve(r.transform).transform(Us.instance.resolve(r.token),...r.transformArgs):Us.instance.resolve(r)}catch(s){let a=i+t.length;throw new Error(Z4.formatErrorCtor(n,a,s))}})))}}}}o(ej,"autoInjectable");z0.default=ej});var FT=b(H0=>{"use strict";Object.defineProperty(H0,"__esModule",{value:!0});var tj=vo();function rj(n,e){let t={token:n,multiple:!1,isOptional:e&&e.isOptional};return tj.defineInjectionTokenMetadata(t)}o(rj,"inject");H0.default=rj});var hh=b(Q0=>{"use strict";Object.defineProperty(Q0,"__esModule",{value:!0});var nj=vo(),ij=Ta(),DT=Ta();function sj(n){return function(e){ij.typeInfo.set(e,nj.getParamInfo(e)),n&&n.token&&(Array.isArray(n.token)?n.token.forEach(t=>{DT.instance.register(t,e)}):DT.instance.register(n.token,e))}}o(sj,"injectable");Q0.default=sj});var NT=b(K0=>{"use strict";Object.defineProperty(K0,"__esModule",{value:!0});var aj=(Jd(),Sd(Xd)),oj=Ta();function cj(n=[]){return function(e){return n.forEach(t=>{var{token:r,options:i}=t,s=aj.__rest(t,["token","options"]);return oj.instance.register(r,s,i)}),e}}o(cj,"registry");K0.default=cj});var LT=b(Y0=>{"use strict";Object.defineProperty(Y0,"__esModule",{value:!0});var lj=hh(),uj=Ta();function fj(){return function(n){lj.default()(n),uj.instance.registerSingleton(n)}}o(fj,"singleton");Y0.default=fj});var kT=b(X0=>{"use strict";Object.defineProperty(X0,"__esModule",{value:!0});var dj=vo();function hj(n,e){let t={token:n,multiple:!0,isOptional:e&&e.isOptional};return dj.defineInjectionTokenMetadata(t)}o(hj,"injectAll");X0.default=hj});var jT=b(J0=>{"use strict";Object.defineProperty(J0,"__esModule",{value:!0});var pj=vo();function mj(n,e,...t){let r={token:n,multiple:!0,transform:e,transformArgs:t};return pj.defineInjectionTokenMetadata(r)}o(mj,"injectAllWithTransform");J0.default=mj});var MT=b(Z0=>{"use strict";Object.defineProperty(Z0,"__esModule",{value:!0});var gj=vo();function yj(n,e,...t){return gj.defineInjectionTokenMetadata(n,{transformToken:e,args:t})}o(yj,"injectWithTransform");Z0.default=yj});var $T=b(e_=>{"use strict";Object.defineProperty(e_,"__esModule",{value:!0});var _j=hh(),bj=Ta();function Sj(n,e){return function(t){_j.default()(t),bj.instance.register(e||t,t,{lifecycle:n})}}o(Sj,"scoped");e_.default=Sj});var VT=b(hi=>{"use strict";Object.defineProperty(hi,"__esModule",{value:!0});var wj=PT();Object.defineProperty(hi,"autoInjectable",{enumerable:!0,get:o(function(){return wj.default},"get")});var vj=FT();Object.defineProperty(hi,"inject",{enumerable:!0,get:o(function(){return vj.default},"get")});var Ej=hh();Object.defineProperty(hi,"injectable",{enumerable:!0,get:o(function(){return Ej.default},"get")});var Tj=NT();Object.defineProperty(hi,"registry",{enumerable:!0,get:o(function(){return Tj.default},"get")});var Aj=LT();Object.defineProperty(hi,"singleton",{enumerable:!0,get:o(function(){return Aj.default},"get")});var xj=kT();Object.defineProperty(hi,"injectAll",{enumerable:!0,get:o(function(){return xj.default},"get")});var Ij=jT();Object.defineProperty(hi,"injectAllWithTransform",{enumerable:!0,get:o(function(){return Ij.default},"get")});var Cj=MT();Object.defineProperty(hi,"injectWithTransform",{enumerable:!0,get:o(function(){return Cj.default},"get")});var Rj=$T();Object.defineProperty(hi,"scoped",{enumerable:!0,get:o(function(){return Rj.default},"get")})});var BT=b(t_=>{"use strict";Object.defineProperty(t_,"__esModule",{value:!0});function Oj(n){let e;return t=>(e==null&&(e=n(t)),e)}o(Oj,"instanceCachingFactory");t_.default=Oj});var UT=b(r_=>{"use strict";Object.defineProperty(r_,"__esModule",{value:!0});function Pj(n){let e=new WeakMap;return t=>{let r=e.get(t);return r==null&&(r=n(t),e.set(t,r)),r}}o(Pj,"instancePerContainerCachingFactory");r_.default=Pj});var qT=b(n_=>{"use strict";Object.defineProperty(n_,"__esModule",{value:!0});function Fj(n,e,t,r=!0){let i,s;return a=>{let c=n(a);return(!r||s!==c)&&((s=c)?i=a.resolve(e):i=a.resolve(t)),i}}o(Fj,"predicateAwareClassFactory");n_.default=Fj});var WT=b(Ru=>{"use strict";Object.defineProperty(Ru,"__esModule",{value:!0});var Dj=BT();Object.defineProperty(Ru,"instanceCachingFactory",{enumerable:!0,get:o(function(){return Dj.default},"get")});var Nj=UT();Object.defineProperty(Ru,"instancePerContainerCachingFactory",{enumerable:!0,get:o(function(){return Nj.default},"get")});var Lj=qT();Object.defineProperty(Ru,"predicateAwareClassFactory",{enumerable:!0,get:o(function(){return Lj.default},"get")})});var Ce=b(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});var i_=(Jd(),Sd(Xd));if(typeof Reflect>"u"||!Reflect.getMetadata)throw new Error(`tsyringe requires a reflect polyfill. Please add 'import "reflect-metadata"' to the top of your entry point.`);var kj=TT();Object.defineProperty(Aa,"Lifecycle",{enumerable:!0,get:o(function(){return kj.Lifecycle},"get")});i_.__exportStar(VT(),Aa);i_.__exportStar(WT(),Aa);i_.__exportStar(N0(),Aa);var jj=rh();Object.defineProperty(Aa,"delay",{enumerable:!0,get:o(function(){return jj.delay},"get")});var Mj=Ta();Object.defineProperty(Aa,"container",{enumerable:!0,get:o(function(){return Mj.instance},"get")})});var bc=b(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});ph.NullLogger=void 0;ph.NullLogger={debug(){},info(){},warn(){},error(){}}});var s_=b((Zee,GT)=>{var Sc=class{static{o(this,"Wildcard")}constructor(){return $j||this}equals(e){return e&&this.termType===e.termType}};Object.defineProperty(Sc.prototype,"value",{enumerable:!0,value:"*"});Object.defineProperty(Sc.prototype,"termType",{enumerable:!0,value:"Wildcard"});var $j=new Sc;GT.exports.Wildcard=Sc});var HT=b((tte,zT)=>{var Vj=(function(){var n=o(function(R,I,O,N){for(O=O||{},N=R.length;N--;O[R[N]]=I);return O},"o"),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],t=[2,247],r=[100,110,113,115,116,123,126,131,329,330,331,332,333],i=[2,409],s=[1,18],a=[1,27],c=[13,16,45,197,224,229,308],l=[28,29,53],u=[28,53],f=[1,42],d=[1,45],h=[1,41],p=[1,44],y=[123,126],S=[1,67],v=[39,45,87],w=[13,16,45,197,224,308],T=[1,87],C=[2,281],M=[1,86],$=[13,16,45,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],ee=[6,28,29,53,63,70,73,81,83,85],B=[6,13,16,28,29,53,63,70,73,81,83,85,87,308],z=[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],P=[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],D=[13,16,308],J=[112,132,327,334],qe=[13,16,112,132,308],et=[1,111],pe=[1,117],$e=[112,132,327,328,334],Re=[13,16,112,132,308,328],ne=[28,29,45,53,87],Z=[1,138],U=[1,151],it=[1,128],mt=[1,127],H=[1,129],De=[1,140],Qe=[1,141],te=[1,142],Ke=[1,143],Ye=[1,144],Ge=[1,145],Xe=[1,147],xe=[1,148],ze=[2,457],Ne=[1,158],He=[1,159],Je=[1,160],le=[1,152],me=[1,153],ge=[1,156],ue=[1,171],fe=[1,172],de=[1,173],oe=[1,174],ye=[1,175],_e=[1,176],be=[1,167],Se=[1,168],se=[1,169],we=[1,170],st=[1,157],Ze=[1,166],We=[1,161],E=[1,162],A=[1,163],x=[1,164],F=[1,165],X=[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],bt=[1,195],xt=[6,31,73,81,83,85],ke=[2,285],W=[1,199],G=[1,201],Q=[6,31,70,73,81,83,85],K=[2,283],Oe=[1,207],ot=[1,218],ct=[1,223],Cr=[1,219],Sn=[1,225],Ln=[1,226],tn=[1,224],bE=[6,63,70,73,81,83,85],SE=[1,236],wE=[2,334],vE=[1,243],EE=[1,241],Rr=[6,193],Jf=[2,349],TE=[2,339],ya=[28,128],AE=[47,48,193,272],Zf=[47,48,193,242,272],rc=[47,48,193,242,246,272],nc=[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],xE=[1,271],IE=[1,270],Yt=[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],CE=[1,281],RE=[1,280],rn=[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],tu=[45,89],ed=[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],td=[13,16,31,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],rd=[31,89],nd=[48,87],no=[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],Qi=[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],OE=[1,313],ic=[6,85],Hg=[6,31,81,83,85],PE=[2,361],Rs=[2,353],io=[1,343],ru=[31,112,335],Os=[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],Qg=[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],FE=[6,109,193],so=[31,112],Xt=[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],Kg=[1,390],Yg=[1,391],_a=[13,16,87,197,308,314],DE=[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],id=[1,417],sd=[1,418],NE=[13,16,48,197,229,308],ba=[6,31,85],LE=[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],Xg=[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],ao=[29,31,85,112,159,160,161,163,164],ad=[1,443],od=[1,444],kE=[1,449],oo=[31,112,193,232,318,335],cd=[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],jE=[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],Jg=[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],nu=[13,16,31,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],iu=[31,45],ME=[1,507],$E=[1,508],VE=[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],ld=[29,31,85,112,159,160,161,163,164,335],co=[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],BE=[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],UE=[2,352],Zg=[13,16,197,308,314],qE=[1,565],sc=[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],WE=[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],Ps=[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=[13,16,87,308],Fs=[2,364],ac=[29,31,85,112,159,160,161,163,164,193,232,318,335],ud=[31,112,193,232,272,318,335],Ds=[2,359],zE=[13,16,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],fd=[29,31,85,112,159,160,161,163,164,193,232,272,318,335],HE=[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],QE=[2,347],ey={trace:o(function(){},"trace"),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:o(function(I,O,N,re,Le,g,sn){var _=g.length-1;switch(Le){case 1:if(g[_-1]=g[_-1]||{},Ve.base&&(g[_-1].base=Ve.base),Ve.base="",g[_-1].prefixes=Ve.prefixes,Ve.prefixes=null,Ve.pathOnly){if(g[_-1].type==="path"||"termType"in g[_-1])return g[_-1];throw new Error("Received full SPARQL query in path only mode")}else if(g[_-1].type==="path"||"termType"in g[_-1])throw new Error("Received only path in full SPARQL mode");if(g[_-1].type==="update"){let St={};for(let Dt of g[_-1].updates)if(Dt.updateType==="insert"){let lt={};for(let dt of Dt.insert)if(dt.type==="bgp"||dt.type==="graph")for(let wn of dt.triples)wn.subject.termType==="BlankNode"&&(lt[wn.subject.value]=!0),wn.predicate.termType==="BlankNode"&&(lt[wn.predicate.value]=!0),wn.object.termType==="BlankNode"&&(lt[wn.object.value]=!0);for(let dt of Object.keys(lt)){if(St[dt])throw new Error("Detected reuse blank node across different INSERT DATA clauses");St[dt]=!0}}}return g[_-1];case 2:this.$={...g[_-1],...g[_],type:"query"};break;case 4:Ve.base=su(g[_]);break;case 5:Ve.prefixes||(Ve.prefixes={}),g[_-1]=g[_-1].substr(0,g[_-1].length-1),g[_]=su(g[_]),Ve.prefixes[g[_-1]]=g[_];break;case 6:this.$={...g[_-3],...fo(g[_-2]),...g[_-1],...g[_]};break;case 7:if(!Ve.skipValidation&&(cy(g[_-3].variables.map(Dt=>oy(Dt.expression))).some(Dt=>Dt.aggregation==="count"&&!(Dt.expression instanceof dd))||g[_].group)){for(let Dt of g[_-3].variables)if(Dt.termType==="Variable"){if(!g[_].group||!g[_].group.map(lt=>uc(lt)).includes(uc(Dt)))throw Error("Projection of ungrouped variable (?"+uc(Dt)+")")}else if(oy(Dt.expression).length===0){let lt=GD(Dt.expression);for(let dt of lt)if(!g[_].group||!g[_].group.map||!g[_].group.map(wn=>uc(wn)).includes(uc(dt)))throw Error("Use of ungrouped variable in projection of operation (?"+uc(dt)+")")}}let Ji=g[_-1].where.filter(St=>St.type==="query");if(Ji.length>0){let St=g[_-3].variables.filter(lt=>lt.variable&&lt.variable.value).map(lt=>lt.variable.value),Dt=cy(Ji.map(lt=>lt.variables)).map(lt=>lt.value||lt.variable.value);for(let lt of St)if(Dt.indexOf(lt)>=0)throw Error("Target id of 'AS' (?"+lt+") already used in subquery")}this.$=Wt(g[_-3],fo(g[_-2]),g[_-1],g[_]);break;case 8:this.$=Wt({queryType:"CONSTRUCT",template:g[_-3]},fo(g[_-2]),g[_-1],g[_]);break;case 9:this.$=Wt({queryType:"CONSTRUCT",template:g[_-2]=g[_-2]?g[_-2].triples:[]},fo(g[_-5]),{where:[{type:"bgp",triples:uo([],g[_-2])}]},g[_]);break;case 10:this.$=Wt({queryType:"DESCRIBE",variables:g[_-3]==="*"?[new dd]:g[_-3]},fo(g[_-2]),g[_-1],g[_]);break;case 11:this.$=Wt({queryType:"ASK"},fo(g[_-2]),g[_-1],g[_]);break;case 12:this.$=Wt(g[_-1],{variables:[new dd]});break;case 13:let uu=g[_].map(St=>St.value||St.variable.value),fc=zD(uu);if(fc.length>0)throw Error("Two or more of the resulting columns have the same name (?"+fc[0]+")");this.$=Wt(g[_-1],{variables:g[_]});break;case 14:this.$=Wt({queryType:"SELECT"},g[_]&&(g[_-1]=nn(g[_]),g[_]={},g[_][g[_-1]]=!0,g[_]));break;case 16:case 27:this.$=oc(g[_-3],{variable:g[_-1]});break;case 17:case 18:this.$=Wt(g[_-3],g[_-2],g[_-1],g[_],{type:"query"});break;case 19:case 58:this.$={iri:g[_],named:!!g[_-1]};break;case 20:this.$={where:g[_].patterns};break;case 21:this.$=Wt(g[_-1],g[_]);break;case 22:this.$=Wt(g[_-2],g[_-1],g[_]);break;case 23:this.$={group:g[_]};break;case 24:case 25:case 28:case 31:case 33:case 34:this.$=oc(g[_]);break;case 26:this.$=oc(g[_-1]);break;case 29:this.$={having:g[_]};break;case 30:this.$={order:g[_]};break;case 32:this.$=oc(g[_],{descending:!0});break;case 35:this.$={limit:lc(g[_])};break;case 36:this.$={offset:lc(g[_])};break;case 37:this.$={limit:lc(g[_-2]),offset:lc(g[_])};break;case 38:this.$={limit:lc(g[_]),offset:lc(g[_-2])};break;case 39:case 43:this.$={type:"values",values:g[_]};break;case 40:case 84:this.$=g[_-1].map(St=>({[g[_-3]]:St}));break;case 41:case 85:this.$=g[_-1].map(()=>({}));break;case 42:case 86:var Xi=g[_-4].length;g[_-4]=g[_-4].map(ty),this.$=g[_-1].map(function(St){if(St.length!==Xi)throw Error("Inconsistent VALUES length");for(var Dt={},lt=0;lt<Xi;lt++)Dt["?"+g[_-4][lt].value]=St[lt];return Dt});break;case 44:case 65:case 100:case 126:case 175:this.$=g[_-1];break;case 45:this.$={type:"update",updates:Ns(g[_-2],g[_-1])};break;case 46:this.$=Wt({type:"load",silent:!!g[_-2],source:g[_-1]},g[_]&&{destination:g[_]});break;case 47:this.$={type:nn(g[_-2]),silent:!!g[_-1],graph:g[_]};break;case 48:this.$={type:nn(g[_-4]),silent:!!g[_-3],source:g[_-2],destination:g[_]};break;case 49:this.$={type:"create",silent:!!g[_-2],graph:{type:"graph",name:g[_]}};break;case 50:this.$={updateType:"insert",insert:s2(g[_])};break;case 51:this.$={updateType:"delete",delete:fy(s2(g[_]))};break;case 52:this.$={updateType:"deletewhere",delete:fy(g[_])};break;case 53:this.$={updateType:"insertdelete",...g[_-4],...g[_-3],...fo(g[_-2],"using"),where:g[_].patterns};break;case 54:case 57:case 62:case 167:case 191:case 236:this.$=g[_];break;case 55:this.$={delete:fy(g[_-1]),insert:g[_]||[]};break;case 56:this.$={delete:[],insert:g[_]};break;case 59:this.$={graph:g[_]};break;case 60:this.$={type:"graph",default:!0};break;case 61:case 63:this.$={type:"graph",name:g[_]};break;case 64:this.$={[nn(g[_])]:!0};break;case 66:this.$=g[_-1]?Ki(g[_],[g[_-1]]):Ki(g[_]);break;case 67:var cu=Wt(g[_-3]||{triples:[]},{type:"graph",name:g[_-5]});this.$=g[_]?[cu,g[_]]:[cu];break;case 68:case 73:this.$={type:"bgp",triples:Ki(g[_-2],[g[_-1]])};break;case 69:this.$={type:"group",patterns:[g[_-1]]};break;case 70:for(let St of g[_-1].filter(Dt=>Dt.type==="bind")){let Dt=g[_-1].indexOf(St),lt=new Set;for(let dt of g[_-1].slice(0,Dt))(dt.type==="group"||dt.type==="bgp")&&n2(dt).forEach(wn=>lt.add(wn));if(lt.has(St.variable.value))throw Error("Variable used to bind is already bound (?"+St.variable.value+")")}this.$={type:"group",patterns:g[_-1]};break;case 71:this.$=g[_-1]?Ki([g[_-1]],g[_]):Ki(g[_]);break;case 72:this.$=g[_]?[g[_-2],g[_]]:g[_-2];break;case 75:this.$=Wt(g[_],{type:"optional"});break;case 76:this.$=Wt(g[_],{type:"minus"});break;case 77:this.$=Wt(g[_],{type:"graph",name:g[_-1]});break;case 78:this.$=Wt(g[_],{type:"service",name:g[_-1],silent:!!g[_-2]});break;case 79:this.$={type:"filter",expression:g[_]};break;case 80:this.$={type:"bind",variable:g[_-1],expression:g[_-3]};break;case 89:this.$=ou(g[_]);break;case 90:this.$=void 0;break;case 91:this.$=g[_-1].length?{type:"union",patterns:Ki(g[_-1].map(ny),[ny(g[_])])}:g[_];break;case 95:this.$={...g[_],function:g[_-1]};break;case 96:this.$={type:"functionCall",args:[]};break;case 97:this.$={type:"functionCall",args:Ns(g[_-2],g[_-1]),distinct:!!g[_-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.$=Ns(g[_-2],g[_-1]);break;case 101:this.$=Ki(g[_-2],[g[_-1]]);break;case 102:case 112:this.$=uy(g[_].map(St=>Wt(Ls(g[_-1]),St)));break;case 103:this.$=uy(uo(g[_].map(St=>Wt(Ls(g[_-1].entity),St)),g[_-1].triples));break;case 105:this.$=Ki([g[_-1]],g[_]);break;case 106:this.$=Ki(g[_]);break;case 107:this.$=ay(g[_-1],g[_]);break;case 109:case 237:this.$=Ve.factory.namedNode(LD);break;case 110:case 118:this.$=Ns(g[_-1],g[_]);break;case 111:this.$=g[_]?{annotation:g[_],object:g[_-1]}:g[_-1];break;case 113:this.$=g[_]?uy(uo(g[_].map(St=>Wt(Ls(g[_-1].entity),St)),g[_-1].triples)):g[_-1].triples;break;case 114:this.$=ay(...g[_-1],g[_]);break;case 116:this.$=ay(...g[_]);break;case 117:case 159:case 163:this.$=[g[_-1],g[_]];break;case 119:this.$=g[_]?{object:g[_-1],annotation:g[_]}:g[_-1];break;case 120:this.$=g[_-1].length?cc("|",Ns(g[_-1],g[_])):g[_];break;case 121:this.$=g[_-1].length?cc("/",Ns(g[_-1],g[_])):g[_];break;case 122:this.$=g[_]?cc(g[_],[g[_-1]]):g[_-1];break;case 123:this.$=g[_-1]?cc(g[_-1],[g[_]]):g[_];break;case 125:case 131:this.$=cc(g[_-1],[g[_]]);break;case 129:this.$=cc("|",Ns(g[_-2],g[_-1]));break;case 132:case 134:this.$=qD(g[_-1]);break;case 133:case 135:this.$=WD(g[_-1]);break;case 140:this.$={entity:g[_],triples:[]};break;case 145:this.$=ty(g[_]);break;case 149:this.$=Ve.factory.namedNode(KE);break;case 151:case 153:case 158:case 162:this.$=ry(g[_-1],g[_]);break;case 152:this.$=["||",g[_]];break;case 154:this.$=["&&",g[_]];break;case 156:this.$=Or(g[_-1],[g[_-2],g[_]]);break;case 157:this.$=Or(g[_-2]?"notin":"in",[g[_-3],g[_]]);break;case 160:this.$=["+",ry(g[_-1],g[_])];break;case 161:var md=Yi(g[_-1].value.replace("-",""),g[_-1].datatype);this.$=["-",ry(md,g[_])];break;case 164:this.$=Or("UPLUS",[g[_]]);break;case 165:this.$=Or(g[_-1],[g[_]]);break;case 166:this.$=Or("UMINUS",[g[_]]);break;case 177:this.$=Or(nn(g[_-1]));break;case 178:this.$=Or(nn(g[_-3]),[g[_-1]]);break;case 179:this.$=ou(Or(nn(g[_-3]),[g[_-1]]));break;case 180:this.$=Or(nn(g[_-5]),[g[_-3],g[_-1]]);break;case 181:this.$=Or(nn(g[_-7]),[g[_-5],g[_-3],g[_-1]]);break;case 182:this.$=ou(Or(nn(g[_-7]),[g[_-5],g[_-3],g[_-1]]));break;case 183:this.$=Or(nn(g[_-1]),g[_]);break;case 184:this.$=Or("bound",[ty(g[_-1])]);break;case 185:this.$=Or(g[_-1],[]);break;case 186:this.$=Or(g[_-3],[g[_-1]]);break;case 187:this.$=Or(g[_-2]?"notexists":"exists",[ny(g[_])]);break;case 188:case 189:this.$=oc(g[_-1],{type:"aggregate",aggregation:nn(g[_-4]),distinct:!!g[_-2]});break;case 190:this.$=oc(g[_-2],{type:"aggregate",aggregation:nn(g[_-5]),distinct:!!g[_-3],separator:typeof g[_-1]=="string"?g[_-1]:" "});break;case 192:this.$=Yi(g[_]);break;case 193:this.$=$D(g[_-1],nn(g[_].substr(1)));break;case 194:this.$=Yi(g[_-2],g[_]);break;case 195:case 204:this.$=Yi(g[_],YE);break;case 196:case 205:this.$=Yi(g[_],XE);break;case 197:case 206:this.$=Yi(nn(g[_]),JE);break;case 200:this.$=Yi(g[_].toLowerCase(),MD);break;case 201:this.$=Yi(g[_].substr(1),YE);break;case 202:this.$=Yi(g[_].substr(1),XE);break;case 203:this.$=Yi(g[_].substr(1).toLowerCase(),JE);break;case 207:case 208:this.$=r2(g[_],1);break;case 209:case 210:this.$=r2(g[_],3);break;case 211:this.$=Ve.factory.namedNode(su(g[_]));break;case 213:var gd=g[_].indexOf(":"),lu=g[_].substr(0,gd),yd=Ve.prefixes[lu];if(!yd)throw new Error("Unknown prefix: "+lu);var jt=su(yd+g[_].substr(gd+1));this.$=Ve.factory.namedNode(jt);break;case 214:if(g[_]=g[_].substr(0,g[_].length-1),!(g[_]in Ve.prefixes))throw new Error("Unknown prefix: "+g[_]);var jt=su(Ve.prefixes[g[_]]);this.$=Ve.factory.namedNode(jt);break;case 215:this.$=au(g[_].replace(/^(_:)/,""));break;case 216:this.$=au();break;case 217:case 218:case 232:this.$=ou(iy(g[_-3],g[_-2],g[_-1]));break;case 230:case 231:this.$=ou(g[_-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:g[_-1].push(g[_]);break;case 259:case 269:case 291:case 293:case 295:case 301:case 305:case 371:case 424:case 426:this.$=[g[_]];break;case 308:g[_-3].push(g[_-2]);break;case 350:case 362:case 376:case 380:case 382:case 386:case 396:case 406:case 410:case 412:case 421:g[_-2].push(g[_-1]);break}},"anonymous"),table:[n(e,t,{3:1,4:2,10:3}),{1:[3]},n(r,[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:i,16:i,45:i,197:i,224:i,229:i,308:i,24:[1,13],32:[1,14],36:[1,15],41:s}),n([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:a},{6:[2,239]},n(c,[2,411],{216:28,217:29}),n(l,[2,249],{18:30}),n(l,[2,251],{22:31}),n(u,[2,255],{25:32,27:33,29:[1,34]}),{13:f,16:d,33:35,39:[1,37],44:39,55:40,87:h,139:38,307:43,308:p,323:36},n(l,[2,267],{37:46}),n(y,[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:S,87:h},n(v,[2,273],{42:68,324:69,325:[1,70],326:[1,71]}),n(e,[2,248]),n(e,[2,245]),n(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]},n([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]}),n(w,[2,418],{218:80,222:81,229:[1,82]}),{19:83,28:T,29:C,52:84,53:M,56:85},{19:88,28:T,29:C,52:89,53:M,56:85},n(l,[2,253],{26:90}),{28:[1,91],52:92,53:M},n($,[2,385],{181:93,182:94,183:95,31:[2,383]}),n(ee,[2,263],{34:96}),n(ee,[2,261],{44:39,55:40,307:43,139:97,13:f,16:d,87:h,308:p}),n(ee,[2,262]),n(B,[2,259]),n(z,[2,143]),n(z,[2,144]),n([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]),n(P,[2,211]),n(P,[2,212]),n(P,[2,213]),n(P,[2,214]),{19:98,28:T,29:C,52:99,53:M,56:85},{6:[2,309],99:100,193:[1,101]},n(D,[2,311],{101:102,328:[1,103]}),n(J,[2,317],{104:104,328:[1,105]}),n(qe,[2,322],{107:106,328:[1,107]}),{111:108,112:[2,324],328:[1,109]},{29:et,114:110},{29:et,114:112},{29:et,114:113},{118:114,123:[1,115],125:116,126:pe},n($e,[2,315]),n($e,[2,316]),n(Re,[2,319]),n(Re,[2,320]),n(Re,[2,321]),n(y,[2,327]),{13:f,16:d,55:118,307:43,308:p},n(l,[2,12]),n(l,[2,13],{44:66,43:119,45:S,87:h}),n(ne,[2,269]),n(ne,[2,15]),{13:f,16:d,44:136,45:Z,46:120,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(v,[2,14]),n(v,[2,274]),n(v,[2,271]),n(v,[2,272]),n(e,[2,4]),{13:[1,177]},n(X,[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},n(c,[2,410]),n([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:f,16:d,45:[1,193],55:194,197:bt,219:189,220:190,223:191,224:[1,192],307:43,308:p},n(w,[2,419]),n(xt,ke,{20:196,59:197,69:198,70:W}),n(l,[2,250]),{29:G,57:200},n(D,[2,279],{54:202,327:[1,203]}),{29:[2,282]},n(Q,K,{23:204,58:205,62:206,63:Oe}),n(l,[2,252]),{19:208,28:T,29:C,52:209,53:M,56:85},{29:[1,210]},n(u,[2,256]),{31:[1,211]},{31:[2,384]},{13:f,16:d,44:215,45:ot,55:220,82:U,87:h,89:ct,145:212,172:221,185:213,187:214,231:Cr,236:216,237:222,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(bE,[2,265],{56:85,35:227,52:228,19:229,28:T,29:C,53:M}),n(B,[2,260]),n(Q,K,{58:205,62:206,23:230,63:Oe}),n(l,[2,268]),{6:[2,45]},n(e,t,{10:3,4:231}),{13:f,16:d,55:232,307:43,308:p},n(D,[2,312]),{105:233,112:SE,122:234,132:[1,237],134:235,327:[1,238],334:[1,239]},n(J,[2,318]),n(D,wE,{108:240,133:242,112:vE,132:EE}),n(qe,[2,323]),{112:[1,244]},{112:[2,325]},n(Rr,[2,50]),n($,Jf,{135:245,136:246,143:247,144:248,31:TE,112:TE}),n(Rr,[2,51]),n(Rr,[2,52]),n(ya,[2,328],{119:249}),{29:et,114:250},n(ya,[2,56]),{29:et,114:251},n(y,[2,59]),n(ne,[2,270]),{47:[1,252]},n(AE,[2,150]),n(Zf,[2,428],{240:253}),n(rc,[2,430],{244:254}),n(rc,[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]}),n(nc,[2,440],{252:264}),n(gr,[2,448],{260:265}),{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,255:154,257:155,264:266,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,255:154,257:155,264:267,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,255:154,257:155,264:268,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(gr,[2,167]),n(gr,[2,168]),n(gr,[2,169]),n(gr,[2,170],{176:269,45:xE,89:IE}),n(gr,[2,171]),n(gr,[2,172]),n(gr,[2,173]),n(gr,[2,174]),{13:f,16:d,44:136,45:Z,46:272,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Yt,[2,176]),{89:[1,273]},{45:[1,274]},{45:[1,275]},{45:[1,276]},{45:[1,277]},{45:[1,278]},{45:CE,89:RE,179:279},{45:[1,282]},{45:[1,284],89:[1,283]},{279:[1,285]},n(rn,[2,192],{292:[1,286],293:[1,287]}),n(rn,[2,195]),n(rn,[2,196]),n(rn,[2,197]),n(rn,[2,198]),n(rn,[2,199]),n(rn,[2,200]),{13:f,16:d,44:39,55:40,82:U,87:h,139:289,172:291,255:154,257:155,266:290,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,320:288},{45:[1,292]},{45:[1,293]},{45:[1,294]},n(tu,[2,452]),n(tu,[2,453]),n(tu,[2,454]),n(tu,[2,455]),n(tu,[2,456]),{279:[2,458]},n(ed,[2,207]),n(ed,[2,208]),n(ed,[2,209]),n(ed,[2,210]),n(rn,[2,201]),n(rn,[2,202]),n(rn,[2,203]),n(rn,[2,204]),n(rn,[2,205]),n(rn,[2,206]),n(e,[2,5]),n(td,[2,297],{88:295}),n(rd,[2,299],{90:296}),{48:[1,297],87:[1,298]},n(nd,[2,301]),n(X,[2,43]),n(X,[2,82]),n(X,[2,83]),{29:[1,299]},{29:[1,300]},{87:[1,302],169:301},n(c,[2,412]),n(no,[2,123]),n(no,[2,416],{221:303,339:304,39:[1,306],263:[1,307],340:[1,305]}),n(Qi,[2,124]),{13:f,16:d,45:[1,311],55:194,89:[1,310],197:bt,223:312,225:308,226:309,229:OE,307:43,308:p},n(c,i,{215:10,214:314}),n(Qi,[2,236]),n(Qi,[2,237]),n(ic,[2,6]),n(Hg,[2,287],{60:315,72:316,73:[1,317]}),n(xt,[2,286]),{13:f,16:d,45:Z,55:323,67:321,68:322,71:318,77:320,79:319,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,307:43,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F},n([6,31,63,70,73,81,83,85],[2,20]),n($,PE,{38:17,49:324,147:325,17:326,21:327,148:328,154:329,155:330,29:Rs,31:Rs,85:Rs,112:Rs,159:Rs,160:Rs,161:Rs,163:Rs,164:Rs,41:s}),{13:f,16:d,55:331,307:43,308:p},n(D,[2,280]),n(ic,[2,7]),n(xt,ke,{59:197,69:198,20:332,70:W}),n(Q,[2,284]),{64:[1,333]},n(Q,K,{58:205,62:206,23:334,63:Oe}),n(l,[2,254]),n($,Jf,{144:248,30:335,143:336,31:[2,257]}),n(l,[2,100]),{31:[2,387],184:337,335:[1,338]},{13:f,16:d,44:39,55:40,87:h,139:342,186:339,190:340,195:341,197:io,307:43,308:p},n(ru,[2,389],{44:39,55:40,307:43,190:340,195:341,139:342,188:344,189:345,186:346,13:f,16:d,87:h,197:io,308:p}),n(Os,[2,227]),n(Os,[2,228]),n(Os,[2,229]),{13:f,16:d,44:215,45:ot,55:220,82:U,87:h,89:ct,172:221,185:351,187:350,200:348,230:347,231:Cr,234:349,236:216,237:222,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},{13:f,16:d,44:39,55:40,87:h,139:342,186:352,190:340,195:341,197:io,307:43,308:p},n(Os,[2,146]),n(Os,[2,147]),n(Os,[2,148]),n(Os,[2,149]),{13:f,16:d,44:354,55:355,82:U,87:h,172:357,237:356,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,309:Sn,310:Ln,311:358,312:tn,313:353},n(Qg,[2,215]),n(Qg,[2,216]),n(Q,K,{58:205,62:206,23:359,63:Oe}),n(ee,[2,264]),n(bE,[2,266]),n(ic,[2,11]),n(r,[2,308],{6:[2,310]}),n(Rr,[2,313],{102:360,120:361,121:[1,362]}),n(Rr,[2,47]),n(Rr,[2,63]),n(Rr,[2,64]),{13:f,16:d,55:363,307:43,308:p},n(Rr,[2,336]),n(Rr,[2,337]),n(Rr,[2,338]),{109:[1,364]},n(FE,[2,60]),{13:f,16:d,55:365,307:43,308:p},n(D,[2,335]),{13:f,16:d,55:366,307:43,308:p},{31:[1,367]},n(so,[2,341],{137:368}),n(so,[2,340]),{13:f,16:d,44:215,45:ot,55:220,82:U,87:h,89:ct,145:369,172:221,185:213,187:214,231:Cr,236:216,237:222,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},{28:[1,370],127:371,128:[1,372]},n(ya,[2,330],{124:373,125:374,126:pe}),n(ya,[2,57]),{44:375,87:h},n(AE,[2,151],{241:376,242:[1,377]}),n(Zf,[2,153],{245:378,246:[1,379]}),{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,247:380,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{250:[1,381]},n(Xt,[2,432]),n(Xt,[2,433]),n(Xt,[2,434]),n(Xt,[2,435]),n(Xt,[2,436]),n(Xt,[2,437]),{250:[2,439]},n([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:ue,298:fe,299:de,300:oe,301:ye,302:_e}),n(nc,[2,162],{261:388,262:389,39:Kg,338:Yg}),n(gr,[2,164]),n(gr,[2,165]),n(gr,[2,166]),n(Yt,[2,95]),n(Yt,[2,96]),n(Xt,[2,377],{177:392,325:[1,393]}),{48:[1,394]},n(Yt,[2,177]),{13:f,16:d,44:136,45:Z,46:395,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:396,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:397,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:398,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:399,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Yt,[2,183]),n(Yt,[2,98]),n(Xt,[2,381],{180:400}),{87:[1,401]},n(Yt,[2,185]),{13:f,16:d,44:136,45:Z,46:402,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{29:G,57:403},n(rn,[2,193]),{13:f,16:d,55:404,307:43,308:p},{13:f,16:d,44:39,55:40,87:h,139:342,195:405,197:io,307:43,308:p},n(_a,[2,233]),n(_a,[2,234]),n(_a,[2,235]),n(DE,[2,459],{281:406,325:[1,407]}),n(Xt,[2,463],{284:408,325:[1,409]}),n(Xt,[2,465],{286:410,325:[1,411]}),{13:f,16:d,31:[1,412],55:414,82:U,171:413,172:415,173:416,174:id,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:sd},{31:[1,419],89:[1,420]},{29:[1,421]},n(nd,[2,302]),n(td,[2,367],{167:422}),n(rd,[2,369],{168:423}),{48:[1,424],87:[1,425]},n(nd,[2,371]),n(no,[2,122]),n(no,[2,417]),n(no,[2,413]),n(no,[2,414]),n(no,[2,415]),n(Qi,[2,125]),n(Qi,[2,127]),n(Qi,[2,128]),n(NE,[2,420],{227:426}),n(Qi,[2,130]),{13:f,16:d,55:194,197:bt,223:427,307:43,308:p},{48:[1,428]},n(ba,[2,289],{61:429,80:430,81:[1,431],83:[1,432]}),n(Hg,[2,288]),{64:[1,433]},n(xt,[2,29],{307:43,267:139,275:146,278:149,77:320,67:321,68:322,55:323,79:434,13:f,16:d,45:Z,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,276:Xe,277:xe,279:ze,280:Ne,283:He,285:Je,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F}),n(LE,[2,293]),n(Xg,[2,92]),n(Xg,[2,93]),n(Xg,[2,94]),{45:xE,89:IE,176:269},{31:[1,435]},{31:[1,436]},{19:437,28:T,29:C,56:85},{19:438,28:T,29:C,56:85},n(ao,[2,355],{149:439}),n(ao,[2,354]),{13:f,16:d,44:215,45:ad,55:220,82:U,87:h,89:ct,156:440,172:221,185:441,203:442,231:od,236:216,237:222,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(ee,[2,19]),n(ba,[2,21]),{13:f,16:d,44:450,45:kE,55:323,65:445,66:446,67:447,68:448,87:h,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,307:43,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F},n(ic,[2,8]),{31:[1,451]},{31:[2,258]},{31:[2,101]},n($,[2,386],{31:[2,388]}),n(ru,[2,102]),n(oo,[2,391],{191:452}),n($,[2,395],{196:453,198:454}),n($,[2,108]),n($,[2,109]),n(ru,[2,103]),n(ru,[2,104]),n(ru,[2,390]),{13:f,16:d,44:215,45:ot,48:[1,455],55:220,82:U,87:h,89:ct,172:221,185:351,187:350,200:456,231:Cr,234:349,236:216,237:222,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(cd,[2,424]),n(jE,[2,136]),n(jE,[2,137]),n(Jg,[2,140]),{232:[1,457]},{13:f,16:d,44:39,55:40,87:h,139:342,195:458,197:io,307:43,308:p},n(_a,[2,219]),n(_a,[2,220]),n(_a,[2,221]),n(_a,[2,222]),n(_a,[2,223]),n(ic,[2,10]),n(Rr,[2,46]),n(Rr,[2,314]),{112:SE,122:459},n(Rr,[2,62]),n(D,wE,{133:242,108:460,112:vE,132:EE}),n(FE,[2,61]),n(Rr,[2,49]),n([6,28,126,128,193],[2,65]),{31:[2,66],112:[1,462],138:461},n(so,[2,351],{146:463,335:[1,464]}),{29:G,57:465},n(ya,[2,329]),n(D,[2,332],{129:466,327:[1,467]}),n(ya,[2,55]),n(ya,[2,331]),{48:[1,468]},n(Zf,[2,429]),{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,239:469,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(rc,[2,431]),{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,243:470,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(rc,[2,156]),{45:CE,89:RE,179:471},n(nc,[2,441]),{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,251:472,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(gr,[2,444],{256:473}),n(gr,[2,446],{258:474}),n(Xt,[2,442]),n(Xt,[2,443]),n(gr,[2,449]),{13:f,16:d,44:136,45:Z,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,255:154,257:155,259:475,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Xt,[2,450]),n(Xt,[2,451]),n(Xt,[2,379],{178:476}),n(Xt,[2,378]),n([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:f,16:d,44:136,45:Z,46:482,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{48:[1,483]},{48:[1,484]},n(Yt,[2,187]),n(rn,[2,194]),{13:f,16:d,44:39,55:40,82:U,87:h,139:289,172:291,255:154,257:155,266:290,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,320:485},{13:f,16:d,39:[1,487],44:136,45:Z,46:488,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,282:486,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(DE,[2,460]),{13:f,16:d,44:136,45:Z,46:489,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Xt,[2,464]),{13:f,16:d,44:136,45:Z,46:490,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Xt,[2,466]),n(X,[2,40]),n(td,[2,298]),n(nu,[2,87]),n(nu,[2,88]),n(nu,[2,89]),n(nu,[2,90]),{13:f,16:d,55:492,82:U,172:493,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,311:494,312:tn,315:491},n(X,[2,41]),n(rd,[2,300]),n(iu,[2,303],{92:495}),{13:f,16:d,31:[1,496],55:414,82:U,171:497,172:415,173:416,174:id,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:sd},{31:[1,498],89:[1,499]},{29:[1,500]},n(nd,[2,372]),{13:f,16:d,48:[2,422],55:194,197:bt,223:312,226:502,228:501,229:OE,307:43,308:p},n(Qi,[2,131]),n(Qi,[2,126]),n(ba,[2,22]),n(ba,[2,290]),{82:[1,503]},{82:[1,504]},{13:f,16:d,44:510,45:Z,55:323,67:321,68:322,74:505,75:506,76:ME,77:320,78:$E,79:509,87:h,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,307:43,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F},n(LE,[2,294]),n(VE,[2,69]),n(VE,[2,70]),n(xt,ke,{59:197,69:198,20:511,70:W}),n(Q,K,{58:205,62:206,23:512,63:Oe}),{29:[2,375],31:[2,71],84:522,85:a,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},n(ao,[2,363],{157:524,335:[1,525]}),n(c,i,{215:10,202:526,205:527,208:528,214:529,44:530,87:h}),n(ld,[2,399],{215:10,205:527,208:528,214:529,44:530,204:531,202:532,13:i,16:i,45:i,197:i,224:i,229:i,308:i,87:h}),{13:f,16:d,44:215,45:ad,55:220,82:U,87:h,89:ct,172:221,185:351,203:536,212:534,231:od,233:533,234:535,236:216,237:222,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(c,i,{215:10,205:527,208:528,214:529,44:530,202:537,87:h}),n(Q,[2,23],{307:43,267:139,275:146,278:149,55:323,67:447,68:448,44:450,66:538,13:f,16:d,45:kE,87:h,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,276:Xe,277:xe,279:ze,280:Ne,283:He,285:Je,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F}),n(co,[2,291]),n(co,[2,24]),n(co,[2,25]),{13:f,16:d,44:136,45:Z,46:539,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(co,[2,28]),n(Q,K,{58:205,62:206,23:540,63:Oe}),n([31,112,232,318,335],[2,105],{192:541,193:[1,542]}),n(oo,[2,107]),{13:f,16:d,44:215,45:ot,55:220,82:U,87:h,89:ct,172:221,185:351,187:350,199:543,200:544,231:Cr,234:349,236:216,237:222,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(BE,[2,132]),n(cd,[2,425]),n(BE,[2,133]),{13:f,16:d,44:354,55:355,82:U,87:h,172:357,237:356,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,309:Sn,310:Ln,311:358,312:tn,313:545},n(Rr,[2,54]),n(Rr,[2,48]),n(so,[2,342]),{13:f,16:d,44:39,55:40,87:h,139:546,307:43,308:p},n(so,[2,68]),n($,[2,350],{31:UE,112:UE}),n(Rr,[2,53]),{13:f,16:d,55:547,307:43,308:p},n(D,[2,333]),n(ne,[2,16]),n(Zf,[2,152]),n(rc,[2,154]),n(rc,[2,157]),n(nc,[2,159]),n(nc,[2,160],{262:389,261:548,39:Kg,338:Yg}),n(nc,[2,161],{262:389,261:549,39:Kg,338:Yg}),n(gr,[2,163]),{13:f,16:d,44:136,45:Z,46:550,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Yt,[2,178]),n(Yt,[2,179]),{13:f,16:d,44:136,45:Z,46:551,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:552,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:553,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{48:[1,554],272:[1,555]},n(Yt,[2,184]),n(Yt,[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:f,16:d,55:194,197:bt,223:562,307:43,308:p},n(Zg,[2,224]),n(Zg,[2,225]),n(Zg,[2,226]),{31:[1,563],45:qE,94:564},n(X,[2,84]),n(td,[2,368]),n(X,[2,85]),n(rd,[2,370]),n(iu,[2,373],{170:566}),{48:[1,567]},{48:[2,423],337:[1,568]},n(ba,[2,35],{83:[1,569]}),n(ba,[2,36],{81:[1,570]}),n(Hg,[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:f,16:d,45:Z,76:ME,78:$E,87:h,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,276:Xe,277:xe,279:ze,280:Ne,283:He,285:Je,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F}),n(sc,[2,295]),{45:Z,77:572},{45:Z,77:573},n(sc,[2,33]),n(sc,[2,34]),{31:[2,275],50:574,84:575,85:a},{31:[2,277],51:576,84:577,85:a},n(ao,[2,356]),n(WE,[2,357],{152:578,335:[1,579]}),n(Ps,[2,74]),{29:G,57:580},{29:G,57:581},{13:f,16:d,44:39,55:40,87:h,139:582,307:43,308:p},n(GE,[2,365],{162:583,328:[1,584]}),{13:f,16:d,45:Z,55:323,67:321,68:322,77:320,79:585,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,307:43,308:p,346:Ze,347:We,348:E,349:A,350:x,351:F},{45:[1,586]},n(Ps,[2,81]),{29:G,57:587},n(ao,[2,73]),n($,[2,362],{29:Fs,31:Fs,85:Fs,112:Fs,159:Fs,160:Fs,161:Fs,163:Fs,164:Fs}),n(ld,[2,112]),n(ac,[2,401],{206:588}),n($,[2,405],{209:589,210:590}),n($,[2,403]),n($,[2,404]),n(ld,[2,113]),n(ld,[2,400]),{13:f,16:d,44:215,45:ad,48:[1,591],55:220,82:U,87:h,89:ct,172:221,185:351,203:536,212:592,231:od,234:535,236:216,237:222,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(cd,[2,426]),n(Jg,[2,138]),n(Jg,[2,139]),{232:[1,593]},n(co,[2,292]),{47:[1,595],48:[1,594]},n(ic,[2,9]),n(oo,[2,392]),n(oo,[2,393],{44:39,55:40,307:43,195:341,139:342,194:596,190:597,13:f,16:d,87:h,197:io,308:p}),n(oo,[2,110],{272:[1,598]}),n(ud,[2,397],{201:599,316:600,317:[1,601]}),{314:[1,602]},{29:[1,603]},n(ya,[2,58]),n(gr,[2,445]),n(gr,[2,447]),{48:[1,604],272:[1,605]},{48:[1,606]},{272:[1,607]},{272:[1,608]},n(Yt,[2,99]),n(Xt,[2,382]),n([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]),n(Yt,[2,188]),n(Yt,[2,189]),{48:[1,609]},{48:[2,468]},{289:[1,610]},{13:f,16:d,55:492,82:U,172:493,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,311:494,312:tn,315:611},n(X,[2,42]),n(iu,[2,304]),{13:f,16:d,55:414,82:U,95:612,171:613,172:415,173:416,174:id,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:sd},{31:[1,614],45:qE,94:615},n(Qi,[2,129]),n(NE,[2,421]),{82:[1,616]},{82:[1,617]},n(sc,[2,296]),n(sc,[2,31]),n(sc,[2,32]),{31:[2,17]},{31:[2,276]},{31:[2,18]},{31:[2,278]},n($,PE,{155:330,153:618,154:619,29:Ds,31:Ds,85:Ds,112:Ds,159:Ds,160:Ds,161:Ds,163:Ds,164:Ds}),n(WE,[2,358]),n(Ps,[2,75]),n(Ps,[2,76]),{29:G,57:620},{13:f,16:d,44:39,55:40,87:h,139:621,307:43,308:p},n(GE,[2,366]),n(Ps,[2,79]),{13:f,16:d,44:136,45:Z,46:622,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Ps,[2,91],{336:[1,623]}),n([29,31,85,112,159,160,161,163,164,232,318,335],[2,114],{207:624,193:[1,625]}),n(ac,[2,117]),{13:f,16:d,44:215,45:ad,55:220,82:U,87:h,89:ct,172:221,185:351,203:536,211:626,212:627,231:od,234:535,236:216,237:222,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,309:Sn,310:Ln,311:217,312:tn},n(Os,[2,134]),n(cd,[2,427]),n(Os,[2,135]),n(co,[2,26]),{44:628,87:h},n(oo,[2,106]),n(oo,[2,394]),n($,[2,396]),n(ud,[2,111]),n(ud,[2,398]),{13:f,16:d,44:39,55:40,87:h,139:342,186:629,190:340,195:341,197:io,307:43,308:p},n(Qg,[2,217]),n($,Jf,{144:248,140:630,143:631,31:[2,343]}),n(Yt,[2,97]),n(Xt,[2,380]),n(Yt,[2,180]),{13:f,16:d,44:136,45:Z,46:632,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},{13:f,16:d,44:136,45:Z,46:633,55:133,67:132,68:134,77:131,82:U,87:h,172:135,224:it,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:mt,264:130,265:H,266:137,267:139,268:De,269:Qe,270:te,271:Ke,273:Ye,274:Ge,275:146,276:Xe,277:xe,278:149,279:ze,280:Ne,283:He,285:Je,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:st,346:Ze,347:We,348:E,349:A,350:x,351:F},n(Yt,[2,190]),{290:[1,634]},{314:[1,635]},{13:f,16:d,48:[1,636],55:414,82:U,171:637,172:415,173:416,174:id,255:154,257:155,291:150,294:le,295:me,296:ge,297:ue,298:fe,299:de,300:oe,301:ye,302:_e,303:be,304:Se,305:se,306:we,307:43,308:p,312:sd},n(zE,[2,305]),n(X,[2,86]),n(iu,[2,374]),n(ba,[2,37]),n(ba,[2,38]),n(ao,[2,72]),n(ao,[2,360]),n(Ps,[2,77]),{29:G,57:638},{47:[1,639]},{29:[2,376]},n(ac,[2,402]),n(ac,[2,115],{215:10,208:528,214:529,44:530,205:640,13:i,16:i,45:i,197:i,224:i,229:i,308:i,87:h}),n(ac,[2,118],{272:[1,641]}),n(fd,[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:be,304:Se,305:se,306:we},n(nu,[2,218]),n(iu,[2,44]),n(zE,[2,306]),n(Ps,[2,78]),{44:651,87:h},n(ac,[2,116]),n($,[2,406]),n(fd,[2,119]),n(fd,[2,408]),n(c,i,{215:10,205:527,208:528,214:529,44:530,202:652,87:h}),n(co,[2,27]),n(ud,[2,230]),n(HE,[2,345],{141:653,335:[1,654]}),n(Yt,[2,181]),n(Yt,[2,182]),{48:[2,191]},{48:[1,655]},{318:[1,656]},n($,Jf,{144:248,142:657,143:658,31:QE,112:QE}),n(HE,[2,346]),n(Ps,[2,80]),n(fd,[2,231]),n(so,[2,67]),n(so,[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:o(function(I,O){if(O.recoverable)this.trace(I);else{var N=new Error(I);throw N.hash=O,N}},"parseError"),parse:o(function(I){var O=this,N=[0],re=[],Le=[null],g=[],sn=this.table,_="",Xi=0,cu=0,md=0,gd=2,lu=1,yd=g.slice.call(arguments,1),jt=Object.create(this.lexer),Ji={yy:{}};for(var uu in this.yy)Object.prototype.hasOwnProperty.call(this.yy,uu)&&(Ji.yy[uu]=this.yy[uu]);jt.setInput(I,Ji.yy),Ji.yy.lexer=jt,Ji.yy.parser=this,typeof jt.yylloc>"u"&&(jt.yylloc={});var fc=jt.yylloc;g.push(fc);var St=jt.options&&jt.options.ranges;typeof Ji.yy.parseError=="function"?this.parseError=Ji.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Dt(Zi){N.length=N.length-2*Zi,Le.length=Le.length-Zi,g.length=g.length-Zi}o(Dt,"popStack");for(var lt=o(function(){var Zi;return Zi=jt.lex()||lu,typeof Zi!="number"&&(Zi=O.symbols_[Zi]||Zi),Zi},"lex"),dt,wn,ho,zn,gX,dy,dc={},_d,ks,a2,bd;;){if(ho=N[N.length-1],this.defaultActions[ho]?zn=this.defaultActions[ho]:((dt===null||typeof dt>"u")&&(dt=lt()),zn=sn[ho]&&sn[ho][dt]),typeof zn>"u"||!zn.length||!zn[0]){var hy="";bd=[];for(_d in sn[ho])this.terminals_[_d]&&_d>gd&&bd.push("'"+this.terminals_[_d]+"'");jt.showPosition?hy="Parse error on line "+(Xi+1)+`:
34
34
  `+jt.showPosition()+`
35
35
  Expecting `+bd.join(", ")+", got '"+(this.terminals_[dt]||dt)+"'":hy="Parse error on line "+(Xi+1)+": Unexpected "+(dt==lu?"end of input":"'"+(this.terminals_[dt]||dt)+"'"),this.parseError(hy,{text:jt.match,token:this.terminals_[dt]||dt,line:jt.yylineno,loc:fc,expected:bd})}if(zn[0]instanceof Array&&zn.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ho+", token: "+dt);switch(zn[0]){case 1:N.push(dt),Le.push(jt.yytext),g.push(jt.yylloc),N.push(zn[1]),dt=null,wn?(dt=wn,wn=null):(cu=jt.yyleng,_=jt.yytext,Xi=jt.yylineno,fc=jt.yylloc,md>0&&md--);break;case 2:if(ks=this.productions_[zn[1]][1],dc.$=Le[Le.length-ks],dc._$={first_line:g[g.length-(ks||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(ks||1)].first_column,last_column:g[g.length-1].last_column},St&&(dc._$.range=[g[g.length-(ks||1)].range[0],g[g.length-1].range[1]]),dy=this.performAction.apply(dc,[_,cu,Xi,Ji.yy,zn[1],Le,g].concat(yd)),typeof dy<"u")return dy;ks&&(N=N.slice(0,-1*ks*2),Le=Le.slice(0,-1*ks),g=g.slice(0,-1*ks)),N.push(this.productions_[zn[1]][0]),Le.push(dc.$),g.push(dc._$),a2=sn[N[N.length-2]][N[N.length-1]],N.push(a2);break;case 3:return!0}}return!0},"parse")},dd=s_().Wildcard,hd="http://www.w3.org/1999/02/22-rdf-syntax-ns#",LD=hd+"type",kD=hd+"first",jD=hd+"rest",KE=hd+"nil",pd="http://www.w3.org/2001/XMLSchema#",YE=pd+"integer",XE=pd+"decimal",JE=pd+"double",MD=pd+"boolean",lo="",ZE="",e2="";function nn(R){return R.toLowerCase()}o(nn,"lowercase");function Ns(R,I){return R.push(I),R}o(Ns,"appendTo");function uo(R,I){return R.push.apply(R,I),R}o(uo,"appendAllTo");function Wt(R){R||(R={});for(var I=1,O=arguments.length,N;I<O&&(N=arguments[I]||{});I++)for(var re in N)R[re]=N[re];return R}o(Wt,"extend");function Ki(){for(var R=[],I=0,O=arguments.length;I<O;I++)R=R.concat.apply(R,arguments[I]);return R}o(Ki,"unionAll");function su(R){if(R[0]==="<"&&(R=R.substring(1,R.length-1)),/^[a-z][a-z0-9.+-]*:/i.test(R))return R;if(!Ve.base)throw new Error("Cannot resolve relative IRI "+R+" because no base IRI was set.");switch(lo!==Ve.base&&(lo=Ve.base,ZE=lo.replace(/[^\/:]*$/,""),e2=lo.match(/^(?:[a-z]+:\/*)?[^\/]*/)[0]),R[0]){case void 0:return lo;case"#":return lo+R;case"?":return lo.replace(/(?:\?.*)?$/,R);case"/":return e2+R;default:return ZE+R}}o(su,"resolveIRI");function ty(R){if(R){var I=R[0];if(I==="?"||I==="$")return Ve.factory.variable(R.substr(1))}return R}o(ty,"toVar");function Or(R,I){return{type:"operation",operator:R,args:I||[]}}o(Or,"operation");function oc(R,I){var O={expression:R==="*"?new dd:R};if(I)for(var N in I)O[N]=I[N];return O}o(oc,"expression");function cc(R,I){return{type:"path",pathType:R,items:I}}o(cc,"path");function ry(R,I){for(var O=0,N=I.length,re;O<N&&(re=I[O]);O++)R=Or(re[0],[R,re[1]]);return R}o(ry,"createOperationTree");function fo(R,I){var O=[],N=[],re=R.length,Le,g={};if(!re)return null;for(var sn=0;sn<re&&(Le=R[sn]);sn++)(Le.named?N:O).push(Le.iri);return g[I||"from"]={default:O,named:N},g}o(fo,"groupDatasets");function lc(R){return parseInt(R,10)}o(lc,"toInt");function ny(R){return R.type==="group"&&R.patterns.length===1?R.patterns[0]:R}o(ny,"degroupSingle");function Yi(R,I){return I&&I.termType!=="NamedNode"&&(I=Ve.factory.namedNode(I)),Ve.factory.literal(R,I)}o(Yi,"createTypedLiteral");function $D(R,I){return Ve.factory.literal(R,I)}o($D,"createLangLiteral");function iy(R,I,O){if(!("termType"in I))throw new Error("Nested triples cannot contain paths");return Ve.factory.quad(R,I,O)}o(iy,"nestedTriple");function Ls(R,I,O,N){var re={};return R!=null&&(re.subject=R),I!=null&&(re.predicate=I),O!=null&&(re.object=O),N!=null&&(re.annotations=N),re}o(Ls,"triple");function au(R){return typeof R=="string"?R.startsWith("e_")?Ve.factory.blankNode(R):Ve.factory.blankNode("e_"+R):Ve.factory.blankNode("g_"+t2++)}o(au,"blank");var t2=0;Ve._resetBlanks=function(){t2=0};var VD=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\(.)/g,BD={"\\":"\\","'":"'",'"':'"',t:" ",b:"\b",n:`
36
36
  `,r:"\r",f:"\f"},UD=/[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/,sy=String.fromCharCode;function r2(R,I){R=R.substring(I,R.length-I);try{R=R.replace(VD,function(O,N,re,Le){var g;if(N){if(g=parseInt(N,16),isNaN(g))throw new Error;return sy(g)}else if(re){if(g=parseInt(re,16),isNaN(g))throw new Error;return g<65535?sy(g):sy(55296+((g-=65536)>>10),56320+(g&1023))}else{var sn=BD[Le];if(!sn)throw new Error;return sn}})}catch{return""}if(UD.exec(R))throw new Error("Invalid unicode codepoint of surrogate pair without corresponding codepoint in "+R);return R}o(r2,"unescapeString");function qD(R){var I=au(),O=I,N=[],re,Le=[];R.forEach(function(Xi){N.push(Xi.entity),uo(Le,Xi.triples)});for(var g=0,sn=0,_=N.length,re=Array(_*2);g<_;)re[sn++]=Ls(O,Ve.factory.namedNode(kD),N[g]),re[sn++]=Ls(O,Ve.factory.namedNode(jD),O=++g<_?au():Ve.factory.namedNode(KE));return{entity:I,triples:uo(re,Le)}}o(qD,"createList");function WD(R){var I=au();return{entity:I,triples:R.map(function(O){return Wt(Ls(I),O)})}}o(WD,"createAnonymousObject");function ay(R,I,O){var N=[],re=[];return I.forEach(function(Le){let g=null;Le.annotation&&(g=Le.annotation,Le=Le.object),N.push(Ls(null,R,Le.entity,g)),uo(re,Le.triples)}),Ki(N,O||[],re)}o(ay,"objectListToTriples");function pX(R){for(var I=[],O,N=0,re;re=R[N];N++)switch(re.type){case"bgp":re.triples.length&&(O?uo(O.triples,re.triples):Ns(I,O=re));break;default:(!re.patterns||re.patterns.length>0)&&(Ns(I,re),O=null)}return I}o(pX,"mergeAdjacentBGPs");function uc(R){return R.variable?R.variable.value:R.value||R.expression.value}o(uc,"getExpressionId");function oy(R){if(!R)return[];if(R.type==="aggregate")return[R];if(R.type==="operation"){let I=[];for(let O of R.args)I.push(...oy(O));return I}return[]}o(oy,"getAggregatesOfExpression");function GD(R){let I=new Set,O=o(function(N){N&&(N.termType==="Variable"?I.add(N):N.type==="operation"&&N.args.forEach(O))},"visitExpression");return O(R),I}o(GD,"getVariablesFromExpression");function cy(R,I=1,O=[]){for(let N of R)I>0&&N instanceof Array?cy(N,I-1,O):O.push(N);return O}o(cy,"flatten");function ly(R){return R.termType==="Variable"}o(ly,"isVariable");function n2(R){if(R.triples){let I=[];for(let O of R.triples)ly(O.subject)&&I.push(O.subject.value),ly(O.predicate)&&I.push(O.predicate.value),ly(O.object)&&I.push(O.object.value);return I}else if(R.patterns){let I=[];for(let O of R.patterns)I.push(...n2(O));return I}return[]}o(n2,"getBoundVarsFromGroupGraphPattern");function zD(R){let I=R.slice().sort(),O=[];for(let N=0;N<I.length-1;N++)I[N+1]==I[N]&&O.push(I[N]);return O}o(zD,"getDuplicatesInArray");function ou(R){if(!Ve.sparqlStar)throw new Error("SPARQL-star support is not enabled");return R}o(ou,"ensureSparqlStar");function i2(R,I,O){for(let N of I){let re=Ls("subject"in N?N.subject:R,N.predicate,N.object);O.push(re),N.annotations&&i2(iy(R,N.predicate,N.object),N.annotations,O)}}o(i2,"_applyAnnotations");function uy(R){if(Ve.sparqlStar){let I=[];return R.forEach(O=>{let N=Ls(O.subject,O.predicate,O.object);I.push(N),O.annotations&&i2(iy(O.subject,O.predicate,O.object),O.annotations,I)}),I}return R}o(uy,"applyAnnotations");function mX(R){if(!Ve.sparqlStarNestedQuads)throw new Error("Lenient SPARQL-star support with nested quads is not enabled");return R}o(mX,"ensureSparqlStarNestedQuads");function s2(R){for(let I of R){if(I.type==="graph"&&I.name.termType==="Variable")throw new Error("Detected illegal variable in GRAPH");if(I.type==="bgp"||I.type==="graph"){for(let O of I.triples)if(O.subject.termType==="Variable"||O.predicate.termType==="Variable"||O.object.termType==="Variable")throw new Error("Detected illegal variable in BGP")}}return R}o(s2,"ensureNoVariables");function fy(R){for(let I of R)if(I.type==="bgp"){for(let O of I.triples)if(O.subject.termType==="BlankNode"||O.predicate.termType==="BlankNode"||O.object.termType==="BlankNode")throw new Error("Detected illegal blank node in BGP")}return R}o(fy,"ensureNoBnodes");var HD=(function(){var R={EOF:1,parseError:o(function(O,N){if(this.yy.parser)this.yy.parser.parseError(O,N);else throw new Error(O)},"parseError"),setInput:o(function(I,O){return this.yy=O||this.yy||{},this._input=I,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},"setInput"),input:o(function(){var I=this._input[0];this.yytext+=I,this.yyleng++,this.offset++,this.match+=I,this.matched+=I;var O=I.match(/(?:\r\n?|\n).*/g);return O?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),I},"input"),unput:o(function(I){var O=I.length,N=I.split(/(?:\r\n?|\n)/g);this._input=I+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-O),this.offset-=O;var re=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),N.length-1&&(this.yylineno-=N.length-1);var Le=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:N?(N.length===re.length?this.yylloc.first_column:0)+re[re.length-N.length].length-N[0].length:this.yylloc.first_column-O},this.options.ranges&&(this.yylloc.range=[Le[0],Le[0]+this.yyleng-O]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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).
@@ -67,7 +67,7 @@ ${r}}`}default:throw new Qc(`Unsupported operation type for SPARQL generation: $
67
67
  `)}generateTriple(e){let t=this.generateElement(e.subject),r=this.generatePredicate(e.predicate),i=this.generateElement(e.object);return`${t} ${r} ${i}`}generatePredicate(e){return"pathType"in e?this.generatePropertyPath(e):this.generateElement(e)}generatePropertyPath(e){let t=e.items.map(r=>"pathType"in r?`(${this.generatePropertyPath(r)})`:`<${r.value}>`);switch(e.pathType){case"/":return t.join("/");case"|":return t.join("|");case"^":return`^${t[0]}`;case"+":return`${t[0]}+`;case"*":return`${t[0]}*`;case"?":return`${t[0]}?`}}generateElement(e){switch(e.type){case"variable":return`?${e.value}`;case"iri":return`<${e.value}>`;case"literal":{let r=`"${e.value.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")}"`;return e.language?r+=`@${e.language}`:e.datatype&&(r+=`^^<${e.datatype}>`),r}case"blank":return`_:${e.value}`;default:throw new Qc(`Unknown element type: ${e.type}`)}}generateValues(e,t){let r=" ".repeat(t);if(e.variables.length===0||e.bindings.length===0)return"";if(e.variables.length===1){let a=e.variables[0],c=e.bindings.map(l=>{let u=l[a];return u?this.generateValuesTerm(u):"UNDEF"}).join(" ");return`${r}VALUES ?${a} { ${c} }`}let i=e.variables.map(a=>`?${a}`).join(" "),s=e.bindings.map(a=>`(${e.variables.map(l=>{let u=a[l];return u?this.generateValuesTerm(u):"UNDEF"}).join(" ")})`);return`${r}VALUES (${i}) {
68
68
  ${s.map(a=>`${r} ${a}`).join(`
69
69
  `)}
70
- ${r}}`}generateValuesTerm(e){if(e.type==="iri")return`<${e.value}>`;let r=`"${e.value.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`;return e.language?r+=`@${e.language}`:e.datatype&&(r+=`^^<${e.datatype}>`),r}generateExpression(e){switch(e.type){case"variable":return`?${e.name}`;case"literal":return typeof e.value=="string"?`"${e.value.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:typeof e.value=="boolean"?e.value?"true":"false":String(e.value);case"comparison":return`(${this.generateExpression(e.left)} ${e.operator} ${this.generateExpression(e.right)})`;case"logical":return e.operator==="!"?`!(${this.generateExpression(e.operands[0])})`:`(${e.operands.map(t=>this.generateExpression(t)).join(` ${e.operator} `)})`;case"arithmetic":return`(${this.generateExpression(e.left)} ${e.operator} ${this.generateExpression(e.right)})`;case"function":return`${e.function.toUpperCase()}(${e.args.map(t=>this.generateExpression(t)).join(", ")})`;case"functionCall":return`${(typeof e.function=="string"?e.function:e.function.value).toUpperCase()}(${e.args.map(r=>this.generateExpression(r)).join(", ")})`;case"exists":return`${e.negated?"NOT EXISTS":"EXISTS"} { ${this.generateWhereClause(e.pattern,0)} }`;case"in":{let t=this.generateExpression(e.expression),r=e.list.map(i=>this.generateExpression(i)).join(", ");return e.negated?`${t} NOT IN (${r})`:`${t} IN (${r})`}default:throw new Qc(`Unknown expression type: ${e.type}`)}}collectVariablesFromOperation(e,t){switch(e.type){case"bgp":for(let r of e.triples)this.collectVariablesFromTriple(r,t);break;case"filter":this.collectVariablesFromOperation(e.input,t),this.collectVariablesFromExpression(e.expression,t);break;case"join":case"leftjoin":case"union":case"minus":this.collectVariablesFromOperation(e.left,t),this.collectVariablesFromOperation(e.right,t);break;case"values":for(let r of e.variables)t.add(r);break;case"project":for(let r of e.variables)t.add(r);this.collectVariablesFromOperation(e.input,t);break;case"extend":t.add(e.variable),this.collectVariablesFromOperation(e.input,t);break;case"orderby":case"slice":case"distinct":case"reduced":this.collectVariablesFromOperation(e.input,t);break;case"group":for(let r of e.variables)t.add(r);for(let r of e.aggregates)t.add(r.variable);this.collectVariablesFromOperation(e.input,t);break;case"subquery":this.collectVariablesFromOperation(e.query,t);break}}collectVariablesFromTriple(e,t){e.subject.type==="variable"&&t.add(e.subject.value),"type"in e.predicate&&e.predicate.type==="variable"&&t.add(e.predicate.value),e.object.type==="variable"&&t.add(e.object.value)}collectVariablesFromExpression(e,t){switch(e.type){case"variable":t.add(e.name);break;case"comparison":case"arithmetic":this.collectVariablesFromExpression(e.left,t),this.collectVariablesFromExpression(e.right,t);break;case"logical":for(let r of e.operands)this.collectVariablesFromExpression(r,t);break;case"function":case"functionCall":for(let r of e.args)this.collectVariablesFromExpression(r,t);break;case"exists":this.collectVariablesFromOperation(e.pattern,t);break;case"in":this.collectVariablesFromExpression(e.expression,t);for(let r of e.list)this.collectVariablesFromExpression(r,t);break}}};Kc.SPARQLGenerator=_1});var Xc=b(xn=>{"use strict";var WM=xn&&xn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),GM=xn&&xn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Q3=xn&&xn.__importStar||(function(){var n=o(function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&WM(t,e,r[i]);return GM(t,e),t}})();Object.defineProperty(xn,"__esModule",{value:!0});xn.QueryExecutor=xn.ExoQLQueryExecutor=xn.QueryExecutorError=void 0;var zM=M_(),HM=np(),QM=n1(),KM=s1(),YM=j3(),XM=$3(),JM=U3(),ZM=m1(),e9=W3(),t9=z3(),r9=H3(),n9=Ee(),i9=je(),s9=Yh(),Lr="http://www.w3.org/2001/XMLSchema#",a9=new Set([`${Lr}integer`,`${Lr}decimal`,`${Lr}float`,`${Lr}double`,`${Lr}nonPositiveInteger`,`${Lr}negativeInteger`,`${Lr}long`,`${Lr}int`,`${Lr}short`,`${Lr}byte`,`${Lr}nonNegativeInteger`,`${Lr}unsignedLong`,`${Lr}unsignedInt`,`${Lr}unsignedShort`,`${Lr}unsignedByte`,`${Lr}positiveInteger`]),Yc=class extends Error{static{o(this,"QueryExecutorError")}constructor(e,t){super(e,t?{cause:t}:void 0),this.name="QueryExecutorError"}};xn.QueryExecutorError=Yc;var dp=class{static{o(this,"ExoQLQueryExecutor")}constructor(e,t={}){this.tripleStore=e,this.bgpExecutor=new zM.BGPExecutor(e),this.filterExecutor=new HM.FilterExecutor,this.optionalExecutor=new QM.OptionalExecutor,this.unionExecutor=new KM.UnionExecutor,this.minusExecutor=new YM.MinusExecutor,this.valuesExecutor=new XM.ValuesExecutor,this.aggregateExecutor=new JM.AggregateExecutor,this.constructExecutor=new ZM.ConstructExecutor,this.serviceExecutor=new e9.ServiceExecutor(t.serviceConfig),this.graphExecutor=new t9.GraphExecutor(e),this.sparqlGenerator=new r9.SPARQLGenerator,this.filterExecutor.setExistsEvaluator(async(r,i)=>this.evaluateExistsPattern(r,i)),this.filterExecutor.setTripleStore(e)}async evaluateExistsPattern(e,t){for await(let r of this.execute(e))if(t.merge(r)!==null)return!0;return!1}async executeAll(e){let t=[];for await(let r of this.execute(e))t.push(r);return t}async*execute(e){switch(e.type){case"bgp":yield*this.executeBGP(e);break;case"filter":yield*this.executeFilter(e);break;case"join":yield*this.executeJoin(e);break;case"leftjoin":yield*this.executeLeftJoin(e);break;case"union":yield*this.executeUnion(e);break;case"minus":yield*this.executeMinus(e);break;case"values":yield*this.executeValues(e);break;case"project":yield*this.executeProject(e);break;case"orderby":yield*this.executeOrderBy(e);break;case"slice":yield*this.executeSlice(e);break;case"distinct":yield*this.executeDistinct(e);break;case"reduced":yield*this.executeReduced(e);break;case"group":yield*this.executeGroup(e);break;case"extend":yield*this.executeExtend(e);break;case"subquery":yield*this.executeSubquery(e);break;case"lateraljoin":yield*this.executeLateralJoin(e);break;case"service":yield*this.executeService(e);break;case"graph":yield*this.executeGraph(e);break;default:throw new Yc(`Unknown operation type: ${e.type}`)}}async*executeBGP(e){yield*this.bgpExecutor.execute(e)}async*executeFilter(e){let t=this.execute(e.input);yield*this.filterExecutor.execute(e,t)}async*executeJoin(e){let t=[];for await(let a of this.execute(e.left))t.push(a);if(t.length===0)return;let r=new Set;for(let a of t)for(let c of a.variables())r.add(c);let i=this.collectOperationVariables(e.right);if([...r].some(a=>i.has(a)))for(let a of t){let c=this.substituteVariables(e.right,a);for await(let l of this.execute(c)){let u=a.merge(l);u!==null&&(yield u)}}else{let a=[];for await(let c of this.execute(e.right))a.push(c);for(let c of t)for(let l of a){let u=c.merge(l);u!==null&&(yield u)}}}async*executeLeftJoin(e){let t=[];for await(let a of this.execute(e.left))t.push(a);let r=[];for await(let a of this.execute(e.right))r.push(a);async function*i(){for(let a of t)yield a}o(i,"leftGen");async function*s(){for(let a of r)yield a}o(s,"rightGen"),yield*this.optionalExecutor.execute(i(),s())}async*executeUnion(e){let t=[];for await(let a of this.execute(e.left))t.push(a);let r=[];for await(let a of this.execute(e.right))r.push(a);async function*i(){for(let a of t)yield a}o(i,"leftGen");async function*s(){for(let a of r)yield a}o(s,"rightGen"),yield*this.unionExecutor.execute(i(),s())}async*executeMinus(e){let t=[];for await(let a of this.execute(e.left))t.push(a);let r=[];for await(let a of this.execute(e.right))r.push(a);async function*i(){for(let a of t)yield a}o(i,"leftGen");async function*s(){for(let a of r)yield a}o(s,"rightGen"),yield*this.minusExecutor.execute(i(),s())}async*executeValues(e){yield*this.valuesExecutor.execute(e)}async*executeProject(e){let{SolutionMapping:t}=await Promise.resolve().then(()=>Q3(ss())),r=new Set(e.variables);for await(let i of this.execute(e.input)){let s=new t;for(let a of i.variables())if(r.has(a)){let c=i.get(a);c!==void 0&&s.set(a,c)}yield s}}async*executeOrderBy(e){let t=[];for await(let r of this.execute(e.input))t.push(r);t.sort((r,i)=>{for(let s of e.comparators){let a=this.getExpressionValue(s.expression,r),c=this.getExpressionValue(s.expression,i),l=0;if(a===void 0&&c===void 0?l=0:a===void 0?l=1:c===void 0?l=-1:typeof a=="number"&&typeof c=="number"?l=a-c:l=String(a).localeCompare(String(c)),s.descending&&(l=-l),l!==0)return l}return 0});for(let r of t)yield r}async*executeSlice(e){let t=0,r=e.offset??0,i=e.limit;for await(let s of this.execute(e.input)){if(t>=r){if(i!==void 0&&t-r>=i)break;yield s}t++}}async*executeDistinct(e){let t=new Set;for await(let r of this.execute(e.input)){let i=this.getSolutionKey(r);t.has(i)||(t.add(i),yield r)}}async*executeReduced(e){let t=new Set;for await(let r of this.execute(e.input)){let i=this.getSolutionKey(r);t.has(i)||(t.add(i),yield r)}}async*executeGroup(e){let t=[];for await(let i of this.execute(e.input))t.push(i);let r=this.aggregateExecutor.execute(e,t);if(e.having&&e.having.length>0)for(let i of r)e.having.every(a=>this.filterExecutor.evaluateExpression(a,i)===!0)&&(yield i);else for(let i of r)yield i}async*executeExtend(e){let t=e.expression.type!=="aggregate"&&this.filterExecutor.expressionContainsExists(e.expression);for await(let r of this.execute(e.input)){let i=r.clone(),s=t?await this.evaluateExtendExpressionAsync(e.expression,r):this.evaluateExtendExpression(e.expression,r);s!==void 0&&i.set(e.variable,s),yield i}}async*executeSubquery(e){yield*this.execute(e.query)}async*executeLateralJoin(e){let t=[];for await(let r of this.execute(e.left))t.push(r);for(let r of t){let i=this.substituteVariables(e.right,r);for await(let s of this.execute(i)){let a=r.merge(s);a!==null&&(yield a)}}}substituteVariables(e,t){let r=JSON.parse(JSON.stringify(e));return this.substituteInOperation(r,t)}substituteInOperation(e,t){if(!e||typeof e!="object")return e;let r=e;return e.type==="bgp"&&e.triples?(e.triples=e.triples.map(i=>this.substituteInTriple(i,t)),e):(r.input&&(r.input=this.substituteInOperation(r.input,t)),r.left&&(r.left=this.substituteInOperation(r.left,t)),r.right&&(r.right=this.substituteInOperation(r.right,t)),r.pattern&&(r.pattern=this.substituteInOperation(r.pattern,t)),r.query&&(r.query=this.substituteInOperation(r.query,t)),r.where&&(r.where=this.substituteInOperation(r.where,t)),r.expression&&this.substituteInExpression(r.expression,t),e)}substituteInExpression(e,t){if(!(!e||typeof e!="object")){if(e.type==="exists"&&e.pattern&&(e.pattern=this.substituteInOperation(e.pattern,t)),e.left&&this.substituteInExpression(e.left,t),e.right&&this.substituteInExpression(e.right,t),e.operands)for(let r of e.operands)this.substituteInExpression(r,t);if(e.args)for(let r of e.args)this.substituteInExpression(r,t);if(e.expression&&this.substituteInExpression(e.expression,t),e.list)for(let r of e.list)this.substituteInExpression(r,t)}}substituteInTriple(e,t){return{subject:this.substituteInTripleElement(e.subject,t),predicate:e.predicate,object:this.substituteInTripleElement(e.object,t)}}substituteInTripleElement(e,t){if(e&&e.type==="variable"){let r=t.get(e.value);if(r!=null){let i=r;if(r instanceof n9.IRI||i.termType==="NamedNode")return{type:"iri",value:r.value};if(i.termType==="Literal"||typeof i.value=="string")return{type:"literal",value:i.value,datatype:i.datatype?.value??i._datatype?.value,language:i.language??i._language}}}return e}async*executeService(e){yield*this.serviceExecutor.execute(e,t=>this.sparqlGenerator.generateSelect(t))}async*executeGraph(e){let t=async function*(r,i){let s=this.currentGraphContext;this.currentGraphContext=i;try{r.type==="bgp"&&i&&this.tripleStore.matchInGraph?yield*this.executeBGPInGraph(r,i):yield*this.execute(r)}finally{this.currentGraphContext=s}}.bind(this);yield*this.graphExecutor.execute(e,t)}async*executeBGPInGraph(e,t){if(e.triples.length===0){let{SolutionMapping:r}=await Promise.resolve().then(()=>Q3(ss()));yield new r;return}yield*this.bgpExecutor.executeInGraph(e,t)}evaluateExtendExpression(e,t){if(e.type!=="aggregate")try{return this.filterExecutor.evaluateExpression(e,t)}catch{return}}async evaluateExtendExpressionAsync(e,t){if(e.type!=="aggregate")try{return await this.filterExecutor.evaluateExpressionAsync(e,t)}catch{return}}getExpressionValue(e,t){if(e.type==="variable"){let r=t.get(e.name);if(!r)return;if(r instanceof i9.Literal){let i=r.datatype?.value;if(i===`${Lr}dayTimeDuration`)try{return s9.DateTimeFunctions.parseDayTimeDuration(r.value)}catch{return r.value}if(i&&a9.has(i)){let s=parseFloat(r.value);if(!Number.isNaN(s))return s}return r.value}return r.value??r.id??String(r)}if(e.type==="literal")return e.value}collectOperationVariables(e){let t=new Set;return this.collectVarsFromOperation(e,t),t}collectVarsFromOperation(e,t){if(!e||typeof e!="object")return;let r=e;if(r.type==="bgp"&&r.triples)for(let i of r.triples)this.collectVarsFromElement(i.subject,t),i.predicate?.type!=="path"&&this.collectVarsFromElement(i.predicate,t),this.collectVarsFromElement(i.object,t);if(r.type==="values"&&r.variables)for(let i of r.variables)t.add(i);r.expression&&this.collectVarsFromExpressionTree(r.expression,t),r.type==="extend"&&r.variable&&t.add(r.variable),r.input&&this.collectVarsFromOperation(r.input,t),r.left&&this.collectVarsFromOperation(r.left,t),r.right&&this.collectVarsFromOperation(r.right,t),r.pattern&&this.collectVarsFromOperation(r.pattern,t),r.query&&this.collectVarsFromOperation(r.query,t),r.where&&this.collectVarsFromOperation(r.where,t)}collectVarsFromElement(e,t){if(!e||typeof e!="object")return;let r=e;r.type==="variable"&&t.add(r.value),r.type==="quoted"&&(this.collectVarsFromElement(r.subject,t),this.collectVarsFromElement(r.predicate,t),this.collectVarsFromElement(r.object,t))}collectVarsFromExpressionTree(e,t){if(!e||typeof e!="object")return;let r=e;if(r.type==="variable"&&r.name&&t.add(r.name),r.type==="exists"&&r.pattern&&this.collectVarsFromOperation(r.pattern,t),r.left&&this.collectVarsFromExpressionTree(r.left,t),r.right&&this.collectVarsFromExpressionTree(r.right,t),r.operands)for(let i of r.operands)this.collectVarsFromExpressionTree(i,t);if(r.args)for(let i of r.args)this.collectVarsFromExpressionTree(i,t);if(r.expression&&this.collectVarsFromExpressionTree(r.expression,t),r.list)for(let i of r.list)this.collectVarsFromExpressionTree(i,t)}getSolutionKey(e){let t=e.toJSON();return Object.keys(t).sort().map(i=>`${i}=${t[i]}`).join("|")}isConstructQuery(e){return e.type==="construct"}async executeConstruct(e){if(e.type!=="construct")throw new Yc("executeConstruct requires a CONSTRUCT operation");let t=await this.executeAll(e.where);return this.constructExecutor.execute(e.template,t)}isAskQuery(e){return e.type==="ask"}async executeAsk(e){if(e.type!=="ask")throw new Yc("executeAsk requires an ASK operation");for await(let t of this.execute(e.where))return!0;return!1}};xn.ExoQLQueryExecutor=dp;xn.QueryExecutor=dp});var K3=b(Gs=>{"use strict";var o9=Gs&&Gs.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},c9=Gs&&Gs.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)};Object.defineProperty(Gs,"__esModule",{value:!0});Gs.CommandResolver=void 0;var l9=Ce(),u9=bc(),gi=Ee(),Vn=je(),q=ar(),b1=po(),Jc=Ly(),f9=Rc(),d9=Pc(),h9=Xc(),S1=10,w1=class{static{o(this,"CommandResolver")}constructor(e,t=u9.NullLogger){this.tripleStore=e,this.logger=t,this.cache=new Map,this.multiCache=new Map}async resolveForAssetMulti(e,t,r){if(t.length===0)return[];let i=[...t].sort().join(","),s=`${e}::${i}::${r??""}`,a=this.multiCache.get(s);if(a)return a;let c=new Set,l=[];for(let u of t){let f=await this.resolveForAsset(e,u,r);for(let d of f)c.has(d.binding.id)||(c.add(d.binding.id),l.push(d))}return l.sort((u,f)=>{let d=this.getBindingPriority(u.binding),h=this.getBindingPriority(f.binding);return d!==h?d-h:(u.binding.order??100)-(f.binding.order??100)}),this.multiCache.set(s,l),l}async resolveForAsset(e,t,r){let i=`${e}:${t}:${r??""}`,s=this.cache.get(i);if(s)return s;let a=await this.findBindings(t,r,e),c=[];for(let l of a){let u=await this.loadCommand(l.commandRef);if(!u)continue;let f=l.precondition?{...u,precondition:l.precondition}:u;c.push({command:f,binding:l})}return c.sort((l,u)=>{let f=this.getBindingPriority(l.binding),d=this.getBindingPriority(u.binding);return f!==d?f-d:(l.binding.order??100)-(u.binding.order??100)}),this.cache.set(i,c),c}async loadCommand(e){let t=await this.findSubjectByUID(e);if(!t||(await this.tripleStore.match(t,q.Namespace.RDF.term("type"),q.Namespace.EXOCMD.term("Command"))).length===0)return null;let i=await this.getLiteralValue(t,q.Namespace.EXO.term("Asset_label"))??"Unknown Command",s=await this.getLiteralValue(t,q.Namespace.EXOCMD.term("Command_labelTemplate")),a=await this.getLiteralValue(t,q.Namespace.EXOCMD.term("Command_icon")),c=await this.getLiteralValue(t,q.Namespace.EXOCMD.term("Command_confirmMessage")),l=await this.getLiteralValue(t,q.Namespace.EXOCMD.term("Command_successMessage")),u=await this.getLiteralValue(t,q.Namespace.EXOCMD.term("Command_category")),f=await this.loadLinkedPrecondition(t),d=await this.loadLinkedGrounding(t,0);return d?{id:e,name:i,labelTemplate:s??void 0,icon:a??void 0,precondition:f??void 0,grounding:d,confirmMessage:c??void 0,successMessage:l??void 0,category:u??void 0}:null}async findBindings(e,t,r){let i=await this.tripleStore.match(void 0,q.Namespace.RDF.term("type"),q.Namespace.EXOCMD.term("CommandBinding")),s=[];for(let a of i){let c=a.subject,l=await this.loadBindingDefinition(c);l&&this.bindingMatches(l,e,t,r)&&s.push(l)}return s}async findPaletteEnabledCommands(){let e=await this.tripleStore.match(void 0,q.Namespace.RDF.term("type"),q.Namespace.EXOCMD.term("Command")),t=[],r=new Set;for(let i of e){let s=i.subject;if((await this.getLiteralValue(s,q.Namespace.EXOCMD.term("Command_paletteEnabled")))?.toLowerCase()!=="true")continue;let c=await this.getLiteralValue(s,q.Namespace.EXO.term("Asset_uid"));if(!c){this.logger.warn(`[CommandResolver] paletteEnabled command at ${s.value} has no exo__Asset_uid \u2014 skipped`);continue}let l=await this.loadCommand(c);if(!l){this.logger.warn(`[CommandResolver] paletteEnabled command ${c} could not be loaded (missing grounding?) \u2014 skipped`);continue}let u=await this.getLiteralValue(s,q.Namespace.EXOCMD.term("Command_paletteId")),f=await this.getLiteralValue(s,q.Namespace.EXOCMD.term("Command_cliName")),d=u??f??c;if(r.has(d)){this.logger.warn(`[CommandResolver] duplicate paletteId "${d}" \u2014 first registration wins, dropping ${c}`);continue}r.add(d),t.push({command:l,paletteId:d})}return t}invalidateCache(){this.cache.clear(),this.multiCache.clear()}async resolveLabel(e,t){if(!e.labelTemplate)return e.name;let r=e.labelTemplate,i=this.extractPlaceholders(e.labelTemplate);for(let{full:s,body:a}of i){let c=await this.evaluateSelectSnippet(a,t);r=r.replace(s,c)}return r}extractPlaceholders(e){let t=[],r=0;for(;r<e.length;)if(e[r]==="{"){let i=1,s=r+1;for(;s<e.length&&i>0;)e[s]==="{"?i++:e[s]==="}"&&i--,s++;if(i===0){let a=e.slice(r,s),c=e.slice(r+1,s-1);t.push({full:a,body:c})}r=s}else r++;return t}async evaluateSelectSnippet(e,t){try{let r=e.replace(/\$target/g,`<${t}>`),s=new f9.ExoQLParser().parse(r),c=new d9.ExoQLAlgebraTranslator().translate(s),u=await new h9.ExoQLQueryExecutor(this.tripleStore).executeAll(c);if(u.length===0)return"";let f=u[0],d=f.variables();if(d.length===0)return"";let h=f.get(d[0]);return h?h instanceof Vn.Literal||h instanceof gi.IRI?h.value:String(h):""}catch{return""}}async loadBindingDefinition(e){let t=await this.getLiteralValue(e,q.Namespace.EXO.term("Asset_uid"));if(!t)return null;let r=await this.getLiteralValue(e,q.Namespace.EXO.term("Asset_label"))??"",i=await this.getLinkedUID(e,q.Namespace.EXOCMD.term("CommandBinding_command"));if(!i)return null;let s=await this.getLinkedValue(e,q.Namespace.EXOCMD.term("CommandBinding_targetClass")),a=await this.getLinkedValue(e,q.Namespace.EXOCMD.term("CommandBinding_targetPrototype")),c=await this.getLinkedValue(e,q.Namespace.EXOCMD.term("CommandBinding_targetAsset"));if(!s&&!a&&!c)return null;let l=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBinding_position")),u=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBinding_order")),f=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBinding_variant")),d=f!==null?this.coerceVariant(f,t):void 0,h=await this.loadLinkedPreconditionFromProperty(e,q.Namespace.EXOCMD.term("CommandBinding_precondition")),p=await this.loadLinkedStyle(e,t);return{id:t,label:r,commandRef:i,targetClass:s??void 0,targetPrototype:a??void 0,targetAsset:c??void 0,position:l??void 0,order:u?parseInt(u,10):void 0,variant:d,precondition:h??void 0,style:p??void 0}}async loadLinkedStyle(e,t){let r=await this.tripleStore.match(e,q.Namespace.EXOCMD.term("CommandBinding_style"),void 0);if(r.length>0){let s=r[0].object,a=null;if(s instanceof gi.IRI)a=s;else if(s instanceof Vn.Literal){let c=this.normalizeWikilink(s.value);a=await this.findSubjectByUID(c)}if(a){let c=await this.loadStyleAsset(a);if(c)return c}this.logger.warn(this.capWarning(`CommandBinding ${t}: style reference unresolved, falling back to inline variant`))}let i=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBinding_variant"));if(i!==null){let s=this.coerceVariant(i,t);if(s!==void 0)return{id:`inline:${t}`,label:"",variant:s,inline:!0}}return null}async loadStyleAsset(e){let t=await this.getLiteralValue(e,q.Namespace.EXO.term("Asset_uid"));if(!t)return null;let r=await this.getLiteralValue(e,q.Namespace.EXO.term("Asset_label"))??"",i=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_variant")),s=i!==null?this.coerceVariant(i,t):void 0,a=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_showIcon")),c=this.coerceBoolean(a),l=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_labelClass")),u=l!==null?this.coerceLabelClass(l,t):void 0,f=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_ariaLabel")),d=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_tooltip")),h=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_keyboardShortcut")),p=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_source")),y=p!==null?this.coerceStyleSource(p,t):void 0;return{id:t,label:r,variant:s,showIcon:c,labelClass:u,ariaLabel:f??void 0,tooltip:d??void 0,keyboardShortcut:h??void 0,source:y,inline:!1}}coerceVariant(e,t){if(e==null)return;let r=String(e).trim().toLowerCase();if(r!==""){if(Jc.COMMAND_VARIANT_VALUES.includes(r))return r;this.logger.warn(this.capWarning(`CommandBindingStyle variant "${r}" not in whitelist [${Jc.COMMAND_VARIANT_VALUES.join(",")}]; dropped (asset ${t})`))}}coerceLabelClass(e,t){if(e==null)return;let r=String(e).trim().toLowerCase();if(r!==""){if(Jc.LABEL_CLASS_VALUES.includes(r))return r;this.logger.warn(this.capWarning(`CommandBindingStyle labelClass "${r}" not in whitelist [${Jc.LABEL_CLASS_VALUES.join(",")}]; dropped (asset ${t})`))}}coerceStyleSource(e,t){if(e==null)return;let r=String(e).trim().toLowerCase();if(r!==""){if(Jc.STYLE_SOURCE_VALUES.includes(r))return r;this.logger.warn(this.capWarning(`CommandBindingStyle source "${r}" not in whitelist [${Jc.STYLE_SOURCE_VALUES.join(",")}]; dropped (asset ${t})`))}}coerceBoolean(e){if(e===null)return;let t=e.trim().toLowerCase();if(t==="true")return!0;if(t==="false")return!1}capWarning(e){return e.length<=200?e:e.slice(0,197)+"..."}bindingMatches(e,t,r,i){return!!(e.targetAsset&&i&&this.matchesReference(e.targetAsset,i)||e.targetPrototype&&r&&this.matchesReference(e.targetPrototype,r)||e.targetClass&&t&&this.matchesReference(e.targetClass,t))}matchesReference(e,t){let r=this.normalizeWikilink(e),i=this.normalizeWikilink(t);if(r===i)return!0;let s=this.extractPathBasename(i);if(s&&s===r)return!0;let a=this.extractPathBasename(r);if(a&&a===i)return!0;let c=this.extractAlias(t);if(c&&r===c)return!0;let l=this.extractAlias(e);return!!(l&&l===i)}extractPathBasename(e){let t=e.match(/\/([^/]+)\.md$/);return t?t[1]:null}extractAlias(e){let t=e.replace(/["'[\]]/g,"").trim(),r=t.indexOf("|");return r>=0?t.substring(r+1).trim():null}getBindingPriority(e){return e.targetAsset?0:e.targetPrototype?1:2}async loadLinkedPrecondition(e){return this.loadLinkedPreconditionFromProperty(e,q.Namespace.EXOCMD.term("Command_precondition"))}async loadLinkedPreconditionFromProperty(e,t){let r=await this.tripleStore.match(e,t,void 0);if(r.length===0)return null;let i=r[0].object,s=null;if(i instanceof gi.IRI)s=i;else if(i instanceof Vn.Literal){let h=this.normalizeWikilink(i.value);s=await this.findSubjectByUID(h)}if(!s)return null;let a=await this.getLiteralValue(s,q.Namespace.EXO.term("Asset_uid")),c=await this.getLiteralValue(s,q.Namespace.EXO.term("Asset_label"))??"",l=await this.getLiteralValue(s,q.Namespace.EXOCMD.term("Precondition_sparqlAsk")),u=await this.getLiteralValue(s,q.Namespace.EXOCMD.term("Precondition_hostFunction")),f=await this.tripleStore.match(s,q.Namespace.EXOCMD.term("Precondition_query"),void 0),d;if(f.length>0){let h=f[0].object;if(h instanceof gi.IRI){let p=await this.getLiteralValue(h,q.Namespace.EXO.term("Asset_uid"));p&&(d=p)}else h instanceof Vn.Literal&&(d=this.normalizeWikilink(h.value))}return!a||!l&&!u&&!d?null:{id:a,label:c,...l&&{sparqlAsk:l},...u&&{hostFunction:u},...d&&{query:d}}}async loadLinkedGrounding(e,t){if(t>=S1)return null;let r=await this.tripleStore.match(e,q.Namespace.EXOCMD.term("Command_grounding"),void 0);if(r.length===0)return null;let i=r[0].object,s=null;if(i instanceof gi.IRI)s=i;else if(i instanceof Vn.Literal){let a=this.normalizeWikilink(i.value);s=await this.findSubjectByUID(a)}return s?this.loadGroundingDefinition(s,t):null}async loadGroundingDefinition(e,t){if(t>=S1)return null;let r=await this.getLiteralValue(e,q.Namespace.EXO.term("Asset_uid"));if(!r)return null;let i=await this.getLiteralValue(e,q.Namespace.EXO.term("Asset_label"))??"",s=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_type"));if(!s)return null;let a=this.resolveGroundingType(s);if(!a)return null;let c=await this.getObsidianName(e,q.Namespace.EXOCMD.term("Grounding_targetProperty"));if(c&&this.looksLikeUUID(c)){let ve=await this.resolveLabelByUID(c);ve&&(c=ve)}if(a===b1.GroundingType.SERVICE_CALL){let ve=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_serviceId"));ve&&(c=ve)}let l=await this.getObsidianWikilinkValue(e,q.Namespace.EXOCMD.term("Grounding_targetValue")),u=await this.getObsidianName(e,q.Namespace.EXOCMD.term("Grounding_targetValueRef")),f=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_targetValueLiteral")),d=await this.getObsidianName(e,q.Namespace.EXOCMD.term("Grounding_targetValueSubstitution")),h=null;d&&this.looksLikeUUID(d)?h=await this.resolveLabelByUID(d):d&&(h=d);let p=await this.getObsidianWikilinkValue(e,q.Namespace.EXOCMD.term("Grounding_isDefinedBy")),y=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_sparqlUpdate")),S=await this.getObsidianName(e,q.Namespace.EXOCMD.term("Grounding_targetClass")),v=await this.getObsidianName(e,q.Namespace.EXOCMD.term("Grounding_targetPrototype")),w=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_targetFolder")),T=await this.getObsidianName(e,q.Namespace.EXOCMD.term("Grounding_linkBackProperty")),C=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_inputSchema")),M=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_incrementBy")),$=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_shiftDelta")),ee;if(M!=null&&M!==""){let ve=Number.parseInt(String(M),10);Number.isFinite(ve)&&(ee=ve)}let B=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_propertyDefaults")),z;if(B){let ve;try{ve=JSON.parse(B)}catch(Re){throw new Error(`Grounding ${r}: exocmd__Grounding_propertyDefaults is not valid JSON: ${Re instanceof Error?Re.message:String(Re)}`)}if(typeof ve!="object"||ve===null||Array.isArray(ve))throw new Error(`Grounding ${r}: exocmd__Grounding_propertyDefaults must be a JSON object literal`);let $e={};for(let[Re,ne]of Object.entries(ve)){if(typeof ne!="string")throw new Error(`Grounding ${r}: exocmd__Grounding_propertyDefaults["${Re}"] must be a string (got ${typeof ne})`);$e[Re]=ne}z=$e}let P;a===b1.GroundingType.COMPOSITE&&(P=await this.loadCompositeSteps(e,t+1));let D;if(C)try{let ve=JSON.parse(C);ve?.properties&&(D=Object.entries(ve.properties).map(([$e,Re])=>{let ne=Re.type,Z=ne==="string"?"text":ne,U=Re.defaultValue!==void 0?Re.defaultValue:Re.default,it={name:$e,type:Z,label:Re.title??$e,required:Array.isArray(ve.required)&&ve.required.includes($e)};return U!=null&&(it.defaultValue=String(U)),it}))}catch{}let J=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_prefillLabelWithDate")),qe=J!==null&&String(J).trim().toLowerCase()==="true",et={id:r,label:i,type:a,targetProperty:c??void 0,targetValue:l??void 0,targetValueRef:u??void 0,targetValueLiteral:f??void 0,targetValueSubstitution:h??void 0,sparqlUpdate:y??void 0,steps:P,targetClass:S??void 0,targetPrototype:v??void 0,targetFolder:w??void 0,linkBackProperty:T??void 0,incrementBy:ee,shiftDelta:$??void 0,propertyDefaults:z,isDefinedBy:p??void 0,prefillLabelWithDate:qe||void 0};return D&&(et.inputSchema=D),et}async loadCompositeSteps(e,t){if(t>=S1)return[];let r=await this.tripleStore.match(e,q.Namespace.EXOCMD.term("Grounding_steps"),void 0),i=[];for(let s of r){let a=null;if(s.object instanceof gi.IRI)a=s.object;else if(s.object instanceof Vn.Literal){let l=this.normalizeWikilink(s.object.value);a=await this.findSubjectByUID(l)}if(!a)continue;let c=await this.loadGroundingDefinition(a,t);c&&i.push(c)}return i}resolveGroundingType(e){let t=e.toLowerCase().trim();return Object.values(b1.GroundingType).includes(t)?t:null}async findSubjectByUID(e){if(this.tripleStore.findSubjectsByUUID){let r=await this.tripleStore.findSubjectsByUUID(e);if(r.length>0)return r[0]}let t=await this.tripleStore.match(void 0,q.Namespace.EXO.term("Asset_uid"),void 0);for(let r of t)if(r.object instanceof Vn.Literal&&r.object.value===e)return r.subject;return null}async getLiteralValue(e,t){let r=await this.tripleStore.match(e,t,void 0);if(r.length===0)return null;let i=r[0].object;return i instanceof Vn.Literal||i instanceof gi.IRI?i.value:null}looksLikeUUID(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)}async resolveLabelByUID(e){let t=await this.findSubjectByUID(e);return t?this.getLiteralValue(t,q.Namespace.EXO.term("Asset_label")):null}async getLinkedUID(e,t){let r=await this.tripleStore.match(e,t,void 0);if(r.length===0)return null;let i=r[0].object;if(i instanceof gi.IRI){let s=await this.tripleStore.match(i,q.Namespace.EXO.term("Asset_uid"),void 0);return s.length>0&&s[0].object instanceof Vn.Literal?s[0].object.value:i.value.split("/").pop()?.replace(".md","")??null}return i instanceof Vn.Literal?this.normalizeWikilink(i.value):null}async getLinkedValue(e,t){let r=await this.tripleStore.match(e,t,void 0);if(r.length===0)return null;let i=r[0].object;return i instanceof Vn.Literal?this.normalizeWikilink(i.value):i instanceof gi.IRI?this.iriToObsidianName(i.value)??i.value:null}async getObsidianName(e,t){let r=await this.tripleStore.match(e,t,void 0);if(r.length===0)return null;let i=r[0].object;return i instanceof Vn.Literal?this.unwrapWikilink(i.value):i instanceof gi.IRI?this.iriToObsidianName(i.value)??i.value:null}unwrapWikilink(e){if(!e)return e;let t=e.trim().replace(/^"|"$/g,"");if(t.startsWith("http://")||t.startsWith("https://"))return this.iriToObsidianName(t)??t;let r=t.match(/^\[\[([^\]|]+)\|([^\]]+)\]\]$/);if(r)return r[2].trim();let i=t.match(/^\[\[([^\]|]+)\]\]$/);if(i){let s=i[1].trim();return s.startsWith("http://")||s.startsWith("https://")?this.iriToObsidianName(s)??s:s}return t}async getObsidianWikilinkValue(e,t){let r=await this.tripleStore.match(e,t,void 0);if(r.length===0)return null;let i=r[0].object;if(i instanceof Vn.Literal)return this.resolveWikilinkAlias(i.value);if(i instanceof gi.IRI){let s=this.iriToObsidianName(i.value);return s?`"[[${s}]]"`:i.value}return null}async resolveWikilinkAlias(e){let t=e.match(/\[\[([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\]\]/);if(!t)return e;let r=t[1],i=await this.findSubjectByUID(r);if(!i)return e;let s=await this.getLiteralValue(i,q.Namespace.EXO.term("Asset_label"));return s?e.replace(`[[${r}]]`,`[[${r}|${s}]]`):e}iriToObsidianName(e){let t=e.lastIndexOf("#");if(t>=0){let i=e.substring(0,t+1),s=e.substring(t+1);if(i===q.Namespace.EMS.iri.value)return`ems__${s}`;if(i===q.Namespace.EXO.iri.value)return`exo__${s}`;if(i===q.Namespace.EXOCMD.iri.value)return`exocmd__${s}`;if(i===q.Namespace.IMS.iri.value)return`ims__${s}`;if(i===q.Namespace.ZTLK.iri.value)return`ztlk__${s}`;if(i===q.Namespace.PTMS.iri.value)return`ptms__${s}`;if(i===q.Namespace.LIT.iri.value)return`lit__${s}`;if(i===q.Namespace.INBOX.iri.value)return`inbox__${s}`}let r=e.match(/\/([^/]+)\.md$/);return r?r[1]:null}normalizeWikilink(e){let t=e.replace(/["'[\]]/g,"").trim(),r=t.indexOf("|");return r>=0?t.substring(0,r):t}};Gs.CommandResolver=w1;Gs.CommandResolver=w1=o9([(0,l9.injectable)(),c9("design:paramtypes",[Object,Object])],w1)});var E1=b(v1=>{"use strict";Object.defineProperty(v1,"__esModule",{value:!0});v1.validateExoQLAllowlist=p9;var hp=Mu();function p9(n){if(!n||typeof n!="object")return;let e=n;if(e.type==="update"){let t=n.updates??[];for(let r of t)if(r?.type==="load")throw new hp.ExoQLForbiddenKeywordError("LOAD");throw new hp.ExoQLForbiddenKeywordError("UPDATE")}if(e.type==="query"){if(e.from){let t=Array.isArray(e.from.default)&&e.from.default.length>0,r=Array.isArray(e.from.named)&&e.from.named.length>0;if(t||r)throw new hp.ExoQLForbiddenKeywordError("FROM")}if(Array.isArray(e.where))for(let t of e.where)pp(t);if(Array.isArray(e.template))for(let t of e.template)pp(t)}}o(p9,"validateExoQLAllowlist");function pp(n){if(!n||typeof n!="object")return;if(n.type==="service")throw new hp.ExoQLForbiddenKeywordError("SERVICE");if(Array.isArray(n.patterns))for(let t of n.patterns)pp(t);let e=n.where;if(Array.isArray(e))for(let t of e)pp(t)}o(pp,"walkPatternForBannedKeywords")});var T1=b(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});mp.DEFAULT_EVAL_CONFIG=void 0;mp.DEFAULT_EVAL_CONFIG=Object.freeze({enabled:!0,maxNestedEvalCount:100,maxAggregateEvalMillis:1e4})});var x1=b(A1=>{"use strict";Object.defineProperty(A1,"__esModule",{value:!0});A1.evaluateWithExoEval=w9;var m9=Rc(),g9=Pc(),y9=Xc(),_9=E1(),b9=T1(),S9=Mu();async function w9(n,e={}){if(typeof n!="string")throw new TypeError("evaluateWithExoEval: sparql must be a string");let r=new m9.ExoQLParser().parse(n);if((0,_9.validateExoQLAllowlist)(r),!{...b9.DEFAULT_EVAL_CONFIG,...e.config??{}}.enabled)throw new S9.ExoQLEvalDisabledError;let s="queryType"in r&&typeof r.queryType=="string"?r.queryType:"SELECT";if(!e.store)return s==="ASK"?{kind:"ask",result:!1}:s==="CONSTRUCT"?{kind:"construct",triples:[]}:{kind:"select",rows:[]};let c=new g9.ExoQLAlgebraTranslator().translate(r),l=new y9.ExoQLQueryExecutor(e.store);return l.isAskQuery(c)?{kind:"ask",result:await l.executeAsk(c)}:l.isConstructQuery(c)?{kind:"construct",triples:await l.executeConstruct(c)}:{kind:"select",rows:await l.executeAll(c)}}o(w9,"evaluateWithExoEval")});var X3=b(zs=>{"use strict";var v9=zs&&zs.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},E9=zs&&zs.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},Vu;Object.defineProperty(zs,"__esModule",{value:!0});zs.PreconditionEvaluator=void 0;var T9=Ce(),A9=Rc(),x9=Pc(),Y3=Xc(),I9=x1(),Bu=Vu=class{static{o(this,"PreconditionEvaluator")}constructor(e,t){this.hostFunctions=new Map,this.askCache=new Map,this.tripleStore=e,this.queryBodyResolver=t}async evaluate(e,t,r){return e?e.sparqlAsk?this.evaluateSparqlAsk(e.sparqlAsk,t):e.query?this.evaluateQueryRef(e.query,t):e.hostFunction?this.evaluateHostFunction(e.hostFunction,t,r):!0:!0}async evaluateQueryRef(e,t){if(!this.queryBodyResolver)return!1;try{let r=await this.queryBodyResolver.resolveSparql(e);if(!r)return!1;let i=this.substituteVariables(r,t),s=await(0,I9.evaluateWithExoEval)(i,{store:this.tripleStore});return s.kind!=="ask"?!1:s.result}catch{return!1}}registerHostFunction(e,t){this.hostFunctions.set(e,t)}hasHostFunction(e){return this.hostFunctions.has(e)}invalidateCache(){this.askCache.clear()}compileAsk(e){let t=this.substituteVariables(e,Vu.SENTINEL_IRI),i=new A9.ExoQLParser().parse(t),a=new x9.ExoQLAlgebraTranslator().translate(i);return new Y3.ExoQLQueryExecutor(this.tripleStore).isAskQuery(a)?a:null}evaluateHostFunction(e,t,r){let i=this.hostFunctions.get(e);if(!i)return!0;let s=r?{...r,targetIRI:t}:{targetIRI:t};return i(s)}async evaluateSparqlAsk(e,t){try{let r=this.askCache.get(e);if(r===void 0){let a=this.compileAsk(e);if(!a)return!1;r=a,this.askCache.set(e,r)}let i=JSON.parse(JSON.stringify(r).replaceAll(Vu.SENTINEL_IRI,t));return await new Y3.ExoQLQueryExecutor(this.tripleStore).executeAsk(i)}catch{return!1}}substituteVariables(e,t){let r=new Date().toISOString(),i=r.slice(0,10),s=new Date,a=new Date(s.getTime()+Vu.ALMATY_OFFSET_MS),c=a.getUTCFullYear(),l=a.getUTCMonth(),u=a.getUTCDate(),f=a.getUTCDay(),h=new Date(Date.UTC(c,l,u-1)).toISOString().slice(0,10),p=(f+6)%7,y=new Date(Date.UTC(c,l,u-p)),S=y.toISOString().slice(0,10),w=new Date(y.getTime()-10080*60*1e3).toISOString().slice(0,10),T=`${c}-${String(l+1).padStart(2,"0")}-01`,C=l===0?11:l-1,$=`${l===0?c-1:c}-${String(C+1).padStart(2,"0")}-01`,ee=`${c}-01-01`;return e.replace(/\$target/g,`<${t}>`).replace(/\$now/g,`"${r}"^^xsd:dateTime`).replace(/\$yesterday/g,`"${h}"^^xsd:date`).replace(/\$thisWeekStart/g,`"${S}"^^xsd:date`).replace(/\$lastWeekStart/g,`"${w}"^^xsd:date`).replace(/\$thisMonthStart/g,`"${T}"^^xsd:date`).replace(/\$lastMonthStart/g,`"${$}"^^xsd:date`).replace(/\$thisYearStart/g,`"${ee}"^^xsd:date`).replace(/\$today/g,`"${i}"^^xsd:date`)}};zs.PreconditionEvaluator=Bu;Bu.SENTINEL_IRI="urn:exocortex:cache-sentinel:target";Bu.ALMATY_OFFSET_MS=300*60*1e3;zs.PreconditionEvaluator=Bu=Vu=v9([(0,T9.injectable)(),E9("design:paramtypes",[Object,Object])],Bu)});var ls=b(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});gp.FrontmatterService=void 0;var Uu=class n{static{o(this,"FrontmatterService")}parse(e){let t=e.match(n.FRONTMATTER_REGEX);return t?{exists:!0,content:t[1],originalContent:e}:{exists:!1,content:"",originalContent:e}}parseObject(e){let t=this.parse(e);if(!t.exists)return null;let r={},i=t.content.split(/\r?\n/),s=null,a=null,c=o(()=>{s!==null&&a!==null&&(r[s]=a),s=null,a=null},"flushArray");for(let l of i){let u=/^ {2}- (.*)$/.exec(l);if(u){s!==null&&a!==null&&a.push(u[1].trim());continue}c();let f=/^([^:\s][^:]*):\s*(.*)$/.exec(l);if(!f)continue;let d=f[1].trim(),h=f[2].trim();h===""?(s=d,a=[]):r[d]=h}return c(),r}updateProperty(e,t,r){t=n.normalizeIRI(t),typeof r=="string"&&(r=n.normalizeIRIValue(r));let i=this.parse(e),s=this.serializeValue(t,r);if(!i.exists)return`---
70
+ ${r}}`}generateValuesTerm(e){if(e.type==="iri")return`<${e.value}>`;let r=`"${e.value.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`;return e.language?r+=`@${e.language}`:e.datatype&&(r+=`^^<${e.datatype}>`),r}generateExpression(e){switch(e.type){case"variable":return`?${e.name}`;case"literal":return typeof e.value=="string"?`"${e.value.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:typeof e.value=="boolean"?e.value?"true":"false":String(e.value);case"comparison":return`(${this.generateExpression(e.left)} ${e.operator} ${this.generateExpression(e.right)})`;case"logical":return e.operator==="!"?`!(${this.generateExpression(e.operands[0])})`:`(${e.operands.map(t=>this.generateExpression(t)).join(` ${e.operator} `)})`;case"arithmetic":return`(${this.generateExpression(e.left)} ${e.operator} ${this.generateExpression(e.right)})`;case"function":return`${e.function.toUpperCase()}(${e.args.map(t=>this.generateExpression(t)).join(", ")})`;case"functionCall":return`${(typeof e.function=="string"?e.function:e.function.value).toUpperCase()}(${e.args.map(r=>this.generateExpression(r)).join(", ")})`;case"exists":return`${e.negated?"NOT EXISTS":"EXISTS"} { ${this.generateWhereClause(e.pattern,0)} }`;case"in":{let t=this.generateExpression(e.expression),r=e.list.map(i=>this.generateExpression(i)).join(", ");return e.negated?`${t} NOT IN (${r})`:`${t} IN (${r})`}default:throw new Qc(`Unknown expression type: ${e.type}`)}}collectVariablesFromOperation(e,t){switch(e.type){case"bgp":for(let r of e.triples)this.collectVariablesFromTriple(r,t);break;case"filter":this.collectVariablesFromOperation(e.input,t),this.collectVariablesFromExpression(e.expression,t);break;case"join":case"leftjoin":case"union":case"minus":this.collectVariablesFromOperation(e.left,t),this.collectVariablesFromOperation(e.right,t);break;case"values":for(let r of e.variables)t.add(r);break;case"project":for(let r of e.variables)t.add(r);this.collectVariablesFromOperation(e.input,t);break;case"extend":t.add(e.variable),this.collectVariablesFromOperation(e.input,t);break;case"orderby":case"slice":case"distinct":case"reduced":this.collectVariablesFromOperation(e.input,t);break;case"group":for(let r of e.variables)t.add(r);for(let r of e.aggregates)t.add(r.variable);this.collectVariablesFromOperation(e.input,t);break;case"subquery":this.collectVariablesFromOperation(e.query,t);break}}collectVariablesFromTriple(e,t){e.subject.type==="variable"&&t.add(e.subject.value),"type"in e.predicate&&e.predicate.type==="variable"&&t.add(e.predicate.value),e.object.type==="variable"&&t.add(e.object.value)}collectVariablesFromExpression(e,t){switch(e.type){case"variable":t.add(e.name);break;case"comparison":case"arithmetic":this.collectVariablesFromExpression(e.left,t),this.collectVariablesFromExpression(e.right,t);break;case"logical":for(let r of e.operands)this.collectVariablesFromExpression(r,t);break;case"function":case"functionCall":for(let r of e.args)this.collectVariablesFromExpression(r,t);break;case"exists":this.collectVariablesFromOperation(e.pattern,t);break;case"in":this.collectVariablesFromExpression(e.expression,t);for(let r of e.list)this.collectVariablesFromExpression(r,t);break}}};Kc.SPARQLGenerator=_1});var Xc=b(xn=>{"use strict";var WM=xn&&xn.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),GM=xn&&xn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),Q3=xn&&xn.__importStar||(function(){var n=o(function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&WM(t,e,r[i]);return GM(t,e),t}})();Object.defineProperty(xn,"__esModule",{value:!0});xn.QueryExecutor=xn.ExoQLQueryExecutor=xn.QueryExecutorError=void 0;var zM=M_(),HM=np(),QM=n1(),KM=s1(),YM=j3(),XM=$3(),JM=U3(),ZM=m1(),e9=W3(),t9=z3(),r9=H3(),n9=Ee(),i9=je(),s9=Yh(),Lr="http://www.w3.org/2001/XMLSchema#",a9=new Set([`${Lr}integer`,`${Lr}decimal`,`${Lr}float`,`${Lr}double`,`${Lr}nonPositiveInteger`,`${Lr}negativeInteger`,`${Lr}long`,`${Lr}int`,`${Lr}short`,`${Lr}byte`,`${Lr}nonNegativeInteger`,`${Lr}unsignedLong`,`${Lr}unsignedInt`,`${Lr}unsignedShort`,`${Lr}unsignedByte`,`${Lr}positiveInteger`]),Yc=class extends Error{static{o(this,"QueryExecutorError")}constructor(e,t){super(e,t?{cause:t}:void 0),this.name="QueryExecutorError"}};xn.QueryExecutorError=Yc;var dp=class{static{o(this,"ExoQLQueryExecutor")}constructor(e,t={}){this.tripleStore=e,this.bgpExecutor=new zM.BGPExecutor(e),this.filterExecutor=new HM.FilterExecutor,this.optionalExecutor=new QM.OptionalExecutor,this.unionExecutor=new KM.UnionExecutor,this.minusExecutor=new YM.MinusExecutor,this.valuesExecutor=new XM.ValuesExecutor,this.aggregateExecutor=new JM.AggregateExecutor,this.constructExecutor=new ZM.ConstructExecutor,this.serviceExecutor=new e9.ServiceExecutor(t.serviceConfig),this.graphExecutor=new t9.GraphExecutor(e),this.sparqlGenerator=new r9.SPARQLGenerator,this.filterExecutor.setExistsEvaluator(async(r,i)=>this.evaluateExistsPattern(r,i)),this.filterExecutor.setTripleStore(e)}async evaluateExistsPattern(e,t){for await(let r of this.execute(e))if(t.merge(r)!==null)return!0;return!1}async executeAll(e){let t=[];for await(let r of this.execute(e))t.push(r);return t}async*execute(e){switch(e.type){case"bgp":yield*this.executeBGP(e);break;case"filter":yield*this.executeFilter(e);break;case"join":yield*this.executeJoin(e);break;case"leftjoin":yield*this.executeLeftJoin(e);break;case"union":yield*this.executeUnion(e);break;case"minus":yield*this.executeMinus(e);break;case"values":yield*this.executeValues(e);break;case"project":yield*this.executeProject(e);break;case"orderby":yield*this.executeOrderBy(e);break;case"slice":yield*this.executeSlice(e);break;case"distinct":yield*this.executeDistinct(e);break;case"reduced":yield*this.executeReduced(e);break;case"group":yield*this.executeGroup(e);break;case"extend":yield*this.executeExtend(e);break;case"subquery":yield*this.executeSubquery(e);break;case"lateraljoin":yield*this.executeLateralJoin(e);break;case"service":yield*this.executeService(e);break;case"graph":yield*this.executeGraph(e);break;default:throw new Yc(`Unknown operation type: ${e.type}`)}}async*executeBGP(e){yield*this.bgpExecutor.execute(e)}async*executeFilter(e){let t=this.execute(e.input);yield*this.filterExecutor.execute(e,t)}async*executeJoin(e){let t=[];for await(let a of this.execute(e.left))t.push(a);if(t.length===0)return;let r=new Set;for(let a of t)for(let c of a.variables())r.add(c);let i=this.collectOperationVariables(e.right);if([...r].some(a=>i.has(a)))for(let a of t){let c=this.substituteVariables(e.right,a);for await(let l of this.execute(c)){let u=a.merge(l);u!==null&&(yield u)}}else{let a=[];for await(let c of this.execute(e.right))a.push(c);for(let c of t)for(let l of a){let u=c.merge(l);u!==null&&(yield u)}}}async*executeLeftJoin(e){let t=[];for await(let a of this.execute(e.left))t.push(a);let r=[];for await(let a of this.execute(e.right))r.push(a);async function*i(){for(let a of t)yield a}o(i,"leftGen");async function*s(){for(let a of r)yield a}o(s,"rightGen"),yield*this.optionalExecutor.execute(i(),s())}async*executeUnion(e){let t=[];for await(let a of this.execute(e.left))t.push(a);let r=[];for await(let a of this.execute(e.right))r.push(a);async function*i(){for(let a of t)yield a}o(i,"leftGen");async function*s(){for(let a of r)yield a}o(s,"rightGen"),yield*this.unionExecutor.execute(i(),s())}async*executeMinus(e){let t=[];for await(let a of this.execute(e.left))t.push(a);let r=[];for await(let a of this.execute(e.right))r.push(a);async function*i(){for(let a of t)yield a}o(i,"leftGen");async function*s(){for(let a of r)yield a}o(s,"rightGen"),yield*this.minusExecutor.execute(i(),s())}async*executeValues(e){yield*this.valuesExecutor.execute(e)}async*executeProject(e){let{SolutionMapping:t}=await Promise.resolve().then(()=>Q3(ss())),r=new Set(e.variables);for await(let i of this.execute(e.input)){let s=new t;for(let a of i.variables())if(r.has(a)){let c=i.get(a);c!==void 0&&s.set(a,c)}yield s}}async*executeOrderBy(e){let t=[];for await(let r of this.execute(e.input))t.push(r);t.sort((r,i)=>{for(let s of e.comparators){let a=this.getExpressionValue(s.expression,r),c=this.getExpressionValue(s.expression,i),l=0;if(a===void 0&&c===void 0?l=0:a===void 0?l=1:c===void 0?l=-1:typeof a=="number"&&typeof c=="number"?l=a-c:l=String(a).localeCompare(String(c)),s.descending&&(l=-l),l!==0)return l}return 0});for(let r of t)yield r}async*executeSlice(e){let t=0,r=e.offset??0,i=e.limit;for await(let s of this.execute(e.input)){if(t>=r){if(i!==void 0&&t-r>=i)break;yield s}t++}}async*executeDistinct(e){let t=new Set;for await(let r of this.execute(e.input)){let i=this.getSolutionKey(r);t.has(i)||(t.add(i),yield r)}}async*executeReduced(e){let t=new Set;for await(let r of this.execute(e.input)){let i=this.getSolutionKey(r);t.has(i)||(t.add(i),yield r)}}async*executeGroup(e){let t=[];for await(let i of this.execute(e.input))t.push(i);let r=this.aggregateExecutor.execute(e,t);if(e.having&&e.having.length>0)for(let i of r)e.having.every(a=>this.filterExecutor.evaluateExpression(a,i)===!0)&&(yield i);else for(let i of r)yield i}async*executeExtend(e){let t=e.expression.type!=="aggregate"&&this.filterExecutor.expressionContainsExists(e.expression);for await(let r of this.execute(e.input)){let i=r.clone(),s=t?await this.evaluateExtendExpressionAsync(e.expression,r):this.evaluateExtendExpression(e.expression,r);s!==void 0&&i.set(e.variable,s),yield i}}async*executeSubquery(e){yield*this.execute(e.query)}async*executeLateralJoin(e){let t=[];for await(let r of this.execute(e.left))t.push(r);for(let r of t){let i=this.substituteVariables(e.right,r);for await(let s of this.execute(i)){let a=r.merge(s);a!==null&&(yield a)}}}substituteVariables(e,t){let r=JSON.parse(JSON.stringify(e));return this.substituteInOperation(r,t)}substituteInOperation(e,t){if(!e||typeof e!="object")return e;let r=e;return e.type==="bgp"&&e.triples?(e.triples=e.triples.map(i=>this.substituteInTriple(i,t)),e):(r.input&&(r.input=this.substituteInOperation(r.input,t)),r.left&&(r.left=this.substituteInOperation(r.left,t)),r.right&&(r.right=this.substituteInOperation(r.right,t)),r.pattern&&(r.pattern=this.substituteInOperation(r.pattern,t)),r.query&&(r.query=this.substituteInOperation(r.query,t)),r.where&&(r.where=this.substituteInOperation(r.where,t)),r.expression&&this.substituteInExpression(r.expression,t),e)}substituteInExpression(e,t){if(!(!e||typeof e!="object")){if(e.type==="exists"&&e.pattern&&(e.pattern=this.substituteInOperation(e.pattern,t)),e.left&&this.substituteInExpression(e.left,t),e.right&&this.substituteInExpression(e.right,t),e.operands)for(let r of e.operands)this.substituteInExpression(r,t);if(e.args)for(let r of e.args)this.substituteInExpression(r,t);if(e.expression&&this.substituteInExpression(e.expression,t),e.list)for(let r of e.list)this.substituteInExpression(r,t)}}substituteInTriple(e,t){return{subject:this.substituteInTripleElement(e.subject,t),predicate:e.predicate,object:this.substituteInTripleElement(e.object,t)}}substituteInTripleElement(e,t){if(e&&e.type==="variable"){let r=t.get(e.value);if(r!=null){let i=r;if(r instanceof n9.IRI||i.termType==="NamedNode")return{type:"iri",value:r.value};if(i.termType==="Literal"||typeof i.value=="string")return{type:"literal",value:i.value,datatype:i.datatype?.value??i._datatype?.value,language:i.language??i._language}}}return e}async*executeService(e){yield*this.serviceExecutor.execute(e,t=>this.sparqlGenerator.generateSelect(t))}async*executeGraph(e){let t=async function*(r,i){let s=this.currentGraphContext;this.currentGraphContext=i;try{r.type==="bgp"&&i&&this.tripleStore.matchInGraph?yield*this.executeBGPInGraph(r,i):yield*this.execute(r)}finally{this.currentGraphContext=s}}.bind(this);yield*this.graphExecutor.execute(e,t)}async*executeBGPInGraph(e,t){if(e.triples.length===0){let{SolutionMapping:r}=await Promise.resolve().then(()=>Q3(ss()));yield new r;return}yield*this.bgpExecutor.executeInGraph(e,t)}evaluateExtendExpression(e,t){if(e.type!=="aggregate")try{return this.filterExecutor.evaluateExpression(e,t)}catch{return}}async evaluateExtendExpressionAsync(e,t){if(e.type!=="aggregate")try{return await this.filterExecutor.evaluateExpressionAsync(e,t)}catch{return}}getExpressionValue(e,t){if(e.type==="variable"){let r=t.get(e.name);if(!r)return;if(r instanceof i9.Literal){let i=r.datatype?.value;if(i===`${Lr}dayTimeDuration`)try{return s9.DateTimeFunctions.parseDayTimeDuration(r.value)}catch{return r.value}if(i&&a9.has(i)){let s=parseFloat(r.value);if(!Number.isNaN(s))return s}return r.value}return r.value??r.id??String(r)}if(e.type==="literal")return e.value}collectOperationVariables(e){let t=new Set;return this.collectVarsFromOperation(e,t),t}collectVarsFromOperation(e,t){if(!e||typeof e!="object")return;let r=e;if(r.type==="bgp"&&r.triples)for(let i of r.triples)this.collectVarsFromElement(i.subject,t),i.predicate?.type!=="path"&&this.collectVarsFromElement(i.predicate,t),this.collectVarsFromElement(i.object,t);if(r.type==="values"&&r.variables)for(let i of r.variables)t.add(i);r.expression&&this.collectVarsFromExpressionTree(r.expression,t),r.type==="extend"&&r.variable&&t.add(r.variable),r.input&&this.collectVarsFromOperation(r.input,t),r.left&&this.collectVarsFromOperation(r.left,t),r.right&&this.collectVarsFromOperation(r.right,t),r.pattern&&this.collectVarsFromOperation(r.pattern,t),r.query&&this.collectVarsFromOperation(r.query,t),r.where&&this.collectVarsFromOperation(r.where,t)}collectVarsFromElement(e,t){if(!e||typeof e!="object")return;let r=e;r.type==="variable"&&t.add(r.value),r.type==="quoted"&&(this.collectVarsFromElement(r.subject,t),this.collectVarsFromElement(r.predicate,t),this.collectVarsFromElement(r.object,t))}collectVarsFromExpressionTree(e,t){if(!e||typeof e!="object")return;let r=e;if(r.type==="variable"&&r.name&&t.add(r.name),r.type==="exists"&&r.pattern&&this.collectVarsFromOperation(r.pattern,t),r.left&&this.collectVarsFromExpressionTree(r.left,t),r.right&&this.collectVarsFromExpressionTree(r.right,t),r.operands)for(let i of r.operands)this.collectVarsFromExpressionTree(i,t);if(r.args)for(let i of r.args)this.collectVarsFromExpressionTree(i,t);if(r.expression&&this.collectVarsFromExpressionTree(r.expression,t),r.list)for(let i of r.list)this.collectVarsFromExpressionTree(i,t)}getSolutionKey(e){let t=e.toJSON();return Object.keys(t).sort().map(i=>`${i}=${t[i]}`).join("|")}isConstructQuery(e){return e.type==="construct"}async executeConstruct(e){if(e.type!=="construct")throw new Yc("executeConstruct requires a CONSTRUCT operation");let t=await this.executeAll(e.where);return this.constructExecutor.execute(e.template,t)}isAskQuery(e){return e.type==="ask"}async executeAsk(e){if(e.type!=="ask")throw new Yc("executeAsk requires an ASK operation");for await(let t of this.execute(e.where))return!0;return!1}};xn.ExoQLQueryExecutor=dp;xn.QueryExecutor=dp});var K3=b(Gs=>{"use strict";var o9=Gs&&Gs.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},c9=Gs&&Gs.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)};Object.defineProperty(Gs,"__esModule",{value:!0});Gs.CommandResolver=void 0;var l9=Ce(),u9=bc(),gi=Ee(),Vn=je(),q=ar(),b1=po(),Jc=Ly(),f9=Rc(),d9=Pc(),h9=Xc(),S1=10,w1=class{static{o(this,"CommandResolver")}constructor(e,t=u9.NullLogger){this.tripleStore=e,this.logger=t,this.cache=new Map,this.multiCache=new Map}async resolveForAssetMulti(e,t,r){if(t.length===0)return[];let i=[...t].sort().join(","),s=`${e}::${i}::${r??""}`,a=this.multiCache.get(s);if(a)return a;let c=new Set,l=[];for(let u of t){let f=await this.resolveForAsset(e,u,r);for(let d of f)c.has(d.binding.id)||(c.add(d.binding.id),l.push(d))}return l.sort((u,f)=>{let d=this.getBindingPriority(u.binding),h=this.getBindingPriority(f.binding);return d!==h?d-h:(u.binding.order??100)-(f.binding.order??100)}),this.multiCache.set(s,l),l}async resolveForAsset(e,t,r){let i=`${e}:${t}:${r??""}`,s=this.cache.get(i);if(s)return s;let a=await this.findBindings(t,r,e),c=[];for(let l of a){let u=await this.loadCommand(l.commandRef);if(!u)continue;let f=l.precondition?{...u,precondition:l.precondition}:u;c.push({command:f,binding:l})}return c.sort((l,u)=>{let f=this.getBindingPriority(l.binding),d=this.getBindingPriority(u.binding);return f!==d?f-d:(l.binding.order??100)-(u.binding.order??100)}),this.cache.set(i,c),c}async loadCommand(e){let t=await this.findSubjectByUID(e);if(!t||(await this.tripleStore.match(t,q.Namespace.RDF.term("type"),q.Namespace.EXOCMD.term("Command"))).length===0)return null;let i=await this.getLiteralValue(t,q.Namespace.EXO.term("Asset_label"))??"Unknown Command",s=await this.getLiteralValue(t,q.Namespace.EXOCMD.term("Command_labelTemplate")),a=await this.getLiteralValue(t,q.Namespace.EXOCMD.term("Command_icon")),c=await this.getLiteralValue(t,q.Namespace.EXOCMD.term("Command_confirmMessage")),l=await this.getLiteralValue(t,q.Namespace.EXOCMD.term("Command_successMessage")),u=await this.getLiteralValue(t,q.Namespace.EXOCMD.term("Command_category")),f=await this.loadLinkedPrecondition(t),d=await this.loadLinkedGrounding(t,0);return d?{id:e,name:i,labelTemplate:s??void 0,icon:a??void 0,precondition:f??void 0,grounding:d,confirmMessage:c??void 0,successMessage:l??void 0,category:u??void 0}:null}async findBindings(e,t,r){let i=await this.tripleStore.match(void 0,q.Namespace.RDF.term("type"),q.Namespace.EXOCMD.term("CommandBinding")),s=[];for(let a of i){let c=a.subject,l=await this.loadBindingDefinition(c);l&&this.bindingMatches(l,e,t,r)&&s.push(l)}return s}async findPaletteEnabledCommands(){let e=await this.tripleStore.match(void 0,q.Namespace.RDF.term("type"),q.Namespace.EXOCMD.term("Command")),t=[],r=new Set;for(let i of e){let s=i.subject;if((await this.getLiteralValue(s,q.Namespace.EXOCMD.term("Command_paletteEnabled")))?.toLowerCase()!=="true")continue;let c=await this.getLiteralValue(s,q.Namespace.EXO.term("Asset_uid"));if(!c){this.logger.warn(`[CommandResolver] paletteEnabled command at ${s.value} has no exo__Asset_uid \u2014 skipped`);continue}let l=await this.loadCommand(c);if(!l){this.logger.warn(`[CommandResolver] paletteEnabled command ${c} could not be loaded (missing grounding?) \u2014 skipped`);continue}let u=await this.getLiteralValue(s,q.Namespace.EXOCMD.term("Command_paletteId")),f=await this.getLiteralValue(s,q.Namespace.EXOCMD.term("Command_cliName")),d=u??f??c;if(r.has(d)){this.logger.warn(`[CommandResolver] duplicate paletteId "${d}" \u2014 first registration wins, dropping ${c}`);continue}r.add(d),t.push({command:l,paletteId:d})}return t}invalidateCache(){this.cache.clear(),this.multiCache.clear()}async resolveLabel(e,t){if(!e.labelTemplate)return e.name;let r=e.labelTemplate,i=this.extractPlaceholders(e.labelTemplate);for(let{full:s,body:a}of i){let c=await this.evaluateSelectSnippet(a,t);r=r.replace(s,c)}return r}extractPlaceholders(e){let t=[],r=0;for(;r<e.length;)if(e[r]==="{"){let i=1,s=r+1;for(;s<e.length&&i>0;)e[s]==="{"?i++:e[s]==="}"&&i--,s++;if(i===0){let a=e.slice(r,s),c=e.slice(r+1,s-1);t.push({full:a,body:c})}r=s}else r++;return t}async evaluateSelectSnippet(e,t){try{let r=e.replace(/\$target/g,`<${t}>`),s=new f9.ExoQLParser().parse(r),c=new d9.ExoQLAlgebraTranslator().translate(s),u=await new h9.ExoQLQueryExecutor(this.tripleStore).executeAll(c);if(u.length===0)return"";let f=u[0],d=f.variables();if(d.length===0)return"";let h=f.get(d[0]);return h?h instanceof Vn.Literal||h instanceof gi.IRI?h.value:String(h):""}catch{return""}}async loadBindingDefinition(e){let t=await this.getLiteralValue(e,q.Namespace.EXO.term("Asset_uid"));if(!t)return null;let r=await this.getLiteralValue(e,q.Namespace.EXO.term("Asset_label"))??"",i=await this.getLinkedUID(e,q.Namespace.EXOCMD.term("CommandBinding_command"));if(!i)return null;let s=await this.getLinkedValue(e,q.Namespace.EXOCMD.term("CommandBinding_targetClass")),a=await this.getLinkedValue(e,q.Namespace.EXOCMD.term("CommandBinding_targetPrototype")),c=await this.getLinkedValue(e,q.Namespace.EXOCMD.term("CommandBinding_targetAsset"));if(!s&&!a&&!c)return null;let l=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBinding_position")),u=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBinding_order")),f=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBinding_variant")),d=f!==null?this.coerceVariant(f,t):void 0,h=await this.loadLinkedPreconditionFromProperty(e,q.Namespace.EXOCMD.term("CommandBinding_precondition")),p=await this.loadLinkedStyle(e,t);return{id:t,label:r,commandRef:i,targetClass:s??void 0,targetPrototype:a??void 0,targetAsset:c??void 0,position:l??void 0,order:u?parseInt(u,10):void 0,variant:d,precondition:h??void 0,style:p??void 0}}async loadLinkedStyle(e,t){let r=await this.tripleStore.match(e,q.Namespace.EXOCMD.term("CommandBinding_style"),void 0);if(r.length>0){let s=r[0].object,a=null;if(s instanceof gi.IRI)a=s;else if(s instanceof Vn.Literal){let c=this.normalizeWikilink(s.value);a=await this.findSubjectByUID(c)}if(a){let c=await this.loadStyleAsset(a);if(c)return c}this.logger.warn(this.capWarning(`CommandBinding ${t}: style reference unresolved, falling back to inline variant`))}let i=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBinding_variant"));if(i!==null){let s=this.coerceVariant(i,t);if(s!==void 0)return{id:`inline:${t}`,label:"",variant:s,inline:!0}}return null}async loadStyleAsset(e){let t=await this.getLiteralValue(e,q.Namespace.EXO.term("Asset_uid"));if(!t)return null;let r=await this.getLiteralValue(e,q.Namespace.EXO.term("Asset_label"))??"",i=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_variant")),s=i!==null?this.coerceVariant(i,t):void 0,a=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_showIcon")),c=this.coerceBoolean(a),l=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_labelClass")),u=l!==null?this.coerceLabelClass(l,t):void 0,f=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_ariaLabel")),d=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_tooltip")),h=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_keyboardShortcut")),p=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("CommandBindingStyle_source")),y=p!==null?this.coerceStyleSource(p,t):void 0;return{id:t,label:r,variant:s,showIcon:c,labelClass:u,ariaLabel:f??void 0,tooltip:d??void 0,keyboardShortcut:h??void 0,source:y,inline:!1}}coerceVariant(e,t){if(e==null)return;let r=String(e).trim().toLowerCase();if(r!==""){if(Jc.COMMAND_VARIANT_VALUES.includes(r))return r;this.logger.warn(this.capWarning(`CommandBindingStyle variant "${r}" not in whitelist [${Jc.COMMAND_VARIANT_VALUES.join(",")}]; dropped (asset ${t})`))}}coerceLabelClass(e,t){if(e==null)return;let r=String(e).trim().toLowerCase();if(r!==""){if(Jc.LABEL_CLASS_VALUES.includes(r))return r;this.logger.warn(this.capWarning(`CommandBindingStyle labelClass "${r}" not in whitelist [${Jc.LABEL_CLASS_VALUES.join(",")}]; dropped (asset ${t})`))}}coerceStyleSource(e,t){if(e==null)return;let r=String(e).trim().toLowerCase();if(r!==""){if(Jc.STYLE_SOURCE_VALUES.includes(r))return r;this.logger.warn(this.capWarning(`CommandBindingStyle source "${r}" not in whitelist [${Jc.STYLE_SOURCE_VALUES.join(",")}]; dropped (asset ${t})`))}}coerceBoolean(e){if(e===null)return;let t=e.trim().toLowerCase();if(t==="true")return!0;if(t==="false")return!1}capWarning(e){return e.length<=200?e:e.slice(0,197)+"..."}bindingMatches(e,t,r,i){return!!(e.targetAsset&&i&&this.matchesReference(e.targetAsset,i)||e.targetPrototype&&r&&this.matchesReference(e.targetPrototype,r)||e.targetClass&&t&&this.matchesReference(e.targetClass,t))}matchesReference(e,t){let r=this.normalizeWikilink(e),i=this.normalizeWikilink(t);if(r===i)return!0;let s=this.extractPathBasename(i);if(s&&s===r)return!0;let a=this.extractPathBasename(r);if(a&&a===i)return!0;let c=this.extractAlias(t);if(c&&r===c)return!0;let l=this.extractAlias(e);return!!(l&&l===i)}extractPathBasename(e){let t=e.match(/\/([^/]+)\.md$/);return t?t[1]:null}extractAlias(e){let t=e.replace(/["'[\]]/g,"").trim(),r=t.indexOf("|");return r>=0?t.substring(r+1).trim():null}getBindingPriority(e){return e.targetAsset?0:e.targetPrototype?1:2}async loadLinkedPrecondition(e){return this.loadLinkedPreconditionFromProperty(e,q.Namespace.EXOCMD.term("Command_precondition"))}async loadLinkedPreconditionFromProperty(e,t){let r=await this.tripleStore.match(e,t,void 0);if(r.length===0)return null;let i=r[0].object,s=null;if(i instanceof gi.IRI)s=i;else if(i instanceof Vn.Literal){let h=this.normalizeWikilink(i.value);s=await this.findSubjectByUID(h)}if(!s)return null;let a=await this.getLiteralValue(s,q.Namespace.EXO.term("Asset_uid")),c=await this.getLiteralValue(s,q.Namespace.EXO.term("Asset_label"))??"",l=await this.getLiteralValue(s,q.Namespace.EXOCMD.term("Precondition_sparqlAsk")),u=await this.getLiteralValue(s,q.Namespace.EXOCMD.term("Precondition_hostFunction")),f=await this.tripleStore.match(s,q.Namespace.EXOCMD.term("Precondition_query"),void 0),d;if(f.length>0){let h=f[0].object;if(h instanceof gi.IRI){let p=await this.getLiteralValue(h,q.Namespace.EXO.term("Asset_uid"));p&&(d=p)}else h instanceof Vn.Literal&&(d=this.normalizeWikilink(h.value))}return!a||!l&&!u&&!d?null:{id:a,label:c,...l&&{sparqlAsk:l},...u&&{hostFunction:u},...d&&{query:d}}}async loadLinkedGrounding(e,t){if(t>=S1)return null;let r=await this.tripleStore.match(e,q.Namespace.EXOCMD.term("Command_grounding"),void 0);if(r.length===0)return null;let i=r[0].object,s=null;if(i instanceof gi.IRI)s=i;else if(i instanceof Vn.Literal){let a=this.normalizeWikilink(i.value);s=await this.findSubjectByUID(a)}return s?this.loadGroundingDefinition(s,t):null}async loadGroundingDefinition(e,t){if(t>=S1)return null;let r=await this.getLiteralValue(e,q.Namespace.EXO.term("Asset_uid"));if(!r)return null;let i=await this.getLiteralValue(e,q.Namespace.EXO.term("Asset_label"))??"",s=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_type"));if(!s)return null;let a=this.resolveGroundingType(s);if(!a)return null;let c=await this.getObsidianName(e,q.Namespace.EXOCMD.term("Grounding_targetProperty"));if(c&&this.looksLikeUUID(c)){let pe=await this.resolveLabelByUID(c);if(!pe)return this.logger.warn(`Grounding ${r}: targetProperty wikilink UID '${c}' is not resolvable to exo__Asset_label \u2014 grounding skipped (would otherwise write a UUID-named frontmatter key).`),null;c=pe}if(a===b1.GroundingType.SERVICE_CALL){let pe=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_serviceId"));pe&&(c=pe)}let l=await this.getObsidianWikilinkValue(e,q.Namespace.EXOCMD.term("Grounding_targetValue")),u=await this.getObsidianName(e,q.Namespace.EXOCMD.term("Grounding_targetValueRef")),f=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_targetValueLiteral")),d=await this.getObsidianName(e,q.Namespace.EXOCMD.term("Grounding_targetValueSubstitution")),h=null;if(d&&this.looksLikeUUID(d)){let pe=await this.resolveLabelByUID(d);if(!pe)return this.logger.warn(`Grounding ${r}: targetValueSubstitution UID '${d}' is not resolvable to exo__Asset_label (SubstitutionToken instance missing or unlabelled) \u2014 grounding skipped.`),null;h=pe}else d&&(h=d);let p=await this.getObsidianWikilinkValue(e,q.Namespace.EXOCMD.term("Grounding_isDefinedBy")),y=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_sparqlUpdate")),S=await this.getObsidianName(e,q.Namespace.EXOCMD.term("Grounding_targetClass")),v=await this.getObsidianName(e,q.Namespace.EXOCMD.term("Grounding_targetPrototype")),w=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_targetFolder")),T=await this.getObsidianName(e,q.Namespace.EXOCMD.term("Grounding_linkBackProperty")),C=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_inputSchema")),M=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_incrementBy")),$=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_shiftDelta")),ee;if(M!=null&&M!==""){let pe=Number.parseInt(String(M),10);Number.isFinite(pe)&&(ee=pe)}let B=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_propertyDefaults")),z;if(B){let pe;try{pe=JSON.parse(B)}catch(Re){throw new Error(`Grounding ${r}: exocmd__Grounding_propertyDefaults is not valid JSON: ${Re instanceof Error?Re.message:String(Re)}`)}if(typeof pe!="object"||pe===null||Array.isArray(pe))throw new Error(`Grounding ${r}: exocmd__Grounding_propertyDefaults must be a JSON object literal`);let $e={};for(let[Re,ne]of Object.entries(pe)){if(typeof ne!="string")throw new Error(`Grounding ${r}: exocmd__Grounding_propertyDefaults["${Re}"] must be a string (got ${typeof ne})`);$e[Re]=ne}z=$e}let P;a===b1.GroundingType.COMPOSITE&&(P=await this.loadCompositeSteps(e,t+1));let D;if(C)try{let pe=JSON.parse(C);pe?.properties&&(D=Object.entries(pe.properties).map(([$e,Re])=>{let ne=Re.type,Z=ne==="string"?"text":ne,U=Re.defaultValue!==void 0?Re.defaultValue:Re.default,it={name:$e,type:Z,label:Re.title??$e,required:Array.isArray(pe.required)&&pe.required.includes($e)};return U!=null&&(it.defaultValue=String(U)),it}))}catch{}let J=await this.getLiteralValue(e,q.Namespace.EXOCMD.term("Grounding_prefillLabelWithDate")),qe=J!==null&&String(J).trim().toLowerCase()==="true",et={id:r,label:i,type:a,targetProperty:c??void 0,targetValue:l??void 0,targetValueRef:u??void 0,targetValueLiteral:f??void 0,targetValueSubstitution:h??void 0,sparqlUpdate:y??void 0,steps:P,targetClass:S??void 0,targetPrototype:v??void 0,targetFolder:w??void 0,linkBackProperty:T??void 0,incrementBy:ee,shiftDelta:$??void 0,propertyDefaults:z,isDefinedBy:p??void 0,prefillLabelWithDate:qe||void 0};return D&&(et.inputSchema=D),et}async loadCompositeSteps(e,t){if(t>=S1)return[];let r=await this.tripleStore.match(e,q.Namespace.EXOCMD.term("Grounding_steps"),void 0),i=[];for(let s of r){let a=null;if(s.object instanceof gi.IRI)a=s.object;else if(s.object instanceof Vn.Literal){let l=this.normalizeWikilink(s.object.value);a=await this.findSubjectByUID(l)}if(!a)continue;let c=await this.loadGroundingDefinition(a,t);c&&i.push(c)}return i}resolveGroundingType(e){let t=e.toLowerCase().trim();return Object.values(b1.GroundingType).includes(t)?t:null}async findSubjectByUID(e){if(this.tripleStore.findSubjectsByUUID){let r=await this.tripleStore.findSubjectsByUUID(e);if(r.length>0)return r[0]}let t=await this.tripleStore.match(void 0,q.Namespace.EXO.term("Asset_uid"),void 0);for(let r of t)if(r.object instanceof Vn.Literal&&r.object.value===e)return r.subject;return null}async getLiteralValue(e,t){let r=await this.tripleStore.match(e,t,void 0);if(r.length===0)return null;let i=r[0].object;return i instanceof Vn.Literal||i instanceof gi.IRI?i.value:null}looksLikeUUID(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)}async resolveLabelByUID(e){let t=await this.findSubjectByUID(e);return t?this.getLiteralValue(t,q.Namespace.EXO.term("Asset_label")):null}async getLinkedUID(e,t){let r=await this.tripleStore.match(e,t,void 0);if(r.length===0)return null;let i=r[0].object;if(i instanceof gi.IRI){let s=await this.tripleStore.match(i,q.Namespace.EXO.term("Asset_uid"),void 0);return s.length>0&&s[0].object instanceof Vn.Literal?s[0].object.value:i.value.split("/").pop()?.replace(".md","")??null}return i instanceof Vn.Literal?this.normalizeWikilink(i.value):null}async getLinkedValue(e,t){let r=await this.tripleStore.match(e,t,void 0);if(r.length===0)return null;let i=r[0].object;return i instanceof Vn.Literal?this.normalizeWikilink(i.value):i instanceof gi.IRI?this.iriToObsidianName(i.value)??i.value:null}async getObsidianName(e,t){let r=await this.tripleStore.match(e,t,void 0);if(r.length===0)return null;let i=r[0].object;return i instanceof Vn.Literal?this.unwrapWikilink(i.value):i instanceof gi.IRI?this.iriToObsidianName(i.value)??i.value:null}unwrapWikilink(e){if(!e)return e;let t=e.trim().replace(/^"|"$/g,"");if(t.startsWith("http://")||t.startsWith("https://"))return this.iriToObsidianName(t)??t;let r=t.match(/^\[\[([^\]|]+)\|([^\]]+)\]\]$/);if(r)return r[2].trim();let i=t.match(/^\[\[([^\]|]+)\]\]$/);if(i){let s=i[1].trim();return s.startsWith("http://")||s.startsWith("https://")?this.iriToObsidianName(s)??s:s}return t}async getObsidianWikilinkValue(e,t){let r=await this.tripleStore.match(e,t,void 0);if(r.length===0)return null;let i=r[0].object;if(i instanceof Vn.Literal)return this.resolveWikilinkAlias(i.value);if(i instanceof gi.IRI){let s=this.iriToObsidianName(i.value);return s?`"[[${s}]]"`:i.value}return null}async resolveWikilinkAlias(e){let t=e.match(/\[\[([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\]\]/);if(!t)return e;let r=t[1],i=await this.findSubjectByUID(r);if(!i)return e;let s=await this.getLiteralValue(i,q.Namespace.EXO.term("Asset_label"));return s?e.replace(`[[${r}]]`,`[[${r}|${s}]]`):e}iriToObsidianName(e){let t=e.lastIndexOf("#");if(t>=0){let i=e.substring(0,t+1),s=e.substring(t+1);if(i===q.Namespace.EMS.iri.value)return`ems__${s}`;if(i===q.Namespace.EXO.iri.value)return`exo__${s}`;if(i===q.Namespace.EXOCMD.iri.value)return`exocmd__${s}`;if(i===q.Namespace.IMS.iri.value)return`ims__${s}`;if(i===q.Namespace.ZTLK.iri.value)return`ztlk__${s}`;if(i===q.Namespace.PTMS.iri.value)return`ptms__${s}`;if(i===q.Namespace.LIT.iri.value)return`lit__${s}`;if(i===q.Namespace.INBOX.iri.value)return`inbox__${s}`}let r=e.match(/\/([^/]+)\.md$/);return r?r[1]:null}normalizeWikilink(e){let t=e.replace(/["'[\]]/g,"").trim(),r=t.indexOf("|");return r>=0?t.substring(0,r):t}};Gs.CommandResolver=w1;Gs.CommandResolver=w1=o9([(0,l9.injectable)(),c9("design:paramtypes",[Object,Object])],w1)});var E1=b(v1=>{"use strict";Object.defineProperty(v1,"__esModule",{value:!0});v1.validateExoQLAllowlist=p9;var hp=Mu();function p9(n){if(!n||typeof n!="object")return;let e=n;if(e.type==="update"){let t=n.updates??[];for(let r of t)if(r?.type==="load")throw new hp.ExoQLForbiddenKeywordError("LOAD");throw new hp.ExoQLForbiddenKeywordError("UPDATE")}if(e.type==="query"){if(e.from){let t=Array.isArray(e.from.default)&&e.from.default.length>0,r=Array.isArray(e.from.named)&&e.from.named.length>0;if(t||r)throw new hp.ExoQLForbiddenKeywordError("FROM")}if(Array.isArray(e.where))for(let t of e.where)pp(t);if(Array.isArray(e.template))for(let t of e.template)pp(t)}}o(p9,"validateExoQLAllowlist");function pp(n){if(!n||typeof n!="object")return;if(n.type==="service")throw new hp.ExoQLForbiddenKeywordError("SERVICE");if(Array.isArray(n.patterns))for(let t of n.patterns)pp(t);let e=n.where;if(Array.isArray(e))for(let t of e)pp(t)}o(pp,"walkPatternForBannedKeywords")});var T1=b(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});mp.DEFAULT_EVAL_CONFIG=void 0;mp.DEFAULT_EVAL_CONFIG=Object.freeze({enabled:!0,maxNestedEvalCount:100,maxAggregateEvalMillis:1e4})});var x1=b(A1=>{"use strict";Object.defineProperty(A1,"__esModule",{value:!0});A1.evaluateWithExoEval=w9;var m9=Rc(),g9=Pc(),y9=Xc(),_9=E1(),b9=T1(),S9=Mu();async function w9(n,e={}){if(typeof n!="string")throw new TypeError("evaluateWithExoEval: sparql must be a string");let r=new m9.ExoQLParser().parse(n);if((0,_9.validateExoQLAllowlist)(r),!{...b9.DEFAULT_EVAL_CONFIG,...e.config??{}}.enabled)throw new S9.ExoQLEvalDisabledError;let s="queryType"in r&&typeof r.queryType=="string"?r.queryType:"SELECT";if(!e.store)return s==="ASK"?{kind:"ask",result:!1}:s==="CONSTRUCT"?{kind:"construct",triples:[]}:{kind:"select",rows:[]};let c=new g9.ExoQLAlgebraTranslator().translate(r),l=new y9.ExoQLQueryExecutor(e.store);return l.isAskQuery(c)?{kind:"ask",result:await l.executeAsk(c)}:l.isConstructQuery(c)?{kind:"construct",triples:await l.executeConstruct(c)}:{kind:"select",rows:await l.executeAll(c)}}o(w9,"evaluateWithExoEval")});var X3=b(zs=>{"use strict";var v9=zs&&zs.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},E9=zs&&zs.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},Vu;Object.defineProperty(zs,"__esModule",{value:!0});zs.PreconditionEvaluator=void 0;var T9=Ce(),A9=Rc(),x9=Pc(),Y3=Xc(),I9=x1(),Bu=Vu=class{static{o(this,"PreconditionEvaluator")}constructor(e,t){this.hostFunctions=new Map,this.askCache=new Map,this.tripleStore=e,this.queryBodyResolver=t}async evaluate(e,t,r){return e?e.sparqlAsk?this.evaluateSparqlAsk(e.sparqlAsk,t):e.query?this.evaluateQueryRef(e.query,t):e.hostFunction?this.evaluateHostFunction(e.hostFunction,t,r):!0:!0}async evaluateQueryRef(e,t){if(!this.queryBodyResolver)return!1;try{let r=await this.queryBodyResolver.resolveSparql(e);if(!r)return!1;let i=this.substituteVariables(r,t),s=await(0,I9.evaluateWithExoEval)(i,{store:this.tripleStore});return s.kind!=="ask"?!1:s.result}catch{return!1}}registerHostFunction(e,t){this.hostFunctions.set(e,t)}hasHostFunction(e){return this.hostFunctions.has(e)}invalidateCache(){this.askCache.clear()}compileAsk(e){let t=this.substituteVariables(e,Vu.SENTINEL_IRI),i=new A9.ExoQLParser().parse(t),a=new x9.ExoQLAlgebraTranslator().translate(i);return new Y3.ExoQLQueryExecutor(this.tripleStore).isAskQuery(a)?a:null}evaluateHostFunction(e,t,r){let i=this.hostFunctions.get(e);if(!i)return!0;let s=r?{...r,targetIRI:t}:{targetIRI:t};return i(s)}async evaluateSparqlAsk(e,t){try{let r=this.askCache.get(e);if(r===void 0){let a=this.compileAsk(e);if(!a)return!1;r=a,this.askCache.set(e,r)}let i=JSON.parse(JSON.stringify(r).replaceAll(Vu.SENTINEL_IRI,t));return await new Y3.ExoQLQueryExecutor(this.tripleStore).executeAsk(i)}catch{return!1}}substituteVariables(e,t){let r=new Date().toISOString(),i=r.slice(0,10),s=new Date,a=new Date(s.getTime()+Vu.ALMATY_OFFSET_MS),c=a.getUTCFullYear(),l=a.getUTCMonth(),u=a.getUTCDate(),f=a.getUTCDay(),h=new Date(Date.UTC(c,l,u-1)).toISOString().slice(0,10),p=(f+6)%7,y=new Date(Date.UTC(c,l,u-p)),S=y.toISOString().slice(0,10),w=new Date(y.getTime()-10080*60*1e3).toISOString().slice(0,10),T=`${c}-${String(l+1).padStart(2,"0")}-01`,C=l===0?11:l-1,$=`${l===0?c-1:c}-${String(C+1).padStart(2,"0")}-01`,ee=`${c}-01-01`;return e.replace(/\$target/g,`<${t}>`).replace(/\$now/g,`"${r}"^^xsd:dateTime`).replace(/\$yesterday/g,`"${h}"^^xsd:date`).replace(/\$thisWeekStart/g,`"${S}"^^xsd:date`).replace(/\$lastWeekStart/g,`"${w}"^^xsd:date`).replace(/\$thisMonthStart/g,`"${T}"^^xsd:date`).replace(/\$lastMonthStart/g,`"${$}"^^xsd:date`).replace(/\$thisYearStart/g,`"${ee}"^^xsd:date`).replace(/\$today/g,`"${i}"^^xsd:date`)}};zs.PreconditionEvaluator=Bu;Bu.SENTINEL_IRI="urn:exocortex:cache-sentinel:target";Bu.ALMATY_OFFSET_MS=300*60*1e3;zs.PreconditionEvaluator=Bu=Vu=v9([(0,T9.injectable)(),E9("design:paramtypes",[Object,Object])],Bu)});var ls=b(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});gp.FrontmatterService=void 0;var Uu=class n{static{o(this,"FrontmatterService")}parse(e){let t=e.match(n.FRONTMATTER_REGEX);return t?{exists:!0,content:t[1],originalContent:e}:{exists:!1,content:"",originalContent:e}}parseObject(e){let t=this.parse(e);if(!t.exists)return null;let r={},i=t.content.split(/\r?\n/),s=null,a=null,c=o(()=>{s!==null&&a!==null&&(r[s]=a),s=null,a=null},"flushArray");for(let l of i){let u=/^ {2}- (.*)$/.exec(l);if(u){s!==null&&a!==null&&a.push(u[1].trim());continue}c();let f=/^([^:\s][^:]*):\s*(.*)$/.exec(l);if(!f)continue;let d=f[1].trim(),h=f[2].trim();h===""?(s=d,a=[]):r[d]=h}return c(),r}updateProperty(e,t,r){t=n.normalizeIRI(t),typeof r=="string"&&(r=n.normalizeIRIValue(r));let i=this.parse(e),s=this.serializeValue(t,r);if(!i.exists)return`---
71
71
  ${s}
72
72
  ---
73
73
  ${e}`;let a=i.content;if(this.hasProperty(a,t)){let c=new RegExp(`${this.escapeRegex(t)}:.*(?:
@@ -97,7 +97,7 @@ ${i}
97
97
  `;return`---
98
98
  ${r}
99
99
  ---
100
- ${s}`}};wp.MetadataHelpers=F1});var sA=b(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.TASK_DEFAULT_WORKFLOW=Do.PROJECT_DEFAULT_WORKFLOW=void 0;Do.buildWorkflowAssetContent=G9;var iA=Jn(),zu=hu(),we=hc(),Wr=nA(),D1=Ks();Do.PROJECT_DEFAULT_WORKFLOW={id:"a1b2c3d4-1111-4000-a000-000000000001",name:"Project Default Workflow",targetClass:zu.AssetClass.PROJECT,initialState:we.EffortStatus.DRAFT,terminalStates:[we.EffortStatus.DONE,we.EffortStatus.TRASHED],isDefault:!0,states:[{status:we.EffortStatus.DRAFT,order:1,optional:!1,timestampOnEnter:[]},{status:we.EffortStatus.BACKLOG,order:2,optional:!1,timestampOnEnter:[]},{status:we.EffortStatus.ANALYSIS,order:3,optional:!0,timestampOnEnter:[]},{status:we.EffortStatus.TODO,order:4,optional:!0,timestampOnEnter:[]},{status:we.EffortStatus.DOING,order:5,optional:!1,timestampOnEnter:["ems__Effort_startTimestamp"]},{status:we.EffortStatus.DONE,order:6,optional:!1,timestampOnEnter:["ems__Effort_endTimestamp","ems__Effort_resolutionTimestamp"]},{status:we.EffortStatus.TRASHED,order:7,optional:!1,timestampOnEnter:["ems__Effort_resolutionTimestamp"]}],transitions:[{from:we.EffortStatus.DRAFT,to:we.EffortStatus.BACKLOG,label:"\u2192 Backlog",isRollback:!1},{from:we.EffortStatus.BACKLOG,to:we.EffortStatus.ANALYSIS,label:"\u2192 Analysis",isRollback:!1},{from:we.EffortStatus.ANALYSIS,to:we.EffortStatus.TODO,label:"\u2192 ToDo",isRollback:!1},{from:we.EffortStatus.TODO,to:we.EffortStatus.DOING,label:"\u25B6 Start",isRollback:!1},{from:we.EffortStatus.DOING,to:we.EffortStatus.DONE,label:"\u2713 Done",isRollback:!1},{from:we.EffortStatus.BACKLOG,to:we.EffortStatus.DRAFT,label:"\u2190 Draft",isRollback:!0},{from:we.EffortStatus.ANALYSIS,to:we.EffortStatus.BACKLOG,label:"\u2190 Backlog",isRollback:!0},{from:we.EffortStatus.TODO,to:we.EffortStatus.ANALYSIS,label:"\u2190 Analysis",isRollback:!0},{from:we.EffortStatus.DOING,to:we.EffortStatus.TODO,label:"\u2190 ToDo",isRollback:!0},{from:we.EffortStatus.DONE,to:we.EffortStatus.DOING,label:"\u2190 Doing",isRollback:!0}]};Do.TASK_DEFAULT_WORKFLOW={id:"a1b2c3d4-2222-4000-a000-000000000002",name:"Task Default Workflow",targetClass:zu.AssetClass.TASK,initialState:we.EffortStatus.DRAFT,terminalStates:[we.EffortStatus.DONE,we.EffortStatus.TRASHED],isDefault:!0,states:[{status:we.EffortStatus.DRAFT,order:1,optional:!1,timestampOnEnter:[]},{status:we.EffortStatus.BACKLOG,order:2,optional:!1,timestampOnEnter:[]},{status:we.EffortStatus.DOING,order:3,optional:!1,timestampOnEnter:["ems__Effort_startTimestamp"]},{status:we.EffortStatus.DONE,order:4,optional:!1,timestampOnEnter:["ems__Effort_endTimestamp","ems__Effort_resolutionTimestamp"]},{status:we.EffortStatus.TRASHED,order:5,optional:!1,timestampOnEnter:["ems__Effort_resolutionTimestamp"]}],transitions:[{from:we.EffortStatus.DRAFT,to:we.EffortStatus.BACKLOG,label:"\u2192 Backlog",isRollback:!1},{from:we.EffortStatus.BACKLOG,to:we.EffortStatus.DOING,label:"\u25B6 Start",isRollback:!1},{from:we.EffortStatus.DOING,to:we.EffortStatus.DONE,label:"\u2713 Done",isRollback:!1},{from:we.EffortStatus.BACKLOG,to:we.EffortStatus.DRAFT,label:"\u2190 Draft",isRollback:!0},{from:we.EffortStatus.DOING,to:we.EffortStatus.BACKLOG,label:"\u2190 Backlog",isRollback:!0},{from:we.EffortStatus.DONE,to:we.EffortStatus.DOING,label:"\u2190 Doing",isRollback:!0}]};function G9(n){let e=new Date().toISOString(),t=[],r=n.id,i={exo__Asset_uid:r,exo__Asset_label:`"${n.name}"`,exo__Asset_createdAt:e,exo__Instance_class:zu.AssetClass.WORKFLOW,[Wr.WorkflowProperty.TARGET_CLASS]:`"[[${n.targetClass}]]"`,[Wr.WorkflowProperty.INITIAL_STATE]:`"[[${n.initialState}]]"`,[Wr.WorkflowProperty.TERMINAL_STATES]:n.terminalStates.map(s=>`"[[${s}]]"`),[Wr.WorkflowProperty.IS_DEFAULT]:n.isDefault};t.push({filename:`${r}.md`,content:D1.MetadataHelpers.buildFileContent(i)});for(let s of n.states){let a=(0,iA.v4)(),c={exo__Asset_uid:a,exo__Asset_label:`"${n.name} - ${s.status}"`,exo__Asset_createdAt:e,exo__Instance_class:zu.AssetClass.WORKFLOW_STATE,[Wr.WorkflowStateProperty.WORKFLOW]:`"[[${r}]]"`,[Wr.WorkflowStateProperty.STATUS]:`"[[${s.status}]]"`,[Wr.WorkflowStateProperty.ORDER]:s.order,[Wr.WorkflowStateProperty.OPTIONAL]:s.optional};s.timestampOnEnter.length>0&&(c[Wr.WorkflowStateProperty.TIMESTAMP_ON_ENTER]=s.timestampOnEnter),s.badgeColor&&(c[Wr.WorkflowStateProperty.BADGE_COLOR]=`"${s.badgeColor}"`),t.push({filename:`${a}.md`,content:D1.MetadataHelpers.buildFileContent(c)})}for(let s of n.transitions){let a=(0,iA.v4)(),c={exo__Asset_uid:a,exo__Asset_label:`"${n.name} - ${s.label}"`,exo__Asset_createdAt:e,exo__Instance_class:zu.AssetClass.WORKFLOW_TRANSITION,[Wr.WorkflowTransitionProperty.WORKFLOW]:`"[[${r}]]"`,[Wr.WorkflowTransitionProperty.FROM]:`"[[${s.from}]]"`,[Wr.WorkflowTransitionProperty.TO]:`"[[${s.to}]]"`,[Wr.WorkflowTransitionProperty.LABEL]:`"${s.label}"`,[Wr.WorkflowTransitionProperty.IS_ROLLBACK]:s.isRollback};s.icon&&(c[Wr.WorkflowTransitionProperty.ICON]=`"${s.icon}"`),t.push({filename:`${a}.md`,content:D1.MetadataHelpers.buildFileContent(c)})}return t}o(G9,"buildWorkflowAssetContent")});var L1=b(Ys=>{"use strict";var z9=Ys&&Ys.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},H9=Ys&&Ys.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.WorkflowResolver=void 0;var Q9=Ce(),Hu=Ee(),fn=je(),vt=ar(),No=hu(),vp=hc(),aA=sA(),N1=class{static{o(this,"WorkflowResolver")}constructor(e){this.tripleStore=e,this.cache=new Map}async resolveForClass(e){let t=`class:${e}`,r=this.cache.get(t);if(r)return r;let s=await this.findDefaultWorkflow(e)??this.getHardcodedFallback(e);return this.cache.set(t,s),s}async resolveForAsset(e,t){let r=await this.tripleStore.match(e,vt.Namespace.EMS.term("Effort_workflow"),void 0);if(r.length>0){let i=r[0].object;if(i instanceof Hu.IRI){let s=await this.loadWorkflowBySubject(i);if(s)return s}}return this.resolveForClass(t)}invalidateCache(){this.cache.clear()}async findDefaultWorkflow(e){let t=await this.tripleStore.match(void 0,vt.Namespace.RDF.term("type"),vt.Namespace.EMS.term("Workflow"));for(let r of t){let i=r.subject;if(!(!(await this.tripleStore.match(i,vt.Namespace.EMS.term("Workflow_targetClass"),void 0)).some(u=>{let f=u.object;return f instanceof Hu.IRI?f.value.endsWith(e.replace(/^ems__/,"")):f instanceof fn.Literal?this.normalizeWikilink(f.value)===e:!1})||!(await this.tripleStore.match(i,vt.Namespace.EMS.term("Workflow_isDefault"),void 0)).some(u=>{let f=u.object instanceof fn.Literal?u.object.value:"";return f==="true"||f==="1"})))return this.loadWorkflowBySubject(i)}return null}async loadWorkflowBySubject(e){let t=await this.tripleStore.match(e,vt.Namespace.EXO.term("Asset_label"),void 0),r=t.length>0&&t[0].object instanceof fn.Literal?t[0].object.value:"Unknown Workflow",i=await this.tripleStore.match(e,vt.Namespace.EXO.term("Asset_uid"),void 0),s=i.length>0&&i[0].object instanceof fn.Literal?i[0].object.value:e.value,a=await this.tripleStore.match(e,vt.Namespace.EMS.term("Workflow_targetClass"),void 0),c=this.resolveAssetClass(a),l=await this.tripleStore.match(e,vt.Namespace.EMS.term("Workflow_initialState"),void 0),u=this.resolveEffortStatus(l)??vp.EffortStatus.DRAFT,f=await this.tripleStore.match(e,vt.Namespace.EMS.term("Workflow_terminalStates"),void 0),d=this.resolveEffortStatuses(f),p=(await this.tripleStore.match(e,vt.Namespace.EMS.term("Workflow_isDefault"),void 0)).some(v=>{let w=v.object instanceof fn.Literal?v.object.value:"";return w==="true"||w==="1"}),y=await this.loadStates(e),S=await this.loadTransitions(e);return y.length===0&&S.length===0?null:{id:s,name:r,targetClass:c,states:y,transitions:S,initialState:u,terminalStates:d.length>0?d:[vp.EffortStatus.DONE,vp.EffortStatus.TRASHED],isDefault:p}}async loadStates(e){let t=await this.tripleStore.match(void 0,vt.Namespace.RDF.term("type"),vt.Namespace.EMS.term("WorkflowState")),r=[];for(let i of t){let s=i.subject;if(!(await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowState_workflow"),void 0)).some(T=>this.isSameSubject(T.object,e)))continue;let l=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowState_status"),void 0),u=this.resolveEffortStatus(l);if(!u)continue;let f=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowState_order"),void 0),d=f.length>0&&f[0].object instanceof fn.Literal&&parseInt(f[0].object.value,10)||0,p=(await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowState_optional"),void 0)).some(T=>{let C=T.object instanceof fn.Literal?T.object.value:"";return C==="true"||C==="1"}),S=(await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowState_timestampOnEnter"),void 0)).map(T=>T.object instanceof fn.Literal?T.object.value:"").filter(T=>T.length>0),v=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowState_badgeColor"),void 0),w=v.length>0&&v[0].object instanceof fn.Literal?v[0].object.value:void 0;r.push({status:u,order:d,optional:p,timestampOnEnter:S,badgeColor:w})}return r.sort((i,s)=>i.order-s.order)}async loadTransitions(e){let t=await this.tripleStore.match(void 0,vt.Namespace.RDF.term("type"),vt.Namespace.EMS.term("WorkflowTransition")),r=[];for(let i of t){let s=i.subject;if(!(await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowTransition_workflow"),void 0)).some(T=>this.isSameSubject(T.object,e)))continue;let l=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowTransition_from"),void 0),u=this.resolveEffortStatus(l),f=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowTransition_to"),void 0),d=this.resolveEffortStatus(f);if(!u||!d)continue;let h=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowTransition_label"),void 0),p=h.length>0&&h[0].object instanceof fn.Literal?h[0].object.value:`${u} \u2192 ${d}`,y=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowTransition_icon"),void 0),S=y.length>0&&y[0].object instanceof fn.Literal?y[0].object.value:void 0,w=(await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowTransition_isRollback"),void 0)).some(T=>{let C=T.object instanceof fn.Literal?T.object.value:"";return C==="true"||C==="1"});r.push({from:u,to:d,label:p,icon:S,isRollback:w})}return r}normalizeWikilink(e){return e.replace(/["'[\]]/g,"").trim()}resolveAssetClass(e){if(e.length===0)return No.AssetClass.TASK;let t=e[0].object;if(t instanceof Hu.IRI){let i=`ems__${t.value.split("#").pop()??""}`;return Object.values(No.AssetClass).includes(i)?i:No.AssetClass.TASK}if(t instanceof fn.Literal){let r=this.normalizeWikilink(t.value);return Object.values(No.AssetClass).includes(r)?r:No.AssetClass.TASK}return No.AssetClass.TASK}resolveEffortStatus(e){if(e.length===0)return null;let t=e[0].object,r;if(t instanceof Hu.IRI)r=`ems__${t.value.split("#").pop()??""}`;else if(t instanceof fn.Literal)r=this.normalizeWikilink(t.value);else return null;return Object.values(vp.EffortStatus).includes(r)?r:null}resolveEffortStatuses(e){return e.map(t=>this.resolveEffortStatus([t])).filter(t=>t!==null)}isSameSubject(e,t){if(e instanceof Hu.IRI)return e.value===t.value;if(e instanceof fn.Literal){let r=this.normalizeWikilink(e.value);return t.value.includes(r)}return!1}getHardcodedFallback(e){return e===No.AssetClass.PROJECT?{...aA.PROJECT_DEFAULT_WORKFLOW}:{...aA.TASK_DEFAULT_WORKFLOW}}};Ys.WorkflowResolver=N1;Ys.WorkflowResolver=N1=z9([(0,Q9.injectable)(),H9("design:paramtypes",[Object])],N1)});var $1=b(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.TransactionError=Na.TripleNotFoundError=Na.TripleAlreadyExistsError=void 0;var k1=class extends Error{static{o(this,"TripleAlreadyExistsError")}constructor(e){super(`Triple already exists: ${e.toString()}`),this.name="TripleAlreadyExistsError"}};Na.TripleAlreadyExistsError=k1;var j1=class extends Error{static{o(this,"TripleNotFoundError")}constructor(e){super(`Triple not found: ${e.toString()}`),this.name="TripleNotFoundError"}};Na.TripleNotFoundError=j1;var M1=class extends Error{static{o(this,"TransactionError")}constructor(e){super(e),this.name="TransactionError"}};Na.TransactionError=M1});var Tp=b(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});Ep.LRUCache=void 0;var V1=class{static{o(this,"LRUCache")}constructor(e){this.maxSize=e,this.cache=new Map}get(e){let t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}};Ep.LRUCache=V1});var q1=b(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0});xp.InMemoryTripleStore=void 0;var La=$1(),Ap=Ee(),K9=$t(),Y9=je(),X9=ar(),J9=Tp(),Z9=X9.Namespace.XSD.term("string").value,e5=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,Zc="__default__",B1=class n{static{o(this,"InMemoryTripleStore")}constructor(){this.triples=new Map,this.spo=new Map,this.sop=new Map,this.pso=new Map,this.pos=new Map,this.osp=new Map,this.ops=new Map,this.queryCache=new J9.LRUCache(1e3),this.uuidIndex=new Map,this.namedGraphs=new Map}async add(e){let t=this.getTripleKey(e);if(this.triples.has(t))return;this.triples.set(t,e);let r=this.getNodeKey(e.subject),i=this.getNodeKey(e.predicate),s=this.getNodeKey(e.object);this.addToIndex(this.spo,r,i,s),this.addToIndex(this.sop,r,s,i),this.addToIndex(this.pso,i,r,s),this.addToIndex(this.pos,i,s,r),this.addToIndex(this.osp,s,r,i),this.addToIndex(this.ops,s,i,r),this.addToUUIDIndex(e.subject),this.queryCache.clear()}async remove(e){let t=this.getTripleKey(e);if(!this.triples.has(t))return!1;this.triples.delete(t);let r=this.getNodeKey(e.subject),i=this.getNodeKey(e.predicate),s=this.getNodeKey(e.object);return this.removeFromIndex(this.spo,r,i,s),this.removeFromIndex(this.sop,r,s,i),this.removeFromIndex(this.pso,i,r,s),this.removeFromIndex(this.pos,i,s,r),this.removeFromIndex(this.osp,s,r,i),this.removeFromIndex(this.ops,s,i,r),this.queryCache.clear(),!0}async has(e){let t=this.getTripleKey(e);return this.triples.has(t)}async match(e,t,r){let i=this.getMatchCacheKey(e,t,r),s=this.queryCache.get(i);if(s!==void 0)return s;let a;return!e&&!t&&!r?a=Array.from(this.triples.values()):e&&t&&r?a=this.matchSPO(e,t,r):e&&t?a=this.matchSP(e,t):e&&r?a=this.matchSO(e,r):t&&r?a=this.matchPO(t,r):e?a=this.matchS(e):t?a=this.matchP(t):r?a=this.matchO(r):a=[],this.queryCache.set(i,a),a}async addAll(e){for(let t of e)await this.add(t)}async removeAll(e){let t=0;for(let r of e)await this.remove(r)&&t++;return t}async clear(){this.triples.clear(),this.spo.clear(),this.sop.clear(),this.pso.clear(),this.pos.clear(),this.osp.clear(),this.ops.clear(),this.uuidIndex.clear(),this.queryCache.clear()}async count(){return this.triples.size}async subjects(){let e=new Set;for(let t of this.triples.values())e.add(t.subject);return Array.from(e)}async predicates(){let e=new Set;for(let t of this.triples.values())e.add(t.predicate);return Array.from(e)}async objects(){let e=new Set;for(let t of this.triples.values())e.add(t.object);return Array.from(e)}async beginTransaction(){return new U1(this)}async findSubjectsByUUID(e){return this.findSubjectsByUUIDSync(e)}findSubjectsByUUIDSync(e){let t=e.toLowerCase(),r=this.uuidIndex.get(t);if(!r||r.size===0)return[];let i=[];for(let s of r)this.spo.has(`i:${s}`)&&i.push(new Ap.IRI(s));return i}addToUUIDIndex(e){if(!(e instanceof Ap.IRI))return;let t=e.value,r=t.match(e5);if(r)for(let i of r){let s=i.toLowerCase();this.uuidIndex.has(s)||this.uuidIndex.set(s,new Set),this.uuidIndex.get(s).add(t)}}matchSPO(e,t,r){let i=this.getNodeKey(e),s=this.getNodeKey(t),a=this.getNodeKey(r),c=this.spo.get(i);if(!c)return[];let l=c.get(s);if(!l)return[];if(l.has(a)){let u=this.buildTripleKey(i,s,a),f=this.triples.get(u);return f?[f]:[]}return[]}matchSP(e,t){let r=this.getNodeKey(e),i=this.getNodeKey(t),s=this.spo.get(r);if(!s)return[];let a=s.get(i);return a?this.getTriplesByKeys(Array.from(a).map(c=>this.buildTripleKey(r,i,c))):[]}matchSO(e,t){let r=this.getNodeKey(e),i=this.getNodeKey(t),s=this.sop.get(r);if(!s)return[];let a=s.get(i);return a?this.getTriplesByKeys(Array.from(a).map(c=>this.buildTripleKey(r,c,i))):[]}matchPO(e,t){let r=this.getNodeKey(e),i=this.getNodeKey(t),s=this.pos.get(r);if(!s)return[];let a=s.get(i);return a?this.getTriplesByKeys(Array.from(a).map(c=>this.buildTripleKey(c,r,i))):[]}matchS(e){let t=this.getNodeKey(e),r=this.spo.get(t);if(!r)return[];let i=[];for(let[s,a]of r.entries())for(let c of a)i.push(this.buildTripleKey(t,s,c));return this.getTriplesByKeys(i)}matchP(e){let t=this.getNodeKey(e),r=this.pso.get(t);if(!r)return[];let i=[];for(let[s,a]of r.entries())for(let c of a)i.push(this.buildTripleKey(s,t,c));return this.getTriplesByKeys(i)}matchO(e){let t=this.getNodeKey(e),r=this.osp.get(t);if(!r)return[];let i=[];for(let[s,a]of r.entries())for(let c of a)i.push(this.buildTripleKey(s,c,t));return this.getTriplesByKeys(i)}getTriplesByKeys(e){let t=[];for(let r of e){let i=this.triples.get(r);i&&t.push(i)}return t}addToIndex(e,t,r,i){e.has(t)||e.set(t,new Map);let s=e.get(t);s.has(r)||s.set(r,new Set),s.get(r).add(i)}removeFromIndex(e,t,r,i){let s=e.get(t);if(!s)return;let a=s.get(r);a&&(a.delete(i),a.size===0&&s.delete(r),s.size===0&&e.delete(t))}getTripleKey(e){let t=this.getNodeKey(e.subject),r=this.getNodeKey(e.predicate),i=this.getNodeKey(e.object);return this.buildTripleKey(t,r,i)}buildTripleKey(e,t,r){return`${e}|${t}|${r}`}getNodeKey(e){if(e instanceof Ap.IRI)return`i:${e.value}`;if(e instanceof K9.BlankNode)return`b:${e.id}`;if(e instanceof Y9.Literal){let t=`l:${e.value}`;return e.datatype&&e.datatype.value!==Z9?t+=`^^${e.datatype.value}`:e.language&&(t+=`@${e.language}`),t}return""}getMatchCacheKey(e,t,r){let i=e?this.getNodeKey(e):"?",s=t?this.getNodeKey(t):"?",a=r?this.getNodeKey(r):"?";return`${i}|${s}|${a}`}getGraphKey(e){return e?e.value:Zc}getOrCreateGraphStore(e){let t=this.getGraphKey(e);return t===Zc?this:(this.namedGraphs.has(t)||this.namedGraphs.set(t,new n),this.namedGraphs.get(t))}async addToGraph(e,t){await this.getOrCreateGraphStore(t).add(e)}async removeFromGraph(e,t){let r=this.getGraphKey(t);if(r===Zc)return this.remove(e);let i=this.namedGraphs.get(r);return i?i.remove(e):!1}async matchInGraph(e,t,r,i){let s=this.getGraphKey(i);if(s===Zc)return this.match(e,t,r);let a=this.namedGraphs.get(s);return a?a.match(e,t,r):[]}async getNamedGraphs(){return Array.from(this.namedGraphs.keys()).map(e=>new Ap.IRI(e))}async hasGraph(e){let t=this.namedGraphs.get(e.value);return t?await t.count()>0:!1}async clearGraph(e){let t=this.getGraphKey(e);if(t===Zc){await this.clear();return}let r=this.namedGraphs.get(t);r&&(await r.clear(),this.namedGraphs.delete(t))}async countInGraph(e){let t=this.getGraphKey(e);if(t===Zc)return this.count();let r=this.namedGraphs.get(t);return r?r.count():0}};xp.InMemoryTripleStore=B1;var U1=class{static{o(this,"InMemoryTransaction")}constructor(e){this.store=e,this.operations=[],this.committed=!1,this.rolledBack=!1}async add(e){if(this.committed)throw new La.TransactionError("Transaction already committed");if(this.rolledBack)throw new La.TransactionError("Transaction already rolled back");this.operations.push({type:"add",triple:e})}async remove(e){if(this.committed)throw new La.TransactionError("Transaction already committed");if(this.rolledBack)throw new La.TransactionError("Transaction already rolled back");return this.operations.push({type:"remove",triple:e}),!0}async commit(){if(this.committed)throw new La.TransactionError("Transaction already committed");if(this.rolledBack)throw new La.TransactionError("Transaction already rolled back");for(let e of this.operations)e.type==="add"?await this.store.add(e.triple):await this.store.remove(e.triple);this.committed=!0,this.operations=[]}async rollback(){if(this.committed)throw new La.TransactionError("Transaction already committed");if(this.rolledBack)throw new La.TransactionError("Transaction already rolled back");this.operations=[],this.rolledBack=!0}}});var Cp=b(Xs=>{"use strict";var t5=Xs&&Xs.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},r5=Xs&&Xs.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)};Object.defineProperty(Xs,"__esModule",{value:!0});Xs.EffortStatusWorkflow=void 0;var n5=Ce(),Ip=kn(),i5=Gu(),s5=L1(),a5=q1(),W1=class{static{o(this,"EffortStatusWorkflow")}constructor(){this.resolver=new s5.WorkflowResolver(new a5.InMemoryTripleStore)}getPreviousStatus(e,t){let r=this.normalizeStatus(e),i=this.resolveDefinition(t),s=new i5.WorkflowEngine(i);if(s.isInitialState(r))return null;let a=s.getPreviousStatus(r);if(a!==null)return this.wrapStatus(a)}normalizeStatus(e){return e.replace(/["'[\]]/g,"").trim()}wrapStatus(e){return`"[[${e}]]"`}resolveDefinition(e){return this.hasInstanceClass(e,Ip.AssetClass.TASK)||this.hasInstanceClass(e,Ip.AssetClass.MEETING)?this.resolver.getHardcodedFallback(Ip.AssetClass.TASK):this.resolver.getHardcodedFallback(Ip.AssetClass.PROJECT)}hasInstanceClass(e,t){return e?(Array.isArray(e)?e:[e]).some(i=>i.replace(/["'[\]]/g,"").trim()===t):!1}};Xs.EffortStatusWorkflow=W1;Xs.EffortStatusWorkflow=W1=t5([(0,n5.injectable)(),r5("design:paramtypes",[])],W1)});var Rt=b(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});Rp.DI_TOKENS=void 0;Rp.DI_TOKENS={IFileSystemAdapter:Symbol.for("IFileSystemAdapter"),IVaultAdapter:Symbol.for("IVaultAdapter"),IVaultContext:Symbol.for("IVaultContext"),IMultiVaultManager:Symbol.for("IMultiVaultManager"),ILogger:Symbol.for("ILogger"),IEventBus:Symbol.for("IEventBus"),IConfiguration:Symbol.for("IConfiguration"),INotificationService:Symbol.for("INotificationService"),AreaCreationService:Symbol.for("AreaCreationService"),ClassCreationService:Symbol.for("ClassCreationService"),ConceptCreationService:Symbol.for("ConceptCreationService"),SupervisionCreationService:Symbol.for("SupervisionCreationService"),GenericAssetCreationService:Symbol.for("GenericAssetCreationService"),DynamicFrontmatterGenerator:Symbol.for("DynamicFrontmatterGenerator"),AlgorithmExtractor:Symbol.for("AlgorithmExtractor"),TaskStatusService:Symbol.for("TaskStatusService"),EffortStatusWorkflow:Symbol.for("EffortStatusWorkflow"),StatusTimestampService:Symbol.for("StatusTimestampService"),PropertyCleanupService:Symbol.for("PropertyCleanupService"),FolderRepairService:Symbol.for("FolderRepairService"),LabelToAliasService:Symbol.for("LabelToAliasService"),RenameToUidService:Symbol.for("RenameToUidService"),PlanningService:Symbol.for("PlanningService"),EffortVotingService:Symbol.for("EffortVotingService"),SessionEventService:Symbol.for("SessionEventService"),CriticalityZoneService:Symbol.for("CriticalityZoneService"),AssetConversionService:Symbol.for("AssetConversionService"),NoteToRDFConverter:Symbol.for("NoteToRDFConverter"),IVaultSettings:Symbol.for("IVaultSettings"),AreaHierarchyBuilder:Symbol.for("AreaHierarchyBuilder"),URIConstructionService:Symbol.for("URIConstructionService"),ClassHierarchyResolver:Symbol.for("ClassHierarchyResolver")}});var Op=b(_i=>{"use strict";var o5=_i&&_i.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},c5=_i&&_i.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},l5=_i&&_i.__param||function(n,e){return function(t,r){e(t,r,n)}};Object.defineProperty(_i,"__esModule",{value:!0});_i.StatusTimestampService=void 0;var oA=Ce(),u5=ls(),el=In(),f5=Rt(),G1=class{static{o(this,"StatusTimestampService")}constructor(e){this.vault=e,this.frontmatterService=new u5.FrontmatterService}async addStartTimestamp(e){let t=await this.vault.read(e),r=el.DateFormatter.toLocalTimestamp(new Date),i=this.frontmatterService.updateProperty(t,"ems__Effort_startTimestamp",r);await this.vault.modify(e,i)}async addEndTimestamp(e,t){let r=await this.vault.read(e),i=t||new Date,s=el.DateFormatter.toLocalTimestamp(i),a=this.frontmatterService.updateProperty(r,"ems__Effort_endTimestamp",s);await this.vault.modify(e,a)}async addResolutionTimestamp(e){let t=await this.vault.read(e),r=el.DateFormatter.toLocalTimestamp(new Date),i=this.frontmatterService.updateProperty(t,"ems__Effort_resolutionTimestamp",r);await this.vault.modify(e,i)}async addReviewTimestamp(e){let t=await this.vault.read(e),r=el.DateFormatter.toLocalTimestamp(new Date),i=this.frontmatterService.updateProperty(t,"ems__Effort_lastReviewTimestamp",r);await this.vault.modify(e,i)}async addEndAndResolutionTimestamps(e,t){let r=await this.vault.read(e),i=t||new Date,s=el.DateFormatter.toLocalTimestamp(i),a=this.frontmatterService.updateProperty(r,"ems__Effort_endTimestamp",s);a=this.frontmatterService.updateProperty(a,"ems__Effort_resolutionTimestamp",s),await this.vault.modify(e,a)}async removeStartTimestamp(e){let t=await this.vault.read(e),r=this.frontmatterService.removeProperty(t,"ems__Effort_startTimestamp");await this.vault.modify(e,r)}async removeEndTimestamp(e){let t=await this.vault.read(e),r=this.frontmatterService.removeProperty(t,"ems__Effort_endTimestamp");await this.vault.modify(e,r)}async removeResolutionTimestamp(e){let t=await this.vault.read(e),r=this.frontmatterService.removeProperty(t,"ems__Effort_resolutionTimestamp");await this.vault.modify(e,r)}async removeEndAndResolutionTimestamps(e){let t=await this.vault.read(e),r=this.frontmatterService.removeProperty(t,"ems__Effort_endTimestamp");r=this.frontmatterService.removeProperty(r,"ems__Effort_resolutionTimestamp"),await this.vault.modify(e,r)}async shiftPlannedEndTimestamp(e,t){let r=await this.vault.read(e),i=this.frontmatterService.parse(r);if(!i.exists)return;let s=this.frontmatterService.getPropertyValue(i.content,"ems__Effort_plannedEndTimestamp");if(!s)return;let a=new Date(s.replace(/["']/g,""));if(isNaN(a.getTime()))return;let c=new Date(a.getTime()+t),l=el.DateFormatter.toLocalTimestamp(c),u=this.frontmatterService.updateProperty(r,"ems__Effort_plannedEndTimestamp",l);await this.vault.modify(e,u)}};_i.StatusTimestampService=G1;_i.StatusTimestampService=G1=o5([(0,oA.injectable)(),l5(0,(0,oA.inject)(f5.DI_TOKENS.IVaultAdapter)),c5("design:paramtypes",[Object])],G1)});var H1=b(bi=>{"use strict";var d5=bi&&bi.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},h5=bi&&bi.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},p5=bi&&bi.__param||function(n,e){return function(t,r){e(t,r,n)}};Object.defineProperty(bi,"__esModule",{value:!0});bi.TaskStatusService=void 0;var cA=Ce(),m5=ls(),Lo=In(),g5=Cp(),y5=Op(),_5=Rt(),z1=class{static{o(this,"TaskStatusService")}constructor(e,t,r){this.vault=e,this.workflow=t,this.timestampService=r,this.frontmatterService=new m5.FrontmatterService}async setDraftStatus(e){await this.updateStatus(e,"ems__EffortStatusDraft")}async moveToBacklog(e){await this.updateStatus(e,"ems__EffortStatusBacklog")}async moveToAnalysis(e){await this.updateStatus(e,"ems__EffortStatusAnalysis")}async moveToToDo(e){await this.updateStatus(e,"ems__EffortStatusToDo")}async startEffort(e){let t=await this.vault.read(e),r=Lo.DateFormatter.toLocalTimestamp(new Date),i=this.frontmatterService.updateProperty(t,"ems__Effort_status",'"[[ems__EffortStatusDoing]]"');i=this.frontmatterService.updateProperty(i,"ems__Effort_startTimestamp",r),await this.vault.modify(e,i)}async markTaskAsDone(e){let t=await this.vault.read(e),r=Lo.DateFormatter.toLocalTimestamp(new Date),i=this.frontmatterService.updateProperty(t,"ems__Effort_status",'"[[ems__EffortStatusDone]]"');i=this.frontmatterService.updateProperty(i,"ems__Effort_endTimestamp",r),i=this.frontmatterService.updateProperty(i,"ems__Effort_resolutionTimestamp",r),await this.vault.modify(e,i)}async syncEffortEndTimestamp(e,t){await this.timestampService.addEndAndResolutionTimestamps(e,t)}async shiftPlannedEndTimestamp(e,t){await this.timestampService.shiftPlannedEndTimestamp(e,t)}async trashEffort(e,t){let r=await this.vault.read(e),i=Lo.DateFormatter.toLocalTimestamp(new Date),s=this.frontmatterService.updateProperty(r,"ems__Effort_status",'"[[ems__EffortStatusTrashed]]"');s=this.frontmatterService.updateProperty(s,"ems__Effort_resolutionTimestamp",i),t&&(s=this.appendTrashReason(s,t)),await this.vault.modify(e,s)}appendTrashReason(e,t){let r=`
100
+ ${s}`}};wp.MetadataHelpers=F1});var sA=b(Do=>{"use strict";Object.defineProperty(Do,"__esModule",{value:!0});Do.TASK_DEFAULT_WORKFLOW=Do.PROJECT_DEFAULT_WORKFLOW=void 0;Do.buildWorkflowAssetContent=G9;var iA=Jn(),zu=hu(),ve=hc(),Wr=nA(),D1=Ks();Do.PROJECT_DEFAULT_WORKFLOW={id:"a1b2c3d4-1111-4000-a000-000000000001",name:"Project Default Workflow",targetClass:zu.AssetClass.PROJECT,initialState:ve.EffortStatus.DRAFT,terminalStates:[ve.EffortStatus.DONE,ve.EffortStatus.TRASHED],isDefault:!0,states:[{status:ve.EffortStatus.DRAFT,order:1,optional:!1,timestampOnEnter:[]},{status:ve.EffortStatus.BACKLOG,order:2,optional:!1,timestampOnEnter:[]},{status:ve.EffortStatus.ANALYSIS,order:3,optional:!0,timestampOnEnter:[]},{status:ve.EffortStatus.TODO,order:4,optional:!0,timestampOnEnter:[]},{status:ve.EffortStatus.DOING,order:5,optional:!1,timestampOnEnter:["ems__Effort_startTimestamp"]},{status:ve.EffortStatus.DONE,order:6,optional:!1,timestampOnEnter:["ems__Effort_endTimestamp","ems__Effort_resolutionTimestamp"]},{status:ve.EffortStatus.TRASHED,order:7,optional:!1,timestampOnEnter:["ems__Effort_resolutionTimestamp"]}],transitions:[{from:ve.EffortStatus.DRAFT,to:ve.EffortStatus.BACKLOG,label:"\u2192 Backlog",isRollback:!1},{from:ve.EffortStatus.BACKLOG,to:ve.EffortStatus.ANALYSIS,label:"\u2192 Analysis",isRollback:!1},{from:ve.EffortStatus.ANALYSIS,to:ve.EffortStatus.TODO,label:"\u2192 ToDo",isRollback:!1},{from:ve.EffortStatus.TODO,to:ve.EffortStatus.DOING,label:"\u25B6 Start",isRollback:!1},{from:ve.EffortStatus.DOING,to:ve.EffortStatus.DONE,label:"\u2713 Done",isRollback:!1},{from:ve.EffortStatus.BACKLOG,to:ve.EffortStatus.DRAFT,label:"\u2190 Draft",isRollback:!0},{from:ve.EffortStatus.ANALYSIS,to:ve.EffortStatus.BACKLOG,label:"\u2190 Backlog",isRollback:!0},{from:ve.EffortStatus.TODO,to:ve.EffortStatus.ANALYSIS,label:"\u2190 Analysis",isRollback:!0},{from:ve.EffortStatus.DOING,to:ve.EffortStatus.TODO,label:"\u2190 ToDo",isRollback:!0},{from:ve.EffortStatus.DONE,to:ve.EffortStatus.DOING,label:"\u2190 Doing",isRollback:!0}]};Do.TASK_DEFAULT_WORKFLOW={id:"a1b2c3d4-2222-4000-a000-000000000002",name:"Task Default Workflow",targetClass:zu.AssetClass.TASK,initialState:ve.EffortStatus.DRAFT,terminalStates:[ve.EffortStatus.DONE,ve.EffortStatus.TRASHED],isDefault:!0,states:[{status:ve.EffortStatus.DRAFT,order:1,optional:!1,timestampOnEnter:[]},{status:ve.EffortStatus.BACKLOG,order:2,optional:!1,timestampOnEnter:[]},{status:ve.EffortStatus.DOING,order:3,optional:!1,timestampOnEnter:["ems__Effort_startTimestamp"]},{status:ve.EffortStatus.DONE,order:4,optional:!1,timestampOnEnter:["ems__Effort_endTimestamp","ems__Effort_resolutionTimestamp"]},{status:ve.EffortStatus.TRASHED,order:5,optional:!1,timestampOnEnter:["ems__Effort_resolutionTimestamp"]}],transitions:[{from:ve.EffortStatus.DRAFT,to:ve.EffortStatus.BACKLOG,label:"\u2192 Backlog",isRollback:!1},{from:ve.EffortStatus.BACKLOG,to:ve.EffortStatus.DOING,label:"\u25B6 Start",isRollback:!1},{from:ve.EffortStatus.DOING,to:ve.EffortStatus.DONE,label:"\u2713 Done",isRollback:!1},{from:ve.EffortStatus.BACKLOG,to:ve.EffortStatus.DRAFT,label:"\u2190 Draft",isRollback:!0},{from:ve.EffortStatus.DOING,to:ve.EffortStatus.BACKLOG,label:"\u2190 Backlog",isRollback:!0},{from:ve.EffortStatus.DONE,to:ve.EffortStatus.DOING,label:"\u2190 Doing",isRollback:!0}]};function G9(n){let e=new Date().toISOString(),t=[],r=n.id,i={exo__Asset_uid:r,exo__Asset_label:`"${n.name}"`,exo__Asset_createdAt:e,exo__Instance_class:zu.AssetClass.WORKFLOW,[Wr.WorkflowProperty.TARGET_CLASS]:`"[[${n.targetClass}]]"`,[Wr.WorkflowProperty.INITIAL_STATE]:`"[[${n.initialState}]]"`,[Wr.WorkflowProperty.TERMINAL_STATES]:n.terminalStates.map(s=>`"[[${s}]]"`),[Wr.WorkflowProperty.IS_DEFAULT]:n.isDefault};t.push({filename:`${r}.md`,content:D1.MetadataHelpers.buildFileContent(i)});for(let s of n.states){let a=(0,iA.v4)(),c={exo__Asset_uid:a,exo__Asset_label:`"${n.name} - ${s.status}"`,exo__Asset_createdAt:e,exo__Instance_class:zu.AssetClass.WORKFLOW_STATE,[Wr.WorkflowStateProperty.WORKFLOW]:`"[[${r}]]"`,[Wr.WorkflowStateProperty.STATUS]:`"[[${s.status}]]"`,[Wr.WorkflowStateProperty.ORDER]:s.order,[Wr.WorkflowStateProperty.OPTIONAL]:s.optional};s.timestampOnEnter.length>0&&(c[Wr.WorkflowStateProperty.TIMESTAMP_ON_ENTER]=s.timestampOnEnter),s.badgeColor&&(c[Wr.WorkflowStateProperty.BADGE_COLOR]=`"${s.badgeColor}"`),t.push({filename:`${a}.md`,content:D1.MetadataHelpers.buildFileContent(c)})}for(let s of n.transitions){let a=(0,iA.v4)(),c={exo__Asset_uid:a,exo__Asset_label:`"${n.name} - ${s.label}"`,exo__Asset_createdAt:e,exo__Instance_class:zu.AssetClass.WORKFLOW_TRANSITION,[Wr.WorkflowTransitionProperty.WORKFLOW]:`"[[${r}]]"`,[Wr.WorkflowTransitionProperty.FROM]:`"[[${s.from}]]"`,[Wr.WorkflowTransitionProperty.TO]:`"[[${s.to}]]"`,[Wr.WorkflowTransitionProperty.LABEL]:`"${s.label}"`,[Wr.WorkflowTransitionProperty.IS_ROLLBACK]:s.isRollback};s.icon&&(c[Wr.WorkflowTransitionProperty.ICON]=`"${s.icon}"`),t.push({filename:`${a}.md`,content:D1.MetadataHelpers.buildFileContent(c)})}return t}o(G9,"buildWorkflowAssetContent")});var L1=b(Ys=>{"use strict";var z9=Ys&&Ys.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},H9=Ys&&Ys.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.WorkflowResolver=void 0;var Q9=Ce(),Hu=Ee(),fn=je(),vt=ar(),No=hu(),vp=hc(),aA=sA(),N1=class{static{o(this,"WorkflowResolver")}constructor(e){this.tripleStore=e,this.cache=new Map}async resolveForClass(e){let t=`class:${e}`,r=this.cache.get(t);if(r)return r;let s=await this.findDefaultWorkflow(e)??this.getHardcodedFallback(e);return this.cache.set(t,s),s}async resolveForAsset(e,t){let r=await this.tripleStore.match(e,vt.Namespace.EMS.term("Effort_workflow"),void 0);if(r.length>0){let i=r[0].object;if(i instanceof Hu.IRI){let s=await this.loadWorkflowBySubject(i);if(s)return s}}return this.resolveForClass(t)}invalidateCache(){this.cache.clear()}async findDefaultWorkflow(e){let t=await this.tripleStore.match(void 0,vt.Namespace.RDF.term("type"),vt.Namespace.EMS.term("Workflow"));for(let r of t){let i=r.subject;if(!(!(await this.tripleStore.match(i,vt.Namespace.EMS.term("Workflow_targetClass"),void 0)).some(u=>{let f=u.object;return f instanceof Hu.IRI?f.value.endsWith(e.replace(/^ems__/,"")):f instanceof fn.Literal?this.normalizeWikilink(f.value)===e:!1})||!(await this.tripleStore.match(i,vt.Namespace.EMS.term("Workflow_isDefault"),void 0)).some(u=>{let f=u.object instanceof fn.Literal?u.object.value:"";return f==="true"||f==="1"})))return this.loadWorkflowBySubject(i)}return null}async loadWorkflowBySubject(e){let t=await this.tripleStore.match(e,vt.Namespace.EXO.term("Asset_label"),void 0),r=t.length>0&&t[0].object instanceof fn.Literal?t[0].object.value:"Unknown Workflow",i=await this.tripleStore.match(e,vt.Namespace.EXO.term("Asset_uid"),void 0),s=i.length>0&&i[0].object instanceof fn.Literal?i[0].object.value:e.value,a=await this.tripleStore.match(e,vt.Namespace.EMS.term("Workflow_targetClass"),void 0),c=this.resolveAssetClass(a),l=await this.tripleStore.match(e,vt.Namespace.EMS.term("Workflow_initialState"),void 0),u=this.resolveEffortStatus(l)??vp.EffortStatus.DRAFT,f=await this.tripleStore.match(e,vt.Namespace.EMS.term("Workflow_terminalStates"),void 0),d=this.resolveEffortStatuses(f),p=(await this.tripleStore.match(e,vt.Namespace.EMS.term("Workflow_isDefault"),void 0)).some(v=>{let w=v.object instanceof fn.Literal?v.object.value:"";return w==="true"||w==="1"}),y=await this.loadStates(e),S=await this.loadTransitions(e);return y.length===0&&S.length===0?null:{id:s,name:r,targetClass:c,states:y,transitions:S,initialState:u,terminalStates:d.length>0?d:[vp.EffortStatus.DONE,vp.EffortStatus.TRASHED],isDefault:p}}async loadStates(e){let t=await this.tripleStore.match(void 0,vt.Namespace.RDF.term("type"),vt.Namespace.EMS.term("WorkflowState")),r=[];for(let i of t){let s=i.subject;if(!(await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowState_workflow"),void 0)).some(T=>this.isSameSubject(T.object,e)))continue;let l=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowState_status"),void 0),u=this.resolveEffortStatus(l);if(!u)continue;let f=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowState_order"),void 0),d=f.length>0&&f[0].object instanceof fn.Literal&&parseInt(f[0].object.value,10)||0,p=(await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowState_optional"),void 0)).some(T=>{let C=T.object instanceof fn.Literal?T.object.value:"";return C==="true"||C==="1"}),S=(await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowState_timestampOnEnter"),void 0)).map(T=>T.object instanceof fn.Literal?T.object.value:"").filter(T=>T.length>0),v=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowState_badgeColor"),void 0),w=v.length>0&&v[0].object instanceof fn.Literal?v[0].object.value:void 0;r.push({status:u,order:d,optional:p,timestampOnEnter:S,badgeColor:w})}return r.sort((i,s)=>i.order-s.order)}async loadTransitions(e){let t=await this.tripleStore.match(void 0,vt.Namespace.RDF.term("type"),vt.Namespace.EMS.term("WorkflowTransition")),r=[];for(let i of t){let s=i.subject;if(!(await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowTransition_workflow"),void 0)).some(T=>this.isSameSubject(T.object,e)))continue;let l=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowTransition_from"),void 0),u=this.resolveEffortStatus(l),f=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowTransition_to"),void 0),d=this.resolveEffortStatus(f);if(!u||!d)continue;let h=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowTransition_label"),void 0),p=h.length>0&&h[0].object instanceof fn.Literal?h[0].object.value:`${u} \u2192 ${d}`,y=await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowTransition_icon"),void 0),S=y.length>0&&y[0].object instanceof fn.Literal?y[0].object.value:void 0,w=(await this.tripleStore.match(s,vt.Namespace.EMS.term("WorkflowTransition_isRollback"),void 0)).some(T=>{let C=T.object instanceof fn.Literal?T.object.value:"";return C==="true"||C==="1"});r.push({from:u,to:d,label:p,icon:S,isRollback:w})}return r}normalizeWikilink(e){return e.replace(/["'[\]]/g,"").trim()}resolveAssetClass(e){if(e.length===0)return No.AssetClass.TASK;let t=e[0].object;if(t instanceof Hu.IRI){let i=`ems__${t.value.split("#").pop()??""}`;return Object.values(No.AssetClass).includes(i)?i:No.AssetClass.TASK}if(t instanceof fn.Literal){let r=this.normalizeWikilink(t.value);return Object.values(No.AssetClass).includes(r)?r:No.AssetClass.TASK}return No.AssetClass.TASK}resolveEffortStatus(e){if(e.length===0)return null;let t=e[0].object,r;if(t instanceof Hu.IRI)r=`ems__${t.value.split("#").pop()??""}`;else if(t instanceof fn.Literal)r=this.normalizeWikilink(t.value);else return null;return Object.values(vp.EffortStatus).includes(r)?r:null}resolveEffortStatuses(e){return e.map(t=>this.resolveEffortStatus([t])).filter(t=>t!==null)}isSameSubject(e,t){if(e instanceof Hu.IRI)return e.value===t.value;if(e instanceof fn.Literal){let r=this.normalizeWikilink(e.value);return t.value.includes(r)}return!1}getHardcodedFallback(e){return e===No.AssetClass.PROJECT?{...aA.PROJECT_DEFAULT_WORKFLOW}:{...aA.TASK_DEFAULT_WORKFLOW}}};Ys.WorkflowResolver=N1;Ys.WorkflowResolver=N1=z9([(0,Q9.injectable)(),H9("design:paramtypes",[Object])],N1)});var $1=b(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.TransactionError=Na.TripleNotFoundError=Na.TripleAlreadyExistsError=void 0;var k1=class extends Error{static{o(this,"TripleAlreadyExistsError")}constructor(e){super(`Triple already exists: ${e.toString()}`),this.name="TripleAlreadyExistsError"}};Na.TripleAlreadyExistsError=k1;var j1=class extends Error{static{o(this,"TripleNotFoundError")}constructor(e){super(`Triple not found: ${e.toString()}`),this.name="TripleNotFoundError"}};Na.TripleNotFoundError=j1;var M1=class extends Error{static{o(this,"TransactionError")}constructor(e){super(e),this.name="TransactionError"}};Na.TransactionError=M1});var Tp=b(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});Ep.LRUCache=void 0;var V1=class{static{o(this,"LRUCache")}constructor(e){this.maxSize=e,this.cache=new Map}get(e){let t=this.cache.get(e);return t!==void 0&&(this.cache.delete(e),this.cache.set(e,t)),t}set(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r!==void 0&&this.cache.delete(r)}this.cache.set(e,t)}clear(){this.cache.clear()}size(){return this.cache.size}};Ep.LRUCache=V1});var q1=b(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0});xp.InMemoryTripleStore=void 0;var La=$1(),Ap=Ee(),K9=$t(),Y9=je(),X9=ar(),J9=Tp(),Z9=X9.Namespace.XSD.term("string").value,e5=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,Zc="__default__",B1=class n{static{o(this,"InMemoryTripleStore")}constructor(){this.triples=new Map,this.spo=new Map,this.sop=new Map,this.pso=new Map,this.pos=new Map,this.osp=new Map,this.ops=new Map,this.queryCache=new J9.LRUCache(1e3),this.uuidIndex=new Map,this.namedGraphs=new Map}async add(e){let t=this.getTripleKey(e);if(this.triples.has(t))return;this.triples.set(t,e);let r=this.getNodeKey(e.subject),i=this.getNodeKey(e.predicate),s=this.getNodeKey(e.object);this.addToIndex(this.spo,r,i,s),this.addToIndex(this.sop,r,s,i),this.addToIndex(this.pso,i,r,s),this.addToIndex(this.pos,i,s,r),this.addToIndex(this.osp,s,r,i),this.addToIndex(this.ops,s,i,r),this.addToUUIDIndex(e.subject),this.queryCache.clear()}async remove(e){let t=this.getTripleKey(e);if(!this.triples.has(t))return!1;this.triples.delete(t);let r=this.getNodeKey(e.subject),i=this.getNodeKey(e.predicate),s=this.getNodeKey(e.object);return this.removeFromIndex(this.spo,r,i,s),this.removeFromIndex(this.sop,r,s,i),this.removeFromIndex(this.pso,i,r,s),this.removeFromIndex(this.pos,i,s,r),this.removeFromIndex(this.osp,s,r,i),this.removeFromIndex(this.ops,s,i,r),this.queryCache.clear(),!0}async has(e){let t=this.getTripleKey(e);return this.triples.has(t)}async match(e,t,r){let i=this.getMatchCacheKey(e,t,r),s=this.queryCache.get(i);if(s!==void 0)return s;let a;return!e&&!t&&!r?a=Array.from(this.triples.values()):e&&t&&r?a=this.matchSPO(e,t,r):e&&t?a=this.matchSP(e,t):e&&r?a=this.matchSO(e,r):t&&r?a=this.matchPO(t,r):e?a=this.matchS(e):t?a=this.matchP(t):r?a=this.matchO(r):a=[],this.queryCache.set(i,a),a}async addAll(e){for(let t of e)await this.add(t)}async removeAll(e){let t=0;for(let r of e)await this.remove(r)&&t++;return t}async clear(){this.triples.clear(),this.spo.clear(),this.sop.clear(),this.pso.clear(),this.pos.clear(),this.osp.clear(),this.ops.clear(),this.uuidIndex.clear(),this.queryCache.clear()}async count(){return this.triples.size}async subjects(){let e=new Set;for(let t of this.triples.values())e.add(t.subject);return Array.from(e)}async predicates(){let e=new Set;for(let t of this.triples.values())e.add(t.predicate);return Array.from(e)}async objects(){let e=new Set;for(let t of this.triples.values())e.add(t.object);return Array.from(e)}async beginTransaction(){return new U1(this)}async findSubjectsByUUID(e){return this.findSubjectsByUUIDSync(e)}findSubjectsByUUIDSync(e){let t=e.toLowerCase(),r=this.uuidIndex.get(t);if(!r||r.size===0)return[];let i=[];for(let s of r)this.spo.has(`i:${s}`)&&i.push(new Ap.IRI(s));return i}addToUUIDIndex(e){if(!(e instanceof Ap.IRI))return;let t=e.value,r=t.match(e5);if(r)for(let i of r){let s=i.toLowerCase();this.uuidIndex.has(s)||this.uuidIndex.set(s,new Set),this.uuidIndex.get(s).add(t)}}matchSPO(e,t,r){let i=this.getNodeKey(e),s=this.getNodeKey(t),a=this.getNodeKey(r),c=this.spo.get(i);if(!c)return[];let l=c.get(s);if(!l)return[];if(l.has(a)){let u=this.buildTripleKey(i,s,a),f=this.triples.get(u);return f?[f]:[]}return[]}matchSP(e,t){let r=this.getNodeKey(e),i=this.getNodeKey(t),s=this.spo.get(r);if(!s)return[];let a=s.get(i);return a?this.getTriplesByKeys(Array.from(a).map(c=>this.buildTripleKey(r,i,c))):[]}matchSO(e,t){let r=this.getNodeKey(e),i=this.getNodeKey(t),s=this.sop.get(r);if(!s)return[];let a=s.get(i);return a?this.getTriplesByKeys(Array.from(a).map(c=>this.buildTripleKey(r,c,i))):[]}matchPO(e,t){let r=this.getNodeKey(e),i=this.getNodeKey(t),s=this.pos.get(r);if(!s)return[];let a=s.get(i);return a?this.getTriplesByKeys(Array.from(a).map(c=>this.buildTripleKey(c,r,i))):[]}matchS(e){let t=this.getNodeKey(e),r=this.spo.get(t);if(!r)return[];let i=[];for(let[s,a]of r.entries())for(let c of a)i.push(this.buildTripleKey(t,s,c));return this.getTriplesByKeys(i)}matchP(e){let t=this.getNodeKey(e),r=this.pso.get(t);if(!r)return[];let i=[];for(let[s,a]of r.entries())for(let c of a)i.push(this.buildTripleKey(s,t,c));return this.getTriplesByKeys(i)}matchO(e){let t=this.getNodeKey(e),r=this.osp.get(t);if(!r)return[];let i=[];for(let[s,a]of r.entries())for(let c of a)i.push(this.buildTripleKey(s,c,t));return this.getTriplesByKeys(i)}getTriplesByKeys(e){let t=[];for(let r of e){let i=this.triples.get(r);i&&t.push(i)}return t}addToIndex(e,t,r,i){e.has(t)||e.set(t,new Map);let s=e.get(t);s.has(r)||s.set(r,new Set),s.get(r).add(i)}removeFromIndex(e,t,r,i){let s=e.get(t);if(!s)return;let a=s.get(r);a&&(a.delete(i),a.size===0&&s.delete(r),s.size===0&&e.delete(t))}getTripleKey(e){let t=this.getNodeKey(e.subject),r=this.getNodeKey(e.predicate),i=this.getNodeKey(e.object);return this.buildTripleKey(t,r,i)}buildTripleKey(e,t,r){return`${e}|${t}|${r}`}getNodeKey(e){if(e instanceof Ap.IRI)return`i:${e.value}`;if(e instanceof K9.BlankNode)return`b:${e.id}`;if(e instanceof Y9.Literal){let t=`l:${e.value}`;return e.datatype&&e.datatype.value!==Z9?t+=`^^${e.datatype.value}`:e.language&&(t+=`@${e.language}`),t}return""}getMatchCacheKey(e,t,r){let i=e?this.getNodeKey(e):"?",s=t?this.getNodeKey(t):"?",a=r?this.getNodeKey(r):"?";return`${i}|${s}|${a}`}getGraphKey(e){return e?e.value:Zc}getOrCreateGraphStore(e){let t=this.getGraphKey(e);return t===Zc?this:(this.namedGraphs.has(t)||this.namedGraphs.set(t,new n),this.namedGraphs.get(t))}async addToGraph(e,t){await this.getOrCreateGraphStore(t).add(e)}async removeFromGraph(e,t){let r=this.getGraphKey(t);if(r===Zc)return this.remove(e);let i=this.namedGraphs.get(r);return i?i.remove(e):!1}async matchInGraph(e,t,r,i){let s=this.getGraphKey(i);if(s===Zc)return this.match(e,t,r);let a=this.namedGraphs.get(s);return a?a.match(e,t,r):[]}async getNamedGraphs(){return Array.from(this.namedGraphs.keys()).map(e=>new Ap.IRI(e))}async hasGraph(e){let t=this.namedGraphs.get(e.value);return t?await t.count()>0:!1}async clearGraph(e){let t=this.getGraphKey(e);if(t===Zc){await this.clear();return}let r=this.namedGraphs.get(t);r&&(await r.clear(),this.namedGraphs.delete(t))}async countInGraph(e){let t=this.getGraphKey(e);if(t===Zc)return this.count();let r=this.namedGraphs.get(t);return r?r.count():0}};xp.InMemoryTripleStore=B1;var U1=class{static{o(this,"InMemoryTransaction")}constructor(e){this.store=e,this.operations=[],this.committed=!1,this.rolledBack=!1}async add(e){if(this.committed)throw new La.TransactionError("Transaction already committed");if(this.rolledBack)throw new La.TransactionError("Transaction already rolled back");this.operations.push({type:"add",triple:e})}async remove(e){if(this.committed)throw new La.TransactionError("Transaction already committed");if(this.rolledBack)throw new La.TransactionError("Transaction already rolled back");return this.operations.push({type:"remove",triple:e}),!0}async commit(){if(this.committed)throw new La.TransactionError("Transaction already committed");if(this.rolledBack)throw new La.TransactionError("Transaction already rolled back");for(let e of this.operations)e.type==="add"?await this.store.add(e.triple):await this.store.remove(e.triple);this.committed=!0,this.operations=[]}async rollback(){if(this.committed)throw new La.TransactionError("Transaction already committed");if(this.rolledBack)throw new La.TransactionError("Transaction already rolled back");this.operations=[],this.rolledBack=!0}}});var Cp=b(Xs=>{"use strict";var t5=Xs&&Xs.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},r5=Xs&&Xs.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)};Object.defineProperty(Xs,"__esModule",{value:!0});Xs.EffortStatusWorkflow=void 0;var n5=Ce(),Ip=kn(),i5=Gu(),s5=L1(),a5=q1(),W1=class{static{o(this,"EffortStatusWorkflow")}constructor(){this.resolver=new s5.WorkflowResolver(new a5.InMemoryTripleStore)}getPreviousStatus(e,t){let r=this.normalizeStatus(e),i=this.resolveDefinition(t),s=new i5.WorkflowEngine(i);if(s.isInitialState(r))return null;let a=s.getPreviousStatus(r);if(a!==null)return this.wrapStatus(a)}normalizeStatus(e){return e.replace(/["'[\]]/g,"").trim()}wrapStatus(e){return`"[[${e}]]"`}resolveDefinition(e){return this.hasInstanceClass(e,Ip.AssetClass.TASK)||this.hasInstanceClass(e,Ip.AssetClass.MEETING)?this.resolver.getHardcodedFallback(Ip.AssetClass.TASK):this.resolver.getHardcodedFallback(Ip.AssetClass.PROJECT)}hasInstanceClass(e,t){return e?(Array.isArray(e)?e:[e]).some(i=>i.replace(/["'[\]]/g,"").trim()===t):!1}};Xs.EffortStatusWorkflow=W1;Xs.EffortStatusWorkflow=W1=t5([(0,n5.injectable)(),r5("design:paramtypes",[])],W1)});var Rt=b(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});Rp.DI_TOKENS=void 0;Rp.DI_TOKENS={IFileSystemAdapter:Symbol.for("IFileSystemAdapter"),IVaultAdapter:Symbol.for("IVaultAdapter"),IVaultContext:Symbol.for("IVaultContext"),IMultiVaultManager:Symbol.for("IMultiVaultManager"),ILogger:Symbol.for("ILogger"),IEventBus:Symbol.for("IEventBus"),IConfiguration:Symbol.for("IConfiguration"),INotificationService:Symbol.for("INotificationService"),AreaCreationService:Symbol.for("AreaCreationService"),ClassCreationService:Symbol.for("ClassCreationService"),ConceptCreationService:Symbol.for("ConceptCreationService"),SupervisionCreationService:Symbol.for("SupervisionCreationService"),GenericAssetCreationService:Symbol.for("GenericAssetCreationService"),DynamicFrontmatterGenerator:Symbol.for("DynamicFrontmatterGenerator"),AlgorithmExtractor:Symbol.for("AlgorithmExtractor"),TaskStatusService:Symbol.for("TaskStatusService"),EffortStatusWorkflow:Symbol.for("EffortStatusWorkflow"),StatusTimestampService:Symbol.for("StatusTimestampService"),PropertyCleanupService:Symbol.for("PropertyCleanupService"),FolderRepairService:Symbol.for("FolderRepairService"),LabelToAliasService:Symbol.for("LabelToAliasService"),RenameToUidService:Symbol.for("RenameToUidService"),PlanningService:Symbol.for("PlanningService"),EffortVotingService:Symbol.for("EffortVotingService"),SessionEventService:Symbol.for("SessionEventService"),CriticalityZoneService:Symbol.for("CriticalityZoneService"),AssetConversionService:Symbol.for("AssetConversionService"),NoteToRDFConverter:Symbol.for("NoteToRDFConverter"),IVaultSettings:Symbol.for("IVaultSettings"),AreaHierarchyBuilder:Symbol.for("AreaHierarchyBuilder"),URIConstructionService:Symbol.for("URIConstructionService"),ClassHierarchyResolver:Symbol.for("ClassHierarchyResolver")}});var Op=b(_i=>{"use strict";var o5=_i&&_i.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},c5=_i&&_i.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},l5=_i&&_i.__param||function(n,e){return function(t,r){e(t,r,n)}};Object.defineProperty(_i,"__esModule",{value:!0});_i.StatusTimestampService=void 0;var oA=Ce(),u5=ls(),el=In(),f5=Rt(),G1=class{static{o(this,"StatusTimestampService")}constructor(e){this.vault=e,this.frontmatterService=new u5.FrontmatterService}async addStartTimestamp(e){let t=await this.vault.read(e),r=el.DateFormatter.toLocalTimestamp(new Date),i=this.frontmatterService.updateProperty(t,"ems__Effort_startTimestamp",r);await this.vault.modify(e,i)}async addEndTimestamp(e,t){let r=await this.vault.read(e),i=t||new Date,s=el.DateFormatter.toLocalTimestamp(i),a=this.frontmatterService.updateProperty(r,"ems__Effort_endTimestamp",s);await this.vault.modify(e,a)}async addResolutionTimestamp(e){let t=await this.vault.read(e),r=el.DateFormatter.toLocalTimestamp(new Date),i=this.frontmatterService.updateProperty(t,"ems__Effort_resolutionTimestamp",r);await this.vault.modify(e,i)}async addReviewTimestamp(e){let t=await this.vault.read(e),r=el.DateFormatter.toLocalTimestamp(new Date),i=this.frontmatterService.updateProperty(t,"ems__Effort_lastReviewTimestamp",r);await this.vault.modify(e,i)}async addEndAndResolutionTimestamps(e,t){let r=await this.vault.read(e),i=t||new Date,s=el.DateFormatter.toLocalTimestamp(i),a=this.frontmatterService.updateProperty(r,"ems__Effort_endTimestamp",s);a=this.frontmatterService.updateProperty(a,"ems__Effort_resolutionTimestamp",s),await this.vault.modify(e,a)}async removeStartTimestamp(e){let t=await this.vault.read(e),r=this.frontmatterService.removeProperty(t,"ems__Effort_startTimestamp");await this.vault.modify(e,r)}async removeEndTimestamp(e){let t=await this.vault.read(e),r=this.frontmatterService.removeProperty(t,"ems__Effort_endTimestamp");await this.vault.modify(e,r)}async removeResolutionTimestamp(e){let t=await this.vault.read(e),r=this.frontmatterService.removeProperty(t,"ems__Effort_resolutionTimestamp");await this.vault.modify(e,r)}async removeEndAndResolutionTimestamps(e){let t=await this.vault.read(e),r=this.frontmatterService.removeProperty(t,"ems__Effort_endTimestamp");r=this.frontmatterService.removeProperty(r,"ems__Effort_resolutionTimestamp"),await this.vault.modify(e,r)}async shiftPlannedEndTimestamp(e,t){let r=await this.vault.read(e),i=this.frontmatterService.parse(r);if(!i.exists)return;let s=this.frontmatterService.getPropertyValue(i.content,"ems__Effort_plannedEndTimestamp");if(!s)return;let a=new Date(s.replace(/["']/g,""));if(isNaN(a.getTime()))return;let c=new Date(a.getTime()+t),l=el.DateFormatter.toLocalTimestamp(c),u=this.frontmatterService.updateProperty(r,"ems__Effort_plannedEndTimestamp",l);await this.vault.modify(e,u)}};_i.StatusTimestampService=G1;_i.StatusTimestampService=G1=o5([(0,oA.injectable)(),l5(0,(0,oA.inject)(f5.DI_TOKENS.IVaultAdapter)),c5("design:paramtypes",[Object])],G1)});var H1=b(bi=>{"use strict";var d5=bi&&bi.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var c=n.length-1;c>=0;c--)(a=n[c])&&(s=(i<3?a(s):i>3?a(e,t,s):a(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},h5=bi&&bi.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},p5=bi&&bi.__param||function(n,e){return function(t,r){e(t,r,n)}};Object.defineProperty(bi,"__esModule",{value:!0});bi.TaskStatusService=void 0;var cA=Ce(),m5=ls(),Lo=In(),g5=Cp(),y5=Op(),_5=Rt(),z1=class{static{o(this,"TaskStatusService")}constructor(e,t,r){this.vault=e,this.workflow=t,this.timestampService=r,this.frontmatterService=new m5.FrontmatterService}async setDraftStatus(e){await this.updateStatus(e,"ems__EffortStatusDraft")}async moveToBacklog(e){await this.updateStatus(e,"ems__EffortStatusBacklog")}async moveToAnalysis(e){await this.updateStatus(e,"ems__EffortStatusAnalysis")}async moveToToDo(e){await this.updateStatus(e,"ems__EffortStatusToDo")}async startEffort(e){let t=await this.vault.read(e),r=Lo.DateFormatter.toLocalTimestamp(new Date),i=this.frontmatterService.updateProperty(t,"ems__Effort_status",'"[[ems__EffortStatusDoing]]"');i=this.frontmatterService.updateProperty(i,"ems__Effort_startTimestamp",r),await this.vault.modify(e,i)}async markTaskAsDone(e){let t=await this.vault.read(e),r=Lo.DateFormatter.toLocalTimestamp(new Date),i=this.frontmatterService.updateProperty(t,"ems__Effort_status",'"[[ems__EffortStatusDone]]"');i=this.frontmatterService.updateProperty(i,"ems__Effort_endTimestamp",r),i=this.frontmatterService.updateProperty(i,"ems__Effort_resolutionTimestamp",r),await this.vault.modify(e,i)}async syncEffortEndTimestamp(e,t){await this.timestampService.addEndAndResolutionTimestamps(e,t)}async shiftPlannedEndTimestamp(e,t){await this.timestampService.shiftPlannedEndTimestamp(e,t)}async trashEffort(e,t){let r=await this.vault.read(e),i=Lo.DateFormatter.toLocalTimestamp(new Date),s=this.frontmatterService.updateProperty(r,"ems__Effort_status",'"[[ems__EffortStatusTrashed]]"');s=this.frontmatterService.updateProperty(s,"ems__Effort_resolutionTimestamp",i),t&&(s=this.appendTrashReason(s,t)),await this.vault.modify(e,s)}appendTrashReason(e,t){let r=`
101
101
 
102
102
  ## Trash Reason
103
103
 
@@ -449,11 +449,11 @@ To resolve:
449
449
  \u2022 Check service initialization parameters
450
450
  \u2022 Verify all required dependencies are available
451
451
  \u2022 Review service logs for detailed error information
452
- \u2022 Contact support if the issue persists`}};wm.ServiceError=aw});var tI=b(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.ServiceError=rr.ResourceExhaustedError=rr.NotFoundError=rr.PermissionError=rr.StateTransitionError=rr.NetworkError=rr.ValidationError=rr.ApplicationError=rr.ErrorCode=void 0;var SV=gs();Object.defineProperty(rr,"ErrorCode",{enumerable:!0,get:o(function(){return SV.ErrorCode},"get")});var wV=ys();Object.defineProperty(rr,"ApplicationError",{enumerable:!0,get:o(function(){return wV.ApplicationError},"get")});var vV=Qx();Object.defineProperty(rr,"ValidationError",{enumerable:!0,get:o(function(){return vV.ValidationError},"get")});var EV=Kx();Object.defineProperty(rr,"NetworkError",{enumerable:!0,get:o(function(){return EV.NetworkError},"get")});var TV=Yx();Object.defineProperty(rr,"StateTransitionError",{enumerable:!0,get:o(function(){return TV.StateTransitionError},"get")});var AV=Xx();Object.defineProperty(rr,"PermissionError",{enumerable:!0,get:o(function(){return AV.PermissionError},"get")});var xV=Jx();Object.defineProperty(rr,"NotFoundError",{enumerable:!0,get:o(function(){return xV.NotFoundError},"get")});var IV=Zx();Object.defineProperty(rr,"ResourceExhaustedError",{enumerable:!0,get:o(function(){return IV.ResourceExhaustedError},"get")});var CV=eI();Object.defineProperty(rr,"ServiceError",{enumerable:!0,get:o(function(){return CV.ServiceError},"get")})});var cw=b(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});vm.ShapeRegistry=void 0;var ow=class{static{o(this,"ShapeRegistry")}constructor(){this.shapes=new Map}get(e){return this.shapes.get(e)}register(e){this.shapes.set(e.propertyIRI,e)}getAll(){return Array.from(this.shapes.values())}get size(){return this.shapes.size}};vm.ShapeRegistry=ow});var dw=b(_s=>{"use strict";var RV=_s&&_s.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),OV=_s&&_s.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),lw=_s&&_s.__importStar||(function(){var n=o(function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&RV(t,e,r[i]);return OV(t,e),t}})();Object.defineProperty(_s,"__esModule",{value:!0});_s.ShapeLoader=void 0;var uw=cw(),qo=Ee(),af=je(),Hr=ar(),Em="http://www.w3.org/ns/shacl#",PV="http://www.w3.org/2001/XMLSchema#",Boe=[["exo__",Hr.Namespace.EXO],["ems__",Hr.Namespace.EMS],["exocmd__",Hr.Namespace.EXOCMD],["ims__",Hr.Namespace.IMS],["ztlk__",Hr.Namespace.ZTLK],["ptms__",Hr.Namespace.PTMS],["lit__",Hr.Namespace.LIT],["inbox__",Hr.Namespace.INBOX],["pmbok__",Hr.Namespace.PMBOK]],fw=class n{static{o(this,"ShapeLoader")}static async loadFromVaultFS(e){let{readdir:t,readFile:r}=await Promise.resolve().then(()=>lw(require("fs/promises"))),i=await Promise.resolve().then(()=>lw(require("path"))),s=new uw.ShapeRegistry;return await n.scanDir(e,s,{readdir:t,readFile:r,path:i}),s}static async loadFromRDFGraph(e){let t=new uw.ShapeRegistry,r=Hr.Namespace.EXO,i=Hr.Namespace.RDFS,s=Hr.Namespace.RDF,[a,c]=await Promise.all([e.match(void 0,s.term("type"),r.term("ObjectProperty")),e.match(void 0,s.term("type"),r.term("Property"))]),l=new Set;for(let u of[...a,...c])u.subject instanceof qo.IRI&&l.add(u.subject.value);for(let u of l){let f;try{f=new qo.IRI(u)}catch{continue}let[d,h,p,y,S,v,w,T,C]=await Promise.all([e.match(f,i.term("domain"),void 0),e.match(f,r.term("Property_domain"),void 0),e.match(f,i.term("range"),void 0),e.match(f,r.term("Property_range"),void 0),e.match(f,r.term("Property_cardinality"),void 0),e.match(f,r.term("Property_severity"),void 0),e.match(f,r.term("Asset_label"),void 0),e.match(f,i.term("label"),void 0),e.match(f,r.term("Property_minCount"),void 0)]),M=[...w,...T],$=[...d,...h],ee=[...p,...y];if($.length===0)continue;let B=null;for(let ne of M)if(ne.object instanceof af.Literal&&(B=n.labelToIRI(ne.object.value),B))break;if(!B)continue;let z=await Promise.all($.map(async ne=>ne.object instanceof qo.IRI?await n.resolveClassIRI(ne.object.value,e):null)),P=Array.from(new Set(z.filter(ne=>ne!==null))),D=await Promise.all(ee.map(async ne=>{if(ne.object instanceof qo.IRI)return await n.resolveClassIRI(ne.object.value,e);if(ne.object instanceof af.Literal){let Z=ne.object.value;if(Z.startsWith("http://")||Z.startsWith("https://"))return Z}return null})),J=Array.from(new Set(D.filter(ne=>ne!==null))),qe=n.cardinalityFromIRI(S[0]?.object instanceof qo.IRI?S[0].object.value:void 0),et=n.severityFromValue(v[0]?.object instanceof af.Literal||v[0]?.object instanceof qo.IRI?v[0].object.value:void 0),ve=C[0]?.object,$e=ve instanceof af.Literal?parseInt(ve.value,10):NaN,Re=isNaN($e)?void 0:$e;t.register({propertyIRI:B,domain:P,range:J.length>0?J:void 0,cardinality:qe,severity:et,minCount:Re})}return t}static async loadFromShapeJSON(e){let{readFile:t}=await Promise.resolve().then(()=>lw(require("fs/promises"))),r=await t(e,"utf-8"),i=JSON.parse(r),s=new uw.ShapeRegistry;for(let a of Object.values(i.shapes))s.register(a);return s}static async resolveClassIRI(e,t){if(e.startsWith("https://exocortex.my/ontology/")||e.startsWith("http://www.w3.org/"))return e;let r;try{r=new qo.IRI(e)}catch{return null}let i=Hr.Namespace.RDFS,s=Hr.Namespace.EXO,[a,c]=await Promise.all([t.match(r,i.term("label"),void 0),t.match(r,s.term("Asset_label"),void 0)]);for(let l of[...a,...c])if(l.object instanceof af.Literal){let u=n.labelToIRI(l.object.value);if(u)return u}return e}static async scanDir(e,t,r){let i;try{i=await r.readdir(e,{withFileTypes:!0})}catch{return}for(let s of i){let a=r.path.join(e,s.name);if(s.isDirectory())await n.scanDir(a,t,r);else if(s.isFile()&&s.name.endsWith(".md"))try{await n.processFile(a,t,r.readFile,r.path)}catch{}}}static async processFile(e,t,r,i){let s;try{s=await r(e,"utf-8")}catch{return}let a=n.parseFrontmatter(s);if(!a)return;let c="38277bfa-d7f9-4a75-b856-b23276ab0db3",l="9a1cf31c-9d41-4ef3-9023-584a8d087d16";if(!n.asArray(a.exo__Instance_class).some(P=>{let D=n.extractWikilinkRef(P);return D==="exo__Property"||D==="exo__ObjectProperty"||D===c||D===l||D?.includes("|exo__Property")||D?.includes("|exo__ObjectProperty")}))return;let d=null,h=a.exo__Asset_label;if(typeof h=="string"&&h.trim().length>0)d=h.trim();else if(i){let P=i.basename(e,".md");Hr.Namespace.fromPropertyKey(P)&&(d=P)}if(!d)return;let p=n.labelToIRI(d);if(!p)return;let y=a.exo__Property_domain,S=a.exo__Property_range,v=a.exo__Property_cardinality,w=a.exo__Property_severity,T=a.exo__Property_minCount,C=n.asArray(y).map(P=>n.wikilinkToIRI(P)).filter(P=>P!==null);if(C.length===0)return;let M=n.asArray(S).map(P=>n.wikilinkToIRI(P)).filter(P=>P!==null),$=n.cardinalityFromLabel(typeof v=="string"?v:void 0),ee=n.severityFromValue(typeof w=="string"?w:void 0),B=typeof T=="string"?parseInt(T,10):void 0,z=B!==void 0&&!isNaN(B)?B:void 0;t.register({propertyIRI:p,domain:C,range:M.length>0?M:void 0,cardinality:$,severity:ee,minCount:z})}static parseFrontmatter(e){let t=/^---\r?\n([\s\S]*?)\r?\n---/.exec(e);if(!t)return null;let r=t[1],i={},s=r.split(/\r?\n/),a=null,c=null;for(let l of s){let u=/^ {2}- (.*)$/.exec(l);if(u){a&&c&&c.push(u[1].trim());continue}a&&c&&(i[a]=c,a=null,c=null);let f=/^([^:]+):\s*(.*)$/.exec(l);if(!f)continue;let d=f[1].trim(),h=f[2].trim();h===""?(a=d,c=[]):i[d]=h}return a&&c&&(i[a]=c),i}static labelToIRI(e){let t=Hr.Namespace.fromPropertyKey(e);if(!t)return null;try{return t.namespace.term(t.localName).value}catch{return null}}static extractWikilinkRef(e){let t=e.replace(/^["']|["']$/g,""),r=/\[\[([^\]]+)\]\]/.exec(t);return r?r[1]:t}static wikilinkToIRI(e){let t=n.extractWikilinkRef(e);if(!t)return null;let r=t.split("|"),i=r.length>1?[r[1],r[0]]:[r[0]];for(let s of i){let a=n.labelToIRI(s.trim());if(a)return a}return t.startsWith("http")?t:t.startsWith("sh:")?Em+t.substring(3):t.startsWith("xsd:")?PV+t.substring(4):null}static asArray(e){return Array.isArray(e)?e.map(String):typeof e=="string"?[e]:[]}static cardinalityFromIRI(e){if(e){if(e.endsWith("PropertyCardinalitySingle"))return"Single";if(e.endsWith("PropertyCardinalityMultiple"))return"Multiple"}}static cardinalityFromLabel(e){if(!e)return;let t=n.extractWikilinkRef(e)??e,r=t.split("|").pop()??t;if(r.includes("Single"))return"Single";if(r.includes("Multiple"))return"Multiple"}static severityFromValue(e){return!e||e.includes("Violation")||e===Em+"Violation"?"sh:Violation":e.includes("Warning")||e===Em+"Warning"?"sh:Warning":e.includes("Info")||e===Em+"Info"?"sh:Info":"sh:Violation"}};_s.ShapeLoader=fw});var pw=b(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.ShapeRegistry=void 0;of.validate=MV;var hw=class{static{o(this,"ShapeRegistry")}constructor(e=[],t="https://exocortex.my/ontology/exo#Instance_class"){this.shapeMap=new Map(e.map(r=>[r.propertyIRI,r])),this.typePredicateIRI=t}getShape(e){return this.shapeMap.get(e)}getAllShapes(){return Array.from(this.shapeMap.values())}hasShape(e){return this.shapeMap.has(e)}};of.ShapeRegistry=hw;var FV="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",DV=["http://www.w3.org/2001/XMLSchema#","http://www.w3.org/1999/02/22-rdf-syntax-ns#","http://www.w3.org/2000/01/rdf-schema#","http://www.w3.org/2002/07/owl#","http://www.w3.org/2004/02/skos/core#","http://purl.org/dc/elements/1.1/","http://purl.org/dc/terms/","http://xmlns.com/foaf/0.1/","https://schema.org/","https://exocortex.my/ontology/xsd#","https://exocortex.my/ontology/rdf#","https://exocortex.my/ontology/rdfs#","https://exocortex.my/ontology/owl#","https://exocortex.my/ontology/skos#"];function NV(n){return DV.some(e=>n.startsWith(e))}o(NV,"isExternalOntologyIRI");var LV=["http://www.w3.org/2001/XMLSchema#","https://exocortex.my/ontology/xsd#"];function kV(n){return LV.some(e=>n.startsWith(e))}o(kV,"isXSDDatatypeIRI");var jV=/\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.md$/i;function rI(n){let e=jV.exec(n);return e?e[1].toLowerCase():null}o(rI,"extractUid");function MV(n,e,t,r){let i=new Map,s=new Map;for(let l of n){let{subject:u,predicate:f,object:d}=l;if(u.type!=="iri"||f.type!=="iri"||d.type!=="iri"&&d.type!=="literal")continue;let h=u.value,p=f.value,y=d;if(p===e.typePredicateIRI||p===FV){if(y.type==="iri"){let v=i.get(h)??[];v.push(y.value),i.set(h,v);let w=rI(h);if(w){let T=`uid:${w}`,C=i.get(T)??[];C.push(y.value),i.set(T,C)}}}else{let v=s.get(h);v||(v=new Map,s.set(h,v));let w=v.get(p)??[];w.push(y),v.set(p,w)}}let a=[],c=new Set([...i.keys(),...s.keys()]);for(let l of c){let u=i.get(l)??[],f=s.get(l)??new Map;for(let d of e.getAllShapes()){if(!(d.domain.length===0||d.domain.some(y=>u.some(S=>S===y||t.isSubClassOf(S,y)))))continue;let p=f.get(d.propertyIRI)??[];if(d.minCount!==void 0&&d.minCount>0&&p.length<d.minCount){a.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,message:d.message??`sh:minCount violation: expected at least ${d.minCount} value(s) for <${d.propertyIRI}>`});continue}if(p.length!==0){if(d.cardinality==="Single"&&p.length>1){a.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,message:d.message??`sh:maxCount violation: expected at most 1 value for <${d.propertyIRI}>, got ${p.length}`});continue}if(d.range&&d.range.length>0){for(let y of p)if(y.type==="iri"){if(NV(y.value))continue;let S=i.get(y.value)??[];if(S.length===0){let w=rI(y.value);w&&(S=i.get(`uid:${w}`)??[])}d.range.some(w=>S.some(T=>T===w||t.isSubClassOf(T,w)))||a.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,message:d.message??`sh:class violation: <${y.value}> does not conform to expected class ${d.range.join(" | ")}`,actualValue:y.value,expectedRange:d.range.join(" | ")})}else if(y.type==="literal"){let S=d.range.filter(T=>kV(T));if(S.length===0)continue;let v=y.datatype??"http://www.w3.org/2001/XMLSchema#string";S.some(T=>T===v)||a.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,message:d.message??`sh:datatype violation: literal "${y.value}" has datatype <${v}>, expected ${S.join(" | ")}`,actualValue:y.value,expectedRange:S.join(" | ")})}}}}}if(r?.closedWorldMode)for(let l of c){let u=s.get(l)??new Map;for(let f of u.keys())e.hasShape(f)||a.push({focusNode:l,propertyPath:f,severity:"sh:Warning",message:`Unknown property: <${f}> has no registered shape`})}return a.sort((l,u)=>{let f=l.focusNode.localeCompare(u.focusNode);return f!==0?f:l.propertyPath.localeCompare(u.propertyPath)}),{conforms:!a.some(l=>l.severity==="sh:Violation"),violations:a}}o(MV,"validate")});var nI=b(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});Tm.ApplicationErrorHandler=void 0;var mw=ys(),$V=gs(),VV=Da(),gw=class{static{o(this,"ApplicationErrorHandler")}constructor(e={},t,r){this.logger=t,this.notifier=r,this.telemetryHooks=new Set,this.retryConfig={maxRetries:e.maxRetries??3,initialDelayMs:e.initialDelayMs??1e3,backoffMultiplier:e.backoffMultiplier??2,maxDelayMs:e.maxDelayMs??1e4}}handle(e,t){let r=this.ensureApplicationError(e,t);return this.notifier&&this.notifier.error(r.message),this.callTelemetryHooks("onError",r,t),this.formatError(r)}async executeWithRetry(e,t){let r,i=0;for(;i<=this.retryConfig.maxRetries;)try{return await e()}catch(s){if(r=this.ensureApplicationError(s,t),!r.retriable||i>=this.retryConfig.maxRetries)throw this.callTelemetryHooks("onError",r,t),i>=this.retryConfig.maxRetries&&r.retriable&&this.callTelemetryHooks("onRetryExhausted",r,i+1),r;let a=this.calculateDelay(i);this.callTelemetryHooks("onRetry",r,i+1,a),this.logger?.debug(`Retrying after ${a}ms (attempt ${i+1}/${this.retryConfig.maxRetries})`),await this.sleep(a),i++}throw r}registerTelemetryHook(e){this.telemetryHooks.add(e)}unregisterTelemetryHook(e){this.telemetryHooks.delete(e)}ensureApplicationError(e,t){if(e instanceof mw.ApplicationError){if(t){let i=e,s={...e.context,...t};return new class extends mw.ApplicationError{constructor(){super(...arguments),this.code=i.code,this.retriable=i.retriable,this.guidance=i.guidance}}(e.message,s)}return e}return new class extends mw.ApplicationError{static{o(this,"UnknownError")}constructor(s,a){super(s,{originalError:a.name,...t}),this.code=$V.ErrorCode.UNKNOWN_ERROR,this.retriable=!1,this.guidance="An unexpected error occurred"}}(e.message,e)}formatError(e){let t=[];return t.push(`\u274C ${e.name}: ${e.message}`),e.guidance&&t.push(`\u{1F4A1} ${e.guidance}`),e.context&&Object.keys(e.context).length>0&&t.push(`Context: ${JSON.stringify(e.context,null,2)}`),t.join(`
452
+ \u2022 Contact support if the issue persists`}};wm.ServiceError=aw});var tI=b(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.ServiceError=rr.ResourceExhaustedError=rr.NotFoundError=rr.PermissionError=rr.StateTransitionError=rr.NetworkError=rr.ValidationError=rr.ApplicationError=rr.ErrorCode=void 0;var SV=gs();Object.defineProperty(rr,"ErrorCode",{enumerable:!0,get:o(function(){return SV.ErrorCode},"get")});var wV=ys();Object.defineProperty(rr,"ApplicationError",{enumerable:!0,get:o(function(){return wV.ApplicationError},"get")});var vV=Qx();Object.defineProperty(rr,"ValidationError",{enumerable:!0,get:o(function(){return vV.ValidationError},"get")});var EV=Kx();Object.defineProperty(rr,"NetworkError",{enumerable:!0,get:o(function(){return EV.NetworkError},"get")});var TV=Yx();Object.defineProperty(rr,"StateTransitionError",{enumerable:!0,get:o(function(){return TV.StateTransitionError},"get")});var AV=Xx();Object.defineProperty(rr,"PermissionError",{enumerable:!0,get:o(function(){return AV.PermissionError},"get")});var xV=Jx();Object.defineProperty(rr,"NotFoundError",{enumerable:!0,get:o(function(){return xV.NotFoundError},"get")});var IV=Zx();Object.defineProperty(rr,"ResourceExhaustedError",{enumerable:!0,get:o(function(){return IV.ResourceExhaustedError},"get")});var CV=eI();Object.defineProperty(rr,"ServiceError",{enumerable:!0,get:o(function(){return CV.ServiceError},"get")})});var cw=b(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});vm.ShapeRegistry=void 0;var ow=class{static{o(this,"ShapeRegistry")}constructor(){this.shapes=new Map}get(e){return this.shapes.get(e)}register(e){this.shapes.set(e.propertyIRI,e)}getAll(){return Array.from(this.shapes.values())}get size(){return this.shapes.size}};vm.ShapeRegistry=ow});var dw=b(_s=>{"use strict";var RV=_s&&_s.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),OV=_s&&_s.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),lw=_s&&_s.__importStar||(function(){var n=o(function(e){return n=Object.getOwnPropertyNames||function(t){var r=[];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[r.length]=i);return r},n(e)},"ownKeys");return function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=n(e),i=0;i<r.length;i++)r[i]!=="default"&&RV(t,e,r[i]);return OV(t,e),t}})();Object.defineProperty(_s,"__esModule",{value:!0});_s.ShapeLoader=void 0;var uw=cw(),qo=Ee(),af=je(),Hr=ar(),Em="http://www.w3.org/ns/shacl#",PV="http://www.w3.org/2001/XMLSchema#",Boe=[["exo__",Hr.Namespace.EXO],["ems__",Hr.Namespace.EMS],["exocmd__",Hr.Namespace.EXOCMD],["ims__",Hr.Namespace.IMS],["ztlk__",Hr.Namespace.ZTLK],["ptms__",Hr.Namespace.PTMS],["lit__",Hr.Namespace.LIT],["inbox__",Hr.Namespace.INBOX],["pmbok__",Hr.Namespace.PMBOK]],fw=class n{static{o(this,"ShapeLoader")}static async loadFromVaultFS(e){let{readdir:t,readFile:r}=await Promise.resolve().then(()=>lw(require("fs/promises"))),i=await Promise.resolve().then(()=>lw(require("path"))),s=new uw.ShapeRegistry;return await n.scanDir(e,s,{readdir:t,readFile:r,path:i}),s}static async loadFromRDFGraph(e){let t=new uw.ShapeRegistry,r=Hr.Namespace.EXO,i=Hr.Namespace.RDFS,s=Hr.Namespace.RDF,[a,c]=await Promise.all([e.match(void 0,s.term("type"),r.term("ObjectProperty")),e.match(void 0,s.term("type"),r.term("Property"))]),l=new Set;for(let u of[...a,...c])u.subject instanceof qo.IRI&&l.add(u.subject.value);for(let u of l){let f;try{f=new qo.IRI(u)}catch{continue}let[d,h,p,y,S,v,w,T,C]=await Promise.all([e.match(f,i.term("domain"),void 0),e.match(f,r.term("Property_domain"),void 0),e.match(f,i.term("range"),void 0),e.match(f,r.term("Property_range"),void 0),e.match(f,r.term("Property_cardinality"),void 0),e.match(f,r.term("Property_severity"),void 0),e.match(f,r.term("Asset_label"),void 0),e.match(f,i.term("label"),void 0),e.match(f,r.term("Property_minCount"),void 0)]),M=[...w,...T],$=[...d,...h],ee=[...p,...y];if($.length===0)continue;let B=null;for(let ne of M)if(ne.object instanceof af.Literal&&(B=n.labelToIRI(ne.object.value),B))break;if(!B)continue;let z=await Promise.all($.map(async ne=>ne.object instanceof qo.IRI?await n.resolveClassIRI(ne.object.value,e):null)),P=Array.from(new Set(z.filter(ne=>ne!==null))),D=await Promise.all(ee.map(async ne=>{if(ne.object instanceof qo.IRI)return await n.resolveClassIRI(ne.object.value,e);if(ne.object instanceof af.Literal){let Z=ne.object.value;if(Z.startsWith("http://")||Z.startsWith("https://"))return Z}return null})),J=Array.from(new Set(D.filter(ne=>ne!==null))),qe=n.cardinalityFromIRI(S[0]?.object instanceof qo.IRI?S[0].object.value:void 0),et=n.severityFromValue(v[0]?.object instanceof af.Literal||v[0]?.object instanceof qo.IRI?v[0].object.value:void 0),pe=C[0]?.object,$e=pe instanceof af.Literal?parseInt(pe.value,10):NaN,Re=isNaN($e)?void 0:$e;t.register({propertyIRI:B,domain:P,range:J.length>0?J:void 0,cardinality:qe,severity:et,minCount:Re})}return t}static async loadFromShapeJSON(e){let{readFile:t}=await Promise.resolve().then(()=>lw(require("fs/promises"))),r=await t(e,"utf-8"),i=JSON.parse(r),s=new uw.ShapeRegistry;for(let a of Object.values(i.shapes))s.register(a);return s}static async resolveClassIRI(e,t){if(e.startsWith("https://exocortex.my/ontology/")||e.startsWith("http://www.w3.org/"))return e;let r;try{r=new qo.IRI(e)}catch{return null}let i=Hr.Namespace.RDFS,s=Hr.Namespace.EXO,[a,c]=await Promise.all([t.match(r,i.term("label"),void 0),t.match(r,s.term("Asset_label"),void 0)]);for(let l of[...a,...c])if(l.object instanceof af.Literal){let u=n.labelToIRI(l.object.value);if(u)return u}return e}static async scanDir(e,t,r){let i;try{i=await r.readdir(e,{withFileTypes:!0})}catch{return}for(let s of i){let a=r.path.join(e,s.name);if(s.isDirectory())await n.scanDir(a,t,r);else if(s.isFile()&&s.name.endsWith(".md"))try{await n.processFile(a,t,r.readFile,r.path)}catch{}}}static async processFile(e,t,r,i){let s;try{s=await r(e,"utf-8")}catch{return}let a=n.parseFrontmatter(s);if(!a)return;let c="38277bfa-d7f9-4a75-b856-b23276ab0db3",l="9a1cf31c-9d41-4ef3-9023-584a8d087d16";if(!n.asArray(a.exo__Instance_class).some(P=>{let D=n.extractWikilinkRef(P);return D==="exo__Property"||D==="exo__ObjectProperty"||D===c||D===l||D?.includes("|exo__Property")||D?.includes("|exo__ObjectProperty")}))return;let d=null,h=a.exo__Asset_label;if(typeof h=="string"&&h.trim().length>0)d=h.trim();else if(i){let P=i.basename(e,".md");Hr.Namespace.fromPropertyKey(P)&&(d=P)}if(!d)return;let p=n.labelToIRI(d);if(!p)return;let y=a.exo__Property_domain,S=a.exo__Property_range,v=a.exo__Property_cardinality,w=a.exo__Property_severity,T=a.exo__Property_minCount,C=n.asArray(y).map(P=>n.wikilinkToIRI(P)).filter(P=>P!==null);if(C.length===0)return;let M=n.asArray(S).map(P=>n.wikilinkToIRI(P)).filter(P=>P!==null),$=n.cardinalityFromLabel(typeof v=="string"?v:void 0),ee=n.severityFromValue(typeof w=="string"?w:void 0),B=typeof T=="string"?parseInt(T,10):void 0,z=B!==void 0&&!isNaN(B)?B:void 0;t.register({propertyIRI:p,domain:C,range:M.length>0?M:void 0,cardinality:$,severity:ee,minCount:z})}static parseFrontmatter(e){let t=/^---\r?\n([\s\S]*?)\r?\n---/.exec(e);if(!t)return null;let r=t[1],i={},s=r.split(/\r?\n/),a=null,c=null;for(let l of s){let u=/^ {2}- (.*)$/.exec(l);if(u){a&&c&&c.push(u[1].trim());continue}a&&c&&(i[a]=c,a=null,c=null);let f=/^([^:]+):\s*(.*)$/.exec(l);if(!f)continue;let d=f[1].trim(),h=f[2].trim();h===""?(a=d,c=[]):i[d]=h}return a&&c&&(i[a]=c),i}static labelToIRI(e){let t=Hr.Namespace.fromPropertyKey(e);if(!t)return null;try{return t.namespace.term(t.localName).value}catch{return null}}static extractWikilinkRef(e){let t=e.replace(/^["']|["']$/g,""),r=/\[\[([^\]]+)\]\]/.exec(t);return r?r[1]:t}static wikilinkToIRI(e){let t=n.extractWikilinkRef(e);if(!t)return null;let r=t.split("|"),i=r.length>1?[r[1],r[0]]:[r[0]];for(let s of i){let a=n.labelToIRI(s.trim());if(a)return a}return t.startsWith("http")?t:t.startsWith("sh:")?Em+t.substring(3):t.startsWith("xsd:")?PV+t.substring(4):null}static asArray(e){return Array.isArray(e)?e.map(String):typeof e=="string"?[e]:[]}static cardinalityFromIRI(e){if(e){if(e.endsWith("PropertyCardinalitySingle"))return"Single";if(e.endsWith("PropertyCardinalityMultiple"))return"Multiple"}}static cardinalityFromLabel(e){if(!e)return;let t=n.extractWikilinkRef(e)??e,r=t.split("|").pop()??t;if(r.includes("Single"))return"Single";if(r.includes("Multiple"))return"Multiple"}static severityFromValue(e){return!e||e.includes("Violation")||e===Em+"Violation"?"sh:Violation":e.includes("Warning")||e===Em+"Warning"?"sh:Warning":e.includes("Info")||e===Em+"Info"?"sh:Info":"sh:Violation"}};_s.ShapeLoader=fw});var pw=b(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.ShapeRegistry=void 0;of.validate=MV;var hw=class{static{o(this,"ShapeRegistry")}constructor(e=[],t="https://exocortex.my/ontology/exo#Instance_class"){this.shapeMap=new Map(e.map(r=>[r.propertyIRI,r])),this.typePredicateIRI=t}getShape(e){return this.shapeMap.get(e)}getAllShapes(){return Array.from(this.shapeMap.values())}hasShape(e){return this.shapeMap.has(e)}};of.ShapeRegistry=hw;var FV="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",DV=["http://www.w3.org/2001/XMLSchema#","http://www.w3.org/1999/02/22-rdf-syntax-ns#","http://www.w3.org/2000/01/rdf-schema#","http://www.w3.org/2002/07/owl#","http://www.w3.org/2004/02/skos/core#","http://purl.org/dc/elements/1.1/","http://purl.org/dc/terms/","http://xmlns.com/foaf/0.1/","https://schema.org/","https://exocortex.my/ontology/xsd#","https://exocortex.my/ontology/rdf#","https://exocortex.my/ontology/rdfs#","https://exocortex.my/ontology/owl#","https://exocortex.my/ontology/skos#"];function NV(n){return DV.some(e=>n.startsWith(e))}o(NV,"isExternalOntologyIRI");var LV=["http://www.w3.org/2001/XMLSchema#","https://exocortex.my/ontology/xsd#"];function kV(n){return LV.some(e=>n.startsWith(e))}o(kV,"isXSDDatatypeIRI");var jV=/\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.md$/i;function rI(n){let e=jV.exec(n);return e?e[1].toLowerCase():null}o(rI,"extractUid");function MV(n,e,t,r){let i=new Map,s=new Map;for(let l of n){let{subject:u,predicate:f,object:d}=l;if(u.type!=="iri"||f.type!=="iri"||d.type!=="iri"&&d.type!=="literal")continue;let h=u.value,p=f.value,y=d;if(p===e.typePredicateIRI||p===FV){if(y.type==="iri"){let v=i.get(h)??[];v.push(y.value),i.set(h,v);let w=rI(h);if(w){let T=`uid:${w}`,C=i.get(T)??[];C.push(y.value),i.set(T,C)}}}else{let v=s.get(h);v||(v=new Map,s.set(h,v));let w=v.get(p)??[];w.push(y),v.set(p,w)}}let a=[],c=new Set([...i.keys(),...s.keys()]);for(let l of c){let u=i.get(l)??[],f=s.get(l)??new Map;for(let d of e.getAllShapes()){if(!(d.domain.length===0||d.domain.some(y=>u.some(S=>S===y||t.isSubClassOf(S,y)))))continue;let p=f.get(d.propertyIRI)??[];if(d.minCount!==void 0&&d.minCount>0&&p.length<d.minCount){a.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,message:d.message??`sh:minCount violation: expected at least ${d.minCount} value(s) for <${d.propertyIRI}>`});continue}if(p.length!==0){if(d.cardinality==="Single"&&p.length>1){a.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,message:d.message??`sh:maxCount violation: expected at most 1 value for <${d.propertyIRI}>, got ${p.length}`});continue}if(d.range&&d.range.length>0){for(let y of p)if(y.type==="iri"){if(NV(y.value))continue;let S=i.get(y.value)??[];if(S.length===0){let w=rI(y.value);w&&(S=i.get(`uid:${w}`)??[])}d.range.some(w=>S.some(T=>T===w||t.isSubClassOf(T,w)))||a.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,message:d.message??`sh:class violation: <${y.value}> does not conform to expected class ${d.range.join(" | ")}`,actualValue:y.value,expectedRange:d.range.join(" | ")})}else if(y.type==="literal"){let S=d.range.filter(T=>kV(T));if(S.length===0)continue;let v=y.datatype??"http://www.w3.org/2001/XMLSchema#string";S.some(T=>T===v)||a.push({focusNode:l,propertyPath:d.propertyIRI,severity:d.severity,message:d.message??`sh:datatype violation: literal "${y.value}" has datatype <${v}>, expected ${S.join(" | ")}`,actualValue:y.value,expectedRange:S.join(" | ")})}}}}}if(r?.closedWorldMode)for(let l of c){let u=s.get(l)??new Map;for(let f of u.keys())e.hasShape(f)||a.push({focusNode:l,propertyPath:f,severity:"sh:Warning",message:`Unknown property: <${f}> has no registered shape`})}return a.sort((l,u)=>{let f=l.focusNode.localeCompare(u.focusNode);return f!==0?f:l.propertyPath.localeCompare(u.propertyPath)}),{conforms:!a.some(l=>l.severity==="sh:Violation"),violations:a}}o(MV,"validate")});var nI=b(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});Tm.ApplicationErrorHandler=void 0;var mw=ys(),$V=gs(),VV=Da(),gw=class{static{o(this,"ApplicationErrorHandler")}constructor(e={},t,r){this.logger=t,this.notifier=r,this.telemetryHooks=new Set,this.retryConfig={maxRetries:e.maxRetries??3,initialDelayMs:e.initialDelayMs??1e3,backoffMultiplier:e.backoffMultiplier??2,maxDelayMs:e.maxDelayMs??1e4}}handle(e,t){let r=this.ensureApplicationError(e,t);return this.notifier&&this.notifier.error(r.message),this.callTelemetryHooks("onError",r,t),this.formatError(r)}async executeWithRetry(e,t){let r,i=0;for(;i<=this.retryConfig.maxRetries;)try{return await e()}catch(s){if(r=this.ensureApplicationError(s,t),!r.retriable||i>=this.retryConfig.maxRetries)throw this.callTelemetryHooks("onError",r,t),i>=this.retryConfig.maxRetries&&r.retriable&&this.callTelemetryHooks("onRetryExhausted",r,i+1),r;let a=this.calculateDelay(i);this.callTelemetryHooks("onRetry",r,i+1,a),this.logger?.debug(`Retrying after ${a}ms (attempt ${i+1}/${this.retryConfig.maxRetries})`),await this.sleep(a),i++}throw r}registerTelemetryHook(e){this.telemetryHooks.add(e)}unregisterTelemetryHook(e){this.telemetryHooks.delete(e)}ensureApplicationError(e,t){if(e instanceof mw.ApplicationError){if(t){let i=e,s={...e.context,...t};return new class extends mw.ApplicationError{constructor(){super(...arguments),this.code=i.code,this.retriable=i.retriable,this.guidance=i.guidance}}(e.message,s)}return e}return new class extends mw.ApplicationError{static{o(this,"UnknownError")}constructor(s,a){super(s,{originalError:a.name,...t}),this.code=$V.ErrorCode.UNKNOWN_ERROR,this.retriable=!1,this.guidance="An unexpected error occurred"}}(e.message,e)}formatError(e){let t=[];return t.push(`\u274C ${e.name}: ${e.message}`),e.guidance&&t.push(`\u{1F4A1} ${e.guidance}`),e.context&&Object.keys(e.context).length>0&&t.push(`Context: ${JSON.stringify(e.context,null,2)}`),t.join(`
453
453
  `)}calculateDelay(e){let t=this.retryConfig.initialDelayMs*Math.pow(this.retryConfig.backoffMultiplier,e);return Math.min(t,this.retryConfig.maxDelayMs)}sleep(e){return new Promise(t=>setTimeout(t,e))}callTelemetryHooks(e,...t){for(let r of this.telemetryHooks)try{let i=r[e];i&&i.apply(r,t)}catch(i){VV.LoggingService.error("Error in telemetry hook",i instanceof Error?i:new Error(String(i)))}}};Tm.ApplicationErrorHandler=gw});var iI=b(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});Am.ApplicationErrorHandler=void 0;var BV=nI();Object.defineProperty(Am,"ApplicationErrorHandler",{enumerable:!0,get:o(function(){return BV.ApplicationErrorHandler},"get")})});var _w=b(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});xm.ClassHierarchy=void 0;var UV="http://www.w3.org/2000/01/rdf-schema#subClassOf",yw=class{static{o(this,"ClassHierarchy")}constructor(e){this.adjacency=new Map;for(let t of e){if(t.predicate.type!=="iri"||t.predicate.value!==UV||t.subject.type!=="iri"||t.object.type!=="iri")continue;let r=t.subject.value,i=t.object.value,s=this.adjacency.get(r);s||(s=new Set,this.adjacency.set(r,s)),s.add(i)}}isSubClassOf(e,t){if(e===t)return!0;let r=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(s===void 0)break;if(r.has(s))continue;r.add(s);let a=this.adjacency.get(s);if(a)for(let c of a){if(c===t)return!0;r.has(c)||i.push(c)}}return!1}getAncestors(e){let t=new Set,r=new Set,i=[e];for(;i.length>0;){let s=i.shift();if(s===void 0)break;if(r.has(s))continue;r.add(s);let a=this.adjacency.get(s);if(a)for(let c of a)t.add(c),r.has(c)||i.push(c)}return t}};xm.ClassHierarchy=yw});var aI=b(bs=>{"use strict";Object.defineProperty(bs,"__esModule",{value:!0});bs.ValidatorDaemon=bs.IDLE_TIMEOUT_MS=bs.DEFAULT_SOCKET_PATH=void 0;var sI=pw(),qV=dw(),WV=_w();bs.DEFAULT_SOCKET_PATH=typeof process<"u"&&process.env?`${process.env.HOME??process.env.USERPROFILE??"/tmp"}/.cache/exocortex/validator.sock`:"/tmp/.cache/exocortex/validator.sock";bs.IDLE_TIMEOUT_MS=300*1e3;var bw=class{static{o(this,"ValidatorDaemon")}constructor(e=bs.DEFAULT_SOCKET_PATH,t=bs.IDLE_TIMEOUT_MS){this.registryCache=new Map,this.server=null,this.idleTimer=null,this.socketPath=e,this.idleTimeoutMs=t}async start(){let e=require("net"),t=require("fs/promises"),r=require("path");await t.mkdir(r.dirname(this.socketPath),{recursive:!0});try{await t.unlink(this.socketPath)}catch{}this.server=e.createServer(a=>{this.handleConnection(a)});let i=this.server;await new Promise((a,c)=>{i.on("error",c),i.listen(this.socketPath,a)}),this.resetIdleTimer();let s=o(()=>{this.stop()},"handleSignal");process.once("SIGTERM",s),process.once("SIGINT",s)}async stop(){if(this.idleTimer!==null&&(clearTimeout(this.idleTimer),this.idleTimer=null),!this.server)return;let e=this.server;this.server=null,await new Promise(t=>{e.close(()=>t())})}resetIdleTimer(){this.idleTimer!==null&&clearTimeout(this.idleTimer),this.idleTimer=setTimeout(()=>{process.exit(0)},this.idleTimeoutMs)}handleConnection(e){let t="";e.setEncoding("utf-8"),e.on("data",r=>{t+=r;let i=t.split(`
454
454
  `);t=i.pop()??"";for(let s of i){let a=s.trim();a&&this.handleRequest(a,e)}}),e.on("error",()=>{e.destroy()})}async handleRequest(e,t){this.resetIdleTimer();let r;try{let i=JSON.parse(e),s=await this.getRegistry(i.registryPath),a=new WV.ClassHierarchy(i.subclassTriples??[]);r={report:(0,sI.validate)(i.triples,s,a,{closedWorldMode:i.closedWorldMode})}}catch(i){r={error:i instanceof Error?i.message:String(i)}}t.destroyed||t.write(JSON.stringify(r)+`
455
455
  `)}async getRegistry(e){let t=this.registryCache.get(e);if(t)return t;let r=await qV.ShapeLoader.loadFromShapeJSON(e),i=new sI.ShapeRegistry(r.getAll());return this.registryCache.set(e,i),i}};bs.ValidatorDaemon=bw});var Sr=b(m=>{"use strict";var GV=m&&m.__createBinding||(Object.create?(function(n,e,t,r){r===void 0&&(r=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:o(function(){return e[t]},"get")}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),ri=m&&m.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&GV(e,n,t)};Object.defineProperty(m,"__esModule",{value:!0});m.PropertyCleanupService=m.LoggingService=m.LabelToAliasService=m.FolderRepairService=m.EffortVotingService=m.WorkflowCommandAdapter=m.VisibilityGenerator=m.InstantiationRuleResolver=m.WorkflowResolver=m.WorkflowEngine=m.EffortStatusWorkflow=m.ConceptCreationService=m.ClassCreationService=m.AreaHierarchyBuilder=m.AreaCreationService=m.TaskStatusService=m.CommandExecutionFlow=m.ServiceRegistry=m.GroundingExecutor=m.PreconditionEvaluator=m.CommandResolver=m.extractPropertyLabel=m.uriToPropertyName=m.propertyNameToUri=m.rangeToFieldType=m.PropertyFieldType=m.isCommandBindingFrontmatter=m.isGroundingFrontmatter=m.isPreconditionFrontmatter=m.isCommandFrontmatter=m.isStyleSource=m.isLabelClass=m.isCommandVariant=m.STYLE_SOURCE_VALUES=m.LABEL_CLASS_VALUES=m.COMMAND_VARIANT_VALUES=m.CommandBindingStyleProperty=m.CommandBindingProperty=m.GroundingProperty=m.PreconditionProperty=m.CommandProperty=m.GroundingType=m.getEffortStatusLabel=m.isTrashedStatus=m.isDoneStatus=m.normalizeEffortStatus=m.EFFORT_STATUS_OPTIONS=m.STATUS_NAME_TO_WIKILINK=m.STATUS_NAME_TO_ENUM=m.EFFORT_STATUS_CONFIG=void 0;m.RDFVocabularyMapper=m.DomainTriple=m.DomainBlankNode=m.DomainLiteral=m.DomainIRI=m.InMemoryTripleStore=m.OBSIDIAN_VAULT_SCHEME=m.vaultPathToIRI=m.NullLogger=m.RDFSerializer=m.FilenameValidator=m.EffortSortingHelpers=m.MetadataExtractor=m.MetadataHelpers=m.WikiLinkHelpers=m.DateFormatter=m.FrontmatterService=m.CriticalityZoneUUIDs=m.CriticalityZoneService=m.getTemplateByName=m.validateParameters=m.fillTemplate=m.findMatchingTemplates=m.findClassByTerm=m.KNOWN_CLASSES=m.KNOWN_PROTOTYPES=m.EFFORT_STATUSES=m.ASSET_CLASSES=m.PREDICATES=m.SPARQL_PREFIXES=m.SPARQL_TEMPLATES=m.DEFAULT_NL_TO_SPARQL_CONFIG=m.NLToSPARQLService=m.TypeRegistry=m.GraphQueryService=m.FixMissingLabelService=m.ArchiveAssetService=m.GenericAssetCreationService=m.URIConstructionService=m.SessionEventService=m.AssetConversionService=m.EnumValueResolver=m.ClassHierarchyResolver=m.PropertySchemaResolver=m.PlanningService=m.AlgorithmExtractor=m.DynamicFrontmatterGenerator=m.SupervisionCreationService=m.StatusTimestampService=m.RenameToUidService=void 0;m.CaseWhenTransformerError=m.CaseWhenTransformer=m.ResultSerializer=m.createIncrementalIndexer=m.IncrementalIndexer=m.createSPARQLResultCache=m.SPARQLResultCache=m.QueryPlanCache=m.createDoubleLiteral=m.createDecimalLiteral=m.getNumericValue=m.createPercentileAggregate=m.modeAggregate=m.stddevAggregate=m.varianceAggregate=m.medianAggregate=m.EXO_AGGREGATE_NS=m.BUILT_IN_AGGREGATES=m.CustomAggregateError=m.CustomAggregateRegistry=m.AggregateFunctions=m.BuiltInFunctions=m.SolutionMapping=m.UpdateExecutorError=m.UpdateExecutor=m.QueryExecutor=m.ExoQLQueryExecutor=m.DescribeExecutor=m.ConstructExecutor=m.UnionExecutor=m.OptionalExecutor=m.FilterExecutor=m.BGPExecutor=m.AlgebraSerializer=m.AlgebraOptimizer=m.AlgebraTranslator=m.ExoQLAlgebraTranslator=m.DescribeOptionsTransformerError=m.DescribeOptionsTransformer=m.SPARQLParseError=m.SPARQLParser=m.ExoQLParser=m.NoteToRDFConverter=m.SOURCE_VARIABLE=m.SourceAnnotator=m.INFERRED_GRAPH=m.PrototypeChainMaterializer=m.PropertyCardinalityRegistry=m.NonInheritablePropertyRegistry=m.RDFSInferenceEngine=void 0;m.selectByPriority=m.LayoutSelector=m.isPropertiesBlock=m.isLayoutBlockFrontmatter=m.isBacklinksTableBlock=m.createLayoutBlockFromFrontmatter=m.PROPERTIES_BLOCK_CLASS_UID=m.PROPERTIES_BLOCK_CLASS_IRI=m.BACKLINKS_TABLE_BLOCK_CLASS_UID=m.BACKLINKS_TABLE_BLOCK_CLASS_IRI=m.isLayoutFrontmatter=m.isLayout=m.createLayoutFromFrontmatter=m.LAYOUT_CLASS_UID=m.LAYOUT_CLASS_IRI=m.RelationColumnSetResolver=m.normalizeRelationColumnSetRef=m.isRelationColumnSetFrontmatter=m.isRelationColumnSet=m.createRelationColumnSetFromFrontmatter=m.RELATION_COLUMN_SET_CLASS_UID=m.RELATION_COLUMN_SET_CLASS_IRI=m.ExoQLError=m.ExoQL=m.createStreamingSource=m.StreamingLoader=m.resetGlobalPool=m.getGlobalPool=m.MemoryPool=m.CompactGraphStore=m.StringTable=m.DEFAULT_COLORS=m.NODE_FLAGS=m.container=m.resetContainer=m.getContainer=m.createChildContainer=m.registerCoreServices=m.DI_TOKENS=m.DEFAULT_FLEETING_NOTE_CLASS_UID=m.DEFAULT_INBOX_FOLDER=m.DEFAULT_OWNER_IDENTITY=m.VaultSettings=m.TransactionError=m.TripleNotFoundError=m.TripleAlreadyExistsError=m.FileAlreadyExistsError=m.FileNotFoundError=m.FilterContainsOptimizer=m.VaultPrefixTransformer=void 0;m.TripleClassHierarchy=m.IDLE_TIMEOUT_MS=m.DEFAULT_SOCKET_PATH=m.ValidatorDaemon=m.ShaclShapeRegistry=m.shaclValidate=m.Namespace=m.ShapeRegistry=m.ShapeLoader=void 0;ri(hu(),m);ri(hc(),m);var Ba=Dy();Object.defineProperty(m,"EFFORT_STATUS_CONFIG",{enumerable:!0,get:o(function(){return Ba.EFFORT_STATUS_CONFIG},"get")});Object.defineProperty(m,"STATUS_NAME_TO_ENUM",{enumerable:!0,get:o(function(){return Ba.STATUS_NAME_TO_ENUM},"get")});Object.defineProperty(m,"STATUS_NAME_TO_WIKILINK",{enumerable:!0,get:o(function(){return Ba.STATUS_NAME_TO_WIKILINK},"get")});Object.defineProperty(m,"EFFORT_STATUS_OPTIONS",{enumerable:!0,get:o(function(){return Ba.EFFORT_STATUS_OPTIONS},"get")});Object.defineProperty(m,"normalizeEffortStatus",{enumerable:!0,get:o(function(){return Ba.normalizeEffortStatus},"get")});Object.defineProperty(m,"isDoneStatus",{enumerable:!0,get:o(function(){return Ba.isDoneStatus},"get")});Object.defineProperty(m,"isTrashedStatus",{enumerable:!0,get:o(function(){return Ba.isTrashedStatus},"get")});Object.defineProperty(m,"getEffortStatusLabel",{enumerable:!0,get:o(function(){return Ba.getEffortStatusLabel},"get")});var zV=po();Object.defineProperty(m,"GroundingType",{enumerable:!0,get:o(function(){return zV.GroundingType},"get")});var cf=Ny();Object.defineProperty(m,"CommandProperty",{enumerable:!0,get:o(function(){return cf.CommandProperty},"get")});Object.defineProperty(m,"PreconditionProperty",{enumerable:!0,get:o(function(){return cf.PreconditionProperty},"get")});Object.defineProperty(m,"GroundingProperty",{enumerable:!0,get:o(function(){return cf.GroundingProperty},"get")});Object.defineProperty(m,"CommandBindingProperty",{enumerable:!0,get:o(function(){return cf.CommandBindingProperty},"get")});Object.defineProperty(m,"CommandBindingStyleProperty",{enumerable:!0,get:o(function(){return cf.CommandBindingStyleProperty},"get")});var yl=Ly();Object.defineProperty(m,"COMMAND_VARIANT_VALUES",{enumerable:!0,get:o(function(){return yl.COMMAND_VARIANT_VALUES},"get")});Object.defineProperty(m,"LABEL_CLASS_VALUES",{enumerable:!0,get:o(function(){return yl.LABEL_CLASS_VALUES},"get")});Object.defineProperty(m,"STYLE_SOURCE_VALUES",{enumerable:!0,get:o(function(){return yl.STYLE_SOURCE_VALUES},"get")});Object.defineProperty(m,"isCommandVariant",{enumerable:!0,get:o(function(){return yl.isCommandVariant},"get")});Object.defineProperty(m,"isLabelClass",{enumerable:!0,get:o(function(){return yl.isLabelClass},"get")});Object.defineProperty(m,"isStyleSource",{enumerable:!0,get:o(function(){return yl.isStyleSource},"get")});var Im=A2();Object.defineProperty(m,"isCommandFrontmatter",{enumerable:!0,get:o(function(){return Im.isCommandFrontmatter},"get")});Object.defineProperty(m,"isPreconditionFrontmatter",{enumerable:!0,get:o(function(){return Im.isPreconditionFrontmatter},"get")});Object.defineProperty(m,"isGroundingFrontmatter",{enumerable:!0,get:o(function(){return Im.isGroundingFrontmatter},"get")});Object.defineProperty(m,"isCommandBindingFrontmatter",{enumerable:!0,get:o(function(){return Im.isCommandBindingFrontmatter},"get")});ri(x2(),m);ri(I2(),m);ri(ky(),m);ri(jy(),m);ri(R2(),m);ri(F2(),m);ri(_0(),m);ri(ST(),m);var oI=Yd();Object.defineProperty(m,"PropertyFieldType",{enumerable:!0,get:o(function(){return oI.PropertyFieldType},"get")});Object.defineProperty(m,"rangeToFieldType",{enumerable:!0,get:o(function(){return oI.rangeToFieldType},"get")});var Sw=v0();Object.defineProperty(m,"propertyNameToUri",{enumerable:!0,get:o(function(){return Sw.propertyNameToUri},"get")});Object.defineProperty(m,"uriToPropertyName",{enumerable:!0,get:o(function(){return Sw.uriToPropertyName},"get")});Object.defineProperty(m,"extractPropertyLabel",{enumerable:!0,get:o(function(){return Sw.extractPropertyLabel},"get")});var HV=K3();Object.defineProperty(m,"CommandResolver",{enumerable:!0,get:o(function(){return HV.CommandResolver},"get")});var QV=X3();Object.defineProperty(m,"PreconditionEvaluator",{enumerable:!0,get:o(function(){return QV.PreconditionEvaluator},"get")});var cI=tA();Object.defineProperty(m,"GroundingExecutor",{enumerable:!0,get:o(function(){return cI.GroundingExecutor},"get")});Object.defineProperty(m,"ServiceRegistry",{enumerable:!0,get:o(function(){return cI.ServiceRegistry},"get")});var KV=rA();Object.defineProperty(m,"CommandExecutionFlow",{enumerable:!0,get:o(function(){return KV.CommandExecutionFlow},"get")});var YV=H1();Object.defineProperty(m,"TaskStatusService",{enumerable:!0,get:o(function(){return YV.TaskStatusService},"get")});var XV=X1();Object.defineProperty(m,"AreaCreationService",{enumerable:!0,get:o(function(){return XV.AreaCreationService},"get")});var JV=Z1();Object.defineProperty(m,"AreaHierarchyBuilder",{enumerable:!0,get:o(function(){return JV.AreaHierarchyBuilder},"get")});var ZV=tb();Object.defineProperty(m,"ClassCreationService",{enumerable:!0,get:o(function(){return ZV.ClassCreationService},"get")});var eB=nb();Object.defineProperty(m,"ConceptCreationService",{enumerable:!0,get:o(function(){return eB.ConceptCreationService},"get")});var tB=Cp();Object.defineProperty(m,"EffortStatusWorkflow",{enumerable:!0,get:o(function(){return tB.EffortStatusWorkflow},"get")});var rB=Gu();Object.defineProperty(m,"WorkflowEngine",{enumerable:!0,get:o(function(){return rB.WorkflowEngine},"get")});var nB=L1();Object.defineProperty(m,"WorkflowResolver",{enumerable:!0,get:o(function(){return nB.WorkflowResolver},"get")});var iB=gA();Object.defineProperty(m,"InstantiationRuleResolver",{enumerable:!0,get:o(function(){return iB.InstantiationRuleResolver},"get")});var sB=yA();Object.defineProperty(m,"VisibilityGenerator",{enumerable:!0,get:o(function(){return sB.VisibilityGenerator},"get")});var aB=_A();Object.defineProperty(m,"WorkflowCommandAdapter",{enumerable:!0,get:o(function(){return aB.WorkflowCommandAdapter},"get")});var oB=ub();Object.defineProperty(m,"EffortVotingService",{enumerable:!0,get:o(function(){return oB.EffortVotingService},"get")});var cB=db();Object.defineProperty(m,"FolderRepairService",{enumerable:!0,get:o(function(){return cB.FolderRepairService},"get")});var lB=pb();Object.defineProperty(m,"LabelToAliasService",{enumerable:!0,get:o(function(){return lB.LabelToAliasService},"get")});var uB=Da();Object.defineProperty(m,"LoggingService",{enumerable:!0,get:o(function(){return uB.LoggingService},"get")});var fB=yb();Object.defineProperty(m,"PropertyCleanupService",{enumerable:!0,get:o(function(){return fB.PropertyCleanupService},"get")});var dB=bb();Object.defineProperty(m,"RenameToUidService",{enumerable:!0,get:o(function(){return dB.RenameToUidService},"get")});var hB=Op();Object.defineProperty(m,"StatusTimestampService",{enumerable:!0,get:o(function(){return hB.StatusTimestampService},"get")});var pB=vb();Object.defineProperty(m,"SupervisionCreationService",{enumerable:!0,get:o(function(){return pB.SupervisionCreationService},"get")});var mB=Tb();Object.defineProperty(m,"DynamicFrontmatterGenerator",{enumerable:!0,get:o(function(){return mB.DynamicFrontmatterGenerator},"get")});var gB=xb();Object.defineProperty(m,"AlgorithmExtractor",{enumerable:!0,get:o(function(){return gB.AlgorithmExtractor},"get")});var yB=Cb();Object.defineProperty(m,"PlanningService",{enumerable:!0,get:o(function(){return yB.PlanningService},"get")});var _B=RA();Object.defineProperty(m,"PropertySchemaResolver",{enumerable:!0,get:o(function(){return _B.PropertySchemaResolver},"get")});var bB=OA();Object.defineProperty(m,"ClassHierarchyResolver",{enumerable:!0,get:o(function(){return bB.ClassHierarchyResolver},"get")});var SB=PA();Object.defineProperty(m,"EnumValueResolver",{enumerable:!0,get:o(function(){return SB.EnumValueResolver},"get")});var wB=Db();Object.defineProperty(m,"AssetConversionService",{enumerable:!0,get:o(function(){return wB.AssetConversionService},"get")});var vB=kb();Object.defineProperty(m,"SessionEventService",{enumerable:!0,get:o(function(){return vB.SessionEventService},"get")});var EB=$b();Object.defineProperty(m,"URIConstructionService",{enumerable:!0,get:o(function(){return EB.URIConstructionService},"get")});var TB=Bb();Object.defineProperty(m,"GenericAssetCreationService",{enumerable:!0,get:o(function(){return TB.GenericAssetCreationService},"get")});var AB=BA();Object.defineProperty(m,"ArchiveAssetService",{enumerable:!0,get:o(function(){return AB.ArchiveAssetService},"get")});var xB=qA();Object.defineProperty(m,"FixMissingLabelService",{enumerable:!0,get:o(function(){return xB.FixMissingLabelService},"get")});var IB=WA();Object.defineProperty(m,"GraphQueryService",{enumerable:!0,get:o(function(){return IB.GraphQueryService},"get")});var CB=zA();Object.defineProperty(m,"TypeRegistry",{enumerable:!0,get:o(function(){return CB.TypeRegistry},"get")});var lI=HA();Object.defineProperty(m,"NLToSPARQLService",{enumerable:!0,get:o(function(){return lI.NLToSPARQLService},"get")});Object.defineProperty(m,"DEFAULT_NL_TO_SPARQL_CONFIG",{enumerable:!0,get:o(function(){return lI.DEFAULT_NL_TO_SPARQL_CONFIG},"get")});var ni=zb();Object.defineProperty(m,"SPARQL_TEMPLATES",{enumerable:!0,get:o(function(){return ni.SPARQL_TEMPLATES},"get")});Object.defineProperty(m,"SPARQL_PREFIXES",{enumerable:!0,get:o(function(){return ni.SPARQL_PREFIXES},"get")});Object.defineProperty(m,"PREDICATES",{enumerable:!0,get:o(function(){return ni.PREDICATES},"get")});Object.defineProperty(m,"ASSET_CLASSES",{enumerable:!0,get:o(function(){return ni.ASSET_CLASSES},"get")});Object.defineProperty(m,"EFFORT_STATUSES",{enumerable:!0,get:o(function(){return ni.EFFORT_STATUSES},"get")});Object.defineProperty(m,"KNOWN_PROTOTYPES",{enumerable:!0,get:o(function(){return ni.KNOWN_PROTOTYPES},"get")});Object.defineProperty(m,"KNOWN_CLASSES",{enumerable:!0,get:o(function(){return ni.KNOWN_CLASSES},"get")});Object.defineProperty(m,"findClassByTerm",{enumerable:!0,get:o(function(){return ni.findClassByTerm},"get")});Object.defineProperty(m,"findMatchingTemplates",{enumerable:!0,get:o(function(){return ni.findMatchingTemplates},"get")});Object.defineProperty(m,"fillTemplate",{enumerable:!0,get:o(function(){return ni.fillTemplate},"get")});Object.defineProperty(m,"validateParameters",{enumerable:!0,get:o(function(){return ni.validateParameters},"get")});Object.defineProperty(m,"getTemplateByName",{enumerable:!0,get:o(function(){return ni.getTemplateByName},"get")});var uI=Kb();Object.defineProperty(m,"CriticalityZoneService",{enumerable:!0,get:o(function(){return uI.CriticalityZoneService},"get")});Object.defineProperty(m,"CriticalityZoneUUIDs",{enumerable:!0,get:o(function(){return uI.CriticalityZoneUUIDs},"get")});var RB=ls();Object.defineProperty(m,"FrontmatterService",{enumerable:!0,get:o(function(){return RB.FrontmatterService},"get")});var OB=In();Object.defineProperty(m,"DateFormatter",{enumerable:!0,get:o(function(){return OB.DateFormatter},"get")});var PB=ts();Object.defineProperty(m,"WikiLinkHelpers",{enumerable:!0,get:o(function(){return PB.WikiLinkHelpers},"get")});var FB=Ks();Object.defineProperty(m,"MetadataHelpers",{enumerable:!0,get:o(function(){return FB.MetadataHelpers},"get")});var DB=K1();Object.defineProperty(m,"MetadataExtractor",{enumerable:!0,get:o(function(){return DB.MetadataExtractor},"get")});var NB=KA();Object.defineProperty(m,"EffortSortingHelpers",{enumerable:!0,get:o(function(){return NB.EffortSortingHelpers},"get")});var LB=YA();Object.defineProperty(m,"FilenameValidator",{enumerable:!0,get:o(function(){return LB.FilenameValidator},"get")});var kB=nx();Object.defineProperty(m,"RDFSerializer",{enumerable:!0,get:o(function(){return kB.RDFSerializer},"get")});var jB=bc();Object.defineProperty(m,"NullLogger",{enumerable:!0,get:o(function(){return jB.NullLogger},"get")});var fI=oS();Object.defineProperty(m,"vaultPathToIRI",{enumerable:!0,get:o(function(){return fI.vaultPathToIRI},"get")});Object.defineProperty(m,"OBSIDIAN_VAULT_SCHEME",{enumerable:!0,get:o(function(){return fI.OBSIDIAN_VAULT_SCHEME},"get")});var MB=q1();Object.defineProperty(m,"InMemoryTripleStore",{enumerable:!0,get:o(function(){return MB.InMemoryTripleStore},"get")});var $B=Ee();Object.defineProperty(m,"DomainIRI",{enumerable:!0,get:o(function(){return $B.IRI},"get")});var VB=je();Object.defineProperty(m,"DomainLiteral",{enumerable:!0,get:o(function(){return VB.Literal},"get")});var BB=$t();Object.defineProperty(m,"DomainBlankNode",{enumerable:!0,get:o(function(){return BB.BlankNode},"get")});var UB=Kn();Object.defineProperty(m,"DomainTriple",{enumerable:!0,get:o(function(){return UB.Triple},"get")});var qB=lS();Object.defineProperty(m,"RDFVocabularyMapper",{enumerable:!0,get:o(function(){return qB.RDFVocabularyMapper},"get")});var WB=sx();Object.defineProperty(m,"RDFSInferenceEngine",{enumerable:!0,get:o(function(){return WB.RDFSInferenceEngine},"get")});var GB=hS();Object.defineProperty(m,"NonInheritablePropertyRegistry",{enumerable:!0,get:o(function(){return GB.NonInheritablePropertyRegistry},"get")});var zB=gS();Object.defineProperty(m,"PropertyCardinalityRegistry",{enumerable:!0,get:o(function(){return zB.PropertyCardinalityRegistry},"get")});var dI=bS();Object.defineProperty(m,"PrototypeChainMaterializer",{enumerable:!0,get:o(function(){return dI.PrototypeChainMaterializer},"get")});Object.defineProperty(m,"INFERRED_GRAPH",{enumerable:!0,get:o(function(){return dI.INFERRED_GRAPH},"get")});var hI=wS();Object.defineProperty(m,"SourceAnnotator",{enumerable:!0,get:o(function(){return hI.SourceAnnotator},"get")});Object.defineProperty(m,"SOURCE_VARIABLE",{enumerable:!0,get:o(function(){return hI.SOURCE_VARIABLE},"get")});var HB=ES();Object.defineProperty(m,"NoteToRDFConverter",{enumerable:!0,get:o(function(){return HB.NoteToRDFConverter},"get")});var ww=Rc();Object.defineProperty(m,"ExoQLParser",{enumerable:!0,get:o(function(){return ww.ExoQLParser},"get")});Object.defineProperty(m,"SPARQLParser",{enumerable:!0,get:o(function(){return ww.SPARQLParser},"get")});Object.defineProperty(m,"SPARQLParseError",{enumerable:!0,get:o(function(){return ww.SPARQLParseError},"get")});var pI=S_();Object.defineProperty(m,"DescribeOptionsTransformer",{enumerable:!0,get:o(function(){return pI.DescribeOptionsTransformer},"get")});Object.defineProperty(m,"DescribeOptionsTransformerError",{enumerable:!0,get:o(function(){return pI.DescribeOptionsTransformerError},"get")});var mI=Pc();Object.defineProperty(m,"ExoQLAlgebraTranslator",{enumerable:!0,get:o(function(){return mI.ExoQLAlgebraTranslator},"get")});Object.defineProperty(m,"AlgebraTranslator",{enumerable:!0,get:o(function(){return mI.AlgebraTranslator},"get")});var QB=mx();Object.defineProperty(m,"AlgebraOptimizer",{enumerable:!0,get:o(function(){return QB.AlgebraOptimizer},"get")});var KB=gx();Object.defineProperty(m,"AlgebraSerializer",{enumerable:!0,get:o(function(){return KB.AlgebraSerializer},"get")});var YB=M_();Object.defineProperty(m,"BGPExecutor",{enumerable:!0,get:o(function(){return YB.BGPExecutor},"get")});var XB=np();Object.defineProperty(m,"FilterExecutor",{enumerable:!0,get:o(function(){return XB.FilterExecutor},"get")});var JB=n1();Object.defineProperty(m,"OptionalExecutor",{enumerable:!0,get:o(function(){return JB.OptionalExecutor},"get")});var ZB=s1();Object.defineProperty(m,"UnionExecutor",{enumerable:!0,get:o(function(){return ZB.UnionExecutor},"get")});var eU=m1();Object.defineProperty(m,"ConstructExecutor",{enumerable:!0,get:o(function(){return eU.ConstructExecutor},"get")});var tU=_x();Object.defineProperty(m,"DescribeExecutor",{enumerable:!0,get:o(function(){return tU.DescribeExecutor},"get")});var gI=Xc();Object.defineProperty(m,"ExoQLQueryExecutor",{enumerable:!0,get:o(function(){return gI.ExoQLQueryExecutor},"get")});Object.defineProperty(m,"QueryExecutor",{enumerable:!0,get:o(function(){return gI.QueryExecutor},"get")});var yI=Sx();Object.defineProperty(m,"UpdateExecutor",{enumerable:!0,get:o(function(){return yI.UpdateExecutor},"get")});Object.defineProperty(m,"UpdateExecutorError",{enumerable:!0,get:o(function(){return yI.UpdateExecutorError},"get")});var rU=ss();Object.defineProperty(m,"SolutionMapping",{enumerable:!0,get:o(function(){return rU.SolutionMapping},"get")});var nU=rp();Object.defineProperty(m,"BuiltInFunctions",{enumerable:!0,get:o(function(){return nU.BuiltInFunctions},"get")});var iU=vx();Object.defineProperty(m,"AggregateFunctions",{enumerable:!0,get:o(function(){return iU.AggregateFunctions},"get")});var _I=c1();Object.defineProperty(m,"CustomAggregateRegistry",{enumerable:!0,get:o(function(){return _I.CustomAggregateRegistry},"get")});Object.defineProperty(m,"CustomAggregateError",{enumerable:!0,get:o(function(){return _I.CustomAggregateError},"get")});var Ss=l1();Object.defineProperty(m,"BUILT_IN_AGGREGATES",{enumerable:!0,get:o(function(){return Ss.BUILT_IN_AGGREGATES},"get")});Object.defineProperty(m,"EXO_AGGREGATE_NS",{enumerable:!0,get:o(function(){return Ss.EXO_AGGREGATE_NS},"get")});Object.defineProperty(m,"medianAggregate",{enumerable:!0,get:o(function(){return Ss.medianAggregate},"get")});Object.defineProperty(m,"varianceAggregate",{enumerable:!0,get:o(function(){return Ss.varianceAggregate},"get")});Object.defineProperty(m,"stddevAggregate",{enumerable:!0,get:o(function(){return Ss.stddevAggregate},"get")});Object.defineProperty(m,"modeAggregate",{enumerable:!0,get:o(function(){return Ss.modeAggregate},"get")});Object.defineProperty(m,"createPercentileAggregate",{enumerable:!0,get:o(function(){return Ss.createPercentileAggregate},"get")});Object.defineProperty(m,"getNumericValue",{enumerable:!0,get:o(function(){return Ss.getNumericValue},"get")});Object.defineProperty(m,"createDecimalLiteral",{enumerable:!0,get:o(function(){return Ss.createDecimalLiteral},"get")});Object.defineProperty(m,"createDoubleLiteral",{enumerable:!0,get:o(function(){return Ss.createDoubleLiteral},"get")});var sU=Ex();Object.defineProperty(m,"QueryPlanCache",{enumerable:!0,get:o(function(){return sU.QueryPlanCache},"get")});var bI=Tx();Object.defineProperty(m,"SPARQLResultCache",{enumerable:!0,get:o(function(){return bI.SPARQLResultCache},"get")});Object.defineProperty(m,"createSPARQLResultCache",{enumerable:!0,get:o(function(){return bI.createSPARQLResultCache},"get")});var SI=Ax();Object.defineProperty(m,"IncrementalIndexer",{enumerable:!0,get:o(function(){return SI.IncrementalIndexer},"get")});Object.defineProperty(m,"createIncrementalIndexer",{enumerable:!0,get:o(function(){return SI.createIncrementalIndexer},"get")});var aU=xx();Object.defineProperty(m,"ResultSerializer",{enumerable:!0,get:o(function(){return aU.ResultSerializer},"get")});var wI=y_();Object.defineProperty(m,"CaseWhenTransformer",{enumerable:!0,get:o(function(){return wI.CaseWhenTransformer},"get")});Object.defineProperty(m,"CaseWhenTransformerError",{enumerable:!0,get:o(function(){return wI.CaseWhenTransformerError},"get")});var oU=T_();Object.defineProperty(m,"VaultPrefixTransformer",{enumerable:!0,get:o(function(){return oU.VaultPrefixTransformer},"get")});var cU=AS();Object.defineProperty(m,"FilterContainsOptimizer",{enumerable:!0,get:o(function(){return cU.FilterContainsOptimizer},"get")});var vI=Ix();Object.defineProperty(m,"FileNotFoundError",{enumerable:!0,get:o(function(){return vI.FileNotFoundError},"get")});Object.defineProperty(m,"FileAlreadyExistsError",{enumerable:!0,get:o(function(){return vI.FileAlreadyExistsError},"get")});var vw=$1();Object.defineProperty(m,"TripleAlreadyExistsError",{enumerable:!0,get:o(function(){return vw.TripleAlreadyExistsError},"get")});Object.defineProperty(m,"TripleNotFoundError",{enumerable:!0,get:o(function(){return vw.TripleNotFoundError},"get")});Object.defineProperty(m,"TransactionError",{enumerable:!0,get:o(function(){return vw.TransactionError},"get")});var Cm=MS();Object.defineProperty(m,"VaultSettings",{enumerable:!0,get:o(function(){return Cm.VaultSettings},"get")});Object.defineProperty(m,"DEFAULT_OWNER_IDENTITY",{enumerable:!0,get:o(function(){return Cm.DEFAULT_OWNER_IDENTITY},"get")});Object.defineProperty(m,"DEFAULT_INBOX_FOLDER",{enumerable:!0,get:o(function(){return Cm.DEFAULT_INBOX_FOLDER},"get")});Object.defineProperty(m,"DEFAULT_FLEETING_NOTE_CLASS_UID",{enumerable:!0,get:o(function(){return Cm.DEFAULT_FLEETING_NOTE_CLASS_UID},"get")});var lU=Rt();Object.defineProperty(m,"DI_TOKENS",{enumerable:!0,get:o(function(){return lU.DI_TOKENS},"get")});var lf=Cx();Object.defineProperty(m,"registerCoreServices",{enumerable:!0,get:o(function(){return lf.registerCoreServices},"get")});Object.defineProperty(m,"createChildContainer",{enumerable:!0,get:o(function(){return lf.createChildContainer},"get")});Object.defineProperty(m,"getContainer",{enumerable:!0,get:o(function(){return lf.getContainer},"get")});Object.defineProperty(m,"resetContainer",{enumerable:!0,get:o(function(){return lf.resetContainer},"get")});Object.defineProperty(m,"container",{enumerable:!0,get:o(function(){return lf.container},"get")});var oa=Nx();Object.defineProperty(m,"NODE_FLAGS",{enumerable:!0,get:o(function(){return oa.NODE_FLAGS},"get")});Object.defineProperty(m,"DEFAULT_COLORS",{enumerable:!0,get:o(function(){return oa.DEFAULT_COLORS},"get")});Object.defineProperty(m,"StringTable",{enumerable:!0,get:o(function(){return oa.StringTable},"get")});Object.defineProperty(m,"CompactGraphStore",{enumerable:!0,get:o(function(){return oa.CompactGraphStore},"get")});Object.defineProperty(m,"MemoryPool",{enumerable:!0,get:o(function(){return oa.MemoryPool},"get")});Object.defineProperty(m,"getGlobalPool",{enumerable:!0,get:o(function(){return oa.getGlobalPool},"get")});Object.defineProperty(m,"resetGlobalPool",{enumerable:!0,get:o(function(){return oa.resetGlobalPool},"get")});Object.defineProperty(m,"StreamingLoader",{enumerable:!0,get:o(function(){return oa.StreamingLoader},"get")});Object.defineProperty(m,"createStreamingSource",{enumerable:!0,get:o(function(){return oa.createStreamingSource},"get")});var EI=Lx();Object.defineProperty(m,"ExoQL",{enumerable:!0,get:o(function(){return EI.ExoQL},"get")});Object.defineProperty(m,"ExoQLError",{enumerable:!0,get:o(function(){return EI.ExoQLError},"get")});var _l=um();Object.defineProperty(m,"RELATION_COLUMN_SET_CLASS_IRI",{enumerable:!0,get:o(function(){return _l.RELATION_COLUMN_SET_CLASS_IRI},"get")});Object.defineProperty(m,"RELATION_COLUMN_SET_CLASS_UID",{enumerable:!0,get:o(function(){return _l.RELATION_COLUMN_SET_CLASS_UID},"get")});Object.defineProperty(m,"createRelationColumnSetFromFrontmatter",{enumerable:!0,get:o(function(){return _l.createRelationColumnSetFromFrontmatter},"get")});Object.defineProperty(m,"isRelationColumnSet",{enumerable:!0,get:o(function(){return _l.isRelationColumnSet},"get")});Object.defineProperty(m,"isRelationColumnSetFrontmatter",{enumerable:!0,get:o(function(){return _l.isRelationColumnSetFrontmatter},"get")});Object.defineProperty(m,"normalizeRelationColumnSetRef",{enumerable:!0,get:o(function(){return _l.normalizeRef},"get")});var uU=Wx();Object.defineProperty(m,"RelationColumnSetResolver",{enumerable:!0,get:o(function(){return uU.RelationColumnSetResolver},"get")});var uf=um();Object.defineProperty(m,"LAYOUT_CLASS_IRI",{enumerable:!0,get:o(function(){return uf.LAYOUT_CLASS_IRI},"get")});Object.defineProperty(m,"LAYOUT_CLASS_UID",{enumerable:!0,get:o(function(){return uf.LAYOUT_CLASS_UID},"get")});Object.defineProperty(m,"createLayoutFromFrontmatter",{enumerable:!0,get:o(function(){return uf.createLayoutFromFrontmatter},"get")});Object.defineProperty(m,"isLayout",{enumerable:!0,get:o(function(){return uf.isLayout},"get")});Object.defineProperty(m,"isLayoutFrontmatter",{enumerable:!0,get:o(function(){return uf.isLayoutFrontmatter},"get")});var Ua=um();Object.defineProperty(m,"BACKLINKS_TABLE_BLOCK_CLASS_IRI",{enumerable:!0,get:o(function(){return Ua.BACKLINKS_TABLE_BLOCK_CLASS_IRI},"get")});Object.defineProperty(m,"BACKLINKS_TABLE_BLOCK_CLASS_UID",{enumerable:!0,get:o(function(){return Ua.BACKLINKS_TABLE_BLOCK_CLASS_UID},"get")});Object.defineProperty(m,"PROPERTIES_BLOCK_CLASS_IRI",{enumerable:!0,get:o(function(){return Ua.PROPERTIES_BLOCK_CLASS_IRI},"get")});Object.defineProperty(m,"PROPERTIES_BLOCK_CLASS_UID",{enumerable:!0,get:o(function(){return Ua.PROPERTIES_BLOCK_CLASS_UID},"get")});Object.defineProperty(m,"createLayoutBlockFromFrontmatter",{enumerable:!0,get:o(function(){return Ua.createLayoutBlockFromFrontmatter},"get")});Object.defineProperty(m,"isBacklinksTableBlock",{enumerable:!0,get:o(function(){return Ua.isBacklinksTableBlock},"get")});Object.defineProperty(m,"isLayoutBlockFrontmatter",{enumerable:!0,get:o(function(){return Ua.isLayoutBlockFrontmatter},"get")});Object.defineProperty(m,"isPropertiesBlock",{enumerable:!0,get:o(function(){return Ua.isPropertiesBlock},"get")});var TI=zx();Object.defineProperty(m,"LayoutSelector",{enumerable:!0,get:o(function(){return TI.LayoutSelector},"get")});Object.defineProperty(m,"selectByPriority",{enumerable:!0,get:o(function(){return TI.selectByPriority},"get")});ri(tI(),m);var fU=dw();Object.defineProperty(m,"ShapeLoader",{enumerable:!0,get:o(function(){return fU.ShapeLoader},"get")});var dU=cw();Object.defineProperty(m,"ShapeRegistry",{enumerable:!0,get:o(function(){return dU.ShapeRegistry},"get")});var hU=ar();Object.defineProperty(m,"Namespace",{enumerable:!0,get:o(function(){return hU.Namespace},"get")});var AI=pw();Object.defineProperty(m,"shaclValidate",{enumerable:!0,get:o(function(){return AI.validate},"get")});Object.defineProperty(m,"ShaclShapeRegistry",{enumerable:!0,get:o(function(){return AI.ShapeRegistry},"get")});ri(iI(),m);var Ew=aI();Object.defineProperty(m,"ValidatorDaemon",{enumerable:!0,get:o(function(){return Ew.ValidatorDaemon},"get")});Object.defineProperty(m,"DEFAULT_SOCKET_PATH",{enumerable:!0,get:o(function(){return Ew.DEFAULT_SOCKET_PATH},"get")});Object.defineProperty(m,"IDLE_TIMEOUT_MS",{enumerable:!0,get:o(function(){return Ew.IDLE_TIMEOUT_MS},"get")});var pU=_w();Object.defineProperty(m,"TripleClassHierarchy",{enumerable:!0,get:o(function(){return pU.ClassHierarchy},"get")})});var wr=b(Tw=>{"use strict";Tw.fromCallback=function(n){return Object.defineProperty(function(...e){if(typeof e[e.length-1]=="function")n.apply(this,e);else return new Promise((t,r)=>{e.push((i,s)=>i!=null?r(i):t(s)),n.apply(this,e)})},"name",{value:n.name})};Tw.fromPromise=function(n){return Object.defineProperty(function(...e){let t=e[e.length-1];if(typeof t!="function")return n.apply(this,e);e.pop(),n.apply(this,e).then(r=>t(null,r),t)},"name",{value:n.name})}});var II=b((sce,xI)=>{var qa=require("constants"),mU=process.cwd,Rm=null,gU=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Rm||(Rm=mU.call(process)),Rm};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Aw=process.chdir,process.chdir=function(n){Rm=null,Aw.call(process,n)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Aw));var Aw;xI.exports=yU;function yU(n){qa.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&e(n),n.lutimes||t(n),n.chown=s(n.chown),n.fchown=s(n.fchown),n.lchown=s(n.lchown),n.chmod=r(n.chmod),n.fchmod=r(n.fchmod),n.lchmod=r(n.lchmod),n.chownSync=a(n.chownSync),n.fchownSync=a(n.fchownSync),n.lchownSync=a(n.lchownSync),n.chmodSync=i(n.chmodSync),n.fchmodSync=i(n.fchmodSync),n.lchmodSync=i(n.lchmodSync),n.stat=c(n.stat),n.fstat=c(n.fstat),n.lstat=c(n.lstat),n.statSync=l(n.statSync),n.fstatSync=l(n.fstatSync),n.lstatSync=l(n.lstatSync),n.chmod&&!n.lchmod&&(n.lchmod=function(f,d,h){h&&process.nextTick(h)},n.lchmodSync=function(){}),n.chown&&!n.lchown&&(n.lchown=function(f,d,h,p){p&&process.nextTick(p)},n.lchownSync=function(){}),gU==="win32"&&(n.rename=typeof n.rename!="function"?n.rename:(function(f){function d(h,p,y){var S=Date.now(),v=0;f(h,p,o(function w(T){if(T&&(T.code==="EACCES"||T.code==="EPERM"||T.code==="EBUSY")&&Date.now()-S<6e4){setTimeout(function(){n.stat(p,function(C,M){C&&C.code==="ENOENT"?f(h,p,w):y(T)})},v),v<100&&(v+=10);return}y&&y(T)},"CB"))}return o(d,"rename"),Object.setPrototypeOf&&Object.setPrototypeOf(d,f),d})(n.rename)),n.read=typeof n.read!="function"?n.read:(function(f){function d(h,p,y,S,v,w){var T;if(w&&typeof w=="function"){var C=0;T=o(function(M,$,ee){if(M&&M.code==="EAGAIN"&&C<10)return C++,f.call(n,h,p,y,S,v,T);w.apply(this,arguments)},"callback")}return f.call(n,h,p,y,S,v,T)}return o(d,"read"),Object.setPrototypeOf&&Object.setPrototypeOf(d,f),d})(n.read),n.readSync=typeof n.readSync!="function"?n.readSync:(function(f){return function(d,h,p,y,S){for(var v=0;;)try{return f.call(n,d,h,p,y,S)}catch(w){if(w.code==="EAGAIN"&&v<10){v++;continue}throw w}}})(n.readSync);function e(f){f.lchmod=function(d,h,p){f.open(d,qa.O_WRONLY|qa.O_SYMLINK,h,function(y,S){if(y){p&&p(y);return}f.fchmod(S,h,function(v){f.close(S,function(w){p&&p(v||w)})})})},f.lchmodSync=function(d,h){var p=f.openSync(d,qa.O_WRONLY|qa.O_SYMLINK,h),y=!0,S;try{S=f.fchmodSync(p,h),y=!1}finally{if(y)try{f.closeSync(p)}catch{}else f.closeSync(p)}return S}}o(e,"patchLchmod");function t(f){qa.hasOwnProperty("O_SYMLINK")&&f.futimes?(f.lutimes=function(d,h,p,y){f.open(d,qa.O_SYMLINK,function(S,v){if(S){y&&y(S);return}f.futimes(v,h,p,function(w){f.close(v,function(T){y&&y(w||T)})})})},f.lutimesSync=function(d,h,p){var y=f.openSync(d,qa.O_SYMLINK),S,v=!0;try{S=f.futimesSync(y,h,p),v=!1}finally{if(v)try{f.closeSync(y)}catch{}else f.closeSync(y)}return S}):f.futimes&&(f.lutimes=function(d,h,p,y){y&&process.nextTick(y)},f.lutimesSync=function(){})}o(t,"patchLutimes");function r(f){return f&&function(d,h,p){return f.call(n,d,h,function(y){u(y)&&(y=null),p&&p.apply(this,arguments)})}}o(r,"chmodFix");function i(f){return f&&function(d,h){try{return f.call(n,d,h)}catch(p){if(!u(p))throw p}}}o(i,"chmodFixSync");function s(f){return f&&function(d,h,p,y){return f.call(n,d,h,p,function(S){u(S)&&(S=null),y&&y.apply(this,arguments)})}}o(s,"chownFix");function a(f){return f&&function(d,h,p){try{return f.call(n,d,h,p)}catch(y){if(!u(y))throw y}}}o(a,"chownFixSync");function c(f){return f&&function(d,h,p){typeof h=="function"&&(p=h,h=null);function y(S,v){v&&(v.uid<0&&(v.uid+=4294967296),v.gid<0&&(v.gid+=4294967296)),p&&p.apply(this,arguments)}return o(y,"callback"),h?f.call(n,d,h,y):f.call(n,d,y)}}o(c,"statFix");function l(f){return f&&function(d,h){var p=h?f.call(n,d,h):f.call(n,d);return p&&(p.uid<0&&(p.uid+=4294967296),p.gid<0&&(p.gid+=4294967296)),p}}o(l,"statFixSync");function u(f){if(!f||f.code==="ENOSYS")return!0;var d=!process.getuid||process.getuid()!==0;return!!(d&&(f.code==="EINVAL"||f.code==="EPERM"))}o(u,"chownErOk")}o(yU,"patch")});var OI=b((oce,RI)=>{var CI=require("stream").Stream;RI.exports=_U;function _U(n){return{ReadStream:e,WriteStream:t};function e(r,i){if(!(this instanceof e))return new e(r,i);CI.call(this);var s=this;this.path=r,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=64*1024,i=i||{};for(var a=Object.keys(i),c=0,l=a.length;c<l;c++){var u=a[c];this[u]=i[u]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.end===void 0)this.end=1/0;else if(typeof this.end!="number")throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(this.fd!==null){process.nextTick(function(){s._read()});return}n.open(this.path,this.flags,this.mode,function(f,d){if(f){s.emit("error",f),s.readable=!1;return}s.fd=d,s.emit("open",d),s._read()})}function t(r,i){if(!(this instanceof t))return new t(r,i);CI.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var s=Object.keys(i),a=0,c=s.length;a<c;a++){var l=s[a];this[l]=i[l]}if(this.start!==void 0){if(typeof this.start!="number")throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=n.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}o(_U,"legacy")});var FI=b((lce,PI)=>{"use strict";PI.exports=SU;var bU=Object.getPrototypeOf||function(n){return n.__proto__};function SU(n){if(n===null||typeof n!="object")return n;if(n instanceof Object)var e={__proto__:bU(n)};else var e=Object.create(null);return Object.getOwnPropertyNames(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}),e}o(SU,"clone")});var Sl=b((fce,Cw)=>{var Lt=require("fs"),wU=II(),vU=OI(),EU=FI(),Om=require("util"),kr,Fm;typeof Symbol=="function"&&typeof Symbol.for=="function"?(kr=Symbol.for("graceful-fs.queue"),Fm=Symbol.for("graceful-fs.previous")):(kr="___graceful-fs.queue",Fm="___graceful-fs.previous");function TU(){}o(TU,"noop");function LI(n,e){Object.defineProperty(n,kr,{get:o(function(){return e},"get")})}o(LI,"publishQueue");var Wo=TU;Om.debuglog?Wo=Om.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(Wo=o(function(){var n=Om.format.apply(Om,arguments);n="GFS4: "+n.split(/\n/).join(`
456
- GFS4: `),console.error(n)},"debug"));Lt[kr]||(DI=global[kr]||[],LI(Lt,DI),Lt.close=(function(n){function e(t,r){return n.call(Lt,t,function(i){i||NI(),typeof r=="function"&&r.apply(this,arguments)})}return o(e,"close"),Object.defineProperty(e,Fm,{value:n}),e})(Lt.close),Lt.closeSync=(function(n){function e(t){n.apply(Lt,arguments),NI()}return o(e,"closeSync"),Object.defineProperty(e,Fm,{value:n}),e})(Lt.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Wo(Lt[kr]),require("assert").equal(Lt[kr].length,0)}));var DI;global[kr]||LI(global,Lt[kr]);Cw.exports=xw(EU(Lt));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Lt.__patched&&(Cw.exports=xw(Lt),Lt.__patched=!0);function xw(n){wU(n),n.gracefulify=xw,n.createReadStream=$,n.createWriteStream=ee;var e=n.readFile;n.readFile=t;function t(P,D,J){return typeof D=="function"&&(J=D,D=null),qe(P,D,J);function qe(et,ve,$e,Re){return e(et,ve,function(ne){ne&&(ne.code==="EMFILE"||ne.code==="ENFILE")?bl([qe,[et,ve,$e],ne,Re||Date.now(),Date.now()]):typeof $e=="function"&&$e.apply(this,arguments)})}o(qe,"go$readFile")}o(t,"readFile");var r=n.writeFile;n.writeFile=i;function i(P,D,J,qe){return typeof J=="function"&&(qe=J,J=null),et(P,D,J,qe);function et(ve,$e,Re,ne,Z){return r(ve,$e,Re,function(U){U&&(U.code==="EMFILE"||U.code==="ENFILE")?bl([et,[ve,$e,Re,ne],U,Z||Date.now(),Date.now()]):typeof ne=="function"&&ne.apply(this,arguments)})}o(et,"go$writeFile")}o(i,"writeFile");var s=n.appendFile;s&&(n.appendFile=a);function a(P,D,J,qe){return typeof J=="function"&&(qe=J,J=null),et(P,D,J,qe);function et(ve,$e,Re,ne,Z){return s(ve,$e,Re,function(U){U&&(U.code==="EMFILE"||U.code==="ENFILE")?bl([et,[ve,$e,Re,ne],U,Z||Date.now(),Date.now()]):typeof ne=="function"&&ne.apply(this,arguments)})}o(et,"go$appendFile")}o(a,"appendFile");var c=n.copyFile;c&&(n.copyFile=l);function l(P,D,J,qe){return typeof J=="function"&&(qe=J,J=0),et(P,D,J,qe);function et(ve,$e,Re,ne,Z){return c(ve,$e,Re,function(U){U&&(U.code==="EMFILE"||U.code==="ENFILE")?bl([et,[ve,$e,Re,ne],U,Z||Date.now(),Date.now()]):typeof ne=="function"&&ne.apply(this,arguments)})}o(et,"go$copyFile")}o(l,"copyFile");var u=n.readdir;n.readdir=d;var f=/^v[0-5]\./;function d(P,D,J){typeof D=="function"&&(J=D,D=null);var qe=f.test(process.version)?o(function($e,Re,ne,Z){return u($e,et($e,Re,ne,Z))},"go$readdir"):o(function($e,Re,ne,Z){return u($e,Re,et($e,Re,ne,Z))},"go$readdir");return qe(P,D,J);function et(ve,$e,Re,ne){return function(Z,U){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?bl([qe,[ve,$e,Re],Z,ne||Date.now(),Date.now()]):(U&&U.sort&&U.sort(),typeof Re=="function"&&Re.call(this,Z,U))}}}if(o(d,"readdir"),process.version.substr(0,4)==="v0.8"){var h=vU(n);w=h.ReadStream,C=h.WriteStream}var p=n.ReadStream;p&&(w.prototype=Object.create(p.prototype),w.prototype.open=T);var y=n.WriteStream;y&&(C.prototype=Object.create(y.prototype),C.prototype.open=M),Object.defineProperty(n,"ReadStream",{get:o(function(){return w},"get"),set:o(function(P){w=P},"set"),enumerable:!0,configurable:!0}),Object.defineProperty(n,"WriteStream",{get:o(function(){return C},"get"),set:o(function(P){C=P},"set"),enumerable:!0,configurable:!0});var S=w;Object.defineProperty(n,"FileReadStream",{get:o(function(){return S},"get"),set:o(function(P){S=P},"set"),enumerable:!0,configurable:!0});var v=C;Object.defineProperty(n,"FileWriteStream",{get:o(function(){return v},"get"),set:o(function(P){v=P},"set"),enumerable:!0,configurable:!0});function w(P,D){return this instanceof w?(p.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}o(w,"ReadStream");function T(){var P=this;z(P.path,P.flags,P.mode,function(D,J){D?(P.autoClose&&P.destroy(),P.emit("error",D)):(P.fd=J,P.emit("open",J),P.read())})}o(T,"ReadStream$open");function C(P,D){return this instanceof C?(y.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}o(C,"WriteStream");function M(){var P=this;z(P.path,P.flags,P.mode,function(D,J){D?(P.destroy(),P.emit("error",D)):(P.fd=J,P.emit("open",J))})}o(M,"WriteStream$open");function $(P,D){return new n.ReadStream(P,D)}o($,"createReadStream");function ee(P,D){return new n.WriteStream(P,D)}o(ee,"createWriteStream");var B=n.open;n.open=z;function z(P,D,J,qe){return typeof J=="function"&&(qe=J,J=null),et(P,D,J,qe);function et(ve,$e,Re,ne,Z){return B(ve,$e,Re,function(U,it){U&&(U.code==="EMFILE"||U.code==="ENFILE")?bl([et,[ve,$e,Re,ne],U,Z||Date.now(),Date.now()]):typeof ne=="function"&&ne.apply(this,arguments)})}o(et,"go$open")}return o(z,"open"),n}o(xw,"patch");function bl(n){Wo("ENQUEUE",n[0].name,n[1]),Lt[kr].push(n),Iw()}o(bl,"enqueue");var Pm;function NI(){for(var n=Date.now(),e=0;e<Lt[kr].length;++e)Lt[kr][e].length>2&&(Lt[kr][e][3]=n,Lt[kr][e][4]=n);Iw()}o(NI,"resetQueue");function Iw(){if(clearTimeout(Pm),Pm=void 0,Lt[kr].length!==0){var n=Lt[kr].shift(),e=n[0],t=n[1],r=n[2],i=n[3],s=n[4];if(i===void 0)Wo("RETRY",e.name,t),e.apply(null,t);else if(Date.now()-i>=6e4){Wo("TIMEOUT",e.name,t);var a=t.pop();typeof a=="function"&&a.call(null,r)}else{var c=Date.now()-s,l=Math.max(s-i,1),u=Math.min(l*1.2,100);c>=u?(Wo("RETRY",e.name,t),e.apply(null,t.concat([i]))):Lt[kr].push(n)}Pm===void 0&&(Pm=setTimeout(Iw,0))}}o(Iw,"retry")});var pn=b(ca=>{"use strict";var kI=wr().fromCallback,hn=Sl(),AU=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(n=>typeof hn[n]=="function");Object.assign(ca,hn);AU.forEach(n=>{ca[n]=kI(hn[n])});ca.exists=function(n,e){return typeof e=="function"?hn.exists(n,e):new Promise(t=>hn.exists(n,t))};ca.read=function(n,e,t,r,i,s){return typeof s=="function"?hn.read(n,e,t,r,i,s):new Promise((a,c)=>{hn.read(n,e,t,r,i,(l,u,f)=>{if(l)return c(l);a({bytesRead:u,buffer:f})})})};ca.write=function(n,e,...t){return typeof t[t.length-1]=="function"?hn.write(n,e,...t):new Promise((r,i)=>{hn.write(n,e,...t,(s,a,c)=>{if(s)return i(s);r({bytesWritten:a,buffer:c})})})};ca.readv=function(n,e,...t){return typeof t[t.length-1]=="function"?hn.readv(n,e,...t):new Promise((r,i)=>{hn.readv(n,e,...t,(s,a,c)=>{if(s)return i(s);r({bytesRead:a,buffers:c})})})};ca.writev=function(n,e,...t){return typeof t[t.length-1]=="function"?hn.writev(n,e,...t):new Promise((r,i)=>{hn.writev(n,e,...t,(s,a,c)=>{if(s)return i(s);r({bytesWritten:a,buffers:c})})})};typeof hn.realpath.native=="function"?ca.realpath.native=kI(hn.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var MI=b((pce,jI)=>{"use strict";var xU=require("path");jI.exports.checkPath=o(function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(xU.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}},"checkPath")});var UI=b((gce,Rw)=>{"use strict";var $I=pn(),{checkPath:VI}=MI(),BI=o(n=>{let e={mode:511};return typeof n=="number"?n:{...e,...n}.mode},"getMode");Rw.exports.makeDir=async(n,e)=>(VI(n),$I.mkdir(n,{mode:BI(e),recursive:!0}));Rw.exports.makeDirSync=(n,e)=>(VI(n),$I.mkdirSync(n,{mode:BI(e),recursive:!0}))});var $i=b((_ce,qI)=>{"use strict";var IU=wr().fromPromise,{makeDir:CU,makeDirSync:Ow}=UI(),Pw=IU(CU);qI.exports={mkdirs:Pw,mkdirsSync:Ow,mkdirp:Pw,mkdirpSync:Ow,ensureDir:Pw,ensureDirSync:Ow}});var Wa=b((bce,GI)=>{"use strict";var RU=wr().fromPromise,WI=pn();function OU(n){return WI.access(n).then(()=>!0).catch(()=>!1)}o(OU,"pathExists");GI.exports={pathExists:RU(OU),pathExistsSync:WI.existsSync}});var Fw=b((wce,zI)=>{"use strict";var wl=pn(),PU=wr().fromPromise;async function FU(n,e,t){let r=await wl.open(n,"r+"),i=null;try{await wl.futimes(r,e,t)}finally{try{await wl.close(r)}catch(s){i=s}}if(i)throw i}o(FU,"utimesMillis");function DU(n,e,t){let r=wl.openSync(n,"r+");return wl.futimesSync(r,e,t),wl.closeSync(r)}o(DU,"utimesMillisSync");zI.exports={utimesMillis:PU(FU),utimesMillisSync:DU}});var Go=b((Ece,YI)=>{"use strict";var vl=pn(),vr=require("path"),HI=wr().fromPromise;function NU(n,e,t){let r=t.dereference?i=>vl.stat(i,{bigint:!0}):i=>vl.lstat(i,{bigint:!0});return Promise.all([r(n),r(e).catch(i=>{if(i.code==="ENOENT")return null;throw i})]).then(([i,s])=>({srcStat:i,destStat:s}))}o(NU,"getStats");function LU(n,e,t){let r,i=t.dereference?a=>vl.statSync(a,{bigint:!0}):a=>vl.lstatSync(a,{bigint:!0}),s=i(n);try{r=i(e)}catch(a){if(a.code==="ENOENT")return{srcStat:s,destStat:null};throw a}return{srcStat:s,destStat:r}}o(LU,"getStatsSync");async function kU(n,e,t,r){let{srcStat:i,destStat:s}=await NU(n,e,r);if(s){if(ff(i,s)){let a=vr.basename(n),c=vr.basename(e);if(t==="move"&&a!==c&&a.toLowerCase()===c.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${n}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${n}'.`)}if(i.isDirectory()&&Dw(n,e))throw new Error(Dm(n,e,t));return{srcStat:i,destStat:s}}o(kU,"checkPaths");function jU(n,e,t,r){let{srcStat:i,destStat:s}=LU(n,e,r);if(s){if(ff(i,s)){let a=vr.basename(n),c=vr.basename(e);if(t==="move"&&a!==c&&a.toLowerCase()===c.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${n}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${n}'.`)}if(i.isDirectory()&&Dw(n,e))throw new Error(Dm(n,e,t));return{srcStat:i,destStat:s}}o(jU,"checkPathsSync");async function QI(n,e,t,r){let i=vr.resolve(vr.dirname(n)),s=vr.resolve(vr.dirname(t));if(s===i||s===vr.parse(s).root)return;let a;try{a=await vl.stat(s,{bigint:!0})}catch(c){if(c.code==="ENOENT")return;throw c}if(ff(e,a))throw new Error(Dm(n,t,r));return QI(n,e,s,r)}o(QI,"checkParentPaths");function KI(n,e,t,r){let i=vr.resolve(vr.dirname(n)),s=vr.resolve(vr.dirname(t));if(s===i||s===vr.parse(s).root)return;let a;try{a=vl.statSync(s,{bigint:!0})}catch(c){if(c.code==="ENOENT")return;throw c}if(ff(e,a))throw new Error(Dm(n,t,r));return KI(n,e,s,r)}o(KI,"checkParentPathsSync");function ff(n,e){return e.ino!==void 0&&e.dev!==void 0&&e.ino===n.ino&&e.dev===n.dev}o(ff,"areIdentical");function Dw(n,e){let t=vr.resolve(n).split(vr.sep).filter(i=>i),r=vr.resolve(e).split(vr.sep).filter(i=>i);return t.every((i,s)=>r[s]===i)}o(Dw,"isSrcSubdir");function Dm(n,e,t){return`Cannot ${t} '${n}' to a subdirectory of itself, '${e}'.`}o(Dm,"errMsg");YI.exports={checkPaths:HI(kU),checkPathsSync:jU,checkParentPaths:HI(QI),checkParentPathsSync:KI,isSrcSubdir:Dw,areIdentical:ff}});var JI=b((Ace,XI)=>{"use strict";async function MU(n,e){let t=[];for await(let r of n)t.push(e(r).then(()=>null,i=>i??new Error("unknown error")));await Promise.all(t.map(r=>r.then(i=>{if(i!==null)throw i})))}o(MU,"asyncIteratorConcurrentProcess");XI.exports={asyncIteratorConcurrentProcess:MU}});var nC=b((Ice,rC)=>{"use strict";var Qr=pn(),df=require("path"),{mkdirs:$U}=$i(),{pathExists:VU}=Wa(),{utimesMillis:BU}=Fw(),hf=Go(),{asyncIteratorConcurrentProcess:UU}=JI();async function qU(n,e,t={}){typeof t=="function"&&(t={filter:t}),t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
456
+ GFS4: `),console.error(n)},"debug"));Lt[kr]||(DI=global[kr]||[],LI(Lt,DI),Lt.close=(function(n){function e(t,r){return n.call(Lt,t,function(i){i||NI(),typeof r=="function"&&r.apply(this,arguments)})}return o(e,"close"),Object.defineProperty(e,Fm,{value:n}),e})(Lt.close),Lt.closeSync=(function(n){function e(t){n.apply(Lt,arguments),NI()}return o(e,"closeSync"),Object.defineProperty(e,Fm,{value:n}),e})(Lt.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){Wo(Lt[kr]),require("assert").equal(Lt[kr].length,0)}));var DI;global[kr]||LI(global,Lt[kr]);Cw.exports=xw(EU(Lt));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Lt.__patched&&(Cw.exports=xw(Lt),Lt.__patched=!0);function xw(n){wU(n),n.gracefulify=xw,n.createReadStream=$,n.createWriteStream=ee;var e=n.readFile;n.readFile=t;function t(P,D,J){return typeof D=="function"&&(J=D,D=null),qe(P,D,J);function qe(et,pe,$e,Re){return e(et,pe,function(ne){ne&&(ne.code==="EMFILE"||ne.code==="ENFILE")?bl([qe,[et,pe,$e],ne,Re||Date.now(),Date.now()]):typeof $e=="function"&&$e.apply(this,arguments)})}o(qe,"go$readFile")}o(t,"readFile");var r=n.writeFile;n.writeFile=i;function i(P,D,J,qe){return typeof J=="function"&&(qe=J,J=null),et(P,D,J,qe);function et(pe,$e,Re,ne,Z){return r(pe,$e,Re,function(U){U&&(U.code==="EMFILE"||U.code==="ENFILE")?bl([et,[pe,$e,Re,ne],U,Z||Date.now(),Date.now()]):typeof ne=="function"&&ne.apply(this,arguments)})}o(et,"go$writeFile")}o(i,"writeFile");var s=n.appendFile;s&&(n.appendFile=a);function a(P,D,J,qe){return typeof J=="function"&&(qe=J,J=null),et(P,D,J,qe);function et(pe,$e,Re,ne,Z){return s(pe,$e,Re,function(U){U&&(U.code==="EMFILE"||U.code==="ENFILE")?bl([et,[pe,$e,Re,ne],U,Z||Date.now(),Date.now()]):typeof ne=="function"&&ne.apply(this,arguments)})}o(et,"go$appendFile")}o(a,"appendFile");var c=n.copyFile;c&&(n.copyFile=l);function l(P,D,J,qe){return typeof J=="function"&&(qe=J,J=0),et(P,D,J,qe);function et(pe,$e,Re,ne,Z){return c(pe,$e,Re,function(U){U&&(U.code==="EMFILE"||U.code==="ENFILE")?bl([et,[pe,$e,Re,ne],U,Z||Date.now(),Date.now()]):typeof ne=="function"&&ne.apply(this,arguments)})}o(et,"go$copyFile")}o(l,"copyFile");var u=n.readdir;n.readdir=d;var f=/^v[0-5]\./;function d(P,D,J){typeof D=="function"&&(J=D,D=null);var qe=f.test(process.version)?o(function($e,Re,ne,Z){return u($e,et($e,Re,ne,Z))},"go$readdir"):o(function($e,Re,ne,Z){return u($e,Re,et($e,Re,ne,Z))},"go$readdir");return qe(P,D,J);function et(pe,$e,Re,ne){return function(Z,U){Z&&(Z.code==="EMFILE"||Z.code==="ENFILE")?bl([qe,[pe,$e,Re],Z,ne||Date.now(),Date.now()]):(U&&U.sort&&U.sort(),typeof Re=="function"&&Re.call(this,Z,U))}}}if(o(d,"readdir"),process.version.substr(0,4)==="v0.8"){var h=vU(n);w=h.ReadStream,C=h.WriteStream}var p=n.ReadStream;p&&(w.prototype=Object.create(p.prototype),w.prototype.open=T);var y=n.WriteStream;y&&(C.prototype=Object.create(y.prototype),C.prototype.open=M),Object.defineProperty(n,"ReadStream",{get:o(function(){return w},"get"),set:o(function(P){w=P},"set"),enumerable:!0,configurable:!0}),Object.defineProperty(n,"WriteStream",{get:o(function(){return C},"get"),set:o(function(P){C=P},"set"),enumerable:!0,configurable:!0});var S=w;Object.defineProperty(n,"FileReadStream",{get:o(function(){return S},"get"),set:o(function(P){S=P},"set"),enumerable:!0,configurable:!0});var v=C;Object.defineProperty(n,"FileWriteStream",{get:o(function(){return v},"get"),set:o(function(P){v=P},"set"),enumerable:!0,configurable:!0});function w(P,D){return this instanceof w?(p.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}o(w,"ReadStream");function T(){var P=this;z(P.path,P.flags,P.mode,function(D,J){D?(P.autoClose&&P.destroy(),P.emit("error",D)):(P.fd=J,P.emit("open",J),P.read())})}o(T,"ReadStream$open");function C(P,D){return this instanceof C?(y.apply(this,arguments),this):C.apply(Object.create(C.prototype),arguments)}o(C,"WriteStream");function M(){var P=this;z(P.path,P.flags,P.mode,function(D,J){D?(P.destroy(),P.emit("error",D)):(P.fd=J,P.emit("open",J))})}o(M,"WriteStream$open");function $(P,D){return new n.ReadStream(P,D)}o($,"createReadStream");function ee(P,D){return new n.WriteStream(P,D)}o(ee,"createWriteStream");var B=n.open;n.open=z;function z(P,D,J,qe){return typeof J=="function"&&(qe=J,J=null),et(P,D,J,qe);function et(pe,$e,Re,ne,Z){return B(pe,$e,Re,function(U,it){U&&(U.code==="EMFILE"||U.code==="ENFILE")?bl([et,[pe,$e,Re,ne],U,Z||Date.now(),Date.now()]):typeof ne=="function"&&ne.apply(this,arguments)})}o(et,"go$open")}return o(z,"open"),n}o(xw,"patch");function bl(n){Wo("ENQUEUE",n[0].name,n[1]),Lt[kr].push(n),Iw()}o(bl,"enqueue");var Pm;function NI(){for(var n=Date.now(),e=0;e<Lt[kr].length;++e)Lt[kr][e].length>2&&(Lt[kr][e][3]=n,Lt[kr][e][4]=n);Iw()}o(NI,"resetQueue");function Iw(){if(clearTimeout(Pm),Pm=void 0,Lt[kr].length!==0){var n=Lt[kr].shift(),e=n[0],t=n[1],r=n[2],i=n[3],s=n[4];if(i===void 0)Wo("RETRY",e.name,t),e.apply(null,t);else if(Date.now()-i>=6e4){Wo("TIMEOUT",e.name,t);var a=t.pop();typeof a=="function"&&a.call(null,r)}else{var c=Date.now()-s,l=Math.max(s-i,1),u=Math.min(l*1.2,100);c>=u?(Wo("RETRY",e.name,t),e.apply(null,t.concat([i]))):Lt[kr].push(n)}Pm===void 0&&(Pm=setTimeout(Iw,0))}}o(Iw,"retry")});var pn=b(ca=>{"use strict";var kI=wr().fromCallback,hn=Sl(),AU=["access","appendFile","chmod","chown","close","copyFile","cp","fchmod","fchown","fdatasync","fstat","fsync","ftruncate","futimes","glob","lchmod","lchown","lutimes","link","lstat","mkdir","mkdtemp","open","opendir","readdir","readFile","readlink","realpath","rename","rm","rmdir","stat","statfs","symlink","truncate","unlink","utimes","writeFile"].filter(n=>typeof hn[n]=="function");Object.assign(ca,hn);AU.forEach(n=>{ca[n]=kI(hn[n])});ca.exists=function(n,e){return typeof e=="function"?hn.exists(n,e):new Promise(t=>hn.exists(n,t))};ca.read=function(n,e,t,r,i,s){return typeof s=="function"?hn.read(n,e,t,r,i,s):new Promise((a,c)=>{hn.read(n,e,t,r,i,(l,u,f)=>{if(l)return c(l);a({bytesRead:u,buffer:f})})})};ca.write=function(n,e,...t){return typeof t[t.length-1]=="function"?hn.write(n,e,...t):new Promise((r,i)=>{hn.write(n,e,...t,(s,a,c)=>{if(s)return i(s);r({bytesWritten:a,buffer:c})})})};ca.readv=function(n,e,...t){return typeof t[t.length-1]=="function"?hn.readv(n,e,...t):new Promise((r,i)=>{hn.readv(n,e,...t,(s,a,c)=>{if(s)return i(s);r({bytesRead:a,buffers:c})})})};ca.writev=function(n,e,...t){return typeof t[t.length-1]=="function"?hn.writev(n,e,...t):new Promise((r,i)=>{hn.writev(n,e,...t,(s,a,c)=>{if(s)return i(s);r({bytesWritten:a,buffers:c})})})};typeof hn.realpath.native=="function"?ca.realpath.native=kI(hn.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var MI=b((pce,jI)=>{"use strict";var xU=require("path");jI.exports.checkPath=o(function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(xU.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}},"checkPath")});var UI=b((gce,Rw)=>{"use strict";var $I=pn(),{checkPath:VI}=MI(),BI=o(n=>{let e={mode:511};return typeof n=="number"?n:{...e,...n}.mode},"getMode");Rw.exports.makeDir=async(n,e)=>(VI(n),$I.mkdir(n,{mode:BI(e),recursive:!0}));Rw.exports.makeDirSync=(n,e)=>(VI(n),$I.mkdirSync(n,{mode:BI(e),recursive:!0}))});var $i=b((_ce,qI)=>{"use strict";var IU=wr().fromPromise,{makeDir:CU,makeDirSync:Ow}=UI(),Pw=IU(CU);qI.exports={mkdirs:Pw,mkdirsSync:Ow,mkdirp:Pw,mkdirpSync:Ow,ensureDir:Pw,ensureDirSync:Ow}});var Wa=b((bce,GI)=>{"use strict";var RU=wr().fromPromise,WI=pn();function OU(n){return WI.access(n).then(()=>!0).catch(()=>!1)}o(OU,"pathExists");GI.exports={pathExists:RU(OU),pathExistsSync:WI.existsSync}});var Fw=b((wce,zI)=>{"use strict";var wl=pn(),PU=wr().fromPromise;async function FU(n,e,t){let r=await wl.open(n,"r+"),i=null;try{await wl.futimes(r,e,t)}finally{try{await wl.close(r)}catch(s){i=s}}if(i)throw i}o(FU,"utimesMillis");function DU(n,e,t){let r=wl.openSync(n,"r+");return wl.futimesSync(r,e,t),wl.closeSync(r)}o(DU,"utimesMillisSync");zI.exports={utimesMillis:PU(FU),utimesMillisSync:DU}});var Go=b((Ece,YI)=>{"use strict";var vl=pn(),vr=require("path"),HI=wr().fromPromise;function NU(n,e,t){let r=t.dereference?i=>vl.stat(i,{bigint:!0}):i=>vl.lstat(i,{bigint:!0});return Promise.all([r(n),r(e).catch(i=>{if(i.code==="ENOENT")return null;throw i})]).then(([i,s])=>({srcStat:i,destStat:s}))}o(NU,"getStats");function LU(n,e,t){let r,i=t.dereference?a=>vl.statSync(a,{bigint:!0}):a=>vl.lstatSync(a,{bigint:!0}),s=i(n);try{r=i(e)}catch(a){if(a.code==="ENOENT")return{srcStat:s,destStat:null};throw a}return{srcStat:s,destStat:r}}o(LU,"getStatsSync");async function kU(n,e,t,r){let{srcStat:i,destStat:s}=await NU(n,e,r);if(s){if(ff(i,s)){let a=vr.basename(n),c=vr.basename(e);if(t==="move"&&a!==c&&a.toLowerCase()===c.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${n}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${n}'.`)}if(i.isDirectory()&&Dw(n,e))throw new Error(Dm(n,e,t));return{srcStat:i,destStat:s}}o(kU,"checkPaths");function jU(n,e,t,r){let{srcStat:i,destStat:s}=LU(n,e,r);if(s){if(ff(i,s)){let a=vr.basename(n),c=vr.basename(e);if(t==="move"&&a!==c&&a.toLowerCase()===c.toLowerCase())return{srcStat:i,destStat:s,isChangingCase:!0};throw new Error("Source and destination must not be the same.")}if(i.isDirectory()&&!s.isDirectory())throw new Error(`Cannot overwrite non-directory '${e}' with directory '${n}'.`);if(!i.isDirectory()&&s.isDirectory())throw new Error(`Cannot overwrite directory '${e}' with non-directory '${n}'.`)}if(i.isDirectory()&&Dw(n,e))throw new Error(Dm(n,e,t));return{srcStat:i,destStat:s}}o(jU,"checkPathsSync");async function QI(n,e,t,r){let i=vr.resolve(vr.dirname(n)),s=vr.resolve(vr.dirname(t));if(s===i||s===vr.parse(s).root)return;let a;try{a=await vl.stat(s,{bigint:!0})}catch(c){if(c.code==="ENOENT")return;throw c}if(ff(e,a))throw new Error(Dm(n,t,r));return QI(n,e,s,r)}o(QI,"checkParentPaths");function KI(n,e,t,r){let i=vr.resolve(vr.dirname(n)),s=vr.resolve(vr.dirname(t));if(s===i||s===vr.parse(s).root)return;let a;try{a=vl.statSync(s,{bigint:!0})}catch(c){if(c.code==="ENOENT")return;throw c}if(ff(e,a))throw new Error(Dm(n,t,r));return KI(n,e,s,r)}o(KI,"checkParentPathsSync");function ff(n,e){return e.ino!==void 0&&e.dev!==void 0&&e.ino===n.ino&&e.dev===n.dev}o(ff,"areIdentical");function Dw(n,e){let t=vr.resolve(n).split(vr.sep).filter(i=>i),r=vr.resolve(e).split(vr.sep).filter(i=>i);return t.every((i,s)=>r[s]===i)}o(Dw,"isSrcSubdir");function Dm(n,e,t){return`Cannot ${t} '${n}' to a subdirectory of itself, '${e}'.`}o(Dm,"errMsg");YI.exports={checkPaths:HI(kU),checkPathsSync:jU,checkParentPaths:HI(QI),checkParentPathsSync:KI,isSrcSubdir:Dw,areIdentical:ff}});var JI=b((Ace,XI)=>{"use strict";async function MU(n,e){let t=[];for await(let r of n)t.push(e(r).then(()=>null,i=>i??new Error("unknown error")));await Promise.all(t.map(r=>r.then(i=>{if(i!==null)throw i})))}o(MU,"asyncIteratorConcurrentProcess");XI.exports={asyncIteratorConcurrentProcess:MU}});var nC=b((Ice,rC)=>{"use strict";var Qr=pn(),df=require("path"),{mkdirs:$U}=$i(),{pathExists:VU}=Wa(),{utimesMillis:BU}=Fw(),hf=Go(),{asyncIteratorConcurrentProcess:UU}=JI();async function qU(n,e,t={}){typeof t=="function"&&(t={filter:t}),t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
457
457
 
458
458
  see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:r,destStat:i}=await hf.checkPaths(n,e,"copy",t);if(await hf.checkParentPaths(n,r,e,"copy"),!await eC(n,e,t))return;let a=df.dirname(e);await VU(a)||await $U(a),await tC(i,n,e,t)}o(qU,"copy");async function eC(n,e,t){return t.filter?t.filter(n,e):!0}o(eC,"runFilter");async function tC(n,e,t,r){let s=await(r.dereference?Qr.stat:Qr.lstat)(e);if(s.isDirectory())return HU(s,n,e,t,r);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return WU(s,n,e,t,r);if(s.isSymbolicLink())return QU(n,e,t,r);throw s.isSocket()?new Error(`Cannot copy a socket file: ${e}`):s.isFIFO()?new Error(`Cannot copy a FIFO pipe: ${e}`):new Error(`Unknown file: ${e}`)}o(tC,"getStatsAndPerformCopy");async function WU(n,e,t,r,i){if(!e)return ZI(n,t,r,i);if(i.overwrite)return await Qr.unlink(r),ZI(n,t,r,i);if(i.errorOnExist)throw new Error(`'${r}' already exists`)}o(WU,"onFile");async function ZI(n,e,t,r){if(await Qr.copyFile(e,t),r.preserveTimestamps){GU(n.mode)&&await zU(t,n.mode);let i=await Qr.stat(e);await BU(t,i.atime,i.mtime)}return Qr.chmod(t,n.mode)}o(ZI,"copyFile");function GU(n){return(n&128)===0}o(GU,"fileIsNotWritable");function zU(n,e){return Qr.chmod(n,e|128)}o(zU,"makeFileWritable");async function HU(n,e,t,r,i){e||await Qr.mkdir(r),await UU(await Qr.opendir(t),async s=>{let a=df.join(t,s.name),c=df.join(r,s.name);if(await eC(a,c,i)){let{destStat:u}=await hf.checkPaths(a,c,"copy",i);await tC(u,a,c,i)}}),e||await Qr.chmod(r,n.mode)}o(HU,"onDir");async function QU(n,e,t,r){let i=await Qr.readlink(e);if(r.dereference&&(i=df.resolve(process.cwd(),i)),!n)return Qr.symlink(i,t);let s=null;try{s=await Qr.readlink(t)}catch(a){if(a.code==="EINVAL"||a.code==="UNKNOWN")return Qr.symlink(i,t);throw a}if(r.dereference&&(s=df.resolve(process.cwd(),s)),hf.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(hf.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`);return await Qr.unlink(t),Qr.symlink(i,t)}o(QU,"onLink");rC.exports=qU});var cC=b((Rce,oC)=>{"use strict";var mn=Sl(),pf=require("path"),KU=$i().mkdirsSync,YU=Fw().utimesMillisSync,mf=Go();function XU(n,e,t){typeof t=="function"&&(t={filter:t}),t=t||{},t.clobber="clobber"in t?!!t.clobber:!0,t.overwrite="overwrite"in t?!!t.overwrite:t.clobber,t.preserveTimestamps&&process.arch==="ia32"&&process.emitWarning(`Using the preserveTimestamps option in 32-bit node is not recommended;
459
459
 
@@ -764,7 +764,7 @@ ${r}`}o(NY,"serializeFile");function _D(n,e,t={}){let r=Bg.default.dirname(n),i=
764
764
  `).map(s=>s.trim()).filter(Boolean)){let s=LY.exec(i);if(s){r.push({sessionName:i,uuid:s[1],type:"full"});continue}let a=kY.exec(i);a&&r.push({sessionName:i,uuid:a[1],type:"short"})}return r}o(MY,"listClaudeChildSessions");function $Y(n,e,t){let r=null,i=e.toLowerCase();function s(a){if(r)return;let c;try{c=(0,qg.readdirSync)(a,{withFileTypes:!0})}catch{return}for(let l of c){if(r)return;if(l.name.startsWith(".")||l.name==="node_modules")continue;let u=(0,bD.join)(a,l.name);if(l.isDirectory())s(u);else if(l.name.endsWith(".md")){let f=l.name.slice(0,-3).toLowerCase();(t==="full"&&f===i||t==="short"&&f.startsWith(i))&&(r=u)}}}return o(s,"walk"),s(n),r}o($Y,"findVaultFile");function VY(n,e){try{let i=(e??(s=>(0,qg.readFileSync)(s,"utf8")))(n).match(/ems__Effort_status\s*:.*\[\[([^\]]+)\]\]/);return i?i[1].includes(jY):!1}catch{return!1}}o(VY,"isTaskDoing");async function wD(n,e=Ug.exec,t){let r=await MY(e),i=[];for(let s of r){let a=$Y(n,s.uuid,s.type);if(!a){i.push({sessionName:s.sessionName,taskUuid:s.uuid,taskFilePath:null,reason:"vault task not found"});continue}VY(a,t)||i.push({sessionName:s.sessionName,taskUuid:s.uuid,taskFilePath:a,reason:"vault task status != Doing"})}return i}o(wD,"detectOrphans");async function vD(n,e,t=Ug.exec,r=_D){let i=SD(t);if(e)return{ok:!0};let s=new Date().toISOString();if(n.taskFilePath)try{r(n.taskFilePath,{ems__Effort_status:"[[ems__EffortStatusFailed]]",aiTask__Task_lastError:`orphan recovery: ${n.reason}`,exo__Asset_updatedAt:s})}catch(a){return{ok:!1,error:`vault update failed: ${a.message}`}}try{await i(`tmux kill-session -t ${JSON.stringify(n.sessionName)}`)}catch{}return{ok:!0}}o(vD,"recoverOrphan");function BY(){return process.env.EXOCORTEX_VAULT??(0,Wg.join)((0,TD.homedir)(),"vault-2025")}o(BY,"defaultVault");function AD(){return new Ie("recover").description("Detect and recover orphaned claude-child tmux sessions. A session is orphaned when the corresponding vault task is not in Doing status. Default mode: dry-run (no changes). Use --apply to perform recovery.").option("--vault <path>","Path to Obsidian vault",BY()).option("--dry-run","List orphans without applying changes (default)",!1).option("--apply","Apply orphan recovery: set Failed + kill tmux session",!1).action(async n=>{let e=(0,Wg.resolve)(n.vault);if(!(0,ED.existsSync)(e)){console.error(`[recover] vault not found: ${e}`),process.exitCode=1;return}let t=!n.apply;console.log(`[recover] vault=${e} mode=${t?"dry-run":"apply"}`);let r=await wD(e);if(r.length===0){console.log("[recover] No orphaned claude-child sessions found.");return}console.log(`[recover] Found ${r.length} orphan(s):`);for(let a of r){let c=a.taskFilePath??"(not found in vault)";console.log(` session=${a.sessionName} uuid=${a.taskUuid} reason=${a.reason}`),console.log(` file=${c}`)}if(t){console.log("[recover] Dry-run mode: no changes applied. Use --apply to recover.");return}let i=0,s=0;for(let a of r){let c=await vD(a,!1);c.ok?(i++,console.log(`[recover] RECOVERED: ${a.sessionName}`)):(s++,console.error(`[recover] ERROR recovering ${a.sessionName}: ${c.error}`))}console.log(`[recover] Done: recovered=${i} errors=${s}`),s>0&&(process.exitCode=1)})}o(AD,"recoverCommand");var mE=require("fs"),Gg=require("path"),Gn=ce(Sr());function UY(n,e){return e.concat([n])}o(UY,"collectAlso");var qY="https://exocortex.my/ontology/find#Alias_sparql",WY="https://exocortex.my/ontology/exo#Asset_label";function eu(n){if(n&&typeof n=="object"&&"value"in n){let e=n.value;return typeof e=="string"?e:String(e)}return String(n)}o(eu,"nodeValue");async function GY(n,e){let t=await n.match(void 0,void 0,void 0),r=[];for(let s of t)eu(s.predicate)!==WY||eu(s.object)!==e||r.push(eu(s.subject));if(r.length===0)return null;let i=[];for(let s of r)for(let a of t)eu(a.predicate)===qY&&eu(a.subject)===s&&i.push(eu(a.object));if(i.length===0)return null;if(i.length>1)throw new Bt(`Ambiguous find__Alias "${e}" \u2014 ${i.length} instances define a sparql fragment`,`Ensure exactly one find__Alias asset has exo:Asset_label "${e}"`);return i[0]}o(GY,"resolveAliasFragment");var zY=/^([a-z][a-zA-Z0-9]*)__([A-Za-z0-9_]+)$/,HY="https://exocortex.my/ontology/";function QY(n,e){let t=zY.exec(e);if(t){let i=`<${HY}${t[1]}#${t[2]}>`;return n.replace(/\?value\b/g,i)}let r=e.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return n.replace(/\?value\b/g,`"${r}"`)}o(QY,"bindValueLiteral");function xD(){return new Ie("find").description("Find vault assets via SPARQL \u2014 outputs file paths one per line (RFC 8e83442b T1.1)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--also <path>","Additional vault to include (repeatable)",UY,[]).option("--sparql <query>","SPARQL SELECT query (must bind ?path)").option("--class <value>","Filter by class label via find__Alias 'class' (e.g. ems__Task)").action(async n=>{he.setFormat("text");try{if(n.sparql&&n.class)throw new Bt("--sparql and --class are mutually exclusive","Pass either a raw --sparql query or a find__Alias-backed flag like --class");if(!n.sparql&&!n.class)throw new Bt("one of --sparql <query> or --class <value> is required",'exocortex find --class ems__Task OR exocortex find --sparql "SELECT ?path WHERE { ... }"');let e=(0,Gg.resolve)(n.vault);if(!(0,mE.existsSync)(e))throw new Fe(e);let t=new kt(e),i=await new Gn.NoteToRDFConverter(t).convertVault(),s=n.also||[];for(let w of s){let T=(0,Gg.resolve)(w);if(!(0,mE.existsSync)(T))throw new Fe(T);let C=new kt(T),$=await new Gn.NoteToRDFConverter(C).convertVault();i=i.concat($)}let a=new Gn.InMemoryTripleStore;await a.addAll(i);let c;if(n.class){let w=await GY(a,"class");if(w===null)throw new Bt('No find__Alias with exo:Asset_label "class" was found in the vault',"Seed a find__Alias asset (label=class) or fall back to exocortex find --sparql");c=`SELECT ?path WHERE { ${QY(w,n.class)} }`}else c=n.sparql;let l=Hl(c);l=eo(l);let u=new Gn.ExoQLParser,f=to(Za(e));for(let w of s){let T=to(Za((0,Gg.resolve)(w)));for(let[C,M]of T)f.has(C)||f.set(C,M)}f.size>0&&u.setVaultPrefixes(f);let d=u.parse(l),p=new Gn.ExoQLAlgebraTranslator().translate(d);p.type!=="construct"&&(p=new Gn.AlgebraOptimizer().optimize(p));let S=await new Gn.ExoQLQueryExecutor(a).executeAll(p),v="obsidian://vault/";for(let w of S){let C=w.toJSON().path;if(typeof C!="string"||!C.startsWith(v))continue;let M=C.slice(v.length),$;try{$=decodeURIComponent(M)}catch{$=M}process.stdout.write($+`
765
765
  `)}}catch(e){he.handle(e),process.exit(5)}})}o(xD,"findCommand");var yE=require("fs"),_E=require("path"),tt=ce(Sr());var PD=ce(Sr()),qt=ce(CD());var RD="obsidian://vault/";function aX(n){let e=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;return{async resolveTargetPath(t){if(!t)throw new Error("Cannot resolve empty targetIRI to a vault path");let r=t;if(r.startsWith(RD))r=decodeURI(r.slice(RD.length));else if(e.test(r)){let i=await n.findFileByUID(r);if(!i)throw new Error(`No vault file found for UID: ${r}`);r=i}if(r.endsWith(".md")||(r=`${r}.md`),!await n.fileExists(r))throw new Error(`Cannot resolve target file for IRI "${t}" (tried "${r}")`);return r}}}o(aX,"createCliPathResolver");var oX=["createAsset","openFile","sparqlSelect","getActiveFileIRI","getActiveFilePath","trashFile","duplicateFile"],gE=class extends Error{constructor(t){super(`Service "${t}" is not implemented in the CLI (no-op stub). dyncommand exec on this service_call grounding cannot change vault state. See CLI parity issues #2865-#2868 for port status.`);this.serviceId=t;this.name="CliServiceNotImplementedError"}static{o(this,"CliServiceNotImplementedError")}};function OD(n){return{async execute(){throw new gE(n)}}}o(OD,"notImplementedService");function FD(n,e){for(let t of oX)n.register(t,OD(t));for(let t of["updateProperty","removeProperty","setStatus"])n.register(t,OD(t));if(e){if(e.fsAdapter){let t=new PD.FrontmatterService,r=aX(e.fsAdapter);n.register("updateProperty",(0,qt.createUpdatePropertyService)(e.fsAdapter,t,r)),n.register("removeProperty",(0,qt.createRemovePropertyService)(e.fsAdapter,t,r)),n.register("setStatus",(0,qt.createSetStatusService)(e.fsAdapter,t,r))}n.register("createRelatedTask",(0,qt.createCreateRelatedTaskService)(e.vaultAdapter,e.genericAssetCreationService)),n.register("createRelatedProject",(0,qt.createCreateRelatedProjectService)(e.vaultAdapter,e.genericAssetCreationService)),n.register("archiveAsset",(0,qt.createArchiveAssetService)(e.vaultAdapter,e.archiveAssetService)),n.register("planForEvening",(0,qt.createPlanForEveningService)(e.vaultAdapter,e.taskStatusService)),n.register("cleanProperties",(0,qt.createCleanPropertiesService)(e.vaultAdapter,e.propertyCleanupService)),n.register("renameToUid",(0,qt.createRenameToUidService)(e.vaultAdapter,e.renameToUidService)),n.register("repairFolder",(0,qt.createRepairFolderService)(e.vaultAdapter,e.folderRepairService)),n.register("fixMissingLabel",(0,qt.createFixMissingLabelService)(e.vaultAdapter,e.fixMissingLabelService))}}o(FD,"populateCliServiceRegistry");var cX=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;async function lX(){if(process.stdin.isTTY)return[];let n=[];for await(let t of process.stdin)n.push(t);return Buffer.concat(n).toString("utf-8").split(`
766
766
  `).map(t=>t.trim()).filter(t=>t.length>0)}o(lX,"readStdinLines");function zg(n){if(n&&typeof n=="object"&&"value"in n){let e=n.value;return typeof e=="string"?e:String(e)}return String(n)}o(zg,"nodeValue");async function uX(n,e){let t=new tt.IRI("https://exocortex.my/ontology/exocmd#Command_cliName"),r=await n.match(void 0,t,void 0),i=[];for(let s of r)if(zg(s.object)===e){let l=zg(s.subject).match(/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.md$/i);l&&i.push(l[1])}if(i.length===0)return null;if(i.length>1)throw new Bt(`Ambiguous cliName "${e}" \u2014 resolves to ${i.length} commands: ${i.join(", ")}`,"Use the UUID directly: exocortex apply <uuid> <path>");return i[0]}o(uX,"resolveSlugToUuid");async function fX(n,e){let t=new tt.IRI("https://exocortex.my/ontology/exocmd#Command_destructive"),r=await n.match(void 0,t,void 0);for(let i of r)if(zg(i.subject).includes(e)){let a=zg(i.object);if(a==="true"||a==="True")return!0}return!1}o(fX,"isDestructive");async function dX(n,e,t,r,i){let s=(0,_E.resolve)(n,r);if(!(0,yE.existsSync)(s))return console.error(`\u274C Target file not found: ${r}`),!1;let c=await new tt.CommandResolver(e).loadCommand(t);if(!c)return console.error(`\u274C Command with UID "${t}" not found.`),!1;if(await fX(e,t)&&!i.dryRun&&!i.yes)return console.error(`\u274C Command "${c.name}" is marked destructive. Add --dry-run to preview, or --yes to apply.`),!1;let u=(0,tt.vaultPathToIRI)(r);if(!await new tt.PreconditionEvaluator(e).evaluate(c.precondition,u))return console.error(`\u274C Precondition not satisfied for "${c.name}" on "${r}".`),!1;if(i.dryRun)return console.log(`\u{1F50D} Dry-run: would apply "${c.name}" to "${r}" (precondition passed).`),!0;let h=new tt.ServiceRegistry,p=new kt(n),y=new tt.GenericAssetCreationService(p),S=new tt.ArchiveAssetService(p),v=new tt.PropertyCleanupService(p),w=new tt.FixMissingLabelService(p),T=new tt.RenameToUidService(p),C=new tt.FolderRepairService(p),M=new tt.TaskStatusService(p,new tt.EffortStatusWorkflow,new tt.StatusTimestampService(p)),$=new mr(n);FD(h,{vaultAdapter:p,fsAdapter:$,genericAssetCreationService:y,archiveAssetService:S,taskStatusService:M,propertyCleanupService:v,fixMissingLabelService:w,renameToUidService:T,folderRepairService:C});let ee=new tt.GroundingExecutor($,$,h),B;if(i.input)try{let P=JSON.parse(i.input);if(typeof P!="object"||P===null||Array.isArray(P))throw new Error("must be a JSON object");B=P}catch(P){let D=P instanceof Error?P.message:String(P);return console.error(`\u274C --input: invalid JSON object (${D})`),!1}let z=await ee.execute(c.grounding,u,r,B);if(z.success){let P=c.successMessage??`Applied "${c.name}" to "${r}".`;return console.log(`\u2705 ${P}`),!0}else return console.error(`\u274C "${c.name}" failed on "${r}": ${z.error}`),!1}o(dX,"executeOnTarget");function DD(){return new Ie("apply").description("Apply an exocmd__Command to one or more vault assets (RFC 8e83442b T1.2). Pass a path arg or pipe paths via stdin.").argument("<cmd>","Command UUID or cliName slug").argument("[path]","Vault-relative path to target asset (omit to read paths from stdin)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--dry-run","Preview without writing").option("--yes","Skip destructive-command confirmation").option("--input <json>","JSON userInput for service_call groundings").action(async(n,e,t)=>{he.setFormat("text");try{let r=(0,_E.resolve)(t.vault);if(!(0,yE.existsSync)(r))throw new Fe(r);let i=new kt(r),a=await new tt.NoteToRDFConverter(i).convertVault(),c=new tt.InMemoryTripleStore;await c.addAll(a);let l;if(cX.test(n))l=n;else{let h=await uX(c,n);h||(console.error(`\u274C No command found with UUID or cliName "${n}".`),process.exit(3)),l=h}let u;if(e)u=[e];else if(u=await lX(),u.length===0)throw new Bt("No target path provided and stdin is empty.","exocortex apply <uuid> <path> OR exocortex find ... | exocortex apply <uuid>");let f=0,d=0;for(let h of u)await dX(r,c,l,h,t)?f++:d++;u.length>1&&console.log(`
767
- \u{1F4CA} Applied to ${f}/${u.length} target(s) (${d} failed).`),d>0&&process.exit(5)}catch(r){he.handle(r),process.exit(5)}})}o(DD,"applyCommand");function ND(n){let e=new Ie;return e.name("exocortex").description("CLI tool for Exocortex knowledge management system").version(n??"16.9.0"),e.addCommand(xD()),e.addCommand(DD()),e.addCommand(iF()),e.addCommand(cF()),e.addCommand(DF()),e.addCommand(fF()),e.addCommand(dF()),e.addCommand(yF()),e.addCommand(kF()),e.addCommand(WF()),e.addCommand(HF()),e.addCommand(QF()),e.addCommand(YF()),e.addCommand(oD()),e.addCommand(cD()),e.addCommand(mD()),e.addCommand(AD()),e}o(ND,"createProgram");ND().parse();0&&(module.exports={createProgram});
767
+ \u{1F4CA} Applied to ${f}/${u.length} target(s) (${d} failed).`),d>0&&process.exit(5)}catch(r){he.handle(r),process.exit(5)}})}o(DD,"applyCommand");function ND(n){let e=new Ie;return e.name("exocortex").description("CLI tool for Exocortex knowledge management system").version(n??"16.9.1"),e.addCommand(xD()),e.addCommand(DD()),e.addCommand(iF()),e.addCommand(cF()),e.addCommand(DF()),e.addCommand(fF()),e.addCommand(dF()),e.addCommand(yF()),e.addCommand(kF()),e.addCommand(WF()),e.addCommand(HF()),e.addCommand(QF()),e.addCommand(YF()),e.addCommand(oD()),e.addCommand(cD()),e.addCommand(mD()),e.addCommand(AD()),e}o(ND,"createProgram");ND().parse();0&&(module.exports={createProgram});
768
768
  /*! Bundled license information:
769
769
 
770
770
  reflect-metadata/Reflect.js: