@olympeio/runtime-node 9.1.0 → 9.1.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,39 +211,39 @@ da('String.prototype.padStart',function(a){return a?a:function(b,c){var d=fa(thi
211
211
  da('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}});da('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}});da('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
  da('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
  da('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}});var ia=this||self;
214
- function z(a,b){a=a.split('.');let c=ia;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={gj:()=>'object'===typeof window?window:'object'===typeof global?global:self};olympe.gj().olympe=olympe;olympe.MC=(a,...b)=>{b.forEach(c=>{Object.getOwnPropertyNames(c.prototype).forEach(d=>{'constructor'!==d&&void 0===a.prototype[d]&&(a.prototype[d]=c.prototype[d])})})};olympe.ha={};olympe.ha.node={};'function'!==typeof require||global.Blob||(global.Blob=require('cross-blob'));olympe.T={};olympe.T.Bf={};olympe.T.Bf.mo=class{process(a){const b=Object.keys(a.Ae);let c,d;c=0;for(d=b.length;c<d;c++)if(a.Pd(b[c]).lj())throw Error('Service "'+b[c]+'" is defined as abstract and needs to be overridden');}};olympe.T.Bf.mo.la=[olympe.T.Bf.rq];olympe.T.Bf.no=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.ej(),h),g=g.Fi,null!==g))for(let k=0,l=g.length;k<l;k++)c(g[k].ej(),h)}function c(g,h){for(let k=0,l=g.length,n;k<l;k++)n=g[k],n instanceof olympe.T.zb&&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.Ae);const f={};for(let g=0,h=e.length;g<h;g++)f[e[g]]=
215
- !0;for(;void 0!==(e=d());)b(e,[])}};olympe.T.Bf.no.la=[olympe.T.Bf.rq];olympe.T.Bf.rq=class{process(){}};const ja=[],ka=[];olympe.T.qo=class{constructor(){}static C(a,b){ja.push(new olympe.T.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');});ka.push(new olympe.T.xl(b,c,a))}};olympe.T.config=olympe.T.qo.C;olympe.T.run=olympe.T.qo.F;olympe.T.pl=class{constructor(){}getValue(){}};olympe.T.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.T.zb(c[d]))}}ej(){return this.G}};function la(a,b,c){let d=a.C[b];if(void 0===d){const e=a.F[b];if(void 0===e){if(c===olympe.T.gf.C.Gh)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 ma(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.T.pl?f.getValue(a):f,na(a.N);return d}
216
- olympe.T.gf=class{constructor(a,b,c=2){this.F=a;this.parameters=b;this.C=Object.create(null);this.N=new olympe.T.Op(c);a=olympe.T.P.cg;if(void 0!==this.C[a])throw Error('Service "'+a+'" has already been instantiated');this.C[a]=this}Xa(){return this.N}getParameter(a){return this.parameters[a.toLowerCase()]}};olympe.T.gf.C={Ys:'exception',Gh:'null'};function oa(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){pa(a.N,'Defining service '+b);a.C(b,c,d,!1,!1)}function qa(a,b,c,...d){pa(a.N,'Defining service '+b);a.C(b,c,d,!1,!0)}
214
+ function z(a,b){a=a.split('.');let c=ia;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={gj:()=>'object'===typeof window?window:'object'===typeof global?global:self};olympe.gj().olympe=olympe;olympe.NC=(a,...b)=>{b.forEach(c=>{Object.getOwnPropertyNames(c.prototype).forEach(d=>{'constructor'!==d&&void 0===a.prototype[d]&&(a.prototype[d]=c.prototype[d])})})};olympe.ha={};olympe.ha.node={};'function'!==typeof require||global.Blob||(global.Blob=require('cross-blob'));olympe.T={};olympe.T.Bf={};olympe.T.Bf.mo=class{process(a){const b=Object.keys(a.Ae);let c,d;c=0;for(d=b.length;c<d;c++)if(a.Pd(b[c]).lj())throw Error('Service "'+b[c]+'" is defined as abstract and needs to be overridden');}};olympe.T.Bf.mo.la=[olympe.T.Bf.sq];olympe.T.Bf.no=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.ej(),h),g=g.Fi,null!==g))for(let k=0,l=g.length;k<l;k++)c(g[k].ej(),h)}function c(g,h){for(let k=0,l=g.length,n;k<l;k++)n=g[k],n instanceof olympe.T.zb&&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.Ae);const f={};for(let g=0,h=e.length;g<h;g++)f[e[g]]=
215
+ !0;for(;void 0!==(e=d());)b(e,[])}};olympe.T.Bf.no.la=[olympe.T.Bf.sq];olympe.T.Bf.sq=class{process(){}};const ja=[],ka=[];olympe.T.qo=class{constructor(){}static C(a,b){ja.push(new olympe.T.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');});ka.push(new olympe.T.xl(b,c,a))}};olympe.T.config=olympe.T.qo.C;olympe.T.run=olympe.T.qo.F;olympe.T.pl=class{constructor(){}getValue(){}};olympe.T.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.T.zb(c[d]))}}ej(){return this.G}};function la(a,b,c){let d=a.C[b];if(void 0===d){const e=a.F[b];if(void 0===e){if(c===olympe.T.gf.C.Gh)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 ma(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.T.pl?f.getValue(a):f,na(a.N);return d}
216
+ olympe.T.gf=class{constructor(a,b,c=2){this.F=a;this.parameters=b;this.C=Object.create(null);this.N=new olympe.T.Pp(c);a=olympe.T.P.cg;if(void 0!==this.C[a])throw Error('Service "'+a+'" has already been instantiated');this.C[a]=this}Xa(){return this.N}getParameter(a){return this.parameters[a.toLowerCase()]}};olympe.T.gf.C={Zs:'exception',Gh:'null'};function oa(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){pa(a.N,'Defining service '+b);a.C(b,c,d,!1,!1)}function qa(a,b,c,...d){pa(a.N,'Defining service '+b);a.C(b,c,d,!1,!0)}
217
217
  function C(a,b,c,d,e=!1){pa(a.N,'Defining service (as a factory) '+b);a.C(b,d,c,!0,e)}function ra(a,b,c,d=!1){pa(a.N,'Defining service alias '+b);a.C(b,e=>e,[c],!0,d)}function sa(a,b){pa(a.N,'Defining abstract service '+b);a.C(b).Ui=!0}function ta(a,b){a.parameters[olympe.H.Config.io.toLowerCase()]=b}function D(a,b,c){b=b.toLowerCase();Object.prototype.hasOwnProperty.call(a.parameters,b)||(a.parameters[b]=c)}
218
- olympe.T.Ls=class{constructor(a){var b=ua,c=va;this.Ae=Object.create(null);this.parameters=Object.create(null);this.L=[new olympe.T.Bf.mo,new olympe.T.Bf.no];this.F=[];b&&oa(this,b);c&&oa(this,c,'version');a&&oa(this,a);a=this.getParameter(olympe.T.Config.Zt);this.G=void 0!==a?a:3;this.N=new olympe.T.Op(this.G)}Xa(){return this.N}C(a,b,c,d,e){const f=a instanceof olympe.T.zb?a.Z():a;if(3<=arguments.length&&c){const h=c.indexOf(f);if(-1!==h){if(void 0===this.Ae[f])throw Error(`ContainerBuilder.define: Service ${f} references itself and is not an override definition!`);
218
+ olympe.T.Ms=class{constructor(a){var b=ua,c=va;this.Ae=Object.create(null);this.parameters=Object.create(null);this.L=[new olympe.T.Bf.mo,new olympe.T.Bf.no];this.F=[];b&&oa(this,b);c&&oa(this,c,'version');a&&oa(this,a);a=this.getParameter(olympe.T.Config.$t);this.G=void 0!==a?a:3;this.N=new olympe.T.Pp(this.G)}Xa(){return this.N}C(a,b,c,d,e){const f=a instanceof olympe.T.zb?a.Z():a;if(3<=arguments.length&&c){const h=c.indexOf(f);if(-1!==h){if(void 0===this.Ae[f])throw Error(`ContainerBuilder.define: Service ${f} references itself and is not an override definition!`);
219
219
  var g=this.Ae[f];g.id=g.id+'!!'+ ++olympe.T.Cl.C;g.F=!0;g=g.id;c[h]=g;this.Ae[g]=this.Ae[f]}}this.Ae[f]=new olympe.T.Cl(b,c,d||!1,f,e||!1);return this.Ae[f]}Pd(a){a=this.Ae[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++)pa(this.N,'Calling callback'),this.N.C++,a[b].call(null,this),na(this.N);na(this.N);this.N.debug('Configuration summary: '+
220
220
  Object.keys(this.Ae).length+' definitions');this.N.debug('Compiling...');this.N.C++;a=this.L;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);na(this.N);this.N.debug('Compilation done, returning container');return new olympe.T.gf(this.Ae,this.parameters,this.G)}};olympe.T.Cl=class{constructor(a,b,c,d,e=!0){this.G=a||null;this.L=!!c;this.C=[];this.Ui=!1;this.Fi=null;if(b){this.C=b;for(let f=0,g=b.length;f<g;f++)'string'===typeof b[f]&&(b[f]=new olympe.T.zb(b[f]))}this.id=d||'';this.U=e;this.F=!1}Z(){return this.id}instantiate(a){const b=a.Xa();b.debug('Resolving arguments for '+this.id);const c=this.G;let d=ma(a,this.C);const e=()=>{if(this.L)return c.apply(null,d);d.unshift(null);return new (c.bind.apply(c,d))};pa(b,'Instantiating '+this.id);const f=olympe.D?
221
- olympe.D.mh().run(()=>e()):e(),g=this.Fi;let h,k,l;if(null!==g&&0<g.length){b.C++;pa(b,'Calling configuration callbacks:');k=0;for(l=g.length;k<l;k++)b.C++,h=g[k],pa(b,'Calling additional configuration callback '+h.C),d=ma(a,h.ej()),d.push(f),h.F.apply(null,d),na(b);na(b)}pa(b,'Done instantiating '+this.id);return f}nj(){return this.U}ej(){return this.C}lj(){return this.Ui}config(a,b,c){null===this.Fi&&(this.Fi=[]);this.Fi.push(new olympe.T.xl(b,c,a))}};olympe.T.Cl.C=0;function na(a){0<a.C&&a.C--}function pa(a,b){1>=a.F&&wa(a,'log','DI: '+b)}function wa(a,b,c){if(console&&console[b]){var d='';for(let e=0;e<a.C;e++)d+=' ';console[b](d+c)}}olympe.T.Op=class{constructor(a){this.F=a;this.C=0}debug(a){2>=this.F&&wa(this,'log','DI: '+a)}info(a){3>=this.F&&wa(this,'info','DI: '+a)}warn(a){4>=this.F&&wa(this,'warn','DI: '+a)}error(a){5>=this.F&&wa(this,'error','DI: '+a)}};olympe.T.fa=class extends olympe.T.pl{constructor(a){super();this.id=a}Z(){return this.id}getValue(a){return a.getParameter(this.id)}};olympe.T.zb=class extends olympe.T.pl{constructor(a,b){super();this.id=a;this.C=b||olympe.T.gf.C.Ys}Z(){return this.id}getValue(a){return la(a,this.id,this.C)}};olympe.T.P={cg:'di.Container',FA:'di.PublicContainer'};olympe.T.Config={Zt:'logging.di'};olympe.T.run([olympe.T.P.cg],a=>{olympe.T.getParameter=b=>a.getParameter(b)});olympe.W={};function xa(a){a='0'.repeat(12)+a.toString(16);return a.substring(a.length-12,a.length)}function ya(){var a=Math.random();return xa((new Date).getTime())+(a.toString(16)+'0'.repeat(8)).substr(2,8)}let za=Math.pow(2,32)-1;olympe.W.fc=function(){return ya()};olympe.W.dj=function(){return ya()};olympe.W.Uk=function(a,b=1){const c=a.substr(12,a.length-12);return xa(parseInt(a.substr(0,12),16)+b)+c};
222
- olympe.W.Xw=function(a){return xa(parseInt(a.substr(0,12),16)+1)+(Math.random().toString(16)+'00000000').substr(2,8)};let Aa=0,Ba=0;olympe.W.hw=function(){var a=(new Date).getTime();a<=Aa?4294967295===Ba?(Ba=Math.floor(Math.random()/4*za),Aa+=1):Ba=Math.floor(Ba+(4294967295-Ba)/2):(Ba=Math.floor(Math.random()/4*za),Aa=a);a='00000000'+Ba.toString(16);return xa(Aa)+a.substr(a.length-8,8)};olympe.W.lD=function(){for(let a=0;1E4>a;a++)console.log(olympe.W.hw())};
223
- olympe.W.yg=function(){let a='';for(let b=0;19>b;b++)a+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return'@'+a};olympe.W.RC=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.W.OC=function(a,b){return(b?b:'UI')+'-'+a};olympe.W.zp=class{constructor(a){this.id=a||olympe.W.zp.C++}qb(a){return a?this.id===a.id:!1}toJSON(){return this.id.toString()}toString(){return this.id.toString()}};olympe.W.zp.C=0;olympe.W.rA=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.W.Eh=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.W.Eh.F=function(a){return new olympe.W.Eh(.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.W.Eh.C=function(){return new olympe.W.Eh(0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0)};olympe.W.Eh.prototype.set=function(a,b,c){this.values[5*a+b]=c};olympe.W.Eh.prototype.get=function(a,b){return this.values[5*a+b]};function Ca(a){return(new TextEncoder).encode(a).buffer}function Da(a){return(new TextDecoder('utf8')).decode(a)}olympe.W.tl=class{U(){}C(){}G(){}L(){}F(){}Y(){}};olympe.W.Br=a=>a.replace('+','-').replace('/','_');olympe.W.Dv=a=>a.replace('-','+').replace('_','/');function Ea(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?Ea(a):a.F&&a.F()},a.L)}function Fa(a,b){a.G=b;return a}
224
- olympe.W.er=class{constructor(a,b=a/2){this.timeout=a;this.L=b;this.values=new Map;this.F=this.G=this.C=null}add(a){this.values.set(a,Date.now());null===this.C&&Ea(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}};olympe.W.wm=class{constructor(a){this.F=Fa(new olympe.W.er(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 Ga(a,b){return a+b&4294967295}
221
+ olympe.D.mh().run(()=>e()):e(),g=this.Fi;let h,k,l;if(null!==g&&0<g.length){b.C++;pa(b,'Calling configuration callbacks:');k=0;for(l=g.length;k<l;k++)b.C++,h=g[k],pa(b,'Calling additional configuration callback '+h.C),d=ma(a,h.ej()),d.push(f),h.F.apply(null,d),na(b);na(b)}pa(b,'Done instantiating '+this.id);return f}nj(){return this.U}ej(){return this.C}lj(){return this.Ui}config(a,b,c){null===this.Fi&&(this.Fi=[]);this.Fi.push(new olympe.T.xl(b,c,a))}};olympe.T.Cl.C=0;function na(a){0<a.C&&a.C--}function pa(a,b){1>=a.F&&wa(a,'log','DI: '+b)}function wa(a,b,c){if(console&&console[b]){var d='';for(let e=0;e<a.C;e++)d+=' ';console[b](d+c)}}olympe.T.Pp=class{constructor(a){this.F=a;this.C=0}debug(a){2>=this.F&&wa(this,'log','DI: '+a)}info(a){3>=this.F&&wa(this,'info','DI: '+a)}warn(a){4>=this.F&&wa(this,'warn','DI: '+a)}error(a){5>=this.F&&wa(this,'error','DI: '+a)}};olympe.T.fa=class extends olympe.T.pl{constructor(a){super();this.id=a}Z(){return this.id}getValue(a){return a.getParameter(this.id)}};olympe.T.zb=class extends olympe.T.pl{constructor(a,b){super();this.id=a;this.C=b||olympe.T.gf.C.Zs}Z(){return this.id}getValue(a){return la(a,this.id,this.C)}};olympe.T.P={cg:'di.Container',GA:'di.PublicContainer'};olympe.T.Config={$t:'logging.di'};olympe.T.run([olympe.T.P.cg],a=>{olympe.T.getParameter=b=>a.getParameter(b)});olympe.W={};function xa(a){a='0'.repeat(12)+a.toString(16);return a.substring(a.length-12,a.length)}function ya(){var a=Math.random();return xa((new Date).getTime())+(a.toString(16)+'0'.repeat(8)).substr(2,8)}let za=Math.pow(2,32)-1;olympe.W.fc=function(){return ya()};olympe.W.dj=function(){return ya()};olympe.W.Uk=function(a,b=1){const c=a.substr(12,a.length-12);return xa(parseInt(a.substr(0,12),16)+b)+c};
222
+ olympe.W.Yw=function(a){return xa(parseInt(a.substr(0,12),16)+1)+(Math.random().toString(16)+'00000000').substr(2,8)};let Aa=0,Ba=0;olympe.W.iw=function(){var a=(new Date).getTime();a<=Aa?4294967295===Ba?(Ba=Math.floor(Math.random()/4*za),Aa+=1):Ba=Math.floor(Ba+(4294967295-Ba)/2):(Ba=Math.floor(Math.random()/4*za),Aa=a);a='00000000'+Ba.toString(16);return xa(Aa)+a.substr(a.length-8,8)};olympe.W.mD=function(){for(let a=0;1E4>a;a++)console.log(olympe.W.iw())};
223
+ olympe.W.yg=function(){let a='';for(let b=0;19>b;b++)a+='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'.charAt(Math.floor(62*Math.random()));return'@'+a};olympe.W.SC=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.W.PC=function(a,b){return(b?b:'UI')+'-'+a};olympe.W.Ap=class{constructor(a){this.id=a||olympe.W.Ap.C++}qb(a){return a?this.id===a.id:!1}toJSON(){return this.id.toString()}toString(){return this.id.toString()}};olympe.W.Ap.C=0;olympe.W.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.W.Eh=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.W.Eh.F=function(a){return new olympe.W.Eh(.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.W.Eh.C=function(){return new olympe.W.Eh(0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0)};olympe.W.Eh.prototype.set=function(a,b,c){this.values[5*a+b]=c};olympe.W.Eh.prototype.get=function(a,b){return this.values[5*a+b]};function Ca(a){return(new TextEncoder).encode(a).buffer}function Da(a){return(new TextDecoder('utf8')).decode(a)}olympe.W.tl=class{U(){}C(){}G(){}L(){}F(){}Y(){}};olympe.W.Cr=a=>a.replace('+','-').replace('/','_');olympe.W.Ev=a=>a.replace('-','+').replace('_','/');function Ea(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?Ea(a):a.F&&a.F()},a.L)}function Fa(a,b){a.G=b;return a}
224
+ olympe.W.fr=class{constructor(a,b=a/2){this.timeout=a;this.L=b;this.values=new Map;this.F=this.G=this.C=null}add(a){this.values.set(a,Date.now());null===this.C&&Ea(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}};olympe.W.wm=class{constructor(a){this.F=Fa(new olympe.W.fr(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 Ga(a,b){return a+b&4294967295}
225
225
  function Ha(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,
226
226
  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);
227
227
  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);
228
228
  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,
229
229
  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]=Ga(c,a[0]);a[1]=Ga(d,a[1]);a[2]=Ga(e,a[2]);a[3]=Ga(f,a[3])}function H(a,b,c,d,e,f){b=Ga(Ga(b,a),Ga(d,f));return Ga(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)}
230
230
  function Ia(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);Ha(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(Ha(a,g),f=0;16>f;f++)g[f]=0;g[14]=8*e;
231
- Ha(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'!==Ia('hello')&&(Ga=(a,b)=>{const c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535});olympe.W.mb=Ia;olympe.W.jy=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):
232
- r=decodeURIComponent(r);b[q[1]]=r}return{scheme:a||null,CC:g||null,rs:l||null,host:n||null,port:p&&parseInt(p,10)||null,path:h&&'/'!==h?h:null,query:k||null,PC:f||null,parameters:b}};olympe.W.gD=function(a){a=a.substring(1);return''===a?new Map:new Map(a.split('&').map(b=>b.split('=')))};olympe.W.jD=function(a){let b='';for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=(b?'&':'?')+c+'='+encodeURIComponent(a[c]));return b};
233
- olympe.W.Rr=(a,b)=>{const c=Object.keys(a).find(d=>a[d]===b);return void 0===c?null:c};olympe.W.xn=(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.W.xn(a[c],d):a[c]=d}};olympe.W.an=(a,b,c)=>{const d=Object.create(null);b(a,e=>{olympe.W.xn(d,e);b(`conf.d/${a}`,f=>{olympe.W.xn(d,f);c(d)})})};olympe.W.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)}Ag(){return Math.sqrt(this.x*this.x+this.y*this.y)}toString(){return`Vector(${this.x}, ${this.y})`}};olympe.W.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.W.bu=class{constructor(a,b){this.start=a;this.end=b}};olympe.W.bu.C={Gi:'left',Oi:'right',Zy:'bottom',VB:'top'};function Ja(a){a=/([0-9]*)\.([0-9]*)\.([0-9]*)-?([A-z\-_0-9]*)/.exec(a);if(null===a||4>a.length)return olympe.W.Sh.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.W.Sh.C:new olympe.W.Sh(b,c,d,a[4])}function Ka(a){return`${a.C}.${a.F}.${a.G}`}
234
- olympe.W.Sh=class{constructor(a,b,c,d){this.C=a;this.F=b;this.G=c;this.L=d||null}Vk(a){return this.C!==a.C?this.C>a.C:this.F!==a.F?this.F>a.F:this.G>a.G}zj(a){return this.C!==a.C?this.C<a.C:this.F!==a.F?this.F<a.F:this.G<a.G}qb(a){return this.C===a.C&&this.F===a.F&&this.G===a.G}toString(){return`${this.C}.${this.F}.${this.G}`+(null!==this.L?`-${this.L}`:'')}};olympe.W.Sh.C=new olympe.W.Sh(Number.NaN,Number.NaN,Number.NaN);olympe.W.P={vh:'utils.binaryConverter',ys:'utils.base64Converter'};olympe.T.config(a=>{sa(a,olympe.W.P.vh);ra(a,olympe.W.P.ys,olympe.W.P.vh,!0)},'Utils services');olympe.T.run([olympe.W.P.vh],a=>{olympe.W.ai=()=>a});olympe.ra={};olympe.ra.Pb=class{L(){}oa(){}G(){}aa(){}ka(){}Da(){}U(){}Y(){}trace(){}debug(){}log(){}info(){}warn(){}error(){}fatal(){}};olympe.ra.Pb.prototype.fatal=olympe.ra.Pb.prototype.fatal;olympe.ra.Pb.prototype.error=olympe.ra.Pb.prototype.error;olympe.ra.Pb.prototype.warn=olympe.ra.Pb.prototype.warn;olympe.ra.Pb.prototype.info=olympe.ra.Pb.prototype.info;olympe.ra.Pb.prototype.log=olympe.ra.Pb.prototype.log;olympe.ra.Pb.prototype.debug=olympe.ra.Pb.prototype.debug;olympe.ra.Pb.prototype.trace=olympe.ra.Pb.prototype.trace;
235
- olympe.ra.Pb.C={$u:0,dg:1,Yt:2,vp:3,jv:4,uc:5,at:6,am:7};olympe.ra.Pb.F={0:'TRACE',1:'DEBUG',2:'LOG',3:'INFO',4:'WARN',5:'ERROR',6:'FATAL',7:'NOTHING'};olympe.ra.sa=class{Rc(){}};olympe.ra.rd={};function La(a,b,c,d,e,f){var g=new Date;g=('00'+g.getHours()).substr(-2)+':'+('00'+g.getMinutes()).substr(-2)+':'+('00'+g.getSeconds()).substr(-2)+'.'+('00'+g.getMilliseconds()).substr(-3);f=a.Ya?`%c[${g}] [${f.toUpperCase()}] ${c}:%c`:`%c[${g}] ${c}:%c`;for(const h of d)f+=' '+h;a.Sa[b](f,'color: '+e,'color: #444');for(const h of a.Ld.values())h(g,c,b,...d)}
236
- olympe.ra.rd.Pb=class{constructor(a,b,c){this.name=a;this.C=b;this.Ya=c;this.F=a.toUpperCase();this.Ld=new Map;this.Sa=console}L(){return this.C}oa(){return this.C<=olympe.ra.Pb.C.$u}G(){return this.C<=olympe.ra.Pb.C.dg}ka(){return this.C<=olympe.ra.Pb.C.Yt}aa(){return this.C<=olympe.ra.Pb.C.vp}Da(){return this.C<=olympe.ra.Pb.C.jv}U(){return this.C<=olympe.ra.Pb.C.uc}Y(){return this.C<=olympe.ra.Pb.C.at}trace(...a){this.oa()&&La(this,'log',this.F,a,'#99b','trace')}debug(...a){this.G()&&La(this,'log',
237
- this.F,a,'#888','debug')}log(...a){this.ka()&&La(this,'log',this.F,a,'#000','log')}info(...a){this.aa()&&La(this,'info',this.F,a,'#00f','info')}warn(...a){this.Da()&&La(this,'warn',this.F,a,'#684911','warn')}error(...a){this.U()&&La(this,'error',this.F,a,'#f00','error')}fatal(...a){this.Y()&&La(this,'error',this.F,a,'#f00','fatal')}};olympe.ra.rd.Pb.la=[olympe.ra.Pb];olympe.ra.rd.sa=class{constructor(a,b,c){this.C=a;this.F=parseInt(b,10);this.G=c;this.channels=new Map;this.N=this.Rc('logging');this.N.info('Logging initialized, global log level is '+olympe.ra.Pb.F[b])}Rc(a){var b=this.channels.get(a);if(!b){b=this.F;var c=`${olympe.ra.Config.Ds}.${a}`;Object.prototype.hasOwnProperty.call(this.C.parameters,c.toLowerCase())&&(b=parseInt(this.C.getParameter(c),10));let d=this.G;c=`${c}.${olympe.ra.Config.Ou}`;Object.prototype.hasOwnProperty.call(this.C.parameters,
238
- c.toLowerCase())&&(d=!0===this.C.getParameter(c));b=new olympe.ra.rd.Pb(a,b,d);this.channels.set(a,b)}return b}};olympe.ra.rd.sa.la=[olympe.ra.sa];olympe.ra.P={xa:'logging.Manager'};olympe.ra.Config={Xo:'logging',Yo:'logging.showLogLevel',Ds:'logging',Ou:'showLogLevel'};olympe.T.config(function(a){D(a,olympe.ra.Config.Xo,olympe.ra.Pb.C.vp);D(a,olympe.ra.Config.Yo,!0);qa(a,olympe.ra.P.xa,olympe.ra.rd.sa,olympe.T.P.cg,new olympe.T.fa(olympe.ra.Config.Xo),new olympe.T.fa(olympe.ra.Config.Yo))},'olympe.logging');olympe.T.run([olympe.ra.P.xa],a=>{olympe.ra.Xa=b=>a.Rc(b)},'Logging singleton getter initialization');olympe.D={};olympe.D.Config={Up:'df.nodeCreationThreshold'};const Ma=[];function Na(){}function Oa(){}olympe.D.J=class a{constructor(b,c,d){this.C=void 0===b?Na:b;this.F=void 0===c?Ma:c;this.aa=d}static L(){var b=[];return void 0===b||0===b.length?olympe.D.J.ka:new a(Oa,b)}L(){return this.C?this.C():void 0}G(){return this.F?this.F:Ma}U(){return null===this.C&&null===this.F}Y(){return this.C===Oa}};olympe.D.J.aa=new olympe.D.J;olympe.D.J.C=new olympe.D.J(null,null);olympe.D.J.ka=new olympe.D.J(Oa);olympe.D.J.G=new olympe.D.J(()=>olympe.D.ea);
239
- olympe.D.J.F=new olympe.D.J(()=>olympe.D.Wa);olympe.D.J.U=new olympe.D.J(()=>olympe.D.qa);olympe.D.J.Y=new olympe.D.J(()=>olympe.D.lc);olympe.D.yh=class{Z(){return''}Lb(){return''}destroy(){}Ab(){return!1}G(){return!1}run(a,...b){return a(...b)}C(a){return a}getParent(){return null}be(){}kh(){}wc(){}ad(){}Nk(){}aa(){}onDestroy(){return''}Je(){}zc(){return''}Lc(){}};olympe.D.yh.prototype.offDestroy=olympe.D.yh.prototype.Je;olympe.D.yh.prototype.onDestroy=olympe.D.yh.prototype.onDestroy;let Pa=0;olympe.T.run([new olympe.T.fa(olympe.D.Config.Up)],()=>{});
240
- olympe.D.Xb=class{constructor(a='SimpleContext',b){++Pa;this.children=new Map;this.Da=new Map;this.oa=new Map;this.wb=0;this.name=a;this.id=String(Pa);this.ab=this.Sa=!1;(this.parent=void 0===b?olympe.D.Ja():b)&&this.parent.wc(this);this.debug=!1}Z(){return this.id}Lb(){return this.name}run(a,...b){if(!this.Sa){var c=olympe.D.ks(this);a=a(...b);c&&olympe.D.ks(c);return a}}C(a){return(...b)=>this.run(a,...b)}destroy(){if(!this.Sa&&!this.ab){this.ab=!0;this.aa();for(const a of this.Da.keys())this.Da.has(a)&&
231
+ Ha(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'!==Ia('hello')&&(Ga=(a,b)=>{const c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535});olympe.W.mb=Ia;olympe.W.ky=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):
232
+ r=decodeURIComponent(r);b[q[1]]=r}return{scheme:a||null,DC:g||null,ss:l||null,host:n||null,port:p&&parseInt(p,10)||null,path:h&&'/'!==h?h:null,query:k||null,QC:f||null,parameters:b}};olympe.W.hD=function(a){a=a.substring(1);return''===a?new Map:new Map(a.split('&').map(b=>b.split('=')))};olympe.W.kD=function(a){let b='';for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&(b+=(b?'&':'?')+c+'='+encodeURIComponent(a[c]));return b};
233
+ olympe.W.Sr=(a,b)=>{const c=Object.keys(a).find(d=>a[d]===b);return void 0===c?null:c};olympe.W.xn=(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.W.xn(a[c],d):a[c]=d}};olympe.W.an=(a,b,c)=>{const d=Object.create(null);b(a,e=>{olympe.W.xn(d,e);b(`conf.d/${a}`,f=>{olympe.W.xn(d,f);c(d)})})};olympe.W.AC=class a{constructor(b,c){this.x=b;this.y=c}add(b){return new a(this.x+b.x,this.y+b.y)}Ag(){return Math.sqrt(this.x*this.x+this.y*this.y)}toString(){return`Vector(${this.x}, ${this.y})`}};olympe.W.bz=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.W.cu=class{constructor(a,b){this.start=a;this.end=b}};olympe.W.cu.C={Gi:'left',Oi:'right',$y:'bottom',WB:'top'};function Ja(a){a=/([0-9]*)\.([0-9]*)\.([0-9]*)-?([A-z\-_0-9]*)/.exec(a);if(null===a||4>a.length)return olympe.W.Sh.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.W.Sh.C:new olympe.W.Sh(b,c,d,a[4])}function Ka(a){return`${a.C}.${a.F}.${a.G}`}
234
+ olympe.W.Sh=class{constructor(a,b,c,d){this.C=a;this.F=b;this.G=c;this.L=d||null}Vk(a){return this.C!==a.C?this.C>a.C:this.F!==a.F?this.F>a.F:this.G>a.G}zj(a){return this.C!==a.C?this.C<a.C:this.F!==a.F?this.F<a.F:this.G<a.G}qb(a){return this.C===a.C&&this.F===a.F&&this.G===a.G}toString(){return`${this.C}.${this.F}.${this.G}`+(null!==this.L?`-${this.L}`:'')}};olympe.W.Sh.C=new olympe.W.Sh(Number.NaN,Number.NaN,Number.NaN);olympe.W.P={vh:'utils.binaryConverter',zs:'utils.base64Converter'};olympe.T.config(a=>{sa(a,olympe.W.P.vh);ra(a,olympe.W.P.zs,olympe.W.P.vh,!0)},'Utils services');olympe.T.run([olympe.W.P.vh],a=>{olympe.W.ai=()=>a});olympe.ra={};olympe.ra.Pb=class{L(){}oa(){}G(){}aa(){}ja(){}Da(){}U(){}Y(){}trace(){}debug(){}log(){}info(){}warn(){}error(){}fatal(){}};olympe.ra.Pb.prototype.fatal=olympe.ra.Pb.prototype.fatal;olympe.ra.Pb.prototype.error=olympe.ra.Pb.prototype.error;olympe.ra.Pb.prototype.warn=olympe.ra.Pb.prototype.warn;olympe.ra.Pb.prototype.info=olympe.ra.Pb.prototype.info;olympe.ra.Pb.prototype.log=olympe.ra.Pb.prototype.log;olympe.ra.Pb.prototype.debug=olympe.ra.Pb.prototype.debug;olympe.ra.Pb.prototype.trace=olympe.ra.Pb.prototype.trace;
235
+ olympe.ra.Pb.C={av:0,dg:1,Zt:2,wp:3,kv:4,uc:5,bt:6,am:7};olympe.ra.Pb.F={0:'TRACE',1:'DEBUG',2:'LOG',3:'INFO',4:'WARN',5:'ERROR',6:'FATAL',7:'NOTHING'};olympe.ra.sa=class{Rc(){}};olympe.ra.rd={};function La(a,b,c,d,e,f){var g=new Date;g=('00'+g.getHours()).substr(-2)+':'+('00'+g.getMinutes()).substr(-2)+':'+('00'+g.getSeconds()).substr(-2)+'.'+('00'+g.getMilliseconds()).substr(-3);f=a.Ya?`%c[${g}] [${f.toUpperCase()}] ${c}:%c`:`%c[${g}] ${c}:%c`;for(const h of d)f+=' '+h;a.Sa[b](f,'color: '+e,'color: #444');for(const h of a.Ld.values())h(g,c,b,...d)}
236
+ olympe.ra.rd.Pb=class{constructor(a,b,c){this.name=a;this.C=b;this.Ya=c;this.F=a.toUpperCase();this.Ld=new Map;this.Sa=console}L(){return this.C}oa(){return this.C<=olympe.ra.Pb.C.av}G(){return this.C<=olympe.ra.Pb.C.dg}ja(){return this.C<=olympe.ra.Pb.C.Zt}aa(){return this.C<=olympe.ra.Pb.C.wp}Da(){return this.C<=olympe.ra.Pb.C.kv}U(){return this.C<=olympe.ra.Pb.C.uc}Y(){return this.C<=olympe.ra.Pb.C.bt}trace(...a){this.oa()&&La(this,'log',this.F,a,'#99b','trace')}debug(...a){this.G()&&La(this,'log',
237
+ this.F,a,'#888','debug')}log(...a){this.ja()&&La(this,'log',this.F,a,'#000','log')}info(...a){this.aa()&&La(this,'info',this.F,a,'#00f','info')}warn(...a){this.Da()&&La(this,'warn',this.F,a,'#684911','warn')}error(...a){this.U()&&La(this,'error',this.F,a,'#f00','error')}fatal(...a){this.Y()&&La(this,'error',this.F,a,'#f00','fatal')}};olympe.ra.rd.Pb.la=[olympe.ra.Pb];olympe.ra.rd.sa=class{constructor(a,b,c){this.C=a;this.F=parseInt(b,10);this.G=c;this.channels=new Map;this.N=this.Rc('logging');this.N.info('Logging initialized, global log level is '+olympe.ra.Pb.F[b])}Rc(a){var b=this.channels.get(a);if(!b){b=this.F;var c=`${olympe.ra.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.ra.Config.Pu}`;Object.prototype.hasOwnProperty.call(this.C.parameters,
238
+ c.toLowerCase())&&(d=!0===this.C.getParameter(c));b=new olympe.ra.rd.Pb(a,b,d);this.channels.set(a,b)}return b}};olympe.ra.rd.sa.la=[olympe.ra.sa];olympe.ra.P={xa:'logging.Manager'};olympe.ra.Config={Xo:'logging',Yo:'logging.showLogLevel',Es:'logging',Pu:'showLogLevel'};olympe.T.config(function(a){D(a,olympe.ra.Config.Xo,olympe.ra.Pb.C.wp);D(a,olympe.ra.Config.Yo,!0);qa(a,olympe.ra.P.xa,olympe.ra.rd.sa,olympe.T.P.cg,new olympe.T.fa(olympe.ra.Config.Xo),new olympe.T.fa(olympe.ra.Config.Yo))},'olympe.logging');olympe.T.run([olympe.ra.P.xa],a=>{olympe.ra.Xa=b=>a.Rc(b)},'Logging singleton getter initialization');olympe.D={};olympe.D.Config={Vp:'df.nodeCreationThreshold'};const Ma=[];function Na(){}function Oa(){}olympe.D.J=class a{constructor(b,c,d){this.C=void 0===b?Na:b;this.F=void 0===c?Ma:c;this.aa=d}static L(){var b=[];return void 0===b||0===b.length?olympe.D.J.ja:new a(Oa,b)}L(){return this.C?this.C():void 0}G(){return this.F?this.F:Ma}U(){return null===this.C&&null===this.F}Y(){return this.C===Oa}};olympe.D.J.aa=new olympe.D.J;olympe.D.J.C=new olympe.D.J(null,null);olympe.D.J.ja=new olympe.D.J(Oa);olympe.D.J.G=new olympe.D.J(()=>olympe.D.ea);
239
+ olympe.D.J.F=new olympe.D.J(()=>olympe.D.Wa);olympe.D.J.U=new olympe.D.J(()=>olympe.D.qa);olympe.D.J.Y=new olympe.D.J(()=>olympe.D.lc);olympe.D.yh=class{Z(){return''}Lb(){return''}destroy(){}Ab(){return!1}G(){return!1}run(a,...b){return a(...b)}C(a){return a}getParent(){return null}be(){}kh(){}wc(){}ad(){}Nk(){}aa(){}onDestroy(){return''}Je(){}zc(){return''}Lc(){}};olympe.D.yh.prototype.offDestroy=olympe.D.yh.prototype.Je;olympe.D.yh.prototype.onDestroy=olympe.D.yh.prototype.onDestroy;let Pa=0;olympe.T.run([new olympe.T.fa(olympe.D.Config.Vp)],()=>{});
240
+ olympe.D.Xb=class{constructor(a='SimpleContext',b){++Pa;this.children=new Map;this.Da=new Map;this.oa=new Map;this.wb=0;this.name=a;this.id=String(Pa);this.ab=this.Sa=!1;(this.parent=void 0===b?olympe.D.Ja():b)&&this.parent.wc(this);this.debug=!1}Z(){return this.id}Lb(){return this.name}run(a,...b){if(!this.Sa){var c=olympe.D.ls(this);a=a(...b);c&&olympe.D.ls(c);return a}}C(a){return(...b)=>this.run(a,...b)}destroy(){if(!this.Sa&&!this.ab){this.ab=!0;this.aa();for(const a of this.Da.keys())this.Da.has(a)&&
241
241
  this.Da.get(a)();this.Da.clear();this.oa.clear();this.parent&&(this.parent.ad(this,!1),this.parent=null);this.Sa=!0;this.ab=!1;this.aa()}}Ab(){return this.Sa}G(){return this.ab}wc(a){if(!this.Sa){var b;olympe.D.lb(a)?b=a.Na:olympe.D.qn(a)&&(b=a);b&&this.children.set(b.Z(),b)}}ad(a,b=!0){let c;olympe.D.lb(a)?c=a.Na:olympe.D.qn(a)&&(c=a);c&&this.children.has(c.Z())&&(b&&c.Nk(this),this.children.delete(c.Z()))}Nk(){this.parent=null;this.destroy()}aa(){const a=this.children;for(const b of a.keys())a.has(b)&&
242
242
  a.get(b).Nk(this);this.children.clear();for(const b of this.oa.keys())this.oa.has(b)&&this.oa.get(b)();this.oa.clear()}onDestroy(a,b){void 0===b&&(++this.wb,b=String(this.wb));this.Da.set(b,a);return b}Je(a){this.Da.delete(a)}zc(a){if(void 0===b){++this.wb;var b=String(this.wb)}this.oa.set(b,a);return b}Lc(a){this.oa.delete(a)}be(a){this.parent&&this.parent.ad(this,!1);(this.parent=a||null)&&this.parent.wc(this)}getParent(){return this.parent}kh(){return this.children}};
243
- olympe.D.Hq=class extends olympe.D.Xb{constructor(){super('Root',null)}destroy(){}onDestroy(){return''}Je(){}};olympe.D.yh.la=[olympe.D.yh];let Qa=0;
243
+ olympe.D.Iq=class extends olympe.D.Xb{constructor(){super('Root',null)}destroy(){}onDestroy(){return''}Je(){}};olympe.D.yh.la=[olympe.D.yh];let Qa=0;
244
244
  function Ra(a,b){a.Y||(a.Y=new Map);a.Y.set(b.Z(),b);switch(b.Rd()){case olympe.D.Node.C.Fh:break;case olympe.D.Node.C.Rh:break;case olympe.D.Node.C.ik:case olympe.D.Node.C.fg:olympe.D.N.warn('Not bad as such but should not happen!');break;case olympe.D.Node.C.zh:Sa(a,olympe.D.Node.C.zh);break;case olympe.D.Node.C.OBSOLETE:a.ac=!0;a.F!==olympe.D.Node.C.zh&&Sa(a,olympe.D.Node.C.OBSOLETE);break;case olympe.D.Node.C.eg:olympe.D.N.warn('Adding a destroyed node as upstream => should never happen!');break;
245
245
  default:olympe.D.N.warn('Unknown state, investigate: ',b.Rd())}Ta(b,a)}
246
- function Ua(a){if(a.Bd){var b=[],c=[];if(a.Xf)if(a.Xf instanceof olympe.D.Node)if(Va(a.Xf))b=a.Xf.Kb;else return;else b=a.Xf;else b=null;if(null!==a.ka){const e=a.ug;for(let f=0,g=a.ka.length;f<g;f++)if(null!==e&&-1<e.indexOf(f)){const h=a.ka[f];if(Va(h))c.push(h.Kb);else return}else c.push(a.ka[f])}if(a.Bd instanceof Function)var d=a.Bd;else b&&(b[a.Bd]||olympe.D.N.warn('looks like you forget a cast somewhere around '+a.Bd),d=b[a.Bd]);a.run(()=>{a.aa();if(void 0!==d){const e=d.apply(b,c);e&&e.vr?
246
+ function Ua(a){if(a.Bd){var b=[],c=[];if(a.Xf)if(a.Xf instanceof olympe.D.Node)if(Va(a.Xf))b=a.Xf.Kb;else return;else b=a.Xf;else b=null;if(null!==a.ja){const e=a.ug;for(let f=0,g=a.ja.length;f<g;f++)if(null!==e&&-1<e.indexOf(f)){const h=a.ja[f];if(Va(h))c.push(h.Kb);else return}else c.push(a.ja[f])}if(a.Bd instanceof Function)var d=a.Bd;else b&&(b[a.Bd]||olympe.D.N.warn('looks like you forget a cast somewhere around '+a.Bd),d=b[a.Bd]);a.run(()=>{a.aa();if(void 0!==d){const e=d.apply(b,c);e&&e.wr?
247
247
  Wa(a,e.Na):e instanceof olympe.D.Node?Wa(a,e):(K(a,e),void 0===e&&void 0===a.valueType&&Sa(a,olympe.D.Node.C.Rh))}else Xa(a)})}}function L(a){void 0===a.Ib&&(a.Ib=a.valueType===olympe.D.Proxy?Ya(void 0,a.yd):Ya(a.valueType,a.yd),a.Ib.Na=a);return a.Ib}function Za(a){void 0!==a.L&&($a(a.L,a),a.L=void 0)}function ab(a){if(a.F===olympe.D.Node.C.OBSOLETE&&(a.F=olympe.D.Node.C.Rh,null!==a.U))for(const b of a.U.values())bb(b)}function Sa(a,b){b!==a.F&&(a.F=b)}
248
248
  function cb(a){if(a.F!==olympe.D.Node.C.OBSOLETE&&a.F!==olympe.D.Node.C.ik&&a.F!==olympe.D.Node.C.Fh&&a.F!==olympe.D.Node.C.zh){Sa(a,olympe.D.Node.C.ik);var b=a.U;if(b)for(const c of b.values())b.has(c.Z())&&cb(c);Sa(a,olympe.D.Node.C.OBSOLETE)}}function db(a,b,c){if(a.F!==olympe.D.Node.C.fg)if(b===a.L)K(a,c,!0);else{if(a.F===olympe.D.Node.C.OBSOLETE||a.F===olympe.D.Node.C.ik)a.ac=!0;Ua(a)}}
249
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.Ya||c||void 0===a.L||Za(a);if(void 0!==b){if((a.Ya||a.F===olympe.D.Node.C.Rh||a.F===olympe.D.Node.C.OBSOLETE)&&!olympe.D.lb(b)&&void 0!==a.Kb){if(null===b&&null===a.Kb){ab(a);return}if(null!==b&&null!==a.Kb&&(b.valueOf()===a.Kb.valueOf()||a.Kb.qb&&a.Kb.qb(b))){ab(a);return}}if(!0===a.Ya)olympe.D.N.error("Circular dependency detected: updating a downstream node caused this node's (#"+
@@ -252,174 +252,174 @@ Object?d=!0:b.toLowerCase()!==e.toLowerCase()&&a.valueType!==Object&&(d=!0),d&&(
252
252
  function eb(a,b){if(a.F!==olympe.D.Node.C.fg&&a.F!==olympe.D.Node.C.eg&&(a.F!==olympe.D.Node.C.Fh||a.Bd)){var c=void 0!==a.defaultValue;a.Bd&&b!==a.L&&a.aa();if(c)K(a,a.defaultValue,!0);else if(a.Kb=void 0,Sa(a,olympe.D.Node.C.Fh),b=a.U)for(const d of b.values())eb(d,a)}}function Xa(a){if(a.F!==olympe.D.Node.C.zh){Sa(a,olympe.D.Node.C.zh);var b=a.U;if(b)for(const c of b.values())Xa(c);a.aa();void 0!==a.L&&Za(a);a.Kb=a.defaultValue}}function Va(a){return a.F===olympe.D.Node.C.Rh}
253
253
  function Wa(a,b){b===a?olympe.D.N.error('Setting a node as provider of itself. Ignoring'):(a.L&&a.L!==b&&Za(a),Ta(b,a),Va(b)?K(a,b.Kb,!0):void 0!==a.defaultValue?K(a,a.defaultValue,!0):eb(a),a.L=b)}function fb(a,b){a.Bd&&(a.Bd=void 0);a.zd='Repeater';Wa(a,b)}function bb(a){a.L?ab(a):null!==a.Y&&0===Array.from(a.Y.values()).filter(b=>!Va(b)).length&&(a.ac&&(a.ac=!1,Ua(a)),ab(a))}
254
254
  function Ta(a,b){a.U||(a.U=new Map);a.U.set(b.Z(),b);a.F===olympe.D.Node.C.eg&&olympe.D.N.warn('adding a downstream node on a deleted one (#'+a.Z()+') !')}function $a(a,b){a.U&&(b=b.Z(),a.U.has(b)&&(a.U.delete(b),gb(a)))}function gb(a){if(null===a.getParent()){var b=a.U;b&&0<b.size||a.destroy()}}
255
- olympe.D.Node=class extends olympe.D.Xb{constructor({valueType:a,Bd:b,my:c=!0,Xf:d,ln:e,debug:f=!1,ug:g=null,zd:h='Node',Vi:k}={}){++Qa;super(String(Qa));this.debug=!!f;this.zd=h;h&&'string'===typeof h||(b?this.zd=b.name?b.name:'anon()':this.zd='Node');this.ka=e&&0<e.length?e:null;this.ug=g&&0<g.length?g:null;this.valueType=a;this.Kb=void 0;this.Ya=!1;this.F=olympe.D.Node.C.Fh;this.ac=!1;this.U=this.Y=null;this.Bd=b;this.Xf=d||null;this.defaultValue=this.Ib=this.L=void 0;this.Vi=k;d&&d instanceof
255
+ olympe.D.Node=class extends olympe.D.Xb{constructor({valueType:a,Bd:b,ny:c=!0,Xf:d,ln:e,debug:f=!1,ug:g=null,zd:h='Node',Vi:k}={}){++Qa;super(String(Qa));this.debug=!!f;this.zd=h;h&&'string'===typeof h||(b?this.zd=b.name?b.name:'anon()':this.zd='Node');this.ja=e&&0<e.length?e:null;this.ug=g&&0<g.length?g:null;this.valueType=a;this.Kb=void 0;this.Ya=!1;this.F=olympe.D.Node.C.Fh;this.ac=!1;this.U=this.Y=null;this.Bd=b;this.Xf=d||null;this.defaultValue=this.Ib=this.L=void 0;this.Vi=k;d&&d instanceof
256
256
  olympe.D.Node&&Ra(this,d);if(g)for(b=0;b<g.length;b++)a=e[g[b]],Ra(this,a);c&&Ua(this)}bf(a){this.defaultValue=a;this.F===olympe.D.Node.C.Fh&&K(this,a,!0);return this}Zi(a){this.valueType=a}Yb(){return this.valueType||Object}Rd(){return this.F}Ab(){return this.F===olympe.D.Node.C.eg}G(){return this.F===olympe.D.Node.C.fg}yd(...a){if(this.Vi instanceof Function)return this.Vi(...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.fg&&
257
257
  a!==olympe.D.Node.C.eg||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.lb(g)&&b.push(g.Na);else for(let h=0,k=a.length;h<k;h++)g=a[h],f=e[g],void 0!==f&&null!==f&&f.zf&&(e[g]=f.Na,b.push(g));return L(new olympe.D.Node({valueType:d.L(),Bd:c,Xf:this,ln:e,debug:!1,ug:b,zd:'Proxy.'+c+'()'}))}Nk(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.be(null);gb(this)}destroy(){var a=this.F;if(a!==olympe.D.Node.C.fg&&a!==olympe.D.Node.C.eg){Sa(this,olympe.D.Node.C.fg);if(a=this.U){for(const c of a.values())if(a.has(c.Z())){var b=c;b.Y&&b.Y.delete(this.Z());b.L&&b.L.Z()===this.Z()?b.L=void 0:b.destroy()}a.clear()}this.U=null;super.destroy();if(this.Y){for(const c of this.Y.values())this.Y.has(c.Z())&&$a(c,this);this.Y.clear()}this.Y=null;this.L&&($a(this.L,this),this.L=void 0);this.Kb=void 0;this.ka&&(this.ka.length=
259
- 0,this.ka=null);this.ug&&(this.ug.length=0,this.ug=null);this.Vi=this.Bd=void 0;this.defaultValue=this.Xf=null;this.zd=`** Destroyed ** ${this.zd}`;Sa(this,olympe.D.Node.C.eg)}}Lb(){return this.zd}};olympe.D.Node.F='rootNode';olympe.D.Node.C={Fh:0,Rh:1,zh:3,ik:4,OBSOLETE:5,fg:6,eg:7};function Ya(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(hb(c,a.prototype));c.Hk=a;c.wr=b;return c}function hb(a,b){Object.prototype.hasOwnProperty.call(b,olympe.D.Proxy.km)||Object.defineProperty(b,olympe.D.Proxy.km,{enumerable:!1,configurable:!1,writable:!1,value:ib(a,b)});return b[olympe.D.Proxy.km]}
258
+ a,this.getParent());return}this.be(null);gb(this)}destroy(){var a=this.F;if(a!==olympe.D.Node.C.fg&&a!==olympe.D.Node.C.eg){Sa(this,olympe.D.Node.C.fg);if(a=this.U){for(const c of a.values())if(a.has(c.Z())){var b=c;b.Y&&b.Y.delete(this.Z());b.L&&b.L.Z()===this.Z()?b.L=void 0:b.destroy()}a.clear()}this.U=null;super.destroy();if(this.Y){for(const c of this.Y.values())this.Y.has(c.Z())&&$a(c,this);this.Y.clear()}this.Y=null;this.L&&($a(this.L,this),this.L=void 0);this.Kb=void 0;this.ja&&(this.ja.length=
259
+ 0,this.ja=null);this.ug&&(this.ug.length=0,this.ug=null);this.Vi=this.Bd=void 0;this.defaultValue=this.Xf=null;this.zd=`** Destroyed ** ${this.zd}`;Sa(this,olympe.D.Node.C.eg)}}Lb(){return this.zd}};olympe.D.Node.F='rootNode';olympe.D.Node.C={Fh:0,Rh:1,zh:3,ik:4,OBSOLETE:5,fg:6,eg:7};function Ya(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(hb(c,a.prototype));c.Hk=a;c.xr=b;return c}function hb(a,b){Object.prototype.hasOwnProperty.call(b,olympe.D.Proxy.km)||Object.defineProperty(b,olympe.D.Proxy.km,{enumerable:!1,configurable:!1,writable:!1,value:ib(a,b)});return b[olympe.D.Proxy.km]}
260
260
  function jb(a,b){if(a.Hk!==b){a.Hk=b;b.prototype||olympe.D.N.error('Cast not possible, provided type is not a valid type!');var c=hb(a,b.prototype);Object.setPrototypeOf?Object.setPrototypeOf(a,c):a.__proto__=c;a.Na&&a.Na.Zi(b)}}
261
- function ib(a,b){let c={};if(b.prototype)olympe.D.N.error('first level of prototyping, investigate');else if(b.__proto__)c=Object.create(hb(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].K;null===e||e&&e.U()?c[d]=function(...f){var g=this.Na;if(g&&Va(g)&&(g=g.Kb)&&g[d]&&'function'===typeof g[d])return g[d].apply(g,f)}:(e=e||b[d].__oSig__||olympe.D.J.aa,c[d]=function(...f){f=this.wr.call(this.Na,
261
+ function ib(a,b){let c={};if(b.prototype)olympe.D.N.error('first level of prototyping, investigate');else if(b.__proto__)c=Object.create(hb(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].K;null===e||e&&e.U()?c[d]=function(...f){var g=this.Na;if(g&&Va(g)&&(g=g.Kb)&&g[d]&&'function'===typeof g[d])return g[d].apply(g,f)}:(e=e||b[d].__oSig__||olympe.D.J.aa,c[d]=function(...f){f=this.xr.call(this.Na,
262
262
  ...f,e,d);const g=e.aa;if(g){const h=this.Na.Kb;h&&h[g]&&jb(f,h[g])}return e.Y()?this:f})}});return c}function kb(a,b){K(a.Na,b)}function lb(a){eb(a.Na)}function mb(a){olympe.D.Ec([olympe.D.qa.C],b=>{a.Na.bf(b)},'setDefaultValue');return a}function nb(a,b){fb(a.Na,olympe.D.Uf(b)?b:b.Na)}function ob(a,b){olympe.D.lb(b)||olympe.D.Uf(b)?nb(a,b):kb(a,b)}
263
- olympe.D.Proxy=class{constructor(a,b){this.Na=null;this.Hk=a;this.wr=b}static lb(a){return!(!a||!a.zf)}qb(a){return olympe.D.Fa([this,a],(b,c)=>b===c,Boolean)}Td(a){return olympe.D.Fa([this,a],(b,c)=>null===b||null===c?b===c?olympe.D.qa.F:olympe.D.qa.C:b.valueOf()===c.valueOf()?olympe.D.qa.F:olympe.D.qa.C,olympe.D.qa)}vr(){return this.Na}};olympe.D.Proxy.km='__opp__';olympe.D.Proxy.prototype.zf=!0;function pb(a,b){a.node.bf(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.lb(a)?K(this.node,olympe.D.bb(a)):K(this.node,a);return this}repeat(a){fb(this.node,olympe.D.lb(a)?a.Na:a);return this}clear(){eb(this.node);return this}Fb(){return L(this.node)}};function qb(a,b,c=1E3,d,e){const f=olympe.D.Uc(olympe.D.ea),g=d||olympe.D.ea.Do.Kp;let h,k,l,n;f.update(olympe.D.za(a));const p=window.performance.now(),q=b.valueOf();l=q-a.valueOf();if(0!==l&&void 0===n){const r=()=>{f.node.Ab()||(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.za(h)),1===k&&void 0!==e&&e(h),1>k&&(n=window.requestAnimationFrame(r)))};n=window.requestAnimationFrame(r)}return f.Fb()}
263
+ olympe.D.Proxy=class{constructor(a,b){this.Na=null;this.Hk=a;this.xr=b}static lb(a){return!(!a||!a.zf)}qb(a){return olympe.D.Fa([this,a],(b,c)=>b===c,Boolean)}Td(a){return olympe.D.Fa([this,a],(b,c)=>null===b||null===c?b===c?olympe.D.qa.F:olympe.D.qa.C:b.valueOf()===c.valueOf()?olympe.D.qa.F:olympe.D.qa.C,olympe.D.qa)}wr(){return this.Na}};olympe.D.Proxy.km='__opp__';olympe.D.Proxy.prototype.zf=!0;function pb(a,b){a.node.bf(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.lb(a)?K(this.node,olympe.D.bb(a)):K(this.node,a);return this}repeat(a){fb(this.node,olympe.D.lb(a)?a.Na:a);return this}clear(){eb(this.node);return this}Fb(){return L(this.node)}};function qb(a,b,c=1E3,d,e){const f=olympe.D.Uc(olympe.D.ea),g=d||olympe.D.ea.Do.Lp;let h,k,l,n;f.update(olympe.D.za(a));const p=window.performance.now(),q=b.valueOf();l=q-a.valueOf();if(0!==l&&void 0===n){const r=()=>{f.node.Ab()||(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.za(h)),1===k&&void 0!==e&&e(h),1>k&&(n=window.requestAnimationFrame(r)))};n=window.requestAnimationFrame(r)}return f.Fb()}
264
264
  olympe.D.ea=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.za(b.value)}Jn(){return'number'===typeof this.value&&!isNaN(this.value)}isNaN(){return olympe.D.Cc(!this.Jn())}Vc(){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
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.Jn()?this.valueOf().toFixed(a):''}static max(a){const b=new Map;let c=-Infinity;const d=olympe.D.Uc(olympe.D.ea,'ONumber.max result'),e=()=>{c=-Infinity;for(const f of b.values())f>c&&(c=f);d.update(olympe.D.za(c))};a.forEach((f,g)=>{olympe.D.Ec([f],h=>{b.set(g,h.valueOf());e()})},f=>{if(!d.node.Ab()){var g=b.get(f);b.delete(f);g===c&&
266
266
  e()}});return d.Fb()}he(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.za(b.valueOf()+c.valueOf()),olympe.D.ea,'ONumber.plus')}th(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.za(b.valueOf()-c.valueOf()),olympe.D.ea,'ONumber.minus')}round(){return olympe.D.za(Math.round(this.valueOf()))}Aj(){return olympe.D.za(-this.valueOf())}cl(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.za(b.valueOf()*c.valueOf()),olympe.D.ea,'ONumber.mul')}$i(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.za(b.valueOf()/c.valueOf()),
267
- olympe.D.ea,'ONumber.div')}Jx(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.za(b.valueOf()%c.valueOf()),olympe.D.ea,'ONumber.div')}floor(){return olympe.D.za(Math.floor(this.valueOf()))}ceil(){return olympe.D.za(Math.ceil(this.valueOf()))}trunc(){return olympe.D.za(Math.trunc(this.valueOf()))}log(){return olympe.D.za(Math.log(this.valueOf()))}pow(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.za(Math.pow(b.valueOf(),c.valueOf())),olympe.D.ea,'ONumber.pow')}exp(){return olympe.D.za(Math.exp(this.valueOf()))}Td(a){return olympe.D.Fa([this,
268
- a],(b,c)=>olympe.D.Cc(b.qb(c)),olympe.D.qa,'ONumber.oEquals')}qb(a){return this.valueOf()===(void 0!==a&&null!==a?a.valueOf():void 0)}valueOf(){return void 0!==this.value?this.value.valueOf():void 0}Pw(){return this.valueOf()}nn(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf()>c.valueOf()?olympe.D.qa.F:olympe.D.qa.C,olympe.D.qa,'ONumber.isBiggerThan')}ny(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf()>=c.valueOf()?b:olympe.D.za(c),olympe.D.ea,'ONumber.returnsBiggest')}hs(a){return olympe.D.Fa([this,
269
- a],(b,c)=>b.valueOf()<=c.valueOf()?b:olympe.D.za(c),olympe.D.ea,'ONumber.returnsSmallest')}yx(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf()<c.valueOf()?olympe.D.qa.F:olympe.D.qa.C,olympe.D.qa,'ONumber.isSmallerThan')}sin(){return olympe.D.za(Math.sin(this.valueOf()))}cos(){return olympe.D.za(Math.cos(this.valueOf()))}atan2(a){return olympe.D.lb(a)?olympe.D.ie([a],b=>olympe.D.za(Math.atan2(this.valueOf(),b.valueOf())),olympe.D.ea):olympe.D.za(Math.atan2(this.valueOf(),a.valueOf()))}abs(){return olympe.D.za(Math.abs(this.valueOf()))}qj(a,
270
- b){return olympe.D.lb(a)||olympe.D.lb(b)?olympe.D.ie([a,b],(c,d)=>olympe.D.za(this.valueOf()*d.valueOf()+c.valueOf()*(1-d.valueOf())),olympe.D.ea):olympe.D.za(this.valueOf()*b.valueOf()+a.valueOf()*(1-b.valueOf()))}static mv(a,b,c,d){'number'===typeof a&&(a=olympe.D.ge(a));'number'===typeof b&&(b=olympe.D.ge(b));'number'===typeof c&&(c=olympe.D.ge(c));let e=0;const f=olympe.D.ge(0);let g,h;void 0!==b&&void 0!==c&&olympe.D.kn(b.nn(c),()=>{olympe.ra.Xa('df').warn('You have a min bigger than max, cap your inputs')});
267
+ olympe.D.ea,'ONumber.div')}Kx(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.za(b.valueOf()%c.valueOf()),olympe.D.ea,'ONumber.div')}floor(){return olympe.D.za(Math.floor(this.valueOf()))}ceil(){return olympe.D.za(Math.ceil(this.valueOf()))}trunc(){return olympe.D.za(Math.trunc(this.valueOf()))}log(){return olympe.D.za(Math.log(this.valueOf()))}pow(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.za(Math.pow(b.valueOf(),c.valueOf())),olympe.D.ea,'ONumber.pow')}exp(){return olympe.D.za(Math.exp(this.valueOf()))}Td(a){return olympe.D.Fa([this,
268
+ a],(b,c)=>olympe.D.Cc(b.qb(c)),olympe.D.qa,'ONumber.oEquals')}qb(a){return this.valueOf()===(void 0!==a&&null!==a?a.valueOf():void 0)}valueOf(){return void 0!==this.value?this.value.valueOf():void 0}Qw(){return this.valueOf()}nn(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf()>c.valueOf()?olympe.D.qa.F:olympe.D.qa.C,olympe.D.qa,'ONumber.isBiggerThan')}oy(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf()>=c.valueOf()?b:olympe.D.za(c),olympe.D.ea,'ONumber.returnsBiggest')}js(a){return olympe.D.Fa([this,
269
+ a],(b,c)=>b.valueOf()<=c.valueOf()?b:olympe.D.za(c),olympe.D.ea,'ONumber.returnsSmallest')}zx(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf()<c.valueOf()?olympe.D.qa.F:olympe.D.qa.C,olympe.D.qa,'ONumber.isSmallerThan')}sin(){return olympe.D.za(Math.sin(this.valueOf()))}cos(){return olympe.D.za(Math.cos(this.valueOf()))}atan2(a){return olympe.D.lb(a)?olympe.D.ie([a],b=>olympe.D.za(Math.atan2(this.valueOf(),b.valueOf())),olympe.D.ea):olympe.D.za(Math.atan2(this.valueOf(),a.valueOf()))}abs(){return olympe.D.za(Math.abs(this.valueOf()))}qj(a,
270
+ b){return olympe.D.lb(a)||olympe.D.lb(b)?olympe.D.ie([a,b],(c,d)=>olympe.D.za(this.valueOf()*d.valueOf()+c.valueOf()*(1-d.valueOf())),olympe.D.ea):olympe.D.za(this.valueOf()*b.valueOf()+a.valueOf()*(1-b.valueOf()))}static nv(a,b,c,d){'number'===typeof a&&(a=olympe.D.ge(a));'number'===typeof b&&(b=olympe.D.ge(b));'number'===typeof c&&(c=olympe.D.ge(c));let e=0;const f=olympe.D.ge(0);let g,h;void 0!==b&&void 0!==c&&olympe.D.kn(b.nn(c),()=>{olympe.ra.Xa('df').warn('You have a min bigger than max, cap your inputs')});
271
271
  const k=(l,n)=>{n=olympe.D.ge(n);const p=olympe.D.ea.animate(n,500);nb(f,p);kb(n,olympe.D.za(l));e=l};olympe.D.ie([a],l=>{e+=l.valueOf();e>h?k(h,e):e<g?k(g,e):nb(f,olympe.D.ge(e))},olympe.D.ea);void 0!==b&&olympe.D.el(b.valueOf(),l=>{if(g!==l&&(g=l,g>e)){const n=olympe.D.ge(e),p=olympe.D.ea.animate(n,400,d);l=olympe.D.za(g);K(n.Na,l);e=g;nb(f,p)}});void 0!==c&&olympe.D.el(c.valueOf(),l=>{if(h!==l&&(h=l,h<e)){const n=olympe.D.ge(e),p=olympe.D.ea.animate(n,400,d);l=olympe.D.za(h);K(n.Na,l);e=h;nb(f,
272
- p)}});return f}static offset(a){let b;return olympe.D.ie([a],c=>{void 0===b&&(b=c);return olympe.D.za(c-b)},olympe.D.ea,'offset')}static Kr(a){let b,c,d;return olympe.D.Fa([a],e=>{if(void 0===b)return b=e,c=window.performance.now(),olympe.D.za(0);d=window.performance.now();const f=olympe.D.za((e.valueOf()-b.valueOf())/(d-c));b=e;c=d;return f},olympe.D.ea,'derivative')}static tx(a){let b=olympe.D.za(0),c,d,e;return olympe.D.Fa([a],f=>{if(void 0===c)return c=f,d=window.performance.now(),olympe.D.za(0);
273
- e=window.performance.now();b=b.he((f.valueOf()+c.valueOf())/2*(e-d));c=f;d=e;return b},olympe.D.ea,'integrate')}static Sv(a){let b;return olympe.D.Fa([a],c=>{void 0===b&&(b=c.valueOf());const d=olympe.D.za(c.valueOf()-b.valueOf());b=c;return d},olympe.D.ea,'diff')}static Gv(a,b,c){return olympe.D.ie([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.za(d>=e?d<=f?d:f:e)},olympe.D.ea)}static animate(a,b,c,d){let e;
274
- return e=olympe.D.Fa([a],f=>{const g=olympe.D.bb(b,1E3),h=olympe.D.bb(e);return void 0===h?olympe.D.za(f):qb(h,f,g,c,k=>{d&&d(k)})},olympe.D.ea)}static yv(a,b,c){let d,e,f,g,h,k,l=olympe.D.ge(),n;olympe.D.Ec([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);kb(l,olympe.D.za(g));1===h&&(clearTimeout(n),n=void 0)},0))});return l}static Vc(a){return olympe.D.lb(a)?
272
+ p)}});return f}static offset(a){let b;return olympe.D.ie([a],c=>{void 0===b&&(b=c);return olympe.D.za(c-b)},olympe.D.ea,'offset')}static Lr(a){let b,c,d;return olympe.D.Fa([a],e=>{if(void 0===b)return b=e,c=window.performance.now(),olympe.D.za(0);d=window.performance.now();const f=olympe.D.za((e.valueOf()-b.valueOf())/(d-c));b=e;c=d;return f},olympe.D.ea,'derivative')}static ux(a){let b=olympe.D.za(0),c,d,e;return olympe.D.Fa([a],f=>{if(void 0===c)return c=f,d=window.performance.now(),olympe.D.za(0);
273
+ e=window.performance.now();b=b.he((f.valueOf()+c.valueOf())/2*(e-d));c=f;d=e;return b},olympe.D.ea,'integrate')}static Tv(a){let b;return olympe.D.Fa([a],c=>{void 0===b&&(b=c.valueOf());const d=olympe.D.za(c.valueOf()-b.valueOf());b=c;return d},olympe.D.ea,'diff')}static Hv(a,b,c){return olympe.D.ie([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.za(d>=e?d<=f?d:f:e)},olympe.D.ea)}static animate(a,b,c,d){let e;
274
+ return e=olympe.D.Fa([a],f=>{const g=olympe.D.bb(b,1E3),h=olympe.D.bb(e);return void 0===h?olympe.D.za(f):qb(h,f,g,c,k=>{d&&d(k)})},olympe.D.ea)}static zv(a,b,c){let d,e,f,g,h,k,l=olympe.D.ge(),n;olympe.D.Ec([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);kb(l,olympe.D.za(g));1===h&&(clearTimeout(n),n=void 0)},0))});return l}static Vc(a){return olympe.D.lb(a)?
275
275
  olympe.D.Fa([a],b=>olympe.D.Bb(b.valueOf().toString()),olympe.D.Wa):olympe.D.Bb(a)}static Aj(a){return olympe.D.lb(a)?olympe.D.Fa([a],b=>olympe.D.za(-b.valueOf()),olympe.D.ea):olympe.D.za(-a.valueOf())}static he(a,b){return olympe.D.lb(a)||olympe.D.lb(b)?olympe.D.Fa([a,b],(c,d)=>olympe.D.za(c.valueOf()+d.valueOf()),olympe.D.ea,'plus'):olympe.D.za(a.valueOf()+b.valueOf())}static th(a,b){return olympe.D.lb(a)||olympe.D.lb(b)?olympe.D.ie([a,b],(c,d)=>olympe.D.za(c.valueOf()-d.valueOf()),olympe.D.ea,
276
- 'minus'):olympe.D.za(a.valueOf()-b.valueOf())}static $i(a,b){return olympe.D.lb(a)||olympe.D.lb(b)?olympe.D.ie([a,b],(c,d)=>olympe.D.za(c.valueOf()/d.valueOf()),olympe.D.ea,'div'):olympe.D.za(a.valueOf()/b.valueOf())}static ky(a,b){if(void 0===b)return a;olympe.D.Ec([b],c=>{c=olympe.D.za(a.Na.Kb.valueOf()+c.valueOf());K(a.Na,c)},'plusEqual');return a}};olympe.D.ea.ZERO=new olympe.D.ea(0);olympe.D.ea.ONE=new olympe.D.ea(1);olympe.D.ea.bv=new olympe.D.ea(2);olympe.D.ea.PI=new olympe.D.ea(Math.PI);
277
- olympe.D.ea.rt=new olympe.D.ea(Infinity);olympe.D.ea.iu=new olympe.D.ea(-Infinity);olympe.D.ea.Tp=new olympe.D.ea(NaN);olympe.D.ea.HA=olympe.D.ea.ky;olympe.D.ea.Py=olympe.D.ea.mv;olympe.D.ea.xA=olympe.D.ea.offset;olympe.D.ea.pz=olympe.D.ea.Kr;olympe.D.ea.JC=olympe.D.ea.Kr;olympe.D.ea.iA=olympe.D.ea.tx;olympe.D.ea.qz=olympe.D.ea.Sv;olympe.D.ea.ez=olympe.D.ea.Gv;olympe.D.ea.Qy=olympe.D.ea.animate;olympe.D.ea.Ry=olympe.D.ea.yv;olympe.D.ea.WB=olympe.D.ea.Vc;olympe.D.ea.XB=olympe.D.ea.Aj;
278
- olympe.D.ea.GA=olympe.D.ea.he;olympe.D.ea.sA=olympe.D.ea.th;olympe.D.ea.rz=olympe.D.ea.$i;
279
- olympe.D.ea.Do={Kp:function(a,b,c,d){return c*a/d+b},Mz:function(a,b,c,d){a/=d;return c*a*a+b},Wz:function(a,b,c,d){a/=d;return-c*a*(a-2)+b},Iz: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},Bz:function(a,b,c,d){a/=d;return c*a*a*a+b},Sz:function(a,b,c,d){a/=d;a--;return c*(a*a*a+1)+b},Gz: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},Nz:function(a,b,c,d){a/=d;return c*a*a*a*a+b},Xz:function(a,b,c,d){a/=d;a--;return-c*(a*a*a*a-1)+b},
280
- Jz: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},Oz:function(a,b,c,d){a/=d;return c*a*a*a*a*a+b},Yz:function(a,b,c,d){a/=d;a--;return c*(a*a*a*a*a+1)+b},Kz: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},Pz:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},Zz:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},Lz:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},Ez:function(a,b,c,d){return c*Math.pow(2,
281
- 10*(a/d-1))+b},Vz:function(a,b,c,d){return c*(-Math.pow(2,-10*a/d)+1)+b},Hz: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},Az:function(a,b,c,d){a/=d;return-c*(Math.sqrt(1-a*a)-1)+b},Rz:function(a,b,c,d){a/=d;a--;return c*Math.sqrt(1-a*a)+b},Fz: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)},Uz: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)},Tz: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)},Dz:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(33*a*d+-59*d*d+32*a+-5*d)},Cz:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(56*a*d+-105*d*d+60*a+-10*d)},Qz: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.ea.prototype;m.toJSON.K=olympe.D.J.C;m.Jn.K=olympe.D.J.C;m.isNaN.K=olympe.D.J.U;m.Vc.K=olympe.D.J.F;
284
- m.toString.K=new olympe.D.J(()=>String,[]);m.toFixed.K=new olympe.D.J(()=>String,[]);m.he.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.th.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.round.K=olympe.D.J.G;m.Aj.K=olympe.D.J.G;m.cl.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.$i.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.Jx.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.floor.K=olympe.D.J.G;m.ceil.K=olympe.D.J.G;m.trunc.K=olympe.D.J.G;m.log.K=olympe.D.J.G;m.pow.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.exp.K=olympe.D.J.G;
285
- m.Td.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.qb.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;m.Pw.K=olympe.D.J.C;m.nn.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.ny.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.hs.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.yx.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.sin.K=olympe.D.J.G;m.cos.K=olympe.D.J.G;m.atan2.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.abs.K=olympe.D.J.G;m.qj.K=new olympe.D.J(()=>olympe.D.ea,[0,1]);olympe.D.Wa=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)}Gr(a){return olympe.D.Wa.concat(this,'.',a)}concat(...a){let b;Array.isArray(a[0])?b=a[0]:b=a;return olympe.D.Fa([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.Wa,'OString.concat')}Vc(){return this}Jy(a){return olympe.D.za(parseInt(this.value,
286
- a))}ps(){return olympe.D.za(parseFloat(this.value))}toString(){return this.value}valueOf(){return this.value.valueOf()}qb(a){return this.value===(void 0===a||null===a?void 0:a.valueOf())}Td(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Cc(c&&b.valueOf()===c.valueOf()),olympe.D.qa,'OString.oEquals')}Sf(){return olympe.D.Cc(!this.value||0===this.value.length)}contains(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Cc((c instanceof olympe.D.Wa||'string'===typeof c)&&b.valueOf().includes(c.valueOf())),
276
+ 'minus'):olympe.D.za(a.valueOf()-b.valueOf())}static $i(a,b){return olympe.D.lb(a)||olympe.D.lb(b)?olympe.D.ie([a,b],(c,d)=>olympe.D.za(c.valueOf()/d.valueOf()),olympe.D.ea,'div'):olympe.D.za(a.valueOf()/b.valueOf())}static ly(a,b){if(void 0===b)return a;olympe.D.Ec([b],c=>{c=olympe.D.za(a.Na.Kb.valueOf()+c.valueOf());K(a.Na,c)},'plusEqual');return a}};olympe.D.ea.ZERO=new olympe.D.ea(0);olympe.D.ea.ONE=new olympe.D.ea(1);olympe.D.ea.dv=new olympe.D.ea(2);olympe.D.ea.PI=new olympe.D.ea(Math.PI);
277
+ olympe.D.ea.st=new olympe.D.ea(Infinity);olympe.D.ea.ju=new olympe.D.ea(-Infinity);olympe.D.ea.Up=new olympe.D.ea(NaN);olympe.D.ea.IA=olympe.D.ea.ly;olympe.D.ea.Qy=olympe.D.ea.nv;olympe.D.ea.yA=olympe.D.ea.offset;olympe.D.ea.qz=olympe.D.ea.Lr;olympe.D.ea.KC=olympe.D.ea.Lr;olympe.D.ea.jA=olympe.D.ea.ux;olympe.D.ea.rz=olympe.D.ea.Tv;olympe.D.ea.fz=olympe.D.ea.Hv;olympe.D.ea.Ry=olympe.D.ea.animate;olympe.D.ea.Sy=olympe.D.ea.zv;olympe.D.ea.XB=olympe.D.ea.Vc;olympe.D.ea.YB=olympe.D.ea.Aj;
278
+ olympe.D.ea.HA=olympe.D.ea.he;olympe.D.ea.tA=olympe.D.ea.th;olympe.D.ea.sz=olympe.D.ea.$i;
279
+ olympe.D.ea.Do={Lp:function(a,b,c,d){return c*a/d+b},Nz:function(a,b,c,d){a/=d;return c*a*a+b},Xz:function(a,b,c,d){a/=d;return-c*a*(a-2)+b},Jz: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},Cz:function(a,b,c,d){a/=d;return c*a*a*a+b},Tz:function(a,b,c,d){a/=d;a--;return c*(a*a*a+1)+b},Hz: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},Oz:function(a,b,c,d){a/=d;return c*a*a*a*a+b},Yz:function(a,b,c,d){a/=d;a--;return-c*(a*a*a*a-1)+b},
280
+ Kz: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},Pz:function(a,b,c,d){a/=d;return c*a*a*a*a*a+b},Zz:function(a,b,c,d){a/=d;a--;return c*(a*a*a*a*a+1)+b},Lz: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},Qz:function(a,b,c,d){return-c*Math.cos(a/d*(Math.PI/2))+c+b},$z:function(a,b,c,d){return c*Math.sin(a/d*(Math.PI/2))+b},Mz:function(a,b,c,d){return-c/2*(Math.cos(Math.PI*a/d)-1)+b},Fz:function(a,b,c,d){return c*Math.pow(2,
281
+ 10*(a/d-1))+b},Wz:function(a,b,c,d){return c*(-Math.pow(2,-10*a/d)+1)+b},Iz: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},Bz:function(a,b,c,d){a/=d;return-c*(Math.sqrt(1-a*a)-1)+b},Sz:function(a,b,c,d){a/=d;a--;return c*Math.sqrt(1-a*a)+b},Gz: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},wz:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-3*d)},xz:function(a,b,c,d){d=(a/=d)*a;return b+
282
+ c*(2*d*d+2*d*a+-3*d)},yz:function(a,b,c,d){d=(a/=d)*a;return b+c*(4*d*a+-9*d+6*a)},zz:function(a,b,c,d){d=(a/=d)*a;return b+c*(-2*d*d+10*d*a+-15*d+8*a)},Vz: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)},Uz: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)},Ez:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(33*a*d+-59*d*d+32*a+-5*d)},Dz:function(a,b,c,d){d=(a/=d)*a;a*=d;return b+c*(56*a*d+-105*d*d+60*a+-10*d)},Rz: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},Az: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.ea.prototype;m.toJSON.K=olympe.D.J.C;m.Jn.K=olympe.D.J.C;m.isNaN.K=olympe.D.J.U;m.Vc.K=olympe.D.J.F;
284
+ m.toString.K=new olympe.D.J(()=>String,[]);m.toFixed.K=new olympe.D.J(()=>String,[]);m.he.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.th.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.round.K=olympe.D.J.G;m.Aj.K=olympe.D.J.G;m.cl.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.$i.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.Kx.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.floor.K=olympe.D.J.G;m.ceil.K=olympe.D.J.G;m.trunc.K=olympe.D.J.G;m.log.K=olympe.D.J.G;m.pow.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.exp.K=olympe.D.J.G;
285
+ m.Td.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.qb.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;m.Qw.K=olympe.D.J.C;m.nn.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.oy.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.js.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.zx.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.sin.K=olympe.D.J.G;m.cos.K=olympe.D.J.G;m.atan2.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.abs.K=olympe.D.J.G;m.qj.K=new olympe.D.J(()=>olympe.D.ea,[0,1]);olympe.D.Wa=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)}Hr(a){return olympe.D.Wa.concat(this,'.',a)}concat(...a){let b;Array.isArray(a[0])?b=a[0]:b=a;return olympe.D.Fa([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.Wa,'OString.concat')}Vc(){return this}Ky(a){return olympe.D.za(parseInt(this.value,
286
+ a))}qs(){return olympe.D.za(parseFloat(this.value))}toString(){return this.value}valueOf(){return this.value.valueOf()}qb(a){return this.value===(void 0===a||null===a?void 0:a.valueOf())}Td(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Cc(c&&b.valueOf()===c.valueOf()),olympe.D.qa,'OString.oEquals')}Sf(){return olympe.D.Cc(!this.value||0===this.value.length)}contains(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Cc((c instanceof olympe.D.Wa||'string'===typeof c)&&b.valueOf().includes(c.valueOf())),
287
287
  olympe.D.qa,'OString.contains')}startsWith(a,b){return olympe.D.Fa([this,a,b||0],(c,d,e)=>olympe.D.Cc(c.valueOf().startsWith(d.valueOf(),e.valueOf())),olympe.D.qa,'OString.startsWith')}endsWith(a,b){return olympe.D.Fa([this,a,b||-1],(c,d,e)=>{e=0<=e.valueOf()?e.valueOf():this.Ag().valueOf()+e.valueOf()+1;return olympe.D.Cc(c.valueOf().endsWith(d.valueOf(),e))},olympe.D.qa,'OString.endsWith')}indexOf(a,b){return olympe.D.Fa([this,a,b||0],(c,d,e)=>olympe.D.za(c.valueOf().indexOf(d.valueOf(),e.valueOf())),
288
288
  olympe.D.ea,'OString.indexOf')}lastIndexOf(a,b){return olympe.D.Fa([this,a,b||Infinity],(c,d,e)=>olympe.D.za(c.valueOf().lastIndexOf(d.valueOf(),e.valueOf())),olympe.D.ea,'OString.lastIndexOf')}slice(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().slice(d.valueOf(),e?e.valueOf():void 0)),olympe.D.Wa,'OString.slice')}Ag(){return olympe.D.za(this.value.length)}threshold(a){return olympe.D.Fa([this,a],(b,c)=>b.valueOf().length>=c.valueOf()?b:olympe.D.Wa.EMPTY,olympe.D.Wa,'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.Fa([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().padStart(d.valueOf(),e.valueOf())),olympe.D.Wa,'OString.padStart')}padEnd(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().padEnd(d.valueOf(),e.valueOf())),olympe.D.Wa,'OString.padEnd')}replace(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().replace(d.valueOf(),e.valueOf())),olympe.D.Wa,'OString.replace')}Gy(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().substr(d.valueOf(),
290
- e.valueOf())),olympe.D.Wa,'OString.subOStr')}static concat(...a){return olympe.D.Bb('').concat(...a)}};olympe.D.Wa.EMPTY=new olympe.D.Wa('');olympe.D.Wa.Pu=new olympe.D.Wa(' ');m=olympe.D.Wa.prototype;m.toJSON.K=olympe.D.J.C;m.Gr.K=new olympe.D.J(()=>olympe.D.Wa,[0,1]);m.concat.K=olympe.D.J.F;m.Vc.K=olympe.D.J.F;m.Jy.K=olympe.D.J.G;m.ps.K=olympe.D.J.G;m.toString.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;m.qb.K=olympe.D.J.C;m.Td.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.Sf.K=olympe.D.J.U;
289
+ b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().padStart(d.valueOf(),e.valueOf())),olympe.D.Wa,'OString.padStart')}padEnd(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().padEnd(d.valueOf(),e.valueOf())),olympe.D.Wa,'OString.padEnd')}replace(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().replace(d.valueOf(),e.valueOf())),olympe.D.Wa,'OString.replace')}Hy(a,b){return olympe.D.Fa([this,a,b],(c,d,e)=>olympe.D.Bb(c.valueOf().substr(d.valueOf(),
290
+ e.valueOf())),olympe.D.Wa,'OString.subOStr')}static concat(...a){return olympe.D.Bb('').concat(...a)}};olympe.D.Wa.EMPTY=new olympe.D.Wa('');olympe.D.Wa.Qu=new olympe.D.Wa(' ');m=olympe.D.Wa.prototype;m.toJSON.K=olympe.D.J.C;m.Hr.K=new olympe.D.J(()=>olympe.D.Wa,[0,1]);m.concat.K=olympe.D.J.F;m.Vc.K=olympe.D.J.F;m.Ky.K=olympe.D.J.G;m.qs.K=olympe.D.J.G;m.toString.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;m.qb.K=olympe.D.J.C;m.Td.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.Sf.K=olympe.D.J.U;
291
291
  m.contains.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.startsWith.K=new olympe.D.J(()=>olympe.D.qa,[0,1]);m.endsWith.K=new olympe.D.J(()=>olympe.D.qa,[0,1]);m.indexOf.K=new olympe.D.J(()=>olympe.D.ea,[0,1]);m.lastIndexOf.K=new olympe.D.J(()=>olympe.D.ea,[0,1]);m.slice.K=new olympe.D.J(()=>olympe.D.Wa,[0,1]);m.Ag.K=olympe.D.J.G;m.threshold.K=new olympe.D.J(()=>olympe.D.Wa,[0]);m.toLowerCase.K=olympe.D.J.F;m.toUpperCase.K=olympe.D.J.F;m.trim.K=olympe.D.J.F;m.padStart.K=olympe.D.J.F;m.padEnd.K=olympe.D.J.F;
292
- m.replace.K=olympe.D.J.F;m.Gy.K=olympe.D.J.F;olympe.D.qa=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.qa.F:olympe.D.qa.C}and(a){if(void 0!==a)return olympe.D.lb(a)?olympe.D.ie([a],b=>new olympe.D.qa(this.valueOf()&&b.valueOf()),olympe.D.qa,'and'):this.value&&a.valueOf()?olympe.D.qa.F:olympe.D.qa.C}qb(a){return this.valueOf()===(void 0!==a?a.valueOf():void 0)}Td(a){if(void 0!==a)return olympe.D.lb(a)?
293
- olympe.D.ie([a],b=>new olympe.D.qa(this.valueOf()===b.valueOf()),olympe.D.qa,'oEquals'):this.qb(a)?olympe.D.qa.F:olympe.D.qa.C}not(){return this.value?olympe.D.qa.C:olympe.D.qa.F}xv(a){if(void 0!==a)return olympe.D.lb(a)?olympe.D.ie([a],b=>new olympe.D.qa(!(this.valueOf()&&b.valueOf())),olympe.D.qa,'andNot'):this.value&&!a.valueOf()?olympe.D.qa.F:olympe.D.qa.C}or(a){if(void 0!==a)return olympe.D.lb(a)?olympe.D.ie([a],b=>new olympe.D.qa(this.valueOf()||b.valueOf()),olympe.D.qa,'or'):this.value||a.valueOf()?
294
- olympe.D.qa.F:olympe.D.qa.C}xor(a){return olympe.D.Fa([this,a],(b,c)=>{b=b.valueOf();c=c.valueOf();return olympe.D.Cc(b&&!c||!b&&c)},olympe.D.qa,'OBoolean.xor')}jw(){return this.value}Sr(){return!0===this.value?olympe.D.ea.ONE:olympe.D.ea.ZERO}Vc(){return olympe.D.Bb(this.toString())}toString(){return this.value?'true':'false'}valueOf(){return this.value}};olympe.D.qa.F=new olympe.D.qa(!0);olympe.D.qa.C=new olympe.D.qa(!1);m=olympe.D.qa.prototype;m.toJSON.K=olympe.D.J.C;
295
- m.and.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.qb.K=olympe.D.J.C;m.Td.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.not.K=olympe.D.J.U;m.xv.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.or.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.xor.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.jw.K=new olympe.D.J(()=>Boolean,[]);m.Sr.K=olympe.D.J.G;m.Vc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;function rb(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)}oj(){return this.yb&&!isNaN(this.yb.getTime())?olympe.D.qa.F:olympe.D.qa.C}yt(){return olympe.D.za(this.yb.getMilliseconds())}At(){return olympe.D.za(this.yb.getSeconds())}zt(){return olympe.D.za(this.yb.getMinutes())}xt(){return olympe.D.za(this.yb.getHours())}tw(){return olympe.D.za(this.yb.getDate())}getMonth(){return olympe.D.za(this.yb.getMonth()+1)}Bt(){return olympe.D.za(this.yb.getFullYear())}getTime(){return this.yb.getTime()}Dy(){var a=
292
+ m.replace.K=olympe.D.J.F;m.Hy.K=olympe.D.J.F;olympe.D.qa=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.qa.F:olympe.D.qa.C}and(a){if(void 0!==a)return olympe.D.lb(a)?olympe.D.ie([a],b=>new olympe.D.qa(this.valueOf()&&b.valueOf()),olympe.D.qa,'and'):this.value&&a.valueOf()?olympe.D.qa.F:olympe.D.qa.C}qb(a){return this.valueOf()===(void 0!==a?a.valueOf():void 0)}Td(a){if(void 0!==a)return olympe.D.lb(a)?
293
+ olympe.D.ie([a],b=>new olympe.D.qa(this.valueOf()===b.valueOf()),olympe.D.qa,'oEquals'):this.qb(a)?olympe.D.qa.F:olympe.D.qa.C}not(){return this.value?olympe.D.qa.C:olympe.D.qa.F}yv(a){if(void 0!==a)return olympe.D.lb(a)?olympe.D.ie([a],b=>new olympe.D.qa(!(this.valueOf()&&b.valueOf())),olympe.D.qa,'andNot'):this.value&&!a.valueOf()?olympe.D.qa.F:olympe.D.qa.C}or(a){if(void 0!==a)return olympe.D.lb(a)?olympe.D.ie([a],b=>new olympe.D.qa(this.valueOf()||b.valueOf()),olympe.D.qa,'or'):this.value||a.valueOf()?
294
+ olympe.D.qa.F:olympe.D.qa.C}xor(a){return olympe.D.Fa([this,a],(b,c)=>{b=b.valueOf();c=c.valueOf();return olympe.D.Cc(b&&!c||!b&&c)},olympe.D.qa,'OBoolean.xor')}kw(){return this.value}Tr(){return!0===this.value?olympe.D.ea.ONE:olympe.D.ea.ZERO}Vc(){return olympe.D.Bb(this.toString())}toString(){return this.value?'true':'false'}valueOf(){return this.value}};olympe.D.qa.F=new olympe.D.qa(!0);olympe.D.qa.C=new olympe.D.qa(!1);m=olympe.D.qa.prototype;m.toJSON.K=olympe.D.J.C;
295
+ m.and.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.qb.K=olympe.D.J.C;m.Td.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.not.K=olympe.D.J.U;m.yv.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.or.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.xor.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.kw.K=new olympe.D.J(()=>Boolean,[]);m.Tr.K=olympe.D.J.G;m.Vc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.valueOf.K=olympe.D.J.C;function rb(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)}oj(){return this.yb&&!isNaN(this.yb.getTime())?olympe.D.qa.F:olympe.D.qa.C}zt(){return olympe.D.za(this.yb.getMilliseconds())}Bt(){return olympe.D.za(this.yb.getSeconds())}At(){return olympe.D.za(this.yb.getMinutes())}yt(){return olympe.D.za(this.yb.getHours())}uw(){return olympe.D.za(this.yb.getDate())}getMonth(){return olympe.D.za(this.yb.getMonth()+1)}Ct(){return olympe.D.za(this.yb.getFullYear())}getTime(){return this.yb.getTime()}Ey(){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.Fa([this,a],(b,c)=>olympe.D.Bb(b.yb.toLocaleString(c.valueOf())),olympe.D.Wa)}toLocaleDateString(a){return void 0===a||'string'===typeof a?olympe.D.Bb(this.yb.toLocaleDateString(a)):olympe.D.Fa([this,a],(b,c)=>olympe.D.Bb(b.yb.toLocaleDateString(c.valueOf())),
298
- olympe.D.Wa)}toLocaleTimeString(a){return void 0===a||'string'===typeof a?olympe.D.Bb(this.yb.toLocaleTimeString(a)):olympe.D.Fa([this,a],(b,c)=>olympe.D.Bb(b.yb.toLocaleTimeString(c.valueOf())),olympe.D.Wa)}Vc(){return olympe.D.Bb(this.yb.toISOString())}ns(){return new Date(this.getTime())}Iy(){return this}Ky(){return this}kg(a,b){return olympe.D.Fa([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)}ov(a){return this.kg('Milliseconds',
299
- a)}uv(a){return this.kg('Seconds',a)}pv(a){return this.kg('Minutes',a)}nv(a){return this.kg('Hours',a)}Hm(a){return this.kg('Date',a)}vv(a){return'number'===typeof a?this.Hm(7*a):this.Hm(a.cl(7))}qv(a){return this.kg('Month',a)}wv(a){return this.kg('FullYear',a)}Ey(){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))}Fy(){return new olympe.D.jb(new Date(this.yb.getFullYear(),this.yb.getMonth()))}Td(a){return olympe.D.Fa([a],
300
- b=>olympe.D.Cc(this.qb(b)),olympe.D.qa)}qb(a){return a instanceof olympe.D.jb?this.getTime()===a.getTime()||isNaN(this.getTime())&&isNaN(a.getTime()):!1}Iw(){let a=this.yb.getDay();0===a&&(a=7);return olympe.D.za(a)}xw(a,b){return olympe.D.Fa([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.ra.Xa('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.za(c)},olympe.D.ea)}wx(a){return olympe.D.Fa([a],b=>olympe.D.Cc(this.getTime()<b.getTime()),olympe.D.qa)}ux(a){return olympe.D.Fa([a],b=>olympe.D.Cc(this.getTime()>b.getTime()),olympe.D.qa)}xx(a,b){return olympe.D.Fa([a,b],(c,d)=>olympe.D.Cc(this.getTime()>c.getTime()&&this.getTime()<d.getTime()),olympe.D.qa)}valueOf(){return this.oj().valueOf()?
302
- new Date(this.getTime()):new Date(0)}};olympe.D.jb.C=rb(0);olympe.D.jb.F=rb(Number.NaN);m=olympe.D.jb.prototype;m.oj.K=olympe.D.J.U;m.yt.K=olympe.D.J.G;m.At.K=olympe.D.J.G;m.zt.K=olympe.D.J.G;m.xt.K=olympe.D.J.G;m.tw.K=olympe.D.J.G;m.getMonth.K=olympe.D.J.G;m.Bt.K=olympe.D.J.G;m.getTime.K=olympe.D.J.C;m.Dy.K=new olympe.D.J(()=>olympe.D.Wa,[0]);m.toLocaleString.K=olympe.D.J.F;m.toLocaleDateString.K=olympe.D.J.F;m.toLocaleTimeString.K=olympe.D.J.F;m.Vc.K=olympe.D.J.F;m.ns.K=olympe.D.J.C;
303
- m.Iy.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Ky.K=new olympe.D.J(()=>olympe.D.jb,[]);m.kg.K=new olympe.D.J(()=>olympe.D.jb,[]);m.ov.K=new olympe.D.J(()=>olympe.D.jb,[]);m.uv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.pv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.nv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Hm.K=new olympe.D.J(()=>olympe.D.jb,[0]);m.vv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.qv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.wv.K=new olympe.D.J(()=>olympe.D.jb,[0]);
304
- m.Ey.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Fy.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Td.K=olympe.D.J.U;m.qb.K=olympe.D.J.C;m.Iw.K=olympe.D.J.G;m.xw.K=new olympe.D.J(()=>olympe.D.ea,[0,1]);m.wx.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.ux.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.xx.K=new olympe.D.J(()=>olympe.D.qa,[0,1]);m.valueOf.K=olympe.D.J.C;const sb=new Map,tb=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,ub=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;function vb(a){const b=c=>{let d;c=c.valueOf();6>c.length?(d=17,c=ub.exec(c)):(d=1,c=tb.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.Vf(a)?olympe.D.ie([a],b,olympe.D.Color):b(a)}
298
+ olympe.D.Wa)}toLocaleTimeString(a){return void 0===a||'string'===typeof a?olympe.D.Bb(this.yb.toLocaleTimeString(a)):olympe.D.Fa([this,a],(b,c)=>olympe.D.Bb(b.yb.toLocaleTimeString(c.valueOf())),olympe.D.Wa)}Vc(){return olympe.D.Bb(this.yb.toISOString())}ps(){return new Date(this.getTime())}Jy(){return this}Ly(){return this}kg(a,b){return olympe.D.Fa([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)}pv(a){return this.kg('Milliseconds',
299
+ a)}vv(a){return this.kg('Seconds',a)}qv(a){return this.kg('Minutes',a)}ov(a){return this.kg('Hours',a)}Hm(a){return this.kg('Date',a)}wv(a){return'number'===typeof a?this.Hm(7*a):this.Hm(a.cl(7))}rv(a){return this.kg('Month',a)}xv(a){return this.kg('FullYear',a)}Fy(){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))}Gy(){return new olympe.D.jb(new Date(this.yb.getFullYear(),this.yb.getMonth()))}Td(a){return olympe.D.Fa([a],
300
+ b=>olympe.D.Cc(this.qb(b)),olympe.D.qa)}qb(a){return a instanceof olympe.D.jb?this.getTime()===a.getTime()||isNaN(this.getTime())&&isNaN(a.getTime()):!1}Jw(){let a=this.yb.getDay();0===a&&(a=7);return olympe.D.za(a)}yw(a,b){return olympe.D.Fa([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.ra.Xa('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.za(c)},olympe.D.ea)}xx(a){return olympe.D.Fa([a],b=>olympe.D.Cc(this.getTime()<b.getTime()),olympe.D.qa)}vx(a){return olympe.D.Fa([a],b=>olympe.D.Cc(this.getTime()>b.getTime()),olympe.D.qa)}yx(a,b){return olympe.D.Fa([a,b],(c,d)=>olympe.D.Cc(this.getTime()>c.getTime()&&this.getTime()<d.getTime()),olympe.D.qa)}valueOf(){return this.oj().valueOf()?
302
+ new Date(this.getTime()):new Date(0)}};olympe.D.jb.C=rb(0);olympe.D.jb.F=rb(Number.NaN);m=olympe.D.jb.prototype;m.oj.K=olympe.D.J.U;m.zt.K=olympe.D.J.G;m.Bt.K=olympe.D.J.G;m.At.K=olympe.D.J.G;m.yt.K=olympe.D.J.G;m.uw.K=olympe.D.J.G;m.getMonth.K=olympe.D.J.G;m.Ct.K=olympe.D.J.G;m.getTime.K=olympe.D.J.C;m.Ey.K=new olympe.D.J(()=>olympe.D.Wa,[0]);m.toLocaleString.K=olympe.D.J.F;m.toLocaleDateString.K=olympe.D.J.F;m.toLocaleTimeString.K=olympe.D.J.F;m.Vc.K=olympe.D.J.F;m.ps.K=olympe.D.J.C;
303
+ m.Jy.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Ly.K=new olympe.D.J(()=>olympe.D.jb,[]);m.kg.K=new olympe.D.J(()=>olympe.D.jb,[]);m.pv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.vv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.qv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.ov.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Hm.K=new olympe.D.J(()=>olympe.D.jb,[0]);m.wv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.rv.K=new olympe.D.J(()=>olympe.D.jb,[]);m.xv.K=new olympe.D.J(()=>olympe.D.jb,[0]);
304
+ m.Fy.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Gy.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Td.K=olympe.D.J.U;m.qb.K=olympe.D.J.C;m.Jw.K=olympe.D.J.G;m.yw.K=new olympe.D.J(()=>olympe.D.ea,[0,1]);m.xx.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.vx.K=new olympe.D.J(()=>olympe.D.qa,[0]);m.yx.K=new olympe.D.J(()=>olympe.D.qa,[0,1]);m.valueOf.K=olympe.D.J.C;const sb=new Map,tb=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,ub=/^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;function vb(a){const b=c=>{let d;c=c.valueOf();6>c.length?(d=17,c=ub.exec(c)):(d=1,c=tb.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.Vf(a)?olympe.D.ie([a],b,olympe.D.Color):b(a)}
305
305
  olympe.D.Color=class{constructor(a,b,c,d){this.C=olympe.D.za(void 0!==a?Math.min(255,Math.max(0,Math.round(a))):0);this.F=olympe.D.za(void 0!==b?Math.min(255,Math.max(0,Math.round(b))):0);this.b=olympe.D.za(void 0!==c?Math.min(255,Math.max(0,Math.round(c))):0);this.a=olympe.D.za(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.Fa([a,b,c,d],(e,f,g,h)=>{e=olympe.D.za(void 0!==e?Math.min(255,Math.max(0,Math.round(e.valueOf()))):0);f=olympe.D.za(void 0!==f?Math.min(255,Math.max(0,Math.round(f.valueOf()))):0);g=olympe.D.za(void 0!==g?Math.min(255,Math.max(0,Math.round(g.valueOf()))):0);h=olympe.D.za(void 0!==h?Math.min(1,Math.max(0,h.valueOf())):1);for(let k of sb.values())if(k&&k.C.qb(e)&&k.F.qb(f)&&k.b.qb(g)&&k.a.qb(h))return k;
307
- return new olympe.D.Color(e,f,g,h)},olympe.D.Color)}Qf(){return this.C}Ff(){return this.b}Kf(){return this.F}Ef(){return this.a}Ev(a,b){return olympe.D.Color.create(this.C.qj(a.Qf(),b),this.F.qj(a.Kf(),b),this.b.qj(a.Ff(),b),this.a.qj(a.Ef(),b))}$v(a){return olympe.D.Color.create(this.C,this.F,this.b,a)}qs(){return`rgba(${this.C},${this.F},${this.b},${this.a})`}In(){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.In()}qb(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.qb;olympe.D.Color.prototype.toHexString=olympe.D.Color.prototype.In;olympe.D.Color.prototype.toRGBString=olympe.D.Color.prototype.qs;olympe.D.Color.prototype.getAlpha=olympe.D.Color.prototype.Ef;
309
- olympe.D.Color.prototype.getGreen=olympe.D.Color.prototype.Kf;olympe.D.Color.prototype.getBlue=olympe.D.Color.prototype.Ff;olympe.D.Color.prototype.getRed=olympe.D.Color.prototype.Qf;olympe.D.Color.create=olympe.D.Color.create;m=olympe.D.Color.prototype;m.toJSON.K=olympe.D.J.C;m.Qf.K=olympe.D.J.G;m.Ff.K=olympe.D.J.G;m.Kf.K=olympe.D.J.G;m.Ef.K=olympe.D.J.G;m.Ev.K=new olympe.D.J(()=>olympe.D.Color,[]);m.$v.K=new olympe.D.J(()=>olympe.D.Color,[]);m.qs.K=new olympe.D.J(()=>String,[]);
310
- m.In.K=new olympe.D.J(()=>String,[]);m.qb.K=olympe.D.J.C;olympe.D.File=class{ma(){}Ap(){}Rl(){}fn(){}Rk(){}bn(){}Sk(){}rename(){}};olympe.D.lc=class{constructor(a,b){this.x=olympe.D.ge(a);this.y=olympe.D.ge(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.D.bb(this.x).valueOf())+', "y": '+JSON.stringify(olympe.D.bb(this.y).valueOf())+' }'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.lc(b.x,b.y)}px(){return this.x}By(a){ob(this.x,a)}qx(){return this.y}Cy(a){ob(this.y,a)}ex(){return this.x.hs(this.y)}he(a){return olympe.D.Fa([this,a],(b,c)=>new olympe.D.lc(b.x.he(c.x),b.y.he(c.y)),
311
- olympe.D.lc,'Vector2.plus')}th(a){return olympe.D.Fa([this,a],(b,c)=>new olympe.D.lc(b.x.th(c.x),b.y.th(c.y)),olympe.D.lc,'Vector2.minus')}Mx(a){return new olympe.D.lc(this.x.cl(a),this.y.cl(a))}Vv(a){return new olympe.D.lc(this.x.$i(a),this.y.$i(a))}Px(){return new olympe.D.lc(this.x.Aj(),this.y.Aj())}Wv(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Fa([b.x,b.y,c.x,c.y],(d,e,f,g)=>olympe.D.za(d*f+e*g),olympe.D.ea),olympe.D.ea)}length(){return olympe.D.Fa([this.x,this.y],(a,b)=>olympe.D.za(Math.sqrt(a*
312
- a+b*b)),olympe.D.ea)}normalize(){return olympe.D.Fa([this.x,this.y],(a,b)=>{const c=Math.sqrt(a*a+b*b);return new olympe.D.lc(a/c,b/c)},olympe.D.lc)}floor(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.lc(Math.floor(a),Math.floor(b)),olympe.D.lc)}ceil(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.lc(Math.ceil(a),Math.ceil(b)),olympe.D.lc)}round(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.lc(Math.round(a),Math.round(b)),olympe.D.lc)}rv(a){return new olympe.D.lc(this.x.he(a),
313
- this.y.he(a))}tv(a,b){return new olympe.D.lc(this.x.he(a),this.y.he(b))}Vc(){return olympe.D.Fa([this.x,this.y],(a,b)=>olympe.D.Bb(`Vector2[${a.valueOf()}, ${b.valueOf()}]`),olympe.D.Wa)}toString(){return`Vector2[${this.x.Na.Kb}, ${this.y.Na.Kb}]`}qb(a){return this===a?!0:!1}};m=olympe.D.lc.prototype;m.toJSON.K=olympe.D.J.C;m.px.K=olympe.D.J.G;m.By.K=olympe.D.J.C;m.qx.K=olympe.D.J.G;m.Cy.K=olympe.D.J.C;m.ex.K=olympe.D.J.G;m.he.K=new olympe.D.J(()=>olympe.D.lc,[0]);
314
- m.th.K=new olympe.D.J(()=>olympe.D.lc,[0]);m.Mx.K=olympe.D.J.Y;m.Vv.K=olympe.D.J.Y;m.Px.K=olympe.D.J.Y;m.Wv.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.length.K=olympe.D.J.G;m.normalize.K=olympe.D.J.Y;m.floor.K=olympe.D.J.Y;m.ceil.K=olympe.D.J.Y;m.round.K=olympe.D.J.Y;m.rv.K=olympe.D.J.Y;m.tv.K=olympe.D.J.Y;m.Vc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.qb.K=olympe.D.J.C;olympe.D.Qg=class{constructor(){}Yb(){}Gd(){}get(){}lh(){}has(){}Eg(){}Sc(){}If(){}nf(){}zg(){}forEach(){}ce(){}};olympe.D.Qg.prototype.forEachCurrentValue=olympe.D.Qg.prototype.ce;olympe.D.Qg.prototype.forEach=olympe.D.Qg.prototype.forEach;m=olympe.D.Qg.prototype;m.has.K=olympe.D.J.U;m.Eg.K=olympe.D.J.C;m.Sc.K=new olympe.D.J(()=>Object,[]);m.If.K=new olympe.D.J(()=>String,[]);m.nf.K=olympe.D.J.G;m.zg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.ce.K=olympe.D.J.C;olympe.D.pd=class extends olympe.D.Qg{constructor(){super()}fe(){}Hf(){}We(){}Gf(){}qe(){}Ve(){}bj(){}ci(){}};olympe.D.pd.prototype.getCurrentAt=olympe.D.pd.prototype.Ve;olympe.D.pd.prototype.getAt=olympe.D.pd.prototype.qe;olympe.D.pd.prototype.getCurrentKeyAt=olympe.D.pd.prototype.Gf;olympe.D.pd.prototype.getKeyAt=olympe.D.pd.prototype.We;olympe.D.pd.prototype.getCurrentRank=olympe.D.pd.prototype.Hf;olympe.D.pd.prototype.getRank=olympe.D.pd.prototype.fe;m=olympe.D.pd.prototype;m.fe.K=olympe.D.J.G;
307
+ return new olympe.D.Color(e,f,g,h)},olympe.D.Color)}Qf(){return this.C}Ff(){return this.b}Kf(){return this.F}Ef(){return this.a}Fv(a,b){return olympe.D.Color.create(this.C.qj(a.Qf(),b),this.F.qj(a.Kf(),b),this.b.qj(a.Ff(),b),this.a.qj(a.Ef(),b))}aw(a){return olympe.D.Color.create(this.C,this.F,this.b,a)}rs(){return`rgba(${this.C},${this.F},${this.b},${this.a})`}In(){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.In()}qb(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.qb;olympe.D.Color.prototype.toHexString=olympe.D.Color.prototype.In;olympe.D.Color.prototype.toRGBString=olympe.D.Color.prototype.rs;olympe.D.Color.prototype.getAlpha=olympe.D.Color.prototype.Ef;
309
+ olympe.D.Color.prototype.getGreen=olympe.D.Color.prototype.Kf;olympe.D.Color.prototype.getBlue=olympe.D.Color.prototype.Ff;olympe.D.Color.prototype.getRed=olympe.D.Color.prototype.Qf;olympe.D.Color.create=olympe.D.Color.create;m=olympe.D.Color.prototype;m.toJSON.K=olympe.D.J.C;m.Qf.K=olympe.D.J.G;m.Ff.K=olympe.D.J.G;m.Kf.K=olympe.D.J.G;m.Ef.K=olympe.D.J.G;m.Fv.K=new olympe.D.J(()=>olympe.D.Color,[]);m.aw.K=new olympe.D.J(()=>olympe.D.Color,[]);m.rs.K=new olympe.D.J(()=>String,[]);
310
+ m.In.K=new olympe.D.J(()=>String,[]);m.qb.K=olympe.D.J.C;olympe.D.File=class{ma(){}Bp(){}Rl(){}fn(){}Rk(){}bn(){}Sk(){}rename(){}};olympe.D.lc=class{constructor(a,b){this.x=olympe.D.ge(a);this.y=olympe.D.ge(b)}toJSON(){return'{ "type": "vector2", "x": '+JSON.stringify(olympe.D.bb(this.x).valueOf())+', "y": '+JSON.stringify(olympe.D.bb(this.y).valueOf())+' }'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.D.lc(b.x,b.y)}qx(){return this.x}Cy(a){ob(this.x,a)}sx(){return this.y}Dy(a){ob(this.y,a)}gx(){return this.x.js(this.y)}he(a){return olympe.D.Fa([this,a],(b,c)=>new olympe.D.lc(b.x.he(c.x),b.y.he(c.y)),
311
+ olympe.D.lc,'Vector2.plus')}th(a){return olympe.D.Fa([this,a],(b,c)=>new olympe.D.lc(b.x.th(c.x),b.y.th(c.y)),olympe.D.lc,'Vector2.minus')}Nx(a){return new olympe.D.lc(this.x.cl(a),this.y.cl(a))}Wv(a){return new olympe.D.lc(this.x.$i(a),this.y.$i(a))}Qx(){return new olympe.D.lc(this.x.Aj(),this.y.Aj())}Xv(a){return olympe.D.Fa([this,a],(b,c)=>olympe.D.Fa([b.x,b.y,c.x,c.y],(d,e,f,g)=>olympe.D.za(d*f+e*g),olympe.D.ea),olympe.D.ea)}length(){return olympe.D.Fa([this.x,this.y],(a,b)=>olympe.D.za(Math.sqrt(a*
312
+ a+b*b)),olympe.D.ea)}normalize(){return olympe.D.Fa([this.x,this.y],(a,b)=>{const c=Math.sqrt(a*a+b*b);return new olympe.D.lc(a/c,b/c)},olympe.D.lc)}floor(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.lc(Math.floor(a),Math.floor(b)),olympe.D.lc)}ceil(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.lc(Math.ceil(a),Math.ceil(b)),olympe.D.lc)}round(){return olympe.D.Fa([this.x,this.y],(a,b)=>new olympe.D.lc(Math.round(a),Math.round(b)),olympe.D.lc)}tv(a){return new olympe.D.lc(this.x.he(a),
313
+ this.y.he(a))}uv(a,b){return new olympe.D.lc(this.x.he(a),this.y.he(b))}Vc(){return olympe.D.Fa([this.x,this.y],(a,b)=>olympe.D.Bb(`Vector2[${a.valueOf()}, ${b.valueOf()}]`),olympe.D.Wa)}toString(){return`Vector2[${this.x.Na.Kb}, ${this.y.Na.Kb}]`}qb(a){return this===a?!0:!1}};m=olympe.D.lc.prototype;m.toJSON.K=olympe.D.J.C;m.qx.K=olympe.D.J.G;m.Cy.K=olympe.D.J.C;m.sx.K=olympe.D.J.G;m.Dy.K=olympe.D.J.C;m.gx.K=olympe.D.J.G;m.he.K=new olympe.D.J(()=>olympe.D.lc,[0]);
314
+ m.th.K=new olympe.D.J(()=>olympe.D.lc,[0]);m.Nx.K=olympe.D.J.Y;m.Wv.K=olympe.D.J.Y;m.Qx.K=olympe.D.J.Y;m.Xv.K=new olympe.D.J(()=>olympe.D.ea,[0]);m.length.K=olympe.D.J.G;m.normalize.K=olympe.D.J.Y;m.floor.K=olympe.D.J.Y;m.ceil.K=olympe.D.J.Y;m.round.K=olympe.D.J.Y;m.tv.K=olympe.D.J.Y;m.uv.K=olympe.D.J.Y;m.Vc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.qb.K=olympe.D.J.C;olympe.D.Qg=class{constructor(){}Yb(){}Gd(){}get(){}lh(){}has(){}Eg(){}Sc(){}If(){}nf(){}zg(){}forEach(){}ce(){}};olympe.D.Qg.prototype.forEachCurrentValue=olympe.D.Qg.prototype.ce;olympe.D.Qg.prototype.forEach=olympe.D.Qg.prototype.forEach;m=olympe.D.Qg.prototype;m.has.K=olympe.D.J.U;m.Eg.K=olympe.D.J.C;m.Sc.K=new olympe.D.J(()=>Object,[]);m.If.K=new olympe.D.J(()=>String,[]);m.nf.K=olympe.D.J.G;m.zg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.ce.K=olympe.D.J.C;olympe.D.pd=class extends olympe.D.Qg{constructor(){super()}fe(){}Hf(){}We(){}Gf(){}qe(){}Ve(){}bj(){}ci(){}};olympe.D.pd.prototype.getCurrentAt=olympe.D.pd.prototype.Ve;olympe.D.pd.prototype.getAt=olympe.D.pd.prototype.qe;olympe.D.pd.prototype.getCurrentKeyAt=olympe.D.pd.prototype.Gf;olympe.D.pd.prototype.getKeyAt=olympe.D.pd.prototype.We;olympe.D.pd.prototype.getCurrentRank=olympe.D.pd.prototype.Hf;olympe.D.pd.prototype.getRank=olympe.D.pd.prototype.fe;m=olympe.D.pd.prototype;m.fe.K=olympe.D.J.G;
315
315
  m.Hf.K=olympe.D.J.C;m.We.K=new olympe.D.J(()=>String,[]);m.Gf.K=olympe.D.J.C;m.qe.K=new olympe.D.J(()=>Object,[]);m.Ve.K=olympe.D.J.C;m.bj.K=olympe.D.J.C;m.ci.K=new olympe.D.J(()=>Array,[]);olympe.D.oi=class{constructor(a,b){this.U=b||olympe.D.Ja();this.valueType=a||Object;this.values={};this.wb=this.Sa=null;this.Xe=0;this.aa=Object.create(null);this.Ib=Object.create(null);this.size=0;this.L=null;this.U.onDestroy(()=>{const c=this.aa;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()}}})}Dh(){return this.U}Yb(){return this.valueType}Gd(a){this.valueType=a;const b=this.Sa;if(null!==b)for(const c in b)Object.prototype.hasOwnProperty.call(b,
316
316
  c)&&jb(b[c],a)}get(a){const b=c=>{null===this.Sa&&(this.Sa={});return this.fj(this.Sa,c,this.values[c],this.valueType,'Map.get('+c+')')};return olympe.D.Fa([a],c=>b(c),this.valueType)}lh(a){a=this.values[a];return olympe.D.lb(a)?Va(a.Na)?a.Na.Kb:void 0:a}has(a){const b=c=>{null===this.wb&&(this.wb={});return this.fj(this.wb,c,c in this.values?olympe.D.qa.F:olympe.D.qa.C,olympe.D.qa,'Map.has('+c+')')};return olympe.D.Fa([a],c=>b(c),olympe.D.qa)}Eg(a){return a in this.values}fj(a,b,c,d,e){let f=a[b];
317
- f||this.U.run(()=>{f=olympe.D.Nd(d,void 0,e);a[b]=f;f.Na.onDestroy(()=>delete a[b]);olympe.D.lb(c)?nb(f,c):kb(f,c)});return f}Sc(){throw Error('Abstract method getFirstKey needs to be overridden');}If(){throw Error('Abstract method getFirstKey needs to be overridden');}nf(){null===this.L&&this.U.run(()=>{this.L=olympe.D.Nd(olympe.D.ea,olympe.D.za(this.size));this.L.Na.onDestroy(()=>{this.L=null})});return this.L}zg(){return this.size}forEach(a,b){const c=this.Dm();a=this.xr(c,a,b);this.Cm(c,a)}Dm(){return String(++this.Xe)}Cm(a,
318
- b){this.Ib[a]=b;olympe.D.Ja().zc(()=>{const c=this.aa;for(const d in c)Object.prototype.hasOwnProperty.call(c,d)&&delete c[d][a];delete this.Ib[a]});this.ce(b)}xr(a,b,c){const d=olympe.D.Ja();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.Gm(a,f,g)})}}Gm(a,b,c){void 0===this.aa[b]&&(this.aa[b]={});this.aa[b][a]=c}ce(a){const b=this.values;for(const c in b)if(Object.prototype.hasOwnProperty.call(b,c)&&
317
+ f||this.U.run(()=>{f=olympe.D.Nd(d,void 0,e);a[b]=f;f.Na.onDestroy(()=>delete a[b]);olympe.D.lb(c)?nb(f,c):kb(f,c)});return f}Sc(){throw Error('Abstract method getFirstKey needs to be overridden');}If(){throw Error('Abstract method getFirstKey needs to be overridden');}nf(){null===this.L&&this.U.run(()=>{this.L=olympe.D.Nd(olympe.D.ea,olympe.D.za(this.size));this.L.Na.onDestroy(()=>{this.L=null})});return this.L}zg(){return this.size}forEach(a,b){const c=this.Dm();a=this.yr(c,a,b);this.Cm(c,a)}Dm(){return String(++this.Xe)}Cm(a,
318
+ b){this.Ib[a]=b;olympe.D.Ja().zc(()=>{const c=this.aa;for(const d in c)Object.prototype.hasOwnProperty.call(c,d)&&delete c[d][a];delete this.Ib[a]});this.ce(b)}yr(a,b,c){const d=olympe.D.Ja();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.Gm(a,f,g)})}}Gm(a,b,c){void 0===this.aa[b]&&(this.aa[b]={});this.aa[b][a]=c}ce(a){const b=this.values;for(const c in b)if(Object.prototype.hasOwnProperty.call(b,c)&&
319
319
  !1===a(b[c],c,this))break}Jk(a,b){void 0!==this.values[a]&&this.Ti(a,!0);this.values[a]=b;var c=this.Sa;null!==c&&void 0!==c[a]&&(b&&b instanceof olympe.D.Proxy?nb(c[a],b):kb(c[a],b));c=this.wb;null!==c&&void 0!==c[a]&&ob(c[a],!0);this.size++;c=this.Ib;for(const d in c)if(Object.prototype.hasOwnProperty.call(c,d))c[d](b,a,this)}Ti(a,b){const c=this.values;if(Object.prototype.hasOwnProperty.call(c,a)){var d=(d=c[a])&&d.zf?d.Na.Kb:d;var e=this.Sa;null!==e&&void 0!==e[a]&&lb(e[a]);e=this.wb;null!==e&&
320
320
  void 0!==e[a]&&ob(e[a],!1);delete c[a];this.size--;b||this.Af()}a=this.aa[a];if(void 0!==a)for(const f in a)Object.prototype.hasOwnProperty.call(a,f)&&a[f].destroy();return d}Af(){null!==this.L&&ob(this.L,this.size)}Uh(){var a=this.Sa;if(null!==a)for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&lb(a[c]);a=this.wb;if(null!==a)for(var b in a)Object.prototype.hasOwnProperty.call(a,b)&&ob(a[b],!1);for(const c in this.values)Object.prototype.hasOwnProperty.call(this.values,c)&&delete this.values[c];
321
321
  for(const c in this.aa)if(Object.prototype.hasOwnProperty.call(this.aa,c)){b=this.aa[c];for(const d in b)Object.prototype.hasOwnProperty.call(b,d)&&b[d].destroy()}this.size=0;null!==this.L&&ob(this.L,this.size)}Vg(){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.la=[olympe.D.Qg];m=olympe.D.oi.prototype;m.Dh.K=olympe.D.J.C;m.Yb.K=olympe.D.J.C;m.Gd.K=olympe.D.J.C;m.get.K=new olympe.D.J(()=>Object,[],'valueType');
322
- m.lh.K=olympe.D.J.C;m.has.K=olympe.D.J.U;m.Eg.K=olympe.D.J.C;m.fj.K=olympe.D.J.C;m.nf.K=olympe.D.J.G;m.zg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.Dm.K=olympe.D.J.C;m.Cm.K=olympe.D.J.C;m.xr.K=olympe.D.J.C;m.Gm.K=olympe.D.J.C;m.ce.K=olympe.D.J.C;m.Jk.K=olympe.D.J.C;m.Ti.K=olympe.D.J.C;m.Af.K=olympe.D.J.C;m.Uh.K=olympe.D.J.C;m.Vg.K=olympe.D.J.C;olympe.D.Ej=class extends olympe.D.oi{constructor(a,b){super(a,b);this.F=Object.create(null);this.C=[];this.Da=this.Ya=this.ab=this.oa=null}Gd(a){super.Gd(a);if(null!==this.Da)for(let b of this.Da.values())jb(b,a)}Sc(){return this.qe(0)}If(){return this.We(0)}fe(a){const b=c=>{null===this.ab&&(this.ab=Object.create(null));let d=this.Hf(a);d=void 0!==d?olympe.D.za(d):void 0;return this.fj(this.ab,c,d,olympe.D.ea,`List.getRank(${c})`)};return olympe.D.lb(a)?L(olympe.D.createNode(olympe.D.ea,b,null,
322
+ m.lh.K=olympe.D.J.C;m.has.K=olympe.D.J.U;m.Eg.K=olympe.D.J.C;m.fj.K=olympe.D.J.C;m.nf.K=olympe.D.J.G;m.zg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.Dm.K=olympe.D.J.C;m.Cm.K=olympe.D.J.C;m.yr.K=olympe.D.J.C;m.Gm.K=olympe.D.J.C;m.ce.K=olympe.D.J.C;m.Jk.K=olympe.D.J.C;m.Ti.K=olympe.D.J.C;m.Af.K=olympe.D.J.C;m.Uh.K=olympe.D.J.C;m.Vg.K=olympe.D.J.C;olympe.D.Ej=class extends olympe.D.oi{constructor(a,b){super(a,b);this.F=Object.create(null);this.C=[];this.Da=this.Ya=this.ab=this.oa=null}Gd(a){super.Gd(a);if(null!==this.Da)for(let b of this.Da.values())jb(b,a)}Sc(){return this.qe(0)}If(){return this.We(0)}fe(a){const b=c=>{null===this.ab&&(this.ab=Object.create(null));let d=this.Hf(a);d=void 0!==d?olympe.D.za(d):void 0;return this.fj(this.ab,c,d,olympe.D.ea,`List.getRank(${c})`)};return olympe.D.lb(a)?L(olympe.D.createNode(olympe.D.ea,b,null,
323
323
  [a.Na],[0],'onResolved('+(b.name||'')+')')):b(a)}Hf(a){return this.F[a]}We(a){const b=c=>{const d=c.valueOf(),e=this.Gf(d);null===this.Ya&&(this.Ya=Object.create(null));return this.fj(this.Ya,String(d),e,String,'List.getKeyAt('+c+')')};return olympe.D.Fa([a],c=>b(c),String)}Gf(a){return this.C[a.valueOf()]}qe(a){if(olympe.D.lb(a))return this.get(olympe.D.Fa([a],c=>{c=this.We(c);if(!Va(c.Na)){const d=olympe.D.Ja();olympe.D.Uf(d)&&eb(d)}return c},String));null===this.Da&&(this.Da=new Map);let b=this.Da.get(a);
324
- b||this.U.run(()=>{b=this.get(this.We(a));this.Da.set(a,b);b.Na.onDestroy(()=>this.Da.delete(a))});return b}Ve(a){return this.lh(this.Gf(a))}bj(a,b,c,d){let e=this.Dm();a=this.bs(e,a,b,c,d);this.Cm(e,a)}bs(a,b,c,d,e){return olympe.D.Ja().C((f,g)=>{let h=!1,k=olympe.D.df([b,c,this.fe(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.Gm(a,g,k)})}ci(){null===this.oa&&this.U.run(()=>{this.oa=olympe.D.Nd(Array,this.C.filter(a=>void 0!==a));
324
+ b||this.U.run(()=>{b=this.get(this.We(a));this.Da.set(a,b);b.Na.onDestroy(()=>this.Da.delete(a))});return b}Ve(a){return this.lh(this.Gf(a))}bj(a,b,c,d){let e=this.Dm();a=this.cs(e,a,b,c,d);this.Cm(e,a)}cs(a,b,c,d,e){return olympe.D.Ja().C((f,g)=>{let h=!1,k=olympe.D.df([b,c,this.fe(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.Gm(a,g,k)})}ci(){null===this.oa&&this.U.run(()=>{this.oa=olympe.D.Nd(Array,this.C.filter(a=>void 0!==a));
325
325
  this.oa.Na.onDestroy(()=>{this.L=null})});return this.oa}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}}Fm(a,b){const c=this.ab,d=this.Ya,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]&&lb(c[g]),void 0!==
326
- c[a]&&kb(c[a],olympe.D.za(f)));null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&lb(d[e]),void 0!==d[b]&&kb(d[b],a))}}Em(a){var b=this.Ya,c=this.F[a];null!==c&&void 0!==c&&null!==b&&(b=b[c],void 0!==b&&b.Na.Kb===a&&lb(b));delete this.F[a];this.C.splice(c,1);c=this.ab;null!==c&&void 0!==c[a]&&lb(c[a])}yr(){if(null!==this.oa){const a=this.C,b=this.oa.Na.Kb;b&&a.join(',')!==b.join(',')&&kb(this.oa,a)}}Af(){this.yr();super.Af()}Uh(){var a=this.F;for(b in a)delete a[b];this.C.length=0;a=this.ab;if(null!==
326
+ c[a]&&kb(c[a],olympe.D.za(f)));null!==d&&(void 0!==e&&null!==e&&void 0!==d[e]&&lb(d[e]),void 0!==d[b]&&kb(d[b],a))}}Em(a){var b=this.Ya,c=this.F[a];null!==c&&void 0!==c&&null!==b&&(b=b[c],void 0!==b&&b.Na.Kb===a&&lb(b));delete this.F[a];this.C.splice(c,1);c=this.ab;null!==c&&void 0!==c[a]&&lb(c[a])}zr(){if(null!==this.oa){const a=this.C,b=this.oa.Na.Kb;b&&a.join(',')!==b.join(',')&&kb(this.oa,a)}}Af(){this.zr();super.Af()}Uh(){var a=this.F;for(b in a)delete a[b];this.C.length=0;a=this.ab;if(null!==
327
327
  a)for(b in a)lb(a[b]);a=this.Ya;if(null!==a)for(b in a)lb(a[parseInt(b,10)]);var b=this.oa;null!==b&&(cb(b.Na),kb(b,this.C));return olympe.D.oi.prototype.Uh.call(this)}Vg(){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.Ej.la=[olympe.D.pd];m=olympe.D.Ej.prototype;m.Gd.K=olympe.D.J.C;m.Sc.K=new olympe.D.J(()=>Object,[]);m.If.K=new olympe.D.J(()=>String,[]);m.fe.K=olympe.D.J.G;m.Hf.K=olympe.D.J.C;
328
- m.We.K=new olympe.D.J(()=>String,[]);m.Gf.K=olympe.D.J.C;m.qe.K=new olympe.D.J(()=>Object,[]);m.Ve.K=olympe.D.J.C;m.bj.K=new olympe.D.J(()=>{},[]);m.bs.K=olympe.D.J.C;m.ci.K=new olympe.D.J(()=>Array,[]);m.ce.K=olympe.D.J.C;m.Fm.K=olympe.D.J.C;m.Em.K=olympe.D.J.C;m.yr.K=olympe.D.J.C;m.Af.K=olympe.D.J.C;m.Uh.K=olympe.D.J.C;m.Vg.K=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}Gd(a){a===olympe.D.Proxy&&(a=Object);null!==this.F&&jb(this.F,a);super.Gd(a)}Sc(){null===this.F&&this.Tm();return this.F}If(){null===this.C&&this.Tm();return this.C}Tm(){this.Dh().run(()=>{this.F=olympe.D.Nd(this.Yb());this.C=olympe.D.Nd(String);this.yj(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}yj(a){if(void 0!==
328
+ m.We.K=new olympe.D.J(()=>String,[]);m.Gf.K=olympe.D.J.C;m.qe.K=new olympe.D.J(()=>Object,[]);m.Ve.K=olympe.D.J.C;m.bj.K=new olympe.D.J(()=>{},[]);m.cs.K=olympe.D.J.C;m.ci.K=new olympe.D.J(()=>Array,[]);m.ce.K=olympe.D.J.C;m.Fm.K=olympe.D.J.C;m.Em.K=olympe.D.J.C;m.zr.K=olympe.D.J.C;m.Af.K=olympe.D.J.C;m.Uh.K=olympe.D.J.C;m.Vg.K=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}Gd(a){a===olympe.D.Proxy&&(a=Object);null!==this.F&&jb(this.F,a);super.Gd(a)}Sc(){null===this.F&&this.Tm();return this.F}If(){null===this.C&&this.Tm();return this.C}Tm(){this.Dh().run(()=>{this.F=olympe.D.Nd(this.Yb());this.C=olympe.D.Nd(String);this.yj(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}yj(a){if(void 0!==
329
329
  a){const b=this.values[a];b&&b instanceof olympe.D.Proxy?nb(this.F,b):kb(this.F,b);kb(this.C,a)}else void 0!==this.F.Na.Kb&&(lb(this.F),lb(this.C))}set(a,b){this.Jk(a,b);1===this.size&&null!==this.C&&this.yj(a);this.Af()}remove(a){const b=this.Ti(a);null!==this.C&&this.C.Na.Kb===a&&this.yj(this.Ym());return b}clear(){this.Uh();null!==this.C&&this.yj()}};m=olympe.D.Map.prototype;m.Gd.K=olympe.D.J.C;m.Sc.K=new olympe.D.J(()=>Object,[]);m.If.K=new olympe.D.J(()=>String,[]);m.Tm.K=olympe.D.J.C;
330
- m.Ym.K=olympe.D.J.C;m.yj.K=olympe.D.J.C;m.set.K=olympe.D.J.C;m.remove.K=new olympe.D.J(()=>Object,[]);m.clear.K=olympe.D.J.C;olympe.D.Wg=class extends olympe.D.Ej{constructor(a){super(a)}set(a,b,c){this.Jk(a,b);void 0!==c&&olympe.D.Ec([c],d=>{this.Fm(a,d)});this.Af()}remove(a){this.Em(a);return this.Ti(a)}clear(){this.Uh()}};olympe.D.Wg.prototype.remove.K=olympe.D.J.C;olympe.D.Wg.prototype.clear.K=olympe.D.J.C;olympe.D.ws=class extends olympe.D.Uj{constructor(a,b){super(olympe.D.ea,'animatedFlowSource');this.duration=a;this.C=b||olympe.D.ea.Do.Kp}Fb(){return olympe.D.Tx(this.node,this.duration,this.C,void 0)}};let wb=null;olympe.D.N=void 0;olympe.D.Bn=void 0;olympe.D.Yh=void 0;olympe.D.Th=new Map;olympe.D.Th.set(0,olympe.D.ea.ZERO);olympe.D.Th.set(1,olympe.D.ea.ONE);olympe.D.Th.set(2,olympe.D.ea.bv);olympe.D.Ik=new Map;olympe.D.Ik.set('',olympe.D.Wa.EMPTY);olympe.D.Ik.set(' ',olympe.D.Wa.Pu);olympe.D.createNode=function(a,b,c,d,e,f,g,h){return new olympe.D.Node({valueType:a,Bd:b,Xf:c,ln:d,debug:g,ug:e,zd:f,Vi:h})};olympe.D.Uf=function(a){return!!(a&&a instanceof olympe.D.Node)};
331
- olympe.D.Nd=function(a,b,c){a=olympe.D.createNode(a,void 0,void 0,void 0,void 0,c);olympe.D.Uf(b)?fb(a,b):olympe.D.lb(b)?fb(a,b.Na):K(a,b);return L(a)};olympe.D.lb=function(a){return!(!a||!a.zf)};olympe.D.Vf=function(a){return!(!a||!(a instanceof olympe.D.Node||a.zf))};olympe.D.qn=function(a){return olympe.D.Uf(a)||a instanceof olympe.D.Xb||a instanceof olympe.D.Hq};olympe.D.fi=function(a){return a instanceof olympe.D.Uj};
330
+ m.Ym.K=olympe.D.J.C;m.yj.K=olympe.D.J.C;m.set.K=olympe.D.J.C;m.remove.K=new olympe.D.J(()=>Object,[]);m.clear.K=olympe.D.J.C;olympe.D.Wg=class extends olympe.D.Ej{constructor(a){super(a)}set(a,b,c){this.Jk(a,b);void 0!==c&&olympe.D.Ec([c],d=>{this.Fm(a,d)});this.Af()}remove(a){this.Em(a);return this.Ti(a)}clear(){this.Uh()}};olympe.D.Wg.prototype.remove.K=olympe.D.J.C;olympe.D.Wg.prototype.clear.K=olympe.D.J.C;olympe.D.xs=class extends olympe.D.Uj{constructor(a,b){super(olympe.D.ea,'animatedFlowSource');this.duration=a;this.C=b||olympe.D.ea.Do.Lp}Fb(){return olympe.D.Ux(this.node,this.duration,this.C,void 0)}};let wb=null;olympe.D.N=void 0;olympe.D.Bn=void 0;olympe.D.Yh=void 0;olympe.D.Th=new Map;olympe.D.Th.set(0,olympe.D.ea.ZERO);olympe.D.Th.set(1,olympe.D.ea.ONE);olympe.D.Th.set(2,olympe.D.ea.dv);olympe.D.Ik=new Map;olympe.D.Ik.set('',olympe.D.Wa.EMPTY);olympe.D.Ik.set(' ',olympe.D.Wa.Qu);olympe.D.createNode=function(a,b,c,d,e,f,g,h){return new olympe.D.Node({valueType:a,Bd:b,Xf:c,ln:d,debug:g,ug:e,zd:f,Vi:h})};olympe.D.Uf=function(a){return!!(a&&a instanceof olympe.D.Node)};
331
+ olympe.D.Nd=function(a,b,c){a=olympe.D.createNode(a,void 0,void 0,void 0,void 0,c);olympe.D.Uf(b)?fb(a,b):olympe.D.lb(b)?fb(a,b.Na):K(a,b);return L(a)};olympe.D.lb=function(a){return!(!a||!a.zf)};olympe.D.Vf=function(a){return!(!a||!(a instanceof olympe.D.Node||a.zf))};olympe.D.qn=function(a){return olympe.D.Uf(a)||a instanceof olympe.D.Xb||a instanceof olympe.D.Iq};olympe.D.fi=function(a){return a instanceof olympe.D.Uj};
332
332
  olympe.D.el=function(a,b){if(void 0!==a){olympe.D.fi(a)&&(a=a.Fb().Na);if(!olympe.D.Vf(a))return b(a);var c=[];olympe.D.lb(a)?c.push(a.Na):c.push(a);return olympe.D.createNode(void 0,b,null,c,[0],'onResolved')}};olympe.D.bb=function(a,b){let c=a;olympe.D.lb(a)?c=a.Na.Kb:olympe.D.Uf(a)?c=a.Kb:olympe.D.fi(a)&&(c=a.Fb().Na.Kb);return void 0===c?b:c};
333
- olympe.D.bf=function(a,b){let c;olympe.D.lb(a)?c=a.Na:olympe.D.Uf(a)?c=a:olympe.D.fi(a)&&(c=a.Fb().Na);c&&olympe.D.Ec([b],d=>{c.bf(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.vr?(h=h.Na,g.push(k)):h instanceof olympe.D.Node?g.push(k):olympe.D.fi(h)&&(h=h.Fb().Na,g.push(k))),f[k]=h;return olympe.D.createNode(c,b,null,f,g,d||'syncNodes')};
333
+ olympe.D.bf=function(a,b){let c;olympe.D.lb(a)?c=a.Na:olympe.D.Uf(a)?c=a:olympe.D.fi(a)&&(c=a.Fb().Na);c&&olympe.D.Ec([b],d=>{c.bf(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.wr?(h=h.Na,g.push(k)):h instanceof olympe.D.Node?g.push(k):olympe.D.fi(h)&&(h=h.Fb().Na,g.push(k))),f[k]=h;return olympe.D.createNode(c,b,null,f,g,d||'syncNodes')};
334
334
  olympe.D.ie=function(a,b,c,d){return L(olympe.D.df(a,b,c,d||'syncProxies'))};const xb=a=>{for(const b of a)if(olympe.D.Vf(b)||olympe.D.fi(b))return!1;return!0};olympe.D.Fa=function(a,b,c,d,e){if(xb(a))return b(...a);const f=olympe.D.df(a,b,c,d||'TransformFlows');e&&olympe.D.Ec([e],g=>{f.bf(g)},'setDefaultValue');return L(f)};olympe.D.Ec=function(a,b,c){xb(a)?b(...a):olympe.D.df(a,b,void 0,c||'processFlows')};
335
- olympe.D.es=function(a,b){if(xb(a))b(...a);else{const c=olympe.D.Ja();olympe.D.df(a,(...d)=>{olympe.D.Ja().destroy();c.run(b,...d)},void 0,'processFlowsOnce')}};olympe.D.An=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.lb(g)?(g=g.Na,f.push(h)):g instanceof olympe.D.Node?f.push(h):olympe.D.fi(g)&&(g=g.Fb().Na,f.push(h))),e[h]=g;0!==f.length&&new olympe.D.Node({Bd:b,ln:e,ug:f,my:!1,zd:c})};
336
- olympe.D.hD=function(a,b,c){const d=olympe.D.Ja();olympe.D.An(a,(...e)=>{olympe.D.Ja().destroy();d.run(b,...e)},c||'processFutureFlowsOnce')};olympe.D.IC=function(a,b,c){a=new olympe.D.Uj(a,c);b(a);return a.Fb()};olympe.D.Uc=function(a,b='flowSource'){return new olympe.D.Uj(a,b)};olympe.D.kD=function(a,b,c,d){const e=olympe.D.Ja();olympe.D.df(a,(...f)=>{olympe.D.Ja().destroy();e.run(b,...f)},c,d||'syncProxiesOnce')};
337
- olympe.D.kn=function(a,b,c){olympe.D.Fa([a],d=>d.valueOf()?b.apply(null,void 0):c&&c.apply(null,void 0),Object,'If')};olympe.D.NC=function(a,b,...c){return a?a.run(b,...c):b(...c)};olympe.D.pD=function(a){return olympe.D.Ja().C(a)};olympe.D.LC=function(a,b,c){olympe.D.Xv(a?a.Na:a,b,c)};
338
- olympe.D.Xv=function(a,b,c){if(a){var d=a.Z();null===wb&&(wb={});if(wb[d])olympe.D.N.log(`Already started node #${d} dump`+(b?`: ${b}`:''));else{wb[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 wb[d]})}}else olympe.D.N.log('NOT starting node dump, node is '+String(a))};olympe.D.KC=function(){let a='',b=olympe.D.Ja();for(;null!==b;)a+=b.Lb()+' --\x3e ',b=b.getParent();olympe.D.N.log(a)};
340
- olympe.D.za=function(a){if(void 0===a)return olympe.D.ea.ZERO;if(a instanceof olympe.D.ea)return a;a&&a.valueOf&&(a=a.valueOf());if('number'===typeof a){if(isNaN(a))return olympe.D.ea.Tp;if(a===Math.PI)return olympe.D.ea.PI;if(Infinity===a)return olympe.D.ea.rt;if(-Infinity===a)return olympe.D.ea.iu;if(isNaN(a))var b=!1;else b=parseFloat(a),b=(b|0)===b;return b&&-1<=a&&100>=a?(olympe.D.Th.has(a)||olympe.D.Th.set(a,new olympe.D.ea(a)),olympe.D.Th.get(a)):new olympe.D.ea(a)}return null};
341
- olympe.D.ge=function(a){return void 0===a?olympe.D.Nd(olympe.D.ea):olympe.D.Nd(olympe.D.ea,olympe.D.Vf(a)?a:olympe.D.za(a))};olympe.D.Tx=olympe.D.ea.animate;olympe.D.bD=function(a,b){return new olympe.D.ws(a,b)};olympe.D.Bb=function(a){if(a instanceof olympe.D.Wa)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.Ik.has(a)?olympe.D.Ik.get(a):new olympe.D.Wa(a)};
342
- olympe.D.eD=function(a){return void 0===a?olympe.D.Nd(olympe.D.Wa):olympe.D.Nd(olympe.D.Wa,olympe.D.Vf(a)?a:olympe.D.Bb(a))};olympe.D.Cc=function(a){return a instanceof olympe.D.qa?a:void 0!==a&&null!==a&&a.valueOf()?olympe.D.qa.F:olympe.D.qa.C};olympe.D.hy=function(a){return void 0===a?olympe.D.Nd(olympe.D.qa):olympe.D.Nd(olympe.D.qa,olympe.D.Vf(a)?a:olympe.D.Cc(a))};olympe.D.Ux=function(a){if(a instanceof Date)return new olympe.D.jb(a)};
343
- olympe.D.dD=function(a){return olympe.D.Nd(olympe.D.jb,void 0!==a?new olympe.D.jb(a):null)};olympe.D.$r=a=>a instanceof olympe.D.qa||a instanceof olympe.D.ea||a instanceof olympe.D.Wa||a instanceof olympe.D.jb;olympe.D.fD=function(a,b){return olympe.D.Nd(olympe.D.lc,void 0===a&&void 0===b?void 0:new olympe.D.lc(a,b))};olympe.D.gy=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.Nd(olympe.D.Color,e)};olympe.D.cD=olympe.D.gy;
344
- olympe.D.Nv=function(a){olympe.D.N=a;olympe.D.Yh=olympe.D.mh()};olympe.D.mh=function(){olympe.D.Bn||(olympe.D.Bn=new olympe.D.Hq);return olympe.D.Bn};olympe.D.Ja=function(){olympe.D.Yh||(olympe.D.Yh=olympe.D.mh());return olympe.D.Yh};olympe.D.ks=function(a){const b=olympe.D.Yh;olympe.D.qn(a)&&(olympe.D.Yh=a);return b||null};
335
+ olympe.D.gs=function(a,b){if(xb(a))b(...a);else{const c=olympe.D.Ja();olympe.D.df(a,(...d)=>{olympe.D.Ja().destroy();c.run(b,...d)},void 0,'processFlowsOnce')}};olympe.D.An=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.lb(g)?(g=g.Na,f.push(h)):g instanceof olympe.D.Node?f.push(h):olympe.D.fi(g)&&(g=g.Fb().Na,f.push(h))),e[h]=g;0!==f.length&&new olympe.D.Node({Bd:b,ln:e,ug:f,ny:!1,zd:c})};
336
+ olympe.D.iD=function(a,b,c){const d=olympe.D.Ja();olympe.D.An(a,(...e)=>{olympe.D.Ja().destroy();d.run(b,...e)},c||'processFutureFlowsOnce')};olympe.D.JC=function(a,b,c){a=new olympe.D.Uj(a,c);b(a);return a.Fb()};olympe.D.Uc=function(a,b='flowSource'){return new olympe.D.Uj(a,b)};olympe.D.lD=function(a,b,c,d){const e=olympe.D.Ja();olympe.D.df(a,(...f)=>{olympe.D.Ja().destroy();e.run(b,...f)},c,d||'syncProxiesOnce')};
337
+ olympe.D.kn=function(a,b,c){olympe.D.Fa([a],d=>d.valueOf()?b.apply(null,void 0):c&&c.apply(null,void 0),Object,'If')};olympe.D.OC=function(a,b,...c){return a?a.run(b,...c):b(...c)};olympe.D.qD=function(a){return olympe.D.Ja().C(a)};olympe.D.MC=function(a,b,c){olympe.D.Yv(a?a.Na:a,b,c)};
338
+ olympe.D.Yv=function(a,b,c){if(a){var d=a.Z();null===wb&&(wb={});if(wb[d])olympe.D.N.log(`Already started node #${d} dump`+(b?`: ${b}`:''));else{wb[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 wb[d]})}}else olympe.D.N.log('NOT starting node dump, node is '+String(a))};olympe.D.LC=function(){let a='',b=olympe.D.Ja();for(;null!==b;)a+=b.Lb()+' --\x3e ',b=b.getParent();olympe.D.N.log(a)};
340
+ olympe.D.za=function(a){if(void 0===a)return olympe.D.ea.ZERO;if(a instanceof olympe.D.ea)return a;a&&a.valueOf&&(a=a.valueOf());if('number'===typeof a){if(isNaN(a))return olympe.D.ea.Up;if(a===Math.PI)return olympe.D.ea.PI;if(Infinity===a)return olympe.D.ea.st;if(-Infinity===a)return olympe.D.ea.ju;if(isNaN(a))var b=!1;else b=parseFloat(a),b=(b|0)===b;return b&&-1<=a&&100>=a?(olympe.D.Th.has(a)||olympe.D.Th.set(a,new olympe.D.ea(a)),olympe.D.Th.get(a)):new olympe.D.ea(a)}return null};
341
+ olympe.D.ge=function(a){return void 0===a?olympe.D.Nd(olympe.D.ea):olympe.D.Nd(olympe.D.ea,olympe.D.Vf(a)?a:olympe.D.za(a))};olympe.D.Ux=olympe.D.ea.animate;olympe.D.cD=function(a,b){return new olympe.D.xs(a,b)};olympe.D.Bb=function(a){if(a instanceof olympe.D.Wa)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.Ik.has(a)?olympe.D.Ik.get(a):new olympe.D.Wa(a)};
342
+ olympe.D.fD=function(a){return void 0===a?olympe.D.Nd(olympe.D.Wa):olympe.D.Nd(olympe.D.Wa,olympe.D.Vf(a)?a:olympe.D.Bb(a))};olympe.D.Cc=function(a){return a instanceof olympe.D.qa?a:void 0!==a&&null!==a&&a.valueOf()?olympe.D.qa.F:olympe.D.qa.C};olympe.D.iy=function(a){return void 0===a?olympe.D.Nd(olympe.D.qa):olympe.D.Nd(olympe.D.qa,olympe.D.Vf(a)?a:olympe.D.Cc(a))};olympe.D.Vx=function(a){if(a instanceof Date)return new olympe.D.jb(a)};
343
+ olympe.D.eD=function(a){return olympe.D.Nd(olympe.D.jb,void 0!==a?new olympe.D.jb(a):null)};olympe.D.bs=a=>a instanceof olympe.D.qa||a instanceof olympe.D.ea||a instanceof olympe.D.Wa||a instanceof olympe.D.jb;olympe.D.gD=function(a,b){return olympe.D.Nd(olympe.D.lc,void 0===a&&void 0===b?void 0:new olympe.D.lc(a,b))};olympe.D.hy=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.Nd(olympe.D.Color,e)};olympe.D.dD=olympe.D.hy;
344
+ olympe.D.Ov=function(a){olympe.D.N=a;olympe.D.Yh=olympe.D.mh()};olympe.D.mh=function(){olympe.D.Bn||(olympe.D.Bn=new olympe.D.Iq);return olympe.D.Bn};olympe.D.Ja=function(){olympe.D.Yh||(olympe.D.Yh=olympe.D.mh());return olympe.D.Yh};olympe.D.ls=function(a){const b=olympe.D.Yh;olympe.D.qn(a)&&(olympe.D.Yh=a);return b||null};
345
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.ea.nc(a);break;case 'string':b=olympe.D.Wa.nc(a);break;case 'vector2':b=olympe.D.lc.nc(a);break;case 'color':b=olympe.D.Color.nc(a);break;case 'boolean':b=olympe.D.qa.nc(a)}return b}return null};function yb(a){a.C.Ab()||(a.G.forEach(b=>{b.destroy()}),a.G.clear(),a.F.clear(),a.size.clear(),a.U.clear(),a.Y.length=0,a.L.length=0)}
346
- olympe.D.kB=class{constructor(){this.C=new olympe.D.Xb('Slot Manager context');this.G=new Map;this.C.run(()=>{this.F=olympe.D.Uc(zb,'Last slot manager entry');this.size=pb(olympe.D.Uc(olympe.D.ea,'SlotManager size').repeat(this.F.Fb().dn()),olympe.D.ea.ZERO);this.U=pb(olympe.D.Uc(olympe.D.ea,'last valid slots'),olympe.D.za(-1))});this.Y=[];this.L=[];this.C.onDestroy(()=>{yb(this)})}};
347
- class zb{constructor(a,b,c,d){this.id=a;this.mc=new olympe.D.Xb('Slot manager entry');this.G=c;this.L=d;this.mc.run(()=>{const e=pb(olympe.D.Uc(olympe.D.ea),olympe.D.ea.ZERO);olympe.D.lb(b)?e.repeat(b):e.update(b);this.C=olympe.D.Uc(olympe.D.ea);this.F=this.C.Fb().he(e.Fb())});this.next=null}Z(){return this.id}jx(){return this.C.Fb()}dn(){return this.F}fe(){return this.G}vx(){return this.L}My(a){this.G=a}wy(a){null===a?this.C.update(olympe.D.ea.ZERO):(this.C.repeat(a.dn()),a.next=this)}Ct(){this.C.clear();
348
- this.next=null}destroy(){this.mc.destroy();this.F=this.C=this.next=null}}m=zb.prototype;m.Z.K=olympe.D.J.C;m.jx.K=new olympe.D.J(()=>olympe.D.ea);m.dn.K=new olympe.D.J(()=>olympe.D.ea);m.fe.K=olympe.D.J.C;m.vx.K=olympe.D.J.C;m.My.K=olympe.D.J.C;m.wy.K=olympe.D.J.C;m.Ct.K=olympe.D.J.C;m.destroy.K=olympe.D.J.C;olympe.D.P={Ea:'df.Logger'};olympe.T.config(a=>{D(a,olympe.D.Config.Up,Number.POSITIVE_INFINITY);C(a,olympe.D.P.Ea,[olympe.ra.P.xa],b=>b.Rc('df'))},'olympe.df');olympe.T.run([olympe.D.P.Ea],a=>{olympe.D.Nv(a)},'olympe.df');olympe.host={};const Ab=new Map,Bb=new Map;olympe.host.Yp=class{static register(a,b,...c){Ab.set(a,b);0<c.length&&Bb.set(a,c)}static create(a,b,c,d){const e=Ab.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=Bb.get(a);return void 0!==a?new e(b,c,...a.map(f=>la(d,f))):new e(b,c)}};function Cb(a,b,c){a.N.debug('CREATE #',b,', type=',c);a.C.set(b,olympe.host.Yp.create(c,b,a.N,a.L))}function Db(a,b,c,...d){const e=a.C.get(b);if(void 0!==e){a.N.L()<=olympe.ra.Pb.C.dg&&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.lb(f))b.push(a.C.get(f.kv)||null);else if('function'===typeof f){const g=f,h=olympe.D.Ja();b.push((...k)=>{h.Ab()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
349
- function Eb(a){var b=olympe.host.ba.gd,c=olympe.host.ba.Xp.qr;++a.G;const d=a.G;Cb(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.lb(p)?(h.push(n),p=p.Na):olympe.D.Uf(p)&&h.push(n);g[n]=p}0===h.length?e.run(()=>{Db(this,d,k,...g)}):(f=olympe.D.createNode(void 0,(...n)=>{e.run(()=>
350
- {Db(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.zc(a.U.bind(a,d));a=L(e);a.kv=d;K(e,a);return a}olympe.host.sa=class{constructor(a,b){this.N=a;this.L=b;this.G=0;this.C=new Map;this.F=new Map;a.debug('Starting host manager')}Xa(){return this.N}U(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.Ja()}L(){return this.C}G(){return this.C.Na.G()||this.F.G()}Ab(){return this.C.Na.Ab()}};olympe.host.Hd.prototype.L.K=new olympe.D.J(()=>olympe.host.ba.Hd,[]);olympe.host.yk=class{};olympe.host.Ei=class{constructor(){}C(){}F(){}oj(){}};function Fb(a){return(a=a.find(b=>'authToken'===b.ma()))?a.getValue():null}olympe.host.Ei.F=class{constructor(a,b,c=!1){this.name=a;this.value=b;this.C=c}ma(){return this.name}getValue(){return this.value}qb(a){return this.ma()===a.ma()&&this.getValue()===a.getValue()&&this.C===a.C}};function Gb(){const a={}.parameters;return new olympe.host.Ei.C(a?a.map(b=>new olympe.host.Ei.F(b.name,b.value,b.hidden)):[])}
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.Uc(zb,'Last slot manager entry');this.size=pb(olympe.D.Uc(olympe.D.ea,'SlotManager size').repeat(this.F.Fb().dn()),olympe.D.ea.ZERO);this.U=pb(olympe.D.Uc(olympe.D.ea,'last valid slots'),olympe.D.za(-1))});this.Y=[];this.L=[];this.C.onDestroy(()=>{yb(this)})}};
347
+ class zb{constructor(a,b,c,d){this.id=a;this.mc=new olympe.D.Xb('Slot manager entry');this.G=c;this.L=d;this.mc.run(()=>{const e=pb(olympe.D.Uc(olympe.D.ea),olympe.D.ea.ZERO);olympe.D.lb(b)?e.repeat(b):e.update(b);this.C=olympe.D.Uc(olympe.D.ea);this.F=this.C.Fb().he(e.Fb())});this.next=null}Z(){return this.id}kx(){return this.C.Fb()}dn(){return this.F}fe(){return this.G}wx(){return this.L}Ny(a){this.G=a}xy(a){null===a?this.C.update(olympe.D.ea.ZERO):(this.C.repeat(a.dn()),a.next=this)}Dt(){this.C.clear();
348
+ this.next=null}destroy(){this.mc.destroy();this.F=this.C=this.next=null}}m=zb.prototype;m.Z.K=olympe.D.J.C;m.kx.K=new olympe.D.J(()=>olympe.D.ea);m.dn.K=new olympe.D.J(()=>olympe.D.ea);m.fe.K=olympe.D.J.C;m.wx.K=olympe.D.J.C;m.Ny.K=olympe.D.J.C;m.xy.K=olympe.D.J.C;m.Dt.K=olympe.D.J.C;m.destroy.K=olympe.D.J.C;olympe.D.P={Ea:'df.Logger'};olympe.T.config(a=>{D(a,olympe.D.Config.Vp,Number.POSITIVE_INFINITY);C(a,olympe.D.P.Ea,[olympe.ra.P.xa],b=>b.Rc('df'))},'olympe.df');olympe.T.run([olympe.D.P.Ea],a=>{olympe.D.Ov(a)},'olympe.df');olympe.host={};const Ab=new Map,Bb=new Map;olympe.host.Zp=class{static register(a,b,...c){Ab.set(a,b);0<c.length&&Bb.set(a,c)}static create(a,b,c,d){const e=Ab.get(a);if(void 0===e)throw Error('Undefined UI element type: '+a);a=Bb.get(a);return void 0!==a?new e(b,c,...a.map(f=>la(d,f))):new e(b,c)}};function Cb(a,b,c){a.N.debug('CREATE #',b,', type=',c);a.C.set(b,olympe.host.Zp.create(c,b,a.N,a.L))}function Db(a,b,c,...d){const e=a.C.get(b);if(void 0!==e){a.N.L()<=olympe.ra.Pb.C.dg&&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.lb(f))b.push(a.C.get(f.mv)||null);else if('function'===typeof f){const g=f,h=olympe.D.Ja();b.push((...k)=>{h.Ab()||g(...k)})}else b.push(f.valueOf());e[c].apply(e,b)}}
349
+ function Eb(a){var b=olympe.host.ba.gd,c=olympe.host.ba.Yp.rr;++a.G;const d=a.G;Cb(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.lb(p)?(h.push(n),p=p.Na):olympe.D.Uf(p)&&h.push(n);g[n]=p}0===h.length?e.run(()=>{Db(this,d,k,...g)}):(f=olympe.D.createNode(void 0,(...n)=>{e.run(()=>
350
+ {Db(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.zc(a.U.bind(a,d));a=L(e);a.mv=d;K(e,a);return a}olympe.host.sa=class{constructor(a,b){this.N=a;this.L=b;this.G=0;this.C=new Map;this.F=new Map;a.debug('Starting host manager')}Xa(){return this.N}U(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.Ja()}L(){return this.C}G(){return this.C.Na.G()||this.F.G()}Ab(){return this.C.Na.Ab()}};olympe.host.Hd.prototype.L.K=new olympe.D.J(()=>olympe.host.ba.Hd,[]);olympe.host.yk=class{};olympe.host.Ei=class{constructor(){}C(){}F(){}oj(){}};function Fb(a){return(a=a.find(b=>'authToken'===b.ma()))?a.getValue():null}olympe.host.Ei.F=class{constructor(a,b,c=!1){this.name=a;this.value=b;this.C=c}ma(){return this.name}getValue(){return this.value}qb(a){return this.ma()===a.ma()&&this.getValue()===a.getValue()&&this.C===a.C}};function Gb(){const a={}.parameters;return new olympe.host.Ei.C(a?a.map(b=>new olympe.host.Ei.F(b.name,b.value,b.hidden)):[])}
351
351
  olympe.host.Ei.C=class{constructor(a){this.parameters=a}wn(a){const b=new Map(this.parameters.map((c,d)=>[c.ma(),d]));a.parameters.forEach(c=>{b.has(c.ma())?this.parameters[b.get(c.ma())]=c:this.parameters.push(c)})}};function Hb(a,b){var c=olympe.host.af;const d=olympe.W.fc(),e=new olympe.D.Xb('onTimeout context');c.C.aa(b,d,()=>{e.Ab()||e.G()||e.run(a);c.C.G(d)});return new olympe.host.gd.G(c.C,d)}function Ib(a,b){var c=olympe.host.af;const d=olympe.W.fc(),e=new olympe.D.Xb('onInterval context');c.C.Y(b,d,()=>{e.Ab()||e.G()?c.C.F(d):e.run(a)});return new olympe.host.gd.F(c.C,d)}function Jb(a){var b=olympe.host.af;a=a instanceof olympe.host.gd.F?a.Z():a;b.C.F(a)}olympe.host.gd=class{constructor(a){this.C=Eb(a)}};
352
- olympe.host.gd.C=class{constructor(a,b){this.af=a;this.id=b}Z(){return this.id}cancel(){}};olympe.host.gd.L=class extends olympe.host.gd.C{cancel(){this.af.U(this.id)}};olympe.host.gd.G=class extends olympe.host.gd.C{cancel(){this.af.G(this.id)}};olympe.host.gd.F=class extends olympe.host.gd.C{cancel(){this.af.F(this.id)}};olympe.host.ba={};olympe.host.ba.Hd=class{destroy(){}};olympe.host.ba.Hd.prototype.destroy=olympe.host.ba.Hd.prototype.destroy;olympe.host.ba.Xp={Uy:100,Wy:101,Vy:102,Yy:103,Xy:104,Ty:105,YA:201,WA:202,TA:204,aB:205,SA:206,VA:207,ZA:208,bB:209,cB:210,dB:211,UA:212,$A:218,XA:219,eB:220,RA:221,QA:222,nB:300,oB:301,pB:302,tB:303,uB:304,vB:305,qB:310,rB:311,sB:312,yA:400,zA:401,AA:402,uA:450,mA:500,kA:501,pA:502,oA:503,lA:504,nA:505,OB:600,FB:601,JB:602,BB:603,CB:604,zB:605,EB:606,UB:607,MB:608,wB:609,AB:610,DB:611,LB:612,QB:613,xB:614,PB:615,KB:616,TB:617,GB:618,HB:619,IB:620,NB:630,yB:631,RB:632,SB:633,vC:700,ZB:701,$B:702,
353
- 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,qr:800};olympe.host.ba.gd=class{U(){}aa(){}G(){}Y(){}F(){}};olympe.host.P={Vq:'host.System',Il:'host.HistoryManager',Jq:'host.Scheduler',Ea:'host.platform.Logger',xa:'host.Manager'};olympe.host.af=null;olympe.T.config(function(a){sa(a,olympe.host.P.Vq);sa(a,olympe.host.P.Il);C(a,olympe.host.P.Ea,[olympe.ra.P.xa],function(b){return b.Rc('host')});A(a,olympe.host.P.xa,olympe.host.sa,olympe.host.P.Ea,olympe.T.P.cg);C(a,olympe.host.P.Jq,[olympe.host.P.xa],b=>{null===olympe.host.af&&(olympe.host.af=new olympe.host.gd(b));return olympe.host.af},!0)},'olympe.host');
354
- olympe.T.run([olympe.host.P.Jq],a=>a,'olympe.host.scheduler');olympe.T.run([olympe.host.P.xa],a=>a,'olympe.host');olympe.net={};olympe.net.cb={};olympe.net.cb.$d={jm:'POST',GET:'GET',ot:'HEAD',mk:'PUT',Hc:'DELETE',em:'OPTIONS',CA:'PATCH'};olympe.net.cb.ResponseType={zk:'text',ql:'blob',ARRAY_BUFFER:'arraybuffer'};olympe.net.cb.Headers={Kj:'content-type',fz:'content-length',pi:'authorization',vs:'access-control-allow-origin'};olympe.net.cb.gz={cA:'text/html',JSON:'application/json',AC:'application/zip'};olympe.net.cb.hd={Cs:0,Hh:200,wl:201,Cj:202,Sy:400,fv:401,et:403,wA:404,qA:405,Kq:500,Nu:503};function Kb(a){return a.host&&encodeURI(a.host)}function Lb(a){return encodeURI(a.path).replace(olympe.net.Gk.C,(b,c)=>'%'+c)}function Mb(a){return void 0===a.G?443===a.port:a.G}olympe.net.Gk=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`${Mb(this)?'wss':'ws'}://${Kb(this)}:${this.port}/${Lb(this)}`}toString(){return`${Kb(this)}:${this.port}/${Lb(this)}`}};
355
- olympe.net.Gk.C=/%25([0-9a-f]{2})/i;olympe.net.WebSocket=class{send(){}close(){}ka(){}aa(){}U(){}};function Nb(a,b,c,d){a=olympe.W.jy(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.W.ai().C(Ca(`${c[0]}:${c[1]}`)),Ob(b,{Authorization:`Basic ${c}`})));return b}function Pb(a){return void 0!==a.query?a.query.replace(/[^=&]+/g,b=>encodeURIComponent(b)):null}
352
+ olympe.host.gd.C=class{constructor(a,b){this.af=a;this.id=b}Z(){return this.id}cancel(){}};olympe.host.gd.L=class extends olympe.host.gd.C{cancel(){this.af.U(this.id)}};olympe.host.gd.G=class extends olympe.host.gd.C{cancel(){this.af.G(this.id)}};olympe.host.gd.F=class extends olympe.host.gd.C{cancel(){this.af.F(this.id)}};olympe.host.ba={};olympe.host.ba.Hd=class{destroy(){}};olympe.host.ba.Hd.prototype.destroy=olympe.host.ba.Hd.prototype.destroy;olympe.host.ba.Yp={Vy:100,Xy:101,Wy:102,Zy:103,Yy:104,Uy:105,ZA:201,XA:202,UA:204,bB:205,TA:206,WA:207,$A:208,cB:209,dB:210,eB:211,VA:212,aB:218,YA:219,fB:220,SA:221,RA:222,oB:300,pB:301,qB:302,uB:303,vB:304,wB:305,rB:310,sB:311,tB:312,zA:400,AA:401,BA:402,vA:450,nA:500,lA:501,qA:502,pA:503,mA:504,oA:505,PB:600,GB:601,KB:602,CB:603,DB:604,AB:605,FB:606,VB:607,NB:608,xB:609,BB:610,EB:611,MB:612,RB:613,yB:614,QB:615,LB:616,UB:617,HB:618,IB:619,JB:620,OB:630,zB:631,SB:632,TB:633,wC:700,$B:701,aC:702,
353
+ bC:703,dC:704,eC:705,fC:706,cC:707,hC:708,gC:709,iC:710,mC:711,uC:712,jC:713,kC:714,nC:715,oC:716,qC:717,rC:718,tC:719,pC:720,sC:721,vC:722,lC:723,xC:724,yC:725,rr:800};olympe.host.ba.gd=class{U(){}aa(){}G(){}Y(){}F(){}};olympe.host.P={Wq:'host.System',Il:'host.HistoryManager',Kq:'host.Scheduler',Ea:'host.platform.Logger',xa:'host.Manager'};olympe.host.af=null;olympe.T.config(function(a){sa(a,olympe.host.P.Wq);sa(a,olympe.host.P.Il);C(a,olympe.host.P.Ea,[olympe.ra.P.xa],function(b){return b.Rc('host')});A(a,olympe.host.P.xa,olympe.host.sa,olympe.host.P.Ea,olympe.T.P.cg);C(a,olympe.host.P.Kq,[olympe.host.P.xa],b=>{null===olympe.host.af&&(olympe.host.af=new olympe.host.gd(b));return olympe.host.af},!0)},'olympe.host');
354
+ olympe.T.run([olympe.host.P.Kq],a=>a,'olympe.host.scheduler');olympe.T.run([olympe.host.P.xa],a=>a,'olympe.host');olympe.net={};olympe.net.cb={};olympe.net.cb.$d={jm:'POST',GET:'GET',pt:'HEAD',mk:'PUT',Hc:'DELETE',em:'OPTIONS',DA:'PATCH'};olympe.net.cb.ResponseType={zk:'text',ql:'blob',ARRAY_BUFFER:'arraybuffer'};olympe.net.cb.Headers={Kj:'content-type',gz:'content-length',pi:'authorization',ws:'access-control-allow-origin'};olympe.net.cb.hz={dA:'text/html',JSON:'application/json',BC:'application/zip'};olympe.net.cb.hd={Ds:0,Hh:200,wl:201,Cj:202,Ty:400,gv:401,ft:403,xA:404,rA:405,Lq:500,Ou:503};function Kb(a){return a.host&&encodeURI(a.host)}function Lb(a){return encodeURI(a.path).replace(olympe.net.Gk.C,(b,c)=>'%'+c)}function Mb(a){return void 0===a.G?443===a.port:a.G}olympe.net.Gk=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`${Mb(this)?'wss':'ws'}://${Kb(this)}:${this.port}/${Lb(this)}`}toString(){return`${Kb(this)}:${this.port}/${Lb(this)}`}};
355
+ olympe.net.Gk.C=/%25([0-9a-f]{2})/i;olympe.net.WebSocket=class{send(){}close(){}ja(){}aa(){}U(){}};function Nb(a,b,c,d){a=olympe.W.ky(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.ss&&(c=a.ss.split(':'),2===c.length&&(c=olympe.W.ai().C(Ca(`${c[0]}:${c[1]}`)),Ob(b,{Authorization:`Basic ${c}`})));return b}function Pb(a){return void 0!==a.query?a.query.replace(/[^=&]+/g,b=>encodeURIComponent(b)):null}
356
356
  function Ob(a,b){for(let c in b)Object.prototype.hasOwnProperty.call(b,c)&&(a.headers[c]=b[c])}
357
357
  olympe.net.Yj=class extends olympe.net.Gk{constructor(a,b,c,d,e,f,g,h){super(a,b,c,d);this.method=void 0!==e?e:olympe.net.cb.$d.GET;this.query=h;this.headers={};this.body=f;this.F=void 0!==g?g:olympe.net.cb.ResponseType.zk;this.ca=this.cert=this.key=null;this.rejectUnauthorized=!1}hj(){return this.headers}C(){let a=Pb(this);a=a?`?${a}`:'';return Kb(this)?`${Mb(this)?'https':'http'}://${Kb(this)}:${this.port}/${Lb(this)}${a}`:`${Lb(this)}${a}`}toString(){return this.C()}};
358
- olympe.net.Yj.$d={jm:'POST',GET:'GET',ot:'HEAD',mk:'PUT',Hc:'DELETE',em:'OPTIONS'};olympe.net.Tg=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}hj(){return this.headers}};function Qb(a,b,c){const d=olympe.D.Ja(),e=d.onDestroy(()=>{var f=a.F();const g=f.C.get(b);g&&(f.C.delete(b),g())});return d.C(f=>{d.Je(e);a.F().C.delete(b);c(f)})}olympe.net.sa=class{constructor(a){this.N=a;this.G=1;a='Initializing NET layer';this.N.G()&&(a+=' (implementation: '+this.U()+')');this.N.info(a);this.N.log('DONE initializing NET layer (ready to receive connection requests)')}F(){}aa(){}C(){}L(){}U(){}};function Rb(a){return!(!a.client||!a.client.connected)}function Sb(a,b,c){a.connect();a.client.subscribe(b,void 0,d=>{d?a.N.error(`Failed to subscribe to topic ${b}: ${d}`):a.C.set(b,c)})}function Tb(a,b,c){a.connect();a.client.unsubscribe(b,void 0,c);a.C.delete(b)}
359
- olympe.net.gk=class{constructor(a,b){this.url=a;this.G=b||null;this.client=null;this.F=[];this.C=new Map;this.N=olympe.ra.Xa('MQTT')}connect(a){if(Rb(this))return a&&a(),this;a&&this.F.push(a);null===this.client&&(this.client=mqtt.connect(this.url,this.G),this.client.on(olympe.net.gk.C.hu,(b,c)=>{this.C.has(b)?this.C.get(b)(JSON.parse(c.toString())):this.N.warn('There is no subscriber for topic '+b)}),this.client.on(olympe.net.gk.C.Hs,()=>this.F.forEach(b=>b())));return this}publish(a,b,c,d){this.connect();
360
- 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.client&&this.client.end(a,{},()=>{b&&b();this.client=null});return this}};olympe.net.gk.C={Hs:'connect',hu:'message',bz:'close',sz:'end'};olympe.net.Fk=class{constructor(a){this.N=a}aa(){this.N.error('Try to set cors policies on a web server with the browser implementation.');return this}L(){return Promise.reject('Try to open a route on a web server using the browser implementation.')}Y(){return Promise.reject('Try to close a route on a web server using the browser implementation.')}};olympe.net.P={xa:'net.Manager',Ea:'net.Logger',Bm:'net.WebServer'};olympe.net.Config={Jl:'net.httpHost',Kl:'net.httpPort',kp:'net.httpSSL'};
361
- olympe.T.config(function(a){const b='object'===typeof window&&window.location&&window.location.hostname||'localhost',c='localhost'===b;D(a,olympe.net.Config.Jl,b);D(a,olympe.net.Config.Kl,c?3141:443);D(a,olympe.net.Config.kp,!c);sa(a,olympe.net.P.xa);C(a,olympe.net.P.Ea,[olympe.ra.P.xa],function(d){return d.Rc('net')});A(a,olympe.net.P.Bm,olympe.net.Fk,olympe.net.P.Ea)},'olympe.net');olympe.async={};function Ub(a,b){0<=b&&(a.timeout=b)}function Vb(a,b){a.L||a.Ld.push(a.G.C(b))}
358
+ olympe.net.Yj.$d={jm:'POST',GET:'GET',pt:'HEAD',mk:'PUT',Hc:'DELETE',em:'OPTIONS'};olympe.net.Tg=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}hj(){return this.headers}};function Qb(a,b,c){const d=olympe.D.Ja(),e=d.onDestroy(()=>{var f=a.F();const g=f.C.get(b);g&&(f.C.delete(b),g())});return d.C(f=>{d.Je(e);a.F().C.delete(b);c(f)})}olympe.net.sa=class{constructor(a){this.N=a;this.G=1;a='Initializing NET layer';this.N.G()&&(a+=' (implementation: '+this.U()+')');this.N.info(a);this.N.log('DONE initializing NET layer (ready to receive connection requests)')}F(){}aa(){}C(){}L(){}U(){}};function Rb(a){return!(!a.client||!a.client.connected)}function Sb(a,b,c){a.connect();a.client.subscribe(b,void 0,d=>{d?a.N.error(`Failed to subscribe to topic ${b}: ${d}`):a.C.set(b,c)})}function Tb(a,b,c){a.connect();a.client.unsubscribe(b,void 0,c);a.C.delete(b)}
359
+ olympe.net.gk=class{constructor(a,b){this.url=a;this.G=b||null;this.client=null;this.F=[];this.C=new Map;this.N=olympe.ra.Xa('MQTT')}connect(a){if(Rb(this))return a&&a(),this;a&&this.F.push(a);null===this.client&&(this.client=mqtt.connect(this.url,this.G),this.client.on(olympe.net.gk.C.iu,(b,c)=>{this.C.has(b)?this.C.get(b)(JSON.parse(c.toString())):this.N.warn('There is no subscriber for topic '+b)}),this.client.on(olympe.net.gk.C.Is,()=>this.F.forEach(b=>b())));return this}publish(a,b,c,d){this.connect();
360
+ 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.client&&this.client.end(a,{},()=>{b&&b();this.client=null});return this}};olympe.net.gk.C={Is:'connect',iu:'message',cz:'close',uz:'end'};olympe.net.Fk=class{constructor(a){this.N=a}aa(){this.N.error('Try to set cors policies on a web server with the browser implementation.');return this}L(){return Promise.reject('Try to open a route on a web server using the browser implementation.')}Y(){return Promise.reject('Try to close a route on a web server using the browser implementation.')}};olympe.net.P={xa:'net.Manager',Ea:'net.Logger',Bm:'net.WebServer'};olympe.net.Config={Jl:'net.httpHost',Kl:'net.httpPort',mp:'net.httpSSL',kp:'net.httpBodyLimit'};
361
+ olympe.T.config(function(a){const b='object'===typeof window&&window.location&&window.location.hostname||'localhost',c='localhost'===b;D(a,olympe.net.Config.Jl,b);D(a,olympe.net.Config.Kl,c?3141:443);D(a,olympe.net.Config.mp,!c);D(a,olympe.net.Config.kp,100);sa(a,olympe.net.P.xa);C(a,olympe.net.P.Ea,[olympe.ra.P.xa],function(d){return d.Rc('net')});A(a,olympe.net.P.Bm,olympe.net.Fk,olympe.net.P.Ea)},'olympe.net');olympe.async={};function Ub(a,b){0<=b&&(a.timeout=b)}function Vb(a,b){a.L||a.Ld.push(a.G.C(b))}
362
362
  olympe.async.Lo=class{constructor(a,b=void 0===a){this.C=[];this.Ld=[];this.G=a||new olympe.D.Xb('Async executor context');this.oa=b;this.F=null;this.env=new Map;this.env.set('Executor',this);this.L=this.U=!1;this.N=null;this.Y=this.timeout=0}Xa(){return this.N}add(a){this.L||this.C.push(this.G.C(a));return this}start(){this.U||(this.N&&this.N.log('Executor started.'),this.U=!0,0<this.timeout&&(this.Y=setTimeout(()=>{this.F='Timeout expired.';this.Y=0;this.complete(!1)},this.timeout)))}clear(){this.C=
363
363
  [];this.Ld=[];this.env.clear();this.oa&&this.G.destroy()}complete(a){if(!this.L){this.L=!0;this.Y&&(clearTimeout(this.Y),this.Y=0);this.N&&this.N.log(a?'Executor completed successfully':`Executor completed with error: ${this.F}`);for(const b of this.Ld)b(a,a?null:this.F,this.env);this.clear()}}};
364
364
  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.wk=class extends olympe.async.Lo{static create(){return new olympe.async.wk(new olympe.D.Xb('SequencedExecutor'),!0)}insert(a){this.L||this.C.unshift(a);return this}start(){this.U||(super.start(),Wb(this))}};
365
- olympe.async.ng=class extends olympe.async.Lo{constructor(a,b){super(a,b);this.aa=0;this.ka=!0}static create(){return new olympe.async.ng(new olympe.D.Xb('ParallelExecutor'),!0)}run(a){this.N&&this.N.log('Starting a task');this.G.run(()=>{a(()=>{this.done()},b=>{this.ka=!1;b&&(this.F=this.F?`${this.F}. ${b}`:b);this.done()},this.env)})}add(a){super.add(a);this.U&&!this.L&&(this.aa++,this.run(a));return this}done(){this.aa--;0>=this.aa&&this.complete(this.ka)}start(){if(!this.U)if(super.start(),0<
366
- this.C.length){this.aa=this.C.length;for(const a of this.C)this.run(a)}else this.complete(!0)}};olympe.ic={};olympe.ic.Xt=class{constructor(){}set(){}get(){}forEach(){}remove(){}clear(){}close(){}};olympe.ic.Wt=class{constructor(){}C(){}};olympe.ic.Storage=class{open(){}F(){}U(){}write(){}G(){}L(){}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.U(b)}olympe.ic.Ts=class{constructor(a){this.storage=a}};olympe.ic.P={ck:'localStorage.KeyValueManager',Qi:'localStorage.Storage',uo:'localStorage.DatacloudStorage',Ea:'localStorage.Logger'};olympe.T.config(function(a){sa(a,olympe.ic.P.ck);C(a,olympe.ic.P.Ea,[olympe.ra.P.xa],function(b){return b.Rc('localstorage')});A(a,olympe.ic.P.uo,olympe.ic.Ts,olympe.ic.P.Qi)},'olympe.localstorage');olympe.auth={};olympe.auth.Vu=class{U(){}L(){}Sa(){}aa(){}hi(){}oh(){}Tr(){}};function cc(a){a.N.info('Initializing AUTH layer');let b=a.ac;if(a.ka){const c=a.ka.C(),d=Fb(c.parameters);b=d||b;d&&a.ka.F(c.parameters.filter(e=>'authToken'!==e.ma()))}b&&a.storage&&dc(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.U(()=>{if(a.Ya)if(a.L=olympe.auth.sa.G.ts,a.N.log('Connector online, parameter auth.autoLogin=true --\x3e attempting to log with parameters'),a.Y){const c=new olympe.auth.Request;c.set('username',
365
+ olympe.async.ng=class extends olympe.async.Lo{constructor(a,b){super(a,b);this.aa=0;this.ja=!0}static create(){return new olympe.async.ng(new olympe.D.Xb('ParallelExecutor'),!0)}run(a){this.N&&this.N.log('Starting a task');this.G.run(()=>{a(()=>{this.done()},b=>{this.ja=!1;b&&(this.F=this.F?`${this.F}. ${b}`:b);this.done()},this.env)})}add(a){super.add(a);this.U&&!this.L&&(this.aa++,this.run(a));return this}done(){this.aa--;0>=this.aa&&this.complete(this.ja)}start(){if(!this.U)if(super.start(),0<
366
+ this.C.length){this.aa=this.C.length;for(const a of this.C)this.run(a)}else this.complete(!0)}};olympe.ic={};olympe.ic.Yt=class{constructor(){}set(){}get(){}forEach(){}remove(){}clear(){}close(){}};olympe.ic.Xt=class{constructor(){}C(){}};olympe.ic.Storage=class{open(){}F(){}U(){}write(){}G(){}L(){}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.U(b)}olympe.ic.Us=class{constructor(a){this.storage=a}};olympe.ic.P={ck:'localStorage.KeyValueManager',Qi:'localStorage.Storage',uo:'localStorage.DatacloudStorage',Ea:'localStorage.Logger'};olympe.T.config(function(a){sa(a,olympe.ic.P.ck);C(a,olympe.ic.P.Ea,[olympe.ra.P.xa],function(b){return b.Rc('localstorage')});A(a,olympe.ic.P.uo,olympe.ic.Us,olympe.ic.P.Qi)},'olympe.localstorage');olympe.auth={};olympe.auth.Wu=class{U(){}L(){}Sa(){}aa(){}hi(){}oh(){}Ur(){}};function cc(a){a.N.info('Initializing AUTH layer');let b=a.ac;if(a.ja){const c=a.ja.C(),d=Fb(c.parameters);b=d||b;d&&a.ja.F(c.parameters.filter(e=>'authToken'!==e.ma()))}b&&a.storage&&dc(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.U(()=>{if(a.Ya)if(a.L=olympe.auth.sa.G.us,a.N.log('Connector online, parameter auth.autoLogin=true --\x3e attempting to log with parameters'),a.Y){const c=new olympe.auth.Request;c.set('username',
367
367
  a.Y);c.Fn(a.ab);a.N.log('Autologin with user "'+a.Y+'"');ec(a,c)}else a.N.error('autoLogin: auto user not specified.'),fc(a);else a.L=olympe.auth.sa.G.Ak,a.N.log('Connector online, attempting to log with token'),gc(a)});a.F.L(()=>{switch(olympe.D.bb(a.G)){case olympe.auth.sa.C.Ng:a.N.warn('Disconnected from server - session of user '+olympe.D.bb(a.C.Fb()).Sd()+' lost');break;case olympe.auth.sa.C.Ah:a.N.warn('Disconnected from server - guest session lost');break;case olympe.auth.sa.C.ni:a.N.warn('Disconnected from server - authentication aborted');
368
- break;case olympe.auth.sa.C.INIT:a.N.warn('Cannot open auth session - no server connection');break;default:a.N.error('Should not get there, investigate')}hc(a,olympe.auth.sa.C.gg)});a.F.Sa((c,d)=>{if(c===olympe.auth.sa.F.Cj)a.N.info('Authentication revoked'),fc(a),a.storage&&ic(a.storage),a.oa.forEach(e=>{e(c,d)});else if(c===olympe.auth.sa.F.op)a.N.info('Redirection to IDP to invalidate token (SAML)'),a.storage&&ic(a.storage),a.Sa.F();else throw Error(`Unknown logout step coming from server : ${c}`);
368
+ break;case olympe.auth.sa.C.INIT:a.N.warn('Cannot open auth session - no server connection');break;default:a.N.error('Should not get there, investigate')}hc(a,olympe.auth.sa.C.gg)});a.F.Sa((c,d)=>{if(c===olympe.auth.sa.F.Cj)a.N.info('Authentication revoked'),fc(a),a.storage&&ic(a.storage),a.oa.forEach(e=>{e(c,d)});else if(c===olympe.auth.sa.F.pp)a.N.info('Redirection to IDP to invalidate token (SAML)'),a.storage&&ic(a.storage),a.Sa.F();else throw Error(`Unknown logout step coming from server : ${c}`);
369
369
  });a.N.log('DONE initializing AUTH layer (waiting for connector to be online)')}
370
370
  function gc(a){null!==a.storage?(a.N.debug('Retrieving token from local storage'),a.storage.bd(b=>{if(b){const d=new olympe.auth.Request;var c=b.Sd();d.set('username',c);b=b.Mf();d.set('nonce',b);a.N.debug('Token found, trying login with',d);ec(a,d,a.Lb)}else a.N.debug('No token found, cannot perform auto login. Falling back in GUEST state'),fc(a)})):(a.N.error('Cannot retrieve token: no storage configured, cannot perform auto login. Falling back in GUEST state'),fc(a))}
371
371
  function hc(a,b){a.N.log('State change: ',jc(a),'--\x3e',b);a.G.update(b)}function fc(a){a.C.update(a.Da);hc(a,olympe.auth.sa.C.Ah);a.N.info('Authenticated as guest')}function jc(a){return olympe.D.bb(a.G.Fb())}function kc(a){const b=olympe.auth.sa.C.Ng,c=olympe.auth.sa.C.Ah,d=olympe.auth.sa.C.ni,e=olympe.D.Uc(olympe.D.qa,'auth.isOnline');olympe.D.Ec([a.G],f=>{f=olympe.D.Cc(f===b||f===c||f===d);const g=olympe.D.bb(e);void 0!==g&&g.qb(f)||e.update(f)},'Router is online');return e.Fb()}
372
372
  function lc(a){var b=olympe.public.Ua.get(),c='logoutCallback';void 0===c&&(c=olympe.W.yg());b.oa.set(c,a)}function mc(a){return a.C.Fb().Mf()}function nc(a,b,c,d=!1){b=b+c?':'+c.message:'';a.N.error(b);a.error.update(olympe.D.Bb(b));hc(a,olympe.auth.sa.C.uc);if(d)throw Error(b);}
373
373
  function ec(a,b,c,d){void 0===c&&(c=a.wb);void 0===c&&nc(a,'No authentication provider specified',null,!0);const e=a.Jb.get(c);e||nc(a,'Undefined authentication provider "'+c+'"',null,!0);d&&a.U.set('login',d);a.N.log('Sending authentication request using "'+c+'" for '+b);e.bd(b,a.Ib.bind(a));hc(a,olympe.auth.sa.C.ni)}function oc(a,b,c){a.U.forEach(d=>{d(b,c)})}
374
- olympe.auth.sa=class{constructor(a,b,c,d,e,f,g,h,k,l,n,p){this.N=a;this.F=b;this.storage=c;this.Sa=d;this.ka=e;this.wb=g;this.Lb=h;this.Ya=void 0===k?!0:k;this.Y=l;this.ab=n;this.ac=p;this.Jb=new Map;this.G=olympe.D.Uc(String).update(olympe.auth.sa.C.INIT);this.error=olympe.D.Uc(olympe.D.Wa);this.L=null;this.Da=new olympe.auth.vf('guest','0163d9653067b6237f62','e96e099c-55bb-4004-b0e8-bd76b6209218');this.C=olympe.D.Uc(olympe.auth.vf).update(this.Da);this.U=new Map;this.oa=new Map;f.forEach(q=>{const r=
374
+ olympe.auth.sa=class{constructor(a,b,c,d,e,f,g,h,k,l,n,p){this.N=a;this.F=b;this.storage=c;this.Sa=d;this.ja=e;this.wb=g;this.Lb=h;this.Ya=void 0===k?!0:k;this.Y=l;this.ab=n;this.ac=p;this.Jb=new Map;this.G=olympe.D.Uc(String).update(olympe.auth.sa.C.INIT);this.error=olympe.D.Uc(olympe.D.Wa);this.L=null;this.Da=new olympe.auth.vf('guest','0163d9653067b6237f62','e96e099c-55bb-4004-b0e8-bd76b6209218');this.C=olympe.D.Uc(olympe.auth.vf).update(this.Da);this.U=new Map;this.oa=new Map;f.forEach(q=>{const r=
375
375
  q.ma();if(this.Jb.has(r))throw Error('Provider "'+r+'" has already been registered !');this.Jb.set(r,q)});cc(this)}getState(){return this.G.Fb()}aa(){return this.error.Fb()}Sd(){return this.C.Fb().Sd()}Dg(){return this.C.Fb().Dg()}bi(){return this.C.Fb().bi()}oh(a,b){this.F.oh(a,olympe.D.bb(mc(this)),b)}un(){this.N.debug('Sending logout');ic(this.storage);this.F.aa(a=>{a?nc(this,'Logout request rejected:',a):this.N.debug('Logout request acknowledged')})}hi(){jc(this)===olympe.auth.sa.C.Ng&&this.F.hi(a=>
376
- {a&&this.N.error('Was not able to send the auth keep alive message:',a.message)})}Ib(a,b){const c=null===this.L?olympe.auth.sa.G.eu:this.L;this.L=null;a?(this.N.warn('Authentication rejected: '+a.message+'. Falling back into GUEST state'),ic(this.storage),this.error.update(olympe.D.Bb(a.message)),fc(this),oc(this,a,c)):(this.N.info('User '+b.Sd()+' (#'+b.Dg()+') successfully authenticated'),this.C.update(b),hc(this,olympe.auth.sa.C.Ng),oc(this,a,c),this.storage&&dc(this.storage,b));this.U.has('login')&&
377
- this.U.delete('login')}};olympe.auth.sa.C={INIT:'init',gg:'disconnected',Ah:'guest',ni:'authenticating',uc:'error',Ng:'authenticated'};olympe.auth.sa.G={eu:'manual',ts:'auto',Ak:'tokenOnFirstConnection'};olympe.auth.sa.F={Cj:'accepted',op:'redirect'};olympe.auth.Ni=class{ma(){}bd(){}};olympe.auth.Request=class{constructor(){this.C=new Map}set(a,b){olympe.D.Ec([b],c=>{this.C.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.C.get(a.toLowerCase()))&&a.zf&&(a=a.Na.Kb);return a?a.valueOf():a}Sd(){return this.get('username')}Fn(a){this.set('password',a)}Mf(){return this.get('nonce')}toString(){return this.Sd()+(this.Mf()?' with nonce':'')+(this.get('password')?' with password':'')}};olympe.auth.vf=class{constructor(a,b,c,d={}){this.user=a;this.Bj=b;this.F=c;this.G=d}Sd(){return this.user}Dg(){return this.Bj}Mf(){return this.F}ak(){return this.G}bi(){return null}ia(){var a=olympe.W,b=a.Br;var c=JSON.stringify({user:this.user,userTag:this.Bj,nonce:this.F,payload:this.G});c=olympe.W.ai().C(Ca(c));return b.call(a,c)}};m=olympe.auth.vf.prototype;m.Sd.K=new olympe.D.J(()=>String,[]);m.Dg.K=new olympe.D.J(()=>String,[]);m.Mf.K=new olympe.D.J(()=>String,[]);
378
- m.ak.K=new olympe.D.J(()=>Object,[]);m.bi.K=new olympe.D.J(()=>String,[]);m.ia.K=new olympe.D.J(()=>String,[]);olympe.auth.hm=class extends olympe.auth.vf{constructor(a,b,c,d){super(a,b,c,d)}bi(){return this.ak().access_token||null}};olympe.auth.Iq=class extends olympe.auth.vf{constructor(a,b,c,d){super(a,b,c,d);this.C=null}bi(){return this.C}ia(){var a=olympe.W.ai(),b={user:this.Sd(),userTag:this.Dg(),nonce:this.Mf(),payload:this.ak(),fullToken:this.C},c=olympe.W,d=c.Br;b=JSON.stringify(b);a=a.C(Ca(b));return d.call(c,a)}};function dc(a,b,c){const d=a.C.C('AUTH');d.set(a.key,'string'===typeof b?b:b.ia(),e=>{d.close();c&&c(e)})}function ic(a){const b=a.C.C('AUTH');b.remove(a.key,()=>b.close())}
379
- olympe.auth.xm=class{constructor(a,b,c){this.C=a;this.N=b;this.key='OlympeToken-'+c.C}bd(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=Da(olympe.W.ai().U(olympe.W.Dv(c)));const h=f.call(e,g);if(h.fullToken){const k=new olympe.auth.Iq(h.user,h.userTag,h.nonce,h.payload);k.C=h.fullToken;d=k}else d=h.payload&&
380
- h.payload.id_token?new olympe.auth.hm(h.user,h.userTag,h.nonce,h.payload):new olympe.auth.vf(h.user,h.userTag,h.nonce,h.payload)}}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.xm.F='OlympeToken';olympe.auth.xm.C='AUTH';olympe.auth.tk=class{redirect(){}F(){}C(){}};olympe.auth.tk.C={GET:'GET',jm:'POST'};olympe.auth.ol=class{constructor(a){this.C=a||'default'}};olympe.auth.Jb={};olympe.auth.Jb.pa={};olympe.auth.Jb.pa.Ii=class{Y(){}};olympe.auth.Jb.pa.Oe=class{ka(){}};olympe.auth.Jb.pa.Ee=class{oa(){}Da(){}};function pc(a,b){return olympe.W.mb(b+'-olympe-'+a.C[b])}olympe.auth.Jb.Hi=class{constructor(a){this.C=a}ma(){return'local'}bd(a,b){const c=a.Sd();if(c){const d=a.get('password'),e=a.Mf();a.C.delete('password');if(void 0!==e&&pc(this,c)===e){b(null,new olympe.auth.vf(c,'',pc(this,c)));return}a=olympe.W.mb(d||'');if(this.C[c]===a){b(null,new olympe.auth.vf(c,'',pc(this,c)));return}}b(Error('Invalid login'))}};olympe.auth.Jb.Hi.C='local';olympe.auth.Jb.Hi.la=[olympe.auth.Ni];olympe.auth.Jb.Ii=class{constructor(a,b){this.C=a;this.storage=b}ma(){return'localToken'}bd(a,b){this.storage.bd(c=>{this.C.Y(a,(d,e)=>{b(d,e||c)})})}};olympe.auth.Jb.Ii.C='localToken';olympe.auth.Jb.Ii.la=[olympe.auth.Ni];olympe.auth.Jb.gm=class{constructor(a,b){this.C=a;this.F=b}ma(){return'openID'}bd(){const a=this.C.C();this.C.redirect(`${this.F}/auth?url=${a}`,null,olympe.auth.tk.C.GET)}};olympe.auth.Jb.gm.C='openID';olympe.auth.Jb.gm.la=[olympe.auth.Ni];olympe.auth.Jb.Oe=class{constructor(a,b){this.F=a;this.C=b}ma(){return'saml'}bd(a,b){this.F.ka(c=>{c?b(c):this.C.F()})}};olympe.auth.Jb.Oe.C='saml';olympe.auth.Jb.Oe.la=[olympe.auth.Ni];olympe.auth.Jb.Ee=class{static cj(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.ra.Xa('auth')}ma(){return'srp'}bd(a,b){const c=a.get('password');a.C.delete('password');this.N.debug('Sending SRP request');this.C.oa(a,(d,e,f)=>{this.N.debug('Received Salt+B message');if(d)b(d);else{try{const g=new SRPClient;g.step1(a.Sd(),c);const h=g.step2(e,f);a.set('a',h.A);a.set('m1',h.M1)}catch(g){b(g);
381
- return}this.N.debug('Sending SRP A+M (proof) message');this.C.Da(a,b)}})}};olympe.auth.Jb.Ee.C='srp';olympe.auth.Jb.Ee.la=[olympe.auth.Ni];olympe.auth.P={xa:'auth.Manager',Ea:'auth.Logger',Qi:'auth.Storage',Dj:'auth.appNameToken',pk:'auth.Redirector'};olympe.auth.sd={xa:'auth.ManagerConnector',Ip:'auth.LocalTokenConnector',Ee:'auth.SRPConnector',Oe:'auth.SAMLConnector'};olympe.auth.Config={zl:'auth.defaultProvider',Jp:'auth.localTokenProvider',On:'auth.autoLogin',Sn:'auth.autoUser',Pn:'auth.autoPassword',Ak:'auth.token',Mn:'auth.appToken'};
382
- olympe.T.config(function(a){D(a,olympe.auth.Config.zl,'srp');D(a,olympe.auth.Config.Jp,'localToken');D(a,olympe.auth.Config.On,!1);D(a,olympe.auth.Config.Sn,'');D(a,olympe.auth.Config.Pn,'');D(a,olympe.auth.Config.Ak,'');D(a,olympe.auth.Config.Mn,'default');C(a,olympe.auth.P.Ea,[olympe.ra.P.xa],b=>b.Rc('auth'));A(a,olympe.auth.P.Dj,olympe.auth.ol,new olympe.T.fa(olympe.auth.Config.Mn));A(a,olympe.auth.P.Qi,olympe.auth.xm,olympe.ic.P.ck,olympe.auth.P.Ea,olympe.auth.P.Dj);sa(a,olympe.auth.sd.xa);sa(a,
383
- olympe.auth.P.pk);C(a,olympe.auth.P.xa,[olympe.auth.P.Ea,olympe.auth.sd.xa,olympe.host.P.Il,new olympe.T.zb(olympe.auth.P.Qi,olympe.T.gf.C.Gh),new olympe.T.fa(olympe.auth.Config.zl),new olympe.T.fa(olympe.auth.Config.Jp),new olympe.T.fa(olympe.auth.Config.On),new olympe.T.fa(olympe.auth.Config.Sn),new olympe.T.fa(olympe.auth.Config.Pn),new olympe.T.fa(olympe.auth.Config.Ak),new olympe.T.zb(olympe.auth.P.pk,olympe.T.gf.C.Gh),new olympe.T.zb(olympe.auth.sd.Ip,olympe.T.gf.C.Gh),new olympe.T.zb(olympe.auth.sd.Ee,
384
- olympe.T.gf.C.Gh),new olympe.T.zb(olympe.auth.sd.Oe,olympe.T.gf.C.Gh)],(b,c,d,e,f,g,h,k,l,n,p,q,r,t)=>{const u=[];q&&u.push(new olympe.auth.Jb.Ii(q,e));r&&u.push(new olympe.auth.Jb.Ee(r));t&&p&&u.push(new olympe.auth.Jb.Oe(t,p));p&&c&&u.push(new olympe.auth.Jb.gm(p,c.Tr()));if(0===u.length)throw Error('At least one provider is needed for auth to start');if(!u.map(v=>v.ma()).includes(f))throw Error('Default provider name'+f+'given by parameter'+olympe.auth.Config.zl+'cannot be found');return new olympe.auth.sa(b,
385
- c,e,p,d.oj()?d:null,u,f,g,h,k,l,n)},!0)},'olympe.auth');olympe.T.run([olympe.auth.P.xa],a=>{olympe.auth.Tc=()=>a});olympe.dc={};olympe.dc.Aa={ORIGIN:'<',DESTINATION:'>'};z('olympe.dc.Direction',olympe.dc.Aa);olympe.dc.kc={Xc:'ff022000000000000000',xi:'ff02200000000000000e',jo:'ff02200000000000000f'};olympe.dc.$b={VERSION:'@v',Jd:'@s'};olympe.dc.Ug={jc:'?'};olympe.dc.xk={bq:'online',bm:'offline',ut:'invalidate'};olympe.dc.Ga={rb:'self',Pc:'server',kq:'peer',jc:'server'};olympe.dc.wa=function(a){if('string'===typeof a)return a;let b=null;a=olympe.D.bb(a);void 0!==a&&null!==a&&(a=a.valueOf(),'string'===typeof a?b=a:a.R?b=a.R():'function'===typeof a&&(b=olympe.dc.ya.Tb(a)));return b||''};z('olympe.dc.instanceToTag',olympe.dc.wa);olympe.dc.Oa=function(){return olympe.dc.Ad().view};olympe.dc.register=function(a,b){olympe.dc.ya.C(a,b)};olympe.dc.defineProperty=function(a){return new olympe.dc.ta.Property(a)};
386
- olympe.dc.ih=function(a,b=olympe.dc.Aa.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.Aa.DESTINATION){const e=olympe.dc.Aa.DESTINATION;return b===olympe.dc.Aa.ORIGIN||b===e?new olympe.dc.ta.Relation(a,b):new olympe.dc.ta.Relation(a,d,b,c)};olympe.dc.Qv=function(a){return a.Gc()};olympe.dc.Writable=class{F(){}tc(){}Mc(){}Ra(){}ec(){}};olympe.dc.lm=class{Qc(){}Z(){}G(){}};function qc(a,b,c,d,e,f,g){d=new olympe.dc.ga(olympe.dc.ga.ja.Qh,{file:b,url:null,content:c,Ye:e?h=>{rc(a,b,c);f(h)}:f,mimeType:d,se:g||null},[olympe.dc.Oa().source(b)||olympe.dc.Ga.Pc]);a.F.send(d)}function sc(a,b,c,d,e,f){c=c instanceof olympe.D.Wa?c.valueOf():c;'string'===typeof c?c=new Blob([Ca(c)],{type:d}):c instanceof ArrayBuffer&&(c=new Blob([c],{type:d}));qc(a,b,c,d,a.G,e,f)}
387
- function rc(a,b,c){const d=olympe.dc.wa(b);a.C.set(d,c);const e=olympe.W.yg();tc(olympe.dc.Oa(),d,f=>{f||(a.C.delete(d),uc(olympe.dc.Oa(),d,e))},e)}function vc(a,b,c,d){olympe.D.es([b.Zr(),b.R(),b.Rl(),b.fn()],(e,f,g,h)=>{a.C.has(f)?c(a.C.get(f)):(e=new olympe.dc.ga(olympe.dc.ga.ja.xh,{file:f,url:e.valueOf()?null:g,mimeType:h.valueOf(),Ye:a.G?k=>{rc(a,f,k);c(k)}:c,se:d},[olympe.dc.Oa().source(f)||olympe.dc.Ga.Pc]),a.F.send(e))})}
388
- olympe.dc.ht=class{constructor(a,b,c,d,e){this.N=a;this.F=c;this.G=e;this.C=new Map}};olympe.dc.sa=class{constructor(a){this.N=a}};function wc(a,b){a.F=b;return a}function M(a,b){a.Vh.unshift(b);return a}olympe.dc.ga=class{constructor(a,b,c){this.type=a;this.content=b;this.C=c;this.Vh=[];this.F=olympe.D.Ja()}validate(a=null){this.Vh.forEach(b=>{b(a||null)})}toString(){const a=olympe.W.Rr(olympe.dc.ga.ja,this.type);return a?a:'UNKNOWN_MESSAGE'}};
389
- olympe.dc.ga.ja={uc:1,lg:2,Sg:10,aA:11,Qu:20,iB:21,jB:22,Su:23,Ai:24,zi:25,bA:26,Zo:28,om:30,qm:31,zu:32,eh:40,Bk:41,wh:45,Ij:46,Sj:47,Qh:50,xh:51,wi:52,gv:60,Fu:61,jt:62,kt:63,Fs:64,sl:65,$z:90,yl:91,Hl:92,$o:93,Ep:94,hk:95,Ru:96,QUERY_RESULT:97,pm:98};olympe.dc.og=class{process(){}};olympe.dc.mm=class{constructor(...a){this.Wb=a}process(a,b,c){const d=this.Wb.length,e=(f,g,h)=>{g||f>=d?c(g,h):this.Wb[f].process(a,h,e.bind(null,f+1))};e(0,null,b)}};olympe.dc.mm.la=[olympe.dc.og];olympe.dc.Jc=class{constructor(a){this.tag='string'===typeof a?a:a.R()}R(){return this.tag}toJSON(){return'{ "type": "reference", "tag": '+JSON.stringify(this.tag)+' }'}qb(a){return a instanceof olympe.dc.Jc&&this.tag===a.tag}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.Jc(b.tag)}};olympe.dc.Jc.la=[olympe.dc.ze];olympe.dc.Jc.prototype.toJSON.K=olympe.D.J.C;olympe.dc.Jc.prototype.qb.K=olympe.D.J.C;olympe.dc.pg=class{send(){}C(){}oa(){}};const xc=olympe.dc.Aa.ORIGIN,yc=olympe.dc.Aa.DESTINATION,zc=new Map,Ac=new Map,Bc=new Map,Cc=new Map;function Dc(a,b){var c=olympe.dm.File;let d=c;'function'===typeof c&&(d=b.entry);c=[...(d.Hn||[])];return olympe.dc.ya.C(a,b,...c)}function Ec(a,b){Cc.set(a,b);return a}function Fc(a){return(a=zc.get(a))&&a.C||olympe.dc.CloudObject}function Gc(a,b,c){const d=a+'@'+(b===yc?xc:yc);if(Ac.has(d))throw Error(`Try to register the same relation (${b+a}) multiple times.`);Ac.set(d,c)}
376
+ {a&&this.N.error('Was not able to send the auth keep alive message:',a.message)})}Ib(a,b){const c=null===this.L?olympe.auth.sa.G.fu:this.L;this.L=null;a?(this.N.warn('Authentication rejected: '+a.message+'. Falling back into GUEST state'),ic(this.storage),this.error.update(olympe.D.Bb(a.message)),fc(this),oc(this,a,c)):(this.N.info('User '+b.Sd()+' (#'+b.Dg()+') successfully authenticated'),this.C.update(b),hc(this,olympe.auth.sa.C.Ng),oc(this,a,c),this.storage&&dc(this.storage,b));this.U.has('login')&&
377
+ this.U.delete('login')}};olympe.auth.sa.C={INIT:'init',gg:'disconnected',Ah:'guest',ni:'authenticating',uc:'error',Ng:'authenticated'};olympe.auth.sa.G={fu:'manual',us:'auto',Ak:'tokenOnFirstConnection'};olympe.auth.sa.F={Cj:'accepted',pp:'redirect'};olympe.auth.Ni=class{ma(){}bd(){}};olympe.auth.Request=class{constructor(){this.C=new Map}set(a,b){olympe.D.Ec([b],c=>{this.C.set(a.toLocaleLowerCase(),c.toString())})}get(a){(a=this.C.get(a.toLowerCase()))&&a.zf&&(a=a.Na.Kb);return a?a.valueOf():a}Sd(){return this.get('username')}Fn(a){this.set('password',a)}Mf(){return this.get('nonce')}toString(){return this.Sd()+(this.Mf()?' with nonce':'')+(this.get('password')?' with password':'')}};olympe.auth.vf=class{constructor(a,b,c,d={}){this.user=a;this.Bj=b;this.F=c;this.G=d}Sd(){return this.user}Dg(){return this.Bj}Mf(){return this.F}ak(){return this.G}bi(){return null}ia(){var a=olympe.W,b=a.Cr;var c=JSON.stringify({user:this.user,userTag:this.Bj,nonce:this.F,payload:this.G});c=olympe.W.ai().C(Ca(c));return b.call(a,c)}};m=olympe.auth.vf.prototype;m.Sd.K=new olympe.D.J(()=>String,[]);m.Dg.K=new olympe.D.J(()=>String,[]);m.Mf.K=new olympe.D.J(()=>String,[]);
378
+ m.ak.K=new olympe.D.J(()=>Object,[]);m.bi.K=new olympe.D.J(()=>String,[]);m.ia.K=new olympe.D.J(()=>String,[]);olympe.auth.hm=class extends olympe.auth.vf{constructor(a,b,c,d){super(a,b,c,d)}bi(){return this.ak().access_token||null}};olympe.auth.Jq=class extends olympe.auth.vf{constructor(a,b,c,d){super(a,b,c,d);this.C=null}bi(){return this.C}ia(){var a=olympe.W.ai(),b={user:this.Sd(),userTag:this.Dg(),nonce:this.Mf(),payload:this.ak(),fullToken:this.C},c=olympe.W,d=c.Cr;b=JSON.stringify(b);a=a.C(Ca(b));return d.call(c,a)}};function dc(a,b,c){const d=a.C.C('AUTH');d.set(a.key,'string'===typeof b?b:b.ia(),e=>{d.close();c&&c(e)})}function ic(a){const b=a.C.C('AUTH');b.remove(a.key,()=>b.close())}
379
+ olympe.auth.xm=class{constructor(a,b,c){this.C=a;this.N=b;this.key='OlympeToken-'+c.C}bd(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=Da(olympe.W.ai().U(olympe.W.Ev(c)));const h=f.call(e,g);if(h.fullToken){const k=new olympe.auth.Jq(h.user,h.userTag,h.nonce,h.payload);k.C=h.fullToken;d=k}else d=h.payload&&
380
+ h.payload.id_token?new olympe.auth.hm(h.user,h.userTag,h.nonce,h.payload):new olympe.auth.vf(h.user,h.userTag,h.nonce,h.payload)}}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.xm.F='OlympeToken';olympe.auth.xm.C='AUTH';olympe.auth.tk=class{redirect(){}F(){}C(){}};olympe.auth.tk.C={GET:'GET',jm:'POST'};olympe.auth.ol=class{constructor(a){this.C=a||'default'}};olympe.auth.Jb={};olympe.auth.Jb.pa={};olympe.auth.Jb.pa.Ii=class{Y(){}};olympe.auth.Jb.pa.Oe=class{ja(){}};olympe.auth.Jb.pa.Ee=class{oa(){}Da(){}};function pc(a,b){return olympe.W.mb(b+'-olympe-'+a.C[b])}olympe.auth.Jb.Hi=class{constructor(a){this.C=a}ma(){return'local'}bd(a,b){const c=a.Sd();if(c){const d=a.get('password'),e=a.Mf();a.C.delete('password');if(void 0!==e&&pc(this,c)===e){b(null,new olympe.auth.vf(c,'',pc(this,c)));return}a=olympe.W.mb(d||'');if(this.C[c]===a){b(null,new olympe.auth.vf(c,'',pc(this,c)));return}}b(Error('Invalid login'))}};olympe.auth.Jb.Hi.C='local';olympe.auth.Jb.Hi.la=[olympe.auth.Ni];olympe.auth.Jb.Ii=class{constructor(a,b){this.C=a;this.storage=b}ma(){return'localToken'}bd(a,b){this.storage.bd(c=>{this.C.Y(a,(d,e)=>{b(d,e||c)})})}};olympe.auth.Jb.Ii.C='localToken';olympe.auth.Jb.Ii.la=[olympe.auth.Ni];olympe.auth.Jb.gm=class{constructor(a,b){this.C=a;this.F=b}ma(){return'openID'}bd(){const a=this.C.C();this.C.redirect(`${this.F}/auth?url=${a}`,null,olympe.auth.tk.C.GET)}};olympe.auth.Jb.gm.C='openID';olympe.auth.Jb.gm.la=[olympe.auth.Ni];olympe.auth.Jb.Oe=class{constructor(a,b){this.F=a;this.C=b}ma(){return'saml'}bd(a,b){this.F.ja(c=>{c?b(c):this.C.F()})}};olympe.auth.Jb.Oe.C='saml';olympe.auth.Jb.Oe.la=[olympe.auth.Ni];olympe.auth.Jb.Ee=class{static cj(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.ra.Xa('auth')}ma(){return'srp'}bd(a,b){const c=a.get('password');a.C.delete('password');this.N.debug('Sending SRP request');this.C.oa(a,(d,e,f)=>{this.N.debug('Received Salt+B message');if(d)b(d);else{try{const g=new SRPClient;g.step1(a.Sd(),c);const h=g.step2(e,f);a.set('a',h.A);a.set('m1',h.M1)}catch(g){b(g);
381
+ return}this.N.debug('Sending SRP A+M (proof) message');this.C.Da(a,b)}})}};olympe.auth.Jb.Ee.C='srp';olympe.auth.Jb.Ee.la=[olympe.auth.Ni];olympe.auth.P={xa:'auth.Manager',Ea:'auth.Logger',Qi:'auth.Storage',Dj:'auth.appNameToken',pk:'auth.Redirector'};olympe.auth.sd={xa:'auth.ManagerConnector',Jp:'auth.LocalTokenConnector',Ee:'auth.SRPConnector',Oe:'auth.SAMLConnector'};olympe.auth.Config={zl:'auth.defaultProvider',Kp:'auth.localTokenProvider',On:'auth.autoLogin',Sn:'auth.autoUser',Pn:'auth.autoPassword',Ak:'auth.token',Mn:'auth.appToken'};
382
+ olympe.T.config(function(a){D(a,olympe.auth.Config.zl,'srp');D(a,olympe.auth.Config.Kp,'localToken');D(a,olympe.auth.Config.On,!1);D(a,olympe.auth.Config.Sn,'');D(a,olympe.auth.Config.Pn,'');D(a,olympe.auth.Config.Ak,'');D(a,olympe.auth.Config.Mn,'default');C(a,olympe.auth.P.Ea,[olympe.ra.P.xa],b=>b.Rc('auth'));A(a,olympe.auth.P.Dj,olympe.auth.ol,new olympe.T.fa(olympe.auth.Config.Mn));A(a,olympe.auth.P.Qi,olympe.auth.xm,olympe.ic.P.ck,olympe.auth.P.Ea,olympe.auth.P.Dj);sa(a,olympe.auth.sd.xa);sa(a,
383
+ olympe.auth.P.pk);C(a,olympe.auth.P.xa,[olympe.auth.P.Ea,olympe.auth.sd.xa,olympe.host.P.Il,new olympe.T.zb(olympe.auth.P.Qi,olympe.T.gf.C.Gh),new olympe.T.fa(olympe.auth.Config.zl),new olympe.T.fa(olympe.auth.Config.Kp),new olympe.T.fa(olympe.auth.Config.On),new olympe.T.fa(olympe.auth.Config.Sn),new olympe.T.fa(olympe.auth.Config.Pn),new olympe.T.fa(olympe.auth.Config.Ak),new olympe.T.zb(olympe.auth.P.pk,olympe.T.gf.C.Gh),new olympe.T.zb(olympe.auth.sd.Jp,olympe.T.gf.C.Gh),new olympe.T.zb(olympe.auth.sd.Ee,
384
+ olympe.T.gf.C.Gh),new olympe.T.zb(olympe.auth.sd.Oe,olympe.T.gf.C.Gh)],(b,c,d,e,f,g,h,k,l,n,p,q,r,t)=>{const u=[];q&&u.push(new olympe.auth.Jb.Ii(q,e));r&&u.push(new olympe.auth.Jb.Ee(r));t&&p&&u.push(new olympe.auth.Jb.Oe(t,p));p&&c&&u.push(new olympe.auth.Jb.gm(p,c.Ur()));if(0===u.length)throw Error('At least one provider is needed for auth to start');if(!u.map(v=>v.ma()).includes(f))throw Error('Default provider name'+f+'given by parameter'+olympe.auth.Config.zl+'cannot be found');return new olympe.auth.sa(b,
385
+ c,e,p,d.oj()?d:null,u,f,g,h,k,l,n)},!0)},'olympe.auth');olympe.T.run([olympe.auth.P.xa],a=>{olympe.auth.Tc=()=>a});olympe.dc={};olympe.dc.Aa={ORIGIN:'<',DESTINATION:'>'};z('olympe.dc.Direction',olympe.dc.Aa);olympe.dc.kc={Xc:'ff022000000000000000',xi:'ff02200000000000000e',jo:'ff02200000000000000f'};olympe.dc.$b={VERSION:'@v',Jd:'@s'};olympe.dc.Ug={jc:'?'};olympe.dc.xk={cq:'online',bm:'offline',vt:'invalidate'};olympe.dc.Ga={rb:'self',Pc:'server',lq:'peer',jc:'server'};olympe.dc.wa=function(a){if('string'===typeof a)return a;let b=null;a=olympe.D.bb(a);void 0!==a&&null!==a&&(a=a.valueOf(),'string'===typeof a?b=a:a.R?b=a.R():'function'===typeof a&&(b=olympe.dc.ya.Tb(a)));return b||''};z('olympe.dc.instanceToTag',olympe.dc.wa);olympe.dc.Oa=function(){return olympe.dc.Ad().view};olympe.dc.register=function(a,b){olympe.dc.ya.C(a,b)};olympe.dc.defineProperty=function(a){return new olympe.dc.ta.Property(a)};
386
+ olympe.dc.ih=function(a,b=olympe.dc.Aa.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.Aa.DESTINATION){const e=olympe.dc.Aa.DESTINATION;return b===olympe.dc.Aa.ORIGIN||b===e?new olympe.dc.ta.Relation(a,b):new olympe.dc.ta.Relation(a,d,b,c)};olympe.dc.Rv=function(a){return a.Gc()};olympe.dc.Writable=class{F(){}tc(){}Mc(){}Ra(){}ec(){}};olympe.dc.lm=class{Qc(){}Z(){}G(){}};function qc(a,b,c,d,e,f,g){d=new olympe.dc.ga(olympe.dc.ga.ka.Qh,{file:b,url:null,content:c,Ye:e?h=>{rc(a,b,c);f(h)}:f,mimeType:d,se:g||null},[olympe.dc.Oa().source(b)||olympe.dc.Ga.Pc]);a.F.send(d)}function sc(a,b,c,d,e,f){c=c instanceof olympe.D.Wa?c.valueOf():c;'string'===typeof c?c=new Blob([Ca(c)],{type:d}):c instanceof ArrayBuffer&&(c=new Blob([c],{type:d}));qc(a,b,c,d,a.G,e,f)}
387
+ function rc(a,b,c){const d=olympe.dc.wa(b);a.C.set(d,c);const e=olympe.W.yg();tc(olympe.dc.Oa(),d,f=>{f||(a.C.delete(d),uc(olympe.dc.Oa(),d,e))},e)}function vc(a,b,c,d){olympe.D.gs([b.$r(),b.R(),b.Rl(),b.fn()],(e,f,g,h)=>{a.C.has(f)?c(a.C.get(f)):(e=new olympe.dc.ga(olympe.dc.ga.ka.xh,{file:f,url:e.valueOf()?null:g,mimeType:h.valueOf(),Ye:a.G?k=>{rc(a,f,k);c(k)}:c,se:d},[olympe.dc.Oa().source(f)||olympe.dc.Ga.Pc]),a.F.send(e))})}
388
+ olympe.dc.it=class{constructor(a,b,c,d,e){this.N=a;this.F=c;this.G=e;this.C=new Map}};olympe.dc.sa=class{constructor(a){this.N=a}};function wc(a,b){a.F=b;return a}function M(a,b){a.Vh.unshift(b);return a}olympe.dc.ga=class{constructor(a,b,c){this.type=a;this.content=b;this.C=c;this.Vh=[];this.F=olympe.D.Ja()}validate(a=null){this.Vh.forEach(b=>{b(a||null)})}toString(){const a=olympe.W.Sr(olympe.dc.ga.ka,this.type);return a?a:'UNKNOWN_MESSAGE'}};
389
+ olympe.dc.ga.ka={uc:1,lg:2,Sg:10,bA:11,Ru:20,jB:21,kB:22,Tu:23,Ai:24,zi:25,cA:26,Zo:28,om:30,qm:31,Au:32,eh:40,Bk:41,wh:45,Ij:46,Sj:47,Qh:50,xh:51,wi:52,hv:60,Gu:61,kt:62,lt:63,Gs:64,sl:65,aA:90,yl:91,Hl:92,$o:93,Fp:94,hk:95,Su:96,QUERY_RESULT:97,pm:98};olympe.dc.og=class{process(){}};olympe.dc.mm=class{constructor(...a){this.Wb=a}process(a,b,c){const d=this.Wb.length,e=(f,g,h)=>{g||f>=d?c(g,h):this.Wb[f].process(a,h,e.bind(null,f+1))};e(0,null,b)}};olympe.dc.mm.la=[olympe.dc.og];olympe.dc.Jc=class{constructor(a){this.tag='string'===typeof a?a:a.R()}R(){return this.tag}toJSON(){return'{ "type": "reference", "tag": '+JSON.stringify(this.tag)+' }'}qb(a){return a instanceof olympe.dc.Jc&&this.tag===a.tag}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):b=a;return new olympe.dc.Jc(b.tag)}};olympe.dc.Jc.la=[olympe.dc.ze];olympe.dc.Jc.prototype.toJSON.K=olympe.D.J.C;olympe.dc.Jc.prototype.qb.K=olympe.D.J.C;olympe.dc.pg=class{send(){}C(){}oa(){}};const xc=olympe.dc.Aa.ORIGIN,yc=olympe.dc.Aa.DESTINATION,zc=new Map,Ac=new Map,Bc=new Map,Cc=new Map;function Dc(a,b){var c=olympe.dm.File;let d=c;'function'===typeof c&&(d=b.entry);c=[...(d.Hn||[])];return olympe.dc.ya.C(a,b,...c)}function Ec(a,b){Cc.set(a,b);return a}function Fc(a){return(a=zc.get(a))&&a.C||olympe.dc.CloudObject}function Gc(a,b,c){const d=a+'@'+(b===yc?xc:yc);if(Ac.has(d))throw Error(`Try to register the same relation (${b+a}) multiple times.`);Ac.set(d,c)}
390
390
  function Hc(a){a=a.R()+'@'+a.Pa();return Ac.get(a)||olympe.dc.CloudObject}function N(a,b){b.NAME=a;Bc.set(a,b)}function O(a){return a.NAME||null}
391
391
  olympe.dc.ya=class{constructor(){}static C(a,b,...c){if(zc.has(a))throw Error(`Tag: ${a} - overwriting already defined sync ${zc.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.T.zb(g):g}}b=new olympe.dc.ta.Entry(a,b,d);zc.set(a,b);return b.C.entry=b}static Tb(a){return(a=a.entry)&&a.R()||null}};olympe.dc.ta={};function P(a,b){b=b.Gc();Gc(b.R(),b.Pa(),a.C);return b}function Ic(a){a.F=!0;return a}
392
392
  olympe.dc.ta.Entry=class{constructor(a,b,c){this.tag=a;this.C=b;this.Hn=c||null;this.F=!1}R(){return this.tag}instantiate(a,b){const c=this.C;if(this.lj()&&b.getParameter(olympe.dc.Config.Go)){var d=olympe.dc.Oa();d=`Trying to instantiate an abstract class ${d.name(this)} (${this.R()}).`+` This may happen when the implementation of another class extending ${d.name(this)} has not been registered`;olympe.ra.Xa('dc').error(d)}return this.Hn?(a=[void 0,a].concat(ma(b,this.Hn)),new c(...a)):new c(void 0,
393
393
  a)}va(a){return new olympe.dc.ta.Property(a)}Ha(a,b=olympe.dc.Aa.DESTINATION){Gc(a,b,this.C);return new olympe.dc.X.Sb(a,b)}lj(){return this.F}};z('olympe.dc.registry.Entry',olympe.dc.ta.Entry);olympe.dc.ta.Entry.prototype.addRelation=olympe.dc.ta.Entry.prototype.Ha;olympe.dc.ta.Entry.prototype.addProperty=olympe.dc.ta.Entry.prototype.va;olympe.dc.ta.Entry.la=[olympe.dc.ze];olympe.dc.ta.Property=class{constructor(a){this.tag=a}R(){return this.tag}};olympe.dc.ta.Property.prototype.getTag=olympe.dc.ta.Property.prototype.R;olympe.dc.ta.Property.la=[olympe.dc.ze];olympe.dc.ta.Relation=class{constructor(a,b=olympe.dc.Aa.DESTINATION,c=olympe.dc.CloudObject,d=olympe.dc.CloudObject){this.tag=olympe.dc.wa(a);this.direction=b;this.origin=c;this.destination=d}R(){return this.tag}Pa(){return this.direction}type(){return this.destination}Gc(){return new olympe.dc.ta.Relation(this.tag,this.direction===olympe.dc.Aa.DESTINATION?olympe.dc.Aa.ORIGIN:olympe.dc.Aa.DESTINATION,this.destination,this.origin)}qb(a){return a instanceof olympe.dc.ta.Relation?a.R()===this.R()&&
394
394
  a.Pa()===this.Pa():!1}toString(){return this.direction+this.tag}};olympe.dc.ta.Relation.prototype.getInverse=olympe.dc.ta.Relation.prototype.Gc;olympe.dc.ta.Relation.prototype.getDirection=olympe.dc.ta.Relation.prototype.Pa;olympe.dc.ta.Relation.prototype.getTag=olympe.dc.ta.Relation.prototype.R;olympe.dc.ta.Relation.la=[olympe.dc.ze];olympe.dc.db={};function Jc(a,b,c,d,e,f=olympe.dc.Ga.rb){const g=c.Z();Kc(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);Lc(h,Mc(h,k.C,h.C.length),k.source);h.F.delete(g)}}}}function Nc(a,b){a.Ka.Sa(b)}function Oc(a,b,c){b&&a.Ka.wc(b);c&&a.Ka.Lc(c)}
395
- olympe.dc.db.Vs=class{constructor(a,b,c,d,e){this.N=a;this.Ka=b;this.C=new olympe.dc.db.Ks(a,b,d);this.view=new olympe.dc.ib(a,b);this.Kx=new olympe.dc.db.ku(this.N,this.view,b,e)}Xa(){return this.N}persist(a){this.Ka.Da();this.Ka.wb(a,olympe.dc.db.Instance.C.nq);this.Ka.oa()}$e(a,b){this.C.$e(a,b)}};const Pc=olympe.dc.$b.VERSION,Qc=olympe.dc.$b.Jd,Rc=olympe.dc.kc.Xc,Sc=olympe.dc.kc.xi;
396
- olympe.dc.db.Database=class a extends Map{constructor(b,c){super();this.id=olympe.W.fc();this.N=b;this.Lb=olympe.D.Ja();this.Ge=c.get('defaultSource')||olympe.dc.Ga.rb;this.U=olympe.dc.db.Database.F.IDLE;this.ka=new Map;this.Ib=[];this.G=[];this.ab=new Map;b=c.get('garbageCollector')||olympe.dc.db.Bi.C.Bl;new olympe.dc.db.Bi(this,b,this.Lb);c.get('debug')&&this.Rf()}Z(){return this.id}getState(){return this.U}Xa(){return this.N}create(b,c){const d=this.L(b,!0);d.ac(c&&parseInt(c.get(Pc),10)||1);d.ki(c&&
397
- c.get(Qc)||this.Ge);c&&(c.delete(Pc),c.delete(Qc),this.yd(d,c));this.C(a.C.wp,b)}update(b,c,d=!1){if(void 0!==c&&null!==c){b=this.L(b,!0);var e=c&&parseInt(c.get(Pc),10);0>e||!d&&b.version()>=e||(c.delete(Pc),b.ac(isNaN(e)?b.version()+1:e),this.yd(b,c))}}Mc(b){const c=this.get(b);void 0!==c&&(this.Ya(c,!1),this.C(a.C.xp,b))}link(b,c,d){c=this.L(c,!0);d=this.L(d,!0);switch(b){case Rc:c.Df(d);break;case Sc:c.Ge(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!==
398
- d)switch(b){case Rc:c.al(d);break;case Sc:c.gi(d);break;default:c.unlink(b,d)}}wc(b){for(const c of b)this.L(c).aa()}Lc(b){for(const c of b)(b=this.get(c))&&b.ka()}wb(b,c){b.forEach(d=>{this.L(d).Xe(c)})}ac(b){const c=this.get(b);void 0!==c&&(c.clear(),super.delete(b),this.C(a.C.Fo,b))}L(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.C.Eo,b),c&&this.C(a.C.Dk,b));return d}Y(b,c,d=!1,e=null){return{[Symbol.iterator]:function*(f){const g=olympe.dm.Relation.C.Ck,
395
+ olympe.dc.db.Ws=class{constructor(a,b,c,d,e){this.N=a;this.Ka=b;this.C=new olympe.dc.db.Ls(a,b,d);this.view=new olympe.dc.ib(a,b);this.Lx=new olympe.dc.db.lu(this.N,this.view,b,e)}Xa(){return this.N}persist(a){this.Ka.Da();this.Ka.wb(a,olympe.dc.db.Instance.C.oq);this.Ka.oa()}$e(a,b){this.C.$e(a,b)}};const Pc=olympe.dc.$b.VERSION,Qc=olympe.dc.$b.Jd,Rc=olympe.dc.kc.Xc,Sc=olympe.dc.kc.xi;
396
+ olympe.dc.db.Database=class a extends Map{constructor(b,c){super();this.id=olympe.W.fc();this.N=b;this.Lb=olympe.D.Ja();this.Ge=c.get('defaultSource')||olympe.dc.Ga.rb;this.U=olympe.dc.db.Database.F.IDLE;this.ja=new Map;this.Ib=[];this.G=[];this.ab=new Map;b=c.get('garbageCollector')||olympe.dc.db.Bi.C.Bl;new olympe.dc.db.Bi(this,b,this.Lb);c.get('debug')&&this.Rf()}Z(){return this.id}getState(){return this.U}Xa(){return this.N}create(b,c){const d=this.L(b,!0);d.ac(c&&parseInt(c.get(Pc),10)||1);d.ki(c&&
397
+ c.get(Qc)||this.Ge);c&&(c.delete(Pc),c.delete(Qc),this.yd(d,c));this.C(a.C.xp,b)}update(b,c,d=!1){if(void 0!==c&&null!==c){b=this.L(b,!0);var e=c&&parseInt(c.get(Pc),10);0>e||!d&&b.version()>=e||(c.delete(Pc),b.ac(isNaN(e)?b.version()+1:e),this.yd(b,c))}}Mc(b){const c=this.get(b);void 0!==c&&(this.Ya(c,!1),this.C(a.C.yp,b))}link(b,c,d){c=this.L(c,!0);d=this.L(d,!0);switch(b){case Rc:c.Df(d);break;case Sc:c.Ge(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!==
398
+ d)switch(b){case Rc:c.al(d);break;case Sc:c.gi(d);break;default:c.unlink(b,d)}}wc(b){for(const c of b)this.L(c).aa()}Lc(b){for(const c of b)(b=this.get(c))&&b.ja()}wb(b,c){b.forEach(d=>{this.L(d).Xe(c)})}ac(b){const c=this.get(b);void 0!==c&&(c.clear(),super.delete(b),this.C(a.C.Fo,b))}L(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.C.Eo,b),c&&this.C(a.C.Dk,b));return d}Y(b,c,d=!1,e=null){return{[Symbol.iterator]:function*(f){const g=olympe.dm.Relation.C.Ck,
399
399
  h=olympe.dm.Relation.C.rk,k=olympe.dc.Aa.ORIGIN,l=olympe.dc.Aa.DESTINATION,n=a.cc.Kh+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)}}ad(b){this.G[0].Re(olympe.W.yg(),b)}aa(b){if(0===this.G.length)debugger;
400
- this.G[0].C.delete(b)}C(b,c,...d){this.ka.has(b)&&this.ka.get(b).forEach(e=>{e(c,...d)})}Ya(b,c){this.ab.set(b,c)}Df(b,c,d,e){0<this.G.length&&Tc(this.G[0],b).va(e?Uc+c:c,d)}Ue(b,c,d,e,f){if(0<this.G.length){var g=this.G[0];d===Vc?f?Tc(g,b).link(c,e):Tc(g,b).unlink(c,e):f?Tc(g,b).ab(c,e):Tc(g,b).wb(c,e)}}F(b,c){let d=this.ka.get(b);void 0===d&&(d=[],this.ka.set(b,d));d.push(c)}Sa(b){this.Ib.push(b)}be(b){return this.G.reduce((c,d)=>d.G.has(b)||c,!1)}Da(){this.U===a.F.IDLE&&(this.U=a.F.zs);this.G.unshift(new olympe.dc.db.$s(this,
400
+ this.G[0].C.delete(b)}C(b,c,...d){this.ja.has(b)&&this.ja.get(b).forEach(e=>{e(c,...d)})}Ya(b,c){this.ab.set(b,c)}Df(b,c,d,e){0<this.G.length&&Tc(this.G[0],b).va(e?Uc+c:c,d)}Ue(b,c,d,e,f){if(0<this.G.length){var g=this.G[0];d===Vc?f?Tc(g,b).link(c,e):Tc(g,b).unlink(c,e):f?Tc(g,b).ab(c,e):Tc(g,b).wb(c,e)}}F(b,c){let d=this.ja.get(b);void 0===d&&(d=[],this.ja.set(b,d));d.push(c)}Sa(b){this.Ib.push(b)}be(b){return this.G.reduce((c,d)=>d.G.has(b)||c,!1)}Da(){this.U===a.F.IDLE&&(this.U=a.F.As);this.G.unshift(new olympe.dc.db.at(this,
401
401
  this.Lb))}oa(){this.U=a.F.bg;this.Xe();Wc(this.G[0]);this.G.shift();0===this.G.length&&(this.U=a.F.IDLE,this.Ib.forEach(b=>{b()}))}yd(b,c){const d=a.cc.jc;for(const [e,f]of c)void 0!==f&&(e[0]===d?b.vn(e.substr(1),f):b.update(e,f))}Xe(){const b=a.cc.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+Rc)))for(const k of f.values())d(k,g);return g},e=this.G[0];for(const [f,g]of this.ab)d(f).filter(h=>h.yd(g)).forEach(h=>{h=h.tag();g?Tc(e,h).create():Tc(e,h).delete()});
402
- this.ab.clear()}Rf(){const b=a.cc.DESTINATION,c=a.C.Dl,d=a.C.qk,e=new Set,f=new Map;this.F(a.C.wp,g=>{e.add(g)});this.F(c,g=>{e.delete(g);f.delete(g)});this.F(d,(g,...h)=>{if(h[0]===Sc&&h[1]===b){const k=h[2];this.get(k).Eb()||(h=f.get(k)||new Set,0===h.size&&f.set(k,h),h.add(g))}});this.Sa(()=>{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&&
403
- 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.cc={Kh:'$',st:'~',jc:'?',ml:'=',eo:'@',ORIGIN:olympe.dc.Aa.ORIGIN,DESTINATION:olympe.dc.Aa.DESTINATION};olympe.dc.db.Database.C={Eo:0,Fo:1,gr:2,Dk:3,fo:4,ho:5,Dl:6,Hc:7,qk:8,rm:9,wp:10,xp:11,zq:12};olympe.dc.db.Database.F={IDLE:0,zs:1,bg:2};const Q=olympe.dc.db.Database.C,Xc=olympe.dc.db.Database.cc.Kh,Yc=olympe.dc.db.Database.cc.st,Zc=olympe.dc.db.Database.cc.jc,$c=olympe.dc.db.Database.cc.ml,ad=olympe.dc.db.Database.cc.eo,R=olympe.dc.Aa.ORIGIN,T=olympe.dc.Aa.DESTINATION,bd=olympe.dc.kc.Xc,cd=olympe.dc.kc.xi;
404
- olympe.dc.db.Instance=class a extends Map{constructor(b,c){super();this.C=b;this.Lc=olympe.dc.Ga.rb;this.e=!1;this.Lb=0;this.F=void 0;this.c=0;this.Da=a.C.nq;this.db=c}tag(){return this.C}Eb(){return this.e}Ib(){return this.db.be(this.C)}source(){return this.Lc}version(){return this.Lb}model(){const b=this.get(T+bd);return b&&b.values().next().value||null}Cf(){const b=this.get(T+cd);return b&&b.values().next().value||null}persisted(){return this.Da!==a.C.rr}toString(){var b=this.fb(olympe.dc.CloudObject.nameProp.R());
402
+ this.ab.clear()}Rf(){const b=a.cc.DESTINATION,c=a.C.Dl,d=a.C.qk,e=new Set,f=new Map;this.F(a.C.xp,g=>{e.add(g)});this.F(c,g=>{e.delete(g);f.delete(g)});this.F(d,(g,...h)=>{if(h[0]===Sc&&h[1]===b){const k=h[2];this.get(k).Eb()||(h=f.get(k)||new Set,0===h.size&&f.set(k,h),h.add(g))}});this.Sa(()=>{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&&
403
+ 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.cc={Kh:'$',tt:'~',jc:'?',ml:'=',eo:'@',ORIGIN:olympe.dc.Aa.ORIGIN,DESTINATION:olympe.dc.Aa.DESTINATION};olympe.dc.db.Database.C={Eo:0,Fo:1,hr:2,Dk:3,fo:4,ho:5,Dl:6,Hc:7,qk:8,rm:9,xp:10,yp:11,Aq:12};olympe.dc.db.Database.F={IDLE:0,As:1,bg:2};const Q=olympe.dc.db.Database.C,Xc=olympe.dc.db.Database.cc.Kh,Yc=olympe.dc.db.Database.cc.tt,Zc=olympe.dc.db.Database.cc.jc,$c=olympe.dc.db.Database.cc.ml,ad=olympe.dc.db.Database.cc.eo,R=olympe.dc.Aa.ORIGIN,T=olympe.dc.Aa.DESTINATION,bd=olympe.dc.kc.Xc,cd=olympe.dc.kc.xi;
404
+ olympe.dc.db.Instance=class a extends Map{constructor(b,c){super();this.C=b;this.Lc=olympe.dc.Ga.rb;this.e=!1;this.Lb=0;this.F=void 0;this.c=0;this.Da=a.C.oq;this.db=c}tag(){return this.C}Eb(){return this.e}Ib(){return this.db.be(this.C)}source(){return this.Lc}version(){return this.Lb}model(){const b=this.get(T+bd);return b&&b.values().next().value||null}Cf(){const b=this.get(T+cd);return b&&b.values().next().value||null}persisted(){return this.Da!==a.C.sr}toString(){var b=this.fb(olympe.dc.CloudObject.nameProp.R());
405
405
  b=`Instance: ${this.C}, Exist: ${this.e}, Name: ${b}`;var c=this.model();if(c){var d=c.fb(olympe.dc.CloudObject.nameProp.R())||'No model name';b+=`\nModel: ${c.C}, Exist: ${c.e}, Model name: ${d}`}else b+='\nModel: no model';(c=this.Cf())?(d=c.fb(olympe.dc.CloudObject.nameProp.R())||'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(Xc+b);return c||void 0!==d?d:this.get($c+b)}Sa(b,c=!1){const d=this.get(Zc+
406
406
  b);return c||void 0!==d?d:this.get(Yc+b)}update(b,c){const d=Xc+b;var e=this.get(d),f=e=void 0===e?null:e;(null!==f&&'function'===typeof f.qb?f.qb(c):f===c)||(e instanceof olympe.dc.Jc&&(this.db.get(e.R()).ad(),this.db.Mc(e.R())),c instanceof olympe.dc.Jc&&(e=this.db.L(c.R(),!0),e.F&&e.F.tag!==this.C&&this.db.Xa().fatal('Instance',c.R(),'referenced multiple times!\nThis instance is currently property of',e.F.tag,'(for the property '+e.F.kb+')','and is assigned as a property of',this.C,'(for the property '+
407
407
  b+')'),e.sh(this.C,b)),e=$c+b,null===c?(this.delete(d),c=(c=this.model())&&c.Sa(b),void 0!==c?(this.set(e,c),this.L(b,c,!0)):this.L(b,null,!1)):(this.set(d,c),this.delete(e),this.L(b,c,!1)))}vn(b,c){const d=Zc+b;var e=this.get(d);(void 0===e?null:e)!==c&&(e=Yc+b,null===c?(this.delete(d),c=(c=this.Cf())&&c.Sa(b),c=void 0===c?null:c,null!==c&&this.set(e,c),this.Y((new Map).set(b,c))):(void 0!==this.get(e)&&this.delete(e),this.set(d,c),this.Y((new Map).set(b,c))))}link(b,c){var d=R+b;const e=this.wb(T+
408
408
  b);d=c.wb(d);e.has(c.C)||(e.set(c.C,c),d.set(this.C,this),this.db.C(Q.qk,this.C,b,T,c.C),this.db.C(Q.qk,c.C,b,R,this.C),this.e&&c.e&&(this.G(b,T,c,!0),c.G(b,R,this,!0)))}unlink(b,c){const d=R+b;void 0!==this.ab(T+b,c.C)&&(c.ab(d,this.C),this.db.C(Q.rm,this.C,b,T,c.C),this.db.C(Q.rm,c.C,b,R,this.C),this.e&&c.e&&(this.G(b,T,c,!1),c.G(b,R,this,!1)))}Df(b){const c=this.model();if(null!==c){if(c===b)return;this.unlink(bd,c)}this.link(bd,b);b.forEach((d,e)=>{if(e[0]===Zc||e[0]===Yc)e=e.substring(1),this.Ya(e,
409
409
  d)});(b.e||b===this)&&this.db.Ya(this,!0)}al(b){this.unlink(bd,b);this.forEach((c,d)=>{c=d.substring(1);this.Ya(c,null)});this.db.Ya(this,!1)}Ge(b){const c=this.Cf();if(null!==c){if(c===b)return;this.unlink(cd,c)}this.link(cd,b);const d=new Map;b.forEach((e,f)=>{if(f[0]===Zc||f[0]===Yc)f=f.substring(1),this.has(Zc+f)||(this.set(Yc+f,e),d.set(f,e))});this.Y(d)}gi(b){this.unlink(cd,b);const c=new Map;this.forEach((d,e)=>{e[0]===Yc&&(this.delete(e),d=e.substring(1),c.set(d,null))});this.Y(c)}wc(b,c,
410
- d){const e=(...f)=>{var g=f.length;const h=f[g-2];(g=this.db.get(f[g-1]))&&(h?g.aa():g.ka());d(...f)};this.Re(b,c,e);return e}Re(b,c,d){const e=this.wb(ad+b);e.has(c)||(e.set(c,d),this.aa(),this.db.C(Q.fo,this.C,b,c))}U(b,c){const d=this.ab(ad+b,c);void 0!==d&&(this.ka(),this.db.C(Q.ho,this.C,b,c));return d}ki(b){this.Lc=b}ac(b){this.Lb=b}Xe(b){this.Da=b;this.oa()||this.db.C(Q.Dk,this.C)}yd(b){const c=this.e!==b;c&&(b?(this.e=b,this.Rf()):(this.Ue(),this.e=b),this.be(b));return c}aa(){this.c++;1===
411
- this.c&&this.db.C(Q.gr,this.C)}ka(){0<this.c?--this.c:this.db.C(Q.zq,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.Dk,this.C)}oa(){return 0<this.c||this.Da===olympe.dc.db.Instance.C.oq}clear(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===T){const e=c.substring(1),
412
- f=d===R?T:R;b.forEach(g=>{const h=g.get(f+e);h.delete(this.C);0===h.size&&g.delete(f+e)})}d===Xc&&b instanceof olympe.dc.Jc&&this.db.get(b.R()).ad()});void 0!==this.F&&this.db.get(this.F.tag).delete(Xc+this.F.kb)}sh(b,c){void 0===this.F&&this.aa();this.F={tag:b,kb:c}}ad(){void 0!==this.F&&(this.ka(),this.F=void 0)}Rf(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===T){const e=c.substring(1),f=d===R?T:R;b.forEach(g=>{g.e&&(this.G(e,d,g,!0),g.G(e,f,this,!0))})}else if(d===Xc||d===$c)c=c.substring(1),
410
+ d){const e=(...f)=>{var g=f.length;const h=f[g-2];(g=this.db.get(f[g-1]))&&(h?g.aa():g.ja());d(...f)};this.Re(b,c,e);return e}Re(b,c,d){const e=this.wb(ad+b);e.has(c)||(e.set(c,d),this.aa(),this.db.C(Q.fo,this.C,b,c))}U(b,c){const d=this.ab(ad+b,c);void 0!==d&&(this.ja(),this.db.C(Q.ho,this.C,b,c));return d}ki(b){this.Lc=b}ac(b){this.Lb=b}Xe(b){this.Da=b;this.oa()||this.db.C(Q.Dk,this.C)}yd(b){const c=this.e!==b;c&&(b?(this.e=b,this.Rf()):(this.Ue(),this.e=b),this.be(b));return c}aa(){this.c++;1===
411
+ this.c&&this.db.C(Q.hr,this.C)}ja(){0<this.c?--this.c:this.db.C(Q.Aq,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.Dk,this.C)}oa(){return 0<this.c||this.Da===olympe.dc.db.Instance.C.pq}clear(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===T){const e=c.substring(1),
412
+ f=d===R?T:R;b.forEach(g=>{const h=g.get(f+e);h.delete(this.C);0===h.size&&g.delete(f+e)})}d===Xc&&b instanceof olympe.dc.Jc&&this.db.get(b.R()).ad()});void 0!==this.F&&this.db.get(this.F.tag).delete(Xc+this.F.kb)}sh(b,c){void 0===this.F&&this.aa();this.F={tag:b,kb:c}}ad(){void 0!==this.F&&(this.ja(),this.F=void 0)}Rf(){this.forEach((b,c)=>{const d=c[0];if(d===R||d===T){const e=c.substring(1),f=d===R?T:R;b.forEach(g=>{g.e&&(this.G(e,d,g,!0),g.G(e,f,this,!0))})}else if(d===Xc||d===$c)c=c.substring(1),
413
413
  this.L(c,b,d===$c)})}Ue(){this.forEach((b,c)=>{const d=c[0];if(d!==ad){var e=c.substring(1);d===R?b.forEach(f=>{f.unlink(e,this)}):d===T?b.forEach(f=>{this.unlink(e,f)}):d===Xc&&this.update(e,null);this.delete(c)}});this.Lb=0;if(void 0!==this.F){const b=this.db.get(this.F.tag),c=b.get(Xc+this.F.kb);c&&c.R&&c.R()===this.C&&b.update(this.F.kb,null)}}be(b){this.db.C(b?Q.Dl:Q.Hc,this.C)}L(b,c,d){this.e&&this.db.Df(this.C,b,c,d)}G(b,c,d,e){this.db.Ue(this.C,b,c,d.C,e)}Y(b,c=[]){var d=this.get(R+bd);void 0!==
414
414
  d&&d.forEach(e=>{b.forEach((f,g)=>e.Ya(g,f))});d=this.get(R+cd);void 0!==d&&d.forEach((e,f)=>{if(!c.includes(e.tag())){var g=new Map;b.forEach((h,k)=>{e.has(Zc+k)||(g.set(k,h),null!==h?e.set(Yc+k,h):e.delete(Yc+k))});e.Y(g,[...c,f])}})}Ya(b,c){if(!this.has(Xc+b)){const d=$c+b,e=this.get(d);c!==(void 0!==e?e:null)&&(null===c?this.delete(d):this.set(d,c),this.L(b,c,null!==c))}}wb(b){let c=this.get(b);void 0===c&&(c=new Map,this.set(b,c));return c}ab(b,c){const d=this.get(b);if(void 0!==d){const e=d.get(c);
415
- d.delete(c);0===d.size&&this.delete(b);return e}}};olympe.dc.db.Instance.C={rr:0,oq:1,nq:2};const Vc=olympe.dc.db.Database.cc.DESTINATION,Uc=olympe.dc.db.Database.cc.ml,dd=olympe.dc.db.Database.cc.Kh,ed=olympe.dc.db.Database.cc.eo,fd=olympe.dc.db.Database.cc.ORIGIN+Vc,gd=dd+dd;
415
+ d.delete(c);0===d.size&&this.delete(b);return e}}};olympe.dc.db.Instance.C={sr:0,pq:1,oq:2};const Vc=olympe.dc.db.Database.cc.DESTINATION,Uc=olympe.dc.db.Database.cc.ml,dd=olympe.dc.db.Database.cc.Kh,ed=olympe.dc.db.Database.cc.eo,fd=olympe.dc.db.Database.cc.ORIGIN+Vc,gd=dd+dd;
416
416
  function Wc(a){const b=a.Ka;a.F.forEach((c,d)=>{const e=b.get(d);if(c.re()||c.L()){var f=e.get(ed);f&&hd(a,f,c.re(),d);c.L()&&a.G.add(d)}for(const [l,n]of c.kd()){var g=l[0]===Uc;d=a;var h=e;f=g?l.substr(1):l;var k=n;const p=h.get(ed+dd+f);p&&hd(d,p,k,g);(h=h.get(ed+gd))&&hd(d,h,f,k,g)}for(const l of c.Sa())id(a,e,...l)});a.F.clear();jd(a)}function Tc(a,b){let c=a.F.get(b);void 0===c&&(c=new olympe.dc.db.jg(b),a.F.set(b,c));return c}
417
417
  function hd(a,b,...c){b.forEach((d,e)=>{a.Re(e,d.bind(null,...c))})}function id(a,b,c,d,e,f){const g=b.get(ed+d+c);g&&hd(a,g,f,e);(b=b.get(ed+fd))&&hd(a,b,c,d,f,e)}function jd(a){a.L.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}
418
- olympe.dc.db.$s=class{constructor(a,b){this.Ka=a;this.L=b;this.F=new Map;this.G=new Set;this.C=new Map;this.buffer=[]}Re(a,b){let c=this.C.get(a);void 0===c&&(c=[],this.C.set(a,c));this.buffer.push([a,c.length]);c.push(b)}};function kd(a){const b=olympe.dc.db.Database.C.Fo,c=olympe.dc.db.Database.C.Dl,d=olympe.dc.db.Database.C.Hc,e=olympe.dc.db.Database.C.qk,f=olympe.dc.db.Database.C.rm,g=olympe.dc.db.Database.C.fo,h=olympe.dc.db.Database.C.ho,k=()=>{};a.Ka.F(olympe.dc.db.Database.C.Eo,()=>{});a.Ka.F(b,()=>{});a.Ka.F(c,l=>{a.Ka.ad(()=>{ld(a.view,l,k,`monitorRelations${l}`)})});a.Ka.F(d,l=>{a.Ka.ad(()=>{md(a.view,l,`monitorRelations${l}`)})});a.Ka.F(e,()=>{});a.Ka.F(f,()=>{});a.Ka.F(g,()=>{});a.Ka.F(h,()=>{})}
419
- olympe.dc.db.ku=class{constructor(a,b,c,d){this.N=a;this.view=b;this.Ka=c;d&&kd(this)}debug(a){const b=olympe.dc.wa(a);if(this.Ka.has(b)){var c=this.Ka.get(a);a='\n[DEBUG - DATABASE]\n'+c.toString();if(!c.Eb()){const d=[];for(;null!==c&&!d.includes(c.tag());)d.push(c.tag()),c=c.model();c=this.Ka.get(d[d.length-1]);const e=olympe.dc.db.Database.cc.Kh+olympe.dc.CloudObject.nameProp.R();d.push('???');a+='\n\nThe instance <<'+b+'>> does not exists because the instance '+c.tag()+' (name: '+c.get(e)+') has no model.\nList: '+
420
- 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.Bi=class a{constructor(b,c,d){this.N=b.Xa();this.Ka=b;this.F=new Set;this.mode=c;this.L=d;this.C=!1;c!==a.C.Bl&&this.U()}run(){if(!this.C)switch(this.mode){case a.C.ss:this.C=!0;this.L.run(()=>{Hb(()=>{this.G();this.C=!1},0)});break;case a.C.Tq:this.C=!0,this.G(),this.C=!1}}G(){const b=this.Ka,c=olympe.dc.Ub.tf,d=this.F,e=h=>b.get(h);var f=h=>!(h.persisted()||h.oa());for(var g of d){const h=b.get(g);if(h&&!h.oa()){if(!h.persisted())continue;Array.from(b.Y(g,c,!1,f)).forEach(k=>{d.add(k)});
421
- b.ac(g)}d.delete(g)}for(const h of d)f=Array.from(b.Y(h,c,!0)).map(e),g=Array.from(b.Y(h,c)).map(e),f.some(k=>k.oa())?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.ac(k)});d.clear()}U(){this.Ka.Sa(this.run.bind(this));const b=olympe.dc.db.Database.C.gr,c=olympe.dc.db.Database.C.xp,d=olympe.dc.db.Database.C.zq,e=olympe.dc.db.Database.F.IDLE,f=g=>{this.F.add(g);this.Ka.getState()===e&&this.run()};this.Ka.F(olympe.dc.db.Database.C.Dk,
422
- f.bind(this));this.Ka.F(c,f.bind(this));this.Ka.F(b,g=>{this.F.delete(g)});this.Ka.F(d,(g,...h)=>{this.N.error(h[0])})}};olympe.dc.db.Bi.C={Bl:0,Tq:1,ss:2};const nd=olympe.dc.db.Database.cc.ORIGIN,od=olympe.dc.db.Database.cc.DESTINATION,pd=olympe.dc.db.Database.cc.Kh,qd=olympe.dc.db.Database.cc.ml,rd=nd+od,sd=pd+pd,td=olympe.dc.db.Database.F;function tc(a,b,c,d){const e=a.Ka.L(olympe.dc.wa(b));d=d||ud(a);e.Re('',d,c);e.Eb()&&a.G.run(()=>{c(!0,b)});return d}function uc(a,b,c,d=!1){const e=U(a,b);if(null!==e){const f=e.U('',c);void 0!==f&&(a.Ka.getState()===td.bg&&a.Ka.aa(c),!d&&e.Eb()&&a.G.run(()=>{f(!1,b)}))}}
418
+ olympe.dc.db.at=class{constructor(a,b){this.Ka=a;this.L=b;this.F=new Map;this.G=new Set;this.C=new Map;this.buffer=[]}Re(a,b){let c=this.C.get(a);void 0===c&&(c=[],this.C.set(a,c));this.buffer.push([a,c.length]);c.push(b)}};function kd(a){const b=olympe.dc.db.Database.C.Fo,c=olympe.dc.db.Database.C.Dl,d=olympe.dc.db.Database.C.Hc,e=olympe.dc.db.Database.C.qk,f=olympe.dc.db.Database.C.rm,g=olympe.dc.db.Database.C.fo,h=olympe.dc.db.Database.C.ho,k=()=>{};a.Ka.F(olympe.dc.db.Database.C.Eo,()=>{});a.Ka.F(b,()=>{});a.Ka.F(c,l=>{a.Ka.ad(()=>{ld(a.view,l,k,`monitorRelations${l}`)})});a.Ka.F(d,l=>{a.Ka.ad(()=>{md(a.view,l,`monitorRelations${l}`)})});a.Ka.F(e,()=>{});a.Ka.F(f,()=>{});a.Ka.F(g,()=>{});a.Ka.F(h,()=>{})}
419
+ olympe.dc.db.lu=class{constructor(a,b,c,d){this.N=a;this.view=b;this.Ka=c;d&&kd(this)}debug(a){const b=olympe.dc.wa(a);if(this.Ka.has(b)){var c=this.Ka.get(a);a='\n[DEBUG - DATABASE]\n'+c.toString();if(!c.Eb()){const d=[];for(;null!==c&&!d.includes(c.tag());)d.push(c.tag()),c=c.model();c=this.Ka.get(d[d.length-1]);const e=olympe.dc.db.Database.cc.Kh+olympe.dc.CloudObject.nameProp.R();d.push('???');a+='\n\nThe instance <<'+b+'>> does not exists because the instance '+c.tag()+' (name: '+c.get(e)+') has no model.\nList: '+
420
+ 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.Bi=class a{constructor(b,c,d){this.N=b.Xa();this.Ka=b;this.F=new Set;this.mode=c;this.L=d;this.C=!1;c!==a.C.Bl&&this.U()}run(){if(!this.C)switch(this.mode){case a.C.ts:this.C=!0;this.L.run(()=>{Hb(()=>{this.G();this.C=!1},0)});break;case a.C.Uq:this.C=!0,this.G(),this.C=!1}}G(){const b=this.Ka,c=olympe.dc.Ub.tf,d=this.F,e=h=>b.get(h);var f=h=>!(h.persisted()||h.oa());for(var g of d){const h=b.get(g);if(h&&!h.oa()){if(!h.persisted())continue;Array.from(b.Y(g,c,!1,f)).forEach(k=>{d.add(k)});
421
+ b.ac(g)}d.delete(g)}for(const h of d)f=Array.from(b.Y(h,c,!0)).map(e),g=Array.from(b.Y(h,c)).map(e),f.some(k=>k.oa())?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.ac(k)});d.clear()}U(){this.Ka.Sa(this.run.bind(this));const b=olympe.dc.db.Database.C.hr,c=olympe.dc.db.Database.C.yp,d=olympe.dc.db.Database.C.Aq,e=olympe.dc.db.Database.F.IDLE,f=g=>{this.F.add(g);this.Ka.getState()===e&&this.run()};this.Ka.F(olympe.dc.db.Database.C.Dk,
422
+ f.bind(this));this.Ka.F(c,f.bind(this));this.Ka.F(b,g=>{this.F.delete(g)});this.Ka.F(d,(g,...h)=>{this.N.error(h[0])})}};olympe.dc.db.Bi.C={Bl:0,Uq:1,ts:2};const nd=olympe.dc.db.Database.cc.ORIGIN,od=olympe.dc.db.Database.cc.DESTINATION,pd=olympe.dc.db.Database.cc.Kh,qd=olympe.dc.db.Database.cc.ml,rd=nd+od,sd=pd+pd,td=olympe.dc.db.Database.F;function tc(a,b,c,d){const e=a.Ka.L(olympe.dc.wa(b));d=d||ud(a);e.Re('',d,c);e.Eb()&&a.G.run(()=>{c(!0,b)});return d}function uc(a,b,c,d=!1){const e=U(a,b);if(null!==e){const f=e.U('',c);void 0!==f&&(a.Ka.getState()===td.bg&&a.Ka.aa(c),!d&&e.Eb()&&a.G.run(()=>{f(!1,b)}))}}
423
423
  function ld(a,b,c,d){const e=a.Ka.L(olympe.dc.wa(b));b=d||ud(a);const f=e.wc(rd,b,c);e.Eb()&&e.forEach((g,h)=>{g=h[0];g!==nd&&g!==od||vd(a,e,h,!0,f,!0)})}function md(a,b,c){const d=U(a,b);if(null!==d){const e=d.U(rd,c);void 0!==e&&(a.Ka.getState()!==td.bg||d.Ib()||a.Ka.aa(c),d.Eb()&&d.forEach((f,g)=>{f=g[0];(f===nd||f===od)&&e&&vd(a,d,g,!1,e,!0)}))}}function ud(a){++a.L;return String(a.L)}
424
424
  function wd(a,b,c,d,e){b=a.Ka.L(olympe.dc.wa(b));c=olympe.dc.wa(c);const f=pd+c;e=e||ud(a);b.Re(f,e,d);if(b.Eb()){let g=!1,h=b.get(f);void 0===h&&(g=!0,h=b.get(qd+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.Ka.get(olympe.dc.wa(b));return!a||c&&!a.Eb()?null:a}
425
425
  function xd(a,b,c){b=a.Ka.L(olympe.dc.wa(b));const d=ud(a);b.Re(sd,d,c);b.Eb()&&b.forEach((e,f)=>{const g=f[0];g!==pd&&g!==qd||a.G.run(()=>{c(f.substr(1),e,g===qd)})});return d}function yd(a,b,c){b=U(a,b);null!==b&&(b.U(sd,c),a.Ka.getState()===td.bg&&a.Ka.aa(c))}function vd(a,b,c,d,e,f){(b=b.get(c))&&b.forEach((g,h)=>{g.Eb()&&(f?a.G.run(()=>{e(c.substr(1),c[0],d,h)}):a.G.run(()=>{e(d,h)}))})}
@@ -429,9 +429,9 @@ function Dd(a,b,c,d){return(c=(a=U(a,b,!0))&&a.get(d+c))?Array.from(c.values()).
429
429
  olympe.dc.ib=class{constructor(a,b){this.N=a;this.G=new olympe.D.Xb('DB View context');this.Ka=b;this.L=0}Z(){return this.Ka.Z()}F(a,b,c){a=U(this,a);null!==a&&(b=olympe.dc.wa(b),a.U(pd+b,c),this.Ka.getState()===td.bg&&this.Ka.aa(c))}C(a,b,c,d=!1){a=U(this,a);if(null!==a){b=b.Pa()+b.R();const e=a.U(b,c);void 0!==e&&(this.Ka.getState()!==td.bg||a.Ib()&&!d||this.Ka.aa(c),!d&&a.Eb()&&vd(this,a,b,!1,e,!1))}}Eb(a){a=U(this,a);return!(!a||!a.Eb())}name(a){return(a=U(this,a))?a.fb(olympe.dc.CloudObject.nameProp.R()):
430
430
  ''}model(a){return(a=(a=U(this,a,!0))?a.model():null)?a.tag():null}Cf(a){return(a=(a=U(this,a,!0))&&a.Cf())?a.tag():null}mj(a){a=U(this,a,!0);return!(!a||!a.Cf())}qh(a,b){a=(a=U(this,a,!0))&&a.model();return!(!a||!this.Tf(a.tag(),b))}version(a){return(a=U(this,a,!0))&&a.version()}source(a){return(a=U(this,a,!0))&&a.source()}Wf(a){return(a=U(this,a,!1))?!!a.persisted():!0}fb(a,b,c){b=(a=U(this,a,!0))?a.fb(olympe.dc.wa(b),c):null;return void 0!==b?b:null}kd(a,b=!1){var c=U(this,a,!0);a=new Map;if(c)for(const [d,
431
431
  e]of c)c=d[0],(c===pd||!b&&c===qd)&&a.set(d.substring(1),e);return a}tb(a,b){return this.ij(a,[b])}$k(a,b,c){return this.tb(a,b).includes(olympe.dc.wa(c))}ij(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.Pa()+c.R()),void 0!==a)for(const e of a.values())e.Eb()&&b.push(e.tag());a=b}return a}hc(a,b){var c=U(this,a,!0);return c?(c=c.get(b.Pa()+b.R()))&&1<c.size?(this.N.warn(`Relation ${b.R()} to instance ${a} is not unique: found ${c.size} related items`),
432
- null):(a=c?c.values().next().value:null)&&a.Eb()?a.tag():null:null}Pf(a,b,c){a=olympe.dc.wa(a);const d=Bd(this,a,b);d.delete(a);return c?(c=olympe.dc.wa(c),d.has(c)?Array.from(Bd(this,c,b.Gc()).keys()).filter(e=>d.has(e)):[]):Array.from(d.keys())}Zm(a,b,c){if(!this.Eb(a))return null;b=Bd(this,a,b);const d=[olympe.dc.wa(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.ij(a,b).find(c)||null}aw(a,b,c){return this.ij(a,
432
+ null):(a=c?c.values().next().value:null)&&a.Eb()?a.tag():null:null}Pf(a,b,c){a=olympe.dc.wa(a);const d=Bd(this,a,b);d.delete(a);return c?(c=olympe.dc.wa(c),d.has(c)?Array.from(Bd(this,c,b.Gc()).keys()).filter(e=>d.has(e)):[]):Array.from(d.keys())}Zm(a,b,c){if(!this.Eb(a))return null;b=Bd(this,a,b);const d=[olympe.dc.wa(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.ij(a,b).find(c)||null}bw(a,b,c){return this.ij(a,
433
433
  b).filter(c)}Tk(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.Cf();if(e.includes(c))throw Error(`Cycle detected when following recursively extend relations from base model instance "${a}".`);if(c&&!c.Eb())throw a=`Try to get all extensions of the model ${olympe.dc.wa(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}).`);
434
- return e.map(f=>f.tag())}Tf(a,b){const c=olympe.dc.wa(b);return!!this.Zm(a,olympe.dc.CloudObject.extendRel,d=>d===c)}ee(a){return this.tb(a,olympe.dc.CloudObject.instancesRel)}};olympe.dc.ib.prototype.getInstances=olympe.dc.ib.prototype.ee;olympe.dc.ib.prototype.isExtending=olympe.dc.ib.prototype.Tf;olympe.dc.ib.prototype.getExtendedModels=olympe.dc.ib.prototype.Tk;olympe.dc.ib.prototype.findAllRelated=olympe.dc.ib.prototype.aw;olympe.dc.ib.prototype.findRelated=olympe.dc.ib.prototype.$m;
434
+ return e.map(f=>f.tag())}Tf(a,b){const c=olympe.dc.wa(b);return!!this.Zm(a,olympe.dc.CloudObject.extendRel,d=>d===c)}ee(a){return this.tb(a,olympe.dc.CloudObject.instancesRel)}};olympe.dc.ib.prototype.getInstances=olympe.dc.ib.prototype.ee;olympe.dc.ib.prototype.isExtending=olympe.dc.ib.prototype.Tf;olympe.dc.ib.prototype.getExtendedModels=olympe.dc.ib.prototype.Tk;olympe.dc.ib.prototype.findAllRelated=olympe.dc.ib.prototype.bw;olympe.dc.ib.prototype.findRelated=olympe.dc.ib.prototype.$m;
435
435
  olympe.dc.ib.prototype.findRecursive=olympe.dc.ib.prototype.Zm;olympe.dc.ib.prototype.getRecursiveRelated=olympe.dc.ib.prototype.Pf;olympe.dc.ib.prototype.getUniqueRelated=olympe.dc.ib.prototype.hc;olympe.dc.ib.prototype.getMultiRelated=olympe.dc.ib.prototype.ij;olympe.dc.ib.prototype.isRelated=olympe.dc.ib.prototype.$k;olympe.dc.ib.prototype.getRelated=olympe.dc.ib.prototype.tb;olympe.dc.ib.prototype.getProperties=olympe.dc.ib.prototype.kd;olympe.dc.ib.prototype.getProperty=olympe.dc.ib.prototype.fb;
436
436
  olympe.dc.ib.prototype.isPersisted=olympe.dc.ib.prototype.Wf;olympe.dc.ib.prototype.instanceOf=olympe.dc.ib.prototype.qh;olympe.dc.ib.prototype.isModel=olympe.dc.ib.prototype.mj;olympe.dc.ib.prototype.extension=olympe.dc.ib.prototype.Cf;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.Eb;function Ed(a,b){let c=a.C.get(b);void 0===c&&(c=new olympe.dc.db.jg(b),a.C.set(b,c));return c}function Fd(a,b,c=olympe.dc.Ub.NONE){b=Gd(a,b,c);for(const d of b)Hd(a,d,!1),a.C.delete(d)}
437
437
  function Gd(a,b,c,d=!0){const e=olympe.dm.Relation.C.rk,f=olympe.dm.Relation.C.Ck,g=olympe.dc.Aa.ORIGIN,h=olympe.dc.Oa();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.ld())r&&zd(h,p,c)&f?b.add(q):d||r||k.add(`${n}.${p}.${q}`);for(const [p,q,r]of l.Ya())r&&zd(h,p,c)&e?b.add(q):d||r||k.add(`${q}.${p}.${n}`)}for(const [p,q,r]of Ad(h,n))l=q===g?e:f,!k.has(q===g?`${r}.${p}.${n}`:`${n}.${p}.${r}`)&&zd(h,p,c)&l&&b.add(r)}return Array.from(b).filter(n=>
@@ -440,31 +440,31 @@ olympe.dc.db.Ac=class{constructor(a){this.id=a||olympe.W.dj();this.C=new Map}toJ
440
440
  olympe.dc.db.jg.C.$l,c=olympe.dc.db.jg.C.Hc,d=olympe.dc.db.jg.C.Ek;this.C.forEach((e,f)=>{const g=e.getState();switch(g.id){case b:a.F(f,e.Y()?e.kd():void 0);break;case d:e.Y()&&a.tc(f,e.kd(),g.aj);break;case c:a.Mc(f,g.aj)}for(const [h,k,l]of e.ld())l?a.Ra(h,f,k):a.ec(h,f,k)})}G(){let a=0;this.C.forEach(b=>{a+=b.Lb()});return a}F(a,b){a=Ed(this,a).create();b&&a.oa(b)}tc(a,b,c){b&&(a=Ed(this,a).oa(b),c&&a.Ib())}Mc(a,b=olympe.dc.Ub.NONE){const c=this.C.get(a);if(c&&c.re())Fd(this,a,b);else{Ed(this,
441
441
  a).delete(b);for(const d of Gd(this,a,b,!1))this.C.get(d).kd().clear(),Hd(this,d,!0)}}Ra(a,b,c){Ed(this,b).link(a,c);Ed(this,c).ab(a,b)}ec(a,b,c){Ed(this,b).unlink(a,c);Ed(this,c).wb(a,b)}ee(){return function*(a){for(const b of a.values())if(b.re()||b.L()||b.Y())yield b}(this.C)}Lf(a){return this.C.get(olympe.dc.wa(a))||null}ld(){return function*(a){for(var b=a.next();!b.done;){b=b.value;const c=b.tag();yield*b.ld((d,e,f)=>[d,c,e,f]);b=a.next()}}(this.C.values())}Pf(a,b,c=(d,e)=>[d,e]){return Id(this,
442
442
  a,b,c)}};olympe.dc.db.Ac.la=[olympe.dc.Writable,olympe.dc.lm];const Kd=new Map;
443
- olympe.dc.db.jg=class a{constructor(b){this.ka=b;this.G=a.F(a.C.Ek,!1);this.F=this.La=this.C=null}toJSON(){let b='{ "tag": '+JSON.stringify(this.ka)+', "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.La){b+=', "relations": {';for(const d of this.La.keys()){c=this.La.get(d);b+=JSON.stringify(d)+
443
+ olympe.dc.db.jg=class a{constructor(b){this.ja=b;this.G=a.F(a.C.Ek,!1);this.F=this.La=this.C=null}toJSON(){let b='{ "tag": '+JSON.stringify(this.ja)+', "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.La){b+=', "relations": {';for(const d of this.La.keys()){c=this.La.get(d);b+=JSON.stringify(d)+
444
444
  ': {';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.jg(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.Jc.nc(f):h=olympe.D.nc(f));null!==h&&void 0!==h&&b.C.set(e,h)}}if(c=
445
- c.relations){b.La=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.La.set(f,e)}}return b}static F(b,c){const d=String(b)+','+String(c);let e=Kd.get(d);void 0===e&&(e={id:b,aj:c},Kd.set(d,e));return e}tag(){return this.ka}getState(){return this.G}create(){this.G=a.F(a.C.$l);return this}delete(b=olympe.dc.Ub.NONE){this.G=a.F(a.C.Hc,b);this.C=null;return this}Ib(){this.G.id===a.C.Ek&&(this.G=a.F(a.C.Ek,!0))}va(b,c){if(this.G.type===a.C.Hc)return this;
445
+ c.relations){b.La=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.La.set(f,e)}}return b}static F(b,c){const d=String(b)+','+String(c);let e=Kd.get(d);void 0===e&&(e={id:b,aj:c},Kd.set(d,e));return e}tag(){return this.ja}getState(){return this.G}create(){this.G=a.F(a.C.$l);return this}delete(b=olympe.dc.Ub.NONE){this.G=a.F(a.C.Hc,b);this.C=null;return this}Ib(){this.G.id===a.C.Ek&&(this.G=a.F(a.C.Ek,!0))}va(b,c){if(this.G.type===a.C.Hc)return this;
446
446
  this.C||(this.C=new Map);this.C.set(b,c);return this}oa(b){this.C||(this.C=new Map);b.forEach((c,d)=>{this.C.set(d,c)});return this}Da(b){let c;null==(c=this.C)||c.delete(b);0===this.C.size&&(this.C=null)}link(b,c){null===this.La&&(this.La=new Map);this.Ha(this.La,b,c,!0);return this}unlink(b,c){null===this.La&&(this.La=new Map);this.Ha(this.La,b,c,!1);return this}ab(b,c){null===this.F&&(this.F=new Map);this.Ha(this.F,b,c,!0)}wb(b,c){null===this.F&&(this.F=new Map);this.Ha(this.F,b,c,!1)}ac(b,c,d){if(c=
447
447
  c===olympe.dc.Aa.ORIGIN?this.F:this.La)return(b=c.get(b))&&b.get(d)}U(b,c,d){const e=(c=c===olympe.dc.Aa.ORIGIN?this.F:this.La)&&c.get(b);e&&e.delete(d);e&&0===e.size&&c.delete(b)}re(){return this.G.id===a.C.$l}L(){return this.G.id===a.C.Hc}Lb(){let b=this.C?this.C.size:0;this.La&&this.La.forEach(c=>{b+=c.size});return b}Y(){return null!==this.C}kd(){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.R()))for(const [e,f]of d)yield c(e,
448
448
  f)}(b.Pa()===olympe.dc.Aa.ORIGIN?this.F:this.La)}hc(b){const c=b.Pa()===olympe.dc.Aa.ORIGIN?this.F:this.La;return(b=c&&c.get(b.R()))&&0!==b.size?Array.from(b.keys())[0]:null}nh(){return this.hc(olympe.dc.CloudObject.modelRel)}ld(b=(c,d,e)=>[c,d,e]){return this.aa(this.La,b)}Ya(b=(c,d,e)=>[c,d,e]){return this.aa(this.F,b)}Sa(b=(c,d,e,f)=>[c,d,e,f]){const c=olympe.dc.Aa.ORIGIN,d=olympe.dc.Aa.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.aa.bind(this),
449
- this.La,this.F)}Ha(b,c,d,e){if(this.G.id!==a.C.Hc||!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)}}*aa(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.jg.C={$l:0,Ek:1,Hc:2};function Kc(a,b,c,d,e,f=olympe.dc.Ga.rb){const g=olympe.dc.db.Instance.C.oq,h=olympe.dc.db.Instance.C.rr,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 Ld(c,Md(a,c),f);a.C.push(k);a.F.set(k,l);a.Ka.Da();a.Ka.wb(d,g);a.Ka.wb(e,h);Lc(a,c,f);const n=Array.from(c.ee()).filter(p=>p.re()).map(p=>p.tag());a.Ka.wc(n);a.Ka.oa();0<n.length&&b.zc(()=>{a.Ka.Da();a.Ka.Lc(n);a.Ka.oa()})}
449
+ this.La,this.F)}Ha(b,c,d,e){if(this.G.id!==a.C.Hc||!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)}}*aa(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.jg.C={$l:0,Ek:1,Hc:2};function Kc(a,b,c,d,e,f=olympe.dc.Ga.rb){const g=olympe.dc.db.Instance.C.pq,h=olympe.dc.db.Instance.C.sr,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 Ld(c,Md(a,c),f);a.C.push(k);a.F.set(k,l);a.Ka.Da();a.Ka.wb(d,g);a.Ka.wb(e,h);Lc(a,c,f);const n=Array.from(c.ee()).filter(p=>p.re()).map(p=>p.tag());a.Ka.wc(n);a.Ka.oa();0<n.length&&b.zc(()=>{a.Ka.Da();a.Ka.Lc(n);a.Ka.oa()})}
450
450
  function Lc(a,b,c){a.G.process(c,b,d=>{d||a.N.debug('CommitController: Rebase of patch',b.Z(),'done')})}function Mc(a,b,c){return a.C.slice(0,c).map(d=>a.F.get(d)).reduce((d,e)=>e?e.$e(d):d,b)}
451
451
  function Md(a,b){const c=a.Ka,d=olympe.dc.db.Database.cc.Kh,e=olympe.dc.db.Database.cc.jc,f=olympe.dc.db.Database.cc.ORIGIN,g=olympe.dc.db.Database.cc.DESTINATION,h=olympe.dc.$b.VERSION,k=olympe.dc.$b.Jd,l=new olympe.dc.db.Ac('rev-'+b.Z());a.N.debug('Generate the reverse graphLayer of',b.Z());b.C.forEach((n,p)=>{if(n.re()){l.Mc(p,olympe.dc.Ub.NONE);for(const [t,u]of n.ld())l.ec(t,p,u)}else{var q=c.get(p);if(void 0!==q)if(n.L()){n=n.getState().aj;for(const t of c.Y(p,n)){p=c.get(t);const u=(new Map).set(h,
452
452
  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((E,S)=>{l.Ra(B,S,t,0)}):y===g&&v.forEach((E,S)=>{l.Ra(B,t,S,0)})});l.F(t,u,0)}}else{const t=(new Map).set(h,q.version());for(const u of n.kd().keys()){var r=u[0]===e;const v=r?u.substr(1):u;r=r?q.Sa(v,!0):q.fb(v,!0);t.set(u,void 0===r?null:r)}1<t.size&&l.tc(p,t,!0,0);for(const [u,v,w]of n.ld())w?l.ec(u,p,v):l.Ra(u,p,v)}}});return l}
453
- olympe.dc.db.Ks=class{constructor(a,b,c){this.N=a;this.Ka=b;this.G=c;this.C=[];this.F=new Map}$e(a,b){Lc(this,Mc(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);Mc(this,c.F,b);this.F.delete(a)}}};function Nd(a,b,c,d){const e=olympe.dc.Aa.DESTINATION;c=c.tag();const f=a.C.Lf(c);b.kd().forEach((g,h)=>{f.va(h,g);b.Da(h)});for(const [g,h,k,l]of b.Sa()){if(!l)continue;const n=h===e?c:k,p=h===e?k:c;a.C.Ra(g,n,p);Jd(d,g,n,p)}}
453
+ olympe.dc.db.Ls=class{constructor(a,b,c){this.N=a;this.Ka=b;this.G=c;this.C=[];this.F=new Map}$e(a,b){Lc(this,Mc(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);Mc(this,c.F,b);this.F.delete(a)}}};function Nd(a,b,c,d){const e=olympe.dc.Aa.DESTINATION;c=c.tag();const f=a.C.Lf(c);b.kd().forEach((g,h)=>{f.va(h,g);b.Da(h)});for(const [g,h,k,l]of b.Sa()){if(!l)continue;const n=h===e?c:k,p=h===e?k:c;a.C.Ra(g,n,p);Jd(d,g,n,p)}}
454
454
  function Od(a,b,c,d){const e=olympe.dc.Aa.DESTINATION,f=c.tag(),g=a.C.Lf(f);b.kd().forEach((h,k)=>{void 0!==c.fb(k)&&(g.va(k,h),b.Da(k))});for(const [h,k,l]of b.ld()){const n=c.ac(h,e,k);void 0!==n&&(Jd(d,h,f,k),n===l&&Jd(a.C,h,f,k))}}
455
- class Ld{constructor(a,b,c){this.F=a;this.C=b;this.source=c;this.db=olympe.dc.Oa()}Z(){return this.F.Z()}$e(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.L()?c.re()||Fd(this.C,b,f.getState().aj):c.L()?(Nd(this,f,c,a),Fd(a,b,c.getState().aj)):Od(this,f,c,a))}return a}};olympe.dc.db.P={Ea:'dc.db.Logger',xa:'dc.db.DatabaseManager',Mj:'dc.db.Database',ib:'dc.db.Driver',lt:'dc.db.Graph',so:'dc.db.DataProcessor',wo:'dc.db.DebugProcessor',DA:'dc.db.PermissionProcessor',Ji:'dc.db.GraphMonitor'};olympe.dc.db.Config={Uo:'db.garbageCollector',Ji:'db.monitor',vo:'db.debug'};
456
- olympe.T.config(function(a){D(a,olympe.dc.db.Config.Uo,olympe.dc.db.Bi.C.Tq);D(a,olympe.dc.db.Config.Ji,!1);D(a,olympe.dc.db.Config.vo,!1);C(a,olympe.dc.db.P.Ea,[olympe.ra.P.xa],b=>b.Rc('dc.db'));C(a,olympe.dc.db.P.Mj,[olympe.dc.db.P.Ea,new olympe.T.fa(olympe.dc.Config.xo),new olympe.T.fa(olympe.dc.db.Config.Uo),new olympe.T.fa(olympe.dc.Config.$g),new olympe.T.fa(olympe.dc.db.Config.vo)],(b,c,d,e,f)=>{d=e?olympe.dc.db.Bi.C.Bl:d;c=(new Map).set('defaultSource',c).set('garbageCollector',d).set('debug',
457
- f);return new olympe.dc.db.Database(b,c)});C(a,olympe.dc.db.P.ib,[olympe.dc.db.P.xa],b=>b.view);C(a,olympe.dc.db.P.Ji,[olympe.dc.db.P.xa],b=>b.Kx);A(a,olympe.dc.db.P.wo,olympe.dc.db.Wb.Co,olympe.dc.P.Ea);C(a,olympe.dc.db.P.so,[olympe.dc.db.P.Ea,olympe.dc.db.P.Mj,olympe.T.P.cg,new olympe.T.fa(olympe.dc.Config.dg)],(b,c,d,e)=>{b=new olympe.dc.db.Wb.ur(b,c);e&&(b=new olympe.dc.mm(la(d,olympe.dc.db.P.wo),b));return b});A(a,olympe.dc.db.P.xa,olympe.dc.db.Vs,olympe.dc.db.P.Ea,olympe.dc.db.P.Mj,olympe.dc.P.me,
458
- olympe.dc.db.P.so,new olympe.T.fa(olympe.dc.db.Config.Ji))},'olympe.dc.db');olympe.T.run([olympe.dc.db.P.Mj,olympe.dc.db.P.Ji],(a,b)=>{olympe.gj().db=a;olympe.gj().dbMonitor=b},'DC.DB debug service injection');olympe.dc.db.Wb={};olympe.dc.db.Wb.ur=class{constructor(a,b){this.N=a;this.Ka=b;this.buffer=[]}process(a,b,c){this.Ka.Da();b.Qc(this);this.Ka.oa();c(null,b)}F(a,b){this.Ka.create(a,b)}tc(a,b,c){this.Ka.update(a,b,c)}Mc(a,b=olympe.dc.Ub.NONE){for(const c of this.Ka.Y(a,b))this.Ka.Mc(c)}Ra(a,b,c){this.Ka.link(a,b,c)}ec(a,b,c){this.Ka.unlink(a,b,c)}};olympe.dc.db.Wb.ur.la=[olympe.dc.og,olympe.dc.Writable];function Pd(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.Jc||f instanceof olympe.dc.CloudObject?d+='new olympe.dc.Reference("'+f.R()+'")':f instanceof olympe.D.Color?d+='new olympe.df.Color("'+f.Qf()+','+f.Kf()+','+f.Ff()+','+f.Ef()+'")':f.constructor&&Object.prototype.hasOwnProperty.call(f.constructor.prototype,'toString')?d+=JSON.stringify(f.toString()):'object'===typeof f&&(d+=Pd(a,f,(c||0)+1)):d+=JSON.stringify(f);return'{'+
455
+ class Ld{constructor(a,b,c){this.F=a;this.C=b;this.source=c;this.db=olympe.dc.Oa()}Z(){return this.F.Z()}$e(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.L()?c.re()||Fd(this.C,b,f.getState().aj):c.L()?(Nd(this,f,c,a),Fd(a,b,c.getState().aj)):Od(this,f,c,a))}return a}};olympe.dc.db.P={Ea:'dc.db.Logger',xa:'dc.db.DatabaseManager',Mj:'dc.db.Database',ib:'dc.db.Driver',mt:'dc.db.Graph',so:'dc.db.DataProcessor',wo:'dc.db.DebugProcessor',EA:'dc.db.PermissionProcessor',Ji:'dc.db.GraphMonitor'};olympe.dc.db.Config={Uo:'db.garbageCollector',Ji:'db.monitor',vo:'db.debug'};
456
+ olympe.T.config(function(a){D(a,olympe.dc.db.Config.Uo,olympe.dc.db.Bi.C.Uq);D(a,olympe.dc.db.Config.Ji,!1);D(a,olympe.dc.db.Config.vo,!1);C(a,olympe.dc.db.P.Ea,[olympe.ra.P.xa],b=>b.Rc('dc.db'));C(a,olympe.dc.db.P.Mj,[olympe.dc.db.P.Ea,new olympe.T.fa(olympe.dc.Config.xo),new olympe.T.fa(olympe.dc.db.Config.Uo),new olympe.T.fa(olympe.dc.Config.$g),new olympe.T.fa(olympe.dc.db.Config.vo)],(b,c,d,e,f)=>{d=e?olympe.dc.db.Bi.C.Bl:d;c=(new Map).set('defaultSource',c).set('garbageCollector',d).set('debug',
457
+ f);return new olympe.dc.db.Database(b,c)});C(a,olympe.dc.db.P.ib,[olympe.dc.db.P.xa],b=>b.view);C(a,olympe.dc.db.P.Ji,[olympe.dc.db.P.xa],b=>b.Lx);A(a,olympe.dc.db.P.wo,olympe.dc.db.Wb.Co,olympe.dc.P.Ea);C(a,olympe.dc.db.P.so,[olympe.dc.db.P.Ea,olympe.dc.db.P.Mj,olympe.T.P.cg,new olympe.T.fa(olympe.dc.Config.dg)],(b,c,d,e)=>{b=new olympe.dc.db.Wb.vr(b,c);e&&(b=new olympe.dc.mm(la(d,olympe.dc.db.P.wo),b));return b});A(a,olympe.dc.db.P.xa,olympe.dc.db.Ws,olympe.dc.db.P.Ea,olympe.dc.db.P.Mj,olympe.dc.P.me,
458
+ olympe.dc.db.P.so,new olympe.T.fa(olympe.dc.db.Config.Ji))},'olympe.dc.db');olympe.T.run([olympe.dc.db.P.Mj,olympe.dc.db.P.Ji],(a,b)=>{olympe.gj().db=a;olympe.gj().dbMonitor=b},'DC.DB debug service injection');olympe.dc.db.Wb={};olympe.dc.db.Wb.vr=class{constructor(a,b){this.N=a;this.Ka=b;this.buffer=[]}process(a,b,c){this.Ka.Da();b.Qc(this);this.Ka.oa();c(null,b)}F(a,b){this.Ka.create(a,b)}tc(a,b,c){this.Ka.update(a,b,c)}Mc(a,b=olympe.dc.Ub.NONE){for(const c of this.Ka.Y(a,b))this.Ka.Mc(c)}Ra(a,b,c){this.Ka.link(a,b,c)}ec(a,b,c){this.Ka.unlink(a,b,c)}};olympe.dc.db.Wb.vr.la=[olympe.dc.og,olympe.dc.Writable];function Pd(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.Jc||f instanceof olympe.dc.CloudObject?d+='new olympe.dc.Reference("'+f.R()+'")':f instanceof olympe.D.Color?d+='new olympe.df.Color("'+f.Qf()+','+f.Kf()+','+f.Ff()+','+f.Ef()+'")':f.constructor&&Object.prototype.hasOwnProperty.call(f.constructor.prototype,'toString')?d+=JSON.stringify(f.toString()):'object'===typeof f&&(d+=Pd(a,f,(c||0)+1)):d+=JSON.stringify(f);return'{'+
459
459
  (d?d:'')+'}'}
460
460
  olympe.dc.db.Wb.Co=class{constructor(a){this.N=a;this.output=''}process(a,b,c){this.output='Patch #'+b.Z()+' (source: '+a+')';b.Qc(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+'", '+Pd(this,b)+')')}tc(a,b){this.log('updateInstance("'+a+'", '+Pd(this,b)+')')}Mc(a,b){var c=olympe.dc.Oa();const d=c.model(a);c=d?c.name(d)+' #'+d:'';this.log('deleteInstance("'+a+'", rule: '+b+')',c)}Ra(a,b,c){this.log('createRelation("'+
461
- a+'", "'+b+'", "'+c+'")',a===olympe.dc.kc.Xc?'Model':'')}ec(a,b,c){this.log('deleteRelation("'+a+'", "'+b+'", "'+c+'")',a===olympe.dc.kc.Xc?'Model':'')}};olympe.dc.db.Wb.Co.la=[olympe.dc.Writable,olympe.dc.og];olympe.dc.transaction={};olympe.dc.ri=class a{constructor(b,c){this.id=b||olympe.W.fc();this.F=new olympe.D.Xb('BurstTransaction#'+this.id,c);this.Lb=Qd(this);this.Y=!1;this.F.onDestroy(()=>this.U());this.Da=new Set;this.G=new Map;this.L=new Set;this.C=null;this.ab=olympe.T.getParameter(olympe.dc.transaction.Config.Yn)||30;this.oa=[]}static C(b,c){return`${b},${c}`}Ib(b){for(const c of this.oa)c(b);this.stop()}Ya(){null!==this.C&&(clearTimeout(this.C),this.C=null);const b=this.ka(this.L);0<b.size&&Rd(this,b,!1);this.L.clear()}ka(b){const c=
461
+ a+'", "'+b+'", "'+c+'")',a===olympe.dc.kc.Xc?'Model':'')}ec(a,b,c){this.log('deleteRelation("'+a+'", "'+b+'", "'+c+'")',a===olympe.dc.kc.Xc?'Model':'')}};olympe.dc.db.Wb.Co.la=[olympe.dc.Writable,olympe.dc.og];olympe.dc.transaction={};olympe.dc.ri=class a{constructor(b,c){this.id=b||olympe.W.fc();this.F=new olympe.D.Xb('BurstTransaction#'+this.id,c);this.Lb=Qd(this);this.Y=!1;this.F.onDestroy(()=>this.U());this.Da=new Set;this.G=new Map;this.L=new Set;this.C=null;this.ab=olympe.T.getParameter(olympe.dc.transaction.Config.Yn)||30;this.oa=[]}static C(b,c){return`${b},${c}`}Ib(b){for(const c of this.oa)c(b);this.stop()}Ya(){null!==this.C&&(clearTimeout(this.C),this.C=null);const b=this.ja(this.L);0<b.size&&Rd(this,b,!1);this.L.clear()}ja(b){const c=
462
462
  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}aa(b,c,d){this.Sa(b,c,d);this.Lb(b,c,d);null===this.C&&(this.C=setTimeout(this.Ya.bind(this),this.ab))}Sa(b,c,d){b=a.C(b,c);this.G.set(b,d);this.L.add(b)}wb(b,c){return this.G.get(a.C(b,c))}push(b,c){const d=olympe.dc.wa(b);b=c.subscribe(e=>{for(const [f,g]of e)e=olympe.dc.wa(f),this.wb(d,e)!==g&&this.aa(d,e,g.valueOf())});this.Da.add(b)}complete(){return new Promise((b,
463
463
  c)=>{this.U((d,e)=>{for(const f of this.Da)f.unsubscribe();d?b():c(e)})})}update(b,c,d){const e=olympe.dc.wa(b),f=olympe.dc.wa(c);void 0===e||void 0===f?olympe.dc.ei().Xa().error('Burst transaction: instance tag or property tag is undefined'):(this.F.run(()=>{olympe.D.An([d],g=>{this.Y=!0;g instanceof olympe.dc.Jc?olympe.dc.ei().Xa().error('Cannot send complex property values in burst transactions'):this.aa(e,f,g.valueOf())})}),this.F.zc(()=>{this.U()}))}stop(){this.F.destroy();this.oa.length=0}Z(){return this.id}rh(){return!1}U(b){if(this.Y){this.Y=
464
- !1;null!==this.C&&(clearTimeout(this.C),this.C=null);this.L.clear();const c=this.ka(new Set(this.G.keys()));Rd(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.mg=class{constructor(a){this.id=a||olympe.W.dj();this.ua=[];this.size=0}Z(){return this.id}G(){return this.size}concat(a){this.ua.push(...a.ua)}Qc(a){const b=olympe.dc.transaction.mg.C,c=this.ua.length;let d=0;for(;d<c;)switch(this.ua[d]){case b.ko:a.F(this.ua[d+1],this.ua[d+2],this.ua[d+3]);d+=4;break;case b.fr:a.tc(this.ua[d+1],this.ua[d+2],this.ua[d+3],this.ua[d+4]);d+=5;break;case b.yo:a.Mc(this.ua[d+1],this.ua[d+2],this.ua[d+3]);d+=4;break;case b.lo:a.Ra(this.ua[d+1],this.ua[d+
465
- 2],this.ua[d+3],this.ua[d+4]);d+=5;break;case b.zo:a.ec(this.ua[d+1],this.ua[d+2],this.ua[d+3],this.ua[d+4]);d+=5;break;default:throw Error('Invalid Patch operations "'+this.ua[d]+'"');}}F(a,b,c){this.ua.push(olympe.dc.transaction.mg.C.ko,a,b,c);this.size++}tc(a,b,c,d){this.ua.push(olympe.dc.transaction.mg.C.fr,a,b,c,d);this.size++}Mc(a,b=olympe.dc.Ub.NONE,c){this.ua.push(olympe.dc.transaction.mg.C.yo,a,b,c);this.size++}Ra(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)');
466
- this.ua.push(olympe.dc.transaction.mg.C.lo,a,b,c,d);this.size++}ec(a,b,c,d){this.ua.push(olympe.dc.transaction.mg.C.zo,a,b,c,d);this.size++}};olympe.dc.transaction.mg.C={ko:1,fr:2,yo:3,lo:4,zo:5};olympe.dc.transaction.mg.la=[olympe.dc.Writable,olympe.dc.lm];function Sd(a,b){return a.U.get(b)||a.db.source(b)||olympe.dc.Ga.jc}function Td(a,b){return a.L.has(b)?a.L.get(b):a.db.Wf(b)}function Ud(a,b,c,d){var e=d&&d.get(olympe.dc.$b.VERSION);a.versions.set(b,Number(e)||1);d&&a.U.set(b,d.get(olympe.dc.$b.Jd));e=Sd(a,b);a.L.set(b,c&&a.F);a.Dc(e,c,f=>{f.F(b,d,0)})}
467
- olympe.dc.transaction.xu=class{constructor(a,b){this.id=b||olympe.W.fc();this.db=a;this.C=new Map;this.G=new olympe.dc.db.Ac(b);this.versions=new Map;this.U=new Map;this.Y={};this.L=new Map;this.F=!0}Sf(){return 0===this.G.C.size}persist(a){this.F=a}tc(a,b,c=!1){var d=b&&b.get(olympe.dc.$b.VERSION);this.versions.set(a,Number(d)||1);d=Sd(this,a);if(!d)throw Error('Attempt to update an instance which has an unknown source.');this.Dc(d,Td(this,a),e=>{e.tc(a,b,c,0)})}Mc(a,b){const c=Sd(this,a),d=Td(this,
464
+ !1;null!==this.C&&(clearTimeout(this.C),this.C=null);this.L.clear();const c=this.ja(new Set(this.G.keys()));Rd(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.iq=class{C(){}toString(){}};olympe.dc.transaction.mg=class{constructor(a){this.id=a||olympe.W.dj();this.ua=[];this.size=0}Z(){return this.id}G(){return this.size}concat(a){this.ua.push(...a.ua)}Qc(a){const b=olympe.dc.transaction.mg.C,c=this.ua.length;let d=0;for(;d<c;)switch(this.ua[d]){case b.ko:a.F(this.ua[d+1],this.ua[d+2],this.ua[d+3]);d+=4;break;case b.gr:a.tc(this.ua[d+1],this.ua[d+2],this.ua[d+3],this.ua[d+4]);d+=5;break;case b.yo:a.Mc(this.ua[d+1],this.ua[d+2],this.ua[d+3]);d+=4;break;case b.lo:a.Ra(this.ua[d+1],this.ua[d+
465
+ 2],this.ua[d+3],this.ua[d+4]);d+=5;break;case b.zo:a.ec(this.ua[d+1],this.ua[d+2],this.ua[d+3],this.ua[d+4]);d+=5;break;default:throw Error('Invalid Patch operations "'+this.ua[d]+'"');}}F(a,b,c){this.ua.push(olympe.dc.transaction.mg.C.ko,a,b,c);this.size++}tc(a,b,c,d){this.ua.push(olympe.dc.transaction.mg.C.gr,a,b,c,d);this.size++}Mc(a,b=olympe.dc.Ub.NONE,c){this.ua.push(olympe.dc.transaction.mg.C.yo,a,b,c);this.size++}Ra(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)');
466
+ this.ua.push(olympe.dc.transaction.mg.C.lo,a,b,c,d);this.size++}ec(a,b,c,d){this.ua.push(olympe.dc.transaction.mg.C.zo,a,b,c,d);this.size++}};olympe.dc.transaction.mg.C={ko:1,gr:2,yo:3,lo:4,zo:5};olympe.dc.transaction.mg.la=[olympe.dc.Writable,olympe.dc.lm];function Sd(a,b){return a.U.get(b)||a.db.source(b)||olympe.dc.Ga.jc}function Td(a,b){return a.L.has(b)?a.L.get(b):a.db.Wf(b)}function Ud(a,b,c,d){var e=d&&d.get(olympe.dc.$b.VERSION);a.versions.set(b,Number(e)||1);d&&a.U.set(b,d.get(olympe.dc.$b.Jd));e=Sd(a,b);a.L.set(b,c&&a.F);a.Dc(e,c,f=>{f.F(b,d,0)})}
467
+ olympe.dc.transaction.yu=class{constructor(a,b){this.id=b||olympe.W.fc();this.db=a;this.C=new Map;this.G=new olympe.dc.db.Ac(b);this.versions=new Map;this.U=new Map;this.Y={};this.L=new Map;this.F=!0}Sf(){return 0===this.G.C.size}persist(a){this.F=a}tc(a,b,c=!1){var d=b&&b.get(olympe.dc.$b.VERSION);this.versions.set(a,Number(d)||1);d=Sd(this,a);if(!d)throw Error('Attempt to update an instance which has an unknown source.');this.Dc(d,Td(this,a),e=>{e.tc(a,b,c,0)})}Mc(a,b){const c=Sd(this,a),d=Td(this,
468
468
  a);this.Dc(c,d,e=>{e.Mc(a,b)})}Ra(a,b,c){const d=Sd(this,b),e=Sd(this,c);let f=Td(this,b)&&Td(this,c);f&&d!==e&&a!==olympe.dc.kc.Xc&&(olympe.ra.Xa('dc').warn(`Try to create a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),f=!1);this.Dc(d,f,g=>{g.Ra(a,b,c,0)})}ec(a,b,c){const d=Sd(this,b),e=Sd(this,c);let f=Td(this,b)&&Td(this,c);f&&d!==e&&a!==olympe.dc.kc.Xc&&(olympe.ra.Xa('dc').warn(`Try to delete a relation between 2 objects that have different locations: ${b}-[${a}]->${c}`),
469
469
  f=!1);this.Dc(d,f,g=>{g.ec(a,b,c,0)})}Dc(a,b,c){c(this.G);b&&this.F&&(b=this.C.get(a),b||(b=new olympe.dc.db.Ac(this.id),this.C.set(a,b)),c(b))}};function Vd(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.Jd)if(e===olympe.dc.Ga.rb)d[g]=olympe.dc.Oa().Z();else{if(e===olympe.dc.Ga.Pc)continue}else g.startsWith(olympe.dc.$b.VERSION)?(g=g.substr(1),e=null===e?1:e):g.startsWith(olympe.dc.Ug.jc)&&(g='fd'+g.substr(1));e=a.aa(e);c&&e instanceof Object&&8===e.c?a.Y.set(g,e):d[g]=e}return d}
470
470
  function Wd(a){if(0===a.Y.size)return null;const b=Object.create(null);a.Y.forEach((c,d)=>{b[d]=c});a.Y.clear();return b}
@@ -476,51 +476,52 @@ l:b,r:c,i:d})}};olympe.dc.transaction.vd.la=[olympe.dc.Writable];olympe.dc.trans
476
476
  }Ra(a,b,c){a=new olympe.dc.transaction.Ph.Relation(b,c,a);this.La.set(a.toString(),a)}ec(a,b,c){a=new olympe.dc.transaction.Ph.Relation(b,c,a);this.La.delete(a.F+'.'+a.G+'.'+a.C)}G(){return this.La.size+this.C.size}ee(){return this.C}Qc(a){const b=new Map;this.C.forEach((c,d)=>{const e=new Map;ae(c,(f,g)=>{if(g instanceof olympe.dc.Jc){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.tc(d,c)});this.La.forEach(c=>{a.Ra(c.C,c.F,c.G)})}};
477
477
  function ae(a,b){a.C.forEach((c,d)=>{b(d,b)})}olympe.dc.transaction.Ph.Instance=class{constructor(a){this.tag=a;this.C=new Map}R(){return this.tag}va(a,b){this.C.set(a,b);return this}deleteProperty(a){this.C.delete(a);return this}};olympe.dc.transaction.Ph.Relation=class{constructor(a,b,c){this.F=a;this.G=b;this.C=olympe.dc.wa(c)}toString(){return this.F+'.'+this.G+'.'+this.C}};olympe.dc.transaction.Ph.la=[olympe.dc.Writable,olympe.dc.lm];function be(a,b){b&&a.ua.push(b);return b}function ce(a){return(b,c)=>a.forEach(d=>d&&d(b,c))}
478
478
  olympe.dc.Transaction=class{constructor(a){this.id=a||olympe.W.fc();this.ua=[];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.ua;for(let c=0,d=b.length;c<d;c++)b[c].C(a)}create(a,b){return be(this,new olympe.dc.transaction.ua.Wd(a,b))}vj(a,b=!0){const c=olympe.dc.wa(a);var d=this.ua.find(g=>g instanceof olympe.dc.transaction.ua.Wd&&g.R()===c);if(d)return d.persist(b);d=olympe.dc.Oa();const e=d.model(a);if(null===e)throw Error('Try to persist a instance that does not exist: '+
479
- a);if(d.Wf(a))return null;const f=d.source(a)||olympe.dc.Ga.jc;a=this.create(e,a).persist(b).ki(f);for(const [g,h,k]of Ad(d,a))g!==olympe.dc.kc.Xc&&d.Wf(k)&&this.Ra(g,h===olympe.dc.Aa.DESTINATION?a:k,h===olympe.dc.Aa.DESTINATION?k:a);return a}delete(a,b=olympe.dc.Ub.Hc){be(this,new olympe.dc.transaction.ua.Pj(a,b))}update(a,b,c){return be(this,new olympe.dc.transaction.ua.Si(a,b,c))}Ra(a,b,c){be(this,new olympe.dc.transaction.ua.ro(a,b,c))}ec(a,b,c,d){be(this,new olympe.dc.transaction.ua.Xs(a,b,c,
480
- d))}Um(a,b,c,d){be(this,new olympe.dc.transaction.ua.Ws(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.Ug.jc+d.R(),e);this.Ra(olympe.dc.CloudObject.propertyRel,a,d);this.Ra(olympe.dm.Property.typeRel,d,b);this.Ra(olympe.dc.CloudObject.containsRel,a,d);return d}ih(a,b,c='',{Yi:d=olympe.dm.Relation.F.cm,Lr:e=olympe.dm.Relation.C.Aq,Jr:f=olympe.dm.Relation.C.rl,xj:g=olympe.dm.Relation.C.Nl,
481
- Xi:h=olympe.dm.Nc.NONE,uj:k=olympe.dm.Relation.L|h}={},l=olympe.W.fc()){c=this.create(olympe.dm.Relation,l).setProperty(olympe.dc.CloudObject.nameProp,c||'').setProperty(olympe.dm.Relation.Mm,d).setProperty(olympe.dm.Relation.zn,k).setProperty(olympe.dm.Relation.Wm,e).setProperty(olympe.dm.Relation.Gn,e).setProperty(olympe.dm.Relation.Vm,f).setProperty(olympe.dm.Relation.Cn,g).setProperty(olympe.dm.Relation.Ar,h);this.Ra(olympe.dc.CloudObject.G,a,c);this.Ra(olympe.dm.Relation.destinationModelRel,
482
- c,b);this.Ra(olympe.dc.CloudObject.containsRel,a,c);return c}rh(){return!1}Km(a){this.F.push(olympe.D.Ja().C(a))}hb(a,b){a=ce([...this.F,a]);de(this,a,b)}Xm(a){a=ce([...this.F,a]);ee(olympe.dc.ei(),this,a,!0)}toString(){return`Transaction #${this.id}`}};olympe.dc.Transaction.la=[olympe.dc.hq];function Qd(a){var b=olympe.dc.ei();const c=a.Z();b.L.set(c,a);a.F.onDestroy(()=>{b.L.delete(c)});return(d,e,f)=>{const g=new olympe.dc.db.Ac(c);e=(new Map).set(olympe.dc.$b.VERSION,b.db.version(d)+1).set(e,f);g.tc(d,e,!1,0);olympe.dc.Ad().$e(g,olympe.dc.Ga.rb)}}
483
- function Rd(a,b,c,d){var e=olympe.dc.ei();const f=olympe.dc.$b.VERSION,g=olympe.dc.ga.ja.wh,h=olympe.dc.ga.ja.sl,k=a.Z(),l=a.rh(),n=new Map;for(const q of b.keys()){var p=e.db.source(q);if(p===olympe.dc.Ga.rb)continue;let r=n.get(p);r||(r=new olympe.dc.db.Ac(k),n.set(p,r));p=b.get(q);p.set(f,e.db.version(q)+1);r.tc(q,p,!1,0)}for(const [q,r]of n)b=wc(new olympe.dc.ga(c?h:g,{Dc:r,rh:l},[q]),a.F),c&&d&&M(b,t=>{t?d(!1,t.message):d(!0,null)}),e.G.send(b)}
479
+ a);if(d.Wf(a))return null;const f=d.source(a)||olympe.dc.Ga.jc;a=this.create(e,a).persist(b).ki(f);for(const [g,h,k]of Ad(d,a))g!==olympe.dc.kc.Xc&&d.Wf(k)&&this.Ra(g,h===olympe.dc.Aa.DESTINATION?a:k,h===olympe.dc.Aa.DESTINATION?k:a);return a}delete(a,b=olympe.dc.Ub.Hc){be(this,new olympe.dc.transaction.ua.Pj(a,b))}update(a,b,c){return be(this,new olympe.dc.transaction.ua.Si(a,b,c))}Ra(a,b,c){be(this,new olympe.dc.transaction.ua.ro(a,b,c))}ec(a,b,c,d){be(this,new olympe.dc.transaction.ua.Ys(a,b,c,
480
+ d))}Um(a,b,c,d){be(this,new olympe.dc.transaction.ua.Xs(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.Ug.jc+d.R(),e);this.Ra(olympe.dc.CloudObject.propertyRel,a,d);this.Ra(olympe.dm.Property.typeRel,d,b);this.Ra(olympe.dc.CloudObject.containsRel,a,d);return d}ih(a,b,c='',{Yi:d=olympe.dm.Relation.F.cm,Mr:e=olympe.dm.Relation.C.Bq,Kr:f=olympe.dm.Relation.C.rl,xj:g=olympe.dm.Relation.C.Nl,
481
+ Xi:h=olympe.dm.Nc.NONE,uj:k=olympe.dm.Relation.L|h}={},l=olympe.W.fc()){c=this.create(olympe.dm.Relation,l).setProperty(olympe.dc.CloudObject.nameProp,c||'').setProperty(olympe.dm.Relation.Mm,d).setProperty(olympe.dm.Relation.zn,k).setProperty(olympe.dm.Relation.Wm,e).setProperty(olympe.dm.Relation.Gn,e).setProperty(olympe.dm.Relation.Vm,f).setProperty(olympe.dm.Relation.Cn,g).setProperty(olympe.dm.Relation.Br,h);this.Ra(olympe.dc.CloudObject.G,a,c);this.Ra(olympe.dm.Relation.destinationModelRel,
482
+ c,b);this.Ra(olympe.dc.CloudObject.containsRel,a,c);return c}rh(){return!1}Km(a){this.F.push(olympe.D.Ja().C(a))}hb(a,b){a=ce([...this.F,a]);de(this,a,b)}Xm(a){a=ce([...this.F,a]);ee(olympe.dc.ei(),this,a,!0)}toString(){return`Transaction #${this.id}`}};olympe.dc.Transaction.la=[olympe.dc.iq];function Qd(a){var b=olympe.dc.ei();const c=a.Z();b.L.set(c,a);a.F.onDestroy(()=>{b.L.delete(c)});return(d,e,f)=>{const g=new olympe.dc.db.Ac(c);e=(new Map).set(olympe.dc.$b.VERSION,b.db.version(d)+1).set(e,f);g.tc(d,e,!1,0);olympe.dc.Ad().$e(g,olympe.dc.Ga.rb)}}
483
+ function Rd(a,b,c,d){var e=olympe.dc.ei();const f=olympe.dc.$b.VERSION,g=olympe.dc.ga.ka.wh,h=olympe.dc.ga.ka.sl,k=a.Z(),l=a.rh(),n=new Map;for(const q of b.keys()){var p=e.db.source(q);if(p===olympe.dc.Ga.rb)continue;let r=n.get(p);r||(r=new olympe.dc.db.Ac(k),n.set(p,r));p=b.get(q);p.set(f,e.db.version(q)+1);r.tc(q,p,!1,0)}for(const [q,r]of n)b=wc(new olympe.dc.ga(c?h:g,{Dc:r,rh:l},[q]),a.F),c&&d&&M(b,t=>{t?d(!1,t.message):d(!0,null)}),e.G.send(b)}
484
484
  function de(a,b,c){var d=olympe.dc.ei();if(c&&b){const e=a.Z();d.F.set(e,b);ee(d,a,(f,g)=>{f||(d.F.delete(e),b(f,g))},!1)}else ee(d,a,b,!1)}
485
- function fe(a){const b=olympe.dc.ga.ja.Sj;a.G.C(olympe.dc.ga.ja.Ij,(c,d)=>{c=d.id;var e=d.rollback;d=d.error;const f=a.L.get(c);void 0!==f&&(a.L.delete(c),f.Ib(d));olympe.dc.Ad().$e(e,olympe.dc.Ga.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)})}
486
- function ee(a,b,c,d=!1){const e=olympe.D.Ja(),f=c?e.C(c):void 0;c=olympe.dc.Ad();const g=b.Z(),h=new olympe.dc.transaction.xu(a.db,g);b.C(h);if(h.Sf())f&&f(!0,null);else{a.C.set(g,[]);const k=[],l=[];for(const p of h.versions.keys())Td(h,p)?k.push(p):l.push(p);const n=Jc(c,e,h.G,k,l);ge(a,h,(p,q,r)=>{q?(he(a,g,k,h.C.size),ie(a,h,d,b.rh(),(t,u)=>{!t&&a.C.has(g)&&(a.C.get(g).forEach(v=>v(olympe.dc.transaction.rg.C.hk,u)),je(a,g));n(t);p&&p(t);f&&f(t,u)})):(a.N.error(r),n(!1),f&&f(!1,r))})}}
485
+ function fe(a){const b=olympe.dc.ga.ka.Sj;a.G.C(olympe.dc.ga.ka.Ij,(c,d)=>{c=d.id;var e=d.rollback;d=d.error;const f=a.L.get(c);void 0!==f&&(a.L.delete(c),f.Ib(d));olympe.dc.Ad().$e(e,olympe.dc.Ga.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)})}
486
+ function ee(a,b,c,d=!1){const e=olympe.D.Ja(),f=c?e.C(c):void 0;c=olympe.dc.Ad();const g=b.Z(),h=new olympe.dc.transaction.yu(a.db,g);b.C(h);if(h.Sf())f&&f(!0,null);else{a.C.set(g,[]);const k=[],l=[];for(const p of h.versions.keys())Td(h,p)?k.push(p):l.push(p);const n=Jc(c,e,h.G,k,l);ge(a,h,(p,q,r)=>{q?(he(a,g,k,h.C.size),ie(a,h,d,b.rh(),(t,u)=>{t||je(a,g,u);n(t);p&&p(t);f&&f(t,u)})):(a.N.error(r),je(a,g,r),n(!1),f&&f(!1,r))})}}
487
487
  function ge(a,b,c){const d=[];for(const p of b.versions.keys())a.db.qh(p,olympe.dm.File)&&Td(b,p)&&d.push(p);if(0===d.length)c(null,!0,null);else{var e=olympe.dm.File.urlProp.R(),f=olympe.dm.File.C.R(),g=olympe.dm.File.modificationDateProp.R(),h=Array.from(b.C.values()),k=[],l=new olympe.async.ng(olympe.D.mh()),n=olympe.W.ai();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.Y(t);null===v?q():sc(a.Y,
488
488
  p,v,u,w=>{const y=h.reduce((B,E)=>B||E.Lf(p),null);null!==y&&(y.va(e,w).va(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.Ac;k.forEach(([u,v])=>{const w=new Map;w.set(e,v).set(f,!0).set(g,olympe.D.jb.now());t.tc(u,w,!0,0)});r=Jc(olympe.dc.Ad(),olympe.D.mh(),t,[],[])}c(r,p,q)});l.start()}}
489
- function he(a,b,c,d){const e=olympe.D.mh(),f=new olympe.async.ng(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.C((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.rg.C.Wp&&olympe.dc.Ad().persist(c);je(a,b)});f.start()}
490
- function ie(a,b,c,d,e){b=b.C;if(0===b.size)e(!0,null);else{var f=c?olympe.dc.ga.ja.Bk:olympe.dc.ga.ja.eh;c=(h,k,l,n)=>{h=M(new olympe.dc.ga(f,{Dc:h,rh:d},[k]),p=>{p instanceof Error?n(p.message):l()});a.G.send(h)};var g=new olympe.async.ng(olympe.D.mh());for(const [h,k]of b)g.add(c.bind(null,k,h));Vb(g,e);g.start()}}function je(a,b){a.C.delete(b);if(0===a.C.size){for(var c of a.U)c();a.U=[]}a.F.has(b)&&(c=a.F.get(b),a.F.delete(b),c(!0,null))}
491
- function ke(a,b){0<a.C.size?a.U.push(olympe.D.Ja().C(b)):b()}olympe.dc.transaction.rg=class{constructor(a,b,c,d,e){this.N=a;this.db=b;this.G=c;this.Y=d;this.timeout=e;this.L=new Map;this.C=new Map;this.U=[];this.F=new Map;fe(this)}Xa(){return this.N}};olympe.dc.transaction.rg.C={hk:0,Vp:1,Wp:2};olympe.dc.transaction.P={Ea:'dc.transaction.Logger',xa:'dc.transaction.Manager'};olympe.dc.transaction.Config={TIMEOUT:'dc.transaction.timeout',Yn:'dc.transaction.burstInterval'};
492
- olympe.T.config(function(a){D(a,olympe.dc.transaction.Config.TIMEOUT,6E4);D(a,olympe.dc.transaction.Config.Yn,30);C(a,olympe.dc.transaction.P.Ea,[olympe.ra.P.xa],b=>b.Rc('dc'));A(a,olympe.dc.transaction.P.xa,olympe.dc.transaction.rg,olympe.dc.transaction.P.Ea,olympe.dc.P.vi,olympe.dc.P.me,olympe.dc.P.yi,new olympe.T.fa(olympe.dc.transaction.Config.TIMEOUT))},'olympe.dc.transaction');olympe.dc.transaction.ua={};function W(a){return olympe.dc.wa(a)}function le(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.bb(e));return c}olympe.dc.transaction.ua.Pg=class{C(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}bb(a){a=olympe.D.bb(a);return void 0===a||null===a?null:olympe.D.$r(a)?a.valueOf():a}};olympe.dc.transaction.ua.Pg.la=[olympe.dc.hq];olympe.dc.transaction.ua.Wd=class extends olympe.dc.transaction.ua.Pg{constructor(a,b){super();this.tag=void 0!==b?b:olympe.W.fc();this.model=a;this.F=new Map;this.G=!0;this.F.set(olympe.dc.$b.VERSION,1)}R(){return W(this.tag)}Tb(){return W(this.model)}persist(a){this.G=a;return this}ki(a){this.F.set(olympe.dc.$b.Jd,a);return this}Ax(){this.F.set(olympe.dc.$b.Jd,olympe.dc.Ga.rb)}setProperty(a,b){this.F.set(olympe.dc.wa(a),b);return this}gl(a){this.setProperty(olympe.dc.CloudObject.nameProp.R(),a);
489
+ function he(a,b,c,d){const e=olympe.D.mh(),f=new olympe.async.ng(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.C((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.rg.C.Xp&&olympe.dc.Ad().persist(c);je(a,b)});f.start()}
490
+ function ie(a,b,c,d,e){b=b.C;if(0===b.size)e(!0,null);else{var f=c?olympe.dc.ga.ka.Bk:olympe.dc.ga.ka.eh;c=(h,k,l,n)=>{h=M(new olympe.dc.ga(f,{Dc:h,rh:d},[k]),p=>{p instanceof Error?n(p.message):l()});a.G.send(h)};var g=new olympe.async.ng(olympe.D.mh());for(const [h,k]of b)g.add(c.bind(null,k,h));Vb(g,e);g.start()}}
491
+ function je(a,b,c){if(void 0!==c){var d;null==(d=a.C.get(b))||d.forEach(e=>{e(olympe.dc.transaction.rg.C.hk,c)})}a.C.delete(b);if(0===a.C.size){for(const e of a.U)e();a.U=[]}a.F.has(b)&&(d=a.F.get(b),a.F.delete(b),d(!0,null))}function ke(a,b){0<a.C.size?a.U.push(olympe.D.Ja().C(b)):b()}olympe.dc.transaction.rg=class{constructor(a,b,c,d,e){this.N=a;this.db=b;this.G=c;this.Y=d;this.timeout=e;this.L=new Map;this.C=new Map;this.U=[];this.F=new Map;fe(this)}Xa(){return this.N}};
492
+ olympe.dc.transaction.rg.C={hk:0,Wp:1,Xp:2};olympe.dc.transaction.P={Ea:'dc.transaction.Logger',xa:'dc.transaction.Manager'};olympe.dc.transaction.Config={TIMEOUT:'dc.transaction.timeout',Yn:'dc.transaction.burstInterval'};
493
+ olympe.T.config(function(a){D(a,olympe.dc.transaction.Config.TIMEOUT,6E4);D(a,olympe.dc.transaction.Config.Yn,30);C(a,olympe.dc.transaction.P.Ea,[olympe.ra.P.xa],b=>b.Rc('dc'));A(a,olympe.dc.transaction.P.xa,olympe.dc.transaction.rg,olympe.dc.transaction.P.Ea,olympe.dc.P.vi,olympe.dc.P.me,olympe.dc.P.yi,new olympe.T.fa(olympe.dc.transaction.Config.TIMEOUT))},'olympe.dc.transaction');olympe.dc.transaction.ua={};function W(a){return olympe.dc.wa(a)}function le(a,b){const c=new Map;for(const [d,e]of b)c.set(d,a.bb(e));return c}olympe.dc.transaction.ua.Pg=class{C(){throw Error('Abstract method build() not override !');}toString(){throw Error('Abstract method toString() not override !');}bb(a){a=olympe.D.bb(a);return void 0===a||null===a?null:olympe.D.bs(a)?a.valueOf():a}};olympe.dc.transaction.ua.Pg.la=[olympe.dc.iq];olympe.dc.transaction.ua.Wd=class extends olympe.dc.transaction.ua.Pg{constructor(a,b){super();this.tag=void 0!==b?b:olympe.W.fc();this.model=a;this.F=new Map;this.G=!0;this.F.set(olympe.dc.$b.VERSION,1)}R(){return W(this.tag)}Tb(){return W(this.model)}persist(a){this.G=a;return this}ki(a){this.F.set(olympe.dc.$b.Jd,a);return this}Bx(){this.F.set(olympe.dc.$b.Jd,olympe.dc.Ga.rb)}setProperty(a,b){this.F.set(olympe.dc.wa(a),b);return this}gl(a){this.setProperty(olympe.dc.CloudObject.nameProp.R(),a);
493
494
  return this}C(a){const b=olympe.dc.Oa(),c=this.Tb(),d=this.R();if(void 0===c)throw Error('OperationError: Cannot create instance, model tag is undefined');var e=olympe.dc.$b.Jd;if(!this.F.has(e)){var f=b.source(c);this.F.set(e,null!==f?f:olympe.dc.Ga.jc)}if(b.Eb(d)&&!b.Wf(d)&&this.G){e=new Map([...b.kd(d,!0),...le(this,this.F)]);for(const g of e.values())g instanceof olympe.dc.Jc&&!Td(a,g.R())&&(f=new olympe.dc.Transaction,f.vj(g.R()),f.C(a));Ud(a,d,this.G,e);a.Ra(olympe.dc.CloudObject.modelRel.R(),
494
- d,c);for(const [g,h,k]of Ad(b,d))Td(a,k)&&(h===olympe.dc.Aa.ORIGIN?a.Ra(g,k,d):a.Ra(g,d,k))}else b.Eb(d)||(Ud(a,d,this.G,le(this,this.F)),a.Ra(olympe.dc.CloudObject.modelRel.R(),d,c))}toString(){return`CreateInstance(${this.Tb()}, ${this.R()})`}};olympe.dc.transaction.ua.Wd.prototype.setProperty=olympe.dc.transaction.ua.Wd.prototype.setProperty;olympe.dc.transaction.ua.Wd.prototype.localSource=olympe.dc.transaction.ua.Wd.prototype.Ax;olympe.dc.transaction.ua.Wd.prototype.persist=olympe.dc.transaction.ua.Wd.prototype.persist;
495
+ d,c);for(const [g,h,k]of Ad(b,d))Td(a,k)&&(h===olympe.dc.Aa.ORIGIN?a.Ra(g,k,d):a.Ra(g,d,k))}else b.Eb(d)||(Ud(a,d,this.G,le(this,this.F)),a.Ra(olympe.dc.CloudObject.modelRel.R(),d,c))}toString(){return`CreateInstance(${this.Tb()}, ${this.R()})`}};olympe.dc.transaction.ua.Wd.prototype.setProperty=olympe.dc.transaction.ua.Wd.prototype.setProperty;olympe.dc.transaction.ua.Wd.prototype.localSource=olympe.dc.transaction.ua.Wd.prototype.Bx;olympe.dc.transaction.ua.Wd.prototype.persist=olympe.dc.transaction.ua.Wd.prototype.persist;
495
496
  olympe.dc.transaction.ua.Wd.prototype.getModelTag=olympe.dc.transaction.ua.Wd.prototype.Tb;olympe.dc.transaction.ua.Wd.prototype.getTag=olympe.dc.transaction.ua.Wd.prototype.R;olympe.dc.transaction.ua.Wd.la=[olympe.dc.ze];olympe.dc.transaction.ua.ro=class extends olympe.dc.transaction.ua.Pg{constructor(a,b,c){super();this.type=a.Pa?a:new olympe.dc.X.Sb(W(a));this.F=b;this.G=c}Pa(){return this.bb(this.type).Pa()}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.kc.Xc)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');
496
- const d=W(this.G);if(''===d)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.Pa()===olympe.dc.Aa.DESTINATION?a.Ra(b,c,d):a.Ra(b,d,c)}toString(){return`CreateRelation('${this.Pa()}${W(this.type)}, ${W(this.F)}, ${W(this.G)})`}};olympe.dc.transaction.ua.oz=class extends olympe.dc.transaction.ua.Pg{constructor(a,b=olympe.dc.Ub.Hc){super();this.model=a;this.F=b}Tb(){return W(this.model)}C(a){const b=this.Tb();if(void 0===b)throw Error('OperationError: Cannot delete instances of model, model is undefined');const c=olympe.dc.Oa();for(const d of c.ee(b))d!==b&&(new olympe.dc.transaction.ua.Pj(d,this.F)).C(a)}toString(){return`DeleteAllInstances(${this.Tb()}, ${this.F})`}};olympe.dc.transaction.ua.Ws=class extends olympe.dc.transaction.ua.Pg{constructor(a,b,c,d){super();this.F=a.Pa?a:new olympe.dc.X.Sb(W(a));this.G=b;this.L=c||!1;this.U=d instanceof Array?d.map(e=>W(e)):null}Pa(){return this.bb(this.F).Pa()}C(a){const b=W(this.F);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.kc.Xc)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');
497
- var d=olympe.dc.Oa();const e=this.Pa(),f=this.U;d=d.tb(c,this.F);for(const g of d)e===olympe.dc.Aa.DESTINATION?a.ec(b,c,g):a.ec(b,g,c),null!==f&&0<=f.indexOf(g)||this.L&&(new olympe.dc.transaction.ua.Pj(g,olympe.dc.Ub.Hc)).C(a)}toString(){return`DeleteAllRelations(${this.Pa()}${W(this.F)}, ${W(this.G)}, ${this.L})`}};olympe.dc.transaction.ua.Pj=class extends olympe.dc.transaction.ua.Pg{constructor(a,b=olympe.dc.Ub.Hc){super();this.tag=a;this.F=b}R(){return W(this.tag)}C(a){const b=olympe.dc.Oa(),c=this.R();if(void 0===c)throw Error('OperationError: Cannot delete instance, tag is undefined');const d=b.model(c);0<=b.version(c)&&d&&a.Mc(c,this.F)}toString(){return'DeleteInstance('+this.R()+', '+this.F+')'}};olympe.dc.transaction.ua.Xs=class extends olympe.dc.transaction.ua.ro{constructor(a,b,c,d=!1){super(a,b,c);this.L=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.kc.Xc)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');
497
+ const d=W(this.G);if(''===d)throw Error('OperationError: Cannot create relation, destination tag is undefined, null or empty string');this.Pa()===olympe.dc.Aa.DESTINATION?a.Ra(b,c,d):a.Ra(b,d,c)}toString(){return`CreateRelation('${this.Pa()}${W(this.type)}, ${W(this.F)}, ${W(this.G)})`}};olympe.dc.transaction.ua.pz=class extends olympe.dc.transaction.ua.Pg{constructor(a,b=olympe.dc.Ub.Hc){super();this.model=a;this.F=b}Tb(){return W(this.model)}C(a){const b=this.Tb();if(void 0===b)throw Error('OperationError: Cannot delete instances of model, model is undefined');const c=olympe.dc.Oa();for(const d of c.ee(b))d!==b&&(new olympe.dc.transaction.ua.Pj(d,this.F)).C(a)}toString(){return`DeleteAllInstances(${this.Tb()}, ${this.F})`}};olympe.dc.transaction.ua.Xs=class extends olympe.dc.transaction.ua.Pg{constructor(a,b,c,d){super();this.F=a.Pa?a:new olympe.dc.X.Sb(W(a));this.G=b;this.L=c||!1;this.U=d instanceof Array?d.map(e=>W(e)):null}Pa(){return this.bb(this.F).Pa()}C(a){const b=W(this.F);if(void 0===b)throw Error('OperationError: Cannot delete relation, type is undefined');if(b===olympe.dc.kc.Xc)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');
498
+ var d=olympe.dc.Oa();const e=this.Pa(),f=this.U;d=d.tb(c,this.F);for(const g of d)e===olympe.dc.Aa.DESTINATION?a.ec(b,c,g):a.ec(b,g,c),null!==f&&0<=f.indexOf(g)||this.L&&(new olympe.dc.transaction.ua.Pj(g,olympe.dc.Ub.Hc)).C(a)}toString(){return`DeleteAllRelations(${this.Pa()}${W(this.F)}, ${W(this.G)}, ${this.L})`}};olympe.dc.transaction.ua.Pj=class extends olympe.dc.transaction.ua.Pg{constructor(a,b=olympe.dc.Ub.Hc){super();this.tag=a;this.F=b}R(){return W(this.tag)}C(a){const b=olympe.dc.Oa(),c=this.R();if(void 0===c)throw Error('OperationError: Cannot delete instance, tag is undefined');const d=b.model(c);0<=b.version(c)&&d&&a.Mc(c,this.F)}toString(){return'DeleteInstance('+this.R()+', '+this.F+')'}};olympe.dc.transaction.ua.Ys=class extends olympe.dc.transaction.ua.ro{constructor(a,b,c,d=!1){super(a,b,c);this.L=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.kc.Xc)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');
498
499
  this.Pa()===olympe.dc.Aa.DESTINATION?a.ec(b,c,d):a.ec(b,d,c);this.L&&(new olympe.dc.transaction.ua.Pj(d,olympe.dc.Ub.Hc)).C(a)}toString(){return'DeleteRelation('+this.Pa()+W(this.type)+', '+W(this.F)+', '+W(this.G)+', '+this.L+')'}};olympe.dc.transaction.ua.Si=class extends olympe.dc.transaction.ua.Pg{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)}R(){return W(this.tag)}setProperty(a,b){this.F.set(W(a),b);return this}C(a){const b=this.R();if(void 0===b)throw Error('OperationError: Cannot update instance, tag is undefined');const c=olympe.dc.Oa();var d=c.version(b),e=a.versions.get(b);e=void 0!==e?e:d;if(null===e)throw Error('OperationError: Instance #'+
499
500
  b+' not found so it cannot be updated');d=le(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.fb(b,f),e instanceof olympe.dc.Jc&&(e=e.R(),a.Y[e]=!0),g instanceof olympe.dc.Jc&&!Td(a,g.R())&&(e=new olympe.dc.Transaction,e.vj(g.R()),e.C(a));a.tc(b,d)}toString(){return'UpdateInstance('+this.R()+', '+le(this,this.F)+')'}};olympe.dc.transaction.ua.Si.prototype.setProperty=olympe.dc.transaction.ua.Si.prototype.setProperty;
500
- olympe.dc.transaction.ua.Si.prototype.getTag=olympe.dc.transaction.ua.Si.prototype.R;olympe.dc.ba={};olympe.dc.ze=class{R(){}};olympe.dc.ze.prototype.getTag=olympe.dc.ze.prototype.R;olympe.dc.dA=olympe.dc.ze;olympe.dc.ba.lk={ASC:'ASC',DESC:'DESC'};function me(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.ba.V.Ic(a.p,b,olympe.dc.Oa());case 2:return new olympe.dc.ba.V.Wc(a.p,a.s,olympe.dc.Oa(),a.c);case 3:return new olympe.dc.ba.V.Ch(a.p,a.b,a.l,a.s);case 4:return new olympe.dc.ba.V.nd(me(a.v));case 5:return new olympe.dc.ba.V.wd(a.p,new RegExp(a.r),olympe.dc.Oa(),a.c);case 6:b=new olympe.dc.ba.V.De(a.d);
501
+ olympe.dc.transaction.ua.Si.prototype.getTag=olympe.dc.transaction.ua.Si.prototype.R;olympe.dc.ba={};olympe.dc.ze=class{R(){}};olympe.dc.ze.prototype.getTag=olympe.dc.ze.prototype.R;olympe.dc.eA=olympe.dc.ze;olympe.dc.ba.lk={ASC:'ASC',DESC:'DESC'};function me(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.ba.V.Ic(a.p,b,olympe.dc.Oa());case 2:return new olympe.dc.ba.V.Wc(a.p,a.s,olympe.dc.Oa(),a.c);case 3:return new olympe.dc.ba.V.Ch(a.p,a.b,a.l,a.s);case 4:return new olympe.dc.ba.V.nd(me(a.v));case 5:return new olympe.dc.ba.V.wd(a.p,new RegExp(a.r),olympe.dc.Oa(),a.c);case 6:b=new olympe.dc.ba.V.De(a.d);
501
502
  for(const [d,e,f]of a.r)a=new olympe.dc.query.Relation(d,e,f),f?b.Ok(a):b.sb(a);return b;case 7:return new olympe.dc.ba.V.ae(...a.p.map(d=>me(d)));case 8:return new olympe.dc.ba.V.Ud(...a.p.map(d=>me(d)));default:return null}}
502
- olympe.dc.ba.$a=class{observe(){}hb(){}clear(){}ia(){}toString(){}static qb(a,b){return new olympe.dc.ba.V.Ic(a,b,olympe.dc.Oa())}static contains(a,b,c=!1){return new olympe.dc.ba.V.Wc(a,b,olympe.dc.Oa(),c)}static gs(a,b,c=!0){return new olympe.dc.ba.V.wd(a,b,olympe.dc.Oa(),c)}static Vk(a,b,c=!0){return new olympe.dc.ba.V.Ch(a,b,!1,c)}static zj(a,b,c=!0){return new olympe.dc.ba.V.Ch(a,b,!0,c)}static and(...a){return new olympe.dc.ba.V.Ud(...a)}static or(...a){return new olympe.dc.ba.V.ae(...a)}static not(a){return new olympe.dc.ba.V.nd(a)}};
503
- olympe.dc.ba.$a.not=olympe.dc.ba.$a.not;olympe.dc.ba.$a.or=olympe.dc.ba.$a.or;olympe.dc.ba.$a.and=olympe.dc.ba.$a.and;olympe.dc.ba.$a.smallerThan=olympe.dc.ba.$a.zj;olympe.dc.ba.$a.greaterThan=olympe.dc.ba.$a.Vk;olympe.dc.ba.$a.regex=olympe.dc.ba.$a.gs;olympe.dc.ba.$a.contains=olympe.dc.ba.$a.contains;olympe.dc.ba.$a.equals=olympe.dc.ba.$a.qb;function ne(a,b){return new olympe.dc.gb(a.G,a.source,b,a.F,{max:a.max,offset:a.offset})}function oe(a){return a.C.filter(b=>b instanceof olympe.dc.ba.Hb.hf||b instanceof olympe.dc.ba.Hb.jf).length}
503
+ olympe.dc.ba.$a=class{observe(){}hb(){}clear(){}ia(){}toString(){}static qb(a,b){return new olympe.dc.ba.V.Ic(a,b,olympe.dc.Oa())}static contains(a,b,c=!1){return new olympe.dc.ba.V.Wc(a,b,olympe.dc.Oa(),c)}static hs(a,b,c=!0){return new olympe.dc.ba.V.wd(a,b,olympe.dc.Oa(),c)}static Vk(a,b,c=!0){return new olympe.dc.ba.V.Ch(a,b,!1,c)}static zj(a,b,c=!0){return new olympe.dc.ba.V.Ch(a,b,!0,c)}static and(...a){return new olympe.dc.ba.V.Ud(...a)}static or(...a){return new olympe.dc.ba.V.ae(...a)}static not(a){return new olympe.dc.ba.V.nd(a)}};
504
+ olympe.dc.ba.$a.not=olympe.dc.ba.$a.not;olympe.dc.ba.$a.or=olympe.dc.ba.$a.or;olympe.dc.ba.$a.and=olympe.dc.ba.$a.and;olympe.dc.ba.$a.smallerThan=olympe.dc.ba.$a.zj;olympe.dc.ba.$a.greaterThan=olympe.dc.ba.$a.Vk;olympe.dc.ba.$a.regex=olympe.dc.ba.$a.hs;olympe.dc.ba.$a.contains=olympe.dc.ba.$a.contains;olympe.dc.ba.$a.equals=olympe.dc.ba.$a.qb;function ne(a,b){return new olympe.dc.gb(a.G,a.source,b,a.F,{max:a.max,offset:a.offset})}function oe(a){return a.C.filter(b=>b instanceof olympe.dc.ba.Hb.hf||b instanceof olympe.dc.ba.Hb.jf).length}
504
505
  function pe(a){const b=olympe.dc.ba.Hb.Nh,c=olympe.dc.ba.Hb.hf,d=olympe.dc.ba.Hb.jf,e=0===a.F.size?a.Wi():a;let f=-1;a.C.reduce((g,h)=>{h instanceof b&&(f=g);return h instanceof c||h instanceof d?g+1:g},0);if(0<=f&&!e.F.has(f))throw Error('AndReturn was not called for the current level before sortBy operator');return e}
505
506
  function qe(a,b){const c=olympe.dc.Ed.SUBSCRIBE,d=olympe.dc.Ed.Li,e=new olympe.dc.kf(a.G,b?c:d);for(const f of a.C)f instanceof olympe.dc.ba.Hb.hf?e.sb(f.Qd()):f instanceof olympe.dc.ba.Hb.jf?e.sb(f.Qd(),!0):f instanceof olympe.dc.ba.Hb.vc&&(a=f.C,a instanceof olympe.dc.ba.V.De&&(a=a.ld(),a.forEach(g=>e.sb(g)),re(e,a.length)));return e}function se(a){return a.source||a.db.source(a.G)||olympe.dc.Ga.jc}
506
507
  function te(a){return new olympe.dc.gb(a.r,a.s,a.qp.map(b=>ue(b)),new Set(a.lv),{max:a.lp.m,offset:a.lp.o})}
507
- olympe.dc.gb=class{constructor(a,b=null,c=[],d=new Set,e={max:-1,offset:0}){this.db=olympe.dc.Oa();this.G=olympe.dc.wa(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.gb(a,b)}static Xk(a,b=olympe.dc.Ga.jc){return(new olympe.dc.gb(a,b)).sb(olympe.dc.CloudObject.instancesRel)}sb(a){const b=Array.from(this.C);b.push(new olympe.dc.ba.Hb.hf(this.db,a));return ne(this,b)}dw(a,b=!1){const c=Array.from(this.C);c.push(new olympe.dc.ba.Hb.jf(this.db,
508
+ olympe.dc.gb=class{constructor(a,b=null,c=[],d=new Set,e={max:-1,offset:0}){this.db=olympe.dc.Oa();this.G=olympe.dc.wa(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.gb(a,b)}static Xk(a,b=olympe.dc.Ga.jc){return(new olympe.dc.gb(a,b)).sb(olympe.dc.CloudObject.instancesRel)}sb(a){const b=Array.from(this.C);b.push(new olympe.dc.ba.Hb.hf(this.db,a));return ne(this,b)}ew(a,b=!1){const c=Array.from(this.C);c.push(new olympe.dc.ba.Hb.jf(this.db,
508
509
  a,b));return ne(this,c)}Wi(){this.F.add(oe(this));return new olympe.dc.gb(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.ba.Hb.vc(a));return ne(this,b)}Zi(){return this}limit(a,b=0){return new olympe.dc.gb(this.G,this.source,this.C,this.F,{max:a,offset:b})}jl(a,b=olympe.dc.ba.lk.ASC){const c=Array.from(this.C);c.push(new olympe.dc.ba.Hb.Nh(this.db,a,b));return ne(this,c)}hb(a){return ve(olympe.dc.Nf(),pe(this),'function'===
509
510
  typeof a.xc?a.xc():a)}observe(a){return we(olympe.dc.Nf(),pe(this),'function'===typeof a.xc?a.xc():a)}jd(){var a=pe(this);return olympe.dc.Nf().U.jd(a)}Z(){null===this.id&&(this.id=olympe.W.mb(this.G+this.C.reduce((a,b)=>a+b.toString(),'')+Array.from(this.F).toString()+this.offset+this.max));return this.id}ia(){return{r:this.G,qp:this.C.map(a=>a.ia()),lv:Array.from(this.F),s:this.source,lp:{m:this.max,o:this.offset}}}};olympe.dc.gb.prototype.executeFromCache=olympe.dc.gb.prototype.jd;
510
- olympe.dc.gb.prototype.observe=olympe.dc.gb.prototype.observe;olympe.dc.gb.prototype.execute=olympe.dc.gb.prototype.hb;olympe.dc.gb.prototype.sortBy=olympe.dc.gb.prototype.jl;olympe.dc.gb.prototype.limit=olympe.dc.gb.prototype.limit;olympe.dc.gb.prototype.cast=olympe.dc.gb.prototype.Zi;olympe.dc.gb.prototype.filter=olympe.dc.gb.prototype.filter;olympe.dc.gb.prototype.andReturn=olympe.dc.gb.prototype.Wi;olympe.dc.gb.prototype.followRecursively=olympe.dc.gb.prototype.dw;
511
+ olympe.dc.gb.prototype.observe=olympe.dc.gb.prototype.observe;olympe.dc.gb.prototype.execute=olympe.dc.gb.prototype.hb;olympe.dc.gb.prototype.sortBy=olympe.dc.gb.prototype.jl;olympe.dc.gb.prototype.limit=olympe.dc.gb.prototype.limit;olympe.dc.gb.prototype.cast=olympe.dc.gb.prototype.Zi;olympe.dc.gb.prototype.filter=olympe.dc.gb.prototype.filter;olympe.dc.gb.prototype.andReturn=olympe.dc.gb.prototype.Wi;olympe.dc.gb.prototype.followRecursively=olympe.dc.gb.prototype.ew;
511
512
  olympe.dc.gb.prototype.follow=olympe.dc.gb.prototype.sb;olympe.dc.gb.instancesOf=olympe.dc.gb.Xk;olympe.dc.gb.from=olympe.dc.gb.from;function ue(a){const b=olympe.dc.Oa();switch(a.t){case 1:return(a=me(a.p))?new olympe.dc.ba.Hb.vc(a):null;case 2:return new olympe.dc.ba.Hb.hf(b,new olympe.dc.query.Relation(a.r.t,a.r.d,!1));case 3:var c=a.s;return new olympe.dc.ba.Hb.jf(b,new olympe.dc.query.Relation(a.r.t,a.r.d,!0),c);case 4:return c=a.o,new olympe.dc.ba.Hb.Nh(b,new olympe.dc.ta.Property(a.p),c);default:return null}}olympe.dc.ba.nk=class{ia(){}F(){}hb(){}observe(){}toString(){}};function xe(a){return a.G.map(b=>a.F.get(a.C[b]))}function ye(a){return a.L.map(b=>{b=b.split('.');return 1===b.length?b[0]:b})}function ze(a){a=Array.from(a.F.values()).flat();return new Set(a.map(b=>b.R()))}function Ae(a){return new Set(a.L.flatMap(b=>b.split('.')))}
512
513
  function Be(a,b){var c=olympe.dc.Oa();if(c.Eb(a)){b.F(a,c.kd(a,!0),0);b.Ra(olympe.dc.kc.Xc,a,c.model(a),0);for(const [d,e,f]of Ad(c,a))(c=b.Lf(f))&&c.re()&&(e===olympe.dc.Aa.DESTINATION?b.Ra(d,a,f,0):b.Ra(d,f,a,0))}else olympe.ra.Xa('Query Result').error(`Fail to serialize instance with tag ${a} not present in local DBView`)}
513
514
  function Ce(a,b,c=olympe.dc.Ga.Pc){b&&b((new olympe.dc.W.Ki(c)).C(a.p||[]));const d=olympe.dc.Oa();let e=!1;b=a.k.map(f=>{const g=f.split('.').map(h=>d.Eb(h)?olympe.dc.CloudObject.get(h):(olympe.ra.Xa('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.Va.create(b,a.a,a.r)}
514
515
  olympe.dc.Va=class{constructor(){this.C=[];this.F=new Map;this.G=[];this.L=[];this.hash=''}static empty(){return new olympe.dc.Va}[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===
515
516
  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}Sc(){return this.qe(0)}qe(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)=>
516
517
  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.Va.create(b,Array.from(this.G),Array.from(this.L))}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.L.concat(...a.map(d=>d.L));return olympe.dc.Va.create(b,c,a)}static from(a,b){const c=olympe.dc.Oa();var d=De(b);if(b.Md){const {kb:k,
517
- order:l,Md:n,Hv:p}=b.Md,q=Array.from(b.G).sort().indexOf(p),r=l===olympe.dc.ba.lk.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.W.mb(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=>
518
+ order:l,Md:n,Iv:p}=b.Md,q=Array.from(b.G).sort().indexOf(p),r=l===olympe.dc.ba.lk.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.W.mb(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=>
518
519
  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.Va.create(d,g,h,b)}static create(a,b,c,d){const e=new olympe.dc.Va;e.C=a.map(f=>f[0]);e.F=new Map(a);e.hash=d||olympe.W.mb(e.C.join(''));e.G=b||e.C.map((f,g)=>g);e.L=c||[];return e}ia(){const a=new olympe.dc.db.Ac;var b=new Set(this.G.flatMap(c=>this.C[c].split('.')));for(const c of b)Be(c,a);b=new olympe.dc.transaction.vd;a.Qc(b);return{k:this.C,p:$d(b),a:this.G,r:this.L}}};
519
520
  olympe.dc.Va.prototype.concat=olympe.dc.Va.prototype.concat;olympe.dc.Va.prototype.reduce=olympe.dc.Va.prototype.reduce;olympe.dc.Va.prototype.sort=olympe.dc.Va.prototype.sort;olympe.dc.Va.prototype.map=olympe.dc.Va.prototype.map;olympe.dc.Va.prototype.forEach=olympe.dc.Va.prototype.forEach;olympe.dc.Va.prototype.find=olympe.dc.Va.prototype.find;olympe.dc.Va.prototype.filter=olympe.dc.Va.prototype.filter;olympe.dc.Va.prototype.shift=olympe.dc.Va.prototype.shift;olympe.dc.Va.prototype.pop=olympe.dc.Va.prototype.pop;
520
521
  olympe.dc.Va.prototype.push=olympe.dc.Va.prototype.push;olympe.dc.Va.prototype.getAt=olympe.dc.Va.prototype.qe;olympe.dc.Va.prototype.getFirst=olympe.dc.Va.prototype.Sc;olympe.dc.Va.prototype.get=olympe.dc.Va.prototype.get;olympe.dc.Va.prototype.indexOf=olympe.dc.Va.prototype.indexOf;olympe.dc.Va.prototype.has=olympe.dc.Va.prototype.has;olympe.dc.Va.prototype.size=olympe.dc.Va.prototype.size;olympe.dc.Va.prototype.toArray=olympe.dc.Va.prototype.ef;olympe.dc.Va.prototype.keys=olympe.dc.Va.prototype.keys;
521
- olympe.dc.Va.prototype.values=olympe.dc.Va.prototype.values;olympe.dc.Va.prototype.entries=olympe.dc.Va.prototype.entries;olympe.dc.Va.empty=olympe.dc.Va.empty;function De(a){var b=new Set(X(a,a.Ag()-1).keys());a.C.push((new Map).set('sink',b));b=[];for(const c of Ee(a,'sink',a.Ag()-1,''))b.push(c.slice(0,-1).split(';'));a.C.pop();return b}function Fe(a,b,c,d,e){a.Md={Md:b,Hv:c,order:d,kb:e}}function Ge(a){a.F||(a.F=!0)}function X(a,b){return b>=a.Ag()?new Map:a.C[b]}
522
+ olympe.dc.Va.prototype.values=olympe.dc.Va.prototype.values;olympe.dc.Va.prototype.entries=olympe.dc.Va.prototype.entries;olympe.dc.Va.empty=olympe.dc.Va.empty;function De(a){var b=new Set(X(a,a.Ag()-1).keys());a.C.push((new Map).set('sink',b));b=[];for(const c of Ee(a,'sink',a.Ag()-1,''))b.push(c.slice(0,-1).split(';'));a.C.pop();return b}function Fe(a,b,c,d,e){a.Md={Md:b,Iv:c,order:d,kb:e}}function Ge(a){a.F||(a.F=!0)}function X(a,b){return b>=a.Ag()?new Map:a.C[b]}
522
523
  function Ee(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=He(a,b,c),f=a.G.has(c)?`${b};${d}`:d;return e.reduce((g,h)=>{for(const k of Ee(a,h,c-1,f))g.add(k);return g},new Set)}function He(a,b,c){return 0===c?null:(a=X(a,c))&&a.has(b)?Array.from(a.get(b)):null}function Ie(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);Ge(a)}
523
- olympe.dc.ba.qq=class{constructor(a){this.C=Array.from({length:oe(a)+1},()=>new Map);this.G=new Set(Array.from(a.F));this.Md=null;this.F=!1;this.max=a.max;this.offset=a.offset}Ag(){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.ra.Xa('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&&Ge(this),!1;if(b>=this.Ag())return olympe.ra.Xa('dc').error('Try to insert result entry to a higher level than possible'),
524
+ olympe.dc.ba.rq=class{constructor(a){this.C=Array.from({length:oe(a)+1},()=>new Map);this.G=new Set(Array.from(a.F));this.Md=null;this.F=!1;this.max=a.max;this.offset=a.offset}Ag(){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.ra.Xa('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&&Ge(this),!1;if(b>=this.Ag())return olympe.ra.Xa('dc').error('Try to insert result entry to a higher level than possible'),
524
525
  null;b=new Set;null!==c&&b.add(c);d.set(a,b);Ge(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.ra.Xa('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 Ie(this,a,b,a),!0;Ge(this);return!1}};olympe.dc.od=class{constructor(a){this.query=a}static from(a){return new olympe.dc.od(olympe.dc.gb.from(a))}sb(a){return new olympe.dc.od(this.query.sb(a))}Zi(){return this}hb(a){return this.query.hb(a).then(b=>{const c=b.size();return 1<c?(olympe.ra.Xa('dc').warn('a follow() on a QuerySingle has '+c+' results (0 or 1 expected) -> returns null'),null):b.Sc()||null})}jd(){const a=this.query.jd(),b=a.size();return 1<b?(olympe.ra.Xa('dc').warn('a follow() on a QuerySingle has '+b+' results (0 or 1 expected) -> returns null'),
525
526
  null):a.Sc()||null}};olympe.dc.od.prototype.executeFromCache=olympe.dc.od.prototype.jd;olympe.dc.od.prototype.execute=olympe.dc.od.prototype.hb;olympe.dc.od.prototype.cast=olympe.dc.od.prototype.Zi;olympe.dc.od.prototype.follow=olympe.dc.od.prototype.sb;olympe.dc.ba.V={};olympe.dc.ba.V.Ud=class{constructor(...a){this.V=a}hb(a){return this.V.reduce((b,c)=>b&&c.hb(a),!0)}observe(a,b,c){const d=this.V.map(()=>!1),e=this.V.map(()=>null),f=(g,h)=>{d[h]=g;g=d.every(k=>k);e[h]!==g&&(e[h]=g,c(g))};this.V.forEach((g,h)=>{g.observe(a,olympe.W.mb('AND-'+b+a+h),k=>f(k,h))})}ia(){return{pr:8,p:this.V.map(a=>a.ia())}}toString(){return'And-'+this.V.reduce((a,b)=>a+'-'+b.toString(),'')}clear(a,b){this.V.forEach((c,d)=>{c.clear(a,olympe.W.mb('AND-'+b+a+d))})}};
526
527
  olympe.dc.ba.V.Ud.C=8;olympe.dc.ba.V.Ud.la=[olympe.dc.ba.$a];olympe.dc.ba.V.Wc=class{constructor(a,b,c,d=!1){this.kb=olympe.dc.wa(a);this.substring=b;this.db=c;this.C=d}fb(){return this.kb}hb(a){return this.apply(this.db.fb(a,this.kb))}observe(a,b,c){wd(this.db,a,this.kb,d=>{c(this.apply(d))},olympe.W.mb(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.kb+'-'+this.substring+'-'+this.C}clear(a,b){this.db.F(a,this.kb,olympe.W.mb(b+
@@ -537,106 +538,106 @@ olympe.dc.ba.Hb.vc.la=[olympe.dc.ba.nk];olympe.dc.ba.Hb.hf=class{constructor(a,b
537
538
  olympe.dc.ba.Hb.hf.la=[olympe.dc.ba.nk];olympe.dc.ba.Hb.jf=class{constructor(a,b,c=!1){this.db=a;this.C=b;this.G=c}Qd(){return this.C}F(a){return a+1}hb(a,b){for(const c of X(a,b).keys())this.G&&a.insert(c,b+1,c),this.db.Pf(c,this.C).forEach(d=>{a.insert(d,b+1,c)})}observe(a,b,c){const d=(g,h,k,l)=>olympe.W.mb(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,
538
539
  h))};return(g,h,k,l)=>f(h,l,0,g,h)}ia(){return{t:3,s:this.G,r:{t:this.C.R(),d:this.C.Pa()}}}toString(){return'followRecursivelyQueryPart-'+this.C.Pa()+this.C.R()}};olympe.dc.ba.Hb.jf.C=3;olympe.dc.ba.Hb.jf.la=[olympe.dc.ba.nk];function Me(a){a=a.db.hc(a.kb,olympe.dm.Property.typeRel);const b=olympe.dc.wa;if(a===b(olympe.dm.String))return Ne((c,d)=>c.localeCompare(d));if(a===b(olympe.dm.Number)||a===b(olympe.dm.Boolean))return Ne((c,d)=>c-d);if(a===b(olympe.dm.DateTime))return Ne((c,d)=>c.getTime()-d.getTime());olympe.ra.Xa('dc').warn(`No comparator found for type with tag ${a}`);return Ne(()=>-1)}function Ne(a){return(b,c)=>{const d=null===b,e=null===c;return d||e?d&&e?0:d?1:-1:a(b,c)}}
539
540
  olympe.dc.ba.Hb.Nh=class{constructor(a,b,c){this.db=a;this.kb=b;this.order=c}F(a){return a}hb(a,b){Fe(a,Me(this),b,this.order,this.kb)}observe(a,b,c){Fe(a,Me(this),b,this.order,this.kb);return(d,e,f,g)=>{g=olympe.W.mb(g+this.toString());d?wd(this.db,e,this.kb,()=>{Ge(a)},g):this.db.F(e,this.kb,g);c(d,e,f,g)}}ia(){return{t:4,p:this.kb.R(),o:this.order}}toString(){return'sortByQueryPart-'+this.order+this.kb.R()}fb(){return this.kb}};olympe.dc.ba.Hb.Nh.C=4;olympe.dc.ba.Hb.Nh.la=[olympe.dc.ba.nk];olympe.dc.query={};function Oe(a,b,c,d){let e=a.C.get(b);void 0===e&&(e=new Set,a.C.set(b,e));a=olympe.W.fc();e.add(a);d.set(a,c)}function Pe(a,b,c){Oe(a,b,c,a.F)}function Qe(a,b,c){if(a.C.has(b)){for(const d of a.C.get(b))c.delete(d);a.C.delete(b)}}function Re(a,b,c,d,e){if(a.C.has(b)){if(!a.L.has(b)){a.L.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.aa()),c):'string'===typeof c?e(Error(c),null):e(null,c);a.C.delete(b);a.L.delete(b)}}else a.N.warn(e)}
540
- function Se(a,b,c){Re(a,b,c,a.F,`Graph result of graphdef ${b} has no associated handler in the datacloud`)}function Te(a,b,c){Oe(a,b,c,a.G)}olympe.dc.query.Js=class{constructor(a){this.N=a;this.C=new Map;this.F=new Map;this.G=new Map;this.L=new Set}};olympe.dc.Ne=class{ma(){}L(){}G(){}U(){}ia(){}toString(){}};olympe.dc.Ed={SUBSCRIBE:0,Li:1,nm:2,gB:0,GET:1};olympe.dc.Ed.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Ed))if(c===a)return b;return null};function re(a,b=1){a.validate(olympe.dc.Ub.NONE,'back');let c=a.Y;for(let d=0;d<b&&null!==c;d++)c=a.F.get(c.F)||null;a.Y=c}function Ue(a){return'not_defined'===a.C?olympe.dc.Ub.NONE:a.C}function Ve(a,b){a.validate(b,'activateFollowRules');return a}function We(a){return'not_defined'!==a.C&&a.C!==olympe.dc.Ub.NONE}
541
+ function Se(a,b,c){Re(a,b,c,a.F,`Graph result of graphdef ${b} has no associated handler in the datacloud`)}function Te(a,b,c){Oe(a,b,c,a.G)}olympe.dc.query.Ks=class{constructor(a){this.N=a;this.C=new Map;this.F=new Map;this.G=new Map;this.L=new Set}};olympe.dc.Ne=class{ma(){}L(){}G(){}U(){}ia(){}toString(){}};olympe.dc.Ed={SUBSCRIBE:0,Li:1,nm:2,hB:0,GET:1};olympe.dc.Ed.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Ed))if(c===a)return b;return null};function re(a,b=1){a.validate(olympe.dc.Ub.NONE,'back');let c=a.Y;for(let d=0;d<b&&null!==c;d++)c=a.F.get(c.F)||null;a.Y=c}function Ue(a){return'not_defined'===a.C?olympe.dc.Ub.NONE:a.C}function Ve(a,b){a.validate(b,'activateFollowRules');return a}function We(a){return'not_defined'!==a.C&&a.C!==olympe.dc.Ub.NONE}
541
542
  function Xe(a){if(We(a))throw Error('An implicit GraphDef has no blocks');return a.F.values()}
542
543
  function Ye(a,b,c){c=new olympe.dc.query.Relation(b.R(),b.Pa(),c||b instanceof olympe.dc.X.Fc);b=[];var d;for(var e of Ze(a)){if(d=a.F.get(e)){var f=new olympe.dc.query.Wj(c,d.id);d.children.has(f.Z())?d=d.children.get(f.Z()):(d.children.set(f.Z(),f),d=f)}else{d=a;var g=c;const h=olympe.W.mb(d.G);f=olympe.W.mb(h+g.toString());g=d.F.get(f)||new olympe.dc.query.Wj(g,h);d.U.set(f,g);d=g}f=d.Z();a.F.set(f,d);b.push(f)}e=b[0];a.oa.set(e,b);return a.F.get(e)}
543
- function $e(a,b){if(We(a))a.aa.push(b);else throw Error('You cannot add a "skip predicate" to an explicit graphdef. Please activate a follow rule first.');return a}function af(a,b){a.ka=b;return a}function bf(a){const b=new olympe.dc.kf(a.G,a.L);b.C=a.C;for(const [c,d]of a.U)b.U.set(c,d);for(const [c,d]of a.F)b.F.set(c,d);b.ka=a.ka;b.aa=[...a.aa];return b}function cf(a,b){return We(a)?new olympe.dc.query.Pl(bf(a),b||olympe.D.Ja()):new olympe.dc.query.Vj(bf(a),b||olympe.D.Ja())}
544
+ function $e(a,b){if(We(a))a.aa.push(b);else throw Error('You cannot add a "skip predicate" to an explicit graphdef. Please activate a follow rule first.');return a}function af(a,b){a.ja=b;return a}function bf(a){const b=new olympe.dc.kf(a.G,a.L);b.C=a.C;for(const [c,d]of a.U)b.U.set(c,d);for(const [c,d]of a.F)b.F.set(c,d);b.ja=a.ja;b.aa=[...a.aa];return b}function cf(a,b){return We(a)?new olympe.dc.query.Pl(bf(a),b||olympe.D.Ja()):new olympe.dc.query.Vj(bf(a),b||olympe.D.Ja())}
544
545
  function Ze(a){let b=a.Y;const c=[];for(;b&&b.Qd().recursive;)c.push(b.Z()),b=a.F.get(b.F)||null;c.push(b&&b.Z()||olympe.W.mb(a.G));const d=[];c.slice(0,5).forEach(e=>{d.push(...a.oa.get(e))});return d}
545
- olympe.dc.kf=class{constructor(a,b=olympe.dc.Ed.SUBSCRIBE){if(void 0===a||null===a)throw Error('Cannot create GraphDef with undefined or null baseTag');this.G=olympe.dc.wa(a);this.L=b;this.C='not_defined';this.aa=[];this.Y=null;this.U=new Map;this.F=new Map;this.ka=null;this.oa=(new Map).set(olympe.W.mb(this.G),[olympe.W.mb(this.G)])}static Mc(a,b){olympe.dc.kf.Se([a],b)}static Se(a,b){const c=new olympe.dc.Transaction;a.forEach(d=>c.delete(d,olympe.dc.Ub.Hc));c.hb(b)}toJSON(){const a=Object.create(null),
546
+ olympe.dc.kf=class{constructor(a,b=olympe.dc.Ed.SUBSCRIBE){if(void 0===a||null===a)throw Error('Cannot create GraphDef with undefined or null baseTag');this.G=olympe.dc.wa(a);this.L=b;this.C='not_defined';this.aa=[];this.Y=null;this.U=new Map;this.F=new Map;this.ja=null;this.oa=(new Map).set(olympe.W.mb(this.G),[olympe.W.mb(this.G)])}static Mc(a,b){olympe.dc.kf.Se([a],b)}static Se(a,b){const c=new olympe.dc.Transaction;a.forEach(d=>c.delete(d,olympe.dc.Ub.Hc));c.hb(b)}toJSON(){const a=Object.create(null),
546
547
  b=c=>{const d=Object.create(null),e=c.Qd();d.t=e.R();d.d=e.Pa();d.r=e.recursive;d.c=c.kh().map(b);return d};a.t=this.G;a.o=this.L;a.f=Ue(this);a.b=Array.from(this.U.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=Ve(new olympe.dc.kf(a.t,a.o),a.f),c=d=>{const e=new olympe.dc.ta.Relation(d.t,d.d);b.sb(e,d.r);for(const f of d.c)c(f);re(b)};for(const d of a.b)c(d);return b}Z(){const a=olympe.W.mb,b=d=>d.Z()+d.kh().map(e=>b(e)).sort().join(''),
547
548
  c=Array.from(this.U,([,d])=>b(d)).sort().join('');return a(`${this.L}-${this.G}${c}-${Ue(this)}`)}add(a,b=!1){this.validate(olympe.dc.Ub.NONE,'add');Ye(this,a,b);return this}sb(a,b=!1){this.validate(olympe.dc.Ub.NONE,'follow');this.Y=Ye(this,a,b);return this}hb(a=b=>b){'not_defined'===this.C&&(this.C=olympe.dc.Ub.NONE);const b=olympe.dc.Nf();a=olympe.D.Ja().C(a);switch(this.L){case olympe.dc.Ed.SUBSCRIBE:case olympe.dc.Ed.Li:const c=df(b,this,a);olympe.D.Ja().zc(()=>{ef(olympe.dc.Nf(),c.Z())});break;
548
- case olympe.dc.Ed.nm:ff(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.Ub.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 gf(a,b){a.data.Qc(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 hf(d);f.add=c.add;f.remove=e;b.C.set(d,f)}})}function jf(a,b){a.C.forEach((c,d)=>b(d,c.add,c.remove))}olympe.dc.query.nt=class{constructor(a,b){this.id=a;this.C=new Map;this.data=b}Z(){return this.id}};class hf{constructor(a){this.id=a;this.add=[];this.remove=[]}Z(){return this.id}};function kf(a){return(a=a.C)&&olympe.dc.Oa().source(a)||olympe.dc.Ga.Pc}function lf(a){return Array.from(a.Da,b=>a.F.get(b))}function mf(a){if(!a.L){for(const b of a.U.values())b();a.U.clear();a.L=!0}}
549
+ case olympe.dc.Ed.nm:ff(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.Ub.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 gf(a,b){a.data.Qc(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 hf(d);f.add=c.add;f.remove=e;b.C.set(d,f)}})}function jf(a,b){a.C.forEach((c,d)=>b(d,c.add,c.remove))}olympe.dc.query.ot=class{constructor(a,b){this.id=a;this.C=new Map;this.data=b}Z(){return this.id}};class hf{constructor(a){this.id=a;this.add=[];this.remove=[]}Z(){return this.id}};function kf(a){return(a=a.C)&&olympe.dc.Oa().source(a)||olympe.dc.Ga.Pc}function lf(a){return Array.from(a.Da,b=>a.F.get(b))}function mf(a){if(!a.L){for(const b of a.U.values())b();a.U.clear();a.L=!0}}
549
550
  olympe.dc.query.Vj=class{constructor(a,b){this.ph=a;this.C=a.G;this.id=a.Z();this.aa=new olympe.D.Xb(`GraphSubscription ${this.id}`,b);this.N=olympe.ra.Xa('dc.query');this.Da=[];this.F=new Map;this.L=!1;this.U=new Map;b=olympe.W.mb(this.C);if(!We(a))for(const c of Xe(a))this.F.set(c.Z(),c),c.F===b&&this.Da.push(c.Z())}Z(){return this.id}Ke(a,b){b=b||olympe.W.fc();this.L?a():this.U.set(b,olympe.D.Ja().C(a));return b}sj(a){return this.U.delete(a)}onDestroy(a){this.aa.onDestroy(a)}release(){this.aa.destroy()}Y(){return function*(a,
550
- b){yield a;for(const c of b)yield*c.ee()}(this.C,this.F.values())}ka(a){const b=olympe.W.mb(this.C);nf(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)})}oa(a){let b=[],c=[];const d=olympe.W.mb(this.C);jf(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=>
551
- k.C.delete(l)))):this.N.error(`A notification contains a block ${e} which is not present in the current graph query ${this.id}`)});Oc(olympe.dc.Ad(),b,c)}Hr(a){const b=a.C,c=[],d=this.C;d===b&&c.push(olympe.W.mb(d));this.F.forEach((k,l)=>{k.C.has(b)&&c.push(l)});const e=olympe.W.mb,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.kh().reduce((q,r)=>q&&g(p[0],r),!0):!1},h=lf(a);return void 0!==c.find(k=>{for(const l of h)if(!g(k,
551
+ b){yield a;for(const c of b)yield*c.ee()}(this.C,this.F.values())}ja(a){const b=olympe.W.mb(this.C);nf(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)})}oa(a){let b=[],c=[];const d=olympe.W.mb(this.C);jf(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=>
552
+ k.C.delete(l)))):this.N.error(`A notification contains a block ${e} which is not present in the current graph query ${this.id}`)});Oc(olympe.dc.Ad(),b,c)}Ir(a){const b=a.C,c=[],d=this.C;d===b&&c.push(olympe.W.mb(d));this.F.forEach((k,l)=>{k.C.has(b)&&c.push(l)});const e=olympe.W.mb,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.kh().reduce((q,r)=>q&&g(p[0],r),!0):!1},h=lf(a);return void 0!==c.find(k=>{for(const l of h)if(!g(k,
552
553
  l))return!1;return!0})}};olympe.dc.query.Wj=class{constructor(a,b){this.G=a;this.children=new Map;this.C=new Set;this.F=b;this.id=olympe.W.mb(b+a.toString());this.apply=!0}toJSON(){let a='{ "id": '+JSON.stringify(this.id)+', "parentId": '+JSON.stringify(this.F)+', "apply": '+JSON.stringify(this.apply)+', ';a+='"relation": '+this.G.toJSON();if(0<this.children.size){a+=', "children": [';for(const b of this.children.values())a+=b.toJSON()+', ';a.endsWith(', ')&&(a=a.substr(0,a.length-2));a+=']'}if(0<this.C.size){a+=', "instances": [';
553
554
  for(const b of this.C)a+=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.children.set(b.id,b);return a}Z(){return this.id}Qd(){return this.G}kh(){return Array.from(this.children.values())}ee(){return this.C.values()}toString(){return this.F+
554
555
  this.G.toString()}};function nf(a,b){a.C.forEach((c,d)=>b(d,c))}
555
556
  olympe.dc.query.Ci=class{constructor(a,b,c,d){this.id=a;this.source=b;this.destination=c;this.C=new Map;this.Dc=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.Dc.toJSON()}`;return a+'}'}static nc(a){let b;'string'===typeof a?b=JSON.parse(a):
556
557
  b=a;a=olympe.dc.db.Ac.nc(b.patch);a=new olympe.dc.query.Ci(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 of=olympe.dc.kc.Xc,pf=olympe.dc.kc.xi,qf=olympe.dc.Aa.ORIGIN,rf=olympe.dc.Aa.DESTINATION;function sf(a,b,c){const d=a.ph.aa;return c.filter(e=>d.reduce((f,g)=>f&&!g(b,e.Qd()),!0))}
557
- olympe.dc.query.Pl=class extends olympe.dc.query.Vj{constructor(a,b){super(a,b);this.G=(new Set).add(a.G)}Y(){return this.G.values()}ka(a){a=a.Dc;for(const b of a.ee())b.L()?this.G.delete(b.tag()):b.re()&&this.G.add(b.tag())}oa(a){let b=[],c=[];jf(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)))});Oc(olympe.dc.Ad(),b,c)}Hr(a){var b=a.C,c=Array.from(a.F.values()),d=sf(this,b,c);if(d.length===c.length&&!this.G.has(b))return!1;
558
+ olympe.dc.query.Pl=class extends olympe.dc.query.Vj{constructor(a,b){super(a,b);this.G=(new Set).add(a.G)}Y(){return this.G.values()}ja(a){a=a.Dc;for(const b of a.ee())b.L()?this.G.delete(b.tag()):b.re()&&this.G.add(b.tag())}oa(a){let b=[],c=[];jf(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)))});Oc(olympe.dc.Ad(),b,c)}Ir(a){var b=a.C,c=Array.from(a.F.values()),d=sf(this,b,c);if(d.length===c.length&&!this.G.has(b))return!1;
558
559
  b=olympe.dm.Relation.C.Ck;c=olympe.dm.Relation.C.rk;const e=olympe.dc.Oa();for(const h of d){var f=h.Qd(),g=f.R();d=f.Pa();if(d!==rf||g!==of&&g!==pf){if(!e.Eb(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=zd(e,f,Ue(this.ph));g=0===h.kh().length;if(!(f&(d===qf?g?12:c:g?3:b)))return!1}}return!0}};function tf(a){let b=null;for(a=[...a.X];null===b&&0<a.length;)b=a.pop().Yb();return b}function uf(a,b){a.Y()||(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.ra.Xa('dc').warn(a))}
559
560
  function vf(a,b){const c=new olympe.D.Xb('listDef toObservable',a.pc().Dh());return new rxjs.Observable(d=>{c.run(()=>{olympe.D.Ec([b],e=>{d.next(e.valueOf())})});c.onDestroy(()=>{d.complete()});return c.destroy.bind(c)})}
560
561
  olympe.dc.Ca=class{constructor(a,b,c){void 0===a||null===a?olympe.ra.Xa('dc').warn('attempt to create a listdef with a null or undefind basetag. This listdef is thus without effect.'):(this.F=olympe.D.Fa([a],olympe.dc.wa,String),this.X=void 0!==b&&(Array.isArray(b)?b:[b])||[],this.valueType=c||tf(this),this.C=null)}Tc(){return olympe.dc.Tc()}hb(){if(null===this.C){const a=olympe.dc.Nf();this.C=wf(a,this);null!==this.valueType&&this.C.Gd(this.valueType);olympe.D.Ja().zc(()=>{xf(a,this.C.Z());this.C=
561
- null})}return this}pc(){null===this.C&&this.hb();return this.C}Gd(a){this.valueType=a;null!==this.C&&this.C.Gd(this.valueType)}Yb(){return null!==this.C?this.C.Yb():null===this.valueType?olympe.dc.CloudObject:this.valueType}Od(){return this.F}Sl(){return this.X}Ke(a,b){return this.pc().Ke(a,b)}sj(a){this.pc().sj(a)}Ft(){return this.pc().Ue()}Et(){return this.pc().Y()}get(a){return this.pc().get(a)}ci(){return this.pc().ci()}lh(a){const b=this.pc();uf(b,'getCurrent');return b.lh(a)}has(a){return this.pc().has(a)}Eg(a){const b=
562
- this.pc();uf(b,'hasCurrent');return b.Eg(a)}qe(a){return this.pc().qe(a)}Wx(a){return vf(this,this.qe(a))}Ve(a){const b=this.pc();uf(b,'getCurrentAt');return b.Ve(a)}We(a){return this.pc().We(a)}Gf(a){const b=this.pc();uf(b,'getCurrentKeyAt');return b.Gf(a)}fe(a){return this.pc().fe(a)}$x(a){return vf(this,this.fe(a))}Hf(a){const b=this.pc();uf(b,'getCurrentRank');return b.Hf(a)}Sc(){return this.pc().Sc()}Xx(){return vf(this,this.Sc())}If(){return this.pc().If()}nf(){return this.pc().nf()}ay(){return vf(this,
562
+ null})}return this}pc(){null===this.C&&this.hb();return this.C}Gd(a){this.valueType=a;null!==this.C&&this.C.Gd(this.valueType)}Yb(){return null!==this.C?this.C.Yb():null===this.valueType?olympe.dc.CloudObject:this.valueType}Od(){return this.F}Sl(){return this.X}Ke(a,b){return this.pc().Ke(a,b)}sj(a){this.pc().sj(a)}Gt(){return this.pc().Ue()}Ft(){return this.pc().Y()}get(a){return this.pc().get(a)}ci(){return this.pc().ci()}lh(a){const b=this.pc();uf(b,'getCurrent');return b.lh(a)}has(a){return this.pc().has(a)}Eg(a){const b=
563
+ this.pc();uf(b,'hasCurrent');return b.Eg(a)}qe(a){return this.pc().qe(a)}Xx(a){return vf(this,this.qe(a))}Ve(a){const b=this.pc();uf(b,'getCurrentAt');return b.Ve(a)}We(a){return this.pc().We(a)}Gf(a){const b=this.pc();uf(b,'getCurrentKeyAt');return b.Gf(a)}fe(a){return this.pc().fe(a)}ay(a){return vf(this,this.fe(a))}Hf(a){const b=this.pc();uf(b,'getCurrentRank');return b.Hf(a)}Sc(){return this.pc().Sc()}Yx(){return vf(this,this.Sc())}If(){return this.pc().If()}nf(){return this.pc().nf()}by(){return vf(this,
563
564
  this.nf())}zg(){const a=this.pc();uf(a,'getCurrentSize');return a.zg()}forEach(a,b){this.pc().forEach(a,b)}ce(a){const b=this.pc();uf(b,'forEachCurrentValue');return b.ce(a)}bj(a,b,c,d){a=new olympe.dc.X.Zd(a,b);(new olympe.dc.Ca(this.F,[...this.X,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.X];for(const c of b){if(void 0===
564
565
  c)throw Error('ListDef.transform(): Trying to set an undefined transformer');if(c instanceof olympe.dc.ta.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.Ca(this.F,a);b.Gd(tf(b)||this.valueType||Object);return b}ll(a){return this.transform(new olympe.dc.X.wf(a))}filter(a){return this.transform(new olympe.dc.X.vc(a))}vg(){const a=new olympe.dc.ek(this.F,null===this.valueType?
565
- void 0:this.valueType);let b=this.X;b instanceof Array||(b=b?[b]:[]);a.transform(b);return a}toString(){let a=this.X;a=a?', '+(a.join?a.join(', '):a.toString()):'';return'ListDef(#'+olympe.D.bb(this.F)+a+')'}Dt(){return this.pc().Vg()}Vc(){return olympe.D.Fa([this.nf()],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.Wa)}};olympe.dc.Ca.prototype.filter=olympe.dc.Ca.prototype.filter;olympe.dc.Ca.prototype.union=olympe.dc.Ca.prototype.ll;
566
- olympe.dc.Ca.prototype.transform=olympe.dc.Ca.prototype.transform;olympe.dc.Ca.prototype.forEachCurrentValue=olympe.dc.Ca.prototype.ce;olympe.dc.Ca.prototype.forEach=olympe.dc.Ca.prototype.forEach;olympe.dc.Ca.prototype.getCurrentSize=olympe.dc.Ca.prototype.zg;olympe.dc.Ca.prototype.observeSize=olympe.dc.Ca.prototype.ay;olympe.dc.Ca.prototype.observeFirst=olympe.dc.Ca.prototype.Xx;olympe.dc.Ca.prototype.getCurrentRank=olympe.dc.Ca.prototype.Hf;olympe.dc.Ca.prototype.observeRank=olympe.dc.Ca.prototype.$x;
567
- olympe.dc.Ca.prototype.getCurrentAt=olympe.dc.Ca.prototype.Ve;olympe.dc.Ca.prototype.observeAt=olympe.dc.Ca.prototype.Wx;olympe.dc.Ca.prototype.offReady=olympe.dc.Ca.prototype.sj;olympe.dc.Ca.prototype.onReady=olympe.dc.Ca.prototype.Ke;olympe.dc.Ca.prototype.getBaseTag=olympe.dc.Ca.prototype.Od;olympe.dc.Ca.la=[olympe.D.pd];m=olympe.dc.Ca.prototype;m.Tc.K=olympe.D.J.C;m.hb.K=olympe.D.J.L();m.pc.K=new olympe.D.J(()=>olympe.dc.query.Subscription,[]);m.Gd.K=new olympe.D.J(()=>{},[]);
568
- m.Od.K=new olympe.D.J(()=>String,[]);m.Sl.K=new olympe.D.J(()=>Array,[]);m.Ke.K=new olympe.D.J(()=>String,[]);m.sj.K=new olympe.D.J(()=>{},[]);m.Ft.K=olympe.D.J.U;m.Et.K=olympe.D.J.C;m.get.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.ci.K=new olympe.D.J(()=>Array,[]);m.lh.K=olympe.D.J.C;m.has.K=olympe.D.J.U;m.Eg.K=olympe.D.J.C;m.qe.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Ve.K=olympe.D.J.C;m.We.K=new olympe.D.J(()=>String,[]);m.Gf.K=olympe.D.J.C;m.fe.K=olympe.D.J.G;
569
- m.Hf.K=olympe.D.J.C;m.Sc.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.If.K=new olympe.D.J(()=>String,[]);m.nf.K=olympe.D.J.G;m.zg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.ce.K=olympe.D.J.C;m.bj.K=new olympe.D.J(()=>{},[]);m.transform.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.ll.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.filter.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.vg.K=new olympe.D.J(()=>olympe.dc.ek,[]);m.toString.K=olympe.D.J.C;m.Dt.K=olympe.D.J.C;m.Vc.K=olympe.D.J.F;const yf={Ny:'append',El:'filter_not',Po:'filter_and',Qo:'filter_or'};function zf(a,b){a=Af(a);a=olympe.dc.CloudObject.get(a);return(new olympe.dc.na.Tn(a,b)).F}
566
+ void 0:this.valueType);let b=this.X;b instanceof Array||(b=b?[b]:[]);a.transform(b);return a}toString(){let a=this.X;a=a?', '+(a.join?a.join(', '):a.toString()):'';return'ListDef(#'+olympe.D.bb(this.F)+a+')'}Et(){return this.pc().Vg()}Vc(){return olympe.D.Fa([this.nf()],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.Wa)}};olympe.dc.Ca.prototype.filter=olympe.dc.Ca.prototype.filter;olympe.dc.Ca.prototype.union=olympe.dc.Ca.prototype.ll;
567
+ olympe.dc.Ca.prototype.transform=olympe.dc.Ca.prototype.transform;olympe.dc.Ca.prototype.forEachCurrentValue=olympe.dc.Ca.prototype.ce;olympe.dc.Ca.prototype.forEach=olympe.dc.Ca.prototype.forEach;olympe.dc.Ca.prototype.getCurrentSize=olympe.dc.Ca.prototype.zg;olympe.dc.Ca.prototype.observeSize=olympe.dc.Ca.prototype.by;olympe.dc.Ca.prototype.observeFirst=olympe.dc.Ca.prototype.Yx;olympe.dc.Ca.prototype.getCurrentRank=olympe.dc.Ca.prototype.Hf;olympe.dc.Ca.prototype.observeRank=olympe.dc.Ca.prototype.ay;
568
+ olympe.dc.Ca.prototype.getCurrentAt=olympe.dc.Ca.prototype.Ve;olympe.dc.Ca.prototype.observeAt=olympe.dc.Ca.prototype.Xx;olympe.dc.Ca.prototype.offReady=olympe.dc.Ca.prototype.sj;olympe.dc.Ca.prototype.onReady=olympe.dc.Ca.prototype.Ke;olympe.dc.Ca.prototype.getBaseTag=olympe.dc.Ca.prototype.Od;olympe.dc.Ca.la=[olympe.D.pd];m=olympe.dc.Ca.prototype;m.Tc.K=olympe.D.J.C;m.hb.K=olympe.D.J.L();m.pc.K=new olympe.D.J(()=>olympe.dc.query.Subscription,[]);m.Gd.K=new olympe.D.J(()=>{},[]);
569
+ m.Od.K=new olympe.D.J(()=>String,[]);m.Sl.K=new olympe.D.J(()=>Array,[]);m.Ke.K=new olympe.D.J(()=>String,[]);m.sj.K=new olympe.D.J(()=>{},[]);m.Gt.K=olympe.D.J.U;m.Ft.K=olympe.D.J.C;m.get.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.ci.K=new olympe.D.J(()=>Array,[]);m.lh.K=olympe.D.J.C;m.has.K=olympe.D.J.U;m.Eg.K=olympe.D.J.C;m.qe.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.Ve.K=olympe.D.J.C;m.We.K=new olympe.D.J(()=>String,[]);m.Gf.K=olympe.D.J.C;m.fe.K=olympe.D.J.G;
570
+ m.Hf.K=olympe.D.J.C;m.Sc.K=new olympe.D.J(()=>olympe.dc.CloudObject,[],'valueType');m.If.K=new olympe.D.J(()=>String,[]);m.nf.K=olympe.D.J.G;m.zg.K=olympe.D.J.C;m.forEach.K=new olympe.D.J(()=>{},[]);m.ce.K=olympe.D.J.C;m.bj.K=new olympe.D.J(()=>{},[]);m.transform.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.ll.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.filter.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.vg.K=new olympe.D.J(()=>olympe.dc.ek,[]);m.toString.K=olympe.D.J.C;m.Et.K=olympe.D.J.C;m.Vc.K=olympe.D.J.F;const yf={Oy:'append',El:'filter_not',Po:'filter_and',Qo:'filter_or'};function zf(a,b){a=Af(a);a=olympe.dc.CloudObject.get(a);return(new olympe.dc.na.Tn(a,b)).F}
570
571
  olympe.dc.ek=class{constructor(a,b){this.C=Af(a);this.N=olympe.dc.Nf().Xa();this.valueType=void 0===b?olympe.dc.CloudObject:b;this.X=[];this.ua=[]}pf(){return new olympe.dc.Ca(this.C,this.X,this.valueType)}transform(a){for(let b=0,c=a.length,d;b<c;b++){d=a[b];if(void 0===d)throw new Bf('transform','Trying to set an undefined transformer');if(d instanceof olympe.dc.ta.Property)throw new Bf('transform','Properties cannot be used as transformer, unlike relations '+d);if(!d||'function'!==typeof d.getTransform)throw new Bf('transform',
571
- 'one of the argument is not a Transformer '+d);const e=d.Yb();null!==e&&(this.valueType=e);this.X.push(d)}return this}ll(a){this.X.push(new olympe.dc.X.wf(a));return this}Ly(a){this.X.push(new olympe.dc.X.wf(Af(a)));return this}Ht(a){this.valueType=a;return this}sb(a){this.X.push(a);this.valueType=a.Yb()||olympe.dc.CloudObject;return this}fw(a){for(const b of a)this.X.push(b),this.valueType=b.Yb()||olympe.dc.CloudObject;return this}Ok(a,b,c){a=new olympe.dc.X.Fc(a,a.Pa(),b,c);this.X.push(a);this.valueType=
572
- a.Yb()||olympe.dc.CloudObject;return this}cw(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.R());void 0===c&&(c=e.Pa())}a=new olympe.dc.X.Be(b,c);this.X.push(a);this.valueType=a.Yb()||olympe.dc.CloudObject;return this}Gt(){this.sb(olympe.dc.CloudObject.instancesRel);return this}Te(a){var b=this.ua.pop();b===yf.El&&(a=new olympe.dc.V.nd(a),b=this.ua.pop());switch(b){case yf.Po:b=this.X.pop().C;b instanceof olympe.dc.V.Ud?(b=b.V,b.push(a),a=new olympe.dc.V.Ud(...b)):a=new olympe.dc.V.Ud(b,
573
- a);b=this.ua.pop();break;case yf.Qo:b=this.X.pop().C,b instanceof olympe.dc.V.ae?(b=b.V,b.push(a),a=new olympe.dc.V.ae(...b)):a=new olympe.dc.V.ae(b,a),b=this.ua.pop()}b===yf.El&&(a=new olympe.dc.V.nd(a),this.ua.pop());this.X.push(new olympe.dc.X.vc(a));return this}Yv(a,b,c){return this.Te(new olympe.dc.V.Ic(zf(a,c),new olympe.dc.na.Dd(b)))}contains(a,b,c=!1,d){return this.Te(new olympe.dc.V.Wc(zf(a,d),new olympe.dc.na.Dd(b),c))}qh(a){if(!(a instanceof Array))throw new Bf('instanceOf','Provided argument "models" must be an array.');
574
- const b=[];for(let c=0;c<a.length;c++)b.push(Af(a[c]));return this.Te(new olympe.dc.V.mf(b))}Wk(a){return this.Te(new olympe.dc.V.Ic(new olympe.dc.na.uf,new olympe.dc.na.Dd(Af(a))))}Zv(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<a.length){this.not().Wk(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().not().Wk(a[b])}return this}kj(a,b){if(!(a instanceof Array))throw new Bf('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];
575
- a.forEach(e=>{c.push(e);d.push(e.Pa())});return this.Te(new olympe.dc.V.lf(c,d,b))}Vk(a,b,c){a=zf(a,c);return this.Te(new olympe.dc.V.ye(a,new olympe.dc.na.Dd(b)))}zj(a,b,c){a=zf(a,c);return this.Te(new olympe.dc.V.Fe(a,new olympe.dc.na.Dd(b)))}Gx(a,b,c,d){a=zf(a,d);return this.Te(new olympe.dc.V.wd(a,b,c))}filter(a){const b=new class extends olympe.dc.V.Og{C(c,d){return a(olympe.dc.CloudObject.get(d))}};return this.Te(b)}not(){this.ua.push(yf.El);return this}and(){this.X[this.X.length-1]instanceof
572
+ 'one of the argument is not a Transformer '+d);const e=d.Yb();null!==e&&(this.valueType=e);this.X.push(d)}return this}ll(a){this.X.push(new olympe.dc.X.wf(a));return this}My(a){this.X.push(new olympe.dc.X.wf(Af(a)));return this}It(a){this.valueType=a;return this}sb(a){this.X.push(a);this.valueType=a.Yb()||olympe.dc.CloudObject;return this}gw(a){for(const b of a)this.X.push(b),this.valueType=b.Yb()||olympe.dc.CloudObject;return this}Ok(a,b,c){a=new olympe.dc.X.Fc(a,a.Pa(),b,c);this.X.push(a);this.valueType=
573
+ a.Yb()||olympe.dc.CloudObject;return this}dw(a){const b=[];let c;for(let d=0;d<a.length;d++){const e=a[d];b.push(e.R());void 0===c&&(c=e.Pa())}a=new olympe.dc.X.Be(b,c);this.X.push(a);this.valueType=a.Yb()||olympe.dc.CloudObject;return this}Ht(){this.sb(olympe.dc.CloudObject.instancesRel);return this}Te(a){var b=this.ua.pop();b===yf.El&&(a=new olympe.dc.V.nd(a),b=this.ua.pop());switch(b){case yf.Po:b=this.X.pop().C;b instanceof olympe.dc.V.Ud?(b=b.V,b.push(a),a=new olympe.dc.V.Ud(...b)):a=new olympe.dc.V.Ud(b,
574
+ a);b=this.ua.pop();break;case yf.Qo:b=this.X.pop().C,b instanceof olympe.dc.V.ae?(b=b.V,b.push(a),a=new olympe.dc.V.ae(...b)):a=new olympe.dc.V.ae(b,a),b=this.ua.pop()}b===yf.El&&(a=new olympe.dc.V.nd(a),this.ua.pop());this.X.push(new olympe.dc.X.vc(a));return this}Zv(a,b,c){return this.Te(new olympe.dc.V.Ic(zf(a,c),new olympe.dc.na.Dd(b)))}contains(a,b,c=!1,d){return this.Te(new olympe.dc.V.Wc(zf(a,d),new olympe.dc.na.Dd(b),c))}qh(a){if(!(a instanceof Array))throw new Bf('instanceOf','Provided argument "models" must be an array.');
575
+ const b=[];for(let c=0;c<a.length;c++)b.push(Af(a[c]));return this.Te(new olympe.dc.V.mf(b))}Wk(a){return this.Te(new olympe.dc.V.Ic(new olympe.dc.na.uf,new olympe.dc.na.Dd(Af(a))))}$v(a){if(!Array.isArray(a))throw Error('ExcludeInstances should be called with an array');if(0<a.length){this.not().Wk(a[0]);for(let b=1,c=a.length;b<c;b++)this.and().not().Wk(a[b])}return this}kj(a,b){if(!(a instanceof Array))throw new Bf('hasRelated','Provided argument "relations" must be an array.');const c=[],d=[];
576
+ a.forEach(e=>{c.push(e);d.push(e.Pa())});return this.Te(new olympe.dc.V.lf(c,d,b))}Vk(a,b,c){a=zf(a,c);return this.Te(new olympe.dc.V.ye(a,new olympe.dc.na.Dd(b)))}zj(a,b,c){a=zf(a,c);return this.Te(new olympe.dc.V.Fe(a,new olympe.dc.na.Dd(b)))}Hx(a,b,c,d){a=zf(a,d);return this.Te(new olympe.dc.V.wd(a,b,c))}filter(a){const b=new class extends olympe.dc.V.Og{C(c,d){return a(olympe.dc.CloudObject.get(d))}};return this.Te(b)}not(){this.ua.push(yf.El);return this}and(){this.X[this.X.length-1]instanceof
576
577
  olympe.dc.X.vc&&this.ua.push(yf.Po);return this}or(){this.X[this.X.length-1]instanceof olympe.dc.X.vc&&this.ua.push(yf.Qo);return this}jl(a,b,c){a=Af(a);let d=null;switch(olympe.dc.Oa().hc(a,olympe.dm.Property.typeRel)){case olympe.dm.String.O.R():d=new olympe.dc.Cb.String(new olympe.dc.na.oe(a,c));break;case olympe.dm.Number.O.R():d=new olympe.dc.Cb.Number(new olympe.dc.na.ke(a,c));break;case olympe.dm.DateTime.O.R():d=new olympe.dc.Cb.DateTime(new olympe.dc.na.je(a,c))}c=d;null!==c&&this.X.push(new olympe.dc.X.Kd(c,
577
- b));return this}sort(a,b,c){const d=new class extends olympe.dc.Cb.Og{L(e,f){return a(olympe.dc.CloudObject.get(f))}G(e,f){return b(e,f).valueOf()}};this.X.push(new olympe.dc.X.Kd(d,c));return this}Uv(){this.X.push(new olympe.dc.X.we);return this}limit(a,b){this.X.push(new olympe.dc.X.Zd(a,b));return this}};class Bf extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}
578
- function Af(a){return'string'===typeof a||a instanceof olympe.D.Wa?a:'function'===typeof a?olympe.dc.ya.Tb(a):olympe.D.lb(a)?a.Hk===olympe.D.Wa?a:olympe.D.Fa([a],b=>olympe.D.Bb(olympe.dc.wa(b)),olympe.D.Wa):a.R()}m=olympe.dc.ek.prototype;m.pf.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.transform.K=olympe.D.J.L();m.ll.K=olympe.D.J.L();m.Ly.K=olympe.D.J.L();m.Ht.K=olympe.D.J.L();m.sb.K=olympe.D.J.L();m.fw.K=olympe.D.J.L();m.Ok.K=olympe.D.J.L();m.cw.K=olympe.D.J.L();m.Gt.K=olympe.D.J.L();m.Te.K=olympe.D.J.L();
579
- m.Yv.K=olympe.D.J.L();m.contains.K=olympe.D.J.L();m.qh.K=olympe.D.J.L();m.Wk.K=olympe.D.J.L();m.Zv.K=olympe.D.J.L();m.kj.K=olympe.D.J.L();m.Vk.K=olympe.D.J.L();m.zj.K=olympe.D.J.L();m.Gx.K=olympe.D.J.L();m.filter.K=olympe.D.J.L();m.not.K=olympe.D.J.L();m.and.K=olympe.D.J.L();m.or.K=olympe.D.J.L();m.jl.K=olympe.D.J.L();m.sort.K=olympe.D.J.L();m.Uv.K=olympe.D.J.L();m.limit.K=olympe.D.J.L();olympe.dc.query.Lp=class{constructor(a){this.id=a;this.C=[];this.data=new olympe.dc.db.Ac}F(a){this.C.push(olympe.dc.wa(a))}Z(){return this.id}getData(){return this.data}};function Cf(a){return olympe.D.lb(a)?'Node#'+a.Na.Z():String(a)}function Df(a,b){return olympe.D.lb(b)?'{"c":"Parameter","v":"'+a.add(b)+'"}':JSON.stringify(b)}
580
- olympe.dc.query.vu=class{constructor(){this.uid=0;this.values=null}add(a){let b;b=olympe.D.lb(a)?'n'+a.Na.Z():'p'+ ++this.uid;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.$a=class{ma(){}C(){}F(){}ia(){}toString(){}};function ve(a,b,c){return a.G.run(()=>a.U.hb(b,c))}function we(a,b,c){return a.G.run(()=>Ef(a.U,b,c))}
581
- function df(a,b,c){var d=olympe.dc.Ga.rb;const e=b.Z();let f=Ff(a.ta,e),g=olympe.dc.Ga.rb;null===f&&(f=cf(b,a.G),a.L||(g=kf(f)));Gf(a.ta,f,d,g);c&&Pe(a.F,e,c);b=olympe.dc.ga.ja.Ai;const h=olympe.dc.ga.ja.zi,k=l=>{if(null!==l){a.N.error(`graph subscription "${e}" failed to subscribe ${l}`);Hf(a.ta,e,d);var n=a.F;Qe(n,e,n.F);c(l,null)}};g===olympe.dc.Ga.rb?(a.N.debug('QueryManager: [ID:',e,'] GraphQuery processed locally'),a.Y.process(d,f,k)):(b=M(new olympe.dc.ga(f.ph.L===olympe.dc.Ed.Li?h:b,f,[g]),
582
- k),a.N.debug('QueryManager: [ID:',e,'] sending GraphQuery to',g),a.C.send(b));return f}function ef(a,b){var c=olympe.dc.Ga.rb;const d=olympe.dc.Ga.rb;if(c===d){const e=Ff(a.ta,b).ph.L,f=If(a.ta,b);Hf(a.ta,b,c)&&f!==d&&e===olympe.dc.Ed.SUBSCRIBE&&(c=M(new olympe.dc.ga(olympe.dc.ga.ja.Zo,String(b),[f]),g=>{g&&a.N.error(`Unsubscription of graphdef ${b} failed: ${g.message}`)}),a.C.send(c))}else Hf(a.ta,b,c)}
583
- function ff(a,b,c){var d=olympe.dc.Ga.rb;b=cf(b,a.G);const e=b.Z();var f=a.F.C.has(e);c&&Pe(a.F,e,c);if(!f){f=h=>{if(h){var k=a.F;Qe(k,e,k.F);c(h,null)}};var g=kf(b);g===olympe.dc.Ga.rb?a.Y.process(d,b,f):(d=M(new olympe.dc.ga(olympe.dc.ga.ja.zi,b,[g]),f),a.C.send(d))}}
584
- function wf(a,b){var c=olympe.dc.Ga.rb;const d=b.Od();var e=new olympe.dc.query.vu;let f;f=d;olympe.D.lb(f)&&(f=e.add(d));b=(b=b.Sl())?Array.isArray(b)?b:[b]:null;const g=olympe.dc.query.Subscription.G(f,b,e);e=Jf(a.ta,g);null===e&&(a.N.debug('QueryMGR: new',a.L?'local':'remote','subscription "',g,'": #',`${f},`,b),e=new olympe.dc.query.Subscription(g,d,b,a.G),a.L||e.yd());a.Sa.process(c,e,h=>{h&&(Kf(a.ta,g,c||olympe.dc.Ga.rb),a.N.error(`subscription "${g}" failed to subscribe ${h}`))});return e}
585
- function xf(a,b){var c=olympe.dc.Ga.rb;if(c===olympe.dc.Ga.rb){const d=If(a.ta,b);a.N.debug('QueryMGR: [ID:',b,'] - Unregistered');Kf(a.ta,b,c)&&d!==olympe.dc.Ga.rb&&(c=M(new olympe.dc.ga(olympe.dc.ga.ja.Su,String(b),[d]),e=>{e&&a.N.error(`Unsubscription of listdef ${b} failed, ${e.message}`)}),a.C.send(c))}else Kf(a.ta,b,c)}
586
- function Lf(a){const b=olympe.dc.ga.ja.$o,c=olympe.dc.ga.ja.yl,d=olympe.dc.ga.ja.Ep;a.C.C(olympe.dc.ga.ja.Hl,(e,f)=>{Mf(a,f,e)});a.C.C(b,(e,f)=>{Nf(a,f,e)});a.C.C(c,(e,f)=>{a.aa.$e(f,e)});a.C.C(d,(e,f)=>{Of(a,f,e)});a.C.oa((e,f)=>{Pf(a,f,e)})}function Qf(a,b){a.N.log('Received subscribeToAll command');b=b?olympe.D.Ja().C(b):void 0;const c=new olympe.dc.ga(olympe.dc.ga.ja.Sg,null,[olympe.dc.Ga.Pc]);b&&M(c,b);a.C.send(c)}
578
+ b));return this}sort(a,b,c){const d=new class extends olympe.dc.Cb.Og{L(e,f){return a(olympe.dc.CloudObject.get(f))}G(e,f){return b(e,f).valueOf()}};this.X.push(new olympe.dc.X.Kd(d,c));return this}Vv(){this.X.push(new olympe.dc.X.we);return this}limit(a,b){this.X.push(new olympe.dc.X.Zd(a,b));return this}};class Bf extends Error{constructor(a,b){super(`ListDefBuilder.${a}(): ${b}`)}}
579
+ function Af(a){return'string'===typeof a||a instanceof olympe.D.Wa?a:'function'===typeof a?olympe.dc.ya.Tb(a):olympe.D.lb(a)?a.Hk===olympe.D.Wa?a:olympe.D.Fa([a],b=>olympe.D.Bb(olympe.dc.wa(b)),olympe.D.Wa):a.R()}m=olympe.dc.ek.prototype;m.pf.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.transform.K=olympe.D.J.L();m.ll.K=olympe.D.J.L();m.My.K=olympe.D.J.L();m.It.K=olympe.D.J.L();m.sb.K=olympe.D.J.L();m.gw.K=olympe.D.J.L();m.Ok.K=olympe.D.J.L();m.dw.K=olympe.D.J.L();m.Ht.K=olympe.D.J.L();m.Te.K=olympe.D.J.L();
580
+ m.Zv.K=olympe.D.J.L();m.contains.K=olympe.D.J.L();m.qh.K=olympe.D.J.L();m.Wk.K=olympe.D.J.L();m.$v.K=olympe.D.J.L();m.kj.K=olympe.D.J.L();m.Vk.K=olympe.D.J.L();m.zj.K=olympe.D.J.L();m.Hx.K=olympe.D.J.L();m.filter.K=olympe.D.J.L();m.not.K=olympe.D.J.L();m.and.K=olympe.D.J.L();m.or.K=olympe.D.J.L();m.jl.K=olympe.D.J.L();m.sort.K=olympe.D.J.L();m.Vv.K=olympe.D.J.L();m.limit.K=olympe.D.J.L();olympe.dc.query.Mp=class{constructor(a){this.id=a;this.C=[];this.data=new olympe.dc.db.Ac}F(a){this.C.push(olympe.dc.wa(a))}Z(){return this.id}getData(){return this.data}};function Cf(a){return olympe.D.lb(a)?'Node#'+a.Na.Z():String(a)}function Df(a,b){return olympe.D.lb(b)?'{"c":"Parameter","v":"'+a.add(b)+'"}':JSON.stringify(b)}
581
+ olympe.dc.query.wu=class{constructor(){this.uid=0;this.values=null}add(a){let b;b=olympe.D.lb(a)?'n'+a.Na.Z():'p'+ ++this.uid;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.$a=class{ma(){}C(){}F(){}ia(){}toString(){}};function ve(a,b,c){return a.G.run(()=>a.U.hb(b,c))}function we(a,b,c){return a.G.run(()=>Ef(a.U,b,c))}
582
+ function df(a,b,c){var d=olympe.dc.Ga.rb;const e=b.Z();let f=Ff(a.ta,e),g=olympe.dc.Ga.rb;null===f&&(f=cf(b,a.G),a.L||(g=kf(f)));Gf(a.ta,f,d,g);c&&Pe(a.F,e,c);b=olympe.dc.ga.ka.Ai;const h=olympe.dc.ga.ka.zi,k=l=>{if(null!==l){a.N.error(`graph subscription "${e}" failed to subscribe ${l}`);Hf(a.ta,e,d);var n=a.F;Qe(n,e,n.F);c(l,null)}};g===olympe.dc.Ga.rb?(a.N.debug('QueryManager: [ID:',e,'] GraphQuery processed locally'),a.Y.process(d,f,k)):(b=M(new olympe.dc.ga(f.ph.L===olympe.dc.Ed.Li?h:b,f,[g]),
583
+ k),a.N.debug('QueryManager: [ID:',e,'] sending GraphQuery to',g),a.C.send(b));return f}function ef(a,b){var c=olympe.dc.Ga.rb;const d=olympe.dc.Ga.rb;if(c===d){const e=Ff(a.ta,b).ph.L,f=If(a.ta,b);Hf(a.ta,b,c)&&f!==d&&e===olympe.dc.Ed.SUBSCRIBE&&(c=M(new olympe.dc.ga(olympe.dc.ga.ka.Zo,String(b),[f]),g=>{g&&a.N.error(`Unsubscription of graphdef ${b} failed: ${g.message}`)}),a.C.send(c))}else Hf(a.ta,b,c)}
584
+ function ff(a,b,c){var d=olympe.dc.Ga.rb;b=cf(b,a.G);const e=b.Z();var f=a.F.C.has(e);c&&Pe(a.F,e,c);if(!f){f=h=>{if(h){var k=a.F;Qe(k,e,k.F);c(h,null)}};var g=kf(b);g===olympe.dc.Ga.rb?a.Y.process(d,b,f):(d=M(new olympe.dc.ga(olympe.dc.ga.ka.zi,b,[g]),f),a.C.send(d))}}
585
+ function wf(a,b){var c=olympe.dc.Ga.rb;const d=b.Od();var e=new olympe.dc.query.wu;let f;f=d;olympe.D.lb(f)&&(f=e.add(d));b=(b=b.Sl())?Array.isArray(b)?b:[b]:null;const g=olympe.dc.query.Subscription.G(f,b,e);e=Jf(a.ta,g);null===e&&(a.N.debug('QueryMGR: new',a.L?'local':'remote','subscription "',g,'": #',`${f},`,b),e=new olympe.dc.query.Subscription(g,d,b,a.G),a.L||e.yd());a.Sa.process(c,e,h=>{h&&(Kf(a.ta,g,c||olympe.dc.Ga.rb),a.N.error(`subscription "${g}" failed to subscribe ${h}`))});return e}
586
+ function xf(a,b){var c=olympe.dc.Ga.rb;if(c===olympe.dc.Ga.rb){const d=If(a.ta,b);a.N.debug('QueryMGR: [ID:',b,'] - Unregistered');Kf(a.ta,b,c)&&d!==olympe.dc.Ga.rb&&(c=M(new olympe.dc.ga(olympe.dc.ga.ka.Tu,String(b),[d]),e=>{e&&a.N.error(`Unsubscription of listdef ${b} failed, ${e.message}`)}),a.C.send(c))}else Kf(a.ta,b,c)}
587
+ function Lf(a){const b=olympe.dc.ga.ka.$o,c=olympe.dc.ga.ka.yl,d=olympe.dc.ga.ka.Fp;a.C.C(olympe.dc.ga.ka.Hl,(e,f)=>{Mf(a,f,e)});a.C.C(b,(e,f)=>{Nf(a,f,e)});a.C.C(c,(e,f)=>{a.aa.$e(f,e)});a.C.C(d,(e,f)=>{Of(a,f,e)});a.C.oa((e,f)=>{Pf(a,f,e)})}function Qf(a,b){a.N.log('Received subscribeToAll command');b=b?olympe.D.Ja().C(b):void 0;const c=new olympe.dc.ga(olympe.dc.ga.ka.Sg,null,[olympe.dc.Ga.Pc]);b&&M(c,b);a.C.send(c)}
587
588
  function Mf(a,b,c=olympe.dc.Ga.rb){b.destination!==olympe.dc.Ga.rb?a.N.error(`Graphdefs registered from peers is not supported yet ! (id: ${b.Z()})`):a.oa.process(c,b,d=>{d&&a.N.error(`An error occurred during the process of a graphdef result ${b.Z()}: ${d.message}`)})}
588
- function Nf(a,b,c=olympe.dc.Ga.rb){const d=Rf(a.ta,b.Z());0!==d.length&&(1<d.length||d[0]!==olympe.dc.Ga.rb?a.N.error(`Notification received for graphdefs subscription registered from peers. Not supported yet ! (id: ${b.Z()})`):a.ka.process(c,b,e=>{e&&a.N.error(`An error occurred during the process of a graphNotification ${b.Z()}`)}))}
589
+ function Nf(a,b,c=olympe.dc.Ga.rb){const d=Rf(a.ta,b.Z());0!==d.length&&(1<d.length||d[0]!==olympe.dc.Ga.rb?a.N.error(`Notification received for graphdefs subscription registered from peers. Not supported yet ! (id: ${b.Z()})`):a.ja.process(c,b,e=>{e&&a.N.error(`An error occurred during the process of a graphNotification ${b.Z()}`)}))}
589
590
  function Of(a,b,c=olympe.dc.Ga.rb){const d=Sf(a.ta,b.Z());1<d.length||d[0]!==olympe.dc.Ga.rb?a.N.error(`Listdefs registered from peers is not supported yet ! (id: ${b.Z()})`):a.Da.process(c,b,e=>{e&&a.N.error(`An error occurred during the process of a listNotification ${b.Z()}`)})}
590
- function Pf(a,b,c){a.N.debug('Source event',b,'received for source',c);if(b===olympe.dc.xk.bq){const d=(e,f)=>{f&&a.N.error(`Error after trying to resubscribe to ${e}: ${f}`)};Tf(a.ta,c).forEach(e=>{Pe(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.ga(olympe.dc.ga.ja.Ai,e,[c]),d.bind(a,e.Z()));a.C.send(e)});Uf(a.ta,c).forEach(e=>{a.N.debug(`resubscribing list subscription ${e.Z()} to destination : ${c}`);e=M(new olympe.dc.ga(olympe.dc.ga.ja.Qu,
591
- e,[c]),d.bind(a,e.Z()));a.C.send(e)})}}olympe.dc.query.Bu=class{constructor(a,b,c,d,e,f,g,h){this.N=a;this.L=b;this.C=c;this.aa=d;this.ta=e;this.F=f;this.G=new olympe.D.Xb('Query Manager context');this.Sa=g[0];this.Y=g[1];this.oa=g[2];this.ka=g[3];this.Da=g[4];this.U=h;Lf(this)}Xa(){return this.N}};olympe.dc.query.Relation=class extends olympe.dc.ta.Relation{constructor(a,b,c){super(a,b);this.recursive=c}toJSON(){let a='{ "tag": '+JSON.stringify(this.R())+', ';a+='"direction": '+JSON.stringify(this.Pa())+', ';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.R(),a.Pa(),a instanceof olympe.dc.X.Fc)}Gc(){const a=
592
- olympe.dc.Aa.DESTINATION,b=olympe.dc.Aa.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.Ej{constructor(b,c,d,e){super(olympe.dc.CloudObject,new olympe.D.Xb('context subscription '+b,e));this.id=b;this.Df=c;this.X=d||null;this.G=this.U.run(()=>olympe.D.ge(olympe.dc.query.Subscription.C.INIT));this.Ge=!1;this.ka=this.be=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].ia(d);else e+='|null';e=olympe.W.mb(e)}catch(f){e=olympe.W.fc()}return e}Z(){return this.id}Od(){return this.Df}Cg(){return this.X}yd(){const b=
593
- olympe.dc.Oa(),c=olympe.D.bb(this.Od());return c?b.Wf(c)?b.source(c)||olympe.dc.Ga.Pc:olympe.dc.Ga.rb:olympe.dc.Ga.Pc}sh(){const b=this.G.Na.Kb;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.Qq}gi(){if(this.G.Na.Ab())throw Error(`Cannot set destroyed subscription '${this.id}' as subscribed`);const b=this.be;this.be=null;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c))b[c](this);ob(this.G,olympe.D.ge(olympe.dc.query.Subscription.C.Qq))}Ue(){return olympe.D.Fa([this.G],()=>{},olympe.D.qa)}Y(){const b=
594
- this.G.Na.Kb;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.xq}Ke(b,c){this.Y()?b(this):(null===this.ka&&(this.ka=new Map),void 0===c&&(c=olympe.W.fc()),this.ka.set(c,olympe.D.Ja().C(b)));return c||''}sj(b){null!==this.ka&&b&&this.ka.delete(b)}ad(){const b=olympe.dc.query.Subscription.C.xq;if(!this.G.Na.Ab()&&olympe.D.bb(this.G)!==b&&(this.Af(),ob(this.G,b),null!==this.ka)){for(const c of this.ka.values())c(this);this.ka=null}}onDestroy(b){this.U.onDestroy(b)}release(){this.U.destroy()}Lb(b){if(!this.G.Na.Ab()){for(let c=
591
+ function Pf(a,b,c){a.N.debug('Source event',b,'received for source',c);if(b===olympe.dc.xk.cq){const d=(e,f)=>{f&&a.N.error(`Error after trying to resubscribe to ${e}: ${f}`)};Tf(a.ta,c).forEach(e=>{Pe(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.ga(olympe.dc.ga.ka.Ai,e,[c]),d.bind(a,e.Z()));a.C.send(e)});Uf(a.ta,c).forEach(e=>{a.N.debug(`resubscribing list subscription ${e.Z()} to destination : ${c}`);e=M(new olympe.dc.ga(olympe.dc.ga.ka.Ru,
592
+ e,[c]),d.bind(a,e.Z()));a.C.send(e)})}}olympe.dc.query.Cu=class{constructor(a,b,c,d,e,f,g,h){this.N=a;this.L=b;this.C=c;this.aa=d;this.ta=e;this.F=f;this.G=new olympe.D.Xb('Query Manager context');this.Sa=g[0];this.Y=g[1];this.oa=g[2];this.ja=g[3];this.Da=g[4];this.U=h;Lf(this)}Xa(){return this.N}};olympe.dc.query.Relation=class extends olympe.dc.ta.Relation{constructor(a,b,c){super(a,b);this.recursive=c}toJSON(){let a='{ "tag": '+JSON.stringify(this.R())+', ';a+='"direction": '+JSON.stringify(this.Pa())+', ';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.R(),a.Pa(),a instanceof olympe.dc.X.Fc)}Gc(){const a=
593
+ olympe.dc.Aa.DESTINATION,b=olympe.dc.Aa.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.Ej{constructor(b,c,d,e){super(olympe.dc.CloudObject,new olympe.D.Xb('context subscription '+b,e));this.id=b;this.Df=c;this.X=d||null;this.G=this.U.run(()=>olympe.D.ge(olympe.dc.query.Subscription.C.INIT));this.Ge=!1;this.ja=this.be=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].ia(d);else e+='|null';e=olympe.W.mb(e)}catch(f){e=olympe.W.fc()}return e}Z(){return this.id}Od(){return this.Df}Cg(){return this.X}yd(){const b=
594
+ olympe.dc.Oa(),c=olympe.D.bb(this.Od());return c?b.Wf(c)?b.source(c)||olympe.dc.Ga.Pc:olympe.dc.Ga.rb:olympe.dc.Ga.Pc}sh(){const b=this.G.Na.Kb;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.Rq}gi(){if(this.G.Na.Ab())throw Error(`Cannot set destroyed subscription '${this.id}' as subscribed`);const b=this.be;this.be=null;for(let c in b)if(Object.prototype.hasOwnProperty.call(b,c))b[c](this);ob(this.G,olympe.D.ge(olympe.dc.query.Subscription.C.Rq))}Ue(){return olympe.D.Fa([this.G],()=>{},olympe.D.qa)}Y(){const b=
595
+ this.G.Na.Kb;return b&&b.valueOf()>=olympe.dc.query.Subscription.C.yq}Ke(b,c){this.Y()?b(this):(null===this.ja&&(this.ja=new Map),void 0===c&&(c=olympe.W.fc()),this.ja.set(c,olympe.D.Ja().C(b)));return c||''}sj(b){null!==this.ja&&b&&this.ja.delete(b)}ad(){const b=olympe.dc.query.Subscription.C.yq;if(!this.G.Na.Ab()&&olympe.D.bb(this.G)!==b&&(this.Af(),ob(this.G,b),null!==this.ja)){for(const c of this.ja.values())c(this);this.ja=null}}onDestroy(b){this.U.onDestroy(b)}release(){this.U.destroy()}Lb(b){if(!this.G.Na.Ab()){for(let c=
595
596
  0,d=b.length;c<d;c++)this.Fm(b[c],c);if(this.Y())this.Af();else{this.Ge=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.ad()}}}Lc(b){const c=this.F;for(let d in c)Object.prototype.hasOwnProperty.call(c,d)&&b(c[d],d)}ac(b,c){if(!this.G.Na.Ab()&&(this.Jk(b,olympe.dc.CloudObject.get(c)),b=this.Y(),this.Ge&&!b)){b=!0;for(let d in this.F)if(Object.prototype.hasOwnProperty.call(this.F,d)&&!Object.prototype.hasOwnProperty.call(this.values,
596
597
  d)){b=!1;break}b&&this.ad()}}wc(b){this.G.Na.Ab()||(this.Em(b),this.Ti(b,!this.Y()))}Vg(){return this.Y()?super.Vg():'Subscription is not ready!'}Rf(){const b=olympe.D.bb(this.Od());return olympe.dc.query.Subscription.F(b,this.Cg())}static F(b,c){var d=new olympe.dc.kf(b,olympe.dc.Ed.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.X.Sb||g instanceof olympe.dc.X.Fc)b.forEach(h=>{const k=olympe.dc.query.Relation.from(g);h.sb(k,k.recursive)});
597
- else if(g instanceof olympe.dc.X.wf)d=a.F(olympe.D.bb(g.Od()),g.Cg()),b.push(...d);else if(g instanceof olympe.dc.X.vc||g instanceof olympe.dc.X.Kd){const h=g.F();b.forEach(k=>{for(const l of h){for(const n of l)k.sb(n,n.recursive);re(k,l.length)}})}}return b}};olympe.dc.query.Subscription.C={INIT:0,Qq:1,xq:2};olympe.dc.query.Subscription.prototype.Vg.K=olympe.D.J.C;function Jf(a,b){return a.F.has(b)?a.F.get(b).F():null}function Kf(a,b,c){return Vf(a,a.F,b,c)}function If(a,b){for(const [c,d]of a.L)if(d.has(b))return c;return null}function Ff(a,b){return a.C.has(b)?a.C.get(b).F():null}function Gf(a,b,c,d){const e=b.Z();let f=a.C.get(e);void 0===f&&(f=new olympe.dc.query.ta.mt(b,a.U,a),a.C.set(e,f));f.L(c);Wf(a,e,d)}function Hf(a,b,c){return Vf(a,a.C,b,c)}function Rf(a,b){return(a=a.C.get(b))?Array.from(a.C.keys()):[]}
598
+ else if(g instanceof olympe.dc.X.wf)d=a.F(olympe.D.bb(g.Od()),g.Cg()),b.push(...d);else if(g instanceof olympe.dc.X.vc||g instanceof olympe.dc.X.Kd){const h=g.F();b.forEach(k=>{for(const l of h){for(const n of l)k.sb(n,n.recursive);re(k,l.length)}})}}return b}};olympe.dc.query.Subscription.C={INIT:0,Rq:1,yq:2};olympe.dc.query.Subscription.prototype.Vg.K=olympe.D.J.C;function Jf(a,b){return a.F.has(b)?a.F.get(b).F():null}function Kf(a,b,c){return Vf(a,a.F,b,c)}function If(a,b){for(const [c,d]of a.L)if(d.has(b))return c;return null}function Ff(a,b){return a.C.has(b)?a.C.get(b).F():null}function Gf(a,b,c,d){const e=b.Z();let f=a.C.get(e);void 0===f&&(f=new olympe.dc.query.ta.nt(b,a.U,a),a.C.set(e,f));f.L(c);Wf(a,e,d)}function Hf(a,b,c){return Vf(a,a.C,b,c)}function Rf(a,b){return(a=a.C.get(b))?Array.from(a.C.keys()):[]}
598
599
  function Sf(a,b){return(a=a.F.get(b))?Array.from(a.C.keys()):[]}function Tf(a,b){const c=new Set;(a.L.get(b)||new Set).forEach(d=>{(d=a.C.get(d))&&c.add(d.F())});return c}function Uf(a,b){const c=new Set;(a.L.get(b)||new Set).forEach(d=>{(d=a.F.get(d))&&c.add(d.F())});return c}function Xf(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}
599
- function Wf(a,b,c){let d=a.L.get(c);d?d.add(b):(d=(new Set).add(b),a.L.set(c,d))}function Yf(a,b,c){var d=olympe.dc.Ga.rb;const e=b.Z();let f=a.F.get(e);void 0===f&&(f=new olympe.dc.query.ta.du(b,a.U),a.F.set(e,f));f.L(c);Wf(a,e,d)}function Vf(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=If(a,c))&&a.L.get(d).delete(c),e.F().release(),b.delete(c),!0):0===e.C.get(d)}
600
- function Zf(a,b){const c=b.Z();let d=a.G.get(c);d||(d=new olympe.dc.query.ta.Cu(b),a.G.set(c,d));d.counter++;return d}function $f(a){a.G.forEach(b=>b.update())}function ag(a,b,c){const d=a.C.get(b);d?c instanceof olympe.dc.query.Subscription?bg(d,c):cg(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.Xu=class{constructor(a,b){this.N=a;this.C=new Map;this.F=new Map;this.G=new Map;this.Y=new Set;this.L=new Map;this.U=b}};olympe.dc.$c=class{ma(){}Yb(){}getTransform(){}ia(){}toString(){}};olympe.dc.sq=class{F(){}};olympe.dc.yf=class{ma(){}getValue(){}C(){}ia(){}toString(){}};olympe.dc.query.P={Ea:'olympe.dc.query.Logger',xa:'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',dk:'olympe.dc.query.ListNotificationProcessor',uq:'olympe.dc.query.QueryProcessor',vl:'olympe.dc.query.CoverageProcessor'};olympe.dc.query.Config={Rq:'subscription.debug'};
601
- olympe.T.config(function(a){D(a,olympe.dc.query.Config.Rq,!1);C(a,olympe.dc.query.P.Ea,[olympe.ra.P.xa],b=>b.Rc('dc.query'));A(a,olympe.dc.query.Mb.Pe,olympe.dc.query.Xu,olympe.dc.query.P.Ea,new olympe.T.fa(olympe.dc.query.Config.Rq));A(a,olympe.dc.query.Mb.Jj,olympe.dc.query.Js,olympe.dc.query.P.Ea);A(a,olympe.dc.query.Mb.Fp,olympe.dc.query.Wb.Np,olympe.dc.query.P.Ea,olympe.dc.P.vi,olympe.dc.query.Mb.Pe,olympe.dc.query.Mb.vl,olympe.dc.transaction.P.xa,new olympe.T.fa(olympe.dc.Config.$g));A(a,olympe.dc.query.Mb.bp,
602
- olympe.dc.query.Wb.ip,olympe.dc.query.P.Ea,olympe.dc.query.Mb.Pe,new olympe.T.fa(olympe.dc.Config.$g));A(a,olympe.dc.query.Mb.cp,olympe.dc.query.Wb.jp,olympe.dc.query.P.Ea,olympe.dc.query.Mb.Pe,olympe.dc.query.Mb.Jj);A(a,olympe.dc.query.Mb.ap,olympe.dc.query.Wb.hp,olympe.dc.query.P.Ea,olympe.dc.query.Mb.Pe);A(a,olympe.dc.query.Mb.dk,olympe.dc.query.Wb.Mp,olympe.dc.query.P.Ea,olympe.dc.P.vi,olympe.dc.query.Mb.Pe);A(a,olympe.dc.query.Mb.uq,olympe.dc.query.Wb.Du,olympe.dc.query.P.Ea,olympe.dc.query.Mb.Pe,
603
- olympe.dc.query.Mb.vl,olympe.dc.query.Mb.Jj,olympe.dc.P.me,olympe.dc.db.P.xa);A(a,olympe.dc.query.Mb.vl,olympe.dc.query.Wb.Ms,olympe.dc.query.P.Ea,olympe.dc.query.Mb.Pe,olympe.dc.transaction.P.xa);C(a,olympe.dc.query.P.xa,[olympe.dc.query.P.Ea,new olympe.T.fa(olympe.dc.Config.$g),olympe.dc.P.me,olympe.dc.db.P.xa,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.dk,olympe.dc.query.Mb.uq],(b,c,d,e,f,
604
- g,h,k,l,n,p,q)=>new olympe.dc.query.Bu(b,c,d,e,f,g,[h,k,l,n,p],q))});olympe.T.run([olympe.dc.query.Mb.Pe],a=>{olympe.gj().subscriptions=a});olympe.dc.query.ta={};function dg(){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')}
605
- olympe.dc.query.ta.$q=class{constructor(a,b){this.C=new Map;this.G=new Map;this.U=a;this.ka=b}F(){}L(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 bg(a,b){const c=b.Z();a.Y.set(c,b);olympe.D.Ja().onDestroy(()=>{a.Y.delete(c)})}function cg(a,b){const c=b.Z();a.aa.set(c,b);olympe.D.Ja().onDestroy(()=>{a.aa.delete(c)})}olympe.dc.query.ta.mt=class extends olympe.dc.query.ta.$q{constructor(a,b,c){super(a,b);this.ta=c;this.Y=new Map;this.aa=new Map;b&&dg()}F(){return this.U}};olympe.dc.query.ta.du=class extends olympe.dc.query.ta.$q{constructor(a,b){super(a,b);this.Y=new Map}F(){return this.U}L(a){super.L(a);if(this.ka){const b='md_'+olympe.W.fc();this.Y.set(b,dg());olympe.D.Ja().onDestroy(()=>{this.Y.delete(b)})}}};function eg(a,b){let c;a.C!==b&&(null==(c=a.C)?void 0:c.hash)!==b.hash&&(a.C=b,fg(a,!1),a.G.forEach(d=>d(b)))}function fg(a,b){var c=se(a.query);if(c!==olympe.dc.Ga.rb&&c!==olympe.dc.Ga.Pc){var d;c=null!=(d=a.C)?d:olympe.dc.Va.empty();Oc(a.U,null,b?ze(c):Ae(c))}}function gg(a,b){const c=a.Y++;a.G.set(c,b);a.C&&b(a.C);return()=>a.G.delete(c)}
606
- olympe.dc.query.ta.Cu=class{constructor(a){this.query=a;this.U=olympe.dc.Ad();this.id=a.Z();this.C=null;this.F=new olympe.dc.ba.qq(a);this.counter=this.Y=0;this.G=new Map;this.L=[]}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.Va.empty();b=olympe.dc.Va.from(a,this.F);eg(this,b)}}onDestroy(a){this.L.push(a)}destroy(){fg(this,!0);this.L.forEach(a=>a())}};olympe.dc.query.Wb={};function hg(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.ng(olympe.D.Ja()),g=k=>{f.add((l,n)=>{k.hb(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()});ag(a.ta,k.Z(),c)})},h=Array.from(Tf(a.ta,olympe.dc.Ga.Pc));b.forEach(k=>{const l=cf(k);let n=!1;for(let p=0,q=h.length;p<q;p++){const r=h[p];if(r.Hr(l)){g(r.ph,!1);
607
- 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 ig(a,b,c){const d=[b.Od()],e=g=>g instanceof olympe.dc.X.wf,f=(b.Cg()||[]).filter(e);for(const g of f)d.push(g.Od()),f.push(...(g.Cg()||[]).filter(e));ke(a.C,()=>{olympe.D.Ec(d,()=>{const g=b.Rf();hg(a,g,b,b.Z(),c)})})}function jg(a,b,c,d){const e=b.Z(),f=[qe(b,c)];ke(a.C,()=>hg(a,f,b,e,d))}olympe.dc.query.Wb.Ms=class{constructor(a,b,c){this.N=a;this.ta=b;this.C=c}};olympe.dc.query.Wb.hp=class{constructor(a,b){this.N=a;this.ta=b}process(a,b,c){const d=b.Z();this.ta.C.has(d)?(Ff(this.ta,d).oa(b),olympe.dc.Ad().$e(b.data,a),c(null,b)):c(Error(`Received a notification for the graphdef ${d} which does not exist.`),b)}};olympe.dc.query.Wb.hp.la=[olympe.dc.og];olympe.dc.query.Wb.ip=class{constructor(a,b,c){this.N=a;this.ta=b;this.C=c}process(a,b,c){var d=b.Z();if(a===olympe.dc.Ga.rb||this.ta.C.has(d)){if(c(null,b),a=Ff(this.ta,d),this.C||a&&a.L)a=olympe.dc.Ga.rb,d=new olympe.dc.query.Ci(d,a,a,new olympe.dc.db.Ac),Mf(olympe.dc.Nf(),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.Wb.ip.la=[olympe.dc.og];olympe.dc.query.Wb.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=Ff(this.C,d);if(b instanceof olympe.dc.query.errors.Xj)Hf(this.C,d,a);else if(!f.L){f.ka(b);const g=olympe.dc.Ad();Oc(g,f.Y());g.$e(b.Dc,b.destination);f.onDestroy(()=>{Oc(g,null,f.Y())});mf(f)}}let e;b instanceof olympe.dc.query.errors.Xj&&(e=`graph subscription "${d}" failed to create the initial result: ${b.aa()}`,this.N.error(e));Se(this.F,b.Z(),b);c(e?Error(e):null,
600
+ function Wf(a,b,c){let d=a.L.get(c);d?d.add(b):(d=(new Set).add(b),a.L.set(c,d))}function Yf(a,b,c){var d=olympe.dc.Ga.rb;const e=b.Z();let f=a.F.get(e);void 0===f&&(f=new olympe.dc.query.ta.eu(b,a.U),a.F.set(e,f));f.L(c);Wf(a,e,d)}function Vf(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=If(a,c))&&a.L.get(d).delete(c),e.F().release(),b.delete(c),!0):0===e.C.get(d)}
601
+ function Zf(a,b){const c=b.Z();let d=a.G.get(c);d||(d=new olympe.dc.query.ta.Du(b),a.G.set(c,d));d.counter++;return d}function $f(a){a.G.forEach(b=>b.update())}function ag(a,b,c){const d=a.C.get(b);d?c instanceof olympe.dc.query.Subscription?bg(d,c):cg(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.Yu=class{constructor(a,b){this.N=a;this.C=new Map;this.F=new Map;this.G=new Map;this.Y=new Set;this.L=new Map;this.U=b}};olympe.dc.$c=class{ma(){}Yb(){}getTransform(){}ia(){}toString(){}};olympe.dc.tq=class{F(){}};olympe.dc.yf=class{ma(){}getValue(){}C(){}ia(){}toString(){}};olympe.dc.query.P={Ea:'olympe.dc.query.Logger',xa:'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',Gp:'olympe.dc.query.ListProcessor',dk:'olympe.dc.query.ListNotificationProcessor',vq:'olympe.dc.query.QueryProcessor',vl:'olympe.dc.query.CoverageProcessor'};olympe.dc.query.Config={Sq:'subscription.debug'};
602
+ olympe.T.config(function(a){D(a,olympe.dc.query.Config.Sq,!1);C(a,olympe.dc.query.P.Ea,[olympe.ra.P.xa],b=>b.Rc('dc.query'));A(a,olympe.dc.query.Mb.Pe,olympe.dc.query.Yu,olympe.dc.query.P.Ea,new olympe.T.fa(olympe.dc.query.Config.Sq));A(a,olympe.dc.query.Mb.Jj,olympe.dc.query.Ks,olympe.dc.query.P.Ea);A(a,olympe.dc.query.Mb.Gp,olympe.dc.query.Wb.Op,olympe.dc.query.P.Ea,olympe.dc.P.vi,olympe.dc.query.Mb.Pe,olympe.dc.query.Mb.vl,olympe.dc.transaction.P.xa,new olympe.T.fa(olympe.dc.Config.$g));A(a,olympe.dc.query.Mb.bp,
603
+ olympe.dc.query.Wb.ip,olympe.dc.query.P.Ea,olympe.dc.query.Mb.Pe,new olympe.T.fa(olympe.dc.Config.$g));A(a,olympe.dc.query.Mb.cp,olympe.dc.query.Wb.jp,olympe.dc.query.P.Ea,olympe.dc.query.Mb.Pe,olympe.dc.query.Mb.Jj);A(a,olympe.dc.query.Mb.ap,olympe.dc.query.Wb.hp,olympe.dc.query.P.Ea,olympe.dc.query.Mb.Pe);A(a,olympe.dc.query.Mb.dk,olympe.dc.query.Wb.Np,olympe.dc.query.P.Ea,olympe.dc.P.vi,olympe.dc.query.Mb.Pe);A(a,olympe.dc.query.Mb.vq,olympe.dc.query.Wb.Eu,olympe.dc.query.P.Ea,olympe.dc.query.Mb.Pe,
604
+ olympe.dc.query.Mb.vl,olympe.dc.query.Mb.Jj,olympe.dc.P.me,olympe.dc.db.P.xa);A(a,olympe.dc.query.Mb.vl,olympe.dc.query.Wb.Ns,olympe.dc.query.P.Ea,olympe.dc.query.Mb.Pe,olympe.dc.transaction.P.xa);C(a,olympe.dc.query.P.xa,[olympe.dc.query.P.Ea,new olympe.T.fa(olympe.dc.Config.$g),olympe.dc.P.me,olympe.dc.db.P.xa,olympe.dc.query.Mb.Pe,olympe.dc.query.Mb.Jj,olympe.dc.query.Mb.Gp,olympe.dc.query.Mb.bp,olympe.dc.query.Mb.cp,olympe.dc.query.Mb.ap,olympe.dc.query.Mb.dk,olympe.dc.query.Mb.vq],(b,c,d,e,f,
605
+ g,h,k,l,n,p,q)=>new olympe.dc.query.Cu(b,c,d,e,f,g,[h,k,l,n,p],q))});olympe.T.run([olympe.dc.query.Mb.Pe],a=>{olympe.gj().subscriptions=a});olympe.dc.query.ta={};function dg(){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')}
606
+ olympe.dc.query.ta.ar=class{constructor(a,b){this.C=new Map;this.G=new Map;this.U=a;this.ja=b}F(){}L(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 bg(a,b){const c=b.Z();a.Y.set(c,b);olympe.D.Ja().onDestroy(()=>{a.Y.delete(c)})}function cg(a,b){const c=b.Z();a.aa.set(c,b);olympe.D.Ja().onDestroy(()=>{a.aa.delete(c)})}olympe.dc.query.ta.nt=class extends olympe.dc.query.ta.ar{constructor(a,b,c){super(a,b);this.ta=c;this.Y=new Map;this.aa=new Map;b&&dg()}F(){return this.U}};olympe.dc.query.ta.eu=class extends olympe.dc.query.ta.ar{constructor(a,b){super(a,b);this.Y=new Map}F(){return this.U}L(a){super.L(a);if(this.ja){const b='md_'+olympe.W.fc();this.Y.set(b,dg());olympe.D.Ja().onDestroy(()=>{this.Y.delete(b)})}}};function eg(a,b){let c;a.C!==b&&(null==(c=a.C)?void 0:c.hash)!==b.hash&&(a.C=b,fg(a,!1),a.G.forEach(d=>d(b)))}function fg(a,b){var c=se(a.query);if(c!==olympe.dc.Ga.rb&&c!==olympe.dc.Ga.Pc){var d;c=null!=(d=a.C)?d:olympe.dc.Va.empty();Oc(a.U,null,b?ze(c):Ae(c))}}function gg(a,b){const c=a.Y++;a.G.set(c,b);a.C&&b(a.C);return()=>a.G.delete(c)}
607
+ olympe.dc.query.ta.Du=class{constructor(a){this.query=a;this.U=olympe.dc.Ad();this.id=a.Z();this.C=null;this.F=new olympe.dc.ba.rq(a);this.counter=this.Y=0;this.G=new Map;this.L=[]}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.Va.empty();b=olympe.dc.Va.from(a,this.F);eg(this,b)}}onDestroy(a){this.L.push(a)}destroy(){fg(this,!0);this.L.forEach(a=>a())}};olympe.dc.query.Wb={};function hg(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.ng(olympe.D.Ja()),g=k=>{f.add((l,n)=>{k.hb(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()});ag(a.ta,k.Z(),c)})},h=Array.from(Tf(a.ta,olympe.dc.Ga.Pc));b.forEach(k=>{const l=cf(k);let n=!1;for(let p=0,q=h.length;p<q;p++){const r=h[p];if(r.Ir(l)){g(r.ph,!1);
608
+ 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 ig(a,b,c){const d=[b.Od()],e=g=>g instanceof olympe.dc.X.wf,f=(b.Cg()||[]).filter(e);for(const g of f)d.push(g.Od()),f.push(...(g.Cg()||[]).filter(e));ke(a.C,()=>{olympe.D.Ec(d,()=>{const g=b.Rf();hg(a,g,b,b.Z(),c)})})}function jg(a,b,c,d){const e=b.Z(),f=[qe(b,c)];ke(a.C,()=>hg(a,f,b,e,d))}olympe.dc.query.Wb.Ns=class{constructor(a,b,c){this.N=a;this.ta=b;this.C=c}};olympe.dc.query.Wb.hp=class{constructor(a,b){this.N=a;this.ta=b}process(a,b,c){const d=b.Z();this.ta.C.has(d)?(Ff(this.ta,d).oa(b),olympe.dc.Ad().$e(b.data,a),c(null,b)):c(Error(`Received a notification for the graphdef ${d} which does not exist.`),b)}};olympe.dc.query.Wb.hp.la=[olympe.dc.og];olympe.dc.query.Wb.ip=class{constructor(a,b,c){this.N=a;this.ta=b;this.C=c}process(a,b,c){var d=b.Z();if(a===olympe.dc.Ga.rb||this.ta.C.has(d)){if(c(null,b),a=Ff(this.ta,d),this.C||a&&a.L)a=olympe.dc.Ga.rb,d=new olympe.dc.query.Ci(d,a,a,new olympe.dc.db.Ac),Mf(olympe.dc.Nf(),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.Wb.ip.la=[olympe.dc.og];olympe.dc.query.Wb.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=Ff(this.C,d);if(b instanceof olympe.dc.query.errors.Xj)Hf(this.C,d,a);else if(!f.L){f.ja(b);const g=olympe.dc.Ad();Oc(g,f.Y());g.$e(b.Dc,b.destination);f.onDestroy(()=>{Oc(g,null,f.Y())});mf(f)}}let e;b instanceof olympe.dc.query.errors.Xj&&(e=`graph subscription "${d}" failed to create the initial result: ${b.aa()}`,this.N.error(e));Se(this.F,b.Z(),b);c(e?Error(e):null,
608
609
  b)}};olympe.dc.query.Wb.jp.la=[olympe.dc.og];const kg=[],lg=new Map;function mg(a,b,c,d){tc(a.db,d,e=>{e?b.Eg(c)?a.N.warn('Adding the same index twice (should never happen) for sub #'+b.Z()+', index #'+c+', tag #'+d):b.ac(c,d):ng(a,b,c,d)},c)}function ng(a,b,c,d){uc(a.db,d,c,!0);b.wc(c);kg.length=0;b.Lc(function(e,f){kg[e]=f});c=a=0;for(d=kg.length;a<d;a++)'string'===typeof kg[a]&&(kg[c++]=kg[a]);kg.length=c;b.Lb(kg)}
609
- olympe.dc.query.Wb.Mp=class{constructor(a,b,c){this.N=a;this.db=b;this.ta=c}process(a,b,c){const d=b.Z();a=b.C;const e=Jf(this.ta,d);if(null===e)c(Error(`Received list notification for undefined subscription "${d}"`),b);else{kg.length=a.length;e.Lc((f,g)=>{if(f=e.lh(g)){f=f.R();var h=lg.get(f);void 0===h?lg.set(f,g):'string'===typeof h?lg.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.')});
610
- for(let f=0,g=a.length;f<g;f++){const h=a[f];let k=lg.get(h);void 0===k?(k=olympe.W.fc(),mg(this,e,k,h)):'string'===typeof k?lg.delete(h):(k=k.pop(),0===k.length&&lg.delete(h));kg[f]=k}for(const [f,g]of lg){if('string'===typeof g)ng(this,e,g,f);else for(let h=0,k=g.length;h<k;h++)ng(this,e,g[h],f);lg.delete(f)}e.Lb(kg);c(null,b)}}};olympe.dc.query.Wb.Mp.la=[olympe.dc.og];function og(a,b,c,d){const e=c.Z();a.N.debug('ListProcessor: [ID:',e,'] - processing with source ',b);Yf(a.ta,c,b);if(Xf(a.ta,e,olympe.dc.Ga.rb))a.N.debug('ListProcessor: [ID:',e,'] - id already processed');else{a.N.debug('ListProcessor: [ID:',e,'] - NOT processed yet.');const f=c.yd();a.F||f===olympe.dc.Ga.rb?(a.N.debug('QueryMGR: [ID:',e,'] - Local subscription, no need for coverage check, booting subscription '),pg(a,c)):c.Dh().run(()=>{ig(a.C,c,g=>{g?a.N.error(g):pg(a,c)})})}b===olympe.dc.Ga.rb||
610
+ olympe.dc.query.Wb.Np=class{constructor(a,b,c){this.N=a;this.db=b;this.ta=c}process(a,b,c){const d=b.Z();a=b.C;const e=Jf(this.ta,d);if(null===e)c(Error(`Received list notification for undefined subscription "${d}"`),b);else{kg.length=a.length;e.Lc((f,g)=>{if(f=e.lh(g)){f=f.R();var h=lg.get(f);void 0===h?lg.set(f,g):'string'===typeof h?lg.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.')});
611
+ for(let f=0,g=a.length;f<g;f++){const h=a[f];let k=lg.get(h);void 0===k?(k=olympe.W.fc(),mg(this,e,k,h)):'string'===typeof k?lg.delete(h):(k=k.pop(),0===k.length&&lg.delete(h));kg[f]=k}for(const [f,g]of lg){if('string'===typeof g)ng(this,e,g,f);else for(let h=0,k=g.length;h<k;h++)ng(this,e,g[h],f);lg.delete(f)}e.Lb(kg);c(null,b)}}};olympe.dc.query.Wb.Np.la=[olympe.dc.og];function og(a,b,c,d){const e=c.Z();a.N.debug('ListProcessor: [ID:',e,'] - processing with source ',b);Yf(a.ta,c,b);if(Xf(a.ta,e,olympe.dc.Ga.rb))a.N.debug('ListProcessor: [ID:',e,'] - id already processed');else{a.N.debug('ListProcessor: [ID:',e,'] - NOT processed yet.');const f=c.yd();a.F||f===olympe.dc.Ga.rb?(a.N.debug('QueryMGR: [ID:',e,'] - Local subscription, no need for coverage check, booting subscription '),pg(a,c)):c.Dh().run(()=>{ig(a.C,c,g=>{g?a.N.error(g):pg(a,c)})})}b===olympe.dc.Ga.rb||
611
612
  Xf(a.ta,e,b)||a.notify(b,c);d(null,c)}
612
- function pg(a,b){if(b.Y())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.rc.Zq(a.db,a.N),d=qg(a,b,c),e=b.Z();b.Dh().run(()=>{olympe.D.Ec([b.Od()],f=>{const g=olympe.dc.wa(f);a.N.debug('ListProcessor: [ID:',b.Z(),'] - Booting with baseTag',g);b.sh()||b.gi();tc(a.db,g,h=>d(h,g),e);olympe.D.Ja().zc(()=>uc(a.db,g,e));a.db.Eb(g.valueOf())||rg(c);b.Y()||(rg(c),b.Lb([]))})})}}
613
+ function pg(a,b){if(b.Y())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.rc.$q(a.db,a.N),d=qg(a,b,c),e=b.Z();b.Dh().run(()=>{olympe.D.Ec([b.Od()],f=>{const g=olympe.dc.wa(f);a.N.debug('ListProcessor: [ID:',b.Z(),'] - Booting with baseTag',g);b.sh()||b.gi();tc(a.db,g,h=>d(h,g),e);olympe.D.Ja().zc(()=>uc(a.db,g,e));a.db.Eb(g.valueOf())||rg(c);b.Y()||(rg(c),b.Lb([]))})})}}
613
614
  function qg(a,b,c){const d=new olympe.dc.rc.Hj;let e=!1;const f=b.Dh(),g=b.Cg(),h=[];h[g?g.length:0]=f.C((k,l,n,p)=>{f.G()||f.Ab()||(k?b.Eg(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.ac(n,l)):(a.N.debug('ListProcessor: [ID:',b.Z(),'] - Removing Instance',l,'from the subscription'),b.wc(n)),e||(sg(c,()=>{p.tg();rg(c)}),p.Tc().Lg(b.Lb.bind(b)),e=!0),
614
615
  tg(c,n))});if(null!==g){const k=olympe.dc.Tc();for(let l=g.length-1;0<=l;l--)h[l]=f.C(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,ug(p,k,l,n))}}
615
- olympe.dc.query.Wb.Np=class{constructor(a,b,c,d,e,f){this.N=a;this.db=b;this.ta=c;this.C=d;this.F=f}process(a,b,c){og(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.ce(g=>f.F(g));Of(olympe.dc.Nf(),f)};let e=!1;b.forEach(()=>{e&&d()});b.Ke(()=>{e=!0;d()})}};olympe.dc.query.Wb.Np.la=[olympe.dc.og];function Ef(a,b,c){const d=b.Z(),e=se(b),f=a.ta.G.has(d),g=Zf(a.ta,b);return new rxjs.Observable(h=>{const k=gg(g,h.next.bind(h)),l=()=>{k();n&&c.Lc(n);{var p=a.ta;const r=p.G.get(d);var q;if(q=r)q=r,0<q.counter?q.counter--:olympe.ra.Xa('dc').warn('Try to decrement counter of query metadata below 0. Investigate...'),q=0===q.counter;q&&(r.destroy(),p.G.delete(d),p.Y.delete(d))}},n=c.zc(l);if(!f)if(e===olympe.dc.Ga.Pc)jg(a.L,b,!0,p=>{p?(h.error(p),l()):vg(a,d,b,g)});else if(e===olympe.dc.Ga.rb)vg(a,
616
- d,b,g);else{const p=M(wc(new olympe.dc.ga(olympe.dc.ga.ja.qm,b,[e]),c),q=>{q&&(h.error(q.message),l())});a.G.send(p)}return l})}
617
- function wg(a){const b=olympe.dc.ga.ja.pm,c=(d,e)=>Ce(d,f=>{Oc(a.F,Array.from(f.ee()).filter(g=>g.re()).map(g=>g.tag()));a.F.$e(f,e)},e);a.G.C(olympe.dc.ga.ja.QUERY_RESULT,(d,{i:e,r:f,s:g})=>{d=c(f,g);null===d?(d=a.C,Re(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,Re(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;
616
+ olympe.dc.query.Wb.Op=class{constructor(a,b,c,d,e,f){this.N=a;this.db=b;this.ta=c;this.C=d;this.F=f}process(a,b,c){og(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));Of(olympe.dc.Nf(),f)};let e=!1;b.forEach(()=>{e&&d()});b.Ke(()=>{e=!0;d()})}};olympe.dc.query.Wb.Op.la=[olympe.dc.og];function Ef(a,b,c){const d=b.Z(),e=se(b),f=a.ta.G.has(d),g=Zf(a.ta,b);return new rxjs.Observable(h=>{const k=gg(g,h.next.bind(h)),l=()=>{k();n&&c.Lc(n);{var p=a.ta;const r=p.G.get(d);var q;if(q=r)q=r,0<q.counter?q.counter--:olympe.ra.Xa('dc').warn('Try to decrement counter of query metadata below 0. Investigate...'),q=0===q.counter;q&&(r.destroy(),p.G.delete(d),p.Y.delete(d))}},n=c.zc(l);if(!f)if(e===olympe.dc.Ga.Pc)jg(a.L,b,!0,p=>{p?(h.error(p),l()):vg(a,d,b,g)});else if(e===olympe.dc.Ga.rb)vg(a,
617
+ d,b,g);else{const p=M(wc(new olympe.dc.ga(olympe.dc.ga.ka.qm,b,[e]),c),q=>{q&&(h.error(q.message),l())});a.G.send(p)}return l})}
618
+ function wg(a){const b=olympe.dc.ga.ka.pm,c=(d,e)=>Ce(d,f=>{Oc(a.F,Array.from(f.ee()).filter(g=>g.re()).map(g=>g.tag()));a.F.$e(f,e)},e);a.G.C(olympe.dc.ga.ka.QUERY_RESULT,(d,{i:e,r:f,s:g})=>{d=c(f,g);null===d?(d=a.C,Re(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,Re(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
619
  null==(h=a.ta.G.get(e))||eg(h,d)}});Nc(a.F,()=>$f(a.ta))}function vg(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=tc(k,l,(p,q)=>{p?h.insert(q,0,null):h.remove(q,0,null);e(p,q,null,b)});d.onDestroy(()=>uc(k,l,n));Ge(h);d.update()}
619
- olympe.dc.query.Wb.Du=class{constructor(a,b,c,d,e,f){this.N=a;this.ta=b;this.L=c;this.C=d;this.G=e;this.F=f;wg(this)}hb(a,b){return new Promise((c,d)=>{var e=se(a);if(e===olympe.dc.Ga.Pc)jg(this.L,a,!1,f=>{f?d(f):c(this.jd(a))});else if(e===olympe.dc.Ga.rb)c(this.jd(a));else{const f=a.Z(),g=this.C.C.has(f),h=l=>{var n=this.C;Qe(n,f,n.G);d(l||`The execution of the query ${f} has been interrupted`)},k=b.zc(h);Te(this.C,f,(l,n)=>{b.Lc(k);l?d(l.message):(b.zc(()=>{Oc(this.F,null,ze(n))}),c(n))});g||(e=
620
- M(wc(new olympe.dc.ga(olympe.dc.ga.ja.om,a,[e]),b),l=>l&&h(l.message)),this.G.send(e))}})}jd(a){const b=new olympe.dc.ba.qq(a);b.insert(a.G,0,null);let c=0;for(const d of a.C)d.hb(b,c),c=d.F(c);return olympe.dc.Va.from(olympe.dc.Va.empty(),b)}};olympe.dc.query.errors={};olympe.dc.query.errors.Xj=class extends olympe.dc.query.Ci{constructor(a,b,c,d){super(a,b,c,new olympe.dc.db.Ac);this.error=d}aa(){return this.error}};olympe.dc.rc={};function ug(a,b,c,d){b?a.U[d]=c:delete a.U[d];null===a.F&&(a.F=new olympe.dc.rc.Oj(a.C,a));return a.F}function xg(a,b){for(let c=0;c<b;c++)if(null!==a.F)a=a.F;else break;return a}function yg(a,b){a=a.U;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.rc.Oj=class{constructor(a,b){this.C=a;this.parent=b||null;this.aa=b?b.aa+1:0;this.U=Object.create(null);this.F=null}Tc(){return this.C}tg(){this.C.U()?this.C.G():this.C.aa(this.aa-1)}};olympe.dc.rc.sa=class{constructor(){}C(){}U(){}aa(){}G(){}Lg(){}};olympe.dc.rc.Hj=class{constructor(){this.Y=this.L=this.index=this.F=null}U(){return null!==this.F}aa(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}C(a,b,c){b=this.L;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.rc.Oj(this),this.index=c,this.L=b):this.L=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.Y){const a=
620
+ olympe.dc.query.Wb.Eu=class{constructor(a,b,c,d,e,f){this.N=a;this.ta=b;this.L=c;this.C=d;this.G=e;this.F=f;wg(this)}hb(a,b){return new Promise((c,d)=>{var e=se(a);if(e===olympe.dc.Ga.Pc)jg(this.L,a,!1,f=>{f?d(f):c(this.jd(a))});else if(e===olympe.dc.Ga.rb)c(this.jd(a));else{const f=a.Z(),g=this.C.C.has(f),h=l=>{var n=this.C;Qe(n,f,n.G);d(l||`The execution of the query ${f} has been interrupted`)},k=b.zc(h);Te(this.C,f,(l,n)=>{b.Lc(k);l?d(l.message):(b.zc(()=>{Oc(this.F,null,ze(n))}),c(n))});g||(e=
621
+ M(wc(new olympe.dc.ga(olympe.dc.ga.ka.om,a,[e]),b),l=>l&&h(l.message)),this.G.send(e))}})}jd(a){const b=new olympe.dc.ba.rq(a);b.insert(a.G,0,null);let c=0;for(const d of a.C)d.hb(b,c),c=d.F(c);return olympe.dc.Va.from(olympe.dc.Va.empty(),b)}};olympe.dc.query.errors={};olympe.dc.query.errors.Xj=class extends olympe.dc.query.Ci{constructor(a,b,c,d){super(a,b,c,new olympe.dc.db.Ac);this.error=d}aa(){return this.error}};olympe.dc.rc={};function ug(a,b,c,d){b?a.U[d]=c:delete a.U[d];null===a.F&&(a.F=new olympe.dc.rc.Oj(a.C,a));return a.F}function xg(a,b){for(let c=0;c<b;c++)if(null!==a.F)a=a.F;else break;return a}function yg(a,b){a=a.U;if(null!==a)for(let c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.push(c)}olympe.dc.rc.Oj=class{constructor(a,b){this.C=a;this.parent=b||null;this.aa=b?b.aa+1:0;this.U=Object.create(null);this.F=null}Tc(){return this.C}tg(){this.C.U()?this.C.G():this.C.aa(this.aa-1)}};olympe.dc.rc.sa=class{constructor(){}C(){}U(){}aa(){}G(){}Lg(){}};olympe.dc.rc.Hj=class{constructor(){this.Y=this.L=this.index=this.F=null}U(){return null!==this.F}aa(a){if(null!==this.F)throw Error('Manager already activated (depth='+this.F+')');this.F=a;this.G()}C(a,b,c){b=this.L;if(a&&null!==b)throw Error('The AutoManger handles only a single item.');a?(b=new olympe.dc.rc.Oj(this),this.index=c,this.L=b):this.L=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.Y){const a=
621
622
  [];null!==this.L&&(0<=this.F?yg(xg(this.L,this.F),a):a.push(this.index));this.Y(a)}}Lg(a){this.Y=a}};olympe.dc.rc.Hj.la=[olympe.dc.rc.sa];function zg(a,b){olympe.D.Vf(a.value)?(a.node=olympe.D.el(a.value,b),Va(a.node)||b()):b()}function Ag(a,b){if(olympe.D.Vf(a.value)){const c=olympe.D.Ja(),d=a.L;olympe.D.Ec([a.value],e=>{d!==e.valueOf()&&(c.run(()=>zg(a,b)),olympe.D.Ja().destroy())})}}
622
623
  class Bg extends olympe.dc.rc.Oj{constructor(a,b,c){super(a);this.index=b;this.value=c;this.L=this.bb();this.position=this.node=null;this.Y=!1;this.G=null}bb(){const a=olympe.D.bb(this.value);return a?a.valueOf():a}destroy(){this.node&&(this.node.destroy(),this.node=null);this.G=this.value=null}Ab(){return null===this.value}}
623
624
  function Cg(a,b){if(!b.Ab()){var c=a.F;const d=a.Da,e=b.bb();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].L,e);if(0===k||2>g-f){0>k&&null!==b.position&&b.position<=h&&(k=d(c[g].L,e));h=0>k?g:h;break}0>k?f=h:g=h}c=h;b.L=b.bb();c!==b.position&&(a.insert(b,c),b.Y&&a.G())}}function Dg(a){const b=a.Da;a.F.sort((c,d)=>b(c.bb(),d.bb()))}
624
- olympe.dc.rc.Yq=class{constructor(a){this.Da=a;this.L=null;this.F=[];this.Y=[];this.ka=null;this.oa=new Map}C(a,b,c,d){b='$'+c;const e=this.F;let f;if(a)f=new Bg(this,c,d),this.oa.set(b,f),this.U()?zg(f,()=>Cg(this,f)):(f.position=e.length,e.push(f));else{f=this.oa.get(b);if(void 0===f)throw Error('Trying to remove an non-registered item: "'+c+'"');this.oa.delete(b);null!==f.position&&(this.U()?this.remove(f):delete e[f.position]);f.destroy()}return f}U(){return null!==this.L}aa(a){if(null!==this.L)throw Error('Manager already activated (depth='+
625
- this.L+')');this.L=a;Dg(this);for(let b=0,c=this.F.length;b<c;b++){const d=this.F[b];d.position=b;Ag(d,()=>Cg(this,d))}this.G()}G(){if(null===this.L)throw Error('Manager not activated, need to set a depth before updating ranks');const a=this.F.length;this.Y.length=0;for(let d=0;d<a;d++){let e=this.F[d];if(!e.Y){var b=e,c=this.L;b.Y=!0;b.G=xg(b,c)}0>this.L?this.Y.push(e.index):e.G&&yg(e.G,this.Y)}this.ka&&this.ka(this.Y)}Lg(a){this.ka=a}insert(a,b){const c=this.F;var d=c.length;let e=a.position;null===
626
- 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.rc.Yq.la=[olympe.dc.rc.sa];class Eg extends olympe.dc.rc.Oj{constructor(a,b,c){super(a);this.index=b;this.tag=c;this.ka=this.Y=this.L=!1;this.G=null}}
625
+ olympe.dc.rc.Zq=class{constructor(a){this.Da=a;this.L=null;this.F=[];this.Y=[];this.ja=null;this.oa=new Map}C(a,b,c,d){b='$'+c;const e=this.F;let f;if(a)f=new Bg(this,c,d),this.oa.set(b,f),this.U()?zg(f,()=>Cg(this,f)):(f.position=e.length,e.push(f));else{f=this.oa.get(b);if(void 0===f)throw Error('Trying to remove an non-registered item: "'+c+'"');this.oa.delete(b);null!==f.position&&(this.U()?this.remove(f):delete e[f.position]);f.destroy()}return f}U(){return null!==this.L}aa(a){if(null!==this.L)throw Error('Manager already activated (depth='+
626
+ this.L+')');this.L=a;Dg(this);for(let b=0,c=this.F.length;b<c;b++){const d=this.F[b];d.position=b;Ag(d,()=>Cg(this,d))}this.G()}G(){if(null===this.L)throw Error('Manager not activated, need to set a depth before updating ranks');const a=this.F.length;this.Y.length=0;for(let d=0;d<a;d++){let e=this.F[d];if(!e.Y){var b=e,c=this.L;b.Y=!0;b.G=xg(b,c)}0>this.L?this.Y.push(e.index):e.G&&yg(e.G,this.Y)}this.ja&&this.ja(this.Y)}Lg(a){this.ja=a}insert(a,b){const c=this.F;var d=c.length;let e=a.position;null===
627
+ 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.rc.Zq.la=[olympe.dc.rc.sa];class Eg extends olympe.dc.rc.Oj{constructor(a,b,c){super(a);this.index=b;this.tag=c;this.ja=this.Y=this.L=!1;this.G=null}}
627
628
  function Fg(a,b,c,d,e){const f=Object.create(null),g=a.order,h=a.L;let k,l,n;a.oa=!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.L||(c.L=!0,e(!0,c.tag,c.index,c)));for(k in f)Object.prototype.hasOwnProperty.call(f,k)&&(c=h[k],c.L&&(c.L=!1,e(!1,c.tag,c.index,c)),c.Y&&(c.G=null,delete h[k]),delete f[k]);a.oa=!1;null!==a.F&&a.G()}
628
- olympe.dc.rc.Zl=class{constructor(){this.L={};this.order=[];this.F=null;this.oa=!1;this.Y=[];this.ka=null}U(){return null!==this.F}aa(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.oa){var a=this.order,b=a.length,c=this.L,d;for(d=this.Y.length=0;d<b;d++){var e=c[a[d]];if(0>this.F)this.Y.push(e.index);else{if(!e.ka){var f=e,g=this.F;f.ka=!0;
629
- f.G=xg(f,g)}null!==e.G&&yg(e.G,this.Y)}}this.ka&&this.ka(this.Y)}}Lg(a){this.ka=a}C(a,b,c){let d=this.L[c];a?void 0===d?(d=new Eg(this,c,b),this.L[c]=d):(d.tag=b,d.Y=!1):void 0!==d&&(d.Y=!0);return d}};olympe.dc.rc.Zl.la=[olympe.dc.rc.sa];function rg(a){if(!a.F){for(let b in a.G)Gg(a.G[b]);a.F=!0}a.L=null;a.U=null}function sg(a,b,c){a.G[c||'root'].L=b}function tg(a,b,c){a.G[c||'root'].tg(b)}function Hg(a,b,c,d){const e=a.U,f=b+d+c;let g=e[f];void 0===g&&(g=Dd(a.db,b,c,d),e[f]=g);return g}function Ig(a,b){a.F||a.C.tg(b)}function Jg(a,b,c,d,e){if(!a.F){let f=Hg(a,c,d,e||olympe.dc.Aa.DESTINATION);e||(f+=Hg(a,c,d,olympe.dc.Aa.ORIGIN));0===f&&Ig(a,b)}}
629
+ olympe.dc.rc.Zl=class{constructor(){this.L={};this.order=[];this.F=null;this.oa=!1;this.Y=[];this.ja=null}U(){return null!==this.F}aa(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.oa){var a=this.order,b=a.length,c=this.L,d;for(d=this.Y.length=0;d<b;d++){var e=c[a[d]];if(0>this.F)this.Y.push(e.index);else{if(!e.ja){var f=e,g=this.F;f.ja=!0;
630
+ f.G=xg(f,g)}null!==e.G&&yg(e.G,this.Y)}}this.ja&&this.ja(this.Y)}}Lg(a){this.ja=a}C(a,b,c){let d=this.L[c];a?void 0===d?(d=new Eg(this,c,b),this.L[c]=d):(d.tag=b,d.Y=!1):void 0!==d&&(d.Y=!0);return d}};olympe.dc.rc.Zl.la=[olympe.dc.rc.sa];function rg(a){if(!a.F){for(let b in a.G)Gg(a.G[b]);a.F=!0}a.L=null;a.U=null}function sg(a,b,c){a.G[c||'root'].L=b}function tg(a,b,c){a.G[c||'root'].tg(b)}function Hg(a,b,c,d){const e=a.U,f=b+d+c;let g=e[f];void 0===g&&(g=Dd(a.db,b,c,d),e[f]=g);return g}function Ig(a,b){a.F||a.C.tg(b)}function Jg(a,b,c,d,e){if(!a.F){let f=Hg(a,c,d,e||olympe.dc.Aa.DESTINATION);e||(f+=Hg(a,c,d,olympe.dc.Aa.ORIGIN));0===f&&Ig(a,b)}}
630
631
  function Kg(a,b){const c=a.G[b];void 0!==c?(a.N&&a.N.debug('Set current block to',b,null!==c.parent?'parent = '+c.parent.Z():''),a.C=c):a.N&&a.N.error('Try to set a block that does not exists:',b)}function Lg(a){const b=String(++a.Y),c=a.C;a.G[b]=new Mg(b,c);Ng(c,b);c.F||(c.F=()=>Kg(a,c.Z()));return b}function Og(a,b){const c=a.C;a.C.F=()=>{Kg(a,c.Z());b()}}function Pg(a,b){Gg(b?a.G[b]:a.C)}
631
- olympe.dc.rc.Zq=class{constructor(a,b){this.db=a;this.N=b||null;this.L=Object.create(null);this.U=Object.create(null);this.F=!1;this.Y=0;this.C=new Mg('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=Hg(this,c,d,e),d=this.L[b]||0,this.L[b]=++d,this.C.C===b&&c<=d&&(this.C.C=a)):this.C.C=a)}};function Ng(a,b){null===a.children&&(a.children=Object.create(null));a.children[b]=!1}function Gg(a){a.G=!0;null!==a.parent&&a.parent.notify(a.id)}
632
- class Mg{constructor(a,b){this.id=a;this.parent=b||null;this.C=this.L=this.F=this.children=null;this.G=!1}Z(){return this.id}tg(a){const b=this.L;if(this.G||this.C===a||null===a)b&&b(),!b&&Gg(this)}notify(a){const b=this.F,c=this.children;if(this.G)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.na={};olympe.dc.na.uf=class{ma(){return O(olympe.dc.na.uf)}C(){return[]}getValue(a,b){return b}ia(){return'{"c":"'+this.ma()+'","a":[]}'}toString(){return'Tag()'}};N('olympe.dc.valuedefs.Tag',olympe.dc.na.uf);olympe.dc.na.uf.la=[olympe.dc.yf];olympe.dc.na.Dd=class{constructor(a){this.value=a}ma(){return O(olympe.dc.na.Dd)}C(){return[]}getValue(){return this.value}ia(a){a=Df(a,this.value);return`{"c":"${this.ma()}","a":[${a}]}`}toString(){return`Constant(${Cf(this.value)})`}};N('olympe.dc.valuedefs.Constant',olympe.dc.na.Dd);olympe.dc.na.Dd.la=[olympe.dc.yf];function Qg(a,b,c,d){const e=olympe.dc.Oa(),f=new olympe.dc.rc.Hj,g=new olympe.dc.rc.Zq(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.Ja();w.G()||w.Ab()||(h||(sg(g,()=>{v.tg();rg(g)}),v.Tc().Lg(l),h=!0),r?k[u]=t:delete k[u],tg(g,u))};const p=olympe.D.Ja();if(null!==c)for(let r=c.length-1;0<=r;r--)n=c[r].getTransform(a,g,p.C(n));n=p.C(n);const q=olympe.W.fc();tc(e,b,(r,t)=>{g.register(q,null);const u=f.C(r,b,q,null);
632
+ olympe.dc.rc.$q=class{constructor(a,b){this.db=a;this.N=b||null;this.L=Object.create(null);this.U=Object.create(null);this.F=!1;this.Y=0;this.C=new Mg('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=Hg(this,c,d,e),d=this.L[b]||0,this.L[b]=++d,this.C.C===b&&c<=d&&(this.C.C=a)):this.C.C=a)}};function Ng(a,b){null===a.children&&(a.children=Object.create(null));a.children[b]=!1}function Gg(a){a.G=!0;null!==a.parent&&a.parent.notify(a.id)}
633
+ class Mg{constructor(a,b){this.id=a;this.parent=b||null;this.C=this.L=this.F=this.children=null;this.G=!1}Z(){return this.id}tg(a){const b=this.L;if(this.G||this.C===a||null===a)b&&b(),!b&&Gg(this)}notify(a){const b=this.F,c=this.children;if(this.G)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.na={};olympe.dc.na.uf=class{ma(){return O(olympe.dc.na.uf)}C(){return[]}getValue(a,b){return b}ia(){return'{"c":"'+this.ma()+'","a":[]}'}toString(){return'Tag()'}};N('olympe.dc.valuedefs.Tag',olympe.dc.na.uf);olympe.dc.na.uf.la=[olympe.dc.yf];olympe.dc.na.Dd=class{constructor(a){this.value=a}ma(){return O(olympe.dc.na.Dd)}C(){return[]}getValue(){return this.value}ia(a){a=Df(a,this.value);return`{"c":"${this.ma()}","a":[${a}]}`}toString(){return`Constant(${Cf(this.value)})`}};N('olympe.dc.valuedefs.Constant',olympe.dc.na.Dd);olympe.dc.na.Dd.la=[olympe.dc.yf];function Qg(a,b,c,d){const e=olympe.dc.Oa(),f=new olympe.dc.rc.Hj,g=new olympe.dc.rc.$q(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.Ja();w.G()||w.Ab()||(h||(sg(g,()=>{v.tg();rg(g)}),v.Tc().Lg(l),h=!0),r?k[u]=t:delete k[u],tg(g,u))};const p=olympe.D.Ja();if(null!==c)for(let r=c.length-1;0<=r;r--)n=c[r].getTransform(a,g,p.C(n));n=p.C(n);const q=olympe.W.fc();tc(e,b,(r,t)=>{g.register(q,null);const u=f.C(r,b,q,null);
633
634
  n(r,t,q,ug(u,r,b,q))},q);p.onDestroy(()=>{uc(e,b,q)});e.Eb(b)||rg(g)}function Rg(a,b,c){const d=c.node,e=olympe.dc.Oa(),f=a.G(),g=wd(e,b,a.Ze,d.C(h=>{null!==h&&(h=f(h));null===h?c.clear():c.update(h)}));d.onDestroy(()=>e.F(b,a.Ze,g))}
634
635
  olympe.dc.na.Oc=class{constructor(a,b,c){this.Ze=a&&a.R?a.R():a;this.X=b&&b.filter(d=>d instanceof olympe.dc.X.Sb||d instanceof olympe.dc.X.Fc)||null;this.F=c||null;this.defaultValue=null}ma(){}Yb(){}G(){}C(){return(this.X||[]).reduce((a,b)=>a.concat(olympe.dc.query.Relation.from(b)),[])}bf(a){this.defaultValue=a;return this}Cg(){return this.X}Od(){return this.F}getValue(a,b){const c=olympe.D.Uc(this.Yb()||Object,'AbstractProperty valueType');null!==this.defaultValue&&pb(c,this.defaultValue);b=this.F||
635
636
  b;null!==this.X?Qg(a,b,this.X,d=>{Rg(this,d,c)}):Rg(this,b,c);return c.Fb()}ia(a){const b=Df(a,this.Ze),c=Df(a,this.F);let d='null';this.X&&(d=this.X.map(function(e){return e.ia(a)}).join(','));return`{"c":"${this.ma()}","a":["${b}",${d},${c}]}`}toString(){const a=Cf(this.Ze),b=this.F?','+Cf(this.F):'';let c='';this.X&&(c=','+this.X.join(','));return this.ma().replace(/^.+\./,'')+'('+a+c+b+')'}};olympe.dc.na.Oc.la=[olympe.dc.yf];olympe.dc.na.ke=class extends olympe.dc.na.Oc{constructor(a,b,c){super(a,b,c)}ma(){return O(olympe.dc.na.ke)}G(){return olympe.dc.W.Vb.Pm}Yb(){return olympe.D.ea}};N('olympe.dc.valuedefs.NumberProperty',olympe.dc.na.ke);olympe.dc.na.oe=class extends olympe.dc.na.Oc{constructor(a,b,c){super(a,b,c)}ma(){return O(olympe.dc.na.oe)}G(){return olympe.dc.W.Vb.Qm}Yb(){return olympe.D.Wa}};N('olympe.dc.valuedefs.StringProperty',olympe.dc.na.oe);olympe.dc.na.te=class extends olympe.dc.na.Oc{constructor(a,b,c){super(a,b,c)}ma(){return O(olympe.dc.na.te)}G(){return olympe.dc.W.Vb.Nm}Yb(){return olympe.D.qa}};N('olympe.dc.valuedefs.BooleanProperty',olympe.dc.na.te);olympe.dc.na.je=class extends olympe.dc.na.Oc{constructor(a,b,c){super(a,b,c)}ma(){return O(olympe.dc.na.je)}G(){return olympe.dc.W.Vb.Om}Yb(){return olympe.D.jb}};N('olympe.dc.valuedefs.DateTimeProperty',olympe.dc.na.je);olympe.dc.na.Tn=class{constructor(a,b){if(olympe.D.Vf(a))throw Error('Dataflows of Property not supported by AnyProperty');const c=a.R();var d=olympe.dc.Oa();const e=d.hc(a,olympe.dm.Property.typeRel);if(!e)throw Error('Type of property '+a+'unavailable locally, cannot proceed with AnyProperty');a=d.Pf(e,olympe.dc.CloudObject.extendRel,olympe.dm.rf);d=null;switch(1<a.length?a[a.length-2]:e){case olympe.dm.String.O.R():d=new olympe.dc.na.oe(c,b);break;case olympe.dm.Number.O.R():d=new olympe.dc.na.ke(c,
636
637
  b);break;case olympe.dm.Boolean.O.R():d=new olympe.dc.na.te(c,b);break;case olympe.dm.DateTime.O.R():d=new olympe.dc.na.je(c,b)}this.F=d}ma(){return this.F.ma()}C(){return this.F.C()}getValue(a,b){return this.F.getValue(a,b)}ia(a){return this.F.ia(a)}toString(){return this.F.toString()}};olympe.dc.na.Tn.la=[olympe.dc.yf];olympe.dc.Cb={};olympe.dc.Cb.Number=class{constructor(a){this.C=a}ma(){return O(olympe.dc.Cb.Number)}U(){return this.C.C()}L(a,b){return this.C.getValue(a,b)}G(a,b){return a!==b?a>b?1:-1:0}ia(a){return`{"c":"${this.ma()}",a:[${this.C.ia(a)}]}`}toString(){return`Number(${this.C.toString()})`}};N('olympe.dc.comparators.Number',olympe.dc.Cb.Number);olympe.dc.Cb.Number.la=[olympe.dc.Ne];olympe.dc.Cb.String=class{constructor(a){this.C=a}ma(){return O(olympe.dc.Cb.String)}U(){return this.C.C()}L(a,b){return olympe.D.Fa([this.C.getValue(a,b)],c=>c.toLowerCase(),olympe.D.Wa)}G(a,b){return void 0===a?void 0===b?0:1:a!==b?a>b?1:-1:0}ia(a){return`{"c":"${this.ma()}",a:[${this.C.ia(a)}]}`}toString(){return`String(${this.C.toString()})`}};N('olympe.dc.comparators.String',olympe.dc.Cb.String);olympe.dc.Cb.String.la=[olympe.dc.Ne];olympe.dc.Cb.DateTime=class{constructor(a){this.C=a}ma(){return O(olympe.dc.Cb.DateTime)}U(){return this.C.C()}L(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}ia(a){return'{"c":"'+this.ma()+'",a:['+this.C.ia(a)+']}'}toString(){return'Number('+this.C.toString()+')'}};N('olympe.dc.comparators.DateTime',olympe.dc.Cb.DateTime);olympe.dc.Cb.DateTime.la=[olympe.dc.Ne];let Sg=0;olympe.dc.Cb.Og=class{constructor(){this.id=Sg++}ma(){return'CustomLocalComparator#'+Sg}U(){return[]}L(){throw Error('GetComparedValue function was not implemented.');}G(){throw Error('Compare function was not implemented.');}ia(){return`{"c":"${this.ma()}"}`}toString(){return this.ma()+'()'}};olympe.dc.Cb.Og.la=[olympe.dc.Ne];olympe.dc.V={};olympe.dc.V.nd=class{constructor(a){this.G=a}ma(){return O(olympe.dc.V.nd)}F(){return this.G.F()}C(a,b){return olympe.D.el(this.G.C(a,b),c=>!c.valueOf())}ia(a){return`{"c":"${this.ma()}","a":[${this.G.ia(a)}]}`}toString(){return'Not('+this.G.toString()+')'}};N('olympe.dc.predicates.Not',olympe.dc.V.nd);olympe.dc.V.nd.la=[olympe.dc.$a];olympe.dc.V.Ud=class{constructor(a){this.V=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.V=this.V.concat(arguments[c]):this.V.push(arguments[c])}ma(){return O(olympe.dc.V.Ud)}F(){return this.V.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return olympe.D.df(this.V.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})}ia(a){const b=this.V.map(c=>c.ia(a));return'{"c":"'+this.ma()+'","a":['+b.join(',')+']}'}toString(){return'And('+
637
638
  this.V.map(a=>a.toString()).join(',')+')'}};N('olympe.dc.predicates.And',olympe.dc.V.Ud);olympe.dc.V.Ud.la=[olympe.dc.$a];olympe.dc.V.ae=class{constructor(a){this.V=[];for(let b=arguments.length,c=0;c<b;c++)Array.isArray(arguments[c])?this.V=this.V.concat(arguments[c]):this.V.push(arguments[c])}ma(){return O(olympe.dc.V.ae)}F(){return this.V.reduce((a,b)=>a.concat(b.F()),[])}C(a,b){return olympe.D.df(this.V.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})}ia(a){const b=this.V.map(c=>c.ia(a));return'{"c":"'+this.ma()+'","a":['+b.join(',')+']}'}toString(){return'Or('+
638
639
  this.V.map(a=>a.toString()).join(',')+')'}};N('olympe.dc.predicates.Or',olympe.dc.V.ae);olympe.dc.V.ae.la=[olympe.dc.$a];olympe.dc.V.nl=class{constructor(a,b){this.G=a;this.L=b}ma(){}F(){return[this.G.C(),this.L.C()]}C(a,b){return olympe.D.Fa([this.G.getValue(a,b),this.L.getValue(a,b)],(c,d)=>{c=c.valueOf();d=d.valueOf();return this.U('string'===typeof c?c:Number(c),'string'===typeof d?d:Number(d))},Boolean)}U(){}ia(a){return'{"c":"'+this.ma()+'","a":['+this.G.ia(a)+','+this.L.ia(a)+']}'}toString(){return this.ma().replace(/^.+\./,'')+'('+this.G.toString()+','+this.L.toString()+')'}};olympe.dc.V.nl.la=[olympe.dc.$a];olympe.dc.V.Ic=class{constructor(a,b){this.G=a;this.L=b}ma(){return O(olympe.dc.V.Ic)}F(){return[this.G.C(),this.L.C()]}C(a,b){return olympe.D.Fa([this.G.getValue(a,b),this.L.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.Cc(c.valueOf()===d.valueOf()),olympe.D.qa,'Test equal predicate')}ia(a){return'{"c":"'+this.ma()+'","a":['+this.G.ia(a)+','+this.L.ia(a)+']}'}toString(){return'Equals('+this.G.toString()+','+this.L.toString()+
639
- ')'}};N('olympe.dc.predicates.Equals',olympe.dc.V.Ic);olympe.dc.V.Ic.la=[olympe.dc.$a];olympe.dc.V.Zs=class extends olympe.dc.V.Ic{constructor(a,b){super(a,new olympe.dc.na.Dd(b))}};olympe.dc.V.Zs.la=[olympe.dc.$a];olympe.dc.V.ye=class extends olympe.dc.V.nl{constructor(a,b){super(a,b)}ma(){return O(olympe.dc.V.ye)}U(a,b){return a>b}};N('olympe.dc.predicates.Greater',olympe.dc.V.ye);olympe.dc.V.Fe=class extends olympe.dc.V.nl{constructor(a,b){super(a,b)}ma(){return O(olympe.dc.V.Fe)}U(a,b){return a<b}};N('olympe.dc.predicates.Smaller',olympe.dc.V.Fe);olympe.dc.V.Wc=class{constructor(a,b,c){this.source=a;this.value=b;this.G=c?c:!1}ma(){return O(olympe.dc.V.Wc)}F(){return[this.source.C(),this.value.C()]}getValue(){return this.value}C(a,b){return olympe.D.Fa([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.Cc(c.includes(d))},olympe.D.qa)}ia(a){const b=this.source.ia(a),c=this.value.ia(a);a=Df(a,this.G);return'{"c":"'+this.ma()+'","a":['+
640
+ ')'}};N('olympe.dc.predicates.Equals',olympe.dc.V.Ic);olympe.dc.V.Ic.la=[olympe.dc.$a];olympe.dc.V.$s=class extends olympe.dc.V.Ic{constructor(a,b){super(a,new olympe.dc.na.Dd(b))}};olympe.dc.V.$s.la=[olympe.dc.$a];olympe.dc.V.ye=class extends olympe.dc.V.nl{constructor(a,b){super(a,b)}ma(){return O(olympe.dc.V.ye)}U(a,b){return a>b}};N('olympe.dc.predicates.Greater',olympe.dc.V.ye);olympe.dc.V.Fe=class extends olympe.dc.V.nl{constructor(a,b){super(a,b)}ma(){return O(olympe.dc.V.Fe)}U(a,b){return a<b}};N('olympe.dc.predicates.Smaller',olympe.dc.V.Fe);olympe.dc.V.Wc=class{constructor(a,b,c){this.source=a;this.value=b;this.G=c?c:!1}ma(){return O(olympe.dc.V.Wc)}F(){return[this.source.C(),this.value.C()]}getValue(){return this.value}C(a,b){return olympe.D.Fa([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.Cc(c.includes(d))},olympe.D.qa)}ia(a){const b=this.source.ia(a),c=this.value.ia(a);a=Df(a,this.G);return'{"c":"'+this.ma()+'","a":['+
640
641
  b+','+c+','+a+']}'}toString(){const a=Cf(this.G);return'Contains('+this.source.toString()+','+this.value.toString()+','+a+')'}};N('olympe.dc.predicates.Contains',olympe.dc.V.Wc);olympe.dc.V.Wc.la=[olympe.dc.$a];olympe.dc.V.wd=class{constructor(a,b,c){this.source=a;this.L=b;this.G=void 0===c?!0:c}ma(){return O(olympe.dc.V.wd)}F(){return[this.source.C()]}C(a,b){return olympe.D.df([this.source.getValue(a,b),this.L,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)})}ia(a){const b=this.source.ia(a),c=Df(a,this.L);a=Df(a,this.G);return'{"c":"'+this.ma()+'","a":['+b+','+c+','+a+']}'}toString(){const a=Cf(this.G);return'Regex('+this.source.toString()+
641
642
  ','+this.L+','+a+')'}};N('olympe.dc.predicates.Regex',olympe.dc.V.wd);olympe.dc.V.wd.la=[olympe.dc.$a];olympe.dc.V.mf=class{constructor(a){this.G=new Set;a instanceof Array?a.forEach(b=>{this.G.add(olympe.dc.wa(b))}):this.G.add(olympe.dc.wa(a))}ma(){return O(olympe.dc.V.mf)}F(){return[]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.dc.Oa();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.wa(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)?
642
643
  (K(c,!0),f()):(h=new Tg(k,olympe.dc.CloudObject.extendRel),e.push(h),V(d,h.tag,h.C,g,h.id))}};a=new Tg(b,olympe.dc.CloudObject.modelRel);e.push(a);V(d,a.tag,a.C,g,a.id);c.onDestroy(f);Va(c)||K(c,!1);return c}ia(){return'{"c":"'+this.ma()+'","a":['+JSON.stringify(Array.from(this.G))+']}'}toString(){return'InstanceOf('+Array.from(this.G).join(', ')+')'}};class Tg{constructor(a,b){this.tag=a;this.C=b;this.id=olympe.W.yg()}}N('olympe.dc.predicates.InstanceOf',olympe.dc.V.mf);olympe.dc.V.mf.la=[olympe.dc.$a];function Ug(a){return a.La.map(b=>b.R())}function Vg(a){return a.La.map(b=>b.Pa())}
@@ -646,204 +647,204 @@ function Xg(a,b,c,d){const e=Object.create(null);d+=olympe.W.yg();const f=(g,h,k
646
647
  '('+a.toString()+','+this.value.toString()+')'}};N('olympe.dc.predicates.BitMask',olympe.dc.V.ul);olympe.dc.V.ul.la=[olympe.dc.$a];let Yg=0;olympe.dc.V.Og=class{constructor(){this.id=Yg++}ma(){return'CustomLocalPredicate#'+this.id}F(){return[]}C(){throw Error('Test function was not implemented.');}ia(){return`{"c":"${this.ma()}"}`}toString(){return this.ma()+'()'}};olympe.dc.V.Og.la=[olympe.dc.$a];olympe.dc.V.Ll=class{constructor(a,b,c){this.La=[];this.G=void 0!==c?c.map(olympe.dc.wa):null;a=Array.isArray(a)?a:[a];for(let d=0,e=a.length;d<e;d++)c=a[d],c instanceof olympe.dc.X.Fc?this.La.push(new Zg(c.R(),c.Pa(),c.F,c.C)):this.La.push(new Zg(olympe.dc.wa(c),b[d],1,1))}ma(){return O(olympe.dc.V.Ll)}F(){return[this.La.reduce((a,b)=>a.concat(b),[])]}C(a,b){const c=olympe.D.createNode(Boolean),d=olympe.dc.Oa(),e=olympe.W.yg();a=(h,k,l)=>{k&&(null===this.G||this.G.includes(l))&&h(1)};const f=this.La;
647
648
  for(let h=f.length-1;0<=h;h--)a=f[h].getTransform(d,a,e+h);let g=0;tc(d,b,a.bind(null,h=>{c.G()||c.Ab()||(g+=h,K(c,0<g))}),e);olympe.D.Ja().onDestroy(()=>uc(d,b,e));c.bf(!1);return c}ia(){return'{"c":"'+this.ma()+'","a":['+JSON.stringify(this.La.map(a=>a.ia()))+(null!==this.G?',"'+this.G.toString():'')+'"]}'}toString(){return'HasRelatedTree('+(null!==this.G?'#['+this.G.toString()+'], ':'')+this.La.map(a=>a.ia())+')'}};N('olympe.dc.predicates.HasRelatedTree',olympe.dc.V.Ll);
648
649
  class Zg extends olympe.dc.query.Relation{constructor(a,b,c,d){super(a,b,1!==c||1!==d);this.F=c;this.C=d;this.L=new Map;this.G=new Map}getTransform(a,b,c){const d=this.G,e=this.L,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.W.yg();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&&
649
- 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)}ia(){return`${this.R()}, ${this.Pa()}, ${this.F}, ${this.C}`}}olympe.dc.V.Ll.la=[olympe.dc.$a];olympe.dc.X={};olympe.dc.X.sk={dt:1,qt:-1,up:0};olympe.dc.X.lB={Oy:!0,lz:!1};olympe.dc.X.Sb=class extends olympe.dc.ta.Relation{constructor(a,b){super(a,b||olympe.dc.Aa.DESTINATION)}Yb(){return Hc(this)}ma(){return O(olympe.dc.X.Sb)}Gc(){return new olympe.dc.X.Sb(this.tag,this.direction===olympe.dc.Aa.DESTINATION?olympe.dc.Aa.ORIGIN:olympe.dc.Aa.DESTINATION)}getTransform(a,b,c){const d=olympe.dc.Oa(),e=this.R(),f=this.Pa();return(g,h,k,l)=>{Jg(b,k,h,e,f);g?V(d,h,this,(n,p)=>{const q=olympe.W.mb(k+f+e+p,20),r=ug(l,n,p,q);n&&b.register(q,k,h,e,f);c(n,p,q,r)},k):d.C(h,this,k)}}ia(){return'{"c":"'+
650
+ 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)}ia(){return`${this.R()}, ${this.Pa()}, ${this.F}, ${this.C}`}}olympe.dc.V.Ll.la=[olympe.dc.$a];olympe.dc.X={};olympe.dc.X.sk={et:1,rt:-1,vp:0};olympe.dc.X.mB={Py:!0,mz:!1};olympe.dc.X.Sb=class extends olympe.dc.ta.Relation{constructor(a,b){super(a,b||olympe.dc.Aa.DESTINATION)}Yb(){return Hc(this)}ma(){return O(olympe.dc.X.Sb)}Gc(){return new olympe.dc.X.Sb(this.tag,this.direction===olympe.dc.Aa.DESTINATION?olympe.dc.Aa.ORIGIN:olympe.dc.Aa.DESTINATION)}getTransform(a,b,c){const d=olympe.dc.Oa(),e=this.R(),f=this.Pa();return(g,h,k,l)=>{Jg(b,k,h,e,f);g?V(d,h,this,(n,p)=>{const q=olympe.W.mb(k+f+e+p,20),r=ug(l,n,p,q);n&&b.register(q,k,h,e,f);c(n,p,q,r)},k):d.C(h,this,k)}}ia(){return'{"c":"'+
650
651
  this.ma()+'","a":["'+this.R()+'","'+this.Pa()+'"]}'}toString(){return'Related('+this.Pa()+this.R()+')'}};N('olympe.dc.transformers.Related',olympe.dc.X.Sb);olympe.dc.X.Sb.la=[olympe.dc.$c];olympe.dc.X.Fc=class extends olympe.dc.ta.Relation{constructor(a,b=olympe.dc.Aa.DESTINATION,c=1,d=-1){super(a,b);this.F=c;this.C=d}Yb(){return Hc(this)}ma(){return O(olympe.dc.X.Fc)}getTransform(a,b,c){const d=olympe.dc.Oa(),e=Object.create(null),f=olympe.dc.Aa.ORIGIN,g=olympe.dc.Aa.DESTINATION,h=this.R(),k=this.Pa(),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.W.mb(q+k+(h+'_'+p)+t[u],20);b.register(w,
651
652
  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,ug(r,u,v,t)):Jg(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,E=olympe.W.mb(t+k+(h+'_'+B)+y,20);n(B,v,r,E,w,y)},t)):(d.C(v,this,t),delete e[v]))};return(p,q,r,t)=>n(0,null,t,r,p,q)}ia(){return'{"c":"'+this.ma()+'","a":["'+this.R()+'","'+this.Pa()+'",'+this.F+','+this.C+']}'}toString(){return'RecursiveRelated('+this.Pa()+this.R()+'['+this.F+'..'+this.C+'])'}};
652
653
  N('olympe.dc.transformers.RecursiveRelated',olympe.dc.X.Fc);olympe.dc.X.Fc.la=[olympe.dc.$c];function $g(a){return a.La.map(b=>b.R())}
653
654
  olympe.dc.X.Be=class{constructor(a,b){this.direction=b||olympe.dc.Aa.DESTINATION;this.La=a.map(c=>new olympe.dc.ta.Relation(c,this.direction))}Yb(){return olympe.dc.CloudObject}ma(){return O(olympe.dc.X.Be)}Pa(){return this.direction}getTransform(a,b,c){const d=olympe.dc.Oa(),e=(f,g,h,k)=>V(d,f,k,(l,n)=>{var p=k.Pa();var q=k.R();p=olympe.W.mb(g+p+q+n,20);q=ug(h,l,n,p);l&&b.register(p,g,f,k.R(),k.Pa());c(l,n,p,q)},g);return(f,g,h,k)=>{f?this.La.forEach(l=>{Jg(b,h,g,l.R(),l.Pa());e(g,h,k,l)}):this.La.forEach(l=>
654
655
  {d.C(g,l,h)})}}ia(){return'{"c":"'+this.ma()+'","a":['+JSON.stringify($g(this))+',"'+this.direction+'"]}'}toString(){return'MultiRelated('+this.Pa()+'['+$g(this).join(',')+'])'}};N('olympe.dc.transformers.MultiRelated',olympe.dc.X.Be);olympe.dc.X.Be.la=[olympe.dc.$c];olympe.dc.X.Fl=class{constructor(a,b,c,d){this.C=new olympe.dc.ta.Relation(olympe.dc.wa(a),c||olympe.dc.Aa.DESTINATION);this.F=new olympe.dc.ta.Relation(olympe.dc.wa(b),d||olympe.dc.Aa.DESTINATION)}Yb(){return Hc(this.C)}ma(){return O(olympe.dc.X.Fl)}getTransform(a,b,c){const d=olympe.dc.Oa(),e={},f=this.C.R(),g=this.C.Pa(),h=this.F.R(),k=this.F.Pa();let l=null,n=null;const p=(r,t,u,v,w,y)=>{if(w){if(w=()=>{const B=olympe.W.mb(u+g+(f+'_'+r)+y,20),E=ug(t,!0,y,B);l=r;n=()=>{c(!1,y,B,ug(t,!1,y,B))};
655
- b.register(B,u,v,f,g);c(!0,y,B,E)},w.Yr=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 E=Object.keys(e),S=E.length,I=0;I<S;I++){let Z=e[E[I]];Z.Yr<w&&(w=Z.Yr,B=Z)}B&&B()}},q=(r,t,u,v,w)=>{v?e[w]||(e[w]=!0,Jg(b,u,w,f,g),Jg(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)}ia(){return'{"c":"'+this.ma()+'","a":["'+
656
- this.C.toString()+'","'+this.F.toString()+'"]}'}toString(){return'FirstRelated('+this.C.toString()+', '+this.F.toString()+')'}};N('olympe.dc.transformers.FirstRelated',olympe.dc.X.Fl);olympe.dc.X.Fl.la=[olympe.dc.$c];olympe.dc.X.we=class{Yb(){return null}ma(){return O(olympe.dc.X.we)}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,ug(h,!0,f,f))):(d[f]++,Ig(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,ug(h,!1,f,f)))}}ia(){return'{"c":"'+this.ma()+'"}'}toString(){return'Distinct()'}};N('olympe.dc.transformers.Distinct',olympe.dc.X.we);olympe.dc.X.we.la=[olympe.dc.$c];olympe.dc.X.Kd=class{constructor(a,b){this.Md=a;this.C=void 0===b?!0:!!b}Yb(){return null}ma(){return O(olympe.dc.X.Kd)}F(){return[this.Md.U()]}getTransform(a,b,c){const d=new olympe.dc.rc.Yq(this.C?this.Md.G.bind(this.Md):(e,f)=>this.Md.G(f,e));return(e,f,g)=>{var h=e?this.Md.L(a,f):void 0;h=d.C(e,f,g,h);c(e,f,g,h)}}ia(a){return'{"c":"'+this.ma()+'","a":['+this.Md.ia(a)+','+JSON.stringify(this.C)+']}'}toString(){return'Sort('+this.Md.toString()+','+JSON.stringify(this.C)+')'}};
657
- N('olympe.dc.transformers.Sort',olympe.dc.X.Kd);olympe.dc.X.Kd.la=[olympe.dc.$c,olympe.dc.sq];olympe.dc.X.vc=class{constructor(a){this.C=a}Yb(){return null}ma(){return O(olympe.dc.X.vc)}F(){return this.C.F()}getTransform(a,b,c){function d(f,g,h,k){k=k.valueOf();!1===k&&Ig(b,g);k!==!!e[g]&&(e[g]=k,c(k,f,g,ug(h,k,f,g)))}const e={};return(f,g,h,k)=>{const l='@'+h;f?(f=this.C.C(a,g),olympe.D.lb(f)&&(f=f.Na),olympe.D.Uf(f)?(b.F||void 0!==olympe.D.bb(f)||Ig(b,h),e[l]=f,olympe.D.Ec([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])}}ia(a){return'{"c":"'+
658
- this.ma()+'","a":['+this.C.ia(a)+']}'}toString(){return'Filter('+this.C.toString()+')'}};N('olympe.dc.transformers.Filter',olympe.dc.X.vc);olympe.dc.X.vc.la=[olympe.dc.$c,olympe.dc.sq];olympe.dc.X.Zd=class{constructor(a,b){this.start=a;this.C=b}Yb(){return null}ma(){return O(olympe.dc.X.Zd)}getTransform(a,b,c){const d=new olympe.dc.rc.Zl;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]);Fg(d,e,f,n,c)}};olympe.D.ie([this.start,this.C],(n,p)=>{f=n.valueOf();g=p.valueOf();k()});Og(b,k);const l=Lg(b);Kg(b,l);return(n,p,q,r)=>{h||(r.Tc().Lg(t=>{e=t;Pg(b,l)}),sg(b,()=>r.tg(),l),h=!0);d.C(n,p,q,null);tg(b,q,l)}}ia(a){return'{"c":"'+
656
+ b.register(B,u,v,f,g);c(!0,y,B,E)},w.Zr=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 E=Object.keys(e),S=E.length,I=0;I<S;I++){let Z=e[E[I]];Z.Zr<w&&(w=Z.Zr,B=Z)}B&&B()}},q=(r,t,u,v,w)=>{v?e[w]||(e[w]=!0,Jg(b,u,w,f,g),Jg(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)}ia(){return'{"c":"'+this.ma()+'","a":["'+
657
+ this.C.toString()+'","'+this.F.toString()+'"]}'}toString(){return'FirstRelated('+this.C.toString()+', '+this.F.toString()+')'}};N('olympe.dc.transformers.FirstRelated',olympe.dc.X.Fl);olympe.dc.X.Fl.la=[olympe.dc.$c];olympe.dc.X.we=class{Yb(){return null}ma(){return O(olympe.dc.X.we)}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,ug(h,!0,f,f))):(d[f]++,Ig(b,g)):void 0!==d[f]&&0>=--d[f]&&(delete d[f],c(!1,f,f,ug(h,!1,f,f)))}}ia(){return'{"c":"'+this.ma()+'"}'}toString(){return'Distinct()'}};N('olympe.dc.transformers.Distinct',olympe.dc.X.we);olympe.dc.X.we.la=[olympe.dc.$c];olympe.dc.X.Kd=class{constructor(a,b){this.Md=a;this.C=void 0===b?!0:!!b}Yb(){return null}ma(){return O(olympe.dc.X.Kd)}F(){return[this.Md.U()]}getTransform(a,b,c){const d=new olympe.dc.rc.Zq(this.C?this.Md.G.bind(this.Md):(e,f)=>this.Md.G(f,e));return(e,f,g)=>{var h=e?this.Md.L(a,f):void 0;h=d.C(e,f,g,h);c(e,f,g,h)}}ia(a){return'{"c":"'+this.ma()+'","a":['+this.Md.ia(a)+','+JSON.stringify(this.C)+']}'}toString(){return'Sort('+this.Md.toString()+','+JSON.stringify(this.C)+')'}};
658
+ N('olympe.dc.transformers.Sort',olympe.dc.X.Kd);olympe.dc.X.Kd.la=[olympe.dc.$c,olympe.dc.tq];olympe.dc.X.vc=class{constructor(a){this.C=a}Yb(){return null}ma(){return O(olympe.dc.X.vc)}F(){return this.C.F()}getTransform(a,b,c){function d(f,g,h,k){k=k.valueOf();!1===k&&Ig(b,g);k!==!!e[g]&&(e[g]=k,c(k,f,g,ug(h,k,f,g)))}const e={};return(f,g,h,k)=>{const l='@'+h;f?(f=this.C.C(a,g),olympe.D.lb(f)&&(f=f.Na),olympe.D.Uf(f)?(b.F||void 0!==olympe.D.bb(f)||Ig(b,h),e[l]=f,olympe.D.Ec([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])}}ia(a){return'{"c":"'+
659
+ this.ma()+'","a":['+this.C.ia(a)+']}'}toString(){return'Filter('+this.C.toString()+')'}};N('olympe.dc.transformers.Filter',olympe.dc.X.vc);olympe.dc.X.vc.la=[olympe.dc.$c,olympe.dc.tq];olympe.dc.X.Zd=class{constructor(a,b){this.start=a;this.C=b}Yb(){return null}ma(){return O(olympe.dc.X.Zd)}getTransform(a,b,c){const d=new olympe.dc.rc.Zl;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]);Fg(d,e,f,n,c)}};olympe.D.ie([this.start,this.C],(n,p)=>{f=n.valueOf();g=p.valueOf();k()});Og(b,k);const l=Lg(b);Kg(b,l);return(n,p,q,r)=>{h||(r.Tc().Lg(t=>{e=t;Pg(b,l)}),sg(b,()=>r.tg(),l),h=!0);d.C(n,p,q,null);tg(b,q,l)}}ia(a){return'{"c":"'+
659
660
  this.ma()+'","a":['+Df(a,this.start)+','+Df(a,this.C)+']}'}toString(){return`Limit(${olympe.D.bb(this.start)},${olympe.D.bb(this.C)})`}};N('olympe.dc.transformers.Limit',olympe.dc.X.Zd);olympe.dc.X.Zd.la=[olympe.dc.$c];function ah(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.C(f));f=n.C(f);e.register(h,null);r=d.C(p,q,c,null);f(p,q,h,ug(r,p,q,h))}const h=olympe.W.fc(),k=olympe.dc.Oa(),l=a.X,n=olympe.D.Ja();olympe.D.Ec([a.C],p=>{bh(k,p,g,h);void 0===k.model(p)&&rg(e)})}function bh(a,b,c,d){const e=b&&b.valueOf();e&&(tc(a,e,c,d),olympe.D.Ja().zc(()=>uc(a,e,d)))}
660
661
  olympe.dc.X.wf=class{constructor(a,b){this.X=this.C=null;a instanceof olympe.dc.Ca?(this.C=a.Od(),this.X=a.Sl()):(this.C=a,b&&(this.X=b))}Yb(){return null}ma(){return O(olympe.dc.X.wf)||''}Cg(){return this.X}Od(){return this.C}getTransform(a,b,c){const d=new olympe.dc.rc.Zl,e=new olympe.dc.rc.Hj;let f=[],g=[],h=!1,k=!1;const l=Lg(b),n=Lg(b);Og(b,()=>{const p=f.concat(g);0<p.length?b.F||(b.C.C=p[p.length-1]):Pg(b);Fg(d,p,0,p.length,c)});Kg(b,n);ah(this,a,this.C,e,b,(p,q,r,t)=>{const u=olympe.D.Ja();
661
662
  u.G()||u.Ab()||(k||(t.Tc().Lg(v=>{g=v;Pg(b,n)}),sg(b,()=>t.tg(),n),k=!0),d.C(p,q,r),tg(b,r,n))});Kg(b,l);return(p,q,r,t)=>{h||(t.Tc().Lg(u=>{f=u;Pg(b,l)}),sg(b,()=>t.tg(),l),h=!0);d.C(p,q,r,l);tg(b,r,l)}}ia(a){const b=this.X?'['+this.X.map(c=>c.ia(a)).join(',')+']':'null';return'{"c":"'+this.ma()+'","a":['+Df(a,this.C)+','+b+']}'}toString(){const a=olympe.D.lb(this.C)?'N:'+this.C.Na.Z():this.C.valueOf(),b=this.X?','+this.X.map(c=>c.toString()).join(','):'';return'Union('+a+b+')'}};
662
- N('olympe.dc.transformers.Union',olympe.dc.X.wf);olympe.dc.X.wf.la=[olympe.dc.$c];olympe.dc.Mg={};function ch(a,b){let c=zc.get(b)||null,d=null;for(;!c&&b&&b!==d;){d=b;b=a.db.Cf(b);if(null===b)break;c=zc.get(b)||null}return c||null}olympe.dc.Mg.SyncManager=class{constructor(a,b,c){this.N=a;this.db=b;this.C=c}};olympe.dc.Mg.P={Ea:'dc.syncs.Logger',xa:'dc.syncs.SyncManager'};olympe.T.config(function(a){C(a,olympe.dc.Mg.P.Ea,[olympe.ra.P.xa],b=>b.Rc('dc'));A(a,olympe.dc.Mg.P.xa,olympe.dc.Mg.SyncManager,olympe.dc.Mg.P.Ea,olympe.dc.P.vi,olympe.T.P.cg)});olympe.dc.W={};olympe.dc.W.VC=function(a){a=olympe.dc.wa(a);const b=olympe.D.Uc(olympe.D.Wa,'getInstanceName'),c=olympe.dc.Oa(),d=wd(c,a,olympe.dc.CloudObject.nameProp,b.update.bind(b));olympe.D.Ja().zc(c.F.bind(c,a,olympe.dc.CloudObject.nameProp,d));return b.Fb()};olympe.dc.W.YC=function(a){return olympe.D.Fa([a],b=>olympe.D.hy(olympe.dc.Oa().mj(b)),olympe.D.qa)};olympe.dc.W.ZC=function(a){return(a=olympe.D.bb(a))?olympe.dc.Oa().mj(a):!1};olympe.dc.W.Ki=class a{constructor(b=olympe.dc.Ga.Pc){this.G=b}C(b){const c=new olympe.dc.db.Ac;this.F(b,c);return c}U(b,c,d){const e=new olympe.dc.db.Ac(b),f=new olympe.dc.query.Ci(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}L(b,c){const d=new olympe.dc.db.Ac(b),e=new olympe.dc.query.nt(b,d);this.F(c,d,(f,g,h)=>{h=h||[];const k=new hf(f);k.add=g||[];k.remove=h;e.C.set(f,k)});return e}F(b,c,d){const e=olympe.dc.$b.Jd;for(const f of b)switch(b=
663
+ N('olympe.dc.transformers.Union',olympe.dc.X.wf);olympe.dc.X.wf.la=[olympe.dc.$c];olympe.dc.Mg={};function ch(a,b){let c=zc.get(b)||null,d=null;for(;!c&&b&&b!==d;){d=b;b=a.db.Cf(b);if(null===b)break;c=zc.get(b)||null}return c||null}olympe.dc.Mg.SyncManager=class{constructor(a,b,c){this.N=a;this.db=b;this.C=c}};olympe.dc.Mg.P={Ea:'dc.syncs.Logger',xa:'dc.syncs.SyncManager'};olympe.T.config(function(a){C(a,olympe.dc.Mg.P.Ea,[olympe.ra.P.xa],b=>b.Rc('dc'));A(a,olympe.dc.Mg.P.xa,olympe.dc.Mg.SyncManager,olympe.dc.Mg.P.Ea,olympe.dc.P.vi,olympe.T.P.cg)});olympe.dc.W={};olympe.dc.W.WC=function(a){a=olympe.dc.wa(a);const b=olympe.D.Uc(olympe.D.Wa,'getInstanceName'),c=olympe.dc.Oa(),d=wd(c,a,olympe.dc.CloudObject.nameProp,b.update.bind(b));olympe.D.Ja().zc(c.F.bind(c,a,olympe.dc.CloudObject.nameProp,d));return b.Fb()};olympe.dc.W.ZC=function(a){return olympe.D.Fa([a],b=>olympe.D.iy(olympe.dc.Oa().mj(b)),olympe.D.qa)};olympe.dc.W.$C=function(a){return(a=olympe.D.bb(a))?olympe.dc.Oa().mj(a):!1};olympe.dc.W.Ki=class a{constructor(b=olympe.dc.Ga.Pc){this.G=b}C(b){const c=new olympe.dc.db.Ac;this.F(b,c);return c}U(b,c,d){const e=new olympe.dc.db.Ac(b),f=new olympe.dc.query.Ci(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}L(b,c){const d=new olympe.dc.db.Ac(b),e=new olympe.dc.query.ot(b,d);this.F(c,d,(f,g,h)=>{h=h||[];const k=new hf(f);k.add=g||[];k.remove=h;e.C.set(f,k)});return e}F(b,c,d){const e=olympe.dc.$b.Jd;for(const f of b)switch(b=
663
664
  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.tc(f.t,a.C(f.p),!0,b);break;case 3:c.Mc(f.t,f.f,b);break;case 4:c.Ra(f.m,f.l,f.r,b);break;case 5:c.ec(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.Jd||b===olympe.dc.$b.VERSION){c.set(b,e);continue}else if('v'===d){c.set(olympe.dc.$b.VERSION,e);continue}let f=
664
665
  typeof e;b.startsWith('fd')&&(b=olympe.dc.Ug.jc+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&&
665
666
  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.Jc(e.t));break;case 'untyped':null===e&&c.set(b,null)}}return c}};olympe.dc.W.Vb={};olympe.dc.W.Vb.Qm=a=>'string'===typeof a||'number'===typeof a||'boolean'===typeof a||a instanceof String?olympe.D.Bb(a):a instanceof olympe.D.Wa?a:null;olympe.dc.W.Vb.Nm=a=>'boolean'===typeof a||a instanceof Boolean?olympe.D.Cc(a):a instanceof olympe.D.qa?a:null;olympe.dc.W.Vb.Pm=a=>'number'===typeof a||a instanceof Number?olympe.D.za(a):'string'===typeof a||a instanceof String?olympe.D.za(Number.parseFloat(a.valueOf())):a instanceof olympe.D.ea?a:null;
666
- olympe.dc.W.Vb.Om=function(a){return'number'===typeof a||a instanceof Number?rb(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.W.Vb.Dr=function(a){return a instanceof olympe.D.Color?a:'string'===typeof a||a instanceof String?vb(a.valueOf()):null};olympe.dc.W.Vb.Er=a=>a instanceof olympe.dc.CloudObject?a:a instanceof olympe.dc.Jc?olympe.dc.CloudObject.get(a.tag):null;
667
- olympe.dc.W.Vb.hh=a=>a instanceof olympe.dc.Jc?olympe.dc.CloudObject.get(a.tag):a;olympe.dc.W.Vb.FC=a=>{switch(typeof a){case 'boolean':return olympe.D.Cc(a);case 'number':return olympe.D.za(a);case 'string':return olympe.D.Bb(a);case 'object':if(a instanceof Date)return olympe.D.Ux(a)}return a};
668
- olympe.dc.W.Vb.SC=a=>{switch(a){case olympe.D.qa:return olympe.dc.W.Vb.Nm;case olympe.D.Wa:return olympe.dc.W.Vb.Qm;case olympe.D.ea:return olympe.dc.W.Vb.Pm;case olympe.D.jb:return olympe.dc.W.Vb.Om;case olympe.D.Color:return olympe.dc.W.Vb.Dr;case olympe.dc.CloudObject:return olympe.dc.W.Vb.Er;default:return olympe.dc.W.Vb.hh}};olympe.dc.P={xa:'dc.Manager',lt:'dc.Graph',vi:'dc.DBView',Ea:'dc.Logger',av:'dc.TransactionLogger',yi:'dc.FileServiceManager',me:'dc.Router'};olympe.dc.Config={dg:'dc.debug',$g:'dc.subscribeAll',xo:'dc.defaultSource',No:'dc.fileCache',Go:'dc.errorOnAbstractInstantiation'};
669
- olympe.T.config(function(a){D(a,olympe.dc.Config.dg,!1);D(a,olympe.dc.Config.$g,!1);D(a,olympe.dc.Config.xo,olympe.dc.Ga.Pc);D(a,olympe.dc.Config.No,!0);D(a,olympe.dc.Config.Go,!0);C(a,olympe.dc.P.Ea,[olympe.ra.P.xa],b=>b.Rc('dc'));ra(a,olympe.dc.P.av,olympe.dc.transaction.P.Ea);ra(a,olympe.dc.P.vi,olympe.dc.db.P.ib);A(a,olympe.dc.P.yi,olympe.dc.ht,olympe.dc.P.Ea,olympe.net.P.xa,olympe.dc.P.me,olympe.W.P.vh,new olympe.T.fa(olympe.dc.Config.No));sa(a,olympe.dc.P.me);A(a,olympe.dc.P.xa,olympe.dc.sa,
670
- olympe.dc.P.Ea,olympe.dc.db.P.xa,olympe.dc.query.P.xa,olympe.dc.transaction.P.xa,olympe.dc.Mg.P.xa,olympe.dc.P.yi)},'olympe.dc');olympe.T.run([olympe.dc.db.P.xa,olympe.dc.query.P.xa,olympe.dc.transaction.P.xa,olympe.dc.Mg.P.xa,olympe.dc.P.xa,olympe.dc.P.yi],(a,b,c,d,e,f)=>{olympe.dc.Ad=()=>a;olympe.dc.Nf=()=>b;olympe.dc.ei=()=>c;olympe.dc.Xr=()=>d;olympe.dc.Tc=()=>e;olympe.dc.Cw=()=>f},'DC singleton getter initialization');function dh(a){const b=olympe.dc.Oa(),c=new Map;b.Tk(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.Oa();this.model=null}static get(a){{var b=olympe.dc.Xr();a=olympe.dc.wa(a);const c=ch(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
667
+ olympe.dc.W.Vb.Om=function(a){return'number'===typeof a||a instanceof Number?rb(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.W.Vb.Er=function(a){return a instanceof olympe.D.Color?a:'string'===typeof a||a instanceof String?vb(a.valueOf()):null};olympe.dc.W.Vb.Fr=a=>a instanceof olympe.dc.CloudObject?a:a instanceof olympe.dc.Jc?olympe.dc.CloudObject.get(a.tag):null;
668
+ olympe.dc.W.Vb.hh=a=>a instanceof olympe.dc.Jc?olympe.dc.CloudObject.get(a.tag):a;olympe.dc.W.Vb.GC=a=>{switch(typeof a){case 'boolean':return olympe.D.Cc(a);case 'number':return olympe.D.za(a);case 'string':return olympe.D.Bb(a);case 'object':if(a instanceof Date)return olympe.D.Vx(a)}return a};
669
+ olympe.dc.W.Vb.TC=a=>{switch(a){case olympe.D.qa:return olympe.dc.W.Vb.Nm;case olympe.D.Wa:return olympe.dc.W.Vb.Qm;case olympe.D.ea:return olympe.dc.W.Vb.Pm;case olympe.D.jb:return olympe.dc.W.Vb.Om;case olympe.D.Color:return olympe.dc.W.Vb.Er;case olympe.dc.CloudObject:return olympe.dc.W.Vb.Fr;default:return olympe.dc.W.Vb.hh}};olympe.dc.P={xa:'dc.Manager',mt:'dc.Graph',vi:'dc.DBView',Ea:'dc.Logger',bv:'dc.TransactionLogger',yi:'dc.FileServiceManager',me:'dc.Router'};olympe.dc.Config={dg:'dc.debug',$g:'dc.subscribeAll',xo:'dc.defaultSource',No:'dc.fileCache',Go:'dc.errorOnAbstractInstantiation'};
670
+ olympe.T.config(function(a){D(a,olympe.dc.Config.dg,!1);D(a,olympe.dc.Config.$g,!1);D(a,olympe.dc.Config.xo,olympe.dc.Ga.Pc);D(a,olympe.dc.Config.No,!0);D(a,olympe.dc.Config.Go,!0);C(a,olympe.dc.P.Ea,[olympe.ra.P.xa],b=>b.Rc('dc'));ra(a,olympe.dc.P.bv,olympe.dc.transaction.P.Ea);ra(a,olympe.dc.P.vi,olympe.dc.db.P.ib);A(a,olympe.dc.P.yi,olympe.dc.it,olympe.dc.P.Ea,olympe.net.P.xa,olympe.dc.P.me,olympe.W.P.vh,new olympe.T.fa(olympe.dc.Config.No));sa(a,olympe.dc.P.me);A(a,olympe.dc.P.xa,olympe.dc.sa,
671
+ olympe.dc.P.Ea,olympe.dc.db.P.xa,olympe.dc.query.P.xa,olympe.dc.transaction.P.xa,olympe.dc.Mg.P.xa,olympe.dc.P.yi)},'olympe.dc');olympe.T.run([olympe.dc.db.P.xa,olympe.dc.query.P.xa,olympe.dc.transaction.P.xa,olympe.dc.Mg.P.xa,olympe.dc.P.xa,olympe.dc.P.yi],(a,b,c,d,e,f)=>{olympe.dc.Ad=()=>a;olympe.dc.Nf=()=>b;olympe.dc.ei=()=>c;olympe.dc.Yr=()=>d;olympe.dc.Tc=()=>e;olympe.dc.Dw=()=>f},'DC singleton getter initialization');function dh(a){const b=olympe.dc.Oa(),c=new Map;b.Tk(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.Oa();this.model=null}static get(a){{var b=olympe.dc.Yr();a=olympe.dc.wa(a);const c=ch(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
671
672
  This could lead to unwanted behaviour and must be fixed.
672
- 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 Pv(a,b,c=olympe.dc.Ga.jc){if('undefined'===typeof olympe.sc)throw Error('Method CloudObject.createWith should only be used at runtime, when sc package exists');const d=olympe.dc.Oa();let e=null;const f=h=>{null===e&&(e=dh(b||this));return e.has(h)?e.get(h):null},g=new Map;a.forEach((h,k)=>{d.Eb(olympe.dc.wa(k))?
673
- 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.hb().catch(h=>olympe.ra.Xa('dc').error(`Error occurred for transaction executed by CloudObject.createWith: ${h}`));return this.get(c)}static zv(){return this.get(this)}static Xk(a){return olympe.dc.gb.Xk(a)}static kd(){return olympe.dc.Oa().tb(this,olympe.dc.CloudObject.propertyRel).map(a=>new olympe.dc.ta.Property(a))}static ld(){const a=olympe.dc.Oa();return a.tb(this,olympe.dc.CloudObject.G).map(b=>new olympe.dc.ta.Relation(b)).concat(a.tb(this,
674
- olympe.dc.CloudObject.U).map(b=>new olympe.dc.ta.Relation(b,olympe.dc.Aa.ORIGIN)))}static Lf(a){return olympe.dc.CloudObject.get(a)}static Hw(a){var b=ch(olympe.dc.Xr(),olympe.dc.wa(a));b=b&&b.C;return new olympe.dc.Ca(olympe.dc.wa(a),olympe.dc.CloudObject.instancesRel,b)}R(){return this.tag}name(){return this.db.name(this)}ma(){return this.Gb(olympe.dc.CloudObject.nameProp)}nh(){this.model||(this.model=olympe.dc.CloudObject.get(this.db.model(this)));return this.model}query(){return olympe.dc.gb.from(this)}Wf(){return this.db.Wf(this)}ox(){return this.db.version(this)}It(){return this.db.source(this)}Qr(){return olympe.D.Fa([this.ma()],
673
+ 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 Qv(a,b,c=olympe.dc.Ga.jc){if('undefined'===typeof olympe.sc)throw Error('Method CloudObject.createWith should only be used at runtime, when sc package exists');const d=olympe.dc.Oa();let e=null;const f=h=>{null===e&&(e=dh(b||this));return e.has(h)?e.get(h):null},g=new Map;a.forEach((h,k)=>{d.Eb(olympe.dc.wa(k))?
674
+ 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.hb().catch(h=>olympe.ra.Xa('dc').error(`Error occurred for transaction executed by CloudObject.createWith: ${h}`));return this.get(c)}static Av(){return this.get(this)}static Xk(a){return olympe.dc.gb.Xk(a)}static kd(){return olympe.dc.Oa().tb(this,olympe.dc.CloudObject.propertyRel).map(a=>new olympe.dc.ta.Property(a))}static ld(){const a=olympe.dc.Oa();return a.tb(this,olympe.dc.CloudObject.G).map(b=>new olympe.dc.ta.Relation(b)).concat(a.tb(this,
675
+ olympe.dc.CloudObject.U).map(b=>new olympe.dc.ta.Relation(b,olympe.dc.Aa.ORIGIN)))}static Lf(a){return olympe.dc.CloudObject.get(a)}static Iw(a){var b=ch(olympe.dc.Yr(),olympe.dc.wa(a));b=b&&b.C;return new olympe.dc.Ca(olympe.dc.wa(a),olympe.dc.CloudObject.instancesRel,b)}R(){return this.tag}name(){return this.db.name(this)}ma(){return this.Gb(olympe.dc.CloudObject.nameProp)}nh(){this.model||(this.model=olympe.dc.CloudObject.get(this.db.model(this)));return this.model}query(){return olympe.dc.gb.from(this)}Wf(){return this.db.Wf(this)}px(){return this.db.version(this)}Jt(){return this.db.source(this)}Rr(){return olympe.D.Fa([this.ma()],
675
676
  a=>olympe.D.Bb(a),olympe.D.Wa,'getDisplayName',olympe.D.Bb('('+this.toString()+')'))}Tb(){return this.model?this.model.R():this.db.model(this)}observe(a,b,c=!0){const d='function'===typeof a.xc?a.xc():a;return new rxjs.Observable(e=>{const f=this.db.fb(this.tag,b);c||null!==f||e.next(f);const g=wd(this.db,this.tag,b,h=>{null===h||void 0===h?e.next(null):e.next(h)});d.zc(()=>{e.complete();this.db.F(this.tag,b,g)});return()=>this.db.F(this.tag,b,g)})}yn(a){const b='function'===typeof a.xc?a.xc():a;
676
- return new rxjs.Observable(c=>{const d=xd(this.db,this.tag,(e,f)=>{null===f||void 0===f?c.next([new olympe.dc.ta.Property(e),null]):c.next([new olympe.dc.ta.Property(e),f])});b.zc(()=>{c.complete();yd(this.db,this.tag,d)});return()=>yd(this.db,this.tag,d)})}Zx(a){return this.observe(olympe.D.Ja(),a)}get(a){return this.db.fb(this.tag,a,!0)}fb(a){return this.get(a)}sb(a){return olympe.dc.gb.from(this).sb(a)}ew(a){return olympe.dc.od.from(this).sb(a)}pw(){return this.qc(olympe.dc.CloudObject.Lb,olympe.dc.CloudObject)}cn(){return this.tb(olympe.dc.CloudObject.containsRel,
677
- olympe.dc.CloudObject)}Of(a,b,c){const d=olympe.D.Uc(c,'Sync valueType'),e=wd(this.db,this.tag,a,olympe.D.Ja().C(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}Gb(a){return L(this.Of(a,olympe.dc.W.Vb.Qm,olympe.D.Wa))}He(a){return L(this.Of(a,olympe.dc.W.Vb.Pm,olympe.D.ea))}Bg(a){return L(this.Of(a,olympe.dc.W.Vb.Nm,olympe.D.qa))}jj(a){return L(this.Of(a,olympe.dc.W.Vb.Om,olympe.D.jb))}Vr(){return L(this.Of(olympe.dm.Color.valueProp,
678
- olympe.dc.W.Vb.Dr,olympe.D.Color))}Wr(){return L(this.Of(olympe.sc.workflow.Transition.processRefProp,olympe.dc.W.Vb.Er,olympe.dc.CloudObject))}tb(a,b){a=a instanceof olympe.dc.X.Sb?a:new olympe.dc.X.Sb(a.R(),a.Pa());return new olympe.dc.Ca(this.R(),a,b)}qc(a,b){return this.tb(a,b).Sc()}Mr(a,b){const c=this.db,d=olympe.W.fc(),e=olympe.D.Ja(),f=new Map;V(c,this.tag,a,(g,h)=>{g?(g=new olympe.D.Xb(`forEachRelated: (${this.tag})-[:${a.R()}]-(${h})`,e),f.set(h,g),g.run(b,olympe.dc.CloudObject.get(h))):
679
- f.has(h)&&(f.get(h).destroy(),f.delete(h))},d);e.zc(()=>{c.C(this.tag,a,d)})}Hy(){return new olympe.dc.Ca(this.R(),[],Fc(this.R()))}transform(...a){return(new olympe.dc.Ca(this.R(),[],this.constructor)).transform(...a)}Vc(){return this.Qr()}toString(){if(!this.db.Eb(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.Eb(this.tag))return{CloudObject:'Unknown tag'};
680
- 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})`}}uh(a=!1,b=!0){const c={};this.db.kd(this,b).forEach((d,e)=>{e=a?this.db.name(e):e;c[e]=d});return c}qb(a){return a instanceof olympe.dc.CloudObject?this.R()===a.R():!1}Td(a){return olympe.D.Fa([a],b=>olympe.D.Cc(this.qb(b)),olympe.D.qa)}Rv(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.Aa.ORIGIN;for(const [e,f,g]of Ad(b,
681
- this))f===d?a.ec(e,g,this):e!==olympe.dc.CloudObject.modelRel.R()&&a.ec(e,this,g);a.delete(this,olympe.dc.Ub.NONE);c&&a.hb()}};olympe.dc.CloudObject.prototype.equals=olympe.dc.CloudObject.prototype.qb;olympe.dc.CloudObject.prototype.toObject=olympe.dc.CloudObject.prototype.uh;olympe.dc.CloudObject.prototype.followSingle=olympe.dc.CloudObject.prototype.ew;olympe.dc.CloudObject.prototype.follow=olympe.dc.CloudObject.prototype.sb;olympe.dc.CloudObject.prototype.getProperty=olympe.dc.CloudObject.prototype.fb;
682
- olympe.dc.CloudObject.prototype.get=olympe.dc.CloudObject.prototype.get;olympe.dc.CloudObject.prototype.observeProperty=olympe.dc.CloudObject.prototype.Zx;olympe.dc.CloudObject.prototype.observeProperties=olympe.dc.CloudObject.prototype.yn;olympe.dc.CloudObject.prototype.observe=olympe.dc.CloudObject.prototype.observe;olympe.dc.CloudObject.prototype.getModelTag=olympe.dc.CloudObject.prototype.Tb;olympe.dc.CloudObject.prototype.isPersisted=olympe.dc.CloudObject.prototype.Wf;
683
- olympe.dc.CloudObject.prototype.query=olympe.dc.CloudObject.prototype.query;olympe.dc.CloudObject.prototype.getModel=olympe.dc.CloudObject.prototype.nh;olympe.dc.CloudObject.prototype.name=olympe.dc.CloudObject.prototype.name;olympe.dc.CloudObject.prototype.getTag=olympe.dc.CloudObject.prototype.R;olympe.dc.CloudObject.getInstancesOf=olympe.dc.CloudObject.Hw;olympe.dc.CloudObject.getInstance=olympe.dc.CloudObject.Lf;olympe.dc.CloudObject.getRelations=olympe.dc.CloudObject.ld;
684
- olympe.dc.CloudObject.getProperties=olympe.dc.CloudObject.kd;olympe.dc.CloudObject.instancesOf=olympe.dc.CloudObject.Xk;olympe.dc.CloudObject.asInstance=olympe.dc.CloudObject.zv;olympe.dc.CloudObject.createWith=olympe.dc.CloudObject.Pv;olympe.dc.CloudObject.get=olympe.dc.CloudObject.get;olympe.dc.CloudObject.O=olympe.dc.ya.C('ff021000000000000001',olympe.dc.CloudObject);olympe.dc.CloudObject.al=olympe.dc.CloudObject.O.va(olympe.dc.$b.VERSION);olympe.dc.CloudObject.nameProp=olympe.dc.CloudObject.O.va('ff023000000000000011');
677
+ return new rxjs.Observable(c=>{const d=xd(this.db,this.tag,(e,f)=>{null===f||void 0===f?c.next([new olympe.dc.ta.Property(e),null]):c.next([new olympe.dc.ta.Property(e),f])});b.zc(()=>{c.complete();yd(this.db,this.tag,d)});return()=>yd(this.db,this.tag,d)})}$x(a){return this.observe(olympe.D.Ja(),a)}get(a){return this.db.fb(this.tag,a,!0)}fb(a){return this.get(a)}sb(a){return olympe.dc.gb.from(this).sb(a)}fw(a){return olympe.dc.od.from(this).sb(a)}qw(){return this.qc(olympe.dc.CloudObject.Lb,olympe.dc.CloudObject)}cn(){return this.tb(olympe.dc.CloudObject.containsRel,
678
+ olympe.dc.CloudObject)}Of(a,b,c){const d=olympe.D.Uc(c,'Sync valueType'),e=wd(this.db,this.tag,a,olympe.D.Ja().C(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}Gb(a){return L(this.Of(a,olympe.dc.W.Vb.Qm,olympe.D.Wa))}He(a){return L(this.Of(a,olympe.dc.W.Vb.Pm,olympe.D.ea))}Bg(a){return L(this.Of(a,olympe.dc.W.Vb.Nm,olympe.D.qa))}jj(a){return L(this.Of(a,olympe.dc.W.Vb.Om,olympe.D.jb))}Wr(){return L(this.Of(olympe.dm.Color.valueProp,
679
+ olympe.dc.W.Vb.Er,olympe.D.Color))}Xr(){return L(this.Of(olympe.sc.workflow.Transition.processRefProp,olympe.dc.W.Vb.Fr,olympe.dc.CloudObject))}tb(a,b){a=a instanceof olympe.dc.X.Sb?a:new olympe.dc.X.Sb(a.R(),a.Pa());return new olympe.dc.Ca(this.R(),a,b)}qc(a,b){return this.tb(a,b).Sc()}Nr(a,b){const c=this.db,d=olympe.W.fc(),e=olympe.D.Ja(),f=new Map;V(c,this.tag,a,(g,h)=>{g?(g=new olympe.D.Xb(`forEachRelated: (${this.tag})-[:${a.R()}]-(${h})`,e),f.set(h,g),g.run(b,olympe.dc.CloudObject.get(h))):
680
+ f.has(h)&&(f.get(h).destroy(),f.delete(h))},d);e.zc(()=>{c.C(this.tag,a,d)})}Iy(){return new olympe.dc.Ca(this.R(),[],Fc(this.R()))}transform(...a){return(new olympe.dc.Ca(this.R(),[],this.constructor)).transform(...a)}Vc(){return this.Rr()}toString(){if(!this.db.Eb(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.Eb(this.tag))return{CloudObject:'Unknown tag'};
681
+ 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})`}}uh(a=!1,b=!0){const c={};this.db.kd(this,b).forEach((d,e)=>{e=a?this.db.name(e):e;c[e]=d});return c}qb(a){return a instanceof olympe.dc.CloudObject?this.R()===a.R():!1}Td(a){return olympe.D.Fa([a],b=>olympe.D.Cc(this.qb(b)),olympe.D.qa)}Sv(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.Aa.ORIGIN;for(const [e,f,g]of Ad(b,
682
+ this))f===d?a.ec(e,g,this):e!==olympe.dc.CloudObject.modelRel.R()&&a.ec(e,this,g);a.delete(this,olympe.dc.Ub.NONE);c&&a.hb()}};olympe.dc.CloudObject.prototype.equals=olympe.dc.CloudObject.prototype.qb;olympe.dc.CloudObject.prototype.toObject=olympe.dc.CloudObject.prototype.uh;olympe.dc.CloudObject.prototype.followSingle=olympe.dc.CloudObject.prototype.fw;olympe.dc.CloudObject.prototype.follow=olympe.dc.CloudObject.prototype.sb;olympe.dc.CloudObject.prototype.getProperty=olympe.dc.CloudObject.prototype.fb;
683
+ olympe.dc.CloudObject.prototype.get=olympe.dc.CloudObject.prototype.get;olympe.dc.CloudObject.prototype.observeProperty=olympe.dc.CloudObject.prototype.$x;olympe.dc.CloudObject.prototype.observeProperties=olympe.dc.CloudObject.prototype.yn;olympe.dc.CloudObject.prototype.observe=olympe.dc.CloudObject.prototype.observe;olympe.dc.CloudObject.prototype.getModelTag=olympe.dc.CloudObject.prototype.Tb;olympe.dc.CloudObject.prototype.isPersisted=olympe.dc.CloudObject.prototype.Wf;
684
+ olympe.dc.CloudObject.prototype.query=olympe.dc.CloudObject.prototype.query;olympe.dc.CloudObject.prototype.getModel=olympe.dc.CloudObject.prototype.nh;olympe.dc.CloudObject.prototype.name=olympe.dc.CloudObject.prototype.name;olympe.dc.CloudObject.prototype.getTag=olympe.dc.CloudObject.prototype.R;olympe.dc.CloudObject.getInstancesOf=olympe.dc.CloudObject.Iw;olympe.dc.CloudObject.getInstance=olympe.dc.CloudObject.Lf;olympe.dc.CloudObject.getRelations=olympe.dc.CloudObject.ld;
685
+ olympe.dc.CloudObject.getProperties=olympe.dc.CloudObject.kd;olympe.dc.CloudObject.instancesOf=olympe.dc.CloudObject.Xk;olympe.dc.CloudObject.asInstance=olympe.dc.CloudObject.Av;olympe.dc.CloudObject.createWith=olympe.dc.CloudObject.Qv;olympe.dc.CloudObject.get=olympe.dc.CloudObject.get;olympe.dc.CloudObject.O=olympe.dc.ya.C('ff021000000000000001',olympe.dc.CloudObject);olympe.dc.CloudObject.al=olympe.dc.CloudObject.O.va(olympe.dc.$b.VERSION);olympe.dc.CloudObject.nameProp=olympe.dc.CloudObject.O.va('ff023000000000000011');
685
686
  z('olympe.dc.CloudObject.nameProp',olympe.dc.CloudObject.nameProp);olympe.dc.CloudObject.Y=olympe.dc.CloudObject.O.va('ff023000000000000012');olympe.dc.CloudObject.G=olympe.dc.CloudObject.O.Ha('ff02200000000000000a');olympe.dc.CloudObject.U=olympe.dc.CloudObject.O.Ha('ff02200000000000000b',olympe.dc.Aa.ORIGIN);olympe.dc.CloudObject.Df=olympe.dc.CloudObject.O.Ha('017e9c4ba4c847d71cbf');olympe.dc.CloudObject.be=olympe.dc.CloudObject.O.Ha('017ea013caf8e89cedb2');olympe.dc.CloudObject.propertyRel=olympe.dc.CloudObject.O.Ha('ff02200000000000000c');
686
687
  z('olympe.dc.CloudObject.propertyRel',olympe.dc.CloudObject.propertyRel);olympe.dc.CloudObject.typeRel=olympe.dc.CloudObject.O.Ha('ff02200000000000000d',olympe.dc.Aa.ORIGIN);olympe.dc.CloudObject.modelRel=olympe.dc.CloudObject.O.Ha(olympe.dc.kc.Xc);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);
687
688
  olympe.dc.CloudObject.extendRel=olympe.dc.CloudObject.O.Ha(olympe.dc.kc.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.Ha(olympe.dc.kc.jo);z('olympe.dc.CloudObject.containsRel',olympe.dc.CloudObject.containsRel);
688
- olympe.dc.CloudObject.Lb=P(olympe.dc.CloudObject.O,olympe.dc.CloudObject.containsRel);olympe.dc.mB=olympe.dc.CloudObject;olympe.dc.CloudObject.la=[olympe.dc.ze];m=olympe.dc.CloudObject.prototype;m.R.K=new olympe.D.J(()=>String,[]);m.name.K=new olympe.D.J(()=>String,[]);m.ma.K=olympe.D.J.F;m.nh.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.ox.K=new olympe.D.J(()=>Number,[]);m.It.K=new olympe.D.J(()=>String,[]);m.Qr.K=olympe.D.J.F;m.Tb.K=new olympe.D.J(()=>String,[]);
689
- m.pw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.cn.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.Of.K=new olympe.D.J(()=>olympe.D.Node,[]);m.Gb.K=olympe.D.J.F;m.He.K=olympe.D.J.G;m.Bg.K=olympe.D.J.U;m.jj.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Vr.K=new olympe.D.J(()=>olympe.D.Color,[]);m.Wr.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.tb.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.qc.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Mr.K=new olympe.D.J(()=>{},[]);
690
- m.Hy.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.transform.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.Vc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.qb.K=olympe.D.J.C;m.Td.K=olympe.D.J.U;m.Rv.K=new olympe.D.J(()=>{},[]);olympe.dc.fk=class{constructor(a){this.instance=a}R(){return this.instance.R()}lj(){return mb(this.instance.Bg(olympe.dc.CloudObject.Y))}Aw(){return this.instance.qc(olympe.dc.CloudObject.extendRel,olympe.dc.CloudObject)}Tk(){return this.instance.transform(new olympe.dc.X.Fc(olympe.dc.CloudObject.extendRel.R(),olympe.dc.Aa.DESTINATION,olympe.dc.X.sk.dt))}hn(){return this.instance.transform(new olympe.dc.X.Fc(olympe.dc.CloudObject.extendRel.R(),olympe.dc.Aa.DESTINATION,olympe.dc.X.sk.up))}kd(){return this.hn().transform(olympe.dc.CloudObject.propertyRel,
691
- new olympe.dc.X.we)}Qw(){return this.instance.transform(olympe.dc.CloudObject.propertyRel)}ld(){return this.hn().transform(olympe.dc.CloudObject.G,new olympe.dc.X.we)}Rw(){return this.instance.transform(olympe.dc.CloudObject.G)}static from(a){return olympe.D.Fa([a],b=>{const c=b.R(),d=olympe.dc.Oa();if(!d.mj(c))throw Error(`Instance "${d.name(c)}" (tag=${c}) is not a model.`);return new olympe.dc.fk(b)},olympe.dc.fk,'transformToModelInfo')}static lj(){return mb((void 0).Bg(olympe.dc.CloudObject.Y))}};
692
- olympe.dc.fk.la=[olympe.dc.ze];m=olympe.dc.fk.prototype;m.Aw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Tk.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.hn.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.kd.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.Qw.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.ld.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.Rw.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dc.tA=class{};olympe.dc.da={};olympe.dc.da.yp=class{constructor(a){this.N=a}};olympe.dc.da.yp.hd={Ri:0,LA:1,MA:3,vA:4};olympe.dc.da.Zj=class{};function Y(a){if(a.Y)throw Error('Cannot modify definition after definition is written');}
693
- olympe.dc.da.Zb=class{constructor(a,b){a=this.C=a;if(a.C)throw b=a.C.ma(),a=a.C.R(),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.aa=olympe.dc.CloudObject.O.R();this.Da=new Map;this.oa=new Map;this.Y=this.ka=!1;this.U=null}En(a){Y(this);this.aa=a;return this}Tb(){return this.aa}ii(a){Y(this);
694
- this.U=a;return this}vy(){this.ka=!0;return this}uy(a){Y(this);const b=new Map;if('string'===typeof a){const c=olympe.dc.CloudObject.nameProp.R();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}gl(a){Y(this);const b=olympe.dc.CloudObject.nameProp.R();this.F.set(b,a);return this}Jm(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');
695
- if(a===olympe.dc.CloudObject.containsRel.R())throw Error('Container must be defined using dedicated helpers setContainedIn');b&&this.Da.set(a+'.'+b,[a,b]);return this}Im(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');if(a===olympe.dc.CloudObject.containsRel.R())throw Error('Container must be defined using dedicated helper setContainedIn');b&&this.oa.set(a+'.'+b,[a,b]);return this}done(){if(this.Y)return this;const a=eh(this.C,this.ka);a.F(this.tag,this.F,
689
+ olympe.dc.CloudObject.Lb=P(olympe.dc.CloudObject.O,olympe.dc.CloudObject.containsRel);olympe.dc.nB=olympe.dc.CloudObject;olympe.dc.CloudObject.la=[olympe.dc.ze];m=olympe.dc.CloudObject.prototype;m.R.K=new olympe.D.J(()=>String,[]);m.name.K=new olympe.D.J(()=>String,[]);m.ma.K=olympe.D.J.F;m.nh.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.px.K=new olympe.D.J(()=>Number,[]);m.Jt.K=new olympe.D.J(()=>String,[]);m.Rr.K=olympe.D.J.F;m.Tb.K=new olympe.D.J(()=>String,[]);
690
+ m.qw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.cn.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.Of.K=new olympe.D.J(()=>olympe.D.Node,[]);m.Gb.K=olympe.D.J.F;m.He.K=olympe.D.J.G;m.Bg.K=olympe.D.J.U;m.jj.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Wr.K=new olympe.D.J(()=>olympe.D.Color,[]);m.Xr.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.tb.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.qc.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Nr.K=new olympe.D.J(()=>{},[]);
691
+ m.Iy.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.transform.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.Vc.K=olympe.D.J.F;m.toString.K=olympe.D.J.C;m.qb.K=olympe.D.J.C;m.Td.K=olympe.D.J.U;m.Sv.K=new olympe.D.J(()=>{},[]);olympe.dc.fk=class{constructor(a){this.instance=a}R(){return this.instance.R()}lj(){return mb(this.instance.Bg(olympe.dc.CloudObject.Y))}Bw(){return this.instance.qc(olympe.dc.CloudObject.extendRel,olympe.dc.CloudObject)}Tk(){return this.instance.transform(new olympe.dc.X.Fc(olympe.dc.CloudObject.extendRel.R(),olympe.dc.Aa.DESTINATION,olympe.dc.X.sk.et))}hn(){return this.instance.transform(new olympe.dc.X.Fc(olympe.dc.CloudObject.extendRel.R(),olympe.dc.Aa.DESTINATION,olympe.dc.X.sk.vp))}kd(){return this.hn().transform(olympe.dc.CloudObject.propertyRel,
692
+ new olympe.dc.X.we)}Rw(){return this.instance.transform(olympe.dc.CloudObject.propertyRel)}ld(){return this.hn().transform(olympe.dc.CloudObject.G,new olympe.dc.X.we)}Sw(){return this.instance.transform(olympe.dc.CloudObject.G)}static from(a){return olympe.D.Fa([a],b=>{const c=b.R(),d=olympe.dc.Oa();if(!d.mj(c))throw Error(`Instance "${d.name(c)}" (tag=${c}) is not a model.`);return new olympe.dc.fk(b)},olympe.dc.fk,'transformToModelInfo')}static lj(){return mb((void 0).Bg(olympe.dc.CloudObject.Y))}};
693
+ olympe.dc.fk.la=[olympe.dc.ze];m=olympe.dc.fk.prototype;m.Bw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Tk.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.hn.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.kd.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.Rw.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.ld.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.Sw.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dc.uA=class{};olympe.dc.da={};olympe.dc.da.zp=class{constructor(a){this.N=a}};olympe.dc.da.zp.hd={Ri:0,MA:1,NA:3,wA:4};olympe.dc.da.Zj=class{};function Y(a){if(a.Y)throw Error('Cannot modify definition after definition is written');}
694
+ olympe.dc.da.Zb=class{constructor(a,b){a=this.C=a;if(a.C)throw b=a.C.ma(),a=a.C.R(),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.aa=olympe.dc.CloudObject.O.R();this.Da=new Map;this.oa=new Map;this.Y=this.ja=!1;this.U=null}En(a){Y(this);this.aa=a;return this}Tb(){return this.aa}ii(a){Y(this);
695
+ this.U=a;return this}wy(){this.ja=!0;return this}vy(a){Y(this);const b=new Map;if('string'===typeof a){const c=olympe.dc.CloudObject.nameProp.R();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}gl(a){Y(this);const b=olympe.dc.CloudObject.nameProp.R();this.F.set(b,a);return this}Jm(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');
696
+ if(a===olympe.dc.CloudObject.containsRel.R())throw Error('Container must be defined using dedicated helpers setContainedIn');b&&this.Da.set(a+'.'+b,[a,b]);return this}Im(a,b){Y(this);if(!a)throw Error('Cannot relate an object to another without a relation tag');if(a===olympe.dc.CloudObject.containsRel.R())throw Error('Container must be defined using dedicated helper setContainedIn');b&&this.oa.set(a+'.'+b,[a,b]);return this}done(){if(this.Y)return this;const a=eh(this.C,this.ja);a.F(this.tag,this.F,
696
697
  -1);fh(this.C,this);a.Ra(olympe.dc.kc.Xc,this.tag,this.aa,-1);this.U&&a.Ra(olympe.dc.kc.jo,this.U,this.tag,-1);this.G(-1);this.Da.forEach(b=>{a.Ra(b[0],this.tag,b[1],-1)});this.oa.forEach(b=>{a.Ra(b[0],b[1],this.tag,-1)});this.Y=!0;this.C.C=void 0;return this}G(){}R(){return this.tag}ma(){return this.F.get('ff023000000000000011')}};olympe.dc.da.Zb.prototype.getName=olympe.dc.da.Zb.prototype.ma;olympe.dc.da.Zb.prototype.getTag=olympe.dc.da.Zb.prototype.R;olympe.dc.da.Zb.prototype.done=olympe.dc.da.Zb.prototype.done;
697
- olympe.dc.da.Zb.prototype.addRelationFrom=olympe.dc.da.Zb.prototype.Im;olympe.dc.da.Zb.prototype.addRelationTo=olympe.dc.da.Zb.prototype.Jm;olympe.dc.da.Zb.prototype.setName=olympe.dc.da.Zb.prototype.gl;olympe.dc.da.Zb.prototype.setProperty=olympe.dc.da.Zb.prototype.setProperty;olympe.dc.da.Zb.prototype.setProperties=olympe.dc.da.Zb.prototype.ji;olympe.dc.da.Zb.prototype.setNameOrProperties=olympe.dc.da.Zb.prototype.uy;olympe.dc.da.Zb.prototype.setOptional=olympe.dc.da.Zb.prototype.vy;
698
- olympe.dc.da.Zb.prototype.setContainedIn=olympe.dc.da.Zb.prototype.ii;olympe.dc.da.Zb.prototype.setModelTag=olympe.dc.da.Zb.prototype.En;olympe.dc.da.dd=class extends olympe.dc.da.Zb{constructor(a,b){super(a,b);this.Sa=this.C.OBJECT;this.Ya=new Map;this.ab=new Map}ls(a){Y(this);this.Sa=a;return this}extends(a){return this.ls(a)}Ui(){Y(this);this.setProperty(olympe.dc.CloudObject.Y.R(),!0);return this}defineProperty(a,b,c,d,e){Y(this);this.Ya.set(a,new olympe.dc.da.dd.Property(a,b,c,d));void 0!==d&&super.setProperty(olympe.dc.Ug.jc+a,d);void 0!==e&&(this.C.push(),this.C.Gg(this.C.Uk(a),olympe.sc.oc.O.R()).setProperty(olympe.sc.oc.C.R(),
698
+ olympe.dc.da.Zb.prototype.addRelationFrom=olympe.dc.da.Zb.prototype.Im;olympe.dc.da.Zb.prototype.addRelationTo=olympe.dc.da.Zb.prototype.Jm;olympe.dc.da.Zb.prototype.setName=olympe.dc.da.Zb.prototype.gl;olympe.dc.da.Zb.prototype.setProperty=olympe.dc.da.Zb.prototype.setProperty;olympe.dc.da.Zb.prototype.setProperties=olympe.dc.da.Zb.prototype.ji;olympe.dc.da.Zb.prototype.setNameOrProperties=olympe.dc.da.Zb.prototype.vy;olympe.dc.da.Zb.prototype.setOptional=olympe.dc.da.Zb.prototype.wy;
699
+ olympe.dc.da.Zb.prototype.setContainedIn=olympe.dc.da.Zb.prototype.ii;olympe.dc.da.Zb.prototype.setModelTag=olympe.dc.da.Zb.prototype.En;olympe.dc.da.dd=class extends olympe.dc.da.Zb{constructor(a,b){super(a,b);this.Sa=this.C.OBJECT;this.Ya=new Map;this.ab=new Map}ms(a){Y(this);this.Sa=a;return this}extends(a){return this.ms(a)}Ui(){Y(this);this.setProperty(olympe.dc.CloudObject.Y.R(),!0);return this}defineProperty(a,b,c,d,e){Y(this);this.Ya.set(a,new olympe.dc.da.dd.Property(a,b,c,d));void 0!==d&&super.setProperty(olympe.dc.Ug.jc+a,d);void 0!==e&&(this.C.push(),this.C.Gg(this.C.Uk(a),olympe.sc.oc.O.R()).setProperty(olympe.sc.oc.C.R(),
699
700
  e).ii(this.tag).Jm(olympe.sc.oc.F.R(),a).done(),this.C.pop());return this}ih(a,b,c,d,e,{Yi:f=0,xj:g=0,il:h=d,Xi:k=olympe.dm.Nc.NONE,uj:l=olympe.dm.Relation.L|k}={}){Y(this);b=new olympe.dc.da.dd.Relation(a,this.R(),b,c||'',d,e,g,h,f,l,k);this.ab.set(a,b);return this}G(a){super.G(a);eh(this.C).Ra(olympe.dc.CloudObject.extendRel.R(),this.tag,this.Sa,a);this.Ya.forEach(b=>{const c={[olympe.dc.CloudObject.nameProp.R()]:b.name||''},d=olympe.dc.wa(olympe.dm.Property),e=olympe.dc.CloudObject.propertyRel.R(),
700
- f=b.tag;this.C.push();this.C.Gg(f,d).ji(c).done();this.C.pop();b=b.type;eh(this.C).Ra(e,this.R(),f,a);eh(this.C).Ra(olympe.dm.Property.typeRel.R(),f,b,a)});this.ab.forEach(b=>{this.C.ih(b.C,b.G,b.F,b.name,b.Lr,b.Jr,{xj:b.xj,il:b.il,Yi:b.Yi,uj:b.uj,Xi:b.Xi},a)})}};olympe.dc.da.dd.prototype.defineRelation=olympe.dc.da.dd.prototype.ih;olympe.dc.da.dd.prototype.defineProperty=olympe.dc.da.dd.prototype.defineProperty;olympe.dc.da.dd.prototype['abstract']=olympe.dc.da.dd.prototype.Ui;
701
- olympe.dc.da.dd.prototype['extends']=olympe.dc.da.dd.prototype.extends;olympe.dc.da.dd.prototype.setParentTag=olympe.dc.da.dd.prototype.ls;olympe.dc.da.dd.Property=class{constructor(a,b,c,d){this.tag=a;this.type=b;this.name=c||'';this.defaultValue=d}};olympe.dc.da.dd.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.Lr=e;this.Jr=f;this.xj=g;this.il=h;this.Yi=k;this.uj=l;this.Xi=n}};function eh(a,b){return b?a.Y:a.F}function fh(a,b){0<a.L.length&&(b.U||a.F.Ra(olympe.dc.CloudObject.containsRel.R(),a.L[a.L.length-1].R(),b.R(),-1))}
702
- olympe.dc.da.Qa=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.vd(!0);this.Y=new olympe.dc.transaction.vd(!0);this.N=a||null;this.Da=!1;this.G=null;this.oa=new Map;this.aa=null;this.ka=Object.create(null);this.C=void 0;this.L=[];this.U=!0;this.gs=/eval \(eval at process .*<anonymous>:(\d+):(\d+)\)/m;this.DEFAULT=olympe.dc.Ug.jc;this.OBJECT=olympe.dc.CloudObject.O.R();
703
- this.PROPERTY=olympe.dm.Property.O.R();this.RELATION=olympe.dm.Relation.O.R();this.STRING=olympe.dm.String.O.R();this.BOOLEAN=olympe.dm.Boolean.O.R();this.NUMBER=olympe.dm.Number.O.R();this.DATETIME=olympe.dm.DateTime.O.R();this.COLOR=olympe.dm.Color.O.R();this.FILE=olympe.dm.File.O.R();this.ROLE=olympe.dm.ed.O.R();this.USER=olympe.dm.User.O.R();this.ONE_ONE=olympe.dm.Relation.F.nu;this.ONE_MANY=olympe.dm.Relation.F.cm;this.MANY_ONE=olympe.dm.Relation.F.fu;this.MANY_MANY=olympe.dm.Relation.F.Yl;this.NONE=
704
- olympe.dm.Nc.NONE;this.DESTINATION_READ=olympe.dm.Nc.Qs;this.DESTINATION_CREATE=olympe.dm.Nc.Ao;this.DESTINATION_WRITE=olympe.dm.Nc.Rs;this.DESTINATION_DELETE=olympe.dm.Nc.Ns;this.DESTINATION_LINK=olympe.dm.Nc.Ps;this.DESTINATION_FULL=olympe.dm.Nc.Os;this.ORIGIN_READ=olympe.dm.Nc.ru;this.ORIGIN_CREATE=olympe.dm.Nc.ou;this.ORIGIN_WRITE=olympe.dm.Nc.su;this.ORIGIN_DELETE=olympe.dm.Nc.pu;this.ORIGIN_LINK=olympe.dm.Nc.gq;this.ORIGIN_FULL=olympe.dm.Nc.qu;this.FULL=olympe.dm.Nc.ft;this.DUMP_IGNORE=olympe.dm.Relation.C.Nl;
705
- this.DUMP_REF=olympe.dm.Relation.C.Aq;this.DUMP_REVERSE_REF=olympe.dm.Relation.C.Ku;this.DUMP_UNILATERAL=olympe.dm.Relation.C.Ck;this.DUMP_REVERSE_UNILATERAL=olympe.dm.Relation.C.rk;this.DUMP_EVERYTHING=olympe.dm.Relation.C.Ho;this.DUMP_DEFAULT=olympe.dm.Relation.C.jc;this.DUMP_REV_DEFAULT=olympe.dm.Relation.C.Ju;this.DELETE_REF=this.DUMP_BOTH_REF=olympe.dm.Relation.C.rl;this.DELETE_REF_AND_DESTINATION=olympe.dm.Relation.C.Gu;this.DELETE_REF_AND_ORIGIN=olympe.dm.Relation.C.Hu;this.DELETE_EVERYTHING=
706
- olympe.dm.Relation.C.Ho;this.OLYMPE_AUTHENTICATED_USERS=olympe.dm.ed.F}push(){this.L.push(this.C);this.C=void 0}pop(){if(this.C)throw Error('Cannot unstack definition: current definition not closed');this.C=this.L.pop()}bw(){const a=new Map,b=olympe.dc.da.Uu.C(this.aa,this.F,this.Y);for(const [c,d]of b.entries())a.set(c,d.uh());return a}Zw(){return this.aa}ty(a){this.U=a}log(...a){this.U&&this.N&&this.N.log(...a)}tn(...a){this.U&&this.N&&this.N.debug(...a)}Bx(...a){this.U&&this.N&&this.N.warn(...a)}bl(...a){this.U&&
707
- this.N&&this.N.error(...a)}Bv(a){if(a&&20===a.length&&!this.Da){if(this.ka[a])throw Error('Tag '+a+' is used to define more than one keyword');return this.ka[a]=a}this.G=null===this.G?olympe.W.dj():olympe.W.Xw(this.G);this.log('Generating new tag to replace '+a+'. New tag is: '+this.G);return this.G}Uk(a){const b=this.oa.get(a)||1,c=olympe.W.Uk(a,b);this.oa.set(a,b+1);return c}zy(a){this.Da=a}Tv(){}xy(a){this.aa=a}Gg(a,b){return(new olympe.dc.da.Zb(this,a)).En(b)}Rx(a,b){return(new olympe.dc.da.dd(this,
708
- a)).gl(b)}Qx(a,b){return(new olympe.dc.da.dd(this,a)).gl(b).Ui()}Sx(a){return new olympe.dc.da.xf(this,a)}dl(a,b,c){this.F.Ra(a,b,c,-1)}defineProperty(a,b,c,d,e){this.tn('Defining property ',d,' on model ',a);d={[olympe.dc.CloudObject.nameProp.R()]:d||''};void 0!==e&&this.tc(a,{[olympe.dc.Ug.jc+c]:e});this.C?(this.push(),this.Gg(c,olympe.dm.Property.O.R()).ji(d).done(),this.pop()):this.Gg(c,olympe.dm.Property.O.R()).ji(d).ii(a).done();this.dl(olympe.dc.CloudObject.propertyRel.R(),a,c);this.dl(olympe.dm.Property.typeRel.R(),
701
+ f=b.tag;this.C.push();this.C.Gg(f,d).ji(c).done();this.C.pop();b=b.type;eh(this.C).Ra(e,this.R(),f,a);eh(this.C).Ra(olympe.dm.Property.typeRel.R(),f,b,a)});this.ab.forEach(b=>{this.C.ih(b.C,b.G,b.F,b.name,b.Mr,b.Kr,{xj:b.xj,il:b.il,Yi:b.Yi,uj:b.uj,Xi:b.Xi},a)})}};olympe.dc.da.dd.prototype.defineRelation=olympe.dc.da.dd.prototype.ih;olympe.dc.da.dd.prototype.defineProperty=olympe.dc.da.dd.prototype.defineProperty;olympe.dc.da.dd.prototype['abstract']=olympe.dc.da.dd.prototype.Ui;
702
+ olympe.dc.da.dd.prototype['extends']=olympe.dc.da.dd.prototype.extends;olympe.dc.da.dd.prototype.setParentTag=olympe.dc.da.dd.prototype.ms;olympe.dc.da.dd.Property=class{constructor(a,b,c,d){this.tag=a;this.type=b;this.name=c||'';this.defaultValue=d}};olympe.dc.da.dd.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.Mr=e;this.Kr=f;this.xj=g;this.il=h;this.Yi=k;this.uj=l;this.Xi=n}};function eh(a,b){return b?a.Y:a.F}function fh(a,b){0<a.L.length&&(b.U||a.F.Ra(olympe.dc.CloudObject.containsRel.R(),a.L[a.L.length-1].R(),b.R(),-1))}
703
+ olympe.dc.da.Qa=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.vd(!0);this.Y=new olympe.dc.transaction.vd(!0);this.N=a||null;this.Da=!1;this.G=null;this.oa=new Map;this.aa=null;this.ja=Object.create(null);this.C=void 0;this.L=[];this.U=!0;this.hs=/eval \(eval at process .*<anonymous>:(\d+):(\d+)\)/m;this.DEFAULT=olympe.dc.Ug.jc;this.OBJECT=olympe.dc.CloudObject.O.R();
704
+ this.PROPERTY=olympe.dm.Property.O.R();this.RELATION=olympe.dm.Relation.O.R();this.STRING=olympe.dm.String.O.R();this.BOOLEAN=olympe.dm.Boolean.O.R();this.NUMBER=olympe.dm.Number.O.R();this.DATETIME=olympe.dm.DateTime.O.R();this.COLOR=olympe.dm.Color.O.R();this.FILE=olympe.dm.File.O.R();this.ROLE=olympe.dm.ed.O.R();this.USER=olympe.dm.User.O.R();this.ONE_ONE=olympe.dm.Relation.F.ou;this.ONE_MANY=olympe.dm.Relation.F.cm;this.MANY_ONE=olympe.dm.Relation.F.gu;this.MANY_MANY=olympe.dm.Relation.F.Yl;this.NONE=
705
+ olympe.dm.Nc.NONE;this.DESTINATION_READ=olympe.dm.Nc.Rs;this.DESTINATION_CREATE=olympe.dm.Nc.Ao;this.DESTINATION_WRITE=olympe.dm.Nc.Ss;this.DESTINATION_DELETE=olympe.dm.Nc.Os;this.DESTINATION_LINK=olympe.dm.Nc.Qs;this.DESTINATION_FULL=olympe.dm.Nc.Ps;this.ORIGIN_READ=olympe.dm.Nc.su;this.ORIGIN_CREATE=olympe.dm.Nc.pu;this.ORIGIN_WRITE=olympe.dm.Nc.tu;this.ORIGIN_DELETE=olympe.dm.Nc.qu;this.ORIGIN_LINK=olympe.dm.Nc.hq;this.ORIGIN_FULL=olympe.dm.Nc.ru;this.FULL=olympe.dm.Nc.gt;this.DUMP_IGNORE=olympe.dm.Relation.C.Nl;
706
+ this.DUMP_REF=olympe.dm.Relation.C.Bq;this.DUMP_REVERSE_REF=olympe.dm.Relation.C.Lu;this.DUMP_UNILATERAL=olympe.dm.Relation.C.Ck;this.DUMP_REVERSE_UNILATERAL=olympe.dm.Relation.C.rk;this.DUMP_EVERYTHING=olympe.dm.Relation.C.Ho;this.DUMP_DEFAULT=olympe.dm.Relation.C.jc;this.DUMP_REV_DEFAULT=olympe.dm.Relation.C.Ku;this.DELETE_REF=this.DUMP_BOTH_REF=olympe.dm.Relation.C.rl;this.DELETE_REF_AND_DESTINATION=olympe.dm.Relation.C.Hu;this.DELETE_REF_AND_ORIGIN=olympe.dm.Relation.C.Iu;this.DELETE_EVERYTHING=
707
+ olympe.dm.Relation.C.Ho;this.OLYMPE_AUTHENTICATED_USERS=olympe.dm.ed.F}push(){this.L.push(this.C);this.C=void 0}pop(){if(this.C)throw Error('Cannot unstack definition: current definition not closed');this.C=this.L.pop()}cw(){const a=new Map,b=olympe.dc.da.Vu.C(this.aa,this.F,this.Y);for(const [c,d]of b.entries())a.set(c,d.uh());return a}$w(){return this.aa}uy(a){this.U=a}log(...a){this.U&&this.N&&this.N.log(...a)}tn(...a){this.U&&this.N&&this.N.debug(...a)}Cx(...a){this.U&&this.N&&this.N.warn(...a)}bl(...a){this.U&&
708
+ this.N&&this.N.error(...a)}Cv(a){if(a&&20===a.length&&!this.Da){if(this.ja[a])throw Error('Tag '+a+' is used to define more than one keyword');return this.ja[a]=a}this.G=null===this.G?olympe.W.dj():olympe.W.Yw(this.G);this.log('Generating new tag to replace '+a+'. New tag is: '+this.G);return this.G}Uk(a){const b=this.oa.get(a)||1,c=olympe.W.Uk(a,b);this.oa.set(a,b+1);return c}Ay(a){this.Da=a}Uv(){}yy(a){this.aa=a}Gg(a,b){return(new olympe.dc.da.Zb(this,a)).En(b)}Sx(a,b){return(new olympe.dc.da.dd(this,
709
+ a)).gl(b)}Rx(a,b){return(new olympe.dc.da.dd(this,a)).gl(b).Ui()}Tx(a){return new olympe.dc.da.xf(this,a)}dl(a,b,c){this.F.Ra(a,b,c,-1)}defineProperty(a,b,c,d,e){this.tn('Defining property ',d,' on model ',a);d={[olympe.dc.CloudObject.nameProp.R()]:d||''};void 0!==e&&this.tc(a,{[olympe.dc.Ug.jc+c]:e});this.C?(this.push(),this.Gg(c,olympe.dm.Property.O.R()).ji(d).done(),this.pop()):this.Gg(c,olympe.dm.Property.O.R()).ji(d).ii(a).done();this.dl(olympe.dc.CloudObject.propertyRel.R(),a,c);this.dl(olympe.dm.Property.typeRel.R(),
709
710
  c,b)}ih(a,b,c,d,e,f,{Yi:g=olympe.dm.Relation.F.cm,xj:h=olympe.dm.Relation.C.Nl,il:k=e,Xi:l=olympe.dm.Nc.NONE,uj:n=olympe.dm.Relation.L|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=
710
- olympe.dm.Relation;d={[olympe.dc.CloudObject.nameProp.R()]:d||'',[q.Mm.R()]:g,[q.zn.R()]:n,[q.Wm.R()]:e,[q.Vm.R()]:f,[q.Cn.R()]:h,[q.Gn.R()]:k,[q.Ar.R()]:l};this.C?(this.push(),this.Gg(a,q.O.R()).ji(d).done(),this.pop()):this.Gg(a,q.O.R()).ji(d).ii(b).done();this.F.Ra(q.originModelRel.R(),b,a,p);this.F.Ra(q.destinationModelRel.R(),a,c,p)}zx(a,b){this.F.Ra(olympe.dm.ed.C.R(),a,b,-1)}tc(a,b,c=!1){this.tn('Updating instance ',a);delete b[olympe.dc.$b.Jd];delete b[olympe.dc.$b.VERSION];const d=new Map;
711
- Object.keys(b).forEach(e=>{d.set(e,b[e])});this.F.tc(a,d,c,-1)}assign(a,b,c){this.dl(b,a,c)}Av(a,b,c){this.Y.Ra(b,a,c,-1)}Ov(a){return new olympe.dc.Jc(a)}Jv(a,b,c,d){const e={c:7};e.r=a;e.g=b;e.b=c;e.a=d;return e}Kv({year:a=1970,month:b=1,day:c=1,hour:d=1,minute:e=0,second:f=0,aD:g=0,mD:h=0}={}){const k={c:4};k.y=a;k.M=b;k.d=c;k.h=d;k.m=e;k.s=f;k.S=g;k.z=h;return k}gw(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();
712
- b.s=a.getSeconds();b.S=a.getMilliseconds();b.z=-a.getTimezoneOffset();return b}Lv(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}cj(a,b,c){return olympe.auth.Jb.Ee.cj(a,c)}Nr(a,b){return olympe.auth.Jb.Ee.cj(a,b)}ec(){throw Error('DeleteRelation method on OSaveFile is deprecated');}Mc(){throw Error('DeleteInstance method on OSaveFile is deprecated');
713
- }};olympe.dc.da.Qa.prototype.deleteInstance=olympe.dc.da.Qa.prototype.Mc;olympe.dc.da.Qa.prototype.deleteRelation=olympe.dc.da.Qa.prototype.ec;olympe.dc.da.Qa.prototype.generateAuthenticationData=olympe.dc.da.Qa.prototype.Nr;olympe.dc.da.Qa.prototype.generateAuthData=olympe.dc.da.Qa.prototype.cj;olympe.dc.da.Qa.prototype.createDateTimeLegacy=olympe.dc.da.Qa.prototype.Lv;olympe.dc.da.Qa.prototype.fromISODate=olympe.dc.da.Qa.prototype.gw;olympe.dc.da.Qa.prototype.createDateTime=olympe.dc.da.Qa.prototype.Kv;
714
- olympe.dc.da.Qa.prototype.createColor=olympe.dc.da.Qa.prototype.Jv;olympe.dc.da.Qa.prototype.createReference=olympe.dc.da.Qa.prototype.Ov;olympe.dc.da.Qa.prototype.assignOptional=olympe.dc.da.Qa.prototype.Av;olympe.dc.da.Qa.prototype.assign=olympe.dc.da.Qa.prototype.assign;olympe.dc.da.Qa.prototype.updateInstance=olympe.dc.da.Qa.prototype.tc;olympe.dc.da.Qa.prototype.linkRoleToUser=olympe.dc.da.Qa.prototype.zx;olympe.dc.da.Qa.prototype.defineRelation=olympe.dc.da.Qa.prototype.ih;
715
- olympe.dc.da.Qa.prototype.defineProperty=olympe.dc.da.Qa.prototype.defineProperty;olympe.dc.da.Qa.prototype.newRelation=olympe.dc.da.Qa.prototype.dl;olympe.dc.da.Qa.prototype.newUser=olympe.dc.da.Qa.prototype.Sx;olympe.dc.da.Qa.prototype.newAbstractModel=olympe.dc.da.Qa.prototype.Qx;olympe.dc.da.Qa.prototype.newModel=olympe.dc.da.Qa.prototype.Rx;olympe.dc.da.Qa.prototype.newInstance=olympe.dc.da.Qa.prototype.Gg;olympe.dc.da.Qa.prototype.setRootInstanceTag=olympe.dc.da.Qa.prototype.xy;
716
- olympe.dc.da.Qa.prototype.disableChecks=olympe.dc.da.Qa.prototype.Tv;olympe.dc.da.Qa.prototype.setUseNewTags=olympe.dc.da.Qa.prototype.zy;olympe.dc.da.Qa.prototype.assignTag=olympe.dc.da.Qa.prototype.Bv;olympe.dc.da.Qa.prototype.logError=olympe.dc.da.Qa.prototype.bl;olympe.dc.da.Qa.prototype.logWarn=olympe.dc.da.Qa.prototype.Bx;olympe.dc.da.Qa.prototype.logDebug=olympe.dc.da.Qa.prototype.tn;olympe.dc.da.Qa.prototype.log=olympe.dc.da.Qa.prototype.log;olympe.dc.da.Qa.prototype.setLoggingEnabled=olympe.dc.da.Qa.prototype.ty;
717
- olympe.dc.da.Qa.prototype.getRootInstanceTag=olympe.dc.da.Qa.prototype.Zw;olympe.dc.da.Qa.prototype.flushContents=olympe.dc.da.Qa.prototype.bw;olympe.dc.da.qg=class extends olympe.dc.da.dd{constructor(a,b,c){super(a,b);this.L=this.description=null;this.setProperty(olympe.dm.BrickMetadata.Ya.R(),olympe.dm.BrickMetadata.wb.uu);null!==c&&this.zr(c)}zr(a){this.ii(a);this.Im(olympe.dm.Qb.C.R(),a);return this}sy(a){this.F.set(olympe.dm.ve.Sa.R(),a);return this}py(a){Y(this);this.description=a;return this}yy(a){Y(this);this.L=a;return this}G(a){super.G(a);if(null!==this.description||null!==this.L)this.C.push(),a=this.C.Gg(this.C.Uk(this.tag),olympe.sc.oc.O.R()),
718
- this.description&&a.setProperty(olympe.sc.oc.C.R(),this.description),this.L&&a.setProperty(olympe.sc.oc.L.R(),this.L),a.ii(this.tag).Jm(olympe.sc.oc.F.R(),this.tag).done(),this.C.pop()}};olympe.dc.da.qg.prototype.setSummary=olympe.dc.da.qg.prototype.yy;olympe.dc.da.qg.prototype.setDescription=olympe.dc.da.qg.prototype.py;olympe.dc.da.qg.prototype.setIcon=olympe.dc.da.qg.prototype.sy;olympe.dc.da.qg.prototype.addToFolder=olympe.dc.da.qg.prototype.zr;olympe.dc.da.Uu=class a{constructor(b,c,d){this.F=b;this.ua=c||[];this.C=d||[]}static C(b,c,d){if(c instanceof olympe.dc.transaction.vd&&d instanceof olympe.dc.transaction.vd){c=Zd(c);var e=Zd(d)}else e=new olympe.dc.transaction.vd(!0),c.Qc(e),c=Zd(e),d.Qc(e),e=Zd(e);d=new Map;var f=new a(b,c.wg,e.wg);f.Sf()||d.set('delRel',f);f=new a(b,c.Se,e.Se);f.Sf()||d.set('detInst',f);f=new a(b,c.Hg,e.Hg);f.Sf()||d.set('newInst',f);f=new a(b,c.Zf,e.Zf);f.Sf()||d.set('updateInst',f);b=new a(b,c.Ig,e.Ig);b.Sf()||
711
+ olympe.dm.Relation;d={[olympe.dc.CloudObject.nameProp.R()]:d||'',[q.Mm.R()]:g,[q.zn.R()]:n,[q.Wm.R()]:e,[q.Vm.R()]:f,[q.Cn.R()]:h,[q.Gn.R()]:k,[q.Br.R()]:l};this.C?(this.push(),this.Gg(a,q.O.R()).ji(d).done(),this.pop()):this.Gg(a,q.O.R()).ji(d).ii(b).done();this.F.Ra(q.originModelRel.R(),b,a,p);this.F.Ra(q.destinationModelRel.R(),a,c,p)}Ax(a,b){this.F.Ra(olympe.dm.ed.C.R(),a,b,-1)}tc(a,b,c=!1){this.tn('Updating instance ',a);delete b[olympe.dc.$b.Jd];delete b[olympe.dc.$b.VERSION];const d=new Map;
712
+ Object.keys(b).forEach(e=>{d.set(e,b[e])});this.F.tc(a,d,c,-1)}assign(a,b,c){this.dl(b,a,c)}Bv(a,b,c){this.Y.Ra(b,a,c,-1)}Pv(a){return new olympe.dc.Jc(a)}Kv(a,b,c,d){const e={c:7};e.r=a;e.g=b;e.b=c;e.a=d;return e}Lv({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;k.d=c;k.h=d;k.m=e;k.s=f;k.S=g;k.z=h;return k}hw(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();
713
+ b.s=a.getSeconds();b.S=a.getMilliseconds();b.z=-a.getTimezoneOffset();return b}Mv(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}cj(a,b,c){return olympe.auth.Jb.Ee.cj(a,c)}Pr(a,b){return olympe.auth.Jb.Ee.cj(a,b)}ec(){throw Error('DeleteRelation method on OSaveFile is deprecated');}Mc(){throw Error('DeleteInstance method on OSaveFile is deprecated');
714
+ }};olympe.dc.da.Qa.prototype.deleteInstance=olympe.dc.da.Qa.prototype.Mc;olympe.dc.da.Qa.prototype.deleteRelation=olympe.dc.da.Qa.prototype.ec;olympe.dc.da.Qa.prototype.generateAuthenticationData=olympe.dc.da.Qa.prototype.Pr;olympe.dc.da.Qa.prototype.generateAuthData=olympe.dc.da.Qa.prototype.cj;olympe.dc.da.Qa.prototype.createDateTimeLegacy=olympe.dc.da.Qa.prototype.Mv;olympe.dc.da.Qa.prototype.fromISODate=olympe.dc.da.Qa.prototype.hw;olympe.dc.da.Qa.prototype.createDateTime=olympe.dc.da.Qa.prototype.Lv;
715
+ olympe.dc.da.Qa.prototype.createColor=olympe.dc.da.Qa.prototype.Kv;olympe.dc.da.Qa.prototype.createReference=olympe.dc.da.Qa.prototype.Pv;olympe.dc.da.Qa.prototype.assignOptional=olympe.dc.da.Qa.prototype.Bv;olympe.dc.da.Qa.prototype.assign=olympe.dc.da.Qa.prototype.assign;olympe.dc.da.Qa.prototype.updateInstance=olympe.dc.da.Qa.prototype.tc;olympe.dc.da.Qa.prototype.linkRoleToUser=olympe.dc.da.Qa.prototype.Ax;olympe.dc.da.Qa.prototype.defineRelation=olympe.dc.da.Qa.prototype.ih;
716
+ olympe.dc.da.Qa.prototype.defineProperty=olympe.dc.da.Qa.prototype.defineProperty;olympe.dc.da.Qa.prototype.newRelation=olympe.dc.da.Qa.prototype.dl;olympe.dc.da.Qa.prototype.newUser=olympe.dc.da.Qa.prototype.Tx;olympe.dc.da.Qa.prototype.newAbstractModel=olympe.dc.da.Qa.prototype.Rx;olympe.dc.da.Qa.prototype.newModel=olympe.dc.da.Qa.prototype.Sx;olympe.dc.da.Qa.prototype.newInstance=olympe.dc.da.Qa.prototype.Gg;olympe.dc.da.Qa.prototype.setRootInstanceTag=olympe.dc.da.Qa.prototype.yy;
717
+ olympe.dc.da.Qa.prototype.disableChecks=olympe.dc.da.Qa.prototype.Uv;olympe.dc.da.Qa.prototype.setUseNewTags=olympe.dc.da.Qa.prototype.Ay;olympe.dc.da.Qa.prototype.assignTag=olympe.dc.da.Qa.prototype.Cv;olympe.dc.da.Qa.prototype.logError=olympe.dc.da.Qa.prototype.bl;olympe.dc.da.Qa.prototype.logWarn=olympe.dc.da.Qa.prototype.Cx;olympe.dc.da.Qa.prototype.logDebug=olympe.dc.da.Qa.prototype.tn;olympe.dc.da.Qa.prototype.log=olympe.dc.da.Qa.prototype.log;olympe.dc.da.Qa.prototype.setLoggingEnabled=olympe.dc.da.Qa.prototype.uy;
718
+ olympe.dc.da.Qa.prototype.getRootInstanceTag=olympe.dc.da.Qa.prototype.$w;olympe.dc.da.Qa.prototype.flushContents=olympe.dc.da.Qa.prototype.cw;olympe.dc.da.qg=class extends olympe.dc.da.dd{constructor(a,b,c){super(a,b);this.L=this.description=null;this.setProperty(olympe.dm.BrickMetadata.Ya.R(),olympe.dm.BrickMetadata.wb.vu);null!==c&&this.Ar(c)}Ar(a){this.ii(a);this.Im(olympe.dm.Qb.C.R(),a);return this}ty(a){this.F.set(olympe.dm.ve.Sa.R(),a);return this}qy(a){Y(this);this.description=a;return this}zy(a){Y(this);this.L=a;return this}G(a){super.G(a);if(null!==this.description||null!==this.L)this.C.push(),a=this.C.Gg(this.C.Uk(this.tag),olympe.sc.oc.O.R()),
719
+ this.description&&a.setProperty(olympe.sc.oc.C.R(),this.description),this.L&&a.setProperty(olympe.sc.oc.L.R(),this.L),a.ii(this.tag).Jm(olympe.sc.oc.F.R(),this.tag).done(),this.C.pop()}};olympe.dc.da.qg.prototype.setSummary=olympe.dc.da.qg.prototype.zy;olympe.dc.da.qg.prototype.setDescription=olympe.dc.da.qg.prototype.qy;olympe.dc.da.qg.prototype.setIcon=olympe.dc.da.qg.prototype.ty;olympe.dc.da.qg.prototype.addToFolder=olympe.dc.da.qg.prototype.Ar;olympe.dc.da.Vu=class a{constructor(b,c,d){this.F=b;this.ua=c||[];this.C=d||[]}static C(b,c,d){if(c instanceof olympe.dc.transaction.vd&&d instanceof olympe.dc.transaction.vd){c=Zd(c);var e=Zd(d)}else e=new olympe.dc.transaction.vd(!0),c.Qc(e),c=Zd(e),d.Qc(e),e=Zd(e);d=new Map;var f=new a(b,c.wg,e.wg);f.Sf()||d.set('delRel',f);f=new a(b,c.Se,e.Se);f.Sf()||d.set('detInst',f);f=new a(b,c.Hg,e.Hg);f.Sf()||d.set('newInst',f);f=new a(b,c.Zf,e.Zf);f.Sf()||d.set('updateInst',f);b=new a(b,c.Ig,e.Ig);b.Sf()||
719
720
  d.set('newRel',b);return d}Sf(){return 0===this.ua.length+this.C.length}static wn(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}uh(){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):
720
- 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.ua.sort(b);this.C.sort(b);c.rootTag=this.F;c.operations=this.ua;c.optionalOperations=this.C;return c}};olympe.dc.da.xf=class extends olympe.dc.da.Zb{constructor(a,b){super(a,b);this.password=this.L=null;this.En(olympe.dc.wa(olympe.dm.User))}Ay(a){Y(this);this.L=a;return this}Fn(a){Y(this);this.password=a;return this}qy(){return this}Cv(a){Y(this);this.Im(olympe.dm.User.C.R(),a);return this}G(a){super.G(a);if(null==this.L||''===this.L)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=
721
- this.C.Nr(this.L,this.password),c=new Map;c.set(olympe.dm.User.loginProp.R(),b.login);c.set(olympe.dm.User.saltProp.R(),b.salt);c.set(olympe.dm.User.verifierProp.R(),b.verifier);eh(this.C).tc(this.R(),c,!1,a)}};olympe.dc.da.xf.prototype.awardRole=olympe.dc.da.xf.prototype.Cv;olympe.dc.da.xf.prototype.setDomain=olympe.dc.da.xf.prototype.qy;olympe.dc.da.xf.prototype.setPassword=olympe.dc.da.xf.prototype.Fn;olympe.dc.da.xf.prototype.setUsername=olympe.dc.da.xf.prototype.Ay;olympe.dc.da.P={wt:'dc.io.IOService',Bh:'dc.io.IOUrlsProvider'};olympe.T.config(function(a){sa(a,olympe.dc.da.P.Bh);C(a,olympe.dc.da.P.wt,[olympe.ra.P.xa,olympe.net.P.xa,olympe.auth.P.xa,olympe.dc.da.P.Bh],b=>new olympe.dc.da.yp(b.Rc('dc.io')))},'olympe.dc.io');olympe.dc.da.$C=function(a,b,c=!1){if(a.startsWith('@')||a.startsWith('v'))return!1;a.startsWith(olympe.dc.Ug.jc)&&(a=a.substring(1));const d=olympe.dc.Oa();return b?c?Cd(d,a,b):Cd(d,a,d.model(b)):d.Eb(a)};olympe.dm={};olympe.dm.Nc={NONE:0,Qs:1,Ao:2,Rs:4,Ns:8,Ps:16,Os:31,ru:32,ou:64,su:128,pu:256,gq:512,qu:992,ft:1023};olympe.dm.ed=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}ma(){return this.Gb(olympe.dc.CloudObject.nameProp)}C(){return olympe.D.Wa.EMPTY}F(){return olympe.D.qa.C}};olympe.dm.ed.O=olympe.dc.ya.C('ff021000000000000002',olympe.dm.ed);olympe.dm.ed.ka=olympe.dm.ed.O.va('ff023000000000000035');olympe.dm.ed.C=olympe.dm.ed.O.Ha('ff022000000000000005');olympe.dm.ed.F=Ec('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.ed.aa=Ec('ff011000000000000002','PROJECT_RUNNER_USERS_ROLE');
722
- olympe.dm.ed.L=Ec('014831d95f83635090ea','ADMIN_USERS_ROLE');olympe.dm.ed.prototype.ma.K=olympe.D.J.F;olympe.dm.ed.prototype.C.K=olympe.D.J.F;olympe.dm.ed.prototype.F.K=olympe.D.J.U;olympe.dm.User=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Dw(){return this.en()}ma(){return this.en()}en(){return this.Gb(olympe.dm.User.loginProp)}Kt(){return this.Gb(olympe.dm.User.F)}Jt(){return olympe.D.Wa.EMPTY}ax(){return this.Gb(olympe.dm.User.saltProp)}nx(){return this.Gb(olympe.dm.User.verifierProp)}Yw(){return this.tb(olympe.dm.User.C,olympe.dm.ed)}};olympe.dm.User.O=olympe.dc.ya.C('ff021000000000000003',olympe.dm.User);olympe.dm.User.loginProp=olympe.dm.User.O.va('ff023000000000000001');
723
- z('olympe.dm.User.loginProp',olympe.dm.User.loginProp);olympe.dm.User.F=olympe.dm.User.O.va('ff023000000000000002');olympe.dm.User.ka=olympe.dm.User.O.va('ff023000000000000003');olympe.dm.User.saltProp=olympe.dm.User.O.va('ff023000000000000004');z('olympe.dm.User.saltProp',olympe.dm.User.saltProp);olympe.dm.User.verifierProp=olympe.dm.User.O.va('ff023000000000000005');z('olympe.dm.User.verifierProp',olympe.dm.User.verifierProp);olympe.dm.User.aa=olympe.dm.User.O.va('ff023000000000000020');
724
- olympe.dm.User.SAMLnameIdProp=olympe.dm.User.O.va('ff023000000000000036');z('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.C=P(olympe.dm.User.O,olympe.dm.ed.C);olympe.dm.User.oa=olympe.dm.User.O.Ha('ff022000000000000002');olympe.dm.User.L=Ec('0163d9653067b6237f62','GUEST_USER');m=olympe.dm.User.prototype;m.Dw.K=olympe.D.J.F;m.ma.K=olympe.D.J.F;m.en.K=olympe.D.J.F;m.Kt.K=olympe.D.J.F;m.Jt.K=olympe.D.J.F;m.ax.K=olympe.D.J.F;m.nx.K=olympe.D.J.F;
725
- m.Yw.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.ve=class extends olympe.dc.CloudObject{ka(){return this.cn()}wb(){return this.Gb(olympe.dm.ve.Sa)}};olympe.dm.ve.O=olympe.dc.ya.C('01621fb84e3300000000',olympe.dm.ve);olympe.dm.ve.Sa=olympe.dm.ve.O.va('01609de3f292e3c2c6ff');olympe.dm.ve.prototype.ka.K=new olympe.D.J(()=>olympe.D.pd,[]);olympe.dm.ve.prototype.wb.K=olympe.D.J.F;olympe.dm.BrickMetadata=class extends olympe.dm.ve{Ib(){return this.Gb(olympe.dm.BrickMetadata.Ya)}Rd(){return this.Gb(olympe.dm.BrickMetadata.ab)}C(){return null}};olympe.dm.BrickMetadata.O=Ic(olympe.dc.ya.C('01621fb84e3500000000',olympe.dm.BrickMetadata));olympe.dm.BrickMetadata.Ya=olympe.dm.BrickMetadata.O.va('01621fb84e320000f001');olympe.dm.BrickMetadata.ab=olympe.dm.BrickMetadata.O.va('01703376c4a81c0e9d94');olympe.dm.BrickMetadata.Rf=olympe.dm.BrickMetadata.O.Ha('0161ae97622bb21f335b');
726
- olympe.dm.BrickMetadata.wb={EA:'private',uu:'public'};olympe.dm.BrickMetadata.ad=Ec('01703376c4a81c0e9d95','BRICK_STATUS');olympe.dm.BrickMetadata.hd={uz:'experimental',PA:'stable',kz:'deprecated'};olympe.dm.BrickMetadata.prototype.Ib.K=olympe.D.J.F;olympe.dm.BrickMetadata.prototype.Rd.K=olympe.D.J.F;olympe.dm.BrickMetadata.prototype.C.K=new olympe.D.J(()=>String,[]);olympe.dm.Qb=class extends olympe.dm.BrickMetadata{U(){return new olympe.dc.Ca(this.R(),[new olympe.dc.X.Fc(olympe.dm.Qb.F.R(),olympe.dc.Aa.DESTINATION,olympe.dc.X.sk.up,olympe.dc.X.sk.qt),olympe.dm.Qb.C])}C(){return null}F(){return this.tb(olympe.dm.Qb.F,olympe.dm.Qb)}Y(){return this.tb(olympe.dm.Qb.C)}};olympe.dm.Qb.O=olympe.dc.ya.C('01612df1db9749227626',olympe.dm.Qb);olympe.dm.Qb.F=olympe.dm.Qb.O.Ha('016a697ef00ce7554691');olympe.dm.Qb.Ib=P(olympe.dm.Qb.O,olympe.dm.Qb.F);olympe.dm.Qb.C=olympe.dm.Qb.O.Ha('016a697ef00ce7554692');
727
- P(olympe.dc.CloudObject.O,olympe.dm.Qb.C);olympe.dm.Qb.prototype.U.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.Qb.prototype.F.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.Qb.prototype.Y.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.Zc=class extends olympe.dm.Qb{F(){return this.R()===olympe.dm.Zc.Da?this.tb(olympe.dm.Zc.aa,olympe.dm.Qb):this.tb(olympe.dm.Zc.ka,olympe.dm.Qb)}};olympe.dm.Zc.O=olympe.dc.ya.C('ff021000000000000020',olympe.dm.Zc);olympe.dm.Zc.ka=olympe.dm.Zc.O.Ha('017e9c34cf48bd6965c1');olympe.dm.Zc.aa=olympe.dm.Zc.O.Ha('017e9c2e013e06bfffd9');olympe.dm.Zc.Xe=olympe.dm.Zc.O.Ha('01811f12ad77673770d4');olympe.dm.Zc.Da=Ec('10000000000000000000','ROOT_OF_ROOTS');olympe.dm.Zc.Lc=Ec('10000000000000000001','OLYMPE_FOLDER');
728
- olympe.dm.Zc.prototype.F.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.Module=class extends olympe.dc.CloudObject{Bw(){return this.Gb(olympe.dm.Module.ka)}Nw(){return this.He(olympe.dm.Module.oa)}Lt(){return this.Gb(olympe.dm.Module.F)}Sw(){return this.Gb(olympe.dm.Module.Da)}nw(){return this.Gb(olympe.dm.Module.L)}Ow(){return this.tb(olympe.dm.Module.aa,olympe.dm.Module)}bx(){return this.tb(olympe.dm.Module.C,olympe.dm.Fd)}};olympe.dm.Module.O=olympe.dc.ya.C('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.ka=olympe.dm.Module.O.va('ff023000000000000042');
721
+ 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.ua.sort(b);this.C.sort(b);c.rootTag=this.F;c.operations=this.ua;c.optionalOperations=this.C;return c}};olympe.dc.da.xf=class extends olympe.dc.da.Zb{constructor(a,b){super(a,b);this.password=this.L=null;this.En(olympe.dc.wa(olympe.dm.User))}By(a){Y(this);this.L=a;return this}Fn(a){Y(this);this.password=a;return this}sy(){return this}Dv(a){Y(this);this.Im(olympe.dm.User.C.R(),a);return this}G(a){super.G(a);if(null==this.L||''===this.L)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=
722
+ this.C.Pr(this.L,this.password),c=new Map;c.set(olympe.dm.User.loginProp.R(),b.login);c.set(olympe.dm.User.saltProp.R(),b.salt);c.set(olympe.dm.User.verifierProp.R(),b.verifier);eh(this.C).tc(this.R(),c,!1,a)}};olympe.dc.da.xf.prototype.awardRole=olympe.dc.da.xf.prototype.Dv;olympe.dc.da.xf.prototype.setDomain=olympe.dc.da.xf.prototype.sy;olympe.dc.da.xf.prototype.setPassword=olympe.dc.da.xf.prototype.Fn;olympe.dc.da.xf.prototype.setUsername=olympe.dc.da.xf.prototype.By;olympe.dc.da.P={xt:'dc.io.IOService',Bh:'dc.io.IOUrlsProvider'};olympe.T.config(function(a){sa(a,olympe.dc.da.P.Bh);C(a,olympe.dc.da.P.xt,[olympe.ra.P.xa,olympe.net.P.xa,olympe.auth.P.xa,olympe.dc.da.P.Bh],b=>new olympe.dc.da.zp(b.Rc('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.Ug.jc)&&(a=a.substring(1));const d=olympe.dc.Oa();return b?c?Cd(d,a,b):Cd(d,a,d.model(b)):d.Eb(a)};olympe.dm={};olympe.dm.Nc={NONE:0,Rs:1,Ao:2,Ss:4,Os:8,Qs:16,Ps:31,su:32,pu:64,tu:128,qu:256,hq:512,ru:992,gt:1023};olympe.dm.ed=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}ma(){return this.Gb(olympe.dc.CloudObject.nameProp)}C(){return olympe.D.Wa.EMPTY}F(){return olympe.D.qa.C}};olympe.dm.ed.O=olympe.dc.ya.C('ff021000000000000002',olympe.dm.ed);olympe.dm.ed.ja=olympe.dm.ed.O.va('ff023000000000000035');olympe.dm.ed.C=olympe.dm.ed.O.Ha('ff022000000000000005');olympe.dm.ed.F=Ec('ff011000000000000001','AUTHENTICATED_USERS');olympe.dm.ed.aa=Ec('ff011000000000000002','PROJECT_RUNNER_USERS_ROLE');
723
+ olympe.dm.ed.L=Ec('014831d95f83635090ea','ADMIN_USERS_ROLE');olympe.dm.ed.prototype.ma.K=olympe.D.J.F;olympe.dm.ed.prototype.C.K=olympe.D.J.F;olympe.dm.ed.prototype.F.K=olympe.D.J.U;olympe.dm.User=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Ew(){return this.en()}ma(){return this.en()}en(){return this.Gb(olympe.dm.User.loginProp)}Lt(){return this.Gb(olympe.dm.User.F)}Kt(){return olympe.D.Wa.EMPTY}bx(){return this.Gb(olympe.dm.User.saltProp)}ox(){return this.Gb(olympe.dm.User.verifierProp)}Zw(){return this.tb(olympe.dm.User.C,olympe.dm.ed)}};olympe.dm.User.O=olympe.dc.ya.C('ff021000000000000003',olympe.dm.User);olympe.dm.User.loginProp=olympe.dm.User.O.va('ff023000000000000001');
724
+ z('olympe.dm.User.loginProp',olympe.dm.User.loginProp);olympe.dm.User.F=olympe.dm.User.O.va('ff023000000000000002');olympe.dm.User.ja=olympe.dm.User.O.va('ff023000000000000003');olympe.dm.User.saltProp=olympe.dm.User.O.va('ff023000000000000004');z('olympe.dm.User.saltProp',olympe.dm.User.saltProp);olympe.dm.User.verifierProp=olympe.dm.User.O.va('ff023000000000000005');z('olympe.dm.User.verifierProp',olympe.dm.User.verifierProp);olympe.dm.User.aa=olympe.dm.User.O.va('ff023000000000000020');
725
+ olympe.dm.User.SAMLnameIdProp=olympe.dm.User.O.va('ff023000000000000036');z('olympe.dm.User.SAMLnameIdProp',olympe.dm.User.SAMLnameIdProp);olympe.dm.User.C=P(olympe.dm.User.O,olympe.dm.ed.C);olympe.dm.User.oa=olympe.dm.User.O.Ha('ff022000000000000002');olympe.dm.User.L=Ec('0163d9653067b6237f62','GUEST_USER');m=olympe.dm.User.prototype;m.Ew.K=olympe.D.J.F;m.ma.K=olympe.D.J.F;m.en.K=olympe.D.J.F;m.Lt.K=olympe.D.J.F;m.Kt.K=olympe.D.J.F;m.bx.K=olympe.D.J.F;m.ox.K=olympe.D.J.F;
726
+ m.Zw.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.ve=class extends olympe.dc.CloudObject{ja(){return this.cn()}wb(){return this.Gb(olympe.dm.ve.Sa)}};olympe.dm.ve.O=olympe.dc.ya.C('01621fb84e3300000000',olympe.dm.ve);olympe.dm.ve.Sa=olympe.dm.ve.O.va('01609de3f292e3c2c6ff');olympe.dm.ve.prototype.ja.K=new olympe.D.J(()=>olympe.D.pd,[]);olympe.dm.ve.prototype.wb.K=olympe.D.J.F;olympe.dm.BrickMetadata=class extends olympe.dm.ve{Ib(){return this.Gb(olympe.dm.BrickMetadata.Ya)}Rd(){return this.Gb(olympe.dm.BrickMetadata.ab)}C(){return null}};olympe.dm.BrickMetadata.O=Ic(olympe.dc.ya.C('01621fb84e3500000000',olympe.dm.BrickMetadata));olympe.dm.BrickMetadata.Ya=olympe.dm.BrickMetadata.O.va('01621fb84e320000f001');olympe.dm.BrickMetadata.ab=olympe.dm.BrickMetadata.O.va('01703376c4a81c0e9d94');olympe.dm.BrickMetadata.Rf=olympe.dm.BrickMetadata.O.Ha('0161ae97622bb21f335b');
727
+ olympe.dm.BrickMetadata.wb={FA:'private',vu:'public'};olympe.dm.BrickMetadata.ad=Ec('01703376c4a81c0e9d95','BRICK_STATUS');olympe.dm.BrickMetadata.hd={vz:'experimental',QA:'stable',lz:'deprecated'};olympe.dm.BrickMetadata.prototype.Ib.K=olympe.D.J.F;olympe.dm.BrickMetadata.prototype.Rd.K=olympe.D.J.F;olympe.dm.BrickMetadata.prototype.C.K=new olympe.D.J(()=>String,[]);olympe.dm.Qb=class extends olympe.dm.BrickMetadata{U(){return new olympe.dc.Ca(this.R(),[new olympe.dc.X.Fc(olympe.dm.Qb.F.R(),olympe.dc.Aa.DESTINATION,olympe.dc.X.sk.vp,olympe.dc.X.sk.rt),olympe.dm.Qb.C])}C(){return null}F(){return this.tb(olympe.dm.Qb.F,olympe.dm.Qb)}Y(){return this.tb(olympe.dm.Qb.C)}};olympe.dm.Qb.O=olympe.dc.ya.C('01612df1db9749227626',olympe.dm.Qb);olympe.dm.Qb.F=olympe.dm.Qb.O.Ha('016a697ef00ce7554691');olympe.dm.Qb.Ib=P(olympe.dm.Qb.O,olympe.dm.Qb.F);olympe.dm.Qb.C=olympe.dm.Qb.O.Ha('016a697ef00ce7554692');
728
+ P(olympe.dc.CloudObject.O,olympe.dm.Qb.C);olympe.dm.Qb.prototype.U.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.Qb.prototype.F.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.Qb.prototype.Y.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.Zc=class extends olympe.dm.Qb{F(){return this.R()===olympe.dm.Zc.Da?this.tb(olympe.dm.Zc.aa,olympe.dm.Qb):this.tb(olympe.dm.Zc.ja,olympe.dm.Qb)}};olympe.dm.Zc.O=olympe.dc.ya.C('ff021000000000000020',olympe.dm.Zc);olympe.dm.Zc.ja=olympe.dm.Zc.O.Ha('017e9c34cf48bd6965c1');olympe.dm.Zc.aa=olympe.dm.Zc.O.Ha('017e9c2e013e06bfffd9');olympe.dm.Zc.Xe=olympe.dm.Zc.O.Ha('01811f12ad77673770d4');olympe.dm.Zc.Da=Ec('10000000000000000000','ROOT_OF_ROOTS');olympe.dm.Zc.Lc=Ec('10000000000000000001','OLYMPE_FOLDER');
729
+ olympe.dm.Zc.prototype.F.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.Module=class extends olympe.dc.CloudObject{Cw(){return this.Gb(olympe.dm.Module.ja)}Ow(){return this.He(olympe.dm.Module.oa)}Mt(){return this.Gb(olympe.dm.Module.F)}Tw(){return this.Gb(olympe.dm.Module.Da)}ow(){return this.Gb(olympe.dm.Module.L)}Pw(){return this.tb(olympe.dm.Module.aa,olympe.dm.Module)}ex(){return this.tb(olympe.dm.Module.C,olympe.dm.Fd)}};olympe.dm.Module.O=olympe.dc.ya.C('ff021000000000000040',olympe.dm.Module);olympe.dm.Module.ja=olympe.dm.Module.O.va('ff023000000000000042');
729
730
  olympe.dm.Module.oa=olympe.dm.Module.O.va('ff023000000000000043');olympe.dm.Module.F=olympe.dm.Module.O.va('ff023000000000000044');olympe.dm.Module.Da=olympe.dm.Module.O.va('ff023000000000000045');olympe.dm.Module.L=olympe.dm.Module.O.va('ff023000000000000046');olympe.dm.Module.creationDateProp=olympe.dm.Module.O.va('ff023000000000000049');olympe.dm.Module.C=olympe.dm.Module.O.Ha('ff022000000000000013');olympe.dm.Module.aa=olympe.dm.Module.O.Ha('ff022000000000000014');
730
- olympe.dm.Module.Sa=Ec('016a69b9bceabd815b77','OLYMPE_SERVER_MODULE');m=olympe.dm.Module.prototype;m.Bw.K=olympe.D.J.F;m.Nw.K=olympe.D.J.G;m.Lt.K=olympe.D.J.F;m.Sw.K=olympe.D.J.F;m.nw.K=olympe.D.J.F;m.Ow.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.bx.K=new olympe.D.J(()=>olympe.dc.Ca,[]);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}fn(){return this.Gb(olympe.dm.File.mimeTypeProp)}Rk(a,b){const c=olympe.D.Ja().C(a),d=b&&olympe.D.Ja().C(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):vc(this.F,this,e=>{this.C.G(e,c)},e=>{d&&d(e)})}bn(a,b){this.Rk(c=>{a(Da(c))},b)}Sk(a,b){const c=olympe.D.Ja().C(a);b=b&&olympe.D.Ja().C(b);const d=this.db.fb(this,olympe.dm.File.C),
731
- 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()?vc(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.Ja().C(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.hb(f=>{c&&c(f)})})}oy(){this.G.L(this.db.fb(this,olympe.dm.File.mimeTypeProp))}Rl(){return this.Gb(olympe.dm.File.urlProp)}Ap(){return this.Gb(olympe.dm.File.nameProp)}qw(){return this.jj(olympe.dm.File.creationDateProp)}Mw(){return this.jj(olympe.dm.File.modificationDateProp)}Zr(){return this.Bg(olympe.dm.File.C)}static Mv(a,
732
- b,c,d,e,f){d=d||'application/data';c=olympe.W.ai().L(new Blob([c],{type:d}));return olympe.dm.File.Ir(a,b,c,d,e,f)}static Ir(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.Ga.jc,f)}};olympe.dm.File.createFromURL=olympe.dm.File.Ir;
733
- olympe.dm.File.createFromContent=olympe.dm.File.Mv;olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.oy;olympe.dm.File.prototype.getContentUrl=olympe.dm.File.prototype.Sk;olympe.dm.File.prototype.getContentAsString=olympe.dm.File.prototype.bn;olympe.dm.File.prototype.getContentAsBinary=olympe.dm.File.prototype.Rk;olympe.dm.File.O=olympe.dc.ya.C('ff021000000000000030',olympe.dm.File,olympe.dc.P.yi,olympe.net.P.xa,olympe.W.P.vh);olympe.dm.File.nameProp=olympe.dm.File.O.va('ff023000000000000050');
731
+ olympe.dm.Module.Sa=Ec('016a69b9bceabd815b77','OLYMPE_SERVER_MODULE');m=olympe.dm.Module.prototype;m.Cw.K=olympe.D.J.F;m.Ow.K=olympe.D.J.G;m.Mt.K=olympe.D.J.F;m.Tw.K=olympe.D.J.F;m.ow.K=olympe.D.J.F;m.Pw.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.ex.K=new olympe.D.J(()=>olympe.dc.Ca,[]);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}fn(){return this.Gb(olympe.dm.File.mimeTypeProp)}Rk(a,b){const c=olympe.D.Ja().C(a),d=b&&olympe.D.Ja().C(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):vc(this.F,this,e=>{this.C.G(e,c)},e=>{d&&d(e)})}bn(a,b){this.Rk(c=>{a(Da(c))},b)}Sk(a,b){const c=olympe.D.Ja().C(a);b=b&&olympe.D.Ja().C(b);const d=this.db.fb(this,olympe.dm.File.C),
732
+ 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()?vc(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.Ja().C(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.hb(f=>{c&&c(f)})})}py(){this.G.L(this.db.fb(this,olympe.dm.File.mimeTypeProp))}Rl(){return this.Gb(olympe.dm.File.urlProp)}Bp(){return this.Gb(olympe.dm.File.nameProp)}rw(){return this.jj(olympe.dm.File.creationDateProp)}Nw(){return this.jj(olympe.dm.File.modificationDateProp)}$r(){return this.Bg(olympe.dm.File.C)}static Nv(a,
733
+ b,c,d,e,f){d=d||'application/data';c=olympe.W.ai().L(new Blob([c],{type:d}));return olympe.dm.File.Jr(a,b,c,d,e,f)}static Jr(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.Ga.jc,f)}};olympe.dm.File.createFromURL=olympe.dm.File.Jr;
734
+ olympe.dm.File.createFromContent=olympe.dm.File.Nv;olympe.dm.File.prototype.saveAs=olympe.dm.File.prototype.py;olympe.dm.File.prototype.getContentUrl=olympe.dm.File.prototype.Sk;olympe.dm.File.prototype.getContentAsString=olympe.dm.File.prototype.bn;olympe.dm.File.prototype.getContentAsBinary=olympe.dm.File.prototype.Rk;olympe.dm.File.O=olympe.dc.ya.C('ff021000000000000030',olympe.dm.File,olympe.dc.P.yi,olympe.net.P.xa,olympe.W.P.vh);olympe.dm.File.nameProp=olympe.dm.File.O.va('ff023000000000000050');
734
735
  z('olympe.dm.File.nameProp',olympe.dm.File.nameProp);olympe.dm.File.creationDateProp=olympe.dm.File.O.va('ff023000000000000051');z('olympe.dm.File.creationDateProp',olympe.dm.File.creationDateProp);olympe.dm.File.modificationDateProp=olympe.dm.File.O.va('ff023000000000000055');z('olympe.dm.File.modificationDateProp',olympe.dm.File.modificationDateProp);olympe.dm.File.mimeTypeProp=olympe.dm.File.O.va('ff023000000000000052');z('olympe.dm.File.mimeTypeProp',olympe.dm.File.mimeTypeProp);
735
- olympe.dm.File.urlProp=olympe.dm.File.O.va('ff023000000000000053');z('olympe.dm.File.urlProp',olympe.dm.File.urlProp);olympe.dm.File.C=olympe.dm.File.O.va('ff023000000000000054');olympe.dm.File.la=[olympe.D.File];m=olympe.dm.File.prototype;m.fn.K=olympe.D.J.F;m.Rk.K=new olympe.D.J(()=>{},[]);m.bn.K=new olympe.D.J(()=>{},[]);m.Sk.K=new olympe.D.J(()=>{},[]);m.rename.K=olympe.D.J.C;m.Rl.K=olympe.D.J.F;m.Ap.K=olympe.D.J.F;m.qw.K=new olympe.D.J(()=>olympe.D.jb,[]);
736
- m.Mw.K=new olympe.D.J(()=>olympe.D.jb,[]);m.Zr.K=olympe.D.J.U;olympe.dm.Fd=class extends olympe.dc.CloudObject{C(){return this.Gb(olympe.dm.Fd.F)}G(){return this.He(olympe.dm.Fd.L)}F(){return this.tb(olympe.dm.Fd.C,olympe.dm.Module)}};olympe.dm.Fd.O=olympe.dc.ya.C('ff021000000000000041',olympe.dm.Fd);olympe.dm.Fd.F=olympe.dm.Fd.O.va('ff023000000000000047');olympe.dm.Fd.L=olympe.dm.Fd.O.va('ff023000000000000048');olympe.dm.Fd.C=olympe.dm.Module.C.Gc();olympe.dm.Fd.prototype.C.K=olympe.D.J.F;olympe.dm.Fd.prototype.G.K=olympe.D.J.G;
736
+ olympe.dm.File.urlProp=olympe.dm.File.O.va('ff023000000000000053');z('olympe.dm.File.urlProp',olympe.dm.File.urlProp);olympe.dm.File.C=olympe.dm.File.O.va('ff023000000000000054');olympe.dm.File.la=[olympe.D.File];m=olympe.dm.File.prototype;m.fn.K=olympe.D.J.F;m.Rk.K=new olympe.D.J(()=>{},[]);m.bn.K=new olympe.D.J(()=>{},[]);m.Sk.K=new olympe.D.J(()=>{},[]);m.rename.K=olympe.D.J.C;m.Rl.K=olympe.D.J.F;m.Bp.K=olympe.D.J.F;m.rw.K=new olympe.D.J(()=>olympe.D.jb,[]);
737
+ m.Nw.K=new olympe.D.J(()=>olympe.D.jb,[]);m.$r.K=olympe.D.J.U;olympe.dm.Fd=class extends olympe.dc.CloudObject{C(){return this.Gb(olympe.dm.Fd.F)}G(){return this.He(olympe.dm.Fd.L)}F(){return this.tb(olympe.dm.Fd.C,olympe.dm.Module)}};olympe.dm.Fd.O=olympe.dc.ya.C('ff021000000000000041',olympe.dm.Fd);olympe.dm.Fd.F=olympe.dm.Fd.O.va('ff023000000000000047');olympe.dm.Fd.L=olympe.dm.Fd.O.va('ff023000000000000048');olympe.dm.Fd.C=olympe.dm.Module.C.Gc();olympe.dm.Fd.prototype.C.K=olympe.D.J.F;olympe.dm.Fd.prototype.G.K=olympe.D.J.G;
737
738
  olympe.dm.Fd.prototype.F.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.Nb=class extends olympe.dm.Zc{F(){return this.tb(olympe.dm.Qb.F,olympe.dm.Qb)}L(){return this.Gb(olympe.dm.Nb.oa)}aa(){return this.Gb(olympe.dm.Nb.wc)}G(){return this.tb(olympe.dm.Nb.L,olympe.dm.Nb)}};olympe.dm.Nb.O=olympe.dc.ya.C('0163d9594700fcf61e54',olympe.dm.Nb);olympe.dm.Nb.oa=olympe.dm.Nb.O.va('017869c7d2833c9492c1');olympe.dm.Nb.wc=olympe.dm.Nb.O.va('017869c80bb9929c76d0');olympe.dm.Nb.L=olympe.dm.Nb.O.Ha('ff02200000000000002b');olympe.dm.Nb.Ue=P(olympe.dm.Nb.O,olympe.dm.Nb.L);
738
739
  olympe.dm.Nb.ac=olympe.dm.Nb.O.Ha('ff02200000000000002a');olympe.dm.Nb.Ge=olympe.dm.Nb.O.Ha('017e9c412e2b944bd590');olympe.dm.Nb.gi=olympe.dm.Nb.O.Ha('017e9c416872a89d3415');olympe.dm.Nb.sh=olympe.dm.Nb.O.Ha('017ebf8fe5c506662098');P(olympe.dc.CloudObject.O,olympe.dm.Nb.ac);olympe.dm.Nb.yd=Ec('100000000000000000dd','PRIMORDIAL');olympe.dm.Nb.prototype.F.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.Nb.prototype.L.K=olympe.D.J.F;olympe.dm.Nb.prototype.aa.K=olympe.D.J.F;
739
- olympe.dm.Nb.prototype.G.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.Property=class extends olympe.dc.CloudObject{F(){return this.qc(olympe.dm.Property.definingModelRel,olympe.dc.CloudObject)}C(){return this.qc(olympe.dm.Property.typeRel,olympe.dc.CloudObject)}Vc(){return this.F().ma().Gr(this.ma())}};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);
740
- 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.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Relation=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Jw(){return olympe.D.Wa.EMPTY}lw(){return this.He(olympe.dm.Relation.Mm)}Tw(){return this.He(olympe.dm.Relation.zn)}Pr(){return this.tb(olympe.dm.Relation.destinationModelRel,olympe.dc.CloudObject).Sc()}Ur(){return this.tb(olympe.dm.Relation.originModelRel,olympe.dc.CloudObject).Sc()}Vc(){return this.Ur().ma().concat(['-',this.ma(),'->',this.Pr().ma()])}};olympe.dm.Relation.O=olympe.dc.ya.C('ff021000000000000006',olympe.dm.Relation);
741
- olympe.dm.Relation.zn=olympe.dm.Relation.O.va('ff023000000000000030');olympe.dm.Relation.Mm=olympe.dm.Relation.O.va('ff023000000000000034');olympe.dm.Relation.Wm=olympe.dm.Relation.O.va('ff023000000000000037');olympe.dm.Relation.Vm=olympe.dm.Relation.O.va('ff023000000000000137');olympe.dm.Relation.Cn=olympe.dm.Relation.O.va('ff023000000000000237');olympe.dm.Relation.Gn=olympe.dm.Relation.O.va('ff023000000000000337');olympe.dm.Relation.Ar=olympe.dm.Relation.O.va('ff023000000000000031');
742
- 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.U);z('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dc.Ub={NONE:null,nz:olympe.dm.Relation.Wm.R(),Hc:olympe.dm.Relation.Vm.R(),tf:olympe.dm.Relation.Cn.R(),OA:olympe.dm.Relation.Gn.R()};
743
- olympe.dc.Ub.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Ub))if(c===a)return b;return null};olympe.dm.Relation.C={Nl:0,rl:5,Aq:1,Ku:4,Ck:2,rk:8,Ho:10,Gu:6,Hu:9,jc:6,Ju:9};olympe.dm.Relation.F={nu:3,cm:4,fu:5,Yl:6};olympe.dm.Relation.L=olympe.dm.Nc.gq+olympe.dm.Nc.Ao;m=olympe.dm.Relation.prototype;m.Jw.K=olympe.D.J.F;m.lw.K=olympe.D.J.G;m.Tw.K=olympe.D.J.G;m.Pr.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Ur.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.rf=class extends olympe.dc.CloudObject{getValue(){}};olympe.dm.rf.O=olympe.dc.ya.C('ff021000000000000019',olympe.dm.rf);olympe.dm.String=class extends olympe.dm.rf{getValue(){return this.Gb(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.va('ff023000000000000026');z('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.getValue.K=olympe.D.J.F;olympe.dm.String.prototype.toString.K=olympe.D.J.C;olympe.dm.Boolean=class extends olympe.dm.rf{getValue(){return this.Bg(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.O=olympe.dc.ya.C('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.O.va('ff023000000000000027');z('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.getValue.K=olympe.D.J.U;olympe.dm.Color=class extends olympe.dm.rf{getValue(){return this.Vr()}};olympe.dm.Color.O=olympe.dc.ya.C('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.O.va('ff023000000000000032');z('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.getValue.K=new olympe.D.J(()=>olympe.D.Color,[]);olympe.dm.DateTime=class extends olympe.dm.rf{getValue(){return this.jj(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.O=olympe.dc.ya.C('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.O.va('ff023000000000000029');z('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.getValue.K=new olympe.D.J(()=>olympe.D.jb,[]);olympe.dm.Enum=class extends olympe.dm.String{ma(){return olympe.D.Fa([super.ma(),super.getValue()],(a,b)=>''!==a.valueOf()?a:b,olympe.D.Wa)}fe(){return this.He(olympe.dm.Enum.rankProp)}static create(a,b,c,d,e){const f=olympe.dc.Oa();e=void 0!==e?e:f.Eb(b)&&f.ee(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;
744
- olympe.dm.Enum.O=olympe.dc.ya.C('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.O.va('017a7690c915975ea995');olympe.dm.Enum.prototype.fe.K=olympe.D.J.G;olympe.dm.hg=class extends olympe.dm.BrickMetadata{mx(){return this.sb(olympe.dc.CloudObject.instancesRel).jl(olympe.dm.Enum.rankProp,olympe.dc.ba.lk.ASC).jd()}static create(a,b){b=a.create(olympe.dm.hg,(new Map).set(olympe.dc.CloudObject.nameProp,b));a.Ra(olympe.dc.CloudObject.extendRel,b,olympe.dm.Enum);return b}};olympe.dm.hg.create=olympe.dm.hg.create;olympe.dm.hg.prototype.getValues=olympe.dm.hg.prototype.mx;olympe.dm.hg.O=olympe.dc.ya.C('017a768f966fc08ebb98',olympe.dm.hg);olympe.dm.Number=class extends olympe.dm.rf{getValue(){return this.He(olympe.dm.Number.valueProp)}};olympe.dm.Number.O=olympe.dc.ya.C('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.O.va('ff023000000000000028');z('olympe.dm.Number.valueProp',olympe.dm.Number.valueProp);olympe.dm.Number.prototype.getValue.K=olympe.D.J.G;olympe.Za={};olympe.Za.bh=class{constructor(a){this.N=a;this.Y=new olympe.D.Xb(`${this.Z()} source context`);this.U=this.C=null}Z(){}L(){}close(){this.U&&this.U(this.Z(),olympe.dc.xk.ut);this.Y.destroy()}};function gh(a){olympe.D.Ec([kc(a.oa)],b=>{if(b.valueOf()){const c=a.G.keys();hh(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.aa)for(const e of c)$b(a.F,f=>{a.N.error(`Could not clear transactions for ${e}: ${f}.`)})})}})}
745
- function ih(a){let b;olympe.D.Ec([kc(a.oa)],c=>{c.valueOf()?(a.aa=!1,b&&(Jb(b),b=null)):(a.aa=!0,b=Ib(()=>{if(a.ka){a.ka=!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))})}
746
- function hh(a,b){const c=olympe.async.wk.create(),d=c.G;c.add((e,f)=>{a.F.storage.L(f)});c.add((e,f,g)=>{const h=olympe.dc.Ga.rb,k=g.get('files'),l=new olympe.async.ng(d);a.G.forEach((n,p)=>{if(p!==h){const q=a.Da.U(p);null!==q?(l.add(a.Sa.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.ka=!1,a.G.clear())});c.start()}
740
+ olympe.dm.Nb.prototype.G.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.dm.Property=class extends olympe.dc.CloudObject{F(){return this.qc(olympe.dm.Property.definingModelRel,olympe.dc.CloudObject)}C(){return this.qc(olympe.dm.Property.typeRel,olympe.dc.CloudObject)}Vc(){return this.F().ma().Hr(this.ma())}};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);
741
+ 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.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Property.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.Relation=class extends olympe.dc.CloudObject{constructor(a,b){super(a,b)}Kw(){return olympe.D.Wa.EMPTY}mw(){return this.He(olympe.dm.Relation.Mm)}Uw(){return this.He(olympe.dm.Relation.zn)}Qr(){return this.tb(olympe.dm.Relation.destinationModelRel,olympe.dc.CloudObject).Sc()}Vr(){return this.tb(olympe.dm.Relation.originModelRel,olympe.dc.CloudObject).Sc()}Vc(){return this.Vr().ma().concat(['-',this.ma(),'->',this.Qr().ma()])}};olympe.dm.Relation.O=olympe.dc.ya.C('ff021000000000000006',olympe.dm.Relation);
742
+ olympe.dm.Relation.zn=olympe.dm.Relation.O.va('ff023000000000000030');olympe.dm.Relation.Mm=olympe.dm.Relation.O.va('ff023000000000000034');olympe.dm.Relation.Wm=olympe.dm.Relation.O.va('ff023000000000000037');olympe.dm.Relation.Vm=olympe.dm.Relation.O.va('ff023000000000000137');olympe.dm.Relation.Cn=olympe.dm.Relation.O.va('ff023000000000000237');olympe.dm.Relation.Gn=olympe.dm.Relation.O.va('ff023000000000000337');olympe.dm.Relation.Br=olympe.dm.Relation.O.va('ff023000000000000031');
743
+ 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.U);z('olympe.dm.Relation.destinationModelRel',olympe.dm.Relation.destinationModelRel);olympe.dc.Ub={NONE:null,oz:olympe.dm.Relation.Wm.R(),Hc:olympe.dm.Relation.Vm.R(),tf:olympe.dm.Relation.Cn.R(),PA:olympe.dm.Relation.Gn.R()};
744
+ olympe.dc.Ub.toString=function(a){for(const [b,c]of Object.entries(olympe.dc.Ub))if(c===a)return b;return null};olympe.dm.Relation.C={Nl:0,rl:5,Bq:1,Lu:4,Ck:2,rk:8,Ho:10,Hu:6,Iu:9,jc:6,Ku:9};olympe.dm.Relation.F={ou:3,cm:4,gu:5,Yl:6};olympe.dm.Relation.L=olympe.dm.Nc.hq+olympe.dm.Nc.Ao;m=olympe.dm.Relation.prototype;m.Kw.K=olympe.D.J.F;m.mw.K=olympe.D.J.G;m.Uw.K=olympe.D.J.G;m.Qr.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.Vr.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.dm.rf=class extends olympe.dc.CloudObject{getValue(){}};olympe.dm.rf.O=olympe.dc.ya.C('ff021000000000000019',olympe.dm.rf);olympe.dm.String=class extends olympe.dm.rf{getValue(){return this.Gb(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.va('ff023000000000000026');z('olympe.dm.String.valueProp',olympe.dm.String.valueProp);olympe.dm.String.prototype.getValue.K=olympe.D.J.F;olympe.dm.String.prototype.toString.K=olympe.D.J.C;olympe.dm.Boolean=class extends olympe.dm.rf{getValue(){return this.Bg(olympe.dm.Boolean.valueProp)}};olympe.dm.Boolean.O=olympe.dc.ya.C('ff021000000000000012',olympe.dm.Boolean);olympe.dm.Boolean.valueProp=olympe.dm.Boolean.O.va('ff023000000000000027');z('olympe.dm.Boolean.valueProp',olympe.dm.Boolean.valueProp);olympe.dm.Boolean.prototype.getValue.K=olympe.D.J.U;olympe.dm.Color=class extends olympe.dm.rf{getValue(){return this.Wr()}};olympe.dm.Color.O=olympe.dc.ya.C('ff021000000000000017',olympe.dm.Color);olympe.dm.Color.valueProp=olympe.dm.Color.O.va('ff023000000000000032');z('olympe.dm.Color.valueProp',olympe.dm.Color.valueProp);olympe.dm.Color.prototype.getValue.K=new olympe.D.J(()=>olympe.D.Color,[]);olympe.dm.DateTime=class extends olympe.dm.rf{getValue(){return this.jj(olympe.dm.DateTime.valueProp)}};olympe.dm.DateTime.O=olympe.dc.ya.C('ff021000000000000014',olympe.dm.DateTime);olympe.dm.DateTime.valueProp=olympe.dm.DateTime.O.va('ff023000000000000029');z('olympe.dm.DateTime.valueProp',olympe.dm.DateTime.valueProp);olympe.dm.DateTime.prototype.getValue.K=new olympe.D.J(()=>olympe.D.jb,[]);olympe.dm.Enum=class extends olympe.dm.String{ma(){return olympe.D.Fa([super.ma(),super.getValue()],(a,b)=>''!==a.valueOf()?a:b,olympe.D.Wa)}fe(){return this.He(olympe.dm.Enum.rankProp)}static create(a,b,c,d,e){const f=olympe.dc.Oa();e=void 0!==e?e:f.Eb(b)&&f.ee(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;
745
+ olympe.dm.Enum.O=olympe.dc.ya.C('016cdd861b32d56c81f7',olympe.dm.Enum);olympe.dm.Enum.rankProp=olympe.dm.Enum.O.va('017a7690c915975ea995');olympe.dm.Enum.prototype.fe.K=olympe.D.J.G;olympe.dm.hg=class extends olympe.dm.BrickMetadata{nx(){return this.sb(olympe.dc.CloudObject.instancesRel).jl(olympe.dm.Enum.rankProp,olympe.dc.ba.lk.ASC).jd()}static create(a,b){b=a.create(olympe.dm.hg,(new Map).set(olympe.dc.CloudObject.nameProp,b));a.Ra(olympe.dc.CloudObject.extendRel,b,olympe.dm.Enum);return b}};olympe.dm.hg.create=olympe.dm.hg.create;olympe.dm.hg.prototype.getValues=olympe.dm.hg.prototype.nx;olympe.dm.hg.O=olympe.dc.ya.C('017a768f966fc08ebb98',olympe.dm.hg);olympe.dm.Number=class extends olympe.dm.rf{getValue(){return this.He(olympe.dm.Number.valueProp)}};olympe.dm.Number.O=olympe.dc.ya.C('ff021000000000000013',olympe.dm.Number);olympe.dm.Number.valueProp=olympe.dm.Number.O.va('ff023000000000000028');z('olympe.dm.Number.valueProp',olympe.dm.Number.valueProp);olympe.dm.Number.prototype.getValue.K=olympe.D.J.G;olympe.Za={};olympe.Za.bh=class{constructor(a){this.N=a;this.Y=new olympe.D.Xb(`${this.Z()} source context`);this.U=this.C=null}Z(){}L(){}close(){this.U&&this.U(this.Z(),olympe.dc.xk.vt);this.Y.destroy()}};function gh(a){olympe.D.Ec([kc(a.oa)],b=>{if(b.valueOf()){const c=a.G.keys();hh(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.aa)for(const e of c)$b(a.F,f=>{a.N.error(`Could not clear transactions for ${e}: ${f}.`)})})}})}
746
+ function ih(a){let b;olympe.D.Ec([kc(a.oa)],c=>{c.valueOf()?(a.aa=!1,b&&(Jb(b),b=null)):(a.aa=!0,b=Ib(()=>{if(a.ja){a.ja=!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))})}
747
+ function hh(a,b){const c=olympe.async.wk.create(),d=c.G;c.add((e,f)=>{a.F.storage.L(f)});c.add((e,f,g)=>{const h=olympe.dc.Ga.rb,k=g.get('files'),l=new olympe.async.ng(d);a.G.forEach((n,p)=>{if(p!==h){const q=a.Da.U(p);null!==q?(l.add(a.Sa.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.ja=!1,a.G.clear())});c.start()}
747
748
  function jh(a,b){const c=new olympe.async.wk(olympe.D.Ja());c.add((d,e)=>{Zb(a.F,f=>null===f?d():e(f))});c.add(d=>{const e=olympe.dc.Ad();a.G.forEach((f,g)=>{const h=Array.from(f.ee()).map(k=>k.tag());Jc(e,olympe.D.Ja(),f,h,[],g)(!0)});d()});Vb(c,(d,e)=>{b(e?Error(e):null)});c.start()}
748
- olympe.Za.Hi=class extends olympe.Za.bh{constructor(a,b,c,d,e){super(a);this.G=new Map;this.oa=c;this.F=d;this.Da=b;this.ka=this.aa=!1;e.get('syncTimeout');e.get('autoSync')&&gh(this);e.get('autoPersist')&&ih(this)}Sa(a,b,c,d,e){const f=olympe.dc.ga.ja.Bk,g=olympe.dc.ga.ja.yl,h=new olympe.dc.db.Ac,k=new olympe.async.ng(olympe.D.Ja()),l=(n,p,q)=>{const r=n.tag(),t=n.fb(olympe.dm.File.mimeTypeProp.R());bc(this.F,u=>{sc(olympe.dc.Cw(),r,u,t,v=>{n.va(olympe.dm.File.urlProp.R(),v);const w=new Map;w.set(olympe.dm.File.urlProp.R(),
749
- v);h.tc(r,w);this.F.storage.C(q)})})};for(const n of c)(c=a.Lf(n))&&c.re()&&k.add(l.bind(this,c));Vb(k,(n,p)=>{n?(n=M(new olympe.dc.ga(f,a,[b.Z()]),q=>{q?e(q.message):(this.C(b.Z(),g,h),q=Array.from(a.ee()).map(r=>r.tag()),olympe.dc.Ad().persist(q),d())}),b.L(n)):e(`Transaction synchronisation failed! ${p?p:''}`)});k.start()}Z(){return olympe.dc.Ga.rb}L(a){var b=olympe.dc.ga.ja.eh,c=olympe.dc.ga.ja.wh;const d=olympe.dc.ga.ja.Ai,e=olympe.dc.ga.ja.zi,f=olympe.dc.ga.ja.Sg,g=olympe.dc.ga.ja.Hl,h=olympe.dc.ga.ja.Qh,
750
- k=olympe.dc.ga.ja.wi,l=olympe.dc.ga.ja.xh;var n=olympe.dc.ga.ja.Sj;const p=a.type;switch(p){case f:a.validate(null);this.F.storage.F();jh(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.Ac,this.G.set(v,w));q.Qc(w);this.aa&&(this.ka=!0)});a.validate(null);a=olympe.dc.transaction.rg.C.Wp;this.C(olympe.dc.Ga.rb,n,{id:q.Z(),finalize:a});break;case e:case d:const r=a.C[0],
751
- t=a.content;a.validate(null);Xb(this.F,t.Z(),v=>{this.N.warn('No graphresult for subscription : '+t.Z(),v,'\n',t.ph.toJSON());this.N.warn();this.C(r,g,new olympe.dc.query.Ci(t.Z(),r,olympe.dc.Ga.rb,new olympe.dc.db.Ac))});break;case h:case l:case k:n=a.content;b=n.file;const u=n.Ye;c=n.se;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.Za.Hi.C='context';const kh=olympe.dc.ga.ja.om,lh=olympe.dc.ga.ja.qm,mh=olympe.dc.ga.ja.QUERY_RESULT,nh=olympe.dc.ga.ja.pm,oh=olympe.dc.ga.ja.eh,ph=olympe.dc.ga.ja.Bk,qh=olympe.dc.ga.ja.Sj,rh=olympe.dc.ga.ja.wh,sh=olympe.dc.ga.ja.Ij,th=olympe.dc.ga.ja.sl,uh=olympe.dc.ga.ja.Qh,vh=olympe.dc.ga.ja.xh,wh=olympe.dc.ga.ja.wi,xh=olympe.dc.ga.ja.lg;
749
+ olympe.Za.Hi=class extends olympe.Za.bh{constructor(a,b,c,d,e){super(a);this.G=new Map;this.oa=c;this.F=d;this.Da=b;this.ja=this.aa=!1;e.get('syncTimeout');e.get('autoSync')&&gh(this);e.get('autoPersist')&&ih(this)}Sa(a,b,c,d,e){const f=olympe.dc.ga.ka.Bk,g=olympe.dc.ga.ka.yl,h=new olympe.dc.db.Ac,k=new olympe.async.ng(olympe.D.Ja()),l=(n,p,q)=>{const r=n.tag(),t=n.fb(olympe.dm.File.mimeTypeProp.R());bc(this.F,u=>{sc(olympe.dc.Dw(),r,u,t,v=>{n.va(olympe.dm.File.urlProp.R(),v);const w=new Map;w.set(olympe.dm.File.urlProp.R(),
750
+ v);h.tc(r,w);this.F.storage.C(q)})})};for(const n of c)(c=a.Lf(n))&&c.re()&&k.add(l.bind(this,c));Vb(k,(n,p)=>{n?(n=M(new olympe.dc.ga(f,a,[b.Z()]),q=>{q?e(q.message):(this.C(b.Z(),g,h),q=Array.from(a.ee()).map(r=>r.tag()),olympe.dc.Ad().persist(q),d())}),b.L(n)):e(`Transaction synchronisation failed! ${p?p:''}`)});k.start()}Z(){return olympe.dc.Ga.rb}L(a){var b=olympe.dc.ga.ka.eh,c=olympe.dc.ga.ka.wh;const d=olympe.dc.ga.ka.Ai,e=olympe.dc.ga.ka.zi,f=olympe.dc.ga.ka.Sg,g=olympe.dc.ga.ka.Hl,h=olympe.dc.ga.ka.Qh,
751
+ k=olympe.dc.ga.ka.wi,l=olympe.dc.ga.ka.xh;var n=olympe.dc.ga.ka.Sj;const p=a.type;switch(p){case f:a.validate(null);this.F.storage.F();jh(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.Ac,this.G.set(v,w));q.Qc(w);this.aa&&(this.ja=!0)});a.validate(null);a=olympe.dc.transaction.rg.C.Xp;this.C(olympe.dc.Ga.rb,n,{id:q.Z(),finalize:a});break;case e:case d:const r=a.C[0],
752
+ t=a.content;a.validate(null);Xb(this.F,t.Z(),v=>{this.N.warn('No graphresult for subscription : '+t.Z(),v,'\n',t.ph.toJSON());this.N.warn();this.C(r,g,new olympe.dc.query.Ci(t.Z(),r,olympe.dc.Ga.rb,new olympe.dc.db.Ac))});break;case h:case l:case k:n=a.content;b=n.file;const u=n.Ye;c=n.se;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.Za.Hi.C='context';const kh=olympe.dc.ga.ka.om,lh=olympe.dc.ga.ka.qm,mh=olympe.dc.ga.ka.QUERY_RESULT,nh=olympe.dc.ga.ka.pm,oh=olympe.dc.ga.ka.eh,ph=olympe.dc.ga.ka.Bk,qh=olympe.dc.ga.ka.Sj,rh=olympe.dc.ga.ka.wh,sh=olympe.dc.ga.ka.Ij,th=olympe.dc.ga.ka.sl,uh=olympe.dc.ga.ka.Qh,vh=olympe.dc.ga.ka.xh,wh=olympe.dc.ga.ka.wi,xh=olympe.dc.ga.ka.lg;
752
753
  function yh(a,b,c,d,e){const f=c.Z();c={t:kh,q:c.ia()};olympe.H.Ba.nb.zb.get(b,c).then(g=>{g.t===mh?(d(null),a.C(b,e||mh,{i:f,r:g.r,s:b})):d(Error(g.e))}).catch(g=>d(Error(g)))}function zh(a,b,c,d,e){const f=c.Z();yh(a,b,c,g=>{if(g)e(g);else{Ah(a,b,f);g={t:lh,q:c.ia()};var h=olympe.H.Ba.nb.zb.observe(b,d,g).subscribe(k=>{const l=k.t;l===nh?(e(null),a.C(b,l,{i:f,r:k.r,s:b})):e(Error(k.e))});d.zc(()=>h.unsubscribe())}},nh)}
753
- function Bh(a,b,c,d){const e=c.Dc;c=new olympe.dc.transaction.vd;e.Qc(c);c={t:oh,i:e.Z(),p:$d(c)};olympe.H.Ba.nb.zb.send(b,c).then(()=>{d(null);a.C(b,qh,{id:e.Z(),finalize:olympe.dc.transaction.rg.C.Vp})}).catch(f=>d(Error(f)))}function Ch(a,b,c,d,e){var f=c.Dc;c=f.Z();const g=new olympe.dc.transaction.vd;f.Qc(g);f={t:rh,i:c,p:$d(g)};olympe.H.Ba.nb.zb.publish(b,f).then(()=>e(null)).catch(h=>e(Error(h)));Dh(a,c,b,d)}
754
+ function Bh(a,b,c,d){const e=c.Dc;c=new olympe.dc.transaction.vd;e.Qc(c);c={t:oh,i:e.Z(),p:$d(c)};olympe.H.Ba.nb.zb.send(b,c).then(()=>{d(null);a.C(b,qh,{id:e.Z(),finalize:olympe.dc.transaction.rg.C.Wp})}).catch(f=>d(Error(f)))}function Ch(a,b,c,d,e){var f=c.Dc;c=f.Z();const g=new olympe.dc.transaction.vd;f.Qc(g);f={t:rh,i:c,p:$d(g)};olympe.H.Ba.nb.zb.publish(b,f).then(()=>e(null)).catch(h=>e(Error(h)));Dh(a,c,b,d)}
754
755
  function Ah(a,b,c){const d=()=>{const f=setInterval(()=>{0===a.F.size?clearInterval(f):a.F.forEach((g,h)=>{olympe.H.Ba.nb.zb.send(h,{t:xh,s:Array.from(g)}).catch(k=>a.N.warn(`Error occurred while keeping alive subscription list: ${k}`))})},a.aa)},e=a.F.get(b)||new Set;e.add(c);a.F.set(b,e);1===a.F.size&&d()}
755
756
  function Dh(a,b,c,d){const e=new olympe.H.Ba.nb.zb(b,d);e.listen().subscribe(f=>{f=f.body();if(f.t===sh){a.N.error(`Burst Transaction ${b} failed. Local rollback is not supported yet. Refresh the application`);const g=new olympe.dc.db.Ac;a.C(c,sh,{id:b,rollback:g,error:f.r})}});d.zc(()=>e.stop())}
756
- olympe.Za.yu=class extends olympe.Za.bh{constructor(a,b,c){super(a);this.F=new Map;this.G=b;this.aa=c}Z(){return olympe.dc.Ga.kq}L(a){const b=a.C[0],c=a.type,d=a.validate.bind(a),e=a.content;a=a.F;switch(c){case kh:yh(this,b,e,d);break;case lh:zh(this,b,e,a,d);break;case oh:case ph:Bh(this,b,e,d);break;case rh:Ch(this,b,e,a,d);break;case th:e.t=c;olympe.H.Ba.nb.zb.publish(b,e).then(d).catch(f=>d(Error(f)));break;case uh:case vh:case wh:olympe.H.Ba.nb.zb.get(b,{t:c,f:e.file}).then(f=>{this.G.ka(e.file,
757
- b,f);c===uh?this.G.Y(e.file,e.content,e.mimeType,e.Ye,e.se):c===vh?this.G.U(e.file,e.url,e.mimeType,e.Ye,e.se):this.G.L(e.file,e.Ye,e.se)}).catch(e.se);break;default:this.N.info(`Messages of type ${c} is not supported by the source ${this.Z()}`)}}};olympe.Za.Buffer=class{constructor(){this.counter=0;this.Ob=new Map}buffer(a){const b=this.counter++;this.Ob.set(b,a);return this.clear.bind(this,b)}clear(a){this.Ob.delete(a)}};olympe.Za.pg=class a{constructor(b,c,d){this.N=b;this.Y=c;this.ka=new olympe.Za.Buffer(this);this.L=new Map;this.G=this.Ib(d);new olympe.D.Xb('Data Router context');this.F=new Map;this.aa=new Map;this.Ya()}Ya(){this.N.info('Initializing DR layer');olympe.D.kn(kc(this.Y),()=>{this.N.info('Router: ONLINE')},()=>{this.N.log('Router: OFFLINE (no auth layer not online)');for(const b of this.ka.Ob.values())this.Da(b)});this.N.log('DONE initializing DR layer (waiting for AUTH layer session to be established)')}send(b){M(b,
758
- this.ka.buffer(b));this.Da(b)}C(b,c){const d=olympe.W.fc();let e=this.F.get(b);void 0===e&&(e=new Map,this.F.set(b,e));e.set(d,c)}oa(b){this.aa.set(olympe.W.yg(),b)}wb(b,c,d){this.F.has(c)&&this.F.get(c).forEach(e=>{e(b,d)})}Lb(b,c){this.L.set(b,c);c.C=this.wb.bind(this);c.U=this.Sa.bind(this)}U(b){return this.L.get(b)||this.L.get(olympe.dc.Ga.kq)}Sa(b,c){this.aa.forEach(d=>{d(b,c)})}Da(b){this.N.debug('Processing message',b.toString());this.ab(b).forEach(c=>{(c=this.U(c))&&c.L(b)})}ab(b){var c=olympe.dc.ga.ja.Sg,
759
- d=olympe.dc.ga.ja.zi,e=olympe.dc.ga.ja.Ai,f=olympe.dc.ga.ja.eh,g=olympe.dc.ga.ja.wh;const h=olympe.dc.ga.ja.Qh,k=olympe.dc.ga.ja.wi,l=olympe.dc.ga.ja.xh;switch(b.type){case c:d=this.G.get(a.C.Sg)||[];break;case d:case e:d=this.G.get(a.C.nm)||[];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.ct)||[];break;default:d=[]}c=b.content;e=olympe.auth.sa.C.Ng;f=olympe.auth.sa.C.Ah;g=jc(this.Y);e=!(g===e||g===f);for(var n of d)if(d=n,f=c&&c.Z&&c.Z(),g=d.get('type'),
760
- g===a.F.bm&&e||g===a.F.np&&d.get('id')===f||g===a.F.jc)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}Ib(b){const c=Object.values(olympe.Za.pg.C),d=Object.values(olympe.Za.pg.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',
761
- 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.Za.pg.C={Sg:'getContext',nm:'query',TRANSACTION:'transaction',ct:'file'};
762
- olympe.Za.pg.F={jc:'default',bm:'offline',np:'id'};olympe.Za.pg.la=[olympe.dc.pg];olympe.Za.Tj=class{ka(){}Y(){}U(){}L(){}};olympe.Za.P={xa:'dr.Manager',Ea:'dr.Logger',me:'dr.sources.Router',Hp:'dr.sources.Local',um:'dr.sources.Server',mq:'dr.sources.Peer',Rg:'dr.sources.FileSource'};olympe.Za.Config={Xl:'dr.keepAliveTimeout',Rn:'dr.autoSync',Qn:'dr.autoPersist',Uq:'dr.syncTimeout',Gq:'dr.routing'};
763
- olympe.T.config(function(a){D(a,olympe.Za.Config.Gq,{});D(a,olympe.Za.Config.Xl,3E5);D(a,olympe.Za.Config.Rn,!1);D(a,olympe.Za.Config.Qn,!1);D(a,olympe.Za.Config.Uq,3E4);C(a,olympe.Za.P.Ea,[olympe.ra.P.xa],b=>b.Rc('dr'));C(a,olympe.Za.P.Hp,[olympe.Za.P.Ea,olympe.Za.P.me,olympe.auth.P.xa,olympe.ic.P.uo,new olympe.T.fa(olympe.Za.Config.Rn),new olympe.T.fa(olympe.Za.Config.Qn),new olympe.T.fa(olympe.Za.Config.Uq)],(b,c,d,e,f,g,h)=>{f=(new Map).set('autoSync',f).set('autoPersist',g).set('syncTimeout',
764
- h);return new olympe.Za.Hi(b,c,d,e,f)});sa(a,olympe.Za.P.um);A(a,olympe.Za.P.mq,olympe.Za.yu,olympe.Za.P.Ea,olympe.Za.P.Rg,new olympe.T.fa(olympe.Za.Config.Xl));sa(a,olympe.Za.P.Rg);A(a,olympe.Za.P.me,olympe.Za.pg,olympe.Za.P.Ea,olympe.auth.P.xa,new olympe.T.fa(olympe.Za.Config.Gq));ra(a,olympe.dc.P.me,olympe.Za.P.me);C(a,olympe.dc.query.Mb.dk,[olympe.dc.query.Mb.dk],b=>new olympe.dc.mm(b))},'olympe.dr');
765
- olympe.T.run([olympe.Za.P.me,olympe.Za.P.Hp,olympe.Za.P.um,olympe.Za.P.mq],(a,...b)=>{b.forEach(c=>a.Lb(c.Z(),c))});olympe.H={};olympe.H.Yc={ui:1,dg:2,uc:3,qf:4,dz:5,Di:6,BA:7};olympe.H.ja={Di:1,hv:2,bt:3,lg:5};olympe.H.sa=class{ab(){}connect(){}disconnect(){}Ue(){}Rf(){}Y(){}ac(){}Ib(){}Da(){}yd(){}};olympe.H.sa.C={INIT:'initialize',CONNECTING:'connecting',gg:'disconnected',ti:'connected',Yg:'reconnecting',uc:'error'};olympe.H.sa.G={Hh:1,it:-1,vt:-2,Zu:-3};function Eh(a,b){const c=a.G.get(b)||a.Sa;a.G.delete(b);return`${c}/${b}`}
766
- olympe.H.Tj=class{constructor(a,b,c,d,e){this.N=a;this.F=b;this.oa=c;this.Sa=d;this.Ya=e;this.C=new Map;this.G=new Map;this.aa=new Map;this.Da=new olympe.D.Xb('File manager context')}ka(a,b,c){b&&this.G.set(a,`${this.Ya}/${b}`);c&&this.aa.set(a,c)}Y(a,b,c,d,e){const f=Nb(Eh(this,a),olympe.net.cb.$d.mk,b,olympe.net.cb.ResponseType.ql);Ob(f,{[olympe.net.cb.Headers.pi]:this.bd(a),[olympe.net.cb.Headers.Kj]:c||'application/octet-stream'});this.F.C(f,g=>{g=g.Rd();g===olympe.net.cb.hd.Hh||g===olympe.net.cb.hd.wl?
757
+ olympe.Za.zu=class extends olympe.Za.bh{constructor(a,b,c){super(a);this.F=new Map;this.G=b;this.aa=c}Z(){return olympe.dc.Ga.lq}L(a){const b=a.C[0],c=a.type,d=a.validate.bind(a),e=a.content;a=a.F;switch(c){case kh:yh(this,b,e,d);break;case lh:zh(this,b,e,a,d);break;case oh:case ph:Bh(this,b,e,d);break;case rh:Ch(this,b,e,a,d);break;case th:e.t=c;olympe.H.Ba.nb.zb.publish(b,e).then(d).catch(f=>d(Error(f)));break;case uh:case vh:case wh:olympe.H.Ba.nb.zb.get(b,{t:c,f:e.file}).then(f=>{this.G.ja(e.file,
758
+ b,f);c===uh?this.G.Y(e.file,e.content,e.mimeType,e.Ye,e.se):c===vh?this.G.U(e.file,e.url,e.mimeType,e.Ye,e.se):this.G.L(e.file,e.Ye,e.se)}).catch(e.se);break;default:this.N.info(`Messages of type ${c} is not supported by the source ${this.Z()}`)}}};olympe.Za.Buffer=class{constructor(){this.counter=0;this.Ob=new Map}buffer(a){const b=this.counter++;this.Ob.set(b,a);return this.clear.bind(this,b)}clear(a){this.Ob.delete(a)}};olympe.Za.pg=class a{constructor(b,c,d){this.N=b;this.Y=c;this.ja=new olympe.Za.Buffer(this);this.L=new Map;this.G=this.Ib(d);new olympe.D.Xb('Data Router context');this.F=new Map;this.aa=new Map;this.Ya()}Ya(){this.N.info('Initializing DR layer');olympe.D.kn(kc(this.Y),()=>{this.N.info('Router: ONLINE')},()=>{this.N.log('Router: OFFLINE (no auth layer not online)');for(const b of this.ja.Ob.values())this.Da(b)});this.N.log('DONE initializing DR layer (waiting for AUTH layer session to be established)')}send(b){M(b,
759
+ this.ja.buffer(b));this.Da(b)}C(b,c){const d=olympe.W.fc();let e=this.F.get(b);void 0===e&&(e=new Map,this.F.set(b,e));e.set(d,c)}oa(b){this.aa.set(olympe.W.yg(),b)}wb(b,c,d){this.F.has(c)&&this.F.get(c).forEach(e=>{e(b,d)})}Lb(b,c){this.L.set(b,c);c.C=this.wb.bind(this);c.U=this.Sa.bind(this)}U(b){return this.L.get(b)||this.L.get(olympe.dc.Ga.lq)}Sa(b,c){this.aa.forEach(d=>{d(b,c)})}Da(b){this.N.debug('Processing message',b.toString());this.ab(b).forEach(c=>{(c=this.U(c))&&c.L(b)})}ab(b){var c=olympe.dc.ga.ka.Sg,
760
+ d=olympe.dc.ga.ka.zi,e=olympe.dc.ga.ka.Ai,f=olympe.dc.ga.ka.eh,g=olympe.dc.ga.ka.wh;const h=olympe.dc.ga.ka.Qh,k=olympe.dc.ga.ka.wi,l=olympe.dc.ga.ka.xh;switch(b.type){case c:d=this.G.get(a.C.Sg)||[];break;case d:case e:d=this.G.get(a.C.nm)||[];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.dt)||[];break;default:d=[]}c=b.content;e=olympe.auth.sa.C.Ng;f=olympe.auth.sa.C.Ah;g=jc(this.Y);e=!(g===e||g===f);for(var n of d)if(d=n,f=c&&c.Z&&c.Z(),g=d.get('type'),
761
+ g===a.F.bm&&e||g===a.F.op&&d.get('id')===f||g===a.F.jc)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}Ib(b){const c=Object.values(olympe.Za.pg.C),d=Object.values(olympe.Za.pg.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',
762
+ 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.Za.pg.C={Sg:'getContext',nm:'query',TRANSACTION:'transaction',dt:'file'};
763
+ olympe.Za.pg.F={jc:'default',bm:'offline',op:'id'};olympe.Za.pg.la=[olympe.dc.pg];olympe.Za.Tj=class{ja(){}Y(){}U(){}L(){}};olympe.Za.P={xa:'dr.Manager',Ea:'dr.Logger',me:'dr.sources.Router',Ip:'dr.sources.Local',um:'dr.sources.Server',nq:'dr.sources.Peer',Rg:'dr.sources.FileSource'};olympe.Za.Config={Xl:'dr.keepAliveTimeout',Rn:'dr.autoSync',Qn:'dr.autoPersist',Vq:'dr.syncTimeout',Hq:'dr.routing'};
764
+ olympe.T.config(function(a){D(a,olympe.Za.Config.Hq,{});D(a,olympe.Za.Config.Xl,3E5);D(a,olympe.Za.Config.Rn,!1);D(a,olympe.Za.Config.Qn,!1);D(a,olympe.Za.Config.Vq,3E4);C(a,olympe.Za.P.Ea,[olympe.ra.P.xa],b=>b.Rc('dr'));C(a,olympe.Za.P.Ip,[olympe.Za.P.Ea,olympe.Za.P.me,olympe.auth.P.xa,olympe.ic.P.uo,new olympe.T.fa(olympe.Za.Config.Rn),new olympe.T.fa(olympe.Za.Config.Qn),new olympe.T.fa(olympe.Za.Config.Vq)],(b,c,d,e,f,g,h)=>{f=(new Map).set('autoSync',f).set('autoPersist',g).set('syncTimeout',
765
+ h);return new olympe.Za.Hi(b,c,d,e,f)});sa(a,olympe.Za.P.um);A(a,olympe.Za.P.nq,olympe.Za.zu,olympe.Za.P.Ea,olympe.Za.P.Rg,new olympe.T.fa(olympe.Za.Config.Xl));sa(a,olympe.Za.P.Rg);A(a,olympe.Za.P.me,olympe.Za.pg,olympe.Za.P.Ea,olympe.auth.P.xa,new olympe.T.fa(olympe.Za.Config.Hq));ra(a,olympe.dc.P.me,olympe.Za.P.me);C(a,olympe.dc.query.Mb.dk,[olympe.dc.query.Mb.dk],b=>new olympe.dc.mm(b))},'olympe.dr');
766
+ olympe.T.run([olympe.Za.P.me,olympe.Za.P.Ip,olympe.Za.P.um,olympe.Za.P.nq],(a,...b)=>{b.forEach(c=>a.Lb(c.Z(),c))});olympe.H={};olympe.H.Yc={ui:1,dg:2,uc:3,qf:4,ez:5,Di:6,CA:7};olympe.H.ka={Di:1,jv:2,ct:3,lg:5};olympe.H.sa=class{ab(){}connect(){}disconnect(){}Ue(){}Rf(){}Y(){}ac(){}Ib(){}Da(){}yd(){}};olympe.H.sa.C={INIT:'initialize',CONNECTING:'connecting',gg:'disconnected',ti:'connected',Yg:'reconnecting',uc:'error'};olympe.H.sa.G={Hh:1,jt:-1,wt:-2,$u:-3};function Eh(a,b){const c=a.G.get(b)||a.Sa;a.G.delete(b);return`${c}/${b}`}
767
+ olympe.H.Tj=class{constructor(a,b,c,d,e){this.N=a;this.F=b;this.oa=c;this.Sa=d;this.Ya=e;this.C=new Map;this.G=new Map;this.aa=new Map;this.Da=new olympe.D.Xb('File manager context')}ja(a,b,c){b&&this.G.set(a,`${this.Ya}/${b}`);c&&this.aa.set(a,c)}Y(a,b,c,d,e){const f=Nb(Eh(this,a),olympe.net.cb.$d.mk,b,olympe.net.cb.ResponseType.ql);Ob(f,{[olympe.net.cb.Headers.pi]:this.bd(a),[olympe.net.cb.Headers.Kj]:c||'application/octet-stream'});this.F.C(f,g=>{g=g.Rd();g===olympe.net.cb.hd.Hh||g===olympe.net.cb.hd.wl?
767
768
  (g=new URL(f.C()),d(g.pathname)):e&&(g=`Failed to create file ${a}. Response code ${g}`,this.N.error(g),e(g))})}U(a,b,c,d,e){const f=olympe.D.Ja();d={Ye:f.C(d),se:e&&f.C(e)};if(this.C.has(a))this.C.get(a).push(d);else{this.C.set(a,[d]);if(null===b){var g=Nb(Eh(this,a));Ob(g,{[olympe.net.cb.Headers.pi]:this.bd(a)})}else g=Nb(b);g.F=olympe.net.cb.ResponseType.ql;Ob(g,{[olympe.net.cb.Headers.Kj]:c||'application/octet-stream'});this.Da.run(()=>{this.F.C(g,h=>{const k=h.Rd(),l=this.C.get(a);if(200<=k&&
768
769
  300>k){const n=h.getData();l&&l.forEach(p=>{if(f.Ab()){const q=f.Lb(),r=f.Z();this.N.warn(`Context ${q} ${r} is being destroyed while file tag ${a} is being downloaded`)}p.Ye(n)})}else{const n=`Failed to download file ${a}. Response code ${k}`;l&&l.forEach(p=>{p.se&&p.se(n)})}this.C.delete(a)})})}}L(a,b,c){const d=Nb(Eh(this,a),olympe.net.cb.$d.Hc);Ob(d,{[olympe.net.cb.Headers.pi]:this.bd(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),
769
- c&&c(e))})}bd(a){const b=this.aa.get(a);b&&this.aa.delete(a);return b||olympe.D.bb(mc(this.oa))}};olympe.H.Tj.la=[olympe.Za.Tj];const Fh=olympe.dc.ga.ja.Sg,Gh=olympe.dc.ga.ja.eh,Hh=olympe.dc.ga.ja.Bk,Ih=olympe.dc.ga.ja.wh,Jh=olympe.dc.ga.ja.zi,Kh=olympe.dc.ga.ja.Ai,Lh=olympe.dc.ga.ja.Zo,Mh=olympe.dc.ga.ja.$o,Nh=olympe.dc.ga.ja.Hl,Oh=olympe.dc.ga.ja.wi,Ph=olympe.dc.ga.ja.xh,Qh=olympe.dc.ga.ja.Qh,Rh=olympe.dc.ga.ja.Sj,Sh=olympe.dc.ga.ja.gv,Th=olympe.dc.ga.ja.Fu,Uh=olympe.dc.ga.ja.jt,Vh=olympe.dc.ga.ja.sl,Wh=olympe.dc.ga.ja.Fs;
770
- function Xh(a){a.G.Da(olympe.H.Yc.ui,a.Ya.bind(a));olympe.D.Ec([kc(a.oa)],b=>{b=b.valueOf()?olympe.dc.xk.bq:olympe.dc.xk.bm;a.U&&a.U(a.Z(),b)},'Server source is online')}function Yh(a,b,c){const d=b.Dc;b=new olympe.dc.transaction.vd(!0);d.Qc(b);Zh(a,a.wb,Gh,!0,$d(b),e=>{c&&c(e);a.C(a.Z(),Rh,{id:d.Z(),finalize:olympe.dc.transaction.rg.C.Vp})})}
771
- function $h(a,b,c,d){const e=c.Z();a.N.log('Graphdef (ID ',e,') sent: ',c);const f=c instanceof olympe.dc.query.Pl?a.ab:a.Da,g=(new olympe.H.$.Vj).ia(c);c=new olympe.async.ng(a.Y);b===Kh&&c.add((k,l)=>{a.F.set(e,{notification:null,ey:a.Y.C(n=>n?l(n):k())});ai(a,b,g,n=>n&&l(n.message))});const h=olympe.D.Ja();c.add((k,l)=>{h.run(()=>{Zh(a,f,Jh,!1,g,a.Y.C(n=>n?l(n.message):k()))})});Vb(c,(k,l)=>{const n=a.F.get(e);k&&n&&n.notification?a.C(a.Z(),Mh,n.notification):!k&&n&&bi(a,Lh,e,p=>p&&a.N.warn(p));
770
+ c&&c(e))})}bd(a){const b=this.aa.get(a);b&&this.aa.delete(a);return b||olympe.D.bb(mc(this.oa))}};olympe.H.Tj.la=[olympe.Za.Tj];const Fh=olympe.dc.ga.ka.Sg,Gh=olympe.dc.ga.ka.eh,Hh=olympe.dc.ga.ka.Bk,Ih=olympe.dc.ga.ka.wh,Jh=olympe.dc.ga.ka.zi,Kh=olympe.dc.ga.ka.Ai,Lh=olympe.dc.ga.ka.Zo,Mh=olympe.dc.ga.ka.$o,Nh=olympe.dc.ga.ka.Hl,Oh=olympe.dc.ga.ka.wi,Ph=olympe.dc.ga.ka.xh,Qh=olympe.dc.ga.ka.Qh,Rh=olympe.dc.ga.ka.Sj,Sh=olympe.dc.ga.ka.hv,Th=olympe.dc.ga.ka.Gu,Uh=olympe.dc.ga.ka.kt,Vh=olympe.dc.ga.ka.sl,Wh=olympe.dc.ga.ka.Gs;
771
+ function Xh(a){a.G.Da(olympe.H.Yc.ui,a.Ya.bind(a));olympe.D.Ec([kc(a.oa)],b=>{b=b.valueOf()?olympe.dc.xk.cq:olympe.dc.xk.bm;a.U&&a.U(a.Z(),b)},'Server source is online')}function Yh(a,b,c){const d=b.Dc;b=new olympe.dc.transaction.vd(!0);d.Qc(b);Zh(a,a.wb,Gh,!0,$d(b),e=>{c&&c(e);a.C(a.Z(),Rh,{id:d.Z(),finalize:olympe.dc.transaction.rg.C.Wp})})}
772
+ function $h(a,b,c,d){const e=c.Z();a.N.log('Graphdef (ID ',e,') sent: ',c);const f=c instanceof olympe.dc.query.Pl?a.ab:a.Da,g=(new olympe.H.$.Vj).ia(c);c=new olympe.async.ng(a.Y);b===Kh&&c.add((k,l)=>{a.F.set(e,{notification:null,gy:a.Y.C(n=>n?l(n):k())});ai(a,b,g,n=>n&&l(n.message))});const h=olympe.D.Ja();c.add((k,l)=>{h.run(()=>{Zh(a,f,Jh,!1,g,a.Y.C(n=>n?l(n.message):k()))})});Vb(c,(k,l)=>{const n=a.F.get(e);k&&n&&n.notification?a.C(a.Z(),Mh,n.notification):!k&&n&&bi(a,Lh,e,p=>p&&a.N.warn(p));
772
773
  a.F.delete(e);d(l?Error(l):null)});c.start()}function bi(a,b,c,d){a.N.log('Unsubscribe to: ',c);ai(a,b,{i:c},d)}function ai(a,b,c,d){b={c:b};Object.assign(b,c);a.G.Y(olympe.H.Yc.ui,b,d&&(e=>{d(e)}))}function Zh(a,b,c,d,e,f){if(a.G.ab()){const g=olympe.H.Yc.ui;!d&&e&&Object.assign(e,{c});c=olympe.D.bb(mc(a.oa)).valueOf();a.G.ac(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'))}
773
- olympe.H.bh=class extends olympe.Za.bh{constructor(a,b,c,d,e){super(a);this.G=b;this.oa=c;new olympe.H.$.gb;this.aa=new olympe.dc.W.Ki(this.Z());this.ka=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.Sa=e[0];this.ab=e[1];this.Da=e[2];this.wb=e[3];this.F=new Map;Xh(this)}Z(){return olympe.dc.Ga.Pc}L(a){var b=a.type;const c=a.validate.bind(a);a=a.content;switch(b){case Fh:Zh(this,
774
- this.Sa,olympe.dc.ga.ja.Sg,!1,null,c);break;case Ih:b=new olympe.dc.transaction.vd;var d=a.Dc;a=a.rh;d.Qc(b);ai(this,Ih,{i:d.Z(),r:a,p:$d(b)});c(null);break;case Vh:b=new olympe.dc.transaction.vd;a=a.Dc;a.Qc(b);ai(this,Vh,{i:a.Z(),p:$d(b)},c);break;case Gh:b=new olympe.dc.transaction.vd;d=a.Dc;a=a.rh;d.Qc(b);ai(this,olympe.dc.ga.ja.eh,{i:d.Z(),r:a,p:$d(b)},c);break;case Hh:Yh(this,a,c);break;case Jh:case Kh:$h(this,b,a,c);break;case Lh:bi(this,b,a,c);break;case Sh:ai(this,Sh,{},c);break;case Th:ai(this,
775
- Th,{},c);break;case Uh:ai(this,Uh,{},c);break;case Wh:ai(this,Wh,{},c);break;case Ph:this.ka.U(a.file,a.url,a.mimeType,a.Ye,a.se);break;case Oh:this.ka.L(a.file,a.Ye,a.se);break;case Qh:this.ka.Y(a.file,a.content,a.mimeType,a.Ye,a.se);break;default:this.N.info(`Message of type ${b} not supported yet`)}}Ya(a){var b=olympe.dc.ga.ja.yl,c=olympe.dc.ga.ja.Ij;const d=olympe.dc.ga.ja.hk,e=olympe.dc.ga.ja.Ru,f=olympe.dc.ga.ja.Ep;var g=olympe.dc.ga.ja.kt;const h=a.c;h===b?(a=this.aa.C(a.p),this.C(this.Z(),
774
+ olympe.H.bh=class extends olympe.Za.bh{constructor(a,b,c,d,e){super(a);this.G=b;this.oa=c;new olympe.H.$.gb;this.aa=new olympe.dc.W.Ki(this.Z());this.ja=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.Sa=e[0];this.ab=e[1];this.Da=e[2];this.wb=e[3];this.F=new Map;Xh(this)}Z(){return olympe.dc.Ga.Pc}L(a){var b=a.type;const c=a.validate.bind(a);a=a.content;switch(b){case Fh:Zh(this,
775
+ this.Sa,olympe.dc.ga.ka.Sg,!1,null,c);break;case Ih:b=new olympe.dc.transaction.vd;var d=a.Dc;a=a.rh;d.Qc(b);ai(this,Ih,{i:d.Z(),r:a,p:$d(b)});c(null);break;case Vh:b=new olympe.dc.transaction.vd;a=a.Dc;a.Qc(b);ai(this,Vh,{i:a.Z(),p:$d(b)},c);break;case Gh:b=new olympe.dc.transaction.vd;d=a.Dc;a=a.rh;d.Qc(b);ai(this,olympe.dc.ga.ka.eh,{i:d.Z(),r:a,p:$d(b)},c);break;case Hh:Yh(this,a,c);break;case Jh:case Kh:$h(this,b,a,c);break;case Lh:bi(this,b,a,c);break;case Sh:ai(this,Sh,{},c);break;case Th:ai(this,
776
+ Th,{},c);break;case Uh:ai(this,Uh,{},c);break;case Wh:ai(this,Wh,{},c);break;case Ph:this.ja.U(a.file,a.url,a.mimeType,a.Ye,a.se);break;case Oh:this.ja.L(a.file,a.Ye,a.se);break;case Qh:this.ja.Y(a.file,a.content,a.mimeType,a.Ye,a.se);break;default:this.N.info(`Message of type ${b} not supported yet`)}}Ya(a){var b=olympe.dc.ga.ka.yl,c=olympe.dc.ga.ka.Ij;const d=olympe.dc.ga.ka.hk,e=olympe.dc.ga.ka.Su,f=olympe.dc.ga.ka.Fp;var g=olympe.dc.ga.ka.lt;const h=a.c;h===b?(a=this.aa.C(a.p),this.C(this.Z(),
776
777
  b,a)):h===c?(g=a.error.reason,b=this.aa.C(a.p),this.C(this.Z(),c,{id:a.i,rollback:b,error:g})):h===Nh?(g=olympe.dc.Ga.rb,c=olympe.dc.Ga.Pc,b=a.i,0<a.s?g=new olympe.dc.query.errors.Xj(b,c,g,a.info.error.reason):(g=this.aa.U(b,g,a.p),this.N.debug('< Graphdef Result (ID ',g.Z(),'):',a.p),this.N.log('< Graphdef Result (ID ',g.Z(),') with',g.Dc.G(),'operations')),this.C(this.Z(),Nh,g)):h===Mh?(g=a.i,a=this.aa.L(g,a.p),this.F.has(g)?(g=this.F.get(g),g.notification?gf(a,g.notification):g.notification=a):
777
- this.C(this.Z(),Mh,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.rg.C.hk,c=0<a.s?a.info.error.reason:null,this.C(this.Z(),Rh,{id:a.i,finalize:g,error:c})):h===e?(g=this.F.get(a.i))&&g.ey(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,{XC:c,nD:b,iD:a}))}};olympe.H.bh.F={gA:1,hB:2};
778
+ this.C(this.Z(),Mh,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.rg.C.hk,c=0<a.s?a.info.error.reason:null,this.C(this.Z(),Rh,{id:a.i,finalize:g,error:c})):h===e?(g=this.F.get(a.i))&&g.gy(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,{YC:c,oD:b,jD:a}))}};olympe.H.bh.F={hA:1,iB:2};
778
779
  olympe.H.bh.C={100:'Insufficient Rights',200:'Constraints',300:'IOException',400:'Unexpected',500:'Non Existing Subscription'};olympe.H.Zj=class{constructor(){}};olympe.H.Zj.la=[olympe.dc.da.Zj];olympe.H.Ba={};function ci(a,b,c){Sb(a.C,b,d=>{d=new olympe.H.Ba.Ob.Request(d.dest,d.src,d.auth,d.seq,d.type,d.content);return c(d)})}function di(a,b,c){a.L.set(b,c)}function ei(a,b){return new Promise((c,d)=>{Tb(a.C,b,e=>e?d(e):c())})}function fi(a,b){return new Promise((c,d)=>{const e=b.bd(),f=a.Y.get(e);void 0!==f?c(f):a.U.oh(b.bd(),(g,h)=>{g?d(g):(a.Y.set(e,h),c(h))})})}
779
780
  olympe.H.Ba.sa=class{constructor(a,b,c,d){this.N=a;this.U=c;a=new olympe.W.wm(d.get('messageTimeout'));a.C=this.aa.bind(this);this.L=a;a=d.get('url');b=d.get('connectionOptions');this.C=new olympe.net.gk(a,b);this.Y=new olympe.W.wm(d.get('tokenTimeout'));this.G=1;this.F=olympe.W.fc()}connect(){return new Promise(a=>{Rb(this.C)?a():this.C.connect(()=>{Sb(this.C,this.F,b=>{b=new olympe.H.Ba.Ob.Response(b.dest,b.src,b.seq,b.type,b.content);const c=this.L.get(b.G);c&&(this.L.delete(b.G),c(b))});a()})})}disconnect(){return new Promise(a=>
780
- this.C.end(!1,()=>a()))}Le(a,b,c){return new Promise((d,e)=>{const f=a.source,g=new olympe.H.Ba.Ob.Response(f,this.F,a.G,b,c);this.C.publish(f,g.ia(),void 0,h=>h?e(h):d())})}request(a,b,c){return new Promise((d,e)=>{const f=this.G;this.G++;var g=olympe.D.bb(mc(this.U));g=new olympe.H.Ba.Ob.Request(a,this.F,g,f,b,c);this.C.publish(a,g.ia(),void 0,h=>h?e(h):d(f))})}notify(a,b,c){return new Promise((d,e)=>{var f=this.G;this.G++;f=new olympe.H.Ba.Ob.Response(b,a,f,olympe.H.Ba.Ob.Response.ja.ym,c);this.C.publish(b,
781
- f.ia(),void 0,g=>g?e(g):d())})}aa(a,b){b(new olympe.H.Ba.Ob.Response(this.F,this.F,a,olympe.H.Ba.Ob.Response.ja.uc,{reason:'Timeout'}))}};olympe.H.Ba.Ob={};olympe.H.Ba.Ob.Request=class{constructor(a,b,c,d,e,f){this.G=d;this.destination=a;this.source=b;this.L=c;this.C=e;this.F=f||null}bd(){return this.L}ia(){return{dest:this.destination,src:this.source,seq:this.G,auth:this.L,type:this.C,content:this.F}}toString(){return JSON.stringify(this)}};olympe.H.Ba.Ob.Request.ja={SEND:0,GET:1,PUBLISH:2,SUBSCRIBE:3};olympe.H.Ba.Ob.Response=class{constructor(a,b,c,d,e){this.G=c;this.destination=a;this.source=b;this.F=d;this.C=e||null}ia(){return{dest:this.destination,src:this.source,seq:this.G,type:this.F,content:this.C}}toString(){return JSON.stringify(this)}};olympe.H.Ba.Ob.Response.ja={ym:0,Ln:1,br:2,uc:3};olympe.H.Ba.nb={};const gi=olympe.H.Ba.Ob.Response.ja.Ln,hi=olympe.H.Ba.Ob.Response.ja.uc,ii=olympe.H.Ba.Ob.Response.ja.ym,ji=olympe.H.Ba.Ob.Response.ja.br,ki=olympe.H.Ba.Ob.Request.ja.SEND,li=olympe.H.Ba.Ob.Request.ja.GET,mi=olympe.H.Ba.Ob.Request.ja.PUBLISH,ni=olympe.H.Ba.Ob.Request.ja.SUBSCRIBE;
781
+ this.C.end(!1,()=>a()))}Le(a,b,c){return new Promise((d,e)=>{const f=a.source,g=new olympe.H.Ba.Ob.Response(f,this.F,a.G,b,c);this.C.publish(f,g.ia(),void 0,h=>h?e(h):d())})}request(a,b,c){return new Promise((d,e)=>{const f=this.G;this.G++;var g=olympe.D.bb(mc(this.U));g=new olympe.H.Ba.Ob.Request(a,this.F,g,f,b,c);this.C.publish(a,g.ia(),void 0,h=>h?e(h):d(f))})}notify(a,b,c){return new Promise((d,e)=>{var f=this.G;this.G++;f=new olympe.H.Ba.Ob.Response(b,a,f,olympe.H.Ba.Ob.Response.ka.ym,c);this.C.publish(b,
782
+ f.ia(),void 0,g=>g?e(g):d())})}aa(a,b){b(new olympe.H.Ba.Ob.Response(this.F,this.F,a,olympe.H.Ba.Ob.Response.ka.uc,{reason:'Timeout'}))}};olympe.H.Ba.Ob={};olympe.H.Ba.Ob.Request=class{constructor(a,b,c,d,e,f){this.G=d;this.destination=a;this.source=b;this.L=c;this.C=e;this.F=f||null}bd(){return this.L}ia(){return{dest:this.destination,src:this.source,seq:this.G,auth:this.L,type:this.C,content:this.F}}toString(){return JSON.stringify(this)}};olympe.H.Ba.Ob.Request.ka={SEND:0,GET:1,PUBLISH:2,SUBSCRIBE:3};olympe.H.Ba.Ob.Response=class{constructor(a,b,c,d,e){this.G=c;this.destination=a;this.source=b;this.F=d;this.C=e||null}ia(){return{dest:this.destination,src:this.source,seq:this.G,type:this.F,content:this.C}}toString(){return JSON.stringify(this)}};olympe.H.Ba.Ob.Response.ka={ym:0,Ln:1,cr:2,uc:3};olympe.H.Ba.nb={};const gi=olympe.H.Ba.Ob.Response.ka.Ln,hi=olympe.H.Ba.Ob.Response.ka.uc,ii=olympe.H.Ba.Ob.Response.ka.ym,ji=olympe.H.Ba.Ob.Response.ka.cr,ki=olympe.H.Ba.Ob.Request.ka.SEND,li=olympe.H.Ba.Ob.Request.ka.GET,mi=olympe.H.Ba.Ob.Request.ka.PUBLISH,ni=olympe.H.Ba.Ob.Request.ka.SUBSCRIBE;
782
783
  olympe.H.Ba.nb.zb=class{constructor(a,b){this.C=olympe.H.Ba.Tc();this.F=a;this.G=new olympe.D.Xb(`Service ${a}`,'function'===typeof b.xc?b.xc():b);this.N=olympe.ra.Xa(`Service ${this.F}`)}listen(){return new rxjs.Observable(a=>{const b=()=>{a.complete();ei(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(()=>{ci(this.C,this.F,c=>a.next(new olympe.H.Ba.nb.ga(c,this.C)))}).catch(c=>this.N.error('Failed to connect to the bus: '+
783
784
  c));return b})}stop(){this.G.destroy()}static publish(a,b){const c=olympe.H.Ba.Tc();return c.connect().then(()=>c.request(a,mi,b)).then(()=>Promise.resolve())}static send(a,b){return new Promise((c,d)=>{const e=olympe.H.Ba.Tc();e.connect().then(()=>e.request(a,ki,b)).then(f=>{di(e,f,g=>{switch(g.F){case gi:c();break;case hi: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.Ba.Tc();e.connect().then(()=>
784
785
  e.request(a,li,b)).then(f=>{di(e,f,g=>{switch(g.F){case ii:(g=g.C)?c(g):d('No payload after request to service: '+a);break;case hi: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.xc?b.xc():b;return new rxjs.Observable(e=>{const f=olympe.H.Ba.Tc();let g=null;const h=()=>{e.complete();g&&ei(f,g).catch(k=>olympe.ra.Xa('Service '+a).error('Failed to unsubscribe from a topic '+k))};d.zc(h);f.connect().then(()=>
785
786
  f.request(a,ni,c)).then(k=>{di(f,k,l=>{switch(l.F){case ji:g=l.C.topic;ci(f,g,n=>{n.C===mi?e.next(n.F):(e.error('Unsupported notification message. It should be a publish'),h())});break;case hi: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.Ba.nb.zb.observe=olympe.H.Ba.nb.zb.observe;olympe.H.Ba.nb.zb.get=olympe.H.Ba.nb.zb.get;olympe.H.Ba.nb.zb.send=olympe.H.Ba.nb.zb.send;olympe.H.Ba.nb.zb.publish=olympe.H.Ba.nb.zb.publish;
786
- olympe.H.Ba.nb.zb.prototype.stop=olympe.H.Ba.nb.zb.prototype.stop;olympe.H.Ba.nb.zb.prototype.listen=olympe.H.Ba.nb.zb.prototype.listen;const oi=olympe.H.Ba.Ob.Response.ja.Ln,pi=olympe.H.Ba.Ob.Response.ja.uc,qi=olympe.H.Ba.Ob.Response.ja.ym,ri=olympe.H.Ba.Ob.Response.ja.br,si=olympe.H.Ba.Ob.Request.ja.SEND,ti=olympe.H.Ba.Ob.Request.ja.GET,ui=olympe.H.Ba.Ob.Request.ja.SUBSCRIBE;
787
- olympe.H.Ba.nb.ga=class{constructor(a,b){this.request=a;this.C=b;this.user=null}Bj(){return null!==this.user?Promise.resolve(this.user):fi(this.C,this.request).then(a=>this.user=a)}source(){return this.request.source}body(){return this.request.F}Lk(){return this.request.C===si?this.C.Le(this.request,oi,void 0):Promise.reject('Should only call `ack` on SEND requests')}Le(a){return this.request.C===ti?this.C.Le(this.request,qi,a):Promise.reject('Should only call `reply` on GET requests')}ds(a){return this.request.C===
788
- ui?this.C.Le(this.request,ri,{topic:a}):Promise.reject('Should only call `notifyOn` on SUBSCRIBE requests')}xg(a){return this.C.Le(this.request,pi,{reason:a.message})}};olympe.H.Ba.nb.ga.prototype.fail=olympe.H.Ba.nb.ga.prototype.xg;olympe.H.Ba.nb.ga.prototype.notifyOn=olympe.H.Ba.nb.ga.prototype.ds;olympe.H.Ba.nb.ga.prototype.reply=olympe.H.Ba.nb.ga.prototype.Le;olympe.H.Ba.nb.ga.prototype.ack=olympe.H.Ba.nb.ga.prototype.Lk;olympe.H.Ba.nb.ga.prototype.body=olympe.H.Ba.nb.ga.prototype.body;
787
+ olympe.H.Ba.nb.zb.prototype.stop=olympe.H.Ba.nb.zb.prototype.stop;olympe.H.Ba.nb.zb.prototype.listen=olympe.H.Ba.nb.zb.prototype.listen;const oi=olympe.H.Ba.Ob.Response.ka.Ln,pi=olympe.H.Ba.Ob.Response.ka.uc,qi=olympe.H.Ba.Ob.Response.ka.ym,ri=olympe.H.Ba.Ob.Response.ka.cr,si=olympe.H.Ba.Ob.Request.ka.SEND,ti=olympe.H.Ba.Ob.Request.ka.GET,ui=olympe.H.Ba.Ob.Request.ka.SUBSCRIBE;
788
+ olympe.H.Ba.nb.ga=class{constructor(a,b){this.request=a;this.C=b;this.user=null}Bj(){return null!==this.user?Promise.resolve(this.user):fi(this.C,this.request).then(a=>this.user=a)}source(){return this.request.source}body(){return this.request.F}Lk(){return this.request.C===si?this.C.Le(this.request,oi,void 0):Promise.reject('Should only call `ack` on SEND requests')}Le(a){return this.request.C===ti?this.C.Le(this.request,qi,a):Promise.reject('Should only call `reply` on GET requests')}es(a){return this.request.C===
789
+ ui?this.C.Le(this.request,ri,{topic:a}):Promise.reject('Should only call `notifyOn` on SUBSCRIBE requests')}xg(a){return this.C.Le(this.request,pi,{reason:a.message})}};olympe.H.Ba.nb.ga.prototype.fail=olympe.H.Ba.nb.ga.prototype.xg;olympe.H.Ba.nb.ga.prototype.notifyOn=olympe.H.Ba.nb.ga.prototype.es;olympe.H.Ba.nb.ga.prototype.reply=olympe.H.Ba.nb.ga.prototype.Le;olympe.H.Ba.nb.ga.prototype.ack=olympe.H.Ba.nb.ga.prototype.Lk;olympe.H.Ba.nb.ga.prototype.body=olympe.H.Ba.nb.ga.prototype.body;
789
790
  olympe.H.Ba.nb.ga.prototype.source=olympe.H.Ba.nb.ga.prototype.source;olympe.H.Ba.nb.ga.prototype.userTag=olympe.H.Ba.nb.ga.prototype.Bj;olympe.H.pa={};function vi(a,b,c,d){c.c=b;a.C.Y(olympe.H.Yc.qf,c,d)}
790
- olympe.H.pa.Ua=class{constructor(a,b,c,d,e,f,g,h,k){this.N=a;this.C=b;this.F=h;this.Ya=c;this.G=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.tk.C.GET))}),l.close())}U(a){this.C.Ue(a)}L(a){this.C.Rf(a)}Sa(a){this.C.yd(olympe.H.Yc.qf,'logoutHandler');this.C.Da(olympe.H.Yc.qf,b=>{const c=b.c;c===olympe.H.pa.Ua.C.$t?(this.C.Ib(),a(olympe.auth.sa.F.Cj,b)):c===olympe.H.pa.Ua.C.Lu&&a(olympe.auth.sa.F.op,
791
- b)},'logoutHandler')}Y(a,b){vi(this,olympe.H.pa.Ua.C.qf,{token:a.Mf()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.pa.Ua.C.uc:b(Error('Invalid token'));break;case olympe.H.pa.Ua.C.Ri: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.C=e):'openid'===k&&(c=new olympe.auth.hm(d,f,g,h))}b(null,c);break;default:b(Error('Unknown response from server'))}})}oa(a,b){vi(this,olympe.H.pa.Ua.C.pt,
792
- {I:a.Sd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.pa.Ua.C.uc:b(Error(`Username '${a.Sd()}' invalid, or password does not match`));break;case olympe.H.pa.Ua.C.Tu:c=d.payload;b(null,c.S,c.B);break;default:b(Error('Unknown response from server'))}})}Da(a,b){vi(this,olympe.H.pa.Ua.C.us,{A:a.get('a'),M:a.get('m1'),I:a.Sd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.pa.Ua.C.uc:this.N.debug('Login failed, invalid username or password');b(Error('Invalid username or password'));
793
- break;case olympe.H.pa.Ua.C.Ri:c=d.payload;this.N.debug('Login successful, creating token');d=c.payload?JSON.parse(c.payload):void 0;b(null,new olympe.auth.vf(c.userName,c.userTag,c.rndCook,d));break;default:b(Error(`Unknown response from server (type ${d.c})`))}})}ka(a){vi(this,olympe.H.pa.Ua.C.Oe,{},(b,c)=>{null!==b?a(b):c.url&&c.request?a(null,c.url,c.request.replace(/\s/g,''),c.id):a(Error('Missing parameters from server response'))})}aa(a){const b=olympe.D.bb(olympe.auth.Tc().C.Fb())||null;if(b instanceof
794
- olympe.auth.hm){const c=e=>{const f=Object.create(null);f.url=e;f.olympe_token=b.Mf();f.access_token=b.ak().access_token||null;this.F.redirect(`${this.G}/logout`,f)};a=this.F.C();const d=new URL(a);if(0!==d.hash.length||0!==d.search.length){const e=this.storage.C('AUTH');d.hash='';d.search='';e&&e.set('redirectTo',a,()=>{e.close();c(d.toString())})}else c(a)}else this.C.Y(olympe.H.Yc.qf,{c:olympe.H.pa.Ua.C.au},a)}hi(a){this.C.Y(olympe.H.Yc.qf,{c:olympe.H.pa.Ua.C.lg},a)}oh(a,b,c){this.C.ac(this.Ya+
795
- '/'+a,olympe.H.Yc.qf,b,!1,null,(d,e)=>{c(d,e)})}Tr(){return this.G}};olympe.H.pa.Ua.C={qf:1,au:2,uc:3,lg:5,Ri:6,pt:10,Tu:11,us:12,Oe:13,Lu:14,$t:20};olympe.H.pa.Ua.la=[olympe.auth.Vu,olympe.auth.Jb.pa.Ii,olympe.auth.Jb.pa.Ee,olympe.auth.Jb.pa.Oe];olympe.H.$={};olympe.H.$.$c=function(){};olympe.H.$.$c.prototype.ia=function(){};olympe.H.$.Ne=function(){};olympe.H.$.Ne.prototype.ia=function(){};olympe.H.$.$a=function(){};olympe.H.$.$a.prototype.ia=function(){};olympe.H.$.yf=function(){};olympe.H.$.yf.prototype.ia=function(){};olympe.H.$.gb=function(){this.X={};this.Cb={};this.V={};this.na=Object.create(null);var a=new olympe.H.$.X.Sb;this.X[O(olympe.dc.X.Sb)]=a;a=new olympe.H.$.X.Be;this.X[O(olympe.dc.X.Be)]=a;a=new olympe.H.$.X.Fc;this.X[O(olympe.dc.X.Fc)]=a;this.X[O(olympe.dc.X.Kd)]=new olympe.H.$.X.Kd;this.X[O(olympe.dc.X.vc)]=new olympe.H.$.X.vc;this.X[O(olympe.dc.X.Zd)]=new olympe.H.$.X.Zd;this.X[O(olympe.dc.X.we)]=new olympe.H.$.X.we;a=new olympe.H.$.Cb.Number;this.Cb[O(olympe.dc.Cb.Number)]=a;a=new olympe.H.$.Cb.String;
791
+ olympe.H.pa.Ua=class{constructor(a,b,c,d,e,f,g,h,k){this.N=a;this.C=b;this.F=h;this.Ya=c;this.G=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.tk.C.GET))}),l.close())}U(a){this.C.Ue(a)}L(a){this.C.Rf(a)}Sa(a){this.C.yd(olympe.H.Yc.qf,'logoutHandler');this.C.Da(olympe.H.Yc.qf,b=>{const c=b.c;c===olympe.H.pa.Ua.C.au?(this.C.Ib(),a(olympe.auth.sa.F.Cj,b)):c===olympe.H.pa.Ua.C.Mu&&a(olympe.auth.sa.F.pp,
792
+ b)},'logoutHandler')}Y(a,b){vi(this,olympe.H.pa.Ua.C.qf,{token:a.Mf()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.pa.Ua.C.uc:b(Error('Invalid token'));break;case olympe.H.pa.Ua.C.Ri: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.Jq(d,f,g,h),c.C=e):'openid'===k&&(c=new olympe.auth.hm(d,f,g,h))}b(null,c);break;default:b(Error('Unknown response from server'))}})}oa(a,b){vi(this,olympe.H.pa.Ua.C.qt,
793
+ {I:a.Sd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.pa.Ua.C.uc:b(Error(`Username '${a.Sd()}' invalid, or password does not match`));break;case olympe.H.pa.Ua.C.Uu:c=d.payload;b(null,c.S,c.B);break;default:b(Error('Unknown response from server'))}})}Da(a,b){vi(this,olympe.H.pa.Ua.C.vs,{A:a.get('a'),M:a.get('m1'),I:a.Sd()},(c,d)=>{if(null!==c)b(c);else switch(d.c){case olympe.H.pa.Ua.C.uc:this.N.debug('Login failed, invalid username or password');b(Error('Invalid username or password'));
794
+ break;case olympe.H.pa.Ua.C.Ri:c=d.payload;this.N.debug('Login successful, creating token');d=c.payload?JSON.parse(c.payload):void 0;b(null,new olympe.auth.vf(c.userName,c.userTag,c.rndCook,d));break;default:b(Error(`Unknown response from server (type ${d.c})`))}})}ja(a){vi(this,olympe.H.pa.Ua.C.Oe,{},(b,c)=>{null!==b?a(b):c.url&&c.request?a(null,c.url,c.request.replace(/\s/g,''),c.id):a(Error('Missing parameters from server response'))})}aa(a){const b=olympe.D.bb(olympe.auth.Tc().C.Fb())||null;if(b instanceof
795
+ olympe.auth.hm){const c=e=>{const f=Object.create(null);f.url=e;f.olympe_token=b.Mf();f.access_token=b.ak().access_token||null;this.F.redirect(`${this.G}/logout`,f)};a=this.F.C();const d=new URL(a);if(0!==d.hash.length||0!==d.search.length){const e=this.storage.C('AUTH');d.hash='';d.search='';e&&e.set('redirectTo',a,()=>{e.close();c(d.toString())})}else c(a)}else this.C.Y(olympe.H.Yc.qf,{c:olympe.H.pa.Ua.C.bu},a)}hi(a){this.C.Y(olympe.H.Yc.qf,{c:olympe.H.pa.Ua.C.lg},a)}oh(a,b,c){this.C.ac(this.Ya+
796
+ '/'+a,olympe.H.Yc.qf,b,!1,null,(d,e)=>{c(d,e)})}Ur(){return this.G}};olympe.H.pa.Ua.C={qf:1,bu:2,uc:3,lg:5,Ri:6,qt:10,Uu:11,vs:12,Oe:13,Mu:14,au:20};olympe.H.pa.Ua.la=[olympe.auth.Wu,olympe.auth.Jb.pa.Ii,olympe.auth.Jb.pa.Ee,olympe.auth.Jb.pa.Oe];olympe.H.$={};olympe.H.$.$c=function(){};olympe.H.$.$c.prototype.ia=function(){};olympe.H.$.Ne=function(){};olympe.H.$.Ne.prototype.ia=function(){};olympe.H.$.$a=function(){};olympe.H.$.$a.prototype.ia=function(){};olympe.H.$.yf=function(){};olympe.H.$.yf.prototype.ia=function(){};olympe.H.$.gb=function(){this.X={};this.Cb={};this.V={};this.na=Object.create(null);var a=new olympe.H.$.X.Sb;this.X[O(olympe.dc.X.Sb)]=a;a=new olympe.H.$.X.Be;this.X[O(olympe.dc.X.Be)]=a;a=new olympe.H.$.X.Fc;this.X[O(olympe.dc.X.Fc)]=a;this.X[O(olympe.dc.X.Kd)]=new olympe.H.$.X.Kd;this.X[O(olympe.dc.X.vc)]=new olympe.H.$.X.vc;this.X[O(olympe.dc.X.Zd)]=new olympe.H.$.X.Zd;this.X[O(olympe.dc.X.we)]=new olympe.H.$.X.we;a=new olympe.H.$.Cb.Number;this.Cb[O(olympe.dc.Cb.Number)]=a;a=new olympe.H.$.Cb.String;
796
797
  this.Cb[O(olympe.dc.Cb.String)]=a;a=new olympe.H.$.V.Ic;this.V[O(olympe.dc.V.Ic)]=a;this.V[O(olympe.dc.V.ye)]=new olympe.H.$.V.ye;this.V[O(olympe.dc.V.Fe)]=new olympe.H.$.V.Fe;a=new olympe.H.$.V.Wc;this.V[O(olympe.dc.V.Wc)]=a;a=new olympe.H.$.V.wd;this.V[O(olympe.dc.V.wd)]=a;this.V[O(olympe.dc.V.nd)]=new olympe.H.$.V.nd;a=new olympe.H.$.V.lf;this.V[O(olympe.dc.V.lf)]=a;a=new olympe.H.$.V.mf;this.V[O(olympe.dc.V.mf)]=a;this.na[O(olympe.dc.na.Dd)]=new olympe.H.$.na.Dd;a=new olympe.H.$.na.ke;this.na[O(olympe.dc.na.ke)]=
797
798
  a;a=new olympe.H.$.na.oe;this.na[O(olympe.dc.na.oe)]=a;a=new olympe.H.$.na.te;this.na[O(olympe.dc.na.te)]=a;a=new olympe.H.$.na.je;this.na[O(olympe.dc.na.je)]=a;this.na[O(olympe.dc.na.uf)]=new olympe.H.$.na.uf};olympe.H.$.gb.prototype.constructor=olympe.H.$.gb;function wi(a,b,c){var d=b.ma(),e=a.V[d];if(void 0===e)throw Error('No predicate registered for predicate: '+d);return e.ia(b,c,a)}
798
799
  function xi(a,b,c){var d=b.ma(),e=a.na[d];if(void 0===e)throw Error('No valueDef registered for valueDef: '+d);return e.ia(b,c,a)}
799
- function yi(a,b){return a&&a.zf?'"$'+b.add(a)+'"':a instanceof olympe.D.qa||a instanceof olympe.D.ea?String(a):a instanceof olympe.D.Wa?'"'+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.Qf().valueOf()+',"g":'+a.Kf().valueOf()+',"b":'+a.Ff().valueOf()+',"a":'+a.Ef().valueOf()+
800
+ function yi(a,b){return a&&a.zf?'"$'+b.add(a)+'"':a instanceof olympe.D.qa||a instanceof olympe.D.ea?String(a):a instanceof olympe.D.Wa?'"'+a+'"':a instanceof olympe.D.jb?(a=a.ps(),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.Qf().valueOf()+',"g":'+a.Kf().valueOf()+',"b":'+a.Ff().valueOf()+',"a":'+a.Ef().valueOf()+
800
801
  '}':a instanceof olympe.dc.Jc?'{"c":8,"t":"'+a.R()+'"}':JSON.stringify(a)};olympe.H.$.Vj=class{ia(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.Pl?Ue(a.ph):olympe.dc.Ub.NONE;b.q=lf(a).map(this.C.bind(this));return b}C(a){const b=a.Qd(),c=b.Pa()===olympe.dc.Aa.ORIGIN?olympe.H.$.X.Sb.C.Gi:olympe.H.$.X.Sb.C.Oi,d=Object.create(null);d.t=b.R();d.d=c;d.v=a.apply;d.r=b.recursive;d.q=a.kh().map(this.C.bind(this));return d}};olympe.H.$.X={};olympe.H.$.X.we=class{ia(){return'{"y":15}'}};olympe.H.$.X.we.la=[olympe.H.$.$c];olympe.H.$.X.vc=function(){};olympe.H.$.X.vc.prototype.constructor=olympe.H.$.X.vc;olympe.H.$.X.vc.prototype.ia=function(a,b,c){return'{"y":21,"p":'+wi(c,a.C,b)+'}'};olympe.H.$.X.vc.la=[olympe.H.$.$c];olympe.H.$.X.Be=function(){};olympe.H.$.X.Be.prototype.constructor=olympe.H.$.X.Be;olympe.H.$.X.Be.prototype.ia=function(a){var b=null!==a.Pa()?a.Pa()===olympe.dc.Aa.ORIGIN?olympe.H.$.X.Sb.C.Gi:olympe.H.$.X.Sb.C.Oi:olympe.H.$.X.Sb.C.Xn;return'{"y":12,"t":'+JSON.stringify($g(a))+',"d":'+b+'}'};olympe.H.$.X.Be.la=[olympe.H.$.$c];olympe.H.$.X.Fc=function(){};olympe.H.$.X.Fc.prototype.constructor=olympe.H.$.X.Fc;olympe.H.$.X.Fc.prototype.ia=function(a){const b=null!==a.Pa()?a.Pa()===olympe.dc.Aa.ORIGIN?olympe.H.$.X.Sb.C.Gi:olympe.H.$.X.Sb.C.Oi:olympe.H.$.X.Sb.C.Xn;return'{"y":11,"t":"'+a.R()+'","d":'+b+',"s":'+a.F+',"e":'+a.C+'}'};olympe.H.$.X.Fc.la=[olympe.H.$.$c];olympe.H.$.X.Sb=function(){};olympe.H.$.X.Sb.C={Xn:0,Gi:1,Oi:2};olympe.H.$.X.Sb.prototype.constructor=olympe.H.$.X.Sb;olympe.H.$.X.Sb.prototype.ia=function(a){const b=a.Pa()===olympe.dc.Aa.ORIGIN?olympe.H.$.X.Sb.C.Gi:olympe.H.$.X.Sb.C.Oi;return'{"y":10,"t":"'+a.R()+'","d":'+b+'}'};olympe.H.$.X.Sb.la=[olympe.H.$.$c];olympe.H.$.X.Kd=function(){};olympe.H.$.X.Kd.prototype.constructor=olympe.H.$.X.Kd;olympe.H.$.X.Kd.prototype.ia=function(a,b,c){var d=a.Md;const e=d.ma();var f=c.Cb[e];if(void 0===f)throw Error('No comparator registered for comparator: '+e);return'{"y":20,"o":'+f.ia(d,b,c)+(a.C?'':',"a":false')+'}'};olympe.H.$.X.Kd.la=[olympe.H.$.$c];olympe.H.$.X.Zd=function(){};olympe.H.$.X.Zd.prototype.constructor=olympe.H.$.X.Zd;olympe.H.$.X.Zd.prototype.ia=function(a,b){var c=a.start;c=c&&c.zf?'"$'+b.add(c)+'"':JSON.stringify(c);a=(a=a.C)&&a.zf?'"$'+b.add(a)+'"':JSON.stringify(a);return'{"y":22,"s":'+c+',"n":'+a+'}'};olympe.H.$.X.Zd.la=[olympe.H.$.$c];olympe.H.$.Cb={};olympe.H.$.Cb.Number=class{constructor(){}ia(a,b,c){return`{"y":11,"v":${xi(c,a.C,b)}}`}};olympe.H.$.Cb.Number.la=[olympe.H.$.Ne];olympe.H.$.Cb.String=class{constructor(){}ia(a,b,c){return`{"y":10,"v":${xi(c,a.C,b)}}`}};olympe.H.$.Cb.String.la=[olympe.H.$.Ne];olympe.H.$.V={};olympe.H.$.V.Wc=function(){};olympe.H.$.V.Wc.prototype.constructor=olympe.H.$.V.Wc;olympe.H.$.V.Wc.prototype.ia=function(a,b,c){const d=xi(c,a.source,b);c=xi(c,a.getValue(),b);a=yi(a.G,b);return'{"y":20,"s":'+d+',"v":'+c+',"a":'+a+'}'};olympe.H.$.V.Wc.la=[olympe.H.$.$a];olympe.H.$.V.Ic=function(){};olympe.H.$.V.Ic.prototype.constructor=olympe.H.$.V.Ic;olympe.H.$.V.Ic.prototype.ia=function(a,b,c){const d=xi(c,a.G,b);a=xi(c,a.L,b);return'{"y":10,"l":'+d+',"r":'+a+'}'};olympe.H.$.V.Ic.la=[olympe.H.$.$a];olympe.H.$.V.ye=function(){};olympe.H.$.V.ye.prototype.constructor=olympe.H.$.V.ye;olympe.H.$.V.ye.prototype.ia=function(a,b,c){const d=xi(c,a.G,b);a=xi(c,a.L,b);return'{"y":11,"l":'+d+',"r":'+a+'}'};olympe.H.$.V.ye.la=[olympe.H.$.$a];olympe.H.$.V.lf=class{ia(a){const b=Ug(a).map(d=>'"'+d+'"'),c=Vg(a).map(d=>d===olympe.dc.Aa.DESTINATION?'2':'1');a=a.G;return'{"y":81,"r":['+b.toString()+'],"d":['+c.toString()+']'+(0!==a.length?',"t":"'+a.toString()+'"':'')+'}'}};olympe.H.$.V.lf.la=[olympe.H.$.$a];olympe.H.$.V.mf=class{ia(a){return'{"y":80,"m":['+Array.from(a.G).map(b=>'"'+b+'"').toString()+']}'}};olympe.H.$.V.mf.la=[olympe.H.$.$a];olympe.H.$.V.nd=class{ia(a,b,c){return'{"y":30,"p":'+wi(c,a.G,b)+'}'}};olympe.H.$.V.nd.la=[olympe.H.$.$a];olympe.H.$.V.wd=class{ia(a,b,c){c=xi(c,a.source,b);const d=a.L;a=yi(a.G,b);return'{"y":23,"s":'+c+',"r":"'+d+'","a":'+a+'}'}};olympe.H.$.V.wd.la=[olympe.H.$.$a];olympe.H.$.V.Fe=function(){};olympe.H.$.V.Fe.prototype.constructor=olympe.H.$.V.Fe;olympe.H.$.V.Fe.prototype.ia=function(a,b,c){var d=xi(c,a.G,b);a=xi(c,a.L,b);return'{"y":12,"l":'+d+',"r":'+a+'}'};olympe.H.$.V.Fe.la=[olympe.H.$.$a];olympe.H.$.na={};olympe.H.$.na.Oc=function(){};olympe.H.$.na.Oc.prototype.constructor=olympe.H.$.na.Oc;olympe.H.$.na.Oc.prototype.C=function(){};
801
- olympe.H.$.na.Oc.prototype.ia=function(a,b,c){var d=yi(a.Ze,b),e=a.Od();e=e?',"b":'+yi(e,b):'';if(a=a.Cg()){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.ma(),r=h.X[q];if(void 0===r)throw Error('No serializer registered for transformer: '+q);h=r.ia(k,l,h);f+=g+h}b=',"q":'+(f+']')}else b='';return'{"y":'+this.C()+',"t":'+d+e+b+'}'};olympe.H.$.na.Oc.la=[olympe.H.$.yf];olympe.H.$.na.te=function(){olympe.H.$.na.Oc.call(this)};olympe.H.$.na.te.prototype=Object.create(olympe.H.$.na.Oc.prototype);olympe.H.$.na.te.prototype.constructor=olympe.H.$.na.te;olympe.H.$.na.te.prototype.C=function(){return 13};olympe.H.$.na.Dd=class{ia(a,b){return'{"y":10,"v":'+yi(a.value,b)+'}'}};olympe.H.$.na.Dd.la=[olympe.H.$.yf];olympe.H.$.na.je=function(){olympe.H.$.na.Oc.call(this)};olympe.H.$.na.je.prototype=Object.create(olympe.H.$.na.Oc.prototype);olympe.H.$.na.je.prototype.constructor=olympe.H.$.na.je;olympe.H.$.na.je.prototype.C=function(){return 14};olympe.H.$.na.ke=function(){olympe.H.$.na.Oc.call(this)};olympe.H.$.na.ke.prototype=Object.create(olympe.H.$.na.Oc.prototype);olympe.H.$.na.ke.prototype.constructor=olympe.H.$.na.ke;olympe.H.$.na.ke.prototype.C=function(){return 11};olympe.H.$.na.oe=function(){olympe.H.$.na.Oc.call(this)};olympe.H.$.na.oe.prototype=Object.create(olympe.H.$.na.Oc.prototype);olympe.H.$.na.oe.prototype.constructor=olympe.H.$.na.oe;olympe.H.$.na.oe.prototype.C=function(){return 12};olympe.H.$.na.uf=class{ia(){return'{"y":19}'}};olympe.H.$.na.uf.la=[olympe.H.$.yf];olympe.H.rd={};function zi(a,b){a.N.info('Initializing SERVER layer');if(a.N.G()){const c=['Server layer parameters:'];b.forEach((d,e)=>{c.push(e+'="'+d+'"')});a.N.debug(c.join('\n\t'))}a.Da(olympe.H.Yc.uc,c=>{switch(c.c){case olympe.H.ja.hv:a.N.error('Unknown message sent to the server:',olympe.H.sa.F[c.s]);break;case olympe.H.ja.bt:a.N.error('Fatal error, the last message is probably too big according to the websocket config.'),a.F.forEach((d,e)=>{null!==d.Dn&&Ai(a,e,c.i)})}});b.get('autoConnect')&&(a.N.debug('Connecting automatically'),
802
- a.connect());olympe.D.kn(a.U.Fb(),()=>{a.Xe.forEach(c=>c());Ib(a.gi.bind(a),a.Nx);Ib(a.be.bind(a),a.Ge)},()=>{a.aa=null;a.Df.forEach(c=>c(a.G[2]));a.be()});a.N.log('DONE initializing SERVER layer (waiting for NET layer connection to be opened)')}
802
+ olympe.H.$.na.Oc.prototype.ia=function(a,b,c){var d=yi(a.Ze,b),e=a.Od();e=e?',"b":'+yi(e,b):'';if(a=a.Cg()){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.ma(),r=h.X[q];if(void 0===r)throw Error('No serializer registered for transformer: '+q);h=r.ia(k,l,h);f+=g+h}b=',"q":'+(f+']')}else b='';return'{"y":'+this.C()+',"t":'+d+e+b+'}'};olympe.H.$.na.Oc.la=[olympe.H.$.yf];olympe.H.$.na.te=function(){olympe.H.$.na.Oc.call(this)};olympe.H.$.na.te.prototype=Object.create(olympe.H.$.na.Oc.prototype);olympe.H.$.na.te.prototype.constructor=olympe.H.$.na.te;olympe.H.$.na.te.prototype.C=function(){return 13};olympe.H.$.na.Dd=class{ia(a,b){return'{"y":10,"v":'+yi(a.value,b)+'}'}};olympe.H.$.na.Dd.la=[olympe.H.$.yf];olympe.H.$.na.je=function(){olympe.H.$.na.Oc.call(this)};olympe.H.$.na.je.prototype=Object.create(olympe.H.$.na.Oc.prototype);olympe.H.$.na.je.prototype.constructor=olympe.H.$.na.je;olympe.H.$.na.je.prototype.C=function(){return 14};olympe.H.$.na.ke=function(){olympe.H.$.na.Oc.call(this)};olympe.H.$.na.ke.prototype=Object.create(olympe.H.$.na.Oc.prototype);olympe.H.$.na.ke.prototype.constructor=olympe.H.$.na.ke;olympe.H.$.na.ke.prototype.C=function(){return 11};olympe.H.$.na.oe=function(){olympe.H.$.na.Oc.call(this)};olympe.H.$.na.oe.prototype=Object.create(olympe.H.$.na.Oc.prototype);olympe.H.$.na.oe.prototype.constructor=olympe.H.$.na.oe;olympe.H.$.na.oe.prototype.C=function(){return 12};olympe.H.$.na.uf=class{ia(){return'{"y":19}'}};olympe.H.$.na.uf.la=[olympe.H.$.yf];olympe.H.rd={};function zi(a,b){a.N.info('Initializing SERVER layer');if(a.N.G()){const c=['Server layer parameters:'];b.forEach((d,e)=>{c.push(e+'="'+d+'"')});a.N.debug(c.join('\n\t'))}a.Da(olympe.H.Yc.uc,c=>{switch(c.c){case olympe.H.ka.jv:a.N.error('Unknown message sent to the server:',olympe.H.sa.F[c.s]);break;case olympe.H.ka.ct:a.N.error('Fatal error, the last message is probably too big according to the websocket config.'),a.F.forEach((d,e)=>{null!==d.Dn&&Ai(a,e,c.i)})}});b.get('autoConnect')&&(a.N.debug('Connecting automatically'),
803
+ a.connect());olympe.D.kn(a.U.Fb(),()=>{a.Xe.forEach(c=>c());Ib(a.gi.bind(a),a.Ox);Ib(a.be.bind(a),a.Ge)},()=>{a.aa=null;a.Df.forEach(c=>c(a.G[2]));a.be()});a.N.log('DONE initializing SERVER layer (waiting for NET layer connection to be opened)')}
803
804
  function Bi(a,b){if(a.C!==b)switch(a.N.debug('State change '+a.C+' --\x3e '+b),a.C=b,b){case olympe.H.sa.C.CONNECTING:break;case olympe.H.sa.C.ti:a.U.update(olympe.D.qa.F);break;case olympe.H.sa.C.Yg:a.G[0]=0;a.G[1]=0;a.connect();break;case olympe.H.sa.C.uc:a.N.error('Connection to server',a.oa.C(),'aborted due to error');a.U.update(olympe.D.qa.C);break;case olympe.H.sa.C.gg:a.U.update(olympe.D.qa.C);a.wb&&(a.N.info('Disconnected, will try to auto reconnect in',a.Lb,'ms'),Hb(()=>{a.connect()},a.Lb));
804
805
  break;default:throw Error('State machine error in server manager. Should not get in state '+b);}}
805
- function Ci(a,b){const c=olympe.H.sa.L.Ri,d=olympe.H.sa.L.ju;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.sa.F[g]?`Status code = ${g} [${olympe.H.sa.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}`);
806
+ function Ci(a,b){const c=olympe.H.sa.L.Ri,d=olympe.H.sa.L.ku;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.sa.F[g]?`Status code = ${g} [${olympe.H.sa.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}`);
806
807
  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 Di(a,b,c){var d=c.message;a.N.G()&&a.N.debug('>',Ei(d));(d=a.L.send(JSON.stringify(d)))?null===c.Vh?a.F.delete(b):c.Dn=Date.now():Bi(a,olympe.H.sa.C.Yg);return d}
807
- function Ei(a){var b=JSON.parse(JSON.stringify(a));a=olympe.W.Rr;const c=b.messageFamily,d=a(olympe.H.Yc,c),e=b.payload;b='';switch(c){case olympe.H.Yc.ui:b=a(olympe.dc.ga.ja,e.c);break;case olympe.H.Yc.uc:b=a(olympe.H.ja,e.c);break;case olympe.H.Yc.qf:b=a(olympe.H.pa.Ua.C,e.c);break;case olympe.H.Yc.Di:2===e.c&&(b=a(olympe.H.sa.G,e.status))}a=`${d} message`;b&&0<b.length&&(a+=` with payload "${b}"`);return a}
808
+ function Ei(a){var b=JSON.parse(JSON.stringify(a));a=olympe.W.Sr;const c=b.messageFamily,d=a(olympe.H.Yc,c),e=b.payload;b='';switch(c){case olympe.H.Yc.ui:b=a(olympe.dc.ga.ka,e.c);break;case olympe.H.Yc.uc:b=a(olympe.H.ka,e.c);break;case olympe.H.Yc.qf:b=a(olympe.H.pa.Ua.C,e.c);break;case olympe.H.Yc.Di:2===e.c&&(b=a(olympe.H.sa.G,e.status))}a=`${d} message`;b&&0<b.length&&(a+=` with payload "${b}"`);return a}
808
809
  function Ai(a,b,c){if(a.F.has(b)){const {Vh:d}=a.F.get(b);a.F.delete(b);d&&d({s:23,info:c})}}function Fi(a,b){a.N.error(b);Bi(a,olympe.H.sa.C.uc)}function Gi(a,b,c){a.N.info('Connected to',a.oa.C(),' | ',b?'server version:'+b:'',null!==c?`activity timeout: ${c}s`:'');b=Array.from(a.F).sort(([d],[e])=>d-e);for(const [d,e]of b)if(!Di(a,d,e))return;Bi(a,olympe.H.sa.C.ti)}
809
- olympe.H.rd.sa=class{constructor(a,b,c,d){this.N=a;this.ad=b;this.oa=c;this.L=null;this.config=d;this.Lb=this.config.get('reconnectionDelay');this.Nx=this.config.get('pingInterval');this.Vx=this.Lb/2;this.wb=d.get('autoConnect');this.iy=d.get('retryHttpOverload');this.Ge=d.get('messageTimeout');this.ka=Ja(d.get('clientVersion'));this.Ya=Ja(d.get('serverVersion'));this.C=olympe.H.sa.C.INIT;this.wc=d.get('getContextMode');this.sh=1;this.aa=null;this.G=[0,0,0];this.Sa=new Map;this.U=olympe.D.Uc(olympe.D.qa,
810
- 'Server is online');this.Xe=new Map;this.Df=new Map;this.F=new Map;this.vn=new Map;zi(this,d)}ab(){return this.C===olympe.H.sa.C.ti}connect(){const a=olympe.H.sa.C.CONNECTING,b=olympe.H.sa.C.ti,c=olympe.H.sa.C.gg,d=olympe.H.sa.C.Yg,e=olympe.H.sa.C.uc;null!==this.L&&(this.L.U(null),this.L.close());this.wb=!0;this.N.log(`Asking NET layer for a connection to ${Kb(this.oa)}:${this.oa.port}...`);this.L=this.ad.aa(this.oa);this.L.ka(this.Ib.bind(this));this.L.aa(this.Lc.bind(this));this.L.U(()=>{this.L=
811
- null;this.C===b?Bi(this,d):this.C!==e&&Bi(this,c)});this.C!==d&&Bi(this,a)}disconnect(){const a=olympe.H.sa.C.CONNECTING;if(this.C===olympe.H.sa.C.ti||this.C===a)this.wb=!1,Bi(this,olympe.H.sa.C.gg)}Ue(a){const b=olympe.W.fc();this.Xe.set(b,a);olympe.D.bb(this.U)===olympe.D.qa.F&&a()}Rf(a){var b;void 0===b&&(b=olympe.W.fc());this.Df.set(b,a);olympe.D.bb(this.U)===olympe.D.qa.C&&a(this.G[2])}Ib(){this.N.debug('Websocket connected, sending handshake. Client version:',Ka(this.ka),'subscribeEverything:',
812
- this.wc?'NO':'YES');this.Y(olympe.H.Yc.Di,{c:olympe.H.ja.Di,cv:Ka(this.ka),m:this.wc?0:1,s:this.aa},this.al.bind(this))}Y(a,b,c){const d=this.sh;this.sh++;b={message:{seqId:d,messageFamily:a,payload:b},Vh:c?Ci(this,c):null,Dn:null};this.F.set(d,b);c=[olympe.H.sa.C.CONNECTING,olympe.H.sa.C.Yg];(this.ab()||a===olympe.H.Yc.Di&&c.includes(this.C))&&Di(this,d,b)}ac(a,b,c,d,e,f){c&&''!==c||this.N.warn('Trying to send an http request with an invalid authorizationToken');const g=Nb(a);if(e){g.method=olympe.net.cb.$d.jm;
813
- e=d?e:{messageFamily:b,seqId:1,payload:e};const k=JSON.stringify(e);g.body=k;Ob(g,{'Content-Type':'application/json'});this.N.log('HTTP POST >',Ei(e))}else this.N.log('HTTP GET call to',a);g.F=olympe.net.cb.ResponseType.zk;Ob(g,{Authorization:c});const h=()=>{this.ad.C(g,k=>{switch(k.Rd()){case olympe.net.cb.hd.Hh:case olympe.net.cb.hd.wl:case olympe.net.cb.hd.Cj:k=k.getData();if(b!==olympe.H.Yc.ui||d){f&&f(null,k);break}k=this.Lc(k);f&&f(k);k&&this.N.error(k.message);break;case olympe.net.cb.hd.Nu:Hb(h,
814
- this.iy);break;case olympe.net.cb.hd.Cs:this.N.debug(`HTTP request canceled (${a}).`);f&&f(null);break;case olympe.net.cb.hd.fv:k=Error(`HTTP request authorization denied: ${a}`);f&&f(k);break;default:k=Error(`Server is currently not available, http status: ${k.Rd()}`),f&&f(k)}})};h()}Da(a,b,c){void 0===c&&(c=olympe.W.fc());let d=this.Sa.get(a);void 0===d&&(d=new Map,this.Sa.set(a,d));d.set(c,b)}yd(a,b){a=this.Sa.get(a);void 0!==a&&a.delete(b)}al(a,b){if(a)Fi(this,'Error in receiving handshake response: '+
815
- a.message);else{this.N.debug('Handshake response received');var c=olympe.H.sa.G;a=b.sv||'undefined';var d=b.activityTimeout?Math.max(b.activityTimeout-60,5):null;switch(b.status){case c.vt:Fi(this,`Framework version (${Ka(this.ka)}) provided to the orchestrator was not valid. See orchestrator logs for more info.`);return;case c.Zu:Fi(this,`Framework version (${Ka(this.ka)}) is not compatible with the orchestrator in use. See orchestrator logs for more info.`);return;case c.it:Fi(this,'Handshake failed. See orchestrator logs for more info.');
816
- return}if(this.Ya.qb(olympe.W.Sh.C))this.N.warn('Handshake successful but received server version',a,'is invalid. Cannot check against it');else try{var e=Ja(a);if(e.zj(this.Ya)){Fi(this,`Framework v${Ka(this.ka)} is expecting Orchestrator to be at least in v${Ka(this.Ya)}`);return}this.N.log('Handshake successful. Orchestrator version: ',e,'required:',Ka(this.Ya))}catch(f){Fi(this,f);return}e=olympe.H.sa.C.gg;if(this.C===olympe.H.sa.C.Yg&&null!==this.aa&&this.aa!==b.sessionId)this.N.warn('Trying to do a session recovering, but got another session id so retry from disconnected state'),
817
- Bi(this,e);else{if(e=b.identityProviders)for(const [f,g]of Object.entries(e))this.vn.set(f,g);this.aa=b.sessionId||null;Gi(this,a,d)}}}gi(){this.G[0]-this.G[1]>this.Vx?(this.N.debug('Ping did not get answer, try to reconnect'),Bi(this,olympe.H.sa.C.Yg)):(this.N.debug('Sending Ping'),this.G[0]=Date.now(),this.L.send('ping')||(this.N.debug('Impossible to send ping, try to reconnect'),Bi(this,olympe.H.sa.C.Yg)))}Lc(a){this.G[2]=Date.now();if(a.startsWith('pong'))return this.G[1]=this.G[2],null;try{var b=
810
+ olympe.H.rd.sa=class{constructor(a,b,c,d){this.N=a;this.ad=b;this.oa=c;this.L=null;this.config=d;this.Lb=this.config.get('reconnectionDelay');this.Ox=this.config.get('pingInterval');this.Wx=this.Lb/2;this.wb=d.get('autoConnect');this.jy=d.get('retryHttpOverload');this.Ge=d.get('messageTimeout');this.ja=Ja(d.get('clientVersion'));this.Ya=Ja(d.get('serverVersion'));this.C=olympe.H.sa.C.INIT;this.wc=d.get('getContextMode');this.sh=1;this.aa=null;this.G=[0,0,0];this.Sa=new Map;this.U=olympe.D.Uc(olympe.D.qa,
811
+ 'Server is online');this.Xe=new Map;this.Df=new Map;this.F=new Map;this.vn=new Map;zi(this,d)}ab(){return this.C===olympe.H.sa.C.ti}connect(){const a=olympe.H.sa.C.CONNECTING,b=olympe.H.sa.C.ti,c=olympe.H.sa.C.gg,d=olympe.H.sa.C.Yg,e=olympe.H.sa.C.uc;null!==this.L&&(this.L.U(null),this.L.close());this.wb=!0;this.N.log(`Asking NET layer for a connection to ${Kb(this.oa)}:${this.oa.port}...`);this.L=this.ad.aa(this.oa);this.L.ja(this.Ib.bind(this));this.L.aa(this.Lc.bind(this));this.L.U(()=>{this.L=
812
+ null;this.C===b?Bi(this,d):this.C!==e&&Bi(this,c)});this.C!==d&&Bi(this,a)}disconnect(){const a=olympe.H.sa.C.CONNECTING;if(this.C===olympe.H.sa.C.ti||this.C===a)this.wb=!1,Bi(this,olympe.H.sa.C.gg)}Ue(a){const b=olympe.W.fc();this.Xe.set(b,a);olympe.D.bb(this.U)===olympe.D.qa.F&&a()}Rf(a){var b;void 0===b&&(b=olympe.W.fc());this.Df.set(b,a);olympe.D.bb(this.U)===olympe.D.qa.C&&a(this.G[2])}Ib(){this.N.debug('Websocket connected, sending handshake. Client version:',Ka(this.ja),'subscribeEverything:',
813
+ this.wc?'NO':'YES');this.Y(olympe.H.Yc.Di,{c:olympe.H.ka.Di,cv:Ka(this.ja),m:this.wc?0:1,s:this.aa},this.al.bind(this))}Y(a,b,c){const d=this.sh;this.sh++;b={message:{seqId:d,messageFamily:a,payload:b},Vh:c?Ci(this,c):null,Dn:null};this.F.set(d,b);c=[olympe.H.sa.C.CONNECTING,olympe.H.sa.C.Yg];(this.ab()||a===olympe.H.Yc.Di&&c.includes(this.C))&&Di(this,d,b)}ac(a,b,c,d,e,f){c&&''!==c||this.N.warn('Trying to send an http request with an invalid authorizationToken');const g=Nb(a);if(e){g.method=olympe.net.cb.$d.jm;
814
+ e=d?e:{messageFamily:b,seqId:1,payload:e};const k=JSON.stringify(e);g.body=k;Ob(g,{'Content-Type':'application/json'});this.N.log('HTTP POST >',Ei(e))}else this.N.log('HTTP GET call to',a);g.F=olympe.net.cb.ResponseType.zk;Ob(g,{Authorization:c});const h=()=>{this.ad.C(g,k=>{switch(k.Rd()){case olympe.net.cb.hd.Hh:case olympe.net.cb.hd.wl:case olympe.net.cb.hd.Cj:k=k.getData();if(b!==olympe.H.Yc.ui||d){f&&f(null,k);break}k=this.Lc(k);f&&f(k);k&&this.N.error(k.message);break;case olympe.net.cb.hd.Ou:Hb(h,
815
+ this.jy);break;case olympe.net.cb.hd.Ds:this.N.debug(`HTTP request canceled (${a}).`);f&&f(null);break;case olympe.net.cb.hd.gv:k=Error(`HTTP request authorization denied: ${a}`);f&&f(k);break;default:k=Error(`Server is currently not available, http status: ${k.Rd()}`),f&&f(k)}})};h()}Da(a,b,c){void 0===c&&(c=olympe.W.fc());let d=this.Sa.get(a);void 0===d&&(d=new Map,this.Sa.set(a,d));d.set(c,b)}yd(a,b){a=this.Sa.get(a);void 0!==a&&a.delete(b)}al(a,b){if(a)Fi(this,'Error in receiving handshake response: '+
816
+ a.message);else{this.N.debug('Handshake response received');var c=olympe.H.sa.G;a=b.sv||'undefined';var d=b.activityTimeout?Math.max(b.activityTimeout-60,5):null;switch(b.status){case c.wt:Fi(this,`Framework version (${Ka(this.ja)}) provided to the orchestrator was not valid. See orchestrator logs for more info.`);return;case c.$u:Fi(this,`Framework version (${Ka(this.ja)}) is not compatible with the orchestrator in use. See orchestrator logs for more info.`);return;case c.jt:Fi(this,'Handshake failed. See orchestrator logs for more info.');
817
+ return}if(this.Ya.qb(olympe.W.Sh.C))this.N.warn('Handshake successful but received server version',a,'is invalid. Cannot check against it');else try{var e=Ja(a);if(e.zj(this.Ya)){Fi(this,`Framework v${Ka(this.ja)} is expecting Orchestrator to be at least in v${Ka(this.Ya)}`);return}this.N.log('Handshake successful. Orchestrator version: ',e,'required:',Ka(this.Ya))}catch(f){Fi(this,f);return}e=olympe.H.sa.C.gg;if(this.C===olympe.H.sa.C.Yg&&null!==this.aa&&this.aa!==b.sessionId)this.N.warn('Trying to do a session recovering, but got another session id so retry from disconnected state'),
818
+ Bi(this,e);else{if(e=b.identityProviders)for(const [f,g]of Object.entries(e))this.vn.set(f,g);this.aa=b.sessionId||null;Gi(this,a,d)}}}gi(){this.G[0]-this.G[1]>this.Wx?(this.N.debug('Ping did not get answer, try to reconnect'),Bi(this,olympe.H.sa.C.Yg)):(this.N.debug('Sending Ping'),this.G[0]=Date.now(),this.L.send('ping')||(this.N.debug('Impossible to send ping, try to reconnect'),Bi(this,olympe.H.sa.C.Yg)))}Lc(a){this.G[2]=Date.now();if(a.startsWith('pong'))return this.G[1]=this.G[2],null;try{var b=
818
819
  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()&&this.N.debug('<',Ei(b));a=b.seqId;const c=b.messageFamily;b=b.payload;if(this.F.has(a)){const {Vh:d}=this.F.get(a);this.F.delete(a);d&&d(b)}a=this.Sa.get(c);if(void 0!==a)for(const d of a.values())d(b);return null}be(){const a=Date.now();for(const [b,{Dn:c}]of this.F)null!==c&&a-c>this.Ge&&(this.N.warn(`No response was received from the server for the seqId = ${b}`),
819
- Ai(this,b,{error:{reason:'Message timeout: never receive acknowledge'}}))}};olympe.H.sa.L={Ri:0,ju:18,hA:23};
820
+ Ai(this,b,{error:{reason:'Message timeout: never receive acknowledge'}}))}};olympe.H.sa.L={Ri:0,ku:18,iA:23};
820
821
  olympe.H.sa.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',
821
- 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.sa.la=[olympe.H.sa];olympe.H.P={xa:'server.Manager',$n:'server.bus.Manager',Ea:'server.Logger',Jd:'server.Source',Rg:'server.FileSource',tp:'server.ImportFileSvcHttpRequest',Wn:'server.BackupSvcHttpRequest',fq:'server.OpenIDSvcHttpRequest',Wo:'server.GetContextSvcPathRequest',pp:'server.ImplicitGDSvcPathRequest',Io:'server.ExplicitGDSvcPathRequest',dr:'server.TransactionOverHttpPathRequest',nr:'server.UserTokenRequest',lr:'server.UserTagRequest',jr:'server.UserRolesRequest',Fq:'server.RoleMembersRequest',Bh:'server.IOUrlsProvider',
822
- Oo:'server.fileSvcUrl',lq:'communication.peerFileSvcUrl'};olympe.H.sd={mi:'server.connectors.Auth',NA:'server.connectors.Signaling'};
823
- olympe.H.Config={ud:'server.host',Id:'server.port',xd:'server.ssl',Nn:'server.autoConnect',yq:'server.reconnectionDelay',pq:'server.pingInterval',Am:'server.messageTimeout',Dq:'server.retryHttpOnOverload',io:'server.clientVersion',Lq:'server.serverVersion',Zn:'bus.host',ao:'bus.path',bo:'bus.port',co:'bus.vhost',lg:'bus.keepalive',Iu:'bus.reschedulePings',Gs:'bus.clientId',Es:'bus.clean',Eu:'bus.reconnectPeriod',Is:'bus.connectTimeout',ar:'bus.tokenTimeout',hr:'bus.username',jq:'bus.password',Au:'bus.queueQoSZero'};
824
- olympe.H.ob={Cd:'server.basePath',tr:'server.wsPath',Mo:'server.filePath',sp:'server.importFilePath',Vn:'server.backupSvcPath',eq:'server.openIDSvcPath',Vo:'server.GetContextSvcPath',rp:'server.ImplicitGraphdefSvcPath',Jo:'server.ExplicitGraphdefSvcPath',cr:'server.TransactionOverHttpPath',mr:'server.userTokenSvcPath',kr:'server.userTagPath',ir:'server.userRolesPath',Eq:'server.roleMembersPath',im:'communication.peerFileSvcPath'};
825
- olympe.T.config(function(a){var b='object'===typeof window&&window.location&&window.location.hostname||'localhost';const c='localhost'===b;D(a,olympe.H.Config.ud,b);D(a,olympe.H.Config.Id,c?8080:443);D(a,olympe.H.Config.xd,'localhost'!==b);D(a,olympe.H.ob.Cd,'OlympeServer');D(a,olympe.H.ob.tr,'websocket');D(a,olympe.H.ob.Mo,'rest/filesvc');D(a,olympe.H.ob.sp,'rest/importsvc');D(a,olympe.H.ob.Vn,'rest/backupsvc');D(a,olympe.H.ob.eq,'rest/openid');D(a,olympe.H.ob.Vo,'rest/initialData');D(a,olympe.H.ob.rp,
826
- 'rest/querysvc/graphDefImplicit');D(a,olympe.H.ob.Jo,'rest/querysvc/graphDefExplicit');D(a,olympe.H.ob.cr,'rest/transaction');D(a,olympe.H.ob.mr,'rest/token');D(a,olympe.H.ob.kr,'rest/authorization/getUserTag');D(a,olympe.H.ob.ir,'rest/authorization/getUserRoles');D(a,olympe.H.ob.Eq,'rest/authorization/roleMembers');D(a,olympe.H.Config.Nn,!0);D(a,olympe.H.Config.yq,5E3);D(a,olympe.H.Config.pq,5E3);D(a,olympe.H.Config.Am,15E3);D(a,olympe.H.Config.Dq,5E3);D(a,olympe.H.Config.Lq,'6.3.1');D(a,olympe.H.Config.Zn,
827
- '');D(a,olympe.H.Config.ao,c?'':'/mqtt');D(a,olympe.H.Config.bo,c?15675:443);D(a,olympe.H.Config.co,c?'/':'');D(a,olympe.H.Config.hr,'guest');D(a,olympe.H.Config.jq,'guest');D(a,olympe.H.Config.lg,30);D(a,olympe.H.Config.ar,3E5);D(a,olympe.H.ob.im,'nodes/files');b=a.getParameter(olympe.Fg.Config.So);if(void 0!==b)ta(a,b);else throw Error('Framework version could not be found! Is field "olympe-framework" present in version.json?');C(a,olympe.H.P.Ea,[olympe.ra.P.xa],d=>d.Rc('communication'));C(a,'server.WebSocketRequest',
828
- [new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.tr)],(d,e,f,g,h)=>new olympe.net.Gk(d,e,(g+'/'+h).replace(/\/+/g,'/').replace(/\/$/,''),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.P.tp,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),
829
- new olympe.T.fa(olympe.H.ob.sp)],b);C(a,olympe.H.P.Wn,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Vn)],b);C(a,olympe.H.P.fq,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.eq)],b);C(a,olympe.H.P.Wo,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),
830
- new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Vo)],b);C(a,olympe.H.P.pp,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.rp)],b);C(a,olympe.H.P.Io,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Jo)],b);C(a,olympe.H.P.dr,
831
- [new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.cr)],b);C(a,olympe.H.P.nr,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.mr)],b);C(a,olympe.H.P.lr,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),
832
- new olympe.T.fa(olympe.H.ob.kr)],b);C(a,olympe.H.P.jr,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.ir)],b);C(a,olympe.H.P.Fq,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Eq)],b);C(a,olympe.H.P.Oo,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),
833
- new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Mo)],b);C(a,olympe.H.P.lq,[new olympe.T.fa(olympe.net.Config.Jl),new olympe.T.fa(olympe.net.Config.Kl),new olympe.T.fa(olympe.net.Config.kp),new olympe.T.fa(olympe.H.ob.im)],b);C(a,'server.ManagerConfig',[new olympe.T.fa(olympe.H.Config.Nn),new olympe.T.fa(olympe.H.Config.yq),new olympe.T.fa(olympe.H.Config.pq),new olympe.T.fa(olympe.H.Config.Am),new olympe.T.fa(olympe.H.Config.io),new olympe.T.fa(olympe.H.Config.Lq),
834
- new olympe.T.fa(olympe.dc.Config.$g),new olympe.T.fa(olympe.H.Config.Dq)],(...d)=>{const e='autoConnect reconnectionDelay pingInterval messageTimeout clientVersion serverVersion getContextMode retryHttpOverload'.split(' '),f=new Map;d.forEach((g,h)=>f.set(e[h],g));return f});C(a,'server.bus.ManagerConfig',[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Zn),new olympe.T.fa(olympe.H.Config.ao),new olympe.T.fa(olympe.H.Config.bo),new olympe.T.fa(olympe.H.Config.co),new olympe.T.fa(olympe.H.Config.hr),
835
- new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.Config.lg),new olympe.T.fa(olympe.H.Config.Iu),new olympe.T.fa(olympe.H.Config.Gs),new olympe.T.fa(olympe.H.Config.Es),new olympe.T.fa(olympe.H.Config.Eu),new olympe.T.fa(olympe.H.Config.Is),new olympe.T.fa(olympe.H.Config.jq),new olympe.T.fa(olympe.H.Config.Au),new olympe.T.fa(olympe.H.Config.Am),new olympe.T.fa(olympe.H.Config.ar)],(d,e,f,g,h,k,l,...n)=>{e=`${l?'wss://':'ws://'}${e||d}:${g}${f}/ws`;const p='keepalive reschedulePings clientId clean reconnectPeriod connectTimeout password queueQoSZero messageTimeout tokenTimeout'.split(' ');
836
- n=n.reduce((q,r,t)=>{q[p[t]]=r;return q},{});n.username=`${h||d.split('.')[0]}:${k}`;d=new Map;d.set('url',e);d.set('connectionOptions',n);return d});A(a,olympe.H.P.xa,olympe.H.rd.sa,olympe.H.P.Ea,olympe.net.P.xa,'server.WebSocketRequest','server.ManagerConfig');A(a,olympe.H.sd.mi,olympe.H.pa.Ua,olympe.H.P.Ea,olympe.H.P.xa,olympe.H.P.nr,olympe.H.P.lr,olympe.H.P.jr,olympe.H.P.Fq,olympe.H.P.fq,olympe.auth.P.pk,olympe.ic.P.ck);A(a,olympe.H.P.$n,olympe.H.Ba.sa,olympe.H.P.Ea,olympe.net.P.xa,olympe.auth.P.xa,
837
- 'server.bus.ManagerConfig');ra(a,olympe.auth.sd.xa,olympe.H.sd.mi);ra(a,olympe.auth.sd.Ip,olympe.H.sd.mi);ra(a,olympe.auth.sd.Ee,olympe.H.sd.mi);ra(a,olympe.auth.sd.Oe,olympe.H.sd.mi);A(a,olympe.H.P.Rg,olympe.H.Tj,olympe.H.P.Ea,olympe.net.P.xa,olympe.auth.P.xa,olympe.H.P.Oo,olympe.H.P.lq);ra(a,olympe.Za.P.Rg,olympe.H.P.Rg);C(a,olympe.H.P.Jd,[olympe.ra.P.xa,olympe.H.P.xa,olympe.auth.P.xa,olympe.Za.P.Rg,olympe.H.P.Wo,olympe.H.P.pp,olympe.H.P.Io,olympe.H.P.dr],(d,e,f,g,h,k,l,n)=>new olympe.H.bh(d.Rc('server.source'),
838
- e,f,g,[h,k,l,n]));A(a,olympe.H.P.Bh,olympe.H.Zj,olympe.H.P.tp,olympe.H.P.Wn);ra(a,olympe.dc.da.P.Bh,olympe.H.P.Bh);ra(a,olympe.Za.P.um,olympe.H.P.Jd)},'olympe.communication');olympe.T.run([olympe.H.P.$n],a=>{olympe.H.Ba.Tc=()=>a});olympe.sc={};olympe.sc.P={Ea:'sc.Logger',sm:'sc.RootContext'};olympe.sc.Config={ff:'sc.app',dg:'sc.debug',Ss:'sc.disableTheme',PRODUCTION:'sc.production',cq:'sc.onstartTimeout',Cq:'sc.remoteActionTimeout',aq:'sc.offlineStart',gu:'google.apikey'};
839
- olympe.T.config(a=>{D(a,olympe.sc.Config.ff,'');D(a,olympe.sc.Config.aq,!1);D(a,olympe.sc.Config.dg,!1);D(a,olympe.sc.Config.Ss,!1);D(a,olympe.sc.Config.PRODUCTION,!1);D(a,olympe.sc.Config.cq,2E4);D(a,olympe.sc.Config.gu,'AIzaSyD0rTnF3Tq-ZjgdaqyvC8Jg-RSgpZM2jBU');D(a,olympe.sc.Config.Cq,1E4);C(a,olympe.sc.P.Ea,[olympe.ra.P.xa],b=>b.Rc('sc'));C(a,olympe.sc.P.sm,[new olympe.T.fa(olympe.sc.Config.PRODUCTION),new olympe.T.fa(olympe.sc.Config.cq)],b=>{const c=new olympe.sc.Ta('root','root',null);olympe.sc.js=
840
- c;c.set(olympe.sc.Ta.ig.PRODUCTION,b);return c})},'olympe.sc');olympe.T.run([olympe.sc.P.sm],a=>{olympe.gj().ctx=a});olympe.sc.mn=()=>null!==olympe.dc.Oa().hc(void 0,olympe.sc.Runnable.F.Gc());olympe.sc.HC=(a,b,c,d)=>{c=a.create(olympe.sc.oc).setProperty(olympe.sc.oc.C,c||null).setProperty(olympe.sc.oc.L,d||null);a.Ra(olympe.sc.oc.F,c,b);a.Ra(olympe.dc.CloudObject.containsRel,b,c);return c.R()};olympe.sc.hh=a=>{a=olympe.dc.W.Vb.hh(a);return a instanceof olympe.sc.Ce?a.C():a};olympe.sc.WC=a=>{a=olympe.dc.CloudObject.get(a.tag);return a instanceof olympe.sc.Ce?a.C():a};
841
- olympe.sc.TC=function(a){const b=olympe.dm.Qb.C.Gc(),c=olympe.dc.CloudObject.containsRel.Gc();var d=olympe.dc.wa(a);if(void 0===d)return[];a=olympe.dc.Oa();var e=a.model(d);const f=[],g=[];let h=[];if(a.Tf(e,olympe.dm.Qb))h.push(d);else{for(e=[];null===a.hc(d,b);){e.push(d);const k=a.hc(d,c);if(null===k)return olympe.ra.Xa('sc').warn(`Object ${d} has no container`),[];k===a.hc(d,olympe.dc.CloudObject.instancesRel)?(f.push(d),d=a.hc(k,c)):d=k;if(e.includes(d))throw Error(`Instance ${d} (${a.name(d)}) is part of a cyclic contain pattern`);
842
- }g.push(d);h.push(a.hc(g[0],b))}h=h.concat(a.Pf(h[0],olympe.dm.Qb.Ib));h=h.concat(a.Pf(h[h.length-1],olympe.dm.Zc.ka.Gc()));h=h.concat(a.Pf(h[h.length-1],olympe.dm.Zc.aa.Gc()));return[...f,...g,...h].reverse()};olympe.sc.UC=a=>{a=a&&a.valueOf()||'';return a.startsWith('image/')?olympe.sc.$j:a.startsWith('video/')?olympe.sc.zm:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.td:olympe.dm.File};let Hi=0,Ii=0;function Ji(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.Lm&&c.nj()&&(a=Ji(c.children,b)))return a;return null}function Ki(a,b){if(a.children)for(const c of a.children.values())b(c)}function Li(a,b){b=olympe.dc.wa(b);let c,d;return(null==(c=a.pj)?void 0:c.get('O#'+b))||(null==(d=a.pj)?void 0:d.get('IO#'+b))||b}
822
+ 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.sa.la=[olympe.H.sa];olympe.H.P={xa:'server.Manager',$n:'server.bus.Manager',Ea:'server.Logger',Jd:'server.Source',Rg:'server.FileSource',up:'server.ImportFileSvcHttpRequest',Wn:'server.BackupSvcHttpRequest',gq:'server.OpenIDSvcHttpRequest',Wo:'server.GetContextSvcPathRequest',rp:'server.ImplicitGDSvcPathRequest',Io:'server.ExplicitGDSvcPathRequest',er:'server.TransactionOverHttpPathRequest',qr:'server.UserTokenRequest',mr:'server.UserTagRequest',kr:'server.UserRolesRequest',Gq:'server.RoleMembersRequest',Bh:'server.IOUrlsProvider',
823
+ Oo:'server.fileSvcUrl',mq:'communication.peerFileSvcUrl'};olympe.H.sd={mi:'server.connectors.Auth',OA:'server.connectors.Signaling'};
824
+ olympe.H.Config={ud:'server.host',Id:'server.port',xd:'server.ssl',Nn:'server.autoConnect',zq:'server.reconnectionDelay',qq:'server.pingInterval',Am:'server.messageTimeout',Eq:'server.retryHttpOnOverload',io:'server.clientVersion',Mq:'server.serverVersion',Zn:'bus.host',ao:'bus.path',bo:'bus.port',co:'bus.vhost',lg:'bus.keepalive',Ju:'bus.reschedulePings',Hs:'bus.clientId',Fs:'bus.clean',Fu:'bus.reconnectPeriod',Js:'bus.connectTimeout',br:'bus.tokenTimeout',ir:'bus.username',kq:'bus.password',Bu:'bus.queueQoSZero'};
825
+ olympe.H.ob={Cd:'server.basePath',ur:'server.wsPath',Mo:'server.filePath',tp:'server.importFilePath',Vn:'server.backupSvcPath',fq:'server.openIDSvcPath',Vo:'server.GetContextSvcPath',sp:'server.ImplicitGraphdefSvcPath',Jo:'server.ExplicitGraphdefSvcPath',dr:'server.TransactionOverHttpPath',nr:'server.userTokenSvcPath',lr:'server.userTagPath',jr:'server.userRolesPath',Fq:'server.roleMembersPath',im:'communication.peerFileSvcPath'};
826
+ olympe.T.config(function(a){var b='object'===typeof window&&window.location&&window.location.hostname||'localhost';const c='localhost'===b;D(a,olympe.H.Config.ud,b);D(a,olympe.H.Config.Id,c?8080:443);D(a,olympe.H.Config.xd,'localhost'!==b);D(a,olympe.H.ob.Cd,'OlympeServer');D(a,olympe.H.ob.ur,'websocket');D(a,olympe.H.ob.Mo,'rest/filesvc');D(a,olympe.H.ob.tp,'rest/importsvc');D(a,olympe.H.ob.Vn,'rest/backupsvc');D(a,olympe.H.ob.fq,'rest/openid');D(a,olympe.H.ob.Vo,'rest/initialData');D(a,olympe.H.ob.sp,
827
+ 'rest/querysvc/graphDefImplicit');D(a,olympe.H.ob.Jo,'rest/querysvc/graphDefExplicit');D(a,olympe.H.ob.dr,'rest/transaction');D(a,olympe.H.ob.nr,'rest/token');D(a,olympe.H.ob.lr,'rest/authorization/getUserTag');D(a,olympe.H.ob.jr,'rest/authorization/getUserRoles');D(a,olympe.H.ob.Fq,'rest/authorization/roleMembers');D(a,olympe.H.Config.Nn,!0);D(a,olympe.H.Config.zq,5E3);D(a,olympe.H.Config.qq,5E3);D(a,olympe.H.Config.Am,15E3);D(a,olympe.H.Config.Eq,5E3);D(a,olympe.H.Config.Mq,'6.3.1');D(a,olympe.H.Config.Zn,
828
+ '');D(a,olympe.H.Config.ao,c?'':'/mqtt');D(a,olympe.H.Config.bo,c?15675:443);D(a,olympe.H.Config.co,c?'/':'');D(a,olympe.H.Config.ir,'guest');D(a,olympe.H.Config.kq,'guest');D(a,olympe.H.Config.lg,30);D(a,olympe.H.Config.br,3E5);D(a,olympe.H.ob.im,'nodes/files');b=a.getParameter(olympe.Fg.Config.So);if(void 0!==b)ta(a,b);else throw Error('Framework version could not be found! Is field "olympe-framework" present in version.json?');C(a,olympe.H.P.Ea,[olympe.ra.P.xa],d=>d.Rc('communication'));C(a,'server.WebSocketRequest',
829
+ [new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.ur)],(d,e,f,g,h)=>new olympe.net.Gk(d,e,(g+'/'+h).replace(/\/+/g,'/').replace(/\/$/,''),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.P.up,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),
830
+ new olympe.T.fa(olympe.H.ob.tp)],b);C(a,olympe.H.P.Wn,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Vn)],b);C(a,olympe.H.P.gq,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.fq)],b);C(a,olympe.H.P.Wo,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),
831
+ new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Vo)],b);C(a,olympe.H.P.rp,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.sp)],b);C(a,olympe.H.P.Io,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Jo)],b);C(a,olympe.H.P.er,
832
+ [new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.dr)],b);C(a,olympe.H.P.qr,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.nr)],b);C(a,olympe.H.P.mr,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),
833
+ new olympe.T.fa(olympe.H.ob.lr)],b);C(a,olympe.H.P.kr,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.jr)],b);C(a,olympe.H.P.Gq,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Fq)],b);C(a,olympe.H.P.Oo,[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Id),
834
+ new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.ob.Cd),new olympe.T.fa(olympe.H.ob.Mo)],b);C(a,olympe.H.P.mq,[new olympe.T.fa(olympe.net.Config.Jl),new olympe.T.fa(olympe.net.Config.Kl),new olympe.T.fa(olympe.net.Config.mp),new olympe.T.fa(olympe.H.ob.im)],b);C(a,'server.ManagerConfig',[new olympe.T.fa(olympe.H.Config.Nn),new olympe.T.fa(olympe.H.Config.zq),new olympe.T.fa(olympe.H.Config.qq),new olympe.T.fa(olympe.H.Config.Am),new olympe.T.fa(olympe.H.Config.io),new olympe.T.fa(olympe.H.Config.Mq),
835
+ new olympe.T.fa(olympe.dc.Config.$g),new olympe.T.fa(olympe.H.Config.Eq)],(...d)=>{const e='autoConnect reconnectionDelay pingInterval messageTimeout clientVersion serverVersion getContextMode retryHttpOverload'.split(' '),f=new Map;d.forEach((g,h)=>f.set(e[h],g));return f});C(a,'server.bus.ManagerConfig',[new olympe.T.fa(olympe.H.Config.ud),new olympe.T.fa(olympe.H.Config.Zn),new olympe.T.fa(olympe.H.Config.ao),new olympe.T.fa(olympe.H.Config.bo),new olympe.T.fa(olympe.H.Config.co),new olympe.T.fa(olympe.H.Config.ir),
836
+ new olympe.T.fa(olympe.H.Config.xd),new olympe.T.fa(olympe.H.Config.lg),new olympe.T.fa(olympe.H.Config.Ju),new olympe.T.fa(olympe.H.Config.Hs),new olympe.T.fa(olympe.H.Config.Fs),new olympe.T.fa(olympe.H.Config.Fu),new olympe.T.fa(olympe.H.Config.Js),new olympe.T.fa(olympe.H.Config.kq),new olympe.T.fa(olympe.H.Config.Bu),new olympe.T.fa(olympe.H.Config.Am),new olympe.T.fa(olympe.H.Config.br)],(d,e,f,g,h,k,l,...n)=>{e=`${l?'wss://':'ws://'}${e||d}:${g}${f}/ws`;const p='keepalive reschedulePings clientId clean reconnectPeriod connectTimeout password queueQoSZero messageTimeout tokenTimeout'.split(' ');
837
+ n=n.reduce((q,r,t)=>{q[p[t]]=r;return q},{});n.username=`${h||d.split('.')[0]}:${k}`;d=new Map;d.set('url',e);d.set('connectionOptions',n);return d});A(a,olympe.H.P.xa,olympe.H.rd.sa,olympe.H.P.Ea,olympe.net.P.xa,'server.WebSocketRequest','server.ManagerConfig');A(a,olympe.H.sd.mi,olympe.H.pa.Ua,olympe.H.P.Ea,olympe.H.P.xa,olympe.H.P.qr,olympe.H.P.mr,olympe.H.P.kr,olympe.H.P.Gq,olympe.H.P.gq,olympe.auth.P.pk,olympe.ic.P.ck);A(a,olympe.H.P.$n,olympe.H.Ba.sa,olympe.H.P.Ea,olympe.net.P.xa,olympe.auth.P.xa,
838
+ 'server.bus.ManagerConfig');ra(a,olympe.auth.sd.xa,olympe.H.sd.mi);ra(a,olympe.auth.sd.Jp,olympe.H.sd.mi);ra(a,olympe.auth.sd.Ee,olympe.H.sd.mi);ra(a,olympe.auth.sd.Oe,olympe.H.sd.mi);A(a,olympe.H.P.Rg,olympe.H.Tj,olympe.H.P.Ea,olympe.net.P.xa,olympe.auth.P.xa,olympe.H.P.Oo,olympe.H.P.mq);ra(a,olympe.Za.P.Rg,olympe.H.P.Rg);C(a,olympe.H.P.Jd,[olympe.ra.P.xa,olympe.H.P.xa,olympe.auth.P.xa,olympe.Za.P.Rg,olympe.H.P.Wo,olympe.H.P.rp,olympe.H.P.Io,olympe.H.P.er],(d,e,f,g,h,k,l,n)=>new olympe.H.bh(d.Rc('server.source'),
839
+ e,f,g,[h,k,l,n]));A(a,olympe.H.P.Bh,olympe.H.Zj,olympe.H.P.up,olympe.H.P.Wn);ra(a,olympe.dc.da.P.Bh,olympe.H.P.Bh);ra(a,olympe.Za.P.um,olympe.H.P.Jd)},'olympe.communication');olympe.T.run([olympe.H.P.$n],a=>{olympe.H.Ba.Tc=()=>a});olympe.sc={};olympe.sc.P={Ea:'sc.Logger',sm:'sc.RootContext'};olympe.sc.Config={ff:'sc.app',dg:'sc.debug',Ts:'sc.disableTheme',PRODUCTION:'sc.production',eq:'sc.onstartTimeout',Dq:'sc.remoteActionTimeout',bq:'sc.offlineStart',hu:'google.apikey'};
840
+ olympe.T.config(a=>{D(a,olympe.sc.Config.ff,'');D(a,olympe.sc.Config.bq,!1);D(a,olympe.sc.Config.dg,!1);D(a,olympe.sc.Config.Ts,!1);D(a,olympe.sc.Config.PRODUCTION,!1);D(a,olympe.sc.Config.eq,2E4);D(a,olympe.sc.Config.hu,'AIzaSyD0rTnF3Tq-ZjgdaqyvC8Jg-RSgpZM2jBU');D(a,olympe.sc.Config.Dq,1E4);C(a,olympe.sc.P.Ea,[olympe.ra.P.xa],b=>b.Rc('sc'));C(a,olympe.sc.P.sm,[new olympe.T.fa(olympe.sc.Config.PRODUCTION),new olympe.T.fa(olympe.sc.Config.eq)],b=>{const c=new olympe.sc.Ta('root','root',null);olympe.sc.ks=
841
+ c;c.set(olympe.sc.Ta.ig.PRODUCTION,b);return c})},'olympe.sc');olympe.T.run([olympe.sc.P.sm],a=>{olympe.gj().ctx=a});olympe.sc.mn=()=>null!==olympe.dc.Oa().hc(void 0,olympe.sc.Runnable.F.Gc());olympe.sc.IC=(a,b,c,d)=>{c=a.create(olympe.sc.oc).setProperty(olympe.sc.oc.C,c||null).setProperty(olympe.sc.oc.L,d||null);a.Ra(olympe.sc.oc.F,c,b);a.Ra(olympe.dc.CloudObject.containsRel,b,c);return c.R()};olympe.sc.hh=a=>{a=olympe.dc.W.Vb.hh(a);return a instanceof olympe.sc.Ce?a.C():a};olympe.sc.XC=a=>{a=olympe.dc.CloudObject.get(a.tag);return a instanceof olympe.sc.Ce?a.C():a};
842
+ olympe.sc.UC=function(a){const b=olympe.dm.Qb.C.Gc(),c=olympe.dc.CloudObject.containsRel.Gc();var d=olympe.dc.wa(a);if(void 0===d)return[];a=olympe.dc.Oa();var e=a.model(d);const f=[],g=[];let h=[];if(a.Tf(e,olympe.dm.Qb))h.push(d);else{for(e=[];null===a.hc(d,b);){e.push(d);const k=a.hc(d,c);if(null===k)return olympe.ra.Xa('sc').warn(`Object ${d} has no container`),[];k===a.hc(d,olympe.dc.CloudObject.instancesRel)?(f.push(d),d=a.hc(k,c)):d=k;if(e.includes(d))throw Error(`Instance ${d} (${a.name(d)}) is part of a cyclic contain pattern`);
843
+ }g.push(d);h.push(a.hc(g[0],b))}h=h.concat(a.Pf(h[0],olympe.dm.Qb.Ib));h=h.concat(a.Pf(h[h.length-1],olympe.dm.Zc.ja.Gc()));h=h.concat(a.Pf(h[h.length-1],olympe.dm.Zc.aa.Gc()));return[...f,...g,...h].reverse()};olympe.sc.VC=a=>{a=a&&a.valueOf()||'';return a.startsWith('image/')?olympe.sc.$j:a.startsWith('video/')?olympe.sc.zm:a.startsWith('font/')||a.startsWith('application/font-woff')?olympe.sc.td:olympe.dm.File};let Hi=0,Ii=0;function Ji(a,b){if(null===a)return null;if(a.has(b))return a.get(b);for(const c of a.values())if(c.Lm&&c.nj()&&(a=Ji(c.children,b)))return a;return null}function Ki(a,b){if(a.children)for(const c of a.children.values())b(c)}function Li(a,b){b=olympe.dc.wa(b);let c,d;return(null==(c=a.pj)?void 0:c.get('O#'+b))||(null==(d=a.pj)?void 0:d.get('IO#'+b))||b}
843
844
  function Mi(a,b,c,d){const e='$'+b;a.Zh.add(b);c.map(f=>'@'+f+'.'+b).forEach(f=>{let g,h;null==(g=a.Ld)||null==(h=g.get(f))||h.forEach(k=>{k(d)})});Ki(a,f=>{!f.Rm&&f.Zh.has(b)||f.data.has(e)||Mi(f,b,c,d)});a.Zh.delete(b)}function Ni(a,b){b=olympe.dc.wa(b);let c,d;return(null==(c=a.pj)?void 0:c.get('I#'+b))||(null==(d=a.pj)?void 0:d.get('IO#'+b))||b}
844
845
  function Oi(a,b,c){a.Zh.add(b);let d;const e=null==(d=a.Ld)?void 0:d.get('&'+b);if(e)for(const f of e.values())f(c);Ki(a,f=>{f.Zh.has(b)||Oi(f,b,c)});a.Zh.delete(b)}function Pi(a,b){if(a.pe&&a.pe.has(b)){var c=a.pe.get(b);--c[0];0===c[0]&&(a.pe.delete(b),0===a.pe.size&&(a.pe=null),Oc(olympe.dc.Ad(),null,c[1]))}}function Qi(a,b){null===a.children&&(a.children=new Map);a.children.set(b.id,b)}
845
846
  function Ri(a,b){let c;null==(c=a.children)||c.delete(b.Z());let d;0===(null==(d=a.children)?void 0:d.size)&&(a.children=null)}
846
- olympe.sc.Ta=class{constructor(a,b,c=olympe.sc.js){++Ii;this.id=a;this.gh=new Set;this.parent=c;this.zd=b||null;this.mc=new olympe.D.Xb('SC Context');this.data=new Map;this.pe=this.children=this.Ld=null;this.Sm=new Map;this.uid=Ii;this.Cr=null;this.Lm=!1;this.Zh=new Set;this.Rm=!1;this.N=olympe.ra.Xa('sc');this.pj=null;this.cf()}Z(){return this.id}jn(){return this.uid}getParent(){return this.parent}Qk(){return this.Cr}xc(){return this.mc}sn(a){this.Cr=olympe.dc.wa(a);this.Lm=a.Pd().mn();a.aa().forEach(b=>
847
+ olympe.sc.Ta=class{constructor(a,b,c=olympe.sc.ks){++Ii;this.id=a;this.gh=new Set;this.parent=c;this.zd=b||null;this.mc=new olympe.D.Xb('SC Context');this.data=new Map;this.pe=this.children=this.Ld=null;this.Sm=new Map;this.uid=Ii;this.Dr=null;this.Lm=!1;this.Zh=new Set;this.Rm=!1;this.N=olympe.ra.Xa('sc');this.pj=null;this.cf()}Z(){return this.id}jn(){return this.uid}getParent(){return this.parent}Qk(){return this.Dr}xc(){return this.mc}sn(a){this.Dr=olympe.dc.wa(a);this.Lm=a.Pd().mn();a.aa().forEach(b=>
847
848
  {this.gh.add(b)});this.pj=a.Y()}Kk(){this.Rm=!0;Ki(this,a=>{a.Kk()})}kl(){this.Rm=!1;Ki(this,a=>{a.kl()})}set(a,b){if(this.mc.G()||this.mc.Ab())return this;a=Li(this,a);const c='$'+a;var d=this.data.get(c);d&&d.valueOf&&(d=d.valueOf());if(void 0===b||null===b)void 0!==d&&(this.data.delete(c),Mi(this,a,['*',this.id,...this.gh],null));else{var e;(e=void 0===d)||(e=!('function'===typeof b.qb?b.qb(d):b.valueOf()===d.valueOf()));e&&(this.data.set(c,b),Mi(this,a,['*',this.id,...this.gh],b))}return this}li(a){return this.set(a,
848
849
  Date.now())}remove(a){this.mc.Ab()||this.mc.G()||(a=Li(this,a),this.data.delete('$'+a)&&Mi(this,a,['*',this.id,...this.gh],null))}Fb(a,b,c=!1){const d=olympe.dc.wa(a),e=olympe.D.Uc(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.id:void 0));return e.Fb()}get(a,b=!1){a=this.bb(a,b);return void 0!==a?a:null}has(a,b=!1){a='$'+Ni(this,a);let c=this.data.has(a),d=this.parent;if(b)for(;!c&&d;)c=d.data.has(a),d=d.parent;return c}observe(a,
849
850
  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.id,!1);this.onDestroy(()=>{f();d.complete()});return f})}repeat(a,b){const c=Ni(this,a);a=b.subscribe(d=>{null!==d?this.set(c,d):this.remove(c)});this.Jg(a.unsubscribe.bind(a));return this}fl(a){a=a instanceof olympe.sc.Runnable?a:this.get(a);if(!a)return null;const b=this.Xh(`Runner ${olympe.D.bb(a.ma(),'')}`);a.run(b);return b}Kn(a,b=!0,c=!1){return rxjs.firstValueFrom(this.observe(a,
@@ -853,157 +854,157 @@ b){this.pe||(this.pe=new Map);const c=this.pe.get(a);c?c[0]+=1:(this.pe.set(a,[1
853
854
  {this.pe&&this.pe.forEach(([c],d)=>{for(let e=0;e<c;e++)Pi(this,d)});let b;null==(b=this.parent)||Ri(b,this);this.gh.clear();this.parent=null;null!==this.get(olympe.sc.Ta.ig.TRANSACTION)&&this.N.warn(`The context ${this.id} is being destroyed but still has unreleased transactions. You probably forgot to end a transaction.`)});let a;null==(a=this.parent)||Qi(a,this)}Re(a,b){this.Ld||(this.Ld=new Map);let c=this.Ld.get(a);void 0===c&&(c=new Map,this.Ld.set(a,c));++Hi;const d=Hi;c.set(d,b);return()=>
854
855
  {const e=this.Ld.get(a);e&&(e.delete(d),0===e.size&&this.Ld.delete(a))}}Ab(){return this.mc.Ab()}pn(){const a=this.bb(olympe.sc.Ta.ig.EDITION);return a?a:!1}Zk(){const a=this.bb(olympe.sc.Ta.ig.PRODUCTION);return a?a:!1}};olympe.sc.Ta.prototype.clear=olympe.sc.Ta.prototype.clear;olympe.sc.Ta.prototype.offDestroy=olympe.sc.Ta.prototype.Je;olympe.sc.Ta.prototype.onDestroy=olympe.sc.Ta.prototype.onDestroy;olympe.sc.Ta.prototype.offClear=olympe.sc.Ta.prototype.rj;olympe.sc.Ta.prototype.onClear=olympe.sc.Ta.prototype.Jg;
855
856
  olympe.sc.Ta.prototype.destroy=olympe.sc.Ta.prototype.destroy;olympe.sc.Ta.prototype.getOtherContext=olympe.sc.Ta.prototype.di;olympe.sc.Ta.prototype.onContext=olympe.sc.Ta.prototype.tj;olympe.sc.Ta.prototype.createChild=olympe.sc.Ta.prototype.Xh;olympe.sc.Ta.prototype.setParentElement=olympe.sc.Ta.prototype.hl;olympe.sc.Ta.prototype.waitFor=olympe.sc.Ta.prototype.Kn;olympe.sc.Ta.prototype.runner=olympe.sc.Ta.prototype.fl;olympe.sc.Ta.prototype.repeat=olympe.sc.Ta.prototype.repeat;
856
- olympe.sc.Ta.prototype.observe=olympe.sc.Ta.prototype.observe;olympe.sc.Ta.prototype.has=olympe.sc.Ta.prototype.has;olympe.sc.Ta.prototype.get=olympe.sc.Ta.prototype.get;olympe.sc.Ta.prototype.remove=olympe.sc.Ta.prototype.remove;olympe.sc.Ta.prototype.trigger=olympe.sc.Ta.prototype.li;olympe.sc.Ta.prototype.set=olympe.sc.Ta.prototype.set;olympe.sc.Ta.prototype.getParent=olympe.sc.Ta.prototype.getParent;olympe.sc.Ta.cc={tt:'I#',tu:'O#',fA:'IO#'};
857
- olympe.sc.Ta.ig={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',cg:'__htmlContainer',mz:'__dockableElement'};olympe.sc.Metadata=class extends olympe.dc.CloudObject{};olympe.sc.Metadata.O=olympe.dc.ya.C('0161ae936c62f9fcd131',olympe.sc.Metadata);olympe.sc.oc=class extends olympe.dc.CloudObject{F(){return this.Gb(olympe.sc.oc.L)}C(){return this.Gb(olympe.sc.oc.C)}};olympe.sc.oc.O=olympe.dc.ya.C('01703376c4a81c0e9d90',olympe.sc.oc);olympe.sc.oc.L=olympe.sc.oc.O.va('01703376c4a81c0e9d91');olympe.sc.oc.C=olympe.sc.oc.O.va('01703376c4a81c0e9d92');olympe.sc.oc.F=olympe.sc.oc.O.Ha('01703376c4a81c0e9d93');P(olympe.dc.CloudObject.O,olympe.sc.oc.F);olympe.sc.oc.prototype.F.K=olympe.D.J.F;olympe.sc.oc.prototype.C.K=olympe.D.J.F;olympe.sc.W={};function Si(a,b){const c=Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2);a.C.set(c,b);return c}
858
- olympe.sc.W.gt=class{constructor(a,b,c){const d=olympe.net.cb.$d.GET,e=olympe.net.cb.$d.Hc,f=olympe.net.cb.$d.mk,g=olympe.net.cb.$d.em,h=olympe.net.cb.Headers.Kj,k=olympe.net.cb.Headers.pi;this.N=a;this.G=b.aa([d,e,f,g],[h,k]);this.L=c;this.C=new olympe.W.wm(3E4);this.F=new olympe.D.Xb('FileService context')}start(a){var b=olympe.net.cb.$d.GET;const c=olympe.net.cb.$d.Hc,d=olympe.net.cb.$d.mk,e=olympe.net.cb.$d.em,f=olympe.net.cb.hd.Hh,g=olympe.net.cb.hd.et,h=olympe.net.cb.hd.Kq,k=olympe.net.cb.Headers.pi,
859
- l=olympe.net.cb.Headers.vs,n=`fileServer_${a}`;a=`/${this.L}/${a}/:${'fileTag'}`.replace(/\/+/g,'/').replace(/\/$/,'');this.N.debug(`Started file service with path : ${a}`);b=this.G.L(n,a,[b,c,d,e],(p,q)=>{if(p.method===e)return Promise.resolve(new olympe.net.Tg('',f,'',{[l]:'*'}));const r=p.hj()[k],t=this.C.get(r);if(!t)return Promise.resolve(new olympe.net.Tg('Invalid token',g,'Access denied'));this.C.delete(r);return t(p.hj(),q.get('fileTag'),p.body).catch(u=>Promise.resolve(new olympe.net.Tg(`Internal server error: ${u}`,
860
- h,'Internal server error')))});this.F.onDestroy(()=>{this.G.Y(n).catch(p=>this.N.error(`An error occurred while stopping the file service: ${p}`))});return b}stop(){this.F.destroy()}};olympe.sc.Ie={};olympe.sc.Ie.sg={cz:null,Mu:'screenflow',ev:'ui-design',Mq:'software-intelligence',Nj:'data-management'};olympe.sc.ne=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Ie.sg.Mq}F(){return this.tb(olympe.sc.ne.C,olympe.sc.logic.Mi)}G(){return this.tb(olympe.sc.ne.F,olympe.sc.logic.Lh)}};olympe.sc.ne.O=olympe.dc.ya.C('011100000000000adef0',olympe.sc.ne);olympe.sc.ne.C=olympe.sc.ne.O.Ha('016ac4f59a2917fdef01');olympe.sc.ne.F=olympe.sc.ne.O.Ha('016ac4f59a2917fdef02');olympe.sc.ne.prototype.F.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.sc.ne.prototype.G.K=new olympe.D.J(()=>olympe.dc.Ca,[]);function Ti(a,b){const c=[];for(const d of b)b=a.db.fb(d,olympe.sc.logic.Kc.C,!0),c[b]=d;return c}
861
- olympe.sc.pb=class extends olympe.dm.BrickMetadata{Mt(a,b,c,d,e=!0){e||olympe.ra.Xa('sc').error('parameter own= false ignored, investigate');return olympe.D.bf(L(this.Of(a,olympe.dc.W.Vb.hh,c)),d)}cf(a){[].forEach(b=>b.call(this,a,(c,d)=>{null===d?a.remove(c):a.set(c,d)}))}$w(){return this.tb(olympe.sc.pb.aa,olympe.sc.Runnable)}ow(){return this.tb(olympe.sc.pb.ka,olympe.sc.Runnable)}rn(){return this.db.fb(this,olympe.sc.pb.Ib)}mn(){return null!==this.db.hc(this.tag,olympe.sc.Runnable.F.Gc())}Tl(){return this.tb(olympe.sc.pb.F,
862
- olympe.sc.logic.Db)}bk(){return this.tb(olympe.sc.pb.L,olympe.sc.logic.Rb)}};olympe.sc.pb.O=olympe.dc.ya.C('0112000000000000def0',olympe.sc.pb);olympe.sc.pb.Ib=olympe.sc.pb.O.va('01692aa71f3108454479');olympe.sc.pb.ac=olympe.sc.pb.O.va('0166446c1f128ebc903a');olympe.sc.pb.aa=olympe.sc.pb.O.Ha('01692a4af82e8984742c');olympe.sc.pb.ka=olympe.sc.pb.O.Ha('01692a4af82e8984742d');olympe.sc.pb.Da=olympe.sc.pb.O.Ha('01692a4af82e8984742e');olympe.sc.pb.F=olympe.sc.pb.O.Ha('01621fb84e320000f00a');
863
- olympe.sc.pb.L=olympe.sc.pb.O.Ha('01621fb84e320000f00b');olympe.sc.pb.Ge=olympe.sc.pb.O.Ha('0171838bcfed0000e00e');olympe.sc.pb.yd=olympe.sc.pb.O.Ha('0171838bcfed0000a00a');m=olympe.sc.pb.prototype;m.Mt.K=olympe.D.J.C;m.$w.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.ow.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.rn.K=olympe.D.J.C;m.mn.K=olympe.D.J.C;m.Tl.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.bk.K=new olympe.D.J(()=>olympe.dc.Ca,[]);function Ui(a){const b=new olympe.dc.Transaction,c=b.create(a).persist(!1).R();b.hb();olympe.D.Ja().onDestroy(()=>{const d=new olympe.dc.Transaction;d.delete(c);d.hb()});return olympe.dc.CloudObject.get(c)}
857
+ olympe.sc.Ta.prototype.observe=olympe.sc.Ta.prototype.observe;olympe.sc.Ta.prototype.has=olympe.sc.Ta.prototype.has;olympe.sc.Ta.prototype.get=olympe.sc.Ta.prototype.get;olympe.sc.Ta.prototype.remove=olympe.sc.Ta.prototype.remove;olympe.sc.Ta.prototype.trigger=olympe.sc.Ta.prototype.li;olympe.sc.Ta.prototype.set=olympe.sc.Ta.prototype.set;olympe.sc.Ta.prototype.getParent=olympe.sc.Ta.prototype.getParent;olympe.sc.Ta.cc={ut:'I#',uu:'O#',gA:'IO#'};
858
+ olympe.sc.Ta.ig={PRODUCTION:'__production',EDITION:'__editionMode',TRANSACTION:'__transaction',cg:'__htmlContainer',nz:'__dockableElement'};olympe.sc.Metadata=class extends olympe.dc.CloudObject{};olympe.sc.Metadata.O=olympe.dc.ya.C('0161ae936c62f9fcd131',olympe.sc.Metadata);olympe.sc.oc=class extends olympe.dc.CloudObject{F(){return this.Gb(olympe.sc.oc.L)}C(){return this.Gb(olympe.sc.oc.C)}};olympe.sc.oc.O=olympe.dc.ya.C('01703376c4a81c0e9d90',olympe.sc.oc);olympe.sc.oc.L=olympe.sc.oc.O.va('01703376c4a81c0e9d91');olympe.sc.oc.C=olympe.sc.oc.O.va('01703376c4a81c0e9d92');olympe.sc.oc.F=olympe.sc.oc.O.Ha('01703376c4a81c0e9d93');P(olympe.dc.CloudObject.O,olympe.sc.oc.F);olympe.sc.oc.prototype.F.K=olympe.D.J.F;olympe.sc.oc.prototype.C.K=olympe.D.J.F;olympe.sc.W={};function Si(a,b){const c=Math.random().toString(36).substr(2)+Math.random().toString(36).substr(2);a.C.set(c,b);return c}
859
+ olympe.sc.W.ht=class{constructor(a,b,c){const d=olympe.net.cb.$d.GET,e=olympe.net.cb.$d.Hc,f=olympe.net.cb.$d.mk,g=olympe.net.cb.$d.em,h=olympe.net.cb.Headers.Kj,k=olympe.net.cb.Headers.pi;this.N=a;this.G=b.aa([d,e,f,g],[h,k]);this.L=c;this.C=new olympe.W.wm(3E4);this.F=new olympe.D.Xb('FileService context')}start(a){var b=olympe.net.cb.$d.GET;const c=olympe.net.cb.$d.Hc,d=olympe.net.cb.$d.mk,e=olympe.net.cb.$d.em,f=olympe.net.cb.hd.Hh,g=olympe.net.cb.hd.ft,h=olympe.net.cb.hd.Lq,k=olympe.net.cb.Headers.pi,
860
+ l=olympe.net.cb.Headers.ws,n=`fileServer_${a}`;a=`/${this.L}/${a}/:${'fileTag'}`.replace(/\/+/g,'/').replace(/\/$/,'');this.N.debug(`Started file service with path : ${a}`);b=this.G.L(n,a,[b,c,d,e],(p,q)=>{if(p.method===e)return Promise.resolve(new olympe.net.Tg('',f,'',{[l]:'*'}));const r=p.hj()[k],t=this.C.get(r);if(!t)return Promise.resolve(new olympe.net.Tg('Invalid token',g,'Access denied'));this.C.delete(r);return t(p.hj(),q.get('fileTag'),p.body).catch(u=>Promise.resolve(new olympe.net.Tg(`Internal server error: ${u}`,
861
+ h,'Internal server error')))});this.F.onDestroy(()=>{this.G.Y(n).catch(p=>this.N.error(`An error occurred while stopping the file service: ${p}`))});return b}stop(){this.F.destroy()}};olympe.sc.Ie={};olympe.sc.Ie.sg={dz:null,Nu:'screenflow',fv:'ui-design',Nq:'software-intelligence',Nj:'data-management'};olympe.sc.ne=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Ie.sg.Nq}F(){return this.tb(olympe.sc.ne.C,olympe.sc.logic.Mi)}G(){return this.tb(olympe.sc.ne.F,olympe.sc.logic.Lh)}};olympe.sc.ne.O=olympe.dc.ya.C('011100000000000adef0',olympe.sc.ne);olympe.sc.ne.C=olympe.sc.ne.O.Ha('016ac4f59a2917fdef01');olympe.sc.ne.F=olympe.sc.ne.O.Ha('016ac4f59a2917fdef02');olympe.sc.ne.prototype.F.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.sc.ne.prototype.G.K=new olympe.D.J(()=>olympe.dc.Ca,[]);function Ti(a,b){const c=[];for(const d of b)b=a.db.fb(d,olympe.sc.logic.Kc.C,!0),c[b]=d;return c}
862
+ olympe.sc.pb=class extends olympe.dm.BrickMetadata{Nt(a,b,c,d,e=!0){e||olympe.ra.Xa('sc').error('parameter own= false ignored, investigate');return olympe.D.bf(L(this.Of(a,olympe.dc.W.Vb.hh,c)),d)}cf(a){[].forEach(b=>b.call(this,a,(c,d)=>{null===d?a.remove(c):a.set(c,d)}))}ax(){return this.tb(olympe.sc.pb.aa,olympe.sc.Runnable)}pw(){return this.tb(olympe.sc.pb.ja,olympe.sc.Runnable)}rn(){return this.db.fb(this,olympe.sc.pb.Ib)}mn(){return null!==this.db.hc(this.tag,olympe.sc.Runnable.F.Gc())}Tl(){return this.tb(olympe.sc.pb.F,
863
+ olympe.sc.logic.Db)}bk(){return this.tb(olympe.sc.pb.L,olympe.sc.logic.Rb)}};olympe.sc.pb.O=olympe.dc.ya.C('0112000000000000def0',olympe.sc.pb);olympe.sc.pb.Ib=olympe.sc.pb.O.va('01692aa71f3108454479');olympe.sc.pb.ac=olympe.sc.pb.O.va('0166446c1f128ebc903a');olympe.sc.pb.aa=olympe.sc.pb.O.Ha('01692a4af82e8984742c');olympe.sc.pb.ja=olympe.sc.pb.O.Ha('01692a4af82e8984742d');olympe.sc.pb.Da=olympe.sc.pb.O.Ha('01692a4af82e8984742e');olympe.sc.pb.F=olympe.sc.pb.O.Ha('01621fb84e320000f00a');
864
+ olympe.sc.pb.L=olympe.sc.pb.O.Ha('01621fb84e320000f00b');olympe.sc.pb.Ge=olympe.sc.pb.O.Ha('0171838bcfed0000e00e');olympe.sc.pb.yd=olympe.sc.pb.O.Ha('0171838bcfed0000a00a');m=olympe.sc.pb.prototype;m.Nt.K=olympe.D.J.C;m.ax.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.pw.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.rn.K=olympe.D.J.C;m.mn.K=olympe.D.J.C;m.Tl.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.bk.K=new olympe.D.J(()=>olympe.dc.Ca,[]);function Ui(a){const b=new olympe.dc.Transaction,c=b.create(a).persist(!1).R();b.hb();olympe.D.Ja().onDestroy(()=>{const d=new olympe.dc.Transaction;d.delete(c);d.hb()});return olympe.dc.CloudObject.get(c)}
864
865
  function Vi(a,b){var c=a.Tb();const d=a.db.name(c),e=`Brick ${d} successfully run`,f=`Brick ${d} successfully cleared`,g=a.F(b);c=a.setupExecution(b).pipe(rxjs.operators.map(h=>b.Ab()||(b.clear(),null===h)?!1:(b.xc().run(a.update.bind(a,new olympe.sc.eb(b),Array.isArray(h)?h:[h],g)),!0))).subscribe(rxjs.Subscriber.create(h=>h?a.N.debug(e):a.N.debug(f),a.Ya.bind(a,b),()=>a.N.debug(`Brick ${d} completed`)));b.onDestroy(c.unsubscribe.bind(c))}
865
866
  function Wi(a,b,c,d){const e=d.xc(),f=V(a.db,b,c,e.C((g,h)=>{const k=d.gn(h);g?olympe.dc.CloudObject.get(h).run(k):k.destroy()}));e.zc(a.db.C.bind(a.db,b,c,f,!0))}function Xi(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)}})}
866
867
  function Yi(a,b,c){const d=olympe.D.Ja(),e=xd(a.db,a.tag,d.C((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.hh(g)))}));d.onDestroy(()=>{yd(a.db,a.tag,e)})}
867
868
  olympe.sc.Runnable=class extends olympe.dm.BrickMetadata{constructor(a,b,c){super(a,b);this.N=c}run(a){const b=()=>{this.cf(a);this.init(a);this.Pd().rn()?Vi(this,a):a.xc().run(this.update.bind(this,new olympe.sc.eb(a),[],[]));a.li(olympe.sc.pb.ac);a.Jg(this.clear.bind(this,a));a.onDestroy(this.destroy.bind(this,a))},c=a.getParent();c?c.xc().run(b):b()}Pd(){return this.nh()}init(a){this.onInit(a)}update(a,b,c){const d=this.Pd();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.jn()}`),
868
869
  Wi(this,d,olympe.sc.pb.aa,a),this.Sa()&&Wi(this,d,olympe.sc.pb.Da,a)}clear(){}destroy(a){this.onDestroy(a)}setupExecution(){return rxjs.of([])}F(){return[]}onInit(){}onUpdate(){this.N.error(`Brick ${this.db.name(this.Tb())} (${this.Tb()}) is flagged as hardcoded, but method update() has not been overridden.`)}onDestroy(){}getInputs(){var a=this.Pd();return Ti(a,a.db.tb(a.tag,olympe.sc.pb.F))}getOutputs(){var a=this.Pd();return Ti(a,a.db.tb(a.tag,olympe.sc.pb.L))}aa(){return[]}Y(){return new Map}Sa(){return!1}G(a,
869
- b,c,d){a=b.Fb(a,c,!0);void 0!==d&&olympe.D.bf(a,d);return a}Lb(a,b,c,d,e){olympe.D.An([d],f=>{b.set(a,olympe.D.$r(f)?f.valueOf():f)});return this.G(a,b,c,e)}cf(a){a.sn(this);this.Pd().cf(a);const b=this.L(),c=Xi(a,b),d=[];b.forEach((e,f)=>{e===this.Da?d[0]=f:e===this.oa&&(d[1]=f)});void 0!==d[0]&&void 0!==d[1]&&(Yi(this,c[d[0]],c[d[1]]),b[d[0]]=null,b[d[1]]=null);b.forEach((e,f)=>{e&&e.call(this,a,c[f])})}L(){return[this.Da,this.oa]}Da(a,b){Yi(this,b,null)}oa(a,b){Yi(this,null,b)}ac(a,b){const c=
870
- this.db,d=olympe.sc.logic.xb.L.Gc(),e=olympe.sc.logic.xb.F,f=olympe.sc.logic.xb.C;this.Mr(d,g=>{var h=g.R();if(h=c.hc(h,e)||c.hc(h,f))g=g.cf(a,b.bind(null,h)),olympe.D.Ja().onDestroy(g)})}Ya(a,b){const c=this.Tb();let d=this.db.name(c);try{const e=[a.Qk()];let f=a.getParent();for(;null!==f&&f!==olympe.sc.js;)e.unshift(f.Qk()),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}`)}};
871
- olympe.sc.Runnable.O=Ic(olympe.dc.ya.C('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.L=olympe.sc.Runnable.O.Ha('01692a4af82e8984742b');olympe.sc.Runnable.F=olympe.sc.Runnable.O.Ha('01756a18d4921c103111');olympe.sc.Runnable.U=P(olympe.sc.Runnable.O,olympe.sc.pb.aa);olympe.sc.Runnable.Y=P(olympe.sc.Runnable.O,olympe.sc.pb.ka);olympe.sc.Runnable.aa=P(olympe.sc.Runnable.O,olympe.sc.pb.Da);P(olympe.sc.pb.O,olympe.sc.Runnable.L);P(olympe.sc.pb.O,olympe.sc.Runnable.F);
870
+ b,c,d){a=b.Fb(a,c,!0);void 0!==d&&olympe.D.bf(a,d);return a}Lb(a,b,c,d,e){olympe.D.An([d],f=>{b.set(a,olympe.D.bs(f)?f.valueOf():f)});return this.G(a,b,c,e)}cf(a){a.sn(this);this.Pd().cf(a);const b=this.L(),c=Xi(a,b),d=[];b.forEach((e,f)=>{e===this.Da?d[0]=f:e===this.oa&&(d[1]=f)});void 0!==d[0]&&void 0!==d[1]&&(Yi(this,c[d[0]],c[d[1]]),b[d[0]]=null,b[d[1]]=null);b.forEach((e,f)=>{e&&e.call(this,a,c[f])})}L(){return[this.Da,this.oa]}Da(a,b){Yi(this,b,null)}oa(a,b){Yi(this,null,b)}ac(a,b){const c=
871
+ this.db,d=olympe.sc.logic.xb.L.Gc(),e=olympe.sc.logic.xb.F,f=olympe.sc.logic.xb.C;this.Nr(d,g=>{var h=g.R();if(h=c.hc(h,e)||c.hc(h,f))g=g.cf(a,b.bind(null,h)),olympe.D.Ja().onDestroy(g)})}Ya(a,b){const c=this.Tb();let d=this.db.name(c);try{const e=[a.Qk()];let f=a.getParent();for(;null!==f&&f!==olympe.sc.ks;)e.unshift(f.Qk()),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}`)}};
872
+ olympe.sc.Runnable.O=Ic(olympe.dc.ya.C('01130000000000ca1100',olympe.sc.Runnable));olympe.sc.Runnable.L=olympe.sc.Runnable.O.Ha('01692a4af82e8984742b');olympe.sc.Runnable.F=olympe.sc.Runnable.O.Ha('01756a18d4921c103111');olympe.sc.Runnable.U=P(olympe.sc.Runnable.O,olympe.sc.pb.aa);olympe.sc.Runnable.Y=P(olympe.sc.Runnable.O,olympe.sc.pb.ja);olympe.sc.Runnable.aa=P(olympe.sc.Runnable.O,olympe.sc.pb.Da);P(olympe.sc.pb.O,olympe.sc.Runnable.L);P(olympe.sc.pb.O,olympe.sc.Runnable.F);
872
873
  olympe.sc.Runnable.prototype.Pd.K=new olympe.D.J(()=>olympe.sc.pb,[]);olympe.sc.Runnable.prototype.G.K=new olympe.D.J(()=>Object,[]);olympe.sc.Runnable.prototype.Lb.K=olympe.D.J.C;function Zi(a){if(a){if('string'===typeof a)return a;if(a instanceof olympe.sc.Ce)return(a=a.F())?a.valueOf():null;if('function'===typeof a.R)return a.R()}return null}olympe.sc.Ce=class extends olympe.dc.CloudObject{F(){return this.db.tb(this,olympe.sc.Ce.C)[0]}C(){return olympe.dc.CloudObject.get(Zi(this))}toString(){const a=Zi(this);let b;a&&(b=this.db.name(a));return b||super.toString()}};olympe.sc.Ce.O=olympe.dc.ya.C('0163c9ae01f2d6e9ca49',olympe.sc.Ce);olympe.sc.Ce.C=olympe.sc.Ce.O.Ha('0169b5a8a33144fb0b49');
873
874
  P(olympe.dc.CloudObject.O,olympe.sc.Ce.C);olympe.sc.Ce.prototype.F.K=new olympe.D.J(()=>String,[]);olympe.sc.Ce.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.Bo=class extends olympe.dm.Qb{C(){return olympe.sc.Ie.sg.Nj}};olympe.sc.Bo.O=olympe.dc.ya.C('0163a68ce44f3d1fa84c',olympe.sc.Bo);olympe.sc.si=class extends olympe.dm.BrickMetadata{};olympe.sc.si.O=olympe.dc.ya.C('016324fde11a836f76c2',olympe.sc.si);let $i=null;
874
875
  function aj(a,b){$i=a;(new olympe.dc.kf(a,olympe.dc.Ed.Li)).sb(olympe.sc.Ma.Me.C).sb(olympe.sc.md.F.Gc()).hb((c,d)=>{if(c)olympe.ra.Xa('sc').error('Error while loading business container:',c.message),b(olympe.sc.md.C.uc);else{c=null;for(const [e,f]of d.Dc.ld())e===olympe.sc.md.F.R()&&(c=f);null!==c?$e(Ve(new olympe.dc.kf(c),olympe.dc.Ub.tf),(e,f)=>{const g=olympe.dc.kc.Xc,h=olympe.dc.kc.xi,k=f.R();f=f.Pa();return olympe.dc.Oa().qh(e,olympe.sc.si)&&f===olympe.dc.Aa.ORIGIN&&(k===g||k===h)}).hb(()=>
875
- b(olympe.sc.md.C.Gp)):(olympe.ra.Xa('sc').error('No container found for the application',a),b(olympe.sc.md.C.am))}})}olympe.sc.md=class extends olympe.dc.CloudObject{};olympe.sc.md.C={Gp:0,am:1,uc:2};olympe.sc.md.O=olympe.dc.ya.C('017b3aa8fae1e3d044dc',olympe.sc.md);olympe.sc.md.F=olympe.sc.md.O.Ha('017b3aa8fd1659291b92');olympe.sc.md.L=olympe.sc.md.O.Ha('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.CloudObject{};olympe.sc.Map.O=olympe.dc.ya.C('018119241abce0e5696e',olympe.sc.Map);olympe.sc.Wg=class extends olympe.sc.Map{};olympe.sc.Wg.O=olympe.dc.ya.C('01631aacd8276ea98490',olympe.sc.Wg);olympe.sc.$j=class extends olympe.dm.File{L(){const a=olympe.D.Uc(olympe.D.Wa);this.Sk(b=>{a.update(olympe.D.Bb(b))});return a.Fb()}};olympe.sc.$j.O=Dc('01644b6297305d62fca2',olympe.sc.$j);olympe.sc.$j.prototype.L.K=olympe.D.J.F;olympe.sc.td=class extends olympe.dm.File{L(){return this.Gb(olympe.sc.td.F)}U(){return this.Gb(olympe.sc.td.L)}Y(){return this.He(olympe.sc.td.aa)}};olympe.sc.td.O=Dc('01647e113043c637b541',olympe.sc.td);olympe.sc.td.F=olympe.sc.td.O.va('01647e35ecd24ef0b88d');olympe.sc.td.L=olympe.sc.td.O.va('01647e677f5d1cfbdf42');olympe.sc.td.aa=olympe.sc.td.O.va('01647e6780999bf8bd25');olympe.sc.td.prototype.L.K=olympe.D.J.F;olympe.sc.td.prototype.U.K=olympe.D.J.F;olympe.sc.td.prototype.Y.K=olympe.D.J.G;olympe.sc.zm=class extends olympe.dm.File{};olympe.sc.zm.O=Dc('0164643c432146a71d5c',olympe.sc.zm);olympe.sc.sr=class extends olympe.dc.CloudObject{};olympe.sc.sr.O=olympe.dc.ya.C('016421bb3797e22d1c4e',olympe.sc.sr);olympe.sc.logic={};olympe.sc.logic.gp=(a,b)=>a===b?0:a>b?1:-1;
876
- olympe.sc.logic.jA=(a,b,c,d,e,f,g)=>{const h=b.R();b=olympe.D.bb(b.C().R());let k,l;if(b===olympe.dc.wa(olympe.dm.String))k=c.valueOf().toLowerCase(),l=p=>p.Gb(h).toLowerCase();else if(b===olympe.dc.wa(olympe.dm.Number))k=c.valueOf(),l=p=>p.He(h);else if(b===olympe.dc.wa(olympe.dm.DateTime))k=c.getTime(),l=p=>olympe.D.Fa([p.jj(h)],q=>q.getTime(),Number,'FilterList Date&DateTime TransformFlows');else{c=olympe.dc.Oa().name(b);g.warn(`Properties of type ${c} are not supported. List will not be filtered.`);e(a);
876
+ b(olympe.sc.md.C.Hp)):(olympe.ra.Xa('sc').error('No container found for the application',a),b(olympe.sc.md.C.am))}})}olympe.sc.md=class extends olympe.dc.CloudObject{};olympe.sc.md.C={Hp:0,am:1,uc:2};olympe.sc.md.O=olympe.dc.ya.C('017b3aa8fae1e3d044dc',olympe.sc.md);olympe.sc.md.F=olympe.sc.md.O.Ha('017b3aa8fd1659291b92');olympe.sc.md.L=olympe.sc.md.O.Ha('017b3aa8fe7ec3fd52f2');olympe.sc.Map=class extends olympe.dc.CloudObject{};olympe.sc.Map.O=olympe.dc.ya.C('018119241abce0e5696e',olympe.sc.Map);olympe.sc.Wg=class extends olympe.sc.Map{};olympe.sc.Wg.O=olympe.dc.ya.C('01631aacd8276ea98490',olympe.sc.Wg);olympe.sc.$j=class extends olympe.dm.File{L(){const a=olympe.D.Uc(olympe.D.Wa);this.Sk(b=>{a.update(olympe.D.Bb(b))});return a.Fb()}};olympe.sc.$j.O=Dc('01644b6297305d62fca2',olympe.sc.$j);olympe.sc.$j.prototype.L.K=olympe.D.J.F;olympe.sc.td=class extends olympe.dm.File{L(){return this.Gb(olympe.sc.td.F)}U(){return this.Gb(olympe.sc.td.L)}Y(){return this.He(olympe.sc.td.aa)}};olympe.sc.td.O=Dc('01647e113043c637b541',olympe.sc.td);olympe.sc.td.F=olympe.sc.td.O.va('01647e35ecd24ef0b88d');olympe.sc.td.L=olympe.sc.td.O.va('01647e677f5d1cfbdf42');olympe.sc.td.aa=olympe.sc.td.O.va('01647e6780999bf8bd25');olympe.sc.td.prototype.L.K=olympe.D.J.F;olympe.sc.td.prototype.U.K=olympe.D.J.F;olympe.sc.td.prototype.Y.K=olympe.D.J.G;olympe.sc.zm=class extends olympe.dm.File{};olympe.sc.zm.O=Dc('0164643c432146a71d5c',olympe.sc.zm);olympe.sc.tr=class extends olympe.dc.CloudObject{};olympe.sc.tr.O=olympe.dc.ya.C('016421bb3797e22d1c4e',olympe.sc.tr);olympe.sc.logic={};olympe.sc.logic.gp=(a,b)=>a===b?0:a>b?1:-1;
877
+ olympe.sc.logic.kA=(a,b,c,d,e,f,g)=>{const h=b.R();b=olympe.D.bb(b.C().R());let k,l;if(b===olympe.dc.wa(olympe.dm.String))k=c.valueOf().toLowerCase(),l=p=>p.Gb(h).toLowerCase();else if(b===olympe.dc.wa(olympe.dm.Number))k=c.valueOf(),l=p=>p.He(h);else if(b===olympe.dc.wa(olympe.dm.DateTime))k=c.getTime(),l=p=>olympe.D.Fa([p.jj(h)],q=>q.getTime(),Number,'FilterList Date&DateTime TransformFlows');else{c=olympe.dc.Oa().name(b);g.warn(`Properties of type ${c} are not supported. List will not be filtered.`);e(a);
877
878
  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.vg().filter(p=>olympe.D.Fa([l(p)],q=>{q=n(q.valueOf(),k);return olympe.D.Cc(d.valueOf()?1===q:0<=q)},olympe.D.qa,'FilterList ListDefBuilder Filter TransformFlows')).pf())};
878
- olympe.sc.logic.EC=(a,b)=>{if(a instanceof olympe.D.ea)return a;if(a instanceof olympe.D.Wa)return a.ps();if(a instanceof olympe.D.qa)return a.Sr();if('string'===typeof a||'number'===typeof a)return olympe.D.za(Number(a));b.error(`Could not parse provided value ${a} into a number`);return olympe.D.ea.Tp};olympe.sc.logic.ta={};olympe.sc.logic.ta.To=class{constructor(a,b,c){this.O=olympe.dc.ya.C(a,b,...c)}R(){return this.O.R()}};olympe.sc.logic.ta.To.la=[olympe.dc.ze];const bj=Object.create(null),cj=new Map;function dj(a){if(void 0===bj[a])throw Error(`Tag: ${a} - does not correspond to a registered function`);return Fc(a)}function ej(a,b,c=olympe.sc.logic.Function){if(cj.has(a))throw c=dj(a),Error(`Tag: ${a} - overwriting existing function definition "${c.name}" with "${b.name}"`);const d=olympe.dc.ya.C(a,b,...[]);cj.set(a,{O:d,QC:b,DC:c});return d}
879
- olympe.sc.logic.ya=class{constructor(){}static C(a,b,...c){if(bj[a])throw c=dj(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.ta.To(a,b,[olympe.sc.P.Ea].concat(c));return bj[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.cs=b}static create(a,b){return new olympe.sc.logic.Error(b,a)}Lw(){return this.cs}mw(){return this.code}};z('olympe.sc.logic.Error',olympe.sc.logic.Error);olympe.sc.logic.Error.prototype.getCode=olympe.sc.logic.Error.prototype.mw;olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.Lw;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;
880
- olympe.sc.logic.Qj=class extends olympe.sc.logic.Lj{static create(a,b){return new olympe.sc.logic.Error(b,a)}};olympe.sc.logic.Qj.O=olympe.dc.ya.C('016eeb5ede9f3094d8f0',olympe.sc.logic.Qj);olympe.sc.logic.le=class extends olympe.dc.CloudObject{C(){return this.qc(olympe.sc.logic.le.C,olympe.dc.CloudObject)}};olympe.sc.logic.le.O=olympe.dc.ya.C('016ac4f59ee8ea2081ba',olympe.sc.logic.le);olympe.sc.logic.le.L=olympe.sc.logic.le.O.va('017bc044aeacce7ffc8f');olympe.sc.logic.le.C=olympe.sc.logic.le.O.Ha('016ac4f5a0091c4790e2');P(olympe.dc.CloudObject.O,olympe.sc.logic.le.C);olympe.sc.logic.le.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Mi=class extends olympe.sc.logic.le{};olympe.sc.logic.Mi.O=olympe.dc.ya.C('016ac4f59c592b862457',olympe.sc.logic.Mi);olympe.sc.logic.Mi.F=olympe.sc.ne.C.Gc();olympe.sc.logic.Lh=class extends olympe.sc.logic.le{};olympe.sc.logic.Lh.O=olympe.dc.ya.C('016ac4f59dd99f5df3e1',olympe.sc.logic.Lh);olympe.sc.logic.Lh.F=P(olympe.sc.logic.Lh.O,olympe.sc.ne.F);olympe.sc.logic.xe=class extends olympe.sc.pb{C(){return olympe.sc.Ie.sg.Mq}ka(){return this.cn().vg().qh([olympe.sc.logic.Function]).and().not().qh([olympe.sc.logic.Vd,olympe.sc.logic.Yd]).pf()}Ew(){return this.Tl().vg().kj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Mi.F]).pf()}Fw(){return this.bk().vg().kj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Lh.F]).pf()}de(a){const b=this.db.$m(this,[olympe.sc.pb.F],c=>this.db.model(c)===olympe.dc.wa(a));return b?olympe.dc.CloudObject.get(b):null}Jf(a){const b=
881
- this.db.$m(this,[olympe.sc.pb.L],c=>this.db.model(c)===olympe.dc.wa(a));return b?olympe.dc.CloudObject.get(b):null}kx(){return this.Tl().vg().kj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Db).pf()}lx(){return this.bk().vg().kj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Rb).pf()}};ej('01621fb84e320000f000',olympe.sc.logic.xe,olympe.sc.logic.Function);m=olympe.sc.logic.xe.prototype;m.Ew.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.Fw.K=new olympe.D.J(()=>olympe.dc.Ca,[]);
882
- m.de.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.Jf.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.kx.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.lx.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.sc.logic.ag=class extends olympe.sc.logic.xe{F(){return this.de('016ac63229782039429f')}G(){return this.Jf('016ac6322acf67eebfe7')}L(){return this.bk().vg().sb(olympe.sc.logic.Kc.typeRel).Wk(olympe.sc.logic.Qj).pf().nf().nn(olympe.D.ea.ZERO)}};olympe.sc.logic.ag.C='016ac63229782039429f';olympe.sc.logic.ag.oa='016ac6322acf67eebfe7';olympe.sc.logic.ag.O=ej('01621fb84e320000a000',olympe.sc.logic.ag,olympe.sc.logic.Action);
883
- olympe.sc.logic.ag.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.logic.ag.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.ag.prototype.L.K=olympe.D.J.U;olympe.sc.logic.po=class extends olympe.sc.logic.xe{};olympe.sc.logic.po.O=ej('01621fb84e320000f011',olympe.sc.logic.po);olympe.sc.logic.oo=class extends olympe.sc.logic.ag{};olympe.sc.logic.oo.O=ej('01621fb84e320000f012',olympe.sc.logic.oo);olympe.sc.logic.Function=class extends olympe.sc.Runnable{L(){return[this.ac]}Y(){const a=olympe.sc.Ta.cc.tt,b=olympe.sc.Ta.cc.tu,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}F(a){return this.getOutputs().map(b=>this.db.$k(b,olympe.sc.logic.Kc.typeRel,olympe.sc.logic.Lj)?a.li.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=>
879
+ olympe.sc.logic.FC=(a,b)=>{if(a instanceof olympe.D.ea)return a;if(a instanceof olympe.D.Wa)return a.qs();if(a instanceof olympe.D.qa)return a.Tr();if('string'===typeof a||'number'===typeof a)return olympe.D.za(Number(a));b.error(`Could not parse provided value ${a} into a number`);return olympe.D.ea.Up};olympe.sc.logic.ta={};olympe.sc.logic.ta.To=class{constructor(a,b,c){this.O=olympe.dc.ya.C(a,b,...c)}R(){return this.O.R()}};olympe.sc.logic.ta.To.la=[olympe.dc.ze];const bj=Object.create(null),cj=new Map;function dj(a){if(void 0===bj[a])throw Error(`Tag: ${a} - does not correspond to a registered function`);return Fc(a)}function ej(a,b,c=olympe.sc.logic.Function){if(cj.has(a))throw c=dj(a),Error(`Tag: ${a} - overwriting existing function definition "${c.name}" with "${b.name}"`);const d=olympe.dc.ya.C(a,b,...[]);cj.set(a,{O:d,RC:b,EC:c});return d}
880
+ olympe.sc.logic.ya=class{constructor(){}static C(a,b,...c){if(bj[a])throw c=dj(a),Error(`Tag: ${a} - overwriting already defined function "${c.name}" with "${b.name}"`);b=new olympe.sc.logic.ta.To(a,b,[olympe.sc.P.Ea].concat(c));return bj[a]=b}};olympe.sc.logic.jz=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.ds=b}static create(a,b){return new olympe.sc.logic.Error(b,a)}Mw(){return this.ds}nw(){return this.code}};z('olympe.sc.logic.Error',olympe.sc.logic.Error);olympe.sc.logic.Error.prototype.getCode=olympe.sc.logic.Error.prototype.nw;olympe.sc.logic.Error.prototype.getMessage=olympe.sc.logic.Error.prototype.Mw;olympe.sc.logic.Error.create=olympe.sc.logic.Error.create;
881
+ olympe.sc.logic.Qj=class extends olympe.sc.logic.Lj{static create(a,b){return new olympe.sc.logic.Error(b,a)}};olympe.sc.logic.Qj.O=olympe.dc.ya.C('016eeb5ede9f3094d8f0',olympe.sc.logic.Qj);olympe.sc.logic.le=class extends olympe.dc.CloudObject{C(){return this.qc(olympe.sc.logic.le.C,olympe.dc.CloudObject)}};olympe.sc.logic.le.O=olympe.dc.ya.C('016ac4f59ee8ea2081ba',olympe.sc.logic.le);olympe.sc.logic.le.L=olympe.sc.logic.le.O.va('017bc044aeacce7ffc8f');olympe.sc.logic.le.C=olympe.sc.logic.le.O.Ha('016ac4f5a0091c4790e2');P(olympe.dc.CloudObject.O,olympe.sc.logic.le.C);olympe.sc.logic.le.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Mi=class extends olympe.sc.logic.le{};olympe.sc.logic.Mi.O=olympe.dc.ya.C('016ac4f59c592b862457',olympe.sc.logic.Mi);olympe.sc.logic.Mi.F=olympe.sc.ne.C.Gc();olympe.sc.logic.Lh=class extends olympe.sc.logic.le{};olympe.sc.logic.Lh.O=olympe.dc.ya.C('016ac4f59dd99f5df3e1',olympe.sc.logic.Lh);olympe.sc.logic.Lh.F=P(olympe.sc.logic.Lh.O,olympe.sc.ne.F);olympe.sc.logic.xe=class extends olympe.sc.pb{C(){return olympe.sc.Ie.sg.Nq}ja(){return this.cn().vg().qh([olympe.sc.logic.Function]).and().not().qh([olympe.sc.logic.Vd,olympe.sc.logic.Yd]).pf()}Fw(){return this.Tl().vg().kj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Mi.F]).pf()}Gw(){return this.bk().vg().kj([olympe.dc.CloudObject.modelRel,olympe.sc.logic.Lh.F]).pf()}de(a){const b=this.db.$m(this,[olympe.sc.pb.F],c=>this.db.model(c)===olympe.dc.wa(a));return b?olympe.dc.CloudObject.get(b):null}Jf(a){const b=
882
+ this.db.$m(this,[olympe.sc.pb.L],c=>this.db.model(c)===olympe.dc.wa(a));return b?olympe.dc.CloudObject.get(b):null}lx(){return this.Tl().vg().kj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Db).pf()}mx(){return this.bk().vg().kj([olympe.dc.CloudObject.modelRel],olympe.sc.logic.Rb).pf()}};ej('01621fb84e320000f000',olympe.sc.logic.xe,olympe.sc.logic.Function);m=olympe.sc.logic.xe.prototype;m.Fw.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.Gw.K=new olympe.D.J(()=>olympe.dc.Ca,[]);
883
+ m.de.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.Jf.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.lx.K=new olympe.D.J(()=>olympe.dc.Ca,[]);m.mx.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.sc.logic.ag=class extends olympe.sc.logic.xe{F(){return this.de('016ac63229782039429f')}G(){return this.Jf('016ac6322acf67eebfe7')}L(){return this.bk().vg().sb(olympe.sc.logic.Kc.typeRel).Wk(olympe.sc.logic.Qj).pf().nf().nn(olympe.D.ea.ZERO)}};olympe.sc.logic.ag.C='016ac63229782039429f';olympe.sc.logic.ag.oa='016ac6322acf67eebfe7';olympe.sc.logic.ag.O=ej('01621fb84e320000a000',olympe.sc.logic.ag,olympe.sc.logic.Action);
884
+ olympe.sc.logic.ag.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.logic.ag.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.ag.prototype.L.K=olympe.D.J.U;olympe.sc.logic.po=class extends olympe.sc.logic.xe{};olympe.sc.logic.po.O=ej('01621fb84e320000f011',olympe.sc.logic.po);olympe.sc.logic.oo=class extends olympe.sc.logic.ag{};olympe.sc.logic.oo.O=ej('01621fb84e320000f012',olympe.sc.logic.oo);olympe.sc.logic.Function=class extends olympe.sc.Runnable{L(){return[this.ac]}Y(){const a=olympe.sc.Ta.cc.ut,b=olympe.sc.Ta.cc.uu,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}F(a){return this.getOutputs().map(b=>this.db.$k(b,olympe.sc.logic.Kc.typeRel,olympe.sc.logic.Lj)?a.li.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=>
884
885
  c.includes(null)?null:c)):rxjs.of([])}};olympe.sc.logic.Function.O=olympe.dc.ya.C('0168c6f020f2a96f0000',olympe.sc.logic.Function,olympe.sc.P.Ea);olympe.sc.logic.Kc=class extends olympe.dc.CloudObject{C(){return this.qc(olympe.sc.logic.Kc.typeRel,olympe.dc.CloudObject)}F(){return this.He(olympe.sc.logic.Kc.C)}};olympe.sc.logic.Kc.O=olympe.dc.ya.C('0168a431d25001540000',olympe.sc.logic.Kc);olympe.sc.logic.Kc.C=olympe.sc.logic.Kc.O.va('01740c5d4ae4b520dd01');olympe.sc.logic.Kc.typeRel=olympe.sc.logic.Kc.O.Ha('0168a431d3b9b7438424');P(olympe.dc.CloudObject.O,olympe.sc.logic.Kc.typeRel);
885
- olympe.sc.logic.Kc.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Kc.prototype.F.K=olympe.D.J.G;olympe.sc.logic.Db=class extends olympe.sc.logic.Kc{};olympe.sc.logic.Db.O=olympe.dc.ya.C('0168a431d25001540001',olympe.sc.logic.Db);olympe.sc.logic.Db.oa=olympe.sc.logic.Kc.O.va('01740c5d4ae4b520dd02');olympe.sc.logic.Db.ka=P(olympe.sc.logic.Db.O,olympe.sc.pb.F);olympe.sc.logic.Db.F=olympe.sc.logic.Db.O.Ha('0168a431d91f2578000b',olympe.dc.Aa.ORIGIN);olympe.sc.logic.Db.L=olympe.sc.logic.Db.O.Ha('01621fb84e32000000a1',olympe.dc.Aa.ORIGIN);
886
- olympe.sc.logic.Db.aa=olympe.sc.logic.Db.O.Ha('01621fb84e32000000d1',olympe.dc.Aa.ORIGIN);olympe.sc.logic.Rb=class extends olympe.sc.logic.Kc{};olympe.sc.logic.Rb.O=olympe.dc.ya.C('0168a431d25001540002',olympe.sc.logic.Rb);olympe.sc.logic.Rb.ka=P(olympe.sc.logic.Rb.O,olympe.sc.pb.L);olympe.sc.logic.Rb.F=olympe.sc.logic.Rb.O.Ha('0168a431d91f25780003',olympe.dc.Aa.ORIGIN);olympe.sc.logic.Rb.aa=olympe.sc.logic.Rb.O.Ha('01621fb84e32000000a2',olympe.dc.Aa.ORIGIN);olympe.sc.logic.Rb.L=olympe.sc.logic.Rb.O.Ha('01621fb84e32000000d2',olympe.dc.Aa.ORIGIN);olympe.sc.logic.Action=class extends olympe.sc.logic.Function{setupExecution(a){const b=this.Pd().F().R();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.P.Ea);olympe.sc.logic.Vd=class extends olympe.sc.logic.Function{run(a){this.cf(a);const b=a.getParent(),c=this.db.hc(this,olympe.sc.logic.Vd.C),d=this.db.hc(this,olympe.sc.logic.Vd.G);a.on(c,e=>b.set(d,e),this.tag)}U(){return this.qc(olympe.sc.logic.Vd.C,olympe.sc.logic.Db)}ab(){return this.qc(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.P.Ea);olympe.sc.logic.Vd.C=P(olympe.sc.logic.Vd.O,olympe.sc.logic.Db.L);
886
+ olympe.sc.logic.Kc.prototype.C.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);olympe.sc.logic.Kc.prototype.F.K=olympe.D.J.G;olympe.sc.logic.Db=class extends olympe.sc.logic.Kc{};olympe.sc.logic.Db.O=olympe.dc.ya.C('0168a431d25001540001',olympe.sc.logic.Db);olympe.sc.logic.Db.oa=olympe.sc.logic.Kc.O.va('01740c5d4ae4b520dd02');olympe.sc.logic.Db.ja=P(olympe.sc.logic.Db.O,olympe.sc.pb.F);olympe.sc.logic.Db.F=olympe.sc.logic.Db.O.Ha('0168a431d91f2578000b',olympe.dc.Aa.ORIGIN);olympe.sc.logic.Db.L=olympe.sc.logic.Db.O.Ha('01621fb84e32000000a1',olympe.dc.Aa.ORIGIN);
887
+ olympe.sc.logic.Db.aa=olympe.sc.logic.Db.O.Ha('01621fb84e32000000d1',olympe.dc.Aa.ORIGIN);olympe.sc.logic.Rb=class extends olympe.sc.logic.Kc{};olympe.sc.logic.Rb.O=olympe.dc.ya.C('0168a431d25001540002',olympe.sc.logic.Rb);olympe.sc.logic.Rb.ja=P(olympe.sc.logic.Rb.O,olympe.sc.pb.L);olympe.sc.logic.Rb.F=olympe.sc.logic.Rb.O.Ha('0168a431d91f25780003',olympe.dc.Aa.ORIGIN);olympe.sc.logic.Rb.aa=olympe.sc.logic.Rb.O.Ha('01621fb84e32000000a2',olympe.dc.Aa.ORIGIN);olympe.sc.logic.Rb.L=olympe.sc.logic.Rb.O.Ha('01621fb84e32000000d2',olympe.dc.Aa.ORIGIN);olympe.sc.logic.Action=class extends olympe.sc.logic.Function{setupExecution(a){const b=this.Pd().F().R();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.P.Ea);olympe.sc.logic.Vd=class extends olympe.sc.logic.Function{run(a){this.cf(a);const b=a.getParent(),c=this.db.hc(this,olympe.sc.logic.Vd.C),d=this.db.hc(this,olympe.sc.logic.Vd.G);a.on(c,e=>b.set(d,e),this.tag)}U(){return this.qc(olympe.sc.logic.Vd.C,olympe.sc.logic.Db)}ab(){return this.qc(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.P.Ea);olympe.sc.logic.Vd.C=P(olympe.sc.logic.Vd.O,olympe.sc.logic.Db.L);
887
888
  olympe.sc.logic.Vd.G=P(olympe.sc.logic.Vd.O,olympe.sc.logic.Rb.aa);olympe.sc.logic.Vd.prototype.U.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.logic.Vd.prototype.ab.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.Yd=class extends olympe.sc.logic.Function{run(a){const b=a.getParent(),c=this.db.hc(this,olympe.sc.logic.Yd.G),d=this.db.hc(this,olympe.sc.logic.Yd.C);b.on(c,e=>a.set(d,e),b.Z())}ab(){return this.qc(olympe.sc.logic.Yd.G,olympe.sc.logic.Db)}U(){return this.qc(olympe.sc.logic.Yd.C,olympe.sc.logic.Rb)}};olympe.sc.logic.Yd.O=olympe.dc.ya.C('01621fb84e32000000d0',olympe.sc.logic.Yd,olympe.sc.P.Ea);olympe.sc.logic.Yd.G=P(olympe.sc.logic.Yd.O,olympe.sc.logic.Db.aa);
888
- olympe.sc.logic.Yd.C=P(olympe.sc.logic.Yd.O,olympe.sc.logic.Rb.L);olympe.sc.logic.Yd.prototype.ab.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.logic.Yd.prototype.U.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.xb=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.N=c;this.C=`detachObject${this.tag}`}cf(a,b){const c=this.db.hc(this,olympe.sc.logic.xb.oa)||this.db.hc(this,olympe.sc.logic.xb.aa),d=this.db.hc(this,olympe.sc.logic.xb.ka),e=this.db.Tf((()=>{let h=null,k=this.db.hc(this,olympe.sc.logic.xb.F);k?h=this.db.hc(k,olympe.dm.Property.typeRel):(k=this.db.hc(this,olympe.sc.logic.xb.C))&&(h=this.db.hc(k,olympe.sc.logic.Kc.typeRel));return h||olympe.dc.CloudObject.O.R()})(),
889
+ olympe.sc.logic.Yd.C=P(olympe.sc.logic.Yd.O,olympe.sc.logic.Rb.L);olympe.sc.logic.Yd.prototype.ab.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.logic.Yd.prototype.U.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.xb=class extends olympe.dc.CloudObject{constructor(a,b,c){super(a,b);this.N=c;this.C=`detachObject${this.tag}`}cf(a,b){const c=this.db.hc(this,olympe.sc.logic.xb.oa)||this.db.hc(this,olympe.sc.logic.xb.aa),d=this.db.hc(this,olympe.sc.logic.xb.ja),e=this.db.Tf((()=>{let h=null,k=this.db.hc(this,olympe.sc.logic.xb.F);k?h=this.db.hc(k,olympe.dm.Property.typeRel):(k=this.db.hc(this,olympe.sc.logic.xb.C))&&(h=this.db.hc(k,olympe.sc.logic.Kc.typeRel));return h||olympe.dc.CloudObject.O.R()})(),
889
890
  olympe.dm.rf)?new olympe.D.Xb('Pipe Context'):null,f=this.F.bind(this,a,b,e);if(null!==c&&null!==d){let h;const k=a.tj(d,l=>{h&&h();h=l.on(c,f,d)});return()=>{f(null);k();h&&h()}}const g=wd(this.db,this,olympe.sc.logic.xb.valueProp,f);return()=>{f(null);this.db.F(this,olympe.sc.logic.xb.valueProp,g)}}F(a,b,c,d){null!==c&&c.aa();const e=a.get(this.C);e&&(e(),a.remove(this.C));const f=olympe.sc.hh(d);if(f instanceof olympe.dc.CloudObject){if(d=f.R(),this.Mk(a,d,[d]),null!==c&&'function'===typeof f.getValue){c.run(()=>
890
- {olympe.D.Ec([f.getValue()],g=>{b(g.valueOf())})});return}}else f instanceof olympe.dc.Va&&this.Mk(a,`qr-${f.hash}`,ze(f));b(f)}Mk(a,b,c){const d=a.getParent();d.Mk(b,c);a.set(this.C,()=>Pi(d,b))}getValue(a){return this.Of(olympe.sc.logic.xb.valueProp,a||olympe.dc.W.Vb.hh,Object)}Nt(){const a=this.transform(olympe.sc.logic.xb.C,olympe.sc.logic.Kc.typeRel);a.Gd(olympe.dc.CloudObject);return a.Sc()}ix(){return this.qc(olympe.sc.logic.xb.ka,olympe.dc.CloudObject)}gx(){return this.qc(olympe.sc.logic.xb.oa,
891
- olympe.sc.logic.Rb)}hx(){return this.qc(olympe.sc.logic.xb.aa,olympe.dm.Property)}ww(){return this.qc(olympe.sc.logic.xb.L,olympe.dc.CloudObject)}uw(){return this.qc(olympe.sc.logic.xb.C,olympe.sc.logic.Db)}vw(){return this.qc(olympe.sc.logic.xb.F,olympe.dm.Property)}};olympe.sc.logic.xb.O=olympe.dc.ya.C('0168a431d91f25780000',olympe.sc.logic.xb,olympe.sc.P.Ea);olympe.sc.logic.xb.valueProp=olympe.sc.logic.xb.O.va('0168a431d91f25780001');olympe.sc.logic.xb.ka=olympe.sc.logic.xb.O.Ha('0168a431d91f25780002');
892
- olympe.sc.logic.xb.oa=P(olympe.sc.logic.xb.O,olympe.sc.logic.Rb.F);olympe.sc.logic.xb.aa=olympe.sc.logic.xb.O.Ha('0168a431d91f25780004');olympe.sc.logic.xb.L=olympe.sc.logic.xb.O.Ha('0168a431d91f2578000a');olympe.sc.logic.xb.C=P(olympe.sc.logic.xb.O,olympe.sc.logic.Db.F);olympe.sc.logic.xb.F=olympe.sc.logic.xb.O.Ha('0168a431d91f2578000c');P(olympe.dc.CloudObject.O,olympe.sc.logic.xb.ka);P(olympe.dm.Property.O,olympe.sc.logic.xb.aa);P(olympe.dc.CloudObject.O,olympe.sc.logic.xb.L);
893
- P(olympe.dm.Property.O,olympe.sc.logic.xb.F);m=olympe.sc.logic.xb.prototype;m.Nt.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.ix.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.gx.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.hx.K=new olympe.D.J(()=>olympe.dm.Property,[]);m.ww.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.uw.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.vw.K=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.Ha('017dc8d6d8ef9135f08a');olympe.sc.logic.Xd.G=olympe.sc.logic.Xd.O.Ha('017dc8d6d8ef9135f08b');P(olympe.dm.Nb.O,olympe.sc.logic.Xd.G);function fj(a,b){const c=a.Pd(),d=c.Ul().R(),e=c.Vl().R(),f=c.Wl().R();b.on(d,g=>{g&&(g=new Map(a.getInputs().map(h=>[h,b.get(h)])),g=olympe.sc.logic.uk.ia(g),olympe.H.Ba.nb.zb.get(a.Tb(),g).then(h=>{h=gj(h,a.U.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.Qj.create(h.toString(),1))}))},b.Z())}
891
+ {olympe.D.Ec([f.getValue()],g=>{b(g.valueOf())})});return}}else f instanceof olympe.dc.Va&&this.Mk(a,`qr-${f.hash}`,ze(f));b(f)}Mk(a,b,c){const d=a.getParent();d.Mk(b,c);a.set(this.C,()=>Pi(d,b))}getValue(a){return this.Of(olympe.sc.logic.xb.valueProp,a||olympe.dc.W.Vb.hh,Object)}Ot(){const a=this.transform(olympe.sc.logic.xb.C,olympe.sc.logic.Kc.typeRel);a.Gd(olympe.dc.CloudObject);return a.Sc()}jx(){return this.qc(olympe.sc.logic.xb.ja,olympe.dc.CloudObject)}hx(){return this.qc(olympe.sc.logic.xb.oa,
892
+ olympe.sc.logic.Rb)}ix(){return this.qc(olympe.sc.logic.xb.aa,olympe.dm.Property)}xw(){return this.qc(olympe.sc.logic.xb.L,olympe.dc.CloudObject)}vw(){return this.qc(olympe.sc.logic.xb.C,olympe.sc.logic.Db)}ww(){return this.qc(olympe.sc.logic.xb.F,olympe.dm.Property)}};olympe.sc.logic.xb.O=olympe.dc.ya.C('0168a431d91f25780000',olympe.sc.logic.xb,olympe.sc.P.Ea);olympe.sc.logic.xb.valueProp=olympe.sc.logic.xb.O.va('0168a431d91f25780001');olympe.sc.logic.xb.ja=olympe.sc.logic.xb.O.Ha('0168a431d91f25780002');
893
+ olympe.sc.logic.xb.oa=P(olympe.sc.logic.xb.O,olympe.sc.logic.Rb.F);olympe.sc.logic.xb.aa=olympe.sc.logic.xb.O.Ha('0168a431d91f25780004');olympe.sc.logic.xb.L=olympe.sc.logic.xb.O.Ha('0168a431d91f2578000a');olympe.sc.logic.xb.C=P(olympe.sc.logic.xb.O,olympe.sc.logic.Db.F);olympe.sc.logic.xb.F=olympe.sc.logic.xb.O.Ha('0168a431d91f2578000c');P(olympe.dc.CloudObject.O,olympe.sc.logic.xb.ja);P(olympe.dm.Property.O,olympe.sc.logic.xb.aa);P(olympe.dc.CloudObject.O,olympe.sc.logic.xb.L);
894
+ P(olympe.dm.Property.O,olympe.sc.logic.xb.F);m=olympe.sc.logic.xb.prototype;m.Ot.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.jx.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.hx.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.ix.K=new olympe.D.J(()=>olympe.dm.Property,[]);m.xw.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);m.vw.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.ww.K=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.Ha('017dc8d6d8ef9135f08a');olympe.sc.logic.Xd.G=olympe.sc.logic.Xd.O.Ha('017dc8d6d8ef9135f08b');P(olympe.dm.Nb.O,olympe.sc.logic.Xd.G);function fj(a,b){const c=a.Pd(),d=c.Ul().R(),e=c.Vl().R(),f=c.Wl().R();b.on(d,g=>{g&&(g=new Map(a.getInputs().map(h=>[h,b.get(h)])),g=olympe.sc.logic.uk.ia(g),olympe.H.Ba.nb.zb.get(a.Tb(),g).then(h=>{h=gj(h,a.U.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.Qj.create(h.toString(),1))}))},b.Z())}
894
895
  function hj(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.uk.ia(p);f.Le(q).finally(()=>b.destroy())}catch(p){n=Error(`Error while serializing the response from remote action ${a.Tb()}: ${p.message}`),f.xg(n).finally(()=>b.destroy())}}},h=b.Z(),k=b.on(c,g,h),l=b.on(d,g,h)}
895
- olympe.sc.logic.Mh=class extends olympe.sc.logic.Function{constructor(a,b,c,d,e){super(a,b,c);this.ab=d;this.timeout=e}run(a){a.pn()||(this.db.fb(this,olympe.sc.logic.Mh.C)?this.wc(a):(this.cf(a),fj(this,a)))}wc(a){const b=this.Tb(),c=this.Pd(),d=c.Bp().R(),e=c.Ul().R(),f=c.Vl().R(),g=c.Wl().R();(new olympe.H.Ba.nb.zb(b,a)).listen().subscribe(rxjs.Subscriber.create(h=>{const k=a.Xh('remote call'),l=gj(h.body(),this.U.bind(this,k)),n=Hb(()=>{h.xg(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`));
896
+ olympe.sc.logic.Mh=class extends olympe.sc.logic.Function{constructor(a,b,c,d,e){super(a,b,c);this.ab=d;this.timeout=e}run(a){a.pn()||(this.db.fb(this,olympe.sc.logic.Mh.C)?this.wc(a):(this.cf(a),fj(this,a)))}wc(a){const b=this.Tb(),c=this.Pd(),d=c.Cp().R(),e=c.Ul().R(),f=c.Vl().R(),g=c.Wl().R();(new olympe.H.Ba.nb.zb(b,a)).listen().subscribe(rxjs.Subscriber.create(h=>{const k=a.Xh('remote call'),l=gj(h.body(),this.U.bind(this,k)),n=Hb(()=>{h.xg(Error(`Timeout reached on remote action ${this.db.name(this)} (${this.tag})`));
896
897
  k.destroy()},this.timeout);hj(this,k,f,g,n,h);super.run(k);for(const [p,q]of l)p!==e&&k.set(p,q);h.Bj().then(p=>{var q=k.get(d);null!==q&&olympe.dc.wa(q)!==p&&(q=this.Tb(),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))})},h=>{const k=this.Tb();this.N.error(`Error while listening on remote action ${this.db.name(k)} (${k}): ${h.message}`)}))}U(a,b){const c=Array.from(b.ee()).map(d=>d.tag());
897
- Jc(this.ab,a.xc(),b,[],c)}};olympe.sc.logic.Mh.O=olympe.dc.ya.C('017a7b0c5dcbd8964c5d',olympe.sc.logic.Mh,olympe.sc.P.Ea,olympe.dc.db.P.xa,new olympe.T.fa(olympe.sc.Config.Cq));olympe.sc.logic.Mh.C=olympe.sc.logic.Mh.O.va('017a7b0c62a02a89444f');function gj(a,b){var c=(new olympe.dc.W.Ki(olympe.dc.Ga.Pc)).C(a.p||[]);b&&b(c);c=new Map;for(const [d,e]of Object.entries(a.v||{}))c.set(d,ij(olympe.sc.logic.uk,e,b));return c}function jj(a){a.Dc=new olympe.dc.db.Ac;a.values=Object.create(null)}
898
+ Jc(this.ab,a.xc(),b,[],c)}};olympe.sc.logic.Mh.O=olympe.dc.ya.C('017a7b0c5dcbd8964c5d',olympe.sc.logic.Mh,olympe.sc.P.Ea,olympe.dc.db.P.xa,new olympe.T.fa(olympe.sc.Config.Dq));olympe.sc.logic.Mh.C=olympe.sc.logic.Mh.O.va('017a7b0c62a02a89444f');function gj(a,b){var c=(new olympe.dc.W.Ki(olympe.dc.Ga.Pc)).C(a.p||[]);b&&b(c);c=new Map;for(const [d,e]of Object.entries(a.v||{}))c.set(d,ij(olympe.sc.logic.uk,e,b));return c}function jj(a){a.Dc=new olympe.dc.db.Ac;a.values=Object.create(null)}
898
899
  function ij(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 te(b.v);case 6:return Ce(b.v,c);case 7:return new Map(Object.entries(b.m).map(([d,e])=>[d,ij(a,e,c)]));default:return Array.isArray(b)?b.map(d=>ij(a,d,c)):'object'===typeof b?Object.entries(b).reduce((d,[e,f])=>{d[e]=ij(a,f,c);return d},{}):b}}
899
900
  function kj(a,b){var c=a.db;a=a.Dc;if(c.Eb(b)){a.F(b,c.kd(b,!0),0);a.Ra(olympe.dc.kc.Xc,b,c.model(b),0);for(const [d,e,f]of Ad(c,b))(c=a.Lf(f))&&c.re()&&(e===olympe.dc.Aa.DESTINATION?a.Ra(d,b,f,0):a.Ra(d,f,b,0))}else olympe.ra.Xa('Remote Action').error(`Try to serialize an instance ${b} that does not exist in the local datacloud.`)}
900
901
  olympe.sc.logic.uk=class{constructor(){this.db=olympe.dc.Oa();jj(this)}static ia(a){const b=new olympe.sc.logic.uk;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.vd;this.Dc.Qc(b);a.p=$d(b);a.v=this.values;jj(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,
901
- r:a.Qf().valueOf(),g:a.Kf().valueOf(),b:a.Ff().valueOf(),a:a.Ef().valueOf()};case a instanceof olympe.sc.logic.Error:return{t:3,c:a.code,m:a.cs};case a&&'function'===typeof a.R:return a=a.R(),kj(this,a),{t:4,v:a};case a instanceof olympe.dc.gb:return{t:5,v:a.ia()};case a instanceof olympe.dc.Va:return{t:6,v:a.ia()};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===
902
- 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.Ol=class{constructor(a){this.db=olympe.dc.Oa();this.typeRel=a}};olympe.sc.logic.controllers.Ol.C={jz:-1,eA:1};olympe.sc.logic.controllers.IA=class extends olympe.sc.logic.controllers.Ol{constructor(){super(olympe.sc.logic.le.C)}};olympe.sc.logic.controllers.KA=class extends olympe.sc.logic.controllers.Ol{constructor(){super(olympe.sc.logic.Kc.typeRel)}};olympe.sc.logic.Pk={};olympe.sc.logic.Pk.Wu=class extends olympe.sc.logic.Function{update(a,[b,c],[d]){const e=olympe.dc.wa(b);e?af(Ve(new olympe.dc.kf(e),olympe.dc.Ub.tf),c).hb(()=>{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.Pk.Wu);olympe.sc.logic.actions={};olympe.sc.logic.Pk.cu=class extends olympe.sc.logic.Function{run(a){this.cf(a);const [b,c,d]=this.F(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())):(h.kl(),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.zg();f=0;h.Kk();k();break;case 2:k();break;default:this.N.error('Unhandled input')}},this.tag))}};
903
- olympe.sc.logic.ya.C('0171889b060b6cd54300',olympe.sc.logic.Pk.cu);olympe.sc.logic.bc={};olympe.sc.logic.bc.to=class extends olympe.sc.logic.xe{F(){return this.de('017dc92292107fb98b21')}};ej('017dc8d6c8fd8c8bd2f0',olympe.sc.logic.bc.to);olympe.sc.logic.bc.to.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.logic.bc.Ql=class extends olympe.sc.logic.xe{F(){return this.de('016ac63808535703691c')}};olympe.sc.logic.bc.Ql.O=ej('0169b6876a03f139d50a',olympe.sc.logic.bc.Ql);olympe.sc.logic.bc.Ql.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.logic.bc.fm=class extends olympe.sc.logic.xe{F(){return this.de('016ac63809a9a8e6db96')}G(){return this.Jf('016ac6380ab003363b3e')}};ej('01646ad602f933b8caaf',olympe.sc.logic.bc.fm);olympe.sc.logic.bc.fm.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.logic.bc.fm.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.bc.kk=class extends olympe.sc.logic.xe{F(){return this.de('016ac6380bd98f1d91a0')}L(){return this.Jf('016ac63c589ae38ca3ae')}G(){return this.Jf('016ac63c5a377fceabaa')}};ej('0168ec42fc01747a98b6',olympe.sc.logic.bc.kk);olympe.sc.logic.bc.kk.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.logic.bc.kk.prototype.L.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.bc.kk.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.bc.Zg=class extends olympe.sc.logic.xe{Ul(){return this.de('017a7b07b09e3b22c8b4')}Bp(){return this.de('017a7b07ba05807a74b0')}Vl(){return this.Jf('017a7b0818c12388d731')}Wl(){return this.Jf('017a7b085146d5e69aec')}Ot(){return olympe.D.qa.F}};olympe.sc.logic.bc.Zg.oa='017a7b07b09e3b22c8b4';olympe.sc.logic.bc.Zg.Lc='017a7b07ba05807a74b0';olympe.sc.logic.bc.Zg.wc='017a7b0818c12388d731';olympe.sc.logic.bc.Zg.C='017a7b085146d5e69aec';
904
- olympe.sc.logic.bc.Zg.O=ej('017a7b07a948e30508fa',olympe.sc.logic.bc.Zg,olympe.sc.logic.Mh);m=olympe.sc.logic.bc.Zg.prototype;m.Ul.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.Bp.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.Vl.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.Wl.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.Ot.K=olympe.D.J.U;olympe.sc.logic.bc.Wq=class extends olympe.sc.logic.xe{F(){return this.de('016ac63c5b3ed0562740')}};ej('016a9766c230916ea5ec',olympe.sc.logic.bc.Wq);olympe.sc.logic.bc.Wq.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.query={};olympe.sc.query.Un=class extends olympe.sc.Wg{};olympe.sc.query.Un.O=olympe.dc.ya.C('01631aacd8276ea98491',olympe.sc.query.Un);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.Wg{};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.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.va('017ffdd8f0b1e31fe13e');olympe.sc.workflow.ObjectState.stateProp=olympe.sc.workflow.ObjectState.O.va('017ffdd8f0b1e31fe139');olympe.sc.workflow.ObjectState.assigneeProp=olympe.sc.workflow.ObjectState.O.va('017ffdd8f0b1e31fe13a');
905
- olympe.sc.workflow.ObjectState.dateTimeProp=olympe.sc.workflow.ObjectState.O.va('017ffdd8f0b1e31fe13b');olympe.sc.workflow.ObjectState.serializedObjectProp=olympe.sc.workflow.ObjectState.O.va('017ffdd8f0b1e31fe13d');olympe.sc.workflow.ObjectState.objectRel=olympe.sc.workflow.ObjectState.O.Ha('017ffdd8f0b1e31fe13c');olympe.sc.workflow.ObjectState.currentObjectRel=olympe.sc.workflow.ObjectState.O.Ha('017ffdd8f0b1e31fe13f');olympe.sc.workflow.sf=class extends olympe.sc.logic.xe{Pt(){return this.de('017ffe02381f9fac5060')}St(){return this.de('017ffe02381f9fac5061')}Tt(){return this.de('017ffe02381f9fac5062')}sw(){return this.de('017ffe02381f9fac5065')}Qt(){return this.Jf('017ffe02381f9fac5063')}Rt(){return this.Jf('017ffe02381f9fac5064')}};olympe.sc.workflow.sf.O=ej('017ffde21f5fe0f704ce',olympe.sc.workflow.sf);olympe.sc.workflow.sf.C='017ffe02381f9fac5060';olympe.sc.workflow.sf.Ue='017ffe02381f9fac5061';
906
- olympe.sc.workflow.sf.Xe='017ffe02381f9fac5062';olympe.sc.workflow.sf.wc='017ffe02381f9fac5065';olympe.sc.workflow.sf.oa='017ffe02381f9fac5063';olympe.sc.workflow.sf.Lc='017ffe02381f9fac5064';m=olympe.sc.workflow.sf.prototype;m.Pt.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.St.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.Tt.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.sw.K=new olympe.D.J(()=>Map,[]);m.Qt.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);
907
- m.Rt.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.workflow.Qe=class extends olympe.dm.BrickMetadata{Vc(){return this.qc(olympe.sc.workflow.Workflow.statesRel.Gc(),olympe.sc.workflow.Workflow).ma().concat(['.',this.ma()])}};olympe.sc.workflow.Qe.O=olympe.dc.ya.C('017ffdc2dda51d46b430',olympe.sc.workflow.Qe);olympe.sc.workflow.Transition=class extends olympe.dc.CloudObject{F(){return this.Wr()}C(){return this.qc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Qe)}G(){return this.qc(olympe.sc.workflow.Transition.toStateRel,olympe.sc.workflow.Qe)}Vc(){const a=this.qc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Qe);return a.qc(olympe.sc.workflow.Workflow.statesRel.Gc(),olympe.sc.workflow.Workflow).ma().concat(['.',a.ma(),'->',this.ma()])}};
902
+ r:a.Qf().valueOf(),g:a.Kf().valueOf(),b:a.Ff().valueOf(),a:a.Ef().valueOf()};case a instanceof olympe.sc.logic.Error:return{t:3,c:a.code,m:a.ds};case a&&'function'===typeof a.R:return a=a.R(),kj(this,a),{t:4,v:a};case a instanceof olympe.dc.gb:return{t:5,v:a.ia()};case a instanceof olympe.dc.Va:return{t:6,v:a.ia()};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===
903
+ 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.Ol=class{constructor(a){this.db=olympe.dc.Oa();this.typeRel=a}};olympe.sc.logic.controllers.Ol.C={kz:-1,fA:1};olympe.sc.logic.controllers.JA=class extends olympe.sc.logic.controllers.Ol{constructor(){super(olympe.sc.logic.le.C)}};olympe.sc.logic.controllers.LA=class extends olympe.sc.logic.controllers.Ol{constructor(){super(olympe.sc.logic.Kc.typeRel)}};olympe.sc.logic.Pk={};olympe.sc.logic.Pk.Xu=class extends olympe.sc.logic.Function{update(a,[b,c],[d]){const e=olympe.dc.wa(b);e?af(Ve(new olympe.dc.kf(e),olympe.dc.Ub.tf),c).hb(()=>{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.Pk.Xu);olympe.sc.logic.actions={};olympe.sc.logic.Pk.du=class extends olympe.sc.logic.Function{run(a){this.cf(a);const [b,c,d]=this.F(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())):(h.kl(),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.zg();f=0;h.Kk();k();break;case 2:k();break;default:this.N.error('Unhandled input')}},this.tag))}};
904
+ olympe.sc.logic.ya.C('0171889b060b6cd54300',olympe.sc.logic.Pk.du);olympe.sc.logic.bc={};olympe.sc.logic.bc.to=class extends olympe.sc.logic.xe{F(){return this.de('017dc92292107fb98b21')}};ej('017dc8d6c8fd8c8bd2f0',olympe.sc.logic.bc.to);olympe.sc.logic.bc.to.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.logic.bc.Ql=class extends olympe.sc.logic.xe{F(){return this.de('016ac63808535703691c')}};olympe.sc.logic.bc.Ql.O=ej('0169b6876a03f139d50a',olympe.sc.logic.bc.Ql);olympe.sc.logic.bc.Ql.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.logic.bc.fm=class extends olympe.sc.logic.xe{F(){return this.de('016ac63809a9a8e6db96')}G(){return this.Jf('016ac6380ab003363b3e')}};ej('01646ad602f933b8caaf',olympe.sc.logic.bc.fm);olympe.sc.logic.bc.fm.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.logic.bc.fm.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.bc.kk=class extends olympe.sc.logic.xe{F(){return this.de('016ac6380bd98f1d91a0')}L(){return this.Jf('016ac63c589ae38ca3ae')}G(){return this.Jf('016ac63c5a377fceabaa')}};ej('0168ec42fc01747a98b6',olympe.sc.logic.bc.kk);olympe.sc.logic.bc.kk.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.logic.bc.kk.prototype.L.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.bc.kk.prototype.G.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.logic.bc.Zg=class extends olympe.sc.logic.xe{Ul(){return this.de('017a7b07b09e3b22c8b4')}Cp(){return this.de('017a7b07ba05807a74b0')}Vl(){return this.Jf('017a7b0818c12388d731')}Wl(){return this.Jf('017a7b085146d5e69aec')}Pt(){return olympe.D.qa.F}};olympe.sc.logic.bc.Zg.oa='017a7b07b09e3b22c8b4';olympe.sc.logic.bc.Zg.Lc='017a7b07ba05807a74b0';olympe.sc.logic.bc.Zg.wc='017a7b0818c12388d731';olympe.sc.logic.bc.Zg.C='017a7b085146d5e69aec';
905
+ olympe.sc.logic.bc.Zg.O=ej('017a7b07a948e30508fa',olympe.sc.logic.bc.Zg,olympe.sc.logic.Mh);m=olympe.sc.logic.bc.Zg.prototype;m.Ul.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.Cp.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.Vl.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.Wl.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);m.Pt.K=olympe.D.J.U;olympe.sc.logic.bc.Xq=class extends olympe.sc.logic.xe{F(){return this.de('016ac63c5b3ed0562740')}};ej('016a9766c230916ea5ec',olympe.sc.logic.bc.Xq);olympe.sc.logic.bc.Xq.prototype.F.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);olympe.sc.query={};olympe.sc.query.Un=class extends olympe.sc.Wg{};olympe.sc.query.Un.O=olympe.dc.ya.C('01631aacd8276ea98491',olympe.sc.query.Un);olympe.sc.query.jq=class extends olympe.dm.Enum{};olympe.sc.query.jq.O=olympe.dc.ya.C('01631aacd8276ea98495',olympe.sc.query.jq);olympe.sc.query.uq=class extends olympe.dm.Enum{};olympe.sc.query.uq.O=olympe.dc.ya.C('01631aacd8276ea98494',olympe.sc.query.uq);olympe.sc.query.wq=class extends olympe.sc.Wg{};olympe.sc.query.wq.O=olympe.dc.ya.C('01631aacd8276ea98492',olympe.sc.query.wq);olympe.sc.query.xq=class extends olympe.dc.CloudObject{};olympe.sc.query.xq.O=olympe.dc.ya.C('01631aacd8276ea98493',olympe.sc.query.xq);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.va('017ffdd8f0b1e31fe13e');olympe.sc.workflow.ObjectState.stateProp=olympe.sc.workflow.ObjectState.O.va('017ffdd8f0b1e31fe139');olympe.sc.workflow.ObjectState.assigneeProp=olympe.sc.workflow.ObjectState.O.va('017ffdd8f0b1e31fe13a');
906
+ olympe.sc.workflow.ObjectState.dateTimeProp=olympe.sc.workflow.ObjectState.O.va('017ffdd8f0b1e31fe13b');olympe.sc.workflow.ObjectState.serializedObjectProp=olympe.sc.workflow.ObjectState.O.va('017ffdd8f0b1e31fe13d');olympe.sc.workflow.ObjectState.objectRel=olympe.sc.workflow.ObjectState.O.Ha('017ffdd8f0b1e31fe13c');olympe.sc.workflow.ObjectState.currentObjectRel=olympe.sc.workflow.ObjectState.O.Ha('017ffdd8f0b1e31fe13f');olympe.sc.workflow.sf=class extends olympe.sc.logic.xe{Qt(){return this.de('017ffe02381f9fac5060')}Tt(){return this.de('017ffe02381f9fac5061')}Ut(){return this.de('017ffe02381f9fac5062')}tw(){return this.de('017ffe02381f9fac5065')}Rt(){return this.Jf('017ffe02381f9fac5063')}St(){return this.Jf('017ffe02381f9fac5064')}};olympe.sc.workflow.sf.O=ej('017ffde21f5fe0f704ce',olympe.sc.workflow.sf);olympe.sc.workflow.sf.C='017ffe02381f9fac5060';olympe.sc.workflow.sf.Ue='017ffe02381f9fac5061';
907
+ olympe.sc.workflow.sf.Xe='017ffe02381f9fac5062';olympe.sc.workflow.sf.wc='017ffe02381f9fac5065';olympe.sc.workflow.sf.oa='017ffe02381f9fac5063';olympe.sc.workflow.sf.Lc='017ffe02381f9fac5064';m=olympe.sc.workflow.sf.prototype;m.Qt.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.Tt.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.Ut.K=new olympe.D.J(()=>olympe.sc.logic.Db,[]);m.tw.K=new olympe.D.J(()=>Map,[]);m.Rt.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);
908
+ m.St.K=new olympe.D.J(()=>olympe.sc.logic.Rb,[]);olympe.sc.workflow.Qe=class extends olympe.dm.BrickMetadata{Vc(){return this.qc(olympe.sc.workflow.Workflow.statesRel.Gc(),olympe.sc.workflow.Workflow).ma().concat(['.',this.ma()])}};olympe.sc.workflow.Qe.O=olympe.dc.ya.C('017ffdc2dda51d46b430',olympe.sc.workflow.Qe);olympe.sc.workflow.Transition=class extends olympe.dc.CloudObject{F(){return this.Xr()}C(){return this.qc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Qe)}G(){return this.qc(olympe.sc.workflow.Transition.toStateRel,olympe.sc.workflow.Qe)}Vc(){const a=this.qc(olympe.sc.workflow.Transition.fromStateRel,olympe.sc.workflow.Qe);return a.qc(olympe.sc.workflow.Workflow.statesRel.Gc(),olympe.sc.workflow.Workflow).ma().concat(['.',a.ma(),'->',this.ma()])}};
908
909
  olympe.sc.workflow.Transition.O=olympe.dc.ya.C('017ffdc633219f16beea',olympe.sc.workflow.Transition);olympe.sc.workflow.Transition.processRefProp=olympe.sc.workflow.Transition.O.va('017ffdc633219f16beec');olympe.sc.workflow.Transition.fromStateRel=olympe.sc.workflow.Transition.O.Ha('017ffdc2dda51d46b431');olympe.sc.workflow.Transition.toStateRel=olympe.sc.workflow.Transition.O.Ha('017ffdc633219f16beeb');olympe.sc.workflow.Transition.prototype.F.K=new olympe.D.J(()=>olympe.dc.CloudObject,[]);
909
910
  olympe.sc.workflow.Transition.prototype.C.K=new olympe.D.J(()=>olympe.sc.workflow.Qe,[]);olympe.sc.workflow.Transition.prototype.G.K=new olympe.D.J(()=>olympe.sc.workflow.Qe,[]);olympe.sc.workflow.Workflow=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Ie.sg.Nj}L(){return this.Bg(olympe.sc.workflow.Workflow.serializationEnabledProp)}F(){return this.qc(olympe.sc.workflow.Workflow.dataTypeRel,olympe.sc.si)}G(){return this.qc(olympe.sc.workflow.Workflow.initialStateRel,olympe.sc.workflow.Qe)}};olympe.sc.workflow.Workflow.O=olympe.dc.ya.C('017ffdc010e5bcc9c971',olympe.sc.workflow.Workflow);olympe.sc.workflow.Workflow.serializationEnabledProp=olympe.sc.workflow.Workflow.O.va('017ffdc010e5bcc9c972');
910
911
  olympe.sc.workflow.Workflow.dataTypeRel=olympe.sc.workflow.Workflow.O.Ha('017ffdc010e5bcc9c973');olympe.sc.workflow.Workflow.statesRel=olympe.sc.workflow.Workflow.O.Ha('017ffdc010e5bcc9c974');olympe.sc.workflow.Workflow.initialStateRel=olympe.sc.workflow.Workflow.O.Ha('017ffdc010e5bcc9c975');olympe.sc.workflow.Workflow.prototype.L.K=olympe.D.J.U;olympe.sc.workflow.Workflow.prototype.F.K=new olympe.D.J(()=>olympe.sc.si,[]);
911
- olympe.sc.workflow.Workflow.prototype.G.K=new olympe.D.J(()=>olympe.sc.workflow.Qe,[]);olympe.sc.Ma={};olympe.sc.Ma.Me=class extends olympe.sc.pb{C(){return olympe.sc.Ie.sg.Mu}};olympe.sc.Ma.Me.O=Ic(olympe.dc.ya.C('01120300000000adef00',olympe.sc.Ma.Me));olympe.sc.Ma.Me.C=olympe.sc.Ma.Me.O.Ha('0171bc1f15da96dfdb89');P(olympe.dm.Zc.O,olympe.sc.Ma.Me.C);olympe.sc.Ma.Fj=class extends olympe.sc.Runnable{aa(){return[this.Tb()]}U(){return olympe.dc.od.from(this.Tb()).sb(olympe.sc.Ma.Me.C).jd()}};olympe.sc.Ma.Fj.O=Ic(olympe.dc.ya.C('0113030000000aca1100',olympe.sc.Ma.Fj));olympe.sc.Ma.Fj.prototype.U.K=new olympe.D.J(()=>olympe.dm.Nb,[]);olympe.sc.Ma.vb=class extends olympe.dc.CloudObject{Vt(){return this.Bg(olympe.sc.Ma.vb.F)}Ox(){return this.Bg(olympe.sc.Ma.vb.wb)}Rd(){return this.He(olympe.sc.Ma.vb.C)}yw(){return this.Gb(olympe.sc.Ma.vb.ka)}Ww(){return this.Gb(olympe.sc.Ma.vb.ab)}Vw(){return this.Gb(olympe.sc.Ma.vb.Sa)}an(){this.Gb(olympe.sc.Ma.vb.Ya)}Kw(){return this.Gb(olympe.sc.Ma.vb.oa)}kw(){return this.Gb(olympe.sc.Ma.vb.L)}Uw(){return this.Gb(olympe.sc.Ma.vb.Da)}Ut(){return this.Gb(olympe.sc.Ma.vb.aa)}};
912
- olympe.sc.Ma.vb.O=olympe.dc.ya.C('011203300000000adef5',olympe.sc.Ma.vb);olympe.sc.Ma.vb.F=olympe.sc.Ma.vb.O.va('011203300000000adef6');olympe.sc.Ma.vb.wb=olympe.sc.Ma.vb.O.va('011203300000000adef7');olympe.sc.Ma.vb.C=olympe.sc.Ma.vb.O.va('011203300000000adef8');olympe.sc.Ma.vb.ka=olympe.sc.Ma.vb.O.va('011203300000000adef9');olympe.sc.Ma.vb.ab=olympe.sc.Ma.vb.O.va('011203300000000adefa');olympe.sc.Ma.vb.Sa=olympe.sc.Ma.vb.O.va('011203300000000adefb');olympe.sc.Ma.vb.L=olympe.sc.Ma.vb.O.va('011203300000000adefc');
913
- olympe.sc.Ma.vb.Ya=olympe.sc.Ma.vb.O.va('011203300000000adefd');olympe.sc.Ma.vb.oa=olympe.sc.Ma.vb.O.va('011203300000000adefe');olympe.sc.Ma.vb.Da=olympe.sc.Ma.vb.O.va('011203300000000adeff');olympe.sc.Ma.vb.aa=olympe.sc.Ma.vb.O.va('011203300000000adee0');olympe.sc.Ma.vb.Ib={INIT:0,$y:1,Pi:2,vm:3,vk:4,fB:5,uc:9};m=olympe.sc.Ma.vb.prototype;m.Vt.K=olympe.D.J.U;m.Ox.K=olympe.D.J.U;m.Rd.K=olympe.D.J.G;m.yw.K=olympe.D.J.F;m.Ww.K=olympe.D.J.F;m.Vw.K=olympe.D.J.F;m.an.K=olympe.D.J.F;m.Kw.K=olympe.D.J.F;
914
- m.kw.K=olympe.D.J.F;m.Uw.K=olympe.D.J.F;m.Ut.K=olympe.D.J.F;olympe.sc.Ma.mp=class extends olympe.sc.Ma.Fj{Sa(){return!0}};olympe.sc.Ma.mp.O=olympe.dc.ya.C('0113032000000aca1102',olympe.sc.Ma.mp,olympe.sc.P.Ea);olympe.sc.Ma.ah=class extends olympe.sc.Ma.Me{F(){return(new olympe.dc.ek(this.R(),olympe.sc.Ma.vb)).sb(olympe.sc.Ma.ah.oa).pf().Sc()}};olympe.sc.Ma.ah.O=olympe.dc.ya.C('011203300000000adef3',olympe.sc.Ma.ah);olympe.sc.Ma.ah.oa=olympe.sc.Ma.ah.O.Ha('011203300000000adef4');P(olympe.sc.Ma.vb.O,olympe.sc.Ma.ah.oa);olympe.sc.Ma.ah.prototype.F.K=new olympe.D.J(()=>olympe.sc.Ma.vb,[]);olympe.sc.dh=class extends olympe.dc.CloudObject{static get(){return olympe.dc.CloudObject.get('011203300000000adf0f')}};olympe.sc.dh.O=olympe.dc.ya.C('011203300000000adf00',olympe.sc.dh);olympe.sc.dh.F=olympe.sc.dh.O.va('011203300000000adf01');olympe.sc.dh.C=olympe.sc.dh.O.va('011203300000000adf02');olympe.sc.dh.L='011203300000000adf0f';olympe.sc.hz=class{};olympe.sc.eb=class{constructor(a){this.ub=a}Z(){return this.ub.Z()}jn(){return this.ub.jn()}getParent(){return this.ub.getParent()}Qk(){return this.ub.Qk()}xc(){return this.ub.xc()}sn(a){this.ub.sn(a)}Kk(){this.ub.Kk()}kl(){this.ub.kl()}set(a,b){this.ub.set(a,b);return this}li(a){this.ub.li(a);return this}remove(a){this.ub.remove(a)}Fb(a,b,c=!1){return this.ub.Fb(a,b,c)}get(a,b=!1){return this.ub.get(a,b)}has(a,b=!1){return this.ub.has(a,b)}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>{const e=
912
+ olympe.sc.workflow.Workflow.prototype.G.K=new olympe.D.J(()=>olympe.sc.workflow.Qe,[]);olympe.sc.Ma={};olympe.sc.Ma.Me=class extends olympe.sc.pb{C(){return olympe.sc.Ie.sg.Nu}};olympe.sc.Ma.Me.O=Ic(olympe.dc.ya.C('01120300000000adef00',olympe.sc.Ma.Me));olympe.sc.Ma.Me.C=olympe.sc.Ma.Me.O.Ha('0171bc1f15da96dfdb89');P(olympe.dm.Zc.O,olympe.sc.Ma.Me.C);olympe.sc.Ma.Fj=class extends olympe.sc.Runnable{aa(){return[this.Tb()]}U(){return olympe.dc.od.from(this.Tb()).sb(olympe.sc.Ma.Me.C).jd()}};olympe.sc.Ma.Fj.O=Ic(olympe.dc.ya.C('0113030000000aca1100',olympe.sc.Ma.Fj));olympe.sc.Ma.Fj.prototype.U.K=new olympe.D.J(()=>olympe.dm.Nb,[]);olympe.sc.Ma.vb=class extends olympe.dc.CloudObject{Wt(){return this.Bg(olympe.sc.Ma.vb.F)}Px(){return this.Bg(olympe.sc.Ma.vb.wb)}Rd(){return this.He(olympe.sc.Ma.vb.C)}zw(){return this.Gb(olympe.sc.Ma.vb.ja)}Xw(){return this.Gb(olympe.sc.Ma.vb.ab)}Ww(){return this.Gb(olympe.sc.Ma.vb.Sa)}an(){this.Gb(olympe.sc.Ma.vb.Ya)}Lw(){return this.Gb(olympe.sc.Ma.vb.oa)}lw(){return this.Gb(olympe.sc.Ma.vb.L)}Vw(){return this.Gb(olympe.sc.Ma.vb.Da)}Vt(){return this.Gb(olympe.sc.Ma.vb.aa)}};
913
+ olympe.sc.Ma.vb.O=olympe.dc.ya.C('011203300000000adef5',olympe.sc.Ma.vb);olympe.sc.Ma.vb.F=olympe.sc.Ma.vb.O.va('011203300000000adef6');olympe.sc.Ma.vb.wb=olympe.sc.Ma.vb.O.va('011203300000000adef7');olympe.sc.Ma.vb.C=olympe.sc.Ma.vb.O.va('011203300000000adef8');olympe.sc.Ma.vb.ja=olympe.sc.Ma.vb.O.va('011203300000000adef9');olympe.sc.Ma.vb.ab=olympe.sc.Ma.vb.O.va('011203300000000adefa');olympe.sc.Ma.vb.Sa=olympe.sc.Ma.vb.O.va('011203300000000adefb');olympe.sc.Ma.vb.L=olympe.sc.Ma.vb.O.va('011203300000000adefc');
914
+ olympe.sc.Ma.vb.Ya=olympe.sc.Ma.vb.O.va('011203300000000adefd');olympe.sc.Ma.vb.oa=olympe.sc.Ma.vb.O.va('011203300000000adefe');olympe.sc.Ma.vb.Da=olympe.sc.Ma.vb.O.va('011203300000000adeff');olympe.sc.Ma.vb.aa=olympe.sc.Ma.vb.O.va('011203300000000adee0');olympe.sc.Ma.vb.Ib={INIT:0,az:1,Pi:2,vm:3,vk:4,gB:5,uc:9};m=olympe.sc.Ma.vb.prototype;m.Wt.K=olympe.D.J.U;m.Px.K=olympe.D.J.U;m.Rd.K=olympe.D.J.G;m.zw.K=olympe.D.J.F;m.Xw.K=olympe.D.J.F;m.Ww.K=olympe.D.J.F;m.an.K=olympe.D.J.F;m.Lw.K=olympe.D.J.F;
915
+ m.lw.K=olympe.D.J.F;m.Vw.K=olympe.D.J.F;m.Vt.K=olympe.D.J.F;olympe.sc.Ma.np=class extends olympe.sc.Ma.Fj{Sa(){return!0}};olympe.sc.Ma.np.O=olympe.dc.ya.C('0113032000000aca1102',olympe.sc.Ma.np,olympe.sc.P.Ea);olympe.sc.Ma.ah=class extends olympe.sc.Ma.Me{F(){return(new olympe.dc.ek(this.R(),olympe.sc.Ma.vb)).sb(olympe.sc.Ma.ah.oa).pf().Sc()}};olympe.sc.Ma.ah.O=olympe.dc.ya.C('011203300000000adef3',olympe.sc.Ma.ah);olympe.sc.Ma.ah.oa=olympe.sc.Ma.ah.O.Ha('011203300000000adef4');P(olympe.sc.Ma.vb.O,olympe.sc.Ma.ah.oa);olympe.sc.Ma.ah.prototype.F.K=new olympe.D.J(()=>olympe.sc.Ma.vb,[]);olympe.sc.dh=class extends olympe.dc.CloudObject{static get(){return olympe.dc.CloudObject.get('011203300000000adf0f')}};olympe.sc.dh.O=olympe.dc.ya.C('011203300000000adf00',olympe.sc.dh);olympe.sc.dh.F=olympe.sc.dh.O.va('011203300000000adf01');olympe.sc.dh.C=olympe.sc.dh.O.va('011203300000000adf02');olympe.sc.dh.L='011203300000000adf0f';olympe.sc.iz=class{};olympe.sc.eb=class{constructor(a){this.ub=a}Z(){return this.ub.Z()}jn(){return this.ub.jn()}getParent(){return this.ub.getParent()}Qk(){return this.ub.Qk()}xc(){return this.ub.xc()}sn(a){this.ub.sn(a)}Kk(){this.ub.Kk()}kl(){this.ub.kl()}set(a,b){this.ub.set(a,b);return this}li(a){this.ub.li(a);return this}remove(a){this.ub.remove(a)}Fb(a,b,c=!1){return this.ub.Fb(a,b,c)}get(a,b=!1){return this.ub.get(a,b)}has(a,b=!1){return this.ub.has(a,b)}observe(a,b=!0,c=!1){return new rxjs.Observable(d=>{const e=
915
916
  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.Jg(()=>{f();d.complete()});return f})}repeat(a,b){this.ub.repeat(a,b);return this}fl(a){return this.ub.fl(a)}Kn(a,b=!0,c=!1){return rxjs.firstValueFrom(this.observe(a,b,c))}hl(a){this.ub.hl(a);return this}bb(a,b=!0){return this.ub.bb(a,b)}on(a,b,c,d=!0){return this.ub.on(a,b,c,d)}Xh(a){return this.ub.Xh(a)}gn(a,b){return this.ub.gn(a,b)}tj(a,b){return this.ub.tj(a,b)}di(a){return this.ub.di(a)}nj(){return this.ub.nj()}Jg(a,
916
- b){const c=b||olympe.W.fc();return this.ub.Jg(()=>{this.ub.rj(c);a()},c)}rj(a){this.ub.rj(a)}onDestroy(a){return this.ub.onDestroy(a)}Je(a){this.ub.Je(a)}destroy(){this.ub.destroy()}clear(){this.ub.clear()}Ab(){return this.ub.Ab()}pn(){return this.ub.pn()}Zk(){return this.ub.Zk()}fb(a){if('function'!==typeof this.ub.getProperty)throw Error('Trying to call deprecated method $.getProperty() in a non-UI brick');return this.ub.getProperty(a)}zw(a){if('function'!==typeof this.ub.getEvent)throw Error('Trying to call deprecated method $.getEvent() in a non-UI brick');
917
- return this.ub.getEvent(a)}Yx(...a){if('function'!==typeof this.ub.observeMany)throw Error('Trying to call deprecated method $.observeMany() in a non-UI brick');return this.ub.observeMany(a)}};olympe.sc.eb.prototype.observeMany=olympe.sc.eb.prototype.Yx;olympe.sc.eb.prototype.getEvent=olympe.sc.eb.prototype.zw;olympe.sc.eb.prototype.getProperty=olympe.sc.eb.prototype.fb;olympe.sc.eb.prototype.clear=olympe.sc.eb.prototype.clear;olympe.sc.eb.prototype.destroy=olympe.sc.eb.prototype.destroy;
917
+ b){const c=b||olympe.W.fc();return this.ub.Jg(()=>{this.ub.rj(c);a()},c)}rj(a){this.ub.rj(a)}onDestroy(a){return this.ub.onDestroy(a)}Je(a){this.ub.Je(a)}destroy(){this.ub.destroy()}clear(){this.ub.clear()}Ab(){return this.ub.Ab()}pn(){return this.ub.pn()}Zk(){return this.ub.Zk()}fb(a){if('function'!==typeof this.ub.getProperty)throw Error('Trying to call deprecated method $.getProperty() in a non-UI brick');return this.ub.getProperty(a)}Aw(a){if('function'!==typeof this.ub.getEvent)throw Error('Trying to call deprecated method $.getEvent() in a non-UI brick');
918
+ return this.ub.getEvent(a)}Zx(...a){if('function'!==typeof this.ub.observeMany)throw Error('Trying to call deprecated method $.observeMany() in a non-UI brick');return this.ub.observeMany(a)}};olympe.sc.eb.prototype.observeMany=olympe.sc.eb.prototype.Zx;olympe.sc.eb.prototype.getEvent=olympe.sc.eb.prototype.Aw;olympe.sc.eb.prototype.getProperty=olympe.sc.eb.prototype.fb;olympe.sc.eb.prototype.clear=olympe.sc.eb.prototype.clear;olympe.sc.eb.prototype.destroy=olympe.sc.eb.prototype.destroy;
918
919
  olympe.sc.eb.prototype.offDestroy=olympe.sc.eb.prototype.Je;olympe.sc.eb.prototype.onDestroy=olympe.sc.eb.prototype.onDestroy;olympe.sc.eb.prototype.offClear=olympe.sc.eb.prototype.rj;olympe.sc.eb.prototype.onClear=olympe.sc.eb.prototype.Jg;olympe.sc.eb.prototype.getOtherContext=olympe.sc.eb.prototype.di;olympe.sc.eb.prototype.onContext=olympe.sc.eb.prototype.tj;olympe.sc.eb.prototype.createChild=olympe.sc.eb.prototype.Xh;olympe.sc.eb.prototype.setParentElement=olympe.sc.eb.prototype.hl;
919
920
  olympe.sc.eb.prototype.waitFor=olympe.sc.eb.prototype.Kn;olympe.sc.eb.prototype.runner=olympe.sc.eb.prototype.fl;olympe.sc.eb.prototype.repeat=olympe.sc.eb.prototype.repeat;olympe.sc.eb.prototype.observe=olympe.sc.eb.prototype.observe;olympe.sc.eb.prototype.has=olympe.sc.eb.prototype.has;olympe.sc.eb.prototype.get=olympe.sc.eb.prototype.get;olympe.sc.eb.prototype.remove=olympe.sc.eb.prototype.remove;olympe.sc.eb.prototype.trigger=olympe.sc.eb.prototype.li;olympe.sc.eb.prototype.set=olympe.sc.eb.prototype.set;
920
- olympe.sc.eb.prototype.getParent=olympe.sc.eb.prototype.getParent;olympe.sc.ue=class extends olympe.sc.Runnable{ab(){return this.tb(olympe.sc.ue.G,olympe.sc.Runnable)}U(){return this.tb(olympe.sc.ue.C,olympe.dm.Property)}};olympe.sc.ue.O=Ic(olympe.dc.ya.C('016c2d996d9ca27fa9d8',olympe.sc.ue));olympe.sc.ue.G=olympe.sc.ue.O.Ha('016c3cb7742ec9309e0b');olympe.sc.ue.C=olympe.sc.ue.O.Ha('016c42d3454636f90533');olympe.sc.ue.prototype.ab.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.sc.ue.prototype.U.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.sc.Ko=class extends olympe.dm.Qb{C(){return olympe.sc.Ie.sg.Nj}};olympe.sc.Ko.O=olympe.dc.ya.C('017a7a9ff057958e5678',olympe.sc.Ko);olympe.sc.Rp=class extends olympe.dm.Qb{C(){return olympe.sc.Ie.sg.ev}};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.Xq=class extends olympe.sc.ue{};olympe.sc.Xq.O=olympe.dc.ya.C('016d3f37610ae4fc3962',olympe.sc.Xq);olympe.sc.Oh=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Ie.sg.Nj}};olympe.sc.Oh.O=olympe.dc.ya.C('01645fe6873aeea59e64',olympe.sc.Oh);olympe.sc.Oh.C=olympe.sc.Oh.O.Ha('017ed8ac775f48d4d589');olympe.sc.Oh.F=olympe.sc.Oh.O.Ha('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.Ga.jc}static from(a){const b=olympe.sc.Ta.ig.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Transaction}static process(a,b){return a.has(olympe.sc.Ta.ig.TRANSACTION,!0)?Promise.resolve(!1):b.hb().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.F.set(d.R(),olympe.dc.wa(a));for(const [e,f]of b)d.setProperty(e,
921
- f);c===olympe.dc.Ga.Pc&&(b=olympe.dc.Oa(),b=null!==$i?b.ij($i,[olympe.sc.Ma.Me.C,olympe.sc.md.F.Gc()])[0]||null:null,null!==b?this.Ra(olympe.sc.md.L,b,d):olympe.ra.Xa('sc').warn('No business container for new instance of',olympe.dc.wa(a)));return d.R()}update(a,b,c){this.C.update(a,b,c);return this}Lx(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}Ra(a,b,c){this.C.Ra(a,b,c);return this}ec(a,b,c){this.C.ec(a,b,c);return this}Um(a,b){this.C.Um(a,
921
+ olympe.sc.eb.prototype.getParent=olympe.sc.eb.prototype.getParent;olympe.sc.ue=class extends olympe.sc.Runnable{ab(){return this.tb(olympe.sc.ue.G,olympe.sc.Runnable)}U(){return this.tb(olympe.sc.ue.C,olympe.dm.Property)}};olympe.sc.ue.O=Ic(olympe.dc.ya.C('016c2d996d9ca27fa9d8',olympe.sc.ue));olympe.sc.ue.G=olympe.sc.ue.O.Ha('016c3cb7742ec9309e0b');olympe.sc.ue.C=olympe.sc.ue.O.Ha('016c42d3454636f90533');olympe.sc.ue.prototype.ab.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.sc.ue.prototype.U.K=new olympe.D.J(()=>olympe.dc.Ca,[]);olympe.sc.Ko=class extends olympe.dm.Qb{C(){return olympe.sc.Ie.sg.Nj}};olympe.sc.Ko.O=olympe.dc.ya.C('017a7a9ff057958e5678',olympe.sc.Ko);olympe.sc.Sp=class extends olympe.dm.Qb{C(){return olympe.sc.Ie.sg.fv}};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.Yq=class extends olympe.sc.ue{};olympe.sc.Yq.O=olympe.dc.ya.C('016d3f37610ae4fc3962',olympe.sc.Yq);olympe.sc.Oh=class extends olympe.dm.BrickMetadata{C(){return olympe.sc.Ie.sg.Nj}};olympe.sc.Oh.O=olympe.dc.ya.C('01645fe6873aeea59e64',olympe.sc.Oh);olympe.sc.Oh.C=olympe.sc.Oh.O.Ha('017ed8ac775f48d4d589');olympe.sc.Oh.F=olympe.sc.Oh.O.Ha('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.Ga.jc}static from(a){const b=olympe.sc.Ta.ig.TRANSACTION;return a.has(b,!0)?a.get(b,!0):new olympe.sc.Transaction}static process(a,b){return a.has(olympe.sc.Ta.ig.TRANSACTION,!0)?Promise.resolve(!1):b.hb().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.F.set(d.R(),olympe.dc.wa(a));for(const [e,f]of b)d.setProperty(e,
922
+ f);c===olympe.dc.Ga.Pc&&(b=olympe.dc.Oa(),b=null!==$i?b.ij($i,[olympe.sc.Ma.Me.C,olympe.sc.md.F.Gc()])[0]||null:null,null!==b?this.Ra(olympe.sc.md.L,b,d):olympe.ra.Xa('sc').warn('No business container for new instance of',olympe.dc.wa(a)));return d.R()}update(a,b,c){this.C.update(a,b,c);return this}Mx(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}Ra(a,b,c){this.C.Ra(a,b,c);return this}ec(a,b,c){this.C.ec(a,b,c);return this}Um(a,b){this.C.Um(a,
922
923
  b);return this}persist(a=!0){this.C.persist(a);return this}vj(a,b=!0){this.C.vj(a,b);return this}ki(a){this.source=a;return this}model(a){return this.F.get(olympe.dc.wa(a))||olympe.dc.Oa().model(a)}wn(a){be(this.C,a.C);return this}Km(a){this.C.Km(a);return this}hb(){return new Promise((a,b)=>{this.C.hb((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;
923
924
  olympe.sc.Transaction.prototype.execute=olympe.sc.Transaction.prototype.hb;olympe.sc.Transaction.prototype.afterExecution=olympe.sc.Transaction.prototype.Km;olympe.sc.Transaction.prototype.merge=olympe.sc.Transaction.prototype.wn;olympe.sc.Transaction.prototype.model=olympe.sc.Transaction.prototype.model;olympe.sc.Transaction.prototype.setSource=olympe.sc.Transaction.prototype.ki;olympe.sc.Transaction.prototype.persistInstance=olympe.sc.Transaction.prototype.vj;
924
- 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.ec;olympe.sc.Transaction.prototype.createRelation=olympe.sc.Transaction.prototype.Ra;olympe.sc.Transaction.prototype['delete']=olympe.sc.Transaction.prototype.delete;olympe.sc.Transaction.prototype.multiUpdate=olympe.sc.Transaction.prototype.Lx;
925
- 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.Ie.BrickMetadata=olympe.dm.BrickMetadata;olympe.sc.Ie.ve=olympe.dm.ve;olympe.ha.node.pa={};const lj={client:'client',hostname:'host',port:'port',user:'user',password:'password',Ka:'database',schema:'schema',ly:'pollingFrequency',Fv:'burstTransactionInterval',Ix:'minConnections',Hx:'maxConnections',Iv:'connectionsTimeout'},mj=olympe.dc.ga.ja.om,nj=olympe.dc.ga.ja.qm,oj=olympe.dc.ga.ja.QUERY_RESULT,pj=olympe.dc.ga.ja.pm,qj=olympe.dc.ga.ja.lg,rj=olympe.dc.ga.ja.Qh,sj=olympe.dc.ga.ja.xh,tj=olympe.dc.ga.ja.wi,uj=olympe.dc.ga.ja.wh,vj=olympe.dc.ga.ja.eh,wj=olympe.dc.ga.ja.Ij,xj=olympe.dc.ga.ja.zu;
926
- function yj(a,b,c,d,e){const f=new olympe.H.Ba.nb.zb(a.tag,b),g=new olympe.sc.W.gt(a.N,a.Lc,a.ab);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 mj:var l=c.queryBuilder().withSchema(d);k=te(k.q);a.U(b,l,k,(t,u)=>{(u?h.xg(Error(u)):h.Le({t:oj,r:t})).then()});break;case nj:k=te(k.q);zj(a,b,()=>c.queryBuilder().withSchema(d),k,h);break;
925
+ 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.ec;olympe.sc.Transaction.prototype.createRelation=olympe.sc.Transaction.prototype.Ra;olympe.sc.Transaction.prototype['delete']=olympe.sc.Transaction.prototype.delete;olympe.sc.Transaction.prototype.multiUpdate=olympe.sc.Transaction.prototype.Mx;
926
+ 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.Ie.BrickMetadata=olympe.dm.BrickMetadata;olympe.sc.Ie.ve=olympe.dm.ve;olympe.ha.node.pa={};const lj={client:'client',hostname:'host',port:'port',user:'user',password:'password',Ka:'database',schema:'schema',my:'pollingFrequency',Gv:'burstTransactionInterval',Jx:'minConnections',Ix:'maxConnections',Jv:'connectionsTimeout'},mj=olympe.dc.ga.ka.om,nj=olympe.dc.ga.ka.qm,oj=olympe.dc.ga.ka.QUERY_RESULT,pj=olympe.dc.ga.ka.pm,qj=olympe.dc.ga.ka.lg,rj=olympe.dc.ga.ka.Qh,sj=olympe.dc.ga.ka.xh,tj=olympe.dc.ga.ka.wi,uj=olympe.dc.ga.ka.wh,vj=olympe.dc.ga.ka.eh,wj=olympe.dc.ga.ka.Ij,xj=olympe.dc.ga.ka.Au;
927
+ function yj(a,b,c,d,e){const f=new olympe.H.Ba.nb.zb(a.tag,b),g=new olympe.sc.W.ht(a.N,a.Lc,a.ab);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 mj:var l=c.queryBuilder().withSchema(d);k=te(k.q);a.U(b,l,k,(t,u)=>{(u?h.xg(Error(u)):h.Le({t:oj,r:t})).then()});break;case nj:k=te(k.q);zj(a,b,()=>c.queryBuilder().withSchema(d),k,h);break;
927
928
  case xj:Aj(b,k.i,h.source());h.Lk().then();break;case vj:k=(new olympe.dc.W.Ki(a.Tb())).C(k.p);Bj(a,b,c,d,k,t=>(t?h.xg(Error(t)):h.Lk()).then());break;case uj:l=k.i;k=(new olympe.dc.W.Ki(a.Tb())).C(k.p);Cj(a,b,l,k,c,d);break;case qj:const n=b.get('_subscription_cache');k=k.s.reduce((t,u)=>{n.has(u)?Dj(n.get(u),h.source()):t.push(u);return t},[]);(0<k.length?h.xg(Error(`These subscriptions was not kept alive: ${k}`)):h.Lk()).then();break;case rj:const p=k.f;a.N.debug(`Uploading a file: ${p}`);k=Si(g,
928
929
  (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?Ej(a,b,c,d,p,v).then(()=>new olympe.net.Tg('',olympe.net.cb.hd.wl)):Promise.reject(`Try to upload content for file ${p} but body is not a Uint8Array or a string`)});h.Le(k).then();break;case sj:const q=k.f;a.N.debug(`Serving a file: ${q}`);k=Si(g,(t,u)=>{a.N.debug(`File service received a download request for file : ${u}`);
929
930
  return q!==u?Promise.reject('The file to download is not the same as the one initially requested'):Fj(b,c.queryBuilder().withSchema(d),q).then(v=>{a.N.debug('File service download request, content is:',v);return new olympe.net.Tg(v,olympe.net.cb.hd.Hh)})});h.Le(k).then();break;case tj:const r=k.f;a.N.debug(`Deleting a file: ${r}`);k=Si(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.Tg('',olympe.net.cb.hd.Hh)));h.Le(k).then();
930
- break;default:h.xg(Error(`Unsupported message type: ${k.t}`)).then()}})}function zj(a,b,c,d,e){const f=d.Z(),g=`sub${f}`;e.ds(g).then(()=>{const h=b.get('_subscription_cache');let k=h.get(f);k||(k=new Gj(f,d,c,b.get('_polling_frequency'),a.U.bind(a,b),a.wc.bind(a,g,f),()=>h.delete(f)),h.set(f,k));Dj(k,e.source())}).catch(h=>e.xg(Error(h)).then())}
931
- function Aj(a,b,c){(a=a.get('_subscription_cache').get(b))&&(a.C.delete(c)||olympe.ra.Xa('Subscription Cache').warn(`Try to unsubscribe to the subscription ${a.id} which is not registered.`))}function Bj(a,b,c,d,e,f){b=b.get('_data_model_observer');a=new olympe.ha.node.pa.Ia.Pq(a.N,b);e.Qc(a);Hj(a,c,d).then(()=>f(null)).catch(g=>f(g))}
931
+ break;default:h.xg(Error(`Unsupported message type: ${k.t}`)).then()}})}function zj(a,b,c,d,e){const f=d.Z(),g=`sub${f}`;e.es(g).then(()=>{const h=b.get('_subscription_cache');let k=h.get(f);k||(k=new Gj(f,d,c,b.get('_polling_frequency'),a.U.bind(a,b),a.wc.bind(a,g,f),()=>h.delete(f)),h.set(f,k));Dj(k,e.source())}).catch(h=>e.xg(Error(h)).then())}
932
+ function Aj(a,b,c){(a=a.get('_subscription_cache').get(b))&&(a.C.delete(c)||olympe.ra.Xa('Subscription Cache').warn(`Try to unsubscribe to the subscription ${a.id} which is not registered.`))}function Bj(a,b,c,d,e,f){b=b.get('_data_model_observer');a=new olympe.ha.node.pa.Ia.Qq(a.N,b);e.Qc(a);Hj(a,c,d).then(()=>f(null)).catch(g=>f(g))}
932
933
  function Cj(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);Bj(a,b,e,f,k,l=>{l&&olympe.H.Ba.nb.zb.publish(c,{t:wj,r:l})})},b.get('_burst_interval'))):d.Qc(h)}function Ej(a,b,c,d,e,f){const g=olympe.ha.node.pa.Ia.cd.Rj,h=new olympe.dc.db.Ac;h.F(e,(new Map).set(g,f),0);h.Ra(olympe.dc.kc.Xc,e,olympe.dc.wa(olympe.dm.File));return new Promise((k,l)=>{Bj(a,b,c,d,h,n=>n?l(n):k())})}
933
934
  function Fj(a,b,c){return x(function*(){var d=olympe.ha.node.pa.Ia.cd.Rj,e=olympe.ha.node.pa.Ia.cd.Jh;const f=yield Ij(a.get('_data_model_observer').C,olympe.dc.wa(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`);}())}
934
- olympe.ha.node.pa.Oq=class extends olympe.sc.logic.Xd{constructor(a,b,c,d){super(a,b,c);this.Lc=d;this.ab=olympe.T.getParameter(olympe.H.ob.im)}update(a,[b]){var c=(k,l)=>{let n,p;return null!=(p=null!=(n=olympe.T.getParameter(`${'dbconnector'}.${b}.${k}`))?n:olympe.T.getParameter(`${'dbconnector'}.${k}`))?p:l};a.set('_burst_interval',olympe.T.getParameter(`${'dbconnector'}.${b}.${lj.Fv}`)||5E3);a.set('_polling_frequency',c(lj.ly,6E5));const d=c(lj.client,'pg'),e=c(lj.hostname,''),f=c(lj.Ka),g=c(lj.schema,
935
- b),h=knex({client:d,connection:{host:e,port:c(lj.port),user:c(lj.user),password:c(lj.password),database:f},pool:{min:c(lj.Ix,0),max:c(lj.Hx,10)},acquireConnectionTimeout:c(lj.Iv,6E4)});this.N.info(`SQLConnector ${b} started with host ${e}, database ${f} on schema ${g}`);this.ad=olympe.ra.Xa('sql');a.Jg(()=>h.destroy().then());c=new olympe.ha.node.pa.Ia.Us(h,g,this);a.set('_data_model_observer',c);a.set('_subscription_cache',new Map);yj(this,a,h,g,b)}U(a,b,c,d){a=a.get('_data_model_observer');const e=
936
- a.C,f=new olympe.ha.node.pa.Ia.wu(c,e);Jj(a).then(()=>Kj(f)).then(g=>{if(0===g.length)return[[],g];const h=Lj(new olympe.ha.node.pa.Ia.Nq(f,b,g));this.ad.debug(`Sending a sql query with the following text: ${h.toString()}`);return h.then(k=>[k,g])}).then(([g,h])=>Mj(c.Z(),g,h,e)).then(g=>d(g,null)).catch(g=>d({},g))}wc(a,b,c){olympe.H.Ba.nb.zb.publish(a,{t:pj,i:b,r:c}).then().catch(d=>this.N.error('Error occurred while publishing query result update: '+d))}};
937
- olympe.ha.node.pa.Oq.O=olympe.dc.ya.C('017dc8db8074471acb7a',olympe.ha.node.pa.Oq,olympe.sc.P.Ea,olympe.net.P.Bm);function Dj(a,b){a.C.has(b)?(a=a.C,a.values.has(b)&&a.values.set(b,Date.now())):a.C.add(b)}
938
- class Gj{constructor(a,b,c,d,e,f,g){this.id=a;this.query=b;a=new olympe.W.er(olympe.T.getParameter(olympe.Za.Config.Xl)+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.ra.Xa('Subscription Cache').error(`Error occurred while updating subscription cache update: ${k}`);else if(k=olympe.W.mb(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);
939
- f=new Set(k);c(h)}}),setTimeout(g,d))};setTimeout(g,d)}};olympe.ha.node.pa.Ia={};olympe.ha.node.pa.Ia.Bc={EQUAL:'equal',Sq:'substring',Ro:'filter',Cp:'<=',Dp:'<',ep:'>=',fp:'>',$f:'and',Ih:'or',Xg:'not',Bq:'regex'};olympe.ha.node.pa.Ia.cd={Jh:'tagOlympe',jk:'tagOlympeOrig',Al:'tagOlympeDest',Rj:'fileContent'};const Nj=olympe.ha.node.pa.Ia.cd.jk,Oj=olympe.ha.node.pa.Ia.cd.Al,Pj=olympe.ha.node.pa.Ia.cd.Jh,Qj=olympe.ha.node.pa.Ia.cd.Rj;function Jj(a){return new Promise(b=>{0<a.F?a.U.add(()=>b()):b()})}
935
+ olympe.ha.node.pa.Pq=class extends olympe.sc.logic.Xd{constructor(a,b,c,d){super(a,b,c);this.Lc=d;this.ab=olympe.T.getParameter(olympe.H.ob.im)}update(a,[b]){var c=(k,l)=>{let n,p;return null!=(p=null!=(n=olympe.T.getParameter(`${'dbconnector'}.${b}.${k}`))?n:olympe.T.getParameter(`${'dbconnector'}.${k}`))?p:l};a.set('_burst_interval',olympe.T.getParameter(`${'dbconnector'}.${b}.${lj.Gv}`)||5E3);a.set('_polling_frequency',c(lj.my,6E5));const d=c(lj.client,'pg'),e=c(lj.hostname,''),f=c(lj.Ka),g=c(lj.schema,
936
+ b),h=knex({client:d,connection:{host:e,port:c(lj.port),user:c(lj.user),password:c(lj.password),database:f},pool:{min:c(lj.Jx,0),max:c(lj.Ix,10)},acquireConnectionTimeout:c(lj.Jv,6E4)});this.N.info(`SQLConnector ${b} started with host ${e}, database ${f} on schema ${g}`);this.ad=olympe.ra.Xa('sql');a.Jg(()=>h.destroy().then());c=new olympe.ha.node.pa.Ia.Vs(h,g,this);a.set('_data_model_observer',c);a.set('_subscription_cache',new Map);yj(this,a,h,g,b)}U(a,b,c,d){a=a.get('_data_model_observer');const e=
937
+ a.C,f=new olympe.ha.node.pa.Ia.xu(c,e);Jj(a).then(()=>Kj(f)).then(g=>{if(0===g.length)return[[],g];const h=Lj(new olympe.ha.node.pa.Ia.Oq(f,b,g));this.ad.debug(`Sending a sql query with the following text: ${h.toString()}`);return h.then(k=>[k,g])}).then(([g,h])=>Mj(c.Z(),g,h,e)).then(g=>d(g,null)).catch(g=>d({},g))}wc(a,b,c){olympe.H.Ba.nb.zb.publish(a,{t:pj,i:b,r:c}).then().catch(d=>this.N.error('Error occurred while publishing query result update: '+d))}};
938
+ olympe.ha.node.pa.Pq.O=olympe.dc.ya.C('017dc8db8074471acb7a',olympe.ha.node.pa.Pq,olympe.sc.P.Ea,olympe.net.P.Bm);function Dj(a,b){a.C.has(b)?(a=a.C,a.values.has(b)&&a.values.set(b,Date.now())):a.C.add(b)}
939
+ class Gj{constructor(a,b,c,d,e,f,g){this.id=a;this.query=b;a=new olympe.W.fr(olympe.T.getParameter(olympe.Za.Config.Xl)+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.ra.Xa('Subscription Cache').error(`Error occurred while updating subscription cache update: ${k}`);else if(k=olympe.W.mb(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);
940
+ f=new Set(k);c(h)}}),setTimeout(g,d))};setTimeout(g,d)}};olympe.ha.node.pa.Ia={};olympe.ha.node.pa.Ia.Bc={EQUAL:'equal',Tq:'substring',Ro:'filter',Dp:'<=',Ep:'<',ep:'>=',fp:'>',$f:'and',Ih:'or',Xg:'not',Cq:'regex'};olympe.ha.node.pa.Ia.cd={Jh:'tagOlympe',jk:'tagOlympeOrig',Al:'tagOlympeDest',Rj:'fileContent'};const Nj=olympe.ha.node.pa.Ia.cd.jk,Oj=olympe.ha.node.pa.Ia.cd.Al,Pj=olympe.ha.node.pa.Ia.cd.Jh,Qj=olympe.ha.node.pa.Ia.cd.Rj;function Jj(a){return new Promise(b=>{0<a.F?a.U.add(()=>b()):b()})}
940
941
  function Rj(a){Sj(a,olympe.dc.wa(olympe.dm.File));const b=new Map;a.G.sb(olympe.sc.logic.Xd.C).observe(a.L).subscribe(c=>{xe(c).forEach(d=>{const e=d.R();Tj(a,()=>{var g=Uj;const h=[{name:Pj,Ze:Pj,Yk:!1}];e===olympe.dc.wa(olympe.dm.File)&&h.push({name:Qj,Ze:Qj,Yk:!1});return g(a,e,e,h)},`Create Table for ${e}`);const f=new olympe.D.Xb('Business model context',a.L);b.set(e,f);f.run(()=>Vj(a,f,e))});ye(c).forEach(d=>{b.get(d).destroy();Tj(a,()=>Wj(a,d),`Delete Table for ${d}`)})})}
941
942
  function Xj(a){a.F++;1===a.F&&a.N.debug('Data model observer is busy')}function Yj(a){a.F--;if(0===a.F){a.N.debug('Data model observer is free');for(const b of a.U)b();a.U.clear()}}function Sj(a,b){if(!a.db.$k(a.G,olympe.sc.logic.Xd.C,b)){Xj(a);const c=new olympe.dc.Transaction;c.Ra(olympe.sc.logic.Xd.C,a.G,b);c.hb((d,e)=>{d||a.N.error(`Error while linking the business model ${b} to the SQLConnector: ${e}`);Yj(a)},!0)}}function Zj(a){return a.client.schema.withSchema(a.schema)}
942
943
  function Tj(a,b,c){if(!a.L.G()&&!a.L.Ab()){a.N.debug(`Push operation:${c}`);Xj(a);var d=a.Y,e=()=>{d.shift();Yj(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()}}
943
- function Uj(a,b,c,d){return x(function*(){if(yield Zj(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 Zj(a).createTable(b,e=>{d.forEach(({name:f,Ze:g,Fr:h,ms:k,Yk:l})=>{ak(a,e,f,g,l,k,h)})}).then(()=>{var e=a.C;e.C.set(c,b);e.G.set(b,c)})}())}
944
+ function Uj(a,b,c,d){return x(function*(){if(yield Zj(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 Zj(a).createTable(b,e=>{d.forEach(({name:f,Ze:g,Gr:h,ns:k,Yk:l})=>{ak(a,e,f,g,l,k,h)})}).then(()=>{var e=a.C;e.C.set(c,b);e.G.set(b,c)})}())}
944
945
  function Vj(a,b,c){b.onDestroy(()=>{Tj(a,()=>Promise.all(Array.from(a.La.get(c)).map(d=>Wj(a,d))).then(()=>{a.La.delete(c)}),`Destroy relation tables of business model ${c}: relations: ${a.La.get(c)}`)});a.yn(c,b);a.La.set(c,new Set);olympe.dc.gb.from(c).sb(olympe.dc.CloudObject.G).Wi().sb(olympe.dm.Relation.destinationModelRel).Wi().filter((new olympe.dc.ba.V.De(a.G)).sb(olympe.sc.logic.Xd.C.Gc())).observe(b).subscribe(d=>{0<xe(d).length&&(a.N.debug('Handle new relations : '+xe(d)),Tj(a,()=>Promise.all(xe(d).map(([e,
945
- f])=>{a.La.get(c).add(e.R());a.La.get(f.R()).add(e.R());e=e.R();var g=Uj;f=f.R();return g(a,e,e,[{name:Nj,Ze:Nj,ms:c,Fr:Pj,Yk:!0},{name:Oj,Ze:Oj,ms:f,Fr:Pj,Yk:!0}])})).then(),`Add relation tables for business model ${c}: ${xe(d)}`));0<ye(d).length&&(a.N.debug('Handle relations to remove : '+ye(d)),Tj(a,()=>Promise.all(ye(d).map(([e,f])=>{a.La.get(c).delete(e);a.La.get(f).delete(e);return Wj(a,e)})).then(),`Delete relation tables for business model ${c}: ${ye(d)}`))})}
946
+ f])=>{a.La.get(c).add(e.R());a.La.get(f.R()).add(e.R());e=e.R();var g=Uj;f=f.R();return g(a,e,e,[{name:Nj,Ze:Nj,ns:c,Gr:Pj,Yk:!0},{name:Oj,Ze:Oj,ns:f,Gr:Pj,Yk:!0}])})).then(),`Add relation tables for business model ${c}: ${xe(d)}`));0<ye(d).length&&(a.N.debug('Handle relations to remove : '+ye(d)),Tj(a,()=>Promise.all(ye(d).map(([e,f])=>{a.La.get(c).delete(e);a.La.get(f).delete(e);return Wj(a,e)})).then(),`Delete relation tables for business model ${c}: ${ye(d)}`))})}
946
947
  function Wj(a,b){return x(function*(){try{var c=yield Ij(a.C,b)}catch(d){a.N.warn(`Try to delete a table not registered: ${d}`);return}if(yield Zj(a).hasTable(c)){Zj(a).dropTable(c);c=a.C;const d=c.C.get(b);c.G.delete(d)||c.C.delete(b)}}())}
947
948
  function bk(a,b,c,d){return x(function*(){const e=yield Ij(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 Zj(a).table(e,k=>{const l=new Set(Object.keys(h));f.forEach((n,p)=>{!l.has(n)&&ak(a,k,n,c[p])});g.forEach(n=>{l.has(n)&&k.dropColumn(n)})})}())}
948
949
  function ak(a,b,c,d,e=!1,f='',g=''){if(c===Pj)b.string(c,21).primary();else if(c===Nj||c===Oj){if(e)b.string(c).notNullable().references(g).inTable(`${a.schema}.${f}`).onDelete('CASCADE')}else c===Qj?b.binary(c):d&&(a=a.db,d=olympe.dc.od.from(d).sb(olympe.dm.Property.typeRel).jd(),a.Tf(d,olympe.dm.String)?b.string(c,1E3):a.Tf(d,olympe.dm.Number)?b.double(c):a.Tf(d,olympe.dm.Boolean)?b.boolean(c):a.Tf(d,olympe.dm.DateTime)?b.string(c):a.Tf(d,olympe.dm.Color)&&b.string(c,50))}
949
- olympe.ha.node.pa.Ia.Us=class{constructor(a,b,c){this.N=olympe.ra.Xa('sql');this.client=a;this.schema=b;this.G=c;this.C=new olympe.ha.node.pa.Ia.dv;this.L=new olympe.D.Xb(`Data Model Observer of ${c.R()}`);this.Y=[];this.F=0;this.La=new Map;this.U=new Set;this.db=olympe.dc.Oa();Rj(this)}yn(a,b){this.N.debug('Observe properties for '+a);olympe.dc.gb.from(a).sb(olympe.dc.CloudObject.propertyRel).observe(b).subscribe(c=>{this.N.debug('New properties for '+a+' '+xe(c));Tj(this,()=>bk(this,a,xe(c).map(d=>
950
- d.R()),ye(c)),`Update columns of ${a}: added: ${xe(c)}, removed: ${ye(c)}`)})}};const ck=olympe.ha.node.pa.Ia.Bc.EQUAL,dk=olympe.ha.node.pa.Ia.Bc.$f,ek=olympe.ha.node.pa.Ia.Bc.Ih,fk=olympe.ha.node.pa.Ia.Bc.Xg,gk=olympe.ha.node.pa.Ia.Bc.Ro,hk=olympe.ha.node.pa.Ia.Bc.ep,ik=olympe.ha.node.pa.Ia.Bc.fp,jk=olympe.ha.node.pa.Ia.Bc.Cp,kk=olympe.ha.node.pa.Ia.Bc.Dp,lk=olympe.ha.node.pa.Ia.Bc.Bq,mk=olympe.ha.node.pa.Ia.Bc.Sq,nk=olympe.ha.node.pa.Ia.cd.Jh;
950
+ olympe.ha.node.pa.Ia.Vs=class{constructor(a,b,c){this.N=olympe.ra.Xa('sql');this.client=a;this.schema=b;this.G=c;this.C=new olympe.ha.node.pa.Ia.ev;this.L=new olympe.D.Xb(`Data Model Observer of ${c.R()}`);this.Y=[];this.F=0;this.La=new Map;this.U=new Set;this.db=olympe.dc.Oa();Rj(this)}yn(a,b){this.N.debug('Observe properties for '+a);olympe.dc.gb.from(a).sb(olympe.dc.CloudObject.propertyRel).observe(b).subscribe(c=>{this.N.debug('New properties for '+a+' '+xe(c));Tj(this,()=>bk(this,a,xe(c).map(d=>
951
+ d.R()),ye(c)),`Update columns of ${a}: added: ${xe(c)}, removed: ${ye(c)}`)})}};const ck=olympe.ha.node.pa.Ia.Bc.EQUAL,dk=olympe.ha.node.pa.Ia.Bc.$f,ek=olympe.ha.node.pa.Ia.Bc.Ih,fk=olympe.ha.node.pa.Ia.Bc.Xg,gk=olympe.ha.node.pa.Ia.Bc.Ro,hk=olympe.ha.node.pa.Ia.Bc.ep,ik=olympe.ha.node.pa.Ia.Bc.fp,jk=olympe.ha.node.pa.Ia.Bc.Dp,kk=olympe.ha.node.pa.Ia.Bc.Ep,lk=olympe.ha.node.pa.Ia.Bc.Cq,mk=olympe.ha.node.pa.Ia.Bc.Tq,nk=olympe.ha.node.pa.Ia.cd.Jh;
951
952
  function Kj(a){return x(function*(){var b=a.query.G;let c=b;var d=[];const e=a.query.C;let f=olympe.dc.Oa().mj(b);!f&&e[0]instanceof olympe.dc.ba.Hb.hf&&(f=e[0].Qd().qb(olympe.dc.CloudObject.instancesRel));if(f){try{var g=yield Ij(a.F,b)}catch(l){return[]}f=!0;e.shift()}else{try{var h=yield a.F.Tb(b,'')}catch(l){return[]}c=h;g=yield Promise.resolve([['tagOlympe',b]]);1<g.length?d.push(['',dk,g.map(([l,n])=>[l,ck,ok(n)])]):d.push([g[0][0],ck,ok(g[0][1])]);g=yield Ij(a.F,h)}h=pk(a,g);b=Array.from(a.query.F);
952
953
  b=b.includes(0)||b.includes(1)&&f;var k=[];if(b){const l=a.query.Z(),n=qk(a.F,l,c,nk);k=olympe.dc.gb.from(c).sb(olympe.dc.CloudObject.propertyRel).jd().map(q=>q.R());const p=yield Promise.all(k.map(q=>Promise.resolve(q)));k=k.map(q=>qk(a.F,l,c,q)).map((q,r)=>[q,p[r]]);k.unshift([n,nk])}a.G.limit=a.query.max;a.G.offset=a.query.offset;a.C.push({Kg:b,recursive:!1,filters:d,jh:'',$h:'',Wh:k,fh:h,name:g});d=0;for(const l of e)d=yield rk(a,l,d,f);return a.C}())}
953
954
  function pk(a,b){a.U++;return`alias-${b.charAt(0)}${a.U}`}function rk(a,b,c,d){let e=c;switch(!0){case b instanceof olympe.dc.ba.Hb.hf:case b instanceof olympe.dc.ba.Hb.jf:e+=1;a=sk(a,b,e,d);break;case b instanceof olympe.dc.ba.Hb.vc:a=tk(a,b);break;case b instanceof olympe.dc.ba.Hb.Nh:a=uk(a,b);break;default:a=Promise.reject(`Query part ${b.toString()} could not be parsed`)}return a.then(()=>e)}
954
955
  function sk(a,b,c,d){const e=b.Qd().R(),f=b.Qd().Pa()===olympe.dc.Aa.ORIGIN?olympe.dm.Relation.originModelRel:olympe.dm.Relation.destinationModelRel;let g=b instanceof olympe.dc.ba.Hb.jf;const h=olympe.dm.Relation.F.Yl,k=olympe.dc.od.from(e).sb(f).jd();c=d?c+1:c;const l=Array.from(a.query.F).includes(c),[n,p]=['',''];return Ij(a.F,k.R()).then(q=>x(function*(){const r=pk(a,q),t=[];let u=Promise.resolve();h===olympe.dm.Relation.F.Yl&&(u=Ij(a.F,e).then(v=>{const w=pk(a,v),[y,B]=vk(b.Qd().Pa());a.C.push({Kg:!1,
955
956
  fh:w,name:v,Wh:[],jh:y,$h:B,filters:[],recursive:g});g=!1}));return u.then(()=>x(function*(){let v=[];var w=Promise.resolve([]);let y=[];if(l){const B=a.query.Z(),E=qk(a.F,B,k.R(),nk);w=olympe.dc.gb.from(k.R()).sb(olympe.dc.CloudObject.propertyRel).Wi().jd().map(I=>I.R());v=w.map(I=>qk(a.F,B,k.R(),I));w=Promise.all(w.map(I=>Promise.resolve(I)));y.push([qk(a.F,B,k.R(),nk),nk]);const S=yield w;y=v.map((I,Z)=>[I,S[Z]]);y.unshift([E,nk])}a.C.push({Kg:l,fh:r,name:q,Wh:y,jh:n,$h:p,filters:t,recursive:g})}()))}()))}
956
- function tk(a,b){return a.L(b.C).then(c=>{a.C[a.C.length-1].filters.push(c)})}function uk(a,b){a.G.order=b.order;a.G.aliasSorting=a.C[a.C.length].fh;return Promise.resolve(b.fb().R()).then(c=>{a.G.columnSorting=c})}function vk(a){const b=olympe.ha.node.pa.Ia.cd.jk,c=olympe.ha.node.pa.Ia.cd.Al;return a===olympe.dc.Aa.ORIGIN?[c,b]:[b,c]}
957
- olympe.ha.node.pa.Ia.wu=class{constructor(a,b){this.query=a;this.U=0;this.F=b;this.C=[];this.G={}}L(a){switch(!0){case a instanceof olympe.dc.ba.V.Ic:const c=a.C;return Promise.resolve(a.fb()).then(h=>[h,ck,ok(c)]);case a instanceof olympe.dc.ba.V.Wc:const d=a.substring;return Promise.resolve(a.fb()).then(h=>[h,mk,d]);case a instanceof olympe.dc.ba.V.wd: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)?
957
+ function tk(a,b){return a.L(b.C).then(c=>{a.C[a.C.length-1].filters.push(c)})}function uk(a,b){a.G.order=b.order;a.G.aliasSorting=a.C[a.C.length-1].fh;return Promise.resolve(b.fb().R()).then(c=>{a.G.columnSorting=c})}function vk(a){const b=olympe.ha.node.pa.Ia.cd.jk,c=olympe.ha.node.pa.Ia.cd.Al;return a===olympe.dc.Aa.ORIGIN?[c,b]:[b,c]}
958
+ olympe.ha.node.pa.Ia.xu=class{constructor(a,b){this.query=a;this.U=0;this.F=b;this.C=[];this.G={}}L(a){switch(!0){case a instanceof olympe.dc.ba.V.Ic:const c=a.C;return Promise.resolve(a.fb()).then(h=>[h,ck,ok(c)]);case a instanceof olympe.dc.ba.V.Wc:const d=a.substring;return Promise.resolve(a.fb()).then(h=>[h,mk,d]);case a instanceof olympe.dc.ba.V.wd: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)?
958
959
  Promise.resolve(a.fb()).then(h=>[h,lk,a.C]):Promise.reject(`Query not supported for regex : ${b}`);case a instanceof olympe.dc.ba.V.nd:return this.L(a.C).then(h=>['',fk,h]);case a instanceof olympe.dc.ba.V.De: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.ld().map((h,k)=>Promise.resolve(h.R()).then(l=>{const [n,p]=vk(h.Pa());let q=[];e&&k===a.ld().length-1&&(q=[[p,ck,ok(e)]]);return{name:l,
959
960
  recursive:f[k],Wh:[],jh:n,$h:p,filters:q,fh:pk(this,l),Kg:!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,Wh:[[nk,nk]],jh:'',$h:'',filters:[],fh:pk(this,k.name),Kg:!0};h.unshift(k);return g.then(l=>['',gk,{target:l,La:h}])});case a instanceof olympe.dc.ba.V.Ch:return Promise.resolve(a.fb()).then(h=>('number'===typeof a.C?Promise.resolve(a.C):Promise.resolve(a.C.R())).then(k=>{var l=
960
961
  a.G;return Promise.resolve([h,a.F?l?kk:jk:l?ik:hk,k])}));case a instanceof olympe.dc.ba.V.Ud:return b=Array.from(a.V).flatMap(this.L.bind(this)),Promise.all(b).then(h=>['',dk,h]);case a instanceof olympe.dc.ba.V.ae:return b=Array.from(a.V).flatMap(this.L.bind(this)),Promise.all(b).then(h=>['',ek,h]);default:return Promise.reject('Failed to parse predicate')}}};function Mj(a,b,c,d){const e=[],f=new olympe.dc.transaction.vd;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 wk(c,d).then(p=>{for(const r of b){const [t,u,v]=xk(a,r,p,d,c,n);for(const [w,y,B]of v)f.Ra(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.L.set(w,q),f.F(w,new Map(y),0),f.Ra(olympe.dc.CloudObject.modelRel.R(),w,q,0)}d.F.delete(a);return{k:e,p:$d(f)}})}
961
962
  function wk(a,b){const c=[],d=[],e=[],f=[];for(let g=1;g<a.length-1;g+=2)(a[g-1].Kg||1===g)&&a[g+1].Kg&&(d.push(b.nh(a[g-1].name)),e.push(b.nh(a[g+1].name)),c.push(Promise.resolve(b.G.get(a[g].name))),f.push(a[g].jh===olympe.ha.node.pa.Ia.cd.jk?olympe.dc.Aa.DESTINATION:olympe.dc.Aa.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]]))}
962
963
  function xk(a,b,c,d,e,f){const g=olympe.ha.node.pa.Ia.cd.Jh;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=yk(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.Aa.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.Aa.DESTINATION?[y,f,b]:[y,b,f]),n++)}}p.set(b,[]);q.set(b,t);d.L.set(b,t);k=t;
963
- l=b}else h===parseInt(t[0],10)&&(t=t[1],p.get(l).push([t,b]))}return[p,q,r]}olympe.ha.node.pa.Ia.JA=class{};function Lj(a){const b=a.C,{offset:c,limit:d,GC:e,order:f,BC:g}=a.U.G;-1<d&&b.limit(d);0<c&&b.offset(c);e&&f&&b.orderBy(`${g}.${e}`,f.toLowerCase());for(const [h,{Kg:k,fh:l,name:n,filters:p,recursive:q,Wh:r,jh:t,$h:u}]of a.Y.entries())zk(a,b,k,l,n,p,q,0===h,t,u,r);return b}
964
+ l=b}else h===parseInt(t[0],10)&&(t=t[1],p.get(l).push([t,b]))}return[p,q,r]}olympe.ha.node.pa.Ia.KA=class{};function Lj(a){const b=a.C,{offset:c,limit:d,HC:e,order:f,CC:g}=a.U.G;-1<d&&b.limit(d);0<c&&b.offset(c);e&&f&&b.orderBy(`${g}.${e}`,f.toLowerCase());for(const [h,{Kg:k,fh:l,name:n,filters:p,recursive:q,Wh:r,jh:t,$h:u}]of a.Y.entries())zk(a,b,k,l,n,p,q,0===h,t,u,r);return b}
964
965
  function zk(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&&Ak(a,b,d,f,olympe.ha.node.pa.Ia.qd.NONE);h?(b.from(`${e} as ${d}`),a.G=d,a.F=l):(g&&(f=`cte${a.L++}`,Bk(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=
965
966
  l}))}
966
- function Ak(a,b,c,d,e){const f=olympe.ha.node.pa.Ia.Bc.EQUAL,g=olympe.ha.node.pa.Ia.Bc.$f,h=olympe.ha.node.pa.Ia.Bc.Ih,k=olympe.ha.node.pa.Ia.Bc.Xg,l=olympe.ha.node.pa.Ia.Bc.Ro,n=olympe.ha.node.pa.Ia.Bc.ep,p=olympe.ha.node.pa.Ia.Bc.fp,q=olympe.ha.node.pa.Ia.Bc.Cp,r=olympe.ha.node.pa.Ia.Bc.Dp,t=olympe.ha.node.pa.Ia.Bc.Bq,u=olympe.ha.node.pa.Ia.Bc.Sq;if(1<d.length)Ck(b,olympe.ha.node.pa.Ia.qd.$f,Dk(a,d,olympe.ha.node.pa.Ia.qd.$f,c));else{var [v,w,y]=d[0];d=`${c}.${v}`;switch(w){case f:Ek(b,e,d,'=',
967
- y.v,!1);break;case u:a=Fk('.*',b.client.dialect);Ek(b,e,d,'LIKE',`${a}${y}${a}`,!1);break;case l:const B=y.relations,E=`cte${a.L++}`,S=new olympe.ha.node.pa.Ia.Nq(a.U,a.C,B),I=olympe.ha.node.pa.Ia.cd.Jh;a.C.with(E,Z=>{for(const [Sk,{Kg:Tk,fh:Uk,name:Vk,filters:Wk,recursive:Xk,Wh:Yk,jh:Zk,$h:$k}]of B.entries())zk(S,Z,Tk,Uk,Vk,Wk,Xk,0===Sk,Zk,$k,Yk);return Z});a.C.whereIn(b.client.raw('??.??',[c,I]),function(Z){Z.select(b.client.raw('??.??',[E,I])).from(E)});break;case q:Ek(b,e,d,'<=',y,'string'===
967
+ function Ak(a,b,c,d,e){const f=olympe.ha.node.pa.Ia.Bc.EQUAL,g=olympe.ha.node.pa.Ia.Bc.$f,h=olympe.ha.node.pa.Ia.Bc.Ih,k=olympe.ha.node.pa.Ia.Bc.Xg,l=olympe.ha.node.pa.Ia.Bc.Ro,n=olympe.ha.node.pa.Ia.Bc.ep,p=olympe.ha.node.pa.Ia.Bc.fp,q=olympe.ha.node.pa.Ia.Bc.Dp,r=olympe.ha.node.pa.Ia.Bc.Ep,t=olympe.ha.node.pa.Ia.Bc.Cq,u=olympe.ha.node.pa.Ia.Bc.Tq;if(1<d.length)Ck(b,olympe.ha.node.pa.Ia.qd.$f,Dk(a,d,olympe.ha.node.pa.Ia.qd.$f,c));else{var [v,w,y]=d[0];d=`${c}.${v}`;switch(w){case f:Ek(b,e,d,'=',
968
+ y.v,!1);break;case u:a=Fk('.*',b.client.dialect);Ek(b,e,d,'LIKE',`${a}${y}${a}`,!1);break;case l:const B=y.relations,E=`cte${a.L++}`,S=new olympe.ha.node.pa.Ia.Oq(a.U,a.C,B),I=olympe.ha.node.pa.Ia.cd.Jh;a.C.with(E,Z=>{for(const [Sk,{Kg:Tk,fh:Uk,name:Vk,filters:Wk,recursive:Xk,Wh:Yk,jh:Zk,$h:$k}]of B.entries())zk(S,Z,Tk,Uk,Vk,Wk,Xk,0===Sk,Zk,$k,Yk);return Z});a.C.whereIn(b.client.raw('??.??',[c,I]),function(Z){Z.select(b.client.raw('??.??',[E,I])).from(E)});break;case q:Ek(b,e,d,'<=',y,'string'===
968
969
  typeof y);break;case r:Ek(b,e,d,'<',y,'string'===typeof y);break;case n:Ek(b,e,d,'>=',y,'string'===typeof y);break;case p:Ek(b,e,d,'>',y,'string'===typeof y);break;case g:Ck(b,e,Dk(a,y,olympe.ha.node.pa.Ia.qd.$f,c));break;case h:Ck(b,e,Dk(a,y,olympe.ha.node.pa.Ia.qd.Ih,c));break;case k:Ck(b,olympe.ha.node.pa.Ia.qd.Xg,Dk(a,[y],olympe.ha.node.pa.Ia.qd.Xg,c));break;case t:e=Gk(y,b.client.dialect),b.whereRaw('?? LIKE ?',[d,e])}}}
969
- function Bk(a,b,c,d,e){var f=['tagOlympe'];const g=Hk(f,d),h=Hk(f,c),k=g.map((l,n)=>[l,h[n]]);b.withRecursive(c,g,l=>{l.select(g).from({[d]:e}).oD(n=>n.select(g).from({[d]:e}).join(c,()=>{a.on(Object.fromEntries(k))}))})}function Hk(a,b){return a.map(c=>`${b}.${c}`)}
970
+ function Bk(a,b,c,d,e){var f=['tagOlympe'];const g=Hk(f,d),h=Hk(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 Hk(a,b){return a.map(c=>`${b}.${c}`)}
970
971
  function Ck(a,b,c){switch(b){case olympe.ha.node.pa.Ia.qd.NONE:a.where(c);break;case olympe.ha.node.pa.Ia.qd.$f:a.andWhere(c);break;case olympe.ha.node.pa.Ia.qd.Ih:a.orWhere(c);break;case olympe.ha.node.pa.Ia.qd.Xg:a.whereNot(c);break;default:olympe.ra.Xa('storage').error(`Where operand ${b} not recognized`)}}function Dk(a,b,c,d){return e=>{for(let f=0;f<b.length;++f)Ak(a,e,d,[b[f]],0===f?olympe.ha.node.pa.Ia.qd.NONE:c)}}
971
972
  function Ek(a,b,c,d,e,f){e=f?a.client.raw(e):e;switch(b){case olympe.ha.node.pa.Ia.qd.NONE:a.where(c,d,e);break;case olympe.ha.node.pa.Ia.qd.$f:a.andWhere(c,d,e);break;case olympe.ha.node.pa.Ia.qd.Ih:a.orWhere(c,d,e);break;case olympe.ha.node.pa.Ia.qd.Xg:a.whereNot(c,d,e);break;default:olympe.ra.Xa('storage').error(`Where operand ${b} not recognized`)}}function Fk(a,b){const c={'.+?':'_','.*':'%','.+':'_%'},d={'.+?':'?','.*':'*','.+':'?*'};return'mssql'===b?d[a]:c[a]}
972
973
  function Gk(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=/^(\.\+\?|\.\*|\.\+)/;
973
974
  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=[Fk(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,
974
- a.length)}return c+d+e}olympe.ha.node.pa.Ia.Nq=class{constructor(a,b,c){this.U=a;this.C=b;this.G=this.F='';this.L=0;this.Y=c}};olympe.ha.node.pa.Ia.qd={$f:'&',Ih:'|',Xg:'!',NONE:''};const Ik=olympe.ha.node.pa.Ia.cd.jk,Jk=olympe.ha.node.pa.Ia.cd.Al,Kk=olympe.ha.node.pa.Ia.cd.Jh,Lk=olympe.ha.node.pa.Ia.cd.Rj,Mk=olympe.dc.$b.VERSION,Nk=olympe.dc.$b.Jd;function Hj(a,b,c){return x(function*(){yield Jj(a.L);return b.transaction(d=>x(function*(){for(const e of a.ua)yield e(d.withSchema(c));a.N.debug('Transaction just before commit: ',d.toString());return d}())).finally(()=>{a.ua.length=0;a.G.clear();a.N.debug('Transaction completed')})}())}
975
- olympe.ha.node.pa.Ia.Pq=class{constructor(a,b){this.N=a;this.L=b;this.C=b.C;this.G=new Map;this.ua=[]}uh(a,b,c=!0){a=c?{[Kk]:a}:{};for(const [d,e]of b)b=ok(e),a[d]=b.v;return a}F(a,b){b.delete(Nk);b.delete(Mk);this.G.set(a,b||new Map)}tc(a,b){this.ua.push(c=>{const d=this;return x(function*(){b.delete(Mk);var e=yield d.C.Tb(a,'');e=yield Ij(d.C,e);yield c.table(e).where(Kk,a).update(d.uh(a,b,!1))}())})}Mc(a){this.ua.push(b=>{const c=this;return x(function*(){var d=yield c.C.Tb(a,'');d=yield Ij(c.C,
975
+ a.length)}return c+d+e}olympe.ha.node.pa.Ia.Oq=class{constructor(a,b,c){this.U=a;this.C=b;this.G=this.F='';this.L=0;this.Y=c}};olympe.ha.node.pa.Ia.qd={$f:'&',Ih:'|',Xg:'!',NONE:''};const Ik=olympe.ha.node.pa.Ia.cd.jk,Jk=olympe.ha.node.pa.Ia.cd.Al,Kk=olympe.ha.node.pa.Ia.cd.Jh,Lk=olympe.ha.node.pa.Ia.cd.Rj,Mk=olympe.dc.$b.VERSION,Nk=olympe.dc.$b.Jd;function Hj(a,b,c){return x(function*(){yield Jj(a.L);return b.transaction(d=>x(function*(){for(const e of a.ua)yield e(d.withSchema(c));a.N.debug('Transaction just before commit: ',d.toString());return d}())).finally(()=>{a.ua.length=0;a.G.clear();a.N.debug('Transaction completed')})}())}
976
+ olympe.ha.node.pa.Ia.Qq=class{constructor(a,b){this.N=a;this.L=b;this.C=b.C;this.G=new Map;this.ua=[]}uh(a,b,c=!0){a=c?{[Kk]:a}:{};for(const [d,e]of b)b=ok(e),a[d]=b.v;return a}F(a,b){b.delete(Nk);b.delete(Mk);this.G.set(a,b||new Map)}tc(a,b){this.ua.push(c=>{const d=this;return x(function*(){b.delete(Mk);var e=yield d.C.Tb(a,'');e=yield Ij(d.C,e);yield c.table(e).where(Kk,a).update(d.uh(a,b,!1))}())})}Mc(a){this.ua.push(b=>{const c=this;return x(function*(){var d=yield c.C.Tb(a,'');d=yield Ij(c.C,
976
977
  d);var e=olympe.dc.gb.from(d).sb(olympe.dc.CloudObject.G).jd();for(var f of e.keys())e=yield Promise.resolve(f),yield b.table(e).where(Ik,a).del();f=olympe.dc.gb.from(d).sb(olympe.dc.CloudObject.U).jd();for(const g of f.keys())f=yield Promise.resolve(g),yield b.table(f).where(Jk,a).del();yield b.table(d).where(Kk,a).del()}())})}Ra(a,b,c){a===olympe.dc.kc.Xc?(Sj(this.L,c),this.ua.push(d=>{const e=this;return x(function*(){const f=e.G.get(b),g=yield Ij(e.C,c);c!==olympe.dc.wa(olympe.dm.File)||f.has(Lk)?
977
- (e.C.L.set(b,c),yield d.table(g).insert(e.uh(b,f,!0))):yield d.table(g).where(Kk,b).update(e.uh(b,f,!1))}())})):this.ua.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d.table(e).insert({[Ik]:b,[Jk]:c})}()))}ec(a,b,c){this.ua.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d.table(e).where({[Ik]:b,[Jk]:c}).del()}()))}};olympe.ha.node.pa.Ia.Pq.la=[olympe.dc.Writable];function Ij(a,b){return(a=a.C.get(b))?Promise.resolve(a):Promise.reject(`No table were found for model ${a}`)}function qk(a,b,c,d){let e=a.F.get(b);e||(e=new Map,a.F.set(b,e));a=e.get(c);a||(a=e.size+1,e.set(c,a));return`${a};${d}`}function yk(a,b,c){a=a.F.get(b)||new Map;return(a=Array.from(a).find(([,d])=>d===c))&&a[0]||null}
978
- olympe.ha.node.pa.Ia.dv=class{constructor(){this.L=new Map;this.F=new Map;this.C=new Map;this.G=new Map}static R(a,b,c){return c?b[0][1]:''}nh(a){return Promise.resolve(a)}fb(a){return Promise.resolve(a)}Tb(a){return(a=this.L.get(a))?Promise.resolve(a):Promise.reject('GET MODEL TAG OF INSTANCE NOT IMPLEMENTED')}};function ok(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.Qf().valueOf()}.${a.Kf().valueOf()}.${a.Ff().valueOf()}.${a.Ef().valueOf()}`}return{t:b,v:c}}olympe.ha.node.pa.Ia.yC=class{};olympe.ha.node.host={};olympe.ha.node.host.Hd=function(a,b){this.uid=a;this.N=b};olympe.ha.node.host.Hd.prototype.constructor=olympe.ha.node.host.Hd;olympe.ha.node.host.Hd.prototype.destroy=function(){};olympe.ha.node.host.Hd.prototype.destroy=olympe.ha.node.host.Hd.prototype.destroy;olympe.ha.node.host.Hd.prototype.Xa=function(){return this.N};olympe.ha.node.host.Hd.la=[olympe.host.ba.Hd];olympe.ha.node.host.Zp=class{constructor(a){this.N=a}oj(){return!1}bl(){this.N.error('No history manager implemented in Node')}C(){this.bl();return Gb()}F(){this.bl()}};olympe.ha.node.host.Zp.la=[olympe.host.Ei];olympe.ha.node.host.gd=class{constructor(){this.C={};this.L={}}destroy(){}U(a){clearTimeout(this.C[a]);delete this.C[a]}aa(a,b,c){this.C[b]=setTimeout(c,a)}G(a){clearTimeout(this.C[a]);delete this.C[a]}Y(a,b,c){this.L[b]=setInterval(c,a)}F(a){clearInterval(this.L[a]);delete this.L[a]}};olympe.host.Yp.register(olympe.host.ba.Xp.qr,olympe.ha.node.host.gd);olympe.ha.node.host.gd.la=[olympe.host.ba.gd];olympe.ha.node.host.yk=class{constructor(a){this.N=a}};olympe.ha.node.host.yk.la=[olympe.host.yk];olympe.T.config(function(a){qa(a,olympe.host.P.Il,olympe.ha.node.host.Zp,olympe.host.P.Ea);qa(a,olympe.host.P.Vq,olympe.ha.node.host.yk,olympe.host.P.Ea)},'olympe.native.node.host');olympe.net.rd={};olympe.net.rd.Ml=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.F=this.G=this.L=null}Z(){return this.id}open(a){const b=`#${this.id}`,c=this.Y(a);c.binaryType='arraybuffer';c.onopen=()=>{this.N.info('Websocket OPENED');this.L?(this.N.debug('Notifying upper layer for WebSocket',b),this.L()):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=
978
+ (e.C.L.set(b,c),yield d.table(g).insert(e.uh(b,f,!0))):yield d.table(g).where(Kk,b).update(e.uh(b,f,!1))}())})):this.ua.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d.table(e).insert({[Ik]:b,[Jk]:c})}()))}ec(a,b,c){this.ua.push(d=>x(function*(){const e=yield Promise.resolve(a);yield d.table(e).where({[Ik]:b,[Jk]:c}).del()}()))}};olympe.ha.node.pa.Ia.Qq.la=[olympe.dc.Writable];function Ij(a,b){return(a=a.C.get(b))?Promise.resolve(a):Promise.reject(`No table were found for model ${a}`)}function qk(a,b,c,d){let e=a.F.get(b);e||(e=new Map,a.F.set(b,e));a=e.get(c);a||(a=e.size+1,e.set(c,a));return`${a};${d}`}function yk(a,b,c){a=a.F.get(b)||new Map;return(a=Array.from(a).find(([,d])=>d===c))&&a[0]||null}
979
+ olympe.ha.node.pa.Ia.ev=class{constructor(){this.L=new Map;this.F=new Map;this.C=new Map;this.G=new Map}static R(a,b,c){return c?b[0][1]:''}nh(a){return Promise.resolve(a)}fb(a){return Promise.resolve(a)}Tb(a){return(a=this.L.get(a))?Promise.resolve(a):Promise.reject('GET MODEL TAG OF INSTANCE NOT IMPLEMENTED')}};function ok(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.Qf().valueOf()}.${a.Kf().valueOf()}.${a.Ff().valueOf()}.${a.Ef().valueOf()}`}return{t:b,v:c}}olympe.ha.node.pa.Ia.zC=class{};olympe.ha.node.host={};olympe.ha.node.host.Hd=function(a,b){this.uid=a;this.N=b};olympe.ha.node.host.Hd.prototype.constructor=olympe.ha.node.host.Hd;olympe.ha.node.host.Hd.prototype.destroy=function(){};olympe.ha.node.host.Hd.prototype.destroy=olympe.ha.node.host.Hd.prototype.destroy;olympe.ha.node.host.Hd.prototype.Xa=function(){return this.N};olympe.ha.node.host.Hd.la=[olympe.host.ba.Hd];olympe.ha.node.host.$p=class{constructor(a){this.N=a}oj(){return!1}bl(){this.N.error('No history manager implemented in Node')}C(){this.bl();return Gb()}F(){this.bl()}};olympe.ha.node.host.$p.la=[olympe.host.Ei];olympe.ha.node.host.gd=class{constructor(){this.C={};this.L={}}destroy(){}U(a){clearTimeout(this.C[a]);delete this.C[a]}aa(a,b,c){this.C[b]=setTimeout(c,a)}G(a){clearTimeout(this.C[a]);delete this.C[a]}Y(a,b,c){this.L[b]=setInterval(c,a)}F(a){clearInterval(this.L[a]);delete this.L[a]}};olympe.host.Zp.register(olympe.host.ba.Yp.rr,olympe.ha.node.host.gd);olympe.ha.node.host.gd.la=[olympe.host.ba.gd];olympe.ha.node.host.yk=class{constructor(a){this.N=a}};olympe.ha.node.host.yk.la=[olympe.host.yk];olympe.T.config(function(a){qa(a,olympe.host.P.Il,olympe.ha.node.host.$p,olympe.host.P.Ea);qa(a,olympe.host.P.Wq,olympe.ha.node.host.yk,olympe.host.P.Ea)},'olympe.native.node.host');olympe.net.rd={};olympe.net.rd.Ml=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.F=this.G=this.L=null}Z(){return this.id}open(a){const b=`#${this.id}`,c=this.Y(a);c.binaryType='arraybuffer';c.onopen=()=>{this.N.info('Websocket OPENED');this.L?(this.N.debug('Notifying upper layer for WebSocket',b),this.L()):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=
979
980
  0};c.onmessage=d=>{d='string'===typeof d.data?String(d.data):Da(d.data);this.N.debug(b,'<',d);this.F&&this.F(d)};c.onclose=()=>{this.N.debug(`WebSocket ${b} CLOSED`);this.G&&this.G()};c.onerror=()=>{this.N.debug(`WebSocket ${b} ERROR`)};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);break;default:return this.N.debug(b,
980
- '- 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')}ka(a){this.L=a||null}aa(a){this.F=a||null}U(a){this.G=a||null}Y(){}};olympe.net.rd.WebSocket.la=[olympe.net.WebSocket];olympe.ha.node.net={};olympe.ha.node.net.lu=class extends olympe.net.sa{constructor(a,b){super(a,b);this.Y=new olympe.ha.node.net.Ml(a)}U(){return'NodeJS'}aa(a){var b=this.G++;a=a.C();this.N.debug('CREATE Websocket #'+b+' to '+a);b=new olympe.ha.node.net.mu(b,this.N);b.open(a);return b}C(a,b){this.N.debug('SEND HTTP '+a.method+' to '+a.C());const c=this.G++;b=Qb(this,c,b);this.Y.G(c,{u:a.C(),s:Mb(a),h:Kb(a),p:a.port,z:Lb(a),q:Pb(a),m:a.method,v:a.hj(),k:a.key,c:a.cert,a:a.ca,j:a.rejectUnauthorized,b:a.body,r:a.F},b)}L(){this.N.warn('DOWNLOAD FILE not available with node native implementation. URL:')}F(){return this.Y}};const Ok=require('fs'),Pk=require('http'),Qk=require('https');
981
+ '- 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')}ja(a){this.L=a||null}aa(a){this.F=a||null}U(a){this.G=a||null}Y(){}};olympe.net.rd.WebSocket.la=[olympe.net.WebSocket];olympe.ha.node.net={};olympe.ha.node.net.mu=class extends olympe.net.sa{constructor(a,b){super(a,b);this.Y=new olympe.ha.node.net.Ml(a)}U(){return'NodeJS'}aa(a){var b=this.G++;a=a.C();this.N.debug('CREATE Websocket #'+b+' to '+a);b=new olympe.ha.node.net.nu(b,this.N);b.open(a);return b}C(a,b){this.N.debug('SEND HTTP '+a.method+' to '+a.C());const c=this.G++;b=Qb(this,c,b);this.Y.G(c,{u:a.C(),s:Mb(a),h:Kb(a),p:a.port,z:Lb(a),q:Pb(a),m:a.method,v:a.hj(),k:a.key,c:a.cert,a:a.ca,j:a.rejectUnauthorized,b:a.body,r:a.F},b)}L(){this.N.warn('DOWNLOAD FILE not available with node native implementation. URL:')}F(){return this.Y}};const Ok=require('fs'),Pk=require('http'),Qk=require('https');
981
982
  olympe.ha.node.net.Ml=class extends olympe.net.rd.Ml{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((E,S)=>{Ok.readFile(w,(I,Z)=>{I?S(I):(B[y]=Z,E(B))})});p=w=>{const y=E=>{E.setEncoding(v===olympe.net.cb.ResponseType.zk?'utf-8':'binary');let S='';E.on('data',I=>{S+=I});E.on('end',()=>{if(v!==olympe.net.cb.ResponseType.zk){var I=
982
983
  (new Uint8Array(Buffer.from(S,'binary'))).buffer;I=v===olympe.net.cb.ResponseType.ql?new Blob([I]):I}else I=S;c(this.F(E.statusCode,E.statusMessage,I,E.headers))})},B=d?new Qk.request(w,y):new Pk.request(w,y);this.C.set(a,()=>{B.destroy()});B.on('error',E=>{c(this.F(0,'Conection refused','Error connecting to '+u+' with method '+f+', code = '+E.code+', message = '+E.message,''))});!e||'POST'!==f&&'PUT'!==f?B.end():(e instanceof Blob?e.arrayBuffer():Promise.resolve(e)).then(E=>{B.write(E instanceof
983
- ArrayBuffer?Buffer.from(E):E);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.Tg(c,a,b,d)}};olympe.ha.node.net.mu=class extends olympe.net.rd.WebSocket{Y(a){return new (require('ws'))(a)}};olympe.ha.node.net.Config={YB:'native.html.net.useWorkers'};olympe.T.config(function(a){qa(a,olympe.net.P.xa,olympe.ha.node.net.lu,olympe.net.P.Ea,olympe.host.P.xa)},'olympe.native.node.net');olympe.ha.node.net.http={};const Rk=require('fastify'),al=require('fastify-cors'),bl={Pi:0,vm:1,vk:2};
984
- function cl(a,b){a.F.route({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.sx(e,new Map(Object.entries(c.params))).then(k=>{const l=k.getData();a.N.debug('> HTTP: reply with body:',l instanceof ArrayBuffer?
985
- 'binary':l);d.code(k.Rd()).headers(k.hj()).send(l instanceof ArrayBuffer?Buffer.from(l):l)}).catch(k=>{a.N.debug('> HTTP: reply with internal server error:',k);d.code(olympe.net.cb.hd.Kq).header(olympe.net.cb.Headers.Kj,'text/plain').send({error:`Internal server error: ${k}`})})}})}
986
- olympe.ha.node.net.http.Fk=class extends olympe.net.Fk{constructor(a,b,c){super(a);this.F=this.createServer();this.host=b;this.port=c;this.G=new Map;this.U=null;this.C=bl.Pi;this.Ke=new Set}aa(a,b){this.U={origin:'*',methods:a,allowedHeaders:b};return this}L(a,b,c,d){this.G.set(a,{path:b,methods:c,sx:d});switch(this.C){case bl.Pi:return this.start();case bl.vk:return this.stop(),this.start();case bl.vm:return new Promise((e,f)=>{this.Ke.add(g=>g?f(g):e())});default:return Promise.reject('Webservice in unknown state')}}Y(a){this.G.delete(a);
984
+ ArrayBuffer?Buffer.from(E):E);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.Tg(c,a,b,d)}};olympe.ha.node.net.nu=class extends olympe.net.rd.WebSocket{Y(a){return new (require('ws'))(a)}};olympe.ha.node.net.Config={ZB:'native.html.net.useWorkers'};olympe.T.config(function(a){qa(a,olympe.net.P.xa,olympe.ha.node.net.mu,olympe.net.P.Ea,olympe.host.P.xa,new olympe.T.fa(olympe.net.Config.kp))},'olympe.native.node.net');olympe.ha.node.net.http={};const Rk=require('fastify'),al=require('fastify-cors'),bl={Pi:0,vm:1,vk:2};
985
+ function cl(a,b){a.F.route({bodyLimit:1048576*a.ja,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.tx(e,new Map(Object.entries(c.params))).then(k=>{const l=k.getData();a.N.debug('> HTTP: reply with body:',l instanceof
986
+ ArrayBuffer?'binary':l);d.code(k.Rd()).headers(k.hj()).send(l instanceof ArrayBuffer?Buffer.from(l):l)}).catch(k=>{a.N.debug('> HTTP: reply with internal server error:',k);d.code(olympe.net.cb.hd.Lq).header(olympe.net.cb.Headers.Kj,'text/plain').send({error:`Internal server error: ${k}`})})}})}
987
+ olympe.ha.node.net.http.Fk=class extends olympe.net.Fk{constructor(a,b,c,d){super(a);this.ja=d;this.F=this.createServer();this.host=b;this.port=c;this.G=new Map;this.U=null;this.C=bl.Pi;this.Ke=new Set}aa(a,b){this.U={origin:'*',methods:a,allowedHeaders:b};return this}L(a,b,c,d){this.G.set(a,{path:b,methods:c,tx:d});switch(this.C){case bl.Pi:return this.start();case bl.vk:return this.stop(),this.start();case bl.vm:return new Promise((e,f)=>{this.Ke.add(g=>g?f(g):e())});default:return Promise.reject('Webservice in unknown state')}}Y(a){this.G.delete(a);
987
988
  this.stop();return 0===this.G.size?Promise.resolve():this.start()}stop(){this.C===bl.vk&&(this.F.close(),this.C=bl.Pi,this.F=this.createServer())}start(){return this.C===bl.Pi?new Promise((a,b)=>{this.F.register(al,this.U);for(const c of this.G.values())cl(this,c);this.C=bl.vm;this.F.listen(this.port,'0.0.0.0',(c,d)=>{this.C=bl.vk;this.Ke.forEach(e=>e(c));this.Ke.clear();c?(this.stop(),b(c)):(this.N.debug('Web server listening on '+d),a())})}):Promise.reject('Try to start a webservice already started')}createServer(){const a=
988
- Rk({logger:!0});a.addContentTypeParser('*',{parseAs:'buffer'},(b,c,d)=>{d(null,c)});return a}};olympe.T.config(function(a){A(a,olympe.net.P.Bm,olympe.ha.node.net.http.Fk,olympe.net.P.Ea,new olympe.T.fa(olympe.net.Config.Jl),new olympe.T.fa(olympe.net.Config.Kl))},'olympe.native.node.net.http');olympe.ha.node.W={};const dl=new Map;olympe.ha.node.W.tl=class extends olympe.W.tl{U(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.Ja().C(b))}L(a){var b=()=>Math.random().toString(16).slice(-4);b=`blob://${`${b()}${b()}-${b()}-${b()}-${b()}-${b()}${b()}${b()}`}`;dl.set(b,a);return b}F(a,b,c){dl.has(a)?b(dl.get(a)):c&&c('No object has been found for that url. Maybe the URL has already been revoked')}Y(a){dl.delete(a)}};olympe.T.config(function(a){qa(a,olympe.W.P.vh,olympe.ha.node.W.tl)},'olympe.native.node.utils');olympe.ha.node.auth={};olympe.ha.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.ha.node.auth.$p.la=[olympe.auth.tk];olympe.T.config(a=>{A(a,olympe.auth.P.pk,olympe.ha.node.auth.$p)},'olympe.native.node.auth');olympe.ha.node.ic={};olympe.ha.node.ic.Pp=class{constructor(a){this.F={};this.N=a}C(a){void 0===this.F[a]&&(this.F[a]=new olympe.ha.node.ic.Qp(a,this.N));return this.F[a].open()}};olympe.ha.node.ic.Pp.la=[olympe.ic.Wt];olympe.ha.node.ic.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();
989
- b&&b(!0)}clear(){this.C||this.open();this.db.setState({})}};olympe.ha.node.ic.Qp.la=[olympe.ic.Xt];olympe.T.config(function(a){A(a,olympe.ic.P.ck,olympe.ha.node.ic.Pp,olympe.ic.P.Ea)},'olympe.native.node.localstorage');olympe.ha.node.storage={};olympe.ha.node.storage.Storage=class{constructor(a){this.N=a}F(a){a&&a('Not Implemented.')}U(a){a&&a('Not Implemented.')}write(a,b,c,d,e){e&&e('Not Implemented.')}G(a){a&&a('Not Implemented.')}L(a){a&&a('Not Implemented.')}C(a){a&&a('Not Implemented.')}open(a){a(null)}close(a){a(null)}};olympe.ha.node.storage.Storage.la=[olympe.ic.Storage];olympe.T.config(function(a){qa(a,olympe.ic.P.Qi,olympe.ha.node.storage.Storage,olympe.host.P.Ea)},'olympe.native.html.storage');olympe.Fg={};olympe.Fg.Config={VERSION:'version.version',As:'version.branch',bg:'version.commit',Yu:'version.tag',So:'version.olympe-framework',Bs:'version.build'};olympe.T.config(function(a){D(a,olympe.Fg.Config.VERSION,'');D(a,olympe.Fg.Config.As,'');D(a,olympe.Fg.Config.bg,'');D(a,olympe.Fg.Config.Yu,'');D(a,olympe.Fg.Config.So,'');D(a,olympe.Fg.Config.Bs,'')},'olympe.main');const el=require('fs');let va,ua;function fl(a,b){el.readFile(a,(c,d)=>{c?b(Object.create(null)):(d=JSON.parse(d),b(d))})}
989
+ Rk({logger:!0});a.addContentTypeParser('*',{parseAs:'buffer'},(b,c,d)=>{d(null,c)});return a}};olympe.T.config(function(a){A(a,olympe.net.P.Bm,olympe.ha.node.net.http.Fk,olympe.net.P.Ea,new olympe.T.fa(olympe.net.Config.Jl),new olympe.T.fa(olympe.net.Config.Kl))},'olympe.native.node.net.http');olympe.ha.node.W={};const dl=new Map;olympe.ha.node.W.tl=class extends olympe.W.tl{U(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.Ja().C(b))}L(a){var b=()=>Math.random().toString(16).slice(-4);b=`blob://${`${b()}${b()}-${b()}-${b()}-${b()}-${b()}${b()}${b()}`}`;dl.set(b,a);return b}F(a,b,c){dl.has(a)?b(dl.get(a)):c&&c('No object has been found for that url. Maybe the URL has already been revoked')}Y(a){dl.delete(a)}};olympe.T.config(function(a){qa(a,olympe.W.P.vh,olympe.ha.node.W.tl)},'olympe.native.node.utils');olympe.ha.node.auth={};olympe.ha.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.ha.node.auth.aq.la=[olympe.auth.tk];olympe.T.config(a=>{A(a,olympe.auth.P.pk,olympe.ha.node.auth.aq)},'olympe.native.node.auth');olympe.ha.node.ic={};olympe.ha.node.ic.Qp=class{constructor(a){this.F={};this.N=a}C(a){void 0===this.F[a]&&(this.F[a]=new olympe.ha.node.ic.Rp(a,this.N));return this.F[a].open()}};olympe.ha.node.ic.Qp.la=[olympe.ic.Xt];olympe.ha.node.ic.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();
990
+ b&&b(!0)}clear(){this.C||this.open();this.db.setState({})}};olympe.ha.node.ic.Rp.la=[olympe.ic.Yt];olympe.T.config(function(a){A(a,olympe.ic.P.ck,olympe.ha.node.ic.Qp,olympe.ic.P.Ea)},'olympe.native.node.localstorage');olympe.ha.node.storage={};olympe.ha.node.storage.Storage=class{constructor(a){this.N=a}F(a){a&&a('Not Implemented.')}U(a){a&&a('Not Implemented.')}write(a,b,c,d,e){e&&e('Not Implemented.')}G(a){a&&a('Not Implemented.')}L(a){a&&a('Not Implemented.')}C(a){a&&a('Not Implemented.')}open(a){a(null)}close(a){a(null)}};olympe.ha.node.storage.Storage.la=[olympe.ic.Storage];olympe.T.config(function(a){qa(a,olympe.ic.P.Qi,olympe.ha.node.storage.Storage,olympe.host.P.Ea)},'olympe.native.html.storage');olympe.Fg={};olympe.Fg.Config={VERSION:'version.version',Bs:'version.branch',bg:'version.commit',Zu:'version.tag',So:'version.olympe-framework',Cs:'version.build'};olympe.T.config(function(a){D(a,olympe.Fg.Config.VERSION,'');D(a,olympe.Fg.Config.Bs,'');D(a,olympe.Fg.Config.bg,'');D(a,olympe.Fg.Config.Zu,'');D(a,olympe.Fg.Config.So,'');D(a,olympe.Fg.Config.Cs,'')},'olympe.main');const el=require('fs');let va,ua;function fl(a,b){el.readFile(a,(c,d)=>{c?b(Object.create(null)):(d=JSON.parse(d),b(d))})}
990
991
  function gl(){if(void 0!==va&&void 0!==ua){0===Object.keys(ua).length&&console.warn('No configuration found. Check presence of oConfig.json');0===Object.keys(va).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]);f=g[3];void 0===f?f=!0:f.startsWith('"')&&f.endsWith('"')?f=f.substring(1,f.length-1):d.test(f)?f='true'===
991
- f.toLowerCase():e.test(f)&&(f=parseFloat(f));a[g[1]]=f}a=new olympe.T.Ls(a);d=a.Xa();d.debug('Registering configurations...');d.C++;for(let f=0,g=ja.length;f<g;f++)b=a,c=ja[f],pa(b.N,'Registering configure callback '+(c.C?'for module '+c.C:'')),b.F.push(c.F);na(d);d.debug('done registering');a=a.compile();c=a.Xa();c.debug('Running run callbacks of container...');for(let f=0,g=ka.length;f<g;f++)c.C++,d=ka[f],b=a,e=ma(b,d.ej()),b.N.debug('Calling run callback '+(d.C?'for module '+d.C:'')),d.F.apply(null,
992
- e),na(c);c.debug('done calling run callbacks. DI process completed!')}}olympe.W.an('oConfig.json',fl,function(a){ua=a;gl()});fl('version.json',function(a){va=a;gl()});olympe.yc={};olympe.yc.xs=class{run(){}};olympe.yc.sa=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)}wj(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),
992
+ f.toLowerCase():e.test(f)&&(f=parseFloat(f));a[g[1]]=f}a=new olympe.T.Ms(a);d=a.Xa();d.debug('Registering configurations...');d.C++;for(let f=0,g=ja.length;f<g;f++)b=a,c=ja[f],pa(b.N,'Registering configure callback '+(c.C?'for module '+c.C:'')),b.F.push(c.F);na(d);d.debug('done registering');a=a.compile();c=a.Xa();c.debug('Running run callbacks of container...');for(let f=0,g=ka.length;f<g;f++)c.C++,d=ka[f],b=a,e=ma(b,d.ej()),b.N.debug('Calling run callback '+(d.C?'for module '+d.C:'')),d.F.apply(null,
993
+ e),na(c);c.debug('done calling run callbacks. DI process completed!')}}olympe.W.an('oConfig.json',fl,function(a){ua=a;gl()});fl('version.json',function(a){va=a;gl()});olympe.yc={};olympe.yc.ys=class{run(){}};olympe.yc.sa=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)}wj(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),
993
994
  this.F.run()):this.N.error('No app registered under name: '+this.C)}};olympe.yc.wj=function(a,b,c){const d=a.Xa();c?d.debug('Pre-registering application '+b+' under name '+c+' (use '+olympe.yc.Config.ff+'='+c+' to start it)'):d.debug('Pre-registering application '+b+' as default one');a.Pd(olympe.yc.P.xa).config([b],function(e,f){f.wj(e,c,b)},'olympe.hc.registerApp')};olympe.yc.P={xa:'hc.Manager',Ea:'hc.Logger'};olympe.yc.Config={ff:'hc.app',Gl:'hc.globalToken'};olympe.T.config(function(a){D(a,olympe.yc.Config.ff,'default');D(a,olympe.yc.Config.Gl,!1);C(a,olympe.yc.P.Ea,[olympe.ra.P.xa],b=>b.Rc('hc'));C(a,olympe.auth.P.Dj,[new olympe.T.fa(olympe.yc.Config.ff),new olympe.T.fa(olympe.yc.Config.Gl)],(b,c)=>new olympe.auth.ol(c?'':b));A(a,olympe.yc.P.xa,olympe.yc.sa,new olympe.T.fa(olympe.yc.Config.ff),olympe.yc.P.Ea)},'olympe.hc');
994
995
  olympe.T.run([olympe.yc.P.xa],a=>a.run(),'olympe.hc');olympe.sc.Yf={};function hl(a){a.N.info('Starting application '+a.C);let b=!1;const c=olympe.dc.Oa();if(0<a.C.length){const d=tc(c,a.C,(e,f)=>{if(e){const g=Ui(f);g.run?(a.N.debug('application retrieved: running'),(new olympe.D.Xb('Application execution context',a.F.xc())).run(()=>{b=!0;g.run(new olympe.sc.Ta(g.R()))})):a.N.error('application retrieved: not an Application with a run() method')}else il(a)});olympe.D.Ja().onDestroy(()=>{uc(c,a.C,d)});Hb(()=>{b||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)`)},
995
996
  1E4)}}
996
997
  function jl(a,b){if(a.L)a.N.debug('Sending getContext request'),Qf(a.U,d=>{d?a.N.error('failed to synchronise (authenticated) with server: '+d.message):(a.N.debug('synchronisation request successful'),$i=a.C,b())});else{var c=olympe.dc.Ed.SUBSCRIBE;const d=olympe.dc.Ed.Li,e=a.F.Zk()?d:c;a.N.debug((a.F.Zk()?'PULLING':'SUBSCRIBING')+' application '+a.C);const f=olympe.D.Ja();c=new olympe.async.wk(f);c.add((g,h)=>{Ve(new olympe.dc.kf(a.C,e),olympe.dc.Ub.tf).hb(k=>{var l=olympe.dc.Ga;var n=(n=olympe.dc.od.from(a.C).sb(olympe.sc.Ma.Me.C).sb(olympe.sc.logic.Xd.G.Gc()).jd())&&n.R()||
997
- olympe.dc.Ga.Pc;l.jc=n;k?h(k.message):g()})});c.add(g=>{olympe.D.Ec([a.G.Dg()],h=>{(new olympe.dc.Ca(h)).Ke(f.C(g))})});c.add((g,h)=>{const k=olympe.sc.md.C.Gp,l=olympe.sc.md.C.am;aj(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 il(a){a.N.debug('Stop the application');a.F.xc().aa()}
998
+ olympe.dc.Ga.Pc;l.jc=n;k?h(k.message):g()})});c.add(g=>{olympe.D.Ec([a.G.Dg()],h=>{(new olympe.dc.Ca(h)).Ke(f.C(g))})});c.add((g,h)=>{const k=olympe.sc.md.C.Hp,l=olympe.sc.md.C.am;aj(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 il(a){a.N.debug('Stop the application');a.F.xc().aa()}
998
999
  olympe.sc.Yf.tm=class{constructor(a,b,c,d,e,f,g){this.G=a;this.U=b;this.N=c;this.F=d;this.C=e;this.L=f;this.Y=g||!1}run(){const a=olympe.auth.sa.C.Ng,b=olympe.auth.sa.C.gg,c=olympe.auth.sa.C.Ah,d=olympe.auth.sa.C.ni;this.N.debug('runtime starting for app #'+this.C);let e=!1;const f=()=>{e||(hl(this),e=!0)};olympe.D.Ec([this.G.getState()],g=>{switch(g){case a:case c:this.N.debug('Server session opened, calling once connected callback');jl(this,f);break;case b:this.N.debug('Disconnected, working offline.');
999
- this.Y&&!e&&jl(this,f);break;case d:this.N.debug('waiting for authentication');break;default:this.N.debug('No server session available, waiting for connection'),e=!1,il(this)}},'Runtime initial auth state listener')}};olympe.sc.Yf.tm.C='app_instance';olympe.sc.Yf.tm.la=[olympe.yc.xs];olympe.sc.Yf.Gj={tf:'sc.runtime.Main'};
1000
- olympe.T.config(function(a){C(a,olympe.auth.P.Dj,[new olympe.T.fa(olympe.yc.Config.ff),new olympe.T.fa(olympe.sc.Config.ff),new olympe.T.fa(olympe.yc.Config.Gl)],(b,c,d)=>new olympe.auth.ol(d?'':b+(c?'-'+c:'')));A(a,olympe.sc.Yf.Gj.tf,olympe.sc.Yf.tm,olympe.auth.P.xa,olympe.dc.query.P.xa,olympe.sc.P.Ea,olympe.sc.P.sm,new olympe.T.fa(olympe.sc.Config.ff),new olympe.T.fa(olympe.dc.Config.$g),new olympe.T.fa(olympe.sc.Config.aq));olympe.yc.wj(a,olympe.sc.Yf.Gj.tf,'sc.runtime');olympe.yc.wj(a,olympe.sc.Yf.Gj.tf,
1000
+ this.Y&&!e&&jl(this,f);break;case d:this.N.debug('waiting for authentication');break;default:this.N.debug('No server session available, waiting for connection'),e=!1,il(this)}},'Runtime initial auth state listener')}};olympe.sc.Yf.tm.C='app_instance';olympe.sc.Yf.tm.la=[olympe.yc.ys];olympe.sc.Yf.Gj={tf:'sc.runtime.Main'};
1001
+ olympe.T.config(function(a){C(a,olympe.auth.P.Dj,[new olympe.T.fa(olympe.yc.Config.ff),new olympe.T.fa(olympe.sc.Config.ff),new olympe.T.fa(olympe.yc.Config.Gl)],(b,c,d)=>new olympe.auth.ol(d?'':b+(c?'-'+c:'')));A(a,olympe.sc.Yf.Gj.tf,olympe.sc.Yf.tm,olympe.auth.P.xa,olympe.dc.query.P.xa,olympe.sc.P.Ea,olympe.sc.P.sm,new olympe.T.fa(olympe.sc.Config.ff),new olympe.T.fa(olympe.dc.Config.$g),new olympe.T.fa(olympe.sc.Config.bq));olympe.yc.wj(a,olympe.sc.Yf.Gj.tf,'sc.runtime');olympe.yc.wj(a,olympe.sc.Yf.Gj.tf,
1001
1002
  'sc.headless');olympe.yc.wj(a,olympe.sc.Yf.Gj.tf)},'olympe.sc.runtime');olympe.public={};function kl(a,b){const c=new olympe.auth.Request;for(const [d,e]of a)c.set(d,e);return new Promise(d=>{ec(olympe.public.Ua.get(),c,b,()=>{d()})})}
1002
- olympe.public.Ua=class{static iw(a,b){return olympe.auth.Jb.Ee.cj(a,b)}static getState(){return jc(olympe.public.Ua.get())}static rw(){return olympe.D.bb(olympe.public.Ua.get().Dg())}static by(a){const b=new olympe.D.Xb('Observe user tag','function'===typeof a.xc?a.xc():a);return new rxjs.Observable(c=>{b.run(()=>olympe.D.Ec([olympe.public.Ua.get().Dg()],d=>{c.next(d);olympe.D.Ja().onDestroy(()=>c.complete())}));return()=>b.destroy()})}static bd(){return olympe.D.bb(mc(olympe.public.Ua.get()))}static Gw(){return olympe.D.bb(olympe.public.Ua.get().bi())||
1003
- void 0}static hi(){olympe.public.Ua.get().hi()}static oh(a){return new Promise((b,c)=>{olympe.public.Ua.get().oh(a,d=>d?c(d):b())})}static Ex(a,b){return kl((new Map).set('username',a).set('password',b),'srp')}static Dx(){return kl(new Map,'saml')}static Fx(a,b){return kl((new Map).set('username',a).set('nonce',b),'localToken')}static Cx(){return kl(new Map,'openID')}static un(){return new Promise(a=>{lc(()=>{olympe.public.Ua.get().oa.delete('logoutCallback');a()});olympe.public.Ua.get().un()})}static get(){return olympe.auth.Tc()}};
1004
- olympe.public.Ua.logout=olympe.public.Ua.un;olympe.public.Ua.loginOpenID=olympe.public.Ua.Cx;olympe.public.Ua.loginToken=olympe.public.Ua.Fx;olympe.public.Ua.loginSAML=olympe.public.Ua.Dx;olympe.public.Ua.loginSRP=olympe.public.Ua.Ex;olympe.public.Ua.getUserFromToken=olympe.public.Ua.oh;olympe.public.Ua.sendKeepAlive=olympe.public.Ua.hi;olympe.public.Ua.getIDPToken=olympe.public.Ua.Gw;olympe.public.Ua.getToken=olympe.public.Ua.bd;olympe.public.Ua.observeUser=olympe.public.Ua.by;
1005
- olympe.public.Ua.getCurrentUser=olympe.public.Ua.rw;olympe.public.Ua.getState=olympe.public.Ua.getState;olympe.public.Ua.generateSRPData=olympe.public.Ua.iw;olympe.public.$a=class{static create(a){return new class extends olympe.dc.V.Og{C(b,c){b=a(olympe.dc.CloudObject.get(c));if('boolean'===typeof b)return b;const d=olympe.D.Uc(olympe.D.qa),e=b.subscribe(f=>d.update(olympe.D.Cc(f)));olympe.D.Ja().zc(()=>e.unsubscribe());return d.Fb()}}}};
1006
- olympe.public.Ne=class{static create(a){return new class extends olympe.dc.Cb.Og{L(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.Uc(olympe.D.ea),e=b.subscribe(f=>d.update(olympe.D.za(f)));olympe.D.Ja().zc(()=>e.unsubscribe());return d.Fb()}}}};'object'===typeof exports&&(exports={CloudObject:olympe.dc.CloudObject,Relation:olympe.dc.ta.Relation,Direction:olympe.dc.Aa,generateTag:olympe.W.dj,tagToString:olympe.dc.wa,register:olympe.dc.register,defineProperty:olympe.dc.defineProperty,defineRelation:olympe.dc.ih,defineInverseRelation:olympe.dc.Qv,BrickContext:olympe.sc.Ta,Brick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Action,GlobalProperties:olympe.sc.Ta.ig,registerBrick:olympe.sc.logic.ya.C,FunctionBrick:olympe.sc.logic.Function,
1003
+ olympe.public.Ua=class{static jw(a,b){return olympe.auth.Jb.Ee.cj(a,b)}static getState(){return jc(olympe.public.Ua.get())}static sw(){return olympe.D.bb(olympe.public.Ua.get().Dg())}static ey(a){const b=new olympe.D.Xb('Observe user tag','function'===typeof a.xc?a.xc():a);return new rxjs.Observable(c=>{b.run(()=>olympe.D.Ec([olympe.public.Ua.get().Dg()],d=>{c.next(d);olympe.D.Ja().onDestroy(()=>c.complete())}));return()=>b.destroy()})}static bd(){return olympe.D.bb(mc(olympe.public.Ua.get()))}static Hw(){return olympe.D.bb(olympe.public.Ua.get().bi())||
1004
+ void 0}static hi(){olympe.public.Ua.get().hi()}static oh(a){return new Promise((b,c)=>{olympe.public.Ua.get().oh(a,d=>d?c(d):b())})}static Fx(a,b){return kl((new Map).set('username',a).set('password',b),'srp')}static Ex(){return kl(new Map,'saml')}static Gx(a,b){return kl((new Map).set('username',a).set('nonce',b),'localToken')}static Dx(){return kl(new Map,'openID')}static un(){return new Promise(a=>{lc(()=>{olympe.public.Ua.get().oa.delete('logoutCallback');a()});olympe.public.Ua.get().un()})}static get(){return olympe.auth.Tc()}};
1005
+ olympe.public.Ua.logout=olympe.public.Ua.un;olympe.public.Ua.loginOpenID=olympe.public.Ua.Dx;olympe.public.Ua.loginToken=olympe.public.Ua.Gx;olympe.public.Ua.loginSAML=olympe.public.Ua.Ex;olympe.public.Ua.loginSRP=olympe.public.Ua.Fx;olympe.public.Ua.getUserFromToken=olympe.public.Ua.oh;olympe.public.Ua.sendKeepAlive=olympe.public.Ua.hi;olympe.public.Ua.getIDPToken=olympe.public.Ua.Hw;olympe.public.Ua.getToken=olympe.public.Ua.bd;olympe.public.Ua.observeUser=olympe.public.Ua.ey;
1006
+ olympe.public.Ua.getCurrentUser=olympe.public.Ua.sw;olympe.public.Ua.getState=olympe.public.Ua.getState;olympe.public.Ua.generateSRPData=olympe.public.Ua.jw;olympe.public.$a=class{static create(a){return new class extends olympe.dc.V.Og{C(b,c){b=a(olympe.dc.CloudObject.get(c));if('boolean'===typeof b)return b;const d=olympe.D.Uc(olympe.D.qa),e=b.subscribe(f=>d.update(olympe.D.Cc(f)));olympe.D.Ja().zc(()=>e.unsubscribe());return d.Fb()}}}};
1007
+ olympe.public.Ne=class{static create(a){return new class extends olympe.dc.Cb.Og{L(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.Uc(olympe.D.ea),e=b.subscribe(f=>d.update(olympe.D.za(f)));olympe.D.Ja().zc(()=>e.unsubscribe());return d.Fb()}}}};'object'===typeof exports&&(exports={CloudObject:olympe.dc.CloudObject,Relation:olympe.dc.ta.Relation,Direction:olympe.dc.Aa,generateTag:olympe.W.dj,tagToString:olympe.dc.wa,register:olympe.dc.register,defineProperty:olympe.dc.defineProperty,defineRelation:olympe.dc.ih,defineInverseRelation:olympe.dc.Rv,BrickContext:olympe.sc.Ta,Brick:olympe.sc.logic.Function,ActionBrick:olympe.sc.logic.Action,GlobalProperties:olympe.sc.Ta.ig,registerBrick:olympe.sc.logic.ya.C,FunctionBrick:olympe.sc.logic.Function,
1007
1008
  Context:olympe.sc.Ta,Entry:olympe.dc.ta.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.hg,EnumValue:olympe.dm.Enum,Workflow:olympe.sc.workflow.Workflow,WorkflowState:olympe.sc.workflow.Qe,WorkflowTransition:olympe.sc.workflow.Transition,WorkflowObjectState:olympe.sc.workflow.ObjectState,
1008
1009
  Transaction:olympe.sc.Transaction,BurstTransaction:olympe.dc.ri,QueryResult:olympe.dc.Va,Query:olympe.dc.gb,QuerySingle:olympe.dc.od,Predicate:olympe.dc.ba.$a,RelatedTo:olympe.dc.ba.V.De,Order:olympe.dc.ba.lk,Config:class{static getParameter(a){return olympe.T.getParameter(a)}},Color:olympe.D.Color,ErrorFlow:olympe.sc.logic.Error,ServiceRequest:olympe.H.Ba.nb.ga,Service:olympe.H.Ba.nb.zb,Auth:olympe.public.Ua,AuthState:{INIT:olympe.auth.sa.C.INIT,DISCONNECTED:olympe.auth.sa.C.gg,GUEST:olympe.auth.sa.C.Ah,
1009
1010
  AUTHENTICATING:olympe.auth.sa.C.ni,ERROR:olympe.auth.sa.C.uc,AUTHENTICATED:olympe.auth.sa.C.Ng},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.Oa()}},ListDef:olympe.dc.Ca,instanceToTag:olympe.dc.wa,