@kitelev/exocortex-cli 16.60.1 → 16.60.2
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.
- package/dist/index.js +29 -29
- 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.60.
|
|
2
|
+
// @kitelev/exocortex-cli v16.60.2
|
|
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 yk=Object.create;var Gu=Object.defineProperty;var _k=Object.getOwnPropertyDescriptor;var bk=Object.getOwnPropertyNames;var Sk=Object.getPrototypeOf,wk=Object.prototype.hasOwnProperty;var a=(n,e)=>Gu(n,"name",{value:e,configurable:!0});var vk=(n,e)=>()=>(n&&(e=n(n=0)),e);var S=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),A0=(n,e)=>{for(var t in e)Gu(n,t,{get:e[t],enumerable:!0})},PT=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bk(e))!wk.call(n,i)&&i!==t&&Gu(n,i,{get:()=>e[i],enumerable:!(r=_k(e,i))||r.enumerable});return n};var ee=(n,e,t)=>(t=n!=null?yk(Sk(n)):{},PT(e||!n||!n.__esModule?Gu(t,"default",{value:n,enumerable:!0}):t,n)),sh=n=>PT(Gu({},"__esModule",{value:!0}),n);var I0=S(()=>{var OT;(function(n){(function(e){var t=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:l(),r=i(n);typeof t.Reflect<"u"&&(r=i(t.Reflect,r)),e(r,t),typeof t.Reflect>"u"&&(t.Reflect=n);function i(c,u){return function(f,d){Object.defineProperty(c,f,{configurable:!0,writable:!0,value:d}),u&&u(f,d)}}a(i,"makeExporter");function s(){try{return Function("return this;")()}catch{}}a(s,"functionThis");function o(){try{return(0,eval)("(function() { return this; })()")}catch{}}a(o,"indirectEvalThis");function l(){return s()||o()}a(l,"sloppyModeThis")})(function(e,t){var r=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",s=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",o=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",l=typeof Object.create=="function",c={__proto__:[]}instanceof Array,u=!l&&!c,f={create:l?function(){return He(Object.create(null))}:c?function(){return He({__proto__:null})}:function(){return He({})},has:u?function(T,I){return r.call(T,I)}:function(T,I){return I in T},get:u?function(T,I){return r.call(T,I)?T[I]:void 0}:function(T,I){return T[I]}},d=Object.getPrototypeOf(Function),h=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:xe(),p=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:ot(),g=typeof WeakMap=="function"?WeakMap:tt(),y=i?Symbol.for("@reflect-metadata:registry"):void 0,v=Te(),w=Ae(v);function E(T,I,C,F){if(Y(C)){if(!Qe(T))throw new TypeError;if(!Ke(I))throw new TypeError;return B(T,I)}else{if(!Qe(T))throw new TypeError;if(!ce(I))throw new TypeError;if(!ce(F)&&!Y(F)&&!Le(F))throw new TypeError;return Le(F)&&(F=void 0),C=Ne(C),K(T,I,C,F)}}a(E,"decorate"),e("decorate",E);function A(T,I){function C(F,re){if(!ce(F))throw new TypeError;if(!Y(re)&&!et(re))throw new TypeError;V(T,I,F,re)}return a(C,"decorator"),C}a(A,"metadata"),e("metadata",A);function x(T,I,C,F){if(!ce(C))throw new TypeError;return Y(F)||(F=Ne(F)),V(T,I,C,F)}a(x,"defineMetadata"),e("defineMetadata",x);function D(T,I,C){if(!ce(I))throw new TypeError;return Y(C)||(C=Ne(C)),ne(T,I,C)}a(D,"hasMetadata"),e("hasMetadata",D);function J(T,I,C){if(!ce(I))throw new TypeError;return Y(C)||(C=Ne(C)),G(T,I,C)}a(J,"hasOwnMetadata"),e("hasOwnMetadata",J);function ae(T,I,C){if(!ce(I))throw new TypeError;return Y(C)||(C=Ne(C)),ie(T,I,C)}a(ae,"getMetadata"),e("getMetadata",ae);function ge(T,I,C){if(!ce(I))throw new TypeError;return Y(C)||(C=Ne(C)),W(T,I,C)}a(ge,"getOwnMetadata"),e("getOwnMetadata",ge);function N(T,I){if(!ce(T))throw new TypeError;return Y(I)||(I=Ne(I)),q(T,I)}a(N,"getMetadataKeys"),e("getMetadataKeys",N);function Q(T,I){if(!ce(T))throw new TypeError;return Y(I)||(I=Ne(I)),rt(T,I)}a(Q,"getOwnMetadataKeys"),e("getOwnMetadataKeys",Q);function oe(T,I,C){if(!ce(I))throw new TypeError;if(Y(C)||(C=Ne(C)),!ce(I))throw new TypeError;Y(C)||(C=Ne(C));var F=he(I,C,!1);return Y(F)?!1:F.OrdinaryDeleteMetadata(T,I,C)}a(oe,"deleteMetadata"),e("deleteMetadata",oe);function B(T,I){for(var C=T.length-1;C>=0;--C){var F=T[C],re=F(I);if(!Y(re)&&!Le(re)){if(!Ke(re))throw new TypeError;I=re}}return I}a(B,"DecorateConstructor");function K(T,I,C,F){for(var re=T.length-1;re>=0;--re){var wt=T[re],Pt=wt(I,C,F);if(!Y(Pt)&&!Le(Pt)){if(!ce(Pt))throw new TypeError;F=Pt}}return F}a(K,"DecorateProperty");function ne(T,I,C){var F=G(T,I,C);if(F)return!0;var re=me(I);return Le(re)?!1:ne(T,re,C)}a(ne,"OrdinaryHasMetadata");function G(T,I,C){var F=he(I,C,!1);return Y(F)?!1:Ye(F.OrdinaryHasOwnMetadata(T,I,C))}a(G,"OrdinaryHasOwnMetadata");function ie(T,I,C){var F=G(T,I,C);if(F)return W(T,I,C);var re=me(I);if(!Le(re))return ie(T,re,C)}a(ie,"OrdinaryGetMetadata");function W(T,I,C){var F=he(I,C,!1);if(!Y(F))return F.OrdinaryGetOwnMetadata(T,I,C)}a(W,"OrdinaryGetOwnMetadata");function V(T,I,C,F){var re=he(C,F,!0);re.OrdinaryDefineOwnMetadata(T,I,C,F)}a(V,"OrdinaryDefineOwnMetadata");function q(T,I){var C=rt(T,I),F=me(T);if(F===null)return C;var re=q(F,I);if(re.length<=0)return C;if(C.length<=0)return re;for(var wt=new p,Pt=[],Ve=0,z=C;Ve<z.length;Ve++){var H=z[Ve],X=wt.has(H);X||(wt.add(H),Pt.push(H))}for(var Z=0,Me=re;Z<Me.length;Z++){var H=Me[Z],X=wt.has(H);X||(wt.add(H),Pt.push(H))}return Pt}a(q,"OrdinaryMetadataKeys");function rt(T,I){var C=he(T,I,!1);return C?C.OrdinaryOwnMetadataKeys(T,I):[]}a(rt,"OrdinaryOwnMetadataKeys");function lt(T){if(T===null)return 1;switch(typeof T){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return T===null?1:6;default:return 6}}a(lt,"Type");function Y(T){return T===void 0}a(Y,"IsUndefined");function Le(T){return T===null}a(Le,"IsNull");function qe(T){return typeof T=="symbol"}a(qe,"IsSymbol");function ce(T){return typeof T=="object"?T!==null:typeof T=="function"}a(ce,"IsObject");function Xe(T,I){switch(lt(T)){case 0:return T;case 1:return T;case 2:return T;case 3:return T;case 4:return T;case 5:return T}var C=I===3?"string":I===5?"number":"default",F=we(T,s);if(F!==void 0){var re=F.call(T,C);if(ce(re))throw new TypeError;return re}return Je(T,C==="default"?"number":C)}a(Xe,"ToPrimitive");function Je(T,I){if(I==="string"){var C=T.toString;if(je(C)){var F=C.call(T);if(!ce(F))return F}var re=T.valueOf;if(je(re)){var F=re.call(T);if(!ce(F))return F}}else{var re=T.valueOf;if(je(re)){var F=re.call(T);if(!ce(F))return F}var wt=T.toString;if(je(wt)){var F=wt.call(T);if(!ce(F))return F}}throw new TypeError}a(Je,"OrdinaryToPrimitive");function Ye(T){return!!T}a(Ye,"ToBoolean");function Ze(T){return""+T}a(Ze,"ToString");function Ne(T){var I=Xe(T,3);return qe(I)?I:Ze(I)}a(Ne,"ToPropertyKey");function Qe(T){return Array.isArray?Array.isArray(T):T instanceof Object?T instanceof Array:Object.prototype.toString.call(T)==="[object Array]"}a(Qe,"IsArray");function je(T){return typeof T=="function"}a(je,"IsCallable");function Ke(T){return typeof T=="function"}a(Ke,"IsConstructor");function et(T){switch(lt(T)){case 3:return!0;case 4:return!0;default:return!1}}a(et,"IsPropertyKey");function ye(T,I){return T===I||T!==T&&I!==I}a(ye,"SameValueZero");function we(T,I){var C=T[I];if(C!=null){if(!je(C))throw new TypeError;return C}}a(we,"GetMethod");function ve(T){var I=we(T,o);if(!je(I))throw new TypeError;var C=I.call(T);if(!ce(C))throw new TypeError;return C}a(ve,"GetIterator");function _e(T){return T.value}a(_e,"IteratorValue");function be(T){var I=T.next();return I.done?!1:I}a(be,"IteratorStep");function Se(T){var I=T.return;I&&I.call(T)}a(Se,"IteratorClose");function me(T){var I=Object.getPrototypeOf(T);if(typeof T!="function"||T===d||I!==d)return I;var C=T.prototype,F=C&&Object.getPrototypeOf(C);if(F==null||F===Object.prototype)return I;var re=F.constructor;return typeof re!="function"||re===T?I:re}a(me,"OrdinaryGetPrototypeOf");function Ee(){var T;!Y(y)&&typeof t.Reflect<"u"&&!(y in t.Reflect)&&typeof t.Reflect.defineMetadata=="function"&&(T=Ie(t.Reflect));var I,C,F,re=new g,wt={registerProvider:Pt,getProvider:z,setProvider:X};return wt;function Pt(Z){if(!Object.isExtensible(wt))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case T===Z:break;case Y(I):I=Z;break;case I===Z:break;case Y(C):C=Z;break;case C===Z:break;default:F===void 0&&(F=new p),F.add(Z);break}}function Ve(Z,Me){if(!Y(I)){if(I.isProviderFor(Z,Me))return I;if(!Y(C)){if(C.isProviderFor(Z,Me))return I;if(!Y(F))for(var ct=ve(F);;){var ut=be(ct);if(!ut)return;var Or=_e(ut);if(Or.isProviderFor(Z,Me))return Se(ct),Or}}}if(!Y(T)&&T.isProviderFor(Z,Me))return T}function z(Z,Me){var ct=re.get(Z),ut;return Y(ct)||(ut=ct.get(Me)),Y(ut)&&(ut=Ve(Z,Me),Y(ut)||(Y(ct)&&(ct=new h,re.set(Z,ct)),ct.set(Me,ut))),ut}function H(Z){if(Y(Z))throw new TypeError;return I===Z||C===Z||!Y(F)&&F.has(Z)}function X(Z,Me,ct){if(!H(ct))throw new Error("Metadata provider not registered.");var ut=z(Z,Me);if(ut!==ct){if(!Y(ut))return!1;var Or=re.get(Z);Y(Or)&&(Or=new h,re.set(Z,Or)),Or.set(Me,ct)}return!0}}a(Ee,"CreateMetadataRegistry");function Te(){var T;return!Y(y)&&ce(t.Reflect)&&Object.isExtensible(t.Reflect)&&(T=t.Reflect[y]),Y(T)&&(T=Ee()),!Y(y)&&ce(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,y,{enumerable:!1,configurable:!1,writable:!1,value:T}),T}a(Te,"GetOrCreateMetadataRegistry");function Ae(T){var I=new g,C={isProviderFor:a(function(H,X){var Z=I.get(H);return Y(Z)?!1:Z.has(X)},"isProviderFor"),OrdinaryDefineOwnMetadata:Pt,OrdinaryHasOwnMetadata:re,OrdinaryGetOwnMetadata:wt,OrdinaryOwnMetadataKeys:Ve,OrdinaryDeleteMetadata:z};return v.registerProvider(C),C;function F(H,X,Z){var Me=I.get(H),ct=!1;if(Y(Me)){if(!Z)return;Me=new h,I.set(H,Me),ct=!0}var ut=Me.get(X);if(Y(ut)){if(!Z)return;if(ut=new h,Me.set(X,ut),!T.setProvider(H,X,C))throw Me.delete(X),ct&&I.delete(H),new Error("Wrong provider for target.")}return ut}a(F,"GetOrCreateMetadataMap");function re(H,X,Z){var Me=F(X,Z,!1);return Y(Me)?!1:Ye(Me.has(H))}a(re,"OrdinaryHasOwnMetadata");function wt(H,X,Z){var Me=F(X,Z,!1);if(!Y(Me))return Me.get(H)}a(wt,"OrdinaryGetOwnMetadata");function Pt(H,X,Z,Me){var ct=F(Z,Me,!0);ct.set(H,X)}a(Pt,"OrdinaryDefineOwnMetadata");function Ve(H,X){var Z=[],Me=F(H,X,!1);if(Y(Me))return Z;for(var ct=Me.keys(),ut=ve(ct),Or=0;;){var xn=be(ut);if(!xn)return Z.length=Or,Z;var zn=_e(xn);try{Z[Or]=zn}catch(an){try{Se(ut)}finally{throw an}}Or++}}a(Ve,"OrdinaryOwnMetadataKeys");function z(H,X,Z){var Me=F(X,Z,!1);if(Y(Me)||!Me.delete(H))return!1;if(Me.size===0){var ct=I.get(X);Y(ct)||(ct.delete(Z),ct.size===0&&I.delete(ct))}return!0}a(z,"OrdinaryDeleteMetadata")}a(Ae,"CreateMetadataProvider");function Ie(T){var I=T.defineMetadata,C=T.hasOwnMetadata,F=T.getOwnMetadata,re=T.getOwnMetadataKeys,wt=T.deleteMetadata,Pt=new g,Ve={isProviderFor:a(function(z,H){var X=Pt.get(z);return!Y(X)&&X.has(H)?!0:re(z,H).length?(Y(X)&&(X=new p,Pt.set(z,X)),X.add(H),!0):!1},"isProviderFor"),OrdinaryDefineOwnMetadata:I,OrdinaryHasOwnMetadata:C,OrdinaryGetOwnMetadata:F,OrdinaryOwnMetadataKeys:re,OrdinaryDeleteMetadata:wt};return Ve}a(Ie,"CreateFallbackProvider");function he(T,I,C){var F=v.getProvider(T,I);if(!Y(F))return F;if(C){if(v.setProvider(T,I,w))return w;throw new Error("Illegal state.")}}a(he,"GetMetadataProvider");function xe(){var T={},I=[],C=(function(){function Ve(z,H,X){this._index=0,this._keys=z,this._values=H,this._selector=X}return a(Ve,"MapIterator"),Ve.prototype["@@iterator"]=function(){return this},Ve.prototype[o]=function(){return this},Ve.prototype.next=function(){var z=this._index;if(z>=0&&z<this._keys.length){var H=this._selector(this._keys[z],this._values[z]);return z+1>=this._keys.length?(this._index=-1,this._keys=I,this._values=I):this._index++,{value:H,done:!1}}return{value:void 0,done:!0}},Ve.prototype.throw=function(z){throw this._index>=0&&(this._index=-1,this._keys=I,this._values=I),z},Ve.prototype.return=function(z){return this._index>=0&&(this._index=-1,this._keys=I,this._values=I),{value:z,done:!0}},Ve})(),F=(function(){function Ve(){this._keys=[],this._values=[],this._cacheKey=T,this._cacheIndex=-2}return a(Ve,"Map"),Object.defineProperty(Ve.prototype,"size",{get:a(function(){return this._keys.length},"get"),enumerable:!0,configurable:!0}),Ve.prototype.has=function(z){return this._find(z,!1)>=0},Ve.prototype.get=function(z){var H=this._find(z,!1);return H>=0?this._values[H]:void 0},Ve.prototype.set=function(z,H){var X=this._find(z,!0);return this._values[X]=H,this},Ve.prototype.delete=function(z){var H=this._find(z,!1);if(H>=0){for(var X=this._keys.length,Z=H+1;Z<X;Z++)this._keys[Z-1]=this._keys[Z],this._values[Z-1]=this._values[Z];return this._keys.length--,this._values.length--,ye(z,this._cacheKey)&&(this._cacheKey=T,this._cacheIndex=-2),!0}return!1},Ve.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=T,this._cacheIndex=-2},Ve.prototype.keys=function(){return new C(this._keys,this._values,re)},Ve.prototype.values=function(){return new C(this._keys,this._values,wt)},Ve.prototype.entries=function(){return new C(this._keys,this._values,Pt)},Ve.prototype["@@iterator"]=function(){return this.entries()},Ve.prototype[o]=function(){return this.entries()},Ve.prototype._find=function(z,H){if(!ye(this._cacheKey,z)){this._cacheIndex=-1;for(var X=0;X<this._keys.length;X++)if(ye(this._keys[X],z)){this._cacheIndex=X;break}}return this._cacheIndex<0&&H&&(this._cacheIndex=this._keys.length,this._keys.push(z),this._values.push(void 0)),this._cacheIndex},Ve})();return F;function re(Ve,z){return Ve}function wt(Ve,z){return z}function Pt(Ve,z){return[Ve,z]}}a(xe,"CreateMapPolyfill");function ot(){var T=(function(){function I(){this._map=new h}return a(I,"Set"),Object.defineProperty(I.prototype,"size",{get:a(function(){return this._map.size},"get"),enumerable:!0,configurable:!0}),I.prototype.has=function(C){return this._map.has(C)},I.prototype.add=function(C){return this._map.set(C,C),this},I.prototype.delete=function(C){return this._map.delete(C)},I.prototype.clear=function(){this._map.clear()},I.prototype.keys=function(){return this._map.keys()},I.prototype.values=function(){return this._map.keys()},I.prototype.entries=function(){return this._map.entries()},I.prototype["@@iterator"]=function(){return this.keys()},I.prototype[o]=function(){return this.keys()},I})();return T}a(ot,"CreateSetPolyfill");function tt(){var T=16,I=f.create(),C=F();return(function(){function z(){this._key=F()}return a(z,"WeakMap"),z.prototype.has=function(H){var X=re(H,!1);return X!==void 0?f.has(X,this._key):!1},z.prototype.get=function(H){var X=re(H,!1);return X!==void 0?f.get(X,this._key):void 0},z.prototype.set=function(H,X){var Z=re(H,!0);return Z[this._key]=X,this},z.prototype.delete=function(H){var X=re(H,!1);return X!==void 0?delete X[this._key]:!1},z.prototype.clear=function(){this._key=F()},z})();function F(){var z;do z="@@WeakMap@@"+Ve();while(f.has(I,z));return I[z]=!0,z}function re(z,H){if(!r.call(z,C)){if(!H)return;Object.defineProperty(z,C,{value:f.create()})}return z[C]}function wt(z,H){for(var X=0;X<H;++X)z[X]=Math.random()*255|0;return z}function Pt(z){if(typeof Uint8Array=="function"){var H=new Uint8Array(z);return typeof crypto<"u"?crypto.getRandomValues(H):typeof msCrypto<"u"?msCrypto.getRandomValues(H):wt(H,z),H}return wt(new Array(z),z)}function Ve(){var z=Pt(T);z[6]=z[6]&79|64,z[8]=z[8]&191|128;for(var H="",X=0;X<T;++X){var Z=z[X];(X===4||X===6||X===8)&&(H+="-"),Z<16&&(H+="0"),H+=Z.toString(16).toLowerCase()}return H}}a(tt,"CreateWeakMapPolyfill");function He(T){return T.__=void 0,delete T.__,T}a(He,"MakeDictionary")})})(OT||(OT={}))});var Wu=S(C0=>{var oh=class extends Error{static{a(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}},x0=class extends oh{static{a(this,"InvalidArgumentError")}constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};C0.CommanderError=oh;C0.InvalidArgumentError=x0});var ah=S(P0=>{var{InvalidArgumentError:Ek}=Wu(),R0=class{static{a(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 Ek(`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 Tk(n){let e=n.name()+(n.variadic===!0?"...":"");return n.required?"<"+e+">":"["+e+"]"}a(Tk,"humanReadableArgName");P0.Argument=R0;P0.humanReadableArgName=Tk});var D0=S(F0=>{var{humanReadableArgName:Ak}=ah(),O0=class{static{a(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=a(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=>Ak(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 o=r(s);i.has(o)||i.set(o,[])}),t.forEach(s=>{let o=r(s);i.has(o)||i.set(o,[]),i.get(o).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)}a(s,"callFormatItem");let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],l=t.commandDescription(e);l.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(l),i),""]));let c=t.visibleArguments(e).map(d=>s(t.styleArgumentTerm(t.argumentTerm(d)),t.styleArgumentDescription(t.argumentDescription(d))));if(o=o.concat(this.formatItemList("Arguments:",c,t)),this.groupItems(e.options,t.visibleOptions(e),d=>d.helpGroupHeading??"Options:").forEach((d,h)=>{let p=d.map(g=>s(t.styleOptionTerm(t.optionTerm(g)),t.styleOptionDescription(t.optionDescription(g))));o=o.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))));o=o.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(g=>s(t.styleSubcommandTerm(t.subcommandTerm(g)),t.styleSubcommandDescription(t.subcommandDescription(g))));o=o.concat(this.formatItemList(h,p,t))}),o.join(`
|
|
6
|
+
"use strict";var yk=Object.create;var Gu=Object.defineProperty;var _k=Object.getOwnPropertyDescriptor;var bk=Object.getOwnPropertyNames;var Sk=Object.getPrototypeOf,wk=Object.prototype.hasOwnProperty;var a=(n,e)=>Gu(n,"name",{value:e,configurable:!0});var vk=(n,e)=>()=>(n&&(e=n(n=0)),e);var S=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),A0=(n,e)=>{for(var t in e)Gu(n,t,{get:e[t],enumerable:!0})},PT=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of bk(e))!wk.call(n,i)&&i!==t&&Gu(n,i,{get:()=>e[i],enumerable:!(r=_k(e,i))||r.enumerable});return n};var ee=(n,e,t)=>(t=n!=null?yk(Sk(n)):{},PT(e||!n||!n.__esModule?Gu(t,"default",{value:n,enumerable:!0}):t,n)),sh=n=>PT(Gu({},"__esModule",{value:!0}),n);var I0=S(()=>{var OT;(function(n){(function(e){var t=typeof globalThis=="object"?globalThis:typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:l(),r=i(n);typeof t.Reflect<"u"&&(r=i(t.Reflect,r)),e(r,t),typeof t.Reflect>"u"&&(t.Reflect=n);function i(c,u){return function(f,d){Object.defineProperty(c,f,{configurable:!0,writable:!0,value:d}),u&&u(f,d)}}a(i,"makeExporter");function s(){try{return Function("return this;")()}catch{}}a(s,"functionThis");function o(){try{return(0,eval)("(function() { return this; })()")}catch{}}a(o,"indirectEvalThis");function l(){return s()||o()}a(l,"sloppyModeThis")})(function(e,t){var r=Object.prototype.hasOwnProperty,i=typeof Symbol=="function",s=i&&typeof Symbol.toPrimitive<"u"?Symbol.toPrimitive:"@@toPrimitive",o=i&&typeof Symbol.iterator<"u"?Symbol.iterator:"@@iterator",l=typeof Object.create=="function",c={__proto__:[]}instanceof Array,u=!l&&!c,f={create:l?function(){return He(Object.create(null))}:c?function(){return He({__proto__:null})}:function(){return He({})},has:u?function(T,I){return r.call(T,I)}:function(T,I){return I in T},get:u?function(T,I){return r.call(T,I)?T[I]:void 0}:function(T,I){return T[I]}},d=Object.getPrototypeOf(Function),h=typeof Map=="function"&&typeof Map.prototype.entries=="function"?Map:xe(),p=typeof Set=="function"&&typeof Set.prototype.entries=="function"?Set:ot(),g=typeof WeakMap=="function"?WeakMap:tt(),y=i?Symbol.for("@reflect-metadata:registry"):void 0,v=Te(),w=Ae(v);function E(T,I,C,F){if(Y(C)){if(!Qe(T))throw new TypeError;if(!Ke(I))throw new TypeError;return B(T,I)}else{if(!Qe(T))throw new TypeError;if(!ce(I))throw new TypeError;if(!ce(F)&&!Y(F)&&!Le(F))throw new TypeError;return Le(F)&&(F=void 0),C=Ne(C),K(T,I,C,F)}}a(E,"decorate"),e("decorate",E);function A(T,I){function C(F,re){if(!ce(F))throw new TypeError;if(!Y(re)&&!et(re))throw new TypeError;V(T,I,F,re)}return a(C,"decorator"),C}a(A,"metadata"),e("metadata",A);function x(T,I,C,F){if(!ce(C))throw new TypeError;return Y(F)||(F=Ne(F)),V(T,I,C,F)}a(x,"defineMetadata"),e("defineMetadata",x);function D(T,I,C){if(!ce(I))throw new TypeError;return Y(C)||(C=Ne(C)),ne(T,I,C)}a(D,"hasMetadata"),e("hasMetadata",D);function J(T,I,C){if(!ce(I))throw new TypeError;return Y(C)||(C=Ne(C)),G(T,I,C)}a(J,"hasOwnMetadata"),e("hasOwnMetadata",J);function ae(T,I,C){if(!ce(I))throw new TypeError;return Y(C)||(C=Ne(C)),ie(T,I,C)}a(ae,"getMetadata"),e("getMetadata",ae);function ge(T,I,C){if(!ce(I))throw new TypeError;return Y(C)||(C=Ne(C)),W(T,I,C)}a(ge,"getOwnMetadata"),e("getOwnMetadata",ge);function N(T,I){if(!ce(T))throw new TypeError;return Y(I)||(I=Ne(I)),q(T,I)}a(N,"getMetadataKeys"),e("getMetadataKeys",N);function Q(T,I){if(!ce(T))throw new TypeError;return Y(I)||(I=Ne(I)),nt(T,I)}a(Q,"getOwnMetadataKeys"),e("getOwnMetadataKeys",Q);function oe(T,I,C){if(!ce(I))throw new TypeError;if(Y(C)||(C=Ne(C)),!ce(I))throw new TypeError;Y(C)||(C=Ne(C));var F=he(I,C,!1);return Y(F)?!1:F.OrdinaryDeleteMetadata(T,I,C)}a(oe,"deleteMetadata"),e("deleteMetadata",oe);function B(T,I){for(var C=T.length-1;C>=0;--C){var F=T[C],re=F(I);if(!Y(re)&&!Le(re)){if(!Ke(re))throw new TypeError;I=re}}return I}a(B,"DecorateConstructor");function K(T,I,C,F){for(var re=T.length-1;re>=0;--re){var wt=T[re],Pt=wt(I,C,F);if(!Y(Pt)&&!Le(Pt)){if(!ce(Pt))throw new TypeError;F=Pt}}return F}a(K,"DecorateProperty");function ne(T,I,C){var F=G(T,I,C);if(F)return!0;var re=me(I);return Le(re)?!1:ne(T,re,C)}a(ne,"OrdinaryHasMetadata");function G(T,I,C){var F=he(I,C,!1);return Y(F)?!1:Ye(F.OrdinaryHasOwnMetadata(T,I,C))}a(G,"OrdinaryHasOwnMetadata");function ie(T,I,C){var F=G(T,I,C);if(F)return W(T,I,C);var re=me(I);if(!Le(re))return ie(T,re,C)}a(ie,"OrdinaryGetMetadata");function W(T,I,C){var F=he(I,C,!1);if(!Y(F))return F.OrdinaryGetOwnMetadata(T,I,C)}a(W,"OrdinaryGetOwnMetadata");function V(T,I,C,F){var re=he(C,F,!0);re.OrdinaryDefineOwnMetadata(T,I,C,F)}a(V,"OrdinaryDefineOwnMetadata");function q(T,I){var C=nt(T,I),F=me(T);if(F===null)return C;var re=q(F,I);if(re.length<=0)return C;if(C.length<=0)return re;for(var wt=new p,Pt=[],Ve=0,z=C;Ve<z.length;Ve++){var H=z[Ve],X=wt.has(H);X||(wt.add(H),Pt.push(H))}for(var Z=0,Me=re;Z<Me.length;Z++){var H=Me[Z],X=wt.has(H);X||(wt.add(H),Pt.push(H))}return Pt}a(q,"OrdinaryMetadataKeys");function nt(T,I){var C=he(T,I,!1);return C?C.OrdinaryOwnMetadataKeys(T,I):[]}a(nt,"OrdinaryOwnMetadataKeys");function lt(T){if(T===null)return 1;switch(typeof T){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return T===null?1:6;default:return 6}}a(lt,"Type");function Y(T){return T===void 0}a(Y,"IsUndefined");function Le(T){return T===null}a(Le,"IsNull");function qe(T){return typeof T=="symbol"}a(qe,"IsSymbol");function ce(T){return typeof T=="object"?T!==null:typeof T=="function"}a(ce,"IsObject");function Xe(T,I){switch(lt(T)){case 0:return T;case 1:return T;case 2:return T;case 3:return T;case 4:return T;case 5:return T}var C=I===3?"string":I===5?"number":"default",F=we(T,s);if(F!==void 0){var re=F.call(T,C);if(ce(re))throw new TypeError;return re}return Je(T,C==="default"?"number":C)}a(Xe,"ToPrimitive");function Je(T,I){if(I==="string"){var C=T.toString;if(je(C)){var F=C.call(T);if(!ce(F))return F}var re=T.valueOf;if(je(re)){var F=re.call(T);if(!ce(F))return F}}else{var re=T.valueOf;if(je(re)){var F=re.call(T);if(!ce(F))return F}var wt=T.toString;if(je(wt)){var F=wt.call(T);if(!ce(F))return F}}throw new TypeError}a(Je,"OrdinaryToPrimitive");function Ye(T){return!!T}a(Ye,"ToBoolean");function Ze(T){return""+T}a(Ze,"ToString");function Ne(T){var I=Xe(T,3);return qe(I)?I:Ze(I)}a(Ne,"ToPropertyKey");function Qe(T){return Array.isArray?Array.isArray(T):T instanceof Object?T instanceof Array:Object.prototype.toString.call(T)==="[object Array]"}a(Qe,"IsArray");function je(T){return typeof T=="function"}a(je,"IsCallable");function Ke(T){return typeof T=="function"}a(Ke,"IsConstructor");function et(T){switch(lt(T)){case 3:return!0;case 4:return!0;default:return!1}}a(et,"IsPropertyKey");function ye(T,I){return T===I||T!==T&&I!==I}a(ye,"SameValueZero");function we(T,I){var C=T[I];if(C!=null){if(!je(C))throw new TypeError;return C}}a(we,"GetMethod");function ve(T){var I=we(T,o);if(!je(I))throw new TypeError;var C=I.call(T);if(!ce(C))throw new TypeError;return C}a(ve,"GetIterator");function _e(T){return T.value}a(_e,"IteratorValue");function be(T){var I=T.next();return I.done?!1:I}a(be,"IteratorStep");function Se(T){var I=T.return;I&&I.call(T)}a(Se,"IteratorClose");function me(T){var I=Object.getPrototypeOf(T);if(typeof T!="function"||T===d||I!==d)return I;var C=T.prototype,F=C&&Object.getPrototypeOf(C);if(F==null||F===Object.prototype)return I;var re=F.constructor;return typeof re!="function"||re===T?I:re}a(me,"OrdinaryGetPrototypeOf");function Ee(){var T;!Y(y)&&typeof t.Reflect<"u"&&!(y in t.Reflect)&&typeof t.Reflect.defineMetadata=="function"&&(T=Ie(t.Reflect));var I,C,F,re=new g,wt={registerProvider:Pt,getProvider:z,setProvider:X};return wt;function Pt(Z){if(!Object.isExtensible(wt))throw new Error("Cannot add provider to a frozen registry.");switch(!0){case T===Z:break;case Y(I):I=Z;break;case I===Z:break;case Y(C):C=Z;break;case C===Z:break;default:F===void 0&&(F=new p),F.add(Z);break}}function Ve(Z,Me){if(!Y(I)){if(I.isProviderFor(Z,Me))return I;if(!Y(C)){if(C.isProviderFor(Z,Me))return I;if(!Y(F))for(var ct=ve(F);;){var ut=be(ct);if(!ut)return;var Or=_e(ut);if(Or.isProviderFor(Z,Me))return Se(ct),Or}}}if(!Y(T)&&T.isProviderFor(Z,Me))return T}function z(Z,Me){var ct=re.get(Z),ut;return Y(ct)||(ut=ct.get(Me)),Y(ut)&&(ut=Ve(Z,Me),Y(ut)||(Y(ct)&&(ct=new h,re.set(Z,ct)),ct.set(Me,ut))),ut}function H(Z){if(Y(Z))throw new TypeError;return I===Z||C===Z||!Y(F)&&F.has(Z)}function X(Z,Me,ct){if(!H(ct))throw new Error("Metadata provider not registered.");var ut=z(Z,Me);if(ut!==ct){if(!Y(ut))return!1;var Or=re.get(Z);Y(Or)&&(Or=new h,re.set(Z,Or)),Or.set(Me,ct)}return!0}}a(Ee,"CreateMetadataRegistry");function Te(){var T;return!Y(y)&&ce(t.Reflect)&&Object.isExtensible(t.Reflect)&&(T=t.Reflect[y]),Y(T)&&(T=Ee()),!Y(y)&&ce(t.Reflect)&&Object.isExtensible(t.Reflect)&&Object.defineProperty(t.Reflect,y,{enumerable:!1,configurable:!1,writable:!1,value:T}),T}a(Te,"GetOrCreateMetadataRegistry");function Ae(T){var I=new g,C={isProviderFor:a(function(H,X){var Z=I.get(H);return Y(Z)?!1:Z.has(X)},"isProviderFor"),OrdinaryDefineOwnMetadata:Pt,OrdinaryHasOwnMetadata:re,OrdinaryGetOwnMetadata:wt,OrdinaryOwnMetadataKeys:Ve,OrdinaryDeleteMetadata:z};return v.registerProvider(C),C;function F(H,X,Z){var Me=I.get(H),ct=!1;if(Y(Me)){if(!Z)return;Me=new h,I.set(H,Me),ct=!0}var ut=Me.get(X);if(Y(ut)){if(!Z)return;if(ut=new h,Me.set(X,ut),!T.setProvider(H,X,C))throw Me.delete(X),ct&&I.delete(H),new Error("Wrong provider for target.")}return ut}a(F,"GetOrCreateMetadataMap");function re(H,X,Z){var Me=F(X,Z,!1);return Y(Me)?!1:Ye(Me.has(H))}a(re,"OrdinaryHasOwnMetadata");function wt(H,X,Z){var Me=F(X,Z,!1);if(!Y(Me))return Me.get(H)}a(wt,"OrdinaryGetOwnMetadata");function Pt(H,X,Z,Me){var ct=F(Z,Me,!0);ct.set(H,X)}a(Pt,"OrdinaryDefineOwnMetadata");function Ve(H,X){var Z=[],Me=F(H,X,!1);if(Y(Me))return Z;for(var ct=Me.keys(),ut=ve(ct),Or=0;;){var xn=be(ut);if(!xn)return Z.length=Or,Z;var zn=_e(xn);try{Z[Or]=zn}catch(an){try{Se(ut)}finally{throw an}}Or++}}a(Ve,"OrdinaryOwnMetadataKeys");function z(H,X,Z){var Me=F(X,Z,!1);if(Y(Me)||!Me.delete(H))return!1;if(Me.size===0){var ct=I.get(X);Y(ct)||(ct.delete(Z),ct.size===0&&I.delete(ct))}return!0}a(z,"OrdinaryDeleteMetadata")}a(Ae,"CreateMetadataProvider");function Ie(T){var I=T.defineMetadata,C=T.hasOwnMetadata,F=T.getOwnMetadata,re=T.getOwnMetadataKeys,wt=T.deleteMetadata,Pt=new g,Ve={isProviderFor:a(function(z,H){var X=Pt.get(z);return!Y(X)&&X.has(H)?!0:re(z,H).length?(Y(X)&&(X=new p,Pt.set(z,X)),X.add(H),!0):!1},"isProviderFor"),OrdinaryDefineOwnMetadata:I,OrdinaryHasOwnMetadata:C,OrdinaryGetOwnMetadata:F,OrdinaryOwnMetadataKeys:re,OrdinaryDeleteMetadata:wt};return Ve}a(Ie,"CreateFallbackProvider");function he(T,I,C){var F=v.getProvider(T,I);if(!Y(F))return F;if(C){if(v.setProvider(T,I,w))return w;throw new Error("Illegal state.")}}a(he,"GetMetadataProvider");function xe(){var T={},I=[],C=(function(){function Ve(z,H,X){this._index=0,this._keys=z,this._values=H,this._selector=X}return a(Ve,"MapIterator"),Ve.prototype["@@iterator"]=function(){return this},Ve.prototype[o]=function(){return this},Ve.prototype.next=function(){var z=this._index;if(z>=0&&z<this._keys.length){var H=this._selector(this._keys[z],this._values[z]);return z+1>=this._keys.length?(this._index=-1,this._keys=I,this._values=I):this._index++,{value:H,done:!1}}return{value:void 0,done:!0}},Ve.prototype.throw=function(z){throw this._index>=0&&(this._index=-1,this._keys=I,this._values=I),z},Ve.prototype.return=function(z){return this._index>=0&&(this._index=-1,this._keys=I,this._values=I),{value:z,done:!0}},Ve})(),F=(function(){function Ve(){this._keys=[],this._values=[],this._cacheKey=T,this._cacheIndex=-2}return a(Ve,"Map"),Object.defineProperty(Ve.prototype,"size",{get:a(function(){return this._keys.length},"get"),enumerable:!0,configurable:!0}),Ve.prototype.has=function(z){return this._find(z,!1)>=0},Ve.prototype.get=function(z){var H=this._find(z,!1);return H>=0?this._values[H]:void 0},Ve.prototype.set=function(z,H){var X=this._find(z,!0);return this._values[X]=H,this},Ve.prototype.delete=function(z){var H=this._find(z,!1);if(H>=0){for(var X=this._keys.length,Z=H+1;Z<X;Z++)this._keys[Z-1]=this._keys[Z],this._values[Z-1]=this._values[Z];return this._keys.length--,this._values.length--,ye(z,this._cacheKey)&&(this._cacheKey=T,this._cacheIndex=-2),!0}return!1},Ve.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=T,this._cacheIndex=-2},Ve.prototype.keys=function(){return new C(this._keys,this._values,re)},Ve.prototype.values=function(){return new C(this._keys,this._values,wt)},Ve.prototype.entries=function(){return new C(this._keys,this._values,Pt)},Ve.prototype["@@iterator"]=function(){return this.entries()},Ve.prototype[o]=function(){return this.entries()},Ve.prototype._find=function(z,H){if(!ye(this._cacheKey,z)){this._cacheIndex=-1;for(var X=0;X<this._keys.length;X++)if(ye(this._keys[X],z)){this._cacheIndex=X;break}}return this._cacheIndex<0&&H&&(this._cacheIndex=this._keys.length,this._keys.push(z),this._values.push(void 0)),this._cacheIndex},Ve})();return F;function re(Ve,z){return Ve}function wt(Ve,z){return z}function Pt(Ve,z){return[Ve,z]}}a(xe,"CreateMapPolyfill");function ot(){var T=(function(){function I(){this._map=new h}return a(I,"Set"),Object.defineProperty(I.prototype,"size",{get:a(function(){return this._map.size},"get"),enumerable:!0,configurable:!0}),I.prototype.has=function(C){return this._map.has(C)},I.prototype.add=function(C){return this._map.set(C,C),this},I.prototype.delete=function(C){return this._map.delete(C)},I.prototype.clear=function(){this._map.clear()},I.prototype.keys=function(){return this._map.keys()},I.prototype.values=function(){return this._map.keys()},I.prototype.entries=function(){return this._map.entries()},I.prototype["@@iterator"]=function(){return this.keys()},I.prototype[o]=function(){return this.keys()},I})();return T}a(ot,"CreateSetPolyfill");function tt(){var T=16,I=f.create(),C=F();return(function(){function z(){this._key=F()}return a(z,"WeakMap"),z.prototype.has=function(H){var X=re(H,!1);return X!==void 0?f.has(X,this._key):!1},z.prototype.get=function(H){var X=re(H,!1);return X!==void 0?f.get(X,this._key):void 0},z.prototype.set=function(H,X){var Z=re(H,!0);return Z[this._key]=X,this},z.prototype.delete=function(H){var X=re(H,!1);return X!==void 0?delete X[this._key]:!1},z.prototype.clear=function(){this._key=F()},z})();function F(){var z;do z="@@WeakMap@@"+Ve();while(f.has(I,z));return I[z]=!0,z}function re(z,H){if(!r.call(z,C)){if(!H)return;Object.defineProperty(z,C,{value:f.create()})}return z[C]}function wt(z,H){for(var X=0;X<H;++X)z[X]=Math.random()*255|0;return z}function Pt(z){if(typeof Uint8Array=="function"){var H=new Uint8Array(z);return typeof crypto<"u"?crypto.getRandomValues(H):typeof msCrypto<"u"?msCrypto.getRandomValues(H):wt(H,z),H}return wt(new Array(z),z)}function Ve(){var z=Pt(T);z[6]=z[6]&79|64,z[8]=z[8]&191|128;for(var H="",X=0;X<T;++X){var Z=z[X];(X===4||X===6||X===8)&&(H+="-"),Z<16&&(H+="0"),H+=Z.toString(16).toLowerCase()}return H}}a(tt,"CreateWeakMapPolyfill");function He(T){return T.__=void 0,delete T.__,T}a(He,"MakeDictionary")})})(OT||(OT={}))});var Wu=S(C0=>{var oh=class extends Error{static{a(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}},x0=class extends oh{static{a(this,"InvalidArgumentError")}constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};C0.CommanderError=oh;C0.InvalidArgumentError=x0});var ah=S(P0=>{var{InvalidArgumentError:Ek}=Wu(),R0=class{static{a(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 Ek(`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 Tk(n){let e=n.name()+(n.variadic===!0?"...":"");return n.required?"<"+e+">":"["+e+"]"}a(Tk,"humanReadableArgName");P0.Argument=R0;P0.humanReadableArgName=Tk});var D0=S(F0=>{var{humanReadableArgName:Ak}=ah(),O0=class{static{a(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=a(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=>Ak(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 o=r(s);i.has(o)||i.set(o,[])}),t.forEach(s=>{let o=r(s);i.has(o)||i.set(o,[]),i.get(o).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)}a(s,"callFormatItem");let o=[`${t.styleTitle("Usage:")} ${t.styleUsage(t.commandUsage(e))}`,""],l=t.commandDescription(e);l.length>0&&(o=o.concat([t.boxWrap(t.styleCommandDescription(l),i),""]));let c=t.visibleArguments(e).map(d=>s(t.styleArgumentTerm(t.argumentTerm(d)),t.styleArgumentDescription(t.argumentDescription(d))));if(o=o.concat(this.formatItemList("Arguments:",c,t)),this.groupItems(e.options,t.visibleOptions(e),d=>d.helpGroupHeading??"Options:").forEach((d,h)=>{let p=d.map(g=>s(t.styleOptionTerm(t.optionTerm(g)),t.styleOptionDescription(t.optionDescription(g))));o=o.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))));o=o.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(g=>s(t.styleSubcommandTerm(t.subcommandTerm(g)),t.styleSubcommandDescription(t.subcommandDescription(g))));o=o.concat(this.formatItemList(h,p,t))}),o.join(`
|
|
7
7
|
`)}displayWidth(e){return FT(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 o=" ".repeat(2);if(!r)return o+e;let l=e.padEnd(t+e.length-i.displayWidth(e)),c=2,f=(this.helpWidth??80)-t-c-2,d;return f<this.minWidthToWrap||i.preformatted(r)?d=r:d=i.boxWrap(r,f).replace(/\n/g,`
|
|
8
8
|
`+" ".repeat(t+c)),o+l+" ".repeat(c)+d.replace(/\n/g,`
|
|
9
9
|
${o}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let r=e.split(/\r\n|\n/),i=/[\s]*[^\s]+/g,s=[];return r.forEach(o=>{let l=o.match(i);if(l===null){s.push("");return}let c=[l.shift()],u=this.displayWidth(c[0]);l.forEach(f=>{let d=this.displayWidth(f);if(u+d<=t){c.push(f),u+=d;return}s.push(c.join(""));let h=f.trimStart();c=[h],u=this.displayWidth(h)}),s.push(c.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 o;typeof t=="function"?o=t({error:s.error,command:s.command}):o=t,o&&s.write(`${o}
|
|
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 jT(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})}a(jT,"incrementNodeInspectorPort");function V0(){if(dt.env.NO_COLOR||dt.env.FORCE_COLOR==="0"||dt.env.FORCE_COLOR==="false")return!1;if(dt.env.FORCE_COLOR||dt.env.CLICOLOR_FORCE!==void 0)return!0}a(V0,"useColor");B0.Command=U0;B0.useColor=V0});var qT=S(si=>{var{Argument:UT}=ah(),{Command:q0}=$T(),{CommanderError:kk,InvalidArgumentError:VT}=Wu(),{Help:Mk}=D0(),{Option:BT}=M0();si.program=new q0;si.createCommand=n=>new q0(n);si.createOption=(n,e)=>new BT(n,e);si.createArgument=(n,e)=>new UT(n,e);si.Command=q0;si.Option=BT;si.Argument=UT;si.Help=Mk;si.CommanderError=kk;si.InvalidArgumentError=VT;si.InvalidOptionArgumentError=VT});var $l=S(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});ch.AssetClass=void 0;var WT;(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"})(WT||(ch.AssetClass=WT={}))});var Ul=S(uh=>{"use strict";Object.defineProperty(uh,"__esModule",{value:!0});uh.EffortStatus=void 0;var zT;(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"})(zT||(uh.EffortStatus=zT={}))});var G0=S(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});fh.EFFORT_STATUS_OPTIONS=void 0;fh.EFFORT_STATUS_OPTIONS=[{value:"[[ems__EffortStatusDraft]]",label:"Draft"},{value:"[[ems__EffortStatusBacklog]]",label:"Backlog"},{value:"[[ems__EffortStatusAnalysis]]",label:"Analysis"},{value:"[[ems__EffortStatusToDo]]",label:"To Do"},{value:"[[ems__EffortStatusDoing]]",label:"Doing"},{value:"[[ems__EffortStatusDone]]",label:"Done"},{value:"[[ems__EffortStatusTrashed]]",label:"Trashed"}]});var No=S(dh=>{"use strict";Object.defineProperty(dh,"__esModule",{value:!0});dh.GroundingType=void 0;var HT;(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",n.WORKFLOW_TRANSITION="workflow_transition"})(HT||(dh.GroundingType=HT={}))});var hh=S(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.GROUNDING_TYPE_IRI_TO_ENUM=Rn.GROUNDING_TYPE_UID_TO_ENUM=Rn.GROUNDING_TYPE_UIDS=void 0;Rn.resolveGroundingTypeFromIRI=$k;Rn.resolveGroundingTypeFromWikilinkLiteral=Uk;var er=No();Rn.GROUNDING_TYPE_UIDS={[er.GroundingType.PROPERTY_SET]:"cf3bb923-f1f1-40be-b728-782844402426",[er.GroundingType.PROPERTY_DELETE]:"4bdf1d0b-e9da-4d96-bafe-c5aaef8c2bd5",[er.GroundingType.COMPOSITE]:"8f9a57db-3865-4886-92fb-c5ab7f3c3fa3",[er.GroundingType.SERVICE_CALL]:"9bf9fc99-ac37-4e51-b9f5-bd920099947c",[er.GroundingType.CREATE_INSTANCE]:"4367e2d6-6c92-450a-becb-abce1fb07682",[er.GroundingType.PROPERTY_APPEND]:"572f7e69-a8a1-42f6-8113-5aa65cc4b552",[er.GroundingType.PROPERTY_INCREMENT]:"afc29f90-45eb-4f94-9fe2-2ce738759161",[er.GroundingType.PROPERTY_SHIFT]:"f4e5266f-f3cc-49fd-a5a5-ce1e8b7847a4",[er.GroundingType.SPARQL_UPDATE]:"79c3e709-8d1d-4694-bcc6-b9ff07d59b86",[er.GroundingType.WORKFLOW_TRANSITION]:"5c1a2552-d576-496d-8823-563573dd1e2f"};Rn.GROUNDING_TYPE_UID_TO_ENUM=Object.freeze(Object.fromEntries(Object.entries(Rn.GROUNDING_TYPE_UIDS).map(([n,e])=>[e,n])));var us="https://exocortex.my/ontology/exocmd#";Rn.GROUNDING_TYPE_IRI_TO_ENUM=Object.freeze({[`${us}GroundingTypePropertySet`]:er.GroundingType.PROPERTY_SET,[`${us}GroundingTypePropertyDelete`]:er.GroundingType.PROPERTY_DELETE,[`${us}GroundingTypeComposite`]:er.GroundingType.COMPOSITE,[`${us}GroundingTypeServiceCall`]:er.GroundingType.SERVICE_CALL,[`${us}GroundingTypeCreateInstance`]:er.GroundingType.CREATE_INSTANCE,[`${us}GroundingTypePropertyAppend`]:er.GroundingType.PROPERTY_APPEND,[`${us}GroundingTypePropertyIncrement`]:er.GroundingType.PROPERTY_INCREMENT,[`${us}GroundingTypePropertyShift`]:er.GroundingType.PROPERTY_SHIFT,[`${us}GroundingTypeSparqlUpdate`]:er.GroundingType.SPARQL_UPDATE,[`${us}GroundingTypeWorkflowTransition`]:er.GroundingType.WORKFLOW_TRANSITION});var jk=/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i;function $k(n){let e=Rn.GROUNDING_TYPE_IRI_TO_ENUM[n];if(e!==void 0)return e;let t=n.match(jk);return t?Rn.GROUNDING_TYPE_UID_TO_ENUM[t[1].toLowerCase()]??null:null}a($k,"resolveGroundingTypeFromIRI");function Uk(n){let e=n.match(/^\[\[([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\|[^\]]*)?\]\]$/i);return e?Rn.GROUNDING_TYPE_UID_TO_ENUM[e[1].toLowerCase()]??null:null}a(Uk,"resolveGroundingTypeFromWikilinkLiteral")});var W0=S(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.CommandBindingStyleProperty=oi.CommandBindingProperty=oi.GroundingProperty=oi.PreconditionProperty=oi.CommandProperty=void 0;oi.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",OPEN_IN_SAME_TAB:"exocmd__Command_openInSameTab"};oi.PreconditionProperty={SPARQL_ASK:"exocmd__Precondition_sparqlAsk",QUERY:"exocmd__Precondition_query"};oi.GroundingProperty={TYPE:"exocmd__Grounding_type",SPARQL_UPDATE:"exocmd__Grounding_sparqlUpdate",TARGET_PROPERTY:"exocmd__Grounding_targetProperty",STEPS:"exocmd__Grounding_steps",IS_DEFINED_BY:"exocmd__Grounding_isDefinedBy",LABEL_TEMPLATE:"exocmd__Grounding_labelTemplate"};oi.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"};oi.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 z0=S(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.STYLE_SOURCE_VALUES=Pn.LABEL_CLASS_VALUES=Pn.COMMAND_VARIANT_VALUES=void 0;Pn.isCommandVariant=Vk;Pn.isLabelClass=Bk;Pn.isStyleSource=qk;Pn.COMMAND_VARIANT_VALUES=Object.freeze(["primary","secondary","success","warning","danger","muted"]);Pn.LABEL_CLASS_VALUES=Object.freeze(["muted","bold","uppercase","compact"]);Pn.STYLE_SOURCE_VALUES=Object.freeze(["vendor","user"]);function Vk(n){return typeof n=="string"&&Pn.COMMAND_VARIANT_VALUES.includes(n)}a(Vk,"isCommandVariant");function Bk(n){return typeof n=="string"&&Pn.LABEL_CLASS_VALUES.includes(n)}a(Bk,"isLabelClass");function qk(n){return typeof n=="string"&&Pn.STYLE_SOURCE_VALUES.includes(n)}a(qk,"isStyleSource")});var YT=S(Vl=>{"use strict";Object.defineProperty(Vl,"__esModule",{value:!0});Vl.isCommandFrontmatter=Gk;Vl.isPreconditionFrontmatter=Wk;Vl.isGroundingFrontmatter=zk;Vl.isCommandBindingFrontmatter=Hk;function Gk(n){return ph(n,"exocmd__Command")}a(Gk,"isCommandFrontmatter");function Wk(n){return ph(n,"exocmd__Precondition")}a(Wk,"isPreconditionFrontmatter");function zk(n){return ph(n,"exocmd__Grounding")}a(zk,"isGroundingFrontmatter");function Hk(n){return ph(n,"exocmd__CommandBinding")}a(Hk,"isCommandBindingFrontmatter");function ph(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}a(ph,"hasInstanceClass")});var QT=S(mh=>{"use strict";Object.defineProperty(mh,"__esModule",{value:!0});mh.hasPosition=Yk;mh.isFixed=Qk;function Yk(n){return typeof n.x=="number"&&typeof n.y=="number"}a(Yk,"hasPosition");function Qk(n){return n.fx!==null&&n.fx!==void 0&&n.fy!==null&&n.fy!==void 0}a(Qk,"isFixed")});var KT=S(gh=>{"use strict";Object.defineProperty(gh,"__esModule",{value:!0});gh.createEmptyGraphData=Kk;gh.mergeGraphData=Xk;function Kk(){return{nodes:[],edges:[],lastUpdated:Date.now(),version:0}}a(Kk,"createEmptyGraphData");function Xk(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 o=`${s.source}->${s.target}:${s.type}`;r.has(o)||(r.add(o),i.push(s))}for(let s of e.edges){let o=`${s.source}->${s.target}:${s.type}`;r.has(o)||(r.add(o),i.push(s))}return{nodes:Array.from(t.values()),edges:i,lastUpdated:Date.now(),version:Math.max(n.version??0,e.version??0)+1}}a(Xk,"mergeGraphData")});var H0=S(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0});yh.createEdgeId=Jk;yh.edgesEqual=Zk;function Jk(n,e,t,r){let i=r?`|${r}`:"";return`${n}->${e}:${t}${i}`}a(Jk,"createEdgeId");function Zk(n,e){return n.source===e.source&&n.target===e.target&&n.type===e.type&&n.predicate===e.predicate}a(Zk,"edgesEqual")});var Y0=S(Gt=>{"use strict";Object.defineProperty(Gt,"__esModule",{value:!0});Gt.BUILT_IN_EDGE_STYLES=Gt.BUILT_IN_NODE_STYLES=Gt.DEFAULT_EDGE_STYLE=Gt.DEFAULT_NODE_STYLE=Gt.RDF_TYPE_PREDICATES=void 0;Gt.mergeNodeStyles=e4;Gt.mergeEdgeStyles=t4;Gt.extractLocalName=r4;Gt.isClassType=n4;Gt.isTypePredicate=i4;Gt.isSubClassPredicate=s4;Gt.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"};Gt.DEFAULT_NODE_STYLE={color:"#6366f1",borderColor:"#4f46e5",borderWidth:2,size:30,shape:"circle",icon:"",opacity:1,shadow:!1,animation:"none"};Gt.DEFAULT_EDGE_STYLE={color:"#9ca3af",width:1,lineStyle:"solid",arrow:"standard",curvature:0,opacity:.6,showLabel:!1,labelPosition:.5};Gt.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"}};Gt.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 e4(n,e){return{...n,...Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}}a(e4,"mergeNodeStyles");function t4(n,e){return{...n,...Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0))}}a(t4,"mergeEdgeStyles");function r4(n){let e=n.lastIndexOf("#"),t=n.lastIndexOf("/"),r=Math.max(e,t);return r>=0?n.substring(r+1):n}a(r4,"extractLocalName");function n4(n){return n===Gt.RDF_TYPE_PREDICATES.RDFS_CLASS||n===Gt.RDF_TYPE_PREDICATES.OWL_CLASS}a(n4,"isClassType");function i4(n){return n===Gt.RDF_TYPE_PREDICATES.RDF_TYPE}a(i4,"isTypePredicate");function s4(n){return n===Gt.RDF_TYPE_PREDICATES.RDFS_SUBCLASS_OF}a(s4,"isSubClassPredicate")});var JT=S(XT=>{"use strict";Object.defineProperty(XT,"__esModule",{value:!0})});var Ce=S(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});_h.IRI=void 0;var Q0=class n{static{a(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)}}};_h.IRI=Q0});var Ue=S(Na=>{"use strict";Object.defineProperty(Na,"__esModule",{value:!0});Na.Literal=void 0;Na.parseLanguageTag=ZT;Na.createDirectionalLiteral=a4;Na.createLiteralFromLanguageTag=l4;var o4="http://www.w3.org/2001/XMLSchema#string",zu=class{static{a(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===o4?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}};Na.Literal=zu;function ZT(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()}}a(ZT,"parseLanguageTag");function a4(n,e,t){return new zu(n,void 0,e,t)}a(a4,"createDirectionalLiteral");function l4(n,e){let{language:t,direction:r}=ZT(e);return new zu(n,void 0,t,r)}a(l4,"createLiteralFromLanguageTag")});var Ut=S(Sh=>{"use strict";Object.defineProperty(Sh,"__esModule",{value:!0});Sh.BlankNode=void 0;var bh=class n{static{a(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())}};Sh.BlankNode=bh;bh.counter=0});var tr=S(wh=>{"use strict";Object.defineProperty(wh,"__esModule",{value:!0});wh.Namespace=void 0;var eA=Ce(),We=class n{static{a(this,"Namespace")}constructor(e,t){if(e.trim().length===0)throw new Error("Namespace prefix cannot be empty");this._prefix=e,this._iri=new eA.IRI(t)}get prefix(){return this._prefix}get iri(){return this._iri}term(e){return new eA.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}};wh.Namespace=We;We.RDF=new We("rdf","http://www.w3.org/1999/02/22-rdf-syntax-ns#");We.RDFS=new We("rdfs","http://www.w3.org/2000/01/rdf-schema#");We.OWL=new We("owl","http://www.w3.org/2002/07/owl#");We.XSD=new We("xsd","http://www.w3.org/2001/XMLSchema#");We.EXO=new We("exo","https://exocortex.my/ontology/exo#");We.EMS=new We("ems","https://exocortex.my/ontology/ems#");We.EXOCMD=new We("exocmd","https://exocortex.my/ontology/exocmd#");We.IMS=new We("ims","https://exocortex.my/ontology/ims#");We.ZTLK=new We("ztlk","https://exocortex.my/ontology/ztlk#");We.PTMS=new We("ptms","https://exocortex.my/ontology/ptms#");We.LIT=new We("lit","https://exocortex.my/ontology/lit#");We.INBOX=new We("inbox","https://exocortex.my/ontology/inbox#");We.PMBOK=new We("pmbok","https://exocortex.my/ontology/pmbok#");We.EXOCORTEX_ONTOLOGY_BASE="https://exocortex.my/ontology/";We.KNOWN_NAMESPACES=[We.EXO,We.EMS,We.EXOCMD,We.IMS,We.ZTLK,We.PTMS,We.LIT,We.INBOX,We.PMBOK]});var Hn=S(vh=>{"use strict";Object.defineProperty(vh,"__esModule",{value:!0});vh.Triple=void 0;var K0=Ce(),X0=Ue(),J0=Ut(),Z0=class{static{a(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 K0.IRI&&t instanceof K0.IRI||e instanceof J0.BlankNode&&t instanceof J0.BlankNode||e instanceof X0.Literal&&t instanceof X0.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 K0.IRI?`<${e.value}>`:e instanceof J0.BlankNode||e instanceof X0.Literal||this.isQuotedTriple(e)?e.toString():""}};vh.Triple=Z0});var Hu=S(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});Eh.QuotedTriple=void 0;var e_=Ce(),t_=Ue(),r_=Ut(),n_=class n{static{a(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 e_.IRI&&t instanceof e_.IRI||e instanceof r_.BlankNode&&t instanceof r_.BlankNode||e instanceof t_.Literal&&t instanceof t_.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 e_.IRI?`<${e.value}>`:e instanceof r_.BlankNode||e instanceof t_.Literal||e instanceof n?e.toString():""}};Eh.QuotedTriple=n_});var tA=S(rr=>{"use strict";Object.defineProperty(rr,"__esModule",{value:!0});rr.QuotedTriple=rr.Triple=rr.Namespace=rr.BlankNode=rr.createLiteralFromLanguageTag=rr.createDirectionalLiteral=rr.parseLanguageTag=rr.Literal=rr.IRI=void 0;var c4=Ce();Object.defineProperty(rr,"IRI",{enumerable:!0,get:a(function(){return c4.IRI},"get")});var Th=Ue();Object.defineProperty(rr,"Literal",{enumerable:!0,get:a(function(){return Th.Literal},"get")});Object.defineProperty(rr,"parseLanguageTag",{enumerable:!0,get:a(function(){return Th.parseLanguageTag},"get")});Object.defineProperty(rr,"createDirectionalLiteral",{enumerable:!0,get:a(function(){return Th.createDirectionalLiteral},"get")});Object.defineProperty(rr,"createLiteralFromLanguageTag",{enumerable:!0,get:a(function(){return Th.createLiteralFromLanguageTag},"get")});var u4=Ut();Object.defineProperty(rr,"BlankNode",{enumerable:!0,get:a(function(){return u4.BlankNode},"get")});var f4=tr();Object.defineProperty(rr,"Namespace",{enumerable:!0,get:a(function(){return f4.Namespace},"get")});var d4=Hn();Object.defineProperty(rr,"Triple",{enumerable:!0,get:a(function(){return d4.Triple},"get")});var h4=Hu();Object.defineProperty(rr,"QuotedTriple",{enumerable:!0,get:a(function(){return h4.QuotedTriple},"get")})});var Ah=S(li=>{"use strict";Object.defineProperty(li,"__esModule",{value:!0});li.UUID_URL_NAMESPACE=li.DEFAULT_LANGUAGE_TAG=li.REQUIRED_PROPERTIES=li.ALLOWED_PROPERTIES=li.Exo003MetadataType=void 0;var ai;(function(n){n.Namespace="namespace",n.Anchor="anchor",n.BlankNode="blank_node",n.Statement="statement",n.Body="body"})(ai||(li.Exo003MetadataType=ai={}));li.ALLOWED_PROPERTIES={[ai.Namespace]:["metadata","uri","aliases"],[ai.Anchor]:["metadata","uri","aliases"],[ai.BlankNode]:["metadata","uri","aliases"],[ai.Statement]:["metadata","subject","predicate","object","aliases"],[ai.Body]:["metadata","subject","predicate","aliases"]};li.REQUIRED_PROPERTIES={[ai.Namespace]:["metadata","uri"],[ai.Anchor]:["metadata","uri"],[ai.BlankNode]:["metadata","uri"],[ai.Statement]:["metadata","subject","predicate","object"],[ai.Body]:["metadata","subject","predicate"]};li.DEFAULT_LANGUAGE_TAG="ru";li.UUID_URL_NAMESPACE="6ba7b811-9dad-11d1-80b4-00c04fd430c8"});var rA=S(i_=>{"use strict";Object.defineProperty(i_,"__esModule",{value:!0});i_.default="ffffffff-ffff-ffff-ffff-ffffffffffff"});var nA=S(s_=>{"use strict";Object.defineProperty(s_,"__esModule",{value:!0});s_.default="00000000-0000-0000-0000-000000000000"});var iA=S(o_=>{"use strict";Object.defineProperty(o_,"__esModule",{value:!0});o_.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 Yu=S(a_=>{"use strict";Object.defineProperty(a_,"__esModule",{value:!0});var p4=iA();function m4(n){return typeof n=="string"&&p4.default.test(n)}a(m4,"validate");a_.default=m4});var Qu=S(l_=>{"use strict";Object.defineProperty(l_,"__esModule",{value:!0});var g4=Yu();function y4(n){if(!(0,g4.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)}a(y4,"parse");l_.default=y4});var Hs=S(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});Ku.unsafeStringify=void 0;var _4=Yu(),Lr=[];for(let n=0;n<256;++n)Lr.push((n+256).toString(16).slice(1));function sA(n,e=0){return(Lr[n[e+0]]+Lr[n[e+1]]+Lr[n[e+2]]+Lr[n[e+3]]+"-"+Lr[n[e+4]]+Lr[n[e+5]]+"-"+Lr[n[e+6]]+Lr[n[e+7]]+"-"+Lr[n[e+8]]+Lr[n[e+9]]+"-"+Lr[n[e+10]]+Lr[n[e+11]]+Lr[n[e+12]]+Lr[n[e+13]]+Lr[n[e+14]]+Lr[n[e+15]]).toLowerCase()}a(sA,"unsafeStringify");Ku.unsafeStringify=sA;function b4(n,e=0){let t=sA(n,e);if(!(0,_4.default)(t))throw TypeError("Stringified UUID is invalid");return t}a(b4,"stringify");Ku.default=b4});var Ch=S(c_=>{"use strict";Object.defineProperty(c_,"__esModule",{value:!0});var S4=require("crypto"),xh=new Uint8Array(256),Ih=xh.length;function w4(){return Ih>xh.length-16&&((0,S4.randomFillSync)(xh),Ih=0),xh.slice(Ih,Ih+=16)}a(w4,"rng");c_.default=w4});var u_=S(Ju=>{"use strict";Object.defineProperty(Ju,"__esModule",{value:!0});Ju.updateV1State=void 0;var oA=Ch(),v4=Hs(),Xu={};function E4(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=aA(n.random??n.rng?.()??(0,oA.default)(),n.msecs,n.nsecs,n.clockseq,n.node,e,t);else{let s=Date.now(),o=(0,oA.default)();lA(Xu,s,o),r=aA(o,Xu.msecs,Xu.nsecs,i?void 0:Xu.clockseq,i?void 0:Xu.node,e,t)}return e??(0,v4.unsafeStringify)(r)}a(E4,"v1");function lA(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}a(lA,"updateV1State");Ju.updateV1State=lA;function aA(n,e,t,r,i,s,o=0){if(n.length<16)throw new Error("Random bytes length must be >= 16");if(!s)s=new Uint8Array(16),o=0;else if(o<0||o+16>s.length)throw new RangeError(`UUID byte range ${o}:${o+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 l=((e&268435455)*1e4+t)%4294967296;s[o++]=l>>>24&255,s[o++]=l>>>16&255,s[o++]=l>>>8&255,s[o++]=l&255;let c=e/4294967296*1e4&268435455;s[o++]=c>>>8&255,s[o++]=c&255,s[o++]=c>>>24&15|16,s[o++]=c>>>16&255,s[o++]=r>>>8|128,s[o++]=r&255;for(let u=0;u<6;++u)s[o++]=i[u];return s}a(aA,"v1Bytes");Ju.default=E4});var d_=S(f_=>{"use strict";Object.defineProperty(f_,"__esModule",{value:!0});var T4=Qu(),A4=Hs();function I4(n){let e=typeof n=="string"?(0,T4.default)(n):n,t=x4(e);return typeof n=="string"?(0,A4.unsafeStringify)(t):t}a(I4,"v1ToV6");f_.default=I4;function x4(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])}a(x4,"_v1ToV6")});var cA=S(h_=>{"use strict";Object.defineProperty(h_,"__esModule",{value:!0});var C4=require("crypto");function R4(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),(0,C4.createHash)("md5").update(n).digest()}a(R4,"md5");h_.default=R4});var Zu=S(Ys=>{"use strict";Object.defineProperty(Ys,"__esModule",{value:!0});Ys.URL=Ys.DNS=Ys.stringToBytes=void 0;var uA=Qu(),P4=Hs();function fA(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}a(fA,"stringToBytes");Ys.stringToBytes=fA;Ys.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Ys.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function O4(n,e,t,r,i,s){let o=typeof t=="string"?fA(t):t,l=typeof r=="string"?(0,uA.default)(r):r;if(typeof r=="string"&&(r=(0,uA.default)(r)),r?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+o.length);if(c.set(l),c.set(o,l.length),c=e(c),c[6]=c[6]&15|n,c[8]=c[8]&63|128,i){s=s||0;for(let u=0;u<16;++u)i[s+u]=c[u];return i}return(0,P4.unsafeStringify)(c)}a(O4,"v35");Ys.default=O4});var hA=S(ka=>{"use strict";Object.defineProperty(ka,"__esModule",{value:!0});ka.URL=ka.DNS=void 0;var F4=cA(),p_=Zu(),dA=Zu();Object.defineProperty(ka,"DNS",{enumerable:!0,get:a(function(){return dA.DNS},"get")});Object.defineProperty(ka,"URL",{enumerable:!0,get:a(function(){return dA.URL},"get")});function m_(n,e,t,r){return(0,p_.default)(48,F4.default,n,e,t,r)}a(m_,"v3");m_.DNS=p_.DNS;m_.URL=p_.URL;ka.default=m_});var pA=S(g_=>{"use strict";Object.defineProperty(g_,"__esModule",{value:!0});var D4=require("crypto");g_.default={randomUUID:D4.randomUUID}});var gA=S(y_=>{"use strict";Object.defineProperty(y_,"__esModule",{value:!0});var mA=pA(),L4=Ch(),N4=Hs();function k4(n,e,t){if(mA.default.randomUUID&&!e&&!n)return mA.default.randomUUID();n=n||{};let r=n.random??n.rng?.()??(0,L4.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,N4.unsafeStringify)(r)}a(k4,"v4");y_.default=k4});var yA=S(__=>{"use strict";Object.defineProperty(__,"__esModule",{value:!0});var M4=require("crypto");function j4(n){return Array.isArray(n)?n=Buffer.from(n):typeof n=="string"&&(n=Buffer.from(n,"utf8")),(0,M4.createHash)("sha1").update(n).digest()}a(j4,"sha1");__.default=j4});var bA=S(Ma=>{"use strict";Object.defineProperty(Ma,"__esModule",{value:!0});Ma.URL=Ma.DNS=void 0;var $4=yA(),b_=Zu(),_A=Zu();Object.defineProperty(Ma,"DNS",{enumerable:!0,get:a(function(){return _A.DNS},"get")});Object.defineProperty(Ma,"URL",{enumerable:!0,get:a(function(){return _A.URL},"get")});function S_(n,e,t,r){return(0,b_.default)(80,$4.default,n,e,t,r)}a(S_,"v5");S_.DNS=b_.DNS;S_.URL=b_.URL;Ma.default=S_});var SA=S(w_=>{"use strict";Object.defineProperty(w_,"__esModule",{value:!0});var U4=Hs(),V4=u_(),B4=d_();function q4(n,e,t){n??={},t??=0;let r=(0,V4.default)({...n,_v6:!0},new Uint8Array(16));if(r=(0,B4.default)(r),e){for(let i=0;i<16;i++)e[t+i]=r[i];return e}return(0,U4.unsafeStringify)(r)}a(q4,"v6");w_.default=q4});var wA=S(v_=>{"use strict";Object.defineProperty(v_,"__esModule",{value:!0});var G4=Qu(),W4=Hs();function z4(n){let e=typeof n=="string"?(0,G4.default)(n):n,t=H4(e);return typeof n=="string"?(0,W4.unsafeStringify)(t):t}a(z4,"v6ToV1");v_.default=z4;function H4(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])}a(H4,"_v6ToV1")});var AA=S(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.updateV7State=void 0;var vA=Ch(),Y4=Hs(),E_={};function Q4(n,e,t){let r;if(n)r=EA(n.random??n.rng?.()??(0,vA.default)(),n.msecs,n.seq,e,t);else{let i=Date.now(),s=(0,vA.default)();TA(E_,i,s),r=EA(s,E_.msecs,E_.seq,e,t)}return e??(0,Y4.unsafeStringify)(r)}a(Q4,"v7");function TA(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}a(TA,"updateV7State");ef.updateV7State=TA;function EA(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}a(EA,"v7Bytes");ef.default=Q4});var IA=S(T_=>{"use strict";Object.defineProperty(T_,"__esModule",{value:!0});var K4=Yu();function X4(n){if(!(0,K4.default)(n))throw TypeError("Invalid UUID");return parseInt(n.slice(14,15),16)}a(X4,"version");T_.default=X4});var vi=S(ht=>{"use strict";Object.defineProperty(ht,"__esModule",{value:!0});ht.version=ht.validate=ht.v7=ht.v6ToV1=ht.v6=ht.v5=ht.v4=ht.v3=ht.v1ToV6=ht.v1=ht.stringify=ht.parse=ht.NIL=ht.MAX=void 0;var J4=rA();Object.defineProperty(ht,"MAX",{enumerable:!0,get:a(function(){return J4.default},"get")});var Z4=nA();Object.defineProperty(ht,"NIL",{enumerable:!0,get:a(function(){return Z4.default},"get")});var eM=Qu();Object.defineProperty(ht,"parse",{enumerable:!0,get:a(function(){return eM.default},"get")});var tM=Hs();Object.defineProperty(ht,"stringify",{enumerable:!0,get:a(function(){return tM.default},"get")});var rM=u_();Object.defineProperty(ht,"v1",{enumerable:!0,get:a(function(){return rM.default},"get")});var nM=d_();Object.defineProperty(ht,"v1ToV6",{enumerable:!0,get:a(function(){return nM.default},"get")});var iM=hA();Object.defineProperty(ht,"v3",{enumerable:!0,get:a(function(){return iM.default},"get")});var sM=gA();Object.defineProperty(ht,"v4",{enumerable:!0,get:a(function(){return sM.default},"get")});var oM=bA();Object.defineProperty(ht,"v5",{enumerable:!0,get:a(function(){return oM.default},"get")});var aM=SA();Object.defineProperty(ht,"v6",{enumerable:!0,get:a(function(){return aM.default},"get")});var lM=wA();Object.defineProperty(ht,"v6ToV1",{enumerable:!0,get:a(function(){return lM.default},"get")});var cM=AA();Object.defineProperty(ht,"v7",{enumerable:!0,get:a(function(){return cM.default},"get")});var uM=Yu();Object.defineProperty(ht,"validate",{enumerable:!0,get:a(function(){return uM.default},"get")});var fM=IA();Object.defineProperty(ht,"version",{enumerable:!0,get:a(function(){return fM.default},"get")})});var x_=S(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});Rh.Exo003UUIDGenerator=void 0;var A_=vi(),xA=Ah(),I_=class{static{a(this,"Exo003UUIDGenerator")}static generateNamespaceUUID(e){if(!e||e.trim().length===0)throw new Error("Namespace URI cannot be empty");return(0,A_.v5)(e,xA.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,A_.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,A_.v5)(e,xA.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)}};Rh.Exo003UUIDGenerator=I_});var RA=S(Oh=>{"use strict";Object.defineProperty(Oh,"__esModule",{value:!0});Oh.Exo003Parser=void 0;var gt=Ah(),tf=x_(),ko=Ce(),Ph=Ue(),CA=Ut(),dM=Hn(),C_=class{static{a(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,o=gt.ALLOWED_PROPERTIES[s],l=gt.REQUIRED_PROPERTIES[s];for(let c of l)(e[c]===void 0||e[c]===null)&&t.push(`Missing required property: ${c}`);for(let c of Object.keys(e))o.includes(c)||t.push(`Forbidden property for ${s}: ${c}`);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 ko.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 ko.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 ko.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,o=[["subject",r],["predicate",i],["object",s]];for(let[l,c]of o)c&&typeof c!="string"&&t.push(`${l} 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 ko.IRI(i.value);else if(i.type==="blank")s=new CA.BlankNode(i.value);else throw new Error("Statement subject cannot be a literal");let o=t(e.predicate);if(o.type!=="iri")throw new Error("Statement predicate must be an IRI");let l=new ko.IRI(o.value),c=t(e.object),u;if(c.type==="iri")u=new ko.IRI(c.value);else if(c.type==="blank")u=new CA.BlankNode(c.value);else{let f=r||c.value;if(c.datatype)u=new Ph.Literal(f,new ko.IRI(c.datatype));else{let d=c.language||gt.DEFAULT_LANGUAGE_TAG;u=(0,Ph.createDirectionalLiteral)(f,d,c.direction)}}return new dM.Triple(s,l,u)}static toLiteral(e,t,r){if(r?.datatype)return new Ph.Literal(t,new ko.IRI(r.datatype));let i=r?.language||gt.DEFAULT_LANGUAGE_TAG;return(0,Ph.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 tf.Exo003UUIDGenerator.generateNamespaceUUID(e.uri);case gt.Exo003MetadataType.Anchor:return tf.Exo003UUIDGenerator.generateNamespaceUUID(e.uri);case gt.Exo003MetadataType.BlankNode:return tf.Exo003UUIDGenerator.generateNamespaceUUID(e.uri);case gt.Exo003MetadataType.Statement:{let r=e;return tf.Exo003UUIDGenerator.generateStatementUUID(r.subject,r.predicate,r.object)}case gt.Exo003MetadataType.Body:{let r=e;return tf.Exo003UUIDGenerator.generateBodyUUID(r.subject+"|"+r.predicate)}}}};Oh.Exo003Parser=C_});var R_=S(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.Exo003Parser=Wr.Exo003UUIDGenerator=Wr.UUID_URL_NAMESPACE=Wr.DEFAULT_LANGUAGE_TAG=Wr.REQUIRED_PROPERTIES=Wr.ALLOWED_PROPERTIES=Wr.Exo003MetadataType=void 0;var rf=Ah();Object.defineProperty(Wr,"Exo003MetadataType",{enumerable:!0,get:a(function(){return rf.Exo003MetadataType},"get")});Object.defineProperty(Wr,"ALLOWED_PROPERTIES",{enumerable:!0,get:a(function(){return rf.ALLOWED_PROPERTIES},"get")});Object.defineProperty(Wr,"REQUIRED_PROPERTIES",{enumerable:!0,get:a(function(){return rf.REQUIRED_PROPERTIES},"get")});Object.defineProperty(Wr,"DEFAULT_LANGUAGE_TAG",{enumerable:!0,get:a(function(){return rf.DEFAULT_LANGUAGE_TAG},"get")});Object.defineProperty(Wr,"UUID_URL_NAMESPACE",{enumerable:!0,get:a(function(){return rf.UUID_URL_NAMESPACE},"get")});var hM=x_();Object.defineProperty(Wr,"Exo003UUIDGenerator",{enumerable:!0,get:a(function(){return hM.Exo003UUIDGenerator},"get")});var pM=RA();Object.defineProperty(Wr,"Exo003Parser",{enumerable:!0,get:a(function(){return pM.Exo003Parser},"get")})});var fs=S(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});Fh.WikiLinkHelpers=void 0;var nf=class{static{a(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):[]}};Fh.WikiLinkHelpers=nf;nf.WIKI_LINK_PATTERN=/\[\[|\]\]/g;nf.UUID_PATTERN=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i});var Yn=S(yt=>{"use strict";Object.defineProperty(yt,"__esModule",{value:!0});yt.CommandBindingProperty=yt.GroundingProperty=yt.PreconditionProperty=yt.CommandProperty=yt.resolveGroundingTypeFromWikilinkLiteral=yt.resolveGroundingTypeFromIRI=yt.GROUNDING_TYPE_IRI_TO_ENUM=yt.GROUNDING_TYPE_UID_TO_ENUM=yt.GROUNDING_TYPE_UIDS=yt.GroundingType=yt.EFFORT_STATUS_OPTIONS=yt.EffortStatus=yt.AssetClass=void 0;var mM=$l();Object.defineProperty(yt,"AssetClass",{enumerable:!0,get:a(function(){return mM.AssetClass},"get")});var gM=Ul();Object.defineProperty(yt,"EffortStatus",{enumerable:!0,get:a(function(){return gM.EffortStatus},"get")});var yM=G0();Object.defineProperty(yt,"EFFORT_STATUS_OPTIONS",{enumerable:!0,get:a(function(){return yM.EFFORT_STATUS_OPTIONS},"get")});var _M=No();Object.defineProperty(yt,"GroundingType",{enumerable:!0,get:a(function(){return _M.GroundingType},"get")});var sf=hh();Object.defineProperty(yt,"GROUNDING_TYPE_UIDS",{enumerable:!0,get:a(function(){return sf.GROUNDING_TYPE_UIDS},"get")});Object.defineProperty(yt,"GROUNDING_TYPE_UID_TO_ENUM",{enumerable:!0,get:a(function(){return sf.GROUNDING_TYPE_UID_TO_ENUM},"get")});Object.defineProperty(yt,"GROUNDING_TYPE_IRI_TO_ENUM",{enumerable:!0,get:a(function(){return sf.GROUNDING_TYPE_IRI_TO_ENUM},"get")});Object.defineProperty(yt,"resolveGroundingTypeFromIRI",{enumerable:!0,get:a(function(){return sf.resolveGroundingTypeFromIRI},"get")});Object.defineProperty(yt,"resolveGroundingTypeFromWikilinkLiteral",{enumerable:!0,get:a(function(){return sf.resolveGroundingTypeFromWikilinkLiteral},"get")});var Dh=W0();Object.defineProperty(yt,"CommandProperty",{enumerable:!0,get:a(function(){return Dh.CommandProperty},"get")});Object.defineProperty(yt,"PreconditionProperty",{enumerable:!0,get:a(function(){return Dh.PreconditionProperty},"get")});Object.defineProperty(yt,"GroundingProperty",{enumerable:!0,get:a(function(){return Dh.GroundingProperty},"get")});Object.defineProperty(yt,"CommandBindingProperty",{enumerable:!0,get:a(function(){return Dh.CommandBindingProperty},"get")})});var Ua=S(zr=>{"use strict";Object.defineProperty(zr,"__esModule",{value:!0});zr.hasClass=$a;zr.isAreaOrProject=bM;zr.isEffort=SM;zr.hasStatus=wM;zr.isAssetArchived=vM;zr.hasEmptyProperties=EM;zr.needsFolderRepair=TM;zr.getTodayDateString=P_;zr.isPlannedForToday=AM;zr.hasPlannedStartTimestamp=IM;zr.extractDailyNoteDate=xM;zr.isCurrentDateGteDay=CM;zr.inheritsFromPrototype=FA;zr.isPrototypeClass=PM;var OA=fs(),ja=Yn();function $a(n,e){return n?(Array.isArray(n)?n:[n]).some(r=>OA.WikiLinkHelpers.normalize(r)===e):!1}a($a,"hasClass");function bM(n){return $a(n,ja.AssetClass.AREA)||$a(n,ja.AssetClass.PROJECT)}a(bM,"isAreaOrProject");function SM(n){return $a(n,ja.AssetClass.TASK)||$a(n,ja.AssetClass.PROJECT)||$a(n,ja.AssetClass.MEETING)}a(SM,"isEffort");function wM(n,e){if(!n)return!1;let t=Array.isArray(n)?n[0]:n;return t?OA.WikiLinkHelpers.normalize(t)===e:!1}a(wM,"hasStatus");function vM(n){if(n===!0||n===1)return!0;if(typeof n=="string"){let e=n.toLowerCase();return e==="true"||e==="yes"}return!1}a(vM,"isAssetArchived");function EM(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))}a(EM,"hasEmptyProperties");function TM(n,e){if(!e)return!1;let t=n.replace(/\/$/,""),r=e.replace(/\/$/,"");return t!==r}a(TM,"needsFolderRepair");function P_(){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}`}a(P_,"getTodayDateString");function AM(n){let e=n.ems__Effort_plannedStartTimestamp;if(!e)return!1;let t=P_();return typeof e=="string"?e.split("T")[0]===t:Array.isArray(e)&&e.length>0?String(e[0]).split("T")[0]===t:!1}a(AM,"isPlannedForToday");function IM(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}a(IM,"hasPlannedStartTimestamp");function xM(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}a(xM,"extractDailyNoteDate");function CM(n){return P_()>=n}a(CM,"isCurrentDateGteDay");function PA(n){return n?n.replace(/^["']|["']$/g,"").replace(/\[\[|\]\]/g,"").trim():""}a(PA,"normalizeWithQuotes");var RM=10;function FA(n,e=RM){let t=n.exo__Class_superClass;if(!t)return!1;let r=new Set,i=[],s=Array.isArray(t)?t:[t];for(let o of s){let l=PA(o);l&&i.push({className:l,depth:0})}for(;i.length>0;){let o=i.shift();if(!o)continue;let{className:l,depth:c}=o;if(c>e)continue;if(l===ja.AssetClass.PROTOTYPE)return!0;if(r.has(l))continue;r.add(l);let u=`${l}__exo__Class_superClass`,f=n[u];if(f){let d=Array.isArray(f)?f:[f];for(let h of d){let p=PA(h);p&&!r.has(p)&&i.push({className:p,depth:c+1})}}}return!1}a(FA,"inheritsFromPrototype");function PM(n,e){return $a(n,ja.AssetClass.CLASS)?FA(e):!1}a(PM,"isPrototypeClass")});var DA=S(ql=>{"use strict";Object.defineProperty(ql,"__esModule",{value:!0});ql.canCreateTask=OM;ql.canCreateRelatedTask=FM;ql.canConvertTaskToProject=DM;ql.canSetCriticalityZone=LM;var Bl=Ua(),O_=Yn();function OM(n){return(0,Bl.isAreaOrProject)(n.instanceClass)}a(OM,"canCreateTask");function FM(n){return!(!(0,Bl.hasClass)(n.instanceClass,O_.AssetClass.TASK)||(0,Bl.isAssetArchived)(n.isArchived))}a(FM,"canCreateRelatedTask");function DM(n){return(0,Bl.hasClass)(n.instanceClass,O_.AssetClass.TASK)}a(DM,"canConvertTaskToProject");function LM(n){return!(!(0,Bl.hasClass)(n.instanceClass,O_.AssetClass.TASK)||(0,Bl.isAssetArchived)(n.isArchived))}a(LM,"canSetCriticalityZone")});var LA=S(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});Gl.canCreateProject=NM;Gl.canMoveToAnalysis=kM;Gl.canMoveToToDo=MM;Gl.canConvertProjectToTask=jM;var Mo=Ua(),jo=Yn();function NM(n){return(0,Mo.hasClass)(n.instanceClass,jo.AssetClass.AREA)||(0,Mo.hasClass)(n.instanceClass,jo.AssetClass.INITIATIVE)||(0,Mo.hasClass)(n.instanceClass,jo.AssetClass.PROJECT)}a(NM,"canCreateProject");function kM(n){return(0,Mo.hasClass)(n.instanceClass,jo.AssetClass.PROJECT)?(0,Mo.hasStatus)(n.currentStatus,jo.EffortStatus.BACKLOG):!1}a(kM,"canMoveToAnalysis");function MM(n){return(0,Mo.hasClass)(n.instanceClass,jo.AssetClass.PROJECT)?(0,Mo.hasStatus)(n.currentStatus,jo.EffortStatus.ANALYSIS):!1}a(MM,"canMoveToToDo");function jM(n){return(0,Mo.hasClass)(n.instanceClass,jo.AssetClass.PROJECT)}a(jM,"canConvertProjectToTask")});var MA=S(Lh=>{"use strict";Object.defineProperty(Lh,"__esModule",{value:!0});Lh.canCreateChildArea=$M;Lh.canSetActiveFocus=UM;var NA=Ua(),kA=Yn();function $M(n){return(0,NA.hasClass)(n.instanceClass,kA.AssetClass.AREA)}a($M,"canCreateChildArea");function UM(n){return(0,NA.hasClass)(n.instanceClass,kA.AssetClass.AREA)}a(UM,"canSetActiveFocus")});var jA=S(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.canPlanOnToday=BM;Fn.canPlanForEvening=qM;Fn.canShiftDayBackward=GM;Fn.canShiftDayForward=WM;Fn.canSetDraftStatus=zM;Fn.canMoveToBacklog=HM;Fn.canStartEffort=YM;Fn.canMarkDone=QM;Fn.canTrashEffort=KM;Fn.canVoteOnEffort=XM;Fn.canArchiveTask=JM;Fn.canMarkReviewed=ZM;var VM=fs(),Et=Ua(),On=Yn();function BM(n){return!(!(0,Et.isEffort)(n.instanceClass)||(0,Et.isPlannedForToday)(n.metadata))}a(BM,"canPlanOnToday");function qM(n){return!(0,Et.hasClass)(n.instanceClass,On.AssetClass.TASK)&&!(0,Et.hasClass)(n.instanceClass,On.AssetClass.MEETING)?!1:(0,Et.hasStatus)(n.currentStatus,On.EffortStatus.BACKLOG)}a(qM,"canPlanForEvening");function GM(n){return(0,Et.isEffort)(n.instanceClass)?(0,Et.hasPlannedStartTimestamp)(n.metadata):!1}a(GM,"canShiftDayBackward");function WM(n){return(0,Et.isEffort)(n.instanceClass)?(0,Et.hasPlannedStartTimestamp)(n.metadata):!1}a(WM,"canShiftDayForward");function zM(n){return(0,Et.isEffort)(n.instanceClass)?!n.currentStatus:!1}a(zM,"canSetDraftStatus");function HM(n){return(0,Et.isEffort)(n.instanceClass)?(0,Et.hasStatus)(n.currentStatus,On.EffortStatus.DRAFT):!1}a(HM,"canMoveToBacklog");function YM(n){return(0,Et.isEffort)(n.instanceClass)?(0,Et.hasClass)(n.instanceClass,On.AssetClass.TASK)||(0,Et.hasClass)(n.instanceClass,On.AssetClass.MEETING)?(0,Et.hasStatus)(n.currentStatus,On.EffortStatus.BACKLOG):(0,Et.hasClass)(n.instanceClass,On.AssetClass.PROJECT)?(0,Et.hasStatus)(n.currentStatus,On.EffortStatus.TODO):!1:!1}a(YM,"canStartEffort");function QM(n){return(0,Et.isEffort)(n.instanceClass)?(0,Et.hasStatus)(n.currentStatus,On.EffortStatus.DOING):!1}a(QM,"canMarkDone");function KM(n){return(0,Et.isEffort)(n.instanceClass)?n.currentStatus?!(Array.isArray(n.currentStatus)?n.currentStatus:[n.currentStatus]).some(r=>{let i=VM.WikiLinkHelpers.normalize(r);return i===On.EffortStatus.TRASHED||i===On.EffortStatus.DONE}):!0:!1}a(KM,"canTrashEffort");function XM(n){return!(!(0,Et.isEffort)(n.instanceClass)||(0,Et.isAssetArchived)(n.isArchived))}a(XM,"canVoteOnEffort");function JM(n){return!(0,Et.isAssetArchived)(n.isArchived)}a(JM,"canArchiveTask");function ZM(n){return!(!(0,Et.hasClass)(n.instanceClass,On.AssetClass.TASK)&&!(0,Et.hasClass)(n.instanceClass,On.AssetClass.PROJECT)||(0,Et.isAssetArchived)(n.isArchived))}a(ZM,"canMarkReviewed")});var $A=S(Ei=>{"use strict";Object.defineProperty(Ei,"__esModule",{value:!0});Ei.canCreateEvent=rj;Ei.canCreateInstance=nj;Ei.canCleanProperties=ij;Ei.canRepairFolder=sj;Ei.canCopyLabelToAliases=oj;Ei.canCreateNarrowerConcept=aj;Ei.canCreateSubclass=lj;Ei.canCreateTaskForDailyNote=cj;Ei.canCopyFleetingNoteLabel=uj;var Hr=Ua(),Qs=Yn(),ej="75302770-279e-4a59-ba85-09df29725713",tj="fca0a931-a01f-48e4-b72a-4af206c94bc7";function rj(n){return(0,Hr.isAreaOrProject)(n.instanceClass)}a(rj,"canCreateEvent");function nj(n){return(0,Hr.hasClass)(n.instanceClass,Qs.AssetClass.TASK_PROTOTYPE)||(0,Hr.hasClass)(n.instanceClass,ej)||(0,Hr.hasClass)(n.instanceClass,Qs.AssetClass.MEETING_PROTOTYPE)||(0,Hr.hasClass)(n.instanceClass,Qs.AssetClass.EVENT_PROTOTYPE)||(0,Hr.hasClass)(n.instanceClass,Qs.AssetClass.PROJECT_PROTOTYPE)||(0,Hr.hasClass)(n.instanceClass,Qs.AssetClass.PROTOTYPE)||n.classIsPrototype?!0:(0,Hr.isPrototypeClass)(n.instanceClass,n.metadata)}a(nj,"canCreateInstance");function ij(n){return(0,Hr.hasEmptyProperties)(n.metadata)}a(ij,"canCleanProperties");function sj(n){return(0,Hr.needsFolderRepair)(n.currentFolder,n.expectedFolder)}a(sj,"canRepairFolder");function oj(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)}a(oj,"canCopyLabelToAliases");function aj(n){return(0,Hr.hasClass)(n.instanceClass,Qs.AssetClass.CONCEPT)}a(aj,"canCreateNarrowerConcept");function lj(n){return(0,Hr.hasClass)(n.instanceClass,Qs.AssetClass.CLASS)}a(lj,"canCreateSubclass");function cj(n){return!(!(0,Hr.hasClass)(n.instanceClass,Qs.AssetClass.DAILY_NOTE)||n.isArchived||!(0,Hr.extractDailyNoteDate)(n.metadata))}a(cj,"canCreateTaskForDailyNote");function uj(n){return(0,Hr.hasClass)(n.instanceClass,Qs.AssetClass.FLEETING_NOTE)||(0,Hr.hasClass)(n.instanceClass,tj)}a(uj,"canCopyFleetingNoteLabel")});var VA=S($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.canCopyFleetingNoteLabel=$.canCreateTaskForDailyNote=$.canCreateSubclass=$.canCreateNarrowerConcept=$.canCopyLabelToAliases=$.canRepairFolder=$.canCleanProperties=$.canCreateInstance=$.canCreateEvent=$.canMarkReviewed=$.canArchiveTask=$.canVoteOnEffort=$.canTrashEffort=$.canMarkDone=$.canStartEffort=$.canMoveToBacklog=$.canSetDraftStatus=$.canShiftDayForward=$.canShiftDayBackward=$.canPlanForEvening=$.canPlanOnToday=$.canSetActiveFocus=$.canCreateChildArea=$.canConvertProjectToTask=$.canMoveToToDo=$.canMoveToAnalysis=$.canCreateProject=$.canSetCriticalityZone=$.canConvertTaskToProject=$.canCreateRelatedTask=$.canCreateTask=$.isPrototypeClass=$.inheritsFromPrototype=$.isCurrentDateGteDay=$.extractDailyNoteDate=$.hasPlannedStartTimestamp=$.isPlannedForToday=$.getTodayDateString=$.needsFolderRepair=$.hasEmptyProperties=$.isAssetArchived=$.hasStatus=$.isEffort=$.isAreaOrProject=$.hasClass=void 0;var Dn=Ua();Object.defineProperty($,"hasClass",{enumerable:!0,get:a(function(){return Dn.hasClass},"get")});Object.defineProperty($,"isAreaOrProject",{enumerable:!0,get:a(function(){return Dn.isAreaOrProject},"get")});Object.defineProperty($,"isEffort",{enumerable:!0,get:a(function(){return Dn.isEffort},"get")});Object.defineProperty($,"hasStatus",{enumerable:!0,get:a(function(){return Dn.hasStatus},"get")});Object.defineProperty($,"isAssetArchived",{enumerable:!0,get:a(function(){return Dn.isAssetArchived},"get")});Object.defineProperty($,"hasEmptyProperties",{enumerable:!0,get:a(function(){return Dn.hasEmptyProperties},"get")});Object.defineProperty($,"needsFolderRepair",{enumerable:!0,get:a(function(){return Dn.needsFolderRepair},"get")});Object.defineProperty($,"getTodayDateString",{enumerable:!0,get:a(function(){return Dn.getTodayDateString},"get")});Object.defineProperty($,"isPlannedForToday",{enumerable:!0,get:a(function(){return Dn.isPlannedForToday},"get")});Object.defineProperty($,"hasPlannedStartTimestamp",{enumerable:!0,get:a(function(){return Dn.hasPlannedStartTimestamp},"get")});Object.defineProperty($,"extractDailyNoteDate",{enumerable:!0,get:a(function(){return Dn.extractDailyNoteDate},"get")});Object.defineProperty($,"isCurrentDateGteDay",{enumerable:!0,get:a(function(){return Dn.isCurrentDateGteDay},"get")});Object.defineProperty($,"inheritsFromPrototype",{enumerable:!0,get:a(function(){return Dn.inheritsFromPrototype},"get")});Object.defineProperty($,"isPrototypeClass",{enumerable:!0,get:a(function(){return Dn.isPrototypeClass},"get")});var Nh=DA();Object.defineProperty($,"canCreateTask",{enumerable:!0,get:a(function(){return Nh.canCreateTask},"get")});Object.defineProperty($,"canCreateRelatedTask",{enumerable:!0,get:a(function(){return Nh.canCreateRelatedTask},"get")});Object.defineProperty($,"canConvertTaskToProject",{enumerable:!0,get:a(function(){return Nh.canConvertTaskToProject},"get")});Object.defineProperty($,"canSetCriticalityZone",{enumerable:!0,get:a(function(){return Nh.canSetCriticalityZone},"get")});var kh=LA();Object.defineProperty($,"canCreateProject",{enumerable:!0,get:a(function(){return kh.canCreateProject},"get")});Object.defineProperty($,"canMoveToAnalysis",{enumerable:!0,get:a(function(){return kh.canMoveToAnalysis},"get")});Object.defineProperty($,"canMoveToToDo",{enumerable:!0,get:a(function(){return kh.canMoveToToDo},"get")});Object.defineProperty($,"canConvertProjectToTask",{enumerable:!0,get:a(function(){return kh.canConvertProjectToTask},"get")});var UA=MA();Object.defineProperty($,"canCreateChildArea",{enumerable:!0,get:a(function(){return UA.canCreateChildArea},"get")});Object.defineProperty($,"canSetActiveFocus",{enumerable:!0,get:a(function(){return UA.canSetActiveFocus},"get")});var ci=jA();Object.defineProperty($,"canPlanOnToday",{enumerable:!0,get:a(function(){return ci.canPlanOnToday},"get")});Object.defineProperty($,"canPlanForEvening",{enumerable:!0,get:a(function(){return ci.canPlanForEvening},"get")});Object.defineProperty($,"canShiftDayBackward",{enumerable:!0,get:a(function(){return ci.canShiftDayBackward},"get")});Object.defineProperty($,"canShiftDayForward",{enumerable:!0,get:a(function(){return ci.canShiftDayForward},"get")});Object.defineProperty($,"canSetDraftStatus",{enumerable:!0,get:a(function(){return ci.canSetDraftStatus},"get")});Object.defineProperty($,"canMoveToBacklog",{enumerable:!0,get:a(function(){return ci.canMoveToBacklog},"get")});Object.defineProperty($,"canStartEffort",{enumerable:!0,get:a(function(){return ci.canStartEffort},"get")});Object.defineProperty($,"canMarkDone",{enumerable:!0,get:a(function(){return ci.canMarkDone},"get")});Object.defineProperty($,"canTrashEffort",{enumerable:!0,get:a(function(){return ci.canTrashEffort},"get")});Object.defineProperty($,"canVoteOnEffort",{enumerable:!0,get:a(function(){return ci.canVoteOnEffort},"get")});Object.defineProperty($,"canArchiveTask",{enumerable:!0,get:a(function(){return ci.canArchiveTask},"get")});Object.defineProperty($,"canMarkReviewed",{enumerable:!0,get:a(function(){return ci.canMarkReviewed},"get")});var Ks=$A();Object.defineProperty($,"canCreateEvent",{enumerable:!0,get:a(function(){return Ks.canCreateEvent},"get")});Object.defineProperty($,"canCreateInstance",{enumerable:!0,get:a(function(){return Ks.canCreateInstance},"get")});Object.defineProperty($,"canCleanProperties",{enumerable:!0,get:a(function(){return Ks.canCleanProperties},"get")});Object.defineProperty($,"canRepairFolder",{enumerable:!0,get:a(function(){return Ks.canRepairFolder},"get")});Object.defineProperty($,"canCopyLabelToAliases",{enumerable:!0,get:a(function(){return Ks.canCopyLabelToAliases},"get")});Object.defineProperty($,"canCreateNarrowerConcept",{enumerable:!0,get:a(function(){return Ks.canCreateNarrowerConcept},"get")});Object.defineProperty($,"canCreateSubclass",{enumerable:!0,get:a(function(){return Ks.canCreateSubclass},"get")});Object.defineProperty($,"canCreateTaskForDailyNote",{enumerable:!0,get:a(function(){return Ks.canCreateTaskForDailyNote},"get")});Object.defineProperty($,"canCopyFleetingNoteLabel",{enumerable:!0,get:a(function(){return Ks.canCopyFleetingNoteLabel},"get")})});var BA=S(Va=>{"use strict";var fj=Va&&Va.__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:a(function(){return e[t]},"get")}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),dj=Va&&Va.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&fj(e,n,t)};Object.defineProperty(Va,"__esModule",{value:!0});dj(VA(),Va)});var Mh=S(of=>{"use strict";Object.defineProperty(of,"__esModule",{value:!0});of.PropertyFieldType=void 0;of.rangeToFieldType=mj;var Nr;(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"})(Nr||(of.PropertyFieldType=Nr={}));var qA="http://www.w3.org/2001/XMLSchema#",hj="https://exocortex.my/ontology/exo#",pj="https://exocortex.my/ontology/ems#";function mj(n){if(!n)return Nr.Unknown;let e=n.trim();if(!e)return Nr.Unknown;if(e.startsWith(qA)){let t=e.substring(qA.length);return F_(t)}if(e.startsWith("xsd:")){let t=e.substring(4);return F_(t)}if(e.includes("XMLSchema#")){let t=e.indexOf("XMLSchema#"),r=e.substring(t+10);return F_(r)}return e.startsWith(pj)||e.startsWith("ems:")?gj(e):e.startsWith(hj)||e.startsWith("exo:")||yj(e)?Nr.Reference:Nr.Text}a(mj,"rangeToFieldType");function F_(n){switch(n.toLowerCase()){case"string":case"normalizedstring":case"token":case"language":case"nmtoken":case"name":case"ncname":case"anyuri":return Nr.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 Nr.Number;case"date":return Nr.Date;case"datetime":case"datetimestamp":return Nr.DateTime;case"boolean":return Nr.Boolean;case"time":return Nr.Timestamp;default:return Nr.Text}}a(F_,"xsdTypeToFieldType");function gj(n){let e=n.toLowerCase();return e.includes("effortstatus")?Nr.StatusSelect:e.includes("tasksize")?Nr.SizeSelect:Nr.Reference}a(gj,"emsTypeToFieldType");function yj(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))}a(yj,"isClassReference")});var D_=S(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.propertyNameToUri=_j;af.uriToPropertyName=GA;af.extractPropertyLabel=bj;function _j(n){return n.replace(/^([a-z]+)__/,"$1:")}a(_j,"propertyNameToUri");function GA(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__")}a(GA,"uriToPropertyName");function bj(n){let r=(n.includes(":")?GA(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())}a(bj,"extractPropertyLabel")});var jh={};A0(jh,{__assign:()=>N_,__asyncDelegator:()=>Fj,__asyncGenerator:()=>Oj,__asyncValues:()=>Dj,__await:()=>lf,__awaiter:()=>Aj,__classPrivateFieldGet:()=>Mj,__classPrivateFieldSet:()=>jj,__createBinding:()=>xj,__decorate:()=>vj,__exportStar:()=>Cj,__extends:()=>Sj,__generator:()=>Ij,__importDefault:()=>kj,__importStar:()=>Nj,__makeTemplateObject:()=>Lj,__metadata:()=>Tj,__param:()=>Ej,__read:()=>WA,__rest:()=>wj,__spread:()=>Rj,__spreadArrays:()=>Pj,__values:()=>k_});function Sj(n,e){L_(n,e);function t(){this.constructor=n}a(t,"__"),n.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function wj(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 vj(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var l=n.length-1;l>=0;l--)(o=n[l])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s}function Ej(n,e){return function(t,r){e(t,r,n)}}function Tj(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)}function Aj(n,e,t,r){function i(s){return s instanceof t?s:new t(function(o){o(s)})}return a(i,"adopt"),new(t||(t=Promise))(function(s,o){function l(f){try{u(r.next(f))}catch(d){o(d)}}a(l,"fulfilled");function c(f){try{u(r.throw(f))}catch(d){o(d)}}a(c,"rejected");function u(f){f.done?s(f.value):i(f.value).then(l,c)}a(u,"step"),u((r=r.apply(n,e||[])).next())})}function Ij(n,e){var t={label:0,sent:a(function(){if(s[0]&1)throw s[1];return s[1]},"sent"),trys:[],ops:[]},r,i,s,o;return o={next:l(0),throw:l(1),return:l(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function l(u){return function(f){return c([u,f])}}function c(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 xj(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]}function Cj(n,e){for(var t in n)t!=="default"&&!e.hasOwnProperty(t)&&(e[t]=n[t])}function k_(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:a(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 WA(n,e){var t=typeof Symbol=="function"&&n[Symbol.iterator];if(!t)return n;var r=t.call(n),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)s.push(i.value)}catch(l){o={error:l}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(o)throw o.error}}return s}function Rj(){for(var n=[],e=0;e<arguments.length;e++)n=n.concat(WA(arguments[e]));return n}function Pj(){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],o=0,l=s.length;o<l;o++,i++)r[i]=s[o];return r}function lf(n){return this instanceof lf?(this.v=n,this):new lf(n)}function Oj(n,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=t.apply(n,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(h){r[h]&&(i[h]=function(p){return new Promise(function(g,y){s.push([h,p,g,y])>1||l(h,p)})})}function l(h,p){try{c(r[h](p))}catch(g){d(s[0][3],g)}}function c(h){h.value instanceof lf?Promise.resolve(h.value.v).then(u,f):d(s[0][2],h)}function u(h){l("next",h)}function f(h){l("throw",h)}function d(h,p){h(p),s.shift(),s.length&&l(s[0][0],s[0][1])}}function Fj(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(o){return(t=!t)?{value:lf(n[i](o)),done:i==="return"}:s?s(o):o}:s}}function Dj(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 k_=="function"?k_(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(o){return new Promise(function(l,c){o=n[s](o),i(l,c,o.done,o.value)})}}function i(s,o,l,c){Promise.resolve(c).then(function(u){s({value:u,done:l})},o)}}function Lj(n,e){return Object.defineProperty?Object.defineProperty(n,"raw",{value:e}):n.raw=e,n}function Nj(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 kj(n){return n&&n.__esModule?n:{default:n}}function Mj(n,e){if(!e.has(n))throw new TypeError("attempted to get private field on non-instance");return e.get(n)}function jj(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 L_,N_,$h=vk(()=>{L_=a(function(n,e){return L_=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])},L_(n,e)},"extendStatics");a(Sj,"__extends");N_=a(function(){return N_=Object.assign||a(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"),N_.apply(this,arguments)},"__assign");a(wj,"__rest");a(vj,"__decorate");a(Ej,"__param");a(Tj,"__metadata");a(Aj,"__awaiter");a(Ij,"__generator");a(xj,"__createBinding");a(Cj,"__exportStar");a(k_,"__values");a(WA,"__read");a(Rj,"__spread");a(Pj,"__spreadArrays");a(lf,"__await");a(Oj,"__asyncGenerator");a(Fj,"__asyncDelegator");a(Dj,"__asyncValues");a(Lj,"__makeTemplateObject");a(Nj,"__importStar");a(kj,"__importDefault");a(Mj,"__classPrivateFieldGet");a(jj,"__classPrivateFieldSet")});var $_=S(j_=>{"use strict";Object.defineProperty(j_,"__esModule",{value:!0});var M_;(function(n){n[n.Transient=0]="Transient",n[n.Singleton=1]="Singleton",n[n.ResolutionScoped=2]="ResolutionScoped",n[n.ContainerScoped=3]="ContainerScoped"})(M_||(M_={}));j_.default=M_});var zA=S(U_=>{"use strict";Object.defineProperty(U_,"__esModule",{value:!0});var $j=$_();Object.defineProperty(U_,"Lifecycle",{enumerable:!0,get:a(function(){return $j.default},"get")})});var Ba=S(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.defineInjectionTokenMetadata=Ti.getParamInfo=Ti.INJECTION_TOKEN_METADATA_KEY=void 0;Ti.INJECTION_TOKEN_METADATA_KEY="injectionTokens";function Uj(n){let e=Reflect.getMetadata("design:paramtypes",n)||[],t=Reflect.getOwnMetadata(Ti.INJECTION_TOKEN_METADATA_KEY,n)||{};return Object.keys(t).forEach(r=>{e[+r]=t[r]}),e}a(Uj,"getParamInfo");Ti.getParamInfo=Uj;function Vj(n,e){return function(t,r,i){let s=Reflect.getOwnMetadata(Ti.INJECTION_TOKEN_METADATA_KEY,t)||{};s[i]=e?{token:n,transform:e.transformToken,transformArgs:e.args||[]}:n,Reflect.defineMetadata(Ti.INJECTION_TOKEN_METADATA_KEY,s,t)}}a(Vj,"defineInjectionTokenMetadata");Ti.defineInjectionTokenMetadata=Vj});var V_=S(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});Uh.isClassProvider=void 0;function Bj(n){return!!n.useClass}a(Bj,"isClassProvider");Uh.isClassProvider=Bj});var B_=S(Vh=>{"use strict";Object.defineProperty(Vh,"__esModule",{value:!0});Vh.isFactoryProvider=void 0;function qj(n){return!!n.useFactory}a(qj,"isFactoryProvider");Vh.isFactoryProvider=qj});var qh=S(Wl=>{"use strict";Object.defineProperty(Wl,"__esModule",{value:!0});Wl.delay=Wl.DelayedConstructor=void 0;var Bh=class{static{a(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=a(()=>(r||(i=e(this.wrap()),r=!0),i),"delayedObject");return new Proxy(t,this.createHandler(s))}createHandler(e){let t={},r=a(i=>{t[i]=(...s)=>{s[0]=e();let o=Reflect[i];return o(...s)}},"install");return this.reflectMethods.forEach(r),t}};Wl.DelayedConstructor=Bh;function Gj(n){if(typeof n>"u")throw new Error("Attempt to `delay` undefined. Constructor must be wrapped in a callback");return new Bh(n)}a(Gj,"delay");Wl.delay=Gj});var Gh=S(ds=>{"use strict";Object.defineProperty(ds,"__esModule",{value:!0});ds.isConstructorToken=ds.isTransformDescriptor=ds.isTokenDescriptor=ds.isNormalToken=void 0;var Wj=qh();function zj(n){return typeof n=="string"||typeof n=="symbol"}a(zj,"isNormalToken");ds.isNormalToken=zj;function Hj(n){return typeof n=="object"&&"token"in n&&"multiple"in n}a(Hj,"isTokenDescriptor");ds.isTokenDescriptor=Hj;function Yj(n){return typeof n=="object"&&"token"in n&&"transform"in n}a(Yj,"isTransformDescriptor");ds.isTransformDescriptor=Yj;function Qj(n){return typeof n=="function"||n instanceof Wj.DelayedConstructor}a(Qj,"isConstructorToken");ds.isConstructorToken=Qj});var q_=S(Wh=>{"use strict";Object.defineProperty(Wh,"__esModule",{value:!0});Wh.isTokenProvider=void 0;function Kj(n){return!!n.useToken}a(Kj,"isTokenProvider");Wh.isTokenProvider=Kj});var G_=S(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});zh.isValueProvider=void 0;function Xj(n){return n.useValue!=null}a(Xj,"isValueProvider");zh.isValueProvider=Xj});var W_=S(qa=>{"use strict";Object.defineProperty(qa,"__esModule",{value:!0});var Jj=V_();Object.defineProperty(qa,"isClassProvider",{enumerable:!0,get:a(function(){return Jj.isClassProvider},"get")});var Zj=B_();Object.defineProperty(qa,"isFactoryProvider",{enumerable:!0,get:a(function(){return Zj.isFactoryProvider},"get")});var e9=Gh();Object.defineProperty(qa,"isNormalToken",{enumerable:!0,get:a(function(){return e9.isNormalToken},"get")});var t9=q_();Object.defineProperty(qa,"isTokenProvider",{enumerable:!0,get:a(function(){return t9.isTokenProvider},"get")});var r9=G_();Object.defineProperty(qa,"isValueProvider",{enumerable:!0,get:a(function(){return r9.isValueProvider},"get")})});var HA=S(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});Hh.isProvider=void 0;var n9=V_(),i9=G_(),s9=q_(),o9=B_();function a9(n){return n9.isClassProvider(n)||i9.isValueProvider(n)||s9.isTokenProvider(n)||o9.isFactoryProvider(n)}a(a9,"isProvider");Hh.isProvider=a9});var Y_=S(H_=>{"use strict";Object.defineProperty(H_,"__esModule",{value:!0});var z_=class{static{a(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,[])}};H_.default=z_});var YA=S(K_=>{"use strict";Object.defineProperty(K_,"__esModule",{value:!0});var l9=Y_(),Q_=class extends l9.default{static{a(this,"Registry")}};K_.default=Q_});var QA=S(J_=>{"use strict";Object.defineProperty(J_,"__esModule",{value:!0});var X_=class{static{a(this,"ResolutionContext")}constructor(){this.scopedResolutions=new Map}};J_.default=X_});var Z_=S(Yh=>{"use strict";Object.defineProperty(Yh,"__esModule",{value:!0});Yh.formatErrorCtor=void 0;function c9(n,e){return n===null?`at position #${e}`:`"${n.split(",")[e].trim()}" at position #${e}`}a(c9,"formatDependency");function u9(n,e,t=" "){return[n,...e.message.split(`
|
|
32
32
|
`).map(r=>t+r)].join(`
|
|
33
|
-
`)}a(u9,"composeErrorMessage");function f9(n,e,t){let[,r=null]=n.toString().match(/constructor\(([\w, ]+)\)/)||[],i=c9(r,e);return u9(`Cannot inject the dependency ${i} of "${n.name}" constructor. Reason:`,t)}a(f9,"formatErrorCtor");Yh.formatErrorCtor=f9});var KA=S(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.isDisposable=void 0;function d9(n){return!(typeof n.dispose!="function"||n.dispose.length>0)}a(d9,"isDisposable");Qh.isDisposable=d9});var JA=S(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.PostResolutionInterceptors=Ga.PreResolutionInterceptors=void 0;var XA=Y_(),Kh=class extends XA.default{static{a(this,"PreResolutionInterceptors")}};Ga.PreResolutionInterceptors=Kh;var Xh=class extends XA.default{static{a(this,"PostResolutionInterceptors")}};Ga.PostResolutionInterceptors=Xh;var eb=class{static{a(this,"Interceptors")}constructor(){this.preResolution=new Kh,this.postResolution=new Xh}};Ga.default=eb});var $o=S(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.instance=Xs.typeInfo=void 0;var h9=($h(),sh(jh)),fn=W_(),p9=HA(),Jh=Gh(),m9=YA(),Ln=$_(),Zh=QA(),g9=Z_(),y9=qh(),_9=KA(),b9=JA();Xs.typeInfo=new Map;var tb=class n{static{a(this,"InternalDependencyContainer")}constructor(e){this.parent=e,this._registry=new m9.default,this.interceptors=new b9.default,this.disposed=!1,this.disposables=new Set}register(e,t,r={lifecycle:Ln.default.Transient}){this.ensureNotDisposed();let i;if(p9.isProvider(t)?i=t:i={useClass:t},fn.isTokenProvider(i)){let s=[e],o=i;for(;o!=null;){let l=o.useToken;if(s.includes(l))throw new Error(`Token registration cycle detected! ${[...s,l].join(" -> ")}`);s.push(l);let c=this._registry.get(l);c&&fn.isTokenProvider(c.provider)?o=c.provider:o=null}}if((r.lifecycle===Ln.default.Singleton||r.lifecycle==Ln.default.ContainerScoped||r.lifecycle==Ln.default.ResolutionScoped)&&(fn.isValueProvider(i)||fn.isFactoryProvider(i)))throw new Error(`Cannot use lifecycle "${Ln.default[r.lifecycle]}" with ValueProviders or FactoryProviders`);return this._registry.set(e,{provider:i,options:r}),this}registerType(e,t){return this.ensureNotDisposed(),fn.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(),fn.isNormalToken(e)){if(fn.isNormalToken(t))return this.register(e,{useToken:t},{lifecycle:Ln.default.Singleton});if(t)return this.register(e,{useClass:t},{lifecycle:Ln.default.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}let r=e;return t&&!fn.isNormalToken(t)&&(r=t),this.register(e,{useClass:r},{lifecycle:Ln.default.Singleton})}resolve(e,t=new Zh.default,r=!1){this.ensureNotDisposed();let i=this.getRegistration(e);if(!i&&fn.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(Jh.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===Ln.default.ResolutionScoped&&t.scopedResolutions.has(e))return t.scopedResolutions.get(e);let r=e.options.lifecycle===Ln.default.Singleton,i=e.options.lifecycle===Ln.default.ContainerScoped,s=r||i,o;return fn.isValueProvider(e.provider)?o=e.provider.useValue:fn.isTokenProvider(e.provider)?o=s?e.instance||(e.instance=this.resolve(e.provider.useToken,t)):this.resolve(e.provider.useToken,t):fn.isClassProvider(e.provider)?o=s?e.instance||(e.instance=this.construct(e.provider.useClass,t)):this.construct(e.provider.useClass,t):fn.isFactoryProvider(e.provider)?o=e.provider.useFactory(this):o=this.construct(e.provider,t),e.options.lifecycle===Ln.default.ResolutionScoped&&t.scopedResolutions.set(e,o),o}resolveAll(e,t=new Zh.default,r=!1){this.ensureNotDisposed();let i=this.getAllRegistrations(e);if(!i&&fn.isNormalToken(e)){if(r)return[];throw new Error(`Attempted to resolve unregistered dependency token: "${e.toString()}"`)}if(this.executePreResolutionInterceptor(e,"All"),i){let o=i.map(l=>this.resolveRegistration(l,t));return this.executePostResolutionInterceptor(e,o,"All"),o}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=>!fn.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===Ln.default.ContainerScoped)&&e._registry.setAll(t,r.map(i=>i.options.lifecycle===Ln.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 h9.__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 y9.DelayedConstructor)return e.createProxy(i=>this.resolve(i,t));let r=(()=>{let i=Xs.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 _9.isDisposable(r)&&this.disposables.add(r),r}resolveParams(e,t){return(r,i)=>{try{return Jh.isTokenDescriptor(r)?Jh.isTransformDescriptor(r)?r.multiple?this.resolve(r.transform).transform(this.resolveAll(r.token,new Zh.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 Zh.default,r.isOptional):this.resolve(r.token,e,r.isOptional):Jh.isTransformDescriptor(r)?this.resolve(r.transform,e).transform(this.resolve(r.token,e),...r.transformArgs):this.resolve(r,e)}catch(s){throw new Error(g9.formatErrorCtor(t,i,s))}}}ensureNotDisposed(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")}};Xs.instance=new tb;Xs.default=Xs.instance});var ZA=S(nb=>{"use strict";Object.defineProperty(nb,"__esModule",{value:!0});var S9=Ba(),Js=$o(),rb=Gh(),w9=Z_();function v9(){return function(n){let e=S9.getParamInfo(n);return class extends n{constructor(...t){super(...t.concat(e.slice(t.length).map((r,i)=>{try{return rb.isTokenDescriptor(r)?rb.isTransformDescriptor(r)?r.multiple?Js.instance.resolve(r.transform).transform(Js.instance.resolveAll(r.token),...r.transformArgs):Js.instance.resolve(r.transform).transform(Js.instance.resolve(r.token),...r.transformArgs):r.multiple?Js.instance.resolveAll(r.token):Js.instance.resolve(r.token):rb.isTransformDescriptor(r)?Js.instance.resolve(r.transform).transform(Js.instance.resolve(r.token),...r.transformArgs):Js.instance.resolve(r)}catch(s){let o=i+t.length;throw new Error(w9.formatErrorCtor(n,o,s))}})))}}}}a(v9,"autoInjectable");nb.default=v9});var eI=S(ib=>{"use strict";Object.defineProperty(ib,"__esModule",{value:!0});var E9=Ba();function T9(n,e){let t={token:n,multiple:!1,isOptional:e&&e.isOptional};return E9.defineInjectionTokenMetadata(t)}a(T9,"inject");ib.default=T9});var ep=S(sb=>{"use strict";Object.defineProperty(sb,"__esModule",{value:!0});var A9=Ba(),I9=$o(),tI=$o();function x9(n){return function(e){I9.typeInfo.set(e,A9.getParamInfo(e)),n&&n.token&&(Array.isArray(n.token)?n.token.forEach(t=>{tI.instance.register(t,e)}):tI.instance.register(n.token,e))}}a(x9,"injectable");sb.default=x9});var rI=S(ob=>{"use strict";Object.defineProperty(ob,"__esModule",{value:!0});var C9=($h(),sh(jh)),R9=$o();function P9(n=[]){return function(e){return n.forEach(t=>{var{token:r,options:i}=t,s=C9.__rest(t,["token","options"]);return R9.instance.register(r,s,i)}),e}}a(P9,"registry");ob.default=P9});var nI=S(ab=>{"use strict";Object.defineProperty(ab,"__esModule",{value:!0});var O9=ep(),F9=$o();function D9(){return function(n){O9.default()(n),F9.instance.registerSingleton(n)}}a(D9,"singleton");ab.default=D9});var iI=S(lb=>{"use strict";Object.defineProperty(lb,"__esModule",{value:!0});var L9=Ba();function N9(n,e){let t={token:n,multiple:!0,isOptional:e&&e.isOptional};return L9.defineInjectionTokenMetadata(t)}a(N9,"injectAll");lb.default=N9});var sI=S(cb=>{"use strict";Object.defineProperty(cb,"__esModule",{value:!0});var k9=Ba();function M9(n,e,...t){let r={token:n,multiple:!0,transform:e,transformArgs:t};return k9.defineInjectionTokenMetadata(r)}a(M9,"injectAllWithTransform");cb.default=M9});var oI=S(ub=>{"use strict";Object.defineProperty(ub,"__esModule",{value:!0});var j9=Ba();function $9(n,e,...t){return j9.defineInjectionTokenMetadata(n,{transformToken:e,args:t})}a($9,"injectWithTransform");ub.default=$9});var aI=S(fb=>{"use strict";Object.defineProperty(fb,"__esModule",{value:!0});var U9=ep(),V9=$o();function B9(n,e){return function(t){U9.default()(t),V9.instance.register(e||t,t,{lifecycle:n})}}a(B9,"scoped");fb.default=B9});var lI=S(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});var q9=ZA();Object.defineProperty(Ai,"autoInjectable",{enumerable:!0,get:a(function(){return q9.default},"get")});var G9=eI();Object.defineProperty(Ai,"inject",{enumerable:!0,get:a(function(){return G9.default},"get")});var W9=ep();Object.defineProperty(Ai,"injectable",{enumerable:!0,get:a(function(){return W9.default},"get")});var z9=rI();Object.defineProperty(Ai,"registry",{enumerable:!0,get:a(function(){return z9.default},"get")});var H9=nI();Object.defineProperty(Ai,"singleton",{enumerable:!0,get:a(function(){return H9.default},"get")});var Y9=iI();Object.defineProperty(Ai,"injectAll",{enumerable:!0,get:a(function(){return Y9.default},"get")});var Q9=sI();Object.defineProperty(Ai,"injectAllWithTransform",{enumerable:!0,get:a(function(){return Q9.default},"get")});var K9=oI();Object.defineProperty(Ai,"injectWithTransform",{enumerable:!0,get:a(function(){return K9.default},"get")});var X9=aI();Object.defineProperty(Ai,"scoped",{enumerable:!0,get:a(function(){return X9.default},"get")})});var cI=S(db=>{"use strict";Object.defineProperty(db,"__esModule",{value:!0});function J9(n){let e;return t=>(e==null&&(e=n(t)),e)}a(J9,"instanceCachingFactory");db.default=J9});var uI=S(hb=>{"use strict";Object.defineProperty(hb,"__esModule",{value:!0});function Z9(n){let e=new WeakMap;return t=>{let r=e.get(t);return r==null&&(r=n(t),e.set(t,r)),r}}a(Z9,"instancePerContainerCachingFactory");hb.default=Z9});var fI=S(pb=>{"use strict";Object.defineProperty(pb,"__esModule",{value:!0});function e5(n,e,t,r=!0){let i,s;return o=>{let l=n(o);return(!r||s!==l)&&((s=l)?i=o.resolve(e):i=o.resolve(t)),i}}a(e5,"predicateAwareClassFactory");pb.default=e5});var dI=S(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var t5=cI();Object.defineProperty(cf,"instanceCachingFactory",{enumerable:!0,get:a(function(){return t5.default},"get")});var r5=uI();Object.defineProperty(cf,"instancePerContainerCachingFactory",{enumerable:!0,get:a(function(){return r5.default},"get")});var n5=fI();Object.defineProperty(cf,"predicateAwareClassFactory",{enumerable:!0,get:a(function(){return n5.default},"get")})});var Fe=S(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});var mb=($h(),sh(jh));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 i5=zA();Object.defineProperty(Uo,"Lifecycle",{enumerable:!0,get:a(function(){return i5.Lifecycle},"get")});mb.__exportStar(lI(),Uo);mb.__exportStar(dI(),Uo);mb.__exportStar(W_(),Uo);var s5=qh();Object.defineProperty(Uo,"delay",{enumerable:!0,get:a(function(){return s5.delay},"get")});var o5=$o();Object.defineProperty(Uo,"container",{enumerable:!0,get:a(function(){return o5.instance},"get")})});var zl=S(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});tp.NullLogger=void 0;tp.NullLogger={debug(){},info(){},warn(){},error(){}}});var hI=S(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.registerUniversalDefaultLoader=a5;Vo.clearUniversalDefaultLoader=l5;Vo.clearUniversalDefault=c5;Vo.loadUniversalDefault=u5;Vo.mergePropertyDefaults=f5;Vo.mergeInheritanceRules=d5;var rp=null,Zs,uf=!1;function a5(n){rp=n,Zs=void 0,uf=!1}a(a5,"registerUniversalDefaultLoader");function l5(){rp=null,Zs=void 0,uf=!1}a(l5,"clearUniversalDefaultLoader");function c5(){Zs=void 0,uf=!1}a(c5,"clearUniversalDefault");async function u5(){if(Zs!==void 0)return Zs;if(!rp)return Zs=null,null;try{Zs=await rp()??null}catch(n){uf||(console.warn("[UniversalDefaultTemplateResolver] loader threw, falling back to legacy primitives:",n),uf=!0),Zs=null}return Zs}a(u5,"loadUniversalDefault");function f5(n,e){let t=new Map;for(let s of e)t.set(s.propertyName,s);let r=[],i=new Set;for(let s of n){let o=t.get(s.propertyName);o?(r.push(o),i.add(o.propertyName)):r.push(s)}for(let s of e)i.has(s.propertyName)||r.push(s);return r}a(f5,"mergePropertyDefaults");function d5(n,e){let t=new Map;for(let s of e)t.set(s.targetPropertyName,s);let r=[],i=new Set;for(let s of n){let o=t.get(s.targetPropertyName);o?(r.push(o),i.add(o.targetPropertyName)):r.push(s)}for(let s of e)i.has(s.targetPropertyName)||r.push(s);return r}a(d5,"mergeInheritanceRules")});var gb=S((ase,pI)=>{var Hl=class{static{a(this,"Wildcard")}constructor(){return h5||this}equals(e){return e&&this.termType===e.termType}};Object.defineProperty(Hl.prototype,"value",{enumerable:!0,value:"*"});Object.defineProperty(Hl.prototype,"termType",{enumerable:!0,value:"Wildcard"});var h5=new Hl;pI.exports.Wildcard=Hl});var gI=S((cse,mI)=>{var p5=(function(){var n=a(function(P,R,O,k){for(O=O||{},k=P.length;k--;O[P[k]]=R);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],o=[1,27],l=[13,16,45,197,224,229,308],c=[28,29,53],u=[28,53],f=[1,42],d=[1,45],h=[1,41],p=[1,44],g=[123,126],y=[1,67],v=[39,45,87],w=[13,16,45,197,224,308],E=[1,87],A=[2,281],x=[1,86],D=[13,16,45,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],J=[6,28,29,53,63,70,73,81,83,85],ae=[6,13,16,28,29,53,63,70,73,81,83,85,87,308],ge=[6,13,16,28,29,45,53,63,70,73,81,82,83,85,87,89,197,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314],N=[6,13,16,28,29,31,39,45,47,48,53,63,70,73,81,82,83,85,87,89,109,112,121,123,126,128,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,337,338,340,341,342,343,344,345,346],Q=[13,16,308],oe=[112,132,327,334],B=[13,16,112,132,308],K=[1,111],ne=[1,117],G=[112,132,327,328,334],ie=[13,16,112,132,308,328],W=[28,29,45,53,87],V=[1,138],q=[1,151],rt=[1,128],lt=[1,127],Y=[1,129],Le=[1,140],qe=[1,141],ce=[1,142],Xe=[1,143],Je=[1,144],Ye=[1,145],Ze=[1,147],Ne=[1,148],Qe=[2,457],je=[1,158],Ke=[1,159],et=[1,160],ye=[1,152],we=[1,153],ve=[1,156],_e=[1,171],be=[1,172],Se=[1,173],me=[1,174],Ee=[1,175],Te=[1,176],Ae=[1,167],Ie=[1,168],he=[1,169],xe=[1,170],ot=[1,157],tt=[1,166],He=[1,161],T=[1,162],I=[1,163],C=[1,164],F=[1,165],re=[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],wt=[1,195],Pt=[6,31,73,81,83,85],Ve=[2,285],z=[1,199],H=[1,201],X=[6,31,70,73,81,83,85],Z=[2,283],Me=[1,207],ct=[1,218],ut=[1,223],Or=[1,219],xn=[1,225],zn=[1,226],an=[1,224],B2=[6,63,70,73,81,83,85],q2=[1,236],G2=[2,334],W2=[1,243],z2=[1,241],Fr=[6,193],Md=[2,349],H2=[2,339],Fo=[28,128],Y2=[47,48,193,272],jd=[47,48,193,242,272],Cl=[47,48,193,242,246,272],Rl=[47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,341,342,343,344,345,346],br=[39,47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,338,341,342,343,344,345,346],Q2=[1,271],K2=[1,270],Jt=[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],X2=[1,281],J2=[1,280],ln=[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],Lu=[45,89],$d=[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],Ud=[13,16,31,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],Vd=[31,89],Bd=[48,87],Aa=[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],is=[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],Z2=[1,313],Pl=[6,85],i0=[6,31,81,83,85],eT=[2,361],js=[2,353],Ia=[1,343],Nu=[31,112,335],$s=[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],s0=[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],tT=[6,109,193],xa=[31,112],Zt=[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],o0=[1,390],a0=[1,391],Do=[13,16,87,197,308,314],rT=[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],qd=[1,417],Gd=[1,418],nT=[13,16,48,197,229,308],Lo=[6,31,85],iT=[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],l0=[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],Ca=[29,31,85,112,159,160,161,163,164],Wd=[1,443],zd=[1,444],sT=[1,449],Ra=[31,112,193,232,318,335],Hd=[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],oT=[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],c0=[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],ku=[13,16,31,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],Mu=[31,45],aT=[1,507],lT=[1,508],cT=[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],Yd=[29,31,85,112,159,160,161,163,164,335],Pa=[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],uT=[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],fT=[2,352],u0=[13,16,197,308,314],dT=[1,565],Ol=[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],hT=[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],Us=[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],pT=[13,16,87,308],Vs=[2,364],Fl=[29,31,85,112,159,160,161,163,164,193,232,318,335],Qd=[31,112,193,232,272,318,335],Bs=[2,359],mT=[13,16,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],Kd=[29,31,85,112,159,160,161,163,164,193,232,272,318,335],gT=[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],yT=[2,347],f0={trace:a(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:a(function(R,O,k,ue,$e,_,un){var b=_.length-1;switch($e){case 1:if(_[b-1]=_[b-1]||{},Ge.base&&(_[b-1].base=Ge.base),Ge.base="",_[b-1].prefixes=Ge.prefixes,Ge.prefixes=null,Ge.pathOnly){if(_[b-1].type==="path"||"termType"in _[b-1])return _[b-1];throw new Error("Received full SPARQL query in path only mode")}else if(_[b-1].type==="path"||"termType"in _[b-1])throw new Error("Received only path in full SPARQL mode");if(_[b-1].type==="update"){let vt={};for(let $t of _[b-1].updates)if($t.updateType==="insert"){let ft={};for(let pt of $t.insert)if(pt.type==="bgp"||pt.type==="graph")for(let Cn of pt.triples)Cn.subject.termType==="BlankNode"&&(ft[Cn.subject.value]=!0),Cn.predicate.termType==="BlankNode"&&(ft[Cn.predicate.value]=!0),Cn.object.termType==="BlankNode"&&(ft[Cn.object.value]=!0);for(let pt of Object.keys(ft)){if(vt[pt])throw new Error("Detected reuse blank node across different INSERT DATA clauses");vt[pt]=!0}}}return _[b-1];case 2:this.$={..._[b-1],..._[b],type:"query"};break;case 4:Ge.base=ju(_[b]);break;case 5:Ge.prefixes||(Ge.prefixes={}),_[b-1]=_[b-1].substr(0,_[b-1].length-1),_[b]=ju(_[b]),Ge.prefixes[_[b-1]]=_[b];break;case 6:this.$={..._[b-3],...Da(_[b-2]),..._[b-1],..._[b]};break;case 7:if(!Ge.skipValidation&&(b0(_[b-3].variables.map($t=>_0($t.expression))).some($t=>$t.aggregation==="count"&&!($t.expression instanceof Xd))||_[b].group)){for(let $t of _[b-3].variables)if($t.termType==="Variable"){if(!_[b].group||!_[b].group.map(ft=>kl(ft)).includes(kl($t)))throw Error("Projection of ungrouped variable (?"+kl($t)+")")}else if(_0($t.expression).length===0){let ft=pk($t.expression);for(let pt of ft)if(!_[b].group||!_[b].group.map||!_[b].group.map(Cn=>kl(Cn)).includes(kl(pt)))throw Error("Use of ungrouped variable in projection of operation (?"+kl(pt)+")")}}let ls=_[b-1].where.filter(vt=>vt.type==="query");if(ls.length>0){let vt=_[b-3].variables.filter(ft=>ft.variable&&ft.variable.value).map(ft=>ft.variable.value),$t=b0(ls.map(ft=>ft.variables)).map(ft=>ft.value||ft.variable.value);for(let ft of vt)if($t.indexOf(ft)>=0)throw Error("Target id of 'AS' (?"+ft+") already used in subquery")}this.$=Ht(_[b-3],Da(_[b-2]),_[b-1],_[b]);break;case 8:this.$=Ht({queryType:"CONSTRUCT",template:_[b-3]},Da(_[b-2]),_[b-1],_[b]);break;case 9:this.$=Ht({queryType:"CONSTRUCT",template:_[b-2]=_[b-2]?_[b-2].triples:[]},Da(_[b-5]),{where:[{type:"bgp",triples:Fa([],_[b-2])}]},_[b]);break;case 10:this.$=Ht({queryType:"DESCRIBE",variables:_[b-3]==="*"?[new Xd]:_[b-3]},Da(_[b-2]),_[b-1],_[b]);break;case 11:this.$=Ht({queryType:"ASK"},Da(_[b-2]),_[b-1],_[b]);break;case 12:this.$=Ht(_[b-1],{variables:[new Xd]});break;case 13:let qu=_[b].map(vt=>vt.value||vt.variable.value),Ml=mk(qu);if(Ml.length>0)throw Error("Two or more of the resulting columns have the same name (?"+Ml[0]+")");this.$=Ht(_[b-1],{variables:_[b]});break;case 14:this.$=Ht({queryType:"SELECT"},_[b]&&(_[b-1]=cn(_[b]),_[b]={},_[b][_[b-1]]=!0,_[b]));break;case 16:case 27:this.$=Dl(_[b-3],{variable:_[b-1]});break;case 17:case 18:this.$=Ht(_[b-3],_[b-2],_[b-1],_[b],{type:"query"});break;case 19:case 58:this.$={iri:_[b],named:!!_[b-1]};break;case 20:this.$={where:_[b].patterns};break;case 21:this.$=Ht(_[b-1],_[b]);break;case 22:this.$=Ht(_[b-2],_[b-1],_[b]);break;case 23:this.$={group:_[b]};break;case 24:case 25:case 28:case 31:case 33:case 34:this.$=Dl(_[b]);break;case 26:this.$=Dl(_[b-1]);break;case 29:this.$={having:_[b]};break;case 30:this.$={order:_[b]};break;case 32:this.$=Dl(_[b],{descending:!0});break;case 35:this.$={limit:Nl(_[b])};break;case 36:this.$={offset:Nl(_[b])};break;case 37:this.$={limit:Nl(_[b-2]),offset:Nl(_[b])};break;case 38:this.$={limit:Nl(_[b]),offset:Nl(_[b-2])};break;case 39:case 43:this.$={type:"values",values:_[b]};break;case 40:case 84:this.$=_[b-1].map(vt=>({[_[b-3]]:vt}));break;case 41:case 85:this.$=_[b-1].map(()=>({}));break;case 42:case 86:var as=_[b-4].length;_[b-4]=_[b-4].map(d0),this.$=_[b-1].map(function(vt){if(vt.length!==as)throw Error("Inconsistent VALUES length");for(var $t={},ft=0;ft<as;ft++)$t["?"+_[b-4][ft].value]=vt[ft];return $t});break;case 44:case 65:case 100:case 126:case 175:this.$=_[b-1];break;case 45:this.$={type:"update",updates:qs(_[b-2],_[b-1])};break;case 46:this.$=Ht({type:"load",silent:!!_[b-2],source:_[b-1]},_[b]&&{destination:_[b]});break;case 47:this.$={type:cn(_[b-2]),silent:!!_[b-1],graph:_[b]};break;case 48:this.$={type:cn(_[b-4]),silent:!!_[b-3],source:_[b-2],destination:_[b]};break;case 49:this.$={type:"create",silent:!!_[b-2],graph:{type:"graph",name:_[b]}};break;case 50:this.$={updateType:"insert",insert:CT(_[b])};break;case 51:this.$={updateType:"delete",delete:v0(CT(_[b]))};break;case 52:this.$={updateType:"deletewhere",delete:v0(_[b])};break;case 53:this.$={updateType:"insertdelete",..._[b-4],..._[b-3],...Da(_[b-2],"using"),where:_[b].patterns};break;case 54:case 57:case 62:case 167:case 191:case 236:this.$=_[b];break;case 55:this.$={delete:v0(_[b-1]),insert:_[b]||[]};break;case 56:this.$={delete:[],insert:_[b]};break;case 59:this.$={graph:_[b]};break;case 60:this.$={type:"graph",default:!0};break;case 61:case 63:this.$={type:"graph",name:_[b]};break;case 64:this.$={[cn(_[b])]:!0};break;case 66:this.$=_[b-1]?ss(_[b],[_[b-1]]):ss(_[b]);break;case 67:var Vu=Ht(_[b-3]||{triples:[]},{type:"graph",name:_[b-5]});this.$=_[b]?[Vu,_[b]]:[Vu];break;case 68:case 73:this.$={type:"bgp",triples:ss(_[b-2],[_[b-1]])};break;case 69:this.$={type:"group",patterns:[_[b-1]]};break;case 70:for(let vt of _[b-1].filter($t=>$t.type==="bind")){let $t=_[b-1].indexOf(vt),ft=new Set;for(let pt of _[b-1].slice(0,$t))(pt.type==="group"||pt.type==="bgp")&&IT(pt).forEach(Cn=>ft.add(Cn));if(ft.has(vt.variable.value))throw Error("Variable used to bind is already bound (?"+vt.variable.value+")")}this.$={type:"group",patterns:_[b-1]};break;case 71:this.$=_[b-1]?ss([_[b-1]],_[b]):ss(_[b]);break;case 72:this.$=_[b]?[_[b-2],_[b]]:_[b-2];break;case 75:this.$=Ht(_[b],{type:"optional"});break;case 76:this.$=Ht(_[b],{type:"minus"});break;case 77:this.$=Ht(_[b],{type:"graph",name:_[b-1]});break;case 78:this.$=Ht(_[b],{type:"service",name:_[b-1],silent:!!_[b-2]});break;case 79:this.$={type:"filter",expression:_[b]};break;case 80:this.$={type:"bind",variable:_[b-1],expression:_[b-3]};break;case 89:this.$=Uu(_[b]);break;case 90:this.$=void 0;break;case 91:this.$=_[b-1].length?{type:"union",patterns:ss(_[b-1].map(p0),[p0(_[b])])}:_[b];break;case 95:this.$={..._[b],function:_[b-1]};break;case 96:this.$={type:"functionCall",args:[]};break;case 97:this.$={type:"functionCall",args:qs(_[b-2],_[b-1]),distinct:!!_[b-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.$=qs(_[b-2],_[b-1]);break;case 101:this.$=ss(_[b-2],[_[b-1]]);break;case 102:case 112:this.$=w0(_[b].map(vt=>Ht(Gs(_[b-1]),vt)));break;case 103:this.$=w0(Fa(_[b].map(vt=>Ht(Gs(_[b-1].entity),vt)),_[b-1].triples));break;case 105:this.$=ss([_[b-1]],_[b]);break;case 106:this.$=ss(_[b]);break;case 107:this.$=y0(_[b-1],_[b]);break;case 109:case 237:this.$=Ge.factory.namedNode(ik);break;case 110:case 118:this.$=qs(_[b-1],_[b]);break;case 111:this.$=_[b]?{annotation:_[b],object:_[b-1]}:_[b-1];break;case 113:this.$=_[b]?w0(Fa(_[b].map(vt=>Ht(Gs(_[b-1].entity),vt)),_[b-1].triples)):_[b-1].triples;break;case 114:this.$=y0(..._[b-1],_[b]);break;case 116:this.$=y0(..._[b]);break;case 117:case 159:case 163:this.$=[_[b-1],_[b]];break;case 119:this.$=_[b]?{object:_[b-1],annotation:_[b]}:_[b-1];break;case 120:this.$=_[b-1].length?Ll("|",qs(_[b-1],_[b])):_[b];break;case 121:this.$=_[b-1].length?Ll("/",qs(_[b-1],_[b])):_[b];break;case 122:this.$=_[b]?Ll(_[b],[_[b-1]]):_[b-1];break;case 123:this.$=_[b-1]?Ll(_[b-1],[_[b]]):_[b];break;case 125:case 131:this.$=Ll(_[b-1],[_[b]]);break;case 129:this.$=Ll("|",qs(_[b-2],_[b-1]));break;case 132:case 134:this.$=dk(_[b-1]);break;case 133:case 135:this.$=hk(_[b-1]);break;case 140:this.$={entity:_[b],triples:[]};break;case 145:this.$=d0(_[b]);break;case 149:this.$=Ge.factory.namedNode(_T);break;case 151:case 153:case 158:case 162:this.$=h0(_[b-1],_[b]);break;case 152:this.$=["||",_[b]];break;case 154:this.$=["&&",_[b]];break;case 156:this.$=Dr(_[b-1],[_[b-2],_[b]]);break;case 157:this.$=Dr(_[b-2]?"notin":"in",[_[b-3],_[b]]);break;case 160:this.$=["+",h0(_[b-1],_[b])];break;case 161:var eh=os(_[b-1].value.replace("-",""),_[b-1].datatype);this.$=["-",h0(eh,_[b])];break;case 164:this.$=Dr("UPLUS",[_[b]]);break;case 165:this.$=Dr(_[b-1],[_[b]]);break;case 166:this.$=Dr("UMINUS",[_[b]]);break;case 177:this.$=Dr(cn(_[b-1]));break;case 178:this.$=Dr(cn(_[b-3]),[_[b-1]]);break;case 179:this.$=Uu(Dr(cn(_[b-3]),[_[b-1]]));break;case 180:this.$=Dr(cn(_[b-5]),[_[b-3],_[b-1]]);break;case 181:this.$=Dr(cn(_[b-7]),[_[b-5],_[b-3],_[b-1]]);break;case 182:this.$=Uu(Dr(cn(_[b-7]),[_[b-5],_[b-3],_[b-1]]));break;case 183:this.$=Dr(cn(_[b-1]),_[b]);break;case 184:this.$=Dr("bound",[d0(_[b-1])]);break;case 185:this.$=Dr(_[b-1],[]);break;case 186:this.$=Dr(_[b-3],[_[b-1]]);break;case 187:this.$=Dr(_[b-2]?"notexists":"exists",[p0(_[b])]);break;case 188:case 189:this.$=Dl(_[b-1],{type:"aggregate",aggregation:cn(_[b-4]),distinct:!!_[b-2]});break;case 190:this.$=Dl(_[b-2],{type:"aggregate",aggregation:cn(_[b-5]),distinct:!!_[b-3],separator:typeof _[b-1]=="string"?_[b-1]:" "});break;case 192:this.$=os(_[b]);break;case 193:this.$=lk(_[b-1],cn(_[b].substr(1)));break;case 194:this.$=os(_[b-2],_[b]);break;case 195:case 204:this.$=os(_[b],bT);break;case 196:case 205:this.$=os(_[b],ST);break;case 197:case 206:this.$=os(cn(_[b]),wT);break;case 200:this.$=os(_[b].toLowerCase(),ak);break;case 201:this.$=os(_[b].substr(1),bT);break;case 202:this.$=os(_[b].substr(1),ST);break;case 203:this.$=os(_[b].substr(1).toLowerCase(),wT);break;case 207:case 208:this.$=AT(_[b],1);break;case 209:case 210:this.$=AT(_[b],3);break;case 211:this.$=Ge.factory.namedNode(ju(_[b]));break;case 213:var th=_[b].indexOf(":"),Bu=_[b].substr(0,th),rh=Ge.prefixes[Bu];if(!rh)throw new Error("Unknown prefix: "+Bu);var qt=ju(rh+_[b].substr(th+1));this.$=Ge.factory.namedNode(qt);break;case 214:if(_[b]=_[b].substr(0,_[b].length-1),!(_[b]in Ge.prefixes))throw new Error("Unknown prefix: "+_[b]);var qt=ju(Ge.prefixes[_[b]]);this.$=Ge.factory.namedNode(qt);break;case 215:this.$=$u(_[b].replace(/^(_:)/,""));break;case 216:this.$=$u();break;case 217:case 218:case 232:this.$=Uu(m0(_[b-3],_[b-2],_[b-1]));break;case 230:case 231:this.$=Uu(_[b-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:_[b-1].push(_[b]);break;case 259:case 269:case 291:case 293:case 295:case 301:case 305:case 371:case 424:case 426:this.$=[_[b]];break;case 308:_[b-3].push(_[b-2]);break;case 350:case 362:case 376:case 380:case 382:case 386:case 396:case 406:case 410:case 412:case 421:_[b-2].push(_[b-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:o},{6:[2,239]},n(l,[2,411],{216:28,217:29}),n(c,[2,249],{18:30}),n(c,[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(c,[2,267],{37:46}),n(g,[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:y,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:E,29:A,52:84,53:x,56:85},{19:88,28:E,29:A,52:89,53:x,56:85},n(c,[2,253],{26:90}),{28:[1,91],52:92,53:x},n(D,[2,385],{181:93,182:94,183:95,31:[2,383]}),n(J,[2,263],{34:96}),n(J,[2,261],{44:39,55:40,307:43,139:97,13:f,16:d,87:h,308:p}),n(J,[2,262]),n(ae,[2,259]),n(ge,[2,143]),n(ge,[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(N,[2,211]),n(N,[2,212]),n(N,[2,213]),n(N,[2,214]),{19:98,28:E,29:A,52:99,53:x,56:85},{6:[2,309],99:100,193:[1,101]},n(Q,[2,311],{101:102,328:[1,103]}),n(oe,[2,317],{104:104,328:[1,105]}),n(B,[2,322],{107:106,328:[1,107]}),{111:108,112:[2,324],328:[1,109]},{29:K,114:110},{29:K,114:112},{29:K,114:113},{118:114,123:[1,115],125:116,126:ne},n(G,[2,315]),n(G,[2,316]),n(ie,[2,319]),n(ie,[2,320]),n(ie,[2,321]),n(g,[2,327]),{13:f,16:d,55:118,307:43,308:p},n(c,[2,12]),n(c,[2,13],{44:66,43:119,45:y,87:h}),n(W,[2,269]),n(W,[2,15]),{13:f,16:d,44:136,45:V,46:120,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,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(re,[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(l,[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:wt,219:189,220:190,223:191,224:[1,192],307:43,308:p},n(w,[2,419]),n(Pt,Ve,{20:196,59:197,69:198,70:z}),n(c,[2,250]),{29:H,57:200},n(Q,[2,279],{54:202,327:[1,203]}),{29:[2,282]},n(X,Z,{23:204,58:205,62:206,63:Me}),n(c,[2,252]),{19:208,28:E,29:A,52:209,53:x,56:85},{29:[1,210]},n(u,[2,256]),{31:[1,211]},{31:[2,384]},{13:f,16:d,44:215,45:ct,55:220,82:q,87:h,89:ut,145:212,172:221,185:213,187:214,231:Or,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n(B2,[2,265],{56:85,35:227,52:228,19:229,28:E,29:A,53:x}),n(ae,[2,260]),n(X,Z,{58:205,62:206,23:230,63:Me}),n(c,[2,268]),{6:[2,45]},n(e,t,{10:3,4:231}),{13:f,16:d,55:232,307:43,308:p},n(Q,[2,312]),{105:233,112:q2,122:234,132:[1,237],134:235,327:[1,238],334:[1,239]},n(oe,[2,318]),n(Q,G2,{108:240,133:242,112:W2,132:z2}),n(B,[2,323]),{112:[1,244]},{112:[2,325]},n(Fr,[2,50]),n(D,Md,{135:245,136:246,143:247,144:248,31:H2,112:H2}),n(Fr,[2,51]),n(Fr,[2,52]),n(Fo,[2,328],{119:249}),{29:K,114:250},n(Fo,[2,56]),{29:K,114:251},n(g,[2,59]),n(W,[2,270]),{47:[1,252]},n(Y2,[2,150]),n(jd,[2,428],{240:253}),n(Cl,[2,430],{244:254}),n(Cl,[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(Rl,[2,440],{252:264}),n(br,[2,448],{260:265}),{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,255:154,257:155,264:266,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,255:154,257:155,264:267,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,255:154,257:155,264:268,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(br,[2,167]),n(br,[2,168]),n(br,[2,169]),n(br,[2,170],{176:269,45:Q2,89:K2}),n(br,[2,171]),n(br,[2,172]),n(br,[2,173]),n(br,[2,174]),{13:f,16:d,44:136,45:V,46:272,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Jt,[2,176]),{89:[1,273]},{45:[1,274]},{45:[1,275]},{45:[1,276]},{45:[1,277]},{45:[1,278]},{45:X2,89:J2,179:279},{45:[1,282]},{45:[1,284],89:[1,283]},{279:[1,285]},n(ln,[2,192],{292:[1,286],293:[1,287]}),n(ln,[2,195]),n(ln,[2,196]),n(ln,[2,197]),n(ln,[2,198]),n(ln,[2,199]),n(ln,[2,200]),{13:f,16:d,44:39,55:40,82:q,87:h,139:289,172:291,255:154,257:155,266:290,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,320:288},{45:[1,292]},{45:[1,293]},{45:[1,294]},n(Lu,[2,452]),n(Lu,[2,453]),n(Lu,[2,454]),n(Lu,[2,455]),n(Lu,[2,456]),{279:[2,458]},n($d,[2,207]),n($d,[2,208]),n($d,[2,209]),n($d,[2,210]),n(ln,[2,201]),n(ln,[2,202]),n(ln,[2,203]),n(ln,[2,204]),n(ln,[2,205]),n(ln,[2,206]),n(e,[2,5]),n(Ud,[2,297],{88:295}),n(Vd,[2,299],{90:296}),{48:[1,297],87:[1,298]},n(Bd,[2,301]),n(re,[2,43]),n(re,[2,82]),n(re,[2,83]),{29:[1,299]},{29:[1,300]},{87:[1,302],169:301},n(l,[2,412]),n(Aa,[2,123]),n(Aa,[2,416],{221:303,339:304,39:[1,306],263:[1,307],340:[1,305]}),n(is,[2,124]),{13:f,16:d,45:[1,311],55:194,89:[1,310],197:wt,223:312,225:308,226:309,229:Z2,307:43,308:p},n(l,i,{215:10,214:314}),n(is,[2,236]),n(is,[2,237]),n(Pl,[2,6]),n(i0,[2,287],{60:315,72:316,73:[1,317]}),n(Pt,[2,286]),{13:f,16:d,45:V,55:323,67:321,68:322,71:318,77:320,79:319,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,307:43,308:p,346:tt,347:He,348:T,349:I,350:C,351:F},n([6,31,63,70,73,81,83,85],[2,20]),n(D,eT,{38:17,49:324,147:325,17:326,21:327,148:328,154:329,155:330,29:js,31:js,85:js,112:js,159:js,160:js,161:js,163:js,164:js,41:s}),{13:f,16:d,55:331,307:43,308:p},n(Q,[2,280]),n(Pl,[2,7]),n(Pt,Ve,{59:197,69:198,20:332,70:z}),n(X,[2,284]),{64:[1,333]},n(X,Z,{58:205,62:206,23:334,63:Me}),n(c,[2,254]),n(D,Md,{144:248,30:335,143:336,31:[2,257]}),n(c,[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:Ia,307:43,308:p},n(Nu,[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:Ia,308:p}),n($s,[2,227]),n($s,[2,228]),n($s,[2,229]),{13:f,16:d,44:215,45:ct,55:220,82:q,87:h,89:ut,172:221,185:351,187:350,200:348,230:347,231:Or,234:349,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},{13:f,16:d,44:39,55:40,87:h,139:342,186:352,190:340,195:341,197:Ia,307:43,308:p},n($s,[2,146]),n($s,[2,147]),n($s,[2,148]),n($s,[2,149]),{13:f,16:d,44:354,55:355,82:q,87:h,172:357,237:356,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:358,312:an,313:353},n(s0,[2,215]),n(s0,[2,216]),n(X,Z,{58:205,62:206,23:359,63:Me}),n(J,[2,264]),n(B2,[2,266]),n(Pl,[2,11]),n(r,[2,308],{6:[2,310]}),n(Fr,[2,313],{102:360,120:361,121:[1,362]}),n(Fr,[2,47]),n(Fr,[2,63]),n(Fr,[2,64]),{13:f,16:d,55:363,307:43,308:p},n(Fr,[2,336]),n(Fr,[2,337]),n(Fr,[2,338]),{109:[1,364]},n(tT,[2,60]),{13:f,16:d,55:365,307:43,308:p},n(Q,[2,335]),{13:f,16:d,55:366,307:43,308:p},{31:[1,367]},n(xa,[2,341],{137:368}),n(xa,[2,340]),{13:f,16:d,44:215,45:ct,55:220,82:q,87:h,89:ut,145:369,172:221,185:213,187:214,231:Or,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},{28:[1,370],127:371,128:[1,372]},n(Fo,[2,330],{124:373,125:374,126:ne}),n(Fo,[2,57]),{44:375,87:h},n(Y2,[2,151],{241:376,242:[1,377]}),n(jd,[2,153],{245:378,246:[1,379]}),{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,247:380,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{250:[1,381]},n(Zt,[2,432]),n(Zt,[2,433]),n(Zt,[2,434]),n(Zt,[2,435]),n(Zt,[2,436]),n(Zt,[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:_e,298:be,299:Se,300:me,301:Ee,302:Te}),n(Rl,[2,162],{261:388,262:389,39:o0,338:a0}),n(br,[2,164]),n(br,[2,165]),n(br,[2,166]),n(Jt,[2,95]),n(Jt,[2,96]),n(Zt,[2,377],{177:392,325:[1,393]}),{48:[1,394]},n(Jt,[2,177]),{13:f,16:d,44:136,45:V,46:395,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:396,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:397,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:398,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:399,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Jt,[2,183]),n(Jt,[2,98]),n(Zt,[2,381],{180:400}),{87:[1,401]},n(Jt,[2,185]),{13:f,16:d,44:136,45:V,46:402,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{29:H,57:403},n(ln,[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:Ia,307:43,308:p},n(Do,[2,233]),n(Do,[2,234]),n(Do,[2,235]),n(rT,[2,459],{281:406,325:[1,407]}),n(Zt,[2,463],{284:408,325:[1,409]}),n(Zt,[2,465],{286:410,325:[1,411]}),{13:f,16:d,31:[1,412],55:414,82:q,171:413,172:415,173:416,174:qd,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:Gd},{31:[1,419],89:[1,420]},{29:[1,421]},n(Bd,[2,302]),n(Ud,[2,367],{167:422}),n(Vd,[2,369],{168:423}),{48:[1,424],87:[1,425]},n(Bd,[2,371]),n(Aa,[2,122]),n(Aa,[2,417]),n(Aa,[2,413]),n(Aa,[2,414]),n(Aa,[2,415]),n(is,[2,125]),n(is,[2,127]),n(is,[2,128]),n(nT,[2,420],{227:426}),n(is,[2,130]),{13:f,16:d,55:194,197:wt,223:427,307:43,308:p},{48:[1,428]},n(Lo,[2,289],{61:429,80:430,81:[1,431],83:[1,432]}),n(i0,[2,288]),{64:[1,433]},n(Pt,[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:V,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,276:Ze,277:Ne,279:Qe,280:je,283:Ke,285:et,308:p,346:tt,347:He,348:T,349:I,350:C,351:F}),n(iT,[2,293]),n(l0,[2,92]),n(l0,[2,93]),n(l0,[2,94]),{45:Q2,89:K2,176:269},{31:[1,435]},{31:[1,436]},{19:437,28:E,29:A,56:85},{19:438,28:E,29:A,56:85},n(Ca,[2,355],{149:439}),n(Ca,[2,354]),{13:f,16:d,44:215,45:Wd,55:220,82:q,87:h,89:ut,156:440,172:221,185:441,203:442,231:zd,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n(J,[2,19]),n(Lo,[2,21]),{13:f,16:d,44:450,45:sT,55:323,65:445,66:446,67:447,68:448,87:h,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,307:43,308:p,346:tt,347:He,348:T,349:I,350:C,351:F},n(Pl,[2,8]),{31:[1,451]},{31:[2,258]},{31:[2,101]},n(D,[2,386],{31:[2,388]}),n(Nu,[2,102]),n(Ra,[2,391],{191:452}),n(D,[2,395],{196:453,198:454}),n(D,[2,108]),n(D,[2,109]),n(Nu,[2,103]),n(Nu,[2,104]),n(Nu,[2,390]),{13:f,16:d,44:215,45:ct,48:[1,455],55:220,82:q,87:h,89:ut,172:221,185:351,187:350,200:456,231:Or,234:349,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n(Hd,[2,424]),n(oT,[2,136]),n(oT,[2,137]),n(c0,[2,140]),{232:[1,457]},{13:f,16:d,44:39,55:40,87:h,139:342,195:458,197:Ia,307:43,308:p},n(Do,[2,219]),n(Do,[2,220]),n(Do,[2,221]),n(Do,[2,222]),n(Do,[2,223]),n(Pl,[2,10]),n(Fr,[2,46]),n(Fr,[2,314]),{112:q2,122:459},n(Fr,[2,62]),n(Q,G2,{133:242,108:460,112:W2,132:z2}),n(tT,[2,61]),n(Fr,[2,49]),n([6,28,126,128,193],[2,65]),{31:[2,66],112:[1,462],138:461},n(xa,[2,351],{146:463,335:[1,464]}),{29:H,57:465},n(Fo,[2,329]),n(Q,[2,332],{129:466,327:[1,467]}),n(Fo,[2,55]),n(Fo,[2,331]),{48:[1,468]},n(jd,[2,429]),{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,239:469,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Cl,[2,431]),{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,243:470,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Cl,[2,156]),{45:X2,89:J2,179:471},n(Rl,[2,441]),{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,251:472,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(br,[2,444],{256:473}),n(br,[2,446],{258:474}),n(Zt,[2,442]),n(Zt,[2,443]),n(br,[2,449]),{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,255:154,257:155,259:475,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Zt,[2,450]),n(Zt,[2,451]),n(Zt,[2,379],{178:476}),n(Zt,[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:V,46:482,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{48:[1,483]},{48:[1,484]},n(Jt,[2,187]),n(ln,[2,194]),{13:f,16:d,44:39,55:40,82:q,87:h,139:289,172:291,255:154,257:155,266:290,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,320:485},{13:f,16:d,39:[1,487],44:136,45:V,46:488,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,282:486,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(rT,[2,460]),{13:f,16:d,44:136,45:V,46:489,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Zt,[2,464]),{13:f,16:d,44:136,45:V,46:490,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Zt,[2,466]),n(re,[2,40]),n(Ud,[2,298]),n(ku,[2,87]),n(ku,[2,88]),n(ku,[2,89]),n(ku,[2,90]),{13:f,16:d,55:492,82:q,172:493,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,311:494,312:an,315:491},n(re,[2,41]),n(Vd,[2,300]),n(Mu,[2,303],{92:495}),{13:f,16:d,31:[1,496],55:414,82:q,171:497,172:415,173:416,174:qd,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:Gd},{31:[1,498],89:[1,499]},{29:[1,500]},n(Bd,[2,372]),{13:f,16:d,48:[2,422],55:194,197:wt,223:312,226:502,228:501,229:Z2,307:43,308:p},n(is,[2,131]),n(is,[2,126]),n(Lo,[2,22]),n(Lo,[2,290]),{82:[1,503]},{82:[1,504]},{13:f,16:d,44:510,45:V,55:323,67:321,68:322,74:505,75:506,76:aT,77:320,78:lT,79:509,87:h,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,307:43,308:p,346:tt,347:He,348:T,349:I,350:C,351:F},n(iT,[2,294]),n(cT,[2,69]),n(cT,[2,70]),n(Pt,Ve,{59:197,69:198,20:511,70:z}),n(X,Z,{58:205,62:206,23:512,63:Me}),{29:[2,375],31:[2,71],84:522,85:o,112:[1,518],150:513,151:514,158:515,159:[1,516],160:[1,517],161:[1,519],163:[1,520],164:[1,521],175:523},n(Ca,[2,363],{157:524,335:[1,525]}),n(l,i,{215:10,202:526,205:527,208:528,214:529,44:530,87:h}),n(Yd,[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:Wd,55:220,82:q,87:h,89:ut,172:221,185:351,203:536,212:534,231:zd,233:533,234:535,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n(l,i,{215:10,205:527,208:528,214:529,44:530,202:537,87:h}),n(X,[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:sT,87:h,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,276:Ze,277:Ne,279:Qe,280:je,283:Ke,285:et,308:p,346:tt,347:He,348:T,349:I,350:C,351:F}),n(Pa,[2,291]),n(Pa,[2,24]),n(Pa,[2,25]),{13:f,16:d,44:136,45:V,46:539,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Pa,[2,28]),n(X,Z,{58:205,62:206,23:540,63:Me}),n([31,112,232,318,335],[2,105],{192:541,193:[1,542]}),n(Ra,[2,107]),{13:f,16:d,44:215,45:ct,55:220,82:q,87:h,89:ut,172:221,185:351,187:350,199:543,200:544,231:Or,234:349,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n(uT,[2,132]),n(Hd,[2,425]),n(uT,[2,133]),{13:f,16:d,44:354,55:355,82:q,87:h,172:357,237:356,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:358,312:an,313:545},n(Fr,[2,54]),n(Fr,[2,48]),n(xa,[2,342]),{13:f,16:d,44:39,55:40,87:h,139:546,307:43,308:p},n(xa,[2,68]),n(D,[2,350],{31:fT,112:fT}),n(Fr,[2,53]),{13:f,16:d,55:547,307:43,308:p},n(Q,[2,333]),n(W,[2,16]),n(jd,[2,152]),n(Cl,[2,154]),n(Cl,[2,157]),n(Rl,[2,159]),n(Rl,[2,160],{262:389,261:548,39:o0,338:a0}),n(Rl,[2,161],{262:389,261:549,39:o0,338:a0}),n(br,[2,163]),{13:f,16:d,44:136,45:V,46:550,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Jt,[2,178]),n(Jt,[2,179]),{13:f,16:d,44:136,45:V,46:551,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:552,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:553,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{48:[1,554],272:[1,555]},n(Jt,[2,184]),n(Jt,[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:wt,223:562,307:43,308:p},n(u0,[2,224]),n(u0,[2,225]),n(u0,[2,226]),{31:[1,563],45:dT,94:564},n(re,[2,84]),n(Ud,[2,368]),n(re,[2,85]),n(Vd,[2,370]),n(Mu,[2,373],{170:566}),{48:[1,567]},{48:[2,423],337:[1,568]},n(Lo,[2,35],{83:[1,569]}),n(Lo,[2,36],{81:[1,570]}),n(i0,[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:V,76:aT,78:lT,87:h,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,276:Ze,277:Ne,279:Qe,280:je,283:Ke,285:et,308:p,346:tt,347:He,348:T,349:I,350:C,351:F}),n(Ol,[2,295]),{45:V,77:572},{45:V,77:573},n(Ol,[2,33]),n(Ol,[2,34]),{31:[2,275],50:574,84:575,85:o},{31:[2,277],51:576,84:577,85:o},n(Ca,[2,356]),n(hT,[2,357],{152:578,335:[1,579]}),n(Us,[2,74]),{29:H,57:580},{29:H,57:581},{13:f,16:d,44:39,55:40,87:h,139:582,307:43,308:p},n(pT,[2,365],{162:583,328:[1,584]}),{13:f,16:d,45:V,55:323,67:321,68:322,77:320,79:585,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,307:43,308:p,346:tt,347:He,348:T,349:I,350:C,351:F},{45:[1,586]},n(Us,[2,81]),{29:H,57:587},n(Ca,[2,73]),n(D,[2,362],{29:Vs,31:Vs,85:Vs,112:Vs,159:Vs,160:Vs,161:Vs,163:Vs,164:Vs}),n(Yd,[2,112]),n(Fl,[2,401],{206:588}),n(D,[2,405],{209:589,210:590}),n(D,[2,403]),n(D,[2,404]),n(Yd,[2,113]),n(Yd,[2,400]),{13:f,16:d,44:215,45:Wd,48:[1,591],55:220,82:q,87:h,89:ut,172:221,185:351,203:536,212:592,231:zd,234:535,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n(Hd,[2,426]),n(c0,[2,138]),n(c0,[2,139]),{232:[1,593]},n(Pa,[2,292]),{47:[1,595],48:[1,594]},n(Pl,[2,9]),n(Ra,[2,392]),n(Ra,[2,393],{44:39,55:40,307:43,195:341,139:342,194:596,190:597,13:f,16:d,87:h,197:Ia,308:p}),n(Ra,[2,110],{272:[1,598]}),n(Qd,[2,397],{201:599,316:600,317:[1,601]}),{314:[1,602]},{29:[1,603]},n(Fo,[2,58]),n(br,[2,445]),n(br,[2,447]),{48:[1,604],272:[1,605]},{48:[1,606]},{272:[1,607]},{272:[1,608]},n(Jt,[2,99]),n(Zt,[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(Jt,[2,188]),n(Jt,[2,189]),{48:[1,609]},{48:[2,468]},{289:[1,610]},{13:f,16:d,55:492,82:q,172:493,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,311:494,312:an,315:611},n(re,[2,42]),n(Mu,[2,304]),{13:f,16:d,55:414,82:q,95:612,171:613,172:415,173:416,174:qd,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:Gd},{31:[1,614],45:dT,94:615},n(is,[2,129]),n(nT,[2,421]),{82:[1,616]},{82:[1,617]},n(Ol,[2,296]),n(Ol,[2,31]),n(Ol,[2,32]),{31:[2,17]},{31:[2,276]},{31:[2,18]},{31:[2,278]},n(D,eT,{155:330,153:618,154:619,29:Bs,31:Bs,85:Bs,112:Bs,159:Bs,160:Bs,161:Bs,163:Bs,164:Bs}),n(hT,[2,358]),n(Us,[2,75]),n(Us,[2,76]),{29:H,57:620},{13:f,16:d,44:39,55:40,87:h,139:621,307:43,308:p},n(pT,[2,366]),n(Us,[2,79]),{13:f,16:d,44:136,45:V,46:622,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Us,[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(Fl,[2,117]),{13:f,16:d,44:215,45:Wd,55:220,82:q,87:h,89:ut,172:221,185:351,203:536,211:626,212:627,231:zd,234:535,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n($s,[2,134]),n(Hd,[2,427]),n($s,[2,135]),n(Pa,[2,26]),{44:628,87:h},n(Ra,[2,106]),n(Ra,[2,394]),n(D,[2,396]),n(Qd,[2,111]),n(Qd,[2,398]),{13:f,16:d,44:39,55:40,87:h,139:342,186:629,190:340,195:341,197:Ia,307:43,308:p},n(s0,[2,217]),n(D,Md,{144:248,140:630,143:631,31:[2,343]}),n(Jt,[2,97]),n(Zt,[2,380]),n(Jt,[2,180]),{13:f,16:d,44:136,45:V,46:632,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:633,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:rt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Jt,[2,190]),{290:[1,634]},{314:[1,635]},{13:f,16:d,48:[1,636],55:414,82:q,171:637,172:415,173:416,174:qd,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:Gd},n(mT,[2,305]),n(re,[2,86]),n(Mu,[2,374]),n(Lo,[2,37]),n(Lo,[2,38]),n(Ca,[2,72]),n(Ca,[2,360]),n(Us,[2,77]),{29:H,57:638},{47:[1,639]},{29:[2,376]},n(Fl,[2,402]),n(Fl,[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(Fl,[2,118],{272:[1,641]}),n(Kd,[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:Ae,304:Ie,305:he,306:xe},n(ku,[2,218]),n(Mu,[2,44]),n(mT,[2,306]),n(Us,[2,78]),{44:651,87:h},n(Fl,[2,116]),n(D,[2,406]),n(Kd,[2,119]),n(Kd,[2,408]),n(l,i,{215:10,205:527,208:528,214:529,44:530,202:652,87:h}),n(Pa,[2,27]),n(Qd,[2,230]),n(gT,[2,345],{141:653,335:[1,654]}),n(Jt,[2,181]),n(Jt,[2,182]),{48:[2,191]},{48:[1,655]},{318:[1,656]},n(D,Md,{144:248,142:657,143:658,31:yT,112:yT}),n(gT,[2,346]),n(Us,[2,80]),n(Kd,[2,231]),n(xa,[2,67]),n(xa,[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:a(function(R,O){if(O.recoverable)this.trace(R);else{var k=new Error(R);throw k.hash=O,k}},"parseError"),parse:a(function(R){var O=this,k=[0],ue=[],$e=[null],_=[],un=this.table,b="",as=0,Vu=0,eh=0,th=2,Bu=1,rh=_.slice.call(arguments,1),qt=Object.create(this.lexer),ls={yy:{}};for(var qu in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qu)&&(ls.yy[qu]=this.yy[qu]);qt.setInput(R,ls.yy),ls.yy.lexer=qt,ls.yy.parser=this,typeof qt.yylloc>"u"&&(qt.yylloc={});var Ml=qt.yylloc;_.push(Ml);var vt=qt.options&&qt.options.ranges;typeof ls.yy.parseError=="function"?this.parseError=ls.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $t(cs){k.length=k.length-2*cs,$e.length=$e.length-cs,_.length=_.length-cs}a($t,"popStack");for(var ft=a(function(){var cs;return cs=qt.lex()||Bu,typeof cs!="number"&&(cs=O.symbols_[cs]||cs),cs},"lex"),pt,Cn,La,ii,wte,E0,jl={},nh,Ws,RT,ih;;){if(La=k[k.length-1],this.defaultActions[La]?ii=this.defaultActions[La]:((pt===null||typeof pt>"u")&&(pt=ft()),ii=un[La]&&un[La][pt]),typeof ii>"u"||!ii.length||!ii[0]){var T0="";ih=[];for(nh in un[La])this.terminals_[nh]&&nh>th&&ih.push("'"+this.terminals_[nh]+"'");qt.showPosition?T0="Parse error on line "+(as+1)+`:
|
|
33
|
+
`)}a(u9,"composeErrorMessage");function f9(n,e,t){let[,r=null]=n.toString().match(/constructor\(([\w, ]+)\)/)||[],i=c9(r,e);return u9(`Cannot inject the dependency ${i} of "${n.name}" constructor. Reason:`,t)}a(f9,"formatErrorCtor");Yh.formatErrorCtor=f9});var KA=S(Qh=>{"use strict";Object.defineProperty(Qh,"__esModule",{value:!0});Qh.isDisposable=void 0;function d9(n){return!(typeof n.dispose!="function"||n.dispose.length>0)}a(d9,"isDisposable");Qh.isDisposable=d9});var JA=S(Ga=>{"use strict";Object.defineProperty(Ga,"__esModule",{value:!0});Ga.PostResolutionInterceptors=Ga.PreResolutionInterceptors=void 0;var XA=Y_(),Kh=class extends XA.default{static{a(this,"PreResolutionInterceptors")}};Ga.PreResolutionInterceptors=Kh;var Xh=class extends XA.default{static{a(this,"PostResolutionInterceptors")}};Ga.PostResolutionInterceptors=Xh;var eb=class{static{a(this,"Interceptors")}constructor(){this.preResolution=new Kh,this.postResolution=new Xh}};Ga.default=eb});var $o=S(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});Xs.instance=Xs.typeInfo=void 0;var h9=($h(),sh(jh)),fn=W_(),p9=HA(),Jh=Gh(),m9=YA(),Ln=$_(),Zh=QA(),g9=Z_(),y9=qh(),_9=KA(),b9=JA();Xs.typeInfo=new Map;var tb=class n{static{a(this,"InternalDependencyContainer")}constructor(e){this.parent=e,this._registry=new m9.default,this.interceptors=new b9.default,this.disposed=!1,this.disposables=new Set}register(e,t,r={lifecycle:Ln.default.Transient}){this.ensureNotDisposed();let i;if(p9.isProvider(t)?i=t:i={useClass:t},fn.isTokenProvider(i)){let s=[e],o=i;for(;o!=null;){let l=o.useToken;if(s.includes(l))throw new Error(`Token registration cycle detected! ${[...s,l].join(" -> ")}`);s.push(l);let c=this._registry.get(l);c&&fn.isTokenProvider(c.provider)?o=c.provider:o=null}}if((r.lifecycle===Ln.default.Singleton||r.lifecycle==Ln.default.ContainerScoped||r.lifecycle==Ln.default.ResolutionScoped)&&(fn.isValueProvider(i)||fn.isFactoryProvider(i)))throw new Error(`Cannot use lifecycle "${Ln.default[r.lifecycle]}" with ValueProviders or FactoryProviders`);return this._registry.set(e,{provider:i,options:r}),this}registerType(e,t){return this.ensureNotDisposed(),fn.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(),fn.isNormalToken(e)){if(fn.isNormalToken(t))return this.register(e,{useToken:t},{lifecycle:Ln.default.Singleton});if(t)return this.register(e,{useClass:t},{lifecycle:Ln.default.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}let r=e;return t&&!fn.isNormalToken(t)&&(r=t),this.register(e,{useClass:r},{lifecycle:Ln.default.Singleton})}resolve(e,t=new Zh.default,r=!1){this.ensureNotDisposed();let i=this.getRegistration(e);if(!i&&fn.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(Jh.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===Ln.default.ResolutionScoped&&t.scopedResolutions.has(e))return t.scopedResolutions.get(e);let r=e.options.lifecycle===Ln.default.Singleton,i=e.options.lifecycle===Ln.default.ContainerScoped,s=r||i,o;return fn.isValueProvider(e.provider)?o=e.provider.useValue:fn.isTokenProvider(e.provider)?o=s?e.instance||(e.instance=this.resolve(e.provider.useToken,t)):this.resolve(e.provider.useToken,t):fn.isClassProvider(e.provider)?o=s?e.instance||(e.instance=this.construct(e.provider.useClass,t)):this.construct(e.provider.useClass,t):fn.isFactoryProvider(e.provider)?o=e.provider.useFactory(this):o=this.construct(e.provider,t),e.options.lifecycle===Ln.default.ResolutionScoped&&t.scopedResolutions.set(e,o),o}resolveAll(e,t=new Zh.default,r=!1){this.ensureNotDisposed();let i=this.getAllRegistrations(e);if(!i&&fn.isNormalToken(e)){if(r)return[];throw new Error(`Attempted to resolve unregistered dependency token: "${e.toString()}"`)}if(this.executePreResolutionInterceptor(e,"All"),i){let o=i.map(l=>this.resolveRegistration(l,t));return this.executePostResolutionInterceptor(e,o,"All"),o}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=>!fn.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===Ln.default.ContainerScoped)&&e._registry.setAll(t,r.map(i=>i.options.lifecycle===Ln.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 h9.__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 y9.DelayedConstructor)return e.createProxy(i=>this.resolve(i,t));let r=(()=>{let i=Xs.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 _9.isDisposable(r)&&this.disposables.add(r),r}resolveParams(e,t){return(r,i)=>{try{return Jh.isTokenDescriptor(r)?Jh.isTransformDescriptor(r)?r.multiple?this.resolve(r.transform).transform(this.resolveAll(r.token,new Zh.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 Zh.default,r.isOptional):this.resolve(r.token,e,r.isOptional):Jh.isTransformDescriptor(r)?this.resolve(r.transform,e).transform(this.resolve(r.token,e),...r.transformArgs):this.resolve(r,e)}catch(s){throw new Error(g9.formatErrorCtor(t,i,s))}}}ensureNotDisposed(){if(this.disposed)throw new Error("This container has been disposed, you cannot interact with a disposed container")}};Xs.instance=new tb;Xs.default=Xs.instance});var ZA=S(nb=>{"use strict";Object.defineProperty(nb,"__esModule",{value:!0});var S9=Ba(),Js=$o(),rb=Gh(),w9=Z_();function v9(){return function(n){let e=S9.getParamInfo(n);return class extends n{constructor(...t){super(...t.concat(e.slice(t.length).map((r,i)=>{try{return rb.isTokenDescriptor(r)?rb.isTransformDescriptor(r)?r.multiple?Js.instance.resolve(r.transform).transform(Js.instance.resolveAll(r.token),...r.transformArgs):Js.instance.resolve(r.transform).transform(Js.instance.resolve(r.token),...r.transformArgs):r.multiple?Js.instance.resolveAll(r.token):Js.instance.resolve(r.token):rb.isTransformDescriptor(r)?Js.instance.resolve(r.transform).transform(Js.instance.resolve(r.token),...r.transformArgs):Js.instance.resolve(r)}catch(s){let o=i+t.length;throw new Error(w9.formatErrorCtor(n,o,s))}})))}}}}a(v9,"autoInjectable");nb.default=v9});var eI=S(ib=>{"use strict";Object.defineProperty(ib,"__esModule",{value:!0});var E9=Ba();function T9(n,e){let t={token:n,multiple:!1,isOptional:e&&e.isOptional};return E9.defineInjectionTokenMetadata(t)}a(T9,"inject");ib.default=T9});var ep=S(sb=>{"use strict";Object.defineProperty(sb,"__esModule",{value:!0});var A9=Ba(),I9=$o(),tI=$o();function x9(n){return function(e){I9.typeInfo.set(e,A9.getParamInfo(e)),n&&n.token&&(Array.isArray(n.token)?n.token.forEach(t=>{tI.instance.register(t,e)}):tI.instance.register(n.token,e))}}a(x9,"injectable");sb.default=x9});var rI=S(ob=>{"use strict";Object.defineProperty(ob,"__esModule",{value:!0});var C9=($h(),sh(jh)),R9=$o();function P9(n=[]){return function(e){return n.forEach(t=>{var{token:r,options:i}=t,s=C9.__rest(t,["token","options"]);return R9.instance.register(r,s,i)}),e}}a(P9,"registry");ob.default=P9});var nI=S(ab=>{"use strict";Object.defineProperty(ab,"__esModule",{value:!0});var O9=ep(),F9=$o();function D9(){return function(n){O9.default()(n),F9.instance.registerSingleton(n)}}a(D9,"singleton");ab.default=D9});var iI=S(lb=>{"use strict";Object.defineProperty(lb,"__esModule",{value:!0});var L9=Ba();function N9(n,e){let t={token:n,multiple:!0,isOptional:e&&e.isOptional};return L9.defineInjectionTokenMetadata(t)}a(N9,"injectAll");lb.default=N9});var sI=S(cb=>{"use strict";Object.defineProperty(cb,"__esModule",{value:!0});var k9=Ba();function M9(n,e,...t){let r={token:n,multiple:!0,transform:e,transformArgs:t};return k9.defineInjectionTokenMetadata(r)}a(M9,"injectAllWithTransform");cb.default=M9});var oI=S(ub=>{"use strict";Object.defineProperty(ub,"__esModule",{value:!0});var j9=Ba();function $9(n,e,...t){return j9.defineInjectionTokenMetadata(n,{transformToken:e,args:t})}a($9,"injectWithTransform");ub.default=$9});var aI=S(fb=>{"use strict";Object.defineProperty(fb,"__esModule",{value:!0});var U9=ep(),V9=$o();function B9(n,e){return function(t){U9.default()(t),V9.instance.register(e||t,t,{lifecycle:n})}}a(B9,"scoped");fb.default=B9});var lI=S(Ai=>{"use strict";Object.defineProperty(Ai,"__esModule",{value:!0});var q9=ZA();Object.defineProperty(Ai,"autoInjectable",{enumerable:!0,get:a(function(){return q9.default},"get")});var G9=eI();Object.defineProperty(Ai,"inject",{enumerable:!0,get:a(function(){return G9.default},"get")});var W9=ep();Object.defineProperty(Ai,"injectable",{enumerable:!0,get:a(function(){return W9.default},"get")});var z9=rI();Object.defineProperty(Ai,"registry",{enumerable:!0,get:a(function(){return z9.default},"get")});var H9=nI();Object.defineProperty(Ai,"singleton",{enumerable:!0,get:a(function(){return H9.default},"get")});var Y9=iI();Object.defineProperty(Ai,"injectAll",{enumerable:!0,get:a(function(){return Y9.default},"get")});var Q9=sI();Object.defineProperty(Ai,"injectAllWithTransform",{enumerable:!0,get:a(function(){return Q9.default},"get")});var K9=oI();Object.defineProperty(Ai,"injectWithTransform",{enumerable:!0,get:a(function(){return K9.default},"get")});var X9=aI();Object.defineProperty(Ai,"scoped",{enumerable:!0,get:a(function(){return X9.default},"get")})});var cI=S(db=>{"use strict";Object.defineProperty(db,"__esModule",{value:!0});function J9(n){let e;return t=>(e==null&&(e=n(t)),e)}a(J9,"instanceCachingFactory");db.default=J9});var uI=S(hb=>{"use strict";Object.defineProperty(hb,"__esModule",{value:!0});function Z9(n){let e=new WeakMap;return t=>{let r=e.get(t);return r==null&&(r=n(t),e.set(t,r)),r}}a(Z9,"instancePerContainerCachingFactory");hb.default=Z9});var fI=S(pb=>{"use strict";Object.defineProperty(pb,"__esModule",{value:!0});function e5(n,e,t,r=!0){let i,s;return o=>{let l=n(o);return(!r||s!==l)&&((s=l)?i=o.resolve(e):i=o.resolve(t)),i}}a(e5,"predicateAwareClassFactory");pb.default=e5});var dI=S(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});var t5=cI();Object.defineProperty(cf,"instanceCachingFactory",{enumerable:!0,get:a(function(){return t5.default},"get")});var r5=uI();Object.defineProperty(cf,"instancePerContainerCachingFactory",{enumerable:!0,get:a(function(){return r5.default},"get")});var n5=fI();Object.defineProperty(cf,"predicateAwareClassFactory",{enumerable:!0,get:a(function(){return n5.default},"get")})});var Fe=S(Uo=>{"use strict";Object.defineProperty(Uo,"__esModule",{value:!0});var mb=($h(),sh(jh));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 i5=zA();Object.defineProperty(Uo,"Lifecycle",{enumerable:!0,get:a(function(){return i5.Lifecycle},"get")});mb.__exportStar(lI(),Uo);mb.__exportStar(dI(),Uo);mb.__exportStar(W_(),Uo);var s5=qh();Object.defineProperty(Uo,"delay",{enumerable:!0,get:a(function(){return s5.delay},"get")});var o5=$o();Object.defineProperty(Uo,"container",{enumerable:!0,get:a(function(){return o5.instance},"get")})});var zl=S(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});tp.NullLogger=void 0;tp.NullLogger={debug(){},info(){},warn(){},error(){}}});var hI=S(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});Vo.registerUniversalDefaultLoader=a5;Vo.clearUniversalDefaultLoader=l5;Vo.clearUniversalDefault=c5;Vo.loadUniversalDefault=u5;Vo.mergePropertyDefaults=f5;Vo.mergeInheritanceRules=d5;var rp=null,Zs,uf=!1;function a5(n){rp=n,Zs=void 0,uf=!1}a(a5,"registerUniversalDefaultLoader");function l5(){rp=null,Zs=void 0,uf=!1}a(l5,"clearUniversalDefaultLoader");function c5(){Zs=void 0,uf=!1}a(c5,"clearUniversalDefault");async function u5(){if(Zs!==void 0)return Zs;if(!rp)return Zs=null,null;try{Zs=await rp()??null}catch(n){uf||(console.warn("[UniversalDefaultTemplateResolver] loader threw, falling back to legacy primitives:",n),uf=!0),Zs=null}return Zs}a(u5,"loadUniversalDefault");function f5(n,e){let t=new Map;for(let s of e)t.set(s.propertyName,s);let r=[],i=new Set;for(let s of n){let o=t.get(s.propertyName);o?(r.push(o),i.add(o.propertyName)):r.push(s)}for(let s of e)i.has(s.propertyName)||r.push(s);return r}a(f5,"mergePropertyDefaults");function d5(n,e){let t=new Map;for(let s of e)t.set(s.targetPropertyName,s);let r=[],i=new Set;for(let s of n){let o=t.get(s.targetPropertyName);o?(r.push(o),i.add(o.targetPropertyName)):r.push(s)}for(let s of e)i.has(s.targetPropertyName)||r.push(s);return r}a(d5,"mergeInheritanceRules")});var gb=S((ase,pI)=>{var Hl=class{static{a(this,"Wildcard")}constructor(){return h5||this}equals(e){return e&&this.termType===e.termType}};Object.defineProperty(Hl.prototype,"value",{enumerable:!0,value:"*"});Object.defineProperty(Hl.prototype,"termType",{enumerable:!0,value:"Wildcard"});var h5=new Hl;pI.exports.Wildcard=Hl});var gI=S((cse,mI)=>{var p5=(function(){var n=a(function(P,R,O,k){for(O=O||{},k=P.length;k--;O[P[k]]=R);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],o=[1,27],l=[13,16,45,197,224,229,308],c=[28,29,53],u=[28,53],f=[1,42],d=[1,45],h=[1,41],p=[1,44],g=[123,126],y=[1,67],v=[39,45,87],w=[13,16,45,197,224,308],E=[1,87],A=[2,281],x=[1,86],D=[13,16,45,82,87,89,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312],J=[6,28,29,53,63,70,73,81,83,85],ae=[6,13,16,28,29,53,63,70,73,81,83,85,87,308],ge=[6,13,16,28,29,45,53,63,70,73,81,82,83,85,87,89,197,231,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314],N=[6,13,16,28,29,31,39,45,47,48,53,63,70,73,81,82,83,85,87,89,109,112,121,123,126,128,159,160,161,163,164,174,193,197,224,229,231,232,242,246,250,263,265,272,290,294,295,296,297,298,299,300,301,302,303,304,305,306,308,309,310,312,314,317,318,335,337,338,340,341,342,343,344,345,346],Q=[13,16,308],oe=[112,132,327,334],B=[13,16,112,132,308],K=[1,111],ne=[1,117],G=[112,132,327,328,334],ie=[13,16,112,132,308,328],W=[28,29,45,53,87],V=[1,138],q=[1,151],nt=[1,128],lt=[1,127],Y=[1,129],Le=[1,140],qe=[1,141],ce=[1,142],Xe=[1,143],Je=[1,144],Ye=[1,145],Ze=[1,147],Ne=[1,148],Qe=[2,457],je=[1,158],Ke=[1,159],et=[1,160],ye=[1,152],we=[1,153],ve=[1,156],_e=[1,171],be=[1,172],Se=[1,173],me=[1,174],Ee=[1,175],Te=[1,176],Ae=[1,167],Ie=[1,168],he=[1,169],xe=[1,170],ot=[1,157],tt=[1,166],He=[1,161],T=[1,162],I=[1,163],C=[1,164],F=[1,165],re=[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],wt=[1,195],Pt=[6,31,73,81,83,85],Ve=[2,285],z=[1,199],H=[1,201],X=[6,31,70,73,81,83,85],Z=[2,283],Me=[1,207],ct=[1,218],ut=[1,223],Or=[1,219],xn=[1,225],zn=[1,226],an=[1,224],B2=[6,63,70,73,81,83,85],q2=[1,236],G2=[2,334],W2=[1,243],z2=[1,241],Fr=[6,193],Md=[2,349],H2=[2,339],Fo=[28,128],Y2=[47,48,193,272],jd=[47,48,193,242,272],Cl=[47,48,193,242,246,272],Rl=[47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,341,342,343,344,345,346],br=[39,47,48,193,242,246,250,263,265,272,290,297,298,299,300,301,302,338,341,342,343,344,345,346],Q2=[1,271],K2=[1,270],Jt=[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],X2=[1,281],J2=[1,280],ln=[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],Lu=[45,89],$d=[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],Ud=[13,16,31,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],Vd=[31,89],Bd=[48,87],Aa=[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],is=[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],Z2=[1,313],Pl=[6,85],i0=[6,31,81,83,85],eT=[2,361],js=[2,353],Ia=[1,343],Nu=[31,112,335],$s=[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],s0=[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],tT=[6,109,193],xa=[31,112],Zt=[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],o0=[1,390],a0=[1,391],Do=[13,16,87,197,308,314],rT=[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],qd=[1,417],Gd=[1,418],nT=[13,16,48,197,229,308],Lo=[6,31,85],iT=[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],l0=[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],Ca=[29,31,85,112,159,160,161,163,164],Wd=[1,443],zd=[1,444],sT=[1,449],Ra=[31,112,193,232,318,335],Hd=[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],oT=[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],c0=[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],ku=[13,16,31,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],Mu=[31,45],aT=[1,507],lT=[1,508],cT=[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],Yd=[29,31,85,112,159,160,161,163,164,335],Pa=[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],uT=[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],fT=[2,352],u0=[13,16,197,308,314],dT=[1,565],Ol=[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],hT=[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],Us=[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],pT=[13,16,87,308],Vs=[2,364],Fl=[29,31,85,112,159,160,161,163,164,193,232,318,335],Qd=[31,112,193,232,272,318,335],Bs=[2,359],mT=[13,16,48,82,174,294,295,296,297,298,299,300,301,302,303,304,305,306,308,312],Kd=[29,31,85,112,159,160,161,163,164,193,232,272,318,335],gT=[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],yT=[2,347],f0={trace:a(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:a(function(R,O,k,ue,$e,_,un){var b=_.length-1;switch($e){case 1:if(_[b-1]=_[b-1]||{},Ge.base&&(_[b-1].base=Ge.base),Ge.base="",_[b-1].prefixes=Ge.prefixes,Ge.prefixes=null,Ge.pathOnly){if(_[b-1].type==="path"||"termType"in _[b-1])return _[b-1];throw new Error("Received full SPARQL query in path only mode")}else if(_[b-1].type==="path"||"termType"in _[b-1])throw new Error("Received only path in full SPARQL mode");if(_[b-1].type==="update"){let vt={};for(let $t of _[b-1].updates)if($t.updateType==="insert"){let ft={};for(let pt of $t.insert)if(pt.type==="bgp"||pt.type==="graph")for(let Cn of pt.triples)Cn.subject.termType==="BlankNode"&&(ft[Cn.subject.value]=!0),Cn.predicate.termType==="BlankNode"&&(ft[Cn.predicate.value]=!0),Cn.object.termType==="BlankNode"&&(ft[Cn.object.value]=!0);for(let pt of Object.keys(ft)){if(vt[pt])throw new Error("Detected reuse blank node across different INSERT DATA clauses");vt[pt]=!0}}}return _[b-1];case 2:this.$={..._[b-1],..._[b],type:"query"};break;case 4:Ge.base=ju(_[b]);break;case 5:Ge.prefixes||(Ge.prefixes={}),_[b-1]=_[b-1].substr(0,_[b-1].length-1),_[b]=ju(_[b]),Ge.prefixes[_[b-1]]=_[b];break;case 6:this.$={..._[b-3],...Da(_[b-2]),..._[b-1],..._[b]};break;case 7:if(!Ge.skipValidation&&(b0(_[b-3].variables.map($t=>_0($t.expression))).some($t=>$t.aggregation==="count"&&!($t.expression instanceof Xd))||_[b].group)){for(let $t of _[b-3].variables)if($t.termType==="Variable"){if(!_[b].group||!_[b].group.map(ft=>kl(ft)).includes(kl($t)))throw Error("Projection of ungrouped variable (?"+kl($t)+")")}else if(_0($t.expression).length===0){let ft=pk($t.expression);for(let pt of ft)if(!_[b].group||!_[b].group.map||!_[b].group.map(Cn=>kl(Cn)).includes(kl(pt)))throw Error("Use of ungrouped variable in projection of operation (?"+kl(pt)+")")}}let ls=_[b-1].where.filter(vt=>vt.type==="query");if(ls.length>0){let vt=_[b-3].variables.filter(ft=>ft.variable&&ft.variable.value).map(ft=>ft.variable.value),$t=b0(ls.map(ft=>ft.variables)).map(ft=>ft.value||ft.variable.value);for(let ft of vt)if($t.indexOf(ft)>=0)throw Error("Target id of 'AS' (?"+ft+") already used in subquery")}this.$=Ht(_[b-3],Da(_[b-2]),_[b-1],_[b]);break;case 8:this.$=Ht({queryType:"CONSTRUCT",template:_[b-3]},Da(_[b-2]),_[b-1],_[b]);break;case 9:this.$=Ht({queryType:"CONSTRUCT",template:_[b-2]=_[b-2]?_[b-2].triples:[]},Da(_[b-5]),{where:[{type:"bgp",triples:Fa([],_[b-2])}]},_[b]);break;case 10:this.$=Ht({queryType:"DESCRIBE",variables:_[b-3]==="*"?[new Xd]:_[b-3]},Da(_[b-2]),_[b-1],_[b]);break;case 11:this.$=Ht({queryType:"ASK"},Da(_[b-2]),_[b-1],_[b]);break;case 12:this.$=Ht(_[b-1],{variables:[new Xd]});break;case 13:let qu=_[b].map(vt=>vt.value||vt.variable.value),Ml=mk(qu);if(Ml.length>0)throw Error("Two or more of the resulting columns have the same name (?"+Ml[0]+")");this.$=Ht(_[b-1],{variables:_[b]});break;case 14:this.$=Ht({queryType:"SELECT"},_[b]&&(_[b-1]=cn(_[b]),_[b]={},_[b][_[b-1]]=!0,_[b]));break;case 16:case 27:this.$=Dl(_[b-3],{variable:_[b-1]});break;case 17:case 18:this.$=Ht(_[b-3],_[b-2],_[b-1],_[b],{type:"query"});break;case 19:case 58:this.$={iri:_[b],named:!!_[b-1]};break;case 20:this.$={where:_[b].patterns};break;case 21:this.$=Ht(_[b-1],_[b]);break;case 22:this.$=Ht(_[b-2],_[b-1],_[b]);break;case 23:this.$={group:_[b]};break;case 24:case 25:case 28:case 31:case 33:case 34:this.$=Dl(_[b]);break;case 26:this.$=Dl(_[b-1]);break;case 29:this.$={having:_[b]};break;case 30:this.$={order:_[b]};break;case 32:this.$=Dl(_[b],{descending:!0});break;case 35:this.$={limit:Nl(_[b])};break;case 36:this.$={offset:Nl(_[b])};break;case 37:this.$={limit:Nl(_[b-2]),offset:Nl(_[b])};break;case 38:this.$={limit:Nl(_[b]),offset:Nl(_[b-2])};break;case 39:case 43:this.$={type:"values",values:_[b]};break;case 40:case 84:this.$=_[b-1].map(vt=>({[_[b-3]]:vt}));break;case 41:case 85:this.$=_[b-1].map(()=>({}));break;case 42:case 86:var as=_[b-4].length;_[b-4]=_[b-4].map(d0),this.$=_[b-1].map(function(vt){if(vt.length!==as)throw Error("Inconsistent VALUES length");for(var $t={},ft=0;ft<as;ft++)$t["?"+_[b-4][ft].value]=vt[ft];return $t});break;case 44:case 65:case 100:case 126:case 175:this.$=_[b-1];break;case 45:this.$={type:"update",updates:qs(_[b-2],_[b-1])};break;case 46:this.$=Ht({type:"load",silent:!!_[b-2],source:_[b-1]},_[b]&&{destination:_[b]});break;case 47:this.$={type:cn(_[b-2]),silent:!!_[b-1],graph:_[b]};break;case 48:this.$={type:cn(_[b-4]),silent:!!_[b-3],source:_[b-2],destination:_[b]};break;case 49:this.$={type:"create",silent:!!_[b-2],graph:{type:"graph",name:_[b]}};break;case 50:this.$={updateType:"insert",insert:CT(_[b])};break;case 51:this.$={updateType:"delete",delete:v0(CT(_[b]))};break;case 52:this.$={updateType:"deletewhere",delete:v0(_[b])};break;case 53:this.$={updateType:"insertdelete",..._[b-4],..._[b-3],...Da(_[b-2],"using"),where:_[b].patterns};break;case 54:case 57:case 62:case 167:case 191:case 236:this.$=_[b];break;case 55:this.$={delete:v0(_[b-1]),insert:_[b]||[]};break;case 56:this.$={delete:[],insert:_[b]};break;case 59:this.$={graph:_[b]};break;case 60:this.$={type:"graph",default:!0};break;case 61:case 63:this.$={type:"graph",name:_[b]};break;case 64:this.$={[cn(_[b])]:!0};break;case 66:this.$=_[b-1]?ss(_[b],[_[b-1]]):ss(_[b]);break;case 67:var Vu=Ht(_[b-3]||{triples:[]},{type:"graph",name:_[b-5]});this.$=_[b]?[Vu,_[b]]:[Vu];break;case 68:case 73:this.$={type:"bgp",triples:ss(_[b-2],[_[b-1]])};break;case 69:this.$={type:"group",patterns:[_[b-1]]};break;case 70:for(let vt of _[b-1].filter($t=>$t.type==="bind")){let $t=_[b-1].indexOf(vt),ft=new Set;for(let pt of _[b-1].slice(0,$t))(pt.type==="group"||pt.type==="bgp")&&IT(pt).forEach(Cn=>ft.add(Cn));if(ft.has(vt.variable.value))throw Error("Variable used to bind is already bound (?"+vt.variable.value+")")}this.$={type:"group",patterns:_[b-1]};break;case 71:this.$=_[b-1]?ss([_[b-1]],_[b]):ss(_[b]);break;case 72:this.$=_[b]?[_[b-2],_[b]]:_[b-2];break;case 75:this.$=Ht(_[b],{type:"optional"});break;case 76:this.$=Ht(_[b],{type:"minus"});break;case 77:this.$=Ht(_[b],{type:"graph",name:_[b-1]});break;case 78:this.$=Ht(_[b],{type:"service",name:_[b-1],silent:!!_[b-2]});break;case 79:this.$={type:"filter",expression:_[b]};break;case 80:this.$={type:"bind",variable:_[b-1],expression:_[b-3]};break;case 89:this.$=Uu(_[b]);break;case 90:this.$=void 0;break;case 91:this.$=_[b-1].length?{type:"union",patterns:ss(_[b-1].map(p0),[p0(_[b])])}:_[b];break;case 95:this.$={..._[b],function:_[b-1]};break;case 96:this.$={type:"functionCall",args:[]};break;case 97:this.$={type:"functionCall",args:qs(_[b-2],_[b-1]),distinct:!!_[b-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.$=qs(_[b-2],_[b-1]);break;case 101:this.$=ss(_[b-2],[_[b-1]]);break;case 102:case 112:this.$=w0(_[b].map(vt=>Ht(Gs(_[b-1]),vt)));break;case 103:this.$=w0(Fa(_[b].map(vt=>Ht(Gs(_[b-1].entity),vt)),_[b-1].triples));break;case 105:this.$=ss([_[b-1]],_[b]);break;case 106:this.$=ss(_[b]);break;case 107:this.$=y0(_[b-1],_[b]);break;case 109:case 237:this.$=Ge.factory.namedNode(ik);break;case 110:case 118:this.$=qs(_[b-1],_[b]);break;case 111:this.$=_[b]?{annotation:_[b],object:_[b-1]}:_[b-1];break;case 113:this.$=_[b]?w0(Fa(_[b].map(vt=>Ht(Gs(_[b-1].entity),vt)),_[b-1].triples)):_[b-1].triples;break;case 114:this.$=y0(..._[b-1],_[b]);break;case 116:this.$=y0(..._[b]);break;case 117:case 159:case 163:this.$=[_[b-1],_[b]];break;case 119:this.$=_[b]?{object:_[b-1],annotation:_[b]}:_[b-1];break;case 120:this.$=_[b-1].length?Ll("|",qs(_[b-1],_[b])):_[b];break;case 121:this.$=_[b-1].length?Ll("/",qs(_[b-1],_[b])):_[b];break;case 122:this.$=_[b]?Ll(_[b],[_[b-1]]):_[b-1];break;case 123:this.$=_[b-1]?Ll(_[b-1],[_[b]]):_[b];break;case 125:case 131:this.$=Ll(_[b-1],[_[b]]);break;case 129:this.$=Ll("|",qs(_[b-2],_[b-1]));break;case 132:case 134:this.$=dk(_[b-1]);break;case 133:case 135:this.$=hk(_[b-1]);break;case 140:this.$={entity:_[b],triples:[]};break;case 145:this.$=d0(_[b]);break;case 149:this.$=Ge.factory.namedNode(_T);break;case 151:case 153:case 158:case 162:this.$=h0(_[b-1],_[b]);break;case 152:this.$=["||",_[b]];break;case 154:this.$=["&&",_[b]];break;case 156:this.$=Dr(_[b-1],[_[b-2],_[b]]);break;case 157:this.$=Dr(_[b-2]?"notin":"in",[_[b-3],_[b]]);break;case 160:this.$=["+",h0(_[b-1],_[b])];break;case 161:var eh=os(_[b-1].value.replace("-",""),_[b-1].datatype);this.$=["-",h0(eh,_[b])];break;case 164:this.$=Dr("UPLUS",[_[b]]);break;case 165:this.$=Dr(_[b-1],[_[b]]);break;case 166:this.$=Dr("UMINUS",[_[b]]);break;case 177:this.$=Dr(cn(_[b-1]));break;case 178:this.$=Dr(cn(_[b-3]),[_[b-1]]);break;case 179:this.$=Uu(Dr(cn(_[b-3]),[_[b-1]]));break;case 180:this.$=Dr(cn(_[b-5]),[_[b-3],_[b-1]]);break;case 181:this.$=Dr(cn(_[b-7]),[_[b-5],_[b-3],_[b-1]]);break;case 182:this.$=Uu(Dr(cn(_[b-7]),[_[b-5],_[b-3],_[b-1]]));break;case 183:this.$=Dr(cn(_[b-1]),_[b]);break;case 184:this.$=Dr("bound",[d0(_[b-1])]);break;case 185:this.$=Dr(_[b-1],[]);break;case 186:this.$=Dr(_[b-3],[_[b-1]]);break;case 187:this.$=Dr(_[b-2]?"notexists":"exists",[p0(_[b])]);break;case 188:case 189:this.$=Dl(_[b-1],{type:"aggregate",aggregation:cn(_[b-4]),distinct:!!_[b-2]});break;case 190:this.$=Dl(_[b-2],{type:"aggregate",aggregation:cn(_[b-5]),distinct:!!_[b-3],separator:typeof _[b-1]=="string"?_[b-1]:" "});break;case 192:this.$=os(_[b]);break;case 193:this.$=lk(_[b-1],cn(_[b].substr(1)));break;case 194:this.$=os(_[b-2],_[b]);break;case 195:case 204:this.$=os(_[b],bT);break;case 196:case 205:this.$=os(_[b],ST);break;case 197:case 206:this.$=os(cn(_[b]),wT);break;case 200:this.$=os(_[b].toLowerCase(),ak);break;case 201:this.$=os(_[b].substr(1),bT);break;case 202:this.$=os(_[b].substr(1),ST);break;case 203:this.$=os(_[b].substr(1).toLowerCase(),wT);break;case 207:case 208:this.$=AT(_[b],1);break;case 209:case 210:this.$=AT(_[b],3);break;case 211:this.$=Ge.factory.namedNode(ju(_[b]));break;case 213:var th=_[b].indexOf(":"),Bu=_[b].substr(0,th),rh=Ge.prefixes[Bu];if(!rh)throw new Error("Unknown prefix: "+Bu);var qt=ju(rh+_[b].substr(th+1));this.$=Ge.factory.namedNode(qt);break;case 214:if(_[b]=_[b].substr(0,_[b].length-1),!(_[b]in Ge.prefixes))throw new Error("Unknown prefix: "+_[b]);var qt=ju(Ge.prefixes[_[b]]);this.$=Ge.factory.namedNode(qt);break;case 215:this.$=$u(_[b].replace(/^(_:)/,""));break;case 216:this.$=$u();break;case 217:case 218:case 232:this.$=Uu(m0(_[b-3],_[b-2],_[b-1]));break;case 230:case 231:this.$=Uu(_[b-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:_[b-1].push(_[b]);break;case 259:case 269:case 291:case 293:case 295:case 301:case 305:case 371:case 424:case 426:this.$=[_[b]];break;case 308:_[b-3].push(_[b-2]);break;case 350:case 362:case 376:case 380:case 382:case 386:case 396:case 406:case 410:case 412:case 421:_[b-2].push(_[b-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:o},{6:[2,239]},n(l,[2,411],{216:28,217:29}),n(c,[2,249],{18:30}),n(c,[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(c,[2,267],{37:46}),n(g,[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:y,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:E,29:A,52:84,53:x,56:85},{19:88,28:E,29:A,52:89,53:x,56:85},n(c,[2,253],{26:90}),{28:[1,91],52:92,53:x},n(D,[2,385],{181:93,182:94,183:95,31:[2,383]}),n(J,[2,263],{34:96}),n(J,[2,261],{44:39,55:40,307:43,139:97,13:f,16:d,87:h,308:p}),n(J,[2,262]),n(ae,[2,259]),n(ge,[2,143]),n(ge,[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(N,[2,211]),n(N,[2,212]),n(N,[2,213]),n(N,[2,214]),{19:98,28:E,29:A,52:99,53:x,56:85},{6:[2,309],99:100,193:[1,101]},n(Q,[2,311],{101:102,328:[1,103]}),n(oe,[2,317],{104:104,328:[1,105]}),n(B,[2,322],{107:106,328:[1,107]}),{111:108,112:[2,324],328:[1,109]},{29:K,114:110},{29:K,114:112},{29:K,114:113},{118:114,123:[1,115],125:116,126:ne},n(G,[2,315]),n(G,[2,316]),n(ie,[2,319]),n(ie,[2,320]),n(ie,[2,321]),n(g,[2,327]),{13:f,16:d,55:118,307:43,308:p},n(c,[2,12]),n(c,[2,13],{44:66,43:119,45:y,87:h}),n(W,[2,269]),n(W,[2,15]),{13:f,16:d,44:136,45:V,46:120,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,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(re,[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(l,[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:wt,219:189,220:190,223:191,224:[1,192],307:43,308:p},n(w,[2,419]),n(Pt,Ve,{20:196,59:197,69:198,70:z}),n(c,[2,250]),{29:H,57:200},n(Q,[2,279],{54:202,327:[1,203]}),{29:[2,282]},n(X,Z,{23:204,58:205,62:206,63:Me}),n(c,[2,252]),{19:208,28:E,29:A,52:209,53:x,56:85},{29:[1,210]},n(u,[2,256]),{31:[1,211]},{31:[2,384]},{13:f,16:d,44:215,45:ct,55:220,82:q,87:h,89:ut,145:212,172:221,185:213,187:214,231:Or,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n(B2,[2,265],{56:85,35:227,52:228,19:229,28:E,29:A,53:x}),n(ae,[2,260]),n(X,Z,{58:205,62:206,23:230,63:Me}),n(c,[2,268]),{6:[2,45]},n(e,t,{10:3,4:231}),{13:f,16:d,55:232,307:43,308:p},n(Q,[2,312]),{105:233,112:q2,122:234,132:[1,237],134:235,327:[1,238],334:[1,239]},n(oe,[2,318]),n(Q,G2,{108:240,133:242,112:W2,132:z2}),n(B,[2,323]),{112:[1,244]},{112:[2,325]},n(Fr,[2,50]),n(D,Md,{135:245,136:246,143:247,144:248,31:H2,112:H2}),n(Fr,[2,51]),n(Fr,[2,52]),n(Fo,[2,328],{119:249}),{29:K,114:250},n(Fo,[2,56]),{29:K,114:251},n(g,[2,59]),n(W,[2,270]),{47:[1,252]},n(Y2,[2,150]),n(jd,[2,428],{240:253}),n(Cl,[2,430],{244:254}),n(Cl,[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(Rl,[2,440],{252:264}),n(br,[2,448],{260:265}),{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,255:154,257:155,264:266,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,255:154,257:155,264:267,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,255:154,257:155,264:268,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(br,[2,167]),n(br,[2,168]),n(br,[2,169]),n(br,[2,170],{176:269,45:Q2,89:K2}),n(br,[2,171]),n(br,[2,172]),n(br,[2,173]),n(br,[2,174]),{13:f,16:d,44:136,45:V,46:272,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Jt,[2,176]),{89:[1,273]},{45:[1,274]},{45:[1,275]},{45:[1,276]},{45:[1,277]},{45:[1,278]},{45:X2,89:J2,179:279},{45:[1,282]},{45:[1,284],89:[1,283]},{279:[1,285]},n(ln,[2,192],{292:[1,286],293:[1,287]}),n(ln,[2,195]),n(ln,[2,196]),n(ln,[2,197]),n(ln,[2,198]),n(ln,[2,199]),n(ln,[2,200]),{13:f,16:d,44:39,55:40,82:q,87:h,139:289,172:291,255:154,257:155,266:290,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,320:288},{45:[1,292]},{45:[1,293]},{45:[1,294]},n(Lu,[2,452]),n(Lu,[2,453]),n(Lu,[2,454]),n(Lu,[2,455]),n(Lu,[2,456]),{279:[2,458]},n($d,[2,207]),n($d,[2,208]),n($d,[2,209]),n($d,[2,210]),n(ln,[2,201]),n(ln,[2,202]),n(ln,[2,203]),n(ln,[2,204]),n(ln,[2,205]),n(ln,[2,206]),n(e,[2,5]),n(Ud,[2,297],{88:295}),n(Vd,[2,299],{90:296}),{48:[1,297],87:[1,298]},n(Bd,[2,301]),n(re,[2,43]),n(re,[2,82]),n(re,[2,83]),{29:[1,299]},{29:[1,300]},{87:[1,302],169:301},n(l,[2,412]),n(Aa,[2,123]),n(Aa,[2,416],{221:303,339:304,39:[1,306],263:[1,307],340:[1,305]}),n(is,[2,124]),{13:f,16:d,45:[1,311],55:194,89:[1,310],197:wt,223:312,225:308,226:309,229:Z2,307:43,308:p},n(l,i,{215:10,214:314}),n(is,[2,236]),n(is,[2,237]),n(Pl,[2,6]),n(i0,[2,287],{60:315,72:316,73:[1,317]}),n(Pt,[2,286]),{13:f,16:d,45:V,55:323,67:321,68:322,71:318,77:320,79:319,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,307:43,308:p,346:tt,347:He,348:T,349:I,350:C,351:F},n([6,31,63,70,73,81,83,85],[2,20]),n(D,eT,{38:17,49:324,147:325,17:326,21:327,148:328,154:329,155:330,29:js,31:js,85:js,112:js,159:js,160:js,161:js,163:js,164:js,41:s}),{13:f,16:d,55:331,307:43,308:p},n(Q,[2,280]),n(Pl,[2,7]),n(Pt,Ve,{59:197,69:198,20:332,70:z}),n(X,[2,284]),{64:[1,333]},n(X,Z,{58:205,62:206,23:334,63:Me}),n(c,[2,254]),n(D,Md,{144:248,30:335,143:336,31:[2,257]}),n(c,[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:Ia,307:43,308:p},n(Nu,[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:Ia,308:p}),n($s,[2,227]),n($s,[2,228]),n($s,[2,229]),{13:f,16:d,44:215,45:ct,55:220,82:q,87:h,89:ut,172:221,185:351,187:350,200:348,230:347,231:Or,234:349,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},{13:f,16:d,44:39,55:40,87:h,139:342,186:352,190:340,195:341,197:Ia,307:43,308:p},n($s,[2,146]),n($s,[2,147]),n($s,[2,148]),n($s,[2,149]),{13:f,16:d,44:354,55:355,82:q,87:h,172:357,237:356,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:358,312:an,313:353},n(s0,[2,215]),n(s0,[2,216]),n(X,Z,{58:205,62:206,23:359,63:Me}),n(J,[2,264]),n(B2,[2,266]),n(Pl,[2,11]),n(r,[2,308],{6:[2,310]}),n(Fr,[2,313],{102:360,120:361,121:[1,362]}),n(Fr,[2,47]),n(Fr,[2,63]),n(Fr,[2,64]),{13:f,16:d,55:363,307:43,308:p},n(Fr,[2,336]),n(Fr,[2,337]),n(Fr,[2,338]),{109:[1,364]},n(tT,[2,60]),{13:f,16:d,55:365,307:43,308:p},n(Q,[2,335]),{13:f,16:d,55:366,307:43,308:p},{31:[1,367]},n(xa,[2,341],{137:368}),n(xa,[2,340]),{13:f,16:d,44:215,45:ct,55:220,82:q,87:h,89:ut,145:369,172:221,185:213,187:214,231:Or,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},{28:[1,370],127:371,128:[1,372]},n(Fo,[2,330],{124:373,125:374,126:ne}),n(Fo,[2,57]),{44:375,87:h},n(Y2,[2,151],{241:376,242:[1,377]}),n(jd,[2,153],{245:378,246:[1,379]}),{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,247:380,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{250:[1,381]},n(Zt,[2,432]),n(Zt,[2,433]),n(Zt,[2,434]),n(Zt,[2,435]),n(Zt,[2,436]),n(Zt,[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:_e,298:be,299:Se,300:me,301:Ee,302:Te}),n(Rl,[2,162],{261:388,262:389,39:o0,338:a0}),n(br,[2,164]),n(br,[2,165]),n(br,[2,166]),n(Jt,[2,95]),n(Jt,[2,96]),n(Zt,[2,377],{177:392,325:[1,393]}),{48:[1,394]},n(Jt,[2,177]),{13:f,16:d,44:136,45:V,46:395,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:396,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:397,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:398,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:399,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Jt,[2,183]),n(Jt,[2,98]),n(Zt,[2,381],{180:400}),{87:[1,401]},n(Jt,[2,185]),{13:f,16:d,44:136,45:V,46:402,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{29:H,57:403},n(ln,[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:Ia,307:43,308:p},n(Do,[2,233]),n(Do,[2,234]),n(Do,[2,235]),n(rT,[2,459],{281:406,325:[1,407]}),n(Zt,[2,463],{284:408,325:[1,409]}),n(Zt,[2,465],{286:410,325:[1,411]}),{13:f,16:d,31:[1,412],55:414,82:q,171:413,172:415,173:416,174:qd,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:Gd},{31:[1,419],89:[1,420]},{29:[1,421]},n(Bd,[2,302]),n(Ud,[2,367],{167:422}),n(Vd,[2,369],{168:423}),{48:[1,424],87:[1,425]},n(Bd,[2,371]),n(Aa,[2,122]),n(Aa,[2,417]),n(Aa,[2,413]),n(Aa,[2,414]),n(Aa,[2,415]),n(is,[2,125]),n(is,[2,127]),n(is,[2,128]),n(nT,[2,420],{227:426}),n(is,[2,130]),{13:f,16:d,55:194,197:wt,223:427,307:43,308:p},{48:[1,428]},n(Lo,[2,289],{61:429,80:430,81:[1,431],83:[1,432]}),n(i0,[2,288]),{64:[1,433]},n(Pt,[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:V,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,276:Ze,277:Ne,279:Qe,280:je,283:Ke,285:et,308:p,346:tt,347:He,348:T,349:I,350:C,351:F}),n(iT,[2,293]),n(l0,[2,92]),n(l0,[2,93]),n(l0,[2,94]),{45:Q2,89:K2,176:269},{31:[1,435]},{31:[1,436]},{19:437,28:E,29:A,56:85},{19:438,28:E,29:A,56:85},n(Ca,[2,355],{149:439}),n(Ca,[2,354]),{13:f,16:d,44:215,45:Wd,55:220,82:q,87:h,89:ut,156:440,172:221,185:441,203:442,231:zd,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n(J,[2,19]),n(Lo,[2,21]),{13:f,16:d,44:450,45:sT,55:323,65:445,66:446,67:447,68:448,87:h,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,307:43,308:p,346:tt,347:He,348:T,349:I,350:C,351:F},n(Pl,[2,8]),{31:[1,451]},{31:[2,258]},{31:[2,101]},n(D,[2,386],{31:[2,388]}),n(Nu,[2,102]),n(Ra,[2,391],{191:452}),n(D,[2,395],{196:453,198:454}),n(D,[2,108]),n(D,[2,109]),n(Nu,[2,103]),n(Nu,[2,104]),n(Nu,[2,390]),{13:f,16:d,44:215,45:ct,48:[1,455],55:220,82:q,87:h,89:ut,172:221,185:351,187:350,200:456,231:Or,234:349,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n(Hd,[2,424]),n(oT,[2,136]),n(oT,[2,137]),n(c0,[2,140]),{232:[1,457]},{13:f,16:d,44:39,55:40,87:h,139:342,195:458,197:Ia,307:43,308:p},n(Do,[2,219]),n(Do,[2,220]),n(Do,[2,221]),n(Do,[2,222]),n(Do,[2,223]),n(Pl,[2,10]),n(Fr,[2,46]),n(Fr,[2,314]),{112:q2,122:459},n(Fr,[2,62]),n(Q,G2,{133:242,108:460,112:W2,132:z2}),n(tT,[2,61]),n(Fr,[2,49]),n([6,28,126,128,193],[2,65]),{31:[2,66],112:[1,462],138:461},n(xa,[2,351],{146:463,335:[1,464]}),{29:H,57:465},n(Fo,[2,329]),n(Q,[2,332],{129:466,327:[1,467]}),n(Fo,[2,55]),n(Fo,[2,331]),{48:[1,468]},n(jd,[2,429]),{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,239:469,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Cl,[2,431]),{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,243:470,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Cl,[2,156]),{45:X2,89:J2,179:471},n(Rl,[2,441]),{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,251:472,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(br,[2,444],{256:473}),n(br,[2,446],{258:474}),n(Zt,[2,442]),n(Zt,[2,443]),n(br,[2,449]),{13:f,16:d,44:136,45:V,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,255:154,257:155,259:475,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Zt,[2,450]),n(Zt,[2,451]),n(Zt,[2,379],{178:476}),n(Zt,[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:V,46:482,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{48:[1,483]},{48:[1,484]},n(Jt,[2,187]),n(ln,[2,194]),{13:f,16:d,44:39,55:40,82:q,87:h,139:289,172:291,255:154,257:155,266:290,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,320:485},{13:f,16:d,39:[1,487],44:136,45:V,46:488,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,282:486,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(rT,[2,460]),{13:f,16:d,44:136,45:V,46:489,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Zt,[2,464]),{13:f,16:d,44:136,45:V,46:490,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Zt,[2,466]),n(re,[2,40]),n(Ud,[2,298]),n(ku,[2,87]),n(ku,[2,88]),n(ku,[2,89]),n(ku,[2,90]),{13:f,16:d,55:492,82:q,172:493,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,311:494,312:an,315:491},n(re,[2,41]),n(Vd,[2,300]),n(Mu,[2,303],{92:495}),{13:f,16:d,31:[1,496],55:414,82:q,171:497,172:415,173:416,174:qd,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:Gd},{31:[1,498],89:[1,499]},{29:[1,500]},n(Bd,[2,372]),{13:f,16:d,48:[2,422],55:194,197:wt,223:312,226:502,228:501,229:Z2,307:43,308:p},n(is,[2,131]),n(is,[2,126]),n(Lo,[2,22]),n(Lo,[2,290]),{82:[1,503]},{82:[1,504]},{13:f,16:d,44:510,45:V,55:323,67:321,68:322,74:505,75:506,76:aT,77:320,78:lT,79:509,87:h,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,307:43,308:p,346:tt,347:He,348:T,349:I,350:C,351:F},n(iT,[2,294]),n(cT,[2,69]),n(cT,[2,70]),n(Pt,Ve,{59:197,69:198,20:511,70:z}),n(X,Z,{58:205,62:206,23:512,63:Me}),{29:[2,375],31:[2,71],84:522,85:o,112:[1,518],150:513,151:514,158:515,159:[1,516],160:[1,517],161:[1,519],163:[1,520],164:[1,521],175:523},n(Ca,[2,363],{157:524,335:[1,525]}),n(l,i,{215:10,202:526,205:527,208:528,214:529,44:530,87:h}),n(Yd,[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:Wd,55:220,82:q,87:h,89:ut,172:221,185:351,203:536,212:534,231:zd,233:533,234:535,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n(l,i,{215:10,205:527,208:528,214:529,44:530,202:537,87:h}),n(X,[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:sT,87:h,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,276:Ze,277:Ne,279:Qe,280:je,283:Ke,285:et,308:p,346:tt,347:He,348:T,349:I,350:C,351:F}),n(Pa,[2,291]),n(Pa,[2,24]),n(Pa,[2,25]),{13:f,16:d,44:136,45:V,46:539,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Pa,[2,28]),n(X,Z,{58:205,62:206,23:540,63:Me}),n([31,112,232,318,335],[2,105],{192:541,193:[1,542]}),n(Ra,[2,107]),{13:f,16:d,44:215,45:ct,55:220,82:q,87:h,89:ut,172:221,185:351,187:350,199:543,200:544,231:Or,234:349,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n(uT,[2,132]),n(Hd,[2,425]),n(uT,[2,133]),{13:f,16:d,44:354,55:355,82:q,87:h,172:357,237:356,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:358,312:an,313:545},n(Fr,[2,54]),n(Fr,[2,48]),n(xa,[2,342]),{13:f,16:d,44:39,55:40,87:h,139:546,307:43,308:p},n(xa,[2,68]),n(D,[2,350],{31:fT,112:fT}),n(Fr,[2,53]),{13:f,16:d,55:547,307:43,308:p},n(Q,[2,333]),n(W,[2,16]),n(jd,[2,152]),n(Cl,[2,154]),n(Cl,[2,157]),n(Rl,[2,159]),n(Rl,[2,160],{262:389,261:548,39:o0,338:a0}),n(Rl,[2,161],{262:389,261:549,39:o0,338:a0}),n(br,[2,163]),{13:f,16:d,44:136,45:V,46:550,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Jt,[2,178]),n(Jt,[2,179]),{13:f,16:d,44:136,45:V,46:551,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:552,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:553,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{48:[1,554],272:[1,555]},n(Jt,[2,184]),n(Jt,[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:wt,223:562,307:43,308:p},n(u0,[2,224]),n(u0,[2,225]),n(u0,[2,226]),{31:[1,563],45:dT,94:564},n(re,[2,84]),n(Ud,[2,368]),n(re,[2,85]),n(Vd,[2,370]),n(Mu,[2,373],{170:566}),{48:[1,567]},{48:[2,423],337:[1,568]},n(Lo,[2,35],{83:[1,569]}),n(Lo,[2,36],{81:[1,570]}),n(i0,[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:V,76:aT,78:lT,87:h,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,276:Ze,277:Ne,279:Qe,280:je,283:Ke,285:et,308:p,346:tt,347:He,348:T,349:I,350:C,351:F}),n(Ol,[2,295]),{45:V,77:572},{45:V,77:573},n(Ol,[2,33]),n(Ol,[2,34]),{31:[2,275],50:574,84:575,85:o},{31:[2,277],51:576,84:577,85:o},n(Ca,[2,356]),n(hT,[2,357],{152:578,335:[1,579]}),n(Us,[2,74]),{29:H,57:580},{29:H,57:581},{13:f,16:d,44:39,55:40,87:h,139:582,307:43,308:p},n(pT,[2,365],{162:583,328:[1,584]}),{13:f,16:d,45:V,55:323,67:321,68:322,77:320,79:585,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,307:43,308:p,346:tt,347:He,348:T,349:I,350:C,351:F},{45:[1,586]},n(Us,[2,81]),{29:H,57:587},n(Ca,[2,73]),n(D,[2,362],{29:Vs,31:Vs,85:Vs,112:Vs,159:Vs,160:Vs,161:Vs,163:Vs,164:Vs}),n(Yd,[2,112]),n(Fl,[2,401],{206:588}),n(D,[2,405],{209:589,210:590}),n(D,[2,403]),n(D,[2,404]),n(Yd,[2,113]),n(Yd,[2,400]),{13:f,16:d,44:215,45:Wd,48:[1,591],55:220,82:q,87:h,89:ut,172:221,185:351,203:536,212:592,231:zd,234:535,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n(Hd,[2,426]),n(c0,[2,138]),n(c0,[2,139]),{232:[1,593]},n(Pa,[2,292]),{47:[1,595],48:[1,594]},n(Pl,[2,9]),n(Ra,[2,392]),n(Ra,[2,393],{44:39,55:40,307:43,195:341,139:342,194:596,190:597,13:f,16:d,87:h,197:Ia,308:p}),n(Ra,[2,110],{272:[1,598]}),n(Qd,[2,397],{201:599,316:600,317:[1,601]}),{314:[1,602]},{29:[1,603]},n(Fo,[2,58]),n(br,[2,445]),n(br,[2,447]),{48:[1,604],272:[1,605]},{48:[1,606]},{272:[1,607]},{272:[1,608]},n(Jt,[2,99]),n(Zt,[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(Jt,[2,188]),n(Jt,[2,189]),{48:[1,609]},{48:[2,468]},{289:[1,610]},{13:f,16:d,55:492,82:q,172:493,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,311:494,312:an,315:611},n(re,[2,42]),n(Mu,[2,304]),{13:f,16:d,55:414,82:q,95:612,171:613,172:415,173:416,174:qd,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:Gd},{31:[1,614],45:dT,94:615},n(is,[2,129]),n(nT,[2,421]),{82:[1,616]},{82:[1,617]},n(Ol,[2,296]),n(Ol,[2,31]),n(Ol,[2,32]),{31:[2,17]},{31:[2,276]},{31:[2,18]},{31:[2,278]},n(D,eT,{155:330,153:618,154:619,29:Bs,31:Bs,85:Bs,112:Bs,159:Bs,160:Bs,161:Bs,163:Bs,164:Bs}),n(hT,[2,358]),n(Us,[2,75]),n(Us,[2,76]),{29:H,57:620},{13:f,16:d,44:39,55:40,87:h,139:621,307:43,308:p},n(pT,[2,366]),n(Us,[2,79]),{13:f,16:d,44:136,45:V,46:622,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Us,[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(Fl,[2,117]),{13:f,16:d,44:215,45:Wd,55:220,82:q,87:h,89:ut,172:221,185:351,203:536,211:626,212:627,231:zd,234:535,236:216,237:222,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,309:xn,310:zn,311:217,312:an},n($s,[2,134]),n(Hd,[2,427]),n($s,[2,135]),n(Pa,[2,26]),{44:628,87:h},n(Ra,[2,106]),n(Ra,[2,394]),n(D,[2,396]),n(Qd,[2,111]),n(Qd,[2,398]),{13:f,16:d,44:39,55:40,87:h,139:342,186:629,190:340,195:341,197:Ia,307:43,308:p},n(s0,[2,217]),n(D,Md,{144:248,140:630,143:631,31:[2,343]}),n(Jt,[2,97]),n(Zt,[2,380]),n(Jt,[2,180]),{13:f,16:d,44:136,45:V,46:632,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},{13:f,16:d,44:136,45:V,46:633,55:133,67:132,68:134,77:131,82:q,87:h,172:135,224:nt,238:121,239:122,243:123,247:124,251:125,255:154,257:155,259:126,263:lt,264:130,265:Y,266:137,267:139,268:Le,269:qe,270:ce,271:Xe,273:Je,274:Ye,275:146,276:Ze,277:Ne,278:149,279:Qe,280:je,283:Ke,285:et,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:ot,346:tt,347:He,348:T,349:I,350:C,351:F},n(Jt,[2,190]),{290:[1,634]},{314:[1,635]},{13:f,16:d,48:[1,636],55:414,82:q,171:637,172:415,173:416,174:qd,255:154,257:155,291:150,294:ye,295:we,296:ve,297:_e,298:be,299:Se,300:me,301:Ee,302:Te,303:Ae,304:Ie,305:he,306:xe,307:43,308:p,312:Gd},n(mT,[2,305]),n(re,[2,86]),n(Mu,[2,374]),n(Lo,[2,37]),n(Lo,[2,38]),n(Ca,[2,72]),n(Ca,[2,360]),n(Us,[2,77]),{29:H,57:638},{47:[1,639]},{29:[2,376]},n(Fl,[2,402]),n(Fl,[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(Fl,[2,118],{272:[1,641]}),n(Kd,[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:Ae,304:Ie,305:he,306:xe},n(ku,[2,218]),n(Mu,[2,44]),n(mT,[2,306]),n(Us,[2,78]),{44:651,87:h},n(Fl,[2,116]),n(D,[2,406]),n(Kd,[2,119]),n(Kd,[2,408]),n(l,i,{215:10,205:527,208:528,214:529,44:530,202:652,87:h}),n(Pa,[2,27]),n(Qd,[2,230]),n(gT,[2,345],{141:653,335:[1,654]}),n(Jt,[2,181]),n(Jt,[2,182]),{48:[2,191]},{48:[1,655]},{318:[1,656]},n(D,Md,{144:248,142:657,143:658,31:yT,112:yT}),n(gT,[2,346]),n(Us,[2,80]),n(Kd,[2,231]),n(xa,[2,67]),n(xa,[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:a(function(R,O){if(O.recoverable)this.trace(R);else{var k=new Error(R);throw k.hash=O,k}},"parseError"),parse:a(function(R){var O=this,k=[0],ue=[],$e=[null],_=[],un=this.table,b="",as=0,Vu=0,eh=0,th=2,Bu=1,rh=_.slice.call(arguments,1),qt=Object.create(this.lexer),ls={yy:{}};for(var qu in this.yy)Object.prototype.hasOwnProperty.call(this.yy,qu)&&(ls.yy[qu]=this.yy[qu]);qt.setInput(R,ls.yy),ls.yy.lexer=qt,ls.yy.parser=this,typeof qt.yylloc>"u"&&(qt.yylloc={});var Ml=qt.yylloc;_.push(Ml);var vt=qt.options&&qt.options.ranges;typeof ls.yy.parseError=="function"?this.parseError=ls.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function $t(cs){k.length=k.length-2*cs,$e.length=$e.length-cs,_.length=_.length-cs}a($t,"popStack");for(var ft=a(function(){var cs;return cs=qt.lex()||Bu,typeof cs!="number"&&(cs=O.symbols_[cs]||cs),cs},"lex"),pt,Cn,La,ii,wte,E0,jl={},nh,Ws,RT,ih;;){if(La=k[k.length-1],this.defaultActions[La]?ii=this.defaultActions[La]:((pt===null||typeof pt>"u")&&(pt=ft()),ii=un[La]&&un[La][pt]),typeof ii>"u"||!ii.length||!ii[0]){var T0="";ih=[];for(nh in un[La])this.terminals_[nh]&&nh>th&&ih.push("'"+this.terminals_[nh]+"'");qt.showPosition?T0="Parse error on line "+(as+1)+`:
|
|
34
34
|
`+qt.showPosition()+`
|
|
35
35
|
Expecting `+ih.join(", ")+", got '"+(this.terminals_[pt]||pt)+"'":T0="Parse error on line "+(as+1)+": Unexpected "+(pt==Bu?"end of input":"'"+(this.terminals_[pt]||pt)+"'"),this.parseError(T0,{text:qt.match,token:this.terminals_[pt]||pt,line:qt.yylineno,loc:Ml,expected:ih})}if(ii[0]instanceof Array&&ii.length>1)throw new Error("Parse Error: multiple actions possible at state: "+La+", token: "+pt);switch(ii[0]){case 1:k.push(pt),$e.push(qt.yytext),_.push(qt.yylloc),k.push(ii[1]),pt=null,Cn?(pt=Cn,Cn=null):(Vu=qt.yyleng,b=qt.yytext,as=qt.yylineno,Ml=qt.yylloc,eh>0&&eh--);break;case 2:if(Ws=this.productions_[ii[1]][1],jl.$=$e[$e.length-Ws],jl._$={first_line:_[_.length-(Ws||1)].first_line,last_line:_[_.length-1].last_line,first_column:_[_.length-(Ws||1)].first_column,last_column:_[_.length-1].last_column},vt&&(jl._$.range=[_[_.length-(Ws||1)].range[0],_[_.length-1].range[1]]),E0=this.performAction.apply(jl,[b,Vu,as,ls.yy,ii[1],$e,_].concat(rh)),typeof E0<"u")return E0;Ws&&(k=k.slice(0,-1*Ws*2),$e=$e.slice(0,-1*Ws),_=_.slice(0,-1*Ws)),k.push(this.productions_[ii[1]][0]),$e.push(jl.$),_.push(jl._$),RT=un[k[k.length-2]][k[k.length-1]],k.push(RT);break;case 3:return!0}}return!0},"parse")},Xd=gb().Wildcard,Jd="http://www.w3.org/1999/02/22-rdf-syntax-ns#",ik=Jd+"type",sk=Jd+"first",ok=Jd+"rest",_T=Jd+"nil",Zd="http://www.w3.org/2001/XMLSchema#",bT=Zd+"integer",ST=Zd+"decimal",wT=Zd+"double",ak=Zd+"boolean",Oa="",vT="",ET="";function cn(P){return P.toLowerCase()}a(cn,"lowercase");function qs(P,R){return P.push(R),P}a(qs,"appendTo");function Fa(P,R){return P.push.apply(P,R),P}a(Fa,"appendAllTo");function Ht(P){P||(P={});for(var R=1,O=arguments.length,k;R<O&&(k=arguments[R]||{});R++)for(var ue in k)P[ue]=k[ue];return P}a(Ht,"extend");function ss(){for(var P=[],R=0,O=arguments.length;R<O;R++)P=P.concat.apply(P,arguments[R]);return P}a(ss,"unionAll");function ju(P){if(P[0]==="<"&&(P=P.substring(1,P.length-1)),/^[a-z][a-z0-9.+-]*:/i.test(P))return P;if(!Ge.base)throw new Error("Cannot resolve relative IRI "+P+" because no base IRI was set.");switch(Oa!==Ge.base&&(Oa=Ge.base,vT=Oa.replace(/[^\/:]*$/,""),ET=Oa.match(/^(?:[a-z]+:\/*)?[^\/]*/)[0]),P[0]){case void 0:return Oa;case"#":return Oa+P;case"?":return Oa.replace(/(?:\?.*)?$/,P);case"/":return ET+P;default:return vT+P}}a(ju,"resolveIRI");function d0(P){if(P){var R=P[0];if(R==="?"||R==="$")return Ge.factory.variable(P.substr(1))}return P}a(d0,"toVar");function Dr(P,R){return{type:"operation",operator:P,args:R||[]}}a(Dr,"operation");function Dl(P,R){var O={expression:P==="*"?new Xd:P};if(R)for(var k in R)O[k]=R[k];return O}a(Dl,"expression");function Ll(P,R){return{type:"path",pathType:P,items:R}}a(Ll,"path");function h0(P,R){for(var O=0,k=R.length,ue;O<k&&(ue=R[O]);O++)P=Dr(ue[0],[P,ue[1]]);return P}a(h0,"createOperationTree");function Da(P,R){var O=[],k=[],ue=P.length,$e,_={};if(!ue)return null;for(var un=0;un<ue&&($e=P[un]);un++)($e.named?k:O).push($e.iri);return _[R||"from"]={default:O,named:k},_}a(Da,"groupDatasets");function Nl(P){return parseInt(P,10)}a(Nl,"toInt");function p0(P){return P.type==="group"&&P.patterns.length===1?P.patterns[0]:P}a(p0,"degroupSingle");function os(P,R){return R&&R.termType!=="NamedNode"&&(R=Ge.factory.namedNode(R)),Ge.factory.literal(P,R)}a(os,"createTypedLiteral");function lk(P,R){return Ge.factory.literal(P,R)}a(lk,"createLangLiteral");function m0(P,R,O){if(!("termType"in R))throw new Error("Nested triples cannot contain paths");return Ge.factory.quad(P,R,O)}a(m0,"nestedTriple");function Gs(P,R,O,k){var ue={};return P!=null&&(ue.subject=P),R!=null&&(ue.predicate=R),O!=null&&(ue.object=O),k!=null&&(ue.annotations=k),ue}a(Gs,"triple");function $u(P){return typeof P=="string"?P.startsWith("e_")?Ge.factory.blankNode(P):Ge.factory.blankNode("e_"+P):Ge.factory.blankNode("g_"+TT++)}a($u,"blank");var TT=0;Ge._resetBlanks=function(){TT=0};var ck=/\\u([a-fA-F0-9]{4})|\\U([a-fA-F0-9]{8})|\\(.)/g,uk={"\\":"\\","'":"'",'"':'"',t:" ",b:"\b",n:`
|
|
36
36
|
`,r:"\r",f:"\f"},fk=/[\uD800-\uDBFF]([^\uDC00-\uDFFF]|$)/,g0=String.fromCharCode;function AT(P,R){P=P.substring(R,P.length-R);try{P=P.replace(ck,function(O,k,ue,$e){var _;if(k){if(_=parseInt(k,16),isNaN(_))throw new Error;return g0(_)}else if(ue){if(_=parseInt(ue,16),isNaN(_))throw new Error;return _<65535?g0(_):g0(55296+((_-=65536)>>10),56320+(_&1023))}else{var un=uk[$e];if(!un)throw new Error;return un}})}catch{return""}if(fk.exec(P))throw new Error("Invalid unicode codepoint of surrogate pair without corresponding codepoint in "+P);return P}a(AT,"unescapeString");function dk(P){var R=$u(),O=R,k=[],ue,$e=[];P.forEach(function(as){k.push(as.entity),Fa($e,as.triples)});for(var _=0,un=0,b=k.length,ue=Array(b*2);_<b;)ue[un++]=Gs(O,Ge.factory.namedNode(sk),k[_]),ue[un++]=Gs(O,Ge.factory.namedNode(ok),O=++_<b?$u():Ge.factory.namedNode(_T));return{entity:R,triples:Fa(ue,$e)}}a(dk,"createList");function hk(P){var R=$u();return{entity:R,triples:P.map(function(O){return Ht(Gs(R),O)})}}a(hk,"createAnonymousObject");function y0(P,R,O){var k=[],ue=[];return R.forEach(function($e){let _=null;$e.annotation&&(_=$e.annotation,$e=$e.object),k.push(Gs(null,P,$e.entity,_)),Fa(ue,$e.triples)}),ss(k,O||[],ue)}a(y0,"objectListToTriples");function bte(P){for(var R=[],O,k=0,ue;ue=P[k];k++)switch(ue.type){case"bgp":ue.triples.length&&(O?Fa(O.triples,ue.triples):qs(R,O=ue));break;default:(!ue.patterns||ue.patterns.length>0)&&(qs(R,ue),O=null)}return R}a(bte,"mergeAdjacentBGPs");function kl(P){return P.variable?P.variable.value:P.value||P.expression.value}a(kl,"getExpressionId");function _0(P){if(!P)return[];if(P.type==="aggregate")return[P];if(P.type==="operation"){let R=[];for(let O of P.args)R.push(..._0(O));return R}return[]}a(_0,"getAggregatesOfExpression");function pk(P){let R=new Set,O=a(function(k){k&&(k.termType==="Variable"?R.add(k):k.type==="operation"&&k.args.forEach(O))},"visitExpression");return O(P),R}a(pk,"getVariablesFromExpression");function b0(P,R=1,O=[]){for(let k of P)R>0&&k instanceof Array?b0(k,R-1,O):O.push(k);return O}a(b0,"flatten");function S0(P){return P.termType==="Variable"}a(S0,"isVariable");function IT(P){if(P.triples){let R=[];for(let O of P.triples)S0(O.subject)&&R.push(O.subject.value),S0(O.predicate)&&R.push(O.predicate.value),S0(O.object)&&R.push(O.object.value);return R}else if(P.patterns){let R=[];for(let O of P.patterns)R.push(...IT(O));return R}return[]}a(IT,"getBoundVarsFromGroupGraphPattern");function mk(P){let R=P.slice().sort(),O=[];for(let k=0;k<R.length-1;k++)R[k+1]==R[k]&&O.push(R[k]);return O}a(mk,"getDuplicatesInArray");function Uu(P){if(!Ge.sparqlStar)throw new Error("SPARQL-star support is not enabled");return P}a(Uu,"ensureSparqlStar");function xT(P,R,O){for(let k of R){let ue=Gs("subject"in k?k.subject:P,k.predicate,k.object);O.push(ue),k.annotations&&xT(m0(P,k.predicate,k.object),k.annotations,O)}}a(xT,"_applyAnnotations");function w0(P){if(Ge.sparqlStar){let R=[];return P.forEach(O=>{let k=Gs(O.subject,O.predicate,O.object);R.push(k),O.annotations&&xT(m0(O.subject,O.predicate,O.object),O.annotations,R)}),R}return P}a(w0,"applyAnnotations");function Ste(P){if(!Ge.sparqlStarNestedQuads)throw new Error("Lenient SPARQL-star support with nested quads is not enabled");return P}a(Ste,"ensureSparqlStarNestedQuads");function CT(P){for(let R of P){if(R.type==="graph"&&R.name.termType==="Variable")throw new Error("Detected illegal variable in GRAPH");if(R.type==="bgp"||R.type==="graph"){for(let O of R.triples)if(O.subject.termType==="Variable"||O.predicate.termType==="Variable"||O.object.termType==="Variable")throw new Error("Detected illegal variable in BGP")}}return P}a(CT,"ensureNoVariables");function v0(P){for(let R of P)if(R.type==="bgp"){for(let O of R.triples)if(O.subject.termType==="BlankNode"||O.predicate.termType==="BlankNode"||O.object.termType==="BlankNode")throw new Error("Detected illegal blank node in BGP")}return P}a(v0,"ensureNoBnodes");var gk=(function(){var P={EOF:1,parseError:a(function(O,k){if(this.yy.parser)this.yy.parser.parseError(O,k);else throw new Error(O)},"parseError"),setInput:a(function(R,O){return this.yy=O||this.yy||{},this._input=R,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:a(function(){var R=this._input[0];this.yytext+=R,this.yyleng++,this.offset++,this.match+=R,this.matched+=R;var O=R.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),R},"input"),unput:a(function(R){var O=R.length,k=R.split(/(?:\r\n?|\n)/g);this._input=R+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-O),this.offset-=O;var ue=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),k.length-1&&(this.yylineno-=k.length-1);var $e=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:k?(k.length===ue.length?this.yylloc.first_column:0)+ue[ue.length-k.length].length-k[0].length:this.yylloc.first_column-O},this.options.ranges&&(this.yylloc.range=[$e[0],$e[0]+this.yyleng-O]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(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 vc(`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 vc(`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 o=e.variables[0],l=e.bindings.map(c=>{let u=c[o];return u?this.generateValuesTerm(u):"UNDEF"}).join(" ");return`${r}VALUES ?${o} { ${l} }`}let i=e.variables.map(o=>`?${o}`).join(" "),s=e.bindings.map(o=>`(${e.variables.map(c=>{let u=o[c];return u?this.generateValuesTerm(u):"UNDEF"}).join(" ")})`);return`${r}VALUES (${i}) {
|
|
68
68
|
${s.map(o=>`${r} ${o}`).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 vc(`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}}};Ec.SPARQLGenerator=R1});var Ac=S(kn=>{"use strict";var y6=kn&&kn.__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:a(function(){return e[t]},"get")}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),_6=kn&&kn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),_x=kn&&kn.__importStar||(function(){var n=a(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"&&y6(t,e,r[i]);return _6(t,e),t}})();Object.defineProperty(kn,"__esModule",{value:!0});kn.QueryExecutor=kn.ExoQLQueryExecutor=kn.QueryExecutorError=void 0;var b6=Qb(),S6=Wp(),w6=p1(),v6=g1(),E6=ax(),T6=cx(),A6=dx(),I6=I1(),x6=px(),C6=gx(),R6=yx(),P6=Ce(),O6=Ue(),F6=jp(),$r="http://www.w3.org/2001/XMLSchema#",D6=new Set([`${$r}integer`,`${$r}decimal`,`${$r}float`,`${$r}double`,`${$r}nonPositiveInteger`,`${$r}negativeInteger`,`${$r}long`,`${$r}int`,`${$r}short`,`${$r}byte`,`${$r}nonNegativeInteger`,`${$r}unsignedLong`,`${$r}unsignedInt`,`${$r}unsignedShort`,`${$r}unsignedByte`,`${$r}positiveInteger`]),Tc=class extends Error{static{a(this,"QueryExecutorError")}constructor(e,t){super(e,t?{cause:t}:void 0),this.name="QueryExecutorError"}};kn.QueryExecutorError=Tc;var em=class{static{a(this,"ExoQLQueryExecutor")}constructor(e,t={}){this.tripleStore=e,this.bgpExecutor=new b6.BGPExecutor(e),this.filterExecutor=new S6.FilterExecutor,this.optionalExecutor=new w6.OptionalExecutor,this.unionExecutor=new v6.UnionExecutor,this.minusExecutor=new E6.MinusExecutor,this.valuesExecutor=new T6.ValuesExecutor,this.aggregateExecutor=new A6.AggregateExecutor,this.constructExecutor=new I6.ConstructExecutor,this.serviceExecutor=new x6.ServiceExecutor(t.serviceConfig),this.graphExecutor=new C6.GraphExecutor(e),this.sparqlGenerator=new R6.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 Tc(`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 o of this.execute(e.left))t.push(o);if(t.length===0)return;let r=new Set;for(let o of t)for(let l of o.variables())r.add(l);let i=this.collectOperationVariables(e.right);if([...r].some(o=>i.has(o)))for(let o of t){let l=this.substituteVariables(e.right,o);for await(let c of this.execute(l)){let u=o.merge(c);u!==null&&(yield u)}}else{let o=[];for await(let l of this.execute(e.right))o.push(l);for(let l of t)for(let c of o){let u=l.merge(c);u!==null&&(yield u)}}}async*executeLeftJoin(e){let t=[];for await(let o of this.execute(e.left))t.push(o);let r=[];for await(let o of this.execute(e.right))r.push(o);async function*i(){for(let o of t)yield o}a(i,"leftGen");async function*s(){for(let o of r)yield o}a(s,"rightGen"),yield*this.optionalExecutor.execute(i(),s())}async*executeUnion(e){let t=[];for await(let o of this.execute(e.left))t.push(o);let r=[];for await(let o of this.execute(e.right))r.push(o);async function*i(){for(let o of t)yield o}a(i,"leftGen");async function*s(){for(let o of r)yield o}a(s,"rightGen"),yield*this.unionExecutor.execute(i(),s())}async*executeMinus(e){let t=[];for await(let o of this.execute(e.left))t.push(o);let r=[];for await(let o of this.execute(e.right))r.push(o);async function*i(){for(let o of t)yield o}a(i,"leftGen");async function*s(){for(let o of r)yield o}a(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(()=>_x(ps())),r=new Set(e.variables);for await(let i of this.execute(e.input)){let s=new t;for(let o of i.variables())if(r.has(o)){let l=i.get(o);l!==void 0&&s.set(o,l)}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 o=this.getExpressionValue(s.expression,r),l=this.getExpressionValue(s.expression,i),c=0;if(o===void 0&&l===void 0?c=0:o===void 0?c=1:l===void 0?c=-1:typeof o=="number"&&typeof l=="number"?c=o-l:c=String(o).localeCompare(String(l)),s.descending&&(c=-c),c!==0)return c}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(o=>this.filterExecutor.evaluateExpression(o,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 o=r.merge(s);o!==null&&(yield o)}}}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 P6.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(()=>_x(ps()));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 O6.Literal){let i=r.datatype?.value;if(i===`${$r}dayTimeDuration`)try{return F6.DateTimeFunctions.parseDayTimeDuration(r.value)}catch{return r.value}if(i&&D6.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 Tc("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 Tc("executeAsk requires an ASK operation");for await(let t of this.execute(e.where))return!0;return!1}};kn.ExoQLQueryExecutor=em;kn.QueryExecutor=em});var Ix=S(ro=>{"use strict";var L6=ro&&ro.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var l=n.length-1;l>=0;l--)(o=n[l])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},N6=ro&&ro.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},P1;Object.defineProperty(ro,"__esModule",{value:!0});ro.CommandResolver=void 0;var k6=Fe(),M6=zl(),nr=Ce(),Yt=Ue(),L=tr(),bx=No(),Sx=hh(),Ic=z0(),tm=hI(),j6=rc(),$6=ic(),U6=Ac(),rm=10,wx="08cec529-90eb-4d43-88de-ceecccea12b0",V6=L.Namespace.EXOCMD.term("SubstitutionToken").value,vx=new Set(["today","todayStart","targetFolder","target","randomUUIDv4","nowTimestamp","nowDate","nowYear","nowMonth","userInputLabel","userInput","targetProperty","labelAsArray","groundingTargetClass"]);function B6(n,e){return`__SUBSTITUTE__${n}__${e}__`}a(B6,"buildSubstitutionMarker");function q6(n,e,t){let r=Buffer.from(t,"utf-8").toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");return`__SUBSTITUTE_P__${n}__${e}__${r}__`}a(q6,"buildParameterisedMarker");var Ex="3f28af98-c031-4718-8ba2-44ad0b012c52",G6=L.Namespace.EXOCMD.term("TokenInvocation").value,Tx="29e2c8f8-2d27-4e58-b467-2e85d46f8122",Ax="universal-default-template",W6=new Set(["today","todayStart","nowTimestamp","nowDate","nowYear","nowMonth"]),O1=P1=class{static{a(this,"CommandResolver")}clearUniversalCache(){this._universalCacheReady=!1,this._universalCacheValue=null,(0,tm.clearUniversalDefault)()}constructor(e,t=M6.NullLogger){this.tripleStore=e,this.logger=t,this.cache=new Map,this.multiCache=new Map,this._ancestorCache=new Map,this._legacyPropertyDefaultsWarnedGroundings=new Set,this._universalCacheReady=!1,this._universalCacheValue=null}async resolveForAssetMulti(e,t,r){if(t.length===0)return[];let i=[...t].sort().join(","),s=`${e}::${i}::${r??""}`,o=this.multiCache.get(s);if(o)return o;let l=new Set,c=[];for(let u of t){let f=await this.resolveForAsset(e,u,r);for(let d of f)l.has(d.binding.id)||(l.add(d.binding.id),c.push(d))}return c.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,c),c}async resolveForAsset(e,t,r){let i=`${e}:${t}:${r??""}`,s=this.cache.get(i);if(s)return s;let o=await this.findBindings(t,r,e),l=[];for(let c of o){let u=await this.loadCommand(c.commandRef,{targetClass:c.targetClass});if(!u)continue;let f=c.precondition?{...u,precondition:c.precondition}:u;l.push({command:f,binding:c})}return l.sort((c,u)=>{let f=this.getBindingPriority(c.binding),d=this.getBindingPriority(u.binding);return f!==d?f-d:(c.binding.order??100)-(u.binding.order??100)}),this.cache.set(i,l),l}async loadCommand(e,t){let r=await this.findSubjectByUID(e);if(!r||(await this.tripleStore.match(r,L.Namespace.RDF.term("type"),L.Namespace.EXOCMD.term("Command"))).length===0)return null;let s=await this.getLiteralValue(r,L.Namespace.EXO.term("Asset_label"))??"Unknown Command",o=await this.getLiteralValue(r,L.Namespace.EXOCMD.term("Command_labelTemplate")),l=await this.getLiteralValue(r,L.Namespace.EXOCMD.term("Command_icon")),c=await this.getLiteralValue(r,L.Namespace.EXOCMD.term("Command_confirmMessage")),u=await this.getLiteralValue(r,L.Namespace.EXOCMD.term("Command_successMessage")),f=await this.getLiteralValue(r,L.Namespace.EXOCMD.term("Command_category")),d=await this.getLiteralValue(r,L.Namespace.EXOCMD.term("Command_openInSameTab")),h=d!==null&&String(d).trim().toLowerCase()==="true",p=await this.loadLinkedPrecondition(r),g=await this.loadLinkedGrounding(r,0,t);return g?{id:e,name:s,labelTemplate:o??void 0,icon:l??void 0,precondition:p??void 0,grounding:g,confirmMessage:c??void 0,successMessage:u??void 0,category:f??void 0,openInSameTab:h||void 0}:null}async findBindings(e,t,r){let i=await this.tripleStore.match(void 0,L.Namespace.RDF.term("type"),L.Namespace.EXOCMD.term("CommandBinding")),s=[];for(let o of i){let l=o.subject,c=await this.loadBindingDefinition(l);c&&this.bindingMatches(c,e,t,r)&&s.push(c)}return s}async findPaletteEnabledCommands(){let e=await this.tripleStore.match(void 0,L.Namespace.RDF.term("type"),L.Namespace.EXOCMD.term("Command")),t=[],r=new Set;for(let i of e){let s=i.subject;if((await this.getLiteralValue(s,L.Namespace.EXOCMD.term("Command_paletteEnabled")))?.toLowerCase()!=="true")continue;let l=await this.getLiteralValue(s,L.Namespace.EXO.term("Asset_uid"));if(!l){this.logger.warn(`[CommandResolver] paletteEnabled command at ${s.value} has no exo__Asset_uid \u2014 skipped`);continue}let c=await this.loadCommand(l);if(!c){this.logger.warn(`[CommandResolver] paletteEnabled command ${l} could not be loaded (missing grounding?) \u2014 skipped`);continue}let u=await this.getLiteralValue(s,L.Namespace.EXOCMD.term("Command_paletteId")),f=await this.getLiteralValue(s,L.Namespace.EXOCMD.term("Command_cliName")),d=u??f??l;if(r.has(d)){this.logger.warn(`[CommandResolver] duplicate paletteId "${d}" \u2014 first registration wins, dropping ${l}`);continue}r.add(d),t.push({command:c,paletteId:d})}return t}invalidateCache(){this.cache.clear(),this.multiCache.clear(),this._ancestorCache.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:o}of i){let l=await this.evaluateSelectSnippet(o,t);r=r.replace(s,l)}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 o=e.slice(r,s),l=e.slice(r+1,s-1);t.push({full:o,body:l})}r=s}else r++;return t}async evaluateSelectSnippet(e,t){try{let r=e.replace(/\$target/g,`<${t}>`),s=new j6.ExoQLParser().parse(r),l=new $6.ExoQLAlgebraTranslator().translate(s),u=await new U6.ExoQLQueryExecutor(this.tripleStore).executeAll(l);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 Yt.Literal||h instanceof nr.IRI?h.value:String(h):""}catch{return""}}async loadBindingDefinition(e){let t=await this.getLiteralValue(e,L.Namespace.EXO.term("Asset_uid"));if(!t)return null;let r=await this.getLiteralValue(e,L.Namespace.EXO.term("Asset_label"))??"",i=await this.getLinkedUID(e,L.Namespace.EXOCMD.term("CommandBinding_command"));if(!i)return null;let s=await this.getLinkedValue(e,L.Namespace.EXOCMD.term("CommandBinding_targetClass")),o=await this.getLinkedValue(e,L.Namespace.EXOCMD.term("CommandBinding_targetPrototype")),l=await this.getLinkedValue(e,L.Namespace.EXOCMD.term("CommandBinding_targetAsset"));if(!s&&!o&&!l)return null;let c=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBinding_position")),u=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBinding_order")),f=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBinding_variant")),d=f!==null?this.coerceVariant(f,t):void 0,h=await this.loadLinkedPreconditionFromProperty(e,L.Namespace.EXOCMD.term("CommandBinding_precondition")),p=await this.loadLinkedStyle(e,t);return{id:t,label:r,commandRef:i,targetClass:s??void 0,targetPrototype:o??void 0,targetAsset:l??void 0,position:c??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,L.Namespace.EXOCMD.term("CommandBinding_style"),void 0);if(r.length>0){let s=r[0].object,o=null;if(s instanceof nr.IRI)o=s;else if(s instanceof Yt.Literal){let l=this.normalizeWikilink(s.value);o=await this.findSubjectByUID(l)}if(o){let l=await this.loadStyleAsset(o);if(l)return l}this.logger.warn(this.capWarning(`CommandBinding ${t}: style reference unresolved, falling back to inline variant`))}let i=await this.getLiteralValue(e,L.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,L.Namespace.EXO.term("Asset_uid"));if(!t)return null;let r=await this.getLiteralValue(e,L.Namespace.EXO.term("Asset_label"))??"",i=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_variant")),s=i!==null?this.coerceVariant(i,t):void 0,o=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_showIcon")),l=this.coerceBoolean(o),c=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_labelClass")),u=c!==null?this.coerceLabelClass(c,t):void 0,f=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_ariaLabel")),d=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_tooltip")),h=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_keyboardShortcut")),p=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_source")),g=p!==null?this.coerceStyleSource(p,t):void 0;return{id:t,label:r,variant:s,showIcon:l,labelClass:u,ariaLabel:f??void 0,tooltip:d??void 0,keyboardShortcut:h??void 0,source:g,inline:!1}}coerceVariant(e,t){if(e==null)return;let r=String(e).trim().toLowerCase();if(r!==""){if(Ic.COMMAND_VARIANT_VALUES.includes(r))return r;this.logger.warn(this.capWarning(`CommandBindingStyle variant "${r}" not in whitelist [${Ic.COMMAND_VARIANT_VALUES.join(",")}]; dropped (asset ${t})`))}}coerceLabelClass(e,t){if(e==null)return;let r=String(e).trim().toLowerCase();if(r!==""){if(Ic.LABEL_CLASS_VALUES.includes(r))return r;this.logger.warn(this.capWarning(`CommandBindingStyle labelClass "${r}" not in whitelist [${Ic.LABEL_CLASS_VALUES.join(",")}]; dropped (asset ${t})`))}}coerceStyleSource(e,t){if(e==null)return;let r=String(e).trim().toLowerCase();if(r!==""){if(Ic.STYLE_SOURCE_VALUES.includes(r))return r;this.logger.warn(this.capWarning(`CommandBindingStyle source "${r}" not in whitelist [${Ic.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 o=this.extractPathBasename(r);if(o&&o===i)return!0;let l=this.extractAlias(t);if(l&&r===l)return!0;let c=this.extractAlias(e);return!!(c&&c===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,L.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 nr.IRI)s=i;else if(i instanceof Yt.Literal){let h=this.normalizeWikilink(i.value);s=await this.findSubjectByUID(h)}if(!s)return null;let o=await this.getLiteralValue(s,L.Namespace.EXO.term("Asset_uid")),l=await this.getLiteralValue(s,L.Namespace.EXO.term("Asset_label"))??"",c=await this.getLiteralValue(s,L.Namespace.EXOCMD.term("Precondition_sparqlAsk")),u=await this.getLiteralValue(s,L.Namespace.EXOCMD.term("Precondition_hostFunction")),f=await this.tripleStore.match(s,L.Namespace.EXOCMD.term("Precondition_query"),void 0),d;if(f.length>0){let h=f[0].object;if(h instanceof nr.IRI){let p=await this.getLiteralValue(h,L.Namespace.EXO.term("Asset_uid"));p&&(d=p)}else h instanceof Yt.Literal&&(d=this.normalizeWikilink(h.value))}return!o||!c&&!u&&!d?null:{id:o,label:l,...c&&{sparqlAsk:c},...u&&{hostFunction:u},...d&&{query:d}}}async loadLinkedGrounding(e,t,r){if(t>=rm)return null;let i=await this.tripleStore.match(e,L.Namespace.EXOCMD.term("Command_grounding"),void 0);if(i.length===0)return null;if(i.length===1||!r?.targetClass){let o=await this.resolveGroundingRef(i[0].object);return o?this.loadGroundingDefinition(o,t):null}for(let o of i){let l=await this.resolveGroundingRef(o.object);if(!l)continue;let c=await this.getObsidianName(l,L.Namespace.EXOCMD.term("Grounding_targetPrototype"));if(c&&this.matchesReference(c,r.targetClass))return this.loadGroundingDefinition(l,t)}this.logger.warn(`Command ${e.value}: ${i.length} groundings declared, none matched context.targetClass='${r.targetClass}' via Grounding_targetPrototype \u2014 falling back to first grounding by iteration order (legacy behaviour). Check that one grounding's Grounding_targetPrototype references this targetClass.`);let s=await this.resolveGroundingRef(i[0].object);return s?this.loadGroundingDefinition(s,t):null}async resolveGroundingRef(e){if(e instanceof nr.IRI)return e;if(e instanceof Yt.Literal){let t=this.normalizeWikilink(e.value);return await this.findSubjectByUID(t)}return null}async loadGroundingByUid(e){let t=await this.findSubjectByUID(e);return t?this.loadGroundingDefinition(t,0):null}async loadGroundingDefinition(e,t){if(t>=rm)return null;let r=await this.getLiteralValue(e,L.Namespace.EXO.term("Asset_uid"));if(!r)return null;let i=await this.getLiteralValue(e,L.Namespace.EXO.term("Asset_label"))??"",s=await this.resolveGroundingTypeReference(e);if(!s)return null;let o=await this.getObsidianName(e,L.Namespace.EXOCMD.term("Grounding_targetProperty"));if(o&&this.looksLikeUUID(o)){let V=await this.resolveLabelByUID(o);if(!V)return this.logger.warn(`Grounding ${r}: targetProperty wikilink UID '${o}' is not resolvable to exo__Asset_label \u2014 grounding skipped (would otherwise write a UUID-named frontmatter key).`),null;o=V}if(s===bx.GroundingType.SERVICE_CALL){let V=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_serviceId"));V&&(o=V)}let l=await this.getObsidianName(e,L.Namespace.EXOCMD.term("Grounding_targetValueRef")),c=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_targetValueLiteral")),u=await this.getObsidianName(e,L.Namespace.EXOCMD.term("Grounding_targetValueSubstitution")),f=null;if(u&&this.looksLikeUUID(u)){let V=await this.resolveLabelByUID(u);if(!V)return this.logger.warn(`Grounding ${r}: targetValueSubstitution UID '${u}' is not resolvable to exo__Asset_label (SubstitutionToken instance missing or unlabelled) \u2014 grounding skipped.`),null;f=V}else u&&(f=u);let d=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_serviceCallPayload")),h=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_appendExpression")),p=await this.getObsidianWikilinkValue(e,L.Namespace.EXOCMD.term("Grounding_isDefinedBy")),g=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_sparqlUpdate")),y=await this.getObsidianName(e,L.Namespace.EXOCMD.term("Grounding_targetClass"));if(y&&!this.looksLikeUUID(y)){let V=await this.findUidByLabel(y);V&&(y=V)}let v=await this.getObsidianName(e,L.Namespace.EXOCMD.term("Grounding_targetPrototype")),w=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_targetFolder")),E=await this.getObsidianName(e,L.Namespace.EXOCMD.term("Grounding_linkBackProperty")),A=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_inputSchema")),x=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_incrementBy")),D=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_shiftDelta")),J;if(x!=null&&x!==""){let V=Number.parseInt(String(x),10);Number.isFinite(V)&&(J=V)}let ae=await this.resolvePropertyDefaults(e,r),ge=await this.resolveInheritanceRules(e,r),N=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_propertyDefaults"));N!==null&&N!==""&&!this._legacyPropertyDefaultsWarnedGroundings.has(r)&&(this.logger.warn(`Grounding ${r}: deprecated exocmd__Grounding_propertyDefaults (plural) JSON predicate detected \u2014 the parser was removed in RFC v2 Phase 5 (#3167); value is ignored. Migrate to ref-form exocmd__Grounding_propertyDefault (singular) pointing to exocmd__PropertyDefault assets. See vault TBox c8f87363-d39c-45cb-9d4d-1be96d70f892 for the canonical replacement.`),this._legacyPropertyDefaultsWarnedGroundings.add(r));let Q;s===bx.GroundingType.COMPOSITE&&(Q=await this.loadCompositeSteps(e,t+1));let oe;if(A)try{let V=JSON.parse(A);V?.properties&&(oe=Object.entries(V.properties).map(([q,rt])=>{let lt=rt.type,Y=lt==="string"?"text":lt,Le=rt.defaultValue!==void 0?rt.defaultValue:rt.default,qe={name:q,type:Y,label:rt.title??q,required:Array.isArray(V.required)&&V.required.includes(q)};return Le!=null&&(qe.defaultValue=String(Le)),qe}))}catch{}let B=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_prefillLabelWithDate")),K=B!==null&&String(B).trim().toLowerCase()==="true",ne=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_labelTemplate")),G=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_direction")),ie;if(G!=null){let V=String(G).trim().toLowerCase();V==="forward"||V==="rollback"?ie=V:V!==""&&this.logger.warn(`Grounding ${r}: exocmd__Grounding_direction value '${G}' is not 'forward' or 'rollback' \u2014 treating as undefined (will default to 'forward' at dispatch).`)}let W={id:r,label:i,type:s,targetProperty:o??void 0,targetValueRef:l??void 0,targetValueLiteral:c??void 0,targetValueSubstitution:f??void 0,serviceCallPayload:d??void 0,appendExpression:h??void 0,sparqlUpdate:g??void 0,steps:Q,targetClass:y??void 0,targetPrototype:v??void 0,targetFolder:w??void 0,linkBackProperty:E??void 0,incrementBy:J,shiftDelta:D??void 0,propertyDefault:ae.length>0?ae:void 0,inheritanceRule:ge.length>0?ge:void 0,isDefinedBy:p??void 0,prefillLabelWithDate:K||void 0,labelTemplate:ne??void 0,direction:ie};return oe&&(W.inputSchema=oe),W}async loadCompositeSteps(e,t){if(t>=rm)return[];let r=await this.tripleStore.match(e,L.Namespace.EXOCMD.term("Grounding_steps"),void 0),i=[];for(let s of r){let o=null;if(s.object instanceof nr.IRI)o=s.object;else if(s.object instanceof Yt.Literal){let c=this.normalizeWikilink(s.object.value);o=await this.findSubjectByUID(c)}if(!o)continue;let l=await this.loadGroundingDefinition(o,t);l&&i.push(l)}return i}async resolvePropertyDefaults(e,t){let r=await this.resolvePropertyDefaultsForSubject(e,t,L.Namespace.EXOCMD.term("Grounding_propertyDefault")),i=await this.getUniversalCache();return i&&i.propertyDefaults.length>0?(0,tm.mergePropertyDefaults)(i.propertyDefaults,r):r}async resolvePropertyDefaultsForSubject(e,t,r){let i=await this.tripleStore.match(e,r,void 0),s=[];for(let o of i){let l=await this.resolveRefTripleObject(o.object);if(!l)continue;let c=await this.getObsidianName(l,L.Namespace.EXOCMD.term("PropertyDefault_property"));if(!c){this.logger.warn(`Grounding ${t}: PropertyDefault asset missing exocmd__PropertyDefault_property \u2014 entry skipped.`);continue}let u=this.looksLikeUUID(c)?await this.resolveLabelByUID(c):c;if(!u){this.logger.warn(`Grounding ${t}: PropertyDefault property UID '${c}' is not resolvable to exo__Asset_label \u2014 entry skipped.`);continue}let f=await this.getObsidianName(l,L.Namespace.EXOCMD.term("PropertyDefault_value"));if(!f){this.logger.warn(`Grounding ${t}: PropertyDefault '${u}' missing exocmd__PropertyDefault_value \u2014 entry skipped.`);continue}let d=await this.resolvePropertyDefaultValue(f,t,u);d!==null&&s.push({propertyName:u,value:d})}return s}async getUniversalCache(){if(this._universalCacheReady)return this._universalCacheValue;this._universalCacheReady=!0;let e=await(0,tm.loadUniversalDefault)();if(e)return this._universalCacheValue=e,e;let t=await this.findUniversalSingleton();if(!t)return this._universalCacheValue=null,null;let r=await this.resolvePropertyDefaultsForSubject(t,Ax,L.Namespace.EXOCMD.term("Template_propertyDefault")),i=await this.resolveInheritanceRulesForSubject(t,Ax,L.Namespace.EXOCMD.term("Template_inheritanceRule"));return this._universalCacheValue={propertyDefaults:r,inheritanceRules:i},this._universalCacheValue}async findUniversalSingleton(){let e=L.Namespace.EXOCMD.term("UniversalDefaultTemplate").value,t=await this.tripleStore.match(void 0,L.Namespace.EXO.term("Instance_class"),void 0),r=[];for(let i of t){let s=!1;if(i.object instanceof nr.IRI)s=i.object.value===e||i.object.value.includes(Tx);else if(i.object instanceof Yt.Literal){let o=this.unwrapWikilink(i.object.value);s=o==="exocmd__UniversalDefaultTemplate"||o===Tx}s&&i.subject instanceof nr.IRI&&r.push(i.subject)}return r.length===0?null:(r.length===1||(r.sort((i,s)=>i.value.localeCompare(s.value)),this.logger.warn(`Multiple UniversalDefaultTemplate singletons found (${r.length}); selecting deterministically by lexicographic UID order: ${r[0].value}`)),r[0])}async resolveInheritanceRules(e,t){let r=await this.resolveInheritanceRulesForSubject(e,t,L.Namespace.EXOCMD.term("Grounding_inheritanceRule")),i=await this.getUniversalCache();return i&&i.inheritanceRules.length>0?(0,tm.mergeInheritanceRules)(i.inheritanceRules,r):r}async resolveInheritanceRulesForSubject(e,t,r){let i=await this.tripleStore.match(e,r,void 0),s=[],o=t;for(let l of i){let c=await this.resolveRefTripleObject(l.object);if(!c)continue;let u=await this.resolveLabelRef(c,L.Namespace.EXOCMD.term("InheritanceRule_sourceProperty"));if(!u){this.logger.warn(`Grounding ${o}: InheritanceRule missing/unresolvable exocmd__InheritanceRule_sourceProperty \u2014 entry skipped.`);continue}let f=await this.resolveLabelRef(c,L.Namespace.EXOCMD.term("InheritanceRule_targetProperty"));if(!f){this.logger.warn(`Grounding ${o}: InheritanceRule missing/unresolvable exocmd__InheritanceRule_targetProperty \u2014 entry skipped.`);continue}let d=await this.tripleStore.match(c,L.Namespace.EXOCMD.term("InheritanceRule_targetClassCondition"),void 0),h;if(d.length>0){let E=await this.resolveLabelRef(c,L.Namespace.EXOCMD.term("InheritanceRule_targetClassCondition"));if(!E){this.logger.warn(`Grounding ${o}: InheritanceRule has exocmd__InheritanceRule_targetClassCondition triple but ref is unresolvable \u2014 entire rule skipped (would otherwise apply unconditionally, broadening scope).`);continue}h=E}let p=await this.tripleStore.match(c,L.Namespace.EXOCMD.term("InheritanceRule_targetClassExclusion"),void 0),g=[],y=!1;for(let E of p){let A=null;if(E.object instanceof nr.IRI?A=this.iriToObsidianName(E.object.value)??E.object.value:E.object instanceof Yt.Literal&&(A=this.unwrapWikilink(E.object.value)),!A){y=!0;continue}let x=this.looksLikeUUID(A)?await this.resolveLabelByUID(A):A;if(!x){y=!0;continue}g.push(x)}if(y){this.logger.warn(`Grounding ${o}: InheritanceRule has unresolvable exocmd__InheritanceRule_targetClassExclusion entry \u2014 entire rule skipped (would otherwise expand scope by silently dropping the excluded class).`);continue}let v=await this.getLiteralValue(c,L.Namespace.EXOCMD.term("InheritanceRule_priority")),w=50;if(v!==null&&v!==""){let E=Number.parseInt(String(v),10);Number.isFinite(E)&&(w=E)}s.push({sourcePropertyName:u,targetPropertyName:f,targetClassCondition:h,targetClassExclusion:g,priority:w})}return s}async resolveRefTripleObject(e){if(e instanceof nr.IRI)return e;if(e instanceof Yt.Literal){let t=this.normalizeWikilink(e.value);return t?this.findSubjectByUID(t):null}return null}async resolveLabelRef(e,t){let r=await this.getObsidianName(e,t);return r?this.looksLikeUUID(r)?this.resolveLabelByUID(r):r:null}async resolvePropertyDefaultValue(e,t,r){if(!this.looksLikeUUID(e))return`"[[${e}]]"`;let i=await this.findSubjectByUID(e);return i?await this.assetIsTokenInvocation(i)?this.resolveTokenInvocation(i,e,t,r):await this.assetIsSubstitutionToken(i)?this.dispatchSubstitutionToken(i,e,t,r,void 0):`"[[${e}]]"`:`"[[${e}]]"`}async dispatchSubstitutionToken(e,t,r,i,s){let o=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("SubstitutionToken_resolver"));if(!o||!o.trim())return this.logger.warn(`Grounding ${r}: PropertyDefault '${i}' references SubstitutionToken '${t}' with no exocmd__SubstitutionToken_resolver \u2014 falling back to wikilink form.`),`"[[${t}]]"`;let l=o.trim();return vx.has(l)?s!==void 0?q6(l,t,s):W6.has(l)?P1.parseTimeResolve(l):B6(l,t):(this.logger.warn(`Grounding ${r}: PropertyDefault '${i}' SubstitutionToken '${t}' declares unknown resolver-id '${l}' \u2014 falling back to wikilink form. Known ids: ${Array.from(vx).join(", ")}.`),`"[[${t}]]"`)}static parseTimeResolve(e){let t=new Date,r=a(i=>i<10?`0${i}`:String(i),"pad");switch(e){case"today":return t.toISOString().slice(0,10);case"todayStart":return new Date(new Date().setHours(0,0,0,0)).toISOString();case"nowTimestamp":return`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())}T${r(t.getHours())}:${r(t.getMinutes())}:${r(t.getSeconds())}`;case"nowDate":return`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())}`;case"nowYear":return String(t.getFullYear());case"nowMonth":return r(t.getMonth()+1);default:return""}}async resolveTokenInvocation(e,t,r,i){let s=await this.getObsidianName(e,L.Namespace.EXOCMD.term("TokenInvocation_token"));if(!s)return this.logger.warn(`Grounding ${r}: PropertyDefault '${i}' TokenInvocation '${t}' missing exocmd__TokenInvocation_token \u2014 entry skipped.`),null;let o=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("TokenInvocation_parameter"))??"";if(!this.looksLikeUUID(s))return this.logger.warn(`Grounding ${r}: PropertyDefault '${i}' TokenInvocation '${t}' references non-UUID token '${s}' \u2014 entry skipped.`),null;let l=await this.findSubjectByUID(s);return l?this.dispatchSubstitutionToken(l,s,r,i,o):(this.logger.warn(`Grounding ${r}: PropertyDefault '${i}' TokenInvocation '${t}' token ref '${s}' not found in store \u2014 entry skipped.`),null)}async assetIsTokenInvocation(e){let t=await this.tripleStore.match(e,L.Namespace.EXO.term("Instance_class"),void 0);for(let r of t)if(r.object instanceof nr.IRI){if(r.object.value===G6||r.object.value.includes(Ex))return!0}else if(r.object instanceof Yt.Literal){let i=this.unwrapWikilink(r.object.value);if(i==="exocmd__TokenInvocation"||i===Ex)return!0}return!1}async assetIsSubstitutionToken(e){let t=await this.tripleStore.match(e,L.Namespace.EXO.term("Instance_class"),void 0);for(let r of t)if(r.object instanceof nr.IRI){if(r.object.value===V6||r.object.value.includes(wx))return!0}else if(r.object instanceof Yt.Literal){let i=this.unwrapWikilink(r.object.value);if(i==="exocmd__SubstitutionToken"||i===wx)return!0}return!1}async resolveGroundingTypeReference(e){let t=await this.tripleStore.match(e,L.Namespace.EXOCMD.term("Grounding_type"),void 0);if(t.length===0)return null;let r=t[0].object;if(r instanceof nr.IRI)return(0,Sx.resolveGroundingTypeFromIRI)(r.value);if(r instanceof Yt.Literal){let i=r.value,s=i.match(/^\[\[([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\|[^\]]*)?\]\]$/i);return s?(0,Sx.resolveGroundingTypeFromIRI)(`obsidian://vault/${s[1].toLowerCase()}.md`):(this.logger.warn(`[exocmd-grounding-type-literal-form] legacy literal-string form '${i}' for exocmd__Grounding_type on <${e.value}>. Migrate to wikilink form per RFC 9d20c91f Phase 3.`),null)}return 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,L.Namespace.EXO.term("Asset_uid"),void 0);for(let r of t)if(r.object instanceof Yt.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 Yt.Literal||i instanceof nr.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,L.Namespace.EXO.term("Asset_label")):null}async getClassAncestors(e){let t=this._ancestorCache.get(e);if(t)return t;let r=new Set,i=new Set,s=await this.resolveClassFileIRI(e);if(!s)return[];let o=new Set([e]),l=await this.getLiteralValue(s,L.Namespace.EXO.term("Asset_uid"));l&&o.add(l);let c=await this.getLiteralValue(s,L.Namespace.EXO.term("Asset_label"));c&&o.add(c);let u=[{fileIRI:s,depth:0}];for(;u.length>0;){let d=u.shift();if(!d)break;let{fileIRI:h,depth:p}=d;if(p>=rm||i.has(h.value))continue;i.add(h.value);let g=await this.tripleStore.match(h,L.Namespace.EXO.term("Class_superClass"),void 0);for(let y of g){let v=y.object;if(!(v instanceof nr.IRI))continue;let w=v.value.startsWith("obsidian://vault/"),E=this.iriToObsidianName(v.value);E&&!o.has(E)&&!r.has(E)&&r.add(E);let A=null;if(w?A=v:E&&(A=await this.resolveClassFileIRI(E)),!A)continue;let x=await this.getLiteralValue(A,L.Namespace.EXO.term("Asset_uid"));x&&!o.has(x)&&!r.has(x)&&r.add(x),i.has(A.value)||u.push({fileIRI:A,depth:p+1})}}let f=Array.from(r);return this._ancestorCache.set(e,f),f}async resolveClassFileIRI(e){if(this.looksLikeUUID(e))return this.findSubjectByUID(e);let t=await this.findUidByLabel(e);return t?this.findSubjectByUID(t):null}async findUidByLabel(e){let t=await this.tripleStore.match(void 0,L.Namespace.EXO.term("Asset_label"),void 0);for(let r of t)if(r.object instanceof Yt.Literal&&r.object.value===e&&r.subject instanceof nr.IRI){let i=await this.tripleStore.match(r.subject,L.Namespace.EXO.term("Asset_uid"),void 0);if(i.length>0&&i[0].object instanceof Yt.Literal)return i[0].object.value}return 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 nr.IRI){let s=await this.tripleStore.match(i,L.Namespace.EXO.term("Asset_uid"),void 0);return s.length>0&&s[0].object instanceof Yt.Literal?s[0].object.value:i.value.split("/").pop()?.replace(".md","")??null}return i instanceof Yt.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 Yt.Literal?this.normalizeWikilink(i.value):i instanceof nr.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 Yt.Literal?this.unwrapWikilink(i.value):i instanceof nr.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 Yt.Literal)return this.resolveWikilinkAlias(i.value);if(i instanceof nr.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,L.Namespace.EXO.term("Asset_label"));return s?e.replace(`[[${r}]]`,`[[${r}|${s}]]`):e}iriToObsidianName(e){let t=e.match(/^https:\/\/exocortex\.my\/ontology\/([a-z][a-zA-Z0-9]*)#([^#]+)$/);if(t){let[,i,s]=t;return`${i}__${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}};ro.CommandResolver=O1;ro.CommandResolver=O1=P1=L6([(0,k6.injectable)(),N6("design:paramtypes",[Object,Object])],O1)});var D1=S(F1=>{"use strict";Object.defineProperty(F1,"__esModule",{value:!0});F1.validateExoQLAllowlist=z6;var nm=_f();function z6(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 nm.ExoQLForbiddenKeywordError("LOAD");throw new nm.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 nm.ExoQLForbiddenKeywordError("FROM")}if(Array.isArray(e.where))for(let t of e.where)im(t);if(Array.isArray(e.template))for(let t of e.template)im(t)}}a(z6,"validateExoQLAllowlist");function im(n){if(!n||typeof n!="object")return;if(n.type==="service")throw new nm.ExoQLForbiddenKeywordError("SERVICE");if(Array.isArray(n.patterns))for(let t of n.patterns)im(t);let e=n.where;if(Array.isArray(e))for(let t of e)im(t)}a(im,"walkPatternForBannedKeywords")});var L1=S(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});sm.DEFAULT_EVAL_CONFIG=void 0;sm.DEFAULT_EVAL_CONFIG=Object.freeze({enabled:!0,maxNestedEvalCount:100,maxAggregateEvalMillis:1e4})});var k1=S(N1=>{"use strict";Object.defineProperty(N1,"__esModule",{value:!0});N1.evaluateWithExoEval=Z6;var H6=rc(),Y6=ic(),Q6=Ac(),K6=D1(),X6=L1(),J6=_f();async function Z6(n,e={}){if(typeof n!="string")throw new TypeError("evaluateWithExoEval: sparql must be a string");let r=new H6.ExoQLParser().parse(n);if((0,K6.validateExoQLAllowlist)(r),!{...X6.DEFAULT_EVAL_CONFIG,...e.config??{}}.enabled)throw new J6.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 l=new Y6.ExoQLAlgebraTranslator().translate(r),c=new Q6.ExoQLQueryExecutor(e.store);return c.isAskQuery(l)?{kind:"ask",result:await c.executeAsk(l)}:c.isConstructQuery(l)?{kind:"construct",triples:await c.executeConstruct(l)}:{kind:"select",rows:await c.executeAll(l)}}a(Z6,"evaluateWithExoEval")});var Sf=S(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.liveClock=e7;om.frozenClock=t7;function e7(){return{now:a(()=>new Date,"now")}}a(e7,"liveClock");function t7(n){let e=new Date(n);return{now:a(()=>new Date(e.getTime()),"now")}}a(t7,"frozenClock")});var Cx=S(no=>{"use strict";var r7=no&&no.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var l=n.length-1;l>=0;l--)(o=n[l])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},n7=no&&no.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},wf;Object.defineProperty(no,"__esModule",{value:!0});no.PreconditionEvaluator=void 0;var i7=Fe(),s7=rc(),o7=ic(),xx=Ac(),a7=k1(),l7=Sf(),vf=wf=class{static{a(this,"PreconditionEvaluator")}constructor(e,t,r){this.hostFunctions=new Map,this.askCache=new Map,this.tripleStore=e,this.queryBodyResolver=t,this.clock=r?.clock??(0,l7.liveClock)()}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,a7.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)}evaluateHostFunctionSync(e,t,r){return this.hostFunctions.has(e)?this.evaluateHostFunction(e,t,r):null}invalidateCache(){this.askCache.clear()}compileAsk(e){let t=this.substituteVariables(e,wf.SENTINEL_IRI),i=new s7.ExoQLParser().parse(t),o=new o7.ExoQLAlgebraTranslator().translate(i);return new xx.ExoQLQueryExecutor(this.tripleStore).isAskQuery(o)?o: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 o=this.compileAsk(e);if(!o)return!1;r=o,this.askCache.set(e,r)}let i=JSON.parse(JSON.stringify(r).replaceAll(wf.SENTINEL_IRI,t));return await new xx.ExoQLQueryExecutor(this.tripleStore).executeAsk(i)}catch{return!1}}substituteVariables(e,t){let r=this.clock.now(),i=r.toISOString(),s=i.slice(0,10),o=new Date(r.getTime()+wf.ALMATY_OFFSET_MS),l=o.getUTCFullYear(),c=o.getUTCMonth(),u=o.getUTCDate(),f=o.getUTCDay(),h=new Date(Date.UTC(l,c,u-1)).toISOString().slice(0,10),p=(f+6)%7,g=new Date(Date.UTC(l,c,u-p)),y=g.toISOString().slice(0,10),w=new Date(g.getTime()-10080*60*1e3).toISOString().slice(0,10),E=`${l}-${String(c+1).padStart(2,"0")}-01`,A=c===0?11:c-1,D=`${c===0?l-1:l}-${String(A+1).padStart(2,"0")}-01`,J=`${l}-01-01`;return e.replace(/\$target/g,`<${t}>`).replace(/\$now/g,`"${i}"^^xsd:dateTime`).replace(/\$yesterday/g,`"${h}"^^xsd:date`).replace(/\$thisWeekStart/g,`"${y}"^^xsd:date`).replace(/\$lastWeekStart/g,`"${w}"^^xsd:date`).replace(/\$thisMonthStart/g,`"${E}"^^xsd:date`).replace(/\$lastMonthStart/g,`"${D}"^^xsd:date`).replace(/\$thisYearStart/g,`"${J}"^^xsd:date`).replace(/\$today/g,`"${s}"^^xsd:date`)}};no.PreconditionEvaluator=vf;vf.SENTINEL_IRI="urn:exocortex:cache-sentinel:target";vf.ALMATY_OFFSET_MS=300*60*1e3;no.PreconditionEvaluator=vf=wf=r7([(0,i7.injectable)(),n7("design:paramtypes",[Object,Object,Object])],vf)});var Rx=S(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.hasUidFilename=io.hasNonUidFilename=void 0;io.registerDefaultHostFunctions=f7;var c7=a(n=>{let e=n.assetUid;if(typeof e!="string"||e.trim()==="")return!1;let t=n.fileBasename;return typeof t!="string"?!1:t!==e},"hasNonUidFilename");io.hasNonUidFilename=c7;var u7=a(n=>{let e=n.assetUid;if(typeof e!="string"||e.trim()==="")return!1;let t=n.fileBasename;return typeof t!="string"?!1:t===e},"hasUidFilename");io.hasUidFilename=u7;function f7(n){n.registerHostFunction("hasNonUidFilename",io.hasNonUidFilename),n.registerHostFunction("hasUidFilename",io.hasUidFilename)}a(f7,"registerDefaultHostFunctions")});var lm=S(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});am.liveUidGenerator=d7;am.seededUidGenerator=p7;var M1=vi();function d7(){return{next:a(()=>(0,M1.v4)(),"next")}}a(d7,"liveUidGenerator");var h7="6ba7b810-9dad-11d1-80b4-00c04fd430c8";function p7(n){let e=0,t=(0,M1.v5)(n,h7);return{next:a(()=>{let r=`${n}#${e}`;return e+=1,(0,M1.v5)(r,t)},"next")}}a(p7,"seededUidGenerator")});var Ef=S(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.registerOrderSpecLoader=m7;xc.clearOrderSpecLoader=g7;xc.loadDefaultSpec=y7;xc.orderProperties=_7;var cm=null,Qo,um=!1;function m7(n){cm=n,Qo=void 0,um=!1}a(m7,"registerOrderSpecLoader");function g7(){cm=null,Qo=void 0,um=!1}a(g7,"clearOrderSpecLoader");function y7(){if(Qo!==void 0)return Qo;if(!cm)return Qo=null,null;try{Qo=cm()}catch(n){um||(console.warn("[OrderSpecResolver] loader threw, falling back to insertion order:",n),um=!0),Qo=null}return Qo}a(y7,"loadDefaultSpec");function _7(n,e){if(!e||e.head.length===0&&e.tail.length===0)return n;let t=Object.keys(n),r=new Set(e.head),i=new Set(e.tail),s=e.head.filter(u=>Object.prototype.hasOwnProperty.call(n,u)),o=e.tail.filter(u=>Object.prototype.hasOwnProperty.call(n,u)),l=t.filter(u=>!r.has(u)&&!i.has(u));e.middleStrategy==="alphabetical"&&l.sort((u,f)=>u.localeCompare(f));let c={};for(let u of s)c[u]=n[u];for(let u of l)c[u]=n[u];for(let u of o)c[u]=n[u];return c}a(_7,"orderProperties")});var _s=S(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});fm.FrontmatterService=void 0;var Px=Ef(),Tf=class n{static{a(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,o=null,l=a(()=>{s!==null&&o!==null&&(r[s]=o),s=null,o=null},"flushArray");for(let c of i){let u=/^ {2}- (.*)$/.exec(c);if(u){s!==null&&o!==null&&o.push(u[1].trim());continue}l();let f=/^([^:\s][^:]*):\s*(.*)$/.exec(c);if(!f)continue;let d=f[1].trim(),h=f[2].trim();h===""?(s=d,o=[]):r[d]=h}return l(),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 vc(`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}}};Ec.SPARQLGenerator=R1});var Ac=S(kn=>{"use strict";var y6=kn&&kn.__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:a(function(){return e[t]},"get")}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),_6=kn&&kn.__setModuleDefault||(Object.create?(function(n,e){Object.defineProperty(n,"default",{enumerable:!0,value:e})}):function(n,e){n.default=e}),_x=kn&&kn.__importStar||(function(){var n=a(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"&&y6(t,e,r[i]);return _6(t,e),t}})();Object.defineProperty(kn,"__esModule",{value:!0});kn.QueryExecutor=kn.ExoQLQueryExecutor=kn.QueryExecutorError=void 0;var b6=Qb(),S6=Wp(),w6=p1(),v6=g1(),E6=ax(),T6=cx(),A6=dx(),I6=I1(),x6=px(),C6=gx(),R6=yx(),P6=Ce(),O6=Ue(),F6=jp(),$r="http://www.w3.org/2001/XMLSchema#",D6=new Set([`${$r}integer`,`${$r}decimal`,`${$r}float`,`${$r}double`,`${$r}nonPositiveInteger`,`${$r}negativeInteger`,`${$r}long`,`${$r}int`,`${$r}short`,`${$r}byte`,`${$r}nonNegativeInteger`,`${$r}unsignedLong`,`${$r}unsignedInt`,`${$r}unsignedShort`,`${$r}unsignedByte`,`${$r}positiveInteger`]),Tc=class extends Error{static{a(this,"QueryExecutorError")}constructor(e,t){super(e,t?{cause:t}:void 0),this.name="QueryExecutorError"}};kn.QueryExecutorError=Tc;var em=class{static{a(this,"ExoQLQueryExecutor")}constructor(e,t={}){this.tripleStore=e,this.bgpExecutor=new b6.BGPExecutor(e),this.filterExecutor=new S6.FilterExecutor,this.optionalExecutor=new w6.OptionalExecutor,this.unionExecutor=new v6.UnionExecutor,this.minusExecutor=new E6.MinusExecutor,this.valuesExecutor=new T6.ValuesExecutor,this.aggregateExecutor=new A6.AggregateExecutor,this.constructExecutor=new I6.ConstructExecutor,this.serviceExecutor=new x6.ServiceExecutor(t.serviceConfig),this.graphExecutor=new C6.GraphExecutor(e),this.sparqlGenerator=new R6.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 Tc(`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 o of this.execute(e.left))t.push(o);if(t.length===0)return;let r=new Set;for(let o of t)for(let l of o.variables())r.add(l);let i=this.collectOperationVariables(e.right);if([...r].some(o=>i.has(o)))for(let o of t){let l=this.substituteVariables(e.right,o);for await(let c of this.execute(l)){let u=o.merge(c);u!==null&&(yield u)}}else{let o=[];for await(let l of this.execute(e.right))o.push(l);for(let l of t)for(let c of o){let u=l.merge(c);u!==null&&(yield u)}}}async*executeLeftJoin(e){let t=[];for await(let o of this.execute(e.left))t.push(o);let r=[];for await(let o of this.execute(e.right))r.push(o);async function*i(){for(let o of t)yield o}a(i,"leftGen");async function*s(){for(let o of r)yield o}a(s,"rightGen"),yield*this.optionalExecutor.execute(i(),s())}async*executeUnion(e){let t=[];for await(let o of this.execute(e.left))t.push(o);let r=[];for await(let o of this.execute(e.right))r.push(o);async function*i(){for(let o of t)yield o}a(i,"leftGen");async function*s(){for(let o of r)yield o}a(s,"rightGen"),yield*this.unionExecutor.execute(i(),s())}async*executeMinus(e){let t=[];for await(let o of this.execute(e.left))t.push(o);let r=[];for await(let o of this.execute(e.right))r.push(o);async function*i(){for(let o of t)yield o}a(i,"leftGen");async function*s(){for(let o of r)yield o}a(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(()=>_x(ps())),r=new Set(e.variables);for await(let i of this.execute(e.input)){let s=new t;for(let o of i.variables())if(r.has(o)){let l=i.get(o);l!==void 0&&s.set(o,l)}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 o=this.getExpressionValue(s.expression,r),l=this.getExpressionValue(s.expression,i),c=0;if(o===void 0&&l===void 0?c=0:o===void 0?c=1:l===void 0?c=-1:typeof o=="number"&&typeof l=="number"?c=o-l:c=String(o).localeCompare(String(l)),s.descending&&(c=-c),c!==0)return c}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(o=>this.filterExecutor.evaluateExpression(o,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 o=r.merge(s);o!==null&&(yield o)}}}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 P6.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(()=>_x(ps()));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 O6.Literal){let i=r.datatype?.value;if(i===`${$r}dayTimeDuration`)try{return F6.DateTimeFunctions.parseDayTimeDuration(r.value)}catch{return r.value}if(i&&D6.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 Tc("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 Tc("executeAsk requires an ASK operation");for await(let t of this.execute(e.where))return!0;return!1}};kn.ExoQLQueryExecutor=em;kn.QueryExecutor=em});var Ix=S(ro=>{"use strict";var L6=ro&&ro.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var l=n.length-1;l>=0;l--)(o=n[l])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},N6=ro&&ro.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},P1;Object.defineProperty(ro,"__esModule",{value:!0});ro.CommandResolver=void 0;var k6=Fe(),M6=zl(),nr=Ce(),Yt=Ue(),L=tr(),bx=No(),Sx=hh(),Ic=z0(),tm=hI(),j6=rc(),$6=ic(),U6=Ac(),rm=10,wx="08cec529-90eb-4d43-88de-ceecccea12b0",V6=L.Namespace.EXOCMD.term("SubstitutionToken").value,vx=new Set(["today","todayStart","targetFolder","target","randomUUIDv4","nowTimestamp","nowDate","nowYear","nowMonth","userInputLabel","userInput","targetProperty","labelAsArray","groundingTargetClass"]);function B6(n,e){return`__SUBSTITUTE__${n}__${e}__`}a(B6,"buildSubstitutionMarker");function q6(n,e,t){let r=Buffer.from(t,"utf-8").toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"");return`__SUBSTITUTE_P__${n}__${e}__${r}__`}a(q6,"buildParameterisedMarker");var Ex="3f28af98-c031-4718-8ba2-44ad0b012c52",G6=L.Namespace.EXOCMD.term("TokenInvocation").value,Tx="29e2c8f8-2d27-4e58-b467-2e85d46f8122",Ax="universal-default-template",W6=new Set(["today","todayStart","nowTimestamp","nowDate","nowYear","nowMonth"]),O1=P1=class{static{a(this,"CommandResolver")}clearUniversalCache(){this._universalCacheReady=!1,this._universalCacheValue=null,(0,tm.clearUniversalDefault)()}constructor(e,t=M6.NullLogger){this.tripleStore=e,this.logger=t,this.cache=new Map,this.multiCache=new Map,this._ancestorCache=new Map,this._legacyPropertyDefaultsWarnedGroundings=new Set,this._universalCacheReady=!1,this._universalCacheValue=null}async resolveForAssetMulti(e,t,r){if(t.length===0)return[];let i=[...t].sort().join(","),s=`${e}::${i}::${r??""}`,o=this.multiCache.get(s);if(o)return o;let l=new Set,c=[];for(let u of t){let f=await this.resolveForAsset(e,u,r);for(let d of f)l.has(d.binding.id)||(l.add(d.binding.id),c.push(d))}return c.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,c),c}async resolveForAsset(e,t,r){let i=`${e}:${t}:${r??""}`,s=this.cache.get(i);if(s)return s;let o=await this.findBindings(t,r,e),l=[];for(let c of o){let u=await this.loadCommand(c.commandRef,{targetClass:c.targetClass});if(!u)continue;let f=c.precondition?{...u,precondition:c.precondition}:u;l.push({command:f,binding:c})}return l.sort((c,u)=>{let f=this.getBindingPriority(c.binding),d=this.getBindingPriority(u.binding);return f!==d?f-d:(c.binding.order??100)-(u.binding.order??100)}),this.cache.set(i,l),l}async loadCommand(e,t){let r=await this.findSubjectByUID(e);if(!r||(await this.tripleStore.match(r,L.Namespace.RDF.term("type"),L.Namespace.EXOCMD.term("Command"))).length===0)return null;let s=await this.getLiteralValue(r,L.Namespace.EXO.term("Asset_label"))??"Unknown Command",o=await this.getLiteralValue(r,L.Namespace.EXOCMD.term("Command_labelTemplate")),l=await this.getLiteralValue(r,L.Namespace.EXOCMD.term("Command_icon")),c=await this.getLiteralValue(r,L.Namespace.EXOCMD.term("Command_confirmMessage")),u=await this.getLiteralValue(r,L.Namespace.EXOCMD.term("Command_successMessage")),f=await this.getLiteralValue(r,L.Namespace.EXOCMD.term("Command_category")),d=await this.getLiteralValue(r,L.Namespace.EXOCMD.term("Command_openInSameTab")),h=d!==null&&String(d).trim().toLowerCase()==="true",p=await this.loadLinkedPrecondition(r),g=await this.loadLinkedGrounding(r,0,t);return g?{id:e,name:s,labelTemplate:o??void 0,icon:l??void 0,precondition:p??void 0,grounding:g,confirmMessage:c??void 0,successMessage:u??void 0,category:f??void 0,openInSameTab:h||void 0}:null}async findBindings(e,t,r){let i=await this.tripleStore.match(void 0,L.Namespace.RDF.term("type"),L.Namespace.EXOCMD.term("CommandBinding")),s=[];for(let o of i){let l=o.subject,c=await this.loadBindingDefinition(l);c&&this.bindingMatches(c,e,t,r)&&s.push(c)}return s}async findPaletteEnabledCommands(){let e=await this.tripleStore.match(void 0,L.Namespace.RDF.term("type"),L.Namespace.EXOCMD.term("Command")),t=[],r=new Set;for(let i of e){let s=i.subject;if((await this.getLiteralValue(s,L.Namespace.EXOCMD.term("Command_paletteEnabled")))?.toLowerCase()!=="true")continue;let l=await this.getLiteralValue(s,L.Namespace.EXO.term("Asset_uid"));if(!l){this.logger.warn(`[CommandResolver] paletteEnabled command at ${s.value} has no exo__Asset_uid \u2014 skipped`);continue}let c=await this.loadCommand(l);if(!c){this.logger.warn(`[CommandResolver] paletteEnabled command ${l} could not be loaded (missing grounding?) \u2014 skipped`);continue}let u=await this.getLiteralValue(s,L.Namespace.EXOCMD.term("Command_paletteId")),f=await this.getLiteralValue(s,L.Namespace.EXOCMD.term("Command_cliName")),d=u??f??l;if(r.has(d)){this.logger.warn(`[CommandResolver] duplicate paletteId "${d}" \u2014 first registration wins, dropping ${l}`);continue}r.add(d),t.push({command:c,paletteId:d})}return t}invalidateCache(){this.cache.clear(),this.multiCache.clear(),this._ancestorCache.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:o}of i){let l=await this.evaluateSelectSnippet(o,t);r=r.replace(s,l)}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 o=e.slice(r,s),l=e.slice(r+1,s-1);t.push({full:o,body:l})}r=s}else r++;return t}async evaluateSelectSnippet(e,t){try{let r=e.replace(/\$target/g,`<${t}>`),s=new j6.ExoQLParser().parse(r),l=new $6.ExoQLAlgebraTranslator().translate(s),u=await new U6.ExoQLQueryExecutor(this.tripleStore).executeAll(l);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 Yt.Literal||h instanceof nr.IRI?h.value:String(h):""}catch{return""}}async loadBindingDefinition(e){let t=await this.getLiteralValue(e,L.Namespace.EXO.term("Asset_uid"));if(!t)return null;let r=await this.getLiteralValue(e,L.Namespace.EXO.term("Asset_label"))??"",i=await this.getLinkedUID(e,L.Namespace.EXOCMD.term("CommandBinding_command"));if(!i)return null;let s=await this.getLinkedValue(e,L.Namespace.EXOCMD.term("CommandBinding_targetClass")),o=await this.getLinkedValue(e,L.Namespace.EXOCMD.term("CommandBinding_targetPrototype")),l=await this.getLinkedValue(e,L.Namespace.EXOCMD.term("CommandBinding_targetAsset"));if(!s&&!o&&!l)return null;let c=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBinding_position")),u=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBinding_order")),f=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBinding_variant")),d=f!==null?this.coerceVariant(f,t):void 0,h=await this.loadLinkedPreconditionFromProperty(e,L.Namespace.EXOCMD.term("CommandBinding_precondition")),p=await this.loadLinkedStyle(e,t);return{id:t,label:r,commandRef:i,targetClass:s??void 0,targetPrototype:o??void 0,targetAsset:l??void 0,position:c??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,L.Namespace.EXOCMD.term("CommandBinding_style"),void 0);if(r.length>0){let s=r[0].object,o=null;if(s instanceof nr.IRI)o=s;else if(s instanceof Yt.Literal){let l=this.normalizeWikilink(s.value);o=await this.findSubjectByUID(l)}if(o){let l=await this.loadStyleAsset(o);if(l)return l}this.logger.warn(this.capWarning(`CommandBinding ${t}: style reference unresolved, falling back to inline variant`))}let i=await this.getLiteralValue(e,L.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,L.Namespace.EXO.term("Asset_uid"));if(!t)return null;let r=await this.getLiteralValue(e,L.Namespace.EXO.term("Asset_label"))??"",i=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_variant")),s=i!==null?this.coerceVariant(i,t):void 0,o=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_showIcon")),l=this.coerceBoolean(o),c=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_labelClass")),u=c!==null?this.coerceLabelClass(c,t):void 0,f=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_ariaLabel")),d=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_tooltip")),h=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_keyboardShortcut")),p=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("CommandBindingStyle_source")),g=p!==null?this.coerceStyleSource(p,t):void 0;return{id:t,label:r,variant:s,showIcon:l,labelClass:u,ariaLabel:f??void 0,tooltip:d??void 0,keyboardShortcut:h??void 0,source:g,inline:!1}}coerceVariant(e,t){if(e==null)return;let r=String(e).trim().toLowerCase();if(r!==""){if(Ic.COMMAND_VARIANT_VALUES.includes(r))return r;this.logger.warn(this.capWarning(`CommandBindingStyle variant "${r}" not in whitelist [${Ic.COMMAND_VARIANT_VALUES.join(",")}]; dropped (asset ${t})`))}}coerceLabelClass(e,t){if(e==null)return;let r=String(e).trim().toLowerCase();if(r!==""){if(Ic.LABEL_CLASS_VALUES.includes(r))return r;this.logger.warn(this.capWarning(`CommandBindingStyle labelClass "${r}" not in whitelist [${Ic.LABEL_CLASS_VALUES.join(",")}]; dropped (asset ${t})`))}}coerceStyleSource(e,t){if(e==null)return;let r=String(e).trim().toLowerCase();if(r!==""){if(Ic.STYLE_SOURCE_VALUES.includes(r))return r;this.logger.warn(this.capWarning(`CommandBindingStyle source "${r}" not in whitelist [${Ic.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 o=this.extractPathBasename(r);if(o&&o===i)return!0;let l=this.extractAlias(t);if(l&&r===l)return!0;let c=this.extractAlias(e);return!!(c&&c===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,L.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 nr.IRI)s=i;else if(i instanceof Yt.Literal){let h=this.normalizeWikilink(i.value);s=await this.findSubjectByUID(h)}if(!s)return null;let o=await this.getLiteralValue(s,L.Namespace.EXO.term("Asset_uid")),l=await this.getLiteralValue(s,L.Namespace.EXO.term("Asset_label"))??"",c=await this.getLiteralValue(s,L.Namespace.EXOCMD.term("Precondition_sparqlAsk")),u=await this.getLiteralValue(s,L.Namespace.EXOCMD.term("Precondition_hostFunction")),f=await this.tripleStore.match(s,L.Namespace.EXOCMD.term("Precondition_query"),void 0),d;if(f.length>0){let h=f[0].object;if(h instanceof nr.IRI){let p=await this.getLiteralValue(h,L.Namespace.EXO.term("Asset_uid"));p&&(d=p)}else h instanceof Yt.Literal&&(d=this.normalizeWikilink(h.value))}return!o||!c&&!u&&!d?null:{id:o,label:l,...c&&{sparqlAsk:c},...u&&{hostFunction:u},...d&&{query:d}}}async loadLinkedGrounding(e,t,r){if(t>=rm)return null;let i=await this.tripleStore.match(e,L.Namespace.EXOCMD.term("Command_grounding"),void 0);if(i.length===0)return null;if(i.length===1||!r?.targetClass){let o=await this.resolveGroundingRef(i[0].object);return o?this.loadGroundingDefinition(o,t):null}for(let o of i){let l=await this.resolveGroundingRef(o.object);if(!l)continue;let c=await this.getObsidianName(l,L.Namespace.EXOCMD.term("Grounding_targetPrototype"));if(c&&this.matchesReference(c,r.targetClass))return this.loadGroundingDefinition(l,t)}this.logger.warn(`Command ${e.value}: ${i.length} groundings declared, none matched context.targetClass='${r.targetClass}' via Grounding_targetPrototype \u2014 falling back to first grounding by iteration order (legacy behaviour). Check that one grounding's Grounding_targetPrototype references this targetClass.`);let s=await this.resolveGroundingRef(i[0].object);return s?this.loadGroundingDefinition(s,t):null}async resolveGroundingRef(e){if(e instanceof nr.IRI)return e;if(e instanceof Yt.Literal){let t=this.normalizeWikilink(e.value);return await this.findSubjectByUID(t)}return null}async loadGroundingByUid(e){let t=await this.findSubjectByUID(e);return t?this.loadGroundingDefinition(t,0):null}async loadGroundingDefinition(e,t){if(t>=rm)return null;let r=await this.getLiteralValue(e,L.Namespace.EXO.term("Asset_uid"));if(!r)return null;let i=await this.getLiteralValue(e,L.Namespace.EXO.term("Asset_label"))??"",s=await this.resolveGroundingTypeReference(e);if(!s)return null;let o=await this.getObsidianName(e,L.Namespace.EXOCMD.term("Grounding_targetProperty"));if(o&&this.looksLikeUUID(o)){let V=await this.resolveLabelByUID(o);if(!V)return this.logger.warn(`Grounding ${r}: targetProperty wikilink UID '${o}' is not resolvable to exo__Asset_label \u2014 grounding skipped (would otherwise write a UUID-named frontmatter key).`),null;o=V}if(s===bx.GroundingType.SERVICE_CALL){let V=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_serviceId"));V&&(o=V)}let l=await this.getObsidianName(e,L.Namespace.EXOCMD.term("Grounding_targetValueRef")),c=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_targetValueLiteral")),u=await this.getObsidianName(e,L.Namespace.EXOCMD.term("Grounding_targetValueSubstitution")),f=null;if(u&&this.looksLikeUUID(u)){let V=await this.resolveLabelByUID(u);if(!V)return this.logger.warn(`Grounding ${r}: targetValueSubstitution UID '${u}' is not resolvable to exo__Asset_label (SubstitutionToken instance missing or unlabelled) \u2014 grounding skipped.`),null;f=V}else u&&(f=u);let d=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_serviceCallPayload")),h=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_appendExpression")),p=await this.getObsidianWikilinkValue(e,L.Namespace.EXOCMD.term("Grounding_isDefinedBy")),g=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_sparqlUpdate")),y=await this.getObsidianName(e,L.Namespace.EXOCMD.term("Grounding_targetClass"));if(y&&!this.looksLikeUUID(y)){let V=await this.findUidByLabel(y);V&&(y=V)}let v=await this.getObsidianName(e,L.Namespace.EXOCMD.term("Grounding_targetPrototype")),w=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_targetFolder")),E=await this.getObsidianName(e,L.Namespace.EXOCMD.term("Grounding_linkBackProperty")),A=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_inputSchema")),x=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_incrementBy")),D=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_shiftDelta")),J;if(x!=null&&x!==""){let V=Number.parseInt(String(x),10);Number.isFinite(V)&&(J=V)}let ae=await this.resolvePropertyDefaults(e,r),ge=await this.resolveInheritanceRules(e,r),N=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_propertyDefaults"));N!==null&&N!==""&&!this._legacyPropertyDefaultsWarnedGroundings.has(r)&&(this.logger.warn(`Grounding ${r}: deprecated exocmd__Grounding_propertyDefaults (plural) JSON predicate detected \u2014 the parser was removed in RFC v2 Phase 5 (#3167); value is ignored. Migrate to ref-form exocmd__Grounding_propertyDefault (singular) pointing to exocmd__PropertyDefault assets. See vault TBox c8f87363-d39c-45cb-9d4d-1be96d70f892 for the canonical replacement.`),this._legacyPropertyDefaultsWarnedGroundings.add(r));let Q;s===bx.GroundingType.COMPOSITE&&(Q=await this.loadCompositeSteps(e,t+1));let oe;if(A)try{let V=JSON.parse(A);V?.properties&&(oe=Object.entries(V.properties).map(([q,nt])=>{let lt=nt.type,Y=lt==="string"?"text":lt,Le=nt.defaultValue!==void 0?nt.defaultValue:nt.default,qe={name:q,type:Y,label:nt.title??q,required:Array.isArray(V.required)&&V.required.includes(q)};return Le!=null&&(qe.defaultValue=String(Le)),qe}))}catch{}let B=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_prefillLabelWithDate")),K=B!==null&&String(B).trim().toLowerCase()==="true",ne=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_labelTemplate")),G=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("Grounding_direction")),ie;if(G!=null){let V=String(G).trim().toLowerCase();V==="forward"||V==="rollback"?ie=V:V!==""&&this.logger.warn(`Grounding ${r}: exocmd__Grounding_direction value '${G}' is not 'forward' or 'rollback' \u2014 treating as undefined (will default to 'forward' at dispatch).`)}let W={id:r,label:i,type:s,targetProperty:o??void 0,targetValueRef:l??void 0,targetValueLiteral:c??void 0,targetValueSubstitution:f??void 0,serviceCallPayload:d??void 0,appendExpression:h??void 0,sparqlUpdate:g??void 0,steps:Q,targetClass:y??void 0,targetPrototype:v??void 0,targetFolder:w??void 0,linkBackProperty:E??void 0,incrementBy:J,shiftDelta:D??void 0,propertyDefault:ae.length>0?ae:void 0,inheritanceRule:ge.length>0?ge:void 0,isDefinedBy:p??void 0,prefillLabelWithDate:K||void 0,labelTemplate:ne??void 0,direction:ie};return oe&&(W.inputSchema=oe),W}async loadCompositeSteps(e,t){if(t>=rm)return[];let r=await this.tripleStore.match(e,L.Namespace.EXOCMD.term("Grounding_steps"),void 0),i=[];for(let s of r){let o=null;if(s.object instanceof nr.IRI)o=s.object;else if(s.object instanceof Yt.Literal){let c=this.normalizeWikilink(s.object.value);o=await this.findSubjectByUID(c)}if(!o)continue;let l=await this.loadGroundingDefinition(o,t);l&&i.push(l)}return i}async resolvePropertyDefaults(e,t){let r=await this.resolvePropertyDefaultsForSubject(e,t,L.Namespace.EXOCMD.term("Grounding_propertyDefault")),i=await this.getUniversalCache();return i&&i.propertyDefaults.length>0?(0,tm.mergePropertyDefaults)(i.propertyDefaults,r):r}async resolvePropertyDefaultsForSubject(e,t,r){let i=await this.tripleStore.match(e,r,void 0),s=[];for(let o of i){let l=await this.resolveRefTripleObject(o.object);if(!l)continue;let c=await this.getObsidianName(l,L.Namespace.EXOCMD.term("PropertyDefault_property"));if(!c){this.logger.warn(`Grounding ${t}: PropertyDefault asset missing exocmd__PropertyDefault_property \u2014 entry skipped.`);continue}let u=this.looksLikeUUID(c)?await this.resolveLabelByUID(c):c;if(!u){this.logger.warn(`Grounding ${t}: PropertyDefault property UID '${c}' is not resolvable to exo__Asset_label \u2014 entry skipped.`);continue}let f=await this.getObsidianName(l,L.Namespace.EXOCMD.term("PropertyDefault_value"));if(!f){this.logger.warn(`Grounding ${t}: PropertyDefault '${u}' missing exocmd__PropertyDefault_value \u2014 entry skipped.`);continue}let d=await this.resolvePropertyDefaultValue(f,t,u);d!==null&&s.push({propertyName:u,value:d})}return s}async getUniversalCache(){if(this._universalCacheReady)return this._universalCacheValue;this._universalCacheReady=!0;let e=await(0,tm.loadUniversalDefault)();if(e)return this._universalCacheValue=e,e;let t=await this.findUniversalSingleton();if(!t)return this._universalCacheValue=null,null;let r=await this.resolvePropertyDefaultsForSubject(t,Ax,L.Namespace.EXOCMD.term("Template_propertyDefault")),i=await this.resolveInheritanceRulesForSubject(t,Ax,L.Namespace.EXOCMD.term("Template_inheritanceRule"));return this._universalCacheValue={propertyDefaults:r,inheritanceRules:i},this._universalCacheValue}async findUniversalSingleton(){let e=L.Namespace.EXOCMD.term("UniversalDefaultTemplate").value,t=await this.tripleStore.match(void 0,L.Namespace.EXO.term("Instance_class"),void 0),r=[];for(let i of t){let s=!1;if(i.object instanceof nr.IRI)s=i.object.value===e||i.object.value.includes(Tx);else if(i.object instanceof Yt.Literal){let o=this.unwrapWikilink(i.object.value);s=o==="exocmd__UniversalDefaultTemplate"||o===Tx}s&&i.subject instanceof nr.IRI&&r.push(i.subject)}return r.length===0?null:(r.length===1||(r.sort((i,s)=>i.value.localeCompare(s.value)),this.logger.warn(`Multiple UniversalDefaultTemplate singletons found (${r.length}); selecting deterministically by lexicographic UID order: ${r[0].value}`)),r[0])}async resolveInheritanceRules(e,t){let r=await this.resolveInheritanceRulesForSubject(e,t,L.Namespace.EXOCMD.term("Grounding_inheritanceRule")),i=await this.getUniversalCache();return i&&i.inheritanceRules.length>0?(0,tm.mergeInheritanceRules)(i.inheritanceRules,r):r}async resolveInheritanceRulesForSubject(e,t,r){let i=await this.tripleStore.match(e,r,void 0),s=[],o=t;for(let l of i){let c=await this.resolveRefTripleObject(l.object);if(!c)continue;let u=await this.resolveLabelRef(c,L.Namespace.EXOCMD.term("InheritanceRule_sourceProperty"));if(!u){this.logger.warn(`Grounding ${o}: InheritanceRule missing/unresolvable exocmd__InheritanceRule_sourceProperty \u2014 entry skipped.`);continue}let f=await this.resolveLabelRef(c,L.Namespace.EXOCMD.term("InheritanceRule_targetProperty"));if(!f){this.logger.warn(`Grounding ${o}: InheritanceRule missing/unresolvable exocmd__InheritanceRule_targetProperty \u2014 entry skipped.`);continue}let d=await this.tripleStore.match(c,L.Namespace.EXOCMD.term("InheritanceRule_targetClassCondition"),void 0),h;if(d.length>0){let E=await this.resolveLabelRef(c,L.Namespace.EXOCMD.term("InheritanceRule_targetClassCondition"));if(!E){this.logger.warn(`Grounding ${o}: InheritanceRule has exocmd__InheritanceRule_targetClassCondition triple but ref is unresolvable \u2014 entire rule skipped (would otherwise apply unconditionally, broadening scope).`);continue}h=E}let p=await this.tripleStore.match(c,L.Namespace.EXOCMD.term("InheritanceRule_targetClassExclusion"),void 0),g=[],y=!1;for(let E of p){let A=null;if(E.object instanceof nr.IRI?A=this.iriToObsidianName(E.object.value)??E.object.value:E.object instanceof Yt.Literal&&(A=this.unwrapWikilink(E.object.value)),!A){y=!0;continue}let x=this.looksLikeUUID(A)?await this.resolveLabelByUID(A):A;if(!x){y=!0;continue}g.push(x)}if(y){this.logger.warn(`Grounding ${o}: InheritanceRule has unresolvable exocmd__InheritanceRule_targetClassExclusion entry \u2014 entire rule skipped (would otherwise expand scope by silently dropping the excluded class).`);continue}let v=await this.getLiteralValue(c,L.Namespace.EXOCMD.term("InheritanceRule_priority")),w=50;if(v!==null&&v!==""){let E=Number.parseInt(String(v),10);Number.isFinite(E)&&(w=E)}s.push({sourcePropertyName:u,targetPropertyName:f,targetClassCondition:h,targetClassExclusion:g,priority:w})}return s}async resolveRefTripleObject(e){if(e instanceof nr.IRI)return e;if(e instanceof Yt.Literal){let t=this.normalizeWikilink(e.value);return t?this.findSubjectByUID(t):null}return null}async resolveLabelRef(e,t){let r=await this.getObsidianName(e,t);return r?this.looksLikeUUID(r)?this.resolveLabelByUID(r):r:null}async resolvePropertyDefaultValue(e,t,r){if(!this.looksLikeUUID(e))return`"[[${e}]]"`;let i=await this.findSubjectByUID(e);return i?await this.assetIsTokenInvocation(i)?this.resolveTokenInvocation(i,e,t,r):await this.assetIsSubstitutionToken(i)?this.dispatchSubstitutionToken(i,e,t,r,void 0):`"[[${e}]]"`:`"[[${e}]]"`}async dispatchSubstitutionToken(e,t,r,i,s){let o=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("SubstitutionToken_resolver"));if(!o||!o.trim())return this.logger.warn(`Grounding ${r}: PropertyDefault '${i}' references SubstitutionToken '${t}' with no exocmd__SubstitutionToken_resolver \u2014 falling back to wikilink form.`),`"[[${t}]]"`;let l=o.trim();return vx.has(l)?s!==void 0?q6(l,t,s):W6.has(l)?P1.parseTimeResolve(l):B6(l,t):(this.logger.warn(`Grounding ${r}: PropertyDefault '${i}' SubstitutionToken '${t}' declares unknown resolver-id '${l}' \u2014 falling back to wikilink form. Known ids: ${Array.from(vx).join(", ")}.`),`"[[${t}]]"`)}static parseTimeResolve(e){let t=new Date,r=a(i=>i<10?`0${i}`:String(i),"pad");switch(e){case"today":return t.toISOString().slice(0,10);case"todayStart":return new Date(new Date().setHours(0,0,0,0)).toISOString();case"nowTimestamp":return`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())}T${r(t.getHours())}:${r(t.getMinutes())}:${r(t.getSeconds())}`;case"nowDate":return`${t.getFullYear()}-${r(t.getMonth()+1)}-${r(t.getDate())}`;case"nowYear":return String(t.getFullYear());case"nowMonth":return r(t.getMonth()+1);default:return""}}async resolveTokenInvocation(e,t,r,i){let s=await this.getObsidianName(e,L.Namespace.EXOCMD.term("TokenInvocation_token"));if(!s)return this.logger.warn(`Grounding ${r}: PropertyDefault '${i}' TokenInvocation '${t}' missing exocmd__TokenInvocation_token \u2014 entry skipped.`),null;let o=await this.getLiteralValue(e,L.Namespace.EXOCMD.term("TokenInvocation_parameter"))??"";if(!this.looksLikeUUID(s))return this.logger.warn(`Grounding ${r}: PropertyDefault '${i}' TokenInvocation '${t}' references non-UUID token '${s}' \u2014 entry skipped.`),null;let l=await this.findSubjectByUID(s);return l?this.dispatchSubstitutionToken(l,s,r,i,o):(this.logger.warn(`Grounding ${r}: PropertyDefault '${i}' TokenInvocation '${t}' token ref '${s}' not found in store \u2014 entry skipped.`),null)}async assetIsTokenInvocation(e){let t=await this.tripleStore.match(e,L.Namespace.EXO.term("Instance_class"),void 0);for(let r of t)if(r.object instanceof nr.IRI){if(r.object.value===G6||r.object.value.includes(Ex))return!0}else if(r.object instanceof Yt.Literal){let i=this.unwrapWikilink(r.object.value);if(i==="exocmd__TokenInvocation"||i===Ex)return!0}return!1}async assetIsSubstitutionToken(e){let t=await this.tripleStore.match(e,L.Namespace.EXO.term("Instance_class"),void 0);for(let r of t)if(r.object instanceof nr.IRI){if(r.object.value===V6||r.object.value.includes(wx))return!0}else if(r.object instanceof Yt.Literal){let i=this.unwrapWikilink(r.object.value);if(i==="exocmd__SubstitutionToken"||i===wx)return!0}return!1}async resolveGroundingTypeReference(e){let t=await this.tripleStore.match(e,L.Namespace.EXOCMD.term("Grounding_type"),void 0);if(t.length===0)return null;let r=t[0].object;if(r instanceof nr.IRI)return(0,Sx.resolveGroundingTypeFromIRI)(r.value);if(r instanceof Yt.Literal){let i=r.value,s=i.match(/^\[\[([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\|[^\]]*)?\]\]$/i);return s?(0,Sx.resolveGroundingTypeFromIRI)(`obsidian://vault/${s[1].toLowerCase()}.md`):(this.logger.warn(`[exocmd-grounding-type-literal-form] legacy literal-string form '${i}' for exocmd__Grounding_type on <${e.value}>. Migrate to wikilink form per RFC 9d20c91f Phase 3.`),null)}return 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,L.Namespace.EXO.term("Asset_uid"),void 0);for(let r of t)if(r.object instanceof Yt.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 Yt.Literal||i instanceof nr.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,L.Namespace.EXO.term("Asset_label")):null}async getClassAncestors(e){let t=this._ancestorCache.get(e);if(t)return t;let r=new Set,i=new Set,s=await this.resolveClassFileIRI(e);if(!s)return[];let o=new Set([e]),l=await this.getLiteralValue(s,L.Namespace.EXO.term("Asset_uid"));l&&o.add(l);let c=await this.getLiteralValue(s,L.Namespace.EXO.term("Asset_label"));c&&o.add(c);let u=[{fileIRI:s,depth:0}];for(;u.length>0;){let d=u.shift();if(!d)break;let{fileIRI:h,depth:p}=d;if(p>=rm||i.has(h.value))continue;i.add(h.value);let g=await this.tripleStore.match(h,L.Namespace.EXO.term("Class_superClass"),void 0);for(let y of g){let v=y.object;if(!(v instanceof nr.IRI))continue;let w=v.value.startsWith("obsidian://vault/"),E=this.iriToObsidianName(v.value);E&&!o.has(E)&&!r.has(E)&&r.add(E);let A=null;if(w?A=v:E&&(A=await this.resolveClassFileIRI(E)),!A)continue;let x=await this.getLiteralValue(A,L.Namespace.EXO.term("Asset_uid"));x&&!o.has(x)&&!r.has(x)&&r.add(x),i.has(A.value)||u.push({fileIRI:A,depth:p+1})}}let f=Array.from(r);return this._ancestorCache.set(e,f),f}async resolveClassFileIRI(e){if(this.looksLikeUUID(e))return this.findSubjectByUID(e);let t=await this.findUidByLabel(e);return t?this.findSubjectByUID(t):null}async findUidByLabel(e){let t=await this.tripleStore.match(void 0,L.Namespace.EXO.term("Asset_label"),void 0);for(let r of t)if(r.object instanceof Yt.Literal&&r.object.value===e&&r.subject instanceof nr.IRI){let i=await this.tripleStore.match(r.subject,L.Namespace.EXO.term("Asset_uid"),void 0);if(i.length>0&&i[0].object instanceof Yt.Literal)return i[0].object.value}return 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 nr.IRI){let s=await this.tripleStore.match(i,L.Namespace.EXO.term("Asset_uid"),void 0);return s.length>0&&s[0].object instanceof Yt.Literal?s[0].object.value:i.value.split("/").pop()?.replace(".md","")??null}return i instanceof Yt.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 Yt.Literal?this.normalizeWikilink(i.value):i instanceof nr.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 Yt.Literal?this.unwrapWikilink(i.value):i instanceof nr.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 Yt.Literal)return this.resolveWikilinkAlias(i.value);if(i instanceof nr.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,L.Namespace.EXO.term("Asset_label"));return s?e.replace(`[[${r}]]`,`[[${r}|${s}]]`):e}iriToObsidianName(e){let t=e.match(/^https:\/\/exocortex\.my\/ontology\/([a-z][a-zA-Z0-9]*)#([^#]+)$/);if(t){let[,i,s]=t;return`${i}__${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}};ro.CommandResolver=O1;ro.CommandResolver=O1=P1=L6([(0,k6.injectable)(),N6("design:paramtypes",[Object,Object])],O1)});var D1=S(F1=>{"use strict";Object.defineProperty(F1,"__esModule",{value:!0});F1.validateExoQLAllowlist=z6;var nm=_f();function z6(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 nm.ExoQLForbiddenKeywordError("LOAD");throw new nm.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 nm.ExoQLForbiddenKeywordError("FROM")}if(Array.isArray(e.where))for(let t of e.where)im(t);if(Array.isArray(e.template))for(let t of e.template)im(t)}}a(z6,"validateExoQLAllowlist");function im(n){if(!n||typeof n!="object")return;if(n.type==="service")throw new nm.ExoQLForbiddenKeywordError("SERVICE");if(Array.isArray(n.patterns))for(let t of n.patterns)im(t);let e=n.where;if(Array.isArray(e))for(let t of e)im(t)}a(im,"walkPatternForBannedKeywords")});var L1=S(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});sm.DEFAULT_EVAL_CONFIG=void 0;sm.DEFAULT_EVAL_CONFIG=Object.freeze({enabled:!0,maxNestedEvalCount:100,maxAggregateEvalMillis:1e4})});var k1=S(N1=>{"use strict";Object.defineProperty(N1,"__esModule",{value:!0});N1.evaluateWithExoEval=Z6;var H6=rc(),Y6=ic(),Q6=Ac(),K6=D1(),X6=L1(),J6=_f();async function Z6(n,e={}){if(typeof n!="string")throw new TypeError("evaluateWithExoEval: sparql must be a string");let r=new H6.ExoQLParser().parse(n);if((0,K6.validateExoQLAllowlist)(r),!{...X6.DEFAULT_EVAL_CONFIG,...e.config??{}}.enabled)throw new J6.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 l=new Y6.ExoQLAlgebraTranslator().translate(r),c=new Q6.ExoQLQueryExecutor(e.store);return c.isAskQuery(l)?{kind:"ask",result:await c.executeAsk(l)}:c.isConstructQuery(l)?{kind:"construct",triples:await c.executeConstruct(l)}:{kind:"select",rows:await c.executeAll(l)}}a(Z6,"evaluateWithExoEval")});var Sf=S(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.liveClock=e7;om.frozenClock=t7;function e7(){return{now:a(()=>new Date,"now")}}a(e7,"liveClock");function t7(n){let e=new Date(n);return{now:a(()=>new Date(e.getTime()),"now")}}a(t7,"frozenClock")});var Cx=S(no=>{"use strict";var r7=no&&no.__decorate||function(n,e,t,r){var i=arguments.length,s=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,t):r,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(n,e,t,r);else for(var l=n.length-1;l>=0;l--)(o=n[l])&&(s=(i<3?o(s):i>3?o(e,t,s):o(e,t))||s);return i>3&&s&&Object.defineProperty(e,t,s),s},n7=no&&no.__metadata||function(n,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,e)},wf;Object.defineProperty(no,"__esModule",{value:!0});no.PreconditionEvaluator=void 0;var i7=Fe(),s7=rc(),o7=ic(),xx=Ac(),a7=k1(),l7=Sf(),vf=wf=class{static{a(this,"PreconditionEvaluator")}constructor(e,t,r){this.hostFunctions=new Map,this.askCache=new Map,this.tripleStore=e,this.queryBodyResolver=t,this.clock=r?.clock??(0,l7.liveClock)()}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,a7.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)}evaluateHostFunctionSync(e,t,r){return this.hostFunctions.has(e)?this.evaluateHostFunction(e,t,r):null}invalidateCache(){this.askCache.clear()}compileAsk(e){let t=this.substituteVariables(e,wf.SENTINEL_IRI),i=new s7.ExoQLParser().parse(t),o=new o7.ExoQLAlgebraTranslator().translate(i);return new xx.ExoQLQueryExecutor(this.tripleStore).isAskQuery(o)?o: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 o=this.compileAsk(e);if(!o)return!1;r=o,this.askCache.set(e,r)}let i=JSON.parse(JSON.stringify(r).replaceAll(wf.SENTINEL_IRI,t));return await new xx.ExoQLQueryExecutor(this.tripleStore).executeAsk(i)}catch{return!1}}substituteVariables(e,t){let r=this.clock.now(),i=r.toISOString(),s=i.slice(0,10),o=new Date(r.getTime()+wf.ALMATY_OFFSET_MS),l=o.getUTCFullYear(),c=o.getUTCMonth(),u=o.getUTCDate(),f=o.getUTCDay(),h=new Date(Date.UTC(l,c,u-1)).toISOString().slice(0,10),p=(f+6)%7,g=new Date(Date.UTC(l,c,u-p)),y=g.toISOString().slice(0,10),w=new Date(g.getTime()-10080*60*1e3).toISOString().slice(0,10),E=`${l}-${String(c+1).padStart(2,"0")}-01`,A=c===0?11:c-1,D=`${c===0?l-1:l}-${String(A+1).padStart(2,"0")}-01`,J=`${l}-01-01`;return e.replace(/\$target/g,`<${t}>`).replace(/\$now/g,`"${i}"^^xsd:dateTime`).replace(/\$yesterday/g,`"${h}"^^xsd:date`).replace(/\$thisWeekStart/g,`"${y}"^^xsd:date`).replace(/\$lastWeekStart/g,`"${w}"^^xsd:date`).replace(/\$thisMonthStart/g,`"${E}"^^xsd:date`).replace(/\$lastMonthStart/g,`"${D}"^^xsd:date`).replace(/\$thisYearStart/g,`"${J}"^^xsd:date`).replace(/\$today/g,`"${s}"^^xsd:date`)}};no.PreconditionEvaluator=vf;vf.SENTINEL_IRI="urn:exocortex:cache-sentinel:target";vf.ALMATY_OFFSET_MS=300*60*1e3;no.PreconditionEvaluator=vf=wf=r7([(0,i7.injectable)(),n7("design:paramtypes",[Object,Object,Object])],vf)});var Rx=S(io=>{"use strict";Object.defineProperty(io,"__esModule",{value:!0});io.hasUidFilename=io.hasNonUidFilename=void 0;io.registerDefaultHostFunctions=f7;var c7=a(n=>{let e=n.assetUid;if(typeof e!="string"||e.trim()==="")return!1;let t=n.fileBasename;return typeof t!="string"?!1:t!==e},"hasNonUidFilename");io.hasNonUidFilename=c7;var u7=a(n=>{let e=n.assetUid;if(typeof e!="string"||e.trim()==="")return!1;let t=n.fileBasename;return typeof t!="string"?!1:t===e},"hasUidFilename");io.hasUidFilename=u7;function f7(n){n.registerHostFunction("hasNonUidFilename",io.hasNonUidFilename),n.registerHostFunction("hasUidFilename",io.hasUidFilename)}a(f7,"registerDefaultHostFunctions")});var lm=S(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});am.liveUidGenerator=d7;am.seededUidGenerator=p7;var M1=vi();function d7(){return{next:a(()=>(0,M1.v4)(),"next")}}a(d7,"liveUidGenerator");var h7="6ba7b810-9dad-11d1-80b4-00c04fd430c8";function p7(n){let e=0,t=(0,M1.v5)(n,h7);return{next:a(()=>{let r=`${n}#${e}`;return e+=1,(0,M1.v5)(r,t)},"next")}}a(p7,"seededUidGenerator")});var Ef=S(xc=>{"use strict";Object.defineProperty(xc,"__esModule",{value:!0});xc.registerOrderSpecLoader=m7;xc.clearOrderSpecLoader=g7;xc.loadDefaultSpec=y7;xc.orderProperties=_7;var cm=null,Qo,um=!1;function m7(n){cm=n,Qo=void 0,um=!1}a(m7,"registerOrderSpecLoader");function g7(){cm=null,Qo=void 0,um=!1}a(g7,"clearOrderSpecLoader");function y7(){if(Qo!==void 0)return Qo;if(!cm)return Qo=null,null;try{Qo=cm()}catch(n){um||(console.warn("[OrderSpecResolver] loader threw, falling back to insertion order:",n),um=!0),Qo=null}return Qo}a(y7,"loadDefaultSpec");function _7(n,e){if(!e||e.head.length===0&&e.tail.length===0)return n;let t=Object.keys(n),r=new Set(e.head),i=new Set(e.tail),s=e.head.filter(u=>Object.prototype.hasOwnProperty.call(n,u)),o=e.tail.filter(u=>Object.prototype.hasOwnProperty.call(n,u)),l=t.filter(u=>!r.has(u)&&!i.has(u));e.middleStrategy==="alphabetical"&&l.sort((u,f)=>u.localeCompare(f));let c={};for(let u of s)c[u]=n[u];for(let u of l)c[u]=n[u];for(let u of o)c[u]=n[u];return c}a(_7,"orderProperties")});var _s=S(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});fm.FrontmatterService=void 0;var Px=Ef(),Tf=class n{static{a(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,o=null,l=a(()=>{s!==null&&o!==null&&(r[s]=o),s=null,o=null},"flushArray");for(let c of i){let u=/^ {2}- (.*)$/.exec(c);if(u){s!==null&&o!==null&&o.push(u[1].trim());continue}l();let f=/^([^:\s][^:]*):\s*(.*)$/.exec(c);if(!f)continue;let d=f[1].trim(),h=f[2].trim();h===""?(s=d,o=[]):r[d]=h}return l(),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 o=i.content;if(this.hasProperty(o,t)){let l=new RegExp(`${this.escapeRegex(t)}:.*(?:
|
|
@@ -456,7 +456,7 @@ To resolve:
|
|
|
456
456
|
`)}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){Jq.LoggingService.error("Error in telemetry hook",i instanceof Error?i:new Error(String(i)))}}};Eg.ApplicationErrorHandler=Dv});var zC=S(Tg=>{"use strict";Object.defineProperty(Tg,"__esModule",{value:!0});Tg.ApplicationErrorHandler=void 0;var Zq=WC();Object.defineProperty(Tg,"ApplicationErrorHandler",{enumerable:!0,get:a(function(){return Zq.ApplicationErrorHandler},"get")})});var Nv=S(Ag=>{"use strict";Object.defineProperty(Ag,"__esModule",{value:!0});Ag.ClassHierarchy=void 0;var eG="http://www.w3.org/2000/01/rdf-schema#subClassOf",Lv=class{static{a(this,"ClassHierarchy")}constructor(e){this.adjacency=new Map;for(let t of e){if(t.predicate.type!=="iri"||t.predicate.value!==eG||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 o=this.adjacency.get(s);if(o)for(let l of o){if(l===t)return!0;r.has(l)||i.push(l)}}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 o=this.adjacency.get(s);if(o)for(let l of o)t.add(l),r.has(l)||i.push(l)}return t}};Ag.ClassHierarchy=Lv});var YC=S(xs=>{"use strict";Object.defineProperty(xs,"__esModule",{value:!0});xs.ValidatorDaemon=xs.IDLE_TIMEOUT_MS=xs.DEFAULT_SOCKET_PATH=void 0;var HC=Ov(),tG=Rv(),rG=Nv();xs.DEFAULT_SOCKET_PATH=typeof process<"u"&&process.env?`${process.env.HOME??process.env.USERPROFILE??"/tmp"}/.cache/exocortex/validator.sock`:"/tmp/.cache/exocortex/validator.sock";xs.IDLE_TIMEOUT_MS=300*1e3;var kv=class{static{a(this,"ValidatorDaemon")}constructor(e=xs.DEFAULT_SOCKET_PATH,t=xs.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(o=>{this.handleConnection(o)});let i=this.server;await new Promise((o,l)=>{i.on("error",l),i.listen(this.socketPath,o)}),this.resetIdleTimer();let s=a(()=>{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(`
|
|
457
457
|
`);t=i.pop()??"";for(let s of i){let o=s.trim();o&&this.handleRequest(o,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),o=new rG.ClassHierarchy(i.subclassTriples??[]);r={report:(0,HC.validate)(i.triples,s,o,{closedWorldMode:i.closedWorldMode})}}catch(i){r={error:i instanceof Error?i.message:String(i)}}t.destroyed||t.write(JSON.stringify(r)+`
|
|
458
458
|
`)}async getRegistry(e){let t=this.registryCache.get(e);if(t)return t;let r=await tG.ShapeLoader.loadFromShapeJSON(e),i=new HC.ShapeRegistry(r.getAll());return this.registryCache.set(e,i),i}};xs.ValidatorDaemon=kv});var Ct=S(m=>{"use strict";var nG=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:a(function(){return e[t]},"get")}),Object.defineProperty(n,r,i)}):(function(n,e,t,r){r===void 0&&(r=t),n[r]=e[t]})),hi=m&&m.__exportStar||function(n,e){for(var t in n)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&nG(e,n,t)};Object.defineProperty(m,"__esModule",{value:!0});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.createVaultFrontmatterClassLabelResolver=m.ServiceRegistry=m.GroundingExecutor=m.registerDefaultHostFunctions=m.hasUidFilename=m.hasNonUidFilename=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.resolveGroundingTypeFromWikilinkLiteral=m.resolveGroundingTypeFromIRI=m.GROUNDING_TYPE_IRI_TO_ENUM=m.GROUNDING_TYPE_UID_TO_ENUM=m.GROUNDING_TYPE_UIDS=m.GroundingType=m.EFFORT_STATUS_OPTIONS=void 0;m.iriToVaultPath=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.orderProperties=m.loadDefaultSpec=m.clearOrderSpecLoader=m.registerOrderSpecLoader=m.DynamicFrontmatterGenerator=m.SupervisionCreationService=m.StatusTimestampService=m.RenameToUidService=m.PropertyCleanupService=m.LoggingService=void 0;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.shouldSkipFileForEffectiveSet=m.isPathExcluded=m.normaliseExcludedFolders=m.NoteToRDFConverter=m.SOURCE_VARIABLE=m.SourceAnnotator=m.MAX_LAZY_DEPTH=m.LazyAssetGraphLoader=m.IRICanonicalizer=m.INFERRED_GRAPH=m.PrototypeChainMaterializer=m.PropertyCardinalityRegistry=m.NonInheritablePropertyRegistry=m.RDFSInferenceEngine=m.RDFVocabularyMapper=m.DomainTriple=m.DomainBlankNode=m.DomainLiteral=m.DomainIRI=m.InMemoryTripleStore=m.OBSIDIAN_VAULT_SCHEME=void 0;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.seededUidGenerator=m.liveUidGenerator=m.frozenClock=m.liveClock=m.TransactionError=m.TripleNotFoundError=m.TripleAlreadyExistsError=m.FileAlreadyExistsError=m.FileNotFoundError=m.FilterContainsOptimizer=m.VaultPrefixTransformer=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=void 0;m.TripleClassHierarchy=m.IDLE_TIMEOUT_MS=m.DEFAULT_SOCKET_PATH=m.ValidatorDaemon=m.ShaclShapeRegistry=m.shaclValidate=m.Namespace=m.ShapeRegistry=m.ShapeLoader=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=void 0;hi($l(),m);hi(Ul(),m);var iG=G0();Object.defineProperty(m,"EFFORT_STATUS_OPTIONS",{enumerable:!0,get:a(function(){return iG.EFFORT_STATUS_OPTIONS},"get")});var sG=No();Object.defineProperty(m,"GroundingType",{enumerable:!0,get:a(function(){return sG.GroundingType},"get")});var Bf=hh();Object.defineProperty(m,"GROUNDING_TYPE_UIDS",{enumerable:!0,get:a(function(){return Bf.GROUNDING_TYPE_UIDS},"get")});Object.defineProperty(m,"GROUNDING_TYPE_UID_TO_ENUM",{enumerable:!0,get:a(function(){return Bf.GROUNDING_TYPE_UID_TO_ENUM},"get")});Object.defineProperty(m,"GROUNDING_TYPE_IRI_TO_ENUM",{enumerable:!0,get:a(function(){return Bf.GROUNDING_TYPE_IRI_TO_ENUM},"get")});Object.defineProperty(m,"resolveGroundingTypeFromIRI",{enumerable:!0,get:a(function(){return Bf.resolveGroundingTypeFromIRI},"get")});Object.defineProperty(m,"resolveGroundingTypeFromWikilinkLiteral",{enumerable:!0,get:a(function(){return Bf.resolveGroundingTypeFromWikilinkLiteral},"get")});var qf=W0();Object.defineProperty(m,"CommandProperty",{enumerable:!0,get:a(function(){return qf.CommandProperty},"get")});Object.defineProperty(m,"PreconditionProperty",{enumerable:!0,get:a(function(){return qf.PreconditionProperty},"get")});Object.defineProperty(m,"GroundingProperty",{enumerable:!0,get:a(function(){return qf.GroundingProperty},"get")});Object.defineProperty(m,"CommandBindingProperty",{enumerable:!0,get:a(function(){return qf.CommandBindingProperty},"get")});Object.defineProperty(m,"CommandBindingStyleProperty",{enumerable:!0,get:a(function(){return qf.CommandBindingStyleProperty},"get")});var Hc=z0();Object.defineProperty(m,"COMMAND_VARIANT_VALUES",{enumerable:!0,get:a(function(){return Hc.COMMAND_VARIANT_VALUES},"get")});Object.defineProperty(m,"LABEL_CLASS_VALUES",{enumerable:!0,get:a(function(){return Hc.LABEL_CLASS_VALUES},"get")});Object.defineProperty(m,"STYLE_SOURCE_VALUES",{enumerable:!0,get:a(function(){return Hc.STYLE_SOURCE_VALUES},"get")});Object.defineProperty(m,"isCommandVariant",{enumerable:!0,get:a(function(){return Hc.isCommandVariant},"get")});Object.defineProperty(m,"isLabelClass",{enumerable:!0,get:a(function(){return Hc.isLabelClass},"get")});Object.defineProperty(m,"isStyleSource",{enumerable:!0,get:a(function(){return Hc.isStyleSource},"get")});var Ig=YT();Object.defineProperty(m,"isCommandFrontmatter",{enumerable:!0,get:a(function(){return Ig.isCommandFrontmatter},"get")});Object.defineProperty(m,"isPreconditionFrontmatter",{enumerable:!0,get:a(function(){return Ig.isPreconditionFrontmatter},"get")});Object.defineProperty(m,"isGroundingFrontmatter",{enumerable:!0,get:a(function(){return Ig.isGroundingFrontmatter},"get")});Object.defineProperty(m,"isCommandBindingFrontmatter",{enumerable:!0,get:a(function(){return Ig.isCommandBindingFrontmatter},"get")});hi(QT(),m);hi(KT(),m);hi(H0(),m);hi(Y0(),m);hi(JT(),m);hi(tA(),m);hi(R_(),m);hi(BA(),m);var QC=Mh();Object.defineProperty(m,"PropertyFieldType",{enumerable:!0,get:a(function(){return QC.PropertyFieldType},"get")});Object.defineProperty(m,"rangeToFieldType",{enumerable:!0,get:a(function(){return QC.rangeToFieldType},"get")});var Mv=D_();Object.defineProperty(m,"propertyNameToUri",{enumerable:!0,get:a(function(){return Mv.propertyNameToUri},"get")});Object.defineProperty(m,"uriToPropertyName",{enumerable:!0,get:a(function(){return Mv.uriToPropertyName},"get")});Object.defineProperty(m,"extractPropertyLabel",{enumerable:!0,get:a(function(){return Mv.extractPropertyLabel},"get")});var oG=Ix();Object.defineProperty(m,"CommandResolver",{enumerable:!0,get:a(function(){return oG.CommandResolver},"get")});var aG=Cx();Object.defineProperty(m,"PreconditionEvaluator",{enumerable:!0,get:a(function(){return aG.PreconditionEvaluator},"get")});var jv=Rx();Object.defineProperty(m,"hasNonUidFilename",{enumerable:!0,get:a(function(){return jv.hasNonUidFilename},"get")});Object.defineProperty(m,"hasUidFilename",{enumerable:!0,get:a(function(){return jv.hasUidFilename},"get")});Object.defineProperty(m,"registerDefaultHostFunctions",{enumerable:!0,get:a(function(){return jv.registerDefaultHostFunctions},"get")});var KC=Nx();Object.defineProperty(m,"GroundingExecutor",{enumerable:!0,get:a(function(){return KC.GroundingExecutor},"get")});Object.defineProperty(m,"ServiceRegistry",{enumerable:!0,get:a(function(){return KC.ServiceRegistry},"get")});var lG=kx();Object.defineProperty(m,"createVaultFrontmatterClassLabelResolver",{enumerable:!0,get:a(function(){return lG.createVaultFrontmatterClassLabelResolver},"get")});var cG=Mx();Object.defineProperty(m,"CommandExecutionFlow",{enumerable:!0,get:a(function(){return cG.CommandExecutionFlow},"get")});var uG=oS();Object.defineProperty(m,"TaskStatusService",{enumerable:!0,get:a(function(){return uG.TaskStatusService},"get")});var fG=uS();Object.defineProperty(m,"AreaCreationService",{enumerable:!0,get:a(function(){return fG.AreaCreationService},"get")});var dG=dS();Object.defineProperty(m,"AreaHierarchyBuilder",{enumerable:!0,get:a(function(){return dG.AreaHierarchyBuilder},"get")});var hG=pS();Object.defineProperty(m,"ClassCreationService",{enumerable:!0,get:a(function(){return hG.ClassCreationService},"get")});var pG=gS();Object.defineProperty(m,"ConceptCreationService",{enumerable:!0,get:a(function(){return pG.ConceptCreationService},"get")});var mG=Am();Object.defineProperty(m,"EffortStatusWorkflow",{enumerable:!0,get:a(function(){return mG.EffortStatusWorkflow},"get")});var gG=If();Object.defineProperty(m,"WorkflowEngine",{enumerable:!0,get:a(function(){return gG.WorkflowEngine},"get")});var yG=Y1();Object.defineProperty(m,"WorkflowResolver",{enumerable:!0,get:a(function(){return yG.WorkflowResolver},"get")});var _G=Jx();Object.defineProperty(m,"InstantiationRuleResolver",{enumerable:!0,get:a(function(){return _G.InstantiationRuleResolver},"get")});var bG=Zx();Object.defineProperty(m,"VisibilityGenerator",{enumerable:!0,get:a(function(){return bG.VisibilityGenerator},"get")});var SG=e3();Object.defineProperty(m,"WorkflowCommandAdapter",{enumerable:!0,get:a(function(){return SG.WorkflowCommandAdapter},"get")});var wG=ES();Object.defineProperty(m,"EffortVotingService",{enumerable:!0,get:a(function(){return wG.EffortVotingService},"get")});var vG=AS();Object.defineProperty(m,"FolderRepairService",{enumerable:!0,get:a(function(){return vG.FolderRepairService},"get")});var EG=xS();Object.defineProperty(m,"LabelToAliasService",{enumerable:!0,get:a(function(){return EG.LabelToAliasService},"get")});var TG=Ko();Object.defineProperty(m,"LoggingService",{enumerable:!0,get:a(function(){return TG.LoggingService},"get")});var AG=PS();Object.defineProperty(m,"PropertyCleanupService",{enumerable:!0,get:a(function(){return AG.PropertyCleanupService},"get")});var IG=FS();Object.defineProperty(m,"RenameToUidService",{enumerable:!0,get:a(function(){return IG.RenameToUidService},"get")});var xG=xm();Object.defineProperty(m,"StatusTimestampService",{enumerable:!0,get:a(function(){return xG.StatusTimestampService},"get")});var CG=NS();Object.defineProperty(m,"SupervisionCreationService",{enumerable:!0,get:a(function(){return CG.SupervisionCreationService},"get")});var RG=MS();Object.defineProperty(m,"DynamicFrontmatterGenerator",{enumerable:!0,get:a(function(){return RG.DynamicFrontmatterGenerator},"get")});var xg=Ef();Object.defineProperty(m,"registerOrderSpecLoader",{enumerable:!0,get:a(function(){return xg.registerOrderSpecLoader},"get")});Object.defineProperty(m,"clearOrderSpecLoader",{enumerable:!0,get:a(function(){return xg.clearOrderSpecLoader},"get")});Object.defineProperty(m,"loadDefaultSpec",{enumerable:!0,get:a(function(){return xg.loadDefaultSpec},"get")});Object.defineProperty(m,"orderProperties",{enumerable:!0,get:a(function(){return xg.orderProperties},"get")});var PG=$S();Object.defineProperty(m,"AlgorithmExtractor",{enumerable:!0,get:a(function(){return PG.AlgorithmExtractor},"get")});var OG=VS();Object.defineProperty(m,"PlanningService",{enumerable:!0,get:a(function(){return OG.PlanningService},"get")});var FG=d3();Object.defineProperty(m,"PropertySchemaResolver",{enumerable:!0,get:a(function(){return FG.PropertySchemaResolver},"get")});var DG=h3();Object.defineProperty(m,"ClassHierarchyResolver",{enumerable:!0,get:a(function(){return DG.ClassHierarchyResolver},"get")});var LG=p3();Object.defineProperty(m,"EnumValueResolver",{enumerable:!0,get:a(function(){return LG.EnumValueResolver},"get")});var NG=zS();Object.defineProperty(m,"AssetConversionService",{enumerable:!0,get:a(function(){return NG.AssetConversionService},"get")});var kG=QS();Object.defineProperty(m,"SessionEventService",{enumerable:!0,get:a(function(){return kG.SessionEventService},"get")});var MG=JS();Object.defineProperty(m,"URIConstructionService",{enumerable:!0,get:a(function(){return MG.URIConstructionService},"get")});var jG=ew();Object.defineProperty(m,"GenericAssetCreationService",{enumerable:!0,get:a(function(){return jG.GenericAssetCreationService},"get")});var $G=T3();Object.defineProperty(m,"ArchiveAssetService",{enumerable:!0,get:a(function(){return $G.ArchiveAssetService},"get")});var UG=I3();Object.defineProperty(m,"FixMissingLabelService",{enumerable:!0,get:a(function(){return UG.FixMissingLabelService},"get")});var VG=x3();Object.defineProperty(m,"GraphQueryService",{enumerable:!0,get:a(function(){return VG.GraphQueryService},"get")});var BG=R3();Object.defineProperty(m,"TypeRegistry",{enumerable:!0,get:a(function(){return BG.TypeRegistry},"get")});var XC=P3();Object.defineProperty(m,"NLToSPARQLService",{enumerable:!0,get:a(function(){return XC.NLToSPARQLService},"get")});Object.defineProperty(m,"DEFAULT_NL_TO_SPARQL_CONFIG",{enumerable:!0,get:a(function(){return XC.DEFAULT_NL_TO_SPARQL_CONFIG},"get")});var pi=sw();Object.defineProperty(m,"SPARQL_TEMPLATES",{enumerable:!0,get:a(function(){return pi.SPARQL_TEMPLATES},"get")});Object.defineProperty(m,"SPARQL_PREFIXES",{enumerable:!0,get:a(function(){return pi.SPARQL_PREFIXES},"get")});Object.defineProperty(m,"PREDICATES",{enumerable:!0,get:a(function(){return pi.PREDICATES},"get")});Object.defineProperty(m,"ASSET_CLASSES",{enumerable:!0,get:a(function(){return pi.ASSET_CLASSES},"get")});Object.defineProperty(m,"EFFORT_STATUSES",{enumerable:!0,get:a(function(){return pi.EFFORT_STATUSES},"get")});Object.defineProperty(m,"KNOWN_PROTOTYPES",{enumerable:!0,get:a(function(){return pi.KNOWN_PROTOTYPES},"get")});Object.defineProperty(m,"KNOWN_CLASSES",{enumerable:!0,get:a(function(){return pi.KNOWN_CLASSES},"get")});Object.defineProperty(m,"findClassByTerm",{enumerable:!0,get:a(function(){return pi.findClassByTerm},"get")});Object.defineProperty(m,"findMatchingTemplates",{enumerable:!0,get:a(function(){return pi.findMatchingTemplates},"get")});Object.defineProperty(m,"fillTemplate",{enumerable:!0,get:a(function(){return pi.fillTemplate},"get")});Object.defineProperty(m,"validateParameters",{enumerable:!0,get:a(function(){return pi.validateParameters},"get")});Object.defineProperty(m,"getTemplateByName",{enumerable:!0,get:a(function(){return pi.getTemplateByName},"get")});var JC=lw();Object.defineProperty(m,"CriticalityZoneService",{enumerable:!0,get:a(function(){return JC.CriticalityZoneService},"get")});Object.defineProperty(m,"CriticalityZoneUUIDs",{enumerable:!0,get:a(function(){return JC.CriticalityZoneUUIDs},"get")});var qG=_s();Object.defineProperty(m,"FrontmatterService",{enumerable:!0,get:a(function(){return qG.FrontmatterService},"get")});var GG=Mn();Object.defineProperty(m,"DateFormatter",{enumerable:!0,get:a(function(){return GG.DateFormatter},"get")});var WG=fs();Object.defineProperty(m,"WikiLinkHelpers",{enumerable:!0,get:a(function(){return WG.WikiLinkHelpers},"get")});var zG=lo();Object.defineProperty(m,"MetadataHelpers",{enumerable:!0,get:a(function(){return zG.MetadataHelpers},"get")});var HG=lS();Object.defineProperty(m,"MetadataExtractor",{enumerable:!0,get:a(function(){return HG.MetadataExtractor},"get")});var YG=F3();Object.defineProperty(m,"EffortSortingHelpers",{enumerable:!0,get:a(function(){return YG.EffortSortingHelpers},"get")});var QG=D3();Object.defineProperty(m,"FilenameValidator",{enumerable:!0,get:a(function(){return QG.FilenameValidator},"get")});var KG=U3();Object.defineProperty(m,"RDFSerializer",{enumerable:!0,get:a(function(){return KG.RDFSerializer},"get")});var XG=zl();Object.defineProperty(m,"NullLogger",{enumerable:!0,get:a(function(){return XG.NullLogger},"get")});var $v=Sw();Object.defineProperty(m,"vaultPathToIRI",{enumerable:!0,get:a(function(){return $v.vaultPathToIRI},"get")});Object.defineProperty(m,"iriToVaultPath",{enumerable:!0,get:a(function(){return $v.iriToVaultPath},"get")});Object.defineProperty(m,"OBSIDIAN_VAULT_SCHEME",{enumerable:!0,get:a(function(){return $v.OBSIDIAN_VAULT_SCHEME},"get")});var JG=rS();Object.defineProperty(m,"InMemoryTripleStore",{enumerable:!0,get:a(function(){return JG.InMemoryTripleStore},"get")});var ZG=Ce();Object.defineProperty(m,"DomainIRI",{enumerable:!0,get:a(function(){return ZG.IRI},"get")});var eW=Ue();Object.defineProperty(m,"DomainLiteral",{enumerable:!0,get:a(function(){return eW.Literal},"get")});var tW=Ut();Object.defineProperty(m,"DomainBlankNode",{enumerable:!0,get:a(function(){return tW.BlankNode},"get")});var rW=Hn();Object.defineProperty(m,"DomainTriple",{enumerable:!0,get:a(function(){return rW.Triple},"get")});var nW=vw();Object.defineProperty(m,"RDFVocabularyMapper",{enumerable:!0,get:a(function(){return nW.RDFVocabularyMapper},"get")});var iW=B3();Object.defineProperty(m,"RDFSInferenceEngine",{enumerable:!0,get:a(function(){return iW.RDFSInferenceEngine},"get")});var sW=Iw();Object.defineProperty(m,"NonInheritablePropertyRegistry",{enumerable:!0,get:a(function(){return sW.NonInheritablePropertyRegistry},"get")});var oW=Rw();Object.defineProperty(m,"PropertyCardinalityRegistry",{enumerable:!0,get:a(function(){return oW.PropertyCardinalityRegistry},"get")});var ZC=Fw();Object.defineProperty(m,"PrototypeChainMaterializer",{enumerable:!0,get:a(function(){return ZC.PrototypeChainMaterializer},"get")});Object.defineProperty(m,"INFERRED_GRAPH",{enumerable:!0,get:a(function(){return ZC.INFERRED_GRAPH},"get")});var aW=Q3();Object.defineProperty(m,"IRICanonicalizer",{enumerable:!0,get:a(function(){return aW.IRICanonicalizer},"get")});var eR=K3();Object.defineProperty(m,"LazyAssetGraphLoader",{enumerable:!0,get:a(function(){return eR.LazyAssetGraphLoader},"get")});Object.defineProperty(m,"MAX_LAZY_DEPTH",{enumerable:!0,get:a(function(){return eR.MAX_LAZY_DEPTH},"get")});var tR=Mw();Object.defineProperty(m,"SourceAnnotator",{enumerable:!0,get:a(function(){return tR.SourceAnnotator},"get")});Object.defineProperty(m,"SOURCE_VARIABLE",{enumerable:!0,get:a(function(){return tR.SOURCE_VARIABLE},"get")});var Cg=Vw();Object.defineProperty(m,"NoteToRDFConverter",{enumerable:!0,get:a(function(){return Cg.NoteToRDFConverter},"get")});Object.defineProperty(m,"normaliseExcludedFolders",{enumerable:!0,get:a(function(){return Cg.normaliseExcludedFolders},"get")});Object.defineProperty(m,"isPathExcluded",{enumerable:!0,get:a(function(){return Cg.isPathExcluded},"get")});Object.defineProperty(m,"shouldSkipFileForEffectiveSet",{enumerable:!0,get:a(function(){return Cg.shouldSkipFileForEffectiveSet},"get")});var Uv=rc();Object.defineProperty(m,"ExoQLParser",{enumerable:!0,get:a(function(){return Uv.ExoQLParser},"get")});Object.defineProperty(m,"SPARQLParser",{enumerable:!0,get:a(function(){return Uv.SPARQLParser},"get")});Object.defineProperty(m,"SPARQLParseError",{enumerable:!0,get:a(function(){return Uv.SPARQLParseError},"get")});var rR=Ob();Object.defineProperty(m,"DescribeOptionsTransformer",{enumerable:!0,get:a(function(){return rR.DescribeOptionsTransformer},"get")});Object.defineProperty(m,"DescribeOptionsTransformerError",{enumerable:!0,get:a(function(){return rR.DescribeOptionsTransformerError},"get")});var nR=ic();Object.defineProperty(m,"ExoQLAlgebraTranslator",{enumerable:!0,get:a(function(){return nR.ExoQLAlgebraTranslator},"get")});Object.defineProperty(m,"AlgebraTranslator",{enumerable:!0,get:a(function(){return nR.AlgebraTranslator},"get")});var lW=nC();Object.defineProperty(m,"AlgebraOptimizer",{enumerable:!0,get:a(function(){return lW.AlgebraOptimizer},"get")});var cW=iC();Object.defineProperty(m,"AlgebraSerializer",{enumerable:!0,get:a(function(){return cW.AlgebraSerializer},"get")});var uW=Qb();Object.defineProperty(m,"BGPExecutor",{enumerable:!0,get:a(function(){return uW.BGPExecutor},"get")});var fW=Wp();Object.defineProperty(m,"FilterExecutor",{enumerable:!0,get:a(function(){return fW.FilterExecutor},"get")});var dW=p1();Object.defineProperty(m,"OptionalExecutor",{enumerable:!0,get:a(function(){return dW.OptionalExecutor},"get")});var hW=g1();Object.defineProperty(m,"UnionExecutor",{enumerable:!0,get:a(function(){return hW.UnionExecutor},"get")});var pW=I1();Object.defineProperty(m,"ConstructExecutor",{enumerable:!0,get:a(function(){return pW.ConstructExecutor},"get")});var mW=oC();Object.defineProperty(m,"DescribeExecutor",{enumerable:!0,get:a(function(){return mW.DescribeExecutor},"get")});var iR=Ac();Object.defineProperty(m,"ExoQLQueryExecutor",{enumerable:!0,get:a(function(){return iR.ExoQLQueryExecutor},"get")});Object.defineProperty(m,"QueryExecutor",{enumerable:!0,get:a(function(){return iR.QueryExecutor},"get")});var sR=lC();Object.defineProperty(m,"UpdateExecutor",{enumerable:!0,get:a(function(){return sR.UpdateExecutor},"get")});Object.defineProperty(m,"UpdateExecutorError",{enumerable:!0,get:a(function(){return sR.UpdateExecutorError},"get")});var gW=ps();Object.defineProperty(m,"SolutionMapping",{enumerable:!0,get:a(function(){return gW.SolutionMapping},"get")});var yW=Gp();Object.defineProperty(m,"BuiltInFunctions",{enumerable:!0,get:a(function(){return yW.BuiltInFunctions},"get")});var _W=uC();Object.defineProperty(m,"AggregateFunctions",{enumerable:!0,get:a(function(){return _W.AggregateFunctions},"get")});var oR=b1();Object.defineProperty(m,"CustomAggregateRegistry",{enumerable:!0,get:a(function(){return oR.CustomAggregateRegistry},"get")});Object.defineProperty(m,"CustomAggregateError",{enumerable:!0,get:a(function(){return oR.CustomAggregateError},"get")});var Cs=S1();Object.defineProperty(m,"BUILT_IN_AGGREGATES",{enumerable:!0,get:a(function(){return Cs.BUILT_IN_AGGREGATES},"get")});Object.defineProperty(m,"EXO_AGGREGATE_NS",{enumerable:!0,get:a(function(){return Cs.EXO_AGGREGATE_NS},"get")});Object.defineProperty(m,"medianAggregate",{enumerable:!0,get:a(function(){return Cs.medianAggregate},"get")});Object.defineProperty(m,"varianceAggregate",{enumerable:!0,get:a(function(){return Cs.varianceAggregate},"get")});Object.defineProperty(m,"stddevAggregate",{enumerable:!0,get:a(function(){return Cs.stddevAggregate},"get")});Object.defineProperty(m,"modeAggregate",{enumerable:!0,get:a(function(){return Cs.modeAggregate},"get")});Object.defineProperty(m,"createPercentileAggregate",{enumerable:!0,get:a(function(){return Cs.createPercentileAggregate},"get")});Object.defineProperty(m,"getNumericValue",{enumerable:!0,get:a(function(){return Cs.getNumericValue},"get")});Object.defineProperty(m,"createDecimalLiteral",{enumerable:!0,get:a(function(){return Cs.createDecimalLiteral},"get")});Object.defineProperty(m,"createDoubleLiteral",{enumerable:!0,get:a(function(){return Cs.createDoubleLiteral},"get")});var bW=fC();Object.defineProperty(m,"QueryPlanCache",{enumerable:!0,get:a(function(){return bW.QueryPlanCache},"get")});var aR=dC();Object.defineProperty(m,"SPARQLResultCache",{enumerable:!0,get:a(function(){return aR.SPARQLResultCache},"get")});Object.defineProperty(m,"createSPARQLResultCache",{enumerable:!0,get:a(function(){return aR.createSPARQLResultCache},"get")});var lR=hC();Object.defineProperty(m,"IncrementalIndexer",{enumerable:!0,get:a(function(){return lR.IncrementalIndexer},"get")});Object.defineProperty(m,"createIncrementalIndexer",{enumerable:!0,get:a(function(){return lR.createIncrementalIndexer},"get")});var SW=pC();Object.defineProperty(m,"ResultSerializer",{enumerable:!0,get:a(function(){return SW.ResultSerializer},"get")});var cR=Cb();Object.defineProperty(m,"CaseWhenTransformer",{enumerable:!0,get:a(function(){return cR.CaseWhenTransformer},"get")});Object.defineProperty(m,"CaseWhenTransformerError",{enumerable:!0,get:a(function(){return cR.CaseWhenTransformerError},"get")});var wW=Nb();Object.defineProperty(m,"VaultPrefixTransformer",{enumerable:!0,get:a(function(){return wW.VaultPrefixTransformer},"get")});var vW=qw();Object.defineProperty(m,"FilterContainsOptimizer",{enumerable:!0,get:a(function(){return vW.FilterContainsOptimizer},"get")});var uR=mC();Object.defineProperty(m,"FileNotFoundError",{enumerable:!0,get:a(function(){return uR.FileNotFoundError},"get")});Object.defineProperty(m,"FileAlreadyExistsError",{enumerable:!0,get:a(function(){return uR.FileAlreadyExistsError},"get")});var Vv=J1();Object.defineProperty(m,"TripleAlreadyExistsError",{enumerable:!0,get:a(function(){return Vv.TripleAlreadyExistsError},"get")});Object.defineProperty(m,"TripleNotFoundError",{enumerable:!0,get:a(function(){return Vv.TripleNotFoundError},"get")});Object.defineProperty(m,"TransactionError",{enumerable:!0,get:a(function(){return Vv.TransactionError},"get")});var fR=Sf();Object.defineProperty(m,"liveClock",{enumerable:!0,get:a(function(){return fR.liveClock},"get")});Object.defineProperty(m,"frozenClock",{enumerable:!0,get:a(function(){return fR.frozenClock},"get")});var dR=lm();Object.defineProperty(m,"liveUidGenerator",{enumerable:!0,get:a(function(){return dR.liveUidGenerator},"get")});Object.defineProperty(m,"seededUidGenerator",{enumerable:!0,get:a(function(){return dR.seededUidGenerator},"get")});var Rg=rv();Object.defineProperty(m,"VaultSettings",{enumerable:!0,get:a(function(){return Rg.VaultSettings},"get")});Object.defineProperty(m,"DEFAULT_OWNER_IDENTITY",{enumerable:!0,get:a(function(){return Rg.DEFAULT_OWNER_IDENTITY},"get")});Object.defineProperty(m,"DEFAULT_INBOX_FOLDER",{enumerable:!0,get:a(function(){return Rg.DEFAULT_INBOX_FOLDER},"get")});Object.defineProperty(m,"DEFAULT_FLEETING_NOTE_CLASS_UID",{enumerable:!0,get:a(function(){return Rg.DEFAULT_FLEETING_NOTE_CLASS_UID},"get")});var EW=Dt();Object.defineProperty(m,"DI_TOKENS",{enumerable:!0,get:a(function(){return EW.DI_TOKENS},"get")});var Gf=gC();Object.defineProperty(m,"registerCoreServices",{enumerable:!0,get:a(function(){return Gf.registerCoreServices},"get")});Object.defineProperty(m,"createChildContainer",{enumerable:!0,get:a(function(){return Gf.createChildContainer},"get")});Object.defineProperty(m,"getContainer",{enumerable:!0,get:a(function(){return Gf.getContainer},"get")});Object.defineProperty(m,"resetContainer",{enumerable:!0,get:a(function(){return Gf.resetContainer},"get")});Object.defineProperty(m,"container",{enumerable:!0,get:a(function(){return Gf.container},"get")});var Eo=vC();Object.defineProperty(m,"NODE_FLAGS",{enumerable:!0,get:a(function(){return Eo.NODE_FLAGS},"get")});Object.defineProperty(m,"DEFAULT_COLORS",{enumerable:!0,get:a(function(){return Eo.DEFAULT_COLORS},"get")});Object.defineProperty(m,"StringTable",{enumerable:!0,get:a(function(){return Eo.StringTable},"get")});Object.defineProperty(m,"CompactGraphStore",{enumerable:!0,get:a(function(){return Eo.CompactGraphStore},"get")});Object.defineProperty(m,"MemoryPool",{enumerable:!0,get:a(function(){return Eo.MemoryPool},"get")});Object.defineProperty(m,"getGlobalPool",{enumerable:!0,get:a(function(){return Eo.getGlobalPool},"get")});Object.defineProperty(m,"resetGlobalPool",{enumerable:!0,get:a(function(){return Eo.resetGlobalPool},"get")});Object.defineProperty(m,"StreamingLoader",{enumerable:!0,get:a(function(){return Eo.StreamingLoader},"get")});Object.defineProperty(m,"createStreamingSource",{enumerable:!0,get:a(function(){return Eo.createStreamingSource},"get")});var hR=EC();Object.defineProperty(m,"ExoQL",{enumerable:!0,get:a(function(){return hR.ExoQL},"get")});Object.defineProperty(m,"ExoQLError",{enumerable:!0,get:a(function(){return hR.ExoQLError},"get")});var Yc=cg();Object.defineProperty(m,"RELATION_COLUMN_SET_CLASS_IRI",{enumerable:!0,get:a(function(){return Yc.RELATION_COLUMN_SET_CLASS_IRI},"get")});Object.defineProperty(m,"RELATION_COLUMN_SET_CLASS_UID",{enumerable:!0,get:a(function(){return Yc.RELATION_COLUMN_SET_CLASS_UID},"get")});Object.defineProperty(m,"createRelationColumnSetFromFrontmatter",{enumerable:!0,get:a(function(){return Yc.createRelationColumnSetFromFrontmatter},"get")});Object.defineProperty(m,"isRelationColumnSet",{enumerable:!0,get:a(function(){return Yc.isRelationColumnSet},"get")});Object.defineProperty(m,"isRelationColumnSetFrontmatter",{enumerable:!0,get:a(function(){return Yc.isRelationColumnSetFrontmatter},"get")});Object.defineProperty(m,"normalizeRelationColumnSetRef",{enumerable:!0,get:a(function(){return Yc.normalizeRef},"get")});var TW=FC();Object.defineProperty(m,"RelationColumnSetResolver",{enumerable:!0,get:a(function(){return TW.RelationColumnSetResolver},"get")});var Wf=cg();Object.defineProperty(m,"LAYOUT_CLASS_IRI",{enumerable:!0,get:a(function(){return Wf.LAYOUT_CLASS_IRI},"get")});Object.defineProperty(m,"LAYOUT_CLASS_UID",{enumerable:!0,get:a(function(){return Wf.LAYOUT_CLASS_UID},"get")});Object.defineProperty(m,"createLayoutFromFrontmatter",{enumerable:!0,get:a(function(){return Wf.createLayoutFromFrontmatter},"get")});Object.defineProperty(m,"isLayout",{enumerable:!0,get:a(function(){return Wf.isLayout},"get")});Object.defineProperty(m,"isLayoutFrontmatter",{enumerable:!0,get:a(function(){return Wf.isLayoutFrontmatter},"get")});var ia=cg();Object.defineProperty(m,"BACKLINKS_TABLE_BLOCK_CLASS_IRI",{enumerable:!0,get:a(function(){return ia.BACKLINKS_TABLE_BLOCK_CLASS_IRI},"get")});Object.defineProperty(m,"BACKLINKS_TABLE_BLOCK_CLASS_UID",{enumerable:!0,get:a(function(){return ia.BACKLINKS_TABLE_BLOCK_CLASS_UID},"get")});Object.defineProperty(m,"PROPERTIES_BLOCK_CLASS_IRI",{enumerable:!0,get:a(function(){return ia.PROPERTIES_BLOCK_CLASS_IRI},"get")});Object.defineProperty(m,"PROPERTIES_BLOCK_CLASS_UID",{enumerable:!0,get:a(function(){return ia.PROPERTIES_BLOCK_CLASS_UID},"get")});Object.defineProperty(m,"createLayoutBlockFromFrontmatter",{enumerable:!0,get:a(function(){return ia.createLayoutBlockFromFrontmatter},"get")});Object.defineProperty(m,"isBacklinksTableBlock",{enumerable:!0,get:a(function(){return ia.isBacklinksTableBlock},"get")});Object.defineProperty(m,"isLayoutBlockFrontmatter",{enumerable:!0,get:a(function(){return ia.isLayoutBlockFrontmatter},"get")});Object.defineProperty(m,"isPropertiesBlock",{enumerable:!0,get:a(function(){return ia.isPropertiesBlock},"get")});var pR=LC();Object.defineProperty(m,"LayoutSelector",{enumerable:!0,get:a(function(){return pR.LayoutSelector},"get")});Object.defineProperty(m,"selectByPriority",{enumerable:!0,get:a(function(){return pR.selectByPriority},"get")});hi(qC(),m);var AW=Rv();Object.defineProperty(m,"ShapeLoader",{enumerable:!0,get:a(function(){return AW.ShapeLoader},"get")});var IW=Iv();Object.defineProperty(m,"ShapeRegistry",{enumerable:!0,get:a(function(){return IW.ShapeRegistry},"get")});var xW=tr();Object.defineProperty(m,"Namespace",{enumerable:!0,get:a(function(){return xW.Namespace},"get")});var mR=Ov();Object.defineProperty(m,"shaclValidate",{enumerable:!0,get:a(function(){return mR.validate},"get")});Object.defineProperty(m,"ShaclShapeRegistry",{enumerable:!0,get:a(function(){return mR.ShapeRegistry},"get")});hi(zC(),m);var Bv=YC();Object.defineProperty(m,"ValidatorDaemon",{enumerable:!0,get:a(function(){return Bv.ValidatorDaemon},"get")});Object.defineProperty(m,"DEFAULT_SOCKET_PATH",{enumerable:!0,get:a(function(){return Bv.DEFAULT_SOCKET_PATH},"get")});Object.defineProperty(m,"IDLE_TIMEOUT_MS",{enumerable:!0,get:a(function(){return Bv.IDLE_TIMEOUT_MS},"get")});var CW=Nv();Object.defineProperty(m,"TripleClassHierarchy",{enumerable:!0,get:a(function(){return CW.ClassHierarchy},"get")})});var Tr=S(qv=>{"use strict";qv.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})};qv.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 yR=S((Pde,gR)=>{var sa=require("constants"),RW=process.cwd,Pg=null,PW=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return Pg||(Pg=RW.call(process)),Pg};try{process.cwd()}catch{}typeof process.chdir=="function"&&(Gv=process.chdir,process.chdir=function(n){Pg=null,Gv.call(process,n)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,Gv));var Gv;gR.exports=OW;function OW(n){sa.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=o(n.chownSync),n.fchownSync=o(n.fchownSync),n.lchownSync=o(n.lchownSync),n.chmodSync=i(n.chmodSync),n.fchmodSync=i(n.fchmodSync),n.lchmodSync=i(n.lchmodSync),n.stat=l(n.stat),n.fstat=l(n.fstat),n.lstat=l(n.lstat),n.statSync=c(n.statSync),n.fstatSync=c(n.fstatSync),n.lstatSync=c(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(){}),PW==="win32"&&(n.rename=typeof n.rename!="function"?n.rename:(function(f){function d(h,p,g){var y=Date.now(),v=0;f(h,p,a(function w(E){if(E&&(E.code==="EACCES"||E.code==="EPERM"||E.code==="EBUSY")&&Date.now()-y<6e4){setTimeout(function(){n.stat(p,function(A,x){A&&A.code==="ENOENT"?f(h,p,w):g(E)})},v),v<100&&(v+=10);return}g&&g(E)},"CB"))}return a(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,g,y,v,w){var E;if(w&&typeof w=="function"){var A=0;E=a(function(x,D,J){if(x&&x.code==="EAGAIN"&&A<10)return A++,f.call(n,h,p,g,y,v,E);w.apply(this,arguments)},"callback")}return f.call(n,h,p,g,y,v,E)}return a(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,g,y){for(var v=0;;)try{return f.call(n,d,h,p,g,y)}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,sa.O_WRONLY|sa.O_SYMLINK,h,function(g,y){if(g){p&&p(g);return}f.fchmod(y,h,function(v){f.close(y,function(w){p&&p(v||w)})})})},f.lchmodSync=function(d,h){var p=f.openSync(d,sa.O_WRONLY|sa.O_SYMLINK,h),g=!0,y;try{y=f.fchmodSync(p,h),g=!1}finally{if(g)try{f.closeSync(p)}catch{}else f.closeSync(p)}return y}}a(e,"patchLchmod");function t(f){sa.hasOwnProperty("O_SYMLINK")&&f.futimes?(f.lutimes=function(d,h,p,g){f.open(d,sa.O_SYMLINK,function(y,v){if(y){g&&g(y);return}f.futimes(v,h,p,function(w){f.close(v,function(E){g&&g(w||E)})})})},f.lutimesSync=function(d,h,p){var g=f.openSync(d,sa.O_SYMLINK),y,v=!0;try{y=f.futimesSync(g,h,p),v=!1}finally{if(v)try{f.closeSync(g)}catch{}else f.closeSync(g)}return y}):f.futimes&&(f.lutimes=function(d,h,p,g){g&&process.nextTick(g)},f.lutimesSync=function(){})}a(t,"patchLutimes");function r(f){return f&&function(d,h,p){return f.call(n,d,h,function(g){u(g)&&(g=null),p&&p.apply(this,arguments)})}}a(r,"chmodFix");function i(f){return f&&function(d,h){try{return f.call(n,d,h)}catch(p){if(!u(p))throw p}}}a(i,"chmodFixSync");function s(f){return f&&function(d,h,p,g){return f.call(n,d,h,p,function(y){u(y)&&(y=null),g&&g.apply(this,arguments)})}}a(s,"chownFix");function o(f){return f&&function(d,h,p){try{return f.call(n,d,h,p)}catch(g){if(!u(g))throw g}}}a(o,"chownFixSync");function l(f){return f&&function(d,h,p){typeof h=="function"&&(p=h,h=null);function g(y,v){v&&(v.uid<0&&(v.uid+=4294967296),v.gid<0&&(v.gid+=4294967296)),p&&p.apply(this,arguments)}return a(g,"callback"),h?f.call(n,d,h,g):f.call(n,d,g)}}a(l,"statFix");function c(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}}a(c,"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"))}a(u,"chownErOk")}a(OW,"patch")});var SR=S((Fde,bR)=>{var _R=require("stream").Stream;bR.exports=FW;function FW(n){return{ReadStream:e,WriteStream:t};function e(r,i){if(!(this instanceof e))return new e(r,i);_R.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 o=Object.keys(i),l=0,c=o.length;l<c;l++){var u=o[l];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);_R.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),o=0,l=s.length;o<l;o++){var c=s[o];this[c]=i[c]}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())}}a(FW,"legacy")});var vR=S((Lde,wR)=>{"use strict";wR.exports=LW;var DW=Object.getPrototypeOf||function(n){return n.__proto__};function LW(n){if(n===null||typeof n!="object")return n;if(n instanceof Object)var e={__proto__:DW(n)};else var e=Object.create(null);return Object.getOwnPropertyNames(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}),e}a(LW,"clone")});var Kc=S((kde,Hv)=>{var Bt=require("fs"),NW=yR(),kW=SR(),MW=vR(),Og=require("util"),Ur,Dg;typeof Symbol=="function"&&typeof Symbol.for=="function"?(Ur=Symbol.for("graceful-fs.queue"),Dg=Symbol.for("graceful-fs.previous")):(Ur="___graceful-fs.queue",Dg="___graceful-fs.previous");function jW(){}a(jW,"noop");function AR(n,e){Object.defineProperty(n,Ur,{get:a(function(){return e},"get")})}a(AR,"publishQueue");var fl=jW;Og.debuglog?fl=Og.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(fl=a(function(){var n=Og.format.apply(Og,arguments);n="GFS4: "+n.split(/\n/).join(`
|
|
459
|
-
GFS4: `),console.error(n)},"debug"));Bt[Ur]||(ER=global[Ur]||[],AR(Bt,ER),Bt.close=(function(n){function e(t,r){return n.call(Bt,t,function(i){i||TR(),typeof r=="function"&&r.apply(this,arguments)})}return a(e,"close"),Object.defineProperty(e,Dg,{value:n}),e})(Bt.close),Bt.closeSync=(function(n){function e(t){n.apply(Bt,arguments),TR()}return a(e,"closeSync"),Object.defineProperty(e,Dg,{value:n}),e})(Bt.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){fl(Bt[Ur]),require("assert").equal(Bt[Ur].length,0)}));var ER;global[Ur]||AR(global,Bt[Ur]);Hv.exports=Wv(MW(Bt));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Bt.__patched&&(Hv.exports=Wv(Bt),Bt.__patched=!0);function Wv(n){NW(n),n.gracefulify=Wv,n.createReadStream=D,n.createWriteStream=J;var e=n.readFile;n.readFile=t;function t(N,Q,oe){return typeof Q=="function"&&(oe=Q,Q=null),B(N,Q,oe);function B(K,ne,G,ie){return e(K,ne,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Qc([B,[K,ne,G],W,ie||Date.now(),Date.now()]):typeof G=="function"&&G.apply(this,arguments)})}a(B,"go$readFile")}a(t,"readFile");var r=n.writeFile;n.writeFile=i;function i(N,Q,oe,B){return typeof oe=="function"&&(B=oe,oe=null),K(N,Q,oe,B);function K(ne,G,ie,W,V){return r(ne,G,ie,function(q){q&&(q.code==="EMFILE"||q.code==="ENFILE")?Qc([K,[ne,G,ie,W],q,V||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}a(K,"go$writeFile")}a(i,"writeFile");var s=n.appendFile;s&&(n.appendFile=o);function o(N,Q,oe,B){return typeof oe=="function"&&(B=oe,oe=null),K(N,Q,oe,B);function K(ne,G,ie,W,V){return s(ne,G,ie,function(q){q&&(q.code==="EMFILE"||q.code==="ENFILE")?Qc([K,[ne,G,ie,W],q,V||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}a(K,"go$appendFile")}a(o,"appendFile");var l=n.copyFile;l&&(n.copyFile=c);function c(N,Q,oe,B){return typeof oe=="function"&&(B=oe,oe=0),K(N,Q,oe,B);function K(ne,G,ie,W,V){return l(ne,G,ie,function(q){q&&(q.code==="EMFILE"||q.code==="ENFILE")?Qc([K,[ne,G,ie,W],q,V||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}a(K,"go$copyFile")}a(c,"copyFile");var u=n.readdir;n.readdir=d;var f=/^v[0-5]\./;function d(N,Q,oe){typeof Q=="function"&&(oe=Q,Q=null);var B=f.test(process.version)?a(function(G,ie,W,V){return u(G,K(G,ie,W,V))},"go$readdir"):a(function(G,ie,W,V){return u(G,ie,K(G,ie,W,V))},"go$readdir");return B(N,Q,oe);function K(ne,G,ie,W){return function(V,q){V&&(V.code==="EMFILE"||V.code==="ENFILE")?Qc([B,[ne,G,ie],V,W||Date.now(),Date.now()]):(q&&q.sort&&q.sort(),typeof ie=="function"&&ie.call(this,V,q))}}}if(a(d,"readdir"),process.version.substr(0,4)==="v0.8"){var h=kW(n);w=h.ReadStream,A=h.WriteStream}var p=n.ReadStream;p&&(w.prototype=Object.create(p.prototype),w.prototype.open=E);var g=n.WriteStream;g&&(A.prototype=Object.create(g.prototype),A.prototype.open=x),Object.defineProperty(n,"ReadStream",{get:a(function(){return w},"get"),set:a(function(N){w=N},"set"),enumerable:!0,configurable:!0}),Object.defineProperty(n,"WriteStream",{get:a(function(){return A},"get"),set:a(function(N){A=N},"set"),enumerable:!0,configurable:!0});var y=w;Object.defineProperty(n,"FileReadStream",{get:a(function(){return y},"get"),set:a(function(N){y=N},"set"),enumerable:!0,configurable:!0});var v=A;Object.defineProperty(n,"FileWriteStream",{get:a(function(){return v},"get"),set:a(function(N){v=N},"set"),enumerable:!0,configurable:!0});function w(N,Q){return this instanceof w?(p.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}a(w,"ReadStream");function E(){var N=this;ge(N.path,N.flags,N.mode,function(Q,oe){Q?(N.autoClose&&N.destroy(),N.emit("error",Q)):(N.fd=oe,N.emit("open",oe),N.read())})}a(E,"ReadStream$open");function A(N,Q){return this instanceof A?(g.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}a(A,"WriteStream");function x(){var N=this;ge(N.path,N.flags,N.mode,function(Q,oe){Q?(N.destroy(),N.emit("error",Q)):(N.fd=oe,N.emit("open",oe))})}a(x,"WriteStream$open");function D(N,Q){return new n.ReadStream(N,Q)}a(D,"createReadStream");function J(N,Q){return new n.WriteStream(N,Q)}a(J,"createWriteStream");var ae=n.open;n.open=ge;function ge(N,Q,oe,B){return typeof oe=="function"&&(B=oe,oe=null),K(N,Q,oe,B);function K(ne,G,ie,W,V){return ae(ne,G,ie,function(q,rt){q&&(q.code==="EMFILE"||q.code==="ENFILE")?Qc([K,[ne,G,ie,W],q,V||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}a(K,"go$open")}return a(ge,"open"),n}a(Wv,"patch");function Qc(n){fl("ENQUEUE",n[0].name,n[1]),Bt[Ur].push(n),zv()}a(Qc,"enqueue");var Fg;function TR(){for(var n=Date.now(),e=0;e<Bt[Ur].length;++e)Bt[Ur][e].length>2&&(Bt[Ur][e][3]=n,Bt[Ur][e][4]=n);zv()}a(TR,"resetQueue");function zv(){if(clearTimeout(Fg),Fg=void 0,Bt[Ur].length!==0){var n=Bt[Ur].shift(),e=n[0],t=n[1],r=n[2],i=n[3],s=n[4];if(i===void 0)fl("RETRY",e.name,t),e.apply(null,t);else if(Date.now()-i>=6e4){fl("TIMEOUT",e.name,t);var o=t.pop();typeof o=="function"&&o.call(null,r)}else{var l=Date.now()-s,c=Math.max(s-i,1),u=Math.min(c*1.2,100);l>=u?(fl("RETRY",e.name,t),e.apply(null,t.concat([i]))):Bt[Ur].push(n)}Fg===void 0&&(Fg=setTimeout(zv,0))}}a(zv,"retry")});var yn=S(To=>{"use strict";var IR=Tr().fromCallback,gn=Kc(),$W=["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 gn[n]=="function");Object.assign(To,gn);$W.forEach(n=>{To[n]=IR(gn[n])});To.exists=function(n,e){return typeof e=="function"?gn.exists(n,e):new Promise(t=>gn.exists(n,t))};To.read=function(n,e,t,r,i,s){return typeof s=="function"?gn.read(n,e,t,r,i,s):new Promise((o,l)=>{gn.read(n,e,t,r,i,(c,u,f)=>{if(c)return l(c);o({bytesRead:u,buffer:f})})})};To.write=function(n,e,...t){return typeof t[t.length-1]=="function"?gn.write(n,e,...t):new Promise((r,i)=>{gn.write(n,e,...t,(s,o,l)=>{if(s)return i(s);r({bytesWritten:o,buffer:l})})})};To.readv=function(n,e,...t){return typeof t[t.length-1]=="function"?gn.readv(n,e,...t):new Promise((r,i)=>{gn.readv(n,e,...t,(s,o,l)=>{if(s)return i(s);r({bytesRead:o,buffers:l})})})};To.writev=function(n,e,...t){return typeof t[t.length-1]=="function"?gn.writev(n,e,...t):new Promise((r,i)=>{gn.writev(n,e,...t,(s,o,l)=>{if(s)return i(s);r({bytesWritten:o,buffers:l})})})};typeof gn.realpath.native=="function"?To.realpath.native=IR(gn.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var CR=S(($de,xR)=>{"use strict";var UW=require("path");xR.exports.checkPath=a(function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(UW.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}},"checkPath")});var FR=S((Vde,Yv)=>{"use strict";var RR=yn(),{checkPath:PR}=CR(),OR=a(n=>{let e={mode:511};return typeof n=="number"?n:{...e,...n}.mode},"getMode");Yv.exports.makeDir=async(n,e)=>(PR(n),RR.mkdir(n,{mode:OR(e),recursive:!0}));Yv.exports.makeDirSync=(n,e)=>(PR(n),RR.mkdirSync(n,{mode:OR(e),recursive:!0}))});var Yi=S((qde,DR)=>{"use strict";var VW=Tr().fromPromise,{makeDir:BW,makeDirSync:Qv}=FR(),Kv=VW(BW);DR.exports={mkdirs:Kv,mkdirsSync:Qv,mkdirp:Kv,mkdirpSync:Qv,ensureDir:Kv,ensureDirSync:Qv}});var oa=S((Gde,NR)=>{"use strict";var qW=Tr().fromPromise,LR=yn();function GW(n){return LR.access(n).then(()=>!0).catch(()=>!1)}a(GW,"pathExists");NR.exports={pathExists:qW(GW),pathExistsSync:LR.existsSync}});var Xv=S((zde,kR)=>{"use strict";var Xc=yn(),WW=Tr().fromPromise;async function zW(n,e,t){let r=await Xc.open(n,"r+"),i=null;try{await Xc.futimes(r,e,t)}finally{try{await Xc.close(r)}catch(s){i=s}}if(i)throw i}a(zW,"utimesMillis");function HW(n,e,t){let r=Xc.openSync(n,"r+");return Xc.futimesSync(r,e,t),Xc.closeSync(r)}a(HW,"utimesMillisSync");kR.exports={utimesMillis:WW(zW),utimesMillisSync:HW}});var dl=S((Yde,UR)=>{"use strict";var Jc=yn(),Ar=require("path"),MR=Tr().fromPromise;function YW(n,e,t){let r=t.dereference?i=>Jc.stat(i,{bigint:!0}):i=>Jc.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}))}a(YW,"getStats");function QW(n,e,t){let r,i=t.dereference?o=>Jc.statSync(o,{bigint:!0}):o=>Jc.lstatSync(o,{bigint:!0}),s=i(n);try{r=i(e)}catch(o){if(o.code==="ENOENT")return{srcStat:s,destStat:null};throw o}return{srcStat:s,destStat:r}}a(QW,"getStatsSync");async function KW(n,e,t,r){let{srcStat:i,destStat:s}=await YW(n,e,r);if(s){if(zf(i,s)){let o=Ar.basename(n),l=Ar.basename(e);if(t==="move"&&o!==l&&o.toLowerCase()===l.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()&&Jv(n,e))throw new Error(Lg(n,e,t));return{srcStat:i,destStat:s}}a(KW,"checkPaths");function XW(n,e,t,r){let{srcStat:i,destStat:s}=QW(n,e,r);if(s){if(zf(i,s)){let o=Ar.basename(n),l=Ar.basename(e);if(t==="move"&&o!==l&&o.toLowerCase()===l.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()&&Jv(n,e))throw new Error(Lg(n,e,t));return{srcStat:i,destStat:s}}a(XW,"checkPathsSync");async function jR(n,e,t,r){let i=Ar.resolve(Ar.dirname(n)),s=Ar.resolve(Ar.dirname(t));if(s===i||s===Ar.parse(s).root)return;let o;try{o=await Jc.stat(s,{bigint:!0})}catch(l){if(l.code==="ENOENT")return;throw l}if(zf(e,o))throw new Error(Lg(n,t,r));return jR(n,e,s,r)}a(jR,"checkParentPaths");function $R(n,e,t,r){let i=Ar.resolve(Ar.dirname(n)),s=Ar.resolve(Ar.dirname(t));if(s===i||s===Ar.parse(s).root)return;let o;try{o=Jc.statSync(s,{bigint:!0})}catch(l){if(l.code==="ENOENT")return;throw l}if(zf(e,o))throw new Error(Lg(n,t,r));return $R(n,e,s,r)}a($R,"checkParentPathsSync");function zf(n,e){return e.ino!==void 0&&e.dev!==void 0&&e.ino===n.ino&&e.dev===n.dev}a(zf,"areIdentical");function Jv(n,e){let t=Ar.resolve(n).split(Ar.sep).filter(i=>i),r=Ar.resolve(e).split(Ar.sep).filter(i=>i);return t.every((i,s)=>r[s]===i)}a(Jv,"isSrcSubdir");function Lg(n,e,t){return`Cannot ${t} '${n}' to a subdirectory of itself, '${e}'.`}a(Lg,"errMsg");UR.exports={checkPaths:MR(KW),checkPathsSync:XW,checkParentPaths:MR(jR),checkParentPathsSync:$R,isSrcSubdir:Jv,areIdentical:zf}});var BR=S((Kde,VR)=>{"use strict";async function JW(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})))}a(JW,"asyncIteratorConcurrentProcess");VR.exports={asyncIteratorConcurrentProcess:JW}});var HR=S((Jde,zR)=>{"use strict";var Zr=yn(),Hf=require("path"),{mkdirs:ZW}=Yi(),{pathExists:ez}=oa(),{utimesMillis:tz}=Xv(),Yf=dl(),{asyncIteratorConcurrentProcess:rz}=BR();async function nz(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;
|
|
459
|
+
GFS4: `),console.error(n)},"debug"));Bt[Ur]||(ER=global[Ur]||[],AR(Bt,ER),Bt.close=(function(n){function e(t,r){return n.call(Bt,t,function(i){i||TR(),typeof r=="function"&&r.apply(this,arguments)})}return a(e,"close"),Object.defineProperty(e,Dg,{value:n}),e})(Bt.close),Bt.closeSync=(function(n){function e(t){n.apply(Bt,arguments),TR()}return a(e,"closeSync"),Object.defineProperty(e,Dg,{value:n}),e})(Bt.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",function(){fl(Bt[Ur]),require("assert").equal(Bt[Ur].length,0)}));var ER;global[Ur]||AR(global,Bt[Ur]);Hv.exports=Wv(MW(Bt));process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!Bt.__patched&&(Hv.exports=Wv(Bt),Bt.__patched=!0);function Wv(n){NW(n),n.gracefulify=Wv,n.createReadStream=D,n.createWriteStream=J;var e=n.readFile;n.readFile=t;function t(N,Q,oe){return typeof Q=="function"&&(oe=Q,Q=null),B(N,Q,oe);function B(K,ne,G,ie){return e(K,ne,function(W){W&&(W.code==="EMFILE"||W.code==="ENFILE")?Qc([B,[K,ne,G],W,ie||Date.now(),Date.now()]):typeof G=="function"&&G.apply(this,arguments)})}a(B,"go$readFile")}a(t,"readFile");var r=n.writeFile;n.writeFile=i;function i(N,Q,oe,B){return typeof oe=="function"&&(B=oe,oe=null),K(N,Q,oe,B);function K(ne,G,ie,W,V){return r(ne,G,ie,function(q){q&&(q.code==="EMFILE"||q.code==="ENFILE")?Qc([K,[ne,G,ie,W],q,V||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}a(K,"go$writeFile")}a(i,"writeFile");var s=n.appendFile;s&&(n.appendFile=o);function o(N,Q,oe,B){return typeof oe=="function"&&(B=oe,oe=null),K(N,Q,oe,B);function K(ne,G,ie,W,V){return s(ne,G,ie,function(q){q&&(q.code==="EMFILE"||q.code==="ENFILE")?Qc([K,[ne,G,ie,W],q,V||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}a(K,"go$appendFile")}a(o,"appendFile");var l=n.copyFile;l&&(n.copyFile=c);function c(N,Q,oe,B){return typeof oe=="function"&&(B=oe,oe=0),K(N,Q,oe,B);function K(ne,G,ie,W,V){return l(ne,G,ie,function(q){q&&(q.code==="EMFILE"||q.code==="ENFILE")?Qc([K,[ne,G,ie,W],q,V||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}a(K,"go$copyFile")}a(c,"copyFile");var u=n.readdir;n.readdir=d;var f=/^v[0-5]\./;function d(N,Q,oe){typeof Q=="function"&&(oe=Q,Q=null);var B=f.test(process.version)?a(function(G,ie,W,V){return u(G,K(G,ie,W,V))},"go$readdir"):a(function(G,ie,W,V){return u(G,ie,K(G,ie,W,V))},"go$readdir");return B(N,Q,oe);function K(ne,G,ie,W){return function(V,q){V&&(V.code==="EMFILE"||V.code==="ENFILE")?Qc([B,[ne,G,ie],V,W||Date.now(),Date.now()]):(q&&q.sort&&q.sort(),typeof ie=="function"&&ie.call(this,V,q))}}}if(a(d,"readdir"),process.version.substr(0,4)==="v0.8"){var h=kW(n);w=h.ReadStream,A=h.WriteStream}var p=n.ReadStream;p&&(w.prototype=Object.create(p.prototype),w.prototype.open=E);var g=n.WriteStream;g&&(A.prototype=Object.create(g.prototype),A.prototype.open=x),Object.defineProperty(n,"ReadStream",{get:a(function(){return w},"get"),set:a(function(N){w=N},"set"),enumerable:!0,configurable:!0}),Object.defineProperty(n,"WriteStream",{get:a(function(){return A},"get"),set:a(function(N){A=N},"set"),enumerable:!0,configurable:!0});var y=w;Object.defineProperty(n,"FileReadStream",{get:a(function(){return y},"get"),set:a(function(N){y=N},"set"),enumerable:!0,configurable:!0});var v=A;Object.defineProperty(n,"FileWriteStream",{get:a(function(){return v},"get"),set:a(function(N){v=N},"set"),enumerable:!0,configurable:!0});function w(N,Q){return this instanceof w?(p.apply(this,arguments),this):w.apply(Object.create(w.prototype),arguments)}a(w,"ReadStream");function E(){var N=this;ge(N.path,N.flags,N.mode,function(Q,oe){Q?(N.autoClose&&N.destroy(),N.emit("error",Q)):(N.fd=oe,N.emit("open",oe),N.read())})}a(E,"ReadStream$open");function A(N,Q){return this instanceof A?(g.apply(this,arguments),this):A.apply(Object.create(A.prototype),arguments)}a(A,"WriteStream");function x(){var N=this;ge(N.path,N.flags,N.mode,function(Q,oe){Q?(N.destroy(),N.emit("error",Q)):(N.fd=oe,N.emit("open",oe))})}a(x,"WriteStream$open");function D(N,Q){return new n.ReadStream(N,Q)}a(D,"createReadStream");function J(N,Q){return new n.WriteStream(N,Q)}a(J,"createWriteStream");var ae=n.open;n.open=ge;function ge(N,Q,oe,B){return typeof oe=="function"&&(B=oe,oe=null),K(N,Q,oe,B);function K(ne,G,ie,W,V){return ae(ne,G,ie,function(q,nt){q&&(q.code==="EMFILE"||q.code==="ENFILE")?Qc([K,[ne,G,ie,W],q,V||Date.now(),Date.now()]):typeof W=="function"&&W.apply(this,arguments)})}a(K,"go$open")}return a(ge,"open"),n}a(Wv,"patch");function Qc(n){fl("ENQUEUE",n[0].name,n[1]),Bt[Ur].push(n),zv()}a(Qc,"enqueue");var Fg;function TR(){for(var n=Date.now(),e=0;e<Bt[Ur].length;++e)Bt[Ur][e].length>2&&(Bt[Ur][e][3]=n,Bt[Ur][e][4]=n);zv()}a(TR,"resetQueue");function zv(){if(clearTimeout(Fg),Fg=void 0,Bt[Ur].length!==0){var n=Bt[Ur].shift(),e=n[0],t=n[1],r=n[2],i=n[3],s=n[4];if(i===void 0)fl("RETRY",e.name,t),e.apply(null,t);else if(Date.now()-i>=6e4){fl("TIMEOUT",e.name,t);var o=t.pop();typeof o=="function"&&o.call(null,r)}else{var l=Date.now()-s,c=Math.max(s-i,1),u=Math.min(c*1.2,100);l>=u?(fl("RETRY",e.name,t),e.apply(null,t.concat([i]))):Bt[Ur].push(n)}Fg===void 0&&(Fg=setTimeout(zv,0))}}a(zv,"retry")});var yn=S(To=>{"use strict";var IR=Tr().fromCallback,gn=Kc(),$W=["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 gn[n]=="function");Object.assign(To,gn);$W.forEach(n=>{To[n]=IR(gn[n])});To.exists=function(n,e){return typeof e=="function"?gn.exists(n,e):new Promise(t=>gn.exists(n,t))};To.read=function(n,e,t,r,i,s){return typeof s=="function"?gn.read(n,e,t,r,i,s):new Promise((o,l)=>{gn.read(n,e,t,r,i,(c,u,f)=>{if(c)return l(c);o({bytesRead:u,buffer:f})})})};To.write=function(n,e,...t){return typeof t[t.length-1]=="function"?gn.write(n,e,...t):new Promise((r,i)=>{gn.write(n,e,...t,(s,o,l)=>{if(s)return i(s);r({bytesWritten:o,buffer:l})})})};To.readv=function(n,e,...t){return typeof t[t.length-1]=="function"?gn.readv(n,e,...t):new Promise((r,i)=>{gn.readv(n,e,...t,(s,o,l)=>{if(s)return i(s);r({bytesRead:o,buffers:l})})})};To.writev=function(n,e,...t){return typeof t[t.length-1]=="function"?gn.writev(n,e,...t):new Promise((r,i)=>{gn.writev(n,e,...t,(s,o,l)=>{if(s)return i(s);r({bytesWritten:o,buffers:l})})})};typeof gn.realpath.native=="function"?To.realpath.native=IR(gn.realpath.native):process.emitWarning("fs.realpath.native is not a function. Is fs being monkey-patched?","Warning","fs-extra-WARN0003")});var CR=S(($de,xR)=>{"use strict";var UW=require("path");xR.exports.checkPath=a(function(e){if(process.platform==="win32"&&/[<>:"|?*]/.test(e.replace(UW.parse(e).root,""))){let r=new Error(`Path contains invalid characters: ${e}`);throw r.code="EINVAL",r}},"checkPath")});var FR=S((Vde,Yv)=>{"use strict";var RR=yn(),{checkPath:PR}=CR(),OR=a(n=>{let e={mode:511};return typeof n=="number"?n:{...e,...n}.mode},"getMode");Yv.exports.makeDir=async(n,e)=>(PR(n),RR.mkdir(n,{mode:OR(e),recursive:!0}));Yv.exports.makeDirSync=(n,e)=>(PR(n),RR.mkdirSync(n,{mode:OR(e),recursive:!0}))});var Yi=S((qde,DR)=>{"use strict";var VW=Tr().fromPromise,{makeDir:BW,makeDirSync:Qv}=FR(),Kv=VW(BW);DR.exports={mkdirs:Kv,mkdirsSync:Qv,mkdirp:Kv,mkdirpSync:Qv,ensureDir:Kv,ensureDirSync:Qv}});var oa=S((Gde,NR)=>{"use strict";var qW=Tr().fromPromise,LR=yn();function GW(n){return LR.access(n).then(()=>!0).catch(()=>!1)}a(GW,"pathExists");NR.exports={pathExists:qW(GW),pathExistsSync:LR.existsSync}});var Xv=S((zde,kR)=>{"use strict";var Xc=yn(),WW=Tr().fromPromise;async function zW(n,e,t){let r=await Xc.open(n,"r+"),i=null;try{await Xc.futimes(r,e,t)}finally{try{await Xc.close(r)}catch(s){i=s}}if(i)throw i}a(zW,"utimesMillis");function HW(n,e,t){let r=Xc.openSync(n,"r+");return Xc.futimesSync(r,e,t),Xc.closeSync(r)}a(HW,"utimesMillisSync");kR.exports={utimesMillis:WW(zW),utimesMillisSync:HW}});var dl=S((Yde,UR)=>{"use strict";var Jc=yn(),Ar=require("path"),MR=Tr().fromPromise;function YW(n,e,t){let r=t.dereference?i=>Jc.stat(i,{bigint:!0}):i=>Jc.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}))}a(YW,"getStats");function QW(n,e,t){let r,i=t.dereference?o=>Jc.statSync(o,{bigint:!0}):o=>Jc.lstatSync(o,{bigint:!0}),s=i(n);try{r=i(e)}catch(o){if(o.code==="ENOENT")return{srcStat:s,destStat:null};throw o}return{srcStat:s,destStat:r}}a(QW,"getStatsSync");async function KW(n,e,t,r){let{srcStat:i,destStat:s}=await YW(n,e,r);if(s){if(zf(i,s)){let o=Ar.basename(n),l=Ar.basename(e);if(t==="move"&&o!==l&&o.toLowerCase()===l.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()&&Jv(n,e))throw new Error(Lg(n,e,t));return{srcStat:i,destStat:s}}a(KW,"checkPaths");function XW(n,e,t,r){let{srcStat:i,destStat:s}=QW(n,e,r);if(s){if(zf(i,s)){let o=Ar.basename(n),l=Ar.basename(e);if(t==="move"&&o!==l&&o.toLowerCase()===l.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()&&Jv(n,e))throw new Error(Lg(n,e,t));return{srcStat:i,destStat:s}}a(XW,"checkPathsSync");async function jR(n,e,t,r){let i=Ar.resolve(Ar.dirname(n)),s=Ar.resolve(Ar.dirname(t));if(s===i||s===Ar.parse(s).root)return;let o;try{o=await Jc.stat(s,{bigint:!0})}catch(l){if(l.code==="ENOENT")return;throw l}if(zf(e,o))throw new Error(Lg(n,t,r));return jR(n,e,s,r)}a(jR,"checkParentPaths");function $R(n,e,t,r){let i=Ar.resolve(Ar.dirname(n)),s=Ar.resolve(Ar.dirname(t));if(s===i||s===Ar.parse(s).root)return;let o;try{o=Jc.statSync(s,{bigint:!0})}catch(l){if(l.code==="ENOENT")return;throw l}if(zf(e,o))throw new Error(Lg(n,t,r));return $R(n,e,s,r)}a($R,"checkParentPathsSync");function zf(n,e){return e.ino!==void 0&&e.dev!==void 0&&e.ino===n.ino&&e.dev===n.dev}a(zf,"areIdentical");function Jv(n,e){let t=Ar.resolve(n).split(Ar.sep).filter(i=>i),r=Ar.resolve(e).split(Ar.sep).filter(i=>i);return t.every((i,s)=>r[s]===i)}a(Jv,"isSrcSubdir");function Lg(n,e,t){return`Cannot ${t} '${n}' to a subdirectory of itself, '${e}'.`}a(Lg,"errMsg");UR.exports={checkPaths:MR(KW),checkPathsSync:XW,checkParentPaths:MR(jR),checkParentPathsSync:$R,isSrcSubdir:Jv,areIdentical:zf}});var BR=S((Kde,VR)=>{"use strict";async function JW(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})))}a(JW,"asyncIteratorConcurrentProcess");VR.exports={asyncIteratorConcurrentProcess:JW}});var HR=S((Jde,zR)=>{"use strict";var Zr=yn(),Hf=require("path"),{mkdirs:ZW}=Yi(),{pathExists:ez}=oa(),{utimesMillis:tz}=Xv(),Yf=dl(),{asyncIteratorConcurrentProcess:rz}=BR();async function nz(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;
|
|
460
460
|
|
|
461
461
|
see https://github.com/jprichardson/node-fs-extra/issues/269`,"Warning","fs-extra-WARN0001");let{srcStat:r,destStat:i}=await Yf.checkPaths(n,e,"copy",t);if(await Yf.checkParentPaths(n,r,e,"copy"),!await GR(n,e,t))return;let o=Hf.dirname(e);await ez(o)||await ZW(o),await WR(i,n,e,t)}a(nz,"copy");async function GR(n,e,t){return t.filter?t.filter(n,e):!0}a(GR,"runFilter");async function WR(n,e,t,r){let s=await(r.dereference?Zr.stat:Zr.lstat)(e);if(s.isDirectory())return az(s,n,e,t,r);if(s.isFile()||s.isCharacterDevice()||s.isBlockDevice())return iz(s,n,e,t,r);if(s.isSymbolicLink())return lz(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}`)}a(WR,"getStatsAndPerformCopy");async function iz(n,e,t,r,i){if(!e)return qR(n,t,r,i);if(i.overwrite)return await Zr.unlink(r),qR(n,t,r,i);if(i.errorOnExist)throw new Error(`'${r}' already exists`)}a(iz,"onFile");async function qR(n,e,t,r){if(await Zr.copyFile(e,t),r.preserveTimestamps){sz(n.mode)&&await oz(t,n.mode);let i=await Zr.stat(e);await tz(t,i.atime,i.mtime)}return Zr.chmod(t,n.mode)}a(qR,"copyFile");function sz(n){return(n&128)===0}a(sz,"fileIsNotWritable");function oz(n,e){return Zr.chmod(n,e|128)}a(oz,"makeFileWritable");async function az(n,e,t,r,i){e||await Zr.mkdir(r),await rz(await Zr.opendir(t),async s=>{let o=Hf.join(t,s.name),l=Hf.join(r,s.name);if(await GR(o,l,i)){let{destStat:u}=await Yf.checkPaths(o,l,"copy",i);await WR(u,o,l,i)}}),e||await Zr.chmod(r,n.mode)}a(az,"onDir");async function lz(n,e,t,r){let i=await Zr.readlink(e);if(r.dereference&&(i=Hf.resolve(process.cwd(),i)),!n)return Zr.symlink(i,t);let s=null;try{s=await Zr.readlink(t)}catch(o){if(o.code==="EINVAL"||o.code==="UNKNOWN")return Zr.symlink(i,t);throw o}if(r.dereference&&(s=Hf.resolve(process.cwd(),s)),Yf.isSrcSubdir(i,s))throw new Error(`Cannot copy '${i}' to a subdirectory of itself, '${s}'.`);if(Yf.isSrcSubdir(s,i))throw new Error(`Cannot overwrite '${s}' with '${i}'.`);return await Zr.unlink(t),Zr.symlink(i,t)}a(lz,"onLink");zR.exports=nz});var JR=S((ehe,XR)=>{"use strict";var _n=Kc(),Qf=require("path"),cz=Yi().mkdirsSync,uz=Xv().utimesMillisSync,Kf=dl();function fz(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;
|
|
462
462
|
|
|
@@ -514,7 +514,7 @@ ${e}`}shouldSkipDirectory(e){return e.startsWith(".")}walkDirectory(e,t){let r;t
|
|
|
514
514
|
|
|
515
515
|
\u{1F4CB} Context:`;for(let[t,r]of Object.entries(this.context))e+=`
|
|
516
516
|
${t}: ${JSON.stringify(r)}`}return e}toStructuredResponse(e=!1){return ke.error(this.errorCode,this.message,this.exitCode,{recovery:this.recoveryHint||{message:this.guidance},context:this.context,stack:e?this.stack:void 0})}formatJson(e=!1){return JSON.stringify(this.toStructuredResponse(e),null,2)}};var se=class n{static{a(this,"ErrorHandler")}static{this.outputFormat="text"}static setFormat(e){n.outputFormat=e}static getFormat(){return n.outputFormat}static isDebugMode(){return!!process.env.DEBUG}static handle(e){if(e instanceof nn){if(n.outputFormat==="json"){let i=e.toStructuredResponse(n.isDebugMode());console.log(JSON.stringify(i,null,2))}else console.error(e.format()),n.isDebugMode()&&(console.error(`
|
|
517
|
-
\u{1F4CD} Stack trace:`),console.error(e.stack));process.exit(e.exitCode)}let{exitCode:t,errorCode:r}=n.classifyError(e);if(n.outputFormat==="json"){let i=n.buildErrorResponse(r,e.message,t,n.isDebugMode()?e.stack:void 0);console.log(JSON.stringify(i,null,2))}else console.error(`\u274C Error: ${e.message}`),n.isDebugMode()&&console.error(e.stack);process.exit(t)}static handleWithMessage(e,t=1,r="INTERNAL_UNKNOWN"){if(n.outputFormat==="json"){let i=n.buildErrorResponse(r,e,t);console.log(JSON.stringify(i,null,2))}else console.error(`\u274C Error: ${e}`);process.exit(t)}static classifyError(e){let t=e.message.toLowerCase();return t.includes("transition")?{exitCode:6,errorCode:"STATE_INVALID_TRANSITION"}:t.includes("transaction")?{exitCode:7,errorCode:"INTERNAL_TRANSACTION_FAILED"}:t.includes("concurrent")||t.includes("modified")?{exitCode:8,errorCode:"STATE_CONCURRENT_MODIFICATION"}:e.message.includes("not found")||e.message.includes("ENOENT")?{exitCode:3,errorCode:"VALIDATION_FILE_NOT_FOUND"}:e.message.includes("EACCES")||e.message.includes("permission denied")?{exitCode:4,errorCode:"PERMISSION_DENIED"}:e.message.includes("Invalid")||e.message.includes("outside vault")||e.message.includes("Not a")?{exitCode:2,errorCode:"VALIDATION_INVALID_ARGUMENTS"}:{exitCode:1,errorCode:"INTERNAL_UNKNOWN"}}static buildErrorResponse(e,t,r,i){return ke.error(e,t,r,{recovery:n.getRecoveryHint(e),stack:i})}static getRecoveryHint(e){switch(e){case"VALIDATION_FILE_NOT_FOUND":return{message:"Verify the file path is correct and the file exists",suggestion:"Check file path spelling and ensure the file is in the vault"};case"VALIDATION_VAULT_NOT_FOUND":return{message:"Verify the vault path is correct",suggestion:"Check --vault option or current directory"};case"VALIDATION_INVALID_ARGUMENTS":return{message:"Check command syntax and argument format",suggestion:"Use --help for usage information"};case"STATE_INVALID_TRANSITION":return{message:"The requested state transition is not allowed",suggestion:"Check the current asset state and valid transitions"};case"STATE_CONCURRENT_MODIFICATION":return{message:"File was modified by another process",suggestion:"Wait and retry the command"};case"PERMISSION_DENIED":return{message:"Check file permissions",suggestion:"Ensure you have write access to the vault"};case"INTERNAL_TRANSACTION_FAILED":return{message:"Transaction could not complete",suggestion:"Check for locked files and retry"};default:return{message:"An unexpected error occurred",suggestion:"Check the error details and retry"}}}};var
|
|
517
|
+
\u{1F4CD} Stack trace:`),console.error(e.stack));process.exit(e.exitCode)}let{exitCode:t,errorCode:r}=n.classifyError(e);if(n.outputFormat==="json"){let i=n.buildErrorResponse(r,e.message,t,n.isDebugMode()?e.stack:void 0);console.log(JSON.stringify(i,null,2))}else console.error(`\u274C Error: ${e.message}`),n.isDebugMode()&&console.error(e.stack);process.exit(t)}static handleWithMessage(e,t=1,r="INTERNAL_UNKNOWN"){if(n.outputFormat==="json"){let i=n.buildErrorResponse(r,e,t);console.log(JSON.stringify(i,null,2))}else console.error(`\u274C Error: ${e}`);process.exit(t)}static classifyError(e){let t=e.message.toLowerCase();return t.includes("transition")?{exitCode:6,errorCode:"STATE_INVALID_TRANSITION"}:t.includes("transaction")?{exitCode:7,errorCode:"INTERNAL_TRANSACTION_FAILED"}:t.includes("concurrent")||t.includes("modified")?{exitCode:8,errorCode:"STATE_CONCURRENT_MODIFICATION"}:e.message.includes("not found")||e.message.includes("ENOENT")?{exitCode:3,errorCode:"VALIDATION_FILE_NOT_FOUND"}:e.message.includes("EACCES")||e.message.includes("permission denied")?{exitCode:4,errorCode:"PERMISSION_DENIED"}:e.message.includes("Invalid")||e.message.includes("outside vault")||e.message.includes("Not a")?{exitCode:2,errorCode:"VALIDATION_INVALID_ARGUMENTS"}:{exitCode:1,errorCode:"INTERNAL_UNKNOWN"}}static buildErrorResponse(e,t,r,i){return ke.error(e,t,r,{recovery:n.getRecoveryHint(e),stack:i})}static getRecoveryHint(e){switch(e){case"VALIDATION_FILE_NOT_FOUND":return{message:"Verify the file path is correct and the file exists",suggestion:"Check file path spelling and ensure the file is in the vault"};case"VALIDATION_VAULT_NOT_FOUND":return{message:"Verify the vault path is correct",suggestion:"Check --vault option or current directory"};case"VALIDATION_INVALID_ARGUMENTS":return{message:"Check command syntax and argument format",suggestion:"Use --help for usage information"};case"STATE_INVALID_TRANSITION":return{message:"The requested state transition is not allowed",suggestion:"Check the current asset state and valid transitions"};case"STATE_CONCURRENT_MODIFICATION":return{message:"File was modified by another process",suggestion:"Wait and retry the command"};case"PERMISSION_DENIED":return{message:"Check file permissions",suggestion:"Ensure you have write access to the vault"};case"INTERNAL_TRANSACTION_FAILED":return{message:"Transaction could not complete",suggestion:"Check for locked files and retry"};default:return{message:"An unexpected error occurred",suggestion:"Check the error details and retry"}}}};var rt=class extends nn{constructor(t,r,i){let s=`Check command syntax and argument format.
|
|
518
518
|
Use: exocortex command --help for usage information.`;super(t,i,{message:r||"Check command syntax and argument format",suggestion:"exocortex command --help"});this.exitCode=2;this.errorCode="VALIDATION_INVALID_ARGUMENTS";this.guidance=r||s}static{a(this,"InvalidArgumentsError")}};var de=class extends nn{constructor(t,r){super(`Vault not found: ${t}`,{vaultPath:t,...r},{message:"Verify the vault path is correct and the directory exists",suggestion:`ls -la "${t}" or check --vault option`});this.exitCode=3;this.errorCode="VALIDATION_VAULT_NOT_FOUND";this.guidance=`The specified vault directory does not exist.
|
|
519
519
|
Check:
|
|
520
520
|
\u2022 Path spelling and case sensitivity
|
|
@@ -604,7 +604,7 @@ Available prefixes: ${u}`,this.wellKnownPrefixes[r]&&l.push(`Add: PREFIX ${r}: <
|
|
|
604
604
|
`)}formatForJSON(e){return{type:e.type,message:e.message,originalMessage:e.originalMessage,suggestions:e.suggestions,line:e.line,column:e.column,context:e.context?{startLine:e.context.startLine,endLine:e.context.endLine,errorLine:e.context.errorLine,errorColumn:e.context.errorColumn,lines:e.context.lines.map(t=>({number:t.number,content:t.content,isError:t.isError}))}:void 0}}};var Iy=class n{static{a(this,"NTriplesFormatter")}static escapeString(e){let t=e.replace(/\\/g,"\\\\");return t=t.replace(/"/g,'\\"'),t=t.replace(/\n/g,"\\n"),t=t.replace(/\r/g,"\\r"),t=t.replace(/\t/g,"\\t"),t}static formatObject(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("urn:")?`<${e}>`:`"${n.escapeString(e)}"`}};var vl=require("fs"),u2=require("path");function _a(n){let e=new Map,t="obsidian://vault/",r;try{r=(0,vl.readdirSync)(n)}catch{return e}for(let i of r){let s=(0,u2.join)(n,i);if(i.startsWith("."))continue;let o;try{o=(0,vl.statSync)(s)}catch{continue}if(!o.isDirectory())continue;let l;try{l=(0,vl.readdirSync)(s)}catch{continue}for(let c of l){let u=(0,u2.join)(s,c);if(c.startsWith("."))continue;let f;try{f=(0,vl.statSync)(u)}catch{continue}if(!f.isDirectory())continue;let d=!1;try{d=(0,vl.readdirSync)(u).some(p=>p.endsWith(".md"))}catch{continue}if(d){let h=`${i}/${c}`,p=encodeURI(h),g=`${t}${p}/`;/^[a-zA-Z][a-zA-Z0-9_]*$/.test(c)&&e.set(c,g)}}}return e}a(_a,"scanVaultNamespaces");var HD=ee(Ct());var hJ="https://exocortex.my/ontology/",pJ=/^[a-z][a-zA-Z0-9]*$/,YD=new Set(["exo","ems","ims","gtd","period","lit","inbox","rdf","rdfs","owl","xsd"]),mJ=/(<)([a-zA-Z][a-zA-Z0-9]*)__([a-zA-Z][a-zA-Z0-9_]*)(>)/g;function ba(n){let e=new Set,t=/PREFIX\s+(\w+)\s*:/gi,r;for(;(r=t.exec(n))!==null;)e.add(r[1].toLowerCase());let i=HD.SPARQL_PREFIXES.split(`
|
|
605
605
|
`).filter(f=>f.trim().length>0),s=[];for(let f of i){let d=/PREFIX\s+(\w+)\s*:/i.exec(f);d&&!e.has(d[1].toLowerCase())&&s.push(f)}let o=/(?<![:\w])([a-z][a-zA-Z0-9]*):[a-zA-Z_]/g,l=new Set,c;for(;(c=o.exec(n))!==null;)l.add(c[1]);let u=new Set(e);for(let f of s){let d=/PREFIX\s+(\w+)\s*:/i.exec(f);d&&u.add(d[1].toLowerCase())}for(let f of l)u.has(f.toLowerCase())||pJ.test(f)&&(s.push(`PREFIX ${f}: <${hJ}${f}#>`),u.add(f.toLowerCase()));return s.length===0?n:s.join(`
|
|
606
606
|
`)+`
|
|
607
|
-
`+n}a(ba,"injectExocortexPrefixes");function Eu(n){return n.replace(mJ,(e,t,r,i,s)=>YD.has(r.toLowerCase())?`${r}:${i}`:e)}a(Eu,"transformShorthandNotation");function Sa(n){let e=new Map(n);for(let t of YD)e.delete(t);return e}a(Sa,"filterOntologyPrefixes");var xy=ee(ca()),Cy=ee(require("path"));var gJ="49fd2e56-4656-4ca7-a789-f472b16ea260",yJ="c9c65b0f-1e01-47c1-a1f9-1bf70b11df6a",_J="0cde1557-6320-4bd0-a7c4-8b72afc38720",bJ=new Set([gJ,yJ,_J]),SJ="73bd00e4-ccc0-4f3f-b20d-c4388c4588fb",wJ="3de846cd-1f0e-4f98-8613-b8587aa15174",vJ=5,Tu=class{static{a(this,"CliFocusProfileResolver")}constructor(e){let t=e.alsoVaultPaths??[];this.vaultPaths=[e.vaultPath,...t].map(r=>Cy.default.resolve(r)),this.maxExtendsDepth=e.maxExtendsDepth??vJ,this.warn=e.warn??(()=>{})}async resolveFilter(e){if(e==null||e==="")return{outcome:"no-profile"};let t;try{t=await this.scanAllVaults()}catch(u){let f=`[CliFocusProfileResolver] vault scan threw \u2014 ${String(u)}`;return this.warn(f),{outcome:"error",reason:f}}if(t.profiles.get(e)===void 0)return this.warn(`[CliFocusProfileResolver] profileUid=${e} not found in any scanned vault \u2014 falling back to no-filter (full vault).`),{outcome:"missing-profile",profileUid:e};let i=new Set;try{this.walkProfileChain(e,t.profiles,i,new Set,0)}catch(u){let f=`[CliFocusProfileResolver] profile chain walk threw \u2014 ${String(u)}`;return this.warn(f),{outcome:"error",reason:f}}let s=new Set(t.folderMap.values()),o=new Set,l=[];for(let u of i){if(s.has(u)){o.add(u);continue}let f=t.ontologyToAs.get(u);if(f!==void 0){o.add(f);continue}l.push(u)}for(let u of bJ)o.add(u);if(!Array.from(o).some(u=>s.has(u))){let u=`[CliFocusProfileResolver] profileUid=${e} produced effective set with zero AssetSpace folder overlap (${o.size} AS UIDs after translation+floor; ${t.folderMap.size} folders known). Likely cause: profile declares Ontology UIDs not covered by containsOntology, or vault has no scanned AssetSpaces. Falling back to no-filter (full vault indexed).`;return this.warn(u),{outcome:"degraded",reason:u}}return{outcome:"engaged",result:{effective:o,folderMap:t.folderMap,declaredOntologies:i,untranslated:l}}}walkProfileChain(e,t,r,i,s){if(s>this.maxExtendsDepth)throw new Error(`FocusProfile chain exceeds max depth ${this.maxExtendsDepth} at ${e} \u2014 possible cycle`);if(i.has(e))return;i.add(e);let o=t.get(e);if(o!==void 0){for(let l of o.includes)r.add(l);for(let l of o.alwaysOnOverlay)r.add(l);typeof o.extends=="string"&&o.extends.length>0&&this.walkProfileChain(o.extends,t,r,i,s+1)}}async scanAllVaults(){let e=new Map,t=new Map,r=new Map;for(let i of this.vaultPaths){if(!await xy.default.pathExists(i)){this.warn(`[CliFocusProfileResolver] vault path does not exist: ${i} \u2014 skipping.`);continue}let s=await this.walkVault(i);for(let o of s){let l=Fd(o.frontmatter.exo__Instance_class);if(l.some(c=>c===SJ)){let c=TJ(o.filePath,o.vaultRoot);c.length>0&&e.set(c,o.uid);let u=Fd(o.frontmatter.exo__AssetSpace_containsOntology);for(let f of u)t.set(f,o.uid)}if(l.some(c=>c===wJ)){let c={uid:o.uid,label:typeof o.frontmatter.exo__Asset_label=="string"?o.frontmatter.exo__Asset_label:void 0,includes:Fd(o.frontmatter.exo__FocusProfile_includes),extends:Fd(o.frontmatter.exo__FocusProfile_extends)[0]??null,alwaysOnOverlay:Fd(o.frontmatter.exo__FocusProfile_alwaysOnOverlay)};r.set(o.uid,c)}}}return{folderMap:e,ontologyToAs:t,profiles:r}}async walkVault(e){let t=[],r=[e];for(;r.length>0;){let i=r.pop(),s;try{s=await xy.default.readdir(i,{withFileTypes:!0})}catch{continue}for(let o of s){let l=Cy.default.join(i,o.name);if(o.isDirectory()){if(o.name.startsWith(".")||o.name==="node_modules"||o.name===".obsidian"||o.name===".exocortex")continue;r.push(l);continue}if(!o.isFile()||!o.name.endsWith(".md"))continue;let c=await this.tryReadFrontmatter(l);if(c===null)continue;let u=c.exo__Asset_uid;typeof u!="string"||u.length===0||t.push({uid:u,filePath:l,vaultRoot:e,frontmatter:c})}}return t}async tryReadFrontmatter(e){let t;try{t=await xy.default.readFile(e,"utf-8")}catch{return null}if(!t.startsWith("---"))return null;let r=t.match(/^---\r?\n([\s\S]*?)\r?\n---/);if(r===null)return null;try{let i=zt.load(r[1]);return i&&typeof i=="object"&&!Array.isArray(i)?i:null}catch{return null}}};function Fd(n){if(n==null)return[];let e=Array.isArray(n)?n:[n],t=[];for(let r of e){if(typeof r!="string")continue;let i=EJ(r);i!==null&&t.push(i)}return t}a(Fd,"parseWikilinkArray");function EJ(n){let e=n.trim().replace(/^\[\[/,"").replace(/\]\]$/,"").split("|")[0].trim();return e.length===0?null:e}a(EJ,"extractUidFromWikilink");function TJ(n,e){let t=Cy.default.relative(e,n).replace(/\\/g,"/");if(!t.startsWith("assetspaces/"))return"";let r=t.slice(12),i=r.indexOf("/");return i<0?"":`assetspaces/${r.slice(0,i)}`}a(TJ,"parentFolderRelative");async function wa(n){let{profileUid:e,primaryVaultPath:t,alsoVaultPaths:r,outputFormat:i}=n;if(e===void 0||e==="")return null;let o=await new Tu({vaultPath:t,alsoVaultPaths:r,warn:i==="text"?l=>console.warn(l):void 0}).resolveFilter(e);switch(o.outcome){case"engaged":{if(i==="text"){let l=IJ(o.result.effective);console.log(`\u{1F3AF} Profile ${e.slice(0,8)} engaged \u2014 ${o.result.effective.size} AS UIDs in scope (incl. ${l} TS-floor), ${o.result.folderMap.size} folders mapped.`),o.result.untranslated.length>0&&console.log(` \u2139\uFE0F ${o.result.untranslated.length} declared Ontology UID(s) had no AssetSpace_containsOntology mapping; passed through unfiltered.`)}return{effective:o.result.effective,folderMap:o.result.folderMap}}case"no-profile":return null;case"missing-profile":return i==="text"&&console.log(`\u26A0\uFE0F --profile ${o.profileUid} not found in vault(s) \u2014 indexing full vault.`),null;case"degraded":return i==="text"&&console.log(`\u26A0\uFE0F ${o.reason}`),null;case"error":return i==="text"&&console.log(`\u26A0\uFE0F ${o.reason}`),null}}a(wa,"resolveProfileFilter");var AJ=new Set(["49fd2e56-4656-4ca7-a789-f472b16ea260","c9c65b0f-1e01-47c1-a1f9-1bf70b11df6a","0cde1557-6320-4bd0-a7c4-8b72afc38720"]);function IJ(n){let e=0;for(let t of n)AJ.has(t)&&e++;return e}a(IJ,"countTsFloor");var QD=require("path");var xJ=/\/assetspaces\/([^/]+)\/?$/;function Ry(n){let e=(0,QD.resolve)(n).replace(/\\/g,"/"),t=xJ.exec(e);return t?`assetspaces/${t[1]}`:""}a(Ry,"deriveSubjectIriPrefix");var Gn=ee(Ct());var CJ=new Map([["exo__","https://exocortex.my/ontology/exo#"],["ems__","https://exocortex.my/ontology/ems#"],["exocmd__","https://exocortex.my/ontology/exocmd#"],["ims__","https://exocortex.my/ontology/ims#"],["ztlk__","https://exocortex.my/ontology/ztlk#"],["ptms__","https://exocortex.my/ontology/ptms#"],["lit__","https://exocortex.my/ontology/lit#"],["inbox__","https://exocortex.my/ontology/inbox#"],["place__","https://exocortex.my/ontology/place#"],["exoob__","https://exocortex.my/ontology/exoob#"],["pn__","https://exocortex.my/ontology/pn#"],["period__","https://exocortex.my/ontology/period#"],["rdf__","http://www.w3.org/1999/02/22-rdf-syntax-ns#"],["rdfs__","http://www.w3.org/2000/01/rdf-schema#"],["owl__","http://www.w3.org/2002/07/owl#"]]);function RJ(n){let e=n.indexOf("__");if(e===-1)return null;let t=n.slice(0,e+2),r=n.slice(e+2),i=CJ.get(t);return!i||!r?null:i+r}a(RJ,"labelToOntologyIRI");var KD="https://exocortex.my/ontology/exo#Instance_class",PJ="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",OJ="http://www.w3.org/2000/01/rdf-schema#label",FJ="https://exocortex.my/ontology/exo#Asset_label",DJ=/^\[\[([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\|[^\]]*)?\]\]$/i,LJ=/\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.md$/i;function Py(n){let e=new Map;for(let i of n){if(!(i.subject instanceof Gn.DomainIRI)||!(i.predicate instanceof Gn.DomainIRI)||!(i.object instanceof Gn.DomainLiteral)||i.predicate.value!==OJ&&i.predicate.value!==FJ)continue;let s=LJ.exec(i.subject.value);if(!s)continue;let o=s[1].toLowerCase();if(e.has(o))continue;let l=i.object.value.trim();if(/\s/.test(l))continue;let c=RJ(l);c&&e.set(o,c)}if(e.size===0)return n;let t=new Set,r=[];for(let i of n){if(!(i.subject instanceof Gn.DomainIRI)||!(i.predicate instanceof Gn.DomainIRI)||!(i.object instanceof Gn.DomainLiteral)||i.predicate.value!==KD)continue;let s=i.object.value.trim(),o=DJ.exec(s);if(!o)continue;let l=o[1].toLowerCase(),c=e.get(l);if(!c)continue;let f=`${i.subject.value}\0${c}`;if(t.has(f))continue;t.add(f);let d=new Gn.DomainIRI(c);r.push(new Gn.DomainTriple(i.subject,new Gn.DomainIRI(KD),d)),r.push(new Gn.DomainTriple(i.subject,new Gn.DomainIRI(PJ),d))}return r.length>0?n.concat(r):n}a(Py,"resolveCrossVaultInstanceClassWikilinks");var NJ=300,XD=3e4,kJ="EXOCORTEX_SPARQL_TIMEOUT";function MJ(){let n=process.env[kJ];if(!n)return XD;try{let e=jJ(n);if(e!==null&&e>0)return e}catch{}return XD}a(MJ,"getDefaultTimeout");function jJ(n){let e=n.trim().toLowerCase();if(!e)return null;if(e.endsWith("ms")){let r=parseInt(e.slice(0,-2),10);return isNaN(r)||r<=0?null:r}if(e.endsWith("s")){let r=parseInt(e.slice(0,-1),10);return isNaN(r)||r<=0?null:r*1e3}let t=parseInt(e,10);return isNaN(t)||t<=0?null:t*1e3}a(jJ,"parseTimeoutSafe");function $J(n){if(!n)return NJ;let e=parseInt(n.trim(),10);if(isNaN(e)||e<=0)throw new nt(`Invalid cache TTL: "${n}". Must be a positive number (seconds).`,'exocortex sparql query --cache-ttl 600 "SELECT * WHERE { ?s ?p ?o }"');return e}a($J,"parseCacheTtl");function UJ(n){let e=n.trim().toLowerCase();if(e.endsWith("ms")){let r=parseInt(e.slice(0,-2),10);if(isNaN(r)||r<=0)throw new nt(`Invalid timeout format: "${n}". Value must be a positive number.`,'exocortex sparql query --timeout "30s" or --timeout "5000ms"');return r}if(e.endsWith("s")){let r=parseInt(e.slice(0,-1),10);if(isNaN(r)||r<=0)throw new nt(`Invalid timeout format: "${n}". Value must be a positive number.`,'exocortex sparql query --timeout "30s" or --timeout "5000ms"');return r*1e3}let t=parseInt(e,10);if(isNaN(t)||t<=0)throw new nt(`Invalid timeout format: "${n}". Use formats like "30s", "5000ms", or just a number (seconds).`,'exocortex sparql query --timeout "30s" or --timeout "5000ms"');return t*1e3}a(UJ,"parseTimeout");async function f2(n,e,t=Date.now()){let r,i=new Promise((s,o)=>{r=setTimeout(()=>{let l=Date.now()-t;o(new Sd(e,l))},e),r&&typeof r=="object"&&"unref"in r&&r.unref()});return Promise.race([n,i])}a(f2,"executeWithTimeout");function VJ(n,e){return e.concat([n])}a(VJ,"collectAlso");function ZD(){return new le("query").description("Execute SPARQL query against Obsidian vault").argument("[query]","SPARQL query string or path to .sparql file (optional if --template is used)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--also <path>","Additional vault to include in query (repeatable)",VJ,[]).option("--format <type>","Output format: table|json|csv|ntriples","table").option("--output <type>","Response format: text|json (for MCP tools)","text").option("--timeout <duration>","Query timeout (e.g., 30s, 5000ms)","30s").option("--dry-run","Validate query syntax without executing (no vault loading)").option("--explain","Show optimized query plan").option("--stats","Show execution statistics").option("--no-optimize","Disable query optimization").option("--use-cache","Use persistent triple cache (faster vault loading)").option("--cache-ttl <seconds>","Query result cache TTL in seconds (default: 300)").option("--no-cache","Bypass query result cache").option("--template <name>","Use a predefined query template").option("--param <params>","Template parameters (format: key=value,key2=value2)").option("--profile <uid>","FocusProfile UID \u2014 restrict graph to effective AssetSpace set (RFC 0a0791c1)").option("--strict","Fail on unresolved label-form wikilinks in property paths (sets EXOCORTEX_SPARQL_STRICT=1, Issue #3282)").action(async(n,e)=>{let t=e.output||"text";se.setFormat(t);let r=process.env.EXOCORTEX_SPARQL_STRICT;e.strict&&(process.env.EXOCORTEX_SPARQL_STRICT="1");let i="";try{let s=Date.now(),o=e.timeout?UJ(e.timeout):MJ(),l=$J(e.cacheTtl),c=e.profile!==void 0&&e.profile!=="",u=e.cache!==!1&&!c;if(c&&e.cache!==!1&&t==="text"&&console.log("\u26A0\uFE0F Query result cache bypassed because --profile is active (cache is not profile-aware; MVP limitation)."),e.template){let B=new Ty,K=e.param?B.parseParamString(e.param):{};if(i=B.applyTemplate(e.template,K),t==="text"){let ne=B.getTemplate(e.template);console.log(`\u{1F4CB} Using template: ${e.template}`),Object.keys(K).length>0&&console.log(` Parameters: ${Object.entries(K).map(([G,ie])=>`${G}=${ie}`).join(", ")}`),console.log()}}else if(n)i=BJ(n);else throw new nt("Either a query argument or --template flag is required.",'exocortex sparql query "SELECT * WHERE { ?s ?p ?o }" or exocortex sparql query --template tasks-by-date --param date=2024-01-15');if(e.dryRun){await qJ(i,e,t);return}let f=(0,El.resolve)(e.vault);if(u){let K=await new bu().get(i,l);if(K!==null){let ne=Date.now()-s;if(t==="json"){let G=ke.success(K,{durationMs:ne,itemCount:K.count||0,queryResultCacheHit:!0});console.log(JSON.stringify(G,null,2))}else{console.log(`\u{1F4E6} (cached) Query result loaded from cache in ${ne}ms
|
|
607
|
+
`+n}a(ba,"injectExocortexPrefixes");function Eu(n){return n.replace(mJ,(e,t,r,i,s)=>YD.has(r.toLowerCase())?`${r}:${i}`:e)}a(Eu,"transformShorthandNotation");function Sa(n){let e=new Map(n);for(let t of YD)e.delete(t);return e}a(Sa,"filterOntologyPrefixes");var xy=ee(ca()),Cy=ee(require("path"));var gJ="49fd2e56-4656-4ca7-a789-f472b16ea260",yJ="c9c65b0f-1e01-47c1-a1f9-1bf70b11df6a",_J="0cde1557-6320-4bd0-a7c4-8b72afc38720",bJ=new Set([gJ,yJ,_J]),SJ="73bd00e4-ccc0-4f3f-b20d-c4388c4588fb",wJ="3de846cd-1f0e-4f98-8613-b8587aa15174",vJ=5,Tu=class{static{a(this,"CliFocusProfileResolver")}constructor(e){let t=e.alsoVaultPaths??[];this.vaultPaths=[e.vaultPath,...t].map(r=>Cy.default.resolve(r)),this.maxExtendsDepth=e.maxExtendsDepth??vJ,this.warn=e.warn??(()=>{})}async resolveFilter(e){if(e==null||e==="")return{outcome:"no-profile"};let t;try{t=await this.scanAllVaults()}catch(u){let f=`[CliFocusProfileResolver] vault scan threw \u2014 ${String(u)}`;return this.warn(f),{outcome:"error",reason:f}}if(t.profiles.get(e)===void 0)return this.warn(`[CliFocusProfileResolver] profileUid=${e} not found in any scanned vault \u2014 falling back to no-filter (full vault).`),{outcome:"missing-profile",profileUid:e};let i=new Set;try{this.walkProfileChain(e,t.profiles,i,new Set,0)}catch(u){let f=`[CliFocusProfileResolver] profile chain walk threw \u2014 ${String(u)}`;return this.warn(f),{outcome:"error",reason:f}}let s=new Set(t.folderMap.values()),o=new Set,l=[];for(let u of i){if(s.has(u)){o.add(u);continue}let f=t.ontologyToAs.get(u);if(f!==void 0){o.add(f);continue}l.push(u)}for(let u of bJ)o.add(u);if(!Array.from(o).some(u=>s.has(u))){let u=`[CliFocusProfileResolver] profileUid=${e} produced effective set with zero AssetSpace folder overlap (${o.size} AS UIDs after translation+floor; ${t.folderMap.size} folders known). Likely cause: profile declares Ontology UIDs not covered by containsOntology, or vault has no scanned AssetSpaces. Falling back to no-filter (full vault indexed).`;return this.warn(u),{outcome:"degraded",reason:u}}return{outcome:"engaged",result:{effective:o,folderMap:t.folderMap,declaredOntologies:i,untranslated:l}}}walkProfileChain(e,t,r,i,s){if(s>this.maxExtendsDepth)throw new Error(`FocusProfile chain exceeds max depth ${this.maxExtendsDepth} at ${e} \u2014 possible cycle`);if(i.has(e))return;i.add(e);let o=t.get(e);if(o!==void 0){for(let l of o.includes)r.add(l);for(let l of o.alwaysOnOverlay)r.add(l);typeof o.extends=="string"&&o.extends.length>0&&this.walkProfileChain(o.extends,t,r,i,s+1)}}async scanAllVaults(){let e=new Map,t=new Map,r=new Map;for(let i of this.vaultPaths){if(!await xy.default.pathExists(i)){this.warn(`[CliFocusProfileResolver] vault path does not exist: ${i} \u2014 skipping.`);continue}let s=await this.walkVault(i);for(let o of s){let l=Fd(o.frontmatter.exo__Instance_class);if(l.some(c=>c===SJ)){let c=TJ(o.filePath,o.vaultRoot);c.length>0&&e.set(c,o.uid);let u=Fd(o.frontmatter.exo__AssetSpace_containsOntology);for(let f of u)t.set(f,o.uid)}if(l.some(c=>c===wJ)){let c={uid:o.uid,label:typeof o.frontmatter.exo__Asset_label=="string"?o.frontmatter.exo__Asset_label:void 0,includes:Fd(o.frontmatter.exo__FocusProfile_includes),extends:Fd(o.frontmatter.exo__FocusProfile_extends)[0]??null,alwaysOnOverlay:Fd(o.frontmatter.exo__FocusProfile_alwaysOnOverlay)};r.set(o.uid,c)}}}return{folderMap:e,ontologyToAs:t,profiles:r}}async walkVault(e){let t=[],r=[e];for(;r.length>0;){let i=r.pop(),s;try{s=await xy.default.readdir(i,{withFileTypes:!0})}catch{continue}for(let o of s){let l=Cy.default.join(i,o.name);if(o.isDirectory()){if(o.name.startsWith(".")||o.name==="node_modules"||o.name===".obsidian"||o.name===".exocortex")continue;r.push(l);continue}if(!o.isFile()||!o.name.endsWith(".md"))continue;let c=await this.tryReadFrontmatter(l);if(c===null)continue;let u=c.exo__Asset_uid;typeof u!="string"||u.length===0||t.push({uid:u,filePath:l,vaultRoot:e,frontmatter:c})}}return t}async tryReadFrontmatter(e){let t;try{t=await xy.default.readFile(e,"utf-8")}catch{return null}if(!t.startsWith("---"))return null;let r=t.match(/^---\r?\n([\s\S]*?)\r?\n---/);if(r===null)return null;try{let i=zt.load(r[1]);return i&&typeof i=="object"&&!Array.isArray(i)?i:null}catch{return null}}};function Fd(n){if(n==null)return[];let e=Array.isArray(n)?n:[n],t=[];for(let r of e){if(typeof r!="string")continue;let i=EJ(r);i!==null&&t.push(i)}return t}a(Fd,"parseWikilinkArray");function EJ(n){let e=n.trim().replace(/^\[\[/,"").replace(/\]\]$/,"").split("|")[0].trim();return e.length===0?null:e}a(EJ,"extractUidFromWikilink");function TJ(n,e){let t=Cy.default.relative(e,n).replace(/\\/g,"/");if(!t.startsWith("assetspaces/"))return"";let r=t.slice(12),i=r.indexOf("/");return i<0?"":`assetspaces/${r.slice(0,i)}`}a(TJ,"parentFolderRelative");async function wa(n){let{profileUid:e,primaryVaultPath:t,alsoVaultPaths:r,outputFormat:i}=n;if(e===void 0||e==="")return null;let o=await new Tu({vaultPath:t,alsoVaultPaths:r,warn:i==="text"?l=>console.warn(l):void 0}).resolveFilter(e);switch(o.outcome){case"engaged":{if(i==="text"){let l=IJ(o.result.effective);console.log(`\u{1F3AF} Profile ${e.slice(0,8)} engaged \u2014 ${o.result.effective.size} AS UIDs in scope (incl. ${l} TS-floor), ${o.result.folderMap.size} folders mapped.`),o.result.untranslated.length>0&&console.log(` \u2139\uFE0F ${o.result.untranslated.length} declared Ontology UID(s) had no AssetSpace_containsOntology mapping; passed through unfiltered.`)}return{effective:o.result.effective,folderMap:o.result.folderMap}}case"no-profile":return null;case"missing-profile":return i==="text"&&console.log(`\u26A0\uFE0F --profile ${o.profileUid} not found in vault(s) \u2014 indexing full vault.`),null;case"degraded":return i==="text"&&console.log(`\u26A0\uFE0F ${o.reason}`),null;case"error":return i==="text"&&console.log(`\u26A0\uFE0F ${o.reason}`),null}}a(wa,"resolveProfileFilter");var AJ=new Set(["49fd2e56-4656-4ca7-a789-f472b16ea260","c9c65b0f-1e01-47c1-a1f9-1bf70b11df6a","0cde1557-6320-4bd0-a7c4-8b72afc38720"]);function IJ(n){let e=0;for(let t of n)AJ.has(t)&&e++;return e}a(IJ,"countTsFloor");var QD=require("path");var xJ=/\/assetspaces\/([^/]+)\/?$/;function Ry(n){let e=(0,QD.resolve)(n).replace(/\\/g,"/"),t=xJ.exec(e);return t?`assetspaces/${t[1]}`:""}a(Ry,"deriveSubjectIriPrefix");var Gn=ee(Ct());var CJ=new Map([["exo__","https://exocortex.my/ontology/exo#"],["ems__","https://exocortex.my/ontology/ems#"],["exocmd__","https://exocortex.my/ontology/exocmd#"],["ims__","https://exocortex.my/ontology/ims#"],["ztlk__","https://exocortex.my/ontology/ztlk#"],["ptms__","https://exocortex.my/ontology/ptms#"],["lit__","https://exocortex.my/ontology/lit#"],["inbox__","https://exocortex.my/ontology/inbox#"],["place__","https://exocortex.my/ontology/place#"],["exoob__","https://exocortex.my/ontology/exoob#"],["pn__","https://exocortex.my/ontology/pn#"],["period__","https://exocortex.my/ontology/period#"],["rdf__","http://www.w3.org/1999/02/22-rdf-syntax-ns#"],["rdfs__","http://www.w3.org/2000/01/rdf-schema#"],["owl__","http://www.w3.org/2002/07/owl#"]]);function RJ(n){let e=n.indexOf("__");if(e===-1)return null;let t=n.slice(0,e+2),r=n.slice(e+2),i=CJ.get(t);return!i||!r?null:i+r}a(RJ,"labelToOntologyIRI");var KD="https://exocortex.my/ontology/exo#Instance_class",PJ="http://www.w3.org/1999/02/22-rdf-syntax-ns#type",OJ="http://www.w3.org/2000/01/rdf-schema#label",FJ="https://exocortex.my/ontology/exo#Asset_label",DJ=/^\[\[([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:\|[^\]]*)?\]\]$/i,LJ=/\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\.md$/i;function Py(n){let e=new Map;for(let i of n){if(!(i.subject instanceof Gn.DomainIRI)||!(i.predicate instanceof Gn.DomainIRI)||!(i.object instanceof Gn.DomainLiteral)||i.predicate.value!==OJ&&i.predicate.value!==FJ)continue;let s=LJ.exec(i.subject.value);if(!s)continue;let o=s[1].toLowerCase();if(e.has(o))continue;let l=i.object.value.trim();if(/\s/.test(l))continue;let c=RJ(l);c&&e.set(o,c)}if(e.size===0)return n;let t=new Set,r=[];for(let i of n){if(!(i.subject instanceof Gn.DomainIRI)||!(i.predicate instanceof Gn.DomainIRI)||!(i.object instanceof Gn.DomainLiteral)||i.predicate.value!==KD)continue;let s=i.object.value.trim(),o=DJ.exec(s);if(!o)continue;let l=o[1].toLowerCase(),c=e.get(l);if(!c)continue;let f=`${i.subject.value}\0${c}`;if(t.has(f))continue;t.add(f);let d=new Gn.DomainIRI(c);r.push(new Gn.DomainTriple(i.subject,new Gn.DomainIRI(KD),d)),r.push(new Gn.DomainTriple(i.subject,new Gn.DomainIRI(PJ),d))}return r.length>0?n.concat(r):n}a(Py,"resolveCrossVaultInstanceClassWikilinks");var NJ=300,XD=3e4,kJ="EXOCORTEX_SPARQL_TIMEOUT";function MJ(){let n=process.env[kJ];if(!n)return XD;try{let e=jJ(n);if(e!==null&&e>0)return e}catch{}return XD}a(MJ,"getDefaultTimeout");function jJ(n){let e=n.trim().toLowerCase();if(!e)return null;if(e.endsWith("ms")){let r=parseInt(e.slice(0,-2),10);return isNaN(r)||r<=0?null:r}if(e.endsWith("s")){let r=parseInt(e.slice(0,-1),10);return isNaN(r)||r<=0?null:r*1e3}let t=parseInt(e,10);return isNaN(t)||t<=0?null:t*1e3}a(jJ,"parseTimeoutSafe");function $J(n){if(!n)return NJ;let e=parseInt(n.trim(),10);if(isNaN(e)||e<=0)throw new rt(`Invalid cache TTL: "${n}". Must be a positive number (seconds).`,'exocortex sparql query --cache-ttl 600 "SELECT * WHERE { ?s ?p ?o }"');return e}a($J,"parseCacheTtl");function UJ(n){let e=n.trim().toLowerCase();if(e.endsWith("ms")){let r=parseInt(e.slice(0,-2),10);if(isNaN(r)||r<=0)throw new rt(`Invalid timeout format: "${n}". Value must be a positive number.`,'exocortex sparql query --timeout "30s" or --timeout "5000ms"');return r}if(e.endsWith("s")){let r=parseInt(e.slice(0,-1),10);if(isNaN(r)||r<=0)throw new rt(`Invalid timeout format: "${n}". Value must be a positive number.`,'exocortex sparql query --timeout "30s" or --timeout "5000ms"');return r*1e3}let t=parseInt(e,10);if(isNaN(t)||t<=0)throw new rt(`Invalid timeout format: "${n}". Use formats like "30s", "5000ms", or just a number (seconds).`,'exocortex sparql query --timeout "30s" or --timeout "5000ms"');return t*1e3}a(UJ,"parseTimeout");async function f2(n,e,t=Date.now()){let r,i=new Promise((s,o)=>{r=setTimeout(()=>{let l=Date.now()-t;o(new Sd(e,l))},e),r&&typeof r=="object"&&"unref"in r&&r.unref()});return Promise.race([n,i])}a(f2,"executeWithTimeout");function VJ(n,e){return e.concat([n])}a(VJ,"collectAlso");function ZD(){return new le("query").description("Execute SPARQL query against Obsidian vault").argument("[query]","SPARQL query string or path to .sparql file (optional if --template is used)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--also <path>","Additional vault to include in query (repeatable)",VJ,[]).option("--format <type>","Output format: table|json|csv|ntriples","table").option("--output <type>","Response format: text|json (for MCP tools)","text").option("--timeout <duration>","Query timeout (e.g., 30s, 5000ms)","30s").option("--dry-run","Validate query syntax without executing (no vault loading)").option("--explain","Show optimized query plan").option("--stats","Show execution statistics").option("--no-optimize","Disable query optimization").option("--use-cache","Use persistent triple cache (faster vault loading)").option("--cache-ttl <seconds>","Query result cache TTL in seconds (default: 300)").option("--no-cache","Bypass query result cache").option("--template <name>","Use a predefined query template").option("--param <params>","Template parameters (format: key=value,key2=value2)").option("--profile <uid>","FocusProfile UID \u2014 restrict graph to effective AssetSpace set (RFC 0a0791c1)").option("--strict","Fail on unresolved label-form wikilinks in property paths (sets EXOCORTEX_SPARQL_STRICT=1, Issue #3282)").action(async(n,e)=>{let t=e.output||"text";se.setFormat(t);let r=process.env.EXOCORTEX_SPARQL_STRICT;e.strict&&(process.env.EXOCORTEX_SPARQL_STRICT="1");let i="";try{let s=Date.now(),o=e.timeout?UJ(e.timeout):MJ(),l=$J(e.cacheTtl),c=e.profile!==void 0&&e.profile!=="",u=e.cache!==!1&&!c;if(c&&e.cache!==!1&&t==="text"&&console.log("\u26A0\uFE0F Query result cache bypassed because --profile is active (cache is not profile-aware; MVP limitation)."),e.template){let B=new Ty,K=e.param?B.parseParamString(e.param):{};if(i=B.applyTemplate(e.template,K),t==="text"){let ne=B.getTemplate(e.template);console.log(`\u{1F4CB} Using template: ${e.template}`),Object.keys(K).length>0&&console.log(` Parameters: ${Object.entries(K).map(([G,ie])=>`${G}=${ie}`).join(", ")}`),console.log()}}else if(n)i=BJ(n);else throw new rt("Either a query argument or --template flag is required.",'exocortex sparql query "SELECT * WHERE { ?s ?p ?o }" or exocortex sparql query --template tasks-by-date --param date=2024-01-15');if(e.dryRun){await qJ(i,e,t);return}let f=(0,El.resolve)(e.vault);if(u){let K=await new bu().get(i,l);if(K!==null){let ne=Date.now()-s;if(t==="json"){let G=ke.success(K,{durationMs:ne,itemCount:K.count||0,queryResultCacheHit:!0});console.log(JSON.stringify(G,null,2))}else{console.log(`\u{1F4E6} (cached) Query result loaded from cache in ${ne}ms
|
|
608
608
|
`);let G=K;G.type==="select"&&G.bindings?(console.log(`\u2705 Found ${G.bindings.length} result(s)
|
|
609
609
|
`),zJ(G.bindings,e.format)):G.type==="construct"&&G.triples&&(console.log(`\u2705 Generated ${G.triples.length} triple(s)
|
|
610
610
|
`),HJ(G.triples,e.format))}return}}if(!(0,Au.existsSync)(f))throw new de(f);t==="text"&&console.log(`\u{1F4E6} Loading vault: ${f}...`);let d=Date.now(),h=e.also||[],p=await wa({profileUid:e.profile,primaryVaultPath:f,alsoVaultPaths:h.map(B=>(0,El.resolve)(B)),outputFormat:t}),g=e.useCache??!1;g&&p!==null&&(t==="text"&&console.log("\u26A0\uFE0F --use-cache disabled because --profile is active (cache is not profile-aware; MVP limitation)."),g=!1);let y=[],v=!1,w=!1;if(g&&h.length>0&&p===null){let B=new _u(f,h.map(ne=>(0,El.resolve)(ne))),K=await B.loadIfValid();K!==null?(y=K.triples,v=!0,w=!0,t==="text"&&console.log(`\u{1F680} Combined cache hit! Loaded ${y.length} triples from cross-vault index (${B.getAllVaultPaths().length} vaults).`)):t==="text"&&console.log("\u2139\uFE0F Combined cache miss (or invalid). Falling back to per-vault load. Run `exocortex sparql index --vault <primary> --also <...>` to build the cross-vault index.")}if(!w){let B=[],K=[];for(let ne of h){let G=(0,El.resolve)(ne);if(!(0,Au.existsSync)(G))throw new de(G);let ie=Ry(G);B.push(new It(G,{subjectIriPrefix:ie})),K.push({resolvedAlsoPath:G,subjectIriPrefix:ie})}if(g){let G=await new bi(f).loadOrBuild();y=G.triples,v=G.cacheHit,t==="text"&&v&&console.log("\u{1F680} Cache hit! Loading from persistent cache...")}else{let ne=new It(f,{siblingAdapters:B});y=await new Mt.NoteToRDFConverter(ne).convertVault(p!==null?{effectiveOntologies:p.effective,assetSpaceFolderToUid:p.folderMap}:{})}for(let ne=0;ne<B.length;ne++){let G=B[ne],{resolvedAlsoPath:ie,subjectIriPrefix:W}=K[ne];t==="text"&&console.log(`\u{1F4E6} Loading additional vault: ${ie}...`);let q=await new Mt.NoteToRDFConverter(G,void 0,{subjectIriPrefix:W}).convertVault(p!==null?{effectiveOntologies:p.effective,assetSpaceFolderToUid:p.folderMap}:{});y=y.concat(q),t==="text"&&console.log(` \u2795 Added ${q.length} triples from ${ie}`)}if(h.length>0&&(y=Py(y),bl())){let ne=new It(f,{siblingAdapters:B}),G=dy([ne,...B]),ie=Mt.IRICanonicalizer.canonicalize(y,G);y=ie.triples,t==="text"&&ie.remapCount>0&&console.log(` \u{1FA84} IRI canonicalization (Issue #3286): remapped ${ie.remapCount} triple(s) covering ${ie.uniqueRemapCount} distinct synth-A IRI(s)`)}}let E=new Mt.InMemoryTripleStore;await E.addAll(y);let A=Date.now()-d;if(t==="text"){let B=v?" (from cache)":"",K=h.length>0?` (${h.length+1} vaults)`:"";console.log(`\u2705 Loaded ${y.length} triples in ${A}ms${B}${K}
|
|
@@ -617,7 +617,7 @@ Available prefixes: ${u}`,this.wellKnownPrefixes[r]&&l.push(`Add: PREFIX ${r}: <
|
|
|
617
617
|
`),console.log(i.formatAnalysis(s,"text"))):(console.log(i.formatAnalysis(s,"text")),process.exit(2));return}let r=new Mt.ExoQLParser;try{let i=r.parse(n);if(i.type!=="update"){let o=new Mt.ExoQLAlgebraTranslator().translate(i);if(!e.noOptimize&&o.type!=="construct")o=new Mt.AlgebraOptimizer().optimize(o);else if(!e.noOptimize&&o.type==="construct"){let l=new Mt.AlgebraOptimizer,c=o;o={...c,where:l.optimize(c.where)}}}if(t==="json"){let s=ke.success({valid:!0,queryType:JD(i),message:"Query syntax is valid"});console.log(JSON.stringify(s,null,2))}else console.log("\u2705 Query syntax is valid"),console.log(` Query type: ${JD(i)}`)}catch(i){eL(i,n,t)}}a(qJ,"executeDryRun");function JD(n){return n.type==="update"?"UPDATE":"queryType"in n?n.queryType:"UNKNOWN"}a(JD,"getQueryType");function GJ(n,e){switch(e){case"json":let t=new gu;console.log(t.format(n));break;case"csv":let r=new fy;console.log(r.format(n));break;case"table":default:let i=new mu;console.log(i.format(n));break}}a(GJ,"formatSelectResults");function WJ(n,e){let t=new yu;switch(e){case"json":console.log(t.formatJson(n));break;case"ntriples":console.log(t.formatNTriples(n));break;case"table":default:console.log(t.formatTable(n));break}}a(WJ,"formatConstructResults");function zJ(n,e){switch(e){case"json":console.log(JSON.stringify(n,null,2));break;case"csv":if(n.length===0){console.log("");return}let t=Object.keys(n[0]);console.log(t.join(","));for(let i of n){let s=t.map(o=>{let l=i[o];return l==null?"":String(l).includes(",")?`"${l}"`:String(l)});console.log(s.join(","))}break;case"table":default:if(n.length===0){console.log("No results.");return}let r=Object.keys(n[0]);console.log(r.join(" ")),console.log(r.map(()=>"---").join(" "));for(let i of n){let s=r.map(o=>String(i[o]??""));console.log(s.join(" "))}break}}a(zJ,"formatCachedSelectResults");function HJ(n,e){switch(e){case"json":console.log(JSON.stringify(n,null,2));break;case"ntriples":for(let t of n)console.log(`<${t.subject}> <${t.predicate}> ${YJ(t.object)} .`);break;case"table":default:console.log("Subject Predicate Object"),console.log("--- --- ---");for(let t of n)console.log(`${t.subject} ${t.predicate} ${t.object}`);break}}a(HJ,"formatCachedConstructResults");function YJ(n){return Iy.formatObject(n)}a(YJ,"formatNTriplesObject");function QJ(n,e){for(let t of n){let r=[`${t.type.toUpperCase()}`];switch(t.inserted!==void 0&&r.push(`inserted: ${t.inserted}`),t.deleted!==void 0&&r.push(`deleted: ${t.deleted}`),r.push(t.success?"OK":"FAILED"),e){case"json":console.log(JSON.stringify(t,null,2));break;case"csv":n.indexOf(t)===0&&console.log("type,inserted,deleted,success"),console.log(`${t.type},${t.inserted??""},${t.deleted??""},${t.success}`);break;case"table":default:console.log(`\u2705 ${r.join(" | ")}`);break}}}a(QJ,"formatUpdateResults");var p2=require("fs"),m2=require("path"),Ns=ee(Ct());var d2=require("fs"),h2=require("path"),vn=ee(Ct());async function tL(n,e,t={}){let r=t.silent??!1,i=t.log??(w=>console.log(w)),s=(0,h2.resolve)(n);if(!(0,d2.existsSync)(s))throw new de(s);let o=[];for(let w of e){let E=(0,h2.resolve)(w);if(!(0,d2.existsSync)(E))throw new de(E);E===s||o.includes(E)||o.push(E)}let l=[],c=[];for(let w of o){let E=Ry(w);l.push(new It(w,{subjectIriPrefix:E})),c.push(E)}r||i(`\u{1F4E6} Loading primary vault: ${s}...`);let u=[],f=new It(s,{siblingAdapters:l}),h=await new vn.NoteToRDFConverter(f).convertVault();u=u.concat(h),r||i(` \u2795 Added ${h.length} triples from primary vault`);for(let w=0;w<l.length;w++){let E=o[w],A=l[w],x=c[w];r||i(`\u{1F4E6} Loading additional vault: ${E}...`);let J=await new vn.NoteToRDFConverter(A,void 0,{subjectIriPrefix:x}).convertVault();u=u.concat(J),r||i(` \u2795 Added ${J.length} triples from ${E}`)}let p=u.length,g=0;if(o.length>0){let w=u.length;u=Py(u),g=u.length-w,!r&&g>0&&i(` \u{1F517} Cross-vault Instance_class resolution: emitted ${g} canonical-IRI triple(s)`)}let y=0;if(bl()&&o.length>0){let w=dy([f,...l]),E=vn.IRICanonicalizer.canonicalize(u,w);u=E.triples,y=E.remapCount,!r&&y>0&&i(` \u{1FA84} IRI canonicalization (Issue #3286): remapped ${y} triple(s) covering ${E.uniqueRemapCount} distinct synth-A IRI(s)`)}let v=0;if(t.noInference!==!0){let w=new vn.InMemoryTripleStore;await w.addAll(u);let A=await new vn.RDFSInferenceEngine().materialize(w);v+=A;let x=new vn.NonInheritablePropertyRegistry;await x.initialize(w);let D=new vn.PropertyCardinalityRegistry;await D.initialize(w);let ae=await new vn.PrototypeChainMaterializer(x,D).materialize(w);v+=ae,v>0&&(u=await w.match(),r||i(`\u{1F9E0} Materialized ${v} inferred triples on combined store (RDFS + prototype chain)`))}return{triples:u,rawTripleCount:p,crossVaultAddedTripleCount:g,inferredTripleCount:v,canonicalizedTripleCount:y}}a(tL,"buildCombinedTriples");function KJ(n,e){return e.concat([n])}a(KJ,"collectAlso");function rL(){return new le("index").description("Build or refresh the triple cache for faster SPARQL queries").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--also <path>","Additional vault to include in combined index (repeatable, Issue #3281)",KJ,[]).option("--output <type>","Response format: text|json (for MCP tools)","text").option("--stats","Show cache statistics after building").option("--force","Force rebuild even if cache is valid").option("--strict","Fail on first invalid IRI instead of skipping").option("--no-inference","Disable RDFS subClassOf inference materialization").action(async n=>{let e=n.output||"text";se.setFormat(e);try{let t=(0,m2.resolve)(n.vault);if(!(0,p2.existsSync)(t))throw new de(t);let r=n.also??[];if(r.length>0){await XJ(t,r,n,e);return}let i=new bi(t),s=i.getCachePath();n.force&&(e==="text"&&console.log("\u{1F5D1}\uFE0F Invalidating existing cache..."),await i.invalidate()),e==="text"&&console.log(`\u{1F4E6} Building triple cache for: ${t}...`);let o=Date.now(),l=await i.buildCacheWithValidation({strict:n.strict??!1}),c=0;if(n.inference!==!1){let{triples:f}=await i.loadOrBuild(),d=new Ns.InMemoryTripleStore;await d.addAll(f),c=await new Ns.RDFSInferenceEngine().materialize(d);let p=new Ns.NonInheritablePropertyRegistry;await p.initialize(d);let g=new Ns.PropertyCardinalityRegistry;await g.initialize(d);let v=await new Ns.PrototypeChainMaterializer(p,g).materialize(d);if(c+=v,c>0){let w=await d.match();await i.saveTriples(w),l.tripleCount+=c}e==="text"&&c>0&&console.log(`\u{1F9E0} Materialized ${c} inferred triples (RDFS + prototype chain)`)}let u=Date.now()-o;if(e==="json"){let f={action:"build",cachePath:s,tripleCount:l.tripleCount,durationMs:l.durationMs},d={summary:l.summary,skippedFiles:l.skippedFiles};if(n.stats){let h=await i.getCacheStats();if(h){let p={tripleCount:h.tripleCount,createdAt:h.createdAt.toISOString(),isValid:h.isValid,sizeBytes:h.sizeBytes,cachePath:s},g=ke.success({cache:f,stats:p,validation:d},{durationMs:u});console.log(JSON.stringify(g,null,2))}}else{let h=ke.success({cache:f,validation:d},{durationMs:u});console.log(JSON.stringify(h,null,2))}}else{if(l.skippedFiles.length>0){console.log(`
|
|
618
618
|
\u26A0\uFE0F Files skipped due to IRI issues:`);for(let f of l.skippedFiles)console.log(` - ${f.path}`),console.log(` ${f.reason}`);console.log("")}if(console.log(`\u2705 Indexed ${l.summary.indexed} files, skipped ${l.summary.skipped} (total: ${l.summary.total})`),console.log(`\u{1F4CA} Created cache with ${l.tripleCount.toLocaleString()} triples at ${s}`),console.log(`\u23F1\uFE0F Build time: ${l.durationMs}ms`),n.stats){let f=await i.getCacheStats();f&&(console.log(`
|
|
619
619
|
\u{1F4CA} Cache Statistics:`),console.log(` Triples: ${f.tripleCount.toLocaleString()}`),console.log(` Created: ${f.createdAt.toISOString()}`),console.log(` Valid: ${f.isValid?"\u2705 Yes":"\u274C No"}`),console.log(` Size: ${nL(f.sizeBytes)}`))}}}catch(t){se.handle(t)}})}a(rL,"sparqlIndexCommand");async function XJ(n,e,t,r){for(let f of e){let d=(0,m2.resolve)(f);if(!(0,p2.existsSync)(d))throw new de(d)}let i=new _u(n,e),s=i.getCachePath();t.force&&(r==="text"&&console.log("\u{1F5D1}\uFE0F Invalidating existing combined cache..."),await i.invalidate()),r==="text"&&console.log(`\u{1F4E6} Building combined triple cache (${i.getAllVaultPaths().length} vaults)...`);let o=Date.now(),l=await tL(n,e,{noInference:t.inference===!1,silent:r!=="text"});await i.saveTriples(l.triples);let c=Date.now()-o,u=l.triples.length;if(r==="json"){let f={action:"build",cachePath:s,tripleCount:u,durationMs:c};if(t.stats){let h=await i.getCacheStats();if(h){let p={tripleCount:h.tripleCount,createdAt:h.createdAt.toISOString(),isValid:h.isValid,sizeBytes:h.sizeBytes,cachePath:s},g=ke.success({cache:f,stats:p,combined:{vaultPaths:i.getAllVaultPaths(),rawTripleCount:l.rawTripleCount,crossVaultAddedTripleCount:l.crossVaultAddedTripleCount,inferredTripleCount:l.inferredTripleCount,canonicalizedTripleCount:l.canonicalizedTripleCount}},{durationMs:c});console.log(JSON.stringify(g,null,2));return}}let d=ke.success({cache:f,combined:{vaultPaths:i.getAllVaultPaths(),rawTripleCount:l.rawTripleCount,crossVaultAddedTripleCount:l.crossVaultAddedTripleCount,inferredTripleCount:l.inferredTripleCount,canonicalizedTripleCount:l.canonicalizedTripleCount}},{durationMs:c});console.log(JSON.stringify(d,null,2))}else if(console.log(`\u{1F4CA} Created combined cache with ${u.toLocaleString()} triples at ${s}`),console.log(`\u23F1\uFE0F Build time: ${c}ms`),t.stats){let f=await i.getCacheStats();if(f){console.log(`
|
|
620
|
-
\u{1F4CA} Combined Cache Statistics:`),console.log(` Triples: ${f.tripleCount.toLocaleString()}`),console.log(` Created: ${f.createdAt.toISOString()}`),console.log(` Valid: ${f.isValid?"\u2705 Yes":"\u274C No"}`),console.log(` Size: ${nL(f.sizeBytes)}`),console.log(` Vaults (${f.vaultPaths.length}):`);for(let d of f.vaultPaths)console.log(` - ${d}`)}}}a(XJ,"runCombinedIndex");function nL(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}a(nL,"formatBytes");var sL=require("path");var Ro=ee(require("fs")),g2=ee(require("path")),iL=require("events");var JJ={watch:Ro.default.watch.bind(Ro.default),existsSync:Ro.default.existsSync.bind(Ro.default),statSync:Ro.default.statSync.bind(Ro.default),readFileSync:Ro.default.readFileSync.bind(Ro.default)},Oy=class extends iL.EventEmitter{constructor(t,r={}){super();this.watcher=null;this.debounceTimers=new Map;this.isRunning=!1;this.vaultPath=g2.default.resolve(t),this.fsAdapter=r.fsAdapter??JJ,this.options={pattern:r.pattern??"**/*.md",assetType:r.assetType??"",debounceMs:r.debounceMs??100,recursive:r.recursive??!0}}static{a(this,"FileSystemWatcher")}start(){this.isRunning||(this.watcher=this.fsAdapter.watch(this.vaultPath,{recursive:this.options.recursive},(t,r)=>{r&&this.handleFileEvent(t,r.toString())}),this.watcher.on("error",t=>{this.emit("error",t)}),this.isRunning=!0,this.emit("started"))}stop(){if(this.isRunning){for(let t of this.debounceTimers.values())clearTimeout(t);this.debounceTimers.clear(),this.watcher&&(this.watcher.close(),this.watcher=null),this.isRunning=!1,this.emit("stopped")}}isWatching(){return this.isRunning}handleFileEvent(t,r){let i=g2.default.join(this.vaultPath,r),s=r;if(!this.matchesPattern(s))return;let o=this.debounceTimers.get(i);o&&clearTimeout(o);let l=setTimeout(()=>{this.debounceTimers.delete(i),this.processFileEvent(i,s)},this.options.debounceMs);this.debounceTimers.set(i,l)}processFileEvent(t,r){let i=this.fsAdapter.existsSync(t),s;if(!i)s="delete";else{let c=this.fsAdapter.statSync(t);s=Date.now()-c.birthtimeMs<1e3?"create":"modify"}let o;if(i&&t.endsWith(".md")&&(o=this.extractAssetType(t)),this.options.assetType&&o!==this.options.assetType)return;let l={type:s,path:t,relativePath:r,timestamp:new Date().toISOString(),assetType:o};this.emit("change",l)}matchesPattern(t){return this.options.pattern?Br(t,this.options.pattern):!0}extractAssetType(t){try{let i=this.fsAdapter.readFileSync(t,"utf-8").match(/^---\n([\s\S]*?)\n---/);if(!i)return;let o=i[1].match(/exo__Instance_class:\s*(?:\[?"?\[\[([^\]]+)\]\]"?\]?|"?\[\[([^\]]+)\]\]"?)/);return o?o[1]||o[2]:void 0}catch{return}}};var y2=ee(require("fs"));function oL(){return new le("watch").description("Watch vault for file changes and emit NDJSON events").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--pattern <glob>","Glob pattern to filter files (e.g., '*.md', 'tasks/**')").option("--asset-type <type>","Filter by asset type (e.g., 'ems__Task', 'ems__Project')").option("--debounce <ms>","Debounce interval in milliseconds","100").action(async n=>{se.setFormat("json");try{let e=(0,sL.resolve)(n.vault);if(!y2.default.existsSync(e))throw new de(e);if(!y2.default.statSync(e).isDirectory())throw new
|
|
620
|
+
\u{1F4CA} Combined Cache Statistics:`),console.log(` Triples: ${f.tripleCount.toLocaleString()}`),console.log(` Created: ${f.createdAt.toISOString()}`),console.log(` Valid: ${f.isValid?"\u2705 Yes":"\u274C No"}`),console.log(` Size: ${nL(f.sizeBytes)}`),console.log(` Vaults (${f.vaultPaths.length}):`);for(let d of f.vaultPaths)console.log(` - ${d}`)}}}a(XJ,"runCombinedIndex");function nL(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}a(nL,"formatBytes");var sL=require("path");var Ro=ee(require("fs")),g2=ee(require("path")),iL=require("events");var JJ={watch:Ro.default.watch.bind(Ro.default),existsSync:Ro.default.existsSync.bind(Ro.default),statSync:Ro.default.statSync.bind(Ro.default),readFileSync:Ro.default.readFileSync.bind(Ro.default)},Oy=class extends iL.EventEmitter{constructor(t,r={}){super();this.watcher=null;this.debounceTimers=new Map;this.isRunning=!1;this.vaultPath=g2.default.resolve(t),this.fsAdapter=r.fsAdapter??JJ,this.options={pattern:r.pattern??"**/*.md",assetType:r.assetType??"",debounceMs:r.debounceMs??100,recursive:r.recursive??!0}}static{a(this,"FileSystemWatcher")}start(){this.isRunning||(this.watcher=this.fsAdapter.watch(this.vaultPath,{recursive:this.options.recursive},(t,r)=>{r&&this.handleFileEvent(t,r.toString())}),this.watcher.on("error",t=>{this.emit("error",t)}),this.isRunning=!0,this.emit("started"))}stop(){if(this.isRunning){for(let t of this.debounceTimers.values())clearTimeout(t);this.debounceTimers.clear(),this.watcher&&(this.watcher.close(),this.watcher=null),this.isRunning=!1,this.emit("stopped")}}isWatching(){return this.isRunning}handleFileEvent(t,r){let i=g2.default.join(this.vaultPath,r),s=r;if(!this.matchesPattern(s))return;let o=this.debounceTimers.get(i);o&&clearTimeout(o);let l=setTimeout(()=>{this.debounceTimers.delete(i),this.processFileEvent(i,s)},this.options.debounceMs);this.debounceTimers.set(i,l)}processFileEvent(t,r){let i=this.fsAdapter.existsSync(t),s;if(!i)s="delete";else{let c=this.fsAdapter.statSync(t);s=Date.now()-c.birthtimeMs<1e3?"create":"modify"}let o;if(i&&t.endsWith(".md")&&(o=this.extractAssetType(t)),this.options.assetType&&o!==this.options.assetType)return;let l={type:s,path:t,relativePath:r,timestamp:new Date().toISOString(),assetType:o};this.emit("change",l)}matchesPattern(t){return this.options.pattern?Br(t,this.options.pattern):!0}extractAssetType(t){try{let i=this.fsAdapter.readFileSync(t,"utf-8").match(/^---\n([\s\S]*?)\n---/);if(!i)return;let o=i[1].match(/exo__Instance_class:\s*(?:\[?"?\[\[([^\]]+)\]\]"?\]?|"?\[\[([^\]]+)\]\]"?)/);return o?o[1]||o[2]:void 0}catch{return}}};var y2=ee(require("fs"));function oL(){return new le("watch").description("Watch vault for file changes and emit NDJSON events").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--pattern <glob>","Glob pattern to filter files (e.g., '*.md', 'tasks/**')").option("--asset-type <type>","Filter by asset type (e.g., 'ems__Task', 'ems__Project')").option("--debounce <ms>","Debounce interval in milliseconds","100").action(async n=>{se.setFormat("json");try{let e=(0,sL.resolve)(n.vault);if(!y2.default.existsSync(e))throw new de(e);if(!y2.default.statSync(e).isDirectory())throw new rt(`Vault path is not a directory: ${e}`,"Provide a path to a directory, not a file",{vaultPath:e});let t=parseInt(n.debounce?.toString()??"100",10);if(isNaN(t)||t<0)throw new rt("--debounce must be a non-negative integer","Use a positive integer value for debounce",{debounce:n.debounce});let r=new Oy(e,{pattern:n.pattern,assetType:n.assetType,debounceMs:t});r.on("change",s=>{console.log(JSON.stringify(s))}),r.on("error",s=>{let o=ke.error("INTERNAL_OPERATION_FAILED",s.message,5,{recovery:{message:"Check file permissions and vault access",suggestion:"Ensure the vault directory is accessible"}});console.log(JSON.stringify(o))});let i=a(()=>{r.stop(),process.exit(0)},"shutdown");process.on("SIGINT",i),process.on("SIGTERM",i),console.error(`Watching vault: ${e}`),n.pattern&&console.error(` Pattern filter: ${n.pattern}`),n.assetType&&console.error(` Asset type filter: ${n.assetType}`),console.error(` Debounce: ${t}ms`),console.error("Press Ctrl+C to stop"),r.start()}catch(e){se.handle(e)}})}a(oL,"watchCommand");var Fy=require("fs"),ts=require("path");function aL(){return new le("resolve").description("Resolve UUID to file path").argument("<uuid>","Full or partial UUID to resolve").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: uri|path|json (default: uri)","uri").option("--output <type>","Response format: text|json (for MCP tools)","text").option("--partial","Match partial UUIDs (returns all matches)").action(async(n,e)=>{let t=e.output||"text";se.setFormat(t);try{let r=Date.now();if(!ZJ(n))throw new rt(`Invalid UUID format: ${n}`,"exocortex resolve <uuid> [--format uri|path|json] [--partial]",{uuid:n});let i=(0,ts.resolve)(e.vault);if(!(0,Fy.existsSync)(i))throw new de(i);let s=eZ(i,n,e.partial??!1),o=Date.now()-r;if(s.length===0){if(t==="json"){let l=ke.error("VALIDATION_FILE_NOT_FOUND",`UUID not found: ${n}`,3,{context:{uuid:n}});console.log(JSON.stringify(l,null,2))}else console.error(`UUID not found: ${n}`);process.exit(1)}e.partial||s.length>1?rZ(s,i,e.format,t,n,o):tZ(s[0],i,e.format,t,n,o)}catch(r){se.handle(r)}})}a(aL,"resolveCommand");function ZJ(n){if(n.length<4)return!1;let e=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,t=/^[0-9a-f-]+$/i;return e.test(n)||t.test(n)}a(ZJ,"isValidUuidFormat");function eZ(n,e,t){let r=[],i=e.toLowerCase();function s(o){let l=(0,Fy.readdirSync)(o,{withFileTypes:!0});for(let c of l){let u=(0,ts.join)(o,c.name);if(c.isDirectory())!c.name.startsWith(".")&&c.name!=="node_modules"&&s(u);else if(c.isFile()&&c.name.endsWith(".md")){let f=c.name.toLowerCase();t?f.includes(i)&&r.push(u):(f.startsWith(i+".md")||f.startsWith(i+" ")||f.startsWith(i+"-"))&&r.push(u)}}}return a(s,"walk"),s(n),r}a(eZ,"findFilesWithUuid");function lL(n){return`obsidian://vault/${encodeURI(n)}`}a(lL,"pathToObsidianUri");function cL(n){let e=n.match(/^([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/i);return e?e[1]:(0,ts.basename)(n,".md")}a(cL,"extractUuidFromFilename");function tZ(n,e,t,r,i,s){let o=(0,ts.relative)(e,n),l=lL(o),c=cL((0,ts.basename)(n));if(r==="json"){let u={uuid:c,path:o,absolutePath:n,uri:l},f=ke.success(u,{durationMs:s,searchUuid:i});console.log(JSON.stringify(f,null,2))}else switch(t){case"path":console.log(n);break;case"json":console.log(JSON.stringify({uuid:c,path:o,absolutePath:n,uri:l},null,2));break;case"uri":default:console.log(l);break}}a(tZ,"outputSingleResult");function rZ(n,e,t,r,i,s){let o=n.map(l=>{let c=(0,ts.relative)(e,l),u=lL(c);return{uuid:cL((0,ts.basename)(l)),path:c,absolutePath:l,uri:u}});if(r==="json"){let l=ke.success({matches:o,count:o.length},{durationMs:s,searchUuid:i,itemCount:o.length});console.log(JSON.stringify(l,null,2))}else switch(t){case"path":for(let l of o)console.log(l.absolutePath);break;case"json":console.log(JSON.stringify(o,null,2));break;case"uri":default:for(let l of o)console.log(l.uri);break}}a(rZ,"outputMultipleResults");var uL=require("fs"),fL=require("path"),Wn=ee(Ct());function dL(){return new le("ask").description("Ask a question in natural language about your vault").argument("<question>","Question in natural language (Russian or English)").option("--vault <path>","Path to Obsidian vault",process.cwd()).option("--format <type>","Output format: table|json","table").option("--output <type>","Response format: text|json (for MCP tools)","text").option("--show-query","Show the generated SPARQL query").option("--explain","Show explanation of the query conversion").option("--profile <uid>","FocusProfile UID \u2014 restrict graph to effective AssetSpace set (RFC 0a0791c1)").action(async(n,e)=>{let t=e.output||"text";se.setFormat(t);try{let r=Date.now(),i=(0,fL.resolve)(e.vault);if(!(0,uL.existsSync)(i))throw new de(i);let s=new Wn.NLToSPARQLService;t==="text"&&console.log(`\u{1F9E0} Analyzing question: "${n}"
|
|
621
621
|
`);let o=s.convert(n);e.showQuery&&t==="text"&&(console.log("\u{1F4DD} Generated SPARQL Query:"),console.log("\u2500".repeat(50)),console.log(o.query),console.log("\u2500".repeat(50)),console.log()),e.explain&&t==="text"&&(console.log(`\u{1F4D6} Explanation: ${o.explanation}`),console.log(`\u{1F3AF} Confidence: ${(o.confidence*100).toFixed(0)}%`),o.templateName&&console.log(`\u{1F4CB} Template: ${o.templateName}`),o.isFallback&&console.log("\u26A0\uFE0F Using fallback generic search query"),console.log()),t==="text"&&console.log(`\u{1F4E6} Loading vault: ${i}...`);let l=Date.now(),c=await wa({profileUid:e.profile,primaryVaultPath:i,outputFormat:t}),u=new It(i),d=await new Wn.NoteToRDFConverter(u).convertVault(c!==null?{effectiveOntologies:c.effective,assetSpaceFolderToUid:c.folderMap}:{}),h=new Wn.InMemoryTripleStore;await h.addAll(d);let p=Date.now()-l;t==="text"&&console.log(`\u2705 Loaded ${d.length} triples in ${p}ms
|
|
622
622
|
`);let g=o.query;g=Eu(g),g=ba(g);let y=new Wn.ExoQLParser,v=Sa(_a(i));v.size>0&&y.setVaultPrefixes(v);let w=y.parse(g),A=new Wn.ExoQLAlgebraTranslator().translate(w);A=new Wn.AlgebraOptimizer().optimize(A);let D=Date.now(),ae=await new Wn.ExoQLQueryExecutor(h).executeAll(A),ge=Date.now()-D,N=Date.now()-r,Q=s.getSuggestions(n);if(t==="json"){let oe=ae.map(ne=>ne.toJSON()),B={question:n,query:o.query,template:o.templateName,parameters:o.parameters,confidence:o.confidence,explanation:o.explanation,count:ae.length,bindings:oe,suggestions:Q.length>0?Q:void 0},K=ke.success(B,{durationMs:N,itemCount:ae.length,loadDurationMs:p,execDurationMs:ge,triplesScanned:d.length});console.log(JSON.stringify(K,null,2))}else{if(console.log(`\u2705 Found ${ae.length} result(s) in ${ge}ms
|
|
623
623
|
`),ae.length>0?nZ(ae,e.format):console.log("No results found."),Q.length>0){console.log(`
|
|
@@ -773,35 +773,35 @@ exo__BacklinksTableBlock_columns:${f==="[]"?" []":f}
|
|
|
773
773
|
`),console.log(`${"Rank".padEnd(6)}${"Term".padEnd(30)}${"Freq".padEnd(8)}Sample UIDs`),console.log("-".repeat(90)),l.forEach((u,f)=>{let d=`#${f+1}`.padEnd(6),h=u.term.padEnd(30),p=String(u.frequency).padEnd(8),g=u.sample_uids.join(", ");console.log(`${d}${h}${p}${g}`)})})}a(mN,"backfillOrphanTermsCommand");function gN(){let n=new le("backfill").description("Concept backfill tools for aiKnow assets");return n.addCommand(pN()),n.addCommand(mN()),n}a(gN,"backfillCommand");var Xy=require("path"),TN=require("fs"),AN=require("os");var Qy=require("child_process"),Ky=require("fs"),SN=require("path");var rs=require("fs"),Yy=ee(require("path")),_N=require("crypto");var _ee=/^---\s*\r?\n([\s\S]*?)\r?\n---\s*(?:\r?\n([\s\S]*))?$/;function yN(n){let e=n.match(_ee);if(!e)return null;let[,t,r=""]=e,i=zt.load(t);if(i==null)return{frontmatter:{},body:r};if(typeof i!="object"||Array.isArray(i))throw new Error("frontmatter is not a YAML mapping");return{frontmatter:i,body:r}}a(yN,"parseFile");function bee(n,e){let t=zt.dump(n,{lineWidth:-1,quotingType:'"',forceQuotes:!1,noRefs:!0}),r=e.length>0?e:"";return`---
|
|
774
774
|
${t}---
|
|
775
775
|
${r}`}a(bee,"serializeFile");function bN(n,e,t={}){let r=Yy.default.dirname(n),i=Yy.default.basename(n),s=Yy.default.join(r,`.${i}.tmp.${process.pid}.${(0,_N.randomBytes)(6).toString("hex")}`);try{let o=(0,rs.readFileSync)(n,"utf8"),l;try{l=yN(o)}catch(f){return{success:!1,verified:!1,reason:"parse-error",error:f.message}}if(!l)return{success:!1,verified:!1,reason:"no-frontmatter"};let c={...l.frontmatter,...e},u=bee(c,l.body);if((0,rs.writeFileSync)(s,u,"utf8"),(0,rs.renameSync)(s,n),t.verifyKey!==void 0){let f=(0,rs.readFileSync)(n,"utf8"),d;try{d=yN(f)}catch(p){return{success:!1,verified:!1,reason:"parse-error",error:p.message}}if(!d)return{success:!1,verified:!1,reason:"no-frontmatter"};let h=d.frontmatter[t.verifyKey];return h!==t.verifyValue?{success:!1,verified:!1,reason:"verify-mismatch",error:`expected ${t.verifyKey}=${String(t.verifyValue)}, got ${String(h)}`}:{success:!0,verified:!0}}return{success:!0,verified:!0}}catch(o){if((0,rs.existsSync)(s))try{(0,rs.unlinkSync)(s)}catch{}return{success:!1,verified:!1,reason:"fs-error",error:o.message}}}a(bN,"atomicUpdateFrontmatter");var See=/^claude-child-([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/,wee=/^claude-child-([0-9a-f]{8})-(\d+)$/,vee="EffortStatusDoing";function wN(n){return e=>new Promise((t,r)=>{n(e,(i,s,o)=>{i?r(Object.assign(i,{stdout:s,stderr:o})):t(s)})})}a(wN,"makeExecPromise");async function Eee(n=Qy.exec){let e=wN(n),t;try{t=await e("tmux list-sessions -F '#{session_name}' 2>/dev/null")}catch{return[]}let r=[];for(let i of t.split(`
|
|
776
|
-
`).map(s=>s.trim()).filter(Boolean)){let s=See.exec(i);if(s){r.push({sessionName:i,uuid:s[1],type:"full"});continue}let o=wee.exec(i);o&&r.push({sessionName:i,uuid:o[1],type:"short"})}return r}a(Eee,"listClaudeChildSessions");function Tee(n,e,t){let r=null,i=e.toLowerCase();function s(o){if(r)return;let l;try{l=(0,Ky.readdirSync)(o,{withFileTypes:!0})}catch{return}for(let c of l){if(r)return;if(c.name.startsWith(".")||c.name==="node_modules")continue;let u=(0,SN.join)(o,c.name);if(c.isDirectory())s(u);else if(c.name.endsWith(".md")){let f=c.name.slice(0,-3).toLowerCase();(t==="full"&&f===i||t==="short"&&f.startsWith(i))&&(r=u)}}}return a(s,"walk"),s(n),r}a(Tee,"findVaultFile");function Aee(n,e){try{let i=(e??(s=>(0,Ky.readFileSync)(s,"utf8")))(n).match(/ems__Effort_status\s*:.*\[\[([^\]]+)\]\]/);return i?i[1].includes(vee):!1}catch{return!1}}a(Aee,"isTaskDoing");async function vN(n,e=Qy.exec,t){let r=await Eee(e),i=[];for(let s of r){let o=Tee(n,s.uuid,s.type);if(!o){i.push({sessionName:s.sessionName,taskUuid:s.uuid,taskFilePath:null,reason:"vault task not found"});continue}Aee(o,t)||i.push({sessionName:s.sessionName,taskUuid:s.uuid,taskFilePath:o,reason:"vault task status != Doing"})}return i}a(vN,"detectOrphans");async function EN(n,e,t=Qy.exec,r=bN){let i=wN(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(o){return{ok:!1,error:`vault update failed: ${o.message}`}}try{await i(`tmux kill-session -t ${JSON.stringify(n.sessionName)}`)}catch{}return{ok:!0}}a(EN,"recoverOrphan");function Iee(){return process.env.EXOCORTEX_VAULT??(0,Xy.join)((0,AN.homedir)(),"vault-2025")}a(Iee,"defaultVault");function IN(){return new le("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",Iee()).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,Xy.resolve)(n.vault);if(!(0,TN.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 vN(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 o of r){let l=o.taskFilePath??"(not found in vault)";console.log(` session=${o.sessionName} uuid=${o.taskUuid} reason=${o.reason}`),console.log(` file=${l}`)}if(t){console.log("[recover] Dry-run mode: no changes applied. Use --apply to recover.");return}let i=0,s=0;for(let o of r){let l=await EN(o,!1);l.ok?(i++,console.log(`[recover] RECOVERED: ${o.sessionName}`)):(s++,console.error(`[recover] ERROR recovering ${o.sessionName}: ${l.error}`))}console.log(`[recover] Done: recovered=${i} errors=${s}`),s>0&&(process.exitCode=1)})}a(IN,"recoverCommand");var M2=require("fs"),Nd=require("path"),ni=ee(Ct());function xee(n,e){return e.concat([n])}a(xee,"collectAlso");var Cee="https://exocortex.my/ontology/find#Alias_sparql",Ree="https://exocortex.my/ontology/exo#Asset_label";function Fu(n){if(n&&typeof n=="object"&&"value"in n){let e=n.value;return typeof e=="string"?e:String(e)}return String(n)}a(Fu,"nodeValue");async function Pee(n,e){let t=await n.match(void 0,void 0,void 0),r=[];for(let s of t)Fu(s.predicate)!==Ree||Fu(s.object)!==e||r.push(Fu(s.subject));if(r.length===0)return null;let i=[];for(let s of r)for(let o of t)Fu(o.predicate)===Cee&&Fu(o.subject)===s&&i.push(Fu(o.object));if(i.length===0)return null;if(i.length>1)throw new
|
|
776
|
+
`).map(s=>s.trim()).filter(Boolean)){let s=See.exec(i);if(s){r.push({sessionName:i,uuid:s[1],type:"full"});continue}let o=wee.exec(i);o&&r.push({sessionName:i,uuid:o[1],type:"short"})}return r}a(Eee,"listClaudeChildSessions");function Tee(n,e,t){let r=null,i=e.toLowerCase();function s(o){if(r)return;let l;try{l=(0,Ky.readdirSync)(o,{withFileTypes:!0})}catch{return}for(let c of l){if(r)return;if(c.name.startsWith(".")||c.name==="node_modules")continue;let u=(0,SN.join)(o,c.name);if(c.isDirectory())s(u);else if(c.name.endsWith(".md")){let f=c.name.slice(0,-3).toLowerCase();(t==="full"&&f===i||t==="short"&&f.startsWith(i))&&(r=u)}}}return a(s,"walk"),s(n),r}a(Tee,"findVaultFile");function Aee(n,e){try{let i=(e??(s=>(0,Ky.readFileSync)(s,"utf8")))(n).match(/ems__Effort_status\s*:.*\[\[([^\]]+)\]\]/);return i?i[1].includes(vee):!1}catch{return!1}}a(Aee,"isTaskDoing");async function vN(n,e=Qy.exec,t){let r=await Eee(e),i=[];for(let s of r){let o=Tee(n,s.uuid,s.type);if(!o){i.push({sessionName:s.sessionName,taskUuid:s.uuid,taskFilePath:null,reason:"vault task not found"});continue}Aee(o,t)||i.push({sessionName:s.sessionName,taskUuid:s.uuid,taskFilePath:o,reason:"vault task status != Doing"})}return i}a(vN,"detectOrphans");async function EN(n,e,t=Qy.exec,r=bN){let i=wN(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(o){return{ok:!1,error:`vault update failed: ${o.message}`}}try{await i(`tmux kill-session -t ${JSON.stringify(n.sessionName)}`)}catch{}return{ok:!0}}a(EN,"recoverOrphan");function Iee(){return process.env.EXOCORTEX_VAULT??(0,Xy.join)((0,AN.homedir)(),"vault-2025")}a(Iee,"defaultVault");function IN(){return new le("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",Iee()).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,Xy.resolve)(n.vault);if(!(0,TN.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 vN(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 o of r){let l=o.taskFilePath??"(not found in vault)";console.log(` session=${o.sessionName} uuid=${o.taskUuid} reason=${o.reason}`),console.log(` file=${l}`)}if(t){console.log("[recover] Dry-run mode: no changes applied. Use --apply to recover.");return}let i=0,s=0;for(let o of r){let l=await EN(o,!1);l.ok?(i++,console.log(`[recover] RECOVERED: ${o.sessionName}`)):(s++,console.error(`[recover] ERROR recovering ${o.sessionName}: ${l.error}`))}console.log(`[recover] Done: recovered=${i} errors=${s}`),s>0&&(process.exitCode=1)})}a(IN,"recoverCommand");var M2=require("fs"),Nd=require("path"),ni=ee(Ct());function xee(n,e){return e.concat([n])}a(xee,"collectAlso");var Cee="https://exocortex.my/ontology/find#Alias_sparql",Ree="https://exocortex.my/ontology/exo#Asset_label";function Fu(n){if(n&&typeof n=="object"&&"value"in n){let e=n.value;return typeof e=="string"?e:String(e)}return String(n)}a(Fu,"nodeValue");async function Pee(n,e){let t=await n.match(void 0,void 0,void 0),r=[];for(let s of t)Fu(s.predicate)!==Ree||Fu(s.object)!==e||r.push(Fu(s.subject));if(r.length===0)return null;let i=[];for(let s of r)for(let o of t)Fu(o.predicate)===Cee&&Fu(o.subject)===s&&i.push(Fu(o.object));if(i.length===0)return null;if(i.length>1)throw new rt(`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]}a(Pee,"resolveAliasFragment");var Oee=/^([a-z][a-zA-Z0-9]*)__([A-Za-z0-9_]+)$/,Fee="https://exocortex.my/ontology/";function Dee(n,e){let t=Oee.exec(e);if(t){let i=`<${Fee}${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}"`)}a(Dee,"bindValueLiteral");function xN(){return new le("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)",xee,[]).option("--sparql <query>","SPARQL SELECT query (must bind ?path)").option("--class <value>","Filter by class label via find__Alias 'class' (e.g. ems__Task)").option("--profile <uid>","FocusProfile UID \u2014 restrict graph to effective AssetSpace set (RFC 0a0791c1)").action(async n=>{se.setFormat("text");try{if(n.sparql&&n.class)throw new rt("--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 rt("one of --sparql <query> or --class <value> is required",'exocortex find --class ems__Task OR exocortex find --sparql "SELECT ?path WHERE { ... }"');let e=(0,Nd.resolve)(n.vault);if(!(0,M2.existsSync)(e))throw new de(e);let t=n.also||[],r=await wa({profileUid:n.profile,primaryVaultPath:e,alsoVaultPaths:t.map(A=>(0,Nd.resolve)(A)),outputFormat:"text"}),i=r!==null?{effectiveOntologies:r.effective,assetSpaceFolderToUid:r.folderMap}:{},s=new It(e),l=await new ni.NoteToRDFConverter(s).convertVault(i);for(let A of t){let x=(0,Nd.resolve)(A);if(!(0,M2.existsSync)(x))throw new de(x);let D=new It(x),ae=await new ni.NoteToRDFConverter(D).convertVault(i);l=l.concat(ae)}let c=new ni.InMemoryTripleStore;await c.addAll(l);let u;if(n.class){let A=await Pee(c,"class");if(A===null)throw new rt('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");u=`SELECT ?path WHERE { ${Dee(A,n.class)} }`}else u=n.sparql;let f=Eu(u);f=ba(f);let d=new ni.ExoQLParser,h=Sa(_a(e));for(let A of t){let x=Sa(_a((0,Nd.resolve)(A)));for(let[D,J]of x)h.has(D)||h.set(D,J)}h.size>0&&d.setVaultPrefixes(h);let p=d.parse(f),y=new ni.ExoQLAlgebraTranslator().translate(p);y.type!=="construct"&&(y=new ni.AlgebraOptimizer().optimize(y));let w=await new ni.ExoQLQueryExecutor(c).executeAll(y),E="obsidian://vault/";for(let A of w){let D=A.toJSON().path;if(typeof D!="string"||!D.startsWith(E))continue;let J=D.slice(E.length),ae;try{ae=decodeURIComponent(J)}catch{ae=J}process.stdout.write(ae+`
|
|
777
777
|
`)}}catch(e){se.handle(e),process.exit(5)}})}a(xN,"findCommand");var U2=require("fs"),V2=require("path"),Oe=ee(Ct());var CN=ee(Ct());function RN(n,e){return t=>{let r=typeof t.filePath=="string"&&t.filePath.length>0?t.filePath:null;if(r===null)return!1;let i=n.getAbstractFileByPath(r);if(i===null||!("basename"in i))return!1;let s=i,o=n.getFrontmatter(s)??{},l=e.getExpectedFolderSync(s,o),c=typeof t.currentFolder=="string"?t.currentFolder:s.parent?.path??"";return(0,CN.needsFolderRepair)(c,l)}}a(RN,"createIsInWrongFolderHostFunction");var NN=ee(Ct()),jt=ee(FN());var DN="obsidian://vault/";function Hee(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(DN))r=decodeURI(r.slice(DN.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}}}a(Hee,"createCliPathResolver");var Yee=["openFile","sparqlSelect","getActiveFileIRI","getActiveFilePath","trashFile","duplicateFile"],$2=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{a(this,"CliServiceNotImplementedError")}};function LN(n){return{async execute(){throw new $2(n)}}}a(LN,"notImplementedService");function Qee(n){return e=>{let t=n.getFirstLinkpathDest(e,"");if(!t||!("basename"in t))return null;let i=n.getFrontmatter(t)?.exo__Asset_label;return typeof i=="string"&&i.length>0?i:null}}a(Qee,"createCliClassResolver");function kN(n,e){for(let t of Yee)n.register(t,LN(t));for(let t of["updateProperty","removeProperty","setStatus","createAsset"])n.register(t,LN(t));if(e){if(e.fsAdapter){let t=new NN.FrontmatterService,r=Hee(e.fsAdapter);n.register("updateProperty",(0,jt.createUpdatePropertyService)(e.fsAdapter,t,r)),n.register("removeProperty",(0,jt.createRemovePropertyService)(e.fsAdapter,t,r)),n.register("setStatus",(0,jt.createSetStatusService)(e.fsAdapter,t,r)),n.register("createAsset",(0,jt.createCreateAssetService)(e.vaultAdapter,e.fsAdapter,Qee(e.vaultAdapter)))}n.register("createRelatedTask",(0,jt.createCreateRelatedTaskService)(e.vaultAdapter,e.genericAssetCreationService)),n.register("createRelatedProject",(0,jt.createCreateRelatedProjectService)(e.vaultAdapter,e.genericAssetCreationService)),n.register("archiveAsset",(0,jt.createArchiveAssetService)(e.vaultAdapter,e.archiveAssetService)),n.register("planForEvening",(0,jt.createPlanForEveningService)(e.vaultAdapter,e.taskStatusService)),n.register("cleanProperties",(0,jt.createCleanPropertiesService)(e.vaultAdapter,e.propertyCleanupService)),n.register("renameToUid",(0,jt.createRenameToUidService)(e.vaultAdapter,e.renameToUidService)),n.register("repairFolder",(0,jt.createRepairFolderService)(e.vaultAdapter,e.folderRepairService)),n.register("fixMissingLabel",(0,jt.createFixMissingLabelService)(e.vaultAdapter,e.fixMissingLabelService))}}a(kN,"populateCliServiceRegistry");var Kee=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;async function Xee(){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(`
|
|
778
|
-
`).map(t=>t.trim()).filter(t=>t.length>0)}a(Xee,"readStdinLines");function e0(n){if(n&&typeof n=="object"&&"value"in n){let e=n.value;return typeof e=="string"?e:String(e)}return String(n)}a(e0,"nodeValue");async function Jee(n,e){let t=new Oe.IRI("https://exocortex.my/ontology/exocmd#Command_cliName"),r=await n.match(void 0,t,void 0),i=[];for(let s of r)if(e0(s.object)===e){let c=e0(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);c&&i.push(c[1])}if(i.length===0)return null;if(i.length>1)throw new
|
|
778
|
+
`).map(t=>t.trim()).filter(t=>t.length>0)}a(Xee,"readStdinLines");function e0(n){if(n&&typeof n=="object"&&"value"in n){let e=n.value;return typeof e=="string"?e:String(e)}return String(n)}a(e0,"nodeValue");async function Jee(n,e){let t=new Oe.IRI("https://exocortex.my/ontology/exocmd#Command_cliName"),r=await n.match(void 0,t,void 0),i=[];for(let s of r)if(e0(s.object)===e){let c=e0(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);c&&i.push(c[1])}if(i.length===0)return null;if(i.length>1)throw new rt(`Ambiguous cliName "${e}" \u2014 resolves to ${i.length} commands: ${i.join(", ")}`,"Use the UUID directly: exocortex apply <uuid> <path>");return i[0]}a(Jee,"resolveSlugToUuid");async function Zee(n,e){let t=new Oe.IRI("https://exocortex.my/ontology/exocmd#Command_destructive"),r=await n.match(void 0,t,void 0);for(let i of r)if(e0(i.subject).includes(e)){let o=e0(i.object);if(o==="true"||o==="True")return!0}return!1}a(Zee,"isDestructive");async function ete(n,e,t,r,i,s,o,l){let c=(0,V2.resolve)(n,i);if(!(0,U2.existsSync)(c))return console.error(`\u274C Target file not found: ${i}`),!1;let u=new Oe.CommandResolver(e),f=await u.loadCommand(r);if(!f)return console.error(`\u274C Command with UID "${r}" not found.`),!1;if(await Zee(e,r)&&!s.dryRun&&!s.yes)return console.error(`\u274C Command "${f.name}" is marked destructive. Add --dry-run to preview, or --yes to apply.`),!1;let h=(0,Oe.vaultPathToIRI)(i),p=new It(n),g=new Oe.FolderRepairService(p),y=new Oe.PreconditionEvaluator(e,void 0,{clock:o});(0,Oe.registerDefaultHostFunctions)(y),y.registerHostFunction("isInWrongFolder",RN(p,g));let v=p.getAbstractFileByPath(i),w=v!==null&&"basename"in v?v:null,E=w?p.getFrontmatter(w):null,A=E&&typeof E=="object"?E.exo__Asset_uid:void 0,x={targetIRI:h,filePath:i,fileBasename:w?.basename,assetUid:typeof A=="string"?A:void 0};if(!await y.evaluate(f.precondition,h,x))return console.error(`\u274C Precondition not satisfied for "${f.name}" on "${i}".`),!1;if(s.dryRun)return console.log(`\u{1F50D} Dry-run: would apply "${f.name}" to "${i}" (precondition passed).`),!0;let J=new Oe.ServiceRegistry,ae=new Oe.GenericAssetCreationService(p).withDeterminism({clock:o,uidGenerator:l}),ge=new Oe.ArchiveAssetService(p),N=new Oe.PropertyCleanupService(p),Q=new Oe.FixMissingLabelService(p),oe=new Oe.RenameToUidService(p),B=new Oe.TaskStatusService(p,new Oe.EffortStatusWorkflow,new Oe.StatusTimestampService(p)),K=new _r(n);kN(J,{vaultAdapter:p,fsAdapter:K,genericAssetCreationService:ae,archiveAssetService:ge,taskStatusService:B,propertyCleanupService:N,fixMissingLabelService:Q,renameToUidService:oe,folderRepairService:g});let ne=new Oe.GroundingExecutor(K,K,J,(0,Oe.createVaultFrontmatterClassLabelResolver)(K),{clock:o,uidGenerator:l,workflowResolver:t,groundingLoader:a(W=>u.loadGroundingByUid(W),"groundingLoader")}),G;if(s.input)try{let W=JSON.parse(s.input);if(typeof W!="object"||W===null||Array.isArray(W))throw new Error("must be a JSON object");G=W}catch(W){let V=W instanceof Error?W.message:String(W);return console.error(`\u274C --input: invalid JSON object (${V})`),!1}let ie=await ne.execute(f.grounding,h,i,G);if(ie.success){let W=f.successMessage??`Applied "${f.name}" to "${i}".`;return console.log(`\u2705 ${W}`),!0}else return console.error(`\u274C "${f.name}" failed on "${i}": ${ie.error}`),!1}a(ete,"executeOnTarget");function MN(){return new le("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").option("--seed <uuid>","Deterministic UID seed for test/replay (uses seededUidGenerator)").option("--frozen-clock <iso>","Freeze clock to ISO timestamp for test/replay (uses frozenClock)").action(async(n,e,t)=>{se.setFormat("text");try{let r=(0,V2.resolve)(t.vault);if(!(0,U2.existsSync)(r))throw new de(r);jy(r);let i=t.frozenClock?(0,Oe.frozenClock)(t.frozenClock):(0,Oe.liveClock)(),s=t.seed?(0,Oe.seededUidGenerator)(t.seed):(0,Oe.liveUidGenerator)(),o=new It(r),c=await new Oe.NoteToRDFConverter(o).convertVault(),u=new Oe.InMemoryTripleStore;await u.addAll(c);let f=new Oe.WorkflowResolver(u),d;if(Kee.test(n))d=n;else{let y=await Jee(u,n);y||(console.error(`\u274C No command found with UUID or cliName "${n}".`),process.exit(3)),d=y}let h;if(e)h=[e];else if(h=await Xee(),h.length===0)throw new rt("No target path provided and stdin is empty.","exocortex apply <uuid> <path> OR exocortex find ... | exocortex apply <uuid>");let p=0,g=0;for(let y of h)await ete(r,u,f,d,y,t,i,s)?p++:g++;h.length>1&&console.log(`
|
|
779
779
|
\u{1F4CA} Applied to ${p}/${h.length} target(s) (${g} failed).`),g>0&&process.exit(5)}catch(r){se.handle(r),process.exit(5)}})}a(MN,"applyCommand");var Ea=require("fs"),Du=require("path");var jN=/^---\s*$/,tte=/^exocmd__Grounding_type:\s*(.+?)\s*$/,rte=/^"?\[\[[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}(?:\|[^\]]*)?\]\]"?$/i,nte=new Set(["node_modules"]);function ite(n){return n.startsWith(".")||nte.has(n)}a(ite,"shouldSkipDir");function*$N(n){let e;try{e=(0,Ea.readdirSync)(n,{withFileTypes:!0})}catch(t){let r=t;if(r.code==="EPERM"||r.code==="EACCES"||r.code==="ENOENT")return;throw t}for(let t of e){let r=(0,Du.join)(n,t.name);if(t.isDirectory()){if(ite(t.name))continue;yield*$N(r)}else t.isFile()&&t.name.endsWith(".md")&&(yield r)}}a($N,"walkMarkdownFiles");function ste(n){let e=n.split(/\r?\n/);if(e.length<2||!jN.test(e[0]))return null;for(let t=1;t<e.length;t++)if(jN.test(e[t]))return{lines:e.slice(1,t),startLine:2};return null}a(ste,"extractFrontmatter");function ote(n){let e=n.trim();return e===""||e==="null"||e==="~"?!1:!rte.test(e)}a(ote,"isLiteralForm");function ate(n){let e=[];for(let t of $N(n)){let r;try{r=(0,Ea.readFileSync)(t,"utf-8")}catch{continue}let i=ste(r);if(i)for(let s=0;s<i.lines.length;s++){let o=i.lines[s].match(tte);if(!o)continue;let l=o[1];ote(l)&&e.push({path:(0,Du.relative)(n,t),line:i.startLine+s,value:l})}}return e}a(ate,"scanVaultForLiteralForm");function UN(){return new le("grounding-type-literal-form").description("Detect post-Phase-4+1 regressions: any exocmd__Grounding_type literal-string form (not wikilink) in vault frontmatter").requiredOption("--vault <path>","Vault root directory").option("--output <type>","Response format: text|json","text").action(n=>{let e=n.output??"text";se.setFormat(e);try{let t=(0,Du.resolve)(n.vault);if(!(0,Ea.existsSync)(t)||!(0,Ea.statSync)(t).isDirectory())throw new de(t);let r=ate(t);if(e==="json")console.log(JSON.stringify({vaultPath:t,violationCount:r.length,violations:r,clean:r.length===0},null,2));else if(r.length===0)console.log(`OK ${t}: 0 exocmd__Grounding_type literal-form violations`);else{console.error(`FAIL ${t}: ${r.length} exocmd__Grounding_type literal-form violation(s):`);for(let i of r)console.error(` ${i.path}:${i.line} \u2014 value: ${i.value}`);console.error("\nRFC 9d20c91f Phase 3 migrated all values to wikilink form `[[<uid>]]`. Re-run the Phase 3 migration script or hand-edit offending files.")}r.length>0&&(process.exitCode=1)}catch(t){se.handle(t)}})}a(UN,"auditGroundingTypeLiteralFormCommand");function VN(){let n=new le("audit").description("Audit vault for regression patterns (RFC cutover detectors)");return n.addCommand(UN()),n}a(VN,"auditCommand");var BN=require("fs"),qN=require("path");var lte=a(n=>{process.stderr.write(`${n}
|
|
780
780
|
`)},"DEFAULT_LOG"),t0=class{static{a(this,"HeadlessConfirmGate")}constructor(e){this.yes=e.yes,this.verbose=e.verbose??!1,this.log=e.log??lte}async confirmHardSwitch(e){if(this.verbose){let t=Array.from(e.filesToDestroy.values()).reduce((r,i)=>r+i.length,0);this.log(`[hard-switch] Target: ${e.targetProfileLabel} (${e.targetProfileUid})`),this.log(`[hard-switch] Source: ${e.sourceProfileLabel}`),this.log(`[hard-switch] ${t} files to remove, ${e.assetSpacesBeingTornDown.length} AS to tear down, ${e.assetSpacesBeingMaterialized.length} AS to materialize`)}return this.yes?!0:(this.log("[hard-switch] Refused: --yes flag required for headless mode (Decision #2 safety)."),!1)}};var cte="[hard-switch] CLI command scaffolded. hardSwitchProfile() implementation pending Phase 3.";function ute(n,e){return{targetProfileUid:n,targetProfileLabel:e,sourceProfileUid:null,sourceProfileLabel:"<unknown>",filesToDestroy:new Map,assetSpacesBeingTornDown:[],assetSpacesBeingMaterialized:[]}}a(ute,"buildScaffoldPlan");async function fte(n,e,t={}){let r=[],i=[],s=t.out??(y=>process.stdout.write(`${y}
|
|
781
781
|
`)),o=t.err??(y=>process.stderr.write(`${y}
|
|
782
|
-
`)),l=a(y=>{r.push(y),s(y)},"out"),c=a(y=>{i.push(y),o(y)},"err");if(!e.vault)throw new
|
|
782
|
+
`)),l=a(y=>{r.push(y),s(y)},"out"),c=a(y=>{i.push(y),o(y)},"err");if(!e.vault)throw new rt("--vault is required");let u=(0,qN.resolve)(e.vault);if(!(0,BN.existsSync)(u))throw new de(u);if(!n||n.length===0)throw new rt("profile-uid argument is required","exocortex hard-switch <profile-uid> --vault <path>");let d=await(t.resolverFactory?.(e)??new Tu({vaultPath:u,warn:a(y=>c(y),"warn")})).resolveFilter(n);if(d.outcome==="missing-profile")throw new rt(`Profile not found: ${n}`,"Run `exocortex find --class exo__FocusProfile` to list available profiles");if(d.outcome==="error")return c(`[hard-switch] Resolver error: ${d.reason}`),{exitCode:5,stdout:r,stderr:i};if(d.outcome==="degraded")return c(`[hard-switch] Refused: profile resolution degraded \u2014 ${d.reason}. Hard switch aborted to prevent vault corruption.`),{exitCode:5,stdout:r,stderr:i};let h=t.confirmGate??new t0({yes:e.yes??!1,verbose:e.verbose??!1,log:a(y=>c(y),"log")}),p=ute(n,n);return await h.confirmHardSwitch(p)?(l(cte),{exitCode:0,stdout:r,stderr:i}):{exitCode:0,stdout:r,stderr:i}}a(fte,"runHardSwitch");function GN(){return new le("hard-switch").description("Hard switch to specified FocusProfile (filesystem mutation, Phase 3+). Requires --yes for headless mode.").argument("<profile-uid>","Target FocusProfile UID").requiredOption("--vault <path>","Path to Obsidian vault").option("--yes","Confirm hard switch (headless mode safety override per RFC 22b50a17 Decision #2)",!1).option("--verbose","Print plan summary to stderr before deciding",!1).action(async(e,t)=>{try{let r=await fte(e,t);process.exit(r.exitCode)}catch(r){se.handle(r)}})}a(GN,"hardSwitchCommand");var zN=require("path"),HN=require("fs");var In=require("node:fs"),kd=ee(require("node:path"));var WN="b8884976-596f-43d2-b7f4-3da518f825d4";var dte="3de846cd-1f0e-4f98-8613-b8587aa15174",r0=class{static{a(this,"SharedIdentitiesProfileMigrationService")}generatePlan(e){let t=kd.join(e.vaultPath,"assetspaces","shared-identities"),r=e.profilesDirRelative??"assetspaces/profiles",i=kd.join(e.vaultPath,r),s=[];if(!(0,In.existsSync)(t))return{vaultPath:e.vaultPath,sharedIdentitiesPath:t,profilesDirPath:i,actions:s,summary:{relocate:0,alreadyMigrated:0,skipped:0}};let o=(0,In.readdirSync)(t).filter(l=>l.endsWith(".md"));for(let l of o){let c=kd.join(t,l),u=l.replace(/\.md$/,""),{label:f,isFocusProfile:d}=this.parseSourceFile(c);if(!d){s.push({kind:"skip-not-focus-profile",uid:u,label:f,srcPath:c});continue}let h=kd.join(i,l);if((0,In.existsSync)(h)){s.push({kind:"already-migrated",uid:u,label:f,profilesDirPath:h});continue}s.push({kind:"relocate-and-dual-class",uid:u,label:f,srcPath:c,profilesDirPath:h})}return{vaultPath:e.vaultPath,sharedIdentitiesPath:t,profilesDirPath:i,actions:s,summary:{relocate:s.filter(l=>l.kind==="relocate-and-dual-class").length,alreadyMigrated:s.filter(l=>l.kind==="already-migrated").length,skipped:s.filter(l=>l.kind==="skip-not-focus-profile").length}}}apply(e){let t=this.generatePlan(e),r=[],i=[];if(!e.apply)return{plan:t,applied:r,errors:i};(0,In.existsSync)(t.profilesDirPath)||(0,In.mkdirSync)(t.profilesDirPath,{recursive:!0});for(let s of t.actions)if(s.kind==="relocate-and-dual-class")try{let o=this.transformProfileFile(s.srcPath);(0,In.writeFileSync)(s.profilesDirPath,o,"utf8"),(0,In.renameSync)(s.srcPath,s.srcPath+".migrated-backup"),r.push({kind:"relocate-and-dual-class",uid:s.uid,from:s.srcPath,to:s.profilesDirPath})}catch(o){i.push({uid:s.uid,srcPath:s.srcPath,reason:o instanceof Error?o.message:String(o)})}return{plan:t,applied:r,errors:i}}normalizeContent(e){return e.replace(/^/,"").replace(/\r\n/g,`
|
|
783
783
|
`)}parseSourceFile(e){let r=this.normalizeContent((0,In.readFileSync)(e,"utf8")).match(/^---\n([\s\S]+?)\n---/);if(r===null)return{label:"<no-frontmatter>",isFocusProfile:!1};let i=r[1],s=i.match(/^exo__Asset_label:\s*(.+)$/m),o=s!==null?s[1].trim():"<no-label>",l=i.includes(dte)||/exo__Instance_class:\s*[\s\S]*?\[\[exo__FocusProfile/.test(i);return{label:o,isFocusProfile:l}}transformProfileFile(e){let t=this.normalizeContent((0,In.readFileSync)(e,"utf8")),r=t.match(/^(---\n[\s\S]+?\n---)(\n[\s\S]*)?$/);if(r===null)throw new Error(`Source file ${e} has no parseable frontmatter`);let i=r[1],s=r[2]??"";if(i.includes(WN))return t;let o=i.replace(/(exo__Instance_class:\s*\n((?:\s+-\s+.+\n)+))/,(f,d,h)=>`exo__Instance_class:
|
|
784
784
|
${` - "[[${WN}]]"
|
|
785
785
|
`}${h}`),l=o.match(/(exo__FocusProfile_includes:\s*\n((?:\s+-\s+.+\n)+))/);if(l!==null){let d=`exo__KnowledgeProfile_includes:
|
|
786
786
|
${l[2]}`;o=o.replace(l[1],`${l[1]}${d}`)}let c=o.match(/(exo__FocusProfile_extends:\s*.+\n)/);if(c!==null){let f=c[1].replace("FocusProfile_extends","KnowledgeProfile_extends");o=o.replace(c[1],`${c[1]}${f}`)}let u=o.match(/(exo__FocusProfile_alwaysOnOverlay:\s*\n((?:\s+-\s+.+\n)+))/);if(u!==null){let d=`exo__KnowledgeProfile_alwaysOnOverlay:
|
|
787
|
-
${u[2]}`;o=o.replace(u[1],`${u[1]}${d}`)}return o+s}};function YN(){return new le("migrate-shared-identities-profiles").description("Phase 6.5: relocate FocusProfile instances from shared-identities/ \u043A profiles/ + add dual-class KnowledgeProfile (RFC 13da049f). Dry-run by default; --apply to mutate.").requiredOption("--vault <path>","Path to Obsidian vault root").option("--apply","Execute migration (default: dry-run)",!1).option("--json","Emit plan / result as JSON",!1).action(async n=>{try{if(!n.vault)throw new
|
|
788
|
-
`);else{process.stdout.write(`Migration applied: ${
|
|
789
|
-
`);for(let
|
|
790
|
-
`);for(let
|
|
787
|
+
${u[2]}`;o=o.replace(u[1],`${u[1]}${d}`)}return o+s}};function YN(){return new le("migrate-shared-identities-profiles").description("Phase 6.5: relocate FocusProfile instances from shared-identities/ \u043A profiles/ + add dual-class KnowledgeProfile (RFC 13da049f). Dry-run by default; --apply to mutate.").requiredOption("--vault <path>","Path to Obsidian vault root").option("--apply","Execute migration (default: dry-run)",!1).option("--json","Emit plan / result as JSON",!1).option("--profiles-dir <name>","Target AssetSpace folder name under assetspaces/ (default: profiles)","profiles").action(async n=>{try{if(!n.vault)throw new rt("--vault is required");let e=n.profilesDir??"profiles";if(!/^[A-Za-z0-9._-]+$/.test(e)||e==="."||e.includes(".."))throw new rt(`--profiles-dir must be a plain folder name (got "${e}")`);let t=`assetspaces/${e}`,r=(0,zN.resolve)(n.vault);if(!(0,HN.existsSync)(r))throw new de(r);let i=new r0;if(n.apply){let s=i.apply({vaultPath:r,apply:!0,profilesDirRelative:t});if(n.json)process.stdout.write(JSON.stringify(s,null,2)+`
|
|
788
|
+
`);else{process.stdout.write(`Migration applied: ${s.applied.length} relocated, ${s.errors.length} errors
|
|
789
|
+
`);for(let o of s.applied)process.stdout.write(` \u2713 ${o.uid}: ${o.from} \u2192 ${o.to}
|
|
790
|
+
`);for(let o of s.errors)process.stderr.write(` \u2717 ${o.uid}: ${o.reason}
|
|
791
791
|
`);process.stdout.write(`
|
|
792
792
|
Next steps:
|
|
793
|
-
1. cd ${
|
|
794
|
-
2. cd ${
|
|
795
|
-
3. cd ${
|
|
793
|
+
1. cd ${s.plan.profilesDirPath} && git add . && git commit + push
|
|
794
|
+
2. cd ${r} && git submodule deinit assetspaces/shared-identities (if all migrated)
|
|
795
|
+
3. cd ${r} && git submodule add <exoas-profiles-url> assetspaces/profiles
|
|
796
796
|
4. Repeat 1-3 \u0432 sibling vault if dual-vault setup
|
|
797
|
-
`)}process.exit(
|
|
798
|
-
`);else{process.stdout.write(`Dry-run plan \u0434\u043B\u044F ${
|
|
799
|
-
`),process.stdout.write(` Source: ${
|
|
800
|
-
`),process.stdout.write(` Target: ${
|
|
801
|
-
`),process.stdout.write(` Summary: ${
|
|
802
|
-
|
|
803
|
-
`);for(let
|
|
804
|
-
`):
|
|
797
|
+
`)}process.exit(s.errors.length>0?1:0)}else{let s=i.generatePlan({vaultPath:r,profilesDirRelative:t});if(n.json)process.stdout.write(JSON.stringify(s,null,2)+`
|
|
798
|
+
`);else{process.stdout.write(`Dry-run plan \u0434\u043B\u044F ${r}:
|
|
799
|
+
`),process.stdout.write(` Source: ${s.sharedIdentitiesPath}
|
|
800
|
+
`),process.stdout.write(` Target: ${s.profilesDirPath}
|
|
801
|
+
`),process.stdout.write(` Summary: ${s.summary.relocate} \u043A relocate, ${s.summary.alreadyMigrated} already migrated, ${s.summary.skipped} skipped (non-FocusProfile)
|
|
802
|
+
|
|
803
|
+
`);for(let o of s.actions)o.kind==="relocate-and-dual-class"?process.stdout.write(` RELOCATE: ${o.uid} (${o.label}) \u2192 ${o.profilesDirPath}
|
|
804
|
+
`):o.kind==="already-migrated"&&process.stdout.write(` SKIP-DONE: ${o.uid} (${o.label}) \u2014 already at ${o.profilesDirPath}
|
|
805
805
|
`);process.stdout.write(`
|
|
806
806
|
Run \u0441 --apply \u043A execute.
|
|
807
807
|
`)}process.exit(0)}}catch(e){se.handle(e)}})}a(YN,"migrateSharedIdentitiesProfilesCommand");var Il=require("node:path"),xl=require("node:fs");var Pr=require("node:fs"),JN=require("node:fs/promises"),ZN=require("node:os"),Ms=require("node:path");var hte={0:"file",1:"hardLink",2:"symbolicLink",3:"characterDevice",4:"blockDevice",5:"directory",6:"fifo",7:"contiguousFile",g:"globalExtendedHeader",x:"extendedHeader",D:"gnuDirectory",I:"gnuInodeMetadata",K:"gnuLongLinkName",L:"gnuLongFileName",N:"gnuOldLongFileName",M:"gnuMultiVolume",S:"gnuSparseFile",E:"gnuExtendedSparse",A:"solarisAcl",V:"solarisVolumeLabel",X:"solarisOldExtendedHeader"};function pte(n,e){let t=n.buffer||n,r=[],i=0,s,o;for(;i<t.byteLength-512;){let l=Ta(t,i,100);if(l.length===0)break;if(s){let x=s.path||s.linkpath;x&&(l=x)}let c=Ta(t,i+100,8).trim(),u=Number.parseInt(Ta(t,i+108,8)),f=Number.parseInt(Ta(t,i+116,8)),d=QN(t,i+124,12),h=512+512*Math.trunc(d/512)+(d%512?512:0),p=QN(t,i+136,12),g=Ta(t,i+156,1)||"0",y=hte[g]||g;switch(y){case"extendedHeader":case"globalExtendedHeader":{let x=gte(new Uint8Array(t,i+512,d));y==="extendedHeader"?s=x:(s=void 0,o={...o,...x}),i+=h;continue}case"gnuLongFileName":case"gnuOldLongFileName":case"gnuLongLinkName":{s={path:Ta(t,i+512,d)},i+=h;continue}}let v=Ta(t,i+265,32),w=Ta(t,i+297,32);l=mte(l);let E={name:l,type:y,size:d,attrs:{...o,...s,mode:c,uid:u,gid:f,mtime:p,user:v,group:w}};if(s=void 0,e?.filter&&!e.filter(E)){i+=h;continue}if(e?.metaOnly){r.push(E),i+=h;continue}let A=d===0?void 0:new Uint8Array(t,i+512,d);r.push({...E,data:A,get text(){return new TextDecoder().decode(this.data)}}),i+=h}return r}a(pte,"parseTar");async function KN(n,e={}){let t=new ReadableStream({start(i){i.enqueue(new Uint8Array(n)),i.close()}}).pipeThrough(new DecompressionStream(e.compression??"gzip")),r=await new Response(t).arrayBuffer();return pte(r,e)}a(KN,"parseTarGzip");function mte(n){let e=n.replace(/\\/g,"/");e=e.replace(/^[a-zA-Z]:\//,""),e=e.replace(/^\/+/,"");let t=e.startsWith("./"),r=e.split("/"),i=[];for(let o of r)o===".."?i.pop():o!=="."&&o!==""&&i.push(o);let s=i.join("/");return t&&!s.startsWith("./")&&(s="./"+s),n.endsWith("/")&&!s.endsWith("/")&&(s+="/"),s}a(mte,"_sanitizePath");function Ta(n,e,t){let r=new Uint8Array(n,e,t),i=r.indexOf(0);return new TextDecoder().decode(i===-1?r:r.slice(0,i))}a(Ta,"_readString");function QN(n,e,t){let r=new Uint8Array(n,e,t),i="";for(let s=0;s<t;s++)i+=String.fromCodePoint(r[s]);return Number.parseInt(i,8)}a(QN,"_readNumber");function gte(n){let e=new TextDecoder().decode(n),t={};for(let r of e.split(`
|
|
@@ -810,7 +810,7 @@ Run \u0441 --apply \u043A execute.
|
|
|
810
810
|
url = ${r}
|
|
811
811
|
`,l=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),c=new RegExp(`^\\s*\\[submodule "${l}"\\]`,"m"),u="";try{u=(0,Pr.readFileSync)(i,"utf8")}catch(d){if(d.code!=="ENOENT")throw d}if(u.length>0&&c.test(u))return{added:!1};let f=u.length===0||u.endsWith(`
|
|
812
812
|
`)?"":`
|
|
813
|
-
`;return(0,Pr.appendFileSync)(i,f+o,{encoding:"utf8"}),{added:!0}}};function ek(){return new le("bootstrap").description("Phase 6.2: bootstrap empty vault \u0441 TS-floor AssetSpaces (exo + exocmd). Pulls tarballs from public GitHub repos, extracts \u043A assetspaces/, writes .gitmodules. Example URLs: https://github.com/kitelev/exoas-exo, https://github.com/kitelev/exoas-exocmd.").requiredOption("--vault <path>","Path \u043A target vault").requiredOption("--exo <url>","Public GitHub URL \u0434\u043B\u044F exo TBox AssetSpace (e.g. https://github.com/kitelev/exoas-exo)").requiredOption("--exocmd <url>","Public GitHub URL \u0434\u043B\u044F exocmd TBox AssetSpace (e.g. https://github.com/kitelev/exoas-exocmd)").option("--ref <branch>","Branch ref \u043A pull from","main").option("--json","Emit result as JSON",!1).action(async n=>{try{if(!n.vault)throw new
|
|
813
|
+
`;return(0,Pr.appendFileSync)(i,f+o,{encoding:"utf8"}),{added:!0}}};function ek(){return new le("bootstrap").description("Phase 6.2: bootstrap empty vault \u0441 TS-floor AssetSpaces (exo + exocmd). Pulls tarballs from public GitHub repos, extracts \u043A assetspaces/, writes .gitmodules. Example URLs: https://github.com/kitelev/exoas-exo, https://github.com/kitelev/exoas-exocmd.").requiredOption("--vault <path>","Path \u043A target vault").requiredOption("--exo <url>","Public GitHub URL \u0434\u043B\u044F exo TBox AssetSpace (e.g. https://github.com/kitelev/exoas-exo)").requiredOption("--exocmd <url>","Public GitHub URL \u0434\u043B\u044F exocmd TBox AssetSpace (e.g. https://github.com/kitelev/exoas-exocmd)").option("--ref <branch>","Branch ref \u043A pull from","main").option("--json","Emit result as JSON",!1).action(async n=>{try{if(!n.vault)throw new rt("--vault is required");let e=(0,Il.resolve)(n.vault);(0,xl.mkdirSync)(e,{recursive:!0});let t=(0,Il.join)(e,".gitmodules"),r=(0,Il.join)(e,"assetspaces");if((0,xl.existsSync)(t))throw new rt(`Vault ${e} already has .gitmodules \u2014 refusing \u043A re-bootstrap. Use \`assetspace add\` \u0434\u043B\u044F individual AS.`);if((0,xl.existsSync)(r)&&(0,xl.readdirSync)(r).length>0)throw new rt(`Vault ${e}/assetspaces/ already has content \u2014 refusing \u043A re-bootstrap.`);let i=new Al,s=n.ref??"main",o=[],l="exo",c=(0,Il.join)(e,"assetspaces",l);process.stderr.write(`[bootstrap] Pulling ${n.exo}@${s} \u2192 assetspaces/${l}/...
|
|
814
814
|
`);let u=await i.pullAssetSpace(n.exo,s,c);i.ensureGitmodulesEntry(e,`assetspaces/${l}`,n.exo),o.push({folder:`assetspaces/${l}`,url:n.exo,sha:u.sha,fileCount:u.fileCount});let f="exocmd",d=(0,Il.join)(e,"assetspaces",f);process.stderr.write(`[bootstrap] Pulling ${n.exocmd}@${s} \u2192 assetspaces/${f}/...
|
|
815
815
|
`);let h=await i.pullAssetSpace(n.exocmd,s,d);if(i.ensureGitmodulesEntry(e,`assetspaces/${f}`,n.exocmd),o.push({folder:`assetspaces/${f}`,url:n.exocmd,sha:h.sha,fileCount:h.fileCount}),n.json)process.stdout.write(JSON.stringify({vault:e,materialized:o},null,2)+`
|
|
816
816
|
`);else{process.stdout.write(`
|
|
@@ -822,7 +822,7 @@ Next steps:
|
|
|
822
822
|
`),process.stdout.write(` 1. cd ${e} && git init (if not initialized)
|
|
823
823
|
`),process.stdout.write(` 2. git add . && git commit -m "feat: bootstrap vault"
|
|
824
824
|
`),process.stdout.write(` 3. Add additional AssetSpaces via \`exocortex assetspace add --vault ${e} --url <github-url>\`
|
|
825
|
-
`)}process.exit(0)}catch(e){se.handle(e)}})}a(ek,"bootstrapCommand");var n0=require("node:path"),tk=require("node:fs");function rk(){return new le("assetspace-add").description("Phase 6.3: add single AssetSpace \u043A existing vault by public GitHub URL. Pulls tarball, extracts \u043A assetspaces/<folder>/, updates .gitmodules.").requiredOption("--vault <path>","Path \u043A target vault").requiredOption("--url <url>","Public GitHub URL \u0434\u043B\u044F the AssetSpace (e.g. https://github.com/kitelev/exoas-pmbok-ontology)").option("--folder <name>","Local folder name \u043F\u043E\u0434 assetspaces/. Defaults \u043A URL-derived (strips exoas- prefix)").option("--ref <branch>","Branch ref \u043A pull from","main").option("--json","Emit result as JSON",!1).action(async n=>{try{if(!n.vault)throw new
|
|
825
|
+
`)}process.exit(0)}catch(e){se.handle(e)}})}a(ek,"bootstrapCommand");var n0=require("node:path"),tk=require("node:fs");function rk(){return new le("assetspace-add").description("Phase 6.3: add single AssetSpace \u043A existing vault by public GitHub URL. Pulls tarball, extracts \u043A assetspaces/<folder>/, updates .gitmodules.").requiredOption("--vault <path>","Path \u043A target vault").requiredOption("--url <url>","Public GitHub URL \u0434\u043B\u044F the AssetSpace (e.g. https://github.com/kitelev/exoas-pmbok-ontology)").option("--folder <name>","Local folder name \u043F\u043E\u0434 assetspaces/. Defaults \u043A URL-derived (strips exoas- prefix)").option("--ref <branch>","Branch ref \u043A pull from","main").option("--json","Emit result as JSON",!1).action(async n=>{try{if(!n.vault)throw new rt("--vault is required");if(!n.url)throw new rt("--url is required");let e=(0,n0.resolve)(n.vault);if(!(0,tk.existsSync)(e))throw new de(e);let t=new Al,r=n.ref??"main",i=n.folder??Al.deriveFolderName(n.url),s=(0,n0.join)(e,"assetspaces",i);process.stderr.write(`[assetspace-add] Pulling ${n.url}@${r} \u2192 assetspaces/${i}/...
|
|
826
826
|
`);let o=await t.pullAssetSpace(n.url,r,s),l=t.ensureGitmodulesEntry(e,`assetspaces/${i}`,n.url);n.json?process.stdout.write(JSON.stringify({vault:e,folder:`assetspaces/${i}`,url:n.url,sha:o.sha,fileCount:o.fileCount,gitmodulesEntryAdded:l.added},null,2)+`
|
|
827
827
|
`):(process.stdout.write(`
|
|
828
828
|
\u2713 AssetSpace added
|
|
@@ -830,7 +830,7 @@ Next steps:
|
|
|
830
830
|
`),process.stdout.write(` URL: ${n.url}
|
|
831
831
|
`),process.stdout.write(` SHA: ${o.sha} (${o.fileCount} files)
|
|
832
832
|
`),process.stdout.write(` .gitmodules: ${l.added?"entry added":"entry already present"}
|
|
833
|
-
`)),process.exit(0)}catch(e){se.handle(e)}})}a(rk,"assetSpaceAddCommand");function nk(n){let e=new le;return e.name("exocortex").description("CLI tool for Exocortex knowledge management system").version(n??"16.60.
|
|
833
|
+
`)),process.exit(0)}catch(e){se.handle(e)}})}a(rk,"assetSpaceAddCommand");function nk(n){let e=new le;return e.name("exocortex").description("CLI tool for Exocortex knowledge management system").version(n??"16.60.2"),e.addCommand(xN()),e.addCommand(MN()),e.addCommand(ZD()),e.addCommand(rL()),e.addCommand(OL()),e.addCommand(oL()),e.addCommand(aL()),e.addCommand(dL()),e.addCommand(LL()),e.addCommand(WL()),e.addCommand(YL()),e.addCommand(QL()),e.addCommand(XL()),e.addCommand(lN()),e.addCommand(cN()),e.addCommand(gN()),e.addCommand(IN()),e.addCommand(VN()),e.addCommand(GN()),e.addCommand(YN()),e.addCommand(ek()),e.addCommand(rk()),e}a(nk,"createProgram");nk().parse();0&&(module.exports={createProgram});
|
|
834
834
|
/*! Bundled license information:
|
|
835
835
|
|
|
836
836
|
reflect-metadata/Reflect.js:
|