@olympeio/runtime-node 9.3.0 → 9.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -211,828 +211,828 @@ ea('String.prototype.padStart',function(a){return a?a:function(b,c){var d=ia(thi
211
211
  ea('Array.prototype.flatMap',function(a){return a?a:function(b,c){for(var d=[],e=0;e<this.length;e++){var f=b.call(c,this[e],e,this);Array.isArray(f)?d.push.apply(d,f):d.push(f)}return d}});ea('Object.entries',function(a){return a?a:function(b){var c=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&c.push([d,b[d]]);return c}});ea('Object.values',function(a){return a?a:function(b){var c=[],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&c.push(b[d]);return c}});
212
212
  ea('Promise.prototype.finally',function(a){return a?a:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});
213
213
  ea('Object.fromEntries',function(a){return a?a:function(b){var c={};if(!(Symbol.iterator in b))throw new TypeError(''+b+' is not iterable');b=b[Symbol.iterator].call(b);for(var d=b.next();!d.done;d=b.next()){d=d.value;if(Object(d)!==d)throw new TypeError('iterable for fromEntries should yield objects');c[d[0]]=d[1]}return c}});
214
- ea('Promise.allSettled',function(a){function b(d){return{status:'fulfilled',value:d}}function c(d){return{status:'rejected',reason:d}}return a?a:function(d){var e=this;d=Array.from(d,function(f){return e.resolve(f).then(b,c)});return e.all(d)}});var ka=this||self;function z(a,b){a=a.split('.');let c=ka;a[0]in c||'undefined'==typeof c.execScript||c.execScript('var '+a[0]);for(let d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};const olympe={jj:()=>'object'===typeof window?window:'object'===typeof global?global:self};olympe.jj().olympe=olympe;olympe.lD=(a,...b)=>{b.forEach(c=>{Object.getOwnPropertyNames(c.prototype).forEach(d=>{'constructor'!==d&&void 0===a.prototype[d]&&(a.prototype[d]=c.prototype[d])})})};const la=(a,b)=>{a={level:a,message:b.map(c=>String(c)).join(' ')};for(const c of b)c.stack&&(a.stackTrace||(a.stackTrace=''),a.stackTrace+=c.stack);return JSON.stringify(a)};
215
- (()=>{const a=console.trace,b=console.debug,c=console.log,d=console.info,e=console.warn,f=console.error;console.trace=(...g)=>a(la('TRACE',g));console.debug=(...g)=>b(la('DEBUG',g));console.log=(...g)=>c(la('LOG',g));console.info=(...g)=>d(la('INFO',g));console.warn=(...g)=>e(la('WARN',g));console.error=(...g)=>f(la('ERROR',g))})();olympe.ia={};olympe.ia.node={};'function'!==typeof require||global.Blob||(global.Blob=require('cross-blob'));olympe.U={};olympe.U.If={};olympe.U.If.ko=class{process(a){const b=Object.keys(a.Ee);let c,d;c=0;for(d=b.length;c<d;c++)if(a.Pd(b[c]).pj())throw Error('Service "'+b[c]+'" is defined as abstract and needs to be overridden');}};olympe.U.If.ko.ma=[olympe.U.If.qq];olympe.U.If.lo=class{process(a){function b(g,h){if(0<=h.indexOf(g))throw Error('Circular dependency detected: '+h.join(' > ')+' > '+g);h=h.concat(g);if(f[g]&&(delete f[g],g=a.Pd(g),c(g.hj(),h),g=g.Ii,null!==g))for(let k=0,l=g.length;k<l;k++)c(g[k].hj(),h)}function c(g,h){for(let k=0,l=g.length,n;k<l;k++)n=g[k],n instanceof olympe.U.sb&&b(n.Z(),h)}function d(){for(const g in f)if(Object.prototype.hasOwnProperty.call(f,g))return g}var e=Object.keys(a.Ee);const f={};for(let g=0,h=e.length;g<h;g++)f[e[g]]=
216
- !0;for(;void 0!==(e=d());)b(e,[])}};olympe.U.If.lo.ma=[olympe.U.If.qq];olympe.U.If.qq=class{process(){}};const ma=[],na=[];olympe.U.oo=class{constructor(){}static C(a,b){ma.push(new olympe.U.wl(a,b))}static F(a,b,c){a.forEach(d=>{if(null===d||void 0===d)throw Error('Cannot proceed - DI configuration error. '+(c?`Run callback "${c}"`:'A run callback')+' cannot have a null or undefined dependency');});na.push(new olympe.U.wl(b,c,a))}};olympe.U.config=olympe.U.oo.C;olympe.U.run=olympe.U.oo.F;olympe.U.ol=class{constructor(){}getValue(){}};olympe.U.wl=class{constructor(a,b,c){this.F=a;this.G=[];this.C=b;if(void 0!==c){this.G=c;for(let d=0,e=c.length;d<e;d++)'string'===typeof c[d]&&(c[d]=new olympe.U.sb(c[d]))}}hj(){return this.G}};function oa(a,b,c){let d=a.C[b];if(void 0===d){const e=a.F[b];if(void 0===e){if(c===olympe.U.kf.C.Lh)return null;throw Error('Service "'+b+'" not found');}try{d=e.instantiate(a)}catch(f){throw a.N.error('Error during instantiation of service '+b),f;}!e.F&&(a.C[b]=d)}return d}function pa(a,b){const c=b.length,d=Array(c);let e,f;for(e=0;e<c;e++)a.N.C++,f=b[e],d[e]=f instanceof olympe.U.ol?f.getValue(a):f,qa(a.N);return d}
217
- olympe.U.kf=class{constructor(a,b,c=2){this.F=a;this.parameters=b;this.C=Object.create(null);this.N=new olympe.U.Op(c);a=olympe.U.R.jg;if(void 0!==this.C[a])throw Error('Service "'+a+'" has already been instantiated');this.C[a]=this}Za(){return this.N}getParameter(a){return this.parameters[a.toLowerCase()]}};olympe.U.kf.C={at:'exception',Lh:'null'};function ra(a,b,c){function d(f,g){let h,k,l;for(h in f)Object.prototype.hasOwnProperty.call(f,h)&&(k=f[h],l=g.concat((h.startsWith('#')?h.substring(1):h).toLowerCase()),'object'!==typeof k||null===k||h.startsWith('#')?e[l.join('.')]=k:d(k,l))}const e=a.parameters;d(b,c?[c]:[])}function A(a,b,c,...d){sa(a.N,'Defining service '+b);a.C(b,c,d,!1,!1)}function ta(a,b,c,...d){sa(a.N,'Defining service '+b);a.C(b,c,d,!1,!0)}
218
- function C(a,b,c,d,e=!1){sa(a.N,'Defining service (as a factory) '+b);a.C(b,d,c,!0,e)}function ua(a,b,c,d=!1){sa(a.N,'Defining service alias '+b);a.C(b,e=>e,[c],!0,d)}function va(a,b){sa(a.N,'Defining abstract service '+b);a.C(b).Zi=!0}function wa(a,b){a.parameters[olympe.H.Config.fo.toLowerCase()]=b}function E(a,b,c){b=b.toLowerCase();Object.prototype.hasOwnProperty.call(a.parameters,b)||(a.parameters[b]=c)}
219
- olympe.U.Ns=class{constructor(a){var b=xa,c=ya;this.Ee=Object.create(null);this.parameters=Object.create(null);this.K=[new olympe.U.If.ko,new olympe.U.If.lo];this.F=[];b&&ra(this,b);c&&ra(this,c,'version');a&&ra(this,a);a=this.getParameter(olympe.U.Config.du);this.G=void 0!==a?a:3;this.N=new olympe.U.Op(this.G)}Za(){return this.N}C(a,b,c,d,e){const f=a instanceof olympe.U.sb?a.Z():a;if(3<=arguments.length&&c){const h=c.indexOf(f);if(-1!==h){if(void 0===this.Ee[f])throw Error(`ContainerBuilder.define: Service ${f} references itself and is not an override definition!`);
220
- var g=this.Ee[f];g.id=g.id+'!!'+ ++olympe.U.Cl.C;g.F=!0;g=g.id;c[h]=g;this.Ee[g]=this.Ee[f]}}this.Ee[f]=new olympe.U.Cl(b,c,d||!1,f);return this.Ee[f]}Pd(a){a=this.Ee[a];if(void 0===a)throw Error();return a}getParameter(a){return this.parameters[a.toLowerCase()]}compile(){var a=this.F;this.N.debug('Calling '+a.length+' configure callbacks');this.N.C++;for(let b=0,c=a.length;b<c;b++)sa(this.N,'Calling callback'),this.N.C++,a[b].call(null,this),qa(this.N);qa(this.N);this.N.debug('Configuration summary: '+
221
- Object.keys(this.Ee).length+' definitions');this.N.debug('Compiling...');this.N.C++;a=this.K;for(let b=0,c=a.length;b<c;b++)this.N.debug('running compilation pass '+(b+1)+': '+a[b].constructor.name),a[b].process(this);qa(this.N);this.N.debug('Compilation done, returning container');return new olympe.U.kf(this.Ee,this.parameters,this.G)}};olympe.U.Cl=class{constructor(a,b,c,d){this.G=a||null;this.K=!!c;this.C=[];this.Zi=!1;this.Ii=null;if(b){this.C=b;for(let e=0,f=b.length;e<f;e++)'string'===typeof b[e]&&(b[e]=new olympe.U.sb(b[e]))}this.id=d||'';this.F=!1}Z(){return this.id}instantiate(a){const b=a.Za();b.debug('Resolving arguments for '+this.id);const c=this.G;let d=pa(a,this.C);const e=()=>{if(this.K)return c.apply(null,d);d.unshift(null);return new (c.bind.apply(c,d))};sa(b,'Instantiating '+this.id);const f=olympe.D?olympe.D.qh().run(()=>
222
- e()):e(),g=this.Ii;let h,k,l;if(null!==g&&0<g.length){b.C++;sa(b,'Calling configuration callbacks:');k=0;for(l=g.length;k<l;k++)b.C++,h=g[k],sa(b,'Calling additional configuration callback '+h.C),d=pa(a,h.hj()),d.push(f),h.F.apply(null,d),qa(b);qa(b)}sa(b,'Done instantiating '+this.id);return f}hj(){return this.C}pj(){return this.Zi}config(a,b,c){null===this.Ii&&(this.Ii=[]);this.Ii.push(new olympe.U.wl(b,c,a))}};olympe.U.Cl.C=0;function qa(a){0<a.C&&a.C--}function sa(a,b){1>=a.F&&za(a,'log','DI: '+b)}function za(a,b,c){if(console&&console[b]){var d='';for(let e=0;e<a.C;e++)d+=' ';console[b](d+c)}}olympe.U.Op=class{constructor(a){this.F=a;this.C=0}debug(a){2>=this.F&&za(this,'log','DI: '+a)}info(a){3>=this.F&&za(this,'info','DI: '+a)}warn(a){4>=this.F&&za(this,'warn','DI: '+a)}error(a){5>=this.F&&za(this,'error','DI: '+a)}};olympe.U.fa=class extends olympe.U.ol{constructor(a){super();this.id=a}Z(){return this.id}getValue(a){return a.getParameter(this.id)}};olympe.U.sb=class extends olympe.U.ol{constructor(a,b){super();this.id=a;this.C=b||olympe.U.kf.C.at}Z(){return this.id}getValue(a){return oa(a,this.id,this.C)}};olympe.U.R={jg:'di.Container',dB:'di.PublicContainer'};olympe.U.Config={du:'logging.di'};olympe.U.run([olympe.U.R.jg],a=>{olympe.U.getParameter=b=>a.getParameter(b)});olympe.X={};function Aa(a){a='0'.repeat(12)+a.toString(16);return a.substring(a.length-12,a.length)}function Ba(){var a=Math.random();return Aa((new Date).getTime())+(a.toString(16)+'0'.repeat(8)).substr(2,8)}let Ca=Math.pow(2,32)-1;olympe.X.bc=function(){return Ba()};olympe.X.Ue=function(){return Ba()};olympe.X.nj=function(a,b=1){const c=a.substr(12,a.length-12);return Aa(parseInt(a.substr(0,12),16)+b)+c};
223
- olympe.X.nx=function(a){return Aa(parseInt(a.substr(0,12),16)+1)+(Math.random().toString(16)+'00000000').substr(2,8)};let Da=0,Ea=0;olympe.X.rw=function(){var a=(new Date).getTime();a<=Da?4294967295===Ea?(Ea=Math.floor(Math.random()/4*Ca),Da+=1):Ea=Math.floor(Ea+(4294967295-Ea)/2):(Ea=Math.floor(Math.random()/4*Ca),Da=a);a='00000000'+Ea.toString(16);return Aa(Da)+a.substr(a.length-8,8)};olympe.X.MD=function(){for(let a=0;1E4>a;a++)console.log(olympe.X.rw())};
224
- olympe.X.Fg=function(){let a='';for(let b=0;19>b;b++)a+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return'@'+a};olympe.X.qD=function(a){let b='';for(let c=0;5>c;c++)b+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return(a?a:'UI')+'-'+b};olympe.X.nD=function(a,b){return(b?b:'UI')+'-'+a};olympe.X.zp=class{constructor(a){this.id=a||olympe.X.zp.C++}nb(a){return a?this.id===a.id:!1}toJSON(){return this.id.toString()}toString(){return this.id.toString()}};olympe.X.zp.C=0;olympe.X.QA=class{constructor(a,b,c,d,e,f){this.C=[a||0,b||0,0,c||0,d||0,0,e||0,f||0,1]}set(a,b,c){this.C[3*a+b]=c}get(a,b){return this.C[3*a+b]}};olympe.X.Jh=function(a,b,c,d,e,f,g,h,k,l,n,p,q){this.values=[a,b,c,0,0,d,e,f,0,0,g,h,k,0,0,l,n,p,q,0]};olympe.X.Jh.F=function(a){return new olympe.X.Jh(.213+.787*a,.715-.715*a,.072-.072*a,.213-.213*a,.715+.285*a,.072-.072*a,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,1)};olympe.X.Jh.C=function(){return new olympe.X.Jh(0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0)};olympe.X.Jh.prototype.set=function(a,b,c){this.values[5*a+b]=c};olympe.X.Jh.prototype.get=function(a,b){return this.values[5*a+b]};function Fa(a){return(new TextEncoder).encode(a).buffer}function Ga(a){return(new TextDecoder('utf8')).decode(a)}olympe.X.sl=class{P(){}C(){}G(){}K(){}F(){}V(){}};olympe.X.yr=a=>a.replace('+','-').replace('/','_');olympe.X.Pv=a=>a.replace('-','+').replace('_','/');function Ha(a){a.C=setTimeout(()=>{const b=Date.now(),c=a.timeout;for(const [d,e]of a.values)b-e>c&&(a.delete(d),a.G&&a.G(d));0<a.values.size?Ha(a):a.F&&a.F()},a.K)}function Ia(a,b){a.values.has(b)&&a.values.set(b,Date.now())}function Ja(a,b){a.G=b;return a}
225
- olympe.X.Cm=class{constructor(a,b=a/2){this.timeout=a;this.K=b;this.values=new Map;this.F=this.G=this.C=null}add(a){this.values.set(a,Date.now());null===this.C&&Ha(this)}has(a){return this.values.has(a)}delete(a){a=this.values.delete(a);0===this.values.size&&(this.C&&clearTimeout(this.C),this.C=null,this.F&&this.F());return a}clear(){this.C&&clearTimeout(this.C);this.C=null;this.values.clear();return this}};function Ka(a,b){a.C=b;return a}olympe.X.Bm=class{constructor(a){this.F=Ja(new olympe.X.Cm(a,void 0),b=>{const c=this.values.get(b);this.values.delete(b);this.C&&this.C(b,c)});this.values=new Map;this.C=null}set(a,b){this.values.set(a,b);this.F.add(a);return this}has(a){return this.values.has(a)}get(a){return this.values.get(a)}delete(a){this.values.delete(a);return this.F.delete(a)}clear(){this.F.clear();this.values.clear();return this}};function La(a,b){return a+b&4294967295}
214
+ ea('Promise.allSettled',function(a){function b(d){return{status:'fulfilled',value:d}}function c(d){return{status:'rejected',reason:d}}return a?a:function(d){var e=this;d=Array.from(d,function(f){return e.resolve(f).then(b,c)});return e.all(d)}});var ka=this||self;function z(a,b){a=a.split('.');let c=ka;a[0]in c||'undefined'==typeof c.execScript||c.execScript('var '+a[0]);for(let d;a.length&&(d=a.shift());)a.length||void 0===b?c[d]&&c[d]!==Object.prototype[d]?c=c[d]:c=c[d]={}:c[d]=b};const olympe={kj:()=>'object'===typeof window?window:'object'===typeof global?global:self};olympe.kj().olympe=olympe;olympe.nD=(a,...b)=>{b.forEach(c=>{Object.getOwnPropertyNames(c.prototype).forEach(d=>{'constructor'!==d&&void 0===a.prototype[d]&&(a.prototype[d]=c.prototype[d])})})};const la=(a,b)=>{a={level:a,message:b.map(c=>String(c)).join(' ')};for(const c of b)c.stack&&(a.stackTrace||(a.stackTrace=''),a.stackTrace+=c.stack);return JSON.stringify(a)};
215
+ (()=>{const a=console.trace,b=console.debug,c=console.log,d=console.info,e=console.warn,f=console.error;console.trace=(...g)=>a(la('TRACE',g));console.debug=(...g)=>b(la('DEBUG',g));console.log=(...g)=>c(la('LOG',g));console.info=(...g)=>d(la('INFO',g));console.warn=(...g)=>e(la('WARN',g));console.error=(...g)=>f(la('ERROR',g))})();olympe.ia={};olympe.ia.node={};'function'!==typeof require||global.Blob||(global.Blob=require('cross-blob'));olympe.U={};olympe.U.Gf={};olympe.U.Gf.lo=class{process(a){const b=Object.keys(a.Ee);let c,d;c=0;for(d=b.length;c<d;c++)if(a.Od(b[c]).qj())throw Error('Service "'+b[c]+'" is defined as abstract and needs to be overridden');}};olympe.U.Gf.lo.ma=[olympe.U.Gf.rq];olympe.U.Gf.mo=class{process(a){function b(g,h){if(0<=h.indexOf(g))throw Error('Circular dependency detected: '+h.join(' > ')+' > '+g);h=h.concat(g);if(f[g]&&(delete f[g],g=a.Od(g),c(g.ij(),h),g=g.Hi,null!==g))for(let k=0,l=g.length;k<l;k++)c(g[k].ij(),h)}function c(g,h){for(let k=0,l=g.length,n;k<l;k++)n=g[k],n instanceof olympe.U.sb&&b(n.Z(),h)}function d(){for(const g in f)if(Object.prototype.hasOwnProperty.call(f,g))return g}var e=Object.keys(a.Ee);const f={};for(let g=0,h=e.length;g<h;g++)f[e[g]]=
216
+ !0;for(;void 0!==(e=d());)b(e,[])}};olympe.U.Gf.mo.ma=[olympe.U.Gf.rq];olympe.U.Gf.rq=class{process(){}};const ma=[],na=[];olympe.U.po=class{constructor(){}static C(a,b){ma.push(new olympe.U.xl(a,b))}static F(a,b,c){a.forEach(d=>{if(null===d||void 0===d)throw Error('Cannot proceed - DI configuration error. '+(c?`Run callback "${c}"`:'A run callback')+' cannot have a null or undefined dependency');});na.push(new olympe.U.xl(b,c,a))}};olympe.U.config=olympe.U.po.C;olympe.U.run=olympe.U.po.F;olympe.U.pl=class{constructor(){}getValue(){}};olympe.U.xl=class{constructor(a,b,c){this.F=a;this.G=[];this.C=b;if(void 0!==c){this.G=c;for(let d=0,e=c.length;d<e;d++)'string'===typeof c[d]&&(c[d]=new olympe.U.sb(c[d]))}}ij(){return this.G}};function oa(a,b,c){let d=a.C[b];if(void 0===d){const e=a.F[b];if(void 0===e){if(c===olympe.U.jf.C.Kh)return null;throw Error('Service "'+b+'" not found');}try{d=e.instantiate(a)}catch(f){throw a.N.error('Error during instantiation of service '+b),f;}!e.F&&(a.C[b]=d)}return d}function pa(a,b){const c=b.length,d=Array(c);let e,f;for(e=0;e<c;e++)a.N.C++,f=b[e],d[e]=f instanceof olympe.U.pl?f.getValue(a):f,qa(a.N);return d}
217
+ olympe.U.jf=class{constructor(a,b,c=2){this.F=a;this.parameters=b;this.C=Object.create(null);this.N=new olympe.U.Pp(c);a=olympe.U.R.gg;if(void 0!==this.C[a])throw Error('Service "'+a+'" has already been instantiated');this.C[a]=this}Za(){return this.N}getParameter(a){return this.parameters[a.toLowerCase()]}};olympe.U.jf.C={bt:'exception',Kh:'null'};function ra(a,b,c){function d(f,g){let h,k,l;for(h in f)Object.prototype.hasOwnProperty.call(f,h)&&(k=f[h],l=g.concat((h.startsWith('#')?h.substring(1):h).toLowerCase()),'object'!==typeof k||null===k||h.startsWith('#')?e[l.join('.')]=k:d(k,l))}const e=a.parameters;d(b,c?[c]:[])}function A(a,b,c,...d){sa(a.N,'Defining service '+b);a.C(b,c,d,!1,!1)}function ta(a,b,c,...d){sa(a.N,'Defining service '+b);a.C(b,c,d,!1,!0)}
218
+ function C(a,b,c,d,e=!1){sa(a.N,'Defining service (as a factory) '+b);a.C(b,d,c,!0,e)}function ua(a,b,c,d=!1){sa(a.N,'Defining service alias '+b);a.C(b,e=>e,[c],!0,d)}function va(a,b){sa(a.N,'Defining abstract service '+b);a.C(b).$i=!0}function wa(a,b){a.parameters[olympe.H.Config.ho.toLowerCase()]=b}function E(a,b,c){b=b.toLowerCase();Object.prototype.hasOwnProperty.call(a.parameters,b)||(a.parameters[b]=c)}
219
+ olympe.U.Os=class{constructor(a){var b=xa,c=ya;this.Ee=Object.create(null);this.parameters=Object.create(null);this.K=[new olympe.U.Gf.lo,new olympe.U.Gf.mo];this.F=[];b&&ra(this,b);c&&ra(this,c,'version');a&&ra(this,a);a=this.getParameter(olympe.U.Config.eu);this.G=void 0!==a?a:3;this.N=new olympe.U.Pp(this.G)}Za(){return this.N}C(a,b,c,d,e){const f=a instanceof olympe.U.sb?a.Z():a;if(3<=arguments.length&&c){const h=c.indexOf(f);if(-1!==h){if(void 0===this.Ee[f])throw Error(`ContainerBuilder.define: Service ${f} references itself and is not an override definition!`);
220
+ var g=this.Ee[f];g.id=g.id+'!!'+ ++olympe.U.Dl.C;g.F=!0;g=g.id;c[h]=g;this.Ee[g]=this.Ee[f]}}this.Ee[f]=new olympe.U.Dl(b,c,d||!1,f);return this.Ee[f]}Od(a){a=this.Ee[a];if(void 0===a)throw Error();return a}getParameter(a){return this.parameters[a.toLowerCase()]}compile(){var a=this.F;this.N.debug('Calling '+a.length+' configure callbacks');this.N.C++;for(let b=0,c=a.length;b<c;b++)sa(this.N,'Calling callback'),this.N.C++,a[b].call(null,this),qa(this.N);qa(this.N);this.N.debug('Configuration summary: '+
221
+ Object.keys(this.Ee).length+' definitions');this.N.debug('Compiling...');this.N.C++;a=this.K;for(let b=0,c=a.length;b<c;b++)this.N.debug('running compilation pass '+(b+1)+': '+a[b].constructor.name),a[b].process(this);qa(this.N);this.N.debug('Compilation done, returning container');return new olympe.U.jf(this.Ee,this.parameters,this.G)}};olympe.U.Dl=class{constructor(a,b,c,d){this.G=a||null;this.K=!!c;this.C=[];this.$i=!1;this.Hi=null;if(b){this.C=b;for(let e=0,f=b.length;e<f;e++)'string'===typeof b[e]&&(b[e]=new olympe.U.sb(b[e]))}this.id=d||'';this.F=!1}Z(){return this.id}instantiate(a){const b=a.Za();b.debug('Resolving arguments for '+this.id);const c=this.G;let d=pa(a,this.C);const e=()=>{if(this.K)return c.apply(null,d);d.unshift(null);return new (c.bind.apply(c,d))};sa(b,'Instantiating '+this.id);const f=olympe.D?olympe.D.ph().run(()=>
222
+ e()):e(),g=this.Hi;let h,k,l;if(null!==g&&0<g.length){b.C++;sa(b,'Calling configuration callbacks:');k=0;for(l=g.length;k<l;k++)b.C++,h=g[k],sa(b,'Calling additional configuration callback '+h.C),d=pa(a,h.ij()),d.push(f),h.F.apply(null,d),qa(b);qa(b)}sa(b,'Done instantiating '+this.id);return f}ij(){return this.C}qj(){return this.$i}config(a,b,c){null===this.Hi&&(this.Hi=[]);this.Hi.push(new olympe.U.xl(b,c,a))}};olympe.U.Dl.C=0;function qa(a){0<a.C&&a.C--}function sa(a,b){1>=a.F&&za(a,'log','DI: '+b)}function za(a,b,c){if(console&&console[b]){var d='';for(let e=0;e<a.C;e++)d+=' ';console[b](d+c)}}olympe.U.Pp=class{constructor(a){this.F=a;this.C=0}debug(a){2>=this.F&&za(this,'log','DI: '+a)}info(a){3>=this.F&&za(this,'info','DI: '+a)}warn(a){4>=this.F&&za(this,'warn','DI: '+a)}error(a){5>=this.F&&za(this,'error','DI: '+a)}};olympe.U.fa=class extends olympe.U.pl{constructor(a){super();this.id=a}Z(){return this.id}getValue(a){return a.getParameter(this.id)}};olympe.U.sb=class extends olympe.U.pl{constructor(a,b){super();this.id=a;this.C=b||olympe.U.jf.C.bt}Z(){return this.id}getValue(a){return oa(a,this.id,this.C)}};olympe.U.R={gg:'di.Container',fB:'di.PublicContainer'};olympe.U.Config={eu:'logging.di'};olympe.U.run([olympe.U.R.gg],a=>{olympe.U.getParameter=b=>a.getParameter(b)});olympe.X={};function Aa(a){a='0'.repeat(12)+a.toString(16);return a.substring(a.length-12,a.length)}function Ba(){var a=Math.random();return Aa((new Date).getTime())+(a.toString(16)+'0'.repeat(8)).substr(2,8)}let Ca=Math.pow(2,32)-1;olympe.X.bc=function(){return Ba()};olympe.X.Ve=function(){return Ba()};olympe.X.oj=function(a,b=1){const c=a.substr(12,a.length-12);return Aa(parseInt(a.substr(0,12),16)+b)+c};
223
+ olympe.X.px=function(a){return Aa(parseInt(a.substr(0,12),16)+1)+(Math.random().toString(16)+'00000000').substr(2,8)};let Da=0,Ea=0;olympe.X.sw=function(){var a=(new Date).getTime();a<=Da?4294967295===Ea?(Ea=Math.floor(Math.random()/4*Ca),Da+=1):Ea=Math.floor(Ea+(4294967295-Ea)/2):(Ea=Math.floor(Math.random()/4*Ca),Da=a);a='00000000'+Ea.toString(16);return Aa(Da)+a.substr(a.length-8,8)};olympe.X.OD=function(){for(let a=0;1E4>a;a++)console.log(olympe.X.sw())};
224
+ olympe.X.Cg=function(){let a='';for(let b=0;19>b;b++)a+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return'@'+a};olympe.X.sD=function(a){let b='';for(let c=0;5>c;c++)b+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return(a?a:'UI')+'-'+b};olympe.X.pD=function(a,b){return(b?b:'UI')+'-'+a};olympe.X.Ap=class{constructor(a){this.id=a||olympe.X.Ap.C++}nb(a){return a?this.id===a.id:!1}toJSON(){return this.id.toString()}toString(){return this.id.toString()}};olympe.X.Ap.C=0;olympe.X.SA=class{constructor(a,b,c,d,e,f){this.C=[a||0,b||0,0,c||0,d||0,0,e||0,f||0,1]}set(a,b,c){this.C[3*a+b]=c}get(a,b){return this.C[3*a+b]}};olympe.X.Ih=function(a,b,c,d,e,f,g,h,k,l,n,p,q){this.values=[a,b,c,0,0,d,e,f,0,0,g,h,k,0,0,l,n,p,q,0]};olympe.X.Ih.F=function(a){return new olympe.X.Ih(.213+.787*a,.715-.715*a,.072-.072*a,.213-.213*a,.715+.285*a,.072-.072*a,.213-.213*a,.715-.715*a,.072+.928*a,0,0,0,1)};olympe.X.Ih.C=function(){return new olympe.X.Ih(0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0)};olympe.X.Ih.prototype.set=function(a,b,c){this.values[5*a+b]=c};olympe.X.Ih.prototype.get=function(a,b){return this.values[5*a+b]};function Fa(a){return(new TextEncoder).encode(a).buffer}function Ga(a){return(new TextDecoder('utf8')).decode(a)}olympe.X.tl=class{P(){}C(){}G(){}K(){}F(){}V(){}};olympe.X.zr=a=>a.replace('+','-').replace('/','_');olympe.X.Qv=a=>a.replace('-','+').replace('_','/');function Ha(a){a.C=setTimeout(()=>{const b=Date.now(),c=a.timeout;for(const [d,e]of a.values)b-e>c&&(a.delete(d),a.G&&a.G(d));0<a.values.size?Ha(a):a.F&&a.F()},a.K)}function Ia(a,b){a.values.has(b)&&a.values.set(b,Date.now())}function Ja(a,b){a.G=b;return a}
225
+ olympe.X.Dm=class{constructor(a,b=a/2){this.timeout=a;this.K=b;this.values=new Map;this.F=this.G=this.C=null}add(a){this.values.set(a,Date.now());null===this.C&&Ha(this)}has(a){return this.values.has(a)}delete(a){a=this.values.delete(a);0===this.values.size&&(this.C&&clearTimeout(this.C),this.C=null,this.F&&this.F());return a}clear(){this.C&&clearTimeout(this.C);this.C=null;this.values.clear();return this}};function Ka(a,b){a.C=b;return a}olympe.X.Cm=class{constructor(a){this.F=Ja(new olympe.X.Dm(a,void 0),b=>{const c=this.values.get(b);this.values.delete(b);this.C&&this.C(b,c)});this.values=new Map;this.C=null}set(a,b){this.values.set(a,b);this.F.add(a);return this}has(a){return this.values.has(a)}get(a){return this.values.get(a)}delete(a){this.values.delete(a);return this.F.delete(a)}clear(){this.F.clear();this.values.clear();return this}};function La(a,b){return a+b&4294967295}
226
226
  function Ma(a,b){let c=a[0],d=a[1],e=a[2],f=a[3];c=F(c,d,e,f,b[0],7,-680876936);f=F(f,c,d,e,b[1],12,-389564586);e=F(e,f,c,d,b[2],17,606105819);d=F(d,e,f,c,b[3],22,-1044525330);c=F(c,d,e,f,b[4],7,-176418897);f=F(f,c,d,e,b[5],12,1200080426);e=F(e,f,c,d,b[6],17,-1473231341);d=F(d,e,f,c,b[7],22,-45705983);c=F(c,d,e,f,b[8],7,1770035416);f=F(f,c,d,e,b[9],12,-1958414417);e=F(e,f,c,d,b[10],17,-42063);d=F(d,e,f,c,b[11],22,-1990404162);c=F(c,d,e,f,b[12],7,1804603682);f=F(f,c,d,e,b[13],12,-40341101);e=F(e,f,
227
227
  c,d,b[14],17,-1502002290);d=F(d,e,f,c,b[15],22,1236535329);c=G(c,d,e,f,b[1],5,-165796510);f=G(f,c,d,e,b[6],9,-1069501632);e=G(e,f,c,d,b[11],14,643717713);d=G(d,e,f,c,b[0],20,-373897302);c=G(c,d,e,f,b[5],5,-701558691);f=G(f,c,d,e,b[10],9,38016083);e=G(e,f,c,d,b[15],14,-660478335);d=G(d,e,f,c,b[4],20,-405537848);c=G(c,d,e,f,b[9],5,568446438);f=G(f,c,d,e,b[14],9,-1019803690);e=G(e,f,c,d,b[3],14,-187363961);d=G(d,e,f,c,b[8],20,1163531501);c=G(c,d,e,f,b[13],5,-1444681467);f=G(f,c,d,e,b[2],9,-51403784);
228
228
  e=G(e,f,c,d,b[7],14,1735328473);d=G(d,e,f,c,b[12],20,-1926607734);c=H(d^e^f,c,d,b[5],4,-378558);f=H(c^d^e,f,c,b[8],11,-2022574463);e=H(f^c^d,e,f,b[11],16,1839030562);d=H(e^f^c,d,e,b[14],23,-35309556);c=H(d^e^f,c,d,b[1],4,-1530992060);f=H(c^d^e,f,c,b[4],11,1272893353);e=H(f^c^d,e,f,b[7],16,-155497632);d=H(e^f^c,d,e,b[10],23,-1094730640);c=H(d^e^f,c,d,b[13],4,681279174);f=H(c^d^e,f,c,b[0],11,-358537222);e=H(f^c^d,e,f,b[3],16,-722521979);d=H(e^f^c,d,e,b[6],23,76029189);c=H(d^e^f,c,d,b[9],4,-640364487);
229
229
  f=H(c^d^e,f,c,b[12],11,-421815835);e=H(f^c^d,e,f,b[15],16,530742520);d=H(e^f^c,d,e,b[2],23,-995338651);c=J(c,d,e,f,b[0],6,-198630844);f=J(f,c,d,e,b[7],10,1126891415);e=J(e,f,c,d,b[14],15,-1416354905);d=J(d,e,f,c,b[5],21,-57434055);c=J(c,d,e,f,b[12],6,1700485571);f=J(f,c,d,e,b[3],10,-1894986606);e=J(e,f,c,d,b[10],15,-1051523);d=J(d,e,f,c,b[1],21,-2054922799);c=J(c,d,e,f,b[8],6,1873313359);f=J(f,c,d,e,b[15],10,-30611744);e=J(e,f,c,d,b[6],15,-1560198380);d=J(d,e,f,c,b[13],21,1309151649);c=J(c,d,e,f,
230
230
  b[4],6,-145523070);f=J(f,c,d,e,b[11],10,-1120210379);e=J(e,f,c,d,b[2],15,718787259);d=J(d,e,f,c,b[9],21,-343485551);a[0]=La(c,a[0]);a[1]=La(d,a[1]);a[2]=La(e,a[2]);a[3]=La(f,a[3])}function H(a,b,c,d,e,f){b=La(La(b,a),La(d,f));return La(b<<e|b>>>32-e,c)}function F(a,b,c,d,e,f,g){return H(b&c|~b&d,a,b,e,f,g)}function G(a,b,c,d,e,f,g){return H(b&d|c&~d,a,b,e,f,g)}function J(a,b,c,d,e,f,g){return H(c^(b|~d),a,b,e,f,g)}
231
231
  function Na(a,b=32){const c='0123456789abcdef'.split('');var d=a,e=d.length;a=[1732584193,-271733879,-1732584194,271733878];var f;for(f=64;f<=d.length;f+=64){var g=d.substring(f-64,f),h=[];for(let k=0;64>k;k+=4)h[k>>2]=g.charCodeAt(k)+(g.charCodeAt(k+1)<<8)+(g.charCodeAt(k+2)<<16)+(g.charCodeAt(k+3)<<24);Ma(a,h)}d=d.substring(f-64);g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(f=0;f<d.length;f++)g[f>>2]|=d.charCodeAt(f)<<(f%4<<3);g[f>>2]|=128<<(f%4<<3);if(55<f)for(Ma(a,g),f=0;16>f;f++)g[f]=0;g[14]=8*e;
232
- Ma(a,g);d='';e=0;b=0<=b?b:32;for(f=0;4>f;f++)for(h=a[f],g=0;4>g;g++){if(++e>b)return d;d+=c[h>>8*g+4&15];if(++e>b)return d;d+=c[h>>8*g&15]}return d}'5d41402abc4b2a76b9719d911017c592'!==Na('hello')&&(La=(a,b)=>{const c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535});olympe.X.pb=Na;olympe.X.zy=function(a){var b=/^(?:(\S*)@)?([^:]+)(?::(\d{2,5}))?$/;const c=/([^&=]+)=([^&=]+)/g,d=/^true|false$/i,e=/^\d+(\.\d+)?$/;var f=a.match(/^(?:([^:/?#]+):)?(?:\/\/([^/?#]*))?\/?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/);a=f[1];const g=f[2],h=f[3],k=f[4];f=f[5];let l=null,n=null;var p=null;g&&(p=g.match(b),l=p[1],n=p[2],p=p[3]);b={};let q;for(;q=c.exec(k);){let r=q[2];void 0===r?r=!0:r.startsWith('"')&&r.endsWith('"')?r=r.substring(1,r.length-1):d.test(r)?r='true'===r.toLowerCase():e.test(r)?r=parseFloat(r):
233
- r=decodeURIComponent(r);b[q[1]]=r}return{scheme:a||null,bD:g||null,qs:l||null,host:n||null,port:p&&parseInt(p,10)||null,path:h&&'/'!==h?h:null,query:k||null,oD:f||null,parameters:b}};olympe.X.HD=function(a){a=a.substring(1);return''===a?new Map:new Map(a.split('&').map(b=>b.split('=')))};olympe.X.KD=function(a){let b='';for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=(b?'&':'?')+c+'='+encodeURIComponent(a[c]));return b};
234
- olympe.X.Nr=(a,b)=>{const c=Object.keys(a).find(d=>a[d]===b);return void 0===c?null:c};olympe.X.tn=(a,b)=>{if(b instanceof Object)for(const c of Object.keys(b)){const d=b[c];d instanceof Object&&void 0!==a[c]?olympe.X.tn(a[c],d):a[c]=d}};olympe.X.cn=(a,b,c)=>{const d=Object.create(null);b(a,e=>{olympe.X.tn(d,e);b(`conf.d/${a}`,f=>{olympe.X.tn(d,f);c(d)})})};olympe.X.ZC=class a{constructor(b,c){this.x=b;this.y=c}add(b){return new a(this.x+b.x,this.y+b.y)}Hg(){return Math.sqrt(this.x*this.x+this.y*this.y)}toString(){return`Vector(${this.x}, ${this.y})`}};olympe.X.yz=class{constructor(a,b,c,d){this.from=a;this.target=b;this.C=c;this.F=d}toString(){return`(${this.from.toString()}, ${this.target.toString()}, ${this.C.toString()}, ${this.F.toString()})`}};olympe.X.gu=class{constructor(a,b){this.start=a;this.end=b}};olympe.X.gu.C={Ji:'left',Ti:'right',wz:'bottom',uC:'top'};function Oa(a){a=/([0-9]*)\.([0-9]*)\.([0-9]*)-?([A-z\-_0-9]*)/.exec(a);if(null===a||4>a.length)return olympe.X.Xh.C;const b=Number.parseInt(a[1],10),c=Number.parseInt(a[2],10),d=Number.parseInt(a[3],10);return isNaN(b)||isNaN(c)||isNaN(d)?olympe.X.Xh.C:new olympe.X.Xh(b,c,d,a[4])}function Pa(a){return`${a.C}.${a.F}.${a.G}`}
235
- olympe.X.Xh=class{constructor(a,b,c,d){this.C=a;this.F=b;this.G=c;this.K=d||null}Rk(a){return this.C!==a.C?this.C>a.C:this.F!==a.F?this.F>a.F:this.G>a.G}Aj(a){return this.C!==a.C?this.C<a.C:this.F!==a.F?this.F<a.F:this.G<a.G}nb(a){return this.C===a.C&&this.F===a.F&&this.G===a.G}toString(){return`${this.C}.${this.F}.${this.G}`+(null!==this.K?`-${this.K}`:'')}};olympe.X.Xh.C=new olympe.X.Xh(Number.NaN,Number.NaN,Number.NaN);olympe.X.R={Ah:'utils.binaryConverter',zs:'utils.base64Converter'};olympe.U.config(a=>{va(a,olympe.X.R.Ah);ua(a,olympe.X.R.zs,olympe.X.R.Ah,!0)},'Utils services');olympe.U.run([olympe.X.R.Ah],a=>{olympe.X.fi=()=>a});olympe.ta={};olympe.ta.Ob=class{P(){}qa(){}G(){}ba(){}la(){}Fa(){}V(){}$(){}trace(){}debug(){}log(){}info(){}warn(){}error(){}fatal(){}};olympe.ta.Ob.prototype.fatal=olympe.ta.Ob.prototype.fatal;olympe.ta.Ob.prototype.error=olympe.ta.Ob.prototype.error;olympe.ta.Ob.prototype.warn=olympe.ta.Ob.prototype.warn;olympe.ta.Ob.prototype.info=olympe.ta.Ob.prototype.info;olympe.ta.Ob.prototype.log=olympe.ta.Ob.prototype.log;olympe.ta.Ob.prototype.debug=olympe.ta.Ob.prototype.debug;olympe.ta.Ob.prototype.trace=olympe.ta.Ob.prototype.trace;
236
- olympe.ta.Ob.C={nv:0,kg:1,cu:2,vp:3,wv:4,cc:5,dt:6,cm:7};olympe.ta.Ob.F={0:'TRACE',1:'DEBUG',2:'LOG',3:'INFO',4:'WARN',5:'ERROR',6:'FATAL',7:'NOTHING'};olympe.ta.oa=class{Qc(){}};olympe.ta.rd={};function Qa(a,b,c,d){a.Ka[b](`[OLYMPE.${c}]:`,d.join(' '));if(0<a.K.size){var e=new Date;e=('00'+e.getHours()).substring(-2)+':'+('00'+e.getMinutes()).substring(-2)+':'+('00'+e.getSeconds()).substring(-2)+'.'+('00'+e.getMilliseconds()).substring(-3);for(const f of a.K.values())f(e,c,b,...d)}}
237
- olympe.ta.rd.Ob=class{constructor(a,b){this.name=a;this.C=b;this.F=a.toUpperCase();this.K=new Map;this.Ka=console}P(){return this.C}qa(){return this.C<=olympe.ta.Ob.C.nv}G(){return this.C<=olympe.ta.Ob.C.kg}la(){return this.C<=olympe.ta.Ob.C.cu}ba(){return this.C<=olympe.ta.Ob.C.vp}Fa(){return this.C<=olympe.ta.Ob.C.wv}V(){return this.C<=olympe.ta.Ob.C.cc}$(){return this.C<=olympe.ta.Ob.C.dt}trace(...a){this.qa()&&Qa(this,'trace',this.F,a)}debug(...a){this.G()&&Qa(this,'debug',this.F,a)}log(...a){this.la()&&
238
- Qa(this,'log',this.F,a)}info(...a){this.ba()&&Qa(this,'info',this.F,a)}warn(...a){this.Fa()&&Qa(this,'warn',this.F,a)}error(...a){this.V()&&Qa(this,'error',this.F,a)}fatal(...a){this.$()&&Qa(this,'error',this.F,a)}};olympe.ta.rd.Ob.ma=[olympe.ta.Ob];olympe.ta.rd.oa=class{constructor(a,b,c){this.C=a;this.F=parseInt(b,10);this.G=c;this.channels=new Map;this.N=this.Qc('logging');this.N.info('Logging initialized, global log level is '+olympe.ta.Ob.F[b])}Qc(a){var b=this.channels.get(a);if(!b){b=this.F;var c=`${olympe.ta.Config.Es}.${a}`;Object.prototype.hasOwnProperty.call(this.C.parameters,c.toLowerCase())&&(b=parseInt(this.C.getParameter(c),10));let d=this.G;c=`${c}.${olympe.ta.Config.Zu}`;Object.prototype.hasOwnProperty.call(this.C.parameters,
239
- c.toLowerCase())&&(d=!0===this.C.getParameter(c));b=new olympe.ta.rd.Ob(a,b,d);this.channels.set(a,b)}return b}};olympe.ta.rd.oa.ma=[olympe.ta.oa];olympe.ta.R={Aa:'logging.Manager'};olympe.ta.Config={Xo:'logging',Yo:'logging.showLogLevel',Es:'logging',Zu:'showLogLevel'};olympe.U.config(function(a){E(a,olympe.ta.Config.Xo,olympe.ta.Ob.C.vp);E(a,olympe.ta.Config.Yo,!0);ta(a,olympe.ta.R.Aa,olympe.ta.rd.oa,olympe.U.R.jg,new olympe.U.fa(olympe.ta.Config.Xo),new olympe.U.fa(olympe.ta.Config.Yo))},'olympe.logging');olympe.U.run([olympe.ta.R.Aa],a=>{olympe.ta.Za=b=>a.Qc(b)},'Logging singleton getter initialization');olympe.D={};olympe.D.Config={Up:'df.nodeCreationThreshold'};const Ra=[];function Sa(){}function Ta(){}olympe.D.J=class a{constructor(b,c,d){this.C=void 0===b?Sa:b;this.F=void 0===c?Ra:c;this.$=d}static K(){var b=[];return void 0===b||0===b.length?olympe.D.J.ba:new a(Ta,b)}K(){return this.C?this.C():void 0}G(){return this.F?this.F:Ra}P(){return null===this.C&&null===this.F}V(){return this.C===Ta}};olympe.D.J.$=new olympe.D.J;olympe.D.J.C=new olympe.D.J(null,null);olympe.D.J.ba=new olympe.D.J(Ta);olympe.D.J.G=new olympe.D.J(()=>olympe.D.ga);
240
- olympe.D.J.F=new olympe.D.J(()=>olympe.D.$a);olympe.D.J.P=new olympe.D.J(()=>olympe.D.ra);olympe.D.J.V=new olympe.D.J(()=>olympe.D.ec);olympe.D.Dh=class{Z(){return''}Nc(){return''}destroy(){}G(){return!1}$(){return!1}run(a,...b){return a(...b)}F(a){return a}getParent(){return null}Ye(){}oh(){}Md(){}ce(){}Kk(){}Fa(){}onDestroy(){return''}Ze(){}P(){return''}Nd(){}};olympe.D.Dh.prototype.offDestroy=olympe.D.Dh.prototype.Ze;olympe.D.Dh.prototype.onDestroy=olympe.D.Dh.prototype.onDestroy;let Ua=0;olympe.U.run([new olympe.U.fa(olympe.D.Config.Up)],()=>{});
241
- olympe.D.$b=class{constructor(a='SimpleContext',b){++Ua;this.xb=new Map;this.Db=new Map;this.eb=new Map;this.$c=0;this.name=a;this.id=String(Ua);this.uc=this.fc=!1;(this.la=void 0===b?olympe.D.Na():b)&&this.la.Md(this);this.debug=!1}Z(){return this.id}Nc(){return this.name}run(a,...b){if(!this.fc){var c=olympe.D.js(this);a=a(...b);c&&olympe.D.js(c);return a}}F(a){return(...b)=>this.run(a,...b)}destroy(){if(!this.fc&&!this.uc){this.uc=!0;this.Fa();for(const a of this.Db.keys())this.Db.has(a)&&this.Db.get(a)();
242
- this.Db.clear();this.eb.clear();this.la&&(this.la.ce(this,!1),this.la=null);this.fc=!0;this.uc=!1;this.Fa()}}G(){return this.fc}$(){return this.uc}Md(a){if(!this.fc){var b;olympe.D.ob(a)?b=a.Qa:olympe.D.pn(a)&&(b=a);b&&this.xb.set(b.Z(),b)}}ce(a,b=!0){let c;olympe.D.ob(a)?c=a.Qa:olympe.D.pn(a)&&(c=a);c&&this.xb.has(c.Z())&&(b&&c.Kk(this),this.xb.delete(c.Z()))}Kk(){this.la=null;this.destroy()}Fa(){const a=this.xb;for(const b of a.keys())a.has(b)&&a.get(b).Kk(this);this.xb.clear();for(const b of this.eb.keys())this.eb.has(b)&&
243
- this.eb.get(b)();this.eb.clear()}onDestroy(a,b){void 0===b&&(++this.$c,b=String(this.$c));this.Db.set(b,a);return b}Ze(a){this.Db.delete(a)}P(a){if(void 0===b){++this.$c;var b=String(this.$c)}this.eb.set(b,a);return b}Nd(a){this.eb.delete(a)}Ye(a){this.la&&this.la.ce(this,!1);(this.la=a||null)&&this.la.Md(this)}getParent(){return this.la}oh(){return this.xb}};olympe.D.Gq=class extends olympe.D.$b{constructor(){super('Root',null)}destroy(){}onDestroy(){return''}Ze(){}};olympe.D.Dh.ma=[olympe.D.Dh];let Va=0;
244
- function Wa(a,b){a.qa||(a.qa=new Map);a.qa.set(b.Z(),b);switch(b.Sd()){case olympe.D.Node.C.Kh:break;case olympe.D.Node.C.Wh:break;case olympe.D.Node.C.fk:case olympe.D.Node.C.mg:olympe.D.N.warn('Not bad as such but should not happen!');break;case olympe.D.Node.C.Eh:Xa(a,olympe.D.Node.C.Eh);break;case olympe.D.Node.C.OBSOLETE:a.wd=!0;a.K!==olympe.D.Node.C.Eh&&Xa(a,olympe.D.Node.C.OBSOLETE);break;case olympe.D.Node.C.lg:olympe.D.N.warn('Adding a destroyed node as upstream => should never happen!');break;
245
- default:olympe.D.N.warn('Unknown state, investigate: ',b.Sd())}Ya(b,a)}
246
- function Za(a){if(a.Ad){var b=[],c=[];if(a.dg)if(a.dg instanceof olympe.D.Node)if($a(a.dg))b=a.dg.Kb;else return;else b=a.dg;else b=null;if(null!==a.Ka){const e=a.Bg;for(let f=0,g=a.Ka.length;f<g;f++)if(null!==e&&-1<e.indexOf(f)){const h=a.Ka[f];if($a(h))c.push(h.Kb);else return}else c.push(a.Ka[f])}if(a.Ad instanceof Function)var d=a.Ad;else b&&(b[a.Ad]||olympe.D.N.warn('looks like you forget a cast somewhere around '+a.Ad),d=b[a.Ad]);a.run(()=>{a.Fa();if(void 0!==d){const e=d.apply(b,c);e&&e.sr?
247
- ab(a,e.Qa):e instanceof olympe.D.Node?ab(a,e):(K(a,e),void 0===e&&void 0===a.valueType&&Xa(a,olympe.D.Node.C.Wh))}else bb(a)})}}function L(a){void 0===a.qd&&(a.qd=a.valueType===olympe.D.Proxy?cb(void 0,a.ie):cb(a.valueType,a.ie),a.qd.Qa=a);return a.qd}function db(a){void 0!==a.V&&(eb(a.V,a),a.V=void 0)}function fb(a){if(a.K===olympe.D.Node.C.OBSOLETE&&(a.K=olympe.D.Node.C.Wh,null!==a.ba))for(const b of a.ba.values())gb(b)}function Xa(a,b){b!==a.K&&(a.K=b)}
248
- function hb(a){if(a.K!==olympe.D.Node.C.OBSOLETE&&a.K!==olympe.D.Node.C.fk&&a.K!==olympe.D.Node.C.Kh&&a.K!==olympe.D.Node.C.Eh){Xa(a,olympe.D.Node.C.fk);var b=a.ba;if(b)for(const c of b.values())b.has(c.Z())&&hb(c);Xa(a,olympe.D.Node.C.OBSOLETE)}}function ib(a,b,c){if(a.K!==olympe.D.Node.C.mg)if(b===a.V)K(a,c,!0);else{if(a.K===olympe.D.Node.C.OBSOLETE||a.K===olympe.D.Node.C.fk)a.wd=!0;Za(a)}}
249
- function K(a,b,c){b instanceof olympe.D.Node&&(olympe.D.N.warn('We are setting the value of a node as a node, that should never happen?'),b=b.Kb);a.hc||c||void 0===a.V||db(a);if(void 0!==b){if((a.hc||a.K===olympe.D.Node.C.Wh||a.K===olympe.D.Node.C.OBSOLETE)&&!olympe.D.ob(b)&&void 0!==a.Kb){if(null===b&&null===a.Kb){fb(a);return}if(null!==b&&null!==a.Kb&&(b.valueOf()===a.Kb.valueOf()||a.Kb.nb&&a.Kb.nb(b))){fb(a);return}}if(!0===a.hc)olympe.D.N.error("Circular dependency detected: updating a downstream node caused this node's (#"+
250
- a.Z()+') value to get updated !');else{a.K===olympe.D.Node.C.lg&&olympe.D.N.warn(`trying to set a value on a destroyed node (#${a.Z()} ${a.xd?', '+a.xd:''})`);a.K===olympe.D.Node.C.mg&&olympe.D.N.warn(`trying to set a value on a node being destroyed (#${a.Z()} ${a.xd?', '+a.xd:''})`);a.hc=!0;c=b;var d=!1,e=(f,g)=>f instanceof g?!0:!1;void 0===a.valueType||null===c||e(c,a.valueType)||(e=a.valueType&&a.valueType.name?a.valueType.name:'undefined',b='object'===typeof c?b.constructor.name:typeof c,c instanceof
251
- Object?d=!0:b.toLowerCase()!==e.toLowerCase()&&a.valueType!==Object&&(d=!0),d&&('string'===b.toLowerCase()&&a.valueType===olympe.D.$a?(c=olympe.D.Bb(c),d=!1):'number'===b.toLowerCase()&&a.valueType===olympe.D.ga?(c=olympe.D.Ba(c),d=!1):'boolean'===b.toLowerCase()&&a.valueType===olympe.D.ra&&(c=olympe.D.Ac(c),d=!1)));a.Kb=c;Xa(a,olympe.D.Node.C.Wh);if(b=a.ba){d=0;for(const f of b.values())0<d&&hb(f),d++;for(const f of b.values())ib(f,a,c)}a.hc=!1}}}
252
- function jb(a,b){if(a.K!==olympe.D.Node.C.mg&&a.K!==olympe.D.Node.C.lg&&(a.K!==olympe.D.Node.C.Kh||a.Ad)){var c=void 0!==a.defaultValue;a.Ad&&b!==a.V&&a.Fa();if(c)K(a,a.defaultValue,!0);else if(a.Kb=void 0,Xa(a,olympe.D.Node.C.Kh),b=a.ba)for(const d of b.values())jb(d,a)}}function bb(a){if(a.K!==olympe.D.Node.C.Eh){Xa(a,olympe.D.Node.C.Eh);var b=a.ba;if(b)for(const c of b.values())bb(c);a.Fa();void 0!==a.V&&db(a);a.Kb=a.defaultValue}}function $a(a){return a.K===olympe.D.Node.C.Wh}
253
- function ab(a,b){b===a?olympe.D.N.error('Setting a node as provider of itself. Ignoring'):(a.V&&a.V!==b&&db(a),Ya(b,a),$a(b)?K(a,b.Kb,!0):void 0!==a.defaultValue?K(a,a.defaultValue,!0):jb(a),a.V=b)}function kb(a,b){a.Ad&&(a.Ad=void 0);a.xd='Repeater';ab(a,b)}function gb(a){a.V?fb(a):null!==a.qa&&0===Array.from(a.qa.values()).filter(b=>!$a(b)).length&&(a.wd&&(a.wd=!1,Za(a)),fb(a))}
254
- function Ya(a,b){a.ba||(a.ba=new Map);a.ba.set(b.Z(),b);a.K===olympe.D.Node.C.lg&&olympe.D.N.warn('adding a downstream node on a deleted one (#'+a.Z()+') !')}function eb(a,b){a.ba&&(b=b.Z(),a.ba.has(b)&&(a.ba.delete(b),lb(a)))}function lb(a){if(null===a.getParent()){var b=a.ba;b&&0<b.size||a.destroy()}}
255
- olympe.D.Node=class extends olympe.D.$b{constructor({valueType:a,Ad:b,Cy:c=!0,dg:d,ln:e,debug:f=!1,Bg:g=null,xd:h='Node',$i:k}={}){++Va;super(String(Va));this.debug=!!f;this.xd=h;h&&'string'===typeof h||(b?this.xd=b.name?b.name:'anon()':this.xd='Node');this.Ka=e&&0<e.length?e:null;this.Bg=g&&0<g.length?g:null;this.valueType=a;this.Kb=void 0;this.hc=!1;this.K=olympe.D.Node.C.Kh;this.wd=!1;this.ba=this.qa=null;this.Ad=b;this.dg=d||null;this.defaultValue=this.qd=this.V=void 0;this.$i=k;d&&d instanceof
256
- olympe.D.Node&&Wa(this,d);if(g)for(b=0;b<g.length;b++)a=e[g[b]],Wa(this,a);c&&Za(this)}df(a){this.defaultValue=a;this.K===olympe.D.Node.C.Kh&&K(this,a,!0);return this}cj(a){this.valueType=a}Yb(){return this.valueType||Object}Sd(){return this.K}G(){return this.K===olympe.D.Node.C.lg}$(){return this.K===olympe.D.Node.C.mg}ie(...a){if(this.$i instanceof Function)return this.$i(...a);var b=a.length;--b;const c=a[b];--b;const d=a[b],e=Array(b);for(var f=0;f<b;f++)e[f]=a[f];a=this.Sd();a!==olympe.D.Node.C.mg&&
257
- a!==olympe.D.Node.C.lg||olympe.D.N.warn('Calling a function on a destroyed node!!!',this);a=d.G();b=[];if(1===a.length&&-1===a[0])for(var g of e)olympe.D.ob(g)&&b.push(g.Qa);else for(let h=0,k=a.length;h<k;h++)g=a[h],f=e[g],void 0!==f&&null!==f&&f.Ff&&(e[g]=f.Qa,b.push(g));return L(new olympe.D.Node({valueType:d.K(),Ad:c,dg:this,ln:e,debug:!1,Bg:b,xd:'Proxy.'+c+'()'}))}Kk(a){if(null===this.getParent())olympe.D.N.warn('context is undefined, investigate');else if(this.getParent()!==a){olympe.D.N.warn('Investigate a potential issue in creator-createe link: create node mismatch',
258
- a,this.getParent());return}this.Ye(null);lb(this)}destroy(){var a=this.K;if(a!==olympe.D.Node.C.mg&&a!==olympe.D.Node.C.lg){Xa(this,olympe.D.Node.C.mg);if(a=this.ba){for(const c of a.values())if(a.has(c.Z())){var b=c;b.qa&&b.qa.delete(this.Z());b.V&&b.V.Z()===this.Z()?b.V=void 0:b.destroy()}a.clear()}this.ba=null;super.destroy();if(this.qa){for(const c of this.qa.values())this.qa.has(c.Z())&&eb(c,this);this.qa.clear()}this.qa=null;this.V&&(eb(this.V,this),this.V=void 0);this.Kb=void 0;this.Ka&&(this.Ka.length=
259
- 0,this.Ka=null);this.Bg&&(this.Bg.length=0,this.Bg=null);this.$i=this.Ad=void 0;this.defaultValue=this.dg=null;this.xd=`** Destroyed ** ${this.xd}`;Xa(this,olympe.D.Node.C.lg)}}Nc(){return this.xd}};olympe.D.Node.F='rootNode';olympe.D.Node.C={Kh:0,Wh:1,Eh:3,fk:4,OBSOLETE:5,mg:6,lg:7};function cb(a,b){if('function'!==typeof a)return new olympe.D.Proxy(a,b);var c=olympe.D.Proxy.prototype;void 0===a.prototype&&olympe.D.N.error('investigate');c=Object.create(mb(c,a.prototype));c.Fk=a;c.tr=b;return c}function mb(a,b){Object.prototype.hasOwnProperty.call(b,olympe.D.Proxy.lm)||Object.defineProperty(b,olympe.D.Proxy.lm,{enumerable:!1,configurable:!1,writable:!1,value:nb(a,b)});return b[olympe.D.Proxy.lm]}
260
- function ob(a,b){if(a.Fk!==b){a.Fk=b;b.prototype||olympe.D.N.error('Cast not possible, provided type is not a valid type!');var c=mb(a,b.prototype);Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=c;a.Qa&&a.Qa.cj(b)}}
261
- function nb(a,b){let c={};if(b.prototype)olympe.D.N.error('first level of prototyping, investigate');else if(b.__proto__)c=Object.create(mb(a,b.__proto__));else return olympe.D.Proxy.prototype;Object.getOwnPropertyNames(b).forEach(d=>{if('function'===typeof b[d]&&'__getReplacementFunction'!==d){var e=b[d].L;null===e||e&&e.P()?c[d]=function(...f){var g=this.Qa;if(g&&$a(g)&&(g=g.Kb)&&g[d]&&'function'===typeof g[d])return g[d].apply(g,f)}:(e=e||b[d].__oSig__||olympe.D.J.$,c[d]=function(...f){f=this.tr.call(this.Qa,
262
- ...f,e,d);const g=e.$;if(g){const h=this.Qa.Kb;h&&h[g]&&ob(f,h[g])}return e.V()?this:f})}});return c}function pb(a,b){K(a.Qa,b)}function qb(a){jb(a.Qa)}function rb(a){olympe.D.wc([olympe.D.ra.C],b=>{a.Qa.df(b)},'setDefaultValue');return a}function sb(a,b){kb(a.Qa,olympe.D.$f(b)?b:b.Qa)}function tb(a,b){olympe.D.ob(b)||olympe.D.$f(b)?sb(a,b):pb(a,b)}
263
- olympe.D.Proxy=class{constructor(a,b){this.Qa=null;this.Fk=a;this.tr=b}static ob(a){return!(!a||!a.Ff)}nb(a){return olympe.D.Ha([this,a],(b,c)=>b===c,Boolean)}Td(a){return olympe.D.Ha([this,a],(b,c)=>null===b||null===c?b===c?olympe.D.ra.F:olympe.D.ra.C:b.valueOf()===c.valueOf()?olympe.D.ra.F:olympe.D.ra.C,olympe.D.ra)}sr(){return this.Qa}};olympe.D.Proxy.lm='__opp__';olympe.D.Proxy.prototype.Ff=!0;function ub(a,b){a.node.df(b);return a}olympe.D.Tj=class{constructor(a,b='FlowSource'){this.node=olympe.D.createNode(a,void 0,void 0,void 0,void 0,b)}update(a){olympe.D.ob(a)?K(this.node,olympe.D.Xa(a)):K(this.node,a);return this}repeat(a){kb(this.node,olympe.D.ob(a)?a.Qa:a);return this}clear(){jb(this.node);return this}zb(){return L(this.node)}};function vb(a,b,c=1E3,d,e){const f=olympe.D.Ic(olympe.D.ga),g=d||olympe.D.ga.Do.Kp;let h,k,l,n;f.update(olympe.D.Ba(a));const p=window.performance.now(),q=b.valueOf();l=q-a.valueOf();if(0!==l&&void 0===n){const r=()=>{f.node.G()||(l=q-a.valueOf(),k=(window.performance.now()-p)/c,1<=k&&(k=1,n=void 0),h=a.valueOf()+l*g(k,0,1,1),f.update(olympe.D.Ba(h)),1===k&&void 0!==e&&e(h),1>k&&(n=window.requestAnimationFrame(r)))};n=window.requestAnimationFrame(r)}return f.zb()}
264
- olympe.D.ga=class{constructor(a){this.value=void 0===a||null===a?0:a}toJSON(){return'{ "type": "number", "value": '+JSON.stringify(this.value)+' }'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.Ba(b.value)}Hn(){return'number'===typeof this.value&&!isNaN(this.value)}isNaN(){return olympe.D.Ac(!this.Hn())}Tc(){return null===this.value||void 0===this.value||void 0===this.value.toString||isNaN(this.value)?olympe.D.Bb(''):olympe.D.Bb(this.value.toString())}toString(a,b){return void 0!==
265
- this.value&&null!==this.value?'number'===typeof a?this.value.toString(a):'number'===typeof b?this.value.toFixed(b):this.value.toString():'-'}toFixed(a){return this.Hn()?this.valueOf().toFixed(a):''}static max(a){const b=new Map;let c=-Infinity;const d=olympe.D.Ic(olympe.D.ga,'ONumber.max result'),e=()=>{c=-Infinity;for(const f of b.values())f>c&&(c=f);d.update(olympe.D.Ba(c))};a.forEach((f,g)=>{olympe.D.wc([f],h=>{b.set(g,h.valueOf());e()})},f=>{if(!d.node.G()){var g=b.get(f);b.delete(f);g===c&&e()}});
266
- return d.zb()}le(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ba(b.valueOf()+c.valueOf()),olympe.D.ga,'ONumber.plus')}vh(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ba(b.valueOf()-c.valueOf()),olympe.D.ga,'ONumber.minus')}round(){return olympe.D.Ba(Math.round(this.valueOf()))}Bj(){return olympe.D.Ba(-this.valueOf())}$k(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ba(b.valueOf()*c.valueOf()),olympe.D.ga,'ONumber.mul')}dj(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ba(b.valueOf()/c.valueOf()),
267
- olympe.D.ga,'ONumber.div')}Zx(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ba(b.valueOf()%c.valueOf()),olympe.D.ga,'ONumber.div')}floor(){return olympe.D.Ba(Math.floor(this.valueOf()))}ceil(){return olympe.D.Ba(Math.ceil(this.valueOf()))}trunc(){return olympe.D.Ba(Math.trunc(this.valueOf()))}log(){return olympe.D.Ba(Math.log(this.valueOf()))}pow(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ba(Math.pow(b.valueOf(),c.valueOf())),olympe.D.ga,'ONumber.pow')}exp(){return olympe.D.Ba(Math.exp(this.valueOf()))}Td(a){return olympe.D.Ha([this,
268
- a],(b,c)=>olympe.D.Ac(b.nb(c)),olympe.D.ra,'ONumber.oEquals')}nb(a){return this.valueOf()===(void 0!==a&&null!==a?a.valueOf():void 0)}valueOf(){return void 0!==this.value?this.value.valueOf():void 0}bx(){return this.valueOf()}nn(a){return olympe.D.Ha([this,a],(b,c)=>b.valueOf()>c.valueOf()?olympe.D.ra.F:olympe.D.ra.C,olympe.D.ra,'ONumber.isBiggerThan')}Fy(a){return olympe.D.Ha([this,a],(b,c)=>b.valueOf()>=c.valueOf()?b:olympe.D.Ba(c),olympe.D.ga,'ONumber.returnsBiggest')}hs(a){return olympe.D.Ha([this,
269
- a],(b,c)=>b.valueOf()<=c.valueOf()?b:olympe.D.Ba(c),olympe.D.ga,'ONumber.returnsSmallest')}Nx(a){return olympe.D.Ha([this,a],(b,c)=>b.valueOf()<c.valueOf()?olympe.D.ra.F:olympe.D.ra.C,olympe.D.ra,'ONumber.isSmallerThan')}sin(){return olympe.D.Ba(Math.sin(this.valueOf()))}cos(){return olympe.D.Ba(Math.cos(this.valueOf()))}atan2(a){return olympe.D.ob(a)?olympe.D.me([a],b=>olympe.D.Ba(Math.atan2(this.valueOf(),b.valueOf())),olympe.D.ga):olympe.D.Ba(Math.atan2(this.valueOf(),a.valueOf()))}abs(){return olympe.D.Ba(Math.abs(this.valueOf()))}tj(a,
270
- b){return olympe.D.ob(a)||olympe.D.ob(b)?olympe.D.me([a,b],(c,d)=>olympe.D.Ba(this.valueOf()*d.valueOf()+c.valueOf()*(1-d.valueOf())),olympe.D.ga):olympe.D.Ba(this.valueOf()*b.valueOf()+a.valueOf()*(1-b.valueOf()))}static yv(a,b,c,d){'number'===typeof a&&(a=olympe.D.ke(a));'number'===typeof b&&(b=olympe.D.ke(b));'number'===typeof c&&(c=olympe.D.ke(c));let e=0;const f=olympe.D.ke(0);let g,h;void 0!==b&&void 0!==c&&olympe.D.kn(b.nn(c),()=>{olympe.ta.Za('df').warn('You have a min bigger than max, cap your inputs')});
271
- const k=(l,n)=>{n=olympe.D.ke(n);const p=olympe.D.ga.animate(n,500);sb(f,p);pb(n,olympe.D.Ba(l));e=l};olympe.D.me([a],l=>{e+=l.valueOf();e>h?k(h,e):e<g?k(g,e):sb(f,olympe.D.ke(e))},olympe.D.ga);void 0!==b&&olympe.D.dl(b.valueOf(),l=>{if(g!==l&&(g=l,g>e)){const n=olympe.D.ke(e),p=olympe.D.ga.animate(n,400,d);l=olympe.D.Ba(g);K(n.Qa,l);e=g;sb(f,p)}});void 0!==c&&olympe.D.dl(c.valueOf(),l=>{if(h!==l&&(h=l,h<e)){const n=olympe.D.ke(e),p=olympe.D.ga.animate(n,400,d);l=olympe.D.Ba(h);K(n.Qa,l);e=h;sb(f,
272
- p)}});return f}static offset(a){let b;return olympe.D.me([a],c=>{void 0===b&&(b=c);return olympe.D.Ba(c-b)},olympe.D.ga,'offset')}static Hr(a){let b,c,d;return olympe.D.Ha([a],e=>{if(void 0===b)return b=e,c=window.performance.now(),olympe.D.Ba(0);d=window.performance.now();const f=olympe.D.Ba((e.valueOf()-b.valueOf())/(d-c));b=e;c=d;return f},olympe.D.ga,'derivative')}static Ix(a){let b=olympe.D.Ba(0),c,d,e;return olympe.D.Ha([a],f=>{if(void 0===c)return c=f,d=window.performance.now(),olympe.D.Ba(0);
273
- e=window.performance.now();b=b.le((f.valueOf()+c.valueOf())/2*(e-d));c=f;d=e;return b},olympe.D.ga,'integrate')}static dw(a){let b;return olympe.D.Ha([a],c=>{void 0===b&&(b=c.valueOf());const d=olympe.D.Ba(c.valueOf()-b.valueOf());b=c;return d},olympe.D.ga,'diff')}static Sv(a,b,c){return olympe.D.me([a,b,c],(d,e,f)=>{d='number'===typeof d?d:d.valueOf();e='number'===typeof e?e:e.valueOf();f='number'===typeof f?f:f.valueOf();return olympe.D.Ba(d>=e?d<=f?d:f:e)},olympe.D.ga)}static animate(a,b,c,d){let e;
274
- return e=olympe.D.Ha([a],f=>{const g=olympe.D.Xa(b,1E3),h=olympe.D.Xa(e);return void 0===h?olympe.D.Ba(f):vb(h,f,g,c,k=>{d&&d(k)})},olympe.D.ga)}static Kv(a,b,c){let d,e,f,g,h,k,l=olympe.D.ke(),n;olympe.D.wc([a],p=>{void 0===d?g=d=p.valueOf():d=g;f=window.performance.now();e=p.valueOf();k=e-d;0!==k&&void 0===n&&(n=setInterval(()=>{k=e-d;h=(window.performance.now()-f)/b;1<=h&&(h=1);g=d+k*c(h,0,1,1);pb(l,olympe.D.Ba(g));1===h&&(clearTimeout(n),n=void 0)},0))});return l}static Tc(a){return olympe.D.ob(a)?
275
- olympe.D.Ha([a],b=>olympe.D.Bb(b.valueOf().toString()),olympe.D.$a):olympe.D.Bb(a)}static Bj(a){return olympe.D.ob(a)?olympe.D.Ha([a],b=>olympe.D.Ba(-b.valueOf()),olympe.D.ga):olympe.D.Ba(-a.valueOf())}static le(a,b){return olympe.D.ob(a)||olympe.D.ob(b)?olympe.D.Ha([a,b],(c,d)=>olympe.D.Ba(c.valueOf()+d.valueOf()),olympe.D.ga,'plus'):olympe.D.Ba(a.valueOf()+b.valueOf())}static vh(a,b){return olympe.D.ob(a)||olympe.D.ob(b)?olympe.D.me([a,b],(c,d)=>olympe.D.Ba(c.valueOf()-d.valueOf()),olympe.D.ga,
276
- 'minus'):olympe.D.Ba(a.valueOf()-b.valueOf())}static dj(a,b){return olympe.D.ob(a)||olympe.D.ob(b)?olympe.D.me([a,b],(c,d)=>olympe.D.Ba(c.valueOf()/d.valueOf()),olympe.D.ga,'div'):olympe.D.Ba(a.valueOf()/b.valueOf())}static Ay(a,b){if(void 0===b)return a;olympe.D.wc([b],c=>{c=olympe.D.Ba(a.Qa.Kb.valueOf()+c.valueOf());K(a.Qa,c)},'plusEqual');return a}};olympe.D.ga.ZERO=new olympe.D.ga(0);olympe.D.ga.ONE=new olympe.D.ga(1);olympe.D.ga.pv=new olympe.D.ga(2);olympe.D.ga.PI=new olympe.D.ga(Math.PI);
277
- olympe.D.ga.ut=new olympe.D.ga(Infinity);olympe.D.ga.nu=new olympe.D.ga(-Infinity);olympe.D.ga.Tp=new olympe.D.ga(NaN);olympe.D.ga.fB=olympe.D.ga.Ay;olympe.D.ga.lz=olympe.D.ga.yv;olympe.D.ga.WA=olympe.D.ga.offset;olympe.D.ga.Pz=olympe.D.ga.Hr;olympe.D.ga.iD=olympe.D.ga.Hr;olympe.D.ga.GA=olympe.D.ga.Ix;olympe.D.ga.Qz=olympe.D.ga.dw;olympe.D.ga.Cz=olympe.D.ga.Sv;olympe.D.ga.mz=olympe.D.ga.animate;olympe.D.ga.nz=olympe.D.ga.Kv;olympe.D.ga.vC=olympe.D.ga.Tc;olympe.D.ga.wC=olympe.D.ga.Bj;
278
- olympe.D.ga.eB=olympe.D.ga.le;olympe.D.ga.RA=olympe.D.ga.vh;olympe.D.ga.Rz=olympe.D.ga.dj;
279
- olympe.D.ga.Do={Kp:function(a,b,c,d){return c*a/d+b},jA:function(a,b,c,d){a/=d;return c*a*a+b},tA:function(a,b,c,d){a/=d;return-c*a*(a-2)+b},fA:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a+b;a--;return-c/2*(a*(a-2)-1)+b},Zz:function(a,b,c,d){a/=d;return c*a*a*a+b},pA:function(a,b,c,d){a/=d;a--;return c*(a*a*a+1)+b},dA:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a+b;a-=2;return c/2*(a*a*a+2)+b},kA:function(a,b,c,d){a/=d;return c*a*a*a*a+b},uA:function(a,b,c,d){a/=d;a--;return-c*(a*a*a*a-1)+b},
280
- gA:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a*a+b;a-=2;return-c/2*(a*a*a*a-2)+b},lA:function(a,b,c,d){a/=d;return c*a*a*a*a*a+b},vA:function(a,b,c,d){a/=d;a--;return c*(a*a*a*a*a+1)+b},hA:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a*a*a+b;a-=2;return c/2*(a*a*a*a*a+2)+b},mA:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},wA:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},iA:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},bA:function(a,b,c,d){return c*Math.pow(2,
281
- 10*(a/d-1))+b},sA:function(a,b,c,d){return c*(-Math.pow(2,-10*a/d)+1)+b},eA:function(a,b,c,d){a/=d/2;if(1>a)return c/2*Math.pow(2,10*(a-1))+b;a--;return c/2*(-Math.pow(2,-10*a)+2)+b},Yz:function(a,b,c,d){a/=d;return-c*(Math.sqrt(1-a*a)-1)+b},oA:function(a,b,c,d){a/=d;a--;return c*Math.sqrt(1-a*a)+b},cA:function(a,b,c,d){a/=d/2;if(1>a)return-c/2*(Math.sqrt(1-a*a)-1)+b;a-=2;return c/2*(Math.sqrt(1-a*a)+1)+b},Tz:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-3*d)},Uz:function(a,b,c,d){d=(a/=d)*a;return b+
282
- c*(2*d*d+2*d*a+-3*d)},Vz:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-9*d+6*a)},Wz:function(a,b,c,d){d=(a/=d)*a;return b+c*(-2*d*d+10*d*a+-15*d+8*a)},rA:function(a,b,c,d){d=(a/=d)*a;const e=d*a;return b+c*(33*e*d+-106*d*d+126*e+-67*d+15*a)},qA:function(a,b,c,d){d=(a/=d)*a;const e=d*a;return b+c*(56*e*d+-175*d*d+200*e+-100*d+20*a)},aA:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(33*a*d+-59*d*d+32*a+-5*d)},$z:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(56*a*d+-105*d*d+60*a+-10*d)},nA:function(a,
283
- b,c,d){return(a/=d)<1/2.75?7.5625*c*a*a+b:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},Xz:function(a,b,c,d){a=d-a;d=(a/=d)<1/2.75?7.5625*c*a*a:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75):a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375):c*(7.5625*(a-=2.625/2.75)*a+.984375);return c-d+b}};m=olympe.D.ga.prototype;m.toJSON.L=olympe.D.J.C;m.Hn.L=olympe.D.J.C;m.isNaN.L=olympe.D.J.P;m.Tc.L=olympe.D.J.F;
284
- m.toString.L=new olympe.D.J(()=>String,[]);m.toFixed.L=new olympe.D.J(()=>String,[]);m.le.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.vh.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.round.L=olympe.D.J.G;m.Bj.L=olympe.D.J.G;m.$k.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.dj.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.Zx.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.floor.L=olympe.D.J.G;m.ceil.L=olympe.D.J.G;m.trunc.L=olympe.D.J.G;m.log.L=olympe.D.J.G;m.pow.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.exp.L=olympe.D.J.G;
285
- m.Td.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.nb.L=olympe.D.J.C;m.valueOf.L=olympe.D.J.C;m.bx.L=olympe.D.J.C;m.nn.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.Fy.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.hs.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.Nx.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.sin.L=olympe.D.J.G;m.cos.L=olympe.D.J.G;m.atan2.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.abs.L=olympe.D.J.G;m.tj.L=new olympe.D.J(()=>olympe.D.ga,[0,1]);olympe.D.$a=class{constructor(a){this.value=a}toJSON(){return'{ "type": "string", "value": '+JSON.stringify(this.value)+' }'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.Bb(b.value)}Cr(a){return olympe.D.$a.concat(this,'.',a)}concat(...a){let b;Array.isArray(a[0])?b=a[0]:b=a;return olympe.D.Ha([this,...b],(...c)=>{let d='';for(let e=0,f=c.length;e<f;e++)d=c[e]?d+c[e].valueOf():d+c[e];return olympe.D.Bb(d)},olympe.D.$a,'OString.concat')}Tc(){return this}dz(a){return olympe.D.Ba(parseInt(this.value,
286
- a))}ns(){return olympe.D.Ba(parseFloat(this.value))}toString(){return this.value}valueOf(){return this.value.valueOf()}nb(a){return this.value===(void 0===a||null===a?void 0:a.valueOf())}Td(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ac(c&&b.valueOf()===c.valueOf()),olympe.D.ra,'OString.oEquals')}Yf(){return olympe.D.Ac(!this.value||0===this.value.length)}contains(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ac((c instanceof olympe.D.$a||'string'===typeof c)&&b.valueOf().includes(c.valueOf())),
287
- olympe.D.ra,'OString.contains')}startsWith(a,b){return olympe.D.Ha([this,a,b||0],(c,d,e)=>olympe.D.Ac(c.valueOf().startsWith(d.valueOf(),e.valueOf())),olympe.D.ra,'OString.startsWith')}endsWith(a,b){return olympe.D.Ha([this,a,b||-1],(c,d,e)=>{e=0<=e.valueOf()?e.valueOf():this.Hg().valueOf()+e.valueOf()+1;return olympe.D.Ac(c.valueOf().endsWith(d.valueOf(),e))},olympe.D.ra,'OString.endsWith')}indexOf(a,b){return olympe.D.Ha([this,a,b||0],(c,d,e)=>olympe.D.Ba(c.valueOf().indexOf(d.valueOf(),e.valueOf())),
288
- olympe.D.ga,'OString.indexOf')}lastIndexOf(a,b){return olympe.D.Ha([this,a,b||Infinity],(c,d,e)=>olympe.D.Ba(c.valueOf().lastIndexOf(d.valueOf(),e.valueOf())),olympe.D.ga,'OString.lastIndexOf')}slice(a,b){return olympe.D.Ha([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().slice(d.valueOf(),e?e.valueOf():void 0)),olympe.D.$a,'OString.slice')}Hg(){return olympe.D.Ba(this.value.length)}threshold(a){return olympe.D.Ha([this,a],(b,c)=>b.valueOf().length>=c.valueOf()?b:olympe.D.$a.EMPTY,olympe.D.$a,'OString.threshold')}toLowerCase(){return olympe.D.Bb(this.value.toLowerCase())}toUpperCase(){return olympe.D.Bb(this.value.toUpperCase())}trim(){return olympe.D.Bb(this.value.trim())}padStart(a,
289
- b){return olympe.D.Ha([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().padStart(d.valueOf(),e.valueOf())),olympe.D.$a,'OString.padStart')}padEnd(a,b){return olympe.D.Ha([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().padEnd(d.valueOf(),e.valueOf())),olympe.D.$a,'OString.padEnd')}replace(a,b){return olympe.D.Ha([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().replace(d.valueOf(),e.valueOf())),olympe.D.$a,'OString.replace')}$y(a,b){return olympe.D.Ha([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().substr(d.valueOf(),
290
- e.valueOf())),olympe.D.$a,'OString.subOStr')}static concat(...a){return olympe.D.Bb('').concat(...a)}};olympe.D.$a.EMPTY=new olympe.D.$a('');olympe.D.$a.$u=new olympe.D.$a(' ');m=olympe.D.$a.prototype;m.toJSON.L=olympe.D.J.C;m.Cr.L=new olympe.D.J(()=>olympe.D.$a,[0,1]);m.concat.L=olympe.D.J.F;m.Tc.L=olympe.D.J.F;m.dz.L=olympe.D.J.G;m.ns.L=olympe.D.J.G;m.toString.L=olympe.D.J.C;m.valueOf.L=olympe.D.J.C;m.nb.L=olympe.D.J.C;m.Td.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.Yf.L=olympe.D.J.P;
291
- m.contains.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.startsWith.L=new olympe.D.J(()=>olympe.D.ra,[0,1]);m.endsWith.L=new olympe.D.J(()=>olympe.D.ra,[0,1]);m.indexOf.L=new olympe.D.J(()=>olympe.D.ga,[0,1]);m.lastIndexOf.L=new olympe.D.J(()=>olympe.D.ga,[0,1]);m.slice.L=new olympe.D.J(()=>olympe.D.$a,[0,1]);m.Hg.L=olympe.D.J.G;m.threshold.L=new olympe.D.J(()=>olympe.D.$a,[0]);m.toLowerCase.L=olympe.D.J.F;m.toUpperCase.L=olympe.D.J.F;m.trim.L=olympe.D.J.F;m.padStart.L=olympe.D.J.F;m.padEnd.L=olympe.D.J.F;
292
- m.replace.L=olympe.D.J.F;m.$y.L=olympe.D.J.F;olympe.D.ra=class{constructor(a){this.value=a}toJSON(){return`{ "type": "boolean", "value": ${this.value.valueOf()}}`}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return b.value?olympe.D.ra.F:olympe.D.ra.C}and(a){if(void 0!==a)return olympe.D.ob(a)?olympe.D.me([a],b=>new olympe.D.ra(this.valueOf()&&b.valueOf()),olympe.D.ra,'and'):this.value&&a.valueOf()?olympe.D.ra.F:olympe.D.ra.C}nb(a){return this.valueOf()===(void 0!==a?a.valueOf():void 0)}Td(a){if(void 0!==a)return olympe.D.ob(a)?
293
- olympe.D.me([a],b=>new olympe.D.ra(this.valueOf()===b.valueOf()),olympe.D.ra,'oEquals'):this.nb(a)?olympe.D.ra.F:olympe.D.ra.C}not(){return this.value?olympe.D.ra.C:olympe.D.ra.F}Jv(a){if(void 0!==a)return olympe.D.ob(a)?olympe.D.me([a],b=>new olympe.D.ra(!(this.valueOf()&&b.valueOf())),olympe.D.ra,'andNot'):this.value&&!a.valueOf()?olympe.D.ra.F:olympe.D.ra.C}or(a){if(void 0!==a)return olympe.D.ob(a)?olympe.D.me([a],b=>new olympe.D.ra(this.valueOf()||b.valueOf()),olympe.D.ra,'or'):this.value||a.valueOf()?
294
- olympe.D.ra.F:olympe.D.ra.C}xor(a){return olympe.D.Ha([this,a],(b,c)=>{b=b.valueOf();c=c.valueOf();return olympe.D.Ac(b&&!c||!b&&c)},olympe.D.ra,'OBoolean.xor')}tw(){return this.value}Pr(){return!0===this.value?olympe.D.ga.ONE:olympe.D.ga.ZERO}Tc(){return olympe.D.Bb(this.toString())}toString(){return this.value?'true':'false'}valueOf(){return this.value}};olympe.D.ra.F=new olympe.D.ra(!0);olympe.D.ra.C=new olympe.D.ra(!1);m=olympe.D.ra.prototype;m.toJSON.L=olympe.D.J.C;
295
- m.and.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.nb.L=olympe.D.J.C;m.Td.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.not.L=olympe.D.J.P;m.Jv.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.or.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.xor.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.tw.L=new olympe.D.J(()=>Boolean,[]);m.Pr.L=olympe.D.J.G;m.Tc.L=olympe.D.J.F;m.toString.L=olympe.D.J.C;m.valueOf.L=olympe.D.J.C;function wb(a){return new olympe.D.jb(new Date(a))}
296
- olympe.D.jb=class{constructor(a){this.yb=a}toJSON(){return'{ "type": "dateTime", "value": "'+this.yb.toJSON()+'" }'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.jb(new Date(b.value.valueOf()))}static now(){return new olympe.D.jb(new Date)}rj(){return this.yb&&!isNaN(this.yb.getTime())?olympe.D.ra.F:olympe.D.ra.C}Ct(){return olympe.D.Ba(this.yb.getMilliseconds())}Et(){return olympe.D.Ba(this.yb.getSeconds())}Dt(){return olympe.D.Ba(this.yb.getMinutes())}Bt(){return olympe.D.Ba(this.yb.getHours())}Fw(){return olympe.D.Ba(this.yb.getDate())}getMonth(){return olympe.D.Ba(this.yb.getMonth()+1)}Ft(){return olympe.D.Ba(this.yb.getFullYear())}getTime(){return this.yb.getTime()}Xy(){var a=
232
+ Ma(a,g);d='';e=0;b=0<=b?b:32;for(f=0;4>f;f++)for(h=a[f],g=0;4>g;g++){if(++e>b)return d;d+=c[h>>8*g+4&15];if(++e>b)return d;d+=c[h>>8*g&15]}return d}'5d41402abc4b2a76b9719d911017c592'!==Na('hello')&&(La=(a,b)=>{const c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535});olympe.X.pb=Na;olympe.X.By=function(a){var b=/^(?:(\S*)@)?([^:]+)(?::(\d{2,5}))?$/;const c=/([^&=]+)=([^&=]+)/g,d=/^true|false$/i,e=/^\d+(\.\d+)?$/;var f=a.match(/^(?:([^:/?#]+):)?(?:\/\/([^/?#]*))?\/?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$/);a=f[1];const g=f[2],h=f[3],k=f[4];f=f[5];let l=null,n=null;var p=null;g&&(p=g.match(b),l=p[1],n=p[2],p=p[3]);b={};let q;for(;q=c.exec(k);){let r=q[2];void 0===r?r=!0:r.startsWith('"')&&r.endsWith('"')?r=r.substring(1,r.length-1):d.test(r)?r='true'===r.toLowerCase():e.test(r)?r=parseFloat(r):
233
+ r=decodeURIComponent(r);b[q[1]]=r}return{scheme:a||null,dD:g||null,rs:l||null,host:n||null,port:p&&parseInt(p,10)||null,path:h&&'/'!==h?h:null,query:k||null,qD:f||null,parameters:b}};olympe.X.JD=function(a){a=a.substring(1);return''===a?new Map:new Map(a.split('&').map(b=>b.split('=')))};olympe.X.MD=function(a){let b='';for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=(b?'&':'?')+c+'='+encodeURIComponent(a[c]));return b};
234
+ olympe.X.Pr=(a,b)=>{const c=Object.keys(a).find(d=>a[d]===b);return void 0===c?null:c};olympe.X.un=(a,b)=>{if(b instanceof Object)for(const c of Object.keys(b)){const d=b[c];d instanceof Object&&void 0!==a[c]?olympe.X.un(a[c],d):a[c]=d}};olympe.X.dn=(a,b,c)=>{const d=Object.create(null);b(a,e=>{olympe.X.un(d,e);b(`conf.d/${a}`,f=>{olympe.X.un(d,f);c(d)})})};olympe.X.aD=class a{constructor(b,c){this.x=b;this.y=c}add(b){return new a(this.x+b.x,this.y+b.y)}Eg(){return Math.sqrt(this.x*this.x+this.y*this.y)}toString(){return`Vector(${this.x}, ${this.y})`}};olympe.X.Az=class{constructor(a,b,c,d){this.from=a;this.target=b;this.C=c;this.F=d}toString(){return`(${this.from.toString()}, ${this.target.toString()}, ${this.C.toString()}, ${this.F.toString()})`}};olympe.X.hu=class{constructor(a,b){this.start=a;this.end=b}};olympe.X.hu.C={Ji:'left',Ti:'right',yz:'bottom',wC:'top'};function Oa(a){a=/([0-9]*)\.([0-9]*)\.([0-9]*)-?([A-z\-_0-9]*)/.exec(a);if(null===a||4>a.length)return olympe.X.Wh.C;const b=Number.parseInt(a[1],10),c=Number.parseInt(a[2],10),d=Number.parseInt(a[3],10);return isNaN(b)||isNaN(c)||isNaN(d)?olympe.X.Wh.C:new olympe.X.Wh(b,c,d,a[4])}function Pa(a){return`${a.C}.${a.F}.${a.G}`}
235
+ olympe.X.Wh=class{constructor(a,b,c,d){this.C=a;this.F=b;this.G=c;this.K=d||null}Sk(a){return this.C!==a.C?this.C>a.C:this.F!==a.F?this.F>a.F:this.G>a.G}Bj(a){return this.C!==a.C?this.C<a.C:this.F!==a.F?this.F<a.F:this.G<a.G}nb(a){return this.C===a.C&&this.F===a.F&&this.G===a.G}toString(){return`${this.C}.${this.F}.${this.G}`+(null!==this.K?`-${this.K}`:'')}};olympe.X.Wh.C=new olympe.X.Wh(Number.NaN,Number.NaN,Number.NaN);olympe.X.R={Ah:'utils.binaryConverter',As:'utils.base64Converter'};olympe.U.config(a=>{va(a,olympe.X.R.Ah);ua(a,olympe.X.R.As,olympe.X.R.Ah,!0)},'Utils services');olympe.U.run([olympe.X.R.Ah],a=>{olympe.X.ei=()=>a});olympe.ta={};olympe.ta.Ob=class{P(){}qa(){}G(){}ba(){}la(){}Fa(){}V(){}$(){}trace(){}debug(){}log(){}info(){}warn(){}error(){}fatal(){}};olympe.ta.Ob.prototype.fatal=olympe.ta.Ob.prototype.fatal;olympe.ta.Ob.prototype.error=olympe.ta.Ob.prototype.error;olympe.ta.Ob.prototype.warn=olympe.ta.Ob.prototype.warn;olympe.ta.Ob.prototype.info=olympe.ta.Ob.prototype.info;olympe.ta.Ob.prototype.log=olympe.ta.Ob.prototype.log;olympe.ta.Ob.prototype.debug=olympe.ta.Ob.prototype.debug;olympe.ta.Ob.prototype.trace=olympe.ta.Ob.prototype.trace;
236
+ olympe.ta.Ob.C={ov:0,hg:1,du:2,wp:3,xv:4,cc:5,et:6,em:7};olympe.ta.Ob.F={0:'TRACE',1:'DEBUG',2:'LOG',3:'INFO',4:'WARN',5:'ERROR',6:'FATAL',7:'NOTHING'};olympe.ta.oa=class{Qc(){}};olympe.ta.rd={};function Qa(a,b,c,d){a.Ka[b](`[OLYMPE.${c}]:`,d.join(' '));if(0<a.K.size){var e=new Date;e=('00'+e.getHours()).substring(-2)+':'+('00'+e.getMinutes()).substring(-2)+':'+('00'+e.getSeconds()).substring(-2)+'.'+('00'+e.getMilliseconds()).substring(-3);for(const f of a.K.values())f(e,c,b,...d)}}
237
+ olympe.ta.rd.Ob=class{constructor(a,b){this.name=a;this.C=b;this.F=a.toUpperCase();this.K=new Map;this.Ka=console}P(){return this.C}qa(){return this.C<=olympe.ta.Ob.C.ov}G(){return this.C<=olympe.ta.Ob.C.hg}la(){return this.C<=olympe.ta.Ob.C.du}ba(){return this.C<=olympe.ta.Ob.C.wp}Fa(){return this.C<=olympe.ta.Ob.C.xv}V(){return this.C<=olympe.ta.Ob.C.cc}$(){return this.C<=olympe.ta.Ob.C.et}trace(...a){this.qa()&&Qa(this,'trace',this.F,a)}debug(...a){this.G()&&Qa(this,'debug',this.F,a)}log(...a){this.la()&&
238
+ Qa(this,'log',this.F,a)}info(...a){this.ba()&&Qa(this,'info',this.F,a)}warn(...a){this.Fa()&&Qa(this,'warn',this.F,a)}error(...a){this.V()&&Qa(this,'error',this.F,a)}fatal(...a){this.$()&&Qa(this,'error',this.F,a)}};olympe.ta.rd.Ob.ma=[olympe.ta.Ob];olympe.ta.rd.oa=class{constructor(a,b,c){this.C=a;this.F=parseInt(b,10);this.G=c;this.channels=new Map;this.N=this.Qc('logging');this.N.info('Logging initialized, global log level is '+olympe.ta.Ob.F[b])}Qc(a){var b=this.channels.get(a);if(!b){b=this.F;var c=`${olympe.ta.Config.Fs}.${a}`;Object.prototype.hasOwnProperty.call(this.C.parameters,c.toLowerCase())&&(b=parseInt(this.C.getParameter(c),10));let d=this.G;c=`${c}.${olympe.ta.Config.$u}`;Object.prototype.hasOwnProperty.call(this.C.parameters,
239
+ c.toLowerCase())&&(d=!0===this.C.getParameter(c));b=new olympe.ta.rd.Ob(a,b,d);this.channels.set(a,b)}return b}};olympe.ta.rd.oa.ma=[olympe.ta.oa];olympe.ta.R={Aa:'logging.Manager'};olympe.ta.Config={Yo:'logging',Zo:'logging.showLogLevel',Fs:'logging',$u:'showLogLevel'};olympe.U.config(function(a){E(a,olympe.ta.Config.Yo,olympe.ta.Ob.C.wp);E(a,olympe.ta.Config.Zo,!0);ta(a,olympe.ta.R.Aa,olympe.ta.rd.oa,olympe.U.R.gg,new olympe.U.fa(olympe.ta.Config.Yo),new olympe.U.fa(olympe.ta.Config.Zo))},'olympe.logging');olympe.U.run([olympe.ta.R.Aa],a=>{olympe.ta.Za=b=>a.Qc(b)},'Logging singleton getter initialization');olympe.D={};olympe.D.Config={Vp:'df.nodeCreationThreshold'};const Ra=[];function Sa(){}function Ta(){}olympe.D.J=class a{constructor(b,c,d){this.C=void 0===b?Sa:b;this.F=void 0===c?Ra:c;this.$=d}static K(){var b=[];return void 0===b||0===b.length?olympe.D.J.ba:new a(Ta,b)}K(){return this.C?this.C():void 0}G(){return this.F?this.F:Ra}P(){return null===this.C&&null===this.F}V(){return this.C===Ta}};olympe.D.J.$=new olympe.D.J;olympe.D.J.C=new olympe.D.J(null,null);olympe.D.J.ba=new olympe.D.J(Ta);olympe.D.J.G=new olympe.D.J(()=>olympe.D.ga);
240
+ olympe.D.J.F=new olympe.D.J(()=>olympe.D.$a);olympe.D.J.P=new olympe.D.J(()=>olympe.D.ra);olympe.D.J.V=new olympe.D.J(()=>olympe.D.ec);olympe.D.Dh=class{Z(){return''}$c(){return''}destroy(){}C(){return!1}$(){return!1}run(a,...b){return a(...b)}F(a){return a}getParent(){return null}ie(){}nh(){}Ld(){}Md(){}Lk(){}Fa(){}onDestroy(){return''}Ng(){}P(){return''}be(){}};olympe.D.Dh.prototype.offDestroy=olympe.D.Dh.prototype.Ng;olympe.D.Dh.prototype.onDestroy=olympe.D.Dh.prototype.onDestroy;let Ua=0;olympe.U.run([new olympe.U.fa(olympe.D.Config.Vp)],()=>{});
241
+ olympe.D.Xb=class{constructor(a='SimpleContext',b){++Ua;this.fb=new Map;this.xb=new Map;this.Wa=new Map;this.uc=0;this.name=a;this.id=String(Ua);this.mc=this.Fb=!1;(this.la=void 0===b?olympe.D.Na():b)&&this.la.Ld(this);this.debug=!1}Z(){return this.id}$c(){return this.name}run(a,...b){if(!this.Fb){var c=olympe.D.ks(this);a=a(...b);c&&olympe.D.ks(c);return a}}F(a){return(...b)=>this.run(a,...b)}destroy(){if(!this.Fb&&!this.mc){this.mc=!0;this.Fa();for(const a of this.xb.keys())this.xb.has(a)&&this.xb.get(a)();
242
+ this.xb.clear();this.Wa.clear();this.la&&(this.la.Md(this,!1),this.la=null);this.Fb=!0;this.mc=!1;this.Fa()}}C(){return this.Fb}$(){return this.mc}Ld(a){if(!this.Fb){var b;olympe.D.ob(a)?b=a.Qa:olympe.D.qn(a)&&(b=a);b&&this.fb.set(b.Z(),b)}}Md(a,b=!0){let c;olympe.D.ob(a)?c=a.Qa:olympe.D.qn(a)&&(c=a);c&&this.fb.has(c.Z())&&(b&&c.Lk(this),this.fb.delete(c.Z()))}Lk(){this.la=null;this.destroy()}Fa(){const a=this.fb;for(const b of a.keys())a.has(b)&&a.get(b).Lk(this);this.fb.clear();for(const b of this.Wa.keys())this.Wa.has(b)&&
243
+ this.Wa.get(b)();this.Wa.clear()}onDestroy(a,b){void 0===b&&(++this.uc,b=String(this.uc));this.xb.set(b,a);return b}Ng(a){this.xb.delete(a)}P(a){if(void 0===b){++this.uc;var b=String(this.uc)}this.Wa.set(b,a);return b}be(a){this.Wa.delete(a)}ie(a){this.la&&this.la.Md(this,!1);(this.la=a||null)&&this.la.Ld(this)}getParent(){return this.la}nh(){return this.fb}};olympe.D.Hq=class extends olympe.D.Xb{constructor(){super('Root',null)}destroy(){}onDestroy(){return''}Ng(){}};olympe.D.Dh.ma=[olympe.D.Dh];let Va=0;
244
+ function Wa(a,b){a.qa||(a.qa=new Map);a.qa.set(b.Z(),b);switch(b.Rd()){case olympe.D.Node.C.Jh:break;case olympe.D.Node.C.Vh:break;case olympe.D.Node.C.gk:case olympe.D.Node.C.jg:olympe.D.N.warn('Not bad as such but should not happen!');break;case olympe.D.Node.C.Eh:Xa(a,olympe.D.Node.C.Eh);break;case olympe.D.Node.C.OBSOLETE:a.qd=!0;a.K!==olympe.D.Node.C.Eh&&Xa(a,olympe.D.Node.C.OBSOLETE);break;case olympe.D.Node.C.ig:olympe.D.N.warn('Adding a destroyed node as upstream => should never happen!');break;
245
+ default:olympe.D.N.warn('Unknown state, investigate: ',b.Rd())}Ya(b,a)}
246
+ function Za(a){if(a.zd){var b=[],c=[];if(a.ag)if(a.ag instanceof olympe.D.Node)if($a(a.ag))b=a.ag.Kb;else return;else b=a.ag;else b=null;if(null!==a.Ka){const e=a.yg;for(let f=0,g=a.Ka.length;f<g;f++)if(null!==e&&-1<e.indexOf(f)){const h=a.Ka[f];if($a(h))c.push(h.Kb);else return}else c.push(a.Ka[f])}if(a.zd instanceof Function)var d=a.zd;else b&&(b[a.zd]||olympe.D.N.warn('looks like you forget a cast somewhere around '+a.zd),d=b[a.zd]);a.run(()=>{a.Fa();if(void 0!==d){const e=d.apply(b,c);e&&e.tr?
247
+ ab(a,e.Qa):e instanceof olympe.D.Node?ab(a,e):(K(a,e),void 0===e&&void 0===a.valueType&&Xa(a,olympe.D.Node.C.Vh))}else bb(a)})}}function L(a){void 0===a.Nc&&(a.Nc=a.valueType===olympe.D.Proxy?cb(void 0,a.de):cb(a.valueType,a.de),a.Nc.Qa=a);return a.Nc}function db(a){void 0!==a.V&&(eb(a.V,a),a.V=void 0)}function fb(a){if(a.K===olympe.D.Node.C.OBSOLETE&&(a.K=olympe.D.Node.C.Vh,null!==a.ba))for(const b of a.ba.values())gb(b)}function Xa(a,b){b!==a.K&&(a.K=b)}
248
+ function hb(a){if(a.K!==olympe.D.Node.C.OBSOLETE&&a.K!==olympe.D.Node.C.gk&&a.K!==olympe.D.Node.C.Jh&&a.K!==olympe.D.Node.C.Eh){Xa(a,olympe.D.Node.C.gk);var b=a.ba;if(b)for(const c of b.values())b.has(c.Z())&&hb(c);Xa(a,olympe.D.Node.C.OBSOLETE)}}function ib(a,b,c){if(a.K!==olympe.D.Node.C.jg)if(b===a.V)K(a,c,!0);else{if(a.K===olympe.D.Node.C.OBSOLETE||a.K===olympe.D.Node.C.gk)a.qd=!0;Za(a)}}
249
+ function K(a,b,c){b instanceof olympe.D.Node&&(olympe.D.N.warn('We are setting the value of a node as a node, that should never happen?'),b=b.Kb);a.fc||c||void 0===a.V||db(a);if(void 0!==b){if((a.fc||a.K===olympe.D.Node.C.Vh||a.K===olympe.D.Node.C.OBSOLETE)&&!olympe.D.ob(b)&&void 0!==a.Kb){if(null===b&&null===a.Kb){fb(a);return}if(null!==b&&null!==a.Kb&&(b.valueOf()===a.Kb.valueOf()||a.Kb.nb&&a.Kb.nb(b))){fb(a);return}}if(!0===a.fc)olympe.D.N.error("Circular dependency detected: updating a downstream node caused this node's (#"+
250
+ a.Z()+') value to get updated !');else{a.K===olympe.D.Node.C.ig&&olympe.D.N.warn(`trying to set a value on a destroyed node (#${a.Z()} ${a.wd?', '+a.wd:''})`);a.K===olympe.D.Node.C.jg&&olympe.D.N.warn(`trying to set a value on a node being destroyed (#${a.Z()} ${a.wd?', '+a.wd:''})`);a.fc=!0;c=b;var d=!1,e=(f,g)=>f instanceof g?!0:!1;void 0===a.valueType||null===c||e(c,a.valueType)||(e=a.valueType&&a.valueType.name?a.valueType.name:'undefined',b='object'===typeof c?b.constructor.name:typeof c,c instanceof
251
+ Object?d=!0:b.toLowerCase()!==e.toLowerCase()&&a.valueType!==Object&&(d=!0),d&&('string'===b.toLowerCase()&&a.valueType===olympe.D.$a?(c=olympe.D.Bb(c),d=!1):'number'===b.toLowerCase()&&a.valueType===olympe.D.ga?(c=olympe.D.Ba(c),d=!1):'boolean'===b.toLowerCase()&&a.valueType===olympe.D.ra&&(c=olympe.D.Ac(c),d=!1)));a.Kb=c;Xa(a,olympe.D.Node.C.Vh);if(b=a.ba){d=0;for(const f of b.values())0<d&&hb(f),d++;for(const f of b.values())ib(f,a,c)}a.fc=!1}}}
252
+ function jb(a,b){if(a.K!==olympe.D.Node.C.jg&&a.K!==olympe.D.Node.C.ig&&(a.K!==olympe.D.Node.C.Jh||a.zd)){var c=void 0!==a.defaultValue;a.zd&&b!==a.V&&a.Fa();if(c)K(a,a.defaultValue,!0);else if(a.Kb=void 0,Xa(a,olympe.D.Node.C.Jh),b=a.ba)for(const d of b.values())jb(d,a)}}function bb(a){if(a.K!==olympe.D.Node.C.Eh){Xa(a,olympe.D.Node.C.Eh);var b=a.ba;if(b)for(const c of b.values())bb(c);a.Fa();void 0!==a.V&&db(a);a.Kb=a.defaultValue}}function $a(a){return a.K===olympe.D.Node.C.Vh}
253
+ function ab(a,b){b===a?olympe.D.N.error('Setting a node as provider of itself. Ignoring'):(a.V&&a.V!==b&&db(a),Ya(b,a),$a(b)?K(a,b.Kb,!0):void 0!==a.defaultValue?K(a,a.defaultValue,!0):jb(a),a.V=b)}function kb(a,b){a.zd&&(a.zd=void 0);a.wd='Repeater';ab(a,b)}function gb(a){a.V?fb(a):null!==a.qa&&0===Array.from(a.qa.values()).filter(b=>!$a(b)).length&&(a.qd&&(a.qd=!1,Za(a)),fb(a))}
254
+ function Ya(a,b){a.ba||(a.ba=new Map);a.ba.set(b.Z(),b);a.K===olympe.D.Node.C.ig&&olympe.D.N.warn('adding a downstream node on a deleted one (#'+a.Z()+') !')}function eb(a,b){a.ba&&(b=b.Z(),a.ba.has(b)&&(a.ba.delete(b),lb(a)))}function lb(a){if(null===a.getParent()){var b=a.ba;b&&0<b.size||a.destroy()}}
255
+ olympe.D.Node=class extends olympe.D.Xb{constructor({valueType:a,zd:b,Ey:c=!0,ag:d,mn:e,debug:f=!1,yg:g=null,wd:h='Node',aj:k}={}){++Va;super(String(Va));this.debug=!!f;this.wd=h;h&&'string'===typeof h||(b?this.wd=b.name?b.name:'anon()':this.wd='Node');this.Ka=e&&0<e.length?e:null;this.yg=g&&0<g.length?g:null;this.valueType=a;this.Kb=void 0;this.fc=!1;this.K=olympe.D.Node.C.Jh;this.qd=!1;this.ba=this.qa=null;this.zd=b;this.ag=d||null;this.defaultValue=this.Nc=this.V=void 0;this.aj=k;d&&d instanceof
256
+ olympe.D.Node&&Wa(this,d);if(g)for(b=0;b<g.length;b++)a=e[g[b]],Wa(this,a);c&&Za(this)}cf(a){this.defaultValue=a;this.K===olympe.D.Node.C.Jh&&K(this,a,!0);return this}dj(a){this.valueType=a}Zb(){return this.valueType||Object}Rd(){return this.K}C(){return this.K===olympe.D.Node.C.ig}$(){return this.K===olympe.D.Node.C.jg}de(...a){if(this.aj instanceof Function)return this.aj(...a);var b=a.length;--b;const c=a[b];--b;const d=a[b],e=Array(b);for(var f=0;f<b;f++)e[f]=a[f];a=this.Rd();a!==olympe.D.Node.C.jg&&
257
+ a!==olympe.D.Node.C.ig||olympe.D.N.warn('Calling a function on a destroyed node!!!',this);a=d.G();b=[];if(1===a.length&&-1===a[0])for(var g of e)olympe.D.ob(g)&&b.push(g.Qa);else for(let h=0,k=a.length;h<k;h++)g=a[h],f=e[g],void 0!==f&&null!==f&&f.Df&&(e[g]=f.Qa,b.push(g));return L(new olympe.D.Node({valueType:d.K(),zd:c,ag:this,mn:e,debug:!1,yg:b,wd:'Proxy.'+c+'()'}))}Lk(a){if(null===this.getParent())olympe.D.N.warn('context is undefined, investigate');else if(this.getParent()!==a){olympe.D.N.warn('Investigate a potential issue in creator-createe link: create node mismatch',
258
+ a,this.getParent());return}this.ie(null);lb(this)}destroy(){var a=this.K;if(a!==olympe.D.Node.C.jg&&a!==olympe.D.Node.C.ig){Xa(this,olympe.D.Node.C.jg);if(a=this.ba){for(const c of a.values())if(a.has(c.Z())){var b=c;b.qa&&b.qa.delete(this.Z());b.V&&b.V.Z()===this.Z()?b.V=void 0:b.destroy()}a.clear()}this.ba=null;super.destroy();if(this.qa){for(const c of this.qa.values())this.qa.has(c.Z())&&eb(c,this);this.qa.clear()}this.qa=null;this.V&&(eb(this.V,this),this.V=void 0);this.Kb=void 0;this.Ka&&(this.Ka.length=
259
+ 0,this.Ka=null);this.yg&&(this.yg.length=0,this.yg=null);this.aj=this.zd=void 0;this.defaultValue=this.ag=null;this.wd=`** Destroyed ** ${this.wd}`;Xa(this,olympe.D.Node.C.ig)}}$c(){return this.wd}};olympe.D.Node.F='rootNode';olympe.D.Node.C={Jh:0,Vh:1,Eh:3,gk:4,OBSOLETE:5,jg:6,ig:7};function cb(a,b){if('function'!==typeof a)return new olympe.D.Proxy(a,b);var c=olympe.D.Proxy.prototype;void 0===a.prototype&&olympe.D.N.error('investigate');c=Object.create(mb(c,a.prototype));c.Gk=a;c.ur=b;return c}function mb(a,b){Object.prototype.hasOwnProperty.call(b,olympe.D.Proxy.mm)||Object.defineProperty(b,olympe.D.Proxy.mm,{enumerable:!1,configurable:!1,writable:!1,value:nb(a,b)});return b[olympe.D.Proxy.mm]}
260
+ function ob(a,b){if(a.Gk!==b){a.Gk=b;b.prototype||olympe.D.N.error('Cast not possible, provided type is not a valid type!');var c=mb(a,b.prototype);Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=c;a.Qa&&a.Qa.dj(b)}}
261
+ function nb(a,b){let c={};if(b.prototype)olympe.D.N.error('first level of prototyping, investigate');else if(b.__proto__)c=Object.create(mb(a,b.__proto__));else return olympe.D.Proxy.prototype;Object.getOwnPropertyNames(b).forEach(d=>{if('function'===typeof b[d]&&'__getReplacementFunction'!==d){var e=b[d].L;null===e||e&&e.P()?c[d]=function(...f){var g=this.Qa;if(g&&$a(g)&&(g=g.Kb)&&g[d]&&'function'===typeof g[d])return g[d].apply(g,f)}:(e=e||b[d].__oSig__||olympe.D.J.$,c[d]=function(...f){f=this.ur.call(this.Qa,
262
+ ...f,e,d);const g=e.$;if(g){const h=this.Qa.Kb;h&&h[g]&&ob(f,h[g])}return e.V()?this:f})}});return c}function pb(a,b){K(a.Qa,b)}function qb(a){jb(a.Qa)}function rb(a){olympe.D.wc([olympe.D.ra.C],b=>{a.Qa.cf(b)},'setDefaultValue');return a}function sb(a,b){kb(a.Qa,olympe.D.Yf(b)?b:b.Qa)}function tb(a,b){olympe.D.ob(b)||olympe.D.Yf(b)?sb(a,b):pb(a,b)}
263
+ olympe.D.Proxy=class{constructor(a,b){this.Qa=null;this.Gk=a;this.ur=b}static ob(a){return!(!a||!a.Df)}nb(a){return olympe.D.Ha([this,a],(b,c)=>b===c,Boolean)}Sd(a){return olympe.D.Ha([this,a],(b,c)=>null===b||null===c?b===c?olympe.D.ra.F:olympe.D.ra.C:b.valueOf()===c.valueOf()?olympe.D.ra.F:olympe.D.ra.C,olympe.D.ra)}tr(){return this.Qa}};olympe.D.Proxy.mm='__opp__';olympe.D.Proxy.prototype.Df=!0;function ub(a,b){a.node.cf(b);return a}olympe.D.Uj=class{constructor(a,b='FlowSource'){this.node=olympe.D.createNode(a,void 0,void 0,void 0,void 0,b)}update(a){olympe.D.ob(a)?K(this.node,olympe.D.Xa(a)):K(this.node,a);return this}repeat(a){kb(this.node,olympe.D.ob(a)?a.Qa:a);return this}clear(){jb(this.node);return this}zb(){return L(this.node)}};function vb(a,b,c=1E3,d,e){const f=olympe.D.Ic(olympe.D.ga),g=d||olympe.D.ga.Eo.Lp;let h,k,l,n;f.update(olympe.D.Ba(a));const p=window.performance.now(),q=b.valueOf();l=q-a.valueOf();if(0!==l&&void 0===n){const r=()=>{f.node.C()||(l=q-a.valueOf(),k=(window.performance.now()-p)/c,1<=k&&(k=1,n=void 0),h=a.valueOf()+l*g(k,0,1,1),f.update(olympe.D.Ba(h)),1===k&&void 0!==e&&e(h),1>k&&(n=window.requestAnimationFrame(r)))};n=window.requestAnimationFrame(r)}return f.zb()}
264
+ olympe.D.ga=class{constructor(a){this.value=void 0===a||null===a?0:a}toJSON(){return'{ "type": "number", "value": '+JSON.stringify(this.value)+' }'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.Ba(b.value)}In(){return'number'===typeof this.value&&!isNaN(this.value)}isNaN(){return olympe.D.Ac(!this.In())}Tc(){return null===this.value||void 0===this.value||void 0===this.value.toString||isNaN(this.value)?olympe.D.Bb(''):olympe.D.Bb(this.value.toString())}toString(a,b){return void 0!==
265
+ this.value&&null!==this.value?'number'===typeof a?this.value.toString(a):'number'===typeof b?this.value.toFixed(b):this.value.toString():'-'}toFixed(a){return this.In()?this.valueOf().toFixed(a):''}static max(a){const b=new Map;let c=-Infinity;const d=olympe.D.Ic(olympe.D.ga,'ONumber.max result'),e=()=>{c=-Infinity;for(const f of b.values())f>c&&(c=f);d.update(olympe.D.Ba(c))};a.forEach((f,g)=>{olympe.D.wc([f],h=>{b.set(g,h.valueOf());e()})},f=>{if(!d.node.C()){var g=b.get(f);b.delete(f);g===c&&e()}});
266
+ return d.zb()}le(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ba(b.valueOf()+c.valueOf()),olympe.D.ga,'ONumber.plus')}vh(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ba(b.valueOf()-c.valueOf()),olympe.D.ga,'ONumber.minus')}round(){return olympe.D.Ba(Math.round(this.valueOf()))}Cj(){return olympe.D.Ba(-this.valueOf())}al(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ba(b.valueOf()*c.valueOf()),olympe.D.ga,'ONumber.mul')}ej(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ba(b.valueOf()/c.valueOf()),
267
+ olympe.D.ga,'ONumber.div')}ay(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ba(b.valueOf()%c.valueOf()),olympe.D.ga,'ONumber.div')}floor(){return olympe.D.Ba(Math.floor(this.valueOf()))}ceil(){return olympe.D.Ba(Math.ceil(this.valueOf()))}trunc(){return olympe.D.Ba(Math.trunc(this.valueOf()))}log(){return olympe.D.Ba(Math.log(this.valueOf()))}pow(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ba(Math.pow(b.valueOf(),c.valueOf())),olympe.D.ga,'ONumber.pow')}exp(){return olympe.D.Ba(Math.exp(this.valueOf()))}Sd(a){return olympe.D.Ha([this,
268
+ a],(b,c)=>olympe.D.Ac(b.nb(c)),olympe.D.ra,'ONumber.oEquals')}nb(a){return this.valueOf()===(void 0!==a&&null!==a?a.valueOf():void 0)}valueOf(){return void 0!==this.value?this.value.valueOf():void 0}gx(){return this.valueOf()}pn(a){return olympe.D.Ha([this,a],(b,c)=>b.valueOf()>c.valueOf()?olympe.D.ra.F:olympe.D.ra.C,olympe.D.ra,'ONumber.isBiggerThan')}Hy(a){return olympe.D.Ha([this,a],(b,c)=>b.valueOf()>=c.valueOf()?b:olympe.D.Ba(c),olympe.D.ga,'ONumber.returnsBiggest')}js(a){return olympe.D.Ha([this,
269
+ a],(b,c)=>b.valueOf()<=c.valueOf()?b:olympe.D.Ba(c),olympe.D.ga,'ONumber.returnsSmallest')}Px(a){return olympe.D.Ha([this,a],(b,c)=>b.valueOf()<c.valueOf()?olympe.D.ra.F:olympe.D.ra.C,olympe.D.ra,'ONumber.isSmallerThan')}sin(){return olympe.D.Ba(Math.sin(this.valueOf()))}cos(){return olympe.D.Ba(Math.cos(this.valueOf()))}atan2(a){return olympe.D.ob(a)?olympe.D.me([a],b=>olympe.D.Ba(Math.atan2(this.valueOf(),b.valueOf())),olympe.D.ga):olympe.D.Ba(Math.atan2(this.valueOf(),a.valueOf()))}abs(){return olympe.D.Ba(Math.abs(this.valueOf()))}uj(a,
270
+ b){return olympe.D.ob(a)||olympe.D.ob(b)?olympe.D.me([a,b],(c,d)=>olympe.D.Ba(this.valueOf()*d.valueOf()+c.valueOf()*(1-d.valueOf())),olympe.D.ga):olympe.D.Ba(this.valueOf()*b.valueOf()+a.valueOf()*(1-b.valueOf()))}static zv(a,b,c,d){'number'===typeof a&&(a=olympe.D.ke(a));'number'===typeof b&&(b=olympe.D.ke(b));'number'===typeof c&&(c=olympe.D.ke(c));let e=0;const f=olympe.D.ke(0);let g,h;void 0!==b&&void 0!==c&&olympe.D.ln(b.pn(c),()=>{olympe.ta.Za('df').warn('You have a min bigger than max, cap your inputs')});
271
+ const k=(l,n)=>{n=olympe.D.ke(n);const p=olympe.D.ga.animate(n,500);sb(f,p);pb(n,olympe.D.Ba(l));e=l};olympe.D.me([a],l=>{e+=l.valueOf();e>h?k(h,e):e<g?k(g,e):sb(f,olympe.D.ke(e))},olympe.D.ga);void 0!==b&&olympe.D.el(b.valueOf(),l=>{if(g!==l&&(g=l,g>e)){const n=olympe.D.ke(e),p=olympe.D.ga.animate(n,400,d);l=olympe.D.Ba(g);K(n.Qa,l);e=g;sb(f,p)}});void 0!==c&&olympe.D.el(c.valueOf(),l=>{if(h!==l&&(h=l,h<e)){const n=olympe.D.ke(e),p=olympe.D.ga.animate(n,400,d);l=olympe.D.Ba(h);K(n.Qa,l);e=h;sb(f,
272
+ p)}});return f}static offset(a){let b;return olympe.D.me([a],c=>{void 0===b&&(b=c);return olympe.D.Ba(c-b)},olympe.D.ga,'offset')}static Ir(a){let b,c,d;return olympe.D.Ha([a],e=>{if(void 0===b)return b=e,c=window.performance.now(),olympe.D.Ba(0);d=window.performance.now();const f=olympe.D.Ba((e.valueOf()-b.valueOf())/(d-c));b=e;c=d;return f},olympe.D.ga,'derivative')}static Kx(a){let b=olympe.D.Ba(0),c,d,e;return olympe.D.Ha([a],f=>{if(void 0===c)return c=f,d=window.performance.now(),olympe.D.Ba(0);
273
+ e=window.performance.now();b=b.le((f.valueOf()+c.valueOf())/2*(e-d));c=f;d=e;return b},olympe.D.ga,'integrate')}static ew(a){let b;return olympe.D.Ha([a],c=>{void 0===b&&(b=c.valueOf());const d=olympe.D.Ba(c.valueOf()-b.valueOf());b=c;return d},olympe.D.ga,'diff')}static Tv(a,b,c){return olympe.D.me([a,b,c],(d,e,f)=>{d='number'===typeof d?d:d.valueOf();e='number'===typeof e?e:e.valueOf();f='number'===typeof f?f:f.valueOf();return olympe.D.Ba(d>=e?d<=f?d:f:e)},olympe.D.ga)}static animate(a,b,c,d){let e;
274
+ return e=olympe.D.Ha([a],f=>{const g=olympe.D.Xa(b,1E3),h=olympe.D.Xa(e);return void 0===h?olympe.D.Ba(f):vb(h,f,g,c,k=>{d&&d(k)})},olympe.D.ga)}static Lv(a,b,c){let d,e,f,g,h,k,l=olympe.D.ke(),n;olympe.D.wc([a],p=>{void 0===d?g=d=p.valueOf():d=g;f=window.performance.now();e=p.valueOf();k=e-d;0!==k&&void 0===n&&(n=setInterval(()=>{k=e-d;h=(window.performance.now()-f)/b;1<=h&&(h=1);g=d+k*c(h,0,1,1);pb(l,olympe.D.Ba(g));1===h&&(clearTimeout(n),n=void 0)},0))});return l}static Tc(a){return olympe.D.ob(a)?
275
+ olympe.D.Ha([a],b=>olympe.D.Bb(b.valueOf().toString()),olympe.D.$a):olympe.D.Bb(a)}static Cj(a){return olympe.D.ob(a)?olympe.D.Ha([a],b=>olympe.D.Ba(-b.valueOf()),olympe.D.ga):olympe.D.Ba(-a.valueOf())}static le(a,b){return olympe.D.ob(a)||olympe.D.ob(b)?olympe.D.Ha([a,b],(c,d)=>olympe.D.Ba(c.valueOf()+d.valueOf()),olympe.D.ga,'plus'):olympe.D.Ba(a.valueOf()+b.valueOf())}static vh(a,b){return olympe.D.ob(a)||olympe.D.ob(b)?olympe.D.me([a,b],(c,d)=>olympe.D.Ba(c.valueOf()-d.valueOf()),olympe.D.ga,
276
+ 'minus'):olympe.D.Ba(a.valueOf()-b.valueOf())}static ej(a,b){return olympe.D.ob(a)||olympe.D.ob(b)?olympe.D.me([a,b],(c,d)=>olympe.D.Ba(c.valueOf()/d.valueOf()),olympe.D.ga,'div'):olympe.D.Ba(a.valueOf()/b.valueOf())}static Cy(a,b){if(void 0===b)return a;olympe.D.wc([b],c=>{c=olympe.D.Ba(a.Qa.Kb.valueOf()+c.valueOf());K(a.Qa,c)},'plusEqual');return a}};olympe.D.ga.ZERO=new olympe.D.ga(0);olympe.D.ga.ONE=new olympe.D.ga(1);olympe.D.ga.qv=new olympe.D.ga(2);olympe.D.ga.PI=new olympe.D.ga(Math.PI);
277
+ olympe.D.ga.vt=new olympe.D.ga(Infinity);olympe.D.ga.ou=new olympe.D.ga(-Infinity);olympe.D.ga.Up=new olympe.D.ga(NaN);olympe.D.ga.hB=olympe.D.ga.Cy;olympe.D.ga.nz=olympe.D.ga.zv;olympe.D.ga.YA=olympe.D.ga.offset;olympe.D.ga.Rz=olympe.D.ga.Ir;olympe.D.ga.kD=olympe.D.ga.Ir;olympe.D.ga.IA=olympe.D.ga.Kx;olympe.D.ga.Sz=olympe.D.ga.ew;olympe.D.ga.Ez=olympe.D.ga.Tv;olympe.D.ga.oz=olympe.D.ga.animate;olympe.D.ga.pz=olympe.D.ga.Lv;olympe.D.ga.xC=olympe.D.ga.Tc;olympe.D.ga.yC=olympe.D.ga.Cj;
278
+ olympe.D.ga.gB=olympe.D.ga.le;olympe.D.ga.TA=olympe.D.ga.vh;olympe.D.ga.Tz=olympe.D.ga.ej;
279
+ olympe.D.ga.Eo={Lp:function(a,b,c,d){return c*a/d+b},lA:function(a,b,c,d){a/=d;return c*a*a+b},vA:function(a,b,c,d){a/=d;return-c*a*(a-2)+b},hA:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a+b;a--;return-c/2*(a*(a-2)-1)+b},aA:function(a,b,c,d){a/=d;return c*a*a*a+b},rA:function(a,b,c,d){a/=d;a--;return c*(a*a*a+1)+b},fA:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a+b;a-=2;return c/2*(a*a*a+2)+b},mA:function(a,b,c,d){a/=d;return c*a*a*a*a+b},wA:function(a,b,c,d){a/=d;a--;return-c*(a*a*a*a-1)+b},
280
+ iA:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a*a+b;a-=2;return-c/2*(a*a*a*a-2)+b},nA:function(a,b,c,d){a/=d;return c*a*a*a*a*a+b},xA:function(a,b,c,d){a/=d;a--;return c*(a*a*a*a*a+1)+b},jA:function(a,b,c,d){a/=d/2;if(1>a)return c/2*a*a*a*a*a+b;a-=2;return c/2*(a*a*a*a*a+2)+b},oA:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},yA:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},kA:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},dA:function(a,b,c,d){return c*Math.pow(2,
281
+ 10*(a/d-1))+b},uA:function(a,b,c,d){return c*(-Math.pow(2,-10*a/d)+1)+b},gA:function(a,b,c,d){a/=d/2;if(1>a)return c/2*Math.pow(2,10*(a-1))+b;a--;return c/2*(-Math.pow(2,-10*a)+2)+b},$z:function(a,b,c,d){a/=d;return-c*(Math.sqrt(1-a*a)-1)+b},qA:function(a,b,c,d){a/=d;a--;return c*Math.sqrt(1-a*a)+b},eA:function(a,b,c,d){a/=d/2;if(1>a)return-c/2*(Math.sqrt(1-a*a)-1)+b;a-=2;return c/2*(Math.sqrt(1-a*a)+1)+b},Vz:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-3*d)},Wz:function(a,b,c,d){d=(a/=d)*a;return b+
282
+ c*(2*d*d+2*d*a+-3*d)},Xz:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-9*d+6*a)},Yz:function(a,b,c,d){d=(a/=d)*a;return b+c*(-2*d*d+10*d*a+-15*d+8*a)},tA:function(a,b,c,d){d=(a/=d)*a;const e=d*a;return b+c*(33*e*d+-106*d*d+126*e+-67*d+15*a)},sA:function(a,b,c,d){d=(a/=d)*a;const e=d*a;return b+c*(56*e*d+-175*d*d+200*e+-100*d+20*a)},cA:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(33*a*d+-59*d*d+32*a+-5*d)},bA:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(56*a*d+-105*d*d+60*a+-10*d)},pA:function(a,
283
+ b,c,d){return(a/=d)<1/2.75?7.5625*c*a*a+b:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75)+b:a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375)+b:c*(7.5625*(a-=2.625/2.75)*a+.984375)+b},Zz:function(a,b,c,d){a=d-a;d=(a/=d)<1/2.75?7.5625*c*a*a:a<2/2.75?c*(7.5625*(a-=1.5/2.75)*a+.75):a<2.5/2.75?c*(7.5625*(a-=2.25/2.75)*a+.9375):c*(7.5625*(a-=2.625/2.75)*a+.984375);return c-d+b}};m=olympe.D.ga.prototype;m.toJSON.L=olympe.D.J.C;m.In.L=olympe.D.J.C;m.isNaN.L=olympe.D.J.P;m.Tc.L=olympe.D.J.F;
284
+ m.toString.L=new olympe.D.J(()=>String,[]);m.toFixed.L=new olympe.D.J(()=>String,[]);m.le.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.vh.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.round.L=olympe.D.J.G;m.Cj.L=olympe.D.J.G;m.al.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.ej.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.ay.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.floor.L=olympe.D.J.G;m.ceil.L=olympe.D.J.G;m.trunc.L=olympe.D.J.G;m.log.L=olympe.D.J.G;m.pow.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.exp.L=olympe.D.J.G;
285
+ m.Sd.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.nb.L=olympe.D.J.C;m.valueOf.L=olympe.D.J.C;m.gx.L=olympe.D.J.C;m.pn.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.Hy.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.js.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.Px.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.sin.L=olympe.D.J.G;m.cos.L=olympe.D.J.G;m.atan2.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.abs.L=olympe.D.J.G;m.uj.L=new olympe.D.J(()=>olympe.D.ga,[0,1]);olympe.D.$a=class{constructor(a){this.value=a}toJSON(){return'{ "type": "string", "value": '+JSON.stringify(this.value)+' }'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return olympe.D.Bb(b.value)}Dr(a){return olympe.D.$a.concat(this,'.',a)}concat(...a){let b;Array.isArray(a[0])?b=a[0]:b=a;return olympe.D.Ha([this,...b],(...c)=>{let d='';for(let e=0,f=c.length;e<f;e++)d=c[e]?d+c[e].valueOf():d+c[e];return olympe.D.Bb(d)},olympe.D.$a,'OString.concat')}Tc(){return this}fz(a){return olympe.D.Ba(parseInt(this.value,
286
+ a))}ps(){return olympe.D.Ba(parseFloat(this.value))}toString(){return this.value}valueOf(){return this.value.valueOf()}nb(a){return this.value===(void 0===a||null===a?void 0:a.valueOf())}Sd(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ac(c&&b.valueOf()===c.valueOf()),olympe.D.ra,'OString.oEquals')}Wf(){return olympe.D.Ac(!this.value||0===this.value.length)}contains(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ac((c instanceof olympe.D.$a||'string'===typeof c)&&b.valueOf().includes(c.valueOf())),
287
+ olympe.D.ra,'OString.contains')}startsWith(a,b){return olympe.D.Ha([this,a,b||0],(c,d,e)=>olympe.D.Ac(c.valueOf().startsWith(d.valueOf(),e.valueOf())),olympe.D.ra,'OString.startsWith')}endsWith(a,b){return olympe.D.Ha([this,a,b||-1],(c,d,e)=>{e=0<=e.valueOf()?e.valueOf():this.Eg().valueOf()+e.valueOf()+1;return olympe.D.Ac(c.valueOf().endsWith(d.valueOf(),e))},olympe.D.ra,'OString.endsWith')}indexOf(a,b){return olympe.D.Ha([this,a,b||0],(c,d,e)=>olympe.D.Ba(c.valueOf().indexOf(d.valueOf(),e.valueOf())),
288
+ olympe.D.ga,'OString.indexOf')}lastIndexOf(a,b){return olympe.D.Ha([this,a,b||Infinity],(c,d,e)=>olympe.D.Ba(c.valueOf().lastIndexOf(d.valueOf(),e.valueOf())),olympe.D.ga,'OString.lastIndexOf')}slice(a,b){return olympe.D.Ha([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().slice(d.valueOf(),e?e.valueOf():void 0)),olympe.D.$a,'OString.slice')}Eg(){return olympe.D.Ba(this.value.length)}threshold(a){return olympe.D.Ha([this,a],(b,c)=>b.valueOf().length>=c.valueOf()?b:olympe.D.$a.EMPTY,olympe.D.$a,'OString.threshold')}toLowerCase(){return olympe.D.Bb(this.value.toLowerCase())}toUpperCase(){return olympe.D.Bb(this.value.toUpperCase())}trim(){return olympe.D.Bb(this.value.trim())}padStart(a,
289
+ b){return olympe.D.Ha([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().padStart(d.valueOf(),e.valueOf())),olympe.D.$a,'OString.padStart')}padEnd(a,b){return olympe.D.Ha([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().padEnd(d.valueOf(),e.valueOf())),olympe.D.$a,'OString.padEnd')}replace(a,b){return olympe.D.Ha([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().replace(d.valueOf(),e.valueOf())),olympe.D.$a,'OString.replace')}bz(a,b){return olympe.D.Ha([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().substr(d.valueOf(),
290
+ e.valueOf())),olympe.D.$a,'OString.subOStr')}static concat(...a){return olympe.D.Bb('').concat(...a)}};olympe.D.$a.EMPTY=new olympe.D.$a('');olympe.D.$a.av=new olympe.D.$a(' ');m=olympe.D.$a.prototype;m.toJSON.L=olympe.D.J.C;m.Dr.L=new olympe.D.J(()=>olympe.D.$a,[0,1]);m.concat.L=olympe.D.J.F;m.Tc.L=olympe.D.J.F;m.fz.L=olympe.D.J.G;m.ps.L=olympe.D.J.G;m.toString.L=olympe.D.J.C;m.valueOf.L=olympe.D.J.C;m.nb.L=olympe.D.J.C;m.Sd.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.Wf.L=olympe.D.J.P;
291
+ m.contains.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.startsWith.L=new olympe.D.J(()=>olympe.D.ra,[0,1]);m.endsWith.L=new olympe.D.J(()=>olympe.D.ra,[0,1]);m.indexOf.L=new olympe.D.J(()=>olympe.D.ga,[0,1]);m.lastIndexOf.L=new olympe.D.J(()=>olympe.D.ga,[0,1]);m.slice.L=new olympe.D.J(()=>olympe.D.$a,[0,1]);m.Eg.L=olympe.D.J.G;m.threshold.L=new olympe.D.J(()=>olympe.D.$a,[0]);m.toLowerCase.L=olympe.D.J.F;m.toUpperCase.L=olympe.D.J.F;m.trim.L=olympe.D.J.F;m.padStart.L=olympe.D.J.F;m.padEnd.L=olympe.D.J.F;
292
+ m.replace.L=olympe.D.J.F;m.bz.L=olympe.D.J.F;olympe.D.ra=class{constructor(a){this.value=a}toJSON(){return`{ "type": "boolean", "value": ${this.value.valueOf()}}`}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return b.value?olympe.D.ra.F:olympe.D.ra.C}and(a){if(void 0!==a)return olympe.D.ob(a)?olympe.D.me([a],b=>new olympe.D.ra(this.valueOf()&&b.valueOf()),olympe.D.ra,'and'):this.value&&a.valueOf()?olympe.D.ra.F:olympe.D.ra.C}nb(a){return this.valueOf()===(void 0!==a?a.valueOf():void 0)}Sd(a){if(void 0!==a)return olympe.D.ob(a)?
293
+ olympe.D.me([a],b=>new olympe.D.ra(this.valueOf()===b.valueOf()),olympe.D.ra,'oEquals'):this.nb(a)?olympe.D.ra.F:olympe.D.ra.C}not(){return this.value?olympe.D.ra.C:olympe.D.ra.F}Kv(a){if(void 0!==a)return olympe.D.ob(a)?olympe.D.me([a],b=>new olympe.D.ra(!(this.valueOf()&&b.valueOf())),olympe.D.ra,'andNot'):this.value&&!a.valueOf()?olympe.D.ra.F:olympe.D.ra.C}or(a){if(void 0!==a)return olympe.D.ob(a)?olympe.D.me([a],b=>new olympe.D.ra(this.valueOf()||b.valueOf()),olympe.D.ra,'or'):this.value||a.valueOf()?
294
+ olympe.D.ra.F:olympe.D.ra.C}xor(a){return olympe.D.Ha([this,a],(b,c)=>{b=b.valueOf();c=c.valueOf();return olympe.D.Ac(b&&!c||!b&&c)},olympe.D.ra,'OBoolean.xor')}uw(){return this.value}Qr(){return!0===this.value?olympe.D.ga.ONE:olympe.D.ga.ZERO}Tc(){return olympe.D.Bb(this.toString())}toString(){return this.value?'true':'false'}valueOf(){return this.value}};olympe.D.ra.F=new olympe.D.ra(!0);olympe.D.ra.C=new olympe.D.ra(!1);m=olympe.D.ra.prototype;m.toJSON.L=olympe.D.J.C;
295
+ m.and.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.nb.L=olympe.D.J.C;m.Sd.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.not.L=olympe.D.J.P;m.Kv.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.or.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.xor.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.uw.L=new olympe.D.J(()=>Boolean,[]);m.Qr.L=olympe.D.J.G;m.Tc.L=olympe.D.J.F;m.toString.L=olympe.D.J.C;m.valueOf.L=olympe.D.J.C;function wb(a){return new olympe.D.jb(new Date(a))}
296
+ olympe.D.jb=class{constructor(a){this.yb=a}toJSON(){return'{ "type": "dateTime", "value": "'+this.yb.toJSON()+'" }'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.jb(new Date(b.value.valueOf()))}static now(){return new olympe.D.jb(new Date)}sj(){return this.yb&&!isNaN(this.yb.getTime())?olympe.D.ra.F:olympe.D.ra.C}Dt(){return olympe.D.Ba(this.yb.getMilliseconds())}Ft(){return olympe.D.Ba(this.yb.getSeconds())}Et(){return olympe.D.Ba(this.yb.getMinutes())}Ct(){return olympe.D.Ba(this.yb.getHours())}Hw(){return olympe.D.Ba(this.yb.getDate())}getMonth(){return olympe.D.Ba(this.yb.getMonth()+1)}Gt(){return olympe.D.Ba(this.yb.getFullYear())}getTime(){return this.yb.getTime()}Zy(){var a=
297
297
  olympe.D,b=a.Bb;var c=this.yb.getDate();c=10>c?'0'+c:c;var d=this.yb.getMonth()+1;return b.call(a,`${c}.${10>d?'0'+d:d}.${this.yb.getFullYear()}`)}toLocaleString(a){return void 0===a||'string'===typeof a?olympe.D.Bb(this.yb.toLocaleString(a)):olympe.D.Ha([this,a],(b,c)=>olympe.D.Bb(b.yb.toLocaleString(c.valueOf())),olympe.D.$a)}toLocaleDateString(a){return void 0===a||'string'===typeof a?olympe.D.Bb(this.yb.toLocaleDateString(a)):olympe.D.Ha([this,a],(b,c)=>olympe.D.Bb(b.yb.toLocaleDateString(c.valueOf())),
298
- olympe.D.$a)}toLocaleTimeString(a){return void 0===a||'string'===typeof a?olympe.D.Bb(this.yb.toLocaleTimeString(a)):olympe.D.Ha([this,a],(b,c)=>olympe.D.Bb(b.yb.toLocaleTimeString(c.valueOf())),olympe.D.$a)}Tc(){return olympe.D.Bb(this.yb.toISOString())}ms(){return new Date(this.getTime())}cz(){return this}ez(){return this}qg(a,b){return olympe.D.Ha([b],c=>{const d=new olympe.D.jb(new Date(this.yb.getTime()));d.yb['set'+a](this.yb['get'+a]()+c.valueOf());return d},olympe.D.jb)}Bv(a){return this.qg('Milliseconds',
299
- a)}Gv(a){return this.qg('Seconds',a)}Cv(a){return this.qg('Minutes',a)}Av(a){return this.qg('Hours',a)}Lm(a){return this.qg('Date',a)}Hv(a){return'number'===typeof a?this.Lm(7*a):this.Lm(a.$k(7))}Dv(a){return this.qg('Month',a)}Iv(a){return this.qg('FullYear',a)}Yy(){let a=this.yb.getDay();a=0===a?6:a-1;return new olympe.D.jb(new Date(this.yb.getFullYear(),this.yb.getMonth(),this.yb.getDate()-a))}Zy(){return new olympe.D.jb(new Date(this.yb.getFullYear(),this.yb.getMonth()))}Td(a){return olympe.D.Ha([a],
300
- b=>olympe.D.Ac(this.nb(b)),olympe.D.ra)}nb(a){return a instanceof olympe.D.jb?this.getTime()===a.getTime()||isNaN(this.getTime())&&isNaN(a.getTime()):!1}Vw(){let a=this.yb.getDay();0===a&&(a=7);return olympe.D.Ba(a)}Jw(a,b){return olympe.D.Ha([a,b],(c,d)=>{d=d.valueOf();'years'===d?c=this.yb.getFullYear()-c.yb.getFullYear():'months'===d?c=12*(this.yb.getFullYear()-c.yb.getFullYear())+(this.yb.getMonth()-c.yb.getMonth()):(d={milliseconds:1,seconds:1E3,minutes:6E4,hours:36E5,days:864E5,weeks:6048E5}[d],
301
- void 0===d&&(olympe.ta.Za('df').warn("[getDiff] '_unit' is not a valid unit! Defaulting to milliseconds"),d=1),c=Math.trunc((this.yb.getTime()-c.yb.getTime())/d));return olympe.D.Ba(c)},olympe.D.ga)}Lx(a){return olympe.D.Ha([a],b=>olympe.D.Ac(this.getTime()<b.getTime()),olympe.D.ra)}Jx(a){return olympe.D.Ha([a],b=>olympe.D.Ac(this.getTime()>b.getTime()),olympe.D.ra)}Mx(a,b){return olympe.D.Ha([a,b],(c,d)=>olympe.D.Ac(this.getTime()>c.getTime()&&this.getTime()<d.getTime()),olympe.D.ra)}valueOf(){return this.rj().valueOf()?
302
- new Date(this.getTime()):new Date(0)}};olympe.D.jb.C=wb(0);olympe.D.jb.F=wb(Number.NaN);m=olympe.D.jb.prototype;m.rj.L=olympe.D.J.P;m.Ct.L=olympe.D.J.G;m.Et.L=olympe.D.J.G;m.Dt.L=olympe.D.J.G;m.Bt.L=olympe.D.J.G;m.Fw.L=olympe.D.J.G;m.getMonth.L=olympe.D.J.G;m.Ft.L=olympe.D.J.G;m.getTime.L=olympe.D.J.C;m.Xy.L=new olympe.D.J(()=>olympe.D.$a,[0]);m.toLocaleString.L=olympe.D.J.F;m.toLocaleDateString.L=olympe.D.J.F;m.toLocaleTimeString.L=olympe.D.J.F;m.Tc.L=olympe.D.J.F;m.ms.L=olympe.D.J.C;
303
- m.cz.L=new olympe.D.J(()=>olympe.D.jb,[]);m.ez.L=new olympe.D.J(()=>olympe.D.jb,[]);m.qg.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Bv.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Gv.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Cv.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Av.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Lm.L=new olympe.D.J(()=>olympe.D.jb,[0]);m.Hv.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Dv.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Iv.L=new olympe.D.J(()=>olympe.D.jb,[0]);
304
- m.Yy.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Zy.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Td.L=olympe.D.J.P;m.nb.L=olympe.D.J.C;m.Vw.L=olympe.D.J.G;m.Jw.L=new olympe.D.J(()=>olympe.D.ga,[0,1]);m.Lx.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.Jx.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.Mx.L=new olympe.D.J(()=>olympe.D.ra,[0,1]);m.valueOf.L=olympe.D.J.C;const xb=new Map,yb=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,zb=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;function Ab(a){const b=c=>{let d;c=c.valueOf();6>c.length?(d=17,c=zb.exec(c)):(d=1,c=yb.exec(c));c=c?c.slice(1).map(e=>parseInt(e,16)*d):[0,0,0];return olympe.D.Color.create(c[0],c[1],c[2],isNaN(c[3])?1:c[3]/255)};return olympe.D.ag(a)?olympe.D.me([a],b,olympe.D.Color):b(a)}
298
+ olympe.D.$a)}toLocaleTimeString(a){return void 0===a||'string'===typeof a?olympe.D.Bb(this.yb.toLocaleTimeString(a)):olympe.D.Ha([this,a],(b,c)=>olympe.D.Bb(b.yb.toLocaleTimeString(c.valueOf())),olympe.D.$a)}Tc(){return olympe.D.Bb(this.yb.toISOString())}ns(){return new Date(this.getTime())}ez(){return this}gz(){return this}ng(a,b){return olympe.D.Ha([b],c=>{const d=new olympe.D.jb(new Date(this.yb.getTime()));d.yb['set'+a](this.yb['get'+a]()+c.valueOf());return d},olympe.D.jb)}Cv(a){return this.ng('Milliseconds',
299
+ a)}Hv(a){return this.ng('Seconds',a)}Dv(a){return this.ng('Minutes',a)}Bv(a){return this.ng('Hours',a)}Mm(a){return this.ng('Date',a)}Iv(a){return'number'===typeof a?this.Mm(7*a):this.Mm(a.al(7))}Ev(a){return this.ng('Month',a)}Jv(a){return this.ng('FullYear',a)}$y(){let a=this.yb.getDay();a=0===a?6:a-1;return new olympe.D.jb(new Date(this.yb.getFullYear(),this.yb.getMonth(),this.yb.getDate()-a))}az(){return new olympe.D.jb(new Date(this.yb.getFullYear(),this.yb.getMonth()))}Sd(a){return olympe.D.Ha([a],
300
+ b=>olympe.D.Ac(this.nb(b)),olympe.D.ra)}nb(a){return a instanceof olympe.D.jb?this.getTime()===a.getTime()||isNaN(this.getTime())&&isNaN(a.getTime()):!1}Xw(){let a=this.yb.getDay();0===a&&(a=7);return olympe.D.Ba(a)}Lw(a,b){return olympe.D.Ha([a,b],(c,d)=>{d=d.valueOf();'years'===d?c=this.yb.getFullYear()-c.yb.getFullYear():'months'===d?c=12*(this.yb.getFullYear()-c.yb.getFullYear())+(this.yb.getMonth()-c.yb.getMonth()):(d={milliseconds:1,seconds:1E3,minutes:6E4,hours:36E5,days:864E5,weeks:6048E5}[d],
301
+ void 0===d&&(olympe.ta.Za('df').warn("[getDiff] '_unit' is not a valid unit! Defaulting to milliseconds"),d=1),c=Math.trunc((this.yb.getTime()-c.yb.getTime())/d));return olympe.D.Ba(c)},olympe.D.ga)}Nx(a){return olympe.D.Ha([a],b=>olympe.D.Ac(this.getTime()<b.getTime()),olympe.D.ra)}Lx(a){return olympe.D.Ha([a],b=>olympe.D.Ac(this.getTime()>b.getTime()),olympe.D.ra)}Ox(a,b){return olympe.D.Ha([a,b],(c,d)=>olympe.D.Ac(this.getTime()>c.getTime()&&this.getTime()<d.getTime()),olympe.D.ra)}valueOf(){return this.sj().valueOf()?
302
+ new Date(this.getTime()):new Date(0)}};olympe.D.jb.C=wb(0);olympe.D.jb.F=wb(Number.NaN);m=olympe.D.jb.prototype;m.sj.L=olympe.D.J.P;m.Dt.L=olympe.D.J.G;m.Ft.L=olympe.D.J.G;m.Et.L=olympe.D.J.G;m.Ct.L=olympe.D.J.G;m.Hw.L=olympe.D.J.G;m.getMonth.L=olympe.D.J.G;m.Gt.L=olympe.D.J.G;m.getTime.L=olympe.D.J.C;m.Zy.L=new olympe.D.J(()=>olympe.D.$a,[0]);m.toLocaleString.L=olympe.D.J.F;m.toLocaleDateString.L=olympe.D.J.F;m.toLocaleTimeString.L=olympe.D.J.F;m.Tc.L=olympe.D.J.F;m.ns.L=olympe.D.J.C;
303
+ m.ez.L=new olympe.D.J(()=>olympe.D.jb,[]);m.gz.L=new olympe.D.J(()=>olympe.D.jb,[]);m.ng.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Cv.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Hv.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Dv.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Bv.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Mm.L=new olympe.D.J(()=>olympe.D.jb,[0]);m.Iv.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Ev.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Jv.L=new olympe.D.J(()=>olympe.D.jb,[0]);
304
+ m.$y.L=new olympe.D.J(()=>olympe.D.jb,[]);m.az.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Sd.L=olympe.D.J.P;m.nb.L=olympe.D.J.C;m.Xw.L=olympe.D.J.G;m.Lw.L=new olympe.D.J(()=>olympe.D.ga,[0,1]);m.Nx.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.Lx.L=new olympe.D.J(()=>olympe.D.ra,[0]);m.Ox.L=new olympe.D.J(()=>olympe.D.ra,[0,1]);m.valueOf.L=olympe.D.J.C;const xb=new Map,yb=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,zb=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;function Ab(a){const b=c=>{let d;c=c.valueOf();6>c.length?(d=17,c=zb.exec(c)):(d=1,c=yb.exec(c));c=c?c.slice(1).map(e=>parseInt(e,16)*d):[0,0,0];return olympe.D.Color.create(c[0],c[1],c[2],isNaN(c[3])?1:c[3]/255)};return olympe.D.Zf(a)?olympe.D.me([a],b,olympe.D.Color):b(a)}
305
305
  olympe.D.Color=class{constructor(a,b,c,d){this.C=olympe.D.Ba(void 0!==a?Math.min(255,Math.max(0,Math.round(a))):0);this.F=olympe.D.Ba(void 0!==b?Math.min(255,Math.max(0,Math.round(b))):0);this.b=olympe.D.Ba(void 0!==c?Math.min(255,Math.max(0,Math.round(c))):0);this.a=olympe.D.Ba(void 0!==d?Math.min(1,Math.max(0,d)):1)}toJSON(){return`{ "type": "color", "r": ${this.C.valueOf()}, "g": ${this.F.valueOf()}, "b": ${this.b.valueOf()}, "a": ${this.a.valueOf()} }`}static nc(a){let b;'string'===typeof a?b=
306
306
  JSON.parse(a):b=a;return olympe.D.Color.create(b.r,b.g,b.b,b.a)}static create(a,b,c,d=1){return olympe.D.Ha([a,b,c,d],(e,f,g,h)=>{e=olympe.D.Ba(void 0!==e?Math.min(255,Math.max(0,Math.round(e.valueOf()))):0);f=olympe.D.Ba(void 0!==f?Math.min(255,Math.max(0,Math.round(f.valueOf()))):0);g=olympe.D.Ba(void 0!==g?Math.min(255,Math.max(0,Math.round(g.valueOf()))):0);h=olympe.D.Ba(void 0!==h?Math.min(1,Math.max(0,h.valueOf())):1);for(let k of xb.values())if(k&&k.C.nb(e)&&k.F.nb(f)&&k.b.nb(g)&&k.a.nb(h))return k;
307
- return new olympe.D.Color(e,f,g,h)},olympe.D.Color)}Wf(){return this.C}Lf(){return this.b}Qf(){return this.F}Kf(){return this.a}Qv(a,b){return olympe.D.Color.create(this.C.tj(a.Wf(),b),this.F.tj(a.Qf(),b),this.b.tj(a.Lf(),b),this.a.tj(a.Kf(),b))}lw(a){return olympe.D.Color.create(this.C,this.F,this.b,a)}ps(){return`rgba(${this.C},${this.F},${this.b},${this.a})`}Fn(){const a=(16777216|this.b|this.F<<8|this.C<<16).toString(16).slice(1),b=1===this.a.valueOf()?'':(256|255*this.a).toString(16).slice(1);
308
- return'#'+(a+b).toUpperCase()}toString(){return this.Fn()}nb(a){return a instanceof olympe.D.Color?this.C.valueOf()===a.C.valueOf()&&this.F.valueOf()===a.F.valueOf()&&this.b.valueOf()===a.b.valueOf()&&this.a.valueOf()===a.a.valueOf():!1}};olympe.D.Color.prototype.equals=olympe.D.Color.prototype.nb;olympe.D.Color.prototype.toHexString=olympe.D.Color.prototype.Fn;olympe.D.Color.prototype.toRGBString=olympe.D.Color.prototype.ps;olympe.D.Color.prototype.getAlpha=olympe.D.Color.prototype.Kf;
309
- olympe.D.Color.prototype.getGreen=olympe.D.Color.prototype.Qf;olympe.D.Color.prototype.getBlue=olympe.D.Color.prototype.Lf;olympe.D.Color.prototype.getRed=olympe.D.Color.prototype.Wf;olympe.D.Color.create=olympe.D.Color.create;m=olympe.D.Color.prototype;m.toJSON.L=olympe.D.J.C;m.Wf.L=olympe.D.J.G;m.Lf.L=olympe.D.J.G;m.Qf.L=olympe.D.J.G;m.Kf.L=olympe.D.J.G;m.Qv.L=new olympe.D.J(()=>olympe.D.Color,[]);m.lw.L=new olympe.D.J(()=>olympe.D.Color,[]);m.ps.L=new olympe.D.J(()=>String,[]);
310
- m.Fn.L=new olympe.D.J(()=>String,[]);m.nb.L=olympe.D.J.C;olympe.D.File=class{na(){}Ap(){}Tl(){}hn(){}Nk(){}dn(){}Ok(){}rename(){}};olympe.D.ec=class{constructor(a,b){this.x=olympe.D.ke(a);this.y=olympe.D.ke(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.D.Xa(this.x).valueOf())+', "y": '+JSON.stringify(olympe.D.Xa(this.y).valueOf())+' }'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.ec(b.x,b.y)}Fx(){return this.x}Vy(a){tb(this.x,a)}Gx(){return this.y}Wy(a){tb(this.y,a)}ux(){return this.x.hs(this.y)}le(a){return olympe.D.Ha([this,a],(b,c)=>new olympe.D.ec(b.x.le(c.x),b.y.le(c.y)),
311
- olympe.D.ec,'Vector2.plus')}vh(a){return olympe.D.Ha([this,a],(b,c)=>new olympe.D.ec(b.x.vh(c.x),b.y.vh(c.y)),olympe.D.ec,'Vector2.minus')}by(a){return new olympe.D.ec(this.x.$k(a),this.y.$k(a))}gw(a){return new olympe.D.ec(this.x.dj(a),this.y.dj(a))}gy(){return new olympe.D.ec(this.x.Bj(),this.y.Bj())}hw(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ha([b.x,b.y,c.x,c.y],(d,e,f,g)=>olympe.D.Ba(d*f+e*g),olympe.D.ga),olympe.D.ga)}length(){return olympe.D.Ha([this.x,this.y],(a,b)=>olympe.D.Ba(Math.sqrt(a*
312
- a+b*b)),olympe.D.ga)}normalize(){return olympe.D.Ha([this.x,this.y],(a,b)=>{const c=Math.sqrt(a*a+b*b);return new olympe.D.ec(a/c,b/c)},olympe.D.ec)}floor(){return olympe.D.Ha([this.x,this.y],(a,b)=>new olympe.D.ec(Math.floor(a),Math.floor(b)),olympe.D.ec)}ceil(){return olympe.D.Ha([this.x,this.y],(a,b)=>new olympe.D.ec(Math.ceil(a),Math.ceil(b)),olympe.D.ec)}round(){return olympe.D.Ha([this.x,this.y],(a,b)=>new olympe.D.ec(Math.round(a),Math.round(b)),olympe.D.ec)}Ev(a){return new olympe.D.ec(this.x.le(a),
313
- this.y.le(a))}Fv(a,b){return new olympe.D.ec(this.x.le(a),this.y.le(b))}Tc(){return olympe.D.Ha([this.x,this.y],(a,b)=>olympe.D.Bb(`Vector2[${a.valueOf()}, ${b.valueOf()}]`),olympe.D.$a)}toString(){return`Vector2[${this.x.Qa.Kb}, ${this.y.Qa.Kb}]`}nb(a){return this===a?!0:!1}};m=olympe.D.ec.prototype;m.toJSON.L=olympe.D.J.C;m.Fx.L=olympe.D.J.G;m.Vy.L=olympe.D.J.C;m.Gx.L=olympe.D.J.G;m.Wy.L=olympe.D.J.C;m.ux.L=olympe.D.J.G;m.le.L=new olympe.D.J(()=>olympe.D.ec,[0]);
314
- m.vh.L=new olympe.D.J(()=>olympe.D.ec,[0]);m.by.L=olympe.D.J.V;m.gw.L=olympe.D.J.V;m.gy.L=olympe.D.J.V;m.hw.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.length.L=olympe.D.J.G;m.normalize.L=olympe.D.J.V;m.floor.L=olympe.D.J.V;m.ceil.L=olympe.D.J.V;m.round.L=olympe.D.J.V;m.Ev.L=olympe.D.J.V;m.Fv.L=olympe.D.J.V;m.Tc.L=olympe.D.J.F;m.toString.L=olympe.D.J.C;m.nb.L=olympe.D.J.C;olympe.D.Vg=class{constructor(){}Yb(){}Fd(){}get(){}ph(){}has(){}Lg(){}Rc(){}Of(){}tf(){}Gg(){}forEach(){}de(){}};olympe.D.Vg.prototype.forEachCurrentValue=olympe.D.Vg.prototype.de;olympe.D.Vg.prototype.forEach=olympe.D.Vg.prototype.forEach;m=olympe.D.Vg.prototype;m.has.L=olympe.D.J.P;m.Lg.L=olympe.D.J.C;m.Rc.L=new olympe.D.J(()=>Object,[]);m.Of.L=new olympe.D.J(()=>String,[]);m.tf.L=olympe.D.J.G;m.Gg.L=olympe.D.J.C;m.forEach.L=new olympe.D.J(()=>{},[]);m.de.L=olympe.D.J.C;olympe.D.od=class extends olympe.D.Vg{constructor(){super()}he(){}Nf(){}We(){}Mf(){}te(){}Ve(){}fj(){}hi(){}};olympe.D.od.prototype.getCurrentAt=olympe.D.od.prototype.Ve;olympe.D.od.prototype.getAt=olympe.D.od.prototype.te;olympe.D.od.prototype.getCurrentKeyAt=olympe.D.od.prototype.Mf;olympe.D.od.prototype.getKeyAt=olympe.D.od.prototype.We;olympe.D.od.prototype.getCurrentRank=olympe.D.od.prototype.Nf;olympe.D.od.prototype.getRank=olympe.D.od.prototype.he;m=olympe.D.od.prototype;m.he.L=olympe.D.J.G;
315
- m.Nf.L=olympe.D.J.C;m.We.L=new olympe.D.J(()=>String,[]);m.Mf.L=olympe.D.J.C;m.te.L=new olympe.D.J(()=>Object,[]);m.Ve.L=olympe.D.J.C;m.fj.L=olympe.D.J.C;m.hi.L=new olympe.D.J(()=>Array,[]);olympe.D.oi=class{constructor(a,b){this.P=b||olympe.D.Na();this.valueType=a||Object;this.values={};this.eb=this.Fa=null;this.ie=0;this.$=Object.create(null);this.Db=Object.create(null);this.size=0;this.K=null;this.P.onDestroy(()=>{const c=this.$;if(c){const d=Object.keys(c),e=d.length;for(let f=0;f<e;f++){const g=c[d[f]],h=Object.keys(g);for(let k=h.length,l=0;l<k;l++)g[h[l]].destroy()}}})}Hh(){return this.P}Yb(){return this.valueType}Fd(a){this.valueType=a;const b=this.Fa;if(null!==b)for(const c in b)Object.prototype.hasOwnProperty.call(b,
316
- c)&&ob(b[c],a)}get(a){const b=c=>{null===this.Fa&&(this.Fa={});return this.ij(this.Fa,c,this.values[c],this.valueType,'Map.get('+c+')')};return olympe.D.Ha([a],c=>b(c),this.valueType)}ph(a){a=this.values[a];return olympe.D.ob(a)?$a(a.Qa)?a.Qa.Kb:void 0:a}has(a){const b=c=>{null===this.eb&&(this.eb={});return this.ij(this.eb,c,c in this.values?olympe.D.ra.F:olympe.D.ra.C,olympe.D.ra,'Map.has('+c+')')};return olympe.D.Ha([a],c=>b(c),olympe.D.ra)}Lg(a){return a in this.values}ij(a,b,c,d,e){let f=a[b];
317
- f||this.P.run(()=>{f=olympe.D.Ld(d,void 0,e);a[b]=f;f.Qa.onDestroy(()=>delete a[b]);olympe.D.ob(c)?sb(f,c):pb(f,c)});return f}Rc(){throw Error('Abstract method getFirstKey needs to be overridden');}Of(){throw Error('Abstract method getFirstKey needs to be overridden');}tf(){null===this.K&&this.P.run(()=>{this.K=olympe.D.Ld(olympe.D.ga,olympe.D.Ba(this.size));this.K.Qa.onDestroy(()=>{this.K=null})});return this.K}Gg(){return this.size}forEach(a,b){const c=this.Hm();a=this.ur(c,a,b);this.Gm(c,a)}Hm(){return String(++this.ie)}Gm(a,
318
- b){this.Db[a]=b;olympe.D.Na().P(()=>{const c=this.$;for(const d in c)Object.prototype.hasOwnProperty.call(c,d)&&delete c[d][a];delete this.Db[a]});this.de(b)}ur(a,b,c){const d=olympe.D.Na();return(e,f)=>{d.run(()=>{const g=olympe.D.createNode(void 0,b,null,[e,f,this],null,`forEach-${a}-${f}`);if(void 0!==c)g.onDestroy(()=>{c(f)});this.Km(a,f,g)})}}Km(a,b,c){void 0===this.$[b]&&(this.$[b]={});this.$[b][a]=c}de(a){const b=this.values;for(const c in b)if(Object.prototype.hasOwnProperty.call(b,c)&&!1===
319
- a(b[c],c,this))break}Hk(a,b){void 0!==this.values[a]&&this.Yi(a,!0);this.values[a]=b;var c=this.Fa;null!==c&&void 0!==c[a]&&(b&&b instanceof olympe.D.Proxy?sb(c[a],b):pb(c[a],b));c=this.eb;null!==c&&void 0!==c[a]&&tb(c[a],!0);this.size++;c=this.Db;for(const d in c)if(Object.prototype.hasOwnProperty.call(c,d))c[d](b,a,this)}Yi(a,b){const c=this.values;if(Object.prototype.hasOwnProperty.call(c,a)){var d=(d=c[a])&&d.Ff?d.Qa.Kb:d;var e=this.Fa;null!==e&&void 0!==e[a]&&qb(e[a]);e=this.eb;null!==e&&void 0!==
320
- e[a]&&tb(e[a],!1);delete c[a];this.size--;b||this.Gf()}a=this.$[a];if(void 0!==a)for(const f in a)Object.prototype.hasOwnProperty.call(a,f)&&a[f].destroy();return d}Gf(){null!==this.K&&tb(this.K,this.size)}$h(){var a=this.Fa;if(null!==a)for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&qb(a[c]);a=this.eb;if(null!==a)for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&tb(a[b],!1);for(const c in this.values)Object.prototype.hasOwnProperty.call(this.values,c)&&delete this.values[c];for(const c in this.$)if(Object.prototype.hasOwnProperty.call(this.$,
321
- c)){b=this.$[c];for(const d in b)Object.prototype.hasOwnProperty.call(b,d)&&b[d].destroy()}this.size=0;null!==this.K&&tb(this.K,this.size)}Zg(){const a=this.values;let b='\n';for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=a[c]+'\n');return b}};olympe.D.oi.ma=[olympe.D.Vg];m=olympe.D.oi.prototype;m.Hh.L=olympe.D.J.C;m.Yb.L=olympe.D.J.C;m.Fd.L=olympe.D.J.C;m.get.L=new olympe.D.J(()=>Object,[],'valueType');m.ph.L=olympe.D.J.C;m.has.L=olympe.D.J.P;m.Lg.L=olympe.D.J.C;m.ij.L=olympe.D.J.C;
322
- m.tf.L=olympe.D.J.G;m.Gg.L=olympe.D.J.C;m.forEach.L=new olympe.D.J(()=>{},[]);m.Hm.L=olympe.D.J.C;m.Gm.L=olympe.D.J.C;m.ur.L=olympe.D.J.C;m.Km.L=olympe.D.J.C;m.de.L=olympe.D.J.C;m.Hk.L=olympe.D.J.C;m.Yi.L=olympe.D.J.C;m.Gf.L=olympe.D.J.C;m.$h.L=olympe.D.J.C;m.Zg.L=olympe.D.J.C;olympe.D.Fj=class extends olympe.D.oi{constructor(a,b){super(a,b);this.F=Object.create(null);this.C=[];this.qa=this.Ka=this.Wa=this.la=null}Fd(a){super.Fd(a);if(null!==this.qa)for(let b of this.qa.values())ob(b,a)}Rc(){return this.te(0)}Of(){return this.We(0)}he(a){const b=c=>{null===this.Wa&&(this.Wa=Object.create(null));let d=this.Nf(a);d=void 0!==d?olympe.D.Ba(d):void 0;return this.ij(this.Wa,c,d,olympe.D.ga,`List.getRank(${c})`)};return olympe.D.ob(a)?L(olympe.D.createNode(olympe.D.ga,b,null,
323
- [a.Qa],[0],'onResolved('+(b.name||'')+')')):b(a)}Nf(a){return this.F[a]}We(a){const b=c=>{const d=c.valueOf(),e=this.Mf(d);null===this.Ka&&(this.Ka=Object.create(null));return this.ij(this.Ka,String(d),e,String,'List.getKeyAt('+c+')')};return olympe.D.Ha([a],c=>b(c),String)}Mf(a){return this.C[a.valueOf()]}te(a){if(olympe.D.ob(a))return this.get(olympe.D.Ha([a],c=>{c=this.We(c);if(!$a(c.Qa)){const d=olympe.D.Na();olympe.D.$f(d)&&jb(d)}return c},String));null===this.qa&&(this.qa=new Map);let b=this.qa.get(a);
324
- b||this.P.run(()=>{b=this.get(this.We(a));this.qa.set(a,b);b.Qa.onDestroy(()=>this.qa.delete(a))});return b}Ve(a){return this.ph(this.Mf(a))}fj(a,b,c,d){let e=this.Hm();a=this.Zr(e,a,b,c,d);this.Gm(e,a)}Zr(a,b,c,d,e){return olympe.D.Na().F((f,g)=>{let h=!1,k=olympe.D.ef([b,c,this.he(g)],(l,n,p)=>{p>=l&&p<l+n?h||(d(f,g,this),h=!0):h&&(e(g),h=!1)});if(void 0!==e)k.onDestroy(e.bind(null,g));this.Km(a,g,k)})}hi(){null===this.la&&this.P.run(()=>{this.la=olympe.D.Ld(Array,this.C.filter(a=>void 0!==a));
325
- this.la.Qa.onDestroy(()=>{this.K=null})});return this.la}de(a){if(this.C.length!==this.size)super.de(a);else{var b=this.values;for(let c of this.C.filter(d=>void 0!==d))if(Object.prototype.hasOwnProperty.call(b,c)&&!1===a(b[c],c,this))break}}Jm(a,b){const c=this.Wa,d=this.Ka,e=this.F[a],f=b.valueOf();if(e!==f||this.C[e]!==a){var g=this.C[f];void 0!==g&&delete this.F[g];void 0!==e&&null!==e&&this.C[e]===a&&(this.C[e]=void 0);this.F[a]=f;this.C[f]=a;null!==c&&(void 0!==g&&void 0!==c[g]&&qb(c[g]),void 0!==
326
- c[a]&&pb(c[a],olympe.D.Ba(f)));null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&qb(d[e]),void 0!==d[b]&&pb(d[b],a))}}Im(a){var b=this.Ka,c=this.F[a];null!==c&&void 0!==c&&null!==b&&(b=b[c],void 0!==b&&b.Qa.Kb===a&&qb(b));delete this.F[a];this.C.splice(c,1);c=this.Wa;null!==c&&void 0!==c[a]&&qb(c[a])}vr(){if(null!==this.la){const a=this.C,b=this.la.Qa.Kb;b&&a.join(',')!==b.join(',')&&pb(this.la,a)}}Gf(){this.vr();super.Gf()}$h(){var a=this.F;for(b in a)delete a[b];this.C.length=0;a=this.Wa;if(null!==
327
- a)for(b in a)qb(a[b]);a=this.Ka;if(null!==a)for(b in a)qb(a[parseInt(b,10)]);var b=this.la;null!==b&&(hb(b.Qa),pb(b,this.C));return olympe.D.oi.prototype.$h.call(this)}Zg(){const a=this.values,b=this.F;let c='[\n';for(let d in a)Object.prototype.hasOwnProperty.call(a,d)&&(c+=`${b[d]}. ${a[d]}\n`);return c+']'}};olympe.D.Fj.ma=[olympe.D.od];m=olympe.D.Fj.prototype;m.Fd.L=olympe.D.J.C;m.Rc.L=new olympe.D.J(()=>Object,[]);m.Of.L=new olympe.D.J(()=>String,[]);m.he.L=olympe.D.J.G;m.Nf.L=olympe.D.J.C;
328
- m.We.L=new olympe.D.J(()=>String,[]);m.Mf.L=olympe.D.J.C;m.te.L=new olympe.D.J(()=>Object,[]);m.Ve.L=olympe.D.J.C;m.fj.L=new olympe.D.J(()=>{},[]);m.Zr.L=olympe.D.J.C;m.hi.L=new olympe.D.J(()=>Array,[]);m.de.L=olympe.D.J.C;m.Jm.L=olympe.D.J.C;m.Im.L=olympe.D.J.C;m.vr.L=olympe.D.J.C;m.Gf.L=olympe.D.J.C;m.$h.L=olympe.D.J.C;m.Zg.L=olympe.D.J.C;olympe.D.Map=class extends olympe.D.oi{constructor(a){a===olympe.D.Proxy&&(a=Object);super(a);this.C=this.F=null}Fd(a){a===olympe.D.Proxy&&(a=Object);null!==this.F&&ob(this.F,a);super.Fd(a)}Rc(){null===this.F&&this.Tm();return this.F}Of(){null===this.C&&this.Tm();return this.C}Tm(){this.Hh().run(()=>{this.F=olympe.D.Ld(this.Yb());this.C=olympe.D.Ld(String);this.zj(this.Ym())})}Ym(){const a=this.values;let b,c;for(b in a)if(Object.prototype.hasOwnProperty.call(a,b)){c=b;break}return c}zj(a){if(void 0!==
329
- a){const b=this.values[a];b&&b instanceof olympe.D.Proxy?sb(this.F,b):pb(this.F,b);pb(this.C,a)}else void 0!==this.F.Qa.Kb&&(qb(this.F),qb(this.C))}set(a,b){this.Hk(a,b);1===this.size&&null!==this.C&&this.zj(a);this.Gf()}remove(a){const b=this.Yi(a);null!==this.C&&this.C.Qa.Kb===a&&this.zj(this.Ym());return b}clear(){this.$h();null!==this.C&&this.zj()}};m=olympe.D.Map.prototype;m.Fd.L=olympe.D.J.C;m.Rc.L=new olympe.D.J(()=>Object,[]);m.Of.L=new olympe.D.J(()=>String,[]);m.Tm.L=olympe.D.J.C;
330
- m.Ym.L=olympe.D.J.C;m.zj.L=olympe.D.J.C;m.set.L=olympe.D.J.C;m.remove.L=new olympe.D.J(()=>Object,[]);m.clear.L=olympe.D.J.C;olympe.D.$g=class extends olympe.D.Fj{constructor(a){super(a)}set(a,b,c){this.Hk(a,b);void 0!==c&&olympe.D.wc([c],d=>{this.Jm(a,d)});this.Gf()}remove(a){this.Im(a);return this.Yi(a)}clear(){this.$h()}};olympe.D.$g.prototype.remove.L=olympe.D.J.C;olympe.D.$g.prototype.clear.L=olympe.D.J.C;olympe.D.xs=class extends olympe.D.Tj{constructor(a,b){super(olympe.D.ga,'animatedFlowSource');this.duration=a;this.C=b||olympe.D.ga.Do.Kp}zb(){return olympe.D.ky(this.node,this.duration,this.C,void 0)}};let Bb=null;olympe.D.N=void 0;olympe.D.zn=void 0;olympe.D.di=void 0;olympe.D.Zh=new Map;olympe.D.Zh.set(0,olympe.D.ga.ZERO);olympe.D.Zh.set(1,olympe.D.ga.ONE);olympe.D.Zh.set(2,olympe.D.ga.pv);olympe.D.Gk=new Map;olympe.D.Gk.set('',olympe.D.$a.EMPTY);olympe.D.Gk.set(' ',olympe.D.$a.$u);olympe.D.createNode=function(a,b,c,d,e,f,g,h){return new olympe.D.Node({valueType:a,Ad:b,dg:c,ln:d,debug:g,Bg:e,xd:f,$i:h})};olympe.D.$f=function(a){return!!(a&&a instanceof olympe.D.Node)};
331
- olympe.D.Ld=function(a,b,c){a=olympe.D.createNode(a,void 0,void 0,void 0,void 0,c);olympe.D.$f(b)?kb(a,b):olympe.D.ob(b)?kb(a,b.Qa):K(a,b);return L(a)};olympe.D.ob=function(a){return!(!a||!a.Ff)};olympe.D.ag=function(a){return!(!a||!(a instanceof olympe.D.Node||a.Ff))};olympe.D.pn=function(a){return olympe.D.$f(a)||a instanceof olympe.D.$b||a instanceof olympe.D.Gq};olympe.D.ji=function(a){return a instanceof olympe.D.Tj};
332
- olympe.D.dl=function(a,b){if(void 0!==a){olympe.D.ji(a)&&(a=a.zb().Qa);if(!olympe.D.ag(a))return b(a);var c=[];olympe.D.ob(a)?c.push(a.Qa):c.push(a);return olympe.D.createNode(void 0,b,null,c,[0],'onResolved')}};olympe.D.Xa=function(a,b){let c=a;olympe.D.ob(a)?c=a.Qa.Kb:olympe.D.$f(a)?c=a.Kb:olympe.D.ji(a)&&(c=a.zb().Qa.Kb);return void 0===c?b:c};
333
- olympe.D.df=function(a,b){let c;olympe.D.ob(a)?c=a.Qa:olympe.D.$f(a)?c=a:olympe.D.ji(a)&&(c=a.zb().Qa);c&&olympe.D.wc([b],d=>{c.df(d)},'setDefaultValue');return a};olympe.D.ef=function(a,b,c,d){const e=a.length,f=Array(e),g=[];let h;for(let k=0;k<e;k++)h=a[k],void 0!==h&&null!==h&&(void 0!==h.sr?(h=h.Qa,g.push(k)):h instanceof olympe.D.Node?g.push(k):olympe.D.ji(h)&&(h=h.zb().Qa,g.push(k))),f[k]=h;return olympe.D.createNode(c,b,null,f,g,d||'syncNodes')};
334
- olympe.D.me=function(a,b,c,d){return L(olympe.D.ef(a,b,c,d||'syncProxies'))};const Cb=a=>{for(const b of a)if(olympe.D.ag(b)||olympe.D.ji(b))return!1;return!0};olympe.D.Ha=function(a,b,c,d,e){if(Cb(a))return b(...a);const f=olympe.D.ef(a,b,c,d||'TransformFlows');e&&olympe.D.wc([e],g=>{f.df(g)},'setDefaultValue');return L(f)};olympe.D.wc=function(a,b,c){Cb(a)?b(...a):olympe.D.ef(a,b,void 0,c||'processFlows')};
335
- olympe.D.es=function(a,b){if(Cb(a))b(...a);else{const c=olympe.D.Na();olympe.D.ef(a,(...d)=>{olympe.D.Na().destroy();c.run(b,...d)},void 0,'processFlowsOnce')}};olympe.D.xn=function(a,b,c){const d=a.length,e=Array(d),f=[];let g;for(let h=0;h<d;h++)g=a[h],void 0!==g&&null!==g&&(olympe.D.ob(g)?(g=g.Qa,f.push(h)):g instanceof olympe.D.Node?f.push(h):olympe.D.ji(g)&&(g=g.zb().Qa,f.push(h))),e[h]=g;0!==f.length&&new olympe.D.Node({Ad:b,ln:e,Bg:f,Cy:!1,xd:c})};
336
- olympe.D.ID=function(a,b,c){const d=olympe.D.Na();olympe.D.xn(a,(...e)=>{olympe.D.Na().destroy();d.run(b,...e)},c||'processFutureFlowsOnce')};olympe.D.hD=function(a,b,c){a=new olympe.D.Tj(a,c);b(a);return a.zb()};olympe.D.Ic=function(a,b='flowSource'){return new olympe.D.Tj(a,b)};olympe.D.LD=function(a,b,c,d){const e=olympe.D.Na();olympe.D.ef(a,(...f)=>{olympe.D.Na().destroy();e.run(b,...f)},c,d||'syncProxiesOnce')};
337
- olympe.D.kn=function(a,b,c){olympe.D.Ha([a],d=>d.valueOf()?b.apply(null,void 0):c&&c.apply(null,void 0),Object,'If')};olympe.D.mD=function(a,b,...c){return a?a.run(b,...c):b(...c)};olympe.D.QD=function(a){return olympe.D.Na().F(a)};olympe.D.kD=function(a,b,c){olympe.D.iw(a?a.Qa:a,b,c)};
338
- olympe.D.iw=function(a,b,c){if(a){var d=a.Z();null===Bb&&(Bb={});if(Bb[d])olympe.D.N.log(`Already started node #${d} dump`+(b?`: ${b}`:''));else{Bb[d]=!0;var e=`Starting node #${d} dump`+(b?`: ${b}`:'');c?olympe.D.N.warn(e):olympe.D.N.log(e);var f=`#${d}`+(b?`: ${b}`:'')+':';c=olympe.D.createNode(null,g=>{void 0===g?olympe.D.N.log(f,'undefined'):null===g?olympe.D.N.log(f,'null'):olympe.D.N.log(f,String(g))},null,[a],[0],'DataFlowDump');a.onDestroy(()=>{olympe.D.N.log(`Node #${d} destroyed`+(b?`: ${b}`:
339
- ''))});c.onDestroy(()=>{delete Bb[d]})}}else olympe.D.N.log('NOT starting node dump, node is '+String(a))};olympe.D.jD=function(){let a='',b=olympe.D.Na();for(;null!==b;)a+=b.Nc()+' --\x3e ',b=b.getParent();olympe.D.N.log(a)};
340
- olympe.D.Ba=function(a){if(void 0===a)return olympe.D.ga.ZERO;if(a instanceof olympe.D.ga)return a;a&&a.valueOf&&(a=a.valueOf());if('number'===typeof a){if(isNaN(a))return olympe.D.ga.Tp;if(a===Math.PI)return olympe.D.ga.PI;if(Infinity===a)return olympe.D.ga.ut;if(-Infinity===a)return olympe.D.ga.nu;if(isNaN(a))var b=!1;else b=parseFloat(a),b=(b|0)===b;return b&&-1<=a&&100>=a?(olympe.D.Zh.has(a)||olympe.D.Zh.set(a,new olympe.D.ga(a)),olympe.D.Zh.get(a)):new olympe.D.ga(a)}return null};
341
- olympe.D.ke=function(a){return void 0===a?olympe.D.Ld(olympe.D.ga):olympe.D.Ld(olympe.D.ga,olympe.D.ag(a)?a:olympe.D.Ba(a))};olympe.D.ky=olympe.D.ga.animate;olympe.D.CD=function(a,b){return new olympe.D.xs(a,b)};olympe.D.Bb=function(a){if(a instanceof olympe.D.$a)return a;a instanceof Object&&(a=a.valueOf());const b=typeof a;if('string'===b||'number'===b||'boolean'===b)return a=String(a),olympe.D.Gk.has(a)?olympe.D.Gk.get(a):new olympe.D.$a(a)};
342
- olympe.D.FD=function(a){return void 0===a?olympe.D.Ld(olympe.D.$a):olympe.D.Ld(olympe.D.$a,olympe.D.ag(a)?a:olympe.D.Bb(a))};olympe.D.Ac=function(a){return a instanceof olympe.D.ra?a:void 0!==a&&null!==a&&a.valueOf()?olympe.D.ra.F:olympe.D.ra.C};olympe.D.yy=function(a){return void 0===a?olympe.D.Ld(olympe.D.ra):olympe.D.Ld(olympe.D.ra,olympe.D.ag(a)?a:olympe.D.Ac(a))};olympe.D.ly=function(a){if(a instanceof Date)return new olympe.D.jb(a)};
343
- olympe.D.ED=function(a){return olympe.D.Ld(olympe.D.jb,void 0!==a?new olympe.D.jb(a):null)};olympe.D.Yr=a=>a instanceof olympe.D.ra||a instanceof olympe.D.ga||a instanceof olympe.D.$a||a instanceof olympe.D.jb;olympe.D.GD=function(a,b){return olympe.D.Ld(olympe.D.ec,void 0===a&&void 0===b?void 0:new olympe.D.ec(a,b))};olympe.D.xy=function(a,b,c,d){let e;void 0!==a&&(a instanceof olympe.D.Color?e=a:e=olympe.D.Color.create(a,b,c,d));return olympe.D.Ld(olympe.D.Color,e)};olympe.D.DD=olympe.D.xy;
344
- olympe.D.Zv=function(a){olympe.D.N=a;olympe.D.di=olympe.D.qh()};olympe.D.qh=function(){olympe.D.zn||(olympe.D.zn=new olympe.D.Gq);return olympe.D.zn};olympe.D.Na=function(){olympe.D.di||(olympe.D.di=olympe.D.qh());return olympe.D.di};olympe.D.js=function(a){const b=olympe.D.di;olympe.D.pn(a)&&(olympe.D.di=a);return b||null};
345
- olympe.D.nc=a=>{a='string'===typeof a?JSON.parse(a):a;if(a.type){let b=null;switch(a.type){case 'dateTime':b=olympe.D.jb.nc(a);break;case 'number':b=olympe.D.ga.nc(a);break;case 'string':b=olympe.D.$a.nc(a);break;case 'vector2':b=olympe.D.ec.nc(a);break;case 'color':b=olympe.D.Color.nc(a);break;case 'boolean':b=olympe.D.ra.nc(a)}return b}return null};function Db(a){a.C.G()||(a.G.forEach(b=>{b.destroy()}),a.G.clear(),a.F.clear(),a.size.clear(),a.P.clear(),a.V.length=0,a.K.length=0)}
346
- olympe.D.JB=class{constructor(){this.C=new olympe.D.$b('Slot Manager context');this.G=new Map;this.C.run(()=>{this.F=olympe.D.Ic(Eb,'Last slot manager entry');this.size=ub(olympe.D.Ic(olympe.D.ga,'SlotManager size').repeat(this.F.zb().fn()),olympe.D.ga.ZERO);this.P=ub(olympe.D.Ic(olympe.D.ga,'last valid slots'),olympe.D.Ba(-1))});this.V=[];this.K=[];this.C.onDestroy(()=>{Db(this)})}};
347
- class Eb{constructor(a,b,c,d){this.id=a;this.F=new olympe.D.$b('Slot manager entry');this.K=c;this.P=d;this.F.run(()=>{const e=ub(olympe.D.Ic(olympe.D.ga),olympe.D.ga.ZERO);olympe.D.ob(b)?e.repeat(b):e.update(b);this.C=olympe.D.Ic(olympe.D.ga);this.G=this.C.zb().le(e.zb())});this.next=null}Z(){return this.id}yx(){return this.C.zb()}fn(){return this.G}he(){return this.K}Kx(){return this.P}hz(a){this.K=a}Qy(a){null===a?this.C.update(olympe.D.ga.ZERO):(this.C.repeat(a.fn()),a.next=this)}Gt(){this.C.clear();
348
- this.next=null}destroy(){this.F.destroy();this.G=this.C=this.next=null}}m=Eb.prototype;m.Z.L=olympe.D.J.C;m.yx.L=new olympe.D.J(()=>olympe.D.ga);m.fn.L=new olympe.D.J(()=>olympe.D.ga);m.he.L=olympe.D.J.C;m.Kx.L=olympe.D.J.C;m.hz.L=olympe.D.J.C;m.Qy.L=olympe.D.J.C;m.Gt.L=olympe.D.J.C;m.destroy.L=olympe.D.J.C;olympe.D.R={Ea:'df.Logger'};olympe.U.config(a=>{E(a,olympe.D.Config.Up,Number.POSITIVE_INFINITY);C(a,olympe.D.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('df'))},'olympe.df');olympe.U.run([olympe.D.R.Ea],a=>{olympe.D.Zv(a)},'olympe.df');olympe.net={};olympe.net.ab={};olympe.net.ab.Gd={km:'POST',GET:'GET',rt:'HEAD',jk:'PUT',Cc:'DELETE',fm:'OPTIONS',aB:'PATCH'};olympe.net.ab.ResponseType={xk:'text',pl:'blob',ARRAY_BUFFER:'arraybuffer'};olympe.net.ab.Headers={Kj:'content-type',Fz:'content-length',ri:'authorization',ws:'access-control-allow-origin'};olympe.net.ab.Gz={AA:'text/html',JSON:'application/json',$C:'application/zip'};olympe.net.ab.Mc={Ds:0,bh:200,vl:201,Dj:202,oz:400,tv:401,ht:403,VA:404,PA:405,wm:500,Xu:503};function Fb(a){return a.host&&encodeURI(a.host)}function Gb(a){return encodeURI(a.path).replace(olympe.net.Xi.C,(b,c)=>'%'+c)}function Hb(a){return void 0===a.G?443===a.port:a.G}olympe.net.Xi=class{constructor(a,b,c,d){this.host='localhost';this.port=80;this.path='';this.G=!1;void 0!==a&&(this.host=a);void 0!==b&&(this.port=b);void 0!==c&&(this.path=c.replace(/^\/+/,''));void 0!==d&&(this.G=d)}C(){return`${Hb(this)?'wss':'ws'}://${Fb(this)}:${this.port}/${Gb(this)}`}toString(){return`${Fb(this)}:${this.port}/${Gb(this)}`}};
349
- olympe.net.Xi.C=/%25([0-9a-f]{2})/i;olympe.net.WebSocket=class{send(){}close(){}la(){}ba(){}$(){}F(){}};function Ib(a,b,c,d){a=olympe.X.zy(a.valueOf());if(!a.host&&!a.path)return null;const e=a.scheme?a.scheme.includes('s'):!1;b=new olympe.net.Xj(a.host,a.port||(e?443:80),a.path||'',e,b,c,d,a.query||void 0);a.qs&&(c=a.qs.split(':'),2===c.length&&(c=olympe.X.fi().C(Fa(`${c[0]}:${c[1]}`)),Jb(b,{Authorization:`Basic ${c}`})));return b}function Kb(a){return void 0!==a.query?a.query.replace(/[^=&]+/g,b=>encodeURIComponent(b)):null}
307
+ return new olympe.D.Color(e,f,g,h)},olympe.D.Color)}Uf(){return this.C}Jf(){return this.b}Of(){return this.F}If(){return this.a}Rv(a,b){return olympe.D.Color.create(this.C.uj(a.Uf(),b),this.F.uj(a.Of(),b),this.b.uj(a.Jf(),b),this.a.uj(a.If(),b))}mw(a){return olympe.D.Color.create(this.C,this.F,this.b,a)}qs(){return`rgba(${this.C},${this.F},${this.b},${this.a})`}Gn(){const a=(16777216|this.b|this.F<<8|this.C<<16).toString(16).slice(1),b=1===this.a.valueOf()?'':(256|255*this.a).toString(16).slice(1);
308
+ return'#'+(a+b).toUpperCase()}toString(){return this.Gn()}nb(a){return a instanceof olympe.D.Color?this.C.valueOf()===a.C.valueOf()&&this.F.valueOf()===a.F.valueOf()&&this.b.valueOf()===a.b.valueOf()&&this.a.valueOf()===a.a.valueOf():!1}};olympe.D.Color.prototype.equals=olympe.D.Color.prototype.nb;olympe.D.Color.prototype.toHexString=olympe.D.Color.prototype.Gn;olympe.D.Color.prototype.toRGBString=olympe.D.Color.prototype.qs;olympe.D.Color.prototype.getAlpha=olympe.D.Color.prototype.If;
309
+ olympe.D.Color.prototype.getGreen=olympe.D.Color.prototype.Of;olympe.D.Color.prototype.getBlue=olympe.D.Color.prototype.Jf;olympe.D.Color.prototype.getRed=olympe.D.Color.prototype.Uf;olympe.D.Color.create=olympe.D.Color.create;m=olympe.D.Color.prototype;m.toJSON.L=olympe.D.J.C;m.Uf.L=olympe.D.J.G;m.Jf.L=olympe.D.J.G;m.Of.L=olympe.D.J.G;m.If.L=olympe.D.J.G;m.Rv.L=new olympe.D.J(()=>olympe.D.Color,[]);m.mw.L=new olympe.D.J(()=>olympe.D.Color,[]);m.qs.L=new olympe.D.J(()=>String,[]);
310
+ m.Gn.L=new olympe.D.J(()=>String,[]);m.nb.L=olympe.D.J.C;olympe.D.File=class{na(){}Bp(){}Ul(){}jn(){}Ok(){}en(){}Pk(){}rename(){}};olympe.D.ec=class{constructor(a,b){this.x=olympe.D.ke(a);this.y=olympe.D.ke(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.D.Xa(this.x).valueOf())+', "y": '+JSON.stringify(olympe.D.Xa(this.y).valueOf())+' }'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.ec(b.x,b.y)}Hx(){return this.x}Xy(a){tb(this.x,a)}Ix(){return this.y}Yy(a){tb(this.y,a)}wx(){return this.x.js(this.y)}le(a){return olympe.D.Ha([this,a],(b,c)=>new olympe.D.ec(b.x.le(c.x),b.y.le(c.y)),
311
+ olympe.D.ec,'Vector2.plus')}vh(a){return olympe.D.Ha([this,a],(b,c)=>new olympe.D.ec(b.x.vh(c.x),b.y.vh(c.y)),olympe.D.ec,'Vector2.minus')}gy(a){return new olympe.D.ec(this.x.al(a),this.y.al(a))}hw(a){return new olympe.D.ec(this.x.ej(a),this.y.ej(a))}iy(){return new olympe.D.ec(this.x.Cj(),this.y.Cj())}iw(a){return olympe.D.Ha([this,a],(b,c)=>olympe.D.Ha([b.x,b.y,c.x,c.y],(d,e,f,g)=>olympe.D.Ba(d*f+e*g),olympe.D.ga),olympe.D.ga)}length(){return olympe.D.Ha([this.x,this.y],(a,b)=>olympe.D.Ba(Math.sqrt(a*
312
+ a+b*b)),olympe.D.ga)}normalize(){return olympe.D.Ha([this.x,this.y],(a,b)=>{const c=Math.sqrt(a*a+b*b);return new olympe.D.ec(a/c,b/c)},olympe.D.ec)}floor(){return olympe.D.Ha([this.x,this.y],(a,b)=>new olympe.D.ec(Math.floor(a),Math.floor(b)),olympe.D.ec)}ceil(){return olympe.D.Ha([this.x,this.y],(a,b)=>new olympe.D.ec(Math.ceil(a),Math.ceil(b)),olympe.D.ec)}round(){return olympe.D.Ha([this.x,this.y],(a,b)=>new olympe.D.ec(Math.round(a),Math.round(b)),olympe.D.ec)}Fv(a){return new olympe.D.ec(this.x.le(a),
313
+ this.y.le(a))}Gv(a,b){return new olympe.D.ec(this.x.le(a),this.y.le(b))}Tc(){return olympe.D.Ha([this.x,this.y],(a,b)=>olympe.D.Bb(`Vector2[${a.valueOf()}, ${b.valueOf()}]`),olympe.D.$a)}toString(){return`Vector2[${this.x.Qa.Kb}, ${this.y.Qa.Kb}]`}nb(a){return this===a?!0:!1}};m=olympe.D.ec.prototype;m.toJSON.L=olympe.D.J.C;m.Hx.L=olympe.D.J.G;m.Xy.L=olympe.D.J.C;m.Ix.L=olympe.D.J.G;m.Yy.L=olympe.D.J.C;m.wx.L=olympe.D.J.G;m.le.L=new olympe.D.J(()=>olympe.D.ec,[0]);
314
+ m.vh.L=new olympe.D.J(()=>olympe.D.ec,[0]);m.gy.L=olympe.D.J.V;m.hw.L=olympe.D.J.V;m.iy.L=olympe.D.J.V;m.iw.L=new olympe.D.J(()=>olympe.D.ga,[0]);m.length.L=olympe.D.J.G;m.normalize.L=olympe.D.J.V;m.floor.L=olympe.D.J.V;m.ceil.L=olympe.D.J.V;m.round.L=olympe.D.J.V;m.Fv.L=olympe.D.J.V;m.Gv.L=olympe.D.J.V;m.Tc.L=olympe.D.J.F;m.toString.L=olympe.D.J.C;m.nb.L=olympe.D.J.C;olympe.D.Ug=class{constructor(){}Zb(){}Ed(){}get(){}oh(){}has(){}Ig(){}Rc(){}Mf(){}sf(){}Dg(){}forEach(){}ce(){}};olympe.D.Ug.prototype.forEachCurrentValue=olympe.D.Ug.prototype.ce;olympe.D.Ug.prototype.forEach=olympe.D.Ug.prototype.forEach;m=olympe.D.Ug.prototype;m.has.L=olympe.D.J.P;m.Ig.L=olympe.D.J.C;m.Rc.L=new olympe.D.J(()=>Object,[]);m.Mf.L=new olympe.D.J(()=>String,[]);m.sf.L=olympe.D.J.G;m.Dg.L=olympe.D.J.C;m.forEach.L=new olympe.D.J(()=>{},[]);m.ce.L=olympe.D.J.C;olympe.D.od=class extends olympe.D.Ug{constructor(){super()}he(){}Lf(){}Xe(){}Kf(){}te(){}We(){}gj(){}gi(){}};olympe.D.od.prototype.getCurrentAt=olympe.D.od.prototype.We;olympe.D.od.prototype.getAt=olympe.D.od.prototype.te;olympe.D.od.prototype.getCurrentKeyAt=olympe.D.od.prototype.Kf;olympe.D.od.prototype.getKeyAt=olympe.D.od.prototype.Xe;olympe.D.od.prototype.getCurrentRank=olympe.D.od.prototype.Lf;olympe.D.od.prototype.getRank=olympe.D.od.prototype.he;m=olympe.D.od.prototype;m.he.L=olympe.D.J.G;
315
+ m.Lf.L=olympe.D.J.C;m.Xe.L=new olympe.D.J(()=>String,[]);m.Kf.L=olympe.D.J.C;m.te.L=new olympe.D.J(()=>Object,[]);m.We.L=olympe.D.J.C;m.gj.L=olympe.D.J.C;m.gi.L=new olympe.D.J(()=>Array,[]);olympe.D.ni=class{constructor(a,b){this.P=b||olympe.D.Na();this.valueType=a||Object;this.values={};this.fb=this.Fa=null;this.ie=0;this.$=Object.create(null);this.Fb=Object.create(null);this.size=0;this.K=null;this.P.onDestroy(()=>{const c=this.$;if(c){const d=Object.keys(c),e=d.length;for(let f=0;f<e;f++){const g=c[d[f]],h=Object.keys(g);for(let k=h.length,l=0;l<k;l++)g[h[l]].destroy()}}})}Ii(){return this.P}Zb(){return this.valueType}Ed(a){this.valueType=a;const b=this.Fa;if(null!==b)for(const c in b)Object.prototype.hasOwnProperty.call(b,
316
+ c)&&ob(b[c],a)}get(a){const b=c=>{null===this.Fa&&(this.Fa={});return this.jj(this.Fa,c,this.values[c],this.valueType,'Map.get('+c+')')};return olympe.D.Ha([a],c=>b(c),this.valueType)}oh(a){a=this.values[a];return olympe.D.ob(a)?$a(a.Qa)?a.Qa.Kb:void 0:a}has(a){const b=c=>{null===this.fb&&(this.fb={});return this.jj(this.fb,c,c in this.values?olympe.D.ra.F:olympe.D.ra.C,olympe.D.ra,'Map.has('+c+')')};return olympe.D.Ha([a],c=>b(c),olympe.D.ra)}Ig(a){return a in this.values}jj(a,b,c,d,e){let f=a[b];
317
+ f||this.P.run(()=>{f=olympe.D.Kd(d,void 0,e);a[b]=f;f.Qa.onDestroy(()=>delete a[b]);olympe.D.ob(c)?sb(f,c):pb(f,c)});return f}Rc(){throw Error('Abstract method getFirstKey needs to be overridden');}Mf(){throw Error('Abstract method getFirstKey needs to be overridden');}sf(){null===this.K&&this.P.run(()=>{this.K=olympe.D.Kd(olympe.D.ga,olympe.D.Ba(this.size));this.K.Qa.onDestroy(()=>{this.K=null})});return this.K}Dg(){return this.size}forEach(a,b){const c=this.Im();a=this.vr(c,a,b);this.Hm(c,a)}Im(){return String(++this.ie)}Hm(a,
318
+ b){this.Fb[a]=b;olympe.D.Na().P(()=>{const c=this.$;for(const d in c)Object.prototype.hasOwnProperty.call(c,d)&&delete c[d][a];delete this.Fb[a]});this.ce(b)}vr(a,b,c){const d=olympe.D.Na();return(e,f)=>{d.run(()=>{const g=olympe.D.createNode(void 0,b,null,[e,f,this],null,`forEach-${a}-${f}`);if(void 0!==c)g.onDestroy(()=>{c(f)});this.Lm(a,f,g)})}}Lm(a,b,c){void 0===this.$[b]&&(this.$[b]={});this.$[b][a]=c}ce(a){const b=this.values;for(const c in b)if(Object.prototype.hasOwnProperty.call(b,c)&&!1===
319
+ a(b[c],c,this))break}Ik(a,b){void 0!==this.values[a]&&this.Zi(a,!0);this.values[a]=b;var c=this.Fa;null!==c&&void 0!==c[a]&&(b&&b instanceof olympe.D.Proxy?sb(c[a],b):pb(c[a],b));c=this.fb;null!==c&&void 0!==c[a]&&tb(c[a],!0);this.size++;c=this.Fb;for(const d in c)if(Object.prototype.hasOwnProperty.call(c,d))c[d](b,a,this)}Zi(a,b){const c=this.values;if(Object.prototype.hasOwnProperty.call(c,a)){var d=(d=c[a])&&d.Df?d.Qa.Kb:d;var e=this.Fa;null!==e&&void 0!==e[a]&&qb(e[a]);e=this.fb;null!==e&&void 0!==
320
+ e[a]&&tb(e[a],!1);delete c[a];this.size--;b||this.Ef()}a=this.$[a];if(void 0!==a)for(const f in a)Object.prototype.hasOwnProperty.call(a,f)&&a[f].destroy();return d}Ef(){null!==this.K&&tb(this.K,this.size)}Zh(){var a=this.Fa;if(null!==a)for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&qb(a[c]);a=this.fb;if(null!==a)for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&tb(a[b],!1);for(const c in this.values)Object.prototype.hasOwnProperty.call(this.values,c)&&delete this.values[c];for(const c in this.$)if(Object.prototype.hasOwnProperty.call(this.$,
321
+ c)){b=this.$[c];for(const d in b)Object.prototype.hasOwnProperty.call(b,d)&&b[d].destroy()}this.size=0;null!==this.K&&tb(this.K,this.size)}Yg(){const a=this.values;let b='\n';for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=a[c]+'\n');return b}};olympe.D.ni.ma=[olympe.D.Ug];m=olympe.D.ni.prototype;m.Ii.L=olympe.D.J.C;m.Zb.L=olympe.D.J.C;m.Ed.L=olympe.D.J.C;m.get.L=new olympe.D.J(()=>Object,[],'valueType');m.oh.L=olympe.D.J.C;m.has.L=olympe.D.J.P;m.Ig.L=olympe.D.J.C;m.jj.L=olympe.D.J.C;
322
+ m.sf.L=olympe.D.J.G;m.Dg.L=olympe.D.J.C;m.forEach.L=new olympe.D.J(()=>{},[]);m.Im.L=olympe.D.J.C;m.Hm.L=olympe.D.J.C;m.vr.L=olympe.D.J.C;m.Lm.L=olympe.D.J.C;m.ce.L=olympe.D.J.C;m.Ik.L=olympe.D.J.C;m.Zi.L=olympe.D.J.C;m.Ef.L=olympe.D.J.C;m.Zh.L=olympe.D.J.C;m.Yg.L=olympe.D.J.C;olympe.D.Gj=class extends olympe.D.ni{constructor(a,b){super(a,b);this.F=Object.create(null);this.C=[];this.qa=this.Ka=this.Wa=this.la=null}Ed(a){super.Ed(a);if(null!==this.qa)for(let b of this.qa.values())ob(b,a)}Rc(){return this.te(0)}Mf(){return this.Xe(0)}he(a){const b=c=>{null===this.Wa&&(this.Wa=Object.create(null));let d=this.Lf(a);d=void 0!==d?olympe.D.Ba(d):void 0;return this.jj(this.Wa,c,d,olympe.D.ga,`List.getRank(${c})`)};return olympe.D.ob(a)?L(olympe.D.createNode(olympe.D.ga,b,null,
323
+ [a.Qa],[0],'onResolved('+(b.name||'')+')')):b(a)}Lf(a){return this.F[a]}Xe(a){const b=c=>{const d=c.valueOf(),e=this.Kf(d);null===this.Ka&&(this.Ka=Object.create(null));return this.jj(this.Ka,String(d),e,String,'List.getKeyAt('+c+')')};return olympe.D.Ha([a],c=>b(c),String)}Kf(a){return this.C[a.valueOf()]}te(a){if(olympe.D.ob(a))return this.get(olympe.D.Ha([a],c=>{c=this.Xe(c);if(!$a(c.Qa)){const d=olympe.D.Na();olympe.D.Yf(d)&&jb(d)}return c},String));null===this.qa&&(this.qa=new Map);let b=this.qa.get(a);
324
+ b||this.P.run(()=>{b=this.get(this.Xe(a));this.qa.set(a,b);b.Qa.onDestroy(()=>this.qa.delete(a))});return b}We(a){return this.oh(this.Kf(a))}gj(a,b,c,d){let e=this.Im();a=this.$r(e,a,b,c,d);this.Hm(e,a)}$r(a,b,c,d,e){return olympe.D.Na().F((f,g)=>{let h=!1,k=olympe.D.df([b,c,this.he(g)],(l,n,p)=>{p>=l&&p<l+n?h||(d(f,g,this),h=!0):h&&(e(g),h=!1)});if(void 0!==e)k.onDestroy(e.bind(null,g));this.Lm(a,g,k)})}gi(){null===this.la&&this.P.run(()=>{this.la=olympe.D.Kd(Array,this.C.filter(a=>void 0!==a));
325
+ this.la.Qa.onDestroy(()=>{this.K=null})});return this.la}ce(a){if(this.C.length!==this.size)super.ce(a);else{var b=this.values;for(let c of this.C.filter(d=>void 0!==d))if(Object.prototype.hasOwnProperty.call(b,c)&&!1===a(b[c],c,this))break}}Km(a,b){const c=this.Wa,d=this.Ka,e=this.F[a],f=b.valueOf();if(e!==f||this.C[e]!==a){var g=this.C[f];void 0!==g&&delete this.F[g];void 0!==e&&null!==e&&this.C[e]===a&&(this.C[e]=void 0);this.F[a]=f;this.C[f]=a;null!==c&&(void 0!==g&&void 0!==c[g]&&qb(c[g]),void 0!==
326
+ c[a]&&pb(c[a],olympe.D.Ba(f)));null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&qb(d[e]),void 0!==d[b]&&pb(d[b],a))}}Jm(a){var b=this.Ka,c=this.F[a];null!==c&&void 0!==c&&null!==b&&(b=b[c],void 0!==b&&b.Qa.Kb===a&&qb(b));delete this.F[a];this.C.splice(c,1);c=this.Wa;null!==c&&void 0!==c[a]&&qb(c[a])}wr(){if(null!==this.la){const a=this.C,b=this.la.Qa.Kb;b&&a.join(',')!==b.join(',')&&pb(this.la,a)}}Ef(){this.wr();super.Ef()}Zh(){var a=this.F;for(b in a)delete a[b];this.C.length=0;a=this.Wa;if(null!==
327
+ a)for(b in a)qb(a[b]);a=this.Ka;if(null!==a)for(b in a)qb(a[parseInt(b,10)]);var b=this.la;null!==b&&(hb(b.Qa),pb(b,this.C));return olympe.D.ni.prototype.Zh.call(this)}Yg(){const a=this.values,b=this.F;let c='[\n';for(let d in a)Object.prototype.hasOwnProperty.call(a,d)&&(c+=`${b[d]}. ${a[d]}\n`);return c+']'}};olympe.D.Gj.ma=[olympe.D.od];m=olympe.D.Gj.prototype;m.Ed.L=olympe.D.J.C;m.Rc.L=new olympe.D.J(()=>Object,[]);m.Mf.L=new olympe.D.J(()=>String,[]);m.he.L=olympe.D.J.G;m.Lf.L=olympe.D.J.C;
328
+ m.Xe.L=new olympe.D.J(()=>String,[]);m.Kf.L=olympe.D.J.C;m.te.L=new olympe.D.J(()=>Object,[]);m.We.L=olympe.D.J.C;m.gj.L=new olympe.D.J(()=>{},[]);m.$r.L=olympe.D.J.C;m.gi.L=new olympe.D.J(()=>Array,[]);m.ce.L=olympe.D.J.C;m.Km.L=olympe.D.J.C;m.Jm.L=olympe.D.J.C;m.wr.L=olympe.D.J.C;m.Ef.L=olympe.D.J.C;m.Zh.L=olympe.D.J.C;m.Yg.L=olympe.D.J.C;olympe.D.Map=class extends olympe.D.ni{constructor(a){a===olympe.D.Proxy&&(a=Object);super(a);this.C=this.F=null}Ed(a){a===olympe.D.Proxy&&(a=Object);null!==this.F&&ob(this.F,a);super.Ed(a)}Rc(){null===this.F&&this.Um();return this.F}Mf(){null===this.C&&this.Um();return this.C}Um(){this.Ii().run(()=>{this.F=olympe.D.Kd(this.Zb());this.C=olympe.D.Kd(String);this.Aj(this.Zm())})}Zm(){const a=this.values;let b,c;for(b in a)if(Object.prototype.hasOwnProperty.call(a,b)){c=b;break}return c}Aj(a){if(void 0!==
329
+ a){const b=this.values[a];b&&b instanceof olympe.D.Proxy?sb(this.F,b):pb(this.F,b);pb(this.C,a)}else void 0!==this.F.Qa.Kb&&(qb(this.F),qb(this.C))}set(a,b){this.Ik(a,b);1===this.size&&null!==this.C&&this.Aj(a);this.Ef()}remove(a){const b=this.Zi(a);null!==this.C&&this.C.Qa.Kb===a&&this.Aj(this.Zm());return b}clear(){this.Zh();null!==this.C&&this.Aj()}};m=olympe.D.Map.prototype;m.Ed.L=olympe.D.J.C;m.Rc.L=new olympe.D.J(()=>Object,[]);m.Mf.L=new olympe.D.J(()=>String,[]);m.Um.L=olympe.D.J.C;
330
+ m.Zm.L=olympe.D.J.C;m.Aj.L=olympe.D.J.C;m.set.L=olympe.D.J.C;m.remove.L=new olympe.D.J(()=>Object,[]);m.clear.L=olympe.D.J.C;olympe.D.Zg=class extends olympe.D.Gj{constructor(a){super(a)}set(a,b,c){this.Ik(a,b);void 0!==c&&olympe.D.wc([c],d=>{this.Km(a,d)});this.Ef()}remove(a){this.Jm(a);return this.Zi(a)}clear(){this.Zh()}};olympe.D.Zg.prototype.remove.L=olympe.D.J.C;olympe.D.Zg.prototype.clear.L=olympe.D.J.C;olympe.D.ys=class extends olympe.D.Uj{constructor(a,b){super(olympe.D.ga,'animatedFlowSource');this.duration=a;this.C=b||olympe.D.ga.Eo.Lp}zb(){return olympe.D.my(this.node,this.duration,this.C,void 0)}};let Bb=null;olympe.D.N=void 0;olympe.D.An=void 0;olympe.D.ci=void 0;olympe.D.Yh=new Map;olympe.D.Yh.set(0,olympe.D.ga.ZERO);olympe.D.Yh.set(1,olympe.D.ga.ONE);olympe.D.Yh.set(2,olympe.D.ga.qv);olympe.D.Hk=new Map;olympe.D.Hk.set('',olympe.D.$a.EMPTY);olympe.D.Hk.set(' ',olympe.D.$a.av);olympe.D.createNode=function(a,b,c,d,e,f,g,h){return new olympe.D.Node({valueType:a,zd:b,ag:c,mn:d,debug:g,yg:e,wd:f,aj:h})};olympe.D.Yf=function(a){return!!(a&&a instanceof olympe.D.Node)};
331
+ olympe.D.Kd=function(a,b,c){a=olympe.D.createNode(a,void 0,void 0,void 0,void 0,c);olympe.D.Yf(b)?kb(a,b):olympe.D.ob(b)?kb(a,b.Qa):K(a,b);return L(a)};olympe.D.ob=function(a){return!(!a||!a.Df)};olympe.D.Zf=function(a){return!(!a||!(a instanceof olympe.D.Node||a.Df))};olympe.D.qn=function(a){return olympe.D.Yf(a)||a instanceof olympe.D.Xb||a instanceof olympe.D.Hq};olympe.D.ii=function(a){return a instanceof olympe.D.Uj};
332
+ olympe.D.el=function(a,b){if(void 0!==a){olympe.D.ii(a)&&(a=a.zb().Qa);if(!olympe.D.Zf(a))return b(a);var c=[];olympe.D.ob(a)?c.push(a.Qa):c.push(a);return olympe.D.createNode(void 0,b,null,c,[0],'onResolved')}};olympe.D.Xa=function(a,b){let c=a;olympe.D.ob(a)?c=a.Qa.Kb:olympe.D.Yf(a)?c=a.Kb:olympe.D.ii(a)&&(c=a.zb().Qa.Kb);return void 0===c?b:c};
333
+ olympe.D.cf=function(a,b){let c;olympe.D.ob(a)?c=a.Qa:olympe.D.Yf(a)?c=a:olympe.D.ii(a)&&(c=a.zb().Qa);c&&olympe.D.wc([b],d=>{c.cf(d)},'setDefaultValue');return a};olympe.D.df=function(a,b,c,d){const e=a.length,f=Array(e),g=[];let h;for(let k=0;k<e;k++)h=a[k],void 0!==h&&null!==h&&(void 0!==h.tr?(h=h.Qa,g.push(k)):h instanceof olympe.D.Node?g.push(k):olympe.D.ii(h)&&(h=h.zb().Qa,g.push(k))),f[k]=h;return olympe.D.createNode(c,b,null,f,g,d||'syncNodes')};
334
+ olympe.D.me=function(a,b,c,d){return L(olympe.D.df(a,b,c,d||'syncProxies'))};const Cb=a=>{for(const b of a)if(olympe.D.Zf(b)||olympe.D.ii(b))return!1;return!0};olympe.D.Ha=function(a,b,c,d,e){if(Cb(a))return b(...a);const f=olympe.D.df(a,b,c,d||'TransformFlows');e&&olympe.D.wc([e],g=>{f.cf(g)},'setDefaultValue');return L(f)};olympe.D.wc=function(a,b,c){Cb(a)?b(...a):olympe.D.df(a,b,void 0,c||'processFlows')};
335
+ olympe.D.gs=function(a,b){if(Cb(a))b(...a);else{const c=olympe.D.Na();olympe.D.df(a,(...d)=>{olympe.D.Na().destroy();c.run(b,...d)},void 0,'processFlowsOnce')}};olympe.D.yn=function(a,b,c){const d=a.length,e=Array(d),f=[];let g;for(let h=0;h<d;h++)g=a[h],void 0!==g&&null!==g&&(olympe.D.ob(g)?(g=g.Qa,f.push(h)):g instanceof olympe.D.Node?f.push(h):olympe.D.ii(g)&&(g=g.zb().Qa,f.push(h))),e[h]=g;0!==f.length&&new olympe.D.Node({zd:b,mn:e,yg:f,Ey:!1,wd:c})};
336
+ olympe.D.KD=function(a,b,c){const d=olympe.D.Na();olympe.D.yn(a,(...e)=>{olympe.D.Na().destroy();d.run(b,...e)},c||'processFutureFlowsOnce')};olympe.D.jD=function(a,b,c){a=new olympe.D.Uj(a,c);b(a);return a.zb()};olympe.D.Ic=function(a,b='flowSource'){return new olympe.D.Uj(a,b)};olympe.D.ND=function(a,b,c,d){const e=olympe.D.Na();olympe.D.df(a,(...f)=>{olympe.D.Na().destroy();e.run(b,...f)},c,d||'syncProxiesOnce')};
337
+ olympe.D.ln=function(a,b,c){olympe.D.Ha([a],d=>d.valueOf()?b.apply(null,void 0):c&&c.apply(null,void 0),Object,'If')};olympe.D.oD=function(a,b,...c){return a?a.run(b,...c):b(...c)};olympe.D.SD=function(a){return olympe.D.Na().F(a)};olympe.D.mD=function(a,b,c){olympe.D.jw(a?a.Qa:a,b,c)};
338
+ olympe.D.jw=function(a,b,c){if(a){var d=a.Z();null===Bb&&(Bb={});if(Bb[d])olympe.D.N.log(`Already started node #${d} dump`+(b?`: ${b}`:''));else{Bb[d]=!0;var e=`Starting node #${d} dump`+(b?`: ${b}`:'');c?olympe.D.N.warn(e):olympe.D.N.log(e);var f=`#${d}`+(b?`: ${b}`:'')+':';c=olympe.D.createNode(null,g=>{void 0===g?olympe.D.N.log(f,'undefined'):null===g?olympe.D.N.log(f,'null'):olympe.D.N.log(f,String(g))},null,[a],[0],'DataFlowDump');a.onDestroy(()=>{olympe.D.N.log(`Node #${d} destroyed`+(b?`: ${b}`:
339
+ ''))});c.onDestroy(()=>{delete Bb[d]})}}else olympe.D.N.log('NOT starting node dump, node is '+String(a))};olympe.D.lD=function(){let a='',b=olympe.D.Na();for(;null!==b;)a+=b.$c()+' --\x3e ',b=b.getParent();olympe.D.N.log(a)};
340
+ olympe.D.Ba=function(a){if(void 0===a)return olympe.D.ga.ZERO;if(a instanceof olympe.D.ga)return a;a&&a.valueOf&&(a=a.valueOf());if('number'===typeof a){if(isNaN(a))return olympe.D.ga.Up;if(a===Math.PI)return olympe.D.ga.PI;if(Infinity===a)return olympe.D.ga.vt;if(-Infinity===a)return olympe.D.ga.ou;if(isNaN(a))var b=!1;else b=parseFloat(a),b=(b|0)===b;return b&&-1<=a&&100>=a?(olympe.D.Yh.has(a)||olympe.D.Yh.set(a,new olympe.D.ga(a)),olympe.D.Yh.get(a)):new olympe.D.ga(a)}return null};
341
+ olympe.D.ke=function(a){return void 0===a?olympe.D.Kd(olympe.D.ga):olympe.D.Kd(olympe.D.ga,olympe.D.Zf(a)?a:olympe.D.Ba(a))};olympe.D.my=olympe.D.ga.animate;olympe.D.ED=function(a,b){return new olympe.D.ys(a,b)};olympe.D.Bb=function(a){if(a instanceof olympe.D.$a)return a;a instanceof Object&&(a=a.valueOf());const b=typeof a;if('string'===b||'number'===b||'boolean'===b)return a=String(a),olympe.D.Hk.has(a)?olympe.D.Hk.get(a):new olympe.D.$a(a)};
342
+ olympe.D.HD=function(a){return void 0===a?olympe.D.Kd(olympe.D.$a):olympe.D.Kd(olympe.D.$a,olympe.D.Zf(a)?a:olympe.D.Bb(a))};olympe.D.Ac=function(a){return a instanceof olympe.D.ra?a:void 0!==a&&null!==a&&a.valueOf()?olympe.D.ra.F:olympe.D.ra.C};olympe.D.Ay=function(a){return void 0===a?olympe.D.Kd(olympe.D.ra):olympe.D.Kd(olympe.D.ra,olympe.D.Zf(a)?a:olympe.D.Ac(a))};olympe.D.ny=function(a){if(a instanceof Date)return new olympe.D.jb(a)};
343
+ olympe.D.GD=function(a){return olympe.D.Kd(olympe.D.jb,void 0!==a?new olympe.D.jb(a):null)};olympe.D.Zr=a=>a instanceof olympe.D.ra||a instanceof olympe.D.ga||a instanceof olympe.D.$a||a instanceof olympe.D.jb;olympe.D.ID=function(a,b){return olympe.D.Kd(olympe.D.ec,void 0===a&&void 0===b?void 0:new olympe.D.ec(a,b))};olympe.D.zy=function(a,b,c,d){let e;void 0!==a&&(a instanceof olympe.D.Color?e=a:e=olympe.D.Color.create(a,b,c,d));return olympe.D.Kd(olympe.D.Color,e)};olympe.D.FD=olympe.D.zy;
344
+ olympe.D.$v=function(a){olympe.D.N=a;olympe.D.ci=olympe.D.ph()};olympe.D.ph=function(){olympe.D.An||(olympe.D.An=new olympe.D.Hq);return olympe.D.An};olympe.D.Na=function(){olympe.D.ci||(olympe.D.ci=olympe.D.ph());return olympe.D.ci};olympe.D.ks=function(a){const b=olympe.D.ci;olympe.D.qn(a)&&(olympe.D.ci=a);return b||null};
345
+ olympe.D.nc=a=>{a='string'===typeof a?JSON.parse(a):a;if(a.type){let b=null;switch(a.type){case 'dateTime':b=olympe.D.jb.nc(a);break;case 'number':b=olympe.D.ga.nc(a);break;case 'string':b=olympe.D.$a.nc(a);break;case 'vector2':b=olympe.D.ec.nc(a);break;case 'color':b=olympe.D.Color.nc(a);break;case 'boolean':b=olympe.D.ra.nc(a)}return b}return null};function Db(a){a.C.C()||(a.G.forEach(b=>{b.destroy()}),a.G.clear(),a.F.clear(),a.size.clear(),a.P.clear(),a.V.length=0,a.K.length=0)}
346
+ olympe.D.LB=class{constructor(){this.C=new olympe.D.Xb('Slot Manager context');this.G=new Map;this.C.run(()=>{this.F=olympe.D.Ic(Eb,'Last slot manager entry');this.size=ub(olympe.D.Ic(olympe.D.ga,'SlotManager size').repeat(this.F.zb().gn()),olympe.D.ga.ZERO);this.P=ub(olympe.D.Ic(olympe.D.ga,'last valid slots'),olympe.D.Ba(-1))});this.V=[];this.K=[];this.C.onDestroy(()=>{Db(this)})}};
347
+ class Eb{constructor(a,b,c,d){this.id=a;this.F=new olympe.D.Xb('Slot manager entry');this.K=c;this.P=d;this.F.run(()=>{const e=ub(olympe.D.Ic(olympe.D.ga),olympe.D.ga.ZERO);olympe.D.ob(b)?e.repeat(b):e.update(b);this.C=olympe.D.Ic(olympe.D.ga);this.G=this.C.zb().le(e.zb())});this.next=null}Z(){return this.id}Ax(){return this.C.zb()}gn(){return this.G}he(){return this.K}Mx(){return this.P}jz(a){this.K=a}Sy(a){null===a?this.C.update(olympe.D.ga.ZERO):(this.C.repeat(a.gn()),a.next=this)}Ht(){this.C.clear();
348
+ this.next=null}destroy(){this.F.destroy();this.G=this.C=this.next=null}}m=Eb.prototype;m.Z.L=olympe.D.J.C;m.Ax.L=new olympe.D.J(()=>olympe.D.ga);m.gn.L=new olympe.D.J(()=>olympe.D.ga);m.he.L=olympe.D.J.C;m.Mx.L=olympe.D.J.C;m.jz.L=olympe.D.J.C;m.Sy.L=olympe.D.J.C;m.Ht.L=olympe.D.J.C;m.destroy.L=olympe.D.J.C;olympe.D.R={Ea:'df.Logger'};olympe.U.config(a=>{E(a,olympe.D.Config.Vp,Number.POSITIVE_INFINITY);C(a,olympe.D.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('df'))},'olympe.df');olympe.U.run([olympe.D.R.Ea],a=>{olympe.D.$v(a)},'olympe.df');olympe.net={};olympe.net.ab={};olympe.net.ab.Fd={lm:'POST',GET:'GET',st:'HEAD',kk:'PUT',Cc:'DELETE',gm:'OPTIONS',cB:'PATCH'};olympe.net.ab.ResponseType={yk:'text',ql:'blob',ARRAY_BUFFER:'arraybuffer'};olympe.net.ab.Headers={Lj:'content-type',Hz:'content-length',pi:'authorization',xs:'access-control-allow-origin'};olympe.net.ab.Iz={CA:'text/html',JSON:'application/json',bD:'application/zip'};olympe.net.ab.Mc={Es:0,ah:200,wl:201,Ej:202,qz:400,uv:401,it:403,XA:404,RA:405,xm:500,Yu:503};function Fb(a){return a.host&&encodeURI(a.host)}function Gb(a){return encodeURI(a.path).replace(olympe.net.Yi.C,(b,c)=>'%'+c)}function Hb(a){return void 0===a.G?443===a.port:a.G}olympe.net.Yi=class{constructor(a,b,c,d){this.host='localhost';this.port=80;this.path='';this.G=!1;void 0!==a&&(this.host=a);void 0!==b&&(this.port=b);void 0!==c&&(this.path=c.replace(/^\/+/,''));void 0!==d&&(this.G=d)}C(){return`${Hb(this)?'wss':'ws'}://${Fb(this)}:${this.port}/${Gb(this)}`}toString(){return`${Fb(this)}:${this.port}/${Gb(this)}`}};
349
+ olympe.net.Yi.C=/%25([0-9a-f]{2})/i;olympe.net.WebSocket=class{send(){}close(){}la(){}ba(){}$(){}F(){}};function Ib(a,b,c,d){a=olympe.X.By(a.valueOf());if(!a.host&&!a.path)return null;const e=a.scheme?a.scheme.includes('s'):!1;b=new olympe.net.Yj(a.host,a.port||(e?443:80),a.path||'',e,b,c,d,a.query||void 0);a.rs&&(c=a.rs.split(':'),2===c.length&&(c=olympe.X.ei().C(Fa(`${c[0]}:${c[1]}`)),Jb(b,{Authorization:`Basic ${c}`})));return b}function Kb(a){return void 0!==a.query?a.query.replace(/[^=&]+/g,b=>encodeURIComponent(b)):null}
350
350
  function Jb(a,b){for(let c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a.headers[c]=b[c])}
351
- olympe.net.Xj=class extends olympe.net.Xi{constructor(a,b,c,d,e,f,g,h){super(a,b,c,d);this.method=void 0!==e?e:olympe.net.ab.Gd.GET;this.query=h;this.headers={};this.body=f;this.F=void 0!==g?g:olympe.net.ab.ResponseType.xk;this.ca=this.cert=this.key=null;this.rejectUnauthorized=!1}kj(){return this.headers}C(){let a=Kb(this);a=a?`?${a}`:'';return Fb(this)?`${Hb(this)?'https':'http'}://${Fb(this)}:${this.port}/${Gb(this)}${a}`:`${Gb(this)}${a}`}toString(){return this.C()}};
352
- olympe.net.Xj.Gd={km:'POST',GET:'GET',rt:'HEAD',jk:'PUT',Cc:'DELETE',fm:'OPTIONS'};olympe.net.rf=class{constructor(a,b,c,d){this.data=a;this.status=void 0===b?200:b;this.statusText=void 0===c?'':c;this.headers=void 0===d?{}:d}getData(){return this.data}Sd(){return this.status}kj(){return this.headers}};function Lb(a,b,c){const d=olympe.D.Na(),e=d.onDestroy(()=>{var f=a.F();const g=f.C.get(b);g&&(f.C.delete(b),g())});return d.F(f=>{d.Ze(e);a.F().C.delete(b);c(f)})}function Mb(a,b){return new olympe.net.wf(a,b)}olympe.net.oa=class{constructor(a){this.N=a;this.K=1;a='Initializing NET layer';this.N.G()&&(a+=' (implementation: '+this.V()+')');this.N.info(a);this.N.log('DONE initializing NET layer (ready to receive connection requests)')}F(){}G(){}C(){}P(){}V(){}};function Nb(a){return!(!a.client||!a.client.connected)}function Ob(a,b){const c=()=>{const d=b(),e=d.Qd();return{username:`${a.P.vhost}:${d.zd()}`,password:e}};return Object.assign({},a.P,c(),{transformWsUrl:(d,e,f)=>{Object.assign(f.options,c());return d}})}function Pb(a,b,c){Nb(a)?a.client.subscribe(b,void 0,d=>{d?a.N.error(`Failed to subscribe to topic ${b}: ${d}`):a.C.set(b,c)}):c&&c(Error('Cannot subscribe because the MQTT client is disconnected'))}
351
+ olympe.net.Yj=class extends olympe.net.Yi{constructor(a,b,c,d,e,f,g,h){super(a,b,c,d);this.method=void 0!==e?e:olympe.net.ab.Fd.GET;this.query=h;this.headers={};this.body=f;this.F=void 0!==g?g:olympe.net.ab.ResponseType.yk;this.ca=this.cert=this.key=null;this.rejectUnauthorized=!1}lj(){return this.headers}C(){let a=Kb(this);a=a?`?${a}`:'';return Fb(this)?`${Hb(this)?'https':'http'}://${Fb(this)}:${this.port}/${Gb(this)}${a}`:`${Gb(this)}${a}`}toString(){return this.C()}};
352
+ olympe.net.Yj.Fd={lm:'POST',GET:'GET',st:'HEAD',kk:'PUT',Cc:'DELETE',gm:'OPTIONS'};olympe.net.qf=class{constructor(a,b,c,d){this.data=a;this.status=void 0===b?200:b;this.statusText=void 0===c?'':c;this.headers=void 0===d?{}:d}getData(){return this.data}Rd(){return this.status}lj(){return this.headers}};function Lb(a,b,c){const d=olympe.D.Na(),e=d.onDestroy(()=>{var f=a.F();const g=f.C.get(b);g&&(f.C.delete(b),g())});return d.F(f=>{d.Ng(e);a.F().C.delete(b);c(f)})}function Mb(a,b){return new olympe.net.vf(a,b)}olympe.net.oa=class{constructor(a){this.N=a;this.K=1;a='Initializing NET layer';this.N.G()&&(a+=' (implementation: '+this.V()+')');this.N.info(a);this.N.log('DONE initializing NET layer (ready to receive connection requests)')}F(){}G(){}C(){}P(){}V(){}};function Nb(a){return!(!a.client||!a.client.connected)}function Ob(a,b){const c=()=>{const d=b(),e=d.Pd();return{username:`${a.P.vhost}:${d.yd()}`,password:e}};return Object.assign({},a.P,c(),{transformWsUrl:(d,e,f)=>{Object.assign(f.options,c());return d}})}function Pb(a,b,c){Nb(a)?a.client.subscribe(b,void 0,d=>{d?a.N.error(`Failed to subscribe to topic ${b}: ${d}`):a.C.set(b,c)}):c&&c(Error('Cannot subscribe because the MQTT client is disconnected'))}
353
353
  function Qb(a,b,c){Nb(a)?(a.client.unsubscribe(b,void 0,c),a.C.delete(b)):c&&c(Error('Cannot unsubscribe because the MQTT client is disconnected'))}function Rb(a,b){a.F.push(b)}function Sb(a,b){a.K.push(b)}function Tb(a,b){a.G.push(b)}
354
- olympe.net.wf=class{constructor(a,b){this.url=a;this.P=b||null;this.client=null;this.F=[];this.K=[];this.G=[];this.$=[];this.V=[];this.C=new Map;this.N=olympe.ta.Za('MQTT')}connect(a,b){if(Nb(this))return b&&b(),this;b&&this.F.push(b);null===this.client&&(this.client=mqtt.connect(this.url,Ob(this,a)),this.client.on(olympe.net.wf.C.mu,(c,d)=>{this.C.has(c)?this.C.get(c)(JSON.parse(d.toString())):this.N.warn('There is no subscriber for topic '+c)}),this.client.on(olympe.net.wf.C.Js,()=>{this.N.info('Mqtt client is connected to bus');
355
- this.F.forEach(c=>c())}),this.client.on(olympe.net.wf.C.Nu,()=>{this.N.info('Mqtt client is reconnecting to bus ... ');this.K.forEach(c=>c())}),this.client.on(olympe.net.wf.C.cc,c=>{this.N.error('Mqtt client error ',c);this.$.forEach(d=>d(c))}),this.client.on(olympe.net.wf.C.Ni,()=>{this.N.info('Mqtt client is offline');this.G.forEach(c=>c())}),this.client.on(olympe.net.wf.C.Is,()=>{this.N.info('Mqtt client is closed');this.V.forEach(c=>c())}),this.client.on(olympe.net.wf.C.Dl,()=>{this.N.info('Mqtt client has ended')}));
356
- return this}publish(a,b,c,d){if(!Nb(this))return d&&d(Error('Cannot publish message because the MQTT client is disconnected')),this;this.client.publish(a,JSON.stringify(b),c,e=>{d&&d(e);e&&this.N.error('Failed to publish a message '+b)});return this}end(a,b){this.C.clear();this.client?this.client.end(a,{},()=>{b&&b();this.client=null}):null==b||b();return this}};olympe.net.wf.C={Js:'connect',Nu:'reconnect',mu:'message',Is:'close',Dl:'end',cc:'error',Ni:'offline'};olympe.net.Ek=class{constructor(a){this.N=a}start(){return Promise.reject('Try to start web server with the browser implementation.')}G(){return Promise.reject('Try to restart web server with the browser implementation.')}stop(){return Promise.reject('Try to stop web server with the browser implementation.')}la(){this.N.error('Try to set cors policies on a web server with the browser implementation.');return this}V(){return Promise.reject('Try to open a route on a web server using the browser implementation.')}ba(){return Promise.reject('Try to close a route on a web server using the browser implementation.')}};olympe.net.R={Aa:'net.Manager',Ea:'net.Logger',Dk:'net.WebServer'};olympe.net.Config={Kl:'net.httpHost',Ll:'net.httpPort',mp:'net.httpSSL',kp:'net.httpBodyLimit'};
357
- olympe.U.config(function(a){const b='object'===typeof window&&window.location&&window.location.hostname||'localhost',c='localhost'===b;E(a,olympe.net.Config.Kl,b);E(a,olympe.net.Config.Ll,c?3141:443);E(a,olympe.net.Config.mp,!c);E(a,olympe.net.Config.kp,100);va(a,olympe.net.R.Aa);C(a,olympe.net.R.Ea,[olympe.ta.R.Aa],function(d){return d.Qc('net')});A(a,olympe.net.R.Dk,olympe.net.Ek,olympe.net.R.Ea)},'olympe.net');olympe.async={};function Ub(a,b){0<=b&&(a.timeout=b)}function Vb(a,b){a.K||a.ba.push(a.G.F(b))}
358
- olympe.async.Lo=class{constructor(a,b=void 0===a){this.C=[];this.ba=[];this.G=a||new olympe.D.$b('Async executor context');this.qa=b;this.F=null;this.env=new Map;this.env.set('Executor',this);this.K=this.V=!1;this.N=null;this.P=this.timeout=0}Za(){return this.N}add(a){this.K||this.C.push(this.G.F(a));return this}start(){this.V||(this.N&&this.N.log('Executor started.'),this.V=!0,0<this.timeout&&(this.P=setTimeout(()=>{this.F='Timeout expired.';this.P=0;this.complete(!1)},this.timeout)))}clear(){this.C=
354
+ olympe.net.vf=class{constructor(a,b){this.url=a;this.P=b||null;this.client=null;this.F=[];this.K=[];this.G=[];this.$=[];this.V=[];this.C=new Map;this.N=olympe.ta.Za('MQTT')}connect(a,b){if(Nb(this))return b&&b(),this;b&&this.F.push(b);null===this.client&&(this.client=mqtt.connect(this.url,Ob(this,a)),this.client.on(olympe.net.vf.C.nu,(c,d)=>{this.C.has(c)?this.C.get(c)(JSON.parse(d.toString())):this.N.warn('There is no subscriber for topic '+c)}),this.client.on(olympe.net.vf.C.Ks,()=>{this.N.info('Mqtt client is connected to bus');
355
+ this.F.forEach(c=>c())}),this.client.on(olympe.net.vf.C.Ou,()=>{this.N.info('Mqtt client is reconnecting to bus ... ');this.K.forEach(c=>c())}),this.client.on(olympe.net.vf.C.cc,c=>{this.N.error('Mqtt client error ',c);this.$.forEach(d=>d(c))}),this.client.on(olympe.net.vf.C.Ni,()=>{this.N.info('Mqtt client is offline');this.G.forEach(c=>c())}),this.client.on(olympe.net.vf.C.Js,()=>{this.N.info('Mqtt client is closed');this.V.forEach(c=>c())}),this.client.on(olympe.net.vf.C.El,()=>{this.N.info('Mqtt client has ended')}));
356
+ return this}publish(a,b,c,d){if(!Nb(this))return d&&d(Error('Cannot publish message because the MQTT client is disconnected')),this;this.client.publish(a,JSON.stringify(b),c,e=>{d&&d(e);e&&this.N.error('Failed to publish a message '+b)});return this}end(a,b){this.C.clear();this.client?this.client.end(a,{},()=>{b&&b();this.client=null}):null==b||b();return this}};olympe.net.vf.C={Ks:'connect',Ou:'reconnect',nu:'message',Js:'close',El:'end',cc:'error',Ni:'offline'};olympe.net.Fk=class{constructor(a){this.N=a}start(){return Promise.reject('Try to start web server with the browser implementation.')}G(){return Promise.reject('Try to restart web server with the browser implementation.')}stop(){return Promise.reject('Try to stop web server with the browser implementation.')}la(){this.N.error('Try to set cors policies on a web server with the browser implementation.');return this}V(){return Promise.reject('Try to open a route on a web server using the browser implementation.')}ba(){return Promise.reject('Try to close a route on a web server using the browser implementation.')}};olympe.net.R={Aa:'net.Manager',Ea:'net.Logger',Ek:'net.WebServer'};olympe.net.Config={Ll:'net.httpHost',Ml:'net.httpPort',np:'net.httpSSL',mp:'net.httpBodyLimit'};
357
+ olympe.U.config(function(a){const b='object'===typeof window&&window.location&&window.location.hostname||'localhost',c='localhost'===b;E(a,olympe.net.Config.Ll,b);E(a,olympe.net.Config.Ml,c?3141:443);E(a,olympe.net.Config.np,!c);E(a,olympe.net.Config.mp,100);va(a,olympe.net.R.Aa);C(a,olympe.net.R.Ea,[olympe.ta.R.Aa],function(d){return d.Qc('net')});A(a,olympe.net.R.Ek,olympe.net.Fk,olympe.net.R.Ea)},'olympe.net');olympe.async={};function Ub(a,b){0<=b&&(a.timeout=b)}function Vb(a,b){a.K||a.ba.push(a.G.F(b))}
358
+ olympe.async.Mo=class{constructor(a,b=void 0===a){this.C=[];this.ba=[];this.G=a||new olympe.D.Xb('Async executor context');this.qa=b;this.F=null;this.env=new Map;this.env.set('Executor',this);this.K=this.V=!1;this.N=null;this.P=this.timeout=0}Za(){return this.N}add(a){this.K||this.C.push(this.G.F(a));return this}start(){this.V||(this.N&&this.N.log('Executor started.'),this.V=!0,0<this.timeout&&(this.P=setTimeout(()=>{this.F='Timeout expired.';this.P=0;this.complete(!1)},this.timeout)))}clear(){this.C=
359
359
  [];this.ba=[];this.env.clear();this.qa&&this.G.destroy()}complete(a){if(!this.K){this.K=!0;this.P&&(clearTimeout(this.P),this.P=0);this.N&&this.N.log(a?'Executor completed successfully':`Executor completed with error: ${this.F}`);for(const b of this.ba)b(a,a?null:this.F,this.env);this.clear()}}};
360
- function Wb(a){if(0<a.C.length){const b=a.C.shift();a.N&&a.N.log(`Executing next task. ${a.C.length} tasks left in the pipeline.`);a.G.run(()=>{b(()=>{Promise.resolve().then(()=>{Wb(a)})},c=>{c&&(a.F=c);a.complete(!1)},a.env)})}else a.complete(!0)}olympe.async.uk=class extends olympe.async.Lo{static create(){return new olympe.async.uk(new olympe.D.$b('SequencedExecutor'),!0)}insert(a){this.K||this.C.unshift(a);return this}start(){this.V||(super.start(),Wb(this))}};
361
- olympe.async.ug=class extends olympe.async.Lo{constructor(a,b){super(a,b);this.$=0;this.la=!0}static create(){return new olympe.async.ug(new olympe.D.$b('ParallelExecutor'),!0)}run(a){this.N&&this.N.log('Starting a task');this.G.run(()=>{a(()=>{this.done()},b=>{this.la=!1;b&&(this.F=this.F?`${this.F}. ${b}`:b);this.done()},this.env)})}add(a){super.add(a);this.V&&!this.K&&(this.$++,this.run(a));return this}done(){this.$--;0>=this.$&&this.complete(this.la)}start(){if(!this.V)if(super.start(),0<this.C.length){this.$=
362
- this.C.length;for(const a of this.C)this.run(a)}else this.complete(!0)}};olympe.kc={};olympe.kc.au=class{constructor(){}set(){}get(){}forEach(){}remove(){}clear(){}close(){}};olympe.kc.$t=class{constructor(){}C(){}};olympe.kc.Storage=class{open(){}F(){}P(){}write(){}G(){}K(){}C(){}close(){}};function Xb(a,b,c){a.storage.F(c)}function Yb(a,b,c,d,e){a.storage.write(b,'transactions',c.toJSON(),'text/json',d,e)}function Zb(a,b){a.storage.G(b)}function $b(a,b){a.storage.C(b)}function ac(a,b,c,d,e,f){a.storage.write(b,'files',c,d,()=>{e('files/'+b)},f)}function bc(a,b){a.storage.P(b)}olympe.kc.Ws=class{constructor(a){this.storage=a}};olympe.kc.R={ak:'localStorage.KeyValueManager',Ui:'localStorage.Storage',to:'localStorage.DatacloudStorage',Ea:'localStorage.Logger'};olympe.U.config(function(a){va(a,olympe.kc.R.ak);C(a,olympe.kc.R.Ea,[olympe.ta.R.Aa],function(b){return b.Qc('localstorage')});A(a,olympe.kc.R.to,olympe.kc.Ws,olympe.kc.R.Ui)},'olympe.localstorage');olympe.host={};const cc=new Map,dc=new Map;olympe.host.Yp=class{static register(a,b,...c){cc.set(a,b);0<c.length&&dc.set(a,c)}static create(a,b,c,d){const e=cc.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=dc.get(a);return void 0!==a?new e(b,c,...a.map(f=>oa(d,f))):new e(b,c)}};function ec(a,b,c){a.N.debug('CREATE #',b,', type=',c);a.C.set(b,olympe.host.Yp.create(c,b,a.N,a.K))}function fc(a,b,c,...d){const e=a.C.get(b);if(void 0!==e){a.N.P()<=olympe.ta.Ob.C.kg&&a.N.debug('CALL #'+b+', '+c+'('+Array.prototype.slice.call(d,0)+')');b=[];for(const f of d)if(void 0===f||null===f)b.push(f);else if(olympe.D.ob(f))b.push(a.C.get(f.xv)||null);else if('function'===typeof f){const g=f,h=olympe.D.Na();b.push((...k)=>{h.G()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
363
- function gc(a){var b=olympe.host.ea.dd,c=olympe.host.ea.Xp.kr;++a.G;const d=a.G;ec(a,d,c);const e=olympe.D.createNode(b,void 0,void 0,void 0,void 0,'Native('+d+')',!1,function(){var f=arguments.length-2;const g=Array.from({length:f}),h=[],k=arguments[f+1],l=d+'_'+k;this.F.has(l)&&this.F.get(l).destroy();for(let n=0;n<f;n++){let p=arguments[n];olympe.D.ob(p)?(h.push(n),p=p.Qa):olympe.D.$f(p)&&h.push(n);g[n]=p}0===h.length?e.run(()=>{fc(this,d,k,...g)}):(f=olympe.D.createNode(void 0,(...n)=>{e.run(()=>
364
- {fc(this,d,k,...n)})},void 0,g,h,'Native('+d+').'+k),this.F.set(l,f),f.onDestroy(()=>this.F.delete(l)));return null}.bind(a));e.P(a.P.bind(a,d));a=L(e);a.xv=d;K(e,a);return a}olympe.host.oa=class{constructor(a,b){this.N=a;this.K=b;this.G=0;this.C=new Map;this.F=new Map;a.debug('Starting host manager')}Za(){return this.N}P(a){this.N.debug('DESTROY #',a);const b=this.C.get(a);this.C.delete(a);b.destroy()}};olympe.host.Hd=class{constructor(a){this.C=a;this.F=olympe.D.Na()}K(){return this.C}$(){return this.C.Qa.$()||this.F.$()}G(){return this.C.Qa.G()}};olympe.host.Hd.prototype.K.L=new olympe.D.J(()=>olympe.host.ea.Hd,[]);olympe.host.wk=class{};olympe.host.Gi=class{constructor(){}C(){}F(){}rj(){}};function hc(a){return(a=a.find(b=>'authToken'===b.na()))?a.getValue():null}olympe.host.Gi.F=class{constructor(a,b,c=!1){this.name=a;this.value=b;this.C=c}na(){return this.name}getValue(){return this.value}nb(a){return this.na()===a.na()&&this.getValue()===a.getValue()&&this.C===a.C}};function ic(){const a={}.parameters;return new olympe.host.Gi.C(a?a.map(b=>new olympe.host.Gi.F(b.name,b.value,b.hidden)):[])}
365
- olympe.host.Gi.C=class{constructor(a){this.parameters=a}sn(a){const b=new Map(this.parameters.map((c,d)=>[c.na(),d]));a.parameters.forEach(c=>{b.has(c.na())?this.parameters[b.get(c.na())]=c:this.parameters.push(c)})}};function jc(a,b){var c=olympe.host.cf;const d=olympe.X.bc(),e=new olympe.D.$b('onTimeout context');c.C.$(b,d,()=>{e.G()||e.$()||e.run(a);c.C.G(d)});return new olympe.host.dd.G(c.C,d,e)}function kc(a,b){var c=olympe.host.cf;const d=olympe.X.bc(),e=new olympe.D.$b('onInterval context');c.C.V(b,d,()=>{e.G()||e.$()?c.C.F(d):e.run(a)});return new olympe.host.dd.F(c.C,d,e)}function lc(a){var b=olympe.host.cf;a=a instanceof olympe.host.dd.F?a.Z():a;b.C.F(a)}olympe.host.dd=class{constructor(a){this.C=gc(a)}};
366
- olympe.host.dd.C=class{constructor(a,b,c){this.cf=a;this.id=b;this.C=null!=c?c:null}Z(){return this.id}cancel(){}};olympe.host.dd.K=class extends olympe.host.dd.C{cancel(){this.cf.P(this.id);let a;null==(a=this.C)||a.destroy();this.C=null}};olympe.host.dd.G=class extends olympe.host.dd.C{cancel(){this.cf.G(this.id);let a;null==(a=this.C)||a.destroy();this.C=null}};olympe.host.dd.F=class extends olympe.host.dd.C{cancel(){this.cf.F(this.id);let a;null==(a=this.C)||a.destroy();this.C=null}};olympe.host.Ri=class{F(){return''}ba(){return''}V(){}C(){return''}K(){}};olympe.host.ea={};olympe.host.ea.Hd=class{destroy(){}};olympe.host.ea.Hd.prototype.destroy=olympe.host.ea.Hd.prototype.destroy;olympe.host.ea.Xp={qz:100,sz:101,rz:102,vz:103,uz:104,pz:105,wB:201,uB:202,rB:204,zB:205,qB:206,tB:207,xB:208,AB:209,BB:210,CB:211,sB:212,yB:218,vB:219,DB:220,pB:221,oB:222,MB:300,NB:301,OB:302,SB:303,TB:304,UB:305,PB:310,QB:311,RB:312,XA:400,YA:401,ZA:402,TA:450,LA:500,JA:501,OA:502,NA:503,KA:504,MA:505,mC:600,dC:601,hC:602,$B:603,aC:604,YB:605,cC:606,sC:607,kC:608,VB:609,ZB:610,bC:611,jC:612,oC:613,WB:614,nC:615,iC:616,rC:617,eC:618,fC:619,gC:620,lC:630,XB:631,pC:632,qC:633,VC:700,yC:701,zC:702,
367
- AC:703,CC:704,DC:705,EC:706,BC:707,GC:708,FC:709,HC:710,LC:711,TC:712,IC:713,JC:714,MC:715,NC:716,PC:717,QC:718,SC:719,OC:720,RC:721,UC:722,KC:723,WC:724,XC:725,kr:800};olympe.host.ea.dd=class{P(){}$(){}G(){}V(){}F(){}};olympe.host.R={Tq:'host.System',Jl:'host.HistoryManager',Iq:'host.Scheduler',Ea:'host.platform.Logger',Aa:'host.Manager',tg:'host.ProcessManager'};olympe.host.Config={oq:'host.processProbe'};olympe.host.cf=null;
368
- olympe.U.config(function(a){va(a,olympe.host.R.Tq);va(a,olympe.host.R.Jl);A(a,olympe.host.R.tg,olympe.host.Ri);C(a,olympe.host.R.Ea,[olympe.ta.R.Aa],function(b){return b.Qc('host')});A(a,olympe.host.R.Aa,olympe.host.oa,olympe.host.R.Ea,olympe.U.R.jg);C(a,olympe.host.R.Iq,[olympe.host.R.Aa],b=>{null===olympe.host.cf&&(olympe.host.cf=new olympe.host.dd(b));return olympe.host.cf},!0)},'olympe.host');olympe.U.run([olympe.host.R.Iq],a=>a,'olympe.host.scheduler');olympe.U.run([olympe.host.R.Aa],a=>a,'olympe.host');
369
- olympe.U.run([olympe.host.R.tg],a=>{olympe.host.Qk=()=>a});olympe.auth={};olympe.auth.gv=class{ba(){}V(){}$(){}eb(){}qa(){}wh(){}rh(){}G(){}P(){return-1}Qr(){}};function mc(a){a.N.info('Initializing AUTH layer');let b=a.uc;if(a.Fa){const c=a.Fa.C(),d=hc(c.parameters);b=d||b;d&&a.Fa.F(c.parameters.filter(e=>'authToken'!==e.na()))}b&&a.storage&&nc(a.storage,b,c=>{!c&&a.N.error('Could not store authToken')});a.N.debug('Asking to be notified when auth connector gets online');a.F.ba(()=>{if(a.Wa)if(a.K=olympe.auth.oa.G.us,a.N.log('Connector online, parameter auth.autoLogin=true --\x3e attempting to log with parameters'),a.ba){const c=new olympe.auth.Request;c.set('username',
370
- a.ba);c.Cn(a.xb);a.N.log('Autologin with user "'+a.ba+'"');oc(a,c)}else a.N.error('autoLogin: auto user not specified.'),pc(a);else a.K=olympe.auth.oa.G.yk,a.N.log('Connector online, attempting to log with token'),qc(a)});a.F.V(()=>{switch(olympe.D.Xa(a.G)){case olympe.auth.oa.C.hf:a.N.warn('Disconnected from server - session of user '+olympe.D.Xa(a.C.zb()).zd()+' lost');break;case olympe.auth.oa.C.og:a.N.warn('Disconnected from server - guest session lost');break;case olympe.auth.oa.C.ni:a.N.warn('Disconnected from server - authentication aborted');
371
- break;case olympe.auth.oa.C.INIT:a.N.warn('Cannot open auth session - no server connection');break;default:a.N.error('Should not get there, investigate')}rc(a,olympe.auth.oa.C.lf)});a.F.$(c=>{switch(c){case olympe.H.oa.C.Yh:rc(a,olympe.auth.oa.C.Yh);break;case olympe.H.oa.C.zh:rc(a,olympe.auth.oa.C.zh)}});a.F.eb((c,d)=>{if(c===olympe.auth.oa.F.Dj)a.N.info('Authentication revoked'),pc(a),a.storage&&sc(a.storage),a.V.forEach(e=>{e(c,d)});else if(c===olympe.auth.oa.F.op)a.N.info('Redirection to IDP to invalidate token (SAML)'),
372
- olympe.D.Xa(a.C.zb()),a.storage&&sc(a.storage),a.eb.F();else throw Error(`Unknown logout step coming from server : ${c}`);});a.Ka=tc(a);a.$.F(()=>x(function*(){return a.Yk()}));a.N.log('DONE initializing AUTH layer (waiting for connector to be online)')}
373
- function qc(a){null!==a.storage?(a.N.debug('Retrieving token from local storage'),a.storage.Zc(b=>{if(b){const d=new olympe.auth.Request;var c=b.zd();d.set('username',c);c=d;b=b.Qd();c.set('nonce',b);a.N.debug('Token found, trying login with',d);oc(a,d,a.fc)}else a.N.debug('No token found, cannot perform auto login. Falling back in GUEST state'),pc(a)})):(a.N.error('Cannot retrieve token: no storage configured, cannot perform auto login. Falling back in GUEST state'),pc(a))}
374
- function rc(a,b){a.N.log('State change: ',uc(a),'--\x3e',b);a.G.update(b)}function pc(a){a.C.update(a.qa);rc(a,olympe.auth.oa.C.og);a.N.info('Authenticated as guest')}function tc(a){const b=[olympe.auth.oa.C.hf];a.Wa||b.push(olympe.auth.oa.C.og);return a.$.C(()=>{const c=uc(a);return b.includes(c)?Promise.resolve('The auth manager is OK'):Promise.reject(`The auth manager is not in valid state, the current state is: ${c}`)})}function uc(a){return olympe.D.Xa(a.G.zb())}
375
- function vc(a){const b=olympe.auth.oa.C.hf,c=olympe.auth.oa.C.og,d=olympe.auth.oa.C.ni,e=olympe.D.Ic(olympe.D.ra,'auth.isOnline');olympe.D.wc([a.G],f=>{f=olympe.D.Ac(f===b||f===c||f===d);const g=olympe.D.Xa(e);void 0!==g&&g.nb(f)||e.update(f)},'Router is online');return e.zb()}function wc(a,b,c){void 0===c&&(c=olympe.X.Fg());a.V.set(c,b)}function xc(a,b,c,d=!1){b=b+c?':'+c.message:'';a.N.error(b);a.error.update(olympe.D.Bb(b));rc(a,olympe.auth.oa.C.cc);if(d)throw Error(b);}
376
- function oc(a,b,c,d){void 0===c&&(c=a.Db);void 0===c&&xc(a,'No authentication provider specified',null,!0);const e=a.Jb.get(c);e||xc(a,'Undefined authentication provider "'+c+'"',null,!0);d&&a.P.set('login',d);a.N.log('Sending authentication request using "'+c+'" for '+b);e.Zc(b,a.hc.bind(a));rc(a,olympe.auth.oa.C.ni)}function yc(a,b,c){a.P.forEach(d=>{d(b,c)})}
377
- olympe.auth.oa=class{constructor(a,b,c,d,e,f,g,h,k,l,n,p,q){this.N=a;this.F=b;this.storage=c;this.eb=d;this.Fa=e;this.Db=h;this.fc=k;this.Wa=void 0===l?!0:l;this.ba=n;this.xb=p;this.uc=q;this.Jb=new Map;this.$=f;this.Ka='';this.G=olympe.D.Ic(String).update(olympe.auth.oa.C.INIT);this.error=olympe.D.Ic(olympe.D.$a);this.K=null;this.qa=new olympe.auth.Bf('guest','0163d9653067b6237f62','e96e099c-55bb-4004-b0e8-bd76b6209218');this.C=olympe.D.Ic(olympe.auth.Bf).update(this.qa);this.P=new Map;this.V=new Map;
378
- g.forEach(r=>{const t=r.na();if(this.Jb.has(t))throw Error('Provider "'+t+'" has already been registered !');this.Jb.set(t,r)});mc(this)}getState(){return this.G.zb()}la(){return this.error.zb()}zd(){return this.C.zb().zd()}Kg(){return this.C.zb().Kg()}gi(){return this.C.zb().gi()}rh(a,b){let c;this.F.rh(a,null==(c=olympe.D.Xa(this.C.zb()))?void 0:c.Qd(),b)}Yk(){olympe.D.Xa(this.C)===this.qa?this.N.warn('Logout called for Guest user so it will be ignored'):(this.N.debug('Sending logout'),sc(this.storage),
379
- this.F.qa(olympe.D.Xa(this.C.zb()),a=>{a?xc(this,'Logout request rejected:',a):this.N.debug('Logout request acknowledged')}),this.$.K(this.Ka))}wh(){uc(this)===olympe.auth.oa.C.hf&&this.F.wh(a=>{a&&this.N.error('Was not able to send the auth keep alive message:',a.message)})}hc(a,b){const c=null===this.K?olympe.auth.oa.G.ju:this.K;this.K=null;a?(this.N.warn('Authentication rejected: '+a.message+'. Falling back into GUEST state'),sc(this.storage),this.error.update(olympe.D.Bb(a.message)),pc(this),
380
- yc(this,a,c)):(this.N.info('User '+b.zd()+' (#'+b.Kg()+') successfully authenticated'),this.C.update(b),rc(this,olympe.auth.oa.C.hf),yc(this,a,c),this.storage&&nc(this.storage,b));this.P.has('login')&&this.P.delete('login')}};olympe.auth.oa.C={INIT:'init',Yh:'waking',zh:'awake',lf:'disconnected',og:'guest',ni:'authenticating',cc:'error',hf:'authenticated'};olympe.auth.oa.G={ju:'manual',us:'auto',yk:'tokenOnFirstConnection'};olympe.auth.oa.F={Dj:'accepted',op:'redirect'};olympe.auth.Si=class{na(){}Zc(){}};function zc(a){return a.get('idpName')}olympe.auth.Request=class{constructor(){this.C=new Map}set(a,b){olympe.D.wc([b],c=>{this.C.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.C.get(a.toLowerCase()))&&a.Ff&&(a=a.Qa.Kb);return a?a.valueOf():a}zd(){return this.get('username')}Cn(a){this.set('password',a);return this}Qd(){return this.get('nonce')}toString(){return this.zd()+(this.Qd()?' with nonce':'')+(this.get('password')?' with password':'')+(zc(this)?` with idp name ${zc(this)}`:'')}};olympe.auth.Bf=class{constructor(a,b,c,d={}){this.user=a;this.Cj=b;this.G=c;this.C=null;this.K=d}zd(){return this.user}Kg(){return this.Cj}Qd(){return this.G}Zj(){return this.K}gi(){return null}Ih(){return this.C}ka(){var a=olympe.X.fi(),b=Object.assign({},{user:this.user,userTag:this.Cj,nonce:this.G},this.C&&{idpName:this.C},{payload:this.K}),c=olympe.X,d=c.yr;b=JSON.stringify(b);a=a.C(Fa(b));return d.call(c,a)}};m=olympe.auth.Bf.prototype;m.zd.L=new olympe.D.J(()=>String,[]);
381
- m.Kg.L=new olympe.D.J(()=>String,[]);m.Qd.L=new olympe.D.J(()=>String,[]);m.Zj.L=new olympe.D.J(()=>Object,[]);m.gi.L=new olympe.D.J(()=>String,[]);m.Ih.L=new olympe.D.J(()=>String,[]);m.ka.L=new olympe.D.J(()=>String,[]);olympe.auth.im=class extends olympe.auth.Bf{constructor(a,b,c,d){super(a,b,c,d)}gi(){return this.Zj().access_token||null}};olympe.auth.Hq=class extends olympe.auth.Bf{constructor(a,b,c,d){super(a,b,c,d);this.F=null}gi(){return this.F}ka(){var a=olympe.X.fi(),b=Object.assign({},{user:this.zd(),userTag:this.Kg(),nonce:this.Qd()},this.Ih()&&{idpName:this.Ih()},{payload:this.Zj(),fullToken:this.F}),c=olympe.X,d=c.yr;b=JSON.stringify(b);a=a.C(Fa(b));return d.call(c,a)}};function nc(a,b,c){const d=a.C.C('AUTH');d.set(a.key,'string'===typeof b?b:b.ka(),e=>{d.close();c&&c(e)})}function sc(a){const b=a.C.C('AUTH');b.remove(a.key,()=>b.close())}
382
- olympe.auth.Dm=class{constructor(a,b,c){this.C=a;this.N=b;this.key='OlympeToken-'+c.C}Zc(a){const b=this.C.C('AUTH');this.N.debug(`olympe.auth.TokenStorage: retrieve token with key ${this.key}`);b.get(this.key,c=>{let d=null;if(c)try{this.N.debug('olympe.auth.TokenStorage: Token retrieved successfully');var e=JSON,f=e.parse;var g=Ga(olympe.X.fi().P(olympe.X.Pv(c)));const h=f.call(e,g);let k;h.fullToken?(k=new olympe.auth.Hq(h.user,h.userTag,h.nonce,h.payload),k.F=h.fullToken):h.payload&&h.payload.id_token?
383
- k=new olympe.auth.im(h.user,h.userTag,h.nonce,h.payload):k=new olympe.auth.Bf(h.user,h.userTag,h.nonce,h.payload);h.idpName&&(k.C=h.idpName);d=k}catch(h){this.N.error('Error while unserializing token: ',h.message)}else this.N.debug('olympe.auth.TokenStorage: No token found');b.close();a(d)})}};olympe.auth.Dm.F='OlympeToken';olympe.auth.Dm.C='AUTH';olympe.auth.qk=class{redirect(){}F(){}C(){}};olympe.auth.qk.C={GET:'GET',km:'POST'};olympe.auth.nl=class{constructor(a){this.C=a||'default'}};olympe.auth.Jb={};olympe.auth.Jb.sa={};olympe.auth.Jb.sa.Li=class{la(){}};olympe.auth.Jb.sa.Oe=class{Fa(){}};olympe.auth.Jb.sa.Ie=class{Ka(){}Wa(){}};function Ac(a,b){return olympe.X.pb(b+'-olympe-'+a.C[b])}olympe.auth.Jb.Ki=class{constructor(a){this.C=a}na(){return'local'}Zc(a,b){const c=a.zd();if(c){const d=a.get('password'),e=a.Qd();a.C.delete('password');if(void 0!==e&&Ac(this,c)===e){b(null,new olympe.auth.Bf(c,'',Ac(this,c)));return}a=olympe.X.pb(d||'');if(this.C[c]===a){b(null,new olympe.auth.Bf(c,'',Ac(this,c)));return}}b(Error('Invalid login'))}};olympe.auth.Jb.Ki.C='local';olympe.auth.Jb.Ki.ma=[olympe.auth.Si];olympe.auth.Jb.Li=class{constructor(a,b){this.C=a;this.storage=b}na(){return'localToken'}Zc(a,b){this.storage.Zc(c=>{this.C.la(a,(d,e)=>{c&&e&&c.Ih()&&(e.C=c.Ih());b(d,e||c)})})}};olympe.auth.Jb.Li.C='localToken';olympe.auth.Jb.Li.ma=[olympe.auth.Si];olympe.auth.Jb.hm=class{constructor(a,b){this.C=a;this.F=b}na(){return'openID'}Zc(a){const b=encodeURIComponent(this.C.C());a=zc(a)?`idpName=${zc(a)}&`:'';this.C.redirect(`${this.F}/auth?${a}url=${b}`,null,olympe.auth.qk.C.GET)}};olympe.auth.Jb.hm.C='openID';olympe.auth.Jb.hm.ma=[olympe.auth.Si];olympe.auth.Jb.Oe=class{constructor(a,b){this.F=a;this.C=b}na(){return'saml'}Zc(a,b){this.F.Fa(a,c=>{c?b(c):this.C.F(zc(a))})}};olympe.auth.Jb.Oe.C='saml';olympe.auth.Jb.Oe.ma=[olympe.auth.Si];olympe.auth.Jb.Ie=class{static gj(a,b){const c=new SRPClient,d=c.generateRandomSalt();return{username:a,login:a,salt:d,verifier:c.generateVerifier(d,a,b)}}constructor(a){this.C=a;this.N=olympe.ta.Za('auth')}na(){return'srp'}Zc(a,b){const c=a.get('password');a.C.delete('password');this.N.debug('Sending SRP request');this.C.Ka(a,(d,e,f)=>{this.N.debug('Received Salt+B message');if(d)b(d);else{try{const g=new SRPClient;g.step1(a.zd(),c);const h=g.step2(e,f);a.set('a',h.A);a.set('m1',h.M1)}catch(g){b(g);
384
- return}this.N.debug('Sending SRP A+M (proof) message');this.C.Wa(a,b)}})}};olympe.auth.Jb.Ie.C='srp';olympe.auth.Jb.Ie.ma=[olympe.auth.Si];olympe.auth.R={Aa:'auth.Manager',Ea:'auth.Logger',Ui:'auth.Storage',Ej:'auth.appNameToken',lk:'auth.Redirector'};olympe.auth.sd={Aa:'auth.ManagerConnector',Ip:'auth.LocalTokenConnector',Ie:'auth.SRPConnector',Oe:'auth.SAMLConnector'};olympe.auth.Config={zl:'auth.defaultProvider',Jp:'auth.localTokenProvider',ll:'auth.autoLogin',On:'auth.autoUser',Ln:'auth.autoPassword',yk:'auth.token',Jn:'auth.appToken'};
385
- olympe.U.config(function(a){E(a,olympe.auth.Config.zl,'srp');E(a,olympe.auth.Config.Jp,'localToken');E(a,olympe.auth.Config.ll,!1);E(a,olympe.auth.Config.On,'');E(a,olympe.auth.Config.Ln,'');E(a,olympe.auth.Config.yk,'');E(a,olympe.auth.Config.Jn,'default');C(a,olympe.auth.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('auth'));A(a,olympe.auth.R.Ej,olympe.auth.nl,new olympe.U.fa(olympe.auth.Config.Jn));A(a,olympe.auth.R.Ui,olympe.auth.Dm,olympe.kc.R.ak,olympe.auth.R.Ea,olympe.auth.R.Ej);va(a,olympe.auth.sd.Aa);va(a,
386
- olympe.auth.R.lk);C(a,olympe.auth.R.Aa,[olympe.auth.R.Ea,olympe.auth.sd.Aa,olympe.host.R.Jl,olympe.host.R.tg,new olympe.U.sb(olympe.auth.R.Ui,olympe.U.kf.C.Lh),new olympe.U.fa(olympe.auth.Config.zl),new olympe.U.fa(olympe.auth.Config.Jp),new olympe.U.fa(olympe.auth.Config.ll),new olympe.U.fa(olympe.auth.Config.On),new olympe.U.fa(olympe.auth.Config.Ln),new olympe.U.fa(olympe.auth.Config.yk),new olympe.U.sb(olympe.auth.R.lk,olympe.U.kf.C.Lh),new olympe.U.sb(olympe.auth.sd.Ip,olympe.U.kf.C.Lh),new olympe.U.sb(olympe.auth.sd.Ie,
387
- olympe.U.kf.C.Lh),new olympe.U.sb(olympe.auth.sd.Oe,olympe.U.kf.C.Lh)],(b,c,d,e,f,g,h,k,l,n,p,q,r,t,u)=>{const v=[];r&&v.push(new olympe.auth.Jb.Li(r,f));t&&v.push(new olympe.auth.Jb.Ie(t));u&&q&&v.push(new olympe.auth.Jb.Oe(u,q));q&&c&&v.push(new olympe.auth.Jb.hm(q,c.Qr()));if(0===v.length)throw Error('At least one provider is needed for auth to start');if(!v.map(w=>w.na()).includes(g))throw Error('Default provider name'+g+'given by parameter'+olympe.auth.Config.zl+'cannot be found');return new olympe.auth.oa(b,
388
- c,f,q,d.rj()?d:null,e,v,g,h,k,l,n,p)},!0)},'olympe.auth');olympe.U.run([olympe.auth.R.Aa],a=>{olympe.auth.Sc=()=>a});olympe.dc={};olympe.dc.Ca={ORIGIN:'<',DESTINATION:'>'};z('olympe.dc.Direction',olympe.dc.Ca);olympe.dc.mc={Vc:'ff022000000000000000',yi:'ff02200000000000000e',ho:'ff02200000000000000f'};olympe.dc.Zb={VERSION:'@v',Id:'@s'};olympe.dc.Yg={lc:'?'};olympe.dc.vk={bq:'online',Ni:'offline',yt:'invalidate'};olympe.dc.Ia={rb:'self',Lc:'server',iq:'peer',lc:'server'};olympe.dc.za=function(a){if('string'===typeof a)return a;let b=null;a=olympe.D.Xa(a);void 0!==a&&null!==a&&(a=a.valueOf(),'string'===typeof a?b=a:a.T?b=a.T():'function'===typeof a&&(b=olympe.dc.ya.Lb(a)));return b||''};z('olympe.dc.instanceToTag',olympe.dc.za);olympe.dc.La=function(){return olympe.dc.yd().view};olympe.dc.register=function(a,b){olympe.dc.ya.C(a,b)};olympe.dc.defineProperty=function(a){return new olympe.dc.ua.Property(a)};
389
- olympe.dc.mh=function(a,b=olympe.dc.Ca.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.Ca.DESTINATION){const e=olympe.dc.Ca.DESTINATION;return b===olympe.dc.Ca.ORIGIN||b===e?new olympe.dc.ua.Relation(a,b):new olympe.dc.ua.Relation(a,d,b,c)};olympe.dc.aw=function(a){return a.zc()};olympe.dc.Writable=class{F(){}rc(){}Fc(){}Va(){}ic(){}};olympe.dc.mm=class{Oc(){}Z(){}G(){}};function Bc(a,b,c,d,e,f,g){d=new olympe.dc.ha(olympe.dc.ha.ja.Vh,{file:b,url:null,content:c,$e:e?h=>{Cc(a,b,c);f(h)}:f,mimeType:d,ve:g||null},[olympe.dc.La().source(b)||olympe.dc.Ia.Lc]);a.F.send(d)}function Dc(a,b,c,d,e,f){c=c instanceof olympe.D.$a?c.valueOf():c;'string'===typeof c?c=new Blob([Fa(c)],{type:d}):c instanceof ArrayBuffer&&(c=new Blob([c],{type:d}));Bc(a,b,c,d,a.G,e,f)}
390
- function Cc(a,b,c){const d=olympe.dc.za(b);a.C.set(d,c);const e=olympe.X.Fg();Ec(olympe.dc.La(),d,f=>{f||(a.C.delete(d),Fc(olympe.dc.La(),d,e))},e)}function Gc(a,b,c,d){olympe.D.es([b.Xr(),b.T(),b.Tl(),b.hn()],(e,f,g,h)=>{a.C.has(f)?c(a.C.get(f)):(e=new olympe.dc.ha(olympe.dc.ha.ja.Ch,{file:f,url:e.valueOf()?null:g,mimeType:h.valueOf(),$e:a.G?k=>{Cc(a,f,k);c(k)}:c,ve:d},[olympe.dc.La().source(f)||olympe.dc.Ia.Lc]),a.F.send(e))})}
391
- olympe.dc.kt=class{constructor(a,b,c,d,e){this.N=a;this.F=c;this.G=e;this.C=new Map}};olympe.dc.oa=class{constructor(a){this.N=a}};function Hc(a,b){a.F=b;return a}function M(a,b){a.ai.unshift(b);return a}olympe.dc.ha=class{constructor(a,b,c){this.type=a;this.content=b;this.C=c;this.ai=[];this.F=olympe.D.Na()}validate(a=null){this.ai.forEach(b=>{b(a||null)})}toString(){const a=olympe.X.Nr(olympe.dc.ha.ja,this.type);return a?a:'UNKNOWN_MESSAGE'}};
392
- olympe.dc.ha.ja={cc:1,rg:2,Xg:10,yA:11,av:20,HB:21,IB:22,dv:23,Ci:24,Bi:25,zA:26,Zo:28,pm:30,rm:31,Iu:32,jh:40,zk:41,Bh:45,Ij:46,Rj:47,Vh:50,Ch:51,xi:52,uv:60,Ou:61,mt:62,nt:63,Gs:64,rl:65,xA:90,yl:91,Il:92,$o:93,Ep:94,ek:95,bv:96,QUERY_RESULT:97,qm:98};olympe.dc.vg=class{process(){}};olympe.dc.nm=class{constructor(...a){this.Ub=a}process(a,b,c){const d=this.Ub.length,e=(f,g,h)=>{g||f>=d?c(g,h):this.Ub[f].process(a,h,e.bind(null,f+1))};e(0,null,b)}};olympe.dc.nm.ma=[olympe.dc.vg];function Ic(a){return olympe.dc.CloudObject.get(a.tag)}olympe.dc.Ec=class{constructor(a){this.tag='string'===typeof a?a:a.T()}T(){return this.tag}toJSON(){return'{ "type": "reference", "tag": '+JSON.stringify(this.tag)+' }'}nb(a){return a instanceof olympe.dc.Ec&&this.tag===a.tag}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.Ec(b.tag)}};olympe.dc.Ec.ma=[olympe.dc.De];olympe.dc.Ec.prototype.toJSON.L=olympe.D.J.C;olympe.dc.Ec.prototype.nb.L=olympe.D.J.C;olympe.dc.wg=class{send(){}C(){}la(){}};const Jc=olympe.dc.Ca.ORIGIN,Kc=olympe.dc.Ca.DESTINATION,Lc=new Map,Mc=new Map,Nc=new Map,Oc=new Map;function Pc(a,b){var c=olympe.dm.File;let d=c;'function'===typeof c&&(d=b.entry);c=[...(d.En||[])];return olympe.dc.ya.C(a,b,...c)}function Qc(a,b){Oc.set(a,b);return a}function Rc(a){return(a=Lc.get(a))&&a.C||olympe.dc.CloudObject}function Sc(a,b,c){const d=a+'@'+(b===Kc?Jc:Kc);if(Mc.has(d))throw Error(`Try to register the same relation (${b+a}) multiple times.`);Mc.set(d,c)}
360
+ function Wb(a){if(0<a.C.length){const b=a.C.shift();a.N&&a.N.log(`Executing next task. ${a.C.length} tasks left in the pipeline.`);a.G.run(()=>{b(()=>{Promise.resolve().then(()=>{Wb(a)})},c=>{c&&(a.F=c);a.complete(!1)},a.env)})}else a.complete(!0)}olympe.async.vk=class extends olympe.async.Mo{static create(){return new olympe.async.vk(new olympe.D.Xb('SequencedExecutor'),!0)}insert(a){this.K||this.C.unshift(a);return this}start(){this.V||(super.start(),Wb(this))}};
361
+ olympe.async.rg=class extends olympe.async.Mo{constructor(a,b){super(a,b);this.$=0;this.la=!0}static create(){return new olympe.async.rg(new olympe.D.Xb('ParallelExecutor'),!0)}run(a){this.N&&this.N.log('Starting a task');this.G.run(()=>{a(()=>{this.done()},b=>{this.la=!1;b&&(this.F=this.F?`${this.F}. ${b}`:b);this.done()},this.env)})}add(a){super.add(a);this.V&&!this.K&&(this.$++,this.run(a));return this}done(){this.$--;0>=this.$&&this.complete(this.la)}start(){if(!this.V)if(super.start(),0<this.C.length){this.$=
362
+ this.C.length;for(const a of this.C)this.run(a)}else this.complete(!0)}};olympe.jc={};olympe.jc.bu=class{constructor(){}set(){}get(){}forEach(){}remove(){}clear(){}close(){}};olympe.jc.au=class{constructor(){}C(){}};olympe.jc.Storage=class{open(){}F(){}P(){}write(){}G(){}K(){}C(){}close(){}};function Xb(a,b,c){a.storage.F(c)}function Yb(a,b,c,d,e){a.storage.write(b,'transactions',c.toJSON(),'text/json',d,e)}function Zb(a,b){a.storage.G(b)}function $b(a,b){a.storage.C(b)}function ac(a,b,c,d,e,f){a.storage.write(b,'files',c,d,()=>{e('files/'+b)},f)}function bc(a,b){a.storage.P(b)}olympe.jc.Xs=class{constructor(a){this.storage=a}};olympe.jc.R={bk:'localStorage.KeyValueManager',Ui:'localStorage.Storage',uo:'localStorage.DatacloudStorage',Ea:'localStorage.Logger'};olympe.U.config(function(a){va(a,olympe.jc.R.bk);C(a,olympe.jc.R.Ea,[olympe.ta.R.Aa],function(b){return b.Qc('localstorage')});A(a,olympe.jc.R.uo,olympe.jc.Xs,olympe.jc.R.Ui)},'olympe.localstorage');olympe.host={};const cc=new Map,dc=new Map;olympe.host.Zp=class{static register(a,b,...c){cc.set(a,b);0<c.length&&dc.set(a,c)}static create(a,b,c,d){const e=cc.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=dc.get(a);return void 0!==a?new e(b,c,...a.map(f=>oa(d,f))):new e(b,c)}};function ec(a,b,c){a.N.debug('CREATE #',b,', type=',c);a.C.set(b,olympe.host.Zp.create(c,b,a.N,a.K))}function fc(a,b,c,...d){const e=a.C.get(b);if(void 0!==e){a.N.P()<=olympe.ta.Ob.C.hg&&a.N.debug('CALL #'+b+', '+c+'('+Array.prototype.slice.call(d,0)+')');b=[];for(const f of d)if(void 0===f||null===f)b.push(f);else if(olympe.D.ob(f))b.push(a.C.get(f.yv)||null);else if('function'===typeof f){const g=f,h=olympe.D.Na();b.push((...k)=>{h.C()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
363
+ function gc(a){var b=olympe.host.ea.dd,c=olympe.host.ea.Yp.lr;++a.G;const d=a.G;ec(a,d,c);const e=olympe.D.createNode(b,void 0,void 0,void 0,void 0,'Native('+d+')',!1,function(){var f=arguments.length-2;const g=Array.from({length:f}),h=[],k=arguments[f+1],l=d+'_'+k;this.F.has(l)&&this.F.get(l).destroy();for(let n=0;n<f;n++){let p=arguments[n];olympe.D.ob(p)?(h.push(n),p=p.Qa):olympe.D.Yf(p)&&h.push(n);g[n]=p}0===h.length?e.run(()=>{fc(this,d,k,...g)}):(f=olympe.D.createNode(void 0,(...n)=>{e.run(()=>
364
+ {fc(this,d,k,...n)})},void 0,g,h,'Native('+d+').'+k),this.F.set(l,f),f.onDestroy(()=>this.F.delete(l)));return null}.bind(a));e.P(a.P.bind(a,d));a=L(e);a.yv=d;K(e,a);return a}olympe.host.oa=class{constructor(a,b){this.N=a;this.K=b;this.G=0;this.C=new Map;this.F=new Map;a.debug('Starting host manager')}Za(){return this.N}P(a){this.N.debug('DESTROY #',a);const b=this.C.get(a);this.C.delete(a);b.destroy()}};olympe.host.Gd=class{constructor(a){this.F=a;this.G=olympe.D.Na()}K(){return this.F}$(){return this.F.Qa.$()||this.G.$()}C(){return this.F.Qa.C()}};olympe.host.Gd.prototype.K.L=new olympe.D.J(()=>olympe.host.ea.Gd,[]);olympe.host.xk=class{};olympe.host.Fi=class{constructor(){}C(){}F(){}sj(){}};function hc(a){return(a=a.find(b=>'authToken'===b.na()))?a.getValue():null}olympe.host.Fi.F=class{constructor(a,b,c=!1){this.name=a;this.value=b;this.C=c}na(){return this.name}getValue(){return this.value}nb(a){return this.na()===a.na()&&this.getValue()===a.getValue()&&this.C===a.C}};function ic(){const a={}.parameters;return new olympe.host.Fi.C(a?a.map(b=>new olympe.host.Fi.F(b.name,b.value,b.hidden)):[])}
365
+ olympe.host.Fi.C=class{constructor(a){this.parameters=a}tn(a){const b=new Map(this.parameters.map((c,d)=>[c.na(),d]));a.parameters.forEach(c=>{b.has(c.na())?this.parameters[b.get(c.na())]=c:this.parameters.push(c)})}};function jc(a,b){var c=olympe.host.bf;const d=olympe.X.bc(),e=new olympe.D.Xb('onTimeout context');c.C.$(b,d,()=>{e.C()||e.$()||e.run(a);c.C.G(d)});return new olympe.host.dd.G(c.C,d,e)}function kc(a,b){var c=olympe.host.bf;const d=olympe.X.bc(),e=new olympe.D.Xb('onInterval context');c.C.V(b,d,()=>{e.C()||e.$()?c.C.F(d):e.run(a)});return new olympe.host.dd.F(c.C,d,e)}function lc(a){var b=olympe.host.bf;a=a instanceof olympe.host.dd.F?a.Z():a;b.C.F(a)}olympe.host.dd=class{constructor(a){this.C=gc(a)}};
366
+ olympe.host.dd.C=class{constructor(a,b,c){this.bf=a;this.id=b;this.C=null!=c?c:null}Z(){return this.id}cancel(){}};olympe.host.dd.K=class extends olympe.host.dd.C{cancel(){this.bf.P(this.id);let a;null==(a=this.C)||a.destroy();this.C=null}};olympe.host.dd.G=class extends olympe.host.dd.C{cancel(){this.bf.G(this.id);let a;null==(a=this.C)||a.destroy();this.C=null}};olympe.host.dd.F=class extends olympe.host.dd.C{cancel(){this.bf.F(this.id);let a;null==(a=this.C)||a.destroy();this.C=null}};olympe.host.Ri=class{F(){return''}ba(){return''}V(){}C(){return''}K(){}};olympe.host.ea={};olympe.host.ea.Gd=class{destroy(){}};olympe.host.ea.Gd.prototype.destroy=olympe.host.ea.Gd.prototype.destroy;olympe.host.ea.Yp={sz:100,vz:101,uz:102,xz:103,wz:104,rz:105,yB:201,wB:202,tB:204,BB:205,sB:206,vB:207,zB:208,CB:209,DB:210,EB:211,uB:212,AB:218,xB:219,FB:220,rB:221,qB:222,OB:300,PB:301,QB:302,UB:303,VB:304,WB:305,RB:310,SB:311,TB:312,ZA:400,$A:401,aB:402,VA:450,NA:500,LA:501,QA:502,PA:503,MA:504,OA:505,oC:600,fC:601,jC:602,bC:603,cC:604,$B:605,eC:606,uC:607,mC:608,XB:609,aC:610,dC:611,lC:612,qC:613,YB:614,pC:615,kC:616,tC:617,gC:618,hC:619,iC:620,nC:630,ZB:631,rC:632,sC:633,XC:700,AC:701,BC:702,
367
+ CC:703,EC:704,FC:705,GC:706,DC:707,IC:708,HC:709,JC:710,NC:711,VC:712,KC:713,LC:714,OC:715,PC:716,RC:717,SC:718,UC:719,QC:720,TC:721,WC:722,MC:723,YC:724,ZC:725,lr:800};olympe.host.ea.dd=class{P(){}$(){}G(){}V(){}F(){}};olympe.host.R={Uq:'host.System',Kl:'host.HistoryManager',Jq:'host.Scheduler',Ea:'host.platform.Logger',Aa:'host.Manager',qg:'host.ProcessManager'};olympe.host.Config={pq:'host.processProbe'};olympe.host.bf=null;
368
+ olympe.U.config(function(a){va(a,olympe.host.R.Uq);va(a,olympe.host.R.Kl);A(a,olympe.host.R.qg,olympe.host.Ri);C(a,olympe.host.R.Ea,[olympe.ta.R.Aa],function(b){return b.Qc('host')});A(a,olympe.host.R.Aa,olympe.host.oa,olympe.host.R.Ea,olympe.U.R.gg);C(a,olympe.host.R.Jq,[olympe.host.R.Aa],b=>{null===olympe.host.bf&&(olympe.host.bf=new olympe.host.dd(b));return olympe.host.bf},!0)},'olympe.host');olympe.U.run([olympe.host.R.Jq],a=>a,'olympe.host.scheduler');olympe.U.run([olympe.host.R.Aa],a=>a,'olympe.host');
369
+ olympe.U.run([olympe.host.R.qg],a=>{olympe.host.Rk=()=>a});olympe.auth={};olympe.auth.hv=class{ba(){}V(){}$(){}fb(){}qa(){}wh(){}qh(){}G(){}P(){return-1}Rr(){}};function mc(a){a.N.info('Initializing AUTH layer');let b=a.uc;if(a.Fa){const c=a.Fa.C(),d=hc(c.parameters);b=d||b;d&&a.Fa.F(c.parameters.filter(e=>'authToken'!==e.na()))}b&&a.storage&&nc(a.storage,b,c=>{!c&&a.N.error('Could not store authToken')});a.N.debug('Asking to be notified when auth connector gets online');a.F.ba(()=>{if(a.Wa)if(a.K=olympe.auth.oa.G.vs,a.N.log('Connector online, parameter auth.autoLogin=true --\x3e attempting to log with parameters'),a.ba){const c=new olympe.auth.Request;c.set('username',
370
+ a.ba);c.Dn(a.xb);a.N.log('Autologin with user "'+a.ba+'"');oc(a,c)}else a.N.error('autoLogin: auto user not specified.'),pc(a);else a.K=olympe.auth.oa.G.zk,a.N.log('Connector online, attempting to log with token'),qc(a)});a.F.V(()=>{switch(olympe.D.Xa(a.G)){case olympe.auth.oa.C.gf:a.N.warn('Disconnected from server - session of user '+olympe.D.Xa(a.C.zb()).yd()+' lost');break;case olympe.auth.oa.C.lg:a.N.warn('Disconnected from server - guest session lost');break;case olympe.auth.oa.C.mi:a.N.warn('Disconnected from server - authentication aborted');
371
+ break;case olympe.auth.oa.C.INIT:a.N.warn('Cannot open auth session - no server connection');break;default:a.N.error('Should not get there, investigate')}rc(a,olympe.auth.oa.C.kf)});a.F.$(c=>{switch(c){case olympe.H.oa.C.Xh:rc(a,olympe.auth.oa.C.Xh);break;case olympe.H.oa.C.zh:rc(a,olympe.auth.oa.C.zh)}});a.F.fb((c,d)=>{if(c===olympe.auth.oa.F.Ej)a.N.info('Authentication revoked'),pc(a),a.storage&&sc(a.storage),a.V.forEach(e=>{e(c,d)});else if(c===olympe.auth.oa.F.pp)a.N.info('Redirection to IDP to invalidate token (SAML)'),
372
+ olympe.D.Xa(a.C.zb()),a.storage&&sc(a.storage),a.fb.F();else throw Error(`Unknown logout step coming from server : ${c}`);});a.Ka=tc(a);a.$.F(()=>x(function*(){return a.Zk()}));a.N.log('DONE initializing AUTH layer (waiting for connector to be online)')}
373
+ function qc(a){null!==a.storage?(a.N.debug('Retrieving token from local storage'),a.storage.Zc(b=>{if(b){const d=new olympe.auth.Request;var c=b.yd();d.set('username',c);c=d;b=b.Pd();c.set('nonce',b);a.N.debug('Token found, trying login with',d);oc(a,d,a.fc)}else a.N.debug('No token found, cannot perform auto login. Falling back in GUEST state'),pc(a)})):(a.N.error('Cannot retrieve token: no storage configured, cannot perform auto login. Falling back in GUEST state'),pc(a))}
374
+ function rc(a,b){a.N.log('State change: ',uc(a),'--\x3e',b);a.G.update(b)}function pc(a){a.C.update(a.qa);rc(a,olympe.auth.oa.C.lg);a.N.info('Authenticated as guest')}function tc(a){const b=[olympe.auth.oa.C.gf];a.Wa||b.push(olympe.auth.oa.C.lg);return a.$.C(()=>{const c=uc(a);return b.includes(c)?Promise.resolve('The auth manager is OK'):Promise.reject(`The auth manager is not in valid state, the current state is: ${c}`)})}function uc(a){return olympe.D.Xa(a.G.zb())}
375
+ function vc(a){const b=olympe.auth.oa.C.gf,c=olympe.auth.oa.C.lg,d=olympe.auth.oa.C.mi,e=olympe.D.Ic(olympe.D.ra,'auth.isOnline');olympe.D.wc([a.G],f=>{f=olympe.D.Ac(f===b||f===c||f===d);const g=olympe.D.Xa(e);void 0!==g&&g.nb(f)||e.update(f)},'Router is online');return e.zb()}function wc(a,b,c){void 0===c&&(c=olympe.X.Cg());a.V.set(c,b)}function xc(a,b,c,d=!1){b=b+c?':'+c.message:'';a.N.error(b);a.error.update(olympe.D.Bb(b));rc(a,olympe.auth.oa.C.cc);if(d)throw Error(b);}
376
+ function oc(a,b,c,d){void 0===c&&(c=a.Fb);void 0===c&&xc(a,'No authentication provider specified',null,!0);const e=a.Jb.get(c);e||xc(a,'Undefined authentication provider "'+c+'"',null,!0);d&&a.P.set('login',d);a.N.log('Sending authentication request using "'+c+'" for '+b);e.Zc(b,a.mc.bind(a));rc(a,olympe.auth.oa.C.mi)}function yc(a,b,c){a.P.forEach(d=>{d(b,c)})}
377
+ olympe.auth.oa=class{constructor(a,b,c,d,e,f,g,h,k,l,n,p,q){this.N=a;this.F=b;this.storage=c;this.fb=d;this.Fa=e;this.Fb=h;this.fc=k;this.Wa=void 0===l?!0:l;this.ba=n;this.xb=p;this.uc=q;this.Jb=new Map;this.$=f;this.Ka='';this.G=olympe.D.Ic(String).update(olympe.auth.oa.C.INIT);this.error=olympe.D.Ic(olympe.D.$a);this.K=null;this.qa=new olympe.auth.zf('guest','0163d9653067b6237f62','e96e099c-55bb-4004-b0e8-bd76b6209218');this.C=olympe.D.Ic(olympe.auth.zf).update(this.qa);this.P=new Map;this.V=new Map;
378
+ g.forEach(r=>{const t=r.na();if(this.Jb.has(t))throw Error('Provider "'+t+'" has already been registered !');this.Jb.set(t,r)});mc(this)}getState(){return this.G.zb()}la(){return this.error.zb()}yd(){return this.C.zb().yd()}Hg(){return this.C.zb().Hg()}fi(){return this.C.zb().fi()}qh(a,b){let c;this.F.qh(a,null==(c=olympe.D.Xa(this.C.zb()))?void 0:c.Pd(),b)}Zk(){olympe.D.Xa(this.C)===this.qa?this.N.warn('Logout called for Guest user so it will be ignored'):(this.N.debug('Sending logout'),sc(this.storage),
379
+ this.F.qa(olympe.D.Xa(this.C.zb()),a=>{a?xc(this,'Logout request rejected:',a):this.N.debug('Logout request acknowledged')}),this.$.K(this.Ka))}wh(){uc(this)===olympe.auth.oa.C.gf&&this.F.wh(a=>{a&&this.N.error('Was not able to send the auth keep alive message:',a.message)})}mc(a,b){const c=null===this.K?olympe.auth.oa.G.ku:this.K;this.K=null;a?(this.N.warn('Authentication rejected: '+a.message+'. Falling back into GUEST state'),sc(this.storage),this.error.update(olympe.D.Bb(a.message)),pc(this),
380
+ yc(this,a,c)):(this.N.info('User '+b.yd()+' (#'+b.Hg()+') successfully authenticated'),this.C.update(b),rc(this,olympe.auth.oa.C.gf),yc(this,a,c),this.storage&&nc(this.storage,b));this.P.has('login')&&this.P.delete('login')}};olympe.auth.oa.C={INIT:'init',Xh:'waking',zh:'awake',kf:'disconnected',lg:'guest',mi:'authenticating',cc:'error',gf:'authenticated'};olympe.auth.oa.G={ku:'manual',vs:'auto',zk:'tokenOnFirstConnection'};olympe.auth.oa.F={Ej:'accepted',pp:'redirect'};olympe.auth.Si=class{na(){}Zc(){}};function zc(a){return a.get('idpName')}olympe.auth.Request=class{constructor(){this.C=new Map}set(a,b){olympe.D.wc([b],c=>{this.C.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.C.get(a.toLowerCase()))&&a.Df&&(a=a.Qa.Kb);return a?a.valueOf():a}yd(){return this.get('username')}Dn(a){this.set('password',a);return this}Pd(){return this.get('nonce')}toString(){return this.yd()+(this.Pd()?' with nonce':'')+(this.get('password')?' with password':'')+(zc(this)?` with idp name ${zc(this)}`:'')}};olympe.auth.zf=class{constructor(a,b,c,d={}){this.user=a;this.Dj=b;this.G=c;this.C=null;this.K=d}yd(){return this.user}Hg(){return this.Dj}Pd(){return this.G}$j(){return this.K}fi(){return null}Hh(){return this.C}ka(){var a=olympe.X.ei(),b=Object.assign({},{user:this.user,userTag:this.Dj,nonce:this.G},this.C&&{idpName:this.C},{payload:this.K}),c=olympe.X,d=c.zr;b=JSON.stringify(b);a=a.C(Fa(b));return d.call(c,a)}};m=olympe.auth.zf.prototype;m.yd.L=new olympe.D.J(()=>String,[]);
381
+ m.Hg.L=new olympe.D.J(()=>String,[]);m.Pd.L=new olympe.D.J(()=>String,[]);m.$j.L=new olympe.D.J(()=>Object,[]);m.fi.L=new olympe.D.J(()=>String,[]);m.Hh.L=new olympe.D.J(()=>String,[]);m.ka.L=new olympe.D.J(()=>String,[]);olympe.auth.jm=class extends olympe.auth.zf{constructor(a,b,c,d){super(a,b,c,d)}fi(){return this.$j().access_token||null}};olympe.auth.Iq=class extends olympe.auth.zf{constructor(a,b,c,d){super(a,b,c,d);this.F=null}fi(){return this.F}ka(){var a=olympe.X.ei(),b=Object.assign({},{user:this.yd(),userTag:this.Hg(),nonce:this.Pd()},this.Hh()&&{idpName:this.Hh()},{payload:this.$j(),fullToken:this.F}),c=olympe.X,d=c.zr;b=JSON.stringify(b);a=a.C(Fa(b));return d.call(c,a)}};function nc(a,b,c){const d=a.C.C('AUTH');d.set(a.key,'string'===typeof b?b:b.ka(),e=>{d.close();c&&c(e)})}function sc(a){const b=a.C.C('AUTH');b.remove(a.key,()=>b.close())}
382
+ olympe.auth.Em=class{constructor(a,b,c){this.C=a;this.N=b;this.key='OlympeToken-'+c.C}Zc(a){const b=this.C.C('AUTH');this.N.debug(`olympe.auth.TokenStorage: retrieve token with key ${this.key}`);b.get(this.key,c=>{let d=null;if(c)try{this.N.debug('olympe.auth.TokenStorage: Token retrieved successfully');var e=JSON,f=e.parse;var g=Ga(olympe.X.ei().P(olympe.X.Qv(c)));const h=f.call(e,g);let k;h.fullToken?(k=new olympe.auth.Iq(h.user,h.userTag,h.nonce,h.payload),k.F=h.fullToken):h.payload&&h.payload.id_token?
383
+ k=new olympe.auth.jm(h.user,h.userTag,h.nonce,h.payload):k=new olympe.auth.zf(h.user,h.userTag,h.nonce,h.payload);h.idpName&&(k.C=h.idpName);d=k}catch(h){this.N.error('Error while unserializing token: ',h.message)}else this.N.debug('olympe.auth.TokenStorage: No token found');b.close();a(d)})}};olympe.auth.Em.F='OlympeToken';olympe.auth.Em.C='AUTH';olympe.auth.rk=class{redirect(){}F(){}C(){}};olympe.auth.rk.C={GET:'GET',lm:'POST'};olympe.auth.ol=class{constructor(a){this.C=a||'default'}};olympe.auth.Jb={};olympe.auth.Jb.sa={};olympe.auth.Jb.sa.Li=class{la(){}};olympe.auth.Jb.sa.Pe=class{Fa(){}};olympe.auth.Jb.sa.Ie=class{Ka(){}Wa(){}};function Ac(a,b){return olympe.X.pb(b+'-olympe-'+a.C[b])}olympe.auth.Jb.Ki=class{constructor(a){this.C=a}na(){return'local'}Zc(a,b){const c=a.yd();if(c){const d=a.get('password'),e=a.Pd();a.C.delete('password');if(void 0!==e&&Ac(this,c)===e){b(null,new olympe.auth.zf(c,'',Ac(this,c)));return}a=olympe.X.pb(d||'');if(this.C[c]===a){b(null,new olympe.auth.zf(c,'',Ac(this,c)));return}}b(Error('Invalid login'))}};olympe.auth.Jb.Ki.C='local';olympe.auth.Jb.Ki.ma=[olympe.auth.Si];olympe.auth.Jb.Li=class{constructor(a,b){this.C=a;this.storage=b}na(){return'localToken'}Zc(a,b){this.storage.Zc(c=>{this.C.la(a,(d,e)=>{c&&e&&c.Hh()&&(e.C=c.Hh());b(d,e||c)})})}};olympe.auth.Jb.Li.C='localToken';olympe.auth.Jb.Li.ma=[olympe.auth.Si];olympe.auth.Jb.im=class{constructor(a,b){this.C=a;this.F=b}na(){return'openID'}Zc(a){const b=encodeURIComponent(this.C.C());a=zc(a)?`idpName=${zc(a)}&`:'';this.C.redirect(`${this.F}/auth?${a}url=${b}`,null,olympe.auth.rk.C.GET)}};olympe.auth.Jb.im.C='openID';olympe.auth.Jb.im.ma=[olympe.auth.Si];olympe.auth.Jb.Pe=class{constructor(a,b){this.F=a;this.C=b}na(){return'saml'}Zc(a,b){this.F.Fa(a,c=>{c?b(c):this.C.F(zc(a))})}};olympe.auth.Jb.Pe.C='saml';olympe.auth.Jb.Pe.ma=[olympe.auth.Si];olympe.auth.Jb.Ie=class{static hj(a,b){const c=new SRPClient,d=c.generateRandomSalt();return{username:a,login:a,salt:d,verifier:c.generateVerifier(d,a,b)}}constructor(a){this.C=a;this.N=olympe.ta.Za('auth')}na(){return'srp'}Zc(a,b){const c=a.get('password');a.C.delete('password');this.N.debug('Sending SRP request');this.C.Ka(a,(d,e,f)=>{this.N.debug('Received Salt+B message');if(d)b(d);else{try{const g=new SRPClient;g.step1(a.yd(),c);const h=g.step2(e,f);a.set('a',h.A);a.set('m1',h.M1)}catch(g){b(g);
384
+ return}this.N.debug('Sending SRP A+M (proof) message');this.C.Wa(a,b)}})}};olympe.auth.Jb.Ie.C='srp';olympe.auth.Jb.Ie.ma=[olympe.auth.Si];olympe.auth.R={Aa:'auth.Manager',Ea:'auth.Logger',Ui:'auth.Storage',Fj:'auth.appNameToken',mk:'auth.Redirector'};olympe.auth.sd={Aa:'auth.ManagerConnector',Jp:'auth.LocalTokenConnector',Ie:'auth.SRPConnector',Pe:'auth.SAMLConnector'};olympe.auth.Config={Al:'auth.defaultProvider',Kp:'auth.localTokenProvider',ml:'auth.autoLogin',Pn:'auth.autoUser',Mn:'auth.autoPassword',zk:'auth.token',Kn:'auth.appToken'};
385
+ olympe.U.config(function(a){E(a,olympe.auth.Config.Al,'srp');E(a,olympe.auth.Config.Kp,'localToken');E(a,olympe.auth.Config.ml,!1);E(a,olympe.auth.Config.Pn,'');E(a,olympe.auth.Config.Mn,'');E(a,olympe.auth.Config.zk,'');E(a,olympe.auth.Config.Kn,'default');C(a,olympe.auth.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('auth'));A(a,olympe.auth.R.Fj,olympe.auth.ol,new olympe.U.fa(olympe.auth.Config.Kn));A(a,olympe.auth.R.Ui,olympe.auth.Em,olympe.jc.R.bk,olympe.auth.R.Ea,olympe.auth.R.Fj);va(a,olympe.auth.sd.Aa);va(a,
386
+ olympe.auth.R.mk);C(a,olympe.auth.R.Aa,[olympe.auth.R.Ea,olympe.auth.sd.Aa,olympe.host.R.Kl,olympe.host.R.qg,new olympe.U.sb(olympe.auth.R.Ui,olympe.U.jf.C.Kh),new olympe.U.fa(olympe.auth.Config.Al),new olympe.U.fa(olympe.auth.Config.Kp),new olympe.U.fa(olympe.auth.Config.ml),new olympe.U.fa(olympe.auth.Config.Pn),new olympe.U.fa(olympe.auth.Config.Mn),new olympe.U.fa(olympe.auth.Config.zk),new olympe.U.sb(olympe.auth.R.mk,olympe.U.jf.C.Kh),new olympe.U.sb(olympe.auth.sd.Jp,olympe.U.jf.C.Kh),new olympe.U.sb(olympe.auth.sd.Ie,
387
+ olympe.U.jf.C.Kh),new olympe.U.sb(olympe.auth.sd.Pe,olympe.U.jf.C.Kh)],(b,c,d,e,f,g,h,k,l,n,p,q,r,t,u)=>{const v=[];r&&v.push(new olympe.auth.Jb.Li(r,f));t&&v.push(new olympe.auth.Jb.Ie(t));u&&q&&v.push(new olympe.auth.Jb.Pe(u,q));q&&c&&v.push(new olympe.auth.Jb.im(q,c.Rr()));if(0===v.length)throw Error('At least one provider is needed for auth to start');if(!v.map(w=>w.na()).includes(g))throw Error('Default provider name'+g+'given by parameter'+olympe.auth.Config.Al+'cannot be found');return new olympe.auth.oa(b,
388
+ c,f,q,d.sj()?d:null,e,v,g,h,k,l,n,p)},!0)},'olympe.auth');olympe.U.run([olympe.auth.R.Aa],a=>{olympe.auth.Sc=()=>a});olympe.dc={};olympe.dc.Ca={ORIGIN:'<',DESTINATION:'>'};z('olympe.dc.Direction',olympe.dc.Ca);olympe.dc.lc={Vc:'ff022000000000000000',xi:'ff02200000000000000e',io:'ff02200000000000000f'};olympe.dc.$b={VERSION:'@v',Hd:'@s'};olympe.dc.Xg={kc:'?'};olympe.dc.wk={cq:'online',Ni:'offline',zt:'invalidate'};olympe.dc.Ia={rb:'self',Lc:'server',jq:'peer',kc:'server'};olympe.dc.za=function(a){if('string'===typeof a)return a;let b=null;a=olympe.D.Xa(a);void 0!==a&&null!==a&&(a=a.valueOf(),'string'===typeof a?b=a:a.T?b=a.T():'function'===typeof a&&(b=olympe.dc.ya.Lb(a)));return b||''};z('olympe.dc.instanceToTag',olympe.dc.za);olympe.dc.La=function(){return olympe.dc.xd().view};olympe.dc.register=function(a,b){olympe.dc.ya.C(a,b)};olympe.dc.defineProperty=function(a){return new olympe.dc.ua.Property(a)};
389
+ olympe.dc.lh=function(a,b=olympe.dc.Ca.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.Ca.DESTINATION){const e=olympe.dc.Ca.DESTINATION;return b===olympe.dc.Ca.ORIGIN||b===e?new olympe.dc.ua.Relation(a,b):new olympe.dc.ua.Relation(a,d,b,c)};olympe.dc.bw=function(a){return a.zc()};olympe.dc.Writable=class{F(){}qc(){}Fc(){}Va(){}hc(){}};olympe.dc.nm=class{Oc(){}Z(){}G(){}};function Bc(a,b,c,d,e,f,g){d=new olympe.dc.ha(olympe.dc.ha.ja.Uh,{file:b,url:null,content:c,Ze:e?h=>{Cc(a,b,c);f(h)}:f,mimeType:d,ve:g||null},[olympe.dc.La().source(b)||olympe.dc.Ia.Lc]);a.F.send(d)}function Dc(a,b,c,d,e,f){c=c instanceof olympe.D.$a?c.valueOf():c;'string'===typeof c?c=new Blob([Fa(c)],{type:d}):c instanceof ArrayBuffer&&(c=new Blob([c],{type:d}));Bc(a,b,c,d,a.G,e,f)}
390
+ function Cc(a,b,c){const d=olympe.dc.za(b);a.C.set(d,c);const e=olympe.X.Cg();Ec(olympe.dc.La(),d,f=>{f||(a.C.delete(d),Fc(olympe.dc.La(),d,e))},e)}function Gc(a,b,c,d){olympe.D.gs([b.Yr(),b.T(),b.Ul(),b.jn()],(e,f,g,h)=>{a.C.has(f)?c(a.C.get(f)):(e=new olympe.dc.ha(olympe.dc.ha.ja.Ch,{file:f,url:e.valueOf()?null:g,mimeType:h.valueOf(),Ze:a.G?k=>{Cc(a,f,k);c(k)}:c,ve:d},[olympe.dc.La().source(f)||olympe.dc.Ia.Lc]),a.F.send(e))})}
391
+ olympe.dc.lt=class{constructor(a,b,c,d,e){this.N=a;this.F=c;this.G=e;this.C=new Map}};olympe.dc.oa=class{constructor(a){this.N=a}};function Hc(a,b){a.F=b;return a}function M(a,b){a.$h.unshift(b);return a}olympe.dc.ha=class{constructor(a,b,c){this.type=a;this.content=b;this.C=c;this.$h=[];this.F=olympe.D.Na()}validate(a=null){this.$h.forEach(b=>{b(a||null)})}toString(){const a=olympe.X.Pr(olympe.dc.ha.ja,this.type);return a?a:'UNKNOWN_MESSAGE'}};
392
+ olympe.dc.ha.ja={cc:1,og:2,Wg:10,AA:11,bv:20,JB:21,KB:22,ev:23,Bi:24,Ai:25,BA:26,$o:28,qm:30,sm:31,Ju:32,ih:40,Ak:41,Bh:45,Jj:46,Sj:47,Uh:50,Ch:51,wi:52,vv:60,Pu:61,nt:62,ot:63,Hs:64,sl:65,zA:90,zl:91,Jl:92,ap:93,Fp:94,fk:95,dv:96,QUERY_RESULT:97,rm:98};olympe.dc.sg=class{process(){}};olympe.dc.om=class{constructor(...a){this.Ub=a}process(a,b,c){const d=this.Ub.length,e=(f,g,h)=>{g||f>=d?c(g,h):this.Ub[f].process(a,h,e.bind(null,f+1))};e(0,null,b)}};olympe.dc.om.ma=[olympe.dc.sg];function Ic(a){return olympe.dc.CloudObject.get(a.tag)}olympe.dc.Ec=class{constructor(a){this.tag='string'===typeof a?a:a.T()}T(){return this.tag}toJSON(){return'{ "type": "reference", "tag": '+JSON.stringify(this.tag)+' }'}nb(a){return a instanceof olympe.dc.Ec&&this.tag===a.tag}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.Ec(b.tag)}};olympe.dc.Ec.ma=[olympe.dc.De];olympe.dc.Ec.prototype.toJSON.L=olympe.D.J.C;olympe.dc.Ec.prototype.nb.L=olympe.D.J.C;olympe.dc.tg=class{send(){}C(){}la(){}};const Jc=olympe.dc.Ca.ORIGIN,Kc=olympe.dc.Ca.DESTINATION,Lc=new Map,Mc=new Map,Nc=new Map,Oc=new Map;function Pc(a,b){var c=olympe.dm.File;let d=c;'function'===typeof c&&(d=b.entry);c=[...(d.Fn||[])];return olympe.dc.ya.C(a,b,...c)}function Qc(a,b){Oc.set(a,b);return a}function Rc(a){return(a=Lc.get(a))&&a.C||olympe.dc.CloudObject}function Sc(a,b,c){const d=a+'@'+(b===Kc?Jc:Kc);if(Mc.has(d))throw Error(`Try to register the same relation (${b+a}) multiple times.`);Mc.set(d,c)}
393
393
  function Tc(a){a=a.T()+'@'+a.Sa();return Mc.get(a)||olympe.dc.CloudObject}function N(a,b){b.NAME=a;Nc.set(a,b)}function O(a){return a.NAME||null}
394
394
  olympe.dc.ya=class{constructor(){}static C(a,b,...c){if(Lc.has(a))throw Error(`Tag: ${a} - overwriting already defined sync ${Lc.get(a).C.name} with ${b.name}`);let d=null;const e=c.length;if(0<e){d=Array(e);for(let f=0;f<e;f++){let g=c[f];d[f]='string'===typeof g?new olympe.U.sb(g):g}}b=new olympe.dc.ua.Entry(a,b,d);Lc.set(a,b);return b.C.entry=b}static Lb(a){return(a=a.entry)&&a.T()||null}};olympe.dc.ua={};function P(a,b){b=b.zc();Sc(b.T(),b.Sa(),a.C);return b}function Uc(a){a.F=!0;return a}
395
- olympe.dc.ua.Entry=class{constructor(a,b,c){this.tag=a;this.C=b;this.En=c||null;this.F=!1}T(){return this.tag}instantiate(a,b){const c=this.C;if(this.pj()&&b.getParameter(olympe.dc.Config.Go)){var d=olympe.dc.La();d=`Trying to instantiate an abstract class ${d.name(this)} (${this.T()}).`+` This may happen when the implementation of another class extending ${d.name(this)} has not been registered`;olympe.ta.Za('dc').error(d)}return this.En?(a=[void 0,a].concat(pa(b,this.En)),new c(...a)):new c(void 0,
396
- a)}xa(a){return new olympe.dc.ua.Property(a)}Ga(a,b=olympe.dc.Ca.DESTINATION){Sc(a,b,this.C);return new olympe.dc.Y.Sb(a,b)}pj(){return this.F}};z('olympe.dc.registry.Entry',olympe.dc.ua.Entry);olympe.dc.ua.Entry.prototype.addRelation=olympe.dc.ua.Entry.prototype.Ga;olympe.dc.ua.Entry.prototype.addProperty=olympe.dc.ua.Entry.prototype.xa;olympe.dc.ua.Entry.ma=[olympe.dc.De];olympe.dc.ua.Property=class{constructor(a){this.tag=a}T(){return this.tag}};olympe.dc.ua.Property.prototype.getTag=olympe.dc.ua.Property.prototype.T;olympe.dc.ua.Property.ma=[olympe.dc.De];olympe.dc.ua.Relation=class{constructor(a,b=olympe.dc.Ca.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.CloudObject){this.tag=olympe.dc.za(a);this.direction=b;this.origin=c;this.destination=d}T(){return this.tag}Sa(){return this.direction}type(){return this.destination}zc(){return new olympe.dc.ua.Relation(this.tag,this.direction===olympe.dc.Ca.DESTINATION?olympe.dc.Ca.ORIGIN:olympe.dc.Ca.DESTINATION,this.destination,this.origin)}nb(a){return a instanceof olympe.dc.ua.Relation?a.T()===this.T()&&
397
- a.Sa()===this.Sa():!1}toString(){return this.direction+this.tag}};olympe.dc.ua.Relation.prototype.getInverse=olympe.dc.ua.Relation.prototype.zc;olympe.dc.ua.Relation.prototype.getDirection=olympe.dc.ua.Relation.prototype.Sa;olympe.dc.ua.Relation.prototype.getTag=olympe.dc.ua.Relation.prototype.T;olympe.dc.ua.Relation.ma=[olympe.dc.De];olympe.dc.db={};function Vc(a,b,c,d,e,f=olympe.dc.Ia.rb){const g=c.Z();Wc(a.C,b,c,d,e,f);return h=>{if(h)a.C.push(g);else{h=a.C;const k=h.F.get(g);if(void 0!==k){const l=h.C.indexOf(g);h.C.splice(l,1);Xc(h,Yc(h,k.C,h.C.length),k.source);h.F.delete(g)}}}}function Zc(a,b){a.Oa.Fa(b)}function $c(a,b,c){b&&a.Oa.hc(b);c&&a.Oa.$c(c)}
398
- olympe.dc.db.Ys=class{constructor(a,b,c,d,e){this.N=a;this.Oa=b;this.C=new olympe.dc.db.Ms(a,b,d);this.view=new olympe.dc.ib(a,b);this.$x=new olympe.dc.db.pu(this.N,this.view,b,e)}Za(){return this.N}persist(a){this.Oa.qa();this.Oa.eb(a,olympe.dc.db.Instance.C.lq);this.Oa.la()}bf(a,b){this.C.bf(a,b)}};const ad=olympe.dc.Zb.VERSION,bd=olympe.dc.Zb.Id,cd=olympe.dc.mc.Vc,dd=olympe.dc.mc.yi;
399
- olympe.dc.db.Database=class a extends Map{constructor(b,c){super();this.id=olympe.X.bc();this.N=b;this.xb=olympe.D.Na();this.wd=c.get('defaultSource')||olympe.dc.Ia.rb;this.P=olympe.dc.db.Database.G.IDLE;this.ba=new Map;this.Db=[];this.G=[];this.Wa=new Map;b=c.get('garbageCollector')||olympe.dc.db.Di.C.Bl;new olympe.dc.db.Di(this,b,this.xb);c.get('debug')&&this.Nd()}Z(){return this.id}getState(){return this.P}Za(){return this.N}create(b,c){const d=this.K(b,!0);d.hc(c&&parseInt(c.get(ad),10)||1);d.li(c&&
400
- c.get(bd)||this.wd);c&&(c.delete(ad),c.delete(bd),this.Nc(d,c));this.C(a.F.wp,b)}update(b,c,d=!1){if(void 0!==c&&null!==c){b=this.K(b,!0);var e=c&&parseInt(c.get(ad),10);0>e||!d&&b.version()>=e||(c.delete(ad),b.hc(isNaN(e)?b.version()+1:e),this.Nc(b,c))}}Fc(b){const c=this.get(b);void 0!==c&&(this.Ka(c,!1),this.C(a.F.xp,b))}link(b,c,d){c=this.K(c,!0);d=this.K(d,!0);switch(b){case cd:c.ce(d);break;case dd:c.Md(d);break;default:c.link(b,d)}}unlink(b,c,d){c=this.get(c);d=this.get(d);if(void 0!==c&&void 0!==
401
- d)switch(b){case cd:c.Wk(d);break;case dd:c.sj(d);break;default:c.unlink(b,d)}}hc(b){for(const c of b)this.K(c).ba()}$c(b){for(const c of b)(b=this.get(c))&&b.la()}eb(b,c){b.forEach(d=>{this.K(d).Ye(c)})}fc(b){const c=this.get(b);void 0!==c&&(c.clear(),super.delete(b),this.C(a.F.Fo,b))}K(b,c=!1){let d=this.get(b);void 0===d&&(d=new olympe.dc.db.Instance(b,this),this.set(b,d),this.C(a.F.Eo,b),c&&this.C(a.F.Bk,b));return d}V(b,c,d=!1,e=null){return{[Symbol.iterator]:function*(f){const g=olympe.dm.Relation.C.Ak,
402
- h=olympe.dm.Relation.C.nk,k=olympe.dc.Ca.ORIGIN,l=olympe.dc.Ca.DESTINATION,n=a.C.Oh+c,p=d?h:g,q=d?g:h,r=(new Map).set(f,!1),t=(v,w)=>(v=this.get(v))&&0!==(v.get(n)&w),u=([v,w])=>!r.has(v)&&(e?e(w):!0);for(const v of r.keys())r.get(v)||(r.set(v,!0),yield v),f=this.get(v),void 0!==f&&f.forEach((w,y)=>{(y[0]===k&&t(y.substring(1),q)||y[0]===l&&t(y.substring(1),p))&&Array.from(w.entries()).filter(u).forEach(([B])=>{r.set(B,!1)})})}.bind(this,b)}}uc(b){ed(this.G[0],olympe.X.Fg(),b)}$(b){if(0===this.G.length)debugger;
403
- this.G[0].C.delete(b)}C(b,c,...d){this.ba.has(b)&&this.ba.get(b).forEach(e=>{e(c,...d)})}Ka(b,c){this.Wa.set(b,c)}Md(b,c,d,e){0<this.G.length&&fd(this.G[0],b).xa(e?gd+c:c,d)}ce(b,c,d,e,f){if(0<this.G.length){var g=this.G[0];d===hd?f?fd(g,b).link(c,e):fd(g,b).unlink(c,e):f?fd(g,b).Wa(c,e):fd(g,b).eb(c,e)}}F(b,c){let d=this.ba.get(b);void 0===d&&(d=[],this.ba.set(b,d));d.push(c)}Fa(b){this.Db.push(b)}qd(b){return this.G.reduce((c,d)=>d.G.has(b)||c,!1)}qa(){this.P===a.G.IDLE&&(this.P=a.G.As);this.G.unshift(new olympe.dc.db.ct(this,
404
- this.xb))}la(){this.P=a.G.ig;this.ie();id(this.G[0]);this.G.shift();0===this.G.length&&(this.P=a.G.IDLE,this.Db.forEach(b=>{b()}))}Nc(b,c){const d=a.C.lc;for(const [e,f]of c)void 0!==f&&(e[0]===d?b.Zk(e.substr(1),f):b.update(e,f))}ie(){const b=a.C.ORIGIN,c=new Set,d=(f,g=[])=>{const h=f.tag();if(!c.has(h)&&(c.add(h),g.push(f),f=f.get(b+cd)))for(const k of f.values())d(k,g);return g},e=this.G[0];for(const [f,g]of this.Wa)d(f).filter(h=>h.qd(g)).forEach(h=>{h=h.tag();g?fd(e,h).create():fd(e,h).delete()});
405
- this.Wa.clear()}Nd(){const b=a.C.DESTINATION,c=a.F.El,d=a.F.mk,e=new Set,f=new Map;this.F(a.F.wp,g=>{e.add(g)});this.F(c,g=>{e.delete(g);f.delete(g)});this.F(d,(g,...h)=>{if(h[0]===dd&&h[1]===b){const k=h[2];this.get(k).Gb()||(h=f.get(k)||new Set,0===h.size&&f.set(k,h),h.add(g))}});this.Fa(()=>{e.forEach(g=>{const h=this.get(g);h&&null===h.model()&&this.N.error(`\n[DEBUG - DATABASE]\nInstance ${g} created but does not exist !\n${h.toString()}`)});e.clear();f.forEach((g,h)=>{const k=this.get(h);k&&
406
- this.N.error(`\n[DEBUG - DATABASE]\nThe model ${h} is extended by other models but does not exist !`+`\nExtension models: ${Array.from(g.values()).join(', ')}`+`\n\n ${k.toString()}`)});f.clear()})}};olympe.dc.db.Database.C={Oh:'$',vt:'~',lc:'?',kl:'=',bo:'@',ORIGIN:olympe.dc.Ca.ORIGIN,DESTINATION:olympe.dc.Ca.DESTINATION};olympe.dc.db.Database.F={Eo:0,Fo:1,dr:2,Bk:3,co:4,eo:5,El:6,Cc:7,mk:8,tm:9,wp:10,xp:11,xq:12};olympe.dc.db.Database.G={IDLE:0,As:1,ig:2};const Q=olympe.dc.db.Database.F,jd=olympe.dc.db.Database.C.Oh,kd=olympe.dc.db.Database.C.vt,ld=olympe.dc.db.Database.C.lc,md=olympe.dc.db.Database.C.kl,nd=olympe.dc.db.Database.C.bo,R=olympe.dc.Ca.ORIGIN,S=olympe.dc.Ca.DESTINATION,od=olympe.dc.mc.Vc,pd=olympe.dc.mc.yi;
407
- olympe.dc.db.Instance=class a extends Map{constructor(b,c){super();this.C=b;this.Nc=olympe.dc.Ia.rb;this.e=!1;this.Db=0;this.F=void 0;this.c=0;this.Fa=a.C.lq;this.db=c}tag(){return this.C}Gb(){return this.e}fc(){return this.db.qd(this.C)}source(){return this.Nc}version(){return this.Db}model(){const b=this.get(S+od);return b&&b.values().next().value||null}Jf(){const b=this.get(S+pd);return b&&b.values().next().value||null}persisted(){return this.Fa!==a.C.mr}toString(){var b=this.fb(olympe.dc.CloudObject.nameProp.T());
408
- b=`Instance: ${this.C}, Exist: ${this.e}, Name: ${b}`;var c=this.model();if(c){var d=c.fb(olympe.dc.CloudObject.nameProp.T())||'No model name';b+=`\nModel: ${c.C}, Exist: ${c.e}, Model name: ${d}`}else b+='\nModel: no model';(c=this.Jf())?(d=c.fb(olympe.dc.CloudObject.nameProp.T())||'No extension name',b+=`\nExtension: ${c.C}, Exist: ${c.e}, Extension name: ${d}`):b+='\nExtension: no extension';return b}fb(b,c=!1){const d=this.get(jd+b);return c||void 0!==d?d:this.get(md+b)}Ka(b,c=!1){const d=this.get(ld+
395
+ olympe.dc.ua.Entry=class{constructor(a,b,c){this.tag=a;this.C=b;this.Fn=c||null;this.F=!1}T(){return this.tag}instantiate(a,b){const c=this.C;if(this.qj()&&b.getParameter(olympe.dc.Config.Ho)){var d=olympe.dc.La();d=`Trying to instantiate an abstract class ${d.name(this)} (${this.T()}).`+` This may happen when the implementation of another class extending ${d.name(this)} has not been registered`;olympe.ta.Za('dc').error(d)}return this.Fn?(a=[void 0,a].concat(pa(b,this.Fn)),new c(...a)):new c(void 0,
396
+ a)}xa(a){return new olympe.dc.ua.Property(a)}Ga(a,b=olympe.dc.Ca.DESTINATION){Sc(a,b,this.C);return new olympe.dc.Y.Sb(a,b)}qj(){return this.F}};z('olympe.dc.registry.Entry',olympe.dc.ua.Entry);olympe.dc.ua.Entry.prototype.addRelation=olympe.dc.ua.Entry.prototype.Ga;olympe.dc.ua.Entry.prototype.addProperty=olympe.dc.ua.Entry.prototype.xa;olympe.dc.ua.Entry.ma=[olympe.dc.De];olympe.dc.ua.Property=class{constructor(a){this.tag=a}T(){return this.tag}};olympe.dc.ua.Property.prototype.getTag=olympe.dc.ua.Property.prototype.T;olympe.dc.ua.Property.ma=[olympe.dc.De];olympe.dc.ua.Relation=class{constructor(a,b=olympe.dc.Ca.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.CloudObject){this.tag=olympe.dc.za(a);this.direction=b;this.origin=c;this.destination=d}T(){return this.tag}Sa(){return this.direction}type(){return this.destination}zc(){return new olympe.dc.ua.Relation(this.tag,this.direction===olympe.dc.Ca.DESTINATION?olympe.dc.Ca.ORIGIN:olympe.dc.Ca.DESTINATION,this.destination,this.origin)}nb(a){return a instanceof olympe.dc.ua.Relation?a.T()===this.T()&&
397
+ a.Sa()===this.Sa():!1}toString(){return this.direction+this.tag}};olympe.dc.ua.Relation.prototype.getInverse=olympe.dc.ua.Relation.prototype.zc;olympe.dc.ua.Relation.prototype.getDirection=olympe.dc.ua.Relation.prototype.Sa;olympe.dc.ua.Relation.prototype.getTag=olympe.dc.ua.Relation.prototype.T;olympe.dc.ua.Relation.ma=[olympe.dc.De];olympe.dc.db={};function Vc(a,b,c,d,e,f=olympe.dc.Ia.rb){const g=c.Z();Wc(a.C,b,c,d,e,f);return h=>{if(h)a.C.push(g);else{h=a.C;const k=h.F.get(g);if(void 0!==k){const l=h.C.indexOf(g);h.C.splice(l,1);Xc(h,Yc(h,k.C,h.C.length),k.source);h.F.delete(g)}}}}function Zc(a,b){a.Oa.Fa(b)}function $c(a,b,c){b&&a.Oa.mc(b);c&&a.Oa.$c(c)}
398
+ olympe.dc.db.Zs=class{constructor(a,b,c,d,e){this.N=a;this.Oa=b;this.C=new olympe.dc.db.Ns(a,b,d);this.view=new olympe.dc.ib(a,b);this.by=new olympe.dc.db.qu(this.N,this.view,b,e)}Za(){return this.N}persist(a){this.Oa.qa();this.Oa.fb(a,olympe.dc.db.Instance.C.mq);this.Oa.la()}af(a,b){this.C.af(a,b)}};const ad=olympe.dc.$b.VERSION,bd=olympe.dc.$b.Hd,cd=olympe.dc.lc.Vc,dd=olympe.dc.lc.xi;
399
+ olympe.dc.db.Database=class a extends Map{constructor(b,c){super();this.id=olympe.X.bc();this.N=b;this.xb=olympe.D.Na();this.Ld=c.get('defaultSource')||olympe.dc.Ia.rb;this.P=olympe.dc.db.Database.G.IDLE;this.ba=new Map;this.Fb=[];this.G=[];this.Wa=new Map;b=c.get('garbageCollector')||olympe.dc.db.Ci.C.Cl;new olympe.dc.db.Ci(this,b,this.xb);c.get('debug')&&this.de()}Z(){return this.id}getState(){return this.P}Za(){return this.N}create(b,c){const d=this.K(b,!0);d.mc(c&&parseInt(c.get(ad),10)||1);d.ki(c&&
400
+ c.get(bd)||this.Ld);c&&(c.delete(ad),c.delete(bd),this.Nc(d,c));this.C(a.F.xp,b)}update(b,c,d=!1){if(void 0!==c&&null!==c){b=this.K(b,!0);var e=c&&parseInt(c.get(ad),10);0>e||!d&&b.version()>=e||(c.delete(ad),b.mc(isNaN(e)?b.version()+1:e),this.Nc(b,c))}}Fc(b){const c=this.get(b);void 0!==c&&(this.Ka(c,!1),this.C(a.F.yp,b))}link(b,c,d){c=this.K(c,!0);d=this.K(d,!0);switch(b){case cd:c.be(d);break;case dd:c.Md(d);break;default:c.link(b,d)}}unlink(b,c,d){c=this.get(c);d=this.get(d);if(void 0!==c&&void 0!==
401
+ d)switch(b){case cd:c.Xk(d);break;case dd:c.tj(d);break;default:c.unlink(b,d)}}mc(b){for(const c of b)this.K(c).ba()}$c(b){for(const c of b)(b=this.get(c))&&b.la()}fb(b,c){b.forEach(d=>{this.K(d).sh(c)})}fc(b){const c=this.get(b);void 0!==c&&(c.clear(),super.delete(b),this.C(a.F.Go,b))}K(b,c=!1){let d=this.get(b);void 0===d&&(d=new olympe.dc.db.Instance(b,this),this.set(b,d),this.C(a.F.Fo,b),c&&this.C(a.F.Ck,b));return d}V(b,c,d=!1,e=null){return{[Symbol.iterator]:function*(f){const g=olympe.dm.Relation.C.Bk,
402
+ h=olympe.dm.Relation.C.pk,k=olympe.dc.Ca.ORIGIN,l=olympe.dc.Ca.DESTINATION,n=a.C.Nh+c,p=d?h:g,q=d?g:h,r=(new Map).set(f,!1),t=(v,w)=>(v=this.get(v))&&0!==(v.get(n)&w),u=([v,w])=>!r.has(v)&&(e?e(w):!0);for(const v of r.keys())r.get(v)||(r.set(v,!0),yield v),f=this.get(v),void 0!==f&&f.forEach((w,y)=>{(y[0]===k&&t(y.substring(1),q)||y[0]===l&&t(y.substring(1),p))&&Array.from(w.entries()).filter(u).forEach(([B])=>{r.set(B,!1)})})}.bind(this,b)}}uc(b){ed(this.G[0],olympe.X.Cg(),b)}$(b){if(0===this.G.length)debugger;
403
+ this.G[0].C.delete(b)}C(b,c,...d){this.ba.has(b)&&this.ba.get(b).forEach(e=>{e(c,...d)})}Ka(b,c){this.Wa.set(b,c)}Md(b,c,d,e){0<this.G.length&&fd(this.G[0],b).xa(e?gd+c:c,d)}be(b,c,d,e,f){if(0<this.G.length){var g=this.G[0];d===hd?f?fd(g,b).link(c,e):fd(g,b).unlink(c,e):f?fd(g,b).Wa(c,e):fd(g,b).fb(c,e)}}F(b,c){let d=this.ba.get(b);void 0===d&&(d=[],this.ba.set(b,d));d.push(c)}Fa(b){this.Fb.push(b)}qd(b){return this.G.reduce((c,d)=>d.G.has(b)||c,!1)}qa(){this.P===a.G.IDLE&&(this.P=a.G.Bs);this.G.unshift(new olympe.dc.db.dt(this,
404
+ this.xb))}la(){this.P=a.G.fg;this.ie();id(this.G[0]);this.G.shift();0===this.G.length&&(this.P=a.G.IDLE,this.Fb.forEach(b=>{b()}))}Nc(b,c){const d=a.C.kc;for(const [e,f]of c)void 0!==f&&(e[0]===d?b.$k(e.substr(1),f):b.update(e,f))}ie(){const b=a.C.ORIGIN,c=new Set,d=(f,g=[])=>{const h=f.tag();if(!c.has(h)&&(c.add(h),g.push(f),f=f.get(b+cd)))for(const k of f.values())d(k,g);return g},e=this.G[0];for(const [f,g]of this.Wa)d(f).filter(h=>h.qd(g)).forEach(h=>{h=h.tag();g?fd(e,h).create():fd(e,h).delete()});
405
+ this.Wa.clear()}de(){const b=a.C.DESTINATION,c=a.F.Fl,d=a.F.nk,e=new Set,f=new Map;this.F(a.F.xp,g=>{e.add(g)});this.F(c,g=>{e.delete(g);f.delete(g)});this.F(d,(g,...h)=>{if(h[0]===dd&&h[1]===b){const k=h[2];this.get(k).Gb()||(h=f.get(k)||new Set,0===h.size&&f.set(k,h),h.add(g))}});this.Fa(()=>{e.forEach(g=>{const h=this.get(g);h&&null===h.model()&&this.N.error(`\n[DEBUG - DATABASE]\nInstance ${g} created but does not exist !\n${h.toString()}`)});e.clear();f.forEach((g,h)=>{const k=this.get(h);k&&
406
+ this.N.error(`\n[DEBUG - DATABASE]\nThe model ${h} is extended by other models but does not exist !`+`\nExtension models: ${Array.from(g.values()).join(', ')}`+`\n\n ${k.toString()}`)});f.clear()})}};olympe.dc.db.Database.C={Nh:'$',wt:'~',kc:'?',ll:'=',co:'@',ORIGIN:olympe.dc.Ca.ORIGIN,DESTINATION:olympe.dc.Ca.DESTINATION};olympe.dc.db.Database.F={Fo:0,Go:1,er:2,Ck:3,eo:4,fo:5,Fl:6,Cc:7,nk:8,um:9,xp:10,yp:11,yq:12};olympe.dc.db.Database.G={IDLE:0,Bs:1,fg:2};const Q=olympe.dc.db.Database.F,jd=olympe.dc.db.Database.C.Nh,kd=olympe.dc.db.Database.C.wt,ld=olympe.dc.db.Database.C.kc,md=olympe.dc.db.Database.C.ll,nd=olympe.dc.db.Database.C.co,R=olympe.dc.Ca.ORIGIN,S=olympe.dc.Ca.DESTINATION,od=olympe.dc.lc.Vc,pd=olympe.dc.lc.xi;
407
+ olympe.dc.db.Instance=class a extends Map{constructor(b,c){super();this.C=b;this.Nc=olympe.dc.Ia.rb;this.e=!1;this.Fb=0;this.F=void 0;this.c=0;this.Fa=a.C.mq;this.db=c}tag(){return this.C}Gb(){return this.e}fc(){return this.db.qd(this.C)}source(){return this.Nc}version(){return this.Fb}model(){const b=this.get(S+od);return b&&b.values().next().value||null}Hf(){const b=this.get(S+pd);return b&&b.values().next().value||null}persisted(){return this.Fa!==a.C.nr}toString(){var b=this.eb(olympe.dc.CloudObject.nameProp.T());
408
+ b=`Instance: ${this.C}, Exist: ${this.e}, Name: ${b}`;var c=this.model();if(c){var d=c.eb(olympe.dc.CloudObject.nameProp.T())||'No model name';b+=`\nModel: ${c.C}, Exist: ${c.e}, Model name: ${d}`}else b+='\nModel: no model';(c=this.Hf())?(d=c.eb(olympe.dc.CloudObject.nameProp.T())||'No extension name',b+=`\nExtension: ${c.C}, Exist: ${c.e}, Extension name: ${d}`):b+='\nExtension: no extension';return b}eb(b,c=!1){const d=this.get(jd+b);return c||void 0!==d?d:this.get(md+b)}Ka(b,c=!1){const d=this.get(ld+
409
409
  b);return c||void 0!==d?d:this.get(kd+b)}update(b,c){const d=jd+b;var e=this.get(d),f=e=void 0===e?null:e;(null!==f&&'function'===typeof f.nb?f.nb(c):f===c)||(e instanceof olympe.dc.Ec&&(this.db.get(e.T()).$c(),this.db.Fc(e.T())),c instanceof olympe.dc.Ec&&(e=this.db.K(c.T(),!0),e.F&&e.F.tag!==this.C&&this.db.Za().fatal('Instance',c.T(),'referenced multiple times!\nThis instance is currently property of',e.F.tag,'(for the property '+e.F.lb+')','and is assigned as a property of',this.C,'(for the property '+
410
- b+')'),e.uh(this.C,b)),e=md+b,null===c?(this.delete(d),c=(c=this.model())&&c.Ka(b),void 0!==c?(this.set(e,c),this.K(b,c,!0)):this.K(b,null,!1)):(this.set(d,c),this.delete(e),this.K(b,c,!1)))}Zk(b,c){const d=ld+b;var e=this.get(d);(void 0===e?null:e)!==c&&(e=kd+b,null===c?(this.delete(d),c=(c=this.Jf())&&c.Ka(b),c=void 0===c?null:c,null!==c&&this.set(e,c),this.V((new Map).set(b,c))):(void 0!==this.get(e)&&this.delete(e),this.set(d,c),this.V((new Map).set(b,c))))}link(b,c){var d=R+b;const e=this.xb(S+
411
- b);d=c.xb(d);e.has(c.C)||(e.set(c.C,c),d.set(this.C,this),this.db.C(Q.mk,this.C,b,S,c.C),this.db.C(Q.mk,c.C,b,R,this.C),this.e&&c.e&&(this.G(b,S,c,!0),c.G(b,R,this,!0)))}unlink(b,c){const d=R+b;void 0!==this.eb(S+b,c.C)&&(c.eb(d,this.C),this.db.C(Q.tm,this.C,b,S,c.C),this.db.C(Q.tm,c.C,b,R,this.C),this.e&&c.e&&(this.G(b,S,c,!1),c.G(b,R,this,!1)))}ce(b){const c=this.model();if(null!==c){if(c===b)return;this.unlink(od,c)}this.link(od,b);b.forEach((d,e)=>{if(e[0]===ld||e[0]===kd)e=e.substring(1),this.Wa(e,
412
- d)});(b.e||b===this)&&this.db.Ka(this,!0)}Wk(b){this.unlink(od,b);this.forEach((c,d)=>{c=d.substring(1);this.Wa(c,null)});this.db.Ka(this,!1)}Md(b){const c=this.Jf();if(null!==c){if(c===b)return;this.unlink(pd,c)}this.link(pd,b);const d=new Map;b.forEach((e,f)=>{if(f[0]===ld||f[0]===kd)f=f.substring(1),this.has(ld+f)||(this.set(kd+f,e),d.set(f,e))});this.V(d)}sj(b){this.unlink(pd,b);const c=new Map;this.forEach((d,e)=>{e[0]===kd&&(this.delete(e),d=e.substring(1),c.set(d,null))});this.V(c)}uc(b,c,
413
- d){const e=(...f)=>{var g=f.length;const h=f[g-2];(g=this.db.get(f[g-1]))&&(h?g.ba():g.la());d(...f)};this.$(b,c,e);return e}$(b,c,d){const e=this.xb(nd+b);e.has(c)||(e.set(c,d),this.ba(),this.db.C(Q.co,this.C,b,c))}P(b,c){const d=this.eb(nd+b,c);void 0!==d&&(this.la(),this.db.C(Q.eo,this.C,b,c));return d}li(b){this.Nc=b}hc(b){this.Db=b}Ye(b){this.Fa=b;this.qa()||this.db.C(Q.Bk,this.C)}qd(b){const c=this.e!==b;c&&(b?(this.e=b,this.ie()):(this.Nd(),this.e=b),this.wd(b));return c}ba(){this.c++;1===
414
- this.c&&this.db.C(Q.dr,this.C)}la(){0<this.c?--this.c:this.db.C(Q.xq,this.C,`Try to decrease references on instance ${this.C} but the reference counter is already 0.\n`+'It happens when you try to remove a callback from an instance multiple times.\nThis counter reference is used for garbage collection of instances in the database.');0===this.c&&this.db.C(Q.Bk,this.C)}qa(){return 0<this.c||this.Fa===olympe.dc.db.Instance.C.mq}clear(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===S){const e=c.substring(1),
410
+ b+')'),e.uh(this.C,b)),e=md+b,null===c?(this.delete(d),c=(c=this.model())&&c.Ka(b),void 0!==c?(this.set(e,c),this.K(b,c,!0)):this.K(b,null,!1)):(this.set(d,c),this.delete(e),this.K(b,c,!1)))}$k(b,c){const d=ld+b;var e=this.get(d);(void 0===e?null:e)!==c&&(e=kd+b,null===c?(this.delete(d),c=(c=this.Hf())&&c.Ka(b),c=void 0===c?null:c,null!==c&&this.set(e,c),this.V((new Map).set(b,c))):(void 0!==this.get(e)&&this.delete(e),this.set(d,c),this.V((new Map).set(b,c))))}link(b,c){var d=R+b;const e=this.xb(S+
411
+ b);d=c.xb(d);e.has(c.C)||(e.set(c.C,c),d.set(this.C,this),this.db.C(Q.nk,this.C,b,S,c.C),this.db.C(Q.nk,c.C,b,R,this.C),this.e&&c.e&&(this.G(b,S,c,!0),c.G(b,R,this,!0)))}unlink(b,c){const d=R+b;void 0!==this.fb(S+b,c.C)&&(c.fb(d,this.C),this.db.C(Q.um,this.C,b,S,c.C),this.db.C(Q.um,c.C,b,R,this.C),this.e&&c.e&&(this.G(b,S,c,!1),c.G(b,R,this,!1)))}be(b){const c=this.model();if(null!==c){if(c===b)return;this.unlink(od,c)}this.link(od,b);b.forEach((d,e)=>{if(e[0]===ld||e[0]===kd)e=e.substring(1),this.Wa(e,
412
+ d)});(b.e||b===this)&&this.db.Ka(this,!0)}Xk(b){this.unlink(od,b);this.forEach((c,d)=>{c=d.substring(1);this.Wa(c,null)});this.db.Ka(this,!1)}Md(b){const c=this.Hf();if(null!==c){if(c===b)return;this.unlink(pd,c)}this.link(pd,b);const d=new Map;b.forEach((e,f)=>{if(f[0]===ld||f[0]===kd)f=f.substring(1),this.has(ld+f)||(this.set(kd+f,e),d.set(f,e))});this.V(d)}tj(b){this.unlink(pd,b);const c=new Map;this.forEach((d,e)=>{e[0]===kd&&(this.delete(e),d=e.substring(1),c.set(d,null))});this.V(c)}uc(b,c,
413
+ d){const e=(...f)=>{var g=f.length;const h=f[g-2];(g=this.db.get(f[g-1]))&&(h?g.ba():g.la());d(...f)};this.$(b,c,e);return e}$(b,c,d){const e=this.xb(nd+b);e.has(c)||(e.set(c,d),this.ba(),this.db.C(Q.eo,this.C,b,c))}P(b,c){const d=this.fb(nd+b,c);void 0!==d&&(this.la(),this.db.C(Q.fo,this.C,b,c));return d}ki(b){this.Nc=b}mc(b){this.Fb=b}sh(b){this.Fa=b;this.qa()||this.db.C(Q.Ck,this.C)}qd(b){const c=this.e!==b;c&&(b?(this.e=b,this.ie()):(this.de(),this.e=b),this.Ld(b));return c}ba(){this.c++;1===
414
+ this.c&&this.db.C(Q.er,this.C)}la(){0<this.c?--this.c:this.db.C(Q.yq,this.C,`Try to decrease references on instance ${this.C} but the reference counter is already 0.\n`+'It happens when you try to remove a callback from an instance multiple times.\nThis counter reference is used for garbage collection of instances in the database.');0===this.c&&this.db.C(Q.Ck,this.C)}qa(){return 0<this.c||this.Fa===olympe.dc.db.Instance.C.nq}clear(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===S){const e=c.substring(1),
415
415
  f=d===R?S:R;b.forEach(g=>{const h=g.get(f+e);h.delete(this.C);0===h.size&&g.delete(f+e)})}d===jd&&b instanceof olympe.dc.Ec&&this.db.get(b.T()).$c()});void 0!==this.F&&this.db.get(this.F.tag).delete(jd+this.F.lb)}uh(b,c){void 0===this.F&&this.ba();this.F={tag:b,lb:c}}$c(){void 0!==this.F&&(this.la(),this.F=void 0)}ie(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===S){const e=c.substring(1),f=d===R?S:R;b.forEach(g=>{g.e&&(this.G(e,d,g,!0),g.G(e,f,this,!0))})}else if(d===jd||d===md)c=c.substring(1),
416
- this.K(c,b,d===md)})}Nd(){this.forEach((b,c)=>{const d=c[0];if(d!==nd){var e=c.substring(1);d===R?b.forEach(f=>{f.unlink(e,this)}):d===S?b.forEach(f=>{this.unlink(e,f)}):d===jd&&this.update(e,null);this.delete(c)}});this.Db=0;if(void 0!==this.F){const b=this.db.get(this.F.tag),c=b.get(jd+this.F.lb);c&&c.T&&c.T()===this.C&&b.update(this.F.lb,null)}}wd(b){this.db.C(b?Q.El:Q.Cc,this.C)}K(b,c,d){this.e&&this.db.Md(this.C,b,c,d)}G(b,c,d,e){this.db.ce(this.C,b,c,d.C,e)}V(b,c=[]){var d=this.get(R+od);void 0!==
417
- d&&d.forEach(e=>{b.forEach((f,g)=>e.Wa(g,f))});d=this.get(R+pd);void 0!==d&&d.forEach((e,f)=>{if(!c.includes(e.tag())){var g=new Map;b.forEach((h,k)=>{e.has(ld+k)||(g.set(k,h),null!==h?e.set(kd+k,h):e.delete(kd+k))});e.V(g,[...c,f])}})}Wa(b,c){if(!this.has(jd+b)){const d=md+b,e=this.get(d);c!==(void 0!==e?e:null)&&(null===c?this.delete(d):this.set(d,c),this.K(b,c,null!==c))}}xb(b){let c=this.get(b);void 0===c&&(c=new Map,this.set(b,c));return c}eb(b,c){const d=this.get(b);if(void 0!==d){const e=d.get(c);
418
- d.delete(c);0===d.size&&this.delete(b);return e}}};olympe.dc.db.Instance.C={mr:0,mq:1,lq:2};const hd=olympe.dc.db.Database.C.DESTINATION,gd=olympe.dc.db.Database.C.kl,qd=olympe.dc.db.Database.C.Oh,rd=olympe.dc.db.Database.C.bo,sd=olympe.dc.db.Database.C.ORIGIN+hd,td=qd+qd;function ed(a,b,c){let d=a.C.get(b);void 0===d&&(d=[],a.C.set(b,d));a.buffer.push([b,d.length]);d.push(c)}
419
- function id(a){const b=a.Oa;a.F.forEach((c,d)=>{const e=b.get(d);if(c.ue()||c.K()){var f=e.get(rd);f&&ud(a,f,c.ue(),d);c.K()&&a.G.add(d)}for(const [l,n]of c.ed()){var g=l[0]===gd;d=a;var h=e;f=g?l.substr(1):l;var k=n;const p=h.get(rd+qd+f);p&&ud(d,p,k,g);(h=h.get(rd+td))&&ud(d,h,f,k,g)}for(const l of c.Fa())vd(a,e,...l)});a.F.clear();wd(a)}function fd(a,b){let c=a.F.get(b);void 0===c&&(c=new olympe.dc.db.pg(b),a.F.set(b,c));return c}
420
- function ud(a,b,...c){b.forEach((d,e)=>{ed(a,e,d.bind(null,...c))})}function vd(a,b,c,d,e,f){const g=b.get(rd+d+c);g&&ud(a,g,f,e);(b=b.get(rd+sd))&&ud(a,b,c,d,f,e)}function wd(a){a.K.run(()=>{const b=a.C;for(const [d,e]of a.buffer){var c=b.get(d);(c=c&&c[e])&&c()}});a.C.clear();a.buffer.length=0}olympe.dc.db.ct=class{constructor(a,b){this.Oa=a;this.K=b;this.F=new Map;this.G=new Set;this.C=new Map;this.buffer=[]}};function xd(a){const b=olympe.dc.db.Database.F.Fo,c=olympe.dc.db.Database.F.El,d=olympe.dc.db.Database.F.Cc,e=olympe.dc.db.Database.F.mk,f=olympe.dc.db.Database.F.tm,g=olympe.dc.db.Database.F.co,h=olympe.dc.db.Database.F.eo,k=()=>{};a.Oa.F(olympe.dc.db.Database.F.Eo,()=>{});a.Oa.F(b,()=>{});a.Oa.F(c,l=>{a.Oa.uc(()=>{yd(a.view,l,k,`monitorRelations${l}`)})});a.Oa.F(d,l=>{a.Oa.uc(()=>{zd(a.view,l,`monitorRelations${l}`)})});a.Oa.F(e,()=>{});a.Oa.F(f,()=>{});a.Oa.F(g,()=>{});a.Oa.F(h,()=>{})}
421
- olympe.dc.db.pu=class{constructor(a,b,c,d){this.N=a;this.view=b;this.Oa=c;d&&xd(this)}debug(a){const b=olympe.dc.za(a);if(this.Oa.has(b)){var c=this.Oa.get(a);a='\n[DEBUG - DATABASE]\n'+c.toString();if(!c.Gb()){const d=[];for(;null!==c&&!d.includes(c.tag());)d.push(c.tag()),c=c.model();c=this.Oa.get(d[d.length-1]);const e=olympe.dc.db.Database.C.Oh+olympe.dc.CloudObject.nameProp.T();d.push('???');a+='\n\nThe instance <<'+b+'>> does not exists because the instance '+c.tag()+' (name: '+c.get(e)+') has no model.\nList: '+
422
- d.join(' --M--\x3e ')}this.N.info(a)}else this.N.info('[DATABASE] Instance',b,'has never been created or referred by the database')}};olympe.dc.db.Di=class a{constructor(b,c,d){this.N=b.Za();this.Oa=b;this.F=new Set;this.mode=c;this.K=d;this.C=!1;c!==a.C.Bl&&this.P()}run(){if(!this.C)switch(this.mode){case a.C.ss:this.C=!0;this.K.run(()=>{jc(()=>{this.G();this.C=!1},0)});break;case a.C.Rq:this.C=!0,this.G(),this.C=!1}}G(){const b=this.Oa,c=olympe.dc.Qb.zf,d=this.F,e=h=>b.get(h);var f=h=>!(h.persisted()||h.qa());for(var g of d){const h=b.get(g);if(h&&!h.qa()){if(!h.persisted())continue;Array.from(b.V(g,c,!1,f)).forEach(k=>{d.add(k)});
423
- b.fc(g)}d.delete(g)}for(const h of d)f=Array.from(b.V(h,c,!0)).map(e),g=Array.from(b.V(h,c)).map(e),f.some(k=>k.qa())?g.filter(k=>!k.persisted()).forEach(k=>{d.delete(k.tag())}):f.concat(g).filter(k=>!k.persisted()).map(k=>k.tag()).forEach(k=>{d.delete(k);b.fc(k)});d.clear()}P(){this.Oa.Fa(this.run.bind(this));const b=olympe.dc.db.Database.F.dr,c=olympe.dc.db.Database.F.xp,d=olympe.dc.db.Database.F.xq,e=olympe.dc.db.Database.G.IDLE,f=g=>{this.F.add(g);this.Oa.getState()===e&&this.run()};this.Oa.F(olympe.dc.db.Database.F.Bk,
424
- f.bind(this));this.Oa.F(c,f.bind(this));this.Oa.F(b,g=>{this.F.delete(g)});this.Oa.F(d,(g,...h)=>{this.N.error(h[0])})}};olympe.dc.db.Di.C={Bl:0,Rq:1,ss:2};const Ad=olympe.dc.db.Database.C.ORIGIN,Bd=olympe.dc.db.Database.C.DESTINATION,Cd=olympe.dc.db.Database.C.Oh,Dd=olympe.dc.db.Database.C.kl,Ed=Ad+Bd,Fd=Cd+Cd,Gd=olympe.dc.db.Database.G;function Ec(a,b,c,d){const e=a.Oa.K(olympe.dc.za(b));d=d||Hd(a);e.$('',d,c);e.Gb()&&a.G.run(()=>{c(!0,b)});return d}function Fc(a,b,c,d=!1){const e=U(a,b);if(null!==e){const f=e.P('',c);void 0!==f&&(a.Oa.getState()===Gd.ig&&a.Oa.$(c),!d&&e.Gb()&&a.G.run(()=>{f(!1,b)}))}}
425
- function yd(a,b,c,d){const e=a.Oa.K(olympe.dc.za(b));b=d||Hd(a);const f=e.uc(Ed,b,c);e.Gb()&&e.forEach((g,h)=>{g=h[0];g!==Ad&&g!==Bd||Id(a,e,h,!0,f,!0)})}function zd(a,b,c){const d=U(a,b);if(null!==d){const e=d.P(Ed,c);void 0!==e&&(a.Oa.getState()!==Gd.ig||d.fc()||a.Oa.$(c),d.Gb()&&d.forEach((f,g)=>{f=g[0];(f===Ad||f===Bd)&&e&&Id(a,d,g,!1,e,!0)}))}}function Hd(a){++a.K;return String(a.K)}
416
+ this.K(c,b,d===md)})}de(){this.forEach((b,c)=>{const d=c[0];if(d!==nd){var e=c.substring(1);d===R?b.forEach(f=>{f.unlink(e,this)}):d===S?b.forEach(f=>{this.unlink(e,f)}):d===jd&&this.update(e,null);this.delete(c)}});this.Fb=0;if(void 0!==this.F){const b=this.db.get(this.F.tag),c=b.get(jd+this.F.lb);c&&c.T&&c.T()===this.C&&b.update(this.F.lb,null)}}Ld(b){this.db.C(b?Q.Fl:Q.Cc,this.C)}K(b,c,d){this.e&&this.db.Md(this.C,b,c,d)}G(b,c,d,e){this.db.be(this.C,b,c,d.C,e)}V(b,c=[]){var d=this.get(R+od);void 0!==
417
+ d&&d.forEach(e=>{b.forEach((f,g)=>e.Wa(g,f))});d=this.get(R+pd);void 0!==d&&d.forEach((e,f)=>{if(!c.includes(e.tag())){var g=new Map;b.forEach((h,k)=>{e.has(ld+k)||(g.set(k,h),null!==h?e.set(kd+k,h):e.delete(kd+k))});e.V(g,[...c,f])}})}Wa(b,c){if(!this.has(jd+b)){const d=md+b,e=this.get(d);c!==(void 0!==e?e:null)&&(null===c?this.delete(d):this.set(d,c),this.K(b,c,null!==c))}}xb(b){let c=this.get(b);void 0===c&&(c=new Map,this.set(b,c));return c}fb(b,c){const d=this.get(b);if(void 0!==d){const e=d.get(c);
418
+ d.delete(c);0===d.size&&this.delete(b);return e}}};olympe.dc.db.Instance.C={nr:0,nq:1,mq:2};const hd=olympe.dc.db.Database.C.DESTINATION,gd=olympe.dc.db.Database.C.ll,qd=olympe.dc.db.Database.C.Nh,rd=olympe.dc.db.Database.C.co,sd=olympe.dc.db.Database.C.ORIGIN+hd,td=qd+qd;function ed(a,b,c){let d=a.C.get(b);void 0===d&&(d=[],a.C.set(b,d));a.buffer.push([b,d.length]);d.push(c)}
419
+ function id(a){const b=a.Oa;a.F.forEach((c,d)=>{const e=b.get(d);if(c.ue()||c.K()){var f=e.get(rd);f&&ud(a,f,c.ue(),d);c.K()&&a.G.add(d)}for(const [l,n]of c.ed()){var g=l[0]===gd;d=a;var h=e;f=g?l.substr(1):l;var k=n;const p=h.get(rd+qd+f);p&&ud(d,p,k,g);(h=h.get(rd+td))&&ud(d,h,f,k,g)}for(const l of c.Fa())vd(a,e,...l)});a.F.clear();wd(a)}function fd(a,b){let c=a.F.get(b);void 0===c&&(c=new olympe.dc.db.mg(b),a.F.set(b,c));return c}
420
+ function ud(a,b,...c){b.forEach((d,e)=>{ed(a,e,d.bind(null,...c))})}function vd(a,b,c,d,e,f){const g=b.get(rd+d+c);g&&ud(a,g,f,e);(b=b.get(rd+sd))&&ud(a,b,c,d,f,e)}function wd(a){a.K.run(()=>{const b=a.C;for(const [d,e]of a.buffer){var c=b.get(d);(c=c&&c[e])&&c()}});a.C.clear();a.buffer.length=0}olympe.dc.db.dt=class{constructor(a,b){this.Oa=a;this.K=b;this.F=new Map;this.G=new Set;this.C=new Map;this.buffer=[]}};function xd(a){const b=olympe.dc.db.Database.F.Go,c=olympe.dc.db.Database.F.Fl,d=olympe.dc.db.Database.F.Cc,e=olympe.dc.db.Database.F.nk,f=olympe.dc.db.Database.F.um,g=olympe.dc.db.Database.F.eo,h=olympe.dc.db.Database.F.fo,k=()=>{};a.Oa.F(olympe.dc.db.Database.F.Fo,()=>{});a.Oa.F(b,()=>{});a.Oa.F(c,l=>{a.Oa.uc(()=>{yd(a.view,l,k,`monitorRelations${l}`)})});a.Oa.F(d,l=>{a.Oa.uc(()=>{zd(a.view,l,`monitorRelations${l}`)})});a.Oa.F(e,()=>{});a.Oa.F(f,()=>{});a.Oa.F(g,()=>{});a.Oa.F(h,()=>{})}
421
+ olympe.dc.db.qu=class{constructor(a,b,c,d){this.N=a;this.view=b;this.Oa=c;d&&xd(this)}debug(a){const b=olympe.dc.za(a);if(this.Oa.has(b)){var c=this.Oa.get(a);a='\n[DEBUG - DATABASE]\n'+c.toString();if(!c.Gb()){const d=[];for(;null!==c&&!d.includes(c.tag());)d.push(c.tag()),c=c.model();c=this.Oa.get(d[d.length-1]);const e=olympe.dc.db.Database.C.Nh+olympe.dc.CloudObject.nameProp.T();d.push('???');a+='\n\nThe instance <<'+b+'>> does not exists because the instance '+c.tag()+' (name: '+c.get(e)+') has no model.\nList: '+
422
+ d.join(' --M--\x3e ')}this.N.info(a)}else this.N.info('[DATABASE] Instance',b,'has never been created or referred by the database')}};olympe.dc.db.Ci=class a{constructor(b,c,d){this.N=b.Za();this.Oa=b;this.F=new Set;this.mode=c;this.K=d;this.C=!1;c!==a.C.Cl&&this.P()}run(){if(!this.C)switch(this.mode){case a.C.us:this.C=!0;this.K.run(()=>{jc(()=>{this.G();this.C=!1},0)});break;case a.C.Sq:this.C=!0,this.G(),this.C=!1}}G(){const b=this.Oa,c=olympe.dc.Qb.xf,d=this.F,e=h=>b.get(h);var f=h=>!(h.persisted()||h.qa());for(var g of d){const h=b.get(g);if(h&&!h.qa()){if(!h.persisted())continue;Array.from(b.V(g,c,!1,f)).forEach(k=>{d.add(k)});
423
+ b.fc(g)}d.delete(g)}for(const h of d)f=Array.from(b.V(h,c,!0)).map(e),g=Array.from(b.V(h,c)).map(e),f.some(k=>k.qa())?g.filter(k=>!k.persisted()).forEach(k=>{d.delete(k.tag())}):f.concat(g).filter(k=>!k.persisted()).map(k=>k.tag()).forEach(k=>{d.delete(k);b.fc(k)});d.clear()}P(){this.Oa.Fa(this.run.bind(this));const b=olympe.dc.db.Database.F.er,c=olympe.dc.db.Database.F.yp,d=olympe.dc.db.Database.F.yq,e=olympe.dc.db.Database.G.IDLE,f=g=>{this.F.add(g);this.Oa.getState()===e&&this.run()};this.Oa.F(olympe.dc.db.Database.F.Ck,
424
+ f.bind(this));this.Oa.F(c,f.bind(this));this.Oa.F(b,g=>{this.F.delete(g)});this.Oa.F(d,(g,...h)=>{this.N.error(h[0])})}};olympe.dc.db.Ci.C={Cl:0,Sq:1,us:2};const Ad=olympe.dc.db.Database.C.ORIGIN,Bd=olympe.dc.db.Database.C.DESTINATION,Cd=olympe.dc.db.Database.C.Nh,Dd=olympe.dc.db.Database.C.ll,Ed=Ad+Bd,Fd=Cd+Cd,Gd=olympe.dc.db.Database.G;function Ec(a,b,c,d){const e=a.Oa.K(olympe.dc.za(b));d=d||Hd(a);e.$('',d,c);e.Gb()&&a.G.run(()=>{c(!0,b)});return d}function Fc(a,b,c,d=!1){const e=U(a,b);if(null!==e){const f=e.P('',c);void 0!==f&&(a.Oa.getState()===Gd.fg&&a.Oa.$(c),!d&&e.Gb()&&a.G.run(()=>{f(!1,b)}))}}
425
+ function yd(a,b,c,d){const e=a.Oa.K(olympe.dc.za(b));b=d||Hd(a);const f=e.uc(Ed,b,c);e.Gb()&&e.forEach((g,h)=>{g=h[0];g!==Ad&&g!==Bd||Id(a,e,h,!0,f,!0)})}function zd(a,b,c){const d=U(a,b);if(null!==d){const e=d.P(Ed,c);void 0!==e&&(a.Oa.getState()!==Gd.fg||d.fc()||a.Oa.$(c),d.Gb()&&d.forEach((f,g)=>{f=g[0];(f===Ad||f===Bd)&&e&&Id(a,d,g,!1,e,!0)}))}}function Hd(a){++a.K;return String(a.K)}
426
426
  function Jd(a,b,c,d,e){b=a.Oa.K(olympe.dc.za(b));c=olympe.dc.za(c);const f=Cd+c;e=e||Hd(a);b.$(f,e,d);if(b.Gb()){let g=!1,h=b.get(f);void 0===h&&(g=!0,h=b.get(Dd+c));if(void 0===h)return e;a.G.run(()=>{d(h,g)})}return e}function U(a,b,c=!1){if(null===b||void 0===b)throw Error('Provided tag is null or undefined.');a=a.Oa.get(olympe.dc.za(b));return!a||c&&!a.Gb()?null:a}
427
- function Kd(a,b,c){b=a.Oa.K(olympe.dc.za(b));const d=Hd(a);b.$(Fd,d,c);b.Gb()&&b.forEach((e,f)=>{const g=f[0];g!==Cd&&g!==Dd||a.G.run(()=>{c(f.substr(1),e,g===Dd)})});return d}function Ld(a,b,c){b=U(a,b);null!==b&&(b.P(Fd,c),a.Oa.getState()===Gd.ig&&a.Oa.$(c))}function Id(a,b,c,d,e,f){(b=b.get(c))&&b.forEach((g,h)=>{g.Gb()&&(f?a.G.run(()=>{e(c.substr(1),c[0],d,h)}):a.G.run(()=>{e(d,h)}))})}
428
- function V(a,b,c,d,e){b=a.Oa.K(olympe.dc.za(b));c=c.Sa()+c.T();e=e||Hd(a);d=b.uc(c,e,d);b.Gb()&&Id(a,b,c,!0,d,!1);return e}function Md(a,b,c){return c===olympe.dc.Qb.NONE?0:a.fb(b,c,!0)||0}function Nd(a,b){return function*(c){if(c)for(const [d,e]of c)if(c=d[0],c===Ad||c===Bd){const f=d.substring(1);for(const g of e.keys())yield[f,c,g]}}(U(a,b,!0))}
429
- function Od(a,b,c){if(!a.Gb(b))return a.N.warn(`No instance found with tag ${b}`),new Map;const d=new Map,e=[olympe.dc.za(b)];for(const f of e){const g=a.tb(f,c);d.set(f,g);for(const h of g.filter(k=>!d.has(k)))e.push(h)}a.N.debug(`Found ${d.size} instances in sub-tree rooted at ${olympe.dc.za(b)}`);return d}function Pd(a,b,c){return null!==a.Zm(c,olympe.dc.CloudObject.extendRel,d=>olympe.dc.La().Vk(d,olympe.dc.CloudObject.propertyRel,b))}
427
+ function Kd(a,b,c){b=a.Oa.K(olympe.dc.za(b));const d=Hd(a);b.$(Fd,d,c);b.Gb()&&b.forEach((e,f)=>{const g=f[0];g!==Cd&&g!==Dd||a.G.run(()=>{c(f.substr(1),e,g===Dd)})});return d}function Ld(a,b,c){b=U(a,b);null!==b&&(b.P(Fd,c),a.Oa.getState()===Gd.fg&&a.Oa.$(c))}function Id(a,b,c,d,e,f){(b=b.get(c))&&b.forEach((g,h)=>{g.Gb()&&(f?a.G.run(()=>{e(c.substr(1),c[0],d,h)}):a.G.run(()=>{e(d,h)}))})}
428
+ function V(a,b,c,d,e){b=a.Oa.K(olympe.dc.za(b));c=c.Sa()+c.T();e=e||Hd(a);d=b.uc(c,e,d);b.Gb()&&Id(a,b,c,!0,d,!1);return e}function Md(a,b,c){return c===olympe.dc.Qb.NONE?0:a.eb(b,c,!0)||0}function Nd(a,b){return function*(c){if(c)for(const [d,e]of c)if(c=d[0],c===Ad||c===Bd){const f=d.substring(1);for(const g of e.keys())yield[f,c,g]}}(U(a,b,!0))}
429
+ function Od(a,b,c){if(!a.Gb(b))return a.N.warn(`No instance found with tag ${b}`),new Map;const d=new Map,e=[olympe.dc.za(b)];for(const f of e){const g=a.tb(f,c);d.set(f,g);for(const h of g.filter(k=>!d.has(k)))e.push(h)}a.N.debug(`Found ${d.size} instances in sub-tree rooted at ${olympe.dc.za(b)}`);return d}function Pd(a,b,c){return null!==a.$m(c,olympe.dc.CloudObject.extendRel,d=>olympe.dc.La().Wk(d,olympe.dc.CloudObject.propertyRel,b))}
430
430
  function Qd(a,b,c,d){return(c=(a=U(a,b,!0))&&a.get(d+c))?Array.from(c.values()).filter(e=>e.Gb()).length:0}
431
- olympe.dc.ib=class{constructor(a,b){this.N=a;this.G=new olympe.D.$b('DB View context');this.Oa=b;this.K=0}Z(){return this.Oa.Z()}F(a,b,c){a=U(this,a);null!==a&&(b=olympe.dc.za(b),a.P(Cd+b,c),this.Oa.getState()===Gd.ig&&this.Oa.$(c))}C(a,b,c,d=!1){a=U(this,a);if(null!==a){b=b.Sa()+b.T();const e=a.P(b,c);void 0!==e&&(this.Oa.getState()!==Gd.ig||a.fc()&&!d||this.Oa.$(c),!d&&a.Gb()&&Id(this,a,b,!1,e,!1))}}Gb(a){a=U(this,a);return!(!a||!a.Gb())}name(a){let b,c;return null!=(c=null==(b=U(this,a))?void 0:
432
- b.fb(olympe.dc.CloudObject.nameProp.T()))?c:''}model(a){return(a=(a=U(this,a,!0))?a.model():null)?a.tag():null}Jf(a){return(a=(a=U(this,a,!0))&&a.Jf())?a.tag():null}qj(a){a=U(this,a,!0);return!(!a||!a.Jf())}Xf(a,b){a=(a=U(this,a,!0))&&a.model();return!(!a||!this.Zf(a.tag(),b))}version(a){return(a=U(this,a,!0))&&a.version()}source(a){return(a=U(this,a,!0))&&a.source()}bg(a){return(a=U(this,a,!1))?!!a.persisted():!0}fb(a,b,c){let d;a=null==(d=U(this,a,!0))?void 0:d.fb(olympe.dc.za(b),c);return void 0!==
433
- a?a:null}ed(a,b=!1){var c=U(this,a,!0);a=new Map;if(c)for(const [d,e]of c)c=d[0],(c===Cd||!b&&c===Dd)&&a.set(d.substring(1),e);return a}tb(a,b){return this.lj(a,[b])}Vk(a,b,c){return this.tb(a,b).includes(olympe.dc.za(c))}lj(a,b){a=U(this,a,!0);if(!a)return[];a=[a.tag()];for(const c of b){b=[];for(const d of a)if(a=U(this,d,!0).get(c.Sa()+c.T()),void 0!==a)for(const e of a.values())e.Gb()&&b.push(e.tag());a=b}return a}jc(a,b){var c=U(this,a,!0);return c?(c=c.get(b.Sa()+b.T()))&&1<c.size?(this.N.warn(`Relation ${b.T()} to instance ${a} is not unique: found ${c.size} related items`),
434
- null):(a=c?c.values().next().value:null)&&a.Gb()?a.tag():null:null}Vf(a,b,c){a=olympe.dc.za(a);const d=Od(this,a,b);d.delete(a);return c?(c=olympe.dc.za(c),d.has(c)?Array.from(Od(this,c,b.zc()).keys()).filter(e=>d.has(e)):[]):Array.from(d.keys())}Zm(a,b,c){if(!this.Gb(a))return null;b=Od(this,a,b);const d=[olympe.dc.za(a)];for(const e of d){if(c(e))return e;if(a=b.get(e))for(const f of a.filter(g=>!d.includes(g)))d.push(f)}return null}$m(a,b,c){return this.lj(a,b).find(c)||null}mw(a,b,c){return this.lj(a,
435
- b).filter(c)}Pk(a,b=olympe.dc.CloudObject){var c=U(this,a,!0);const d=b&&U(this,b,!0),e=[c];for(;c&&c!==d;){c=c.Jf();if(e.includes(c))throw Error(`Cycle detected when following recursively extend relations from base model instance "${a}".`);if(c&&!c.Gb())throw a=`Try to get all extensions of the model ${olympe.dc.za(a)} but one of them does not exists (${c.tag()})`,Error(a);null!==c&&e.push(c)}c=U(this,olympe.dc.CloudObject,!0);if(d!==c&&e[e.length-1]===c)throw Error(`The model "${this.name(a)}" (tag = ${a}) does not extend the expected model "${this.name(b)}" (tag = ${b}).`);
436
- return e.map(f=>f.tag())}Zf(a,b){const c=olympe.dc.za(b);return!!this.Zm(a,olympe.dc.CloudObject.extendRel,d=>d===c)}fe(a){return this.tb(a,olympe.dc.CloudObject.instancesRel)}};olympe.dc.ib.prototype.getInstances=olympe.dc.ib.prototype.fe;olympe.dc.ib.prototype.isExtending=olympe.dc.ib.prototype.Zf;olympe.dc.ib.prototype.getExtendedModels=olympe.dc.ib.prototype.Pk;olympe.dc.ib.prototype.findAllRelated=olympe.dc.ib.prototype.mw;olympe.dc.ib.prototype.findRelated=olympe.dc.ib.prototype.$m;
437
- olympe.dc.ib.prototype.findRecursive=olympe.dc.ib.prototype.Zm;olympe.dc.ib.prototype.getRecursiveRelated=olympe.dc.ib.prototype.Vf;olympe.dc.ib.prototype.getUniqueRelated=olympe.dc.ib.prototype.jc;olympe.dc.ib.prototype.getMultiRelated=olympe.dc.ib.prototype.lj;olympe.dc.ib.prototype.isRelated=olympe.dc.ib.prototype.Vk;olympe.dc.ib.prototype.getRelated=olympe.dc.ib.prototype.tb;olympe.dc.ib.prototype.getProperties=olympe.dc.ib.prototype.ed;olympe.dc.ib.prototype.getProperty=olympe.dc.ib.prototype.fb;
438
- olympe.dc.ib.prototype.isPersisted=olympe.dc.ib.prototype.bg;olympe.dc.ib.prototype.instanceOf=olympe.dc.ib.prototype.Xf;olympe.dc.ib.prototype.isModel=olympe.dc.ib.prototype.qj;olympe.dc.ib.prototype.extension=olympe.dc.ib.prototype.Jf;olympe.dc.ib.prototype.model=olympe.dc.ib.prototype.model;olympe.dc.ib.prototype.name=olympe.dc.ib.prototype.name;olympe.dc.ib.prototype.exist=olympe.dc.ib.prototype.Gb;function Rd(a,b){let c=a.C.get(b);void 0===c&&(c=new olympe.dc.db.pg(b),a.C.set(b,c));return c}function Sd(a,b,c=olympe.dc.Qb.NONE){b=Td(a,b,c);for(const d of b)Ud(a,d,!1),a.C.delete(d)}
439
- function Td(a,b,c,d=!0){const e=olympe.dm.Relation.C.nk,f=olympe.dm.Relation.C.Ak,g=olympe.dc.Ca.ORIGIN,h=olympe.dc.La();b=new Set([b]);const k=new Set;for(const n of b){var l=a.C.get(n);if(void 0!==l){for(const [p,q,r]of l.gd())r&&Md(h,p,c)&f?b.add(q):d||r||k.add(`${n}.${p}.${q}`);for(const [p,q,r]of l.Ka())r&&Md(h,p,c)&e?b.add(q):d||r||k.add(`${q}.${p}.${n}`)}for(const [p,q,r]of Nd(h,n))l=q===g?e:f,!k.has(q===g?`${r}.${p}.${n}`:`${n}.${p}.${r}`)&&Md(h,p,c)&l&&b.add(r)}return Array.from(b).filter(n=>
440
- a.C.has(n))}function Ud(a,b,c){const d=olympe.dc.Ca.ORIGIN,e=olympe.dc.Ca.DESTINATION,f=a.C.get(b);for(const [h,k,l]of f.gd())if(l||!c){f.P(h,e,k);var g=a.C.get(k);g&&g.P(h,d,b)}for(const [h,k,l]of f.Ka())if(l||!c)f.P(h,d,k),(g=a.C.get(k))&&g.P(h,e,b)}function*Vd(a,b,c,d,e=[]){e.push(b);b=a.Rf(b);for(const [f,g]of b.tb(c))e.includes(f)||(yield*Vd(a,f,c,d,e),yield d(f,g))}function Wd(a,b,c,d){const e=a.C.get(c);a=a.C.get(d);e&&e.P(b,olympe.dc.Ca.DESTINATION,d);a&&a.P(b,olympe.dc.Ca.ORIGIN,c)}
441
- olympe.dc.db.xc=class{constructor(a){this.id=a||olympe.X.Ue();this.C=new Map}toJSON(){let a='{ "id": '+JSON.stringify(this.id)+', "instances": {';for(const b of this.C.keys()){const c=this.C.get(b);a+=JSON.stringify(b)+': '+c.toJSON()+', '}a.endsWith(', ')&&(a=a.substr(0,a.length-2));return a+'}}'}static nc(a){var b;'string'===typeof a?b=JSON.parse(a):b=a;a=new olympe.dc.db.xc(b.id);b=b.instances;for(const c of Object.keys(b)){const d=olympe.dc.db.pg.nc(b[c]);a.C.set(c,d)}return a}Z(){return this.id}Oc(a){const b=
442
- olympe.dc.db.pg.C.bm,c=olympe.dc.db.pg.C.Cc,d=olympe.dc.db.pg.C.Uh;this.C.forEach((e,f)=>{const g=e.getState();switch(g.id){case b:a.F(f,e.V()?e.ed():void 0);break;case d:e.V()&&a.rc(f,e.ed(),g.ej);break;case c:a.Fc(f,g.ej)}for(const [h,k,l]of e.gd())l?a.Va(h,f,k):a.ic(h,f,k)})}G(){let a=0;this.C.forEach(b=>{a+=b.xb()});return a}F(a,b){a=Rd(this,a).create();b&&a.la(b)}rc(a,b,c){b&&(a=Rd(this,a).la(b),c&&a.Db())}Fc(a,b=olympe.dc.Qb.NONE){const c=this.C.get(a);if(c&&c.ue())Sd(this,a,b);else{Rd(this,
443
- a).delete(b);for(const d of Td(this,a,b,!1))this.C.get(d).ed().clear(),Ud(this,d,!0)}}Va(a,b,c){Rd(this,b).link(a,c);Rd(this,c).Wa(a,b)}ic(a,b,c){Rd(this,b).unlink(a,c);Rd(this,c).eb(a,b)}fe(){return function*(a){for(const b of a.values())if(b.ue()||b.K()||b.V())yield b}(this.C)}Rf(a){return this.C.get(olympe.dc.za(a))||null}gd(){return function*(a){for(var b=a.next();!b.done;){b=b.value;const c=b.tag();yield*b.gd((d,e,f)=>[d,c,e,f]);b=a.next()}}(this.C.values())}Vf(a,b,c=(d,e)=>[d,e]){return Vd(this,
444
- a,b,c)}};olympe.dc.db.xc.ma=[olympe.dc.Writable,olympe.dc.mm];const Xd=new Map;
445
- olympe.dc.db.pg=class a{constructor(b){this.ba=b;this.G=a.F(a.C.Uh,!1);this.F=this.Pa=this.C=null}toJSON(){let b='{ "tag": '+JSON.stringify(this.ba)+', "state": '+JSON.stringify(this.G);if(this.C){b+=', "properties": {';for(var c of this.C.keys()){const d=this.C.get(c);b+=JSON.stringify(c)+': ';b=d.toJSON?b+d.toJSON():b+JSON.stringify(d);b+=', '}b.endsWith(', ')&&(b=b.substr(0,b.length-2));b+='}'}if(this.Pa){b+=', "relations": {';for(const d of this.Pa.keys()){c=this.Pa.get(d);b+=JSON.stringify(d)+
446
- ': {';for(const e of c.keys())b+=JSON.stringify(e)+': '+JSON.stringify(c.get(e))+', ';b.endsWith(', ')&&(b=b.substr(0,b.length-2));b+='}, '}b.endsWith(', ')&&(b=b.substr(0,b.length-2));b+='}'}return b+'}'}static nc(b){var c;'string'===typeof b?c=JSON.parse(b):c=b;b=new olympe.dc.db.pg(c.tag);b.G=c.state;const d=c.properties;if(d){b.C=new Map;for(var e of Object.keys(d)){const f=d[e],g=f.type;let h=f;g&&('reference'===g?h=olympe.dc.Ec.nc(f):h=olympe.D.nc(f));null!==h&&void 0!==h&&b.C.set(e,h)}}if(c=
447
- c.relations){b.Pa=new Map;for(const f of Object.keys(c)){e=new Map;for(const g of Object.keys(c[f]))e.set(g,c[f][g]);b.Pa.set(f,e)}}return b}static F(b,c){const d=String(b)+','+String(c);let e=Xd.get(d);void 0===e&&(e={id:b,ej:c},Xd.set(d,e));return e}tag(){return this.ba}getState(){return this.G}create(){this.G=a.F(a.C.bm);return this}delete(b=olympe.dc.Qb.NONE){this.G=a.F(a.C.Cc,b);this.C=null;return this}Db(){this.G.id===a.C.Uh&&(this.G=a.F(a.C.Uh,!0))}xa(b,c){if(this.G.type===a.C.Cc)return this;
448
- this.C||(this.C=new Map);this.C.set(b,c);return this}la(b){this.C||(this.C=new Map);b.forEach((c,d)=>{this.C.set(d,c)});return this}qa(b){let c;null==(c=this.C)||c.delete(b);0===this.C.size&&(this.C=null)}link(b,c){null===this.Pa&&(this.Pa=new Map);this.Ga(this.Pa,b,c,!0);return this}unlink(b,c){null===this.Pa&&(this.Pa=new Map);this.Ga(this.Pa,b,c,!1);return this}Wa(b,c){null===this.F&&(this.F=new Map);this.Ga(this.F,b,c,!0)}eb(b,c){null===this.F&&(this.F=new Map);this.Ga(this.F,b,c,!1)}fc(b,c,d){if(c=
449
- c===olympe.dc.Ca.ORIGIN?this.F:this.Pa)return(b=c.get(b))&&b.get(d)}P(b,c,d){const e=(c=c===olympe.dc.Ca.ORIGIN?this.F:this.Pa)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}ue(){return this.G.id===a.C.bm}K(){return this.G.id===a.C.Cc}xb(){let b=this.C?this.C.size:0;this.Pa&&this.Pa.forEach(c=>{b+=c.size});return b}V(){return null!==this.C}ed(){return this.C||new Map}fb(b){if(this.C)return this.C.get(b)}tb(b,c=(d,e)=>[d,e]){return function*(d){if(d=d&&d.get(b.T()))for(const [e,f]of d)yield c(e,
450
- f)}(b.Sa()===olympe.dc.Ca.ORIGIN?this.F:this.Pa)}jc(b){const c=b.Sa()===olympe.dc.Ca.ORIGIN?this.F:this.Pa;return(b=c&&c.get(b.T()))&&0!==b.size?Array.from(b.keys())[0]:null}Sf(){return this.jc(olympe.dc.CloudObject.modelRel)}gd(b=(c,d,e)=>[c,d,e]){return this.$(this.Pa,b)}Ka(b=(c,d,e)=>[c,d,e]){return this.$(this.F,b)}Fa(b=(c,d,e,f)=>[c,d,e,f]){const c=olympe.dc.Ca.ORIGIN,d=olympe.dc.Ca.DESTINATION;return function*(e,f,g){yield*e(f,(h,k,l)=>b(h,d,k,l));yield*e(g,(h,k,l)=>b(h,c,k,l))}(this.$.bind(this),
451
- this.Pa,this.F)}Ga(b,c,d,e){if(this.G.id!==a.C.Cc||!e){var f=b.get(c);if(void 0===f)f=new Map,b.set(c,f);else if(b=f.get(d),void 0!==b&&b!==e){f.delete(d);return}f.set(d,e)}}*$(b,c){if(null!==b)for(const [d,e]of b){b=e.entries();for(const [f,g]of b)yield c(d,f,g)}}};olympe.dc.db.pg.C={bm:0,Uh:1,Cc:2};function Wc(a,b,c,d,e,f=olympe.dc.Ia.rb){const g=olympe.dc.db.Instance.C.mq,h=olympe.dc.db.Instance.C.mr,k=c.Z();if(a.F.has(k))throw Error(`You try to execute the patch ${k} a second times whereas the first execution has not been validated yet.`);const l=new Yd(c,Zd(a,c),f);a.C.push(k);a.F.set(k,l);a.Oa.qa();a.Oa.eb(d,g);a.Oa.eb(e,h);Xc(a,c,f);const n=Array.from(c.fe()).filter(p=>p.ue()).map(p=>p.tag());a.Oa.hc(n);a.Oa.la();0<n.length&&b.P(()=>{a.Oa.qa();a.Oa.$c(n);a.Oa.la()})}
452
- function Xc(a,b,c){a.G.process(c,b,d=>{d||a.N.debug('CommitController: Rebase of patch',b.Z(),'done')})}function Yc(a,b,c){return a.C.slice(0,c).map(d=>a.F.get(d)).reduce((d,e)=>e?e.bf(d):d,b)}
453
- function Zd(a,b){const c=a.Oa,d=olympe.dc.db.Database.C.Oh,e=olympe.dc.db.Database.C.lc,f=olympe.dc.db.Database.C.ORIGIN,g=olympe.dc.db.Database.C.DESTINATION,h=olympe.dc.Zb.VERSION,k=olympe.dc.Zb.Id,l=new olympe.dc.db.xc('rev-'+b.Z());a.N.debug('Generate the reverse graphLayer of',b.Z());b.C.forEach((n,p)=>{if(n.ue()){l.Fc(p,olympe.dc.Qb.NONE);for(const [t,u]of n.gd())l.ic(t,p,u)}else{var q=c.get(p);if(void 0!==q)if(n.K()){n=n.getState().ej;for(const t of c.V(p,n)){p=c.get(t);const u=(new Map).set(h,
454
- q.version()).set(k,q.source());p.forEach((v,w)=>{const y=w[0],B=w.substr(1);y===d?u.set(B,v):y===e?u.set(w,v):y===f?v.forEach((D,T)=>{l.Va(B,T,t,0)}):y===g&&v.forEach((D,T)=>{l.Va(B,t,T,0)})});l.F(t,u,0)}}else{const t=(new Map).set(h,q.version());for(const u of n.ed().keys()){var r=u[0]===e;const v=r?u.substr(1):u;r=r?q.Ka(v,!0):q.fb(v,!0);t.set(u,void 0===r?null:r)}1<t.size&&l.rc(p,t,!0,0);for(const [u,v,w]of n.gd())w?l.ic(u,p,v):l.Va(u,p,v)}}});return l}
455
- olympe.dc.db.Ms=class{constructor(a,b,c){this.N=a;this.Oa=b;this.G=c;this.C=[];this.F=new Map}bf(a,b){Xc(this,Yc(this,a,this.C.length),b)}push(a){const b=this.C.indexOf(a);if(-1<b){const c=this.F.get(a);this.C.splice(b,1);Yc(this,c.F,b);this.F.delete(a)}}};function $d(a,b,c,d){const e=olympe.dc.Ca.DESTINATION;c=c.tag();const f=a.C.Rf(c);b.ed().forEach((g,h)=>{f.xa(h,g);b.qa(h)});for(const [g,h,k,l]of b.Fa()){if(!l)continue;const n=h===e?c:k,p=h===e?k:c;a.C.Va(g,n,p);Wd(d,g,n,p)}}
456
- function ae(a,b,c,d){const e=olympe.dc.Ca.DESTINATION,f=c.tag(),g=a.C.Rf(f);b.ed().forEach((h,k)=>{void 0!==c.fb(k)&&(g.xa(k,h),b.qa(k))});for(const [h,k,l]of b.gd()){const n=c.fc(h,e,k);void 0!==n&&(Wd(d,h,f,k),n===l&&Wd(a.C,h,f,k))}}
457
- class Yd{constructor(a,b,c){this.F=a;this.C=b;this.source=c;this.db=olympe.dc.La()}Z(){return this.F.Z()}bf(a){var b=this.F.C,c=a.C;const d=b.size>c.size,e=d?b:c;b=d?c:b;for(const [g,h]of b){b=g;var f=e.get(b);void 0!==f&&(c=d?f:h,f=d?h:f,f.K()?c.ue()||Sd(this.C,b,f.getState().ej):c.K()?($d(this,f,c,a),Sd(a,b,c.getState().ej)):ae(this,f,c,a))}return a}};olympe.dc.db.R={Ea:'dc.db.Logger',Aa:'dc.db.DatabaseManager',Mj:'dc.db.Database',ib:'dc.db.Driver',ot:'dc.db.Graph',ro:'dc.db.DataProcessor',wo:'dc.db.DebugProcessor',bB:'dc.db.PermissionProcessor',Mi:'dc.db.GraphMonitor'};olympe.dc.db.Config={Uo:'db.garbageCollector',Mi:'db.monitor',vo:'db.debug'};
458
- olympe.U.config(function(a){E(a,olympe.dc.db.Config.Uo,olympe.dc.db.Di.C.Rq);E(a,olympe.dc.db.Config.Mi,!1);E(a,olympe.dc.db.Config.vo,!1);C(a,olympe.dc.db.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('dc.db'));C(a,olympe.dc.db.R.Mj,[olympe.dc.db.R.Ea,new olympe.U.fa(olympe.dc.Config.xo),new olympe.U.fa(olympe.dc.db.Config.Uo),new olympe.U.fa(olympe.dc.Config.fh),new olympe.U.fa(olympe.dc.db.Config.vo)],(b,c,d,e,f)=>{d=e?olympe.dc.db.Di.C.Bl:d;c=(new Map).set('defaultSource',c).set('garbageCollector',d).set('debug',
459
- f);return new olympe.dc.db.Database(b,c)});C(a,olympe.dc.db.R.ib,[olympe.dc.db.R.Aa],b=>b.view);C(a,olympe.dc.db.R.Mi,[olympe.dc.db.R.Aa],b=>b.$x);A(a,olympe.dc.db.R.wo,olympe.dc.db.Ub.Co,olympe.dc.R.Ea);C(a,olympe.dc.db.R.ro,[olympe.dc.db.R.Ea,olympe.dc.db.R.Mj,olympe.U.R.jg,new olympe.U.fa(olympe.dc.Config.kg)],(b,c,d,e)=>{b=new olympe.dc.db.Ub.rr(b,c);e&&(b=new olympe.dc.nm(oa(d,olympe.dc.db.R.wo),b));return b});A(a,olympe.dc.db.R.Aa,olympe.dc.db.Ys,olympe.dc.db.R.Ea,olympe.dc.db.R.Mj,olympe.dc.R.qe,
460
- olympe.dc.db.R.ro,new olympe.U.fa(olympe.dc.db.Config.Mi))},'olympe.dc.db');olympe.U.run([olympe.dc.db.R.Mj,olympe.dc.db.R.Mi],(a,b)=>{olympe.jj().db=a;olympe.jj().dbMonitor=b},'DC.DB debug service injection');olympe.dc.db.Ub={};olympe.dc.db.Ub.rr=class{constructor(a,b){this.N=a;this.Oa=b;this.buffer=[]}process(a,b,c){this.Oa.qa();b.Oc(this);this.Oa.la();c(null,b)}F(a,b){this.Oa.create(a,b)}rc(a,b,c){this.Oa.update(a,b,c)}Fc(a,b=olympe.dc.Qb.NONE){for(const c of this.Oa.V(a,b))this.Oa.Fc(c)}Va(a,b,c){this.Oa.link(a,b,c)}ic(a,b,c){this.Oa.unlink(a,b,c)}};olympe.dc.db.Ub.rr.ma=[olympe.dc.vg,olympe.dc.Writable];function be(a,b,c){if(!b)return'';let d='';if(c&&1<c)return'...';for(const [e,f]of b)d+=(d?', "':'"')+e+'":',f?f instanceof olympe.dc.Ec||f instanceof olympe.dc.CloudObject?d+='new olympe.dc.Reference("'+f.T()+'")':f instanceof olympe.D.Color?d+='new olympe.df.Color("'+f.Wf()+','+f.Qf()+','+f.Lf()+','+f.Kf()+'")':f.constructor&&Object.prototype.hasOwnProperty.call(f.constructor.prototype,'toString')?d+=JSON.stringify(f.toString()):'object'===typeof f&&(d+=be(a,f,(c||0)+1)):d+=JSON.stringify(f);return'{'+
431
+ olympe.dc.ib=class{constructor(a,b){this.N=a;this.G=new olympe.D.Xb('DB View context');this.Oa=b;this.K=0}Z(){return this.Oa.Z()}F(a,b,c){a=U(this,a);null!==a&&(b=olympe.dc.za(b),a.P(Cd+b,c),this.Oa.getState()===Gd.fg&&this.Oa.$(c))}C(a,b,c,d=!1){a=U(this,a);if(null!==a){b=b.Sa()+b.T();const e=a.P(b,c);void 0!==e&&(this.Oa.getState()!==Gd.fg||a.fc()&&!d||this.Oa.$(c),!d&&a.Gb()&&Id(this,a,b,!1,e,!1))}}Gb(a){a=U(this,a);return!(!a||!a.Gb())}name(a){let b,c;return null!=(c=null==(b=U(this,a))?void 0:
432
+ b.eb(olympe.dc.CloudObject.nameProp.T()))?c:''}model(a){return(a=(a=U(this,a,!0))?a.model():null)?a.tag():null}Hf(a){return(a=(a=U(this,a,!0))&&a.Hf())?a.tag():null}rj(a){a=U(this,a,!0);return!(!a||!a.Hf())}Vf(a,b){a=(a=U(this,a,!0))&&a.model();return!(!a||!this.Xf(a.tag(),b))}version(a){return(a=U(this,a,!0))&&a.version()}source(a){return(a=U(this,a,!0))&&a.source()}$f(a){return(a=U(this,a,!1))?!!a.persisted():!0}eb(a,b,c){let d;a=null==(d=U(this,a,!0))?void 0:d.eb(olympe.dc.za(b),c);return void 0!==
433
+ a?a:null}ed(a,b=!1){var c=U(this,a,!0);a=new Map;if(c)for(const [d,e]of c)c=d[0],(c===Cd||!b&&c===Dd)&&a.set(d.substring(1),e);return a}tb(a,b){return this.mj(a,[b])}Wk(a,b,c){return this.tb(a,b).includes(olympe.dc.za(c))}mj(a,b){a=U(this,a,!0);if(!a)return[];a=[a.tag()];for(const c of b){b=[];for(const d of a)if(a=U(this,d,!0).get(c.Sa()+c.T()),void 0!==a)for(const e of a.values())e.Gb()&&b.push(e.tag());a=b}return a}ic(a,b){var c=U(this,a,!0);return c?(c=c.get(b.Sa()+b.T()))&&1<c.size?(this.N.warn(`Relation ${b.T()} to instance ${a} is not unique: found ${c.size} related items`),
434
+ null):(a=c?c.values().next().value:null)&&a.Gb()?a.tag():null:null}Tf(a,b,c){a=olympe.dc.za(a);const d=Od(this,a,b);d.delete(a);return c?(c=olympe.dc.za(c),d.has(c)?Array.from(Od(this,c,b.zc()).keys()).filter(e=>d.has(e)):[]):Array.from(d.keys())}$m(a,b,c){if(!this.Gb(a))return null;b=Od(this,a,b);const d=[olympe.dc.za(a)];for(const e of d){if(c(e))return e;if(a=b.get(e))for(const f of a.filter(g=>!d.includes(g)))d.push(f)}return null}an(a,b,c){return this.mj(a,b).find(c)||null}nw(a,b,c){return this.mj(a,
435
+ b).filter(c)}Qk(a,b=olympe.dc.CloudObject){var c=U(this,a,!0);const d=b&&U(this,b,!0),e=[c];for(;c&&c!==d;){c=c.Hf();if(e.includes(c))throw Error(`Cycle detected when following recursively extend relations from base model instance "${a}".`);if(c&&!c.Gb())throw a=`Try to get all extensions of the model ${olympe.dc.za(a)} but one of them does not exists (${c.tag()})`,Error(a);null!==c&&e.push(c)}c=U(this,olympe.dc.CloudObject,!0);if(d!==c&&e[e.length-1]===c)throw Error(`The model "${this.name(a)}" (tag = ${a}) does not extend the expected model "${this.name(b)}" (tag = ${b}).`);
436
+ return e.map(f=>f.tag())}Xf(a,b){const c=olympe.dc.za(b);return!!this.$m(a,olympe.dc.CloudObject.extendRel,d=>d===c)}fe(a){return this.tb(a,olympe.dc.CloudObject.instancesRel)}};olympe.dc.ib.prototype.getInstances=olympe.dc.ib.prototype.fe;olympe.dc.ib.prototype.isExtending=olympe.dc.ib.prototype.Xf;olympe.dc.ib.prototype.getExtendedModels=olympe.dc.ib.prototype.Qk;olympe.dc.ib.prototype.findAllRelated=olympe.dc.ib.prototype.nw;olympe.dc.ib.prototype.findRelated=olympe.dc.ib.prototype.an;
437
+ olympe.dc.ib.prototype.findRecursive=olympe.dc.ib.prototype.$m;olympe.dc.ib.prototype.getRecursiveRelated=olympe.dc.ib.prototype.Tf;olympe.dc.ib.prototype.getUniqueRelated=olympe.dc.ib.prototype.ic;olympe.dc.ib.prototype.getMultiRelated=olympe.dc.ib.prototype.mj;olympe.dc.ib.prototype.isRelated=olympe.dc.ib.prototype.Wk;olympe.dc.ib.prototype.getRelated=olympe.dc.ib.prototype.tb;olympe.dc.ib.prototype.getProperties=olympe.dc.ib.prototype.ed;olympe.dc.ib.prototype.getProperty=olympe.dc.ib.prototype.eb;
438
+ olympe.dc.ib.prototype.isPersisted=olympe.dc.ib.prototype.$f;olympe.dc.ib.prototype.instanceOf=olympe.dc.ib.prototype.Vf;olympe.dc.ib.prototype.isModel=olympe.dc.ib.prototype.rj;olympe.dc.ib.prototype.extension=olympe.dc.ib.prototype.Hf;olympe.dc.ib.prototype.model=olympe.dc.ib.prototype.model;olympe.dc.ib.prototype.name=olympe.dc.ib.prototype.name;olympe.dc.ib.prototype.exist=olympe.dc.ib.prototype.Gb;function Rd(a,b){let c=a.C.get(b);void 0===c&&(c=new olympe.dc.db.mg(b),a.C.set(b,c));return c}function Sd(a,b,c=olympe.dc.Qb.NONE){b=Td(a,b,c);for(const d of b)Ud(a,d,!1),a.C.delete(d)}
439
+ function Td(a,b,c,d=!0){const e=olympe.dm.Relation.C.pk,f=olympe.dm.Relation.C.Bk,g=olympe.dc.Ca.ORIGIN,h=olympe.dc.La();b=new Set([b]);const k=new Set;for(const n of b){var l=a.C.get(n);if(void 0!==l){for(const [p,q,r]of l.gd())r&&Md(h,p,c)&f?b.add(q):d||r||k.add(`${n}.${p}.${q}`);for(const [p,q,r]of l.Ka())r&&Md(h,p,c)&e?b.add(q):d||r||k.add(`${q}.${p}.${n}`)}for(const [p,q,r]of Nd(h,n))l=q===g?e:f,!k.has(q===g?`${r}.${p}.${n}`:`${n}.${p}.${r}`)&&Md(h,p,c)&l&&b.add(r)}return Array.from(b).filter(n=>
440
+ a.C.has(n))}function Ud(a,b,c){const d=olympe.dc.Ca.ORIGIN,e=olympe.dc.Ca.DESTINATION,f=a.C.get(b);for(const [h,k,l]of f.gd())if(l||!c){f.P(h,e,k);var g=a.C.get(k);g&&g.P(h,d,b)}for(const [h,k,l]of f.Ka())if(l||!c)f.P(h,d,k),(g=a.C.get(k))&&g.P(h,e,b)}function*Vd(a,b,c,d,e=[]){e.push(b);b=a.Pf(b);for(const [f,g]of b.tb(c))e.includes(f)||(yield*Vd(a,f,c,d,e),yield d(f,g))}function Wd(a,b,c,d){const e=a.C.get(c);a=a.C.get(d);e&&e.P(b,olympe.dc.Ca.DESTINATION,d);a&&a.P(b,olympe.dc.Ca.ORIGIN,c)}
441
+ olympe.dc.db.xc=class{constructor(a){this.id=a||olympe.X.Ve();this.C=new Map}toJSON(){let a='{ "id": '+JSON.stringify(this.id)+', "instances": {';for(const b of this.C.keys()){const c=this.C.get(b);a+=JSON.stringify(b)+': '+c.toJSON()+', '}a.endsWith(', ')&&(a=a.substr(0,a.length-2));return a+'}}'}static nc(a){var b;'string'===typeof a?b=JSON.parse(a):b=a;a=new olympe.dc.db.xc(b.id);b=b.instances;for(const c of Object.keys(b)){const d=olympe.dc.db.mg.nc(b[c]);a.C.set(c,d)}return a}Z(){return this.id}Oc(a){const b=
442
+ olympe.dc.db.mg.C.cm,c=olympe.dc.db.mg.C.Cc,d=olympe.dc.db.mg.C.Th;this.C.forEach((e,f)=>{const g=e.getState();switch(g.id){case b:a.F(f,e.V()?e.ed():void 0);break;case d:e.V()&&a.qc(f,e.ed(),g.fj);break;case c:a.Fc(f,g.fj)}for(const [h,k,l]of e.gd())l?a.Va(h,f,k):a.hc(h,f,k)})}G(){let a=0;this.C.forEach(b=>{a+=b.xb()});return a}F(a,b){a=Rd(this,a).create();b&&a.la(b)}qc(a,b,c){b&&(a=Rd(this,a).la(b),c&&a.Fb())}Fc(a,b=olympe.dc.Qb.NONE){const c=this.C.get(a);if(c&&c.ue())Sd(this,a,b);else{Rd(this,
443
+ a).delete(b);for(const d of Td(this,a,b,!1))this.C.get(d).ed().clear(),Ud(this,d,!0)}}Va(a,b,c){Rd(this,b).link(a,c);Rd(this,c).Wa(a,b)}hc(a,b,c){Rd(this,b).unlink(a,c);Rd(this,c).fb(a,b)}fe(){return function*(a){for(const b of a.values())if(b.ue()||b.K()||b.V())yield b}(this.C)}Pf(a){return this.C.get(olympe.dc.za(a))||null}gd(){return function*(a){for(var b=a.next();!b.done;){b=b.value;const c=b.tag();yield*b.gd((d,e,f)=>[d,c,e,f]);b=a.next()}}(this.C.values())}Tf(a,b,c=(d,e)=>[d,e]){return Vd(this,
444
+ a,b,c)}};olympe.dc.db.xc.ma=[olympe.dc.Writable,olympe.dc.nm];const Xd=new Map;
445
+ olympe.dc.db.mg=class a{constructor(b){this.ba=b;this.G=a.F(a.C.Th,!1);this.F=this.Pa=this.C=null}toJSON(){let b='{ "tag": '+JSON.stringify(this.ba)+', "state": '+JSON.stringify(this.G);if(this.C){b+=', "properties": {';for(var c of this.C.keys()){const d=this.C.get(c);b+=JSON.stringify(c)+': ';b=d.toJSON?b+d.toJSON():b+JSON.stringify(d);b+=', '}b.endsWith(', ')&&(b=b.substr(0,b.length-2));b+='}'}if(this.Pa){b+=', "relations": {';for(const d of this.Pa.keys()){c=this.Pa.get(d);b+=JSON.stringify(d)+
446
+ ': {';for(const e of c.keys())b+=JSON.stringify(e)+': '+JSON.stringify(c.get(e))+', ';b.endsWith(', ')&&(b=b.substr(0,b.length-2));b+='}, '}b.endsWith(', ')&&(b=b.substr(0,b.length-2));b+='}'}return b+'}'}static nc(b){var c;'string'===typeof b?c=JSON.parse(b):c=b;b=new olympe.dc.db.mg(c.tag);b.G=c.state;const d=c.properties;if(d){b.C=new Map;for(var e of Object.keys(d)){const f=d[e],g=f.type;let h=f;g&&('reference'===g?h=olympe.dc.Ec.nc(f):h=olympe.D.nc(f));null!==h&&void 0!==h&&b.C.set(e,h)}}if(c=
447
+ c.relations){b.Pa=new Map;for(const f of Object.keys(c)){e=new Map;for(const g of Object.keys(c[f]))e.set(g,c[f][g]);b.Pa.set(f,e)}}return b}static F(b,c){const d=String(b)+','+String(c);let e=Xd.get(d);void 0===e&&(e={id:b,fj:c},Xd.set(d,e));return e}tag(){return this.ba}getState(){return this.G}create(){this.G=a.F(a.C.cm);return this}delete(b=olympe.dc.Qb.NONE){this.G=a.F(a.C.Cc,b);this.C=null;return this}Fb(){this.G.id===a.C.Th&&(this.G=a.F(a.C.Th,!0))}xa(b,c){if(this.G.type===a.C.Cc)return this;
448
+ this.C||(this.C=new Map);this.C.set(b,c);return this}la(b){this.C||(this.C=new Map);b.forEach((c,d)=>{this.C.set(d,c)});return this}qa(b){let c;null==(c=this.C)||c.delete(b);0===this.C.size&&(this.C=null)}link(b,c){null===this.Pa&&(this.Pa=new Map);this.Ga(this.Pa,b,c,!0);return this}unlink(b,c){null===this.Pa&&(this.Pa=new Map);this.Ga(this.Pa,b,c,!1);return this}Wa(b,c){null===this.F&&(this.F=new Map);this.Ga(this.F,b,c,!0)}fb(b,c){null===this.F&&(this.F=new Map);this.Ga(this.F,b,c,!1)}fc(b,c,d){if(c=
449
+ c===olympe.dc.Ca.ORIGIN?this.F:this.Pa)return(b=c.get(b))&&b.get(d)}P(b,c,d){const e=(c=c===olympe.dc.Ca.ORIGIN?this.F:this.Pa)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}ue(){return this.G.id===a.C.cm}K(){return this.G.id===a.C.Cc}xb(){let b=this.C?this.C.size:0;this.Pa&&this.Pa.forEach(c=>{b+=c.size});return b}V(){return null!==this.C}ed(){return this.C||new Map}eb(b){if(this.C)return this.C.get(b)}tb(b,c=(d,e)=>[d,e]){return function*(d){if(d=d&&d.get(b.T()))for(const [e,f]of d)yield c(e,
450
+ f)}(b.Sa()===olympe.dc.Ca.ORIGIN?this.F:this.Pa)}ic(b){const c=b.Sa()===olympe.dc.Ca.ORIGIN?this.F:this.Pa;return(b=c&&c.get(b.T()))&&0!==b.size?Array.from(b.keys())[0]:null}Qf(){return this.ic(olympe.dc.CloudObject.modelRel)}gd(b=(c,d,e)=>[c,d,e]){return this.$(this.Pa,b)}Ka(b=(c,d,e)=>[c,d,e]){return this.$(this.F,b)}Fa(b=(c,d,e,f)=>[c,d,e,f]){const c=olympe.dc.Ca.ORIGIN,d=olympe.dc.Ca.DESTINATION;return function*(e,f,g){yield*e(f,(h,k,l)=>b(h,d,k,l));yield*e(g,(h,k,l)=>b(h,c,k,l))}(this.$.bind(this),
451
+ this.Pa,this.F)}Ga(b,c,d,e){if(this.G.id!==a.C.Cc||!e){var f=b.get(c);if(void 0===f)f=new Map,b.set(c,f);else if(b=f.get(d),void 0!==b&&b!==e){f.delete(d);return}f.set(d,e)}}*$(b,c){if(null!==b)for(const [d,e]of b){b=e.entries();for(const [f,g]of b)yield c(d,f,g)}}};olympe.dc.db.mg.C={cm:0,Th:1,Cc:2};function Wc(a,b,c,d,e,f=olympe.dc.Ia.rb){const g=olympe.dc.db.Instance.C.nq,h=olympe.dc.db.Instance.C.nr,k=c.Z();if(a.F.has(k))throw Error(`You try to execute the patch ${k} a second times whereas the first execution has not been validated yet.`);const l=new Yd(c,Zd(a,c),f);a.C.push(k);a.F.set(k,l);a.Oa.qa();a.Oa.fb(d,g);a.Oa.fb(e,h);Xc(a,c,f);const n=Array.from(c.fe()).filter(p=>p.ue()).map(p=>p.tag());a.Oa.mc(n);a.Oa.la();0<n.length&&b.P(()=>{a.Oa.qa();a.Oa.$c(n);a.Oa.la()})}
452
+ function Xc(a,b,c){a.G.process(c,b,d=>{d||a.N.debug('CommitController: Rebase of patch',b.Z(),'done')})}function Yc(a,b,c){return a.C.slice(0,c).map(d=>a.F.get(d)).reduce((d,e)=>e?e.af(d):d,b)}
453
+ function Zd(a,b){const c=a.Oa,d=olympe.dc.db.Database.C.Nh,e=olympe.dc.db.Database.C.kc,f=olympe.dc.db.Database.C.ORIGIN,g=olympe.dc.db.Database.C.DESTINATION,h=olympe.dc.$b.VERSION,k=olympe.dc.$b.Hd,l=new olympe.dc.db.xc('rev-'+b.Z());a.N.debug('Generate the reverse graphLayer of',b.Z());b.C.forEach((n,p)=>{if(n.ue()){l.Fc(p,olympe.dc.Qb.NONE);for(const [t,u]of n.gd())l.hc(t,p,u)}else{var q=c.get(p);if(void 0!==q)if(n.K()){n=n.getState().fj;for(const t of c.V(p,n)){p=c.get(t);const u=(new Map).set(h,
454
+ q.version()).set(k,q.source());p.forEach((v,w)=>{const y=w[0],B=w.substr(1);y===d?u.set(B,v):y===e?u.set(w,v):y===f?v.forEach((D,T)=>{l.Va(B,T,t,0)}):y===g&&v.forEach((D,T)=>{l.Va(B,t,T,0)})});l.F(t,u,0)}}else{const t=(new Map).set(h,q.version());for(const u of n.ed().keys()){var r=u[0]===e;const v=r?u.substr(1):u;r=r?q.Ka(v,!0):q.eb(v,!0);t.set(u,void 0===r?null:r)}1<t.size&&l.qc(p,t,!0,0);for(const [u,v,w]of n.gd())w?l.hc(u,p,v):l.Va(u,p,v)}}});return l}
455
+ olympe.dc.db.Ns=class{constructor(a,b,c){this.N=a;this.Oa=b;this.G=c;this.C=[];this.F=new Map}af(a,b){Xc(this,Yc(this,a,this.C.length),b)}push(a){const b=this.C.indexOf(a);if(-1<b){const c=this.F.get(a);this.C.splice(b,1);Yc(this,c.F,b);this.F.delete(a)}}};function $d(a,b,c,d){const e=olympe.dc.Ca.DESTINATION;c=c.tag();const f=a.C.Pf(c);b.ed().forEach((g,h)=>{f.xa(h,g);b.qa(h)});for(const [g,h,k,l]of b.Fa()){if(!l)continue;const n=h===e?c:k,p=h===e?k:c;a.C.Va(g,n,p);Wd(d,g,n,p)}}
456
+ function ae(a,b,c,d){const e=olympe.dc.Ca.DESTINATION,f=c.tag(),g=a.C.Pf(f);b.ed().forEach((h,k)=>{void 0!==c.eb(k)&&(g.xa(k,h),b.qa(k))});for(const [h,k,l]of b.gd()){const n=c.fc(h,e,k);void 0!==n&&(Wd(d,h,f,k),n===l&&Wd(a.C,h,f,k))}}
457
+ class Yd{constructor(a,b,c){this.F=a;this.C=b;this.source=c;this.db=olympe.dc.La()}Z(){return this.F.Z()}af(a){var b=this.F.C,c=a.C;const d=b.size>c.size,e=d?b:c;b=d?c:b;for(const [g,h]of b){b=g;var f=e.get(b);void 0!==f&&(c=d?f:h,f=d?h:f,f.K()?c.ue()||Sd(this.C,b,f.getState().fj):c.K()?($d(this,f,c,a),Sd(a,b,c.getState().fj)):ae(this,f,c,a))}return a}};olympe.dc.db.R={Ea:'dc.db.Logger',Aa:'dc.db.DatabaseManager',Nj:'dc.db.Database',ib:'dc.db.Driver',pt:'dc.db.Graph',so:'dc.db.DataProcessor',xo:'dc.db.DebugProcessor',dB:'dc.db.PermissionProcessor',Mi:'dc.db.GraphMonitor'};olympe.dc.db.Config={Vo:'db.garbageCollector',Mi:'db.monitor',wo:'db.debug'};
458
+ olympe.U.config(function(a){E(a,olympe.dc.db.Config.Vo,olympe.dc.db.Ci.C.Sq);E(a,olympe.dc.db.Config.Mi,!1);E(a,olympe.dc.db.Config.wo,!1);C(a,olympe.dc.db.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('dc.db'));C(a,olympe.dc.db.R.Nj,[olympe.dc.db.R.Ea,new olympe.U.fa(olympe.dc.Config.yo),new olympe.U.fa(olympe.dc.db.Config.Vo),new olympe.U.fa(olympe.dc.Config.eh),new olympe.U.fa(olympe.dc.db.Config.wo)],(b,c,d,e,f)=>{d=e?olympe.dc.db.Ci.C.Cl:d;c=(new Map).set('defaultSource',c).set('garbageCollector',d).set('debug',
459
+ f);return new olympe.dc.db.Database(b,c)});C(a,olympe.dc.db.R.ib,[olympe.dc.db.R.Aa],b=>b.view);C(a,olympe.dc.db.R.Mi,[olympe.dc.db.R.Aa],b=>b.by);A(a,olympe.dc.db.R.xo,olympe.dc.db.Ub.Do,olympe.dc.R.Ea);C(a,olympe.dc.db.R.so,[olympe.dc.db.R.Ea,olympe.dc.db.R.Nj,olympe.U.R.gg,new olympe.U.fa(olympe.dc.Config.hg)],(b,c,d,e)=>{b=new olympe.dc.db.Ub.sr(b,c);e&&(b=new olympe.dc.om(oa(d,olympe.dc.db.R.xo),b));return b});A(a,olympe.dc.db.R.Aa,olympe.dc.db.Zs,olympe.dc.db.R.Ea,olympe.dc.db.R.Nj,olympe.dc.R.qe,
460
+ olympe.dc.db.R.so,new olympe.U.fa(olympe.dc.db.Config.Mi))},'olympe.dc.db');olympe.U.run([olympe.dc.db.R.Nj,olympe.dc.db.R.Mi],(a,b)=>{olympe.kj().db=a;olympe.kj().dbMonitor=b},'DC.DB debug service injection');olympe.dc.db.Ub={};olympe.dc.db.Ub.sr=class{constructor(a,b){this.N=a;this.Oa=b;this.buffer=[]}process(a,b,c){this.Oa.qa();b.Oc(this);this.Oa.la();c(null,b)}F(a,b){this.Oa.create(a,b)}qc(a,b,c){this.Oa.update(a,b,c)}Fc(a,b=olympe.dc.Qb.NONE){for(const c of this.Oa.V(a,b))this.Oa.Fc(c)}Va(a,b,c){this.Oa.link(a,b,c)}hc(a,b,c){this.Oa.unlink(a,b,c)}};olympe.dc.db.Ub.sr.ma=[olympe.dc.sg,olympe.dc.Writable];function be(a,b,c){if(!b)return'';let d='';if(c&&1<c)return'...';for(const [e,f]of b)d+=(d?', "':'"')+e+'":',f?f instanceof olympe.dc.Ec||f instanceof olympe.dc.CloudObject?d+='new olympe.dc.Reference("'+f.T()+'")':f instanceof olympe.D.Color?d+='new olympe.df.Color("'+f.Uf()+','+f.Of()+','+f.Jf()+','+f.If()+'")':f.constructor&&Object.prototype.hasOwnProperty.call(f.constructor.prototype,'toString')?d+=JSON.stringify(f.toString()):'object'===typeof f&&(d+=be(a,f,(c||0)+1)):d+=JSON.stringify(f);return'{'+
461
461
  (d?d:'')+'}'}
462
- olympe.dc.db.Ub.Co=class{constructor(a){this.N=a;this.output=''}process(a,b,c){this.output='Patch #'+b.Z()+' (source: '+a+')';b.Oc(this);this.N.info(this.output);this.output='';c(null,b)}log(a,b){this.output+='\ndb.'+a+';'+(b?' // '+b:'')}F(a,b){this.log('createInstance("'+a+'", '+be(this,b)+')')}rc(a,b){this.log('updateInstance("'+a+'", '+be(this,b)+')')}Fc(a,b){var c=olympe.dc.La();const d=c.model(a);c=d?c.name(d)+' #'+d:'';this.log('deleteInstance("'+a+'", rule: '+b+')',c)}Va(a,b,c){this.log('createRelation("'+
463
- a+'", "'+b+'", "'+c+'")',a===olympe.dc.mc.Vc?'Model':'')}ic(a,b,c){this.log('deleteRelation("'+a+'", "'+b+'", "'+c+'")',a===olympe.dc.mc.Vc?'Model':'')}};olympe.dc.db.Ub.Co.ma=[olympe.dc.Writable,olympe.dc.vg];olympe.dc.transaction={};olympe.dc.si=class a{constructor(b,c){this.id=b||olympe.X.bc();this.F=new olympe.D.$b('BurstTransaction#'+this.id,c);this.xb=ce(this);this.V=!1;this.F.onDestroy(()=>this.P());this.qa=new Set;this.G=new Map;this.K=new Set;this.C=null;this.Wa=olympe.U.getParameter(olympe.dc.transaction.Config.Un)||30;this.la=[]}static C(b,c){return`${b},${c}`}Db(b){for(const c of this.la)c(b);this.stop()}Ka(){null!==this.C&&(clearTimeout(this.C),this.C=null);const b=this.ba(this.K);0<b.size&&de(this,b,!1);this.K.clear()}ba(b){const c=
464
- new Map;b.forEach(d=>{const e=d.split(',');let f=c.get(e[0]);void 0===f&&(f=new Map,c.set(e[0],f));f.set(e[1],this.G.get(d))});return c}$(b,c,d){this.Fa(b,c,d);this.xb(b,c,d);null===this.C&&(this.C=setTimeout(this.Ka.bind(this),this.Wa))}Fa(b,c,d){b=a.C(b,c);this.G.set(b,d);this.K.add(b)}eb(b,c){return this.G.get(a.C(b,c))}push(b,c){const d=olympe.dc.za(b);b=c.subscribe(e=>{for(const [f,g]of e)e=olympe.dc.za(f),this.eb(d,e)!==g&&this.$(d,e,g.valueOf())});this.qa.add(b)}complete(){return new Promise((b,
465
- c)=>{this.P((d,e)=>{for(const f of this.qa)f.unsubscribe();d?b():c(e)})})}update(b,c,d){const e=olympe.dc.za(b),f=olympe.dc.za(c);void 0===e||void 0===f?olympe.dc.ii().Za().error('Burst transaction: instance tag or property tag is undefined'):(this.F.run(()=>{olympe.D.xn([d],g=>{this.V=!0;g instanceof olympe.dc.Ec?olympe.dc.ii().Za().error('Cannot send complex property values in burst transactions'):this.$(e,f,g.valueOf())})}),this.F.P(()=>{this.P()}))}stop(){this.F.destroy();this.la.length=0}Z(){return this.id}th(){return!1}P(b){if(this.V){this.V=
466
- !1;null!==this.C&&(clearTimeout(this.C),this.C=null);this.K.clear();const c=this.ba(new Set(this.G.keys()));de(this,c,!0,b)}else b&&b(!0,null)}toString(){return'Burst transaction #'+this.id}};olympe.dc.si.prototype.complete=olympe.dc.si.prototype.complete;olympe.dc.si.prototype.push=olympe.dc.si.prototype.push;olympe.dc.gq=class{C(){}toString(){}};olympe.dc.transaction.sg=class{constructor(a){this.id=a||olympe.X.Ue();this.va=[];this.size=0}Z(){return this.id}G(){return this.size}concat(a){this.va.push(...a.va)}Oc(a){const b=olympe.dc.transaction.sg.C,c=this.va.length;let d=0;for(;d<c;)switch(this.va[d]){case b.io:a.F(this.va[d+1],this.va[d+2],this.va[d+3]);d+=4;break;case b.cr:a.rc(this.va[d+1],this.va[d+2],this.va[d+3],this.va[d+4]);d+=5;break;case b.yo:a.Fc(this.va[d+1],this.va[d+2],this.va[d+3]);d+=4;break;case b.jo:a.Va(this.va[d+1],this.va[d+
467
- 2],this.va[d+3],this.va[d+4]);d+=5;break;case b.zo:a.ic(this.va[d+1],this.va[d+2],this.va[d+3],this.va[d+4]);d+=5;break;default:throw Error('Invalid Patch operations "'+this.va[d]+'"');}}F(a,b,c){this.va.push(olympe.dc.transaction.sg.C.io,a,b,c);this.size++}rc(a,b,c,d){this.va.push(olympe.dc.transaction.sg.C.cr,a,b,c,d);this.size++}Fc(a,b=olympe.dc.Qb.NONE,c){this.va.push(olympe.dc.transaction.sg.C.yo,a,b,c);this.size++}Va(a,b,c,d){if('string'!==typeof a)throw Error('Relation should be created using a tag as string (most likely a relation object is given here instead)');
468
- this.va.push(olympe.dc.transaction.sg.C.jo,a,b,c,d);this.size++}ic(a,b,c,d){this.va.push(olympe.dc.transaction.sg.C.zo,a,b,c,d);this.size++}};olympe.dc.transaction.sg.C={io:1,cr:2,yo:3,jo:4,zo:5};olympe.dc.transaction.sg.ma=[olympe.dc.Writable,olympe.dc.mm];function ee(a,b){return a.P.get(b)||a.db.source(b)||olympe.dc.Ia.lc}function fe(a,b){return a.K.has(b)?a.K.get(b):a.db.bg(b)}function ge(a,b,c,d){var e=d&&d.get(olympe.dc.Zb.VERSION);a.versions.set(b,Number(e)||1);d&&a.P.set(b,d.get(olympe.dc.Zb.Id));e=ee(a,b);a.K.set(b,c&&a.F);a.Bc(e,c,f=>{f.F(b,d,0)})}
469
- olympe.dc.transaction.Gu=class{constructor(a,b){this.id=b||olympe.X.bc();this.db=a;this.C=new Map;this.G=new olympe.dc.db.xc(b);this.versions=new Map;this.P=new Map;this.K=new Map;this.F=!0}Yf(){return 0===this.G.C.size}persist(a){this.F=a}rc(a,b,c=!1){var d=b&&b.get(olympe.dc.Zb.VERSION);this.versions.set(a,Number(d)||1);d=ee(this,a);if(!d)throw Error('Attempt to update an instance which has an unknown source.');this.Bc(d,fe(this,a),e=>{e.rc(a,b,c,0)})}Fc(a,b){const c=ee(this,a),d=fe(this,a);this.Bc(c,
470
- d,e=>{e.Fc(a,b)})}Va(a,b,c){const d=ee(this,b),e=ee(this,c);let f=fe(this,b)&&fe(this,c);f&&d!==e&&a!==olympe.dc.mc.Vc&&(olympe.ta.Za('dc').warn(`Try to create a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=!1);this.Bc(d,f,g=>{g.Va(a,b,c,0)})}ic(a,b,c){const d=ee(this,b),e=ee(this,c);let f=fe(this,b)&&fe(this,c);f&&d!==e&&a!==olympe.dc.mc.Vc&&(olympe.ta.Za('dc').warn(`Try to delete a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=
471
- !1);this.Bc(d,f,g=>{g.ic(a,b,c,0)})}Bc(a,b,c){c(this.G);b&&this.F&&(b=this.C.get(a),b||(b=new olympe.dc.db.xc(this.id),this.C.set(a,b)),c(b))}};function he(a,b,c){const d=Object.create(null);if(!b)return d;for(const f of Array.from(b.keys()).sort()){let g=f;var e=b.get(f);if(g===olympe.dc.Zb.Id)if(e===olympe.dc.Ia.rb)d[g]=olympe.dc.La().Z();else{if(e===olympe.dc.Ia.Lc)continue}else g.startsWith(olympe.dc.Zb.VERSION)?(g=g.substr(1),e=null===e?1:e):g.startsWith(olympe.dc.Yg.lc)&&(g='fd'+g.substr(1));e=a.$(e);c&&e instanceof Object&&8===e.c?a.V.set(g,e):d[g]=e}return d}
462
+ olympe.dc.db.Ub.Do=class{constructor(a){this.N=a;this.output=''}process(a,b,c){this.output='Patch #'+b.Z()+' (source: '+a+')';b.Oc(this);this.N.info(this.output);this.output='';c(null,b)}log(a,b){this.output+='\ndb.'+a+';'+(b?' // '+b:'')}F(a,b){this.log('createInstance("'+a+'", '+be(this,b)+')')}qc(a,b){this.log('updateInstance("'+a+'", '+be(this,b)+')')}Fc(a,b){var c=olympe.dc.La();const d=c.model(a);c=d?c.name(d)+' #'+d:'';this.log('deleteInstance("'+a+'", rule: '+b+')',c)}Va(a,b,c){this.log('createRelation("'+
463
+ a+'", "'+b+'", "'+c+'")',a===olympe.dc.lc.Vc?'Model':'')}hc(a,b,c){this.log('deleteRelation("'+a+'", "'+b+'", "'+c+'")',a===olympe.dc.lc.Vc?'Model':'')}};olympe.dc.db.Ub.Do.ma=[olympe.dc.Writable,olympe.dc.sg];olympe.dc.transaction={};olympe.dc.ri=class a{constructor(b,c){this.id=b||olympe.X.bc();this.F=new olympe.D.Xb('BurstTransaction#'+this.id,c);this.xb=ce(this);this.V=!1;this.F.onDestroy(()=>this.P());this.qa=new Set;this.G=new Map;this.K=new Set;this.C=null;this.Wa=olympe.U.getParameter(olympe.dc.transaction.Config.Vn)||30;this.la=[]}static C(b,c){return`${b},${c}`}Fb(b){for(const c of this.la)c(b);this.stop()}Ka(){null!==this.C&&(clearTimeout(this.C),this.C=null);const b=this.ba(this.K);0<b.size&&de(this,b,!1);this.K.clear()}ba(b){const c=
464
+ new Map;b.forEach(d=>{const e=d.split(',');let f=c.get(e[0]);void 0===f&&(f=new Map,c.set(e[0],f));f.set(e[1],this.G.get(d))});return c}$(b,c,d){this.Fa(b,c,d);this.xb(b,c,d);null===this.C&&(this.C=setTimeout(this.Ka.bind(this),this.Wa))}Fa(b,c,d){b=a.C(b,c);this.G.set(b,d);this.K.add(b)}fb(b,c){return this.G.get(a.C(b,c))}push(b,c){const d=olympe.dc.za(b);b=c.subscribe(e=>{for(const [f,g]of e)e=olympe.dc.za(f),this.fb(d,e)!==g&&this.$(d,e,g.valueOf())});this.qa.add(b)}complete(){return new Promise((b,
465
+ c)=>{this.P((d,e)=>{for(const f of this.qa)f.unsubscribe();d?b():c(e)})})}update(b,c,d){const e=olympe.dc.za(b),f=olympe.dc.za(c);void 0===e||void 0===f?olympe.dc.hi().Za().error('Burst transaction: instance tag or property tag is undefined'):(this.F.run(()=>{olympe.D.yn([d],g=>{this.V=!0;g instanceof olympe.dc.Ec?olympe.dc.hi().Za().error('Cannot send complex property values in burst transactions'):this.$(e,f,g.valueOf())})}),this.F.P(()=>{this.P()}))}stop(){this.F.destroy();this.la.length=0}Z(){return this.id}th(){return!1}P(b){if(this.V){this.V=
466
+ !1;null!==this.C&&(clearTimeout(this.C),this.C=null);this.K.clear();const c=this.ba(new Set(this.G.keys()));de(this,c,!0,b)}else b&&b(!0,null)}toString(){return'Burst transaction #'+this.id}};olympe.dc.ri.prototype.complete=olympe.dc.ri.prototype.complete;olympe.dc.ri.prototype.push=olympe.dc.ri.prototype.push;olympe.dc.hq=class{C(){}toString(){}};olympe.dc.transaction.pg=class{constructor(a){this.id=a||olympe.X.Ve();this.va=[];this.size=0}Z(){return this.id}G(){return this.size}concat(a){this.va.push(...a.va)}Oc(a){const b=olympe.dc.transaction.pg.C,c=this.va.length;let d=0;for(;d<c;)switch(this.va[d]){case b.jo:a.F(this.va[d+1],this.va[d+2],this.va[d+3]);d+=4;break;case b.dr:a.qc(this.va[d+1],this.va[d+2],this.va[d+3],this.va[d+4]);d+=5;break;case b.zo:a.Fc(this.va[d+1],this.va[d+2],this.va[d+3]);d+=4;break;case b.ko:a.Va(this.va[d+1],this.va[d+
467
+ 2],this.va[d+3],this.va[d+4]);d+=5;break;case b.Ao:a.hc(this.va[d+1],this.va[d+2],this.va[d+3],this.va[d+4]);d+=5;break;default:throw Error('Invalid Patch operations "'+this.va[d]+'"');}}F(a,b,c){this.va.push(olympe.dc.transaction.pg.C.jo,a,b,c);this.size++}qc(a,b,c,d){this.va.push(olympe.dc.transaction.pg.C.dr,a,b,c,d);this.size++}Fc(a,b=olympe.dc.Qb.NONE,c){this.va.push(olympe.dc.transaction.pg.C.zo,a,b,c);this.size++}Va(a,b,c,d){if('string'!==typeof a)throw Error('Relation should be created using a tag as string (most likely a relation object is given here instead)');
468
+ this.va.push(olympe.dc.transaction.pg.C.ko,a,b,c,d);this.size++}hc(a,b,c,d){this.va.push(olympe.dc.transaction.pg.C.Ao,a,b,c,d);this.size++}};olympe.dc.transaction.pg.C={jo:1,dr:2,zo:3,ko:4,Ao:5};olympe.dc.transaction.pg.ma=[olympe.dc.Writable,olympe.dc.nm];function ee(a,b){return a.P.get(b)||a.db.source(b)||olympe.dc.Ia.kc}function fe(a,b){return a.K.has(b)?a.K.get(b):a.db.$f(b)}function ge(a,b,c,d){var e=d&&d.get(olympe.dc.$b.VERSION);a.versions.set(b,Number(e)||1);d&&a.P.set(b,d.get(olympe.dc.$b.Hd));e=ee(a,b);a.K.set(b,c&&a.F);a.Bc(e,c,f=>{f.F(b,d,0)})}
469
+ olympe.dc.transaction.Hu=class{constructor(a,b){this.id=b||olympe.X.bc();this.db=a;this.C=new Map;this.G=new olympe.dc.db.xc(b);this.versions=new Map;this.P=new Map;this.K=new Map;this.F=!0}Wf(){return 0===this.G.C.size}persist(a){this.F=a}qc(a,b,c=!1){var d=b&&b.get(olympe.dc.$b.VERSION);this.versions.set(a,Number(d)||1);d=ee(this,a);if(!d)throw Error('Attempt to update an instance which has an unknown source.');this.Bc(d,fe(this,a),e=>{e.qc(a,b,c,0)})}Fc(a,b){const c=ee(this,a),d=fe(this,a);this.Bc(c,
470
+ d,e=>{e.Fc(a,b)})}Va(a,b,c){const d=ee(this,b),e=ee(this,c);let f=fe(this,b)&&fe(this,c);f&&d!==e&&a!==olympe.dc.lc.Vc&&(olympe.ta.Za('dc').warn(`Try to create a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=!1);this.Bc(d,f,g=>{g.Va(a,b,c,0)})}hc(a,b,c){const d=ee(this,b),e=ee(this,c);let f=fe(this,b)&&fe(this,c);f&&d!==e&&a!==olympe.dc.lc.Vc&&(olympe.ta.Za('dc').warn(`Try to delete a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=
471
+ !1);this.Bc(d,f,g=>{g.hc(a,b,c,0)})}Bc(a,b,c){c(this.G);b&&this.F&&(b=this.C.get(a),b||(b=new olympe.dc.db.xc(this.id),this.C.set(a,b)),c(b))}};function he(a,b,c){const d=Object.create(null);if(!b)return d;for(const f of Array.from(b.keys()).sort()){let g=f;var e=b.get(f);if(g===olympe.dc.$b.Hd)if(e===olympe.dc.Ia.rb)d[g]=olympe.dc.La().Z();else{if(e===olympe.dc.Ia.Lc)continue}else g.startsWith(olympe.dc.$b.VERSION)?(g=g.substr(1),e=null===e?1:e):g.startsWith(olympe.dc.Xg.kc)&&(g='fd'+g.substr(1));e=a.$(e);c&&e instanceof Object&&8===e.c?a.V.set(g,e):d[g]=e}return d}
472
472
  function ie(a){if(0===a.V.size)return null;const b=Object.create(null);a.V.forEach((c,d)=>{b[d]=c});a.V.clear();return b}
473
- class je{constructor(){this.V=new Map}$(a){return a instanceof olympe.D.$a||a instanceof olympe.D.ra||a instanceof olympe.D.ga?a.valueOf():a instanceof Date||a instanceof olympe.D.jb?(a=a instanceof olympe.D.jb?a.valueOf():a,{c:4,y:a.getUTCFullYear(),M:a.getUTCMonth()+1,d:a.getUTCDate(),h:a.getUTCHours(),m:a.getUTCMinutes(),s:a.getUTCSeconds(),S:a.getUTCMilliseconds(),z:0}):a instanceof olympe.D.Color?{c:7,r:a.Wf().valueOf(),g:a.Qf().valueOf(),b:a.Lf().valueOf(),a:a.Kf().valueOf()}:a&&'function'===
474
- typeof a.T?{c:8,t:a.T()}:a}}function ke(a){a.Og=[];a.Se=[];a.fg=[];a.Pg=[];a.Dg=[]}function le(a){const b={};0<a.Dg.length&&(b.Dg=a.Dg);0<a.Se.length&&(b.Se=a.Se);0<a.Og.length&&(b.Og=a.Og);0<a.fg.length&&(b.fg=a.fg);0<a.Pg.length&&(b.Pg=a.Pg);ke(a);return b}function me(a){const b=[...a.Dg,...a.Se,...a.Og,...a.fg,...a.Pg];ke(a);return b}
475
- olympe.dc.transaction.ud=class{constructor(a=!1){this.Og=[];this.Se=[];this.fg=[];this.Pg=[];this.Dg=[];this.G=a;this.C=olympe.D?new je:new class extends je{$(b){return b&&'function'===typeof b.T?{c:8,t:b.T()}:b}}}flush(){return JSON.stringify(me(this))}F(a,b,c=-1){this.Og.push({o:1,t:a,p:he(this.C,b||null,this.G),i:c});this.G&&(b=ie(this.C))&&this.fg.push({o:2,t:a,p:b,i:c})}rc(a,b,c,d=-1){this.fg.push({o:2,t:a,p:he(this.C,b||null,!1),i:d})}Fc(a,b,c=-1){this.Se.push({o:3,t:a,f:b,i:c})}Va(a,b,c,d=
476
- -1){if(!a)throw Error('Cannot create relation of undefined type');if(!b)throw Error(`Cannot create relation ${a} from undefined origin to ${c}`);if(!c)throw Error(`Cannot create relation ${a} from ${b} to undefined destination`);this.Pg.push({o:4,m:a,l:b,r:c,i:d})}ic(a,b,c,d=-1){if(!a)throw Error('Cannot delete relation of undefined type');if(!b)throw Error('Cannot delete relation with undefined origin');if(!c)throw Error('Cannot delete relation with undefined destination');this.Dg.push({o:5,m:a,
477
- l:b,r:c,i:d})}};olympe.dc.transaction.ud.ma=[olympe.dc.Writable];olympe.dc.transaction.Th=class{constructor(a){this.id=a||olympe.X.bc();this.C=new Map;this.Pa=new Map}Z(){return this.id}F(a,b){this.C.has(a)&&console.warn('Try to add twice the same instance in the graph');const c=new olympe.dc.transaction.Th.Instance(a);if(b)for(const [d,e]of b)c.xa(d,e);this.C.set(a,c)}rc(){throw Error('UpdateInstance should never be called on a SubGraph since it represents the result of a GraphDef Query');}Fc(){throw Error('DeleteInstance should never be called on a SubGraph since it represents the result of a GraphDef Query');
478
- }Va(a,b,c){a=new olympe.dc.transaction.Th.Relation(b,c,a);this.Pa.set(a.toString(),a)}ic(a,b,c){a=new olympe.dc.transaction.Th.Relation(b,c,a);this.Pa.delete(a.F+'.'+a.G+'.'+a.C)}G(){return this.Pa.size+this.C.size}fe(){return this.C}Oc(a){const b=new Map;this.C.forEach((c,d)=>{const e=new Map;ne(c,(f,g)=>{if(g instanceof olympe.dc.Ec){const h=b.get(d)||new Map;h.set(f,g);b.set(d,h)}else e.set(f,g)});a.F(d,e)});b.forEach((c,d)=>{a.rc(d,c)});this.Pa.forEach(c=>{a.Va(c.C,c.F,c.G)})}};
479
- function ne(a,b){a.C.forEach((c,d)=>{b(d,b)})}olympe.dc.transaction.Th.Instance=class{constructor(a){this.tag=a;this.C=new Map}T(){return this.tag}xa(a,b){this.C.set(a,b);return this}deleteProperty(a){this.C.delete(a);return this}};olympe.dc.transaction.Th.Relation=class{constructor(a,b,c){this.F=a;this.G=b;this.C=olympe.dc.za(c)}toString(){return this.F+'.'+this.G+'.'+this.C}};olympe.dc.transaction.Th.ma=[olympe.dc.Writable,olympe.dc.mm];function oe(a,b){b&&a.va.push(b);return b}function pe(a){return(b,c)=>a.forEach(d=>d&&d(b,c))}
480
- olympe.dc.Transaction=class{constructor(a){this.id=a||olympe.X.bc();this.va=[];this.G=!0;this.F=[]}Z(){return this.id}persist(a){this.G=a;return this}C(a){a.persist(this.G);const b=this.va;for(let c=0,d=b.length;c<d;c++)b[c].C(a)}create(a,b){return oe(this,new olympe.dc.transaction.va.Xd(a,b))}wj(a,b=!0){const c=olympe.dc.za(a);var d=this.va.find(g=>g instanceof olympe.dc.transaction.va.Xd&&g.T()===c);if(d)return d.persist(b);d=olympe.dc.La();const e=d.model(a);if(null===e)throw Error('Try to persist a instance that does not exist: '+
481
- a);if(d.bg(a))return null;const f=d.source(a)||olympe.dc.Ia.lc;a=this.create(e,a).persist(b).li(f);for(const [g,h,k]of Nd(d,a))g!==olympe.dc.mc.Vc&&d.bg(k)&&this.Va(g,h===olympe.dc.Ca.DESTINATION?a:k,h===olympe.dc.Ca.DESTINATION?k:a);return a}delete(a,b=olympe.dc.Qb.Cc){oe(this,new olympe.dc.transaction.va.Pj(a,b))}update(a,b,c){return oe(this,new olympe.dc.transaction.va.Wi(a,b,c))}Va(a,b,c){oe(this,new olympe.dc.transaction.va.qo(a,b,c))}ic(a,b,c,d){oe(this,new olympe.dc.transaction.va.$s(a,b,c,
482
- d))}Um(a,b,c,d){oe(this,new olympe.dc.transaction.va.Zs(a,b,c,d))}defineProperty(a,b,c,d,e,f){d=this.create(olympe.dm.Property,f);d.setProperty(olympe.dc.CloudObject.nameProp,c||'');void 0!==e&&this.update(a,olympe.dc.Yg.lc+d.T(),e);this.Va(olympe.dc.CloudObject.propertyRel,a,d);this.Va(olympe.dm.Property.typeRel,d,b);this.Va(olympe.dc.CloudObject.containsRel,a,d);return d}mh(a,b,c='',{bj:d=olympe.dm.Relation.F.em,Ir:e=olympe.dm.Relation.C.yq,Gr:f=olympe.dm.Relation.C.ql,yj:g=olympe.dm.Relation.C.Pl,
483
- aj:h=olympe.dm.Jc.NONE,vj:k=olympe.dm.Relation.K|h}={},l=olympe.X.bc()){c=this.create(olympe.dm.Relation,l).setProperty(olympe.dc.CloudObject.nameProp,c||'').setProperty(olympe.dm.Relation.Om,d).setProperty(olympe.dm.Relation.wn,k).setProperty(olympe.dm.Relation.Wm,e).setProperty(olympe.dm.Relation.Dn,e).setProperty(olympe.dm.Relation.Vm,f).setProperty(olympe.dm.Relation.An,g).setProperty(olympe.dm.Relation.xr,h);this.Va(olympe.dc.CloudObject.G,a,c);this.Va(olympe.dm.Relation.destinationModelRel,
484
- c,b);this.Va(olympe.dc.CloudObject.containsRel,a,c);return c}th(){return!1}Nm(a){this.F.push(olympe.D.Na().F(a))}kb(a,b){a=pe([...this.F,a]);qe(this,a,b)}Xm(a){a=pe([...this.F,a]);re(olympe.dc.ii(),this,a,!0)}toString(){return`Transaction #${this.id}`}};olympe.dc.Transaction.ma=[olympe.dc.gq];function ce(a){var b=olympe.dc.ii();const c=a.Z();b.K.set(c,a);a.F.onDestroy(()=>{b.K.delete(c)});return(d,e,f)=>{const g=new olympe.dc.db.xc(c);e=(new Map).set(olympe.dc.Zb.VERSION,b.db.version(d)+1).set(e,f);g.rc(d,e,!1,0);olympe.dc.yd().bf(g,olympe.dc.Ia.rb)}}
485
- function de(a,b,c,d){var e=olympe.dc.ii();const f=olympe.dc.Zb.VERSION,g=olympe.dc.ha.ja.Bh,h=olympe.dc.ha.ja.rl,k=a.Z(),l=a.th(),n=new Map;for(const q of b.keys()){var p=e.db.source(q);if(p===olympe.dc.Ia.rb)continue;let r=n.get(p);r||(r=new olympe.dc.db.xc(k),n.set(p,r));p=b.get(q);p.set(f,e.db.version(q)+1);r.rc(q,p,!1,0)}for(const [q,r]of n)b=Hc(new olympe.dc.ha(c?h:g,{Bc:r,th:l},[q]),a.F),c&&d&&M(b,t=>{t?d(!1,t.message):d(!0,null)}),e.G.send(b)}
486
- function qe(a,b,c){var d=olympe.dc.ii();if(c&&b){const e=a.Z();d.F.set(e,b);re(d,a,(f,g)=>{f||(d.F.delete(e),b(f,g))},!1)}else re(d,a,b,!1)}
487
- function se(a){const b=olympe.dc.ha.ja.Rj;a.G.C(olympe.dc.ha.ja.Ij,(c,d)=>{c=d.id;var e=d.rollback;d=d.error;const f=a.K.get(c);void 0!==f&&(a.K.delete(c),f.Db(d));olympe.dc.yd().bf(e,olympe.dc.Ia.rb);a.N.warn(`Fast update (id=${c}) has been refused and is rolled back. Error: ${d}`)});a.G.C(b,(c,d)=>{c=d.finalize;var e=d.error;(d=(d=a.C.get(d.id))&&d.pop())&&d(c,e)})}
488
- function re(a,b,c,d=!1){const e=olympe.D.Na(),f=c?e.F(c):void 0;c=olympe.dc.yd();const g=b.Z(),h=new olympe.dc.transaction.Gu(a.db,g);b.C(h);if(h.Yf())f&&f(!0,null);else{a.C.set(g,[]);const k=[],l=[];for(const p of h.versions.keys())fe(h,p)?k.push(p):l.push(p);const n=Vc(c,e,h.G,k,l);te(a,h,(p,q,r)=>{q?(ue(a,g,k,h.C.size),ve(a,h,d,b.th(),(t,u)=>{t||we(a,g,u);n(t);p&&p(t);f&&f(t,u)})):(a.N.error(r),we(a,g,r),n(!1),f&&f(!1,r))})}}
489
- function te(a,b,c){const d=[];for(const p of b.versions.keys())a.db.Xf(p,olympe.dm.File)&&fe(b,p)&&d.push(p);if(0===d.length)c(null,!0,null);else{var e=olympe.dm.File.urlProp.T(),f=olympe.dm.File.C.T(),g=olympe.dm.File.modificationDateProp.T(),h=Array.from(b.C.values()),k=[],l=new olympe.async.ug(olympe.D.qh()),n=olympe.X.fi();d.forEach(p=>{l.add((q,r)=>{const t=a.db.fb(p,e,!0),u=a.db.fb(p,olympe.dm.File.mimeTypeProp)||'application/data';t.startsWith('blob:')?n.F(t,v=>{n.V(t);null===v?q():Dc(a.V,
490
- p,v,u,w=>{const y=h.reduce((B,D)=>B||D.Rf(p),null);null!==y&&(y.xa(e,w).xa(f,!0),k.push([p,w]));q()},w=>{r(w)})}):(2048<t.length&&a.N.error('Trying to create a file with an URL longer than 2048. It likely is a data url and should be an object url. File tag:',p),q())})});Vb(l,(p,q)=>{let r=null;if(p){const t=new olympe.dc.db.xc;k.forEach(([u,v])=>{const w=new Map;w.set(e,v).set(f,!0).set(g,olympe.D.jb.now());t.rc(u,w,!0,0)});r=Vc(olympe.dc.yd(),olympe.D.qh(),t,[],[])}c(r,p,q)});l.start()}}
491
- function ue(a,b,c,d){const e=olympe.D.qh(),f=new olympe.async.ug(e);0<a.timeout&&Ub(f,a.timeout);const g=a.C.get(b);for(let h=0;h<d;h++)f.add((k,l,n)=>{g.push(e.F((p,q)=>{n.set('final',p);q?l(q):k()}))});Vb(f,(h,k,l)=>{h||a.N.warn(`An error occurred while processing the notification of transaction (${b}): ${k}.`);l.get('final')!==olympe.dc.transaction.yg.C.Wp&&olympe.dc.yd().persist(c);we(a,b)});f.start()}
492
- function ve(a,b,c,d,e){b=b.C;if(0===b.size)e(!0,null);else{var f=c?olympe.dc.ha.ja.zk:olympe.dc.ha.ja.jh;c=(h,k,l,n)=>{h=M(new olympe.dc.ha(f,{Bc:h,th:d},[k]),p=>{p instanceof Error?n(p.message):l()});a.G.send(h)};var g=new olympe.async.ug(olympe.D.qh());for(const [h,k]of b)g.add(c.bind(null,k,h));Vb(g,e);g.start()}}
493
- function we(a,b,c){if(void 0!==c){var d;null==(d=a.C.get(b))||d.forEach(e=>{e(olympe.dc.transaction.yg.C.ek,c)})}a.C.delete(b);if(0===a.C.size){for(const e of a.P)e();a.P=[]}a.F.has(b)&&(d=a.F.get(b),a.F.delete(b),d(!0,null))}function xe(a,b){0<a.C.size?a.P.push(olympe.D.Na().F(b)):b()}olympe.dc.transaction.yg=class{constructor(a,b,c,d,e){this.N=a;this.db=b;this.G=c;this.V=d;this.timeout=e;this.K=new Map;this.C=new Map;this.P=[];this.F=new Map;se(this)}Za(){return this.N}};
494
- olympe.dc.transaction.yg.C={ek:0,Vp:1,Wp:2};olympe.dc.transaction.R={Ea:'dc.transaction.Logger',Aa:'dc.transaction.Manager'};olympe.dc.transaction.Config={TIMEOUT:'dc.transaction.timeout',Un:'dc.transaction.burstInterval'};
495
- olympe.U.config(function(a){E(a,olympe.dc.transaction.Config.TIMEOUT,6E4);E(a,olympe.dc.transaction.Config.Un,30);C(a,olympe.dc.transaction.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('dc'));A(a,olympe.dc.transaction.R.Aa,olympe.dc.transaction.yg,olympe.dc.transaction.R.Ea,olympe.dc.R.wi,olympe.dc.R.qe,olympe.dc.R.Ai,new olympe.U.fa(olympe.dc.transaction.Config.TIMEOUT))},'olympe.dc.transaction');olympe.dc.transaction.va={};function W(a){return olympe.dc.za(a)}function ye(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.Xa(e));return c}olympe.dc.transaction.va.Ug=class{C(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}Xa(a){a=olympe.D.Xa(a);return void 0===a||null===a?null:olympe.D.Yr(a)?a.valueOf():a}};olympe.dc.transaction.va.Ug.ma=[olympe.dc.gq];olympe.dc.transaction.va.Xd=class extends olympe.dc.transaction.va.Ug{constructor(a,b){super();this.tag=void 0!==b?b:olympe.X.bc();this.model=a;this.F=new Map;this.G=!0;this.F.set(olympe.dc.Zb.VERSION,1)}T(){return W(this.tag)}Lb(){return W(this.model)}persist(a){this.G=a;return this}li(a){this.F.set(olympe.dc.Zb.Id,a);return this}Px(){this.F.set(olympe.dc.Zb.Id,olympe.dc.Ia.rb)}setProperty(a,b){this.F.set(olympe.dc.za(a),b);return this}gl(a){this.setProperty(olympe.dc.CloudObject.nameProp.T(),a);
496
- return this}C(a){const b=olympe.dc.La(),c=this.Lb(),d=this.T();if(void 0===c)throw Error('OperationError: Cannot create instance, model tag is undefined');var e=olympe.dc.Zb.Id;if(!this.F.has(e)){var f=b.source(c);this.F.set(e,null!==f?f:olympe.dc.Ia.lc)}if(b.Gb(d)&&!b.bg(d)&&this.G){e=new Map([...b.ed(d,!0),...ye(this,this.F)]);for(const g of e.values())g instanceof olympe.dc.Ec&&!fe(a,g.T())&&(f=new olympe.dc.Transaction,f.wj(g.T()),f.C(a));ge(a,d,this.G,e);a.Va(olympe.dc.CloudObject.modelRel.T(),
497
- d,c);for(const [g,h,k]of Nd(b,d))fe(a,k)&&(h===olympe.dc.Ca.ORIGIN?a.Va(g,k,d):a.Va(g,d,k))}else b.Gb(d)||(ge(a,d,this.G,ye(this,this.F)),a.Va(olympe.dc.CloudObject.modelRel.T(),d,c))}toString(){return`CreateInstance(${this.Lb()}, ${this.T()})`}};olympe.dc.transaction.va.Xd.prototype.setProperty=olympe.dc.transaction.va.Xd.prototype.setProperty;olympe.dc.transaction.va.Xd.prototype.localSource=olympe.dc.transaction.va.Xd.prototype.Px;olympe.dc.transaction.va.Xd.prototype.persist=olympe.dc.transaction.va.Xd.prototype.persist;
498
- olympe.dc.transaction.va.Xd.prototype.getModelTag=olympe.dc.transaction.va.Xd.prototype.Lb;olympe.dc.transaction.va.Xd.prototype.getTag=olympe.dc.transaction.va.Xd.prototype.T;olympe.dc.transaction.va.Xd.ma=[olympe.dc.De];olympe.dc.transaction.va.qo=class extends olympe.dc.transaction.va.Ug{constructor(a,b,c){super();this.type=a.Sa?a:new olympe.dc.Y.Sb(W(a));this.F=b;this.G=c}Sa(){return this.Xa(this.type).Sa()}C(a){const b=W(this.type);if(''===b)throw Error('OperationError: Cannot create relation, type is undefined, null or empty string');if(b===olympe.dc.mc.Vc)throw Error('OperationError: Cannot create the instance -> model relation');const c=W(this.F);if(''===c)throw Error('OperationError: Cannot create relation, origin tag is undefined, null or empty string');
499
- const d=W(this.G);if(''===d)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.Sa()===olympe.dc.Ca.DESTINATION?a.Va(b,c,d):a.Va(b,d,c)}toString(){return`CreateRelation('${this.Sa()}${W(this.type)}, ${W(this.F)}, ${W(this.G)})`}};olympe.dc.transaction.va.Oz=class extends olympe.dc.transaction.va.Ug{constructor(a,b=olympe.dc.Qb.Cc){super();this.model=a;this.F=b}Lb(){return W(this.model)}C(a){const b=this.Lb();if(void 0===b)throw Error('OperationError: Cannot delete instances of model, model is undefined');const c=olympe.dc.La();for(const d of c.fe(b))d!==b&&(new olympe.dc.transaction.va.Pj(d,this.F)).C(a)}toString(){return`DeleteAllInstances(${this.Lb()}, ${this.F})`}};olympe.dc.transaction.va.Zs=class extends olympe.dc.transaction.va.Ug{constructor(a,b,c,d){super();this.F=a.Sa?a:new olympe.dc.Y.Sb(W(a));this.G=b;this.K=c||!1;this.P=d instanceof Array?d.map(e=>W(e)):null}Sa(){return this.Xa(this.F).Sa()}C(a){const b=W(this.F);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.mc.Vc)throw Error('OperationError: Cannot delete the instance -> model relation');const c=W(this.G);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');
500
- var d=olympe.dc.La();const e=this.Sa(),f=this.P;d=d.tb(c,this.F);for(const g of d)e===olympe.dc.Ca.DESTINATION?a.ic(b,c,g):a.ic(b,g,c),null!==f&&0<=f.indexOf(g)||this.K&&(new olympe.dc.transaction.va.Pj(g,olympe.dc.Qb.Cc)).C(a)}toString(){return`DeleteAllRelations(${this.Sa()}${W(this.F)}, ${W(this.G)}, ${this.K})`}};olympe.dc.transaction.va.Pj=class extends olympe.dc.transaction.va.Ug{constructor(a,b=olympe.dc.Qb.Cc){super();this.tag=a;this.F=b}T(){return W(this.tag)}C(a){const b=olympe.dc.La(),c=this.T();if(void 0===c)throw Error('OperationError: Cannot delete instance, tag is undefined');const d=b.model(c);0<=b.version(c)&&d&&a.Fc(c,this.F)}toString(){return'DeleteInstance('+this.T()+', '+this.F+')'}};olympe.dc.transaction.va.$s=class extends olympe.dc.transaction.va.qo{constructor(a,b,c,d=!1){super(a,b,c);this.K=d}C(a){const b=W(this.type);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.mc.Vc)throw Error('OperationError: Cannot delete the instance -> model relation');const c=W(this.F);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=W(this.G);if(void 0===d)throw Error('OperationError: Cannot delete relation, right tag is undefined');
501
- this.Sa()===olympe.dc.Ca.DESTINATION?a.ic(b,c,d):a.ic(b,d,c);this.K&&(new olympe.dc.transaction.va.Pj(d,olympe.dc.Qb.Cc)).C(a)}toString(){return'DeleteRelation('+this.Sa()+W(this.type)+', '+W(this.F)+', '+W(this.G)+', '+this.K+')'}};olympe.dc.transaction.va.Wi=class extends olympe.dc.transaction.va.Ug{constructor(a,b,c){super();this.tag=a;this.F=new Map;this.F.set(olympe.dc.Zb.VERSION,-1);void 0!==b&&this.setProperty(b,c)}T(){return W(this.tag)}setProperty(a,b){this.F.set(W(a),b);return this}C(a){const b=this.T();if(void 0===b)throw Error('OperationError: Cannot update instance, tag is undefined');const c=olympe.dc.La();var d=c.version(b),e=a.versions.get(b);e=void 0!==e?e:d;if(null===e)throw Error('OperationError: Instance #'+
502
- b+' not found so it cannot be updated');d=ye(this,this.F);0>=d.get(olympe.dc.Zb.VERSION)&&d.set(olympe.dc.Zb.VERSION,e+1);for(const [f,g]of d)e=c.fb(b,f),e instanceof olympe.dc.Ec&&a.Fc(e.T(),olympe.dc.Qb.Cc),g instanceof olympe.dc.Ec&&!fe(a,g.T())&&(e=new olympe.dc.Transaction,e.wj(g.T()),e.C(a));a.rc(b,d)}toString(){return'UpdateInstance('+this.T()+', '+ye(this,this.F)+')'}};olympe.dc.transaction.va.Wi.prototype.setProperty=olympe.dc.transaction.va.Wi.prototype.setProperty;
503
- olympe.dc.transaction.va.Wi.prototype.getTag=olympe.dc.transaction.va.Wi.prototype.T;olympe.dc.ea={};olympe.dc.De=class{T(){}};olympe.dc.De.prototype.getTag=olympe.dc.De.prototype.T;olympe.dc.BA=olympe.dc.De;olympe.dc.ea.ik={ASC:'ASC',DESC:'DESC'};function ze(a){switch(a.pr){case 1:const c=a.v;switch(a.t){case 1:var b=c;break;case 2:b=new Date(c);break;case 3:b=olympe.dc.CloudObject.get(c);break;case 4:b=new olympe.D.Color(c.r,c.g,c.b,c.a)}return new olympe.dc.ea.W.Gc(a.p,b,olympe.dc.La());case 2:return new olympe.dc.ea.W.Uc(a.p,a.s,olympe.dc.La(),a.c);case 3:return new olympe.dc.ea.W.Gh(a.p,a.b,a.l,a.s);case 4:return new olympe.dc.ea.W.ld(ze(a.v));case 5:return new olympe.dc.ea.W.vd(a.p,new RegExp(a.r),olympe.dc.La(),a.c);case 6:b=new olympe.dc.ea.W.He(a.d);
504
- for(const [d,e,f]of a.r)a=new olympe.dc.query.Relation(d,e,f),f?b.Lk(a):b.ub(a);return b;case 7:return new olympe.dc.ea.W.be(...a.p.map(d=>ze(d)));case 8:return new olympe.dc.ea.W.Ud(...a.p.map(d=>ze(d)));default:return null}}
505
- olympe.dc.ea.cb=class{observe(){}kb(){}clear(){}ka(){}toString(){}static nb(a,b){return new olympe.dc.ea.W.Gc(a,b,olympe.dc.La())}static contains(a,b,c=!1){return new olympe.dc.ea.W.Uc(a,b,olympe.dc.La(),c)}static gs(a,b,c=!0){return new olympe.dc.ea.W.vd(a,b,olympe.dc.La(),c)}static Rk(a,b,c=!0){return new olympe.dc.ea.W.Gh(a,b,!1,c)}static Aj(a,b,c=!0){return new olympe.dc.ea.W.Gh(a,b,!0,c)}static and(...a){return new olympe.dc.ea.W.Ud(...a)}static or(...a){return new olympe.dc.ea.W.be(...a)}static not(a){return new olympe.dc.ea.W.ld(a)}};
506
- olympe.dc.ea.cb.not=olympe.dc.ea.cb.not;olympe.dc.ea.cb.or=olympe.dc.ea.cb.or;olympe.dc.ea.cb.and=olympe.dc.ea.cb.and;olympe.dc.ea.cb.smallerThan=olympe.dc.ea.cb.Aj;olympe.dc.ea.cb.greaterThan=olympe.dc.ea.cb.Rk;olympe.dc.ea.cb.regex=olympe.dc.ea.cb.gs;olympe.dc.ea.cb.contains=olympe.dc.ea.cb.contains;olympe.dc.ea.cb.equals=olympe.dc.ea.cb.nb;function Ae(a,b){return new olympe.dc.hb(a.G,a.source,b,a.F,{max:a.max,offset:a.offset})}function Be(a){return a.C.filter(b=>b instanceof olympe.dc.ea.Ib.mf||b instanceof olympe.dc.ea.Ib.nf).length}
507
- function Ce(a){const b=olympe.dc.ea.Ib.Rh,c=olympe.dc.ea.Ib.mf,d=olympe.dc.ea.Ib.nf,e=0===a.F.size?a.Hf():a;let f=-1,g=0;for(const h of a.C)h instanceof b&&(f=g),(h instanceof c||h instanceof d)&&g++;if(0<=f&&!e.F.has(f))throw Error('AndReturn was not called for the current level before sortBy operator');return e}
508
- function De(a,b){const c=olympe.dc.Dd.SUBSCRIBE,d=olympe.dc.Dd.Pi,e=new olympe.dc.pf(a.G,b?c:d);for(const f of a.C)f instanceof olympe.dc.ea.Ib.mf?e.ub(f.Rd()):f instanceof olympe.dc.ea.Ib.nf?e.ub(f.Rd(),!0):f instanceof olympe.dc.ea.Ib.tc&&(a=f.C,a instanceof olympe.dc.ea.W.He&&(a=a.gd(),a.forEach(g=>e.ub(g)),Ee(e,a.length)));return e}function Fe(a){return a.source||a.db.source(a.G)||olympe.dc.Ia.lc}
473
+ class je{constructor(){this.V=new Map}$(a){return a instanceof olympe.D.$a||a instanceof olympe.D.ra||a instanceof olympe.D.ga?a.valueOf():a instanceof Date||a instanceof olympe.D.jb?(a=a instanceof olympe.D.jb?a.valueOf():a,{c:4,y:a.getUTCFullYear(),M:a.getUTCMonth()+1,d:a.getUTCDate(),h:a.getUTCHours(),m:a.getUTCMinutes(),s:a.getUTCSeconds(),S:a.getUTCMilliseconds(),z:0}):a instanceof olympe.D.Color?{c:7,r:a.Uf().valueOf(),g:a.Of().valueOf(),b:a.Jf().valueOf(),a:a.If().valueOf()}:a&&'function'===
474
+ typeof a.T?{c:8,t:a.T()}:a}}function ke(a){a.Lg=[];a.Te=[];a.cg=[];a.Mg=[];a.Ag=[]}function le(a){const b={};0<a.Ag.length&&(b.Ag=a.Ag);0<a.Te.length&&(b.Te=a.Te);0<a.Lg.length&&(b.Lg=a.Lg);0<a.cg.length&&(b.cg=a.cg);0<a.Mg.length&&(b.Mg=a.Mg);ke(a);return b}function me(a){const b=[...a.Ag,...a.Te,...a.Lg,...a.cg,...a.Mg];ke(a);return b}
475
+ olympe.dc.transaction.ud=class{constructor(a=!1){this.Lg=[];this.Te=[];this.cg=[];this.Mg=[];this.Ag=[];this.G=a;this.C=olympe.D?new je:new class extends je{$(b){return b&&'function'===typeof b.T?{c:8,t:b.T()}:b}}}flush(){return JSON.stringify(me(this))}F(a,b,c=-1){this.Lg.push({o:1,t:a,p:he(this.C,b||null,this.G),i:c});this.G&&(b=ie(this.C))&&this.cg.push({o:2,t:a,p:b,i:c})}qc(a,b,c,d=-1){this.cg.push({o:2,t:a,p:he(this.C,b||null,!1),i:d})}Fc(a,b,c=-1){this.Te.push({o:3,t:a,f:b,i:c})}Va(a,b,c,d=
476
+ -1){if(!a)throw Error('Cannot create relation of undefined type');if(!b)throw Error(`Cannot create relation ${a} from undefined origin to ${c}`);if(!c)throw Error(`Cannot create relation ${a} from ${b} to undefined destination`);this.Mg.push({o:4,m:a,l:b,r:c,i:d})}hc(a,b,c,d=-1){if(!a)throw Error('Cannot delete relation of undefined type');if(!b)throw Error('Cannot delete relation with undefined origin');if(!c)throw Error('Cannot delete relation with undefined destination');this.Ag.push({o:5,m:a,
477
+ l:b,r:c,i:d})}};olympe.dc.transaction.ud.ma=[olympe.dc.Writable];olympe.dc.transaction.Sh=class{constructor(a){this.id=a||olympe.X.bc();this.C=new Map;this.Pa=new Map}Z(){return this.id}F(a,b){this.C.has(a)&&console.warn('Try to add twice the same instance in the graph');const c=new olympe.dc.transaction.Sh.Instance(a);if(b)for(const [d,e]of b)c.xa(d,e);this.C.set(a,c)}qc(){throw Error('UpdateInstance should never be called on a SubGraph since it represents the result of a GraphDef Query');}Fc(){throw Error('DeleteInstance should never be called on a SubGraph since it represents the result of a GraphDef Query');
478
+ }Va(a,b,c){a=new olympe.dc.transaction.Sh.Relation(b,c,a);this.Pa.set(a.toString(),a)}hc(a,b,c){a=new olympe.dc.transaction.Sh.Relation(b,c,a);this.Pa.delete(a.F+'.'+a.G+'.'+a.C)}G(){return this.Pa.size+this.C.size}fe(){return this.C}Oc(a){const b=new Map;this.C.forEach((c,d)=>{const e=new Map;ne(c,(f,g)=>{if(g instanceof olympe.dc.Ec){const h=b.get(d)||new Map;h.set(f,g);b.set(d,h)}else e.set(f,g)});a.F(d,e)});b.forEach((c,d)=>{a.qc(d,c)});this.Pa.forEach(c=>{a.Va(c.C,c.F,c.G)})}};
479
+ function ne(a,b){a.C.forEach((c,d)=>{b(d,b)})}olympe.dc.transaction.Sh.Instance=class{constructor(a){this.tag=a;this.C=new Map}T(){return this.tag}xa(a,b){this.C.set(a,b);return this}deleteProperty(a){this.C.delete(a);return this}};olympe.dc.transaction.Sh.Relation=class{constructor(a,b,c){this.F=a;this.G=b;this.C=olympe.dc.za(c)}toString(){return this.F+'.'+this.G+'.'+this.C}};olympe.dc.transaction.Sh.ma=[olympe.dc.Writable,olympe.dc.nm];function oe(a,b){b&&a.va.push(b);return b}function pe(a){return(b,c)=>a.forEach(d=>d&&d(b,c))}
480
+ olympe.dc.Transaction=class{constructor(a){this.id=a||olympe.X.bc();this.va=[];this.G=!0;this.F=[]}Z(){return this.id}persist(a){this.G=a;return this}C(a){a.persist(this.G);const b=this.va;for(let c=0,d=b.length;c<d;c++)b[c].C(a)}create(a,b){return oe(this,new olympe.dc.transaction.va.Wd(a,b))}xj(a,b=!0){const c=olympe.dc.za(a);var d=this.va.find(g=>g instanceof olympe.dc.transaction.va.Wd&&g.T()===c);if(d)return d.persist(b);d=olympe.dc.La();const e=d.model(a);if(null===e)throw Error('Try to persist a instance that does not exist: '+
481
+ a);if(d.$f(a))return null;const f=d.source(a)||olympe.dc.Ia.kc;a=this.create(e,a).persist(b).ki(f);for(const [g,h,k]of Nd(d,a))g!==olympe.dc.lc.Vc&&d.$f(k)&&this.Va(g,h===olympe.dc.Ca.DESTINATION?a:k,h===olympe.dc.Ca.DESTINATION?k:a);return a}delete(a,b=olympe.dc.Qb.Cc){oe(this,new olympe.dc.transaction.va.Qj(a,b))}update(a,b,c){return oe(this,new olympe.dc.transaction.va.Xi(a,b,c))}Va(a,b,c){oe(this,new olympe.dc.transaction.va.ro(a,b,c))}hc(a,b,c,d){oe(this,new olympe.dc.transaction.va.at(a,b,c,
482
+ d))}Vm(a,b,c,d){oe(this,new olympe.dc.transaction.va.$s(a,b,c,d))}defineProperty(a,b,c,d,e,f){d=this.create(olympe.dm.Property,f);d.setProperty(olympe.dc.CloudObject.nameProp,c||'');void 0!==e&&this.update(a,olympe.dc.Xg.kc+d.T(),e);this.Va(olympe.dc.CloudObject.propertyRel,a,d);this.Va(olympe.dm.Property.typeRel,d,b);this.Va(olympe.dc.CloudObject.containsRel,a,d);return d}lh(a,b,c='',{cj:d=olympe.dm.Relation.F.fm,Jr:e=olympe.dm.Relation.C.zq,Hr:f=olympe.dm.Relation.C.rl,zj:g=olympe.dm.Relation.C.Ql,
483
+ bj:h=olympe.dm.Jc.NONE,wj:k=olympe.dm.Relation.K|h}={},l=olympe.X.bc()){c=this.create(olympe.dm.Relation,l).setProperty(olympe.dc.CloudObject.nameProp,c||'').setProperty(olympe.dm.Relation.Pm,d).setProperty(olympe.dm.Relation.xn,k).setProperty(olympe.dm.Relation.Xm,e).setProperty(olympe.dm.Relation.En,e).setProperty(olympe.dm.Relation.Wm,f).setProperty(olympe.dm.Relation.Bn,g).setProperty(olympe.dm.Relation.yr,h);this.Va(olympe.dc.CloudObject.G,a,c);this.Va(olympe.dm.Relation.destinationModelRel,
484
+ c,b);this.Va(olympe.dc.CloudObject.containsRel,a,c);return c}th(){return!1}Om(a){this.F.push(olympe.D.Na().F(a))}kb(a,b){a=pe([...this.F,a]);qe(this,a,b)}Ym(a){a=pe([...this.F,a]);re(olympe.dc.hi(),this,a,!0)}toString(){return`Transaction #${this.id}`}};olympe.dc.Transaction.ma=[olympe.dc.hq];function ce(a){var b=olympe.dc.hi();const c=a.Z();b.K.set(c,a);a.F.onDestroy(()=>{b.K.delete(c)});return(d,e,f)=>{const g=new olympe.dc.db.xc(c);e=(new Map).set(olympe.dc.$b.VERSION,b.db.version(d)+1).set(e,f);g.qc(d,e,!1,0);olympe.dc.xd().af(g,olympe.dc.Ia.rb)}}
485
+ function de(a,b,c,d){var e=olympe.dc.hi();const f=olympe.dc.$b.VERSION,g=olympe.dc.ha.ja.Bh,h=olympe.dc.ha.ja.sl,k=a.Z(),l=a.th(),n=new Map;for(const q of b.keys()){var p=e.db.source(q);if(p===olympe.dc.Ia.rb)continue;let r=n.get(p);r||(r=new olympe.dc.db.xc(k),n.set(p,r));p=b.get(q);p.set(f,e.db.version(q)+1);r.qc(q,p,!1,0)}for(const [q,r]of n)b=Hc(new olympe.dc.ha(c?h:g,{Bc:r,th:l},[q]),a.F),c&&d&&M(b,t=>{t?d(!1,t.message):d(!0,null)}),e.G.send(b)}
486
+ function qe(a,b,c){var d=olympe.dc.hi();if(c&&b){const e=a.Z();d.F.set(e,b);re(d,a,(f,g)=>{f||(d.F.delete(e),b(f,g))},!1)}else re(d,a,b,!1)}
487
+ function se(a){const b=olympe.dc.ha.ja.Sj;a.G.C(olympe.dc.ha.ja.Jj,(c,d)=>{c=d.id;var e=d.rollback;d=d.error;const f=a.K.get(c);void 0!==f&&(a.K.delete(c),f.Fb(d));olympe.dc.xd().af(e,olympe.dc.Ia.rb);a.N.warn(`Fast update (id=${c}) has been refused and is rolled back. Error: ${d}`)});a.G.C(b,(c,d)=>{c=d.finalize;var e=d.error;(d=(d=a.C.get(d.id))&&d.pop())&&d(c,e)})}
488
+ function re(a,b,c,d=!1){const e=olympe.D.Na(),f=c?e.F(c):void 0;c=olympe.dc.xd();const g=b.Z(),h=new olympe.dc.transaction.Hu(a.db,g);b.C(h);if(h.Wf())f&&f(!0,null);else{a.C.set(g,[]);const k=[],l=[];for(const p of h.versions.keys())fe(h,p)?k.push(p):l.push(p);const n=Vc(c,e,h.G,k,l);te(a,h,(p,q,r)=>{q?(ue(a,g,k,h.C.size),ve(a,h,d,b.th(),(t,u)=>{t||we(a,g,u);n(t);p&&p(t);f&&f(t,u)})):(a.N.error(r),we(a,g,r),n(!1),f&&f(!1,r))})}}
489
+ function te(a,b,c){const d=[];for(const p of b.versions.keys())a.db.Vf(p,olympe.dm.File)&&fe(b,p)&&d.push(p);if(0===d.length)c(null,!0,null);else{var e=olympe.dm.File.urlProp.T(),f=olympe.dm.File.C.T(),g=olympe.dm.File.modificationDateProp.T(),h=Array.from(b.C.values()),k=[],l=new olympe.async.rg(olympe.D.ph()),n=olympe.X.ei();d.forEach(p=>{l.add((q,r)=>{const t=a.db.eb(p,e,!0),u=a.db.eb(p,olympe.dm.File.mimeTypeProp)||'application/data';t.startsWith('blob:')?n.F(t,v=>{n.V(t);null===v?q():Dc(a.V,
490
+ p,v,u,w=>{const y=h.reduce((B,D)=>B||D.Pf(p),null);null!==y&&(y.xa(e,w).xa(f,!0),k.push([p,w]));q()},w=>{r(w)})}):(2048<t.length&&a.N.error('Trying to create a file with an URL longer than 2048. It likely is a data url and should be an object url. File tag:',p),q())})});Vb(l,(p,q)=>{let r=null;if(p){const t=new olympe.dc.db.xc;k.forEach(([u,v])=>{const w=new Map;w.set(e,v).set(f,!0).set(g,olympe.D.jb.now());t.qc(u,w,!0,0)});r=Vc(olympe.dc.xd(),olympe.D.ph(),t,[],[])}c(r,p,q)});l.start()}}
491
+ function ue(a,b,c,d){const e=olympe.D.ph(),f=new olympe.async.rg(e);0<a.timeout&&Ub(f,a.timeout);const g=a.C.get(b);for(let h=0;h<d;h++)f.add((k,l,n)=>{g.push(e.F((p,q)=>{n.set('final',p);q?l(q):k()}))});Vb(f,(h,k,l)=>{h||a.N.warn(`An error occurred while processing the notification of transaction (${b}): ${k}.`);l.get('final')!==olympe.dc.transaction.vg.C.Xp&&olympe.dc.xd().persist(c);we(a,b)});f.start()}
492
+ function ve(a,b,c,d,e){b=b.C;if(0===b.size)e(!0,null);else{var f=c?olympe.dc.ha.ja.Ak:olympe.dc.ha.ja.ih;c=(h,k,l,n)=>{h=M(new olympe.dc.ha(f,{Bc:h,th:d},[k]),p=>{p instanceof Error?n(p.message):l()});a.G.send(h)};var g=new olympe.async.rg(olympe.D.ph());for(const [h,k]of b)g.add(c.bind(null,k,h));Vb(g,e);g.start()}}
493
+ function we(a,b,c){if(void 0!==c){var d;null==(d=a.C.get(b))||d.forEach(e=>{e(olympe.dc.transaction.vg.C.fk,c)})}a.C.delete(b);if(0===a.C.size){for(const e of a.P)e();a.P=[]}a.F.has(b)&&(d=a.F.get(b),a.F.delete(b),d(!0,null))}function xe(a,b){0<a.C.size?a.P.push(olympe.D.Na().F(b)):b()}olympe.dc.transaction.vg=class{constructor(a,b,c,d,e){this.N=a;this.db=b;this.G=c;this.V=d;this.timeout=e;this.K=new Map;this.C=new Map;this.P=[];this.F=new Map;se(this)}Za(){return this.N}};
494
+ olympe.dc.transaction.vg.C={fk:0,Wp:1,Xp:2};olympe.dc.transaction.R={Ea:'dc.transaction.Logger',Aa:'dc.transaction.Manager'};olympe.dc.transaction.Config={TIMEOUT:'dc.transaction.timeout',Vn:'dc.transaction.burstInterval'};
495
+ olympe.U.config(function(a){E(a,olympe.dc.transaction.Config.TIMEOUT,6E4);E(a,olympe.dc.transaction.Config.Vn,30);C(a,olympe.dc.transaction.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('dc'));A(a,olympe.dc.transaction.R.Aa,olympe.dc.transaction.vg,olympe.dc.transaction.R.Ea,olympe.dc.R.vi,olympe.dc.R.qe,olympe.dc.R.zi,new olympe.U.fa(olympe.dc.transaction.Config.TIMEOUT))},'olympe.dc.transaction');olympe.dc.transaction.va={};function W(a){return olympe.dc.za(a)}function ye(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.Xa(e));return c}olympe.dc.transaction.va.Tg=class{C(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}Xa(a){a=olympe.D.Xa(a);return void 0===a||null===a?null:olympe.D.Zr(a)?a.valueOf():a}};olympe.dc.transaction.va.Tg.ma=[olympe.dc.hq];olympe.dc.transaction.va.Wd=class extends olympe.dc.transaction.va.Tg{constructor(a,b){super();this.tag=void 0!==b?b:olympe.X.bc();this.model=a;this.F=new Map;this.G=!0;this.F.set(olympe.dc.$b.VERSION,1)}T(){return W(this.tag)}Lb(){return W(this.model)}persist(a){this.G=a;return this}ki(a){this.F.set(olympe.dc.$b.Hd,a);return this}Rx(){this.F.set(olympe.dc.$b.Hd,olympe.dc.Ia.rb)}setProperty(a,b){this.F.set(olympe.dc.za(a),b);return this}hl(a){this.setProperty(olympe.dc.CloudObject.nameProp.T(),a);
496
+ return this}C(a){const b=olympe.dc.La(),c=this.Lb(),d=this.T();if(void 0===c)throw Error('OperationError: Cannot create instance, model tag is undefined');var e=olympe.dc.$b.Hd;if(!this.F.has(e)){var f=b.source(c);this.F.set(e,null!==f?f:olympe.dc.Ia.kc)}if(b.Gb(d)&&!b.$f(d)&&this.G){e=new Map([...b.ed(d,!0),...ye(this,this.F)]);for(const g of e.values())g instanceof olympe.dc.Ec&&!fe(a,g.T())&&(f=new olympe.dc.Transaction,f.xj(g.T()),f.C(a));ge(a,d,this.G,e);a.Va(olympe.dc.CloudObject.modelRel.T(),
497
+ d,c);for(const [g,h,k]of Nd(b,d))fe(a,k)&&(h===olympe.dc.Ca.ORIGIN?a.Va(g,k,d):a.Va(g,d,k))}else b.Gb(d)||(ge(a,d,this.G,ye(this,this.F)),a.Va(olympe.dc.CloudObject.modelRel.T(),d,c))}toString(){return`CreateInstance(${this.Lb()}, ${this.T()})`}};olympe.dc.transaction.va.Wd.prototype.setProperty=olympe.dc.transaction.va.Wd.prototype.setProperty;olympe.dc.transaction.va.Wd.prototype.localSource=olympe.dc.transaction.va.Wd.prototype.Rx;olympe.dc.transaction.va.Wd.prototype.persist=olympe.dc.transaction.va.Wd.prototype.persist;
498
+ olympe.dc.transaction.va.Wd.prototype.getModelTag=olympe.dc.transaction.va.Wd.prototype.Lb;olympe.dc.transaction.va.Wd.prototype.getTag=olympe.dc.transaction.va.Wd.prototype.T;olympe.dc.transaction.va.Wd.ma=[olympe.dc.De];olympe.dc.transaction.va.ro=class extends olympe.dc.transaction.va.Tg{constructor(a,b,c){super();this.type=a.Sa?a:new olympe.dc.Y.Sb(W(a));this.F=b;this.G=c}Sa(){return this.Xa(this.type).Sa()}C(a){const b=W(this.type);if(''===b)throw Error('OperationError: Cannot create relation, type is undefined, null or empty string');if(b===olympe.dc.lc.Vc)throw Error('OperationError: Cannot create the instance -> model relation');const c=W(this.F);if(''===c)throw Error('OperationError: Cannot create relation, origin tag is undefined, null or empty string');
499
+ const d=W(this.G);if(''===d)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.Sa()===olympe.dc.Ca.DESTINATION?a.Va(b,c,d):a.Va(b,d,c)}toString(){return`CreateRelation('${this.Sa()}${W(this.type)}, ${W(this.F)}, ${W(this.G)})`}};olympe.dc.transaction.va.Qz=class extends olympe.dc.transaction.va.Tg{constructor(a,b=olympe.dc.Qb.Cc){super();this.model=a;this.F=b}Lb(){return W(this.model)}C(a){const b=this.Lb();if(void 0===b)throw Error('OperationError: Cannot delete instances of model, model is undefined');const c=olympe.dc.La();for(const d of c.fe(b))d!==b&&(new olympe.dc.transaction.va.Qj(d,this.F)).C(a)}toString(){return`DeleteAllInstances(${this.Lb()}, ${this.F})`}};olympe.dc.transaction.va.$s=class extends olympe.dc.transaction.va.Tg{constructor(a,b,c,d){super();this.F=a.Sa?a:new olympe.dc.Y.Sb(W(a));this.G=b;this.K=c||!1;this.P=d instanceof Array?d.map(e=>W(e)):null}Sa(){return this.Xa(this.F).Sa()}C(a){const b=W(this.F);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.lc.Vc)throw Error('OperationError: Cannot delete the instance -> model relation');const c=W(this.G);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');
500
+ var d=olympe.dc.La();const e=this.Sa(),f=this.P;d=d.tb(c,this.F);for(const g of d)e===olympe.dc.Ca.DESTINATION?a.hc(b,c,g):a.hc(b,g,c),null!==f&&0<=f.indexOf(g)||this.K&&(new olympe.dc.transaction.va.Qj(g,olympe.dc.Qb.Cc)).C(a)}toString(){return`DeleteAllRelations(${this.Sa()}${W(this.F)}, ${W(this.G)}, ${this.K})`}};olympe.dc.transaction.va.Qj=class extends olympe.dc.transaction.va.Tg{constructor(a,b=olympe.dc.Qb.Cc){super();this.tag=a;this.F=b}T(){return W(this.tag)}C(a){const b=olympe.dc.La(),c=this.T();if(void 0===c)throw Error('OperationError: Cannot delete instance, tag is undefined');const d=b.model(c);0<=b.version(c)&&d&&a.Fc(c,this.F)}toString(){return'DeleteInstance('+this.T()+', '+this.F+')'}};olympe.dc.transaction.va.at=class extends olympe.dc.transaction.va.ro{constructor(a,b,c,d=!1){super(a,b,c);this.K=d}C(a){const b=W(this.type);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.lc.Vc)throw Error('OperationError: Cannot delete the instance -> model relation');const c=W(this.F);if(void 0===c)throw Error('OperationError: Cannot delete relation, left tag is undefined');const d=W(this.G);if(void 0===d)throw Error('OperationError: Cannot delete relation, right tag is undefined');
501
+ this.Sa()===olympe.dc.Ca.DESTINATION?a.hc(b,c,d):a.hc(b,d,c);this.K&&(new olympe.dc.transaction.va.Qj(d,olympe.dc.Qb.Cc)).C(a)}toString(){return'DeleteRelation('+this.Sa()+W(this.type)+', '+W(this.F)+', '+W(this.G)+', '+this.K+')'}};olympe.dc.transaction.va.Xi=class extends olympe.dc.transaction.va.Tg{constructor(a,b,c){super();this.tag=a;this.F=new Map;this.F.set(olympe.dc.$b.VERSION,-1);void 0!==b&&this.setProperty(b,c)}T(){return W(this.tag)}setProperty(a,b){this.F.set(W(a),b);return this}C(a){const b=this.T();if(void 0===b)throw Error('OperationError: Cannot update instance, tag is undefined');const c=olympe.dc.La();var d=c.version(b),e=a.versions.get(b);e=void 0!==e?e:d;if(null===e)throw Error('OperationError: Instance #'+
502
+ b+' not found so it cannot be updated');d=ye(this,this.F);0>=d.get(olympe.dc.$b.VERSION)&&d.set(olympe.dc.$b.VERSION,e+1);for(const [f,g]of d)e=c.eb(b,f),e instanceof olympe.dc.Ec&&a.Fc(e.T(),olympe.dc.Qb.Cc),g instanceof olympe.dc.Ec&&!fe(a,g.T())&&(e=new olympe.dc.Transaction,e.xj(g.T()),e.C(a));a.qc(b,d)}toString(){return'UpdateInstance('+this.T()+', '+ye(this,this.F)+')'}};olympe.dc.transaction.va.Xi.prototype.setProperty=olympe.dc.transaction.va.Xi.prototype.setProperty;
503
+ olympe.dc.transaction.va.Xi.prototype.getTag=olympe.dc.transaction.va.Xi.prototype.T;olympe.dc.ea={};olympe.dc.De=class{T(){}};olympe.dc.De.prototype.getTag=olympe.dc.De.prototype.T;olympe.dc.DA=olympe.dc.De;olympe.dc.ea.jk={ASC:'ASC',DESC:'DESC'};function ze(a){switch(a.pr){case 1:const c=a.v;switch(a.t){case 1:var b=c;break;case 2:b=new Date(c);break;case 3:b=olympe.dc.CloudObject.get(c);break;case 4:b=new olympe.D.Color(c.r,c.g,c.b,c.a)}return new olympe.dc.ea.W.Gc(a.p,b,olympe.dc.La());case 2:return new olympe.dc.ea.W.Uc(a.p,a.s,olympe.dc.La(),a.c);case 3:return new olympe.dc.ea.W.Gh(a.p,a.b,a.l,a.s);case 4:return new olympe.dc.ea.W.ld(ze(a.v));case 5:return new olympe.dc.ea.W.vd(a.p,new RegExp(a.r),olympe.dc.La(),a.c);case 6:b=new olympe.dc.ea.W.He(a.d);
504
+ for(const [d,e,f]of a.r)a=new olympe.dc.query.Relation(d,e,f),f?b.Mk(a):b.ub(a);return b;case 7:return new olympe.dc.ea.W.ae(...a.p.map(d=>ze(d)));case 8:return new olympe.dc.ea.W.Td(...a.p.map(d=>ze(d)));default:return null}}
505
+ olympe.dc.ea.cb=class{observe(){}kb(){}clear(){}ka(){}toString(){}static nb(a,b){return new olympe.dc.ea.W.Gc(a,b,olympe.dc.La())}static contains(a,b,c=!1){return new olympe.dc.ea.W.Uc(a,b,olympe.dc.La(),c)}static hs(a,b,c=!0){return new olympe.dc.ea.W.vd(a,b,olympe.dc.La(),c)}static Sk(a,b,c=!0){return new olympe.dc.ea.W.Gh(a,b,!1,c)}static Bj(a,b,c=!0){return new olympe.dc.ea.W.Gh(a,b,!0,c)}static and(...a){return new olympe.dc.ea.W.Td(...a)}static or(...a){return new olympe.dc.ea.W.ae(...a)}static not(a){return new olympe.dc.ea.W.ld(a)}};
506
+ olympe.dc.ea.cb.not=olympe.dc.ea.cb.not;olympe.dc.ea.cb.or=olympe.dc.ea.cb.or;olympe.dc.ea.cb.and=olympe.dc.ea.cb.and;olympe.dc.ea.cb.smallerThan=olympe.dc.ea.cb.Bj;olympe.dc.ea.cb.greaterThan=olympe.dc.ea.cb.Sk;olympe.dc.ea.cb.regex=olympe.dc.ea.cb.hs;olympe.dc.ea.cb.contains=olympe.dc.ea.cb.contains;olympe.dc.ea.cb.equals=olympe.dc.ea.cb.nb;function Ae(a,b){return new olympe.dc.hb(a.G,a.source,b,a.F,{max:a.max,offset:a.offset})}function Be(a){return a.C.filter(b=>b instanceof olympe.dc.ea.Ib.lf||b instanceof olympe.dc.ea.Ib.mf).length}
507
+ function Ce(a){const b=olympe.dc.ea.Ib.Qh,c=olympe.dc.ea.Ib.lf,d=olympe.dc.ea.Ib.mf,e=0===a.F.size?a.Ff():a;let f=-1,g=0;for(const h of a.C)h instanceof b&&(f=g),(h instanceof c||h instanceof d)&&g++;if(0<=f&&!e.F.has(f))throw Error('AndReturn was not called for the current level before sortBy operator');return e}
508
+ function De(a,b){const c=olympe.dc.Cd.SUBSCRIBE,d=olympe.dc.Cd.Pi,e=new olympe.dc.nf(a.G,b?c:d);for(const f of a.C)f instanceof olympe.dc.ea.Ib.lf?e.ub(f.Qd()):f instanceof olympe.dc.ea.Ib.mf?e.ub(f.Qd(),!0):f instanceof olympe.dc.ea.Ib.rc&&(a=f.C,a instanceof olympe.dc.ea.W.He&&(a=a.gd(),a.forEach(g=>e.ub(g)),Ee(e,a.length)));return e}function Fe(a){return a.source||a.db.source(a.G)||olympe.dc.Ia.kc}
509
509
  function Ge(a){return new olympe.dc.hb(a.r,a.s,a.qp.map(b=>He(b)),new Set(a.lv),{max:a.lp.m,offset:a.lp.o})}
510
- olympe.dc.hb=class{constructor(a,b=null,c=[],d=new Set,e={max:-1,offset:0}){this.db=olympe.dc.La();this.G=olympe.dc.za(a);this.source=b;this.C=c;this.F=d;this.max=-1===e.max?-1:e.max;this.offset=e.offset;this.id=null}static from(a,b){return new olympe.dc.hb(a,b)}static Tk(a,b=olympe.dc.Ia.lc){return(new olympe.dc.hb(a,b)).ub(olympe.dc.CloudObject.instancesRel)}ub(a){const b=Array.from(this.C);b.push(new olympe.dc.ea.Ib.mf(this.db,a));return Ae(this,b)}an(a,b=!1){const c=Array.from(this.C);c.push(new olympe.dc.ea.Ib.nf(this.db,
511
- a,b));return Ae(this,c)}Hf(){this.F.add(Be(this));return new olympe.dc.hb(this.G,this.source,this.C,this.F,{max:this.max,offset:this.offset})}filter(a){const b=Array.from(this.C);b.push(new olympe.dc.ea.Ib.tc(a));return Ae(this,b)}cj(){return this}limit(a,b=0){return new olympe.dc.hb(this.G,this.source,this.C,this.F,{max:a,offset:b})}il(a,b=olympe.dc.ea.ik.ASC){const c=Array.from(this.C);c.push(new olympe.dc.ea.Ib.Rh(this.db,a,b));return Ae(this,c)}kb(a){return Ie(olympe.dc.Tf(),Ce(this),'function'===
512
- typeof a.Wa?a.C.C:a)}observe(a){return Je(olympe.dc.Tf(),Ce(this),'function'===typeof a.Wa?a.C.C:a)}Pc(){var a=Ce(this);return olympe.dc.Tf().P.Pc(a)}Z(){null===this.id&&(this.id=olympe.X.pb(this.G+this.C.reduce((a,b)=>a+b.toString(),'')+Array.from(this.F).toString()+this.offset+this.max));return this.id}ka(){return{r:this.G,qp:this.C.map(a=>a.ka()),lv:Array.from(this.F),s:this.source,lp:{m:this.max,o:this.offset}}}};olympe.dc.hb.prototype.executeFromCache=olympe.dc.hb.prototype.Pc;
513
- olympe.dc.hb.prototype.observe=olympe.dc.hb.prototype.observe;olympe.dc.hb.prototype.execute=olympe.dc.hb.prototype.kb;olympe.dc.hb.prototype.sortBy=olympe.dc.hb.prototype.il;olympe.dc.hb.prototype.limit=olympe.dc.hb.prototype.limit;olympe.dc.hb.prototype.cast=olympe.dc.hb.prototype.cj;olympe.dc.hb.prototype.filter=olympe.dc.hb.prototype.filter;olympe.dc.hb.prototype.andReturn=olympe.dc.hb.prototype.Hf;olympe.dc.hb.prototype.followRecursively=olympe.dc.hb.prototype.an;
514
- olympe.dc.hb.prototype.follow=olympe.dc.hb.prototype.ub;olympe.dc.hb.instancesOf=olympe.dc.hb.Tk;olympe.dc.hb.from=olympe.dc.hb.from;function He(a){const b=olympe.dc.La();switch(a.t){case 1:return(a=ze(a.p))?new olympe.dc.ea.Ib.tc(a):null;case 2:return new olympe.dc.ea.Ib.mf(b,new olympe.dc.query.Relation(a.r.t,a.r.d,!1));case 3:var c=a.s;return new olympe.dc.ea.Ib.nf(b,new olympe.dc.query.Relation(a.r.t,a.r.d,!0),c);case 4:return c=a.o,new olympe.dc.ea.Ib.Rh(b,new olympe.dc.ua.Property(a.p),c);default:return null}}olympe.dc.ea.kk=class{ka(){}F(){}kb(){}observe(){}toString(){}};function Ke(a){return a.G.map(b=>a.F.get(a.C[b]))}function Le(a){return a.K.map(b=>{b=b.split('.');return 1===b.length?b[0]:b})}function Me(a){a=Array.from(a.F.values()).flat();return new Set(a.map(b=>b.T()))}function Ne(a){return new Set(a.K.flatMap(b=>b.split('.')))}
515
- function Oe(a,b){var c=olympe.dc.La();if(c.Gb(a)){b.F(a,c.ed(a,!0),0);b.Va(olympe.dc.mc.Vc,a,c.model(a),0);for(const [d,e,f]of Nd(c,a))(c=b.Rf(f))&&c.ue()&&(e===olympe.dc.Ca.DESTINATION?b.Va(d,a,f,0):b.Va(d,f,a,0))}else olympe.ta.Za('Query Result').error(`Fail to serialize instance with tag ${a} not present in local DBView`)}
510
+ olympe.dc.hb=class{constructor(a,b=null,c=[],d=new Set,e={max:-1,offset:0}){this.db=olympe.dc.La();this.G=olympe.dc.za(a);this.source=b;this.C=c;this.F=d;this.max=-1===e.max?-1:e.max;this.offset=e.offset;this.id=null}static from(a,b){return new olympe.dc.hb(a,b)}static Uk(a,b=olympe.dc.Ia.kc){return(new olympe.dc.hb(a,b)).ub(olympe.dc.CloudObject.instancesRel)}ub(a){const b=Array.from(this.C);b.push(new olympe.dc.ea.Ib.lf(this.db,a));return Ae(this,b)}bn(a,b=!1){const c=Array.from(this.C);c.push(new olympe.dc.ea.Ib.mf(this.db,
511
+ a,b));return Ae(this,c)}Ff(){this.F.add(Be(this));return new olympe.dc.hb(this.G,this.source,this.C,this.F,{max:this.max,offset:this.offset})}filter(a){const b=Array.from(this.C);b.push(new olympe.dc.ea.Ib.rc(a));return Ae(this,b)}dj(){return this}limit(a,b=0){return new olympe.dc.hb(this.G,this.source,this.C,this.F,{max:a,offset:b})}jl(a,b=olympe.dc.ea.jk.ASC){const c=Array.from(this.C);c.push(new olympe.dc.ea.Ib.Qh(this.db,a,b));return Ae(this,c)}kb(a){return Ie(olympe.dc.Rf(),Ce(this),'function'===
512
+ typeof a.G?a.G():a)}observe(a){return Je(olympe.dc.Rf(),Ce(this),'function'===typeof a.G?a.G():a)}Pc(){var a=Ce(this);return olympe.dc.Rf().P.Pc(a)}Z(){null===this.id&&(this.id=olympe.X.pb(this.G+this.C.reduce((a,b)=>a+b.toString(),'')+Array.from(this.F).toString()+this.offset+this.max));return this.id}ka(){return{r:this.G,qp:this.C.map(a=>a.ka()),lv:Array.from(this.F),s:this.source,lp:{m:this.max,o:this.offset}}}};olympe.dc.hb.prototype.executeFromCache=olympe.dc.hb.prototype.Pc;
513
+ olympe.dc.hb.prototype.observe=olympe.dc.hb.prototype.observe;olympe.dc.hb.prototype.execute=olympe.dc.hb.prototype.kb;olympe.dc.hb.prototype.sortBy=olympe.dc.hb.prototype.jl;olympe.dc.hb.prototype.limit=olympe.dc.hb.prototype.limit;olympe.dc.hb.prototype.cast=olympe.dc.hb.prototype.dj;olympe.dc.hb.prototype.filter=olympe.dc.hb.prototype.filter;olympe.dc.hb.prototype.andReturn=olympe.dc.hb.prototype.Ff;olympe.dc.hb.prototype.followRecursively=olympe.dc.hb.prototype.bn;
514
+ olympe.dc.hb.prototype.follow=olympe.dc.hb.prototype.ub;olympe.dc.hb.instancesOf=olympe.dc.hb.Uk;olympe.dc.hb.from=olympe.dc.hb.from;function He(a){const b=olympe.dc.La();switch(a.t){case 1:return(a=ze(a.p))?new olympe.dc.ea.Ib.rc(a):null;case 2:return new olympe.dc.ea.Ib.lf(b,new olympe.dc.query.Relation(a.r.t,a.r.d,!1));case 3:var c=a.s;return new olympe.dc.ea.Ib.mf(b,new olympe.dc.query.Relation(a.r.t,a.r.d,!0),c);case 4:return c=a.o,new olympe.dc.ea.Ib.Qh(b,new olympe.dc.ua.Property(a.p),c);default:return null}}olympe.dc.ea.lk=class{ka(){}F(){}kb(){}observe(){}toString(){}};function Ke(a){return a.G.map(b=>a.F.get(a.C[b]))}function Le(a){return a.K.map(b=>{b=b.split('.');return 1===b.length?b[0]:b})}function Me(a){a=Array.from(a.F.values()).flat();return new Set(a.map(b=>b.T()))}function Ne(a){return new Set(a.K.flatMap(b=>b.split('.')))}
515
+ function Oe(a,b){var c=olympe.dc.La();if(c.Gb(a)){b.F(a,c.ed(a,!0),0);b.Va(olympe.dc.lc.Vc,a,c.model(a),0);for(const [d,e,f]of Nd(c,a))(c=b.Pf(f))&&c.ue()&&(e===olympe.dc.Ca.DESTINATION?b.Va(d,a,f,0):b.Va(d,f,a,0))}else olympe.ta.Za('Query Result').error(`Fail to serialize instance with tag ${a} not present in local DBView`)}
516
516
  function Pe(a,b,c=olympe.dc.Ia.Lc){b&&b((new olympe.dc.X.Oi(c)).C(a.p||[]));const d=olympe.dc.La();let e=!1;b=a.k.map(f=>{const g=f.split('.').map(h=>d.Gb(h)?olympe.dc.CloudObject.get(h):(olympe.ta.Za('QueryResult').error(`CloudObject with tag ${h} not present but required for deserialization`),e=!0,null));return[f,1===g.length?g[0]:g]});return e?null:olympe.dc.Ya.create(b,a.a,a.r)}
517
- olympe.dc.Ya=class{constructor(){this.C=[];this.F=new Map;this.G=[];this.K=[];this.hash=''}static empty(){return new olympe.dc.Ya}[Symbol.iterator](){let a=0;return{next:()=>{var b={done:!0};a<this.C.length&&(b=this.C[a],b={value:[b,this.F.get(b)],done:!1},a++);return b}}}entries(){return this.C.map(a=>[a,this.F.get(a)])}values(){return this.F.values()}keys(){return this.C.values()}ff(){return this.C.map(a=>this.F.get(a))}size(){return this.C.length}has(a){return this.F.has(a)||this.ff().includes(a)}indexOf(a){return null===
518
- a||void 0===a?-1:'string'===typeof a?this.C.indexOf(a):this.ff().indexOf(a)}get(a){return(a=this.F.get(a))?a:null}Rc(){return this.te(0)}te(a){return a<this.C.length?this.F.get(this.C[a]):null}push(...a){const b=this.ff();b.push(...a);return b}pop(){if(0===this.C.length)return[];const a=this.ff();a.pop();return a}shift(){if(0<this.C.length){const a=this.ff();a.shift();return a}return[]}filter(a){return this.ff().filter(a)}find(a){return(a=this.ff().find(a))?a:null}forEach(a){this.C.forEach((b,c)=>
519
- a(this.F.get(b),c))}map(a){return this.ff().map(a)}sort(a){const b=this.entries().sort((c,d)=>a(c[1],d[1]));return olympe.dc.Ya.create(b,Array.from(this.G),Array.from(this.K))}reduce(a,b){return this.ff().reduce(a,b)}concat(...a){const b=[this.entries(),...a.map(d=>d.entries())].flat();let c=Array.from(this.G);for(const d of a)c=c.concat(d.G.map(e=>e+c.length));a=this.K.concat(...a.map(d=>d.K));return olympe.dc.Ya.create(b,c,a)}static from(a,b){const c=olympe.dc.La();var d=Qe(b);if(b.Kd){const {lb:k,
520
- order:l,Kd:n,Tv:p}=b.Kd,q=Array.from(b.G).sort().indexOf(p),r=l===olympe.dc.ea.ik.ASC?1:-1;d.sort((t,u)=>{u=u[q];t=c.fb(t[q],k);u=c.fb(u,k);return null===t?-r:null===u?r:r*n(t,u)})}else d.sort((k,l)=>k.reduce((n,p,q)=>n||p.localeCompare(l[q]),0));0<b.offset&&(d=d.slice(b.offset));-1<b.max&&(d=d.slice(0,b.max));b=olympe.X.pb(d.flat().join(''));if(b===a.hash)return a;d=d.map(k=>[k.join('.'),1===k.length?olympe.dc.CloudObject.get(k[0]):k.map(l=>olympe.dc.CloudObject.get(l))]);const e=new Set(d.map(k=>
517
+ olympe.dc.Ya=class{constructor(){this.C=[];this.F=new Map;this.G=[];this.K=[];this.hash=''}static empty(){return new olympe.dc.Ya}[Symbol.iterator](){let a=0;return{next:()=>{var b={done:!0};a<this.C.length&&(b=this.C[a],b={value:[b,this.F.get(b)],done:!1},a++);return b}}}entries(){return this.C.map(a=>[a,this.F.get(a)])}values(){return this.F.values()}keys(){return this.C.values()}ef(){return this.C.map(a=>this.F.get(a))}size(){return this.C.length}has(a){return this.F.has(a)||this.ef().includes(a)}indexOf(a){return null===
518
+ a||void 0===a?-1:'string'===typeof a?this.C.indexOf(a):this.ef().indexOf(a)}get(a){return(a=this.F.get(a))?a:null}Rc(){return this.te(0)}te(a){return a<this.C.length?this.F.get(this.C[a]):null}push(...a){const b=this.ef();b.push(...a);return b}pop(){if(0===this.C.length)return[];const a=this.ef();a.pop();return a}shift(){if(0<this.C.length){const a=this.ef();a.shift();return a}return[]}filter(a){return this.ef().filter(a)}find(a){return(a=this.ef().find(a))?a:null}forEach(a){this.C.forEach((b,c)=>
519
+ a(this.F.get(b),c))}map(a){return this.ef().map(a)}sort(a){const b=this.entries().sort((c,d)=>a(c[1],d[1]));return olympe.dc.Ya.create(b,Array.from(this.G),Array.from(this.K))}reduce(a,b){return this.ef().reduce(a,b)}concat(...a){const b=[this.entries(),...a.map(d=>d.entries())].flat();let c=Array.from(this.G);for(const d of a)c=c.concat(d.G.map(e=>e+c.length));a=this.K.concat(...a.map(d=>d.K));return olympe.dc.Ya.create(b,c,a)}static from(a,b){const c=olympe.dc.La();var d=Qe(b);if(b.Jd){const {lb:k,
520
+ order:l,Jd:n,Uv:p}=b.Jd,q=Array.from(b.G).sort().indexOf(p),r=l===olympe.dc.ea.jk.ASC?1:-1;d.sort((t,u)=>{u=u[q];t=c.eb(t[q],k);u=c.eb(u,k);return null===t?-r:null===u?r:r*n(t,u)})}else d.sort((k,l)=>k.reduce((n,p,q)=>n||p.localeCompare(l[q]),0));0<b.offset&&(d=d.slice(b.offset));-1<b.max&&(d=d.slice(0,b.max));b=olympe.X.pb(d.flat().join(''));if(b===a.hash)return a;d=d.map(k=>[k.join('.'),1===k.length?olympe.dc.CloudObject.get(k[0]):k.map(l=>olympe.dc.CloudObject.get(l))]);const e=new Set(d.map(k=>
521
521
  k[0])),f=new Set(a.keys()),g=[],h=[];d.forEach(([k],l)=>{!f.has(k)&&g.push(l)});f.forEach(k=>{!e.has(k)&&h.push(k)});return olympe.dc.Ya.create(d,g,h,b)}static create(a,b,c,d){const e=new olympe.dc.Ya;e.C=a.map(f=>f[0]);e.F=new Map(a);e.hash=d||olympe.X.pb(e.C.join(''));e.G=b||e.C.map((f,g)=>g);e.K=c||[];return e}ka(){const a=new olympe.dc.db.xc;var b=new Set(this.G.flatMap(c=>this.C[c].split('.')));for(const c of b)Oe(c,a);b=new olympe.dc.transaction.ud;a.Oc(b);return{k:this.C,p:me(b),a:this.G,r:this.K}}};
522
522
  olympe.dc.Ya.prototype.concat=olympe.dc.Ya.prototype.concat;olympe.dc.Ya.prototype.reduce=olympe.dc.Ya.prototype.reduce;olympe.dc.Ya.prototype.sort=olympe.dc.Ya.prototype.sort;olympe.dc.Ya.prototype.map=olympe.dc.Ya.prototype.map;olympe.dc.Ya.prototype.forEach=olympe.dc.Ya.prototype.forEach;olympe.dc.Ya.prototype.find=olympe.dc.Ya.prototype.find;olympe.dc.Ya.prototype.filter=olympe.dc.Ya.prototype.filter;olympe.dc.Ya.prototype.shift=olympe.dc.Ya.prototype.shift;olympe.dc.Ya.prototype.pop=olympe.dc.Ya.prototype.pop;
523
- olympe.dc.Ya.prototype.push=olympe.dc.Ya.prototype.push;olympe.dc.Ya.prototype.getAt=olympe.dc.Ya.prototype.te;olympe.dc.Ya.prototype.getFirst=olympe.dc.Ya.prototype.Rc;olympe.dc.Ya.prototype.get=olympe.dc.Ya.prototype.get;olympe.dc.Ya.prototype.indexOf=olympe.dc.Ya.prototype.indexOf;olympe.dc.Ya.prototype.has=olympe.dc.Ya.prototype.has;olympe.dc.Ya.prototype.size=olympe.dc.Ya.prototype.size;olympe.dc.Ya.prototype.toArray=olympe.dc.Ya.prototype.ff;olympe.dc.Ya.prototype.keys=olympe.dc.Ya.prototype.keys;
524
- olympe.dc.Ya.prototype.values=olympe.dc.Ya.prototype.values;olympe.dc.Ya.prototype.entries=olympe.dc.Ya.prototype.entries;olympe.dc.Ya.empty=olympe.dc.Ya.empty;function Qe(a){var b=new Set(X(a,a.Hg()-1).keys());a.C.push((new Map).set('sink',b));b=[];for(const c of Re(a,'sink',a.Hg()-1,''))b.push(c.slice(0,-1).split(';'));a.C.pop();return b}function Se(a,b,c,d,e){a.Kd={Kd:b,Tv:c,order:d,lb:e}}function Te(a){a.F||(a.F=!0)}function X(a,b){return b>=a.Hg()?new Map:a.C[b]}
523
+ olympe.dc.Ya.prototype.push=olympe.dc.Ya.prototype.push;olympe.dc.Ya.prototype.getAt=olympe.dc.Ya.prototype.te;olympe.dc.Ya.prototype.getFirst=olympe.dc.Ya.prototype.Rc;olympe.dc.Ya.prototype.get=olympe.dc.Ya.prototype.get;olympe.dc.Ya.prototype.indexOf=olympe.dc.Ya.prototype.indexOf;olympe.dc.Ya.prototype.has=olympe.dc.Ya.prototype.has;olympe.dc.Ya.prototype.size=olympe.dc.Ya.prototype.size;olympe.dc.Ya.prototype.toArray=olympe.dc.Ya.prototype.ef;olympe.dc.Ya.prototype.keys=olympe.dc.Ya.prototype.keys;
524
+ olympe.dc.Ya.prototype.values=olympe.dc.Ya.prototype.values;olympe.dc.Ya.prototype.entries=olympe.dc.Ya.prototype.entries;olympe.dc.Ya.empty=olympe.dc.Ya.empty;function Qe(a){var b=new Set(X(a,a.Eg()-1).keys());a.C.push((new Map).set('sink',b));b=[];for(const c of Re(a,'sink',a.Eg()-1,''))b.push(c.slice(0,-1).split(';'));a.C.pop();return b}function Se(a,b,c,d,e){a.Jd={Jd:b,Uv:c,order:d,lb:e}}function Te(a){a.F||(a.F=!0)}function X(a,b){return b>=a.Eg()?new Map:a.C[b]}
525
525
  function Re(a,b,c,d){if(0===c)return a.G.has(c)?(b=Array.from(X(a,0).keys())[0],(new Set).add(`${b};${d}`)):(new Set).add(d);const e=Ue(a,b,c),f=a.G.has(c)?`${b};${d}`:d;return e.reduce((g,h)=>{for(const k of Re(a,h,c-1,f))g.add(k);return g},new Set)}function Ue(a,b,c){return 0===c?null:(a=X(a,c))&&a.has(b)?Array.from(a.get(b)):null}function Ve(a,b,c,d){X(a,c+1).forEach((e,f)=>{e.has(d)&&a.remove(f,c+1,b)});X(a,c).delete(d);Te(a)}
526
- olympe.dc.ea.pq=class{constructor(a){this.C=Array.from({length:Be(a)+1},()=>new Map);this.G=new Set(Array.from(a.F));this.Kd=null;this.F=!1;this.max=a.max;this.offset=a.offset}Hg(){return this.C.length}insert(a,b,c){var d=X(this,b);if(0<b&&(null===c||!X(this,b-1).has(c)))return olympe.ta.Za('dc').error('Try to insert result entry linked to a non existing parent'),null;if(d.has(a)&&null!==c)return a=d.get(a),d=a.size,a.add(c),a.size>d&&Te(this),!1;if(b>=this.Hg())return olympe.ta.Za('dc').error('Try to insert result entry to a higher level than possible'),
527
- null;b=new Set;null!==c&&b.add(c);d.set(a,b);Te(this);return!0}remove(a,b,c){var d=X(this,b);if(!d.has(a))return!0;if(0<b&&(null===c||!X(this,b-1).has(c)))return olympe.ta.Za('dc').error('Try to remove result entry linked to a non existing parent'),null;d=d.get(a);c&&d.delete(c);if(1>d.size)return Ve(this,a,b,a),!0;Te(this);return!1}};olympe.dc.md=class{constructor(a){this.query=a}static from(a){return new olympe.dc.md(olympe.dc.hb.from(a))}ub(a){return new olympe.dc.md(this.query.ub(a))}cj(){return this}kb(a){return this.query.kb(a).then(b=>{const c=b.size();return 1<c?(olympe.ta.Za('dc').warn('a follow() on a QuerySingle has '+c+' results (0 or 1 expected) -> returns null'),null):b.Rc()||null})}Pc(){const a=this.query.Pc(),b=a.size();return 1<b?(olympe.ta.Za('dc').warn('a follow() on a QuerySingle has '+b+' results (0 or 1 expected) -> returns null'),
528
- null):a.Rc()||null}};olympe.dc.md.prototype.executeFromCache=olympe.dc.md.prototype.Pc;olympe.dc.md.prototype.execute=olympe.dc.md.prototype.kb;olympe.dc.md.prototype.cast=olympe.dc.md.prototype.cj;olympe.dc.md.prototype.follow=olympe.dc.md.prototype.ub;olympe.dc.ea.W={};olympe.dc.ea.W.Ud=class{constructor(...a){this.W=a}kb(a){return this.W.reduce((b,c)=>b&&c.kb(a),!0)}observe(a,b,c){const d=this.W.map(()=>!1),e=this.W.map(()=>null),f=(g,h)=>{d[h]=g;g=d.every(k=>k);e[h]!==g&&(e[h]=g,c(g))};this.W.forEach((g,h)=>{g.observe(a,olympe.X.pb('AND-'+b+a+h),k=>f(k,h))})}ka(){return{pr:8,p:this.W.map(a=>a.ka())}}toString(){return'And-'+this.W.reduce((a,b)=>a+'-'+b.toString(),'')}clear(a,b){this.W.forEach((c,d)=>{c.clear(a,olympe.X.pb('AND-'+b+a+d))})}};
529
- olympe.dc.ea.W.Ud.C=8;olympe.dc.ea.W.Ud.ma=[olympe.dc.ea.cb];olympe.dc.ea.W.Uc=class{constructor(a,b,c,d=!1){this.lb=olympe.dc.za(a);this.substring=b;this.db=c;this.C=d}fb(){return this.lb}kb(a){return this.apply(this.db.fb(a,this.lb))}observe(a,b,c){Jd(this.db,a,this.lb,d=>{c(this.apply(d))},olympe.X.pb(b+a+this.toString()))}apply(a){return'string'===typeof a?this.C?a.includes(this.substring):a.toLowerCase().includes(this.substring.toLowerCase()):!1}toString(){return'Contains'+this.lb+'-'+this.substring+'-'+this.C}clear(a,b){this.db.F(a,this.lb,olympe.X.pb(b+
530
- a+this.toString()))}ka(){return{pr:2,p:this.lb,s:this.substring,c:this.C}}};olympe.dc.ea.W.Uc.C=2;olympe.dc.ea.W.Uc.ma=[olympe.dc.ea.cb];olympe.dc.ea.W.Gc=class{constructor(a,b,c){this.lb=olympe.dc.za(a);this.C=b;this.db=c}kb(a){return this.apply(this.db.fb(a,this.lb))}observe(a,b,c){Jd(this.db,a,this.lb,d=>{c(this.apply(d))},olympe.X.pb(b+a+this.toString()))}clear(a,b){this.db.F(a,this.lb,olympe.X.pb(b+a+this.toString()))}apply(a){return'object'===typeof a&&null!==a?a instanceof olympe.dc.CloudObject?a.nb(this.C):a instanceof Date?this.C instanceof Date&&this.C.getTime()===a.getTime():a instanceof olympe.D.Color?a.nb(this.C):!1:a===
531
- this.C}toString(){return'Equals-'+this.lb+'-'+this.C.toString()}fb(){return this.lb}ka(){let a=1,b=this.C;switch(!0){case this.C instanceof Date:a=2;b=this.C.toJSON();break;case this.C instanceof olympe.dc.CloudObject:a=3;b=this.C.T();break;case this.C instanceof olympe.D.Color:a=4,b={r:this.C.Wf().valueOf(),g:this.C.Qf().valueOf(),b:this.C.Lf().valueOf(),a:this.C.Kf().valueOf()}}return{pr:1,p:this.lb,t:a,v:b}}};olympe.dc.ea.W.Gc.C=1;olympe.dc.ea.W.Gc.ma=[olympe.dc.ea.cb];function We(a,b,c){return null===b?!1:null===c?!0:a.G?a.F?b<c:b>c:a.F?b<=c:b>=c}function Xe(a,b){return'number'===typeof a.C?a.C:a.db.fb(b,a.C)}function Ye(a,b,c){return olympe.X.pb(c+b+a.C+a.lb)}
532
- olympe.dc.ea.W.Gh=class{constructor(a,b,c=!0,d=!0){this.db=olympe.dc.La();this.lb=olympe.dc.za(a);this.C='number'===typeof b?b:olympe.dc.za(b);this.F=c;this.G=d}fb(){return this.lb}kb(a){return We(this,this.db.fb(a,this.lb),Xe(this,a))}observe(a,b,c){'string'===typeof this.C&&Jd(this.db,a,this.C,d=>{const e=this.db.fb(a,this.lb);null!==e&&c(We(this,e,d))},Ye(this,a,b));Jd(this.db,a,this.lb,d=>{const e=Xe(this,a);c(null!==e?We(this,d,e):!0)},Ye(this,a,b))}clear(a,b){this.db.F(a,this.lb,Ye(this,a,b));
533
- 'string'===typeof this.C&&this.db.F(a,this.C,Ye(this,a,b))}ka(){return{pr:3,p:this.lb,b:this.C,l:this.F,s:this.G}}toString(){return'GreaterThan-'+this.lb+'-'+this.G+'-'+this.C}};olympe.dc.ea.W.Gh.C=3;olympe.dc.ea.W.Gh.ma=[olympe.dc.ea.cb];olympe.dc.ea.W.ld=class{constructor(a){this.C=a}kb(a){return!this.C.kb(a)}observe(a,b,c){let d=null;this.C.observe(a,olympe.X.pb('NOT'+b+a),e=>{!e!==d&&(d=!e,c(d))})}ka(){return{pr:4,v:this.C.ka()}}toString(){return`NOT-${this.C.toString()}`}clear(a,b){this.C.clear(a,olympe.X.pb('NOT'+b+a))}};olympe.dc.ea.W.ld.C=4;olympe.dc.ea.W.ld.ma=[olympe.dc.ea.cb];olympe.dc.ea.W.be=class{constructor(...a){this.W=a}kb(a){return this.W.reduce((b,c)=>b||c.kb(a),!1)}observe(a,b,c){const d=this.W.map(()=>!1),e=this.W.map(()=>null),f=(g,h)=>{d[h]=g;g=d.some(k=>k);e[h]!==g&&(e[h]=g,c(g))};this.W.forEach((g,h)=>{g.observe(a,olympe.X.pb('OR-'+b+a+h),k=>f(k,h))})}ka(){return{pr:7,p:this.W.map(a=>a.ka())}}toString(){return'And-'+this.W.reduce((a,b)=>a.toString()+'-'+b.toString(),'')}clear(a,b){this.W.forEach((c,d)=>{c.clear(a,olympe.X.pb('OR-'+b+a+d))})}};
534
- olympe.dc.ea.W.be.C=7;olympe.dc.ea.W.be.ma=[olympe.dc.ea.cb];olympe.dc.ea.W.vd=class{constructor(a,b,c,d=!0){this.lb=olympe.dc.za(a);this.C=RegExp('');try{this.C=new RegExp(b)}catch(e){if(!(e instanceof SyntaxError))throw e;}this.db=c;this.F=d}fb(){return this.lb}kb(a){return this.apply(this.db.fb(a,this.lb))}observe(a,b,c){Jd(this.db,a,this.lb,d=>{c(this.apply(d))},olympe.X.pb(b+a+this.toString()))}apply(a){return'string'===typeof a?this.F?this.C.test(a):this.C.test(a.toLowerCase()):!1}toString(){return'Regex'+this.lb+'-'+this.C.toString()+'-'+this.F}ka(){return{pr:5,
535
- p:this.lb,r:this.C.source,c:this.F}}clear(a,b){this.db.F(a,this.lb,olympe.X.pb(b+a+this.toString()))}};olympe.dc.ea.W.vd.C=5;olympe.dc.ea.W.vd.ma=[olympe.dc.ea.cb];olympe.dc.ea.W.He=class{constructor(a){this.db=olympe.dc.La();this.Pa=[];this.recursive=[];this.destination=a?olympe.dc.za(a):null}gd(){return Array.from(this.Pa)}clear(a,b){0<this.Pa.length&&this.db.C(a,this.Pa[0],olympe.X.pb(b+0+a))}ub(a){this.Pa.push(a);this.recursive.push(!1);return this}Lk(a){this.Pa.push(a);this.recursive.push(!0);return this}kb(a){if(1>this.Pa.length)return olympe.ta.Za('dc').error('RelatedTo executed with less than 1 relation'),!1;let b=[];const c=this.destination||'',d=(e,
536
- f,g,h)=>e?f?this.db.Vf(g,h,c):this.db.Vf(g,h):this.db.tb(g,h);for(let e=0;e<this.Pa.length;++e){const f=this.Pa[e],g=this.recursive[e],h=e===this.Pa.length-1;if(0===e)b=d(g,h,a,f);else if(b=b.flatMap(k=>d(g,h,k,f)),0===b.length)return!1}return c?b.includes(c):0<b.length}observe(a,b,c){const d=this.Pa.length;let e=0;const f=new Set,g=(k,l)=>{this.destination&&this.destination!==l||(e+=k?1:-1,1<e||c(0<e))},h=(k,l,n,p)=>{const q=this.Pa[k],r=this.recursive[k-1]?this.Pa[k-1]:null;l=olympe.X.pb(l+k+p);
537
- const t=olympe.X.pb(l+'rec');k===d?g(n,p):n?f.has(p)||(f.add(p),V(this.db,p,q,h.bind(this,k+1,l),l),r&&V(this.db,p,r,h.bind(this,k,t),t)):(f.delete(p),this.db.C(p,q,l),r&&this.db.C(p,r,t))};h(0,b,!0,a);0===e&&c(!1)}ka(){return{pr:6,r:this.Pa.map((a,b)=>[a.T(),a.Sa(),this.recursive[b]]),d:this.destination}}toString(){const a=this.Pa.reduce((b,c,d)=>b+c.T()+this.recursive[d],'');return`RelatedTo-${this.destination}-${a}`}};olympe.dc.ea.W.He.prototype.followRecursive=olympe.dc.ea.W.He.prototype.Lk;
538
- olympe.dc.ea.W.He.prototype.follow=olympe.dc.ea.W.He.prototype.ub;olympe.dc.ea.W.He.C=6;olympe.dc.ea.W.He.ma=[olympe.dc.ea.cb];olympe.dc.ea.Ib={};olympe.dc.ea.Ib.tc=class{constructor(a){this.C=a}F(a){return a}kb(a,b){for(const c of X(a,b).keys())this.C.kb(c)||(0===b?a.remove(c,b,null):Ue(a,c,b).forEach(d=>{a.remove(c,b,d)}))}observe(a,b,c){let d=!1;return(e,f,g,h)=>{const k=olympe.X.pb(h+f+this.toString());e?this.C.observe(f,k,l=>{d||(l?a.insert(f,b,g):a.remove(f,b,g),c(l,f,g,k))}):(d=!0,this.C.clear(f,k),d=!1,c(!1,f,g,k))}}ka(){return{t:1,p:this.C.ka()}}toString(){return'filterQueryPart-'+this.C.toString()}};olympe.dc.ea.Ib.tc.C=1;
539
- olympe.dc.ea.Ib.tc.ma=[olympe.dc.ea.kk];olympe.dc.ea.Ib.mf=class{constructor(a,b){this.db=a;this.C=b}Rd(){return this.C}F(a){return a+1}kb(a,b){for(const c of X(a,b).keys())this.db.tb(c,this.C).forEach(d=>{a.insert(d,b+1,c)})}observe(a,b,c){return(d,e,f,g)=>{const h=olympe.X.pb(g+e+this.toString());d?V(this.db,e,this.C,(k,l)=>{(k?a.insert(l,b+1,e):a.remove(l,b+1,e))&&c(k,l,e,h)},h):this.db.C(e,this.C,h)}}ka(){return{t:2,r:{t:this.C.T(),d:this.C.Sa()}}}toString(){return'followQueryPart-'+this.C.Sa()+this.C.T()}};olympe.dc.ea.Ib.mf.C=2;
540
- olympe.dc.ea.Ib.mf.ma=[olympe.dc.ea.kk];olympe.dc.ea.Ib.nf=class{constructor(a,b,c=!1){this.db=a;this.C=b;this.G=c}Rd(){return this.C}F(a){return a+1}kb(a,b){for(const c of X(a,b).keys())this.G&&a.insert(c,b+1,c),this.db.Vf(c,this.C).forEach(d=>{a.insert(d,b+1,c)})}observe(a,b,c){const d=(g,h,k,l)=>olympe.X.pb(g+h+k+l+this.toString()),e=new Set,f=(g,h,k,l,n)=>{h=d(h,g,n,k);(this.G||0<k)&&(l?a.insert(n,b+1,g):a.remove(n,b+1,g))&&c(l,n,g,h);l?e.has(n)||(e.add(n),V(this.db,n,this.C,f.bind(this,g,h,k+1),h)):(e.delete(n),this.db.C(n,this.C,
541
- h))};return(g,h,k,l)=>f(h,l,0,g,h)}ka(){return{t:3,s:this.G,r:{t:this.C.T(),d:this.C.Sa()}}}toString(){return'followRecursivelyQueryPart-'+this.C.Sa()+this.C.T()}};olympe.dc.ea.Ib.nf.C=3;olympe.dc.ea.Ib.nf.ma=[olympe.dc.ea.kk];function Ze(a){a=a.db.jc(a.lb,olympe.dm.Property.typeRel);const b=olympe.dc.za;if(a===b(olympe.dm.String))return $e((c,d)=>c.localeCompare(d));if(a===b(olympe.dm.Number)||a===b(olympe.dm.Boolean))return $e((c,d)=>c-d);if(a===b(olympe.dm.DateTime))return $e((c,d)=>c.getTime()-d.getTime());olympe.ta.Za('dc').warn(`No comparator found for type with tag ${a}`);return $e(()=>-1)}function $e(a){return(b,c)=>{const d=null===b,e=null===c;return d||e?d&&e?0:d?1:-1:a(b,c)}}
542
- olympe.dc.ea.Ib.Rh=class{constructor(a,b,c){this.db=a;this.lb=b;this.order=c}F(a){return a}kb(a,b){Se(a,Ze(this),b,this.order,this.lb)}observe(a,b,c){Se(a,Ze(this),b,this.order,this.lb);return(d,e,f,g)=>{g=olympe.X.pb(g+this.toString());d?Jd(this.db,e,this.lb,()=>{Te(a)},g):this.db.F(e,this.lb,g);c(d,e,f,g)}}ka(){return{t:4,p:this.lb.T(),o:this.order}}toString(){return'sortByQueryPart-'+this.order+this.lb.T()}fb(){return this.lb}};olympe.dc.ea.Ib.Rh.C=4;olympe.dc.ea.Ib.Rh.ma=[olympe.dc.ea.kk];olympe.dc.query={};function af(a,b,c,d){let e=a.C.get(b);void 0===e&&(e=new Set,a.C.set(b,e));a=olympe.X.bc();e.add(a);d.set(a,c)}function bf(a,b,c){af(a,b,c,a.F)}function cf(a,b,c){if(a.C.has(b)){for(const d of a.C.get(b))c.delete(d);a.C.delete(b)}}function df(a,b,c,d,e){if(a.C.has(b)){if(!a.K.has(b)){a.K.add(b);for(const f of a.C.get(b))e=d.get(f),d.delete(f),c instanceof olympe.dc.query.errors.Wj?e(Error(c.la()),c):'string'===typeof c?e(Error(c),null):e(null,c);a.C.delete(b);a.K.delete(b)}}else a.N.warn(e)}
543
- function ef(a,b,c){df(a,b,c,a.F,`Graph result of graphdef ${b} has no associated handler in the datacloud`)}function ff(a,b,c){af(a,b,c,a.G)}olympe.dc.query.Ls=class{constructor(a){this.N=a;this.C=new Map;this.F=new Map;this.G=new Map;this.K=new Set}};olympe.dc.Ne=class{na(){}K(){}G(){}P(){}ka(){}toString(){}};olympe.dc.Dd={SUBSCRIBE:0,Pi:1,om:2,FB:0,GET:1};olympe.dc.Dd.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Dd))if(c===a)return b;return null};function Ee(a,b=1){a.validate(olympe.dc.Qb.NONE,'back');let c=a.V;for(let d=0;d<b&&null!==c;d++)c=a.F.get(c.G)||null;a.V=c}function gf(a){return'not_defined'===a.C?olympe.dc.Qb.NONE:a.C}function hf(a,b){a.validate(b,'activateFollowRules');return a}function jf(a){return'not_defined'!==a.C&&a.C!==olympe.dc.Qb.NONE}
526
+ olympe.dc.ea.qq=class{constructor(a){this.C=Array.from({length:Be(a)+1},()=>new Map);this.G=new Set(Array.from(a.F));this.Jd=null;this.F=!1;this.max=a.max;this.offset=a.offset}Eg(){return this.C.length}insert(a,b,c){var d=X(this,b);if(0<b&&(null===c||!X(this,b-1).has(c)))return olympe.ta.Za('dc').error('Try to insert result entry linked to a non existing parent'),null;if(d.has(a)&&null!==c)return a=d.get(a),d=a.size,a.add(c),a.size>d&&Te(this),!1;if(b>=this.Eg())return olympe.ta.Za('dc').error('Try to insert result entry to a higher level than possible'),
527
+ null;b=new Set;null!==c&&b.add(c);d.set(a,b);Te(this);return!0}remove(a,b,c){var d=X(this,b);if(!d.has(a))return!0;if(0<b&&(null===c||!X(this,b-1).has(c)))return olympe.ta.Za('dc').error('Try to remove result entry linked to a non existing parent'),null;d=d.get(a);c&&d.delete(c);if(1>d.size)return Ve(this,a,b,a),!0;Te(this);return!1}};olympe.dc.md=class{constructor(a){this.query=a}static from(a){return new olympe.dc.md(olympe.dc.hb.from(a))}ub(a){return new olympe.dc.md(this.query.ub(a))}dj(){return this}kb(a){return this.query.kb(a).then(b=>{const c=b.size();return 1<c?(olympe.ta.Za('dc').warn('a follow() on a QuerySingle has '+c+' results (0 or 1 expected) -> returns null'),null):b.Rc()||null})}Pc(){const a=this.query.Pc(),b=a.size();return 1<b?(olympe.ta.Za('dc').warn('a follow() on a QuerySingle has '+b+' results (0 or 1 expected) -> returns null'),
528
+ null):a.Rc()||null}};olympe.dc.md.prototype.executeFromCache=olympe.dc.md.prototype.Pc;olympe.dc.md.prototype.execute=olympe.dc.md.prototype.kb;olympe.dc.md.prototype.cast=olympe.dc.md.prototype.dj;olympe.dc.md.prototype.follow=olympe.dc.md.prototype.ub;olympe.dc.ea.W={};olympe.dc.ea.W.Td=class{constructor(...a){this.W=a}kb(a){return this.W.reduce((b,c)=>b&&c.kb(a),!0)}observe(a,b,c){const d=this.W.map(()=>!1),e=this.W.map(()=>null),f=(g,h)=>{d[h]=g;g=d.every(k=>k);e[h]!==g&&(e[h]=g,c(g))};this.W.forEach((g,h)=>{g.observe(a,olympe.X.pb('AND-'+b+a+h),k=>f(k,h))})}ka(){return{pr:8,p:this.W.map(a=>a.ka())}}toString(){return'And-'+this.W.reduce((a,b)=>a+'-'+b.toString(),'')}clear(a,b){this.W.forEach((c,d)=>{c.clear(a,olympe.X.pb('AND-'+b+a+d))})}};
529
+ olympe.dc.ea.W.Td.C=8;olympe.dc.ea.W.Td.ma=[olympe.dc.ea.cb];olympe.dc.ea.W.Uc=class{constructor(a,b,c,d=!1){this.lb=olympe.dc.za(a);this.substring=b;this.db=c;this.C=d}eb(){return this.lb}kb(a){return this.apply(this.db.eb(a,this.lb))}observe(a,b,c){Jd(this.db,a,this.lb,d=>{c(this.apply(d))},olympe.X.pb(b+a+this.toString()))}apply(a){return'string'===typeof a?this.C?a.includes(this.substring):a.toLowerCase().includes(this.substring.toLowerCase()):!1}toString(){return'Contains'+this.lb+'-'+this.substring+'-'+this.C}clear(a,b){this.db.F(a,this.lb,olympe.X.pb(b+
530
+ a+this.toString()))}ka(){return{pr:2,p:this.lb,s:this.substring,c:this.C}}};olympe.dc.ea.W.Uc.C=2;olympe.dc.ea.W.Uc.ma=[olympe.dc.ea.cb];olympe.dc.ea.W.Gc=class{constructor(a,b,c){this.lb=olympe.dc.za(a);this.C=b;this.db=c}kb(a){return this.apply(this.db.eb(a,this.lb))}observe(a,b,c){Jd(this.db,a,this.lb,d=>{c(this.apply(d))},olympe.X.pb(b+a+this.toString()))}clear(a,b){this.db.F(a,this.lb,olympe.X.pb(b+a+this.toString()))}apply(a){return'object'===typeof a&&null!==a?a instanceof olympe.dc.CloudObject?a.nb(this.C):a instanceof Date?this.C instanceof Date&&this.C.getTime()===a.getTime():a instanceof olympe.D.Color?a.nb(this.C):!1:a===
531
+ this.C}toString(){return'Equals-'+this.lb+'-'+this.C.toString()}eb(){return this.lb}ka(){let a=1,b=this.C;switch(!0){case this.C instanceof Date:a=2;b=this.C.toJSON();break;case this.C instanceof olympe.dc.CloudObject:a=3;b=this.C.T();break;case this.C instanceof olympe.D.Color:a=4,b={r:this.C.Uf().valueOf(),g:this.C.Of().valueOf(),b:this.C.Jf().valueOf(),a:this.C.If().valueOf()}}return{pr:1,p:this.lb,t:a,v:b}}};olympe.dc.ea.W.Gc.C=1;olympe.dc.ea.W.Gc.ma=[olympe.dc.ea.cb];function We(a,b,c){return null===b?!1:null===c?!0:a.G?a.F?b<c:b>c:a.F?b<=c:b>=c}function Xe(a,b){return'number'===typeof a.C?a.C:a.db.eb(b,a.C)}function Ye(a,b,c){return olympe.X.pb(c+b+a.C+a.lb)}
532
+ olympe.dc.ea.W.Gh=class{constructor(a,b,c=!0,d=!0){this.db=olympe.dc.La();this.lb=olympe.dc.za(a);this.C='number'===typeof b?b:olympe.dc.za(b);this.F=c;this.G=d}eb(){return this.lb}kb(a){return We(this,this.db.eb(a,this.lb),Xe(this,a))}observe(a,b,c){'string'===typeof this.C&&Jd(this.db,a,this.C,d=>{const e=this.db.eb(a,this.lb);null!==e&&c(We(this,e,d))},Ye(this,a,b));Jd(this.db,a,this.lb,d=>{const e=Xe(this,a);c(null!==e?We(this,d,e):!0)},Ye(this,a,b))}clear(a,b){this.db.F(a,this.lb,Ye(this,a,b));
533
+ 'string'===typeof this.C&&this.db.F(a,this.C,Ye(this,a,b))}ka(){return{pr:3,p:this.lb,b:this.C,l:this.F,s:this.G}}toString(){return'GreaterThan-'+this.lb+'-'+this.G+'-'+this.C}};olympe.dc.ea.W.Gh.C=3;olympe.dc.ea.W.Gh.ma=[olympe.dc.ea.cb];olympe.dc.ea.W.ld=class{constructor(a){this.C=a}kb(a){return!this.C.kb(a)}observe(a,b,c){let d=null;this.C.observe(a,olympe.X.pb('NOT'+b+a),e=>{!e!==d&&(d=!e,c(d))})}ka(){return{pr:4,v:this.C.ka()}}toString(){return`NOT-${this.C.toString()}`}clear(a,b){this.C.clear(a,olympe.X.pb('NOT'+b+a))}};olympe.dc.ea.W.ld.C=4;olympe.dc.ea.W.ld.ma=[olympe.dc.ea.cb];olympe.dc.ea.W.ae=class{constructor(...a){this.W=a}kb(a){return this.W.reduce((b,c)=>b||c.kb(a),!1)}observe(a,b,c){const d=this.W.map(()=>!1),e=this.W.map(()=>null),f=(g,h)=>{d[h]=g;g=d.some(k=>k);e[h]!==g&&(e[h]=g,c(g))};this.W.forEach((g,h)=>{g.observe(a,olympe.X.pb('OR-'+b+a+h),k=>f(k,h))})}ka(){return{pr:7,p:this.W.map(a=>a.ka())}}toString(){return'And-'+this.W.reduce((a,b)=>a.toString()+'-'+b.toString(),'')}clear(a,b){this.W.forEach((c,d)=>{c.clear(a,olympe.X.pb('OR-'+b+a+d))})}};
534
+ olympe.dc.ea.W.ae.C=7;olympe.dc.ea.W.ae.ma=[olympe.dc.ea.cb];olympe.dc.ea.W.vd=class{constructor(a,b,c,d=!0){this.lb=olympe.dc.za(a);this.C=RegExp('');try{this.C=new RegExp(b)}catch(e){if(!(e instanceof SyntaxError))throw e;}this.db=c;this.F=d}eb(){return this.lb}kb(a){return this.apply(this.db.eb(a,this.lb))}observe(a,b,c){Jd(this.db,a,this.lb,d=>{c(this.apply(d))},olympe.X.pb(b+a+this.toString()))}apply(a){return'string'===typeof a?this.F?this.C.test(a):this.C.test(a.toLowerCase()):!1}toString(){return'Regex'+this.lb+'-'+this.C.toString()+'-'+this.F}ka(){return{pr:5,
535
+ p:this.lb,r:this.C.source,c:this.F}}clear(a,b){this.db.F(a,this.lb,olympe.X.pb(b+a+this.toString()))}};olympe.dc.ea.W.vd.C=5;olympe.dc.ea.W.vd.ma=[olympe.dc.ea.cb];olympe.dc.ea.W.He=class{constructor(a){this.db=olympe.dc.La();this.Pa=[];this.recursive=[];this.destination=a?olympe.dc.za(a):null}gd(){return Array.from(this.Pa)}clear(a,b){0<this.Pa.length&&this.db.C(a,this.Pa[0],olympe.X.pb(b+0+a))}ub(a){this.Pa.push(a);this.recursive.push(!1);return this}Mk(a){this.Pa.push(a);this.recursive.push(!0);return this}kb(a){if(1>this.Pa.length)return olympe.ta.Za('dc').error('RelatedTo executed with less than 1 relation'),!1;let b=[];const c=this.destination||'',d=(e,
536
+ f,g,h)=>e?f?this.db.Tf(g,h,c):this.db.Tf(g,h):this.db.tb(g,h);for(let e=0;e<this.Pa.length;++e){const f=this.Pa[e],g=this.recursive[e],h=e===this.Pa.length-1;if(0===e)b=d(g,h,a,f);else if(b=b.flatMap(k=>d(g,h,k,f)),0===b.length)return!1}return c?b.includes(c):0<b.length}observe(a,b,c){const d=this.Pa.length;let e=0;const f=new Set,g=(k,l)=>{this.destination&&this.destination!==l||(e+=k?1:-1,1<e||c(0<e))},h=(k,l,n,p)=>{const q=this.Pa[k],r=this.recursive[k-1]?this.Pa[k-1]:null;l=olympe.X.pb(l+k+p);
537
+ const t=olympe.X.pb(l+'rec');k===d?g(n,p):n?f.has(p)||(f.add(p),V(this.db,p,q,h.bind(this,k+1,l),l),r&&V(this.db,p,r,h.bind(this,k,t),t)):(f.delete(p),this.db.C(p,q,l),r&&this.db.C(p,r,t))};h(0,b,!0,a);0===e&&c(!1)}ka(){return{pr:6,r:this.Pa.map((a,b)=>[a.T(),a.Sa(),this.recursive[b]]),d:this.destination}}toString(){const a=this.Pa.reduce((b,c,d)=>b+c.T()+this.recursive[d],'');return`RelatedTo-${this.destination}-${a}`}};olympe.dc.ea.W.He.prototype.followRecursive=olympe.dc.ea.W.He.prototype.Mk;
538
+ olympe.dc.ea.W.He.prototype.follow=olympe.dc.ea.W.He.prototype.ub;olympe.dc.ea.W.He.C=6;olympe.dc.ea.W.He.ma=[olympe.dc.ea.cb];olympe.dc.ea.Ib={};olympe.dc.ea.Ib.rc=class{constructor(a){this.C=a}F(a){return a}kb(a,b){for(const c of X(a,b).keys())this.C.kb(c)||(0===b?a.remove(c,b,null):Ue(a,c,b).forEach(d=>{a.remove(c,b,d)}))}observe(a,b,c){let d=!1;return(e,f,g,h)=>{const k=olympe.X.pb(h+f+this.toString());e?this.C.observe(f,k,l=>{d||(l?a.insert(f,b,g):a.remove(f,b,g),c(l,f,g,k))}):(d=!0,this.C.clear(f,k),d=!1,c(!1,f,g,k))}}ka(){return{t:1,p:this.C.ka()}}toString(){return'filterQueryPart-'+this.C.toString()}};olympe.dc.ea.Ib.rc.C=1;
539
+ olympe.dc.ea.Ib.rc.ma=[olympe.dc.ea.lk];olympe.dc.ea.Ib.lf=class{constructor(a,b){this.db=a;this.C=b}Qd(){return this.C}F(a){return a+1}kb(a,b){for(const c of X(a,b).keys())this.db.tb(c,this.C).forEach(d=>{a.insert(d,b+1,c)})}observe(a,b,c){return(d,e,f,g)=>{const h=olympe.X.pb(g+e+this.toString());d?V(this.db,e,this.C,(k,l)=>{(k?a.insert(l,b+1,e):a.remove(l,b+1,e))&&c(k,l,e,h)},h):this.db.C(e,this.C,h)}}ka(){return{t:2,r:{t:this.C.T(),d:this.C.Sa()}}}toString(){return'followQueryPart-'+this.C.Sa()+this.C.T()}};olympe.dc.ea.Ib.lf.C=2;
540
+ olympe.dc.ea.Ib.lf.ma=[olympe.dc.ea.lk];olympe.dc.ea.Ib.mf=class{constructor(a,b,c=!1){this.db=a;this.C=b;this.G=c}Qd(){return this.C}F(a){return a+1}kb(a,b){for(const c of X(a,b).keys())this.G&&a.insert(c,b+1,c),this.db.Tf(c,this.C).forEach(d=>{a.insert(d,b+1,c)})}observe(a,b,c){const d=(g,h,k,l)=>olympe.X.pb(g+h+k+l+this.toString()),e=new Set,f=(g,h,k,l,n)=>{h=d(h,g,n,k);(this.G||0<k)&&(l?a.insert(n,b+1,g):a.remove(n,b+1,g))&&c(l,n,g,h);l?e.has(n)||(e.add(n),V(this.db,n,this.C,f.bind(this,g,h,k+1),h)):(e.delete(n),this.db.C(n,this.C,
541
+ h))};return(g,h,k,l)=>f(h,l,0,g,h)}ka(){return{t:3,s:this.G,r:{t:this.C.T(),d:this.C.Sa()}}}toString(){return'followRecursivelyQueryPart-'+this.C.Sa()+this.C.T()}};olympe.dc.ea.Ib.mf.C=3;olympe.dc.ea.Ib.mf.ma=[olympe.dc.ea.lk];function Ze(a){a=a.db.ic(a.lb,olympe.dm.Property.typeRel);const b=olympe.dc.za;if(a===b(olympe.dm.String))return $e((c,d)=>c.localeCompare(d));if(a===b(olympe.dm.Number)||a===b(olympe.dm.Boolean))return $e((c,d)=>c-d);if(a===b(olympe.dm.DateTime))return $e((c,d)=>c.getTime()-d.getTime());olympe.ta.Za('dc').warn(`No comparator found for type with tag ${a}`);return $e(()=>-1)}function $e(a){return(b,c)=>{const d=null===b,e=null===c;return d||e?d&&e?0:d?1:-1:a(b,c)}}
542
+ olympe.dc.ea.Ib.Qh=class{constructor(a,b,c){this.db=a;this.lb=b;this.order=c}F(a){return a}kb(a,b){Se(a,Ze(this),b,this.order,this.lb)}observe(a,b,c){Se(a,Ze(this),b,this.order,this.lb);return(d,e,f,g)=>{g=olympe.X.pb(g+this.toString());d?Jd(this.db,e,this.lb,()=>{Te(a)},g):this.db.F(e,this.lb,g);c(d,e,f,g)}}ka(){return{t:4,p:this.lb.T(),o:this.order}}toString(){return'sortByQueryPart-'+this.order+this.lb.T()}eb(){return this.lb}};olympe.dc.ea.Ib.Qh.C=4;olympe.dc.ea.Ib.Qh.ma=[olympe.dc.ea.lk];olympe.dc.query={};function af(a,b,c,d){let e=a.C.get(b);void 0===e&&(e=new Set,a.C.set(b,e));a=olympe.X.bc();e.add(a);d.set(a,c)}function bf(a,b,c){af(a,b,c,a.F)}function cf(a,b,c){if(a.C.has(b)){for(const d of a.C.get(b))c.delete(d);a.C.delete(b)}}function df(a,b,c,d,e){if(a.C.has(b)){if(!a.K.has(b)){a.K.add(b);for(const f of a.C.get(b))e=d.get(f),d.delete(f),c instanceof olympe.dc.query.errors.Xj?e(Error(c.la()),c):'string'===typeof c?e(Error(c),null):e(null,c);a.C.delete(b);a.K.delete(b)}}else a.N.warn(e)}
543
+ function ef(a,b,c){df(a,b,c,a.F,`Graph result of graphdef ${b} has no associated handler in the datacloud`)}function ff(a,b,c){af(a,b,c,a.G)}olympe.dc.query.Ms=class{constructor(a){this.N=a;this.C=new Map;this.F=new Map;this.G=new Map;this.K=new Set}};olympe.dc.Ne=class{na(){}K(){}G(){}P(){}ka(){}toString(){}};olympe.dc.Cd={SUBSCRIBE:0,Pi:1,pm:2,HB:0,GET:1};olympe.dc.Cd.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Cd))if(c===a)return b;return null};function Ee(a,b=1){a.validate(olympe.dc.Qb.NONE,'back');let c=a.V;for(let d=0;d<b&&null!==c;d++)c=a.F.get(c.G)||null;a.V=c}function gf(a){return'not_defined'===a.C?olympe.dc.Qb.NONE:a.C}function hf(a,b){a.validate(b,'activateFollowRules');return a}function jf(a){return'not_defined'!==a.C&&a.C!==olympe.dc.Qb.NONE}
544
544
  function kf(a){if(jf(a))throw Error('An implicit GraphDef has no blocks');return a.F.values()}
545
- function lf(a,b,c){c=new olympe.dc.query.Relation(b.T(),b.Sa(),c||b instanceof olympe.dc.Y.Dc);b=[];var d;for(var e of mf(a)){if(d=a.F.get(e)){var f=new olympe.dc.query.Vj(c,d.id);d.F.has(f.Z())?d=d.F.get(f.Z()):(d.F.set(f.Z(),f),d=f)}else{d=a;var g=c;const h=olympe.X.pb(d.G);f=olympe.X.pb(h+g.toString());g=d.F.get(f)||new olympe.dc.query.Vj(g,h);d.P.set(f,g);d=g}f=d.Z();a.F.set(f,d);b.push(f)}e=b[0];a.la.set(e,b);return a.F.get(e)}
546
- function nf(a,b){if(jf(a))a.$.push(b);else throw Error('You cannot add a "skip predicate" to an explicit graphdef. Please activate a follow rule first.');return a}function of(a,b){a.ba=b;return a}function pf(a){const b=new olympe.dc.pf(a.G,a.K);b.C=a.C;for(const [c,d]of a.P)b.P.set(c,d);for(const [c,d]of a.F)b.F.set(c,d);b.ba=a.ba;b.$=[...a.$];return b}function qf(a,b){return jf(a)?new olympe.dc.query.Rl(pf(a),b||olympe.D.Na()):new olympe.dc.query.Uj(pf(a),b||olympe.D.Na())}
547
- function mf(a){let b=a.V;const c=[];for(;b&&b.Rd().recursive;)c.push(b.Z()),b=a.F.get(b.G)||null;c.push(b&&b.Z()||olympe.X.pb(a.G));const d=[];c.slice(0,5).forEach(e=>{d.push(...a.la.get(e))});return d}
548
- olympe.dc.pf=class{constructor(a,b=olympe.dc.Dd.SUBSCRIBE){if(void 0===a||null===a)throw Error('Cannot create GraphDef with undefined or null baseTag');this.G=olympe.dc.za(a);this.K=b;this.C='not_defined';this.$=[];this.V=null;this.P=new Map;this.F=new Map;this.ba=null;this.la=(new Map).set(olympe.X.pb(this.G),[olympe.X.pb(this.G)])}static Fc(a,b){olympe.dc.pf.Se([a],b)}static Se(a,b){const c=new olympe.dc.Transaction;a.forEach(d=>c.delete(d,olympe.dc.Qb.Cc));c.kb(b)}toJSON(){const a=Object.create(null),
549
- b=c=>{const d=Object.create(null),e=c.Rd();d.t=e.T();d.d=e.Sa();d.r=e.recursive;d.c=c.oh().map(b);return d};a.t=this.G;a.o=this.K;a.f=gf(this);a.b=Array.from(this.P.keys()).map(c=>b(this.F.get(c)));return JSON.stringify(a)}static nc(a){a='string'===typeof a?JSON.parse(a):a;const b=hf(new olympe.dc.pf(a.t,a.o),a.f),c=d=>{const e=new olympe.dc.ua.Relation(d.t,d.d);b.ub(e,d.r);for(const f of d.c)c(f);Ee(b)};for(const d of a.b)c(d);return b}Z(){const a=olympe.X.pb,b=d=>d.Z()+d.oh().map(e=>b(e)).sort().join(''),
550
- c=Array.from(this.P,([,d])=>b(d)).sort().join('');return a(`${this.K}-${this.G}${c}-${gf(this)}`)}add(a,b=!1){this.validate(olympe.dc.Qb.NONE,'add');lf(this,a,b);return this}ub(a,b=!1){this.validate(olympe.dc.Qb.NONE,'follow');this.V=lf(this,a,b);return this}kb(a=b=>b){'not_defined'===this.C&&(this.C=olympe.dc.Qb.NONE);const b=olympe.dc.Tf();a=olympe.D.Na().F(a);switch(this.K){case olympe.dc.Dd.SUBSCRIBE:case olympe.dc.Dd.Pi:const c=rf(b,this,a);olympe.D.Na().P(()=>{sf(olympe.dc.Tf(),c.Z())});break;
551
- case olympe.dc.Dd.om:tf(b,this,a);break;default:throw Error('Wrong graph operation');}}validate(a,b){if('not_defined'!==this.C&&this.C!==a)throw Error(this.C!==olympe.dc.Qb.NONE?`Method ${b} can't be called on an implicit Graphdef`:`Method ${b} can't be called on an explicit Graphdef`);this.C=a}};function uf(a,b){a.data.Oc(b.data);a.C.forEach((c,d)=>{if(b.C.has(d))d=b.C.get(d),d.add.push(...c.add),d.remove.push(...c.remove);else{var e=c.remove;const f=new vf(d);f.add=c.add;f.remove=e;b.C.set(d,f)}})}function wf(a,b){a.C.forEach((c,d)=>b(d,c.add,c.remove))}olympe.dc.query.qt=class{constructor(a,b){this.id=a;this.C=new Map;this.data=b}Z(){return this.id}};class vf{constructor(a){this.id=a;this.add=[];this.remove=[]}Z(){return this.id}};function xf(a){return(a=a.C)&&olympe.dc.La().source(a)||olympe.dc.Ia.Lc}function yf(a){return Array.from(a.qa,b=>a.F.get(b))}function zf(a){if(!a.K){for(const b of a.P.values())b();a.P.clear();a.K=!0}}
552
- olympe.dc.query.Uj=class{constructor(a,b){this.sh=a;this.C=a.G;this.id=a.Z();this.$=new olympe.D.$b(`GraphSubscription ${this.id}`,b);this.N=olympe.ta.Za('dc.query');this.qa=[];this.F=new Map;this.K=!1;this.P=new Map;b=olympe.X.pb(this.C);if(!jf(a))for(const c of kf(a))this.F.set(c.Z(),c),c.G===b&&this.qa.push(c.Z())}Z(){return this.id}je(a,b){b=b||olympe.X.bc();this.K?a():this.P.set(b,olympe.D.Na().F(a));return b}uj(a){return this.P.delete(a)}onDestroy(a){this.$.onDestroy(a)}release(){this.$.destroy()}V(){return function*(a,
545
+ function lf(a,b,c){c=new olympe.dc.query.Relation(b.T(),b.Sa(),c||b instanceof olympe.dc.Y.Dc);b=[];var d;for(var e of mf(a)){if(d=a.F.get(e)){var f=new olympe.dc.query.Wj(c,d.id);d.F.has(f.Z())?d=d.F.get(f.Z()):(d.F.set(f.Z(),f),d=f)}else{d=a;var g=c;const h=olympe.X.pb(d.G);f=olympe.X.pb(h+g.toString());g=d.F.get(f)||new olympe.dc.query.Wj(g,h);d.P.set(f,g);d=g}f=d.Z();a.F.set(f,d);b.push(f)}e=b[0];a.la.set(e,b);return a.F.get(e)}
546
+ function nf(a,b){if(jf(a))a.$.push(b);else throw Error('You cannot add a "skip predicate" to an explicit graphdef. Please activate a follow rule first.');return a}function of(a,b){a.ba=b;return a}function pf(a){const b=new olympe.dc.nf(a.G,a.K);b.C=a.C;for(const [c,d]of a.P)b.P.set(c,d);for(const [c,d]of a.F)b.F.set(c,d);b.ba=a.ba;b.$=[...a.$];return b}function qf(a,b){return jf(a)?new olympe.dc.query.Sl(pf(a),b||olympe.D.Na()):new olympe.dc.query.Vj(pf(a),b||olympe.D.Na())}
547
+ function mf(a){let b=a.V;const c=[];for(;b&&b.Qd().recursive;)c.push(b.Z()),b=a.F.get(b.G)||null;c.push(b&&b.Z()||olympe.X.pb(a.G));const d=[];c.slice(0,5).forEach(e=>{d.push(...a.la.get(e))});return d}
548
+ olympe.dc.nf=class{constructor(a,b=olympe.dc.Cd.SUBSCRIBE){if(void 0===a||null===a)throw Error('Cannot create GraphDef with undefined or null baseTag');this.G=olympe.dc.za(a);this.K=b;this.C='not_defined';this.$=[];this.V=null;this.P=new Map;this.F=new Map;this.ba=null;this.la=(new Map).set(olympe.X.pb(this.G),[olympe.X.pb(this.G)])}static Fc(a,b){olympe.dc.nf.Te([a],b)}static Te(a,b){const c=new olympe.dc.Transaction;a.forEach(d=>c.delete(d,olympe.dc.Qb.Cc));c.kb(b)}toJSON(){const a=Object.create(null),
549
+ b=c=>{const d=Object.create(null),e=c.Qd();d.t=e.T();d.d=e.Sa();d.r=e.recursive;d.c=c.nh().map(b);return d};a.t=this.G;a.o=this.K;a.f=gf(this);a.b=Array.from(this.P.keys()).map(c=>b(this.F.get(c)));return JSON.stringify(a)}static nc(a){a='string'===typeof a?JSON.parse(a):a;const b=hf(new olympe.dc.nf(a.t,a.o),a.f),c=d=>{const e=new olympe.dc.ua.Relation(d.t,d.d);b.ub(e,d.r);for(const f of d.c)c(f);Ee(b)};for(const d of a.b)c(d);return b}Z(){const a=olympe.X.pb,b=d=>d.Z()+d.nh().map(e=>b(e)).sort().join(''),
550
+ c=Array.from(this.P,([,d])=>b(d)).sort().join('');return a(`${this.K}-${this.G}${c}-${gf(this)}`)}add(a,b=!1){this.validate(olympe.dc.Qb.NONE,'add');lf(this,a,b);return this}ub(a,b=!1){this.validate(olympe.dc.Qb.NONE,'follow');this.V=lf(this,a,b);return this}kb(a=b=>b){'not_defined'===this.C&&(this.C=olympe.dc.Qb.NONE);const b=olympe.dc.Rf();a=olympe.D.Na().F(a);switch(this.K){case olympe.dc.Cd.SUBSCRIBE:case olympe.dc.Cd.Pi:const c=rf(b,this,a);olympe.D.Na().P(()=>{sf(olympe.dc.Rf(),c.Z())});break;
551
+ case olympe.dc.Cd.pm:tf(b,this,a);break;default:throw Error('Wrong graph operation');}}validate(a,b){if('not_defined'!==this.C&&this.C!==a)throw Error(this.C!==olympe.dc.Qb.NONE?`Method ${b} can't be called on an implicit Graphdef`:`Method ${b} can't be called on an explicit Graphdef`);this.C=a}};function uf(a,b){a.data.Oc(b.data);a.C.forEach((c,d)=>{if(b.C.has(d))d=b.C.get(d),d.add.push(...c.add),d.remove.push(...c.remove);else{var e=c.remove;const f=new vf(d);f.add=c.add;f.remove=e;b.C.set(d,f)}})}function wf(a,b){a.C.forEach((c,d)=>b(d,c.add,c.remove))}olympe.dc.query.rt=class{constructor(a,b){this.id=a;this.C=new Map;this.data=b}Z(){return this.id}};class vf{constructor(a){this.id=a;this.add=[];this.remove=[]}Z(){return this.id}};function xf(a){return(a=a.C)&&olympe.dc.La().source(a)||olympe.dc.Ia.Lc}function yf(a){return Array.from(a.qa,b=>a.F.get(b))}function zf(a){if(!a.K){for(const b of a.P.values())b();a.P.clear();a.K=!0}}
552
+ olympe.dc.query.Vj=class{constructor(a,b){this.rh=a;this.C=a.G;this.id=a.Z();this.$=new olympe.D.Xb(`GraphSubscription ${this.id}`,b);this.N=olympe.ta.Za('dc.query');this.qa=[];this.F=new Map;this.K=!1;this.P=new Map;b=olympe.X.pb(this.C);if(!jf(a))for(const c of kf(a))this.F.set(c.Z(),c),c.G===b&&this.qa.push(c.Z())}Z(){return this.id}je(a,b){b=b||olympe.X.bc();this.K?a():this.P.set(b,olympe.D.Na().F(a));return b}vj(a){return this.P.delete(a)}onDestroy(a){this.$.onDestroy(a)}release(){this.$.destroy()}V(){return function*(a,
553
553
  b){yield a;for(const c of b)yield*c.fe()}(this.C,this.F.values())}ba(a){const b=olympe.X.pb(this.C);Af(a,(c,d)=>{if(b!==c)if(c=this.F.get(c),void 0===c)this.N.error('Try to apply a block result that does not exists in the original query');else for(const e of d)c.C.add(e)})}la(a){let b=[],c=[];const d=olympe.X.pb(this.C);wf(a,(e,f,g)=>{const h=d===e,k=this.F.get(e);h||void 0!==k?h?(b.push(...f),c.push(...g)):(b=b.concat(f.filter(l=>{k.C.has(l)?l=!1:(k.C.add(l),l=!0);return l})),c=c.concat(g.filter(l=>
554
- k.C.delete(l)))):this.N.error(`A notification contains a block ${e} which is not present in the current graph query ${this.id}`)});$c(olympe.dc.yd(),b,c)}Dr(a){const b=a.C,c=[],d=this.C;d===b&&c.push(olympe.X.pb(d));this.F.forEach((k,l)=>{k.C.has(b)&&c.push(l)});const e=olympe.X.pb,f=this.F,g=(k,l)=>{const n=l.Rd(),p=[e(k+n),e(k+new olympe.dc.query.Relation(n.tag,n.direction,!0))].filter(q=>f.has(q));return 0<p.length?l.oh().reduce((q,r)=>q&&g(p[0],r),!0):!1},h=yf(a);return void 0!==c.find(k=>{for(const l of h)if(!g(k,
555
- l))return!1;return!0})}};olympe.dc.query.Vj=class{constructor(a,b){this.K=a;this.F=new Map;this.C=new Set;this.G=b;this.id=olympe.X.pb(b+a.toString());this.apply=!0}toJSON(){let a='{ "id": '+JSON.stringify(this.id)+', "parentId": '+JSON.stringify(this.G)+', "apply": '+JSON.stringify(this.apply)+', ';a+='"relation": '+this.K.toJSON();if(0<this.F.size){a+=', "children": [';for(const b of this.F.values())a+=b.toJSON()+', ';a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=']'}if(0<this.C.size){a+=', "instances": [';for(const b of this.C)a+=
556
- JSON.stringify(b)+', ';a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=']'}return a+'}'}static nc(a){var b;'string'===typeof a?b=JSON.parse(a):b=a;a=olympe.dc.query.Relation.nc(b.relation);a=new olympe.dc.query.Vj(a,b.parentId);a.id=b.id;a.apply=b.apply;if(b.instances)for(const c of b.instances)a.C.add(c);if(b.children)for(const c of b.children)b=olympe.dc.query.Vj.nc(c),a.F.set(b.id,b);return a}Z(){return this.id}Rd(){return this.K}oh(){return Array.from(this.F.values())}fe(){return this.C.values()}toString(){return this.G+
554
+ k.C.delete(l)))):this.N.error(`A notification contains a block ${e} which is not present in the current graph query ${this.id}`)});$c(olympe.dc.xd(),b,c)}Er(a){const b=a.C,c=[],d=this.C;d===b&&c.push(olympe.X.pb(d));this.F.forEach((k,l)=>{k.C.has(b)&&c.push(l)});const e=olympe.X.pb,f=this.F,g=(k,l)=>{const n=l.Qd(),p=[e(k+n),e(k+new olympe.dc.query.Relation(n.tag,n.direction,!0))].filter(q=>f.has(q));return 0<p.length?l.nh().reduce((q,r)=>q&&g(p[0],r),!0):!1},h=yf(a);return void 0!==c.find(k=>{for(const l of h)if(!g(k,
555
+ l))return!1;return!0})}};olympe.dc.query.Wj=class{constructor(a,b){this.K=a;this.F=new Map;this.C=new Set;this.G=b;this.id=olympe.X.pb(b+a.toString());this.apply=!0}toJSON(){let a='{ "id": '+JSON.stringify(this.id)+', "parentId": '+JSON.stringify(this.G)+', "apply": '+JSON.stringify(this.apply)+', ';a+='"relation": '+this.K.toJSON();if(0<this.F.size){a+=', "children": [';for(const b of this.F.values())a+=b.toJSON()+', ';a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=']'}if(0<this.C.size){a+=', "instances": [';for(const b of this.C)a+=
556
+ JSON.stringify(b)+', ';a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=']'}return a+'}'}static nc(a){var b;'string'===typeof a?b=JSON.parse(a):b=a;a=olympe.dc.query.Relation.nc(b.relation);a=new olympe.dc.query.Wj(a,b.parentId);a.id=b.id;a.apply=b.apply;if(b.instances)for(const c of b.instances)a.C.add(c);if(b.children)for(const c of b.children)b=olympe.dc.query.Wj.nc(c),a.F.set(b.id,b);return a}Z(){return this.id}Qd(){return this.K}nh(){return Array.from(this.F.values())}fe(){return this.C.values()}toString(){return this.G+
557
557
  this.K.toString()}};function Af(a,b){a.C.forEach((c,d)=>b(d,c))}
558
- olympe.dc.query.Ei=class{constructor(a,b,c,d){this.id=a;this.source=b;this.destination=c;this.C=new Map;this.Bc=d}toJSON(){let a=`{ "id": "${this.id}", "source": "${this.source}", "destination": "${this.destination}"`;a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=', "blocks": {';for(const [b,c]of this.C)a+=`"${b}": ${JSON.stringify(Array.from(c))}, `;a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=`}, "patch": ${this.Bc.toJSON()}`;return a+'}'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):
559
- b=a;a=olympe.dc.db.xc.nc(b.patch);a=new olympe.dc.query.Ei(b.id,b.source,b.destination,a);for(const [c,d]of Object.entries(b.blocks))a.C.set(c,new Set(d));return a}Z(){return this.id}};const Bf=olympe.dc.mc.Vc,Cf=olympe.dc.mc.yi,Df=olympe.dc.Ca.ORIGIN,Ef=olympe.dc.Ca.DESTINATION;function Ff(a,b,c){const d=a.sh.$;return c.filter(e=>d.reduce((f,g)=>f&&!g(b,e.Rd()),!0))}
560
- olympe.dc.query.Rl=class extends olympe.dc.query.Uj{constructor(a,b){super(a,b);this.G=(new Set).add(a.G)}V(){return this.G.values()}ba(a){a=a.Bc;for(const b of a.fe())b.K()?this.G.delete(b.tag()):b.ue()&&this.G.add(b.tag())}la(a){let b=[],c=[];wf(a,(d,e,f)=>{b=b.concat(e.filter(g=>{if(this.G.has(g)&&this.C!==g)return!1;this.G.add(g);return!0}));c=c.concat(f.filter(g=>this.G.delete(g)))});$c(olympe.dc.yd(),b,c)}Dr(a){var b=a.C,c=Array.from(a.F.values()),d=Ff(this,b,c);if(d.length===c.length&&!this.G.has(b))return!1;
561
- b=olympe.dm.Relation.C.Ak;c=olympe.dm.Relation.C.nk;const e=olympe.dc.La();for(const h of d){var f=h.Rd(),g=f.T();d=f.Sa();if(d!==Ef||g!==Bf&&g!==Cf){if(!e.Gb(f))return this.N.info('ImplicitGraphQuery: checking coverage of graphPath',a.Z(),'failed at the relation',g,'which is not in local DB'),!1;f=Md(e,f,gf(this.sh));g=0===h.oh().length;if(!(f&(d===Df?g?12:c:g?3:b)))return!1}}return!0}};function Gf(a){let b=null;for(a=[...a.Y];null===b&&0<a.length;)b=a.pop().Yb();return b}function Hf(a,b){a.V()||(a=`Calling "${b}" on subscription with id ${a.Z()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback.',olympe.ta.Za('dc').warn(a))}
562
- function If(a,b){const c=new olympe.D.$b('listDef toObservable',a.oc().Hh());return new rxjs.Observable(d=>{c.run(()=>{olympe.D.wc([b],e=>{d.next(e.valueOf())})});c.onDestroy(()=>{d.complete()});return c.destroy.bind(c)})}
563
- olympe.dc.Da=class{constructor(a,b,c){void 0===a||null===a?olympe.ta.Za('dc').warn('attempt to create a listdef with a null or undefind basetag. This listdef is thus without effect.'):(this.F=olympe.D.Ha([a],olympe.dc.za,String),this.Y=void 0!==b&&(Array.isArray(b)?b:[b])||[],this.valueType=c||Gf(this),this.C=null)}Sc(){return olympe.dc.Sc()}kb(){if(null===this.C){const a=olympe.dc.Tf();this.C=Jf(a,this);null!==this.valueType&&this.C.Fd(this.valueType);olympe.D.Na().P(()=>{Kf(a,this.C.Z());this.C=
564
- null})}return this}oc(){null===this.C&&this.kb();return this.C}Fd(a){this.valueType=a;null!==this.C&&this.C.Fd(this.valueType)}Yb(){return null!==this.C?this.C.Yb():null===this.valueType?olympe.dc.CloudObject:this.valueType}Od(){return this.F}Ul(){return this.Y}je(a,b){return this.oc().je(a,b)}uj(a){this.oc().uj(a)}Jt(){return this.oc().ce()}It(){return this.oc().V()}get(a){return this.oc().get(a)}hi(){return this.oc().hi()}ph(a){const b=this.oc();Hf(b,'getCurrent');return b.ph(a)}has(a){return this.oc().has(a)}Lg(a){const b=
565
- this.oc();Hf(b,'hasCurrent');return b.Lg(a)}te(a){return this.oc().te(a)}my(a){return If(this,this.te(a))}Ve(a){const b=this.oc();Hf(b,'getCurrentAt');return b.Ve(a)}We(a){return this.oc().We(a)}Mf(a){const b=this.oc();Hf(b,'getCurrentKeyAt');return b.Mf(a)}he(a){return this.oc().he(a)}qy(a){return If(this,this.he(a))}Nf(a){const b=this.oc();Hf(b,'getCurrentRank');return b.Nf(a)}Rc(){return this.oc().Rc()}ny(){return If(this,this.Rc())}Of(){return this.oc().Of()}tf(){return this.oc().tf()}sy(){return If(this,
566
- this.tf())}Gg(){const a=this.oc();Hf(a,'getCurrentSize');return a.Gg()}forEach(a,b){this.oc().forEach(a,b)}de(a){const b=this.oc();Hf(b,'forEachCurrentValue');return b.de(a)}fj(a,b,c,d){a=new olympe.dc.Y.ae(a,b);(new olympe.dc.Da(this.F,[...this.Y,a],this.valueType)).forEach(c,d)}transform(...a){var b=a;if(Array.isArray(a[0])){if(1<a.length)throw Error('ListDef.transform() should be called either with one array argument, or with ... arguments, but not both');b=a[0]}a=[...this.Y];for(const c of b){if(void 0===
567
- c)throw Error('ListDef.transform(): Trying to set an undefined transformer');if(c instanceof olympe.dc.ua.Property)throw Error(`ListDef.transform(): Properties cannot be used as transformer, unlike relations ${c}`);if(!c||'function'!==typeof c.getTransform)break;a.push(c)}b=new olympe.dc.Da(this.F,a);b.Fd(Gf(b)||this.valueType||Object);return b}jl(a){return this.transform(new olympe.dc.Y.Cf(a))}filter(a){return this.transform(new olympe.dc.Y.tc(a))}Cg(){const a=new olympe.dc.ck(this.F,null===this.valueType?
568
- void 0:this.valueType);let b=this.Y;b instanceof Array||(b=b?[b]:[]);a.transform(b);return a}toString(){let a=this.Y;a=a?', '+(a.join?a.join(', '):a.toString()):'';return'ListDef(#'+olympe.D.Xa(this.F)+a+')'}Ht(){return this.oc().Zg()}Tc(){return olympe.D.Ha([this.tf()],a=>{let b='[';for(let c=0;c<a;c++){const d=this.Ve(c).toString();b=0<c&&c<a?b+(', '+d):b+d}return olympe.D.Bb(b+']')},olympe.D.$a)}};olympe.dc.Da.prototype.filter=olympe.dc.Da.prototype.filter;olympe.dc.Da.prototype.union=olympe.dc.Da.prototype.jl;
569
- olympe.dc.Da.prototype.transform=olympe.dc.Da.prototype.transform;olympe.dc.Da.prototype.forEachCurrentValue=olympe.dc.Da.prototype.de;olympe.dc.Da.prototype.forEach=olympe.dc.Da.prototype.forEach;olympe.dc.Da.prototype.getCurrentSize=olympe.dc.Da.prototype.Gg;olympe.dc.Da.prototype.observeSize=olympe.dc.Da.prototype.sy;olympe.dc.Da.prototype.observeFirst=olympe.dc.Da.prototype.ny;olympe.dc.Da.prototype.getCurrentRank=olympe.dc.Da.prototype.Nf;olympe.dc.Da.prototype.observeRank=olympe.dc.Da.prototype.qy;
570
- olympe.dc.Da.prototype.getCurrentAt=olympe.dc.Da.prototype.Ve;olympe.dc.Da.prototype.observeAt=olympe.dc.Da.prototype.my;olympe.dc.Da.prototype.offReady=olympe.dc.Da.prototype.uj;olympe.dc.Da.prototype.onReady=olympe.dc.Da.prototype.je;olympe.dc.Da.prototype.getBaseTag=olympe.dc.Da.prototype.Od;olympe.dc.Da.ma=[olympe.D.od];m=olympe.dc.Da.prototype;m.Sc.L=olympe.D.J.C;m.kb.L=olympe.D.J.K();m.oc.L=new olympe.D.J(()=>olympe.dc.query.Subscription,[]);m.Fd.L=new olympe.D.J(()=>{},[]);
571
- m.Od.L=new olympe.D.J(()=>String,[]);m.Ul.L=new olympe.D.J(()=>Array,[]);m.je.L=new olympe.D.J(()=>String,[]);m.uj.L=new olympe.D.J(()=>{},[]);m.Jt.L=olympe.D.J.P;m.It.L=olympe.D.J.C;m.get.L=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.hi.L=new olympe.D.J(()=>Array,[]);m.ph.L=olympe.D.J.C;m.has.L=olympe.D.J.P;m.Lg.L=olympe.D.J.C;m.te.L=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Ve.L=olympe.D.J.C;m.We.L=new olympe.D.J(()=>String,[]);m.Mf.L=olympe.D.J.C;m.he.L=olympe.D.J.G;
572
- m.Nf.L=olympe.D.J.C;m.Rc.L=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Of.L=new olympe.D.J(()=>String,[]);m.tf.L=olympe.D.J.G;m.Gg.L=olympe.D.J.C;m.forEach.L=new olympe.D.J(()=>{},[]);m.de.L=olympe.D.J.C;m.fj.L=new olympe.D.J(()=>{},[]);m.transform.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.jl.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.filter.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.Cg.L=new olympe.D.J(()=>olympe.dc.ck,[]);m.toString.L=olympe.D.J.C;m.Ht.L=olympe.D.J.C;m.Tc.L=olympe.D.J.F;const Lf={jz:'append',Fl:'filter_not',Po:'filter_and',Qo:'filter_or'};function Mf(a,b){a=Nf(a);a=olympe.dc.CloudObject.get(a);return(new olympe.dc.pa.Pn(a,b)).F}
573
- olympe.dc.ck=class{constructor(a,b){this.C=Nf(a);this.N=olympe.dc.Tf().Za();this.valueType=void 0===b?olympe.dc.CloudObject:b;this.Y=[];this.va=[]}uf(){return new olympe.dc.Da(this.C,this.Y,this.valueType)}transform(a){for(let b=0,c=a.length,d;b<c;b++){d=a[b];if(void 0===d)throw new Of('transform','Trying to set an undefined transformer');if(d instanceof olympe.dc.ua.Property)throw new Of('transform','Properties cannot be used as transformer, unlike relations '+d);if(!d||'function'!==typeof d.getTransform)throw new Of('transform',
574
- 'one of the argument is not a Transformer '+d);const e=d.Yb();null!==e&&(this.valueType=e);this.Y.push(d)}return this}jl(a){this.Y.push(new olympe.dc.Y.Cf(a));return this}gz(a){this.Y.push(new olympe.dc.Y.Cf(Nf(a)));return this}Lt(a){this.valueType=a;return this}ub(a){this.Y.push(a);this.valueType=a.Yb()||olympe.dc.CloudObject;return this}pw(a){for(const b of a)this.Y.push(b),this.valueType=b.Yb()||olympe.dc.CloudObject;return this}Lk(a,b,c){a=new olympe.dc.Y.Dc(a,a.Sa(),b,c);this.Y.push(a);this.valueType=
575
- a.Yb()||olympe.dc.CloudObject;return this}ow(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.T());void 0===c&&(c=e.Sa())}a=new olympe.dc.Y.Fe(b,c);this.Y.push(a);this.valueType=a.Yb()||olympe.dc.CloudObject;return this}Kt(){this.ub(olympe.dc.CloudObject.instancesRel);return this}Te(a){var b=this.va.pop();b===Lf.Fl&&(a=new olympe.dc.W.ld(a),b=this.va.pop());switch(b){case Lf.Po:b=this.Y.pop().C;b instanceof olympe.dc.W.Ud?(b=b.W,b.push(a),a=new olympe.dc.W.Ud(...b)):a=new olympe.dc.W.Ud(b,
576
- a);b=this.va.pop();break;case Lf.Qo:b=this.Y.pop().C,b instanceof olympe.dc.W.be?(b=b.W,b.push(a),a=new olympe.dc.W.be(...b)):a=new olympe.dc.W.be(b,a),b=this.va.pop()}b===Lf.Fl&&(a=new olympe.dc.W.ld(a),this.va.pop());this.Y.push(new olympe.dc.Y.tc(a));return this}jw(a,b,c){return this.Te(new olympe.dc.W.Gc(Mf(a,c),new olympe.dc.pa.Cd(b)))}contains(a,b,c=!1,d){return this.Te(new olympe.dc.W.Uc(Mf(a,d),new olympe.dc.pa.Cd(b),c))}Xf(a){if(!(a instanceof Array))throw new Of('instanceOf','Provided argument "models" must be an array.');
577
- const b=[];for(let c=0;c<a.length;c++)b.push(Nf(a[c]));return this.Te(new olympe.dc.W.sf(b))}Sk(a){return this.Te(new olympe.dc.W.Gc(new olympe.dc.pa.Af,new olympe.dc.pa.Cd(Nf(a))))}kw(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<a.length){this.not().Sk(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().not().Sk(a[b])}return this}oj(a,b){if(!(a instanceof Array))throw new Of('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];
578
- a.forEach(e=>{c.push(e);d.push(e.Sa())});return this.Te(new olympe.dc.W.qf(c,d,b))}Rk(a,b,c){a=Mf(a,c);return this.Te(new olympe.dc.W.Ce(a,new olympe.dc.pa.Cd(b)))}Aj(a,b,c){a=Mf(a,c);return this.Te(new olympe.dc.W.Je(a,new olympe.dc.pa.Cd(b)))}Wx(a,b,c,d){a=Mf(a,d);return this.Te(new olympe.dc.W.vd(a,b,c))}filter(a){const b=new class extends olympe.dc.W.Tg{C(c,d){return a(olympe.dc.CloudObject.get(d))}};return this.Te(b)}not(){this.va.push(Lf.Fl);return this}and(){this.Y[this.Y.length-1]instanceof
579
- olympe.dc.Y.tc&&this.va.push(Lf.Po);return this}or(){this.Y[this.Y.length-1]instanceof olympe.dc.Y.tc&&this.va.push(Lf.Qo);return this}il(a,b,c){a=Nf(a);let d=null;switch(olympe.dc.La().jc(a,olympe.dm.Property.typeRel)){case olympe.dm.String.O.T():d=new olympe.dc.Eb.String(new olympe.dc.pa.se(a,c));break;case olympe.dm.Number.O.T():d=new olympe.dc.Eb.Number(new olympe.dc.pa.oe(a,c));break;case olympe.dm.DateTime.O.T():d=new olympe.dc.Eb.DateTime(new olympe.dc.pa.ne(a,c))}c=d;null!==c&&this.Y.push(new olympe.dc.Y.Jd(c,
580
- b));return this}sort(a,b,c){const d=new class extends olympe.dc.Eb.Tg{K(e,f){return a(olympe.dc.CloudObject.get(f))}G(e,f){return b(e,f).valueOf()}};this.Y.push(new olympe.dc.Y.Jd(d,c));return this}fw(){this.Y.push(new olympe.dc.Y.Ae);return this}limit(a,b){this.Y.push(new olympe.dc.Y.ae(a,b));return this}};class Of extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}
581
- function Nf(a){return'string'===typeof a||a instanceof olympe.D.$a?a:'function'===typeof a?olympe.dc.ya.Lb(a):olympe.D.ob(a)?a.Fk===olympe.D.$a?a:olympe.D.Ha([a],b=>olympe.D.Bb(olympe.dc.za(b)),olympe.D.$a):a.T()}m=olympe.dc.ck.prototype;m.uf.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.transform.L=olympe.D.J.K();m.jl.L=olympe.D.J.K();m.gz.L=olympe.D.J.K();m.Lt.L=olympe.D.J.K();m.ub.L=olympe.D.J.K();m.pw.L=olympe.D.J.K();m.Lk.L=olympe.D.J.K();m.ow.L=olympe.D.J.K();m.Kt.L=olympe.D.J.K();m.Te.L=olympe.D.J.K();
582
- m.jw.L=olympe.D.J.K();m.contains.L=olympe.D.J.K();m.Xf.L=olympe.D.J.K();m.Sk.L=olympe.D.J.K();m.kw.L=olympe.D.J.K();m.oj.L=olympe.D.J.K();m.Rk.L=olympe.D.J.K();m.Aj.L=olympe.D.J.K();m.Wx.L=olympe.D.J.K();m.filter.L=olympe.D.J.K();m.not.L=olympe.D.J.K();m.and.L=olympe.D.J.K();m.or.L=olympe.D.J.K();m.il.L=olympe.D.J.K();m.sort.L=olympe.D.J.K();m.fw.L=olympe.D.J.K();m.limit.L=olympe.D.J.K();olympe.dc.query.Lp=class{constructor(a){this.id=a;this.C=[];this.data=new olympe.dc.db.xc}F(a){this.C.push(olympe.dc.za(a))}Z(){return this.id}getData(){return this.data}};function Pf(a){return olympe.D.ob(a)?'Node#'+a.Qa.Z():String(a)}function Qf(a,b){return olympe.D.ob(b)?'{"c":"Parameter","v":"'+a.add(b)+'"}':JSON.stringify(b)}
583
- olympe.dc.query.Eu=class{constructor(){this.C=0;this.values=null}add(a){let b;b=olympe.D.ob(a)?'n'+a.Qa.Z():'p'+ ++this.C;null===this.values&&(this.values={});this.values[b]=a;return b}get(a){return this.values[a]}clear(){const a=this.values;if(null!==a)for(let b=Object.keys(a),c=b.length,d=0;d<c;d++)delete a[b[d]]}forEach(a){const b=this.values;if(null!==b)for(let c=Object.keys(b),d=c.length,e=0;e<d;e++)a(b[c[e]],c[e])}};olympe.dc.cb=class{na(){}C(){}F(){}ka(){}toString(){}};function Ie(a,b,c){return a.G.run(()=>a.P.kb(b,c))}function Je(a,b,c){return a.G.run(()=>Rf(a.P,b,c))}
584
- function rf(a,b,c){var d=olympe.dc.Ia.rb;const e=b.Z();let f=Sf(a.ua,e),g=olympe.dc.Ia.rb;null===f&&(f=qf(b,a.G),a.K||(g=xf(f)));Tf(a.ua,f,d,g);c&&bf(a.F,e,c);b=olympe.dc.ha.ja.Ci;const h=olympe.dc.ha.ja.Bi,k=l=>{if(null!==l){a.N.error(`graph subscription "${e}" failed to subscribe ${l}`);Uf(a.ua,e,d);var n=a.F;cf(n,e,n.F);c(l,null)}};g===olympe.dc.Ia.rb?(a.N.debug('QueryManager: [ID:',e,'] GraphQuery processed locally'),a.V.process(d,f,k)):(b=M(new olympe.dc.ha(f.sh.K===olympe.dc.Dd.Pi?h:b,f,[g]),
585
- k),a.N.debug('QueryManager: [ID:',e,'] sending GraphQuery to',g),a.C.send(b));return f}function sf(a,b){var c=olympe.dc.Ia.rb;const d=olympe.dc.Ia.rb;if(c===d){const e=Sf(a.ua,b).sh.K,f=Vf(a.ua,b);Uf(a.ua,b,c)&&f!==d&&e===olympe.dc.Dd.SUBSCRIBE&&(c=M(new olympe.dc.ha(olympe.dc.ha.ja.Zo,String(b),[f]),g=>{g&&a.N.error(`Unsubscription of graphdef ${b} failed: ${g.message}`)}),a.C.send(c))}else Uf(a.ua,b,c)}
586
- function tf(a,b,c){var d=olympe.dc.Ia.rb;b=qf(b,a.G);const e=b.Z();var f=a.F.C.has(e);c&&bf(a.F,e,c);if(!f){f=h=>{if(h){var k=a.F;cf(k,e,k.F);c(h,null)}};var g=xf(b);g===olympe.dc.Ia.rb?a.V.process(d,b,f):(d=M(new olympe.dc.ha(olympe.dc.ha.ja.Bi,b,[g]),f),a.C.send(d))}}
587
- function Jf(a,b){var c=olympe.dc.Ia.rb;const d=b.Od();var e=new olympe.dc.query.Eu;let f;f=d;olympe.D.ob(f)&&(f=e.add(d));b=(b=b.Ul())?Array.isArray(b)?b:[b]:null;const g=olympe.dc.query.Subscription.G(f,b,e);e=Wf(a.ua,g);null===e&&(a.N.debug('QueryMGR: new',a.K?'local':'remote','subscription "',g,'": #',`${f},`,b),e=new olympe.dc.query.Subscription(g,d,b,a.G),a.K||e.Nc());a.Fa.process(c,e,h=>{h&&(Xf(a.ua,g,c||olympe.dc.Ia.rb),a.N.error(`subscription "${g}" failed to subscribe ${h}`))});return e}
588
- function Kf(a,b){var c=olympe.dc.Ia.rb;if(c===olympe.dc.Ia.rb){const d=Vf(a.ua,b);a.N.debug('QueryMGR: [ID:',b,'] - Unregistered');Xf(a.ua,b,c)&&d!==olympe.dc.Ia.rb&&(c=M(new olympe.dc.ha(olympe.dc.ha.ja.dv,String(b),[d]),e=>{e&&a.N.error(`Unsubscription of listdef ${b} failed, ${e.message}`)}),a.C.send(c))}else Xf(a.ua,b,c)}
589
- function Yf(a){const b=olympe.dc.ha.ja.$o,c=olympe.dc.ha.ja.yl,d=olympe.dc.ha.ja.Ep;a.C.C(olympe.dc.ha.ja.Il,(e,f)=>{Zf(a,f,e)});a.C.C(b,(e,f)=>{$f(a,f,e)});a.C.C(c,(e,f)=>{a.$.bf(f,e)});a.C.C(d,(e,f)=>{ag(a,f,e)});a.C.la((e,f)=>{bg(a,f,e)})}function cg(a,b){a.N.log('Received subscribeToAll command');b=b?olympe.D.Na().F(b):void 0;const c=new olympe.dc.ha(olympe.dc.ha.ja.Xg,null,[olympe.dc.Ia.Lc]);b&&M(c,b);a.C.send(c)}
558
+ olympe.dc.query.Di=class{constructor(a,b,c,d){this.id=a;this.source=b;this.destination=c;this.C=new Map;this.Bc=d}toJSON(){let a=`{ "id": "${this.id}", "source": "${this.source}", "destination": "${this.destination}"`;a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=', "blocks": {';for(const [b,c]of this.C)a+=`"${b}": ${JSON.stringify(Array.from(c))}, `;a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=`}, "patch": ${this.Bc.toJSON()}`;return a+'}'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):
559
+ b=a;a=olympe.dc.db.xc.nc(b.patch);a=new olympe.dc.query.Di(b.id,b.source,b.destination,a);for(const [c,d]of Object.entries(b.blocks))a.C.set(c,new Set(d));return a}Z(){return this.id}};const Bf=olympe.dc.lc.Vc,Cf=olympe.dc.lc.xi,Df=olympe.dc.Ca.ORIGIN,Ef=olympe.dc.Ca.DESTINATION;function Ff(a,b,c){const d=a.rh.$;return c.filter(e=>d.reduce((f,g)=>f&&!g(b,e.Qd()),!0))}
560
+ olympe.dc.query.Sl=class extends olympe.dc.query.Vj{constructor(a,b){super(a,b);this.G=(new Set).add(a.G)}V(){return this.G.values()}ba(a){a=a.Bc;for(const b of a.fe())b.K()?this.G.delete(b.tag()):b.ue()&&this.G.add(b.tag())}la(a){let b=[],c=[];wf(a,(d,e,f)=>{b=b.concat(e.filter(g=>{if(this.G.has(g)&&this.C!==g)return!1;this.G.add(g);return!0}));c=c.concat(f.filter(g=>this.G.delete(g)))});$c(olympe.dc.xd(),b,c)}Er(a){var b=a.C,c=Array.from(a.F.values()),d=Ff(this,b,c);if(d.length===c.length&&!this.G.has(b))return!1;
561
+ b=olympe.dm.Relation.C.Bk;c=olympe.dm.Relation.C.pk;const e=olympe.dc.La();for(const h of d){var f=h.Qd(),g=f.T();d=f.Sa();if(d!==Ef||g!==Bf&&g!==Cf){if(!e.Gb(f))return this.N.info('ImplicitGraphQuery: checking coverage of graphPath',a.Z(),'failed at the relation',g,'which is not in local DB'),!1;f=Md(e,f,gf(this.rh));g=0===h.nh().length;if(!(f&(d===Df?g?12:c:g?3:b)))return!1}}return!0}};function Gf(a){let b=null;for(a=[...a.Y];null===b&&0<a.length;)b=a.pop().Zb();return b}function Hf(a,b){a.V()||(a=`Calling "${b}" on subscription with id ${a.Z()} while it is not ready (thus no data is available).`+'This call should be made within an onReady callback.',olympe.ta.Za('dc').warn(a))}
562
+ function If(a){const b=new olympe.D.Xb('listDef toObservable');return new rxjs.Observable(c=>{b.run(()=>{olympe.D.wc([a],d=>{c.next(d.valueOf())})});b.onDestroy(()=>{c.complete()});return b.destroy.bind(b)})}
563
+ olympe.dc.Da=class{constructor(a,b,c){void 0===a||null===a?olympe.ta.Za('dc').warn('attempt to create a listdef with a null or undefind basetag. This listdef is thus without effect.'):(this.F=olympe.D.Ha([a],olympe.dc.za,String),this.Y=void 0!==b&&(Array.isArray(b)?b:[b])||[],this.valueType=c||Gf(this),this.C=null)}Sc(){return olympe.dc.Sc()}kb(){if(null===this.C){const a=olympe.dc.Rf();this.C=Jf(a,this);null!==this.valueType&&this.C.Ed(this.valueType);olympe.D.Na().P(()=>{Kf(a,this.C.Z());this.C=
564
+ null})}return this}tc(){null===this.C&&this.kb();return this.C}Ed(a){this.valueType=a;null!==this.C&&this.C.Ed(this.valueType)}Zb(){return null!==this.C?this.C.Zb():null===this.valueType?olympe.dc.CloudObject:this.valueType}Nd(){return this.F}Vl(){return this.Y}je(a,b){return this.tc().je(a,b)}vj(a){this.tc().vj(a)}Kt(){return this.tc().be()}Jt(){return this.tc().V()}get(a){return this.tc().get(a)}gi(){return this.tc().gi()}oh(a){const b=this.tc();Hf(b,'getCurrent');return b.oh(a)}has(a){return this.tc().has(a)}Ig(a){const b=
565
+ this.tc();Hf(b,'hasCurrent');return b.Ig(a)}te(a){return this.tc().te(a)}oy(a){return If(this.te(a))}We(a){const b=this.tc();Hf(b,'getCurrentAt');return b.We(a)}Xe(a){return this.tc().Xe(a)}Kf(a){const b=this.tc();Hf(b,'getCurrentKeyAt');return b.Kf(a)}he(a){return this.tc().he(a)}ty(a){return If(this.he(a))}Lf(a){const b=this.tc();Hf(b,'getCurrentRank');return b.Lf(a)}Rc(){return this.tc().Rc()}py(){return If(this.Rc())}Mf(){return this.tc().Mf()}sf(){return this.tc().sf()}uy(){return If(this.sf())}Dg(){const a=
566
+ this.tc();Hf(a,'getCurrentSize');return a.Dg()}forEach(a,b){this.tc().forEach(a,b)}ce(a){const b=this.tc();Hf(b,'forEachCurrentValue');return b.ce(a)}gj(a,b,c,d){a=new olympe.dc.Y.$d(a,b);(new olympe.dc.Da(this.F,[...this.Y,a],this.valueType)).forEach(c,d)}transform(...a){var b=a;if(Array.isArray(a[0])){if(1<a.length)throw Error('ListDef.transform() should be called either with one array argument, or with ... arguments, but not both');b=a[0]}a=[...this.Y];for(const c of b){if(void 0===c)throw Error('ListDef.transform(): Trying to set an undefined transformer');
567
+ if(c instanceof olympe.dc.ua.Property)throw Error(`ListDef.transform(): Properties cannot be used as transformer, unlike relations ${c}`);if(!c||'function'!==typeof c.getTransform)break;a.push(c)}b=new olympe.dc.Da(this.F,a);b.Ed(Gf(b)||this.valueType||Object);return b}kl(a){return this.transform(new olympe.dc.Y.Af(a))}filter(a){return this.transform(new olympe.dc.Y.rc(a))}zg(){const a=new olympe.dc.dk(this.F,null===this.valueType?void 0:this.valueType);let b=this.Y;b instanceof Array||(b=b?[b]:[]);
568
+ a.transform(b);return a}toString(){let a=this.Y;a=a?', '+(a.join?a.join(', '):a.toString()):'';return'ListDef(#'+olympe.D.Xa(this.F)+a+')'}It(){return this.tc().Yg()}Tc(){return olympe.D.Ha([this.sf()],a=>{let b='[';for(let c=0;c<a;c++){const d=this.We(c).toString();b=0<c&&c<a?b+(', '+d):b+d}return olympe.D.Bb(b+']')},olympe.D.$a)}};olympe.dc.Da.prototype.filter=olympe.dc.Da.prototype.filter;olympe.dc.Da.prototype.union=olympe.dc.Da.prototype.kl;olympe.dc.Da.prototype.transform=olympe.dc.Da.prototype.transform;
569
+ olympe.dc.Da.prototype.forEachCurrentValue=olympe.dc.Da.prototype.ce;olympe.dc.Da.prototype.forEach=olympe.dc.Da.prototype.forEach;olympe.dc.Da.prototype.getCurrentSize=olympe.dc.Da.prototype.Dg;olympe.dc.Da.prototype.observeSize=olympe.dc.Da.prototype.uy;olympe.dc.Da.prototype.observeFirst=olympe.dc.Da.prototype.py;olympe.dc.Da.prototype.getCurrentRank=olympe.dc.Da.prototype.Lf;olympe.dc.Da.prototype.observeRank=olympe.dc.Da.prototype.ty;olympe.dc.Da.prototype.getCurrentAt=olympe.dc.Da.prototype.We;
570
+ olympe.dc.Da.prototype.observeAt=olympe.dc.Da.prototype.oy;olympe.dc.Da.prototype.offReady=olympe.dc.Da.prototype.vj;olympe.dc.Da.prototype.onReady=olympe.dc.Da.prototype.je;olympe.dc.Da.prototype.getBaseTag=olympe.dc.Da.prototype.Nd;olympe.dc.Da.ma=[olympe.D.od];m=olympe.dc.Da.prototype;m.Sc.L=olympe.D.J.C;m.kb.L=olympe.D.J.K();m.tc.L=new olympe.D.J(()=>olympe.dc.query.Subscription,[]);m.Ed.L=new olympe.D.J(()=>{},[]);m.Nd.L=new olympe.D.J(()=>String,[]);m.Vl.L=new olympe.D.J(()=>Array,[]);
571
+ m.je.L=new olympe.D.J(()=>String,[]);m.vj.L=new olympe.D.J(()=>{},[]);m.Kt.L=olympe.D.J.P;m.Jt.L=olympe.D.J.C;m.get.L=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.gi.L=new olympe.D.J(()=>Array,[]);m.oh.L=olympe.D.J.C;m.has.L=olympe.D.J.P;m.Ig.L=olympe.D.J.C;m.te.L=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.We.L=olympe.D.J.C;m.Xe.L=new olympe.D.J(()=>String,[]);m.Kf.L=olympe.D.J.C;m.he.L=olympe.D.J.G;m.Lf.L=olympe.D.J.C;
572
+ m.Rc.L=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Mf.L=new olympe.D.J(()=>String,[]);m.sf.L=olympe.D.J.G;m.Dg.L=olympe.D.J.C;m.forEach.L=new olympe.D.J(()=>{},[]);m.ce.L=olympe.D.J.C;m.gj.L=new olympe.D.J(()=>{},[]);m.transform.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.kl.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.filter.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.zg.L=new olympe.D.J(()=>olympe.dc.dk,[]);m.toString.L=olympe.D.J.C;m.It.L=olympe.D.J.C;m.Tc.L=olympe.D.J.F;const Lf={lz:'append',Gl:'filter_not',Qo:'filter_and',Ro:'filter_or'};function Mf(a,b){a=Nf(a);a=olympe.dc.CloudObject.get(a);return(new olympe.dc.pa.Qn(a,b)).F}
573
+ olympe.dc.dk=class{constructor(a,b){this.C=Nf(a);this.N=olympe.dc.Rf().Za();this.valueType=void 0===b?olympe.dc.CloudObject:b;this.Y=[];this.va=[]}tf(){return new olympe.dc.Da(this.C,this.Y,this.valueType)}transform(a){for(let b=0,c=a.length,d;b<c;b++){d=a[b];if(void 0===d)throw new Of('transform','Trying to set an undefined transformer');if(d instanceof olympe.dc.ua.Property)throw new Of('transform','Properties cannot be used as transformer, unlike relations '+d);if(!d||'function'!==typeof d.getTransform)throw new Of('transform',
574
+ 'one of the argument is not a Transformer '+d);const e=d.Zb();null!==e&&(this.valueType=e);this.Y.push(d)}return this}kl(a){this.Y.push(new olympe.dc.Y.Af(a));return this}iz(a){this.Y.push(new olympe.dc.Y.Af(Nf(a)));return this}Mt(a){this.valueType=a;return this}ub(a){this.Y.push(a);this.valueType=a.Zb()||olympe.dc.CloudObject;return this}qw(a){for(const b of a)this.Y.push(b),this.valueType=b.Zb()||olympe.dc.CloudObject;return this}Mk(a,b,c){a=new olympe.dc.Y.Dc(a,a.Sa(),b,c);this.Y.push(a);this.valueType=
575
+ a.Zb()||olympe.dc.CloudObject;return this}pw(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.T());void 0===c&&(c=e.Sa())}a=new olympe.dc.Y.Fe(b,c);this.Y.push(a);this.valueType=a.Zb()||olympe.dc.CloudObject;return this}Lt(){this.ub(olympe.dc.CloudObject.instancesRel);return this}Ue(a){var b=this.va.pop();b===Lf.Gl&&(a=new olympe.dc.W.ld(a),b=this.va.pop());switch(b){case Lf.Qo:b=this.Y.pop().C;b instanceof olympe.dc.W.Td?(b=b.W,b.push(a),a=new olympe.dc.W.Td(...b)):a=new olympe.dc.W.Td(b,
576
+ a);b=this.va.pop();break;case Lf.Ro:b=this.Y.pop().C,b instanceof olympe.dc.W.ae?(b=b.W,b.push(a),a=new olympe.dc.W.ae(...b)):a=new olympe.dc.W.ae(b,a),b=this.va.pop()}b===Lf.Gl&&(a=new olympe.dc.W.ld(a),this.va.pop());this.Y.push(new olympe.dc.Y.rc(a));return this}kw(a,b,c){return this.Ue(new olympe.dc.W.Gc(Mf(a,c),new olympe.dc.pa.Bd(b)))}contains(a,b,c=!1,d){return this.Ue(new olympe.dc.W.Uc(Mf(a,d),new olympe.dc.pa.Bd(b),c))}Vf(a){if(!(a instanceof Array))throw new Of('instanceOf','Provided argument "models" must be an array.');
577
+ const b=[];for(let c=0;c<a.length;c++)b.push(Nf(a[c]));return this.Ue(new olympe.dc.W.rf(b))}Tk(a){return this.Ue(new olympe.dc.W.Gc(new olympe.dc.pa.yf,new olympe.dc.pa.Bd(Nf(a))))}lw(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<a.length){this.not().Tk(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().not().Tk(a[b])}return this}pj(a,b){if(!(a instanceof Array))throw new Of('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];
578
+ a.forEach(e=>{c.push(e);d.push(e.Sa())});return this.Ue(new olympe.dc.W.pf(c,d,b))}Sk(a,b,c){a=Mf(a,c);return this.Ue(new olympe.dc.W.Ce(a,new olympe.dc.pa.Bd(b)))}Bj(a,b,c){a=Mf(a,c);return this.Ue(new olympe.dc.W.Je(a,new olympe.dc.pa.Bd(b)))}Yx(a,b,c,d){a=Mf(a,d);return this.Ue(new olympe.dc.W.vd(a,b,c))}filter(a){const b=new class extends olympe.dc.W.Sg{C(c,d){return a(olympe.dc.CloudObject.get(d))}};return this.Ue(b)}not(){this.va.push(Lf.Gl);return this}and(){this.Y[this.Y.length-1]instanceof
579
+ olympe.dc.Y.rc&&this.va.push(Lf.Qo);return this}or(){this.Y[this.Y.length-1]instanceof olympe.dc.Y.rc&&this.va.push(Lf.Ro);return this}jl(a,b,c){a=Nf(a);let d=null;switch(olympe.dc.La().ic(a,olympe.dm.Property.typeRel)){case olympe.dm.String.O.T():d=new olympe.dc.Db.String(new olympe.dc.pa.se(a,c));break;case olympe.dm.Number.O.T():d=new olympe.dc.Db.Number(new olympe.dc.pa.oe(a,c));break;case olympe.dm.DateTime.O.T():d=new olympe.dc.Db.DateTime(new olympe.dc.pa.ne(a,c))}c=d;null!==c&&this.Y.push(new olympe.dc.Y.Id(c,
580
+ b));return this}sort(a,b,c){const d=new class extends olympe.dc.Db.Sg{K(e,f){return a(olympe.dc.CloudObject.get(f))}G(e,f){return b(e,f).valueOf()}};this.Y.push(new olympe.dc.Y.Id(d,c));return this}gw(){this.Y.push(new olympe.dc.Y.Ae);return this}limit(a,b){this.Y.push(new olympe.dc.Y.$d(a,b));return this}};class Of extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}
581
+ function Nf(a){return'string'===typeof a||a instanceof olympe.D.$a?a:'function'===typeof a?olympe.dc.ya.Lb(a):olympe.D.ob(a)?a.Gk===olympe.D.$a?a:olympe.D.Ha([a],b=>olympe.D.Bb(olympe.dc.za(b)),olympe.D.$a):a.T()}m=olympe.dc.dk.prototype;m.tf.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.transform.L=olympe.D.J.K();m.kl.L=olympe.D.J.K();m.iz.L=olympe.D.J.K();m.Mt.L=olympe.D.J.K();m.ub.L=olympe.D.J.K();m.qw.L=olympe.D.J.K();m.Mk.L=olympe.D.J.K();m.pw.L=olympe.D.J.K();m.Lt.L=olympe.D.J.K();m.Ue.L=olympe.D.J.K();
582
+ m.kw.L=olympe.D.J.K();m.contains.L=olympe.D.J.K();m.Vf.L=olympe.D.J.K();m.Tk.L=olympe.D.J.K();m.lw.L=olympe.D.J.K();m.pj.L=olympe.D.J.K();m.Sk.L=olympe.D.J.K();m.Bj.L=olympe.D.J.K();m.Yx.L=olympe.D.J.K();m.filter.L=olympe.D.J.K();m.not.L=olympe.D.J.K();m.and.L=olympe.D.J.K();m.or.L=olympe.D.J.K();m.jl.L=olympe.D.J.K();m.sort.L=olympe.D.J.K();m.gw.L=olympe.D.J.K();m.limit.L=olympe.D.J.K();olympe.dc.query.Mp=class{constructor(a){this.id=a;this.C=[];this.data=new olympe.dc.db.xc}F(a){this.C.push(olympe.dc.za(a))}Z(){return this.id}getData(){return this.data}};function Pf(a){return olympe.D.ob(a)?'Node#'+a.Qa.Z():String(a)}function Qf(a,b){return olympe.D.ob(b)?'{"c":"Parameter","v":"'+a.add(b)+'"}':JSON.stringify(b)}
583
+ olympe.dc.query.Fu=class{constructor(){this.C=0;this.values=null}add(a){let b;b=olympe.D.ob(a)?'n'+a.Qa.Z():'p'+ ++this.C;null===this.values&&(this.values={});this.values[b]=a;return b}get(a){return this.values[a]}clear(){const a=this.values;if(null!==a)for(let b=Object.keys(a),c=b.length,d=0;d<c;d++)delete a[b[d]]}forEach(a){const b=this.values;if(null!==b)for(let c=Object.keys(b),d=c.length,e=0;e<d;e++)a(b[c[e]],c[e])}};olympe.dc.cb=class{na(){}C(){}F(){}ka(){}toString(){}};function Ie(a,b,c){return a.G.run(()=>a.P.kb(b,c))}function Je(a,b,c){return a.G.run(()=>Rf(a.P,b,c))}
584
+ function rf(a,b,c){var d=olympe.dc.Ia.rb;const e=b.Z();let f=Sf(a.ua,e),g=olympe.dc.Ia.rb;null===f&&(f=qf(b,a.G),a.K||(g=xf(f)));Tf(a.ua,f,d,g);c&&bf(a.F,e,c);b=olympe.dc.ha.ja.Bi;const h=olympe.dc.ha.ja.Ai,k=l=>{if(null!==l){a.N.error(`graph subscription "${e}" failed to subscribe ${l}`);Uf(a.ua,e,d);var n=a.F;cf(n,e,n.F);c(l,null)}};g===olympe.dc.Ia.rb?(a.N.debug('QueryManager: [ID:',e,'] GraphQuery processed locally'),a.V.process(d,f,k)):(b=M(new olympe.dc.ha(f.rh.K===olympe.dc.Cd.Pi?h:b,f,[g]),
585
+ k),a.N.debug('QueryManager: [ID:',e,'] sending GraphQuery to',g),a.C.send(b));return f}function sf(a,b){var c=olympe.dc.Ia.rb;const d=olympe.dc.Ia.rb;if(c===d){const e=Sf(a.ua,b).rh.K,f=Vf(a.ua,b);Uf(a.ua,b,c)&&f!==d&&e===olympe.dc.Cd.SUBSCRIBE&&(c=M(new olympe.dc.ha(olympe.dc.ha.ja.$o,String(b),[f]),g=>{g&&a.N.error(`Unsubscription of graphdef ${b} failed: ${g.message}`)}),a.C.send(c))}else Uf(a.ua,b,c)}
586
+ function tf(a,b,c){var d=olympe.dc.Ia.rb;b=qf(b,a.G);const e=b.Z();var f=a.F.C.has(e);c&&bf(a.F,e,c);if(!f){f=h=>{if(h){var k=a.F;cf(k,e,k.F);c(h,null)}};var g=xf(b);g===olympe.dc.Ia.rb?a.V.process(d,b,f):(d=M(new olympe.dc.ha(olympe.dc.ha.ja.Ai,b,[g]),f),a.C.send(d))}}
587
+ function Jf(a,b){var c=olympe.dc.Ia.rb;const d=b.Nd();var e=new olympe.dc.query.Fu;let f;f=d;olympe.D.ob(f)&&(f=e.add(d));b=(b=b.Vl())?Array.isArray(b)?b:[b]:null;const g=olympe.dc.query.Subscription.G(f,b,e);e=Wf(a.ua,g);null===e&&(a.N.debug('QueryMGR: new',a.K?'local':'remote','subscription "',g,'": #',`${f},`,b),e=new olympe.dc.query.Subscription(g,d,b,a.G),a.K||e.Nc());a.Fa.process(c,e,h=>{h&&(Xf(a.ua,g,c||olympe.dc.Ia.rb),a.N.error(`subscription "${g}" failed to subscribe ${h}`))});return e}
588
+ function Kf(a,b){var c=olympe.dc.Ia.rb;if(c===olympe.dc.Ia.rb){const d=Vf(a.ua,b);a.N.debug('QueryMGR: [ID:',b,'] - Unregistered');Xf(a.ua,b,c)&&d!==olympe.dc.Ia.rb&&(c=M(new olympe.dc.ha(olympe.dc.ha.ja.ev,String(b),[d]),e=>{e&&a.N.error(`Unsubscription of listdef ${b} failed, ${e.message}`)}),a.C.send(c))}else Xf(a.ua,b,c)}
589
+ function Yf(a){const b=olympe.dc.ha.ja.ap,c=olympe.dc.ha.ja.zl,d=olympe.dc.ha.ja.Fp;a.C.C(olympe.dc.ha.ja.Jl,(e,f)=>{Zf(a,f,e)});a.C.C(b,(e,f)=>{$f(a,f,e)});a.C.C(c,(e,f)=>{a.$.af(f,e)});a.C.C(d,(e,f)=>{ag(a,f,e)});a.C.la((e,f)=>{bg(a,f,e)})}function cg(a,b){a.N.log('Received subscribeToAll command');b=b?olympe.D.Na().F(b):void 0;const c=new olympe.dc.ha(olympe.dc.ha.ja.Wg,null,[olympe.dc.Ia.Lc]);b&&M(c,b);a.C.send(c)}
590
590
  function Zf(a,b,c=olympe.dc.Ia.rb){b.destination!==olympe.dc.Ia.rb?a.N.error(`Graphdefs registered from peers is not supported yet ! (id: ${b.Z()})`):a.la.process(c,b,d=>{d&&a.N.error(`An error occurred during the process of a graphdef result ${b.Z()}: ${d.message}`)})}
591
591
  function $f(a,b,c=olympe.dc.Ia.rb){const d=dg(a.ua,b.Z());0!==d.length&&(1<d.length||d[0]!==olympe.dc.Ia.rb?a.N.error(`Notification received for graphdefs subscription registered from peers. Not supported yet ! (id: ${b.Z()})`):a.ba.process(c,b,e=>{e&&a.N.error(`An error occurred during the process of a graphNotification ${b.Z()}`)}))}
592
592
  function ag(a,b,c=olympe.dc.Ia.rb){const d=eg(a.ua,b.Z());1<d.length||d[0]!==olympe.dc.Ia.rb?a.N.error(`Listdefs registered from peers is not supported yet ! (id: ${b.Z()})`):a.qa.process(c,b,e=>{e&&a.N.error(`An error occurred during the process of a listNotification ${b.Z()}`)})}
593
- function bg(a,b,c){a.N.debug('Source event',b,'received for source',c);if(b===olympe.dc.vk.bq){const d=(e,f)=>{f&&a.N.error(`Error after trying to resubscribe to ${e}: ${f}`)};fg(a.ua,c).forEach(e=>{bf(a.F,e.Z(),d.bind(a,e.Z()));a.N.debug(`resubscribing graph subscription ${e.Z()} to destination : ${c}`);e=M(new olympe.dc.ha(olympe.dc.ha.ja.Ci,e,[c]),d.bind(a,e.Z()));a.C.send(e)});gg(a.ua,c).forEach(e=>{a.N.debug(`resubscribing list subscription ${e.Z()} to destination : ${c}`);e=M(new olympe.dc.ha(olympe.dc.ha.ja.av,
594
- e,[c]),d.bind(a,e.Z()));a.C.send(e)})}}olympe.dc.query.Ku=class{constructor(a,b,c,d,e,f,g,h){this.N=a;this.K=b;this.C=c;this.$=d;this.ua=e;this.F=f;this.G=new olympe.D.$b('Query Manager context');this.Fa=g[0];this.V=g[1];this.la=g[2];this.ba=g[3];this.qa=g[4];this.P=h;Yf(this)}Za(){return this.N}};olympe.dc.query.Relation=class extends olympe.dc.ua.Relation{constructor(a,b,c){super(a,b);this.recursive=c}toJSON(){let a='{ "tag": '+JSON.stringify(this.T())+', ';a+='"direction": '+JSON.stringify(this.Sa())+', ';a+='"recursive": '+JSON.stringify(this.recursive);return a+'}'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.query.Relation(b.tag,b.direction,b.recursive)}static from(a){return new olympe.dc.query.Relation(a.T(),a.Sa(),a instanceof olympe.dc.Y.Dc)}zc(){const a=
595
- olympe.dc.Ca.DESTINATION,b=olympe.dc.Ca.ORIGIN;return new olympe.dc.query.Relation(this.tag,this.direction===a?b:a,this.recursive)}toString(){return`${this.direction}${this.tag}${this.recursive?'-r':''}`}};olympe.dc.query.Subscription=class a extends olympe.D.Fj{constructor(b,c,d,e){super(olympe.dc.CloudObject,new olympe.D.$b('context subscription '+b,e));this.id=b;this.Md=c;this.Y=d||null;this.G=this.P.run(()=>olympe.D.ke(olympe.dc.query.Subscription.C.INIT));this.wd=!1;this.ba=this.qd=null}static G(b,c,d){let e;try{e=b;if(c)for(let f=0,g=c.length;f<g;f++)e+='|'+c[f].ka(d);else e+='|null';e=olympe.X.pb(e)}catch(f){e=olympe.X.bc()}return e}Z(){return this.id}Od(){return this.Md}Jg(){return this.Y}Nc(){const b=
596
- olympe.dc.La(),c=olympe.D.Xa(this.Od());return c?b.bg(c)?b.source(c)||olympe.dc.Ia.Lc:olympe.dc.Ia.rb:olympe.dc.Ia.Lc}Ye(){const b=this.G.Qa.Kb;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.Oq}uh(){if(this.G.Qa.G())throw Error(`Cannot set destroyed subscription '${this.id}' as subscribed`);const b=this.qd;this.qd=null;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c))b[c](this);tb(this.G,olympe.D.ke(olympe.dc.query.Subscription.C.Oq))}ce(){return olympe.D.Ha([this.G],()=>{},olympe.D.ra)}V(){const b=
597
- this.G.Qa.Kb;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.wq}je(b,c){this.V()?b(this):(null===this.ba&&(this.ba=new Map),void 0===c&&(c=olympe.X.bc()),this.ba.set(c,olympe.D.Na().F(b)));return c||''}uj(b){null!==this.ba&&b&&this.ba.delete(b)}uc(){const b=olympe.dc.query.Subscription.C.wq;if(!this.G.Qa.G()&&olympe.D.Xa(this.G)!==b&&(this.Gf(),tb(this.G,b),null!==this.ba)){for(const c of this.ba.values())c(this);this.ba=null}}onDestroy(b){this.P.onDestroy(b)}release(){this.P.destroy()}xb(b){if(!this.G.Qa.G()){for(let c=
598
- 0,d=b.length;c<d;c++)this.Jm(b[c],c);if(this.V())this.Gf();else{this.wd=b=!0;for(let c in this.F)if(Object.prototype.hasOwnProperty.call(this.F,c)&&!Object.prototype.hasOwnProperty.call(this.values,c)){b=!1;break}b&&this.uc()}}}$c(b){const c=this.F;for(let d in c)Object.prototype.hasOwnProperty.call(c,d)&&b(c[d],d)}fc(b,c){if(!this.G.Qa.G()&&(this.Hk(b,olympe.dc.CloudObject.get(c)),b=this.V(),this.wd&&!b)){b=!0;for(let d in this.F)if(Object.prototype.hasOwnProperty.call(this.F,d)&&!Object.prototype.hasOwnProperty.call(this.values,
599
- d)){b=!1;break}b&&this.uc()}}hc(b){this.G.Qa.G()||(this.Im(b),this.Yi(b,!this.V()))}Zg(){return this.V()?super.Zg():'Subscription is not ready!'}Nd(){const b=olympe.D.Xa(this.Od());return olympe.dc.query.Subscription.F(b,this.Jg())}static F(b,c){var d=new olympe.dc.pf(b,olympe.dc.Dd.SUBSCRIBE);if(null===c)return[d];b=[];b.push(d);for(let e=0,f=c.length;e<f;e++){const g=c[e];if(g instanceof olympe.dc.Y.Sb||g instanceof olympe.dc.Y.Dc)b.forEach(h=>{const k=olympe.dc.query.Relation.from(g);h.ub(k,k.recursive)});
600
- else if(g instanceof olympe.dc.Y.Cf)d=a.F(olympe.D.Xa(g.Od()),g.Jg()),b.push(...d);else if(g instanceof olympe.dc.Y.tc||g instanceof olympe.dc.Y.Jd){const h=g.F();b.forEach(k=>{for(const l of h){for(const n of l)k.ub(n,n.recursive);Ee(k,l.length)}})}}return b}};olympe.dc.query.Subscription.C={INIT:0,Oq:1,wq:2};olympe.dc.query.Subscription.prototype.Zg.L=olympe.D.J.C;function Wf(a,b){return a.F.has(b)?a.F.get(b).F():null}function Xf(a,b,c){return hg(a,a.F,b,c)}function Vf(a,b){for(const [c,d]of a.K)if(d.has(b))return c;return null}function Sf(a,b){return a.C.has(b)?a.C.get(b).F():null}function Tf(a,b,c,d){const e=b.Z();let f=a.C.get(e);void 0===f&&(f=new olympe.dc.query.ua.pt(b,a.P,a),a.C.set(e,f));f.K(c);ig(a,e,d)}function Uf(a,b,c){return hg(a,a.C,b,c)}function dg(a,b){return(a=a.C.get(b))?Array.from(a.C.keys()):[]}
593
+ function bg(a,b,c){a.N.debug('Source event',b,'received for source',c);if(b===olympe.dc.wk.cq){const d=(e,f)=>{f&&a.N.error(`Error after trying to resubscribe to ${e}: ${f}`)};fg(a.ua,c).forEach(e=>{bf(a.F,e.Z(),d.bind(a,e.Z()));a.N.debug(`resubscribing graph subscription ${e.Z()} to destination : ${c}`);e=M(new olympe.dc.ha(olympe.dc.ha.ja.Bi,e,[c]),d.bind(a,e.Z()));a.C.send(e)});gg(a.ua,c).forEach(e=>{a.N.debug(`resubscribing list subscription ${e.Z()} to destination : ${c}`);e=M(new olympe.dc.ha(olympe.dc.ha.ja.bv,
594
+ e,[c]),d.bind(a,e.Z()));a.C.send(e)})}}olympe.dc.query.Lu=class{constructor(a,b,c,d,e,f,g,h){this.N=a;this.K=b;this.C=c;this.$=d;this.ua=e;this.F=f;this.G=new olympe.D.Xb('Query Manager context');this.Fa=g[0];this.V=g[1];this.la=g[2];this.ba=g[3];this.qa=g[4];this.P=h;Yf(this)}Za(){return this.N}};olympe.dc.query.Relation=class extends olympe.dc.ua.Relation{constructor(a,b,c){super(a,b);this.recursive=c}toJSON(){let a='{ "tag": '+JSON.stringify(this.T())+', ';a+='"direction": '+JSON.stringify(this.Sa())+', ';a+='"recursive": '+JSON.stringify(this.recursive);return a+'}'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.query.Relation(b.tag,b.direction,b.recursive)}static from(a){return new olympe.dc.query.Relation(a.T(),a.Sa(),a instanceof olympe.dc.Y.Dc)}zc(){const a=
595
+ olympe.dc.Ca.DESTINATION,b=olympe.dc.Ca.ORIGIN;return new olympe.dc.query.Relation(this.tag,this.direction===a?b:a,this.recursive)}toString(){return`${this.direction}${this.tag}${this.recursive?'-r':''}`}};olympe.dc.query.Subscription=class a extends olympe.D.Gj{constructor(b,c,d,e){super(olympe.dc.CloudObject,new olympe.D.Xb('context subscription '+b,e));this.id=b;this.Md=c;this.Y=d||null;this.G=this.P.run(()=>olympe.D.ke(olympe.dc.query.Subscription.C.INIT));this.Ld=!1;this.ba=this.qd=null}static G(b,c,d){let e;try{e=b;if(c)for(let f=0,g=c.length;f<g;f++)e+='|'+c[f].ka(d);else e+='|null';e=olympe.X.pb(e)}catch(f){e=olympe.X.bc()}return e}Z(){return this.id}Nd(){return this.Md}Gg(){return this.Y}Nc(){const b=
596
+ olympe.dc.La(),c=olympe.D.Xa(this.Nd());return c?b.$f(c)?b.source(c)||olympe.dc.Ia.Lc:olympe.dc.Ia.rb:olympe.dc.Ia.Lc}sh(){const b=this.G.Qa.Kb;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.Pq}uh(){if(this.G.Qa.C())throw Error(`Cannot set destroyed subscription '${this.id}' as subscribed`);const b=this.qd;this.qd=null;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c))b[c](this);tb(this.G,olympe.D.ke(olympe.dc.query.Subscription.C.Pq))}be(){return olympe.D.Ha([this.G],()=>{},olympe.D.ra)}V(){const b=
597
+ this.G.Qa.Kb;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.xq}je(b,c){this.V()?b(this):(null===this.ba&&(this.ba=new Map),void 0===c&&(c=olympe.X.bc()),this.ba.set(c,olympe.D.Na().F(b)));return c||''}vj(b){null!==this.ba&&b&&this.ba.delete(b)}uc(){const b=olympe.dc.query.Subscription.C.xq;if(!this.G.Qa.C()&&olympe.D.Xa(this.G)!==b&&(this.Ef(),tb(this.G,b),null!==this.ba)){for(const c of this.ba.values())c(this);this.ba=null}}onDestroy(b){this.P.onDestroy(b)}release(){this.P.destroy()}xb(b){if(!this.G.Qa.C()){for(let c=
598
+ 0,d=b.length;c<d;c++)this.Km(b[c],c);if(this.V())this.Ef();else{this.Ld=b=!0;for(let c in this.F)if(Object.prototype.hasOwnProperty.call(this.F,c)&&!Object.prototype.hasOwnProperty.call(this.values,c)){b=!1;break}b&&this.uc()}}}$c(b){const c=this.F;for(let d in c)Object.prototype.hasOwnProperty.call(c,d)&&b(c[d],d)}fc(b,c){if(!this.G.Qa.C()&&(this.Ik(b,olympe.dc.CloudObject.get(c)),b=this.V(),this.Ld&&!b)){b=!0;for(let d in this.F)if(Object.prototype.hasOwnProperty.call(this.F,d)&&!Object.prototype.hasOwnProperty.call(this.values,
599
+ d)){b=!1;break}b&&this.uc()}}mc(b){this.G.Qa.C()||(this.Jm(b),this.Zi(b,!this.V()))}Yg(){return this.V()?super.Yg():'Subscription is not ready!'}de(){const b=olympe.D.Xa(this.Nd());return olympe.dc.query.Subscription.F(b,this.Gg())}static F(b,c){var d=new olympe.dc.nf(b,olympe.dc.Cd.SUBSCRIBE);if(null===c)return[d];b=[];b.push(d);for(let e=0,f=c.length;e<f;e++){const g=c[e];if(g instanceof olympe.dc.Y.Sb||g instanceof olympe.dc.Y.Dc)b.forEach(h=>{const k=olympe.dc.query.Relation.from(g);h.ub(k,k.recursive)});
600
+ else if(g instanceof olympe.dc.Y.Af)d=a.F(olympe.D.Xa(g.Nd()),g.Gg()),b.push(...d);else if(g instanceof olympe.dc.Y.rc||g instanceof olympe.dc.Y.Id){const h=g.F();b.forEach(k=>{for(const l of h){for(const n of l)k.ub(n,n.recursive);Ee(k,l.length)}})}}return b}};olympe.dc.query.Subscription.C={INIT:0,Pq:1,xq:2};olympe.dc.query.Subscription.prototype.Yg.L=olympe.D.J.C;function Wf(a,b){return a.F.has(b)?a.F.get(b).F():null}function Xf(a,b,c){return hg(a,a.F,b,c)}function Vf(a,b){for(const [c,d]of a.K)if(d.has(b))return c;return null}function Sf(a,b){return a.C.has(b)?a.C.get(b).F():null}function Tf(a,b,c,d){const e=b.Z();let f=a.C.get(e);void 0===f&&(f=new olympe.dc.query.ua.qt(b,a.P,a),a.C.set(e,f));f.K(c);ig(a,e,d)}function Uf(a,b,c){return hg(a,a.C,b,c)}function dg(a,b){return(a=a.C.get(b))?Array.from(a.C.keys()):[]}
601
601
  function eg(a,b){return(a=a.F.get(b))?Array.from(a.C.keys()):[]}function fg(a,b){const c=new Set;(a.K.get(b)||new Set).forEach(d=>{(d=a.C.get(d))&&c.add(d.F())});return c}function gg(a,b){const c=new Set;(a.K.get(b)||new Set).forEach(d=>{(d=a.F.get(d))&&c.add(d.F())});return c}function jg(a,b,c){a=a.F.get(b);if(void 0===a)throw Error(`Check if the subscription ${b} has been processed, but it has never been registered`);b=a.G.get(c);a.G.set(c,!0);return b||!1}
602
- function ig(a,b,c){let d=a.K.get(c);d?d.add(b):(d=(new Set).add(b),a.K.set(c,d))}function kg(a,b,c){var d=olympe.dc.Ia.rb;const e=b.Z();let f=a.F.get(e);void 0===f&&(f=new olympe.dc.query.ua.iu(b,a.P),a.F.set(e,f));f.K(c);ig(a,e,d)}function hg(a,b,c,d){if(!b.has(c))return!1;const e=b.get(c);var f=e.C.get(d)-1;0===f?(e.C.delete(d),e.G.delete(d),f=0===e.C.size):(e.C.set(d,f),f=!1);return f?((d=Vf(a,c))&&a.K.get(d).delete(c),e.F().release(),b.delete(c),!0):0===e.C.get(d)}
603
- function lg(a,b){const c=b.Z();let d=a.G.get(c);d||(d=new olympe.dc.query.ua.Lu(b),a.G.set(c,d));d.counter++;return d}function mg(a){a.G.forEach(b=>b.update())}function ng(a,b,c){const d=a.C.get(b);d?c instanceof olympe.dc.query.Subscription?og(d,c):pg(d,c):a.N.error(`Try to set the subscription ${c.Z()} as covered by a graphquery that is not registered (${b}).`)}olympe.dc.query.jv=class{constructor(a,b){this.N=a;this.C=new Map;this.F=new Map;this.G=new Map;this.V=new Set;this.K=new Map;this.P=b}};olympe.dc.Yc=class{na(){}Yb(){}getTransform(){}ka(){}toString(){}};olympe.dc.rq=class{F(){}};olympe.dc.Ef=class{na(){}getValue(){}C(){}ka(){}toString(){}};olympe.dc.query.R={Ea:'olympe.dc.query.Logger',Aa:'olympe.dc.query.QueryManager'};olympe.dc.query.Mb={Pe:'olympe.dc.query.SubscriptionRegistry',Jj:'olympe.dc.query.CallbackRegistry',bp:'olympe.dc.query.GraphProcessor',ap:'olympe.dc.query.GraphNotificationProcessor',cp:'olympe.dc.query.GraphResultProcessor',Fp:'olympe.dc.query.ListProcessor',bk:'olympe.dc.query.ListNotificationProcessor',tq:'olympe.dc.query.QueryProcessor',ul:'olympe.dc.query.CoverageProcessor'};olympe.dc.query.Config={Pq:'subscription.debug'};
604
- olympe.U.config(function(a){E(a,olympe.dc.query.Config.Pq,!1);C(a,olympe.dc.query.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('dc.query'));A(a,olympe.dc.query.Mb.Pe,olympe.dc.query.jv,olympe.dc.query.R.Ea,new olympe.U.fa(olympe.dc.query.Config.Pq));A(a,olympe.dc.query.Mb.Jj,olympe.dc.query.Ls,olympe.dc.query.R.Ea);A(a,olympe.dc.query.Mb.Fp,olympe.dc.query.Ub.Np,olympe.dc.query.R.Ea,olympe.dc.R.wi,olympe.dc.query.Mb.Pe,olympe.dc.query.Mb.ul,olympe.dc.transaction.R.Aa,new olympe.U.fa(olympe.dc.Config.fh));A(a,olympe.dc.query.Mb.bp,
605
- olympe.dc.query.Ub.ip,olympe.dc.query.R.Ea,olympe.dc.query.Mb.Pe,new olympe.U.fa(olympe.dc.Config.fh));A(a,olympe.dc.query.Mb.cp,olympe.dc.query.Ub.jp,olympe.dc.query.R.Ea,olympe.dc.query.Mb.Pe,olympe.dc.query.Mb.Jj);A(a,olympe.dc.query.Mb.ap,olympe.dc.query.Ub.hp,olympe.dc.query.R.Ea,olympe.dc.query.Mb.Pe);A(a,olympe.dc.query.Mb.bk,olympe.dc.query.Ub.Mp,olympe.dc.query.R.Ea,olympe.dc.R.wi,olympe.dc.query.Mb.Pe);A(a,olympe.dc.query.Mb.tq,olympe.dc.query.Ub.Mu,olympe.dc.query.R.Ea,olympe.dc.query.Mb.Pe,
606
- olympe.dc.query.Mb.ul,olympe.dc.query.Mb.Jj,olympe.dc.R.qe,olympe.dc.db.R.Aa);A(a,olympe.dc.query.Mb.ul,olympe.dc.query.Ub.Os,olympe.dc.query.R.Ea,olympe.dc.query.Mb.Pe,olympe.dc.transaction.R.Aa);C(a,olympe.dc.query.R.Aa,[olympe.dc.query.R.Ea,new olympe.U.fa(olympe.dc.Config.fh),olympe.dc.R.qe,olympe.dc.db.R.Aa,olympe.dc.query.Mb.Pe,olympe.dc.query.Mb.Jj,olympe.dc.query.Mb.Fp,olympe.dc.query.Mb.bp,olympe.dc.query.Mb.cp,olympe.dc.query.Mb.ap,olympe.dc.query.Mb.bk,olympe.dc.query.Mb.tq],(b,c,d,e,f,
607
- g,h,k,l,n,p,q)=>new olympe.dc.query.Ku(b,c,d,e,f,g,[h,k,l,n,p],q))});olympe.U.run([olympe.dc.query.Mb.Pe],a=>{olympe.jj().subscriptions=a});olympe.dc.query.ua={};function qg(){const a=Error.stackTraceLimit;Error.stackTraceLimit=16;let b=Error().stack||'';b=b.split('\n').map(d=>d.trim());var c='Error'===b[0]?2:1;b=b.slice(c,Error.stackTraceLimit+c).reverse();c=[];for(const d of b)if(c.push(' '+d),d.includes('at ListDef.')||d.includes('at GraphDef.'))break;Error.stackTraceLimit=a;3<c.length&&(c=c.slice(c.length-3));return c.join('\n')||b.join('\n')}
608
- olympe.dc.query.ua.Yq=class{constructor(a,b){this.C=new Map;this.G=new Map;this.P=a;this.ba=b}F(){}K(a){var b=this.C.get(a);this.C.set(a,void 0!==b?b+1:1);b=this.G.get(a);this.G.set(a,void 0!==b?b:!1)}};function og(a,b){const c=b.Z();a.V.set(c,b);olympe.D.Na().onDestroy(()=>{a.V.delete(c)})}function pg(a,b){const c=b.Z();a.$.set(c,b);olympe.D.Na().onDestroy(()=>{a.$.delete(c)})}olympe.dc.query.ua.pt=class extends olympe.dc.query.ua.Yq{constructor(a,b,c){super(a,b);this.ua=c;this.V=new Map;this.$=new Map;b&&qg()}F(){return this.P}};olympe.dc.query.ua.iu=class extends olympe.dc.query.ua.Yq{constructor(a,b){super(a,b);this.V=new Map}F(){return this.P}K(a){super.K(a);if(this.ba){const b='md_'+olympe.X.bc();this.V.set(b,qg());olympe.D.Na().onDestroy(()=>{this.V.delete(b)})}}};function rg(a,b){let c;a.C!==b&&(null==(c=a.C)?void 0:c.hash)!==b.hash&&(a.C=b,sg(a,!1),a.G.forEach(d=>d(b)))}function sg(a,b){var c=Fe(a.query);if(c!==olympe.dc.Ia.rb&&c!==olympe.dc.Ia.Lc){var d;c=null!=(d=a.C)?d:olympe.dc.Ya.empty();$c(a.P,null,b?Me(c):Ne(c))}}function tg(a,b){const c=a.V++;a.G.set(c,b);a.C&&b(a.C);return()=>a.G.delete(c)}
609
- olympe.dc.query.ua.Lu=class{constructor(a){this.query=a;this.P=olympe.dc.yd();this.id=a.Z();this.C=null;this.F=new olympe.dc.ea.pq(a);this.counter=this.V=0;this.G=new Map;this.K=[]}update(){var a=this.F;a.F?(a.F=!1,a=!0):a=!1;if(a){var b;a=null!=(b=this.C)?b:olympe.dc.Ya.empty();b=olympe.dc.Ya.from(a,this.F);rg(this,b)}}onDestroy(a){this.K.push(a)}destroy(){sg(this,!0);this.K.forEach(a=>a())}};olympe.dc.query.Ub={};function ug(a,b,c,d,e){a.N.debug('CoverageProcessor: [ID:',d,'] - checking coverage of remote query over',b.length,'paths.');const f=new olympe.async.ug(olympe.D.Na()),g=k=>{f.add((l,n)=>{k.kb(p=>{p?n(`The query ${d} is not covered by an existing graphdef, `+`and the specific graphdef id ${k.Z()} has encountered an error: ${p}`):l()});ng(a.ua,k.Z(),c)})},h=Array.from(fg(a.ua,olympe.dc.Ia.Lc));b.forEach(k=>{const l=qf(k);let n=!1;for(let p=0,q=h.length;p<q;p++){const r=h[p];if(r.Dr(l)){g(r.sh,!1);
610
- n=!0;break}}n?a.N.debug('CoverageProcessor: [ID:',d,'] - graphPath',k,' is covered'):g(k,!0)});Vb(f,(k,l)=>e(l));f.start()}function vg(a,b,c){const d=[b.Od()],e=g=>g instanceof olympe.dc.Y.Cf,f=(b.Jg()||[]).filter(e);for(const g of f)d.push(g.Od()),f.push(...(g.Jg()||[]).filter(e));xe(a.C,()=>{olympe.D.wc(d,()=>{const g=b.Nd();ug(a,g,b,b.Z(),c)})})}function wg(a,b,c,d){const e=b.Z(),f=[De(b,c)];xe(a.C,()=>ug(a,f,b,e,d))}olympe.dc.query.Ub.Os=class{constructor(a,b,c){this.N=a;this.ua=b;this.C=c}};olympe.dc.query.Ub.hp=class{constructor(a,b){this.N=a;this.ua=b}process(a,b,c){const d=b.Z();this.ua.C.has(d)?(Sf(this.ua,d).la(b),olympe.dc.yd().bf(b.data,a),c(null,b)):c(Error(`Received a notification for the graphdef ${d} which does not exist.`),b)}};olympe.dc.query.Ub.hp.ma=[olympe.dc.vg];olympe.dc.query.Ub.ip=class{constructor(a,b,c){this.N=a;this.ua=b;this.C=c}process(a,b,c){var d=b.Z();if(a===olympe.dc.Ia.rb||this.ua.C.has(d)){if(c(null,b),a=Sf(this.ua,d),this.C||a&&a.K)a=olympe.dc.Ia.rb,d=new olympe.dc.query.Ei(d,a,a,new olympe.dc.db.xc),Zf(olympe.dc.Tf(),d)}else c(Error('The local Graph Engine is not implemented yet. It should handle Graphdefs addressed to instances owned by this local OVM'),b)}};olympe.dc.query.Ub.ip.ma=[olympe.dc.vg];olympe.dc.query.Ub.jp=class{constructor(a,b,c){this.N=a;this.C=b;this.F=c}process(a,b,c){const d=b.Z();if(this.C.C.has(d)){const f=Sf(this.C,d);if(b instanceof olympe.dc.query.errors.Wj)Uf(this.C,d,a);else if(!f.K){f.ba(b);const g=olympe.dc.yd();$c(g,f.V());g.bf(b.Bc,b.destination);f.onDestroy(()=>{$c(g,null,f.V())});zf(f)}}let e;b instanceof olympe.dc.query.errors.Wj&&(e=`graph subscription "${d}" failed to create the initial result: ${b.la()}`,this.N.error(e));ef(this.F,b.Z(),b);c(e?Error(e):null,
611
- b)}};olympe.dc.query.Ub.jp.ma=[olympe.dc.vg];const xg=[],yg=new Map;function zg(a,b,c,d){Ec(a.db,d,e=>{e?b.Lg(c)?a.N.warn('Adding the same index twice (should never happen) for sub #'+b.Z()+', index #'+c+', tag #'+d):b.fc(c,d):Ag(a,b,c,d)},c)}function Ag(a,b,c,d){Fc(a.db,d,c,!0);b.hc(c);xg.length=0;b.$c(function(e,f){xg[e]=f});c=a=0;for(d=xg.length;a<d;a++)'string'===typeof xg[a]&&(xg[c++]=xg[a]);xg.length=c;b.xb(xg)}
612
- olympe.dc.query.Ub.Mp=class{constructor(a,b,c){this.N=a;this.db=b;this.ua=c}process(a,b,c){const d=b.Z();a=b.C;const e=Wf(this.ua,d);if(null===e)c(Error(`Received list notification for undefined subscription "${d}"`),b);else{xg.length=a.length;e.$c((f,g)=>{if(f=e.ph(g)){f=f.T();var h=yg.get(f);void 0===h?yg.set(f,g):'string'===typeof h?yg.set(f,[h,g]):h.push(g)}else this.N.warn('Subscription #'+d+' has a rank for index #'+g+' but no instance. This is caused by receiving a new list notification before receiving all instances of the previous list notification.')});
613
- for(let f=0,g=a.length;f<g;f++){const h=a[f];let k=yg.get(h);void 0===k?(k=olympe.X.bc(),zg(this,e,k,h)):'string'===typeof k?yg.delete(h):(k=k.pop(),0===k.length&&yg.delete(h));xg[f]=k}for(const [f,g]of yg){if('string'===typeof g)Ag(this,e,g,f);else for(let h=0,k=g.length;h<k;h++)Ag(this,e,g[h],f);yg.delete(f)}e.xb(xg);c(null,b)}}};olympe.dc.query.Ub.Mp.ma=[olympe.dc.vg];function Bg(a,b,c,d){const e=c.Z();a.N.debug('ListProcessor: [ID:',e,'] - processing with source ',b);kg(a.ua,c,b);if(jg(a.ua,e,olympe.dc.Ia.rb))a.N.debug('ListProcessor: [ID:',e,'] - id already processed');else{a.N.debug('ListProcessor: [ID:',e,'] - NOT processed yet.');const f=c.Nc();a.F||f===olympe.dc.Ia.rb?(a.N.debug('QueryMGR: [ID:',e,'] - Local subscription, no need for coverage check, booting subscription '),Cg(a,c)):c.Hh().run(()=>{vg(a.C,c,g=>{g?a.N.error(g):Cg(a,c)})})}b===olympe.dc.Ia.rb||
602
+ function ig(a,b,c){let d=a.K.get(c);d?d.add(b):(d=(new Set).add(b),a.K.set(c,d))}function kg(a,b,c){var d=olympe.dc.Ia.rb;const e=b.Z();let f=a.F.get(e);void 0===f&&(f=new olympe.dc.query.ua.ju(b,a.P),a.F.set(e,f));f.K(c);ig(a,e,d)}function hg(a,b,c,d){if(!b.has(c))return!1;const e=b.get(c);var f=e.C.get(d)-1;0===f?(e.C.delete(d),e.G.delete(d),f=0===e.C.size):(e.C.set(d,f),f=!1);return f?((d=Vf(a,c))&&a.K.get(d).delete(c),e.F().release(),b.delete(c),!0):0===e.C.get(d)}
603
+ function lg(a,b){const c=b.Z();let d=a.G.get(c);d||(d=new olympe.dc.query.ua.Mu(b),a.G.set(c,d));d.counter++;return d}function mg(a){a.G.forEach(b=>b.update())}function ng(a,b,c){const d=a.C.get(b);d?c instanceof olympe.dc.query.Subscription?og(d,c):pg(d,c):a.N.error(`Try to set the subscription ${c.Z()} as covered by a graphquery that is not registered (${b}).`)}olympe.dc.query.kv=class{constructor(a,b){this.N=a;this.C=new Map;this.F=new Map;this.G=new Map;this.V=new Set;this.K=new Map;this.P=b}};olympe.dc.Yc=class{na(){}Zb(){}getTransform(){}ka(){}toString(){}};olympe.dc.sq=class{F(){}};olympe.dc.Cf=class{na(){}getValue(){}C(){}ka(){}toString(){}};olympe.dc.query.R={Ea:'olympe.dc.query.Logger',Aa:'olympe.dc.query.QueryManager'};olympe.dc.query.Mb={Qe:'olympe.dc.query.SubscriptionRegistry',Kj:'olympe.dc.query.CallbackRegistry',cp:'olympe.dc.query.GraphProcessor',bp:'olympe.dc.query.GraphNotificationProcessor',ep:'olympe.dc.query.GraphResultProcessor',Gp:'olympe.dc.query.ListProcessor',ck:'olympe.dc.query.ListNotificationProcessor',uq:'olympe.dc.query.QueryProcessor',vl:'olympe.dc.query.CoverageProcessor'};olympe.dc.query.Config={Qq:'subscription.debug'};
604
+ olympe.U.config(function(a){E(a,olympe.dc.query.Config.Qq,!1);C(a,olympe.dc.query.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('dc.query'));A(a,olympe.dc.query.Mb.Qe,olympe.dc.query.kv,olympe.dc.query.R.Ea,new olympe.U.fa(olympe.dc.query.Config.Qq));A(a,olympe.dc.query.Mb.Kj,olympe.dc.query.Ms,olympe.dc.query.R.Ea);A(a,olympe.dc.query.Mb.Gp,olympe.dc.query.Ub.Op,olympe.dc.query.R.Ea,olympe.dc.R.vi,olympe.dc.query.Mb.Qe,olympe.dc.query.Mb.vl,olympe.dc.transaction.R.Aa,new olympe.U.fa(olympe.dc.Config.eh));A(a,olympe.dc.query.Mb.cp,
605
+ olympe.dc.query.Ub.jp,olympe.dc.query.R.Ea,olympe.dc.query.Mb.Qe,new olympe.U.fa(olympe.dc.Config.eh));A(a,olympe.dc.query.Mb.ep,olympe.dc.query.Ub.kp,olympe.dc.query.R.Ea,olympe.dc.query.Mb.Qe,olympe.dc.query.Mb.Kj);A(a,olympe.dc.query.Mb.bp,olympe.dc.query.Ub.ip,olympe.dc.query.R.Ea,olympe.dc.query.Mb.Qe);A(a,olympe.dc.query.Mb.ck,olympe.dc.query.Ub.Np,olympe.dc.query.R.Ea,olympe.dc.R.vi,olympe.dc.query.Mb.Qe);A(a,olympe.dc.query.Mb.uq,olympe.dc.query.Ub.Nu,olympe.dc.query.R.Ea,olympe.dc.query.Mb.Qe,
606
+ olympe.dc.query.Mb.vl,olympe.dc.query.Mb.Kj,olympe.dc.R.qe,olympe.dc.db.R.Aa);A(a,olympe.dc.query.Mb.vl,olympe.dc.query.Ub.Ps,olympe.dc.query.R.Ea,olympe.dc.query.Mb.Qe,olympe.dc.transaction.R.Aa);C(a,olympe.dc.query.R.Aa,[olympe.dc.query.R.Ea,new olympe.U.fa(olympe.dc.Config.eh),olympe.dc.R.qe,olympe.dc.db.R.Aa,olympe.dc.query.Mb.Qe,olympe.dc.query.Mb.Kj,olympe.dc.query.Mb.Gp,olympe.dc.query.Mb.cp,olympe.dc.query.Mb.ep,olympe.dc.query.Mb.bp,olympe.dc.query.Mb.ck,olympe.dc.query.Mb.uq],(b,c,d,e,f,
607
+ g,h,k,l,n,p,q)=>new olympe.dc.query.Lu(b,c,d,e,f,g,[h,k,l,n,p],q))});olympe.U.run([olympe.dc.query.Mb.Qe],a=>{olympe.kj().subscriptions=a});olympe.dc.query.ua={};function qg(){const a=Error.stackTraceLimit;Error.stackTraceLimit=16;let b=Error().stack||'';b=b.split('\n').map(d=>d.trim());var c='Error'===b[0]?2:1;b=b.slice(c,Error.stackTraceLimit+c).reverse();c=[];for(const d of b)if(c.push(' '+d),d.includes('at ListDef.')||d.includes('at GraphDef.'))break;Error.stackTraceLimit=a;3<c.length&&(c=c.slice(c.length-3));return c.join('\n')||b.join('\n')}
608
+ olympe.dc.query.ua.Zq=class{constructor(a,b){this.C=new Map;this.G=new Map;this.P=a;this.ba=b}F(){}K(a){var b=this.C.get(a);this.C.set(a,void 0!==b?b+1:1);b=this.G.get(a);this.G.set(a,void 0!==b?b:!1)}};function og(a,b){const c=b.Z();a.V.set(c,b);olympe.D.Na().onDestroy(()=>{a.V.delete(c)})}function pg(a,b){const c=b.Z();a.$.set(c,b);olympe.D.Na().onDestroy(()=>{a.$.delete(c)})}olympe.dc.query.ua.qt=class extends olympe.dc.query.ua.Zq{constructor(a,b,c){super(a,b);this.ua=c;this.V=new Map;this.$=new Map;b&&qg()}F(){return this.P}};olympe.dc.query.ua.ju=class extends olympe.dc.query.ua.Zq{constructor(a,b){super(a,b);this.V=new Map}F(){return this.P}K(a){super.K(a);if(this.ba){const b='md_'+olympe.X.bc();this.V.set(b,qg());olympe.D.Na().onDestroy(()=>{this.V.delete(b)})}}};function rg(a,b){let c;a.C!==b&&(null==(c=a.C)?void 0:c.hash)!==b.hash&&(a.C=b,sg(a,!1),a.G.forEach(d=>d(b)))}function sg(a,b){var c=Fe(a.query);if(c!==olympe.dc.Ia.rb&&c!==olympe.dc.Ia.Lc){var d;c=null!=(d=a.C)?d:olympe.dc.Ya.empty();$c(a.P,null,b?Me(c):Ne(c))}}function tg(a,b){const c=a.V++;a.G.set(c,b);a.C&&b(a.C);return()=>a.G.delete(c)}
609
+ olympe.dc.query.ua.Mu=class{constructor(a){this.query=a;this.P=olympe.dc.xd();this.id=a.Z();this.C=null;this.F=new olympe.dc.ea.qq(a);this.counter=this.V=0;this.G=new Map;this.K=[]}update(){var a=this.F;a.F?(a.F=!1,a=!0):a=!1;if(a){var b;a=null!=(b=this.C)?b:olympe.dc.Ya.empty();b=olympe.dc.Ya.from(a,this.F);rg(this,b)}}onDestroy(a){this.K.push(a)}destroy(){sg(this,!0);this.K.forEach(a=>a())}};olympe.dc.query.Ub={};function ug(a,b,c,d,e){a.N.debug('CoverageProcessor: [ID:',d,'] - checking coverage of remote query over',b.length,'paths.');const f=new olympe.async.rg(olympe.D.Na()),g=k=>{f.add((l,n)=>{k.kb(p=>{p?n(`The query ${d} is not covered by an existing graphdef, `+`and the specific graphdef id ${k.Z()} has encountered an error: ${p}`):l()});ng(a.ua,k.Z(),c)})},h=Array.from(fg(a.ua,olympe.dc.Ia.Lc));b.forEach(k=>{const l=qf(k);let n=!1;for(let p=0,q=h.length;p<q;p++){const r=h[p];if(r.Er(l)){g(r.rh,!1);
610
+ n=!0;break}}n?a.N.debug('CoverageProcessor: [ID:',d,'] - graphPath',k,' is covered'):g(k,!0)});Vb(f,(k,l)=>e(l));f.start()}function vg(a,b,c){const d=[b.Nd()],e=g=>g instanceof olympe.dc.Y.Af,f=(b.Gg()||[]).filter(e);for(const g of f)d.push(g.Nd()),f.push(...(g.Gg()||[]).filter(e));xe(a.C,()=>{olympe.D.wc(d,()=>{const g=b.de();ug(a,g,b,b.Z(),c)})})}function wg(a,b,c,d){const e=b.Z(),f=[De(b,c)];xe(a.C,()=>ug(a,f,b,e,d))}olympe.dc.query.Ub.Ps=class{constructor(a,b,c){this.N=a;this.ua=b;this.C=c}};olympe.dc.query.Ub.ip=class{constructor(a,b){this.N=a;this.ua=b}process(a,b,c){const d=b.Z();this.ua.C.has(d)?(Sf(this.ua,d).la(b),olympe.dc.xd().af(b.data,a),c(null,b)):c(Error(`Received a notification for the graphdef ${d} which does not exist.`),b)}};olympe.dc.query.Ub.ip.ma=[olympe.dc.sg];olympe.dc.query.Ub.jp=class{constructor(a,b,c){this.N=a;this.ua=b;this.C=c}process(a,b,c){var d=b.Z();if(a===olympe.dc.Ia.rb||this.ua.C.has(d)){if(c(null,b),a=Sf(this.ua,d),this.C||a&&a.K)a=olympe.dc.Ia.rb,d=new olympe.dc.query.Di(d,a,a,new olympe.dc.db.xc),Zf(olympe.dc.Rf(),d)}else c(Error('The local Graph Engine is not implemented yet. It should handle Graphdefs addressed to instances owned by this local OVM'),b)}};olympe.dc.query.Ub.jp.ma=[olympe.dc.sg];olympe.dc.query.Ub.kp=class{constructor(a,b,c){this.N=a;this.C=b;this.F=c}process(a,b,c){const d=b.Z();if(this.C.C.has(d)){const f=Sf(this.C,d);if(b instanceof olympe.dc.query.errors.Xj)Uf(this.C,d,a);else if(!f.K){f.ba(b);const g=olympe.dc.xd();$c(g,f.V());g.af(b.Bc,b.destination);f.onDestroy(()=>{$c(g,null,f.V())});zf(f)}}let e;b instanceof olympe.dc.query.errors.Xj&&(e=`graph subscription "${d}" failed to create the initial result: ${b.la()}`,this.N.error(e));ef(this.F,b.Z(),b);c(e?Error(e):null,
611
+ b)}};olympe.dc.query.Ub.kp.ma=[olympe.dc.sg];const xg=[],yg=new Map;function zg(a,b,c,d){Ec(a.db,d,e=>{e?b.Ig(c)?a.N.warn('Adding the same index twice (should never happen) for sub #'+b.Z()+', index #'+c+', tag #'+d):b.fc(c,d):Ag(a,b,c,d)},c)}function Ag(a,b,c,d){Fc(a.db,d,c,!0);b.mc(c);xg.length=0;b.$c(function(e,f){xg[e]=f});c=a=0;for(d=xg.length;a<d;a++)'string'===typeof xg[a]&&(xg[c++]=xg[a]);xg.length=c;b.xb(xg)}
612
+ olympe.dc.query.Ub.Np=class{constructor(a,b,c){this.N=a;this.db=b;this.ua=c}process(a,b,c){const d=b.Z();a=b.C;const e=Wf(this.ua,d);if(null===e)c(Error(`Received list notification for undefined subscription "${d}"`),b);else{xg.length=a.length;e.$c((f,g)=>{if(f=e.oh(g)){f=f.T();var h=yg.get(f);void 0===h?yg.set(f,g):'string'===typeof h?yg.set(f,[h,g]):h.push(g)}else this.N.warn('Subscription #'+d+' has a rank for index #'+g+' but no instance. This is caused by receiving a new list notification before receiving all instances of the previous list notification.')});
613
+ for(let f=0,g=a.length;f<g;f++){const h=a[f];let k=yg.get(h);void 0===k?(k=olympe.X.bc(),zg(this,e,k,h)):'string'===typeof k?yg.delete(h):(k=k.pop(),0===k.length&&yg.delete(h));xg[f]=k}for(const [f,g]of yg){if('string'===typeof g)Ag(this,e,g,f);else for(let h=0,k=g.length;h<k;h++)Ag(this,e,g[h],f);yg.delete(f)}e.xb(xg);c(null,b)}}};olympe.dc.query.Ub.Np.ma=[olympe.dc.sg];function Bg(a,b,c,d){const e=c.Z();a.N.debug('ListProcessor: [ID:',e,'] - processing with source ',b);kg(a.ua,c,b);if(jg(a.ua,e,olympe.dc.Ia.rb))a.N.debug('ListProcessor: [ID:',e,'] - id already processed');else{a.N.debug('ListProcessor: [ID:',e,'] - NOT processed yet.');const f=c.Nc();a.F||f===olympe.dc.Ia.rb?(a.N.debug('QueryMGR: [ID:',e,'] - Local subscription, no need for coverage check, booting subscription '),Cg(a,c)):c.Ii().run(()=>{vg(a.C,c,g=>{g?a.N.error(g):Cg(a,c)})})}b===olympe.dc.Ia.rb||
614
614
  jg(a.ua,e,b)||a.notify(b,c);d(null,c)}
615
- function Cg(a,b){if(b.V())a.N.debug('ListProcessor: [ID:',b.Z(),'] - Subscription already booted, ignoring');else{a.N.debug('ListProcessor: [ID:',b.Z(),'] - Booting subscription');var c=new olympe.dc.qc.Xq(a.db,a.N),d=Dg(a,b,c),e=b.Z();b.Hh().run(()=>{olympe.D.wc([b.Od()],f=>{const g=olympe.dc.za(f);a.N.debug('ListProcessor: [ID:',b.Z(),'] - Booting with baseTag',g);b.Ye()||b.uh();Ec(a.db,g,h=>d(h,g),e);olympe.D.Na().P(()=>Fc(a.db,g,e));a.db.Gb(g.valueOf())||Eg(c);b.V()||(Eg(c),b.xb([]))})})}}
616
- function Dg(a,b,c){const d=new olympe.dc.qc.Hj;let e=!1;const f=b.Hh(),g=b.Jg(),h=[];h[g?g.length:0]=f.F((k,l,n,p)=>{f.$()||f.G()||(k?b.Lg(n)?a.N.warn('Adding the same index twice (should never happen) for sub #',b.Z(),', index #',n,', tag #',l):(a.N.debug('ListProcessor: [ID:',b.Z(),'] - Adding Instance',l,'to the subscription'),b.fc(n,l)):(a.N.debug('ListProcessor: [ID:',b.Z(),'] - Removing Instance',l,'from the subscription'),b.hc(n)),e||(Fg(c,()=>{p.Ag();Eg(c)}),p.Sc().Rg(b.xb.bind(b)),e=!0),
615
+ function Cg(a,b){if(b.V())a.N.debug('ListProcessor: [ID:',b.Z(),'] - Subscription already booted, ignoring');else{a.N.debug('ListProcessor: [ID:',b.Z(),'] - Booting subscription');var c=new olympe.dc.pc.Yq(a.db,a.N),d=Dg(a,b,c),e=b.Z();b.Ii().run(()=>{olympe.D.wc([b.Nd()],f=>{const g=olympe.dc.za(f);a.N.debug('ListProcessor: [ID:',b.Z(),'] - Booting with baseTag',g);b.sh()||b.uh();Ec(a.db,g,h=>d(h,g),e);olympe.D.Na().P(()=>Fc(a.db,g,e));a.db.Gb(g.valueOf())||Eg(c);b.V()||(Eg(c),b.xb([]))})})}}
616
+ function Dg(a,b,c){const d=new olympe.dc.pc.Ij;let e=!1;const f=b.Ii(),g=b.Gg(),h=[];h[g?g.length:0]=f.F((k,l,n,p)=>{f.$()||f.C()||(k?b.Ig(n)?a.N.warn('Adding the same index twice (should never happen) for sub #',b.Z(),', index #',n,', tag #',l):(a.N.debug('ListProcessor: [ID:',b.Z(),'] - Adding Instance',l,'to the subscription'),b.fc(n,l)):(a.N.debug('ListProcessor: [ID:',b.Z(),'] - Removing Instance',l,'from the subscription'),b.mc(n)),e||(Fg(c,()=>{p.xg();Eg(c)}),p.Sc().Qg(b.xb.bind(b)),e=!0),
617
617
  Gg(c,n))});if(null!==g){const k=olympe.dc.Sc();for(let l=g.length-1;0<=l;l--)h[l]=f.F(g[l].getTransform(k,c,h[l+1]))}return(k,l)=>{const n=b.Z();c.register(n,null);const p=d.C(k,l,n,null);if(null!==p)h[0](k,l,n,Hg(p,k,l,n))}}
618
- olympe.dc.query.Ub.Np=class{constructor(a,b,c,d,e,f){this.N=a;this.db=b;this.ua=c;this.C=d;this.F=f}process(a,b,c){Bg(this,a,b,c)}notify(a,b){const c=b.Z();this.N.debug(`Register notification of list subscription ${c} for destination ${a}`);const d=()=>{const f=new olympe.dc.query.Lp(c);b.de(g=>f.F(g));ag(olympe.dc.Tf(),f)};let e=!1;b.forEach(()=>{e&&d()});b.je(()=>{e=!0;d()})}};olympe.dc.query.Ub.Np.ma=[olympe.dc.vg];function Rf(a,b,c){const d=b.Z(),e=Fe(b),f=a.ua.G.has(d),g=lg(a.ua,b);return new rxjs.Observable(h=>{const k=tg(g,h.next.bind(h)),l=()=>{k();h.complete();n&&c.Nd(n);{var p=a.ua;const r=p.G.get(d);var q;if(q=r)q=r,0<q.counter?q.counter--:olympe.ta.Za('dc').warn('Try to decrement counter of query metadata below 0. Investigate...'),q=0===q.counter;q&&(r.destroy(),p.G.delete(d),p.V.delete(d))}},n=c.P(l);if(!f)if(e===olympe.dc.Ia.Lc)wg(a.K,b,!0,p=>{p?(h.error(p),l()):Ig(a,d,b,g)});else if(e===olympe.dc.Ia.rb)Ig(a,
619
- d,b,g);else{const p=M(Hc(new olympe.dc.ha(olympe.dc.ha.ja.rm,b,[e]),c),q=>{q&&(h.error(q.message),l())});a.G.send(p)}return l})}
620
- function Jg(a){const b=olympe.dc.ha.ja.qm,c=(d,e)=>Pe(d,f=>{$c(a.F,Array.from(f.fe()).filter(g=>g.ue()).map(g=>g.tag()));a.F.bf(f,e)},e);a.G.C(olympe.dc.ha.ja.QUERY_RESULT,(d,{i:e,r:f,s:g})=>{d=c(f,g);null===d?(d=a.C,df(d,e,`Error while deserialization of QueryResult for query ${e}`,d.G,`Query result of query ${e} has no associated handler in the datacloud`)):(f=a.C,df(f,e,d,f.G,`Query result of query ${e} has no associated handler in the datacloud`))});a.G.C(b,(d,{i:e,r:f,s:g})=>{if(d=c(f,g)){let h;
618
+ olympe.dc.query.Ub.Op=class{constructor(a,b,c,d,e,f){this.N=a;this.db=b;this.ua=c;this.C=d;this.F=f}process(a,b,c){Bg(this,a,b,c)}notify(a,b){const c=b.Z();this.N.debug(`Register notification of list subscription ${c} for destination ${a}`);const d=()=>{const f=new olympe.dc.query.Mp(c);b.ce(g=>f.F(g));ag(olympe.dc.Rf(),f)};let e=!1;b.forEach(()=>{e&&d()});b.je(()=>{e=!0;d()})}};olympe.dc.query.Ub.Op.ma=[olympe.dc.sg];function Rf(a,b,c){const d=b.Z(),e=Fe(b),f=a.ua.G.has(d),g=lg(a.ua,b);return new rxjs.Observable(h=>{const k=tg(g,h.next.bind(h)),l=()=>{k();h.complete();n&&c.be(n);{var p=a.ua;const r=p.G.get(d);var q;if(q=r)q=r,0<q.counter?q.counter--:olympe.ta.Za('dc').warn('Try to decrement counter of query metadata below 0. Investigate...'),q=0===q.counter;q&&(r.destroy(),p.G.delete(d),p.V.delete(d))}},n=c.P(l);if(!f)if(e===olympe.dc.Ia.Lc)wg(a.K,b,!0,p=>{p?(h.error(p),l()):Ig(a,d,b,g)});else if(e===olympe.dc.Ia.rb)Ig(a,
619
+ d,b,g);else{const p=M(Hc(new olympe.dc.ha(olympe.dc.ha.ja.sm,b,[e]),c),q=>{q&&(h.error(q.message),l())});a.G.send(p)}return l})}
620
+ function Jg(a){const b=olympe.dc.ha.ja.rm,c=(d,e)=>Pe(d,f=>{$c(a.F,Array.from(f.fe()).filter(g=>g.ue()).map(g=>g.tag()));a.F.af(f,e)},e);a.G.C(olympe.dc.ha.ja.QUERY_RESULT,(d,{i:e,r:f,s:g})=>{d=c(f,g);null===d?(d=a.C,df(d,e,`Error while deserialization of QueryResult for query ${e}`,d.G,`Query result of query ${e} has no associated handler in the datacloud`)):(f=a.C,df(f,e,d,f.G,`Query result of query ${e} has no associated handler in the datacloud`))});a.G.C(b,(d,{i:e,r:f,s:g})=>{if(d=c(f,g)){let h;
621
621
  null==(h=a.ua.G.get(e))||rg(h,d)}});Zc(a.F,()=>mg(a.ua))}function Ig(a,b,c,d){let e=(p,q)=>{p?a.N.debug(`New result tuple for query ${b}, ${q}`):a.N.debug(`Removed result tuple for query ${b}, ${q}`)};const f=c.C,g=f.reduce((p,q)=>{p.push(q.F(p[p.length-1]));return p},[0]),h=d.F;for(let p=f.length-1;0<=p;p--)e=f[p].observe(h,g[p],e);const k=a.F.view,l=c.G,n=Ec(k,l,(p,q)=>{p?h.insert(q,0,null):h.remove(q,0,null);e(p,q,null,b)});d.onDestroy(()=>Fc(k,l,n));Te(h);d.update()}
622
- olympe.dc.query.Ub.Mu=class{constructor(a,b,c,d,e,f){this.N=a;this.ua=b;this.K=c;this.C=d;this.G=e;this.F=f;Jg(this)}kb(a,b){return new Promise((c,d)=>{var e=Fe(a);if(e===olympe.dc.Ia.Lc)wg(this.K,a,!1,f=>{f?d(f):c(this.Pc(a))});else if(e===olympe.dc.Ia.rb)c(this.Pc(a));else{const f=a.Z(),g=this.C.C.has(f),h=l=>{var n=this.C;cf(n,f,n.G);d(l||`The execution of the query ${f} has been interrupted`)},k=b.P(h);ff(this.C,f,(l,n)=>{b.Nd(k);l?d(l.message):(b.P(()=>{$c(this.F,null,Me(n))}),c(n))});g||(e=
623
- M(Hc(new olympe.dc.ha(olympe.dc.ha.ja.pm,a,[e]),b),l=>l&&h(l.message)),this.G.send(e))}})}Pc(a){const b=new olympe.dc.ea.pq(a);b.insert(a.G,0,null);let c=0;for(const d of a.C)d.kb(b,c),c=d.F(c);return olympe.dc.Ya.from(olympe.dc.Ya.empty(),b)}};olympe.dc.query.errors={};olympe.dc.query.errors.Wj=class extends olympe.dc.query.Ei{constructor(a,b,c,d){super(a,b,c,new olympe.dc.db.xc);this.error=d}la(){return this.error}};olympe.dc.qc={};function Hg(a,b,c,d){b?a.V[d]=c:delete a.V[d];null===a.F&&(a.F=new olympe.dc.qc.Oj(a.C,a));return a.F}function Kg(a,b){for(let c=0;c<b;c++)if(null!==a.F)a=a.F;else break;return a}function Lg(a,b){a=a.V;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.qc.Oj=class{constructor(a,b){this.C=a;this.depth=b?b.depth+1:0;this.V=Object.create(null);this.F=null}Sc(){return this.C}Ag(){this.C.P()?this.C.G():this.C.$(this.depth-1)}};olympe.dc.qc.oa=class{constructor(){}C(){}P(){}$(){}G(){}Rg(){}};olympe.dc.qc.Hj=class{constructor(){this.V=this.K=this.index=this.F=null}P(){return null!==this.F}$(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}C(a,b,c){b=this.K;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.qc.Oj(this),this.index=c,this.K=b):this.K=this.index=null;return b}G(){if(null===this.F)throw Error('Manager not activated, need to set a depth before updating ranks');if(null!==this.V){const a=
624
- [];null!==this.K&&(0<=this.F?Lg(Kg(this.K,this.F),a):a.push(this.index));this.V(a)}}Rg(a){this.V=a}};olympe.dc.qc.Hj.ma=[olympe.dc.qc.oa];function Mg(a,b){olympe.D.ag(a.value)?(a.node=olympe.D.dl(a.value,b),$a(a.node)||b()):b()}function Ng(a,b){if(olympe.D.ag(a.value)){const c=olympe.D.Na(),d=a.P;olympe.D.wc([a.value],e=>{d!==e.valueOf()&&(c.run(()=>Mg(a,b)),olympe.D.Na().destroy())})}}
625
- class Og extends olympe.dc.qc.Oj{constructor(a,b,c){super(a);this.index=b;this.value=c;this.P=this.Xa();this.position=this.node=null;this.$=!1;this.K=null}Xa(){const a=olympe.D.Xa(this.value);return a?a.valueOf():a}destroy(){this.node&&(this.node.destroy(),this.node=null);this.K=this.value=null}G(){return null===this.value}}
626
- function Pg(a,b){if(!b.G()){var c=a.F;const d=a.qa,e=b.Xa();let f=0,g=c.length,h=0,k;for(null!==b.position&&--g;g>f;){h=Math.floor((f+g)/2);k=d(c[h].P,e);if(0===k||2>g-f){0>k&&null!==b.position&&b.position<=h&&(k=d(c[g].P,e));h=0>k?g:h;break}0>k?f=h:g=h}c=h;b.P=b.Xa();c!==b.position&&(a.insert(b,c),b.$&&a.G())}}function Qg(a){const b=a.qa;a.F.sort((c,d)=>b(c.Xa(),d.Xa()))}
627
- olympe.dc.qc.Wq=class{constructor(a){this.qa=a;this.K=null;this.F=[];this.V=[];this.ba=null;this.la=new Map}C(a,b,c,d){b='$'+c;const e=this.F;let f;if(a)f=new Og(this,c,d),this.la.set(b,f),this.P()?Mg(f,()=>Pg(this,f)):(f.position=e.length,e.push(f));else{f=this.la.get(b);if(void 0===f)throw Error('Trying to remove an non-registered item: "'+c+'"');this.la.delete(b);null!==f.position&&(this.P()?this.remove(f):delete e[f.position]);f.destroy()}return f}P(){return null!==this.K}$(a){if(null!==this.K)throw Error('Manager already activated (depth='+
628
- this.K+')');this.K=a;Qg(this);for(let b=0,c=this.F.length;b<c;b++){const d=this.F[b];d.position=b;Ng(d,()=>Pg(this,d))}this.G()}G(){if(null===this.K)throw Error('Manager not activated, need to set a depth before updating ranks');const a=this.F.length;this.V.length=0;for(let d=0;d<a;d++){let e=this.F[d];if(!e.$){var b=e,c=this.K;b.$=!0;b.K=Kg(b,c)}0>this.K?this.V.push(e.index):e.K&&Lg(e.K,this.V)}this.ba&&this.ba(this.V)}Rg(a){this.ba=a}insert(a,b){const c=this.F;var d=c.length;let e=a.position;null===
629
- e&&(e=d);if(b<e)for(d=e;d>b;d--)c[d]=c[d-1],c[d].position=d;else for(d=e;d<b;d++)c[d]=c[d+1],c[d].position=d;c[b]=a;c[b].position=b}remove(a){const b=this.F,c=b.length-1;if(null!==a.position){for(a=a.position;a<c;a++)b[a]=b[a+1],b[a].position=a;b.length=c}}};olympe.dc.qc.Wq.ma=[olympe.dc.qc.oa];class Rg extends olympe.dc.qc.Oj{constructor(a,b,c){super(a);this.index=b;this.tag=c;this.$=this.P=this.K=!1;this.G=null}}
630
- function Sg(a,b,c,d,e){const f=Object.create(null),g=a.order,h=a.K;let k,l,n;a.la=!0;l=0;for(n=g.length;l<n;l++)f[g[l]]=null;g.length=0;l=c;for(n=Math.min(b.length,d);l<n;l++)k=b[l],c=h[k],void 0!==c&&(delete f[k],g.push(k),c.K||(c.K=!0,e(!0,c.tag,c.index,c)));for(k in f)Object.prototype.hasOwnProperty.call(f,k)&&(c=h[k],c.K&&(c.K=!1,e(!1,c.tag,c.index,c)),c.P&&(c.G=null,delete h[k]),delete f[k]);a.la=!1;null!==a.F&&a.G()}
631
- olympe.dc.qc.am=class{constructor(){this.K={};this.order=[];this.F=null;this.la=!1;this.V=[];this.ba=null}P(){return null!==this.F}$(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}G(){if(null===this.F)throw Error('Manager not activated, need to set a depth before updating ranks');if(!this.la){var a=this.order,b=a.length,c=this.K,d;for(d=this.V.length=0;d<b;d++){var e=c[a[d]];if(0>this.F)this.V.push(e.index);else{if(!e.$){var f=e,g=this.F;f.$=!0;f.G=
632
- Kg(f,g)}null!==e.G&&Lg(e.G,this.V)}}this.ba&&this.ba(this.V)}}Rg(a){this.ba=a}C(a,b,c){let d=this.K[c];a?void 0===d?(d=new Rg(this,c,b),this.K[c]=d):(d.tag=b,d.P=!1):void 0!==d&&(d.P=!0);return d}};olympe.dc.qc.am.ma=[olympe.dc.qc.oa];function Eg(a){if(!a.F){for(let b in a.G)Tg(a.G[b]);a.F=!0}a.K=null;a.P=null}function Fg(a,b,c){a.G[c||'root'].V=b}function Gg(a,b,c){a.G[c||'root'].Ag(b)}function Ug(a,b,c,d){const e=a.P,f=b+d+c;let g=e[f];void 0===g&&(g=Qd(a.db,b,c,d),e[f]=g);return g}function Vg(a,b){a.F||a.C.Ag(b)}function Wg(a,b,c,d,e){if(!a.F){let f=Ug(a,c,d,e||olympe.dc.Ca.DESTINATION);e||(f+=Ug(a,c,d,olympe.dc.Ca.ORIGIN));0===f&&Vg(a,b)}}
622
+ olympe.dc.query.Ub.Nu=class{constructor(a,b,c,d,e,f){this.N=a;this.ua=b;this.K=c;this.C=d;this.G=e;this.F=f;Jg(this)}kb(a,b){return new Promise((c,d)=>{var e=Fe(a);if(e===olympe.dc.Ia.Lc)wg(this.K,a,!1,f=>{f?d(f):c(this.Pc(a))});else if(e===olympe.dc.Ia.rb)c(this.Pc(a));else{const f=a.Z(),g=this.C.C.has(f),h=l=>{var n=this.C;cf(n,f,n.G);d(l||`The execution of the query ${f} has been interrupted`)},k=b.P(h);ff(this.C,f,(l,n)=>{b.be(k);l?d(l.message):(b.P(()=>{$c(this.F,null,Me(n))}),c(n))});g||(e=
623
+ M(Hc(new olympe.dc.ha(olympe.dc.ha.ja.qm,a,[e]),b),l=>l&&h(l.message)),this.G.send(e))}})}Pc(a){const b=new olympe.dc.ea.qq(a);b.insert(a.G,0,null);let c=0;for(const d of a.C)d.kb(b,c),c=d.F(c);return olympe.dc.Ya.from(olympe.dc.Ya.empty(),b)}};olympe.dc.query.errors={};olympe.dc.query.errors.Xj=class extends olympe.dc.query.Di{constructor(a,b,c,d){super(a,b,c,new olympe.dc.db.xc);this.error=d}la(){return this.error}};olympe.dc.pc={};function Hg(a,b,c,d){b?a.V[d]=c:delete a.V[d];null===a.G&&(a.G=new olympe.dc.pc.Pj(a.F,a));return a.G}function Kg(a,b){for(let c=0;c<b;c++)if(null!==a.G)a=a.G;else break;return a}function Lg(a,b){a=a.V;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.pc.Pj=class{constructor(a,b){this.F=a;this.depth=b?b.depth+1:0;this.V=Object.create(null);this.G=null}Sc(){return this.F}xg(){this.F.P()?this.F.G():this.F.$(this.depth-1)}};olympe.dc.pc.oa=class{constructor(){}C(){}P(){}$(){}G(){}Qg(){}};olympe.dc.pc.Ij=class{constructor(){this.V=this.K=this.index=this.F=null}P(){return null!==this.F}$(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}C(a,b,c){b=this.K;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.pc.Pj(this),this.index=c,this.K=b):this.K=this.index=null;return b}G(){if(null===this.F)throw Error('Manager not activated, need to set a depth before updating ranks');if(null!==this.V){const a=
624
+ [];null!==this.K&&(0<=this.F?Lg(Kg(this.K,this.F),a):a.push(this.index));this.V(a)}}Qg(a){this.V=a}};olympe.dc.pc.Ij.ma=[olympe.dc.pc.oa];function Mg(a,b){olympe.D.Zf(a.value)?(a.node=olympe.D.el(a.value,b),$a(a.node)||b()):b()}function Ng(a,b){if(olympe.D.Zf(a.value)){const c=olympe.D.Na(),d=a.P;olympe.D.wc([a.value],e=>{d!==e.valueOf()&&(c.run(()=>Mg(a,b)),olympe.D.Na().destroy())})}}
625
+ class Og extends olympe.dc.pc.Pj{constructor(a,b,c){super(a);this.index=b;this.value=c;this.P=this.Xa();this.position=this.node=null;this.$=!1;this.K=null}Xa(){const a=olympe.D.Xa(this.value);return a?a.valueOf():a}destroy(){this.node&&(this.node.destroy(),this.node=null);this.K=this.value=null}C(){return null===this.value}}
626
+ function Pg(a,b){if(!b.C()){var c=a.F;const d=a.qa,e=b.Xa();let f=0,g=c.length,h=0,k;for(null!==b.position&&--g;g>f;){h=Math.floor((f+g)/2);k=d(c[h].P,e);if(0===k||2>g-f){0>k&&null!==b.position&&b.position<=h&&(k=d(c[g].P,e));h=0>k?g:h;break}0>k?f=h:g=h}c=h;b.P=b.Xa();c!==b.position&&(a.insert(b,c),b.$&&a.G())}}function Qg(a){const b=a.qa;a.F.sort((c,d)=>b(c.Xa(),d.Xa()))}
627
+ olympe.dc.pc.Xq=class{constructor(a){this.qa=a;this.K=null;this.F=[];this.V=[];this.ba=null;this.la=new Map}C(a,b,c,d){b='$'+c;const e=this.F;let f;if(a)f=new Og(this,c,d),this.la.set(b,f),this.P()?Mg(f,()=>Pg(this,f)):(f.position=e.length,e.push(f));else{f=this.la.get(b);if(void 0===f)throw Error('Trying to remove an non-registered item: "'+c+'"');this.la.delete(b);null!==f.position&&(this.P()?this.remove(f):delete e[f.position]);f.destroy()}return f}P(){return null!==this.K}$(a){if(null!==this.K)throw Error('Manager already activated (depth='+
628
+ this.K+')');this.K=a;Qg(this);for(let b=0,c=this.F.length;b<c;b++){const d=this.F[b];d.position=b;Ng(d,()=>Pg(this,d))}this.G()}G(){if(null===this.K)throw Error('Manager not activated, need to set a depth before updating ranks');const a=this.F.length;this.V.length=0;for(let d=0;d<a;d++){let e=this.F[d];if(!e.$){var b=e,c=this.K;b.$=!0;b.K=Kg(b,c)}0>this.K?this.V.push(e.index):e.K&&Lg(e.K,this.V)}this.ba&&this.ba(this.V)}Qg(a){this.ba=a}insert(a,b){const c=this.F;var d=c.length;let e=a.position;null===
629
+ e&&(e=d);if(b<e)for(d=e;d>b;d--)c[d]=c[d-1],c[d].position=d;else for(d=e;d<b;d++)c[d]=c[d+1],c[d].position=d;c[b]=a;c[b].position=b}remove(a){const b=this.F,c=b.length-1;if(null!==a.position){for(a=a.position;a<c;a++)b[a]=b[a+1],b[a].position=a;b.length=c}}};olympe.dc.pc.Xq.ma=[olympe.dc.pc.oa];class Rg extends olympe.dc.pc.Pj{constructor(a,b,c){super(a);this.index=b;this.tag=c;this.$=this.P=this.K=!1;this.C=null}}
630
+ function Sg(a,b,c,d,e){const f=Object.create(null),g=a.order,h=a.K;let k,l,n;a.la=!0;l=0;for(n=g.length;l<n;l++)f[g[l]]=null;g.length=0;l=c;for(n=Math.min(b.length,d);l<n;l++)k=b[l],c=h[k],void 0!==c&&(delete f[k],g.push(k),c.K||(c.K=!0,e(!0,c.tag,c.index,c)));for(k in f)Object.prototype.hasOwnProperty.call(f,k)&&(c=h[k],c.K&&(c.K=!1,e(!1,c.tag,c.index,c)),c.P&&(c.C=null,delete h[k]),delete f[k]);a.la=!1;null!==a.F&&a.G()}
631
+ olympe.dc.pc.bm=class{constructor(){this.K={};this.order=[];this.F=null;this.la=!1;this.V=[];this.ba=null}P(){return null!==this.F}$(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}G(){if(null===this.F)throw Error('Manager not activated, need to set a depth before updating ranks');if(!this.la){var a=this.order,b=a.length,c=this.K,d;for(d=this.V.length=0;d<b;d++){var e=c[a[d]];if(0>this.F)this.V.push(e.index);else{if(!e.$){var f=e,g=this.F;f.$=!0;f.C=
632
+ Kg(f,g)}null!==e.C&&Lg(e.C,this.V)}}this.ba&&this.ba(this.V)}}Qg(a){this.ba=a}C(a,b,c){let d=this.K[c];a?void 0===d?(d=new Rg(this,c,b),this.K[c]=d):(d.tag=b,d.P=!1):void 0!==d&&(d.P=!0);return d}};olympe.dc.pc.bm.ma=[olympe.dc.pc.oa];function Eg(a){if(!a.F){for(let b in a.G)Tg(a.G[b]);a.F=!0}a.K=null;a.P=null}function Fg(a,b,c){a.G[c||'root'].V=b}function Gg(a,b,c){a.G[c||'root'].xg(b)}function Ug(a,b,c,d){const e=a.P,f=b+d+c;let g=e[f];void 0===g&&(g=Qd(a.db,b,c,d),e[f]=g);return g}function Vg(a,b){a.F||a.C.xg(b)}function Wg(a,b,c,d,e){if(!a.F){let f=Ug(a,c,d,e||olympe.dc.Ca.DESTINATION);e||(f+=Ug(a,c,d,olympe.dc.Ca.ORIGIN));0===f&&Vg(a,b)}}
633
633
  function Xg(a,b){const c=a.G[b];void 0!==c?(a.N&&a.N.debug('Set current block to',b,null!==c.G?'parent = '+c.G.Z():''),a.C=c):a.N&&a.N.error('Try to set a block that does not exists:',b)}function Yg(a){const b=String(++a.V),c=a.C;a.G[b]=new Zg(b,c);$g(c,b);c.K||(c.K=()=>Xg(a,c.Z()));return b}function ah(a,b){const c=a.C;a.C.K=()=>{Xg(a,c.Z());b()}}function bh(a,b){Tg(b?a.G[b]:a.C)}
634
- olympe.dc.qc.Xq=class{constructor(a,b){this.db=a;this.N=b||null;this.K=Object.create(null);this.P=Object.create(null);this.F=!1;this.V=0;this.C=new Zg('root');this.G=Object.create(null);this.G.root=this.C}register(a,b,c,d,e){this.F||(null!==b&&c&&d&&e?(c=Ug(this,c,d,e),d=this.K[b]||0,this.K[b]=++d,this.C.C===b&&c<=d&&(this.C.C=a)):this.C.C=a)}};function $g(a,b){null===a.F&&(a.F=Object.create(null));a.F[b]=!1}function Tg(a){a.P=!0;null!==a.G&&a.G.notify(a.id)}
635
- class Zg{constructor(a,b){this.id=a;this.G=b||null;this.C=this.V=this.K=this.F=null;this.P=!1}Z(){return this.id}Ag(a){const b=this.V;if(this.P||this.C===a||null===a)b&&b(),!b&&Tg(this)}notify(a){const b=this.K,c=this.F;if(this.P)b&&b();else if(!c[a]){a=c[a]=!0;for(let d in c)if(!c[d]){a=!1;break}a&&b&&b()}}};olympe.dc.pa={};olympe.dc.pa.Af=class{na(){return O(olympe.dc.pa.Af)}C(){return[]}getValue(a,b){return b}ka(){return'{"c":"'+this.na()+'","a":[]}'}toString(){return'Tag()'}};N('olympe.dc.valuedefs.Tag',olympe.dc.pa.Af);olympe.dc.pa.Af.ma=[olympe.dc.Ef];olympe.dc.pa.Cd=class{constructor(a){this.value=a}na(){return O(olympe.dc.pa.Cd)}C(){return[]}getValue(){return this.value}ka(a){a=Qf(a,this.value);return`{"c":"${this.na()}","a":[${a}]}`}toString(){return`Constant(${Pf(this.value)})`}};N('olympe.dc.valuedefs.Constant',olympe.dc.pa.Cd);olympe.dc.pa.Cd.ma=[olympe.dc.Ef];function ch(a,b,c,d){const e=olympe.dc.La(),f=new olympe.dc.qc.Hj,g=new olympe.dc.qc.Xq(e);let h=!1;const k=Object.create(null),l=r=>{if(0<r.length)for(const t in k)r[0]===t&&d(k[t])};let n=(r,t,u,v)=>{const w=olympe.D.Na();w.$()||w.G()||(h||(Fg(g,()=>{v.Ag();Eg(g)}),v.Sc().Rg(l),h=!0),r?k[u]=t:delete k[u],Gg(g,u))};const p=olympe.D.Na();if(null!==c)for(let r=c.length-1;0<=r;r--)n=c[r].getTransform(a,g,p.F(n));n=p.F(n);const q=olympe.X.bc();Ec(e,b,(r,t)=>{g.register(q,null);const u=f.C(r,b,q,null);
636
- n(r,t,q,Hg(u,r,b,q))},q);p.onDestroy(()=>{Fc(e,b,q)});e.Gb(b)||Eg(g)}function dh(a,b,c){const d=c.node,e=olympe.dc.La(),f=a.G(),g=Jd(e,b,a.af,d.F(h=>{null!==h&&(h=f(h));null===h?c.clear():c.update(h)}));d.onDestroy(()=>e.F(b,a.af,g))}
637
- olympe.dc.pa.Kc=class{constructor(a,b,c){this.af=a&&a.T?a.T():a;this.Y=b&&b.filter(d=>d instanceof olympe.dc.Y.Sb||d instanceof olympe.dc.Y.Dc)||null;this.F=c||null;this.defaultValue=null}na(){}Yb(){}G(){}C(){return(this.Y||[]).reduce((a,b)=>a.concat(olympe.dc.query.Relation.from(b)),[])}df(a){this.defaultValue=a;return this}Jg(){return this.Y}Od(){return this.F}getValue(a,b){const c=olympe.D.Ic(this.Yb()||Object,'AbstractProperty valueType');null!==this.defaultValue&&ub(c,this.defaultValue);b=this.F||
638
- b;null!==this.Y?ch(a,b,this.Y,d=>{dh(this,d,c)}):dh(this,b,c);return c.zb()}ka(a){const b=Qf(a,this.af),c=Qf(a,this.F);let d='null';this.Y&&(d=this.Y.map(function(e){return e.ka(a)}).join(','));return`{"c":"${this.na()}","a":["${b}",${d},${c}]}`}toString(){const a=Pf(this.af),b=this.F?','+Pf(this.F):'';let c='';this.Y&&(c=','+this.Y.join(','));return this.na().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.pa.Kc.ma=[olympe.dc.Ef];olympe.dc.pa.oe=class extends olympe.dc.pa.Kc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.pa.oe)}G(){return olympe.dc.X.Tb.Rm}Yb(){return olympe.D.ga}};N('olympe.dc.valuedefs.NumberProperty',olympe.dc.pa.oe);olympe.dc.pa.se=class extends olympe.dc.pa.Kc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.pa.se)}G(){return olympe.dc.X.Tb.Sm}Yb(){return olympe.D.$a}};N('olympe.dc.valuedefs.StringProperty',olympe.dc.pa.se);olympe.dc.pa.xe=class extends olympe.dc.pa.Kc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.pa.xe)}G(){return olympe.dc.X.Tb.Pm}Yb(){return olympe.D.ra}};N('olympe.dc.valuedefs.BooleanProperty',olympe.dc.pa.xe);olympe.dc.pa.ne=class extends olympe.dc.pa.Kc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.pa.ne)}G(){return olympe.dc.X.Tb.Qm}Yb(){return olympe.D.jb}};N('olympe.dc.valuedefs.DateTimeProperty',olympe.dc.pa.ne);olympe.dc.pa.Pn=class{constructor(a,b){if(olympe.D.ag(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.T();var d=olympe.dc.La();const e=d.jc(a,olympe.dm.Property.typeRel);if(!e)throw Error('Type of property '+a+'unavailable locally, cannot proceed with AnyProperty');a=d.Vf(e,olympe.dc.CloudObject.extendRel,olympe.dm.xf);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.O.T():d=new olympe.dc.pa.se(c,b);break;case olympe.dm.Number.O.T():d=new olympe.dc.pa.oe(c,
639
- b);break;case olympe.dm.Boolean.O.T():d=new olympe.dc.pa.xe(c,b);break;case olympe.dm.DateTime.O.T():d=new olympe.dc.pa.ne(c,b)}this.F=d}na(){return this.F.na()}C(){return this.F.C()}getValue(a,b){return this.F.getValue(a,b)}ka(a){return this.F.ka(a)}toString(){return this.F.toString()}};olympe.dc.pa.Pn.ma=[olympe.dc.Ef];olympe.dc.Eb={};olympe.dc.Eb.Number=class{constructor(a){this.C=a}na(){return O(olympe.dc.Eb.Number)}P(){return this.C.C()}K(a,b){return this.C.getValue(a,b)}G(a,b){return a!==b?a>b?1:-1:0}ka(a){return`{"c":"${this.na()}",a:[${this.C.ka(a)}]}`}toString(){return`Number(${this.C.toString()})`}};N('olympe.dc.comparators.Number',olympe.dc.Eb.Number);olympe.dc.Eb.Number.ma=[olympe.dc.Ne];olympe.dc.Eb.String=class{constructor(a){this.C=a}na(){return O(olympe.dc.Eb.String)}P(){return this.C.C()}K(a,b){return olympe.D.Ha([this.C.getValue(a,b)],c=>c.toLowerCase(),olympe.D.$a)}G(a,b){return void 0===a?void 0===b?0:1:a!==b?a>b?1:-1:0}ka(a){return`{"c":"${this.na()}",a:[${this.C.ka(a)}]}`}toString(){return`String(${this.C.toString()})`}};N('olympe.dc.comparators.String',olympe.dc.Eb.String);olympe.dc.Eb.String.ma=[olympe.dc.Ne];olympe.dc.Eb.DateTime=class{constructor(a){this.C=a}na(){return O(olympe.dc.Eb.DateTime)}P(){return this.C.C()}K(a,b){return this.C.getValue(a,b)}G(a,b){if(!a)return b?-1:0;if(!b)return 1;a=a.getTime();b=b.getTime();return a!==b?a>b?1:-1:0}ka(a){return'{"c":"'+this.na()+'",a:['+this.C.ka(a)+']}'}toString(){return'Number('+this.C.toString()+')'}};N('olympe.dc.comparators.DateTime',olympe.dc.Eb.DateTime);olympe.dc.Eb.DateTime.ma=[olympe.dc.Ne];let eh=0;olympe.dc.Eb.Tg=class{constructor(){this.id=eh++}na(){return'CustomLocalComparator#'+eh}P(){return[]}K(){throw Error('GetComparedValue function was not implemented.');}G(){throw Error('Compare function was not implemented.');}ka(){return`{"c":"${this.na()}"}`}toString(){return this.na()+'()'}};olympe.dc.Eb.Tg.ma=[olympe.dc.Ne];olympe.dc.W={};olympe.dc.W.ld=class{constructor(a){this.G=a}na(){return O(olympe.dc.W.ld)}F(){return this.G.F()}C(a,b){return olympe.D.dl(this.G.C(a,b),c=>!c.valueOf())}ka(a){return`{"c":"${this.na()}","a":[${this.G.ka(a)}]}`}toString(){return'Not('+this.G.toString()+')'}};N('olympe.dc.predicates.Not',olympe.dc.W.ld);olympe.dc.W.ld.ma=[olympe.dc.cb];olympe.dc.W.Ud=class{constructor(a){this.W=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.W=this.W.concat(arguments[c]):this.W.push(arguments[c])}na(){return O(olympe.dc.W.Ud)}F(){return this.W.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return olympe.D.ef(this.W.map(c=>c.C(a,b)),function(){for(let c=arguments.length,d=0;d<c;d++)if(!arguments[d].valueOf())return!1;return!0})}ka(a){const b=this.W.map(c=>c.ka(a));return'{"c":"'+this.na()+'","a":['+b.join(',')+']}'}toString(){return'And('+
640
- this.W.map(a=>a.toString()).join(',')+')'}};N('olympe.dc.predicates.And',olympe.dc.W.Ud);olympe.dc.W.Ud.ma=[olympe.dc.cb];olympe.dc.W.be=class{constructor(a){this.W=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.W=this.W.concat(arguments[c]):this.W.push(arguments[c])}na(){return O(olympe.dc.W.be)}F(){return this.W.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return olympe.D.ef(this.W.map(c=>c.C(a,b)),function(){for(let c=arguments.length,d=0;d<c;d++)if(arguments[d].valueOf())return!0;return!1})}ka(a){const b=this.W.map(c=>c.ka(a));return'{"c":"'+this.na()+'","a":['+b.join(',')+']}'}toString(){return'Or('+
641
- this.W.map(a=>a.toString()).join(',')+')'}};N('olympe.dc.predicates.Or',olympe.dc.W.be);olympe.dc.W.be.ma=[olympe.dc.cb];olympe.dc.W.ml=class{constructor(a,b){this.G=a;this.K=b}na(){}F(){return[this.G.C(),this.K.C()]}C(a,b){return olympe.D.Ha([this.G.getValue(a,b),this.K.getValue(a,b)],(c,d)=>{c=c.valueOf();d=d.valueOf();return this.P('string'===typeof c?c:Number(c),'string'===typeof d?d:Number(d))},Boolean)}P(){}ka(a){return'{"c":"'+this.na()+'","a":['+this.G.ka(a)+','+this.K.ka(a)+']}'}toString(){return this.na().replace(/^.+\./,'')+'('+this.G.toString()+','+this.K.toString()+')'}};olympe.dc.W.ml.ma=[olympe.dc.cb];olympe.dc.W.Gc=class{constructor(a,b){this.G=a;this.K=b}na(){return O(olympe.dc.W.Gc)}F(){return[this.G.C(),this.K.C()]}C(a,b){return olympe.D.Ha([this.G.getValue(a,b),this.K.getValue(a,b)],(c,d)=>'object'===typeof c&&void 0!==c.Td?c.Td(d):'object'===typeof d&&void 0!==d.Td?d.Td(c):olympe.D.Ac(c.valueOf()===d.valueOf()),olympe.D.ra,'Test equal predicate')}ka(a){return'{"c":"'+this.na()+'","a":['+this.G.ka(a)+','+this.K.ka(a)+']}'}toString(){return'Equals('+this.G.toString()+','+this.K.toString()+
642
- ')'}};N('olympe.dc.predicates.Equals',olympe.dc.W.Gc);olympe.dc.W.Gc.ma=[olympe.dc.cb];olympe.dc.W.bt=class extends olympe.dc.W.Gc{constructor(a,b){super(a,new olympe.dc.pa.Cd(b))}};olympe.dc.W.bt.ma=[olympe.dc.cb];olympe.dc.W.Ce=class extends olympe.dc.W.ml{constructor(a,b){super(a,b)}na(){return O(olympe.dc.W.Ce)}P(a,b){return a>b}};N('olympe.dc.predicates.Greater',olympe.dc.W.Ce);olympe.dc.W.Je=class extends olympe.dc.W.ml{constructor(a,b){super(a,b)}na(){return O(olympe.dc.W.Je)}P(a,b){return a<b}};N('olympe.dc.predicates.Smaller',olympe.dc.W.Je);olympe.dc.W.Uc=class{constructor(a,b,c){this.source=a;this.value=b;this.G=c?c:!1}na(){return O(olympe.dc.W.Uc)}F(){return[this.source.C(),this.value.C()]}getValue(){return this.value}C(a,b){return olympe.D.Ha([this.source.getValue(a,b),this.value.getValue(a,b),this.G],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return olympe.D.Ac(c.includes(d))},olympe.D.ra)}ka(a){const b=this.source.ka(a),c=this.value.ka(a);a=Qf(a,this.G);return'{"c":"'+this.na()+'","a":['+
643
- b+','+c+','+a+']}'}toString(){const a=Pf(this.G);return'Contains('+this.source.toString()+','+this.value.toString()+','+a+')'}};N('olympe.dc.predicates.Contains',olympe.dc.W.Uc);olympe.dc.W.Uc.ma=[olympe.dc.cb];olympe.dc.W.vd=class{constructor(a,b,c){this.source=a;this.K=b;this.G=void 0===c?!0:c}na(){return O(olympe.dc.W.vd)}F(){return[this.source.C()]}C(a,b){return olympe.D.ef([this.source.getValue(a,b),this.K,this.G],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return(new RegExp(d)).test(c)})}ka(a){const b=this.source.ka(a),c=Qf(a,this.K);a=Qf(a,this.G);return'{"c":"'+this.na()+'","a":['+b+','+c+','+a+']}'}toString(){const a=Pf(this.G);return'Regex('+this.source.toString()+
644
- ','+this.K+','+a+')'}};N('olympe.dc.predicates.Regex',olympe.dc.W.vd);olympe.dc.W.vd.ma=[olympe.dc.cb];olympe.dc.W.sf=class{constructor(a){this.G=new Set;a instanceof Array?a.forEach(b=>{this.G.add(olympe.dc.za(b))}):this.G.add(olympe.dc.za(a))}na(){return O(olympe.dc.W.sf)}F(){return[]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.dc.La();let e=[];const f=()=>{e.forEach(h=>{d.C(h.tag,h.C,h.id)});e=[]},g=(h,k)=>{if(h)if(k===olympe.dc.za(olympe.dc.CloudObject))K(c,this.G.has(k)),f();else{for(const l of e)if(l.tag===k)throw Error(`You should never extend a model to itself (${k})`);this.G.has(k)?
645
- (K(c,!0),f()):(h=new fh(k,olympe.dc.CloudObject.extendRel),e.push(h),V(d,h.tag,h.C,g,h.id))}};a=new fh(b,olympe.dc.CloudObject.modelRel);e.push(a);V(d,a.tag,a.C,g,a.id);c.onDestroy(f);$a(c)||K(c,!1);return c}ka(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(Array.from(this.G))+']}'}toString(){return'InstanceOf('+Array.from(this.G).join(', ')+')'}};class fh{constructor(a,b){this.tag=a;this.C=b;this.id=olympe.X.Fg()}}N('olympe.dc.predicates.InstanceOf',olympe.dc.W.sf);olympe.dc.W.sf.ma=[olympe.dc.cb];function gh(a){return a.Pa.map(b=>b.T())}function hh(a){return a.Pa.map(b=>b.Sa())}
646
- olympe.dc.W.qf=class{constructor(a,b,c){this.Pa=[];this.G=c instanceof Array?c:void 0!==c?[olympe.dc.za(c)]:[];a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.Y.Dc?this.Pa.push(new ih(c.T(),c.Sa(),c.F,c.C)):this.Pa.push(new ih(olympe.dc.za(c),b[d],1,1))}na(){return O(olympe.dc.W.qf)}F(){return[this.Pa.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.X.bc(),e=olympe.dc.La();let f=0;a=(h,k)=>{0!==this.G.length&&!this.G.includes(k)||
647
- c.G()||(f+=h?1:-1,K(c,0<f))};const g=this.Pa;for(let h=g.length-1;0<=h;h--)a=jh(g[h],e,a,d+h);Ec(e,b,a,d);olympe.D.Na().onDestroy(()=>{Fc(e,b,d)});c.df(!1);return c}ka(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(this.Pa.map(a=>a.ka()))+(0!==this.G.length?',"'+this.G.toString():'')+'"]}'}toString(){return'HasRelated('+(0!==this.G.length?'#'+this.G.toString()+', ':'')+this.Pa.map(a=>a.ka())+')'}};N('olympe.dc.predicates.HasRelated',olympe.dc.W.qf);
648
- function jh(a,b,c,d){const e=Object.create(null);d+=olympe.X.Fg();const f=(g,h,k)=>{k>=a.F&&c(g,h);if(!(0<=a.C&&k>=a.C)){var l=d+k;g?e[h]||(e[h]=!0,V(b,h,a,(n,p)=>{f(n,p,k+1)},l)):(delete e[h],b.C(h,a,l))}};return(g,h)=>f(g,h,0)}class ih extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.C=d}ka(){return`${this.T()}, ${this.Sa()}, ${this.F}, ${this.C}`}}olympe.dc.W.qf.ma=[olympe.dc.cb];olympe.dc.W.tl=class{constructor(a,b){this.G=a;this.value=b}C(a,b){return olympe.D.ef([this.G,this.value.getValue(a,b)],(c,d)=>{c=c.valueOf();return(Number(c)&Number(d.valueOf()))===Number(c)})}na(){return O(olympe.dc.W.tl)}F(){return[this.value.C()]}ka(a){const b=olympe.D.ob(this.G)?this.G.Qa.Kb.valueOf():this.G.valueOf();return'{"c":"'+this.na()+'","a":['+b+','+this.value.ka(a)+']}'}toString(){const a=olympe.D.ob(this.G)?this.G.Qa.Kb.valueOf():this.G.valueOf();return this.na().replace(/^.+\./,'')+
649
- '('+a.toString()+','+this.value.toString()+')'}};N('olympe.dc.predicates.BitMask',olympe.dc.W.tl);olympe.dc.W.tl.ma=[olympe.dc.cb];let kh=0;olympe.dc.W.Tg=class{constructor(){this.id=kh++}na(){return'CustomLocalPredicate#'+this.id}F(){return[]}C(){throw Error('Test function was not implemented.');}ka(){return`{"c":"${this.na()}"}`}toString(){return this.na()+'()'}};olympe.dc.W.Tg.ma=[olympe.dc.cb];olympe.dc.W.Ml=class{constructor(a,b,c){this.Pa=[];this.G=void 0!==c?c.map(olympe.dc.za):null;a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.Y.Dc?this.Pa.push(new lh(c.T(),c.Sa(),c.F,c.C)):this.Pa.push(new lh(olympe.dc.za(c),b[d],1,1))}na(){return O(olympe.dc.W.Ml)}F(){return[this.Pa.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.dc.La(),e=olympe.X.Fg();a=(h,k,l)=>{k&&(null===this.G||this.G.includes(l))&&h(1)};const f=this.Pa;
650
- for(let h=f.length-1;0<=h;h--)a=f[h].getTransform(d,a,e+h);let g=0;Ec(d,b,a.bind(null,h=>{c.$()||c.G()||(g+=h,K(c,0<g))}),e);olympe.D.Na().onDestroy(()=>Fc(d,b,e));c.df(!1);return c}ka(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(this.Pa.map(a=>a.ka()))+(null!==this.G?',"'+this.G.toString():'')+'"]}'}toString(){return'HasRelatedTree('+(null!==this.G?'#['+this.G.toString()+'], ':'')+this.Pa.map(a=>a.ka())+')'}};N('olympe.dc.predicates.HasRelatedTree',olympe.dc.W.Ml);
651
- class lh extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.C=d;this.K=new Map;this.G=new Map}getTransform(a,b,c){const d=this.G,e=this.K,f=new Set,g=(k,l,n)=>{e.has(l)?e.get(l).set(c+n,k):e.set(l,(new Map).set(c+n,k))},h=(k,l,n,p,q)=>{const r=olympe.X.Fg();if(p){const t=n+q,u=v=>{const w=e.get(q);if(f.has(t))throw Error(`Try to use the predicate HasRelatedTree with recursion in a graph cluster containing a loop around instances ${n} and ${q}`);void 0!==w&&
652
- null!==w&&(f.add(t),d.set(q,(d.get(q)||0)+v),Array.from(w.values()).forEach(y=>y(v)));f.delete(t)};g(k,q,n);d.has(q)?k(d.get(q)):(l>=this.F&&b(v=>{d.set(q,(d.get(q)||0)+v);k(v)},p,q),(0>this.C||l<=this.C)&&q!==n&&V(a,q,this,h.bind(this,u,l+1,q),r))}else k(-d.get(q)),e.get(q).delete(c+n),0===e.get(q).size&&(d.delete(q),e.delete(q),a.C(q,this,r))};return(k,l,n)=>h(k,0,'origin',l,n)}ka(){return`${this.T()}, ${this.Sa()}, ${this.F}, ${this.C}`}}olympe.dc.W.Ml.ma=[olympe.dc.cb];olympe.dc.Y={};olympe.dc.Y.pk={gt:1,tt:-1,up:0};olympe.dc.Y.KB={kz:!0,Lz:!1};olympe.dc.Y.Sb=class extends olympe.dc.ua.Relation{constructor(a,b){super(a,b||olympe.dc.Ca.DESTINATION)}Yb(){return Tc(this)}na(){return O(olympe.dc.Y.Sb)}zc(){return new olympe.dc.Y.Sb(this.tag,this.direction===olympe.dc.Ca.DESTINATION?olympe.dc.Ca.ORIGIN:olympe.dc.Ca.DESTINATION)}getTransform(a,b,c){const d=olympe.dc.La(),e=this.T(),f=this.Sa();return(g,h,k,l)=>{Wg(b,k,h,e,f);g?V(d,h,this,(n,p)=>{const q=olympe.X.pb(k+f+e+p,20),r=Hg(l,n,p,q);n&&b.register(q,k,h,e,f);c(n,p,q,r)},k):d.C(h,this,k)}}ka(){return'{"c":"'+
653
- this.na()+'","a":["'+this.T()+'","'+this.Sa()+'"]}'}toString(){return'Related('+this.Sa()+this.T()+')'}};N('olympe.dc.transformers.Related',olympe.dc.Y.Sb);olympe.dc.Y.Sb.ma=[olympe.dc.Yc];olympe.dc.Y.Dc=class extends olympe.dc.ua.Relation{constructor(a,b=olympe.dc.Ca.DESTINATION,c=1,d=-1){super(a,b);this.F=c;this.C=d}Yb(){return Tc(this)}na(){return O(olympe.dc.Y.Dc)}getTransform(a,b,c){const d=olympe.dc.La(),e=Object.create(null),f=olympe.dc.Ca.ORIGIN,g=olympe.dc.Ca.DESTINATION,h=this.T(),k=this.Sa(),l=(p,q,r)=>{if(!(0<=this.C&&p>=this.C)){var t=d.tb(r,this);p+=1;for(let u=0,v=t.length;u<v;u++){if(void 0!==e[t[u]]||r===t[u])continue;const w=olympe.X.pb(q+k+(h+'_'+p)+t[u],20);b.register(w,
634
+ olympe.dc.pc.Yq=class{constructor(a,b){this.db=a;this.N=b||null;this.K=Object.create(null);this.P=Object.create(null);this.F=!1;this.V=0;this.C=new Zg('root');this.G=Object.create(null);this.G.root=this.C}register(a,b,c,d,e){this.F||(null!==b&&c&&d&&e?(c=Ug(this,c,d,e),d=this.K[b]||0,this.K[b]=++d,this.C.C===b&&c<=d&&(this.C.C=a)):this.C.C=a)}};function $g(a,b){null===a.F&&(a.F=Object.create(null));a.F[b]=!1}function Tg(a){a.P=!0;null!==a.G&&a.G.notify(a.id)}
635
+ class Zg{constructor(a,b){this.id=a;this.G=b||null;this.C=this.V=this.K=this.F=null;this.P=!1}Z(){return this.id}xg(a){const b=this.V;if(this.P||this.C===a||null===a)b&&b(),!b&&Tg(this)}notify(a){const b=this.K,c=this.F;if(this.P)b&&b();else if(!c[a]){a=c[a]=!0;for(let d in c)if(!c[d]){a=!1;break}a&&b&&b()}}};olympe.dc.pa={};olympe.dc.pa.yf=class{na(){return O(olympe.dc.pa.yf)}C(){return[]}getValue(a,b){return b}ka(){return'{"c":"'+this.na()+'","a":[]}'}toString(){return'Tag()'}};N('olympe.dc.valuedefs.Tag',olympe.dc.pa.yf);olympe.dc.pa.yf.ma=[olympe.dc.Cf];olympe.dc.pa.Bd=class{constructor(a){this.value=a}na(){return O(olympe.dc.pa.Bd)}C(){return[]}getValue(){return this.value}ka(a){a=Qf(a,this.value);return`{"c":"${this.na()}","a":[${a}]}`}toString(){return`Constant(${Pf(this.value)})`}};N('olympe.dc.valuedefs.Constant',olympe.dc.pa.Bd);olympe.dc.pa.Bd.ma=[olympe.dc.Cf];function ch(a,b,c,d){const e=olympe.dc.La(),f=new olympe.dc.pc.Ij,g=new olympe.dc.pc.Yq(e);let h=!1;const k=Object.create(null),l=r=>{if(0<r.length)for(const t in k)r[0]===t&&d(k[t])};let n=(r,t,u,v)=>{const w=olympe.D.Na();w.$()||w.C()||(h||(Fg(g,()=>{v.xg();Eg(g)}),v.Sc().Qg(l),h=!0),r?k[u]=t:delete k[u],Gg(g,u))};const p=olympe.D.Na();if(null!==c)for(let r=c.length-1;0<=r;r--)n=c[r].getTransform(a,g,p.F(n));n=p.F(n);const q=olympe.X.bc();Ec(e,b,(r,t)=>{g.register(q,null);const u=f.C(r,b,q,null);
636
+ n(r,t,q,Hg(u,r,b,q))},q);p.onDestroy(()=>{Fc(e,b,q)});e.Gb(b)||Eg(g)}function dh(a,b,c){const d=c.node,e=olympe.dc.La(),f=a.G(),g=Jd(e,b,a.$e,d.F(h=>{null!==h&&(h=f(h));null===h?c.clear():c.update(h)}));d.onDestroy(()=>e.F(b,a.$e,g))}
637
+ olympe.dc.pa.Kc=class{constructor(a,b,c){this.$e=a&&a.T?a.T():a;this.Y=b&&b.filter(d=>d instanceof olympe.dc.Y.Sb||d instanceof olympe.dc.Y.Dc)||null;this.F=c||null;this.defaultValue=null}na(){}Zb(){}G(){}C(){return(this.Y||[]).reduce((a,b)=>a.concat(olympe.dc.query.Relation.from(b)),[])}cf(a){this.defaultValue=a;return this}Gg(){return this.Y}Nd(){return this.F}getValue(a,b){const c=olympe.D.Ic(this.Zb()||Object,'AbstractProperty valueType');null!==this.defaultValue&&ub(c,this.defaultValue);b=this.F||
638
+ b;null!==this.Y?ch(a,b,this.Y,d=>{dh(this,d,c)}):dh(this,b,c);return c.zb()}ka(a){const b=Qf(a,this.$e),c=Qf(a,this.F);let d='null';this.Y&&(d=this.Y.map(function(e){return e.ka(a)}).join(','));return`{"c":"${this.na()}","a":["${b}",${d},${c}]}`}toString(){const a=Pf(this.$e),b=this.F?','+Pf(this.F):'';let c='';this.Y&&(c=','+this.Y.join(','));return this.na().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.pa.Kc.ma=[olympe.dc.Cf];olympe.dc.pa.oe=class extends olympe.dc.pa.Kc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.pa.oe)}G(){return olympe.dc.X.Tb.Sm}Zb(){return olympe.D.ga}};N('olympe.dc.valuedefs.NumberProperty',olympe.dc.pa.oe);olympe.dc.pa.se=class extends olympe.dc.pa.Kc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.pa.se)}G(){return olympe.dc.X.Tb.Tm}Zb(){return olympe.D.$a}};N('olympe.dc.valuedefs.StringProperty',olympe.dc.pa.se);olympe.dc.pa.xe=class extends olympe.dc.pa.Kc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.pa.xe)}G(){return olympe.dc.X.Tb.Qm}Zb(){return olympe.D.ra}};N('olympe.dc.valuedefs.BooleanProperty',olympe.dc.pa.xe);olympe.dc.pa.ne=class extends olympe.dc.pa.Kc{constructor(a,b,c){super(a,b,c)}na(){return O(olympe.dc.pa.ne)}G(){return olympe.dc.X.Tb.Rm}Zb(){return olympe.D.jb}};N('olympe.dc.valuedefs.DateTimeProperty',olympe.dc.pa.ne);olympe.dc.pa.Qn=class{constructor(a,b){if(olympe.D.Zf(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.T();var d=olympe.dc.La();const e=d.ic(a,olympe.dm.Property.typeRel);if(!e)throw Error('Type of property '+a+'unavailable locally, cannot proceed with AnyProperty');a=d.Tf(e,olympe.dc.CloudObject.extendRel,olympe.dm.Oe);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.O.T():d=new olympe.dc.pa.se(c,b);break;case olympe.dm.Number.O.T():d=new olympe.dc.pa.oe(c,
639
+ b);break;case olympe.dm.Boolean.O.T():d=new olympe.dc.pa.xe(c,b);break;case olympe.dm.DateTime.O.T():d=new olympe.dc.pa.ne(c,b)}this.F=d}na(){return this.F.na()}C(){return this.F.C()}getValue(a,b){return this.F.getValue(a,b)}ka(a){return this.F.ka(a)}toString(){return this.F.toString()}};olympe.dc.pa.Qn.ma=[olympe.dc.Cf];olympe.dc.Db={};olympe.dc.Db.Number=class{constructor(a){this.C=a}na(){return O(olympe.dc.Db.Number)}P(){return this.C.C()}K(a,b){return this.C.getValue(a,b)}G(a,b){return a!==b?a>b?1:-1:0}ka(a){return`{"c":"${this.na()}",a:[${this.C.ka(a)}]}`}toString(){return`Number(${this.C.toString()})`}};N('olympe.dc.comparators.Number',olympe.dc.Db.Number);olympe.dc.Db.Number.ma=[olympe.dc.Ne];olympe.dc.Db.String=class{constructor(a){this.C=a}na(){return O(olympe.dc.Db.String)}P(){return this.C.C()}K(a,b){return olympe.D.Ha([this.C.getValue(a,b)],c=>c.toLowerCase(),olympe.D.$a)}G(a,b){return void 0===a?void 0===b?0:1:a!==b?a>b?1:-1:0}ka(a){return`{"c":"${this.na()}",a:[${this.C.ka(a)}]}`}toString(){return`String(${this.C.toString()})`}};N('olympe.dc.comparators.String',olympe.dc.Db.String);olympe.dc.Db.String.ma=[olympe.dc.Ne];olympe.dc.Db.DateTime=class{constructor(a){this.C=a}na(){return O(olympe.dc.Db.DateTime)}P(){return this.C.C()}K(a,b){return this.C.getValue(a,b)}G(a,b){if(!a)return b?-1:0;if(!b)return 1;a=a.getTime();b=b.getTime();return a!==b?a>b?1:-1:0}ka(a){return'{"c":"'+this.na()+'",a:['+this.C.ka(a)+']}'}toString(){return'Number('+this.C.toString()+')'}};N('olympe.dc.comparators.DateTime',olympe.dc.Db.DateTime);olympe.dc.Db.DateTime.ma=[olympe.dc.Ne];let eh=0;olympe.dc.Db.Sg=class{constructor(){this.id=eh++}na(){return'CustomLocalComparator#'+eh}P(){return[]}K(){throw Error('GetComparedValue function was not implemented.');}G(){throw Error('Compare function was not implemented.');}ka(){return`{"c":"${this.na()}"}`}toString(){return this.na()+'()'}};olympe.dc.Db.Sg.ma=[olympe.dc.Ne];olympe.dc.W={};olympe.dc.W.ld=class{constructor(a){this.G=a}na(){return O(olympe.dc.W.ld)}F(){return this.G.F()}C(a,b){return olympe.D.el(this.G.C(a,b),c=>!c.valueOf())}ka(a){return`{"c":"${this.na()}","a":[${this.G.ka(a)}]}`}toString(){return'Not('+this.G.toString()+')'}};N('olympe.dc.predicates.Not',olympe.dc.W.ld);olympe.dc.W.ld.ma=[olympe.dc.cb];olympe.dc.W.Td=class{constructor(a){this.W=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.W=this.W.concat(arguments[c]):this.W.push(arguments[c])}na(){return O(olympe.dc.W.Td)}F(){return this.W.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return olympe.D.df(this.W.map(c=>c.C(a,b)),function(){for(let c=arguments.length,d=0;d<c;d++)if(!arguments[d].valueOf())return!1;return!0})}ka(a){const b=this.W.map(c=>c.ka(a));return'{"c":"'+this.na()+'","a":['+b.join(',')+']}'}toString(){return'And('+
640
+ this.W.map(a=>a.toString()).join(',')+')'}};N('olympe.dc.predicates.And',olympe.dc.W.Td);olympe.dc.W.Td.ma=[olympe.dc.cb];olympe.dc.W.ae=class{constructor(a){this.W=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.W=this.W.concat(arguments[c]):this.W.push(arguments[c])}na(){return O(olympe.dc.W.ae)}F(){return this.W.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return olympe.D.df(this.W.map(c=>c.C(a,b)),function(){for(let c=arguments.length,d=0;d<c;d++)if(arguments[d].valueOf())return!0;return!1})}ka(a){const b=this.W.map(c=>c.ka(a));return'{"c":"'+this.na()+'","a":['+b.join(',')+']}'}toString(){return'Or('+
641
+ this.W.map(a=>a.toString()).join(',')+')'}};N('olympe.dc.predicates.Or',olympe.dc.W.ae);olympe.dc.W.ae.ma=[olympe.dc.cb];olympe.dc.W.nl=class{constructor(a,b){this.G=a;this.K=b}na(){}F(){return[this.G.C(),this.K.C()]}C(a,b){return olympe.D.Ha([this.G.getValue(a,b),this.K.getValue(a,b)],(c,d)=>{c=c.valueOf();d=d.valueOf();return this.P('string'===typeof c?c:Number(c),'string'===typeof d?d:Number(d))},Boolean)}P(){}ka(a){return'{"c":"'+this.na()+'","a":['+this.G.ka(a)+','+this.K.ka(a)+']}'}toString(){return this.na().replace(/^.+\./,'')+'('+this.G.toString()+','+this.K.toString()+')'}};olympe.dc.W.nl.ma=[olympe.dc.cb];olympe.dc.W.Gc=class{constructor(a,b){this.G=a;this.K=b}na(){return O(olympe.dc.W.Gc)}F(){return[this.G.C(),this.K.C()]}C(a,b){return olympe.D.Ha([this.G.getValue(a,b),this.K.getValue(a,b)],(c,d)=>'object'===typeof c&&void 0!==c.Sd?c.Sd(d):'object'===typeof d&&void 0!==d.Sd?d.Sd(c):olympe.D.Ac(c.valueOf()===d.valueOf()),olympe.D.ra,'Test equal predicate')}ka(a){return'{"c":"'+this.na()+'","a":['+this.G.ka(a)+','+this.K.ka(a)+']}'}toString(){return'Equals('+this.G.toString()+','+this.K.toString()+
642
+ ')'}};N('olympe.dc.predicates.Equals',olympe.dc.W.Gc);olympe.dc.W.Gc.ma=[olympe.dc.cb];olympe.dc.W.ct=class extends olympe.dc.W.Gc{constructor(a,b){super(a,new olympe.dc.pa.Bd(b))}};olympe.dc.W.ct.ma=[olympe.dc.cb];olympe.dc.W.Ce=class extends olympe.dc.W.nl{constructor(a,b){super(a,b)}na(){return O(olympe.dc.W.Ce)}P(a,b){return a>b}};N('olympe.dc.predicates.Greater',olympe.dc.W.Ce);olympe.dc.W.Je=class extends olympe.dc.W.nl{constructor(a,b){super(a,b)}na(){return O(olympe.dc.W.Je)}P(a,b){return a<b}};N('olympe.dc.predicates.Smaller',olympe.dc.W.Je);olympe.dc.W.Uc=class{constructor(a,b,c){this.source=a;this.value=b;this.G=c?c:!1}na(){return O(olympe.dc.W.Uc)}F(){return[this.source.C(),this.value.C()]}getValue(){return this.value}C(a,b){return olympe.D.Ha([this.source.getValue(a,b),this.value.getValue(a,b),this.G],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return olympe.D.Ac(c.includes(d))},olympe.D.ra)}ka(a){const b=this.source.ka(a),c=this.value.ka(a);a=Qf(a,this.G);return'{"c":"'+this.na()+'","a":['+
643
+ b+','+c+','+a+']}'}toString(){const a=Pf(this.G);return'Contains('+this.source.toString()+','+this.value.toString()+','+a+')'}};N('olympe.dc.predicates.Contains',olympe.dc.W.Uc);olympe.dc.W.Uc.ma=[olympe.dc.cb];olympe.dc.W.vd=class{constructor(a,b,c){this.source=a;this.K=b;this.G=void 0===c?!0:c}na(){return O(olympe.dc.W.vd)}F(){return[this.source.C()]}C(a,b){return olympe.D.df([this.source.getValue(a,b),this.K,this.G],(c,d,e)=>{c=String(c);d=String(d);e.valueOf()||(c=c.toLowerCase(),d=d.toLowerCase());return(new RegExp(d)).test(c)})}ka(a){const b=this.source.ka(a),c=Qf(a,this.K);a=Qf(a,this.G);return'{"c":"'+this.na()+'","a":['+b+','+c+','+a+']}'}toString(){const a=Pf(this.G);return'Regex('+this.source.toString()+
644
+ ','+this.K+','+a+')'}};N('olympe.dc.predicates.Regex',olympe.dc.W.vd);olympe.dc.W.vd.ma=[olympe.dc.cb];olympe.dc.W.rf=class{constructor(a){this.G=new Set;a instanceof Array?a.forEach(b=>{this.G.add(olympe.dc.za(b))}):this.G.add(olympe.dc.za(a))}na(){return O(olympe.dc.W.rf)}F(){return[]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.dc.La();let e=[];const f=()=>{e.forEach(h=>{d.C(h.tag,h.C,h.id)});e=[]},g=(h,k)=>{if(h)if(k===olympe.dc.za(olympe.dc.CloudObject))K(c,this.G.has(k)),f();else{for(const l of e)if(l.tag===k)throw Error(`You should never extend a model to itself (${k})`);this.G.has(k)?
645
+ (K(c,!0),f()):(h=new fh(k,olympe.dc.CloudObject.extendRel),e.push(h),V(d,h.tag,h.C,g,h.id))}};a=new fh(b,olympe.dc.CloudObject.modelRel);e.push(a);V(d,a.tag,a.C,g,a.id);c.onDestroy(f);$a(c)||K(c,!1);return c}ka(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(Array.from(this.G))+']}'}toString(){return'InstanceOf('+Array.from(this.G).join(', ')+')'}};class fh{constructor(a,b){this.tag=a;this.C=b;this.id=olympe.X.Cg()}}N('olympe.dc.predicates.InstanceOf',olympe.dc.W.rf);olympe.dc.W.rf.ma=[olympe.dc.cb];function gh(a){return a.Pa.map(b=>b.T())}function hh(a){return a.Pa.map(b=>b.Sa())}
646
+ olympe.dc.W.pf=class{constructor(a,b,c){this.Pa=[];this.G=c instanceof Array?c:void 0!==c?[olympe.dc.za(c)]:[];a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.Y.Dc?this.Pa.push(new ih(c.T(),c.Sa(),c.F,c.C)):this.Pa.push(new ih(olympe.dc.za(c),b[d],1,1))}na(){return O(olympe.dc.W.pf)}F(){return[this.Pa.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.X.bc(),e=olympe.dc.La();let f=0;a=(h,k)=>{0!==this.G.length&&!this.G.includes(k)||
647
+ c.C()||(f+=h?1:-1,K(c,0<f))};const g=this.Pa;for(let h=g.length-1;0<=h;h--)a=jh(g[h],e,a,d+h);Ec(e,b,a,d);olympe.D.Na().onDestroy(()=>{Fc(e,b,d)});c.cf(!1);return c}ka(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(this.Pa.map(a=>a.ka()))+(0!==this.G.length?',"'+this.G.toString():'')+'"]}'}toString(){return'HasRelated('+(0!==this.G.length?'#'+this.G.toString()+', ':'')+this.Pa.map(a=>a.ka())+')'}};N('olympe.dc.predicates.HasRelated',olympe.dc.W.pf);
648
+ function jh(a,b,c,d){const e=Object.create(null);d+=olympe.X.Cg();const f=(g,h,k)=>{k>=a.F&&c(g,h);if(!(0<=a.C&&k>=a.C)){var l=d+k;g?e[h]||(e[h]=!0,V(b,h,a,(n,p)=>{f(n,p,k+1)},l)):(delete e[h],b.C(h,a,l))}};return(g,h)=>f(g,h,0)}class ih extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.C=d}ka(){return`${this.T()}, ${this.Sa()}, ${this.F}, ${this.C}`}}olympe.dc.W.pf.ma=[olympe.dc.cb];olympe.dc.W.ul=class{constructor(a,b){this.G=a;this.value=b}C(a,b){return olympe.D.df([this.G,this.value.getValue(a,b)],(c,d)=>{c=c.valueOf();return(Number(c)&Number(d.valueOf()))===Number(c)})}na(){return O(olympe.dc.W.ul)}F(){return[this.value.C()]}ka(a){const b=olympe.D.ob(this.G)?this.G.Qa.Kb.valueOf():this.G.valueOf();return'{"c":"'+this.na()+'","a":['+b+','+this.value.ka(a)+']}'}toString(){const a=olympe.D.ob(this.G)?this.G.Qa.Kb.valueOf():this.G.valueOf();return this.na().replace(/^.+\./,'')+
649
+ '('+a.toString()+','+this.value.toString()+')'}};N('olympe.dc.predicates.BitMask',olympe.dc.W.ul);olympe.dc.W.ul.ma=[olympe.dc.cb];let kh=0;olympe.dc.W.Sg=class{constructor(){this.id=kh++}na(){return'CustomLocalPredicate#'+this.id}F(){return[]}C(){throw Error('Test function was not implemented.');}ka(){return`{"c":"${this.na()}"}`}toString(){return this.na()+'()'}};olympe.dc.W.Sg.ma=[olympe.dc.cb];olympe.dc.W.Nl=class{constructor(a,b,c){this.Pa=[];this.G=void 0!==c?c.map(olympe.dc.za):null;a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.Y.Dc?this.Pa.push(new lh(c.T(),c.Sa(),c.F,c.C)):this.Pa.push(new lh(olympe.dc.za(c),b[d],1,1))}na(){return O(olympe.dc.W.Nl)}F(){return[this.Pa.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.dc.La(),e=olympe.X.Cg();a=(h,k,l)=>{k&&(null===this.G||this.G.includes(l))&&h(1)};const f=this.Pa;
650
+ for(let h=f.length-1;0<=h;h--)a=f[h].getTransform(d,a,e+h);let g=0;Ec(d,b,a.bind(null,h=>{c.$()||c.C()||(g+=h,K(c,0<g))}),e);olympe.D.Na().onDestroy(()=>Fc(d,b,e));c.cf(!1);return c}ka(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(this.Pa.map(a=>a.ka()))+(null!==this.G?',"'+this.G.toString():'')+'"]}'}toString(){return'HasRelatedTree('+(null!==this.G?'#['+this.G.toString()+'], ':'')+this.Pa.map(a=>a.ka())+')'}};N('olympe.dc.predicates.HasRelatedTree',olympe.dc.W.Nl);
651
+ class lh extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.C=d;this.K=new Map;this.G=new Map}getTransform(a,b,c){const d=this.G,e=this.K,f=new Set,g=(k,l,n)=>{e.has(l)?e.get(l).set(c+n,k):e.set(l,(new Map).set(c+n,k))},h=(k,l,n,p,q)=>{const r=olympe.X.Cg();if(p){const t=n+q,u=v=>{const w=e.get(q);if(f.has(t))throw Error(`Try to use the predicate HasRelatedTree with recursion in a graph cluster containing a loop around instances ${n} and ${q}`);void 0!==w&&
652
+ null!==w&&(f.add(t),d.set(q,(d.get(q)||0)+v),Array.from(w.values()).forEach(y=>y(v)));f.delete(t)};g(k,q,n);d.has(q)?k(d.get(q)):(l>=this.F&&b(v=>{d.set(q,(d.get(q)||0)+v);k(v)},p,q),(0>this.C||l<=this.C)&&q!==n&&V(a,q,this,h.bind(this,u,l+1,q),r))}else k(-d.get(q)),e.get(q).delete(c+n),0===e.get(q).size&&(d.delete(q),e.delete(q),a.C(q,this,r))};return(k,l,n)=>h(k,0,'origin',l,n)}ka(){return`${this.T()}, ${this.Sa()}, ${this.F}, ${this.C}`}}olympe.dc.W.Nl.ma=[olympe.dc.cb];olympe.dc.Y={};olympe.dc.Y.qk={ht:1,ut:-1,vp:0};olympe.dc.Y.MB={mz:!0,Nz:!1};olympe.dc.Y.Sb=class extends olympe.dc.ua.Relation{constructor(a,b){super(a,b||olympe.dc.Ca.DESTINATION)}Zb(){return Tc(this)}na(){return O(olympe.dc.Y.Sb)}zc(){return new olympe.dc.Y.Sb(this.tag,this.direction===olympe.dc.Ca.DESTINATION?olympe.dc.Ca.ORIGIN:olympe.dc.Ca.DESTINATION)}getTransform(a,b,c){const d=olympe.dc.La(),e=this.T(),f=this.Sa();return(g,h,k,l)=>{Wg(b,k,h,e,f);g?V(d,h,this,(n,p)=>{const q=olympe.X.pb(k+f+e+p,20),r=Hg(l,n,p,q);n&&b.register(q,k,h,e,f);c(n,p,q,r)},k):d.C(h,this,k)}}ka(){return'{"c":"'+
653
+ this.na()+'","a":["'+this.T()+'","'+this.Sa()+'"]}'}toString(){return'Related('+this.Sa()+this.T()+')'}};N('olympe.dc.transformers.Related',olympe.dc.Y.Sb);olympe.dc.Y.Sb.ma=[olympe.dc.Yc];olympe.dc.Y.Dc=class extends olympe.dc.ua.Relation{constructor(a,b=olympe.dc.Ca.DESTINATION,c=1,d=-1){super(a,b);this.F=c;this.C=d}Zb(){return Tc(this)}na(){return O(olympe.dc.Y.Dc)}getTransform(a,b,c){const d=olympe.dc.La(),e=Object.create(null),f=olympe.dc.Ca.ORIGIN,g=olympe.dc.Ca.DESTINATION,h=this.T(),k=this.Sa(),l=(p,q,r)=>{if(!(0<=this.C&&p>=this.C)){var t=d.tb(r,this);p+=1;for(let u=0,v=t.length;u<v;u++){if(void 0!==e[t[u]]||r===t[u])continue;const w=olympe.X.pb(q+k+(h+'_'+p)+t[u],20);b.register(w,
654
654
  q,r,h,k||g);null===k&&b.register(w,q,r,h,f)}}},n=(p,q,r,t,u,v)=>{u&&!b.F&&l(p,t,v);p>=this.F?c(u,v,t,Hg(r,u,v,t)):Wg(b,t,v,h,k);0<=this.C&&p>=this.C||(u?e[v]||(e[v]=!0,V(d,v,this,(w,y)=>{const B=p+1,D=olympe.X.pb(t+k+(h+'_'+B)+y,20);n(B,v,r,D,w,y)},t)):(d.C(v,this,t),delete e[v]))};return(p,q,r,t)=>n(0,null,t,r,p,q)}ka(){return'{"c":"'+this.na()+'","a":["'+this.T()+'","'+this.Sa()+'",'+this.F+','+this.C+']}'}toString(){return'RecursiveRelated('+this.Sa()+this.T()+'['+this.F+'..'+this.C+'])'}};
655
655
  N('olympe.dc.transformers.RecursiveRelated',olympe.dc.Y.Dc);olympe.dc.Y.Dc.ma=[olympe.dc.Yc];function mh(a){return a.Pa.map(b=>b.T())}
656
- olympe.dc.Y.Fe=class{constructor(a,b){this.direction=b||olympe.dc.Ca.DESTINATION;this.Pa=a.map(c=>new olympe.dc.ua.Relation(c,this.direction))}Yb(){return olympe.dc.CloudObject}na(){return O(olympe.dc.Y.Fe)}Sa(){return this.direction}getTransform(a,b,c){const d=olympe.dc.La(),e=(f,g,h,k)=>V(d,f,k,(l,n)=>{var p=k.Sa();var q=k.T();p=olympe.X.pb(g+p+q+n,20);q=Hg(h,l,n,p);l&&b.register(p,g,f,k.T(),k.Sa());c(l,n,p,q)},g);return(f,g,h,k)=>{f?this.Pa.forEach(l=>{Wg(b,h,g,l.T(),l.Sa());e(g,h,k,l)}):this.Pa.forEach(l=>
657
- {d.C(g,l,h)})}}ka(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(mh(this))+',"'+this.direction+'"]}'}toString(){return'MultiRelated('+this.Sa()+'['+mh(this).join(',')+'])'}};N('olympe.dc.transformers.MultiRelated',olympe.dc.Y.Fe);olympe.dc.Y.Fe.ma=[olympe.dc.Yc];olympe.dc.Y.Gl=class{constructor(a,b,c,d){this.C=new olympe.dc.ua.Relation(olympe.dc.za(a),c||olympe.dc.Ca.DESTINATION);this.F=new olympe.dc.ua.Relation(olympe.dc.za(b),d||olympe.dc.Ca.DESTINATION)}Yb(){return Tc(this.C)}na(){return O(olympe.dc.Y.Gl)}getTransform(a,b,c){const d=olympe.dc.La(),e={},f=this.C.T(),g=this.C.Sa(),h=this.F.T(),k=this.F.Sa();let l=null,n=null;const p=(r,t,u,v,w,y)=>{if(w){if(w=()=>{const B=olympe.X.pb(u+g+(f+'_'+r)+y,20),D=Hg(t,!0,y,B);l=r;n=()=>{c(!1,y,B,Hg(t,!1,y,B))};
658
- b.register(B,u,v,f,g);c(!0,y,B,D)},w.Wr=r,e[v]=w,null===l||r<l)n&&n(),w()}else if(l===r){n();e[v]=!0;w=Infinity;let B=null;for(let D=Object.keys(e),T=D.length,I=0;I<T;I++){let aa=e[D[I]];aa.Wr<w&&(w=aa.Wr,B=aa)}B&&B()}},q=(r,t,u,v,w)=>{v?e[w]||(e[w]=!0,Wg(b,u,w,f,g),Wg(b,u,w,h,k),V(d,w,this.C,p.bind(this,r,t,u,w),u+'_val'),V(d,w,this.F,q.bind(this,r+1,t,u),u+'_follow')):(d.C(w,this.F,u+'_follow'),d.C(w,this.C,u+'_val'),delete e[w])};return(r,t,u,v)=>q(0,v,u,r,t)}ka(){return'{"c":"'+this.na()+'","a":["'+
659
- this.C.toString()+'","'+this.F.toString()+'"]}'}toString(){return'FirstRelated('+this.C.toString()+', '+this.F.toString()+')'}};N('olympe.dc.transformers.FirstRelated',olympe.dc.Y.Gl);olympe.dc.Y.Gl.ma=[olympe.dc.Yc];olympe.dc.Y.Ae=class{Yb(){return null}na(){return O(olympe.dc.Y.Ae)}getTransform(a,b,c){const d={};return function(e,f,g,h){e?void 0===d[f]?(d[f]=1,b.C.C!==g||b.F||(b.C.C=f),c(!0,f,f,Hg(h,!0,f,f))):(d[f]++,Vg(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,Hg(h,!1,f,f)))}}ka(){return'{"c":"'+this.na()+'"}'}toString(){return'Distinct()'}};N('olympe.dc.transformers.Distinct',olympe.dc.Y.Ae);olympe.dc.Y.Ae.ma=[olympe.dc.Yc];olympe.dc.Y.Jd=class{constructor(a,b){this.Kd=a;this.C=void 0===b?!0:!!b}Yb(){return null}na(){return O(olympe.dc.Y.Jd)}F(){return[this.Kd.P()]}getTransform(a,b,c){const d=new olympe.dc.qc.Wq(this.C?this.Kd.G.bind(this.Kd):(e,f)=>this.Kd.G(f,e));return(e,f,g)=>{var h=e?this.Kd.K(a,f):void 0;h=d.C(e,f,g,h);c(e,f,g,h)}}ka(a){return'{"c":"'+this.na()+'","a":['+this.Kd.ka(a)+','+JSON.stringify(this.C)+']}'}toString(){return'Sort('+this.Kd.toString()+','+JSON.stringify(this.C)+')'}};
660
- N('olympe.dc.transformers.Sort',olympe.dc.Y.Jd);olympe.dc.Y.Jd.ma=[olympe.dc.Yc,olympe.dc.rq];olympe.dc.Y.tc=class{constructor(a){this.C=a}Yb(){return null}na(){return O(olympe.dc.Y.tc)}F(){return this.C.F()}getTransform(a,b,c){function d(f,g,h,k){k=k.valueOf();!1===k&&Vg(b,g);k!==!!e[g]&&(e[g]=k,c(k,f,g,Hg(h,k,f,g)))}const e={};return(f,g,h,k)=>{const l='@'+h;f?(f=this.C.C(a,g),olympe.D.ob(f)&&(f=f.Qa),olympe.D.$f(f)?(b.F||void 0!==olympe.D.Xa(f)||Vg(b,h),e[l]=f,olympe.D.wc([f],n=>{d(g,h,k,n)},'filterResultHandler')):d(g,h,k,f)):(void 0!==e[l]&&(e[l].destroy(),delete e[l]),d(g,h,k,!1),delete e[h])}}ka(a){return'{"c":"'+
661
- this.na()+'","a":['+this.C.ka(a)+']}'}toString(){return'Filter('+this.C.toString()+')'}};N('olympe.dc.transformers.Filter',olympe.dc.Y.tc);olympe.dc.Y.tc.ma=[olympe.dc.Yc,olympe.dc.rq];olympe.dc.Y.ae=class{constructor(a,b){this.start=a;this.C=b}Yb(){return null}na(){return O(olympe.dc.Y.ae)}getTransform(a,b,c){const d=new olympe.dc.qc.am;let e,f,g,h=!1;const k=()=>{if(void 0!==f&&void 0!==g&&void 0!==e){var n=f+g;b.F||(b.C.C=e[0>n-1?0:Math.min(e.length,n)-1]);Sg(d,e,f,n,c)}};olympe.D.me([this.start,this.C],(n,p)=>{f=n.valueOf();g=p.valueOf();k()});ah(b,k);const l=Yg(b);Xg(b,l);return(n,p,q,r)=>{h||(r.Sc().Rg(t=>{e=t;bh(b,l)}),Fg(b,()=>r.Ag(),l),h=!0);d.C(n,p,q,null);Gg(b,q,l)}}ka(a){return'{"c":"'+
662
- this.na()+'","a":['+Qf(a,this.start)+','+Qf(a,this.C)+']}'}toString(){return`Limit(${olympe.D.Xa(this.start)},${olympe.D.Xa(this.C)})`}};N('olympe.dc.transformers.Limit',olympe.dc.Y.ae);olympe.dc.Y.ae.ma=[olympe.dc.Yc];function nh(a,b,c,d,e,f){function g(p,q){if(l)for(var r=l.length-1;0<=r;r--)f=l[r].getTransform(b,e,n.F(f));f=n.F(f);e.register(h,null);r=d.C(p,q,c,null);f(p,q,h,Hg(r,p,q,h))}const h=olympe.X.bc(),k=olympe.dc.La(),l=a.Y,n=olympe.D.Na();olympe.D.wc([a.C],p=>{oh(k,p,g,h);void 0===k.model(p)&&Eg(e)})}function oh(a,b,c,d){const e=b&&b.valueOf();e&&(Ec(a,e,c,d),olympe.D.Na().P(()=>Fc(a,e,d)))}
663
- olympe.dc.Y.Cf=class{constructor(a,b){this.Y=this.C=null;a instanceof olympe.dc.Da?(this.C=a.Od(),this.Y=a.Ul()):(this.C=a,b&&(this.Y=b))}Yb(){return null}na(){return O(olympe.dc.Y.Cf)||''}Jg(){return this.Y}Od(){return this.C}getTransform(a,b,c){const d=new olympe.dc.qc.am,e=new olympe.dc.qc.Hj;let f=[],g=[],h=!1,k=!1;const l=Yg(b),n=Yg(b);ah(b,()=>{const p=f.concat(g);0<p.length?b.F||(b.C.C=p[p.length-1]):bh(b);Sg(d,p,0,p.length,c)});Xg(b,n);nh(this,a,this.C,e,b,(p,q,r,t)=>{const u=olympe.D.Na();
664
- u.$()||u.G()||(k||(t.Sc().Rg(v=>{g=v;bh(b,n)}),Fg(b,()=>t.Ag(),n),k=!0),d.C(p,q,r),Gg(b,r,n))});Xg(b,l);return(p,q,r,t)=>{h||(t.Sc().Rg(u=>{f=u;bh(b,l)}),Fg(b,()=>t.Ag(),l),h=!0);d.C(p,q,r,l);Gg(b,r,l)}}ka(a){const b=this.Y?'['+this.Y.map(c=>c.ka(a)).join(',')+']':'null';return'{"c":"'+this.na()+'","a":['+Qf(a,this.C)+','+b+']}'}toString(){const a=olympe.D.ob(this.C)?'N:'+this.C.Qa.Z():this.C.valueOf(),b=this.Y?','+this.Y.map(c=>c.toString()).join(','):'';return'Union('+a+b+')'}};
665
- N('olympe.dc.transformers.Union',olympe.dc.Y.Cf);olympe.dc.Y.Cf.ma=[olympe.dc.Yc];olympe.dc.Sg={};function ph(a,b){let c=Lc.get(b)||null,d=null;for(;!c&&b&&b!==d;){d=b;b=a.db.Jf(b);if(null===b)break;c=Lc.get(b)||null}return c||null}olympe.dc.Sg.SyncManager=class{constructor(a,b,c){this.N=a;this.db=b;this.C=c}};olympe.dc.Sg.R={Ea:'dc.syncs.Logger',Aa:'dc.syncs.SyncManager'};olympe.U.config(function(a){C(a,olympe.dc.Sg.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('dc'));A(a,olympe.dc.Sg.R.Aa,olympe.dc.Sg.SyncManager,olympe.dc.Sg.R.Ea,olympe.dc.R.wi,olympe.U.R.jg)});olympe.dc.X={};olympe.dc.X.vD=function(a){a=olympe.dc.za(a);const b=olympe.D.Ic(olympe.D.$a,'getInstanceName'),c=olympe.dc.La(),d=Jd(c,a,olympe.dc.CloudObject.nameProp,b.update.bind(b));olympe.D.Na().P(c.F.bind(c,a,olympe.dc.CloudObject.nameProp,d));return b.zb()};olympe.dc.X.yD=function(a){return olympe.D.Ha([a],b=>olympe.D.yy(olympe.dc.La().qj(b)),olympe.D.ra)};olympe.dc.X.zD=function(a){return(a=olympe.D.Xa(a))?olympe.dc.La().qj(a):!1};olympe.dc.X.Oi=class a{constructor(b=olympe.dc.Ia.Lc){this.G=b}C(b){const c=new olympe.dc.db.xc;this.F(b,c);return c}P(b,c,d){const e=new olympe.dc.db.xc(b),f=new olympe.dc.query.Ei(b,this.G,c,e);this.F(d,e,(g,h)=>{h=h||[];const k=f.C.get(g)||new Set;for(const l of h)k.add(l);f.C.set(g,k)});return f}K(b,c){const d=new olympe.dc.db.xc(b),e=new olympe.dc.query.qt(b,d);this.F(c,d,(f,g,h)=>{h=h||[];const k=new vf(f);k.add=g||[];k.remove=h;e.C.set(f,k)});return e}F(b,c,d){const e=olympe.dc.Zb.Id;for(const f of b)switch(b=
666
- f.i?f.i:-1,f.o){case 1:const g=a.C(f.p||{});g.has(e)||g.set(e,this.G);c.F(f.t,g,b);break;case 2:c.rc(f.t,a.C(f.p),!0,b);break;case 3:c.Fc(f.t,f.f,b);break;case 4:c.Va(f.m,f.l,f.r,b);break;case 5:c.ic(f.m,f.l,f.r,b);break;case 6:d&&d(f.i,f.a,f.d);break;default:throw Error('Undefined patch operation: '+f.o);}}static C(b){const c=new Map;for(const [d,e]of Object.entries(b)){b=d;if(b===olympe.dc.Zb.Id||b===olympe.dc.Zb.VERSION){c.set(b,e);continue}else if('v'===d){c.set(olympe.dc.Zb.VERSION,e);continue}let f=
667
- typeof e;b.startsWith('fd')&&(b=olympe.dc.Yg.lc+b.substr(2));'object'===f&&(f=e&&e.c?String(e.c):'untyped');switch(f){case '1':case '2':case '3':throw Error('Complex format for primitive types not supported.');case 'string':c.set(b,String(e));break;case 'boolean':c.set(b,!!e);break;case 'number':c.set(b,Number(e));break;case '4':c.set(b,new Date(Date.UTC(e.y,e.M-1,e.d,e.h,e.m,e.s,e.S)));break;case '5':c.set(b,new Date(Date.UTC(e.y,e.M-1,e.d)));break;case '6':c.set(b,new Date(Date.UTC(e.y||1970,e.M&&
668
- e.M-1||0,e.d||1,e.h,e.m,e.s,e.S)));break;case '7':c.set(b,new olympe.D.Color(e.r,e.g,e.b,e.a));break;case '8':c.set(b,new olympe.dc.Ec(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}};olympe.dc.X.Tb={};olympe.dc.X.Tb.Sm=a=>'string'===typeof a||'number'===typeof a||'boolean'===typeof a||a instanceof String?olympe.D.Bb(a):a instanceof olympe.D.$a?a:null;olympe.dc.X.Tb.Pm=a=>'boolean'===typeof a||a instanceof Boolean?olympe.D.Ac(a):a instanceof olympe.D.ra?a:null;olympe.dc.X.Tb.Rm=a=>'number'===typeof a||a instanceof Number?olympe.D.Ba(a):'string'===typeof a||a instanceof String?olympe.D.Ba(Number.parseFloat(a.valueOf())):a instanceof olympe.D.ga?a:null;
669
- olympe.dc.X.Tb.Qm=function(a){return'number'===typeof a||a instanceof Number?wb(a.valueOf()):'string'===typeof a||a instanceof String?new olympe.D.jb(new Date(a.valueOf().valueOf())):a instanceof Date?new olympe.D.jb(a):a instanceof olympe.D.jb?a:null};olympe.dc.X.Tb.zr=function(a){return a instanceof olympe.D.Color?a:'string'===typeof a||a instanceof String?Ab(a.valueOf()):null};olympe.dc.X.Tb.Ar=a=>a instanceof olympe.dc.CloudObject?a:a instanceof olympe.dc.Ec?Ic(a):null;
670
- olympe.dc.X.Tb.lh=a=>a instanceof olympe.dc.Ec?Ic(a):a;olympe.dc.X.Tb.eD=a=>{switch(typeof a){case 'boolean':return olympe.D.Ac(a);case 'number':return olympe.D.Ba(a);case 'string':return olympe.D.Bb(a);case 'object':if(a instanceof Date)return olympe.D.ly(a)}return a};
671
- olympe.dc.X.Tb.sD=a=>{switch(a){case olympe.D.ra:return olympe.dc.X.Tb.Pm;case olympe.D.$a:return olympe.dc.X.Tb.Sm;case olympe.D.ga:return olympe.dc.X.Tb.Rm;case olympe.D.jb:return olympe.dc.X.Tb.Qm;case olympe.D.Color:return olympe.dc.X.Tb.zr;case olympe.dc.CloudObject:return olympe.dc.X.Tb.Ar;default:return olympe.dc.X.Tb.lh}};olympe.dc.R={Aa:'dc.Manager',ot:'dc.Graph',wi:'dc.DBView',Ea:'dc.Logger',ov:'dc.TransactionLogger',Ai:'dc.FileServiceManager',qe:'dc.Router'};olympe.dc.Config={kg:'dc.debug',fh:'dc.subscribeAll',xo:'dc.defaultSource',No:'dc.fileCache',Go:'dc.errorOnAbstractInstantiation'};
672
- olympe.U.config(function(a){E(a,olympe.dc.Config.kg,!1);E(a,olympe.dc.Config.fh,!1);E(a,olympe.dc.Config.xo,olympe.dc.Ia.Lc);E(a,olympe.dc.Config.No,!0);E(a,olympe.dc.Config.Go,!0);C(a,olympe.dc.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('dc'));ua(a,olympe.dc.R.ov,olympe.dc.transaction.R.Ea);ua(a,olympe.dc.R.wi,olympe.dc.db.R.ib);A(a,olympe.dc.R.Ai,olympe.dc.kt,olympe.dc.R.Ea,olympe.net.R.Aa,olympe.dc.R.qe,olympe.X.R.Ah,new olympe.U.fa(olympe.dc.Config.No));va(a,olympe.dc.R.qe);A(a,olympe.dc.R.Aa,olympe.dc.oa,
673
- olympe.dc.R.Ea,olympe.dc.db.R.Aa,olympe.dc.query.R.Aa,olympe.dc.transaction.R.Aa,olympe.dc.Sg.R.Aa,olympe.dc.R.Ai)},'olympe.dc');olympe.U.run([olympe.dc.db.R.Aa,olympe.dc.query.R.Aa,olympe.dc.transaction.R.Aa,olympe.dc.Sg.R.Aa,olympe.dc.R.Aa,olympe.dc.R.Ai],(a,b,c,d,e,f)=>{olympe.dc.yd=()=>a;olympe.dc.Tf=()=>b;olympe.dc.ii=()=>c;olympe.dc.Vr=()=>d;olympe.dc.Sc=()=>e;olympe.dc.Ow=()=>f},'DC singleton getter initialization');function qh(a){const b=olympe.dc.La(),c=new Map;b.Pk(a).forEach(d=>{b.tb(d,olympe.dc.CloudObject.propertyRel).forEach(e=>{const f=b.name(e);c.has(f)||c.set(f,e)})});return c}olympe.dc.CloudObject=class{constructor(a,b){this.tag=b;this.db=olympe.dc.La();this.model=null}static get(a){{var b=olympe.dc.Vr();a=olympe.dc.za(a);const c=ph(b,b.db.model(a));null===c?(b.N.error(`Instantiation of a CloudObject (tag = '${a}') that does not exist (or incompletely exists) in the local database.\n
656
+ olympe.dc.Y.Fe=class{constructor(a,b){this.direction=b||olympe.dc.Ca.DESTINATION;this.Pa=a.map(c=>new olympe.dc.ua.Relation(c,this.direction))}Zb(){return olympe.dc.CloudObject}na(){return O(olympe.dc.Y.Fe)}Sa(){return this.direction}getTransform(a,b,c){const d=olympe.dc.La(),e=(f,g,h,k)=>V(d,f,k,(l,n)=>{var p=k.Sa();var q=k.T();p=olympe.X.pb(g+p+q+n,20);q=Hg(h,l,n,p);l&&b.register(p,g,f,k.T(),k.Sa());c(l,n,p,q)},g);return(f,g,h,k)=>{f?this.Pa.forEach(l=>{Wg(b,h,g,l.T(),l.Sa());e(g,h,k,l)}):this.Pa.forEach(l=>
657
+ {d.C(g,l,h)})}}ka(){return'{"c":"'+this.na()+'","a":['+JSON.stringify(mh(this))+',"'+this.direction+'"]}'}toString(){return'MultiRelated('+this.Sa()+'['+mh(this).join(',')+'])'}};N('olympe.dc.transformers.MultiRelated',olympe.dc.Y.Fe);olympe.dc.Y.Fe.ma=[olympe.dc.Yc];olympe.dc.Y.Hl=class{constructor(a,b,c,d){this.C=new olympe.dc.ua.Relation(olympe.dc.za(a),c||olympe.dc.Ca.DESTINATION);this.F=new olympe.dc.ua.Relation(olympe.dc.za(b),d||olympe.dc.Ca.DESTINATION)}Zb(){return Tc(this.C)}na(){return O(olympe.dc.Y.Hl)}getTransform(a,b,c){const d=olympe.dc.La(),e={},f=this.C.T(),g=this.C.Sa(),h=this.F.T(),k=this.F.Sa();let l=null,n=null;const p=(r,t,u,v,w,y)=>{if(w){if(w=()=>{const B=olympe.X.pb(u+g+(f+'_'+r)+y,20),D=Hg(t,!0,y,B);l=r;n=()=>{c(!1,y,B,Hg(t,!1,y,B))};
658
+ b.register(B,u,v,f,g);c(!0,y,B,D)},w.Xr=r,e[v]=w,null===l||r<l)n&&n(),w()}else if(l===r){n();e[v]=!0;w=Infinity;let B=null;for(let D=Object.keys(e),T=D.length,I=0;I<T;I++){let aa=e[D[I]];aa.Xr<w&&(w=aa.Xr,B=aa)}B&&B()}},q=(r,t,u,v,w)=>{v?e[w]||(e[w]=!0,Wg(b,u,w,f,g),Wg(b,u,w,h,k),V(d,w,this.C,p.bind(this,r,t,u,w),u+'_val'),V(d,w,this.F,q.bind(this,r+1,t,u),u+'_follow')):(d.C(w,this.F,u+'_follow'),d.C(w,this.C,u+'_val'),delete e[w])};return(r,t,u,v)=>q(0,v,u,r,t)}ka(){return'{"c":"'+this.na()+'","a":["'+
659
+ this.C.toString()+'","'+this.F.toString()+'"]}'}toString(){return'FirstRelated('+this.C.toString()+', '+this.F.toString()+')'}};N('olympe.dc.transformers.FirstRelated',olympe.dc.Y.Hl);olympe.dc.Y.Hl.ma=[olympe.dc.Yc];olympe.dc.Y.Ae=class{Zb(){return null}na(){return O(olympe.dc.Y.Ae)}getTransform(a,b,c){const d={};return function(e,f,g,h){e?void 0===d[f]?(d[f]=1,b.C.C!==g||b.F||(b.C.C=f),c(!0,f,f,Hg(h,!0,f,f))):(d[f]++,Vg(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,Hg(h,!1,f,f)))}}ka(){return'{"c":"'+this.na()+'"}'}toString(){return'Distinct()'}};N('olympe.dc.transformers.Distinct',olympe.dc.Y.Ae);olympe.dc.Y.Ae.ma=[olympe.dc.Yc];olympe.dc.Y.Id=class{constructor(a,b){this.Jd=a;this.C=void 0===b?!0:!!b}Zb(){return null}na(){return O(olympe.dc.Y.Id)}F(){return[this.Jd.P()]}getTransform(a,b,c){const d=new olympe.dc.pc.Xq(this.C?this.Jd.G.bind(this.Jd):(e,f)=>this.Jd.G(f,e));return(e,f,g)=>{var h=e?this.Jd.K(a,f):void 0;h=d.C(e,f,g,h);c(e,f,g,h)}}ka(a){return'{"c":"'+this.na()+'","a":['+this.Jd.ka(a)+','+JSON.stringify(this.C)+']}'}toString(){return'Sort('+this.Jd.toString()+','+JSON.stringify(this.C)+')'}};
660
+ N('olympe.dc.transformers.Sort',olympe.dc.Y.Id);olympe.dc.Y.Id.ma=[olympe.dc.Yc,olympe.dc.sq];olympe.dc.Y.rc=class{constructor(a){this.C=a}Zb(){return null}na(){return O(olympe.dc.Y.rc)}F(){return this.C.F()}getTransform(a,b,c){function d(f,g,h,k){k=k.valueOf();!1===k&&Vg(b,g);k!==!!e[g]&&(e[g]=k,c(k,f,g,Hg(h,k,f,g)))}const e={};return(f,g,h,k)=>{const l='@'+h;f?(f=this.C.C(a,g),olympe.D.ob(f)&&(f=f.Qa),olympe.D.Yf(f)?(b.F||void 0!==olympe.D.Xa(f)||Vg(b,h),e[l]=f,olympe.D.wc([f],n=>{d(g,h,k,n)},'filterResultHandler')):d(g,h,k,f)):(void 0!==e[l]&&(e[l].destroy(),delete e[l]),d(g,h,k,!1),delete e[h])}}ka(a){return'{"c":"'+
661
+ this.na()+'","a":['+this.C.ka(a)+']}'}toString(){return'Filter('+this.C.toString()+')'}};N('olympe.dc.transformers.Filter',olympe.dc.Y.rc);olympe.dc.Y.rc.ma=[olympe.dc.Yc,olympe.dc.sq];olympe.dc.Y.$d=class{constructor(a,b){this.start=a;this.C=b}Zb(){return null}na(){return O(olympe.dc.Y.$d)}getTransform(a,b,c){const d=new olympe.dc.pc.bm;let e,f,g,h=!1;const k=()=>{if(void 0!==f&&void 0!==g&&void 0!==e){var n=f+g;b.F||(b.C.C=e[0>n-1?0:Math.min(e.length,n)-1]);Sg(d,e,f,n,c)}};olympe.D.me([this.start,this.C],(n,p)=>{f=n.valueOf();g=p.valueOf();k()});ah(b,k);const l=Yg(b);Xg(b,l);return(n,p,q,r)=>{h||(r.Sc().Qg(t=>{e=t;bh(b,l)}),Fg(b,()=>r.xg(),l),h=!0);d.C(n,p,q,null);Gg(b,q,l)}}ka(a){return'{"c":"'+
662
+ this.na()+'","a":['+Qf(a,this.start)+','+Qf(a,this.C)+']}'}toString(){return`Limit(${olympe.D.Xa(this.start)},${olympe.D.Xa(this.C)})`}};N('olympe.dc.transformers.Limit',olympe.dc.Y.$d);olympe.dc.Y.$d.ma=[olympe.dc.Yc];function nh(a,b,c,d,e,f){function g(p,q){if(l)for(var r=l.length-1;0<=r;r--)f=l[r].getTransform(b,e,n.F(f));f=n.F(f);e.register(h,null);r=d.C(p,q,c,null);f(p,q,h,Hg(r,p,q,h))}const h=olympe.X.bc(),k=olympe.dc.La(),l=a.Y,n=olympe.D.Na();olympe.D.wc([a.C],p=>{oh(k,p,g,h);void 0===k.model(p)&&Eg(e)})}function oh(a,b,c,d){const e=b&&b.valueOf();e&&(Ec(a,e,c,d),olympe.D.Na().P(()=>Fc(a,e,d)))}
663
+ olympe.dc.Y.Af=class{constructor(a,b){this.Y=this.C=null;a instanceof olympe.dc.Da?(this.C=a.Nd(),this.Y=a.Vl()):(this.C=a,b&&(this.Y=b))}Zb(){return null}na(){return O(olympe.dc.Y.Af)||''}Gg(){return this.Y}Nd(){return this.C}getTransform(a,b,c){const d=new olympe.dc.pc.bm,e=new olympe.dc.pc.Ij;let f=[],g=[],h=!1,k=!1;const l=Yg(b),n=Yg(b);ah(b,()=>{const p=f.concat(g);0<p.length?b.F||(b.C.C=p[p.length-1]):bh(b);Sg(d,p,0,p.length,c)});Xg(b,n);nh(this,a,this.C,e,b,(p,q,r,t)=>{const u=olympe.D.Na();
664
+ u.$()||u.C()||(k||(t.Sc().Qg(v=>{g=v;bh(b,n)}),Fg(b,()=>t.xg(),n),k=!0),d.C(p,q,r),Gg(b,r,n))});Xg(b,l);return(p,q,r,t)=>{h||(t.Sc().Qg(u=>{f=u;bh(b,l)}),Fg(b,()=>t.xg(),l),h=!0);d.C(p,q,r,l);Gg(b,r,l)}}ka(a){const b=this.Y?'['+this.Y.map(c=>c.ka(a)).join(',')+']':'null';return'{"c":"'+this.na()+'","a":['+Qf(a,this.C)+','+b+']}'}toString(){const a=olympe.D.ob(this.C)?'N:'+this.C.Qa.Z():this.C.valueOf(),b=this.Y?','+this.Y.map(c=>c.toString()).join(','):'';return'Union('+a+b+')'}};
665
+ N('olympe.dc.transformers.Union',olympe.dc.Y.Af);olympe.dc.Y.Af.ma=[olympe.dc.Yc];olympe.dc.Rg={};function ph(a,b){let c=Lc.get(b)||null,d=null;for(;!c&&b&&b!==d;){d=b;b=a.db.Hf(b);if(null===b)break;c=Lc.get(b)||null}return c||null}olympe.dc.Rg.SyncManager=class{constructor(a,b,c){this.N=a;this.db=b;this.C=c}};olympe.dc.Rg.R={Ea:'dc.syncs.Logger',Aa:'dc.syncs.SyncManager'};olympe.U.config(function(a){C(a,olympe.dc.Rg.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('dc'));A(a,olympe.dc.Rg.R.Aa,olympe.dc.Rg.SyncManager,olympe.dc.Rg.R.Ea,olympe.dc.R.vi,olympe.U.R.gg)});olympe.dc.X={};olympe.dc.X.xD=function(a){a=olympe.dc.za(a);const b=olympe.D.Ic(olympe.D.$a,'getInstanceName'),c=olympe.dc.La(),d=Jd(c,a,olympe.dc.CloudObject.nameProp,b.update.bind(b));olympe.D.Na().P(c.F.bind(c,a,olympe.dc.CloudObject.nameProp,d));return b.zb()};olympe.dc.X.AD=function(a){return olympe.D.Ha([a],b=>olympe.D.Ay(olympe.dc.La().rj(b)),olympe.D.ra)};olympe.dc.X.BD=function(a){return(a=olympe.D.Xa(a))?olympe.dc.La().rj(a):!1};olympe.dc.X.Oi=class a{constructor(b=olympe.dc.Ia.Lc){this.G=b}C(b){const c=new olympe.dc.db.xc;this.F(b,c);return c}P(b,c,d){const e=new olympe.dc.db.xc(b),f=new olympe.dc.query.Di(b,this.G,c,e);this.F(d,e,(g,h)=>{h=h||[];const k=f.C.get(g)||new Set;for(const l of h)k.add(l);f.C.set(g,k)});return f}K(b,c){const d=new olympe.dc.db.xc(b),e=new olympe.dc.query.rt(b,d);this.F(c,d,(f,g,h)=>{h=h||[];const k=new vf(f);k.add=g||[];k.remove=h;e.C.set(f,k)});return e}F(b,c,d){const e=olympe.dc.$b.Hd;for(const f of b)switch(b=
666
+ f.i?f.i:-1,f.o){case 1:const g=a.C(f.p||{});g.has(e)||g.set(e,this.G);c.F(f.t,g,b);break;case 2:c.qc(f.t,a.C(f.p),!0,b);break;case 3:c.Fc(f.t,f.f,b);break;case 4:c.Va(f.m,f.l,f.r,b);break;case 5:c.hc(f.m,f.l,f.r,b);break;case 6:d&&d(f.i,f.a,f.d);break;default:throw Error('Undefined patch operation: '+f.o);}}static C(b){const c=new Map;for(const [d,e]of Object.entries(b)){b=d;if(b===olympe.dc.$b.Hd||b===olympe.dc.$b.VERSION){c.set(b,e);continue}else if('v'===d){c.set(olympe.dc.$b.VERSION,e);continue}let f=
667
+ typeof e;b.startsWith('fd')&&(b=olympe.dc.Xg.kc+b.substr(2));'object'===f&&(f=e&&e.c?String(e.c):'untyped');switch(f){case '1':case '2':case '3':throw Error('Complex format for primitive types not supported.');case 'string':c.set(b,String(e));break;case 'boolean':c.set(b,!!e);break;case 'number':c.set(b,Number(e));break;case '4':c.set(b,new Date(Date.UTC(e.y,e.M-1,e.d,e.h,e.m,e.s,e.S)));break;case '5':c.set(b,new Date(Date.UTC(e.y,e.M-1,e.d)));break;case '6':c.set(b,new Date(Date.UTC(e.y||1970,e.M&&
668
+ e.M-1||0,e.d||1,e.h,e.m,e.s,e.S)));break;case '7':c.set(b,new olympe.D.Color(e.r,e.g,e.b,e.a));break;case '8':c.set(b,new olympe.dc.Ec(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}};olympe.dc.X.Tb={};olympe.dc.X.Tb.Tm=a=>'string'===typeof a||'number'===typeof a||'boolean'===typeof a||a instanceof String?olympe.D.Bb(a):a instanceof olympe.D.$a?a:null;olympe.dc.X.Tb.Qm=a=>'boolean'===typeof a||a instanceof Boolean?olympe.D.Ac(a):a instanceof olympe.D.ra?a:null;olympe.dc.X.Tb.Sm=a=>'number'===typeof a||a instanceof Number?olympe.D.Ba(a):'string'===typeof a||a instanceof String?olympe.D.Ba(Number.parseFloat(a.valueOf())):a instanceof olympe.D.ga?a:null;
669
+ olympe.dc.X.Tb.Rm=function(a){return'number'===typeof a||a instanceof Number?wb(a.valueOf()):'string'===typeof a||a instanceof String?new olympe.D.jb(new Date(a.valueOf().valueOf())):a instanceof Date?new olympe.D.jb(a):a instanceof olympe.D.jb?a:null};olympe.dc.X.Tb.Ar=function(a){return a instanceof olympe.D.Color?a:'string'===typeof a||a instanceof String?Ab(a.valueOf()):null};olympe.dc.X.Tb.Br=a=>a instanceof olympe.dc.CloudObject?a:a instanceof olympe.dc.Ec?Ic(a):null;
670
+ olympe.dc.X.Tb.kh=a=>a instanceof olympe.dc.Ec?Ic(a):a;olympe.dc.X.Tb.gD=a=>{switch(typeof a){case 'boolean':return olympe.D.Ac(a);case 'number':return olympe.D.Ba(a);case 'string':return olympe.D.Bb(a);case 'object':if(a instanceof Date)return olympe.D.ny(a)}return a};
671
+ olympe.dc.X.Tb.uD=a=>{switch(a){case olympe.D.ra:return olympe.dc.X.Tb.Qm;case olympe.D.$a:return olympe.dc.X.Tb.Tm;case olympe.D.ga:return olympe.dc.X.Tb.Sm;case olympe.D.jb:return olympe.dc.X.Tb.Rm;case olympe.D.Color:return olympe.dc.X.Tb.Ar;case olympe.dc.CloudObject:return olympe.dc.X.Tb.Br;default:return olympe.dc.X.Tb.kh}};olympe.dc.R={Aa:'dc.Manager',pt:'dc.Graph',vi:'dc.DBView',Ea:'dc.Logger',pv:'dc.TransactionLogger',zi:'dc.FileServiceManager',qe:'dc.Router'};olympe.dc.Config={hg:'dc.debug',eh:'dc.subscribeAll',yo:'dc.defaultSource',Oo:'dc.fileCache',Ho:'dc.errorOnAbstractInstantiation'};
672
+ olympe.U.config(function(a){E(a,olympe.dc.Config.hg,!1);E(a,olympe.dc.Config.eh,!1);E(a,olympe.dc.Config.yo,olympe.dc.Ia.Lc);E(a,olympe.dc.Config.Oo,!0);E(a,olympe.dc.Config.Ho,!0);C(a,olympe.dc.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('dc'));ua(a,olympe.dc.R.pv,olympe.dc.transaction.R.Ea);ua(a,olympe.dc.R.vi,olympe.dc.db.R.ib);A(a,olympe.dc.R.zi,olympe.dc.lt,olympe.dc.R.Ea,olympe.net.R.Aa,olympe.dc.R.qe,olympe.X.R.Ah,new olympe.U.fa(olympe.dc.Config.Oo));va(a,olympe.dc.R.qe);A(a,olympe.dc.R.Aa,olympe.dc.oa,
673
+ olympe.dc.R.Ea,olympe.dc.db.R.Aa,olympe.dc.query.R.Aa,olympe.dc.transaction.R.Aa,olympe.dc.Rg.R.Aa,olympe.dc.R.zi)},'olympe.dc');olympe.U.run([olympe.dc.db.R.Aa,olympe.dc.query.R.Aa,olympe.dc.transaction.R.Aa,olympe.dc.Rg.R.Aa,olympe.dc.R.Aa,olympe.dc.R.zi],(a,b,c,d,e,f)=>{olympe.dc.xd=()=>a;olympe.dc.Rf=()=>b;olympe.dc.hi=()=>c;olympe.dc.Wr=()=>d;olympe.dc.Sc=()=>e;olympe.dc.Qw=()=>f},'DC singleton getter initialization');function qh(a){const b=olympe.dc.La(),c=new Map;b.Qk(a).forEach(d=>{b.tb(d,olympe.dc.CloudObject.propertyRel).forEach(e=>{const f=b.name(e);c.has(f)||c.set(f,e)})});return c}olympe.dc.CloudObject=class{constructor(a,b){this.tag=b;this.db=olympe.dc.La();this.model=null}static get(a){{var b=olympe.dc.Wr();a=olympe.dc.za(a);const c=ph(b,b.db.model(a));null===c?(b.N.error(`Instantiation of a CloudObject (tag = '${a}') that does not exist (or incompletely exists) in the local database.\n
674
674
  This could lead to unwanted behaviour and must be fixed.
675
- For more information, activate the database debug mode or call "dbMonitor.debug(${a})" from this console.`),b=new olympe.dc.CloudObject(void 0,a)):b=c.instantiate(a,b.C)}return b}static Fr(a,b,c=olympe.dc.Ia.lc){if('undefined'===typeof olympe.sc)throw Error('Method CloudObject.createWith should only be used at runtime, when sc package exists');const d=olympe.dc.La();let e=null;const f=h=>{null===e&&(e=qh(b||this));return e.has(h)?e.get(h):null},g=new Map;a.forEach((h,k)=>{d.Gb(olympe.dc.za(k))?
676
- g.set(k,h):(k=f(k))&&g.set(k,h)});a=new olympe.sc.Transaction(!1);c=a.create(b||this,g,c);a.kb().catch(h=>olympe.ta.Za('dc').error(`Error occurred for transaction executed by CloudObject.createWith: ${h}`));return this.get(c)}static Lv(){return this.get(this)}static Tk(a){return olympe.dc.hb.Tk(a)}static ed(){return olympe.dc.La().tb(this,olympe.dc.CloudObject.propertyRel).map(a=>new olympe.dc.ua.Property(a))}static gd(){const a=olympe.dc.La();return a.tb(this,olympe.dc.CloudObject.G).map(b=>new olympe.dc.ua.Relation(b)).concat(a.tb(this,
677
- olympe.dc.CloudObject.la).map(b=>new olympe.dc.ua.Relation(b,olympe.dc.Ca.ORIGIN)))}static Rf(a){return olympe.dc.CloudObject.get(a)}static Uw(a){var b=ph(olympe.dc.Vr(),olympe.dc.za(a));b=b&&b.C;return new olympe.dc.Da(olympe.dc.za(a),olympe.dc.CloudObject.instancesRel,b)}T(){return this.tag}name(){return this.db.name(this)}na(){return this.Ab(olympe.dc.CloudObject.nameProp)}Sf(){this.model||(this.model=olympe.dc.CloudObject.get(this.db.model(this)));return this.model}query(){return olympe.dc.hb.from(this)}bg(){return this.db.bg(this)}Dx(){return this.db.version(this)}Mt(){return this.db.source(this)}Mr(){return olympe.D.Ha([this.na()],
678
- a=>olympe.D.Bb(a),olympe.D.$a,'getDisplayName',olympe.D.Bb('('+this.toString()+')'))}Lb(){return this.model?this.model.T():this.db.model(this)}observe(a,b,c=!0){const d='function'===typeof a.Wa?a.C.C:a;return new rxjs.Observable(e=>{const f=this.db.fb(this.tag,b);c||null!==f||e.next(f);const g=Jd(this.db,this.tag,b,h=>{null===h||void 0===h?e.next(null):e.next(h)});d.P(()=>{e.complete();this.db.F(this.tag,b,g)});return()=>this.db.F(this.tag,b,g)})}vn(a){const b='function'===typeof a.Wa?a.C.C:a;return new rxjs.Observable(c=>
679
- {const d=Kd(this.db,this.tag,(e,f)=>{null===f||void 0===f?c.next([new olympe.dc.ua.Property(e),null]):c.next([new olympe.dc.ua.Property(e),f])});b.P(()=>{c.complete();Ld(this.db,this.tag,d)});return()=>Ld(this.db,this.tag,d)})}py(a){return this.observe(olympe.D.Na(),a)}get(a){return this.db.fb(this.tag,a,!0)}fb(a){return this.get(a)}ub(a){return olympe.dc.hb.from(this).ub(a)}bn(a){return olympe.dc.md.from(this).ub(a)}Bw(){return this.pc(olympe.dc.CloudObject.Db,olympe.dc.CloudObject)}en(){return this.tb(olympe.dc.CloudObject.containsRel,
680
- olympe.dc.CloudObject)}Uf(a,b,c){const d=olympe.D.Ic(c,'Sync valueType'),e=Jd(this.db,this.tag,a,olympe.D.Na().F(f=>{b&&null!==f&&void 0!==f&&(f=b(f));null===f||void 0===f?d.clear():d.update(f)}));d.node.onDestroy(()=>this.db.F(this.tag,a,e));return d.node}Ab(a){return L(this.Uf(a,olympe.dc.X.Tb.Sm,olympe.D.$a))}ge(a){return L(this.Uf(a,olympe.dc.X.Tb.Rm,olympe.D.ga))}Ig(a){return L(this.Uf(a,olympe.dc.X.Tb.Pm,olympe.D.ra))}mj(a){return L(this.Uf(a,olympe.dc.X.Tb.Qm,olympe.D.jb))}Tr(){return L(this.Uf(olympe.dm.Color.valueProp,
681
- olympe.dc.X.Tb.zr,olympe.D.Color))}Ur(){return L(this.Uf(olympe.sc.workflow.Transition.processRefProp,olympe.dc.X.Tb.Ar,olympe.dc.CloudObject))}tb(a,b){a=a instanceof olympe.dc.Y.Sb?a:new olympe.dc.Y.Sb(a.T(),a.Sa());return new olympe.dc.Da(this.T(),a,b)}pc(a,b){return this.tb(a,b).Rc()}Jr(a,b){const c=this.db,d=olympe.X.bc(),e=olympe.D.Na(),f=new Map;V(c,this.tag,a,(g,h)=>{if(g)(g=e.run(b,olympe.dc.CloudObject.get(h)))&&f.set(h,g);else{let k;null==(k=f.get(h))||k();f.delete(h)}},d);e.onDestroy(()=>
682
- {c.C(this.tag,a,d)})}bz(){return new olympe.dc.Da(this.T(),[],Rc(this.T()))}transform(...a){return(new olympe.dc.Da(this.T(),[],this.constructor)).transform(...a)}Tc(){return this.Mr()}toString(){if(!this.db.Gb(this.tag))return`unknown object #${this.tag||'NULL_TAG'}`;const a=this.db.model(this.tag);var b=this.db.name(this);b=b?` instanceName: '${b}'`:'';return a?`${this.db.name(a)}#${this.tag}${b}`:`orphan object (no model) #${this.tag}${b}`}toJSON(){if(!this.db.Gb(this.tag))return{CloudObject:'Unknown tag'};
683
- const a=this.db.model(this.tag),b=this.db.name(a),c=this.db.name(this.tag);return{CloudObject:this.tag,Name:c,Model:`${b} (${a})`}}yh(a=!1,b=!0){const c={};this.db.ed(this,b).forEach((d,e)=>{e=a?this.db.name(e):e;c[e]=d instanceof olympe.dc.Ec?Ic(d):d});return c}nb(a){return a instanceof olympe.dc.CloudObject?this.T()===a.T():!1}Td(a){return olympe.D.Ha([a],b=>olympe.D.Ac(this.nb(b)),olympe.D.ra)}cw(a){const b=this.db;let c=!1;if(void 0===a||null===a)a=new olympe.dc.Transaction,c=!0;const d=olympe.dc.Ca.ORIGIN;
684
- for(const [e,f,g]of Nd(b,this))f===d?a.ic(e,g,this):e!==olympe.dc.CloudObject.modelRel.T()&&a.ic(e,this,g);a.delete(this,olympe.dc.Qb.NONE);c&&a.kb()}};olympe.dc.CloudObject.prototype.equals=olympe.dc.CloudObject.prototype.nb;olympe.dc.CloudObject.prototype.toObject=olympe.dc.CloudObject.prototype.yh;olympe.dc.CloudObject.prototype.followSingle=olympe.dc.CloudObject.prototype.bn;olympe.dc.CloudObject.prototype.follow=olympe.dc.CloudObject.prototype.ub;olympe.dc.CloudObject.prototype.getProperty=olympe.dc.CloudObject.prototype.fb;
685
- olympe.dc.CloudObject.prototype.get=olympe.dc.CloudObject.prototype.get;olympe.dc.CloudObject.prototype.observeProperty=olympe.dc.CloudObject.prototype.py;olympe.dc.CloudObject.prototype.observeProperties=olympe.dc.CloudObject.prototype.vn;olympe.dc.CloudObject.prototype.observe=olympe.dc.CloudObject.prototype.observe;olympe.dc.CloudObject.prototype.getModelTag=olympe.dc.CloudObject.prototype.Lb;olympe.dc.CloudObject.prototype.isPersisted=olympe.dc.CloudObject.prototype.bg;
686
- olympe.dc.CloudObject.prototype.query=olympe.dc.CloudObject.prototype.query;olympe.dc.CloudObject.prototype.getModel=olympe.dc.CloudObject.prototype.Sf;olympe.dc.CloudObject.prototype.name=olympe.dc.CloudObject.prototype.name;olympe.dc.CloudObject.prototype.getTag=olympe.dc.CloudObject.prototype.T;olympe.dc.CloudObject.getInstancesOf=olympe.dc.CloudObject.Uw;olympe.dc.CloudObject.getInstance=olympe.dc.CloudObject.Rf;olympe.dc.CloudObject.getRelations=olympe.dc.CloudObject.gd;
687
- olympe.dc.CloudObject.getProperties=olympe.dc.CloudObject.ed;olympe.dc.CloudObject.instancesOf=olympe.dc.CloudObject.Tk;olympe.dc.CloudObject.asInstance=olympe.dc.CloudObject.Lv;olympe.dc.CloudObject.createWith=olympe.dc.CloudObject.Fr;olympe.dc.CloudObject.get=olympe.dc.CloudObject.get;olympe.dc.CloudObject.O=olympe.dc.ya.C('ff021000000000000001',olympe.dc.CloudObject);olympe.dc.CloudObject.sj=olympe.dc.CloudObject.O.xa(olympe.dc.Zb.VERSION);olympe.dc.CloudObject.nameProp=olympe.dc.CloudObject.O.xa('ff023000000000000011');
688
- z('olympe.dc.CloudObject.nameProp',olympe.dc.CloudObject.nameProp);olympe.dc.CloudObject.P=olympe.dc.CloudObject.O.xa('ff023000000000000012');olympe.dc.CloudObject.G=olympe.dc.CloudObject.O.Ga('ff02200000000000000a');olympe.dc.CloudObject.la=olympe.dc.CloudObject.O.Ga('ff02200000000000000b',olympe.dc.Ca.ORIGIN);olympe.dc.CloudObject.ce=olympe.dc.CloudObject.O.Ga('017e9c4ba4c847d71cbf');olympe.dc.CloudObject.wd=olympe.dc.CloudObject.O.Ga('017ea013caf8e89cedb2');olympe.dc.CloudObject.propertyRel=olympe.dc.CloudObject.O.Ga('ff02200000000000000c');
689
- z('olympe.dc.CloudObject.propertyRel',olympe.dc.CloudObject.propertyRel);olympe.dc.CloudObject.typeRel=olympe.dc.CloudObject.O.Ga('ff02200000000000000d',olympe.dc.Ca.ORIGIN);olympe.dc.CloudObject.modelRel=olympe.dc.CloudObject.O.Ga(olympe.dc.mc.Vc);z('olympe.dc.CloudObject.modelRel',olympe.dc.CloudObject.modelRel);olympe.dc.CloudObject.instancesRel=P(olympe.dc.CloudObject.O,olympe.dc.CloudObject.modelRel);z('olympe.dc.CloudObject.instancesRel',olympe.dc.CloudObject.instancesRel);
690
- olympe.dc.CloudObject.extendRel=olympe.dc.CloudObject.O.Ga(olympe.dc.mc.yi);z('olympe.dc.CloudObject.extendRel',olympe.dc.CloudObject.extendRel);olympe.dc.CloudObject.extendedByRel=P(olympe.dc.CloudObject.O,olympe.dc.CloudObject.extendRel);z('olympe.dc.CloudObject.extendedByRel',olympe.dc.CloudObject.extendedByRel);olympe.dc.CloudObject.containsRel=olympe.dc.CloudObject.O.Ga(olympe.dc.mc.ho);z('olympe.dc.CloudObject.containsRel',olympe.dc.CloudObject.containsRel);
691
- olympe.dc.CloudObject.Db=P(olympe.dc.CloudObject.O,olympe.dc.CloudObject.containsRel);olympe.dc.CloudObject.bw=olympe.dc.CloudObject.O.Ga('018282d3ac0a474a0bf4');z('olympe.dc.CloudObject.deleteAlsoRel',olympe.dc.CloudObject.bw);olympe.dc.LB=olympe.dc.CloudObject;olympe.dc.CloudObject.ma=[olympe.dc.De];m=olympe.dc.CloudObject.prototype;m.T.L=new olympe.D.J(()=>String,[]);m.name.L=new olympe.D.J(()=>String,[]);m.na.L=olympe.D.J.F;m.Sf.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
692
- m.Dx.L=new olympe.D.J(()=>Number,[]);m.Mt.L=new olympe.D.J(()=>String,[]);m.Mr.L=olympe.D.J.F;m.Lb.L=new olympe.D.J(()=>String,[]);m.Bw.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.en.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.Uf.L=new olympe.D.J(()=>olympe.D.Node,[]);m.Ab.L=olympe.D.J.F;m.ge.L=olympe.D.J.G;m.Ig.L=olympe.D.J.P;m.mj.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Tr.L=new olympe.D.J(()=>olympe.D.Color,[]);m.Ur.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
693
- m.tb.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.pc.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Jr.L=new olympe.D.J(()=>Function,[]);m.bz.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.transform.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.Tc.L=olympe.D.J.F;m.toString.L=olympe.D.J.C;m.nb.L=olympe.D.J.C;m.Td.L=olympe.D.J.P;m.cw.L=new olympe.D.J(()=>{},[]);olympe.dc.dk=class{constructor(a){this.instance=a}T(){return this.instance.T()}pj(){return rb(this.instance.Ig(olympe.dc.CloudObject.P))}Mw(){return this.instance.pc(olympe.dc.CloudObject.extendRel,olympe.dc.CloudObject)}Pk(){return this.instance.transform(new olympe.dc.Y.Dc(olympe.dc.CloudObject.extendRel.T(),olympe.dc.Ca.DESTINATION,olympe.dc.Y.pk.gt))}jn(){return this.instance.transform(new olympe.dc.Y.Dc(olympe.dc.CloudObject.extendRel.T(),olympe.dc.Ca.DESTINATION,olympe.dc.Y.pk.up))}ed(){return this.jn().transform(olympe.dc.CloudObject.propertyRel,
694
- new olympe.dc.Y.Ae)}gx(){return this.instance.transform(olympe.dc.CloudObject.propertyRel)}gd(){return this.jn().transform(olympe.dc.CloudObject.G,new olympe.dc.Y.Ae)}hx(){return this.instance.transform(olympe.dc.CloudObject.G)}static from(a){return olympe.D.Ha([a],b=>{const c=b.T(),d=olympe.dc.La();if(!d.qj(c))throw Error(`Instance "${d.name(c)}" (tag=${c}) is not a model.`);return new olympe.dc.dk(b)},olympe.dc.dk,'transformToModelInfo')}static pj(){return rb((void 0).Ig(olympe.dc.CloudObject.P))}};
695
- olympe.dc.dk.ma=[olympe.dc.De];m=olympe.dc.dk.prototype;m.Mw.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Pk.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.jn.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.ed.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.gx.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.gd.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.hx.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dc.SA=class{};olympe.dc.da={};olympe.dc.da.yp=class{constructor(a){this.N=a}};olympe.dc.da.yp.Mc={Vi:0,jB:1,kB:3,UA:4};olympe.dc.da.Yj=class{};function Y(a){if(a.V)throw Error('Cannot modify definition after definition is written');}
696
- olympe.dc.da.Wb=class{constructor(a,b){a=this.C=a;if(a.C)throw b=a.C.na(),a=a.C.T(),Error('Cannot work on a new definition without calling done on the previous one or popping it. '+`Make sure done() method has been called on previous definition ${b} (${a})`);if(void 0===this)throw Error('Current def cannot be set to undefined.');a.C=this;this.tag=b;this.F=new Map;this.$=olympe.dc.CloudObject.O.T();this.qa=new Map;this.la=new Map;this.V=this.ba=!1;this.P=null}fl(a){Y(this);this.$=a;return this}Lb(){return this.$}xh(a){Y(this);
697
- this.P=a;return this}Oy(){this.ba=!0;return this}Ny(a){Y(this);const b=new Map;if('string'===typeof a){const c=olympe.dc.CloudObject.nameProp.T();b.set(c,a||'')}else Object.keys(a).forEach(c=>{b.set(c,a[c])});this.F=b;return this}ki(a){Y(this);Object.keys(a).forEach(b=>{this.F.set(b,a[b])});return this}setProperty(a,b){Y(this);this.F.set(a,b);return this}gl(a){Y(this);const b=olympe.dc.CloudObject.nameProp.T();this.F.set(b,a);return this}Jk(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');
698
- if(a===olympe.dc.CloudObject.containsRel.T())throw Error('Container must be defined using dedicated helpers setContainedIn');b&&this.qa.set(a+'.'+b,[a,b]);return this}Mm(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');if(a===olympe.dc.CloudObject.containsRel.T())throw Error('Container must be defined using dedicated helper setContainedIn');b&&this.la.set(a+'.'+b,[a,b]);return this}done(){if(this.V)return this;const a=rh(this.C,this.ba);a.F(this.tag,this.F,
699
- -1);sh(this.C,this);a.Va(olympe.dc.mc.Vc,this.tag,this.$,-1);this.P&&a.Va(olympe.dc.mc.ho,this.P,this.tag,-1);this.G(-1);this.qa.forEach(b=>{a.Va(b[0],this.tag,b[1],-1)});this.la.forEach(b=>{a.Va(b[0],b[1],this.tag,-1)});this.V=!0;this.C.C=void 0;return this}G(){}T(){return this.tag}na(){return this.F.get('ff023000000000000011')}};olympe.dc.da.Wb.prototype.getName=olympe.dc.da.Wb.prototype.na;olympe.dc.da.Wb.prototype.getTag=olympe.dc.da.Wb.prototype.T;olympe.dc.da.Wb.prototype.done=olympe.dc.da.Wb.prototype.done;
700
- olympe.dc.da.Wb.prototype.addRelationFrom=olympe.dc.da.Wb.prototype.Mm;olympe.dc.da.Wb.prototype.addRelationTo=olympe.dc.da.Wb.prototype.Jk;olympe.dc.da.Wb.prototype.setName=olympe.dc.da.Wb.prototype.gl;olympe.dc.da.Wb.prototype.setProperty=olympe.dc.da.Wb.prototype.setProperty;olympe.dc.da.Wb.prototype.setProperties=olympe.dc.da.Wb.prototype.ki;olympe.dc.da.Wb.prototype.setNameOrProperties=olympe.dc.da.Wb.prototype.Ny;olympe.dc.da.Wb.prototype.setOptional=olympe.dc.da.Wb.prototype.Oy;
701
- olympe.dc.da.Wb.prototype.setContainedIn=olympe.dc.da.Wb.prototype.xh;olympe.dc.da.Wb.prototype.setModelTag=olympe.dc.da.Wb.prototype.fl;olympe.dc.da.bd=class extends olympe.dc.da.Wb{constructor(a,b){super(a,b);this.Fa=this.C.OBJECT;this.Ka=new Map;this.Wa=new Map}ks(a){Y(this);this.Fa=a;return this}extends(a){return this.ks(a)}Zi(){Y(this);this.setProperty(olympe.dc.CloudObject.P.T(),!0);return this}defineProperty(a,b,c,d,e){Y(this);this.Ka.set(a,new olympe.dc.da.bd.Property(a,b,c,d));void 0!==d&&super.setProperty(olympe.dc.Yg.lc+a,d);void 0!==e&&(this.C.push(),this.C.Ng(this.C.nj(a),olympe.sc.Vb.O.T()).setProperty(olympe.sc.Vb.C.T(),
702
- e).xh(this.tag).Jk(olympe.sc.Vb.F.T(),a).done(),this.C.pop());return this}mh(a,b,c,d,e,{bj:f=0,yj:g=0,hl:h=d,aj:k=olympe.dm.Jc.NONE,vj:l=olympe.dm.Relation.K|k}={}){Y(this);b=new olympe.dc.da.bd.Relation(a,this.T(),b,c||'',d,e,g,h,f,l,k);this.Wa.set(a,b);return this}G(a){super.G(a);rh(this.C).Va(olympe.dc.CloudObject.extendRel.T(),this.tag,this.Fa,a);this.Ka.forEach(b=>{const c={[olympe.dc.CloudObject.nameProp.T()]:b.name||''},d=olympe.dc.za(olympe.dm.Property),e=olympe.dc.CloudObject.propertyRel.T(),
703
- f=b.tag;this.C.push();this.C.Ng(f,d).ki(c).done();this.C.pop();b=b.type;rh(this.C).Va(e,this.T(),f,a);rh(this.C).Va(olympe.dm.Property.typeRel.T(),f,b,a)});this.Wa.forEach(b=>{this.C.mh(b.C,b.G,b.F,b.name,b.Ir,b.Gr,{yj:b.yj,hl:b.hl,bj:b.bj,vj:b.vj,aj:b.aj},a)})}};olympe.dc.da.bd.prototype.defineRelation=olympe.dc.da.bd.prototype.mh;olympe.dc.da.bd.prototype.defineProperty=olympe.dc.da.bd.prototype.defineProperty;olympe.dc.da.bd.prototype['abstract']=olympe.dc.da.bd.prototype.Zi;
704
- olympe.dc.da.bd.prototype['extends']=olympe.dc.da.bd.prototype.extends;olympe.dc.da.bd.prototype.setParentTag=olympe.dc.da.bd.prototype.ks;olympe.dc.da.bd.Property=class{constructor(a,b,c,d){this.tag=a;this.type=b;this.name=c||'';this.defaultValue=d}};olympe.dc.da.bd.Relation=class{constructor(a,b,c,d,e,f,g,h,k,l,n){this.C=a;this.G=b;this.F=c;this.name=d;this.Ir=e;this.Gr=f;this.yj=g;this.hl=h;this.bj=k;this.vj=l;this.aj=n}};function rh(a,b){return b?a.V:a.F}function sh(a,b){0<a.K.length&&(b.P||a.F.Va(olympe.dc.CloudObject.containsRel.T(),a.K[a.K.length-1].T(),b.T(),-1))}
705
- olympe.dc.da.Ta=class{constructor(a){if(a&&void 0===a.log)throw Error('Argument of OSaveFileBuilder is not a logger - might be a source, adapt implementing classes');this.F=new olympe.dc.transaction.ud(!0);this.V=new olympe.dc.transaction.ud(!0);this.N=a||null;this.qa=!1;this.G=null;this.la=new Map;this.$=null;this.ba=Object.create(null);this.C=void 0;this.K=[];this.P=!0;this.gs=/eval \(eval at process .*<anonymous>:(\d+):(\d+)\)/m;this.DEFAULT=olympe.dc.Yg.lc;this.OBJECT=olympe.dc.CloudObject.O.T();
706
- this.PROPERTY=olympe.dm.Property.O.T();this.RELATION=olympe.dm.Relation.O.T();this.STRING=olympe.dm.String.O.T();this.BOOLEAN=olympe.dm.Boolean.O.T();this.NUMBER=olympe.dm.Number.O.T();this.DATETIME=olympe.dm.DateTime.O.T();this.COLOR=olympe.dm.Color.O.T();this.FILE=olympe.dm.File.O.T();this.ROLE=olympe.dm.cd.O.T();this.USER=olympe.dm.User.O.T();this.ONE_ONE=olympe.dm.Relation.F.su;this.ONE_MANY=olympe.dm.Relation.F.em;this.MANY_ONE=olympe.dm.Relation.F.ku;this.MANY_MANY=olympe.dm.Relation.F.$l;this.NONE=
707
- olympe.dm.Jc.NONE;this.DESTINATION_READ=olympe.dm.Jc.Ss;this.DESTINATION_CREATE=olympe.dm.Jc.Ao;this.DESTINATION_WRITE=olympe.dm.Jc.Ts;this.DESTINATION_DELETE=olympe.dm.Jc.Ps;this.DESTINATION_LINK=olympe.dm.Jc.Rs;this.DESTINATION_FULL=olympe.dm.Jc.Qs;this.ORIGIN_READ=olympe.dm.Jc.xu;this.ORIGIN_CREATE=olympe.dm.Jc.uu;this.ORIGIN_WRITE=olympe.dm.Jc.yu;this.ORIGIN_DELETE=olympe.dm.Jc.vu;this.ORIGIN_LINK=olympe.dm.Jc.fq;this.ORIGIN_FULL=olympe.dm.Jc.wu;this.FULL=olympe.dm.Jc.it;this.DUMP_IGNORE=olympe.dm.Relation.C.Pl;
708
- this.DUMP_REF=olympe.dm.Relation.C.yq;this.DUMP_REVERSE_REF=olympe.dm.Relation.C.Tu;this.DUMP_UNILATERAL=olympe.dm.Relation.C.Ak;this.DUMP_REVERSE_UNILATERAL=olympe.dm.Relation.C.nk;this.DUMP_EVERYTHING=olympe.dm.Relation.C.Ho;this.DUMP_DEFAULT=olympe.dm.Relation.C.lc;this.DUMP_REV_DEFAULT=olympe.dm.Relation.C.Su;this.DELETE_REF=this.DUMP_BOTH_REF=olympe.dm.Relation.C.ql;this.DELETE_REF_AND_DESTINATION=olympe.dm.Relation.C.Pu;this.DELETE_REF_AND_ORIGIN=olympe.dm.Relation.C.Qu;this.DELETE_EVERYTHING=
709
- olympe.dm.Relation.C.Ho;this.OLYMPE_AUTHENTICATED_USERS=olympe.dm.cd.F}push(){this.K.push(this.C);this.C=void 0}pop(){if(this.C)throw Error('Cannot unstack definition: current definition not closed');this.C=this.K.pop()}nw(){const a=new Map,b=olympe.dc.da.fv.C(this.$,this.F,this.V);for(const [c,d]of b.entries())a.set(c,d.yh());return a}px(){return this.$}My(a){this.P=a}log(...a){this.P&&this.N&&this.N.log(...a)}rn(...a){this.P&&this.N&&this.N.debug(...a)}Qx(...a){this.P&&this.N&&this.N.warn(...a)}Xk(...a){this.P&&
710
- this.N&&this.N.error(...a)}Nv(a){if(a&&20===a.length&&!this.qa){if(this.ba[a])throw Error('Tag '+a+' is used to define more than one keyword');return this.ba[a]=a}this.G=null===this.G?olympe.X.Ue():olympe.X.nx(this.G);this.log('Generating new tag to replace '+a+'. New tag is: '+this.G);return this.G}nj(a){const b=this.la.get(a)||1,c=olympe.X.nj(a,b);this.la.set(a,b+1);return c}Ty(a){this.qa=a}ew(){}Ry(a){this.$=a}Ng(a,b){return(new olympe.dc.da.Wb(this,a)).fl(b)}iy(a,b){return(new olympe.dc.da.bd(this,
711
- a)).gl(b)}hy(a,b){return(new olympe.dc.da.bd(this,a)).gl(b).Zi()}jy(a){return new olympe.dc.da.Df(this,a)}al(a,b,c){this.F.Va(a,b,c,-1)}defineProperty(a,b,c,d,e){this.rn('Defining property ',d,' on model ',a);d={[olympe.dc.CloudObject.nameProp.T()]:d||''};void 0!==e&&this.rc(a,{[olympe.dc.Yg.lc+c]:e});this.C?(this.push(),this.Ng(c,olympe.dm.Property.O.T()).ki(d).done(),this.pop()):this.Ng(c,olympe.dm.Property.O.T()).ki(d).xh(a).done();this.al(olympe.dc.CloudObject.propertyRel.T(),a,c);this.al(olympe.dm.Property.typeRel.T(),
712
- c,b)}mh(a,b,c,d,e,f,{bj:g=olympe.dm.Relation.F.em,yj:h=olympe.dm.Relation.C.Pl,hl:k=e,aj:l=olympe.dm.Jc.NONE,vj:n=olympe.dm.Relation.K|l}={},p=-1){if(void 0===e||null===e)throw Error('Cannot define a relation without defining the dump follow rules (must be set to db.DUMP_<something> and cannot be undefined or null)');if(void 0===f||null===f)throw Error('Cannot define a relation without defining the delete follow rules (must be set to db.DELETE_<something> and cannot be undefined or null)');const q=
713
- olympe.dm.Relation;d={[olympe.dc.CloudObject.nameProp.T()]:d||'',[q.Om.T()]:g,[q.wn.T()]:n,[q.Wm.T()]:e,[q.Vm.T()]:f,[q.An.T()]:h,[q.Dn.T()]:k,[q.xr.T()]:l};this.C?(this.push(),this.Ng(a,q.O.T()).ki(d).done(),this.pop()):this.Ng(a,q.O.T()).ki(d).xh(b).done();this.F.Va(q.originModelRel.T(),b,a,p);this.F.Va(q.destinationModelRel.T(),a,c,p)}Ox(a,b){this.F.Va(olympe.dm.cd.C.T(),a,b,-1)}rc(a,b,c=!1){this.rn('Updating instance ',a);delete b[olympe.dc.Zb.Id];delete b[olympe.dc.Zb.VERSION];const d=new Map;
714
- Object.keys(b).forEach(e=>{d.set(e,b[e])});this.F.rc(a,d,c,-1)}zv(a,b,c){(new olympe.dc.da.Wb(this,this.nj(a))).setProperty(olympe.sc.Vb.C.T(),b).setProperty(olympe.sc.Vb.K.T(),c).fl(olympe.sc.Vb.O.T()).Jk(olympe.sc.Vb.F.T(),a).xh(a).done()}assign(a,b,c){this.al(b,a,c)}Mv(a,b,c){this.V.Va(b,a,c,-1)}$v(a){return new olympe.dc.Ec(a)}Vv(a,b,c,d){const e={c:7};e.r=a;e.g=b;e.b=c;e.a=d;return e}Wv({year:a=1970,month:b=1,day:c=1,hour:d=1,minute:e=0,second:f=0,BD:g=0,ND:h=0}={}){const k={c:4};k.y=a;k.M=b;
715
- k.d=c;k.h=d;k.m=e;k.s=f;k.S=g;k.z=h;return k}qw(a){a=new Date(Date.parse(a));const b={c:4};b.y=a.getFullYear();b.M=a.getMonth()+1;b.d=a.getDate();b.h=a.getHours();b.m=a.getMinutes();b.s=a.getSeconds();b.S=a.getMilliseconds();b.z=-a.getTimezoneOffset();return b}Xv(a){a='number'===typeof a?new Date(a):a;const b={c:4};b.h=a.getHours();b.m=a.getMinutes();b.s=a.getSeconds();b.S=a.getMilliseconds();b.z=a.getTimezoneOffset();b.y=a.getFullYear();b.M=a.getMonth()+1;b.d=a.getDate();return b}gj(a,b,c){return olympe.auth.Jb.Ie.gj(a,
716
- c)}Kr(a,b){return olympe.auth.Jb.Ie.gj(a,b)}ic(){throw Error('DeleteRelation method on OSaveFile is deprecated');}Fc(){throw Error('DeleteInstance method on OSaveFile is deprecated');}};olympe.dc.da.Ta.prototype.deleteInstance=olympe.dc.da.Ta.prototype.Fc;olympe.dc.da.Ta.prototype.deleteRelation=olympe.dc.da.Ta.prototype.ic;olympe.dc.da.Ta.prototype.generateAuthenticationData=olympe.dc.da.Ta.prototype.Kr;olympe.dc.da.Ta.prototype.generateAuthData=olympe.dc.da.Ta.prototype.gj;
717
- olympe.dc.da.Ta.prototype.createDateTimeLegacy=olympe.dc.da.Ta.prototype.Xv;olympe.dc.da.Ta.prototype.fromISODate=olympe.dc.da.Ta.prototype.qw;olympe.dc.da.Ta.prototype.createDateTime=olympe.dc.da.Ta.prototype.Wv;olympe.dc.da.Ta.prototype.createColor=olympe.dc.da.Ta.prototype.Vv;olympe.dc.da.Ta.prototype.createReference=olympe.dc.da.Ta.prototype.$v;olympe.dc.da.Ta.prototype.assignOptional=olympe.dc.da.Ta.prototype.Mv;olympe.dc.da.Ta.prototype.assign=olympe.dc.da.Ta.prototype.assign;
718
- olympe.dc.da.Ta.prototype.addDocumentation=olympe.dc.da.Ta.prototype.zv;olympe.dc.da.Ta.prototype.updateInstance=olympe.dc.da.Ta.prototype.rc;olympe.dc.da.Ta.prototype.linkRoleToUser=olympe.dc.da.Ta.prototype.Ox;olympe.dc.da.Ta.prototype.defineRelation=olympe.dc.da.Ta.prototype.mh;olympe.dc.da.Ta.prototype.defineProperty=olympe.dc.da.Ta.prototype.defineProperty;olympe.dc.da.Ta.prototype.newRelation=olympe.dc.da.Ta.prototype.al;olympe.dc.da.Ta.prototype.newUser=olympe.dc.da.Ta.prototype.jy;
719
- olympe.dc.da.Ta.prototype.newAbstractModel=olympe.dc.da.Ta.prototype.hy;olympe.dc.da.Ta.prototype.newModel=olympe.dc.da.Ta.prototype.iy;olympe.dc.da.Ta.prototype.newInstance=olympe.dc.da.Ta.prototype.Ng;olympe.dc.da.Ta.prototype.setRootInstanceTag=olympe.dc.da.Ta.prototype.Ry;olympe.dc.da.Ta.prototype.disableChecks=olympe.dc.da.Ta.prototype.ew;olympe.dc.da.Ta.prototype.setUseNewTags=olympe.dc.da.Ta.prototype.Ty;olympe.dc.da.Ta.prototype.assignTag=olympe.dc.da.Ta.prototype.Nv;
720
- olympe.dc.da.Ta.prototype.logError=olympe.dc.da.Ta.prototype.Xk;olympe.dc.da.Ta.prototype.logWarn=olympe.dc.da.Ta.prototype.Qx;olympe.dc.da.Ta.prototype.logDebug=olympe.dc.da.Ta.prototype.rn;olympe.dc.da.Ta.prototype.log=olympe.dc.da.Ta.prototype.log;olympe.dc.da.Ta.prototype.setLoggingEnabled=olympe.dc.da.Ta.prototype.My;olympe.dc.da.Ta.prototype.getRootInstanceTag=olympe.dc.da.Ta.prototype.px;olympe.dc.da.Ta.prototype.flushContents=olympe.dc.da.Ta.prototype.nw;olympe.dc.da.xg=class extends olympe.dc.da.bd{constructor(a,b,c){super(a,b);this.K=this.description=null;this.setProperty(olympe.dm.BrickMetadata.Wa.T(),olympe.dm.BrickMetadata.xb.Du);null!==c&&this.wr(c)}wr(a){this.xh(a);this.Mm(olympe.dm.Pb.C.T(),a);return this}Ly(a){this.F.set(olympe.dm.ze.Ka.T(),a);return this}Jy(a){Y(this);this.description=a;return this}Sy(a){Y(this);this.K=a;return this}G(a){super.G(a);if(null!==this.description||null!==this.K)this.C.push(),a=this.C.Ng(this.C.nj(this.tag),olympe.sc.Vb.O.T()),
721
- this.description&&a.setProperty(olympe.sc.Vb.C.T(),this.description),this.K&&a.setProperty(olympe.sc.Vb.K.T(),this.K),a.xh(this.tag).Jk(olympe.sc.Vb.F.T(),this.tag).done(),this.C.pop()}};olympe.dc.da.xg.prototype.setSummary=olympe.dc.da.xg.prototype.Sy;olympe.dc.da.xg.prototype.setDescription=olympe.dc.da.xg.prototype.Jy;olympe.dc.da.xg.prototype.setIcon=olympe.dc.da.xg.prototype.Ly;olympe.dc.da.xg.prototype.addToFolder=olympe.dc.da.xg.prototype.wr;olympe.dc.da.fv=class a{constructor(b,c,d){this.F=b;this.va=c||[];this.C=d||[]}static C(b,c,d){if(c instanceof olympe.dc.transaction.ud&&d instanceof olympe.dc.transaction.ud){c=le(c);var e=le(d)}else e=new olympe.dc.transaction.ud(!0),c.Oc(e),c=le(e),d.Oc(e),e=le(e);d=new Map;var f=new a(b,c.Dg,e.Dg);f.Yf()||d.set('delRel',f);f=new a(b,c.Se,e.Se);f.Yf()||d.set('detInst',f);f=new a(b,c.Og,e.Og);f.Yf()||d.set('newInst',f);f=new a(b,c.fg,e.fg);f.Yf()||d.set('updateInst',f);b=new a(b,c.Pg,e.Pg);b.Yf()||
722
- d.set('newRel',b);return d}Yf(){return 0===this.va.length+this.C.length}static sn(b){const c=Object.create(null),d=[],e=[];b.forEach(f=>{0===Object.keys(c).length&&(c.rootTag=f.rootTag);d.push(...(f.operations||[]));e.push(...(f.optionalOperations||[]))});0!==d.length&&(c.operations=d);0!==e.length&&(c.optionalOperations=e);return c}yh(){const b=(d,e)=>{var f=d.o,g=e.o;return f!==g?f<g?-1:1:1===f||2===f||3===f?(f=d.t,g=e.t,f===g?(d=Object.keys(d.p)[0],e=Object.keys(e.p)[0],void 0!==d?d.localeCompare(e):
723
- 1):f.localeCompare(g)):4===f||5===f?(f=d.l,g=e.l,f===g?(f=d.m,g=e.m,f===g?d.r.localeCompare(e.r):f.localeCompare(g)):f.localeCompare(g)):JSON.stringify(f).localeCompare(JSON.stringify(g))},c=Object.create(null);this.va.sort(b);this.C.sort(b);c.rootTag=this.F;c.operations=this.va;c.optionalOperations=this.C;return c}};olympe.dc.da.Df=class extends olympe.dc.da.Wb{constructor(a,b){super(a,b);this.password=this.K=null;this.fl(olympe.dc.za(olympe.dm.User))}Uy(a){Y(this);this.K=a;return this}Cn(a){Y(this);this.password=a;return this}Ky(){return this}Ov(a){Y(this);this.Mm(olympe.dm.User.C.T(),a);return this}G(a){super.G(a);if(null==this.K||''===this.K)throw Error('A username must be set when calling new User');if(null==this.password||''===this.password)throw Error('A password must be set when calling new User');const b=
724
- this.C.Kr(this.K,this.password),c=new Map;c.set(olympe.dm.User.loginProp.T(),b.login);c.set(olympe.dm.User.saltProp.T(),b.salt);c.set(olympe.dm.User.verifierProp.T(),b.verifier);rh(this.C).rc(this.T(),c,!1,a)}};olympe.dc.da.Df.prototype.awardRole=olympe.dc.da.Df.prototype.Ov;olympe.dc.da.Df.prototype.setDomain=olympe.dc.da.Df.prototype.Ky;olympe.dc.da.Df.prototype.setPassword=olympe.dc.da.Df.prototype.Cn;olympe.dc.da.Df.prototype.setUsername=olympe.dc.da.Df.prototype.Uy;olympe.dc.da.R={At:'dc.io.IOService',Fh:'dc.io.IOUrlsProvider'};olympe.U.config(function(a){va(a,olympe.dc.da.R.Fh);C(a,olympe.dc.da.R.At,[olympe.ta.R.Aa,olympe.net.R.Aa,olympe.auth.R.Aa,olympe.dc.da.R.Fh],b=>new olympe.dc.da.yp(b.Qc('dc.io')))},'olympe.dc.io');olympe.dc.da.AD=function(a,b,c=!1){if(a.startsWith('@')||a.startsWith('v'))return!1;a.startsWith(olympe.dc.Yg.lc)&&(a=a.substring(1));const d=olympe.dc.La();return b?c?Pd(d,a,b):Pd(d,a,d.model(b)):d.Gb(a)};olympe.dm={};olympe.dm.Jc={NONE:0,Ss:1,Ao:2,Ts:4,Ps:8,Rs:16,Qs:31,xu:32,uu:64,yu:128,vu:256,fq:512,wu:992,it:1023};olympe.dm.cd=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}na(){return this.Ab(olympe.dc.CloudObject.nameProp)}C(){return olympe.D.$a.EMPTY}F(){return olympe.D.ra.C}};olympe.dm.cd.O=olympe.dc.ya.C('ff021000000000000002',olympe.dm.cd);olympe.dm.cd.$=olympe.dm.cd.O.xa('ff023000000000000035');olympe.dm.cd.C=olympe.dm.cd.O.Ga('ff022000000000000005');olympe.dm.cd.F=Qc('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.cd.V=Qc('ff011000000000000002','PROJECT_RUNNER_USERS_ROLE');
725
- olympe.dm.cd.K=Qc('014831d95f83635090ea','ADMIN_USERS_ROLE');olympe.dm.cd.prototype.na.L=olympe.D.J.F;olympe.dm.cd.prototype.C.L=olympe.D.J.F;olympe.dm.cd.prototype.F.L=olympe.D.J.P;olympe.dm.User=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Pw(){return this.gn()}na(){return this.gn()}gn(){return this.Ab(olympe.dm.User.loginProp)}Ot(){return this.Ab(olympe.dm.User.F)}Nt(){return olympe.D.$a.EMPTY}sx(){return this.Ab(olympe.dm.User.saltProp)}Cx(){return this.Ab(olympe.dm.User.verifierProp)}ox(){return this.tb(olympe.dm.User.C,olympe.dm.cd)}};olympe.dm.User.O=olympe.dc.ya.C('ff021000000000000003',olympe.dm.User);olympe.dm.User.loginProp=olympe.dm.User.O.xa('ff023000000000000001');
675
+ For more information, activate the database debug mode or call "dbMonitor.debug(${a})" from this console.`),b=new olympe.dc.CloudObject(void 0,a)):b=c.instantiate(a,b.C)}return b}static Gr(a,b,c=olympe.dc.Ia.kc){if('undefined'===typeof olympe.sc)throw Error('Method CloudObject.createWith should only be used at runtime, when sc package exists');const d=olympe.dc.La();let e=null;const f=h=>{null===e&&(e=qh(b||this));return e.has(h)?e.get(h):null},g=new Map;a.forEach((h,k)=>{d.Gb(olympe.dc.za(k))?
676
+ g.set(k,h):(k=f(k))&&g.set(k,h)});a=new olympe.sc.Transaction(!1);c=a.create(b||this,g,c);a.kb().catch(h=>olympe.ta.Za('dc').error(`Error occurred for transaction executed by CloudObject.createWith: ${h}`));return this.get(c)}static Mv(){return this.get(this)}static Uk(a){return olympe.dc.hb.Uk(a)}static ed(){return olympe.dc.La().tb(this,olympe.dc.CloudObject.propertyRel).map(a=>new olympe.dc.ua.Property(a))}static gd(){const a=olympe.dc.La();return a.tb(this,olympe.dc.CloudObject.G).map(b=>new olympe.dc.ua.Relation(b)).concat(a.tb(this,
677
+ olympe.dc.CloudObject.la).map(b=>new olympe.dc.ua.Relation(b,olympe.dc.Ca.ORIGIN)))}static Pf(a){return olympe.dc.CloudObject.get(a)}static Ww(a){var b=ph(olympe.dc.Wr(),olympe.dc.za(a));b=b&&b.C;return new olympe.dc.Da(olympe.dc.za(a),olympe.dc.CloudObject.instancesRel,b)}T(){return this.tag}name(){return this.db.name(this)}na(){return this.Ab(olympe.dc.CloudObject.nameProp)}Qf(){this.model||(this.model=olympe.dc.CloudObject.get(this.db.model(this)));return this.model}query(){return olympe.dc.hb.from(this)}$f(){return this.db.$f(this)}Fx(){return this.db.version(this)}Nt(){return this.db.source(this)}Nr(){return olympe.D.Ha([this.na()],
678
+ a=>olympe.D.Bb(a),olympe.D.$a,'getDisplayName',olympe.D.Bb('('+this.toString()+')'))}Lb(){return this.model?this.model.T():this.db.model(this)}observe(a,b,c=!0){const d='function'===typeof a.G?a.G():a;return new rxjs.Observable(e=>{const f=this.db.eb(this.tag,b);c||null!==f||e.next(f);const g=Jd(this.db,this.tag,b,h=>{null===h||void 0===h?e.next(null):e.next(h)});d.P(()=>{e.complete();this.db.F(this.tag,b,g)});return()=>this.db.F(this.tag,b,g)})}wn(a){const b='function'===typeof a.G?a.G():a;return new rxjs.Observable(c=>
679
+ {const d=Kd(this.db,this.tag,(e,f)=>{null===f||void 0===f?c.next([new olympe.dc.ua.Property(e),null]):c.next([new olympe.dc.ua.Property(e),f])});b.P(()=>{c.complete();Ld(this.db,this.tag,d)});return()=>Ld(this.db,this.tag,d)})}sy(a){return this.observe(olympe.D.Na(),a)}get(a){return this.db.eb(this.tag,a,!0)}eb(a){return this.get(a)}ub(a){return olympe.dc.hb.from(this).ub(a)}cn(a){return olympe.dc.md.from(this).ub(a)}Cw(){return this.oc(olympe.dc.CloudObject.Fb,olympe.dc.CloudObject)}fn(){return this.tb(olympe.dc.CloudObject.containsRel,
680
+ olympe.dc.CloudObject)}Sf(a,b,c){const d=olympe.D.Ic(c,'Sync valueType'),e=Jd(this.db,this.tag,a,olympe.D.Na().F(f=>{b&&null!==f&&void 0!==f&&(f=b(f));null===f||void 0===f?d.clear():d.update(f)}));d.node.onDestroy(()=>this.db.F(this.tag,a,e));return d.node}Ab(a){return L(this.Sf(a,olympe.dc.X.Tb.Tm,olympe.D.$a))}ge(a){return L(this.Sf(a,olympe.dc.X.Tb.Sm,olympe.D.ga))}Fg(a){return L(this.Sf(a,olympe.dc.X.Tb.Qm,olympe.D.ra))}nj(a){return L(this.Sf(a,olympe.dc.X.Tb.Rm,olympe.D.jb))}Ur(){return L(this.Sf(olympe.dm.Color.valueProp,
681
+ olympe.dc.X.Tb.Ar,olympe.D.Color))}Vr(){return L(this.Sf(olympe.sc.workflow.Transition.processRefProp,olympe.dc.X.Tb.Br,olympe.dc.CloudObject))}tb(a,b){a=a instanceof olympe.dc.Y.Sb?a:new olympe.dc.Y.Sb(a.T(),a.Sa());return new olympe.dc.Da(this.T(),a,b)}oc(a,b){return this.tb(a,b).Rc()}Kr(a,b){const c=this.db,d=olympe.X.bc(),e=olympe.D.Na(),f=new Map;V(c,this.tag,a,(g,h)=>{if(g)(g=e.run(b,olympe.dc.CloudObject.get(h)))&&f.set(h,g);else{let k;null==(k=f.get(h))||k();f.delete(h)}},d);e.onDestroy(()=>
682
+ {c.C(this.tag,a,d)})}dz(){return new olympe.dc.Da(this.T(),[],Rc(this.T()))}transform(...a){return(new olympe.dc.Da(this.T(),[],this.constructor)).transform(...a)}Tc(){return this.Nr()}toString(){if(!this.db.Gb(this.tag))return`unknown object #${this.tag||'NULL_TAG'}`;const a=this.db.model(this.tag);var b=this.db.name(this);b=b?` instanceName: '${b}'`:'';return a?`${this.db.name(a)}#${this.tag}${b}`:`orphan object (no model) #${this.tag}${b}`}toJSON(){if(!this.db.Gb(this.tag))return{CloudObject:'Unknown tag'};
683
+ const a=this.db.model(this.tag),b=this.db.name(a),c=this.db.name(this.tag);return{CloudObject:this.tag,Name:c,Model:`${b} (${a})`}}yh(a=!1,b=!0){const c={};this.db.ed(this,b).forEach((d,e)=>{e=a?this.db.name(e):e;c[e]=d instanceof olympe.dc.Ec?Ic(d):d});return c}nb(a){return a instanceof olympe.dc.CloudObject?this.T()===a.T():!1}Sd(a){return olympe.D.Ha([a],b=>olympe.D.Ac(this.nb(b)),olympe.D.ra)}dw(a){const b=this.db;let c=!1;if(void 0===a||null===a)a=new olympe.dc.Transaction,c=!0;const d=olympe.dc.Ca.ORIGIN;
684
+ for(const [e,f,g]of Nd(b,this))f===d?a.hc(e,g,this):e!==olympe.dc.CloudObject.modelRel.T()&&a.hc(e,this,g);a.delete(this,olympe.dc.Qb.NONE);c&&a.kb()}};olympe.dc.CloudObject.prototype.equals=olympe.dc.CloudObject.prototype.nb;olympe.dc.CloudObject.prototype.toObject=olympe.dc.CloudObject.prototype.yh;olympe.dc.CloudObject.prototype.followSingle=olympe.dc.CloudObject.prototype.cn;olympe.dc.CloudObject.prototype.follow=olympe.dc.CloudObject.prototype.ub;olympe.dc.CloudObject.prototype.getProperty=olympe.dc.CloudObject.prototype.eb;
685
+ olympe.dc.CloudObject.prototype.get=olympe.dc.CloudObject.prototype.get;olympe.dc.CloudObject.prototype.observeProperty=olympe.dc.CloudObject.prototype.sy;olympe.dc.CloudObject.prototype.observeProperties=olympe.dc.CloudObject.prototype.wn;olympe.dc.CloudObject.prototype.observe=olympe.dc.CloudObject.prototype.observe;olympe.dc.CloudObject.prototype.getModelTag=olympe.dc.CloudObject.prototype.Lb;olympe.dc.CloudObject.prototype.isPersisted=olympe.dc.CloudObject.prototype.$f;
686
+ olympe.dc.CloudObject.prototype.query=olympe.dc.CloudObject.prototype.query;olympe.dc.CloudObject.prototype.getModel=olympe.dc.CloudObject.prototype.Qf;olympe.dc.CloudObject.prototype.name=olympe.dc.CloudObject.prototype.name;olympe.dc.CloudObject.prototype.getTag=olympe.dc.CloudObject.prototype.T;olympe.dc.CloudObject.getInstancesOf=olympe.dc.CloudObject.Ww;olympe.dc.CloudObject.getInstance=olympe.dc.CloudObject.Pf;olympe.dc.CloudObject.getRelations=olympe.dc.CloudObject.gd;
687
+ olympe.dc.CloudObject.getProperties=olympe.dc.CloudObject.ed;olympe.dc.CloudObject.instancesOf=olympe.dc.CloudObject.Uk;olympe.dc.CloudObject.asInstance=olympe.dc.CloudObject.Mv;olympe.dc.CloudObject.createWith=olympe.dc.CloudObject.Gr;olympe.dc.CloudObject.get=olympe.dc.CloudObject.get;olympe.dc.CloudObject.O=olympe.dc.ya.C('ff021000000000000001',olympe.dc.CloudObject);olympe.dc.CloudObject.tj=olympe.dc.CloudObject.O.xa(olympe.dc.$b.VERSION);olympe.dc.CloudObject.nameProp=olympe.dc.CloudObject.O.xa('ff023000000000000011');
688
+ z('olympe.dc.CloudObject.nameProp',olympe.dc.CloudObject.nameProp);olympe.dc.CloudObject.P=olympe.dc.CloudObject.O.xa('ff023000000000000012');olympe.dc.CloudObject.G=olympe.dc.CloudObject.O.Ga('ff02200000000000000a');olympe.dc.CloudObject.la=olympe.dc.CloudObject.O.Ga('ff02200000000000000b',olympe.dc.Ca.ORIGIN);olympe.dc.CloudObject.be=olympe.dc.CloudObject.O.Ga('017e9c4ba4c847d71cbf');olympe.dc.CloudObject.Ld=olympe.dc.CloudObject.O.Ga('017ea013caf8e89cedb2');olympe.dc.CloudObject.propertyRel=olympe.dc.CloudObject.O.Ga('ff02200000000000000c');
689
+ z('olympe.dc.CloudObject.propertyRel',olympe.dc.CloudObject.propertyRel);olympe.dc.CloudObject.typeRel=olympe.dc.CloudObject.O.Ga('ff02200000000000000d',olympe.dc.Ca.ORIGIN);olympe.dc.CloudObject.modelRel=olympe.dc.CloudObject.O.Ga(olympe.dc.lc.Vc);z('olympe.dc.CloudObject.modelRel',olympe.dc.CloudObject.modelRel);olympe.dc.CloudObject.instancesRel=P(olympe.dc.CloudObject.O,olympe.dc.CloudObject.modelRel);z('olympe.dc.CloudObject.instancesRel',olympe.dc.CloudObject.instancesRel);
690
+ olympe.dc.CloudObject.extendRel=olympe.dc.CloudObject.O.Ga(olympe.dc.lc.xi);z('olympe.dc.CloudObject.extendRel',olympe.dc.CloudObject.extendRel);olympe.dc.CloudObject.extendedByRel=P(olympe.dc.CloudObject.O,olympe.dc.CloudObject.extendRel);z('olympe.dc.CloudObject.extendedByRel',olympe.dc.CloudObject.extendedByRel);olympe.dc.CloudObject.containsRel=olympe.dc.CloudObject.O.Ga(olympe.dc.lc.io);z('olympe.dc.CloudObject.containsRel',olympe.dc.CloudObject.containsRel);
691
+ olympe.dc.CloudObject.Fb=P(olympe.dc.CloudObject.O,olympe.dc.CloudObject.containsRel);olympe.dc.CloudObject.cw=olympe.dc.CloudObject.O.Ga('018282d3ac0a474a0bf4');z('olympe.dc.CloudObject.deleteAlsoRel',olympe.dc.CloudObject.cw);olympe.dc.NB=olympe.dc.CloudObject;olympe.dc.CloudObject.ma=[olympe.dc.De];m=olympe.dc.CloudObject.prototype;m.T.L=new olympe.D.J(()=>String,[]);m.name.L=new olympe.D.J(()=>String,[]);m.na.L=olympe.D.J.F;m.Qf.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
692
+ m.Fx.L=new olympe.D.J(()=>Number,[]);m.Nt.L=new olympe.D.J(()=>String,[]);m.Nr.L=olympe.D.J.F;m.Lb.L=new olympe.D.J(()=>String,[]);m.Cw.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.fn.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.Sf.L=new olympe.D.J(()=>olympe.D.Node,[]);m.Ab.L=olympe.D.J.F;m.ge.L=olympe.D.J.G;m.Fg.L=olympe.D.J.P;m.nj.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Ur.L=new olympe.D.J(()=>olympe.D.Color,[]);m.Vr.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
693
+ m.tb.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.oc.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Kr.L=new olympe.D.J(()=>Function,[]);m.dz.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.transform.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.Tc.L=olympe.D.J.F;m.toString.L=olympe.D.J.C;m.nb.L=olympe.D.J.C;m.Sd.L=olympe.D.J.P;m.dw.L=new olympe.D.J(()=>{},[]);olympe.dc.ek=class{constructor(a){this.instance=a}T(){return this.instance.T()}qj(){return rb(this.instance.Fg(olympe.dc.CloudObject.P))}Ow(){return this.instance.oc(olympe.dc.CloudObject.extendRel,olympe.dc.CloudObject)}Qk(){return this.instance.transform(new olympe.dc.Y.Dc(olympe.dc.CloudObject.extendRel.T(),olympe.dc.Ca.DESTINATION,olympe.dc.Y.qk.ht))}kn(){return this.instance.transform(new olympe.dc.Y.Dc(olympe.dc.CloudObject.extendRel.T(),olympe.dc.Ca.DESTINATION,olympe.dc.Y.qk.vp))}ed(){return this.kn().transform(olympe.dc.CloudObject.propertyRel,
694
+ new olympe.dc.Y.Ae)}ix(){return this.instance.transform(olympe.dc.CloudObject.propertyRel)}gd(){return this.kn().transform(olympe.dc.CloudObject.G,new olympe.dc.Y.Ae)}jx(){return this.instance.transform(olympe.dc.CloudObject.G)}static from(a){return olympe.D.Ha([a],b=>{const c=b.T(),d=olympe.dc.La();if(!d.rj(c))throw Error(`Instance "${d.name(c)}" (tag=${c}) is not a model.`);return new olympe.dc.ek(b)},olympe.dc.ek,'transformToModelInfo')}static qj(){return rb((void 0).Fg(olympe.dc.CloudObject.P))}};
695
+ olympe.dc.ek.ma=[olympe.dc.De];m=olympe.dc.ek.prototype;m.Ow.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Qk.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.kn.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.ed.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.ix.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.gd.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.jx.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dc.UA=class{};olympe.dc.da={};olympe.dc.da.zp=class{constructor(a){this.N=a}};olympe.dc.da.zp.Mc={Vi:0,lB:1,mB:3,WA:4};olympe.dc.da.Zj=class{};function Y(a){if(a.V)throw Error('Cannot modify definition after definition is written');}
696
+ olympe.dc.da.Wb=class{constructor(a,b){a=this.C=a;if(a.C)throw b=a.C.na(),a=a.C.T(),Error('Cannot work on a new definition without calling done on the previous one or popping it. '+`Make sure done() method has been called on previous definition ${b} (${a})`);if(void 0===this)throw Error('Current def cannot be set to undefined.');a.C=this;this.tag=b;this.F=new Map;this.$=olympe.dc.CloudObject.O.T();this.qa=new Map;this.la=new Map;this.V=this.ba=!1;this.P=null}gl(a){Y(this);this.$=a;return this}Lb(){return this.$}xh(a){Y(this);
697
+ this.P=a;return this}Qy(){this.ba=!0;return this}Py(a){Y(this);const b=new Map;if('string'===typeof a){const c=olympe.dc.CloudObject.nameProp.T();b.set(c,a||'')}else Object.keys(a).forEach(c=>{b.set(c,a[c])});this.F=b;return this}ji(a){Y(this);Object.keys(a).forEach(b=>{this.F.set(b,a[b])});return this}setProperty(a,b){Y(this);this.F.set(a,b);return this}hl(a){Y(this);const b=olympe.dc.CloudObject.nameProp.T();this.F.set(b,a);return this}Kk(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');
698
+ if(a===olympe.dc.CloudObject.containsRel.T())throw Error('Container must be defined using dedicated helpers setContainedIn');b&&this.qa.set(a+'.'+b,[a,b]);return this}Nm(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');if(a===olympe.dc.CloudObject.containsRel.T())throw Error('Container must be defined using dedicated helper setContainedIn');b&&this.la.set(a+'.'+b,[a,b]);return this}done(){if(this.V)return this;const a=rh(this.C,this.ba);a.F(this.tag,this.F,
699
+ -1);sh(this.C,this);a.Va(olympe.dc.lc.Vc,this.tag,this.$,-1);this.P&&a.Va(olympe.dc.lc.io,this.P,this.tag,-1);this.G(-1);this.qa.forEach(b=>{a.Va(b[0],this.tag,b[1],-1)});this.la.forEach(b=>{a.Va(b[0],b[1],this.tag,-1)});this.V=!0;this.C.C=void 0;return this}G(){}T(){return this.tag}na(){return this.F.get('ff023000000000000011')}};olympe.dc.da.Wb.prototype.getName=olympe.dc.da.Wb.prototype.na;olympe.dc.da.Wb.prototype.getTag=olympe.dc.da.Wb.prototype.T;olympe.dc.da.Wb.prototype.done=olympe.dc.da.Wb.prototype.done;
700
+ olympe.dc.da.Wb.prototype.addRelationFrom=olympe.dc.da.Wb.prototype.Nm;olympe.dc.da.Wb.prototype.addRelationTo=olympe.dc.da.Wb.prototype.Kk;olympe.dc.da.Wb.prototype.setName=olympe.dc.da.Wb.prototype.hl;olympe.dc.da.Wb.prototype.setProperty=olympe.dc.da.Wb.prototype.setProperty;olympe.dc.da.Wb.prototype.setProperties=olympe.dc.da.Wb.prototype.ji;olympe.dc.da.Wb.prototype.setNameOrProperties=olympe.dc.da.Wb.prototype.Py;olympe.dc.da.Wb.prototype.setOptional=olympe.dc.da.Wb.prototype.Qy;
701
+ olympe.dc.da.Wb.prototype.setContainedIn=olympe.dc.da.Wb.prototype.xh;olympe.dc.da.Wb.prototype.setModelTag=olympe.dc.da.Wb.prototype.gl;olympe.dc.da.bd=class extends olympe.dc.da.Wb{constructor(a,b){super(a,b);this.Fa=this.C.OBJECT;this.Ka=new Map;this.Wa=new Map}ls(a){Y(this);this.Fa=a;return this}extends(a){return this.ls(a)}$i(){Y(this);this.setProperty(olympe.dc.CloudObject.P.T(),!0);return this}defineProperty(a,b,c,d,e){Y(this);this.Ka.set(a,new olympe.dc.da.bd.Property(a,b,c,d));void 0!==d&&super.setProperty(olympe.dc.Xg.kc+a,d);void 0!==e&&(this.C.push(),this.C.Kg(this.C.oj(a),olympe.sc.Vb.O.T()).setProperty(olympe.sc.Vb.C.T(),
702
+ e).xh(this.tag).Kk(olympe.sc.Vb.F.T(),a).done(),this.C.pop());return this}lh(a,b,c,d,e,{cj:f=0,zj:g=0,il:h=d,bj:k=olympe.dm.Jc.NONE,wj:l=olympe.dm.Relation.K|k}={}){Y(this);b=new olympe.dc.da.bd.Relation(a,this.T(),b,c||'',d,e,g,h,f,l,k);this.Wa.set(a,b);return this}G(a){super.G(a);rh(this.C).Va(olympe.dc.CloudObject.extendRel.T(),this.tag,this.Fa,a);this.Ka.forEach(b=>{const c={[olympe.dc.CloudObject.nameProp.T()]:b.name||''},d=olympe.dc.za(olympe.dm.Property),e=olympe.dc.CloudObject.propertyRel.T(),
703
+ f=b.tag;this.C.push();this.C.Kg(f,d).ji(c).done();this.C.pop();b=b.type;rh(this.C).Va(e,this.T(),f,a);rh(this.C).Va(olympe.dm.Property.typeRel.T(),f,b,a)});this.Wa.forEach(b=>{this.C.lh(b.C,b.G,b.F,b.name,b.Jr,b.Hr,{zj:b.zj,il:b.il,cj:b.cj,wj:b.wj,bj:b.bj},a)})}};olympe.dc.da.bd.prototype.defineRelation=olympe.dc.da.bd.prototype.lh;olympe.dc.da.bd.prototype.defineProperty=olympe.dc.da.bd.prototype.defineProperty;olympe.dc.da.bd.prototype['abstract']=olympe.dc.da.bd.prototype.$i;
704
+ olympe.dc.da.bd.prototype['extends']=olympe.dc.da.bd.prototype.extends;olympe.dc.da.bd.prototype.setParentTag=olympe.dc.da.bd.prototype.ls;olympe.dc.da.bd.Property=class{constructor(a,b,c,d){this.tag=a;this.type=b;this.name=c||'';this.defaultValue=d}};olympe.dc.da.bd.Relation=class{constructor(a,b,c,d,e,f,g,h,k,l,n){this.C=a;this.G=b;this.F=c;this.name=d;this.Jr=e;this.Hr=f;this.zj=g;this.il=h;this.cj=k;this.wj=l;this.bj=n}};function rh(a,b){return b?a.V:a.F}function sh(a,b){0<a.K.length&&(b.P||a.F.Va(olympe.dc.CloudObject.containsRel.T(),a.K[a.K.length-1].T(),b.T(),-1))}
705
+ olympe.dc.da.Ta=class{constructor(a){if(a&&void 0===a.log)throw Error('Argument of OSaveFileBuilder is not a logger - might be a source, adapt implementing classes');this.F=new olympe.dc.transaction.ud(!0);this.V=new olympe.dc.transaction.ud(!0);this.N=a||null;this.qa=!1;this.G=null;this.la=new Map;this.$=null;this.ba=Object.create(null);this.C=void 0;this.K=[];this.P=!0;this.hs=/eval \(eval at process .*<anonymous>:(\d+):(\d+)\)/m;this.DEFAULT=olympe.dc.Xg.kc;this.OBJECT=olympe.dc.CloudObject.O.T();
706
+ this.PROPERTY=olympe.dm.Property.O.T();this.RELATION=olympe.dm.Relation.O.T();this.STRING=olympe.dm.String.O.T();this.BOOLEAN=olympe.dm.Boolean.O.T();this.NUMBER=olympe.dm.Number.O.T();this.DATETIME=olympe.dm.DateTime.O.T();this.COLOR=olympe.dm.Color.O.T();this.FILE=olympe.dm.File.O.T();this.ROLE=olympe.dm.cd.O.T();this.USER=olympe.dm.User.O.T();this.ONE_ONE=olympe.dm.Relation.F.tu;this.ONE_MANY=olympe.dm.Relation.F.fm;this.MANY_ONE=olympe.dm.Relation.F.lu;this.MANY_MANY=olympe.dm.Relation.F.am;this.NONE=
707
+ olympe.dm.Jc.NONE;this.DESTINATION_READ=olympe.dm.Jc.Ts;this.DESTINATION_CREATE=olympe.dm.Jc.Bo;this.DESTINATION_WRITE=olympe.dm.Jc.Us;this.DESTINATION_DELETE=olympe.dm.Jc.Qs;this.DESTINATION_LINK=olympe.dm.Jc.Ss;this.DESTINATION_FULL=olympe.dm.Jc.Rs;this.ORIGIN_READ=olympe.dm.Jc.yu;this.ORIGIN_CREATE=olympe.dm.Jc.vu;this.ORIGIN_WRITE=olympe.dm.Jc.zu;this.ORIGIN_DELETE=olympe.dm.Jc.wu;this.ORIGIN_LINK=olympe.dm.Jc.gq;this.ORIGIN_FULL=olympe.dm.Jc.xu;this.FULL=olympe.dm.Jc.jt;this.DUMP_IGNORE=olympe.dm.Relation.C.Ql;
708
+ this.DUMP_REF=olympe.dm.Relation.C.zq;this.DUMP_REVERSE_REF=olympe.dm.Relation.C.Uu;this.DUMP_UNILATERAL=olympe.dm.Relation.C.Bk;this.DUMP_REVERSE_UNILATERAL=olympe.dm.Relation.C.pk;this.DUMP_EVERYTHING=olympe.dm.Relation.C.Io;this.DUMP_DEFAULT=olympe.dm.Relation.C.kc;this.DUMP_REV_DEFAULT=olympe.dm.Relation.C.Tu;this.DELETE_REF=this.DUMP_BOTH_REF=olympe.dm.Relation.C.rl;this.DELETE_REF_AND_DESTINATION=olympe.dm.Relation.C.Qu;this.DELETE_REF_AND_ORIGIN=olympe.dm.Relation.C.Ru;this.DELETE_EVERYTHING=
709
+ olympe.dm.Relation.C.Io;this.OLYMPE_AUTHENTICATED_USERS=olympe.dm.cd.F}push(){this.K.push(this.C);this.C=void 0}pop(){if(this.C)throw Error('Cannot unstack definition: current definition not closed');this.C=this.K.pop()}ow(){const a=new Map,b=olympe.dc.da.gv.C(this.$,this.F,this.V);for(const [c,d]of b.entries())a.set(c,d.yh());return a}sx(){return this.$}Oy(a){this.P=a}log(...a){this.P&&this.N&&this.N.log(...a)}sn(...a){this.P&&this.N&&this.N.debug(...a)}Sx(...a){this.P&&this.N&&this.N.warn(...a)}Yk(...a){this.P&&
710
+ this.N&&this.N.error(...a)}Ov(a){if(a&&20===a.length&&!this.qa){if(this.ba[a])throw Error('Tag '+a+' is used to define more than one keyword');return this.ba[a]=a}this.G=null===this.G?olympe.X.Ve():olympe.X.px(this.G);this.log('Generating new tag to replace '+a+'. New tag is: '+this.G);return this.G}oj(a){const b=this.la.get(a)||1,c=olympe.X.oj(a,b);this.la.set(a,b+1);return c}Vy(a){this.qa=a}fw(){}Ty(a){this.$=a}Kg(a,b){return(new olympe.dc.da.Wb(this,a)).gl(b)}ky(a,b){return(new olympe.dc.da.bd(this,
711
+ a)).hl(b)}jy(a,b){return(new olympe.dc.da.bd(this,a)).hl(b).$i()}ly(a){return new olympe.dc.da.Bf(this,a)}bl(a,b,c){this.F.Va(a,b,c,-1)}defineProperty(a,b,c,d,e){this.sn('Defining property ',d,' on model ',a);d={[olympe.dc.CloudObject.nameProp.T()]:d||''};void 0!==e&&this.qc(a,{[olympe.dc.Xg.kc+c]:e});this.C?(this.push(),this.Kg(c,olympe.dm.Property.O.T()).ji(d).done(),this.pop()):this.Kg(c,olympe.dm.Property.O.T()).ji(d).xh(a).done();this.bl(olympe.dc.CloudObject.propertyRel.T(),a,c);this.bl(olympe.dm.Property.typeRel.T(),
712
+ c,b)}lh(a,b,c,d,e,f,{cj:g=olympe.dm.Relation.F.fm,zj:h=olympe.dm.Relation.C.Ql,il:k=e,bj:l=olympe.dm.Jc.NONE,wj:n=olympe.dm.Relation.K|l}={},p=-1){if(void 0===e||null===e)throw Error('Cannot define a relation without defining the dump follow rules (must be set to db.DUMP_<something> and cannot be undefined or null)');if(void 0===f||null===f)throw Error('Cannot define a relation without defining the delete follow rules (must be set to db.DELETE_<something> and cannot be undefined or null)');const q=
713
+ olympe.dm.Relation;d={[olympe.dc.CloudObject.nameProp.T()]:d||'',[q.Pm.T()]:g,[q.xn.T()]:n,[q.Xm.T()]:e,[q.Wm.T()]:f,[q.Bn.T()]:h,[q.En.T()]:k,[q.yr.T()]:l};this.C?(this.push(),this.Kg(a,q.O.T()).ji(d).done(),this.pop()):this.Kg(a,q.O.T()).ji(d).xh(b).done();this.F.Va(q.originModelRel.T(),b,a,p);this.F.Va(q.destinationModelRel.T(),a,c,p)}Qx(a,b){this.F.Va(olympe.dm.cd.C.T(),a,b,-1)}qc(a,b,c=!1){this.sn('Updating instance ',a);delete b[olympe.dc.$b.Hd];delete b[olympe.dc.$b.VERSION];const d=new Map;
714
+ Object.keys(b).forEach(e=>{d.set(e,b[e])});this.F.qc(a,d,c,-1)}Av(a,b,c){(new olympe.dc.da.Wb(this,this.oj(a))).setProperty(olympe.sc.Vb.C.T(),b).setProperty(olympe.sc.Vb.K.T(),c).gl(olympe.sc.Vb.O.T()).Kk(olympe.sc.Vb.F.T(),a).xh(a).done()}assign(a,b,c){this.bl(b,a,c)}Nv(a,b,c){this.V.Va(b,a,c,-1)}aw(a){return new olympe.dc.Ec(a)}Wv(a,b,c,d){const e={c:7};e.r=a;e.g=b;e.b=c;e.a=d;return e}Xv({year:a=1970,month:b=1,day:c=1,hour:d=1,minute:e=0,second:f=0,DD:g=0,PD:h=0}={}){const k={c:4};k.y=a;k.M=b;
715
+ k.d=c;k.h=d;k.m=e;k.s=f;k.S=g;k.z=h;return k}rw(a){a=new Date(Date.parse(a));const b={c:4};b.y=a.getFullYear();b.M=a.getMonth()+1;b.d=a.getDate();b.h=a.getHours();b.m=a.getMinutes();b.s=a.getSeconds();b.S=a.getMilliseconds();b.z=-a.getTimezoneOffset();return b}Yv(a){a='number'===typeof a?new Date(a):a;const b={c:4};b.h=a.getHours();b.m=a.getMinutes();b.s=a.getSeconds();b.S=a.getMilliseconds();b.z=a.getTimezoneOffset();b.y=a.getFullYear();b.M=a.getMonth()+1;b.d=a.getDate();return b}hj(a,b,c){return olympe.auth.Jb.Ie.hj(a,
716
+ c)}Lr(a,b){return olympe.auth.Jb.Ie.hj(a,b)}hc(){throw Error('DeleteRelation method on OSaveFile is deprecated');}Fc(){throw Error('DeleteInstance method on OSaveFile is deprecated');}};olympe.dc.da.Ta.prototype.deleteInstance=olympe.dc.da.Ta.prototype.Fc;olympe.dc.da.Ta.prototype.deleteRelation=olympe.dc.da.Ta.prototype.hc;olympe.dc.da.Ta.prototype.generateAuthenticationData=olympe.dc.da.Ta.prototype.Lr;olympe.dc.da.Ta.prototype.generateAuthData=olympe.dc.da.Ta.prototype.hj;
717
+ olympe.dc.da.Ta.prototype.createDateTimeLegacy=olympe.dc.da.Ta.prototype.Yv;olympe.dc.da.Ta.prototype.fromISODate=olympe.dc.da.Ta.prototype.rw;olympe.dc.da.Ta.prototype.createDateTime=olympe.dc.da.Ta.prototype.Xv;olympe.dc.da.Ta.prototype.createColor=olympe.dc.da.Ta.prototype.Wv;olympe.dc.da.Ta.prototype.createReference=olympe.dc.da.Ta.prototype.aw;olympe.dc.da.Ta.prototype.assignOptional=olympe.dc.da.Ta.prototype.Nv;olympe.dc.da.Ta.prototype.assign=olympe.dc.da.Ta.prototype.assign;
718
+ olympe.dc.da.Ta.prototype.addDocumentation=olympe.dc.da.Ta.prototype.Av;olympe.dc.da.Ta.prototype.updateInstance=olympe.dc.da.Ta.prototype.qc;olympe.dc.da.Ta.prototype.linkRoleToUser=olympe.dc.da.Ta.prototype.Qx;olympe.dc.da.Ta.prototype.defineRelation=olympe.dc.da.Ta.prototype.lh;olympe.dc.da.Ta.prototype.defineProperty=olympe.dc.da.Ta.prototype.defineProperty;olympe.dc.da.Ta.prototype.newRelation=olympe.dc.da.Ta.prototype.bl;olympe.dc.da.Ta.prototype.newUser=olympe.dc.da.Ta.prototype.ly;
719
+ olympe.dc.da.Ta.prototype.newAbstractModel=olympe.dc.da.Ta.prototype.jy;olympe.dc.da.Ta.prototype.newModel=olympe.dc.da.Ta.prototype.ky;olympe.dc.da.Ta.prototype.newInstance=olympe.dc.da.Ta.prototype.Kg;olympe.dc.da.Ta.prototype.setRootInstanceTag=olympe.dc.da.Ta.prototype.Ty;olympe.dc.da.Ta.prototype.disableChecks=olympe.dc.da.Ta.prototype.fw;olympe.dc.da.Ta.prototype.setUseNewTags=olympe.dc.da.Ta.prototype.Vy;olympe.dc.da.Ta.prototype.assignTag=olympe.dc.da.Ta.prototype.Ov;
720
+ olympe.dc.da.Ta.prototype.logError=olympe.dc.da.Ta.prototype.Yk;olympe.dc.da.Ta.prototype.logWarn=olympe.dc.da.Ta.prototype.Sx;olympe.dc.da.Ta.prototype.logDebug=olympe.dc.da.Ta.prototype.sn;olympe.dc.da.Ta.prototype.log=olympe.dc.da.Ta.prototype.log;olympe.dc.da.Ta.prototype.setLoggingEnabled=olympe.dc.da.Ta.prototype.Oy;olympe.dc.da.Ta.prototype.getRootInstanceTag=olympe.dc.da.Ta.prototype.sx;olympe.dc.da.Ta.prototype.flushContents=olympe.dc.da.Ta.prototype.ow;olympe.dc.da.ug=class extends olympe.dc.da.bd{constructor(a,b,c){super(a,b);this.K=this.description=null;this.setProperty(olympe.dm.BrickMetadata.Wa.T(),olympe.dm.BrickMetadata.xb.Eu);null!==c&&this.xr(c)}xr(a){this.xh(a);this.Nm(olympe.dm.Pb.C.T(),a);return this}Ny(a){this.F.set(olympe.dm.ze.Ka.T(),a);return this}Ly(a){Y(this);this.description=a;return this}Uy(a){Y(this);this.K=a;return this}G(a){super.G(a);if(null!==this.description||null!==this.K)this.C.push(),a=this.C.Kg(this.C.oj(this.tag),olympe.sc.Vb.O.T()),
721
+ this.description&&a.setProperty(olympe.sc.Vb.C.T(),this.description),this.K&&a.setProperty(olympe.sc.Vb.K.T(),this.K),a.xh(this.tag).Kk(olympe.sc.Vb.F.T(),this.tag).done(),this.C.pop()}};olympe.dc.da.ug.prototype.setSummary=olympe.dc.da.ug.prototype.Uy;olympe.dc.da.ug.prototype.setDescription=olympe.dc.da.ug.prototype.Ly;olympe.dc.da.ug.prototype.setIcon=olympe.dc.da.ug.prototype.Ny;olympe.dc.da.ug.prototype.addToFolder=olympe.dc.da.ug.prototype.xr;olympe.dc.da.gv=class a{constructor(b,c,d){this.F=b;this.va=c||[];this.C=d||[]}static C(b,c,d){if(c instanceof olympe.dc.transaction.ud&&d instanceof olympe.dc.transaction.ud){c=le(c);var e=le(d)}else e=new olympe.dc.transaction.ud(!0),c.Oc(e),c=le(e),d.Oc(e),e=le(e);d=new Map;var f=new a(b,c.Ag,e.Ag);f.Wf()||d.set('delRel',f);f=new a(b,c.Te,e.Te);f.Wf()||d.set('detInst',f);f=new a(b,c.Lg,e.Lg);f.Wf()||d.set('newInst',f);f=new a(b,c.cg,e.cg);f.Wf()||d.set('updateInst',f);b=new a(b,c.Mg,e.Mg);b.Wf()||
722
+ d.set('newRel',b);return d}Wf(){return 0===this.va.length+this.C.length}static tn(b){const c=Object.create(null),d=[],e=[];b.forEach(f=>{0===Object.keys(c).length&&(c.rootTag=f.rootTag);d.push(...(f.operations||[]));e.push(...(f.optionalOperations||[]))});0!==d.length&&(c.operations=d);0!==e.length&&(c.optionalOperations=e);return c}yh(){const b=(d,e)=>{var f=d.o,g=e.o;return f!==g?f<g?-1:1:1===f||2===f||3===f?(f=d.t,g=e.t,f===g?(d=Object.keys(d.p)[0],e=Object.keys(e.p)[0],void 0!==d?d.localeCompare(e):
723
+ 1):f.localeCompare(g)):4===f||5===f?(f=d.l,g=e.l,f===g?(f=d.m,g=e.m,f===g?d.r.localeCompare(e.r):f.localeCompare(g)):f.localeCompare(g)):JSON.stringify(f).localeCompare(JSON.stringify(g))},c=Object.create(null);this.va.sort(b);this.C.sort(b);c.rootTag=this.F;c.operations=this.va;c.optionalOperations=this.C;return c}};olympe.dc.da.Bf=class extends olympe.dc.da.Wb{constructor(a,b){super(a,b);this.password=this.K=null;this.gl(olympe.dc.za(olympe.dm.User))}Wy(a){Y(this);this.K=a;return this}Dn(a){Y(this);this.password=a;return this}My(){return this}Pv(a){Y(this);this.Nm(olympe.dm.User.C.T(),a);return this}G(a){super.G(a);if(null==this.K||''===this.K)throw Error('A username must be set when calling new User');if(null==this.password||''===this.password)throw Error('A password must be set when calling new User');const b=
724
+ this.C.Lr(this.K,this.password),c=new Map;c.set(olympe.dm.User.loginProp.T(),b.login);c.set(olympe.dm.User.saltProp.T(),b.salt);c.set(olympe.dm.User.verifierProp.T(),b.verifier);rh(this.C).qc(this.T(),c,!1,a)}};olympe.dc.da.Bf.prototype.awardRole=olympe.dc.da.Bf.prototype.Pv;olympe.dc.da.Bf.prototype.setDomain=olympe.dc.da.Bf.prototype.My;olympe.dc.da.Bf.prototype.setPassword=olympe.dc.da.Bf.prototype.Dn;olympe.dc.da.Bf.prototype.setUsername=olympe.dc.da.Bf.prototype.Wy;olympe.dc.da.R={Bt:'dc.io.IOService',Fh:'dc.io.IOUrlsProvider'};olympe.U.config(function(a){va(a,olympe.dc.da.R.Fh);C(a,olympe.dc.da.R.Bt,[olympe.ta.R.Aa,olympe.net.R.Aa,olympe.auth.R.Aa,olympe.dc.da.R.Fh],b=>new olympe.dc.da.zp(b.Qc('dc.io')))},'olympe.dc.io');olympe.dc.da.CD=function(a,b,c=!1){if(a.startsWith('@')||a.startsWith('v'))return!1;a.startsWith(olympe.dc.Xg.kc)&&(a=a.substring(1));const d=olympe.dc.La();return b?c?Pd(d,a,b):Pd(d,a,d.model(b)):d.Gb(a)};olympe.dm={};olympe.dm.Jc={NONE:0,Ts:1,Bo:2,Us:4,Qs:8,Ss:16,Rs:31,yu:32,vu:64,zu:128,wu:256,gq:512,xu:992,jt:1023};olympe.dm.cd=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}na(){return this.Ab(olympe.dc.CloudObject.nameProp)}C(){return olympe.D.$a.EMPTY}F(){return olympe.D.ra.C}};olympe.dm.cd.O=olympe.dc.ya.C('ff021000000000000002',olympe.dm.cd);olympe.dm.cd.$=olympe.dm.cd.O.xa('ff023000000000000035');olympe.dm.cd.C=olympe.dm.cd.O.Ga('ff022000000000000005');olympe.dm.cd.F=Qc('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.cd.V=Qc('ff011000000000000002','PROJECT_RUNNER_USERS_ROLE');
725
+ olympe.dm.cd.K=Qc('014831d95f83635090ea','ADMIN_USERS_ROLE');olympe.dm.cd.prototype.na.L=olympe.D.J.F;olympe.dm.cd.prototype.C.L=olympe.D.J.F;olympe.dm.cd.prototype.F.L=olympe.D.J.P;olympe.dm.User=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Rw(){return this.hn()}na(){return this.hn()}hn(){return this.Ab(olympe.dm.User.loginProp)}Pt(){return this.Ab(olympe.dm.User.F)}Ot(){return olympe.D.$a.EMPTY}ux(){return this.Ab(olympe.dm.User.saltProp)}Ex(){return this.Ab(olympe.dm.User.verifierProp)}qx(){return this.tb(olympe.dm.User.C,olympe.dm.cd)}};olympe.dm.User.O=olympe.dc.ya.C('ff021000000000000003',olympe.dm.User);olympe.dm.User.loginProp=olympe.dm.User.O.xa('ff023000000000000001');
726
726
  z('olympe.dm.User.loginProp',olympe.dm.User.loginProp);olympe.dm.User.F=olympe.dm.User.O.xa('ff023000000000000002');olympe.dm.User.$=olympe.dm.User.O.xa('ff023000000000000003');olympe.dm.User.saltProp=olympe.dm.User.O.xa('ff023000000000000004');z('olympe.dm.User.saltProp',olympe.dm.User.saltProp);olympe.dm.User.verifierProp=olympe.dm.User.O.xa('ff023000000000000005');z('olympe.dm.User.verifierProp',olympe.dm.User.verifierProp);olympe.dm.User.V=olympe.dm.User.O.xa('ff023000000000000020');
727
- olympe.dm.User.SAMLnameIdProp=olympe.dm.User.O.xa('ff023000000000000036');z('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.C=P(olympe.dm.User.O,olympe.dm.cd.C);olympe.dm.User.ba=olympe.dm.User.O.Ga('ff022000000000000002');olympe.dm.User.K=Qc('0163d9653067b6237f62','GUEST_USER');m=olympe.dm.User.prototype;m.Pw.L=olympe.D.J.F;m.na.L=olympe.D.J.F;m.gn.L=olympe.D.J.F;m.Ot.L=olympe.D.J.F;m.Nt.L=olympe.D.J.F;m.sx.L=olympe.D.J.F;m.Cx.L=olympe.D.J.F;
728
- m.ox.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.ze=class extends olympe.dc.CloudObject{$(){return this.en()}Wa(){return this.Ab(olympe.dm.ze.Ka)}};olympe.dm.ze.O=olympe.dc.ya.C('01621fb84e3300000000',olympe.dm.ze);olympe.dm.ze.Ka=olympe.dm.ze.O.xa('01609de3f292e3c2c6ff');olympe.dm.ze.prototype.$.L=new olympe.D.J(()=>olympe.D.od,[]);olympe.dm.ze.prototype.Wa.L=olympe.D.J.F;olympe.dm.BrickMetadata=class extends olympe.dm.ze{Ex(){return this.Ab(olympe.dm.BrickMetadata.Wa)}Sd(){return this.Ab(olympe.dm.BrickMetadata.eb)}Xe(){return null}yw(){return this.tb(olympe.sc.Xb.Comment.C.zc(),olympe.sc.Xb.Comment)}Sr(){return this.bn(olympe.dm.BrickMetadata.fc).Pc().Sr()}};olympe.dm.BrickMetadata.O=Uc(olympe.dc.ya.C('01621fb84e3500000000',olympe.dm.BrickMetadata));olympe.dm.BrickMetadata.Wa=olympe.dm.BrickMetadata.O.xa('01621fb84e320000f001');olympe.dm.BrickMetadata.eb=olympe.dm.BrickMetadata.O.xa('01703376c4a81c0e9d94');
729
- olympe.dm.BrickMetadata.fc=olympe.dm.BrickMetadata.O.Ga('0161ae97622bb21f335b');olympe.dm.BrickMetadata.xb={cB:'private',Du:'public'};olympe.dm.BrickMetadata.$c=Qc('01703376c4a81c0e9d95','BRICK_STATUS');olympe.dm.BrickMetadata.Mc={Sz:'experimental',nB:'stable',Kz:'deprecated'};m=olympe.dm.BrickMetadata.prototype;m.Ex.L=olympe.D.J.F;m.Sd.L=olympe.D.J.F;m.Xe.L=new olympe.D.J(()=>String,[]);m.yw.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.Sr.L=olympe.D.J.V;olympe.dm.Pb=class extends olympe.dm.BrickMetadata{K(){return new olympe.dc.Da(this.T(),[new olympe.dc.Y.Dc(olympe.dm.Pb.F.T(),olympe.dc.Ca.DESTINATION,olympe.dc.Y.pk.up,olympe.dc.Y.pk.tt),olympe.dm.Pb.C])}Xe(){return null}C(){return this.tb(olympe.dm.Pb.F,olympe.dm.Pb)}P(){return this.tb(olympe.dm.Pb.C)}};olympe.dm.Pb.O=olympe.dc.ya.C('01612df1db9749227626',olympe.dm.Pb);olympe.dm.Pb.F=olympe.dm.Pb.O.Ga('016a697ef00ce7554691');olympe.dm.Pb.Fa=P(olympe.dm.Pb.O,olympe.dm.Pb.F);olympe.dm.Pb.C=olympe.dm.Pb.O.Ga('016a697ef00ce7554692');
727
+ olympe.dm.User.SAMLnameIdProp=olympe.dm.User.O.xa('ff023000000000000036');z('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.C=P(olympe.dm.User.O,olympe.dm.cd.C);olympe.dm.User.ba=olympe.dm.User.O.Ga('ff022000000000000002');olympe.dm.User.K=Qc('0163d9653067b6237f62','GUEST_USER');m=olympe.dm.User.prototype;m.Rw.L=olympe.D.J.F;m.na.L=olympe.D.J.F;m.hn.L=olympe.D.J.F;m.Pt.L=olympe.D.J.F;m.Ot.L=olympe.D.J.F;m.ux.L=olympe.D.J.F;m.Ex.L=olympe.D.J.F;
728
+ m.qx.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.ze=class extends olympe.dc.CloudObject{$(){return this.fn()}Wa(){return this.Ab(olympe.dm.ze.Ka)}};olympe.dm.ze.O=olympe.dc.ya.C('01621fb84e3300000000',olympe.dm.ze);olympe.dm.ze.Ka=olympe.dm.ze.O.xa('01609de3f292e3c2c6ff');olympe.dm.ze.prototype.$.L=new olympe.D.J(()=>olympe.D.od,[]);olympe.dm.ze.prototype.Wa.L=olympe.D.J.F;olympe.dm.BrickMetadata=class extends olympe.dm.ze{Gx(){return this.Ab(olympe.dm.BrickMetadata.Wa)}Rd(){return this.Ab(olympe.dm.BrickMetadata.fb)}Ye(){return null}zw(){return this.tb(olympe.sc.Yb.Comment.C.zc(),olympe.sc.Yb.Comment)}Tr(){return this.cn(olympe.dm.BrickMetadata.fc).Pc().Tr()}};olympe.dm.BrickMetadata.O=Uc(olympe.dc.ya.C('01621fb84e3500000000',olympe.dm.BrickMetadata));olympe.dm.BrickMetadata.Wa=olympe.dm.BrickMetadata.O.xa('01621fb84e320000f001');olympe.dm.BrickMetadata.fb=olympe.dm.BrickMetadata.O.xa('01703376c4a81c0e9d94');
729
+ olympe.dm.BrickMetadata.fc=olympe.dm.BrickMetadata.O.Ga('0161ae97622bb21f335b');olympe.dm.BrickMetadata.xb={eB:'private',Eu:'public'};olympe.dm.BrickMetadata.$c=Qc('01703376c4a81c0e9d95','BRICK_STATUS');olympe.dm.BrickMetadata.Mc={Uz:'experimental',pB:'stable',Mz:'deprecated'};m=olympe.dm.BrickMetadata.prototype;m.Gx.L=olympe.D.J.F;m.Rd.L=olympe.D.J.F;m.Ye.L=new olympe.D.J(()=>String,[]);m.zw.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.Tr.L=olympe.D.J.V;olympe.dm.Pb=class extends olympe.dm.BrickMetadata{K(){return new olympe.dc.Da(this.T(),[new olympe.dc.Y.Dc(olympe.dm.Pb.F.T(),olympe.dc.Ca.DESTINATION,olympe.dc.Y.qk.vp,olympe.dc.Y.qk.ut),olympe.dm.Pb.C])}Ye(){return null}C(){return this.tb(olympe.dm.Pb.F,olympe.dm.Pb)}P(){return this.tb(olympe.dm.Pb.C)}};olympe.dm.Pb.O=olympe.dc.ya.C('01612df1db9749227626',olympe.dm.Pb);olympe.dm.Pb.F=olympe.dm.Pb.O.Ga('016a697ef00ce7554691');olympe.dm.Pb.Fa=P(olympe.dm.Pb.O,olympe.dm.Pb.F);olympe.dm.Pb.C=olympe.dm.Pb.O.Ga('016a697ef00ce7554692');
730
730
  P(olympe.dc.CloudObject.O,olympe.dm.Pb.C);olympe.dm.Pb.prototype.K.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Pb.prototype.C.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Pb.prototype.P.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Xc=class extends olympe.dm.Pb{C(){return this.T()===olympe.dm.Xc.qa?this.tb(olympe.dm.Xc.V,olympe.dm.Pb):this.tb(olympe.dm.Xc.$,olympe.dm.Pb)}};olympe.dm.Xc.O=olympe.dc.ya.C('ff021000000000000020',olympe.dm.Xc);olympe.dm.Xc.$=olympe.dm.Xc.O.Ga('017e9c34cf48bd6965c1');olympe.dm.Xc.V=olympe.dm.Xc.O.Ga('017e9c2e013e06bfffd9');olympe.dm.Xc.ie=olympe.dm.Xc.O.Ga('01811f12ad77673770d4');olympe.dm.Xc.qa=Qc('10000000000000000000','ROOT_OF_ROOTS');olympe.dm.Xc.Nc=Qc('10000000000000000001','OLYMPE_FOLDER');
731
- olympe.dm.Xc.prototype.C.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Module=class extends olympe.dc.CloudObject{Nw(){return this.Ab(olympe.dm.Module.$)}$w(){return this.ge(olympe.dm.Module.ba)}Pt(){return this.Ab(olympe.dm.Module.F)}ix(){return this.Ab(olympe.dm.Module.qa)}zw(){return this.Ab(olympe.dm.Module.K)}ax(){return this.tb(olympe.dm.Module.V,olympe.dm.Module)}tx(){return this.tb(olympe.dm.Module.C,olympe.dm.Ed)}};olympe.dm.Module.O=olympe.dc.ya.C('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.$=olympe.dm.Module.O.xa('ff023000000000000042');
731
+ olympe.dm.Xc.prototype.C.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Module=class extends olympe.dc.CloudObject{Pw(){return this.Ab(olympe.dm.Module.$)}bx(){return this.ge(olympe.dm.Module.ba)}Qt(){return this.Ab(olympe.dm.Module.F)}kx(){return this.Ab(olympe.dm.Module.qa)}Aw(){return this.Ab(olympe.dm.Module.K)}ex(){return this.tb(olympe.dm.Module.V,olympe.dm.Module)}vx(){return this.tb(olympe.dm.Module.C,olympe.dm.Dd)}};olympe.dm.Module.O=olympe.dc.ya.C('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.$=olympe.dm.Module.O.xa('ff023000000000000042');
732
732
  olympe.dm.Module.ba=olympe.dm.Module.O.xa('ff023000000000000043');olympe.dm.Module.F=olympe.dm.Module.O.xa('ff023000000000000044');olympe.dm.Module.qa=olympe.dm.Module.O.xa('ff023000000000000045');olympe.dm.Module.K=olympe.dm.Module.O.xa('ff023000000000000046');olympe.dm.Module.creationDateProp=olympe.dm.Module.O.xa('ff023000000000000049');olympe.dm.Module.C=olympe.dm.Module.O.Ga('ff022000000000000013');olympe.dm.Module.V=olympe.dm.Module.O.Ga('ff022000000000000014');
733
- olympe.dm.Module.Fa=Qc('016a69b9bceabd815b77','OLYMPE_SERVER_MODULE');m=olympe.dm.Module.prototype;m.Nw.L=olympe.D.J.F;m.$w.L=olympe.D.J.G;m.Pt.L=olympe.D.J.F;m.ix.L=olympe.D.J.F;m.zw.L=olympe.D.J.F;m.ax.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.tx.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.File=class extends olympe.dc.CloudObject{constructor(a,b,c,d,e){super(a,b);this.F=c;this.G=d;this.C=e}hn(){return this.Ab(olympe.dm.File.mimeTypeProp)}Nk(a,b){const c=olympe.D.Na().F(a),d=b&&olympe.D.Na().F(b);(a=this.db.fb(this,olympe.dm.File.urlProp,!0))&&a.startsWith('blob:')?this.C.F(a,e=>{this.C.G(e,c)},d):Gc(this.F,this,e=>{this.C.G(e,c)},e=>{d&&d(e)})}dn(a,b){this.Nk(c=>{a(Ga(c))},b)}Ok(a,b){const c=olympe.D.Na().F(a);b=b&&olympe.D.Na().F(b);const d=this.db.fb(this,olympe.dm.File.C),
734
- e=this.db.fb(this,olympe.dm.File.urlProp),f=g=>{const h=this.db.fb(this,olympe.dm.File.mimeTypeProp);this.C.G(g,k=>{c(`data:${h};base64,${this.C.C(k)}`)})};d&&d.valueOf()?Gc(this.F,this,f.bind(this),b):e&&e.startsWith('blob:')?this.C.F(e,f.bind(this),b):a(e)}rename(a,b){const c=b&&olympe.D.Na().F(b);olympe.D.es([a],d=>{const e=new olympe.dc.Transaction;e.update(this,olympe.dc.CloudObject.nameProp,d);e.update(this,olympe.dm.File.nameProp,d);e.kb(f=>{c&&c(f)})})}Iy(){this.G.P(this.db.fb(this,olympe.dm.File.mimeTypeProp))}Tl(){return this.Ab(olympe.dm.File.urlProp)}Ap(){return this.Ab(olympe.dm.File.nameProp)}Cw(){return this.mj(olympe.dm.File.creationDateProp)}Zw(){return this.mj(olympe.dm.File.modificationDateProp)}Xr(){return this.Ig(olympe.dm.File.C)}static Yv(a,
735
- b,c,d,e,f){d=d||'application/data';c=olympe.X.fi().K(new Blob([c],{type:d}));return olympe.dm.File.Er(a,b,c,d,e,f)}static Er(a,b,c,d,e,f){const g=olympe.D.jb.now();b=(new Map).set(olympe.dm.File.nameProp,b||'file').set(olympe.dm.File.urlProp,c).set(olympe.dm.File.creationDateProp,g).set(olympe.dm.File.modificationDateProp,g).set(olympe.dm.File.mimeTypeProp,d||'application/data').set(olympe.dm.File.C,!1);return a.create(olympe.dm.File,b,e||olympe.dc.Ia.lc,f)}};olympe.dm.File.createFromURL=olympe.dm.File.Er;
736
- olympe.dm.File.createFromContent=olympe.dm.File.Yv;olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.Iy;olympe.dm.File.prototype.getContentUrl=olympe.dm.File.prototype.Ok;olympe.dm.File.prototype.getContentAsString=olympe.dm.File.prototype.dn;olympe.dm.File.prototype.getContentAsBinary=olympe.dm.File.prototype.Nk;olympe.dm.File.O=olympe.dc.ya.C('ff021000000000000030',olympe.dm.File,olympe.dc.R.Ai,olympe.net.R.Aa,olympe.X.R.Ah);olympe.dm.File.nameProp=olympe.dm.File.O.xa('ff023000000000000050');
733
+ olympe.dm.Module.Fa=Qc('016a69b9bceabd815b77','OLYMPE_SERVER_MODULE');m=olympe.dm.Module.prototype;m.Pw.L=olympe.D.J.F;m.bx.L=olympe.D.J.G;m.Qt.L=olympe.D.J.F;m.kx.L=olympe.D.J.F;m.Aw.L=olympe.D.J.F;m.ex.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.vx.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.File=class extends olympe.dc.CloudObject{constructor(a,b,c,d,e){super(a,b);this.F=c;this.G=d;this.C=e}jn(){return this.Ab(olympe.dm.File.mimeTypeProp)}Ok(a,b){const c=olympe.D.Na().F(a),d=b&&olympe.D.Na().F(b);(a=this.db.eb(this,olympe.dm.File.urlProp,!0))&&a.startsWith('blob:')?this.C.F(a,e=>{this.C.G(e,c)},d):Gc(this.F,this,e=>{this.C.G(e,c)},e=>{d&&d(e)})}en(a,b){this.Ok(c=>{a(Ga(c))},b)}Pk(a,b){const c=olympe.D.Na().F(a);b=b&&olympe.D.Na().F(b);const d=this.db.eb(this,olympe.dm.File.C),
734
+ e=this.db.eb(this,olympe.dm.File.urlProp),f=g=>{const h=this.db.eb(this,olympe.dm.File.mimeTypeProp);this.C.G(g,k=>{c(`data:${h};base64,${this.C.C(k)}`)})};d&&d.valueOf()?Gc(this.F,this,f.bind(this),b):e&&e.startsWith('blob:')?this.C.F(e,f.bind(this),b):a(e)}rename(a,b){const c=b&&olympe.D.Na().F(b);olympe.D.gs([a],d=>{const e=new olympe.dc.Transaction;e.update(this,olympe.dc.CloudObject.nameProp,d);e.update(this,olympe.dm.File.nameProp,d);e.kb(f=>{c&&c(f)})})}Ky(){this.G.P(this.db.eb(this,olympe.dm.File.mimeTypeProp))}Ul(){return this.Ab(olympe.dm.File.urlProp)}Bp(){return this.Ab(olympe.dm.File.nameProp)}Ew(){return this.nj(olympe.dm.File.creationDateProp)}ax(){return this.nj(olympe.dm.File.modificationDateProp)}Yr(){return this.Fg(olympe.dm.File.C)}static Zv(a,
735
+ b,c,d,e,f){d=d||'application/data';c=olympe.X.ei().K(new Blob([c],{type:d}));return olympe.dm.File.Fr(a,b,c,d,e,f)}static Fr(a,b,c,d,e,f){const g=olympe.D.jb.now();b=(new Map).set(olympe.dm.File.nameProp,b||'file').set(olympe.dm.File.urlProp,c).set(olympe.dm.File.creationDateProp,g).set(olympe.dm.File.modificationDateProp,g).set(olympe.dm.File.mimeTypeProp,d||'application/data').set(olympe.dm.File.C,!1);return a.create(olympe.dm.File,b,e||olympe.dc.Ia.kc,f)}};olympe.dm.File.createFromURL=olympe.dm.File.Fr;
736
+ olympe.dm.File.createFromContent=olympe.dm.File.Zv;olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.Ky;olympe.dm.File.prototype.getContentUrl=olympe.dm.File.prototype.Pk;olympe.dm.File.prototype.getContentAsString=olympe.dm.File.prototype.en;olympe.dm.File.prototype.getContentAsBinary=olympe.dm.File.prototype.Ok;olympe.dm.File.O=olympe.dc.ya.C('ff021000000000000030',olympe.dm.File,olympe.dc.R.zi,olympe.net.R.Aa,olympe.X.R.Ah);olympe.dm.File.nameProp=olympe.dm.File.O.xa('ff023000000000000050');
737
737
  z('olympe.dm.File.nameProp',olympe.dm.File.nameProp);olympe.dm.File.creationDateProp=olympe.dm.File.O.xa('ff023000000000000051');z('olympe.dm.File.creationDateProp',olympe.dm.File.creationDateProp);olympe.dm.File.modificationDateProp=olympe.dm.File.O.xa('ff023000000000000055');z('olympe.dm.File.modificationDateProp',olympe.dm.File.modificationDateProp);olympe.dm.File.mimeTypeProp=olympe.dm.File.O.xa('ff023000000000000052');z('olympe.dm.File.mimeTypeProp',olympe.dm.File.mimeTypeProp);
738
- olympe.dm.File.urlProp=olympe.dm.File.O.xa('ff023000000000000053');z('olympe.dm.File.urlProp',olympe.dm.File.urlProp);olympe.dm.File.C=olympe.dm.File.O.xa('ff023000000000000054');olympe.dm.File.V='application/data';olympe.dm.File.ma=[olympe.D.File];m=olympe.dm.File.prototype;m.hn.L=olympe.D.J.F;m.Nk.L=new olympe.D.J(()=>{},[]);m.dn.L=new olympe.D.J(()=>{},[]);m.Ok.L=new olympe.D.J(()=>{},[]);m.rename.L=olympe.D.J.C;m.Tl.L=olympe.D.J.F;m.Ap.L=olympe.D.J.F;m.Cw.L=new olympe.D.J(()=>olympe.D.jb,[]);
739
- m.Zw.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Xr.L=olympe.D.J.P;olympe.dm.Ed=class extends olympe.dc.CloudObject{C(){return this.Ab(olympe.dm.Ed.F)}G(){return this.ge(olympe.dm.Ed.K)}F(){return this.tb(olympe.dm.Ed.C,olympe.dm.Module)}};olympe.dm.Ed.O=olympe.dc.ya.C('ff021000000000000041',olympe.dm.Ed);olympe.dm.Ed.F=olympe.dm.Ed.O.xa('ff023000000000000047');olympe.dm.Ed.K=olympe.dm.Ed.O.xa('ff023000000000000048');olympe.dm.Ed.C=olympe.dm.Module.C.zc();olympe.dm.Ed.prototype.C.L=olympe.D.J.F;olympe.dm.Ed.prototype.G.L=olympe.D.J.G;
740
- olympe.dm.Ed.prototype.F.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Nb=class extends olympe.dm.Xc{C(){return this.tb(olympe.dm.Pb.F,olympe.dm.Pb)}G(){return this.Ab(olympe.dm.Nb.ba)}V(){return this.Ab(olympe.dm.Nb.uc)}F(){return this.tb(olympe.dm.Nb.K,olympe.dm.Nb)}};olympe.dm.Nb.O=olympe.dc.ya.C('0163d9594700fcf61e54',olympe.dm.Nb);olympe.dm.Nb.ba=olympe.dm.Nb.O.xa('017869c7d2833c9492c1');olympe.dm.Nb.uc=olympe.dm.Nb.O.xa('017869c80bb9929c76d0');olympe.dm.Nb.K=olympe.dm.Nb.O.Ga('ff02200000000000002b');olympe.dm.Nb.Nd=P(olympe.dm.Nb.O,olympe.dm.Nb.K);
741
- olympe.dm.Nb.hc=olympe.dm.Nb.O.Ga('ff02200000000000002a');olympe.dm.Nb.Md=olympe.dm.Nb.O.Ga('017e9c412e2b944bd590');olympe.dm.Nb.uh=olympe.dm.Nb.O.Ga('017e9c416872a89d3415');olympe.dm.Nb.Ye=olympe.dm.Nb.O.Ga('017ebf8fe5c506662098');P(olympe.dc.CloudObject.O,olympe.dm.Nb.hc);olympe.dm.Nb.qd=Qc('100000000000000000dd','PRIMORDIAL');olympe.dm.Nb.prototype.C.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Nb.prototype.G.L=olympe.D.J.F;olympe.dm.Nb.prototype.V.L=olympe.D.J.F;
742
- olympe.dm.Nb.prototype.F.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Property=class extends olympe.dc.CloudObject{F(){return this.pc(olympe.dm.Property.definingModelRel,olympe.dc.CloudObject)}C(){return this.pc(olympe.dm.Property.typeRel,olympe.dc.CloudObject)}Tc(){return this.F().na().Cr(this.na())}};olympe.dm.Property.O=olympe.dc.ya.C('ff021000000000000005',olympe.dm.Property);olympe.dm.Property.definingModelRel=P(olympe.dm.Property.O,olympe.dc.CloudObject.propertyRel);z('olympe.dm.Property.definingModelRel',olympe.dm.Property.definingModelRel);
743
- olympe.dm.Property.typeRel=P(olympe.dm.Property.O,olympe.dc.CloudObject.typeRel);z('olympe.dm.Property.typeRel',olympe.dm.Property.typeRel);olympe.dm.Property.prototype.F.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.C.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Relation=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Ww(){return olympe.D.$a.EMPTY}vw(){return this.ge(olympe.dm.Relation.Om)}jx(){return this.ge(olympe.dm.Relation.wn)}Lr(){return this.tb(olympe.dm.Relation.destinationModelRel,olympe.dc.CloudObject).Rc()}Rr(){return this.tb(olympe.dm.Relation.originModelRel,olympe.dc.CloudObject).Rc()}Tc(){return this.Rr().na().concat(['-',this.na(),'->',this.Lr().na()])}};olympe.dm.Relation.O=olympe.dc.ya.C('ff021000000000000006',olympe.dm.Relation);
744
- olympe.dm.Relation.wn=olympe.dm.Relation.O.xa('ff023000000000000030');olympe.dm.Relation.Om=olympe.dm.Relation.O.xa('ff023000000000000034');olympe.dm.Relation.Wm=olympe.dm.Relation.O.xa('ff023000000000000037');olympe.dm.Relation.Vm=olympe.dm.Relation.O.xa('ff023000000000000137');olympe.dm.Relation.An=olympe.dm.Relation.O.xa('ff023000000000000237');olympe.dm.Relation.Dn=olympe.dm.Relation.O.xa('ff023000000000000337');olympe.dm.Relation.xr=olympe.dm.Relation.O.xa('ff023000000000000031');
745
- olympe.dm.Relation.originModelRel=P(olympe.dm.Relation.O,olympe.dc.CloudObject.G);z('olympe.dm.Relation.originModelRel',olympe.dm.Relation.originModelRel);olympe.dm.Relation.destinationModelRel=P(olympe.dm.Relation.O,olympe.dc.CloudObject.la);z('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dc.Qb={NONE:null,Nz:olympe.dm.Relation.Wm.T(),Cc:olympe.dm.Relation.Vm.T(),zf:olympe.dm.Relation.An.T(),mB:olympe.dm.Relation.Dn.T()};
746
- olympe.dc.Qb.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Qb))if(c===a)return b;return null};olympe.dm.Relation.C={Pl:0,ql:5,yq:1,Tu:4,Ak:2,nk:8,Ho:10,Pu:6,Qu:9,lc:6,Su:9};olympe.dm.Relation.F={su:3,em:4,ku:5,$l:6};olympe.dm.Relation.K=olympe.dm.Jc.fq+olympe.dm.Jc.Ao;m=olympe.dm.Relation.prototype;m.Ww.L=olympe.D.J.F;m.vw.L=olympe.D.J.G;m.jx.L=olympe.D.J.G;m.Lr.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Rr.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.xf=class extends olympe.dc.CloudObject{getValue(){}};olympe.dm.xf.O=olympe.dc.ya.C('ff021000000000000019',olympe.dm.xf);olympe.dm.String=class extends olympe.dm.xf{getValue(){return this.Ab(olympe.dm.String.valueProp)}toString(){return this.get(olympe.dm.String.valueProp)}};olympe.dm.String.O=olympe.dc.ya.C('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.O.xa('ff023000000000000026');z('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.getValue.L=olympe.D.J.F;olympe.dm.String.prototype.toString.L=olympe.D.J.C;olympe.dm.Boolean=class extends olympe.dm.xf{getValue(){return this.Ig(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.O=olympe.dc.ya.C('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.O.xa('ff023000000000000027');z('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.getValue.L=olympe.D.J.P;olympe.dm.Color=class extends olympe.dm.xf{getValue(){return this.Tr()}};olympe.dm.Color.O=olympe.dc.ya.C('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.O.xa('ff023000000000000032');z('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.getValue.L=new olympe.D.J(()=>olympe.D.Color,[]);olympe.dm.DateTime=class extends olympe.dm.xf{getValue(){return this.mj(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.O=olympe.dc.ya.C('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.O.xa('ff023000000000000029');z('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.getValue.L=new olympe.D.J(()=>olympe.D.jb,[]);olympe.dm.Enum=class extends olympe.dm.String{na(){return olympe.D.Ha([super.na(),super.getValue()],(a,b)=>''!==a.valueOf()?a:b,olympe.D.$a)}he(){return this.ge(olympe.dm.Enum.rankProp)}static create(a,b,c,d,e){const f=olympe.dc.La();e=void 0!==e?e:f.Gb(b)&&f.fe(b).length||0;c=(new Map).set(olympe.dm.String.valueProp,c).set(olympe.dc.CloudObject.nameProp,d||c).set(olympe.dm.Enum.rankProp,e);return a.create(b,c)}};olympe.dm.Enum.create=olympe.dm.Enum.create;
747
- olympe.dm.Enum.O=olympe.dc.ya.C('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.O.xa('017a7690c915975ea995');olympe.dm.Enum.prototype.he.L=olympe.D.J.G;olympe.dm.ng=class extends olympe.dm.BrickMetadata{Bx(){return this.ub(olympe.dc.CloudObject.instancesRel).il(olympe.dm.Enum.rankProp,olympe.dc.ea.ik.ASC).Pc()}static create(a,b){b=a.create(olympe.dm.ng,(new Map).set(olympe.dc.CloudObject.nameProp,b));a.Va(olympe.dc.CloudObject.extendRel,b,olympe.dm.Enum);return b}};olympe.dm.ng.create=olympe.dm.ng.create;olympe.dm.ng.prototype.getValues=olympe.dm.ng.prototype.Bx;olympe.dm.ng.O=olympe.dc.ya.C('017a768f966fc08ebb98',olympe.dm.ng);olympe.dm.Number=class extends olympe.dm.xf{getValue(){return this.ge(olympe.dm.Number.valueProp)}};olympe.dm.Number.O=olympe.dc.ya.C('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.O.xa('ff023000000000000028');z('olympe.dm.Number.valueProp',olympe.dm.Number.valueProp);olympe.dm.Number.prototype.getValue.L=olympe.D.J.G;olympe.bb={};olympe.bb.hh=class{constructor(a){this.N=a;this.V=new olympe.D.$b(`${this.Z()} source context`);this.P=this.C=null}Z(){}K(){}close(){this.P&&this.P(this.Z(),olympe.dc.vk.yt);this.V.destroy()}};function th(a){olympe.D.wc([vc(a.la)],b=>{if(b.valueOf()){const c=a.G.keys();uh(a,d=>{if(d)a.N.error('An error occurred while auto synchronising:\n'+d.message);else if(a.N.debug('Auto synchronise transactions successfully'),a.$)for(const e of c)$b(a.F,f=>{a.N.error(`Could not clear transactions for ${e}: ${f}.`)})})}})}
738
+ olympe.dm.File.urlProp=olympe.dm.File.O.xa('ff023000000000000053');z('olympe.dm.File.urlProp',olympe.dm.File.urlProp);olympe.dm.File.C=olympe.dm.File.O.xa('ff023000000000000054');olympe.dm.File.V='application/data';olympe.dm.File.ma=[olympe.D.File];m=olympe.dm.File.prototype;m.jn.L=olympe.D.J.F;m.Ok.L=new olympe.D.J(()=>{},[]);m.en.L=new olympe.D.J(()=>{},[]);m.Pk.L=new olympe.D.J(()=>{},[]);m.rename.L=olympe.D.J.C;m.Ul.L=olympe.D.J.F;m.Bp.L=olympe.D.J.F;m.Ew.L=new olympe.D.J(()=>olympe.D.jb,[]);
739
+ m.ax.L=new olympe.D.J(()=>olympe.D.jb,[]);m.Yr.L=olympe.D.J.P;olympe.dm.Dd=class extends olympe.dc.CloudObject{C(){return this.Ab(olympe.dm.Dd.F)}G(){return this.ge(olympe.dm.Dd.K)}F(){return this.tb(olympe.dm.Dd.C,olympe.dm.Module)}};olympe.dm.Dd.O=olympe.dc.ya.C('ff021000000000000041',olympe.dm.Dd);olympe.dm.Dd.F=olympe.dm.Dd.O.xa('ff023000000000000047');olympe.dm.Dd.K=olympe.dm.Dd.O.xa('ff023000000000000048');olympe.dm.Dd.C=olympe.dm.Module.C.zc();olympe.dm.Dd.prototype.C.L=olympe.D.J.F;olympe.dm.Dd.prototype.G.L=olympe.D.J.G;
740
+ olympe.dm.Dd.prototype.F.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Nb=class extends olympe.dm.Xc{C(){return this.tb(olympe.dm.Pb.F,olympe.dm.Pb)}G(){return this.Ab(olympe.dm.Nb.ba)}V(){return this.Ab(olympe.dm.Nb.uc)}F(){return this.tb(olympe.dm.Nb.K,olympe.dm.Nb)}};olympe.dm.Nb.O=olympe.dc.ya.C('0163d9594700fcf61e54',olympe.dm.Nb);olympe.dm.Nb.ba=olympe.dm.Nb.O.xa('017869c7d2833c9492c1');olympe.dm.Nb.uc=olympe.dm.Nb.O.xa('017869c80bb9929c76d0');olympe.dm.Nb.K=olympe.dm.Nb.O.Ga('ff02200000000000002b');olympe.dm.Nb.de=P(olympe.dm.Nb.O,olympe.dm.Nb.K);
741
+ olympe.dm.Nb.mc=olympe.dm.Nb.O.Ga('ff02200000000000002a');olympe.dm.Nb.Md=olympe.dm.Nb.O.Ga('017e9c412e2b944bd590');olympe.dm.Nb.uh=olympe.dm.Nb.O.Ga('017e9c416872a89d3415');olympe.dm.Nb.sh=olympe.dm.Nb.O.Ga('017ebf8fe5c506662098');P(olympe.dc.CloudObject.O,olympe.dm.Nb.mc);olympe.dm.Nb.qd=Qc('100000000000000000dd','PRIMORDIAL');olympe.dm.Nb.prototype.C.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Nb.prototype.G.L=olympe.D.J.F;olympe.dm.Nb.prototype.V.L=olympe.D.J.F;
742
+ olympe.dm.Nb.prototype.F.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.dm.Property=class extends olympe.dc.CloudObject{F(){return this.oc(olympe.dm.Property.definingModelRel,olympe.dc.CloudObject)}C(){return this.oc(olympe.dm.Property.typeRel,olympe.dc.CloudObject)}Tc(){return this.F().na().Dr(this.na())}};olympe.dm.Property.O=olympe.dc.ya.C('ff021000000000000005',olympe.dm.Property);olympe.dm.Property.definingModelRel=P(olympe.dm.Property.O,olympe.dc.CloudObject.propertyRel);z('olympe.dm.Property.definingModelRel',olympe.dm.Property.definingModelRel);
743
+ olympe.dm.Property.typeRel=P(olympe.dm.Property.O,olympe.dc.CloudObject.typeRel);z('olympe.dm.Property.typeRel',olympe.dm.Property.typeRel);olympe.dm.Property.prototype.F.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.C.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Relation=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Yw(){return olympe.D.$a.EMPTY}ww(){return this.ge(olympe.dm.Relation.Pm)}lx(){return this.ge(olympe.dm.Relation.xn)}Mr(){return this.tb(olympe.dm.Relation.destinationModelRel,olympe.dc.CloudObject).Rc()}Sr(){return this.tb(olympe.dm.Relation.originModelRel,olympe.dc.CloudObject).Rc()}Tc(){return this.Sr().na().concat(['-',this.na(),'->',this.Mr().na()])}};olympe.dm.Relation.O=olympe.dc.ya.C('ff021000000000000006',olympe.dm.Relation);
744
+ olympe.dm.Relation.xn=olympe.dm.Relation.O.xa('ff023000000000000030');olympe.dm.Relation.Pm=olympe.dm.Relation.O.xa('ff023000000000000034');olympe.dm.Relation.Xm=olympe.dm.Relation.O.xa('ff023000000000000037');olympe.dm.Relation.Wm=olympe.dm.Relation.O.xa('ff023000000000000137');olympe.dm.Relation.Bn=olympe.dm.Relation.O.xa('ff023000000000000237');olympe.dm.Relation.En=olympe.dm.Relation.O.xa('ff023000000000000337');olympe.dm.Relation.yr=olympe.dm.Relation.O.xa('ff023000000000000031');
745
+ olympe.dm.Relation.originModelRel=P(olympe.dm.Relation.O,olympe.dc.CloudObject.G);z('olympe.dm.Relation.originModelRel',olympe.dm.Relation.originModelRel);olympe.dm.Relation.destinationModelRel=P(olympe.dm.Relation.O,olympe.dc.CloudObject.la);z('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dc.Qb={NONE:null,Pz:olympe.dm.Relation.Xm.T(),Cc:olympe.dm.Relation.Wm.T(),xf:olympe.dm.Relation.Bn.T(),oB:olympe.dm.Relation.En.T()};
746
+ olympe.dc.Qb.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Qb))if(c===a)return b;return null};olympe.dm.Relation.C={Ql:0,rl:5,zq:1,Uu:4,Bk:2,pk:8,Io:10,Qu:6,Ru:9,kc:6,Tu:9};olympe.dm.Relation.F={tu:3,fm:4,lu:5,am:6};olympe.dm.Relation.K=olympe.dm.Jc.gq+olympe.dm.Jc.Bo;m=olympe.dm.Relation.prototype;m.Yw.L=olympe.D.J.F;m.ww.L=olympe.D.J.G;m.lx.L=olympe.D.J.G;m.Mr.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Sr.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Oe=class extends olympe.dc.CloudObject{getValue(){}};olympe.dm.Oe.O=olympe.dc.ya.C('ff021000000000000019',olympe.dm.Oe);olympe.dm.String=class extends olympe.dm.Oe{getValue(){return this.Ab(olympe.dm.String.valueProp)}toString(){return this.get(olympe.dm.String.valueProp)}};olympe.dm.String.O=olympe.dc.ya.C('ff021000000000000011',olympe.dm.String);olympe.dm.String.valueProp=olympe.dm.String.O.xa('ff023000000000000026');z('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.getValue.L=olympe.D.J.F;olympe.dm.String.prototype.toString.L=olympe.D.J.C;olympe.dm.Boolean=class extends olympe.dm.Oe{getValue(){return this.Fg(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.O=olympe.dc.ya.C('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.O.xa('ff023000000000000027');z('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.getValue.L=olympe.D.J.P;olympe.dm.Color=class extends olympe.dm.Oe{getValue(){return this.Ur()}};olympe.dm.Color.O=olympe.dc.ya.C('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.O.xa('ff023000000000000032');z('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.getValue.L=new olympe.D.J(()=>olympe.D.Color,[]);olympe.dm.DateTime=class extends olympe.dm.Oe{getValue(){return this.nj(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.O=olympe.dc.ya.C('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.O.xa('ff023000000000000029');z('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.getValue.L=new olympe.D.J(()=>olympe.D.jb,[]);olympe.dm.Enum=class extends olympe.dm.String{na(){return olympe.D.Ha([super.na(),super.getValue()],(a,b)=>''!==a.valueOf()?a:b,olympe.D.$a)}he(){return this.ge(olympe.dm.Enum.rankProp)}static create(a,b,c,d,e){const f=olympe.dc.La();e=void 0!==e?e:f.Gb(b)&&f.fe(b).length||0;c=(new Map).set(olympe.dm.String.valueProp,c).set(olympe.dc.CloudObject.nameProp,d||c).set(olympe.dm.Enum.rankProp,e);return a.create(b,c)}};olympe.dm.Enum.create=olympe.dm.Enum.create;
747
+ olympe.dm.Enum.O=olympe.dc.ya.C('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.O.xa('017a7690c915975ea995');olympe.dm.Enum.prototype.he.L=olympe.D.J.G;olympe.dm.kg=class extends olympe.dm.BrickMetadata{Dx(){return this.ub(olympe.dc.CloudObject.instancesRel).jl(olympe.dm.Enum.rankProp,olympe.dc.ea.jk.ASC).Pc()}static create(a,b){b=a.create(olympe.dm.kg,(new Map).set(olympe.dc.CloudObject.nameProp,b));a.Va(olympe.dc.CloudObject.extendRel,b,olympe.dm.Enum);return b}};olympe.dm.kg.create=olympe.dm.kg.create;olympe.dm.kg.prototype.getValues=olympe.dm.kg.prototype.Dx;olympe.dm.kg.O=olympe.dc.ya.C('017a768f966fc08ebb98',olympe.dm.kg);olympe.dm.Number=class extends olympe.dm.Oe{getValue(){return this.ge(olympe.dm.Number.valueProp)}};olympe.dm.Number.O=olympe.dc.ya.C('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.O.xa('ff023000000000000028');z('olympe.dm.Number.valueProp',olympe.dm.Number.valueProp);olympe.dm.Number.prototype.getValue.L=olympe.D.J.G;olympe.bb={};olympe.bb.gh=class{constructor(a){this.N=a;this.V=new olympe.D.Xb(`${this.Z()} source context`);this.P=this.C=null}Z(){}K(){}close(){this.P&&this.P(this.Z(),olympe.dc.wk.zt);this.V.destroy()}};function th(a){olympe.D.wc([vc(a.la)],b=>{if(b.valueOf()){const c=a.G.keys();uh(a,d=>{if(d)a.N.error('An error occurred while auto synchronising:\n'+d.message);else if(a.N.debug('Auto synchronise transactions successfully'),a.$)for(const e of c)$b(a.F,f=>{a.N.error(`Could not clear transactions for ${e}: ${f}.`)})})}})}
748
748
  function vh(a){let b;olympe.D.wc([vc(a.la)],c=>{c.valueOf()?(a.$=!1,b&&(lc(b),b=null)):(a.$=!0,b=kc(()=>{if(a.ba){a.ba=!1;for(const d of a.G.keys())Yb(a.F,d,a.G.get(d),()=>{},e=>{a.N.error(`Could persist transaction for ${d}: ${e}`)})}},5E3))})}
749
- function uh(a,b){const c=olympe.async.uk.create(),d=c.G;c.add((e,f)=>{a.F.storage.K(f)});c.add((e,f,g)=>{const h=olympe.dc.Ia.rb,k=g.get('files'),l=new olympe.async.ug(d);a.G.forEach((n,p)=>{if(p!==h){const q=a.qa.P(p);null!==q?(l.add(a.Fa.bind(a,n,q,k)),a.F.storage.C()):f(`The source: ${p} is not reachable.`)}});Vb(l,(n,p)=>{n?e():f(p||void 0)});l.start()});Vb(c,(e,f)=>{b(e?null:Error(f));e&&(a.ba=!1,a.G.clear())});c.start()}
750
- function wh(a,b){const c=new olympe.async.uk(olympe.D.Na());c.add((d,e)=>{Zb(a.F,f=>null===f?d():e(f))});c.add(d=>{const e=olympe.dc.yd();a.G.forEach((f,g)=>{const h=Array.from(f.fe()).map(k=>k.tag());Vc(e,olympe.D.Na(),f,h,[],g)(!0)});d()});Vb(c,(d,e)=>{b(e?Error(e):null)});c.start()}
751
- olympe.bb.Ki=class extends olympe.bb.hh{constructor(a,b,c,d,e){super(a);this.G=new Map;this.la=c;this.F=d;this.qa=b;this.ba=this.$=!1;e.get('syncTimeout');e.get('autoSync')&&th(this);e.get('autoPersist')&&vh(this)}Fa(a,b,c,d,e){const f=olympe.dc.ha.ja.zk,g=olympe.dc.ha.ja.yl,h=new olympe.dc.db.xc,k=new olympe.async.ug(olympe.D.Na()),l=(n,p,q)=>{const r=n.tag(),t=n.fb(olympe.dm.File.mimeTypeProp.T());bc(this.F,u=>{Dc(olympe.dc.Ow(),r,u,t,v=>{n.xa(olympe.dm.File.urlProp.T(),v);const w=new Map;w.set(olympe.dm.File.urlProp.T(),
752
- v);h.rc(r,w);this.F.storage.C(q)})})};for(const n of c)(c=a.Rf(n))&&c.ue()&&k.add(l.bind(this,c));Vb(k,(n,p)=>{n?(n=M(new olympe.dc.ha(f,a,[b.Z()]),q=>{q?e(q.message):(this.C(b.Z(),g,h),q=Array.from(a.fe()).map(r=>r.tag()),olympe.dc.yd().persist(q),d())}),b.K(n)):e(`Transaction synchronisation failed! ${p?p:''}`)});k.start()}Z(){return olympe.dc.Ia.rb}K(a){var b=olympe.dc.ha.ja.jh,c=olympe.dc.ha.ja.Bh;const d=olympe.dc.ha.ja.Ci,e=olympe.dc.ha.ja.Bi,f=olympe.dc.ha.ja.Xg,g=olympe.dc.ha.ja.Il,h=olympe.dc.ha.ja.Vh,
753
- k=olympe.dc.ha.ja.xi,l=olympe.dc.ha.ja.Ch;var n=olympe.dc.ha.ja.Rj;const p=a.type;switch(p){case f:a.validate(null);this.F.storage.F();wh(this,v=>{null!==v&&this.N.error(`Could not load transactions: ${v.message}`)});break;case b:case c:const q=a.content;a.C.forEach(v=>{let w=this.G.get(v);void 0===w&&(w=new olympe.dc.db.xc,this.G.set(v,w));q.Oc(w);this.$&&(this.ba=!0)});a.validate(null);a=olympe.dc.transaction.yg.C.Wp;this.C(olympe.dc.Ia.rb,n,{id:q.Z(),finalize:a});break;case e:case d:const r=a.C[0],
754
- t=a.content;a.validate(null);Xb(this.F,t.Z(),v=>{this.N.warn('No graphresult for subscription : '+t.Z(),v,'\n',t.sh.toJSON());this.N.warn();this.C(r,g,new olympe.dc.query.Ei(t.Z(),r,olympe.dc.Ia.rb,new olympe.dc.db.xc))});break;case h:case l:case k:n=a.content;b=n.file;const u=n.$e;c=n.ve;p===h?ac(this.F,b,n.content,n.mimeType,u,c):p===l?bc(this.F,v=>{u(v)}):this.F.storage.C(c);a.validate(null)}}};olympe.bb.Ki.C='context';const xh=olympe.dc.ha.ja.pm,yh=olympe.dc.ha.ja.rm,zh=olympe.dc.ha.ja.QUERY_RESULT,Ah=olympe.dc.ha.ja.qm,Bh=olympe.dc.ha.ja.jh,Ch=olympe.dc.ha.ja.zk,Dh=olympe.dc.ha.ja.Rj,Eh=olympe.dc.ha.ja.Bh,Fh=olympe.dc.ha.ja.Ij,Gh=olympe.dc.ha.ja.rl,Hh=olympe.dc.ha.ja.Vh,Ih=olympe.dc.ha.ja.Ch,Jh=olympe.dc.ha.ja.xi,Kh=olympe.dc.ha.ja.rg;
749
+ function uh(a,b){const c=olympe.async.vk.create(),d=c.G;c.add((e,f)=>{a.F.storage.K(f)});c.add((e,f,g)=>{const h=olympe.dc.Ia.rb,k=g.get('files'),l=new olympe.async.rg(d);a.G.forEach((n,p)=>{if(p!==h){const q=a.qa.P(p);null!==q?(l.add(a.Fa.bind(a,n,q,k)),a.F.storage.C()):f(`The source: ${p} is not reachable.`)}});Vb(l,(n,p)=>{n?e():f(p||void 0)});l.start()});Vb(c,(e,f)=>{b(e?null:Error(f));e&&(a.ba=!1,a.G.clear())});c.start()}
750
+ function wh(a,b){const c=new olympe.async.vk(olympe.D.Na());c.add((d,e)=>{Zb(a.F,f=>null===f?d():e(f))});c.add(d=>{const e=olympe.dc.xd();a.G.forEach((f,g)=>{const h=Array.from(f.fe()).map(k=>k.tag());Vc(e,olympe.D.Na(),f,h,[],g)(!0)});d()});Vb(c,(d,e)=>{b(e?Error(e):null)});c.start()}
751
+ olympe.bb.Ki=class extends olympe.bb.gh{constructor(a,b,c,d,e){super(a);this.G=new Map;this.la=c;this.F=d;this.qa=b;this.ba=this.$=!1;e.get('syncTimeout');e.get('autoSync')&&th(this);e.get('autoPersist')&&vh(this)}Fa(a,b,c,d,e){const f=olympe.dc.ha.ja.Ak,g=olympe.dc.ha.ja.zl,h=new olympe.dc.db.xc,k=new olympe.async.rg(olympe.D.Na()),l=(n,p,q)=>{const r=n.tag(),t=n.eb(olympe.dm.File.mimeTypeProp.T());bc(this.F,u=>{Dc(olympe.dc.Qw(),r,u,t,v=>{n.xa(olympe.dm.File.urlProp.T(),v);const w=new Map;w.set(olympe.dm.File.urlProp.T(),
752
+ v);h.qc(r,w);this.F.storage.C(q)})})};for(const n of c)(c=a.Pf(n))&&c.ue()&&k.add(l.bind(this,c));Vb(k,(n,p)=>{n?(n=M(new olympe.dc.ha(f,a,[b.Z()]),q=>{q?e(q.message):(this.C(b.Z(),g,h),q=Array.from(a.fe()).map(r=>r.tag()),olympe.dc.xd().persist(q),d())}),b.K(n)):e(`Transaction synchronisation failed! ${p?p:''}`)});k.start()}Z(){return olympe.dc.Ia.rb}K(a){var b=olympe.dc.ha.ja.ih,c=olympe.dc.ha.ja.Bh;const d=olympe.dc.ha.ja.Bi,e=olympe.dc.ha.ja.Ai,f=olympe.dc.ha.ja.Wg,g=olympe.dc.ha.ja.Jl,h=olympe.dc.ha.ja.Uh,
753
+ k=olympe.dc.ha.ja.wi,l=olympe.dc.ha.ja.Ch;var n=olympe.dc.ha.ja.Sj;const p=a.type;switch(p){case f:a.validate(null);this.F.storage.F();wh(this,v=>{null!==v&&this.N.error(`Could not load transactions: ${v.message}`)});break;case b:case c:const q=a.content;a.C.forEach(v=>{let w=this.G.get(v);void 0===w&&(w=new olympe.dc.db.xc,this.G.set(v,w));q.Oc(w);this.$&&(this.ba=!0)});a.validate(null);a=olympe.dc.transaction.vg.C.Xp;this.C(olympe.dc.Ia.rb,n,{id:q.Z(),finalize:a});break;case e:case d:const r=a.C[0],
754
+ t=a.content;a.validate(null);Xb(this.F,t.Z(),v=>{this.N.warn('No graphresult for subscription : '+t.Z(),v,'\n',t.rh.toJSON());this.N.warn();this.C(r,g,new olympe.dc.query.Di(t.Z(),r,olympe.dc.Ia.rb,new olympe.dc.db.xc))});break;case h:case l:case k:n=a.content;b=n.file;const u=n.Ze;c=n.ve;p===h?ac(this.F,b,n.content,n.mimeType,u,c):p===l?bc(this.F,v=>{u(v)}):this.F.storage.C(c);a.validate(null)}}};olympe.bb.Ki.C='context';const xh=olympe.dc.ha.ja.qm,yh=olympe.dc.ha.ja.sm,zh=olympe.dc.ha.ja.QUERY_RESULT,Ah=olympe.dc.ha.ja.rm,Bh=olympe.dc.ha.ja.ih,Ch=olympe.dc.ha.ja.Ak,Dh=olympe.dc.ha.ja.Sj,Eh=olympe.dc.ha.ja.Bh,Fh=olympe.dc.ha.ja.Jj,Gh=olympe.dc.ha.ja.sl,Hh=olympe.dc.ha.ja.Uh,Ih=olympe.dc.ha.ja.Ch,Jh=olympe.dc.ha.ja.wi,Kh=olympe.dc.ha.ja.og;
755
755
  function Lh(a,b,c,d,e){const f=c.Z();c={t:xh,q:c.ka()};olympe.H.wa.gb.sb.get(b,c).then(g=>{g.t===zh?(d(null),a.C(b,e||zh,{i:f,r:g.r,s:b})):d(Error(g.e))}).catch(g=>d(Error(g)))}function Mh(a,b,c,d,e){const f=c.Z();Lh(a,b,c,g=>{if(g)e(g);else{Nh(a,b,f);g={t:yh,q:c.ka()};var h=olympe.H.wa.gb.sb.observe(b,d,g).subscribe(k=>{const l=k.t;l===Ah?(e(null),a.C(b,l,{i:f,r:k.r,s:b})):e(Error(k.e))});d.P(()=>h.unsubscribe())}},Ah)}
756
- function Oh(a,b,c,d){const e=c.Bc;c=new olympe.dc.transaction.ud;e.Oc(c);c={t:Bh,i:e.Z(),p:me(c)};olympe.H.wa.gb.sb.send(b,c).then(()=>{d(null);a.C(b,Dh,{id:e.Z(),finalize:olympe.dc.transaction.yg.C.Vp})}).catch(f=>d(Error(f)))}function Ph(a,b,c,d,e){var f=c.Bc;c=f.Z();const g=new olympe.dc.transaction.ud;f.Oc(g);f={t:Eh,i:c,p:me(g)};olympe.H.wa.gb.sb.publish(b,f).then(()=>e(null)).catch(h=>e(Error(h)));Qh(a,c,b,d)}
756
+ function Oh(a,b,c,d){const e=c.Bc;c=new olympe.dc.transaction.ud;e.Oc(c);c={t:Bh,i:e.Z(),p:me(c)};olympe.H.wa.gb.sb.send(b,c).then(()=>{d(null);a.C(b,Dh,{id:e.Z(),finalize:olympe.dc.transaction.vg.C.Wp})}).catch(f=>d(Error(f)))}function Ph(a,b,c,d,e){var f=c.Bc;c=f.Z();const g=new olympe.dc.transaction.ud;f.Oc(g);f={t:Eh,i:c,p:me(g)};olympe.H.wa.gb.sb.publish(b,f).then(()=>e(null)).catch(h=>e(Error(h)));Qh(a,c,b,d)}
757
757
  function Nh(a,b,c){const d=()=>{const f=setInterval(()=>{0===a.F.size?clearInterval(f):a.F.forEach((g,h)=>{olympe.H.wa.gb.sb.send(h,{t:Kh,s:Array.from(g)}).catch(k=>a.N.warn(`Error occurred while keeping alive subscription list: ${k}`))})},a.$)},e=a.F.get(b)||new Set;e.add(c);a.F.set(b,e);1===a.F.size&&d()}
758
758
  function Qh(a,b,c,d){const e=new olympe.H.wa.gb.sb(b,d);e.listen().subscribe(f=>{f=f.body();if(f.t===Fh){a.N.error(`Burst Transaction ${b} failed. Local rollback is not supported yet. Refresh the application`);const g=new olympe.dc.db.xc;a.C(c,Fh,{id:b,rollback:g,error:f.r})}});d.P(()=>e.stop())}
759
- olympe.bb.Hu=class extends olympe.bb.hh{constructor(a,b,c){super(a);this.F=new Map;this.G=b;this.$=c}Z(){return olympe.dc.Ia.iq}K(a){const b=a.C[0],c=a.type,d=a.validate.bind(a),e=a.content;a=a.F;switch(c){case xh:Lh(this,b,e,d);break;case yh:Mh(this,b,e,a,d);break;case Bh:case Ch:Oh(this,b,e,d);break;case Eh:Ph(this,b,e,a,d);break;case Gh:e.t=c;olympe.H.wa.gb.sb.publish(b,e).then(d).catch(f=>d(Error(f)));break;case Hh:case Ih:case Jh:olympe.H.wa.gb.sb.get(b,{t:c,f:e.file}).then(f=>{this.G.ba(e.file,
760
- b,f);c===Hh?this.G.V(e.file,e.content,e.mimeType,e.$e,e.ve):c===Ih?this.G.P(e.file,e.url,e.mimeType,e.$e,e.ve):this.G.K(e.file,e.$e,e.ve)}).catch(e.ve);break;default:this.N.info(`Messages of type ${c} is not supported by the source ${this.Z()}`)}}};olympe.bb.Buffer=class{constructor(){this.counter=0;this.Hb=new Map}buffer(a){const b=this.counter++;this.Hb.set(b,a);return this.clear.bind(this,b)}clear(a){this.Hb.delete(a)}};olympe.bb.wg=class a{constructor(b,c,d){this.N=b;this.V=c;this.ba=new olympe.bb.Buffer(this);this.K=new Map;this.G=this.Db(d);new olympe.D.$b('Data Router context');this.F=new Map;this.$=new Map;this.Wa()}Wa(){this.N.info('Initializing DR layer');olympe.D.kn(vc(this.V),()=>{this.N.info('Router: ONLINE')},()=>{this.N.log('Router: OFFLINE (no auth layer not online)');for(const b of this.ba.Hb.values())this.qa(b)});this.N.log('DONE initializing DR layer (waiting for AUTH layer session to be established)')}send(b){M(b,
761
- this.ba.buffer(b));this.qa(b)}C(b,c){const d=olympe.X.bc();let e=this.F.get(b);void 0===e&&(e=new Map,this.F.set(b,e));e.set(d,c)}la(b){this.$.set(olympe.X.Fg(),b)}Fa(b,c,d){this.F.has(c)&&this.F.get(c).forEach(e=>{e(b,d)})}xb(b,c){this.K.set(b,c);c.C=this.Fa.bind(this);c.P=this.Ka.bind(this)}P(b){return this.K.get(b)||this.K.get(olympe.dc.Ia.iq)}Ka(b,c){this.$.forEach(d=>{d(b,c)})}qa(b){this.N.debug('Processing message',b.toString());this.eb(b).forEach(c=>{(c=this.P(c))&&c.K(b)})}eb(b){var c=olympe.dc.ha.ja.Xg,
762
- d=olympe.dc.ha.ja.Bi,e=olympe.dc.ha.ja.Ci,f=olympe.dc.ha.ja.jh,g=olympe.dc.ha.ja.Bh;const h=olympe.dc.ha.ja.Vh,k=olympe.dc.ha.ja.xi,l=olympe.dc.ha.ja.Ch;switch(b.type){case c:d=this.G.get(a.C.Xg)||[];break;case d:case e:d=this.G.get(a.C.om)||[];break;case f:case g:d=this.G.get(a.C.TRANSACTION)||[];break;case h:case l:case k:d=this.G.get(a.C.ft)||[];break;default:d=[]}c=b.content;e=olympe.auth.oa.C.hf;f=olympe.auth.oa.C.og;g=uc(this.V);e=!(g===e||g===f);for(var n of d)if(d=n,f=c&&c.Z&&c.Z(),g=d.get('type'),
763
- g===a.F.Ni&&e||g===a.F.np&&d.get('id')===f||g===a.F.lc)return n=n.get('destinations'),this.N.debug('Message',b.toString(),'is redirect to',n),n;this.N.debug('Message',b.toString(),'not redirect');return b.C}Db(b){const c=Object.values(olympe.bb.wg.C),d=Object.values(olympe.bb.wg.F);b=Object.entries(b);const e=new Map;b.forEach(([f,g])=>{if(c.includes(f))if(g instanceof Array){var h=[];e.set(f,h);g.forEach(k=>{const l=k.type;if(d.includes(l)){var n=k.destinations;n instanceof Array?(n=(new Map).set('type',
764
- l).set('destinations',n),h.push(n),l===a.F.np&&n.set('id',k.id)):this.N.error('Routing rule',f,l,'is not valid. Destinations must be stored in an array')}else this.N.error('Routing rule',f,l,'is not valid. Valid rules are',d.toString())})}else this.N.error('Routing rule',f,'is not valid. Rules must be ordered in an array');else this.N.error('Routing rule',f,'is not valid. Valid messages are',c.toString())});return e}};olympe.bb.wg.C={Xg:'getContext',om:'query',TRANSACTION:'transaction',ft:'file'};
765
- olympe.bb.wg.F={lc:'default',Ni:'offline',np:'id'};olympe.bb.wg.ma=[olympe.dc.wg];olympe.bb.Sj=class{ba(){}V(){}P(){}K(){}};olympe.bb.R={Aa:'dr.Manager',Ea:'dr.Logger',qe:'dr.sources.Router',Hp:'dr.sources.Local',xm:'dr.sources.Server',kq:'dr.sources.Peer',Wg:'dr.sources.FileSource'};olympe.bb.Config={Zl:'dr.keepAliveTimeout',Nn:'dr.autoSync',Mn:'dr.autoPersist',Sq:'dr.syncTimeout',Fq:'dr.routing'};
766
- olympe.U.config(function(a){E(a,olympe.bb.Config.Fq,{});E(a,olympe.bb.Config.Zl,3E5);E(a,olympe.bb.Config.Nn,!1);E(a,olympe.bb.Config.Mn,!1);E(a,olympe.bb.Config.Sq,3E4);C(a,olympe.bb.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('dr'));C(a,olympe.bb.R.Hp,[olympe.bb.R.Ea,olympe.bb.R.qe,olympe.auth.R.Aa,olympe.kc.R.to,new olympe.U.fa(olympe.bb.Config.Nn),new olympe.U.fa(olympe.bb.Config.Mn),new olympe.U.fa(olympe.bb.Config.Sq)],(b,c,d,e,f,g,h)=>{f=(new Map).set('autoSync',f).set('autoPersist',g).set('syncTimeout',
767
- h);return new olympe.bb.Ki(b,c,d,e,f)});va(a,olympe.bb.R.xm);A(a,olympe.bb.R.kq,olympe.bb.Hu,olympe.bb.R.Ea,olympe.bb.R.Wg,new olympe.U.fa(olympe.bb.Config.Zl));va(a,olympe.bb.R.Wg);A(a,olympe.bb.R.qe,olympe.bb.wg,olympe.bb.R.Ea,olympe.auth.R.Aa,new olympe.U.fa(olympe.bb.Config.Fq));ua(a,olympe.dc.R.qe,olympe.bb.R.qe);C(a,olympe.dc.query.Mb.bk,[olympe.dc.query.Mb.bk],b=>new olympe.dc.nm(b))},'olympe.dr');
768
- olympe.U.run([olympe.bb.R.qe,olympe.bb.R.Hp,olympe.bb.R.xm,olympe.bb.R.kq],(a,...b)=>{b.forEach(c=>a.xb(c.Z(),c))});olympe.H={};olympe.H.Wc={vi:1,kg:2,cc:3,vf:4,Bz:5,Fi:6,$A:7};olympe.H.ja={Fi:1,vv:2,et:3,rg:5};olympe.H.oa=class{qa(){}connect(){}disconnect(){}ce(){}Zk(){}Nd(){}V(){}uc(){}hc(){}Fa(){}Md(){}wd(){}qd(){return-1}};olympe.H.oa.C={INIT:'initialize',CONNECTING:'connecting',lf:'disconnected',ti:'connected',dh:'reconnecting',Yh:'waking',zh:'awake',cc:'error'};olympe.H.oa.G={bh:1,lt:-1,zt:-2,mv:-3};function Rh(a,b){const c=a.G.get(b)||a.Fa;a.G.delete(b);return`${c}/${b}`}
769
- olympe.H.Sj=class{constructor(a,b,c,d,e){this.N=a;this.F=b;this.la=c;this.Fa=d;this.Ka=e;this.C=new Map;this.G=new Map;this.$=new Map;this.qa=new olympe.D.$b('File manager context')}ba(a,b,c){b&&this.G.set(a,`${this.Ka}/${b}`);c&&this.$.set(a,c)}V(a,b,c,d,e){const f=Ib(Rh(this,a),olympe.net.ab.Gd.jk,b,olympe.net.ab.ResponseType.pl);Jb(f,{[olympe.net.ab.Headers.ri]:this.Zc(a),[olympe.net.ab.Headers.Kj]:c||'application/octet-stream'});this.F.C(f,g=>{g=g.Sd();g===olympe.net.ab.Mc.bh||g===olympe.net.ab.Mc.vl?
770
- (g=new URL(f.C()),d(g.pathname)):e&&(g=`Failed to create file ${a}. Response code ${g}`,this.N.error(g),e(g))})}P(a,b,c,d,e){const f=olympe.D.Na();d={$e:f.F(d),ve:e&&f.F(e)};if(this.C.has(a))this.C.get(a).push(d);else{this.C.set(a,[d]);if(null===b){var g=Ib(Rh(this,a));Jb(g,{[olympe.net.ab.Headers.ri]:this.Zc(a)})}else g=Ib(b);g.F=olympe.net.ab.ResponseType.pl;Jb(g,{[olympe.net.ab.Headers.Kj]:c||'application/octet-stream'});this.qa.run(()=>{this.F.C(g,h=>{const k=h.Sd(),l=this.C.get(a);if(200<=k&&
771
- 300>k){const n=h.getData();l&&l.forEach(p=>{if(f.G()){const q=f.Nc(),r=f.Z();this.N.warn(`Context ${q} ${r} is being destroyed while file tag ${a} is being downloaded`)}p.$e(n)})}else{const n=`Failed to download file ${a}. Response code ${k}`;l&&l.forEach(p=>{p.ve&&p.ve(n)})}this.C.delete(a)})})}}K(a,b,c){const d=Ib(Rh(this,a),olympe.net.ab.Gd.Cc);Jb(d,{[olympe.net.ab.Headers.ri]:this.Zc(a)});this.F.C(d,e=>{e=e.Sd();200<=e&&300>e?b():(e=`Failed to delete file ${a}. Response code ${e}`,this.N.error(e),
772
- c&&c(e))})}Zc(a){const b=this.$.get(a);b&&this.$.delete(a);return b||olympe.D.Xa(this.la.C.zb().Qd())}};olympe.H.Sj.ma=[olympe.bb.Sj];const Sh=olympe.dc.ha.ja.Xg,Th=olympe.dc.ha.ja.jh,Uh=olympe.dc.ha.ja.zk,Vh=olympe.dc.ha.ja.Bh,Wh=olympe.dc.ha.ja.Bi,Xh=olympe.dc.ha.ja.Ci,Yh=olympe.dc.ha.ja.Zo,Zh=olympe.dc.ha.ja.$o,$h=olympe.dc.ha.ja.Il,ai=olympe.dc.ha.ja.xi,bi=olympe.dc.ha.ja.Ch,ci=olympe.dc.ha.ja.Vh,di=olympe.dc.ha.ja.Rj,ei=olympe.dc.ha.ja.uv,fi=olympe.dc.ha.ja.Ou,gi=olympe.dc.ha.ja.mt,hi=olympe.dc.ha.ja.rl,ii=olympe.dc.ha.ja.Gs;
773
- function ji(a){a.G.Fa(olympe.H.Wc.vi,a.Ka.bind(a));olympe.D.wc([vc(a.la)],b=>{b=b.valueOf()?olympe.dc.vk.bq:olympe.dc.vk.Ni;a.P&&a.P(a.Z(),b)},'Server source is online')}function ki(a,b,c){const d=b.Bc;b=new olympe.dc.transaction.ud(!0);d.Oc(b);li(a,a.eb,Th,!0,me(b),e=>{c&&c(e);a.C(a.Z(),di,{id:d.Z(),finalize:olympe.dc.transaction.yg.C.Vp})})}
774
- function mi(a,b,c,d){const e=c.Z();a.N.log('Graphdef (ID ',e,') sent: ',c);const f=c instanceof olympe.dc.query.Rl?a.Wa:a.qa,g=(new olympe.H.aa.Uj).ka(c);c=new olympe.async.ug(a.V);b===Xh&&c.add((k,l)=>{a.F.set(e,{notification:null,wy:a.V.F(n=>n?l(n):k())});ni(a,b,g,n=>n&&l(n.message))});const h=olympe.D.Na();c.add((k,l)=>{h.run(()=>{li(a,f,Wh,!1,g,a.V.F(n=>n?l(n.message):k()))})});Vb(c,(k,l)=>{const n=a.F.get(e);k&&n&&n.notification?a.C(a.Z(),Zh,n.notification):!k&&n&&oi(a,Yh,e,p=>p&&a.N.warn(p));
775
- a.F.delete(e);d(l?Error(l):null)});c.start()}function oi(a,b,c,d){a.N.log('Unsubscribe to: ',c);ni(a,b,{i:c},d)}function ni(a,b,c,d){b={c:b};Object.assign(b,c);a.G.V(olympe.H.Wc.vi,b,d&&(e=>{d(e)}))}function li(a,b,c,d,e,f){if(a.G.qa()){const g=olympe.H.Wc.vi;!d&&e&&Object.assign(e,{c});c=olympe.D.Xa(a.la.C.zb().Qd()).valueOf();a.G.uc(b,g,c,d,e,f)}else a.N.error('Server is disconnected, data request of type',c,'on url',b,'is canceled.'),f(Error('Server is disconnected'))}
776
- olympe.H.hh=class extends olympe.bb.hh{constructor(a,b,c,d,e){super(a);this.G=b;this.la=c;new olympe.H.aa.hb;this.$=new olympe.dc.X.Oi(this.Z());this.ba=d;if(4!==e.length)throw Error('Some HTTP end points to the orchestrator are not specified ! Please check DI of olympe.communication module; wants 4 urls but got: '+e.length);this.Fa=e[0];this.Wa=e[1];this.qa=e[2];this.eb=e[3];this.F=new Map;ji(this)}Z(){return olympe.dc.Ia.Lc}K(a){var b=a.type;const c=a.validate.bind(a);a=a.content;switch(b){case Sh:li(this,
777
- this.Fa,olympe.dc.ha.ja.Xg,!1,null,c);break;case Vh:b=new olympe.dc.transaction.ud;var d=a.Bc;a=a.th;d.Oc(b);ni(this,Vh,{i:d.Z(),r:a,p:me(b)});c(null);break;case hi:b=new olympe.dc.transaction.ud;a=a.Bc;a.Oc(b);ni(this,hi,{i:a.Z(),p:me(b)},c);break;case Th:b=new olympe.dc.transaction.ud;d=a.Bc;a=a.th;d.Oc(b);ni(this,olympe.dc.ha.ja.jh,{i:d.Z(),r:a,p:me(b)},c);break;case Uh:ki(this,a,c);break;case Wh:case Xh:mi(this,b,a,c);break;case Yh:oi(this,b,a,c);break;case ei:ni(this,ei,{},c);break;case fi:ni(this,
778
- fi,{},c);break;case gi:ni(this,gi,{},c);break;case ii:ni(this,ii,{},c);break;case bi:this.ba.P(a.file,a.url,a.mimeType,a.$e,a.ve);break;case ai:this.ba.K(a.file,a.$e,a.ve);break;case ci:this.ba.V(a.file,a.content,a.mimeType,a.$e,a.ve);break;default:this.N.info(`Message of type ${b} not supported yet`)}}Ka(a){var b=olympe.dc.ha.ja.yl,c=olympe.dc.ha.ja.Ij;const d=olympe.dc.ha.ja.ek,e=olympe.dc.ha.ja.bv,f=olympe.dc.ha.ja.Ep;var g=olympe.dc.ha.ja.nt;const h=a.c;h===b?(a=this.$.C(a.p),this.C(this.Z(),
779
- b,a)):h===c?(g=a.error.reason,b=this.$.C(a.p),this.C(this.Z(),c,{id:a.i,rollback:b,error:g})):h===$h?(g=olympe.dc.Ia.rb,c=olympe.dc.Ia.Lc,b=a.i,0<a.s?g=new olympe.dc.query.errors.Wj(b,c,g,a.info.error.reason):(g=this.$.P(b,g,a.p),this.N.debug('< Graphdef Result (ID ',g.Z(),'):',a.p),this.N.log('< Graphdef Result (ID ',g.Z(),') with',g.Bc.G(),'operations')),this.C(this.Z(),$h,g)):h===Zh?(g=a.i,a=this.$.K(g,a.p),this.F.has(g)?(g=this.F.get(g),g.notification?uf(a,g.notification):g.notification=a):this.C(this.Z(),
780
- Zh,a)):h===f?(g=new olympe.dc.query.Lp(a.i),a.l.forEach(g.F.bind(g)),this.C(this.Z(),f,g)):h===d?(g=olympe.dc.transaction.yg.C.ek,c=0<a.s?a.info.error.reason:null,this.C(this.Z(),di,{id:a.i,finalize:g,error:c})):h===e?(g=this.F.get(a.i))&&g.wy(0<a.s?a.info.error.reason:null):h===g&&(c=a.ids,b=a.undo_stack_size,a=a.redo_stack_size,this.C(this.Z(),g,{xD:c,OD:b,JD:a}))}};olympe.H.hh.F={EA:1,GB:2};olympe.H.hh.C={100:'Insufficient Rights',200:'Constraints',300:'IOException',400:'Unexpected',500:'Non Existing Subscription'};olympe.H.Yj=class{constructor(){}};olympe.H.Yj.ma=[olympe.dc.da.Yj];olympe.H.wa={};function pi(a){a.N.debug(`Reconnected to bus: Sending ${a.P.length} pending messages.`);for(const b of a.P)a.C.publish(b.K(),b.ka());a.P=[];a.qa.forEach((b,c)=>{qi(a,c,b)});a.qa.clear()}function ri(a){a.Fa=a.V.C(()=>Nb(a.C)?Promise.resolve('Bus connection OK'):Promise.reject('Bus is disconnected'))}
759
+ olympe.bb.Iu=class extends olympe.bb.gh{constructor(a,b,c){super(a);this.F=new Map;this.G=b;this.$=c}Z(){return olympe.dc.Ia.jq}K(a){const b=a.C[0],c=a.type,d=a.validate.bind(a),e=a.content;a=a.F;switch(c){case xh:Lh(this,b,e,d);break;case yh:Mh(this,b,e,a,d);break;case Bh:case Ch:Oh(this,b,e,d);break;case Eh:Ph(this,b,e,a,d);break;case Gh:e.t=c;olympe.H.wa.gb.sb.publish(b,e).then(d).catch(f=>d(Error(f)));break;case Hh:case Ih:case Jh:olympe.H.wa.gb.sb.get(b,{t:c,f:e.file}).then(f=>{this.G.ba(e.file,
760
+ b,f);c===Hh?this.G.V(e.file,e.content,e.mimeType,e.Ze,e.ve):c===Ih?this.G.P(e.file,e.url,e.mimeType,e.Ze,e.ve):this.G.K(e.file,e.Ze,e.ve)}).catch(e.ve);break;default:this.N.info(`Messages of type ${c} is not supported by the source ${this.Z()}`)}}};olympe.bb.Buffer=class{constructor(){this.counter=0;this.Hb=new Map}buffer(a){const b=this.counter++;this.Hb.set(b,a);return this.clear.bind(this,b)}clear(a){this.Hb.delete(a)}};olympe.bb.tg=class a{constructor(b,c,d){this.N=b;this.V=c;this.ba=new olympe.bb.Buffer(this);this.K=new Map;this.G=this.Fb(d);new olympe.D.Xb('Data Router context');this.F=new Map;this.$=new Map;this.Wa()}Wa(){this.N.info('Initializing DR layer');olympe.D.ln(vc(this.V),()=>{this.N.info('Router: ONLINE')},()=>{this.N.log('Router: OFFLINE (no auth layer not online)');for(const b of this.ba.Hb.values())this.qa(b)});this.N.log('DONE initializing DR layer (waiting for AUTH layer session to be established)')}send(b){M(b,
761
+ this.ba.buffer(b));this.qa(b)}C(b,c){const d=olympe.X.bc();let e=this.F.get(b);void 0===e&&(e=new Map,this.F.set(b,e));e.set(d,c)}la(b){this.$.set(olympe.X.Cg(),b)}Fa(b,c,d){this.F.has(c)&&this.F.get(c).forEach(e=>{e(b,d)})}xb(b,c){this.K.set(b,c);c.C=this.Fa.bind(this);c.P=this.Ka.bind(this)}P(b){return this.K.get(b)||this.K.get(olympe.dc.Ia.jq)}Ka(b,c){this.$.forEach(d=>{d(b,c)})}qa(b){this.N.debug('Processing message',b.toString());this.fb(b).forEach(c=>{(c=this.P(c))&&c.K(b)})}fb(b){var c=olympe.dc.ha.ja.Wg,
762
+ d=olympe.dc.ha.ja.Ai,e=olympe.dc.ha.ja.Bi,f=olympe.dc.ha.ja.ih,g=olympe.dc.ha.ja.Bh;const h=olympe.dc.ha.ja.Uh,k=olympe.dc.ha.ja.wi,l=olympe.dc.ha.ja.Ch;switch(b.type){case c:d=this.G.get(a.C.Wg)||[];break;case d:case e:d=this.G.get(a.C.pm)||[];break;case f:case g:d=this.G.get(a.C.TRANSACTION)||[];break;case h:case l:case k:d=this.G.get(a.C.gt)||[];break;default:d=[]}c=b.content;e=olympe.auth.oa.C.gf;f=olympe.auth.oa.C.lg;g=uc(this.V);e=!(g===e||g===f);for(var n of d)if(d=n,f=c&&c.Z&&c.Z(),g=d.get('type'),
763
+ g===a.F.Ni&&e||g===a.F.op&&d.get('id')===f||g===a.F.kc)return n=n.get('destinations'),this.N.debug('Message',b.toString(),'is redirect to',n),n;this.N.debug('Message',b.toString(),'not redirect');return b.C}Fb(b){const c=Object.values(olympe.bb.tg.C),d=Object.values(olympe.bb.tg.F);b=Object.entries(b);const e=new Map;b.forEach(([f,g])=>{if(c.includes(f))if(g instanceof Array){var h=[];e.set(f,h);g.forEach(k=>{const l=k.type;if(d.includes(l)){var n=k.destinations;n instanceof Array?(n=(new Map).set('type',
764
+ l).set('destinations',n),h.push(n),l===a.F.op&&n.set('id',k.id)):this.N.error('Routing rule',f,l,'is not valid. Destinations must be stored in an array')}else this.N.error('Routing rule',f,l,'is not valid. Valid rules are',d.toString())})}else this.N.error('Routing rule',f,'is not valid. Rules must be ordered in an array');else this.N.error('Routing rule',f,'is not valid. Valid messages are',c.toString())});return e}};olympe.bb.tg.C={Wg:'getContext',pm:'query',TRANSACTION:'transaction',gt:'file'};
765
+ olympe.bb.tg.F={kc:'default',Ni:'offline',op:'id'};olympe.bb.tg.ma=[olympe.dc.tg];olympe.bb.Tj=class{ba(){}V(){}P(){}K(){}};olympe.bb.R={Aa:'dr.Manager',Ea:'dr.Logger',qe:'dr.sources.Router',Ip:'dr.sources.Local',ym:'dr.sources.Server',lq:'dr.sources.Peer',Vg:'dr.sources.FileSource'};olympe.bb.Config={$l:'dr.keepAliveTimeout',On:'dr.autoSync',Nn:'dr.autoPersist',Tq:'dr.syncTimeout',Gq:'dr.routing'};
766
+ olympe.U.config(function(a){E(a,olympe.bb.Config.Gq,{});E(a,olympe.bb.Config.$l,3E5);E(a,olympe.bb.Config.On,!1);E(a,olympe.bb.Config.Nn,!1);E(a,olympe.bb.Config.Tq,3E4);C(a,olympe.bb.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('dr'));C(a,olympe.bb.R.Ip,[olympe.bb.R.Ea,olympe.bb.R.qe,olympe.auth.R.Aa,olympe.jc.R.uo,new olympe.U.fa(olympe.bb.Config.On),new olympe.U.fa(olympe.bb.Config.Nn),new olympe.U.fa(olympe.bb.Config.Tq)],(b,c,d,e,f,g,h)=>{f=(new Map).set('autoSync',f).set('autoPersist',g).set('syncTimeout',
767
+ h);return new olympe.bb.Ki(b,c,d,e,f)});va(a,olympe.bb.R.ym);A(a,olympe.bb.R.lq,olympe.bb.Iu,olympe.bb.R.Ea,olympe.bb.R.Vg,new olympe.U.fa(olympe.bb.Config.$l));va(a,olympe.bb.R.Vg);A(a,olympe.bb.R.qe,olympe.bb.tg,olympe.bb.R.Ea,olympe.auth.R.Aa,new olympe.U.fa(olympe.bb.Config.Gq));ua(a,olympe.dc.R.qe,olympe.bb.R.qe);C(a,olympe.dc.query.Mb.ck,[olympe.dc.query.Mb.ck],b=>new olympe.dc.om(b))},'olympe.dr');
768
+ olympe.U.run([olympe.bb.R.qe,olympe.bb.R.Ip,olympe.bb.R.ym,olympe.bb.R.lq],(a,...b)=>{b.forEach(c=>a.xb(c.Z(),c))});olympe.H={};olympe.H.Wc={ti:1,hg:2,cc:3,uf:4,Dz:5,Ei:6,bB:7};olympe.H.ja={Ei:1,wv:2,ft:3,og:5};olympe.H.oa=class{qa(){}connect(){}disconnect(){}be(){}$k(){}de(){}V(){}uc(){}mc(){}Fa(){}Md(){}Ld(){}qd(){return-1}};olympe.H.oa.C={INIT:'initialize',CONNECTING:'connecting',kf:'disconnected',si:'connected',bh:'reconnecting',Xh:'waking',zh:'awake',cc:'error'};olympe.H.oa.G={ah:1,mt:-1,At:-2,nv:-3};function Rh(a,b){const c=a.G.get(b)||a.Fa;a.G.delete(b);return`${c}/${b}`}
769
+ olympe.H.Tj=class{constructor(a,b,c,d,e){this.N=a;this.F=b;this.la=c;this.Fa=d;this.Ka=e;this.C=new Map;this.G=new Map;this.$=new Map;this.qa=new olympe.D.Xb('File manager context')}ba(a,b,c){b&&this.G.set(a,`${this.Ka}/${b}`);c&&this.$.set(a,c)}V(a,b,c,d,e){const f=Ib(Rh(this,a),olympe.net.ab.Fd.kk,b,olympe.net.ab.ResponseType.ql);Jb(f,{[olympe.net.ab.Headers.pi]:this.Zc(a),[olympe.net.ab.Headers.Lj]:c||'application/octet-stream'});this.F.C(f,g=>{g=g.Rd();g===olympe.net.ab.Mc.ah||g===olympe.net.ab.Mc.wl?
770
+ (g=new URL(f.C()),d(g.pathname)):e&&(g=`Failed to create file ${a}. Response code ${g}`,this.N.error(g),e(g))})}P(a,b,c,d,e){const f=olympe.D.Na();d={Ze:f.F(d),ve:e&&f.F(e)};if(this.C.has(a))this.C.get(a).push(d);else{this.C.set(a,[d]);if(null===b){var g=Ib(Rh(this,a));Jb(g,{[olympe.net.ab.Headers.pi]:this.Zc(a)})}else g=Ib(b);g.F=olympe.net.ab.ResponseType.ql;Jb(g,{[olympe.net.ab.Headers.Lj]:c||'application/octet-stream'});this.qa.run(()=>{this.F.C(g,h=>{const k=h.Rd(),l=this.C.get(a);if(200<=k&&
771
+ 300>k){const n=h.getData();l&&l.forEach(p=>{if(f.C()){const q=f.$c(),r=f.Z();this.N.warn(`Context ${q} ${r} is being destroyed while file tag ${a} is being downloaded`)}p.Ze(n)})}else{const n=`Failed to download file ${a}. Response code ${k}`;l&&l.forEach(p=>{p.ve&&p.ve(n)})}this.C.delete(a)})})}}K(a,b,c){const d=Ib(Rh(this,a),olympe.net.ab.Fd.Cc);Jb(d,{[olympe.net.ab.Headers.pi]:this.Zc(a)});this.F.C(d,e=>{e=e.Rd();200<=e&&300>e?b():(e=`Failed to delete file ${a}. Response code ${e}`,this.N.error(e),
772
+ c&&c(e))})}Zc(a){const b=this.$.get(a);b&&this.$.delete(a);return b||olympe.D.Xa(this.la.C.zb().Pd())}};olympe.H.Tj.ma=[olympe.bb.Tj];const Sh=olympe.dc.ha.ja.Wg,Th=olympe.dc.ha.ja.ih,Uh=olympe.dc.ha.ja.Ak,Vh=olympe.dc.ha.ja.Bh,Wh=olympe.dc.ha.ja.Ai,Xh=olympe.dc.ha.ja.Bi,Yh=olympe.dc.ha.ja.$o,Zh=olympe.dc.ha.ja.ap,$h=olympe.dc.ha.ja.Jl,ai=olympe.dc.ha.ja.wi,bi=olympe.dc.ha.ja.Ch,ci=olympe.dc.ha.ja.Uh,di=olympe.dc.ha.ja.Sj,ei=olympe.dc.ha.ja.vv,fi=olympe.dc.ha.ja.Pu,gi=olympe.dc.ha.ja.nt,hi=olympe.dc.ha.ja.sl,ii=olympe.dc.ha.ja.Hs;
773
+ function ji(a){a.G.Fa(olympe.H.Wc.ti,a.Ka.bind(a));olympe.D.wc([vc(a.la)],b=>{b=b.valueOf()?olympe.dc.wk.cq:olympe.dc.wk.Ni;a.P&&a.P(a.Z(),b)},'Server source is online')}function ki(a,b,c){const d=b.Bc;b=new olympe.dc.transaction.ud(!0);d.Oc(b);li(a,a.fb,Th,!0,me(b),e=>{c&&c(e);a.C(a.Z(),di,{id:d.Z(),finalize:olympe.dc.transaction.vg.C.Wp})})}
774
+ function mi(a,b,c,d){const e=c.Z();a.N.log('Graphdef (ID ',e,') sent: ',c);const f=c instanceof olympe.dc.query.Sl?a.Wa:a.qa,g=(new olympe.H.aa.Vj).ka(c);c=new olympe.async.rg(a.V);b===Xh&&c.add((k,l)=>{a.F.set(e,{notification:null,yy:a.V.F(n=>n?l(n):k())});ni(a,b,g,n=>n&&l(n.message))});const h=olympe.D.Na();c.add((k,l)=>{h.run(()=>{li(a,f,Wh,!1,g,a.V.F(n=>n?l(n.message):k()))})});Vb(c,(k,l)=>{const n=a.F.get(e);k&&n&&n.notification?a.C(a.Z(),Zh,n.notification):!k&&n&&oi(a,Yh,e,p=>p&&a.N.warn(p));
775
+ a.F.delete(e);d(l?Error(l):null)});c.start()}function oi(a,b,c,d){a.N.log('Unsubscribe to: ',c);ni(a,b,{i:c},d)}function ni(a,b,c,d){b={c:b};Object.assign(b,c);a.G.V(olympe.H.Wc.ti,b,d&&(e=>{d(e)}))}function li(a,b,c,d,e,f){if(a.G.qa()){const g=olympe.H.Wc.ti;!d&&e&&Object.assign(e,{c});c=olympe.D.Xa(a.la.C.zb().Pd()).valueOf();a.G.uc(b,g,c,d,e,f)}else a.N.error('Server is disconnected, data request of type',c,'on url',b,'is canceled.'),f(Error('Server is disconnected'))}
776
+ olympe.H.gh=class extends olympe.bb.gh{constructor(a,b,c,d,e){super(a);this.G=b;this.la=c;new olympe.H.aa.hb;this.$=new olympe.dc.X.Oi(this.Z());this.ba=d;if(4!==e.length)throw Error('Some HTTP end points to the orchestrator are not specified ! Please check DI of olympe.communication module; wants 4 urls but got: '+e.length);this.Fa=e[0];this.Wa=e[1];this.qa=e[2];this.fb=e[3];this.F=new Map;ji(this)}Z(){return olympe.dc.Ia.Lc}K(a){var b=a.type;const c=a.validate.bind(a);a=a.content;switch(b){case Sh:li(this,
777
+ this.Fa,olympe.dc.ha.ja.Wg,!1,null,c);break;case Vh:b=new olympe.dc.transaction.ud;var d=a.Bc;a=a.th;d.Oc(b);ni(this,Vh,{i:d.Z(),r:a,p:me(b)});c(null);break;case hi:b=new olympe.dc.transaction.ud;a=a.Bc;a.Oc(b);ni(this,hi,{i:a.Z(),p:me(b)},c);break;case Th:b=new olympe.dc.transaction.ud;d=a.Bc;a=a.th;d.Oc(b);ni(this,olympe.dc.ha.ja.ih,{i:d.Z(),r:a,p:me(b)},c);break;case Uh:ki(this,a,c);break;case Wh:case Xh:mi(this,b,a,c);break;case Yh:oi(this,b,a,c);break;case ei:ni(this,ei,{},c);break;case fi:ni(this,
778
+ fi,{},c);break;case gi:ni(this,gi,{},c);break;case ii:ni(this,ii,{},c);break;case bi:this.ba.P(a.file,a.url,a.mimeType,a.Ze,a.ve);break;case ai:this.ba.K(a.file,a.Ze,a.ve);break;case ci:this.ba.V(a.file,a.content,a.mimeType,a.Ze,a.ve);break;default:this.N.info(`Message of type ${b} not supported yet`)}}Ka(a){var b=olympe.dc.ha.ja.zl,c=olympe.dc.ha.ja.Jj;const d=olympe.dc.ha.ja.fk,e=olympe.dc.ha.ja.dv,f=olympe.dc.ha.ja.Fp;var g=olympe.dc.ha.ja.ot;const h=a.c;h===b?(a=this.$.C(a.p),this.C(this.Z(),
779
+ b,a)):h===c?(g=a.error.reason,b=this.$.C(a.p),this.C(this.Z(),c,{id:a.i,rollback:b,error:g})):h===$h?(g=olympe.dc.Ia.rb,c=olympe.dc.Ia.Lc,b=a.i,0<a.s?g=new olympe.dc.query.errors.Xj(b,c,g,a.info.error.reason):(g=this.$.P(b,g,a.p),this.N.debug('< Graphdef Result (ID ',g.Z(),'):',a.p),this.N.log('< Graphdef Result (ID ',g.Z(),') with',g.Bc.G(),'operations')),this.C(this.Z(),$h,g)):h===Zh?(g=a.i,a=this.$.K(g,a.p),this.F.has(g)?(g=this.F.get(g),g.notification?uf(a,g.notification):g.notification=a):this.C(this.Z(),
780
+ Zh,a)):h===f?(g=new olympe.dc.query.Mp(a.i),a.l.forEach(g.F.bind(g)),this.C(this.Z(),f,g)):h===d?(g=olympe.dc.transaction.vg.C.fk,c=0<a.s?a.info.error.reason:null,this.C(this.Z(),di,{id:a.i,finalize:g,error:c})):h===e?(g=this.F.get(a.i))&&g.yy(0<a.s?a.info.error.reason:null):h===g&&(c=a.ids,b=a.undo_stack_size,a=a.redo_stack_size,this.C(this.Z(),g,{zD:c,QD:b,LD:a}))}};olympe.H.gh.F={GA:1,IB:2};olympe.H.gh.C={100:'Insufficient Rights',200:'Constraints',300:'IOException',400:'Unexpected',500:'Non Existing Subscription'};olympe.H.Zj=class{constructor(){}};olympe.H.Zj.ma=[olympe.dc.da.Zj];olympe.H.wa={};function pi(a){a.N.debug(`Reconnected to bus: Sending ${a.P.length} pending messages.`);for(const b of a.P)a.C.publish(b.K(),b.ka());a.P=[];a.qa.forEach((b,c)=>{qi(a,c,b)});a.qa.clear()}function ri(a){a.Fa=a.V.C(()=>Nb(a.C)?Promise.resolve('Bus connection OK'):Promise.reject('Bus is disconnected'))}
781
781
  function qi(a,b,c){a.N.debug(`Bus: Subscribe to ${b}`);a.F||a.ba?a.qa.set(b,c):a.connect().then(()=>{Pb(a.C,b,d=>{d=new olympe.H.wa.Hb.Request(d.dest,d.src,d.auth,d.seq,d.type,d.content);a.N.debug('Bus: Received',d);c(d)})})}function si(a,b,c,d,e){b=new olympe.H.wa.Hb.Response(c,a.K,b,d,e);return a.publish(b)}function ti(a,b,c){a.la.set(b,c)}function ui(a,b){return Nb(a.C)?new Promise((c,d)=>{Qb(a.C,b,e=>e?d(e):c())}):Promise.resolve()}
782
- function vi(a,b){return new Promise((c,d)=>{const e=b.Zc(),f=a.eb.get(e);void 0!==f?c(f):a.G.rh(b.Zc(),(g,h)=>{g?d(g):(a.eb.set(e,h),c(h))})})}
783
- olympe.H.wa.oa=class{constructor(a,b,c,d,e){b=e.get('connectionOptions');this.N=a;this.G=c;this.V=d;this.la=Ka(new olympe.X.Bm(b.messageTimeout),this.xb.bind(this));this.C=Mb(e.get('url'),b);this.eb=new olympe.X.Bm(b.tokenTimeout);this.Wa=e.get('allowGuest');this.$=1;this.K=olympe.X.bc();this.ba=this.F=!1;Tb(this.C,()=>{this.F=!0});Sb(this.C,()=>{this.F=!0});Rb(this.C,()=>{this.F&&(this.F=this.ba=!1,pi(this))});this.P=[];this.qa=new Map;this.Ka=this.Fa=''}connect(){const a=olympe.auth.oa.C.INIT,b=
784
- olympe.auth.oa.C.cc,c=olympe.auth.oa.C.hf,d=olympe.auth.oa.C.og,e=olympe.auth.oa.C.lf;return new Promise((f,g)=>{Nb(this.C)||this.F?f():olympe.D.wc([this.G.getState()],h=>{const k=olympe.D.Na();if(this.Wa||h!==d)switch(h){case a:this.ba=!0;break;case b:case e:g(Error('Authentication failed.'));k.destroy();break;case c:case d:ri(this),this.Wa||wc(this.G,()=>this.disconnect().then(),'busLogoutCallback'),this.F=!0,this.C.connect(()=>olympe.D.Xa(this.G.C.zb()),()=>{this.N.debug('Connection to bus established. Listening to',
782
+ function vi(a,b){return new Promise((c,d)=>{const e=b.Zc(),f=a.fb.get(e);void 0!==f?c(f):a.G.qh(b.Zc(),(g,h)=>{g?d(g):(a.fb.set(e,h),c(h))})})}
783
+ olympe.H.wa.oa=class{constructor(a,b,c,d,e){b=e.get('connectionOptions');this.N=a;this.G=c;this.V=d;this.la=Ka(new olympe.X.Cm(b.messageTimeout),this.xb.bind(this));this.C=Mb(e.get('url'),b);this.fb=new olympe.X.Cm(b.tokenTimeout);this.Wa=e.get('allowGuest');this.$=1;this.K=olympe.X.bc();this.ba=this.F=!1;Tb(this.C,()=>{this.F=!0});Sb(this.C,()=>{this.F=!0});Rb(this.C,()=>{this.F&&(this.F=this.ba=!1,pi(this))});this.P=[];this.qa=new Map;this.Ka=this.Fa=''}connect(){const a=olympe.auth.oa.C.INIT,b=
784
+ olympe.auth.oa.C.cc,c=olympe.auth.oa.C.gf,d=olympe.auth.oa.C.lg,e=olympe.auth.oa.C.kf;return new Promise((f,g)=>{Nb(this.C)||this.F?f():olympe.D.wc([this.G.getState()],h=>{const k=olympe.D.Na();if(this.Wa||h!==d)switch(h){case a:this.ba=!0;break;case b:case e:g(Error('Authentication failed.'));k.destroy();break;case c:case d:ri(this),this.Wa||wc(this.G,()=>this.disconnect().then(),'busLogoutCallback'),this.F=!0,this.C.connect(()=>olympe.D.Xa(this.G.C.zb()),()=>{this.N.debug('Connection to bus established. Listening to',
785
785
  this.K);Pb(this.C,this.K,l=>{l=new olympe.H.wa.Hb.Response(l.dest,l.src,l.seq,l.type,l.content);this.N.debug('Bus received message:',l);const n=l.G,p=this.la.get(n);this.la.delete(n);p&&p(l)});f();k.destroy()}),this.Ka=this.V.ba(()=>this.disconnect())}else ri(this),g(Error('Guest user is not allowed to connect to RabbitMQ, you can allow guest with the bus.allowGuest oConfig parameter !!!')),k.destroy()})})}disconnect(){return new Promise(a=>{this.N.debug('Disconnecting from bus');this.G.V.delete('busLogoutCallback');
786
- this.C.end(!1,()=>a());this.V.K(this.Fa);this.V.V(this.Ka)})}publish(a){this.N.debug('Publishing on bus',a);return this.F||this.ba?(this.N.debug('Disconnected, storing message in queue'),this.P.push(a),Promise.resolve()):this.connect().then(()=>new Promise((b,c)=>{this.C.publish(a.K(),a.ka(),void 0,d=>d?c(d):b())}))}we(a,b,c){return si(this,a.G,a.source,b,c)}request(a,b,c){const d=this.$;this.$++;const e=olympe.D.Xa(this.G.C.zb().Qd());a=new olympe.H.wa.Hb.Request(a,this.K,e,d,b,c);return this.publish(a).then(()=>
787
- d)}notify(a,b,c){const d=this.$;this.$++;a=new olympe.H.wa.Hb.Response(b,a,d,olympe.H.wa.Hb.Response.ja.Em,c);return this.publish(a)}xb(a,b){b(new olympe.H.wa.Hb.Response(this.K,this.K,a,olympe.H.wa.Hb.Response.ja.cc,{reason:'Timeout'}))}};olympe.H.wa.Hb={};olympe.H.wa.Hb.Request=class{constructor(a,b,c,d,e,f){this.G=d;this.destination=a;this.source=b;this.P=c;this.C=e;this.F=f||null}K(){return this.destination}Zc(){return this.P}ka(){return{dest:this.destination,src:this.source,seq:this.G,auth:this.P,type:this.C,content:this.F}}toString(){return JSON.stringify(this)}};olympe.H.wa.Hb.Request.ja={SEND:0,GET:1,PUBLISH:2,SUBSCRIBE:3};function wi(a){const b=olympe.H.wa.Hb.Response.ja.$q;return a.F!==olympe.H.wa.Hb.Response.ja.Am?Promise.reject('Should only call `topicAck` on TOPIC responses'):si(olympe.H.wa.Sc(),a.G,a.source,b)}olympe.H.wa.Hb.Response=class{constructor(a,b,c,d,e){this.G=c;this.destination=a;this.source=b;this.F=d;this.C=e||null}K(){return this.destination}ka(){return{dest:this.destination,src:this.source,seq:this.G,type:this.F,content:this.C}}toString(){return JSON.stringify(this)}};
788
- olympe.H.wa.Hb.Response.ja={Em:0,In:1,Am:2,$q:3,cc:4};olympe.H.wa.gb={};const xi=olympe.H.wa.Hb.Response.ja.In,yi=olympe.H.wa.Hb.Response.ja.cc,zi=olympe.H.wa.Hb.Response.ja.Em,Ai=olympe.H.wa.Hb.Response.ja.Am,Bi=olympe.H.wa.Hb.Request.ja.SEND,Ci=olympe.H.wa.Hb.Request.ja.GET,Di=olympe.H.wa.Hb.Request.ja.PUBLISH,Ei=olympe.H.wa.Hb.Request.ja.SUBSCRIBE;
789
- olympe.H.wa.gb.sb=class{constructor(a,b){this.C=olympe.H.wa.Sc();this.F=a;this.G=new olympe.D.$b(`Service ${a}`,'function'===typeof b.Wa?b.C.C:b);this.N=olympe.ta.Za(`Service ${this.F}`)}listen(){return new rxjs.Observable(a=>{const b=()=>{a.complete();ui(this.C,this.F).catch(c=>this.N.error('Failed to unsubscribe from '+this.F+', error: '+c))};this.G.onDestroy(b);this.C.connect().then(()=>{qi(this.C,this.F,c=>a.next(new olympe.H.wa.gb.ha(c,this.C)))}).catch(c=>this.N.error('Failed to connect to the bus: '+
786
+ this.C.end(!1,()=>a());this.V.K(this.Fa);this.V.V(this.Ka)})}publish(a){this.N.debug('Publishing on bus',a);return this.F||this.ba?(this.N.debug('Disconnected, storing message in queue'),this.P.push(a),Promise.resolve()):this.connect().then(()=>new Promise((b,c)=>{this.C.publish(a.K(),a.ka(),void 0,d=>d?c(d):b())}))}we(a,b,c){return si(this,a.G,a.source,b,c)}request(a,b,c){const d=this.$;this.$++;const e=olympe.D.Xa(this.G.C.zb().Pd());a=new olympe.H.wa.Hb.Request(a,this.K,e,d,b,c);return this.publish(a).then(()=>
787
+ d)}notify(a,b,c){const d=this.$;this.$++;a=new olympe.H.wa.Hb.Response(b,a,d,olympe.H.wa.Hb.Response.ja.Fm,c);return this.publish(a)}xb(a,b){b(new olympe.H.wa.Hb.Response(this.K,this.K,a,olympe.H.wa.Hb.Response.ja.cc,{reason:'Timeout'}))}};olympe.H.wa.Hb={};olympe.H.wa.Hb.Request=class{constructor(a,b,c,d,e,f){this.G=d;this.destination=a;this.source=b;this.P=c;this.C=e;this.F=f||null}K(){return this.destination}Zc(){return this.P}ka(){return{dest:this.destination,src:this.source,seq:this.G,auth:this.P,type:this.C,content:this.F}}toString(){return JSON.stringify(this)}};olympe.H.wa.Hb.Request.ja={SEND:0,GET:1,PUBLISH:2,SUBSCRIBE:3};function wi(a){const b=olympe.H.wa.Hb.Response.ja.ar;return a.F!==olympe.H.wa.Hb.Response.ja.Bm?Promise.reject('Should only call `topicAck` on TOPIC responses'):si(olympe.H.wa.Sc(),a.G,a.source,b)}olympe.H.wa.Hb.Response=class{constructor(a,b,c,d,e){this.G=c;this.destination=a;this.source=b;this.F=d;this.C=e||null}K(){return this.destination}ka(){return{dest:this.destination,src:this.source,seq:this.G,type:this.F,content:this.C}}toString(){return JSON.stringify(this)}};
788
+ olympe.H.wa.Hb.Response.ja={Fm:0,Jn:1,Bm:2,ar:3,cc:4};olympe.H.wa.gb={};const xi=olympe.H.wa.Hb.Response.ja.Jn,yi=olympe.H.wa.Hb.Response.ja.cc,zi=olympe.H.wa.Hb.Response.ja.Fm,Ai=olympe.H.wa.Hb.Response.ja.Bm,Bi=olympe.H.wa.Hb.Request.ja.SEND,Ci=olympe.H.wa.Hb.Request.ja.GET,Di=olympe.H.wa.Hb.Request.ja.PUBLISH,Ei=olympe.H.wa.Hb.Request.ja.SUBSCRIBE;
789
+ olympe.H.wa.gb.sb=class{constructor(a,b){this.C=olympe.H.wa.Sc();this.F=a;this.G=new olympe.D.Xb(`Service ${a}`,'function'===typeof b.G?b.G():b);this.N=olympe.ta.Za(`Service ${this.F}`)}listen(){return new rxjs.Observable(a=>{const b=()=>{a.complete();ui(this.C,this.F).catch(c=>this.N.error('Failed to unsubscribe from '+this.F+', error: '+c))};this.G.onDestroy(b);this.C.connect().then(()=>{qi(this.C,this.F,c=>a.next(new olympe.H.wa.gb.ha(c,this.C)))}).catch(c=>this.N.error('Failed to connect to the bus: '+
790
790
  c));return b})}stop(){this.G.destroy()}static publish(a,b){const c=olympe.H.wa.Sc();return c.connect().then(()=>c.request(a,Di,b)).then(()=>Promise.resolve())}static send(a,b){return new Promise((c,d)=>{const e=olympe.H.wa.Sc();e.connect().then(()=>e.request(a,Bi,b)).then(f=>{ti(e,f,g=>{switch(g.F){case xi:c();break;case yi:d(g.C.reason);break;default:d('Unsupported response type for a SEND request')}})}).catch(f=>d(f))})}static get(a,b){return new Promise((c,d)=>{const e=olympe.H.wa.Sc();e.connect().then(()=>
791
- e.request(a,Ci,b)).then(f=>{ti(e,f,g=>{switch(g.F){case zi:(g=g.C)?c(g):d('No payload after request to service: '+a);break;case yi:d(g.C.reason);break;default:d('Unsupported response type for a GET request')}})}).catch(f=>d(f))})}static observe(a,b,c){const d='function'===typeof b.Wa?b.C.C:b;return new rxjs.Observable(e=>{const f=olympe.H.wa.Sc();let g=null;const h=()=>{e.complete();g&&ui(f,g).catch(k=>olympe.ta.Za('Service '+a).error('Failed to unsubscribe from a topic '+k))};d.P(h);f.connect().then(()=>
791
+ e.request(a,Ci,b)).then(f=>{ti(e,f,g=>{switch(g.F){case zi:(g=g.C)?c(g):d('No payload after request to service: '+a);break;case yi:d(g.C.reason);break;default:d('Unsupported response type for a GET request')}})}).catch(f=>d(f))})}static observe(a,b,c){const d='function'===typeof b.G?b.G():b;return new rxjs.Observable(e=>{const f=olympe.H.wa.Sc();let g=null;const h=()=>{e.complete();g&&ui(f,g).catch(k=>olympe.ta.Za('Service '+a).error('Failed to unsubscribe from a topic '+k))};d.P(h);f.connect().then(()=>
792
792
  f.request(a,Ei,c)).then(k=>{ti(f,k,l=>{switch(l.F){case Ai:g=l.C.topic;qi(f,g,n=>{n.C===Di?e.next(n.F):(e.error('Unsupported notification message. It should be a publish'),h())});wi(l).catch(n=>{e.error(`Was unable to ack the subscription: ${n}`);h()});break;case yi:e.error(l.C.reason);break;default:e.error('Unsupported response type for a SUBSCRIBE request')}})}).catch(k=>e.error(k));return h})}};olympe.H.wa.gb.sb.observe=olympe.H.wa.gb.sb.observe;olympe.H.wa.gb.sb.get=olympe.H.wa.gb.sb.get;
793
- olympe.H.wa.gb.sb.send=olympe.H.wa.gb.sb.send;olympe.H.wa.gb.sb.publish=olympe.H.wa.gb.sb.publish;olympe.H.wa.gb.sb.prototype.stop=olympe.H.wa.gb.sb.prototype.stop;olympe.H.wa.gb.sb.prototype.listen=olympe.H.wa.gb.sb.prototype.listen;const Fi=olympe.H.wa.Hb.Response.ja.In,Gi=olympe.H.wa.Hb.Response.ja.cc,Hi=olympe.H.wa.Hb.Response.ja.Em,Ii=olympe.H.wa.Hb.Response.ja.Am,Ji=olympe.H.wa.Hb.Response.ja.$q,Ki=olympe.H.wa.Hb.Request.ja.SEND,Li=olympe.H.wa.Hb.Request.ja.GET,Mi=olympe.H.wa.Hb.Request.ja.SUBSCRIBE;
794
- olympe.H.wa.gb.ha=class{constructor(a,b){this.request=a;this.C=b;this.user=null}Cj(){return null!==this.user?Promise.resolve(this.user):vi(this.C,this.request).then(a=>this.user=a)}source(){return this.request.source}body(){return this.request.F}Ik(){return this.request.C===Ki?this.C.we(this.request,Fi,void 0):Promise.reject('Should only call `ack` on SEND requests')}we(a){return this.request.C===Li?this.C.we(this.request,Hi,a):Promise.reject('Should only call `reply` on GET requests')}un(a){return this.request.C!==
795
- Mi?Promise.reject('Should only call `notifyOn` on SUBSCRIBE requests'):this.C.we(this.request,Ii,{topic:a}).then(()=>new Promise((b,c)=>{ti(this.C,this.request.G,d=>{switch(d.F){case Ji:b();break;case Gi:c(d.C.reason);break;default:c('Unsupported response type for a SUBSCRIBE request')}})}))}Eg(a){return this.C.we(this.request,Gi,{reason:a.message})}};olympe.H.wa.gb.ha.prototype.fail=olympe.H.wa.gb.ha.prototype.Eg;olympe.H.wa.gb.ha.prototype.notifyOn=olympe.H.wa.gb.ha.prototype.un;
796
- olympe.H.wa.gb.ha.prototype.reply=olympe.H.wa.gb.ha.prototype.we;olympe.H.wa.gb.ha.prototype.ack=olympe.H.wa.gb.ha.prototype.Ik;olympe.H.wa.gb.ha.prototype.body=olympe.H.wa.gb.ha.prototype.body;olympe.H.wa.gb.ha.prototype.source=olympe.H.wa.gb.ha.prototype.source;olympe.H.wa.gb.ha.prototype.userTag=olympe.H.wa.gb.ha.prototype.Cj;olympe.H.sa={};function Ni(a,b,c,d){c.c=b;a.C.V(olympe.H.Wc.vf,c,d)}
797
- olympe.H.sa.Ua=class{constructor(a,b,c,d,e,f,g,h,k){this.N=a;this.C=b;this.F=h;this.xb=c;this.K=g;this.storage=k;const l=this.storage.C('AUTH');l&&(l.get('redirectTo',n=>{n&&(l.remove('redirectTo'),l.close(),this.F.redirect(n,null,olympe.auth.qk.C.GET))}),l.close())}ba(a){this.C.ce(a)}V(a){this.C.Zk(a)}$(a){this.C.Nd(a)}eb(a){this.C.Md(olympe.H.Wc.vf,'logoutHandler');this.C.Fa(olympe.H.Wc.vf,b=>{const c=b.c;c===olympe.H.sa.Ua.C.eu?(this.C.hc(),a(olympe.auth.oa.F.Dj,b)):c===olympe.H.sa.Ua.C.Vu&&a(olympe.auth.oa.F.op,
798
- b)},'logoutHandler')}la(a,b){Ni(this,olympe.H.sa.Ua.C.vf,{token:a.Qd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.sa.Ua.C.cc:b(Error('Invalid token'));break;case olympe.H.sa.Ua.C.Vi:c=null;var e=d.payload;if(e){d=e.userName;const f=e.userTag,g=e.rndCook,h=e.payload,k=e.protocol;'SAML'===k?(e=e.samlToken,c=new olympe.auth.Hq(d,f,g,h),c.F=e):'openid'===k&&(c=new olympe.auth.im(d,f,g,h))}b(null,c);break;default:b(Error('Unknown response from server'))}})}Ka(a,b){Ni(this,olympe.H.sa.Ua.C.st,
799
- {I:a.zd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.sa.Ua.C.cc:b(Error(`Username '${a.zd()}' invalid, or password does not match`));break;case olympe.H.sa.Ua.C.ev:c=d.payload;b(null,c.S,c.B);break;default:b(Error('Unknown response from server'))}})}Wa(a,b){Ni(this,olympe.H.sa.Ua.C.vs,{A:a.get('a'),M:a.get('m1'),I:a.zd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.sa.Ua.C.cc:this.N.debug('Login failed, invalid username or password');b(Error('Invalid username or password'));
800
- break;case olympe.H.sa.Ua.C.Vi:c=d.payload;this.N.debug('Login successful, creating token');d=c.payload?JSON.parse(c.payload):void 0;b(null,new olympe.auth.Bf(c.userName,c.userTag,c.rndCook,d));break;default:b(Error(`Unknown response from server (type ${d.c})`))}})}Fa(a,b){Ni(this,olympe.H.sa.Ua.C.Oe,zc(a)?{idpName:zc(a)}:{},(c,d)=>{null!==c?b(c):d.url&&d.request?b(null,d.url,d.request.replace(/\s/g,''),d.id):b(Error('Missing parameters from server response'))})}qa(a,b){const c=null==a?void 0:a.Ih();
801
- if(a instanceof olympe.auth.im){const d=f=>{const g=Object.create(null);g.url=f;g.olympe_token=a.Qd();g.access_token=a.Zj().access_token||null;this.F.redirect(`${this.K}/logout${c?`?idpName=${c}`:''}`,g)};b=this.F.C();const e=new URL(b);if(0!==e.hash.length||0!==e.search.length){const f=this.storage.C('AUTH');e.hash='';e.search='';f&&f.set('redirectTo',b,()=>{f.close();d(e.toString())})}else d(b)}else this.C.V(olympe.H.Wc.vf,Object.assign({},{c:olympe.H.sa.Ua.C.fu},c&&{idpName:c}),b)}wh(a){this.C.V(olympe.H.Wc.vf,
802
- {c:olympe.H.sa.Ua.C.rg},a)}rh(a,b,c){this.C.uc(this.xb+'/'+a,olympe.H.Wc.vf,b,!1,null,(d,e)=>{c(d,e)})}G(){return this.C.wd()}P(){return this.C.qd()}Qr(){return this.K}};olympe.H.sa.Ua.C={vf:1,fu:2,cc:3,rg:5,Vi:6,st:10,ev:11,vs:12,Oe:13,Vu:14,eu:20};olympe.H.sa.Ua.ma=[olympe.auth.gv,olympe.auth.Jb.sa.Li,olympe.auth.Jb.sa.Ie,olympe.auth.Jb.sa.Oe];olympe.H.aa={};olympe.H.aa.Yc=function(){};olympe.H.aa.Yc.prototype.ka=function(){};olympe.H.aa.Ne=function(){};olympe.H.aa.Ne.prototype.ka=function(){};olympe.H.aa.cb=function(){};olympe.H.aa.cb.prototype.ka=function(){};olympe.H.aa.Ef=function(){};olympe.H.aa.Ef.prototype.ka=function(){};olympe.H.aa.hb=function(){this.Y={};this.Eb={};this.W={};this.pa=Object.create(null);var a=new olympe.H.aa.Y.Sb;this.Y[O(olympe.dc.Y.Sb)]=a;a=new olympe.H.aa.Y.Fe;this.Y[O(olympe.dc.Y.Fe)]=a;a=new olympe.H.aa.Y.Dc;this.Y[O(olympe.dc.Y.Dc)]=a;this.Y[O(olympe.dc.Y.Jd)]=new olympe.H.aa.Y.Jd;this.Y[O(olympe.dc.Y.tc)]=new olympe.H.aa.Y.tc;this.Y[O(olympe.dc.Y.ae)]=new olympe.H.aa.Y.ae;this.Y[O(olympe.dc.Y.Ae)]=new olympe.H.aa.Y.Ae;a=new olympe.H.aa.Eb.Number;this.Eb[O(olympe.dc.Eb.Number)]=a;a=new olympe.H.aa.Eb.String;
803
- this.Eb[O(olympe.dc.Eb.String)]=a;a=new olympe.H.aa.W.Gc;this.W[O(olympe.dc.W.Gc)]=a;this.W[O(olympe.dc.W.Ce)]=new olympe.H.aa.W.Ce;this.W[O(olympe.dc.W.Je)]=new olympe.H.aa.W.Je;a=new olympe.H.aa.W.Uc;this.W[O(olympe.dc.W.Uc)]=a;a=new olympe.H.aa.W.vd;this.W[O(olympe.dc.W.vd)]=a;this.W[O(olympe.dc.W.ld)]=new olympe.H.aa.W.ld;a=new olympe.H.aa.W.qf;this.W[O(olympe.dc.W.qf)]=a;a=new olympe.H.aa.W.sf;this.W[O(olympe.dc.W.sf)]=a;this.pa[O(olympe.dc.pa.Cd)]=new olympe.H.aa.pa.Cd;a=new olympe.H.aa.pa.oe;
804
- this.pa[O(olympe.dc.pa.oe)]=a;a=new olympe.H.aa.pa.se;this.pa[O(olympe.dc.pa.se)]=a;a=new olympe.H.aa.pa.xe;this.pa[O(olympe.dc.pa.xe)]=a;a=new olympe.H.aa.pa.ne;this.pa[O(olympe.dc.pa.ne)]=a;this.pa[O(olympe.dc.pa.Af)]=new olympe.H.aa.pa.Af};olympe.H.aa.hb.prototype.constructor=olympe.H.aa.hb;function Oi(a,b,c){var d=b.na(),e=a.W[d];if(void 0===e)throw Error('No predicate registered for predicate: '+d);return e.ka(b,c,a)}
793
+ olympe.H.wa.gb.sb.send=olympe.H.wa.gb.sb.send;olympe.H.wa.gb.sb.publish=olympe.H.wa.gb.sb.publish;olympe.H.wa.gb.sb.prototype.stop=olympe.H.wa.gb.sb.prototype.stop;olympe.H.wa.gb.sb.prototype.listen=olympe.H.wa.gb.sb.prototype.listen;const Fi=olympe.H.wa.Hb.Response.ja.Jn,Gi=olympe.H.wa.Hb.Response.ja.cc,Hi=olympe.H.wa.Hb.Response.ja.Fm,Ii=olympe.H.wa.Hb.Response.ja.Bm,Ji=olympe.H.wa.Hb.Response.ja.ar,Ki=olympe.H.wa.Hb.Request.ja.SEND,Li=olympe.H.wa.Hb.Request.ja.GET,Mi=olympe.H.wa.Hb.Request.ja.SUBSCRIBE;
794
+ olympe.H.wa.gb.ha=class{constructor(a,b){this.request=a;this.C=b;this.user=null}Dj(){return null!==this.user?Promise.resolve(this.user):vi(this.C,this.request).then(a=>this.user=a)}source(){return this.request.source}body(){return this.request.F}Jk(){return this.request.C===Ki?this.C.we(this.request,Fi,void 0):Promise.reject('Should only call `ack` on SEND requests')}we(a){return this.request.C===Li?this.C.we(this.request,Hi,a):Promise.reject('Should only call `reply` on GET requests')}vn(a){return this.request.C!==
795
+ Mi?Promise.reject('Should only call `notifyOn` on SUBSCRIBE requests'):this.C.we(this.request,Ii,{topic:a}).then(()=>new Promise((b,c)=>{ti(this.C,this.request.G,d=>{switch(d.F){case Ji:b();break;case Gi:c(d.C.reason);break;default:c('Unsupported response type for a SUBSCRIBE request')}})}))}Bg(a){return this.C.we(this.request,Gi,{reason:a.message})}};olympe.H.wa.gb.ha.prototype.fail=olympe.H.wa.gb.ha.prototype.Bg;olympe.H.wa.gb.ha.prototype.notifyOn=olympe.H.wa.gb.ha.prototype.vn;
796
+ olympe.H.wa.gb.ha.prototype.reply=olympe.H.wa.gb.ha.prototype.we;olympe.H.wa.gb.ha.prototype.ack=olympe.H.wa.gb.ha.prototype.Jk;olympe.H.wa.gb.ha.prototype.body=olympe.H.wa.gb.ha.prototype.body;olympe.H.wa.gb.ha.prototype.source=olympe.H.wa.gb.ha.prototype.source;olympe.H.wa.gb.ha.prototype.userTag=olympe.H.wa.gb.ha.prototype.Dj;olympe.H.sa={};function Ni(a,b,c,d){c.c=b;a.C.V(olympe.H.Wc.uf,c,d)}
797
+ olympe.H.sa.Ua=class{constructor(a,b,c,d,e,f,g,h,k){this.N=a;this.C=b;this.F=h;this.xb=c;this.K=g;this.storage=k;const l=this.storage.C('AUTH');l&&(l.get('redirectTo',n=>{n&&(l.remove('redirectTo'),l.close(),this.F.redirect(n,null,olympe.auth.rk.C.GET))}),l.close())}ba(a){this.C.be(a)}V(a){this.C.$k(a)}$(a){this.C.de(a)}fb(a){this.C.Md(olympe.H.Wc.uf,'logoutHandler');this.C.Fa(olympe.H.Wc.uf,b=>{const c=b.c;c===olympe.H.sa.Ua.C.fu?(this.C.mc(),a(olympe.auth.oa.F.Ej,b)):c===olympe.H.sa.Ua.C.Wu&&a(olympe.auth.oa.F.pp,
798
+ b)},'logoutHandler')}la(a,b){Ni(this,olympe.H.sa.Ua.C.uf,{token:a.Pd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.sa.Ua.C.cc:b(Error('Invalid token'));break;case olympe.H.sa.Ua.C.Vi:c=null;var e=d.payload;if(e){d=e.userName;const f=e.userTag,g=e.rndCook,h=e.payload,k=e.protocol;'SAML'===k?(e=e.samlToken,c=new olympe.auth.Iq(d,f,g,h),c.F=e):'openid'===k&&(c=new olympe.auth.jm(d,f,g,h))}b(null,c);break;default:b(Error('Unknown response from server'))}})}Ka(a,b){Ni(this,olympe.H.sa.Ua.C.tt,
799
+ {I:a.yd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.sa.Ua.C.cc:b(Error(`Username '${a.yd()}' invalid, or password does not match`));break;case olympe.H.sa.Ua.C.fv:c=d.payload;b(null,c.S,c.B);break;default:b(Error('Unknown response from server'))}})}Wa(a,b){Ni(this,olympe.H.sa.Ua.C.ws,{A:a.get('a'),M:a.get('m1'),I:a.yd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.sa.Ua.C.cc:this.N.debug('Login failed, invalid username or password');b(Error('Invalid username or password'));
800
+ break;case olympe.H.sa.Ua.C.Vi:c=d.payload;this.N.debug('Login successful, creating token');d=c.payload?JSON.parse(c.payload):void 0;b(null,new olympe.auth.zf(c.userName,c.userTag,c.rndCook,d));break;default:b(Error(`Unknown response from server (type ${d.c})`))}})}Fa(a,b){Ni(this,olympe.H.sa.Ua.C.Pe,zc(a)?{idpName:zc(a)}:{},(c,d)=>{null!==c?b(c):d.url&&d.request?b(null,d.url,d.request.replace(/\s/g,''),d.id):b(Error('Missing parameters from server response'))})}qa(a,b){const c=null==a?void 0:a.Hh();
801
+ if(a instanceof olympe.auth.jm){const d=f=>{const g=Object.create(null);g.url=f;g.olympe_token=a.Pd();g.access_token=a.$j().access_token||null;this.F.redirect(`${this.K}/logout${c?`?idpName=${c}`:''}`,g)};b=this.F.C();const e=new URL(b);if(0!==e.hash.length||0!==e.search.length){const f=this.storage.C('AUTH');e.hash='';e.search='';f&&f.set('redirectTo',b,()=>{f.close();d(e.toString())})}else d(b)}else this.C.V(olympe.H.Wc.uf,Object.assign({},{c:olympe.H.sa.Ua.C.gu},c&&{idpName:c}),b)}wh(a){this.C.V(olympe.H.Wc.uf,
802
+ {c:olympe.H.sa.Ua.C.og},a)}qh(a,b,c){this.C.uc(this.xb+'/'+a,olympe.H.Wc.uf,b,!1,null,(d,e)=>{c(d,e)})}G(){return this.C.Ld()}P(){return this.C.qd()}Rr(){return this.K}};olympe.H.sa.Ua.C={uf:1,gu:2,cc:3,og:5,Vi:6,tt:10,fv:11,ws:12,Pe:13,Wu:14,fu:20};olympe.H.sa.Ua.ma=[olympe.auth.hv,olympe.auth.Jb.sa.Li,olympe.auth.Jb.sa.Ie,olympe.auth.Jb.sa.Pe];olympe.H.aa={};olympe.H.aa.Yc=function(){};olympe.H.aa.Yc.prototype.ka=function(){};olympe.H.aa.Ne=function(){};olympe.H.aa.Ne.prototype.ka=function(){};olympe.H.aa.cb=function(){};olympe.H.aa.cb.prototype.ka=function(){};olympe.H.aa.Cf=function(){};olympe.H.aa.Cf.prototype.ka=function(){};olympe.H.aa.hb=function(){this.Y={};this.Db={};this.W={};this.pa=Object.create(null);var a=new olympe.H.aa.Y.Sb;this.Y[O(olympe.dc.Y.Sb)]=a;a=new olympe.H.aa.Y.Fe;this.Y[O(olympe.dc.Y.Fe)]=a;a=new olympe.H.aa.Y.Dc;this.Y[O(olympe.dc.Y.Dc)]=a;this.Y[O(olympe.dc.Y.Id)]=new olympe.H.aa.Y.Id;this.Y[O(olympe.dc.Y.rc)]=new olympe.H.aa.Y.rc;this.Y[O(olympe.dc.Y.$d)]=new olympe.H.aa.Y.$d;this.Y[O(olympe.dc.Y.Ae)]=new olympe.H.aa.Y.Ae;a=new olympe.H.aa.Db.Number;this.Db[O(olympe.dc.Db.Number)]=a;a=new olympe.H.aa.Db.String;
803
+ this.Db[O(olympe.dc.Db.String)]=a;a=new olympe.H.aa.W.Gc;this.W[O(olympe.dc.W.Gc)]=a;this.W[O(olympe.dc.W.Ce)]=new olympe.H.aa.W.Ce;this.W[O(olympe.dc.W.Je)]=new olympe.H.aa.W.Je;a=new olympe.H.aa.W.Uc;this.W[O(olympe.dc.W.Uc)]=a;a=new olympe.H.aa.W.vd;this.W[O(olympe.dc.W.vd)]=a;this.W[O(olympe.dc.W.ld)]=new olympe.H.aa.W.ld;a=new olympe.H.aa.W.pf;this.W[O(olympe.dc.W.pf)]=a;a=new olympe.H.aa.W.rf;this.W[O(olympe.dc.W.rf)]=a;this.pa[O(olympe.dc.pa.Bd)]=new olympe.H.aa.pa.Bd;a=new olympe.H.aa.pa.oe;
804
+ this.pa[O(olympe.dc.pa.oe)]=a;a=new olympe.H.aa.pa.se;this.pa[O(olympe.dc.pa.se)]=a;a=new olympe.H.aa.pa.xe;this.pa[O(olympe.dc.pa.xe)]=a;a=new olympe.H.aa.pa.ne;this.pa[O(olympe.dc.pa.ne)]=a;this.pa[O(olympe.dc.pa.yf)]=new olympe.H.aa.pa.yf};olympe.H.aa.hb.prototype.constructor=olympe.H.aa.hb;function Oi(a,b,c){var d=b.na(),e=a.W[d];if(void 0===e)throw Error('No predicate registered for predicate: '+d);return e.ka(b,c,a)}
805
805
  function Pi(a,b,c){var d=b.na(),e=a.pa[d];if(void 0===e)throw Error('No valueDef registered for valueDef: '+d);return e.ka(b,c,a)}
806
- function Qi(a,b){return a&&a.Ff?'"$'+b.add(a)+'"':a instanceof olympe.D.ra||a instanceof olympe.D.ga?String(a):a instanceof olympe.D.$a?'"'+a+'"':a instanceof olympe.D.jb?(a=a.ms(),String(`{"c":4,"y":${a.getUTCFullYear()},"M":${a.getUTCMonth()+1},"d":${a.getUTCDate()},"h":${a.getUTCHours()},"m":${a.getUTCMinutes()},"s":${a.getUTCSeconds()},"S":${a.getUTCMilliseconds()},"z":0}`)):a instanceof olympe.D.Color?'{"c":7,"r":'+a.Wf().valueOf()+',"g":'+a.Qf().valueOf()+',"b":'+a.Lf().valueOf()+',"a":'+a.Kf().valueOf()+
807
- '}':a instanceof olympe.dc.Ec?'{"c":8,"t":"'+a.T()+'"}':JSON.stringify(a)};olympe.H.aa.Uj=class{ka(a){const b=Object.create(null);b.i=a.Z();b.b=[a.C];b.m=!0;b.v=!0;b.f=a instanceof olympe.dc.query.Rl?gf(a.sh):olympe.dc.Qb.NONE;b.q=yf(a).map(this.C.bind(this));return b}C(a){const b=a.Rd(),c=b.Sa()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ji:olympe.H.aa.Y.Sb.C.Ti,d=Object.create(null);d.t=b.T();d.d=c;d.v=a.apply;d.r=b.recursive;d.q=a.oh().map(this.C.bind(this));return d}};olympe.H.aa.Y={};olympe.H.aa.Y.Ae=class{ka(){return'{"y":15}'}};olympe.H.aa.Y.Ae.ma=[olympe.H.aa.Yc];olympe.H.aa.Y.tc=function(){};olympe.H.aa.Y.tc.prototype.constructor=olympe.H.aa.Y.tc;olympe.H.aa.Y.tc.prototype.ka=function(a,b,c){return'{"y":21,"p":'+Oi(c,a.C,b)+'}'};olympe.H.aa.Y.tc.ma=[olympe.H.aa.Yc];olympe.H.aa.Y.Fe=function(){};olympe.H.aa.Y.Fe.prototype.constructor=olympe.H.aa.Y.Fe;olympe.H.aa.Y.Fe.prototype.ka=function(a){var b=null!==a.Sa()?a.Sa()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ji:olympe.H.aa.Y.Sb.C.Ti:olympe.H.aa.Y.Sb.C.Tn;return'{"y":12,"t":'+JSON.stringify(mh(a))+',"d":'+b+'}'};olympe.H.aa.Y.Fe.ma=[olympe.H.aa.Yc];olympe.H.aa.Y.Dc=function(){};olympe.H.aa.Y.Dc.prototype.constructor=olympe.H.aa.Y.Dc;olympe.H.aa.Y.Dc.prototype.ka=function(a){const b=null!==a.Sa()?a.Sa()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ji:olympe.H.aa.Y.Sb.C.Ti:olympe.H.aa.Y.Sb.C.Tn;return'{"y":11,"t":"'+a.T()+'","d":'+b+',"s":'+a.F+',"e":'+a.C+'}'};olympe.H.aa.Y.Dc.ma=[olympe.H.aa.Yc];olympe.H.aa.Y.Sb=function(){};olympe.H.aa.Y.Sb.C={Tn:0,Ji:1,Ti:2};olympe.H.aa.Y.Sb.prototype.constructor=olympe.H.aa.Y.Sb;olympe.H.aa.Y.Sb.prototype.ka=function(a){const b=a.Sa()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ji:olympe.H.aa.Y.Sb.C.Ti;return'{"y":10,"t":"'+a.T()+'","d":'+b+'}'};olympe.H.aa.Y.Sb.ma=[olympe.H.aa.Yc];olympe.H.aa.Y.Jd=function(){};olympe.H.aa.Y.Jd.prototype.constructor=olympe.H.aa.Y.Jd;olympe.H.aa.Y.Jd.prototype.ka=function(a,b,c){var d=a.Kd;const e=d.na();var f=c.Eb[e];if(void 0===f)throw Error('No comparator registered for comparator: '+e);return'{"y":20,"o":'+f.ka(d,b,c)+(a.C?'':',"a":false')+'}'};olympe.H.aa.Y.Jd.ma=[olympe.H.aa.Yc];olympe.H.aa.Y.ae=function(){};olympe.H.aa.Y.ae.prototype.constructor=olympe.H.aa.Y.ae;olympe.H.aa.Y.ae.prototype.ka=function(a,b){var c=a.start;c=c&&c.Ff?'"$'+b.add(c)+'"':JSON.stringify(c);a=(a=a.C)&&a.Ff?'"$'+b.add(a)+'"':JSON.stringify(a);return'{"y":22,"s":'+c+',"n":'+a+'}'};olympe.H.aa.Y.ae.ma=[olympe.H.aa.Yc];olympe.H.aa.Eb={};olympe.H.aa.Eb.Number=class{constructor(){}ka(a,b,c){return`{"y":11,"v":${Pi(c,a.C,b)}}`}};olympe.H.aa.Eb.Number.ma=[olympe.H.aa.Ne];olympe.H.aa.Eb.String=class{constructor(){}ka(a,b,c){return`{"y":10,"v":${Pi(c,a.C,b)}}`}};olympe.H.aa.Eb.String.ma=[olympe.H.aa.Ne];olympe.H.aa.W={};olympe.H.aa.W.Uc=function(){};olympe.H.aa.W.Uc.prototype.constructor=olympe.H.aa.W.Uc;olympe.H.aa.W.Uc.prototype.ka=function(a,b,c){const d=Pi(c,a.source,b);c=Pi(c,a.getValue(),b);a=Qi(a.G,b);return'{"y":20,"s":'+d+',"v":'+c+',"a":'+a+'}'};olympe.H.aa.W.Uc.ma=[olympe.H.aa.cb];olympe.H.aa.W.Gc=function(){};olympe.H.aa.W.Gc.prototype.constructor=olympe.H.aa.W.Gc;olympe.H.aa.W.Gc.prototype.ka=function(a,b,c){const d=Pi(c,a.G,b);a=Pi(c,a.K,b);return'{"y":10,"l":'+d+',"r":'+a+'}'};olympe.H.aa.W.Gc.ma=[olympe.H.aa.cb];olympe.H.aa.W.Ce=function(){};olympe.H.aa.W.Ce.prototype.constructor=olympe.H.aa.W.Ce;olympe.H.aa.W.Ce.prototype.ka=function(a,b,c){const d=Pi(c,a.G,b);a=Pi(c,a.K,b);return'{"y":11,"l":'+d+',"r":'+a+'}'};olympe.H.aa.W.Ce.ma=[olympe.H.aa.cb];olympe.H.aa.W.qf=class{ka(a){const b=gh(a).map(d=>'"'+d+'"'),c=hh(a).map(d=>d===olympe.dc.Ca.DESTINATION?'2':'1');a=a.G;return'{"y":81,"r":['+b.toString()+'],"d":['+c.toString()+']'+(0!==a.length?',"t":"'+a.toString()+'"':'')+'}'}};olympe.H.aa.W.qf.ma=[olympe.H.aa.cb];olympe.H.aa.W.sf=class{ka(a){return'{"y":80,"m":['+Array.from(a.G).map(b=>'"'+b+'"').toString()+']}'}};olympe.H.aa.W.sf.ma=[olympe.H.aa.cb];olympe.H.aa.W.ld=class{ka(a,b,c){return'{"y":30,"p":'+Oi(c,a.G,b)+'}'}};olympe.H.aa.W.ld.ma=[olympe.H.aa.cb];olympe.H.aa.W.vd=class{ka(a,b,c){c=Pi(c,a.source,b);const d=a.K;a=Qi(a.G,b);return'{"y":23,"s":'+c+',"r":"'+d+'","a":'+a+'}'}};olympe.H.aa.W.vd.ma=[olympe.H.aa.cb];olympe.H.aa.W.Je=function(){};olympe.H.aa.W.Je.prototype.constructor=olympe.H.aa.W.Je;olympe.H.aa.W.Je.prototype.ka=function(a,b,c){var d=Pi(c,a.G,b);a=Pi(c,a.K,b);return'{"y":12,"l":'+d+',"r":'+a+'}'};olympe.H.aa.W.Je.ma=[olympe.H.aa.cb];olympe.H.aa.pa={};olympe.H.aa.pa.Kc=function(){};olympe.H.aa.pa.Kc.prototype.constructor=olympe.H.aa.pa.Kc;olympe.H.aa.pa.Kc.prototype.C=function(){};
808
- olympe.H.aa.pa.Kc.prototype.ka=function(a,b,c){var d=Qi(a.af,b),e=a.Od();e=e?',"b":'+Qi(e,b):'';if(a=a.Jg()){var f='[';for(let n=0,p=a.length;n<p;n++){var g=0===n?'':',';var h=c;var k=a[n],l=b;const q=k.na(),r=h.Y[q];if(void 0===r)throw Error('No serializer registered for transformer: '+q);h=r.ka(k,l,h);f+=g+h}b=',"q":'+(f+']')}else b='';return'{"y":'+this.C()+',"t":'+d+e+b+'}'};olympe.H.aa.pa.Kc.ma=[olympe.H.aa.Ef];olympe.H.aa.pa.xe=function(){olympe.H.aa.pa.Kc.call(this)};olympe.H.aa.pa.xe.prototype=Object.create(olympe.H.aa.pa.Kc.prototype);olympe.H.aa.pa.xe.prototype.constructor=olympe.H.aa.pa.xe;olympe.H.aa.pa.xe.prototype.C=function(){return 13};olympe.H.aa.pa.Cd=class{ka(a,b){return'{"y":10,"v":'+Qi(a.value,b)+'}'}};olympe.H.aa.pa.Cd.ma=[olympe.H.aa.Ef];olympe.H.aa.pa.ne=function(){olympe.H.aa.pa.Kc.call(this)};olympe.H.aa.pa.ne.prototype=Object.create(olympe.H.aa.pa.Kc.prototype);olympe.H.aa.pa.ne.prototype.constructor=olympe.H.aa.pa.ne;olympe.H.aa.pa.ne.prototype.C=function(){return 14};olympe.H.aa.pa.oe=function(){olympe.H.aa.pa.Kc.call(this)};olympe.H.aa.pa.oe.prototype=Object.create(olympe.H.aa.pa.Kc.prototype);olympe.H.aa.pa.oe.prototype.constructor=olympe.H.aa.pa.oe;olympe.H.aa.pa.oe.prototype.C=function(){return 11};olympe.H.aa.pa.se=function(){olympe.H.aa.pa.Kc.call(this)};olympe.H.aa.pa.se.prototype=Object.create(olympe.H.aa.pa.Kc.prototype);olympe.H.aa.pa.se.prototype.constructor=olympe.H.aa.pa.se;olympe.H.aa.pa.se.prototype.C=function(){return 12};olympe.H.aa.pa.Af=class{ka(){return'{"y":19}'}};olympe.H.aa.pa.Af.ma=[olympe.H.aa.Ef];olympe.H.rd={};function Ri(a,b,c){a.N.info('Initializing SERVER layer');if(a.N.G()){const d=['Server layer parameters:'];b.forEach((e,f)=>{d.push(f+'="'+e+'"')});a.N.debug(d.join('\n\t'))}a.Fa(olympe.H.Wc.cc,d=>{switch(d.c){case olympe.H.ja.vv:a.N.error('Unknown message sent to the server:',olympe.H.oa.F[d.s]);break;case olympe.H.ja.et:a.N.error('Fatal error, the last message is probably too big according to the websocket config.'),a.G.forEach((e,f)=>{null!==e.Bn&&Si(a,f,d.i)})}});b.get('autoConnect')&&(a.N.debug('Connecting automatically'),
809
- a.connect());olympe.D.kn(a.P.zb(),()=>{a.bs.forEach(d=>d());kc(a.Dy.bind(a),a.Hy);kc(a.Ye.bind(a),a.sj)},()=>{a.$=null;a.Wk.forEach(d=>d(a.K[2]));a.Ye()});c.C(()=>a.qa()?Promise.resolve('WebSocket connection to Orchestrator OK'):Promise.reject(`WebSocket connection to Orchestrator is ${a.C}`));c.ba(()=>x(function*(){return a.disconnect()}));a.N.log('DONE initializing SERVER layer (waiting for NET layer connection to be opened)')}
810
- function Z(a,b){if(a.C!==b){a.N.debug('State change '+a.C+' --\x3e '+b);a.C=b;var c;null==(c=a.ds)||c.call(a,b);switch(b){case olympe.H.oa.C.CONNECTING:break;case olympe.H.oa.C.ti:a.P.update(olympe.D.ra.F);break;case olympe.H.oa.C.dh:a.K[0]=0;a.K[1]=0;a.connect();break;case olympe.H.oa.C.cc:a.N.error('Connection to server',a.la.C(),'aborted due to error');a.P.update(olympe.D.ra.C);break;case olympe.H.oa.C.Yh:break;case olympe.H.oa.C.zh:a.connect();break;case olympe.H.oa.C.lf:a.P.update(olympe.D.ra.C);
811
- a.Db&&(a.N.info('Disconnected, will try to auto reconnect in',a.fc,'ms'),jc(()=>{a.connect()},a.fc));break;default:throw Error('State machine error in server manager. Should not get in state '+b);}}}
812
- function Ti(a,b){const c=olympe.H.oa.K.Vi,d=olympe.H.oa.K.ou;return e=>{if(null!==e&&void 0!==e){var f=null,g=e.s;if(g===d)a.N.debug(`Try to unsubscribe multiple times. This could be because you logged out before unsubscribe. ${e.info.error.reason}`);else if(void 0!==g&&g!==c){f=void 0!==olympe.H.oa.F[g]?`Status code = ${g} [${olympe.H.oa.F[g]}]`:`Status code = ${g}`;g=e.info;if(void 0!==g&&void 0!==g.error){var h=g.error.reason;'string'===typeof h&&0<h.length&&(f+=`\nReason:\n${g.error.reason}`);
813
- h=g.error.detailedReason;'string'===typeof h&&0<h.length&&(f+=`\nDetails:\n${g.error.detailedReason}`)}f=Error('Rejected by orchestrator:\n'+f)}b(f,e)}}}function Ui(a,b,c){var d=c.message;a.N.G()&&a.N.debug('>',Vi(d));(d=a.F.send(JSON.stringify(d)))?null===c.ai?a.G.delete(b):c.Bn=Date.now():Z(a,olympe.H.oa.C.dh);return d}
814
- function Vi(a){var b=JSON.parse(JSON.stringify(a));a=olympe.X.Nr;const c=b.messageFamily,d=a(olympe.H.Wc,c),e=b.payload;b='';switch(c){case olympe.H.Wc.vi:b=a(olympe.dc.ha.ja,e.c);break;case olympe.H.Wc.cc:b=a(olympe.H.ja,e.c);break;case olympe.H.Wc.vf:b=a(olympe.H.sa.Ua.C,e.c);break;case olympe.H.Wc.Fi:2===e.c&&(b=a(olympe.H.oa.G,e.status))}a=`${d} message`;b&&0<b.length&&(a+=` with payload "${b}"`);return a}
815
- function Si(a,b,c){if(a.G.has(b)){const {ai:d}=a.G.get(b);a.G.delete(b);d&&d({s:23,info:c})}}function Wi(a,b){a.N.error(b);Z(a,olympe.H.oa.C.cc)}function Xi(a,b,c){a.ie=null!=c?c:-1;a.N.info('Connected to',a.la.C(),' | ',b?'server version:'+b:'',null!==c?`activity timeout: ${c}s`:'');b=Array.from(a.G).sort(([d],[e])=>d-e);for(const [d,e]of b)if(!Ui(a,d,e))return;Z(a,olympe.H.oa.C.ti)}
816
- olympe.H.rd.oa=class{constructor(a,b,c,d,e,f){this.N=a;this.xb=b;this.la=d;this.F=null;this.config=f;this.fc=this.config.get('reconnectionDelay');this.eb=e;this.ds=null;this.Hy=this.config.get('pingInterval');this.az=this.fc/2;this.Db=f.get('autoConnect');this.fz=f.get('retryHttpOverload');this.sj=f.get('messageTimeout');this.ba=Oa(f.get('clientVersion'));this.Wa=Oa(f.get('serverVersion'));this.C=olympe.H.oa.C.INIT;this.$c=f.get('getContextMode');this.cs=1;this.$=null;this.K=[0,0,0];this.Ka=new Map;
817
- this.P=olympe.D.Ic(olympe.D.ra,'Server is online');this.bs=new Map;this.Wk=new Map;this.G=new Map;this.uh=new Map;this.ie=-1;Ri(this,f,c)}qa(){return this.C===olympe.H.oa.C.ti}connect(){const a=olympe.H.oa.C.INIT,b=olympe.H.oa.C.CONNECTING,c=olympe.H.oa.C.ti,d=olympe.H.oa.C.lf,e=olympe.H.oa.C.dh,f=olympe.H.oa.C.Yh,g=olympe.H.oa.C.zh,h=olympe.H.oa.C.cc;null!==this.F&&(this.F.$(null),this.F.close());this.Db=!0;this.N.log(`Asking NET layer for a connection to ${Fb(this.la)}:${this.la.port}...`);this.F=
818
- this.xb.G(this.la);this.F.la(this.hc.bind(this));this.F.ba(this.Nc.bind(this));this.F.$(()=>{this.F=null;this.C===c?Z(this,e):this.C!==h&&this.C!==f&&Z(this,d)});this.eb&&this.C===a&&this.F.F(()=>{this.F.F(null);if(this.C===b){var k=Gb(this.eb);this.N.info(`Trying to wakeup orchestrator with ${k}`);Z(this,f);var l=this.xb.G(this.eb);l.ba(n=>{const p=JSON.parse(n);this.N.info(`${k}: ${null==p?void 0:p.status}`);switch(null==p?void 0:p.status){case 'ready':Z(this,g);l.close();break;case 'asleep':this.N.info(`Trying to wakeup orchestrator with ${k}`);
819
- l.send('{"action": "wakeup"}');Z(this,f);break;case 'waking-up':break;default:this.N.warn(`Invalid message from ${k}: ${n}`),l.close(),Z(this,d)}});l.F(()=>{this.N.warn(`Communication with ${k} failed.`);l.close();Z(this,d)});l.la(()=>{this.N.info(`Checking orchestrator status with ${k}`);l.send('{"action": "status"}')})}this.eb=null});this.C!==e&&Z(this,b)}disconnect(){const a=olympe.H.oa.C.CONNECTING;if(this.C===olympe.H.oa.C.ti||this.C===a)this.Db=!1,Z(this,olympe.H.oa.C.lf),this.F.close()}ce(a){const b=
820
- olympe.X.bc();this.bs.set(b,a);olympe.D.Xa(this.P)===olympe.D.ra.F&&a()}Zk(a){var b;void 0===b&&(b=olympe.X.bc());this.Wk.set(b,a);olympe.D.Xa(this.P)===olympe.D.ra.C&&a(this.K[2])}hc(){this.N.debug('Websocket connected, sending handshake. Client version:',Pa(this.ba),'subscribeEverything:',this.$c?'NO':'YES');this.V(olympe.H.Wc.Fi,{c:olympe.H.ja.Fi,cv:Pa(this.ba),m:this.$c?0:1,s:this.$},this.Ey.bind(this))}V(a,b,c){const d=this.cs;this.cs++;b={message:{seqId:d,messageFamily:a,payload:b},ai:c?Ti(this,
821
- c):null,Bn:null};this.G.set(d,b);c=[olympe.H.oa.C.CONNECTING,olympe.H.oa.C.dh];(this.qa()||a===olympe.H.Wc.Fi&&c.includes(this.C))&&Ui(this,d,b)}uc(a,b,c,d,e,f){c&&''!==c||this.N.warn('Trying to send an http request with an invalid authorizationToken');const g=Ib(a);if(e){g.method=olympe.net.ab.Gd.km;e=d?e:{messageFamily:b,seqId:1,payload:e};const k=JSON.stringify(e);g.body=k;Jb(g,{'Content-Type':'application/json'});this.N.log('HTTP POST >',Vi(e))}else this.N.log('HTTP GET call to',a);g.F=olympe.net.ab.ResponseType.xk;
822
- Jb(g,{Authorization:c});const h=()=>{this.xb.C(g,k=>{switch(k.Sd()){case olympe.net.ab.Mc.bh:case olympe.net.ab.Mc.vl:case olympe.net.ab.Mc.Dj:k=k.getData();if(b!==olympe.H.Wc.vi||d){f&&f(null,k);break}k=this.Nc(k);f&&f(k);k&&this.N.error(k.message);break;case olympe.net.ab.Mc.Xu:jc(h,this.fz);break;case olympe.net.ab.Mc.Ds:this.N.debug(`HTTP request canceled (${a}).`);f&&f(null);break;case olympe.net.ab.Mc.tv:k=Error(`HTTP request authorization denied: ${a}`);f&&f(k);break;default:k=Error(`Server is currently not available, http status: ${k.Sd()}`),
823
- f&&f(k)}})};h()}Fa(a,b,c){void 0===c&&(c=olympe.X.bc());let d=this.Ka.get(a);void 0===d&&(d=new Map,this.Ka.set(a,d));d.set(c,b)}Md(a,b){a=this.Ka.get(a);void 0!==a&&a.delete(b)}Nd(a){this.ds=a}Ey(a,b){if(a)Wi(this,'Error in receiving handshake response: '+a.message);else{this.N.debug('Handshake response received');var c=olympe.H.oa.G;a=b.sv||'undefined';var d=b.activityTimeout?Math.max(b.activityTimeout-60,5):null;switch(b.status){case c.zt:Wi(this,`Framework version (${Pa(this.ba)}) provided to the orchestrator was not valid. See orchestrator logs for more info.`);
824
- return;case c.mv:Wi(this,`Framework version (${Pa(this.ba)}) is not compatible with the orchestrator in use. See orchestrator logs for more info.`);return;case c.lt:Wi(this,'Handshake failed. See orchestrator logs for more info.');return}if(this.Wa.nb(olympe.X.Xh.C))this.N.warn('Handshake successful but received server version',a,'is invalid. Cannot check against it');else try{var e=Oa(a);if(e.Aj(this.Wa)){Wi(this,`Framework v${Pa(this.ba)} is expecting Orchestrator to be at least in v${Pa(this.Wa)}`);
825
- return}this.N.log('Handshake successful. Orchestrator version: ',e,'required:',Pa(this.Wa))}catch(f){Wi(this,f);return}e=olympe.H.oa.C.lf;if(this.C===olympe.H.oa.C.dh&&null!==this.$&&this.$!==b.sessionId)this.N.warn('Trying to do a session recovering, but got another session id so retry from disconnected state'),Z(this,e);else{if(e=b.identityProviders)for(const [f,g]of Object.entries(e))this.uh.set(f,g);this.$=b.sessionId||null;Xi(this,a,d)}}}wd(){return new Map(this.uh)}qd(){return this.ie}Dy(){this.K[0]-
826
- this.K[1]>this.az?(this.N.debug('Ping did not get answer, try to reconnect'),Z(this,olympe.H.oa.C.dh)):(this.N.trace('Sending Ping'),this.K[0]=Date.now(),this.F.send('ping')||(this.N.debug('Impossible to send ping, try to reconnect'),Z(this,olympe.H.oa.C.dh)))}Nc(a){this.K[2]=Date.now();if(a.startsWith('pong'))return this.K[1]=this.K[2],null;try{var b=JSON.parse(a)}catch(d){return this.N.error('Unable to parse response from server: '+d.toString()),Error('Unable to parse response from server')}this.N.G()&&
827
- this.N.debug('<',Vi(b));a=b.seqId;const c=b.messageFamily;b=b.payload;if(this.G.has(a)){const {ai:d}=this.G.get(a);this.G.delete(a);d&&d(b)}a=this.Ka.get(c);if(void 0!==a)for(const d of a.values())d(b);return null}Ye(){const a=Date.now();for(const [b,{Bn:c}]of this.G)null!==c&&a-c>this.sj&&(this.N.warn(`No response was received from the server for the seqId = ${b}`),Si(this,b,{error:{reason:'Message timeout: never receive acknowledge'}}))}};olympe.H.oa.K={Vi:0,ou:18,FA:23};
806
+ function Qi(a,b){return a&&a.Df?'"$'+b.add(a)+'"':a instanceof olympe.D.ra||a instanceof olympe.D.ga?String(a):a instanceof olympe.D.$a?'"'+a+'"':a instanceof olympe.D.jb?(a=a.ns(),String(`{"c":4,"y":${a.getUTCFullYear()},"M":${a.getUTCMonth()+1},"d":${a.getUTCDate()},"h":${a.getUTCHours()},"m":${a.getUTCMinutes()},"s":${a.getUTCSeconds()},"S":${a.getUTCMilliseconds()},"z":0}`)):a instanceof olympe.D.Color?'{"c":7,"r":'+a.Uf().valueOf()+',"g":'+a.Of().valueOf()+',"b":'+a.Jf().valueOf()+',"a":'+a.If().valueOf()+
807
+ '}':a instanceof olympe.dc.Ec?'{"c":8,"t":"'+a.T()+'"}':JSON.stringify(a)};olympe.H.aa.Vj=class{ka(a){const b=Object.create(null);b.i=a.Z();b.b=[a.C];b.m=!0;b.v=!0;b.f=a instanceof olympe.dc.query.Sl?gf(a.rh):olympe.dc.Qb.NONE;b.q=yf(a).map(this.C.bind(this));return b}C(a){const b=a.Qd(),c=b.Sa()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ji:olympe.H.aa.Y.Sb.C.Ti,d=Object.create(null);d.t=b.T();d.d=c;d.v=a.apply;d.r=b.recursive;d.q=a.nh().map(this.C.bind(this));return d}};olympe.H.aa.Y={};olympe.H.aa.Y.Ae=class{ka(){return'{"y":15}'}};olympe.H.aa.Y.Ae.ma=[olympe.H.aa.Yc];olympe.H.aa.Y.rc=function(){};olympe.H.aa.Y.rc.prototype.constructor=olympe.H.aa.Y.rc;olympe.H.aa.Y.rc.prototype.ka=function(a,b,c){return'{"y":21,"p":'+Oi(c,a.C,b)+'}'};olympe.H.aa.Y.rc.ma=[olympe.H.aa.Yc];olympe.H.aa.Y.Fe=function(){};olympe.H.aa.Y.Fe.prototype.constructor=olympe.H.aa.Y.Fe;olympe.H.aa.Y.Fe.prototype.ka=function(a){var b=null!==a.Sa()?a.Sa()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ji:olympe.H.aa.Y.Sb.C.Ti:olympe.H.aa.Y.Sb.C.Un;return'{"y":12,"t":'+JSON.stringify(mh(a))+',"d":'+b+'}'};olympe.H.aa.Y.Fe.ma=[olympe.H.aa.Yc];olympe.H.aa.Y.Dc=function(){};olympe.H.aa.Y.Dc.prototype.constructor=olympe.H.aa.Y.Dc;olympe.H.aa.Y.Dc.prototype.ka=function(a){const b=null!==a.Sa()?a.Sa()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ji:olympe.H.aa.Y.Sb.C.Ti:olympe.H.aa.Y.Sb.C.Un;return'{"y":11,"t":"'+a.T()+'","d":'+b+',"s":'+a.F+',"e":'+a.C+'}'};olympe.H.aa.Y.Dc.ma=[olympe.H.aa.Yc];olympe.H.aa.Y.Sb=function(){};olympe.H.aa.Y.Sb.C={Un:0,Ji:1,Ti:2};olympe.H.aa.Y.Sb.prototype.constructor=olympe.H.aa.Y.Sb;olympe.H.aa.Y.Sb.prototype.ka=function(a){const b=a.Sa()===olympe.dc.Ca.ORIGIN?olympe.H.aa.Y.Sb.C.Ji:olympe.H.aa.Y.Sb.C.Ti;return'{"y":10,"t":"'+a.T()+'","d":'+b+'}'};olympe.H.aa.Y.Sb.ma=[olympe.H.aa.Yc];olympe.H.aa.Y.Id=function(){};olympe.H.aa.Y.Id.prototype.constructor=olympe.H.aa.Y.Id;olympe.H.aa.Y.Id.prototype.ka=function(a,b,c){var d=a.Jd;const e=d.na();var f=c.Db[e];if(void 0===f)throw Error('No comparator registered for comparator: '+e);return'{"y":20,"o":'+f.ka(d,b,c)+(a.C?'':',"a":false')+'}'};olympe.H.aa.Y.Id.ma=[olympe.H.aa.Yc];olympe.H.aa.Y.$d=function(){};olympe.H.aa.Y.$d.prototype.constructor=olympe.H.aa.Y.$d;olympe.H.aa.Y.$d.prototype.ka=function(a,b){var c=a.start;c=c&&c.Df?'"$'+b.add(c)+'"':JSON.stringify(c);a=(a=a.C)&&a.Df?'"$'+b.add(a)+'"':JSON.stringify(a);return'{"y":22,"s":'+c+',"n":'+a+'}'};olympe.H.aa.Y.$d.ma=[olympe.H.aa.Yc];olympe.H.aa.Db={};olympe.H.aa.Db.Number=class{constructor(){}ka(a,b,c){return`{"y":11,"v":${Pi(c,a.C,b)}}`}};olympe.H.aa.Db.Number.ma=[olympe.H.aa.Ne];olympe.H.aa.Db.String=class{constructor(){}ka(a,b,c){return`{"y":10,"v":${Pi(c,a.C,b)}}`}};olympe.H.aa.Db.String.ma=[olympe.H.aa.Ne];olympe.H.aa.W={};olympe.H.aa.W.Uc=function(){};olympe.H.aa.W.Uc.prototype.constructor=olympe.H.aa.W.Uc;olympe.H.aa.W.Uc.prototype.ka=function(a,b,c){const d=Pi(c,a.source,b);c=Pi(c,a.getValue(),b);a=Qi(a.G,b);return'{"y":20,"s":'+d+',"v":'+c+',"a":'+a+'}'};olympe.H.aa.W.Uc.ma=[olympe.H.aa.cb];olympe.H.aa.W.Gc=function(){};olympe.H.aa.W.Gc.prototype.constructor=olympe.H.aa.W.Gc;olympe.H.aa.W.Gc.prototype.ka=function(a,b,c){const d=Pi(c,a.G,b);a=Pi(c,a.K,b);return'{"y":10,"l":'+d+',"r":'+a+'}'};olympe.H.aa.W.Gc.ma=[olympe.H.aa.cb];olympe.H.aa.W.Ce=function(){};olympe.H.aa.W.Ce.prototype.constructor=olympe.H.aa.W.Ce;olympe.H.aa.W.Ce.prototype.ka=function(a,b,c){const d=Pi(c,a.G,b);a=Pi(c,a.K,b);return'{"y":11,"l":'+d+',"r":'+a+'}'};olympe.H.aa.W.Ce.ma=[olympe.H.aa.cb];olympe.H.aa.W.pf=class{ka(a){const b=gh(a).map(d=>'"'+d+'"'),c=hh(a).map(d=>d===olympe.dc.Ca.DESTINATION?'2':'1');a=a.G;return'{"y":81,"r":['+b.toString()+'],"d":['+c.toString()+']'+(0!==a.length?',"t":"'+a.toString()+'"':'')+'}'}};olympe.H.aa.W.pf.ma=[olympe.H.aa.cb];olympe.H.aa.W.rf=class{ka(a){return'{"y":80,"m":['+Array.from(a.G).map(b=>'"'+b+'"').toString()+']}'}};olympe.H.aa.W.rf.ma=[olympe.H.aa.cb];olympe.H.aa.W.ld=class{ka(a,b,c){return'{"y":30,"p":'+Oi(c,a.G,b)+'}'}};olympe.H.aa.W.ld.ma=[olympe.H.aa.cb];olympe.H.aa.W.vd=class{ka(a,b,c){c=Pi(c,a.source,b);const d=a.K;a=Qi(a.G,b);return'{"y":23,"s":'+c+',"r":"'+d+'","a":'+a+'}'}};olympe.H.aa.W.vd.ma=[olympe.H.aa.cb];olympe.H.aa.W.Je=function(){};olympe.H.aa.W.Je.prototype.constructor=olympe.H.aa.W.Je;olympe.H.aa.W.Je.prototype.ka=function(a,b,c){var d=Pi(c,a.G,b);a=Pi(c,a.K,b);return'{"y":12,"l":'+d+',"r":'+a+'}'};olympe.H.aa.W.Je.ma=[olympe.H.aa.cb];olympe.H.aa.pa={};olympe.H.aa.pa.Kc=function(){};olympe.H.aa.pa.Kc.prototype.constructor=olympe.H.aa.pa.Kc;olympe.H.aa.pa.Kc.prototype.C=function(){};
808
+ olympe.H.aa.pa.Kc.prototype.ka=function(a,b,c){var d=Qi(a.$e,b),e=a.Nd();e=e?',"b":'+Qi(e,b):'';if(a=a.Gg()){var f='[';for(let n=0,p=a.length;n<p;n++){var g=0===n?'':',';var h=c;var k=a[n],l=b;const q=k.na(),r=h.Y[q];if(void 0===r)throw Error('No serializer registered for transformer: '+q);h=r.ka(k,l,h);f+=g+h}b=',"q":'+(f+']')}else b='';return'{"y":'+this.C()+',"t":'+d+e+b+'}'};olympe.H.aa.pa.Kc.ma=[olympe.H.aa.Cf];olympe.H.aa.pa.xe=function(){olympe.H.aa.pa.Kc.call(this)};olympe.H.aa.pa.xe.prototype=Object.create(olympe.H.aa.pa.Kc.prototype);olympe.H.aa.pa.xe.prototype.constructor=olympe.H.aa.pa.xe;olympe.H.aa.pa.xe.prototype.C=function(){return 13};olympe.H.aa.pa.Bd=class{ka(a,b){return'{"y":10,"v":'+Qi(a.value,b)+'}'}};olympe.H.aa.pa.Bd.ma=[olympe.H.aa.Cf];olympe.H.aa.pa.ne=function(){olympe.H.aa.pa.Kc.call(this)};olympe.H.aa.pa.ne.prototype=Object.create(olympe.H.aa.pa.Kc.prototype);olympe.H.aa.pa.ne.prototype.constructor=olympe.H.aa.pa.ne;olympe.H.aa.pa.ne.prototype.C=function(){return 14};olympe.H.aa.pa.oe=function(){olympe.H.aa.pa.Kc.call(this)};olympe.H.aa.pa.oe.prototype=Object.create(olympe.H.aa.pa.Kc.prototype);olympe.H.aa.pa.oe.prototype.constructor=olympe.H.aa.pa.oe;olympe.H.aa.pa.oe.prototype.C=function(){return 11};olympe.H.aa.pa.se=function(){olympe.H.aa.pa.Kc.call(this)};olympe.H.aa.pa.se.prototype=Object.create(olympe.H.aa.pa.Kc.prototype);olympe.H.aa.pa.se.prototype.constructor=olympe.H.aa.pa.se;olympe.H.aa.pa.se.prototype.C=function(){return 12};olympe.H.aa.pa.yf=class{ka(){return'{"y":19}'}};olympe.H.aa.pa.yf.ma=[olympe.H.aa.Cf];olympe.H.rd={};function Ri(a,b,c){a.N.info('Initializing SERVER layer');if(a.N.G()){const d=['Server layer parameters:'];b.forEach((e,f)=>{d.push(f+'="'+e+'"')});a.N.debug(d.join('\n\t'))}a.Fa(olympe.H.Wc.cc,d=>{switch(d.c){case olympe.H.ja.wv:a.N.error('Unknown message sent to the server:',olympe.H.oa.F[d.s]);break;case olympe.H.ja.ft:a.N.error('Fatal error, the last message is probably too big according to the websocket config.'),a.G.forEach((e,f)=>{null!==e.Cn&&Si(a,f,d.i)})}});b.get('autoConnect')&&(a.N.debug('Connecting automatically'),
809
+ a.connect());olympe.D.ln(a.P.zb(),()=>{a.cs.forEach(d=>d());kc(a.Fy.bind(a),a.Jy);kc(a.sh.bind(a),a.tj)},()=>{a.$=null;a.Xk.forEach(d=>d(a.K[2]));a.sh()});c.C(()=>a.qa()?Promise.resolve('WebSocket connection to Orchestrator OK'):Promise.reject(`WebSocket connection to Orchestrator is ${a.C}`));c.ba(()=>x(function*(){return a.disconnect()}));a.N.log('DONE initializing SERVER layer (waiting for NET layer connection to be opened)')}
810
+ function Z(a,b){if(a.C!==b){a.N.debug('State change '+a.C+' --\x3e '+b);a.C=b;var c;null==(c=a.es)||c.call(a,b);switch(b){case olympe.H.oa.C.CONNECTING:break;case olympe.H.oa.C.si:a.P.update(olympe.D.ra.F);break;case olympe.H.oa.C.bh:a.K[0]=0;a.K[1]=0;a.connect();break;case olympe.H.oa.C.cc:a.N.error('Connection to server',a.la.C(),'aborted due to error');a.P.update(olympe.D.ra.C);break;case olympe.H.oa.C.Xh:break;case olympe.H.oa.C.zh:a.connect();break;case olympe.H.oa.C.kf:a.P.update(olympe.D.ra.C);
811
+ a.Fb&&(a.N.info('Disconnected, will try to auto reconnect in',a.fc,'ms'),jc(()=>{a.connect()},a.fc));break;default:throw Error('State machine error in server manager. Should not get in state '+b);}}}
812
+ function Ti(a,b){const c=olympe.H.oa.K.Vi,d=olympe.H.oa.K.pu;return e=>{if(null!==e&&void 0!==e){var f=null,g=e.s;if(g===d)a.N.debug(`Try to unsubscribe multiple times. This could be because you logged out before unsubscribe. ${e.info.error.reason}`);else if(void 0!==g&&g!==c){f=void 0!==olympe.H.oa.F[g]?`Status code = ${g} [${olympe.H.oa.F[g]}]`:`Status code = ${g}`;g=e.info;if(void 0!==g&&void 0!==g.error){var h=g.error.reason;'string'===typeof h&&0<h.length&&(f+=`\nReason:\n${g.error.reason}`);
813
+ h=g.error.detailedReason;'string'===typeof h&&0<h.length&&(f+=`\nDetails:\n${g.error.detailedReason}`)}f=Error('Rejected by orchestrator:\n'+f)}b(f,e)}}}function Ui(a,b,c){var d=c.message;a.N.G()&&a.N.debug('>',Vi(d));(d=a.F.send(JSON.stringify(d)))?null===c.$h?a.G.delete(b):c.Cn=Date.now():Z(a,olympe.H.oa.C.bh);return d}
814
+ function Vi(a){var b=JSON.parse(JSON.stringify(a));a=olympe.X.Pr;const c=b.messageFamily,d=a(olympe.H.Wc,c),e=b.payload;b='';switch(c){case olympe.H.Wc.ti:b=a(olympe.dc.ha.ja,e.c);break;case olympe.H.Wc.cc:b=a(olympe.H.ja,e.c);break;case olympe.H.Wc.uf:b=a(olympe.H.sa.Ua.C,e.c);break;case olympe.H.Wc.Ei:2===e.c&&(b=a(olympe.H.oa.G,e.status))}a=`${d} message`;b&&0<b.length&&(a+=` with payload "${b}"`);return a}
815
+ function Si(a,b,c){if(a.G.has(b)){const {$h:d}=a.G.get(b);a.G.delete(b);d&&d({s:23,info:c})}}function Wi(a,b){a.N.error(b);Z(a,olympe.H.oa.C.cc)}function Xi(a,b,c){a.ie=null!=c?c:-1;a.N.info('Connected to',a.la.C(),' | ',b?'server version:'+b:'',null!==c?`activity timeout: ${c}s`:'');b=Array.from(a.G).sort(([d],[e])=>d-e);for(const [d,e]of b)if(!Ui(a,d,e))return;Z(a,olympe.H.oa.C.si)}
816
+ olympe.H.rd.oa=class{constructor(a,b,c,d,e,f){this.N=a;this.xb=b;this.la=d;this.F=null;this.config=f;this.fc=this.config.get('reconnectionDelay');this.fb=e;this.es=null;this.Jy=this.config.get('pingInterval');this.cz=this.fc/2;this.Fb=f.get('autoConnect');this.hz=f.get('retryHttpOverload');this.tj=f.get('messageTimeout');this.ba=Oa(f.get('clientVersion'));this.Wa=Oa(f.get('serverVersion'));this.C=olympe.H.oa.C.INIT;this.$c=f.get('getContextMode');this.ds=1;this.$=null;this.K=[0,0,0];this.Ka=new Map;
817
+ this.P=olympe.D.Ic(olympe.D.ra,'Server is online');this.cs=new Map;this.Xk=new Map;this.G=new Map;this.uh=new Map;this.ie=-1;Ri(this,f,c)}qa(){return this.C===olympe.H.oa.C.si}connect(){const a=olympe.H.oa.C.INIT,b=olympe.H.oa.C.CONNECTING,c=olympe.H.oa.C.si,d=olympe.H.oa.C.kf,e=olympe.H.oa.C.bh,f=olympe.H.oa.C.Xh,g=olympe.H.oa.C.zh,h=olympe.H.oa.C.cc;null!==this.F&&(this.F.$(null),this.F.close());this.Fb=!0;this.N.log(`Asking NET layer for a connection to ${Fb(this.la)}:${this.la.port}...`);this.F=
818
+ this.xb.G(this.la);this.F.la(this.mc.bind(this));this.F.ba(this.Nc.bind(this));this.F.$(()=>{this.F=null;this.C===c?Z(this,e):this.C!==h&&this.C!==f&&Z(this,d)});this.fb&&this.C===a&&this.F.F(()=>{this.F.F(null);if(this.C===b){var k=Gb(this.fb);this.N.info(`Trying to wakeup orchestrator with ${k}`);Z(this,f);var l=this.xb.G(this.fb);l.ba(n=>{const p=JSON.parse(n);this.N.info(`${k}: ${null==p?void 0:p.status}`);switch(null==p?void 0:p.status){case 'ready':Z(this,g);l.close();break;case 'asleep':this.N.info(`Trying to wakeup orchestrator with ${k}`);
819
+ l.send('{"action": "wakeup"}');Z(this,f);break;case 'waking-up':break;default:this.N.warn(`Invalid message from ${k}: ${n}`),l.close(),Z(this,d)}});l.F(()=>{this.N.warn(`Communication with ${k} failed.`);l.close();Z(this,d)});l.la(()=>{this.N.info(`Checking orchestrator status with ${k}`);l.send('{"action": "status"}')})}this.fb=null});this.C!==e&&Z(this,b)}disconnect(){const a=olympe.H.oa.C.CONNECTING;if(this.C===olympe.H.oa.C.si||this.C===a)this.Fb=!1,Z(this,olympe.H.oa.C.kf),this.F.close()}be(a){const b=
820
+ olympe.X.bc();this.cs.set(b,a);olympe.D.Xa(this.P)===olympe.D.ra.F&&a()}$k(a){var b;void 0===b&&(b=olympe.X.bc());this.Xk.set(b,a);olympe.D.Xa(this.P)===olympe.D.ra.C&&a(this.K[2])}mc(){this.N.debug('Websocket connected, sending handshake. Client version:',Pa(this.ba),'subscribeEverything:',this.$c?'NO':'YES');this.V(olympe.H.Wc.Ei,{c:olympe.H.ja.Ei,cv:Pa(this.ba),m:this.$c?0:1,s:this.$},this.Gy.bind(this))}V(a,b,c){const d=this.ds;this.ds++;b={message:{seqId:d,messageFamily:a,payload:b},$h:c?Ti(this,
821
+ c):null,Cn:null};this.G.set(d,b);c=[olympe.H.oa.C.CONNECTING,olympe.H.oa.C.bh];(this.qa()||a===olympe.H.Wc.Ei&&c.includes(this.C))&&Ui(this,d,b)}uc(a,b,c,d,e,f){c&&''!==c||this.N.warn('Trying to send an http request with an invalid authorizationToken');const g=Ib(a);if(e){g.method=olympe.net.ab.Fd.lm;e=d?e:{messageFamily:b,seqId:1,payload:e};const k=JSON.stringify(e);g.body=k;Jb(g,{'Content-Type':'application/json'});this.N.log('HTTP POST >',Vi(e))}else this.N.log('HTTP GET call to',a);g.F=olympe.net.ab.ResponseType.yk;
822
+ Jb(g,{Authorization:c});const h=()=>{this.xb.C(g,k=>{switch(k.Rd()){case olympe.net.ab.Mc.ah:case olympe.net.ab.Mc.wl:case olympe.net.ab.Mc.Ej:k=k.getData();if(b!==olympe.H.Wc.ti||d){f&&f(null,k);break}k=this.Nc(k);f&&f(k);k&&this.N.error(k.message);break;case olympe.net.ab.Mc.Yu:jc(h,this.hz);break;case olympe.net.ab.Mc.Es:this.N.debug(`HTTP request canceled (${a}).`);f&&f(null);break;case olympe.net.ab.Mc.uv:k=Error(`HTTP request authorization denied: ${a}`);f&&f(k);break;default:k=Error(`Server is currently not available, http status: ${k.Rd()}`),
823
+ f&&f(k)}})};h()}Fa(a,b,c){void 0===c&&(c=olympe.X.bc());let d=this.Ka.get(a);void 0===d&&(d=new Map,this.Ka.set(a,d));d.set(c,b)}Md(a,b){a=this.Ka.get(a);void 0!==a&&a.delete(b)}de(a){this.es=a}Gy(a,b){if(a)Wi(this,'Error in receiving handshake response: '+a.message);else{this.N.debug('Handshake response received');var c=olympe.H.oa.G;a=b.sv||'undefined';var d=b.activityTimeout?Math.max(b.activityTimeout-60,5):null;switch(b.status){case c.At:Wi(this,`Framework version (${Pa(this.ba)}) provided to the orchestrator was not valid. See orchestrator logs for more info.`);
824
+ return;case c.nv:Wi(this,`Framework version (${Pa(this.ba)}) is not compatible with the orchestrator in use. See orchestrator logs for more info.`);return;case c.mt:Wi(this,'Handshake failed. See orchestrator logs for more info.');return}if(this.Wa.nb(olympe.X.Wh.C))this.N.warn('Handshake successful but received server version',a,'is invalid. Cannot check against it');else try{var e=Oa(a);if(e.Bj(this.Wa)){Wi(this,`Framework v${Pa(this.ba)} is expecting Orchestrator to be at least in v${Pa(this.Wa)}`);
825
+ return}this.N.log('Handshake successful. Orchestrator version: ',e,'required:',Pa(this.Wa))}catch(f){Wi(this,f);return}e=olympe.H.oa.C.kf;if(this.C===olympe.H.oa.C.bh&&null!==this.$&&this.$!==b.sessionId)this.N.warn('Trying to do a session recovering, but got another session id so retry from disconnected state'),Z(this,e);else{if(e=b.identityProviders)for(const [f,g]of Object.entries(e))this.uh.set(f,g);this.$=b.sessionId||null;Xi(this,a,d)}}}Ld(){return new Map(this.uh)}qd(){return this.ie}Fy(){this.K[0]-
826
+ this.K[1]>this.cz?(this.N.debug('Ping did not get answer, try to reconnect'),Z(this,olympe.H.oa.C.bh)):(this.N.trace('Sending Ping'),this.K[0]=Date.now(),this.F.send('ping')||(this.N.debug('Impossible to send ping, try to reconnect'),Z(this,olympe.H.oa.C.bh)))}Nc(a){this.K[2]=Date.now();if(a.startsWith('pong'))return this.K[1]=this.K[2],null;try{var b=JSON.parse(a)}catch(d){return this.N.error('Unable to parse response from server: '+d.toString()),Error('Unable to parse response from server')}this.N.G()&&
827
+ this.N.debug('<',Vi(b));a=b.seqId;const c=b.messageFamily;b=b.payload;if(this.G.has(a)){const {$h:d}=this.G.get(a);this.G.delete(a);d&&d(b)}a=this.Ka.get(c);if(void 0!==a)for(const d of a.values())d(b);return null}sh(){const a=Date.now();for(const [b,{Cn:c}]of this.G)null!==c&&a-c>this.tj&&(this.N.warn(`No response was received from the server for the seqId = ${b}`),Si(this,b,{error:{reason:'Message timeout: never receive acknowledge'}}))}};olympe.H.oa.K={Vi:0,pu:18,HA:23};
828
828
  olympe.H.oa.F={0:'OK',1:'SRP Authentication First Step Failed',2:'SRP Authentication Last Step Failed',3:'SRP Authentication Bad Credentials',4:'AutoLogin Authentication Failed',5:'AutoLogin Authentication Token Invalid',6:'Logout Failed',7:'SAML Request Generation Failed',8:'SAML Authentication Save Failed',9:'Invalid SAML Response',10:'SAML User Not Found',11:'Transaction Failed',12:'GetContext Failed',13:'Notification Failed',15:'FileService Clean Failed',17:'Try to subscribe multiple times',18:'Try to unsubscribe multiple times',
829
- 21:'GraphDef Query Failed',22:'Client Request Invalid',23:'Internal Server Error',24:'File Retrieval Error',25:'File Does Not Exists',26:'Restore Failed',27:'Permission Error',14:'Handshake Failed',28:'Client Version Too Old',29:'Client Version Invalid Format',34:'Server overloaded, retry later',35:'Add token error',36:'Keep token alive error',37:'Unknown client message',39:'Fetch data while concurrency transaction'};olympe.H.rd.oa.ma=[olympe.H.oa];olympe.H.R={Aa:'server.Manager',Xn:'server.bus.Manager',Ea:'server.Logger',Id:'server.Source',Wg:'server.FileSource',tp:'server.ImportFileSvcHttpRequest',Sn:'server.BackupSvcHttpRequest',eq:'server.OpenIDSvcHttpRequest',Wo:'server.GetContextSvcPathRequest',pp:'server.ImplicitGDSvcPathRequest',Io:'server.ExplicitGDSvcPathRequest',br:'server.TransactionOverHttpPathRequest',jr:'server.UserTokenRequest',hr:'server.UserTagRequest',fr:'server.UserRolesRequest',Eq:'server.RoleMembersRequest',Fh:'server.IOUrlsProvider',
830
- Oo:'server.fileSvcUrl',jq:'communication.peerFileSvcUrl'};olympe.H.sd={mi:'server.connectors.Auth',lB:'server.connectors.Signaling'};
831
- olympe.H.Config={kd:'server.host',td:'server.port',nd:'server.ssl',Kn:'server.autoConnect',sm:'server.reconnectionDelay',nq:'server.pingInterval',Fm:'server.messageTimeout',Cq:'server.retryHttpOnOverload',fo:'server.clientVersion',Jq:'server.serverVersion',Yu:'server.wakeUpService',Wn:'bus.host',Yn:'bus.path',Zn:'bus.port',ao:'bus.vhost',$n:'bus.ssl',rg:'bus.keepalive',Ru:'bus.reschedulePings',Hs:'bus.clientId',Fs:'bus.clean',Ks:'bus.connectTimeout',Zq:'bus.tokenTimeout',Ju:'bus.queueQoSZero',Vn:'bus.allowGuest'};
832
- olympe.H.qb={Bd:'server.basePath',qr:'server.wsPath',Mo:'server.filePath',sp:'server.importFilePath',Rn:'server.backupSvcPath',cq:'server.openIDSvcPath',Vo:'server.GetContextSvcPath',rp:'server.ImplicitGraphdefSvcPath',Jo:'server.ExplicitGraphdefSvcPath',ar:'server.TransactionOverHttpPath',ir:'server.userTokenSvcPath',gr:'server.userTagPath',er:'server.userRolesPath',Dq:'server.roleMembersPath',jm:'communication.peerFileSvcPath'};
833
- olympe.U.config(function(a){var b='object'===typeof window&&window.location&&window.location.hostname||'localhost';const c='localhost'===b;E(a,olympe.H.Config.kd,b);E(a,olympe.H.Config.td,c?8080:443);E(a,olympe.H.Config.nd,'localhost'!==b);E(a,olympe.H.qb.Bd,'OlympeServer');E(a,olympe.H.qb.qr,'websocket');E(a,olympe.H.qb.Mo,'rest/filesvc');E(a,olympe.H.qb.sp,'rest/importsvc');E(a,olympe.H.qb.Rn,'rest/backupsvc');E(a,olympe.H.qb.cq,'rest/openid');E(a,olympe.H.qb.Vo,'rest/initialData');E(a,olympe.H.qb.rp,
834
- 'rest/querysvc/graphDefImplicit');E(a,olympe.H.qb.Jo,'rest/querysvc/graphDefExplicit');E(a,olympe.H.qb.ar,'rest/transaction');E(a,olympe.H.qb.ir,'rest/token');E(a,olympe.H.qb.gr,'rest/authorization/getUserTag');E(a,olympe.H.qb.er,'rest/authorization/getUserRoles');E(a,olympe.H.qb.Dq,'rest/authorization/roleMembers');E(a,olympe.H.Config.Kn,!0);E(a,olympe.H.Config.sm,5E3);E(a,olympe.H.Config.nq,5E3);E(a,olympe.H.Config.Fm,15E3);E(a,olympe.H.Config.Cq,5E3);E(a,olympe.H.Config.Jq,'7.0.0');E(a,olympe.H.Config.Wn,
835
- '');E(a,olympe.H.Config.Yn,c?'':'/mqtt');E(a,olympe.H.Config.Zn,c?15675:443);E(a,olympe.H.Config.$n,null);E(a,olympe.H.Config.ao,c?'/':'');E(a,olympe.H.Config.rg,30);E(a,olympe.H.Config.Zq,3E5);E(a,olympe.H.Config.Vn,!1);E(a,olympe.H.qb.jm,'nodes/files');b=a.getParameter(olympe.Mg.Config.So);if(void 0!==b)wa(a,b);else throw Error('Framework version could not be found! Is field "olympe-framework" present in version.json?');C(a,olympe.H.R.Ea,[olympe.ta.R.Aa],d=>d.Qc('communication'));C(a,'server.WebSocketRequest',
836
- [new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Bd),new olympe.U.fa(olympe.H.qb.qr)],(d,e,f,g,h)=>new olympe.net.Xi(d,e,(g+'/'+h).replace(/\/+/g,'/').replace(/\/$/,''),f));C(a,'server.wakeUpRequest',[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.Config.Yu)],(d,e,f,g)=>{if(null===g||void 0===g)return null;g=g.replace(/\/+/g,
837
- '/').replace(/\/$/,'');return new olympe.net.Xi(d,e,g,f)});b=(d,e,f,g,h)=>(new olympe.net.Xj(d,e,`${g}${h?'/'+h:''}`.replace(/\/+/g,'/').replace(/\/$/,''),f)).C();C(a,olympe.H.R.tp,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Bd),new olympe.U.fa(olympe.H.qb.sp)],b);C(a,olympe.H.R.Sn,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Bd),
838
- new olympe.U.fa(olympe.H.qb.Rn)],b);C(a,olympe.H.R.eq,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Bd),new olympe.U.fa(olympe.H.qb.cq)],b);C(a,olympe.H.R.Wo,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Bd),new olympe.U.fa(olympe.H.qb.Vo)],b);C(a,olympe.H.R.pp,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),
839
- new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Bd),new olympe.U.fa(olympe.H.qb.rp)],b);C(a,olympe.H.R.Io,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Bd),new olympe.U.fa(olympe.H.qb.Jo)],b);C(a,olympe.H.R.br,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Bd),new olympe.U.fa(olympe.H.qb.ar)],b);C(a,olympe.H.R.jr,
840
- [new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Bd),new olympe.U.fa(olympe.H.qb.ir)],b);C(a,olympe.H.R.hr,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Bd),new olympe.U.fa(olympe.H.qb.gr)],b);C(a,olympe.H.R.fr,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Bd),
841
- new olympe.U.fa(olympe.H.qb.er)],b);C(a,olympe.H.R.Eq,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Bd),new olympe.U.fa(olympe.H.qb.Dq)],b);C(a,olympe.H.R.Oo,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Bd),new olympe.U.fa(olympe.H.qb.Mo)],b);C(a,olympe.H.R.jq,[new olympe.U.fa(olympe.net.Config.Kl),new olympe.U.fa(olympe.net.Config.Ll),
842
- new olympe.U.fa(olympe.net.Config.mp),new olympe.U.fa(olympe.H.qb.jm)],b);C(a,'server.ManagerConfig',[new olympe.U.fa(olympe.H.Config.Kn),new olympe.U.fa(olympe.H.Config.sm),new olympe.U.fa(olympe.H.Config.nq),new olympe.U.fa(olympe.H.Config.Fm),new olympe.U.fa(olympe.H.Config.fo),new olympe.U.fa(olympe.H.Config.Jq),new olympe.U.fa(olympe.dc.Config.fh),new olympe.U.fa(olympe.H.Config.Cq)],(...d)=>{const e='autoConnect reconnectionDelay pingInterval messageTimeout clientVersion serverVersion getContextMode retryHttpOverload'.split(' '),
843
- f=new Map;d.forEach((g,h)=>f.set(e[h],g));return f});C(a,'server.bus.ManagerConfig',[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.Wn),new olympe.U.fa(olympe.H.Config.Yn),new olympe.U.fa(olympe.H.Config.Zn),new olympe.U.fa(olympe.H.Config.ao),new olympe.U.fa(olympe.H.Config.$n),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.Config.Vn),new olympe.U.fa(olympe.H.Config.rg),new olympe.U.fa(olympe.H.Config.Ru),new olympe.U.fa(olympe.H.Config.Hs),new olympe.U.fa(olympe.H.Config.Fs),
844
- new olympe.U.fa(olympe.H.Config.sm),new olympe.U.fa(olympe.H.Config.Ks),new olympe.U.fa(olympe.H.Config.Ju),new olympe.U.fa(olympe.H.Config.Fm),new olympe.U.fa(olympe.H.Config.Zq)],(d,e,f,g,h,k,l,n,...p)=>{e=`${(null!=k?k:l)?'wss://':'ws://'}${e||d}:${g}${f}/ws`;const q='keepalive reschedulePings clientId clean reconnectPeriod connectTimeout queueQoSZero messageTimeout tokenTimeout'.split(' ');p=p.reduce((r,t,u)=>{r[q[u]]=t;return r},{});p.vhost=`${h||d.split('.')[0]}`;d=new Map;d.set('url',e);d.set('connectionOptions',
845
- p);d.set('allowGuest',n);return d});A(a,olympe.H.R.Aa,olympe.H.rd.oa,olympe.H.R.Ea,olympe.net.R.Aa,olympe.host.R.tg,'server.WebSocketRequest','server.wakeUpRequest','server.ManagerConfig');A(a,olympe.H.sd.mi,olympe.H.sa.Ua,olympe.H.R.Ea,olympe.H.R.Aa,olympe.H.R.jr,olympe.H.R.hr,olympe.H.R.fr,olympe.H.R.Eq,olympe.H.R.eq,olympe.auth.R.lk,olympe.kc.R.ak);A(a,olympe.H.R.Xn,olympe.H.wa.oa,olympe.H.R.Ea,olympe.net.R.Aa,olympe.auth.R.Aa,olympe.host.R.tg,'server.bus.ManagerConfig');ua(a,olympe.auth.sd.Aa,
846
- olympe.H.sd.mi);ua(a,olympe.auth.sd.Ip,olympe.H.sd.mi);ua(a,olympe.auth.sd.Ie,olympe.H.sd.mi);ua(a,olympe.auth.sd.Oe,olympe.H.sd.mi);A(a,olympe.H.R.Wg,olympe.H.Sj,olympe.H.R.Ea,olympe.net.R.Aa,olympe.auth.R.Aa,olympe.H.R.Oo,olympe.H.R.jq);ua(a,olympe.bb.R.Wg,olympe.H.R.Wg);C(a,olympe.H.R.Id,[olympe.ta.R.Aa,olympe.H.R.Aa,olympe.auth.R.Aa,olympe.bb.R.Wg,olympe.H.R.Wo,olympe.H.R.pp,olympe.H.R.Io,olympe.H.R.br],(d,e,f,g,h,k,l,n)=>new olympe.H.hh(d.Qc('server.source'),e,f,g,[h,k,l,n]));A(a,olympe.H.R.Fh,
847
- olympe.H.Yj,olympe.H.R.tp,olympe.H.R.Sn);ua(a,olympe.dc.da.R.Fh,olympe.H.R.Fh);ua(a,olympe.bb.R.xm,olympe.H.R.Id)},'olympe.communication');olympe.U.run([olympe.H.R.Xn],a=>{olympe.H.wa.Sc=()=>a});olympe.sc={};olympe.sc.R={Ea:'sc.Logger',um:'sc.RootContext'};olympe.sc.Config={gf:'sc.app',kg:'sc.debug',uo:'sc.debugger',Us:'sc.disableTheme',PRODUCTION:'sc.production',tu:'sc.onstartTimeout',Bq:'sc.remoteActionTimeout',aq:'sc.offlineStart',lu:'google.apikey'};
848
- olympe.U.config(a=>{E(a,olympe.sc.Config.gf,'');E(a,olympe.sc.Config.aq,!1);E(a,olympe.sc.Config.kg,!1);E(a,olympe.sc.Config.Us,!1);E(a,olympe.sc.Config.PRODUCTION,!1);E(a,olympe.sc.Config.tu,2E4);E(a,olympe.sc.Config.lu,'AIzaSyD0rTnF3Tq-ZjgdaqyvC8Jg-RSgpZM2jBU');E(a,olympe.sc.Config.Bq,1E4);C(a,olympe.sc.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('sc'));C(a,olympe.sc.R.um,[new olympe.U.fa(olympe.sc.Config.PRODUCTION)],b=>{const c=new olympe.sc.Wd('root','root',null);olympe.sc.yn=c;c.set(olympe.sc.Ra.C.PRODUCTION,
849
- b);return new olympe.sc.Ra(c)})},'olympe.sc');olympe.U.run([olympe.sc.R.um],a=>{olympe.jj().ctx=a});olympe.sc.mn=()=>null!==olympe.dc.La().jc(void 0,olympe.sc.Runnable.F.zc());olympe.sc.gD=(a,b,c,d)=>{c=a.create(olympe.sc.Vb).setProperty(olympe.sc.Vb.C,c||null).setProperty(olympe.sc.Vb.K,d||null);a.Va(olympe.sc.Vb.F,c,b);a.Va(olympe.dc.CloudObject.containsRel,b,c);return c.T()};olympe.sc.lh=a=>{a=olympe.dc.X.Tb.lh(a);return a instanceof olympe.sc.Ge?a.C():a};olympe.sc.wD=a=>{a=Ic(a);return a instanceof olympe.sc.Ge?a.C():a};
850
- olympe.sc.tD=function(a){const b=olympe.dm.Pb.C.zc(),c=olympe.dc.CloudObject.containsRel.zc();var d=olympe.dc.za(a);if(void 0===d)return[];a=olympe.dc.La();var e=a.model(d);const f=[],g=[];let h=[];if(a.Zf(e,olympe.dm.Pb))h.push(d);else{for(e=[];null===a.jc(d,b);){e.push(d);const k=a.jc(d,c);if(null===k)return olympe.ta.Za('sc').warn(`Object ${d} has no container`),[];k===a.jc(d,olympe.dc.CloudObject.instancesRel)?(f.push(d),d=a.jc(k,c)):d=k;if(e.includes(d))throw Error(`Instance ${d} (${a.name(d)}) is part of a cyclic contain pattern`);
851
- }g.push(d);h.push(a.jc(g[0],b))}h=h.concat(a.Vf(h[0],olympe.dm.Pb.Fa));h=h.concat(a.Vf(h[h.length-1],olympe.dm.Xc.$.zc()));h=h.concat(a.Vf(h[h.length-1],olympe.dm.Xc.V.zc()));return[...f,...g,...h].reverse()};olympe.sc.uD=a=>{a=a&&a.valueOf()||'';return a.startsWith('image/')?olympe.sc.Hi:a.startsWith('video/')?olympe.sc.Ck:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.jd:olympe.dm.File};
852
- olympe.sc.rD=a=>a instanceof olympe.sc.Hi?'image/*':a instanceof olympe.sc.Ck?'video/*':a instanceof olympe.sc.jd?'font/*,application/font-woff':null;olympe.sc.Cb={};function Yi(a,b){var c=olympe.sc.Ra;a=a.C;b=olympe.dc.za(b);var d;let e=null==(d=a.F)?void 0:d.get(b);if(!e){e=a.ci(void 0,b);for(d=e.getParent();d&&d.Fa&&!d.id.startsWith('_');)d=d.getParent();d&&Zi(d,b,e)}return new c(e)}function $i(a){let b;return null!=(b=a.Xa(olympe.sc.Ra.C.PRODUCTION))?b:!1}
853
- olympe.sc.Ra=class{constructor(a=olympe.sc.yn){this.C=a;this.N=olympe.ta.Za('sc');this.F=null}Z(){return this.C.Z()}getParent(){if(null===this.F){const a=this.C.getParent();this.F=null===a?null:new olympe.sc.Ra(a)}return this.F}ww(a){const b=olympe.dc.La();let c=this.getParent();const d=e=>{if(e.Ke()){const f=b.model(e.Ke());if(f&&b.fb(f,olympe.sc.mb.Fa)||a.modelTag&&!b.Xf(e.Ke(),a.modelTag))return!1}return!0};for(;c&&!d(c);)c=c.getParent();return c}Ke(){return this.C.Ke()}Wa(){return this.C.C}set(a,
854
- b){this.C.set(a,b);return this}Gn(a){return this.set(a,Date.now())}remove(a){this.set(a,null)}zb(a,b,c=!1){const d=olympe.dc.za(a),e=olympe.D.Ic(b||Object,`Get context value flow source of ${d}`);e.node.onDestroy(this.on(a,f=>{null===f?e.clear():e.update(f)},c?this.C.Z():void 0));return e.zb()}get(a,b=!1){a=this.Xa(a,b);return void 0!==a?a:null}has(a,b=!1){return this.C.has(a,b)}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>{const e=this.get(a);b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),
855
- c?void 0:this.C.Z(),!1);this.onDestroy(()=>{f();d.complete()});return f})}repeat(a,b){const c=aj(this.C,a);a=b.subscribe(d=>{null!==d?this.set(c,d):this.remove(c)});this.cg(a.unsubscribe.bind(a));return this}Gy(a){a=a instanceof olympe.sc.Runnable?a:this.get(a);if(!a)return null;const b=this.ci(`Runner ${olympe.D.Xa(a.na(),'')}`);a.run(b);return b}iz(a,b=!0,c=!1){return rxjs.firstValueFrom(this.observe(a,b,c))}Py(a){this.set(olympe.sc.Ra.C.jg,a);return this}Xa(a,b=!0){return this.C.Xa(a,b)}on(a,b,
856
- c,d=!0){return this.C.on(a,b,c,d)}ci(a){return new olympe.sc.Ra(this.C.ci(a))}cl(a,b){return this.C.cl(a,c=>{b(new olympe.sc.Ra(c))})}ex(a){a=bj(this.C,a);return a===this.C?this:a&&new olympe.sc.Ra(a)}destroy(){this.C.destroy()}cg(a,b){return this.C.cg(a,b)}bl(a){this.C.bl(a)}onDestroy(a){return this.C.onDestroy(a)}Ze(a){this.C.Ze(a)}clear(){this.C.clear()}G(){return this.C.G()}fb(a){a=cj(this.C,a);return null!==a?new olympe.sc.ui.Ez(a,this):null}Lw(a){a=cj(this.C,a);return null!==a?new olympe.sc.ui.Dz(a,
857
- this):null}oy(...a){return rxjs.combineLatest(a.map(b=>{b=cj(this.C,b);return null!==b?this.observe(b):rxjs.of(null)}))}nb(a){return(null==a?void 0:a.constructor)!==this.constructor?!1:this.C===a.C}};olympe.sc.Ra.prototype.observeMany=olympe.sc.Ra.prototype.oy;olympe.sc.Ra.prototype.getEvent=olympe.sc.Ra.prototype.Lw;olympe.sc.Ra.prototype.getProperty=olympe.sc.Ra.prototype.fb;olympe.sc.Ra.prototype.clear=olympe.sc.Ra.prototype.clear;olympe.sc.Ra.prototype.offDestroy=olympe.sc.Ra.prototype.Ze;
858
- olympe.sc.Ra.prototype.onDestroy=olympe.sc.Ra.prototype.onDestroy;olympe.sc.Ra.prototype.offClear=olympe.sc.Ra.prototype.bl;olympe.sc.Ra.prototype.onClear=olympe.sc.Ra.prototype.cg;olympe.sc.Ra.prototype.destroy=olympe.sc.Ra.prototype.destroy;olympe.sc.Ra.prototype.getOtherContext=olympe.sc.Ra.prototype.ex;olympe.sc.Ra.prototype.onContext=olympe.sc.Ra.prototype.cl;olympe.sc.Ra.prototype.createChild=olympe.sc.Ra.prototype.ci;olympe.sc.Ra.prototype.setParentElement=olympe.sc.Ra.prototype.Py;
859
- olympe.sc.Ra.prototype.waitFor=olympe.sc.Ra.prototype.iz;olympe.sc.Ra.prototype.runner=olympe.sc.Ra.prototype.Gy;olympe.sc.Ra.prototype.repeat=olympe.sc.Ra.prototype.repeat;olympe.sc.Ra.prototype.observe=olympe.sc.Ra.prototype.observe;olympe.sc.Ra.prototype.has=olympe.sc.Ra.prototype.has;olympe.sc.Ra.prototype.get=olympe.sc.Ra.prototype.get;olympe.sc.Ra.prototype.remove=olympe.sc.Ra.prototype.remove;olympe.sc.Ra.prototype.trigger=olympe.sc.Ra.prototype.Gn;olympe.sc.Ra.prototype.set=olympe.sc.Ra.prototype.set;
860
- olympe.sc.Ra.prototype.getClosest=olympe.sc.Ra.prototype.ww;olympe.sc.Ra.prototype.getParent=olympe.sc.Ra.prototype.getParent;olympe.sc.Ra.C={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',jg:'__htmlContainer',Mz:'__dockableElement'};olympe.sc.lr=class extends olympe.sc.Ra{cg(a,b){const c=b||olympe.X.bc();return super.cg(()=>{this.bl(c);a()},c)}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>{const e=this.get(a);b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),c?void 0:this.Z(),!1);this.cg(()=>{f();d.complete()});return f})}};function aj(a,b){b=olympe.dc.za(b);let c,d;return(null==(c=a.la)?void 0:c.get('I#'+b))||(null==(d=a.la)?void 0:d.get('IO#'+b))||b}function bj(a,b){if(b===a.id||a.V.has(b)||!b)return a;for(a=a.qa;a;){if(b===a.Z()||a.V.has(b))return a;const c=dj(a.F,b);if(c)return c;a=a.getParent()}return null}function ej(a,b,c){a.K||(a.K=new Map);const d=a.K.get(b);d?d[0]+=1:(a.K.set(b,[1,c]),$c(olympe.dc.yd(),c))}
861
- function fj(a,b){if(a.K&&a.K.has(b)){var c=a.K.get(b);--c[0];0===c[0]&&(a.K.delete(b),0===a.K.size&&(a.K=null),$c(olympe.dc.yd(),null,c[1]))}}function cj(a,b){let c;return(null==(c=a.la)?void 0:c.get('IO#'+b))||null}
862
- function gj(a){a.C.P(()=>{hj(a,c=>c.destroy())});a.C.onDestroy(()=>{void 0!==a.Xa(olympe.sc.Ra.C.TRANSACTION)&&a.N.warn(`The context ${a.Z()} is being destroyed but still has unreleased transactions. You probably forgot to end a transaction.`);let c;null==(c=a.K)||c.forEach(([e],f)=>{for(let g=0;g<e;g++)fj(a,f)});let d;null==(d=a.qa)||ij(d,a);a.V.clear();a.qa=null});let b;null==(b=a.qa)||jj(b,a)}
863
- function dj(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.Fa&&!c.id.startsWith('_')&&(a=dj(c.F,b)))return a;return null}function kj(a,b){a.Wa=olympe.dc.za(b);a.Fa=b.Pd().mn();b.F().forEach(c=>{a.id===c||a.V.has(c)||(a.V.add(c),Zi(a,c,a))});a.la=b.V()}function lj(a){a.Ka=!0;let b;null==(b=a.F)||b.forEach(c=>{lj(c)})}function mj(a){a.Ka=!1;let b;null==(b=a.F)||b.forEach(c=>{mj(c)})}
864
- function nj(a,...b){var c=olympe.sc.Cb.Qe.C.ym;if(null!==a.Cb)for(const {el:d,depth:e}of a.Cb.values())d.process(a,c,e,...b)}function oj(a,b,c,d){const e='$'+b;a.ba.add(b);c.map(f=>'@'+f+'.'+b).forEach(f=>{let g,h;null==(g=a.P)||null==(h=g.get(f))||h.forEach(k=>{k(d)})});hj(a,f=>{!f.Ka&&f.ba.has(b)||f.data.has(e)||oj(f,b,c,d)});a.ba.delete(b)}
865
- function pj(a,b,c){a.P||(a.P=new Map);let d=a.P.get(b);void 0===d&&(d=new Map,a.P.set(b,d));olympe.sc.Wd.C+=1;const e=olympe.sc.Wd.C;d.set(e,c);return()=>{const f=a.P.get(b);f&&(f.delete(e),0===f.size&&a.P.delete(b))}}function Zi(a,b,c){a.ba.add(b);let d;const e=null==(d=a.P)?void 0:d.get('&'+b);if(e)for(const f of e.values())f(c);hj(a,f=>{f.ba.has(b)||Zi(f,b,c)});a.ba.delete(b)}function hj(a,b){let c;null==(c=a.F)||c.forEach(b)}function qj(a,b){a.data.forEach((c,d)=>b(c,d.slice(1)))}
866
- function rj(a,b){if(null!==a.Cb&&a.Cb.has(b)){var {el:c,depth:d}=a.Cb.get(b);hj(a,e=>{rj(e,b)});0===d&&c.F();a.Cb.delete(b);0===a.Cb.size&&(a.Cb=null)}}function sj(a,b,c=0){null===a.Cb&&(a.Cb=new Map);a.Cb.has(b.Z())||(a.Cb.set(b.Z(),{el:b,depth:c}),hj(a,d=>{(-1===b.G||c<b.G)&&sj(d,b,c+1)}),a.onDestroy(()=>{rj(a,b.Z())}));b.Z()}function tj(a){var b=olympe.sc.Cb.Qe.F.Aq;const c=[];if(null!==a.Cb)for(const {el:d}of a.Cb.values())d.K()===b&&(c.push(d.Z()),d.F(),rj(a,d.Z()))}
867
- function jj(a,b){null===a.F&&(a.F=new Map);a.F.set(b.id,b)}function ij(a,b){let c;null==(c=a.F)||c.delete(b.Z());let d;0===(null==(d=a.F)?void 0:d.size)&&(a.F=null)}
868
- olympe.sc.Wd=class{constructor(a,b='no name',c=olympe.sc.yn){this.id=a;this.xd=b;this.V=new Set;this.qa=c;this.C=new olympe.D.$b('SC Context');this.data=new Map;this.Wa=this.$=this.K=this.F=this.P=null;this.Fa=!1;this.ba=new Set;this.Ka=!1;this.la=null;this.N=olympe.ta.Za('sc');this.Cb=null;gj(this)}Z(){return this.id}getParent(){return this.qa}Ke(){return this.Wa}set(a,b){if(!this.C.$()&&!this.C.G()){var c=olympe.dc.za(a),d,e;a=(null==(d=this.la)?void 0:d.get('O#'+c))||(null==(e=this.la)?void 0:
869
- e.get('IO#'+c))||c;d='$'+a;(e=this.data.get(d))&&e.valueOf&&(e=e.valueOf());void 0===b||null===b?void 0!==e&&(this.data.delete(d),null!==this.Cb&&0<this.Cb.size&&nj(this,a,null),oj(this,a,['*',this.id,...this.V],null)):((c=void 0===e)||(c=!('function'===typeof b.nb?b.nb(e):b.valueOf()===e.valueOf())),c&&(this.data.set(d,b),null!==this.Cb&&0<this.Cb.size&&nj(this,a,b),oj(this,a,['*',this.id,...this.V],b)))}}on(a,b,c,d=!0){if(this.C.G()||this.C.$())return()=>{};const e=aj(this,a),f=c?olympe.dc.za(c):
870
- '*';a=pj(this,'@'+f+'.'+e,b);c=c?(c=bj(this,f))?c.Xa(e,!1):void 0:this.Xa(e);void 0!==c&&b(c);if(d)olympe.D.Na().onDestroy(a);return a}has(a,b=!1){a='$'+aj(this,a);let c=this.data.has(a),d=this.getParent();if(b)for(;!c&&d;)c=d.data.has(a),d=d.getParent();return c}ci(a,b){const c=null!=b?b:'_'+olympe.X.bc(),d=this.C.run(()=>new olympe.sc.Wd(c,a,this));null!==this.Cb&&0<this.Cb.size&&this.Cb.forEach(({el:e,depth:f})=>{(-1===e.G||f<e.G)&&sj(d,e,f+1)});return d}cl(a,b){const c=bj(this,a);if(c)return b(c),
871
- ()=>{};const d=pj(this,'&'+a,e=>{d&&d();b(e)});return d}Xa(a,b=!0){a='$'+aj(this,a);let c=this.data.get(a),d=this.getParent();if(b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.getParent();return c}destroy(){this.C.$()||this.C.G()||this.C.destroy()}cg(a,b){if(this.C.G())a();else return++olympe.sc.Wd.C,b=b||String(olympe.sc.Wd.C),null===this.$&&(this.$=new Map),this.$.set(b,a),b;return b||'noId'}bl(a){null!==this.$&&this.$.delete(a)}onDestroy(a){return this.G()?(a(),'noId'):this.C.onDestroy(a)}Ze(a){this.G()||
872
- this.C.Ze(a)}clear(){if(!this.C.$()&&!this.C.G()){let a;null==(a=this.$)||a.forEach(b=>b());this.C.Fa()}}G(){return this.C.G()}};olympe.sc.Wd.prototype.getParent=olympe.sc.Wd.prototype.getParent;olympe.sc.Wd.C=0;olympe.sc.Wd.F={xt:'I#',zu:'O#',DA:'IO#'};function uj(a,b,c){return(c=c.Ke())?`${a}.${c}.${b}`:`${a}.${b}`}olympe.sc.Cb.Qe=class{constructor(a=-1){this.id=olympe.X.Ue();this.active=!0;this.G=a}F(){this.active=!1}Z(){return this.id}K(){}process(){}};olympe.sc.Cb.Qe.C={ym:'SET'};olympe.sc.Cb.Qe.F={Aq:'REMOTE',bu:'LOCAL'};olympe.sc.Zd=class a{constructor(){this.F=this.K=this.P=null;this.V=new Map;this.G=new Map;this.C=new olympe.X.Cm(1E4);Ja(this.C,b=>{tj(b)})}$(b,c,d){const e=b.body(),f=e.c,g=this.V.get(f);switch(e.t){case olympe.sc.Zd.C.Au:c=this.G.get(e.f);b.we(c).catch(l=>{d.error('Unable to reply with paths: ',l)});break;case olympe.sc.Zd.C.Bu:const h=f+c,k=(l,n,p=0)=>{qj(l,(q,r)=>{let t;q instanceof olympe.dc.CloudObject?t=a.G(q):t=q;let u;q=null!=(u=l.Ke())?u:'';0<q.length&&(q+='.');n.push([`${p}.${q}${r}`,
873
- t])})};b.un(h).then(()=>{const l=[];k(g,l,0);hj(g,p=>{k(p,l,1)});olympe.H.wa.gb.sb.publish(h,{t:olympe.sc.Zd.C.wt,v:l,ts:0}).catch(p=>{d.error('Error publishing on service : ',p)});const n=new olympe.sc.Cb.Uu(h);sj(g,n);this.C.has(g)?Ia(this.C,g):this.C.add(g)}).catch(l=>{d.error('Error notifying on a contextId : ',l)});break;case olympe.sc.Zd.C.Cu:void 0!==g&&this.C.has(g)&&Ia(this.C,g);break;case olympe.sc.Zd.C.Dl:void 0!==g&&(this.C.delete(g),tj(g))}}la(b,c,d){this.P=new olympe.H.wa.gb.sb('discovery_debug_id',
874
- c);this.P.listen().subscribe(e=>{var f=e.body();if(f.t===olympe.sc.Zd.C.Vs){e=f.i;f=f.f;if(!this.G.has(f)){const g=this.ba(f,c,b);if(0!==g.length)this.G.set(f,g);else return}null===this.F&&(this.F=olympe.X.Ue(),f=new olympe.D.$b(this.F,c.C.C),this.K=new olympe.H.wa.gb.sb(this.F,f),this.K.listen().subscribe(g=>{this.$(g,b,d)}));olympe.H.wa.gb.sb.publish(e,{t:olympe.sc.Zd.C.rs,n:olympe.U.getParameter(olympe.sc.Config.uo)||'no name',a:b,s:this.F}).catch(g=>{d.error('Error publishing on draw service : '+
875
- g)})}})}ba(b,c,d){const e=[],f=olympe.dc.La(),g=(h,k)=>{hj(h,l=>{if(null!==l.Ke()){const n=olympe.dc.CloudObject.get(l.Ke()).bn(olympe.sc.Runnable.K).Pc();if(null!==n){const p=k+'/'+f.name(n);n.T()===b&&(e.push([p,l.Z()]),this.V.set(l.Z(),l));g(l,p)}}})};g(c.C,f.name(d));return e}static F(b,c,d){let e=d;d instanceof olympe.dc.CloudObject&&(e=a.G(d));olympe.H.wa.gb.sb.publish(b,{t:olympe.sc.Zd.C.Uh,k:c,v:e,ts:Date.now()}).catch(f=>{olympe.ta.Za('Debugger').error('Error publishing on service : ',f)})}static G(b){if(null===
876
- b||void 0===b)return'<null>';const c=olympe.dc.La();if(b instanceof olympe.dc.CloudObject){var d=b.Lb();if(!c.Xf(d,olympe.sc.jf))return b.toString();let f=`${b.Sf().name()} (${b.T()})`;var e=olympe.dc.CloudObject.get(d);d=olympe.dc.hb.from(e).an(olympe.dc.CloudObject.extendRel,!0).Hf().ub(olympe.dc.CloudObject.propertyRel).Hf().Pc();e=olympe.dc.hb.from(e).an(olympe.dc.CloudObject.extendRel,!0).Hf().ub(olympe.dc.CloudObject.G).Hf().Pc();d=d.filter(([g])=>g instanceof olympe.sc.jf);0!==d.length&&(f+=
877
- '<br> ',f+='Properties:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+' : '+c.fb(b.T(),g)+'<br>'}));d=e.filter(([g])=>g instanceof olympe.sc.jf);0!==d.length&&(f+=' ',f+='Relations:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+'<br>'}));return f}return b.toString()}};olympe.sc.Zd.K='discovery_debug_id';olympe.sc.Zd.C={Vs:0,rs:1,Au:2,Bu:3,wt:4,Uh:5,Cu:6,Dl:7};olympe.sc.Cb.IA=class extends olympe.sc.Cb.Qe{constructor(a=-1){super(a);this.C=new Map}K(){return olympe.sc.Cb.Qe.F.bu}process(a,b,c,...d){if(this.active&&b===olympe.sc.Cb.Qe.C.ym){a=uj(c,aj(a,d[0]),a);d=d[1];let e;null==(e=this.C.get(a))||e(d)}}on(a,b){this.C.set(a,b)}};olympe.sc.Cb.Uu=class extends olympe.sc.Cb.Qe{constructor(a){super(1);this.P=a;this.C=new Map;this.db=olympe.dc.La()}K(){return olympe.sc.Cb.Qe.F.Aq}F(){super.F();for(const a of this.C.values())a();this.C.clear()}process(a,b,c,...d){if(this.active&&b===olympe.sc.Cb.Qe.C.ym&&void 0!==d[0]&&null!==d[0]){const e=uj(c,aj(a,d[0]),a),f=d[1];let g;null==(g=this.C.get(e))||g();this.C.delete(e);if(f instanceof olympe.dc.CloudObject&&f.Sf()instanceof olympe.sc.jf){const h=Kd(this.db,f,()=>{olympe.sc.Zd.F(this.P,
878
- e,f)});this.C.set(e,()=>{Ld(this.db,f,h)})}olympe.sc.Zd.F(this.P,e,f)}}};olympe.sc.Metadata=class extends olympe.dc.CloudObject{};olympe.sc.Metadata.O=olympe.dc.ya.C('0161ae936c62f9fcd131',olympe.sc.Metadata);olympe.sc.Vb=class extends olympe.dc.CloudObject{F(){return this.Ab(olympe.sc.Vb.K)}C(){return this.Ab(olympe.sc.Vb.C)}};olympe.sc.Vb.O=olympe.dc.ya.C('01703376c4a81c0e9d90',olympe.sc.Vb);olympe.sc.Vb.K=olympe.sc.Vb.O.xa('01703376c4a81c0e9d91');olympe.sc.Vb.C=olympe.sc.Vb.O.xa('01703376c4a81c0e9d92');olympe.sc.Vb.F=olympe.sc.Vb.O.Ga('01703376c4a81c0e9d93');P(olympe.dc.CloudObject.O,olympe.sc.Vb.F);olympe.sc.Vb.prototype.F.L=olympe.D.J.F;olympe.sc.Vb.prototype.C.L=olympe.D.J.F;olympe.sc.X={};function vj(a,b){const c=Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2);a.C.set(c,b);return c}
879
- olympe.sc.X.jt=class{constructor(a,b,c){const d=olympe.net.ab.Gd.GET,e=olympe.net.ab.Gd.Cc,f=olympe.net.ab.Gd.jk,g=olympe.net.ab.Gd.fm,h=olympe.net.ab.Headers.Kj,k=olympe.net.ab.Headers.ri;this.N=a;this.G=b.la([d,e,f,g],[h,k]);this.K=c;this.C=new olympe.X.Bm(3E4);this.F=new olympe.D.$b('FileService context')}start(a){var b=olympe.net.ab.Gd.GET;const c=olympe.net.ab.Gd.Cc,d=olympe.net.ab.Gd.jk,e=olympe.net.ab.Gd.fm,f=olympe.net.ab.Mc.bh,g=olympe.net.ab.Mc.ht,h=olympe.net.ab.Mc.wm,k=olympe.net.ab.Headers.ri,
880
- l=olympe.net.ab.Headers.ws,n=`fileServer_${a}`;a=`/${this.K}/${a}/:${'fileTag'}`.replace(/\/+/g,'/').replace(/\/$/,'');this.N.debug(`Started file service with path : ${a}`);b=this.G.V(n,a,[b,c,d,e],(p,q)=>{if(p.method===e)return Promise.resolve(new olympe.net.rf('',f,'',{[l]:'*'}));const r=p.kj()[k],t=this.C.get(r);if(!t)return Promise.resolve(new olympe.net.rf('Invalid token',g,'Access denied'));this.C.delete(r);return t(p.kj(),q.get('fileTag'),p.body).catch(u=>Promise.resolve(new olympe.net.rf(`Internal server error: ${u}`,
881
- h,'Internal server error')))});this.F.onDestroy(()=>{this.G.ba(n).catch(p=>this.N.error(`An error occurred while stopping the file service: ${p}`))});return b}stop(){this.F.destroy()}};olympe.sc.Le={};olympe.sc.Le.zg={Az:null,Wu:'screenflow',rv:'ui-design',Kq:'software-intelligence',Nj:'data-management'};olympe.sc.re=class extends olympe.dm.BrickMetadata{Xe(){return olympe.sc.Le.zg.Kq}C(){return this.tb(olympe.sc.re.C,olympe.sc.logic.Qi)}F(){return this.tb(olympe.sc.re.F,olympe.sc.logic.Ph)}};olympe.sc.re.O=olympe.dc.ya.C('011100000000000adef0',olympe.sc.re);olympe.sc.re.C=olympe.sc.re.O.Ga('016ac4f59a2917fdef01');olympe.sc.re.F=olympe.sc.re.O.Ga('016ac4f59a2917fdef02');olympe.sc.re.prototype.C.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.re.prototype.F.L=new olympe.D.J(()=>olympe.dc.Da,[]);function wj(a,b){[].forEach(c=>c.call(a,b,(d,e)=>{null===e?b.remove(d):b.set(d,e)}))}function xj(a,b){const c=[];for(const d of b)b=a.db.fb(d,olympe.sc.logic.Hc.C,!0),c[b]=d;return c}
882
- olympe.sc.mb=class extends olympe.dm.BrickMetadata{Qt(a,b,c,d,e=!0){e||olympe.ta.Za('sc').error('parameter own= false ignored, investigate');return olympe.D.df(L(this.Uf(a,olympe.dc.X.Tb.lh,c)),d)}qx(){return this.tb(olympe.sc.mb.V,olympe.sc.Runnable)}Aw(){return this.tb(olympe.sc.mb.$,olympe.sc.Runnable)}qn(){return this.db.fb(this,olympe.sc.mb.Fa)}mn(){return null!==this.db.jc(this.tag,olympe.sc.Runnable.F.zc())}Vl(){return this.tb(olympe.sc.mb.F,olympe.sc.logic.Fb)}$j(){return this.tb(olympe.sc.mb.K,
883
- olympe.sc.logic.Rb)}};olympe.sc.mb.O=olympe.dc.ya.C('0112000000000000def0',olympe.sc.mb);olympe.sc.mb.Fa=olympe.sc.mb.O.xa('01692aa71f3108454479');olympe.sc.mb.hc=olympe.sc.mb.O.xa('0166446c1f128ebc903a');olympe.sc.mb.V=olympe.sc.mb.O.Ga('01692a4af82e8984742c');olympe.sc.mb.$=olympe.sc.mb.O.Ga('01692a4af82e8984742d');olympe.sc.mb.qa=olympe.sc.mb.O.Ga('01692a4af82e8984742e');olympe.sc.mb.F=olympe.sc.mb.O.Ga('01621fb84e320000f00a');olympe.sc.mb.K=olympe.sc.mb.O.Ga('01621fb84e320000f00b');
884
- olympe.sc.mb.Md=olympe.sc.mb.O.Ga('0171838bcfed0000e00e');olympe.sc.mb.qd=olympe.sc.mb.O.Ga('0171838bcfed0000a00a');m=olympe.sc.mb.prototype;m.Qt.L=olympe.D.J.C;m.qx.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.Aw.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.qn.L=olympe.D.J.C;m.mn.L=olympe.D.J.C;m.Vl.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.$j.L=new olympe.D.J(()=>olympe.dc.Da,[]);function yj(a){const b=olympe.dc.CloudObject.Fr(new Map,a);olympe.D.Na().onDestroy(()=>{const c=new olympe.dc.Transaction;c.delete(b);c.kb()});return b}function zj(a,b){kj(b.C,a);wj(a.Pd(),b);const c=a.K(),d=Aj(b,c),e=[];c.forEach((f,g)=>{f===a.la?e[0]=g:f===a.ba&&(e[1]=g)});void 0!==e[0]&&void 0!==e[1]&&(Bj(a,d[e[0]],d[e[1]]),c[e[0]]=null,c[e[1]]=null);c.forEach((f,g)=>{f&&f.call(a,b,d[g])})}
885
- function Cj(a,b){var c=a.Lb();const d=a.db.name(c),e=`Brick ${d} successfully run`,f=`Brick ${d} successfully cleared`,g=a.C(b);c=a.setupExecution(b).pipe(rxjs.operators.map(h=>{if(!b.G()&&(b.clear(),null!==h)){h=Array.isArray(h)?h:[h];const k=new olympe.sc.lr(b.C);b.C.C.run(a.update.bind(a,k,h,g));return!0}return!1})).subscribe(rxjs.Subscriber.create(h=>h?a.N.debug(e):a.N.debug(f),a.Fa.bind(a,b),()=>a.N.debug(`Brick ${d} completed`)));b.onDestroy(c.unsubscribe.bind(c))}
886
- function Dj(a,b,c,d){const e=d.C.C,f=V(a.db,b,c,e.F((g,h)=>{const k=Yi(d,h);g?olympe.dc.CloudObject.get(h).run(k):k.destroy()}));e.P(a.db.C.bind(a.db,b,c,f,!0))}function Aj(a,b){if(1===b.length)return[(d,e)=>{null!==e?a.set(d,e):a.remove(d)}];const c=b.map(()=>new Map);return c.map(d=>(e,f)=>{null!==f?d.set(e,f):d.delete(e);a:{for(const g of c)if(f=g.get(e),void 0!==f){a.set(e,f);break a}a.remove(e)}})}
887
- function Bj(a,b,c){const d=olympe.D.Na(),e=Kd(a.db,a.tag,d.F((f,g,h)=>{const k=h?c:b;null!==k&&(h&&b&&b(f,null),null===g||void 0===g?k(f,null):k(f,olympe.sc.lh(g)))}));d.onDestroy(()=>{Ld(a.db,a.tag,e)})}
888
- olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.N=c}run(a){a.C.C.run(()=>{zj(this,a);this.init(a);if(this.Pd().qn())Cj(this,a);else{const b=new olympe.sc.lr(a.C);this.update(b,[],[])}a.Gn(olympe.sc.mb.hc);a.cg(this.clear.bind(this,a));a.onDestroy(this.destroy.bind(this,a))})}Pd(){return this.Sf()}init(a){this.onInit(a)}update(a,b,c){const d=this.Pd();if(d.qn())this.onUpdate(a,b,c);else this.N.debug(`Softcoded runnable ${this.db.name(this)} with tag ${this.tag} running in context ${a.Z()}`),
889
- Dj(this,d,olympe.sc.mb.V,a),this.qa()&&Dj(this,d,olympe.sc.mb.qa,a)}clear(){}destroy(a){this.onDestroy(a)}setupExecution(){return rxjs.of([])}C(){return[]}onInit(){}onUpdate(){this.N.error(`Brick ${this.db.name(this.Lb())} (${this.Lb()}) is flagged as hardcoded, but method update() has not been overridden.`)}onDestroy(){}getInputs(){var a=this.Pd();return xj(a,a.db.tb(a.tag,olympe.sc.mb.F))}getOutputs(){var a=this.Pd();return xj(a,a.db.tb(a.tag,olympe.sc.mb.K))}F(){return[]}V(){return new Map}qa(){return!1}G(a,
890
- b,c,d){a=b.zb(a,c,!0);void 0!==d&&olympe.D.df(a,d);return a}eb(a,b,c,d,e){olympe.D.xn([d],f=>{b.set(a,olympe.D.Yr(f)?f.valueOf():f)});return this.G(a,b,c,e)}K(){return[this.la,this.ba]}la(a,b){Bj(this,b,null)}ba(a,b){Bj(this,null,b)}xb(a,b){const c=this.db,d=olympe.sc.logic.wb.K.zc(),e=olympe.sc.logic.wb.F,f=olympe.sc.logic.wb.C;this.Jr(d,g=>{var h=g.T();if(h=c.jc(h,e)||c.jc(h,f))return Ej(g,a,b.bind(null,h))})}Fa(a,b){const c=this.Lb();let d=this.db.name(c);try{const e=[a.Ke()];let f=a.getParent();
891
- for(;null!==f&&f.C!==olympe.sc.yn;)e.unshift(f.Ke()),f=f.getParent();d=e.map(g=>{if(null!==g){const h=this.db.model(g);return this.db.name(g)||h&&this.db.name(h)||g}return'?'}).join(' > ')}catch(e){this.N.warn(`Impossible to retrieve the stack for brick ${this.db.name(c)}.`)}this.N.error(`An error occurred in brick ${d} (${c}): ${b}\n${b.stack}`)}};olympe.sc.Runnable.O=Uc(olympe.dc.ya.C('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.K=olympe.sc.Runnable.O.Ga('01692a4af82e8984742b');
892
- olympe.sc.Runnable.F=olympe.sc.Runnable.O.Ga('01756a18d4921c103111');olympe.sc.Runnable.P=P(olympe.sc.Runnable.O,olympe.sc.mb.V);olympe.sc.Runnable.V=P(olympe.sc.Runnable.O,olympe.sc.mb.$);olympe.sc.Runnable.$=P(olympe.sc.Runnable.O,olympe.sc.mb.qa);P(olympe.sc.mb.O,olympe.sc.Runnable.K);P(olympe.sc.mb.O,olympe.sc.Runnable.F);olympe.sc.Runnable.prototype.Pd.L=new olympe.D.J(()=>olympe.sc.mb,[]);olympe.sc.Runnable.prototype.G.L=new olympe.D.J(()=>Object,[]);olympe.sc.Runnable.prototype.eb.L=olympe.D.J.C;function Fj(a){if(a){if('string'===typeof a)return a;if(a instanceof olympe.sc.Ge)return(a=a.F())?a.valueOf():null;if('function'===typeof a.T)return a.T()}return null}olympe.sc.Ge=class extends olympe.dc.CloudObject{F(){return this.db.tb(this,olympe.sc.Ge.C)[0]}C(){return olympe.dc.CloudObject.get(Fj(this))}toString(){const a=Fj(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.Ge.O=olympe.dc.ya.C('0163c9ae01f2d6e9ca49',olympe.sc.Ge);olympe.sc.Ge.C=olympe.sc.Ge.O.Ga('0169b5a8a33144fb0b49');
893
- P(olympe.dc.CloudObject.O,olympe.sc.Ge.C);olympe.sc.Ge.prototype.F.L=new olympe.D.J(()=>String,[]);olympe.sc.Ge.prototype.C.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.Bo=class extends olympe.dm.Pb{Xe(){return olympe.sc.Le.zg.Nj}};olympe.sc.Bo.O=olympe.dc.ya.C('0163a68ce44f3d1fa84c',olympe.sc.Bo);olympe.sc.jf=class extends olympe.dm.BrickMetadata{};olympe.sc.jf.O=olympe.dc.ya.C('016324fde11a836f76c2',olympe.sc.jf);let Gj=null;
894
- function Hj(a,b){Gj=a;(new olympe.dc.pf(a,olympe.dc.Dd.Pi)).ub(olympe.sc.Ma.Me.C).ub(olympe.sc.hd.F.zc()).kb((c,d)=>{if(c)olympe.ta.Za('sc').error('Error while loading business container:',c.message),b(olympe.sc.hd.C.cc);else{c=null;for(const [e,f]of d.Bc.gd())e===olympe.sc.hd.F.T()&&(c=f);null!==c?nf(hf(new olympe.dc.pf(c),olympe.dc.Qb.zf),(e,f)=>{const g=olympe.dc.mc.Vc,h=olympe.dc.mc.yi,k=f.T();f=f.Sa();return olympe.dc.La().Xf(e,olympe.sc.jf)&&f===olympe.dc.Ca.ORIGIN&&(k===g||k===h)}).kb(()=>
895
- b(olympe.sc.hd.C.Gp)):(olympe.ta.Za('sc').error('No container found for the application',a),b(olympe.sc.hd.C.cm))}})}olympe.sc.hd=class extends olympe.dc.CloudObject{};olympe.sc.hd.C={Gp:0,cm:1,cc:2};olympe.sc.hd.O=olympe.dc.ya.C('017b3aa8fae1e3d044dc',olympe.sc.hd);olympe.sc.hd.F=olympe.sc.hd.O.Ga('017b3aa8fd1659291b92');olympe.sc.hd.K=olympe.sc.hd.O.Ga('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.CloudObject{};olympe.sc.Map.O=olympe.dc.ya.C('018119241abce0e5696e',olympe.sc.Map);olympe.sc.$g=class extends olympe.sc.Map{};olympe.sc.$g.O=olympe.dc.ya.C('01631aacd8276ea98490',olympe.sc.$g);olympe.sc.Hi=class extends olympe.dm.File{K(){const a=olympe.D.Ic(olympe.D.$a);this.Ok(b=>{a.update(olympe.D.Bb(b))});return a.zb()}};olympe.sc.Hi.O=Pc('01644b6297305d62fca2',olympe.sc.Hi);olympe.sc.Hi.prototype.K.L=olympe.D.J.F;olympe.sc.jd=class extends olympe.dm.File{K(){return this.Ab(olympe.sc.jd.fontFamilyProp)}P(){return this.Ab(olympe.sc.jd.F)}V(){return this.ge(olympe.sc.jd.K)}};olympe.sc.jd.O=Pc('01647e113043c637b541',olympe.sc.jd);olympe.sc.jd.fontFamilyProp=olympe.sc.jd.O.xa('01647e35ecd24ef0b88d');olympe.sc.jd.F=olympe.sc.jd.O.xa('01647e677f5d1cfbdf42');olympe.sc.jd.K=olympe.sc.jd.O.xa('01647e6780999bf8bd25');olympe.sc.jd.prototype.K.L=olympe.D.J.F;olympe.sc.jd.prototype.P.L=olympe.D.J.F;
896
- olympe.sc.jd.prototype.V.L=olympe.D.J.G;olympe.sc.Ck=class extends olympe.dm.File{};olympe.sc.Ck.O=Pc('0164643c432146a71d5c',olympe.sc.Ck);olympe.sc.nr=class extends olympe.dc.CloudObject{};olympe.sc.nr.O=olympe.dc.ya.C('016421bb3797e22d1c4e',olympe.sc.nr);olympe.sc.logic={};olympe.sc.logic.gp=(a,b)=>a===b?0:a>b?1:-1;
897
- olympe.sc.logic.HA=(a,b,c,d,e,f,g)=>{const h=b.T();b=olympe.D.Xa(b.C().T());let k,l;if(b===olympe.dc.za(olympe.dm.String))k=c.valueOf().toLowerCase(),l=p=>p.Ab(h).toLowerCase();else if(b===olympe.dc.za(olympe.dm.Number))k=c.valueOf(),l=p=>p.ge(h);else if(b===olympe.dc.za(olympe.dm.DateTime))k=c.getTime(),l=p=>olympe.D.Ha([p.mj(h)],q=>q.getTime(),Number,'FilterList Date&DateTime TransformFlows');else{c=olympe.dc.La().name(b);g.warn(`Properties of type ${c} are not supported. List will not be filtered.`);e(a);
898
- return}let n;if('<'===f)n=(p,q)=>olympe.sc.logic.gp(q,p);else if('>'===f)n=(p,q)=>olympe.sc.logic.gp(p,q);else{g.error(`Unknown inequality ${f}. Please use '<' or '>'`);return}e(a.Cg().filter(p=>olympe.D.Ha([l(p)],q=>{q=n(q.valueOf(),k);return olympe.D.Ac(d.valueOf()?1===q:0<=q)},olympe.D.ra,'FilterList ListDefBuilder Filter TransformFlows')).uf())};
899
- olympe.sc.logic.dD=(a,b)=>{if(a instanceof olympe.D.ga)return a;if(a instanceof olympe.D.$a)return a.ns();if(a instanceof olympe.D.ra)return a.Pr();if('string'===typeof a||'number'===typeof a)return olympe.D.Ba(Number(a));b.error(`Could not parse provided value ${a} into a number`);return olympe.D.ga.Tp};olympe.sc.logic.ua={};olympe.sc.logic.ua.To=class{constructor(a,b,c){this.O=olympe.dc.ya.C(a,b,...c)}T(){return this.O.T()}};olympe.sc.logic.ua.To.ma=[olympe.dc.De];const Ij=Object.create(null),Jj=new Map;function Kj(a){if(void 0===Ij[a])throw Error(`Tag: ${a} - does not correspond to a registered function`);return Rc(a)}function Lj(a,b,c=olympe.sc.logic.Function){if(Jj.has(a))throw c=Kj(a),Error(`Tag: ${a} - overwriting existing function definition "${c.name}" with "${b.name}"`);const d=olympe.dc.ya.C(a,b,...[]);Jj.set(a,{O:d,pD:b,cD:c});return d}
900
- olympe.sc.logic.ya=class{constructor(){}static C(a,b,...c){if(Ij[a])throw c=Kj(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.ua.To(a,b,[olympe.sc.R.Ea].concat(c));return Ij[a]=b}};olympe.sc.logic.Iz=class{};olympe.sc.logic.Lj=class extends olympe.dc.CloudObject{};olympe.sc.logic.Lj.O=olympe.dc.ya.C('01621fb84e320000cf00',olympe.sc.logic.Lj);olympe.sc.logic.Error=class{constructor(a,b){this.code=a;this.$r=b}static create(a,b){return new olympe.sc.logic.Error(b,a)}Yw(){return this.$r}xw(){return this.code}};z('olympe.sc.logic.Error',olympe.sc.logic.Error);olympe.sc.logic.Error.prototype.getCode=olympe.sc.logic.Error.prototype.xw;olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.Yw;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;
901
- olympe.sc.logic.zi=class extends olympe.sc.logic.Lj{static create(a,b){return new olympe.sc.logic.Error(b,a)}};olympe.sc.logic.zi.O=olympe.dc.ya.C('016eeb5ede9f3094d8f0',olympe.sc.logic.zi);olympe.sc.logic.pe=class extends olympe.dc.CloudObject{C(){return this.pc(olympe.sc.logic.pe.C,olympe.dc.CloudObject)}};olympe.sc.logic.pe.O=olympe.dc.ya.C('016ac4f59ee8ea2081ba',olympe.sc.logic.pe);olympe.sc.logic.pe.K=olympe.sc.logic.pe.O.xa('017bc044aeacce7ffc8f');olympe.sc.logic.pe.C=olympe.sc.logic.pe.O.Ga('016ac4f5a0091c4790e2');P(olympe.dc.CloudObject.O,olympe.sc.logic.pe.C);olympe.sc.logic.pe.prototype.C.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Qi=class extends olympe.sc.logic.pe{};olympe.sc.logic.Qi.O=olympe.dc.ya.C('016ac4f59c592b862457',olympe.sc.logic.Qi);olympe.sc.logic.Qi.F=olympe.sc.re.C.zc();olympe.sc.logic.Ph=class extends olympe.sc.logic.pe{};olympe.sc.logic.Ph.O=olympe.dc.ya.C('016ac4f59dd99f5df3e1',olympe.sc.logic.Ph);olympe.sc.logic.Ph.F=P(olympe.sc.logic.Ph.O,olympe.sc.re.F);olympe.sc.logic.Be=class extends olympe.sc.mb{Xe(){return olympe.sc.Le.zg.Kq}$(){return this.en().Cg().Xf([olympe.sc.logic.Function]).and().not().Xf([olympe.sc.logic.Vd,olympe.sc.logic.$d]).uf()}Qw(){return this.Vl().Cg().oj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Qi.F]).uf()}Rw(){return this.$j().Cg().oj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Ph.F]).uf()}ee(a){const b=this.db.$m(this,[olympe.sc.mb.F],c=>this.db.model(c)===olympe.dc.za(a));return b?olympe.dc.CloudObject.get(b):null}Pf(a){const b=
902
- this.db.$m(this,[olympe.sc.mb.K],c=>this.db.model(c)===olympe.dc.za(a));return b?olympe.dc.CloudObject.get(b):null}zx(){return this.Vl().Cg().oj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Fb).uf()}Ax(){return this.$j().Cg().oj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Rb).uf()}};Lj('01621fb84e320000f000',olympe.sc.logic.Be,olympe.sc.logic.Function);m=olympe.sc.logic.Be.prototype;m.Qw.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.Rw.L=new olympe.D.J(()=>olympe.dc.Da,[]);
903
- m.ee.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);m.Pf.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.zx.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.Ax.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.logic.hg=class extends olympe.sc.logic.Be{C(){return this.ee('016ac63229782039429f')}F(){return this.Pf('016ac6322acf67eebfe7')}G(){return this.$j().Cg().ub(olympe.sc.logic.Hc.typeRel).Sk(olympe.sc.logic.zi).uf().tf().nn(olympe.D.ga.ZERO)}};olympe.sc.logic.hg.C='016ac63229782039429f';olympe.sc.logic.hg.ba='016ac6322acf67eebfe7';olympe.sc.logic.hg.O=Lj('01621fb84e320000a000',olympe.sc.logic.hg,olympe.sc.logic.Action);
904
- olympe.sc.logic.hg.prototype.C.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);olympe.sc.logic.hg.prototype.F.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.hg.prototype.G.L=olympe.D.J.P;olympe.sc.logic.no=class extends olympe.sc.logic.Be{};olympe.sc.logic.no.O=Lj('01621fb84e320000f011',olympe.sc.logic.no);olympe.sc.logic.mo=class extends olympe.sc.logic.hg{};olympe.sc.logic.mo.O=Lj('01621fb84e320000f012',olympe.sc.logic.mo);olympe.sc.logic.Function=class extends olympe.sc.Runnable{K(){return[this.xb]}V(){const a=olympe.sc.Wd.F.xt,b=olympe.sc.Wd.F.zu,c=this.db,d=new Map;this.getInputs().forEach(e=>{d.set(a+c.name(e),e)});this.getOutputs().forEach(e=>{d.set(b+c.name(e),e)});return d}C(a){return this.getOutputs().map(b=>this.db.Vk(b,olympe.sc.logic.Hc.typeRel,olympe.sc.logic.Lj)?a.Gn.bind(a,b):a.set.bind(a,b))}setupExecution(a){const b=this.getInputs();return 0<b.length?rxjs.combineLatest(b.map(c=>a.observe(c))).pipe(rxjs.operators.map(c=>
905
- c.includes(null)?null:c)):rxjs.of([])}};olympe.sc.logic.Function.O=olympe.dc.ya.C('0168c6f020f2a96f0000',olympe.sc.logic.Function,olympe.sc.R.Ea);olympe.sc.logic.Hc=class extends olympe.dc.CloudObject{C(){return this.pc(olympe.sc.logic.Hc.typeRel,olympe.dc.CloudObject)}F(){return this.ge(olympe.sc.logic.Hc.C)}};olympe.sc.logic.Hc.O=olympe.dc.ya.C('0168a431d25001540000',olympe.sc.logic.Hc);olympe.sc.logic.Hc.C=olympe.sc.logic.Hc.O.xa('01740c5d4ae4b520dd01');olympe.sc.logic.Hc.typeRel=olympe.sc.logic.Hc.O.Ga('0168a431d3b9b7438424');P(olympe.dc.CloudObject.O,olympe.sc.logic.Hc.typeRel);
906
- olympe.sc.logic.Hc.prototype.C.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Hc.prototype.F.L=olympe.D.J.G;olympe.sc.logic.Fb=class extends olympe.sc.logic.Hc{};olympe.sc.logic.Fb.O=olympe.dc.ya.C('0168a431d25001540001',olympe.sc.logic.Fb);olympe.sc.logic.Fb.ba=olympe.sc.logic.Hc.O.xa('01740c5d4ae4b520dd02');olympe.sc.logic.Fb.$=P(olympe.sc.logic.Fb.O,olympe.sc.mb.F);olympe.sc.logic.Fb.F=olympe.sc.logic.Fb.O.Ga('0168a431d91f2578000b',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Fb.K=olympe.sc.logic.Fb.O.Ga('01621fb84e32000000a1',olympe.dc.Ca.ORIGIN);
907
- olympe.sc.logic.Fb.V=olympe.sc.logic.Fb.O.Ga('01621fb84e32000000d1',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Rb=class extends olympe.sc.logic.Hc{};olympe.sc.logic.Rb.O=olympe.dc.ya.C('0168a431d25001540002',olympe.sc.logic.Rb);olympe.sc.logic.Rb.$=P(olympe.sc.logic.Rb.O,olympe.sc.mb.K);olympe.sc.logic.Rb.F=olympe.sc.logic.Rb.O.Ga('0168a431d91f25780003',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Rb.V=olympe.sc.logic.Rb.O.Ga('01621fb84e32000000a2',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Rb.K=olympe.sc.logic.Rb.O.Ga('01621fb84e32000000d2',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Action=class extends olympe.sc.logic.Function{setupExecution(a){const b=this.Pd().C().T();return a.observe(b).pipe(rxjs.operators.map(c=>null===c?null:this.getInputs().filter(d=>d!==b).map(d=>a.get(d))))}};olympe.sc.logic.Action.O=olympe.dc.ya.C('0168c6f020f2a96a0000',olympe.sc.logic.Action,olympe.sc.R.Ea);olympe.sc.logic.Vd=class extends olympe.sc.logic.Function{run(a){zj(this,a);const b=a.getParent(),c=this.db.jc(this,olympe.sc.logic.Vd.C),d=this.db.jc(this,olympe.sc.logic.Vd.G);a.on(c,e=>b.set(d,e),this.tag)}P(){return this.pc(olympe.sc.logic.Vd.C,olympe.sc.logic.Fb)}Ka(){return this.pc(olympe.sc.logic.Vd.G,olympe.sc.logic.Rb)}};olympe.sc.logic.Vd.O=olympe.dc.ya.C('01621fb84e32000000a0',olympe.sc.logic.Vd,olympe.sc.R.Ea);olympe.sc.logic.Vd.C=P(olympe.sc.logic.Vd.O,olympe.sc.logic.Fb.K);
908
- olympe.sc.logic.Vd.G=P(olympe.sc.logic.Vd.O,olympe.sc.logic.Rb.V);olympe.sc.logic.Vd.prototype.P.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);olympe.sc.logic.Vd.prototype.Ka.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.$d=class extends olympe.sc.logic.Function{run(a){const b=a.getParent(),c=this.db.jc(this,olympe.sc.logic.$d.G),d=this.db.jc(this,olympe.sc.logic.$d.C);b.on(c,e=>a.set(d,e),b.Z())}Ka(){return this.pc(olympe.sc.logic.$d.G,olympe.sc.logic.Fb)}P(){return this.pc(olympe.sc.logic.$d.C,olympe.sc.logic.Rb)}};olympe.sc.logic.$d.O=olympe.dc.ya.C('01621fb84e32000000d0',olympe.sc.logic.$d,olympe.sc.R.Ea);olympe.sc.logic.$d.G=P(olympe.sc.logic.$d.O,olympe.sc.logic.Fb.V);
909
- olympe.sc.logic.$d.C=P(olympe.sc.logic.$d.O,olympe.sc.logic.Rb.K);olympe.sc.logic.$d.prototype.Ka.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);olympe.sc.logic.$d.prototype.P.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);function Ej(a,b,c){const d=a.db.jc(a,olympe.sc.logic.wb.ba)||a.db.jc(a,olympe.sc.logic.wb.V),e=a.db.jc(a,olympe.sc.logic.wb.$),f=a.db.Zf((()=>{let k=null,l=a.db.jc(a,olympe.sc.logic.wb.F);l?k=a.db.jc(l,olympe.dm.Property.typeRel):(l=a.db.jc(a,olympe.sc.logic.wb.C))&&(k=a.db.jc(l,olympe.sc.logic.Hc.typeRel));return k||olympe.dc.CloudObject.O.T()})(),olympe.dm.xf)?new olympe.D.$b('Pipe Context'):null,g=a.F.bind(a,b,c,f);if(null!==d&&null!==e){let k;const l=b.cl(e,n=>{k&&k();k=n.on(d,g,e)});return()=>
910
- {g(null);l();k&&k()}}const h=Jd(a.db,a,olympe.sc.logic.wb.valueProp,g);return()=>{g(null);a.db.F(a,olympe.sc.logic.wb.valueProp,h)}}function Mj(a,b,c,d){const e=b.getParent();ej(e.C,c,d);b.set(a.C,()=>{fj(e.C,c)})}
911
- olympe.sc.logic.wb=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.N=c;this.C=`detachObject${this.tag}`}F(a,b,c,d){null!==c&&c.Fa();const e=a.get(this.C);e&&(e(),a.remove(this.C));const f=olympe.sc.lh(d);if(f instanceof olympe.dc.CloudObject){if(d=f.T(),Mj(this,a,d,[d]),null!==c&&'function'===typeof f.getValue){c.run(()=>{olympe.D.wc([f.getValue()],g=>{b(g.valueOf())})});return}}else f instanceof olympe.dc.Ya&&Mj(this,a,`qr-${f.hash}`,Me(f));b(f)}getValue(a){return this.Uf(olympe.sc.logic.wb.valueProp,
912
- a||olympe.dc.X.Tb.lh,Object)}Rt(){const a=this.transform(olympe.sc.logic.wb.C,olympe.sc.logic.Hc.typeRel);a.Fd(olympe.dc.CloudObject);return a.Rc()}xx(){return this.pc(olympe.sc.logic.wb.$,olympe.dc.CloudObject)}vx(){return this.pc(olympe.sc.logic.wb.ba,olympe.sc.logic.Rb)}wx(){return this.pc(olympe.sc.logic.wb.V,olympe.dm.Property)}Iw(){return this.pc(olympe.sc.logic.wb.K,olympe.dc.CloudObject)}Gw(){return this.pc(olympe.sc.logic.wb.C,olympe.sc.logic.Fb)}Hw(){return this.pc(olympe.sc.logic.wb.F,
829
+ 21:'GraphDef Query Failed',22:'Client Request Invalid',23:'Internal Server Error',24:'File Retrieval Error',25:'File Does Not Exists',26:'Restore Failed',27:'Permission Error',14:'Handshake Failed',28:'Client Version Too Old',29:'Client Version Invalid Format',34:'Server overloaded, retry later',35:'Add token error',36:'Keep token alive error',37:'Unknown client message',39:'Fetch data while concurrency transaction'};olympe.H.rd.oa.ma=[olympe.H.oa];olympe.H.R={Aa:'server.Manager',Yn:'server.bus.Manager',Ea:'server.Logger',Hd:'server.Source',Vg:'server.FileSource',up:'server.ImportFileSvcHttpRequest',Tn:'server.BackupSvcHttpRequest',fq:'server.OpenIDSvcHttpRequest',Xo:'server.GetContextSvcPathRequest',rp:'server.ImplicitGDSvcPathRequest',Jo:'server.ExplicitGDSvcPathRequest',cr:'server.TransactionOverHttpPathRequest',kr:'server.UserTokenRequest',ir:'server.UserTagRequest',gr:'server.UserRolesRequest',Fq:'server.RoleMembersRequest',Fh:'server.IOUrlsProvider',
830
+ Po:'server.fileSvcUrl',kq:'communication.peerFileSvcUrl'};olympe.H.sd={li:'server.connectors.Auth',nB:'server.connectors.Signaling'};
831
+ olympe.H.Config={kd:'server.host',td:'server.port',nd:'server.ssl',Ln:'server.autoConnect',tm:'server.reconnectionDelay',oq:'server.pingInterval',Gm:'server.messageTimeout',Dq:'server.retryHttpOnOverload',ho:'server.clientVersion',Kq:'server.serverVersion',Zu:'server.wakeUpService',Xn:'bus.host',Zn:'bus.path',$n:'bus.port',bo:'bus.vhost',ao:'bus.ssl',og:'bus.keepalive',Su:'bus.reschedulePings',Is:'bus.clientId',Gs:'bus.clean',Ls:'bus.connectTimeout',$q:'bus.tokenTimeout',Ku:'bus.queueQoSZero',Wn:'bus.allowGuest'};
832
+ olympe.H.qb={Ad:'server.basePath',rr:'server.wsPath',No:'server.filePath',tp:'server.importFilePath',Sn:'server.backupSvcPath',eq:'server.openIDSvcPath',Wo:'server.GetContextSvcPath',sp:'server.ImplicitGraphdefSvcPath',Ko:'server.ExplicitGraphdefSvcPath',br:'server.TransactionOverHttpPath',jr:'server.userTokenSvcPath',hr:'server.userTagPath',fr:'server.userRolesPath',Eq:'server.roleMembersPath',km:'communication.peerFileSvcPath'};
833
+ olympe.U.config(function(a){var b='object'===typeof window&&window.location&&window.location.hostname||'localhost';const c='localhost'===b;E(a,olympe.H.Config.kd,b);E(a,olympe.H.Config.td,c?8080:443);E(a,olympe.H.Config.nd,'localhost'!==b);E(a,olympe.H.qb.Ad,'OlympeServer');E(a,olympe.H.qb.rr,'websocket');E(a,olympe.H.qb.No,'rest/filesvc');E(a,olympe.H.qb.tp,'rest/importsvc');E(a,olympe.H.qb.Sn,'rest/backupsvc');E(a,olympe.H.qb.eq,'rest/openid');E(a,olympe.H.qb.Wo,'rest/initialData');E(a,olympe.H.qb.sp,
834
+ 'rest/querysvc/graphDefImplicit');E(a,olympe.H.qb.Ko,'rest/querysvc/graphDefExplicit');E(a,olympe.H.qb.br,'rest/transaction');E(a,olympe.H.qb.jr,'rest/token');E(a,olympe.H.qb.hr,'rest/authorization/getUserTag');E(a,olympe.H.qb.fr,'rest/authorization/getUserRoles');E(a,olympe.H.qb.Eq,'rest/authorization/roleMembers');E(a,olympe.H.Config.Ln,!0);E(a,olympe.H.Config.tm,5E3);E(a,olympe.H.Config.oq,5E3);E(a,olympe.H.Config.Gm,15E3);E(a,olympe.H.Config.Dq,5E3);E(a,olympe.H.Config.Kq,'7.0.0');E(a,olympe.H.Config.Xn,
835
+ '');E(a,olympe.H.Config.Zn,c?'':'/mqtt');E(a,olympe.H.Config.$n,c?15675:443);E(a,olympe.H.Config.ao,null);E(a,olympe.H.Config.bo,c?'/':'');E(a,olympe.H.Config.og,30);E(a,olympe.H.Config.$q,3E5);E(a,olympe.H.Config.Wn,!1);E(a,olympe.H.qb.km,'nodes/files');b=a.getParameter(olympe.Jg.Config.To);if(void 0!==b)wa(a,b);else throw Error('Framework version could not be found! Is field "olympe-framework" present in version.json?');C(a,olympe.H.R.Ea,[olympe.ta.R.Aa],d=>d.Qc('communication'));C(a,'server.WebSocketRequest',
836
+ [new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Ad),new olympe.U.fa(olympe.H.qb.rr)],(d,e,f,g,h)=>new olympe.net.Yi(d,e,(g+'/'+h).replace(/\/+/g,'/').replace(/\/$/,''),f));C(a,'server.wakeUpRequest',[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.Config.Zu)],(d,e,f,g)=>{if(null===g||void 0===g)return null;g=g.replace(/\/+/g,
837
+ '/').replace(/\/$/,'');return new olympe.net.Yi(d,e,g,f)});b=(d,e,f,g,h)=>(new olympe.net.Yj(d,e,`${g}${h?'/'+h:''}`.replace(/\/+/g,'/').replace(/\/$/,''),f)).C();C(a,olympe.H.R.up,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Ad),new olympe.U.fa(olympe.H.qb.tp)],b);C(a,olympe.H.R.Tn,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Ad),
838
+ new olympe.U.fa(olympe.H.qb.Sn)],b);C(a,olympe.H.R.fq,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Ad),new olympe.U.fa(olympe.H.qb.eq)],b);C(a,olympe.H.R.Xo,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Ad),new olympe.U.fa(olympe.H.qb.Wo)],b);C(a,olympe.H.R.rp,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),
839
+ new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Ad),new olympe.U.fa(olympe.H.qb.sp)],b);C(a,olympe.H.R.Jo,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Ad),new olympe.U.fa(olympe.H.qb.Ko)],b);C(a,olympe.H.R.cr,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Ad),new olympe.U.fa(olympe.H.qb.br)],b);C(a,olympe.H.R.kr,
840
+ [new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Ad),new olympe.U.fa(olympe.H.qb.jr)],b);C(a,olympe.H.R.ir,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Ad),new olympe.U.fa(olympe.H.qb.hr)],b);C(a,olympe.H.R.gr,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Ad),
841
+ new olympe.U.fa(olympe.H.qb.fr)],b);C(a,olympe.H.R.Fq,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Ad),new olympe.U.fa(olympe.H.qb.Eq)],b);C(a,olympe.H.R.Po,[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.td),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.qb.Ad),new olympe.U.fa(olympe.H.qb.No)],b);C(a,olympe.H.R.kq,[new olympe.U.fa(olympe.net.Config.Ll),new olympe.U.fa(olympe.net.Config.Ml),
842
+ new olympe.U.fa(olympe.net.Config.np),new olympe.U.fa(olympe.H.qb.km)],b);C(a,'server.ManagerConfig',[new olympe.U.fa(olympe.H.Config.Ln),new olympe.U.fa(olympe.H.Config.tm),new olympe.U.fa(olympe.H.Config.oq),new olympe.U.fa(olympe.H.Config.Gm),new olympe.U.fa(olympe.H.Config.ho),new olympe.U.fa(olympe.H.Config.Kq),new olympe.U.fa(olympe.dc.Config.eh),new olympe.U.fa(olympe.H.Config.Dq)],(...d)=>{const e='autoConnect reconnectionDelay pingInterval messageTimeout clientVersion serverVersion getContextMode retryHttpOverload'.split(' '),
843
+ f=new Map;d.forEach((g,h)=>f.set(e[h],g));return f});C(a,'server.bus.ManagerConfig',[new olympe.U.fa(olympe.H.Config.kd),new olympe.U.fa(olympe.H.Config.Xn),new olympe.U.fa(olympe.H.Config.Zn),new olympe.U.fa(olympe.H.Config.$n),new olympe.U.fa(olympe.H.Config.bo),new olympe.U.fa(olympe.H.Config.ao),new olympe.U.fa(olympe.H.Config.nd),new olympe.U.fa(olympe.H.Config.Wn),new olympe.U.fa(olympe.H.Config.og),new olympe.U.fa(olympe.H.Config.Su),new olympe.U.fa(olympe.H.Config.Is),new olympe.U.fa(olympe.H.Config.Gs),
844
+ new olympe.U.fa(olympe.H.Config.tm),new olympe.U.fa(olympe.H.Config.Ls),new olympe.U.fa(olympe.H.Config.Ku),new olympe.U.fa(olympe.H.Config.Gm),new olympe.U.fa(olympe.H.Config.$q)],(d,e,f,g,h,k,l,n,...p)=>{e=`${(null!=k?k:l)?'wss://':'ws://'}${e||d}:${g}${f}/ws`;const q='keepalive reschedulePings clientId clean reconnectPeriod connectTimeout queueQoSZero messageTimeout tokenTimeout'.split(' ');p=p.reduce((r,t,u)=>{r[q[u]]=t;return r},{});p.vhost=`${h||d.split('.')[0]}`;d=new Map;d.set('url',e);d.set('connectionOptions',
845
+ p);d.set('allowGuest',n);return d});A(a,olympe.H.R.Aa,olympe.H.rd.oa,olympe.H.R.Ea,olympe.net.R.Aa,olympe.host.R.qg,'server.WebSocketRequest','server.wakeUpRequest','server.ManagerConfig');A(a,olympe.H.sd.li,olympe.H.sa.Ua,olympe.H.R.Ea,olympe.H.R.Aa,olympe.H.R.kr,olympe.H.R.ir,olympe.H.R.gr,olympe.H.R.Fq,olympe.H.R.fq,olympe.auth.R.mk,olympe.jc.R.bk);A(a,olympe.H.R.Yn,olympe.H.wa.oa,olympe.H.R.Ea,olympe.net.R.Aa,olympe.auth.R.Aa,olympe.host.R.qg,'server.bus.ManagerConfig');ua(a,olympe.auth.sd.Aa,
846
+ olympe.H.sd.li);ua(a,olympe.auth.sd.Jp,olympe.H.sd.li);ua(a,olympe.auth.sd.Ie,olympe.H.sd.li);ua(a,olympe.auth.sd.Pe,olympe.H.sd.li);A(a,olympe.H.R.Vg,olympe.H.Tj,olympe.H.R.Ea,olympe.net.R.Aa,olympe.auth.R.Aa,olympe.H.R.Po,olympe.H.R.kq);ua(a,olympe.bb.R.Vg,olympe.H.R.Vg);C(a,olympe.H.R.Hd,[olympe.ta.R.Aa,olympe.H.R.Aa,olympe.auth.R.Aa,olympe.bb.R.Vg,olympe.H.R.Xo,olympe.H.R.rp,olympe.H.R.Jo,olympe.H.R.cr],(d,e,f,g,h,k,l,n)=>new olympe.H.gh(d.Qc('server.source'),e,f,g,[h,k,l,n]));A(a,olympe.H.R.Fh,
847
+ olympe.H.Zj,olympe.H.R.up,olympe.H.R.Tn);ua(a,olympe.dc.da.R.Fh,olympe.H.R.Fh);ua(a,olympe.bb.R.ym,olympe.H.R.Hd)},'olympe.communication');olympe.U.run([olympe.H.R.Yn],a=>{olympe.H.wa.Sc=()=>a});olympe.sc={};olympe.sc.R={Ea:'sc.Logger',vm:'sc.RootContext'};olympe.sc.Config={ff:'sc.app',hg:'sc.debug',vo:'sc.debugger',Vs:'sc.disableTheme',PRODUCTION:'sc.production',uu:'sc.onstartTimeout',Cq:'sc.remoteActionTimeout',bq:'sc.offlineStart',mu:'google.apikey'};
848
+ olympe.U.config(a=>{E(a,olympe.sc.Config.ff,'');E(a,olympe.sc.Config.bq,!1);E(a,olympe.sc.Config.hg,!1);E(a,olympe.sc.Config.Vs,!1);E(a,olympe.sc.Config.PRODUCTION,!1);E(a,olympe.sc.Config.uu,2E4);E(a,olympe.sc.Config.mu,'AIzaSyD0rTnF3Tq-ZjgdaqyvC8Jg-RSgpZM2jBU');E(a,olympe.sc.Config.Cq,1E4);C(a,olympe.sc.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('sc'));C(a,olympe.sc.R.vm,[new olympe.U.fa(olympe.sc.Config.PRODUCTION)],b=>{const c=new olympe.sc.Vd('root','root',null);olympe.sc.zn=c;c.set(olympe.sc.Ra.C.PRODUCTION,
849
+ b);return new olympe.sc.Ra(c)})},'olympe.sc');olympe.U.run([olympe.sc.R.vm],a=>{olympe.kj().ctx=a});olympe.sc.nn=()=>null!==olympe.dc.La().ic(void 0,olympe.sc.Runnable.F.zc());olympe.sc.iD=(a,b,c,d)=>{c=a.create(olympe.sc.Vb).setProperty(olympe.sc.Vb.C,c||null).setProperty(olympe.sc.Vb.K,d||null);a.Va(olympe.sc.Vb.F,c,b);a.Va(olympe.dc.CloudObject.containsRel,b,c);return c.T()};olympe.sc.kh=a=>{a=olympe.dc.X.Tb.kh(a);return a instanceof olympe.sc.Ge?a.C():a};olympe.sc.yD=a=>{a=Ic(a);return a instanceof olympe.sc.Ge?a.C():a};
850
+ olympe.sc.vD=function(a){const b=olympe.dm.Pb.C.zc(),c=olympe.dc.CloudObject.containsRel.zc();var d=olympe.dc.za(a);if(void 0===d)return[];a=olympe.dc.La();var e=a.model(d);const f=[],g=[];let h=[];if(a.Xf(e,olympe.dm.Pb))h.push(d);else{for(e=[];null===a.ic(d,b);){e.push(d);const k=a.ic(d,c);if(null===k)return olympe.ta.Za('sc').warn(`Object ${d} has no container`),[];k===a.ic(d,olympe.dc.CloudObject.instancesRel)?(f.push(d),d=a.ic(k,c)):d=k;if(e.includes(d))throw Error(`Instance ${d} (${a.name(d)}) is part of a cyclic contain pattern`);
851
+ }g.push(d);h.push(a.ic(g[0],b))}h=h.concat(a.Tf(h[0],olympe.dm.Pb.Fa));h=h.concat(a.Tf(h[h.length-1],olympe.dm.Xc.$.zc()));h=h.concat(a.Tf(h[h.length-1],olympe.dm.Xc.V.zc()));return[...f,...g,...h].reverse()};olympe.sc.wD=a=>{a=a&&a.valueOf()||'';return a.startsWith('image/')?olympe.sc.Gi:a.startsWith('video/')?olympe.sc.Dk:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.jd:olympe.dm.File};
852
+ olympe.sc.tD=a=>a instanceof olympe.sc.Gi?'image/*':a instanceof olympe.sc.Dk?'video/*':a instanceof olympe.sc.jd?'font/*,application/font-woff':null;olympe.sc.Cb={};function Yi(a,b){var c=olympe.sc.Ra,d=a.F;a=a.G();b=olympe.dc.za(b);let e,f=null==(e=d.G)?void 0:e.get(b);if(!f){f=d.bi(a,void 0,b);for(d=f.getParent();d&&d.Fa&&!d.id.startsWith('_');)d=d.getParent();let g;null==(g=d)||Zi(g,b,f)}return new c(f)}function $i(a){let b;return null!=(b=a.Xa(olympe.sc.Ra.C.PRODUCTION))?b:!1}
853
+ olympe.sc.Ra=class{constructor(a=olympe.sc.zn){this.F=a;this.N=olympe.ta.Za('sc');this.K=null}Z(){return this.F.Z()}getParent(){if(null===this.K){const a=this.F.getParent();this.K=null===a?null:new olympe.sc.Ra(a)}return this.K}xw(a){const b=olympe.dc.La();let c=this.getParent();const d=e=>{if(e.Ke()){const f=b.model(e.Ke());if(f&&b.eb(f,olympe.sc.mb.Fa)||a.modelTag&&!b.Vf(e.Ke(),a.modelTag))return!1}return!0};for(;c&&!d(c);)c=c.getParent();return c}Ke(){return this.F.Ke()}G(){return this.F.F}set(a,
854
+ b){this.F.set(a,b);return this}Hn(a){return this.set(a,Date.now())}remove(a){this.set(a,null)}zb(a,b,c=!1){const d=olympe.dc.za(a),e=olympe.D.Ic(b||Object,`Get context value flow source of ${d}`);e.node.onDestroy(this.on(a,f=>{null===f?e.clear():e.update(f)},c?this.F.Z():void 0));return e.zb()}get(a,b=!1){a=this.Xa(a,b);return void 0!==a?a:null}has(a,b=!1){return this.F.has(a,b)}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>{const e=this.get(a);b||null!==e||d.next(e);const f=this.on(a,d.next.bind(d),
855
+ c?void 0:this.F.Z(),!1);this.onDestroy(()=>{f();d.complete()});return f})}repeat(a,b){const c=aj(this.F,a);a=b.subscribe(d=>{null!==d?this.set(c,d):this.remove(c)});this.Og(a.unsubscribe.bind(a));return this}Iy(a){a=a instanceof olympe.sc.Runnable?a:this.get(a);if(!a)return null;const b=this.bi(`Runner ${olympe.D.Xa(a.na(),'')}`);a.run(b);return b}kz(a,b=!0,c=!1){return rxjs.firstValueFrom(this.observe(a,b,c))}Ry(a){this.set(olympe.sc.Ra.C.gg,a);return this}Xa(a,b=!0){return this.F.Xa(a,b)}on(a,b,
856
+ c,d=!0){return this.F.on(a,b,c,d)}bi(a){return new olympe.sc.Ra(this.F.bi(this.G(),a))}dl(a,b){return this.F.dl(a,c=>{b(new olympe.sc.Ra(c))})}hx(a){a=bj(this.F,a);return a===this.F?this:a&&new olympe.sc.Ra(a)}destroy(){this.F.destroy()}Og(a,b){return this.F.Og(a,b)}cl(a){this.F.cl(a)}onDestroy(a){return this.C()?(a(),'noId'):this.G().onDestroy(a)}Ng(a){this.C()||this.G().Ng(a)}clear(){this.F.clear()}C(){return this.G().C()}eb(a){a=cj(this.F,a);return null!==a?new olympe.sc.ui.Gz(a,this):null}Nw(a){a=
857
+ cj(this.F,a);return null!==a?new olympe.sc.ui.Fz(a,this):null}qy(...a){return rxjs.combineLatest(a.map(b=>{b=cj(this.F,b);return null!==b?this.observe(b):rxjs.of(null)}))}nb(a){return(null==a?void 0:a.constructor)!==this.constructor?!1:this.F===a.F}};olympe.sc.Ra.prototype.observeMany=olympe.sc.Ra.prototype.qy;olympe.sc.Ra.prototype.getEvent=olympe.sc.Ra.prototype.Nw;olympe.sc.Ra.prototype.getProperty=olympe.sc.Ra.prototype.eb;olympe.sc.Ra.prototype.clear=olympe.sc.Ra.prototype.clear;
858
+ olympe.sc.Ra.prototype.offDestroy=olympe.sc.Ra.prototype.Ng;olympe.sc.Ra.prototype.onDestroy=olympe.sc.Ra.prototype.onDestroy;olympe.sc.Ra.prototype.offClear=olympe.sc.Ra.prototype.cl;olympe.sc.Ra.prototype.onClear=olympe.sc.Ra.prototype.Og;olympe.sc.Ra.prototype.destroy=olympe.sc.Ra.prototype.destroy;olympe.sc.Ra.prototype.getOtherContext=olympe.sc.Ra.prototype.hx;olympe.sc.Ra.prototype.onContext=olympe.sc.Ra.prototype.dl;olympe.sc.Ra.prototype.createChild=olympe.sc.Ra.prototype.bi;
859
+ olympe.sc.Ra.prototype.setParentElement=olympe.sc.Ra.prototype.Ry;olympe.sc.Ra.prototype.waitFor=olympe.sc.Ra.prototype.kz;olympe.sc.Ra.prototype.runner=olympe.sc.Ra.prototype.Iy;olympe.sc.Ra.prototype.repeat=olympe.sc.Ra.prototype.repeat;olympe.sc.Ra.prototype.observe=olympe.sc.Ra.prototype.observe;olympe.sc.Ra.prototype.has=olympe.sc.Ra.prototype.has;olympe.sc.Ra.prototype.get=olympe.sc.Ra.prototype.get;olympe.sc.Ra.prototype.remove=olympe.sc.Ra.prototype.remove;olympe.sc.Ra.prototype.trigger=olympe.sc.Ra.prototype.Hn;
860
+ olympe.sc.Ra.prototype.set=olympe.sc.Ra.prototype.set;olympe.sc.Ra.prototype.getClosest=olympe.sc.Ra.prototype.xw;olympe.sc.Ra.prototype.getParent=olympe.sc.Ra.prototype.getParent;olympe.sc.Ra.C={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',gg:'__htmlContainer',Oz:'__dockableElement'};olympe.sc.mr=class extends olympe.sc.Ra{constructor(a){super(a);this.V=new olympe.D.Xb('SC Update Context',super.G());const b=a.Og(()=>{b&&a.cl(b);this.V.destroy()})}G(){return this.V}Og(a,b){return this.G().onDestroy(a,null!=b?b:olympe.X.bc())}};function aj(a,b){b=olympe.dc.za(b);let c,d;return(null==(c=a.la)?void 0:c.get('I#'+b))||(null==(d=a.la)?void 0:d.get('IO#'+b))||b}function bj(a,b){if(b===a.id||a.V.has(b)||!b)return a;for(a=a.qa;a;){if(b===a.Z()||a.V.has(b))return a;const c=dj(a.G,b);if(c)return c;a=a.getParent()}return null}function ej(a,b,c){a.K||(a.K=new Map);const d=a.K.get(b);d?d[0]+=1:(a.K.set(b,[1,c]),$c(olympe.dc.xd(),c))}
861
+ function fj(a,b){if(a.K&&a.K.has(b)){var c=a.K.get(b);--c[0];0===c[0]&&(a.K.delete(b),0===a.K.size&&(a.K=null),$c(olympe.dc.xd(),null,c[1]))}}function cj(a,b){let c;return(null==(c=a.la)?void 0:c.get('IO#'+b))||null}
862
+ function gj(a){a.F.P(()=>{hj(a,c=>c.destroy())});a.F.onDestroy(()=>{void 0!==a.Xa(olympe.sc.Ra.C.TRANSACTION)&&a.N.warn(`The context ${a.Z()} is being destroyed but still has unreleased transactions. You probably forgot to end a transaction.`);let c;null==(c=a.K)||c.forEach(([e],f)=>{for(let g=0;g<e;g++)fj(a,f)});let d;null==(d=a.qa)||ij(d,a);a.V.clear();a.qa=null});let b;null==(b=a.qa)||jj(b,a)}
863
+ function dj(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.Fa&&!c.id.startsWith('_')&&(a=dj(c.G,b)))return a;return null}function kj(a,b){a.Wa=olympe.dc.za(b);a.Fa=b.Od().nn();b.F().forEach(c=>{a.id===c||a.V.has(c)||(a.V.add(c),Zi(a,c,a))});a.la=b.V()}function lj(a){a.Ka=!0;let b;null==(b=a.G)||b.forEach(c=>{lj(c)})}function mj(a){a.Ka=!1;let b;null==(b=a.G)||b.forEach(c=>{mj(c)})}
864
+ function nj(a,...b){var c=olympe.sc.Cb.Re.C.zm;if(null!==a.Cb)for(const {fl:d,depth:e}of a.Cb.values())d.process(a,c,e,...b)}function oj(a,b,c,d){const e='$'+b;a.ba.add(b);c.map(f=>'@'+f+'.'+b).forEach(f=>{let g,h;null==(g=a.P)||null==(h=g.get(f))||h.forEach(k=>{k(d)})});hj(a,f=>{!f.Ka&&f.ba.has(b)||f.data.has(e)||oj(f,b,c,d)});a.ba.delete(b)}
865
+ function pj(a,b,c){a.P||(a.P=new Map);let d=a.P.get(b);void 0===d&&(d=new Map,a.P.set(b,d));olympe.sc.Vd.C+=1;const e=olympe.sc.Vd.C;d.set(e,c);return()=>{const f=a.P.get(b);f&&(f.delete(e),0===f.size&&a.P.delete(b))}}function Zi(a,b,c){a.ba.add(b);let d;const e=null==(d=a.P)?void 0:d.get('&'+b);if(e)for(const f of e.values())f(c);hj(a,f=>{f.ba.has(b)||Zi(f,b,c)});a.ba.delete(b)}function hj(a,b){let c;null==(c=a.G)||c.forEach(b)}function qj(a,b){a.data.forEach((c,d)=>b(c,d.slice(1)))}
866
+ function rj(a,b){if(null!==a.Cb&&a.Cb.has(b)){var {fl:c,depth:d}=a.Cb.get(b);hj(a,e=>{rj(e,b)});0===d&&c.F();a.Cb.delete(b);0===a.Cb.size&&(a.Cb=null)}}function sj(a,b,c=0){null===a.Cb&&(a.Cb=new Map);a.Cb.has(b.Z())||(a.Cb.set(b.Z(),{fl:b,depth:c}),hj(a,d=>{(-1===b.G||c<b.G)&&sj(d,b,c+1)}),a.onDestroy(()=>{rj(a,b.Z())}));b.Z()}function tj(a){var b=olympe.sc.Cb.Re.F.Bq;const c=[];if(null!==a.Cb)for(const {fl:d}of a.Cb.values())d.K()===b&&(c.push(d.Z()),d.F(),rj(a,d.Z()))}
867
+ function jj(a,b){null===a.G&&(a.G=new Map);a.G.set(b.id,b)}function ij(a,b){let c;null==(c=a.G)||c.delete(b.Z());let d;0===(null==(d=a.G)?void 0:d.size)&&(a.G=null)}
868
+ olympe.sc.Vd=class{constructor(a,b='no name',c=olympe.sc.zn){this.id=a;this.wd=b;this.V=new Set;this.qa=c;this.F=new olympe.D.Xb('SC Context');this.data=new Map;this.Wa=this.$=this.K=this.G=this.P=null;this.Fa=!1;this.ba=new Set;this.Ka=!1;this.la=null;this.N=olympe.ta.Za('sc');this.Cb=null;gj(this)}Z(){return this.id}getParent(){return this.qa}Ke(){return this.Wa}set(a,b){if(!this.F.$()&&!this.F.C()){var c=olympe.dc.za(a),d,e;a=(null==(d=this.la)?void 0:d.get('O#'+c))||(null==(e=this.la)?void 0:
869
+ e.get('IO#'+c))||c;d='$'+a;(e=this.data.get(d))&&e.valueOf&&(e=e.valueOf());void 0===b||null===b?void 0!==e&&(this.data.delete(d),null!==this.Cb&&0<this.Cb.size&&nj(this,a,null),oj(this,a,['*',this.id,...this.V],null)):((c=void 0===e)||(c=!('function'===typeof b.nb?b.nb(e):b.valueOf()===e.valueOf())),c&&(this.data.set(d,b),null!==this.Cb&&0<this.Cb.size&&nj(this,a,b),oj(this,a,['*',this.id,...this.V],b)))}}on(a,b,c,d=!0){if(this.F.C()||this.F.$())return()=>{};const e=aj(this,a),f=c?olympe.dc.za(c):
870
+ '*';a=pj(this,'@'+f+'.'+e,b);c=c?(c=bj(this,f))?c.Xa(e,!1):void 0:this.Xa(e);void 0!==c&&b(c);if(d)olympe.D.Na().onDestroy(a);return a}has(a,b=!1){a='$'+aj(this,a);let c=this.data.has(a),d=this.getParent();if(b)for(;!c&&d;)c=d.data.has(a),d=d.getParent();return c}bi(a,b,c){const d=null!=c?c:'_'+olympe.X.bc(),e=a.run(()=>new olympe.sc.Vd(d,b,this));null!==this.Cb&&0<this.Cb.size&&this.Cb.forEach(({fl:f,depth:g})=>{(-1===f.G||g<f.G)&&sj(e,f,g+1)});return e}dl(a,b){const c=bj(this,a);if(c)return b(c),
871
+ ()=>{};const d=pj(this,'&'+a,e=>{d&&d();b(e)});return d}Xa(a,b=!0){a='$'+aj(this,a);let c=this.data.get(a),d=this.getParent();if(b)for(;void 0===c&&null!==d;)c=d.data.get(a),d=d.getParent();return c}destroy(){this.F.$()||this.F.C()||this.F.destroy()}Og(a,b){if(this.F.C())a();else return++olympe.sc.Vd.C,b=b||String(olympe.sc.Vd.C),null===this.$&&(this.$=new Map),this.$.set(b,a),b;return b||'noId'}cl(a){null!==this.$&&this.$.delete(a)}onDestroy(a){return this.C()?(a(),'noId'):this.F.onDestroy(a)}clear(){if(!this.F.$()&&
872
+ !this.F.C()){let a;null==(a=this.$)||a.forEach(b=>b())}}C(){return this.F.C()}};olympe.sc.Vd.prototype.getParent=olympe.sc.Vd.prototype.getParent;olympe.sc.Vd.C=0;olympe.sc.Vd.F={yt:'I#',Au:'O#',FA:'IO#'};function uj(a,b,c){return(c=c.Ke())?`${a}.${c}.${b}`:`${a}.${b}`}olympe.sc.Cb.Re=class{constructor(a=-1){this.id=olympe.X.Ve();this.active=!0;this.G=a}F(){this.active=!1}Z(){return this.id}K(){}process(){}};olympe.sc.Cb.Re.C={zm:'SET'};olympe.sc.Cb.Re.F={Bq:'REMOTE',cu:'LOCAL'};olympe.sc.Yd=class a{constructor(){this.F=this.K=this.P=null;this.V=new Map;this.G=new Map;this.C=new olympe.X.Dm(1E4);Ja(this.C,b=>{tj(b)})}$(b,c,d){const e=b.body(),f=e.c,g=this.V.get(f);switch(e.t){case olympe.sc.Yd.C.Bu:c=this.G.get(e.f);b.we(c).catch(l=>{d.error('Unable to reply with paths: ',l)});break;case olympe.sc.Yd.C.Cu:const h=f+c,k=(l,n,p=0)=>{qj(l,(q,r)=>{let t;q instanceof olympe.dc.CloudObject?t=a.G(q):t=q;let u;q=null!=(u=l.Ke())?u:'';0<q.length&&(q+='.');n.push([`${p}.${q}${r}`,
873
+ t])})};b.vn(h).then(()=>{const l=[];k(g,l,0);hj(g,p=>{k(p,l,1)});olympe.H.wa.gb.sb.publish(h,{t:olympe.sc.Yd.C.xt,v:l,ts:0}).catch(p=>{d.error('Error publishing on service : ',p)});const n=new olympe.sc.Cb.Vu(h);sj(g,n);this.C.has(g)?Ia(this.C,g):this.C.add(g)}).catch(l=>{d.error('Error notifying on a contextId : ',l)});break;case olympe.sc.Yd.C.Du:void 0!==g&&this.C.has(g)&&Ia(this.C,g);break;case olympe.sc.Yd.C.El:void 0!==g&&(this.C.delete(g),tj(g))}}la(b,c,d){this.P=new olympe.H.wa.gb.sb('discovery_debug_id',
874
+ c);this.P.listen().subscribe(e=>{var f=e.body();if(f.t===olympe.sc.Yd.C.Ws){e=f.i;f=f.f;if(!this.G.has(f)){const g=this.ba(f,c,b);if(0!==g.length)this.G.set(f,g);else return}null===this.F&&(this.F=olympe.X.Ve(),f=new olympe.D.Xb(this.F,c.G()),this.K=new olympe.H.wa.gb.sb(this.F,f),this.K.listen().subscribe(g=>{this.$(g,b,d)}));olympe.H.wa.gb.sb.publish(e,{t:olympe.sc.Yd.C.ss,n:olympe.U.getParameter(olympe.sc.Config.vo)||'no name',a:b,s:this.F}).catch(g=>{d.error('Error publishing on draw service : '+
875
+ g)})}})}ba(b,c,d){const e=[],f=olympe.dc.La(),g=(h,k)=>{hj(h,l=>{if(null!==l.Ke()){const n=olympe.dc.CloudObject.get(l.Ke()).cn(olympe.sc.Runnable.K).Pc();if(null!==n){const p=k+'/'+f.name(n);n.T()===b&&(e.push([p,l.Z()]),this.V.set(l.Z(),l));g(l,p)}}})};g(c.F,f.name(d));return e}static F(b,c,d){let e=d;d instanceof olympe.dc.CloudObject&&(e=a.G(d));olympe.H.wa.gb.sb.publish(b,{t:olympe.sc.Yd.C.Th,k:c,v:e,ts:Date.now()}).catch(f=>{olympe.ta.Za('Debugger').error('Error publishing on service : ',f)})}static G(b){if(null===
876
+ b||void 0===b)return'<null>';const c=olympe.dc.La();if(b instanceof olympe.dc.CloudObject){var d=b.Lb();if(!c.Vf(d,olympe.sc.hf))return b.toString();let f=`${b.Qf().name()} (${b.T()})`;var e=olympe.dc.CloudObject.get(d);d=olympe.dc.hb.from(e).bn(olympe.dc.CloudObject.extendRel,!0).Ff().ub(olympe.dc.CloudObject.propertyRel).Ff().Pc();e=olympe.dc.hb.from(e).bn(olympe.dc.CloudObject.extendRel,!0).Ff().ub(olympe.dc.CloudObject.G).Ff().Pc();d=d.filter(([g])=>g instanceof olympe.sc.hf);0!==d.length&&(f+=
877
+ '<br> ',f+='Properties:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+' : '+c.eb(b.T(),g)+'<br>'}));d=e.filter(([g])=>g instanceof olympe.sc.hf);0!==d.length&&(f+=' ',f+='Relations:<br>',d.forEach(([,g])=>{f+=' ';f+=' - '+c.name(g)+'<br>'}));return f}return b.toString()}};olympe.sc.Yd.K='discovery_debug_id';olympe.sc.Yd.C={Ws:0,ss:1,Bu:2,Cu:3,xt:4,Th:5,Du:6,El:7};olympe.sc.Cb.KA=class extends olympe.sc.Cb.Re{constructor(a=-1){super(a);this.C=new Map}K(){return olympe.sc.Cb.Re.F.cu}process(a,b,c,...d){if(this.active&&b===olympe.sc.Cb.Re.C.zm){a=uj(c,aj(a,d[0]),a);d=d[1];let e;null==(e=this.C.get(a))||e(d)}}on(a,b){this.C.set(a,b)}};olympe.sc.Cb.Vu=class extends olympe.sc.Cb.Re{constructor(a){super(1);this.P=a;this.C=new Map;this.db=olympe.dc.La()}K(){return olympe.sc.Cb.Re.F.Bq}F(){super.F();for(const a of this.C.values())a();this.C.clear()}process(a,b,c,...d){if(this.active&&b===olympe.sc.Cb.Re.C.zm&&void 0!==d[0]&&null!==d[0]){const e=uj(c,aj(a,d[0]),a),f=d[1];let g;null==(g=this.C.get(e))||g();this.C.delete(e);if(f instanceof olympe.dc.CloudObject&&f.Qf()instanceof olympe.sc.hf){const h=Kd(this.db,f,()=>{olympe.sc.Yd.F(this.P,
878
+ e,f)});this.C.set(e,()=>{Ld(this.db,f,h)})}olympe.sc.Yd.F(this.P,e,f)}}};olympe.sc.Metadata=class extends olympe.dc.CloudObject{};olympe.sc.Metadata.O=olympe.dc.ya.C('0161ae936c62f9fcd131',olympe.sc.Metadata);olympe.sc.Vb=class extends olympe.dc.CloudObject{F(){return this.Ab(olympe.sc.Vb.K)}C(){return this.Ab(olympe.sc.Vb.C)}};olympe.sc.Vb.O=olympe.dc.ya.C('01703376c4a81c0e9d90',olympe.sc.Vb);olympe.sc.Vb.K=olympe.sc.Vb.O.xa('01703376c4a81c0e9d91');olympe.sc.Vb.C=olympe.sc.Vb.O.xa('01703376c4a81c0e9d92');olympe.sc.Vb.F=olympe.sc.Vb.O.Ga('01703376c4a81c0e9d93');P(olympe.dc.CloudObject.O,olympe.sc.Vb.F);olympe.sc.Vb.prototype.F.L=olympe.D.J.F;olympe.sc.Vb.prototype.C.L=olympe.D.J.F;olympe.sc.X={};function vj(a,b){const c=Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2);a.C.set(c,b);return c}
879
+ olympe.sc.X.kt=class{constructor(a,b,c){const d=olympe.net.ab.Fd.GET,e=olympe.net.ab.Fd.Cc,f=olympe.net.ab.Fd.kk,g=olympe.net.ab.Fd.gm,h=olympe.net.ab.Headers.Lj,k=olympe.net.ab.Headers.pi;this.N=a;this.G=b.la([d,e,f,g],[h,k]);this.K=c;this.C=new olympe.X.Cm(3E4);this.F=new olympe.D.Xb('FileService context')}start(a){var b=olympe.net.ab.Fd.GET;const c=olympe.net.ab.Fd.Cc,d=olympe.net.ab.Fd.kk,e=olympe.net.ab.Fd.gm,f=olympe.net.ab.Mc.ah,g=olympe.net.ab.Mc.it,h=olympe.net.ab.Mc.xm,k=olympe.net.ab.Headers.pi,
880
+ l=olympe.net.ab.Headers.xs,n=`fileServer_${a}`;a=`/${this.K}/${a}/:${'fileTag'}`.replace(/\/+/g,'/').replace(/\/$/,'');this.N.debug(`Started file service with path : ${a}`);b=this.G.V(n,a,[b,c,d,e],(p,q)=>{if(p.method===e)return Promise.resolve(new olympe.net.qf('',f,'',{[l]:'*'}));const r=p.lj()[k],t=this.C.get(r);if(!t)return Promise.resolve(new olympe.net.qf('Invalid token',g,'Access denied'));this.C.delete(r);return t(p.lj(),q.get('fileTag'),p.body).catch(u=>Promise.resolve(new olympe.net.qf(`Internal server error: ${u}`,
881
+ h,'Internal server error')))});this.F.onDestroy(()=>{this.G.ba(n).catch(p=>this.N.error(`An error occurred while stopping the file service: ${p}`))});return b}stop(){this.F.destroy()}};olympe.sc.Le={};olympe.sc.Le.wg={Cz:null,Xu:'screenflow',tv:'ui-design',Lq:'software-intelligence',Oj:'data-management'};olympe.sc.re=class extends olympe.dm.BrickMetadata{Ye(){return olympe.sc.Le.wg.Lq}C(){return this.tb(olympe.sc.re.C,olympe.sc.logic.Qi)}F(){return this.tb(olympe.sc.re.F,olympe.sc.logic.Oh)}};olympe.sc.re.O=olympe.dc.ya.C('011100000000000adef0',olympe.sc.re);olympe.sc.re.C=olympe.sc.re.O.Ga('016ac4f59a2917fdef01');olympe.sc.re.F=olympe.sc.re.O.Ga('016ac4f59a2917fdef02');olympe.sc.re.prototype.C.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.re.prototype.F.L=new olympe.D.J(()=>olympe.dc.Da,[]);function wj(a,b){[].forEach(c=>c.call(a,b,(d,e)=>{null===e?b.remove(d):b.set(d,e)}))}function xj(a,b){const c=[];for(const d of b)b=a.db.eb(d,olympe.sc.logic.Hc.C,!0),c[b]=d;return c}
882
+ olympe.sc.mb=class extends olympe.dm.BrickMetadata{Rt(a,b,c,d,e=!0){e||olympe.ta.Za('sc').error('parameter own= false ignored, investigate');return olympe.D.cf(L(this.Sf(a,olympe.dc.X.Tb.kh,c)),d)}tx(){return this.tb(olympe.sc.mb.V,olympe.sc.Runnable)}Bw(){return this.tb(olympe.sc.mb.$,olympe.sc.Runnable)}rn(){return this.db.eb(this,olympe.sc.mb.Fa)}nn(){return null!==this.db.ic(this.tag,olympe.sc.Runnable.F.zc())}Wl(){return this.tb(olympe.sc.mb.F,olympe.sc.logic.Eb)}ak(){return this.tb(olympe.sc.mb.K,
883
+ olympe.sc.logic.Rb)}};olympe.sc.mb.O=olympe.dc.ya.C('0112000000000000def0',olympe.sc.mb);olympe.sc.mb.Fa=olympe.sc.mb.O.xa('01692aa71f3108454479');olympe.sc.mb.mc=olympe.sc.mb.O.xa('0166446c1f128ebc903a');olympe.sc.mb.V=olympe.sc.mb.O.Ga('01692a4af82e8984742c');olympe.sc.mb.$=olympe.sc.mb.O.Ga('01692a4af82e8984742d');olympe.sc.mb.qa=olympe.sc.mb.O.Ga('01692a4af82e8984742e');olympe.sc.mb.F=olympe.sc.mb.O.Ga('01621fb84e320000f00a');olympe.sc.mb.K=olympe.sc.mb.O.Ga('01621fb84e320000f00b');
884
+ olympe.sc.mb.Md=olympe.sc.mb.O.Ga('0171838bcfed0000e00e');olympe.sc.mb.qd=olympe.sc.mb.O.Ga('0171838bcfed0000a00a');m=olympe.sc.mb.prototype;m.Rt.L=olympe.D.J.C;m.tx.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.Bw.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.rn.L=olympe.D.J.C;m.nn.L=olympe.D.J.C;m.Wl.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.ak.L=new olympe.D.J(()=>olympe.dc.Da,[]);function yj(a){const b=olympe.dc.CloudObject.Gr(new Map,a);olympe.D.Na().onDestroy(()=>{const c=new olympe.dc.Transaction;c.delete(b);c.kb()});return b}function zj(a,b){kj(b.F,a);wj(a.Od(),b);const c=a.K(),d=Aj(b,c),e=[];c.forEach((f,g)=>{f===a.la?e[0]=g:f===a.ba&&(e[1]=g)});void 0!==e[0]&&void 0!==e[1]&&(Bj(a,d[e[0]],d[e[1]]),c[e[0]]=null,c[e[1]]=null);c.forEach((f,g)=>{f&&f.call(a,b,d[g])})}
885
+ function Cj(a,b){var c=a.Lb();const d=a.db.name(c),e=`Brick ${d} successfully run`,f=`Brick ${d} successfully cleared`,g=a.C(b);c=a.setupExecution(b).pipe(rxjs.operators.map(h=>{if(!b.C()&&(b.clear(),null!==h)){h=Array.isArray(h)?h:[h];const k=new olympe.sc.mr(b.F);k.G().run(a.update.bind(a,k,h,g));return!0}return!1})).subscribe(rxjs.Subscriber.create(h=>h?a.N.debug(e):a.N.debug(f),a.Fa.bind(a,b),()=>a.N.debug(`Brick ${d} completed`)));b.onDestroy(c.unsubscribe.bind(c))}
886
+ function Dj(a,b,c,d){const e=d.G(),f=V(a.db,b,c,e.F((g,h)=>{const k=Yi(d,h);g?olympe.dc.CloudObject.get(h).run(k):k.destroy()}));e.onDestroy(a.db.C.bind(a.db,b,c,f,!0))}function Aj(a,b){if(1===b.length)return[(d,e)=>{null!==e?a.set(d,e):a.remove(d)}];const c=b.map(()=>new Map);return c.map(d=>(e,f)=>{null!==f?d.set(e,f):d.delete(e);a:{for(const g of c)if(f=g.get(e),void 0!==f){a.set(e,f);break a}a.remove(e)}})}
887
+ function Bj(a,b,c){const d=olympe.D.Na(),e=Kd(a.db,a.tag,d.F((f,g,h)=>{const k=h?c:b;null!==k&&(h&&b&&b(f,null),null===g||void 0===g?k(f,null):k(f,olympe.sc.kh(g)))}));d.onDestroy(()=>{Ld(a.db,a.tag,e)})}
888
+ olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.N=c}run(a){a.G().run(()=>{zj(this,a);this.init(a);if(this.Od().rn())Cj(this,a);else{const b=new olympe.sc.mr(a.F);b.G().run(()=>this.update(b,[],[]))}a.Hn(olympe.sc.mb.mc);a.Og(this.clear.bind(this,a));a.onDestroy(this.destroy.bind(this,a))})}Od(){return this.Qf()}init(a){this.onInit(a)}update(a,b,c){const d=this.Od();if(d.rn())this.onUpdate(a,b,c);else this.N.debug(`Softcoded runnable ${this.db.name(this)} with tag ${this.tag} running in context ${a.Z()}`),
889
+ Dj(this,d,olympe.sc.mb.V,a),this.qa()&&Dj(this,d,olympe.sc.mb.qa,a)}clear(){}destroy(a){this.onDestroy(a)}setupExecution(){return rxjs.of([])}C(){return[]}onInit(){}onUpdate(){this.N.error(`Brick ${this.db.name(this.Lb())} (${this.Lb()}) is flagged as hardcoded, but method update() has not been overridden.`)}onDestroy(){}getInputs(){var a=this.Od();return xj(a,a.db.tb(a.tag,olympe.sc.mb.F))}getOutputs(){var a=this.Od();return xj(a,a.db.tb(a.tag,olympe.sc.mb.K))}F(){return[]}V(){return new Map}qa(){return!1}G(a,
890
+ b,c,d){a=b.zb(a,c,!0);void 0!==d&&olympe.D.cf(a,d);return a}fb(a,b,c,d,e){olympe.D.yn([d],f=>{b.set(a,olympe.D.Zr(f)?f.valueOf():f)});return this.G(a,b,c,e)}K(){return[this.la,this.ba]}la(a,b){Bj(this,b,null)}ba(a,b){Bj(this,null,b)}xb(a,b){const c=this.db,d=olympe.sc.logic.wb.K.zc(),e=olympe.sc.logic.wb.F,f=olympe.sc.logic.wb.C;this.Kr(d,g=>{var h=g.T();if(h=c.ic(h,e)||c.ic(h,f))return Ej(g,a,b.bind(null,h))})}Fa(a,b){const c=this.Lb();let d=this.db.name(c);try{const e=[a.Ke()];let f=a.getParent();
891
+ for(;null!==f&&f.F!==olympe.sc.zn;)e.unshift(f.Ke()),f=f.getParent();d=e.map(g=>{if(null!==g){const h=this.db.model(g);return this.db.name(g)||h&&this.db.name(h)||g}return'?'}).join(' > ')}catch(e){this.N.warn(`Impossible to retrieve the stack for brick ${this.db.name(c)}.`)}this.N.error(`An error occurred in brick ${d} (${c}): ${b}\n${b.stack}`)}};olympe.sc.Runnable.O=Uc(olympe.dc.ya.C('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.K=olympe.sc.Runnable.O.Ga('01692a4af82e8984742b');
892
+ olympe.sc.Runnable.F=olympe.sc.Runnable.O.Ga('01756a18d4921c103111');olympe.sc.Runnable.P=P(olympe.sc.Runnable.O,olympe.sc.mb.V);olympe.sc.Runnable.V=P(olympe.sc.Runnable.O,olympe.sc.mb.$);olympe.sc.Runnable.$=P(olympe.sc.Runnable.O,olympe.sc.mb.qa);P(olympe.sc.mb.O,olympe.sc.Runnable.K);P(olympe.sc.mb.O,olympe.sc.Runnable.F);olympe.sc.Runnable.prototype.Od.L=new olympe.D.J(()=>olympe.sc.mb,[]);olympe.sc.Runnable.prototype.G.L=new olympe.D.J(()=>Object,[]);olympe.sc.Runnable.prototype.fb.L=olympe.D.J.C;function Fj(a){if(a){if('string'===typeof a)return a;if(a instanceof olympe.sc.Ge)return(a=a.F())?a.valueOf():null;if('function'===typeof a.T)return a.T()}return null}olympe.sc.Ge=class extends olympe.dc.CloudObject{F(){return this.db.tb(this,olympe.sc.Ge.C)[0]}C(){return olympe.dc.CloudObject.get(Fj(this))}toString(){const a=Fj(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.Ge.O=olympe.dc.ya.C('0163c9ae01f2d6e9ca49',olympe.sc.Ge);olympe.sc.Ge.C=olympe.sc.Ge.O.Ga('0169b5a8a33144fb0b49');
893
+ P(olympe.dc.CloudObject.O,olympe.sc.Ge.C);olympe.sc.Ge.prototype.F.L=new olympe.D.J(()=>String,[]);olympe.sc.Ge.prototype.C.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.Co=class extends olympe.dm.Pb{Ye(){return olympe.sc.Le.wg.Oj}};olympe.sc.Co.O=olympe.dc.ya.C('0163a68ce44f3d1fa84c',olympe.sc.Co);olympe.sc.hf=class extends olympe.dm.BrickMetadata{};olympe.sc.hf.O=olympe.dc.ya.C('016324fde11a836f76c2',olympe.sc.hf);let Gj=null;
894
+ function Hj(a,b){Gj=a;(new olympe.dc.nf(a,olympe.dc.Cd.Pi)).ub(olympe.sc.Ma.Me.C).ub(olympe.sc.hd.F.zc()).kb((c,d)=>{if(c)olympe.ta.Za('sc').error('Error while loading business container:',c.message),b(olympe.sc.hd.C.cc);else{c=null;for(const [e,f]of d.Bc.gd())e===olympe.sc.hd.F.T()&&(c=f);null!==c?nf(hf(new olympe.dc.nf(c),olympe.dc.Qb.xf),(e,f)=>{const g=olympe.dc.lc.Vc,h=olympe.dc.lc.xi,k=f.T();f=f.Sa();return olympe.dc.La().Vf(e,olympe.sc.hf)&&f===olympe.dc.Ca.ORIGIN&&(k===g||k===h)}).kb(()=>
895
+ b(olympe.sc.hd.C.Hp)):(olympe.ta.Za('sc').error('No container found for the application',a),b(olympe.sc.hd.C.em))}})}olympe.sc.hd=class extends olympe.dc.CloudObject{};olympe.sc.hd.C={Hp:0,em:1,cc:2};olympe.sc.hd.O=olympe.dc.ya.C('017b3aa8fae1e3d044dc',olympe.sc.hd);olympe.sc.hd.F=olympe.sc.hd.O.Ga('017b3aa8fd1659291b92');olympe.sc.hd.K=olympe.sc.hd.O.Ga('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.CloudObject{};olympe.sc.Map.O=olympe.dc.ya.C('018119241abce0e5696e',olympe.sc.Map);olympe.sc.Zg=class extends olympe.sc.Map{};olympe.sc.Zg.O=olympe.dc.ya.C('01631aacd8276ea98490',olympe.sc.Zg);olympe.sc.Gi=class extends olympe.dm.File{K(){const a=olympe.D.Ic(olympe.D.$a);this.Pk(b=>{a.update(olympe.D.Bb(b))});return a.zb()}};olympe.sc.Gi.O=Pc('01644b6297305d62fca2',olympe.sc.Gi);olympe.sc.Gi.prototype.K.L=olympe.D.J.F;olympe.sc.jd=class extends olympe.dm.File{K(){return this.Ab(olympe.sc.jd.fontFamilyProp)}P(){return this.Ab(olympe.sc.jd.F)}V(){return this.ge(olympe.sc.jd.K)}};olympe.sc.jd.O=Pc('01647e113043c637b541',olympe.sc.jd);olympe.sc.jd.fontFamilyProp=olympe.sc.jd.O.xa('01647e35ecd24ef0b88d');olympe.sc.jd.F=olympe.sc.jd.O.xa('01647e677f5d1cfbdf42');olympe.sc.jd.K=olympe.sc.jd.O.xa('01647e6780999bf8bd25');olympe.sc.jd.prototype.K.L=olympe.D.J.F;olympe.sc.jd.prototype.P.L=olympe.D.J.F;
896
+ olympe.sc.jd.prototype.V.L=olympe.D.J.G;olympe.sc.Dk=class extends olympe.dm.File{};olympe.sc.Dk.O=Pc('0164643c432146a71d5c',olympe.sc.Dk);olympe.sc.qr=class extends olympe.dc.CloudObject{};olympe.sc.qr.O=olympe.dc.ya.C('016421bb3797e22d1c4e',olympe.sc.qr);olympe.sc.logic={};olympe.sc.logic.hp=(a,b)=>a===b?0:a>b?1:-1;
897
+ olympe.sc.logic.JA=(a,b,c,d,e,f,g)=>{const h=b.T();b=olympe.D.Xa(b.C().T());let k,l;if(b===olympe.dc.za(olympe.dm.String))k=c.valueOf().toLowerCase(),l=p=>p.Ab(h).toLowerCase();else if(b===olympe.dc.za(olympe.dm.Number))k=c.valueOf(),l=p=>p.ge(h);else if(b===olympe.dc.za(olympe.dm.DateTime))k=c.getTime(),l=p=>olympe.D.Ha([p.nj(h)],q=>q.getTime(),Number,'FilterList Date&DateTime TransformFlows');else{c=olympe.dc.La().name(b);g.warn(`Properties of type ${c} are not supported. List will not be filtered.`);e(a);
898
+ return}let n;if('<'===f)n=(p,q)=>olympe.sc.logic.hp(q,p);else if('>'===f)n=(p,q)=>olympe.sc.logic.hp(p,q);else{g.error(`Unknown inequality ${f}. Please use '<' or '>'`);return}e(a.zg().filter(p=>olympe.D.Ha([l(p)],q=>{q=n(q.valueOf(),k);return olympe.D.Ac(d.valueOf()?1===q:0<=q)},olympe.D.ra,'FilterList ListDefBuilder Filter TransformFlows')).tf())};
899
+ olympe.sc.logic.fD=(a,b)=>{if(a instanceof olympe.D.ga)return a;if(a instanceof olympe.D.$a)return a.ps();if(a instanceof olympe.D.ra)return a.Qr();if('string'===typeof a||'number'===typeof a)return olympe.D.Ba(Number(a));b.error(`Could not parse provided value ${a} into a number`);return olympe.D.ga.Up};olympe.sc.logic.ua={};olympe.sc.logic.ua.Uo=class{constructor(a,b,c){this.O=olympe.dc.ya.C(a,b,...c)}T(){return this.O.T()}};olympe.sc.logic.ua.Uo.ma=[olympe.dc.De];const Ij=Object.create(null),Jj=new Map;function Kj(a){if(void 0===Ij[a])throw Error(`Tag: ${a} - does not correspond to a registered function`);return Rc(a)}function Lj(a,b,c=olympe.sc.logic.Function){if(Jj.has(a))throw c=Kj(a),Error(`Tag: ${a} - overwriting existing function definition "${c.name}" with "${b.name}"`);const d=olympe.dc.ya.C(a,b,...[]);Jj.set(a,{O:d,rD:b,eD:c});return d}
900
+ olympe.sc.logic.ya=class{constructor(){}static C(a,b,...c){if(Ij[a])throw c=Kj(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.ua.Uo(a,b,[olympe.sc.R.Ea].concat(c));return Ij[a]=b}};olympe.sc.logic.Kz=class{};olympe.sc.logic.Mj=class extends olympe.dc.CloudObject{};olympe.sc.logic.Mj.O=olympe.dc.ya.C('01621fb84e320000cf00',olympe.sc.logic.Mj);olympe.sc.logic.Error=class{constructor(a,b){this.code=a;this.bs=b}static create(a,b){return new olympe.sc.logic.Error(b,a)}$w(){return this.bs}yw(){return this.code}};z('olympe.sc.logic.Error',olympe.sc.logic.Error);olympe.sc.logic.Error.prototype.getCode=olympe.sc.logic.Error.prototype.yw;olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.$w;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;
901
+ olympe.sc.logic.yi=class extends olympe.sc.logic.Mj{static create(a,b){return new olympe.sc.logic.Error(b,a)}};olympe.sc.logic.yi.O=olympe.dc.ya.C('016eeb5ede9f3094d8f0',olympe.sc.logic.yi);olympe.sc.logic.pe=class extends olympe.dc.CloudObject{C(){return this.oc(olympe.sc.logic.pe.C,olympe.dc.CloudObject)}};olympe.sc.logic.pe.O=olympe.dc.ya.C('016ac4f59ee8ea2081ba',olympe.sc.logic.pe);olympe.sc.logic.pe.K=olympe.sc.logic.pe.O.xa('017bc044aeacce7ffc8f');olympe.sc.logic.pe.C=olympe.sc.logic.pe.O.Ga('016ac4f5a0091c4790e2');P(olympe.dc.CloudObject.O,olympe.sc.logic.pe.C);olympe.sc.logic.pe.prototype.C.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Qi=class extends olympe.sc.logic.pe{};olympe.sc.logic.Qi.O=olympe.dc.ya.C('016ac4f59c592b862457',olympe.sc.logic.Qi);olympe.sc.logic.Qi.F=olympe.sc.re.C.zc();olympe.sc.logic.Oh=class extends olympe.sc.logic.pe{};olympe.sc.logic.Oh.O=olympe.dc.ya.C('016ac4f59dd99f5df3e1',olympe.sc.logic.Oh);olympe.sc.logic.Oh.F=P(olympe.sc.logic.Oh.O,olympe.sc.re.F);olympe.sc.logic.Be=class extends olympe.sc.mb{Ye(){return olympe.sc.Le.wg.Lq}$(){return this.fn().zg().Vf([olympe.sc.logic.Function]).and().not().Vf([olympe.sc.logic.Ud,olympe.sc.logic.Zd]).tf()}Sw(){return this.Wl().zg().pj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Qi.F]).tf()}Tw(){return this.ak().zg().pj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Oh.F]).tf()}ee(a){const b=this.db.an(this,[olympe.sc.mb.F],c=>this.db.model(c)===olympe.dc.za(a));return b?olympe.dc.CloudObject.get(b):null}Nf(a){const b=
902
+ this.db.an(this,[olympe.sc.mb.K],c=>this.db.model(c)===olympe.dc.za(a));return b?olympe.dc.CloudObject.get(b):null}Bx(){return this.Wl().zg().pj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Eb).tf()}Cx(){return this.ak().zg().pj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Rb).tf()}};Lj('01621fb84e320000f000',olympe.sc.logic.Be,olympe.sc.logic.Function);m=olympe.sc.logic.Be.prototype;m.Sw.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.Tw.L=new olympe.D.J(()=>olympe.dc.Da,[]);
903
+ m.ee.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);m.Nf.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.Bx.L=new olympe.D.J(()=>olympe.dc.Da,[]);m.Cx.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.logic.eg=class extends olympe.sc.logic.Be{C(){return this.ee('016ac63229782039429f')}F(){return this.Nf('016ac6322acf67eebfe7')}G(){return this.ak().zg().ub(olympe.sc.logic.Hc.typeRel).Tk(olympe.sc.logic.yi).tf().sf().pn(olympe.D.ga.ZERO)}};olympe.sc.logic.eg.C='016ac63229782039429f';olympe.sc.logic.eg.ba='016ac6322acf67eebfe7';olympe.sc.logic.eg.O=Lj('01621fb84e320000a000',olympe.sc.logic.eg,olympe.sc.logic.Action);
904
+ olympe.sc.logic.eg.prototype.C.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);olympe.sc.logic.eg.prototype.F.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.eg.prototype.G.L=olympe.D.J.P;olympe.sc.logic.oo=class extends olympe.sc.logic.Be{};olympe.sc.logic.oo.O=Lj('01621fb84e320000f011',olympe.sc.logic.oo);olympe.sc.logic.no=class extends olympe.sc.logic.eg{};olympe.sc.logic.no.O=Lj('01621fb84e320000f012',olympe.sc.logic.no);olympe.sc.logic.Function=class extends olympe.sc.Runnable{K(){return[this.xb]}V(){const a=olympe.sc.Vd.F.yt,b=olympe.sc.Vd.F.Au,c=this.db,d=new Map;this.getInputs().forEach(e=>{d.set(a+c.name(e),e)});this.getOutputs().forEach(e=>{d.set(b+c.name(e),e)});return d}C(a){return this.getOutputs().map(b=>this.db.Wk(b,olympe.sc.logic.Hc.typeRel,olympe.sc.logic.Mj)?a.Hn.bind(a,b):a.set.bind(a,b))}setupExecution(a){const b=this.getInputs();return 0<b.length?rxjs.combineLatest(b.map(c=>a.observe(c))).pipe(rxjs.operators.map(c=>
905
+ c.includes(null)?null:c)):rxjs.of([])}};olympe.sc.logic.Function.O=olympe.dc.ya.C('0168c6f020f2a96f0000',olympe.sc.logic.Function,olympe.sc.R.Ea);olympe.sc.logic.Hc=class extends olympe.dc.CloudObject{C(){return this.oc(olympe.sc.logic.Hc.typeRel,olympe.dc.CloudObject)}F(){return this.ge(olympe.sc.logic.Hc.C)}};olympe.sc.logic.Hc.O=olympe.dc.ya.C('0168a431d25001540000',olympe.sc.logic.Hc);olympe.sc.logic.Hc.C=olympe.sc.logic.Hc.O.xa('01740c5d4ae4b520dd01');olympe.sc.logic.Hc.typeRel=olympe.sc.logic.Hc.O.Ga('0168a431d3b9b7438424');P(olympe.dc.CloudObject.O,olympe.sc.logic.Hc.typeRel);
906
+ olympe.sc.logic.Hc.prototype.C.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Hc.prototype.F.L=olympe.D.J.G;olympe.sc.logic.Eb=class extends olympe.sc.logic.Hc{};olympe.sc.logic.Eb.O=olympe.dc.ya.C('0168a431d25001540001',olympe.sc.logic.Eb);olympe.sc.logic.Eb.ba=olympe.sc.logic.Hc.O.xa('01740c5d4ae4b520dd02');olympe.sc.logic.Eb.$=P(olympe.sc.logic.Eb.O,olympe.sc.mb.F);olympe.sc.logic.Eb.F=olympe.sc.logic.Eb.O.Ga('0168a431d91f2578000b',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Eb.K=olympe.sc.logic.Eb.O.Ga('01621fb84e32000000a1',olympe.dc.Ca.ORIGIN);
907
+ olympe.sc.logic.Eb.V=olympe.sc.logic.Eb.O.Ga('01621fb84e32000000d1',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Rb=class extends olympe.sc.logic.Hc{};olympe.sc.logic.Rb.O=olympe.dc.ya.C('0168a431d25001540002',olympe.sc.logic.Rb);olympe.sc.logic.Rb.$=P(olympe.sc.logic.Rb.O,olympe.sc.mb.K);olympe.sc.logic.Rb.F=olympe.sc.logic.Rb.O.Ga('0168a431d91f25780003',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Rb.V=olympe.sc.logic.Rb.O.Ga('01621fb84e32000000a2',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Rb.K=olympe.sc.logic.Rb.O.Ga('01621fb84e32000000d2',olympe.dc.Ca.ORIGIN);olympe.sc.logic.Action=class extends olympe.sc.logic.Function{setupExecution(a){const b=this.Od().C().T();return a.observe(b).pipe(rxjs.operators.map(c=>null===c?null:this.getInputs().filter(d=>d!==b).map(d=>a.get(d))))}};olympe.sc.logic.Action.O=olympe.dc.ya.C('0168c6f020f2a96a0000',olympe.sc.logic.Action,olympe.sc.R.Ea);olympe.sc.logic.Ud=class extends olympe.sc.logic.Function{run(a){zj(this,a);const b=a.getParent(),c=this.db.ic(this,olympe.sc.logic.Ud.C),d=this.db.ic(this,olympe.sc.logic.Ud.G);a.on(c,e=>b.set(d,e),this.tag)}P(){return this.oc(olympe.sc.logic.Ud.C,olympe.sc.logic.Eb)}Ka(){return this.oc(olympe.sc.logic.Ud.G,olympe.sc.logic.Rb)}};olympe.sc.logic.Ud.O=olympe.dc.ya.C('01621fb84e32000000a0',olympe.sc.logic.Ud,olympe.sc.R.Ea);olympe.sc.logic.Ud.C=P(olympe.sc.logic.Ud.O,olympe.sc.logic.Eb.K);
908
+ olympe.sc.logic.Ud.G=P(olympe.sc.logic.Ud.O,olympe.sc.logic.Rb.V);olympe.sc.logic.Ud.prototype.P.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);olympe.sc.logic.Ud.prototype.Ka.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.Zd=class extends olympe.sc.logic.Function{run(a){const b=a.getParent(),c=this.db.ic(this,olympe.sc.logic.Zd.G),d=this.db.ic(this,olympe.sc.logic.Zd.C);b.on(c,e=>a.set(d,e),b.Z())}Ka(){return this.oc(olympe.sc.logic.Zd.G,olympe.sc.logic.Eb)}P(){return this.oc(olympe.sc.logic.Zd.C,olympe.sc.logic.Rb)}};olympe.sc.logic.Zd.O=olympe.dc.ya.C('01621fb84e32000000d0',olympe.sc.logic.Zd,olympe.sc.R.Ea);olympe.sc.logic.Zd.G=P(olympe.sc.logic.Zd.O,olympe.sc.logic.Eb.V);
909
+ olympe.sc.logic.Zd.C=P(olympe.sc.logic.Zd.O,olympe.sc.logic.Rb.K);olympe.sc.logic.Zd.prototype.Ka.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);olympe.sc.logic.Zd.prototype.P.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);function Ej(a,b,c){const d=a.db.ic(a,olympe.sc.logic.wb.ba)||a.db.ic(a,olympe.sc.logic.wb.V),e=a.db.ic(a,olympe.sc.logic.wb.$),f=a.db.Xf((()=>{let k=null,l=a.db.ic(a,olympe.sc.logic.wb.F);l?k=a.db.ic(l,olympe.dm.Property.typeRel):(l=a.db.ic(a,olympe.sc.logic.wb.C))&&(k=a.db.ic(l,olympe.sc.logic.Hc.typeRel));return k||olympe.dc.CloudObject.O.T()})(),olympe.dm.Oe)?new olympe.D.Xb('Pipe Context'):null,g=a.F.bind(a,b,c,f);if(null!==d&&null!==e){let k;const l=b.dl(e,n=>{k&&k();k=n.on(d,g,e)});return()=>
910
+ {g(null);l();k&&k()}}const h=Jd(a.db,a,olympe.sc.logic.wb.valueProp,g);return()=>{g(null);a.db.F(a,olympe.sc.logic.wb.valueProp,h)}}function Mj(a,b,c,d){const e=b.getParent();ej(e.F,c,d);b.set(a.C,()=>{fj(e.F,c)})}
911
+ olympe.sc.logic.wb=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.N=c;this.C=`detachObject${this.tag}`}F(a,b,c,d){null!==c&&c.Fa();const e=a.get(this.C);e&&(e(),a.remove(this.C));const f=olympe.sc.kh(d);if(f instanceof olympe.dc.CloudObject){if(d=f.T(),Mj(this,a,d,[d]),null!==c&&f instanceof olympe.dm.Oe){c.run(()=>{olympe.D.wc([f.getValue()],g=>{b(g.valueOf())})});return}}else f instanceof olympe.dc.Ya&&Mj(this,a,`qr-${f.hash}`,Me(f));b(f)}getValue(a){return this.Sf(olympe.sc.logic.wb.valueProp,
912
+ a||olympe.dc.X.Tb.kh,Object)}St(){const a=this.transform(olympe.sc.logic.wb.C,olympe.sc.logic.Hc.typeRel);a.Ed(olympe.dc.CloudObject);return a.Rc()}zx(){return this.oc(olympe.sc.logic.wb.$,olympe.dc.CloudObject)}xx(){return this.oc(olympe.sc.logic.wb.ba,olympe.sc.logic.Rb)}yx(){return this.oc(olympe.sc.logic.wb.V,olympe.dm.Property)}Kw(){return this.oc(olympe.sc.logic.wb.K,olympe.dc.CloudObject)}Iw(){return this.oc(olympe.sc.logic.wb.C,olympe.sc.logic.Eb)}Jw(){return this.oc(olympe.sc.logic.wb.F,
913
913
  olympe.dm.Property)}};olympe.sc.logic.wb.O=olympe.dc.ya.C('0168a431d91f25780000',olympe.sc.logic.wb,olympe.sc.R.Ea);olympe.sc.logic.wb.valueProp=olympe.sc.logic.wb.O.xa('0168a431d91f25780001');olympe.sc.logic.wb.$=olympe.sc.logic.wb.O.Ga('0168a431d91f25780002');olympe.sc.logic.wb.ba=P(olympe.sc.logic.wb.O,olympe.sc.logic.Rb.F);olympe.sc.logic.wb.V=olympe.sc.logic.wb.O.Ga('0168a431d91f25780004');olympe.sc.logic.wb.K=olympe.sc.logic.wb.O.Ga('0168a431d91f2578000a');
914
- olympe.sc.logic.wb.C=P(olympe.sc.logic.wb.O,olympe.sc.logic.Fb.F);olympe.sc.logic.wb.F=olympe.sc.logic.wb.O.Ga('0168a431d91f2578000c');P(olympe.dc.CloudObject.O,olympe.sc.logic.wb.$);P(olympe.dm.Property.O,olympe.sc.logic.wb.V);P(olympe.dc.CloudObject.O,olympe.sc.logic.wb.K);P(olympe.dm.Property.O,olympe.sc.logic.wb.F);m=olympe.sc.logic.wb.prototype;m.Rt.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.xx.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
915
- m.vx.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.wx.L=new olympe.D.J(()=>olympe.dm.Property,[]);m.Iw.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Gw.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);m.Hw.L=new olympe.D.J(()=>olympe.dm.Property,[]);olympe.sc.logic.Yd=class extends olympe.sc.logic.Function{};olympe.sc.logic.Yd.O=olympe.dc.ya.C('017dc8c114aa61a0e27f',olympe.sc.logic.Yd);olympe.sc.logic.Yd.C=olympe.sc.logic.Yd.O.Ga('017dc8d6d8ef9135f08a');olympe.sc.logic.Yd.G=olympe.sc.logic.Yd.O.Ga('017dc8d6d8ef9135f08b');P(olympe.dm.Nb.O,olympe.sc.logic.Yd.G);function Nj(a,b){const c=a.Pd(),d=c.Wl().T(),e=c.Xl().T(),f=c.Yl().T();b.on(d,g=>{g&&(g=new Map(a.getInputs().map(h=>[h,b.get(h)])),g=olympe.sc.logic.rk.ka(g),olympe.H.wa.gb.sb.get(a.Lb(),g).then(h=>{h=Oj(h,a.P.bind(a,b));for(const [k,l]of h)k!==e&&k!==f&&b.set(k,l);b.set(e,h.get(e));b.set(f,h.get(f))}).catch(h=>{b.set(f,olympe.sc.logic.zi.create(h.toString(),1))}))},b.Z())}
916
- function Pj(a,b,c,d,e,f){const g=n=>{if(null!==n){e.cancel();k&&k();l&&l();try{const p=new Map(a.getOutputs().map(r=>[r,b.get(r)])),q=olympe.sc.logic.rk.ka(p);f.we(q).finally(()=>b.destroy())}catch(p){n=Error(`Error while serializing the response from remote action ${a.Lb()}: ${p.message}`),f.Eg(n).finally(()=>b.destroy())}}},h=b.Z(),k=b.on(c,g,h),l=b.on(d,g,h)}
917
- olympe.sc.logic.Qh=class extends olympe.sc.logic.Function{constructor(a,b,c,d,e){super(a,b,c);this.Ka=d;this.timeout=e}run(a){let b;null!=(b=a.Xa(olympe.sc.Ra.C.EDITION))&&b||(this.db.fb(this,olympe.sc.logic.Qh.C)?this.Db(a):(zj(this,a),Nj(this,a)))}Db(a){const b=this.Lb(),c=this.Pd(),d=c.Bp().T(),e=c.Wl().T(),f=c.Xl().T(),g=c.Yl().T();(new olympe.H.wa.gb.sb(b,a)).listen().subscribe(rxjs.Subscriber.create(h=>{const k=a.ci('remote call'),l=Oj(h.body(),this.P.bind(this,k)),n=jc(()=>{h.Eg(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`));
918
- k.destroy()},this.timeout);Pj(this,k,f,g,n,h);super.run(k);for(const [p,q]of l)p!==e&&k.set(p,q);h.Cj().then(p=>{var q=k.get(d);null!==q&&olympe.dc.za(q)!==p&&(q=this.Lb(),this.N.warn(`Remote action ${this.db.name(q)} ${q}: try to run it with an input user that is not the real authenticated user.`));k.set(d,p);k.set(e,l.get(e))}).catch(p=>{const q=this.Lb();this.N.warn(`Remote action ${this.db.name(q)} ${q} Triggered by unrecognized user: ${p}.`);k.set(g,olympe.sc.logic.zi.create('Unrecognized User',
919
- 1))})},h=>{const k=this.Lb();this.N.error(`Error while listening on remote action ${this.db.name(k)} (${k}): ${h.message}`)}))}P(a,b){const c=Array.from(b.fe()).map(d=>d.tag());Vc(this.Ka,a.C.C,b,[],c)(!0)}};olympe.sc.logic.Qh.O=olympe.dc.ya.C('017a7b0c5dcbd8964c5d',olympe.sc.logic.Qh,olympe.sc.R.Ea,olympe.dc.db.R.Aa,new olympe.U.fa(olympe.sc.Config.Bq));olympe.sc.logic.Qh.C=olympe.sc.logic.Qh.O.xa('017a7b0c62a02a89444f');function Oj(a,b){var c=(new olympe.dc.X.Oi(olympe.dc.Ia.Lc)).C(a.p||[]);b&&b(c);c=new Map;for(const [d,e]of Object.entries(a.v||{}))c.set(d,Qj(olympe.sc.logic.rk,e,b));return c}function Rj(a){a.Bc=new olympe.dc.db.xc;a.values=Object.create(null)}
914
+ olympe.sc.logic.wb.C=P(olympe.sc.logic.wb.O,olympe.sc.logic.Eb.F);olympe.sc.logic.wb.F=olympe.sc.logic.wb.O.Ga('0168a431d91f2578000c');P(olympe.dc.CloudObject.O,olympe.sc.logic.wb.$);P(olympe.dm.Property.O,olympe.sc.logic.wb.V);P(olympe.dc.CloudObject.O,olympe.sc.logic.wb.K);P(olympe.dm.Property.O,olympe.sc.logic.wb.F);m=olympe.sc.logic.wb.prototype;m.St.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.zx.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
915
+ m.xx.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.yx.L=new olympe.D.J(()=>olympe.dm.Property,[]);m.Kw.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Iw.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);m.Jw.L=new olympe.D.J(()=>olympe.dm.Property,[]);olympe.sc.logic.Xd=class extends olympe.sc.logic.Function{};olympe.sc.logic.Xd.O=olympe.dc.ya.C('017dc8c114aa61a0e27f',olympe.sc.logic.Xd);olympe.sc.logic.Xd.C=olympe.sc.logic.Xd.O.Ga('017dc8d6d8ef9135f08a');olympe.sc.logic.Xd.G=olympe.sc.logic.Xd.O.Ga('017dc8d6d8ef9135f08b');P(olympe.dm.Nb.O,olympe.sc.logic.Xd.G);function Nj(a,b){const c=a.Od(),d=c.Xl().T(),e=c.Yl().T(),f=c.Zl().T();b.on(d,g=>{g&&(g=new Map(a.getInputs().map(h=>[h,b.get(h)])),g=olympe.sc.logic.sk.ka(g),olympe.H.wa.gb.sb.get(a.Lb(),g).then(h=>{h=Oj(h,a.P.bind(a,b));for(const [k,l]of h)k!==e&&k!==f&&b.set(k,l);b.set(e,h.get(e));b.set(f,h.get(f))}).catch(h=>{b.set(f,olympe.sc.logic.yi.create(h.toString(),1))}))},b.Z())}
916
+ function Pj(a,b,c,d,e,f){const g=n=>{if(null!==n){e.cancel();k&&k();l&&l();try{const p=new Map(a.getOutputs().map(r=>[r,b.get(r)])),q=olympe.sc.logic.sk.ka(p);f.we(q).finally(()=>b.destroy())}catch(p){n=Error(`Error while serializing the response from remote action ${a.Lb()}: ${p.message}`),f.Bg(n).finally(()=>b.destroy())}}},h=b.Z(),k=b.on(c,g,h),l=b.on(d,g,h)}
917
+ olympe.sc.logic.Ph=class extends olympe.sc.logic.Function{constructor(a,b,c,d,e){super(a,b,c);this.Ka=d;this.timeout=e}run(a){let b;null!=(b=a.Xa(olympe.sc.Ra.C.EDITION))&&b||(this.db.eb(this,olympe.sc.logic.Ph.C)?this.Fb(a):(zj(this,a),Nj(this,a)))}Fb(a){const b=this.Lb(),c=this.Od(),d=c.Cp().T(),e=c.Xl().T(),f=c.Yl().T(),g=c.Zl().T();(new olympe.H.wa.gb.sb(b,a)).listen().subscribe(rxjs.Subscriber.create(h=>{const k=a.bi('remote call'),l=Oj(h.body(),this.P.bind(this,k)),n=jc(()=>{h.Bg(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`));
918
+ k.destroy()},this.timeout);Pj(this,k,f,g,n,h);super.run(k);for(const [p,q]of l)p!==e&&k.set(p,q);h.Dj().then(p=>{var q=k.get(d);null!==q&&olympe.dc.za(q)!==p&&(q=this.Lb(),this.N.warn(`Remote action ${this.db.name(q)} ${q}: try to run it with an input user that is not the real authenticated user.`));k.set(d,p);k.set(e,l.get(e))}).catch(p=>{const q=this.Lb();this.N.warn(`Remote action ${this.db.name(q)} ${q} Triggered by unrecognized user: ${p}.`);k.set(g,olympe.sc.logic.yi.create('Unrecognized User',
919
+ 1))})},h=>{const k=this.Lb();this.N.error(`Error while listening on remote action ${this.db.name(k)} (${k}): ${h.message}`)}))}P(a,b){const c=Array.from(b.fe()).map(d=>d.tag());Vc(this.Ka,a.G(),b,[],c)(!0)}};olympe.sc.logic.Ph.O=olympe.dc.ya.C('017a7b0c5dcbd8964c5d',olympe.sc.logic.Ph,olympe.sc.R.Ea,olympe.dc.db.R.Aa,new olympe.U.fa(olympe.sc.Config.Cq));olympe.sc.logic.Ph.C=olympe.sc.logic.Ph.O.xa('017a7b0c62a02a89444f');function Oj(a,b){var c=(new olympe.dc.X.Oi(olympe.dc.Ia.Lc)).C(a.p||[]);b&&b(c);c=new Map;for(const [d,e]of Object.entries(a.v||{}))c.set(d,Qj(olympe.sc.logic.sk,e,b));return c}function Rj(a){a.Bc=new olympe.dc.db.xc;a.values=Object.create(null)}
920
920
  function Qj(a,b,c){if(null===b||void 0===b)return null;switch(b.t){case 1:return new Date(b.d);case 2:return olympe.D.Color.create(b.r,b.g,b.b,b.a);case 3:return olympe.sc.logic.Error.create(b.m,b.c);case 4:return olympe.dc.CloudObject.get(b.v);case 5:return Ge(b.v);case 6:return Pe(b.v,c);case 7:return new Map(Object.entries(b.m).map(([d,e])=>[d,Qj(a,e,c)]));default:return Array.isArray(b)?b.map(d=>Qj(a,d,c)):'object'===typeof b?Object.entries(b).reduce((d,[e,f])=>{d[e]=Qj(a,f,c);return d},{}):b}}
921
- function Sj(a,b){var c=a.db;a=a.Bc;if(c.Gb(b)){a.F(b,c.ed(b,!0),0);a.Va(olympe.dc.mc.Vc,b,c.model(b),0);for(const [d,e,f]of Nd(c,b))(c=a.Rf(f))&&c.ue()&&(e===olympe.dc.Ca.DESTINATION?a.Va(d,b,f,0):a.Va(d,f,b,0))}else olympe.ta.Za('Remote Action').error(`Try to serialize an instance ${b} that does not exist in the local datacloud.`)}
922
- olympe.sc.logic.rk=class{constructor(){this.db=olympe.dc.La();Rj(this)}static ka(a){const b=new olympe.sc.logic.rk;a.forEach((c,d)=>{null!==c&&void 0!==c&&(b.values[d]=b.C(c))});return b.flush()}flush(){const a=Object.create(null),b=new olympe.dc.transaction.ud;this.Bc.Oc(b);a.p=me(b);a.v=this.values;Rj(this);return a}C(a){switch(!0){case a instanceof olympe.D.jb:return{t:1,d:a.valueOf().toISOString()};case a instanceof Date:return{t:1,d:a.toISOString()};case a instanceof olympe.D.Color:return{t:2,
923
- r:a.Wf().valueOf(),g:a.Qf().valueOf(),b:a.Lf().valueOf(),a:a.Kf().valueOf()};case a instanceof olympe.sc.logic.Error:return{t:3,c:a.code,m:a.$r};case a&&'function'===typeof a.T:return a=a.T(),Sj(this,a),{t:4,v:a};case a instanceof olympe.dc.hb:return{t:5,v:a.ka()};case a instanceof olympe.dc.Ya:return{t:6,v:a.ka()};case Array.isArray(a):return a.map(this.C.bind(this));case a instanceof Map:const b=Object.create(null);for(const [c,d]of a)'string'===typeof c&&(b[c]=this.C(d));return{t:7,m:b};case null===
924
- a:case void 0===a:return null;case 'object'===typeof a:return Object.entries(a).reduce((c,[d,e])=>{c[d]=this.C(e);return c},{});default:return a}}};olympe.sc.logic.controllers={};olympe.sc.logic.controllers.Ql=class{constructor(a){this.db=olympe.dc.La();this.typeRel=a}};olympe.sc.logic.controllers.Ql.C={Jz:-1,CA:1};olympe.sc.logic.controllers.gB=class extends olympe.sc.logic.controllers.Ql{constructor(){super(olympe.sc.logic.pe.C)}};olympe.sc.logic.controllers.iB=class extends olympe.sc.logic.controllers.Ql{constructor(){super(olympe.sc.logic.Hc.typeRel)}};olympe.sc.logic.Mk={};olympe.sc.logic.Mk.hv=class extends olympe.sc.logic.Function{update(a,[b,c],[d]){const e=olympe.dc.za(b);e?of(hf(new olympe.dc.pf(e),olympe.dc.Qb.zf),c).kb(()=>{d(olympe.dc.CloudObject.get(e))}):this.N.warn('Cannot subscribe to an instance with no tag: '+e)}};olympe.sc.logic.ya.C('0174bf4b7e006e4b788a',olympe.sc.logic.Mk.hv);olympe.sc.logic.actions={};olympe.sc.logic.Mk.hu=class extends olympe.sc.logic.Function{run(a){zj(this,a);const [b,c,d]=this.C(a);let e,f=null,g=null;const h=a.getParent(),k=()=>{null===g||0===e?(this.N.warn('No list to iter upon'),this.N.info(a.Z())):f<e?(b(g.Ve(f)),f++,c((new Date).getTime())):(mj(h.C),d((new Date).getTime()))};this.getInputs().forEach((l,n)=>a.on(l,p=>{if(p)switch(n){case 0:g=p;break;case 1:e=g.Gg();f=0;lj(h.C);k();break;case 2:k();break;default:this.N.error('Unhandled input')}},this.tag))}};
925
- olympe.sc.logic.ya.C('0171889b060b6cd54300',olympe.sc.logic.Mk.hu);olympe.sc.logic.ac={};olympe.sc.logic.ac.so=class extends olympe.sc.logic.Be{C(){return this.ee('017dc92292107fb98b21')}};Lj('017dc8d6c8fd8c8bd2f0',olympe.sc.logic.ac.so);olympe.sc.logic.ac.so.prototype.C.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);olympe.sc.logic.ac.Sl=class extends olympe.sc.logic.Be{C(){return this.ee('016ac63808535703691c')}};olympe.sc.logic.ac.Sl.O=Lj('0169b6876a03f139d50a',olympe.sc.logic.ac.Sl);olympe.sc.logic.ac.Sl.prototype.C.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);olympe.sc.logic.ac.gm=class extends olympe.sc.logic.Be{C(){return this.ee('016ac63809a9a8e6db96')}F(){return this.Pf('016ac6380ab003363b3e')}};Lj('01646ad602f933b8caaf',olympe.sc.logic.ac.gm);olympe.sc.logic.ac.gm.prototype.C.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);olympe.sc.logic.ac.gm.prototype.F.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.ac.hk=class extends olympe.sc.logic.Be{C(){return this.ee('016ac6380bd98f1d91a0')}G(){return this.Pf('016ac63c589ae38ca3ae')}F(){return this.Pf('016ac63c5a377fceabaa')}};Lj('0168ec42fc01747a98b6',olympe.sc.logic.ac.hk);olympe.sc.logic.ac.hk.prototype.C.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);olympe.sc.logic.ac.hk.prototype.G.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.ac.hk.prototype.F.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.ac.eh=class extends olympe.sc.logic.Be{Wl(){return this.ee('017a7b07b09e3b22c8b4')}Bp(){return this.ee('017a7b07ba05807a74b0')}Xl(){return this.Pf('017a7b0818c12388d731')}Yl(){return this.Pf('017a7b085146d5e69aec')}St(){return olympe.D.ra.F}};olympe.sc.logic.ac.eh.ba='017a7b07b09e3b22c8b4';olympe.sc.logic.ac.eh.Nc='017a7b07ba05807a74b0';olympe.sc.logic.ac.eh.uc='017a7b0818c12388d731';olympe.sc.logic.ac.eh.C='017a7b085146d5e69aec';
926
- olympe.sc.logic.ac.eh.O=Lj('017a7b07a948e30508fa',olympe.sc.logic.ac.eh,olympe.sc.logic.Qh);m=olympe.sc.logic.ac.eh.prototype;m.Wl.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);m.Bp.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);m.Xl.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.Yl.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.St.L=olympe.D.J.P;olympe.sc.logic.ac.Uq=class extends olympe.sc.logic.Be{C(){return this.ee('016ac63c5b3ed0562740')}};Lj('016a9766c230916ea5ec',olympe.sc.logic.ac.Uq);olympe.sc.logic.ac.Uq.prototype.C.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);olympe.sc.query={};olympe.sc.query.Qn=class extends olympe.sc.$g{};olympe.sc.query.Qn.O=olympe.dc.ya.C('01631aacd8276ea98491',olympe.sc.query.Qn);olympe.sc.query.hq=class extends olympe.dm.Enum{};olympe.sc.query.hq.O=olympe.dc.ya.C('01631aacd8276ea98495',olympe.sc.query.hq);olympe.sc.query.sq=class extends olympe.dm.Enum{};olympe.sc.query.sq.O=olympe.dc.ya.C('01631aacd8276ea98494',olympe.sc.query.sq);olympe.sc.query.uq=class extends olympe.sc.$g{};olympe.sc.query.uq.O=olympe.dc.ya.C('01631aacd8276ea98492',olympe.sc.query.uq);olympe.sc.query.vq=class extends olympe.dc.CloudObject{};olympe.sc.query.vq.O=olympe.dc.ya.C('01631aacd8276ea98493',olympe.sc.query.vq);olympe.sc.po=class extends olympe.dc.CloudObject{};olympe.sc.po.O=olympe.dc.ya.C('018312ceeb3e93618a85',olympe.sc.po);olympe.sc.Xb={};olympe.sc.Xb.Comment=class extends olympe.dm.BrickMetadata{C(){return this.Ab(olympe.sc.Xb.Comment.V)}G(){return this.Ab(olympe.sc.Xb.Comment.K)}F(){return new olympe.D.ec(this.ge(olympe.sc.Xb.Comment.$),this.ge(olympe.sc.Xb.Comment.F))}};olympe.sc.Xb.Comment.qa=100;olympe.sc.Xb.Comment.ba=66;olympe.sc.Xb.Comment.O=olympe.dc.ya.C('0184bd886ee1c7adfe09',olympe.sc.Xb.Comment);olympe.sc.Xb.Comment.V=olympe.sc.Xb.Comment.O.xa('0184c80e29ed08a16c5e');olympe.sc.Xb.Comment.K=olympe.sc.Xb.Comment.O.xa('0184bd889f33359cfe75');
927
- olympe.sc.Xb.Comment.$=olympe.sc.Xb.Comment.O.xa('0184c3f9406e25a41512');olympe.sc.Xb.Comment.F=olympe.sc.Xb.Comment.O.xa('0184c3f942e4cc136ce8');olympe.sc.Xb.Comment.C=olympe.sc.Xb.Comment.O.Ga('0184be3f135a83fd6cc3');olympe.sc.Xb.Comment.prototype.C.L=olympe.D.J.F;olympe.sc.Xb.Comment.prototype.G.L=olympe.D.J.F;olympe.sc.Xb.Comment.prototype.F.L=olympe.D.J.V;olympe.sc.Xb.xl=class extends olympe.dm.Enum{};olympe.sc.Xb.xl.C={zz:'Comment',tC:'Todo'};olympe.sc.Xb.xl.O=olympe.dc.ya.C('0184cc42e06205501bc7',olympe.sc.Xb.xl);olympe.sc.workflow={};olympe.sc.workflow.ObjectState=class extends olympe.dc.CloudObject{};olympe.sc.workflow.ObjectState.O=olympe.dc.ya.C('017ffdd8f0b1e31fe138',olympe.sc.workflow.ObjectState);olympe.sc.workflow.ObjectState.workflowProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13e');olympe.sc.workflow.ObjectState.stateProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe139');olympe.sc.workflow.ObjectState.assigneeProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13a');
928
- olympe.sc.workflow.ObjectState.dateTimeProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13b');olympe.sc.workflow.ObjectState.serializedObjectProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13d');olympe.sc.workflow.ObjectState.objectRel=olympe.sc.workflow.ObjectState.O.Ga('017ffdd8f0b1e31fe13c');olympe.sc.workflow.ObjectState.currentObjectRel=olympe.sc.workflow.ObjectState.O.Ga('017ffdd8f0b1e31fe13f');olympe.sc.workflow.yf=class extends olympe.sc.logic.Be{Tt(){return this.ee('017ffe02381f9fac5060')}Wt(){return this.ee('017ffe02381f9fac5061')}Xt(){return this.ee('017ffe02381f9fac5062')}Ew(){return this.ee('017ffe02381f9fac5065')}Ut(){return this.Pf('017ffe02381f9fac5063')}Vt(){return this.Pf('017ffe02381f9fac5064')}};olympe.sc.workflow.yf.O=Lj('017ffde21f5fe0f704ce',olympe.sc.workflow.yf);olympe.sc.workflow.yf.C='017ffe02381f9fac5060';olympe.sc.workflow.yf.Nd='017ffe02381f9fac5061';
929
- olympe.sc.workflow.yf.ie='017ffe02381f9fac5062';olympe.sc.workflow.yf.uc='017ffe02381f9fac5065';olympe.sc.workflow.yf.ba='017ffe02381f9fac5063';olympe.sc.workflow.yf.Nc='017ffe02381f9fac5064';m=olympe.sc.workflow.yf.prototype;m.Tt.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);m.Wt.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);m.Xt.L=new olympe.D.J(()=>olympe.sc.logic.Fb,[]);m.Ew.L=new olympe.D.J(()=>Map,[]);m.Ut.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);
930
- m.Vt.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.workflow.Re=class extends olympe.dm.BrickMetadata{Tc(){return this.pc(olympe.sc.workflow.Workflow.statesRel.zc(),olympe.sc.workflow.Workflow).na().concat(['.',this.na()])}};olympe.sc.workflow.Re.O=olympe.dc.ya.C('017ffdc2dda51d46b430',olympe.sc.workflow.Re);olympe.sc.workflow.Transition=class extends olympe.dc.CloudObject{F(){return this.Ur()}C(){return this.pc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Re)}G(){return this.pc(olympe.sc.workflow.Transition.toStateRel,olympe.sc.workflow.Re)}Tc(){const a=this.pc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Re);return a.pc(olympe.sc.workflow.Workflow.statesRel.zc(),olympe.sc.workflow.Workflow).na().concat(['.',a.na(),'->',this.na()])}};
921
+ function Sj(a,b){var c=a.db;a=a.Bc;if(c.Gb(b)){a.F(b,c.ed(b,!0),0);a.Va(olympe.dc.lc.Vc,b,c.model(b),0);for(const [d,e,f]of Nd(c,b))(c=a.Pf(f))&&c.ue()&&(e===olympe.dc.Ca.DESTINATION?a.Va(d,b,f,0):a.Va(d,f,b,0))}else olympe.ta.Za('Remote Action').error(`Try to serialize an instance ${b} that does not exist in the local datacloud.`)}
922
+ olympe.sc.logic.sk=class{constructor(){this.db=olympe.dc.La();Rj(this)}static ka(a){const b=new olympe.sc.logic.sk;a.forEach((c,d)=>{null!==c&&void 0!==c&&(b.values[d]=b.C(c))});return b.flush()}flush(){const a=Object.create(null),b=new olympe.dc.transaction.ud;this.Bc.Oc(b);a.p=me(b);a.v=this.values;Rj(this);return a}C(a){switch(!0){case a instanceof olympe.D.jb:return{t:1,d:a.valueOf().toISOString()};case a instanceof Date:return{t:1,d:a.toISOString()};case a instanceof olympe.D.Color:return{t:2,
923
+ r:a.Uf().valueOf(),g:a.Of().valueOf(),b:a.Jf().valueOf(),a:a.If().valueOf()};case a instanceof olympe.sc.logic.Error:return{t:3,c:a.code,m:a.bs};case a&&'function'===typeof a.T:return a=a.T(),Sj(this,a),{t:4,v:a};case a instanceof olympe.dc.hb:return{t:5,v:a.ka()};case a instanceof olympe.dc.Ya:return{t:6,v:a.ka()};case Array.isArray(a):return a.map(this.C.bind(this));case a instanceof Map:const b=Object.create(null);for(const [c,d]of a)'string'===typeof c&&(b[c]=this.C(d));return{t:7,m:b};case null===
924
+ a:case void 0===a:return null;case 'object'===typeof a:return Object.entries(a).reduce((c,[d,e])=>{c[d]=this.C(e);return c},{});default:return a}}};olympe.sc.logic.controllers={};olympe.sc.logic.controllers.Rl=class{constructor(a){this.db=olympe.dc.La();this.typeRel=a}};olympe.sc.logic.controllers.Rl.C={Lz:-1,EA:1};olympe.sc.logic.controllers.iB=class extends olympe.sc.logic.controllers.Rl{constructor(){super(olympe.sc.logic.pe.C)}};olympe.sc.logic.controllers.kB=class extends olympe.sc.logic.controllers.Rl{constructor(){super(olympe.sc.logic.Hc.typeRel)}};olympe.sc.logic.Nk={};olympe.sc.logic.Nk.jv=class extends olympe.sc.logic.Function{update(a,[b,c],[d]){const e=olympe.dc.za(b);e?of(hf(new olympe.dc.nf(e),olympe.dc.Qb.xf),c).kb(()=>{d(olympe.dc.CloudObject.get(e))}):this.N.warn('Cannot subscribe to an instance with no tag: '+e)}};olympe.sc.logic.ya.C('0174bf4b7e006e4b788a',olympe.sc.logic.Nk.jv);olympe.sc.logic.actions={};olympe.sc.logic.Nk.iu=class extends olympe.sc.logic.Function{run(a){zj(this,a);const [b,c,d]=this.C(a);let e,f=null,g=null;const h=a.getParent(),k=()=>{null===g||0===e?(this.N.warn('No list to iter upon'),this.N.info(a.Z())):f<e?(b(g.We(f)),f++,c((new Date).getTime())):(mj(h.F),d((new Date).getTime()))};this.getInputs().forEach((l,n)=>a.on(l,p=>{if(p)switch(n){case 0:g=p;break;case 1:e=g.Dg();f=0;lj(h.F);k();break;case 2:k();break;default:this.N.error('Unhandled input')}},this.tag))}};
925
+ olympe.sc.logic.ya.C('0171889b060b6cd54300',olympe.sc.logic.Nk.iu);olympe.sc.logic.ac={};olympe.sc.logic.ac.to=class extends olympe.sc.logic.Be{C(){return this.ee('017dc92292107fb98b21')}};Lj('017dc8d6c8fd8c8bd2f0',olympe.sc.logic.ac.to);olympe.sc.logic.ac.to.prototype.C.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);olympe.sc.logic.ac.Tl=class extends olympe.sc.logic.Be{C(){return this.ee('016ac63808535703691c')}};olympe.sc.logic.ac.Tl.O=Lj('0169b6876a03f139d50a',olympe.sc.logic.ac.Tl);olympe.sc.logic.ac.Tl.prototype.C.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);olympe.sc.logic.ac.hm=class extends olympe.sc.logic.Be{C(){return this.ee('016ac63809a9a8e6db96')}F(){return this.Nf('016ac6380ab003363b3e')}};Lj('01646ad602f933b8caaf',olympe.sc.logic.ac.hm);olympe.sc.logic.ac.hm.prototype.C.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);olympe.sc.logic.ac.hm.prototype.F.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.ac.ik=class extends olympe.sc.logic.Be{C(){return this.ee('016ac6380bd98f1d91a0')}G(){return this.Nf('016ac63c589ae38ca3ae')}F(){return this.Nf('016ac63c5a377fceabaa')}};Lj('0168ec42fc01747a98b6',olympe.sc.logic.ac.ik);olympe.sc.logic.ac.ik.prototype.C.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);olympe.sc.logic.ac.ik.prototype.G.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.ac.ik.prototype.F.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.ac.dh=class extends olympe.sc.logic.Be{Xl(){return this.ee('017a7b07b09e3b22c8b4')}Cp(){return this.ee('017a7b07ba05807a74b0')}Yl(){return this.Nf('017a7b0818c12388d731')}Zl(){return this.Nf('017a7b085146d5e69aec')}Tt(){return olympe.D.ra.F}};olympe.sc.logic.ac.dh.ba='017a7b07b09e3b22c8b4';olympe.sc.logic.ac.dh.Nc='017a7b07ba05807a74b0';olympe.sc.logic.ac.dh.uc='017a7b0818c12388d731';olympe.sc.logic.ac.dh.C='017a7b085146d5e69aec';
926
+ olympe.sc.logic.ac.dh.O=Lj('017a7b07a948e30508fa',olympe.sc.logic.ac.dh,olympe.sc.logic.Ph);m=olympe.sc.logic.ac.dh.prototype;m.Xl.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);m.Cp.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);m.Yl.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.Zl.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.Tt.L=olympe.D.J.P;olympe.sc.logic.ac.Vq=class extends olympe.sc.logic.Be{C(){return this.ee('016ac63c5b3ed0562740')}};Lj('016a9766c230916ea5ec',olympe.sc.logic.ac.Vq);olympe.sc.logic.ac.Vq.prototype.C.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);olympe.sc.query={};olympe.sc.query.Rn=class extends olympe.sc.Zg{};olympe.sc.query.Rn.O=olympe.dc.ya.C('01631aacd8276ea98491',olympe.sc.query.Rn);olympe.sc.query.iq=class extends olympe.dm.Enum{};olympe.sc.query.iq.O=olympe.dc.ya.C('01631aacd8276ea98495',olympe.sc.query.iq);olympe.sc.query.tq=class extends olympe.dm.Enum{};olympe.sc.query.tq.O=olympe.dc.ya.C('01631aacd8276ea98494',olympe.sc.query.tq);olympe.sc.query.vq=class extends olympe.sc.Zg{};olympe.sc.query.vq.O=olympe.dc.ya.C('01631aacd8276ea98492',olympe.sc.query.vq);olympe.sc.query.wq=class extends olympe.dc.CloudObject{};olympe.sc.query.wq.O=olympe.dc.ya.C('01631aacd8276ea98493',olympe.sc.query.wq);olympe.sc.qo=class extends olympe.dc.CloudObject{};olympe.sc.qo.O=olympe.dc.ya.C('018312ceeb3e93618a85',olympe.sc.qo);olympe.sc.Yb={};olympe.sc.Yb.Comment=class extends olympe.dm.BrickMetadata{C(){return this.Ab(olympe.sc.Yb.Comment.V)}G(){return this.Ab(olympe.sc.Yb.Comment.K)}F(){return new olympe.D.ec(this.ge(olympe.sc.Yb.Comment.$),this.ge(olympe.sc.Yb.Comment.F))}};olympe.sc.Yb.Comment.qa=100;olympe.sc.Yb.Comment.ba=66;olympe.sc.Yb.Comment.O=olympe.dc.ya.C('0184bd886ee1c7adfe09',olympe.sc.Yb.Comment);olympe.sc.Yb.Comment.V=olympe.sc.Yb.Comment.O.xa('0184c80e29ed08a16c5e');olympe.sc.Yb.Comment.K=olympe.sc.Yb.Comment.O.xa('0184bd889f33359cfe75');
927
+ olympe.sc.Yb.Comment.$=olympe.sc.Yb.Comment.O.xa('0184c3f9406e25a41512');olympe.sc.Yb.Comment.F=olympe.sc.Yb.Comment.O.xa('0184c3f942e4cc136ce8');olympe.sc.Yb.Comment.C=olympe.sc.Yb.Comment.O.Ga('0184be3f135a83fd6cc3');olympe.sc.Yb.Comment.prototype.C.L=olympe.D.J.F;olympe.sc.Yb.Comment.prototype.G.L=olympe.D.J.F;olympe.sc.Yb.Comment.prototype.F.L=olympe.D.J.V;olympe.sc.Yb.yl=class extends olympe.dm.Enum{};olympe.sc.Yb.yl.C={Bz:'Comment',vC:'Todo'};olympe.sc.Yb.yl.O=olympe.dc.ya.C('0184cc42e06205501bc7',olympe.sc.Yb.yl);olympe.sc.workflow={};olympe.sc.workflow.ObjectState=class extends olympe.dc.CloudObject{};olympe.sc.workflow.ObjectState.O=olympe.dc.ya.C('017ffdd8f0b1e31fe138',olympe.sc.workflow.ObjectState);olympe.sc.workflow.ObjectState.workflowProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13e');olympe.sc.workflow.ObjectState.stateProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe139');olympe.sc.workflow.ObjectState.assigneeProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13a');
928
+ olympe.sc.workflow.ObjectState.dateTimeProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13b');olympe.sc.workflow.ObjectState.serializedObjectProp=olympe.sc.workflow.ObjectState.O.xa('017ffdd8f0b1e31fe13d');olympe.sc.workflow.ObjectState.objectRel=olympe.sc.workflow.ObjectState.O.Ga('017ffdd8f0b1e31fe13c');olympe.sc.workflow.ObjectState.currentObjectRel=olympe.sc.workflow.ObjectState.O.Ga('017ffdd8f0b1e31fe13f');olympe.sc.workflow.wf=class extends olympe.sc.logic.Be{Ut(){return this.ee('017ffe02381f9fac5060')}Xt(){return this.ee('017ffe02381f9fac5061')}Yt(){return this.ee('017ffe02381f9fac5062')}Gw(){return this.ee('017ffe02381f9fac5065')}Vt(){return this.Nf('017ffe02381f9fac5063')}Wt(){return this.Nf('017ffe02381f9fac5064')}};olympe.sc.workflow.wf.O=Lj('017ffde21f5fe0f704ce',olympe.sc.workflow.wf);olympe.sc.workflow.wf.C='017ffe02381f9fac5060';olympe.sc.workflow.wf.de='017ffe02381f9fac5061';
929
+ olympe.sc.workflow.wf.ie='017ffe02381f9fac5062';olympe.sc.workflow.wf.uc='017ffe02381f9fac5065';olympe.sc.workflow.wf.ba='017ffe02381f9fac5063';olympe.sc.workflow.wf.Nc='017ffe02381f9fac5064';m=olympe.sc.workflow.wf.prototype;m.Ut.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);m.Xt.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);m.Yt.L=new olympe.D.J(()=>olympe.sc.logic.Eb,[]);m.Gw.L=new olympe.D.J(()=>Map,[]);m.Vt.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);
930
+ m.Wt.L=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.workflow.Se=class extends olympe.dm.BrickMetadata{Tc(){return this.oc(olympe.sc.workflow.Workflow.statesRel.zc(),olympe.sc.workflow.Workflow).na().concat(['.',this.na()])}};olympe.sc.workflow.Se.O=olympe.dc.ya.C('017ffdc2dda51d46b430',olympe.sc.workflow.Se);olympe.sc.workflow.Transition=class extends olympe.dc.CloudObject{F(){return this.Vr()}C(){return this.oc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Se)}G(){return this.oc(olympe.sc.workflow.Transition.toStateRel,olympe.sc.workflow.Se)}Tc(){const a=this.oc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Se);return a.oc(olympe.sc.workflow.Workflow.statesRel.zc(),olympe.sc.workflow.Workflow).na().concat(['.',a.na(),'->',this.na()])}};
931
931
  olympe.sc.workflow.Transition.O=olympe.dc.ya.C('017ffdc633219f16beea',olympe.sc.workflow.Transition);olympe.sc.workflow.Transition.processRefProp=olympe.sc.workflow.Transition.O.xa('017ffdc633219f16beec');olympe.sc.workflow.Transition.fromStateRel=olympe.sc.workflow.Transition.O.Ga('017ffdc2dda51d46b431');olympe.sc.workflow.Transition.toStateRel=olympe.sc.workflow.Transition.O.Ga('017ffdc633219f16beeb');olympe.sc.workflow.Transition.prototype.F.L=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
932
- olympe.sc.workflow.Transition.prototype.C.L=new olympe.D.J(()=>olympe.sc.workflow.Re,[]);olympe.sc.workflow.Transition.prototype.G.L=new olympe.D.J(()=>olympe.sc.workflow.Re,[]);olympe.sc.workflow.Workflow=class extends olympe.dm.BrickMetadata{Xe(){return olympe.sc.Le.zg.Nj}G(){return this.Ig(olympe.sc.workflow.Workflow.serializationEnabledProp)}C(){return this.pc(olympe.sc.workflow.Workflow.dataTypeRel,olympe.sc.jf)}F(){return this.pc(olympe.sc.workflow.Workflow.initialStateRel,olympe.sc.workflow.Re)}};olympe.sc.workflow.Workflow.O=olympe.dc.ya.C('017ffdc010e5bcc9c971',olympe.sc.workflow.Workflow);olympe.sc.workflow.Workflow.serializationEnabledProp=olympe.sc.workflow.Workflow.O.xa('017ffdc010e5bcc9c972');
933
- olympe.sc.workflow.Workflow.dataTypeRel=olympe.sc.workflow.Workflow.O.Ga('017ffdc010e5bcc9c973');olympe.sc.workflow.Workflow.statesRel=olympe.sc.workflow.Workflow.O.Ga('017ffdc010e5bcc9c974');olympe.sc.workflow.Workflow.initialStateRel=olympe.sc.workflow.Workflow.O.Ga('017ffdc010e5bcc9c975');olympe.sc.workflow.Workflow.prototype.G.L=olympe.D.J.P;olympe.sc.workflow.Workflow.prototype.C.L=new olympe.D.J(()=>olympe.sc.jf,[]);
934
- olympe.sc.workflow.Workflow.prototype.F.L=new olympe.D.J(()=>olympe.sc.workflow.Re,[]);olympe.sc.Ma={};olympe.sc.Ma.Me=class extends olympe.sc.mb{Xe(){return olympe.sc.Le.zg.Wu}};olympe.sc.Ma.Me.O=Uc(olympe.dc.ya.C('01120300000000adef00',olympe.sc.Ma.Me));olympe.sc.Ma.Me.C=olympe.sc.Ma.Me.O.Ga('0171bc1f15da96dfdb89');P(olympe.dm.Xc.O,olympe.sc.Ma.Me.C);olympe.sc.Ma.pi=class extends olympe.sc.Runnable{F(){return[this.Lb()]}P(){return olympe.dc.md.from(this.Lb()).ub(olympe.sc.Ma.Me.C).Pc()}};olympe.sc.Ma.pi.O=Uc(olympe.dc.ya.C('0113030000000aca1100',olympe.sc.Ma.pi));olympe.sc.Ma.pi.prototype.P.L=new olympe.D.J(()=>olympe.dm.Nb,[]);olympe.sc.Ma.vb=class extends olympe.dc.CloudObject{Zt(){return this.Ig(olympe.sc.Ma.vb.F)}ey(){return this.Ig(olympe.sc.Ma.vb.eb)}Sd(){return this.ge(olympe.sc.Ma.vb.C)}Kw(){return this.Ab(olympe.sc.Ma.vb.$)}mx(){return this.Ab(olympe.sc.Ma.vb.Wa)}lx(){return this.Ab(olympe.sc.Ma.vb.Fa)}cn(){this.Ab(olympe.sc.Ma.vb.Ka)}Xw(){return this.Ab(olympe.sc.Ma.vb.ba)}uw(){return this.Ab(olympe.sc.Ma.vb.K)}kx(){return this.Ab(olympe.sc.Ma.vb.qa)}Yt(){return this.Ab(olympe.sc.Ma.vb.V)}};
935
- olympe.sc.Ma.vb.O=olympe.dc.ya.C('011203300000000adef5',olympe.sc.Ma.vb);olympe.sc.Ma.vb.F=olympe.sc.Ma.vb.O.xa('011203300000000adef6');olympe.sc.Ma.vb.eb=olympe.sc.Ma.vb.O.xa('011203300000000adef7');olympe.sc.Ma.vb.C=olympe.sc.Ma.vb.O.xa('011203300000000adef8');olympe.sc.Ma.vb.$=olympe.sc.Ma.vb.O.xa('011203300000000adef9');olympe.sc.Ma.vb.Wa=olympe.sc.Ma.vb.O.xa('011203300000000adefa');olympe.sc.Ma.vb.Fa=olympe.sc.Ma.vb.O.xa('011203300000000adefb');olympe.sc.Ma.vb.K=olympe.sc.Ma.vb.O.xa('011203300000000adefc');
936
- olympe.sc.Ma.vb.Ka=olympe.sc.Ma.vb.O.xa('011203300000000adefd');olympe.sc.Ma.vb.ba=olympe.sc.Ma.vb.O.xa('011203300000000adefe');olympe.sc.Ma.vb.qa=olympe.sc.Ma.vb.O.xa('011203300000000adeff');olympe.sc.Ma.vb.V=olympe.sc.Ma.vb.O.xa('011203300000000adee0');olympe.sc.Ma.vb.xb={INIT:0,xz:1,tk:2,sk:3,zm:4,EB:5,cc:9};m=olympe.sc.Ma.vb.prototype;m.Zt.L=olympe.D.J.P;m.ey.L=olympe.D.J.P;m.Sd.L=olympe.D.J.G;m.Kw.L=olympe.D.J.F;m.mx.L=olympe.D.J.F;m.lx.L=olympe.D.J.F;m.cn.L=olympe.D.J.F;m.Xw.L=olympe.D.J.F;
937
- m.uw.L=olympe.D.J.F;m.kx.L=olympe.D.J.F;m.Yt.L=olympe.D.J.F;olympe.sc.Ma.Nl=class extends olympe.sc.Ma.pi{qa(){return!0}};olympe.sc.Ma.Nl.O=olympe.dc.ya.C('0113032000000aca1102',olympe.sc.Ma.Nl,olympe.sc.R.Ea);olympe.sc.Ma.gh=class extends olympe.sc.Ma.Me{C(){return(new olympe.dc.ck(this.T(),olympe.sc.Ma.vb)).ub(olympe.sc.Ma.gh.ba).uf().Rc()}};olympe.sc.Ma.gh.O=olympe.dc.ya.C('011203300000000adef3',olympe.sc.Ma.gh);olympe.sc.Ma.gh.ba=olympe.sc.Ma.gh.O.Ga('011203300000000adef4');P(olympe.sc.Ma.vb.O,olympe.sc.Ma.gh.ba);olympe.sc.Ma.gh.prototype.C.L=new olympe.D.J(()=>olympe.sc.Ma.vb,[]);olympe.sc.ih=class extends olympe.dc.CloudObject{static get(){return olympe.dc.CloudObject.get('011203300000000adf0f')}};olympe.sc.ih.O=olympe.dc.ya.C('011203300000000adf00',olympe.sc.ih);olympe.sc.ih.F=olympe.sc.ih.O.xa('011203300000000adf01');olympe.sc.ih.C=olympe.sc.ih.O.xa('011203300000000adf02');olympe.sc.ih.K='011203300000000adf0f';olympe.sc.Hz=class{};olympe.sc.ye=class extends olympe.sc.Runnable{Ka(){return this.tb(olympe.sc.ye.G,olympe.sc.Runnable)}P(){return this.tb(olympe.sc.ye.C,olympe.dm.Property)}};olympe.sc.ye.O=Uc(olympe.dc.ya.C('016c2d996d9ca27fa9d8',olympe.sc.ye));olympe.sc.ye.G=olympe.sc.ye.O.Ga('016c3cb7742ec9309e0b');olympe.sc.ye.C=olympe.sc.ye.O.Ga('016c42d3454636f90533');olympe.sc.ye.prototype.Ka.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.ye.prototype.P.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.Ko=class extends olympe.dm.Pb{Xe(){return olympe.sc.Le.zg.Nj}};olympe.sc.Ko.O=olympe.dc.ya.C('017a7a9ff057958e5678',olympe.sc.Ko);olympe.sc.Rp=class extends olympe.dm.Pb{Xe(){return olympe.sc.Le.zg.rv}};olympe.sc.Rp.O=olympe.dc.ya.C('01644b6d4543b344b857',olympe.sc.Rp);olympe.sc.Sp=class extends olympe.dc.CloudObject{};olympe.sc.Sp.O=olympe.dc.ya.C('0162f672366be5ca7a86',olympe.sc.Sp);olympe.sc.Vq=class extends olympe.sc.ye{};olympe.sc.Vq.O=olympe.dc.ya.C('016d3f37610ae4fc3962',olympe.sc.Vq);olympe.sc.Sh=class extends olympe.dm.BrickMetadata{Xe(){return olympe.sc.Le.zg.Nj}};olympe.sc.Sh.O=olympe.dc.ya.C('01645fe6873aeea59e64',olympe.sc.Sh);olympe.sc.Sh.C=olympe.sc.Sh.O.Ga('017ed8ac775f48d4d589');olympe.sc.Sh.F=olympe.sc.Sh.O.Ga('017ed8ac775f48d4d590');olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.O=olympe.dc.ya.C('016cfca73e63f9ab5ba4',olympe.sc.Text);olympe.sc.Transaction=class{constructor(a=!0){this.C=(new olympe.dc.Transaction).persist(a);this.F=new Map;this.source=olympe.dc.Ia.lc}static from(a){const b=olympe.sc.Ra.C.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Transaction}static process(a,b){return a.has(olympe.sc.Ra.C.TRANSACTION,!0)?Promise.resolve(!1):b.kb().then(()=>!0)}Z(){return this.C.Z()}create(a,b=new Map,c=this.source,d){d=this.C.create(a,d).li(c);this.F.set(d.T(),olympe.dc.za(a));for(const [e,f]of b)d.setProperty(e,
938
- f);c===olympe.dc.Ia.Lc&&(b=olympe.dc.La(),b=null!==Gj?b.lj(Gj,[olympe.sc.Ma.Me.C,olympe.sc.hd.F.zc()])[0]||null:null,null!==b?this.Va(olympe.sc.hd.K,b,d):olympe.ta.Za('sc').warn('No business container for new instance of',olympe.dc.za(a)));return d.T()}update(a,b,c){this.C.update(a,b,c);return this}ay(a,b){a=this.C.update(a);for(const [c,d]of b)a.setProperty(c,d);return this}delete(a){this.C.delete(a);return this}Va(a,b,c){this.C.Va(a,b,c);return this}ic(a,b,c){this.C.ic(a,b,c);return this}Um(a,b){this.C.Um(a,
939
- b);return this}persist(a=!0){this.C.persist(a);return this}wj(a,b=!0){this.C.wj(a,b);return this}li(a){this.source=a;return this}model(a){return this.F.get(olympe.dc.za(a))||olympe.dc.La().model(a)}sn(a){oe(this.C,a.C);return this}Nm(a){this.C.Nm(a);return this}kb(){return new Promise((a,b)=>{this.C.kb((c,d)=>{c?a():b(d)})})}Xm(){return new Promise((a,b)=>{this.C.Xm((c,d)=>{c?a():b(d)})})}};olympe.sc.Transaction.prototype.executeAsLarge=olympe.sc.Transaction.prototype.Xm;
940
- olympe.sc.Transaction.prototype.execute=olympe.sc.Transaction.prototype.kb;olympe.sc.Transaction.prototype.afterExecution=olympe.sc.Transaction.prototype.Nm;olympe.sc.Transaction.prototype.merge=olympe.sc.Transaction.prototype.sn;olympe.sc.Transaction.prototype.model=olympe.sc.Transaction.prototype.model;olympe.sc.Transaction.prototype.setSource=olympe.sc.Transaction.prototype.li;olympe.sc.Transaction.prototype.persistInstance=olympe.sc.Transaction.prototype.wj;
941
- olympe.sc.Transaction.prototype.persist=olympe.sc.Transaction.prototype.persist;olympe.sc.Transaction.prototype.deleteAllRelations=olympe.sc.Transaction.prototype.Um;olympe.sc.Transaction.prototype.deleteRelation=olympe.sc.Transaction.prototype.ic;olympe.sc.Transaction.prototype.createRelation=olympe.sc.Transaction.prototype.Va;olympe.sc.Transaction.prototype['delete']=olympe.sc.Transaction.prototype.delete;olympe.sc.Transaction.prototype.multiUpdate=olympe.sc.Transaction.prototype.ay;
942
- olympe.sc.Transaction.prototype.update=olympe.sc.Transaction.prototype.update;olympe.sc.Transaction.prototype.create=olympe.sc.Transaction.prototype.create;olympe.sc.Transaction.prototype.getId=olympe.sc.Transaction.prototype.Z;olympe.sc.Transaction.process=olympe.sc.Transaction.process;olympe.sc.Transaction.from=olympe.sc.Transaction.from;olympe.sc.Le.BrickMetadata=olympe.dm.BrickMetadata;olympe.sc.Le.ze=olympe.dm.ze;olympe.ia.node.sa={};const Tj={client:'client',hostname:'host',port:'port',user:'user',password:'password',Oa:'database',schema:'schema',By:'pollingFrequency',Rv:'burstTransactionInterval',Yx:'minConnections',Xx:'maxConnections',Uv:'connectionsTimeout'},Uj=olympe.dc.ha.ja.pm,Vj=olympe.dc.ha.ja.rm,Wj=olympe.dc.ha.ja.QUERY_RESULT,Xj=olympe.dc.ha.ja.qm,Yj=olympe.dc.ha.ja.rg,Zj=olympe.dc.ha.ja.Vh,ak=olympe.dc.ha.ja.Ch,bk=olympe.dc.ha.ja.xi,ck=olympe.dc.ha.ja.Bh,dk=olympe.dc.ha.ja.jh,ek=olympe.dc.ha.ja.Ij,fk=olympe.dc.ha.ja.Iu;
943
- function gk(a,b,c,d,e){const f=new olympe.H.wa.gb.sb(a.tag,b),g=new olympe.sc.X.jt(a.N,a.hc,a.Ka);g.start(a.tag).catch(h=>a.N.error(`Error occurred while starting the file service of SQLConnector ${e}: ${h}`));f.listen().subscribe(h=>{var k=h.body();a.N.debug(`Serving a new message : ${k.t}`);switch(k.t){case Uj:var l=c.queryBuilder().withSchema(d);k=Ge(k.q);a.P(b,l,k,(t,u)=>{(u?h.Eg(Error(u)):h.we({t:Wj,r:t})).then()});break;case Vj:k=Ge(k.q);hk(a,b,()=>c.queryBuilder().withSchema(d),k,h);break;
944
- case fk:ik(b,k.i,h.source());h.Ik().then();break;case dk:k=(new olympe.dc.X.Oi(a.Lb())).C(k.p);jk(a,b,c,d,k,t=>(t?h.Eg(Error(t)):h.Ik()).then());break;case ck:l=k.i;k=(new olympe.dc.X.Oi(a.Lb())).C(k.p);kk(a,b,l,k,c,d);break;case Yj:const n=b.get('_subscription_cache');k=k.s.reduce((t,u)=>{n.has(u)?lk(n.get(u),h.source()):t.push(u);return t},[]);(0<k.length?h.Eg(Error(`These subscriptions was not kept alive: ${k}`)):h.Ik()).then();break;case Zj:const p=k.f;a.N.debug(`Uploading a file: ${p}`);k=vj(g,
945
- (t,u,v)=>{a.N.debug(`Received a file service upload request for file : ${u}`);return p!==u?Promise.reject('The file sent is not the same as the one initially requested'):v instanceof Uint8Array||'string'===typeof v?mk(a,b,c,d,p,v).then(()=>new olympe.net.rf('',olympe.net.ab.Mc.vl)):Promise.reject(`Try to upload content for file ${p} but body is not a Uint8Array or a string`)});h.we(k).then();break;case ak:const q=k.f;a.N.debug(`Serving a file: ${q}`);k=vj(g,(t,u)=>{a.N.debug(`File service received a download request for file : ${u}`);
946
- return q!==u?Promise.reject('The file to download is not the same as the one initially requested'):nk(b,c.queryBuilder().withSchema(d),q).then(v=>{a.N.debug('File service download request, content is:',v);return new olympe.net.rf(v,olympe.net.ab.Mc.bh)})});h.we(k).then();break;case bk:const r=k.f;a.N.debug(`Deleting a file: ${r}`);k=vj(g,(t,u)=>r!==u?Promise.reject('The file to download is not the same as the one initially requested'):Promise.resolve(new olympe.net.rf('',olympe.net.ab.Mc.bh)));h.we(k).then();
947
- break;default:h.Eg(Error(`Unsupported message type: ${k.t}`)).then()}})}function hk(a,b,c,d,e){const f=d.Z(),g=`sub${f}`;e.un(g).then(()=>{const h=b.get('_subscription_cache');let k=h.get(f);k||(k=new ok(f,d,c,b.get('_polling_frequency'),a.P.bind(a,b),a.Db.bind(a,g,f),()=>h.delete(f)),h.set(f,k));lk(k,e.source())}).catch(h=>e.Eg(Error(h)).then())}
948
- function ik(a,b,c){(a=a.get('_subscription_cache').get(b))&&(a.C.delete(c)||olympe.ta.Za('Subscription Cache').warn(`Try to unsubscribe to the subscription ${a.id} which is not registered.`))}function jk(a,b,c,d,e,f){b=b.get('_data_model_observer');a=new olympe.ia.node.sa.Ja.Nq(a.N,b);e.Oc(a);pk(a,c,d).then(()=>f(null)).catch(g=>f(g))}
949
- function kk(a,b,c,d,e,f){const g=`_burst.${c}`,h=b.get(g);null===h?(b.set(g,d),setTimeout(()=>{const k=b.get(g);b.remove(g);jk(a,b,e,f,k,l=>{l&&olympe.H.wa.gb.sb.publish(c,{t:ek,r:l})})},b.get('_burst_interval'))):d.Oc(h)}function mk(a,b,c,d,e,f){const g=olympe.ia.node.sa.Ja.ad.Qj,h=new olympe.dc.db.xc;h.F(e,(new Map).set(g,f),0);h.Va(olympe.dc.mc.Vc,e,olympe.dc.za(olympe.dm.File));return new Promise((k,l)=>{jk(a,b,c,d,h,n=>n?l(n):k())})}
950
- function nk(a,b,c){return x(function*(){var d=olympe.ia.node.sa.Ja.ad.Qj,e=olympe.ia.node.sa.Ja.ad.Nh;const f=yield qk(a.get('_data_model_observer').C,olympe.dc.za(olympe.dm.File));if((e=(yield b.from(f).select(d).where(e,c))[0])&&e[d])return d=e[d],d.buffer.slice(d.byteOffset,d.byteOffset+d.byteLength);throw Error(`File ${c} not found in the database`);})}
951
- olympe.ia.node.sa.Mq=class extends olympe.sc.logic.Yd{constructor(a,b,c,d){super(a,b,c);this.hc=d;this.Ka=olympe.U.getParameter(olympe.H.qb.jm)}update(a,[b]){var c=(k,l)=>{let n,p;return null!=(p=null!=(n=olympe.U.getParameter(`${'dbconnector'}.${b}.${k}`))?n:olympe.U.getParameter(`${'dbconnector'}.${k}`))?p:l};a.set('_burst_interval',olympe.U.getParameter(`${'dbconnector'}.${b}.${Tj.Rv}`)||5E3);a.set('_polling_frequency',c(Tj.By,6E5));const d=c(Tj.client,'pg'),e=c(Tj.hostname,''),f=c(Tj.Oa),g=c(Tj.schema,
952
- b),h=knex({client:d,connection:{host:e,port:c(Tj.port),user:c(Tj.user),password:c(Tj.password),database:f},pool:{min:c(Tj.Yx,0),max:c(Tj.Xx,10)},acquireConnectionTimeout:c(Tj.Uv,6E4)});this.N.info(`SQLConnector ${b} started with host ${e}, database ${f} on schema ${g}`);this.fc=olympe.ta.Za('sql');a.cg(()=>h.destroy().then());c=new olympe.ia.node.sa.Ja.Xs(h,g,this);a.set('_data_model_observer',c);a.set('_subscription_cache',new Map);gk(this,a,h,g,b)}P(a,b,c,d){a=a.get('_data_model_observer');const e=
953
- a.C,f=rk(e,c.Z()),g=new olympe.ia.node.sa.Ja.Fu(c,e);sk(a).then(()=>tk(g,f)).then(h=>{if(0===h.length)return[[],h];const k=uk(new olympe.ia.node.sa.Ja.Lq(g,b,h));this.fc.debug(`Sending a sql query with the following text: ${k.toString()}`);return k.then(l=>[l,h])}).then(([h,k])=>vk(f,h,k,e)).then(h=>{e.F.delete(f);d(h,null)}).catch(h=>d({},h))}Db(a,b,c){olympe.H.wa.gb.sb.publish(a,{t:Xj,i:b,r:c}).then().catch(d=>this.N.error('Error occurred while publishing query result update: '+d))}};
954
- olympe.ia.node.sa.Mq.O=olympe.dc.ya.C('017dc8db8074471acb7a',olympe.ia.node.sa.Mq,olympe.sc.R.Ea,olympe.net.R.Dk);function lk(a,b){a.C.has(b)?Ia(a.C,b):a.C.add(b)}
955
- class ok{constructor(a,b,c,d,e,f,g){this.id=a;this.query=b;a=new olympe.X.Cm(olympe.U.getParameter(olympe.bb.Config.Zl)+6E4);a.F=g;this.C=a;this.start(c,e,f,d)}start(a,b,c,d){let e=null,f=new Set;const g=()=>{0<this.C.values.size&&(b(a(),this.query,(h,k)=>{if(k)olympe.ta.Za('Subscription Cache').error(`Error occurred while updating subscription cache update: ${k}`);else if(k=olympe.X.pb(JSON.stringify(h)),k!==e){e=k;k=h.k;const l=[];k.forEach((n,p)=>{f.has(n)?f.delete(n):l.push(p)});h.a=l;h.r=Array.from(f);
956
- f=new Set(k);c(h)}}),setTimeout(g,d))};setTimeout(g,d)}};olympe.ia.node.sa.Ja={};olympe.ia.node.sa.Ja.yc={EQUAL:'equal',Qq:'substring',Ro:'filter',Cp:'<=',Dp:'<',ep:'>=',fp:'>',gg:'and',Mh:'or',ah:'not',zq:'regex'};olympe.ia.node.sa.Ja.ad={Nh:'tagOlympe',gk:'tagOlympeOrig',Al:'tagOlympeDest',Qj:'fileContent'};const wk=olympe.ia.node.sa.Ja.ad.gk,xk=olympe.ia.node.sa.Ja.ad.Al,yk=olympe.ia.node.sa.Ja.ad.Nh,zk=olympe.ia.node.sa.Ja.ad.Qj;function sk(a){return new Promise(b=>{0<a.F?a.P.add(()=>b()):b()})}
957
- function Ak(a){Bk(a,olympe.dc.za(olympe.dm.File));const b=new Map;a.G.ub(olympe.sc.logic.Yd.C).observe(a.K).subscribe(c=>{Ke(c).forEach(d=>{const e=d.T();Ck(a,()=>{var g=Dk;const h=[{name:yk,af:yk,Uk:!1}];e===olympe.dc.za(olympe.dm.File)&&h.push({name:zk,af:zk,Uk:!1});return g(a,e,e,h)},`Create Table for ${e}`);const f=new olympe.D.$b('Business model context',a.K);b.set(e,f);f.run(()=>Ek(a,f,e))});Le(c).forEach(d=>{b.get(d).destroy();Ck(a,()=>Fk(a,d),`Delete Table for ${d}`)})})}
958
- function Gk(a){a.F++;1===a.F&&a.N.debug('Data model observer is busy')}function Hk(a){a.F--;if(0===a.F){a.N.debug('Data model observer is free');for(const b of a.P)b();a.P.clear()}}function Bk(a,b){if(!a.db.Vk(a.G,olympe.sc.logic.Yd.C,b)){Gk(a);const c=new olympe.dc.Transaction;c.Va(olympe.sc.logic.Yd.C,a.G,b);c.kb((d,e)=>{d||a.N.error(`Error while linking the business model ${b} to the SQLConnector: ${e}`);Hk(a)},!0)}}function Ik(a){return a.client.schema.withSchema(a.schema)}
959
- function Ck(a,b,c){if(!a.K.$()&&!a.K.G()){a.N.debug(`Push operation:${c}`);Gk(a);var d=a.V,e=()=>{d.shift();Hk(a);if(0<d.length)d[0]()},f=()=>{b().then(()=>{a.N.debug(`Operation ${c} succeed`);e()}).catch(g=>{a.N.error(`Error for operation ${c}: ${g}`);e()})};d.push(f);1===d.length&&f()}}
960
- function Dk(a,b,c,d){return x(function*(){if(yield Ik(a).hasTable(b))return a.N.debug(`Table ${c} already exist`),Promise.resolve().then(()=>{var e=a.C;e.C.set(c,b);e.G.set(b,c)});a.N.debug('Create table for : '+c);return Ik(a).createTable(b,e=>{d.forEach(({name:f,af:g,Br:h,ls:k,Uk:l})=>{Jk(a,e,f,g,l,k,h)})}).then(()=>{var e=a.C;e.C.set(c,b);e.G.set(b,c)})})}
961
- function Ek(a,b,c){b.onDestroy(()=>{Ck(a,()=>Promise.all(Array.from(a.Pa.get(c)).map(d=>Fk(a,d))).then(()=>{a.Pa.delete(c)}),`Destroy relation tables of business model ${c}: relations: ${a.Pa.get(c)}`)});a.vn(c,b);a.Pa.set(c,new Set);olympe.dc.hb.from(c).ub(olympe.dc.CloudObject.G).Hf().ub(olympe.dm.Relation.destinationModelRel).Hf().filter((new olympe.dc.ea.W.He(a.G)).ub(olympe.sc.logic.Yd.C.zc())).observe(b).subscribe(d=>{0<Ke(d).length&&(a.N.debug('Handle new relations : '+Ke(d)),Ck(a,()=>Promise.all(Ke(d).map(([e,
962
- f])=>{a.Pa.get(c).add(e.T());a.Pa.get(f.T()).add(e.T());e=e.T();var g=Dk;f=f.T();return g(a,e,e,[{name:wk,af:wk,ls:c,Br:yk,Uk:!0},{name:xk,af:xk,ls:f,Br:yk,Uk:!0}])})).then(),`Add relation tables for business model ${c}: ${Ke(d)}`));0<Le(d).length&&(a.N.debug('Handle relations to remove : '+Le(d)),Ck(a,()=>Promise.all(Le(d).map(([e,f])=>{a.Pa.get(c).delete(e);a.Pa.get(f).delete(e);return Fk(a,e)})).then(),`Delete relation tables for business model ${c}: ${Le(d)}`))})}
932
+ olympe.sc.workflow.Transition.prototype.C.L=new olympe.D.J(()=>olympe.sc.workflow.Se,[]);olympe.sc.workflow.Transition.prototype.G.L=new olympe.D.J(()=>olympe.sc.workflow.Se,[]);olympe.sc.workflow.Workflow=class extends olympe.dm.BrickMetadata{Ye(){return olympe.sc.Le.wg.Oj}G(){return this.Fg(olympe.sc.workflow.Workflow.serializationEnabledProp)}C(){return this.oc(olympe.sc.workflow.Workflow.dataTypeRel,olympe.sc.hf)}F(){return this.oc(olympe.sc.workflow.Workflow.initialStateRel,olympe.sc.workflow.Se)}};olympe.sc.workflow.Workflow.O=olympe.dc.ya.C('017ffdc010e5bcc9c971',olympe.sc.workflow.Workflow);olympe.sc.workflow.Workflow.serializationEnabledProp=olympe.sc.workflow.Workflow.O.xa('017ffdc010e5bcc9c972');
933
+ olympe.sc.workflow.Workflow.dataTypeRel=olympe.sc.workflow.Workflow.O.Ga('017ffdc010e5bcc9c973');olympe.sc.workflow.Workflow.statesRel=olympe.sc.workflow.Workflow.O.Ga('017ffdc010e5bcc9c974');olympe.sc.workflow.Workflow.initialStateRel=olympe.sc.workflow.Workflow.O.Ga('017ffdc010e5bcc9c975');olympe.sc.workflow.Workflow.prototype.G.L=olympe.D.J.P;olympe.sc.workflow.Workflow.prototype.C.L=new olympe.D.J(()=>olympe.sc.hf,[]);
934
+ olympe.sc.workflow.Workflow.prototype.F.L=new olympe.D.J(()=>olympe.sc.workflow.Se,[]);olympe.sc.Ma={};olympe.sc.Ma.Me=class extends olympe.sc.mb{Ye(){return olympe.sc.Le.wg.Xu}};olympe.sc.Ma.Me.O=Uc(olympe.dc.ya.C('01120300000000adef00',olympe.sc.Ma.Me));olympe.sc.Ma.Me.C=olympe.sc.Ma.Me.O.Ga('0171bc1f15da96dfdb89');P(olympe.dm.Xc.O,olympe.sc.Ma.Me.C);olympe.sc.Ma.oi=class extends olympe.sc.Runnable{F(){return[this.Lb()]}P(){return olympe.dc.md.from(this.Lb()).ub(olympe.sc.Ma.Me.C).Pc()}};olympe.sc.Ma.oi.O=Uc(olympe.dc.ya.C('0113030000000aca1100',olympe.sc.Ma.oi));olympe.sc.Ma.oi.prototype.P.L=new olympe.D.J(()=>olympe.dm.Nb,[]);olympe.sc.Ma.vb=class extends olympe.dc.CloudObject{$t(){return this.Fg(olympe.sc.Ma.vb.F)}hy(){return this.Fg(olympe.sc.Ma.vb.fb)}Rd(){return this.ge(olympe.sc.Ma.vb.C)}Mw(){return this.Ab(olympe.sc.Ma.vb.$)}ox(){return this.Ab(olympe.sc.Ma.vb.Wa)}nx(){return this.Ab(olympe.sc.Ma.vb.Fa)}dn(){this.Ab(olympe.sc.Ma.vb.Ka)}Zw(){return this.Ab(olympe.sc.Ma.vb.ba)}vw(){return this.Ab(olympe.sc.Ma.vb.K)}mx(){return this.Ab(olympe.sc.Ma.vb.qa)}Zt(){return this.Ab(olympe.sc.Ma.vb.V)}};
935
+ olympe.sc.Ma.vb.O=olympe.dc.ya.C('011203300000000adef5',olympe.sc.Ma.vb);olympe.sc.Ma.vb.F=olympe.sc.Ma.vb.O.xa('011203300000000adef6');olympe.sc.Ma.vb.fb=olympe.sc.Ma.vb.O.xa('011203300000000adef7');olympe.sc.Ma.vb.C=olympe.sc.Ma.vb.O.xa('011203300000000adef8');olympe.sc.Ma.vb.$=olympe.sc.Ma.vb.O.xa('011203300000000adef9');olympe.sc.Ma.vb.Wa=olympe.sc.Ma.vb.O.xa('011203300000000adefa');olympe.sc.Ma.vb.Fa=olympe.sc.Ma.vb.O.xa('011203300000000adefb');olympe.sc.Ma.vb.K=olympe.sc.Ma.vb.O.xa('011203300000000adefc');
936
+ olympe.sc.Ma.vb.Ka=olympe.sc.Ma.vb.O.xa('011203300000000adefd');olympe.sc.Ma.vb.ba=olympe.sc.Ma.vb.O.xa('011203300000000adefe');olympe.sc.Ma.vb.qa=olympe.sc.Ma.vb.O.xa('011203300000000adeff');olympe.sc.Ma.vb.V=olympe.sc.Ma.vb.O.xa('011203300000000adee0');olympe.sc.Ma.vb.xb={INIT:0,zz:1,uk:2,tk:3,Am:4,GB:5,cc:9};m=olympe.sc.Ma.vb.prototype;m.$t.L=olympe.D.J.P;m.hy.L=olympe.D.J.P;m.Rd.L=olympe.D.J.G;m.Mw.L=olympe.D.J.F;m.ox.L=olympe.D.J.F;m.nx.L=olympe.D.J.F;m.dn.L=olympe.D.J.F;m.Zw.L=olympe.D.J.F;
937
+ m.vw.L=olympe.D.J.F;m.mx.L=olympe.D.J.F;m.Zt.L=olympe.D.J.F;olympe.sc.Ma.Ol=class extends olympe.sc.Ma.oi{qa(){return!0}};olympe.sc.Ma.Ol.O=olympe.dc.ya.C('0113032000000aca1102',olympe.sc.Ma.Ol,olympe.sc.R.Ea);olympe.sc.Ma.fh=class extends olympe.sc.Ma.Me{C(){return(new olympe.dc.dk(this.T(),olympe.sc.Ma.vb)).ub(olympe.sc.Ma.fh.ba).tf().Rc()}};olympe.sc.Ma.fh.O=olympe.dc.ya.C('011203300000000adef3',olympe.sc.Ma.fh);olympe.sc.Ma.fh.ba=olympe.sc.Ma.fh.O.Ga('011203300000000adef4');P(olympe.sc.Ma.vb.O,olympe.sc.Ma.fh.ba);olympe.sc.Ma.fh.prototype.C.L=new olympe.D.J(()=>olympe.sc.Ma.vb,[]);olympe.sc.hh=class extends olympe.dc.CloudObject{static get(){return olympe.dc.CloudObject.get('011203300000000adf0f')}};olympe.sc.hh.O=olympe.dc.ya.C('011203300000000adf00',olympe.sc.hh);olympe.sc.hh.F=olympe.sc.hh.O.xa('011203300000000adf01');olympe.sc.hh.C=olympe.sc.hh.O.xa('011203300000000adf02');olympe.sc.hh.K='011203300000000adf0f';olympe.sc.Jz=class{};olympe.sc.ye=class extends olympe.sc.Runnable{Ka(){return this.tb(olympe.sc.ye.G,olympe.sc.Runnable)}P(){return this.tb(olympe.sc.ye.C,olympe.dm.Property)}};olympe.sc.ye.O=Uc(olympe.dc.ya.C('016c2d996d9ca27fa9d8',olympe.sc.ye));olympe.sc.ye.G=olympe.sc.ye.O.Ga('016c3cb7742ec9309e0b');olympe.sc.ye.C=olympe.sc.ye.O.Ga('016c42d3454636f90533');olympe.sc.ye.prototype.Ka.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.ye.prototype.P.L=new olympe.D.J(()=>olympe.dc.Da,[]);olympe.sc.Lo=class extends olympe.dm.Pb{Ye(){return olympe.sc.Le.wg.Oj}};olympe.sc.Lo.O=olympe.dc.ya.C('017a7a9ff057958e5678',olympe.sc.Lo);olympe.sc.Sp=class extends olympe.dm.Pb{Ye(){return olympe.sc.Le.wg.tv}};olympe.sc.Sp.O=olympe.dc.ya.C('01644b6d4543b344b857',olympe.sc.Sp);olympe.sc.Tp=class extends olympe.dc.CloudObject{};olympe.sc.Tp.O=olympe.dc.ya.C('0162f672366be5ca7a86',olympe.sc.Tp);olympe.sc.Wq=class extends olympe.sc.ye{};olympe.sc.Wq.O=olympe.dc.ya.C('016d3f37610ae4fc3962',olympe.sc.Wq);olympe.sc.Rh=class extends olympe.dm.BrickMetadata{Ye(){return olympe.sc.Le.wg.Oj}};olympe.sc.Rh.O=olympe.dc.ya.C('01645fe6873aeea59e64',olympe.sc.Rh);olympe.sc.Rh.C=olympe.sc.Rh.O.Ga('017ed8ac775f48d4d589');olympe.sc.Rh.F=olympe.sc.Rh.O.Ga('017ed8ac775f48d4d590');olympe.sc.Text=class extends olympe.dm.String{};olympe.sc.Text.O=olympe.dc.ya.C('016cfca73e63f9ab5ba4',olympe.sc.Text);olympe.sc.Transaction=class{constructor(a=!0){this.C=(new olympe.dc.Transaction).persist(a);this.G=new Map;this.F=[];this.source=olympe.dc.Ia.kc}static from(a){const b=olympe.sc.Ra.C.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Transaction}static process(a,b){return a.has(olympe.sc.Ra.C.TRANSACTION,!0)?Promise.resolve(!1):b.kb().then(()=>!0)}Z(){return this.C.Z()}create(a,b=new Map,c=this.source,d){d=this.C.create(a,d).ki(c);this.G.set(d.T(),olympe.dc.za(a));for(const [e,f]of b)d.setProperty(e,
938
+ f);c===olympe.dc.Ia.Lc&&(b=olympe.dc.La(),b=null!==Gj?b.mj(Gj,[olympe.sc.Ma.Me.C,olympe.sc.hd.F.zc()])[0]||null:null,null!==b?this.Va(olympe.sc.hd.K,b,d):olympe.ta.Za('sc').warn('No business container for new instance of',olympe.dc.za(a)));a=d.T();this.F.push(a);return a}update(a,b,c){this.C.update(a,b,c);return this}ey(a,b){a=this.C.update(a);for(const [c,d]of b)a.setProperty(c,d);return this}delete(a){this.C.delete(a);return this}Va(a,b,c){this.C.Va(a,b,c);return this}hc(a,b,c){this.C.hc(a,b,c);
939
+ return this}Vm(a,b){this.C.Vm(a,b);return this}persist(a=!0){this.C.persist(a);return this}xj(a,b=!0){this.C.xj(a,b);return this}ki(a){this.source=a;return this}model(a){return this.G.get(olympe.dc.za(a))||olympe.dc.La().model(a)}tn(a){oe(this.C,a.C);return this}Om(a){this.C.Om(a);return this}kb(){return new Promise((a,b)=>{this.C.kb((c,d)=>{c?a(new olympe.sc.Wi(this.F)):b(d)})})}Ym(){return new Promise((a,b)=>{this.C.Ym((c,d)=>{c?a(new olympe.sc.Wi(this.F)):b(d)})})}};
940
+ olympe.sc.Transaction.prototype.executeAsLarge=olympe.sc.Transaction.prototype.Ym;olympe.sc.Transaction.prototype.execute=olympe.sc.Transaction.prototype.kb;olympe.sc.Transaction.prototype.afterExecution=olympe.sc.Transaction.prototype.Om;olympe.sc.Transaction.prototype.merge=olympe.sc.Transaction.prototype.tn;olympe.sc.Transaction.prototype.model=olympe.sc.Transaction.prototype.model;olympe.sc.Transaction.prototype.setSource=olympe.sc.Transaction.prototype.ki;
941
+ olympe.sc.Transaction.prototype.persistInstance=olympe.sc.Transaction.prototype.xj;olympe.sc.Transaction.prototype.persist=olympe.sc.Transaction.prototype.persist;olympe.sc.Transaction.prototype.deleteAllRelations=olympe.sc.Transaction.prototype.Vm;olympe.sc.Transaction.prototype.deleteRelation=olympe.sc.Transaction.prototype.hc;olympe.sc.Transaction.prototype.createRelation=olympe.sc.Transaction.prototype.Va;olympe.sc.Transaction.prototype['delete']=olympe.sc.Transaction.prototype.delete;
942
+ olympe.sc.Transaction.prototype.multiUpdate=olympe.sc.Transaction.prototype.ey;olympe.sc.Transaction.prototype.update=olympe.sc.Transaction.prototype.update;olympe.sc.Transaction.prototype.create=olympe.sc.Transaction.prototype.create;olympe.sc.Transaction.prototype.getId=olympe.sc.Transaction.prototype.Z;olympe.sc.Transaction.process=olympe.sc.Transaction.process;olympe.sc.Transaction.from=olympe.sc.Transaction.from;olympe.sc.Wi=class{constructor(a){this.C=a}Dw(){return this.C.map(olympe.dc.CloudObject.get)}};olympe.sc.Wi.prototype.getCreatedObjects=olympe.sc.Wi.prototype.Dw;olympe.sc.Le.BrickMetadata=olympe.dm.BrickMetadata;olympe.sc.Le.ze=olympe.dm.ze;olympe.ia.node.sa={};const Tj={client:'client',hostname:'host',port:'port',user:'user',password:'password',Oa:'database',schema:'schema',Dy:'pollingFrequency',Sv:'burstTransactionInterval',$x:'minConnections',Zx:'maxConnections',Vv:'connectionsTimeout'},Uj=olympe.dc.ha.ja.qm,Vj=olympe.dc.ha.ja.sm,Wj=olympe.dc.ha.ja.QUERY_RESULT,Xj=olympe.dc.ha.ja.rm,Yj=olympe.dc.ha.ja.og,Zj=olympe.dc.ha.ja.Uh,ak=olympe.dc.ha.ja.Ch,bk=olympe.dc.ha.ja.wi,ck=olympe.dc.ha.ja.Bh,dk=olympe.dc.ha.ja.ih,ek=olympe.dc.ha.ja.Jj,fk=olympe.dc.ha.ja.Ju;
943
+ function gk(a,b,c,d,e){const f=new olympe.H.wa.gb.sb(a.tag,b),g=new olympe.sc.X.kt(a.N,a.mc,a.Ka);g.start(a.tag).catch(h=>a.N.error(`Error occurred while starting the file service of SQLConnector ${e}: ${h}`));f.listen().subscribe(h=>{var k=h.body();a.N.debug(`Serving a new message : ${k.t}`);switch(k.t){case Uj:var l=c.queryBuilder().withSchema(d);k=Ge(k.q);a.P(b,l,k,(t,u)=>{(u?h.Bg(Error(u)):h.we({t:Wj,r:t})).then()});break;case Vj:k=Ge(k.q);hk(a,b,()=>c.queryBuilder().withSchema(d),k,h);break;
944
+ case fk:ik(b,k.i,h.source());h.Jk().then();break;case dk:k=(new olympe.dc.X.Oi(a.Lb())).C(k.p);jk(a,b,c,d,k,t=>(t?h.Bg(Error(t)):h.Jk()).then());break;case ck:l=k.i;k=(new olympe.dc.X.Oi(a.Lb())).C(k.p);kk(a,b,l,k,c,d);break;case Yj:const n=b.get('_subscription_cache');k=k.s.reduce((t,u)=>{n.has(u)?lk(n.get(u),h.source()):t.push(u);return t},[]);(0<k.length?h.Bg(Error(`These subscriptions was not kept alive: ${k}`)):h.Jk()).then();break;case Zj:const p=k.f;a.N.debug(`Uploading a file: ${p}`);k=vj(g,
945
+ (t,u,v)=>{a.N.debug(`Received a file service upload request for file : ${u}`);return p!==u?Promise.reject('The file sent is not the same as the one initially requested'):v instanceof Uint8Array||'string'===typeof v?mk(a,b,c,d,p,v).then(()=>new olympe.net.qf('',olympe.net.ab.Mc.wl)):Promise.reject(`Try to upload content for file ${p} but body is not a Uint8Array or a string`)});h.we(k).then();break;case ak:const q=k.f;a.N.debug(`Serving a file: ${q}`);k=vj(g,(t,u)=>{a.N.debug(`File service received a download request for file : ${u}`);
946
+ return q!==u?Promise.reject('The file to download is not the same as the one initially requested'):nk(b,c.queryBuilder().withSchema(d),q).then(v=>{a.N.debug('File service download request, content is:',v);return new olympe.net.qf(v,olympe.net.ab.Mc.ah)})});h.we(k).then();break;case bk:const r=k.f;a.N.debug(`Deleting a file: ${r}`);k=vj(g,(t,u)=>r!==u?Promise.reject('The file to download is not the same as the one initially requested'):Promise.resolve(new olympe.net.qf('',olympe.net.ab.Mc.ah)));h.we(k).then();
947
+ break;default:h.Bg(Error(`Unsupported message type: ${k.t}`)).then()}})}function hk(a,b,c,d,e){const f=d.Z(),g=`sub${f}`;e.vn(g).then(()=>{const h=b.get('_subscription_cache');let k=h.get(f);k||(k=new ok(f,d,c,b.get('_polling_frequency'),a.P.bind(a,b),a.Fb.bind(a,g,f),()=>h.delete(f)),h.set(f,k));lk(k,e.source())}).catch(h=>e.Bg(Error(h)).then())}
948
+ function ik(a,b,c){(a=a.get('_subscription_cache').get(b))&&(a.C.delete(c)||olympe.ta.Za('Subscription Cache').warn(`Try to unsubscribe to the subscription ${a.id} which is not registered.`))}function jk(a,b,c,d,e,f){b=b.get('_data_model_observer');a=new olympe.ia.node.sa.Ja.Oq(a.N,b);e.Oc(a);pk(a,c,d).then(()=>f(null)).catch(g=>f(g))}
949
+ function kk(a,b,c,d,e,f){const g=`_burst.${c}`,h=b.get(g);null===h?(b.set(g,d),setTimeout(()=>{const k=b.get(g);b.remove(g);jk(a,b,e,f,k,l=>{l&&olympe.H.wa.gb.sb.publish(c,{t:ek,r:l})})},b.get('_burst_interval'))):d.Oc(h)}function mk(a,b,c,d,e,f){const g=olympe.ia.node.sa.Ja.ad.Rj,h=new olympe.dc.db.xc;h.F(e,(new Map).set(g,f),0);h.Va(olympe.dc.lc.Vc,e,olympe.dc.za(olympe.dm.File));return new Promise((k,l)=>{jk(a,b,c,d,h,n=>n?l(n):k())})}
950
+ function nk(a,b,c){return x(function*(){var d=olympe.ia.node.sa.Ja.ad.Rj,e=olympe.ia.node.sa.Ja.ad.Mh;const f=yield qk(a.get('_data_model_observer').C,olympe.dc.za(olympe.dm.File));if((e=(yield b.from(f).select(d).where(e,c))[0])&&e[d])return d=e[d],d.buffer.slice(d.byteOffset,d.byteOffset+d.byteLength);throw Error(`File ${c} not found in the database`);})}
951
+ olympe.ia.node.sa.Nq=class extends olympe.sc.logic.Xd{constructor(a,b,c,d){super(a,b,c);this.mc=d;this.Ka=olympe.U.getParameter(olympe.H.qb.km)}update(a,[b]){var c=(k,l)=>{let n,p;return null!=(p=null!=(n=olympe.U.getParameter(`${'dbconnector'}.${b}.${k}`))?n:olympe.U.getParameter(`${'dbconnector'}.${k}`))?p:l};a.set('_burst_interval',olympe.U.getParameter(`${'dbconnector'}.${b}.${Tj.Sv}`)||5E3);a.set('_polling_frequency',c(Tj.Dy,6E5));const d=c(Tj.client,'pg'),e=c(Tj.hostname,''),f=c(Tj.Oa),g=c(Tj.schema,
952
+ b),h=knex({client:d,connection:{host:e,port:c(Tj.port),user:c(Tj.user),password:c(Tj.password),database:f},pool:{min:c(Tj.$x,0),max:c(Tj.Zx,10)},acquireConnectionTimeout:c(Tj.Vv,6E4)});this.N.info(`SQLConnector ${b} started with host ${e}, database ${f} on schema ${g}`);this.fc=olympe.ta.Za('sql');a.Og(()=>h.destroy().then());c=new olympe.ia.node.sa.Ja.Ys(h,g,this);a.set('_data_model_observer',c);a.set('_subscription_cache',new Map);gk(this,a,h,g,b)}P(a,b,c,d){a=a.get('_data_model_observer');const e=
953
+ a.C,f=rk(e,c.Z()),g=new olympe.ia.node.sa.Ja.Gu(c,e);sk(a).then(()=>tk(g,f)).then(h=>{if(0===h.length)return[[],h];const k=uk(new olympe.ia.node.sa.Ja.Mq(g,b,h));this.fc.debug(`Sending a sql query with the following text: ${k.toString()}`);return k.then(l=>[l,h])}).then(([h,k])=>vk(f,h,k,e)).then(h=>{e.F.delete(f);d(h,null)}).catch(h=>d({},h))}Fb(a,b,c){olympe.H.wa.gb.sb.publish(a,{t:Xj,i:b,r:c}).then().catch(d=>this.N.error('Error occurred while publishing query result update: '+d))}};
954
+ olympe.ia.node.sa.Nq.O=olympe.dc.ya.C('017dc8db8074471acb7a',olympe.ia.node.sa.Nq,olympe.sc.R.Ea,olympe.net.R.Ek);function lk(a,b){a.C.has(b)?Ia(a.C,b):a.C.add(b)}
955
+ class ok{constructor(a,b,c,d,e,f,g){this.id=a;this.query=b;a=new olympe.X.Dm(olympe.U.getParameter(olympe.bb.Config.$l)+6E4);a.F=g;this.C=a;this.start(c,e,f,d)}start(a,b,c,d){let e=null,f=new Set;const g=()=>{0<this.C.values.size&&(b(a(),this.query,(h,k)=>{if(k)olympe.ta.Za('Subscription Cache').error(`Error occurred while updating subscription cache update: ${k}`);else if(k=olympe.X.pb(JSON.stringify(h)),k!==e){e=k;k=h.k;const l=[];k.forEach((n,p)=>{f.has(n)?f.delete(n):l.push(p)});h.a=l;h.r=Array.from(f);
956
+ f=new Set(k);c(h)}}),setTimeout(g,d))};setTimeout(g,d)}};olympe.ia.node.sa.Ja={};olympe.ia.node.sa.Ja.yc={EQUAL:'equal',Rq:'substring',So:'filter',Dp:'<=',Ep:'<',fp:'>=',gp:'>',dg:'and',Lh:'or',$g:'not',Aq:'regex'};olympe.ia.node.sa.Ja.ad={Mh:'tagOlympe',hk:'tagOlympeOrig',Bl:'tagOlympeDest',Rj:'fileContent'};const wk=olympe.ia.node.sa.Ja.ad.hk,xk=olympe.ia.node.sa.Ja.ad.Bl,yk=olympe.ia.node.sa.Ja.ad.Mh,zk=olympe.ia.node.sa.Ja.ad.Rj;function sk(a){return new Promise(b=>{0<a.F?a.P.add(()=>b()):b()})}
957
+ function Ak(a){Bk(a,olympe.dc.za(olympe.dm.File));const b=new Map;a.G.ub(olympe.sc.logic.Xd.C).observe(a.K).subscribe(c=>{Ke(c).forEach(d=>{const e=d.T();Ck(a,()=>{var g=Dk;const h=[{name:yk,$e:yk,Vk:!1}];e===olympe.dc.za(olympe.dm.File)&&h.push({name:zk,$e:zk,Vk:!1});return g(a,e,e,h)},`Create Table for ${e}`);const f=new olympe.D.Xb('Business model context',a.K);b.set(e,f);f.run(()=>Ek(a,f,e))});Le(c).forEach(d=>{b.get(d).destroy();Ck(a,()=>Fk(a,d),`Delete Table for ${d}`)})})}
958
+ function Gk(a){a.F++;1===a.F&&a.N.debug('Data model observer is busy')}function Hk(a){a.F--;if(0===a.F){a.N.debug('Data model observer is free');for(const b of a.P)b();a.P.clear()}}function Bk(a,b){if(!a.db.Wk(a.G,olympe.sc.logic.Xd.C,b)){Gk(a);const c=new olympe.dc.Transaction;c.Va(olympe.sc.logic.Xd.C,a.G,b);c.kb((d,e)=>{d||a.N.error(`Error while linking the business model ${b} to the SQLConnector: ${e}`);Hk(a)},!0)}}function Ik(a){return a.client.schema.withSchema(a.schema)}
959
+ function Ck(a,b,c){if(!a.K.$()&&!a.K.C()){a.N.debug(`Push operation:${c}`);Gk(a);var d=a.V,e=()=>{d.shift();Hk(a);if(0<d.length)d[0]()},f=()=>{b().then(()=>{a.N.debug(`Operation ${c} succeed`);e()}).catch(g=>{a.N.error(`Error for operation ${c}: ${g}`);e()})};d.push(f);1===d.length&&f()}}
960
+ function Dk(a,b,c,d){return x(function*(){if(yield Ik(a).hasTable(b))return a.N.debug(`Table ${c} already exist`),Promise.resolve().then(()=>{var e=a.C;e.C.set(c,b);e.G.set(b,c)});a.N.debug('Create table for : '+c);return Ik(a).createTable(b,e=>{d.forEach(({name:f,$e:g,Cr:h,ms:k,Vk:l})=>{Jk(a,e,f,g,l,k,h)})}).then(()=>{var e=a.C;e.C.set(c,b);e.G.set(b,c)})})}
961
+ function Ek(a,b,c){b.onDestroy(()=>{Ck(a,()=>Promise.all(Array.from(a.Pa.get(c)).map(d=>Fk(a,d))).then(()=>{a.Pa.delete(c)}),`Destroy relation tables of business model ${c}: relations: ${a.Pa.get(c)}`)});a.wn(c,b);a.Pa.set(c,new Set);olympe.dc.hb.from(c).ub(olympe.dc.CloudObject.G).Ff().ub(olympe.dm.Relation.destinationModelRel).Ff().filter((new olympe.dc.ea.W.He(a.G)).ub(olympe.sc.logic.Xd.C.zc())).observe(b).subscribe(d=>{0<Ke(d).length&&(a.N.debug('Handle new relations : '+Ke(d)),Ck(a,()=>Promise.all(Ke(d).map(([e,
962
+ f])=>{a.Pa.get(c).add(e.T());a.Pa.get(f.T()).add(e.T());e=e.T();var g=Dk;f=f.T();return g(a,e,e,[{name:wk,$e:wk,ms:c,Cr:yk,Vk:!0},{name:xk,$e:xk,ms:f,Cr:yk,Vk:!0}])})).then(),`Add relation tables for business model ${c}: ${Ke(d)}`));0<Le(d).length&&(a.N.debug('Handle relations to remove : '+Le(d)),Ck(a,()=>Promise.all(Le(d).map(([e,f])=>{a.Pa.get(c).delete(e);a.Pa.get(f).delete(e);return Fk(a,e)})).then(),`Delete relation tables for business model ${c}: ${Le(d)}`))})}
963
963
  function Fk(a,b){return x(function*(){try{var c=yield qk(a.C,b)}catch(d){a.N.warn(`Try to delete a table not registered: ${d}`);return}if(yield Ik(a).hasTable(c)){Ik(a).dropTable(c);c=a.C;const d=c.C.get(b);c.G.delete(d)||c.C.delete(b)}})}
964
964
  function Kk(a,b,c,d){return x(function*(){const e=yield qk(a.C,b),f=yield Promise.all(c.map(k=>Promise.resolve(k))),g=yield Promise.all(d.map(k=>Promise.resolve(k))),h=yield a.client.queryBuilder().withSchema(a.schema).table(e).columnInfo();return Ik(a).table(e,k=>{const l=new Set(Object.keys(h));f.forEach((n,p)=>{!l.has(n)&&Jk(a,k,n,c[p])});g.forEach(n=>{l.has(n)&&k.dropColumn(n)})})})}
965
- function Jk(a,b,c,d,e=!1,f='',g=''){if(c===yk)b.string(c,21).primary();else if(c===wk||c===xk){if(e)b.string(c).notNullable().references(g).inTable(`${a.schema}.${f}`).onDelete('CASCADE')}else c===zk?b.binary(c):d&&(a=a.db,d=olympe.dc.md.from(d).ub(olympe.dm.Property.typeRel).Pc(),a.Zf(d,olympe.dm.String)?b.string(c,1E3):a.Zf(d,olympe.dm.Number)?b.double(c):a.Zf(d,olympe.dm.Boolean)?b.boolean(c):a.Zf(d,olympe.dm.DateTime)?b.string(c):a.Zf(d,olympe.dm.Color)&&b.string(c,50))}
966
- olympe.ia.node.sa.Ja.Xs=class{constructor(a,b,c){this.N=olympe.ta.Za('sql');this.client=a;this.schema=b;this.G=c;this.C=new olympe.ia.node.sa.Ja.qv;this.K=new olympe.D.$b(`Data Model Observer of ${c.T()}`);this.V=[];this.F=0;this.Pa=new Map;this.P=new Set;this.db=olympe.dc.La();Ak(this)}vn(a,b){this.N.debug('Observe properties for '+a);olympe.dc.hb.from(a).ub(olympe.dc.CloudObject.propertyRel).observe(b).subscribe(c=>{this.N.debug('New properties for '+a+' '+Ke(c));Ck(this,()=>Kk(this,a,Ke(c).map(d=>
967
- d.T()),Le(c)),`Update columns of ${a}: added: ${Ke(c)}, removed: ${Le(c)}`)})}};const Lk=olympe.ia.node.sa.Ja.yc.EQUAL,Mk=olympe.ia.node.sa.Ja.yc.gg,Nk=olympe.ia.node.sa.Ja.yc.Mh,Ok=olympe.ia.node.sa.Ja.yc.ah,Pk=olympe.ia.node.sa.Ja.yc.Ro,Qk=olympe.ia.node.sa.Ja.yc.ep,Rk=olympe.ia.node.sa.Ja.yc.fp,Sk=olympe.ia.node.sa.Ja.yc.Cp,Tk=olympe.ia.node.sa.Ja.yc.Dp,Uk=olympe.ia.node.sa.Ja.yc.zq,Vk=olympe.ia.node.sa.Ja.yc.Qq,Wk=olympe.ia.node.sa.Ja.ad.Nh;
968
- function tk(a,b){return x(function*(){var c=a.query.G;let d=c;var e=[];const f=a.query.C;let g=olympe.dc.La().qj(c);!g&&f[0]instanceof olympe.dc.ea.Ib.mf&&(g=f[0].Rd().nb(olympe.dc.CloudObject.instancesRel));if(g){try{var h=yield qk(a.F,c)}catch(n){return[]}g=!0;f.shift()}else{try{var k=yield a.F.Lb(c,'')}catch(n){return[]}d=k;h=yield Promise.resolve([['tagOlympe',c]]);1<h.length?e.push(['',Mk,h.map(([n,p])=>[n,Lk,Xk(p)])]):e.push([h[0][0],Lk,Xk(h[0][1])]);h=yield qk(a.F,k)}k=Yk(a,h);c=Array.from(a.query.F);
969
- c=c.includes(0)||c.includes(1)&&g;var l=[];if(c){const n=Zk(a.F,b,d,Wk);l=olympe.dc.hb.from(d).ub(olympe.dc.CloudObject.propertyRel).Pc().map(q=>q.T());const p=yield Promise.all(l.map(q=>Promise.resolve(q)));l=l.map(q=>Zk(a.F,b,d,q)).map((q,r)=>[q,p[r]]);l.unshift([n,Wk])}a.G.limit=a.query.max;a.G.offset=a.query.offset;a.C.push({Qg:c,recursive:!1,filters:e,nh:'',ei:'',bi:l,kh:k,name:h});e=0;for(const n of f)e=yield $k(a,b,n,e,g);return a.C})}
970
- function Yk(a,b){a.P++;return`alias-${b.charAt(0)}${a.P}`}function $k(a,b,c,d,e){let f=d;switch(!0){case c instanceof olympe.dc.ea.Ib.mf:case c instanceof olympe.dc.ea.Ib.nf:f+=1;a=al(a,b,c,f,e);break;case c instanceof olympe.dc.ea.Ib.tc:a=bl(a,c);break;case c instanceof olympe.dc.ea.Ib.Rh:a=cl(a,c);break;default:a=Promise.reject(`Query part ${c.toString()} could not be parsed`)}return a.then(()=>f)}
971
- function al(a,b,c,d,e){const f=c.Rd().T(),g=c.Rd().Sa()===olympe.dc.Ca.ORIGIN?olympe.dm.Relation.originModelRel:olympe.dm.Relation.destinationModelRel;let h=c instanceof olympe.dc.ea.Ib.nf;const k=olympe.dm.Relation.F.$l,l=olympe.dc.md.from(f).ub(g).Pc();d=e?d+1:d;const n=Array.from(a.query.F).includes(d),[p,q]=['',''];return qk(a.F,l.T()).then(r=>x(function*(){const t=Yk(a,r),u=[];let v=Promise.resolve();k===olympe.dm.Relation.F.$l&&(v=qk(a.F,f).then(w=>{const y=Yk(a,w),[B,D]=dl(c.Rd().Sa());a.C.push({Qg:!1,
972
- kh:y,name:w,bi:[],nh:B,ei:D,filters:[],recursive:h});h=!1}));return v.then(()=>x(function*(){let w=[];var y=Promise.resolve([]);let B=[];if(n){const D=Zk(a.F,b,l.T(),Wk);y=olympe.dc.hb.from(l.T()).ub(olympe.dc.CloudObject.propertyRel).Hf().Pc().map(I=>I.T());w=y.map(I=>Zk(a.F,b,l.T(),I));y=Promise.all(y.map(I=>Promise.resolve(I)));B.push([Zk(a.F,b,l.T(),Wk),Wk]);const T=yield y;B=w.map((I,aa)=>[I,T[aa]]);B.unshift([D,Wk])}a.C.push({Qg:n,kh:t,name:r,bi:B,nh:p,ei:q,filters:u,recursive:h})}))}))}
973
- function bl(a,b){return a.K(b.C).then(c=>{a.C[a.C.length-1].filters.push(c)})}function cl(a,b){a.G.order=b.order;a.G.aliasSorting=a.C[a.C.length-1].kh;return Promise.resolve(b.fb().T()).then(c=>{a.G.columnSorting=c})}function dl(a){const b=olympe.ia.node.sa.Ja.ad.gk,c=olympe.ia.node.sa.Ja.ad.Al;return a===olympe.dc.Ca.ORIGIN?[c,b]:[b,c]}
974
- olympe.ia.node.sa.Ja.Fu=class{constructor(a,b){this.query=a;this.P=0;this.F=b;this.C=[];this.G={}}K(a){switch(!0){case a instanceof olympe.dc.ea.W.Gc:const c=a.C;return Promise.resolve(a.fb()).then(h=>[h,Lk,Xk(c)]);case a instanceof olympe.dc.ea.W.Uc:const d=a.substring;return Promise.resolve(a.fb()).then(h=>[h,Vk,d]);case a instanceof olympe.dc.ea.W.vd:var b=a.C.source;return/^\^?([-_%\u0153\u0152\u00e6\u00c6\u00e5\u00c5\u00f8\u00d8&/\u00df\u00a1\u00bf=\u00e0\u00c0\u00e2\u00c2\u00e4\u00c4\u00e1\u00c1\u00e9\u00c9\u00e8\u00c8\u00ea\u00ca\u00eb\u00cb\u00ec\u00cc\u00ee\u00ce\u00ef\u00cf\u00f2\u00d2\u00f4\u00d4\u00f6\u00d6\u00f9\u00d9\u00fb\u00db\u00fc\u00dc\u00e7\u00c7\u2019\u00f1\u00e3\u00f5\u00c3\u00d5\u00d1]|\w|\s|\d|\\'|\\"|\.\+\?|\.\*|\.\+|\\\/|\\\\|\\\^|\\\$|\\\.|\\\?|\\\*|\\\+|\\\(|\\\)|\\\||\\\[|\\\]|\\\{|\\\})*\$*?$/.test(b)?
975
- Promise.resolve(a.fb()).then(h=>[h,Uk,a.C]):Promise.reject(`Query not supported for regex : ${b}`);case a instanceof olympe.dc.ea.W.ld:return this.K(a.C).then(h=>['',Ok,h]);case a instanceof olympe.dc.ea.W.He:const e=a.destination,f=Array.from(a.recursive);if(f.reduce((h,k)=>h||k,!1))return Promise.reject('Recursive relation in RelatedTo predicate is not supported');b=a.gd().map((h,k)=>Promise.resolve(h.T()).then(l=>{const [n,p]=dl(h.Sa());let q=[];e&&k===a.gd().length-1&&(q=[[p,Lk,Xk(e)]]);return{name:l,
976
- recursive:f[k],bi:[],nh:n,ei:p,filters:q,kh:Yk(this,l),Qg:!1}}),this);let g;g=e?Promise.resolve([['tagOlympe',e]]):Promise.resolve([]);return Promise.all(b).then(h=>{var k=this.C[this.C.length-1];k={name:k.name,recursive:!1,bi:[[Wk,Wk]],nh:'',ei:'',filters:[],kh:Yk(this,k.name),Qg:!0};h.unshift(k);return g.then(l=>['',Pk,{target:l,Pa:h}])});case a instanceof olympe.dc.ea.W.Gh:return Promise.resolve(a.fb()).then(h=>('number'===typeof a.C?Promise.resolve(a.C):Promise.resolve(a.C.T())).then(k=>{var l=
977
- a.G;return Promise.resolve([h,a.F?l?Tk:Sk:l?Rk:Qk,k])}));case a instanceof olympe.dc.ea.W.Ud:return b=Array.from(a.W).flatMap(this.K.bind(this)),Promise.all(b).then(h=>['',Mk,h]);case a instanceof olympe.dc.ea.W.be:return b=Array.from(a.W).flatMap(this.K.bind(this)),Promise.all(b).then(h=>['',Nk,h]);default:return Promise.reject('Failed to parse predicate')}}};function vk(a,b,c,d){const e=[],f=new olympe.dc.transaction.ud;let g,h,k,l;const n=null==(g=c[0])?void 0:null==(h=g.filters)?void 0:null==(k=h[0])?void 0:null==(l=k[2])?void 0:l.v;return el(c,d).then(p=>{for(const r of b){const [t,u,v]=fl(a,r,p,d,c,n);for(const [w,y,B]of v)f.Va(w,y,B);var q=Array.from(t.keys()).map(w=>w).join('.');e.push(q);for(const [w,y]of t.entries())q=u.get(w),d.K.set(w,q),f.F(w,new Map(y),0),f.Va(olympe.dc.CloudObject.modelRel.T(),w,q,0)}return{k:e,p:me(f)}})}
978
- function el(a,b){const c=[],d=[],e=[],f=[];for(let g=1;g<a.length-1;g+=2)(a[g-1].Qg||1===g)&&a[g+1].Qg&&(d.push(b.Sf(a[g-1].name)),e.push(b.Sf(a[g+1].name)),c.push(Promise.resolve(b.G.get(a[g].name))),f.push(a[g].nh===olympe.ia.node.sa.Ja.ad.gk?olympe.dc.Ca.DESTINATION:olympe.dc.Ca.ORIGIN));return Promise.all([Promise.all(c),Promise.all(d),Promise.all(e)]).then(([g,h,k])=>g.map((l,n)=>[l,h[n],k[n],f[n]]))}
979
- function fl(a,b,c,d,e,f){const g=olympe.ia.node.sa.Ja.ad.Nh;let h=0;let k='',l='',n=0;const p=new Map,q=new Map,r=[];for(const [u,v]of Object.entries(b)){b=v;var t=u.split(';');if(t[1]===g){h=parseInt(t[0],10);t=gl(d,a,h);if(n<c.length){const w=c[n][3],y=c[n][0];if(k===c[n][1]&&t===c[n][2])r.push(w===olympe.dc.Ca.DESTINATION?[y,l,b]:[y,b,l]),n++;else{let B;!k&&t===(null==(B=e[2])?void 0:B.name)&&f&&(r.push(w===olympe.dc.Ca.DESTINATION?[y,f,b]:[y,b,f]),n++)}}p.set(b,[]);q.set(b,t);d.K.set(b,t);k=t;
980
- l=b}else h===parseInt(t[0],10)&&(t=t[1],p.get(l).push([t,b]))}return[p,q,r]}olympe.ia.node.sa.Ja.hB=class{};function uk(a){const b=a.C,{offset:c,limit:d,fD:e,order:f,aD:g}=a.P.G;-1<d&&b.limit(d);0<c&&b.offset(c);e&&f&&b.orderBy(`${g}.${e}`,f.toLowerCase());for(const [h,{Qg:k,kh:l,name:n,filters:p,recursive:q,bi:r,nh:t,ei:u}]of a.V.entries())hl(a,b,k,l,n,p,q,0===h,t,u,r);return b}
965
+ function Jk(a,b,c,d,e=!1,f='',g=''){if(c===yk)b.string(c,21).primary();else if(c===wk||c===xk){if(e)b.string(c).notNullable().references(g).inTable(`${a.schema}.${f}`).onDelete('CASCADE')}else c===zk?b.binary(c):d&&(a=a.db,d=olympe.dc.md.from(d).ub(olympe.dm.Property.typeRel).Pc(),a.Xf(d,olympe.dm.String)?b.string(c,1E3):a.Xf(d,olympe.dm.Number)?b.double(c):a.Xf(d,olympe.dm.Boolean)?b.boolean(c):a.Xf(d,olympe.dm.DateTime)?b.string(c):a.Xf(d,olympe.dm.Color)&&b.string(c,50))}
966
+ olympe.ia.node.sa.Ja.Ys=class{constructor(a,b,c){this.N=olympe.ta.Za('sql');this.client=a;this.schema=b;this.G=c;this.C=new olympe.ia.node.sa.Ja.rv;this.K=new olympe.D.Xb(`Data Model Observer of ${c.T()}`);this.V=[];this.F=0;this.Pa=new Map;this.P=new Set;this.db=olympe.dc.La();Ak(this)}wn(a,b){this.N.debug('Observe properties for '+a);olympe.dc.hb.from(a).ub(olympe.dc.CloudObject.propertyRel).observe(b).subscribe(c=>{this.N.debug('New properties for '+a+' '+Ke(c));Ck(this,()=>Kk(this,a,Ke(c).map(d=>
967
+ d.T()),Le(c)),`Update columns of ${a}: added: ${Ke(c)}, removed: ${Le(c)}`)})}};const Lk=olympe.ia.node.sa.Ja.yc.EQUAL,Mk=olympe.ia.node.sa.Ja.yc.dg,Nk=olympe.ia.node.sa.Ja.yc.Lh,Ok=olympe.ia.node.sa.Ja.yc.$g,Pk=olympe.ia.node.sa.Ja.yc.So,Qk=olympe.ia.node.sa.Ja.yc.fp,Rk=olympe.ia.node.sa.Ja.yc.gp,Sk=olympe.ia.node.sa.Ja.yc.Dp,Tk=olympe.ia.node.sa.Ja.yc.Ep,Uk=olympe.ia.node.sa.Ja.yc.Aq,Vk=olympe.ia.node.sa.Ja.yc.Rq,Wk=olympe.ia.node.sa.Ja.ad.Mh;
968
+ function tk(a,b){return x(function*(){var c=a.query.G;let d=c;var e=[];const f=a.query.C;let g=olympe.dc.La().rj(c);!g&&f[0]instanceof olympe.dc.ea.Ib.lf&&(g=f[0].Qd().nb(olympe.dc.CloudObject.instancesRel));if(g){try{var h=yield qk(a.F,c)}catch(n){return[]}g=!0;f.shift()}else{try{var k=yield a.F.Lb(c,'')}catch(n){return[]}d=k;h=yield Promise.resolve([['tagOlympe',c]]);1<h.length?e.push(['',Mk,h.map(([n,p])=>[n,Lk,Xk(p)])]):e.push([h[0][0],Lk,Xk(h[0][1])]);h=yield qk(a.F,k)}k=Yk(a,h);c=Array.from(a.query.F);
969
+ c=c.includes(0)||c.includes(1)&&g;var l=[];if(c){const n=Zk(a.F,b,d,Wk);l=olympe.dc.hb.from(d).ub(olympe.dc.CloudObject.propertyRel).Pc().map(q=>q.T());const p=yield Promise.all(l.map(q=>Promise.resolve(q)));l=l.map(q=>Zk(a.F,b,d,q)).map((q,r)=>[q,p[r]]);l.unshift([n,Wk])}a.G.limit=a.query.max;a.G.offset=a.query.offset;a.C.push({Pg:c,recursive:!1,filters:e,mh:'',di:'',ai:l,jh:k,name:h});e=0;for(const n of f)e=yield $k(a,b,n,e,g);return a.C})}
970
+ function Yk(a,b){a.P++;return`alias-${b.charAt(0)}${a.P}`}function $k(a,b,c,d,e){let f=d;switch(!0){case c instanceof olympe.dc.ea.Ib.lf:case c instanceof olympe.dc.ea.Ib.mf:f+=1;a=al(a,b,c,f,e);break;case c instanceof olympe.dc.ea.Ib.rc:a=bl(a,c);break;case c instanceof olympe.dc.ea.Ib.Qh:a=cl(a,c);break;default:a=Promise.reject(`Query part ${c.toString()} could not be parsed`)}return a.then(()=>f)}
971
+ function al(a,b,c,d,e){const f=c.Qd().T(),g=c.Qd().Sa()===olympe.dc.Ca.ORIGIN?olympe.dm.Relation.originModelRel:olympe.dm.Relation.destinationModelRel;let h=c instanceof olympe.dc.ea.Ib.mf;const k=olympe.dm.Relation.F.am,l=olympe.dc.md.from(f).ub(g).Pc();d=e?d+1:d;const n=Array.from(a.query.F).includes(d),[p,q]=['',''];return qk(a.F,l.T()).then(r=>x(function*(){const t=Yk(a,r),u=[];let v=Promise.resolve();k===olympe.dm.Relation.F.am&&(v=qk(a.F,f).then(w=>{const y=Yk(a,w),[B,D]=dl(c.Qd().Sa());a.C.push({Pg:!1,
972
+ jh:y,name:w,ai:[],mh:B,di:D,filters:[],recursive:h});h=!1}));return v.then(()=>x(function*(){let w=[];var y=Promise.resolve([]);let B=[];if(n){const D=Zk(a.F,b,l.T(),Wk);y=olympe.dc.hb.from(l.T()).ub(olympe.dc.CloudObject.propertyRel).Ff().Pc().map(I=>I.T());w=y.map(I=>Zk(a.F,b,l.T(),I));y=Promise.all(y.map(I=>Promise.resolve(I)));B.push([Zk(a.F,b,l.T(),Wk),Wk]);const T=yield y;B=w.map((I,aa)=>[I,T[aa]]);B.unshift([D,Wk])}a.C.push({Pg:n,jh:t,name:r,ai:B,mh:p,di:q,filters:u,recursive:h})}))}))}
973
+ function bl(a,b){return a.K(b.C).then(c=>{a.C[a.C.length-1].filters.push(c)})}function cl(a,b){a.G.order=b.order;a.G.aliasSorting=a.C[a.C.length-1].jh;return Promise.resolve(b.eb().T()).then(c=>{a.G.columnSorting=c})}function dl(a){const b=olympe.ia.node.sa.Ja.ad.hk,c=olympe.ia.node.sa.Ja.ad.Bl;return a===olympe.dc.Ca.ORIGIN?[c,b]:[b,c]}
974
+ olympe.ia.node.sa.Ja.Gu=class{constructor(a,b){this.query=a;this.P=0;this.F=b;this.C=[];this.G={}}K(a){switch(!0){case a instanceof olympe.dc.ea.W.Gc:const c=a.C;return Promise.resolve(a.eb()).then(h=>[h,Lk,Xk(c)]);case a instanceof olympe.dc.ea.W.Uc:const d=a.substring;return Promise.resolve(a.eb()).then(h=>[h,Vk,d]);case a instanceof olympe.dc.ea.W.vd:var b=a.C.source;return/^\^?([-_%\u0153\u0152\u00e6\u00c6\u00e5\u00c5\u00f8\u00d8&/\u00df\u00a1\u00bf=\u00e0\u00c0\u00e2\u00c2\u00e4\u00c4\u00e1\u00c1\u00e9\u00c9\u00e8\u00c8\u00ea\u00ca\u00eb\u00cb\u00ec\u00cc\u00ee\u00ce\u00ef\u00cf\u00f2\u00d2\u00f4\u00d4\u00f6\u00d6\u00f9\u00d9\u00fb\u00db\u00fc\u00dc\u00e7\u00c7\u2019\u00f1\u00e3\u00f5\u00c3\u00d5\u00d1]|\w|\s|\d|\\'|\\"|\.\+\?|\.\*|\.\+|\\\/|\\\\|\\\^|\\\$|\\\.|\\\?|\\\*|\\\+|\\\(|\\\)|\\\||\\\[|\\\]|\\\{|\\\})*\$*?$/.test(b)?
975
+ Promise.resolve(a.eb()).then(h=>[h,Uk,a.C]):Promise.reject(`Query not supported for regex : ${b}`);case a instanceof olympe.dc.ea.W.ld:return this.K(a.C).then(h=>['',Ok,h]);case a instanceof olympe.dc.ea.W.He:const e=a.destination,f=Array.from(a.recursive);if(f.reduce((h,k)=>h||k,!1))return Promise.reject('Recursive relation in RelatedTo predicate is not supported');b=a.gd().map((h,k)=>Promise.resolve(h.T()).then(l=>{const [n,p]=dl(h.Sa());let q=[];e&&k===a.gd().length-1&&(q=[[p,Lk,Xk(e)]]);return{name:l,
976
+ recursive:f[k],ai:[],mh:n,di:p,filters:q,jh:Yk(this,l),Pg:!1}}),this);let g;g=e?Promise.resolve([['tagOlympe',e]]):Promise.resolve([]);return Promise.all(b).then(h=>{var k=this.C[this.C.length-1];k={name:k.name,recursive:!1,ai:[[Wk,Wk]],mh:'',di:'',filters:[],jh:Yk(this,k.name),Pg:!0};h.unshift(k);return g.then(l=>['',Pk,{target:l,Pa:h}])});case a instanceof olympe.dc.ea.W.Gh:return Promise.resolve(a.eb()).then(h=>('number'===typeof a.C?Promise.resolve(a.C):Promise.resolve(a.C.T())).then(k=>{var l=
977
+ a.G;return Promise.resolve([h,a.F?l?Tk:Sk:l?Rk:Qk,k])}));case a instanceof olympe.dc.ea.W.Td:return b=Array.from(a.W).flatMap(this.K.bind(this)),Promise.all(b).then(h=>['',Mk,h]);case a instanceof olympe.dc.ea.W.ae:return b=Array.from(a.W).flatMap(this.K.bind(this)),Promise.all(b).then(h=>['',Nk,h]);default:return Promise.reject('Failed to parse predicate')}}};function vk(a,b,c,d){const e=[],f=new olympe.dc.transaction.ud;let g,h,k,l;const n=null==(g=c[0])?void 0:null==(h=g.filters)?void 0:null==(k=h[0])?void 0:null==(l=k[2])?void 0:l.v;return el(c,d).then(p=>{for(const r of b){const [t,u,v]=fl(a,r,p,d,c,n);for(const [w,y,B]of v)f.Va(w,y,B);var q=Array.from(t.keys()).map(w=>w).join('.');e.push(q);for(const [w,y]of t.entries())q=u.get(w),d.K.set(w,q),f.F(w,new Map(y),0),f.Va(olympe.dc.CloudObject.modelRel.T(),w,q,0)}return{k:e,p:me(f)}})}
978
+ function el(a,b){const c=[],d=[],e=[],f=[];for(let g=1;g<a.length-1;g+=2)(a[g-1].Pg||1===g)&&a[g+1].Pg&&(d.push(b.Qf(a[g-1].name)),e.push(b.Qf(a[g+1].name)),c.push(Promise.resolve(b.G.get(a[g].name))),f.push(a[g].mh===olympe.ia.node.sa.Ja.ad.hk?olympe.dc.Ca.DESTINATION:olympe.dc.Ca.ORIGIN));return Promise.all([Promise.all(c),Promise.all(d),Promise.all(e)]).then(([g,h,k])=>g.map((l,n)=>[l,h[n],k[n],f[n]]))}
979
+ function fl(a,b,c,d,e,f){const g=olympe.ia.node.sa.Ja.ad.Mh;let h=0;let k='',l='',n=0;const p=new Map,q=new Map,r=[];for(const [u,v]of Object.entries(b)){b=v;var t=u.split(';');if(t[1]===g){h=parseInt(t[0],10);t=gl(d,a,h);if(n<c.length){const w=c[n][3],y=c[n][0];if(k===c[n][1]&&t===c[n][2])r.push(w===olympe.dc.Ca.DESTINATION?[y,l,b]:[y,b,l]),n++;else{let B;!k&&t===(null==(B=e[2])?void 0:B.name)&&f&&(r.push(w===olympe.dc.Ca.DESTINATION?[y,f,b]:[y,b,f]),n++)}}p.set(b,[]);q.set(b,t);d.K.set(b,t);k=t;
980
+ l=b}else h===parseInt(t[0],10)&&(t=t[1],p.get(l).push([t,b]))}return[p,q,r]}olympe.ia.node.sa.Ja.jB=class{};function uk(a){const b=a.C,{offset:c,limit:d,hD:e,order:f,cD:g}=a.P.G;-1<d&&b.limit(d);0<c&&b.offset(c);e&&f&&b.orderBy(`${g}.${e}`,f.toLowerCase());for(const [h,{Pg:k,jh:l,name:n,filters:p,recursive:q,ai:r,mh:t,di:u}]of a.V.entries())hl(a,b,k,l,n,p,q,0===h,t,u,r);return b}
981
981
  function hl(a,b,c,d,e,f,g,h,k,l,n){if(c){if(!n||1>n.length)throw Error('Trying to return an element without providing mappings in SQLBuilder:BuildNodes');c=n.map(([p,q])=>b.client.raw('??.?? as ??',[d,q,p])).join(',');b.select(b.client.raw(c))}0<f.length&&il(a,b,d,f,olympe.ia.node.sa.Ja.pd.NONE);h?(b.from(`${e} as ${d}`),a.G=d,a.F=l):(g&&(f=`cte${a.K++}`,jl(a,b,f,d,e)),b.join(`${e} as ${d}`,p=>{var q=a.G,r=a.F;p.on(''===r?`${q}.tagOlympe`:`${q}.${r}`,''===k?`${d}.tagOlympe`:`${d}.${k}`);a.G=d;a.F=
982
982
  l}))}
983
- function il(a,b,c,d,e){const f=olympe.ia.node.sa.Ja.yc.EQUAL,g=olympe.ia.node.sa.Ja.yc.gg,h=olympe.ia.node.sa.Ja.yc.Mh,k=olympe.ia.node.sa.Ja.yc.ah,l=olympe.ia.node.sa.Ja.yc.Ro,n=olympe.ia.node.sa.Ja.yc.ep,p=olympe.ia.node.sa.Ja.yc.fp,q=olympe.ia.node.sa.Ja.yc.Cp,r=olympe.ia.node.sa.Ja.yc.Dp,t=olympe.ia.node.sa.Ja.yc.zq,u=olympe.ia.node.sa.Ja.yc.Qq;if(1<d.length)kl(b,olympe.ia.node.sa.Ja.pd.gg,ll(a,d,olympe.ia.node.sa.Ja.pd.gg,c));else{var [v,w,y]=d[0];d=`${c}.${v}`;switch(w){case f:ml(b,e,d,'=',
984
- y.v,!1);break;case u:a=nl('.*',b.client.dialect);ml(b,e,d,'LIKE',`${a}${y}${a}`,!1);break;case l:const B=y.relations,D=`cte${a.K++}`,T=new olympe.ia.node.sa.Ja.Lq(a.P,a.C,B),I=olympe.ia.node.sa.Ja.ad.Nh;a.C.with(D,aa=>{for(const [Cl,{Qg:Dl,kh:El,name:Fl,filters:Gl,recursive:Hl,bi:Il,nh:Jl,ei:Kl}]of B.entries())hl(T,aa,Dl,El,Fl,Gl,Hl,0===Cl,Jl,Kl,Il);return aa});a.C.whereIn(b.client.raw('??.??',[c,I]),function(aa){aa.select(b.client.raw('??.??',[D,I])).from(D)});break;case q:ml(b,e,d,'<=',y,'string'===
985
- typeof y);break;case r:ml(b,e,d,'<',y,'string'===typeof y);break;case n:ml(b,e,d,'>=',y,'string'===typeof y);break;case p:ml(b,e,d,'>',y,'string'===typeof y);break;case g:kl(b,e,ll(a,y,olympe.ia.node.sa.Ja.pd.gg,c));break;case h:kl(b,e,ll(a,y,olympe.ia.node.sa.Ja.pd.Mh,c));break;case k:kl(b,olympe.ia.node.sa.Ja.pd.ah,ll(a,[y],olympe.ia.node.sa.Ja.pd.ah,c));break;case t:e=ol(y,b.client.dialect),b.whereRaw('?? LIKE ?',[d,e])}}}
986
- function jl(a,b,c,d,e){var f=['tagOlympe'];const g=pl(f,d),h=pl(f,c),k=g.map((l,n)=>[l,h[n]]);b.withRecursive(c,g,l=>{l.select(g).from({[d]:e}).PD(n=>n.select(g).from({[d]:e}).join(c,()=>{a.on(Object.fromEntries(k))}))})}function pl(a,b){return a.map(c=>`${b}.${c}`)}
987
- function kl(a,b,c){switch(b){case olympe.ia.node.sa.Ja.pd.NONE:a.where(c);break;case olympe.ia.node.sa.Ja.pd.gg:a.andWhere(c);break;case olympe.ia.node.sa.Ja.pd.Mh:a.orWhere(c);break;case olympe.ia.node.sa.Ja.pd.ah:a.whereNot(c);break;default:olympe.ta.Za('storage').error(`Where operand ${b} not recognized`)}}function ll(a,b,c,d){return e=>{for(let f=0;f<b.length;++f)il(a,e,d,[b[f]],0===f?olympe.ia.node.sa.Ja.pd.NONE:c)}}
988
- function ml(a,b,c,d,e,f){e=f?a.client.raw(e):e;switch(b){case olympe.ia.node.sa.Ja.pd.NONE:a.where(c,d,e);break;case olympe.ia.node.sa.Ja.pd.gg:a.andWhere(c,d,e);break;case olympe.ia.node.sa.Ja.pd.Mh:a.orWhere(c,d,e);break;case olympe.ia.node.sa.Ja.pd.ah:a.whereNot(c,d,e);break;default:olympe.ta.Za('storage').error(`Where operand ${b} not recognized`)}}function nl(a,b){const c={'.+?':'_','.*':'%','.+':'_%'},d={'.+?':'?','.*':'*','.+':'?*'};return'mssql'===b?d[a]:c[a]}
983
+ function il(a,b,c,d,e){const f=olympe.ia.node.sa.Ja.yc.EQUAL,g=olympe.ia.node.sa.Ja.yc.dg,h=olympe.ia.node.sa.Ja.yc.Lh,k=olympe.ia.node.sa.Ja.yc.$g,l=olympe.ia.node.sa.Ja.yc.So,n=olympe.ia.node.sa.Ja.yc.fp,p=olympe.ia.node.sa.Ja.yc.gp,q=olympe.ia.node.sa.Ja.yc.Dp,r=olympe.ia.node.sa.Ja.yc.Ep,t=olympe.ia.node.sa.Ja.yc.Aq,u=olympe.ia.node.sa.Ja.yc.Rq;if(1<d.length)kl(b,olympe.ia.node.sa.Ja.pd.dg,ll(a,d,olympe.ia.node.sa.Ja.pd.dg,c));else{var [v,w,y]=d[0];d=`${c}.${v}`;switch(w){case f:ml(b,e,d,'=',
984
+ y.v,!1);break;case u:a=nl('.*',b.client.dialect);ml(b,e,d,'LIKE',`${a}${y}${a}`,!1);break;case l:const B=y.relations,D=`cte${a.K++}`,T=new olympe.ia.node.sa.Ja.Mq(a.P,a.C,B),I=olympe.ia.node.sa.Ja.ad.Mh;a.C.with(D,aa=>{for(const [Cl,{Pg:Dl,jh:El,name:Fl,filters:Gl,recursive:Hl,ai:Il,mh:Jl,di:Kl}]of B.entries())hl(T,aa,Dl,El,Fl,Gl,Hl,0===Cl,Jl,Kl,Il);return aa});a.C.whereIn(b.client.raw('??.??',[c,I]),function(aa){aa.select(b.client.raw('??.??',[D,I])).from(D)});break;case q:ml(b,e,d,'<=',y,'string'===
985
+ typeof y);break;case r:ml(b,e,d,'<',y,'string'===typeof y);break;case n:ml(b,e,d,'>=',y,'string'===typeof y);break;case p:ml(b,e,d,'>',y,'string'===typeof y);break;case g:kl(b,e,ll(a,y,olympe.ia.node.sa.Ja.pd.dg,c));break;case h:kl(b,e,ll(a,y,olympe.ia.node.sa.Ja.pd.Lh,c));break;case k:kl(b,olympe.ia.node.sa.Ja.pd.$g,ll(a,[y],olympe.ia.node.sa.Ja.pd.$g,c));break;case t:e=ol(y,b.client.dialect),b.whereRaw('?? LIKE ?',[d,e])}}}
986
+ function jl(a,b,c,d,e){var f=['tagOlympe'];const g=pl(f,d),h=pl(f,c),k=g.map((l,n)=>[l,h[n]]);b.withRecursive(c,g,l=>{l.select(g).from({[d]:e}).RD(n=>n.select(g).from({[d]:e}).join(c,()=>{a.on(Object.fromEntries(k))}))})}function pl(a,b){return a.map(c=>`${b}.${c}`)}
987
+ function kl(a,b,c){switch(b){case olympe.ia.node.sa.Ja.pd.NONE:a.where(c);break;case olympe.ia.node.sa.Ja.pd.dg:a.andWhere(c);break;case olympe.ia.node.sa.Ja.pd.Lh:a.orWhere(c);break;case olympe.ia.node.sa.Ja.pd.$g:a.whereNot(c);break;default:olympe.ta.Za('storage').error(`Where operand ${b} not recognized`)}}function ll(a,b,c,d){return e=>{for(let f=0;f<b.length;++f)il(a,e,d,[b[f]],0===f?olympe.ia.node.sa.Ja.pd.NONE:c)}}
988
+ function ml(a,b,c,d,e,f){e=f?a.client.raw(e):e;switch(b){case olympe.ia.node.sa.Ja.pd.NONE:a.where(c,d,e);break;case olympe.ia.node.sa.Ja.pd.dg:a.andWhere(c,d,e);break;case olympe.ia.node.sa.Ja.pd.Lh:a.orWhere(c,d,e);break;case olympe.ia.node.sa.Ja.pd.$g:a.whereNot(c,d,e);break;default:olympe.ta.Za('storage').error(`Where operand ${b} not recognized`)}}function nl(a,b){const c={'.+?':'_','.*':'%','.+':'_%'},d={'.+?':'?','.*':'*','.+':'?*'};return'mssql'===b?d[a]:c[a]}
989
989
  function ol(a,b){let c='',d='',e='';const f=/^([-\u0153\u0152\u00e6\u00c6\u00e5\u00c5\u00f8\u00d8&/\u00df\u00a1\u00bf=\u00e0\u00c0\u00e2\u00c2\u00e4\u00c4\u00e1\u00c1\u00e9\u00c9\u00e8\u00c8\u00ea\u00ca\u00eb\u00cb\u00ec\u00cc\u00ee\u00ce\u00ef\u00cf\u00f2\u00d2\u00f4\u00d4\u00f6\u00d6\u00f9\u00d9\u00fb\u00db\u00fc\u00dc\u00e7\u00c7\u2019\u00f1\u00e3\u00f5\u00c3\u00d5\u00d1]|\w|\s|\d|\\\\)/,g=/^[%_'"]/,h=/^(\\\^|\\\/|\\\$|\\\.|\\\?|\\\*|\\\+|\\\(|\\\)|\\\[|\\\]|\\\{|\\\}])/,k=/^(\.\+\?|\.\*|\.\+)/;
990
990
  a=a.source;a.startsWith('^')?a=a.substring(1,a.length):c='%';for(a.endsWith('$')?a=a.substring(0,a.length-1):e='%';''!==a;){{var l=a;var n=b,p=k,q=h,r=f;const v=g.exec(l);if(v)l=[`\\${v[0]}`,v[0].length];else if(p=p.exec(l))l=[nl(p[0],n),p[0].length];else if(q=q.exec(l))l=q[0],l='mssql'!==n||'['!==l[1]&&']'!==l[1]?[l.substring(1,l.length),l.length]:[l,q[0].length];else if(n=r.exec(l))l=[n[0],n[0].length];else throw Error(`Could find a match for character ${l.charAt(0)}`);}const [t,u]=l;d+=t;a=a.substring(u,
991
- a.length)}return c+d+e}olympe.ia.node.sa.Ja.Lq=class{constructor(a,b,c){this.P=a;this.C=b;this.G=this.F='';this.K=0;this.V=c}};olympe.ia.node.sa.Ja.pd={gg:'&',Mh:'|',ah:'!',NONE:''};const ql=olympe.ia.node.sa.Ja.ad.gk,rl=olympe.ia.node.sa.Ja.ad.Al,sl=olympe.ia.node.sa.Ja.ad.Nh,tl=olympe.ia.node.sa.Ja.ad.Qj,ul=olympe.dc.Zb.VERSION,vl=olympe.dc.Zb.Id;function pk(a,b,c){return x(function*(){yield sk(a.K);return b.transaction(d=>x(function*(){for(const e of a.va)yield e(d.withSchema(c));a.N.debug('Transaction just before commit: ',d.toString());return d})).finally(()=>{a.va.length=0;a.G.clear();a.N.debug('Transaction completed')})})}
992
- olympe.ia.node.sa.Ja.Nq=class{constructor(a,b){this.N=a;this.K=b;this.C=b.C;this.G=new Map;this.va=[]}yh(a,b,c=!0){a=c?{[sl]:a}:{};for(const [d,e]of b)b=Xk(e),a[d]=b.v;return a}F(a,b){b.delete(vl);b.delete(ul);this.G.set(a,b||new Map)}rc(a,b){this.va.push(c=>{const d=this;return x(function*(){b.delete(ul);var e=yield d.C.Lb(a,'');e=yield qk(d.C,e);yield c.table(e).where(sl,a).update(d.yh(a,b,!1))})})}Fc(a){this.va.push(b=>{const c=this;return x(function*(){var d=yield c.C.Lb(a,'');d=yield qk(c.C,
993
- d);yield b.table(d).where(sl,a).del()})})}Va(a,b,c){a===olympe.dc.mc.Vc?(Bk(this.K,c),this.va.push(d=>{const e=this;return x(function*(){const f=e.G.get(b),g=yield qk(e.C,c);c!==olympe.dc.za(olympe.dm.File)||f.has(tl)?(e.C.K.set(b,c),yield d.table(g).insert(e.yh(b,f,!0))):yield d.table(g).where(sl,b).update(e.yh(b,f,!1))})})):this.va.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d.table(e).insert({[ql]:b,[rl]:c})}))}ic(a,b,c){this.va.push(d=>x(function*(){const e=yield Promise.resolve(a);
994
- yield d.table(e).where({[ql]:b,[rl]:c}).del()}))}};olympe.ia.node.sa.Ja.Nq.ma=[olympe.dc.Writable];function rk(a,b){b=olympe.X.bc()+b;a.F.set(b,new Map);return b}function qk(a,b){return(a=a.C.get(b))?Promise.resolve(a):Promise.reject(`No table were found for model ${a}`)}function Zk(a,b,c,d){a=a.F.get(b);if(!a)throw Error('No alias has been initialized for alias id:'+b);b=a.get(c);b||(b=a.size+1,a.set(c,b));return`${b};${d}`}function gl(a,b,c){let d;a=null!=(d=a.F.get(b))?d:new Map;let e,f;return null!=(f=null==(e=Array.from(a).find(([,g])=>g===c))?void 0:e[0])?f:null}
995
- olympe.ia.node.sa.Ja.qv=class{constructor(){this.K=new Map;this.F=new Map;this.C=new Map;this.G=new Map}static T(a,b,c){return c?b[0][1]:''}Sf(a){return Promise.resolve(a)}fb(a){return Promise.resolve(a)}Lb(a){return(a=this.K.get(a))?Promise.resolve(a):Promise.reject('GET MODEL TAG OF INSTANCE NOT IMPLEMENTED')}};function Xk(a){let b=1,c=a;switch(!0){case a instanceof Date:b=2;c=a.toJSON();break;case a instanceof olympe.D.Color:b=3,c=`${a.Wf().valueOf()}.${a.Qf().valueOf()}.${a.Lf().valueOf()}.${a.Kf().valueOf()}`}return{t:b,v:c}}olympe.ia.node.sa.Ja.YC=class{};olympe.ia.node.host={};olympe.ia.node.host.Hd=function(a,b){this.N=b};olympe.ia.node.host.Hd.prototype.constructor=olympe.ia.node.host.Hd;olympe.ia.node.host.Hd.prototype.destroy=function(){};olympe.ia.node.host.Hd.prototype.destroy=olympe.ia.node.host.Hd.prototype.destroy;olympe.ia.node.host.Hd.prototype.Za=function(){return this.N};olympe.ia.node.host.Hd.ma=[olympe.host.ea.Hd];olympe.ia.node.host.Zp=class{constructor(a){this.N=a}rj(){return!1}Xk(){this.N.error('No history manager implemented in Node')}C(){this.Xk();return ic()}F(){this.Xk()}};olympe.ia.node.host.Zp.ma=[olympe.host.Gi];olympe.ia.node.host.dd=class{constructor(){this.C={};this.K={}}destroy(){}P(a){clearTimeout(this.C[a]);delete this.C[a]}$(a,b,c){this.C[b]=setTimeout(c,a)}G(a){clearTimeout(this.C[a]);delete this.C[a]}V(a,b,c){this.K[b]=setInterval(c,a)}F(a){clearInterval(this.K[a]);delete this.K[a]}};olympe.host.Yp.register(olympe.host.ea.Xp.kr,olympe.ia.node.host.dd);olympe.ia.node.host.dd.ma=[olympe.host.ea.dd];olympe.ia.node.host.wk=class{constructor(a){this.N=a}};olympe.ia.node.host.wk.ma=[olympe.host.wk];function wl(a){const b=olympe.net.ab.Mc.bh,c=olympe.net.ab.Mc.wm;a.la.V('healthcheck','/readiness',[olympe.net.ab.Gd.GET],()=>{const d=Array.from(a.$.values()).map(e=>e.apply(a));return 0===d.length?Promise.resolve(new olympe.net.rf('No healthCheck is set',b,'Nothing to check')):Promise.allSettled(d).then(e=>{let f=!1,g='Health check result: ';for(const h of e)'rejected'===h.status?(f=!0,e=h.reason,g+=`\n${e}`,a.N.warn(`Health check detected a service which is DOWN: ${e}`)):g+=`\n${h.value}`;return new olympe.net.rf(g,
991
+ a.length)}return c+d+e}olympe.ia.node.sa.Ja.Mq=class{constructor(a,b,c){this.P=a;this.C=b;this.G=this.F='';this.K=0;this.V=c}};olympe.ia.node.sa.Ja.pd={dg:'&',Lh:'|',$g:'!',NONE:''};const ql=olympe.ia.node.sa.Ja.ad.hk,rl=olympe.ia.node.sa.Ja.ad.Bl,sl=olympe.ia.node.sa.Ja.ad.Mh,tl=olympe.ia.node.sa.Ja.ad.Rj,ul=olympe.dc.$b.VERSION,vl=olympe.dc.$b.Hd;function pk(a,b,c){return x(function*(){yield sk(a.K);return b.transaction(d=>x(function*(){for(const e of a.va)yield e(d.withSchema(c));a.N.debug('Transaction just before commit: ',d.toString());return d})).finally(()=>{a.va.length=0;a.G.clear();a.N.debug('Transaction completed')})})}
992
+ olympe.ia.node.sa.Ja.Oq=class{constructor(a,b){this.N=a;this.K=b;this.C=b.C;this.G=new Map;this.va=[]}yh(a,b,c=!0){a=c?{[sl]:a}:{};for(const [d,e]of b)b=Xk(e),a[d]=b.v;return a}F(a,b){b.delete(vl);b.delete(ul);this.G.set(a,b||new Map)}qc(a,b){this.va.push(c=>{const d=this;return x(function*(){b.delete(ul);var e=yield d.C.Lb(a,'');e=yield qk(d.C,e);yield c.table(e).where(sl,a).update(d.yh(a,b,!1))})})}Fc(a){this.va.push(b=>{const c=this;return x(function*(){var d=yield c.C.Lb(a,'');d=yield qk(c.C,
993
+ d);yield b.table(d).where(sl,a).del()})})}Va(a,b,c){a===olympe.dc.lc.Vc?(Bk(this.K,c),this.va.push(d=>{const e=this;return x(function*(){const f=e.G.get(b),g=yield qk(e.C,c);c!==olympe.dc.za(olympe.dm.File)||f.has(tl)?(e.C.K.set(b,c),yield d.table(g).insert(e.yh(b,f,!0))):yield d.table(g).where(sl,b).update(e.yh(b,f,!1))})})):this.va.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d.table(e).insert({[ql]:b,[rl]:c})}))}hc(a,b,c){this.va.push(d=>x(function*(){const e=yield Promise.resolve(a);
994
+ yield d.table(e).where({[ql]:b,[rl]:c}).del()}))}};olympe.ia.node.sa.Ja.Oq.ma=[olympe.dc.Writable];function rk(a,b){b=olympe.X.bc()+b;a.F.set(b,new Map);return b}function qk(a,b){return(a=a.C.get(b))?Promise.resolve(a):Promise.reject(`No table were found for model ${a}`)}function Zk(a,b,c,d){a=a.F.get(b);if(!a)throw Error('No alias has been initialized for alias id:'+b);b=a.get(c);b||(b=a.size+1,a.set(c,b));return`${b};${d}`}function gl(a,b,c){let d;a=null!=(d=a.F.get(b))?d:new Map;let e,f;return null!=(f=null==(e=Array.from(a).find(([,g])=>g===c))?void 0:e[0])?f:null}
995
+ olympe.ia.node.sa.Ja.rv=class{constructor(){this.K=new Map;this.F=new Map;this.C=new Map;this.G=new Map}static T(a,b,c){return c?b[0][1]:''}Qf(a){return Promise.resolve(a)}eb(a){return Promise.resolve(a)}Lb(a){return(a=this.K.get(a))?Promise.resolve(a):Promise.reject('GET MODEL TAG OF INSTANCE NOT IMPLEMENTED')}};function Xk(a){let b=1,c=a;switch(!0){case a instanceof Date:b=2;c=a.toJSON();break;case a instanceof olympe.D.Color:b=3,c=`${a.Uf().valueOf()}.${a.Of().valueOf()}.${a.Jf().valueOf()}.${a.If().valueOf()}`}return{t:b,v:c}}olympe.ia.node.sa.Ja.$C=class{};olympe.ia.node.host={};olympe.ia.node.host.Gd=function(a,b){this.N=b};olympe.ia.node.host.Gd.prototype.constructor=olympe.ia.node.host.Gd;olympe.ia.node.host.Gd.prototype.destroy=function(){};olympe.ia.node.host.Gd.prototype.destroy=olympe.ia.node.host.Gd.prototype.destroy;olympe.ia.node.host.Gd.prototype.Za=function(){return this.N};olympe.ia.node.host.Gd.ma=[olympe.host.ea.Gd];olympe.ia.node.host.$p=class{constructor(a){this.N=a}sj(){return!1}Yk(){this.N.error('No history manager implemented in Node')}C(){this.Yk();return ic()}F(){this.Yk()}};olympe.ia.node.host.$p.ma=[olympe.host.Fi];olympe.ia.node.host.dd=class{constructor(){this.C={};this.K={}}destroy(){}P(a){clearTimeout(this.C[a]);delete this.C[a]}$(a,b,c){this.C[b]=setTimeout(c,a)}G(a){clearTimeout(this.C[a]);delete this.C[a]}V(a,b,c){this.K[b]=setInterval(c,a)}F(a){clearInterval(this.K[a]);delete this.K[a]}};olympe.host.Zp.register(olympe.host.ea.Yp.lr,olympe.ia.node.host.dd);olympe.ia.node.host.dd.ma=[olympe.host.ea.dd];olympe.ia.node.host.xk=class{constructor(a){this.N=a}};olympe.ia.node.host.xk.ma=[olympe.host.xk];function wl(a){const b=olympe.net.ab.Mc.ah,c=olympe.net.ab.Mc.xm;a.la.V('healthcheck','/readiness',[olympe.net.ab.Fd.GET],()=>{const d=Array.from(a.$.values()).map(e=>e.apply(a));return 0===d.length?Promise.resolve(new olympe.net.qf('No healthCheck is set',b,'Nothing to check')):Promise.allSettled(d).then(e=>{let f=!1,g='Health check result: ';for(const h of e)'rejected'===h.status?(f=!0,e=h.reason,g+=`\n${e}`,a.N.warn(`Health check detected a service which is DOWN: ${e}`)):g+=`\n${h.value}`;return new olympe.net.qf(g,
996
996
  f?c:b,f?'Some services are not working':'Everything is OK')})}).catch(d=>a.N.error(`Failed to add health check route ${d}`));a.F(()=>a.la.stop())}function xl(a,b){b=Array.from(b.values()).map(c=>c.apply(a));return Promise.allSettled(b).then(c=>{let d=!1;for(const e of c)'rejected'===e.status&&(d=!0,a.N.warn(`Failed to close some resource: ${e.reason}`));return d})}
997
- function yl(){var a=olympe.ia.node.host.Qk();return xl(a,a.G).then(b=>xl(a,a.P).then(c=>b||c?Promise.reject('Failed to gracefully close the backend'):Promise.resolve())).finally(()=>{a.G.clear();a.P.clear()})}
998
- olympe.ia.node.host.Ri=class extends olympe.host.Ri{constructor(a,b){super();this.N=a;this.la=b;this.$=new Map;this.G=new Map;this.P=new Map;wl(this)}C(a){const b=olympe.X.Ue();this.$.set(b,a);return b}K(a){this.$.delete(a)}F(a){const b=olympe.X.Ue();this.G.set(b,a);return b}ba(a){const b=olympe.X.Ue();this.P.set(b,a);return b}V(a){this.G.has(a)?this.G.delete(a):this.P.delete(a)}};olympe.U.config(function(a){E(a,olympe.host.Config.oq,!0);ta(a,olympe.host.R.Jl,olympe.ia.node.host.Zp,olympe.host.R.Ea);ta(a,olympe.host.R.Tq,olympe.ia.node.host.wk,olympe.host.R.Ea);C(a,olympe.host.R.tg,[olympe.host.R.Ea,olympe.net.R.Dk,new olympe.U.fa(olympe.host.Config.oq)],(b,c,d)=>d?new olympe.ia.node.host.Ri(b,c):new olympe.host.Ri)},'olympe.native.node.host');olympe.U.run([olympe.host.R.tg],a=>{olympe.ia.node.host.Qk=()=>a});olympe.net.rd={};olympe.net.rd.Ol=class{constructor(a){this.N=a;this.C=new Map}G(){}F(){}};olympe.net.rd.WebSocket=class{constructor(a,b){this.N=b;this.id=a;this.C=null;this.buffer=[];this.P=this.G=this.K=this.V=null}Z(){return this.id}open(a){const b=`#${this.id}`,c=this.qa(a);c.binaryType='arraybuffer';c.onopen=()=>{this.N.info('Websocket OPENED');this.V?(this.N.debug('Notifying upper layer for WebSocket',b),this.V()):this.N.warn('Nothing to notify for WebSocket',b);this.N.debug(b,`Send all buffered messages (n=${this.buffer.length}).`);this.buffer.forEach(c.send.bind(c));this.buffer.length=
997
+ function yl(){var a=olympe.ia.node.host.Rk();return xl(a,a.G).then(b=>xl(a,a.P).then(c=>b||c?Promise.reject('Failed to gracefully close the backend'):Promise.resolve())).finally(()=>{a.G.clear();a.P.clear()})}
998
+ olympe.ia.node.host.Ri=class extends olympe.host.Ri{constructor(a,b){super();this.N=a;this.la=b;this.$=new Map;this.G=new Map;this.P=new Map;wl(this)}C(a){const b=olympe.X.Ve();this.$.set(b,a);return b}K(a){this.$.delete(a)}F(a){const b=olympe.X.Ve();this.G.set(b,a);return b}ba(a){const b=olympe.X.Ve();this.P.set(b,a);return b}V(a){this.G.has(a)?this.G.delete(a):this.P.delete(a)}};olympe.U.config(function(a){E(a,olympe.host.Config.pq,!0);ta(a,olympe.host.R.Kl,olympe.ia.node.host.$p,olympe.host.R.Ea);ta(a,olympe.host.R.Uq,olympe.ia.node.host.xk,olympe.host.R.Ea);C(a,olympe.host.R.qg,[olympe.host.R.Ea,olympe.net.R.Ek,new olympe.U.fa(olympe.host.Config.pq)],(b,c,d)=>d?new olympe.ia.node.host.Ri(b,c):new olympe.host.Ri)},'olympe.native.node.host');olympe.U.run([olympe.host.R.qg],a=>{olympe.ia.node.host.Rk=()=>a});olympe.net.rd={};olympe.net.rd.Pl=class{constructor(a){this.N=a;this.C=new Map}G(){}F(){}};olympe.net.rd.WebSocket=class{constructor(a,b){this.N=b;this.id=a;this.C=null;this.buffer=[];this.P=this.G=this.K=this.V=null}Z(){return this.id}open(a){const b=`#${this.id}`,c=this.qa(a);c.binaryType='arraybuffer';c.onopen=()=>{this.N.info('Websocket OPENED');this.V?(this.N.debug('Notifying upper layer for WebSocket',b),this.V()):this.N.warn('Nothing to notify for WebSocket',b);this.N.debug(b,`Send all buffered messages (n=${this.buffer.length}).`);this.buffer.forEach(c.send.bind(c));this.buffer.length=
999
999
  0};c.onmessage=d=>{d='string'===typeof d.data?String(d.data):Ga(d.data);this.N.debug(b,'<',d);this.G&&this.G(d)};c.onclose=()=>{this.N.debug(`WebSocket ${b} CLOSED`);this.K&&this.K()};c.onerror=()=>{this.N.debug(`WebSocket ${b} ERROR`);this.P&&this.P()};this.C=c}send(a){const b=`#${this.id}`;if(null!==this.C){const c=this.C.constructor;switch(this.C.readyState){case c.OPEN:this.N.debug(b,'>',a);this.C.send(a);break;case c.CONNECTING:this.N.debug(b,'- Connecting: BUFFER','>',a);this.buffer.push(a);
1000
1000
  break;default:return this.N.debug(b,'- Closed','>',a),!1}}else this.N.debug(b,'- Not opened yet: BUFFER','>',a),this.buffer.push(a);return!0}close(){if(null!==this.C){const a=this.C.constructor,b=this.C.readyState;if(b===a.OPEN||b===a.CONNECTING){this.N.debug(`Force closing native websocket ${`#${this.id}`}`);this.C.close(1E3);return}}this.N.debug('Try to force close native websocket, but not open nor connecting')}la(a){this.V=a||null}ba(a){this.G=a||null}F(a){this.P=a||null}$(a){this.K=a||null}qa(){}};
1001
- olympe.net.rd.WebSocket.ma=[olympe.net.WebSocket];olympe.ia.node.net={};olympe.ia.node.net.qu=class extends olympe.net.oa{constructor(a,b){super(a,b);this.$=new olympe.ia.node.net.Ol(a)}V(){return'NodeJS'}G(a){var b=this.K++;a=a.C();this.N.debug('CREATE Websocket #'+b+' to '+a);b=new olympe.ia.node.net.ru(b,this.N);b.open(a);return b}C(a,b){this.N.debug('SEND HTTP '+a.method+' to '+a.C());const c=this.K++;b=Lb(this,c,b);this.$.G(c,{u:a.C(),s:Hb(a),h:Fb(a),p:a.port,z:Gb(a),q:Kb(a),m:a.method,v:a.kj(),k:a.key,c:a.cert,a:a.ca,j:a.rejectUnauthorized,b:a.body,r:a.F},b)}P(){this.N.warn('DOWNLOAD FILE not available with node native implementation. URL:')}F(){return this.$}};const zl=require('fs'),Al=require('http'),Bl=require('https');
1002
- olympe.ia.node.net.Ol=class extends olympe.net.rd.Ol{G(a,b,c){const d=b.s,e=b.b,f=b.m;var g=b.v;const h=b.k,k=b.c,l=b.a,n=b.j;var p=b.h;const q=b.p;let r=b.z;r.startsWith('/')||(r=`/${r}`);const t=b.q,u=b.u,v=b.r;b={host:p,port:q,path:t?r+'?'+t:r,method:f};g&&(b.headers=g);g=(w,y,B)=>new Promise((D,T)=>{zl.readFile(w,(I,aa)=>{I?T(I):(B[y]=aa,D(B))})});p=w=>{const y=D=>{D.setEncoding(v===olympe.net.ab.ResponseType.xk?'utf-8':'binary');let T='';D.on('data',I=>{T+=I});D.on('end',()=>{if(v!==olympe.net.ab.ResponseType.xk){var I=
1003
- (new Uint8Array(Buffer.from(T,'binary'))).buffer;I=v===olympe.net.ab.ResponseType.pl?new Blob([I]):I}else I=T;c(this.F(D.statusCode,D.statusMessage,I,D.headers))})},B=d?new Bl.request(w,y):new Al.request(w,y);this.C.set(a,()=>{B.destroy()});B.on('error',D=>{c(this.F(0,'Conection refused','Error connecting to '+u+' with method '+f+', code = '+D.code+', message = '+D.message,''))});!e||'POST'!==f&&'PUT'!==f?B.end():(e instanceof Blob?e.arrayBuffer():Promise.resolve(e)).then(D=>{B.write(D instanceof
1004
- ArrayBuffer?Buffer.from(D):D);B.end()})};d&&(h||k||l)?h&&k&&l?(b.rejectUnauthorized=n,g(h,'key',b).then(g.bind(null,k,'cert')).then(g.bind(null,l,'ca')).then(p).catch(w=>{this.N.log('Error loading self signed files:',w)})):this.N.warn('All three self signed files must be specified!'):p(b)}F(a,b,c,d){this.N.debug('Received HTTP response',a,c);return new olympe.net.rf(c,a,b,d)}};olympe.ia.node.net.ru=class extends olympe.net.rd.WebSocket{qa(a){return new (require('ws'))(a)}};olympe.ia.node.net.Config={xC:'native.html.net.useWorkers'};olympe.U.config(function(a){ta(a,olympe.net.R.Aa,olympe.ia.node.net.qu,olympe.net.R.Ea,olympe.host.R.Aa)},'olympe.native.node.net');olympe.ia.node.net.http={};const Ll=require('fastify'),Ml=require('fastify-cors'),Nl={tk:0,sk:1,zm:2};
1005
- function Ol(a,b){a.F.route({bodyLimit:1048576*a.qa,url:b.path,method:b.methods,handler:(c,d)=>{a.N.debug('< HTTP:',c);var e=c.body,f='';e instanceof Buffer?(f=new Uint8Array(e.length),e.copy(f)):'string'===typeof e&&(f=e);const [g,h]=c.hostname.split(':');e=new olympe.net.Xj(g,parseInt(h,10),c.url,'https'===c.protocol,c.method,f);for(const [k,l]of Object.entries(c.headers))e.headers[k]=l;b.Hx(e,new Map(Object.entries(c.params))).then(k=>{const l=k.getData();a.N.debug('> HTTP: reply with body:',l instanceof
1006
- ArrayBuffer?'binary':l);d.code(k.Sd()).headers(k.kj()).send(l instanceof ArrayBuffer?Buffer.from(l):l)}).catch(k=>{a.N.debug('> HTTP: reply with internal server error:',k);d.code(olympe.net.ab.Mc.wm).header(olympe.net.ab.Headers.Kj,'text/plain').send({error:`Internal server error: ${k}`})})}})}function Pl(a,b){a.P&&clearTimeout(a.P);a.P=setTimeout(b,500)}
1007
- olympe.ia.node.net.http.Ek=class extends olympe.net.Ek{constructor(a,b,c,d){super(a);this.qa=d;this.F=this.createServer();this.host=b;this.port=c;this.K=new Map;this.$=null;this.C=Nl.tk;this.je=new Set;this.P=null}la(a,b){this.$={origin:'*',methods:a,allowedHeaders:b};return this}V(a,b,c,d){this.K.set(a,{path:b,methods:c,Hx:d});return this.G()}ba(a){const b=this;return x(function*(){b.K.delete(a);return 0<b.K.size?b.G():b.stop()})}start(){if(this.C===Nl.tk)return this.G();if(this.C===Nl.sk){this.F.register(Ml,
1008
- this.$);for(const a of this.K.values())Ol(this,a);return this.F.listen(this.port,'0.0.0.0').then(a=>{this.C=Nl.zm;this.N.debug('Web server listening on '+a);this.je.forEach(b=>b(null))}).catch(a=>{this.stop().then();this.je.forEach(b=>b(a))}).finally(()=>this.je.clear())}return Promise.reject('Try to start a webservice already started')}G(){return this.C===Nl.sk?(new Promise((a,b)=>{this.je.add(c=>c?b(c):a())})).then(()=>this.G()):new Promise((a,b)=>{this.je.add(c=>c?b(c):a());Pl(this,()=>{const c=
1009
- this;return x(function*(){c.C=Nl.sk;yield c.F.close();c.F=c.createServer();yield c.start()})})})}stop(){return this.C===Nl.zm?this.F.close().then(()=>{this.C=Nl.tk}):Promise.resolve()}createServer(){const a=Ll({logger:!1,level:'error'});a.addContentTypeParser('*',{parseAs:'buffer'},(b,c,d)=>{d(null,c)});return a}};olympe.U.config(function(a){A(a,olympe.net.R.Dk,olympe.ia.node.net.http.Ek,olympe.net.R.Ea,new olympe.U.fa(olympe.net.Config.Kl),new olympe.U.fa(olympe.net.Config.Ll),new olympe.U.fa(olympe.net.Config.kp))},'olympe.native.node.net.http');olympe.ia.node.X={};const Ql=new Map;olympe.ia.node.X.sl=class extends olympe.X.sl{P(a){return(new Uint8Array(Buffer.from(a,'base64'))).buffer}C(a){return Buffer.from(a).toString('base64')}G(a,b){a.arrayBuffer().then(olympe.D.Na().F(b))}K(a){var b=()=>Math.random().toString(16).slice(-4);b=`blob://${`${b()}${b()}-${b()}-${b()}-${b()}-${b()}${b()}${b()}`}`;Ql.set(b,a);return b}F(a,b,c){Ql.has(a)?b(Ql.get(a)):c&&c('No object has been found for that url. Maybe the URL has already been revoked')}V(a){Ql.delete(a)}};olympe.U.config(function(a){ta(a,olympe.X.R.Ah,olympe.ia.node.X.sl)},'olympe.native.node.utils');olympe.ia.node.auth={};olympe.ia.node.auth.$p=class{redirect(){console.warn('Redirection n/a in Node.JS')}F(){console.warn('Redirection n/a in Node.JS')}C(){console.warn('Redirection n/a in Node.JS');return''}};olympe.ia.node.auth.$p.ma=[olympe.auth.qk];olympe.U.config(a=>{A(a,olympe.auth.R.lk,olympe.ia.node.auth.$p)},'olympe.native.node.auth');olympe.ia.node.kc={};olympe.ia.node.kc.Pp=class{constructor(a){this.F={};this.N=a}C(a){void 0===this.F[a]&&(this.F[a]=new olympe.ia.node.kc.Qp(a,this.N));return this.F[a].open()}};olympe.ia.node.kc.Pp.ma=[olympe.kc.$t];olympe.ia.node.kc.Qp=class{constructor(a,b){this.name=a;this.N=b;this.C=!1;this.db=null}open(){if(this.C)return this;const a=require('lowdb');this.C=!0;const b=require('lowdb/adapters/Memory');this.db=a(new b);return this}close(){}get(a,b){this.C||this.open();b(this.db.get(a).value(),a)}set(a,b,c){this.C||this.open();this.db.set(a,b).write();c&&c(!0)}forEach(a,b){this.C||this.open();const c=this.db.getState();for(const [d,e]of Object.entries(c))a(e,d);b()}remove(a,b){this.C||this.open();this.db.unset(a).write();
1010
- b&&b(!0)}clear(){this.C||this.open();this.db.setState({})}};olympe.ia.node.kc.Qp.ma=[olympe.kc.au];olympe.U.config(function(a){A(a,olympe.kc.R.ak,olympe.ia.node.kc.Pp,olympe.kc.R.Ea)},'olympe.native.node.localstorage');olympe.ia.node.storage={};olympe.ia.node.storage.Storage=class{constructor(a){this.N=a}F(a){a&&a('Not Implemented.')}P(a){a&&a('Not Implemented.')}write(a,b,c,d,e){e&&e('Not Implemented.')}G(a){a&&a('Not Implemented.')}K(a){a&&a('Not Implemented.')}C(a){a&&a('Not Implemented.')}open(a){a(null)}close(a){a(null)}};olympe.ia.node.storage.Storage.ma=[olympe.kc.Storage];olympe.U.config(function(a){ta(a,olympe.kc.R.Ui,olympe.ia.node.storage.Storage,olympe.host.R.Ea)},'olympe.native.html.storage');olympe.Mg={};olympe.Mg.Config={VERSION:'version.version',Bs:'version.branch',ig:'version.commit',kv:'version.tag',So:'version.olympe-framework',Cs:'version.build'};olympe.U.config(function(a){E(a,olympe.Mg.Config.VERSION,'');E(a,olympe.Mg.Config.Bs,'');E(a,olympe.Mg.Config.ig,'');E(a,olympe.Mg.Config.kv,'');E(a,olympe.Mg.Config.So,'');E(a,olympe.Mg.Config.Cs,'')},'olympe.main');const Rl=require('fs');let ya,xa;function Sl(a,b){Rl.readFile(a,(c,d)=>{c?b(Object.create(null)):(d=JSON.parse(d),b(d))})}
1001
+ olympe.net.rd.WebSocket.ma=[olympe.net.WebSocket];olympe.ia.node.net={};olympe.ia.node.net.ru=class extends olympe.net.oa{constructor(a,b){super(a,b);this.$=new olympe.ia.node.net.Pl(a)}V(){return'NodeJS'}G(a){var b=this.K++;a=a.C();this.N.debug('CREATE Websocket #'+b+' to '+a);b=new olympe.ia.node.net.su(b,this.N);b.open(a);return b}C(a,b){this.N.debug('SEND HTTP '+a.method+' to '+a.C());const c=this.K++;b=Lb(this,c,b);this.$.G(c,{u:a.C(),s:Hb(a),h:Fb(a),p:a.port,z:Gb(a),q:Kb(a),m:a.method,v:a.lj(),k:a.key,c:a.cert,a:a.ca,j:a.rejectUnauthorized,b:a.body,r:a.F},b)}P(){this.N.warn('DOWNLOAD FILE not available with node native implementation. URL:')}F(){return this.$}};const zl=require('fs'),Al=require('http'),Bl=require('https');
1002
+ olympe.ia.node.net.Pl=class extends olympe.net.rd.Pl{G(a,b,c){const d=b.s,e=b.b,f=b.m;var g=b.v;const h=b.k,k=b.c,l=b.a,n=b.j;var p=b.h;const q=b.p;let r=b.z;r.startsWith('/')||(r=`/${r}`);const t=b.q,u=b.u,v=b.r;b={host:p,port:q,path:t?r+'?'+t:r,method:f};g&&(b.headers=g);g=(w,y,B)=>new Promise((D,T)=>{zl.readFile(w,(I,aa)=>{I?T(I):(B[y]=aa,D(B))})});p=w=>{const y=D=>{D.setEncoding(v===olympe.net.ab.ResponseType.yk?'utf-8':'binary');let T='';D.on('data',I=>{T+=I});D.on('end',()=>{if(v!==olympe.net.ab.ResponseType.yk){var I=
1003
+ (new Uint8Array(Buffer.from(T,'binary'))).buffer;I=v===olympe.net.ab.ResponseType.ql?new Blob([I]):I}else I=T;c(this.F(D.statusCode,D.statusMessage,I,D.headers))})},B=d?new Bl.request(w,y):new Al.request(w,y);this.C.set(a,()=>{B.destroy()});B.on('error',D=>{c(this.F(0,'Conection refused','Error connecting to '+u+' with method '+f+', code = '+D.code+', message = '+D.message,''))});!e||'POST'!==f&&'PUT'!==f?B.end():(e instanceof Blob?e.arrayBuffer():Promise.resolve(e)).then(D=>{B.write(D instanceof
1004
+ ArrayBuffer?Buffer.from(D):D);B.end()})};d&&(h||k||l)?h&&k&&l?(b.rejectUnauthorized=n,g(h,'key',b).then(g.bind(null,k,'cert')).then(g.bind(null,l,'ca')).then(p).catch(w=>{this.N.log('Error loading self signed files:',w)})):this.N.warn('All three self signed files must be specified!'):p(b)}F(a,b,c,d){this.N.debug('Received HTTP response',a,c);return new olympe.net.qf(c,a,b,d)}};olympe.ia.node.net.su=class extends olympe.net.rd.WebSocket{qa(a){return new (require('ws'))(a)}};olympe.ia.node.net.Config={zC:'native.html.net.useWorkers'};olympe.U.config(function(a){ta(a,olympe.net.R.Aa,olympe.ia.node.net.ru,olympe.net.R.Ea,olympe.host.R.Aa)},'olympe.native.node.net');olympe.ia.node.net.http={};const Ll=require('fastify'),Ml=require('fastify-cors'),Nl={uk:0,tk:1,Am:2};
1005
+ function Ol(a,b){a.F.route({bodyLimit:1048576*a.qa,url:b.path,method:b.methods,handler:(c,d)=>{a.N.debug('< HTTP:',c);var e=c.body,f='';e instanceof Buffer?(f=new Uint8Array(e.length),e.copy(f)):'string'===typeof e&&(f=e);const [g,h]=c.hostname.split(':');e=new olympe.net.Yj(g,parseInt(h,10),c.url,'https'===c.protocol,c.method,f);for(const [k,l]of Object.entries(c.headers))e.headers[k]=l;b.Jx(e,new Map(Object.entries(c.params))).then(k=>{const l=k.getData();a.N.debug('> HTTP: reply with body:',l instanceof
1006
+ ArrayBuffer?'binary':l);d.code(k.Rd()).headers(k.lj()).send(l instanceof ArrayBuffer?Buffer.from(l):l)}).catch(k=>{a.N.debug('> HTTP: reply with internal server error:',k);d.code(olympe.net.ab.Mc.xm).header(olympe.net.ab.Headers.Lj,'text/plain').send({error:`Internal server error: ${k}`})})}})}function Pl(a,b){a.P&&clearTimeout(a.P);a.P=setTimeout(b,500)}
1007
+ olympe.ia.node.net.http.Fk=class extends olympe.net.Fk{constructor(a,b,c,d){super(a);this.qa=d;this.F=this.createServer();this.host=b;this.port=c;this.K=new Map;this.$=null;this.C=Nl.uk;this.je=new Set;this.P=null}la(a,b){this.$={origin:'*',methods:a,allowedHeaders:b};return this}V(a,b,c,d){this.K.set(a,{path:b,methods:c,Jx:d});return this.G()}ba(a){const b=this;return x(function*(){b.K.delete(a);return 0<b.K.size?b.G():b.stop()})}start(){if(this.C===Nl.uk)return this.G();if(this.C===Nl.tk){this.F.register(Ml,
1008
+ this.$);for(const a of this.K.values())Ol(this,a);return this.F.listen(this.port,'0.0.0.0').then(a=>{this.C=Nl.Am;this.N.debug('Web server listening on '+a);this.je.forEach(b=>b(null))}).catch(a=>{this.stop().then();this.je.forEach(b=>b(a))}).finally(()=>this.je.clear())}return Promise.reject('Try to start a webservice already started')}G(){return this.C===Nl.tk?(new Promise((a,b)=>{this.je.add(c=>c?b(c):a())})).then(()=>this.G()):new Promise((a,b)=>{this.je.add(c=>c?b(c):a());Pl(this,()=>{const c=
1009
+ this;return x(function*(){c.C=Nl.tk;yield c.F.close();c.F=c.createServer();yield c.start()})})})}stop(){return this.C===Nl.Am?this.F.close().then(()=>{this.C=Nl.uk}):Promise.resolve()}createServer(){const a=Ll({logger:!1,level:'error'});a.addContentTypeParser('*',{parseAs:'buffer'},(b,c,d)=>{d(null,c)});return a}};olympe.U.config(function(a){A(a,olympe.net.R.Ek,olympe.ia.node.net.http.Fk,olympe.net.R.Ea,new olympe.U.fa(olympe.net.Config.Ll),new olympe.U.fa(olympe.net.Config.Ml),new olympe.U.fa(olympe.net.Config.mp))},'olympe.native.node.net.http');olympe.ia.node.X={};const Ql=new Map;olympe.ia.node.X.tl=class extends olympe.X.tl{P(a){return(new Uint8Array(Buffer.from(a,'base64'))).buffer}C(a){return Buffer.from(a).toString('base64')}G(a,b){a.arrayBuffer().then(olympe.D.Na().F(b))}K(a){var b=()=>Math.random().toString(16).slice(-4);b=`blob://${`${b()}${b()}-${b()}-${b()}-${b()}-${b()}${b()}${b()}`}`;Ql.set(b,a);return b}F(a,b,c){Ql.has(a)?b(Ql.get(a)):c&&c('No object has been found for that url. Maybe the URL has already been revoked')}V(a){Ql.delete(a)}};olympe.U.config(function(a){ta(a,olympe.X.R.Ah,olympe.ia.node.X.tl)},'olympe.native.node.utils');olympe.ia.node.auth={};olympe.ia.node.auth.aq=class{redirect(){console.warn('Redirection n/a in Node.JS')}F(){console.warn('Redirection n/a in Node.JS')}C(){console.warn('Redirection n/a in Node.JS');return''}};olympe.ia.node.auth.aq.ma=[olympe.auth.rk];olympe.U.config(a=>{A(a,olympe.auth.R.mk,olympe.ia.node.auth.aq)},'olympe.native.node.auth');olympe.ia.node.jc={};olympe.ia.node.jc.Qp=class{constructor(a){this.F={};this.N=a}C(a){void 0===this.F[a]&&(this.F[a]=new olympe.ia.node.jc.Rp(a,this.N));return this.F[a].open()}};olympe.ia.node.jc.Qp.ma=[olympe.jc.au];olympe.ia.node.jc.Rp=class{constructor(a,b){this.name=a;this.N=b;this.C=!1;this.db=null}open(){if(this.C)return this;const a=require('lowdb');this.C=!0;const b=require('lowdb/adapters/Memory');this.db=a(new b);return this}close(){}get(a,b){this.C||this.open();b(this.db.get(a).value(),a)}set(a,b,c){this.C||this.open();this.db.set(a,b).write();c&&c(!0)}forEach(a,b){this.C||this.open();const c=this.db.getState();for(const [d,e]of Object.entries(c))a(e,d);b()}remove(a,b){this.C||this.open();this.db.unset(a).write();
1010
+ b&&b(!0)}clear(){this.C||this.open();this.db.setState({})}};olympe.ia.node.jc.Rp.ma=[olympe.jc.bu];olympe.U.config(function(a){A(a,olympe.jc.R.bk,olympe.ia.node.jc.Qp,olympe.jc.R.Ea)},'olympe.native.node.localstorage');olympe.ia.node.storage={};olympe.ia.node.storage.Storage=class{constructor(a){this.N=a}F(a){a&&a('Not Implemented.')}P(a){a&&a('Not Implemented.')}write(a,b,c,d,e){e&&e('Not Implemented.')}G(a){a&&a('Not Implemented.')}K(a){a&&a('Not Implemented.')}C(a){a&&a('Not Implemented.')}open(a){a(null)}close(a){a(null)}};olympe.ia.node.storage.Storage.ma=[olympe.jc.Storage];olympe.U.config(function(a){ta(a,olympe.jc.R.Ui,olympe.ia.node.storage.Storage,olympe.host.R.Ea)},'olympe.native.html.storage');olympe.Jg={};olympe.Jg.Config={VERSION:'version.version',Cs:'version.branch',fg:'version.commit',mv:'version.tag',To:'version.olympe-framework',Ds:'version.build'};olympe.U.config(function(a){E(a,olympe.Jg.Config.VERSION,'');E(a,olympe.Jg.Config.Cs,'');E(a,olympe.Jg.Config.fg,'');E(a,olympe.Jg.Config.mv,'');E(a,olympe.Jg.Config.To,'');E(a,olympe.Jg.Config.Ds,'')},'olympe.main');const Rl=require('fs');let ya,xa;function Sl(a,b){Rl.readFile(a,(c,d)=>{c?b(Object.create(null)):(d=JSON.parse(d),b(d))})}
1011
1011
  function Tl(){if(void 0!==ya&&void 0!==xa){0===Object.keys(xa).length&&console.warn('No configuration found. Check presence of oConfig.json');0===Object.keys(ya).length&&console.warn('No version found. Check presence of version.json');var a=Object.create(null),b=process.argv;for(var c=2;c<b.length;c++){var d=/^true|false$/i,e=/^\d+(\.\d+)?$/;let f;const g=/([^?&=]+)(=?([^?&=]+))?/g.exec(b[c]);!Array.isArray(g)||4>g.length?console.warn(`Malformed config parameter "${b[c]}" ignored. It should of the form 'a=b'`):
1012
- (f=g[3],void 0===f?f=!0:f.startsWith('"')&&f.endsWith('"')?f=f.substring(1,f.length-1):d.test(f)?f='true'===f.toLowerCase():e.test(f)&&(f=parseFloat(f)),a[g[1]]=f)}a=new olympe.U.Ns(a);d=a.Za();d.debug('Registering configurations...');d.C++;for(let f=0,g=ma.length;f<g;f++)b=a,c=ma[f],sa(b.N,'Registering configure callback '+(c.C?'for module '+c.C:'')),b.F.push(c.F);qa(d);d.debug('done registering');a=a.compile();c=a.Za();c.debug('Running run callbacks of container...');for(let f=0,g=na.length;f<g;f++)c.C++,
1013
- d=na[f],b=a,e=pa(b,d.hj()),b.N.debug('Calling run callback '+(d.C?'for module '+d.C:'')),d.F.apply(null,e),qa(c);c.debug('done calling run callbacks. DI process completed!')}}function Ul(){console.log('The node received a signal for graceful shutdown');yl().then(()=>{console.log('The node backend has stopped successfully');process.exit(0)}).catch(a=>process.exit(1,a))}olympe.X.cn('oConfig.json',Sl,function(a){xa=a;Tl()});Sl('version.json',function(a){ya=a;Tl()});process.on('SIGTERM',Ul);
1014
- process.on('SIGINT',Ul);process.on('SIGBREAK',Ul);process.on('SIGHUP',Ul);process.on('uncaughtException',Ul);olympe.vc={};olympe.vc.ys=class{run(){}};olympe.vc.oa=class{constructor(a,b){this.C=a;this.N=b;this.F=null;this.G='';this.N.info('HC Manager will execute application registered as:',this.C)}xj(a,b,c=''){b||(b='default');b===this.C?(null===this.F?this.N.log('Application',c,'designated to be launched'):this.N.log('OVERRIDE: Application',c,'designated to be launched'),this.F=a,this.G=c):this.N.debug('ignoring application:'+c+' as it is registered under name '+b+' and not '+this.C)}run(){null!==this.F?(this.N.info('Running application:',this.G),
1015
- this.F.run()):this.N.error('No app registered under name: '+this.C)}};olympe.vc.xj=function(a,b,c){const d=a.Za();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.vc.Config.gf+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.Pd(olympe.vc.R.Aa).config([b],function(e,f){f.xj(e,c,b)},'olympe.hc.registerApp')};olympe.vc.R={Aa:'hc.Manager',Ea:'hc.Logger'};olympe.vc.Config={gf:'hc.app',Hl:'hc.globalToken'};olympe.U.config(function(a){E(a,olympe.vc.Config.gf,'default');E(a,olympe.vc.Config.Hl,!1);C(a,olympe.vc.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('hc'));C(a,olympe.auth.R.Ej,[new olympe.U.fa(olympe.vc.Config.gf),new olympe.U.fa(olympe.vc.Config.Hl)],(b,c)=>new olympe.auth.nl(c?'':b));A(a,olympe.vc.R.Aa,olympe.vc.oa,new olympe.U.fa(olympe.vc.Config.gf),olympe.vc.R.Ea)},'olympe.hc');
1016
- olympe.U.run([olympe.vc.R.Aa],a=>a.run(),'olympe.hc');olympe.sc.eg={};function Vl(a){a.N.info('Starting application '+a.C);const b=olympe.D.Ic(olympe.D.ra).update(olympe.D.ra.C),c=olympe.dc.La();if(0<a.C.length){const d=Ec(c,a.C,a.F.C.C.F((e,f)=>{e?(e=yj(f),e instanceof olympe.sc.Ma.pi?(a.N.debug('application retrieved: running'),f=Yi(a.F,e),e.run(f),'string'===typeof a.la&&(new olympe.sc.Zd).la(e.T(),f,a.N),e instanceof olympe.sc.Ma.Nl&&(e=olympe.U.getParameter(olympe.auth.Config.ll),f=a.G.F.P(),!0===e&&0<f&&kc(()=>{a.G.wh()},Math.max(1E3,1E4<f?f-1E3:f-100))),b.update(olympe.D.ra.F)):
1012
+ (f=g[3],void 0===f?f=!0:f.startsWith('"')&&f.endsWith('"')?f=f.substring(1,f.length-1):d.test(f)?f='true'===f.toLowerCase():e.test(f)&&(f=parseFloat(f)),a[g[1]]=f)}a=new olympe.U.Os(a);d=a.Za();d.debug('Registering configurations...');d.C++;for(let f=0,g=ma.length;f<g;f++)b=a,c=ma[f],sa(b.N,'Registering configure callback '+(c.C?'for module '+c.C:'')),b.F.push(c.F);qa(d);d.debug('done registering');a=a.compile();c=a.Za();c.debug('Running run callbacks of container...');for(let f=0,g=na.length;f<g;f++)c.C++,
1013
+ d=na[f],b=a,e=pa(b,d.ij()),b.N.debug('Calling run callback '+(d.C?'for module '+d.C:'')),d.F.apply(null,e),qa(c);c.debug('done calling run callbacks. DI process completed!')}}function Ul(){console.log('The node received a signal for graceful shutdown');yl().then(()=>{console.log('The node backend has stopped successfully');process.exit(0)}).catch(a=>process.exit(1,a))}olympe.X.dn('oConfig.json',Sl,function(a){xa=a;Tl()});Sl('version.json',function(a){ya=a;Tl()});process.on('SIGTERM',Ul);
1014
+ process.on('SIGINT',Ul);process.on('SIGBREAK',Ul);process.on('SIGHUP',Ul);process.on('uncaughtException',a=>{console.error('Uncaught Exception:',a);Ul()});olympe.vc={};olympe.vc.zs=class{run(){}};olympe.vc.oa=class{constructor(a,b){this.C=a;this.N=b;this.F=null;this.G='';this.N.info('HC Manager will execute application registered as:',this.C)}yj(a,b,c=''){b||(b='default');b===this.C?(null===this.F?this.N.log('Application',c,'designated to be launched'):this.N.log('OVERRIDE: Application',c,'designated to be launched'),this.F=a,this.G=c):this.N.debug('ignoring application:'+c+' as it is registered under name '+b+' and not '+this.C)}run(){null!==this.F?(this.N.info('Running application:',this.G),
1015
+ this.F.run()):this.N.error('No app registered under name: '+this.C)}};olympe.vc.yj=function(a,b,c){const d=a.Za();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.vc.Config.ff+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.Od(olympe.vc.R.Aa).config([b],function(e,f){f.yj(e,c,b)},'olympe.hc.registerApp')};olympe.vc.R={Aa:'hc.Manager',Ea:'hc.Logger'};olympe.vc.Config={ff:'hc.app',Il:'hc.globalToken'};olympe.U.config(function(a){E(a,olympe.vc.Config.ff,'default');E(a,olympe.vc.Config.Il,!1);C(a,olympe.vc.R.Ea,[olympe.ta.R.Aa],b=>b.Qc('hc'));C(a,olympe.auth.R.Fj,[new olympe.U.fa(olympe.vc.Config.ff),new olympe.U.fa(olympe.vc.Config.Il)],(b,c)=>new olympe.auth.ol(c?'':b));A(a,olympe.vc.R.Aa,olympe.vc.oa,new olympe.U.fa(olympe.vc.Config.ff),olympe.vc.R.Ea)},'olympe.hc');
1016
+ olympe.U.run([olympe.vc.R.Aa],a=>a.run(),'olympe.hc');olympe.sc.bg={};function Vl(a){a.N.info('Starting application '+a.C);const b=olympe.D.Ic(olympe.D.ra).update(olympe.D.ra.C),c=olympe.dc.La();if(0<a.C.length){const d=Ec(c,a.C,a.F.G().F((e,f)=>{e?(e=yj(f),e instanceof olympe.sc.Ma.oi?(a.N.debug('application retrieved: running'),f=Yi(a.F,e),e.run(f),'string'===typeof a.la&&(new olympe.sc.Yd).la(e.T(),f,a.N),e instanceof olympe.sc.Ma.Ol&&(e=olympe.U.getParameter(olympe.auth.Config.ml),f=a.G.F.P(),!0===e&&0<f&&kc(()=>{a.G.wh()},Math.max(1E3,1E4<f?f-1E3:f-100))),b.update(olympe.D.ra.F)):
1017
1017
  a.N.error('application retrieved: not an Application with a run() method')):Wl(a)}));olympe.D.Na().onDestroy(()=>{Fc(c,a.C,d)});jc(()=>{olympe.D.Xa(b)===olympe.D.ra.C&&a.N.warn(`requested application ${a.C} may not be available (it may not exist or the logged user may not have the correct permissions)`)},3E4)}Xl(a);Yl(a,b)}
1018
- function Zl(a,b){if(a.$)a.N.debug('Sending getContext request'),cg(a.ba,d=>{d?a.N.error('failed to synchronise (authenticated) with server: '+d.message):(a.N.debug('synchronisation request successful'),Gj=a.C,b())});else{var c=olympe.dc.Dd.SUBSCRIBE;const d=olympe.dc.Dd.Pi,e=$i(a.F)?d:c;a.N.debug(($i(a.F)?'PULLING':'SUBSCRIBING')+' application '+a.C);const f=olympe.D.Na();c=new olympe.async.uk(f);c.add((g,h)=>{hf(new olympe.dc.pf(a.C,e),olympe.dc.Qb.zf).kb(k=>{var l=olympe.dc.Ia;var n=(n=olympe.dc.md.from(a.C).ub(olympe.sc.Ma.Me.C).ub(olympe.sc.logic.Yd.G.zc()).Pc())&&
1019
- n.T()||olympe.dc.Ia.Lc;l.lc=n;k?h(k.message):g()})});c.add(g=>{olympe.D.wc([a.G.Kg()],h=>{(new olympe.dc.Da(h)).je(f.F(g))})});c.add((g,h)=>{const k=olympe.sc.hd.C.Gp,l=olympe.sc.hd.C.cm;Hj(a.C,n=>{switch(n){case k:case l:g();break;default:h('Error while loading the business container')}})});Vb(c,(g,h)=>{if(h)throw Error(h);b()});c.start()}}function Wl(a){a.N.debug('Stop the application');a.F.C.C.Fa();a.K.K(a.P);a.K.V(a.V)}function Xl(a){a.V=a.K.F(()=>x(function*(){return Wl(a)}))}
1018
+ function Zl(a,b){if(a.$)a.N.debug('Sending getContext request'),cg(a.ba,d=>{d?a.N.error('failed to synchronise (authenticated) with server: '+d.message):(a.N.debug('synchronisation request successful'),Gj=a.C,b())});else{var c=olympe.dc.Cd.SUBSCRIBE;const d=olympe.dc.Cd.Pi,e=$i(a.F)?d:c;a.N.debug(($i(a.F)?'PULLING':'SUBSCRIBING')+' application '+a.C);const f=olympe.D.Na();c=new olympe.async.vk(f);c.add((g,h)=>{hf(new olympe.dc.nf(a.C,e),olympe.dc.Qb.xf).kb(k=>{var l=olympe.dc.Ia;var n=(n=olympe.dc.md.from(a.C).ub(olympe.sc.Ma.Me.C).ub(olympe.sc.logic.Xd.G.zc()).Pc())&&
1019
+ n.T()||olympe.dc.Ia.Lc;l.kc=n;k?h(k.message):g()})});c.add(g=>{olympe.D.wc([a.G.Hg()],h=>{(new olympe.dc.Da(h)).je(f.F(g))})});c.add((g,h)=>{const k=olympe.sc.hd.C.Hp,l=olympe.sc.hd.C.em;Hj(a.C,n=>{switch(n){case k:case l:g();break;default:h('Error while loading the business container')}})});Vb(c,(g,h)=>{if(h)throw Error(h);b()});c.start()}}function Wl(a){a.N.debug('Stop the application');a.F.G().Fa();a.K.K(a.P);a.K.V(a.V)}function Xl(a){a.V=a.K.F(()=>x(function*(){return Wl(a)}))}
1020
1020
  function Yl(a,b){a.P=a.K.C(()=>olympe.D.Xa(b)===olympe.D.ra.F?Promise.resolve('The application is started'):Promise.reject('The application is not started'))}
1021
- olympe.sc.eg.vm=class{constructor(a,b,c,d,e,f,g,h,k){this.G=a;this.ba=b;this.K=c;this.V=this.P='';this.N=d;this.F=e;this.C=f;this.$=g;this.qa=null!=h?h:!1;this.la=null!=k?k:null}run(){const a=olympe.auth.oa.C.hf,b=olympe.auth.oa.C.lf,c=olympe.auth.oa.C.og,d=olympe.auth.oa.C.ni,e=olympe.auth.oa.C.Yh,f=olympe.auth.oa.C.zh;this.N.debug('runtime starting for app #'+this.C);let g=!1;const h=()=>{g||(Vl(this),g=!0)};olympe.D.wc([this.G.getState()],k=>{switch(k){case e:case f:break;case a:case c:this.N.debug('Server session opened, calling once connected callback');
1022
- Zl(this,h);break;case b:this.N.debug('Disconnected, working offline.');this.qa&&!g&&Zl(this,h);break;case d:this.N.debug('waiting for authentication');break;default:this.N.debug('No server session available, waiting for connection'),g=!1,Wl(this)}},'Runtime initial auth state listener')}};olympe.sc.eg.vm.C='app_instance';olympe.sc.eg.vm.ma=[olympe.vc.ys];olympe.sc.eg.Gj={zf:'sc.runtime.Main'};
1023
- olympe.U.config(function(a){C(a,olympe.auth.R.Ej,[new olympe.U.fa(olympe.vc.Config.gf),new olympe.U.fa(olympe.sc.Config.gf),new olympe.U.fa(olympe.vc.Config.Hl)],(b,c,d)=>new olympe.auth.nl(d?'':b+(c?'-'+c:'')));A(a,olympe.sc.eg.Gj.zf,olympe.sc.eg.vm,olympe.auth.R.Aa,olympe.dc.query.R.Aa,olympe.host.R.tg,olympe.sc.R.Ea,olympe.sc.R.um,new olympe.U.fa(olympe.sc.Config.gf),new olympe.U.fa(olympe.dc.Config.fh),new olympe.U.fa(olympe.sc.Config.aq),new olympe.U.fa(olympe.sc.Config.uo));olympe.vc.xj(a,olympe.sc.eg.Gj.zf,
1024
- 'sc.runtime');olympe.vc.xj(a,olympe.sc.eg.Gj.zf,'sc.headless');olympe.vc.xj(a,olympe.sc.eg.Gj.zf)},'olympe.sc.runtime');olympe.public={};function $l(a,b){const c=new olympe.auth.Request;for(const [d,e]of a)c.set(d,e);return new Promise(d=>{oc(olympe.public.Ua.get(),c,b,()=>{d()})})}
1025
- olympe.public.Ua=class{static sw(a,b){return olympe.auth.Jb.Ie.gj(a,b)}static getState(){return uc(olympe.public.Ua.get())}static Dw(){return olympe.D.Xa(olympe.public.Ua.get().Kg())}static ty(a){const b=new olympe.D.$b('Observe user tag','function'===typeof a.Wa?a.C.C:a);return new rxjs.Observable(c=>{b.run(()=>olympe.D.wc([olympe.public.Ua.get().Kg()],d=>{c.next(d);olympe.D.Na().onDestroy(()=>c.complete())}));return()=>b.destroy()})}static Zc(){return olympe.D.Xa(olympe.public.Ua.get().C.zb().Qd())}static Tw(){return olympe.D.Xa(olympe.public.Ua.get().gi())||
1026
- void 0}static Sw(){return Array.from(olympe.public.Ua.get().F.G().keys())}static wh(){olympe.public.Ua.get().wh()}static rh(a){return new Promise((b,c)=>{olympe.public.Ua.get().rh(a,d=>d?c(d):b())})}static Tx(a,b){return $l((new Map).set('username',a).set('password',b),'srp')}static Ux(a){const b=olympe.public.Ua.get().F.G();if(0===b.size||a&&!b.has(a)){var c=0===b.size?'There are no available IDPs':`The IDP name ${a} is not valid, the valid names are ${Array.from(b.keys())}`;return Promise.reject(c)}a?
1027
- (c=a,a=b.get(a)):(a=Array.from(b)[0],c=a[0],a=a[1]);return $l((new Map).set('idpName',c),a)}static Sx(){return $l(new Map,'saml')}static Vx(a,b){return $l((new Map).set('username',a).set('nonce',b),'localToken')}static Rx(){return $l(new Map,'openID')}static Yk(){return new Promise(a=>{wc(olympe.public.Ua.get(),()=>{olympe.public.Ua.get().V.delete('logoutCallback');a()},'logoutCallback');olympe.public.Ua.get().Yk()})}static get(){return olympe.auth.Sc()}};olympe.public.Ua.logout=olympe.public.Ua.Yk;
1028
- olympe.public.Ua.loginOpenID=olympe.public.Ua.Rx;olympe.public.Ua.loginToken=olympe.public.Ua.Vx;olympe.public.Ua.loginSAML=olympe.public.Ua.Sx;olympe.public.Ua.loginSSO=olympe.public.Ua.Ux;olympe.public.Ua.loginSRP=olympe.public.Ua.Tx;olympe.public.Ua.getUserFromToken=olympe.public.Ua.rh;olympe.public.Ua.sendKeepAlive=olympe.public.Ua.wh;olympe.public.Ua.getIDPNames=olympe.public.Ua.Sw;olympe.public.Ua.getIDPToken=olympe.public.Ua.Tw;olympe.public.Ua.getToken=olympe.public.Ua.Zc;
1029
- olympe.public.Ua.observeUser=olympe.public.Ua.ty;olympe.public.Ua.getCurrentUser=olympe.public.Ua.Dw;olympe.public.Ua.getState=olympe.public.Ua.getState;olympe.public.Ua.generateSRPData=olympe.public.Ua.sw;olympe.public.cb=class{static create(a){return new class extends olympe.dc.W.Tg{C(b,c){b=a(olympe.dc.CloudObject.get(c));if('boolean'===typeof b)return b;const d=olympe.D.Ic(olympe.D.ra),e=b.subscribe(f=>d.update(olympe.D.Ac(f)));olympe.D.Na().P(()=>e.unsubscribe());return d.zb()}}}};
1030
- olympe.public.Ne=class{static create(a){return new class extends olympe.dc.Eb.Tg{K(b,c){return olympe.dc.CloudObject.get(c)}G(b,c){b=a(b,c);if('number'===typeof b)return b;const d=olympe.D.Ic(olympe.D.ga),e=b.subscribe(f=>d.update(olympe.D.Ba(f)));olympe.D.Na().P(()=>e.unsubscribe());return d.zb()}}}};olympe.public.Process=class{static uy(a){const b=olympe.host.Qk(),c=b.C(a);return()=>b.K(c)}static vy(a){const b=olympe.host.Qk(),c=b.F(a);return()=>b.V(c)}};olympe.public.Process.onShutdown=olympe.public.Process.vy;olympe.public.Process.onHealthCheck=olympe.public.Process.uy;'object'===typeof exports&&(exports={CloudObject:olympe.dc.CloudObject,Relation:olympe.dc.ua.Relation,Direction:olympe.dc.Ca,generateTag:olympe.X.Ue,tagToString:olympe.dc.za,register:olympe.dc.register,defineProperty:olympe.dc.defineProperty,defineRelation:olympe.dc.mh,defineInverseRelation:olympe.dc.aw,BrickContext:olympe.sc.Ra,Brick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Action,GlobalProperties:olympe.sc.Ra.C,registerBrick:olympe.sc.logic.ya.C,FunctionBrick:olympe.sc.logic.Function,
1031
- Context:olympe.sc.Ra,Entry:olympe.dc.ua.Entry,PropertyModel:olympe.dm.Property,RelationModel:olympe.dm.Relation,StringModel:olympe.dm.String,NumberModel:olympe.dm.Number,BooleanModel:olympe.dm.Boolean,DatetimeModel:olympe.dm.DateTime,ColorModel:olympe.dm.Color,File:olympe.dm.File,User:olympe.dm.User,Enum:olympe.dm.ng,EnumValue:olympe.dm.Enum,Workflow:olympe.sc.workflow.Workflow,WorkflowState:olympe.sc.workflow.Re,WorkflowTransition:olympe.sc.workflow.Transition,WorkflowObjectState:olympe.sc.workflow.ObjectState,
1032
- Transaction:olympe.sc.Transaction,BurstTransaction:olympe.dc.si,QueryResult:olympe.dc.Ya,Query:olympe.dc.hb,QuerySingle:olympe.dc.md,Predicate:olympe.dc.ea.cb,RelatedTo:olympe.dc.ea.W.He,Order:olympe.dc.ea.ik,Config:class{static getParameter(a){return olympe.U.getParameter(a)}},Process:olympe.public.Process,Color:olympe.D.Color,ErrorFlow:olympe.sc.logic.Error,ServiceRequest:olympe.H.wa.gb.ha,Service:olympe.H.wa.gb.sb,Auth:olympe.public.Ua,AuthState:{INIT:olympe.auth.oa.C.INIT,DISCONNECTED:olympe.auth.oa.C.lf,
1033
- GUEST:olympe.auth.oa.C.og,AUTHENTICATING:olympe.auth.oa.C.ni,ERROR:olympe.auth.oa.C.cc,AUTHENTICATED:olympe.auth.oa.C.hf},Sync:olympe.dc.CloudObject,BusinessObject:olympe.dc.CloudObject,StringPrimitive:olympe.dm.String,NumberPrimitive:olympe.dm.Number,BooleanPrimitive:olympe.dm.Boolean,DatetimePrimitive:olympe.dm.DateTime,ColorPrimitive:olympe.dm.Color,PropertyPrimitive:olympe.dm.Property,RelationPrimitive:olympe.dm.Relation,DBView:class extends olympe.dc.ib{static get(){return olympe.dc.La()}},ListDef:olympe.dc.Da,
1034
- instanceToTag:olympe.dc.za,registerSync:olympe.dc.ya.C,getUniqueTag:olympe.X.Ue,onDestroy:a=>olympe.D.Na().onDestroy(a),offDestroy:a=>olympe.D.Na().Ze(a),FollowRules:olympe.dc.Qb,transformers:{Related:olympe.dc.Y.Sb,RecursiveRelated:olympe.dc.Y.Dc,Distinct:olympe.dc.Y.Ae,Filter:olympe.dc.Y.tc,Limit:olympe.dc.Y.ae,Sort:olympe.dc.Y.Jd,Union:olympe.dc.Y.Cf},ListDefPredicate:olympe.public.cb,predicates:{And:olympe.dc.W.Ud,Or:olympe.dc.W.be,Not:olympe.dc.W.ld,Equals:olympe.dc.W.Gc,Contains:olympe.dc.W.Uc,
1035
- Greater:olympe.dc.W.Ce,Smaller:olympe.dc.W.Je,HasRelated:olympe.dc.W.qf,InstanceOf:olympe.dc.W.sf,Regex:olympe.dc.W.vd},Comparator:olympe.public.Ne,comparators:{Number:olympe.dc.Eb.Number,String:olympe.dc.Eb.String,DateTime:olympe.dc.Eb.DateTime},valuedefs:{BooleanProperty:olympe.dc.pa.xe,StringProperty:olympe.dc.pa.se,NumberProperty:olympe.dc.pa.oe,DateTimeProperty:olympe.dc.pa.ne,Constant:olympe.dc.pa.Cd,Tag:olympe.dc.pa.Af}});
1021
+ olympe.sc.bg.wm=class{constructor(a,b,c,d,e,f,g,h,k){this.G=a;this.ba=b;this.K=c;this.V=this.P='';this.N=d;this.F=e;this.C=f;this.$=g;this.qa=null!=h?h:!1;this.la=null!=k?k:null}run(){const a=olympe.auth.oa.C.gf,b=olympe.auth.oa.C.kf,c=olympe.auth.oa.C.lg,d=olympe.auth.oa.C.mi,e=olympe.auth.oa.C.Xh,f=olympe.auth.oa.C.zh;this.N.debug('runtime starting for app #'+this.C);let g=!1;const h=()=>{g||(Vl(this),g=!0)};olympe.D.wc([this.G.getState()],k=>{switch(k){case e:case f:break;case a:case c:this.N.debug('Server session opened, calling once connected callback');
1022
+ Zl(this,h);break;case b:this.N.debug('Disconnected, working offline.');this.qa&&!g&&Zl(this,h);break;case d:this.N.debug('waiting for authentication');break;default:this.N.debug('No server session available, waiting for connection'),g=!1,Wl(this)}},'Runtime initial auth state listener')}};olympe.sc.bg.wm.C='app_instance';olympe.sc.bg.wm.ma=[olympe.vc.zs];olympe.sc.bg.Hj={xf:'sc.runtime.Main'};
1023
+ olympe.U.config(function(a){C(a,olympe.auth.R.Fj,[new olympe.U.fa(olympe.vc.Config.ff),new olympe.U.fa(olympe.sc.Config.ff),new olympe.U.fa(olympe.vc.Config.Il)],(b,c,d)=>new olympe.auth.ol(d?'':b+(c?'-'+c:'')));A(a,olympe.sc.bg.Hj.xf,olympe.sc.bg.wm,olympe.auth.R.Aa,olympe.dc.query.R.Aa,olympe.host.R.qg,olympe.sc.R.Ea,olympe.sc.R.vm,new olympe.U.fa(olympe.sc.Config.ff),new olympe.U.fa(olympe.dc.Config.eh),new olympe.U.fa(olympe.sc.Config.bq),new olympe.U.fa(olympe.sc.Config.vo));olympe.vc.yj(a,olympe.sc.bg.Hj.xf,
1024
+ 'sc.runtime');olympe.vc.yj(a,olympe.sc.bg.Hj.xf,'sc.headless');olympe.vc.yj(a,olympe.sc.bg.Hj.xf)},'olympe.sc.runtime');olympe.public={};function $l(a,b){const c=new olympe.auth.Request;for(const [d,e]of a)c.set(d,e);return new Promise(d=>{oc(olympe.public.Ua.get(),c,b,()=>{d()})})}
1025
+ olympe.public.Ua=class{static tw(a,b){return olympe.auth.Jb.Ie.hj(a,b)}static getState(){return uc(olympe.public.Ua.get())}static Fw(){return olympe.D.Xa(olympe.public.Ua.get().Hg())}static vy(a){const b=new olympe.D.Xb('Observe user tag','function'===typeof a.G?a.G():a);return new rxjs.Observable(c=>{b.run(()=>olympe.D.wc([olympe.public.Ua.get().Hg()],d=>{c.next(d);olympe.D.Na().onDestroy(()=>c.complete())}));return()=>b.destroy()})}static Zc(){return olympe.D.Xa(olympe.public.Ua.get().C.zb().Pd())}static Vw(){return olympe.D.Xa(olympe.public.Ua.get().fi())||
1026
+ void 0}static Uw(){return Array.from(olympe.public.Ua.get().F.G().keys())}static wh(){olympe.public.Ua.get().wh()}static qh(a){return new Promise((b,c)=>{olympe.public.Ua.get().qh(a,d=>d?c(d):b())})}static Vx(a,b){return $l((new Map).set('username',a).set('password',b),'srp')}static Wx(a){const b=olympe.public.Ua.get().F.G();if(0===b.size||a&&!b.has(a)){var c=0===b.size?'There are no available IDPs':`The IDP name ${a} is not valid, the valid names are ${Array.from(b.keys())}`;return Promise.reject(c)}a?
1027
+ (c=a,a=b.get(a)):(a=Array.from(b)[0],c=a[0],a=a[1]);return $l((new Map).set('idpName',c),a)}static Ux(){return $l(new Map,'saml')}static Xx(a,b){return $l((new Map).set('username',a).set('nonce',b),'localToken')}static Tx(){return $l(new Map,'openID')}static Zk(){return new Promise(a=>{wc(olympe.public.Ua.get(),()=>{olympe.public.Ua.get().V.delete('logoutCallback');a()},'logoutCallback');olympe.public.Ua.get().Zk()})}static get(){return olympe.auth.Sc()}};olympe.public.Ua.logout=olympe.public.Ua.Zk;
1028
+ olympe.public.Ua.loginOpenID=olympe.public.Ua.Tx;olympe.public.Ua.loginToken=olympe.public.Ua.Xx;olympe.public.Ua.loginSAML=olympe.public.Ua.Ux;olympe.public.Ua.loginSSO=olympe.public.Ua.Wx;olympe.public.Ua.loginSRP=olympe.public.Ua.Vx;olympe.public.Ua.getUserFromToken=olympe.public.Ua.qh;olympe.public.Ua.sendKeepAlive=olympe.public.Ua.wh;olympe.public.Ua.getIDPNames=olympe.public.Ua.Uw;olympe.public.Ua.getIDPToken=olympe.public.Ua.Vw;olympe.public.Ua.getToken=olympe.public.Ua.Zc;
1029
+ olympe.public.Ua.observeUser=olympe.public.Ua.vy;olympe.public.Ua.getCurrentUser=olympe.public.Ua.Fw;olympe.public.Ua.getState=olympe.public.Ua.getState;olympe.public.Ua.generateSRPData=olympe.public.Ua.tw;olympe.public.cb=class{static create(a){return new class extends olympe.dc.W.Sg{C(b,c){b=a(olympe.dc.CloudObject.get(c));if('boolean'===typeof b)return b;const d=olympe.D.Ic(olympe.D.ra),e=b.subscribe(f=>d.update(olympe.D.Ac(f)));olympe.D.Na().P(()=>e.unsubscribe());return d.zb()}}}};
1030
+ olympe.public.Ne=class{static create(a){return new class extends olympe.dc.Db.Sg{K(b,c){return olympe.dc.CloudObject.get(c)}G(b,c){b=a(b,c);if('number'===typeof b)return b;const d=olympe.D.Ic(olympe.D.ga),e=b.subscribe(f=>d.update(olympe.D.Ba(f)));olympe.D.Na().P(()=>e.unsubscribe());return d.zb()}}}};olympe.public.Process=class{static wy(a){const b=olympe.host.Rk(),c=b.C(a);return()=>b.K(c)}static xy(a){const b=olympe.host.Rk(),c=b.F(a);return()=>b.V(c)}};olympe.public.Process.onShutdown=olympe.public.Process.xy;olympe.public.Process.onHealthCheck=olympe.public.Process.wy;'object'===typeof exports&&(exports={CloudObject:olympe.dc.CloudObject,Relation:olympe.dc.ua.Relation,Direction:olympe.dc.Ca,generateTag:olympe.X.Ve,tagToString:olympe.dc.za,register:olympe.dc.register,defineProperty:olympe.dc.defineProperty,defineRelation:olympe.dc.lh,defineInverseRelation:olympe.dc.bw,BrickContext:olympe.sc.Ra,Brick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Action,GlobalProperties:olympe.sc.Ra.C,registerBrick:olympe.sc.logic.ya.C,FunctionBrick:olympe.sc.logic.Function,
1031
+ Context:olympe.sc.Ra,Entry:olympe.dc.ua.Entry,PropertyModel:olympe.dm.Property,RelationModel:olympe.dm.Relation,StringModel:olympe.dm.String,NumberModel:olympe.dm.Number,BooleanModel:olympe.dm.Boolean,DatetimeModel:olympe.dm.DateTime,ColorModel:olympe.dm.Color,File:olympe.dm.File,User:olympe.dm.User,Enum:olympe.dm.kg,EnumValue:olympe.dm.Enum,Workflow:olympe.sc.workflow.Workflow,WorkflowState:olympe.sc.workflow.Se,WorkflowTransition:olympe.sc.workflow.Transition,WorkflowObjectState:olympe.sc.workflow.ObjectState,
1032
+ Transaction:olympe.sc.Transaction,BurstTransaction:olympe.dc.ri,TransactionResult:olympe.sc.Wi,QueryResult:olympe.dc.Ya,Query:olympe.dc.hb,QuerySingle:olympe.dc.md,Predicate:olympe.dc.ea.cb,RelatedTo:olympe.dc.ea.W.He,Order:olympe.dc.ea.jk,Config:class{static getParameter(a){return olympe.U.getParameter(a)}},Process:olympe.public.Process,Color:olympe.D.Color,ErrorFlow:olympe.sc.logic.Error,ServiceRequest:olympe.H.wa.gb.ha,Service:olympe.H.wa.gb.sb,Auth:olympe.public.Ua,AuthState:{INIT:olympe.auth.oa.C.INIT,
1033
+ DISCONNECTED:olympe.auth.oa.C.kf,GUEST:olympe.auth.oa.C.lg,AUTHENTICATING:olympe.auth.oa.C.mi,ERROR:olympe.auth.oa.C.cc,AUTHENTICATED:olympe.auth.oa.C.gf},Sync:olympe.dc.CloudObject,BusinessObject:olympe.dc.CloudObject,StringPrimitive:olympe.dm.String,NumberPrimitive:olympe.dm.Number,BooleanPrimitive:olympe.dm.Boolean,DatetimePrimitive:olympe.dm.DateTime,ColorPrimitive:olympe.dm.Color,PropertyPrimitive:olympe.dm.Property,RelationPrimitive:olympe.dm.Relation,DBView:class extends olympe.dc.ib{static get(){return olympe.dc.La()}},
1034
+ ListDef:olympe.dc.Da,instanceToTag:olympe.dc.za,registerSync:olympe.dc.ya.C,getUniqueTag:olympe.X.Ve,onDestroy:a=>olympe.D.Na().onDestroy(a),offDestroy:a=>olympe.D.Na().Ng(a),FollowRules:olympe.dc.Qb,transformers:{Related:olympe.dc.Y.Sb,RecursiveRelated:olympe.dc.Y.Dc,Distinct:olympe.dc.Y.Ae,Filter:olympe.dc.Y.rc,Limit:olympe.dc.Y.$d,Sort:olympe.dc.Y.Id,Union:olympe.dc.Y.Af},ListDefPredicate:olympe.public.cb,predicates:{And:olympe.dc.W.Td,Or:olympe.dc.W.ae,Not:olympe.dc.W.ld,Equals:olympe.dc.W.Gc,
1035
+ Contains:olympe.dc.W.Uc,Greater:olympe.dc.W.Ce,Smaller:olympe.dc.W.Je,HasRelated:olympe.dc.W.pf,InstanceOf:olympe.dc.W.rf,Regex:olympe.dc.W.vd},Comparator:olympe.public.Ne,comparators:{Number:olympe.dc.Db.Number,String:olympe.dc.Db.String,DateTime:olympe.dc.Db.DateTime},valuedefs:{BooleanProperty:olympe.dc.pa.xe,StringProperty:olympe.dc.pa.se,NumberProperty:olympe.dc.pa.oe,DateTimeProperty:olympe.dc.pa.ne,Constant:olympe.dc.pa.Bd,Tag:olympe.dc.pa.yf}});
1036
1036
 
1037
1037
 
1038
1038
  }.bind(this))();